@overlordai/server 1.0.124 → 1.0.126
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/adapters/adapter.interface.d.ts +2 -2
- package/dist/adapters/adapter.interface.d.ts.map +1 -1
- package/dist/adapters/help-text.js +1 -1
- package/dist/adapters/help-text.js.map +1 -1
- package/dist/adapters/lark/lark-card.builder.d.ts.map +1 -1
- package/dist/adapters/lark/lark-card.builder.js +11 -1
- package/dist/adapters/lark/lark-card.builder.js.map +1 -1
- package/dist/adapters/lark/lark.adapter.d.ts +1 -1
- package/dist/adapters/lark/lark.adapter.d.ts.map +1 -1
- package/dist/adapters/lark/lark.adapter.js +4 -3
- package/dist/adapters/lark/lark.adapter.js.map +1 -1
- package/dist/adapters/lark/lark.controller.js +1 -1
- package/dist/adapters/lark/lark.controller.js.map +1 -1
- package/dist/adapters/slack/slack-block.builder.d.ts.map +1 -1
- package/dist/adapters/slack/slack-block.builder.js +11 -1
- package/dist/adapters/slack/slack-block.builder.js.map +1 -1
- package/dist/adapters/slack/slack.adapter.d.ts +1 -1
- package/dist/adapters/slack/slack.adapter.d.ts.map +1 -1
- package/dist/adapters/slack/slack.adapter.js +2 -2
- package/dist/adapters/slack/slack.adapter.js.map +1 -1
- package/dist/adapters/slack/slack.controller.js +2 -2
- package/dist/adapters/slack/slack.controller.js.map +1 -1
- package/dist/common/string-utils.d.ts +3 -1
- package/dist/common/string-utils.d.ts.map +1 -1
- package/dist/common/string-utils.js +16 -3
- package/dist/common/string-utils.js.map +1 -1
- package/dist/common/task-agent.d.ts +3 -0
- package/dist/common/task-agent.d.ts.map +1 -0
- package/dist/common/task-agent.js +21 -0
- package/dist/common/task-agent.js.map +1 -0
- package/dist/common/task-time-cost.d.ts +3 -0
- package/dist/common/task-time-cost.d.ts.map +1 -0
- package/dist/common/task-time-cost.js +28 -0
- package/dist/common/task-time-cost.js.map +1 -0
- package/dist/dispatcher/dispatcher.service.js +1 -1
- package/dist/dispatcher/dispatcher.service.js.map +1 -1
- package/dist/dispatcher/scheduler.service.d.ts.map +1 -1
- package/dist/dispatcher/scheduler.service.js +22 -1
- package/dist/dispatcher/scheduler.service.js.map +1 -1
- package/dist/dispatcher/state-machine.d.ts +1 -1
- package/dist/dispatcher/state-machine.js +2 -2
- package/dist/dispatcher/state-machine.js.map +1 -1
- package/dist/dispatcher/task-creation.service.d.ts.map +1 -1
- package/dist/dispatcher/task-creation.service.js +4 -2
- package/dist/dispatcher/task-creation.service.js.map +1 -1
- package/dist/dispatcher/task-lifecycle.service.js +4 -4
- package/dist/dispatcher/task-lifecycle.service.js.map +1 -1
- package/dist/dispatcher/worker-connection.manager.d.ts +1 -1
- package/dist/dispatcher/worker-connection.manager.d.ts.map +1 -1
- package/dist/dispatcher/worker-connection.manager.js +11 -3
- package/dist/dispatcher/worker-connection.manager.js.map +1 -1
- package/dist/dispatcher/worker-selector.d.ts.map +1 -1
- package/dist/dispatcher/worker-selector.js +16 -2
- package/dist/dispatcher/worker-selector.js.map +1 -1
- package/dist/notifier/notification-consumer.d.ts +7 -2
- package/dist/notifier/notification-consumer.d.ts.map +1 -1
- package/dist/notifier/notification-consumer.js +35 -13
- package/dist/notifier/notification-consumer.js.map +1 -1
- package/dist/web/dashboard.controller.d.ts +1 -0
- package/dist/web/dashboard.controller.d.ts.map +1 -1
- package/dist/web/dashboard.service.d.ts +4 -1
- package/dist/web/dashboard.service.d.ts.map +1 -1
- package/dist/web/dashboard.service.js +17 -9
- package/dist/web/dashboard.service.js.map +1 -1
- package/dist/web/project.controller.d.ts +1 -1
- package/dist/web/project.controller.d.ts.map +1 -1
- package/dist/web/project.controller.js +12 -5
- package/dist/web/project.controller.js.map +1 -1
- package/dist/web/pty.gateway.d.ts.map +1 -1
- package/dist/web/pty.gateway.js +7 -2
- package/dist/web/pty.gateway.js.map +1 -1
- package/dist/web/task.controller.d.ts +1 -1
- package/dist/web/task.controller.d.ts.map +1 -1
- package/dist/web/task.controller.js +3 -13
- package/dist/web/task.controller.js.map +1 -1
- package/dist/web/worker-channel.gateway.d.ts +1 -0
- package/dist/web/worker-channel.gateway.d.ts.map +1 -1
- package/dist/web/worker-channel.gateway.js +14 -2
- package/dist/web/worker-channel.gateway.js.map +1 -1
- package/package.json +4 -4
- package/public/assets/{AccessTokensPage-Cr097v40.js → AccessTokensPage-Ck9KudgP.js} +1 -1
- package/public/assets/AdminPage-BKWbP0n2.js +1 -0
- package/public/assets/{AgentCliPage-0DYkyCFU.js → AgentCliPage-Bex4ulEr.js} +1 -1
- package/public/assets/ApiReferencePage-CTkJqTdJ.js +1 -0
- package/public/assets/{ArchitecturePage-QnOTiWty.js → ArchitecturePage-8SxZccYN.js} +1 -1
- package/public/assets/AuditLogPage-BLzj5y_X.js +1 -0
- package/public/assets/{BindPlatformPage-ot7gVchX.js → BindPlatformPage-D45esrNl.js} +1 -1
- package/public/assets/{BotIntegrationPage-BtyfG2XP.js → BotIntegrationPage-BhDYugrQ.js} +1 -1
- package/public/assets/{BotManage-BZAdr9Ef.js → BotManage-CbUW-s4b.js} +1 -1
- package/public/assets/{BotSetupPage-DHPQWTKC.js → BotSetupPage-DnwaG9Z7.js} +1 -1
- package/public/assets/{ChangelogPage-AEZ8l4_F.js → ChangelogPage-ROnloca6.js} +1 -1
- package/public/assets/CliReferencePage-C-Lw0uAV.js +14 -0
- package/public/assets/{DeploymentPage-DoLblVvb.js → DeploymentPage-Cm8hl7PF.js} +1 -1
- package/public/assets/{DevWorkflowPage-DejRDBZS.js → DevWorkflowPage-DTjFXI4G.js} +1 -1
- package/public/assets/{DeveloperManage-Cp8HZ0D6.js → DeveloperManage-4o7ML8ff.js} +1 -1
- package/public/assets/{DeveloperSetupPage-BR9jE9u9.js → DeveloperSetupPage-BQhIuXLe.js} +1 -1
- package/public/assets/{DocsIndexPage-DFjTwAEC.js → DocsIndexPage-CoUUKiVh.js} +1 -1
- package/public/assets/DocsLayout-Br7yGyG5.js +1 -0
- package/public/assets/{DocsPrimitives-BXzC3C_T.js → DocsPrimitives-DuiNLMTd.js} +1 -1
- package/public/assets/{EditProjectPage-BAdWNM1Q.js → EditProjectPage-C_vbQdR2.js} +1 -1
- package/public/assets/{EmptyState-CSnE65GT.js → EmptyState-aKMHLBhj.js} +1 -1
- package/public/assets/{EnvVariablesPage-CG4TuCIN.js → EnvVariablesPage-gbqhCWCv.js} +1 -1
- package/public/assets/HomePage-Sfw7oH7M.js +1 -0
- package/public/assets/{InfoRow-CUxNs9ne.js → InfoRow-BQI_KKyp.js} +1 -1
- package/public/assets/{InstallationPage-C679ErXI.js → InstallationPage-Ce0qD1m-.js} +1 -1
- package/public/assets/{LandingPage-E8pwfBvz.js → LandingPage-1SiyCrIO.js} +1 -1
- package/public/assets/{LocalDevelopmentPage-D6ILnSoo.js → LocalDevelopmentPage-tuixvO86.js} +1 -1
- package/public/assets/{LoginPage-D_DPwVwn.js → LoginPage-D7C2GvH2.js} +1 -1
- package/public/assets/{MetricBar-8GF9L_i9.js → MetricBar-DaWuVJHZ.js} +1 -1
- package/public/assets/{NotFoundPage-Cw8H-got.js → NotFoundPage-B2K-657t.js} +1 -1
- package/public/assets/{OnboardingGuide-CYh6h81Z.js → OnboardingGuide-Cj_QW_kH.js} +1 -1
- package/public/assets/{PermissionsPage-BJ5ucT9C.js → PermissionsPage-D4ZeOpEb.js} +1 -1
- package/public/assets/{PipelineConfigPage-CmFPv119.js → PipelineConfigPage-DaCDhd-P.js} +1 -1
- package/public/assets/{PipelineEditorPage-6adMKyts.js → PipelineEditorPage-rM_yORd4.js} +2 -2
- package/public/assets/ProfilePage-DshUwwog.js +1 -0
- package/public/assets/ProjectDetailPage-BMKog_vR.js +7 -0
- package/public/assets/{ProjectListPage-DrLdH4Ei.js → ProjectListPage-C5U_Q6m_.js} +2 -2
- package/public/assets/{PtyTerminal-gy77drbY.js → PtyTerminal-DJ4ToCWx.js} +2 -2
- package/public/assets/{QuickAuth-xZnzkGvb.js → QuickAuth-BPSm4iQz.js} +1 -1
- package/public/assets/{RemoveMemberConfirmDialog-B5OQbjQg.js → RemoveMemberConfirmDialog-GYx2AH26.js} +2 -2
- package/public/assets/{Select-Do5DXb3j.js → Select-CvM411zU.js} +1 -1
- package/public/assets/{SettingsPage-Bw9JmWan.js → SettingsPage-_cXRQuuA.js} +1 -1
- package/public/assets/{Skeleton-CW5d7fJ4.js → Skeleton-qXDikSxR.js} +1 -1
- package/public/assets/{SkillPage-C-ShsZGo.js → SkillPage-C3wTzd5o.js} +1 -1
- package/public/assets/TaskDetailPage-BQY6iia7.js +26 -0
- package/public/assets/TaskListPage-D6iQoHz7.js +1 -0
- package/public/assets/{TaskStatusBadge--oACnBUb.js → TaskStatusBadge-CJTrG6-l.js} +1 -1
- package/public/assets/TerminalHomePage-BFyQcEXU.js +11 -0
- package/public/assets/{TokenManage-D0UL7DBv.js → TokenManage-C5GQ1LB8.js} +1 -1
- package/public/assets/{Tooltip-BQSpwoKv.js → Tooltip-DYbD-tQw.js} +1 -1
- package/public/assets/{TotpSetupPage-D9iUn0_Y.js → TotpSetupPage-C09YtAXD.js} +1 -1
- package/public/assets/WorkerDetailPage-DhtIXNEC.js +1 -0
- package/public/assets/{WorkerListPage-B47Wc0zs.js → WorkerListPage-B_K4x-PV.js} +2 -2
- package/public/assets/{WorkerOperationsPage-XuqS7u-Y.js → WorkerOperationsPage-BZN-hLvH.js} +1 -1
- package/public/assets/{WorkerSetupGuidePage-D_fyqLD7.js → WorkerSetupGuidePage-DNy2wbA9.js} +1 -1
- package/public/assets/{WorkerSetupPage-C-xmBIhD.js → WorkerSetupPage-VBsAuhUc.js} +1 -1
- package/public/assets/{arrow-left-BmBtPvqR.js → arrow-left-B5R31ze1.js} +1 -1
- package/public/assets/{arrow-right-DQ5XDN6Z.js → arrow-right-C10sjQNz.js} +1 -1
- package/public/assets/{bot-DUC6k0o_.js → bot-J2o7uWlo.js} +1 -1
- package/public/assets/chevron-left-B5ojlwvf.js +6 -0
- package/public/assets/{chevron-right-D5yuBhvf.js → chevron-right-Yoiq-SRa.js} +1 -1
- package/public/assets/{copy-DsibVBOY.js → copy-BpM8iA-r.js} +1 -1
- package/public/assets/date-RFA7-ZGs.js +1 -0
- package/public/assets/{download-BLkgWRTq.js → download-DMI0uxkZ.js} +1 -1
- package/public/assets/{external-link-oEMmDqkw.js → external-link-BgyHxzCy.js} +1 -1
- package/public/assets/{git-fork-nMDIqkn8.js → git-fork-BSMVuD3x.js} +1 -1
- package/public/assets/index-DMWyyiI3.css +1 -0
- package/public/assets/{index-Cxiuct-Z.js → index-XDDf1Oy_.js} +42 -42
- package/public/assets/{key-CFQniqbQ.js → key-y6VWhViZ.js} +1 -1
- package/public/assets/{loader-circle-gHkPMihD.js → loader-circle-CMxLiCu8.js} +1 -1
- package/public/assets/{pencil-B01ssnBx.js → pencil-CUs1Ii2-.js} +1 -1
- package/public/assets/{plus-26O7XffR.js → plus-R7zuZ-Lg.js} +1 -1
- package/public/assets/{rotate-ccw-EIYq8PBk.js → rotate-ccw-B1uEgqoV.js} +1 -1
- package/public/assets/{scroll-text-BHCR_iaD.js → scroll-text-CL3s7j9w.js} +1 -1
- package/public/assets/{settings-beF7O3lb.js → settings-IoIv8DUf.js} +1 -1
- package/public/assets/status-colors-JE6CIHvW.js +1 -0
- package/public/assets/task-constants-DkWAZdpz.js +1 -0
- package/public/assets/{trash-2-BJmwr4y8.js → trash-2-BYatp6Y5.js} +1 -1
- package/public/assets/{useFetch-DiJtqzkU.js → useFetch-D6-vLVQP.js} +1 -1
- package/public/assets/{users-C17f7r3H.js → users-C3jRdgS-.js} +1 -1
- package/public/assets/{wifi-CJ7w56-5.js → wifi-B8ZV0Cuq.js} +1 -1
- package/public/assets/{workflow-DNH-yZBI.js → workflow-GXjmJAuH.js} +1 -1
- package/public/index.html +2 -2
- package/public/sw.js +1 -1
- package/public/assets/AdminPage-VIOLrGFx.js +0 -1
- package/public/assets/ApiReferencePage-B9a_wvSq.js +0 -1
- package/public/assets/AuditLogPage-B2V_M9t2.js +0 -6
- package/public/assets/CliReferencePage-Yr_43MGe.js +0 -14
- package/public/assets/DocsLayout-DC5Tkwza.js +0 -1
- package/public/assets/HomePage-BqlvkHSs.js +0 -1
- package/public/assets/ProfilePage-Ce-x-H8n.js +0 -1
- package/public/assets/ProjectDetailPage-DXZrEF_O.js +0 -7
- package/public/assets/TaskDetailPage-BakBoast.js +0 -26
- package/public/assets/TaskListPage--IQPCrtx.js +0 -1
- package/public/assets/TerminalHomePage-DCoze8O0.js +0 -11
- package/public/assets/WorkerDetailPage-D3Jzaen0.js +0 -1
- package/public/assets/date-BdNtiQTP.js +0 -1
- package/public/assets/index-zA1n63-W.css +0 -1
- package/public/assets/status-colors-BH60BXIE.js +0 -1
- package/public/assets/task-constants-CJk15ylu.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ke=Object.defineProperty;var Le=(te,j,K)=>j in te?ke(te,j,{enumerable:!0,configurable:!0,writable:!0,value:K}):te[j]=K;var se=(te,j,K)=>Le(te,typeof j!="symbol"?j+"":j,K);import{c as ye,r as X,u as De,h as Re,j as ue}from"./index-
|
|
1
|
+
var ke=Object.defineProperty;var Le=(te,j,K)=>j in te?ke(te,j,{enumerable:!0,configurable:!0,writable:!0,value:K}):te[j]=K;var se=(te,j,K)=>Le(te,typeof j!="symbol"?j+"":j,K);import{c as ye,r as X,u as De,h as Re,j as ue}from"./index-XDDf1Oy_.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -16,4 +16,4 @@ WARNING: This link could potentially be dangerous`)){const s=window.open();if(s)
|
|
|
16
16
|
`:`
|
|
17
17
|
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(h){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),s.isLinux&&h&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(h){const f=this._getMouseBufferCoords(h),b=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!!(b&&L&&f)&&this._areCoordsInSelection(f,b,L)}isCellInSelection(h,f){const b=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!b||!L)&&this._areCoordsInSelection([h,f],b,L)}_areCoordsInSelection(h,f,b){return h[1]>f[1]&&h[1]<b[1]||f[1]===b[1]&&h[1]===f[1]&&h[0]>=f[0]&&h[0]<b[0]||f[1]<b[1]&&h[1]===b[1]&&h[0]<b[0]||f[1]<b[1]&&h[1]===f[1]&&h[0]>=f[0]}_selectWordAtCursor(h,f){var b,L;const y=(L=(b=this._linkifier.currentLink)===null||b===void 0?void 0:b.link)===null||L===void 0?void 0:L.range;if(y)return this._model.selectionStart=[y.start.x-1,y.start.y-1],this._model.selectionStartLength=(0,t.getRangeLength)(y,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const E=this._getMouseBufferCoords(h);return!!E&&(this._selectWordAt(E,f),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(h,f){this._model.clearSelection(),h=Math.max(h,0),f=Math.min(f,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,h],this._model.selectionEnd=[this._bufferService.cols,f],this.refresh(),this._onSelectionChange.fire()}_handleTrim(h){this._model.handleTrim(h)&&this.refresh()}_getMouseBufferCoords(h){const f=this._mouseService.getCoords(h,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(f)return f[0]--,f[1]--,f[1]+=this._bufferService.buffer.ydisp,f}_getMouseEventScrollAmount(h){let f=(0,n.getCoordsRelativeToElement)(this._coreBrowserService.window,h,this._screenElement)[1];const b=this._renderService.dimensions.css.canvas.height;return f>=0&&f<=b?0:(f>b&&(f-=b),f=Math.min(Math.max(f,-50),50),f/=50,f/Math.abs(f)+Math.round(14*f))}shouldForceSelection(h){return s.isMac?h.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:h.shiftKey}handleMouseDown(h){if(this._mouseDownTimeStamp=h.timeStamp,(h.button!==2||!this.hasSelection)&&h.button===0){if(!this._enabled){if(!this.shouldForceSelection(h))return;h.stopPropagation()}h.preventDefault(),this._dragScrollAmount=0,this._enabled&&h.shiftKey?this._handleIncrementalClick(h):h.detail===1?this._handleSingleClick(h):h.detail===2?this._handleDoubleClick(h):h.detail===3&&this._handleTripleClick(h),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(h){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(h))}_handleSingleClick(h){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(h)?3:0,this._model.selectionStart=this._getMouseBufferCoords(h),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const f=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);f&&f.length!==this._model.selectionStart[0]&&f.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(h){this._selectWordAtCursor(h,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(h){const f=this._getMouseBufferCoords(h);f&&(this._activeSelectionMode=2,this._selectLineAt(f[1]))}shouldColumnSelect(h){return h.altKey&&!(s.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(h){if(h.stopImmediatePropagation(),!this._model.selectionStart)return;const f=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(h),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(h),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const b=this._bufferService.buffer;if(this._model.selectionEnd[1]<b.lines.length){const L=b.lines.get(this._model.selectionEnd[1]);L&&L.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}f&&f[0]===this._model.selectionEnd[0]&&f[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const h=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(h.ydisp+this._bufferService.rows,h.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=h.ydisp),this.refresh()}}_handleMouseUp(h){const f=h.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&f<500&&h.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const b=this._mouseService.getCoords(h,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(b&&b[0]!==void 0&&b[1]!==void 0){const L=(0,d.moveToCellSequence)(b[0]-1,b[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(L,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const h=this._model.finalSelectionStart,f=this._model.finalSelectionEnd,b=!(!h||!f||h[0]===f[0]&&h[1]===f[1]);b?h&&f&&(this._oldSelectionStart&&this._oldSelectionEnd&&h[0]===this._oldSelectionStart[0]&&h[1]===this._oldSelectionStart[1]&&f[0]===this._oldSelectionEnd[0]&&f[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(h,f,b)):this._oldHasSelection&&this._fireOnSelectionChange(h,f,b)}_fireOnSelectionChange(h,f,b){this._oldSelectionStart=h,this._oldSelectionEnd=f,this._oldHasSelection=b,this._onSelectionChange.fire()}_handleBufferActivate(h){this.clearSelection(),this._trimListener.dispose(),this._trimListener=h.activeBuffer.lines.onTrim((f=>this._handleTrim(f)))}_convertViewportColToCharacterIndex(h,f){let b=f;for(let L=0;f>=L;L++){const y=h.loadCell(L,this._workCell).getChars().length;this._workCell.getWidth()===0?b--:y>1&&f!==L&&(b+=y-1)}return b}setSelection(h,f,b){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[h,f],this._model.selectionStartLength=b,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(h){this._isClickInSelection(h)||(this._selectWordAtCursor(h,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(h,f,b=!0,L=!0){if(h[0]>=this._bufferService.cols)return;const y=this._bufferService.buffer,E=y.lines.get(h[1]);if(!E)return;const x=y.translateBufferLineToString(h[1],!1);let A=this._convertViewportColToCharacterIndex(E,h[0]),M=A;const O=h[0]-A;let C=0,w=0,k=0,D=0;if(x.charAt(A)===" "){for(;A>0&&x.charAt(A-1)===" ";)A--;for(;M<x.length&&x.charAt(M+1)===" ";)M++}else{let U=h[0],W=h[0];E.getWidth(U)===0&&(C++,U--),E.getWidth(W)===2&&(w++,W++);const V=E.getString(W).length;for(V>1&&(D+=V-1,M+=V-1);U>0&&A>0&&!this._isCharWordSeparator(E.loadCell(U-1,this._workCell));){E.loadCell(U-1,this._workCell);const S=this._workCell.getChars().length;this._workCell.getWidth()===0?(C++,U--):S>1&&(k+=S-1,A-=S-1),A--,U--}for(;W<E.length&&M+1<x.length&&!this._isCharWordSeparator(E.loadCell(W+1,this._workCell));){E.loadCell(W+1,this._workCell);const S=this._workCell.getChars().length;this._workCell.getWidth()===2?(w++,W++):S>1&&(D+=S-1,M+=S-1),M++,W++}}M++;let I=A+O-C+k,H=Math.min(this._bufferService.cols,M-A+C+w-k-D);if(f||x.slice(A,M).trim()!==""){if(b&&I===0&&E.getCodePoint(0)!==32){const U=y.lines.get(h[1]-1);if(U&&E.isWrapped&&U.getCodePoint(this._bufferService.cols-1)!==32){const W=this._getWordAt([this._bufferService.cols-1,h[1]-1],!1,!0,!1);if(W){const V=this._bufferService.cols-W.start;I-=V,H+=V}}}if(L&&I+H===this._bufferService.cols&&E.getCodePoint(this._bufferService.cols-1)!==32){const U=y.lines.get(h[1]+1);if(U!=null&&U.isWrapped&&U.getCodePoint(0)!==32){const W=this._getWordAt([0,h[1]+1],!1,!1,!0);W&&(H+=W.length)}}return{start:I,length:H}}}_selectWordAt(h,f){const b=this._getWordAt(h,f);if(b){for(;b.start<0;)b.start+=this._bufferService.cols,h[1]--;this._model.selectionStart=[b.start,h[1]],this._model.selectionStartLength=b.length}}_selectToWordAt(h){const f=this._getWordAt(h,!0);if(f){let b=h[1];for(;f.start<0;)f.start+=this._bufferService.cols,b--;if(!this._model.areSelectionValuesReversed())for(;f.start+f.length>this._bufferService.cols;)f.length-=this._bufferService.cols,b++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?f.start:f.start+f.length,b]}}_isCharWordSeparator(h){return h.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(h.getChars())>=0}_selectLineAt(h){const f=this._bufferService.buffer.getWrappedRangeForLine(h),b={start:{x:0,y:f.first},end:{x:this._bufferService.cols-1,y:f.last}};this._model.selectionStart=[0,f.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,t.getRangeLength)(b,this._bufferService.cols)}};r.SelectionService=m=c([_(3,a.IBufferService),_(4,a.ICoreService),_(5,g.IMouseService),_(6,a.IOptionsService),_(7,g.IRenderService),_(8,g.ICoreBrowserService)],m)},4725:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IThemeService=r.ICharacterJoinerService=r.ISelectionService=r.IRenderService=r.IMouseService=r.ICoreBrowserService=r.ICharSizeService=void 0;const c=o(8343);r.ICharSizeService=(0,c.createDecorator)("CharSizeService"),r.ICoreBrowserService=(0,c.createDecorator)("CoreBrowserService"),r.IMouseService=(0,c.createDecorator)("MouseService"),r.IRenderService=(0,c.createDecorator)("RenderService"),r.ISelectionService=(0,c.createDecorator)("SelectionService"),r.ICharacterJoinerService=(0,c.createDecorator)("CharacterJoinerService"),r.IThemeService=(0,c.createDecorator)("ThemeService")},6731:function(P,r,o){var c=this&&this.__decorate||function(m,h,f,b){var L,y=arguments.length,E=y<3?h:b===null?b=Object.getOwnPropertyDescriptor(h,f):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(m,h,f,b);else for(var x=m.length-1;x>=0;x--)(L=m[x])&&(E=(y<3?L(E):y>3?L(h,f,E):L(h,f))||E);return y>3&&E&&Object.defineProperty(h,f,E),E},_=this&&this.__param||function(m,h){return function(f,b){h(f,b,m)}};Object.defineProperty(r,"__esModule",{value:!0}),r.ThemeService=r.DEFAULT_ANSI_COLORS=void 0;const n=o(7239),d=o(8055),p=o(8460),g=o(844),u=o(2585),e=d.css.toColor("#ffffff"),s=d.css.toColor("#000000"),t=d.css.toColor("#ffffff"),i=d.css.toColor("#000000"),a={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};r.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const m=[d.css.toColor("#2e3436"),d.css.toColor("#cc0000"),d.css.toColor("#4e9a06"),d.css.toColor("#c4a000"),d.css.toColor("#3465a4"),d.css.toColor("#75507b"),d.css.toColor("#06989a"),d.css.toColor("#d3d7cf"),d.css.toColor("#555753"),d.css.toColor("#ef2929"),d.css.toColor("#8ae234"),d.css.toColor("#fce94f"),d.css.toColor("#729fcf"),d.css.toColor("#ad7fa8"),d.css.toColor("#34e2e2"),d.css.toColor("#eeeeec")],h=[0,95,135,175,215,255];for(let f=0;f<216;f++){const b=h[f/36%6|0],L=h[f/6%6|0],y=h[f%6];m.push({css:d.channels.toCss(b,L,y),rgba:d.channels.toRgba(b,L,y)})}for(let f=0;f<24;f++){const b=8+10*f;m.push({css:d.channels.toCss(b,b,b),rgba:d.channels.toRgba(b,b,b)})}return m})());let l=r.ThemeService=class extends g.Disposable{get colors(){return this._colors}constructor(m){super(),this._optionsService=m,this._contrastCache=new n.ColorContrastCache,this._halfContrastCache=new n.ColorContrastCache,this._onChangeColors=this.register(new p.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:e,background:s,cursor:t,cursorAccent:i,selectionForeground:void 0,selectionBackgroundTransparent:a,selectionBackgroundOpaque:d.color.blend(s,a),selectionInactiveBackgroundTransparent:a,selectionInactiveBackgroundOpaque:d.color.blend(s,a),ansi:r.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(m={}){const h=this._colors;if(h.foreground=v(m.foreground,e),h.background=v(m.background,s),h.cursor=v(m.cursor,t),h.cursorAccent=v(m.cursorAccent,i),h.selectionBackgroundTransparent=v(m.selectionBackground,a),h.selectionBackgroundOpaque=d.color.blend(h.background,h.selectionBackgroundTransparent),h.selectionInactiveBackgroundTransparent=v(m.selectionInactiveBackground,h.selectionBackgroundTransparent),h.selectionInactiveBackgroundOpaque=d.color.blend(h.background,h.selectionInactiveBackgroundTransparent),h.selectionForeground=m.selectionForeground?v(m.selectionForeground,d.NULL_COLOR):void 0,h.selectionForeground===d.NULL_COLOR&&(h.selectionForeground=void 0),d.color.isOpaque(h.selectionBackgroundTransparent)&&(h.selectionBackgroundTransparent=d.color.opacity(h.selectionBackgroundTransparent,.3)),d.color.isOpaque(h.selectionInactiveBackgroundTransparent)&&(h.selectionInactiveBackgroundTransparent=d.color.opacity(h.selectionInactiveBackgroundTransparent,.3)),h.ansi=r.DEFAULT_ANSI_COLORS.slice(),h.ansi[0]=v(m.black,r.DEFAULT_ANSI_COLORS[0]),h.ansi[1]=v(m.red,r.DEFAULT_ANSI_COLORS[1]),h.ansi[2]=v(m.green,r.DEFAULT_ANSI_COLORS[2]),h.ansi[3]=v(m.yellow,r.DEFAULT_ANSI_COLORS[3]),h.ansi[4]=v(m.blue,r.DEFAULT_ANSI_COLORS[4]),h.ansi[5]=v(m.magenta,r.DEFAULT_ANSI_COLORS[5]),h.ansi[6]=v(m.cyan,r.DEFAULT_ANSI_COLORS[6]),h.ansi[7]=v(m.white,r.DEFAULT_ANSI_COLORS[7]),h.ansi[8]=v(m.brightBlack,r.DEFAULT_ANSI_COLORS[8]),h.ansi[9]=v(m.brightRed,r.DEFAULT_ANSI_COLORS[9]),h.ansi[10]=v(m.brightGreen,r.DEFAULT_ANSI_COLORS[10]),h.ansi[11]=v(m.brightYellow,r.DEFAULT_ANSI_COLORS[11]),h.ansi[12]=v(m.brightBlue,r.DEFAULT_ANSI_COLORS[12]),h.ansi[13]=v(m.brightMagenta,r.DEFAULT_ANSI_COLORS[13]),h.ansi[14]=v(m.brightCyan,r.DEFAULT_ANSI_COLORS[14]),h.ansi[15]=v(m.brightWhite,r.DEFAULT_ANSI_COLORS[15]),m.extendedAnsi){const f=Math.min(h.ansi.length-16,m.extendedAnsi.length);for(let b=0;b<f;b++)h.ansi[b+16]=v(m.extendedAnsi[b],r.DEFAULT_ANSI_COLORS[b+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(m){this._restoreColor(m),this._onChangeColors.fire(this.colors)}_restoreColor(m){if(m!==void 0)switch(m){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[m]=this._restoreColors.ansi[m]}else for(let h=0;h<this._restoreColors.ansi.length;++h)this._colors.ansi[h]=this._restoreColors.ansi[h]}modifyColors(m){m(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function v(m,h){if(m!==void 0)try{return d.css.toColor(m)}catch{}return h}r.ThemeService=l=c([_(0,u.IOptionsService)],l)},6349:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CircularList=void 0;const c=o(8460),_=o(844);class n extends _.Disposable{constructor(p){super(),this._maxLength=p,this.onDeleteEmitter=this.register(new c.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new c.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new c.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(p){if(this._maxLength===p)return;const g=new Array(p);for(let u=0;u<Math.min(p,this.length);u++)g[u]=this._array[this._getCyclicIndex(u)];this._array=g,this._maxLength=p,this._startIndex=0}get length(){return this._length}set length(p){if(p>this._length)for(let g=this._length;g<p;g++)this._array[g]=void 0;this._length=p}get(p){return this._array[this._getCyclicIndex(p)]}set(p,g){this._array[this._getCyclicIndex(p)]=g}push(p){this._array[this._getCyclicIndex(this._length)]=p,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(p,g,...u){if(g){for(let e=p;e<this._length-g;e++)this._array[this._getCyclicIndex(e)]=this._array[this._getCyclicIndex(e+g)];this._length-=g,this.onDeleteEmitter.fire({index:p,amount:g})}for(let e=this._length-1;e>=p;e--)this._array[this._getCyclicIndex(e+u.length)]=this._array[this._getCyclicIndex(e)];for(let e=0;e<u.length;e++)this._array[this._getCyclicIndex(p+e)]=u[e];if(u.length&&this.onInsertEmitter.fire({index:p,amount:u.length}),this._length+u.length>this._maxLength){const e=this._length+u.length-this._maxLength;this._startIndex+=e,this._length=this._maxLength,this.onTrimEmitter.fire(e)}else this._length+=u.length}trimStart(p){p>this._length&&(p=this._length),this._startIndex+=p,this._length-=p,this.onTrimEmitter.fire(p)}shiftElements(p,g,u){if(!(g<=0)){if(p<0||p>=this._length)throw new Error("start argument out of range");if(p+u<0)throw new Error("Cannot shift elements in list beyond index 0");if(u>0){for(let s=g-1;s>=0;s--)this.set(p+s+u,this.get(p+s));const e=p+g+u-this._length;if(e>0)for(this._length+=e;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let e=0;e<g;e++)this.set(p+e+u,this.get(p+e))}}_getCyclicIndex(p){return(this._startIndex+p)%this._maxLength}}r.CircularList=n},1439:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.clone=void 0,r.clone=function o(c,_=5){if(typeof c!="object")return c;const n=Array.isArray(c)?[]:{};for(const d in c)n[d]=_<=1?c[d]:c[d]&&o(c[d],_-1);return n}},8055:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.contrastRatio=r.toPaddedHex=r.rgba=r.rgb=r.css=r.color=r.channels=r.NULL_COLOR=void 0;const c=o(6114);let _=0,n=0,d=0,p=0;var g,u,e,s,t;function i(l){const v=l.toString(16);return v.length<2?"0"+v:v}function a(l,v){return l<v?(v+.05)/(l+.05):(l+.05)/(v+.05)}r.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(v,m,h,f){return f!==void 0?`#${i(v)}${i(m)}${i(h)}${i(f)}`:`#${i(v)}${i(m)}${i(h)}`},l.toRgba=function(v,m,h,f=255){return(v<<24|m<<16|h<<8|f)>>>0}})(g||(r.channels=g={})),(function(l){function v(m,h){return p=Math.round(255*h),[_,n,d]=t.toChannels(m.rgba),{css:g.toCss(_,n,d,p),rgba:g.toRgba(_,n,d,p)}}l.blend=function(m,h){if(p=(255&h.rgba)/255,p===1)return{css:h.css,rgba:h.rgba};const f=h.rgba>>24&255,b=h.rgba>>16&255,L=h.rgba>>8&255,y=m.rgba>>24&255,E=m.rgba>>16&255,x=m.rgba>>8&255;return _=y+Math.round((f-y)*p),n=E+Math.round((b-E)*p),d=x+Math.round((L-x)*p),{css:g.toCss(_,n,d),rgba:g.toRgba(_,n,d)}},l.isOpaque=function(m){return(255&m.rgba)==255},l.ensureContrastRatio=function(m,h,f){const b=t.ensureContrastRatio(m.rgba,h.rgba,f);if(b)return t.toColor(b>>24&255,b>>16&255,b>>8&255)},l.opaque=function(m){const h=(255|m.rgba)>>>0;return[_,n,d]=t.toChannels(h),{css:g.toCss(_,n,d),rgba:h}},l.opacity=v,l.multiplyOpacity=function(m,h){return p=255&m.rgba,v(m,p*h/255)},l.toColorRGB=function(m){return[m.rgba>>24&255,m.rgba>>16&255,m.rgba>>8&255]}})(u||(r.color=u={})),(function(l){let v,m;if(!c.isNode){const h=document.createElement("canvas");h.width=1,h.height=1;const f=h.getContext("2d",{willReadFrequently:!0});f&&(v=f,v.globalCompositeOperation="copy",m=v.createLinearGradient(0,0,1,1))}l.toColor=function(h){if(h.match(/#[\da-f]{3,8}/i))switch(h.length){case 4:return _=parseInt(h.slice(1,2).repeat(2),16),n=parseInt(h.slice(2,3).repeat(2),16),d=parseInt(h.slice(3,4).repeat(2),16),t.toColor(_,n,d);case 5:return _=parseInt(h.slice(1,2).repeat(2),16),n=parseInt(h.slice(2,3).repeat(2),16),d=parseInt(h.slice(3,4).repeat(2),16),p=parseInt(h.slice(4,5).repeat(2),16),t.toColor(_,n,d,p);case 7:return{css:h,rgba:(parseInt(h.slice(1),16)<<8|255)>>>0};case 9:return{css:h,rgba:parseInt(h.slice(1),16)>>>0}}const f=h.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(f)return _=parseInt(f[1]),n=parseInt(f[2]),d=parseInt(f[3]),p=Math.round(255*(f[5]===void 0?1:parseFloat(f[5]))),t.toColor(_,n,d,p);if(!v||!m)throw new Error("css.toColor: Unsupported css format");if(v.fillStyle=m,v.fillStyle=h,typeof v.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(v.fillRect(0,0,1,1),[_,n,d,p]=v.getImageData(0,0,1,1).data,p!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(_,n,d,p),css:h}}})(e||(r.css=e={})),(function(l){function v(m,h,f){const b=m/255,L=h/255,y=f/255;return .2126*(b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(y<=.03928?y/12.92:Math.pow((y+.055)/1.055,2.4))}l.relativeLuminance=function(m){return v(m>>16&255,m>>8&255,255&m)},l.relativeLuminance2=v})(s||(r.rgb=s={})),(function(l){function v(h,f,b){const L=h>>24&255,y=h>>16&255,E=h>>8&255;let x=f>>24&255,A=f>>16&255,M=f>>8&255,O=a(s.relativeLuminance2(x,A,M),s.relativeLuminance2(L,y,E));for(;O<b&&(x>0||A>0||M>0);)x-=Math.max(0,Math.ceil(.1*x)),A-=Math.max(0,Math.ceil(.1*A)),M-=Math.max(0,Math.ceil(.1*M)),O=a(s.relativeLuminance2(x,A,M),s.relativeLuminance2(L,y,E));return(x<<24|A<<16|M<<8|255)>>>0}function m(h,f,b){const L=h>>24&255,y=h>>16&255,E=h>>8&255;let x=f>>24&255,A=f>>16&255,M=f>>8&255,O=a(s.relativeLuminance2(x,A,M),s.relativeLuminance2(L,y,E));for(;O<b&&(x<255||A<255||M<255);)x=Math.min(255,x+Math.ceil(.1*(255-x))),A=Math.min(255,A+Math.ceil(.1*(255-A))),M=Math.min(255,M+Math.ceil(.1*(255-M))),O=a(s.relativeLuminance2(x,A,M),s.relativeLuminance2(L,y,E));return(x<<24|A<<16|M<<8|255)>>>0}l.ensureContrastRatio=function(h,f,b){const L=s.relativeLuminance(h>>8),y=s.relativeLuminance(f>>8);if(a(L,y)<b){if(y<L){const A=v(h,f,b),M=a(L,s.relativeLuminance(A>>8));if(M<b){const O=m(h,f,b);return M>a(L,s.relativeLuminance(O>>8))?A:O}return A}const E=m(h,f,b),x=a(L,s.relativeLuminance(E>>8));if(x<b){const A=v(h,f,b);return x>a(L,s.relativeLuminance(A>>8))?E:A}return E}},l.reduceLuminance=v,l.increaseLuminance=m,l.toChannels=function(h){return[h>>24&255,h>>16&255,h>>8&255,255&h]},l.toColor=function(h,f,b,L){return{css:g.toCss(h,f,b,L),rgba:g.toRgba(h,f,b,L)}}})(t||(r.rgba=t={})),r.toPaddedHex=i,r.contrastRatio=a},8969:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreTerminal=void 0;const c=o(844),_=o(2585),n=o(4348),d=o(7866),p=o(744),g=o(7302),u=o(6975),e=o(8460),s=o(1753),t=o(1480),i=o(7994),a=o(9282),l=o(5435),v=o(5981),m=o(2660);let h=!1;class f extends c.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new e.EventEmitter),this._onScroll.event((L=>{var y;(y=this._onScrollApi)===null||y===void 0||y.fire(L.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(L){for(const y in L)this.optionsService.options[y]=L[y]}constructor(L){super(),this._windowsWrappingHeuristics=this.register(new c.MutableDisposable),this._onBinary=this.register(new e.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new e.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new e.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new e.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new e.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new e.EventEmitter),this._instantiationService=new n.InstantiationService,this.optionsService=this.register(new g.OptionsService(L)),this._instantiationService.setService(_.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(p.BufferService)),this._instantiationService.setService(_.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(d.LogService)),this._instantiationService.setService(_.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(u.CoreService)),this._instantiationService.setService(_.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(s.CoreMouseService)),this._instantiationService.setService(_.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(t.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(i.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(m.OscLinkService),this._instantiationService.setService(_.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new l.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,e.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,e.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,e.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,e.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((y=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((y=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new v.WriteBuffer(((y,E)=>this._inputHandler.parse(y,E)))),this.register((0,e.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(L,y){this._writeBuffer.write(L,y)}writeSync(L,y){this._logService.logLevel<=_.LogLevelEnum.WARN&&!h&&(this._logService.warn("writeSync is unreliable and will be removed soon."),h=!0),this._writeBuffer.writeSync(L,y)}resize(L,y){isNaN(L)||isNaN(y)||(L=Math.max(L,p.MINIMUM_COLS),y=Math.max(y,p.MINIMUM_ROWS),this._bufferService.resize(L,y))}scroll(L,y=!1){this._bufferService.scroll(L,y)}scrollLines(L,y,E){this._bufferService.scrollLines(L,y,E)}scrollPages(L){this.scrollLines(L*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(L){const y=L-this._bufferService.buffer.ydisp;y!==0&&this.scrollLines(y)}registerEscHandler(L,y){return this._inputHandler.registerEscHandler(L,y)}registerDcsHandler(L,y){return this._inputHandler.registerDcsHandler(L,y)}registerCsiHandler(L,y){return this._inputHandler.registerCsiHandler(L,y)}registerOscHandler(L,y){return this._inputHandler.registerOscHandler(L,y)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let L=!1;const y=this.optionsService.rawOptions.windowsPty;y&&y.buildNumber!==void 0&&y.buildNumber!==void 0?L=y.backend==="conpty"&&y.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(L=!0),L?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const L=[];L.push(this.onLineFeed(a.updateWindowsModeWrappedState.bind(null,this._bufferService))),L.push(this.registerCsiHandler({final:"H"},(()=>((0,a.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,c.toDisposable)((()=>{for(const y of L)y.dispose()}))}}}r.CoreTerminal=f},8460:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=o=>(this._listeners.push(o),{dispose:()=>{if(!this._disposed){for(let c=0;c<this._listeners.length;c++)if(this._listeners[c]===o)return void this._listeners.splice(c,1)}}})),this._event}fire(o,c){const _=[];for(let n=0;n<this._listeners.length;n++)_.push(this._listeners[n]);for(let n=0;n<_.length;n++)_[n].call(void 0,o,c)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},r.forwardEvent=function(o,c){return o((_=>c.fire(_)))}},5435:function(P,r,o){var c=this&&this.__decorate||function(O,C,w,k){var D,I=arguments.length,H=I<3?C:k===null?k=Object.getOwnPropertyDescriptor(C,w):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(O,C,w,k);else for(var U=O.length-1;U>=0;U--)(D=O[U])&&(H=(I<3?D(H):I>3?D(C,w,H):D(C,w))||H);return I>3&&H&&Object.defineProperty(C,w,H),H},_=this&&this.__param||function(O,C){return function(w,k){C(w,k,O)}};Object.defineProperty(r,"__esModule",{value:!0}),r.InputHandler=r.WindowsOptionsReportType=void 0;const n=o(2584),d=o(7116),p=o(2015),g=o(844),u=o(482),e=o(8437),s=o(8460),t=o(643),i=o(511),a=o(3734),l=o(2585),v=o(6242),m=o(6351),h=o(5941),f={"(":0,")":1,"*":2,"+":3,"-":1,".":2},b=131072;function L(O,C){if(O>24)return C.setWinLines||!1;switch(O){case 1:return!!C.restoreWin;case 2:return!!C.minimizeWin;case 3:return!!C.setWinPosition;case 4:return!!C.setWinSizePixels;case 5:return!!C.raiseWin;case 6:return!!C.lowerWin;case 7:return!!C.refreshWin;case 8:return!!C.setWinSizeChars;case 9:return!!C.maximizeWin;case 10:return!!C.fullscreenWin;case 11:return!!C.getWinState;case 13:return!!C.getWinPosition;case 14:return!!C.getWinSizePixels;case 15:return!!C.getScreenSizePixels;case 16:return!!C.getCellSizePixels;case 18:return!!C.getWinSizeChars;case 19:return!!C.getScreenSizeChars;case 20:return!!C.getIconTitle;case 21:return!!C.getWinTitle;case 22:return!!C.pushTitle;case 23:return!!C.popTitle;case 24:return!!C.setWinLines}return!1}var y;(function(O){O[O.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",O[O.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(y||(r.WindowsOptionsReportType=y={}));let E=0;class x extends g.Disposable{getAttrData(){return this._curAttrData}constructor(C,w,k,D,I,H,U,W,V=new p.EscapeSequenceParser){super(),this._bufferService=C,this._charsetService=w,this._coreService=k,this._logService=D,this._optionsService=I,this._oscLinkService=H,this._coreMouseService=U,this._unicodeService=W,this._parser=V,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new u.StringToUtf32,this._utf8Decoder=new u.Utf8ToUtf32,this._workCell=new i.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=e.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=e.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new s.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new s.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new s.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new s.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new s.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new s.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new s.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new s.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new s.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new s.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new s.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new s.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new s.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new A(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((S=>this._activeBuffer=S.activeBuffer))),this._parser.setCsiHandlerFallback(((S,R)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(S),params:R.toArray()})})),this._parser.setEscHandlerFallback((S=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(S)})})),this._parser.setExecuteHandlerFallback((S=>{this._logService.debug("Unknown EXECUTE code: ",{code:S})})),this._parser.setOscHandlerFallback(((S,R,T)=>{this._logService.debug("Unknown OSC code: ",{identifier:S,action:R,data:T})})),this._parser.setDcsHandlerFallback(((S,R,T)=>{R==="HOOK"&&(T=T.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(S),action:R,payload:T})})),this._parser.setPrintHandler(((S,R,T)=>this.print(S,R,T))),this._parser.registerCsiHandler({final:"@"},(S=>this.insertChars(S))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(S=>this.scrollLeft(S))),this._parser.registerCsiHandler({final:"A"},(S=>this.cursorUp(S))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(S=>this.scrollRight(S))),this._parser.registerCsiHandler({final:"B"},(S=>this.cursorDown(S))),this._parser.registerCsiHandler({final:"C"},(S=>this.cursorForward(S))),this._parser.registerCsiHandler({final:"D"},(S=>this.cursorBackward(S))),this._parser.registerCsiHandler({final:"E"},(S=>this.cursorNextLine(S))),this._parser.registerCsiHandler({final:"F"},(S=>this.cursorPrecedingLine(S))),this._parser.registerCsiHandler({final:"G"},(S=>this.cursorCharAbsolute(S))),this._parser.registerCsiHandler({final:"H"},(S=>this.cursorPosition(S))),this._parser.registerCsiHandler({final:"I"},(S=>this.cursorForwardTab(S))),this._parser.registerCsiHandler({final:"J"},(S=>this.eraseInDisplay(S,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(S=>this.eraseInDisplay(S,!0))),this._parser.registerCsiHandler({final:"K"},(S=>this.eraseInLine(S,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(S=>this.eraseInLine(S,!0))),this._parser.registerCsiHandler({final:"L"},(S=>this.insertLines(S))),this._parser.registerCsiHandler({final:"M"},(S=>this.deleteLines(S))),this._parser.registerCsiHandler({final:"P"},(S=>this.deleteChars(S))),this._parser.registerCsiHandler({final:"S"},(S=>this.scrollUp(S))),this._parser.registerCsiHandler({final:"T"},(S=>this.scrollDown(S))),this._parser.registerCsiHandler({final:"X"},(S=>this.eraseChars(S))),this._parser.registerCsiHandler({final:"Z"},(S=>this.cursorBackwardTab(S))),this._parser.registerCsiHandler({final:"`"},(S=>this.charPosAbsolute(S))),this._parser.registerCsiHandler({final:"a"},(S=>this.hPositionRelative(S))),this._parser.registerCsiHandler({final:"b"},(S=>this.repeatPrecedingCharacter(S))),this._parser.registerCsiHandler({final:"c"},(S=>this.sendDeviceAttributesPrimary(S))),this._parser.registerCsiHandler({prefix:">",final:"c"},(S=>this.sendDeviceAttributesSecondary(S))),this._parser.registerCsiHandler({final:"d"},(S=>this.linePosAbsolute(S))),this._parser.registerCsiHandler({final:"e"},(S=>this.vPositionRelative(S))),this._parser.registerCsiHandler({final:"f"},(S=>this.hVPosition(S))),this._parser.registerCsiHandler({final:"g"},(S=>this.tabClear(S))),this._parser.registerCsiHandler({final:"h"},(S=>this.setMode(S))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(S=>this.setModePrivate(S))),this._parser.registerCsiHandler({final:"l"},(S=>this.resetMode(S))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(S=>this.resetModePrivate(S))),this._parser.registerCsiHandler({final:"m"},(S=>this.charAttributes(S))),this._parser.registerCsiHandler({final:"n"},(S=>this.deviceStatus(S))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(S=>this.deviceStatusPrivate(S))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(S=>this.softReset(S))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(S=>this.setCursorStyle(S))),this._parser.registerCsiHandler({final:"r"},(S=>this.setScrollRegion(S))),this._parser.registerCsiHandler({final:"s"},(S=>this.saveCursor(S))),this._parser.registerCsiHandler({final:"t"},(S=>this.windowOptions(S))),this._parser.registerCsiHandler({final:"u"},(S=>this.restoreCursor(S))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(S=>this.insertColumns(S))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(S=>this.deleteColumns(S))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(S=>this.selectProtected(S))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(S=>this.requestMode(S,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(S=>this.requestMode(S,!1))),this._parser.setExecuteHandler(n.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(n.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(n.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(n.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(n.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(n.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(n.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(n.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(n.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(n.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(n.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(n.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new v.OscHandler((S=>(this.setTitle(S),this.setIconName(S),!0)))),this._parser.registerOscHandler(1,new v.OscHandler((S=>this.setIconName(S)))),this._parser.registerOscHandler(2,new v.OscHandler((S=>this.setTitle(S)))),this._parser.registerOscHandler(4,new v.OscHandler((S=>this.setOrReportIndexedColor(S)))),this._parser.registerOscHandler(8,new v.OscHandler((S=>this.setHyperlink(S)))),this._parser.registerOscHandler(10,new v.OscHandler((S=>this.setOrReportFgColor(S)))),this._parser.registerOscHandler(11,new v.OscHandler((S=>this.setOrReportBgColor(S)))),this._parser.registerOscHandler(12,new v.OscHandler((S=>this.setOrReportCursorColor(S)))),this._parser.registerOscHandler(104,new v.OscHandler((S=>this.restoreIndexedColor(S)))),this._parser.registerOscHandler(110,new v.OscHandler((S=>this.restoreFgColor(S)))),this._parser.registerOscHandler(111,new v.OscHandler((S=>this.restoreBgColor(S)))),this._parser.registerOscHandler(112,new v.OscHandler((S=>this.restoreCursorColor(S)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const S in d.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:S},(()=>this.selectCharset("("+S))),this._parser.registerEscHandler({intermediates:")",final:S},(()=>this.selectCharset(")"+S))),this._parser.registerEscHandler({intermediates:"*",final:S},(()=>this.selectCharset("*"+S))),this._parser.registerEscHandler({intermediates:"+",final:S},(()=>this.selectCharset("+"+S))),this._parser.registerEscHandler({intermediates:"-",final:S},(()=>this.selectCharset("-"+S))),this._parser.registerEscHandler({intermediates:".",final:S},(()=>this.selectCharset("."+S))),this._parser.registerEscHandler({intermediates:"/",final:S},(()=>this.selectCharset("/"+S)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((S=>(this._logService.error("Parsing error: ",S),S))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new m.DcsHandler(((S,R)=>this.requestStatusString(S,R))))}_preserveStack(C,w,k,D){this._parseStack.paused=!0,this._parseStack.cursorStartX=C,this._parseStack.cursorStartY=w,this._parseStack.decodedLength=k,this._parseStack.position=D}_logSlowResolvingAsync(C){this._logService.logLevel<=l.LogLevelEnum.WARN&&Promise.race([C,new Promise(((w,k)=>setTimeout((()=>k("#SLOW_TIMEOUT")),5e3)))]).catch((w=>{if(w!=="#SLOW_TIMEOUT")throw w;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(C,w){let k,D=this._activeBuffer.x,I=this._activeBuffer.y,H=0;const U=this._parseStack.paused;if(U){if(k=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,w))return this._logSlowResolvingAsync(k),k;D=this._parseStack.cursorStartX,I=this._parseStack.cursorStartY,this._parseStack.paused=!1,C.length>b&&(H=this._parseStack.position+b)}if(this._logService.logLevel<=l.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof C=="string"?` "${C}"`:` "${Array.prototype.map.call(C,(W=>String.fromCharCode(W))).join("")}"`),typeof C=="string"?C.split("").map((W=>W.charCodeAt(0))):C),this._parseBuffer.length<C.length&&this._parseBuffer.length<b&&(this._parseBuffer=new Uint32Array(Math.min(C.length,b))),U||this._dirtyRowTracker.clearRange(),C.length>b)for(let W=H;W<C.length;W+=b){const V=W+b<C.length?W+b:C.length,S=typeof C=="string"?this._stringDecoder.decode(C.substring(W,V),this._parseBuffer):this._utf8Decoder.decode(C.subarray(W,V),this._parseBuffer);if(k=this._parser.parse(this._parseBuffer,S))return this._preserveStack(D,I,S,W),this._logSlowResolvingAsync(k),k}else if(!U){const W=typeof C=="string"?this._stringDecoder.decode(C,this._parseBuffer):this._utf8Decoder.decode(C,this._parseBuffer);if(k=this._parser.parse(this._parseBuffer,W))return this._preserveStack(D,I,W,0),this._logSlowResolvingAsync(k),k}this._activeBuffer.x===D&&this._activeBuffer.y===I||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowTracker.start,this._dirtyRowTracker.end)}print(C,w,k){let D,I;const H=this._charsetService.charset,U=this._optionsService.rawOptions.screenReaderMode,W=this._bufferService.cols,V=this._coreService.decPrivateModes.wraparound,S=this._coreService.modes.insertMode,R=this._curAttrData;let T=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&k-w>0&&T.getWidth(this._activeBuffer.x-1)===2&&T.setCellFromCodePoint(this._activeBuffer.x-1,0,1,R.fg,R.bg,R.extended);for(let B=w;B<k;++B){if(D=C[B],I=this._unicodeService.wcwidth(D),D<127&&H){const N=H[String.fromCharCode(D)];N&&(D=N.charCodeAt(0))}if(U&&this._onA11yChar.fire((0,u.stringFromCodePoint)(D)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),I||!this._activeBuffer.x){if(this._activeBuffer.x+I-1>=W){if(V){for(;this._activeBuffer.x<W;)T.setCellFromCodePoint(this._activeBuffer.x++,0,1,R.fg,R.bg,R.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),T=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=W-1,I===2)continue}if(S&&(T.insertCells(this._activeBuffer.x,I,this._activeBuffer.getNullCell(R),R),T.getWidth(W-1)===2&&T.setCellFromCodePoint(W-1,t.NULL_CELL_CODE,t.NULL_CELL_WIDTH,R.fg,R.bg,R.extended)),T.setCellFromCodePoint(this._activeBuffer.x++,D,I,R.fg,R.bg,R.extended),I>0)for(;--I;)T.setCellFromCodePoint(this._activeBuffer.x++,0,0,R.fg,R.bg,R.extended)}else T.getWidth(this._activeBuffer.x-1)?T.addCodepointToCell(this._activeBuffer.x-1,D):T.addCodepointToCell(this._activeBuffer.x-2,D)}k-w>0&&(T.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<W&&k-w>0&&T.getWidth(this._activeBuffer.x)===0&&!T.hasContent(this._activeBuffer.x)&&T.setCellFromCodePoint(this._activeBuffer.x,0,1,R.fg,R.bg,R.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(C,w){return C.final!=="t"||C.prefix||C.intermediates?this._parser.registerCsiHandler(C,w):this._parser.registerCsiHandler(C,(k=>!L(k.params[0],this._optionsService.rawOptions.windowOptions)||w(k)))}registerDcsHandler(C,w){return this._parser.registerDcsHandler(C,new m.DcsHandler(w))}registerEscHandler(C,w){return this._parser.registerEscHandler(C,w)}registerOscHandler(C,w){return this._parser.registerOscHandler(C,new v.OscHandler(w))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var C;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(!((C=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||C===void 0)&&C.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);w.hasWidth(this._activeBuffer.x)&&!w.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const C=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-C),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(C=this._bufferService.cols-1){this._activeBuffer.x=Math.min(C,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(C,w){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=C,this._activeBuffer.y=this._activeBuffer.scrollTop+w):(this._activeBuffer.x=C,this._activeBuffer.y=w),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(C,w){this._restrictCursor(),this._setCursor(this._activeBuffer.x+C,this._activeBuffer.y+w)}cursorUp(C){const w=this._activeBuffer.y-this._activeBuffer.scrollTop;return w>=0?this._moveCursor(0,-Math.min(w,C.params[0]||1)):this._moveCursor(0,-(C.params[0]||1)),!0}cursorDown(C){const w=this._activeBuffer.scrollBottom-this._activeBuffer.y;return w>=0?this._moveCursor(0,Math.min(w,C.params[0]||1)):this._moveCursor(0,C.params[0]||1),!0}cursorForward(C){return this._moveCursor(C.params[0]||1,0),!0}cursorBackward(C){return this._moveCursor(-(C.params[0]||1),0),!0}cursorNextLine(C){return this.cursorDown(C),this._activeBuffer.x=0,!0}cursorPrecedingLine(C){return this.cursorUp(C),this._activeBuffer.x=0,!0}cursorCharAbsolute(C){return this._setCursor((C.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(C){return this._setCursor(C.length>=2?(C.params[1]||1)-1:0,(C.params[0]||1)-1),!0}charPosAbsolute(C){return this._setCursor((C.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(C){return this._moveCursor(C.params[0]||1,0),!0}linePosAbsolute(C){return this._setCursor(this._activeBuffer.x,(C.params[0]||1)-1),!0}vPositionRelative(C){return this._moveCursor(0,C.params[0]||1),!0}hVPosition(C){return this.cursorPosition(C),!0}tabClear(C){const w=C.params[0];return w===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:w===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(C){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let w=C.params[0]||1;for(;w--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(C){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let w=C.params[0]||1;for(;w--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(C){const w=C.params[0];return w===1&&(this._curAttrData.bg|=536870912),w!==2&&w!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(C,w,k,D=!1,I=!1){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+C);H.replaceCells(w,k,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),I),D&&(H.isWrapped=!1)}_resetBufferLine(C,w=!1){const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+C);k&&(k.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),w),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+C),k.isWrapped=!1)}eraseInDisplay(C,w=!1){let k;switch(this._restrictCursor(this._bufferService.cols),C.params[0]){case 0:for(k=this._activeBuffer.y,this._dirtyRowTracker.markDirty(k),this._eraseInBufferLine(k++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,w);k<this._bufferService.rows;k++)this._resetBufferLine(k,w);this._dirtyRowTracker.markDirty(k);break;case 1:for(k=this._activeBuffer.y,this._dirtyRowTracker.markDirty(k),this._eraseInBufferLine(k,0,this._activeBuffer.x+1,!0,w),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(k+1).isWrapped=!1);k--;)this._resetBufferLine(k,w);this._dirtyRowTracker.markDirty(0);break;case 2:for(k=this._bufferService.rows,this._dirtyRowTracker.markDirty(k-1);k--;)this._resetBufferLine(k,w);this._dirtyRowTracker.markDirty(0);break;case 3:const D=this._activeBuffer.lines.length-this._bufferService.rows;D>0&&(this._activeBuffer.lines.trimStart(D),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-D,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-D,0),this._onScroll.fire(0))}return!0}eraseInLine(C,w=!1){switch(this._restrictCursor(this._bufferService.cols),C.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,w);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,w);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,w)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(C){this._restrictCursor();let w=C.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=this._activeBuffer.ybase+this._activeBuffer.y,D=this._bufferService.rows-1-this._activeBuffer.scrollBottom,I=this._bufferService.rows-1+this._activeBuffer.ybase-D+1;for(;w--;)this._activeBuffer.lines.splice(I-1,1),this._activeBuffer.lines.splice(k,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(C){this._restrictCursor();let w=C.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=this._activeBuffer.ybase+this._activeBuffer.y;let D;for(D=this._bufferService.rows-1-this._activeBuffer.scrollBottom,D=this._bufferService.rows-1+this._activeBuffer.ybase-D;w--;)this._activeBuffer.lines.splice(k,1),this._activeBuffer.lines.splice(D,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(C){this._restrictCursor();const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return w&&(w.insertCells(this._activeBuffer.x,C.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(C){this._restrictCursor();const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return w&&(w.deleteCells(this._activeBuffer.x,C.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(C){let w=C.params[0]||1;for(;w--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(C){let w=C.params[0]||1;for(;w--;)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(e.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(C){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const w=C.params[0]||1;for(let k=this._activeBuffer.scrollTop;k<=this._activeBuffer.scrollBottom;++k){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+k);D.deleteCells(0,w,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(C){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const w=C.params[0]||1;for(let k=this._activeBuffer.scrollTop;k<=this._activeBuffer.scrollBottom;++k){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+k);D.insertCells(0,w,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(C){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const w=C.params[0]||1;for(let k=this._activeBuffer.scrollTop;k<=this._activeBuffer.scrollBottom;++k){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+k);D.insertCells(this._activeBuffer.x,w,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(C){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const w=C.params[0]||1;for(let k=this._activeBuffer.scrollTop;k<=this._activeBuffer.scrollBottom;++k){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+k);D.deleteCells(this._activeBuffer.x,w,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),D.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(C){this._restrictCursor();const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return w&&(w.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(C.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(C){if(!this._parser.precedingCodepoint)return!0;const w=C.params[0]||1,k=new Uint32Array(w);for(let D=0;D<w;++D)k[D]=this._parser.precedingCodepoint;return this.print(k,0,k.length),!0}sendDeviceAttributesPrimary(C){return C.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(n.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(n.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(C){return C.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(n.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(n.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(C.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(n.C0.ESC+"[>83;40003;0c")),!0}_is(C){return(this._optionsService.rawOptions.termName+"").indexOf(C)===0}setMode(C){for(let w=0;w<C.length;w++)switch(C.params[w]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(C){for(let w=0;w<C.length;w++)switch(C.params[w]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,d.DEFAULT_CHARSET),this._charsetService.setgCharset(1,d.DEFAULT_CHARSET),this._charsetService.setgCharset(2,d.DEFAULT_CHARSET),this._charsetService.setgCharset(3,d.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(C){for(let w=0;w<C.length;w++)switch(C.params[w]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(C){for(let w=0;w<C.length;w++)switch(C.params[w]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),C.params[w]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(C,w){const k=this._coreService.decPrivateModes,{activeProtocol:D,activeEncoding:I}=this._coreMouseService,H=this._coreService,{buffers:U,cols:W}=this._bufferService,{active:V,alt:S}=U,R=this._optionsService.rawOptions,T=z=>z?1:2,B=C.params[0];return N=B,F=w?B===2?4:B===4?T(H.modes.insertMode):B===12?3:B===20?T(R.convertEol):0:B===1?T(k.applicationCursorKeys):B===3?R.windowOptions.setWinLines?W===80?2:W===132?1:0:0:B===6?T(k.origin):B===7?T(k.wraparound):B===8?3:B===9?T(D==="X10"):B===12?T(R.cursorBlink):B===25?T(!H.isCursorHidden):B===45?T(k.reverseWraparound):B===66?T(k.applicationKeypad):B===67?4:B===1e3?T(D==="VT200"):B===1002?T(D==="DRAG"):B===1003?T(D==="ANY"):B===1004?T(k.sendFocus):B===1005?4:B===1006?T(I==="SGR"):B===1015?4:B===1016?T(I==="SGR_PIXELS"):B===1048?1:B===47||B===1047||B===1049?T(V===S):B===2004?T(k.bracketedPasteMode):0,H.triggerDataEvent(`${n.C0.ESC}[${w?"":"?"}${N};${F}$y`),!0;var N,F}_updateAttrColor(C,w,k,D,I){return w===2?(C|=50331648,C&=-16777216,C|=a.AttributeData.fromColorRGB([k,D,I])):w===5&&(C&=-50331904,C|=33554432|255&k),C}_extractColor(C,w,k){const D=[0,0,-1,0,0,0];let I=0,H=0;do{if(D[H+I]=C.params[w+H],C.hasSubParams(w+H)){const U=C.getSubParams(w+H);let W=0;do D[1]===5&&(I=1),D[H+W+1+I]=U[W];while(++W<U.length&&W+H+1+I<D.length);break}if(D[1]===5&&H+I>=2||D[1]===2&&H+I>=5)break;D[1]&&(I=1)}while(++H+w<C.length&&H+I<D.length);for(let U=2;U<D.length;++U)D[U]===-1&&(D[U]=0);switch(D[0]){case 38:k.fg=this._updateAttrColor(k.fg,D[1],D[3],D[4],D[5]);break;case 48:k.bg=this._updateAttrColor(k.bg,D[1],D[3],D[4],D[5]);break;case 58:k.extended=k.extended.clone(),k.extended.underlineColor=this._updateAttrColor(k.extended.underlineColor,D[1],D[3],D[4],D[5])}return H}_processUnderline(C,w){w.extended=w.extended.clone(),(!~C||C>5)&&(C=1),w.extended.underlineStyle=C,w.fg|=268435456,C===0&&(w.fg&=-268435457),w.updateExtended()}_processSGR0(C){C.fg=e.DEFAULT_ATTR_DATA.fg,C.bg=e.DEFAULT_ATTR_DATA.bg,C.extended=C.extended.clone(),C.extended.underlineStyle=0,C.extended.underlineColor&=-67108864,C.updateExtended()}charAttributes(C){if(C.length===1&&C.params[0]===0)return this._processSGR0(this._curAttrData),!0;const w=C.length;let k;const D=this._curAttrData;for(let I=0;I<w;I++)k=C.params[I],k>=30&&k<=37?(D.fg&=-50331904,D.fg|=16777216|k-30):k>=40&&k<=47?(D.bg&=-50331904,D.bg|=16777216|k-40):k>=90&&k<=97?(D.fg&=-50331904,D.fg|=16777224|k-90):k>=100&&k<=107?(D.bg&=-50331904,D.bg|=16777224|k-100):k===0?this._processSGR0(D):k===1?D.fg|=134217728:k===3?D.bg|=67108864:k===4?(D.fg|=268435456,this._processUnderline(C.hasSubParams(I)?C.getSubParams(I)[0]:1,D)):k===5?D.fg|=536870912:k===7?D.fg|=67108864:k===8?D.fg|=1073741824:k===9?D.fg|=2147483648:k===2?D.bg|=134217728:k===21?this._processUnderline(2,D):k===22?(D.fg&=-134217729,D.bg&=-134217729):k===23?D.bg&=-67108865:k===24?(D.fg&=-268435457,this._processUnderline(0,D)):k===25?D.fg&=-536870913:k===27?D.fg&=-67108865:k===28?D.fg&=-1073741825:k===29?D.fg&=2147483647:k===39?(D.fg&=-67108864,D.fg|=16777215&e.DEFAULT_ATTR_DATA.fg):k===49?(D.bg&=-67108864,D.bg|=16777215&e.DEFAULT_ATTR_DATA.bg):k===38||k===48||k===58?I+=this._extractColor(C,I,D):k===53?D.bg|=1073741824:k===55?D.bg&=-1073741825:k===59?(D.extended=D.extended.clone(),D.extended.underlineColor=-1,D.updateExtended()):k===100?(D.fg&=-67108864,D.fg|=16777215&e.DEFAULT_ATTR_DATA.fg,D.bg&=-67108864,D.bg|=16777215&e.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",k);return!0}deviceStatus(C){switch(C.params[0]){case 5:this._coreService.triggerDataEvent(`${n.C0.ESC}[0n`);break;case 6:const w=this._activeBuffer.y+1,k=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${n.C0.ESC}[${w};${k}R`)}return!0}deviceStatusPrivate(C){if(C.params[0]===6){const w=this._activeBuffer.y+1,k=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${n.C0.ESC}[?${w};${k}R`)}return!0}softReset(C){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=e.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(C){const w=C.params[0]||1;switch(w){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const k=w%2==1;return this._optionsService.options.cursorBlink=k,!0}setScrollRegion(C){const w=C.params[0]||1;let k;return(C.length<2||(k=C.params[1])>this._bufferService.rows||k===0)&&(k=this._bufferService.rows),k>w&&(this._activeBuffer.scrollTop=w-1,this._activeBuffer.scrollBottom=k-1,this._setCursor(0,0)),!0}windowOptions(C){if(!L(C.params[0],this._optionsService.rawOptions.windowOptions))return!0;const w=C.length>1?C.params[1]:0;switch(C.params[0]){case 14:w!==2&&this._onRequestWindowsOptionsReport.fire(y.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(y.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${n.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:w!==0&&w!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),w!==0&&w!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:w!==0&&w!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),w!==0&&w!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(C){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(C){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(C){return this._windowTitle=C,this._onTitleChange.fire(C),!0}setIconName(C){return this._iconName=C,!0}setOrReportIndexedColor(C){const w=[],k=C.split(";");for(;k.length>1;){const D=k.shift(),I=k.shift();if(/^\d+$/.exec(D)){const H=parseInt(D);if(M(H))if(I==="?")w.push({type:0,index:H});else{const U=(0,h.parseColor)(I);U&&w.push({type:1,index:H,color:U})}}}return w.length&&this._onColor.fire(w),!0}setHyperlink(C){const w=C.split(";");return!(w.length<2)&&(w[1]?this._createHyperlink(w[0],w[1]):!w[0]&&this._finishHyperlink())}_createHyperlink(C,w){this._getCurrentLinkId()&&this._finishHyperlink();const k=C.split(":");let D;const I=k.findIndex((H=>H.startsWith("id=")));return I!==-1&&(D=k[I].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:D,uri:w}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(C,w){const k=C.split(";");for(let D=0;D<k.length&&!(w>=this._specialColors.length);++D,++w)if(k[D]==="?")this._onColor.fire([{type:0,index:this._specialColors[w]}]);else{const I=(0,h.parseColor)(k[D]);I&&this._onColor.fire([{type:1,index:this._specialColors[w],color:I}])}return!0}setOrReportFgColor(C){return this._setOrReportSpecialColor(C,0)}setOrReportBgColor(C){return this._setOrReportSpecialColor(C,1)}setOrReportCursorColor(C){return this._setOrReportSpecialColor(C,2)}restoreIndexedColor(C){if(!C)return this._onColor.fire([{type:2}]),!0;const w=[],k=C.split(";");for(let D=0;D<k.length;++D)if(/^\d+$/.exec(k[D])){const I=parseInt(k[D]);M(I)&&w.push({type:2,index:I})}return w.length&&this._onColor.fire(w),!0}restoreFgColor(C){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(C){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(C){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,d.DEFAULT_CHARSET),!0}selectCharset(C){return C.length!==2?(this.selectDefaultCharset(),!0):(C[0]==="/"||this._charsetService.setgCharset(f[C[0]],d.CHARSETS[C[1]]||d.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const C=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,C,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=e.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=e.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(C){return this._charsetService.setgLevel(C),!0}screenAlignmentPattern(){const C=new i.CellData;C.content=4194373,C.fg=this._curAttrData.fg,C.bg=this._curAttrData.bg,this._setCursor(0,0);for(let w=0;w<this._bufferService.rows;++w){const k=this._activeBuffer.ybase+this._activeBuffer.y+w,D=this._activeBuffer.lines.get(k);D&&(D.fill(C),D.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(C,w){const k=this._bufferService.buffer,D=this._optionsService.rawOptions;return(I=>(this._coreService.triggerDataEvent(`${n.C0.ESC}${I}${n.C0.ESC}\\`),!0))(C==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:C==='"p'?'P1$r61;1"p':C==="r"?`P1$r${k.scrollTop+1};${k.scrollBottom+1}r`:C==="m"?"P1$r0m":C===" q"?`P1$r${{block:2,underline:4,bar:6}[D.cursorStyle]-(D.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(C,w){this._dirtyRowTracker.markRangeDirty(C,w)}}r.InputHandler=x;let A=class{constructor(O){this._bufferService=O,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(O){O<this.start?this.start=O:O>this.end&&(this.end=O)}markRangeDirty(O,C){O>C&&(E=O,O=C,C=E),O<this.start&&(this.start=O),C>this.end&&(this.end=C)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function M(O){return 0<=O&&O<256}A=c([_(0,l.IBufferService)],A)},844:(P,r)=>{function o(c){for(const _ of c)_.dispose();c.length=0}Object.defineProperty(r,"__esModule",{value:!0}),r.getDisposeArrayDisposable=r.disposeArray=r.toDisposable=r.MutableDisposable=r.Disposable=void 0,r.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const c of this._disposables)c.dispose();this._disposables.length=0}register(c){return this._disposables.push(c),c}unregister(c){const _=this._disposables.indexOf(c);_!==-1&&this._disposables.splice(_,1)}},r.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(c){var _;this._isDisposed||c===this._value||((_=this._value)===null||_===void 0||_.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){var c;this._isDisposed=!0,(c=this._value)===null||c===void 0||c.dispose(),this._value=void 0}},r.toDisposable=function(c){return{dispose:c}},r.disposeArray=o,r.getDisposeArrayDisposable=function(c){return{dispose:()=>o(c)}}},1505:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FourKeyMap=r.TwoKeyMap=void 0;class o{constructor(){this._data={}}set(_,n,d){this._data[_]||(this._data[_]={}),this._data[_][n]=d}get(_,n){return this._data[_]?this._data[_][n]:void 0}clear(){this._data={}}}r.TwoKeyMap=o,r.FourKeyMap=class{constructor(){this._data=new o}set(c,_,n,d,p){this._data.get(c,_)||this._data.set(c,_,new o),this._data.get(c,_).set(n,d,p)}get(c,_,n,d){var p;return(p=this._data.get(c,_))===null||p===void 0?void 0:p.get(n,d)}clear(){this._data.clear()}}},6114:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isChromeOS=r.isLinux=r.isWindows=r.isIphone=r.isIpad=r.isMac=r.getSafariVersion=r.isSafari=r.isLegacyEdge=r.isFirefox=r.isNode=void 0,r.isNode=typeof navigator>"u";const o=r.isNode?"node":navigator.userAgent,c=r.isNode?"node":navigator.platform;r.isFirefox=o.includes("Firefox"),r.isLegacyEdge=o.includes("Edge"),r.isSafari=/^((?!chrome|android).)*safari/i.test(o),r.getSafariVersion=function(){if(!r.isSafari)return 0;const _=o.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},r.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(c),r.isIpad=c==="iPad",r.isIphone=c==="iPhone",r.isWindows=["Windows","Win16","Win32","WinCE"].includes(c),r.isLinux=c.indexOf("Linux")>=0,r.isChromeOS=/\bCrOS\b/.test(o)},6106:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SortedList=void 0;let o=0;r.SortedList=class{constructor(c){this._getKey=c,this._array=[]}clear(){this._array.length=0}insert(c){this._array.length!==0?(o=this._search(this._getKey(c)),this._array.splice(o,0,c)):this._array.push(c)}delete(c){if(this._array.length===0)return!1;const _=this._getKey(c);if(_===void 0||(o=this._search(_),o===-1)||this._getKey(this._array[o])!==_)return!1;do if(this._array[o]===c)return this._array.splice(o,1),!0;while(++o<this._array.length&&this._getKey(this._array[o])===_);return!1}*getKeyIterator(c){if(this._array.length!==0&&(o=this._search(c),!(o<0||o>=this._array.length)&&this._getKey(this._array[o])===c))do yield this._array[o];while(++o<this._array.length&&this._getKey(this._array[o])===c)}forEachByKey(c,_){if(this._array.length!==0&&(o=this._search(c),!(o<0||o>=this._array.length)&&this._getKey(this._array[o])===c))do _(this._array[o]);while(++o<this._array.length&&this._getKey(this._array[o])===c)}values(){return[...this._array].values()}_search(c){let _=0,n=this._array.length-1;for(;n>=_;){let d=_+n>>1;const p=this._getKey(this._array[d]);if(p>c)n=d-1;else{if(!(p<c)){for(;d>0&&this._getKey(this._array[d-1])===c;)d--;return d}_=d+1}}return _}}},7226:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DebouncedIdleTask=r.IdleTaskQueue=r.PriorityTaskQueue=void 0;const c=o(6114);class _{constructor(){this._tasks=[],this._i=0}enqueue(p){this._tasks.push(p),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(p){this._idleCallback=void 0;let g=0,u=0,e=p.timeRemaining(),s=0;for(;this._i<this._tasks.length;){if(g=Date.now(),this._tasks[this._i]()||this._i++,g=Math.max(1,Date.now()-g),u=Math.max(g,u),s=p.timeRemaining(),1.5*u>s)return e-g<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(e-g))}ms`),void this._start();e=s}this.clear()}}class n extends _{_requestCallback(p){return setTimeout((()=>p(this._createDeadline(16))))}_cancelCallback(p){clearTimeout(p)}_createDeadline(p){const g=Date.now()+p;return{timeRemaining:()=>Math.max(0,g-Date.now())}}}r.PriorityTaskQueue=n,r.IdleTaskQueue=!c.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(d){return requestIdleCallback(d)}_cancelCallback(d){cancelIdleCallback(d)}}:n,r.DebouncedIdleTask=class{constructor(){this._queue=new r.IdleTaskQueue}set(d){this._queue.clear(),this._queue.enqueue(d)}flush(){this._queue.flush()}}},9282:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.updateWindowsModeWrappedState=void 0;const c=o(643);r.updateWindowsModeWrappedState=function(_){const n=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),d=n==null?void 0:n.get(_.cols-1),p=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);p&&d&&(p.isWrapped=d[c.CHAR_DATA_CODE_INDEX]!==c.NULL_CELL_CODE&&d[c.CHAR_DATA_CODE_INDEX]!==c.WHITESPACE_CELL_CODE)}},3734:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ExtendedAttrs=r.AttributeData=void 0;class o{constructor(){this.fg=0,this.bg=0,this.extended=new c}static toColorRGB(n){return[n>>>16&255,n>>>8&255,255&n]}static fromColorRGB(n){return(255&n[0])<<16|(255&n[1])<<8|255&n[2]}clone(){const n=new o;return n.fg=this.fg,n.bg=this.bg,n.extended=this.extended.clone(),n}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}r.AttributeData=o;class c{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(n){this._ext=n}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(n){this._ext&=-469762049,this._ext|=n<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(n){this._ext&=-67108864,this._ext|=67108863&n}get urlId(){return this._urlId}set urlId(n){this._urlId=n}constructor(n=0,d=0){this._ext=0,this._urlId=0,this._ext=n,this._urlId=d}clone(){return new c(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}r.ExtendedAttrs=c},9092:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Buffer=r.MAX_BUFFER_SIZE=void 0;const c=o(6349),_=o(7226),n=o(3734),d=o(8437),p=o(4634),g=o(511),u=o(643),e=o(4863),s=o(7116);r.MAX_BUFFER_SIZE=4294967295,r.Buffer=class{constructor(t,i,a){this._hasScrollback=t,this._optionsService=i,this._bufferService=a,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=d.DEFAULT_ATTR_DATA.clone(),this.savedCharset=s.DEFAULT_CHARSET,this.markers=[],this._nullCell=g.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]),this._whitespaceCell=g.CellData.fromCharData([0,u.WHITESPACE_CELL_CHAR,u.WHITESPACE_CELL_WIDTH,u.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new _.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(t){return t?(this._nullCell.fg=t.fg,this._nullCell.bg=t.bg,this._nullCell.extended=t.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new n.ExtendedAttrs),this._nullCell}getWhitespaceCell(t){return t?(this._whitespaceCell.fg=t.fg,this._whitespaceCell.bg=t.bg,this._whitespaceCell.extended=t.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new n.ExtendedAttrs),this._whitespaceCell}getBlankLine(t,i){return new d.BufferLine(this._bufferService.cols,this.getNullCell(t),i)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const t=this.ybase+this.y-this.ydisp;return t>=0&&t<this._rows}_getCorrectBufferLength(t){if(!this._hasScrollback)return t;const i=t+this._optionsService.rawOptions.scrollback;return i>r.MAX_BUFFER_SIZE?r.MAX_BUFFER_SIZE:i}fillViewportRows(t){if(this.lines.length===0){t===void 0&&(t=d.DEFAULT_ATTR_DATA);let i=this._rows;for(;i--;)this.lines.push(this.getBlankLine(t))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(t,i){const a=this.getNullCell(d.DEFAULT_ATTR_DATA);let l=0;const v=this._getCorrectBufferLength(i);if(v>this.lines.maxLength&&(this.lines.maxLength=v),this.lines.length>0){if(this._cols<t)for(let h=0;h<this.lines.length;h++)l+=+this.lines.get(h).resize(t,a);let m=0;if(this._rows<i)for(let h=this._rows;h<i;h++)this.lines.length<i+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new d.BufferLine(t,a)):this.ybase>0&&this.lines.length<=this.ybase+this.y+m+1?(this.ybase--,m++,this.ydisp>0&&this.ydisp--):this.lines.push(new d.BufferLine(t,a)));else for(let h=this._rows;h>i;h--)this.lines.length>i+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(v<this.lines.maxLength){const h=this.lines.length-v;h>0&&(this.lines.trimStart(h),this.ybase=Math.max(this.ybase-h,0),this.ydisp=Math.max(this.ydisp-h,0),this.savedY=Math.max(this.savedY-h,0)),this.lines.maxLength=v}this.x=Math.min(this.x,t-1),this.y=Math.min(this.y,i-1),m&&(this.y+=m),this.savedX=Math.min(this.savedX,t-1),this.scrollTop=0}if(this.scrollBottom=i-1,this._isReflowEnabled&&(this._reflow(t,i),this._cols>t))for(let m=0;m<this.lines.length;m++)l+=+this.lines.get(m).resize(t,a);this._cols=t,this._rows=i,this._memoryCleanupQueue.clear(),l>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let t=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,t=!1);let i=0;for(;this._memoryCleanupPosition<this.lines.length;)if(i+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),i>100)return!0;return t}get _isReflowEnabled(){const t=this._optionsService.rawOptions.windowsPty;return t&&t.buildNumber?this._hasScrollback&&t.backend==="conpty"&&t.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(t,i){this._cols!==t&&(t>this._cols?this._reflowLarger(t,i):this._reflowSmaller(t,i))}_reflowLarger(t,i){const a=(0,p.reflowLargerGetLinesToRemove)(this.lines,this._cols,t,this.ybase+this.y,this.getNullCell(d.DEFAULT_ATTR_DATA));if(a.length>0){const l=(0,p.reflowLargerCreateNewLayout)(this.lines,a);(0,p.reflowLargerApplyNewLayout)(this.lines,l.layout),this._reflowLargerAdjustViewport(t,i,l.countRemoved)}}_reflowLargerAdjustViewport(t,i,a){const l=this.getNullCell(d.DEFAULT_ATTR_DATA);let v=a;for(;v-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<i&&this.lines.push(new d.BufferLine(t,l))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-a,0)}_reflowSmaller(t,i){const a=this.getNullCell(d.DEFAULT_ATTR_DATA),l=[];let v=0;for(let m=this.lines.length-1;m>=0;m--){let h=this.lines.get(m);if(!h||!h.isWrapped&&h.getTrimmedLength()<=t)continue;const f=[h];for(;h.isWrapped&&m>0;)h=this.lines.get(--m),f.unshift(h);const b=this.ybase+this.y;if(b>=m&&b<m+f.length)continue;const L=f[f.length-1].getTrimmedLength(),y=(0,p.reflowSmallerGetNewLineLengths)(f,this._cols,t),E=y.length-f.length;let x;x=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);const A=[];for(let D=0;D<E;D++){const I=this.getBlankLine(d.DEFAULT_ATTR_DATA,!0);A.push(I)}A.length>0&&(l.push({start:m+f.length+v,newLines:A}),v+=A.length),f.push(...A);let M=y.length-1,O=y[M];O===0&&(M--,O=y[M]);let C=f.length-E-1,w=L;for(;C>=0;){const D=Math.min(w,O);if(f[M]===void 0)break;if(f[M].copyCellsFrom(f[C],w-D,O-D,D,!0),O-=D,O===0&&(M--,O=y[M]),w-=D,w===0){C--;const I=Math.max(C,0);w=(0,p.getWrappedLineTrimmedLength)(f,I,this._cols)}}for(let D=0;D<f.length;D++)y[D]<t&&f[D].setCell(y[D],a);let k=E-x;for(;k-- >0;)this.ybase===0?this.y<i-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+v)-i&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+E,this.ybase+i-1)}if(l.length>0){const m=[],h=[];for(let M=0;M<this.lines.length;M++)h.push(this.lines.get(M));const f=this.lines.length;let b=f-1,L=0,y=l[L];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+v);let E=0;for(let M=Math.min(this.lines.maxLength-1,f+v-1);M>=0;M--)if(y&&y.start>b+E){for(let O=y.newLines.length-1;O>=0;O--)this.lines.set(M--,y.newLines[O]);M++,m.push({index:b+1,amount:y.newLines.length}),E+=y.newLines.length,y=l[++L]}else this.lines.set(M,h[b--]);let x=0;for(let M=m.length-1;M>=0;M--)m[M].index+=x,this.lines.onInsertEmitter.fire(m[M]),x+=m[M].amount;const A=Math.max(0,f+v-this.lines.maxLength);A>0&&this.lines.onTrimEmitter.fire(A)}}translateBufferLineToString(t,i,a=0,l){const v=this.lines.get(t);return v?v.translateToString(i,a,l):""}getWrappedRangeForLine(t){let i=t,a=t;for(;i>0&&this.lines.get(i).isWrapped;)i--;for(;a+1<this.lines.length&&this.lines.get(a+1).isWrapped;)a++;return{first:i,last:a}}setupTabStops(t){for(t!=null?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this._cols;t+=this._optionsService.rawOptions.tabStopWidth)this.tabs[t]=!0}prevStop(t){for(t==null&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this._cols?this._cols-1:t<0?0:t}nextStop(t){for(t==null&&(t=this.x);!this.tabs[++t]&&t<this._cols;);return t>=this._cols?this._cols-1:t<0?0:t}clearMarkers(t){this._isClearing=!0;for(let i=0;i<this.markers.length;i++)this.markers[i].line===t&&(this.markers[i].dispose(),this.markers.splice(i--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].dispose(),this.markers.splice(t--,1);this._isClearing=!1}addMarker(t){const i=new e.Marker(t);return this.markers.push(i),i.register(this.lines.onTrim((a=>{i.line-=a,i.line<0&&i.dispose()}))),i.register(this.lines.onInsert((a=>{i.line>=a.index&&(i.line+=a.amount)}))),i.register(this.lines.onDelete((a=>{i.line>=a.index&&i.line<a.index+a.amount&&i.dispose(),i.line>a.index&&(i.line-=a.amount)}))),i.register(i.onDispose((()=>this._removeMarker(i)))),i}_removeMarker(t){this._isClearing||this.markers.splice(this.markers.indexOf(t),1)}}},8437:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLine=r.DEFAULT_ATTR_DATA=void 0;const c=o(3734),_=o(511),n=o(643),d=o(482);r.DEFAULT_ATTR_DATA=Object.freeze(new c.AttributeData);let p=0;class g{constructor(e,s,t=!1){this.isWrapped=t,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*e);const i=s||_.CellData.fromCharData([0,n.NULL_CELL_CHAR,n.NULL_CELL_WIDTH,n.NULL_CELL_CODE]);for(let a=0;a<e;++a)this.setCell(a,i);this.length=e}get(e){const s=this._data[3*e+0],t=2097151&s;return[this._data[3*e+1],2097152&s?this._combined[e]:t?(0,d.stringFromCodePoint)(t):"",s>>22,2097152&s?this._combined[e].charCodeAt(this._combined[e].length-1):t]}set(e,s){this._data[3*e+1]=s[n.CHAR_DATA_ATTR_INDEX],s[n.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[e]=s[1],this._data[3*e+0]=2097152|e|s[n.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*e+0]=s[n.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|s[n.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(e){return this._data[3*e+0]>>22}hasWidth(e){return 12582912&this._data[3*e+0]}getFg(e){return this._data[3*e+1]}getBg(e){return this._data[3*e+2]}hasContent(e){return 4194303&this._data[3*e+0]}getCodePoint(e){const s=this._data[3*e+0];return 2097152&s?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&s}isCombined(e){return 2097152&this._data[3*e+0]}getString(e){const s=this._data[3*e+0];return 2097152&s?this._combined[e]:2097151&s?(0,d.stringFromCodePoint)(2097151&s):""}isProtected(e){return 536870912&this._data[3*e+2]}loadCell(e,s){return p=3*e,s.content=this._data[p+0],s.fg=this._data[p+1],s.bg=this._data[p+2],2097152&s.content&&(s.combinedData=this._combined[e]),268435456&s.bg&&(s.extended=this._extendedAttrs[e]),s}setCell(e,s){2097152&s.content&&(this._combined[e]=s.combinedData),268435456&s.bg&&(this._extendedAttrs[e]=s.extended),this._data[3*e+0]=s.content,this._data[3*e+1]=s.fg,this._data[3*e+2]=s.bg}setCellFromCodePoint(e,s,t,i,a,l){268435456&a&&(this._extendedAttrs[e]=l),this._data[3*e+0]=s|t<<22,this._data[3*e+1]=i,this._data[3*e+2]=a}addCodepointToCell(e,s){let t=this._data[3*e+0];2097152&t?this._combined[e]+=(0,d.stringFromCodePoint)(s):(2097151&t?(this._combined[e]=(0,d.stringFromCodePoint)(2097151&t)+(0,d.stringFromCodePoint)(s),t&=-2097152,t|=2097152):t=s|4194304,this._data[3*e+0]=t)}insertCells(e,s,t,i){if((e%=this.length)&&this.getWidth(e-1)===2&&this.setCellFromCodePoint(e-1,0,1,(i==null?void 0:i.fg)||0,(i==null?void 0:i.bg)||0,(i==null?void 0:i.extended)||new c.ExtendedAttrs),s<this.length-e){const a=new _.CellData;for(let l=this.length-e-s-1;l>=0;--l)this.setCell(e+s+l,this.loadCell(e+l,a));for(let l=0;l<s;++l)this.setCell(e+l,t)}else for(let a=e;a<this.length;++a)this.setCell(a,t);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(i==null?void 0:i.fg)||0,(i==null?void 0:i.bg)||0,(i==null?void 0:i.extended)||new c.ExtendedAttrs)}deleteCells(e,s,t,i){if(e%=this.length,s<this.length-e){const a=new _.CellData;for(let l=0;l<this.length-e-s;++l)this.setCell(e+l,this.loadCell(e+s+l,a));for(let l=this.length-s;l<this.length;++l)this.setCell(l,t)}else for(let a=e;a<this.length;++a)this.setCell(a,t);e&&this.getWidth(e-1)===2&&this.setCellFromCodePoint(e-1,0,1,(i==null?void 0:i.fg)||0,(i==null?void 0:i.bg)||0,(i==null?void 0:i.extended)||new c.ExtendedAttrs),this.getWidth(e)!==0||this.hasContent(e)||this.setCellFromCodePoint(e,0,1,(i==null?void 0:i.fg)||0,(i==null?void 0:i.bg)||0,(i==null?void 0:i.extended)||new c.ExtendedAttrs)}replaceCells(e,s,t,i,a=!1){if(a)for(e&&this.getWidth(e-1)===2&&!this.isProtected(e-1)&&this.setCellFromCodePoint(e-1,0,1,(i==null?void 0:i.fg)||0,(i==null?void 0:i.bg)||0,(i==null?void 0:i.extended)||new c.ExtendedAttrs),s<this.length&&this.getWidth(s-1)===2&&!this.isProtected(s)&&this.setCellFromCodePoint(s,0,1,(i==null?void 0:i.fg)||0,(i==null?void 0:i.bg)||0,(i==null?void 0:i.extended)||new c.ExtendedAttrs);e<s&&e<this.length;)this.isProtected(e)||this.setCell(e,t),e++;else for(e&&this.getWidth(e-1)===2&&this.setCellFromCodePoint(e-1,0,1,(i==null?void 0:i.fg)||0,(i==null?void 0:i.bg)||0,(i==null?void 0:i.extended)||new c.ExtendedAttrs),s<this.length&&this.getWidth(s-1)===2&&this.setCellFromCodePoint(s,0,1,(i==null?void 0:i.fg)||0,(i==null?void 0:i.bg)||0,(i==null?void 0:i.extended)||new c.ExtendedAttrs);e<s&&e<this.length;)this.setCell(e++,t)}resize(e,s){if(e===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const t=3*e;if(e>this.length){if(this._data.buffer.byteLength>=4*t)this._data=new Uint32Array(this._data.buffer,0,t);else{const i=new Uint32Array(t);i.set(this._data),this._data=i}for(let i=this.length;i<e;++i)this.setCell(i,s)}else{this._data=this._data.subarray(0,t);const i=Object.keys(this._combined);for(let l=0;l<i.length;l++){const v=parseInt(i[l],10);v>=e&&delete this._combined[v]}const a=Object.keys(this._extendedAttrs);for(let l=0;l<a.length;l++){const v=parseInt(a[l],10);v>=e&&delete this._extendedAttrs[v]}}return this.length=e,4*t*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const e=new Uint32Array(this._data.length);return e.set(this._data),this._data=e,1}return 0}fill(e,s=!1){if(s)for(let t=0;t<this.length;++t)this.isProtected(t)||this.setCell(t,e);else{this._combined={},this._extendedAttrs={};for(let t=0;t<this.length;++t)this.setCell(t,e)}}copyFrom(e){this.length!==e.length?this._data=new Uint32Array(e._data):this._data.set(e._data),this.length=e.length,this._combined={};for(const s in e._combined)this._combined[s]=e._combined[s];this._extendedAttrs={};for(const s in e._extendedAttrs)this._extendedAttrs[s]=e._extendedAttrs[s];this.isWrapped=e.isWrapped}clone(){const e=new g(0);e._data=new Uint32Array(this._data),e.length=this.length;for(const s in this._combined)e._combined[s]=this._combined[s];for(const s in this._extendedAttrs)e._extendedAttrs[s]=this._extendedAttrs[s];return e.isWrapped=this.isWrapped,e}getTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(4194303&this._data[3*e+0])return e+(this._data[3*e+0]>>22);return 0}getNoBgTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(4194303&this._data[3*e+0]||50331648&this._data[3*e+2])return e+(this._data[3*e+0]>>22);return 0}copyCellsFrom(e,s,t,i,a){const l=e._data;if(a)for(let m=i-1;m>=0;m--){for(let h=0;h<3;h++)this._data[3*(t+m)+h]=l[3*(s+m)+h];268435456&l[3*(s+m)+2]&&(this._extendedAttrs[t+m]=e._extendedAttrs[s+m])}else for(let m=0;m<i;m++){for(let h=0;h<3;h++)this._data[3*(t+m)+h]=l[3*(s+m)+h];268435456&l[3*(s+m)+2]&&(this._extendedAttrs[t+m]=e._extendedAttrs[s+m])}const v=Object.keys(e._combined);for(let m=0;m<v.length;m++){const h=parseInt(v[m],10);h>=s&&(this._combined[h-s+t]=e._combined[h])}}translateToString(e=!1,s=0,t=this.length){e&&(t=Math.min(t,this.getTrimmedLength()));let i="";for(;s<t;){const a=this._data[3*s+0],l=2097151&a;i+=2097152&a?this._combined[s]:l?(0,d.stringFromCodePoint)(l):n.WHITESPACE_CELL_CHAR,s+=a>>22||1}return i}}r.BufferLine=g},4841:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getRangeLength=void 0,r.getRangeLength=function(o,c){if(o.start.y>o.end.y)throw new Error(`Buffer range end (${o.end.x}, ${o.end.y}) cannot be before start (${o.start.x}, ${o.start.y})`);return c*(o.end.y-o.start.y)+(o.end.x-o.start.x+1)}},4634:(P,r)=>{function o(c,_,n){if(_===c.length-1)return c[_].getTrimmedLength();const d=!c[_].hasContent(n-1)&&c[_].getWidth(n-1)===1,p=c[_+1].getWidth(0)===2;return d&&p?n-1:n}Object.defineProperty(r,"__esModule",{value:!0}),r.getWrappedLineTrimmedLength=r.reflowSmallerGetNewLineLengths=r.reflowLargerApplyNewLayout=r.reflowLargerCreateNewLayout=r.reflowLargerGetLinesToRemove=void 0,r.reflowLargerGetLinesToRemove=function(c,_,n,d,p){const g=[];for(let u=0;u<c.length-1;u++){let e=u,s=c.get(++e);if(!s.isWrapped)continue;const t=[c.get(u)];for(;e<c.length&&s.isWrapped;)t.push(s),s=c.get(++e);if(d>=u&&d<e){u+=t.length-1;continue}let i=0,a=o(t,i,_),l=1,v=0;for(;l<t.length;){const h=o(t,l,_),f=h-v,b=n-a,L=Math.min(f,b);t[i].copyCellsFrom(t[l],v,a,L,!1),a+=L,a===n&&(i++,a=0),v+=L,v===h&&(l++,v=0),a===0&&i!==0&&t[i-1].getWidth(n-1)===2&&(t[i].copyCellsFrom(t[i-1],n-1,a++,1,!1),t[i-1].setCell(n-1,p))}t[i].replaceCells(a,n,p);let m=0;for(let h=t.length-1;h>0&&(h>i||t[h].getTrimmedLength()===0);h--)m++;m>0&&(g.push(u+t.length-m),g.push(m)),u+=t.length-1}return g},r.reflowLargerCreateNewLayout=function(c,_){const n=[];let d=0,p=_[d],g=0;for(let u=0;u<c.length;u++)if(p===u){const e=_[++d];c.onDeleteEmitter.fire({index:u-g,amount:e}),u+=e-1,g+=e,p=_[++d]}else n.push(u);return{layout:n,countRemoved:g}},r.reflowLargerApplyNewLayout=function(c,_){const n=[];for(let d=0;d<_.length;d++)n.push(c.get(_[d]));for(let d=0;d<n.length;d++)c.set(d,n[d]);c.length=_.length},r.reflowSmallerGetNewLineLengths=function(c,_,n){const d=[],p=c.map(((s,t)=>o(c,t,_))).reduce(((s,t)=>s+t));let g=0,u=0,e=0;for(;e<p;){if(p-e<n){d.push(p-e);break}g+=n;const s=o(c,u,_);g>s&&(g-=s,u++);const t=c[u].getWidth(g-1)===2;t&&g--;const i=t?n-1:n;d.push(i),e+=i}return d},r.getWrappedLineTrimmedLength=o},5295:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferSet=void 0;const c=o(8460),_=o(844),n=o(9092);class d extends _.Disposable{constructor(g,u){super(),this._optionsService=g,this._bufferService=u,this._onBufferActivate=this.register(new c.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new n.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new n.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(g){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(g),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(g,u){this._normal.resize(g,u),this._alt.resize(g,u),this.setupTabStops(g)}setupTabStops(g){this._normal.setupTabStops(g),this._alt.setupTabStops(g)}}r.BufferSet=d},511:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellData=void 0;const c=o(482),_=o(643),n=o(3734);class d extends n.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new n.ExtendedAttrs,this.combinedData=""}static fromCharData(g){const u=new d;return u.setFromCharData(g),u}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,c.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(g){this.fg=g[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let u=!1;if(g[_.CHAR_DATA_CHAR_INDEX].length>2)u=!0;else if(g[_.CHAR_DATA_CHAR_INDEX].length===2){const e=g[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=e&&e<=56319){const s=g[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=s&&s<=57343?this.content=1024*(e-55296)+s-56320+65536|g[_.CHAR_DATA_WIDTH_INDEX]<<22:u=!0}else u=!0}else this.content=g[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|g[_.CHAR_DATA_WIDTH_INDEX]<<22;u&&(this.combinedData=g[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|g[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.CellData=d},643:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WHITESPACE_CELL_CODE=r.WHITESPACE_CELL_WIDTH=r.WHITESPACE_CELL_CHAR=r.NULL_CELL_CODE=r.NULL_CELL_WIDTH=r.NULL_CELL_CHAR=r.CHAR_DATA_CODE_INDEX=r.CHAR_DATA_WIDTH_INDEX=r.CHAR_DATA_CHAR_INDEX=r.CHAR_DATA_ATTR_INDEX=r.DEFAULT_EXT=r.DEFAULT_ATTR=r.DEFAULT_COLOR=void 0,r.DEFAULT_COLOR=0,r.DEFAULT_ATTR=256|r.DEFAULT_COLOR<<9,r.DEFAULT_EXT=0,r.CHAR_DATA_ATTR_INDEX=0,r.CHAR_DATA_CHAR_INDEX=1,r.CHAR_DATA_WIDTH_INDEX=2,r.CHAR_DATA_CODE_INDEX=3,r.NULL_CELL_CHAR="",r.NULL_CELL_WIDTH=1,r.NULL_CELL_CODE=0,r.WHITESPACE_CELL_CHAR=" ",r.WHITESPACE_CELL_WIDTH=1,r.WHITESPACE_CELL_CODE=32},4863:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Marker=void 0;const c=o(8460),_=o(844);class n{get id(){return this._id}constructor(p){this.line=p,this.isDisposed=!1,this._disposables=[],this._id=n._nextId++,this._onDispose=this.register(new c.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,_.disposeArray)(this._disposables),this._disposables.length=0)}register(p){return this._disposables.push(p),p}}r.Marker=n,n._nextId=1},7116:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_CHARSET=r.CHARSETS=void 0,r.CHARSETS={},r.DEFAULT_CHARSET=r.CHARSETS.B,r.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:"≥","{":"π","|":"≠","}":"£","~":"·"},r.CHARSETS.A={"#":"£"},r.CHARSETS.B=void 0,r.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},r.CHARSETS.C=r.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},r.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},r.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},r.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},r.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},r.CHARSETS.E=r.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},r.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},r.CHARSETS.H=r.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},r.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(P,r)=>{var o,c,_;Object.defineProperty(r,"__esModule",{value:!0}),r.C1_ESCAPED=r.C1=r.C0=void 0,(function(n){n.NUL="\0",n.SOH="",n.STX="",n.ETX="",n.EOT="",n.ENQ="",n.ACK="",n.BEL="\x07",n.BS="\b",n.HT=" ",n.LF=`
|
|
18
18
|
`,n.VT="\v",n.FF="\f",n.CR="\r",n.SO="",n.SI="",n.DLE="",n.DC1="",n.DC2="",n.DC3="",n.DC4="",n.NAK="",n.SYN="",n.ETB="",n.CAN="",n.EM="",n.SUB="",n.ESC="\x1B",n.FS="",n.GS="",n.RS="",n.US="",n.SP=" ",n.DEL=""})(o||(r.C0=o={})),(function(n){n.PAD="",n.HOP="",n.BPH="",n.NBH="",n.IND="",n.NEL="
",n.SSA="",n.ESA="",n.HTS="",n.HTJ="",n.VTS="",n.PLD="",n.PLU="",n.RI="",n.SS2="",n.SS3="",n.DCS="",n.PU1="",n.PU2="",n.STS="",n.CCH="",n.MW="",n.SPA="",n.EPA="",n.SOS="",n.SGCI="",n.SCI="",n.CSI="",n.ST="",n.OSC="",n.PM="",n.APC=""})(c||(r.C1=c={})),(function(n){n.ST=`${o.ESC}\\`})(_||(r.C1_ESCAPED=_={}))},7399:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.evaluateKeyboardEvent=void 0;const c=o(2584),_={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};r.evaluateKeyboardEvent=function(n,d,p,g){const u={type:0,cancel:!1,key:void 0},e=(n.shiftKey?1:0)|(n.altKey?2:0)|(n.ctrlKey?4:0)|(n.metaKey?8:0);switch(n.keyCode){case 0:n.key==="UIKeyInputUpArrow"?u.key=d?c.C0.ESC+"OA":c.C0.ESC+"[A":n.key==="UIKeyInputLeftArrow"?u.key=d?c.C0.ESC+"OD":c.C0.ESC+"[D":n.key==="UIKeyInputRightArrow"?u.key=d?c.C0.ESC+"OC":c.C0.ESC+"[C":n.key==="UIKeyInputDownArrow"&&(u.key=d?c.C0.ESC+"OB":c.C0.ESC+"[B");break;case 8:if(n.altKey){u.key=c.C0.ESC+c.C0.DEL;break}u.key=c.C0.DEL;break;case 9:if(n.shiftKey){u.key=c.C0.ESC+"[Z";break}u.key=c.C0.HT,u.cancel=!0;break;case 13:u.key=n.altKey?c.C0.ESC+c.C0.CR:c.C0.CR,u.cancel=!0;break;case 27:u.key=c.C0.ESC,n.altKey&&(u.key=c.C0.ESC+c.C0.ESC),u.cancel=!0;break;case 37:if(n.metaKey)break;e?(u.key=c.C0.ESC+"[1;"+(e+1)+"D",u.key===c.C0.ESC+"[1;3D"&&(u.key=c.C0.ESC+(p?"b":"[1;5D"))):u.key=d?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(n.metaKey)break;e?(u.key=c.C0.ESC+"[1;"+(e+1)+"C",u.key===c.C0.ESC+"[1;3C"&&(u.key=c.C0.ESC+(p?"f":"[1;5C"))):u.key=d?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(n.metaKey)break;e?(u.key=c.C0.ESC+"[1;"+(e+1)+"A",p||u.key!==c.C0.ESC+"[1;3A"||(u.key=c.C0.ESC+"[1;5A")):u.key=d?c.C0.ESC+"OA":c.C0.ESC+"[A";break;case 40:if(n.metaKey)break;e?(u.key=c.C0.ESC+"[1;"+(e+1)+"B",p||u.key!==c.C0.ESC+"[1;3B"||(u.key=c.C0.ESC+"[1;5B")):u.key=d?c.C0.ESC+"OB":c.C0.ESC+"[B";break;case 45:n.shiftKey||n.ctrlKey||(u.key=c.C0.ESC+"[2~");break;case 46:u.key=e?c.C0.ESC+"[3;"+(e+1)+"~":c.C0.ESC+"[3~";break;case 36:u.key=e?c.C0.ESC+"[1;"+(e+1)+"H":d?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:u.key=e?c.C0.ESC+"[1;"+(e+1)+"F":d?c.C0.ESC+"OF":c.C0.ESC+"[F";break;case 33:n.shiftKey?u.type=2:n.ctrlKey?u.key=c.C0.ESC+"[5;"+(e+1)+"~":u.key=c.C0.ESC+"[5~";break;case 34:n.shiftKey?u.type=3:n.ctrlKey?u.key=c.C0.ESC+"[6;"+(e+1)+"~":u.key=c.C0.ESC+"[6~";break;case 112:u.key=e?c.C0.ESC+"[1;"+(e+1)+"P":c.C0.ESC+"OP";break;case 113:u.key=e?c.C0.ESC+"[1;"+(e+1)+"Q":c.C0.ESC+"OQ";break;case 114:u.key=e?c.C0.ESC+"[1;"+(e+1)+"R":c.C0.ESC+"OR";break;case 115:u.key=e?c.C0.ESC+"[1;"+(e+1)+"S":c.C0.ESC+"OS";break;case 116:u.key=e?c.C0.ESC+"[15;"+(e+1)+"~":c.C0.ESC+"[15~";break;case 117:u.key=e?c.C0.ESC+"[17;"+(e+1)+"~":c.C0.ESC+"[17~";break;case 118:u.key=e?c.C0.ESC+"[18;"+(e+1)+"~":c.C0.ESC+"[18~";break;case 119:u.key=e?c.C0.ESC+"[19;"+(e+1)+"~":c.C0.ESC+"[19~";break;case 120:u.key=e?c.C0.ESC+"[20;"+(e+1)+"~":c.C0.ESC+"[20~";break;case 121:u.key=e?c.C0.ESC+"[21;"+(e+1)+"~":c.C0.ESC+"[21~";break;case 122:u.key=e?c.C0.ESC+"[23;"+(e+1)+"~":c.C0.ESC+"[23~";break;case 123:u.key=e?c.C0.ESC+"[24;"+(e+1)+"~":c.C0.ESC+"[24~";break;default:if(!n.ctrlKey||n.shiftKey||n.altKey||n.metaKey)if(p&&!g||!n.altKey||n.metaKey)!p||n.altKey||n.ctrlKey||n.shiftKey||!n.metaKey?n.key&&!n.ctrlKey&&!n.altKey&&!n.metaKey&&n.keyCode>=48&&n.key.length===1?u.key=n.key:n.key&&n.ctrlKey&&(n.key==="_"&&(u.key=c.C0.US),n.key==="@"&&(u.key=c.C0.NUL)):n.keyCode===65&&(u.type=1);else{const s=_[n.keyCode],t=s==null?void 0:s[n.shiftKey?1:0];if(t)u.key=c.C0.ESC+t;else if(n.keyCode>=65&&n.keyCode<=90){const i=n.ctrlKey?n.keyCode-64:n.keyCode+32;let a=String.fromCharCode(i);n.shiftKey&&(a=a.toUpperCase()),u.key=c.C0.ESC+a}else if(n.keyCode===32)u.key=c.C0.ESC+(n.ctrlKey?c.C0.NUL:" ");else if(n.key==="Dead"&&n.code.startsWith("Key")){let i=n.code.slice(3,4);n.shiftKey||(i=i.toLowerCase()),u.key=c.C0.ESC+i,u.cancel=!0}}else n.keyCode>=65&&n.keyCode<=90?u.key=String.fromCharCode(n.keyCode-64):n.keyCode===32?u.key=c.C0.NUL:n.keyCode>=51&&n.keyCode<=55?u.key=String.fromCharCode(n.keyCode-51+27):n.keyCode===56?u.key=c.C0.DEL:n.keyCode===219?u.key=c.C0.ESC:n.keyCode===220?u.key=c.C0.FS:n.keyCode===221&&(u.key=c.C0.GS)}return u}},482:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(o){return o>65535?(o-=65536,String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):String.fromCharCode(o)},r.utf32ToString=function(o,c=0,_=o.length){let n="";for(let d=c;d<_;++d){let p=o[d];p>65535?(p-=65536,n+=String.fromCharCode(55296+(p>>10))+String.fromCharCode(p%1024+56320)):n+=String.fromCharCode(p)}return n},r.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(o,c){const _=o.length;if(!_)return 0;let n=0,d=0;if(this._interim){const p=o.charCodeAt(d++);56320<=p&&p<=57343?c[n++]=1024*(this._interim-55296)+p-56320+65536:(c[n++]=this._interim,c[n++]=p),this._interim=0}for(let p=d;p<_;++p){const g=o.charCodeAt(p);if(55296<=g&&g<=56319){if(++p>=_)return this._interim=g,n;const u=o.charCodeAt(p);56320<=u&&u<=57343?c[n++]=1024*(g-55296)+u-56320+65536:(c[n++]=g,c[n++]=u)}else g!==65279&&(c[n++]=g)}return n}},r.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(o,c){const _=o.length;if(!_)return 0;let n,d,p,g,u=0,e=0,s=0;if(this.interim[0]){let a=!1,l=this.interim[0];l&=(224&l)==192?31:(240&l)==224?15:7;let v,m=0;for(;(v=63&this.interim[++m])&&m<4;)l<<=6,l|=v;const h=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,f=h-m;for(;s<f;){if(s>=_)return 0;if(v=o[s++],(192&v)!=128){s--,a=!0;break}this.interim[m++]=v,l<<=6,l|=63&v}a||(h===2?l<128?s--:c[u++]=l:h===3?l<2048||l>=55296&&l<=57343||l===65279||(c[u++]=l):l<65536||l>1114111||(c[u++]=l)),this.interim.fill(0)}const t=_-4;let i=s;for(;i<_;){for(;!(!(i<t)||128&(n=o[i])||128&(d=o[i+1])||128&(p=o[i+2])||128&(g=o[i+3]));)c[u++]=n,c[u++]=d,c[u++]=p,c[u++]=g,i+=4;if(n=o[i++],n<128)c[u++]=n;else if((224&n)==192){if(i>=_)return this.interim[0]=n,u;if(d=o[i++],(192&d)!=128){i--;continue}if(e=(31&n)<<6|63&d,e<128){i--;continue}c[u++]=e}else if((240&n)==224){if(i>=_)return this.interim[0]=n,u;if(d=o[i++],(192&d)!=128){i--;continue}if(i>=_)return this.interim[0]=n,this.interim[1]=d,u;if(p=o[i++],(192&p)!=128){i--;continue}if(e=(15&n)<<12|(63&d)<<6|63&p,e<2048||e>=55296&&e<=57343||e===65279)continue;c[u++]=e}else if((248&n)==240){if(i>=_)return this.interim[0]=n,u;if(d=o[i++],(192&d)!=128){i--;continue}if(i>=_)return this.interim[0]=n,this.interim[1]=d,u;if(p=o[i++],(192&p)!=128){i--;continue}if(i>=_)return this.interim[0]=n,this.interim[1]=d,this.interim[2]=p,u;if(g=o[i++],(192&g)!=128){i--;continue}if(e=(7&n)<<18|(63&d)<<12|(63&p)<<6|63&g,e<65536||e>1114111)continue;c[u++]=e}}return u}}},225:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeV6=void 0;const o=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],c=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let _;r.UnicodeV6=class{constructor(){if(this.version="6",!_){_=new Uint8Array(65536),_.fill(1),_[0]=0,_.fill(0,1,32),_.fill(0,127,160),_.fill(2,4352,4448),_[9001]=2,_[9002]=2,_.fill(2,11904,42192),_[12351]=1,_.fill(2,44032,55204),_.fill(2,63744,64256),_.fill(2,65040,65050),_.fill(2,65072,65136),_.fill(2,65280,65377),_.fill(2,65504,65511);for(let n=0;n<o.length;++n)_.fill(0,o[n][0],o[n][1]+1)}}wcwidth(n){return n<32?0:n<127?1:n<65536?_[n]:(function(d,p){let g,u=0,e=p.length-1;if(d<p[0][0]||d>p[e][1])return!1;for(;e>=u;)if(g=u+e>>1,d>p[g][1])u=g+1;else{if(!(d<p[g][0]))return!0;e=g-1}return!1})(n,c)?0:n>=131072&&n<=196605||n>=196608&&n<=262141?2:1}}},5981:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WriteBuffer=void 0;const c=o(8460),_=o(844);class n extends _.Disposable{constructor(p){super(),this._action=p,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(p,g){if(g!==void 0&&this._syncCalls>g)return void(this._syncCalls=0);if(this._pendingData+=p.length,this._writeBuffer.push(p),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let u;for(this._isSyncWriting=!0;u=this._writeBuffer.shift();){this._action(u);const e=this._callbacks.shift();e&&e()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(p,g){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=p.length,this._writeBuffer.push(p),this._callbacks.push(g),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=p.length,this._writeBuffer.push(p),this._callbacks.push(g)}_innerWrite(p=0,g=!0){const u=p||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const e=this._writeBuffer[this._bufferOffset],s=this._action(e,g);if(s){const i=a=>Date.now()-u>=12?setTimeout((()=>this._innerWrite(0,a))):this._innerWrite(u,a);return void s.catch((a=>(queueMicrotask((()=>{throw a})),Promise.resolve(!1)))).then(i)}const t=this._callbacks[this._bufferOffset];if(t&&t(),this._bufferOffset++,this._pendingData-=e.length,Date.now()-u>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}r.WriteBuffer=n},5941:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.toRgbString=r.parseColor=void 0;const o=/^([\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})$/,c=/^[\da-f]+$/;function _(n,d){const p=n.toString(16),g=p.length<2?"0"+p:p;switch(d){case 4:return p[0];case 8:return g;case 12:return(g+g).slice(0,3);default:return g+g}}r.parseColor=function(n){if(!n)return;let d=n.toLowerCase();if(d.indexOf("rgb:")===0){d=d.slice(4);const p=o.exec(d);if(p){const g=p[1]?15:p[4]?255:p[7]?4095:65535;return[Math.round(parseInt(p[1]||p[4]||p[7]||p[10],16)/g*255),Math.round(parseInt(p[2]||p[5]||p[8]||p[11],16)/g*255),Math.round(parseInt(p[3]||p[6]||p[9]||p[12],16)/g*255)]}}else if(d.indexOf("#")===0&&(d=d.slice(1),c.exec(d)&&[3,6,9,12].includes(d.length))){const p=d.length/3,g=[0,0,0];for(let u=0;u<3;++u){const e=parseInt(d.slice(p*u,p*u+p),16);g[u]=p===1?e<<4:p===2?e:p===3?e>>4:e>>8}return g}},r.toRgbString=function(n,d=16){const[p,g,u]=n;return`rgb:${_(p,d)}/${_(g,d)}/${_(u,d)}`}},5770:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.PAYLOAD_LIMIT=void 0,r.PAYLOAD_LIMIT=1e7},6351:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DcsHandler=r.DcsParser=void 0;const c=o(482),_=o(8742),n=o(5770),d=[];r.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=d,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=d}registerHandler(g,u){this._handlers[g]===void 0&&(this._handlers[g]=[]);const e=this._handlers[g];return e.push(u),{dispose:()=>{const s=e.indexOf(u);s!==-1&&e.splice(s,1)}}}clearHandler(g){this._handlers[g]&&delete this._handlers[g]}setHandlerFallback(g){this._handlerFb=g}reset(){if(this._active.length)for(let g=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;g>=0;--g)this._active[g].unhook(!1);this._stack.paused=!1,this._active=d,this._ident=0}hook(g,u){if(this.reset(),this._ident=g,this._active=this._handlers[g]||d,this._active.length)for(let e=this._active.length-1;e>=0;e--)this._active[e].hook(u);else this._handlerFb(this._ident,"HOOK",u)}put(g,u,e){if(this._active.length)for(let s=this._active.length-1;s>=0;s--)this._active[s].put(g,u,e);else this._handlerFb(this._ident,"PUT",(0,c.utf32ToString)(g,u,e))}unhook(g,u=!0){if(this._active.length){let e=!1,s=this._active.length-1,t=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,e=u,t=this._stack.fallThrough,this._stack.paused=!1),!t&&e===!1){for(;s>=0&&(e=this._active[s].unhook(g),e!==!0);s--)if(e instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,e;s--}for(;s>=0;s--)if(e=this._active[s].unhook(!1),e instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,e}else this._handlerFb(this._ident,"UNHOOK",g);this._active=d,this._ident=0}};const p=new _.Params;p.addParam(0),r.DcsHandler=class{constructor(g){this._handler=g,this._data="",this._params=p,this._hitLimit=!1}hook(g){this._params=g.length>1||g.params[0]?g.clone():p,this._data="",this._hitLimit=!1}put(g,u,e){this._hitLimit||(this._data+=(0,c.utf32ToString)(g,u,e),this._data.length>n.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(g){let u=!1;if(this._hitLimit)u=!1;else if(g&&(u=this._handler(this._data,this._params),u instanceof Promise))return u.then((e=>(this._params=p,this._data="",this._hitLimit=!1,e)));return this._params=p,this._data="",this._hitLimit=!1,u}}},2015:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.EscapeSequenceParser=r.VT500_TRANSITION_TABLE=r.TransitionTable=void 0;const c=o(844),_=o(8742),n=o(6242),d=o(6351);class p{constructor(s){this.table=new Uint8Array(s)}setDefault(s,t){this.table.fill(s<<4|t)}add(s,t,i,a){this.table[t<<8|s]=i<<4|a}addMany(s,t,i,a){for(let l=0;l<s.length;l++)this.table[t<<8|s[l]]=i<<4|a}}r.TransitionTable=p;const g=160;r.VT500_TRANSITION_TABLE=(function(){const e=new p(4095),s=Array.apply(null,Array(256)).map(((m,h)=>h)),t=(m,h)=>s.slice(m,h),i=t(32,127),a=t(0,24);a.push(25),a.push.apply(a,t(28,32));const l=t(0,14);let v;for(v in e.setDefault(1,0),e.addMany(i,0,2,0),l)e.addMany([24,26,153,154],v,3,0),e.addMany(t(128,144),v,3,0),e.addMany(t(144,152),v,3,0),e.add(156,v,0,0),e.add(27,v,11,1),e.add(157,v,4,8),e.addMany([152,158,159],v,0,7),e.add(155,v,11,3),e.add(144,v,11,9);return e.addMany(a,0,3,0),e.addMany(a,1,3,1),e.add(127,1,0,1),e.addMany(a,8,0,8),e.addMany(a,3,3,3),e.add(127,3,0,3),e.addMany(a,4,3,4),e.add(127,4,0,4),e.addMany(a,6,3,6),e.addMany(a,5,3,5),e.add(127,5,0,5),e.addMany(a,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(i,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(t(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(i,7,0,7),e.addMany(a,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(t(64,127),3,7,0),e.addMany(t(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(t(48,60),4,8,4),e.addMany(t(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(t(32,64),6,0,6),e.add(127,6,0,6),e.addMany(t(64,127),6,0,0),e.addMany(t(32,48),3,9,5),e.addMany(t(32,48),5,9,5),e.addMany(t(48,64),5,0,6),e.addMany(t(64,127),5,7,0),e.addMany(t(32,48),4,9,5),e.addMany(t(32,48),1,9,2),e.addMany(t(32,48),2,9,2),e.addMany(t(48,127),2,10,0),e.addMany(t(48,80),1,10,0),e.addMany(t(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(t(96,127),1,10,0),e.add(80,1,11,9),e.addMany(a,9,0,9),e.add(127,9,0,9),e.addMany(t(28,32),9,0,9),e.addMany(t(32,48),9,9,12),e.addMany(t(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(a,11,0,11),e.addMany(t(32,128),11,0,11),e.addMany(t(28,32),11,0,11),e.addMany(a,10,0,10),e.add(127,10,0,10),e.addMany(t(28,32),10,0,10),e.addMany(t(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(t(32,48),10,9,12),e.addMany(a,12,0,12),e.add(127,12,0,12),e.addMany(t(28,32),12,0,12),e.addMany(t(32,48),12,9,12),e.addMany(t(48,64),12,0,11),e.addMany(t(64,127),12,12,13),e.addMany(t(64,127),10,12,13),e.addMany(t(64,127),9,12,13),e.addMany(a,13,13,13),e.addMany(i,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(g,0,2,0),e.add(g,8,5,8),e.add(g,6,0,6),e.add(g,11,0,11),e.add(g,13,13,13),e})();class u extends c.Disposable{constructor(s=r.VT500_TRANSITION_TABLE){super(),this._transitions=s,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new _.Params,this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._printHandlerFb=(t,i,a)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,i)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,c.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new n.OscParser),this._dcsParser=this.register(new d.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(s,t=[64,126]){let i=0;if(s.prefix){if(s.prefix.length>1)throw new Error("only one byte as prefix supported");if(i=s.prefix.charCodeAt(0),i&&60>i||i>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(s.intermediates){if(s.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let l=0;l<s.intermediates.length;++l){const v=s.intermediates.charCodeAt(l);if(32>v||v>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");i<<=8,i|=v}}if(s.final.length!==1)throw new Error("final must be a single byte");const a=s.final.charCodeAt(0);if(t[0]>a||a>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return i<<=8,i|=a,i}identToString(s){const t=[];for(;s;)t.push(String.fromCharCode(255&s)),s>>=8;return t.reverse().join("")}setPrintHandler(s){this._printHandler=s}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(s,t){const i=this._identifier(s,[48,126]);this._escHandlers[i]===void 0&&(this._escHandlers[i]=[]);const a=this._escHandlers[i];return a.push(t),{dispose:()=>{const l=a.indexOf(t);l!==-1&&a.splice(l,1)}}}clearEscHandler(s){this._escHandlers[this._identifier(s,[48,126])]&&delete this._escHandlers[this._identifier(s,[48,126])]}setEscHandlerFallback(s){this._escHandlerFb=s}setExecuteHandler(s,t){this._executeHandlers[s.charCodeAt(0)]=t}clearExecuteHandler(s){this._executeHandlers[s.charCodeAt(0)]&&delete this._executeHandlers[s.charCodeAt(0)]}setExecuteHandlerFallback(s){this._executeHandlerFb=s}registerCsiHandler(s,t){const i=this._identifier(s);this._csiHandlers[i]===void 0&&(this._csiHandlers[i]=[]);const a=this._csiHandlers[i];return a.push(t),{dispose:()=>{const l=a.indexOf(t);l!==-1&&a.splice(l,1)}}}clearCsiHandler(s){this._csiHandlers[this._identifier(s)]&&delete this._csiHandlers[this._identifier(s)]}setCsiHandlerFallback(s){this._csiHandlerFb=s}registerDcsHandler(s,t){return this._dcsParser.registerHandler(this._identifier(s),t)}clearDcsHandler(s){this._dcsParser.clearHandler(this._identifier(s))}setDcsHandlerFallback(s){this._dcsParser.setHandlerFallback(s)}registerOscHandler(s,t){return this._oscParser.registerHandler(s,t)}clearOscHandler(s){this._oscParser.clearHandler(s)}setOscHandlerFallback(s){this._oscParser.setHandlerFallback(s)}setErrorHandler(s){this._errorHandler=s}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(s,t,i,a,l){this._parseStack.state=s,this._parseStack.handlers=t,this._parseStack.handlerPos=i,this._parseStack.transition=a,this._parseStack.chunkPos=l}parse(s,t,i){let a,l=0,v=0,m=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,m=this._parseStack.chunkPos+1;else{if(i===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const h=this._parseStack.handlers;let f=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(i===!1&&f>-1){for(;f>=0&&(a=h[f](this._params),a!==!0);f--)if(a instanceof Promise)return this._parseStack.handlerPos=f,a}this._parseStack.handlers=[];break;case 4:if(i===!1&&f>-1){for(;f>=0&&(a=h[f](),a!==!0);f--)if(a instanceof Promise)return this._parseStack.handlerPos=f,a}this._parseStack.handlers=[];break;case 6:if(l=s[this._parseStack.chunkPos],a=this._dcsParser.unhook(l!==24&&l!==26,i),a)return a;l===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(l=s[this._parseStack.chunkPos],a=this._oscParser.end(l!==24&&l!==26,i),a)return a;l===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,m=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(let h=m;h<t;++h){switch(l=s[h],v=this._transitions.table[this.currentState<<8|(l<160?l:g)],v>>4){case 2:for(let E=h+1;;++E){if(E>=t||(l=s[E])<32||l>126&&l<g){this._printHandler(s,h,E),h=E-1;break}if(++E>=t||(l=s[E])<32||l>126&&l<g){this._printHandler(s,h,E),h=E-1;break}if(++E>=t||(l=s[E])<32||l>126&&l<g){this._printHandler(s,h,E),h=E-1;break}if(++E>=t||(l=s[E])<32||l>126&&l<g){this._printHandler(s,h,E),h=E-1;break}}break;case 3:this._executeHandlers[l]?this._executeHandlers[l]():this._executeHandlerFb(l),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:h,code:l,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const f=this._csiHandlers[this._collect<<8|l];let b=f?f.length-1:-1;for(;b>=0&&(a=f[b](this._params),a!==!0);b--)if(a instanceof Promise)return this._preserveStack(3,f,b,v,h),a;b<0&&this._csiHandlerFb(this._collect<<8|l,this._params),this.precedingCodepoint=0;break;case 8:do switch(l){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(l-48)}while(++h<t&&(l=s[h])>47&&l<60);h--;break;case 9:this._collect<<=8,this._collect|=l;break;case 10:const L=this._escHandlers[this._collect<<8|l];let y=L?L.length-1:-1;for(;y>=0&&(a=L[y](),a!==!0);y--)if(a instanceof Promise)return this._preserveStack(4,L,y,v,h),a;y<0&&this._escHandlerFb(this._collect<<8|l),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|l,this._params);break;case 13:for(let E=h+1;;++E)if(E>=t||(l=s[E])===24||l===26||l===27||l>127&&l<g){this._dcsParser.put(s,h,E),h=E-1;break}break;case 14:if(a=this._dcsParser.unhook(l!==24&&l!==26),a)return this._preserveStack(6,[],0,v,h),a;l===27&&(v|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(let E=h+1;;E++)if(E>=t||(l=s[E])<32||l>127&&l<g){this._oscParser.put(s,h,E),h=E-1;break}break;case 6:if(a=this._oscParser.end(l!==24&&l!==26),a)return this._preserveStack(5,[],0,v,h),a;l===27&&(v|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&v}}}r.EscapeSequenceParser=u},6242:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OscHandler=r.OscParser=void 0;const c=o(5770),_=o(482),n=[];r.OscParser=class{constructor(){this._state=0,this._active=n,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(d,p){this._handlers[d]===void 0&&(this._handlers[d]=[]);const g=this._handlers[d];return g.push(p),{dispose:()=>{const u=g.indexOf(p);u!==-1&&g.splice(u,1)}}}clearHandler(d){this._handlers[d]&&delete this._handlers[d]}setHandlerFallback(d){this._handlerFb=d}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=n}reset(){if(this._state===2)for(let d=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;d>=0;--d)this._active[d].end(!1);this._stack.paused=!1,this._active=n,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||n,this._active.length)for(let d=this._active.length-1;d>=0;d--)this._active[d].start();else this._handlerFb(this._id,"START")}_put(d,p,g){if(this._active.length)for(let u=this._active.length-1;u>=0;u--)this._active[u].put(d,p,g);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(d,p,g))}start(){this.reset(),this._state=1}put(d,p,g){if(this._state!==3){if(this._state===1)for(;p<g;){const u=d[p++];if(u===59){this._state=2,this._start();break}if(u<48||57<u)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+u-48}this._state===2&&g-p>0&&this._put(d,p,g)}}end(d,p=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let g=!1,u=this._active.length-1,e=!1;if(this._stack.paused&&(u=this._stack.loopPosition-1,g=p,e=this._stack.fallThrough,this._stack.paused=!1),!e&&g===!1){for(;u>=0&&(g=this._active[u].end(d),g!==!0);u--)if(g instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=u,this._stack.fallThrough=!1,g;u--}for(;u>=0;u--)if(g=this._active[u].end(!1),g instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=u,this._stack.fallThrough=!0,g}else this._handlerFb(this._id,"END",d);this._active=n,this._id=-1,this._state=0}}},r.OscHandler=class{constructor(d){this._handler=d,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(d,p,g){this._hitLimit||(this._data+=(0,_.utf32ToString)(d,p,g),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(d){let p=!1;if(this._hitLimit)p=!1;else if(d&&(p=this._handler(this._data),p instanceof Promise))return p.then((g=>(this._data="",this._hitLimit=!1,g)));return this._data="",this._hitLimit=!1,p}}},8742:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Params=void 0;const o=2147483647;class c{static fromArray(n){const d=new c;if(!n.length)return d;for(let p=Array.isArray(n[0])?1:0;p<n.length;++p){const g=n[p];if(Array.isArray(g))for(let u=0;u<g.length;++u)d.addSubParam(g[u]);else d.addParam(g)}return d}constructor(n=32,d=32){if(this.maxLength=n,this.maxSubParamsLength=d,d>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(n),this.length=0,this._subParams=new Int32Array(d),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(n),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const n=new c(this.maxLength,this.maxSubParamsLength);return n.params.set(this.params),n.length=this.length,n._subParams.set(this._subParams),n._subParamsLength=this._subParamsLength,n._subParamsIdx.set(this._subParamsIdx),n._rejectDigits=this._rejectDigits,n._rejectSubDigits=this._rejectSubDigits,n._digitIsSub=this._digitIsSub,n}toArray(){const n=[];for(let d=0;d<this.length;++d){n.push(this.params[d]);const p=this._subParamsIdx[d]>>8,g=255&this._subParamsIdx[d];g-p>0&&n.push(Array.prototype.slice.call(this._subParams,p,g))}return n}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(n){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(n<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=n>o?o:n}}addSubParam(n){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(n<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=n>o?o:n,this._subParamsIdx[this.length-1]++}}hasSubParams(n){return(255&this._subParamsIdx[n])-(this._subParamsIdx[n]>>8)>0}getSubParams(n){const d=this._subParamsIdx[n]>>8,p=255&this._subParamsIdx[n];return p-d>0?this._subParams.subarray(d,p):null}getSubParamsAll(){const n={};for(let d=0;d<this.length;++d){const p=this._subParamsIdx[d]>>8,g=255&this._subParamsIdx[d];g-p>0&&(n[d]=this._subParams.slice(p,g))}return n}addDigit(n){let d;if(this._rejectDigits||!(d=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const p=this._digitIsSub?this._subParams:this.params,g=p[d-1];p[d-1]=~g?Math.min(10*g+n,o):n}}r.Params=c},5741:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.AddonManager=void 0,r.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let o=this._addons.length-1;o>=0;o--)this._addons[o].instance.dispose()}loadAddon(o,c){const _={instance:c,dispose:c.dispose,isDisposed:!1};this._addons.push(_),c.dispose=()=>this._wrappedAddonDispose(_),c.activate(o)}_wrappedAddonDispose(o){if(o.isDisposed)return;let c=-1;for(let _=0;_<this._addons.length;_++)if(this._addons[_]===o){c=_;break}if(c===-1)throw new Error("Could not dispose an addon that has not been loaded");o.isDisposed=!0,o.dispose.apply(o.instance),this._addons.splice(c,1)}}},8771:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferApiView=void 0;const c=o(3785),_=o(511);r.BufferApiView=class{constructor(n,d){this._buffer=n,this.type=d}init(n){return this._buffer=n,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(n){const d=this._buffer.lines.get(n);if(d)return new c.BufferLineApiView(d)}getNullCell(){return new _.CellData}}},3785:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLineApiView=void 0;const c=o(511);r.BufferLineApiView=class{constructor(_){this._line=_}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(_,n){if(!(_<0||_>=this._line.length))return n?(this._line.loadCell(_,n),n):this._line.loadCell(_,new c.CellData)}translateToString(_,n,d){return this._line.translateToString(_,n,d)}}},8285:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferNamespaceApi=void 0;const c=o(8771),_=o(8460),n=o(844);class d extends n.Disposable{constructor(g){super(),this._core=g,this._onBufferChange=this.register(new _.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new c.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new c.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}r.BufferNamespaceApi=d},7975:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ParserApi=void 0,r.ParserApi=class{constructor(o){this._core=o}registerCsiHandler(o,c){return this._core.registerCsiHandler(o,(_=>c(_.toArray())))}addCsiHandler(o,c){return this.registerCsiHandler(o,c)}registerDcsHandler(o,c){return this._core.registerDcsHandler(o,((_,n)=>c(_,n.toArray())))}addDcsHandler(o,c){return this.registerDcsHandler(o,c)}registerEscHandler(o,c){return this._core.registerEscHandler(o,c)}addEscHandler(o,c){return this.registerEscHandler(o,c)}registerOscHandler(o,c){return this._core.registerOscHandler(o,c)}addOscHandler(o,c){return this.registerOscHandler(o,c)}}},7090:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeApi=void 0,r.UnicodeApi=class{constructor(o){this._core=o}register(o){this._core.unicodeService.register(o)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(o){this._core.unicodeService.activeVersion=o}}},744:function(P,r,o){var c=this&&this.__decorate||function(e,s,t,i){var a,l=arguments.length,v=l<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,t,i);else for(var m=e.length-1;m>=0;m--)(a=e[m])&&(v=(l<3?a(v):l>3?a(s,t,v):a(s,t))||v);return l>3&&v&&Object.defineProperty(s,t,v),v},_=this&&this.__param||function(e,s){return function(t,i){s(t,i,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferService=r.MINIMUM_ROWS=r.MINIMUM_COLS=void 0;const n=o(8460),d=o(844),p=o(5295),g=o(2585);r.MINIMUM_COLS=2,r.MINIMUM_ROWS=1;let u=r.BufferService=class extends d.Disposable{get buffer(){return this.buffers.active}constructor(e){super(),this.isUserScrolling=!1,this._onResize=this.register(new n.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new n.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,r.MINIMUM_COLS),this.rows=Math.max(e.rawOptions.rows||0,r.MINIMUM_ROWS),this.buffers=this.register(new p.BufferSet(e,this))}resize(e,s){this.cols=e,this.rows=s,this.buffers.resize(e,s),this._onResize.fire({cols:e,rows:s})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,s=!1){const t=this.buffer;let i;i=this._cachedBlankLine,i&&i.length===this.cols&&i.getFg(0)===e.fg&&i.getBg(0)===e.bg||(i=t.getBlankLine(e,s),this._cachedBlankLine=i),i.isWrapped=s;const a=t.ybase+t.scrollTop,l=t.ybase+t.scrollBottom;if(t.scrollTop===0){const v=t.lines.isFull;l===t.lines.length-1?v?t.lines.recycle().copyFrom(i):t.lines.push(i.clone()):t.lines.splice(l+1,0,i.clone()),v?this.isUserScrolling&&(t.ydisp=Math.max(t.ydisp-1,0)):(t.ybase++,this.isUserScrolling||t.ydisp++)}else{const v=l-a+1;t.lines.shiftElements(a+1,v-1,-1),t.lines.set(l,i.clone())}this.isUserScrolling||(t.ydisp=t.ybase),this._onScroll.fire(t.ydisp)}scrollLines(e,s,t){const i=this.buffer;if(e<0){if(i.ydisp===0)return;this.isUserScrolling=!0}else e+i.ydisp>=i.ybase&&(this.isUserScrolling=!1);const a=i.ydisp;i.ydisp=Math.max(Math.min(i.ydisp+e,i.ybase),0),a!==i.ydisp&&(s||this._onScroll.fire(i.ydisp))}};r.BufferService=u=c([_(0,g.IOptionsService)],u)},7994:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CharsetService=void 0,r.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(o){this.glevel=o,this.charset=this._charsets[o]}setgCharset(o,c){this._charsets[o]=c,this.glevel===o&&(this.charset=c)}}},1753:function(P,r,o){var c=this&&this.__decorate||function(i,a,l,v){var m,h=arguments.length,f=h<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(i,a,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(f=(h<3?m(f):h>3?m(a,l,f):m(a,l))||f);return h>3&&f&&Object.defineProperty(a,l,f),f},_=this&&this.__param||function(i,a){return function(l,v){a(l,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreMouseService=void 0;const n=o(2585),d=o(8460),p=o(844),g={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:i=>i.button!==4&&i.action===1&&(i.ctrl=!1,i.alt=!1,i.shift=!1,!0)},VT200:{events:19,restrict:i=>i.action!==32},DRAG:{events:23,restrict:i=>i.action!==32||i.button!==3},ANY:{events:31,restrict:i=>!0}};function u(i,a){let l=(i.ctrl?16:0)|(i.shift?4:0)|(i.alt?8:0);return i.button===4?(l|=64,l|=i.action):(l|=3&i.button,4&i.button&&(l|=64),8&i.button&&(l|=128),i.action===32?l|=32:i.action!==0||a||(l|=3)),l}const e=String.fromCharCode,s={DEFAULT:i=>{const a=[u(i,!1)+32,i.col+32,i.row+32];return a[0]>255||a[1]>255||a[2]>255?"":`\x1B[M${e(a[0])}${e(a[1])}${e(a[2])}`},SGR:i=>{const a=i.action===0&&i.button!==4?"m":"M";return`\x1B[<${u(i,!0)};${i.col};${i.row}${a}`},SGR_PIXELS:i=>{const a=i.action===0&&i.button!==4?"m":"M";return`\x1B[<${u(i,!0)};${i.x};${i.y}${a}`}};let t=r.CoreMouseService=class extends p.Disposable{constructor(i,a){super(),this._bufferService=i,this._coreService=a,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new d.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const l of Object.keys(g))this.addProtocol(l,g[l]);for(const l of Object.keys(s))this.addEncoding(l,s[l]);this.reset()}addProtocol(i,a){this._protocols[i]=a}addEncoding(i,a){this._encodings[i]=a}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(i){if(!this._protocols[i])throw new Error(`unknown protocol "${i}"`);this._activeProtocol=i,this._onProtocolChange.fire(this._protocols[i].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(i){if(!this._encodings[i])throw new Error(`unknown encoding "${i}"`);this._activeEncoding=i}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(i){if(i.col<0||i.col>=this._bufferService.cols||i.row<0||i.row>=this._bufferService.rows||i.button===4&&i.action===32||i.button===3&&i.action!==32||i.button!==4&&(i.action===2||i.action===3)||(i.col++,i.row++,i.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,i,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(i))return!1;const a=this._encodings[this._activeEncoding](i);return a&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(a):this._coreService.triggerDataEvent(a,!0)),this._lastEvent=i,!0}explainEvents(i){return{down:!!(1&i),up:!!(2&i),drag:!!(4&i),move:!!(8&i),wheel:!!(16&i)}}_equalEvents(i,a,l){if(l){if(i.x!==a.x||i.y!==a.y)return!1}else if(i.col!==a.col||i.row!==a.row)return!1;return i.button===a.button&&i.action===a.action&&i.ctrl===a.ctrl&&i.alt===a.alt&&i.shift===a.shift}};r.CoreMouseService=t=c([_(0,n.IBufferService),_(1,n.ICoreService)],t)},6975:function(P,r,o){var c=this&&this.__decorate||function(t,i,a,l){var v,m=arguments.length,h=m<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,a):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(t,i,a,l);else for(var f=t.length-1;f>=0;f--)(v=t[f])&&(h=(m<3?v(h):m>3?v(i,a,h):v(i,a))||h);return m>3&&h&&Object.defineProperty(i,a,h),h},_=this&&this.__param||function(t,i){return function(a,l){i(a,l,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreService=void 0;const n=o(1439),d=o(8460),p=o(844),g=o(2585),u=Object.freeze({insertMode:!1}),e=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let s=r.CoreService=class extends p.Disposable{constructor(t,i,a){super(),this._bufferService=t,this._logService=i,this._optionsService=a,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new d.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new d.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new d.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new d.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,n.clone)(u),this.decPrivateModes=(0,n.clone)(e)}reset(){this.modes=(0,n.clone)(u),this.decPrivateModes=(0,n.clone)(e)}triggerDataEvent(t,i=!1){if(this._optionsService.rawOptions.disableStdin)return;const a=this._bufferService.buffer;i&&this._optionsService.rawOptions.scrollOnUserInput&&a.ybase!==a.ydisp&&this._onRequestScrollToBottom.fire(),i&&this._onUserInput.fire(),this._logService.debug(`sending data "${t}"`,(()=>t.split("").map((l=>l.charCodeAt(0))))),this._onData.fire(t)}triggerBinaryEvent(t){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${t}"`,(()=>t.split("").map((i=>i.charCodeAt(0))))),this._onBinary.fire(t))}};r.CoreService=s=c([_(0,g.IBufferService),_(1,g.ILogService),_(2,g.IOptionsService)],s)},9074:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DecorationService=void 0;const c=o(8055),_=o(8460),n=o(844),d=o(6106);let p=0,g=0;class u extends n.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new d.SortedList((t=>t==null?void 0:t.marker.line)),this._onDecorationRegistered=this.register(new _.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new _.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,n.toDisposable)((()=>this.reset())))}registerDecoration(t){if(t.marker.isDisposed)return;const i=new e(t);if(i){const a=i.marker.onDispose((()=>i.dispose()));i.onDispose((()=>{i&&(this._decorations.delete(i)&&this._onDecorationRemoved.fire(i),a.dispose())})),this._decorations.insert(i),this._onDecorationRegistered.fire(i)}return i}reset(){for(const t of this._decorations.values())t.dispose();this._decorations.clear()}*getDecorationsAtCell(t,i,a){var l,v,m;let h=0,f=0;for(const b of this._decorations.getKeyIterator(i))h=(l=b.options.x)!==null&&l!==void 0?l:0,f=h+((v=b.options.width)!==null&&v!==void 0?v:1),t>=h&&t<f&&(!a||((m=b.options.layer)!==null&&m!==void 0?m:"bottom")===a)&&(yield b)}forEachDecorationAtCell(t,i,a,l){this._decorations.forEachByKey(i,(v=>{var m,h,f;p=(m=v.options.x)!==null&&m!==void 0?m:0,g=p+((h=v.options.width)!==null&&h!==void 0?h:1),t>=p&&t<g&&(!a||((f=v.options.layer)!==null&&f!==void 0?f:"bottom")===a)&&l(v)}))}}r.DecorationService=u;class e extends n.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=c.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=c.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(t){super(),this.options=t,this.onRenderEmitter=this.register(new _.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=t.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.InstantiationService=r.ServiceCollection=void 0;const c=o(2585),_=o(8343);class n{constructor(...p){this._entries=new Map;for(const[g,u]of p)this.set(g,u)}set(p,g){const u=this._entries.get(p);return this._entries.set(p,g),u}forEach(p){for(const[g,u]of this._entries.entries())p(g,u)}has(p){return this._entries.has(p)}get(p){return this._entries.get(p)}}r.ServiceCollection=n,r.InstantiationService=class{constructor(){this._services=new n,this._services.set(c.IInstantiationService,this)}setService(d,p){this._services.set(d,p)}getService(d){return this._services.get(d)}createInstance(d,...p){const g=(0,_.getServiceDependencies)(d).sort(((s,t)=>s.index-t.index)),u=[];for(const s of g){const t=this._services.get(s.id);if(!t)throw new Error(`[createInstance] ${d.name} depends on UNKNOWN service ${s.id}.`);u.push(t)}const e=g.length>0?g[0].index:p.length;if(p.length!==e)throw new Error(`[createInstance] First service dependency of ${d.name} at position ${e+1} conflicts with ${p.length} static arguments`);return new d(...p,...u)}}},7866:function(P,r,o){var c=this&&this.__decorate||function(e,s,t,i){var a,l=arguments.length,v=l<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,t,i);else for(var m=e.length-1;m>=0;m--)(a=e[m])&&(v=(l<3?a(v):l>3?a(s,t,v):a(s,t))||v);return l>3&&v&&Object.defineProperty(s,t,v),v},_=this&&this.__param||function(e,s){return function(t,i){s(t,i,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.traceCall=r.setTraceLogger=r.LogService=void 0;const n=o(844),d=o(2585),p={trace:d.LogLevelEnum.TRACE,debug:d.LogLevelEnum.DEBUG,info:d.LogLevelEnum.INFO,warn:d.LogLevelEnum.WARN,error:d.LogLevelEnum.ERROR,off:d.LogLevelEnum.OFF};let g,u=r.LogService=class extends n.Disposable{get logLevel(){return this._logLevel}constructor(e){super(),this._optionsService=e,this._logLevel=d.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),g=this}_updateLogLevel(){this._logLevel=p[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let s=0;s<e.length;s++)typeof e[s]=="function"&&(e[s]=e[s]())}_log(e,s,t){this._evalLazyOptionalParams(t),e.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+s,...t)}trace(e,...s){var t,i;this._logLevel<=d.LogLevelEnum.TRACE&&this._log((i=(t=this._optionsService.options.logger)===null||t===void 0?void 0:t.trace.bind(this._optionsService.options.logger))!==null&&i!==void 0?i:console.log,e,s)}debug(e,...s){var t,i;this._logLevel<=d.LogLevelEnum.DEBUG&&this._log((i=(t=this._optionsService.options.logger)===null||t===void 0?void 0:t.debug.bind(this._optionsService.options.logger))!==null&&i!==void 0?i:console.log,e,s)}info(e,...s){var t,i;this._logLevel<=d.LogLevelEnum.INFO&&this._log((i=(t=this._optionsService.options.logger)===null||t===void 0?void 0:t.info.bind(this._optionsService.options.logger))!==null&&i!==void 0?i:console.info,e,s)}warn(e,...s){var t,i;this._logLevel<=d.LogLevelEnum.WARN&&this._log((i=(t=this._optionsService.options.logger)===null||t===void 0?void 0:t.warn.bind(this._optionsService.options.logger))!==null&&i!==void 0?i:console.warn,e,s)}error(e,...s){var t,i;this._logLevel<=d.LogLevelEnum.ERROR&&this._log((i=(t=this._optionsService.options.logger)===null||t===void 0?void 0:t.error.bind(this._optionsService.options.logger))!==null&&i!==void 0?i:console.error,e,s)}};r.LogService=u=c([_(0,d.IOptionsService)],u),r.setTraceLogger=function(e){g=e},r.traceCall=function(e,s,t){if(typeof t.value!="function")throw new Error("not supported");const i=t.value;t.value=function(...a){if(g.logLevel!==d.LogLevelEnum.TRACE)return i.apply(this,a);g.trace(`GlyphRenderer#${i.name}(${a.map((v=>JSON.stringify(v))).join(", ")})`);const l=i.apply(this,a);return g.trace(`GlyphRenderer#${i.name} return`,l),l}}},7302:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OptionsService=r.DEFAULT_OPTIONS=void 0;const c=o(8460),_=o(844),n=o(6114);r.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:n.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const d=["normal","bold","100","200","300","400","500","600","700","800","900"];class p extends _.Disposable{constructor(u){super(),this._onOptionChange=this.register(new c.EventEmitter),this.onOptionChange=this._onOptionChange.event;const e=Object.assign({},r.DEFAULT_OPTIONS);for(const s in u)if(s in e)try{const t=u[s];e[s]=this._sanitizeAndValidateOption(s,t)}catch(t){console.error(t)}this.rawOptions=e,this.options=Object.assign({},e),this._setupOptions()}onSpecificOptionChange(u,e){return this.onOptionChange((s=>{s===u&&e(this.rawOptions[u])}))}onMultipleOptionChange(u,e){return this.onOptionChange((s=>{u.indexOf(s)!==-1&&e()}))}_setupOptions(){const u=s=>{if(!(s in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${s}"`);return this.rawOptions[s]},e=(s,t)=>{if(!(s in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${s}"`);t=this._sanitizeAndValidateOption(s,t),this.rawOptions[s]!==t&&(this.rawOptions[s]=t,this._onOptionChange.fire(s))};for(const s in this.rawOptions){const t={get:u.bind(this,s),set:e.bind(this,s)};Object.defineProperty(this.options,s,t)}}_sanitizeAndValidateOption(u,e){switch(u){case"cursorStyle":if(e||(e=r.DEFAULT_OPTIONS[u]),!(function(s){return s==="block"||s==="underline"||s==="bar"})(e))throw new Error(`"${e}" is not a valid value for ${u}`);break;case"wordSeparator":e||(e=r.DEFAULT_OPTIONS[u]);break;case"fontWeight":case"fontWeightBold":if(typeof e=="number"&&1<=e&&e<=1e3)break;e=d.includes(e)?e:r.DEFAULT_OPTIONS[u];break;case"cursorWidth":e=Math.floor(e);case"lineHeight":case"tabStopWidth":if(e<1)throw new Error(`${u} cannot be less than 1, value: ${e}`);break;case"minimumContrastRatio":e=Math.max(1,Math.min(21,Math.round(10*e)/10));break;case"scrollback":if((e=Math.min(e,4294967295))<0)throw new Error(`${u} cannot be less than 0, value: ${e}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(e<=0)throw new Error(`${u} cannot be less than or equal to 0, value: ${e}`);break;case"rows":case"cols":if(!e&&e!==0)throw new Error(`${u} must be numeric, value: ${e}`);break;case"windowsPty":e=e??{}}return e}}r.OptionsService=p},2660:function(P,r,o){var c=this&&this.__decorate||function(p,g,u,e){var s,t=arguments.length,i=t<3?g:e===null?e=Object.getOwnPropertyDescriptor(g,u):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(p,g,u,e);else for(var a=p.length-1;a>=0;a--)(s=p[a])&&(i=(t<3?s(i):t>3?s(g,u,i):s(g,u))||i);return t>3&&i&&Object.defineProperty(g,u,i),i},_=this&&this.__param||function(p,g){return function(u,e){g(u,e,p)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkService=void 0;const n=o(2585);let d=r.OscLinkService=class{constructor(p){this._bufferService=p,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(p){const g=this._bufferService.buffer;if(p.id===void 0){const a=g.addMarker(g.ybase+g.y),l={data:p,id:this._nextId++,lines:[a]};return a.onDispose((()=>this._removeMarkerFromLink(l,a))),this._dataByLinkId.set(l.id,l),l.id}const u=p,e=this._getEntryIdKey(u),s=this._entriesWithId.get(e);if(s)return this.addLineToLink(s.id,g.ybase+g.y),s.id;const t=g.addMarker(g.ybase+g.y),i={id:this._nextId++,key:this._getEntryIdKey(u),data:u,lines:[t]};return t.onDispose((()=>this._removeMarkerFromLink(i,t))),this._entriesWithId.set(i.key,i),this._dataByLinkId.set(i.id,i),i.id}addLineToLink(p,g){const u=this._dataByLinkId.get(p);if(u&&u.lines.every((e=>e.line!==g))){const e=this._bufferService.buffer.addMarker(g);u.lines.push(e),e.onDispose((()=>this._removeMarkerFromLink(u,e)))}}getLinkData(p){var g;return(g=this._dataByLinkId.get(p))===null||g===void 0?void 0:g.data}_getEntryIdKey(p){return`${p.id};;${p.uri}`}_removeMarkerFromLink(p,g){const u=p.lines.indexOf(g);u!==-1&&(p.lines.splice(u,1),p.lines.length===0&&(p.data.id!==void 0&&this._entriesWithId.delete(p.key),this._dataByLinkId.delete(p.id)))}};r.OscLinkService=d=c([_(0,n.IBufferService)],d)},8343:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createDecorator=r.getServiceDependencies=r.serviceRegistry=void 0;const o="di$target",c="di$dependencies";r.serviceRegistry=new Map,r.getServiceDependencies=function(_){return _[c]||[]},r.createDecorator=function(_){if(r.serviceRegistry.has(_))return r.serviceRegistry.get(_);const n=function(d,p,g){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(u,e,s){e[o]===e?e[c].push({id:u,index:s}):(e[c]=[{id:u,index:s}],e[o]=e)})(n,d,g)};return n.toString=()=>_,r.serviceRegistry.set(_,n),n}},2585:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IDecorationService=r.IUnicodeService=r.IOscLinkService=r.IOptionsService=r.ILogService=r.LogLevelEnum=r.IInstantiationService=r.ICharsetService=r.ICoreService=r.ICoreMouseService=r.IBufferService=void 0;const c=o(8343);var _;r.IBufferService=(0,c.createDecorator)("BufferService"),r.ICoreMouseService=(0,c.createDecorator)("CoreMouseService"),r.ICoreService=(0,c.createDecorator)("CoreService"),r.ICharsetService=(0,c.createDecorator)("CharsetService"),r.IInstantiationService=(0,c.createDecorator)("InstantiationService"),(function(n){n[n.TRACE=0]="TRACE",n[n.DEBUG=1]="DEBUG",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.OFF=5]="OFF"})(_||(r.LogLevelEnum=_={})),r.ILogService=(0,c.createDecorator)("LogService"),r.IOptionsService=(0,c.createDecorator)("OptionsService"),r.IOscLinkService=(0,c.createDecorator)("OscLinkService"),r.IUnicodeService=(0,c.createDecorator)("UnicodeService"),r.IDecorationService=(0,c.createDecorator)("DecorationService")},1480:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeService=void 0;const c=o(8460),_=o(225);r.UnicodeService=class{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter,this.onChange=this._onChange.event;const n=new _.UnicodeV6;this.register(n),this._active=n.version,this._activeProvider=n}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(n){if(!this._providers[n])throw new Error(`unknown Unicode version "${n}"`);this._active=n,this._activeProvider=this._providers[n],this._onChange.fire(n)}register(n){this._providers[n.version]=n}wcwidth(n){return this._activeProvider.wcwidth(n)}getStringCellWidth(n){let d=0;const p=n.length;for(let g=0;g<p;++g){let u=n.charCodeAt(g);if(55296<=u&&u<=56319){if(++g>=p)return d+this.wcwidth(u);const e=n.charCodeAt(g);56320<=e&&e<=57343?u=1024*(u-55296)+e-56320+65536:d+=this.wcwidth(e)}d+=this.wcwidth(u)}return d}}}},J={};function q(P){var r=J[P];if(r!==void 0)return r.exports;var o=J[P]={exports:{}};return K[P].call(o.exports,o,o.exports,q),o.exports}var Y={};return(()=>{var P=Y;Object.defineProperty(P,"__esModule",{value:!0}),P.Terminal=void 0;const r=q(9042),o=q(3236),c=q(844),_=q(5741),n=q(8285),d=q(7975),p=q(7090),g=["cols","rows"];class u extends c.Disposable{constructor(s){super(),this._core=this.register(new o.Terminal(s)),this._addonManager=this.register(new _.AddonManager),this._publicOptions=Object.assign({},this._core.options);const t=a=>this._core.options[a],i=(a,l)=>{this._checkReadonlyOptions(a),this._core.options[a]=l};for(const a in this._core.options){const l={get:t.bind(this,a),set:i.bind(this,a)};Object.defineProperty(this._publicOptions,a,l)}}_checkReadonlyOptions(s){if(g.includes(s))throw new Error(`Option "${s}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new d.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new p.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new n.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const s=this._core.coreService.decPrivateModes;let 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:s.applicationCursorKeys,applicationKeypadMode:s.applicationKeypad,bracketedPasteMode:s.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:s.origin,reverseWraparoundMode:s.reverseWraparound,sendFocusMode:s.sendFocus,wraparoundMode:s.wraparound}}get options(){return this._publicOptions}set options(s){for(const t in s)this._publicOptions[t]=s[t]}blur(){this._core.blur()}focus(){this._core.focus()}resize(s,t){this._verifyIntegers(s,t),this._core.resize(s,t)}open(s){this._core.open(s)}attachCustomKeyEventHandler(s){this._core.attachCustomKeyEventHandler(s)}registerLinkProvider(s){return this._core.registerLinkProvider(s)}registerCharacterJoiner(s){return this._checkProposedApi(),this._core.registerCharacterJoiner(s)}deregisterCharacterJoiner(s){this._checkProposedApi(),this._core.deregisterCharacterJoiner(s)}registerMarker(s=0){return this._verifyIntegers(s),this._core.registerMarker(s)}registerDecoration(s){var t,i,a;return this._checkProposedApi(),this._verifyPositiveIntegers((t=s.x)!==null&&t!==void 0?t:0,(i=s.width)!==null&&i!==void 0?i:0,(a=s.height)!==null&&a!==void 0?a:0),this._core.registerDecoration(s)}hasSelection(){return this._core.hasSelection()}select(s,t,i){this._verifyIntegers(s,t,i),this._core.select(s,t,i)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(s,t){this._verifyIntegers(s,t),this._core.selectLines(s,t)}dispose(){super.dispose()}scrollLines(s){this._verifyIntegers(s),this._core.scrollLines(s)}scrollPages(s){this._verifyIntegers(s),this._core.scrollPages(s)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(s){this._verifyIntegers(s),this._core.scrollToLine(s)}clear(){this._core.clear()}write(s,t){this._core.write(s,t)}writeln(s,t){this._core.write(s),this._core.write(`\r
|
|
19
|
-
`,t)}paste(s){this._core.paste(s)}refresh(s,t){this._verifyIntegers(s,t),this._core.refresh(s,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(s){this._addonManager.loadAddon(this,s)}static get strings(){return r}_verifyIntegers(...s){for(const t of s)if(t===1/0||isNaN(t)||t%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...s){for(const t of s)if(t&&(t===1/0||isNaN(t)||t%1!=0||t<0))throw new Error("This API only accepts positive integers")}}P.Terminal=u})(),Y})()))})(me)),me.exports}var Ae=xe(),Se={exports:{}},be;function Be(){return be||(be=1,(function(te,j){(function(K,J){te.exports=J()})(self,(()=>(()=>{var K={};return(()=>{var J=K;Object.defineProperty(J,"__esModule",{value:!0}),J.FitAddon=void 0,J.FitAddon=class{activate(q){this._terminal=q}dispose(){}fit(){const q=this.proposeDimensions();if(!q||!this._terminal||isNaN(q.cols)||isNaN(q.rows))return;const Y=this._terminal._core;this._terminal.rows===q.rows&&this._terminal.cols===q.cols||(Y._renderService.clear(),this._terminal.resize(q.cols,q.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const q=this._terminal._core,Y=q._renderService.dimensions;if(Y.css.cell.width===0||Y.css.cell.height===0)return;const P=this._terminal.options.scrollback===0?0:q.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),c=Math.max(0,parseInt(r.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),n=o-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),d=c-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-P;return{cols:Math.max(2,Math.floor(d/Y.css.cell.width)),rows:Math.max(1,Math.floor(n/Y.css.cell.height))}}}})(),K})()))})(Se)),Se.exports}var Te=Be();const Me=128;class Oe{constructor(j){se(this,"ws",null);se(this,"reconnectAttempts",0);se(this,"maxReconnectAttempts",10);se(this,"reconnectTimer",null);se(this,"disposed",!1);se(this,"authenticated",!1);se(this,"sendBuffer",[]);se(this,"options");this.options=j}getLocation(){return window.location}connect(){var Y,P;if(this.disposed)return;const{taskId:j}=this.options,K=this.getLocation(),q=`${K.protocol==="https:"?"wss:":"ws:"}//${K.host}/ws/pty?taskId=${j}`;(P=(Y=this.options).onStatus)==null||P.call(Y,"connecting"),this.ws=new WebSocket(q),this.authenticated=!1,this.ws.onopen=()=>{var r;this.reconnectAttempts=0,(r=this.ws)==null||r.send(JSON.stringify({type:"auth",token:this.options.accessToken,channelToken:this.options.channelToken}))},this.ws.onmessage=r=>{var o,c,_,n;if(typeof r.data=="string")try{const d=JSON.parse(r.data);d.type==="auth_ok"&&(this.authenticated=!0,this.flushBuffer(),(c=(o=this.options).onStatus)==null||c.call(o,"connected")),d.type==="data"&&this.options.onData&&this.options.onData(d.data),(n=(_=this.options).onMessage)==null||n.call(_,d)}catch{}},this.ws.onclose=()=>{var r,o;this.authenticated=!1,(o=(r=this.options).onStatus)==null||o.call(r,"disconnected"),this.scheduleReconnect()},this.ws.onerror=()=>{var r;(r=this.ws)==null||r.close()}}send(j){var J;const K=JSON.stringify(j);if(((J=this.ws)==null?void 0:J.readyState)===WebSocket.OPEN&&this.authenticated){this.ws.send(K);return}this.ws&&this.ws.readyState!==WebSocket.CLOSED&&(this.sendBuffer.length<Me?this.sendBuffer.push(K):console.warn("[PtyWebSocket] send buffer full, dropping message"))}sendData(j){this.send({type:"data",data:j})}sendResize(j,K){this.send({type:"resize",cols:j,rows:K})}requestTakeover(j){this.send({type:"request_takeover",sessionId:j})}releaseTakeover(){this.send({type:"release_takeover"})}updateAuth(j,K){this.options.accessToken=j,this.options.channelToken=K}scheduleReconnect(){if(this.disposed||this.reconnectAttempts>=this.maxReconnectAttempts)return;const j=Math.min(1e3*2**this.reconnectAttempts,3e4);this.reconnectAttempts++,this.reconnectTimer=setTimeout(async()=>{if(!this.disposed){if(this.options.getAccessToken){const K=this.options.getAccessToken();K&&(this.options.accessToken=K)}if(this.options.getChannelToken)try{this.options.channelToken=await this.options.getChannelToken()}catch{if(this.reconnectAttempts>=this.maxReconnectAttempts){console.error("[PtyWebSocket] Max reconnect attempts reached after channel token failure");return}this.scheduleReconnect();return}this.connect()}},j)}dispose(){var j;this.disposed=!0,this.authenticated=!1,this.sendBuffer.length=0,this.reconnectTimer&&clearTimeout(this.reconnectTimer),(j=this.ws)==null||j.close(),this.ws=null}flushBuffer(){if(!(!this.ws||this.ws.readyState!==WebSocket.OPEN||!this.authenticated)){for(const j of this.sendBuffer)this.ws.send(j);this.sendBuffer.length=0}}}const We=X.forwardRef(function({taskId:j,sessionId:K,taskFinished:J,onStatusChange:q,onTakeoverChange:Y},P){const r=X.useRef(null),o=X.useRef(null),c=X.useRef(null),_=X.useRef(null),[n,d]=X.useState("observer"),[p,g]=X.useState(!1),[u,e]=X.useState(0),s=De(l=>l.accessToken),t=X.useRef(s);X.useEffect(()=>{t.current=s},[s]);const i=X.useRef(q);X.useEffect(()=>{i.current=q},[q]),X.useImperativeHandle(P,()=>({requestTakeover(){var l;(l=_.current)==null||l.send({type:"force_takeover"}),g(!0)},releaseTakeover(){var l;(l=_.current)==null||l.releaseTakeover(),d("observer")}}),[]),X.useEffect(()=>{const l=u>0&&n==="observer"?"denied":p?"requesting":n==="writer"?"manual":"auto";Y==null||Y(l)},[n,p,u,Y]);const a=X.useCallback(async()=>(await Re.post(`web/tasks/${j}/pty-token`).json()).channelToken,[j]);return X.useEffect(()=>{if(!r.current)return;const v=window.innerWidth<768?11:13,m=new Ae.Terminal({cursorBlink:!0,fontSize:v,fontFamily:'"JetBrains Mono", "Fira Code", "Cascadia Code", Menlo, monospace',theme:{background:"#0c0c0c",foreground:"#d4d4d4",cursor:"#d4d4d4"},scrollback:5e3,convertEol:!0}),h=new Te.FitAddon;m.loadAddon(h);const f=r.current;requestAnimationFrame(()=>{if(!f.isConnected)return;m.open(f),o.current=m,c.current=h;const E=f.querySelector(".xterm-viewport");E&&(E.style.overscrollBehavior="contain",E.addEventListener("scroll",M=>{M.stopPropagation()},{passive:!0}));const x=f.querySelector(".xterm-helper-textarea");if(x){const M=x.focus.bind(x);x.focus=O=>{M({...O,preventScroll:!0})}}const A=(M=0)=>{requestAnimationFrame(()=>{if(c.current)try{c.current.fit(),M<5&&(m.cols<=1||m.rows<=1)&&setTimeout(()=>A(M+1),100)}catch{M<5&&setTimeout(()=>A(M+1),100)}})};A()});function b(){const x=window.innerWidth<768?11:13;if(m.options.fontSize!==x){m.options.fontSize=x;try{h.fit()}catch{}}}window.addEventListener("resize",b);let L;const y=new ResizeObserver(()=>{clearTimeout(L),L=setTimeout(()=>{var E;try{(E=c.current)==null||E.fit()}catch{}},100)});return y.observe(r.current),()=>{clearTimeout(L),window.removeEventListener("resize",b),y.disconnect(),m.dispose(),o.current=null,c.current=null}},[]),X.useEffect(()=>{if(!t.current||J)return;let l=!1,v=!1,m,h;async function f(){try{const b=await a();if(l)return;const L=new Oe({taskId:j,accessToken:t.current,channelToken:b,getChannelToken:a,onData:y=>{var E;(E=o.current)==null||E.write(y),v||(v=!0,m=setTimeout(()=>{if(l)return;const x=c.current;if(x)try{const A=x.proposeDimensions();A&&A.cols>1&&(L.sendResize(A.cols-1,A.rows),h=setTimeout(()=>{l||L.sendResize(A.cols,A.rows)},100))}catch{}},500))},onMessage:y=>{switch(y.type){case"takeover_granted":d("writer"),g(!1),e(0);break;case"takeover_denied":g(!1),e(x=>x+1);break;case"writer_revoked":d("observer"),e(0);break}},onStatus:y=>{var E;if(l||(E=i.current)==null||E.call(i,y),y==="connected"){const x=o.current;x&&L.sendResize(x.cols,x.rows)}}});_.current=L,L.connect()}catch{}}return f(),()=>{var b;l=!0,clearTimeout(m),clearTimeout(h),(b=_.current)==null||b.dispose(),_.current=null}},[j,J,a]),X.useEffect(()=>{const l=o.current;if(!l)return;const v=l.onData(h=>{const f=_.current;f&&(n==="writer"?f.sendData(h):!p&&K&&(g(!0),f.requestTakeover(K)))}),m=l.onResize(({cols:h,rows:f})=>{var b;(b=_.current)==null||b.sendResize(h,f)});return()=>{v.dispose(),m.dispose()}},[n,p,K]),ue.jsxs("div",{className:"relative h-full w-full overflow-hidden",style:{overscrollBehavior:"contain"},children:[ue.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none select-none",children:ue.jsx("span",{className:"text-xs text-[#555] italic",children:"// agent is working — terminal output will appear when new content is generated"})}),ue.jsx("div",{ref:r,className:"relative z-[1] h-full w-full bg-[#0c0c0c] p-1",style:{touchAction:"none",overscrollBehavior:"contain"}})]})});export{He as C,Fe as H,We as P};
|
|
19
|
+
`,t)}paste(s){this._core.paste(s)}refresh(s,t){this._verifyIntegers(s,t),this._core.refresh(s,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(s){this._addonManager.loadAddon(this,s)}static get strings(){return r}_verifyIntegers(...s){for(const t of s)if(t===1/0||isNaN(t)||t%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...s){for(const t of s)if(t&&(t===1/0||isNaN(t)||t%1!=0||t<0))throw new Error("This API only accepts positive integers")}}P.Terminal=u})(),Y})()))})(me)),me.exports}var Ae=xe(),Se={exports:{}},be;function Be(){return be||(be=1,(function(te,j){(function(K,J){te.exports=J()})(self,(()=>(()=>{var K={};return(()=>{var J=K;Object.defineProperty(J,"__esModule",{value:!0}),J.FitAddon=void 0,J.FitAddon=class{activate(q){this._terminal=q}dispose(){}fit(){const q=this.proposeDimensions();if(!q||!this._terminal||isNaN(q.cols)||isNaN(q.rows))return;const Y=this._terminal._core;this._terminal.rows===q.rows&&this._terminal.cols===q.cols||(Y._renderService.clear(),this._terminal.resize(q.cols,q.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const q=this._terminal._core,Y=q._renderService.dimensions;if(Y.css.cell.width===0||Y.css.cell.height===0)return;const P=this._terminal.options.scrollback===0?0:q.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),c=Math.max(0,parseInt(r.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),n=o-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),d=c-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-P;return{cols:Math.max(2,Math.floor(d/Y.css.cell.width)),rows:Math.max(1,Math.floor(n/Y.css.cell.height))}}}})(),K})()))})(Se)),Se.exports}var Te=Be();const Me=128;class Oe{constructor(j){se(this,"ws",null);se(this,"reconnectAttempts",0);se(this,"maxReconnectAttempts",10);se(this,"reconnectTimer",null);se(this,"disposed",!1);se(this,"authenticated",!1);se(this,"sendBuffer",[]);se(this,"options");this.options=j}getLocation(){return window.location}connect(){var Y,P;if(this.disposed)return;const{taskId:j}=this.options,K=this.getLocation(),q=`${K.protocol==="https:"?"wss:":"ws:"}//${K.host}/ws/pty?taskId=${j}`;(P=(Y=this.options).onStatus)==null||P.call(Y,"connecting"),this.ws=new WebSocket(q),this.authenticated=!1,this.ws.onopen=()=>{var r;this.reconnectAttempts=0,(r=this.ws)==null||r.send(JSON.stringify({type:"auth",token:this.options.accessToken,channelToken:this.options.channelToken}))},this.ws.onmessage=r=>{var o,c,_,n;if(typeof r.data=="string")try{const d=JSON.parse(r.data);d.type==="auth_ok"&&(this.authenticated=!0,this.flushBuffer(),(c=(o=this.options).onStatus)==null||c.call(o,"connected")),d.type==="data"&&this.options.onData&&this.options.onData(d.data),(n=(_=this.options).onMessage)==null||n.call(_,d)}catch{}},this.ws.onclose=()=>{var r,o;this.authenticated=!1,(o=(r=this.options).onStatus)==null||o.call(r,"disconnected"),this.scheduleReconnect()},this.ws.onerror=()=>{var r;(r=this.ws)==null||r.close()}}send(j){var J;const K=JSON.stringify(j);if(((J=this.ws)==null?void 0:J.readyState)===WebSocket.OPEN&&this.authenticated){this.ws.send(K);return}this.ws&&this.ws.readyState!==WebSocket.CLOSED&&(this.sendBuffer.length<Me?this.sendBuffer.push(K):console.warn("[PtyWebSocket] send buffer full, dropping message"))}sendData(j){this.send({type:"data",data:j})}sendResize(j,K){this.send({type:"resize",cols:j,rows:K})}requestTakeover(j){this.send({type:"request_takeover",sessionId:j})}releaseTakeover(){this.send({type:"release_takeover"})}updateAuth(j,K){this.options.accessToken=j,this.options.channelToken=K}scheduleReconnect(){if(this.disposed||this.reconnectAttempts>=this.maxReconnectAttempts)return;const j=Math.min(1e3*2**this.reconnectAttempts,3e4);this.reconnectAttempts++,this.reconnectTimer=setTimeout(async()=>{if(!this.disposed){if(this.options.getAccessToken){const K=this.options.getAccessToken();K&&(this.options.accessToken=K)}if(this.options.getChannelToken)try{this.options.channelToken=await this.options.getChannelToken()}catch{if(this.reconnectAttempts>=this.maxReconnectAttempts){console.error("[PtyWebSocket] Max reconnect attempts reached after channel token failure");return}this.scheduleReconnect();return}this.connect()}},j)}dispose(){var j;this.disposed=!0,this.authenticated=!1,this.sendBuffer.length=0,this.reconnectTimer&&clearTimeout(this.reconnectTimer),(j=this.ws)==null||j.close(),this.ws=null}flushBuffer(){if(!(!this.ws||this.ws.readyState!==WebSocket.OPEN||!this.authenticated)){for(const j of this.sendBuffer)this.ws.send(j);this.sendBuffer.length=0}}}const We=X.forwardRef(function({taskId:j,sessionId:K,taskFinished:J,onStatusChange:q,onTakeoverChange:Y},P){const r=X.useRef(null),o=X.useRef(null),c=X.useRef(null),_=X.useRef(null),[n,d]=X.useState("observer"),[p,g]=X.useState(!1),[u,e]=X.useState(0),s=De(l=>l.accessToken),t=X.useRef(s);X.useEffect(()=>{t.current=s},[s]);const i=X.useRef(q);X.useEffect(()=>{i.current=q},[q]),X.useImperativeHandle(P,()=>({requestTakeover(){var l;(l=_.current)==null||l.send({type:"force_takeover"}),g(!0)},releaseTakeover(){var l;(l=_.current)==null||l.releaseTakeover(),d("observer")}}),[]),X.useEffect(()=>{const l=u>0&&n==="observer"?"denied":p?"requesting":n==="writer"?"manual":"auto";Y==null||Y(l)},[n,p,u,Y]);const a=X.useCallback(async()=>(await Re.post(`web/tasks/${j}/pty-token`).json()).channelToken,[j]);return X.useEffect(()=>{if(!r.current)return;const v=window.innerWidth<768?11:13,m=new Ae.Terminal({cursorBlink:!0,fontSize:v,fontFamily:'"JetBrains Mono", "Fira Code", "Cascadia Code", Menlo, monospace',theme:{background:"#0c0c0c",foreground:"#d4d4d4",cursor:"#d4d4d4"},scrollback:5e3,convertEol:!0}),h=new Te.FitAddon;m.loadAddon(h);const f=r.current;requestAnimationFrame(()=>{if(!f.isConnected)return;m.open(f),o.current=m,c.current=h;const E=f.querySelector(".xterm-viewport");E&&(E.style.overscrollBehavior="contain",E.addEventListener("scroll",M=>{M.stopPropagation()},{passive:!0}));const x=f.querySelector(".xterm-helper-textarea");if(x){const M=x.focus.bind(x);x.focus=O=>{M({...O,preventScroll:!0})}}const A=(M=0)=>{requestAnimationFrame(()=>{if(c.current)try{c.current.fit(),M<5&&(m.cols<=1||m.rows<=1)&&setTimeout(()=>A(M+1),100)}catch{M<5&&setTimeout(()=>A(M+1),100)}})};A()});function b(){const x=window.innerWidth<768?11:13;if(m.options.fontSize!==x){m.options.fontSize=x;try{h.fit()}catch{}}}window.addEventListener("resize",b);let L;const y=new ResizeObserver(()=>{clearTimeout(L),L=setTimeout(()=>{var E;try{(E=c.current)==null||E.fit()}catch{}},100)});return y.observe(r.current),()=>{clearTimeout(L),window.removeEventListener("resize",b),y.disconnect(),m.dispose(),o.current=null,c.current=null}},[]),X.useEffect(()=>{if(!t.current||J)return;let l=!1,v=!1,m,h;async function f(){try{const b=await a();if(l)return;const L=new Oe({taskId:j,accessToken:t.current,channelToken:b,getAccessToken:()=>t.current,getChannelToken:a,onData:y=>{var E;(E=o.current)==null||E.write(y),v||(v=!0,m=setTimeout(()=>{if(l)return;const x=c.current;if(x)try{const A=x.proposeDimensions();A&&A.cols>1&&(L.sendResize(A.cols-1,A.rows),h=setTimeout(()=>{l||L.sendResize(A.cols,A.rows)},100))}catch{}},500))},onMessage:y=>{switch(y.type){case"takeover_granted":d("writer"),g(!1),e(0);break;case"takeover_denied":g(!1),e(x=>x+1);break;case"writer_revoked":d("observer"),e(0);break}},onStatus:y=>{var E;if(l||(E=i.current)==null||E.call(i,y),y==="connected"){const x=o.current;x&&L.sendResize(x.cols,x.rows)}}});_.current=L,L.connect()}catch{}}return f(),()=>{var b;l=!0,clearTimeout(m),clearTimeout(h),(b=_.current)==null||b.dispose(),_.current=null}},[j,J,a]),X.useEffect(()=>{const l=o.current;if(!l)return;const v=l.onData(h=>{const f=_.current;f&&(n==="writer"?f.sendData(h):!p&&K&&(g(!0),f.requestTakeover(K)))}),m=l.onResize(({cols:h,rows:f})=>{var b;(b=_.current)==null||b.sendResize(h,f)});return()=>{v.dispose(),m.dispose()}},[n,p,K]),ue.jsxs("div",{className:"relative h-full w-full overflow-hidden",style:{overscrollBehavior:"contain"},children:[ue.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none select-none",children:ue.jsx("span",{className:"text-xs text-[#555] italic",children:"// agent is working — terminal output will appear when new content is generated"})}),ue.jsx("div",{ref:r,className:"relative z-[1] h-full w-full bg-[#0c0c0c] p-1",style:{touchAction:"none",overscrollBehavior:"contain"}})]})});export{He as C,Fe as H,We as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,r as s,h as b,
|
|
1
|
+
import{a as h,r as s,h as b,Y as v,j as e,C as j}from"./index-XDDf1Oy_.js";import{C as f}from"./copy-BpM8iA-r.js";function y({mode:l}){const{t:o}=h(),[n,d]=s.useState([]),[x,c]=s.useState(null),[u,i]=s.useState(!1);s.useEffect(()=>{b.get("web/profile/tokens").json().then(t=>{const r=t.filter(m=>m.status===v.ACTIVE);d(r),r.length>0&&c(r[0].id)}).catch(()=>{})},[]);const a=l==="cli"?"ov login --token <your-token>":'curl -H "authorization: bearer <your-token>" http://localhost:9000/api/web/tasks',p=s.useCallback(()=>{navigator.clipboard.writeText(a),i(!0),setTimeout(()=>i(!1),2e3)},[a]);return n.length===0?null:e.jsxs("div",{className:"mb-8 rounded-[4px] border border-[var(--accent)]/20 bg-[var(--bg-card)] p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:o("docs.quick_start_with_token")}),e.jsx("select",{value:x??"",onChange:t=>c(Number(t.target.value)),className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-2 py-1 text-xs text-[var(--text-primary)]",children:n.map(t=>e.jsx("option",{value:t.id,children:t.label},t.id))})]}),e.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-[4px] bg-[var(--bg-primary)] px-3 py-2",children:[e.jsx("code",{className:"text-xs text-[var(--accent)] break-all",children:a}),e.jsx("button",{onClick:p,className:"shrink-0 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:u?e.jsx(j,{size:14}):e.jsx(f,{size:14})})]}),e.jsx("p",{className:"mt-2 text-[11px] text-[var(--text-muted)]",children:o("docs.replace_token_hint")})]})}export{y as Q};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{c as w,a as
|
|
1
|
+
import{c as w,a as _,r as s,J as l,j as e,X as R,h as g,v as C}from"./index-XDDf1Oy_.js";import{S as N}from"./Select-CvM411zU.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const A=w("UserMinus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);function L({isOpen:a,onClose:i,projectKey:d,existingMemberIds:m=[],onAdded:x}){const{t}=
|
|
6
|
+
*/const A=w("UserMinus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);function L({isOpen:a,onClose:i,projectKey:d,existingMemberIds:m=[],onAdded:x}){const{t}=_(),[E,M]=s.useState([]),[o,u]=s.useState(""),[v,j]=s.useState(l.MEMBER),[p,f]=s.useState(!1),[y,b]=s.useState("");s.useEffect(()=>{if(!a)return;async function r(){try{const c=await g.get("web/projects/-/developers").json();M(c)}catch{}}r()},[a]);function n(){u(""),j(l.MEMBER),b(""),i()}async function k(r){if(r.preventDefault(),!!o){b(""),f(!0);try{await g.post(`web/projects/${d}/members`,{json:{developerId:parseInt(o,10),role:v}}),x(),n()}catch(c){const h=c instanceof Error?c.message:"",S=h.includes("409")?t("projects.member_already_exists"):h||t("projects.failed_to_add_member");b(S)}finally{f(!1)}}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:n}),e.jsx("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:e.jsxs("form",{onSubmit:k,children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsx("h3",{className:"text-sm text-[var(--text-primary)]",children:t("projects.add_member_title")}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:n,children:e.jsx(R,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t("projects.developer")}),e.jsx(N,{value:o,onChange:u,options:E.filter(r=>!m.includes(r.id)).map(r=>({value:String(r.id),label:`${r.name} (${r.gitEmail})`})),placeholder:t("projects.select_developer")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t("projects.role")}),e.jsx(N,{value:v,onChange:r=>j(r),options:[{value:l.MEMBER,label:t("projects.member_role")},{value:l.MAINTAINER,label:t("projects.maintainer_role")}]})]}),y&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:y})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors disabled:opacity-50",disabled:p,onClick:n,children:t("common.cancel")}),e.jsx("button",{type:"submit",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:p||!o,children:t(p?"projects.adding":"projects.add_member")})]})]})})]}):null}function $({isOpen:a,onClose:i,onConfirm:d,memberName:m,loading:x}){const{t}=_();return e.jsx(C,{isOpen:a,onClose:i,onConfirm:d,title:`> ${t("projects.remove_member")}`,message:t("projects.remove_member_confirm",{name:m}),confirmLabel:t("common.remove"),confirmVariant:"danger",isLoading:x})}export{L as A,$ as R,A as U};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-XDDf1Oy_.js";const n="rounded-[4px] bg-[var(--border)] animate-pulse";function c({rows:r=5}){const a=[[60,200,80,120],[60,160,100,80],[60,220,70,140],[60,180,90,100],[60,190,110,90]];return e.jsx("div",{className:"flex flex-col gap-3",children:Array.from({length:r}).map((s,l)=>{const t=a[l%a.length];return e.jsx("div",{className:"flex gap-4",children:t.map((i,o)=>e.jsx("div",{className:n,style:{width:i,height:12}},o))},l)})})}function m({cards:r=4}){return e.jsx("div",{className:"grid grid-cols-2 gap-3",children:Array.from({length:r}).map((a,s)=>e.jsx("div",{className:`${n} h-20`},s))})}export{m as C,c as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,j as e}from"./index-
|
|
1
|
+
import{a as t,j as e}from"./index-XDDf1Oy_.js";import{I as c,C as r}from"./DocsPrimitives-DuiNLMTd.js";import{E as n}from"./external-link-BgyHxzCy.js";import"./copy-BpM8iA-r.js";const o=[{action:"create tasks",desc:"describe what you want done, overlord dispatches to a worker"},{action:"list & monitor tasks",desc:"check status, read execution logs, track progress"},{action:"cancel & retry tasks",desc:"manage task lifecycle"},{action:"confirm pipeline stages",desc:"approve or provide input for suspended stages"},{action:"manage projects",desc:"list projects, view members"},{action:"check cluster health",desc:"see worker status, online workers, queue depth"},{action:"search",desc:"find tasks, projects, and workers by keyword"},{action:"read notifications",desc:"check and clear your notification inbox"}],d=['create a task in project "frontend" to fix the login page styling',"what tasks are running right now?","show me the logs for task 42","how many workers are online?","cancel task 15"],i=[{name:"claude code",url:"https://claude.com/claude-code"},{name:"cursor",url:"https://cursor.com/cli"},{name:"windsurf",url:"https://windsurf.com"},{name:"codex",url:"https://openai.com/codex"}];function u(){t();const a=typeof window<"u"?window.location.origin:"https://your-server";return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsx("div",{className:"mb-8",children:e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"// use overlord from your ai coding assistant — claude code, cursor, windsurf, codex, and more. install the skill and your assistant can create tasks, monitor execution, and manage your fleet."})}),e.jsxs("div",{className:"mb-8 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"// install"}),e.jsx(c,{code:"npx skills add overlord-run/skill"})]}),e.jsxs("div",{className:"mb-8 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"// configure — set these environment variables"}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 overflow-x-auto",children:[e.jsxs("code",{className:"text-xs text-[var(--text-primary)] whitespace-nowrap",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"export "}),"OVERLORD_SERVER=",e.jsx("span",{className:"text-[var(--accent)]",children:a})]}),e.jsx(r,{text:`export OVERLORD_SERVER=${a}`})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 overflow-x-auto",children:[e.jsxs("code",{className:"text-xs text-[var(--text-primary)] whitespace-nowrap",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"export "}),"OVERLORD_TOKEN=",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"your-token"})]}),e.jsx(r,{text:"export OVERLORD_TOKEN=your-token"})]})]}),e.jsxs("p",{className:"text-[11px] text-[var(--text-muted)]",children:["// create a token at ",e.jsx("a",{href:"/access-tokens",className:"text-[var(--accent)] hover:underline",children:"/access-tokens"})]})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"mb-4 text-sm text-[var(--accent)]",children:"> capabilities"}),e.jsx("div",{className:"space-y-2",children:o.map(s=>e.jsxs("div",{className:"flex items-start gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-4 py-3",children:[e.jsx("span",{className:"shrink-0 text-xs font-medium text-[var(--text-primary)]",children:s.action}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["// ",s.desc]})]},s.action))})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"mb-4 text-sm text-[var(--accent)]",children:"> example usage"}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-2",children:[e.jsx("p",{className:"mb-3 text-xs text-[var(--text-muted)]",children:"// just ask your ai agent naturally"}),d.map(s=>e.jsx("div",{className:"rounded-[4px] bg-[var(--bg-primary)] px-3 py-2",children:e.jsxs("code",{className:"text-xs text-[var(--text-secondary)]",children:[e.jsx("span",{className:"text-[var(--accent)]",children:"> "}),s]})},s))]})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"mb-4 text-sm text-[var(--accent)]",children:"> compatible tools"}),e.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:i.map(s=>e.jsxs("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-1.5 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2.5 text-xs text-[var(--text-primary)] transition-colors hover:border-[var(--accent)]",children:[s.name,e.jsx(n,{className:"h-3 w-3 text-[var(--text-muted)]"})]},s.name))}),e.jsx("p",{className:"mt-2 text-[11px] text-[var(--text-muted)]",children:"// and any ai coding assistant that supports the skills protocol"})]}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["// open source:"," ",e.jsx("a",{href:"https://github.com/overlord-run/skill",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--accent)] hover:underline",children:"github.com/overlord-run/skill"})]})})]})}export{u as default};
|