!function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},t={},i={},n=e.parcelRequire55a5;null==n&&((n=function(e){if(e in t)return t[e].exports;if(e in i){var n=i[e];delete i[e];var s={id:e,exports:{}};return t[e]=s,n.call(s.exports,s,s.exports),s.exports}var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}).register=function(e,t){i[e]=t},e.parcelRequire55a5=n);var s=n("9Klpk"),r=n("3bWnf"),o=n("kb0qF"),h=n("fSF4h"),l=n("bWNdT"),u=n("23YJp"),a=Math.floor(20*parseFloat(getComputedStyle(document.documentElement).fontSize));customElements.define("lia-terminal",function(e){"use strict";(0,o.default)(i,e);var t=(0,l.default)(i);function i(){var e;return(0,s.default)(this,i),(e=t.call(this)).initObservers(),e}return(0,r.default)(i,[{key:"initObservers",value:function(){var e=this,t=this;this.resizeObserver=new(0,u.default)((function(e){var i;t.style.height?(t.height_=t.style.height,t.update(),t.dispatchEvent(new CustomEvent("onchangeheight"))):(null===(i=null==e?void 0:e[0].borderBoxSize)||void 0===i?void 0:i[0].blockSize)>=a&&(t.height_=a+"px",t.update(),t.dispatchEvent(new CustomEvent("onchangeheight")))})),this.mutationObserver=new MutationObserver((function(){e.update()}))}},{key:"connectedCallback",value:function(){var e,t;null===(e=this.resizeObserver)||void 0===e||e.observe(this),null===(t=this.mutationObserver)||void 0===t||t.observe(this,{childList:!0,subtree:!0})}},{key:"disconnectedCallback",value:function(){this.cleanup()}},{key:"cleanup",value:function(){this.resizeObserver&&(this.resizeObserver.unobserve(this),this.resizeObserver.disconnect(),this.resizeObserver=void 0),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=void 0)}},{key:"update",value:function(){this.height_&&(this.style.maxHeight="none",this.style.height=this.height_),this.scrollTop=this.scrollHeight}},{key:"height",get:function(){return this.height_},set:function(e){this.height_!=e&&(this.height_=e,this.update())}}]),i}((0,h.default)(HTMLElement)))}();