@abtnode/blocklet-services 1.16.49-beta-20250813-141500-f02b41b4 → 1.16.49-beta-20250814-102553-9278d1f7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{access-control-BcKWG1wa.js → access-control-BpbeOd5l.js} +1 -1
- package/dist/assets/{add-component-core-CHSSGHBg.js → add-component-core-19fDzf7w.js} +1 -1
- package/dist/assets/{add-resource-DC1_sP9P.js → add-resource-DcF5DGBS.js} +1 -1
- package/dist/assets/{addon-B8Vu2MS3.js → addon-DTju-oLy.js} +1 -1
- package/dist/assets/{advanced-DMpADi54.js → advanced-BKlOxllK.js} +1 -1
- package/dist/assets/{aigne-CBsKTiWL.js → aigne-DmJeSrJC.js} +1 -1
- package/dist/assets/{appearance-DInXMJY2.js → appearance-C0vB2Ngh.js} +1 -1
- package/dist/assets/{ar-BKfdi-bl.js → ar-DrftSIv3.js} +1 -1
- package/dist/assets/{arrow-down.svg-DUodC7Ld.js → arrow-down.svg-VpGUe2rM.js} +1 -1
- package/dist/assets/{audit-logs-CzlEEvCI.js → audit-logs-BOdMMiw_.js} +1 -1
- package/dist/assets/{authorize-B80jXWd0.js → authorize-BXobLOwY.js} +1 -1
- package/dist/assets/{base32-DjDr5HEK.js → base32-eJwrCU_s.js} +1 -1
- package/dist/assets/{bind-account-BABAdoh2.js → bind-account-CLXdfK9k.js} +1 -1
- package/dist/assets/{branding-CMJPNAPT.js → branding-Ba3KIUpk.js} +1 -1
- package/dist/assets/{branding-ZwRlAtol.js → branding-CfffMIxe.js} +1 -1
- package/dist/assets/{branding-M6PCXaJ1.js → branding-DIT14xNK.js} +2 -2
- package/dist/assets/{bundle-avatar-CsgRY1qN.js → bundle-avatar-Cel6hFKM.js} +1 -1
- package/dist/assets/{complete-GwyliVop.js → complete-BLE3iVY0.js} +1 -1
- package/dist/assets/{component-C3dWsQvt.js → component-DcxUOYLY.js} +3 -3
- package/dist/assets/{config-BtB4kSwu.js → config-BWRPtM4k.js} +1 -1
- package/dist/assets/{config-CCYF_L4r.js → config-BfjLzc_R.js} +1 -1
- package/dist/assets/{config-DApCVY4Y.js → config-dkLCQy3T.js} +1 -1
- package/dist/assets/{config-navigation-MUBctnXR.js → config-navigation-BHvF1mjF.js} +3 -3
- package/dist/assets/{config-space-Dji2nQRV.js → config-space-tLO83-g6.js} +1 -1
- package/dist/assets/{confirm-B32PxkWp.js → confirm-BDJGO8bh.js} +1 -1
- package/dist/assets/{connect-DqvnfmLZ.js → connect-BSVgMFMm.js} +1 -1
- package/dist/assets/{connect-BEFi8dla.js → connect-DM6B9M-Y.js} +1 -1
- package/dist/assets/{connect-to-DgCDbehT.js → connect-to-BSrYiYdy.js} +1 -1
- package/dist/assets/{dashboard-Tj8yP2Z7.js → dashboard-BgCxT1hg.js} +7 -7
- package/dist/assets/{de-MpfXQ3NK.js → de-CzR7Usym.js} +1 -1
- package/dist/assets/{delete-confirm-B7BHZ7XM.js → delete-confirm-DHEsSepo.js} +1 -1
- package/dist/assets/{domain-BASPOMcT.js → domain-D8756S8u.js} +1 -1
- package/dist/assets/{domain-action-card-DaSjMvff.js → domain-action-card-CDOSKDR8.js} +1 -1
- package/dist/assets/{domains-DDbju8VC.js → domains-CcpbD8O0.js} +1 -1
- package/dist/assets/{email-BpKR4cMX.js → email-D3Hg29bp.js} +1 -1
- package/dist/assets/engine-DNQukT7L.js +1 -0
- package/dist/assets/{es-BpFj8KP-.js → es-BHI4ILsC.js} +1 -1
- package/dist/assets/{exchange-passport-CAXt7cIJ.js → exchange-passport-f10XLUlw.js} +1 -1
- package/dist/assets/{form-CVIx-hvs.js → form-Bn8R25ZF.js} +1 -1
- package/dist/assets/{fr-CilO0zLV.js → fr-BqKCXdV2.js} +1 -1
- package/dist/assets/{fuel-DRwUfMsT.js → fuel-BWsNvj58.js} +1 -1
- package/dist/assets/{gen-access-key-BzfD0YW5.js → gen-access-key-C5aQP2Vo.js} +1 -1
- package/dist/assets/{gen-simple-access-key-B6hJvna9.js → gen-simple-access-key-B9w6zJI5.js} +1 -1
- package/dist/assets/{get-safe-url-DM7RwZvc.js → get-safe-url-oIssn-5r.js} +1 -1
- package/dist/assets/{hdkey-CrUMEP4B.js → hdkey-14e6Nlg3.js} +1 -1
- package/dist/assets/{hi-yAi4KA86.js → hi-DlvVN0mm.js} +1 -1
- package/dist/assets/{home-CpTX-k1v.js → home-C5YltZz-.js} +1 -1
- package/dist/assets/{id-D-HeXzMz.js → id-YNynvxGd.js} +1 -1
- package/dist/assets/{iframe-CHpw-i2w.js → iframe-AOE2Nmtj.js} +1 -1
- package/dist/assets/{index-CruC5qk4.js → index-1gQVvBTN.js} +1 -1
- package/dist/assets/{index-D1MPZP7H.js → index-B5b9PR4S.js} +1 -1
- package/dist/assets/{index-DpElP3rs.js → index-BJ1ubRag.js} +1 -1
- package/dist/assets/{index-rNyzt7-f.js → index-Bg647oh8.js} +1 -1
- package/dist/assets/{index-Bmme4cwW.js → index-BhPdV0UV.js} +1 -1
- package/dist/assets/index-By6tFcJ8.js +4 -0
- package/dist/assets/{index-0vzZm-sq.js → index-CTWp3jWl.js} +1 -1
- package/dist/assets/{index-Cvi2zSUY.js → index-CmcupnbA.js} +1 -1
- package/dist/assets/{index-BhtzMAWs.js → index-CrVkwp1D.js} +1 -1
- package/dist/assets/{index-CGL7HcjC.js → index-DD-656p6.js} +1 -1
- package/dist/assets/{index-O3MJ4eW3.js → index-DFZSZ5Jd.js} +1 -1
- package/dist/assets/{index-DM_hFdFx.js → index-DKaM5HrD.js} +1 -1
- package/dist/assets/{index-BZEuZSGl.js → index-DL522gV-.js} +1 -1
- package/dist/assets/{index-h3WvQRzJ.js → index-DQR-4jyw.js} +3 -3
- package/dist/assets/{index-BkEMXnXG.js → index-D__4XYf7.js} +1 -1
- package/dist/assets/{index-BcdBlJHQ.js → index-Dabem7F5.js} +1 -1
- package/dist/assets/{index-xzFvlWY6.js → index-Dlxm5Tj2.js} +1 -1
- package/dist/assets/{index-DAfNMdqh.js → index-DqJ-UXK3.js} +1 -1
- package/dist/assets/{index-DJuynn-u.js → index-DqPaEZqs.js} +1 -1
- package/dist/assets/{index-DNoNJJuw.js → index-DvIq19MO.js} +77 -77
- package/dist/assets/{index-BJ9QvinP.js → index-HZilmujw.js} +1 -1
- package/dist/assets/{index-C2jb3qUW.js → index-Mn5Bo2vG.js} +4 -4
- package/dist/assets/{index-BuvI59ON.js → index-vEtoWtal.js} +1 -1
- package/dist/assets/{invitation-BXGvcZRS.js → invitation-DC1BX88k.js} +1 -1
- package/dist/assets/{invite-Dinpahed.js → invite-DimTGuup.js} +1 -1
- package/dist/assets/{isURL-Bb15qx-x.js → isURL--iUcbnxL.js} +1 -1
- package/dist/assets/{issue-passport-Dkz08H9Y.js → issue-passport-CbUnHQn5.js} +1 -1
- package/dist/assets/{item-CucTySxT.js → item-DAEbqEP0.js} +1 -1
- package/dist/assets/{ja-CRcT1olQ.js → ja-DEmGhfzG.js} +1 -1
- package/dist/assets/{ko-BVbPgR9Q.js → ko-CfYoSPs0.js} +1 -1
- package/dist/assets/{landing-page-BtJCFmD2.js → landing-page-CGhoTPZA.js} +1 -1
- package/dist/assets/{layout-CRZRIFZ4.js → layout-BJym8Vpj.js} +1 -1
- package/dist/assets/{list-C6EcSIvj.js → list-BIhcTPQv.js} +1 -1
- package/dist/assets/{list-DuOlxUCn.js → list-BzwIj8-k.js} +3 -3
- package/dist/assets/{localization-DpT56oWf.js → localization-B2mzZfSM.js} +1 -1
- package/dist/assets/log-r6X6nQtq.js +110 -0
- package/dist/assets/{login-C0CJXbnr.js → login-dsQvG2gb.js} +1 -1
- package/dist/assets/{login-oauth-callback-Dw-6SpLt.js → login-oauth-callback-D4bBf050.js} +1 -1
- package/dist/assets/{logo-uploader-DfDbtbb8.js → logo-uploader-BUpUJeF0.js} +2 -2
- package/dist/assets/{lost-passport-zhSpUcAi.js → lost-passport-D8dFQVnf.js} +1 -1
- package/dist/assets/{open-window-DeCkeATD.js → open-window-Cv1GfxOS.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-C571LZOO.js → over-due-invoice-payment-B3xyNDNg.js} +1 -1
- package/dist/assets/{overview-BRXEgGWb.js → overview-DiI6CIz_.js} +1 -1
- package/dist/assets/{passport-item-CqMag6bd.js → passport-item-CHk2f4Pu.js} +1 -1
- package/dist/assets/{permission-Dq0o-1GG.js → permission-AjZwJFGT.js} +1 -1
- package/dist/assets/{preferences-DEym4oLZ.js → preferences-DoYoB7PA.js} +1 -1
- package/dist/assets/{profile-embed-CD2afA6i.js → profile-embed-CgODiJDf.js} +1 -1
- package/dist/assets/{pt-DjIqGhZP.js → pt-DTd68aWZ.js} +1 -1
- package/dist/assets/{publish-resource-BdgiCQzb.js → publish-resource-D6W8pLDw.js} +1 -1
- package/dist/assets/{ru-CP5-2ocR.js → ru-BHPYrefb.js} +1 -1
- package/dist/assets/{runtime-D60vI2TI.js → runtime-baG3v64u.js} +1 -1
- package/dist/assets/sdk-dE5DJvbC.js +1 -0
- package/dist/assets/{security-BfInt_Xi.js → security-BSgaaEY0.js} +1 -1
- package/dist/assets/{session-B067QcnJ.js → session-DWeKTd8B.js} +1 -1
- package/dist/assets/{setup-Do16jB1g.js → setup-DYaTnYGr.js} +1 -1
- package/dist/assets/{spaces-ucK1WAQv.js → spaces-DZ_73neu.js} +1 -1
- package/dist/assets/{start-C8luWciP.js → start-WZ2i359x.js} +1 -1
- package/dist/assets/{status-PUMLMu-J.js → status-B4lgq3AG.js} +1 -1
- package/dist/assets/{step-actions-DgcV8zCz.js → step-actions-CtR84Gv1.js} +1 -1
- package/dist/assets/{studio-B9FByEOI.js → studio-nh5KrdHJ.js} +1 -1
- package/dist/assets/{team-BPq5KCHV.js → team-B7tkpjgk.js} +1 -1
- package/dist/assets/{th-CslbyUot.js → th-Bk3GO_e5.js} +1 -1
- package/dist/assets/{traffic-DzuAj6Gg.js → traffic-Dbe5o1ZT.js} +1 -1
- package/dist/assets/{transfer-DkQeF4Py.js → transfer-B7_-PWxX.js} +1 -1
- package/dist/assets/{unsubscribe-BiMAFEJ-.js → unsubscribe-LEzgAA2Z.js} +1 -1
- package/dist/assets/{use-app-logo-DzFTqU3i.js → use-app-logo-CAskkBvX.js} +1 -1
- package/dist/assets/{user-center-C6APQ1tQ.js → user-center-2W4tsw00.js} +3 -3
- package/dist/assets/{user-sessions-BGZN3e4q.js → user-sessions-CPWMtmsD.js} +1 -1
- package/dist/assets/{util-CM3cih5O.js → util-Bb1ORHN3.js} +1 -1
- package/dist/assets/{util-BFlzHx4J.js → util-DiuDMXGx.js} +1 -1
- package/dist/assets/{vi-CSrjam88.js → vi-xPRidQ_j.js} +1 -1
- package/dist/assets/{wait-connect-zhfaNlMr.js → wait-connect-dMemTZwb.js} +1 -1
- package/dist/assets/{wizard-5OKaqjON.js → wizard-DkiFdKWc.js} +2 -2
- package/dist/assets/wizard-components-DE3e05mi.js +52 -0
- package/dist/assets/{wrap-locale-fD95lScr.js → wrap-locale-1WyGs8Eh.js} +1 -1
- package/dist/assets/{zh-GGX-IWj_.js → zh-B7NO6y1P.js} +1 -1
- package/dist/assets/{zh-DF8soasH.js → zh-CmNgzDEv.js} +1 -1
- package/dist/assets/{zh-tw-CfEpvT7A.js → zh-tw-DeWXdL1Q.js} +1 -1
- package/dist/index.html +144 -2
- package/dist/service-worker.js +1 -1
- package/package.json +32 -32
- package/dist/assets/engine-CG7v_sNE.js +0 -1
- package/dist/assets/index-D0mybwC6.js +0 -4
- package/dist/assets/log-B4-jbFWw.js +0 -108
- package/dist/assets/sdk-1bCjOEiK.js +0 -1
- package/dist/assets/wizard-components-CzzolZVI.js +0 -52
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import{at as Ke,j as re,W as ce,J as zr,bg as Kr,Q as Gr,ak as ze,a6 as Lr,cN as Vr,y as Br,bb as Pr,M as Ir,cn as Yr,z as Zr}from"./vendor-mui-core-B7zoO8f5.js";import{u as Xr}from"./useLocalStorage-Cw-tIN0T.js";import{a as Jr,d as $r,g as Hr,r as De}from"./vendor-react-Dvs43sk9.js";import{d as Qr,n as xr}from"./vendor-utils-DtY42AM-.js";import{aC as ei,Z as jr,ao as ti}from"./index-DNoNJJuw.js";import{T as ri,D as Er,F as ii,H as ni}from"./vendor-ux-CwCI0CzW.js";import{B as oi}from"./bundle-avatar-CsgRY1qN.js";import"./vendor-arcblock-BOtVH-Qa.js";import"./vendor-hooks-BRXKH6Nb.js";import"./lottie-web-4koyQiv_.js";var _r={exports:{}},kr;function si(){return kr||(kr=1,function(ee,Q){(function(G,Z){ee.exports=Z()})(self,function(){return(()=>{var G={4567:function(P,o,b){var f,u=this&&this.__extends||(f=function(r,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},f(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}f(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)});Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;var d=b(9042),_=b(6114),m=b(9924),v=b(3656),s=b(844),a=b(5596),p=b(9631),h=function(r){function e(t,i){var n=r.call(this)||this;n._terminal=t,n._renderService=i,n._liveRegionLineCount=0,n._charsToConsume=[],n._charsToAnnounce="",n._accessibilityTreeRoot=document.createElement("div"),n._accessibilityTreeRoot.classList.add("xterm-accessibility"),n._accessibilityTreeRoot.tabIndex=0,n._rowContainer=document.createElement("div"),n._rowContainer.setAttribute("role","list"),n._rowContainer.classList.add("xterm-accessibility-tree"),n._rowElements=[];for(var l=0;l<n._terminal.rows;l++)n._rowElements[l]=n._createAccessibilityTreeNode(),n._rowContainer.appendChild(n._rowElements[l]);if(n._topBoundaryFocusListener=function(c){return n._onBoundaryFocus(c,0)},n._bottomBoundaryFocusListener=function(c){return n._onBoundaryFocus(c,1)},n._rowElements[0].addEventListener("focus",n._topBoundaryFocusListener),n._rowElements[n._rowElements.length-1].addEventListener("focus",n._bottomBoundaryFocusListener),n._refreshRowsDimensions(),n._accessibilityTreeRoot.appendChild(n._rowContainer),n._renderRowsDebouncer=new m.TimeBasedDebouncer(n._renderRows.bind(n)),n._refreshRows(),n._liveRegion=document.createElement("div"),n._liveRegion.classList.add("live-region"),n._liveRegion.setAttribute("aria-live","assertive"),n._accessibilityTreeRoot.appendChild(n._liveRegion),!n._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return n._terminal.element.insertAdjacentElement("afterbegin",n._accessibilityTreeRoot),n.register(n._renderRowsDebouncer),n.register(n._terminal.onResize(function(c){return n._onResize(c.rows)})),n.register(n._terminal.onRender(function(c){return n._refreshRows(c.start,c.end)})),n.register(n._terminal.onScroll(function(){return n._refreshRows()})),n.register(n._terminal.onA11yChar(function(c){return n._onChar(c)})),n.register(n._terminal.onLineFeed(function(){return n._onChar(`
|
|
2
|
-
`)})),n.register(n._terminal.onA11yTab(function(c){return n._onTab(c)})),n.register(n._terminal.onKey(function(c){return n._onKey(c.key)})),n.register(n._terminal.onBlur(function(){return n._clearLiveRegion()})),n.register(n._renderService.onDimensionsChange(function(){return n._refreshRowsDimensions()})),n._screenDprMonitor=new a.ScreenDprMonitor,n.register(n._screenDprMonitor),n._screenDprMonitor.setListener(function(){return n._refreshRowsDimensions()}),n.register((0,v.addDisposableDomListener)(window,"resize",function(){return n._refreshRowsDimensions()})),n}return u(e,r),e.prototype.dispose=function(){r.prototype.dispose.call(this),(0,p.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0},e.prototype._onBoundaryFocus=function(t,i){var n=t.target,l=this._rowElements[i===0?1:this._rowElements.length-2];if(n.getAttribute("aria-posinset")!==(i===0?"1":""+this._terminal.buffer.lines.length)&&t.relatedTarget===l){var c,g;if(i===0?(c=n,g=this._rowElements.pop(),this._rowContainer.removeChild(g)):(c=this._rowElements.shift(),g=n,this._rowContainer.removeChild(c)),c.removeEventListener("focus",this._topBoundaryFocusListener),g.removeEventListener("focus",this._bottomBoundaryFocusListener),i===0){var C=this._createAccessibilityTreeNode();this._rowElements.unshift(C),this._rowContainer.insertAdjacentElement("afterbegin",C)}else C=this._createAccessibilityTreeNode(),this._rowElements.push(C),this._rowContainer.appendChild(C);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(i===0?-1:1),this._rowElements[i===0?1:this._rowElements.length-2].focus(),t.preventDefault(),t.stopImmediatePropagation()}},e.prototype._onResize=function(t){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var i=this._rowContainer.children.length;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var t=document.createElement("div");return t.setAttribute("role","listitem"),t.tabIndex=-1,this._refreshRowDimensions(t),t},e.prototype._onTab=function(t){for(var i=0;i<t;i++)this._onChar(" ")},e.prototype._onChar=function(t){var i=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==t&&(this._charsToAnnounce+=t):this._charsToAnnounce+=t,t===`
|
|
3
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.tooMuchOutput)),_.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){i._accessibilityTreeRoot.appendChild(i._liveRegion)},0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,_.isMac&&(0,p.removeElementFromParent)(this._liveRegion)},e.prototype._onKey=function(t){this._clearLiveRegion(),this._charsToConsume.push(t)},e.prototype._refreshRows=function(t,i){this._renderRowsDebouncer.refresh(t,i,this._terminal.rows)},e.prototype._renderRows=function(t,i){for(var n=this._terminal.buffer,l=n.lines.length.toString(),c=t;c<=i;c++){var g=n.translateBufferLineToString(n.ydisp+c,!0),C=(n.ydisp+c+1).toString(),y=this._rowElements[c];y&&(g.length===0?y.innerText=" ":y.textContent=g,y.setAttribute("aria-posinset",C),y.setAttribute("aria-setsize",l))}this._announceCharacters()},e.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var t=0;t<this._terminal.rows;t++)this._refreshRowDimensions(this._rowElements[t])}},e.prototype._refreshRowDimensions=function(t){t.style.height=this._renderService.dimensions.actualCellHeight+"px"},e.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},e}(s.Disposable);o.AccessibilityManager=h},3614:(P,o)=>{function b(_){return _.replace(/\r?\n/g,"\r")}function f(_,m){return m?"\x1B[200~"+_+"\x1B[201~":_}function u(_,m,v){_=f(_=b(_),v.decPrivateModes.bracketedPasteMode),v.triggerDataEvent(_,!0),m.value=""}function d(_,m,v){var s=v.getBoundingClientRect(),a=_.clientX-s.left-10,p=_.clientY-s.top-10;m.style.width="20px",m.style.height="20px",m.style.left=a+"px",m.style.top=p+"px",m.style.zIndex="1000",m.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=b,o.bracketTextForPaste=f,o.copyHandler=function(_,m){_.clipboardData&&_.clipboardData.setData("text/plain",m.selectionText),_.preventDefault()},o.handlePasteEvent=function(_,m,v){_.stopPropagation(),_.clipboardData&&u(_.clipboardData.getData("text/plain"),m,v)},o.paste=u,o.moveTextAreaUnderMouseCursor=d,o.rightClickHandler=function(_,m,v,s,a){d(_,m,v),a&&s.rightClickSelect(_),m.value=s.selectionText,m.select()}},7239:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;var b=function(){function f(){this._color={},this._rgba={}}return f.prototype.clear=function(){this._color={},this._rgba={}},f.prototype.setCss=function(u,d,_){this._rgba[u]||(this._rgba[u]={}),this._rgba[u][d]=_},f.prototype.getCss=function(u,d){return this._rgba[u]?this._rgba[u][d]:void 0},f.prototype.setColor=function(u,d,_){this._color[u]||(this._color[u]={}),this._color[u][d]=_},f.prototype.getColor=function(u,d){return this._color[u]?this._color[u][d]:void 0},f}();o.ColorContrastCache=b},5680:function(P,o,b){var f=this&&this.__read||function(h,r){var e=typeof Symbol=="function"&&h[Symbol.iterator];if(!e)return h;var t,i,n=e.call(h),l=[];try{for(;(r===void 0||r-- >0)&&!(t=n.next()).done;)l.push(t.value)}catch(c){i={error:c}}finally{try{t&&!t.done&&(e=n.return)&&e.call(n)}finally{if(i)throw i.error}}return l};Object.defineProperty(o,"__esModule",{value:!0}),o.ColorManager=o.DEFAULT_ANSI_COLORS=void 0;var u=b(8055),d=b(7239),_=u.css.toColor("#ffffff"),m=u.css.toColor("#000000"),v=u.css.toColor("#ffffff"),s=u.css.toColor("#000000"),a={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze(function(){for(var h=[u.css.toColor("#2e3436"),u.css.toColor("#cc0000"),u.css.toColor("#4e9a06"),u.css.toColor("#c4a000"),u.css.toColor("#3465a4"),u.css.toColor("#75507b"),u.css.toColor("#06989a"),u.css.toColor("#d3d7cf"),u.css.toColor("#555753"),u.css.toColor("#ef2929"),u.css.toColor("#8ae234"),u.css.toColor("#fce94f"),u.css.toColor("#729fcf"),u.css.toColor("#ad7fa8"),u.css.toColor("#34e2e2"),u.css.toColor("#eeeeec")],r=[0,95,135,175,215,255],e=0;e<216;e++){var t=r[e/36%6|0],i=r[e/6%6|0],n=r[e%6];h.push({css:u.channels.toCss(t,i,n),rgba:u.channels.toRgba(t,i,n)})}for(e=0;e<24;e++){var l=8+10*e;h.push({css:u.channels.toCss(l,l,l),rgba:u.channels.toRgba(l,l,l)})}return h}());var p=function(){function h(r,e){this.allowTransparency=e;var t=r.createElement("canvas");t.width=1,t.height=1;var i=t.getContext("2d");if(!i)throw new Error("Could not get rendering context");this._ctx=i,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new d.ColorContrastCache,this.colors={foreground:_,background:m,cursor:v,cursorAccent:s,selectionTransparent:a,selectionOpaque:u.color.blend(m,a),selectionForeground:void 0,ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache},this._updateRestoreColors()}return h.prototype.onOptionsChange=function(r){r==="minimumContrastRatio"&&this._contrastCache.clear()},h.prototype.setTheme=function(r){r===void 0&&(r={}),this.colors.foreground=this._parseColor(r.foreground,_),this.colors.background=this._parseColor(r.background,m),this.colors.cursor=this._parseColor(r.cursor,v,!0),this.colors.cursorAccent=this._parseColor(r.cursorAccent,s,!0),this.colors.selectionTransparent=this._parseColor(r.selection,a,!0),this.colors.selectionOpaque=u.color.blend(this.colors.background,this.colors.selectionTransparent);var e={css:"",rgba:0};this.colors.selectionForeground=r.selectionForeground?this._parseColor(r.selectionForeground,e):void 0,this.colors.selectionForeground===e&&(this.colors.selectionForeground=void 0),u.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=u.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(r.black,o.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(r.red,o.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(r.green,o.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(r.yellow,o.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(r.blue,o.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(r.magenta,o.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(r.cyan,o.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(r.white,o.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(r.brightBlack,o.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(r.brightRed,o.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(r.brightGreen,o.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(r.brightYellow,o.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(r.brightBlue,o.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(r.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(r.brightCyan,o.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(r.brightWhite,o.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear(),this._updateRestoreColors()},h.prototype.restoreColor=function(r){if(r!==void 0)switch(r){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[r]=this._restoreColors.ansi[r]}else for(var e=0;e<this._restoreColors.ansi.length;++e)this.colors.ansi[e]=this._restoreColors.ansi[e]},h.prototype._updateRestoreColors=function(){this._restoreColors={foreground:this.colors.foreground,background:this.colors.background,cursor:this.colors.cursor,ansi:this.colors.ansi.slice()}},h.prototype._parseColor=function(r,e,t){if(t===void 0&&(t=this.allowTransparency),r===void 0)return e;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=r,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+r+" is invalid using fallback "+e.css),e;this._ctx.fillRect(0,0,1,1);var i=this._ctx.getImageData(0,0,1,1).data;if(i[3]!==255){if(!t)return console.warn("Color: "+r+" is using transparency, but allowTransparency is false. Using fallback "+e.css+"."),e;var n=f(this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(S){return Number(S)}),4),l=n[0],c=n[1],g=n[2],C=n[3],y=Math.round(255*C);return{rgba:u.channels.toRgba(l,c,g,y),css:r}}return{css:this._ctx.fillStyle,rgba:u.channels.toRgba(i[0],i[1],i[2],i[3])}},h}();o.ColorManager=p},9631:function(P,o){var b=this&&this.__values||function(f){var u=typeof Symbol=="function"&&Symbol.iterator,d=u&&f[u],_=0;if(d)return d.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&_>=f.length&&(f=void 0),{value:f&&f[_++],done:!f}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.removeElementFromParent=void 0,o.removeElementFromParent=function(){for(var f,u,d,_=[],m=0;m<arguments.length;m++)_[m]=arguments[m];try{for(var v=b(_),s=v.next();!s.done;s=v.next()){var a=s.value;(d=a?.parentElement)===null||d===void 0||d.removeChild(a)}}catch(p){f={error:p}}finally{try{s&&!s.done&&(u=v.return)&&u.call(v)}finally{if(f)throw f.error}}}},3656:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(b,f,u,d){b.addEventListener(f,u,d);var _=!1;return{dispose:function(){_||(_=!0,b.removeEventListener(f,u,d))}}}},3551:function(P,o,b){var f=this&&this.__decorate||function(s,a,p,h){var r,e=arguments.length,t=e<3?a:h===null?h=Object.getOwnPropertyDescriptor(a,p):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,a,p,h);else for(var i=s.length-1;i>=0;i--)(r=s[i])&&(t=(e<3?r(t):e>3?r(a,p,t):r(a,p))||t);return e>3&&t&&Object.defineProperty(a,p,t),t},u=this&&this.__param||function(s,a){return function(p,h){a(p,h,s)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseZone=o.Linkifier=void 0;var d=b(8460),_=b(2585),m=function(){function s(a,p,h){this._bufferService=a,this._logService=p,this._unicodeService=h,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new d.EventEmitter,this._onHideLinkUnderline=new d.EventEmitter,this._onLinkTooltip=new d.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(s.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),s.prototype.attachToDom=function(a,p){this._element=a,this._mouseZoneManager=p},s.prototype.linkifyRows=function(a,p){var h=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=a,this._rowsToLinkify.end=p):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,a),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,p)),this._mouseZoneManager.clearAll(a,p),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return h._linkifyRows()},s._timeBeforeLatency))},s.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var a=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var p=a.ydisp+this._rowsToLinkify.start;if(!(p>=a.lines.length)){for(var h=a.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,r=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,p,h,r,r);e.hasNext();)for(var t=e.next(),i=0;i<this._linkMatchers.length;i++)this._doLinkifyRow(t.range.first,t.content,this._linkMatchers[i]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},s.prototype.registerLinkMatcher=function(a,p,h){if(h===void 0&&(h={}),!p)throw new Error("handler must be defined");var r={id:this._nextLinkMatcherId++,regex:a,handler:p,matchIndex:h.matchIndex,validationCallback:h.validationCallback,hoverTooltipCallback:h.tooltipCallback,hoverLeaveCallback:h.leaveCallback,willLinkActivate:h.willLinkActivate,priority:h.priority||0};return this._addLinkMatcherToList(r),r.id},s.prototype._addLinkMatcherToList=function(a){if(this._linkMatchers.length!==0){for(var p=this._linkMatchers.length-1;p>=0;p--)if(a.priority<=this._linkMatchers[p].priority)return void this._linkMatchers.splice(p+1,0,a);this._linkMatchers.splice(0,0,a)}else this._linkMatchers.push(a)},s.prototype.deregisterLinkMatcher=function(a){for(var p=0;p<this._linkMatchers.length;p++)if(this._linkMatchers[p].id===a)return this._linkMatchers.splice(p,1),!0;return!1},s.prototype._doLinkifyRow=function(a,p,h){for(var r,e=this,t=new RegExp(h.regex.source,(h.regex.flags||"")+"g"),i=-1,n=function(){var c=r[typeof h.matchIndex!="number"?0:h.matchIndex];if(!c)return l._logService.debug("match found without corresponding matchIndex",r,h),"break";if(i=p.indexOf(c,i+1),t.lastIndex=i+c.length,i<0)return"break";var g=l._bufferService.buffer.stringIndexToBufferIndex(a,i);if(g[0]<0)return"break";var C=l._bufferService.buffer.lines.get(g[0]);if(!C)return"break";var y=C.getFg(g[1]),S=y?y>>9&511:void 0;h.validationCallback?h.validationCallback(c,function(w){e._rowsTimeoutId||w&&e._addLink(g[1],g[0]-e._bufferService.buffer.ydisp,c,h,S)}):l._addLink(g[1],g[0]-l._bufferService.buffer.ydisp,c,h,S)},l=this;(r=t.exec(p))!==null&&n()!=="break";);},s.prototype._addLink=function(a,p,h,r,e){var t=this;if(this._mouseZoneManager&&this._element){var i=this._unicodeService.getStringCellWidth(h),n=a%this._bufferService.cols,l=p+Math.floor(a/this._bufferService.cols),c=(n+i)%this._bufferService.cols,g=l+Math.floor((n+i)/this._bufferService.cols);c===0&&(c=this._bufferService.cols,g--),this._mouseZoneManager.add(new v(n+1,l+1,c+1,g+1,function(C){if(r.handler)return r.handler(C,h);var y=window.open();y?(y.opener=null,y.location.href=h):console.warn("Opening link blocked as opener could not be cleared")},function(){t._onShowLinkUnderline.fire(t._createLinkHoverEvent(n,l,c,g,e)),t._element.classList.add("xterm-cursor-pointer")},function(C){t._onLinkTooltip.fire(t._createLinkHoverEvent(n,l,c,g,e)),r.hoverTooltipCallback&&r.hoverTooltipCallback(C,h,{start:{x:n,y:l},end:{x:c,y:g}})},function(){t._onHideLinkUnderline.fire(t._createLinkHoverEvent(n,l,c,g,e)),t._element.classList.remove("xterm-cursor-pointer"),r.hoverLeaveCallback&&r.hoverLeaveCallback()},function(C){return!r.willLinkActivate||r.willLinkActivate(C,h)}))}},s.prototype._createLinkHoverEvent=function(a,p,h,r,e){return{x1:a,y1:p,x2:h,y2:r,cols:this._bufferService.cols,fg:e}},s._timeBeforeLatency=200,s=f([u(0,_.IBufferService),u(1,_.ILogService),u(2,_.IUnicodeService)],s)}();o.Linkifier=m;var v=function(s,a,p,h,r,e,t,i,n){this.x1=s,this.y1=a,this.x2=p,this.y2=h,this.clickCallback=r,this.hoverCallback=e,this.tooltipCallback=t,this.leaveCallback=i,this.willLinkActivate=n};o.MouseZone=v},6465:function(P,o,b){var f,u=this&&this.__extends||(f=function(e,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])},f(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}f(e,t),e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}),d=this&&this.__decorate||function(e,t,i,n){var l,c=arguments.length,g=c<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(e,t,i,n);else for(var C=e.length-1;C>=0;C--)(l=e[C])&&(g=(c<3?l(g):c>3?l(t,i,g):l(t,i))||g);return c>3&&g&&Object.defineProperty(t,i,g),g},_=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}},m=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},v=this&&this.__read||function(e,t){var i=typeof Symbol=="function"&&e[Symbol.iterator];if(!i)return e;var n,l,c=i.call(e),g=[];try{for(;(t===void 0||t-- >0)&&!(n=c.next()).done;)g.push(n.value)}catch(C){l={error:C}}finally{try{n&&!n.done&&(i=c.return)&&i.call(c)}finally{if(l)throw l.error}}return g};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier2=void 0;var s=b(2585),a=b(8460),p=b(844),h=b(3656),r=function(e){function t(i){var n=e.call(this)||this;return n._bufferService=i,n._linkProviders=[],n._linkCacheDisposables=[],n._isMouseOut=!0,n._activeLine=-1,n._onShowLinkUnderline=n.register(new a.EventEmitter),n._onHideLinkUnderline=n.register(new a.EventEmitter),n.register((0,p.getDisposeArrayDisposable)(n._linkCacheDisposables)),n}return u(t,e),Object.defineProperty(t.prototype,"currentLink",{get:function(){return this._currentLink},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),t.prototype.registerLinkProvider=function(i){var n=this;return this._linkProviders.push(i),{dispose:function(){var l=n._linkProviders.indexOf(i);l!==-1&&n._linkProviders.splice(l,1)}}},t.prototype.attachToDom=function(i,n,l){var c=this;this._element=i,this._mouseService=n,this._renderService=l,this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",function(){c._isMouseOut=!0,c._clearCurrentLink()})),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._onMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))},t.prototype._onMouseMove=function(i){if(this._lastMouseEvent=i,this._element&&this._mouseService){var n=this._positionFromMouseEvent(i,this._element,this._mouseService);if(n){this._isMouseOut=!1;for(var l=i.composedPath(),c=0;c<l.length;c++){var g=l[c];if(g.classList.contains("xterm"))break;if(g.classList.contains("xterm-hover"))return}this._lastBufferCell&&n.x===this._lastBufferCell.x&&n.y===this._lastBufferCell.y||(this._onHover(n),this._lastBufferCell=n)}}},t.prototype._onHover=function(i){if(this._activeLine!==i.y)return this._clearCurrentLink(),void this._askForLink(i,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,i)||(this._clearCurrentLink(),this._askForLink(i,!0))},t.prototype._askForLink=function(i,n){var l,c,g,C,y=this;this._activeProviderReplies&&n||((g=this._activeProviderReplies)===null||g===void 0||g.forEach(function(x){x?.forEach(function(M){M.link.dispose&&M.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=i.y);var S=!1,w=function(x,M){n?!((C=R._activeProviderReplies)===null||C===void 0)&&C.get(x)&&(S=R._checkLinkProviderResult(x,i,S)):M.provideLinks(i.y,function(T){var U,q;if(!y._isMouseOut){var F=T?.map(function(z){return{link:z}});(U=y._activeProviderReplies)===null||U===void 0||U.set(x,F),S=y._checkLinkProviderResult(x,i,S),((q=y._activeProviderReplies)===null||q===void 0?void 0:q.size)===y._linkProviders.length&&y._removeIntersectingLinks(i.y,y._activeProviderReplies)}})},R=this;try{for(var L=m(this._linkProviders.entries()),k=L.next();!k.done;k=L.next()){var E=v(k.value,2);w(E[0],E[1])}}catch(x){l={error:x}}finally{try{k&&!k.done&&(c=L.return)&&c.call(L)}finally{if(l)throw l.error}}},t.prototype._removeIntersectingLinks=function(i,n){for(var l=new Set,c=0;c<n.size;c++){var g=n.get(c);if(g)for(var C=0;C<g.length;C++)for(var y=g[C],S=y.link.range.start.y<i?0:y.link.range.start.x,w=y.link.range.end.y>i?this._bufferService.cols:y.link.range.end.x,R=S;R<=w;R++){if(l.has(R)){g.splice(C--,1);break}l.add(R)}}},t.prototype._checkLinkProviderResult=function(i,n,l){var c,g=this;if(!this._activeProviderReplies)return l;for(var C=this._activeProviderReplies.get(i),y=!1,S=0;S<i;S++)this._activeProviderReplies.has(S)&&!this._activeProviderReplies.get(S)||(y=!0);if(!y&&C){var w=C.find(function(L){return g._linkAtPosition(L.link,n)});w&&(l=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviders.length&&!l)for(S=0;S<this._activeProviderReplies.size;S++){var R=(c=this._activeProviderReplies.get(S))===null||c===void 0?void 0:c.find(function(L){return g._linkAtPosition(L.link,n)});if(R){l=!0,this._handleNewLink(R);break}}return l},t.prototype._handleMouseDown=function(){this._mouseDownLink=this._currentLink},t.prototype._handleMouseUp=function(i){if(this._element&&this._mouseService&&this._currentLink){var n=this._positionFromMouseEvent(i,this._element,this._mouseService);n&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,n)&&this._currentLink.link.activate(i,this._currentLink.link.text)}},t.prototype._clearCurrentLink=function(i,n){this._element&&this._currentLink&&this._lastMouseEvent&&(!i||!n||this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=n)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,p.disposeArray)(this._linkCacheDisposables))},t.prototype._handleNewLink=function(i){var n=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._linkAtPosition(i.link,l)&&(this._currentLink=i,this._currentLink.state={decorations:{underline:i.link.decorations===void 0||i.link.decorations.underline,pointerCursor:i.link.decorations===void 0||i.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,i.link,this._lastMouseEvent),i.link.decorations={},Object.defineProperties(i.link.decorations,{pointerCursor:{get:function(){var c,g;return(g=(c=n._currentLink)===null||c===void 0?void 0:c.state)===null||g===void 0?void 0:g.decorations.pointerCursor},set:function(c){var g,C;!((g=n._currentLink)===null||g===void 0)&&g.state&&n._currentLink.state.decorations.pointerCursor!==c&&(n._currentLink.state.decorations.pointerCursor=c,n._currentLink.state.isHovered&&((C=n._element)===null||C===void 0||C.classList.toggle("xterm-cursor-pointer",c)))}},underline:{get:function(){var c,g;return(g=(c=n._currentLink)===null||c===void 0?void 0:c.state)===null||g===void 0?void 0:g.decorations.underline},set:function(c){var g,C,y;!((g=n._currentLink)===null||g===void 0)&&g.state&&((y=(C=n._currentLink)===null||C===void 0?void 0:C.state)===null||y===void 0?void 0:y.decorations.underline)!==c&&(n._currentLink.state.decorations.underline=c,n._currentLink.state.isHovered&&n._fireUnderlineEvent(i.link,c))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(function(c){var g=c.start===0?0:c.start+1+n._bufferService.buffer.ydisp;n._clearCurrentLink(g,c.end+1+n._bufferService.buffer.ydisp)})))}},t.prototype._linkHover=function(i,n,l){var c;!((c=this._currentLink)===null||c===void 0)&&c.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!0),this._currentLink.state.decorations.pointerCursor&&i.classList.add("xterm-cursor-pointer")),n.hover&&n.hover(l,n.text)},t.prototype._fireUnderlineEvent=function(i,n){var l=i.range,c=this._bufferService.buffer.ydisp,g=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-c-1,l.end.x,l.end.y-c-1,void 0);(n?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(g)},t.prototype._linkLeave=function(i,n,l){var c;!((c=this._currentLink)===null||c===void 0)&&c.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!1),this._currentLink.state.decorations.pointerCursor&&i.classList.remove("xterm-cursor-pointer")),n.leave&&n.leave(l,n.text)},t.prototype._linkAtPosition=function(i,n){var l=i.range.start.y===i.range.end.y,c=i.range.start.y<n.y,g=i.range.end.y>n.y;return(l&&i.range.start.x<=n.x&&i.range.end.x>=n.x||c&&i.range.end.x>=n.x||g&&i.range.start.x<=n.x||c&&g)&&i.range.start.y<=n.y&&i.range.end.y>=n.y},t.prototype._positionFromMouseEvent=function(i,n,l){var c=l.getCoords(i,n,this._bufferService.cols,this._bufferService.rows);if(c)return{x:c[0],y:c[1]+this._bufferService.buffer.ydisp}},t.prototype._createLinkUnderlineEvent=function(i,n,l,c,g){return{x1:i,y1:n,x2:l,y2:c,cols:this._bufferService.cols,fg:g}},d([_(0,s.IBufferService)],t)}(p.Disposable);o.Linkifier2=r},9042:(P,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"},6954:function(P,o,b){var f,u=this&&this.__extends||(f=function(h,r){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},f(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}f(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),d=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var c=h.length-1;c>=0;c--)(i=h[c])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},_=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseZoneManager=void 0;var m=b(844),v=b(3656),s=b(4725),a=b(2585),p=function(h){function r(e,t,i,n,l,c){var g=h.call(this)||this;return g._element=e,g._screenElement=t,g._bufferService=i,g._mouseService=n,g._selectionService=l,g._optionsService=c,g._zones=[],g._areZonesActive=!1,g._lastHoverCoords=[void 0,void 0],g._initialSelectionLength=0,g.register((0,v.addDisposableDomListener)(g._element,"mousedown",function(C){return g._onMouseDown(C)})),g._mouseMoveListener=function(C){return g._onMouseMove(C)},g._mouseLeaveListener=function(C){return g._onMouseLeave(C)},g._clickListener=function(C){return g._onClick(C)},g}return u(r,h),r.prototype.dispose=function(){h.prototype.dispose.call(this),this._deactivate()},r.prototype.add=function(e){this._zones.push(e),this._zones.length===1&&this._activate()},r.prototype.clearAll=function(e,t){if(this._zones.length!==0){e&&t||(e=0,t=this._bufferService.rows-1);for(var i=0;i<this._zones.length;i++){var n=this._zones[i];(n.y1>e&&n.y1<=t+1||n.y2>e&&n.y2<=t+1||n.y1<e&&n.y2>t+1)&&(this._currentZone&&this._currentZone===n&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(i--,1))}this._zones.length===0&&this._deactivate()}},r.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},r.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},r.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},r.prototype._onHover=function(e){var t=this,i=this._findZoneEventAt(e);i!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),i&&(this._currentZone=i,i.hoverCallback&&i.hoverCallback(e),this._tooltipTimeout=window.setTimeout(function(){return t._onTooltip(e)},this._optionsService.rawOptions.linkTooltipHoverDuration)))},r.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var t=this._findZoneEventAt(e);t?.tooltipCallback(e)},r.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var t=this._findZoneEventAt(e);t?.willLinkActivate(e)&&(e.preventDefault(),e.stopImmediatePropagation())}},r.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},r.prototype._onClick=function(e){var t=this._findZoneEventAt(e),i=this._getSelectionLength();t&&i===this._initialSelectionLength&&(t.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},r.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},r.prototype._findZoneEventAt=function(e){var t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(t)for(var i=t[0],n=t[1],l=0;l<this._zones.length;l++){var c=this._zones[l];if(c.y1===c.y2){if(n===c.y1&&i>=c.x1&&i<c.x2)return c}else if(n===c.y1&&i>=c.x1||n===c.y2&&i<c.x2||n>c.y1&&n<c.y2)return c}},d([_(2,a.IBufferService),_(3,s.IMouseService),_(4,s.ISelectionService),_(5,a.IOptionsService)],r)}(m.Disposable);o.MouseZoneManager=p},6193:function(P,o){var b=this&&this.__values||function(u){var d=typeof Symbol=="function"&&Symbol.iterator,_=d&&u[d],m=0;if(_)return _.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&m>=u.length&&(u=void 0),{value:u&&u[m++],done:!u}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0;var f=function(){function u(d){this._renderCallback=d,this._refreshCallbacks=[]}return u.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},u.prototype.addRefreshCallback=function(d){var _=this;return this._refreshCallbacks.push(d),this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return _._innerRefresh()})),this._animationFrame},u.prototype.refresh=function(d,_,m){var v=this;this._rowCount=m,d=d!==void 0?d:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return v._innerRefresh()}))},u.prototype._innerRefresh=function(){if(this._animationFrame=void 0,this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var d=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,_),this._runRefreshCallbacks()}else this._runRefreshCallbacks()},u.prototype._runRefreshCallbacks=function(){var d,_;try{for(var m=b(this._refreshCallbacks),v=m.next();!v.done;v=m.next())(0,v.value)(0)}catch(s){d={error:s}}finally{try{v&&!v.done&&(_=m.return)&&_.call(m)}finally{if(d)throw d.error}}this._refreshCallbacks=[]},u}();o.RenderDebouncer=f},5596:function(P,o,b){var f,u=this&&this.__extends||(f=function(_,m){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,s){v.__proto__=s}||function(v,s){for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(v[a]=s[a])},f(_,m)},function(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function v(){this.constructor=_}f(_,m),_.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)});Object.defineProperty(o,"__esModule",{value:!0}),o.ScreenDprMonitor=void 0;var d=function(_){function m(){var v=_!==null&&_.apply(this,arguments)||this;return v._currentDevicePixelRatio=window.devicePixelRatio,v}return u(m,_),m.prototype.setListener=function(v){var s=this;this._listener&&this.clearListener(),this._listener=v,this._outerListener=function(){s._listener&&(s._listener(window.devicePixelRatio,s._currentDevicePixelRatio),s._updateDpr())},this._updateDpr()},m.prototype.dispose=function(){_.prototype.dispose.call(this),this.clearListener()},m.prototype._updateDpr=function(){var v;this._outerListener&&((v=this._resolutionMediaMatchList)===null||v===void 0||v.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},m.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},m}(b(844).Disposable);o.ScreenDprMonitor=d},3236:function(P,o,b){var f,u=this&&this.__extends||(f=function(X,W){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,D){O.__proto__=D}||function(O,D){for(var j in D)Object.prototype.hasOwnProperty.call(D,j)&&(O[j]=D[j])},f(X,W)},function(X,W){if(typeof W!="function"&&W!==null)throw new TypeError("Class extends value "+String(W)+" is not a constructor or null");function O(){this.constructor=X}f(X,W),X.prototype=W===null?Object.create(W):(O.prototype=W.prototype,new O)}),d=this&&this.__values||function(X){var W=typeof Symbol=="function"&&Symbol.iterator,O=W&&X[W],D=0;if(O)return O.call(X);if(X&&typeof X.length=="number")return{next:function(){return X&&D>=X.length&&(X=void 0),{value:X&&X[D++],done:!X}}};throw new TypeError(W?"Object is not iterable.":"Symbol.iterator is not defined.")},_=this&&this.__read||function(X,W){var O=typeof Symbol=="function"&&X[Symbol.iterator];if(!O)return X;var D,j,V=O.call(X),Y=[];try{for(;(W===void 0||W-- >0)&&!(D=V.next()).done;)Y.push(D.value)}catch(te){j={error:te}}finally{try{D&&!D.done&&(O=V.return)&&O.call(V)}finally{if(j)throw j.error}}return Y},m=this&&this.__spreadArray||function(X,W,O){if(O||arguments.length===2)for(var D,j=0,V=W.length;j<V;j++)!D&&j in W||(D||(D=Array.prototype.slice.call(W,0,j)),D[j]=W[j]);return X.concat(D||Array.prototype.slice.call(W))};Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;var v=b(2950),s=b(1680),a=b(3614),p=b(2584),h=b(5435),r=b(3525),e=b(3551),t=b(9312),i=b(6114),n=b(3656),l=b(9042),c=b(357),g=b(6954),C=b(4567),y=b(1296),S=b(7399),w=b(8460),R=b(8437),L=b(5680),k=b(3230),E=b(4725),x=b(428),M=b(8934),T=b(6465),U=b(5114),q=b(8969),F=b(8055),z=b(4269),N=b(5941),A=b(3107),$=b(5744),J=b(9074),oe=b(2585),B=typeof window<"u"?window.document:null,ne=function(X){function W(O){O===void 0&&(O={});var D=X.call(this,O)||this;return D.browser=i,D._keyDownHandled=!1,D._keyDownSeen=!1,D._keyPressHandled=!1,D._unprocessedDeadKey=!1,D._onCursorMove=new w.EventEmitter,D._onKey=new w.EventEmitter,D._onRender=new w.EventEmitter,D._onSelectionChange=new w.EventEmitter,D._onTitleChange=new w.EventEmitter,D._onBell=new w.EventEmitter,D._onFocus=new w.EventEmitter,D._onBlur=new w.EventEmitter,D._onA11yCharEmitter=new w.EventEmitter,D._onA11yTabEmitter=new w.EventEmitter,D._setup(),D.linkifier=D._instantiationService.createInstance(e.Linkifier),D.linkifier2=D.register(D._instantiationService.createInstance(T.Linkifier2)),D._decorationService=D._instantiationService.createInstance(J.DecorationService),D._instantiationService.setService(oe.IDecorationService,D._decorationService),D.register(D._inputHandler.onRequestBell(function(){return D.bell()})),D.register(D._inputHandler.onRequestRefreshRows(function(j,V){return D.refresh(j,V)})),D.register(D._inputHandler.onRequestSendFocus(function(){return D._reportFocus()})),D.register(D._inputHandler.onRequestReset(function(){return D.reset()})),D.register(D._inputHandler.onRequestWindowsOptionsReport(function(j){return D._reportWindowsOptions(j)})),D.register(D._inputHandler.onColor(function(j){return D._handleColorEvent(j)})),D.register((0,w.forwardEvent)(D._inputHandler.onCursorMove,D._onCursorMove)),D.register((0,w.forwardEvent)(D._inputHandler.onTitleChange,D._onTitleChange)),D.register((0,w.forwardEvent)(D._inputHandler.onA11yChar,D._onA11yCharEmitter)),D.register((0,w.forwardEvent)(D._inputHandler.onA11yTab,D._onA11yTabEmitter)),D.register(D._bufferService.onResize(function(j){return D._afterResize(j.cols,j.rows)})),D}return u(W,X),Object.defineProperty(W.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onBell",{get:function(){return this._onBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),W.prototype._handleColorEvent=function(O){var D,j,V,Y;if(this._colorManager){try{for(var te=d(O),ae=te.next();!ae.done;ae=te.next()){var he=ae.value,ue=void 0,K="";switch(he.index){case 256:ue="foreground",K="10";break;case 257:ue="background",K="11";break;case 258:ue="cursor",K="12";break;default:ue="ansi",K="4;"+he.index}if(ue)switch(he.type){case 0:var fe=F.color.toColorRGB(ue==="ansi"?this._colorManager.colors.ansi[he.index]:this._colorManager.colors[ue]);this.coreService.triggerDataEvent(p.C0.ESC+"]"+K+";"+(0,N.toRgbString)(fe)+p.C1_ESCAPED.ST);break;case 1:ue==="ansi"?this._colorManager.colors.ansi[he.index]=F.rgba.toColor.apply(F.rgba,m([],_(he.color),!1)):this._colorManager.colors[ue]=F.rgba.toColor.apply(F.rgba,m([],_(he.color),!1));break;case 2:this._colorManager.restoreColor(he.index)}}}catch(ye){D={error:ye}}finally{try{ae&&!ae.done&&(j=te.return)&&j.call(te)}finally{if(D)throw D.error}}(V=this._renderService)===null||V===void 0||V.setColors(this._colorManager.colors),(Y=this.viewport)===null||Y===void 0||Y.onThemeChange(this._colorManager.colors)}},W.prototype.dispose=function(){var O,D,j;this._isDisposed||(X.prototype.dispose.call(this),(O=this._renderService)===null||O===void 0||O.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(j=(D=this.element)===null||D===void 0?void 0:D.parentNode)===null||j===void 0||j.removeChild(this.element))},W.prototype._setup=function(){X.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(W.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),W.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},W.prototype._updateOptions=function(O){var D,j,V,Y;switch(X.prototype._updateOptions.call(this,O),O){case"fontFamily":case"fontSize":(D=this._renderService)===null||D===void 0||D.clear(),(j=this._charSizeService)===null||j===void 0||j.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"customGlyphs":case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(V=this.viewport)===null||V===void 0||V.syncScrollArea();break;case"screenReaderMode":this.optionsService.rawOptions.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new C.AccessibilityManager(this,this._renderService)):((Y=this._accessibilityManager)===null||Y===void 0||Y.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.rawOptions.theme)}},W.prototype._onTextAreaFocus=function(O){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(p.C0.ESC+"[I"),this.updateCursorStyle(O),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},W.prototype.blur=function(){var O;return(O=this.textarea)===null||O===void 0?void 0:O.blur()},W.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(p.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},W.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing&&this._renderService){var O=this.buffer.ybase+this.buffer.y,D=this.buffer.lines.get(O);if(D){var j=Math.min(this.buffer.x,this.cols-1),V=this._renderService.dimensions.actualCellHeight,Y=D.getWidth(j),te=this._renderService.dimensions.actualCellWidth*Y,ae=this.buffer.y*this._renderService.dimensions.actualCellHeight,he=j*this._renderService.dimensions.actualCellWidth;this.textarea.style.left=he+"px",this.textarea.style.top=ae+"px",this.textarea.style.width=te+"px",this.textarea.style.height=V+"px",this.textarea.style.lineHeight=V+"px",this.textarea.style.zIndex="-5"}}},W.prototype._initGlobal=function(){var O=this;this._bindKeys(),this.register((0,n.addDisposableDomListener)(this.element,"copy",function(j){O.hasSelection()&&(0,a.copyHandler)(j,O._selectionService)}));var D=function(j){return(0,a.handlePasteEvent)(j,O.textarea,O.coreService)};this.register((0,n.addDisposableDomListener)(this.textarea,"paste",D)),this.register((0,n.addDisposableDomListener)(this.element,"paste",D)),i.isFirefox?this.register((0,n.addDisposableDomListener)(this.element,"mousedown",function(j){j.button===2&&(0,a.rightClickHandler)(j,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})):this.register((0,n.addDisposableDomListener)(this.element,"contextmenu",function(j){(0,a.rightClickHandler)(j,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})),i.isLinux&&this.register((0,n.addDisposableDomListener)(this.element,"auxclick",function(j){j.button===1&&(0,a.moveTextAreaUnderMouseCursor)(j,O.textarea,O.screenElement)}))},W.prototype._bindKeys=function(){var O=this;this.register((0,n.addDisposableDomListener)(this.textarea,"keyup",function(D){return O._keyUp(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"keydown",function(D){return O._keyDown(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"keypress",function(D){return O._keyPress(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionstart",function(){return O._compositionHelper.compositionstart()})),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionupdate",function(D){return O._compositionHelper.compositionupdate(D)})),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionend",function(){return O._compositionHelper.compositionend()})),this.register((0,n.addDisposableDomListener)(this.textarea,"input",function(D){return O._inputEvent(D)},!0)),this.register(this.onRender(function(){return O._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(D){return O._queueLinkification(D.start,D.end)}))},W.prototype.open=function(O){var D=this;if(!O)throw new Error("Terminal requires a parent element.");O.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=O.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),O.appendChild(this.element);var j=B.createDocumentFragment();this._viewportElement=B.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),j.appendChild(this._viewportElement),this._viewportScrollArea=B.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=B.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=B.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),j.appendChild(this.screenElement),this.textarea=B.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",l.promptLabel),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.register((0,n.addDisposableDomListener)(this.textarea,"focus",function(te){return D._onTextAreaFocus(te)})),this.register((0,n.addDisposableDomListener)(this.textarea,"blur",function(){return D._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var V=this._instantiationService.createInstance(U.CoreBrowserService,this.textarea);this._instantiationService.setService(E.ICoreBrowserService,V),this._charSizeService=this._instantiationService.createInstance(x.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(E.ICharSizeService,this._charSizeService),this._theme=this.options.theme||this._theme,this._colorManager=new L.ColorManager(B,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(te){return D._colorManager.onOptionsChange(te)})),this._colorManager.setTheme(this._theme),this._characterJoinerService=this._instantiationService.createInstance(z.CharacterJoinerService),this._instantiationService.setService(E.ICharacterJoinerService,this._characterJoinerService);var Y=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(k.RenderService,Y,this.rows,this.screenElement)),this._instantiationService.setService(E.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(function(te){return D._onRender.fire(te)})),this.onResize(function(te){return D._renderService.resize(te.cols,te.rows)}),this._compositionView=B.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(v.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(j),this._soundService=this._instantiationService.createInstance(c.SoundService),this._instantiationService.setService(E.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(M.MouseService),this._instantiationService.setService(E.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(s.Viewport,function(te){return D.scrollLines(te,!0,1)},this._viewportElement,this._viewportScrollArea,this.element),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return D.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){D._renderService.onCursorMove(),D._syncTextArea()})),this.register(this.onResize(function(){return D._renderService.onResize(D.cols,D.rows)})),this.register(this.onBlur(function(){return D._renderService.onBlur()})),this.register(this.onFocus(function(){return D._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return D.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(t.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(E.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(te){return D.scrollLines(te.amount,te.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return D._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(te){return D._renderService.onSelectionChanged(te.start,te.end,te.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(te){D.textarea.value=te,D.textarea.focus(),D.textarea.select()})),this.register(this._onScroll.event(function(te){D.viewport.syncScrollArea(),D._selectionService.refresh()})),this.register((0,n.addDisposableDomListener)(this._viewportElement,"scroll",function(){return D._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(g.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return D._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(A.BufferDecorationRenderer,this.screenElement)),this.register((0,n.addDisposableDomListener)(this.element,"mousedown",function(te){return D._selectionService.onMouseDown(te)})),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new C.AccessibilityManager(this,this._renderService)),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this._instantiationService.createInstance($.OverviewRulerRenderer,this._viewportElement,this.screenElement)),this.optionsService.onOptionChange(function(){!D._overviewRulerRenderer&&D.options.overviewRulerWidth&&D._viewportElement&&D.screenElement&&(D._overviewRulerRenderer=D._instantiationService.createInstance($.OverviewRulerRenderer,D._viewportElement,D.screenElement))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},W.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(r.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(y.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},W.prototype._setTheme=function(O){var D,j,V;this._theme=O,(D=this._colorManager)===null||D===void 0||D.setTheme(O),(j=this._renderService)===null||j===void 0||j.setColors(this._colorManager.colors),(V=this.viewport)===null||V===void 0||V.onThemeChange(this._colorManager.colors)},W.prototype.bindMouse=function(){var O=this,D=this,j=this.element;function V(K){var fe,ye,xe=D._mouseService.getRawByteCoords(K,D.screenElement,D.cols,D.rows);if(!xe)return!1;switch(K.overrideType||K.type){case"mousemove":ye=32,K.buttons===void 0?(fe=3,K.button!==void 0&&(fe=K.button<3?K.button:3)):fe=1&K.buttons?0:4&K.buttons?1:2&K.buttons?2:3;break;case"mouseup":ye=0,fe=K.button<3?K.button:3;break;case"mousedown":ye=1,fe=K.button<3?K.button:3;break;case"wheel":if(D.viewport.getLinesScrolled(K)===0)return!1;ye=K.deltaY<0?0:1,fe=4;break;default:return!1}return!(ye===void 0||fe===void 0||fe>4)&&D.coreMouseService.triggerMouseEvent({col:xe.x-33,row:xe.y-33,button:fe,action:ye,ctrl:K.ctrlKey,alt:K.altKey,shift:K.shiftKey})}var Y={mouseup:null,wheel:null,mousedrag:null,mousemove:null},te=function(K){return V(K),K.buttons||(O._document.removeEventListener("mouseup",Y.mouseup),Y.mousedrag&&O._document.removeEventListener("mousemove",Y.mousedrag)),O.cancel(K)},ae=function(K){return V(K),O.cancel(K,!0)},he=function(K){K.buttons&&V(K)},ue=function(K){K.buttons||V(K)};this.register(this.coreMouseService.onProtocolChange(function(K){K?(O.optionsService.rawOptions.logLevel==="debug"&&O._logService.debug("Binding to mouse events:",O.coreMouseService.explainEvents(K)),O.element.classList.add("enable-mouse-events"),O._selectionService.disable()):(O._logService.debug("Unbinding from mouse events."),O.element.classList.remove("enable-mouse-events"),O._selectionService.enable()),8&K?Y.mousemove||(j.addEventListener("mousemove",ue),Y.mousemove=ue):(j.removeEventListener("mousemove",Y.mousemove),Y.mousemove=null),16&K?Y.wheel||(j.addEventListener("wheel",ae,{passive:!1}),Y.wheel=ae):(j.removeEventListener("wheel",Y.wheel),Y.wheel=null),2&K?Y.mouseup||(Y.mouseup=te):(O._document.removeEventListener("mouseup",Y.mouseup),Y.mouseup=null),4&K?Y.mousedrag||(Y.mousedrag=he):(O._document.removeEventListener("mousemove",Y.mousedrag),Y.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,n.addDisposableDomListener)(j,"mousedown",function(K){if(K.preventDefault(),O.focus(),O.coreMouseService.areMouseEventsActive&&!O._selectionService.shouldForceSelection(K))return V(K),Y.mouseup&&O._document.addEventListener("mouseup",Y.mouseup),Y.mousedrag&&O._document.addEventListener("mousemove",Y.mousedrag),O.cancel(K)})),this.register((0,n.addDisposableDomListener)(j,"wheel",function(K){if(!Y.wheel){if(!O.buffer.hasScrollback){var fe=O.viewport.getLinesScrolled(K);if(fe===0)return;for(var ye=p.C0.ESC+(O.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(K.deltaY<0?"A":"B"),xe="",Fe=0;Fe<Math.abs(fe);Fe++)xe+=ye;return O.coreService.triggerDataEvent(xe,!0),O.cancel(K,!0)}return O.viewport.onWheel(K)?O.cancel(K):void 0}},{passive:!1})),this.register((0,n.addDisposableDomListener)(j,"touchstart",function(K){if(!O.coreMouseService.areMouseEventsActive)return O.viewport.onTouchStart(K),O.cancel(K)},{passive:!0})),this.register((0,n.addDisposableDomListener)(j,"touchmove",function(K){if(!O.coreMouseService.areMouseEventsActive)return O.viewport.onTouchMove(K)?void 0:O.cancel(K)},{passive:!1}))},W.prototype.refresh=function(O,D){var j;(j=this._renderService)===null||j===void 0||j.refreshRows(O,D)},W.prototype._queueLinkification=function(O,D){var j;(j=this.linkifier)===null||j===void 0||j.linkifyRows(O,D)},W.prototype.updateCursorStyle=function(O){var D;!((D=this._selectionService)===null||D===void 0)&&D.shouldColumnSelect(O)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},W.prototype._showCursor=function(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},W.prototype.scrollLines=function(O,D,j){j===void 0&&(j=0),X.prototype.scrollLines.call(this,O,D,j),this.refresh(0,this.rows-1)},W.prototype.paste=function(O){(0,a.paste)(O,this.textarea,this.coreService)},W.prototype.attachCustomKeyEventHandler=function(O){this._customKeyEventHandler=O},W.prototype.registerLinkMatcher=function(O,D,j){var V=this.linkifier.registerLinkMatcher(O,D,j);return this.refresh(0,this.rows-1),V},W.prototype.deregisterLinkMatcher=function(O){this.linkifier.deregisterLinkMatcher(O)&&this.refresh(0,this.rows-1)},W.prototype.registerLinkProvider=function(O){return this.linkifier2.registerLinkProvider(O)},W.prototype.registerCharacterJoiner=function(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");var D=this._characterJoinerService.register(O);return this.refresh(0,this.rows-1),D},W.prototype.deregisterCharacterJoiner=function(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(O)&&this.refresh(0,this.rows-1)},Object.defineProperty(W.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),W.prototype.addMarker=function(O){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+O)},W.prototype.registerDecoration=function(O){return this._decorationService.registerDecoration(O)},W.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},W.prototype.select=function(O,D,j){this._selectionService.setSelection(O,D,j)},W.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},W.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},W.prototype.clearSelection=function(){var O;(O=this._selectionService)===null||O===void 0||O.clearSelection()},W.prototype.selectAll=function(){var O;(O=this._selectionService)===null||O===void 0||O.selectAll()},W.prototype.selectLines=function(O,D){var j;(j=this._selectionService)===null||j===void 0||j.selectLines(O,D)},W.prototype._keyDown=function(O){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;var D=this.browser.isMac&&this.options.macOptionIsMeta&&O.altKey;if(!D&&!this._compositionHelper.keydown(O))return this.buffer.ybase!==this.buffer.ydisp&&this._bufferService.scrollToBottom(),!1;D||O.key!=="Dead"&&O.key!=="AltGraph"||(this._unprocessedDeadKey=!0);var j=(0,S.evaluateKeyboardEvent)(O,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(O),j.type===3||j.type===2){var V=this.rows-1;return this.scrollLines(j.type===2?-V:V),this.cancel(O,!0)}return j.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,O)||(j.cancel&&this.cancel(O,!0),!j.key||!!(O.key&&!O.ctrlKey&&!O.altKey&&!O.metaKey&&O.key.length===1&&O.key.charCodeAt(0)>=65&&O.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(j.key!==p.C0.ETX&&j.key!==p.C0.CR||(this.textarea.value=""),this._onKey.fire({key:j.key,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(j.key,!0),this.optionsService.rawOptions.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(O,!0))))},W.prototype._isThirdLevelShift=function(O,D){var j=O.isMac&&!this.options.macOptionIsMeta&&D.altKey&&!D.ctrlKey&&!D.metaKey||O.isWindows&&D.altKey&&D.ctrlKey&&!D.metaKey||O.isWindows&&D.getModifierState("AltGraph");return D.type==="keypress"?j:j&&(!D.keyCode||D.keyCode>47)},W.prototype._keyUp=function(O){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1||(function(D){return D.keyCode===16||D.keyCode===17||D.keyCode===18}(O)||this.focus(),this.updateCursorStyle(O),this._keyPressHandled=!1)},W.prototype._keyPress=function(O){var D;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;if(this.cancel(O),O.charCode)D=O.charCode;else if(O.which===null||O.which===void 0)D=O.keyCode;else{if(O.which===0||O.charCode===0)return!1;D=O.which}return!(!D||(O.altKey||O.ctrlKey||O.metaKey)&&!this._isThirdLevelShift(this.browser,O)||(D=String.fromCharCode(D),this._onKey.fire({key:D,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(D,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))},W.prototype._inputEvent=function(O){if(O.data&&O.inputType==="insertText"&&(!O.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;var D=O.data;return this.coreService.triggerDataEvent(D,!0),this.cancel(O),!0}return!1},W.prototype.bell=function(){var O;this._soundBell()&&((O=this._soundService)===null||O===void 0||O.playBellSound()),this._onBell.fire()},W.prototype.resize=function(O,D){O!==this.cols||D!==this.rows?X.prototype.resize.call(this,O,D):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},W.prototype._afterResize=function(O,D){var j,V;(j=this._charSizeService)===null||j===void 0||j.measure(),(V=this.viewport)===null||V===void 0||V.syncScrollArea(!0)},W.prototype.clear=function(){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(var O=1;O<this.rows;O++)this.buffer.lines.push(this.buffer.getBlankLine(R.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire({position:this.buffer.ydisp,source:0})}},W.prototype.reset=function(){var O,D;this.options.rows=this.rows,this.options.cols=this.cols;var j=this._customKeyEventHandler;this._setup(),X.prototype.reset.call(this),(O=this._selectionService)===null||O===void 0||O.reset(),this._decorationService.reset(),this._customKeyEventHandler=j,this.refresh(0,this.rows-1),(D=this.viewport)===null||D===void 0||D.syncScrollArea()},W.prototype.clearTextureAtlas=function(){var O;(O=this._renderService)===null||O===void 0||O.clearTextureAtlas()},W.prototype._reportFocus=function(){var O;!((O=this.element)===null||O===void 0)&&O.classList.contains("focus")?this.coreService.triggerDataEvent(p.C0.ESC+"[I"):this.coreService.triggerDataEvent(p.C0.ESC+"[O")},W.prototype._reportWindowsOptions=function(O){if(this._renderService)switch(O){case h.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var D=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),j=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this.coreService.triggerDataEvent(p.C0.ESC+"[4;"+j+";"+D+"t");break;case h.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var V=this._renderService.dimensions.scaledCellWidth.toFixed(0),Y=this._renderService.dimensions.scaledCellHeight.toFixed(0);this.coreService.triggerDataEvent(p.C0.ESC+"[6;"+Y+";"+V+"t")}},W.prototype.cancel=function(O,D){if(this.options.cancelEvents||D)return O.preventDefault(),O.stopPropagation(),!1},W.prototype._visualBell=function(){return!1},W.prototype._soundBell=function(){return this.options.bellStyle==="sound"},W}(q.CoreTerminal);o.Terminal=ne},9924:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0;var b=function(){function f(u,d){d===void 0&&(d=1e3),this._renderCallback=u,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}return f.prototype.dispose=function(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)},f.prototype.refresh=function(u,d,_){var m=this;this._rowCount=_,u=u!==void 0?u:0,d=d!==void 0?d: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,d):d;var v=Date.now();if(v-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=v,this._innerRefresh();else if(!this._additionalRefreshRequested){var s=v-this._lastRefreshMs,a=this._debounceThresholdMS-s;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(function(){m._lastRefreshMs=Date.now(),m._innerRefresh(),m._additionalRefreshRequested=!1,m._refreshTimeoutID=void 0},a)}},f.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var u=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,d)}},f}();o.TimeBasedDebouncer=b},1680:function(P,o,b){var f,u=this&&this.__extends||(f=function(h,r){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},f(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}f(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),d=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var c=h.length-1;c>=0;c--)(i=h[c])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},_=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;var m=b(844),v=b(3656),s=b(4725),a=b(2585),p=function(h){function r(e,t,i,n,l,c,g,C){var y=h.call(this)||this;return y._scrollLines=e,y._viewportElement=t,y._scrollArea=i,y._element=n,y._bufferService=l,y._optionsService=c,y._charSizeService=g,y._renderService=C,y.scrollBarWidth=0,y._currentRowHeight=0,y._currentScaledCellHeight=0,y._lastRecordedBufferLength=0,y._lastRecordedViewportHeight=0,y._lastRecordedBufferHeight=0,y._lastTouchY=0,y._lastScrollTop=0,y._wheelPartialScroll=0,y._refreshAnimationFrame=null,y._ignoreNextScrollEvent=!1,y.scrollBarWidth=y._viewportElement.offsetWidth-y._scrollArea.offsetWidth||15,y.register((0,v.addDisposableDomListener)(y._viewportElement,"scroll",y._onScroll.bind(y))),y._activeBuffer=y._bufferService.buffer,y.register(y._bufferService.buffers.onBufferActivate(function(S){return y._activeBuffer=S.activeBuffer})),y._renderDimensions=y._renderService.dimensions,y.register(y._renderService.onDimensionsChange(function(S){return y._renderDimensions=S})),setTimeout(function(){return y.syncScrollArea()},0),y}return u(r,h),r.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},r.prototype._refresh=function(e){var t=this;if(e)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return t._innerRefresh()}))},r.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._currentScaledCellHeight=this._renderService.dimensions.scaledCellHeight,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var t=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==t&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=t),this._refreshAnimationFrame=null},r.prototype.syncScrollArea=function(e){if(e===void 0&&(e=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.scaledCellHeight===this._currentScaledCellHeight||this._refresh(e)},r.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent){if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._scrollLines(0);var t=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(t)}},r.prototype._bubbleScroll=function(e,t){var i=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(t<0&&this._viewportElement.scrollTop!==0||t>0&&i<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},r.prototype.onWheel=function(e){var t=this._getPixelsScrolled(e);return t!==0&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},r.prototype._getPixelsScrolled=function(e){if(e.deltaY===0||e.shiftKey)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?t*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._currentRowHeight*this._bufferService.rows),t},r.prototype.getLinesScrolled=function(e){if(e.deltaY===0||e.shiftKey)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(t/=this._currentRowHeight+0,this._wheelPartialScroll+=t,t=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._bufferService.rows),t},r.prototype._applyScrollModifier=function(e,t){var i=this._optionsService.rawOptions.fastScrollModifier;return i==="alt"&&t.altKey||i==="ctrl"&&t.ctrlKey||i==="shift"&&t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity},r.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},r.prototype.onTouchMove=function(e){var t=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,t!==0&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},d([_(4,a.IBufferService),_(5,a.IOptionsService),_(6,s.ICharSizeService),_(7,s.IRenderService)],r)}(m.Disposable);o.Viewport=p},3107:function(P,o,b){var f,u=this&&this.__extends||(f=function(r,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},f(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}f(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}),d=this&&this.__decorate||function(r,e,t,i){var n,l=arguments.length,c=l<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,e,t,i);else for(var g=r.length-1;g>=0;g--)(n=r[g])&&(c=(l<3?n(c):l>3?n(e,t,c):n(e,t))||c);return l>3&&c&&Object.defineProperty(e,t,c),c},_=this&&this.__param||function(r,e){return function(t,i){e(t,i,r)}},m=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;var v=b(3656),s=b(4725),a=b(844),p=b(2585),h=function(r){function e(t,i,n,l){var c=r.call(this)||this;return c._screenElement=t,c._bufferService=i,c._decorationService=n,c._renderService=l,c._decorationElements=new Map,c._altBufferIsActive=!1,c._dimensionsChanged=!1,c._container=document.createElement("div"),c._container.classList.add("xterm-decoration-container"),c._screenElement.appendChild(c._container),c.register(c._renderService.onRenderedViewportChange(function(){return c._queueRefresh()})),c.register(c._renderService.onDimensionsChange(function(){c._dimensionsChanged=!0,c._queueRefresh()})),c.register((0,v.addDisposableDomListener)(window,"resize",function(){return c._queueRefresh()})),c.register(c._bufferService.buffers.onBufferActivate(function(){c._altBufferIsActive=c._bufferService.buffer===c._bufferService.buffers.alt})),c.register(c._decorationService.onDecorationRegistered(function(){return c._queueRefresh()})),c.register(c._decorationService.onDecorationRemoved(function(g){return c._removeDecoration(g)})),c}return u(e,r),e.prototype.dispose=function(){this._container.remove(),this._decorationElements.clear(),r.prototype.dispose.call(this)},e.prototype._queueRefresh=function(){var t=this;this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(function(){t.refreshDecorations(),t._animationFrame=void 0}))},e.prototype.refreshDecorations=function(){var t,i;try{for(var n=m(this._decorationService.decorations),l=n.next();!l.done;l=n.next()){var c=l.value;this._renderDecoration(c)}}catch(g){t={error:g}}finally{try{l&&!l.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this._dimensionsChanged=!1},e.prototype._renderDecoration=function(t){this._refreshStyle(t),this._dimensionsChanged&&this._refreshXPosition(t)},e.prototype._createElement=function(t){var i,n=document.createElement("div");n.classList.add("xterm-decoration"),n.style.width=Math.round((t.options.width||1)*this._renderService.dimensions.actualCellWidth)+"px",n.style.height=(t.options.height||1)*this._renderService.dimensions.actualCellHeight+"px",n.style.top=(t.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.actualCellHeight+"px",n.style.lineHeight=this._renderService.dimensions.actualCellHeight+"px";var l=(i=t.options.x)!==null&&i!==void 0?i:0;return l&&l>this._bufferService.cols&&(n.style.display="none"),this._refreshXPosition(t,n),n},e.prototype._refreshStyle=function(t){var i=this,n=t.marker.line-this._bufferService.buffers.active.ydisp;if(n<0||n>=this._bufferService.rows)t.element&&(t.element.style.display="none",t.onRenderEmitter.fire(t.element));else{var l=this._decorationElements.get(t);l||(t.onDispose(function(){return i._removeDecoration(t)}),l=this._createElement(t),t.element=l,this._decorationElements.set(t,l),this._container.appendChild(l)),l.style.top=n*this._renderService.dimensions.actualCellHeight+"px",l.style.display=this._altBufferIsActive?"none":"block",t.onRenderEmitter.fire(l)}},e.prototype._refreshXPosition=function(t,i){var n;if(i===void 0&&(i=t.element),i){var l=(n=t.options.x)!==null&&n!==void 0?n:0;(t.options.anchor||"left")==="right"?i.style.right=l?l*this._renderService.dimensions.actualCellWidth+"px":"":i.style.left=l?l*this._renderService.dimensions.actualCellWidth+"px":""}},e.prototype._removeDecoration=function(t){var i;(i=this._decorationElements.get(t))===null||i===void 0||i.remove(),this._decorationElements.delete(t)},d([_(1,p.IBufferService),_(2,p.IDecorationService),_(3,s.IRenderService)],e)}(a.Disposable);o.BufferDecorationRenderer=h},5871:function(P,o){var b=this&&this.__values||function(u){var d=typeof Symbol=="function"&&Symbol.iterator,_=d&&u[d],m=0;if(_)return _.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&m>=u.length&&(u=void 0),{value:u&&u[m++],done:!u}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0;var f=function(){function u(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}return Object.defineProperty(u.prototype,"zones",{get:function(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones},enumerable:!1,configurable:!0}),u.prototype.clear=function(){this._zones.length=0,this._zonePoolIndex=0},u.prototype.addDecoration=function(d){var _,m;if(d.options.overviewRulerOptions){try{for(var v=b(this._zones),s=v.next();!s.done;s=v.next()){var a=s.value;if(a.color===d.options.overviewRulerOptions.color&&a.position===d.options.overviewRulerOptions.position){if(this._lineIntersectsZone(a,d.marker.line))return;if(this._lineAdjacentToZone(a,d.marker.line,d.options.overviewRulerOptions.position))return void this._addLineToZone(a,d.marker.line)}}}catch(p){_={error:p}}finally{try{s&&!s.done&&(m=v.return)&&m.call(v)}finally{if(_)throw _.error}}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=d.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=d.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=d.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=d.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:d.options.overviewRulerOptions.color,position:d.options.overviewRulerOptions.position,startBufferLine:d.marker.line,endBufferLine:d.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}},u.prototype.setPadding=function(d){this._linePadding=d},u.prototype._lineIntersectsZone=function(d,_){return _>=d.startBufferLine&&_<=d.endBufferLine},u.prototype._lineAdjacentToZone=function(d,_,m){return _>=d.startBufferLine-this._linePadding[m||"full"]&&_<=d.endBufferLine+this._linePadding[m||"full"]},u.prototype._addLineToZone=function(d,_){d.startBufferLine=Math.min(d.startBufferLine,_),d.endBufferLine=Math.max(d.endBufferLine,_)},u}();o.ColorZoneStore=f},5744:function(P,o,b){var f,u=this&&this.__extends||(f=function(n,l){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,g){c.__proto__=g}||function(c,g){for(var C in g)Object.prototype.hasOwnProperty.call(g,C)&&(c[C]=g[C])},f(n,l)},function(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function c(){this.constructor=n}f(n,l),n.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}),d=this&&this.__decorate||function(n,l,c,g){var C,y=arguments.length,S=y<3?l:g===null?g=Object.getOwnPropertyDescriptor(l,c):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(n,l,c,g);else for(var w=n.length-1;w>=0;w--)(C=n[w])&&(S=(y<3?C(S):y>3?C(l,c,S):C(l,c))||S);return y>3&&S&&Object.defineProperty(l,c,S),S},_=this&&this.__param||function(n,l){return function(c,g){l(c,g,n)}},m=this&&this.__values||function(n){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&n[l],g=0;if(c)return c.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&g>=n.length&&(n=void 0),{value:n&&n[g++],done:!n}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;var v=b(5871),s=b(3656),a=b(4725),p=b(844),h=b(2585),r={full:0,left:0,center:0,right:0},e={full:0,left:0,center:0,right:0},t={full:0,left:0,center:0,right:0},i=function(n){function l(c,g,C,y,S,w){var R,L=n.call(this)||this;L._viewportElement=c,L._screenElement=g,L._bufferService=C,L._decorationService=y,L._renderService=S,L._optionsService=w,L._colorZoneStore=new v.ColorZoneStore,L._shouldUpdateDimensions=!0,L._shouldUpdateAnchor=!0,L._lastKnownBufferLength=0,L._canvas=document.createElement("canvas"),L._canvas.classList.add("xterm-decoration-overview-ruler"),L._refreshCanvasDimensions(),(R=L._viewportElement.parentElement)===null||R===void 0||R.insertBefore(L._canvas,L._viewportElement);var k=L._canvas.getContext("2d");if(!k)throw new Error("Ctx cannot be null");return L._ctx=k,L._registerDecorationListeners(),L._registerBufferChangeListeners(),L._registerDimensionChangeListeners(),L}return u(l,n),Object.defineProperty(l.prototype,"_width",{get:function(){return this._optionsService.options.overviewRulerWidth||0},enumerable:!1,configurable:!0}),l.prototype._registerDecorationListeners=function(){var c=this;this.register(this._decorationService.onDecorationRegistered(function(){return c._queueRefresh(void 0,!0)})),this.register(this._decorationService.onDecorationRemoved(function(){return c._queueRefresh(void 0,!0)}))},l.prototype._registerBufferChangeListeners=function(){var c=this;this.register(this._renderService.onRenderedViewportChange(function(){return c._queueRefresh()})),this.register(this._bufferService.buffers.onBufferActivate(function(){c._canvas.style.display=c._bufferService.buffer===c._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(function(){c._lastKnownBufferLength!==c._bufferService.buffers.normal.lines.length&&(c._refreshDrawHeightConstants(),c._refreshColorZonePadding())}))},l.prototype._registerDimensionChangeListeners=function(){var c=this;this.register(this._renderService.onRender(function(){c._containerHeight&&c._containerHeight===c._screenElement.clientHeight||(c._queueRefresh(!0),c._containerHeight=c._screenElement.clientHeight)})),this.register(this._optionsService.onOptionChange(function(g){g==="overviewRulerWidth"&&c._queueRefresh(!0)})),this.register((0,s.addDisposableDomListener)(window,"resize",function(){c._queueRefresh(!0)})),this._queueRefresh(!0)},l.prototype.dispose=function(){var c;(c=this._canvas)===null||c===void 0||c.remove(),n.prototype.dispose.call(this)},l.prototype._refreshDrawConstants=function(){var c=Math.floor(this._canvas.width/3),g=Math.ceil(this._canvas.width/3);e.full=this._canvas.width,e.left=c,e.center=g,e.right=c,this._refreshDrawHeightConstants(),t.full=0,t.left=0,t.center=e.left,t.right=e.left+e.center},l.prototype._refreshDrawHeightConstants=function(){r.full=Math.round(2*window.devicePixelRatio);var c=this._canvas.height/this._bufferService.buffer.lines.length,g=Math.round(Math.max(Math.min(c,12),6)*window.devicePixelRatio);r.left=g,r.center=g,r.right=g},l.prototype._refreshColorZonePadding=function(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length},l.prototype._refreshCanvasDimensions=function(){this._canvas.style.width=this._width+"px",this._canvas.width=Math.round(this._width*window.devicePixelRatio),this._canvas.style.height=this._screenElement.clientHeight+"px",this._canvas.height=Math.round(this._screenElement.clientHeight*window.devicePixelRatio),this._refreshDrawConstants(),this._refreshColorZonePadding()},l.prototype._refreshDecorations=function(){var c,g,C,y,S,w;this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();try{for(var R=m(this._decorationService.decorations),L=R.next();!L.done;L=R.next()){var k=L.value;this._colorZoneStore.addDecoration(k)}}catch(F){c={error:F}}finally{try{L&&!L.done&&(g=R.return)&&g.call(R)}finally{if(c)throw c.error}}this._ctx.lineWidth=1;var E=this._colorZoneStore.zones;try{for(var x=m(E),M=x.next();!M.done;M=x.next())(q=M.value).position!=="full"&&this._renderColorZone(q)}catch(F){C={error:F}}finally{try{M&&!M.done&&(y=x.return)&&y.call(x)}finally{if(C)throw C.error}}try{for(var T=m(E),U=T.next();!U.done;U=T.next()){var q;(q=U.value).position==="full"&&this._renderColorZone(q)}}catch(F){S={error:F}}finally{try{U&&!U.done&&(w=T.return)&&w.call(T)}finally{if(S)throw S.error}}this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1},l.prototype._renderColorZone=function(c){this._ctx.fillStyle=c.color,this._ctx.fillRect(t[c.position||"full"],Math.round((this._canvas.height-1)*(c.startBufferLine/this._bufferService.buffers.active.lines.length)-r[c.position||"full"]/2),e[c.position||"full"],Math.round((this._canvas.height-1)*((c.endBufferLine-c.startBufferLine)/this._bufferService.buffers.active.lines.length)+r[c.position||"full"]))},l.prototype._queueRefresh=function(c,g){var C=this;this._shouldUpdateDimensions=c||this._shouldUpdateDimensions,this._shouldUpdateAnchor=g||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=window.requestAnimationFrame(function(){C._refreshDecorations(),C._animationFrame=void 0}))},d([_(2,h.IBufferService),_(3,h.IDecorationService),_(4,a.IRenderService),_(5,h.IOptionsService)],l)}(p.Disposable);o.OverviewRulerRenderer=i},2950:function(P,o,b){var f=this&&this.__decorate||function(v,s,a,p){var h,r=arguments.length,e=r<3?s:p===null?p=Object.getOwnPropertyDescriptor(s,a):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(v,s,a,p);else for(var t=v.length-1;t>=0;t--)(h=v[t])&&(e=(r<3?h(e):r>3?h(s,a,e):h(s,a))||e);return r>3&&e&&Object.defineProperty(s,a,e),e},u=this&&this.__param||function(v,s){return function(a,p){s(a,p,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;var d=b(4725),_=b(2585),m=function(){function v(s,a,p,h,r,e){this._textarea=s,this._compositionView=a,this._bufferService=p,this._optionsService=h,this._coreService=r,this._renderService=e,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}return Object.defineProperty(v.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),v.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")},v.prototype.compositionupdate=function(s){var a=this;this._compositionView.textContent=s.data,this.updateCompositionElements(),setTimeout(function(){a._compositionPosition.end=a._textarea.value.length},0)},v.prototype.compositionend=function(){this._finalizeComposition(!0)},v.prototype.keydown=function(s){if(this._isComposing||this._isSendingComposition){if(s.keyCode===229||s.keyCode===16||s.keyCode===17||s.keyCode===18)return!1;this._finalizeComposition(!1)}return s.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},v.prototype._finalizeComposition=function(s){var a=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,s){var p={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(a._isSendingComposition){a._isSendingComposition=!1;var r;p.start+=a._dataAlreadySent.length,(r=a._isComposing?a._textarea.value.substring(p.start,p.end):a._textarea.value.substring(p.start)).length>0&&a._coreService.triggerDataEvent(r,!0)}},0)}else{this._isSendingComposition=!1;var h=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(h,!0)}},v.prototype._handleAnyTextareaChanges=function(){var s=this,a=this._textarea.value;setTimeout(function(){if(!s._isComposing){var p=s._textarea.value.replace(a,"");p.length>0&&(s._dataAlreadySent=p,s._coreService.triggerDataEvent(p,!0))}},0)},v.prototype.updateCompositionElements=function(s){var a=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var p=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.actualCellHeight,r=this._bufferService.buffer.y*this._renderService.dimensions.actualCellHeight,e=p*this._renderService.dimensions.actualCellWidth;this._compositionView.style.left=e+"px",this._compositionView.style.top=r+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var t=this._compositionView.getBoundingClientRect();this._textarea.style.left=e+"px",this._textarea.style.top=r+"px",this._textarea.style.width=Math.max(t.width,1)+"px",this._textarea.style.height=Math.max(t.height,1)+"px",this._textarea.style.lineHeight=t.height+"px"}s||setTimeout(function(){return a.updateCompositionElements(!0)},0)}},f([u(2,_.IBufferService),u(3,_.IOptionsService),u(4,_.ICoreService),u(5,d.IRenderService)],v)}();o.CompositionHelper=m},9806:(P,o)=>{function b(f,u,d){var _=d.getBoundingClientRect(),m=f.getComputedStyle(d),v=parseInt(m.getPropertyValue("padding-left")),s=parseInt(m.getPropertyValue("padding-top"));return[u.clientX-_.left-v,u.clientY-_.top-s]}Object.defineProperty(o,"__esModule",{value:!0}),o.getRawByteCoords=o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=b,o.getCoords=function(f,u,d,_,m,v,s,a,p){if(v){var h=b(f,u,d);if(h)return h[0]=Math.ceil((h[0]+(p?s/2:0))/s),h[1]=Math.ceil(h[1]/a),h[0]=Math.min(Math.max(h[0],1),_+(p?1:0)),h[1]=Math.min(Math.max(h[1],1),m),h}},o.getRawByteCoords=function(f){if(f)return{x:f[0]+32,y:f[1]+32}}},9504:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;var f=b(2584);function u(a,p,h,r){var e=a-d(h,a),t=p-d(h,p),i=Math.abs(e-t)-function(n,l,c){for(var g=0,C=n-d(c,n),y=l-d(c,l),S=0;S<Math.abs(C-y);S++){var w=_(n,l)==="A"?-1:1,R=c.buffer.lines.get(C+w*S);R?.isWrapped&&g++}return g}(a,p,h);return s(i,v(_(a,p),r))}function d(a,p){for(var h=0,r=a.buffer.lines.get(p),e=r?.isWrapped;e&&p>=0&&p<a.rows;)h++,e=(r=a.buffer.lines.get(--p))==null?void 0:r.isWrapped;return h}function _(a,p){return a>p?"A":"B"}function m(a,p,h,r,e,t){for(var i=a,n=p,l="";i!==h||n!==r;)i+=e?1:-1,e&&i>t.cols-1?(l+=t.buffer.translateBufferLineToString(n,!1,a,i),i=0,a=0,n++):!e&&i<0&&(l+=t.buffer.translateBufferLineToString(n,!1,0,a+1),a=i=t.cols-1,n--);return l+t.buffer.translateBufferLineToString(n,!1,a,i)}function v(a,p){var h=p?"O":"[";return f.C0.ESC+h+a}function s(a,p){a=Math.floor(a);for(var h="",r=0;r<a;r++)h+=p;return h}o.moveToCellSequence=function(a,p,h,r){var e,t=h.buffer.x,i=h.buffer.y;if(!h.buffer.hasScrollback)return function(l,c,g,C,y,S){return u(c,C,y,S).length===0?"":s(m(l,c,l,c-d(y,c),!1,y).length,v("D",S))}(t,i,0,p,h,r)+u(i,p,h,r)+function(l,c,g,C,y,S){var w;w=u(c,C,y,S).length>0?C-d(y,C):c;var R=C,L=function(k,E,x,M,T,U){var q;return q=u(x,M,T,U).length>0?M-d(T,M):E,k<x&&q<=M||k>=x&&q<M?"C":"D"}(l,c,g,C,y,S);return s(m(l,w,g,R,L==="C",y).length,v(L,S))}(t,i,a,p,h,r);if(i===p)return e=t>a?"D":"C",s(Math.abs(t-a),v(e,r));e=i>p?"D":"C";var n=Math.abs(i-p);return s(function(l,c){return c.cols-l}(i>p?a:t,h)+(n-1)*h.cols+1+((i>p?t:a)-1),v(e,r))}},4389:function(P,o,b){var f=this&&this.__assign||function(){return f=Object.assign||function(r){for(var e,t=1,i=arguments.length;t<i;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},f.apply(this,arguments)},u=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;var d=b(3236),_=b(9042),m=b(7975),v=b(7090),s=b(5741),a=b(8285),p=["cols","rows"],h=function(){function r(e){var t=this;this._core=new d.Terminal(e),this._addonManager=new s.AddonManager,this._publicOptions=f({},this._core.options);var i=function(g){return t._core.options[g]},n=function(g,C){t._checkReadonlyOptions(g),t._core.options[g]=C};for(var l in this._core.options){var c={get:i.bind(this,l),set:n.bind(this,l)};Object.defineProperty(this._publicOptions,l,c)}}return r.prototype._checkReadonlyOptions=function(e){if(p.includes(e))throw new Error('Option "'+e+'" can only be set in the constructor')},r.prototype._checkProposedApi=function(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(r.prototype,"onBell",{get:function(){return this._core.onBell},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onWriteParsed",{get:function(){return this._core.onWriteParsed},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new m.ParserApi(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"unicode",{get:function(){return this._checkProposedApi(),new v.UnicodeApi(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"buffer",{get:function(){return this._checkProposedApi(),this._buffer||(this._buffer=new a.BufferNamespaceApi(this._core)),this._buffer},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"modes",{get:function(){var e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any"}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,wraparoundMode:e.wraparound}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"options",{get:function(){return this._publicOptions},set:function(e){for(var t in e)this._publicOptions[t]=e[t]},enumerable:!1,configurable:!0}),r.prototype.blur=function(){this._core.blur()},r.prototype.focus=function(){this._core.focus()},r.prototype.resize=function(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)},r.prototype.open=function(e){this._core.open(e)},r.prototype.attachCustomKeyEventHandler=function(e){this._core.attachCustomKeyEventHandler(e)},r.prototype.registerLinkMatcher=function(e,t,i){return this._checkProposedApi(),this._core.registerLinkMatcher(e,t,i)},r.prototype.deregisterLinkMatcher=function(e){this._checkProposedApi(),this._core.deregisterLinkMatcher(e)},r.prototype.registerLinkProvider=function(e){return this._checkProposedApi(),this._core.registerLinkProvider(e)},r.prototype.registerCharacterJoiner=function(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)},r.prototype.deregisterCharacterJoiner=function(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)},r.prototype.registerMarker=function(e){return e===void 0&&(e=0),this._checkProposedApi(),this._verifyIntegers(e),this._core.addMarker(e)},r.prototype.registerDecoration=function(e){var t,i,n;return this._checkProposedApi(),this._verifyPositiveIntegers((t=e.x)!==null&&t!==void 0?t:0,(i=e.width)!==null&&i!==void 0?i:0,(n=e.height)!==null&&n!==void 0?n:0),this._core.registerDecoration(e)},r.prototype.addMarker=function(e){return this.registerMarker(e)},r.prototype.hasSelection=function(){return this._core.hasSelection()},r.prototype.select=function(e,t,i){this._verifyIntegers(e,t,i),this._core.select(e,t,i)},r.prototype.getSelection=function(){return this._core.getSelection()},r.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},r.prototype.clearSelection=function(){this._core.clearSelection()},r.prototype.selectAll=function(){this._core.selectAll()},r.prototype.selectLines=function(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)},r.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},r.prototype.scrollLines=function(e){this._verifyIntegers(e),this._core.scrollLines(e)},r.prototype.scrollPages=function(e){this._verifyIntegers(e),this._core.scrollPages(e)},r.prototype.scrollToTop=function(){this._core.scrollToTop()},r.prototype.scrollToBottom=function(){this._core.scrollToBottom()},r.prototype.scrollToLine=function(e){this._verifyIntegers(e),this._core.scrollToLine(e)},r.prototype.clear=function(){this._core.clear()},r.prototype.write=function(e,t){this._core.write(e,t)},r.prototype.writeUtf8=function(e,t){this._core.write(e,t)},r.prototype.writeln=function(e,t){this._core.write(e),this._core.write(`\r
|
|
4
|
-
`,t)},r.prototype.paste=function(e){this._core.paste(e)},r.prototype.getOption=function(e){return this._core.optionsService.getOption(e)},r.prototype.setOption=function(e,t){this._checkReadonlyOptions(e),this._core.optionsService.setOption(e,t)},r.prototype.refresh=function(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)},r.prototype.reset=function(){this._core.reset()},r.prototype.clearTextureAtlas=function(){this._core.clearTextureAtlas()},r.prototype.loadAddon=function(e){return this._addonManager.loadAddon(this,e)},Object.defineProperty(r,"strings",{get:function(){return _},enumerable:!1,configurable:!0}),r.prototype._verifyIntegers=function(){for(var e,t,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];try{for(var l=u(i),c=l.next();!c.done;c=l.next()){var g=c.value;if(g===1/0||isNaN(g)||g%1!=0)throw new Error("This API only accepts integers")}}catch(C){e={error:C}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}},r.prototype._verifyPositiveIntegers=function(){for(var e,t,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];try{for(var l=u(i),c=l.next();!c.done;c=l.next()){var g=c.value;if(g&&(g===1/0||isNaN(g)||g%1!=0||g<0))throw new Error("This API only accepts positive integers")}}catch(C){e={error:C}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}},r}();o.Terminal=h},1546:function(P,o,b){var f=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.BaseRenderLayer=void 0;var u=b(643),d=b(8803),_=b(1420),m=b(3734),v=b(1752),s=b(8055),a=b(9631),p=b(8978),h=function(){function r(e,t,i,n,l,c,g,C,y){this._container=e,this._alpha=n,this._colors=l,this._rendererId=c,this._bufferService=g,this._optionsService=C,this._decorationService=y,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._columnSelectMode=!1,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+t+"-layer"),this._canvas.style.zIndex=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return r.prototype.dispose=function(){var e;(0,a.removeElementFromParent)(this._canvas),(e=this._charAtlas)===null||e===void 0||e.dispose()},r.prototype._initCanvas=function(){this._ctx=(0,v.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},r.prototype.onOptionsChanged=function(){},r.prototype.onBlur=function(){},r.prototype.onFocus=function(){},r.prototype.onCursorMove=function(){},r.prototype.onGridChanged=function(e,t){},r.prototype.onSelectionChanged=function(e,t,i){i===void 0&&(i=!1),this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=i},r.prototype.setColors=function(e){this._refreshCharAtlas(e)},r.prototype._setTransparency=function(e){if(e!==this._alpha){var t=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,t),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},r.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,_.acquireCharAtlas)(this._optionsService.rawOptions,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},r.prototype.resize=function(e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},r.prototype.clearTextureAtlas=function(){var e;(e=this._charAtlas)===null||e===void 0||e.clear()},r.prototype._fillCells=function(e,t,i,n){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,n*this._scaledCellHeight)},r.prototype._fillMiddleLineAtCells=function(e,t,i){i===void 0&&(i=1);var n=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-n-window.devicePixelRatio,i*this._scaledCellWidth,window.devicePixelRatio)},r.prototype._fillBottomLineAtCells=function(e,t,i){i===void 0&&(i=1),this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-window.devicePixelRatio-1,i*this._scaledCellWidth,window.devicePixelRatio)},r.prototype._fillLeftLineAtCell=function(e,t,i){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,window.devicePixelRatio*i,this._scaledCellHeight)},r.prototype._strokeRectAtCell=function(e,t,i,n){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,t*this._scaledCellHeight+window.devicePixelRatio/2,i*this._scaledCellWidth-window.devicePixelRatio,n*this._scaledCellHeight-window.devicePixelRatio)},r.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},r.prototype._clearCells=function(e,t,i,n){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,n*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,n*this._scaledCellHeight))},r.prototype._fillCharTrueColor=function(e,t,i){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=d.TEXT_BASELINE,this._clipRow(i);var n=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(n=(0,p.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,i*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),n||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},r.prototype._drawChars=function(e,t,i){var n,l,c,g=this._getContrastColor(e,t,i);if(g||e.isFgRGB()||e.isBgRGB())this._drawUncachedChars(e,t,i,g);else{var C,y;e.isInverse()?(C=e.isBgDefault()?d.INVERTED_DEFAULT_COLOR:e.getBgColor(),y=e.isFgDefault()?d.INVERTED_DEFAULT_COLOR:e.getFgColor()):(y=e.isBgDefault()?u.DEFAULT_COLOR:e.getBgColor(),C=e.isFgDefault()?u.DEFAULT_COLOR:e.getFgColor()),C+=this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&C<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||u.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||u.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=y,this._currentGlyphIdentifier.fg=C,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic();var S=!1;try{for(var w=f(this._decorationService.getDecorationsAtCell(t,i)),R=w.next();!R.done;R=w.next()){var L=R.value;if(L.backgroundColorRGB||L.foregroundColorRGB){S=!0;break}}}catch(k){n={error:k}}finally{try{R&&!R.done&&(l=w.return)&&l.call(w)}finally{if(n)throw n.error}}!S&&(!((c=this._charAtlas)===null||c===void 0)&&c.draw(this._ctx,this._currentGlyphIdentifier,t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop))||this._drawUncachedChars(e,t,i)}},r.prototype._drawUncachedChars=function(e,t,i,n){if(this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline=d.TEXT_BASELINE,e.isInverse())if(n)this._ctx.fillStyle=n.css;else if(e.isBgDefault())this._ctx.fillStyle=s.color.opaque(this._colors.background).css;else if(e.isBgRGB())this._ctx.fillStyle="rgb("+m.AttributeData.toColorRGB(e.getBgColor()).join(",")+")";else{var l=e.getBgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&l<8&&(l+=8),this._ctx.fillStyle=this._colors.ansi[l].css}else if(n)this._ctx.fillStyle=n.css;else if(e.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(e.isFgRGB())this._ctx.fillStyle="rgb("+m.AttributeData.toColorRGB(e.getFgColor()).join(",")+")";else{var c=e.getFgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&c<8&&(c+=8),this._ctx.fillStyle=this._colors.ansi[c].css}this._clipRow(i),e.isDim()&&(this._ctx.globalAlpha=d.DIM_OPACITY);var g=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(g=(0,p.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,i*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),g||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()},r.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},r.prototype._getFont=function(e,t){return(t?"italic":"")+" "+(e?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight)+" "+this._optionsService.rawOptions.fontSize*window.devicePixelRatio+"px "+this._optionsService.rawOptions.fontFamily},r.prototype._getContrastColor=function(e,t,i){var n,l,c,g,C=!1;try{for(var y=f(this._decorationService.getDecorationsAtCell(t,i)),S=y.next();!S.done;S=y.next()){var w=S.value;w.options.layer!=="top"&&C||(w.backgroundColorRGB&&(c=w.backgroundColorRGB.rgba),w.foregroundColorRGB&&(g=w.foregroundColorRGB.rgba),C=w.options.layer==="top")}}catch($){n={error:$}}finally{try{S&&!S.done&&(l=y.return)&&l.call(y)}finally{if(n)throw n.error}}if(C||this._colors.selectionForeground&&this._isCellInSelection(t,i)&&(g=this._colors.selectionForeground.rgba),c||g||this._optionsService.rawOptions.minimumContrastRatio!==1&&!(0,v.excludeFromContrastRatioDemands)(e.getCode())){if(!c&&!g){var R=this._colors.contrastCache.getColor(e.bg,e.fg);if(R!==void 0)return R||void 0}var L=e.getFgColor(),k=e.getFgColorMode(),E=e.getBgColor(),x=e.getBgColorMode(),M=!!e.isInverse(),T=!!e.isInverse();if(M){var U=L;L=E,E=U;var q=k;k=x,x=q}var F=this._resolveBackgroundRgba(c!==void 0?50331648:x,c??E,M),z=this._resolveForegroundRgba(k,L,M,T),N=s.rgba.ensureContrastRatio(c??F,g??z,this._optionsService.rawOptions.minimumContrastRatio);if(!N){if(!g)return void this._colors.contrastCache.setColor(e.bg,e.fg,null);N=g}var A={css:s.channels.toCss(N>>24&255,N>>16&255,N>>8&255),rgba:N};return c||g||this._colors.contrastCache.setColor(e.bg,e.fg,A),A}},r.prototype._resolveBackgroundRgba=function(e,t,i){switch(e){case 16777216:case 33554432:return this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return i?this._colors.foreground.rgba:this._colors.background.rgba}},r.prototype._resolveForegroundRgba=function(e,t,i,n){switch(e){case 16777216:case 33554432:return this._optionsService.rawOptions.drawBoldTextInBrightColors&&n&&t<8&&(t+=8),this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return i?this._colors.background.rgba:this._colors.foreground.rgba}},r.prototype._isCellInSelection=function(e,t){var i=this._selectionStart,n=this._selectionEnd;return!(!i||!n)&&(this._columnSelectMode?e>=i[0]&&t>=i[1]&&e<n[0]&&t<n[1]:t>i[1]&&t<n[1]||i[1]===n[1]&&t===i[1]&&e>=i[0]&&e<n[0]||i[1]<n[1]&&t===n[1]&&e<n[0]||i[1]<n[1]&&t===i[1]&&e>=i[0])},r}();o.BaseRenderLayer=h},2512:function(P,o,b){var f,u=this&&this.__extends||(f=function(e,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])},f(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}f(e,t),e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}),d=this&&this.__decorate||function(e,t,i,n){var l,c=arguments.length,g=c<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(e,t,i,n);else for(var C=e.length-1;C>=0;C--)(l=e[C])&&(g=(c<3?l(g):c>3?l(t,i,g):l(t,i))||g);return c>3&&g&&Object.defineProperty(t,i,g),g},_=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CursorRenderLayer=void 0;var m=b(1546),v=b(511),s=b(2585),a=b(4725),p=600,h=function(e){function t(i,n,l,c,g,C,y,S,w,R){var L=e.call(this,i,"cursor",n,!0,l,c,C,y,R)||this;return L._onRequestRedraw=g,L._coreService=S,L._coreBrowserService=w,L._cell=new v.CellData,L._state={x:0,y:0,isFocused:!1,style:"",width:0},L._cursorRenderers={bar:L._renderBarCursor.bind(L),block:L._renderBlockCursor.bind(L),underline:L._renderUnderlineCursor.bind(L)},L}return u(t,e),t.prototype.dispose=function(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),e.prototype.dispose.call(this)},t.prototype.resize=function(i){e.prototype.resize.call(this,i),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},t.prototype.reset=function(){var i;this._clearCursor(),(i=this._cursorBlinkStateManager)===null||i===void 0||i.restartBlinkAnimation(),this.onOptionsChanged()},t.prototype.onBlur=function(){var i;(i=this._cursorBlinkStateManager)===null||i===void 0||i.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onFocus=function(){var i;(i=this._cursorBlinkStateManager)===null||i===void 0||i.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onOptionsChanged=function(){var i,n=this;this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new r(this._coreBrowserService.isFocused,function(){n._render(!0)})):((i=this._cursorBlinkStateManager)===null||i===void 0||i.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onCursorMove=function(){var i;(i=this._cursorBlinkStateManager)===null||i===void 0||i.restartBlinkAnimation()},t.prototype.onGridChanged=function(i,n){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},t.prototype._render=function(i){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var n=this._bufferService.buffer.ybase+this._bufferService.buffer.y,l=n-this._bufferService.buffer.ydisp;if(l<0||l>=this._bufferService.rows)this._clearCursor();else{var c=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(n).loadCell(c,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var g=this._optionsService.rawOptions.cursorStyle;return g&&g!=="block"?this._cursorRenderers[g](c,l,this._cell):this._renderBlurCursor(c,l,this._cell),this._ctx.restore(),this._state.x=c,this._state.y=l,this._state.isFocused=!1,this._state.style=g,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===c&&this._state.y===l&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](c,l,this._cell),this._ctx.restore(),this._state.x=c,this._state.y=l,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},t.prototype._clearCursor=function(){this._state&&(window.devicePixelRatio<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},t.prototype._renderBarCursor=function(i,n,l){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(i,n,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()},t.prototype._renderBlockCursor=function(i,n,l){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(i,n,l.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(l,i,n),this._ctx.restore()},t.prototype._renderUnderlineCursor=function(i,n,l){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(i,n),this._ctx.restore()},t.prototype._renderBlurCursor=function(i,n,l){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(i,n,l.getWidth(),1),this._ctx.restore()},d([_(5,s.IBufferService),_(6,s.IOptionsService),_(7,s.ICoreService),_(8,a.ICoreBrowserService),_(9,s.IDecorationService)],t)}(m.BaseRenderLayer);o.CursorRenderLayer=h;var r=function(){function e(t,i){this._renderCallback=i,this.isCursorVisible=!0,t&&this._restartInterval()}return Object.defineProperty(e.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},e.prototype.restartBlinkAnimation=function(){var t=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){t._renderCallback(),t._animationFrame=void 0})))},e.prototype._restartInterval=function(t){var i=this;t===void 0&&(t=p),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout(function(){if(i._animationTimeRestarted){var n=p-(Date.now()-i._animationTimeRestarted);if(i._animationTimeRestarted=void 0,n>0)return void i._restartInterval(n)}i.isCursorVisible=!1,i._animationFrame=window.requestAnimationFrame(function(){i._renderCallback(),i._animationFrame=void 0}),i._blinkInterval=window.setInterval(function(){if(i._animationTimeRestarted){var l=p-(Date.now()-i._animationTimeRestarted);return i._animationTimeRestarted=void 0,void i._restartInterval(l)}i.isCursorVisible=!i.isCursorVisible,i._animationFrame=window.requestAnimationFrame(function(){i._renderCallback(),i._animationFrame=void 0})},p)},t)},e.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},e.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},e}()},8978:function(P,o,b){var f,u,d,_,m,v,s,a,p,h,r,e,t,i,n,l,c,g,C,y,S,w,R,L,k,E,x,M,T,U,q,F,z,N,A,$,J,oe,B,ne,X,W,O,D,j,V,Y,te,ae,he,ue,K,fe,ye,xe,Fe,zt,Kt,Gt,Vt,Yt,Zt,Ge,Ve,Ye,Ze,Xe,Je,$e,Qe,et,tt,rt,it,nt,ot,st,at,ct,lt,ht,ut,ft,dt,_t,pt,vt,gt,yt,mt,bt,St,Ct,wt,Lt,xt,Et,kt,Rt,At,Mt,Ot,Dt,Tt,Bt,Pt,It,Ht,jt,Ft,Wt,Ut,Xt,Jt,$t,Qt,er,tr,rr,ir,nr,or,sr,ar,cr,lr,hr,ur,yr=this&&this.__read||function(I,H){var de=typeof Symbol=="function"&&I[Symbol.iterator];if(!de)return I;var me,Ee,Se=de.call(I),le=[];try{for(;(H===void 0||H-- >0)&&!(me=Se.next()).done;)le.push(me.value)}catch(Ce){Ee={error:Ce}}finally{try{me&&!me.done&&(de=Se.return)&&de.call(Se)}finally{if(Ee)throw Ee.error}}return le},fr=this&&this.__values||function(I){var H=typeof Symbol=="function"&&Symbol.iterator,de=H&&I[H],me=0;if(de)return de.call(I);if(I&&typeof I.length=="number")return{next:function(){return I&&me>=I.length&&(I=void 0),{value:I&&I[me++],done:!I}}};throw new TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.tryDrawCustomChar=o.powerlineDefinitions=o.boxDrawingDefinitions=o.blockElementDefinitions=void 0;var mr=b(1752);o.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:9,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:0,y:0,w:4,h:8}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};var Nr={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};o.boxDrawingDefinitions={"─":(f={},f[1]="M0,.5 L1,.5",f),"━":(u={},u[3]="M0,.5 L1,.5",u),"│":(d={},d[1]="M.5,0 L.5,1",d),"┃":(_={},_[3]="M.5,0 L.5,1",_),"┌":(m={},m[1]="M0.5,1 L.5,.5 L1,.5",m),"┏":(v={},v[3]="M0.5,1 L.5,.5 L1,.5",v),"┐":(s={},s[1]="M0,.5 L.5,.5 L.5,1",s),"┓":(a={},a[3]="M0,.5 L.5,.5 L.5,1",a),"└":(p={},p[1]="M.5,0 L.5,.5 L1,.5",p),"┗":(h={},h[3]="M.5,0 L.5,.5 L1,.5",h),"┘":(r={},r[1]="M.5,0 L.5,.5 L0,.5",r),"┛":(e={},e[3]="M.5,0 L.5,.5 L0,.5",e),"├":(t={},t[1]="M.5,0 L.5,1 M.5,.5 L1,.5",t),"┣":(i={},i[3]="M.5,0 L.5,1 M.5,.5 L1,.5",i),"┤":(n={},n[1]="M.5,0 L.5,1 M.5,.5 L0,.5",n),"┫":(l={},l[3]="M.5,0 L.5,1 M.5,.5 L0,.5",l),"┬":(c={},c[1]="M0,.5 L1,.5 M.5,.5 L.5,1",c),"┳":(g={},g[3]="M0,.5 L1,.5 M.5,.5 L.5,1",g),"┴":(C={},C[1]="M0,.5 L1,.5 M.5,.5 L.5,0",C),"┻":(y={},y[3]="M0,.5 L1,.5 M.5,.5 L.5,0",y),"┼":(S={},S[1]="M0,.5 L1,.5 M.5,0 L.5,1",S),"╋":(w={},w[3]="M0,.5 L1,.5 M.5,0 L.5,1",w),"╴":(R={},R[1]="M.5,.5 L0,.5",R),"╸":(L={},L[3]="M.5,.5 L0,.5",L),"╵":(k={},k[1]="M.5,.5 L.5,0",k),"╹":(E={},E[3]="M.5,.5 L.5,0",E),"╶":(x={},x[1]="M.5,.5 L1,.5",x),"╺":(M={},M[3]="M.5,.5 L1,.5",M),"╷":(T={},T[1]="M.5,.5 L.5,1",T),"╻":(U={},U[3]="M.5,.5 L.5,1",U),"═":(q={},q[1]=function(I,H){return"M0,"+(.5-H)+" L1,"+(.5-H)+" M0,"+(.5+H)+" L1,"+(.5+H)},q),"║":(F={},F[1]=function(I,H){return"M"+(.5-I)+",0 L"+(.5-I)+",1 M"+(.5+I)+",0 L"+(.5+I)+",1"},F),"╒":(z={},z[1]=function(I,H){return"M.5,1 L.5,"+(.5-H)+" L1,"+(.5-H)+" M.5,"+(.5+H)+" L1,"+(.5+H)},z),"╓":(N={},N[1]=function(I,H){return"M"+(.5-I)+",1 L"+(.5-I)+",.5 L1,.5 M"+(.5+I)+",.5 L"+(.5+I)+",1"},N),"╔":(A={},A[1]=function(I,H){return"M1,"+(.5-H)+" L"+(.5-I)+","+(.5-H)+" L"+(.5-I)+",1 M1,"+(.5+H)+" L"+(.5+I)+","+(.5+H)+" L"+(.5+I)+",1"},A),"╕":($={},$[1]=function(I,H){return"M0,"+(.5-H)+" L.5,"+(.5-H)+" L.5,1 M0,"+(.5+H)+" L.5,"+(.5+H)},$),"╖":(J={},J[1]=function(I,H){return"M"+(.5+I)+",1 L"+(.5+I)+",.5 L0,.5 M"+(.5-I)+",.5 L"+(.5-I)+",1"},J),"╗":(oe={},oe[1]=function(I,H){return"M0,"+(.5+H)+" L"+(.5-I)+","+(.5+H)+" L"+(.5-I)+",1 M0,"+(.5-H)+" L"+(.5+I)+","+(.5-H)+" L"+(.5+I)+",1"},oe),"╘":(B={},B[1]=function(I,H){return"M.5,0 L.5,"+(.5+H)+" L1,"+(.5+H)+" M.5,"+(.5-H)+" L1,"+(.5-H)},B),"╙":(ne={},ne[1]=function(I,H){return"M1,.5 L"+(.5-I)+",.5 L"+(.5-I)+",0 M"+(.5+I)+",.5 L"+(.5+I)+",0"},ne),"╚":(X={},X[1]=function(I,H){return"M1,"+(.5-H)+" L"+(.5+I)+","+(.5-H)+" L"+(.5+I)+",0 M1,"+(.5+H)+" L"+(.5-I)+","+(.5+H)+" L"+(.5-I)+",0"},X),"╛":(W={},W[1]=function(I,H){return"M0,"+(.5+H)+" L.5,"+(.5+H)+" L.5,0 M0,"+(.5-H)+" L.5,"+(.5-H)},W),"╜":(O={},O[1]=function(I,H){return"M0,.5 L"+(.5+I)+",.5 L"+(.5+I)+",0 M"+(.5-I)+",.5 L"+(.5-I)+",0"},O),"╝":(D={},D[1]=function(I,H){return"M0,"+(.5-H)+" L"+(.5-I)+","+(.5-H)+" L"+(.5-I)+",0 M0,"+(.5+H)+" L"+(.5+I)+","+(.5+H)+" L"+(.5+I)+",0"},D),"╞":(j={},j[1]=function(I,H){return"M.5,0 L.5,1 M.5,"+(.5-H)+" L1,"+(.5-H)+" M.5,"+(.5+H)+" L1,"+(.5+H)},j),"╟":(V={},V[1]=function(I,H){return"M"+(.5-I)+",0 L"+(.5-I)+",1 M"+(.5+I)+",0 L"+(.5+I)+",1 M"+(.5+I)+",.5 L1,.5"},V),"╠":(Y={},Y[1]=function(I,H){return"M"+(.5-I)+",0 L"+(.5-I)+",1 M1,"+(.5+H)+" L"+(.5+I)+","+(.5+H)+" L"+(.5+I)+",1 M1,"+(.5-H)+" L"+(.5+I)+","+(.5-H)+" L"+(.5+I)+",0"},Y),"╡":(te={},te[1]=function(I,H){return"M.5,0 L.5,1 M0,"+(.5-H)+" L.5,"+(.5-H)+" M0,"+(.5+H)+" L.5,"+(.5+H)},te),"╢":(ae={},ae[1]=function(I,H){return"M0,.5 L"+(.5-I)+",.5 M"+(.5-I)+",0 L"+(.5-I)+",1 M"+(.5+I)+",0 L"+(.5+I)+",1"},ae),"╣":(he={},he[1]=function(I,H){return"M"+(.5+I)+",0 L"+(.5+I)+",1 M0,"+(.5+H)+" L"+(.5-I)+","+(.5+H)+" L"+(.5-I)+",1 M0,"+(.5-H)+" L"+(.5-I)+","+(.5-H)+" L"+(.5-I)+",0"},he),"╤":(ue={},ue[1]=function(I,H){return"M0,"+(.5-H)+" L1,"+(.5-H)+" M0,"+(.5+H)+" L1,"+(.5+H)+" M.5,"+(.5+H)+" L.5,1"},ue),"╥":(K={},K[1]=function(I,H){return"M0,.5 L1,.5 M"+(.5-I)+",.5 L"+(.5-I)+",1 M"+(.5+I)+",.5 L"+(.5+I)+",1"},K),"╦":(fe={},fe[1]=function(I,H){return"M0,"+(.5-H)+" L1,"+(.5-H)+" M0,"+(.5+H)+" L"+(.5-I)+","+(.5+H)+" L"+(.5-I)+",1 M1,"+(.5+H)+" L"+(.5+I)+","+(.5+H)+" L"+(.5+I)+",1"},fe),"╧":(ye={},ye[1]=function(I,H){return"M.5,0 L.5,"+(.5-H)+" M0,"+(.5-H)+" L1,"+(.5-H)+" M0,"+(.5+H)+" L1,"+(.5+H)},ye),"╨":(xe={},xe[1]=function(I,H){return"M0,.5 L1,.5 M"+(.5-I)+",.5 L"+(.5-I)+",0 M"+(.5+I)+",.5 L"+(.5+I)+",0"},xe),"╩":(Fe={},Fe[1]=function(I,H){return"M0,"+(.5+H)+" L1,"+(.5+H)+" M0,"+(.5-H)+" L"+(.5-I)+","+(.5-H)+" L"+(.5-I)+",0 M1,"+(.5-H)+" L"+(.5+I)+","+(.5-H)+" L"+(.5+I)+",0"},Fe),"╪":(zt={},zt[1]=function(I,H){return"M.5,0 L.5,1 M0,"+(.5-H)+" L1,"+(.5-H)+" M0,"+(.5+H)+" L1,"+(.5+H)},zt),"╫":(Kt={},Kt[1]=function(I,H){return"M0,.5 L1,.5 M"+(.5-I)+",0 L"+(.5-I)+",1 M"+(.5+I)+",0 L"+(.5+I)+",1"},Kt),"╬":(Gt={},Gt[1]=function(I,H){return"M0,"+(.5+H)+" L"+(.5-I)+","+(.5+H)+" L"+(.5-I)+",1 M1,"+(.5+H)+" L"+(.5+I)+","+(.5+H)+" L"+(.5+I)+",1 M0,"+(.5-H)+" L"+(.5-I)+","+(.5-H)+" L"+(.5-I)+",0 M1,"+(.5-H)+" L"+(.5+I)+","+(.5-H)+" L"+(.5+I)+",0"},Gt),"╱":(Vt={},Vt[1]="M1,0 L0,1",Vt),"╲":(Yt={},Yt[1]="M0,0 L1,1",Yt),"╳":(Zt={},Zt[1]="M1,0 L0,1 M0,0 L1,1",Zt),"╼":(Ge={},Ge[1]="M.5,.5 L0,.5",Ge[3]="M.5,.5 L1,.5",Ge),"╽":(Ve={},Ve[1]="M.5,.5 L.5,0",Ve[3]="M.5,.5 L.5,1",Ve),"╾":(Ye={},Ye[1]="M.5,.5 L1,.5",Ye[3]="M.5,.5 L0,.5",Ye),"╿":(Ze={},Ze[1]="M.5,.5 L.5,1",Ze[3]="M.5,.5 L.5,0",Ze),"┍":(Xe={},Xe[1]="M.5,.5 L.5,1",Xe[3]="M.5,.5 L1,.5",Xe),"┎":(Je={},Je[1]="M.5,.5 L1,.5",Je[3]="M.5,.5 L.5,1",Je),"┑":($e={},$e[1]="M.5,.5 L.5,1",$e[3]="M.5,.5 L0,.5",$e),"┒":(Qe={},Qe[1]="M.5,.5 L0,.5",Qe[3]="M.5,.5 L.5,1",Qe),"┕":(et={},et[1]="M.5,.5 L.5,0",et[3]="M.5,.5 L1,.5",et),"┖":(tt={},tt[1]="M.5,.5 L1,.5",tt[3]="M.5,.5 L.5,0",tt),"┙":(rt={},rt[1]="M.5,.5 L.5,0",rt[3]="M.5,.5 L0,.5",rt),"┚":(it={},it[1]="M.5,.5 L0,.5",it[3]="M.5,.5 L.5,0",it),"┝":(nt={},nt[1]="M.5,0 L.5,1",nt[3]="M.5,.5 L1,.5",nt),"┞":(ot={},ot[1]="M0.5,1 L.5,.5 L1,.5",ot[3]="M.5,.5 L.5,0",ot),"┟":(st={},st[1]="M.5,0 L.5,.5 L1,.5",st[3]="M.5,.5 L.5,1",st),"┠":(at={},at[1]="M.5,.5 L1,.5",at[3]="M.5,0 L.5,1",at),"┡":(ct={},ct[1]="M.5,.5 L.5,1",ct[3]="M.5,0 L.5,.5 L1,.5",ct),"┢":(lt={},lt[1]="M.5,.5 L.5,0",lt[3]="M0.5,1 L.5,.5 L1,.5",lt),"┥":(ht={},ht[1]="M.5,0 L.5,1",ht[3]="M.5,.5 L0,.5",ht),"┦":(ut={},ut[1]="M0,.5 L.5,.5 L.5,1",ut[3]="M.5,.5 L.5,0",ut),"┧":(ft={},ft[1]="M.5,0 L.5,.5 L0,.5",ft[3]="M.5,.5 L.5,1",ft),"┨":(dt={},dt[1]="M.5,.5 L0,.5",dt[3]="M.5,0 L.5,1",dt),"┩":(_t={},_t[1]="M.5,.5 L.5,1",_t[3]="M.5,0 L.5,.5 L0,.5",_t),"┪":(pt={},pt[1]="M.5,.5 L.5,0",pt[3]="M0,.5 L.5,.5 L.5,1",pt),"┭":(vt={},vt[1]="M0.5,1 L.5,.5 L1,.5",vt[3]="M.5,.5 L0,.5",vt),"┮":(gt={},gt[1]="M0,.5 L.5,.5 L.5,1",gt[3]="M.5,.5 L1,.5",gt),"┯":(yt={},yt[1]="M.5,.5 L.5,1",yt[3]="M0,.5 L1,.5",yt),"┰":(mt={},mt[1]="M0,.5 L1,.5",mt[3]="M.5,.5 L.5,1",mt),"┱":(bt={},bt[1]="M.5,.5 L1,.5",bt[3]="M0,.5 L.5,.5 L.5,1",bt),"┲":(St={},St[1]="M.5,.5 L0,.5",St[3]="M0.5,1 L.5,.5 L1,.5",St),"┵":(Ct={},Ct[1]="M.5,0 L.5,.5 L1,.5",Ct[3]="M.5,.5 L0,.5",Ct),"┶":(wt={},wt[1]="M.5,0 L.5,.5 L0,.5",wt[3]="M.5,.5 L1,.5",wt),"┷":(Lt={},Lt[1]="M.5,.5 L.5,0",Lt[3]="M0,.5 L1,.5",Lt),"┸":(xt={},xt[1]="M0,.5 L1,.5",xt[3]="M.5,.5 L.5,0",xt),"┹":(Et={},Et[1]="M.5,.5 L1,.5",Et[3]="M.5,0 L.5,.5 L0,.5",Et),"┺":(kt={},kt[1]="M.5,.5 L0,.5",kt[3]="M.5,0 L.5,.5 L1,.5",kt),"┽":(Rt={},Rt[1]="M.5,0 L.5,1 M.5,.5 L1,.5",Rt[3]="M.5,.5 L0,.5",Rt),"┾":(At={},At[1]="M.5,0 L.5,1 M.5,.5 L0,.5",At[3]="M.5,.5 L1,.5",At),"┿":(Mt={},Mt[1]="M.5,0 L.5,1",Mt[3]="M0,.5 L1,.5",Mt),"╀":(Ot={},Ot[1]="M0,.5 L1,.5 M.5,.5 L.5,1",Ot[3]="M.5,.5 L.5,0",Ot),"╁":(Dt={},Dt[1]="M.5,.5 L.5,0 M0,.5 L1,.5",Dt[3]="M.5,.5 L.5,1",Dt),"╂":(Tt={},Tt[1]="M0,.5 L1,.5",Tt[3]="M.5,0 L.5,1",Tt),"╃":(Bt={},Bt[1]="M0.5,1 L.5,.5 L1,.5",Bt[3]="M.5,0 L.5,.5 L0,.5",Bt),"╄":(Pt={},Pt[1]="M0,.5 L.5,.5 L.5,1",Pt[3]="M.5,0 L.5,.5 L1,.5",Pt),"╅":(It={},It[1]="M.5,0 L.5,.5 L1,.5",It[3]="M0,.5 L.5,.5 L.5,1",It),"╆":(Ht={},Ht[1]="M.5,0 L.5,.5 L0,.5",Ht[3]="M0.5,1 L.5,.5 L1,.5",Ht),"╇":(jt={},jt[1]="M.5,.5 L.5,1",jt[3]="M.5,.5 L.5,0 M0,.5 L1,.5",jt),"╈":(Ft={},Ft[1]="M.5,.5 L.5,0",Ft[3]="M0,.5 L1,.5 M.5,.5 L.5,1",Ft),"╉":(Wt={},Wt[1]="M.5,.5 L1,.5",Wt[3]="M.5,0 L.5,1 M.5,.5 L0,.5",Wt),"╊":(Ut={},Ut[1]="M.5,.5 L0,.5",Ut[3]="M.5,0 L.5,1 M.5,.5 L1,.5",Ut),"╌":(Xt={},Xt[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Xt),"╍":(Jt={},Jt[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Jt),"┄":($t={},$t[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",$t),"┅":(Qt={},Qt[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",Qt),"┈":(er={},er[1]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",er),"┉":(tr={},tr[3]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",tr),"╎":(rr={},rr[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",rr),"╏":(ir={},ir[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",ir),"┆":(nr={},nr[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",nr),"┇":(or={},or[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",or),"┊":(sr={},sr[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",sr),"┋":(ar={},ar[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",ar),"╭":(cr={},cr[1]="C.5,1,.5,.5,1,.5",cr),"╮":(lr={},lr[1]="C.5,1,.5,.5,0,.5",lr),"╯":(hr={},hr[1]="C.5,0,.5,.5,0,.5",hr),"╰":(ur={},ur[1]="C.5,0,.5,.5,1,.5",ur)},o.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0},"":{d:"M0,0 L1,.5 L0,1",type:1,horizontalPadding:.5},"":{d:"M1,0 L0,.5 L1,1",type:0},"":{d:"M1,0 L0,.5 L1,1",type:1,horizontalPadding:.5}},o.tryDrawCustomChar=function(I,H,de,me,Ee,Se){var le=o.blockElementDefinitions[H];if(le)return function(se,be,Ie,He,Te,Be){for(var _e=0;_e<be.length;_e++){var pe=be[_e],ie=Te/8,ve=Be/8;se.fillRect(Ie+pe.x*ie,He+pe.y*ve,pe.w*ie,pe.h*ve)}}(I,le,de,me,Ee,Se),!0;var Ce=Nr[H];if(Ce)return function(se,be,Ie,He,Te,Be){var _e,pe=br.get(be);pe||(pe=new Map,br.set(be,pe));var ie=se.fillStyle;if(typeof ie!="string")throw new Error('Unexpected fillStyle type "'+ie+'"');var ve=pe.get(ie);if(!ve){var ge=be[0].length,we=be.length,Re=document.createElement("canvas");Re.width=ge,Re.height=we;var je=(0,mr.throwIfFalsy)(Re.getContext("2d")),Le=new ImageData(ge,we),We=void 0,Pe=void 0,Oe=void 0,Ue=void 0;if(ie.startsWith("#"))We=parseInt(ie.slice(1,3),16),Pe=parseInt(ie.slice(3,5),16),Oe=parseInt(ie.slice(5,7),16),Ue=ie.length>7&&parseInt(ie.slice(7,9),16)||1;else{if(!ie.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+ie+'" when drawing pattern glyph');We=(_e=yr(ie.substring(5,ie.length-1).split(",").map(function(Ne){return parseFloat(Ne)}),4))[0],Pe=_e[1],Oe=_e[2],Ue=_e[3]}for(var Ae=0;Ae<we;Ae++)for(var Me=0;Me<ge;Me++)Le.data[4*(Ae*ge+Me)]=We,Le.data[4*(Ae*ge+Me)+1]=Pe,Le.data[4*(Ae*ge+Me)+2]=Oe,Le.data[4*(Ae*ge+Me)+3]=be[Ae][Me]*(255*Ue);je.putImageData(Le,0,0),ve=(0,mr.throwIfFalsy)(se.createPattern(Re,null)),pe.set(ie,ve)}se.fillStyle=ve,se.fillRect(Ie,He,Te,Be)}(I,Ce,de,me,Ee,Se),!0;var ke=o.boxDrawingDefinitions[H];if(ke)return function(se,be,Ie,He,Te,Be){var _e,pe,ie,ve;se.strokeStyle=se.fillStyle;try{for(var ge=fr(Object.entries(be)),we=ge.next();!we.done;we=ge.next()){var Re=yr(we.value,2),je=Re[0],Le=Re[1];se.beginPath(),se.lineWidth=window.devicePixelRatio*Number.parseInt(je);var We=void 0;We=typeof Le=="function"?Le(.15,.15/Be*Te):Le;try{for(var Pe=(ie=void 0,fr(We.split(" "))),Oe=Pe.next();!Oe.done;Oe=Pe.next()){var Ue=Oe.value,Ae=Ue[0],Me=Cr[Ae];if(Me){var Ne=Ue.substring(1).split(",");Ne[0]&&Ne[1]&&Me(se,wr(Ne,Te,Be,Ie,He))}else console.error('Could not find drawing instructions for "'+Ae+'"')}}catch(dr){ie={error:dr}}finally{try{Oe&&!Oe.done&&(ve=Pe.return)&&ve.call(Pe)}finally{if(ie)throw ie.error}}se.stroke(),se.closePath()}}catch(dr){_e={error:dr}}finally{try{we&&!we.done&&(pe=ge.return)&&pe.call(ge)}finally{if(_e)throw _e.error}}}(I,ke,de,me,Ee,Se),!0;var qe=o.powerlineDefinitions[H];return!!qe&&(function(se,be,Ie,He,Te,Be){var _e,pe;se.beginPath(),se.lineWidth=window.devicePixelRatio;try{for(var ie=fr(be.d.split(" ")),ve=ie.next();!ve.done;ve=ie.next()){var ge=ve.value,we=ge[0],Re=Cr[we];if(Re){var je=ge.substring(1).split(",");je[0]&&je[1]&&Re(se,wr(je,Te,Be,Ie,He,be.horizontalPadding))}else console.error('Could not find drawing instructions for "'+we+'"')}}catch(Le){_e={error:Le}}finally{try{ve&&!ve.done&&(pe=ie.return)&&pe.call(ie)}finally{if(_e)throw _e.error}}be.type===1?(se.strokeStyle=se.fillStyle,se.stroke()):se.fill(),se.closePath()}(I,qe,de,me,Ee,Se),!0)};var br=new Map;function Sr(I,H,de){return Math.max(Math.min(I,H),de)}var Cr={C:function(I,H){return I.bezierCurveTo(H[0],H[1],H[2],H[3],H[4],H[5])},L:function(I,H){return I.lineTo(H[0],H[1])},M:function(I,H){return I.moveTo(H[0],H[1])}};function wr(I,H,de,me,Ee,Se){Se===void 0&&(Se=0);var le=I.map(function(qe){return parseFloat(qe)||parseInt(qe)});if(le.length<2)throw new Error("Too few arguments for instruction");for(var Ce=0;Ce<le.length;Ce+=2)le[Ce]*=H-2*Se*window.devicePixelRatio,le[Ce]!==0&&(le[Ce]=Sr(Math.round(le[Ce]+.5)-.5,H,0)),le[Ce]+=me+Se*window.devicePixelRatio;for(var ke=1;ke<le.length;ke+=2)le[ke]*=de,le[ke]!==0&&(le[ke]=Sr(Math.round(le[ke]+.5)-.5,de,0)),le[ke]+=Ee;return le}},3700:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.GridCache=void 0;var b=function(){function f(){this.cache=[]}return f.prototype.resize=function(u,d){for(var _=0;_<u;_++){this.cache.length<=_&&this.cache.push([]);for(var m=this.cache[_].length;m<d;m++)this.cache[_].push(void 0);this.cache[_].length=d}this.cache.length=u},f.prototype.clear=function(){for(var u=0;u<this.cache.length;u++)for(var d=0;d<this.cache[u].length;d++)this.cache[u][d]=void 0},f}();o.GridCache=b},5098:function(P,o,b){var f,u=this&&this.__extends||(f=function(h,r){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},f(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}f(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),d=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var c=h.length-1;c>=0;c--)(i=h[c])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},_=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.LinkRenderLayer=void 0;var m=b(1546),v=b(8803),s=b(2040),a=b(2585),p=function(h){function r(e,t,i,n,l,c,g,C,y){var S=h.call(this,e,"link",t,!0,i,n,g,C,y)||this;return l.onShowLinkUnderline(function(w){return S._onShowLinkUnderline(w)}),l.onHideLinkUnderline(function(w){return S._onHideLinkUnderline(w)}),c.onShowLinkUnderline(function(w){return S._onShowLinkUnderline(w)}),c.onHideLinkUnderline(function(w){return S._onHideLinkUnderline(w)}),S}return u(r,h),r.prototype.resize=function(e){h.prototype.resize.call(this,e),this._state=void 0},r.prototype.reset=function(){this._clearCurrentLink()},r.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},r.prototype._onShowLinkUnderline=function(e){if(e.fg===v.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:e.fg&&(0,s.is256Color)(e.fg)?this._ctx.fillStyle=this._colors.ansi[e.fg].css:this._ctx.fillStyle=this._colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(var t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e},r.prototype._onHideLinkUnderline=function(e){this._clearCurrentLink()},d([_(6,a.IBufferService),_(7,a.IOptionsService),_(8,a.IDecorationService)],r)}(m.BaseRenderLayer);o.LinkRenderLayer=p},3525:function(P,o,b){var f,u=this&&this.__extends||(f=function(c,g){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,y){C.__proto__=y}||function(C,y){for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&(C[S]=y[S])},f(c,g)},function(c,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function C(){this.constructor=c}f(c,g),c.prototype=g===null?Object.create(g):(C.prototype=g.prototype,new C)}),d=this&&this.__decorate||function(c,g,C,y){var S,w=arguments.length,R=w<3?g:y===null?y=Object.getOwnPropertyDescriptor(g,C):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(c,g,C,y);else for(var L=c.length-1;L>=0;L--)(S=c[L])&&(R=(w<3?S(R):w>3?S(g,C,R):S(g,C))||R);return w>3&&R&&Object.defineProperty(g,C,R),R},_=this&&this.__param||function(c,g){return function(C,y){g(C,y,c)}},m=this&&this.__values||function(c){var g=typeof Symbol=="function"&&Symbol.iterator,C=g&&c[g],y=0;if(C)return C.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&y>=c.length&&(c=void 0),{value:c&&c[y++],done:!c}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.Renderer=void 0;var v=b(9596),s=b(4149),a=b(2512),p=b(5098),h=b(844),r=b(4725),e=b(2585),t=b(1420),i=b(8460),n=1,l=function(c){function g(C,y,S,w,R,L,k,E){var x=c.call(this)||this;x._colors=C,x._screenElement=y,x._bufferService=L,x._charSizeService=k,x._optionsService=E,x._id=n++,x._onRequestRedraw=new i.EventEmitter;var M=x._optionsService.rawOptions.allowTransparency;return x._renderLayers=[R.createInstance(v.TextRenderLayer,x._screenElement,0,x._colors,M,x._id),R.createInstance(s.SelectionRenderLayer,x._screenElement,1,x._colors,x._id),R.createInstance(p.LinkRenderLayer,x._screenElement,2,x._colors,x._id,S,w),R.createInstance(a.CursorRenderLayer,x._screenElement,3,x._colors,x._id,x._onRequestRedraw)],x.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},x._devicePixelRatio=window.devicePixelRatio,x._updateDimensions(),x.onOptionsChanged(),x}return u(g,c),Object.defineProperty(g.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),g.prototype.dispose=function(){var C,y;try{for(var S=m(this._renderLayers),w=S.next();!w.done;w=S.next())w.value.dispose()}catch(R){C={error:R}}finally{try{w&&!w.done&&(y=S.return)&&y.call(S)}finally{if(C)throw C.error}}c.prototype.dispose.call(this),(0,t.removeTerminalFromCache)(this._id)},g.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},g.prototype.setColors=function(C){var y,S;this._colors=C;try{for(var w=m(this._renderLayers),R=w.next();!R.done;R=w.next()){var L=R.value;L.setColors(this._colors),L.reset()}}catch(k){y={error:k}}finally{try{R&&!R.done&&(S=w.return)&&S.call(w)}finally{if(y)throw y.error}}},g.prototype.onResize=function(C,y){var S,w;this._updateDimensions();try{for(var R=m(this._renderLayers),L=R.next();!L.done;L=R.next())L.value.resize(this.dimensions)}catch(k){S={error:k}}finally{try{L&&!L.done&&(w=R.return)&&w.call(R)}finally{if(S)throw S.error}}this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},g.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},g.prototype.onBlur=function(){this._runOperation(function(C){return C.onBlur()})},g.prototype.onFocus=function(){this._runOperation(function(C){return C.onFocus()})},g.prototype.onSelectionChanged=function(C,y,S){S===void 0&&(S=!1),this._runOperation(function(w){return w.onSelectionChanged(C,y,S)}),this._colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})},g.prototype.onCursorMove=function(){this._runOperation(function(C){return C.onCursorMove()})},g.prototype.onOptionsChanged=function(){this._runOperation(function(C){return C.onOptionsChanged()})},g.prototype.clear=function(){this._runOperation(function(C){return C.reset()})},g.prototype._runOperation=function(C){var y,S;try{for(var w=m(this._renderLayers),R=w.next();!R.done;R=w.next())C(R.value)}catch(L){y={error:L}}finally{try{R&&!R.done&&(S=w.return)&&S.call(w)}finally{if(y)throw y.error}}},g.prototype.renderRows=function(C,y){var S,w;try{for(var R=m(this._renderLayers),L=R.next();!L.done;L=R.next())L.value.onGridChanged(C,y)}catch(k){S={error:k}}finally{try{L&&!L.done&&(w=R.return)&&w.call(R)}finally{if(S)throw S.error}}},g.prototype.clearTextureAtlas=function(){var C,y;try{for(var S=m(this._renderLayers),w=S.next();!w.done;w=S.next())w.value.clearTextureAtlas()}catch(R){C={error:R}}finally{try{w&&!w.done&&(y=S.return)&&y.call(S)}finally{if(C)throw C.error}}},g.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharTop=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},d([_(4,e.IInstantiationService),_(5,e.IBufferService),_(6,r.ICharSizeService),_(7,e.IOptionsService)],g)}(h.Disposable);o.Renderer=l},1752:(P,o)=>{function b(f){return 57508<=f&&f<=57558}Object.defineProperty(o,"__esModule",{value:!0}),o.excludeFromContrastRatioDemands=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(f){if(!f)throw new Error("value must not be falsy");return f},o.isPowerlineGlyph=b,o.excludeFromContrastRatioDemands=function(f){return b(f)||function(u){return 9472<=u&&u<=9631}(f)}},4149:function(P,o,b){var f,u=this&&this.__extends||(f=function(a,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,r){h.__proto__=r}||function(h,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(h[e]=r[e])},f(a,p)},function(a,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function h(){this.constructor=a}f(a,p),a.prototype=p===null?Object.create(p):(h.prototype=p.prototype,new h)}),d=this&&this.__decorate||function(a,p,h,r){var e,t=arguments.length,i=t<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,h):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,p,h,r);else for(var n=a.length-1;n>=0;n--)(e=a[n])&&(i=(t<3?e(i):t>3?e(p,h,i):e(p,h))||i);return t>3&&i&&Object.defineProperty(p,h,i),i},_=this&&this.__param||function(a,p){return function(h,r){p(h,r,a)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionRenderLayer=void 0;var m=b(1546),v=b(2585),s=function(a){function p(h,r,e,t,i,n,l){var c=a.call(this,h,"selection",r,!0,e,t,i,n,l)||this;return c._clearState(),c}return u(p,a),p.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},p.prototype.resize=function(h){a.prototype.resize.call(this,h),this._clearState()},p.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},p.prototype.onSelectionChanged=function(h,r,e){if(a.prototype.onSelectionChanged.call(this,h,r,e),this._didStateChange(h,r,e,this._bufferService.buffer.ydisp))if(this._clearAll(),h&&r){var t=h[1]-this._bufferService.buffer.ydisp,i=r[1]-this._bufferService.buffer.ydisp,n=Math.max(t,0),l=Math.min(i,this._bufferService.rows-1);if(n>=this._bufferService.rows||l<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=this._colors.selectionTransparent.css,e){var c=h[0],g=r[0]-c,C=l-n+1;this._fillCells(c,n,g,C)}else{c=t===n?h[0]:0;var y=n===i?r[0]:this._bufferService.cols;this._fillCells(c,n,y-c,1);var S=Math.max(l-n-1,0);if(this._fillCells(0,n+1,this._bufferService.cols,S),n!==l){var w=i===l?r[0]:this._bufferService.cols;this._fillCells(0,l,w,1)}}this._state.start=[h[0],h[1]],this._state.end=[r[0],r[1]],this._state.columnSelectMode=e,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},p.prototype._didStateChange=function(h,r,e,t){return!this._areCoordinatesEqual(h,this._state.start)||!this._areCoordinatesEqual(r,this._state.end)||e!==this._state.columnSelectMode||t!==this._state.ydisp},p.prototype._areCoordinatesEqual=function(h,r){return!(!h||!r)&&h[0]===r[0]&&h[1]===r[1]},d([_(4,v.IBufferService),_(5,v.IOptionsService),_(6,v.IDecorationService)],p)}(m.BaseRenderLayer);o.SelectionRenderLayer=s},9596:function(P,o,b){var f,u=this&&this.__extends||(f=function(n,l){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,g){c.__proto__=g}||function(c,g){for(var C in g)Object.prototype.hasOwnProperty.call(g,C)&&(c[C]=g[C])},f(n,l)},function(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function c(){this.constructor=n}f(n,l),n.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}),d=this&&this.__decorate||function(n,l,c,g){var C,y=arguments.length,S=y<3?l:g===null?g=Object.getOwnPropertyDescriptor(l,c):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(n,l,c,g);else for(var w=n.length-1;w>=0;w--)(C=n[w])&&(S=(y<3?C(S):y>3?C(l,c,S):C(l,c))||S);return y>3&&S&&Object.defineProperty(l,c,S),S},_=this&&this.__param||function(n,l){return function(c,g){l(c,g,n)}},m=this&&this.__values||function(n){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&n[l],g=0;if(c)return c.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&g>=n.length&&(n=void 0),{value:n&&n[g++],done:!n}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.TextRenderLayer=void 0;var v=b(3700),s=b(1546),a=b(3734),p=b(643),h=b(511),r=b(2585),e=b(4725),t=b(4269),i=function(n){function l(c,g,C,y,S,w,R,L,k){var E=n.call(this,c,"text",g,y,C,S,w,R,k)||this;return E._characterJoinerService=L,E._characterWidth=0,E._characterFont="",E._characterOverlapCache={},E._workCell=new h.CellData,E._state=new v.GridCache,E}return u(l,n),l.prototype.resize=function(c){n.prototype.resize.call(this,c);var g=this._getFont(!1,!1);this._characterWidth===c.scaledCharWidth&&this._characterFont===g||(this._characterWidth=c.scaledCharWidth,this._characterFont=g,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},l.prototype.reset=function(){this._state.clear(),this._clearAll()},l.prototype._forEachCell=function(c,g,C){for(var y=c;y<=g;y++)for(var S=y+this._bufferService.buffer.ydisp,w=this._bufferService.buffer.lines.get(S),R=this._characterJoinerService.getJoinedCharacters(S),L=0;L<this._bufferService.cols;L++){w.loadCell(L,this._workCell);var k=this._workCell,E=!1,x=L;if(k.getWidth()!==0){if(R.length>0&&L===R[0][0]){E=!0;var M=R.shift();k=new t.JoinedCellData(this._workCell,w.translateToString(!0,M[0],M[1]),M[1]-M[0]),x=M[1]-1}!E&&this._isOverlapping(k)&&x<w.length-1&&w.getCodePoint(x+1)===p.NULL_CELL_CODE&&(k.content&=-12582913,k.content|=2<<22),C(k,L,y),L=x}}},l.prototype._drawBackground=function(c,g){var C=this,y=this._ctx,S=this._bufferService.cols,w=0,R=0,L=null;y.save(),this._forEachCell(c,g,function(k,E,x){var M,T,U=null;k.isInverse()?U=k.isFgDefault()?C._colors.foreground.css:k.isFgRGB()?"rgb("+a.AttributeData.toColorRGB(k.getFgColor()).join(",")+")":C._colors.ansi[k.getFgColor()].css:k.isBgRGB()?U="rgb("+a.AttributeData.toColorRGB(k.getBgColor()).join(",")+")":k.isBgPalette()&&(U=C._colors.ansi[k.getBgColor()].css);var q=!1;try{for(var F=m(C._decorationService.getDecorationsAtCell(E,C._bufferService.buffer.ydisp+x)),z=F.next();!z.done;z=F.next()){var N=z.value;N.options.layer!=="top"&&q||(N.backgroundColorRGB&&(U=N.backgroundColorRGB.css),q=N.options.layer==="top")}}catch(A){M={error:A}}finally{try{z&&!z.done&&(T=F.return)&&T.call(F)}finally{if(M)throw M.error}}L===null&&(w=E,R=x),x!==R?(y.fillStyle=L||"",C._fillCells(w,R,S-w,1),w=E,R=x):L!==U&&(y.fillStyle=L||"",C._fillCells(w,R,E-w,1),w=E,R=x),L=U}),L!==null&&(y.fillStyle=L,this._fillCells(w,R,S-w,1)),y.restore()},l.prototype._drawForeground=function(c,g){var C=this;this._forEachCell(c,g,function(y,S,w){if(!y.isInvisible()&&(C._drawChars(y,S,w),y.isUnderline()||y.isStrikethrough())){if(C._ctx.save(),y.isInverse())if(y.isBgDefault())C._ctx.fillStyle=C._colors.background.css;else if(y.isBgRGB())C._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(y.getBgColor()).join(",")+")";else{var R=y.getBgColor();C._optionsService.rawOptions.drawBoldTextInBrightColors&&y.isBold()&&R<8&&(R+=8),C._ctx.fillStyle=C._colors.ansi[R].css}else if(y.isFgDefault())C._ctx.fillStyle=C._colors.foreground.css;else if(y.isFgRGB())C._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(y.getFgColor()).join(",")+")";else{var L=y.getFgColor();C._optionsService.rawOptions.drawBoldTextInBrightColors&&y.isBold()&&L<8&&(L+=8),C._ctx.fillStyle=C._colors.ansi[L].css}y.isStrikethrough()&&C._fillMiddleLineAtCells(S,w,y.getWidth()),y.isUnderline()&&C._fillBottomLineAtCells(S,w,y.getWidth()),C._ctx.restore()}})},l.prototype.onGridChanged=function(c,g){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,c,this._bufferService.cols,g-c+1),this._drawBackground(c,g),this._drawForeground(c,g))},l.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.rawOptions.allowTransparency)},l.prototype._isOverlapping=function(c){if(c.getWidth()!==1||c.getCode()<256)return!1;var g=c.getChars();if(this._characterOverlapCache.hasOwnProperty(g))return this._characterOverlapCache[g];this._ctx.save(),this._ctx.font=this._characterFont;var C=Math.floor(this._ctx.measureText(g).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[g]=C,C},d([_(5,r.IBufferService),_(6,r.IOptionsService),_(7,e.ICharacterJoinerService),_(8,r.IDecorationService)],l)}(s.BaseRenderLayer);o.TextRenderLayer=i},9616:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BaseCharAtlas=void 0;var b=function(){function f(){this._didWarmUp=!1}return f.prototype.dispose=function(){},f.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},f.prototype._doWarmUp=function(){},f.prototype.clear=function(){},f.prototype.beginFrame=function(){},f}();o.BaseCharAtlas=b},1420:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.removeTerminalFromCache=o.acquireCharAtlas=void 0;var f=b(2040),u=b(1906),d=[];o.acquireCharAtlas=function(_,m,v,s,a){for(var p=(0,f.generateConfig)(s,a,_,v),h=0;h<d.length;h++){var r=(e=d[h]).ownedBy.indexOf(m);if(r>=0){if((0,f.configEquals)(e.config,p))return e.atlas;e.ownedBy.length===1?(e.atlas.dispose(),d.splice(h,1)):e.ownedBy.splice(r,1);break}}for(h=0;h<d.length;h++){var e=d[h];if((0,f.configEquals)(e.config,p))return e.ownedBy.push(m),e.atlas}var t={atlas:new u.DynamicCharAtlas(document,p),config:p,ownedBy:[m]};return d.push(t),t.atlas},o.removeTerminalFromCache=function(_){for(var m=0;m<d.length;m++){var v=d[m].ownedBy.indexOf(_);if(v!==-1){d[m].ownedBy.length===1?(d[m].atlas.dispose(),d.splice(m,1)):d[m].ownedBy.splice(v,1);break}}}},2040:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.is256Color=o.configEquals=o.generateConfig=void 0;var f=b(643);o.generateConfig=function(u,d,_,m){var v={foreground:m.foreground,background:m.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:m.ansi.slice()};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:u,scaledCharHeight:d,fontFamily:_.fontFamily,fontSize:_.fontSize,fontWeight:_.fontWeight,fontWeightBold:_.fontWeightBold,allowTransparency:_.allowTransparency,colors:v}},o.configEquals=function(u,d){for(var _=0;_<u.colors.ansi.length;_++)if(u.colors.ansi[_].rgba!==d.colors.ansi[_].rgba)return!1;return u.devicePixelRatio===d.devicePixelRatio&&u.fontFamily===d.fontFamily&&u.fontSize===d.fontSize&&u.fontWeight===d.fontWeight&&u.fontWeightBold===d.fontWeightBold&&u.allowTransparency===d.allowTransparency&&u.scaledCharWidth===d.scaledCharWidth&&u.scaledCharHeight===d.scaledCharHeight&&u.colors.foreground===d.colors.foreground&&u.colors.background===d.colors.background},o.is256Color=function(u){return u<f.DEFAULT_COLOR}},8803:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CHAR_ATLAS_CELL_SPACING=o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;var f=b(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic",o.CHAR_ATLAS_CELL_SPACING=1},1906:function(P,o,b){var f,u=this&&this.__extends||(f=function(c,g){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,y){C.__proto__=y}||function(C,y){for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&(C[S]=y[S])},f(c,g)},function(c,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function C(){this.constructor=c}f(c,g),c.prototype=g===null?Object.create(g):(C.prototype=g.prototype,new C)});Object.defineProperty(o,"__esModule",{value:!0}),o.NoneCharAtlas=o.DynamicCharAtlas=o.getGlyphCacheKey=void 0;var d=b(8803),_=b(9616),m=b(5680),v=b(7001),s=b(6114),a=b(1752),p=b(8055),h=1024,r=1024,e={css:"rgba(0, 0, 0, 0)",rgba:0};function t(c){return c.code<<21|c.bg<<12|c.fg<<3|(c.bold?0:4)+(c.dim?0:2)+(c.italic?0:1)}o.getGlyphCacheKey=t;var i=function(c){function g(C,y){var S=c.call(this)||this;S._config=y,S._drawToCacheCount=0,S._glyphsWaitingOnBitmap=[],S._bitmapCommitTimeout=null,S._bitmap=null,S._cacheCanvas=C.createElement("canvas"),S._cacheCanvas.width=h,S._cacheCanvas.height=r,S._cacheCtx=(0,a.throwIfFalsy)(S._cacheCanvas.getContext("2d",{alpha:!0}));var w=C.createElement("canvas");w.width=S._config.scaledCharWidth,w.height=S._config.scaledCharHeight,S._tmpCtx=(0,a.throwIfFalsy)(w.getContext("2d",{alpha:S._config.allowTransparency})),S._width=Math.floor(h/S._config.scaledCharWidth),S._height=Math.floor(r/S._config.scaledCharHeight);var R=S._width*S._height;return S._cacheMap=new v.LRUMap(R),S._cacheMap.prealloc(R),S}return u(g,c),g.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},g.prototype.beginFrame=function(){this._drawToCacheCount=0},g.prototype.clear=function(){if(this._cacheMap.size>0){var C=this._width*this._height;this._cacheMap=new v.LRUMap(C),this._cacheMap.prealloc(C)}this._cacheCtx.clearRect(0,0,h,r),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)},g.prototype.draw=function(C,y,S,w){if(y.code===32)return!0;if(!this._canCache(y))return!1;var R=t(y),L=this._cacheMap.get(R);if(L!=null)return this._drawFromCache(C,L,S,w),!0;if(this._drawToCacheCount<100){var k;k=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var E=this._drawToCache(y,k);return this._cacheMap.set(R,E),this._drawFromCache(C,E,S,w),!0}return!1},g.prototype._canCache=function(C){return C.code<256},g.prototype._toCoordinateX=function(C){return C%this._width*this._config.scaledCharWidth},g.prototype._toCoordinateY=function(C){return Math.floor(C/this._width)*this._config.scaledCharHeight},g.prototype._drawFromCache=function(C,y,S,w){if(!y.isEmpty){var R=this._toCoordinateX(y.index),L=this._toCoordinateY(y.index);C.drawImage(y.inBitmap?this._bitmap:this._cacheCanvas,R,L,this._config.scaledCharWidth,this._config.scaledCharHeight,S,w,this._config.scaledCharWidth,this._config.scaledCharHeight)}},g.prototype._getColorFromAnsiIndex=function(C){return C<this._config.colors.ansi.length?this._config.colors.ansi[C]:m.DEFAULT_ANSI_COLORS[C]},g.prototype._getBackgroundColor=function(C){return this._config.allowTransparency?e:C.bg===d.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:C.bg<256?this._getColorFromAnsiIndex(C.bg):this._config.colors.background},g.prototype._getForegroundColor=function(C){return C.fg===d.INVERTED_DEFAULT_COLOR?p.color.opaque(this._config.colors.background):C.fg<256?this._getColorFromAnsiIndex(C.fg):this._config.colors.foreground},g.prototype._drawToCache=function(C,y){this._drawToCacheCount++,this._tmpCtx.save();var S=this._getBackgroundColor(C);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=S.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var w=C.bold?this._config.fontWeightBold:this._config.fontWeight,R=C.italic?"italic":"";this._tmpCtx.font=R+" "+w+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline=d.TEXT_BASELINE,this._tmpCtx.fillStyle=this._getForegroundColor(C).css,C.dim&&(this._tmpCtx.globalAlpha=d.DIM_OPACITY),this._tmpCtx.fillText(C.chars,0,this._config.scaledCharHeight);var L=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),k=!1;if(this._config.allowTransparency||(k=l(L,S)),k&&C.chars==="_"&&!this._config.allowTransparency)for(var E=1;E<=5&&(this._tmpCtx.fillText(C.chars,0,this._config.scaledCharHeight-E),k=l(L=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),S));E++);this._tmpCtx.restore();var x=this._toCoordinateX(y),M=this._toCoordinateY(y);this._cacheCtx.putImageData(L,x,M);var T={index:y,isEmpty:k,inBitmap:!1};return this._addGlyphToBitmap(T),T},g.prototype._addGlyphToBitmap=function(C){var y=this;!("createImageBitmap"in window)||s.isFirefox||s.isSafari||(this._glyphsWaitingOnBitmap.push(C),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return y._generateBitmap()},100)))},g.prototype._generateBitmap=function(){var C=this,y=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(S){C._bitmap=S;for(var w=0;w<y.length;w++)y[w].inBitmap=!0}),this._bitmapCommitTimeout=null},g}(_.BaseCharAtlas);o.DynamicCharAtlas=i;var n=function(c){function g(C,y){return c.call(this)||this}return u(g,c),g.prototype.draw=function(C,y,S,w){return!1},g}(_.BaseCharAtlas);function l(c,g){for(var C=!0,y=g.rgba>>>24,S=g.rgba>>>16&255,w=g.rgba>>>8&255,R=0;R<c.data.length;R+=4)c.data[R]===y&&c.data[R+1]===S&&c.data[R+2]===w?c.data[R+3]=0:C=!1;return C}o.NoneCharAtlas=n},7001:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LRUMap=void 0;var b=function(){function f(u){this.capacity=u,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return f.prototype._unlinkNode=function(u){var d=u.prev,_=u.next;u===this._head&&(this._head=_),u===this._tail&&(this._tail=d),d!==null&&(d.next=_),_!==null&&(_.prev=d)},f.prototype._appendNode=function(u){var d=this._tail;d!==null&&(d.next=u),u.prev=d,u.next=null,this._tail=u,this._head===null&&(this._head=u)},f.prototype.prealloc=function(u){for(var d=this._nodePool,_=0;_<u;_++)d.push({prev:null,next:null,key:null,value:null})},f.prototype.get=function(u){var d=this._map[u];return d!==void 0?(this._unlinkNode(d),this._appendNode(d),d.value):null},f.prototype.peekValue=function(u){var d=this._map[u];return d!==void 0?d.value:null},f.prototype.peek=function(){var u=this._head;return u===null?null:u.value},f.prototype.set=function(u,d){var _=this._map[u];if(_!==void 0)_=this._map[u],this._unlinkNode(_),_.value=d;else if(this.size>=this.capacity)_=this._head,this._unlinkNode(_),delete this._map[_.key],_.key=u,_.value=d,this._map[u]=_;else{var m=this._nodePool;m.length>0?((_=m.pop()).key=u,_.value=d):_={prev:null,next:null,key:u,value:d},this._map[u]=_,this.size++}this._appendNode(_)},f}();o.LRUMap=b},1296:function(P,o,b){var f,u=this&&this.__extends||(f=function(y,S){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,R){w.__proto__=R}||function(w,R){for(var L in R)Object.prototype.hasOwnProperty.call(R,L)&&(w[L]=R[L])},f(y,S)},function(y,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function w(){this.constructor=y}f(y,S),y.prototype=S===null?Object.create(S):(w.prototype=S.prototype,new w)}),d=this&&this.__decorate||function(y,S,w,R){var L,k=arguments.length,E=k<3?S:R===null?R=Object.getOwnPropertyDescriptor(S,w):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(y,S,w,R);else for(var x=y.length-1;x>=0;x--)(L=y[x])&&(E=(k<3?L(E):k>3?L(S,w,E):L(S,w))||E);return k>3&&E&&Object.defineProperty(S,w,E),E},_=this&&this.__param||function(y,S){return function(w,R){S(w,R,y)}},m=this&&this.__values||function(y){var S=typeof Symbol=="function"&&Symbol.iterator,w=S&&y[S],R=0;if(w)return w.call(y);if(y&&typeof y.length=="number")return{next:function(){return y&&R>=y.length&&(y=void 0),{value:y&&y[R++],done:!y}}};throw new TypeError(S?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;var v=b(3787),s=b(8803),a=b(844),p=b(4725),h=b(2585),r=b(8460),e=b(8055),t=b(9631),i="xterm-dom-renderer-owner-",n="xterm-fg-",l="xterm-bg-",c="xterm-focus",g=1,C=function(y){function S(w,R,L,k,E,x,M,T,U,q){var F=y.call(this)||this;return F._colors=w,F._element=R,F._screenElement=L,F._viewportElement=k,F._linkifier=E,F._linkifier2=x,F._charSizeService=T,F._optionsService=U,F._bufferService=q,F._terminalClass=g++,F._rowElements=[],F._rowContainer=document.createElement("div"),F._rowContainer.classList.add("xterm-rows"),F._rowContainer.style.lineHeight="normal",F._rowContainer.setAttribute("aria-hidden","true"),F._refreshRowElements(F._bufferService.cols,F._bufferService.rows),F._selectionContainer=document.createElement("div"),F._selectionContainer.classList.add("xterm-selection"),F._selectionContainer.setAttribute("aria-hidden","true"),F.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},F._updateDimensions(),F._injectCss(),F._rowFactory=M.createInstance(v.DomRendererRowFactory,document,F._colors),F._element.classList.add(i+F._terminalClass),F._screenElement.appendChild(F._rowContainer),F._screenElement.appendChild(F._selectionContainer),F.register(F._linkifier.onShowLinkUnderline(function(z){return F._onLinkHover(z)})),F.register(F._linkifier.onHideLinkUnderline(function(z){return F._onLinkLeave(z)})),F.register(F._linkifier2.onShowLinkUnderline(function(z){return F._onLinkHover(z)})),F.register(F._linkifier2.onHideLinkUnderline(function(z){return F._onLinkLeave(z)})),F}return u(S,y),Object.defineProperty(S.prototype,"onRequestRedraw",{get:function(){return new r.EventEmitter().event},enumerable:!1,configurable:!0}),S.prototype.dispose=function(){this._element.classList.remove(i+this._terminalClass),(0,t.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),y.prototype.dispose.call(this)},S.prototype._updateDimensions=function(){var w,R;this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;try{for(var L=m(this._rowElements),k=L.next();!k.done;k=L.next()){var E=k.value;E.style.width=this.dimensions.canvasWidth+"px",E.style.height=this.dimensions.actualCellHeight+"px",E.style.lineHeight=this.dimensions.actualCellHeight+"px",E.style.overflow="hidden"}}catch(M){w={error:M}}finally{try{k&&!k.done&&(R=L.return)&&R.call(L)}finally{if(w)throw w.error}}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var x=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.textContent=x,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},S.prototype.setColors=function(w){this._colors=w,this._injectCss()},S.prototype._injectCss=function(){var w=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var R=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.rawOptions.fontFamily+"; font-size: "+this._optionsService.rawOptions.fontSize+"px;}";R+=this._terminalSelector+" span:not(."+v.BOLD_CLASS+") { font-weight: "+this._optionsService.rawOptions.fontWeight+";}"+this._terminalSelector+" span."+v.BOLD_CLASS+" { font-weight: "+this._optionsService.rawOptions.fontWeightBold+";}"+this._terminalSelector+" span."+v.ITALIC_CLASS+" { font-style: italic;}",R+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",R+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",R+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+v.CURSOR_CLASS+"."+v.CURSOR_BLINK_CLASS+":not(."+v.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+v.CURSOR_CLASS+"."+v.CURSOR_BLINK_CLASS+"."+v.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.rawOptions.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",R+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionOpaque.css+";}",this._colors.ansi.forEach(function(L,k){R+=w._terminalSelector+" ."+n+k+" { color: "+L.css+"; }"+w._terminalSelector+" ."+l+k+" { background-color: "+L.css+"; }"}),R+=this._terminalSelector+" ."+n+s.INVERTED_DEFAULT_COLOR+" { color: "+e.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" ."+l+s.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.textContent=R},S.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},S.prototype._refreshRowElements=function(w,R){for(var L=this._rowElements.length;L<=R;L++){var k=document.createElement("div");this._rowContainer.appendChild(k),this._rowElements.push(k)}for(;this._rowElements.length>R;)this._rowContainer.removeChild(this._rowElements.pop())},S.prototype.onResize=function(w,R){this._refreshRowElements(w,R),this._updateDimensions()},S.prototype.onCharSizeChanged=function(){this._updateDimensions()},S.prototype.onBlur=function(){this._rowContainer.classList.remove(c)},S.prototype.onFocus=function(){this._rowContainer.classList.add(c)},S.prototype.onSelectionChanged=function(w,R,L){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(this._rowFactory.onSelectionChanged(w,R,L),this.renderRows(0,this._bufferService.rows-1),w&&R){var k=w[1]-this._bufferService.buffer.ydisp,E=R[1]-this._bufferService.buffer.ydisp,x=Math.max(k,0),M=Math.min(E,this._bufferService.rows-1);if(!(x>=this._bufferService.rows||M<0)){var T=document.createDocumentFragment();if(L){var U=w[0]>R[0];T.appendChild(this._createSelectionElement(x,U?R[0]:w[0],U?w[0]:R[0],M-x+1))}else{var q=k===x?w[0]:0,F=x===E?R[0]:this._bufferService.cols;T.appendChild(this._createSelectionElement(x,q,F));var z=M-x-1;if(T.appendChild(this._createSelectionElement(x+1,0,this._bufferService.cols,z)),x!==M){var N=E===M?R[0]:this._bufferService.cols;T.appendChild(this._createSelectionElement(M,0,N))}}this._selectionContainer.appendChild(T)}}},S.prototype._createSelectionElement=function(w,R,L,k){k===void 0&&(k=1);var E=document.createElement("div");return E.style.height=k*this.dimensions.actualCellHeight+"px",E.style.top=w*this.dimensions.actualCellHeight+"px",E.style.left=R*this.dimensions.actualCellWidth+"px",E.style.width=this.dimensions.actualCellWidth*(L-R)+"px",E},S.prototype.onCursorMove=function(){},S.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},S.prototype.clear=function(){var w,R;try{for(var L=m(this._rowElements),k=L.next();!k.done;k=L.next())k.value.innerText=""}catch(E){w={error:E}}finally{try{k&&!k.done&&(R=L.return)&&R.call(L)}finally{if(w)throw w.error}}},S.prototype.renderRows=function(w,R){for(var L=this._bufferService.buffer.ybase+this._bufferService.buffer.y,k=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),E=this._optionsService.rawOptions.cursorBlink,x=w;x<=R;x++){var M=this._rowElements[x];M.innerText="";var T=x+this._bufferService.buffer.ydisp,U=this._bufferService.buffer.lines.get(T),q=this._optionsService.rawOptions.cursorStyle;M.appendChild(this._rowFactory.createRow(U,T,T===L,q,k,E,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(S.prototype,"_terminalSelector",{get:function(){return"."+i+this._terminalClass},enumerable:!1,configurable:!0}),S.prototype._onLinkHover=function(w){this._setCellUnderline(w.x1,w.x2,w.y1,w.y2,w.cols,!0)},S.prototype._onLinkLeave=function(w){this._setCellUnderline(w.x1,w.x2,w.y1,w.y2,w.cols,!1)},S.prototype._setCellUnderline=function(w,R,L,k,E,x){for(;w!==R||L!==k;){var M=this._rowElements[L];if(!M)return;var T=M.children[w];T&&(T.style.textDecoration=x?"underline":"none"),++w>=E&&(w=0,L++)}},d([_(6,h.IInstantiationService),_(7,p.ICharSizeService),_(8,h.IOptionsService),_(9,h.IBufferService)],S)}(a.Disposable);o.DomRenderer=C},3787:function(P,o,b){var f=this&&this.__decorate||function(i,n,l,c){var g,C=arguments.length,y=C<3?n:c===null?c=Object.getOwnPropertyDescriptor(n,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(i,n,l,c);else for(var S=i.length-1;S>=0;S--)(g=i[S])&&(y=(C<3?g(y):C>3?g(n,l,y):g(n,l))||y);return C>3&&y&&Object.defineProperty(n,l,y),y},u=this&&this.__param||function(i,n){return function(l,c){n(l,c,i)}},d=this&&this.__values||function(i){var n=typeof Symbol=="function"&&Symbol.iterator,l=n&&i[n],c=0;if(l)return l.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&c>=i.length&&(i=void 0),{value:i&&i[c++],done:!i}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=o.CURSOR_STYLE_UNDERLINE_CLASS=o.CURSOR_STYLE_BAR_CLASS=o.CURSOR_STYLE_BLOCK_CLASS=o.CURSOR_BLINK_CLASS=o.CURSOR_CLASS=o.STRIKETHROUGH_CLASS=o.UNDERLINE_CLASS=o.ITALIC_CLASS=o.DIM_CLASS=o.BOLD_CLASS=void 0;var _=b(8803),m=b(643),v=b(511),s=b(2585),a=b(8055),p=b(4725),h=b(4269),r=b(1752);o.BOLD_CLASS="xterm-bold",o.DIM_CLASS="xterm-dim",o.ITALIC_CLASS="xterm-italic",o.UNDERLINE_CLASS="xterm-underline",o.STRIKETHROUGH_CLASS="xterm-strikethrough",o.CURSOR_CLASS="xterm-cursor",o.CURSOR_BLINK_CLASS="xterm-cursor-blink",o.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",o.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",o.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var e=function(){function i(n,l,c,g,C,y){this._document=n,this._colors=l,this._characterJoinerService=c,this._optionsService=g,this._coreService=C,this._decorationService=y,this._workCell=new v.CellData,this._columnSelectMode=!1}return i.prototype.setColors=function(n){this._colors=n},i.prototype.onSelectionChanged=function(n,l,c){this._selectionStart=n,this._selectionEnd=l,this._columnSelectMode=c},i.prototype.createRow=function(n,l,c,g,C,y,S,w){for(var R,L,k=this._document.createDocumentFragment(),E=this._characterJoinerService.getJoinedCharacters(l),x=0,M=Math.min(n.length,w)-1;M>=0;M--)if(n.loadCell(M,this._workCell).getCode()!==m.NULL_CELL_CODE||c&&M===C){x=M+1;break}for(M=0;M<x;M++){n.loadCell(M,this._workCell);var T=this._workCell.getWidth();if(T!==0){var U=!1,q=M,F=this._workCell;if(E.length>0&&M===E[0][0]){U=!0;var z=E.shift();F=new h.JoinedCellData(this._workCell,n.translateToString(!0,z[0],z[1]),z[1]-z[0]),q=z[1]-1,T=F.getWidth()}var N=this._document.createElement("span");if(T>1&&(N.style.width=S*T+"px"),U&&(N.style.display="inline",C>=M&&C<=q&&(C=M)),!this._coreService.isCursorHidden&&c&&M===C)switch(N.classList.add(o.CURSOR_CLASS),y&&N.classList.add(o.CURSOR_BLINK_CLASS),g){case"bar":N.classList.add(o.CURSOR_STYLE_BAR_CLASS);break;case"underline":N.classList.add(o.CURSOR_STYLE_UNDERLINE_CLASS);break;default:N.classList.add(o.CURSOR_STYLE_BLOCK_CLASS)}F.isBold()&&N.classList.add(o.BOLD_CLASS),F.isItalic()&&N.classList.add(o.ITALIC_CLASS),F.isDim()&&N.classList.add(o.DIM_CLASS),F.isUnderline()&&N.classList.add(o.UNDERLINE_CLASS),F.isInvisible()?N.textContent=m.WHITESPACE_CELL_CHAR:N.textContent=F.getChars()||m.WHITESPACE_CELL_CHAR,F.isStrikethrough()&&N.classList.add(o.STRIKETHROUGH_CLASS);var A=F.getFgColor(),$=F.getFgColorMode(),J=F.getBgColor(),oe=F.getBgColorMode(),B=!!F.isInverse();if(B){var ne=A;A=J,J=ne;var X=$;$=oe,oe=X}var W=void 0,O=void 0,D=!1;try{for(var j=(R=void 0,d(this._decorationService.getDecorationsAtCell(M,l))),V=j.next();!V.done;V=j.next()){var Y=V.value;Y.options.layer!=="top"&&D||(Y.backgroundColorRGB&&(oe=50331648,J=Y.backgroundColorRGB.rgba>>8&16777215,W=Y.backgroundColorRGB),Y.foregroundColorRGB&&($=50331648,A=Y.foregroundColorRGB.rgba>>8&16777215,O=Y.foregroundColorRGB),D=Y.options.layer==="top")}}catch(ue){R={error:ue}}finally{try{V&&!V.done&&(L=j.return)&&L.call(j)}finally{if(R)throw R.error}}var te=this._isCellInSelection(M,l);D||this._colors.selectionForeground&&te&&($=50331648,A=this._colors.selectionForeground.rgba>>8&16777215,O=this._colors.selectionForeground),te&&(W=this._colors.selectionOpaque,D=!0),D&&N.classList.add("xterm-decoration-top");var ae=void 0;switch(oe){case 16777216:case 33554432:ae=this._colors.ansi[J],N.classList.add("xterm-bg-"+J);break;case 50331648:ae=a.rgba.toColor(J>>16,J>>8&255,255&J),this._addStyle(N,"background-color:#"+t((J>>>0).toString(16),"0",6));break;default:B?(ae=this._colors.foreground,N.classList.add("xterm-bg-"+_.INVERTED_DEFAULT_COLOR)):ae=this._colors.background}switch($){case 16777216:case 33554432:F.isBold()&&A<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(A+=8),this._applyMinimumContrast(N,ae,this._colors.ansi[A],F,W,void 0)||N.classList.add("xterm-fg-"+A);break;case 50331648:var he=a.rgba.toColor(A>>16&255,A>>8&255,255&A);this._applyMinimumContrast(N,ae,he,F,W,O)||this._addStyle(N,"color:#"+t(A.toString(16),"0",6));break;default:this._applyMinimumContrast(N,ae,this._colors.foreground,F,W,void 0)||B&&N.classList.add("xterm-fg-"+_.INVERTED_DEFAULT_COLOR)}k.appendChild(N),M=q}}return k},i.prototype._applyMinimumContrast=function(n,l,c,g,C,y){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,r.excludeFromContrastRatioDemands)(g.getCode()))return!1;var S=void 0;return C||y||(S=this._colors.contrastCache.getColor(l.rgba,c.rgba)),S===void 0&&(S=a.color.ensureContrastRatio(C||l,y||c,this._optionsService.rawOptions.minimumContrastRatio),this._colors.contrastCache.setColor((C||l).rgba,(y||c).rgba,S??null)),!!S&&(this._addStyle(n,"color:"+S.css),!0)},i.prototype._addStyle=function(n,l){n.setAttribute("style",""+(n.getAttribute("style")||"")+l+";")},i.prototype._isCellInSelection=function(n,l){var c=this._selectionStart,g=this._selectionEnd;return!(!c||!g)&&(this._columnSelectMode?c[0]<=g[0]?n>=c[0]&&l>=c[1]&&n<g[0]&&l<=g[1]:n<c[0]&&l>=c[1]&&n>=g[0]&&l<=g[1]:l>c[1]&&l<g[1]||c[1]===g[1]&&l===c[1]&&n>=c[0]&&n<g[0]||c[1]<g[1]&&l===g[1]&&n<g[0]||c[1]<g[1]&&l===c[1]&&n>=c[0])},f([u(2,p.ICharacterJoinerService),u(3,s.IOptionsService),u(4,s.ICoreService),u(5,s.IDecorationService)],i)}();function t(i,n,l){for(;i.length<l;)i=n+i;return i}o.DomRendererRowFactory=e},456:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0;var b=function(){function f(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}return f.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(f.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"finalSelectionEnd",{get:function(){return this.isSelectAllActive?[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1]:this.selectionStart?!this.selectionEnd||this.areSelectionValuesReversed()?(u=this.selectionStart[0]+this.selectionStartLength)>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]]:this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?(u=this.selectionStart[0]+this.selectionStartLength)>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]]:this.selectionEnd:void 0;var u},enumerable:!1,configurable:!0}),f.prototype.areSelectionValuesReversed=function(){var u=this.selectionStart,d=this.selectionEnd;return!(!u||!d)&&(u[1]>d[1]||u[1]===d[1]&&u[0]>d[0])},f.prototype.onTrim=function(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)},f}();o.SelectionModel=b},428:function(P,o,b){var f=this&&this.__decorate||function(s,a,p,h){var r,e=arguments.length,t=e<3?a:h===null?h=Object.getOwnPropertyDescriptor(a,p):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,a,p,h);else for(var i=s.length-1;i>=0;i--)(r=s[i])&&(t=(e<3?r(t):e>3?r(a,p,t):r(a,p))||t);return e>3&&t&&Object.defineProperty(a,p,t),t},u=this&&this.__param||function(s,a){return function(p,h){a(p,h,s)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;var d=b(2585),_=b(8460),m=function(){function s(a,p,h){this._optionsService=h,this.width=0,this.height=0,this._onCharSizeChange=new _.EventEmitter,this._measureStrategy=new v(a,p,this._optionsService)}return Object.defineProperty(s.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),s.prototype.measure=function(){var a=this._measureStrategy.measure();a.width===this.width&&a.height===this.height||(this.width=a.width,this.height=a.height,this._onCharSizeChange.fire())},f([u(2,d.IOptionsService)],s)}();o.CharSizeService=m;var v=function(){function s(a,p,h){this._document=a,this._parentElement=p,this._optionsService=h,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return s.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var a=this._measureElement.getBoundingClientRect();return a.width!==0&&a.height!==0&&(this._result.width=a.width,this._result.height=Math.ceil(a.height)),this._result},s}()},4269:function(P,o,b){var f,u=this&&this.__extends||(f=function(r,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},f(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}f(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}),d=this&&this.__decorate||function(r,e,t,i){var n,l=arguments.length,c=l<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,e,t,i);else for(var g=r.length-1;g>=0;g--)(n=r[g])&&(c=(l<3?n(c):l>3?n(e,t,c):n(e,t))||c);return l>3&&c&&Object.defineProperty(e,t,c),c},_=this&&this.__param||function(r,e){return function(t,i){e(t,i,r)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;var m=b(3734),v=b(643),s=b(511),a=b(2585),p=function(r){function e(t,i,n){var l=r.call(this)||this;return l.content=0,l.combinedData="",l.fg=t.fg,l.bg=t.bg,l.combinedData=i,l._width=n,l}return u(e,r),e.prototype.isCombined=function(){return 2097152},e.prototype.getWidth=function(){return this._width},e.prototype.getChars=function(){return this.combinedData},e.prototype.getCode=function(){return 2097151},e.prototype.setFromCharData=function(t){throw new Error("not implemented")},e.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},e}(m.AttributeData);o.JoinedCellData=p;var h=function(){function r(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new s.CellData}return r.prototype.register=function(e){var t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id},r.prototype.deregister=function(e){for(var t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1},r.prototype.getJoinedCharacters=function(e){if(this._characterJoiners.length===0)return[];var t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];for(var i=[],n=t.translateToString(!0),l=0,c=0,g=0,C=t.getFg(0),y=t.getBg(0),S=0;S<t.getTrimmedLength();S++)if(t.loadCell(S,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==C||this._workCell.bg!==y){if(S-l>1)for(var w=this._getJoinedRanges(n,g,c,t,l),R=0;R<w.length;R++)i.push(w[R]);l=S,g=c,C=this._workCell.fg,y=this._workCell.bg}c+=this._workCell.getChars().length||v.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-l>1)for(w=this._getJoinedRanges(n,g,c,t,l),R=0;R<w.length;R++)i.push(w[R]);return i},r.prototype._getJoinedRanges=function(e,t,i,n,l){var c=e.substring(t,i),g=[];try{g=this._characterJoiners[0].handler(c)}catch(w){console.error(w)}for(var C=1;C<this._characterJoiners.length;C++)try{for(var y=this._characterJoiners[C].handler(c),S=0;S<y.length;S++)r._mergeRanges(g,y[S])}catch(w){console.error(w)}return this._stringRangesToCellRanges(g,n,l),g},r.prototype._stringRangesToCellRanges=function(e,t,i){var n=0,l=!1,c=0,g=e[n];if(g){for(var C=i;C<this._bufferService.cols;C++){var y=t.getWidth(C),S=t.getString(C).length||v.WHITESPACE_CELL_CHAR.length;if(y!==0){if(!l&&g[0]<=c&&(g[0]=C,l=!0),g[1]<=c){if(g[1]=C,!(g=e[++n]))break;g[0]<=c?(g[0]=C,l=!0):l=!1}c+=S}}g&&(g[1]=this._bufferService.cols)}},r._mergeRanges=function(e,t){for(var i=!1,n=0;n<e.length;n++){var l=e[n];if(i){if(t[1]<=l[0])return e[n-1][1]=t[1],e;if(t[1]<=l[1])return e[n-1][1]=Math.max(t[1],l[1]),e.splice(n,1),e;e.splice(n,1),n--}else{if(t[1]<=l[0])return e.splice(n,0,t),e;if(t[1]<=l[1])return l[0]=Math.min(t[0],l[0]),e;t[0]<l[1]&&(l[0]=Math.min(t[0],l[0]),i=!0)}}return i?e[e.length-1][1]=t[1]:e.push(t),e},r=d([_(0,a.IBufferService)],r)}();o.CharacterJoinerService=h},5114:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;var b=function(){function f(u){this._textarea=u}return Object.defineProperty(f.prototype,"isFocused",{get:function(){return(this._textarea.getRootNode?this._textarea.getRootNode():document).activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),f}();o.CoreBrowserService=b},8934:function(P,o,b){var f=this&&this.__decorate||function(v,s,a,p){var h,r=arguments.length,e=r<3?s:p===null?p=Object.getOwnPropertyDescriptor(s,a):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(v,s,a,p);else for(var t=v.length-1;t>=0;t--)(h=v[t])&&(e=(r<3?h(e):r>3?h(s,a,e):h(s,a))||e);return r>3&&e&&Object.defineProperty(s,a,e),e},u=this&&this.__param||function(v,s){return function(a,p){s(a,p,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;var d=b(4725),_=b(9806),m=function(){function v(s,a){this._renderService=s,this._charSizeService=a}return v.prototype.getCoords=function(s,a,p,h,r){return(0,_.getCoords)(window,s,a,p,h,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,r)},v.prototype.getRawByteCoords=function(s,a,p,h){var r=this.getCoords(s,a,p,h);return(0,_.getRawByteCoords)(r)},f([u(0,d.IRenderService),u(1,d.ICharSizeService)],v)}();o.MouseService=m},3230:function(P,o,b){var f,u=this&&this.__extends||(f=function(t,i){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(n[c]=l[c])},f(t,i)},function(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}f(t,i),t.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}),d=this&&this.__decorate||function(t,i,n,l){var c,g=arguments.length,C=g<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(t,i,n,l);else for(var y=t.length-1;y>=0;y--)(c=t[y])&&(C=(g<3?c(C):g>3?c(i,n,C):c(i,n))||C);return g>3&&C&&Object.defineProperty(i,n,C),C},_=this&&this.__param||function(t,i){return function(n,l){i(n,l,t)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;var m=b(6193),v=b(8460),s=b(844),a=b(5596),p=b(3656),h=b(2585),r=b(4725),e=function(t){function i(n,l,c,g,C,y,S){var w=t.call(this)||this;if(w._renderer=n,w._rowCount=l,w._charSizeService=C,w._isPaused=!1,w._needsFullRefresh=!1,w._isNextRenderRedrawOnly=!0,w._needsSelectionRefresh=!1,w._canvasWidth=0,w._canvasHeight=0,w._selectionState={start:void 0,end:void 0,columnSelectMode:!1},w._onDimensionsChange=new v.EventEmitter,w._onRenderedViewportChange=new v.EventEmitter,w._onRender=new v.EventEmitter,w._onRefreshRequest=new v.EventEmitter,w.register({dispose:function(){return w._renderer.dispose()}}),w._renderDebouncer=new m.RenderDebouncer(function(L,k){return w._renderRows(L,k)}),w.register(w._renderDebouncer),w._screenDprMonitor=new a.ScreenDprMonitor,w._screenDprMonitor.setListener(function(){return w.onDevicePixelRatioChange()}),w.register(w._screenDprMonitor),w.register(S.onResize(function(){return w._fullRefresh()})),w.register(S.buffers.onBufferActivate(function(){var L;return(L=w._renderer)===null||L===void 0?void 0:L.clear()})),w.register(g.onOptionChange(function(){return w._handleOptionsChanged()})),w.register(w._charSizeService.onCharSizeChange(function(){return w.onCharSizeChanged()})),w.register(y.onDecorationRegistered(function(){return w._fullRefresh()})),w.register(y.onDecorationRemoved(function(){return w._fullRefresh()})),w._renderer.onRequestRedraw(function(L){return w.refreshRows(L.start,L.end,!0)}),w.register((0,p.addDisposableDomListener)(window,"resize",function(){return w.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var R=new IntersectionObserver(function(L){return w._onIntersectionChange(L[L.length-1])},{threshold:0});R.observe(c),w.register({dispose:function(){return R.disconnect()}})}return w}return u(i,t),Object.defineProperty(i.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onRenderedViewportChange",{get:function(){return this._onRenderedViewportChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),i.prototype._onIntersectionChange=function(n){this._isPaused=n.isIntersecting===void 0?n.intersectionRatio===0:!n.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},i.prototype.refreshRows=function(n,l,c){c===void 0&&(c=!1),this._isPaused?this._needsFullRefresh=!0:(c||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(n,l,this._rowCount))},i.prototype._renderRows=function(n,l){this._renderer.renderRows(n,l),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:n,end:l}),this._onRender.fire({start:n,end:l}),this._isNextRenderRedrawOnly=!0},i.prototype.resize=function(n,l){this._rowCount=l,this._fireOnCanvasResize()},i.prototype._handleOptionsChanged=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},i.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},i.prototype.dispose=function(){t.prototype.dispose.call(this)},i.prototype.setRenderer=function(n){var l=this;this._renderer.dispose(),this._renderer=n,this._renderer.onRequestRedraw(function(c){return l.refreshRows(c.start,c.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},i.prototype.addRefreshCallback=function(n){return this._renderDebouncer.addRefreshCallback(n)},i.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},i.prototype.clearTextureAtlas=function(){var n,l;(l=(n=this._renderer)===null||n===void 0?void 0:n.clearTextureAtlas)===null||l===void 0||l.call(n),this._fullRefresh()},i.prototype.setColors=function(n){this._renderer.setColors(n),this._fullRefresh()},i.prototype.onDevicePixelRatioChange=function(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},i.prototype.onResize=function(n,l){this._renderer.onResize(n,l),this._fullRefresh()},i.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},i.prototype.onBlur=function(){this._renderer.onBlur()},i.prototype.onFocus=function(){this._renderer.onFocus()},i.prototype.onSelectionChanged=function(n,l,c){this._selectionState.start=n,this._selectionState.end=l,this._selectionState.columnSelectMode=c,this._renderer.onSelectionChanged(n,l,c)},i.prototype.onCursorMove=function(){this._renderer.onCursorMove()},i.prototype.clear=function(){this._renderer.clear()},d([_(3,h.IOptionsService),_(4,r.ICharSizeService),_(5,h.IDecorationService),_(6,h.IBufferService)],i)}(s.Disposable);o.RenderService=e},9312:function(P,o,b){var f,u=this&&this.__extends||(f=function(g,C){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,S){y.__proto__=S}||function(y,S){for(var w in S)Object.prototype.hasOwnProperty.call(S,w)&&(y[w]=S[w])},f(g,C)},function(g,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");function y(){this.constructor=g}f(g,C),g.prototype=C===null?Object.create(C):(y.prototype=C.prototype,new y)}),d=this&&this.__decorate||function(g,C,y,S){var w,R=arguments.length,L=R<3?C:S===null?S=Object.getOwnPropertyDescriptor(C,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(g,C,y,S);else for(var k=g.length-1;k>=0;k--)(w=g[k])&&(L=(R<3?w(L):R>3?w(C,y,L):w(C,y))||L);return R>3&&L&&Object.defineProperty(C,y,L),L},_=this&&this.__param||function(g,C){return function(y,S){C(y,S,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;var m=b(6114),v=b(456),s=b(511),a=b(8460),p=b(4725),h=b(2585),r=b(9806),e=b(9504),t=b(844),i=b(4841),n=" ",l=new RegExp(n,"g"),c=function(g){function C(y,S,w,R,L,k,E,x){var M=g.call(this)||this;return M._element=y,M._screenElement=S,M._linkifier=w,M._bufferService=R,M._coreService=L,M._mouseService=k,M._optionsService=E,M._renderService=x,M._dragScrollAmount=0,M._enabled=!0,M._workCell=new s.CellData,M._mouseDownTimeStamp=0,M._oldHasSelection=!1,M._oldSelectionStart=void 0,M._oldSelectionEnd=void 0,M._onLinuxMouseSelection=M.register(new a.EventEmitter),M._onRedrawRequest=M.register(new a.EventEmitter),M._onSelectionChange=M.register(new a.EventEmitter),M._onRequestScrollLines=M.register(new a.EventEmitter),M._mouseMoveListener=function(T){return M._onMouseMove(T)},M._mouseUpListener=function(T){return M._onMouseUp(T)},M._coreService.onUserInput(function(){M.hasSelection&&M.clearSelection()}),M._trimListener=M._bufferService.buffer.lines.onTrim(function(T){return M._onTrim(T)}),M.register(M._bufferService.buffers.onBufferActivate(function(T){return M._onBufferActivate(T)})),M.enable(),M._model=new v.SelectionModel(M._bufferService),M._activeSelectionMode=0,M}return u(C,g),Object.defineProperty(C.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),C.prototype.dispose=function(){this._removeMouseDownListeners()},C.prototype.reset=function(){this.clearSelection()},C.prototype.disable=function(){this.clearSelection(),this._enabled=!1},C.prototype.enable=function(){this._enabled=!0},Object.defineProperty(C.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"hasSelection",{get:function(){var y=this._model.finalSelectionStart,S=this._model.finalSelectionEnd;return!(!y||!S||y[0]===S[0]&&y[1]===S[1])},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"selectionText",{get:function(){var y=this._model.finalSelectionStart,S=this._model.finalSelectionEnd;if(!y||!S)return"";var w=this._bufferService.buffer,R=[];if(this._activeSelectionMode===3){if(y[0]===S[0])return"";for(var L=y[0]<S[0]?y[0]:S[0],k=y[0]<S[0]?S[0]:y[0],E=y[1];E<=S[1];E++){var x=w.translateBufferLineToString(E,!0,L,k);R.push(x)}}else{var M=y[1]===S[1]?S[0]:void 0;for(R.push(w.translateBufferLineToString(y[1],!0,y[0],M)),E=y[1]+1;E<=S[1]-1;E++){var T=w.lines.get(E);x=w.translateBufferLineToString(E,!0),T?.isWrapped?R[R.length-1]+=x:R.push(x)}y[1]!==S[1]&&(T=w.lines.get(S[1]),x=w.translateBufferLineToString(S[1],!0,0,S[0]),T&&T.isWrapped?R[R.length-1]+=x:R.push(x))}return R.map(function(U){return U.replace(l," ")}).join(m.isWindows?`\r
|
|
5
|
-
`:`
|
|
6
|
-
`)},enumerable:!1,configurable:!0}),C.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},C.prototype.refresh=function(y){var S=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return S._refresh()})),m.isLinux&&y&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},C.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},C.prototype._isClickInSelection=function(y){var S=this._getMouseBufferCoords(y),w=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!!(w&&R&&S)&&this._areCoordsInSelection(S,w,R)},C.prototype.isCellInSelection=function(y,S){var w=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!w||!R)&&this._areCoordsInSelection([y,S],w,R)},C.prototype._areCoordsInSelection=function(y,S,w){return y[1]>S[1]&&y[1]<w[1]||S[1]===w[1]&&y[1]===S[1]&&y[0]>=S[0]&&y[0]<w[0]||S[1]<w[1]&&y[1]===w[1]&&y[0]<w[0]||S[1]<w[1]&&y[1]===S[1]&&y[0]>=S[0]},C.prototype._selectWordAtCursor=function(y,S){var w,R,L=(R=(w=this._linkifier.currentLink)===null||w===void 0?void 0:w.link)===null||R===void 0?void 0:R.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,i.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;var k=this._getMouseBufferCoords(y);return!!k&&(this._selectWordAt(k,S),this._model.selectionEnd=void 0,!0)},C.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},C.prototype.selectLines=function(y,S){this._model.clearSelection(),y=Math.max(y,0),S=Math.min(S,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,y],this._model.selectionEnd=[this._bufferService.cols,S],this.refresh(),this._onSelectionChange.fire()},C.prototype._onTrim=function(y){this._model.onTrim(y)&&this.refresh()},C.prototype._getMouseBufferCoords=function(y){var S=this._mouseService.getCoords(y,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(S)return S[0]--,S[1]--,S[1]+=this._bufferService.buffer.ydisp,S},C.prototype._getMouseEventScrollAmount=function(y){var S=(0,r.getCoordsRelativeToElement)(window,y,this._screenElement)[1],w=this._renderService.dimensions.canvasHeight;return S>=0&&S<=w?0:(S>w&&(S-=w),S=Math.min(Math.max(S,-50),50),(S/=50)/Math.abs(S)+Math.round(14*S))},C.prototype.shouldForceSelection=function(y){return m.isMac?y.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:y.shiftKey},C.prototype.onMouseDown=function(y){if(this._mouseDownTimeStamp=y.timeStamp,(y.button!==2||!this.hasSelection)&&y.button===0){if(!this._enabled){if(!this.shouldForceSelection(y))return;y.stopPropagation()}y.preventDefault(),this._dragScrollAmount=0,this._enabled&&y.shiftKey?this._onIncrementalClick(y):y.detail===1?this._onSingleClick(y):y.detail===2?this._onDoubleClick(y):y.detail===3&&this._onTripleClick(y),this._addMouseDownListeners(),this.refresh(!0)}},C.prototype._addMouseDownListeners=function(){var y=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return y._dragScroll()},50)},C.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},C.prototype._onIncrementalClick=function(y){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(y))},C.prototype._onSingleClick=function(y){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(y)?3:0,this._model.selectionStart=this._getMouseBufferCoords(y),this._model.selectionStart){this._model.selectionEnd=void 0;var S=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);S&&S.length!==this._model.selectionStart[0]&&S.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},C.prototype._onDoubleClick=function(y){this._selectWordAtCursor(y,!0)&&(this._activeSelectionMode=1)},C.prototype._onTripleClick=function(y){var S=this._getMouseBufferCoords(y);S&&(this._activeSelectionMode=2,this._selectLineAt(S[1]))},C.prototype.shouldColumnSelect=function(y){return y.altKey&&!(m.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)},C.prototype._onMouseMove=function(y){if(y.stopImmediatePropagation(),this._model.selectionStart){var S=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(y),this._model.selectionEnd){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(y),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var w=this._bufferService.buffer;if(this._model.selectionEnd[1]<w.lines.length){var R=w.lines.get(this._model.selectionEnd[1]);R&&R.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}S&&S[0]===this._model.selectionEnd[0]&&S[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},C.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var y=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(y.ydisp+this._bufferService.rows,y.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=y.ydisp),this.refresh()}},C.prototype._onMouseUp=function(y){var S=y.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&S<500&&y.altKey&&this._optionsService.getOption("altClickMovesCursor")){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var w=this._mouseService.getCoords(y,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(w&&w[0]!==void 0&&w[1]!==void 0){var R=(0,e.moveToCellSequence)(w[0]-1,w[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(R,!0)}}}else this._fireEventIfSelectionChanged()},C.prototype._fireEventIfSelectionChanged=function(){var y=this._model.finalSelectionStart,S=this._model.finalSelectionEnd,w=!(!y||!S||y[0]===S[0]&&y[1]===S[1]);w?y&&S&&(this._oldSelectionStart&&this._oldSelectionEnd&&y[0]===this._oldSelectionStart[0]&&y[1]===this._oldSelectionStart[1]&&S[0]===this._oldSelectionEnd[0]&&S[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(y,S,w)):this._oldHasSelection&&this._fireOnSelectionChange(y,S,w)},C.prototype._fireOnSelectionChange=function(y,S,w){this._oldSelectionStart=y,this._oldSelectionEnd=S,this._oldHasSelection=w,this._onSelectionChange.fire()},C.prototype._onBufferActivate=function(y){var S=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=y.activeBuffer.lines.onTrim(function(w){return S._onTrim(w)})},C.prototype._convertViewportColToCharacterIndex=function(y,S){for(var w=S[0],R=0;S[0]>=R;R++){var L=y.loadCell(R,this._workCell).getChars().length;this._workCell.getWidth()===0?w--:L>1&&S[0]!==R&&(w+=L-1)}return w},C.prototype.setSelection=function(y,S,w){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[y,S],this._model.selectionStartLength=w,this.refresh(),this._fireEventIfSelectionChanged()},C.prototype.rightClickSelect=function(y){this._isClickInSelection(y)||(this._selectWordAtCursor(y,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())},C.prototype._getWordAt=function(y,S,w,R){if(w===void 0&&(w=!0),R===void 0&&(R=!0),!(y[0]>=this._bufferService.cols)){var L=this._bufferService.buffer,k=L.lines.get(y[1]);if(k){var E=L.translateBufferLineToString(y[1],!1),x=this._convertViewportColToCharacterIndex(k,y),M=x,T=y[0]-x,U=0,q=0,F=0,z=0;if(E.charAt(x)===" "){for(;x>0&&E.charAt(x-1)===" ";)x--;for(;M<E.length&&E.charAt(M+1)===" ";)M++}else{var N=y[0],A=y[0];k.getWidth(N)===0&&(U++,N--),k.getWidth(A)===2&&(q++,A++);var $=k.getString(A).length;for($>1&&(z+=$-1,M+=$-1);N>0&&x>0&&!this._isCharWordSeparator(k.loadCell(N-1,this._workCell));){k.loadCell(N-1,this._workCell);var J=this._workCell.getChars().length;this._workCell.getWidth()===0?(U++,N--):J>1&&(F+=J-1,x-=J-1),x--,N--}for(;A<k.length&&M+1<E.length&&!this._isCharWordSeparator(k.loadCell(A+1,this._workCell));){k.loadCell(A+1,this._workCell);var oe=this._workCell.getChars().length;this._workCell.getWidth()===2?(q++,A++):oe>1&&(z+=oe-1,M+=oe-1),M++,A++}}M++;var B=x+T-U+F,ne=Math.min(this._bufferService.cols,M-x+U+q-F-z);if(S||E.slice(x,M).trim()!==""){if(w&&B===0&&k.getCodePoint(0)!==32){var X=L.lines.get(y[1]-1);if(X&&k.isWrapped&&X.getCodePoint(this._bufferService.cols-1)!==32){var W=this._getWordAt([this._bufferService.cols-1,y[1]-1],!1,!0,!1);if(W){var O=this._bufferService.cols-W.start;B-=O,ne+=O}}}if(R&&B+ne===this._bufferService.cols&&k.getCodePoint(this._bufferService.cols-1)!==32){var D=L.lines.get(y[1]+1);if(D?.isWrapped&&D.getCodePoint(0)!==32){var j=this._getWordAt([0,y[1]+1],!1,!1,!0);j&&(ne+=j.length)}}return{start:B,length:ne}}}}},C.prototype._selectWordAt=function(y,S){var w=this._getWordAt(y,S);if(w){for(;w.start<0;)w.start+=this._bufferService.cols,y[1]--;this._model.selectionStart=[w.start,y[1]],this._model.selectionStartLength=w.length}},C.prototype._selectToWordAt=function(y){var S=this._getWordAt(y,!0);if(S){for(var w=y[1];S.start<0;)S.start+=this._bufferService.cols,w--;if(!this._model.areSelectionValuesReversed())for(;S.start+S.length>this._bufferService.cols;)S.length-=this._bufferService.cols,w++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?S.start:S.start+S.length,w]}},C.prototype._isCharWordSeparator=function(y){return y.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(y.getChars())>=0},C.prototype._selectLineAt=function(y){var S=this._bufferService.buffer.getWrappedRangeForLine(y),w={start:{x:0,y:S.first},end:{x:this._bufferService.cols-1,y:S.last}};this._model.selectionStart=[0,S.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,i.getRangeLength)(w,this._bufferService.cols)},d([_(3,h.IBufferService),_(4,h.ICoreService),_(5,p.IMouseService),_(6,h.IOptionsService),_(7,p.IRenderService)],C)}(t.Disposable);o.SelectionService=c},4725:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ICharacterJoinerService=o.ISoundService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;var f=b(8343);o.ICharSizeService=(0,f.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),o.IMouseService=(0,f.createDecorator)("MouseService"),o.IRenderService=(0,f.createDecorator)("RenderService"),o.ISelectionService=(0,f.createDecorator)("SelectionService"),o.ISoundService=(0,f.createDecorator)("SoundService"),o.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService")},357:function(P,o,b){var f=this&&this.__decorate||function(m,v,s,a){var p,h=arguments.length,r=h<3?v:a===null?a=Object.getOwnPropertyDescriptor(v,s):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(m,v,s,a);else for(var e=m.length-1;e>=0;e--)(p=m[e])&&(r=(h<3?p(r):h>3?p(v,s,r):p(v,s))||r);return h>3&&r&&Object.defineProperty(v,s,r),r},u=this&&this.__param||function(m,v){return function(s,a){v(s,a,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SoundService=void 0;var d=b(2585),_=function(){function m(v){this._optionsService=v}return Object.defineProperty(m,"audioContext",{get:function(){if(!m._audioContext){var v=window.AudioContext||window.webkitAudioContext;if(!v)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;m._audioContext=new v}return m._audioContext},enumerable:!1,configurable:!0}),m.prototype.playBellSound=function(){var v=m.audioContext;if(v){var s=v.createBufferSource();v.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.rawOptions.bellSound)),function(a){s.buffer=a,s.connect(v.destination),s.start(0)})}},m.prototype._base64ToArrayBuffer=function(v){for(var s=window.atob(v),a=s.length,p=new Uint8Array(a),h=0;h<a;h++)p[h]=s.charCodeAt(h);return p.buffer},m.prototype._removeMimeType=function(v){return v.split(",")[1]},m=f([u(0,d.IOptionsService)],m)}();o.SoundService=_},6349:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;var f=b(8460),u=function(){function d(_){this._maxLength=_,this.onDeleteEmitter=new f.EventEmitter,this.onInsertEmitter=new f.EventEmitter,this.onTrimEmitter=new f.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(d.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"maxLength",{get:function(){return this._maxLength},set:function(_){if(this._maxLength!==_){for(var m=new Array(_),v=0;v<Math.min(_,this.length);v++)m[v]=this._array[this._getCyclicIndex(v)];this._array=m,this._maxLength=_,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"length",{get:function(){return this._length},set:function(_){if(_>this._length)for(var m=this._length;m<_;m++)this._array[m]=void 0;this._length=_},enumerable:!1,configurable:!0}),d.prototype.get=function(_){return this._array[this._getCyclicIndex(_)]},d.prototype.set=function(_,m){this._array[this._getCyclicIndex(_)]=m},d.prototype.push=function(_){this._array[this._getCyclicIndex(this._length)]=_,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},d.prototype.recycle=function(){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)]},Object.defineProperty(d.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),d.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},d.prototype.splice=function(_,m){for(var v=[],s=2;s<arguments.length;s++)v[s-2]=arguments[s];if(m){for(var a=_;a<this._length-m;a++)this._array[this._getCyclicIndex(a)]=this._array[this._getCyclicIndex(a+m)];this._length-=m,this.onDeleteEmitter.fire({index:_,amount:m})}for(a=this._length-1;a>=_;a--)this._array[this._getCyclicIndex(a+v.length)]=this._array[this._getCyclicIndex(a)];for(a=0;a<v.length;a++)this._array[this._getCyclicIndex(_+a)]=v[a];if(v.length&&this.onInsertEmitter.fire({index:_,amount:v.length}),this._length+v.length>this._maxLength){var p=this._length+v.length-this._maxLength;this._startIndex+=p,this._length=this._maxLength,this.onTrimEmitter.fire(p)}else this._length+=v.length},d.prototype.trimStart=function(_){_>this._length&&(_=this._length),this._startIndex+=_,this._length-=_,this.onTrimEmitter.fire(_)},d.prototype.shiftElements=function(_,m,v){if(!(m<=0)){if(_<0||_>=this._length)throw new Error("start argument out of range");if(_+v<0)throw new Error("Cannot shift elements in list beyond index 0");if(v>0){for(var s=m-1;s>=0;s--)this.set(_+s+v,this.get(_+s));var a=_+m+v-this._length;if(a>0)for(this._length+=a;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(s=0;s<m;s++)this.set(_+s+v,this.get(_+s))}},d.prototype._getCyclicIndex=function(_){return(this._startIndex+_)%this._maxLength},d}();o.CircularList=u},1439:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function b(f,u){if(u===void 0&&(u=5),typeof f!="object")return f;var d=Array.isArray(f)?[]:{};for(var _ in f)d[_]=u<=1?f[_]:f[_]&&b(f[_],u-1);return d}},8055:function(P,o){var b,f,u,d,_=this&&this.__read||function(s,a){var p=typeof Symbol=="function"&&s[Symbol.iterator];if(!p)return s;var h,r,e=p.call(s),t=[];try{for(;(a===void 0||a-- >0)&&!(h=e.next()).done;)t.push(h.value)}catch(i){r={error:i}}finally{try{h&&!h.done&&(p=e.return)&&p.call(e)}finally{if(r)throw r.error}}return t};function m(s){var a=s.toString(16);return a.length<2?"0"+a:a}function v(s,a){return s<a?(a+.05)/(s+.05):(s+.05)/(a+.05)}Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=void 0,function(s){s.toCss=function(a,p,h,r){return r!==void 0?"#"+m(a)+m(p)+m(h)+m(r):"#"+m(a)+m(p)+m(h)},s.toRgba=function(a,p,h,r){return r===void 0&&(r=255),(a<<24|p<<16|h<<8|r)>>>0}}(b=o.channels||(o.channels={})),(f=o.color||(o.color={})).blend=function(s,a){var p=(255&a.rgba)/255;if(p===1)return{css:a.css,rgba:a.rgba};var h=a.rgba>>24&255,r=a.rgba>>16&255,e=a.rgba>>8&255,t=s.rgba>>24&255,i=s.rgba>>16&255,n=s.rgba>>8&255,l=t+Math.round((h-t)*p),c=i+Math.round((r-i)*p),g=n+Math.round((e-n)*p);return{css:b.toCss(l,c,g),rgba:b.toRgba(l,c,g)}},f.isOpaque=function(s){return(255&s.rgba)==255},f.ensureContrastRatio=function(s,a,p){var h=d.ensureContrastRatio(s.rgba,a.rgba,p);if(h)return d.toColor(h>>24&255,h>>16&255,h>>8&255)},f.opaque=function(s){var a=(255|s.rgba)>>>0,p=_(d.toChannels(a),3),h=p[0],r=p[1],e=p[2];return{css:b.toCss(h,r,e),rgba:a}},f.opacity=function(s,a){var p=Math.round(255*a),h=_(d.toChannels(s.rgba),3),r=h[0],e=h[1],t=h[2];return{css:b.toCss(r,e,t,p),rgba:b.toRgba(r,e,t,p)}},f.toColorRGB=function(s){return[s.rgba>>24&255,s.rgba>>16&255,s.rgba>>8&255]},(o.css||(o.css={})).toColor=function(s){if(s.match(/#[0-9a-f]{3,8}/i))switch(s.length){case 4:var a=parseInt(s.slice(1,2).repeat(2),16),p=parseInt(s.slice(2,3).repeat(2),16),h=parseInt(s.slice(3,4).repeat(2),16);return d.toColor(a,p,h);case 5:a=parseInt(s.slice(1,2).repeat(2),16),p=parseInt(s.slice(2,3).repeat(2),16),h=parseInt(s.slice(3,4).repeat(2),16);var r=parseInt(s.slice(4,5).repeat(2),16);return d.toColor(a,p,h,r);case 7:return{css:s,rgba:(parseInt(s.slice(1),16)<<8|255)>>>0};case 9:return{css:s,rgba:parseInt(s.slice(1),16)>>>0}}var e=s.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(e)return a=parseInt(e[1]),p=parseInt(e[2]),h=parseInt(e[3]),r=Math.round(255*(e[5]===void 0?1:parseFloat(e[5]))),d.toColor(a,p,h,r);throw new Error("css.toColor: Unsupported css format")},function(s){function a(p,h,r){var e=p/255,t=h/255,i=r/255;return .2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))}s.relativeLuminance=function(p){return a(p>>16&255,p>>8&255,255&p)},s.relativeLuminance2=a}(u=o.rgb||(o.rgb={})),function(s){function a(h,r,e){for(var t=h>>24&255,i=h>>16&255,n=h>>8&255,l=r>>24&255,c=r>>16&255,g=r>>8&255,C=v(u.relativeLuminance2(l,c,g),u.relativeLuminance2(t,i,n));C<e&&(l>0||c>0||g>0);)l-=Math.max(0,Math.ceil(.1*l)),c-=Math.max(0,Math.ceil(.1*c)),g-=Math.max(0,Math.ceil(.1*g)),C=v(u.relativeLuminance2(l,c,g),u.relativeLuminance2(t,i,n));return(l<<24|c<<16|g<<8|255)>>>0}function p(h,r,e){for(var t=h>>24&255,i=h>>16&255,n=h>>8&255,l=r>>24&255,c=r>>16&255,g=r>>8&255,C=v(u.relativeLuminance2(l,c,g),u.relativeLuminance2(t,i,n));C<e&&(l<255||c<255||g<255);)l=Math.min(255,l+Math.ceil(.1*(255-l))),c=Math.min(255,c+Math.ceil(.1*(255-c))),g=Math.min(255,g+Math.ceil(.1*(255-g))),C=v(u.relativeLuminance2(l,c,g),u.relativeLuminance2(t,i,n));return(l<<24|c<<16|g<<8|255)>>>0}s.ensureContrastRatio=function(h,r,e){var t=u.relativeLuminance(h>>8),i=u.relativeLuminance(r>>8);if(v(t,i)<e){if(i<t){var n=a(h,r,e),l=v(t,u.relativeLuminance(n>>8));if(l<e){var c=p(h,h,e);return l>v(t,u.relativeLuminance(c>>8))?n:c}return n}var g=p(h,r,e),C=v(t,u.relativeLuminance(g>>8));return C<e?(c=a(h,h,e),C>v(t,u.relativeLuminance(c>>8))?g:c):g}},s.reduceLuminance=a,s.increaseLuminance=p,s.toChannels=function(h){return[h>>24&255,h>>16&255,h>>8&255,255&h]},s.toColor=function(h,r,e,t){return{css:b.toCss(h,r,e,t),rgba:b.toRgba(h,r,e,t)}}}(d=o.rgba||(o.rgba={})),o.toPaddedHex=m,o.contrastRatio=v},8969:function(P,o,b){var f,u=this&&this.__extends||(f=function(S,w){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,L){R.__proto__=L}||function(R,L){for(var k in L)Object.prototype.hasOwnProperty.call(L,k)&&(R[k]=L[k])},f(S,w)},function(S,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function R(){this.constructor=S}f(S,w),S.prototype=w===null?Object.create(w):(R.prototype=w.prototype,new R)}),d=this&&this.__values||function(S){var w=typeof Symbol=="function"&&Symbol.iterator,R=w&&S[w],L=0;if(R)return R.call(S);if(S&&typeof S.length=="number")return{next:function(){return S&&L>=S.length&&(S=void 0),{value:S&&S[L++],done:!S}}};throw new TypeError(w?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;var _=b(844),m=b(2585),v=b(4348),s=b(7866),a=b(744),p=b(7302),h=b(6975),r=b(8460),e=b(1753),t=b(3730),i=b(1480),n=b(7994),l=b(9282),c=b(5435),g=b(5981),C=!1,y=function(S){function w(R){var L=S.call(this)||this;return L._onBinary=new r.EventEmitter,L._onData=new r.EventEmitter,L._onLineFeed=new r.EventEmitter,L._onResize=new r.EventEmitter,L._onScroll=new r.EventEmitter,L._onWriteParsed=new r.EventEmitter,L._instantiationService=new v.InstantiationService,L.optionsService=new p.OptionsService(R),L._instantiationService.setService(m.IOptionsService,L.optionsService),L._bufferService=L.register(L._instantiationService.createInstance(a.BufferService)),L._instantiationService.setService(m.IBufferService,L._bufferService),L._logService=L._instantiationService.createInstance(s.LogService),L._instantiationService.setService(m.ILogService,L._logService),L.coreService=L.register(L._instantiationService.createInstance(h.CoreService,function(){return L.scrollToBottom()})),L._instantiationService.setService(m.ICoreService,L.coreService),L.coreMouseService=L._instantiationService.createInstance(e.CoreMouseService),L._instantiationService.setService(m.ICoreMouseService,L.coreMouseService),L._dirtyRowService=L._instantiationService.createInstance(t.DirtyRowService),L._instantiationService.setService(m.IDirtyRowService,L._dirtyRowService),L.unicodeService=L._instantiationService.createInstance(i.UnicodeService),L._instantiationService.setService(m.IUnicodeService,L.unicodeService),L._charsetService=L._instantiationService.createInstance(n.CharsetService),L._instantiationService.setService(m.ICharsetService,L._charsetService),L._inputHandler=new c.InputHandler(L._bufferService,L._charsetService,L.coreService,L._dirtyRowService,L._logService,L.optionsService,L.coreMouseService,L.unicodeService),L.register((0,r.forwardEvent)(L._inputHandler.onLineFeed,L._onLineFeed)),L.register(L._inputHandler),L.register((0,r.forwardEvent)(L._bufferService.onResize,L._onResize)),L.register((0,r.forwardEvent)(L.coreService.onData,L._onData)),L.register((0,r.forwardEvent)(L.coreService.onBinary,L._onBinary)),L.register(L.optionsService.onOptionChange(function(k){return L._updateOptions(k)})),L.register(L._bufferService.onScroll(function(k){L._onScroll.fire({position:L._bufferService.buffer.ydisp,source:0}),L._dirtyRowService.markRangeDirty(L._bufferService.buffer.scrollTop,L._bufferService.buffer.scrollBottom)})),L.register(L._inputHandler.onScroll(function(k){L._onScroll.fire({position:L._bufferService.buffer.ydisp,source:0}),L._dirtyRowService.markRangeDirty(L._bufferService.buffer.scrollTop,L._bufferService.buffer.scrollBottom)})),L._writeBuffer=new g.WriteBuffer(function(k,E){return L._inputHandler.parse(k,E)}),L.register((0,r.forwardEvent)(L._writeBuffer.onWriteParsed,L._onWriteParsed)),L}return u(w,S),Object.defineProperty(w.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onWriteParsed",{get:function(){return this._onWriteParsed.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onScroll",{get:function(){var R=this;return this._onScrollApi||(this._onScrollApi=new r.EventEmitter,this.register(this._onScroll.event(function(L){var k;(k=R._onScrollApi)===null||k===void 0||k.fire(L.position)}))),this._onScrollApi.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"options",{get:function(){return this.optionsService.options},set:function(R){for(var L in R)this.optionsService.options[L]=R[L]},enumerable:!1,configurable:!0}),w.prototype.dispose=function(){var R;this._isDisposed||(S.prototype.dispose.call(this),(R=this._windowsMode)===null||R===void 0||R.dispose(),this._windowsMode=void 0)},w.prototype.write=function(R,L){this._writeBuffer.write(R,L)},w.prototype.writeSync=function(R,L){this._logService.logLevel<=m.LogLevelEnum.WARN&&!C&&(this._logService.warn("writeSync is unreliable and will be removed soon."),C=!0),this._writeBuffer.writeSync(R,L)},w.prototype.resize=function(R,L){isNaN(R)||isNaN(L)||(R=Math.max(R,a.MINIMUM_COLS),L=Math.max(L,a.MINIMUM_ROWS),this._bufferService.resize(R,L))},w.prototype.scroll=function(R,L){L===void 0&&(L=!1),this._bufferService.scroll(R,L)},w.prototype.scrollLines=function(R,L,k){this._bufferService.scrollLines(R,L,k)},w.prototype.scrollPages=function(R){this._bufferService.scrollPages(R)},w.prototype.scrollToTop=function(){this._bufferService.scrollToTop()},w.prototype.scrollToBottom=function(){this._bufferService.scrollToBottom()},w.prototype.scrollToLine=function(R){this._bufferService.scrollToLine(R)},w.prototype.registerEscHandler=function(R,L){return this._inputHandler.registerEscHandler(R,L)},w.prototype.registerDcsHandler=function(R,L){return this._inputHandler.registerDcsHandler(R,L)},w.prototype.registerCsiHandler=function(R,L){return this._inputHandler.registerCsiHandler(R,L)},w.prototype.registerOscHandler=function(R,L){return this._inputHandler.registerOscHandler(R,L)},w.prototype._setup=function(){this.optionsService.rawOptions.windowsMode&&this._enableWindowsMode()},w.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()},w.prototype._updateOptions=function(R){var L;switch(R){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.rawOptions.windowsMode?this._enableWindowsMode():((L=this._windowsMode)===null||L===void 0||L.dispose(),this._windowsMode=void 0)}},w.prototype._enableWindowsMode=function(){var R=this;if(!this._windowsMode){var L=[];L.push(this.onLineFeed(l.updateWindowsModeWrappedState.bind(null,this._bufferService))),L.push(this.registerCsiHandler({final:"H"},function(){return(0,l.updateWindowsModeWrappedState)(R._bufferService),!1})),this._windowsMode={dispose:function(){var k,E;try{for(var x=d(L),M=x.next();!M.done;M=x.next())M.value.dispose()}catch(T){k={error:T}}finally{try{M&&!M.done&&(E=x.return)&&E.call(x)}finally{if(k)throw k.error}}}}}},w}(_.Disposable);o.CoreTerminal=y},8460:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.forwardEvent=o.EventEmitter=void 0;var b=function(){function f(){this._listeners=[],this._disposed=!1}return Object.defineProperty(f.prototype,"event",{get:function(){var u=this;return this._event||(this._event=function(d){return u._listeners.push(d),{dispose:function(){if(!u._disposed){for(var _=0;_<u._listeners.length;_++)if(u._listeners[_]===d)return void u._listeners.splice(_,1)}}}}),this._event},enumerable:!1,configurable:!0}),f.prototype.fire=function(u,d){for(var _=[],m=0;m<this._listeners.length;m++)_.push(this._listeners[m]);for(m=0;m<_.length;m++)_[m].call(void 0,u,d)},f.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},f}();o.EventEmitter=b,o.forwardEvent=function(f,u){return f(function(d){return u.fire(d)})}},5435:function(P,o,b){var f,u=this&&this.__extends||(f=function(L,k){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,x){E.__proto__=x}||function(E,x){for(var M in x)Object.prototype.hasOwnProperty.call(x,M)&&(E[M]=x[M])},f(L,k)},function(L,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");function E(){this.constructor=L}f(L,k),L.prototype=k===null?Object.create(k):(E.prototype=k.prototype,new E)});Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;var d,_=b(2584),m=b(7116),v=b(2015),s=b(844),a=b(8273),p=b(482),h=b(8437),r=b(8460),e=b(643),t=b(511),i=b(3734),n=b(2585),l=b(6242),c=b(6351),g=b(5941),C={"(":0,")":1,"*":2,"+":3,"-":1,".":2},y=131072;function S(L,k){if(L>24)return k.setWinLines||!1;switch(L){case 1:return!!k.restoreWin;case 2:return!!k.minimizeWin;case 3:return!!k.setWinPosition;case 4:return!!k.setWinSizePixels;case 5:return!!k.raiseWin;case 6:return!!k.lowerWin;case 7:return!!k.refreshWin;case 8:return!!k.setWinSizeChars;case 9:return!!k.maximizeWin;case 10:return!!k.fullscreenWin;case 11:return!!k.getWinState;case 13:return!!k.getWinPosition;case 14:return!!k.getWinSizePixels;case 15:return!!k.getScreenSizePixels;case 16:return!!k.getCellSizePixels;case 18:return!!k.getWinSizeChars;case 19:return!!k.getScreenSizeChars;case 20:return!!k.getIconTitle;case 21:return!!k.getWinTitle;case 22:return!!k.pushTitle;case 23:return!!k.popTitle;case 24:return!!k.setWinLines}return!1}(function(L){L[L.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",L[L.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(d=o.WindowsOptionsReportType||(o.WindowsOptionsReportType={}));var w=function(){function L(k,E,x,M){this._bufferService=k,this._coreService=E,this._logService=x,this._optionsService=M,this._data=new Uint32Array(0)}return L.prototype.hook=function(k){this._data=new Uint32Array(0)},L.prototype.put=function(k,E,x){this._data=(0,a.concat)(this._data,k.subarray(E,x))},L.prototype.unhook=function(k){if(!k)return this._data=new Uint32Array(0),!0;var E=(0,p.utf32ToString)(this._data);switch(this._data=new Uint32Array(0),E){case'"q':this._coreService.triggerDataEvent(_.C0.ESC+'P1$r0"q'+_.C0.ESC+"\\");break;case'"p':this._coreService.triggerDataEvent(_.C0.ESC+'P1$r61;1"p'+_.C0.ESC+"\\");break;case"r":var x=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";this._coreService.triggerDataEvent(_.C0.ESC+"P1$r"+x+_.C0.ESC+"\\");break;case"m":this._coreService.triggerDataEvent(_.C0.ESC+"P1$r0m"+_.C0.ESC+"\\");break;case" q":var M={block:2,underline:4,bar:6}[this._optionsService.rawOptions.cursorStyle];M-=this._optionsService.rawOptions.cursorBlink?1:0,this._coreService.triggerDataEvent(_.C0.ESC+"P1$r"+M+" q"+_.C0.ESC+"\\");break;default:this._logService.debug("Unknown DCS $q %s",E),this._coreService.triggerDataEvent(_.C0.ESC+"P0$r"+_.C0.ESC+"\\")}return!0},L}(),R=function(L){function k(E,x,M,T,U,q,F,z,N){N===void 0&&(N=new v.EscapeSequenceParser);var A=L.call(this)||this;A._bufferService=E,A._charsetService=x,A._coreService=M,A._dirtyRowService=T,A._logService=U,A._optionsService=q,A._coreMouseService=F,A._unicodeService=z,A._parser=N,A._parseBuffer=new Uint32Array(4096),A._stringDecoder=new p.StringToUtf32,A._utf8Decoder=new p.Utf8ToUtf32,A._workCell=new t.CellData,A._windowTitle="",A._iconName="",A._windowTitleStack=[],A._iconNameStack=[],A._curAttrData=h.DEFAULT_ATTR_DATA.clone(),A._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone(),A._onRequestBell=new r.EventEmitter,A._onRequestRefreshRows=new r.EventEmitter,A._onRequestReset=new r.EventEmitter,A._onRequestSendFocus=new r.EventEmitter,A._onRequestSyncScrollBar=new r.EventEmitter,A._onRequestWindowsOptionsReport=new r.EventEmitter,A._onA11yChar=new r.EventEmitter,A._onA11yTab=new r.EventEmitter,A._onCursorMove=new r.EventEmitter,A._onLineFeed=new r.EventEmitter,A._onScroll=new r.EventEmitter,A._onTitleChange=new r.EventEmitter,A._onColor=new r.EventEmitter,A._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},A._specialColors=[256,257,258],A.register(A._parser),A._activeBuffer=A._bufferService.buffer,A.register(A._bufferService.buffers.onBufferActivate(function(B){return A._activeBuffer=B.activeBuffer})),A._parser.setCsiHandlerFallback(function(B,ne){A._logService.debug("Unknown CSI code: ",{identifier:A._parser.identToString(B),params:ne.toArray()})}),A._parser.setEscHandlerFallback(function(B){A._logService.debug("Unknown ESC code: ",{identifier:A._parser.identToString(B)})}),A._parser.setExecuteHandlerFallback(function(B){A._logService.debug("Unknown EXECUTE code: ",{code:B})}),A._parser.setOscHandlerFallback(function(B,ne,X){A._logService.debug("Unknown OSC code: ",{identifier:B,action:ne,data:X})}),A._parser.setDcsHandlerFallback(function(B,ne,X){ne==="HOOK"&&(X=X.toArray()),A._logService.debug("Unknown DCS code: ",{identifier:A._parser.identToString(B),action:ne,payload:X})}),A._parser.setPrintHandler(function(B,ne,X){return A.print(B,ne,X)}),A._parser.registerCsiHandler({final:"@"},function(B){return A.insertChars(B)}),A._parser.registerCsiHandler({intermediates:" ",final:"@"},function(B){return A.scrollLeft(B)}),A._parser.registerCsiHandler({final:"A"},function(B){return A.cursorUp(B)}),A._parser.registerCsiHandler({intermediates:" ",final:"A"},function(B){return A.scrollRight(B)}),A._parser.registerCsiHandler({final:"B"},function(B){return A.cursorDown(B)}),A._parser.registerCsiHandler({final:"C"},function(B){return A.cursorForward(B)}),A._parser.registerCsiHandler({final:"D"},function(B){return A.cursorBackward(B)}),A._parser.registerCsiHandler({final:"E"},function(B){return A.cursorNextLine(B)}),A._parser.registerCsiHandler({final:"F"},function(B){return A.cursorPrecedingLine(B)}),A._parser.registerCsiHandler({final:"G"},function(B){return A.cursorCharAbsolute(B)}),A._parser.registerCsiHandler({final:"H"},function(B){return A.cursorPosition(B)}),A._parser.registerCsiHandler({final:"I"},function(B){return A.cursorForwardTab(B)}),A._parser.registerCsiHandler({final:"J"},function(B){return A.eraseInDisplay(B)}),A._parser.registerCsiHandler({prefix:"?",final:"J"},function(B){return A.eraseInDisplay(B)}),A._parser.registerCsiHandler({final:"K"},function(B){return A.eraseInLine(B)}),A._parser.registerCsiHandler({prefix:"?",final:"K"},function(B){return A.eraseInLine(B)}),A._parser.registerCsiHandler({final:"L"},function(B){return A.insertLines(B)}),A._parser.registerCsiHandler({final:"M"},function(B){return A.deleteLines(B)}),A._parser.registerCsiHandler({final:"P"},function(B){return A.deleteChars(B)}),A._parser.registerCsiHandler({final:"S"},function(B){return A.scrollUp(B)}),A._parser.registerCsiHandler({final:"T"},function(B){return A.scrollDown(B)}),A._parser.registerCsiHandler({final:"X"},function(B){return A.eraseChars(B)}),A._parser.registerCsiHandler({final:"Z"},function(B){return A.cursorBackwardTab(B)}),A._parser.registerCsiHandler({final:"`"},function(B){return A.charPosAbsolute(B)}),A._parser.registerCsiHandler({final:"a"},function(B){return A.hPositionRelative(B)}),A._parser.registerCsiHandler({final:"b"},function(B){return A.repeatPrecedingCharacter(B)}),A._parser.registerCsiHandler({final:"c"},function(B){return A.sendDeviceAttributesPrimary(B)}),A._parser.registerCsiHandler({prefix:">",final:"c"},function(B){return A.sendDeviceAttributesSecondary(B)}),A._parser.registerCsiHandler({final:"d"},function(B){return A.linePosAbsolute(B)}),A._parser.registerCsiHandler({final:"e"},function(B){return A.vPositionRelative(B)}),A._parser.registerCsiHandler({final:"f"},function(B){return A.hVPosition(B)}),A._parser.registerCsiHandler({final:"g"},function(B){return A.tabClear(B)}),A._parser.registerCsiHandler({final:"h"},function(B){return A.setMode(B)}),A._parser.registerCsiHandler({prefix:"?",final:"h"},function(B){return A.setModePrivate(B)}),A._parser.registerCsiHandler({final:"l"},function(B){return A.resetMode(B)}),A._parser.registerCsiHandler({prefix:"?",final:"l"},function(B){return A.resetModePrivate(B)}),A._parser.registerCsiHandler({final:"m"},function(B){return A.charAttributes(B)}),A._parser.registerCsiHandler({final:"n"},function(B){return A.deviceStatus(B)}),A._parser.registerCsiHandler({prefix:"?",final:"n"},function(B){return A.deviceStatusPrivate(B)}),A._parser.registerCsiHandler({intermediates:"!",final:"p"},function(B){return A.softReset(B)}),A._parser.registerCsiHandler({intermediates:" ",final:"q"},function(B){return A.setCursorStyle(B)}),A._parser.registerCsiHandler({final:"r"},function(B){return A.setScrollRegion(B)}),A._parser.registerCsiHandler({final:"s"},function(B){return A.saveCursor(B)}),A._parser.registerCsiHandler({final:"t"},function(B){return A.windowOptions(B)}),A._parser.registerCsiHandler({final:"u"},function(B){return A.restoreCursor(B)}),A._parser.registerCsiHandler({intermediates:"'",final:"}"},function(B){return A.insertColumns(B)}),A._parser.registerCsiHandler({intermediates:"'",final:"~"},function(B){return A.deleteColumns(B)}),A._parser.setExecuteHandler(_.C0.BEL,function(){return A.bell()}),A._parser.setExecuteHandler(_.C0.LF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(_.C0.VT,function(){return A.lineFeed()}),A._parser.setExecuteHandler(_.C0.FF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(_.C0.CR,function(){return A.carriageReturn()}),A._parser.setExecuteHandler(_.C0.BS,function(){return A.backspace()}),A._parser.setExecuteHandler(_.C0.HT,function(){return A.tab()}),A._parser.setExecuteHandler(_.C0.SO,function(){return A.shiftOut()}),A._parser.setExecuteHandler(_.C0.SI,function(){return A.shiftIn()}),A._parser.setExecuteHandler(_.C1.IND,function(){return A.index()}),A._parser.setExecuteHandler(_.C1.NEL,function(){return A.nextLine()}),A._parser.setExecuteHandler(_.C1.HTS,function(){return A.tabSet()}),A._parser.registerOscHandler(0,new l.OscHandler(function(B){return A.setTitle(B),A.setIconName(B),!0})),A._parser.registerOscHandler(1,new l.OscHandler(function(B){return A.setIconName(B)})),A._parser.registerOscHandler(2,new l.OscHandler(function(B){return A.setTitle(B)})),A._parser.registerOscHandler(4,new l.OscHandler(function(B){return A.setOrReportIndexedColor(B)})),A._parser.registerOscHandler(10,new l.OscHandler(function(B){return A.setOrReportFgColor(B)})),A._parser.registerOscHandler(11,new l.OscHandler(function(B){return A.setOrReportBgColor(B)})),A._parser.registerOscHandler(12,new l.OscHandler(function(B){return A.setOrReportCursorColor(B)})),A._parser.registerOscHandler(104,new l.OscHandler(function(B){return A.restoreIndexedColor(B)})),A._parser.registerOscHandler(110,new l.OscHandler(function(B){return A.restoreFgColor(B)})),A._parser.registerOscHandler(111,new l.OscHandler(function(B){return A.restoreBgColor(B)})),A._parser.registerOscHandler(112,new l.OscHandler(function(B){return A.restoreCursorColor(B)})),A._parser.registerEscHandler({final:"7"},function(){return A.saveCursor()}),A._parser.registerEscHandler({final:"8"},function(){return A.restoreCursor()}),A._parser.registerEscHandler({final:"D"},function(){return A.index()}),A._parser.registerEscHandler({final:"E"},function(){return A.nextLine()}),A._parser.registerEscHandler({final:"H"},function(){return A.tabSet()}),A._parser.registerEscHandler({final:"M"},function(){return A.reverseIndex()}),A._parser.registerEscHandler({final:"="},function(){return A.keypadApplicationMode()}),A._parser.registerEscHandler({final:">"},function(){return A.keypadNumericMode()}),A._parser.registerEscHandler({final:"c"},function(){return A.fullReset()}),A._parser.registerEscHandler({final:"n"},function(){return A.setgLevel(2)}),A._parser.registerEscHandler({final:"o"},function(){return A.setgLevel(3)}),A._parser.registerEscHandler({final:"|"},function(){return A.setgLevel(3)}),A._parser.registerEscHandler({final:"}"},function(){return A.setgLevel(2)}),A._parser.registerEscHandler({final:"~"},function(){return A.setgLevel(1)}),A._parser.registerEscHandler({intermediates:"%",final:"@"},function(){return A.selectDefaultCharset()}),A._parser.registerEscHandler({intermediates:"%",final:"G"},function(){return A.selectDefaultCharset()});var $=function(B){J._parser.registerEscHandler({intermediates:"(",final:B},function(){return A.selectCharset("("+B)}),J._parser.registerEscHandler({intermediates:")",final:B},function(){return A.selectCharset(")"+B)}),J._parser.registerEscHandler({intermediates:"*",final:B},function(){return A.selectCharset("*"+B)}),J._parser.registerEscHandler({intermediates:"+",final:B},function(){return A.selectCharset("+"+B)}),J._parser.registerEscHandler({intermediates:"-",final:B},function(){return A.selectCharset("-"+B)}),J._parser.registerEscHandler({intermediates:".",final:B},function(){return A.selectCharset("."+B)}),J._parser.registerEscHandler({intermediates:"/",final:B},function(){return A.selectCharset("/"+B)})},J=this;for(var oe in m.CHARSETS)$(oe);return A._parser.registerEscHandler({intermediates:"#",final:"8"},function(){return A.screenAlignmentPattern()}),A._parser.setErrorHandler(function(B){return A._logService.error("Parsing error: ",B),B}),A._parser.registerDcsHandler({intermediates:"$",final:"q"},new w(A._bufferService,A._coreService,A._logService,A._optionsService)),A}return u(k,L),Object.defineProperty(k.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestSendFocus",{get:function(){return this._onRequestSendFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onColor",{get:function(){return this._onColor.event},enumerable:!1,configurable:!0}),k.prototype.dispose=function(){L.prototype.dispose.call(this)},k.prototype._preserveStack=function(E,x,M,T){this._parseStack.paused=!0,this._parseStack.cursorStartX=E,this._parseStack.cursorStartY=x,this._parseStack.decodedLength=M,this._parseStack.position=T},k.prototype._logSlowResolvingAsync=function(E){this._logService.logLevel<=n.LogLevelEnum.WARN&&Promise.race([E,new Promise(function(x,M){return setTimeout(function(){return M("#SLOW_TIMEOUT")},5e3)})]).catch(function(x){if(x!=="#SLOW_TIMEOUT")throw x;console.warn("async parser handler taking longer than 5000 ms")})},k.prototype.parse=function(E,x){var M,T=this._activeBuffer.x,U=this._activeBuffer.y,q=0,F=this._parseStack.paused;if(F){if(M=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,x))return this._logSlowResolvingAsync(M),M;T=this._parseStack.cursorStartX,U=this._parseStack.cursorStartY,this._parseStack.paused=!1,E.length>y&&(q=this._parseStack.position+y)}if(this._logService.logLevel<=n.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof E=="string"?' "'+E+'"':' "'+Array.prototype.map.call(E,function($){return String.fromCharCode($)}).join("")+'"'),typeof E=="string"?E.split("").map(function($){return $.charCodeAt(0)}):E),this._parseBuffer.length<E.length&&this._parseBuffer.length<y&&(this._parseBuffer=new Uint32Array(Math.min(E.length,y))),F||this._dirtyRowService.clearRange(),E.length>y)for(var z=q;z<E.length;z+=y){var N=z+y<E.length?z+y:E.length,A=typeof E=="string"?this._stringDecoder.decode(E.substring(z,N),this._parseBuffer):this._utf8Decoder.decode(E.subarray(z,N),this._parseBuffer);if(M=this._parser.parse(this._parseBuffer,A))return this._preserveStack(T,U,A,z),this._logSlowResolvingAsync(M),M}else if(!F&&(A=typeof E=="string"?this._stringDecoder.decode(E,this._parseBuffer):this._utf8Decoder.decode(E,this._parseBuffer),M=this._parser.parse(this._parseBuffer,A)))return this._preserveStack(T,U,A,0),this._logSlowResolvingAsync(M),M;this._activeBuffer.x===T&&this._activeBuffer.y===U||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},k.prototype.print=function(E,x,M){var T,U,q=this._charsetService.charset,F=this._optionsService.rawOptions.screenReaderMode,z=this._bufferService.cols,N=this._coreService.decPrivateModes.wraparound,A=this._coreService.modes.insertMode,$=this._curAttrData,J=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowService.markDirty(this._activeBuffer.y),this._activeBuffer.x&&M-x>0&&J.getWidth(this._activeBuffer.x-1)===2&&J.setCellFromCodePoint(this._activeBuffer.x-1,0,1,$.fg,$.bg,$.extended);for(var oe=x;oe<M;++oe){if(T=E[oe],U=this._unicodeService.wcwidth(T),T<127&&q){var B=q[String.fromCharCode(T)];B&&(T=B.charCodeAt(0))}if(F&&this._onA11yChar.fire((0,p.stringFromCodePoint)(T)),U||!this._activeBuffer.x){if(this._activeBuffer.x+U-1>=z){if(N){for(;this._activeBuffer.x<z;)J.setCellFromCodePoint(this._activeBuffer.x++,0,1,$.fg,$.bg,$.extended);this._activeBuffer.x=0,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),J=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=z-1,U===2)continue}if(A&&(J.insertCells(this._activeBuffer.x,U,this._activeBuffer.getNullCell($),$),J.getWidth(z-1)===2&&J.setCellFromCodePoint(z-1,e.NULL_CELL_CODE,e.NULL_CELL_WIDTH,$.fg,$.bg,$.extended)),J.setCellFromCodePoint(this._activeBuffer.x++,T,U,$.fg,$.bg,$.extended),U>0)for(;--U;)J.setCellFromCodePoint(this._activeBuffer.x++,0,0,$.fg,$.bg,$.extended)}else J.getWidth(this._activeBuffer.x-1)?J.addCodepointToCell(this._activeBuffer.x-1,T):J.addCodepointToCell(this._activeBuffer.x-2,T)}M-x>0&&(J.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<z&&M-x>0&&J.getWidth(this._activeBuffer.x)===0&&!J.hasContent(this._activeBuffer.x)&&J.setCellFromCodePoint(this._activeBuffer.x,0,1,$.fg,$.bg,$.extended),this._dirtyRowService.markDirty(this._activeBuffer.y)},k.prototype.registerCsiHandler=function(E,x){var M=this;return E.final!=="t"||E.prefix||E.intermediates?this._parser.registerCsiHandler(E,x):this._parser.registerCsiHandler(E,function(T){return!S(T.params[0],M._optionsService.rawOptions.windowOptions)||x(T)})},k.prototype.registerDcsHandler=function(E,x){return this._parser.registerDcsHandler(E,new c.DcsHandler(x))},k.prototype.registerEscHandler=function(E,x){return this._parser.registerEscHandler(E,x)},k.prototype.registerOscHandler=function(E,x){return this._parser.registerOscHandler(E,new l.OscHandler(x))},k.prototype.bell=function(){return this._onRequestBell.fire(),!0},k.prototype.lineFeed=function(){return this._dirtyRowService.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.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowService.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0},k.prototype.carriageReturn=function(){return this._activeBuffer.x=0,!0},k.prototype.backspace=function(){var E;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&&(!((E=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||E===void 0)&&E.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;var x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);x.hasWidth(this._activeBuffer.x)&&!x.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0},k.prototype.tab=function(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;var E=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-E),!0},k.prototype.shiftOut=function(){return this._charsetService.setgLevel(1),!0},k.prototype.shiftIn=function(){return this._charsetService.setgLevel(0),!0},k.prototype._restrictCursor=function(E){E===void 0&&(E=this._bufferService.cols-1),this._activeBuffer.x=Math.min(E,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._dirtyRowService.markDirty(this._activeBuffer.y)},k.prototype._setCursor=function(E,x){this._dirtyRowService.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=E,this._activeBuffer.y=this._activeBuffer.scrollTop+x):(this._activeBuffer.x=E,this._activeBuffer.y=x),this._restrictCursor(),this._dirtyRowService.markDirty(this._activeBuffer.y)},k.prototype._moveCursor=function(E,x){this._restrictCursor(),this._setCursor(this._activeBuffer.x+E,this._activeBuffer.y+x)},k.prototype.cursorUp=function(E){var x=this._activeBuffer.y-this._activeBuffer.scrollTop;return x>=0?this._moveCursor(0,-Math.min(x,E.params[0]||1)):this._moveCursor(0,-(E.params[0]||1)),!0},k.prototype.cursorDown=function(E){var x=this._activeBuffer.scrollBottom-this._activeBuffer.y;return x>=0?this._moveCursor(0,Math.min(x,E.params[0]||1)):this._moveCursor(0,E.params[0]||1),!0},k.prototype.cursorForward=function(E){return this._moveCursor(E.params[0]||1,0),!0},k.prototype.cursorBackward=function(E){return this._moveCursor(-(E.params[0]||1),0),!0},k.prototype.cursorNextLine=function(E){return this.cursorDown(E),this._activeBuffer.x=0,!0},k.prototype.cursorPrecedingLine=function(E){return this.cursorUp(E),this._activeBuffer.x=0,!0},k.prototype.cursorCharAbsolute=function(E){return this._setCursor((E.params[0]||1)-1,this._activeBuffer.y),!0},k.prototype.cursorPosition=function(E){return this._setCursor(E.length>=2?(E.params[1]||1)-1:0,(E.params[0]||1)-1),!0},k.prototype.charPosAbsolute=function(E){return this._setCursor((E.params[0]||1)-1,this._activeBuffer.y),!0},k.prototype.hPositionRelative=function(E){return this._moveCursor(E.params[0]||1,0),!0},k.prototype.linePosAbsolute=function(E){return this._setCursor(this._activeBuffer.x,(E.params[0]||1)-1),!0},k.prototype.vPositionRelative=function(E){return this._moveCursor(0,E.params[0]||1),!0},k.prototype.hVPosition=function(E){return this.cursorPosition(E),!0},k.prototype.tabClear=function(E){var x=E.params[0];return x===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:x===3&&(this._activeBuffer.tabs={}),!0},k.prototype.cursorForwardTab=function(E){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var x=E.params[0]||1;x--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0},k.prototype.cursorBackwardTab=function(E){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var x=E.params[0]||1;x--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0},k.prototype._eraseInBufferLine=function(E,x,M,T){T===void 0&&(T=!1);var U=this._activeBuffer.lines.get(this._activeBuffer.ybase+E);U.replaceCells(x,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T&&(U.isWrapped=!1)},k.prototype._resetBufferLine=function(E){var x=this._activeBuffer.lines.get(this._activeBuffer.ybase+E);x.fill(this._activeBuffer.getNullCell(this._eraseAttrData())),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+E),x.isWrapped=!1},k.prototype.eraseInDisplay=function(E){var x;switch(this._restrictCursor(this._bufferService.cols),E.params[0]){case 0:for(x=this._activeBuffer.y,this._dirtyRowService.markDirty(x),this._eraseInBufferLine(x++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);x<this._bufferService.rows;x++)this._resetBufferLine(x);this._dirtyRowService.markDirty(x);break;case 1:for(x=this._activeBuffer.y,this._dirtyRowService.markDirty(x),this._eraseInBufferLine(x,0,this._activeBuffer.x+1,!0),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(x+1).isWrapped=!1);x--;)this._resetBufferLine(x);this._dirtyRowService.markDirty(0);break;case 2:for(x=this._bufferService.rows,this._dirtyRowService.markDirty(x-1);x--;)this._resetBufferLine(x);this._dirtyRowService.markDirty(0);break;case 3:var M=this._activeBuffer.lines.length-this._bufferService.rows;M>0&&(this._activeBuffer.lines.trimStart(M),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-M,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-M,0),this._onScroll.fire(0))}return!0},k.prototype.eraseInLine=function(E){switch(this._restrictCursor(this._bufferService.cols),E.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0)}return this._dirtyRowService.markDirty(this._activeBuffer.y),!0},k.prototype.insertLines=function(E){this._restrictCursor();var x=E.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var M=this._activeBuffer.ybase+this._activeBuffer.y,T=this._bufferService.rows-1-this._activeBuffer.scrollBottom,U=this._bufferService.rows-1+this._activeBuffer.ybase-T+1;x--;)this._activeBuffer.lines.splice(U-1,1),this._activeBuffer.lines.splice(M,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},k.prototype.deleteLines=function(E){this._restrictCursor();var x=E.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;var M,T=this._activeBuffer.ybase+this._activeBuffer.y;for(M=this._bufferService.rows-1-this._activeBuffer.scrollBottom,M=this._bufferService.rows-1+this._activeBuffer.ybase-M;x--;)this._activeBuffer.lines.splice(T,1),this._activeBuffer.lines.splice(M,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},k.prototype.insertChars=function(E){this._restrictCursor();var x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return x&&(x.insertCells(this._activeBuffer.x,E.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},k.prototype.deleteChars=function(E){this._restrictCursor();var x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return x&&(x.deleteCells(this._activeBuffer.x,E.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},k.prototype.scrollUp=function(E){for(var x=E.params[0]||1;x--;)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._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.scrollDown=function(E){for(var x=E.params[0]||1;x--;)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(h.DEFAULT_ATTR_DATA));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.scrollLeft=function(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var x=E.params[0]||1,M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);T.deleteCells(0,x,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.scrollRight=function(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var x=E.params[0]||1,M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);T.insertCells(0,x,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.insertColumns=function(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var x=E.params[0]||1,M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);T.insertCells(this._activeBuffer.x,x,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.deleteColumns=function(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var x=E.params[0]||1,M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);T.deleteCells(this._activeBuffer.x,x,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.eraseChars=function(E){this._restrictCursor();var x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return x&&(x.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(E.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},k.prototype.repeatPrecedingCharacter=function(E){if(!this._parser.precedingCodepoint)return!0;for(var x=E.params[0]||1,M=new Uint32Array(x),T=0;T<x;++T)M[T]=this._parser.precedingCodepoint;return this.print(M,0,M.length),!0},k.prototype.sendDeviceAttributesPrimary=function(E){return E.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(_.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(_.C0.ESC+"[?6c")),!0},k.prototype.sendDeviceAttributesSecondary=function(E){return E.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(_.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(_.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(E.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(_.C0.ESC+"[>83;40003;0c")),!0},k.prototype._is=function(E){return(this._optionsService.rawOptions.termName+"").indexOf(E)===0},k.prototype.setMode=function(E){for(var x=0;x<E.length;x++)E.params[x]===4&&(this._coreService.modes.insertMode=!0);return!0},k.prototype.setModePrivate=function(E){for(var x=0;x<E.length;x++)switch(E.params[x]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),this._charsetService.setgCharset(1,m.DEFAULT_CHARSET),this._charsetService.setgCharset(2,m.DEFAULT_CHARSET),this._charsetService.setgCharset(3,m.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: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 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},k.prototype.resetMode=function(E){for(var x=0;x<E.length;x++)E.params[x]===4&&(this._coreService.modes.insertMode=!1);return!0},k.prototype.resetModePrivate=function(E){for(var x=0;x<E.length;x++)switch(E.params[x]){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: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: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(),E.params[x]===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},k.prototype._updateAttrColor=function(E,x,M,T,U){return x===2?(E|=50331648,E&=-16777216,E|=i.AttributeData.fromColorRGB([M,T,U])):x===5&&(E&=-50331904,E|=33554432|255&M),E},k.prototype._extractColor=function(E,x,M){var T=[0,0,-1,0,0,0],U=0,q=0;do{if(T[q+U]=E.params[x+q],E.hasSubParams(x+q)){var F=E.getSubParams(x+q),z=0;do T[1]===5&&(U=1),T[q+z+1+U]=F[z];while(++z<F.length&&z+q+1+U<T.length);break}if(T[1]===5&&q+U>=2||T[1]===2&&q+U>=5)break;T[1]&&(U=1)}while(++q+x<E.length&&q+U<T.length);for(z=2;z<T.length;++z)T[z]===-1&&(T[z]=0);switch(T[0]){case 38:M.fg=this._updateAttrColor(M.fg,T[1],T[3],T[4],T[5]);break;case 48:M.bg=this._updateAttrColor(M.bg,T[1],T[3],T[4],T[5]);break;case 58:M.extended=M.extended.clone(),M.extended.underlineColor=this._updateAttrColor(M.extended.underlineColor,T[1],T[3],T[4],T[5])}return q},k.prototype._processUnderline=function(E,x){x.extended=x.extended.clone(),(!~E||E>5)&&(E=1),x.extended.underlineStyle=E,x.fg|=268435456,E===0&&(x.fg&=-268435457),x.updateExtended()},k.prototype.charAttributes=function(E){if(E.length===1&&E.params[0]===0)return this._curAttrData.fg=h.DEFAULT_ATTR_DATA.fg,this._curAttrData.bg=h.DEFAULT_ATTR_DATA.bg,!0;for(var x,M=E.length,T=this._curAttrData,U=0;U<M;U++)(x=E.params[U])>=30&&x<=37?(T.fg&=-50331904,T.fg|=16777216|x-30):x>=40&&x<=47?(T.bg&=-50331904,T.bg|=16777216|x-40):x>=90&&x<=97?(T.fg&=-50331904,T.fg|=16777224|x-90):x>=100&&x<=107?(T.bg&=-50331904,T.bg|=16777224|x-100):x===0?(T.fg=h.DEFAULT_ATTR_DATA.fg,T.bg=h.DEFAULT_ATTR_DATA.bg):x===1?T.fg|=134217728:x===3?T.bg|=67108864:x===4?(T.fg|=268435456,this._processUnderline(E.hasSubParams(U)?E.getSubParams(U)[0]:1,T)):x===5?T.fg|=536870912:x===7?T.fg|=67108864:x===8?T.fg|=1073741824:x===9?T.fg|=2147483648:x===2?T.bg|=134217728:x===21?this._processUnderline(2,T):x===22?(T.fg&=-134217729,T.bg&=-134217729):x===23?T.bg&=-67108865:x===24?T.fg&=-268435457:x===25?T.fg&=-536870913:x===27?T.fg&=-67108865:x===28?T.fg&=-1073741825:x===29?T.fg&=2147483647:x===39?(T.fg&=-67108864,T.fg|=16777215&h.DEFAULT_ATTR_DATA.fg):x===49?(T.bg&=-67108864,T.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):x===38||x===48||x===58?U+=this._extractColor(E,U,T):x===59?(T.extended=T.extended.clone(),T.extended.underlineColor=-1,T.updateExtended()):x===100?(T.fg&=-67108864,T.fg|=16777215&h.DEFAULT_ATTR_DATA.fg,T.bg&=-67108864,T.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",x);return!0},k.prototype.deviceStatus=function(E){switch(E.params[0]){case 5:this._coreService.triggerDataEvent(_.C0.ESC+"[0n");break;case 6:var x=this._activeBuffer.y+1,M=this._activeBuffer.x+1;this._coreService.triggerDataEvent(_.C0.ESC+"["+x+";"+M+"R")}return!0},k.prototype.deviceStatusPrivate=function(E){if(E.params[0]===6){var x=this._activeBuffer.y+1,M=this._activeBuffer.x+1;this._coreService.triggerDataEvent(_.C0.ESC+"[?"+x+";"+M+"R")}return!0},k.prototype.softReset=function(E){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=h.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},k.prototype.setCursorStyle=function(E){var x=E.params[0]||1;switch(x){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"}var M=x%2==1;return this._optionsService.options.cursorBlink=M,!0},k.prototype.setScrollRegion=function(E){var x,M=E.params[0]||1;return(E.length<2||(x=E.params[1])>this._bufferService.rows||x===0)&&(x=this._bufferService.rows),x>M&&(this._activeBuffer.scrollTop=M-1,this._activeBuffer.scrollBottom=x-1,this._setCursor(0,0)),!0},k.prototype.windowOptions=function(E){if(!S(E.params[0],this._optionsService.rawOptions.windowOptions))return!0;var x=E.length>1?E.params[1]:0;switch(E.params[0]){case 14:x!==2&&this._onRequestWindowsOptionsReport.fire(d.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(d.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(_.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:x!==0&&x!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),x!==0&&x!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:x!==0&&x!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),x!==0&&x!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0},k.prototype.saveCursor=function(E){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},k.prototype.restoreCursor=function(E){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},k.prototype.setTitle=function(E){return this._windowTitle=E,this._onTitleChange.fire(E),!0},k.prototype.setIconName=function(E){return this._iconName=E,!0},k.prototype.setOrReportIndexedColor=function(E){for(var x=[],M=E.split(";");M.length>1;){var T=M.shift(),U=M.shift();if(/^\d+$/.exec(T)){var q=parseInt(T);if(0<=q&&q<256)if(U==="?")x.push({type:0,index:q});else{var F=(0,g.parseColor)(U);F&&x.push({type:1,index:q,color:F})}}}return x.length&&this._onColor.fire(x),!0},k.prototype._setOrReportSpecialColor=function(E,x){for(var M=E.split(";"),T=0;T<M.length&&!(x>=this._specialColors.length);++T,++x)if(M[T]==="?")this._onColor.fire([{type:0,index:this._specialColors[x]}]);else{var U=(0,g.parseColor)(M[T]);U&&this._onColor.fire([{type:1,index:this._specialColors[x],color:U}])}return!0},k.prototype.setOrReportFgColor=function(E){return this._setOrReportSpecialColor(E,0)},k.prototype.setOrReportBgColor=function(E){return this._setOrReportSpecialColor(E,1)},k.prototype.setOrReportCursorColor=function(E){return this._setOrReportSpecialColor(E,2)},k.prototype.restoreIndexedColor=function(E){if(!E)return this._onColor.fire([{type:2}]),!0;for(var x=[],M=E.split(";"),T=0;T<M.length;++T)if(/^\d+$/.exec(M[T])){var U=parseInt(M[T]);0<=U&&U<256&&x.push({type:2,index:U})}return x.length&&this._onColor.fire(x),!0},k.prototype.restoreFgColor=function(E){return this._onColor.fire([{type:2,index:256}]),!0},k.prototype.restoreBgColor=function(E){return this._onColor.fire([{type:2,index:257}]),!0},k.prototype.restoreCursorColor=function(E){return this._onColor.fire([{type:2,index:258}]),!0},k.prototype.nextLine=function(){return this._activeBuffer.x=0,this.index(),!0},k.prototype.keypadApplicationMode=function(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0},k.prototype.keypadNumericMode=function(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0},k.prototype.selectDefaultCharset=function(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),!0},k.prototype.selectCharset=function(E){return E.length!==2?(this.selectDefaultCharset(),!0):(E[0]==="/"||this._charsetService.setgCharset(C[E[0]],m.CHARSETS[E[1]]||m.DEFAULT_CHARSET),!0)},k.prototype.index=function(){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},k.prototype.tabSet=function(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0},k.prototype.reverseIndex=function(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){var E=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,E,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0},k.prototype.fullReset=function(){return this._parser.reset(),this._onRequestReset.fire(),!0},k.prototype.reset=function(){this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone()},k.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},k.prototype.setgLevel=function(E){return this._charsetService.setgLevel(E),!0},k.prototype.screenAlignmentPattern=function(){var E=new t.CellData;E.content=1<<22|69,E.fg=this._curAttrData.fg,E.bg=this._curAttrData.bg,this._setCursor(0,0);for(var x=0;x<this._bufferService.rows;++x){var M=this._activeBuffer.ybase+this._activeBuffer.y+x,T=this._activeBuffer.lines.get(M);T&&(T.fill(E),T.isWrapped=!1)}return this._dirtyRowService.markAllDirty(),this._setCursor(0,0),!0},k}(s.Disposable);o.InputHandler=R},844:function(P,o){var b=this&&this.__values||function(d){var _=typeof Symbol=="function"&&Symbol.iterator,m=_&&d[_],v=0;if(m)return m.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&v>=d.length&&(d=void 0),{value:d&&d[v++],done:!d}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.Disposable=void 0;var f=function(){function d(){this._disposables=[],this._isDisposed=!1}return d.prototype.dispose=function(){var _,m;this._isDisposed=!0;try{for(var v=b(this._disposables),s=v.next();!s.done;s=v.next())s.value.dispose()}catch(a){_={error:a}}finally{try{s&&!s.done&&(m=v.return)&&m.call(v)}finally{if(_)throw _.error}}this._disposables.length=0},d.prototype.register=function(_){return this._disposables.push(_),_},d.prototype.unregister=function(_){var m=this._disposables.indexOf(_);m!==-1&&this._disposables.splice(m,1)},d}();function u(d){var _,m;try{for(var v=b(d),s=v.next();!s.done;s=v.next())s.value.dispose()}catch(a){_={error:a}}finally{try{s&&!s.done&&(m=v.return)&&m.call(v)}finally{if(_)throw _.error}}d.length=0}o.Disposable=f,o.disposeArray=u,o.getDisposeArrayDisposable=function(d){return{dispose:function(){return u(d)}}}},6114:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.isSafari=o.isLegacyEdge=o.isFirefox=void 0;var b=typeof navigator>"u",f=b?"node":navigator.userAgent,u=b?"node":navigator.platform;o.isFirefox=f.includes("Firefox"),o.isLegacyEdge=f.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(f),o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),o.isIpad=u==="iPad",o.isIphone=u==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),o.isLinux=u.indexOf("Linux")>=0},6106:function(P,o){var b=this&&this.__generator||function(u,d){var _,m,v,s,a={label:0,sent:function(){if(1&v[0])throw v[1];return v[1]},trys:[],ops:[]};return s={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function p(h){return function(r){return function(e){if(_)throw new TypeError("Generator is already executing.");for(;a;)try{if(_=1,m&&(v=2&e[0]?m.return:e[0]?m.throw||((v=m.return)&&v.call(m),0):m.next)&&!(v=v.call(m,e[1])).done)return v;switch(m=0,v&&(e=[2&e[0],v.value]),e[0]){case 0:case 1:v=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,m=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((v=(v=a.trys).length>0&&v[v.length-1])||e[0]!==6&&e[0]!==2)){a=0;continue}if(e[0]===3&&(!v||e[1]>v[0]&&e[1]<v[3])){a.label=e[1];break}if(e[0]===6&&a.label<v[1]){a.label=v[1],v=e;break}if(v&&a.label<v[2]){a.label=v[2],a.ops.push(e);break}v[2]&&a.ops.pop(),a.trys.pop();continue}e=d.call(u,a)}catch(t){e=[6,t],m=0}finally{_=v=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([h,r])}}};Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;var f=function(){function u(d){this._getKey=d,this._array=[]}return u.prototype.clear=function(){this._array.length=0},u.prototype.insert=function(d){if(this._array.length!==0){var _=this._search(this._getKey(d),0,this._array.length-1);this._array.splice(_,0,d)}else this._array.push(d)},u.prototype.delete=function(d){if(this._array.length===0)return!1;var _=this._getKey(d),m=this._search(_,0,this._array.length-1);if(this._getKey(this._array[m])!==_)return!1;do if(this._array[m]===d)return this._array.splice(m,1),!0;while(++m<this._array.length&&this._getKey(this._array[m])===_);return!1},u.prototype.getKeyIterator=function(d){var _;return b(this,function(m){switch(m.label){case 0:if(this._array.length===0)return[2];if((_=this._search(d,0,this._array.length-1))<0||_>=this._array.length)return[2];if(this._getKey(this._array[_])!==d)return[2];m.label=1;case 1:return[4,this._array[_]];case 2:m.sent(),m.label=3;case 3:if(++_<this._array.length&&this._getKey(this._array[_])===d)return[3,1];m.label=4;case 4:return[2]}})},u.prototype.values=function(){return this._array.values()},u.prototype._search=function(d,_,m){if(m<_)return _;var v=Math.floor((_+m)/2);if(this._getKey(this._array[v])>d)return this._search(d,_,v-1);if(this._getKey(this._array[v])<d)return this._search(d,v+1,m);for(;v>0&&this._getKey(this._array[v-1])===d;)v--;return v},u}();o.SortedList=f},8273:(P,o)=>{function b(f,u,d,_){if(d===void 0&&(d=0),_===void 0&&(_=f.length),d>=f.length)return f;d=(f.length+d)%f.length,_=_>=f.length?f.length:(f.length+_)%f.length;for(var m=d;m<_;++m)f[m]=u;return f}Object.defineProperty(o,"__esModule",{value:!0}),o.concat=o.fillFallback=o.fill=void 0,o.fill=function(f,u,d,_){return f.fill?f.fill(u,d,_):b(f,u,d,_)},o.fillFallback=b,o.concat=function(f,u){var d=new f.constructor(f.length+u.length);return d.set(f),d.set(u,f.length),d}},9282:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;var f=b(643);o.updateWindowsModeWrappedState=function(u){var d=u.buffer.lines.get(u.buffer.ybase+u.buffer.y-1),_=d?.get(u.cols-1),m=u.buffer.lines.get(u.buffer.ybase+u.buffer.y);m&&_&&(m.isWrapped=_[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&_[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;var b=function(){function u(){this.fg=0,this.bg=0,this.extended=new f}return u.toColorRGB=function(d){return[d>>>16&255,d>>>8&255,255&d]},u.fromColorRGB=function(d){return(255&d[0])<<16|(255&d[1])<<8|255&d[2]},u.prototype.clone=function(){var d=new u;return d.fg=this.fg,d.bg=this.bg,d.extended=this.extended.clone(),d},u.prototype.isInverse=function(){return 67108864&this.fg},u.prototype.isBold=function(){return 134217728&this.fg},u.prototype.isUnderline=function(){return 268435456&this.fg},u.prototype.isBlink=function(){return 536870912&this.fg},u.prototype.isInvisible=function(){return 1073741824&this.fg},u.prototype.isItalic=function(){return 67108864&this.bg},u.prototype.isDim=function(){return 134217728&this.bg},u.prototype.isStrikethrough=function(){return 2147483648&this.fg},u.prototype.getFgColorMode=function(){return 50331648&this.fg},u.prototype.getBgColorMode=function(){return 50331648&this.bg},u.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},u.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},u.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},u.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},u.prototype.isFgDefault=function(){return(50331648&this.fg)==0},u.prototype.isBgDefault=function(){return(50331648&this.bg)==0},u.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},u.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},u.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},u.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},u.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},u.prototype.getUnderlineColor=function(){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()},u.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},u.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},u.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},u.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},u.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},u}();o.AttributeData=b;var f=function(){function u(d,_){d===void 0&&(d=0),_===void 0&&(_=-1),this.underlineStyle=d,this.underlineColor=_}return u.prototype.clone=function(){return new u(this.underlineStyle,this.underlineColor)},u.prototype.isEmpty=function(){return this.underlineStyle===0},u}();o.ExtendedAttrs=f},9092:function(P,o,b){var f=this&&this.__read||function(t,i){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var l,c,g=n.call(t),C=[];try{for(;(i===void 0||i-- >0)&&!(l=g.next()).done;)C.push(l.value)}catch(y){c={error:y}}finally{try{l&&!l.done&&(n=g.return)&&n.call(g)}finally{if(c)throw c.error}}return C},u=this&&this.__spreadArray||function(t,i,n){if(n||arguments.length===2)for(var l,c=0,g=i.length;c<g;c++)!l&&c in i||(l||(l=Array.prototype.slice.call(i,0,c)),l[c]=i[c]);return t.concat(l||Array.prototype.slice.call(i))};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferStringIterator=o.Buffer=o.MAX_BUFFER_SIZE=void 0;var d=b(6349),_=b(8437),m=b(511),v=b(643),s=b(4634),a=b(4863),p=b(7116),h=b(3734);o.MAX_BUFFER_SIZE=4294967295;var r=function(){function t(i,n,l){this._hasScrollback=i,this._optionsService=n,this._bufferService=l,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=_.DEFAULT_ATTR_DATA.clone(),this.savedCharset=p.DEFAULT_CHARSET,this.markers=[],this._nullCell=m.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]),this._whitespaceCell=m.CellData.fromCharData([0,v.WHITESPACE_CELL_CHAR,v.WHITESPACE_CELL_WIDTH,v.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return t.prototype.getNullCell=function(i){return i?(this._nullCell.fg=i.fg,this._nullCell.bg=i.bg,this._nullCell.extended=i.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell},t.prototype.getWhitespaceCell=function(i){return i?(this._whitespaceCell.fg=i.fg,this._whitespaceCell.bg=i.bg,this._whitespaceCell.extended=i.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell},t.prototype.getBlankLine=function(i,n){return new _.BufferLine(this._bufferService.cols,this.getNullCell(i),n)},Object.defineProperty(t.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCursorInViewport",{get:function(){var i=this.ybase+this.y-this.ydisp;return i>=0&&i<this._rows},enumerable:!1,configurable:!0}),t.prototype._getCorrectBufferLength=function(i){if(!this._hasScrollback)return i;var n=i+this._optionsService.rawOptions.scrollback;return n>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:n},t.prototype.fillViewportRows=function(i){if(this.lines.length===0){i===void 0&&(i=_.DEFAULT_ATTR_DATA);for(var n=this._rows;n--;)this.lines.push(this.getBlankLine(i))}},t.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},t.prototype.resize=function(i,n){var l=this.getNullCell(_.DEFAULT_ATTR_DATA),c=this._getCorrectBufferLength(n);if(c>this.lines.maxLength&&(this.lines.maxLength=c),this.lines.length>0){if(this._cols<i)for(var g=0;g<this.lines.length;g++)this.lines.get(g).resize(i,l);var C=0;if(this._rows<n)for(var y=this._rows;y<n;y++)this.lines.length<n+this.ybase&&(this._optionsService.rawOptions.windowsMode?this.lines.push(new _.BufferLine(i,l)):this.ybase>0&&this.lines.length<=this.ybase+this.y+C+1?(this.ybase--,C++,this.ydisp>0&&this.ydisp--):this.lines.push(new _.BufferLine(i,l)));else for(y=this._rows;y>n;y--)this.lines.length>n+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(c<this.lines.maxLength){var S=this.lines.length-c;S>0&&(this.lines.trimStart(S),this.ybase=Math.max(this.ybase-S,0),this.ydisp=Math.max(this.ydisp-S,0),this.savedY=Math.max(this.savedY-S,0)),this.lines.maxLength=c}this.x=Math.min(this.x,i-1),this.y=Math.min(this.y,n-1),C&&(this.y+=C),this.savedX=Math.min(this.savedX,i-1),this.scrollTop=0}if(this.scrollBottom=n-1,this._isReflowEnabled&&(this._reflow(i,n),this._cols>i))for(g=0;g<this.lines.length;g++)this.lines.get(g).resize(i,l);this._cols=i,this._rows=n},Object.defineProperty(t.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.rawOptions.windowsMode},enumerable:!1,configurable:!0}),t.prototype._reflow=function(i,n){this._cols!==i&&(i>this._cols?this._reflowLarger(i,n):this._reflowSmaller(i,n))},t.prototype._reflowLarger=function(i,n){var l=(0,s.reflowLargerGetLinesToRemove)(this.lines,this._cols,i,this.ybase+this.y,this.getNullCell(_.DEFAULT_ATTR_DATA));if(l.length>0){var c=(0,s.reflowLargerCreateNewLayout)(this.lines,l);(0,s.reflowLargerApplyNewLayout)(this.lines,c.layout),this._reflowLargerAdjustViewport(i,n,c.countRemoved)}},t.prototype._reflowLargerAdjustViewport=function(i,n,l){for(var c=this.getNullCell(_.DEFAULT_ATTR_DATA),g=l;g-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<n&&this.lines.push(new _.BufferLine(i,c))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-l,0)},t.prototype._reflowSmaller=function(i,n){for(var l=this.getNullCell(_.DEFAULT_ATTR_DATA),c=[],g=0,C=this.lines.length-1;C>=0;C--){var y=this.lines.get(C);if(!(!y||!y.isWrapped&&y.getTrimmedLength()<=i)){for(var S=[y];y.isWrapped&&C>0;)y=this.lines.get(--C),S.unshift(y);var w=this.ybase+this.y;if(!(w>=C&&w<C+S.length)){var R,L=S[S.length-1].getTrimmedLength(),k=(0,s.reflowSmallerGetNewLineLengths)(S,this._cols,i),E=k.length-S.length;R=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+E):Math.max(0,this.lines.length-this.lines.maxLength+E);for(var x=[],M=0;M<E;M++){var T=this.getBlankLine(_.DEFAULT_ATTR_DATA,!0);x.push(T)}x.length>0&&(c.push({start:C+S.length+g,newLines:x}),g+=x.length),S.push.apply(S,u([],f(x),!1));var U=k.length-1,q=k[U];q===0&&(q=k[--U]);for(var F=S.length-E-1,z=L;F>=0;){var N=Math.min(z,q);if(S[U]===void 0)break;if(S[U].copyCellsFrom(S[F],z-N,q-N,N,!0),(q-=N)==0&&(q=k[--U]),(z-=N)==0){F--;var A=Math.max(F,0);z=(0,s.getWrappedLineTrimmedLength)(S,A,this._cols)}}for(M=0;M<S.length;M++)k[M]<i&&S[M].setCell(k[M],l);for(var $=E-R;$-- >0;)this.ybase===0?this.y<n-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+g)-n&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+E,this.ybase+n-1)}}}if(c.length>0){var J=[],oe=[];for(M=0;M<this.lines.length;M++)oe.push(this.lines.get(M));var B=this.lines.length,ne=B-1,X=0,W=c[X];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+g);var O=0;for(M=Math.min(this.lines.maxLength-1,B+g-1);M>=0;M--)if(W&&W.start>ne+O){for(var D=W.newLines.length-1;D>=0;D--)this.lines.set(M--,W.newLines[D]);M++,J.push({index:ne+1,amount:W.newLines.length}),O+=W.newLines.length,W=c[++X]}else this.lines.set(M,oe[ne--]);var j=0;for(M=J.length-1;M>=0;M--)J[M].index+=j,this.lines.onInsertEmitter.fire(J[M]),j+=J[M].amount;var V=Math.max(0,B+g-this.lines.maxLength);V>0&&this.lines.onTrimEmitter.fire(V)}},t.prototype.stringIndexToBufferIndex=function(i,n,l){for(l===void 0&&(l=!1);n;){var c=this.lines.get(i);if(!c)return[-1,-1];for(var g=l?c.getTrimmedLength():c.length,C=0;C<g;++C)if(c.get(C)[v.CHAR_DATA_WIDTH_INDEX]&&(n-=c.get(C)[v.CHAR_DATA_CHAR_INDEX].length||1),n<0)return[i,C];i++}return[i,0]},t.prototype.translateBufferLineToString=function(i,n,l,c){l===void 0&&(l=0);var g=this.lines.get(i);return g?g.translateToString(n,l,c):""},t.prototype.getWrappedRangeForLine=function(i){for(var n=i,l=i;n>0&&this.lines.get(n).isWrapped;)n--;for(;l+1<this.lines.length&&this.lines.get(l+1).isWrapped;)l++;return{first:n,last:l}},t.prototype.setupTabStops=function(i){for(i!=null?this.tabs[i]||(i=this.prevStop(i)):(this.tabs={},i=0);i<this._cols;i+=this._optionsService.rawOptions.tabStopWidth)this.tabs[i]=!0},t.prototype.prevStop=function(i){for(i==null&&(i=this.x);!this.tabs[--i]&&i>0;);return i>=this._cols?this._cols-1:i<0?0:i},t.prototype.nextStop=function(i){for(i==null&&(i=this.x);!this.tabs[++i]&&i<this._cols;);return i>=this._cols?this._cols-1:i<0?0:i},t.prototype.clearMarkers=function(i){this._isClearing=!0;for(var n=0;n<this.markers.length;n++)this.markers[n].line===i&&(this.markers[n].dispose(),this.markers.splice(n--,1));this._isClearing=!1},t.prototype.clearAllMarkers=function(){this._isClearing=!0;for(var i=0;i<this.markers.length;i++)this.markers[i].dispose(),this.markers.splice(i--,1);this._isClearing=!1},t.prototype.addMarker=function(i){var n=this,l=new a.Marker(i);return this.markers.push(l),l.register(this.lines.onTrim(function(c){l.line-=c,l.line<0&&l.dispose()})),l.register(this.lines.onInsert(function(c){l.line>=c.index&&(l.line+=c.amount)})),l.register(this.lines.onDelete(function(c){l.line>=c.index&&l.line<c.index+c.amount&&l.dispose(),l.line>c.index&&(l.line-=c.amount)})),l.register(l.onDispose(function(){return n._removeMarker(l)})),l},t.prototype._removeMarker=function(i){this._isClearing||this.markers.splice(this.markers.indexOf(i),1)},t.prototype.iterator=function(i,n,l,c,g){return new e(this,i,n,l,c,g)},t}();o.Buffer=r;var e=function(){function t(i,n,l,c,g,C){l===void 0&&(l=0),c===void 0&&(c=i.lines.length),g===void 0&&(g=0),C===void 0&&(C=0),this._buffer=i,this._trimRight=n,this._startIndex=l,this._endIndex=c,this._startOverscan=g,this._endOverscan=C,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return t.prototype.hasNext=function(){return this._current<this._endIndex},t.prototype.next=function(){var i=this._buffer.getWrappedRangeForLine(this._current);i.first<this._startIndex-this._startOverscan&&(i.first=this._startIndex-this._startOverscan),i.last>this._endIndex+this._endOverscan&&(i.last=this._endIndex+this._endOverscan),i.first=Math.max(i.first,0),i.last=Math.min(i.last,this._buffer.lines.length);for(var n="",l=i.first;l<=i.last;++l)n+=this._buffer.translateBufferLineToString(l,this._trimRight);return this._current=i.last+1,{range:i,content:n}},t}();o.BufferStringIterator=e},8437:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;var f=b(482),u=b(643),d=b(511),_=b(3734);o.DEFAULT_ATTR_DATA=Object.freeze(new _.AttributeData);var m=function(){function v(s,a,p){p===void 0&&(p=!1),this.isWrapped=p,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*s);for(var h=a||d.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]),r=0;r<s;++r)this.setCell(r,h);this.length=s}return v.prototype.get=function(s){var a=this._data[3*s+0],p=2097151&a;return[this._data[3*s+1],2097152&a?this._combined[s]:p?(0,f.stringFromCodePoint)(p):"",a>>22,2097152&a?this._combined[s].charCodeAt(this._combined[s].length-1):p]},v.prototype.set=function(s,a){this._data[3*s+1]=a[u.CHAR_DATA_ATTR_INDEX],a[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[s]=a[1],this._data[3*s+0]=2097152|s|a[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*s+0]=a[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|a[u.CHAR_DATA_WIDTH_INDEX]<<22},v.prototype.getWidth=function(s){return this._data[3*s+0]>>22},v.prototype.hasWidth=function(s){return 12582912&this._data[3*s+0]},v.prototype.getFg=function(s){return this._data[3*s+1]},v.prototype.getBg=function(s){return this._data[3*s+2]},v.prototype.hasContent=function(s){return 4194303&this._data[3*s+0]},v.prototype.getCodePoint=function(s){var a=this._data[3*s+0];return 2097152&a?this._combined[s].charCodeAt(this._combined[s].length-1):2097151&a},v.prototype.isCombined=function(s){return 2097152&this._data[3*s+0]},v.prototype.getString=function(s){var a=this._data[3*s+0];return 2097152&a?this._combined[s]:2097151&a?(0,f.stringFromCodePoint)(2097151&a):""},v.prototype.loadCell=function(s,a){var p=3*s;return a.content=this._data[p+0],a.fg=this._data[p+1],a.bg=this._data[p+2],2097152&a.content&&(a.combinedData=this._combined[s]),268435456&a.bg&&(a.extended=this._extendedAttrs[s]),a},v.prototype.setCell=function(s,a){2097152&a.content&&(this._combined[s]=a.combinedData),268435456&a.bg&&(this._extendedAttrs[s]=a.extended),this._data[3*s+0]=a.content,this._data[3*s+1]=a.fg,this._data[3*s+2]=a.bg},v.prototype.setCellFromCodePoint=function(s,a,p,h,r,e){268435456&r&&(this._extendedAttrs[s]=e),this._data[3*s+0]=a|p<<22,this._data[3*s+1]=h,this._data[3*s+2]=r},v.prototype.addCodepointToCell=function(s,a){var p=this._data[3*s+0];2097152&p?this._combined[s]+=(0,f.stringFromCodePoint)(a):(2097151&p?(this._combined[s]=(0,f.stringFromCodePoint)(2097151&p)+(0,f.stringFromCodePoint)(a),p&=-2097152,p|=2097152):p=a|1<<22,this._data[3*s+0]=p)},v.prototype.insertCells=function(s,a,p,h){if((s%=this.length)&&this.getWidth(s-1)===2&&this.setCellFromCodePoint(s-1,0,1,h?.fg||0,h?.bg||0,h?.extended||new _.ExtendedAttrs),a<this.length-s){for(var r=new d.CellData,e=this.length-s-a-1;e>=0;--e)this.setCell(s+a+e,this.loadCell(s+e,r));for(e=0;e<a;++e)this.setCell(s+e,p)}else for(e=s;e<this.length;++e)this.setCell(e,p);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,h?.fg||0,h?.bg||0,h?.extended||new _.ExtendedAttrs)},v.prototype.deleteCells=function(s,a,p,h){if(s%=this.length,a<this.length-s){for(var r=new d.CellData,e=0;e<this.length-s-a;++e)this.setCell(s+e,this.loadCell(s+a+e,r));for(e=this.length-a;e<this.length;++e)this.setCell(e,p)}else for(e=s;e<this.length;++e)this.setCell(e,p);s&&this.getWidth(s-1)===2&&this.setCellFromCodePoint(s-1,0,1,h?.fg||0,h?.bg||0,h?.extended||new _.ExtendedAttrs),this.getWidth(s)!==0||this.hasContent(s)||this.setCellFromCodePoint(s,0,1,h?.fg||0,h?.bg||0,h?.extended||new _.ExtendedAttrs)},v.prototype.replaceCells=function(s,a,p,h){for(s&&this.getWidth(s-1)===2&&this.setCellFromCodePoint(s-1,0,1,h?.fg||0,h?.bg||0,h?.extended||new _.ExtendedAttrs),a<this.length&&this.getWidth(a-1)===2&&this.setCellFromCodePoint(a,0,1,h?.fg||0,h?.bg||0,h?.extended||new _.ExtendedAttrs);s<a&&s<this.length;)this.setCell(s++,p)},v.prototype.resize=function(s,a){if(s!==this.length){if(s>this.length){var p=new Uint32Array(3*s);this.length&&(3*s<this._data.length?p.set(this._data.subarray(0,3*s)):p.set(this._data)),this._data=p;for(var h=this.length;h<s;++h)this.setCell(h,a)}else if(s){(p=new Uint32Array(3*s)).set(this._data.subarray(0,3*s)),this._data=p;var r=Object.keys(this._combined);for(h=0;h<r.length;h++){var e=parseInt(r[h],10);e>=s&&delete this._combined[e]}}else this._data=new Uint32Array(0),this._combined={};this.length=s}},v.prototype.fill=function(s){this._combined={},this._extendedAttrs={};for(var a=0;a<this.length;++a)this.setCell(a,s)},v.prototype.copyFrom=function(s){for(var a in this.length!==s.length?this._data=new Uint32Array(s._data):this._data.set(s._data),this.length=s.length,this._combined={},s._combined)this._combined[a]=s._combined[a];for(var a in this._extendedAttrs={},s._extendedAttrs)this._extendedAttrs[a]=s._extendedAttrs[a];this.isWrapped=s.isWrapped},v.prototype.clone=function(){var s=new v(0);for(var a in s._data=new Uint32Array(this._data),s.length=this.length,this._combined)s._combined[a]=this._combined[a];for(var a in this._extendedAttrs)s._extendedAttrs[a]=this._extendedAttrs[a];return s.isWrapped=this.isWrapped,s},v.prototype.getTrimmedLength=function(){for(var s=this.length-1;s>=0;--s)if(4194303&this._data[3*s+0])return s+(this._data[3*s+0]>>22);return 0},v.prototype.copyCellsFrom=function(s,a,p,h,r){var e=s._data;if(r)for(var t=h-1;t>=0;t--)for(var i=0;i<3;i++)this._data[3*(p+t)+i]=e[3*(a+t)+i];else for(t=0;t<h;t++)for(i=0;i<3;i++)this._data[3*(p+t)+i]=e[3*(a+t)+i];var n=Object.keys(s._combined);for(i=0;i<n.length;i++){var l=parseInt(n[i],10);l>=a&&(this._combined[l-a+p]=s._combined[l])}},v.prototype.translateToString=function(s,a,p){s===void 0&&(s=!1),a===void 0&&(a=0),p===void 0&&(p=this.length),s&&(p=Math.min(p,this.getTrimmedLength()));for(var h="";a<p;){var r=this._data[3*a+0],e=2097151&r;h+=2097152&r?this._combined[a]:e?(0,f.stringFromCodePoint)(e):u.WHITESPACE_CELL_CHAR,a+=r>>22||1}return h},v}();o.BufferLine=m},4841:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(b,f){if(b.start.y>b.end.y)throw new Error("Buffer range end ("+b.end.x+", "+b.end.y+") cannot be before start ("+b.start.x+", "+b.start.y+")");return f*(b.end.y-b.start.y)+(b.end.x-b.start.x+1)}},4634:(P,o)=>{function b(f,u,d){if(u===f.length-1)return f[u].getTrimmedLength();var _=!f[u].hasContent(d-1)&&f[u].getWidth(d-1)===1,m=f[u+1].getWidth(0)===2;return _&&m?d-1:d}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(f,u,d,_,m){for(var v=[],s=0;s<f.length-1;s++){var a=s,p=f.get(++a);if(p.isWrapped){for(var h=[f.get(s)];a<f.length&&p.isWrapped;)h.push(p),p=f.get(++a);if(_>=s&&_<a)s+=h.length-1;else{for(var r=0,e=b(h,r,u),t=1,i=0;t<h.length;){var n=b(h,t,u),l=n-i,c=d-e,g=Math.min(l,c);h[r].copyCellsFrom(h[t],i,e,g,!1),(e+=g)===d&&(r++,e=0),(i+=g)===n&&(t++,i=0),e===0&&r!==0&&h[r-1].getWidth(d-1)===2&&(h[r].copyCellsFrom(h[r-1],d-1,e++,1,!1),h[r-1].setCell(d-1,m))}h[r].replaceCells(e,d,m);for(var C=0,y=h.length-1;y>0&&(y>r||h[y].getTrimmedLength()===0);y--)C++;C>0&&(v.push(s+h.length-C),v.push(C)),s+=h.length-1}}}return v},o.reflowLargerCreateNewLayout=function(f,u){for(var d=[],_=0,m=u[_],v=0,s=0;s<f.length;s++)if(m===s){var a=u[++_];f.onDeleteEmitter.fire({index:s-v,amount:a}),s+=a-1,v+=a,m=u[++_]}else d.push(s);return{layout:d,countRemoved:v}},o.reflowLargerApplyNewLayout=function(f,u){for(var d=[],_=0;_<u.length;_++)d.push(f.get(u[_]));for(_=0;_<d.length;_++)f.set(_,d[_]);f.length=u.length},o.reflowSmallerGetNewLineLengths=function(f,u,d){for(var _=[],m=f.map(function(e,t){return b(f,t,u)}).reduce(function(e,t){return e+t}),v=0,s=0,a=0;a<m;){if(m-a<d){_.push(m-a);break}v+=d;var p=b(f,s,u);v>p&&(v-=p,s++);var h=f[s].getWidth(v-1)===2;h&&v--;var r=h?d-1:d;_.push(r),a+=r}return _},o.getWrappedLineTrimmedLength=b},5295:function(P,o,b){var f,u=this&&this.__extends||(f=function(v,s){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,p){a.__proto__=p}||function(a,p){for(var h in p)Object.prototype.hasOwnProperty.call(p,h)&&(a[h]=p[h])},f(v,s)},function(v,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function a(){this.constructor=v}f(v,s),v.prototype=s===null?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;var d=b(9092),_=b(8460),m=function(v){function s(a,p){var h=v.call(this)||this;return h._optionsService=a,h._bufferService=p,h._onBufferActivate=h.register(new _.EventEmitter),h.reset(),h}return u(s,v),Object.defineProperty(s.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),s.prototype.reset=function(){this._normal=new d.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new d.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()},Object.defineProperty(s.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),s.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},s.prototype.activateAltBuffer=function(a){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(a),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}))},s.prototype.resize=function(a,p){this._normal.resize(a,p),this._alt.resize(a,p)},s.prototype.setupTabStops=function(a){this._normal.setupTabStops(a),this._alt.setupTabStops(a)},s}(b(844).Disposable);o.BufferSet=m},511:function(P,o,b){var f,u=this&&this.__extends||(f=function(s,a){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var r in h)Object.prototype.hasOwnProperty.call(h,r)&&(p[r]=h[r])},f(s,a)},function(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function p(){this.constructor=s}f(s,a),s.prototype=a===null?Object.create(a):(p.prototype=a.prototype,new p)});Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;var d=b(482),_=b(643),m=b(3734),v=function(s){function a(){var p=s!==null&&s.apply(this,arguments)||this;return p.content=0,p.fg=0,p.bg=0,p.extended=new m.ExtendedAttrs,p.combinedData="",p}return u(a,s),a.fromCharData=function(p){var h=new a;return h.setFromCharData(p),h},a.prototype.isCombined=function(){return 2097152&this.content},a.prototype.getWidth=function(){return this.content>>22},a.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""},a.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},a.prototype.setFromCharData=function(p){this.fg=p[_.CHAR_DATA_ATTR_INDEX],this.bg=0;var h=!1;if(p[_.CHAR_DATA_CHAR_INDEX].length>2)h=!0;else if(p[_.CHAR_DATA_CHAR_INDEX].length===2){var r=p[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){var e=p[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=e&&e<=57343?this.content=1024*(r-55296)+e-56320+65536|p[_.CHAR_DATA_WIDTH_INDEX]<<22:h=!0}else h=!0}else this.content=p[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|p[_.CHAR_DATA_WIDTH_INDEX]<<22;h&&(this.combinedData=p[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|p[_.CHAR_DATA_WIDTH_INDEX]<<22)},a.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},a}(m.AttributeData);o.CellData=v},643:(P,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_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=256,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,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:function(P,o,b){var f,u=this&&this.__extends||(f=function(m,v){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var p in a)Object.prototype.hasOwnProperty.call(a,p)&&(s[p]=a[p])},f(m,v)},function(m,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function s(){this.constructor=m}f(m,v),m.prototype=v===null?Object.create(v):(s.prototype=v.prototype,new s)});Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;var d=b(8460),_=function(m){function v(s){var a=m.call(this)||this;return a.line=s,a._id=v._nextId++,a.isDisposed=!1,a._onDispose=new d.EventEmitter,a}return u(v,m),Object.defineProperty(v.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),v.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),m.prototype.dispose.call(this))},v._nextId=1,v}(b(844).Disposable);o.Marker=_},7116:(P,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:(P,o)=>{var b,f;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
|
|
7
|
-
`,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL=""}(b=o.C0||(o.C0={})),(f=o.C1||(o.C1={})).PAD="",f.HOP="",f.BPH="",f.NBH="",f.IND="",f.NEL="
",f.SSA="",f.ESA="",f.HTS="",f.HTJ="",f.VTS="",f.PLD="",f.PLU="",f.RI="",f.SS2="",f.SS3="",f.DCS="",f.PU1="",f.PU2="",f.STS="",f.CCH="",f.MW="",f.SPA="",f.EPA="",f.SOS="",f.SGCI="",f.SCI="",f.CSI="",f.ST="",f.OSC="",f.PM="",f.APC="",(o.C1_ESCAPED||(o.C1_ESCAPED={})).ST=b.ESC+"\\"},7399:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;var f=b(2584),u={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(d,_,m,v){var s={type:0,cancel:!1,key:void 0},a=(d.shiftKey?1:0)|(d.altKey?2:0)|(d.ctrlKey?4:0)|(d.metaKey?8:0);switch(d.keyCode){case 0:d.key==="UIKeyInputUpArrow"?s.key=_?f.C0.ESC+"OA":f.C0.ESC+"[A":d.key==="UIKeyInputLeftArrow"?s.key=_?f.C0.ESC+"OD":f.C0.ESC+"[D":d.key==="UIKeyInputRightArrow"?s.key=_?f.C0.ESC+"OC":f.C0.ESC+"[C":d.key==="UIKeyInputDownArrow"&&(s.key=_?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:if(d.shiftKey){s.key=f.C0.BS;break}if(d.altKey){s.key=f.C0.ESC+f.C0.DEL;break}s.key=f.C0.DEL;break;case 9:if(d.shiftKey){s.key=f.C0.ESC+"[Z";break}s.key=f.C0.HT,s.cancel=!0;break;case 13:s.key=d.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,s.cancel=!0;break;case 27:s.key=f.C0.ESC,d.altKey&&(s.key=f.C0.ESC+f.C0.ESC),s.cancel=!0;break;case 37:if(d.metaKey)break;a?(s.key=f.C0.ESC+"[1;"+(a+1)+"D",s.key===f.C0.ESC+"[1;3D"&&(s.key=f.C0.ESC+(m?"b":"[1;5D"))):s.key=_?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(d.metaKey)break;a?(s.key=f.C0.ESC+"[1;"+(a+1)+"C",s.key===f.C0.ESC+"[1;3C"&&(s.key=f.C0.ESC+(m?"f":"[1;5C"))):s.key=_?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(d.metaKey)break;a?(s.key=f.C0.ESC+"[1;"+(a+1)+"A",m||s.key!==f.C0.ESC+"[1;3A"||(s.key=f.C0.ESC+"[1;5A")):s.key=_?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(d.metaKey)break;a?(s.key=f.C0.ESC+"[1;"+(a+1)+"B",m||s.key!==f.C0.ESC+"[1;3B"||(s.key=f.C0.ESC+"[1;5B")):s.key=_?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:d.shiftKey||d.ctrlKey||(s.key=f.C0.ESC+"[2~");break;case 46:s.key=a?f.C0.ESC+"[3;"+(a+1)+"~":f.C0.ESC+"[3~";break;case 36:s.key=a?f.C0.ESC+"[1;"+(a+1)+"H":_?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:s.key=a?f.C0.ESC+"[1;"+(a+1)+"F":_?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:d.shiftKey?s.type=2:d.ctrlKey?s.key=f.C0.ESC+"[5;"+(a+1)+"~":s.key=f.C0.ESC+"[5~";break;case 34:d.shiftKey?s.type=3:d.ctrlKey?s.key=f.C0.ESC+"[6;"+(a+1)+"~":s.key=f.C0.ESC+"[6~";break;case 112:s.key=a?f.C0.ESC+"[1;"+(a+1)+"P":f.C0.ESC+"OP";break;case 113:s.key=a?f.C0.ESC+"[1;"+(a+1)+"Q":f.C0.ESC+"OQ";break;case 114:s.key=a?f.C0.ESC+"[1;"+(a+1)+"R":f.C0.ESC+"OR";break;case 115:s.key=a?f.C0.ESC+"[1;"+(a+1)+"S":f.C0.ESC+"OS";break;case 116:s.key=a?f.C0.ESC+"[15;"+(a+1)+"~":f.C0.ESC+"[15~";break;case 117:s.key=a?f.C0.ESC+"[17;"+(a+1)+"~":f.C0.ESC+"[17~";break;case 118:s.key=a?f.C0.ESC+"[18;"+(a+1)+"~":f.C0.ESC+"[18~";break;case 119:s.key=a?f.C0.ESC+"[19;"+(a+1)+"~":f.C0.ESC+"[19~";break;case 120:s.key=a?f.C0.ESC+"[20;"+(a+1)+"~":f.C0.ESC+"[20~";break;case 121:s.key=a?f.C0.ESC+"[21;"+(a+1)+"~":f.C0.ESC+"[21~";break;case 122:s.key=a?f.C0.ESC+"[23;"+(a+1)+"~":f.C0.ESC+"[23~";break;case 123:s.key=a?f.C0.ESC+"[24;"+(a+1)+"~":f.C0.ESC+"[24~";break;default:if(!d.ctrlKey||d.shiftKey||d.altKey||d.metaKey)if(m&&!v||!d.altKey||d.metaKey)!m||d.altKey||d.ctrlKey||d.shiftKey||!d.metaKey?d.key&&!d.ctrlKey&&!d.altKey&&!d.metaKey&&d.keyCode>=48&&d.key.length===1?s.key=d.key:d.key&&d.ctrlKey&&(d.key==="_"&&(s.key=f.C0.US),d.key==="@"&&(s.key=f.C0.NUL)):d.keyCode===65&&(s.type=1);else{var p=u[d.keyCode],h=p?.[d.shiftKey?1:0];if(h)s.key=f.C0.ESC+h;else if(d.keyCode>=65&&d.keyCode<=90){var r=d.ctrlKey?d.keyCode-64:d.keyCode+32,e=String.fromCharCode(r);d.shiftKey&&(e=e.toUpperCase()),s.key=f.C0.ESC+e}else d.key==="Dead"&&d.code.startsWith("Key")&&(e=d.code.slice(3,4),d.shiftKey||(e=e.toLowerCase()),s.key=f.C0.ESC+e,s.cancel=!0)}else d.keyCode>=65&&d.keyCode<=90?s.key=String.fromCharCode(d.keyCode-64):d.keyCode===32?s.key=f.C0.NUL:d.keyCode>=51&&d.keyCode<=55?s.key=String.fromCharCode(d.keyCode-51+27):d.keyCode===56?s.key=f.C0.DEL:d.keyCode===219?s.key=f.C0.ESC:d.keyCode===220?s.key=f.C0.FS:d.keyCode===221&&(s.key=f.C0.GS)}return s}},482:(P,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,d,_){d===void 0&&(d=0),_===void 0&&(_=u.length);for(var m="",v=d;v<_;++v){var s=u[v];s>65535?(s-=65536,m+=String.fromCharCode(55296+(s>>10))+String.fromCharCode(s%1024+56320)):m+=String.fromCharCode(s)}return m};var b=function(){function u(){this._interim=0}return u.prototype.clear=function(){this._interim=0},u.prototype.decode=function(d,_){var m=d.length;if(!m)return 0;var v=0,s=0;this._interim&&(56320<=(h=d.charCodeAt(s++))&&h<=57343?_[v++]=1024*(this._interim-55296)+h-56320+65536:(_[v++]=this._interim,_[v++]=h),this._interim=0);for(var a=s;a<m;++a){var p=d.charCodeAt(a);if(55296<=p&&p<=56319){if(++a>=m)return this._interim=p,v;var h;56320<=(h=d.charCodeAt(a))&&h<=57343?_[v++]=1024*(p-55296)+h-56320+65536:(_[v++]=p,_[v++]=h)}else p!==65279&&(_[v++]=p)}return v},u}();o.StringToUtf32=b;var f=function(){function u(){this.interim=new Uint8Array(3)}return u.prototype.clear=function(){this.interim.fill(0)},u.prototype.decode=function(d,_){var m=d.length;if(!m)return 0;var v,s,a,p,h=0,r=0,e=0;if(this.interim[0]){var t=!1,i=this.interim[0];i&=(224&i)==192?31:(240&i)==224?15:7;for(var n=0,l=void 0;(l=63&this.interim[++n])&&n<4;)i<<=6,i|=l;for(var c=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,g=c-n;e<g;){if(e>=m)return 0;if((192&(l=d[e++]))!=128){e--,t=!0;break}this.interim[n++]=l,i<<=6,i|=63&l}t||(c===2?i<128?e--:_[h++]=i:c===3?i<2048||i>=55296&&i<=57343||i===65279||(_[h++]=i):i<65536||i>1114111||(_[h++]=i)),this.interim.fill(0)}for(var C=m-4,y=e;y<m;){for(;!(!(y<C)||128&(v=d[y])||128&(s=d[y+1])||128&(a=d[y+2])||128&(p=d[y+3]));)_[h++]=v,_[h++]=s,_[h++]=a,_[h++]=p,y+=4;if((v=d[y++])<128)_[h++]=v;else if((224&v)==192){if(y>=m)return this.interim[0]=v,h;if((192&(s=d[y++]))!=128){y--;continue}if((r=(31&v)<<6|63&s)<128){y--;continue}_[h++]=r}else if((240&v)==224){if(y>=m)return this.interim[0]=v,h;if((192&(s=d[y++]))!=128){y--;continue}if(y>=m)return this.interim[0]=v,this.interim[1]=s,h;if((192&(a=d[y++]))!=128){y--;continue}if((r=(15&v)<<12|(63&s)<<6|63&a)<2048||r>=55296&&r<=57343||r===65279)continue;_[h++]=r}else if((248&v)==240){if(y>=m)return this.interim[0]=v,h;if((192&(s=d[y++]))!=128){y--;continue}if(y>=m)return this.interim[0]=v,this.interim[1]=s,h;if((192&(a=d[y++]))!=128){y--;continue}if(y>=m)return this.interim[0]=v,this.interim[1]=s,this.interim[2]=a,h;if((192&(p=d[y++]))!=128){y--;continue}if((r=(7&v)<<18|(63&s)<<12|(63&a)<<6|63&p)<65536||r>1114111)continue;_[h++]=r}}return h},u}();o.Utf8ToUtf32=f},225:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;var f,u=b(8273),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]],_=[[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]],m=function(){function v(){if(this.version="6",!f){f=new Uint8Array(65536),(0,u.fill)(f,1),f[0]=0,(0,u.fill)(f,0,1,32),(0,u.fill)(f,0,127,160),(0,u.fill)(f,2,4352,4448),f[9001]=2,f[9002]=2,(0,u.fill)(f,2,11904,42192),f[12351]=1,(0,u.fill)(f,2,44032,55204),(0,u.fill)(f,2,63744,64256),(0,u.fill)(f,2,65040,65050),(0,u.fill)(f,2,65072,65136),(0,u.fill)(f,2,65280,65377),(0,u.fill)(f,2,65504,65511);for(var s=0;s<d.length;++s)(0,u.fill)(f,0,d[s][0],d[s][1]+1)}}return v.prototype.wcwidth=function(s){return s<32?0:s<127?1:s<65536?f[s]:function(a,p){var h,r=0,e=p.length-1;if(a<p[0][0]||a>p[e][1])return!1;for(;e>=r;)if(a>p[h=r+e>>1][1])r=h+1;else{if(!(a<p[h][0]))return!0;e=h-1}return!1}(s,_)?0:s>=131072&&s<=196605||s>=196608&&s<=262141?2:1},v}();o.UnicodeV6=m},5981:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;var f=b(8460),u=typeof queueMicrotask>"u"?function(_){Promise.resolve().then(_)}:queueMicrotask,d=function(){function _(m){this._action=m,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._onWriteParsed=new f.EventEmitter}return Object.defineProperty(_.prototype,"onWriteParsed",{get:function(){return this._onWriteParsed.event},enumerable:!1,configurable:!0}),_.prototype.writeSync=function(m,v){if(v!==void 0&&this._syncCalls>v)this._syncCalls=0;else if(this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(void 0),this._syncCalls++,!this._isSyncWriting){var s;for(this._isSyncWriting=!0;s=this._writeBuffer.shift();){this._action(s);var a=this._callbacks.shift();a&&a()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}},_.prototype.write=function(m,v){var s=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return s._innerWrite()})),this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(v)},_.prototype._innerWrite=function(m,v){var s=this;m===void 0&&(m=0),v===void 0&&(v=!0);for(var a=m||Date.now();this._writeBuffer.length>this._bufferOffset;){var p=this._writeBuffer[this._bufferOffset],h=this._action(p,v);if(h)return void h.catch(function(e){return u(function(){throw e}),Promise.resolve(!1)}).then(function(e){return Date.now()-a>=12?setTimeout(function(){return s._innerWrite(0,e)}):s._innerWrite(a,e)});var r=this._callbacks[this._bufferOffset];if(r&&r(),this._bufferOffset++,this._pendingData-=p.length,Date.now()-a>=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(function(){return s._innerWrite()})):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()},_}();o.WriteBuffer=d},5941:function(P,o){var b=this&&this.__read||function(_,m){var v=typeof Symbol=="function"&&_[Symbol.iterator];if(!v)return _;var s,a,p=v.call(_),h=[];try{for(;(m===void 0||m-- >0)&&!(s=p.next()).done;)h.push(s.value)}catch(r){a={error:r}}finally{try{s&&!s.done&&(v=p.return)&&v.call(p)}finally{if(a)throw a.error}}return h};Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;var f=/^([\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})$/,u=/^[\da-f]+$/;function d(_,m){var v=_.toString(16),s=v.length<2?"0"+v:v;switch(m){case 4:return v[0];case 8:return s;case 12:return(s+s).slice(0,3);default:return s+s}}o.parseColor=function(_){if(_){var m=_.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);var v=f.exec(m);if(v){var s=v[1]?15:v[4]?255:v[7]?4095:65535;return[Math.round(parseInt(v[1]||v[4]||v[7]||v[10],16)/s*255),Math.round(parseInt(v[2]||v[5]||v[8]||v[11],16)/s*255),Math.round(parseInt(v[3]||v[6]||v[9]||v[12],16)/s*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),u.exec(m)&&[3,6,9,12].includes(m.length))){for(var a=m.length/3,p=[0,0,0],h=0;h<3;++h){var r=parseInt(m.slice(a*h,a*h+a),16);p[h]=a===1?r<<4:a===2?r:a===3?r>>4:r>>8}return p}}},o.toRgbString=function(_,m){m===void 0&&(m=16);var v=b(_,3),s=v[0],a=v[1],p=v[2];return"rgb:"+d(s,m)+"/"+d(a,m)+"/"+d(p,m)}},5770:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;var f=b(482),u=b(8742),d=b(5770),_=[],m=function(){function a(){this._handlers=Object.create(null),this._active=_,this._ident=0,this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return a.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=_},a.prototype.registerHandler=function(p,h){this._handlers[p]===void 0&&(this._handlers[p]=[]);var r=this._handlers[p];return r.push(h),{dispose:function(){var e=r.indexOf(h);e!==-1&&r.splice(e,1)}}},a.prototype.clearHandler=function(p){this._handlers[p]&&delete this._handlers[p]},a.prototype.setHandlerFallback=function(p){this._handlerFb=p},a.prototype.reset=function(){if(this._active.length)for(var p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].unhook(!1);this._stack.paused=!1,this._active=_,this._ident=0},a.prototype.hook=function(p,h){if(this.reset(),this._ident=p,this._active=this._handlers[p]||_,this._active.length)for(var r=this._active.length-1;r>=0;r--)this._active[r].hook(h);else this._handlerFb(this._ident,"HOOK",h)},a.prototype.put=function(p,h,r){if(this._active.length)for(var e=this._active.length-1;e>=0;e--)this._active[e].put(p,h,r);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(p,h,r))},a.prototype.unhook=function(p,h){if(h===void 0&&(h=!0),this._active.length){var r=!1,e=this._active.length-1,t=!1;if(this._stack.paused&&(e=this._stack.loopPosition-1,r=h,t=this._stack.fallThrough,this._stack.paused=!1),!t&&r===!1){for(;e>=0&&(r=this._active[e].unhook(p))!==!0;e--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=e,this._stack.fallThrough=!1,r;e--}for(;e>=0;e--)if((r=this._active[e].unhook(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=e,this._stack.fallThrough=!0,r}else this._handlerFb(this._ident,"UNHOOK",p);this._active=_,this._ident=0},a}();o.DcsParser=m;var v=new u.Params;v.addParam(0);var s=function(){function a(p){this._handler=p,this._data="",this._params=v,this._hitLimit=!1}return a.prototype.hook=function(p){this._params=p.length>1||p.params[0]?p.clone():v,this._data="",this._hitLimit=!1},a.prototype.put=function(p,h,r){this._hitLimit||(this._data+=(0,f.utf32ToString)(p,h,r),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},a.prototype.unhook=function(p){var h=this,r=!1;if(this._hitLimit)r=!1;else if(p&&(r=this._handler(this._data,this._params))instanceof Promise)return r.then(function(e){return h._params=v,h._data="",h._hitLimit=!1,e});return this._params=v,this._data="",this._hitLimit=!1,r},a}();o.DcsHandler=s},2015:function(P,o,b){var f,u=this&&this.__extends||(f=function(r,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},f(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}f(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)});Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;var d=b(844),_=b(8273),m=b(8742),v=b(6242),s=b(6351),a=function(){function r(e){this.table=new Uint8Array(e)}return r.prototype.setDefault=function(e,t){(0,_.fill)(this.table,e<<4|t)},r.prototype.add=function(e,t,i,n){this.table[t<<8|e]=i<<4|n},r.prototype.addMany=function(e,t,i,n){for(var l=0;l<e.length;l++)this.table[t<<8|e[l]]=i<<4|n},r}();o.TransitionTable=a;var p=160;o.VT500_TRANSITION_TABLE=function(){var r=new a(4095),e=Array.apply(null,Array(256)).map(function(g,C){return C}),t=function(g,C){return e.slice(g,C)},i=t(32,127),n=t(0,24);n.push(25),n.push.apply(n,t(28,32));var l,c=t(0,14);for(l in r.setDefault(1,0),r.addMany(i,0,2,0),c)r.addMany([24,26,153,154],l,3,0),r.addMany(t(128,144),l,3,0),r.addMany(t(144,152),l,3,0),r.add(156,l,0,0),r.add(27,l,11,1),r.add(157,l,4,8),r.addMany([152,158,159],l,0,7),r.add(155,l,11,3),r.add(144,l,11,9);return r.addMany(n,0,3,0),r.addMany(n,1,3,1),r.add(127,1,0,1),r.addMany(n,8,0,8),r.addMany(n,3,3,3),r.add(127,3,0,3),r.addMany(n,4,3,4),r.add(127,4,0,4),r.addMany(n,6,3,6),r.addMany(n,5,3,5),r.add(127,5,0,5),r.addMany(n,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(i,8,5,8),r.add(127,8,5,8),r.addMany([156,27,24,26,7],8,6,0),r.addMany(t(28,32),8,0,8),r.addMany([88,94,95],1,0,7),r.addMany(i,7,0,7),r.addMany(n,7,0,7),r.add(156,7,0,0),r.add(127,7,0,7),r.add(91,1,11,3),r.addMany(t(64,127),3,7,0),r.addMany(t(48,60),3,8,4),r.addMany([60,61,62,63],3,9,4),r.addMany(t(48,60),4,8,4),r.addMany(t(64,127),4,7,0),r.addMany([60,61,62,63],4,0,6),r.addMany(t(32,64),6,0,6),r.add(127,6,0,6),r.addMany(t(64,127),6,0,0),r.addMany(t(32,48),3,9,5),r.addMany(t(32,48),5,9,5),r.addMany(t(48,64),5,0,6),r.addMany(t(64,127),5,7,0),r.addMany(t(32,48),4,9,5),r.addMany(t(32,48),1,9,2),r.addMany(t(32,48),2,9,2),r.addMany(t(48,127),2,10,0),r.addMany(t(48,80),1,10,0),r.addMany(t(81,88),1,10,0),r.addMany([89,90,92],1,10,0),r.addMany(t(96,127),1,10,0),r.add(80,1,11,9),r.addMany(n,9,0,9),r.add(127,9,0,9),r.addMany(t(28,32),9,0,9),r.addMany(t(32,48),9,9,12),r.addMany(t(48,60),9,8,10),r.addMany([60,61,62,63],9,9,10),r.addMany(n,11,0,11),r.addMany(t(32,128),11,0,11),r.addMany(t(28,32),11,0,11),r.addMany(n,10,0,10),r.add(127,10,0,10),r.addMany(t(28,32),10,0,10),r.addMany(t(48,60),10,8,10),r.addMany([60,61,62,63],10,0,11),r.addMany(t(32,48),10,9,12),r.addMany(n,12,0,12),r.add(127,12,0,12),r.addMany(t(28,32),12,0,12),r.addMany(t(32,48),12,9,12),r.addMany(t(48,64),12,0,11),r.addMany(t(64,127),12,12,13),r.addMany(t(64,127),10,12,13),r.addMany(t(64,127),9,12,13),r.addMany(n,13,13,13),r.addMany(i,13,13,13),r.add(127,13,0,13),r.addMany([27,156,24,26],13,14,0),r.add(p,0,2,0),r.add(p,8,5,8),r.add(p,6,0,6),r.add(p,11,0,11),r.add(p,13,13,13),r}();var h=function(r){function e(t){t===void 0&&(t=o.VT500_TRANSITION_TABLE);var i=r.call(this)||this;return i._transitions=t,i._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},i.initialState=0,i.currentState=i.initialState,i._params=new m.Params,i._params.addParam(0),i._collect=0,i.precedingCodepoint=0,i._printHandlerFb=function(n,l,c){},i._executeHandlerFb=function(n){},i._csiHandlerFb=function(n,l){},i._escHandlerFb=function(n){},i._errorHandlerFb=function(n){return n},i._printHandler=i._printHandlerFb,i._executeHandlers=Object.create(null),i._csiHandlers=Object.create(null),i._escHandlers=Object.create(null),i._oscParser=new v.OscParser,i._dcsParser=new s.DcsParser,i._errorHandler=i._errorHandlerFb,i.registerEscHandler({final:"\\"},function(){return!0}),i}return u(e,r),e.prototype._identifier=function(t,i){i===void 0&&(i=[64,126]);var n=0;if(t.prefix){if(t.prefix.length>1)throw new Error("only one byte as prefix supported");if((n=t.prefix.charCodeAt(0))&&60>n||n>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(t.intermediates){if(t.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var l=0;l<t.intermediates.length;++l){var c=t.intermediates.charCodeAt(l);if(32>c||c>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=c}}if(t.final.length!==1)throw new Error("final must be a single byte");var g=t.final.charCodeAt(0);if(i[0]>g||g>i[1])throw new Error("final must be in range "+i[0]+" .. "+i[1]);return(n<<=8)|g},e.prototype.identToString=function(t){for(var i=[];t;)i.push(String.fromCharCode(255&t)),t>>=8;return i.reverse().join("")},e.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},e.prototype.setPrintHandler=function(t){this._printHandler=t},e.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},e.prototype.registerEscHandler=function(t,i){var n=this._identifier(t,[48,126]);this._escHandlers[n]===void 0&&(this._escHandlers[n]=[]);var l=this._escHandlers[n];return l.push(i),{dispose:function(){var c=l.indexOf(i);c!==-1&&l.splice(c,1)}}},e.prototype.clearEscHandler=function(t){this._escHandlers[this._identifier(t,[48,126])]&&delete this._escHandlers[this._identifier(t,[48,126])]},e.prototype.setEscHandlerFallback=function(t){this._escHandlerFb=t},e.prototype.setExecuteHandler=function(t,i){this._executeHandlers[t.charCodeAt(0)]=i},e.prototype.clearExecuteHandler=function(t){this._executeHandlers[t.charCodeAt(0)]&&delete this._executeHandlers[t.charCodeAt(0)]},e.prototype.setExecuteHandlerFallback=function(t){this._executeHandlerFb=t},e.prototype.registerCsiHandler=function(t,i){var n=this._identifier(t);this._csiHandlers[n]===void 0&&(this._csiHandlers[n]=[]);var l=this._csiHandlers[n];return l.push(i),{dispose:function(){var c=l.indexOf(i);c!==-1&&l.splice(c,1)}}},e.prototype.clearCsiHandler=function(t){this._csiHandlers[this._identifier(t)]&&delete this._csiHandlers[this._identifier(t)]},e.prototype.setCsiHandlerFallback=function(t){this._csiHandlerFb=t},e.prototype.registerDcsHandler=function(t,i){return this._dcsParser.registerHandler(this._identifier(t),i)},e.prototype.clearDcsHandler=function(t){this._dcsParser.clearHandler(this._identifier(t))},e.prototype.setDcsHandlerFallback=function(t){this._dcsParser.setHandlerFallback(t)},e.prototype.registerOscHandler=function(t,i){return this._oscParser.registerHandler(t,i)},e.prototype.clearOscHandler=function(t){this._oscParser.clearHandler(t)},e.prototype.setOscHandlerFallback=function(t){this._oscParser.setHandlerFallback(t)},e.prototype.setErrorHandler=function(t){this._errorHandler=t},e.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},e.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])},e.prototype._preserveStack=function(t,i,n,l,c){this._parseStack.state=t,this._parseStack.handlers=i,this._parseStack.handlerPos=n,this._parseStack.transition=l,this._parseStack.chunkPos=c},e.prototype.parse=function(t,i,n){var l,c=0,g=0,C=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,C=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");var y=this._parseStack.handlers,S=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&S>-1){for(;S>=0&&(l=y[S](this._params))!==!0;S--)if(l instanceof Promise)return this._parseStack.handlerPos=S,l}this._parseStack.handlers=[];break;case 4:if(n===!1&&S>-1){for(;S>=0&&(l=y[S]())!==!0;S--)if(l instanceof Promise)return this._parseStack.handlerPos=S,l}this._parseStack.handlers=[];break;case 6:if(c=t[this._parseStack.chunkPos],l=this._dcsParser.unhook(c!==24&&c!==26,n))return l;c===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(c=t[this._parseStack.chunkPos],l=this._oscParser.end(c!==24&&c!==26,n))return l;c===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,C=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(var w=C;w<i;++w){switch(c=t[w],(g=this._transitions.table[this.currentState<<8|(c<160?c:p)])>>4){case 2:for(var R=w+1;;++R){if(R>=i||(c=t[R])<32||c>126&&c<p){this._printHandler(t,w,R),w=R-1;break}if(++R>=i||(c=t[R])<32||c>126&&c<p){this._printHandler(t,w,R),w=R-1;break}if(++R>=i||(c=t[R])<32||c>126&&c<p){this._printHandler(t,w,R),w=R-1;break}if(++R>=i||(c=t[R])<32||c>126&&c<p){this._printHandler(t,w,R),w=R-1;break}}break;case 3:this._executeHandlers[c]?this._executeHandlers[c]():this._executeHandlerFb(c),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:w,code:c,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:for(var L=(y=this._csiHandlers[this._collect<<8|c])?y.length-1:-1;L>=0&&(l=y[L](this._params))!==!0;L--)if(l instanceof Promise)return this._preserveStack(3,y,L,g,w),l;L<0&&this._csiHandlerFb(this._collect<<8|c,this._params),this.precedingCodepoint=0;break;case 8:do switch(c){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(c-48)}while(++w<i&&(c=t[w])>47&&c<60);w--;break;case 9:this._collect<<=8,this._collect|=c;break;case 10:for(var k=this._escHandlers[this._collect<<8|c],E=k?k.length-1:-1;E>=0&&(l=k[E]())!==!0;E--)if(l instanceof Promise)return this._preserveStack(4,k,E,g,w),l;E<0&&this._escHandlerFb(this._collect<<8|c),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|c,this._params);break;case 13:for(var x=w+1;;++x)if(x>=i||(c=t[x])===24||c===26||c===27||c>127&&c<p){this._dcsParser.put(t,w,x),w=x-1;break}break;case 14:if(l=this._dcsParser.unhook(c!==24&&c!==26))return this._preserveStack(6,[],0,g,w),l;c===27&&(g|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(var M=w+1;;M++)if(M>=i||(c=t[M])<32||c>127&&c<p){this._oscParser.put(t,w,M),w=M-1;break}break;case 6:if(l=this._oscParser.end(c!==24&&c!==26))return this._preserveStack(5,[],0,g,w),l;c===27&&(g|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&g}},e}(d.Disposable);o.EscapeSequenceParser=h},6242:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;var f=b(5770),u=b(482),d=[],_=function(){function v(){this._state=0,this._active=d,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return v.prototype.registerHandler=function(s,a){this._handlers[s]===void 0&&(this._handlers[s]=[]);var p=this._handlers[s];return p.push(a),{dispose:function(){var h=p.indexOf(a);h!==-1&&p.splice(h,1)}}},v.prototype.clearHandler=function(s){this._handlers[s]&&delete this._handlers[s]},v.prototype.setHandlerFallback=function(s){this._handlerFb=s},v.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=d},v.prototype.reset=function(){if(this._state===2)for(var s=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;s>=0;--s)this._active[s].end(!1);this._stack.paused=!1,this._active=d,this._id=-1,this._state=0},v.prototype._start=function(){if(this._active=this._handlers[this._id]||d,this._active.length)for(var s=this._active.length-1;s>=0;s--)this._active[s].start();else this._handlerFb(this._id,"START")},v.prototype._put=function(s,a,p){if(this._active.length)for(var h=this._active.length-1;h>=0;h--)this._active[h].put(s,a,p);else this._handlerFb(this._id,"PUT",(0,u.utf32ToString)(s,a,p))},v.prototype.start=function(){this.reset(),this._state=1},v.prototype.put=function(s,a,p){if(this._state!==3){if(this._state===1)for(;a<p;){var h=s[a++];if(h===59){this._state=2,this._start();break}if(h<48||57<h)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+h-48}this._state===2&&p-a>0&&this._put(s,a,p)}},v.prototype.end=function(s,a){if(a===void 0&&(a=!0),this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){var p=!1,h=this._active.length-1,r=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,p=a,r=this._stack.fallThrough,this._stack.paused=!1),!r&&p===!1){for(;h>=0&&(p=this._active[h].end(s))!==!0;h--)if(p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,p;h--}for(;h>=0;h--)if((p=this._active[h].end(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,p}else this._handlerFb(this._id,"END",s);this._active=d,this._id=-1,this._state=0}},v}();o.OscParser=_;var m=function(){function v(s){this._handler=s,this._data="",this._hitLimit=!1}return v.prototype.start=function(){this._data="",this._hitLimit=!1},v.prototype.put=function(s,a,p){this._hitLimit||(this._data+=(0,u.utf32ToString)(s,a,p),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},v.prototype.end=function(s){var a=this,p=!1;if(this._hitLimit)p=!1;else if(s&&(p=this._handler(this._data))instanceof Promise)return p.then(function(h){return a._data="",a._hitLimit=!1,h});return this._data="",this._hitLimit=!1,p},v}();o.OscHandler=m},8742:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;var b=2147483647,f=function(){function u(d,_){if(d===void 0&&(d=32),_===void 0&&(_=32),this.maxLength=d,this.maxSubParamsLength=_,_>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(d),this.length=0,this._subParams=new Int32Array(_),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(d),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return u.fromArray=function(d){var _=new u;if(!d.length)return _;for(var m=Array.isArray(d[0])?1:0;m<d.length;++m){var v=d[m];if(Array.isArray(v))for(var s=0;s<v.length;++s)_.addSubParam(v[s]);else _.addParam(v)}return _},u.prototype.clone=function(){var d=new u(this.maxLength,this.maxSubParamsLength);return d.params.set(this.params),d.length=this.length,d._subParams.set(this._subParams),d._subParamsLength=this._subParamsLength,d._subParamsIdx.set(this._subParamsIdx),d._rejectDigits=this._rejectDigits,d._rejectSubDigits=this._rejectSubDigits,d._digitIsSub=this._digitIsSub,d},u.prototype.toArray=function(){for(var d=[],_=0;_<this.length;++_){d.push(this.params[_]);var m=this._subParamsIdx[_]>>8,v=255&this._subParamsIdx[_];v-m>0&&d.push(Array.prototype.slice.call(this._subParams,m,v))}return d},u.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},u.prototype.addParam=function(d){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=d>b?b:d}},u.prototype.addSubParam=function(d){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=d>b?b:d,this._subParamsIdx[this.length-1]++}},u.prototype.hasSubParams=function(d){return(255&this._subParamsIdx[d])-(this._subParamsIdx[d]>>8)>0},u.prototype.getSubParams=function(d){var _=this._subParamsIdx[d]>>8,m=255&this._subParamsIdx[d];return m-_>0?this._subParams.subarray(_,m):null},u.prototype.getSubParamsAll=function(){for(var d={},_=0;_<this.length;++_){var m=this._subParamsIdx[_]>>8,v=255&this._subParamsIdx[_];v-m>0&&(d[_]=this._subParams.slice(m,v))}return d},u.prototype.addDigit=function(d){var _;if(!(this._rejectDigits||!(_=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var m=this._digitIsSub?this._subParams:this.params,v=m[_-1];m[_-1]=~v?Math.min(10*v+d,b):d}},u}();o.Params=f},5741:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0;var b=function(){function f(){this._addons=[]}return f.prototype.dispose=function(){for(var u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()},f.prototype.loadAddon=function(u,d){var _=this,m={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(m),d.dispose=function(){return _._wrappedAddonDispose(m)},d.activate(u)},f.prototype._wrappedAddonDispose=function(u){if(!u.isDisposed){for(var d=-1,_=0;_<this._addons.length;_++)if(this._addons[_]===u){d=_;break}if(d===-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(d,1)}},f}();o.AddonManager=b},8771:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;var f=b(3785),u=b(511),d=function(){function _(m,v){this._buffer=m,this.type=v}return _.prototype.init=function(m){return this._buffer=m,this},Object.defineProperty(_.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),_.prototype.getLine=function(m){var v=this._buffer.lines.get(m);if(v)return new f.BufferLineApiView(v)},_.prototype.getNullCell=function(){return new u.CellData},_}();o.BufferApiView=d},3785:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;var f=b(511),u=function(){function d(_){this._line=_}return Object.defineProperty(d.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),d.prototype.getCell=function(_,m){if(!(_<0||_>=this._line.length))return m?(this._line.loadCell(_,m),m):this._line.loadCell(_,new f.CellData)},d.prototype.translateToString=function(_,m,v){return this._line.translateToString(_,m,v)},d}();o.BufferLineApiView=u},8285:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;var f=b(8771),u=b(8460),d=function(){function _(m){var v=this;this._core=m,this._onBufferChange=new u.EventEmitter,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(function(){return v._onBufferChange.fire(v.active)})}return Object.defineProperty(_.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"active",{get:function(){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")},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"normal",{get:function(){return this._normal.init(this._core.buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"alternate",{get:function(){return this._alternate.init(this._core.buffers.alt)},enumerable:!1,configurable:!0}),_}();o.BufferNamespaceApi=d},7975:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0;var b=function(){function f(u){this._core=u}return f.prototype.registerCsiHandler=function(u,d){return this._core.registerCsiHandler(u,function(_){return d(_.toArray())})},f.prototype.addCsiHandler=function(u,d){return this.registerCsiHandler(u,d)},f.prototype.registerDcsHandler=function(u,d){return this._core.registerDcsHandler(u,function(_,m){return d(_,m.toArray())})},f.prototype.addDcsHandler=function(u,d){return this.registerDcsHandler(u,d)},f.prototype.registerEscHandler=function(u,d){return this._core.registerEscHandler(u,d)},f.prototype.addEscHandler=function(u,d){return this.registerEscHandler(u,d)},f.prototype.registerOscHandler=function(u,d){return this._core.registerOscHandler(u,d)},f.prototype.addOscHandler=function(u,d){return this.registerOscHandler(u,d)},f}();o.ParserApi=b},7090:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0;var b=function(){function f(u){this._core=u}return f.prototype.register=function(u){this._core.unicodeService.register(u)},Object.defineProperty(f.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(u){this._core.unicodeService.activeVersion=u},enumerable:!1,configurable:!0}),f}();o.UnicodeApi=b},744:function(P,o,b){var f,u=this&&this.__extends||(f=function(h,r){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},f(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}f(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),d=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var c=h.length-1;c>=0;c--)(i=h[c])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},_=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;var m=b(2585),v=b(5295),s=b(8460),a=b(844);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;var p=function(h){function r(e){var t=h.call(this)||this;return t._optionsService=e,t.isUserScrolling=!1,t._onResize=new s.EventEmitter,t._onScroll=new s.EventEmitter,t.cols=Math.max(e.rawOptions.cols||0,o.MINIMUM_COLS),t.rows=Math.max(e.rawOptions.rows||0,o.MINIMUM_ROWS),t.buffers=new v.BufferSet(e,t),t}return u(r,h),Object.defineProperty(r.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){h.prototype.dispose.call(this),this.buffers.dispose()},r.prototype.resize=function(e,t){this.cols=e,this.rows=t,this.buffers.resize(e,t),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:t})},r.prototype.reset=function(){this.buffers.reset(),this.isUserScrolling=!1},r.prototype.scroll=function(e,t){t===void 0&&(t=!1);var i,n=this.buffer;(i=this._cachedBlankLine)&&i.length===this.cols&&i.getFg(0)===e.fg&&i.getBg(0)===e.bg||(i=n.getBlankLine(e,t),this._cachedBlankLine=i),i.isWrapped=t;var l=n.ybase+n.scrollTop,c=n.ybase+n.scrollBottom;if(n.scrollTop===0){var g=n.lines.isFull;c===n.lines.length-1?g?n.lines.recycle().copyFrom(i):n.lines.push(i.clone()):n.lines.splice(c+1,0,i.clone()),g?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{var C=c-l+1;n.lines.shiftElements(l+1,C-1,-1),n.lines.set(c,i.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)},r.prototype.scrollLines=function(e,t,i){var n=this.buffer;if(e<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else e+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);var l=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+e,n.ybase),0),l!==n.ydisp&&(t||this._onScroll.fire(n.ydisp))},r.prototype.scrollPages=function(e){this.scrollLines(e*(this.rows-1))},r.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},r.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},r.prototype.scrollToLine=function(e){var t=e-this.buffer.ydisp;t!==0&&this.scrollLines(t)},d([_(0,m.IOptionsService)],r)}(a.Disposable);o.BufferService=p},7994:(P,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0;var b=function(){function f(){this.glevel=0,this._charsets=[]}return f.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},f.prototype.setgLevel=function(u){this.glevel=u,this.charset=this._charsets[u]},f.prototype.setgCharset=function(u,d){this._charsets[u]=d,this.glevel===u&&(this.charset=d)},f}();o.CharsetService=b},1753:function(P,o,b){var f=this&&this.__decorate||function(r,e,t,i){var n,l=arguments.length,c=l<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,e,t,i);else for(var g=r.length-1;g>=0;g--)(n=r[g])&&(c=(l<3?n(c):l>3?n(e,t,c):n(e,t))||c);return l>3&&c&&Object.defineProperty(e,t,c),c},u=this&&this.__param||function(r,e){return function(t,i){e(t,i,r)}},d=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;var _=b(2585),m=b(8460),v={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(r){return r.button!==4&&r.action===1&&(r.ctrl=!1,r.alt=!1,r.shift=!1,!0)}},VT200:{events:19,restrict:function(r){return r.action!==32}},DRAG:{events:23,restrict:function(r){return r.action!==32||r.button!==3}},ANY:{events:31,restrict:function(r){return!0}}};function s(r,e){var t=(r.ctrl?16:0)|(r.shift?4:0)|(r.alt?8:0);return r.button===4?(t|=64,t|=r.action):(t|=3&r.button,4&r.button&&(t|=64),8&r.button&&(t|=128),r.action===32?t|=32:r.action!==0||e||(t|=3)),t}var a=String.fromCharCode,p={DEFAULT:function(r){var e=[s(r,!1)+32,r.col+32,r.row+32];return e[0]>255||e[1]>255||e[2]>255?"":"\x1B[M"+a(e[0])+a(e[1])+a(e[2])},SGR:function(r){var e=r.action===0&&r.button!==4?"m":"M";return"\x1B[<"+s(r,!0)+";"+r.col+";"+r.row+e}},h=function(){function r(e,t){var i,n,l,c;this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new m.EventEmitter,this._lastEvent=null;try{for(var g=d(Object.keys(v)),C=g.next();!C.done;C=g.next()){var y=C.value;this.addProtocol(y,v[y])}}catch(L){i={error:L}}finally{try{C&&!C.done&&(n=g.return)&&n.call(g)}finally{if(i)throw i.error}}try{for(var S=d(Object.keys(p)),w=S.next();!w.done;w=S.next()){var R=w.value;this.addEncoding(R,p[R])}}catch(L){l={error:L}}finally{try{w&&!w.done&&(c=S.return)&&c.call(S)}finally{if(l)throw l.error}}this.reset()}return r.prototype.addProtocol=function(e,t){this._protocols[e]=t},r.prototype.addEncoding=function(e,t){this._encodings[e]=t},Object.defineProperty(r.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(e){if(!this._protocols[e])throw new Error('unknown protocol "'+e+'"');this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(e){if(!this._encodings[e])throw new Error('unknown encoding "'+e+'"');this._activeEncoding=e},enumerable:!1,configurable:!0}),r.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(r.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),r.prototype.triggerMouseEvent=function(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,e))||!this._protocols[this._activeProtocol].restrict(e))return!1;var t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0},r.prototype.explainEvents=function(e){return{down:!!(1&e),up:!!(2&e),drag:!!(4&e),move:!!(8&e),wheel:!!(16&e)}},r.prototype._compareEvents=function(e,t){return e.col===t.col&&e.row===t.row&&e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift},f([u(0,_.IBufferService),u(1,_.ICoreService)],r)}();o.CoreMouseService=h},6975:function(P,o,b){var f,u=this&&this.__extends||(f=function(e,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])},f(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}f(e,t),e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}),d=this&&this.__decorate||function(e,t,i,n){var l,c=arguments.length,g=c<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(e,t,i,n);else for(var C=e.length-1;C>=0;C--)(l=e[C])&&(g=(c<3?l(g):c>3?l(t,i,g):l(t,i))||g);return c>3&&g&&Object.defineProperty(t,i,g),g},_=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;var m=b(2585),v=b(8460),s=b(1439),a=b(844),p=Object.freeze({insertMode:!1}),h=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),r=function(e){function t(i,n,l,c){var g=e.call(this)||this;return g._bufferService=n,g._logService=l,g._optionsService=c,g.isCursorInitialized=!1,g.isCursorHidden=!1,g._onData=g.register(new v.EventEmitter),g._onUserInput=g.register(new v.EventEmitter),g._onBinary=g.register(new v.EventEmitter),g._scrollToBottom=i,g.register({dispose:function(){return g._scrollToBottom=void 0}}),g.modes=(0,s.clone)(p),g.decPrivateModes=(0,s.clone)(h),g}return u(t,e),Object.defineProperty(t.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.modes=(0,s.clone)(p),this.decPrivateModes=(0,s.clone)(h)},t.prototype.triggerDataEvent=function(i,n){if(n===void 0&&(n=!1),!this._optionsService.rawOptions.disableStdin){var l=this._bufferService.buffer;l.ybase!==l.ydisp&&this._scrollToBottom(),n&&this._onUserInput.fire(),this._logService.debug('sending data "'+i+'"',function(){return i.split("").map(function(c){return c.charCodeAt(0)})}),this._onData.fire(i)}},t.prototype.triggerBinaryEvent=function(i){this._optionsService.rawOptions.disableStdin||(this._logService.debug('sending binary "'+i+'"',function(){return i.split("").map(function(n){return n.charCodeAt(0)})}),this._onBinary.fire(i))},d([_(1,m.IBufferService),_(2,m.ILogService),_(3,m.IOptionsService)],t)}(a.Disposable);o.CoreService=r},9074:function(P,o,b){var f,u=this&&this.__extends||(f=function(r,e){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},f(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}f(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}),d=this&&this.__generator||function(r,e){var t,i,n,l,c={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return l={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function g(C){return function(y){return function(S){if(t)throw new TypeError("Generator is already executing.");for(;c;)try{if(t=1,i&&(n=2&S[0]?i.return:S[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,S[1])).done)return n;switch(i=0,n&&(S=[2&S[0],n.value]),S[0]){case 0:case 1:n=S;break;case 4:return c.label++,{value:S[1],done:!1};case 5:c.label++,i=S[1],S=[0];continue;case 7:S=c.ops.pop(),c.trys.pop();continue;default:if(!((n=(n=c.trys).length>0&&n[n.length-1])||S[0]!==6&&S[0]!==2)){c=0;continue}if(S[0]===3&&(!n||S[1]>n[0]&&S[1]<n[3])){c.label=S[1];break}if(S[0]===6&&c.label<n[1]){c.label=n[1],n=S;break}if(n&&c.label<n[2]){c.label=n[2],c.ops.push(S);break}n[2]&&c.ops.pop(),c.trys.pop();continue}S=e.call(r,c)}catch(w){S=[6,w],i=0}finally{t=n=0}if(5&S[0])throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}([C,y])}}},_=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;var m=b(8055),v=b(8460),s=b(844),a=b(6106),p=function(r){function e(){var t=r.call(this)||this;return t._decorations=new a.SortedList(function(i){return i.marker.line}),t._onDecorationRegistered=t.register(new v.EventEmitter),t._onDecorationRemoved=t.register(new v.EventEmitter),t}return u(e,r),Object.defineProperty(e.prototype,"onDecorationRegistered",{get:function(){return this._onDecorationRegistered.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDecorationRemoved",{get:function(){return this._onDecorationRemoved.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"decorations",{get:function(){return this._decorations.values()},enumerable:!1,configurable:!0}),e.prototype.registerDecoration=function(t){var i=this;if(!t.marker.isDisposed){var n=new h(t);if(n){var l=n.marker.onDispose(function(){return n.dispose()});n.onDispose(function(){n&&(i._decorations.delete(n)&&i._onDecorationRemoved.fire(n),l.dispose())}),this._decorations.insert(n),this._onDecorationRegistered.fire(n)}return n}},e.prototype.reset=function(){var t,i;try{for(var n=_(this._decorations.values()),l=n.next();!l.done;l=n.next())l.value.dispose()}catch(c){t={error:c}}finally{try{l&&!l.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this._decorations.clear()},e.prototype.getDecorationsAtLine=function(t){return d(this,function(i){return[2,this._decorations.getKeyIterator(t)]})},e.prototype.getDecorationsAtCell=function(t,i,n){var l,c,g,C,y,S,w,R,L,k,E;return d(this,function(x){switch(x.label){case 0:l=0,c=0,x.label=1;case 1:x.trys.push([1,6,7,8]),g=_(this._decorations.getKeyIterator(i)),C=g.next(),x.label=2;case 2:return C.done?[3,5]:(y=C.value,l=(L=y.options.x)!==null&&L!==void 0?L:0,c=l+((k=y.options.width)!==null&&k!==void 0?k:1),!(t>=l&&t<c)||n&&((E=y.options.layer)!==null&&E!==void 0?E:"bottom")!==n?[3,4]:[4,y]);case 3:x.sent(),x.label=4;case 4:return C=g.next(),[3,2];case 5:return[3,8];case 6:return S=x.sent(),w={error:S},[3,8];case 7:try{C&&!C.done&&(R=g.return)&&R.call(g)}finally{if(w)throw w.error}return[7];case 8:return[2]}})},e.prototype.dispose=function(){var t,i;try{for(var n=_(this._decorations.values()),l=n.next();!l.done;l=n.next()){var c=l.value;this._onDecorationRemoved.fire(c)}}catch(g){t={error:g}}finally{try{l&&!l.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.reset()},e}(s.Disposable);o.DecorationService=p;var h=function(r){function e(t){var i=r.call(this)||this;return i.options=t,i.isDisposed=!1,i.onRenderEmitter=i.register(new v.EventEmitter),i.onRender=i.onRenderEmitter.event,i._onDispose=i.register(new v.EventEmitter),i.onDispose=i._onDispose.event,i._cachedBg=null,i._cachedFg=null,i.marker=t.marker,i.options.overviewRulerOptions&&!i.options.overviewRulerOptions.position&&(i.options.overviewRulerOptions.position="full"),i}return u(e,r),Object.defineProperty(e.prototype,"backgroundColorRGB",{get:function(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=m.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"foregroundColorRGB",{get:function(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=m.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this._onDispose.fire(),r.prototype.dispose.call(this))},e}(s.Disposable)},3730:function(P,o,b){var f=this&&this.__decorate||function(m,v,s,a){var p,h=arguments.length,r=h<3?v:a===null?a=Object.getOwnPropertyDescriptor(v,s):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(m,v,s,a);else for(var e=m.length-1;e>=0;e--)(p=m[e])&&(r=(h<3?p(r):h>3?p(v,s,r):p(v,s))||r);return h>3&&r&&Object.defineProperty(v,s,r),r},u=this&&this.__param||function(m,v){return function(s,a){v(s,a,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DirtyRowService=void 0;var d=b(2585),_=function(){function m(v){this._bufferService=v,this.clearRange()}return Object.defineProperty(m.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),m.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},m.prototype.markDirty=function(v){v<this._start?this._start=v:v>this._end&&(this._end=v)},m.prototype.markRangeDirty=function(v,s){if(v>s){var a=v;v=s,s=a}v<this._start&&(this._start=v),s>this._end&&(this._end=s)},m.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},f([u(0,d.IBufferService)],m)}();o.DirtyRowService=_},4348:function(P,o,b){var f=this&&this.__values||function(a){var p=typeof Symbol=="function"&&Symbol.iterator,h=p&&a[p],r=0;if(h)return h.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&r>=a.length&&(a=void 0),{value:a&&a[r++],done:!a}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},u=this&&this.__read||function(a,p){var h=typeof Symbol=="function"&&a[Symbol.iterator];if(!h)return a;var r,e,t=h.call(a),i=[];try{for(;(p===void 0||p-- >0)&&!(r=t.next()).done;)i.push(r.value)}catch(n){e={error:n}}finally{try{r&&!r.done&&(h=t.return)&&h.call(t)}finally{if(e)throw e.error}}return i},d=this&&this.__spreadArray||function(a,p,h){if(h||arguments.length===2)for(var r,e=0,t=p.length;e<t;e++)!r&&e in p||(r||(r=Array.prototype.slice.call(p,0,e)),r[e]=p[e]);return a.concat(r||Array.prototype.slice.call(p))};Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;var _=b(2585),m=b(8343),v=function(){function a(){for(var p,h,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];this._entries=new Map;try{for(var t=f(r),i=t.next();!i.done;i=t.next()){var n=u(i.value,2),l=n[0],c=n[1];this.set(l,c)}}catch(g){p={error:g}}finally{try{i&&!i.done&&(h=t.return)&&h.call(t)}finally{if(p)throw p.error}}}return a.prototype.set=function(p,h){var r=this._entries.get(p);return this._entries.set(p,h),r},a.prototype.forEach=function(p){this._entries.forEach(function(h,r){return p(r,h)})},a.prototype.has=function(p){return this._entries.has(p)},a.prototype.get=function(p){return this._entries.get(p)},a}();o.ServiceCollection=v;var s=function(){function a(){this._services=new v,this._services.set(_.IInstantiationService,this)}return a.prototype.setService=function(p,h){this._services.set(p,h)},a.prototype.getService=function(p){return this._services.get(p)},a.prototype.createInstance=function(p){for(var h,r,e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var i=(0,m.getServiceDependencies)(p).sort(function(S,w){return S.index-w.index}),n=[];try{for(var l=f(i),c=l.next();!c.done;c=l.next()){var g=c.value,C=this._services.get(g.id);if(!C)throw new Error("[createInstance] "+p.name+" depends on UNKNOWN service "+g.id+".");n.push(C)}}catch(S){h={error:S}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(h)throw h.error}}var y=i.length>0?i[0].index:e.length;if(e.length!==y)throw new Error("[createInstance] First service dependency of "+p.name+" at position "+(y+1)+" conflicts with "+e.length+" static arguments");return new(p.bind.apply(p,d([void 0],u(d(d([],u(e),!1),u(n),!1)),!1)))},a}();o.InstantiationService=s},7866:function(P,o,b){var f=this&&this.__decorate||function(a,p,h,r){var e,t=arguments.length,i=t<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,h):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,p,h,r);else for(var n=a.length-1;n>=0;n--)(e=a[n])&&(i=(t<3?e(i):t>3?e(p,h,i):e(p,h))||i);return t>3&&i&&Object.defineProperty(p,h,i),i},u=this&&this.__param||function(a,p){return function(h,r){p(h,r,a)}},d=this&&this.__read||function(a,p){var h=typeof Symbol=="function"&&a[Symbol.iterator];if(!h)return a;var r,e,t=h.call(a),i=[];try{for(;(p===void 0||p-- >0)&&!(r=t.next()).done;)i.push(r.value)}catch(n){e={error:n}}finally{try{r&&!r.done&&(h=t.return)&&h.call(t)}finally{if(e)throw e.error}}return i},_=this&&this.__spreadArray||function(a,p,h){if(h||arguments.length===2)for(var r,e=0,t=p.length;e<t;e++)!r&&e in p||(r||(r=Array.prototype.slice.call(p,0,e)),r[e]=p[e]);return a.concat(r||Array.prototype.slice.call(p))};Object.defineProperty(o,"__esModule",{value:!0}),o.LogService=void 0;var m=b(2585),v={debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF},s=function(){function a(p){var h=this;this._optionsService=p,this.logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this._optionsService.onOptionChange(function(r){r==="logLevel"&&h._updateLogLevel()})}return a.prototype._updateLogLevel=function(){this.logLevel=v[this._optionsService.rawOptions.logLevel]},a.prototype._evalLazyOptionalParams=function(p){for(var h=0;h<p.length;h++)typeof p[h]=="function"&&(p[h]=p[h]())},a.prototype._log=function(p,h,r){this._evalLazyOptionalParams(r),p.call.apply(p,_([console,"xterm.js: "+h],d(r),!1))},a.prototype.debug=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=m.LogLevelEnum.DEBUG&&this._log(console.log,p,h)},a.prototype.info=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=m.LogLevelEnum.INFO&&this._log(console.info,p,h)},a.prototype.warn=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=m.LogLevelEnum.WARN&&this._log(console.warn,p,h)},a.prototype.error=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=m.LogLevelEnum.ERROR&&this._log(console.error,p,h)},f([u(0,m.IOptionsService)],a)}();o.LogService=s},7302:function(P,o,b){var f=this&&this.__assign||function(){return f=Object.assign||function(v){for(var s,a=1,p=arguments.length;a<p;a++)for(var h in s=arguments[a])Object.prototype.hasOwnProperty.call(s,h)&&(v[h]=s[h]);return v},f.apply(this,arguments)};Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=o.DEFAULT_BELL_SOUND=void 0;var u=b(8460),d=b(6114);o.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,customGlyphs:!0,bellSound:o.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:d.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:void 0};var _=["normal","bold","100","200","300","400","500","600","700","800","900"],m=function(){function v(s){this._onOptionChange=new u.EventEmitter;var a=f({},o.DEFAULT_OPTIONS);for(var p in s)if(p in a)try{var h=s[p];a[p]=this._sanitizeAndValidateOption(p,h)}catch(r){console.error(r)}this.rawOptions=a,this.options=f({},a),this._setupOptions()}return Object.defineProperty(v.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),v.prototype._setupOptions=function(){var s=this,a=function(e){if(!(e in o.DEFAULT_OPTIONS))throw new Error('No option with key "'+e+'"');return s.rawOptions[e]},p=function(e,t){if(!(e in o.DEFAULT_OPTIONS))throw new Error('No option with key "'+e+'"');t=s._sanitizeAndValidateOption(e,t),s.rawOptions[e]!==t&&(s.rawOptions[e]=t,s._onOptionChange.fire(e))};for(var h in this.rawOptions){var r={get:a.bind(this,h),set:p.bind(this,h)};Object.defineProperty(this.options,h,r)}},v.prototype.setOption=function(s,a){this.options[s]=a},v.prototype._sanitizeAndValidateOption=function(s,a){switch(s){case"bellStyle":case"cursorStyle":case"rendererType":case"wordSeparator":a||(a=o.DEFAULT_OPTIONS[s]);break;case"fontWeight":case"fontWeightBold":if(typeof a=="number"&&1<=a&&a<=1e3)break;a=_.includes(a)?a:o.DEFAULT_OPTIONS[s];break;case"cursorWidth":a=Math.floor(a);case"lineHeight":case"tabStopWidth":if(a<1)throw new Error(s+" cannot be less than 1, value: "+a);break;case"minimumContrastRatio":a=Math.max(1,Math.min(21,Math.round(10*a)/10));break;case"scrollback":if((a=Math.min(a,4294967295))<0)throw new Error(s+" cannot be less than 0, value: "+a);break;case"fastScrollSensitivity":case"scrollSensitivity":if(a<=0)throw new Error(s+" cannot be less than or equal to 0, value: "+a);case"rows":case"cols":if(!a&&a!==0)throw new Error(s+" must be numeric, value: "+a)}return a},v.prototype.getOption=function(s){return this.options[s]},v}();o.OptionsService=m},8343:(P,o)=>{function b(f,u,d){u.di$target===u?u.di$dependencies.push({id:f,index:d}):(u.di$dependencies=[{id:f,index:d}],u.di$target=u)}Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0,o.serviceRegistry=new Map,o.getServiceDependencies=function(f){return f.di$dependencies||[]},o.createDecorator=function(f){if(o.serviceRegistry.has(f))return o.serviceRegistry.get(f);var u=function(d,_,m){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");b(u,d,m)};return u.toString=function(){return f},o.serviceRegistry.set(f,u),u}},2585:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.IDirtyRowService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;var f,u=b(8343);o.IBufferService=(0,u.createDecorator)("BufferService"),o.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),o.ICoreService=(0,u.createDecorator)("CoreService"),o.ICharsetService=(0,u.createDecorator)("CharsetService"),o.IDirtyRowService=(0,u.createDecorator)("DirtyRowService"),o.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(f=o.LogLevelEnum||(o.LogLevelEnum={}))[f.DEBUG=0]="DEBUG",f[f.INFO=1]="INFO",f[f.WARN=2]="WARN",f[f.ERROR=3]="ERROR",f[f.OFF=4]="OFF",o.ILogService=(0,u.createDecorator)("LogService"),o.IOptionsService=(0,u.createDecorator)("OptionsService"),o.IUnicodeService=(0,u.createDecorator)("UnicodeService"),o.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(P,o,b)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;var f=b(8460),u=b(225),d=function(){function _(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter;var m=new u.UnicodeV6;this.register(m),this._active=m.version,this._activeProvider=m}return Object.defineProperty(_.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"activeVersion",{get:function(){return this._active},set:function(m){if(!this._providers[m])throw new Error('unknown Unicode version "'+m+'"');this._active=m,this._activeProvider=this._providers[m],this._onChange.fire(m)},enumerable:!1,configurable:!0}),_.prototype.register=function(m){this._providers[m.version]=m},_.prototype.wcwidth=function(m){return this._activeProvider.wcwidth(m)},_.prototype.getStringCellWidth=function(m){for(var v=0,s=m.length,a=0;a<s;++a){var p=m.charCodeAt(a);if(55296<=p&&p<=56319){if(++a>=s)return v+this.wcwidth(p);var h=m.charCodeAt(a);56320<=h&&h<=57343?p=1024*(p-55296)+h-56320+65536:v+=this.wcwidth(h)}v+=this.wcwidth(p)}return v},_}();o.UnicodeService=d}},Z={};return function P(o){var b=Z[o];if(b!==void 0)return b.exports;var f=Z[o]={exports:{}};return G[o].call(f.exports,f,f.exports,P),f.exports}(4389)})()})}(_r)),_r.exports}var ai=si(),pr={exports:{}},Rr;function ci(){return Rr||(Rr=1,function(ee,Q){(function(G,Z){ee.exports=Z()})(window,function(){return function(G){var Z={};function P(o){if(Z[o])return Z[o].exports;var b=Z[o]={i:o,l:!1,exports:{}};return G[o].call(b.exports,b,b.exports,P),b.l=!0,b.exports}return P.m=G,P.c=Z,P.d=function(o,b,f){P.o(o,b)||Object.defineProperty(o,b,{enumerable:!0,get:f})},P.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},P.t=function(o,b){if(1&b&&(o=P(o)),8&b||4&b&&typeof o=="object"&&o&&o.__esModule)return o;var f=Object.create(null);if(P.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:o}),2&b&&typeof o!="string")for(var u in o)P.d(f,u,(function(d){return o[d]}).bind(null,u));return f},P.n=function(o){var b=o&&o.__esModule?function(){return o.default}:function(){return o};return P.d(b,"a",b),b},P.o=function(o,b){return Object.prototype.hasOwnProperty.call(o,b)},P.p="",P(P.s=0)}([function(G,Z,P){Object.defineProperty(Z,"__esModule",{value:!0});var o=new RegExp(`(?:^|[^\\da-z\\.-]+)((https?:\\/\\/)((([\\da-z\\.-]+)\\.([a-z\\.]{2,6}))|((\\d{1,3}\\.){3}\\d{1,3})|(localhost))(:\\d{1,5})?((\\/[\\/\\w\\.\\-%~:+]*)*([^:"'\\s]))?(\\?[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?(#[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?)($|[^\\/\\w\\.\\-%]+)`);function b(u,d){window.open(d,"_blank")}var f=function(){function u(d,_){d===void 0&&(d=b),_===void 0&&(_={}),this._handler=d,this._options=_,this._options.matchIndex=1}return u.prototype.activate=function(d){this._terminal=d,this._linkMatcherId=this._terminal.registerLinkMatcher(o,this._handler,this._options)},u.prototype.dispose=function(){this._linkMatcherId!==void 0&&this._terminal!==void 0&&this._terminal.deregisterLinkMatcher(this._linkMatcherId)},u}();Z.WebLinksAddon=f}])})}(pr)),pr.exports}var li=ci(),vr={exports:{}},Ar;function hi(){return Ar||(Ar=1,function(ee,Q){(function(G,Z){ee.exports=Z()})(window,function(){return function(G){var Z={};function P(o){if(Z[o])return Z[o].exports;var b=Z[o]={i:o,l:!1,exports:{}};return G[o].call(b.exports,b,b.exports,P),b.l=!0,b.exports}return P.m=G,P.c=Z,P.d=function(o,b,f){P.o(o,b)||Object.defineProperty(o,b,{enumerable:!0,get:f})},P.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},P.t=function(o,b){if(1&b&&(o=P(o)),8&b||4&b&&typeof o=="object"&&o&&o.__esModule)return o;var f=Object.create(null);if(P.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:o}),2&b&&typeof o!="string")for(var u in o)P.d(f,u,(function(d){return o[d]}).bind(null,u));return f},P.n=function(o){var b=o&&o.__esModule?function(){return o.default}:function(){return o};return P.d(b,"a",b),b},P.o=function(o,b){return Object.prototype.hasOwnProperty.call(o,b)},P.p="",P(P.s=0)}([function(G,Z,P){Object.defineProperty(Z,"__esModule",{value:!0});var o=function(){function b(){}return b.prototype.activate=function(f){this._terminal=f},b.prototype.dispose=function(){},b.prototype.fit=function(){var f=this.proposeDimensions();if(f&&this._terminal){var u=this._terminal._core;this._terminal.rows===f.rows&&this._terminal.cols===f.cols||(u._renderService.clear(),this._terminal.resize(f.cols,f.rows))}},b.prototype.proposeDimensions=function(){if(this._terminal&&this._terminal.element.parentElement){var f=this._terminal._core,u=window.getComputedStyle(this._terminal.element.parentElement),d=parseInt(u.getPropertyValue("height")),_=Math.max(0,parseInt(u.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),v=d-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),s=_-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-f.viewport.scrollBarWidth;return{cols:Math.floor(s/f._renderService.dimensions.actualCellWidth),rows:Math.floor(v/f._renderService.dimensions.actualCellHeight)}}},b}();Z.FitAddon=o}])})}(vr)),vr.exports}var ui=hi();Ke.div({display:"inline-block",position:"relative",fontSize:0,"& .terminal":{display:"inline-block"},"& .terminal .xterm .xterm-viewport":{overflowY:"hidden !important"},"& .terminal-frame":{position:"relative"},"& .terminal div":{margin:0,padding:0,border:0,outline:0,fontWeight:"inherit",fontStyle:"inherit",fontSize:"100%",verticalAlign:"baseline"},"&.terminal-window .terminal-frame":{borderRadius:6,border:"1px solid #b3b3b3",boxShadow:"0px 0px 18px #b3b3b3",margin:18,overflow:"hidden","& .terminal-titlebar":{background:"#e8e8e8",borderBottom:"1px solid #b1aeb1",borderTop:"1px solid #f3f1f3",borderTopLeftRadius:6,borderTopRightRadius:6,color:"#3b4247",fontSize:14,height:22,lineHeight:"22px",position:"relative",textAlign:"center",width:"100%","& .buttons":{left:8,lineHeight:"0px",position:"absolute",top:3.5},"& .close-button":{background:"#ff5c5c",borderRadius:"50%",border:"1px solid #e33e41",display:"inline-block",height:12,width:12},"& .minimize-button":{background:"#ffbd4c",borderRadius:"50%",border:"1px solid #e09e3e",display:"inline-block",height:12,marginLeft:4,width:12},"& .maximize-button":{background:"#00ca56",borderRadius:"50%",border:"1px solid #14ae46",display:"inline-block",height:12,marginLeft:4,width:12}},"& .terminal-body":{backgroundColor:"#1d1d1d",padding:10}},"&.terminal-floating .terminal-frame":{backgroundColor:"#1d1d1d",borderRadius:6,boxShadow:"0px 0px 18px #b3b3b3",margin:18,overflow:"hidden","& .terminal-titlebar":{color:"white",fontSize:14,height:34,lineHeight:"34px",position:"relative",textAlign:"center",width:"100%","& .buttons":{left:13,lineHeight:"0px",position:"absolute",top:9},"& .close-button":{background:"#ff5c5c",borderRadius:"50%",display:"inline-block",height:15,width:15},"& .minimize-button":{background:"#ffbd4c",borderRadius:"50%",display:"inline-block",height:15,lineHeight:"10px",marginLeft:4,width:15},"& .maximize-button":{background:"#00ca56",borderRadius:"50%",display:"inline-block",height:15,lineHeight:"10px",marginLeft:4,width:15}},"& .terminal-body":{padding:20}},"&.terminal-solid .terminal-frame":{backgroundColor:"#1d1d1d",borderRadius:6,boxShadow:"0px 0px 18px #b3b3b3",margin:18,overflow:"hidden","& .terminal-titlebar":{color:"white",fontSize:14,position:"relative",textAlign:"center",width:"100%","& .title":{margin:"15px 15px 15px","&:empty":{display:"none"}},"& .buttons":{display:"none"}},"& .terminal-body":{padding:20}},"& .controller":{background:"#45484d",backgroundColor:"#222222",bottom:"0px",display:"none",fontSize:12,height:40,position:"absolute",width:"100%",zIndex:20,transition:"height ease 200ms",WebkitTransition:"height ease 200ms",MozTransition:"height ease 200ms",OTransition:"height ease 200ms"},"&.controls .controller":{display:"block"},"&.playing .controller":{height:0,overflow:"hidden"},"&.playing:hover .controller":{height:40,overflow:"hidden"},"& .play, & .pause":{fill:"#cacaca",float:"left",height:40,lineHeight:"40px",textAlign:"center",width:40,"& .icon":{borderColor:"transparent transparent transparent #cacaca",boxSizing:"border-box",cursor:"pointer",display:"inline-block",height:15}},"& .pause":{display:"none","& .icon":{borderStyle:"double",borderWidth:"0px 0px 0px 12px",marginTop:11}},"& .play .icon":{borderStyle:"solid",borderWidth:"8px 0px 8px 13px",marginTop:10},"&.playing .play":{display:"none"},"&.playing .pause":{display:"inline-block"},"& .timer":{color:"#cacaca",float:"right",lineHeight:"40px",padding:"0 10px"},"& .progressbar-wrapper":{height:40,lineHeight:"38px",overflow:"hidden"},"& .progressbar":{backgroundColor:"#424242",display:"inline-block",height:7,overflow:"hidden",width:"100%",borderRadius:10,MozBorderRadius:10,WebkitBorderRadius:10},"&.started .progressbar":{cursor:"pointer"},"& .progress":{backgroundColor:"#cacaca",height:7,position:"relative",width:"0%"},"& .cover":{cursor:"pointer",height:"100%",position:"absolute",width:"100%",zIndex:10},"& .start svg":{cursor:"pointer",fill:"#eaeaea",height:130,left:"50%",marginLeft:-65,marginTop:-65,position:"absolute",top:"50%",width:130,zIndex:20,filter:"drop-shadow(10px 10px 15px rgba(0, 0, 0, 0.4))",WebkitFilter:"drop-shadow(10px 10px 15px rgba(0, 0, 0, 0.4))"},"&.small .start svg":{height:60,marginLeft:-30,marginTop:-30,width:60},"&.framed .start svg":{transform:"translate(0px, 8px)",WebkitTransform:"translate(0px, 8px)",MozTransform:"translate(0px, 8px)",OTransform:"translate(0px, 8px)",MsTransform:"translate(0px, 8px)"},"& .cover:hover + .start svg, & .start:hover svg":{fill:"white"},"&.started .cover, &.started .start":{display:"none"},"& .terminal-watermark":{zIndex:99999}});const fi=Ke.div({"& .xterm":{fontFeatureSettings:"'liga' 0",position:"relative",userSelect:"none",MsUserSelect:"none",WebkitUserSelect:"none",cursor:"text","&.focus, &:focus":{outline:"none"},"&.enable-mouse-events":{cursor:"default"},"&.xterm-cursor-pointer":{cursor:"pointer"},"&.column-select.focus":{cursor:"crosshair"}},"& .xterm .xterm-helpers":{position:"absolute",top:0,zIndex:5},"& .xterm .xterm-helper-textarea":{position:"absolute",opacity:0,left:"-9999em",top:0,width:0,height:0,zIndex:-5,whiteSpace:"nowrap",overflow:"hidden",resize:"none"},"& .xterm .composition-view":{background:"#000",color:"#fff",display:"none",position:"absolute",whiteSpace:"nowrap",zIndex:1,"&.active":{display:"block"}},"& .xterm .xterm-viewport":{backgroundColor:"#000",overflowY:"scroll",cursor:"default",position:"absolute",right:0,left:0,top:0,bottom:0},"& .xterm .xterm-screen":{position:"relative","& canvas":{position:"absolute",left:0,top:0}},"& .xterm .xterm-scroll-area":{visibility:"hidden"},"& .xterm-char-measure-element":{display:"inline-block",visibility:"hidden",position:"absolute",top:0,left:"-9999em",lineHeight:"normal"},"& .xterm .xterm-accessibility, & .xterm .xterm-message":{position:"absolute",left:0,top:0,bottom:0,right:0,zIndex:10,color:"transparent"},"& .xterm .live-region":{position:"absolute",left:"-9999px",width:1,height:1,overflow:"hidden"},"& .xterm-dim":{opacity:.5},"& .xterm-underline":{textDecoration:"underline"}});class Fr extends Jr.Component{xterm=null;container=null;componentDidMount(){const{value:Q="",options:G={}}=this.props;this.fitAddon=new ui.FitAddon,this.xterm=new ai.Terminal(G),this.xterm.loadAddon(new li.WebLinksAddon),this.xterm.loadAddon(this.fitAddon),this.xterm.open(this.container),this.xterm.onData(this.onData.bind(this)),this.xterm.onRender(this.onRender.bind(this)),Q&&this.xterm.write(Q),setTimeout(()=>{this.xterm&&this.fitAddon.fit()},0),this.debounceFit=Qr(()=>{this.fitAddon.fit()},600),window.addEventListener("resize",this.debounceFit)}componentWillUnmount(){this.xterm&&(this.xterm.dispose(),this.xterm=null),window.removeEventListener("resize",this.debounceFit)}shouldComponentUpdate(Q){const{value:G=""}=Q,{value:Z=""}=this.props;return Q.hasOwnProperty("value")&&G!==Z&&this.xterm&&(this.xterm.clear(),setTimeout(()=>{this.xterm.write(G)},0)),!1}getXTerm(){return this.xterm}write(Q,G){this.xterm&&this.xterm.write(Q,G)}focus(){this.xterm&&this.xterm.focus()}reset(){this.xterm&&this.xterm.reset()}onData=Q=>{const{onData:G=xr}=this.props;G(Q)};onRender=Q=>{const{onRender:G=xr}=this.props;G(Q)};resize(Q,G){this.xterm&&this.xterm.resize(Math.round(Q),Math.round(G))}setOption(Q,G){this.xterm&&this.xterm.setOption(Q,G)}getOption(Q){this.xterm&&this.xterm.setOption(Q)}refresh(){this.xterm&&this.xterm.refresh(0,this.xterm.rows-1)}render(){const{className:Q="",style:G={}}=this.props,Z=["react-xterm",Q].filter(Boolean).join(" ");return re.jsx(fi,{ref:P=>{this.container=P},className:Z,style:G})}}Fr.propTypes={onData:ce.func,onRender:ce.func,options:ce.object,value:ce.string,className:ce.string,style:ce.object};var qt={},Mr;function di(){if(Mr)return qt;Mr=1,Object.defineProperty(qt,"__esModule",{value:!0});var ee=$r(),Q=function(G,Z){var P=ee.useRef(function(){});ee.useEffect(function(){P.current=G}),ee.useEffect(function(){if(Z!==null){var o=setInterval(function(){return P.current()},Z||0);return function(){return clearInterval(o)}}},[Z])};return qt.default=Q,qt}var _i=di();const pi=Hr(_i);function vi(){const[ee,Q]=De.useState(+new Date);return pi(()=>{Q(+new Date)},1e3),ei(ee,"MMMM Do YYYY, h:mm:ss a")}const Or={info:"\x1B[34m",error:"\x1B[31m",stderr:"\x1B[31m",access:"\x1B[32m",stdout:"\x1B[37m",pm2:"\x1B[36m"},gi=/\[\d{2}\/[A-Za-z]{3}\/\d{4}:\d{2}:\d{2}:\d{2} \+\d{4}\]/g,yi=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}:/g,mi=/\(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\):/g,bi=/\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\]/g,Si=/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/g,Ci=(ee,Q)=>{const G=Or[Q.toLowerCase()]||Or.stdout,Z=ee.split(`\r
|
|
8
|
-
`);return Z.forEach((P,o)=>{const b=P.match(gi)||P.match(yi)||P.match(mi)||P.match(bi)||P.match(Si);if(b){const f=b[0],u=`\x1B[33m${f}\x1B[0m${G}`;Z[o]=P.replace(f,u)}}),`${G}${Z.join(`\r
|
|
9
|
-
`)}\x1B[0m`};function Wr({name:ee,logId:Q,types:G=["error","info","access","security","stdout","stderr"],defaultTypeIndex:Z=0,initialData:P=[],prepend:o=null,postpend:b=null,onTypeChange:f=()=>{},...u}){const{ws:{useSubscription:d}}=jr(),_={info:"Info",error:"Error",access:"Access",security:"Security",stdout:"stdout",stderr:"stderr",pm2:"PM2"},m=zr(r=>r.breakpoints.down("md")),[v,s]=De.useState(G[Z||0]),[a,p]=De.useState(),h=De.useRef({});return De.useEffect(()=>{G.forEach(r=>{const e=h.current[r];e&&(e.write(`Collecting ${r} logs for ${ee}...`),e.write(`\r
|
|
10
|
-
\r
|
|
11
|
-
`),P.forEach(t=>e.write(t)))})},[]),d(`log.${Q}`,r=>{a||p(r.logFiles||{});const e=h.current[r.level];if(e){const t=r.data.replace(/.\n/g,i=>i===`\r
|
|
12
|
-
`?i:`${i[0]}\r
|
|
13
|
-
`);e.write(Ci(t,r.level)),e.write(`\r
|
|
14
|
-
`)}},[]),re.jsxs(wi,{...u,children:[re.jsxs("div",{className:"log-terminal-group-head",style:{alignItems:m?"flex-start":"center"},children:[re.jsxs("div",{className:"log-terminal-group-head-start",children:[o,re.jsx(Kr,{variant:"outlined",size:m?"small":"medium",children:G.map(r=>{const e=r===v?{variant:"contained"}:{};return re.jsx(Gr,{...e,onClick:()=>{s(r),f(r)},children:_[r]},r)})})]}),re.jsx("div",{className:"log-terminal-group-head-end",children:b})]}),re.jsx("div",{className:"log-terminal-group-terminals",children:G.map(r=>re.jsx(Ur,{ref:e=>{h.current[r]=e},logFile:a?.[r],style:{visibility:r===v?"visible":"hidden"}},r))})]})}Wr.propTypes={name:ce.string.isRequired,logId:ce.string.isRequired,types:ce.arrayOf(ce.string),defaultTypeIndex:ce.number,initialData:ce.arrayOf(ce.string),prepend:ce.node,postpend:ce.node,onTypeChange:ce.func};const wi=Ke.div`
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
height: 100%;
|
|
18
|
-
.log-terminal-group-head {
|
|
19
|
-
display: flex;
|
|
20
|
-
justify-content: space-between;
|
|
21
|
-
padding-bottom: 16px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.log-terminal-group-head-start {
|
|
25
|
-
flex: 0 0 auto;
|
|
26
|
-
display: flex;
|
|
27
|
-
align-items: center;
|
|
28
|
-
gap: 16px;
|
|
29
|
-
${ee=>ee.theme.breakpoints.down("md")} {
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
align-items: start;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.log-terminal-group-head-end {
|
|
36
|
-
flex: 0 0 auto;
|
|
37
|
-
display: flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
gap: 16px;
|
|
40
|
-
${ee=>ee.theme.breakpoints.down("md")} {
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
align-items: start;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
.log-terminal-group-terminals {
|
|
46
|
-
flex: 1;
|
|
47
|
-
position: relative;
|
|
48
|
-
overflow: hidden;
|
|
49
|
-
> * {
|
|
50
|
-
position: absolute;
|
|
51
|
-
top: 0;
|
|
52
|
-
bottom: 0;
|
|
53
|
-
left: 0;
|
|
54
|
-
right: 0;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
`;function Ur({ref:ee=null,logFile:Q="",...G}){const Z={width:"100%",boxSizing:"border-box",height:"100%"},P={theme:{background:"#2C313C",foreground:"#EEEEEE",red:"#ff3333",black:"#1f2430",green:"#bae67e",yellow:"#ffa759",blue:"#73d0ff",purple:"#d4bfff",cyan:"#95e6cb",white:"#cbccc6"},screenReaderMode:!0};return re.jsxs(Li,{...G,children:[re.jsxs("div",{className:"log-terminal-top",children:[re.jsx(vi,{}),Q&&re.jsx("span",{children:Q})]}),re.jsx("div",{className:"log-terminal-container",style:{position:"relative"},children:re.jsx(Fr,{ref:ee,style:Z,options:P})})]})}Ur.propTypes={ref:ce.any,logFile:ce.string};const Li=Ke.div`
|
|
58
|
-
height: 100%;
|
|
59
|
-
display: flex;
|
|
60
|
-
flex-direction: column;
|
|
61
|
-
.log-terminal-top {
|
|
62
|
-
flex: 0 0 auto;
|
|
63
|
-
display: flex;
|
|
64
|
-
justify-content: space-between;
|
|
65
|
-
align-items: center;
|
|
66
|
-
flex-wrap: wrap;
|
|
67
|
-
padding: 8px;
|
|
68
|
-
font-size: 14px;
|
|
69
|
-
color: aquamarine;
|
|
70
|
-
background: darkgray;
|
|
71
|
-
word-break: break-word;
|
|
72
|
-
}
|
|
73
|
-
.log-terminal-container {
|
|
74
|
-
flex: 1;
|
|
75
|
-
height: 100%;
|
|
76
|
-
padding: 8px;
|
|
77
|
-
overflow: hidden;
|
|
78
|
-
background: #2c313c;
|
|
79
|
-
.xterm-accessibility {
|
|
80
|
-
pointer-events: none;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.xterm-viewport::-webkit-scrollbar {
|
|
85
|
-
width: 10px;
|
|
86
|
-
}
|
|
87
|
-
.xterm-viewport::-webkit-scrollbar-track {
|
|
88
|
-
opacity: 0;
|
|
89
|
-
}
|
|
90
|
-
.xterm-viewport::-webkit-scrollbar-thumb {
|
|
91
|
-
min-height: 20px;
|
|
92
|
-
background-color: #ffffff20;
|
|
93
|
-
}
|
|
94
|
-
`;var Nt={exports:{}},xi=Nt.exports,Dr;function Ei(){return Dr||(Dr=1,function(ee,Q){(function(G,Z,P){ee.exports=P(),ee.exports.default=P()})("slugify",xi,function(){var G=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),Z=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function P(o,b){if(typeof o!="string")throw new Error("slugify: string argument expected");b=typeof b=="string"?{replacement:b}:b||{};var f=Z[b.locale]||{},u=b.replacement===void 0?"-":b.replacement,d=b.trim===void 0?!0:b.trim,_=o.normalize().split("").reduce(function(m,v){var s=f[v];return s===void 0&&(s=G[v]),s===void 0&&(s=v),s===u&&(s=" "),m+s.replace(b.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return b.strict&&(_=_.replace(/[^A-Za-z0-9\s]/g,"")),d&&(_=_.trim()),_=_.replace(/\s+/g,u),b.lower&&(_=_.toLowerCase()),_}return P.extend=function(o){Object.assign(G,o)},P})}(Nt)),Nt.exports}var gr,Tr;function ki(){if(Tr)return gr;Tr=1;const ee=Ei();return gr=G=>ee((G||"").replace(/^[@./-]/,"").replace(/[@./_]/g,"-")),gr}var Ri=ki();const Ai=Hr(Ri),Mi=[1,7];function qr({id:ee,name:Q=""}){const{t:G}=ri(),{restApi:Z,inService:P}=jr(),[o,b]=De.useState(!1),[f,u]=De.useState(!1),[d,_]=De.useState(1),m=async()=>{if(!f)try{u(!0);const s=P?"":`/${ee}`,a=await Z.get(`/download/log${s}?days=${d}`,{responseType:"blob",timeout:30*60*1e3}),p=URL.createObjectURL(a.data),h=document.createElement("a");h.href=p,h.setAttribute("download",`${Ai(Q||ee)}.${ti().format("YYYYMMDDHHmmss")}.log.zip`),document.body.appendChild(h),h.click(),document.body.removeChild(h),URL.revokeObjectURL(p),u(!1),b(!1)}catch(s){u(!1),ni.error(s.message)}},v=s=>{_(s.target.value)};return[re.jsx(ze,{style:{gap:16},sx:{display:"flex",alignItems:"center"},children:re.jsxs(Er,{"data-cy":"download-logs",variant:"outlined",onClick:()=>b(!0),disabled:f,children:[f?re.jsx(Lr,{size:16}):re.jsx(Vr,{fontSize:"small",style:{transform:"translateY(2px)"}}),re.jsx(ze,{sx:{ml:.5},children:G("common.download")})]})}),o&&re.jsx(ii,{open:!0,onClose:()=>{b(!1)},disableEscapeKeyDown:!0,title:G("common.download"),PaperProps:{style:{minHeight:"auto"}},actions:re.jsxs(Er,{"data-cy":"download-logs",variant:"outlined",onClick:()=>m(),disabled:f,children:[f&&re.jsx(Lr,{size:16}),re.jsx(ze,{sx:{ml:.5},children:G("common.confirm")})]}),children:re.jsx(ze,{sx:{mb:2,display:"flex",justifyContent:"center"},children:re.jsx(Br,{size:"small",fullWidth:!0,children:re.jsx(Pr,{value:d,onChange:v,children:Mi.map(s=>re.jsx(Ir,{value:s,children:G(`log.lastDays.${s}`)},s))})})})})]}qr.propTypes={id:ce.string.isRequired,name:ce.string};const Oi=Ke.div`
|
|
95
|
-
display: flex;
|
|
96
|
-
justify-items: flex-start;
|
|
97
|
-
align-items: center;
|
|
98
|
-
gap: 8px;
|
|
99
|
-
.name {
|
|
100
|
-
display: block;
|
|
101
|
-
max-width: 260px;
|
|
102
|
-
white-space: nowrap;
|
|
103
|
-
overflow: hidden;
|
|
104
|
-
text-overflow: ellipsis;
|
|
105
|
-
}
|
|
106
|
-
`;function Di({blocklet:ee,...Q}){const G=['Tip: this tab will only show runtime logs. Please go to "Blocklet Server" to view other lifecycle logs of the blocklet (install/start/stop...)',`\r
|
|
107
|
-
\r
|
|
108
|
-
`],Z=(ee?.children||[]).map(p=>({did:p.meta.did,name:p.meta.title,types:["error","info","access","stdout","stderr"],component:p}));Z.sort((p,h)=>p.name.localeCompare(h.name));const[P,o]=De.useState(""),[b,f]=Xr(`blocklet-log-${ee.meta.did}`,"");let[u,d]=b.split(",");Z.find(p=>p.did===u)||(u=Z[0]?.did);const _=p=>{f([p.target.value,d].join(","))},m=Z.filter(p=>p.name.toLowerCase().includes(P.toLowerCase())),v=re.jsx(Br,{sx:{minWidth:240,maxWidth:300},children:re.jsxs(Pr,{MenuProps:{autoFocus:!1},value:u,onChange:_,onClose:()=>o(""),size:"small",variant:"outlined",children:[re.jsx(Yr,{children:re.jsx(Zr,{autoFocus:!0,value:P,placeholder:"Search",variant:"outlined",size:"small",fullWidth:!0,onChange:p=>o(p.target.value),onKeyDown:p=>{p.key!=="Escape"&&p.stopPropagation()}})}),m.map(p=>re.jsx(Ir,{value:p.did,children:re.jsxs(Oi,{children:[re.jsx(oi,{size:24,blocklet:p.component,ancestors:[ee]}),re.jsx("span",{className:"name",children:p.name})]})},p.did))]})}),s=Z.find(p=>p.did===u)||Z[0]||ee.meta,a=p=>{const h=s.types.indexOf(p);f([u,h||0].join(","))};return re.jsx(ze,{...Q,sx:[{height:{xs:"calc(100vh - 444px)",sm:"calc(100vh - 508px)",md:"calc(100vh - 445px)"}},...Array.isArray(Q.sx)?Q.sx:[Q.sx]],children:re.jsx(Wr,{logId:s===ee.meta?`blocklet-${ee.meta.did}`:`blocklet-${ee.meta.did}/${s.did}`,initialData:G,prepend:v,postpend:re.jsx(qr,{id:ee.meta.did,name:ee.meta.name}),name:s.name,types:s.types,defaultTypeIndex:d,onTypeChange:a},s.did)})}Di.propTypes={blocklet:ce.object.isRequired};export{Di as default};
|