mirror of
https://github.com/open-webui/open-webui
synced 2024-11-06 08:56:39 +00:00
1 line
3.4 KiB
Plaintext
1 line
3.4 KiB
Plaintext
{"version":3,"file":"xterm_addon-fit--gyF3PcZ.js","sources":["../src/3rd-party/xterm_addon-fit.js"],"sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v2.79.1 and Terser v5.19.2.\n * Original file: /npm/@xterm/addon-fit@0.10.0/lib/addon-fit.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\nvar e,t,r={exports:{}};self;var s=r.exports=(e=t={},Object.defineProperty(e,\"__esModule\",{value:!0}),e.FitAddon=void 0,e.FitAddon=class{activate(e){this._terminal=e}dispose(){}fit(){const e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;const t=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal)return;if(!this._terminal.element||!this._terminal.element.parentElement)return;const e=this._terminal._core,t=e._renderService.dimensions;if(0===t.css.cell.width||0===t.css.cell.height)return;const r=0===this._terminal.options.scrollback?0:e.viewport.scrollBarWidth,s=window.getComputedStyle(this._terminal.element.parentElement),i=parseInt(s.getPropertyValue(\"height\")),o=Math.max(0,parseInt(s.getPropertyValue(\"width\"))),n=window.getComputedStyle(this._terminal.element),l=i-(parseInt(n.getPropertyValue(\"padding-top\"))+parseInt(n.getPropertyValue(\"padding-bottom\"))),a=o-(parseInt(n.getPropertyValue(\"padding-right\"))+parseInt(n.getPropertyValue(\"padding-left\")))-r;return{cols:Math.max(2,Math.floor(a/t.css.cell.width)),rows:Math.max(1,Math.floor(l/t.css.cell.height))}}},t),i=r.exports.FitAddon,o=r.exports.__esModule;export{i as FitAddon,o as __esModule,s as default};\n"],"names":["e","t","r","exports","s","Object","defineProperty","value","FitAddon","activate","this","_terminal","dispose","fit","proposeDimensions","isNaN","cols","rows","_core","_renderService","clear","resize","element","parentElement","dimensions","css","cell","width","height","options","scrollback","viewport","scrollBarWidth","window","getComputedStyle","i","parseInt","getPropertyValue","o","Math","max","n","l","a","floor","__esModule"],"mappings":"AAMA,IAAIA,EAAEC,EAAEC,EAAE,CAACC,QAAQ,CAAE,GAAWC,EAAEF,EAAEC,SAASH,EAAEC,EAAE,CAAA,EAAGI,OAAOC,eAAeN,EAAE,aAAa,CAACO,OAAM,IAAKP,EAAEQ,cAAS,EAAOR,EAAEQ,SAAS,MAAM,QAAAC,CAAST,GAAGU,KAAKC,UAAUX,CAAC,CAAC,OAAAY,IAAW,GAAAC,GAAM,MAAMb,EAAEU,KAAKI,oBAAoB,IAAId,IAAIU,KAAKC,WAAWI,MAAMf,EAAEgB,OAAOD,MAAMf,EAAEiB,MAAM,OAAO,MAAMhB,EAAES,KAAKC,UAAUO,MAAMR,KAAKC,UAAUM,OAAOjB,EAAEiB,MAAMP,KAAKC,UAAUK,OAAOhB,EAAEgB,OAAOf,EAAEkB,eAAeC,QAAQV,KAAKC,UAAUU,OAAOrB,EAAEgB,KAAKhB,EAAEiB,MAAM,CAAC,iBAAAH,GAAoB,IAAIJ,KAAKC,UAAU,OAAO,IAAID,KAAKC,UAAUW,UAAUZ,KAAKC,UAAUW,QAAQC,cAAc,OAAO,MAAMvB,EAAEU,KAAKC,UAAUO,MAAMjB,EAAED,EAAEmB,eAAeK,WAAW,GAAG,IAAIvB,EAAEwB,IAAIC,KAAKC,OAAO,IAAI1B,EAAEwB,IAAIC,KAAKE,OAAO,OAAO,MAAM1B,EAAE,IAAIQ,KAAKC,UAAUkB,QAAQC,WAAW,EAAE9B,EAAE+B,SAASC,eAAe5B,EAAE6B,OAAOC,iBAAiBxB,KAAKC,UAAUW,QAAQC,eAAeY,EAAEC,SAAShC,EAAEiC,iBAAiB,WAAWC,EAAEC,KAAKC,IAAI,EAAEJ,SAAShC,EAAEiC,iBAAiB,WAAWI,EAAER,OAAOC,iBAAiBxB,KAAKC,UA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