"use strict";(self.webpackChunkdvls=self.webpackChunkdvls||[]).push([[6458],{36458:(P,c,l)=>{l.r(c),l.d(c,{x:()=>_});var d=l(26183);function u(s,a){for(var n=0;n<a.length;n++){const t=a[n];if("string"!=typeof t&&!Array.isArray(t))for(const e in t)if("default"!==e&&!(e in s)){const r=Object.getOwnPropertyDescriptor(t,e);r&&Object.defineProperty(s,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var t,n,i={};self,{get exports(){return i},set exports(s){i=s}}.exports=(t=n={},Object.defineProperty(t,"__esModule",{value:!0}),t.FitAddon=void 0,t.FitAddon=class{constructor(){}activate(e){this._terminal=e}dispose(){}fit(){const e=this.proposeDimensions();e&&this._terminal&&!isNaN(e.cols)&&!isNaN(e.rows)&&(this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(this._terminal._core._renderService.clear(),this._terminal.resize(e.cols,e.rows)))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const e=this._terminal._core,r=e._renderService.dimensions;if(0===r.css.cell.width||0===r.css.cell.height)return;const f=0===this._terminal.options.scrollback?0:e.viewport.scrollBarWidth,p=window.getComputedStyle(this._terminal.element.parentElement),g=parseInt(p.getPropertyValue("height")),y=Math.max(0,parseInt(p.getPropertyValue("width"))),o=window.getComputedStyle(this._terminal.element),w=g-(parseInt(o.getPropertyValue("padding-top"))+parseInt(o.getPropertyValue("padding-bottom"))),v=y-(parseInt(o.getPropertyValue("padding-right"))+parseInt(o.getPropertyValue("padding-left")))-f;return{cols:Math.max(2,Math.floor(v/r.css.cell.width)),rows:Math.max(1,Math.floor(w/r.css.cell.height))}}},n);const _=u({__proto__:null,default:(0,d.g)(i)},[i])}}]);