@xterm/addon-webgl 0.20.0-beta.5 → 0.20.0-beta.6
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/lib/addon-webgl.js +1 -1
- package/lib/addon-webgl.js.map +1 -1
- package/lib/addon-webgl.mjs +15 -15
- package/lib/addon-webgl.mjs.map +3 -3
- package/package.json +3 -3
- package/src/TextureAtlas.ts +1 -1
- package/src/customGlyphs/CustomGlyphDefinitions.ts +271 -13
- package/src/customGlyphs/CustomGlyphRasterizer.ts +284 -3
- package/src/customGlyphs/Types.ts +4 -0
package/lib/addon-webgl.mjs
CHANGED
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
15
15
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
16
16
|
*--------------------------------------------------------------------------------------------*/
|
|
17
|
-
var
|
|
17
|
+
var Fr=Object.defineProperty;var wr=Object.getOwnPropertyDescriptor;var Qi=(i,e,t,n)=>{for(var r=n>1?void 0:n?wr(e,t):e,o=i.length-1,s;o>=0;o--)(s=i[o])&&(r=(n?s(e,t,r):s(r))||r);return n&&r&&Fr(e,t,r),r},Ji=(i,e)=>(t,n)=>e(t,n,i);var _i=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?bt.isErrorNoTelemetry(e)?new bt(e.message+`
|
|
18
18
|
|
|
19
19
|
`+e.stack):new Error(e.message+`
|
|
20
20
|
|
|
21
|
-
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},
|
|
22
|
-
`).map(d=>d.trim().replace("at ","")).filter(d=>d!=="");return u(c,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),c.reverse()}let o=new
|
|
23
|
-
`),l)}n.sort(
|
|
24
|
-
`)).size}/${n.length} leaks) at ${h}`;let
|
|
25
|
-
`)),
|
|
21
|
+
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},Dr=new _i;function Be(i){Sr(i)||Dr.onUnexpectedError(i)}var Ti="Canceled";function Sr(i){return i instanceof Qe?!0:i instanceof Error&&i.name===Ti&&i.message===Ti}var Qe=class extends Error{constructor(){super(Ti),this.name=this.message}};var bt=class i extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof i)return e;let t=new i;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}};function Pr(i,e,t=0,n=i.length){let r=t,o=n;for(;r<o;){let s=Math.floor((r+o)/2);e(i[s])?r=s+1:o=s}return r-1}var gt=class gt{constructor(e){this._array=e;this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(gt.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!e(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}let t=Pr(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,t===-1?void 0:this._array[t]}};gt.assertInvariants=!1;var en=gt;var nn;(a=>{function i(l){return l<0}a.isLessThan=i;function e(l){return l<=0}a.isLessThanOrEqual=e;function t(l){return l>0}a.isGreaterThan=t;function n(l){return l===0}a.isNeitherLessOrGreaterThan=n,a.greaterThan=1,a.lessThan=-1,a.neitherLessOrGreaterThan=0})(nn||={});function rn(i,e){return(t,n)=>e(i(t),i(n))}var sn=(i,e)=>i-e;var We=class We{constructor(e){this.iterate=e}forEach(e){this.iterate(t=>(e(t),!0))}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new We(t=>this.iterate(n=>e(n)?t(n):!0))}map(e){return new We(t=>this.iterate(n=>t(e(n))))}some(e){let t=!1;return this.iterate(n=>(t=e(n),!t)),t}findFirst(e){let t;return this.iterate(n=>e(n)?(t=n,!1):!0),t}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||nn.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}};We.empty=new We(e=>{});var tn=We;function un(i,e){let t=Object.create(null);for(let n of i){let r=e(n),o=t[r];o||(o=t[r]=[]),o.push(n)}return t}var an,ln,on=class{constructor(e,t){this.toKey=t;this._map=new Map;this[an]="SetWithKey";for(let n of e)this.add(n)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(n=>e.call(t,n,n,this))}[(ln=Symbol.iterator,an=Symbol.toStringTag,ln)](){return this.values()}};var vt=class{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){let n=this.map.get(e);n&&(n.delete(t),n.size===0&&this.map.delete(e))}forEach(e,t){let n=this.map.get(e);n&&n.forEach(t)}get(e){let t=this.map.get(e);return t||new Set}};function mi(i,e){let t=this,n=!1,r;return function(){if(n)return r;if(n=!0,e)try{r=i.apply(t,arguments)}finally{e()}else r=i.apply(t,arguments);return r}}var fi;(B=>{function i(L){return L&&typeof L=="object"&&typeof L[Symbol.iterator]=="function"}B.is=i;let e=Object.freeze([]);function t(){return e}B.empty=t;function*n(L){yield L}B.single=n;function r(L){return i(L)?L:n(L)}B.wrap=r;function o(L){return L||e}B.from=o;function*s(L){for(let x=L.length-1;x>=0;x--)yield L[x]}B.reverse=s;function a(L){return!L||L[Symbol.iterator]().next().done===!0}B.isEmpty=a;function l(L){return L[Symbol.iterator]().next().value}B.first=l;function u(L,x){let F=0;for(let C of L)if(x(C,F++))return!0;return!1}B.some=u;function c(L,x){for(let F of L)if(x(F))return F}B.find=c;function*d(L,x){for(let F of L)x(F)&&(yield F)}B.filter=d;function*h(L,x){let F=0;for(let C of L)yield x(C,F++)}B.map=h;function*p(L,x){let F=0;for(let C of L)yield*x(C,F++)}B.flatMap=p;function*m(...L){for(let x of L)yield*x}B.concat=m;function _(L,x,F){let C=F;for(let Y of L)C=x(C,Y);return C}B.reduce=_;function*A(L,x,F=L.length){for(x<0&&(x+=L.length),F<0?F+=L.length:F>L.length&&(F=L.length);x<F;x++)yield L[x]}B.slice=A;function M(L,x=Number.POSITIVE_INFINITY){let F=[];if(x===0)return[F,L];let C=L[Symbol.iterator]();for(let Y=0;Y<x;Y++){let ve=C.next();if(ve.done)return[F,B.empty()];F.push(ve.value)}return[F,{[Symbol.iterator](){return C}}]}B.consume=M;async function R(L){let x=[];for await(let F of L)x.push(F);return Promise.resolve(x)}B.asyncToArray=R})(fi||={});var Nr=!1,ke=null,Et=class Et{constructor(){this.livingDisposables=new Map}getDisposableData(e){let t=this.livingDisposables.get(e);return t||(t={parent:null,source:null,isSingleton:!1,value:e,idx:Et.idx++},this.livingDisposables.set(e,t)),t}trackDisposable(e){let t=this.getDisposableData(e);t.source||(t.source=new Error().stack)}setParent(e,t){let n=this.getDisposableData(e);n.parent=t}markAsDisposed(e){this.livingDisposables.delete(e)}markAsSingleton(e){this.getDisposableData(e).isSingleton=!0}getRootParent(e,t){let n=t.get(e);if(n)return n;let r=e.parent?this.getRootParent(this.getDisposableData(e.parent),t):e;return t.set(e,r),r}getTrackedDisposables(){let e=new Map;return[...this.livingDisposables.entries()].filter(([,n])=>n.source!==null&&!this.getRootParent(n,e).isSingleton).flatMap(([n])=>n)}computeLeakingDisposables(e=10,t){let n;if(t)n=t;else{let l=new Map,u=[...this.livingDisposables.values()].filter(d=>d.source!==null&&!this.getRootParent(d,l).isSingleton);if(u.length===0)return;let c=new Set(u.map(d=>d.value));if(n=u.filter(d=>!(d.parent&&c.has(d.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function r(l){function u(d,h){for(;d.length>0&&h.some(p=>typeof p=="string"?p===d[0]:d[0].match(p));)d.shift()}let c=l.source.split(`
|
|
22
|
+
`).map(d=>d.trim().replace("at ","")).filter(d=>d!=="");return u(c,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),c.reverse()}let o=new vt;for(let l of n){let u=r(l);for(let c=0;c<=u.length;c++)o.add(u.slice(0,c).join(`
|
|
23
|
+
`),l)}n.sort(rn(l=>l.idx,sn));let s="",a=0;for(let l of n.slice(0,e)){a++;let u=r(l),c=[];for(let d=0;d<u.length;d++){let h=u[d];h=`(shared with ${o.get(u.slice(0,d+1).join(`
|
|
24
|
+
`)).size}/${n.length} leaks) at ${h}`;let m=o.get(u.slice(0,d).join(`
|
|
25
|
+
`)),_=un([...m].map(A=>r(A)[d]),A=>A);delete _[u[d]];for(let[A,M]of Object.entries(_))c.unshift(` - stacktraces of ${M.length} other leaks continue with ${A}`);c.unshift(h)}s+=`
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
==================== Leaking disposable ${a}/${n.length}: ${l.value.constructor.name} ====================
|
|
@@ -30,17 +30,17 @@ ${c.join(`
|
|
|
30
30
|
`)}
|
|
31
31
|
============================================================
|
|
32
32
|
|
|
33
|
-
`}return n.length>e&&(
|
|
33
|
+
`}return n.length>e&&(s+=`
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
... and ${n.length-e} more leaking disposables
|
|
37
37
|
|
|
38
|
-
`),{leaks:n,details:r}}};vt.idx=0;var ln=vt;function Nr(i){We=i}if(Pr){let i="__is_disposable_tracked__";Nr(new class{trackDisposable(e){let t=new Error("Potentially leaked disposable").stack;setTimeout(()=>{e[i]||console.log(t)},3e3)}setParent(e,t){if(e&&e!==H.None)try{e[i]=!0}catch{}}markAsDisposed(e){if(e&&e!==H.None)try{e[i]=!0}catch{}}markAsSingleton(e){}})}function xt(i){return We?.trackDisposable(i),i}function It(i){We?.markAsDisposed(i)}function Qe(i,e){We?.setParent(i,e)}function Br(i,e){if(We)for(let t of i)We.setParent(t,e)}function un(i){if(fi.is(i)){let e=[];for(let t of i)if(t)try{t.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(i)?[]:i}else if(i)return i.dispose(),i}function yt(...i){let e=S(()=>un(i));return Br(i,e),e}function S(i){let e=xt({dispose:mi(()=>{It(e),i()})});return e}var Et=class Et{constructor(){this._toDispose=new Set;this._isDisposed=!1;xt(this)}dispose(){this._isDisposed||(It(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{un(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return Qe(e,this),this._isDisposed?Et.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),Qe(e,null))}};Et.DISABLE_DISPOSED_WARNING=!1;var me=Et,H=class{constructor(){this._store=new me;xt(this),Qe(this._store,this)}dispose(){It(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};H.None=Object.freeze({dispose(){}});var be=class{constructor(){this._isDisposed=!1;xt(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&Qe(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,It(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&Qe(e,null),e}};var Lt=typeof process<"u"&&"title"in process,Je=Lt?"node":navigator.userAgent,Ti=Lt?"node":navigator.platform,cn=Je.includes("Firefox"),dn=Je.includes("Edge"),bi=/^((?!chrome|android).)*safari/i.test(Je);function hn(){if(!bi)return 0;let i=Je.match(/Version\/(\d+)/);return i===null||i.length<2?0:parseInt(i[1])}var lo=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Ti);var uo=["Windows","Win16","Win32","WinCE"].includes(Ti),co=Ti.indexOf("Linux")>=0,ho=/\bCrOS\b/.test(Je);var pn="";var $=0,V=0,z=0,k=0,J={css:"#00000000",rgba:0},Z;(n=>{function i(s,o,r,a){return a!==void 0?`#${Se(s)}${Se(o)}${Se(r)}${Se(a)}`:`#${Se(s)}${Se(o)}${Se(r)}`}n.toCss=i;function e(s,o,r,a=255){return(s<<24|o<<16|r<<8|a)>>>0}n.toRgba=e;function t(s,o,r,a){return{css:n.toCss(s,o,r,a),rgba:n.toRgba(s,o,r,a)}}n.toColor=t})(Z||={});var ke;(a=>{function i(l,u){if(k=(u.rgba&255)/255,k===1)return{css:u.css,rgba:u.rgba};let c=u.rgba>>24&255,d=u.rgba>>16&255,h=u.rgba>>8&255,p=l.rgba>>24&255,L=l.rgba>>16&255,O=l.rgba>>8&255;$=p+Math.round((c-p)*k),V=L+Math.round((d-L)*k),z=O+Math.round((h-O)*k);let D=Z.toCss($,V,z),j=Z.toRgba($,V,z);return{css:D,rgba:j}}a.blend=i;function e(l){return(l.rgba&255)===255}a.isOpaque=e;function t(l,u,c){let d=ve.ensureContrastRatio(l.rgba,u.rgba,c);if(d)return Z.toColor(d>>24&255,d>>16&255,d>>8&255)}a.ensureContrastRatio=t;function n(l){let u=(l.rgba|255)>>>0;return[$,V,z]=ve.toChannels(u),{css:Z.toCss($,V,z),rgba:u}}a.opaque=n;function s(l,u){return k=Math.round(u*255),[$,V,z]=ve.toChannels(l.rgba),{css:Z.toCss($,V,z,k),rgba:Z.toRgba($,V,z,k)}}a.opacity=s;function o(l,u){return k=l.rgba&255,s(l,k*u/255)}a.multiplyOpacity=o;function r(l){return[l.rgba>>24&255,l.rgba>>16&255,l.rgba>>8&255]}a.toColorRGB=r})(ke||={});var Hr;(n=>{let i,e;try{let s=document.createElement("canvas");s.width=1,s.height=1;let o=s.getContext("2d",{willReadFrequently:!0});o&&(i=o,i.globalCompositeOperation="copy",e=i.createLinearGradient(0,0,1,1))}catch{}function t(s){if(s.match(/#[\da-f]{3,8}/i))switch(s.length){case 4:return $=parseInt(s.slice(1,2).repeat(2),16),V=parseInt(s.slice(2,3).repeat(2),16),z=parseInt(s.slice(3,4).repeat(2),16),Z.toColor($,V,z);case 5:return $=parseInt(s.slice(1,2).repeat(2),16),V=parseInt(s.slice(2,3).repeat(2),16),z=parseInt(s.slice(3,4).repeat(2),16),k=parseInt(s.slice(4,5).repeat(2),16),Z.toColor($,V,z,k);case 7:return{css:s,rgba:(parseInt(s.slice(1),16)<<8|255)>>>0};case 9:return{css:s,rgba:parseInt(s.slice(1),16)>>>0}}let o=s.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(o)return $=parseInt(o[1]),V=parseInt(o[2]),z=parseInt(o[3]),k=Math.round((o[5]===void 0?1:parseFloat(o[5]))*255),Z.toColor($,V,z,k);if(!i||!e)throw new Error("css.toColor: Unsupported css format");if(i.fillStyle=e,i.fillStyle=s,typeof i.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(i.fillRect(0,0,1,1),[$,V,z,k]=i.getImageData(0,0,1,1).data,k!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Z.toRgba($,V,z,k),css:s}}n.toColor=t})(Hr||={});var Y;(t=>{function i(n){return e(n>>16&255,n>>8&255,n&255)}t.relativeLuminance=i;function e(n,s,o){let r=n/255,a=s/255,l=o/255,u=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4),c=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),d=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4);return u*.2126+c*.7152+d*.0722}t.relativeLuminance2=e})(Y||={});var ve;(o=>{function i(r,a){if(k=(a&255)/255,k===1)return a;let l=a>>24&255,u=a>>16&255,c=a>>8&255,d=r>>24&255,h=r>>16&255,p=r>>8&255;return $=d+Math.round((l-d)*k),V=h+Math.round((u-h)*k),z=p+Math.round((c-p)*k),Z.toRgba($,V,z)}o.blend=i;function e(r,a,l){let u=Y.relativeLuminance(r>>8),c=Y.relativeLuminance(a>>8);if(ge(u,c)<l){if(c<u){let L=t(r,a,l),O=ge(u,Y.relativeLuminance(L>>8));if(O<l){let D=n(r,a,l),j=ge(u,Y.relativeLuminance(D>>8));return O>j?L:D}return L}let h=n(r,a,l),p=ge(u,Y.relativeLuminance(h>>8));if(p<l){let L=t(r,a,l),O=ge(u,Y.relativeLuminance(L>>8));return p>O?h:L}return h}}o.ensureContrastRatio=e;function t(r,a,l){let u=r>>24&255,c=r>>16&255,d=r>>8&255,h=a>>24&255,p=a>>16&255,L=a>>8&255,O=ge(Y.relativeLuminance2(h,p,L),Y.relativeLuminance2(u,c,d));for(;O<l&&(h>0||p>0||L>0);)h-=Math.max(0,Math.ceil(h*.1)),p-=Math.max(0,Math.ceil(p*.1)),L-=Math.max(0,Math.ceil(L*.1)),O=ge(Y.relativeLuminance2(h,p,L),Y.relativeLuminance2(u,c,d));return(h<<24|p<<16|L<<8|255)>>>0}o.reduceLuminance=t;function n(r,a,l){let u=r>>24&255,c=r>>16&255,d=r>>8&255,h=a>>24&255,p=a>>16&255,L=a>>8&255,O=ge(Y.relativeLuminance2(h,p,L),Y.relativeLuminance2(u,c,d));for(;O<l&&(h<255||p<255||L<255);)h=Math.min(255,h+Math.ceil((255-h)*.1)),p=Math.min(255,p+Math.ceil((255-p)*.1)),L=Math.min(255,L+Math.ceil((255-L)*.1)),O=ge(Y.relativeLuminance2(h,p,L),Y.relativeLuminance2(u,c,d));return(h<<24|p<<16|L<<8|255)>>>0}o.increaseLuminance=n;function s(r){return[r>>24&255,r>>16&255,r>>8&255,r&255]}o.toChannels=s})(ve||={});function Se(i){let e=i.toString(16);return e.length<2?"0"+e:e}function ge(i,e){return i<e?(e+.05)/(i+.05):(i+.05)/(e+.05)}function P(i){if(!i)throw new Error("value must not be falsy");return i}function At(i){return 57508<=i&&i<=57558}function _n(i){return 57520<=i&&i<=57527}function Wr(i){return 57344<=i&&i<=63743}function kr(i){return 9472<=i&&i<=9631}function Ur(i){return i>=128512&&i<=128591||i>=127744&&i<=128511||i>=128640&&i<=128767||i>=9728&&i<=9983||i>=9984&&i<=10175||i>=65024&&i<=65039||i>=129280&&i<=129535||i>=127462&&i<=127487}function mn(i,e,t,n){return e===1&&t>Math.ceil(n*1.5)&&i!==void 0&&i>255&&!Ur(i)&&!At(i)&&!Wr(i)}function Rt(i){return At(i)||kr(i)}function fn(){return{css:{canvas:Ot(),cell:Ot()},device:{canvas:Ot(),cell:Ot(),char:{width:0,height:0,left:0,top:0}}}}function Ot(){return{width:0,height:0}}function Tn(i,e,t=0){return(i-(Math.round(e)*2-t))%(Math.round(e)*2)}var X=0,q=0,fe=!1,Ee=!1,wt=!1,ee,gi=0,Dt=class{constructor(e,t,n,s,o,r){this._terminal=e;this._optionService=t;this._selectionRenderModel=n;this._decorationService=s;this._coreBrowserService=o;this._themeService=r;this.result={fg:0,bg:0,ext:0}}resolve(e,t,n,s){if(this.result.bg=e.bg,this.result.fg=e.fg,this.result.ext=e.bg&268435456?e.extended.ext:0,q=0,X=0,Ee=!1,fe=!1,wt=!1,ee=this._themeService.colors,gi=0,e.getCode()!==0&&e.extended.underlineStyle===4){let r=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));gi=t*s%(Math.round(r)*2)}if(this._decorationService.forEachDecorationAtCell(t,n,"bottom",r=>{r.backgroundColorRGB&&(q=r.backgroundColorRGB.rgba>>8&16777215,Ee=!0),r.foregroundColorRGB&&(X=r.foregroundColorRGB.rgba>>8&16777215,fe=!0)}),wt=this._selectionRenderModel.isCellSelected(this._terminal,t,n),wt){if(this.result.fg&67108864||(this.result.bg&50331648)!==0){if(this.result.fg&67108864)switch(this.result.fg&50331648){case 16777216:case 33554432:q=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:q=(this.result.fg&16777215)<<8|255;break;case 0:default:q=this._themeService.colors.foreground.rgba}else switch(this.result.bg&50331648){case 16777216:case 33554432:q=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:q=(this.result.bg&16777215)<<8|255;break}q=ve.blend(q,(this._coreBrowserService.isFocused?ee.selectionBackgroundOpaque:ee.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}else q=(this._coreBrowserService.isFocused?ee.selectionBackgroundOpaque:ee.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(Ee=!0,ee.selectionForeground&&(X=ee.selectionForeground.rgba>>8&16777215,fe=!0),Rt(e.getCode())){if(this.result.fg&67108864&&(this.result.bg&50331648)===0)X=(this._coreBrowserService.isFocused?ee.selectionBackgroundOpaque:ee.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(this.result.fg&67108864)switch(this.result.bg&50331648){case 16777216:case 33554432:X=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:X=(this.result.bg&16777215)<<8|255;break}else switch(this.result.fg&50331648){case 16777216:case 33554432:X=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:X=(this.result.fg&16777215)<<8|255;break;case 0:default:X=this._themeService.colors.foreground.rgba}X=ve.blend(X,(this._coreBrowserService.isFocused?ee.selectionBackgroundOpaque:ee.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}fe=!0}}this._decorationService.forEachDecorationAtCell(t,n,"top",r=>{r.backgroundColorRGB&&(q=r.backgroundColorRGB.rgba>>8&16777215,Ee=!0),r.foregroundColorRGB&&(X=r.foregroundColorRGB.rgba>>8&16777215,fe=!0)}),Ee&&(wt?q=e.bg&-16777216&-134217729|q|50331648:q=e.bg&-16777216|q|50331648),fe&&(X=e.fg&-16777216&-67108865|X|50331648),this.result.fg&67108864&&(Ee&&!fe&&((this.result.bg&50331648)===0?X=this.result.fg&-134217728|ee.background.rgba>>8&16777215&16777215|50331648:X=this.result.fg&-134217728|this.result.bg&67108863,fe=!0),!Ee&&fe&&((this.result.fg&50331648)===0?q=this.result.bg&-67108864|ee.foreground.rgba>>8&16777215&16777215|50331648:q=this.result.bg&-67108864|this.result.fg&67108863,Ee=!0)),ee=void 0,this.result.bg=Ee?q:this.result.bg,this.result.fg=fe?X:this.result.fg,this.result.ext&=536870911,this.result.ext|=gi<<29&3758096384}};var vn=.5,Mt=cn||dn?"bottom":"ideographic";var En={"\u2500":{type:5,data:{1:"M0,.5 L1,.5"}},"\u2501":{type:5,data:{3:"M0,.5 L1,.5"}},"\u2502":{type:5,data:{1:"M.5,0 L.5,1"}},"\u2503":{type:5,data:{3:"M.5,0 L.5,1"}},"\u2504":{type:5,data:{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"}},"\u2505":{type:5,data:{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"}},"\u2506":{type:5,data:{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"}},"\u2507":{type:5,data:{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"}},"\u2508":{type:5,data:{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"}},"\u2509":{type:5,data:{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"}},"\u250A":{type:5,data:{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"}},"\u250B":{type:5,data:{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"}},"\u250C":{type:5,data:{1:"M0.5,1 L.5,.5 L1,.5"}},"\u250D":{type:5,data:{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"}},"\u250E":{type:5,data:{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"}},"\u250F":{type:5,data:{3:"M0.5,1 L.5,.5 L1,.5"}},"\u2510":{type:5,data:{1:"M0,.5 L.5,.5 L.5,1"}},"\u2511":{type:5,data:{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"}},"\u2512":{type:5,data:{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"}},"\u2513":{type:5,data:{3:"M0,.5 L.5,.5 L.5,1"}},"\u2514":{type:5,data:{1:"M.5,0 L.5,.5 L1,.5"}},"\u2515":{type:5,data:{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"}},"\u2516":{type:5,data:{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"}},"\u2517":{type:5,data:{3:"M.5,0 L.5,.5 L1,.5"}},"\u2518":{type:5,data:{1:"M.5,0 L.5,.5 L0,.5"}},"\u2519":{type:5,data:{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"}},"\u251A":{type:5,data:{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"}},"\u251B":{type:5,data:{3:"M.5,0 L.5,.5 L0,.5"}},"\u251C":{type:5,data:{1:"M.5,0 L.5,1 M.5,.5 L1,.5"}},"\u251D":{type:5,data:{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"}},"\u251E":{type:5,data:{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"}},"\u251F":{type:5,data:{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"}},"\u2520":{type:5,data:{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"}},"\u2521":{type:5,data:{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"}},"\u2522":{type:5,data:{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"}},"\u2523":{type:5,data:{3:"M.5,0 L.5,1 M.5,.5 L1,.5"}},"\u2524":{type:5,data:{1:"M.5,0 L.5,1 M.5,.5 L0,.5"}},"\u2525":{type:5,data:{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"}},"\u2526":{type:5,data:{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"}},"\u2527":{type:5,data:{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"}},"\u2528":{type:5,data:{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"}},"\u2529":{type:5,data:{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"}},"\u252A":{type:5,data:{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"}},"\u252B":{type:5,data:{3:"M.5,0 L.5,1 M.5,.5 L0,.5"}},"\u252C":{type:5,data:{1:"M0,.5 L1,.5 M.5,.5 L.5,1"}},"\u252D":{type:5,data:{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"}},"\u252E":{type:5,data:{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"}},"\u252F":{type:5,data:{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"}},"\u2530":{type:5,data:{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"}},"\u2531":{type:5,data:{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"}},"\u2532":{type:5,data:{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"}},"\u2533":{type:5,data:{3:"M0,.5 L1,.5 M.5,.5 L.5,1"}},"\u2534":{type:5,data:{1:"M0,.5 L1,.5 M.5,.5 L.5,0"}},"\u2535":{type:5,data:{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"}},"\u2536":{type:5,data:{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"}},"\u2537":{type:5,data:{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"}},"\u2538":{type:5,data:{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"}},"\u2539":{type:5,data:{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"}},"\u253A":{type:5,data:{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"}},"\u253B":{type:5,data:{3:"M0,.5 L1,.5 M.5,.5 L.5,0"}},"\u253C":{type:5,data:{1:"M0,.5 L1,.5 M.5,0 L.5,1"}},"\u253D":{type:5,data:{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"}},"\u253E":{type:5,data:{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"}},"\u253F":{type:5,data:{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"}},"\u2540":{type:5,data:{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"}},"\u2541":{type:5,data:{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"}},"\u2542":{type:5,data:{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"}},"\u2543":{type:5,data:{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"}},"\u2544":{type:5,data:{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"}},"\u2545":{type:5,data:{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"}},"\u2546":{type:5,data:{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"}},"\u2547":{type:5,data:{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"}},"\u2548":{type:5,data:{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"}},"\u2549":{type:5,data:{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"}},"\u254A":{type:5,data:{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"}},"\u254B":{type:5,data:{3:"M0,.5 L1,.5 M.5,0 L.5,1"}},"\u254C":{type:5,data:{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"}},"\u254D":{type:5,data:{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"}},"\u254E":{type:5,data:{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"}},"\u254F":{type:5,data:{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"}},"\u2550":{type:5,data:{1:(i,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`}},"\u2551":{type:5,data:{1:(i,e)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`}},"\u2552":{type:5,data:{1:(i,e)=>`M.5,1 L.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`}},"\u2553":{type:5,data:{1:(i,e)=>`M${.5-i},1 L${.5-i},.5 L1,.5 M${.5+i},.5 L${.5+i},1`}},"\u2554":{type:5,data:{1:(i,e)=>`M1,${.5-e} L${.5-i},${.5-e} L${.5-i},1 M1,${.5+e} L${.5+i},${.5+e} L${.5+i},1`}},"\u2555":{type:5,data:{1:(i,e)=>`M0,${.5-e} L.5,${.5-e} L.5,1 M0,${.5+e} L.5,${.5+e}`}},"\u2556":{type:5,data:{1:(i,e)=>`M${.5+i},1 L${.5+i},.5 L0,.5 M${.5-i},.5 L${.5-i},1`}},"\u2557":{type:5,data:{1:(i,e)=>`M0,${.5+e} L${.5-i},${.5+e} L${.5-i},1 M0,${.5-e} L${.5+i},${.5-e} L${.5+i},1`}},"\u2558":{type:5,data:{1:(i,e)=>`M.5,0 L.5,${.5+e} L1,${.5+e} M.5,${.5-e} L1,${.5-e}`}},"\u2559":{type:5,data:{1:(i,e)=>`M1,.5 L${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`}},"\u255A":{type:5,data:{1:(i,e)=>`M1,${.5-e} L${.5+i},${.5-e} L${.5+i},0 M1,${.5+e} L${.5-i},${.5+e} L${.5-i},0`}},"\u255B":{type:5,data:{1:(i,e)=>`M0,${.5+e} L.5,${.5+e} L.5,0 M0,${.5-e} L.5,${.5-e}`}},"\u255C":{type:5,data:{1:(i,e)=>`M0,.5 L${.5+i},.5 L${.5+i},0 M${.5-i},.5 L${.5-i},0`}},"\u255D":{type:5,data:{1:(i,e)=>`M0,${.5-e} L${.5-i},${.5-e} L${.5-i},0 M0,${.5+e} L${.5+i},${.5+e} L${.5+i},0`}},"\u255E":{type:5,data:{1:(i,e)=>`M.5,0 L.5,1 M.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`}},"\u255F":{type:5,data:{1:(i,e)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1 M${.5+i},.5 L1,.5`}},"\u2560":{type:5,data:{1:(i,e)=>`M${.5-i},0 L${.5-i},1 M1,${.5+e} L${.5+i},${.5+e} L${.5+i},1 M1,${.5-e} L${.5+i},${.5-e} L${.5+i},0`}},"\u2561":{type:5,data:{1:(i,e)=>`M.5,0 L.5,1 M0,${.5-e} L.5,${.5-e} M0,${.5+e} L.5,${.5+e}`}},"\u2562":{type:5,data:{1:(i,e)=>`M0,.5 L${.5-i},.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`}},"\u2563":{type:5,data:{1:(i,e)=>`M${.5+i},0 L${.5+i},1 M0,${.5+e} L${.5-i},${.5+e} L${.5-i},1 M0,${.5-e} L${.5-i},${.5-e} L${.5-i},0`}},"\u2564":{type:5,data:{1:(i,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e} M.5,${.5+e} L.5,1`}},"\u2565":{type:5,data:{1:(i,e)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},1 M${.5+i},.5 L${.5+i},1`}},"\u2566":{type:5,data:{1:(i,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L${.5-i},${.5+e} L${.5-i},1 M1,${.5+e} L${.5+i},${.5+e} L${.5+i},1`}},"\u2567":{type:5,data:{1:(i,e)=>`M.5,0 L.5,${.5-e} M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`}},"\u2568":{type:5,data:{1:(i,e)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`}},"\u2569":{type:5,data:{1:(i,e)=>`M0,${.5+e} L1,${.5+e} M0,${.5-e} L${.5-i},${.5-e} L${.5-i},0 M1,${.5-e} L${.5+i},${.5-e} L${.5+i},0`}},"\u256A":{type:5,data:{1:(i,e)=>`M.5,0 L.5,1 M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`}},"\u256B":{type:5,data:{1:(i,e)=>`M0,.5 L1,.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`}},"\u256C":{type:5,data:{1:(i,e)=>`M0,${.5+e} L${.5-i},${.5+e} L${.5-i},1 M1,${.5+e} L${.5+i},${.5+e} L${.5+i},1 M0,${.5-e} L${.5-i},${.5-e} L${.5-i},0 M1,${.5-e} L${.5+i},${.5-e} L${.5+i},0`}},"\u256D":{type:5,data:{1:(i,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,1,.5`}},"\u256E":{type:5,data:{1:(i,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,0,.5`}},"\u256F":{type:5,data:{1:(i,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,0,.5`}},"\u2570":{type:5,data:{1:(i,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,1,.5`}},"\u2571":{type:5,data:{1:"M1,0 L0,1"}},"\u2572":{type:5,data:{1:"M0,0 L1,1"}},"\u2573":{type:5,data:{1:"M1,0 L0,1 M0,0 L1,1"}},"\u2574":{type:5,data:{1:"M.5,.5 L0,.5"}},"\u2575":{type:5,data:{1:"M.5,.5 L.5,0"}},"\u2576":{type:5,data:{1:"M.5,.5 L1,.5"}},"\u2577":{type:5,data:{1:"M.5,.5 L.5,1"}},"\u2578":{type:5,data:{3:"M.5,.5 L0,.5"}},"\u2579":{type:5,data:{3:"M.5,.5 L.5,0"}},"\u257A":{type:5,data:{3:"M.5,.5 L1,.5"}},"\u257B":{type:5,data:{3:"M.5,.5 L.5,1"}},"\u257C":{type:5,data:{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"}},"\u257D":{type:5,data:{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"}},"\u257E":{type:5,data:{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"}},"\u257F":{type:5,data:{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"}},"\u2580":{type:0,data:[{x:0,y:0,w:8,h:4}]},"\u2581":{type:0,data:[{x:0,y:7,w:8,h:1}]},"\u2582":{type:0,data:[{x:0,y:6,w:8,h:2}]},"\u2583":{type:0,data:[{x:0,y:5,w:8,h:3}]},"\u2584":{type:0,data:[{x:0,y:4,w:8,h:4}]},"\u2585":{type:0,data:[{x:0,y:3,w:8,h:5}]},"\u2586":{type:0,data:[{x:0,y:2,w:8,h:6}]},"\u2587":{type:0,data:[{x:0,y:1,w:8,h:7}]},"\u2588":{type:0,data:[{x:0,y:0,w:8,h:8}]},"\u2589":{type:0,data:[{x:0,y:0,w:7,h:8}]},"\u258A":{type:0,data:[{x:0,y:0,w:6,h:8}]},"\u258B":{type:0,data:[{x:0,y:0,w:5,h:8}]},"\u258C":{type:0,data:[{x:0,y:0,w:4,h:8}]},"\u258D":{type:0,data:[{x:0,y:0,w:3,h:8}]},"\u258E":{type:0,data:[{x:0,y:0,w:2,h:8}]},"\u258F":{type:0,data:[{x:0,y:0,w:1,h:8}]},"\u2590":{type:0,data:[{x:4,y:0,w:4,h:8}]},"\u2591":{type:1,data:[[1,0],[0,0]]},"\u2592":{type:1,data:[[1,0],[0,1]]},"\u2593":{type:1,data:[[1,1],[1,0]]},"\u2594":{type:0,data:[{x:0,y:0,w:8,h:1}]},"\u2595":{type:0,data:[{x:7,y:0,w:1,h:8}]},"\u2596":{type:0,data:[{x:0,y:4,w:4,h:4}]},"\u2597":{type:0,data:[{x:4,y:4,w:4,h:4}]},"\u2598":{type:0,data:[{x:0,y:0,w:4,h:4}]},"\u2599":{type:0,data:[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}]},"\u259A":{type:0,data:[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}]},"\u259B":{type:0,data:[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}]},"\u259C":{type:0,data:[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}]},"\u259D":{type:0,data:[{x:4,y:0,w:4,h:4}]},"\u259E":{type:0,data:[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}]},"\u259F":{type:0,data:[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}]},"\uE0A0":{type:7,data:{d:"M.3,1 L.03,1 L.03,.88 C.03,.82,.06,.78,.11,.73 C.15,.7,.2,.68,.28,.65 L.43,.6 C.49,.58,.53,.56,.56,.53 C.59,.5,.6,.47,.6,.43 L.6,.27 L.4,.27 L.69,.1 L.98,.27 L.78,.27 L.78,.46 C.78,.52,.76,.56,.72,.61 C.68,.66,.63,.67,.56,.7 L.48,.72 C.42,.74,.38,.76,.35,.78 C.32,.8,.31,.84,.31,.88 L.31,1 M.3,.5 L.03,.59 L.03,.09 L.3,.09 L.3,.655",type:0}},"\uE0A1":{type:7,data:{d:"M.7,.4 L.7,.47 L.2,.47 L.2,.03 L.355,.03 L.355,.4 L.705,.4 M.7,.5 L.86,.5 L.86,.95 L.69,.95 L.44,.66 L.46,.86 L.46,.95 L.3,.95 L.3,.49 L.46,.49 L.71,.78 L.69,.565 L.69,.5",type:0}},"\uE0A2":{type:7,data:{d:"M.25,.94 C.16,.94,.11,.92,.11,.87 L.11,.53 C.11,.48,.15,.455,.23,.45 L.23,.3 C.23,.25,.26,.22,.31,.19 C.36,.16,.43,.15,.51,.15 C.59,.15,.66,.16,.71,.19 C.77,.22,.79,.26,.79,.3 L.79,.45 C.87,.45,.91,.48,.91,.53 L.91,.87 C.91,.92,.86,.94,.77,.94 L.24,.94 M.53,.2 C.49,.2,.45,.21,.42,.23 C.39,.25,.38,.27,.38,.3 L.38,.45 L.68,.45 L.68,.3 C.68,.27,.67,.25,.64,.23 C.61,.21,.58,.2,.53,.2 M.58,.82 L.58,.66 C.63,.65,.65,.63,.65,.6 C.65,.58,.64,.57,.61,.56 C.58,.55,.56,.54,.52,.54 C.48,.54,.46,.55,.43,.56 C.4,.57,.39,.59,.39,.6 C.39,.63,.41,.64,.46,.66 L.46,.82 L.57,.82",type:0}},"\uE0B0":{type:7,data:{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2}},"\uE0B1":{type:7,data:{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1}},"\uE0B2":{type:7,data:{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2}},"\uE0B3":{type:7,data:{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1}},"\uE0B4":{type:7,data:{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1}},"\uE0B5":{type:7,data:{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1}},"\uE0B6":{type:7,data:{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1}},"\uE0B7":{type:7,data:{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1}},"\uE0B8":{type:7,data:{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0}},"\uE0B9":{type:7,data:{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1}},"\uE0BA":{type:7,data:{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0}},"\uE0BB":{type:7,data:{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1}},"\uE0BC":{type:7,data:{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0}},"\uE0BD":{type:7,data:{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1}},"\uE0BE":{type:7,data:{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},"\uE0BF":{type:7,data:{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1}},"\u{1FB00}":I(1),"\u{1FB01}":I(2),"\u{1FB02}":I(3),"\u{1FB03}":I(4),"\u{1FB04}":I(5),"\u{1FB05}":I(6),"\u{1FB06}":I(7),"\u{1FB07}":I(8),"\u{1FB08}":I(9),"\u{1FB09}":I(10),"\u{1FB0A}":I(11),"\u{1FB0B}":I(12),"\u{1FB0C}":I(13),"\u{1FB0D}":I(14),"\u{1FB0E}":I(15),"\u{1FB0F}":I(16),"\u{1FB10}":I(17),"\u{1FB11}":I(18),"\u{1FB12}":I(19),"\u{1FB13}":I(20),"\u{1FB14}":I(22),"\u{1FB15}":I(23),"\u{1FB16}":I(24),"\u{1FB17}":I(25),"\u{1FB18}":I(26),"\u{1FB19}":I(27),"\u{1FB1A}":I(28),"\u{1FB1B}":I(29),"\u{1FB1C}":I(30),"\u{1FB1D}":I(31),"\u{1FB1E}":I(32),"\u{1FB1F}":I(33),"\u{1FB20}":I(34),"\u{1FB21}":I(35),"\u{1FB22}":I(36),"\u{1FB23}":I(37),"\u{1FB24}":I(38),"\u{1FB25}":I(39),"\u{1FB26}":I(40),"\u{1FB27}":I(41),"\u{1FB28}":I(43),"\u{1FB29}":I(44),"\u{1FB2A}":I(45),"\u{1FB2B}":I(46),"\u{1FB2C}":I(47),"\u{1FB2D}":I(48),"\u{1FB2E}":I(49),"\u{1FB2F}":I(50),"\u{1FB30}":I(51),"\u{1FB31}":I(52),"\u{1FB32}":I(53),"\u{1FB33}":I(54),"\u{1FB34}":I(55),"\u{1FB35}":I(56),"\u{1FB36}":I(57),"\u{1FB37}":I(58),"\u{1FB38}":I(59),"\u{1FB39}":I(60),"\u{1FB3A}":I(61),"\u{1FB3B}":I(62),"\u{1FB3C}":{type:6,data:"M0,0.6667 L0,1 L0.5,1 Z"},"\u{1FB3D}":{type:6,data:"M0,0.6667 L0,1 L1,1 Z"},"\u{1FB3E}":{type:6,data:"M0,0.3333 L0,1 L0.5,1 Z"},"\u{1FB3F}":{type:6,data:"M0,0.3333 L0,1 L1,1 Z"},"\u{1FB40}":{type:6,data:"M0,0 L0,1 L0.5,1 Z"},"\u{1FB41}":{type:6,data:"M0,0.3333 L0.5,0 L1,0 L1,1 L0,1 Z"},"\u{1FB42}":{type:6,data:"M0,0.3333 L1,0 L1,1 L0,1 Z"},"\u{1FB43}":{type:6,data:"M0,0.6667 L0.5,0 L1,0 L1,1 L0,1 Z"},"\u{1FB44}":{type:6,data:"M0,0.6667 L1,0 L1,1 L0,1 Z"},"\u{1FB45}":{type:6,data:"M0,1 L0.5,0 L1,0 L1,1 Z"},"\u{1FB46}":{type:6,data:"M0,0.6667 L1,0.3333 L1,1 L0,1 Z"},"\u{1FB47}":{type:6,data:"M0.5,1 L1,0.6667 L1,1 Z"},"\u{1FB48}":{type:6,data:"M0,1 L1,0.6667 L1,1 Z"},"\u{1FB49}":{type:6,data:"M0.5,1 L1,0.3333 L1,1 Z"},"\u{1FB4A}":{type:6,data:"M0,1 L1,0.3333 L1,1 Z"},"\u{1FB4B}":{type:6,data:"M0.5,1 L1,0 L1,1 Z"},"\u{1FB4C}":{type:6,data:"M0.5,0 L0,0 L0,1 L1,1 L1,0.3333 Z"},"\u{1FB4D}":{type:6,data:"M0,0 L0,1 L1,1 L1,0.3333 Z"},"\u{1FB4E}":{type:6,data:"M0.5,0 L0,0 L0,1 L1,1 L1,0.6667 Z"},"\u{1FB4F}":{type:6,data:"M0,0 L0,1 L1,1 L1,0.6667 Z"},"\u{1FB50}":{type:6,data:"M0.5,0 L0,0 L0,1 L1,1 Z"},"\u{1FB51}":{type:6,data:"M0,0.3333 L0,1 L1,1 L1,0.6667 Z"},"\u{1FB52}":{type:6,data:"M0,0.6667 L0.5,1 L1,1 L1,0 L0,0 Z"},"\u{1FB53}":{type:6,data:"M0,0.6667 L1,1 L1,0 L0,0 Z"},"\u{1FB54}":{type:6,data:"M0,0.3333 L0.5,1 L1,1 L1,0 L0,0 Z"},"\u{1FB55}":{type:6,data:"M0,0.3333 L1,1 L1,0 L0,0 Z"},"\u{1FB56}":{type:6,data:"M0,0 L0.5,1 L1,1 L1,0 Z"},"\u{1FB57}":{type:6,data:"M0,0.3333 L0,0 L0.5,0 Z"},"\u{1FB58}":{type:6,data:"M0,0.3333 L0,0 L1,0 Z"},"\u{1FB59}":{type:6,data:"M0,0.6667 L0,0 L0.5,0 Z"},"\u{1FB5A}":{type:6,data:"M0,0.6667 L0,0 L1,0 Z"},"\u{1FB5B}":{type:6,data:"M0,1 L0,0 L0.5,0 Z"},"\u{1FB5C}":{type:6,data:"M0,0.6667 L0,0 L1,0 L1,0.3333 Z"},"\u{1FB5D}":{type:6,data:"M0.5,1 L0,1 L0,0 L1,0 L1,0.6667 Z"},"\u{1FB5E}":{type:6,data:"M0,1 L0,0 L1,0 L1,0.6667 Z"},"\u{1FB5F}":{type:6,data:"M0.5,1 L0,1 L0,0 L1,0 L1,0.3333 Z"},"\u{1FB60}":{type:6,data:"M0,1 L0,0 L1,0 L1,0.3333 Z"},"\u{1FB61}":{type:6,data:"M0.5,1 L0,1 L0,0 L1,0 Z"},"\u{1FB62}":{type:6,data:"M0.5,0 L1,0 L1,0.3333 Z"},"\u{1FB63}":{type:6,data:"M0,0 L1,0 L1,0.3333 Z"},"\u{1FB64}":{type:6,data:"M0.5,0 L1,0 L1,0.6667 Z"},"\u{1FB65}":{type:6,data:"M0,0 L1,0 L1,0.6667 Z"},"\u{1FB66}":{type:6,data:"M0.5,0 L1,0 L1,1 Z"},"\u{1FB67}":{type:6,data:"M0,0.3333 L1,0.6667 L1,0 L0,0 Z"},"\u{1FB68}":{type:6,data:"M0,0 L1,0 L1,1 L0,1 L0.5,0.5 Z"},"\u{1FB69}":{type:6,data:"M0,0 L0.5,0.5 L1,0 L1,1 L0,1 Z"},"\u{1FB6A}":{type:6,data:"M0,0 L1,0 L0.5,0.5 L1,1 L0,1 Z"},"\u{1FB6B}":{type:6,data:"M0,0 L1,0 L1,1 L0.5,0.5 L0,1 Z"},"\u{1FB6C}":{type:6,data:"M0,0 L0.5,0.5 L0,1 Z"},"\u{1FB6D}":{type:6,data:"M0,0 L1,0 L0.5,0.5 Z"},"\u{1FB6E}":{type:6,data:"M1,0 L1,1 L0.5,0.5 Z"},"\u{1FB6F}":{type:6,data:"M0,1 L1,1 L0.5,0.5 Z"},"\u{1FB70}":{type:0,data:[{x:1,y:0,w:1,h:8}]},"\u{1FB71}":{type:0,data:[{x:2,y:0,w:1,h:8}]},"\u{1FB72}":{type:0,data:[{x:3,y:0,w:1,h:8}]},"\u{1FB73}":{type:0,data:[{x:4,y:0,w:1,h:8}]},"\u{1FB74}":{type:0,data:[{x:5,y:0,w:1,h:8}]},"\u{1FB75}":{type:0,data:[{x:6,y:0,w:1,h:8}]},"\u{1FB76}":{type:0,data:[{x:0,y:1,w:8,h:1}]},"\u{1FB77}":{type:0,data:[{x:0,y:2,w:8,h:1}]},"\u{1FB78}":{type:0,data:[{x:0,y:3,w:8,h:1}]},"\u{1FB79}":{type:0,data:[{x:0,y:4,w:8,h:1}]},"\u{1FB7A}":{type:0,data:[{x:0,y:5,w:8,h:1}]},"\u{1FB7B}":{type:0,data:[{x:0,y:6,w:8,h:1}]},"\u{1FB7C}":{type:0,data:[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}]},"\u{1FB7D}":{type:0,data:[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}]},"\u{1FB7E}":{type:0,data:[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}]},"\u{1FB7F}":{type:0,data:[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}]},"\u{1FB80}":{type:0,data:[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}]},"\u{1FB81}":{type:0,data:[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}]},"\u{1FB82}":{type:0,data:[{x:0,y:0,w:8,h:2}]},"\u{1FB83}":{type:0,data:[{x:0,y:0,w:8,h:3}]},"\u{1FB84}":{type:0,data:[{x:0,y:0,w:8,h:5}]},"\u{1FB85}":{type:0,data:[{x:0,y:0,w:8,h:6}]},"\u{1FB86}":{type:0,data:[{x:0,y:0,w:8,h:7}]},"\u{1FB87}":{type:0,data:[{x:6,y:0,w:2,h:8}]},"\u{1FB88}":{type:0,data:[{x:5,y:0,w:3,h:8}]},"\u{1FB89}":{type:0,data:[{x:3,y:0,w:5,h:8}]},"\u{1FB8A}":{type:0,data:[{x:2,y:0,w:6,h:8}]},"\u{1FB8B}":{type:0,data:[{x:1,y:0,w:7,h:8}]},"\u{1FB8C}":{type:2,data:[[[1,0],[0,1]],[0,0,.5,1]]},"\u{1FB8D}":{type:2,data:[[[1,0],[0,1]],[.5,0,.5,1]]},"\u{1FB8E}":{type:2,data:[[[1,0],[0,1]],[0,0,1,.5]]},"\u{1FB8F}":{type:2,data:[[[1,0],[0,1]],[0,.5,1,.5]]},"\u{1FB90}":{type:2,data:[[[0,1],[1,0]],[0,0,1,1]]},"\u{1FB91}":{type:3,data:{pattern:[[[0,1],[1,0]],[0,.5,1,.5]],vectors:[{x:0,y:0,w:8,h:4}]}},"\u{1FB92}":{type:3,data:{pattern:[[[0,1],[1,0]],[0,0,1,.5]],vectors:[{x:0,y:4,w:8,h:4}]}},"\u{1FB94}":{type:3,data:{pattern:[[[0,1],[1,0]],[0,0,.5,1]],vectors:[{x:4,y:0,w:4,h:8}]}},"\u{1FB95}":{type:0,data:[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}]},"\u{1FB96}":{type:0,data:[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}]},"\u{1FB97}":{type:0,data:[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]}};function I(i){return{type:4,data:()=>{let e=[],n=[.375,.25,.375],s=[0,3/8,5/8];for(let o=0;o<3;o++){let r=i>>o*2&1,a=i>>o*2+1&1;r&&a?e.push(`M0,${s[o]} L1,${s[o]} L1,${s[o]+n[o]} L0,${s[o]+n[o]} Z`):r?e.push(`M0,${s[o]} L${.5},${s[o]} L${.5},${s[o]+n[o]} L0,${s[o]+n[o]} Z`):a&&e.push(`M${.5},${s[o]} L1,${s[o]} L1,${s[o]+n[o]} L${.5},${s[o]+n[o]} Z`)}return e.join(" ")}}}function On(i,e,t,n,s,o,r,a){let l=En[e];if(l)switch(l.type){case 0:return xn(i,l.data,t,n,s,o),!0;case 1:return An(i,l.data,t,n,s,o),!0;case 2:return yn(i,l.data,t,n,s,o),!0;case 3:return yn(i,l.data.pattern,t,n,s,o),xn(i,l.data.vectors,t,n,s,o),!0;case 4:case 6:return Vr(i,l.data,t,n,s,o),!0;case 7:return qr(i,l.data,t,n,s,o,r,a),!0;case 5:return zr(i,l.data,t,n,s,o,a),!0}return!1}function xn(i,e,t,n,s,o){for(let r=0;r<e.length;r++){let a=e[r],l=s/8,u=o/8;i.fillRect(t+a.x*l,n+a.y*u,a.w*l,a.h*u)}}function Vr(i,e,t,n,s,o){let r=typeof e=="string"?e:e(0,0);i.beginPath();for(let a of r.split(" ")){let l=a[0],u=a.substring(1).split(",");if(!u[0]||!u[1]){l==="Z"&&i.closePath();continue}let c=u.map((d,h)=>{let p=parseFloat(d);return h%2===0?t+p*s:n+p*o});l==="M"?i.moveTo(c[0],c[1]):l==="L"&&i.lineTo(c[0],c[1])}i.fill()}var In=new Map;function An(i,e,t,n,s,o){let r=In.get(e);r||(r=new Map,In.set(e,r));let a=i.fillStyle;if(typeof a!="string")throw new Error(`Unexpected fillStyle type "${a}"`);let l=r.get(a);if(!l){let u=e[0].length,c=e.length,d=i.canvas.ownerDocument.createElement("canvas");d.width=u,d.height=c;let h=P(d.getContext("2d")),p=new ImageData(u,c),L,O,D,j;if(a.startsWith("#"))L=parseInt(a.slice(1,3),16),O=parseInt(a.slice(3,5),16),D=parseInt(a.slice(5,7),16),j=a.length>7&&parseInt(a.slice(7,9),16)||1;else if(a.startsWith("rgba"))[L,O,D,j]=a.substring(5,a.length-1).split(",").map(F=>parseFloat(F));else throw new Error(`Unexpected fillStyle color format "${a}" when drawing pattern glyph`);for(let F=0;F<c;F++)for(let C=0;C<u;C++)p.data[(F*u+C)*4]=L,p.data[(F*u+C)*4+1]=O,p.data[(F*u+C)*4+2]=D,p.data[(F*u+C)*4+3]=e[F][C]*(j*255);h.putImageData(p,0,0),l=P(i.createPattern(d,null)),r.set(a,l)}i.fillStyle=l,i.fillRect(t,n,s,o)}function yn(i,e,t,n,s,o){let[r,a]=e,[l,u,c,d]=a,h=Math.round(t+l*s),p=Math.round(n+u*o),L=Math.round(c*s),O=Math.round(d*o);i.save(),i.beginPath(),i.rect(h,p,L,O),i.clip(),An(i,r,t,n,s,o),i.restore()}function zr(i,e,t,n,s,o,r){i.strokeStyle=i.fillStyle;for(let[a,l]of Object.entries(e)){i.beginPath(),i.lineWidth=r*Number.parseInt(a);let u;if(typeof l=="function"){let d=.15/o*s;u=l(.15,d)}else u=l;for(let c of u.split(" ")){let d=c[0],h=Rn[d];if(!h){console.error(`Could not find drawing instructions for "${d}"`);continue}let p=c.substring(1).split(",");!p[0]||!p[1]||h(i,wn(p,s,o,t,n,!0,r))}i.stroke(),i.closePath()}}function qr(i,e,t,n,s,o,r,a){let l=new Path2D;l.rect(t,n,s,o),i.clip(l),i.beginPath();let u=r/12;i.lineWidth=a*u;for(let c of e.d.split(" ")){let d=c[0],h=Rn[d];if(!h){console.error(`Could not find drawing instructions for "${d}"`);continue}let p=c.substring(1).split(",");!p[0]||!p[1]||h(i,wn(p,s,o,t,n,!1,a,(e.leftPadding??0)*(u/2),(e.rightPadding??0)*(u/2)))}e.type===1?(i.strokeStyle=i.fillStyle,i.stroke()):i.fill(),i.closePath()}function Ln(i,e,t=0){return Math.max(Math.min(i,e),t)}var Rn={C:(i,e)=>i.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]),L:(i,e)=>i.lineTo(e[0],e[1]),M:(i,e)=>i.moveTo(e[0],e[1])};function wn(i,e,t,n,s,o,r,a=0,l=0){let u=i.map(c=>parseFloat(c)||parseInt(c));if(u.length<2)throw new Error("Too few arguments for instruction");for(let c=0;c<u.length;c+=2)u[c]*=e-a*r-l*r,o&&u[c]!==0&&(u[c]=Ln(Math.round(u[c]+.5)-.5,e,0)),u[c]+=n+a*r;for(let c=1;c<u.length;c+=2)u[c]*=t,o&&u[c]!==0&&(u[c]=Ln(Math.round(u[c]+.5)-.5,t,0)),u[c]+=s;return u}var Ft=class{constructor(){this._data={}}set(e,t,n){this._data[e]||(this._data[e]={}),this._data[e][t]=n}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},tt=class{constructor(){this._data=new Ft}set(e,t,n,s,o){this._data.get(e,t)||this._data.set(e,t,new Ft),this._data.get(e,t).set(n,s,o)}get(e,t,n,s){return this._data.get(e,t)?.get(n,s)}clear(){this._data.clear()}};var St=class{constructor(){this._tasks=[];this._i=0}enqueue(e){this._tasks.push(e),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(e){this._idleCallback=void 0;let t=0,n=0,s=e.timeRemaining(),o=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),n=Math.max(t,n),o=e.timeRemaining(),n*1.5>o){s-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s-t))}ms`),this._start();return}s=o}this.clear()}},vi=class extends St{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},Ei=class extends St{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},Dn=!Lt&&"requestIdleCallback"in window?Ei:vi;var pe=class i{constructor(){this.fg=0;this.bg=0;this.extended=new it}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let e=new i;return e.fg=this.fg,e.bg=this.bg,e.extended=this.extended.clone(),e}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},it=class i{constructor(e=0,t=0){this._ext=0;this._urlId=0;this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new i(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}};var Ue=class Ue{constructor(e){this.element=e,this.next=Ue.Undefined,this.prev=Ue.Undefined}};Ue.Undefined=new Ue(void 0);var Mn=Ue;var jr=globalThis.performance&&typeof globalThis.performance.now=="function",Pt=class i{static create(e){return new i(e)}constructor(e){this._now=jr&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};var Xr=!1,Fn=!1,Zr=!1,te;(oe=>{oe.None=()=>H.None;function e(b){if(Zr){let{onDidAddListener:_}=b,v=nt.create(),T=0;b.onDidAddListener=()=>{++T===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),v.print()),_?.()}}}function t(b,_){return h(b,()=>{},0,void 0,!0,void 0,_)}oe.defer=t;function n(b){return(_,v=null,T)=>{let m=!1,f;return f=b(g=>{if(!m)return f?f.dispose():m=!0,_.call(v,g)},null,T),m&&f.dispose(),f}}oe.once=n;function s(b,_,v){return c((T,m=null,f)=>b(g=>T.call(m,_(g)),null,f),v)}oe.map=s;function o(b,_,v){return c((T,m=null,f)=>b(g=>{_(g),T.call(m,g)},null,f),v)}oe.forEach=o;function r(b,_,v){return c((T,m=null,f)=>b(g=>_(g)&&T.call(m,g),null,f),v)}oe.filter=r;function a(b){return b}oe.signal=a;function l(...b){return(_,v=null,T)=>{let m=yt(...b.map(f=>f(g=>_.call(v,g))));return d(m,T)}}oe.any=l;function u(b,_,v,T){let m=v;return s(b,f=>(m=_(m,f),m),T)}oe.reduce=u;function c(b,_){let v,T={onWillAddFirstListener(){v=b(m.fire,m)},onDidRemoveLastListener(){v?.dispose()}};_||e(T);let m=new w(T);return _?.add(m),m.event}function d(b,_){return _ instanceof Array?_.push(b):_&&_.add(b),b}function h(b,_,v=100,T=!1,m=!1,f,g){let E,R,K,B=0,he,Re={leakWarningThreshold:f,onWillAddFirstListener(){E=b(ne=>{B++,R=_(R,ne),T&&!K&&(ae.fire(R),R=void 0),he=()=>{let W=R;R=void 0,K=void 0,(!T||B>1)&&ae.fire(W),B=0},typeof v=="number"?(clearTimeout(K),K=setTimeout(he,v)):K===void 0&&(K=0,queueMicrotask(he))})},onWillRemoveListener(){m&&B>0&&he?.()},onDidRemoveLastListener(){he=void 0,E.dispose()}};g||e(Re);let ae=new w(Re);return g?.add(ae),ae.event}oe.debounce=h;function p(b,_=0,v){return oe.debounce(b,(T,m)=>T?(T.push(m),T):[m],_,void 0,!0,void 0,v)}oe.accumulate=p;function L(b,_=(T,m)=>T===m,v){let T=!0,m;return r(b,f=>{let g=T||!_(f,m);return T=!1,m=f,g},v)}oe.latch=L;function O(b,_,v){return[oe.filter(b,_,v),oe.filter(b,T=>!_(T),v)]}oe.split=O;function D(b,_=!1,v=[],T){let m=v.slice(),f=b(R=>{m?m.push(R):E.fire(R)});T&&T.add(f);let g=()=>{m?.forEach(R=>E.fire(R)),m=null},E=new w({onWillAddFirstListener(){f||(f=b(R=>E.fire(R)),T&&T.add(f))},onDidAddFirstListener(){m&&(_?setTimeout(g):g())},onDidRemoveLastListener(){f&&f.dispose(),f=null}});return T&&T.add(E),E.event}oe.buffer=D;function j(b,_){return(T,m,f)=>{let g=_(new C);return b(function(E){let R=g.evaluate(E);R!==F&&T.call(m,R)},void 0,f)}}oe.chain=j;let F=Symbol("HaltChainable");class C{constructor(){this.steps=[]}map(_){return this.steps.push(_),this}forEach(_){return this.steps.push(v=>(_(v),v)),this}filter(_){return this.steps.push(v=>_(v)?v:F),this}reduce(_,v){let T=v;return this.steps.push(m=>(T=_(T,m),T)),this}latch(_=(v,T)=>v===T){let v=!0,T;return this.steps.push(m=>{let f=v||!_(m,T);return v=!1,T=m,f?m:F}),this}evaluate(_){for(let v of this.steps)if(_=v(_),_===F)break;return _}}function x(b,_,v=T=>T){let T=(...E)=>g.fire(v(...E)),m=()=>b.on(_,T),f=()=>b.removeListener(_,T),g=new w({onWillAddFirstListener:m,onDidRemoveLastListener:f});return g.event}oe.fromNodeEventEmitter=x;function y(b,_,v=T=>T){let T=(...E)=>g.fire(v(...E)),m=()=>b.addEventListener(_,T),f=()=>b.removeEventListener(_,T),g=new w({onWillAddFirstListener:m,onDidRemoveLastListener:f});return g.event}oe.fromDOMEventEmitter=y;function A(b){return new Promise(_=>n(b)(_))}oe.toPromise=A;function G(b){let _=new w;return b.then(v=>{_.fire(v)},()=>{_.fire(void 0)}).finally(()=>{_.dispose()}),_.event}oe.fromPromise=G;function ce(b,_){return b(v=>_.fire(v))}oe.forward=ce;function Fe(b,_,v){return _(v),b(T=>_(T))}oe.runAndSubscribe=Fe;class de{constructor(_,v){this._observable=_;this._counter=0;this._hasChanged=!1;let T={onWillAddFirstListener:()=>{_.addObserver(this)},onDidRemoveLastListener:()=>{_.removeObserver(this)}};v||e(T),this.emitter=new w(T),v&&v.add(this.emitter)}beginUpdate(_){this._counter++}handlePossibleChange(_){}handleChange(_,v){this._hasChanged=!0}endUpdate(_){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Ae(b,_){return new de(b,_).emitter.event}oe.fromObservable=Ae;function M(b){return(_,v,T)=>{let m=0,f=!1,g={beginUpdate(){m++},endUpdate(){m--,m===0&&(b.reportChanges(),f&&(f=!1,_.call(v)))},handlePossibleChange(){},handleChange(){f=!0}};b.addObserver(g),b.reportChanges();let E={dispose(){b.removeObserver(g)}};return T instanceof me?T.add(E):Array.isArray(T)&&T.push(E),E}}oe.fromObservableLight=M})(te||={});var Ce=class Ce{constructor(e){this.listenerCount=0;this.invocationCount=0;this.elapsedOverall=0;this.durations=[];this.name=`${e}_${Ce._idPool++}`,Ce.all.add(this)}start(e){this._stopWatch=new Pt,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};Ce.all=new Set,Ce._idPool=0;var xi=Ce,Sn=-1;var Bt=class Bt{constructor(e,t,n=(Bt._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e;this.threshold=t;this.name=n;this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){let n=this.threshold;if(n<=0||t<n)return;this._stacks||(this._stacks=new Map);let s=this._stacks.get(e.value)||0;if(this._stacks.set(e.value,s+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[o,r]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${t} listeners already. MOST frequent listener (${r}):`;console.warn(a),console.warn(o);let l=new yi(a,o);this._errorHandler(l)}return()=>{let o=this._stacks.get(e.value)||0;this._stacks.set(e.value,o-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(let[n,s]of this._stacks)(!e||t<s)&&(e=[n,s],t=s);return e}};Bt._idPool=1;var Ii=Bt,nt=class i{constructor(e){this.value=e}static create(){let e=new Error;return new i(e.stack??"")}print(){console.warn(this.value.split(`
|
|
38
|
+
`),{leaks:n,details:s}}};Et.idx=0;var cn=Et;function Hr(i){ke=i}if(Nr){let i="__is_disposable_tracked__";Hr(new class{trackDisposable(e){let t=new Error("Potentially leaked disposable").stack;setTimeout(()=>{e[i]||console.log(t)},3e3)}setParent(e,t){if(e&&e!==k.None)try{e[i]=!0}catch{}}markAsDisposed(e){if(e&&e!==k.None)try{e[i]=!0}catch{}}markAsSingleton(e){}})}function It(i){return ke?.trackDisposable(i),i}function yt(i){ke?.markAsDisposed(i)}function Je(i,e){ke?.setParent(i,e)}function Br(i,e){if(ke)for(let t of i)ke.setParent(t,e)}function dn(i){if(fi.is(i)){let e=[];for(let t of i)if(t)try{t.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(i)?[]:i}else if(i)return i.dispose(),i}function xt(...i){let e=P(()=>dn(i));return Br(i,e),e}function P(i){let e=It({dispose:mi(()=>{yt(e),i()})});return e}var Lt=class Lt{constructor(){this._toDispose=new Set;this._isDisposed=!1;It(this)}dispose(){this._isDisposed||(yt(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{dn(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return Je(e,this),this._isDisposed?Lt.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),Je(e,null))}};Lt.DISABLE_DISPOSED_WARNING=!1;var me=Lt,k=class{constructor(){this._store=new me;It(this),Je(this._store,this)}dispose(){yt(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};k.None=Object.freeze({dispose(){}});var Ee=class{constructor(){this._isDisposed=!1;It(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&Je(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,yt(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&Je(e,null),e}};var At=typeof process<"u"&&"title"in process,et=At?"node":navigator.userAgent,bi=At?"node":navigator.platform,hn=et.includes("Firefox"),pn=et.includes("Edge"),gi=/^((?!chrome|android).)*safari/i.test(et);function _n(){if(!gi)return 0;let i=et.match(/Version\/(\d+)/);return i===null||i.length<2?0:parseInt(i[1])}var po=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(bi);var _o=["Windows","Win16","Win32","WinCE"].includes(bi),To=bi.indexOf("Linux")>=0,mo=/\bCrOS\b/.test(et);var Tn="";var K=0,z=0,Z=0,G=0,te={css:"#00000000",rgba:0},X;(n=>{function i(r,o,s,a){return a!==void 0?`#${Pe(r)}${Pe(o)}${Pe(s)}${Pe(a)}`:`#${Pe(r)}${Pe(o)}${Pe(s)}`}n.toCss=i;function e(r,o,s,a=255){return(r<<24|o<<16|s<<8|a)>>>0}n.toRgba=e;function t(r,o,s,a){return{css:n.toCss(r,o,s,a),rgba:n.toRgba(r,o,s,a)}}n.toColor=t})(X||={});var Ce;(a=>{function i(l,u){if(G=(u.rgba&255)/255,G===1)return{css:u.css,rgba:u.rgba};let c=u.rgba>>24&255,d=u.rgba>>16&255,h=u.rgba>>8&255,p=l.rgba>>24&255,m=l.rgba>>16&255,_=l.rgba>>8&255;K=p+Math.round((c-p)*G),z=m+Math.round((d-m)*G),Z=_+Math.round((h-_)*G);let A=X.toCss(K,z,Z),M=X.toRgba(K,z,Z);return{css:A,rgba:M}}a.blend=i;function e(l){return(l.rgba&255)===255}a.isOpaque=e;function t(l,u,c){let d=Ie.ensureContrastRatio(l.rgba,u.rgba,c);if(d)return X.toColor(d>>24&255,d>>16&255,d>>8&255)}a.ensureContrastRatio=t;function n(l){let u=(l.rgba|255)>>>0;return[K,z,Z]=Ie.toChannels(u),{css:X.toCss(K,z,Z),rgba:u}}a.opaque=n;function r(l,u){return G=Math.round(u*255),[K,z,Z]=Ie.toChannels(l.rgba),{css:X.toCss(K,z,Z,G),rgba:X.toRgba(K,z,Z,G)}}a.opacity=r;function o(l,u){return G=l.rgba&255,r(l,G*u/255)}a.multiplyOpacity=o;function s(l){return[l.rgba>>24&255,l.rgba>>16&255,l.rgba>>8&255]}a.toColorRGB=s})(Ce||={});var Wr;(n=>{let i,e;try{let r=document.createElement("canvas");r.width=1,r.height=1;let o=r.getContext("2d",{willReadFrequently:!0});o&&(i=o,i.globalCompositeOperation="copy",e=i.createLinearGradient(0,0,1,1))}catch{}function t(r){if(r.match(/#[\da-f]{3,8}/i))switch(r.length){case 4:return K=parseInt(r.slice(1,2).repeat(2),16),z=parseInt(r.slice(2,3).repeat(2),16),Z=parseInt(r.slice(3,4).repeat(2),16),X.toColor(K,z,Z);case 5:return K=parseInt(r.slice(1,2).repeat(2),16),z=parseInt(r.slice(2,3).repeat(2),16),Z=parseInt(r.slice(3,4).repeat(2),16),G=parseInt(r.slice(4,5).repeat(2),16),X.toColor(K,z,Z,G);case 7:return{css:r,rgba:(parseInt(r.slice(1),16)<<8|255)>>>0};case 9:return{css:r,rgba:parseInt(r.slice(1),16)>>>0}}let o=r.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(o)return K=parseInt(o[1]),z=parseInt(o[2]),Z=parseInt(o[3]),G=Math.round((o[5]===void 0?1:parseFloat(o[5]))*255),X.toColor(K,z,Z,G);if(!i||!e)throw new Error("css.toColor: Unsupported css format");if(i.fillStyle=e,i.fillStyle=r,typeof i.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(i.fillRect(0,0,1,1),[K,z,Z,G]=i.getImageData(0,0,1,1).data,G!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:X.toRgba(K,z,Z,G),css:r}}n.toColor=t})(Wr||={});var Q;(t=>{function i(n){return e(n>>16&255,n>>8&255,n&255)}t.relativeLuminance=i;function e(n,r,o){let s=n/255,a=r/255,l=o/255,u=s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4),c=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),d=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4);return u*.2126+c*.7152+d*.0722}t.relativeLuminance2=e})(Q||={});var Ie;(o=>{function i(s,a){if(G=(a&255)/255,G===1)return a;let l=a>>24&255,u=a>>16&255,c=a>>8&255,d=s>>24&255,h=s>>16&255,p=s>>8&255;return K=d+Math.round((l-d)*G),z=h+Math.round((u-h)*G),Z=p+Math.round((c-p)*G),X.toRgba(K,z,Z)}o.blend=i;function e(s,a,l){let u=Q.relativeLuminance(s>>8),c=Q.relativeLuminance(a>>8);if(Le(u,c)<l){if(c<u){let m=t(s,a,l),_=Le(u,Q.relativeLuminance(m>>8));if(_<l){let A=n(s,a,l),M=Le(u,Q.relativeLuminance(A>>8));return _>M?m:A}return m}let h=n(s,a,l),p=Le(u,Q.relativeLuminance(h>>8));if(p<l){let m=t(s,a,l),_=Le(u,Q.relativeLuminance(m>>8));return p>_?h:m}return h}}o.ensureContrastRatio=e;function t(s,a,l){let u=s>>24&255,c=s>>16&255,d=s>>8&255,h=a>>24&255,p=a>>16&255,m=a>>8&255,_=Le(Q.relativeLuminance2(h,p,m),Q.relativeLuminance2(u,c,d));for(;_<l&&(h>0||p>0||m>0);)h-=Math.max(0,Math.ceil(h*.1)),p-=Math.max(0,Math.ceil(p*.1)),m-=Math.max(0,Math.ceil(m*.1)),_=Le(Q.relativeLuminance2(h,p,m),Q.relativeLuminance2(u,c,d));return(h<<24|p<<16|m<<8|255)>>>0}o.reduceLuminance=t;function n(s,a,l){let u=s>>24&255,c=s>>16&255,d=s>>8&255,h=a>>24&255,p=a>>16&255,m=a>>8&255,_=Le(Q.relativeLuminance2(h,p,m),Q.relativeLuminance2(u,c,d));for(;_<l&&(h<255||p<255||m<255);)h=Math.min(255,h+Math.ceil((255-h)*.1)),p=Math.min(255,p+Math.ceil((255-p)*.1)),m=Math.min(255,m+Math.ceil((255-m)*.1)),_=Le(Q.relativeLuminance2(h,p,m),Q.relativeLuminance2(u,c,d));return(h<<24|p<<16|m<<8|255)>>>0}o.increaseLuminance=n;function r(s){return[s>>24&255,s>>16&255,s>>8&255,s&255]}o.toChannels=r})(Ie||={});function Pe(i){let e=i.toString(16);return e.length<2?"0"+e:e}function Le(i,e){return i<e?(e+.05)/(i+.05):(i+.05)/(e+.05)}function N(i){if(!i)throw new Error("value must not be falsy");return i}function Rt(i){return 57508<=i&&i<=57558}function mn(i){return 57520<=i&&i<=57527}function kr(i){return 57344<=i&&i<=63743}function Cr(i){return 9472<=i&&i<=9631}function Ur(i){return i>=128512&&i<=128591||i>=127744&&i<=128511||i>=128640&&i<=128767||i>=9728&&i<=9983||i>=9984&&i<=10175||i>=65024&&i<=65039||i>=129280&&i<=129535||i>=127462&&i<=127487}function fn(i,e,t,n){return e===1&&t>Math.ceil(n*1.5)&&i!==void 0&&i>255&&!Ur(i)&&!Rt(i)&&!kr(i)}function Mt(i){return Rt(i)||Cr(i)}function bn(){return{css:{canvas:Ot(),cell:Ot()},device:{canvas:Ot(),cell:Ot(),char:{width:0,height:0,left:0,top:0}}}}function Ot(){return{width:0,height:0}}function gn(i,e,t=0){return(i-(Math.round(e)*2-t))%(Math.round(e)*2)}var j=0,q=0,fe=!1,ye=!1,Ft=!1,ie,vi=0,wt=class{constructor(e,t,n,r,o,s){this._terminal=e;this._optionService=t;this._selectionRenderModel=n;this._decorationService=r;this._coreBrowserService=o;this._themeService=s;this.result={fg:0,bg:0,ext:0}}resolve(e,t,n,r){if(this.result.bg=e.bg,this.result.fg=e.fg,this.result.ext=e.bg&268435456?e.extended.ext:0,q=0,j=0,ye=!1,fe=!1,Ft=!1,ie=this._themeService.colors,vi=0,e.getCode()!==0&&e.extended.underlineStyle===4){let s=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));vi=t*r%(Math.round(s)*2)}if(this._decorationService.forEachDecorationAtCell(t,n,"bottom",s=>{s.backgroundColorRGB&&(q=s.backgroundColorRGB.rgba>>8&16777215,ye=!0),s.foregroundColorRGB&&(j=s.foregroundColorRGB.rgba>>8&16777215,fe=!0)}),Ft=this._selectionRenderModel.isCellSelected(this._terminal,t,n),Ft){if(this.result.fg&67108864||(this.result.bg&50331648)!==0){if(this.result.fg&67108864)switch(this.result.fg&50331648){case 16777216:case 33554432:q=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:q=(this.result.fg&16777215)<<8|255;break;case 0:default:q=this._themeService.colors.foreground.rgba}else switch(this.result.bg&50331648){case 16777216:case 33554432:q=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:q=(this.result.bg&16777215)<<8|255;break}q=Ie.blend(q,(this._coreBrowserService.isFocused?ie.selectionBackgroundOpaque:ie.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}else q=(this._coreBrowserService.isFocused?ie.selectionBackgroundOpaque:ie.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(ye=!0,ie.selectionForeground&&(j=ie.selectionForeground.rgba>>8&16777215,fe=!0),Mt(e.getCode())){if(this.result.fg&67108864&&(this.result.bg&50331648)===0)j=(this._coreBrowserService.isFocused?ie.selectionBackgroundOpaque:ie.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(this.result.fg&67108864)switch(this.result.bg&50331648){case 16777216:case 33554432:j=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:j=(this.result.bg&16777215)<<8|255;break}else switch(this.result.fg&50331648){case 16777216:case 33554432:j=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:j=(this.result.fg&16777215)<<8|255;break;case 0:default:j=this._themeService.colors.foreground.rgba}j=Ie.blend(j,(this._coreBrowserService.isFocused?ie.selectionBackgroundOpaque:ie.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}fe=!0}}this._decorationService.forEachDecorationAtCell(t,n,"top",s=>{s.backgroundColorRGB&&(q=s.backgroundColorRGB.rgba>>8&16777215,ye=!0),s.foregroundColorRGB&&(j=s.foregroundColorRGB.rgba>>8&16777215,fe=!0)}),ye&&(Ft?q=e.bg&-16777216&-134217729|q|50331648:q=e.bg&-16777216|q|50331648),fe&&(j=e.fg&-16777216&-67108865|j|50331648),this.result.fg&67108864&&(ye&&!fe&&((this.result.bg&50331648)===0?j=this.result.fg&-134217728|ie.background.rgba>>8&16777215&16777215|50331648:j=this.result.fg&-134217728|this.result.bg&67108863,fe=!0),!ye&&fe&&((this.result.fg&50331648)===0?q=this.result.bg&-67108864|ie.foreground.rgba>>8&16777215&16777215|50331648:q=this.result.bg&-67108864|this.result.fg&67108863,ye=!0)),ie=void 0,this.result.bg=ye?q:this.result.bg,this.result.fg=fe?j:this.result.fg,this.result.ext&=536870911,this.result.ext|=vi<<29&3758096384}};var Ln=.5,Dt=hn||pn?"bottom":"ideographic";var In={"\u2500":{type:6,data:{1:"M0,.5 L1,.5"}},"\u2501":{type:6,data:{3:"M0,.5 L1,.5"}},"\u2502":{type:6,data:{1:"M.5,0 L.5,1"}},"\u2503":{type:6,data:{3:"M.5,0 L.5,1"}},"\u2504":{type:6,data:{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"}},"\u2505":{type:6,data:{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"}},"\u2506":{type:6,data:{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"}},"\u2507":{type:6,data:{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"}},"\u2508":{type:6,data:{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"}},"\u2509":{type:6,data:{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"}},"\u250A":{type:6,data:{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"}},"\u250B":{type:6,data:{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"}},"\u250C":{type:6,data:{1:"M0.5,1 L.5,.5 L1,.5"}},"\u250D":{type:6,data:{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"}},"\u250E":{type:6,data:{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"}},"\u250F":{type:6,data:{3:"M0.5,1 L.5,.5 L1,.5"}},"\u2510":{type:6,data:{1:"M0,.5 L.5,.5 L.5,1"}},"\u2511":{type:6,data:{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"}},"\u2512":{type:6,data:{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"}},"\u2513":{type:6,data:{3:"M0,.5 L.5,.5 L.5,1"}},"\u2514":{type:6,data:{1:"M.5,0 L.5,.5 L1,.5"}},"\u2515":{type:6,data:{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"}},"\u2516":{type:6,data:{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"}},"\u2517":{type:6,data:{3:"M.5,0 L.5,.5 L1,.5"}},"\u2518":{type:6,data:{1:"M.5,0 L.5,.5 L0,.5"}},"\u2519":{type:6,data:{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"}},"\u251A":{type:6,data:{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"}},"\u251B":{type:6,data:{3:"M.5,0 L.5,.5 L0,.5"}},"\u251C":{type:6,data:{1:"M.5,0 L.5,1 M.5,.5 L1,.5"}},"\u251D":{type:6,data:{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"}},"\u251E":{type:6,data:{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"}},"\u251F":{type:6,data:{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"}},"\u2520":{type:6,data:{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"}},"\u2521":{type:6,data:{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"}},"\u2522":{type:6,data:{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"}},"\u2523":{type:6,data:{3:"M.5,0 L.5,1 M.5,.5 L1,.5"}},"\u2524":{type:6,data:{1:"M.5,0 L.5,1 M.5,.5 L0,.5"}},"\u2525":{type:6,data:{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"}},"\u2526":{type:6,data:{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"}},"\u2527":{type:6,data:{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"}},"\u2528":{type:6,data:{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"}},"\u2529":{type:6,data:{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"}},"\u252A":{type:6,data:{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"}},"\u252B":{type:6,data:{3:"M.5,0 L.5,1 M.5,.5 L0,.5"}},"\u252C":{type:6,data:{1:"M0,.5 L1,.5 M.5,.5 L.5,1"}},"\u252D":{type:6,data:{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"}},"\u252E":{type:6,data:{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"}},"\u252F":{type:6,data:{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"}},"\u2530":{type:6,data:{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"}},"\u2531":{type:6,data:{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"}},"\u2532":{type:6,data:{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"}},"\u2533":{type:6,data:{3:"M0,.5 L1,.5 M.5,.5 L.5,1"}},"\u2534":{type:6,data:{1:"M0,.5 L1,.5 M.5,.5 L.5,0"}},"\u2535":{type:6,data:{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"}},"\u2536":{type:6,data:{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"}},"\u2537":{type:6,data:{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"}},"\u2538":{type:6,data:{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"}},"\u2539":{type:6,data:{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"}},"\u253A":{type:6,data:{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"}},"\u253B":{type:6,data:{3:"M0,.5 L1,.5 M.5,.5 L.5,0"}},"\u253C":{type:6,data:{1:"M0,.5 L1,.5 M.5,0 L.5,1"}},"\u253D":{type:6,data:{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"}},"\u253E":{type:6,data:{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"}},"\u253F":{type:6,data:{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"}},"\u2540":{type:6,data:{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"}},"\u2541":{type:6,data:{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"}},"\u2542":{type:6,data:{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"}},"\u2543":{type:6,data:{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"}},"\u2544":{type:6,data:{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"}},"\u2545":{type:6,data:{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"}},"\u2546":{type:6,data:{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"}},"\u2547":{type:6,data:{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"}},"\u2548":{type:6,data:{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"}},"\u2549":{type:6,data:{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"}},"\u254A":{type:6,data:{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"}},"\u254B":{type:6,data:{3:"M0,.5 L1,.5 M.5,0 L.5,1"}},"\u254C":{type:6,data:{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"}},"\u254D":{type:6,data:{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"}},"\u254E":{type:6,data:{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"}},"\u254F":{type:6,data:{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"}},"\u2550":{type:6,data:{1:(i,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`}},"\u2551":{type:6,data:{1:(i,e)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`}},"\u2552":{type:6,data:{1:(i,e)=>`M.5,1 L.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`}},"\u2553":{type:6,data:{1:(i,e)=>`M${.5-i},1 L${.5-i},.5 L1,.5 M${.5+i},.5 L${.5+i},1`}},"\u2554":{type:6,data:{1:(i,e)=>`M1,${.5-e} L${.5-i},${.5-e} L${.5-i},1 M1,${.5+e} L${.5+i},${.5+e} L${.5+i},1`}},"\u2555":{type:6,data:{1:(i,e)=>`M0,${.5-e} L.5,${.5-e} L.5,1 M0,${.5+e} L.5,${.5+e}`}},"\u2556":{type:6,data:{1:(i,e)=>`M${.5+i},1 L${.5+i},.5 L0,.5 M${.5-i},.5 L${.5-i},1`}},"\u2557":{type:6,data:{1:(i,e)=>`M0,${.5+e} L${.5-i},${.5+e} L${.5-i},1 M0,${.5-e} L${.5+i},${.5-e} L${.5+i},1`}},"\u2558":{type:6,data:{1:(i,e)=>`M.5,0 L.5,${.5+e} L1,${.5+e} M.5,${.5-e} L1,${.5-e}`}},"\u2559":{type:6,data:{1:(i,e)=>`M1,.5 L${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`}},"\u255A":{type:6,data:{1:(i,e)=>`M1,${.5-e} L${.5+i},${.5-e} L${.5+i},0 M1,${.5+e} L${.5-i},${.5+e} L${.5-i},0`}},"\u255B":{type:6,data:{1:(i,e)=>`M0,${.5+e} L.5,${.5+e} L.5,0 M0,${.5-e} L.5,${.5-e}`}},"\u255C":{type:6,data:{1:(i,e)=>`M0,.5 L${.5+i},.5 L${.5+i},0 M${.5-i},.5 L${.5-i},0`}},"\u255D":{type:6,data:{1:(i,e)=>`M0,${.5-e} L${.5-i},${.5-e} L${.5-i},0 M0,${.5+e} L${.5+i},${.5+e} L${.5+i},0`}},"\u255E":{type:6,data:{1:(i,e)=>`M.5,0 L.5,1 M.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`}},"\u255F":{type:6,data:{1:(i,e)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1 M${.5+i},.5 L1,.5`}},"\u2560":{type:6,data:{1:(i,e)=>`M${.5-i},0 L${.5-i},1 M1,${.5+e} L${.5+i},${.5+e} L${.5+i},1 M1,${.5-e} L${.5+i},${.5-e} L${.5+i},0`}},"\u2561":{type:6,data:{1:(i,e)=>`M.5,0 L.5,1 M0,${.5-e} L.5,${.5-e} M0,${.5+e} L.5,${.5+e}`}},"\u2562":{type:6,data:{1:(i,e)=>`M0,.5 L${.5-i},.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`}},"\u2563":{type:6,data:{1:(i,e)=>`M${.5+i},0 L${.5+i},1 M0,${.5+e} L${.5-i},${.5+e} L${.5-i},1 M0,${.5-e} L${.5-i},${.5-e} L${.5-i},0`}},"\u2564":{type:6,data:{1:(i,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e} M.5,${.5+e} L.5,1`}},"\u2565":{type:6,data:{1:(i,e)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},1 M${.5+i},.5 L${.5+i},1`}},"\u2566":{type:6,data:{1:(i,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L${.5-i},${.5+e} L${.5-i},1 M1,${.5+e} L${.5+i},${.5+e} L${.5+i},1`}},"\u2567":{type:6,data:{1:(i,e)=>`M.5,0 L.5,${.5-e} M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`}},"\u2568":{type:6,data:{1:(i,e)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`}},"\u2569":{type:6,data:{1:(i,e)=>`M0,${.5+e} L1,${.5+e} M0,${.5-e} L${.5-i},${.5-e} L${.5-i},0 M1,${.5-e} L${.5+i},${.5-e} L${.5+i},0`}},"\u256A":{type:6,data:{1:(i,e)=>`M.5,0 L.5,1 M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`}},"\u256B":{type:6,data:{1:(i,e)=>`M0,.5 L1,.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`}},"\u256C":{type:6,data:{1:(i,e)=>`M0,${.5+e} L${.5-i},${.5+e} L${.5-i},1 M1,${.5+e} L${.5+i},${.5+e} L${.5+i},1 M0,${.5-e} L${.5-i},${.5-e} L${.5-i},0 M1,${.5-e} L${.5+i},${.5-e} L${.5+i},0`}},"\u256D":{type:6,data:{1:(i,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,1,.5`}},"\u256E":{type:6,data:{1:(i,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,0,.5`}},"\u256F":{type:6,data:{1:(i,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,0,.5`}},"\u2570":{type:6,data:{1:(i,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,1,.5`}},"\u2571":{type:6,data:{1:"M1,0 L0,1"}},"\u2572":{type:6,data:{1:"M0,0 L1,1"}},"\u2573":{type:6,data:{1:"M1,0 L0,1 M0,0 L1,1"}},"\u2574":{type:6,data:{1:"M.5,.5 L0,.5"}},"\u2575":{type:6,data:{1:"M.5,.5 L.5,0"}},"\u2576":{type:6,data:{1:"M.5,.5 L1,.5"}},"\u2577":{type:6,data:{1:"M.5,.5 L.5,1"}},"\u2578":{type:6,data:{3:"M.5,.5 L0,.5"}},"\u2579":{type:6,data:{3:"M.5,.5 L.5,0"}},"\u257A":{type:6,data:{3:"M.5,.5 L1,.5"}},"\u257B":{type:6,data:{3:"M.5,.5 L.5,1"}},"\u257C":{type:6,data:{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"}},"\u257D":{type:6,data:{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"}},"\u257E":{type:6,data:{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"}},"\u257F":{type:6,data:{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"}},"\u2580":{type:0,data:[{x:0,y:0,w:8,h:4}]},"\u2581":{type:0,data:[{x:0,y:7,w:8,h:1}]},"\u2582":{type:0,data:[{x:0,y:6,w:8,h:2}]},"\u2583":{type:0,data:[{x:0,y:5,w:8,h:3}]},"\u2584":{type:0,data:[{x:0,y:4,w:8,h:4}]},"\u2585":{type:0,data:[{x:0,y:3,w:8,h:5}]},"\u2586":{type:0,data:[{x:0,y:2,w:8,h:6}]},"\u2587":{type:0,data:[{x:0,y:1,w:8,h:7}]},"\u2588":{type:0,data:[{x:0,y:0,w:8,h:8}]},"\u2589":{type:0,data:[{x:0,y:0,w:7,h:8}]},"\u258A":{type:0,data:[{x:0,y:0,w:6,h:8}]},"\u258B":{type:0,data:[{x:0,y:0,w:5,h:8}]},"\u258C":{type:0,data:[{x:0,y:0,w:4,h:8}]},"\u258D":{type:0,data:[{x:0,y:0,w:3,h:8}]},"\u258E":{type:0,data:[{x:0,y:0,w:2,h:8}]},"\u258F":{type:0,data:[{x:0,y:0,w:1,h:8}]},"\u2590":{type:0,data:[{x:4,y:0,w:4,h:8}]},"\u2591":{type:1,data:[[1,0],[0,0]]},"\u2592":{type:1,data:[[1,0],[0,1]]},"\u2593":{type:1,data:[[1,1],[1,0]]},"\u2594":{type:0,data:[{x:0,y:0,w:8,h:1}]},"\u2595":{type:0,data:[{x:7,y:0,w:1,h:8}]},"\u2596":{type:0,data:[{x:0,y:4,w:4,h:4}]},"\u2597":{type:0,data:[{x:4,y:4,w:4,h:4}]},"\u2598":{type:0,data:[{x:0,y:0,w:4,h:4}]},"\u2599":{type:0,data:[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}]},"\u259A":{type:0,data:[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}]},"\u259B":{type:0,data:[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}]},"\u259C":{type:0,data:[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}]},"\u259D":{type:0,data:[{x:4,y:0,w:4,h:4}]},"\u259E":{type:0,data:[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}]},"\u259F":{type:0,data:[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}]},"\uE0A0":{type:9,data:{d:"M.3,1 L.03,1 L.03,.88 C.03,.82,.06,.78,.11,.73 C.15,.7,.2,.68,.28,.65 L.43,.6 C.49,.58,.53,.56,.56,.53 C.59,.5,.6,.47,.6,.43 L.6,.27 L.4,.27 L.69,.1 L.98,.27 L.78,.27 L.78,.46 C.78,.52,.76,.56,.72,.61 C.68,.66,.63,.67,.56,.7 L.48,.72 C.42,.74,.38,.76,.35,.78 C.32,.8,.31,.84,.31,.88 L.31,1 M.3,.5 L.03,.59 L.03,.09 L.3,.09 L.3,.655",type:0}},"\uE0A1":{type:9,data:{d:"M.7,.4 L.7,.47 L.2,.47 L.2,.03 L.355,.03 L.355,.4 L.705,.4 M.7,.5 L.86,.5 L.86,.95 L.69,.95 L.44,.66 L.46,.86 L.46,.95 L.3,.95 L.3,.49 L.46,.49 L.71,.78 L.69,.565 L.69,.5",type:0}},"\uE0A2":{type:9,data:{d:"M.25,.94 C.16,.94,.11,.92,.11,.87 L.11,.53 C.11,.48,.15,.455,.23,.45 L.23,.3 C.23,.25,.26,.22,.31,.19 C.36,.16,.43,.15,.51,.15 C.59,.15,.66,.16,.71,.19 C.77,.22,.79,.26,.79,.3 L.79,.45 C.87,.45,.91,.48,.91,.53 L.91,.87 C.91,.92,.86,.94,.77,.94 L.24,.94 M.53,.2 C.49,.2,.45,.21,.42,.23 C.39,.25,.38,.27,.38,.3 L.38,.45 L.68,.45 L.68,.3 C.68,.27,.67,.25,.64,.23 C.61,.21,.58,.2,.53,.2 M.58,.82 L.58,.66 C.63,.65,.65,.63,.65,.6 C.65,.58,.64,.57,.61,.56 C.58,.55,.56,.54,.52,.54 C.48,.54,.46,.55,.43,.56 C.4,.57,.39,.59,.39,.6 C.39,.63,.41,.64,.46,.66 L.46,.82 L.57,.82",type:0}},"\uE0A3":{type:9,data:{d:"M.7,.4 L.7,.47 L.2,.47 L.2,.03 L.7,.03 L.7,.1 L.355,.1 L.355,.4 L.705,.4 M.7,.5 L.86,.5 L.86,.95 L.69,.95 L.44,.66 L.46,.86 L.46,.95 L.3,.95 L.3,.49 L.46,.49 L.71,.78 L.69,.565 L.69,.5",type:0}},"\uE0B0":{type:9,data:{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2}},"\uE0B1":{type:9,data:{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1}},"\uE0B2":{type:9,data:{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2}},"\uE0B3":{type:9,data:{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1}},"\uE0B4":{type:9,data:{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1}},"\uE0B5":{type:9,data:{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1}},"\uE0B6":{type:9,data:{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1}},"\uE0B7":{type:9,data:{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1}},"\uE0B8":{type:9,data:{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0}},"\uE0B9":{type:9,data:{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1}},"\uE0BA":{type:9,data:{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0}},"\uE0BB":{type:9,data:{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1}},"\uE0BC":{type:9,data:{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0}},"\uE0BD":{type:9,data:{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1}},"\uE0BE":{type:9,data:{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},"\uE0BF":{type:9,data:{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1}},"\u{1FB00}":O(1),"\u{1FB01}":O(2),"\u{1FB02}":O(3),"\u{1FB03}":O(4),"\u{1FB04}":O(5),"\u{1FB05}":O(6),"\u{1FB06}":O(7),"\u{1FB07}":O(8),"\u{1FB08}":O(9),"\u{1FB09}":O(10),"\u{1FB0A}":O(11),"\u{1FB0B}":O(12),"\u{1FB0C}":O(13),"\u{1FB0D}":O(14),"\u{1FB0E}":O(15),"\u{1FB0F}":O(16),"\u{1FB10}":O(17),"\u{1FB11}":O(18),"\u{1FB12}":O(19),"\u{1FB13}":O(20),"\u{1FB14}":O(22),"\u{1FB15}":O(23),"\u{1FB16}":O(24),"\u{1FB17}":O(25),"\u{1FB18}":O(26),"\u{1FB19}":O(27),"\u{1FB1A}":O(28),"\u{1FB1B}":O(29),"\u{1FB1C}":O(30),"\u{1FB1D}":O(31),"\u{1FB1E}":O(32),"\u{1FB1F}":O(33),"\u{1FB20}":O(34),"\u{1FB21}":O(35),"\u{1FB22}":O(36),"\u{1FB23}":O(37),"\u{1FB24}":O(38),"\u{1FB25}":O(39),"\u{1FB26}":O(40),"\u{1FB27}":O(41),"\u{1FB28}":O(43),"\u{1FB29}":O(44),"\u{1FB2A}":O(45),"\u{1FB2B}":O(46),"\u{1FB2C}":O(47),"\u{1FB2D}":O(48),"\u{1FB2E}":O(49),"\u{1FB2F}":O(50),"\u{1FB30}":O(51),"\u{1FB31}":O(52),"\u{1FB32}":O(53),"\u{1FB33}":O(54),"\u{1FB34}":O(55),"\u{1FB35}":O(56),"\u{1FB36}":O(57),"\u{1FB37}":O(58),"\u{1FB38}":O(59),"\u{1FB39}":O(60),"\u{1FB3A}":O(61),"\u{1FB3B}":O(62),"\u{1FB3C}":{type:7,data:"M0,0.6667 L0,1 L0.5,1 Z"},"\u{1FB3D}":{type:7,data:"M0,0.6667 L0,1 L1,1 Z"},"\u{1FB3E}":{type:7,data:"M0,0.3333 L0,1 L0.5,1 Z"},"\u{1FB3F}":{type:7,data:"M0,0.3333 L0,1 L1,1 Z"},"\u{1FB40}":{type:7,data:"M0,0 L0,1 L0.5,1 Z"},"\u{1FB41}":{type:7,data:"M0,0.3333 L0.5,0 L1,0 L1,1 L0,1 Z"},"\u{1FB42}":{type:7,data:"M0,0.3333 L1,0 L1,1 L0,1 Z"},"\u{1FB43}":{type:7,data:"M0,0.6667 L0.5,0 L1,0 L1,1 L0,1 Z"},"\u{1FB44}":{type:7,data:"M0,0.6667 L1,0 L1,1 L0,1 Z"},"\u{1FB45}":{type:7,data:"M0,1 L0.5,0 L1,0 L1,1 Z"},"\u{1FB46}":{type:7,data:"M0,0.6667 L1,0.3333 L1,1 L0,1 Z"},"\u{1FB47}":{type:7,data:"M0.5,1 L1,0.6667 L1,1 Z"},"\u{1FB48}":{type:7,data:"M0,1 L1,0.6667 L1,1 Z"},"\u{1FB49}":{type:7,data:"M0.5,1 L1,0.3333 L1,1 Z"},"\u{1FB4A}":{type:7,data:"M0,1 L1,0.3333 L1,1 Z"},"\u{1FB4B}":{type:7,data:"M0.5,1 L1,0 L1,1 Z"},"\u{1FB4C}":{type:7,data:"M0.5,0 L0,0 L0,1 L1,1 L1,0.3333 Z"},"\u{1FB4D}":{type:7,data:"M0,0 L0,1 L1,1 L1,0.3333 Z"},"\u{1FB4E}":{type:7,data:"M0.5,0 L0,0 L0,1 L1,1 L1,0.6667 Z"},"\u{1FB4F}":{type:7,data:"M0,0 L0,1 L1,1 L1,0.6667 Z"},"\u{1FB50}":{type:7,data:"M0.5,0 L0,0 L0,1 L1,1 Z"},"\u{1FB51}":{type:7,data:"M0,0.3333 L0,1 L1,1 L1,0.6667 Z"},"\u{1FB52}":{type:7,data:"M0,0.6667 L0.5,1 L1,1 L1,0 L0,0 Z"},"\u{1FB53}":{type:7,data:"M0,0.6667 L1,1 L1,0 L0,0 Z"},"\u{1FB54}":{type:7,data:"M0,0.3333 L0.5,1 L1,1 L1,0 L0,0 Z"},"\u{1FB55}":{type:7,data:"M0,0.3333 L1,1 L1,0 L0,0 Z"},"\u{1FB56}":{type:7,data:"M0,0 L0.5,1 L1,1 L1,0 Z"},"\u{1FB57}":{type:7,data:"M0,0.3333 L0,0 L0.5,0 Z"},"\u{1FB58}":{type:7,data:"M0,0.3333 L0,0 L1,0 Z"},"\u{1FB59}":{type:7,data:"M0,0.6667 L0,0 L0.5,0 Z"},"\u{1FB5A}":{type:7,data:"M0,0.6667 L0,0 L1,0 Z"},"\u{1FB5B}":{type:7,data:"M0,1 L0,0 L0.5,0 Z"},"\u{1FB5C}":{type:7,data:"M0,0.6667 L0,0 L1,0 L1,0.3333 Z"},"\u{1FB5D}":{type:7,data:"M0.5,1 L0,1 L0,0 L1,0 L1,0.6667 Z"},"\u{1FB5E}":{type:7,data:"M0,1 L0,0 L1,0 L1,0.6667 Z"},"\u{1FB5F}":{type:7,data:"M0.5,1 L0,1 L0,0 L1,0 L1,0.3333 Z"},"\u{1FB60}":{type:7,data:"M0,1 L0,0 L1,0 L1,0.3333 Z"},"\u{1FB61}":{type:7,data:"M0.5,1 L0,1 L0,0 L1,0 Z"},"\u{1FB62}":{type:7,data:"M0.5,0 L1,0 L1,0.3333 Z"},"\u{1FB63}":{type:7,data:"M0,0 L1,0 L1,0.3333 Z"},"\u{1FB64}":{type:7,data:"M0.5,0 L1,0 L1,0.6667 Z"},"\u{1FB65}":{type:7,data:"M0,0 L1,0 L1,0.6667 Z"},"\u{1FB66}":{type:7,data:"M0.5,0 L1,0 L1,1 Z"},"\u{1FB67}":{type:7,data:"M0,0.3333 L1,0.6667 L1,0 L0,0 Z"},"\u{1FB68}":{type:7,data:"M0,0 L1,0 L1,1 L0,1 L0.5,0.5 Z"},"\u{1FB69}":{type:7,data:"M0,0 L0.5,0.5 L1,0 L1,1 L0,1 Z"},"\u{1FB6A}":{type:7,data:"M0,0 L1,0 L0.5,0.5 L1,1 L0,1 Z"},"\u{1FB6B}":{type:7,data:"M0,0 L1,0 L1,1 L0.5,0.5 L0,1 Z"},"\u{1FB6C}":{type:7,data:"M0,0 L0.5,0.5 L0,1 Z"},"\u{1FB6D}":{type:7,data:"M0,0 L1,0 L0.5,0.5 Z"},"\u{1FB6E}":{type:7,data:"M1,0 L1,1 L0.5,0.5 Z"},"\u{1FB6F}":{type:7,data:"M0,1 L1,1 L0.5,0.5 Z"},"\u{1FB70}":{type:0,data:[{x:1,y:0,w:1,h:8}]},"\u{1FB71}":{type:0,data:[{x:2,y:0,w:1,h:8}]},"\u{1FB72}":{type:0,data:[{x:3,y:0,w:1,h:8}]},"\u{1FB73}":{type:0,data:[{x:4,y:0,w:1,h:8}]},"\u{1FB74}":{type:0,data:[{x:5,y:0,w:1,h:8}]},"\u{1FB75}":{type:0,data:[{x:6,y:0,w:1,h:8}]},"\u{1FB76}":{type:0,data:[{x:0,y:1,w:8,h:1}]},"\u{1FB77}":{type:0,data:[{x:0,y:2,w:8,h:1}]},"\u{1FB78}":{type:0,data:[{x:0,y:3,w:8,h:1}]},"\u{1FB79}":{type:0,data:[{x:0,y:4,w:8,h:1}]},"\u{1FB7A}":{type:0,data:[{x:0,y:5,w:8,h:1}]},"\u{1FB7B}":{type:0,data:[{x:0,y:6,w:8,h:1}]},"\u{1FB7C}":{type:0,data:[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}]},"\u{1FB7D}":{type:0,data:[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}]},"\u{1FB7E}":{type:0,data:[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}]},"\u{1FB7F}":{type:0,data:[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}]},"\u{1FB80}":{type:0,data:[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}]},"\u{1FB81}":{type:0,data:[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}]},"\u{1FB82}":{type:0,data:[{x:0,y:0,w:8,h:2}]},"\u{1FB83}":{type:0,data:[{x:0,y:0,w:8,h:3}]},"\u{1FB84}":{type:0,data:[{x:0,y:0,w:8,h:5}]},"\u{1FB85}":{type:0,data:[{x:0,y:0,w:8,h:6}]},"\u{1FB86}":{type:0,data:[{x:0,y:0,w:8,h:7}]},"\u{1FB87}":{type:0,data:[{x:6,y:0,w:2,h:8}]},"\u{1FB88}":{type:0,data:[{x:5,y:0,w:3,h:8}]},"\u{1FB89}":{type:0,data:[{x:3,y:0,w:5,h:8}]},"\u{1FB8A}":{type:0,data:[{x:2,y:0,w:6,h:8}]},"\u{1FB8B}":{type:0,data:[{x:1,y:0,w:7,h:8}]},"\u{1FB8C}":{type:2,data:[[[1,0],[0,1]],[0,0,.5,1]]},"\u{1FB8D}":{type:2,data:[[[1,0],[0,1]],[.5,0,.5,1]]},"\u{1FB8E}":{type:2,data:[[[1,0],[0,1]],[0,0,1,.5]]},"\u{1FB8F}":{type:2,data:[[[1,0],[0,1]],[0,.5,1,.5]]},"\u{1FB90}":{type:2,data:[[[0,1],[1,0]],[0,0,1,1]]},"\u{1FB91}":{type:3,data:{pattern:[[[0,1],[1,0]],[0,.5,1,.5]],vectors:[{x:0,y:0,w:8,h:4}]}},"\u{1FB92}":{type:3,data:{pattern:[[[0,1],[1,0]],[0,0,1,.5]],vectors:[{x:0,y:4,w:8,h:4}]}},"\u{1FB94}":{type:3,data:{pattern:[[[0,1],[1,0]],[0,0,.5,1]],vectors:[{x:4,y:0,w:4,h:8}]}},"\u{1FB95}":{type:0,data:[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}]},"\u{1FB96}":{type:0,data:[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}]},"\u{1FB97}":{type:0,data:[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]},"\u{1FB98}":{type:6,data:{1:"M0,0 L1,1 M0,.25 L.75,1 M0,.5 L.5,1 M0,.75 L.25,1 M.25,0 L1,.75 M.5,0 L1,.5 M.75,0 L1,.25"}},"\u{1FB99}":{type:6,data:{1:"M0,.25 L.25,0 M0,.5 L.5,0 M0,.75 L.75,0 M0,1 L1,0 M.25,1 L1,.25 M.5,1 L1,.5 M.75,1 L1,.75"}},"\u{1FB9A}":{type:9,data:{d:"M0,0 L.5,.5 L0,1 L1,1 L.5,.5 L1,0",type:0}},"\u{1FB9B}":{type:9,data:{d:"M0,0 L.5,.5 L1,0 L1,1 L.5,.5 L0,1",type:0}},"\u{1FB9C}":{type:4,data:[[[1,0],[0,1]],"M0,0 L1,0 L0,1 Z"]},"\u{1FB9D}":{type:4,data:[[[1,0],[0,1]],"M0,0 L1,0 L1,1 Z"]},"\u{1FB9E}":{type:4,data:[[[1,0],[0,1]],"M1,0 L1,1 L0,1 Z"]},"\u{1FB9F}":{type:4,data:[[[1,0],[0,1]],"M0,0 L1,1 L0,1 Z"]},"\u{1FBA0}":{type:6,data:{1:"M.5,0 L0,.5"}},"\u{1FBA1}":{type:6,data:{1:"M.5,0 L1,.5"}},"\u{1FBA2}":{type:6,data:{1:"M0,.5 L.5,1"}},"\u{1FBA3}":{type:6,data:{1:"M1,.5 L.5,1"}},"\u{1FBA4}":{type:6,data:{1:"M.5,0 L0,.5 L.5,1"}},"\u{1FBA5}":{type:6,data:{1:"M.5,0 L1,.5 L.5,1"}},"\u{1FBA6}":{type:6,data:{1:"M0,.5 L.5,1 L1,.5"}},"\u{1FBA7}":{type:6,data:{1:"M0,.5 L.5,0 L1,.5"}},"\u{1FBA8}":{type:6,data:{1:"M.5,0 L0,.5 M1,.5 L.5,1"}},"\u{1FBA9}":{type:6,data:{1:"M.5,0 L1,.5 M0,.5 L.5,1"}},"\u{1FBAA}":{type:6,data:{1:"M.5,0 L1,.5 L.5,1 L0,.5"}},"\u{1FBAB}":{type:6,data:{1:"M.5,0 L0,.5 L.5,1 L1,.5"}},"\u{1FBAC}":{type:6,data:{1:"M0,.5 L.5,0 L1,.5 L.5,1"}},"\u{1FBAD}":{type:6,data:{1:"M1,.5 L.5,0 L0,.5 L.5,1"}},"\u{1FBAE}":{type:6,data:{1:"M.5,0 L1,.5 L.5,1 L0,.5 Z"}},"\u{1FBAF}":{type:6,data:{1:"M0,.5 L1,.5 M.5,.35 L.5,.65"}},"\u{1FBB0}":{type:7,data:"M0.1,0.2 L0.1,.8 L.4,.6 L.9,0.6 Z"},"\u{1FBB1}":{type:8,data:{d:"M.1,.55 L.35,.85 L.9,.2",type:1}},"\u{1FBB2}":{type:7,data:"M.29,.27 L0.13,.56 L.22,.59 L.35,0.35 L.67,.35 L.57,.57 L.71,.76 L.22,.76 L.42,1 L.53,.98 L.43,.86 L.9,.86 L.71,.6 L1,.6 L1,.52 L.83,.52 L.92,.36 L1,.36 L1,.27Z M.99,.13 A.12,.12,0,1,1,.75,.13 A.12,.12,0,1,1,.99,.13"},"\u{1FBB3}":{type:7,data:"M0,.27 L.3,.27 L.55,.12 L.63,.18 L.33,.36 L0,.36 M0,.52 L.33,.52 L.59,.89 L.73,.89 L.73,.98 L.53,.98 L.28,.6 L0,.6"},"\u{1FBB4}":{type:8,data:{d:"M.15,.6 L.5,.4 L.5,.5 L.75,.5 L.75,.2 L.85,.2 L.85,.7 L.5,.7 L.5,.8 Z",type:0}},"\u{1FBB5}":{type:9,data:{d:"M0,0 L1,0 L1,.125 L0,.125 Z M0,.875 L1,.875 L1,1 L0,1 Z M.15,.5 L.5,.3 L.5,.4 L.85,.4 L.85,.6 L.5,.6 L.5,.7 Z",type:0}},"\u{1FBB6}":{type:9,data:{d:"M0,0 L1,0 L1,.125 L0,.125 Z M0,.875 L1,.875 L1,1 L0,1 Z M.85,.5 L.5,.3 L.5,.4 L.15,.4 L.15,.6 L.5,.6 L.5,.7 Z",type:0}},"\u{1FBB7}":{type:9,data:{d:"M.875,0 L1,0 L1,1 L.875,1 Z M.5,.85 L.3,.5 L.4,.5 L.4,.15 L.6,.15 L.6,.5 L.7,.5 Z",type:0}},"\u{1FBB8}":{type:9,data:{d:"M.875,0 L1,0 L1,1 L.875,1 Z M.5,.15 L.3,.5 L.4,.5 L.4,.85 L.6,.85 L.6,.5 L.7,.5 Z",type:0}},"\u{1FBB9}":{type:9,data:{d:"M1,.89 L.11,.89 L.11,.37 L.36,.12 L.74,.12 L.96,.34 L1,.34 L1,.45 L.92,.45 L.69,.22 L.41,.22 L.21,.42 L.21,.79 L1,.79 Z",type:0}},"\u{1FBBA}":{type:9,data:{d:"M0,.89 L0,.79 L.78,.79 L.78,.53 L.7,.45 L0,.45 L0,.35 L.75,.35 L.88,.48 L.88,.89 Z",type:0}},"\u{1FBBB}":{type:9,data:{d:"M.31,.05 L.44,.05 L.44,.44 L.05,.44 L.05,.31 L.31,.31 Z M.56,.05 L.69,.05 L.69,.31 L.95,.31 L.95,.44 L.56,.44 Z M.05,.56 L.44,.56 L.44,.95 L.31,.95 L.31,.69 L.05,.69 Z M.56,.56 L.95,.56 L.95,.69 L.69,.69 L.69,.95 L.56,.95 Z",type:0}},"\u{1FBBC}":{type:7,data:"M0,0 L1,0 L1,1 L0,1 L0,.87 L.87,.87 L.87,.13 L0,.13 Z M.67,.5 A.17,.17,0,1,1,.33,.5 A.17,.17,0,1,1,.67,.5"},"\u{1FBBD}":{type:8,data:{d:"M0,0 L.5,.5 L1,0 L1,1 L.5,.5 L0,1 Z",type:1}},"\u{1FBBE}":{type:8,data:{d:"M1,.5 L.5,1",type:1}},"\u{1FBBF}":{type:8,data:{d:"M.5,0 L1,.5 L.5,1 L0,.5 Z",type:1}},"\u{1FBC0}":{type:7,data:"M.16,.39 A.02,.02,0,0,1,.39,.16 L.5,.25 L.61,.16 A.02,.02,0,0,1,.84,.39 L.75,.5 L.84,.61 A.02,.02,0,0,1,.61,.84 L.5,.75 L.39,.84 A.02,.02,0,0,1,.16,.61 L.25,.5 Z M.24,.32 L.39,.5 L.24,.68 L.32,.76 L.5,.61 L.68,.76 L.76,.68 L.61,.5 L.76,.32 L.68,.24 L.5,.39 L.32,.24 Z"},"\u{1FBC1}":{type:7,data:"M0.142308,0.924 Q0.130770,0.924,0.120193,0.922 T0.101924,0.916 T0.089424,0.9065 T0.084616,0.895 V0.025 Q0.084616,0.019,0.089424,0.0135 T0.101924,0.004 T0.120193,-0.002 T0.142308,-0.004 Q0.150000,-0.004,0.157693,-0.003 T0.173078,0.000 L0.430770,0.085 Q0.451924,0.059,0.494232,0.041 T0.587501,0.013 T0.692309,-0.0005 T0.800001,-0.004 H1 V0.055 H0.800001 Q0.771155,0.055,0.742309,0.056 T0.685578,0.060 T0.630770,0.0685 T0.580770,0.0825 T0.543270,0.1045 T0.528847,0.133 V0.647 H0.530770 Q0.596155,0.645,0.659616,0.638 T0.782693,0.6165 T0.893270,0.5805 T1,0.531 V0.623 Q0.934616,0.644,0.880770,0.6595 T0.769232,0.685 T0.650963,0.700 T0.528847,0.707 V0.787 Q0.528847,0.802,0.543270,0.8155 T0.580770,0.8375 T0.630770,0.8515 T0.685578,0.860 T0.742309,0.864 T0.800001,0.865 H1 V0.924 H0.800001 Q0.746155,0.924,0.692309,0.9205 T0.587501,0.907 T0.494232,0.879 T0.430770,0.835 L0.173078,0.920 Q0.165386,0.922,0.157693,0.923 T0.142308,0.924 Z M0.2,0.841 L0.415385,0.770 V0.150 L0.2,0.079 V0.841 Z M1,0.698 Q0.973077,0.694,0.969231,0.6885 T0.965385,0.677 Q0.965385,0.672,0.969231,0.6665 T1,0.657 V0.698 Z"},"\u{1FBC2}":{type:7,data:"M0,0.623 V0.531 Q0.044231,0.512,0.0625,0.4905 T0.092308,0.4465 T0.108654,0.4005 T0.113462,0.354 V0.351 Q0.113462,0.345,0.117308,0.3395 T0.129808,0.3305 T0.148846,0.3245 T0.171154,0.323 H0.501923 Q0.532692,0.323,0.563462,0.3185 T0.617308,0.303 T0.651923,0.2765 T0.663462,0.2435 V0.241 Q0.663462,0.219,0.657692,0.197 T0.639423,0.1545 T0.604808,0.115 T0.549615,0.082 T0.475577,0.0615 T0.392308,0.055 H0 V-0.004 H1 V0.055 H0.667308 Q0.694231,0.071,0.713462,0.09 T0.746154,0.129 T0.766346,0.1705 T0.775,0.213 H1 V0.316 Q0.971154,0.305,0.955769,0.2965 T0.920192,0.2825 T0.876923,0.2745 T0.830769,0.272 H0.773077 Q0.767308,0.297,0.743269,0.319 T0.680769,0.355 T0.595192,0.375 T0.501923,0.381 H0.227308 Q0.223462,0.415,0.211,0.4485 T0.172692,0.5135 T0.108269,0.573 T0,0.623 Z M0.611538,0.924 H0 V0.865 H0.611538 Q0.642308,0.865,0.673077,0.8605 T0.727885,0.845 T0.762308,0.8185 T0.773077,0.787 V0.785 Q0.773077,0.769,0.762308,0.7535 T0.727885,0.727 T0.673077,0.7115 T0.611538,0.707 H0.059615 Q0.048077,0.707,0.037115,0.7045 T0,0.694 V0.653 Q0.026923,0.648,0.037115,0.646 T0.059615,0.644 H0.722692 Q0.753462,0.644,0.784231,0.6395 T0.839038,0.624 T0.873846,0.5975 T0.884615,0.566 V0.564 Q0.884615,0.548,0.873846,0.532 T0.839038,0.5055 T0.784231,0.49 T0.722692,0.4855 H0.392308 Q0.380769,0.4855,0.370192,0.483 T0.351923,0.4765 T0.339423,0.467 T0.334615,0.4555 T0.339423,0.444 T0.351923,0.4345 T0.370192,0.428 T0.392308,0.4255 H0.832692 Q0.855769,0.4255,0.878846,0.4235 T0.922115,0.416 T0.957692,0.4015 T1,0.3815 V0.4685 Q0.975,0.4705,0.966346,0.4725 T0.95,0.4765 Q0.961538,0.4835,0.969231,0.4915 T1,0.5075 V0.6205 Q0.965385,0.6455,0.926923,0.665 T0.84,0.6935 Q0.866923,0.7115,0.877596,0.7345 T0.894231,0.7855 V0.787 Q0.894231,0.815,0.876923,0.8425 T0.820192,0.8895 T0.726923,0.916 T0.611538,0.924 Z"},"\u{1FBC3}":{type:7,data:"M0,0.473 V0.386 Q0.025490,0.378,0.028431,0.3695 T0.031373,0.352 V0.35 Q0.031373,0.342,0.028431,0.333 T0,0.316 V0.213 H0.652941 Q0.684314,0.213,0.715686,0.2085 T0.770588,0.193 T0.804902,0.1665 T0.815686,0.135 V0.133 Q0.815686,0.117,0.804902,0.101 T0.770588,0.0745 T0.715686,0.0595 T0.652941,0.055 H0 V-0.004 H0.652941 Q0.707843,-0.004,0.761765,0.004 T0.856863,0.031 T0.915686,0.0775 T0.933333,0.133 V0.135 Q0.933333,0.163,0.915686,0.1905 T0.856863,0.237 T0.761765,0.264 T0.652941,0.272 H0.109804 Q0.131373,0.29,0.140196,0.31 T0.149020,0.35 V0.352 Q0.149020,0.37,0.142157,0.388 T0.118627,0.4225 T0.076471,0.452 T0,0.473 Z M0,0.625 V0.513 Q0.029412,0.526,0.032353,0.54 T0.035294,0.568 V0.57 Q0.035294,0.584,0.032353,0.598 T0,0.625 Z"},"\u{1FBC4}":{type:7,data:"M0.019231,1.085 V-0.165 H0.980769 V1.085 H0.019231 Z M0.446154,0.527 H0.553846 Q0.553846,0.511,0.5625,0.495 T0.591346,0.466 T0.631731,0.4405 T0.666346,0.4135 T0.688462,0.3825 T0.696154,0.35 Q0.696154,0.33,0.682692,0.311 T0.641346,0.2785 T0.575,0.259 T0.498077,0.253 T0.421154,0.259 T0.356731,0.279 T0.315385,0.3125 T0.301923,0.352 V0.357 H0.409615 V0.354 Q0.409615,0.345,0.414423,0.335 T0.431731,0.318 T0.4625,0.3075 T0.498077,0.304 Q0.517308,0.304,0.534615,0.307 T0.564423,0.3165 T0.582692,0.332 T0.588462,0.35 Q0.588462,0.366,0.572115,0.3805 T0.535577,0.4075 T0.496154,0.4335 T0.465385,0.4625 T0.45,0.4945 T0.446154,0.527 Z M0.5,0.667 Q0.519231,0.667,0.5375,0.664 T0.569231,0.654 T0.588462,0.637 T0.594231,0.617 T0.588462,0.5975 T0.569231,0.581 T0.5375,0.571 T0.5,0.568 T0.4625,0.571 T0.430769,0.581 T0.411538,0.5975 T0.405769,0.617 T0.411538,0.637 T0.430769,0.654 T0.4625,0.664 T0.5,0.667 Z"},"\u{1FBC5}":{type:9,data:{d:"M.44,.35 L.44,.52 L.44,.62 L.19,.87 L.26,.94 L.5,.71 L.74,.94 L.81,.87 L.56,.62 L.56,.52 L.56,.35 Z M.17,.42 L.17,.52 L.83,.52 L.83,.42 Z M.67,.2 C.67,.106,.594,.03,.5,.03 C.406,.03,.33,.106,.33,.2 C.33,.294,.406,.37,.5,.37 C.594,.37,.67,.294,.67,.2 Z M.56,.2 C.56,.233,.533,.26,.5,.26 C.467,.26,.44,.233,.44,.2 C.44,.167,.467,.14,.5,.14 C.533,.14,.56,.167,.56,.2 Z",type:0}},"\u{1FBC6}":{type:9,data:{d:"M.44,.35 L.44,.42 L.23,.27 L.19,.36 L.44,.52 L.44,.62 L.29,.92 L.38,.97 L.5,.71 L.61,.97 L.7,.92 L.56,.62 L.56,.52 L.81,.36 L.77,.27 L.56,.42 L.56,.35 Z M.67,.2 C.67,.106,.594,.03,.5,.03 C.406,.03,.33,.106,.33,.2 C.33,.294,.406,.37,.5,.37 C.594,.37,.67,.294,.67,.2 Z M.56,.2 C.56,.233,.533,.26,.5,.26 C.467,.26,.44,.233,.44,.2 C.44,.167,.467,.14,.5,.14 C.533,.14,.56,.167,.56,.2 Z",type:0}},"\u{1FBC7}":{type:9,data:{d:"M.44,.35 L.44,.62 L.29,.92 L.38,.97 L.5,.71 L.74,.94 L.81,.87 L.56,.62 L.56,.35 Z M.18,.56 L.23,.65 L.81,.36 L.77,.27 Z M.67,.2 C.67,.106,.594,.03,.5,.03 C.406,.03,.33,.106,.33,.2 C.33,.294,.406,.37,.5,.37 C.594,.37,.67,.294,.67,.2 Z M.56,.2 C.56,.233,.533,.26,.5,.26 C.467,.26,.44,.233,.44,.2 C.44,.167,.467,.14,.5,.14 C.533,.14,.56,.167,.56,.2 Z",type:0}},"\u{1FBC8}":{type:9,data:{d:"M.44,.35 L.44,.62 L.19,.87 L.26,.94 L.5,.71 L.62,.97 L.71,.92 L.56,.62 L.56,.35 Z M.23,.27 L.18,.36 L.77,.65 L.81,.56 Z M.67,.2 C.67,.106,.594,.03,.5,.03 C.406,.03,.33,.106,.33,.2 C.33,.294,.406,.37,.5,.37 C.594,.37,.67,.294,.67,.2 Z M.56,.2 C.56,.233,.533,.26,.5,.26 C.467,.26,.44,.233,.44,.2 C.44,.167,.467,.14,.5,.14 C.533,.14,.56,.167,.56,.2 Z",type:0}},"\u{1FBC9}":{type:9,data:{d:"M.44,.35 L.45,.49 L.15,.79 L.34,.79 L.34,.9 L.44,.9 L.44,.79 L.56,.79 L.56,.9 L.66,.9 L.66,.79 L.84,.79 L.54,.49 L.56,.35 Z M.39,.7 L.5,.6 L.60,.7 Z M.17,.42 L.17,.52 L.83,.52 L.83,.42 Z M.67,.2 C.67,.106,.594,.03,.5,.03 C.406,.03,.33,.106,.33,.2 C.33,.294,.406,.37,.5,.37 C.594,.37,.67,.294,.67,.2 Z M.56,.2 C.56,.233,.533,.26,.5,.26 C.467,.26,.44,.233,.44,.2 C.44,.167,.467,.14,.5,.14 C.533,.14,.56,.167,.56,.2 Z",type:0}},"\u{1FBCA}":{type:9,data:{d:"M.26,.25 L.5,.01 L.74,.25 L.74,.83 L.5,.6 L.26,.83 Z M.37,.29 L.37,.58 L.5,.45 L.63,.58 L.63,.29 L.5,.16 Z",type:0}},"\u{1FBCB}":{type:9,data:{d:"M.09,.32 L.32,.09 L.5,.25 L.68,.09 L.91,.32 L.75,.5 L.91,.68 L.68,.91 L.5,.75 L.32,.91 L.09,.68 L.25,.5 Z M.24,.32 L.39,.5 L.24,.68 L.32,.76 L.5,.61 L.68,.76 L.76,.68 L.61,.5 L.76,.32 L.68,.24 L.5,.39 L.32,.24 Z",type:0}},"\u{1FBCC}":{type:9,data:{d:"M.55,.11 L.88,.11 L.88,.21 L.65,.21 L.65,.44, L.88,.44 L.88,.54 L.55,.54 Z",type:0}},"\u{1FBCD}":{type:9,data:{d:"M.38,.28 L.5,.16 L.62,.28 L.62,.56 L.5,.44 L.38,.56 Z",type:0}},"\u{1FBCE}":{type:7,data:"M0,0 L0.6667,0 L0.6667,1 L0,1 Z"},"\u{1FBCF}":{type:7,data:"M0,0 L0.3333,0 L0.3333,1 L0,1 Z"},"\u{1FBD0}":{type:6,data:{1:"M1,.5 L0,1"}},"\u{1FBD1}":{type:6,data:{1:"M1,0 L0,.5"}},"\u{1FBD2}":{type:6,data:{1:"M0,0 L1,.5"}},"\u{1FBD3}":{type:6,data:{1:"M0,.5 L1,1"}},"\u{1FBD4}":{type:6,data:{1:"M0,0 L.5,1"}},"\u{1FBD5}":{type:6,data:{1:"M.5,0 L1,1"}},"\u{1FBD6}":{type:6,data:{1:"M1,0 L.5,1"}},"\u{1FBD7}":{type:6,data:{1:"M.5,0 L0,1"}},"\u{1FBD8}":{type:6,data:{1:"M0,0 L.5,.5 L1,0"}},"\u{1FBD9}":{type:6,data:{1:"M1,0 L.5,.5 L1,1"}},"\u{1FBDA}":{type:6,data:{1:"M0,1 L.5,.5 L1,1"}},"\u{1FBDB}":{type:6,data:{1:"M0,0 L.5,.5 L0,1"}},"\u{1FBDC}":{type:6,data:{1:"M0,0 L.5,1 L1,0"}},"\u{1FBDD}":{type:6,data:{1:"M1,0 L0,.5 L1,1"}},"\u{1FBDE}":{type:6,data:{1:"M0,1 L.5,0 L1,1"}},"\u{1FBDF}":{type:6,data:{1:"M0,0 L1,.5 L0,1"}},"\u{1FBE0}":{type:9,data:{d:"M0,0 C0,.276,.224,.5,.5,.5 C.776,.5,1,.276,1,0",type:1}},"\u{1FBE1}":{type:9,data:{d:"M1,0 C.724,0,.5,.224,.5,.5 C.5,.776,.724,1,1,1",type:1}},"\u{1FBE2}":{type:9,data:{d:"M0,1 C0,.724,.224,.5,.5,.5 C.776,.5,1,.724,1,1",type:1}},"\u{1FBE3}":{type:9,data:{d:"M0,0 C.276,0,.5,.224,.5,.5 C.5,.776,.276,1,0,1",type:1}},"\u{1FBE4}":{type:0,data:[{x:2,y:0,w:4,h:4}]},"\u{1FBE5}":{type:0,data:[{x:2,y:4,w:4,h:4}]},"\u{1FBE6}":{type:0,data:[{x:0,y:2,w:4,h:4}]},"\u{1FBE7}":{type:0,data:[{x:4,y:2,w:4,h:4}]},"\u{1FBE8}":{type:9,data:{d:"M0,0 C0,.276,.224,.5,.5,.5 C.776,.5,1,.276,1,0 Z",type:0}},"\u{1FBE9}":{type:9,data:{d:"M1,0 C.724,0,.5,.224,.5,.5 C.5,.776,.724,1,1,1 Z",type:0}},"\u{1FBEA}":{type:9,data:{d:"M0,1 C0,.724,.224,.5,.5,.5 C.776,.5,1,.724,1,1 Z",type:0}},"\u{1FBEB}":{type:9,data:{d:"M0,0 C.276,0,.5,.224,.5,.5 C.5,.776,.276,1,0,1 Z",type:0}},"\u{1FBEC}":{type:9,data:{d:"M1,0 L.5,0 C.5,.276,.724,.5,1,.5 Z",type:0}},"\u{1FBED}":{type:9,data:{d:"M0,1 L.5,1 C.5,.724,.276,.5,0,.5 Z",type:0}},"\u{1FBEE}":{type:9,data:{d:"M1,1 L1,.5 C.724,.5,.5,.724,.5,1 Z",type:0}},"\u{1FBEF}":{type:9,data:{d:"M0,0 L0,.5 C.276,.5,.5,.276,.5,0 Z",type:0}},"\u{1FBF0}":{type:9,data:{d:be(126),type:0}},"\u{1FBF1}":{type:9,data:{d:be(48),type:0}},"\u{1FBF2}":{type:9,data:{d:be(109),type:0}},"\u{1FBF3}":{type:9,data:{d:be(121),type:0}},"\u{1FBF4}":{type:9,data:{d:be(51),type:0}},"\u{1FBF5}":{type:9,data:{d:be(91),type:0}},"\u{1FBF6}":{type:9,data:{d:be(95),type:0}},"\u{1FBF7}":{type:9,data:{d:be(114),type:0}},"\u{1FBF8}":{type:9,data:{d:be(127),type:0}},"\u{1FBF9}":{type:9,data:{d:be(123),type:0}},"\u{1FBFA}":{type:9,data:{d:"M.5,.175 C.2,.175,.15,.305,.15,.435 L.05,.63 L.35,.63 C.35,.682,.42,.76,.5,.76 C.58,.76,.65,.682,.65,.63 L.95,.63 L.85,.435 C.85,.305,.8,.175,.5,.175 Z",type:0}}};function O(i){return{type:5,data:()=>{let e=[],n=[.375,.25,.375],r=[0,3/8,5/8];for(let o=0;o<3;o++){let s=i>>o*2&1,a=i>>o*2+1&1;s&&a?e.push(`M0,${r[o]} L1,${r[o]} L1,${r[o]+n[o]} L0,${r[o]+n[o]} Z`):s?e.push(`M0,${r[o]} L${.5},${r[o]} L${.5},${r[o]+n[o]} L0,${r[o]+n[o]} Z`):a&&e.push(`M${.5},${r[o]} L1,${r[o]} L1,${r[o]+n[o]} L${.5},${r[o]+n[o]} Z`)}return e.join(" ")}}}function be(i){let e=[];if(i&64){let M=.21500000000000002,R=.95-.15-.015;e.push(`M${M},${.2125} L${M+.075},${.175} L${R-.075},${.175} L${R},${.2125} L${R-.075},${.25} L${M+.075},${.25} Z`)}if(i&32){let m=.7999999999999999,_=.95-.15/2,A=.95,M=.175+.075+.015,R=.5-.015;e.push(`M${_},${M} L${A},${M+.0375} L${A},${R-.0375} L${_},${R} L${m},${R-.0375} L${m},${M+.0375} Z`)}if(i&16){let m=.7999999999999999,_=.95-.15/2,A=.95,M=.5+.015,R=.825-.075-.015;e.push(`M${_},${M} L${A},${M+.0375} L${A},${R-.0375} L${_},${R} L${m},${R-.0375} L${m},${M+.0375} Z`)}if(i&8){let M=.21500000000000002,R=.95-.15-.015;e.push(`M${M},${.7875} L${M+.075},${.75} L${R-.075},${.75} L${R},${.7875} L${R-.075},${.825} L${M+.075},${.825} Z`)}if(i&4&&e.push(`M${.125},${.515} L${.2},${.515+.0375} L${.2},${.735-.0375} L${.125},${.735} L${.05},${.735-.0375} L${.05},${.515+.0375} Z`),i&2&&e.push(`M${.125},${.265} L${.2},${.265+.0375} L${.2},${.485-.0375} L${.125},${.485} L${.05},${.485-.0375} L${.05},${.265+.0375} Z`),i&1){let M=.21500000000000002,R=.95-.15-.015;e.push(`M${M},${.5} L${M+.075},${.4625} L${R-.075},${.4625} L${R},${.5} L${R-.075},${.5375} L${M+.075},${.5375} Z`)}return e.join(" ")}function Rn(i,e,t,n,r,o,s,a,l){let u=In[e];if(u)switch(u.type){case 0:return yn(i,u.data,t,n,r,o),!0;case 1:return Ei(i,u.data,t,n,r,o),!0;case 2:return An(i,u.data,t,n,r,o),!0;case 3:return An(i,u.data.pattern,t,n,r,o),yn(i,u.data.vectors,t,n,r,o),!0;case 4:return Yr(i,u.data,t,n,r,o),!0;case 5:case 7:return zr(i,u.data,t,n,r,o),!0;case 8:return qr(i,u.data,t,n,r,o,a,l),!0;case 9:return Xr(i,u.data,t,n,r,o,s,a),!0;case 6:return jr(i,u.data,t,n,r,o,a),!0}return!1}function yn(i,e,t,n,r,o){for(let s=0;s<e.length;s++){let a=e[s],l=r/8,u=o/8;i.fillRect(t+a.x*l,n+a.y*u,a.w*l,a.h*u)}}function zr(i,e,t,n,r,o){let s=typeof e=="string"?e:e(0,0);i.beginPath();let a=0,l=0,u=0,c=0,d="";for(let h of s.split(" ")){let p=h[0],m=h.substring(1).split(",");if(p==="Z"){i.closePath(),d=p;continue}if(p==="V"){let A=n+parseFloat(m[0])*o;i.lineTo(a,A),l=A,u=a,c=l,d=p;continue}if(p==="H"){let A=t+parseFloat(m[0])*r;i.lineTo(A,l),a=A,u=a,c=l,d=p;continue}if(!m[0]||!m[1])continue;if(p==="A"){let A=parseFloat(m[0])*r,M=parseFloat(m[1])*o,R=parseFloat(m[2])*Math.PI/180,B=parseInt(m[3]),L=parseInt(m[4]),x=t+parseFloat(m[5])*r,F=n+parseFloat(m[6])*o;Zr(i,a,l,A,M,R,B,L,x,F),a=x,l=F;continue}let _=m.map((A,M)=>{let R=parseFloat(A);return M%2===0?t+R*r:n+R*o});if(p==="M")i.moveTo(_[0],_[1]),a=_[0],l=_[1],u=a,c=l;else if(p==="L")i.lineTo(_[0],_[1]),a=_[0],l=_[1],u=a,c=l;else if(p==="Q")i.quadraticCurveTo(_[0],_[1],_[2],_[3]),u=_[0],c=_[1],a=_[2],l=_[3];else if(p==="T"){let A,M;d==="Q"||d==="T"?(A=2*a-u,M=2*l-c):(A=a,M=l),i.quadraticCurveTo(A,M,_[0],_[1]),u=A,c=M,a=_[0],l=_[1]}else p==="C"&&(i.bezierCurveTo(_[0],_[1],_[2],_[3],_[4],_[5]),u=_[2],c=_[3],a=_[4],l=_[5]);d=p}i.fill()}function Zr(i,e,t,n,r,o,s,a,l,u){if(n===0||r===0){i.lineTo(l,u);return}n=Math.abs(n),r=Math.abs(r);let c=Math.cos(o),d=Math.sin(o),h=(e-l)/2,p=(t-u)/2,m=c*h+d*p,_=-d*h+c*p,A=n*n,M=r*r,R=m*m,B=_*_,L=R/A+B/M;if(L>1){let f=Math.sqrt(L);n*=f,r*=f,A=n*n,M=r*r}let x=(A*M-A*B-M*R)/(A*B+M*R);x<0&&(x=0);let F=(s===a?-1:1)*Math.sqrt(x),C=F*(n*_/r),Y=F*-(r*m/n),ve=c*C-d*Y+(e+l)/2,se=d*C+c*Y+(t+u)/2,Te=(m-C)/n,S=(_-Y)/r,ee=(-m-C)/n,E=(-_-Y)/r,T=Math.atan2(S,Te),v=Math.atan2(E,ee)-T;a===0&&v>0?v-=2*Math.PI:a===1&&v<0&&(v+=2*Math.PI);let g=T+v;i.ellipse(ve,se,n,r,o,T,g,a===0)}function qr(i,e,t,n,r,o,s,a){i.save(),i.fillRect(t,n,r,o),a&&(i.fillStyle=a,i.strokeStyle=a),i.lineWidth=s,i.lineCap="square",i.beginPath();for(let l of e.d.split(" ")){let u=l[0],c=l.substring(1).split(",");if(!c[0]||!c[1]){u==="Z"&&i.closePath();continue}let d=c.map((h,p)=>{let m=parseFloat(h);return p%2===0?t+m*r:n+m*o});u==="M"?i.moveTo(d[0],d[1]):u==="L"&&i.lineTo(d[0],d[1])}e.type===1?i.stroke():i.fill(),i.restore()}var xn=new Map;function Ei(i,e,t,n,r,o){let s=xn.get(e);s||(s=new Map,xn.set(e,s));let a=i.fillStyle;if(typeof a!="string")throw new Error(`Unexpected fillStyle type "${a}"`);let l=s.get(a);if(!l){let u=e[0].length,c=e.length,d=i.canvas.ownerDocument.createElement("canvas");d.width=u,d.height=c;let h=N(d.getContext("2d")),p=new ImageData(u,c),m,_,A,M;if(a.startsWith("#"))m=parseInt(a.slice(1,3),16),_=parseInt(a.slice(3,5),16),A=parseInt(a.slice(5,7),16),M=a.length>7&&parseInt(a.slice(7,9),16)||1;else if(a.startsWith("rgba"))[m,_,A,M]=a.substring(5,a.length-1).split(",").map(R=>parseFloat(R));else throw new Error(`Unexpected fillStyle color format "${a}" when drawing pattern glyph`);for(let R=0;R<c;R++)for(let B=0;B<u;B++)p.data[(R*u+B)*4]=m,p.data[(R*u+B)*4+1]=_,p.data[(R*u+B)*4+2]=A,p.data[(R*u+B)*4+3]=e[R][B]*(M*255);h.putImageData(p,0,0),l=N(i.createPattern(d,null)),s.set(a,l)}i.fillStyle=l,i.fillRect(t,n,r,o)}function An(i,e,t,n,r,o){let[s,a]=e,[l,u,c,d]=a,h=Math.round(t+l*r),p=Math.round(n+u*o),m=Math.round(c*r),_=Math.round(d*o);i.save(),i.beginPath(),i.rect(h,p,m,_),i.clip(),Ei(i,s,t,n,r,o),i.restore()}function jr(i,e,t,n,r,o,s){i.strokeStyle=i.fillStyle;for(let[a,l]of Object.entries(e)){i.beginPath(),i.lineWidth=s*Number.parseInt(a);let u;if(typeof l=="function"){let d=.15/o*r;u=l(.15,d)}else u=l;for(let c of u.split(" ")){let d=c[0];if(d==="Z"){i.closePath();continue}let h=Mn[d];if(!h){console.error(`Could not find drawing instructions for "${d}"`);continue}let p=c.substring(1).split(",");!p[0]||!p[1]||h(i,Fn(p,r,o,t,n,!0,s))}i.stroke(),i.closePath()}}function Yr(i,e,t,n,r,o){let[s,a]=e;i.save(),i.beginPath();for(let l of a.split(" ")){let u=l[0];if(u==="Z"){i.closePath();continue}let c=l.substring(1).split(",");if(!c[0]||!c[1])continue;let d=t+parseFloat(c[0])*r,h=n+parseFloat(c[1])*o;u==="M"?i.moveTo(d,h):u==="L"&&i.lineTo(d,h)}i.clip(),Ei(i,s,t,n,r,o),i.restore()}function Xr(i,e,t,n,r,o,s,a){let l=new Path2D;l.rect(t,n,r,o),i.clip(l),i.beginPath();let u=s/12;i.lineWidth=a*u;for(let c of e.d.split(" ")){let d=c[0];if(d==="Z"){i.closePath();continue}let h=Mn[d];if(!h){console.error(`Could not find drawing instructions for "${d}"`);continue}let p=c.substring(1).split(",");!p[0]||!p[1]||h(i,Fn(p,r,o,t,n,!1,a,(e.leftPadding??0)*(u/2),(e.rightPadding??0)*(u/2)))}e.type===1?(i.strokeStyle=i.fillStyle,i.stroke()):i.fill(),i.closePath()}function On(i,e,t=0){return Math.max(Math.min(i,e),t)}var Mn={C:(i,e)=>i.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]),L:(i,e)=>i.lineTo(e[0],e[1]),M:(i,e)=>i.moveTo(e[0],e[1]),Q:(i,e)=>i.quadraticCurveTo(e[0],e[1],e[2],e[3])};function Fn(i,e,t,n,r,o,s,a=0,l=0){let u=i.map(c=>parseFloat(c)||parseInt(c));if(u.length<2)throw new Error("Too few arguments for instruction");for(let c=0;c<u.length;c+=2)u[c]*=e-a*s-l*s,o&&u[c]!==0&&(u[c]=On(Math.round(u[c]+.5)-.5,e,0)),u[c]+=n+a*s;for(let c=1;c<u.length;c+=2)u[c]*=t,o&&u[c]!==0&&(u[c]=On(Math.round(u[c]+.5)-.5,t,0)),u[c]+=r;return u}var St=class{constructor(){this._data={}}set(e,t,n){this._data[e]||(this._data[e]={}),this._data[e][t]=n}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},it=class{constructor(){this._data=new St}set(e,t,n,r,o){this._data.get(e,t)||this._data.set(e,t,new St),this._data.get(e,t).set(n,r,o)}get(e,t,n,r){return this._data.get(e,t)?.get(n,r)}clear(){this._data.clear()}};var Pt=class{constructor(){this._tasks=[];this._i=0}enqueue(e){this._tasks.push(e),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(e){this._idleCallback=void 0;let t=0,n=0,r=e.timeRemaining(),o=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),n=Math.max(t,n),o=e.timeRemaining(),n*1.5>o){r-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-t))}ms`),this._start();return}r=o}this.clear()}},Li=class extends Pt{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},Ii=class extends Pt{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},wn=!At&&"requestIdleCallback"in window?Ii:Li;var pe=class i{constructor(){this.fg=0;this.bg=0;this.extended=new nt}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let e=new i;return e.fg=this.fg,e.bg=this.bg,e.extended=this.extended.clone(),e}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},nt=class i{constructor(e=0,t=0){this._ext=0;this._urlId=0;this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new i(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}};var Ue=class Ue{constructor(e){this.element=e,this.next=Ue.Undefined,this.prev=Ue.Undefined}};Ue.Undefined=new Ue(void 0);var Dn=Ue;var Qr=globalThis.performance&&typeof globalThis.performance.now=="function",Nt=class i{static create(e){return new i(e)}constructor(e){this._now=Qr&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};var Jr=!1,Sn=!1,es=!1,ne;(ee=>{ee.None=()=>k.None;function e(E){if(es){let{onDidAddListener:T}=E,v=rt.create(),g=0;E.onDidAddListener=()=>{++g===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),v.print()),T?.()}}}function t(E,T){return h(E,()=>{},0,void 0,!0,void 0,T)}ee.defer=t;function n(E){return(T,v=null,g)=>{let f=!1,b;return b=E(I=>{if(!f)return b?b.dispose():f=!0,T.call(v,I)},null,g),f&&b.dispose(),b}}ee.once=n;function r(E,T,v){return c((g,f=null,b)=>E(I=>g.call(f,T(I)),null,b),v)}ee.map=r;function o(E,T,v){return c((g,f=null,b)=>E(I=>{T(I),g.call(f,I)},null,b),v)}ee.forEach=o;function s(E,T,v){return c((g,f=null,b)=>E(I=>T(I)&&g.call(f,I),null,b),v)}ee.filter=s;function a(E){return E}ee.signal=a;function l(...E){return(T,v=null,g)=>{let f=xt(...E.map(b=>b(I=>T.call(v,I))));return d(f,g)}}ee.any=l;function u(E,T,v,g){let f=v;return r(E,b=>(f=T(f,b),f),g)}ee.reduce=u;function c(E,T){let v,g={onWillAddFirstListener(){v=E(f.fire,f)},onDidRemoveLastListener(){v?.dispose()}};T||e(g);let f=new D(g);return T?.add(f),f.event}function d(E,T){return T instanceof Array?T.push(E):T&&T.add(E),E}function h(E,T,v=100,g=!1,f=!1,b,I){let y,w,V,W=0,he,Fe={leakWarningThreshold:b,onWillAddFirstListener(){y=E(oe=>{W++,w=T(w,oe),g&&!V&&(ue.fire(w),w=void 0),he=()=>{let U=w;w=void 0,V=void 0,(!g||W>1)&&ue.fire(U),W=0},typeof v=="number"?(clearTimeout(V),V=setTimeout(he,v)):V===void 0&&(V=0,queueMicrotask(he))})},onWillRemoveListener(){f&&W>0&&he?.()},onDidRemoveLastListener(){he=void 0,y.dispose()}};I||e(Fe);let ue=new D(Fe);return I?.add(ue),ue.event}ee.debounce=h;function p(E,T=0,v){return ee.debounce(E,(g,f)=>g?(g.push(f),g):[f],T,void 0,!0,void 0,v)}ee.accumulate=p;function m(E,T=(g,f)=>g===f,v){let g=!0,f;return s(E,b=>{let I=g||!T(b,f);return g=!1,f=b,I},v)}ee.latch=m;function _(E,T,v){return[ee.filter(E,T,v),ee.filter(E,g=>!T(g),v)]}ee.split=_;function A(E,T=!1,v=[],g){let f=v.slice(),b=E(w=>{f?f.push(w):y.fire(w)});g&&g.add(b);let I=()=>{f?.forEach(w=>y.fire(w)),f=null},y=new D({onWillAddFirstListener(){b||(b=E(w=>y.fire(w)),g&&g.add(b))},onDidAddFirstListener(){f&&(T?setTimeout(I):I())},onDidRemoveLastListener(){b&&b.dispose(),b=null}});return g&&g.add(y),y.event}ee.buffer=A;function M(E,T){return(g,f,b)=>{let I=T(new B);return E(function(y){let w=I.evaluate(y);w!==R&&g.call(f,w)},void 0,b)}}ee.chain=M;let R=Symbol("HaltChainable");class B{constructor(){this.steps=[]}map(T){return this.steps.push(T),this}forEach(T){return this.steps.push(v=>(T(v),v)),this}filter(T){return this.steps.push(v=>T(v)?v:R),this}reduce(T,v){let g=v;return this.steps.push(f=>(g=T(g,f),g)),this}latch(T=(v,g)=>v===g){let v=!0,g;return this.steps.push(f=>{let b=v||!T(f,g);return v=!1,g=f,b?f:R}),this}evaluate(T){for(let v of this.steps)if(T=v(T),T===R)break;return T}}function L(E,T,v=g=>g){let g=(...y)=>I.fire(v(...y)),f=()=>E.on(T,g),b=()=>E.removeListener(T,g),I=new D({onWillAddFirstListener:f,onDidRemoveLastListener:b});return I.event}ee.fromNodeEventEmitter=L;function x(E,T,v=g=>g){let g=(...y)=>I.fire(v(...y)),f=()=>E.addEventListener(T,g),b=()=>E.removeEventListener(T,g),I=new D({onWillAddFirstListener:f,onDidRemoveLastListener:b});return I.event}ee.fromDOMEventEmitter=x;function F(E){return new Promise(T=>n(E)(T))}ee.toPromise=F;function C(E){let T=new D;return E.then(v=>{T.fire(v)},()=>{T.fire(void 0)}).finally(()=>{T.dispose()}),T.event}ee.fromPromise=C;function Y(E,T){return E(v=>T.fire(v))}ee.forward=Y;function ve(E,T,v){return T(v),E(g=>T(g))}ee.runAndSubscribe=ve;class se{constructor(T,v){this._observable=T;this._counter=0;this._hasChanged=!1;let g={onWillAddFirstListener:()=>{T.addObserver(this)},onDidRemoveLastListener:()=>{T.removeObserver(this)}};v||e(g),this.emitter=new D(g),v&&v.add(this.emitter)}beginUpdate(T){this._counter++}handlePossibleChange(T){}handleChange(T,v){this._hasChanged=!0}endUpdate(T){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Te(E,T){return new se(E,T).emitter.event}ee.fromObservable=Te;function S(E){return(T,v,g)=>{let f=0,b=!1,I={beginUpdate(){f++},endUpdate(){f--,f===0&&(E.reportChanges(),b&&(b=!1,T.call(v)))},handlePossibleChange(){},handleChange(){b=!0}};E.addObserver(I),E.reportChanges();let y={dispose(){E.removeObserver(I)}};return g instanceof me?g.add(y):Array.isArray(g)&&g.push(y),y}}ee.fromObservableLight=S})(ne||={});var Ge=class Ge{constructor(e){this.listenerCount=0;this.invocationCount=0;this.elapsedOverall=0;this.durations=[];this.name=`${e}_${Ge._idPool++}`,Ge.all.add(this)}start(e){this._stopWatch=new Nt,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};Ge.all=new Set,Ge._idPool=0;var yi=Ge,Pn=-1;var Bt=class Bt{constructor(e,t,n=(Bt._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e;this.threshold=t;this.name=n;this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){let n=this.threshold;if(n<=0||t<n)return;this._stacks||(this._stacks=new Map);let r=this._stacks.get(e.value)||0;if(this._stacks.set(e.value,r+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[o,s]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${t} listeners already. MOST frequent listener (${s}):`;console.warn(a),console.warn(o);let l=new Ai(a,o);this._errorHandler(l)}return()=>{let o=this._stacks.get(e.value)||0;this._stacks.set(e.value,o-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(let[n,r]of this._stacks)(!e||t<r)&&(e=[n,r],t=r);return e}};Bt._idPool=1;var xi=Bt,rt=class i{constructor(e){this.value=e}static create(){let e=new Error;return new i(e.stack??"")}print(){console.warn(this.value.split(`
|
|
39
39
|
`).slice(2).join(`
|
|
40
|
-
`))}},
|
|
41
|
-
`)),i.length=0)},3e3),
|
|
40
|
+
`))}},Ai=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},Oi=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},ts=0,$e=class{constructor(e){this.value=e;this.id=ts++}},is=2,ns=(i,e)=>{if(i instanceof $e)e(i);else for(let t=0;t<i.length;t++){let n=i[t];n&&e(n)}},Ht;if(Jr){let i=[];setInterval(()=>{i.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(i.join(`
|
|
41
|
+
`)),i.length=0)},3e3),Ht=new FinalizationRegistry(e=>{typeof e=="string"&&i.push(e)})}var D=class{constructor(e){this._size=0;this._options=e,this._leakageMon=Pn>0||this._options?.leakWarningThreshold?new xi(e?.onListenerError??Be,this._options?.leakWarningThreshold??Pn):void 0,this._perfMon=this._options?._profName?new yi(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(Sn){let e=this._listeners;queueMicrotask(()=>{ns(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);let u=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new Oi(`${l}. HINT: Stack shows most frequent listener (${u[1]}-times)`,u[0]);return(this._options?.onListenerError||Be)(c),k.None}if(this._disposed)return k.None;t&&(e=e.bind(t));let r=new $e(e),o,s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=rt.create(),o=this._leakageMon.check(r.stack,this._size+1)),Sn&&(r.stack=s??rt.create()),this._listeners?this._listeners instanceof $e?(this._deliveryQueue??=new Ri,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=P(()=>{Ht?.unregister(a),o?.(),this._removeListener(r)});if(n instanceof me?n.add(a):Array.isArray(n)&&n.push(a),Ht){let l=new Error().stack.split(`
|
|
42
42
|
`).slice(2,3).join(`
|
|
43
|
-
`).trim(),u=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(l);Nt.register(a,u?.[2]??l,a)}return a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;let s=this._deliveryQueue.current===this;if(this._size*Qr<=t.length){let o=0;for(let r=0;r<t.length;r++)t[r]?t[o++]=t[r]:s&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){if(!e)return;let n=this._options?.onListenerError||Be;if(!n){e.value(t);return}try{e.value(t)}catch(s){n(s)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Ge)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}};var Oi=class{constructor(){this.i=-1;this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};var Pn={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}},rt=2;var st,le=class i{constructor(e,t,n){this._document=e;this._config=t;this._unicodeService=n;this._didWarmUp=!1;this._cacheMap=new tt;this._cacheMapCombined=new tt;this._pages=[];this._activePages=[];this._workBoundingBox={top:0,left:0,bottom:0,right:0};this._workAttributeData=new pe;this._textureSize=512;this._onAddTextureAtlasCanvas=new w;this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;this._onRemoveTextureAtlasCanvas=new w;this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event;this._requestClearModel=!1;this._createNewPage(),this._tmpCanvas=Nn(e,this._config.deviceCellWidth*4+rt*2,this._config.deviceCellHeight+rt*2),this._tmpCtx=P(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}get pages(){return this._pages}dispose(){this._tmpCanvas.remove();for(let e of this.pages)e.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){let e=new Dn;for(let t=33;t<126;t++)e.enqueue(()=>{if(!this._cacheMap.get(t,0,0,0)){let n=this._drawToCache(t,0,0,0,!1,void 0);this._cacheMap.set(t,0,0,0,n)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(!(this._pages[0].currentRow.x===0&&this._pages[0].currentRow.y===0)){for(let e of this._pages)e.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(i.maxAtlasPages&&this._pages.length>=Math.max(4,i.maxAtlasPages)){let t=this._pages.filter(u=>u.canvas.width*2<=(i.maxTextureSize||4096)).sort((u,c)=>c.canvas.width!==u.canvas.width?c.canvas.width-u.canvas.width:c.percentageUsed-u.percentageUsed),n=-1,s=0;for(let u=0;u<t.length;u++)if(t[u].canvas.width!==s)n=u,s=t[u].canvas.width;else if(u-n===3)break;let o=t.slice(n,n+4),r=o.map(u=>u.glyphs[0].texturePage).sort((u,c)=>u>c?1:-1),a=this.pages.length-o.length,l=this._mergePages(o,a);l.version++;for(let u=r.length-1;u>=0;u--)this._deletePage(r[u]);this.pages.push(l),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(l.canvas)}let e=new ot(this._document,this._textureSize);return this._pages.push(e),this._activePages.push(e),this._onAddTextureAtlasCanvas.fire(e.canvas),e}_mergePages(e,t){let n=e[0].canvas.width*2,s=new ot(this._document,n,e);for(let[o,r]of e.entries()){let a=o*r.canvas.width%n,l=Math.floor(o/2)*r.canvas.height;s.ctx.drawImage(r.canvas,a,l);for(let c of r.glyphs)c.texturePage=t,c.sizeClipSpace.x=c.size.x/n,c.sizeClipSpace.y=c.size.y/n,c.texturePosition.x+=a,c.texturePosition.y+=l,c.texturePositionClipSpace.x=c.texturePosition.x/n,c.texturePositionClipSpace.y=c.texturePosition.y/n;this._onRemoveTextureAtlasCanvas.fire(r.canvas);let u=this._activePages.indexOf(r);u!==-1&&this._activePages.splice(u,1)}return s}_deletePage(e){this._pages.splice(e,1);for(let t=e;t<this._pages.length;t++){let n=this._pages[t];for(let s of n.glyphs)s.texturePage--;n.version++}}getRasterizedGlyphCombinedChar(e,t,n,s,o,r){return this._getFromCacheMap(this._cacheMapCombined,e,t,n,s,o,r)}getRasterizedGlyph(e,t,n,s,o,r){return this._getFromCacheMap(this._cacheMap,e,t,n,s,o,r)}_getFromCacheMap(e,t,n,s,o,r,a){return st=e.get(t,n,s,o),st||(st=this._drawToCache(t,n,s,o,r,a),e.set(t,n,s,o,st)),st}_getColorFromAnsiIndex(e){if(e>=this._config.colors.ansi.length)throw new Error("No color found for idx "+e);return this._config.colors.ansi[e]}_getBackgroundColor(e,t,n,s){if(this._config.allowTransparency)return J;let o;switch(e){case 16777216:case 33554432:o=this._getColorFromAnsiIndex(t);break;case 50331648:let r=pe.toColorRGB(t);o=Z.toColor(r[0],r[1],r[2]);break;case 0:default:n?o=ke.opaque(this._config.colors.foreground):o=this._config.colors.background;break}return this._config.allowTransparency||(o=ke.opaque(o)),o}_getForegroundColor(e,t,n,s,o,r,a,l,u,c){let d=this._getMinimumContrastColor(e,t,n,s,o,r,a,u,l,c);if(d)return d;let h;switch(o){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&u&&r<8&&(r+=8),h=this._getColorFromAnsiIndex(r);break;case 50331648:let p=pe.toColorRGB(r);h=Z.toColor(p[0],p[1],p[2]);break;case 0:default:a?h=this._config.colors.background:h=this._config.colors.foreground}return this._config.allowTransparency&&(h=ke.opaque(h)),l&&(h=ke.multiplyOpacity(h,vn)),h}_resolveBackgroundRgba(e,t,n){switch(e){case 16777216:case 33554432:return this._getColorFromAnsiIndex(t).rgba;case 50331648:return t<<8;case 0:default:return n?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(e,t,n,s){switch(e){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&s&&t<8&&(t+=8),this._getColorFromAnsiIndex(t).rgba;case 50331648:return t<<8;case 0:default:return n?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(e,t,n,s,o,r,a,l,u,c){if(this._config.minimumContrastRatio===1||c)return;let d=this._getContrastCache(u),h=d.getColor(e,s);if(h!==void 0)return h||void 0;let p=this._resolveBackgroundRgba(t,n,a),L=this._resolveForegroundRgba(o,r,a,l),O=ve.ensureContrastRatio(p,L,this._config.minimumContrastRatio/(u?2:1));if(!O){d.setColor(e,s,null);return}let D=Z.toColor(O>>24&255,O>>16&255,O>>8&255);return d.setColor(e,s,D),D}_getContrastCache(e){return e?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(e,t,n,s,o,r){let a=typeof e=="number"?String.fromCharCode(e):e;r&&this._tmpCanvas.parentElement!==r&&(this._tmpCanvas.style.display="none",r.append(this._tmpCanvas));let l=Math.min(this._config.deviceCellWidth*Math.max(a.length,2)+rt*2,this._config.deviceMaxTextureSize);this._tmpCanvas.width<l&&(this._tmpCanvas.width=l);let u=Math.min(this._config.deviceCellHeight+rt*4,this._textureSize);if(this._tmpCanvas.height<u&&(this._tmpCanvas.height=u),this._tmpCtx.save(),this._workAttributeData.fg=n,this._workAttributeData.bg=t,this._workAttributeData.extended.ext=s,!!this._workAttributeData.isInvisible())return Pn;let d=!!this._workAttributeData.isBold(),h=!!this._workAttributeData.isInverse(),p=!!this._workAttributeData.isDim(),L=!!this._workAttributeData.isItalic(),O=!!this._workAttributeData.isUnderline(),D=!!this._workAttributeData.isStrikethrough(),j=!!this._workAttributeData.isOverline(),F=this._workAttributeData.getFgColor(),C=this._workAttributeData.getFgColorMode(),x=this._workAttributeData.getBgColor(),y=this._workAttributeData.getBgColorMode();if(h){let E=F;F=x,x=E;let R=C;C=y,y=R}let A=this._getBackgroundColor(y,x,h,p);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=A.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";let G=d?this._config.fontWeightBold:this._config.fontWeight,ce=L?"italic":"";this._tmpCtx.font=`${ce} ${G} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=Mt;let Fe=a.length===1&&At(a.charCodeAt(0)),de=a.length===1&&_n(a.charCodeAt(0)),Ae=this._getForegroundColor(t,y,x,n,C,F,h,p,d,Rt(a.charCodeAt(0)));this._tmpCtx.fillStyle=Ae.css;let M=de?0:rt*2,oe=!1;this._config.customGlyphs!==!1&&(oe=On(this._tmpCtx,a,M,M,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let b=!Fe,_;if(typeof e=="number"?_=this._unicodeService.wcwidth(e):_=this._unicodeService.getStringCellWidth(e),O){this._tmpCtx.save();let E=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),R=E%2===1?.5:0;if(this._tmpCtx.lineWidth=E,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())b=!1,this._tmpCtx.strokeStyle=`rgb(${pe.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{b=!1;let ne=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&ne<8&&(ne+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(ne).css}this._tmpCtx.beginPath();let K=M,B=Math.ceil(M+this._config.deviceCharHeight)-R-(o?E*2:0),he=B+E,Re=B+E*2,ae=this._workAttributeData.getUnderlineVariantOffset();for(let ne=0;ne<_;ne++){this._tmpCtx.save();let W=K+ne*this._config.deviceCellWidth,re=K+(ne+1)*this._config.deviceCellWidth,di=W+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(W,B),this._tmpCtx.lineTo(re,B),this._tmpCtx.moveTo(W,Re),this._tmpCtx.lineTo(re,Re);break;case 3:let _t=E<=1?Re:Math.ceil(M+this._config.deviceCharHeight-E/2)-R,mt=E<=1?B:Math.ceil(M+this._config.deviceCharHeight+E/2)-R,qi=new Path2D;qi.rect(W,B,this._config.deviceCellWidth,Re-B),this._tmpCtx.clip(qi),this._tmpCtx.moveTo(W-this._config.deviceCellWidth/2,he),this._tmpCtx.bezierCurveTo(W-this._config.deviceCellWidth/2,mt,W,mt,W,he),this._tmpCtx.bezierCurveTo(W,_t,di,_t,di,he),this._tmpCtx.bezierCurveTo(di,mt,re,mt,re,he),this._tmpCtx.bezierCurveTo(re,_t,re+this._config.deviceCellWidth/2,_t,re+this._config.deviceCellWidth/2,he);break;case 4:let ft=ae===0?0:ae>=E?E*2-ae:E-ae;!(ae>=E)===!1||ft===0?(this._tmpCtx.setLineDash([Math.round(E),Math.round(E)]),this._tmpCtx.moveTo(W+ft,B),this._tmpCtx.lineTo(re,B)):(this._tmpCtx.setLineDash([Math.round(E),Math.round(E)]),this._tmpCtx.moveTo(W,B),this._tmpCtx.lineTo(W+ft,B),this._tmpCtx.moveTo(W+ft+E,B),this._tmpCtx.lineTo(re,B)),ae=Tn(re-W,E,ae);break;case 5:let Or=.6,Ar=.3,hi=re-W,ji=Math.floor(Or*hi),Xi=Math.floor(Ar*hi),Rr=hi-ji-Xi;this._tmpCtx.setLineDash([ji,Xi,Rr]),this._tmpCtx.moveTo(W,B),this._tmpCtx.lineTo(re,B);break;case 1:default:this._tmpCtx.moveTo(W,B),this._tmpCtx.lineTo(re,B);break}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!oe&&this._config.fontSize>=12&&!this._config.allowTransparency&&a!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";let ne=this._tmpCtx.measureText(a);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in ne&&ne.actualBoundingBoxDescent>0){this._tmpCtx.save();let W=new Path2D;W.rect(K,B-Math.ceil(E/2),this._config.deviceCellWidth*_,Re-B+Math.ceil(E/2)),this._tmpCtx.clip(W),this._tmpCtx.lineWidth=this._config.devicePixelRatio*3,this._tmpCtx.strokeStyle=A.css,this._tmpCtx.strokeText(a,M,M+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(j){let E=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),R=E%2===1?.5:0;this._tmpCtx.lineWidth=E,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(M,M+R),this._tmpCtx.lineTo(M+this._config.deviceCharWidth*_,M+R),this._tmpCtx.stroke()}if(oe||this._tmpCtx.fillText(a,M,M+this._config.deviceCharHeight),a==="_"&&!this._config.allowTransparency){let E=Ri(this._tmpCtx.getImageData(M,M,this._config.deviceCellWidth,this._config.deviceCellHeight),A,Ae,b);if(E)for(let R=1;R<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=A.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(a,M,M+this._config.deviceCharHeight-R),E=Ri(this._tmpCtx.getImageData(M,M,this._config.deviceCellWidth,this._config.deviceCellHeight),A,Ae,b),!!E);R++);}if(D){let E=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),R=this._tmpCtx.lineWidth%2===1?.5:0;this._tmpCtx.lineWidth=E,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(M,M+Math.floor(this._config.deviceCharHeight/2)-R),this._tmpCtx.lineTo(M+this._config.deviceCharWidth*_,M+Math.floor(this._config.deviceCharHeight/2)-R),this._tmpCtx.stroke()}this._tmpCtx.restore();let v=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height),T;if(this._config.allowTransparency?T=ts(v):T=Ri(v,A,Ae,b),T)return Pn;let m=this._findGlyphBoundingBox(v,this._workBoundingBox,l,de,oe,M),f,g;for(;;){if(this._activePages.length===0){let E=this._createNewPage();f=E,g=E.currentRow,g.height=m.size.y;break}f=this._activePages[this._activePages.length-1],g=f.currentRow;for(let E of this._activePages)m.size.y<=E.currentRow.height&&(f=E,g=E.currentRow);for(let E=this._activePages.length-1;E>=0;E--)for(let R of this._activePages[E].fixedRows)R.height<=g.height&&m.size.y<=R.height&&(f=this._activePages[E],g=R);if(m.size.x>this._textureSize){this._overflowSizePage||(this._overflowSizePage=new ot(this._document,this._config.deviceMaxTextureSize),this.pages.push(this._overflowSizePage),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(this._overflowSizePage.canvas)),f=this._overflowSizePage,g=this._overflowSizePage.currentRow,g.x+m.size.x>=f.canvas.width&&(g.x=0,g.y+=g.height,g.height=0);break}if(g.y+m.size.y>=f.canvas.height||g.height>m.size.y+2){let E=!1;if(f.currentRow.y+f.currentRow.height+m.size.y>=f.canvas.height){let R;for(let K of this._activePages)if(K.currentRow.y+K.currentRow.height+m.size.y<K.canvas.height){R=K;break}if(R)f=R;else if(i.maxAtlasPages&&this._pages.length>=i.maxAtlasPages&&g.y+m.size.y<=f.canvas.height&&g.height>=m.size.y&&g.x+m.size.x<=f.canvas.width)E=!0;else{let K=this._createNewPage();f=K,g=K.currentRow,g.height=m.size.y,E=!0}}E||(f.currentRow.height>0&&f.fixedRows.push(f.currentRow),g={x:0,y:f.currentRow.y+f.currentRow.height,height:m.size.y},f.fixedRows.push(g),f.currentRow={x:0,y:g.y+g.height,height:0})}if(g.x+m.size.x<=f.canvas.width)break;g===f.currentRow?(g.x=0,g.y+=g.height,g.height=0):f.fixedRows.splice(f.fixedRows.indexOf(g),1)}return m.texturePage=this._pages.indexOf(f),m.texturePosition.x=g.x,m.texturePosition.y=g.y,m.texturePositionClipSpace.x=g.x/f.canvas.width,m.texturePositionClipSpace.y=g.y/f.canvas.height,m.sizeClipSpace.x/=f.canvas.width,m.sizeClipSpace.y/=f.canvas.height,g.height=Math.max(g.height,m.size.y),g.x+=m.size.x,f.ctx.putImageData(v,m.texturePosition.x-this._workBoundingBox.left,m.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,m.size.x,m.size.y),f.addGlyph(m),f.version++,m}_findGlyphBoundingBox(e,t,n,s,o,r){t.top=0;let a=s?this._config.deviceCellHeight:this._tmpCanvas.height,l=s?this._config.deviceCellWidth:n,u=!1;for(let c=0;c<a;c++){for(let d=0;d<l;d++){let h=c*this._tmpCanvas.width*4+d*4+3;if(e.data[h]!==0){t.top=c,u=!0;break}}if(u)break}t.left=0,u=!1;for(let c=0;c<r+l;c++){for(let d=0;d<a;d++){let h=d*this._tmpCanvas.width*4+c*4+3;if(e.data[h]!==0){t.left=c,u=!0;break}}if(u)break}t.right=l,u=!1;for(let c=r+l-1;c>=r;c--){for(let d=0;d<a;d++){let h=d*this._tmpCanvas.width*4+c*4+3;if(e.data[h]!==0){t.right=c,u=!0;break}}if(u)break}t.bottom=a,u=!1;for(let c=a-1;c>=0;c--){for(let d=0;d<l;d++){let h=c*this._tmpCanvas.width*4+d*4+3;if(e.data[h]!==0){t.bottom=c,u=!0;break}}if(u)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:t.right-t.left+1,y:t.bottom-t.top+1},sizeClipSpace:{x:t.right-t.left+1,y:t.bottom-t.top+1},offset:{x:-t.left+r+(s||o?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-t.top+r+(s||o?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}},ot=class{constructor(e,t,n){this._usedPixels=0;this._glyphs=[];this.version=0;this.currentRow={x:0,y:0,height:0};this.fixedRows=[];if(n)for(let s of n)this._glyphs.push(...s.glyphs),this._usedPixels+=s._usedPixels;this.canvas=Nn(e,t,t),this.ctx=P(this.canvas.getContext("2d",{alpha:!0}))}get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(e){this._glyphs.push(e),this._usedPixels+=e.size.x*e.size.y}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}};function Ri(i,e,t,n){let s=e.rgba>>>24,o=e.rgba>>>16&255,r=e.rgba>>>8&255,a=t.rgba>>>24,l=t.rgba>>>16&255,u=t.rgba>>>8&255,c=Math.floor((Math.abs(s-a)+Math.abs(o-l)+Math.abs(r-u))/12),d=!0;for(let h=0;h<i.data.length;h+=4)i.data[h]===s&&i.data[h+1]===o&&i.data[h+2]===r||n&&Math.abs(i.data[h]-s)+Math.abs(i.data[h+1]-o)+Math.abs(i.data[h+2]-r)<c?i.data[h+3]=0:d=!1;return d}function ts(i){for(let e=0;e<i.data.length;e+=4)if(i.data[e+3]>0)return!1;return!0}function Nn(i,e,t){let n=i.createElement("canvas");return n.width=e,n.height=t,n}function Bn(i,e,t,n,s,o,r,a){let l={foreground:o.foreground,background:o.background,cursor:J,cursorAccent:J,selectionForeground:J,selectionBackgroundTransparent:J,selectionBackgroundOpaque:J,selectionInactiveBackgroundTransparent:J,selectionInactiveBackgroundOpaque:J,overviewRulerBorder:J,scrollbarSliderBackground:J,scrollbarSliderHoverBackground:J,scrollbarSliderActiveBackground:J,ansi:o.ansi.slice(),contrastCache:o.contrastCache,halfContrastCache:o.halfContrastCache};return{customGlyphs:s.customGlyphs,devicePixelRatio:r,deviceMaxTextureSize:a,letterSpacing:s.letterSpacing,lineHeight:s.lineHeight,deviceCellWidth:i,deviceCellHeight:e,deviceCharWidth:t,deviceCharHeight:n,fontFamily:s.fontFamily,fontSize:s.fontSize,fontWeight:s.fontWeight,fontWeightBold:s.fontWeightBold,allowTransparency:s.allowTransparency,drawBoldTextInBrightColors:s.drawBoldTextInBrightColors,minimumContrastRatio:s.minimumContrastRatio,colors:l}}function wi(i,e){for(let t=0;t<i.colors.ansi.length;t++)if(i.colors.ansi[t].rgba!==e.colors.ansi[t].rgba)return!1;return i.devicePixelRatio===e.devicePixelRatio&&i.customGlyphs===e.customGlyphs&&i.lineHeight===e.lineHeight&&i.letterSpacing===e.letterSpacing&&i.fontFamily===e.fontFamily&&i.fontSize===e.fontSize&&i.fontWeight===e.fontWeight&&i.fontWeightBold===e.fontWeightBold&&i.allowTransparency===e.allowTransparency&&i.deviceCharWidth===e.deviceCharWidth&&i.deviceCharHeight===e.deviceCharHeight&&i.drawBoldTextInBrightColors===e.drawBoldTextInBrightColors&&i.minimumContrastRatio===e.minimumContrastRatio&&i.colors.foreground.rgba===e.colors.foreground.rgba&&i.colors.background.rgba===e.colors.background.rgba}function Hn(i){return(i&50331648)===16777216||(i&50331648)===33554432}var ue=[];function Ht(i,e,t,n,s,o,r,a,l){let u=Bn(n,s,o,r,e,t,a,l);for(let h=0;h<ue.length;h++){let p=ue[h],L=p.ownedBy.indexOf(i);if(L>=0){if(wi(p.config,u))return p.atlas;p.ownedBy.length===1?(p.atlas.dispose(),ue.splice(h,1)):p.ownedBy.splice(L,1);break}}for(let h=0;h<ue.length;h++){let p=ue[h];if(wi(p.config,u))return p.ownedBy.push(i),p.atlas}let c=i._core,d={atlas:new le(document,u,c.unicodeService),config:u,ownedBy:[i]};return ue.push(d),d.atlas}function Di(i){for(let e=0;e<ue.length;e++){let t=ue[e].ownedBy.indexOf(i);if(t!==-1){ue[e].ownedBy.length===1?(ue[e].atlas.dispose(),ue.splice(e,1)):ue[e].ownedBy.splice(t,1);break}}}var Wt=600,kt=class{constructor(e,t){this._renderCallback=e;this._coreBrowserService=t;this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(e=Wt){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){let t=Wt-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,t>0){this._restartInterval(t);return}}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){let t=Wt-(Date.now()-this._animationTimeRestarted);this._animationTimeRestarted=void 0,this._restartInterval(t);return}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},Wt)},e)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}};function Mi(i,e,t){let n=new e.ResizeObserver(s=>{let o=s.find(l=>l.target===i);if(!o)return;if(!("devicePixelContentBoxSize"in o)){n?.disconnect(),n=void 0;return}let r=o.devicePixelContentBoxSize[0].inlineSize,a=o.devicePixelContentBoxSize[0].blockSize;r>0&&a>0&&t(r,a)});try{n.observe(i,{box:["device-pixel-content-box"]})}catch{n.disconnect(),n=void 0}return S(()=>n?.disconnect())}function Wn(i){return i>65535?(i-=65536,String.fromCharCode((i>>10)+55296)+String.fromCharCode(i%1024+56320)):String.fromCharCode(i)}var at=class i extends pe{constructor(){super(...arguments);this.content=0;this.fg=0;this.bg=0;this.extended=new it;this.combinedData=""}static fromCharData(t){let n=new i;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Wn(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let n=!1;if(t[1].length>2)n=!0;else if(t[1].length===2){let s=t[1].charCodeAt(0);if(55296<=s&&s<=56319){let o=t[1].charCodeAt(1);56320<=o&&o<=57343?this.content=(s-55296)*1024+o-56320+65536|t[2]<<22:n=!0}else n=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;n&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};var Ct=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]);function Gt(i,e,t){let n=P(i.createProgram());if(i.attachShader(n,P(kn(i,i.VERTEX_SHADER,e))),i.attachShader(n,P(kn(i,i.FRAGMENT_SHADER,t))),i.linkProgram(n),i.getProgramParameter(n,i.LINK_STATUS))return n;console.error(i.getProgramInfoLog(n)),i.deleteProgram(n)}function kn(i,e,t){let n=P(i.createShader(e));if(i.shaderSource(n,t),i.compileShader(n),i.getShaderParameter(n,i.COMPILE_STATUS))return n;console.error(i.getShaderInfoLog(n)),i.deleteShader(n)}function Un(i,e){let t=Math.min(i.length*2,e),n=new Float32Array(t);for(let s=0;s<i.length;s++)n[s]=i[s];return n}var Ut=class{constructor(e){this.texture=e,this.version=-1}};var rs=`#version 300 es
|
|
43
|
+
`).trim(),u=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(l);Ht.register(a,u?.[2]??l,a)}return a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*is<=t.length){let o=0;for(let s=0;s<t.length;s++)t[s]?t[o++]=t[s]:r&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){if(!e)return;let n=this._options?.onListenerError||Be;if(!n){e.value(t);return}try{e.value(t)}catch(r){n(r)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof $e)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}};var Ri=class{constructor(){this.i=-1;this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};var Nn={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}},st=2;var ot,ce=class i{constructor(e,t,n){this._document=e;this._config=t;this._unicodeService=n;this._didWarmUp=!1;this._cacheMap=new it;this._cacheMapCombined=new it;this._pages=[];this._activePages=[];this._workBoundingBox={top:0,left:0,bottom:0,right:0};this._workAttributeData=new pe;this._textureSize=512;this._onAddTextureAtlasCanvas=new D;this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;this._onRemoveTextureAtlasCanvas=new D;this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event;this._requestClearModel=!1;this._createNewPage(),this._tmpCanvas=Hn(e,this._config.deviceCellWidth*4+st*2,this._config.deviceCellHeight+st*2),this._tmpCtx=N(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}get pages(){return this._pages}dispose(){this._tmpCanvas.remove();for(let e of this.pages)e.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){let e=new wn;for(let t=33;t<126;t++)e.enqueue(()=>{if(!this._cacheMap.get(t,0,0,0)){let n=this._drawToCache(t,0,0,0,!1,void 0);this._cacheMap.set(t,0,0,0,n)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(!(this._pages[0].currentRow.x===0&&this._pages[0].currentRow.y===0)){for(let e of this._pages)e.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(i.maxAtlasPages&&this._pages.length>=Math.max(4,i.maxAtlasPages)){let t=this._pages.filter(u=>u.canvas.width*2<=(i.maxTextureSize||4096)).sort((u,c)=>c.canvas.width!==u.canvas.width?c.canvas.width-u.canvas.width:c.percentageUsed-u.percentageUsed),n=-1,r=0;for(let u=0;u<t.length;u++)if(t[u].canvas.width!==r)n=u,r=t[u].canvas.width;else if(u-n===3)break;let o=t.slice(n,n+4),s=o.map(u=>u.glyphs[0].texturePage).sort((u,c)=>u>c?1:-1),a=this.pages.length-o.length,l=this._mergePages(o,a);l.version++;for(let u=s.length-1;u>=0;u--)this._deletePage(s[u]);this.pages.push(l),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(l.canvas)}let e=new at(this._document,this._textureSize);return this._pages.push(e),this._activePages.push(e),this._onAddTextureAtlasCanvas.fire(e.canvas),e}_mergePages(e,t){let n=e[0].canvas.width*2,r=new at(this._document,n,e);for(let[o,s]of e.entries()){let a=o*s.canvas.width%n,l=Math.floor(o/2)*s.canvas.height;r.ctx.drawImage(s.canvas,a,l);for(let c of s.glyphs)c.texturePage=t,c.sizeClipSpace.x=c.size.x/n,c.sizeClipSpace.y=c.size.y/n,c.texturePosition.x+=a,c.texturePosition.y+=l,c.texturePositionClipSpace.x=c.texturePosition.x/n,c.texturePositionClipSpace.y=c.texturePosition.y/n;this._onRemoveTextureAtlasCanvas.fire(s.canvas);let u=this._activePages.indexOf(s);u!==-1&&this._activePages.splice(u,1)}return r}_deletePage(e){this._pages.splice(e,1);for(let t=e;t<this._pages.length;t++){let n=this._pages[t];for(let r of n.glyphs)r.texturePage--;n.version++}}getRasterizedGlyphCombinedChar(e,t,n,r,o,s){return this._getFromCacheMap(this._cacheMapCombined,e,t,n,r,o,s)}getRasterizedGlyph(e,t,n,r,o,s){return this._getFromCacheMap(this._cacheMap,e,t,n,r,o,s)}_getFromCacheMap(e,t,n,r,o,s,a){return ot=e.get(t,n,r,o),ot||(ot=this._drawToCache(t,n,r,o,s,a),e.set(t,n,r,o,ot)),ot}_getColorFromAnsiIndex(e){if(e>=this._config.colors.ansi.length)throw new Error("No color found for idx "+e);return this._config.colors.ansi[e]}_getBackgroundColor(e,t,n,r){if(this._config.allowTransparency)return te;let o;switch(e){case 16777216:case 33554432:o=this._getColorFromAnsiIndex(t);break;case 50331648:let s=pe.toColorRGB(t);o=X.toColor(s[0],s[1],s[2]);break;case 0:default:n?o=Ce.opaque(this._config.colors.foreground):o=this._config.colors.background;break}return this._config.allowTransparency||(o=Ce.opaque(o)),o}_getForegroundColor(e,t,n,r,o,s,a,l,u,c){let d=this._getMinimumContrastColor(e,t,n,r,o,s,a,u,l,c);if(d)return d;let h;switch(o){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&u&&s<8&&(s+=8),h=this._getColorFromAnsiIndex(s);break;case 50331648:let p=pe.toColorRGB(s);h=X.toColor(p[0],p[1],p[2]);break;case 0:default:a?h=this._config.colors.background:h=this._config.colors.foreground}return this._config.allowTransparency&&(h=Ce.opaque(h)),l&&(h=Ce.multiplyOpacity(h,Ln)),h}_resolveBackgroundRgba(e,t,n){switch(e){case 16777216:case 33554432:return this._getColorFromAnsiIndex(t).rgba;case 50331648:return t<<8;case 0:default:return n?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(e,t,n,r){switch(e){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&r&&t<8&&(t+=8),this._getColorFromAnsiIndex(t).rgba;case 50331648:return t<<8;case 0:default:return n?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(e,t,n,r,o,s,a,l,u,c){if(this._config.minimumContrastRatio===1||c)return;let d=this._getContrastCache(u),h=d.getColor(e,r);if(h!==void 0)return h||void 0;let p=this._resolveBackgroundRgba(t,n,a),m=this._resolveForegroundRgba(o,s,a,l),_=Ie.ensureContrastRatio(p,m,this._config.minimumContrastRatio/(u?2:1));if(!_){d.setColor(e,r,null);return}let A=X.toColor(_>>24&255,_>>16&255,_>>8&255);return d.setColor(e,r,A),A}_getContrastCache(e){return e?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(e,t,n,r,o,s){let a=typeof e=="number"?String.fromCharCode(e):e;s&&this._tmpCanvas.parentElement!==s&&(this._tmpCanvas.style.display="none",s.append(this._tmpCanvas));let l=Math.min(this._config.deviceCellWidth*Math.max(a.length,2)+st*2,this._config.deviceMaxTextureSize);this._tmpCanvas.width<l&&(this._tmpCanvas.width=l);let u=Math.min(this._config.deviceCellHeight+st*4,this._textureSize);if(this._tmpCanvas.height<u&&(this._tmpCanvas.height=u),this._tmpCtx.save(),this._workAttributeData.fg=n,this._workAttributeData.bg=t,this._workAttributeData.extended.ext=r,!!this._workAttributeData.isInvisible())return Nn;let d=!!this._workAttributeData.isBold(),h=!!this._workAttributeData.isInverse(),p=!!this._workAttributeData.isDim(),m=!!this._workAttributeData.isItalic(),_=!!this._workAttributeData.isUnderline(),A=!!this._workAttributeData.isStrikethrough(),M=!!this._workAttributeData.isOverline(),R=this._workAttributeData.getFgColor(),B=this._workAttributeData.getFgColorMode(),L=this._workAttributeData.getBgColor(),x=this._workAttributeData.getBgColorMode();if(h){let y=R;R=L,L=y;let w=B;B=x,x=w}let F=this._getBackgroundColor(x,L,h,p);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=F.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";let C=d?this._config.fontWeightBold:this._config.fontWeight,Y=m?"italic":"";this._tmpCtx.font=`${Y} ${C} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=Dt;let ve=a.length===1&&Rt(a.charCodeAt(0)),se=a.length===1&&mn(a.charCodeAt(0)),Te=this._getForegroundColor(t,x,L,n,B,R,h,p,d,Mt(a.charCodeAt(0)));this._tmpCtx.fillStyle=Te.css;let S=se?0:st*2,ee=!1;this._config.customGlyphs!==!1&&(ee=Rn(this._tmpCtx,a,S,S,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio,F.css));let E=!ve,T;if(typeof e=="number"?T=this._unicodeService.wcwidth(e):T=this._unicodeService.getStringCellWidth(e),_){this._tmpCtx.save();let y=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),w=y%2===1?.5:0;if(this._tmpCtx.lineWidth=y,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())E=!1,this._tmpCtx.strokeStyle=`rgb(${pe.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{E=!1;let oe=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&oe<8&&(oe+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(oe).css}this._tmpCtx.beginPath();let V=S,W=Math.ceil(S+this._config.deviceCharHeight)-w-(o?y*2:0),he=W+y,Fe=W+y*2,ue=this._workAttributeData.getUnderlineVariantOffset();for(let oe=0;oe<T;oe++){this._tmpCtx.save();let U=V+oe*this._config.deviceCellWidth,ae=V+(oe+1)*this._config.deviceCellWidth,hi=U+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(U,W),this._tmpCtx.lineTo(ae,W),this._tmpCtx.moveTo(U,Fe),this._tmpCtx.lineTo(ae,Fe);break;case 3:let Tt=y<=1?Fe:Math.ceil(S+this._config.deviceCharHeight-y/2)-w,mt=y<=1?W:Math.ceil(S+this._config.deviceCharHeight+y/2)-w,ji=new Path2D;ji.rect(U,W,this._config.deviceCellWidth,Fe-W),this._tmpCtx.clip(ji),this._tmpCtx.moveTo(U-this._config.deviceCellWidth/2,he),this._tmpCtx.bezierCurveTo(U-this._config.deviceCellWidth/2,mt,U,mt,U,he),this._tmpCtx.bezierCurveTo(U,Tt,hi,Tt,hi,he),this._tmpCtx.bezierCurveTo(hi,mt,ae,mt,ae,he),this._tmpCtx.bezierCurveTo(ae,Tt,ae+this._config.deviceCellWidth/2,Tt,ae+this._config.deviceCellWidth/2,he);break;case 4:let ft=ue===0?0:ue>=y?y*2-ue:y-ue;!(ue>=y)===!1||ft===0?(this._tmpCtx.setLineDash([Math.round(y),Math.round(y)]),this._tmpCtx.moveTo(U+ft,W),this._tmpCtx.lineTo(ae,W)):(this._tmpCtx.setLineDash([Math.round(y),Math.round(y)]),this._tmpCtx.moveTo(U,W),this._tmpCtx.lineTo(U+ft,W),this._tmpCtx.moveTo(U+ft+y,W),this._tmpCtx.lineTo(ae,W)),ue=gn(ae-U,y,ue);break;case 5:let Or=.6,Rr=.3,pi=ae-U,Yi=Math.floor(Or*pi),Xi=Math.floor(Rr*pi),Mr=pi-Yi-Xi;this._tmpCtx.setLineDash([Yi,Xi,Mr]),this._tmpCtx.moveTo(U,W),this._tmpCtx.lineTo(ae,W);break;case 1:default:this._tmpCtx.moveTo(U,W),this._tmpCtx.lineTo(ae,W);break}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!ee&&this._config.fontSize>=12&&!this._config.allowTransparency&&a!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";let oe=this._tmpCtx.measureText(a);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in oe&&oe.actualBoundingBoxDescent>0){this._tmpCtx.save();let U=new Path2D;U.rect(V,W-Math.ceil(y/2),this._config.deviceCellWidth*T,Fe-W+Math.ceil(y/2)),this._tmpCtx.clip(U),this._tmpCtx.lineWidth=this._config.devicePixelRatio*3,this._tmpCtx.strokeStyle=F.css,this._tmpCtx.strokeText(a,S,S+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(M){let y=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),w=y%2===1?.5:0;this._tmpCtx.lineWidth=y,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(S,S+w),this._tmpCtx.lineTo(S+this._config.deviceCharWidth*T,S+w),this._tmpCtx.stroke()}if(ee||this._tmpCtx.fillText(a,S,S+this._config.deviceCharHeight),a==="_"&&!this._config.allowTransparency){let y=Fi(this._tmpCtx.getImageData(S,S,this._config.deviceCellWidth,this._config.deviceCellHeight),F,Te,E);if(y)for(let w=1;w<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=F.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(a,S,S+this._config.deviceCharHeight-w),y=Fi(this._tmpCtx.getImageData(S,S,this._config.deviceCellWidth,this._config.deviceCellHeight),F,Te,E),!!y);w++);}if(A){let y=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),w=this._tmpCtx.lineWidth%2===1?.5:0;this._tmpCtx.lineWidth=y,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(S,S+Math.floor(this._config.deviceCharHeight/2)-w),this._tmpCtx.lineTo(S+this._config.deviceCharWidth*T,S+Math.floor(this._config.deviceCharHeight/2)-w),this._tmpCtx.stroke()}this._tmpCtx.restore();let v=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height),g;if(this._config.allowTransparency?g=ss(v):g=Fi(v,F,Te,E),g)return Nn;let f=this._findGlyphBoundingBox(v,this._workBoundingBox,l,se,ee,S),b,I;for(;;){if(this._activePages.length===0){let y=this._createNewPage();b=y,I=y.currentRow,I.height=f.size.y;break}b=this._activePages[this._activePages.length-1],I=b.currentRow;for(let y of this._activePages)f.size.y<=y.currentRow.height&&(b=y,I=y.currentRow);for(let y=this._activePages.length-1;y>=0;y--)for(let w of this._activePages[y].fixedRows)w.height<=I.height&&f.size.y<=w.height&&(b=this._activePages[y],I=w);if(f.size.x>this._textureSize){this._overflowSizePage||(this._overflowSizePage=new at(this._document,this._config.deviceMaxTextureSize),this.pages.push(this._overflowSizePage),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(this._overflowSizePage.canvas)),b=this._overflowSizePage,I=this._overflowSizePage.currentRow,I.x+f.size.x>=b.canvas.width&&(I.x=0,I.y+=I.height,I.height=0);break}if(I.y+f.size.y>=b.canvas.height||I.height>f.size.y+2){let y=!1;if(b.currentRow.y+b.currentRow.height+f.size.y>=b.canvas.height){let w;for(let V of this._activePages)if(V.currentRow.y+V.currentRow.height+f.size.y<V.canvas.height){w=V;break}if(w)b=w;else if(i.maxAtlasPages&&this._pages.length>=i.maxAtlasPages&&I.y+f.size.y<=b.canvas.height&&I.height>=f.size.y&&I.x+f.size.x<=b.canvas.width)y=!0;else{let V=this._createNewPage();b=V,I=V.currentRow,I.height=f.size.y,y=!0}}y||(b.currentRow.height>0&&b.fixedRows.push(b.currentRow),I={x:0,y:b.currentRow.y+b.currentRow.height,height:f.size.y},b.fixedRows.push(I),b.currentRow={x:0,y:I.y+I.height,height:0})}if(I.x+f.size.x<=b.canvas.width)break;I===b.currentRow?(I.x=0,I.y+=I.height,I.height=0):b.fixedRows.splice(b.fixedRows.indexOf(I),1)}return f.texturePage=this._pages.indexOf(b),f.texturePosition.x=I.x,f.texturePosition.y=I.y,f.texturePositionClipSpace.x=I.x/b.canvas.width,f.texturePositionClipSpace.y=I.y/b.canvas.height,f.sizeClipSpace.x/=b.canvas.width,f.sizeClipSpace.y/=b.canvas.height,I.height=Math.max(I.height,f.size.y),I.x+=f.size.x,b.ctx.putImageData(v,f.texturePosition.x-this._workBoundingBox.left,f.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,f.size.x,f.size.y),b.addGlyph(f),b.version++,f}_findGlyphBoundingBox(e,t,n,r,o,s){t.top=0;let a=r?this._config.deviceCellHeight:this._tmpCanvas.height,l=r?this._config.deviceCellWidth:n,u=!1;for(let c=0;c<a;c++){for(let d=0;d<l;d++){let h=c*this._tmpCanvas.width*4+d*4+3;if(e.data[h]!==0){t.top=c,u=!0;break}}if(u)break}t.left=0,u=!1;for(let c=0;c<s+l;c++){for(let d=0;d<a;d++){let h=d*this._tmpCanvas.width*4+c*4+3;if(e.data[h]!==0){t.left=c,u=!0;break}}if(u)break}t.right=l,u=!1;for(let c=s+l-1;c>=s;c--){for(let d=0;d<a;d++){let h=d*this._tmpCanvas.width*4+c*4+3;if(e.data[h]!==0){t.right=c,u=!0;break}}if(u)break}t.bottom=a,u=!1;for(let c=a-1;c>=0;c--){for(let d=0;d<l;d++){let h=c*this._tmpCanvas.width*4+d*4+3;if(e.data[h]!==0){t.bottom=c,u=!0;break}}if(u)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:t.right-t.left+1,y:t.bottom-t.top+1},sizeClipSpace:{x:t.right-t.left+1,y:t.bottom-t.top+1},offset:{x:-t.left+s+(r||o?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-t.top+s+(r||o?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}},at=class{constructor(e,t,n){this._usedPixels=0;this._glyphs=[];this.version=0;this.currentRow={x:0,y:0,height:0};this.fixedRows=[];if(n)for(let r of n)this._glyphs.push(...r.glyphs),this._usedPixels+=r._usedPixels;this.canvas=Hn(e,t,t),this.ctx=N(this.canvas.getContext("2d",{alpha:!0}))}get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(e){this._glyphs.push(e),this._usedPixels+=e.size.x*e.size.y}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}};function Fi(i,e,t,n){let r=e.rgba>>>24,o=e.rgba>>>16&255,s=e.rgba>>>8&255,a=t.rgba>>>24,l=t.rgba>>>16&255,u=t.rgba>>>8&255,c=Math.floor((Math.abs(r-a)+Math.abs(o-l)+Math.abs(s-u))/12),d=!0;for(let h=0;h<i.data.length;h+=4)i.data[h]===r&&i.data[h+1]===o&&i.data[h+2]===s||n&&Math.abs(i.data[h]-r)+Math.abs(i.data[h+1]-o)+Math.abs(i.data[h+2]-s)<c?i.data[h+3]=0:d=!1;return d}function ss(i){for(let e=0;e<i.data.length;e+=4)if(i.data[e+3]>0)return!1;return!0}function Hn(i,e,t){let n=i.createElement("canvas");return n.width=e,n.height=t,n}function Bn(i,e,t,n,r,o,s,a){let l={foreground:o.foreground,background:o.background,cursor:te,cursorAccent:te,selectionForeground:te,selectionBackgroundTransparent:te,selectionBackgroundOpaque:te,selectionInactiveBackgroundTransparent:te,selectionInactiveBackgroundOpaque:te,overviewRulerBorder:te,scrollbarSliderBackground:te,scrollbarSliderHoverBackground:te,scrollbarSliderActiveBackground:te,ansi:o.ansi.slice(),contrastCache:o.contrastCache,halfContrastCache:o.halfContrastCache};return{customGlyphs:r.customGlyphs,devicePixelRatio:s,deviceMaxTextureSize:a,letterSpacing:r.letterSpacing,lineHeight:r.lineHeight,deviceCellWidth:i,deviceCellHeight:e,deviceCharWidth:t,deviceCharHeight:n,fontFamily:r.fontFamily,fontSize:r.fontSize,fontWeight:r.fontWeight,fontWeightBold:r.fontWeightBold,allowTransparency:r.allowTransparency,drawBoldTextInBrightColors:r.drawBoldTextInBrightColors,minimumContrastRatio:r.minimumContrastRatio,colors:l}}function wi(i,e){for(let t=0;t<i.colors.ansi.length;t++)if(i.colors.ansi[t].rgba!==e.colors.ansi[t].rgba)return!1;return i.devicePixelRatio===e.devicePixelRatio&&i.customGlyphs===e.customGlyphs&&i.lineHeight===e.lineHeight&&i.letterSpacing===e.letterSpacing&&i.fontFamily===e.fontFamily&&i.fontSize===e.fontSize&&i.fontWeight===e.fontWeight&&i.fontWeightBold===e.fontWeightBold&&i.allowTransparency===e.allowTransparency&&i.deviceCharWidth===e.deviceCharWidth&&i.deviceCharHeight===e.deviceCharHeight&&i.drawBoldTextInBrightColors===e.drawBoldTextInBrightColors&&i.minimumContrastRatio===e.minimumContrastRatio&&i.colors.foreground.rgba===e.colors.foreground.rgba&&i.colors.background.rgba===e.colors.background.rgba}function Wn(i){return(i&50331648)===16777216||(i&50331648)===33554432}var de=[];function Wt(i,e,t,n,r,o,s,a,l){let u=Bn(n,r,o,s,e,t,a,l);for(let h=0;h<de.length;h++){let p=de[h],m=p.ownedBy.indexOf(i);if(m>=0){if(wi(p.config,u))return p.atlas;p.ownedBy.length===1?(p.atlas.dispose(),de.splice(h,1)):p.ownedBy.splice(m,1);break}}for(let h=0;h<de.length;h++){let p=de[h];if(wi(p.config,u))return p.ownedBy.push(i),p.atlas}let c=i._core,d={atlas:new ce(document,u,c.unicodeService),config:u,ownedBy:[i]};return de.push(d),d.atlas}function Di(i){for(let e=0;e<de.length;e++){let t=de[e].ownedBy.indexOf(i);if(t!==-1){de[e].ownedBy.length===1?(de[e].atlas.dispose(),de.splice(e,1)):de[e].ownedBy.splice(t,1);break}}}var kt=600,Ct=class{constructor(e,t){this._renderCallback=e;this._coreBrowserService=t;this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(e=kt){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){let t=kt-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,t>0){this._restartInterval(t);return}}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){let t=kt-(Date.now()-this._animationTimeRestarted);this._animationTimeRestarted=void 0,this._restartInterval(t);return}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},kt)},e)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}};function Si(i,e,t){let n=new e.ResizeObserver(r=>{let o=r.find(l=>l.target===i);if(!o)return;if(!("devicePixelContentBoxSize"in o)){n?.disconnect(),n=void 0;return}let s=o.devicePixelContentBoxSize[0].inlineSize,a=o.devicePixelContentBoxSize[0].blockSize;s>0&&a>0&&t(s,a)});try{n.observe(i,{box:["device-pixel-content-box"]})}catch{n.disconnect(),n=void 0}return P(()=>n?.disconnect())}function kn(i){return i>65535?(i-=65536,String.fromCharCode((i>>10)+55296)+String.fromCharCode(i%1024+56320)):String.fromCharCode(i)}var lt=class i extends pe{constructor(){super(...arguments);this.content=0;this.fg=0;this.bg=0;this.extended=new nt;this.combinedData=""}static fromCharData(t){let n=new i;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?kn(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let n=!1;if(t[1].length>2)n=!0;else if(t[1].length===2){let r=t[1].charCodeAt(0);if(55296<=r&&r<=56319){let o=t[1].charCodeAt(1);56320<=o&&o<=57343?this.content=(r-55296)*1024+o-56320+65536|t[2]<<22:n=!0}else n=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;n&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};var Gt=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]);function $t(i,e,t){let n=N(i.createProgram());if(i.attachShader(n,N(Cn(i,i.VERTEX_SHADER,e))),i.attachShader(n,N(Cn(i,i.FRAGMENT_SHADER,t))),i.linkProgram(n),i.getProgramParameter(n,i.LINK_STATUS))return n;console.error(i.getProgramInfoLog(n)),i.deleteProgram(n)}function Cn(i,e,t){let n=N(i.createShader(e));if(i.shaderSource(n,t),i.compileShader(n),i.getShaderParameter(n,i.COMPILE_STATUS))return n;console.error(i.getShaderInfoLog(n)),i.deleteShader(n)}function Un(i,e){let t=Math.min(i.length*2,e),n=new Float32Array(t);for(let r=0;r<i.length;r++)n[r]=i[r];return n}var Ut=class{constructor(e){this.texture=e,this.version=-1}};var ls=`#version 300 es
|
|
44
44
|
layout (location = 0) in vec2 a_unitquad;
|
|
45
45
|
layout (location = 1) in vec2 a_cellpos;
|
|
46
46
|
layout (location = 2) in vec2 a_offset;
|
|
@@ -60,7 +60,7 @@ void main() {
|
|
|
60
60
|
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
61
61
|
v_texpage = int(a_texpage);
|
|
62
62
|
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
|
63
|
-
}`;function
|
|
63
|
+
}`;function us(i){let e="";for(let t=1;t<i;t++)e+=` else if (v_texpage == ${t}) { outColor = texture(u_texture[${t}], v_texcoord); }`;return`#version 300 es
|
|
64
64
|
precision lowp float;
|
|
65
65
|
|
|
66
66
|
in vec2 v_texcoord;
|
|
@@ -74,7 +74,7 @@ void main() {
|
|
|
74
74
|
if (v_texpage == 0) {
|
|
75
75
|
outColor = texture(u_texture[0], v_texcoord);
|
|
76
76
|
} ${e}
|
|
77
|
-
}`}var we=11,
|
|
77
|
+
}`}var we=11,ze=we*Float32Array.BYTES_PER_ELEMENT,cs=2,$=0,H,Ni=0,ut=0,Vt=class extends k{constructor(t,n,r,o){super();this._terminal=t;this._gl=n;this._dimensions=r;this._optionsService=o;this._activeBuffer=0;this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};let s=this._gl;ce.maxAtlasPages===void 0&&(ce.maxAtlasPages=Math.min(32,N(s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS))),ce.maxTextureSize=N(s.getParameter(s.MAX_TEXTURE_SIZE))),this._program=N($t(s,ls,us(ce.maxAtlasPages))),this._register(P(()=>s.deleteProgram(this._program))),this._projectionLocation=N(s.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=N(s.getUniformLocation(this._program,"u_resolution")),this._textureLocation=N(s.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=s.createVertexArray(),s.bindVertexArray(this._vertexArrayObject);let a=new Float32Array([0,0,1,0,0,1,1,1]),l=s.createBuffer();this._register(P(()=>s.deleteBuffer(l))),s.bindBuffer(s.ARRAY_BUFFER,l),s.bufferData(s.ARRAY_BUFFER,a,s.STATIC_DRAW),s.enableVertexAttribArray(0),s.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);let u=new Uint8Array([0,1,2,3]),c=s.createBuffer();this._register(P(()=>s.deleteBuffer(c))),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,c),s.bufferData(s.ELEMENT_ARRAY_BUFFER,u,s.STATIC_DRAW),this._attributesBuffer=N(s.createBuffer()),this._register(P(()=>s.deleteBuffer(this._attributesBuffer))),s.bindBuffer(s.ARRAY_BUFFER,this._attributesBuffer),s.enableVertexAttribArray(2),s.vertexAttribPointer(2,2,s.FLOAT,!1,ze,0),s.vertexAttribDivisor(2,1),s.enableVertexAttribArray(3),s.vertexAttribPointer(3,2,s.FLOAT,!1,ze,2*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(3,1),s.enableVertexAttribArray(4),s.vertexAttribPointer(4,1,s.FLOAT,!1,ze,4*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(4,1),s.enableVertexAttribArray(5),s.vertexAttribPointer(5,2,s.FLOAT,!1,ze,5*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(5,1),s.enableVertexAttribArray(6),s.vertexAttribPointer(6,2,s.FLOAT,!1,ze,7*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(6,1),s.enableVertexAttribArray(1),s.vertexAttribPointer(1,2,s.FLOAT,!1,ze,9*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(1,1),s.useProgram(this._program);let d=new Int32Array(ce.maxAtlasPages);for(let h=0;h<ce.maxAtlasPages;h++)d[h]=h;s.uniform1iv(this._textureLocation,d),s.uniformMatrix4fv(this._projectionLocation,!1,Gt),this._atlasTextures=[];for(let h=0;h<ce.maxAtlasPages;h++){let p=new Ut(N(s.createTexture()));this._register(P(()=>s.deleteTexture(p.texture))),s.activeTexture(s.TEXTURE0+h),s.bindTexture(s.TEXTURE_2D,p.texture),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[h]=p}s.enable(s.BLEND),s.blendFunc(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return this._atlas?this._atlas.beginFrame():!0}updateCell(t,n,r,o,s,a,l,u,c){this._updateCell(this._vertices.attributes,t,n,r,o,s,a,l,u,c)}_updateCell(t,n,r,o,s,a,l,u,c,d){if($=(r*this._terminal.cols+n)*we,o===0||o===void 0){t.fill(0,$,$+we-1-cs);return}this._atlas&&(u&&u.length>1?H=this._atlas.getRasterizedGlyphCombinedChar(u,s,a,l,!1,this._terminal.element):H=this._atlas.getRasterizedGlyph(o,s,a,l,!1,this._terminal.element),Ni=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),s!==d&&H.offset.x>Ni?(ut=H.offset.x-Ni,t[$]=-(H.offset.x-ut)+this._dimensions.device.char.left,t[$+1]=-H.offset.y+this._dimensions.device.char.top,t[$+2]=(H.size.x-ut)/this._dimensions.device.canvas.width,t[$+3]=H.size.y/this._dimensions.device.canvas.height,t[$+4]=H.texturePage,t[$+5]=H.texturePositionClipSpace.x+ut/this._atlas.pages[H.texturePage].canvas.width,t[$+6]=H.texturePositionClipSpace.y,t[$+7]=H.sizeClipSpace.x-ut/this._atlas.pages[H.texturePage].canvas.width,t[$+8]=H.sizeClipSpace.y):(t[$]=-H.offset.x+this._dimensions.device.char.left,t[$+1]=-H.offset.y+this._dimensions.device.char.top,t[$+2]=H.size.x/this._dimensions.device.canvas.width,t[$+3]=H.size.y/this._dimensions.device.canvas.height,t[$+4]=H.texturePage,t[$+5]=H.texturePositionClipSpace.x,t[$+6]=H.texturePositionClipSpace.y,t[$+7]=H.sizeClipSpace.x,t[$+8]=H.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&fn(o,c,H.size.x,this._dimensions.device.cell.width)&&(t[$+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width))}clear(){let t=this._terminal,n=t.cols*t.rows*we;this._vertices.count!==n?this._vertices.attributes=new Float32Array(n):this._vertices.attributes.fill(0);let r=0;for(;r<this._vertices.attributesBuffers.length;r++)this._vertices.count!==n?this._vertices.attributesBuffers[r]=new Float32Array(n):this._vertices.attributesBuffers[r].fill(0);this._vertices.count=n,r=0;for(let o=0;o<t.rows;o++)for(let s=0;s<t.cols;s++)this._vertices.attributes[r+9]=s/t.cols,this._vertices.attributes[r+10]=o/t.rows,r+=we}handleResize(){let t=this._gl;t.useProgram(this._program),t.viewport(0,0,t.canvas.width,t.canvas.height),t.uniform2f(this._resolutionLocation,t.canvas.width,t.canvas.height),this.clear()}render(t){if(!this._atlas)return;let n=this._gl;n.useProgram(this._program),n.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;let r=this._vertices.attributesBuffers[this._activeBuffer],o=0;for(let s=0;s<t.lineLengths.length;s++){let a=s*this._terminal.cols*we,l=this._vertices.attributes.subarray(a,a+t.lineLengths[s]*we);r.set(l,o),o+=l.length}n.bindBuffer(n.ARRAY_BUFFER,this._attributesBuffer),n.bufferData(n.ARRAY_BUFFER,r.subarray(0,o),n.STREAM_DRAW);for(let s=0;s<this._atlas.pages.length;s++)this._atlas.pages[s].version!==this._atlasTextures[s].version&&this._bindAtlasPageTexture(n,this._atlas,s);n.drawElementsInstanced(n.TRIANGLE_STRIP,4,n.UNSIGNED_BYTE,0,o/we)}setAtlas(t){this._atlas=t;for(let n of this._atlasTextures)n.version=-1}_bindAtlasPageTexture(t,n,r){t.activeTexture(t.TEXTURE0+r),t.bindTexture(t.TEXTURE_2D,this._atlasTextures[r].texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n.pages[r].canvas),t.generateMipmap(t.TEXTURE_2D),this._atlasTextures[r].version=n.pages[r].version}setDimensions(t){this._dimensions=t}};var Hi=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,n,r=!1){if(this.selectionStart=t,this.selectionEnd=n,!t||!n||t[0]===n[0]&&t[1]===n[1]){this.clear();return}let o=e.buffers.active.ydisp,s=t[1]-o,a=n[1]-o,l=Math.max(s,0),u=Math.min(a,e.rows-1);if(l>=e.rows||u<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=r,this.viewportStartRow=s,this.viewportEndRow=a,this.viewportCappedStartRow=l,this.viewportCappedEndRow=u,this.startCol=t[0],this.endCol=n[0]}isCellSelected(e,t,n){return this.hasSelection?(n-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&n>=this.viewportCappedStartRow&&t<this.endCol&&n<=this.viewportCappedEndRow:t<this.startCol&&n>=this.viewportCappedStartRow&&t>=this.endCol&&n<=this.viewportCappedEndRow:n>this.viewportStartRow&&n<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol):!1}};function Gn(){return new Hi}var Ze=4,qe=1,je=2,zt=3,$n=2147483648,Kt=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=Gn()}resize(e,t){let n=e*t*Ze;n!==this.cells.length&&(this.cells=new Uint32Array(n),this.lineLengths=new Uint32Array(t))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}};var ds=`#version 300 es
|
|
78
78
|
layout (location = 0) in vec2 a_position;
|
|
79
79
|
layout (location = 1) in vec2 a_size;
|
|
80
80
|
layout (location = 2) in vec4 a_color;
|
|
@@ -88,7 +88,7 @@ void main() {
|
|
|
88
88
|
vec2 zeroToOne = a_position + (a_unitquad * a_size);
|
|
89
89
|
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
90
90
|
v_color = a_color;
|
|
91
|
-
}`,
|
|
91
|
+
}`,hs=`#version 300 es
|
|
92
92
|
precision lowp float;
|
|
93
93
|
|
|
94
94
|
in vec4 v_color;
|
|
@@ -97,5 +97,5 @@ out vec4 outColor;
|
|
|
97
97
|
|
|
98
98
|
void main() {
|
|
99
99
|
outColor = v_color;
|
|
100
|
-
}`,Ie=8,Ni=Ie*Float32Array.BYTES_PER_ELEMENT,us=20*Ie,zt=class{constructor(){this.attributes=new Float32Array(us),this.count=0}},xe=0,Kn=0,$n=0,Vn=0,zn=0,qn=0,jn=0,qt=class extends H{constructor(t,n,s,o){super();this._terminal=t;this._gl=n;this._dimensions=s;this._themeService=o;this._vertices=new zt;this._verticesCursor=new zt;let r=this._gl;this._program=P(Gt(r,as,ls)),this._register(S(()=>r.deleteProgram(this._program))),this._projectionLocation=P(r.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=r.createVertexArray(),r.bindVertexArray(this._vertexArrayObject);let a=new Float32Array([0,0,1,0,0,1,1,1]),l=r.createBuffer();this._register(S(()=>r.deleteBuffer(l))),r.bindBuffer(r.ARRAY_BUFFER,l),r.bufferData(r.ARRAY_BUFFER,a,r.STATIC_DRAW),r.enableVertexAttribArray(3),r.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let u=new Uint8Array([0,1,2,3]),c=r.createBuffer();this._register(S(()=>r.deleteBuffer(c))),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,c),r.bufferData(r.ELEMENT_ARRAY_BUFFER,u,r.STATIC_DRAW),this._attributesBuffer=P(r.createBuffer()),this._register(S(()=>r.deleteBuffer(this._attributesBuffer))),r.bindBuffer(r.ARRAY_BUFFER,this._attributesBuffer),r.enableVertexAttribArray(0),r.vertexAttribPointer(0,2,r.FLOAT,!1,Ni,0),r.vertexAttribDivisor(0,1),r.enableVertexAttribArray(1),r.vertexAttribPointer(1,2,r.FLOAT,!1,Ni,2*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(1,1),r.enableVertexAttribArray(2),r.vertexAttribPointer(2,4,r.FLOAT,!1,Ni,4*Float32Array.BYTES_PER_ELEMENT),r.vertexAttribDivisor(2,1),this._updateCachedColors(o.colors),this._register(this._themeService.onChangeColors(d=>{this._updateCachedColors(d),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(t){let n=this._gl;n.useProgram(this._program),n.bindVertexArray(this._vertexArrayObject),n.uniformMatrix4fv(this._projectionLocation,!1,Ct),n.bindBuffer(n.ARRAY_BUFFER,this._attributesBuffer),n.bufferData(n.ARRAY_BUFFER,t.attributes,n.DYNAMIC_DRAW),n.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,n.UNSIGNED_BYTE,0,t.count)}handleResize(){this._updateViewportRectangle()}setDimensions(t){this._dimensions=t}_updateCachedColors(t){this._bgFloat=this._colorToFloat32Array(t.background),this._cursorFloat=this._colorToFloat32Array(t.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(t){let n=this._terminal,s=this._vertices,o=1,r,a,l,u,c,d,h,p,L,O,D;for(r=0;r<n.rows;r++){for(l=-1,u=0,c=0,d=!1,a=0;a<n.cols;a++)h=(r*n.cols+a)*ze,p=t.cells[h+qe],L=t.cells[h+je],O=!!(L&67108864),(p!==u||L!==c&&(d||O))&&((u!==0||d&&c!==0)&&(D=o++*Ie,this._updateRectangle(s,D,c,u,l,a,r)),l=a,u=p,c=L,d=O);(u!==0||d&&c!==0)&&(D=o++*Ie,this._updateRectangle(s,D,c,u,l,n.cols,r))}s.count=o}updateCursor(t){let n=this._verticesCursor,s=t.cursor;if(!s||s.style==="block"){n.count=0;return}let o,r=0;(s.style==="bar"||s.style==="outline")&&(o=r++*Ie,this._addRectangleFloat(n.attributes,o,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,s.style==="bar"?s.dpr*s.cursorWidth:s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),(s.style==="underline"||s.style==="outline")&&(o=r++*Ie,this._addRectangleFloat(n.attributes,o,s.x*this._dimensions.device.cell.width,(s.y+1)*this._dimensions.device.cell.height-s.dpr,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat)),s.style==="outline"&&(o=r++*Ie,this._addRectangleFloat(n.attributes,o,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat),o=r++*Ie,this._addRectangleFloat(n.attributes,o,(s.x+s.width)*this._dimensions.device.cell.width-s.dpr,s.y*this._dimensions.device.cell.height,s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),n.count=r}_updateRectangle(t,n,s,o,r,a,l){if(s&67108864)switch(s&50331648){case 16777216:case 33554432:xe=this._themeService.colors.ansi[s&255].rgba;break;case 50331648:xe=(s&16777215)<<8;break;case 0:default:xe=this._themeService.colors.foreground.rgba}else switch(o&50331648){case 16777216:case 33554432:xe=this._themeService.colors.ansi[o&255].rgba;break;case 50331648:xe=(o&16777215)<<8;break;case 0:default:xe=this._themeService.colors.background.rgba}t.attributes.length<n+4&&(t.attributes=Un(t.attributes,this._terminal.rows*this._terminal.cols*Ie)),Kn=r*this._dimensions.device.cell.width,$n=l*this._dimensions.device.cell.height,Vn=(xe>>24&255)/255,zn=(xe>>16&255)/255,qn=(xe>>8&255)/255,jn=1,this._addRectangle(t.attributes,n,Kn,$n,(a-r)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,Vn,zn,qn,jn)}_addRectangle(t,n,s,o,r,a,l,u,c,d){t[n]=s/this._dimensions.device.canvas.width,t[n+1]=o/this._dimensions.device.canvas.height,t[n+2]=r/this._dimensions.device.canvas.width,t[n+3]=a/this._dimensions.device.canvas.height,t[n+4]=l,t[n+5]=u,t[n+6]=c,t[n+7]=d}_addRectangleFloat(t,n,s,o,r,a,l){t[n]=s/this._dimensions.device.canvas.width,t[n+1]=o/this._dimensions.device.canvas.height,t[n+2]=r/this._dimensions.device.canvas.width,t[n+3]=a/this._dimensions.device.canvas.height,t[n+4]=l[0],t[n+5]=l[1],t[n+6]=l[2],t[n+7]=l[3]}_colorToFloat32Array(t){return new Float32Array([(t.rgba>>24&255)/255,(t.rgba>>16&255)/255,(t.rgba>>8&255)/255,(t.rgba&255)/255])}};var jt=class extends H{constructor(t,n,s,o,r,a,l,u){super();this._container=n;this._alpha=r;this._coreBrowserService=a;this._optionsService=l;this._themeService=u;this._deviceCharWidth=0;this._deviceCharHeight=0;this._deviceCellWidth=0;this._deviceCellHeight=0;this._deviceCharLeft=0;this._deviceCharTop=0;this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${s}-layer`),this._canvas.style.zIndex=o.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(c=>{this._refreshCharAtlas(t,c),this.reset(t)})),this._register(S(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=P(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(t){}handleFocus(t){}handleCursorMove(t){}handleGridChanged(t,n,s){}handleSelectionChanged(t,n,s,o=!1){}_setTransparency(t,n){if(n===this._alpha)return;let s=this._canvas;this._alpha=n,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,s),this._refreshCharAtlas(t,this._themeService.colors),this.handleGridChanged(t,0,t.rows-1)}_refreshCharAtlas(t,n){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=Ht(t,this._optionsService.rawOptions,n,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(t,n){this._deviceCellWidth=n.device.cell.width,this._deviceCellHeight=n.device.cell.height,this._deviceCharWidth=n.device.char.width,this._deviceCharHeight=n.device.char.height,this._deviceCharLeft=n.device.char.left,this._deviceCharTop=n.device.char.top,this._canvas.width=n.device.canvas.width,this._canvas.height=n.device.canvas.height,this._canvas.style.width=`${n.css.canvas.width}px`,this._canvas.style.height=`${n.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(t,this._themeService.colors)}_fillBottomLineAtCells(t,n,s=1){this._ctx.fillRect(t*this._deviceCellWidth,(n+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,s*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(t,n,s,o){this._alpha?this._ctx.clearRect(t*this._deviceCellWidth,n*this._deviceCellHeight,s*this._deviceCellWidth,o*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(t*this._deviceCellWidth,n*this._deviceCellHeight,s*this._deviceCellWidth,o*this._deviceCellHeight))}_fillCharTrueColor(t,n,s,o){this._ctx.font=this._getFont(t,!1,!1),this._ctx.textBaseline=Mt,this._clipCell(s,o,n.getWidth()),this._ctx.fillText(n.getChars(),s*this._deviceCellWidth+this._deviceCharLeft,o*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(t,n,s){this._ctx.beginPath(),this._ctx.rect(t*this._deviceCellWidth,n*this._deviceCellHeight,s*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(t,n,s){let o=n?t.options.fontWeightBold:t.options.fontWeight;return`${s?"italic":""} ${o} ${t.options.fontSize*this._coreBrowserService.dpr}px ${t.options.fontFamily}`}};var Xt=class extends jt{constructor(e,t,n,s,o,r,a){super(n,e,"link",t,!0,o,r,a),this._register(s.onShowLinkUnderline(l=>this._handleShowLinkUnderline(l))),this._register(s.onHideLinkUnderline(l=>this._handleHideLinkUnderline(l)))}resize(e,t){super.resize(e,t),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){if(e.fg===257?this._ctx.fillStyle=this._themeService.colors.background.css:e.fg!==void 0&&Hn(e.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}};var ie=typeof window=="object"?window:globalThis;var Qt=class Qt{constructor(){this.mapWindowIdToZoomLevel=new Map;this._onDidChangeZoomLevel=new w;this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event;this.mapWindowIdToZoomFactor=new Map;this._onDidChangeFullscreen=new w;this.onDidChangeFullscreen=this._onDidChangeFullscreen.event;this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(n,e),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToFullScreen.set(n,e),this._onDidChangeFullscreen.fire(n)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};Qt.INSTANCE=new Qt;var Yt=Qt;function ds(i,e,t){typeof e=="string"&&(e=i.matchMedia(e)),e.addEventListener("change",t)}var qa=Yt.INSTANCE.onDidChangeZoomLevel;var ja=Yt.INSTANCE.onDidChangeFullscreen,Xe=typeof navigator=="object"?navigator.userAgent:"",Xn=Xe.indexOf("Firefox")>=0,ut=Xe.indexOf("AppleWebKit")>=0,Zn=Xe.indexOf("Chrome")>=0,Bi=!Zn&&Xe.indexOf("Safari")>=0;var Xa=Xe.indexOf("Electron/")>=0,Za=Xe.indexOf("Android")>=0,Zt=!1;if(typeof ie.matchMedia=="function"){let i=ie.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=ie.matchMedia("(display-mode: fullscreen)");Zt=i.matches,ds(ie,i,({matches:t})=>{Zt&&e.matches||(Zt=t)})}function Yn(){return Zt}var Ze="en",Wi=!1,ni=!1,ti=!1,hs=!1,Jn=!1,er=!1,ps=!1,_s=!1,ms=!1,fs=!1,ei,ii=Ze,Qn=Ze,Ts,ye,Le=globalThis,se;typeof Le.vscode<"u"&&typeof Le.vscode.process<"u"?se=Le.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(se=process);var tr=typeof se?.versions?.electron=="string",bs=tr&&se?.type==="renderer";if(typeof se=="object"){Wi=se.platform==="win32",ni=se.platform==="darwin",ti=se.platform==="linux",hs=ti&&!!se.env.SNAP&&!!se.env.SNAP_REVISION,ps=tr,ms=!!se.env.CI||!!se.env.BUILD_ARTIFACTSTAGINGDIRECTORY,ei=Ze,ii=Ze;let i=se.env.VSCODE_NLS_CONFIG;if(i)try{let e=JSON.parse(i);ei=e.userLocale,Qn=e.osLocale,ii=e.resolvedLanguage||Ze,Ts=e.languagePack?.translationsConfigFile}catch{}Jn=!0}else typeof navigator=="object"&&!bs?(ye=navigator.userAgent,Wi=ye.indexOf("Windows")>=0,ni=ye.indexOf("Macintosh")>=0,_s=(ye.indexOf("Macintosh")>=0||ye.indexOf("iPad")>=0||ye.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,ti=ye.indexOf("Linux")>=0,fs=ye?.indexOf("Mobi")>=0,er=!0,ii=globalThis._VSCODE_NLS_LANGUAGE||Ze,ei=navigator.language.toLowerCase(),Qn=ei):console.error("Unable to resolve platform.");var Hi=0;ni?Hi=1:Wi?Hi=3:ti&&(Hi=2);var ct=ni;var ri=Jn;var gs=er&&typeof Le.importScripts=="function",Ya=gs?Le.origin:void 0;var Te=ye,De=ii,vs;(n=>{function i(){return De}n.value=i;function e(){return De.length===2?De==="en":De.length>=3?De[0]==="e"&&De[1]==="n"&&De[2]==="-":!1}n.isDefaultVariant=e;function t(){return De==="en"}n.isDefault=t})(vs||={});var Es=typeof Le.postMessage=="function"&&!Le.importScripts,ir=(()=>{if(Es){let i=[];Le.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,s=i.length;n<s;n++){let o=i[n];if(o.id===t.data.vscodeScheduleAsyncWork){i.splice(n,1),o.callback();return}}});let e=0;return t=>{let n=++e;i.push({id:n,callback:t}),Le.postMessage({vscodeScheduleAsyncWork:n},"*")}}return i=>setTimeout(i)})();var xs=!!(Te&&Te.indexOf("Chrome")>=0),Qa=!!(Te&&Te.indexOf("Firefox")>=0),Ja=!!(!xs&&Te&&Te.indexOf("Safari")>=0),el=!!(Te&&Te.indexOf("Edg/")>=0),tl=!!(Te&&Te.indexOf("Android")>=0);var Me=typeof navigator=="object"?navigator:{},Is={clipboard:{writeText:ri||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(Me&&Me.clipboard&&Me.clipboard.writeText),readText:ri||!!(Me&&Me.clipboard&&Me.clipboard.readText)},keyboard:ri||Yn()?0:Me.keyboard||Bi?1:2,touch:"ontouchstart"in ie||Me.maxTouchPoints>0,pointerEvents:ie.PointerEvent&&("ontouchstart"in ie||navigator.maxTouchPoints>0)};var dt=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},ki=new dt,nr=new dt,rr=new dt,ys=new Array(230);var sr;(r=>{function i(a){return ki.keyCodeToStr(a)}r.toString=i;function e(a){return ki.strToKeyCode(a)}r.fromString=e;function t(a){return nr.keyCodeToStr(a)}r.toUserSettingsUS=t;function n(a){return rr.keyCodeToStr(a)}r.toUserSettingsGeneral=n;function s(a){return nr.strToKeyCode(a)||rr.strToKeyCode(a)}r.fromUserSettings=s;function o(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return ki.keyCodeToStr(a)}r.toElectronAccelerator=o})(sr||={});var fl=ct?256:2048,Tl=512,bl=1024,gl=ct?2048:256;var ar=Object.freeze(function(i,e){let t=setTimeout(i.bind(e),0);return{dispose(){clearTimeout(t)}}}),Os;(n=>{function i(s){return s===n.None||s===n.Cancelled||s instanceof Ui?!0:!s||typeof s!="object"?!1:typeof s.isCancellationRequested=="boolean"&&typeof s.onCancellationRequested=="function"}n.isCancellationToken=i,n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:te.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ar})})(Os||={});var Ui=class{constructor(){this._isCancelled=!1;this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?ar:(this._emitter||(this._emitter=new w),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var As=Symbol("MicrotaskDelay");var Rs,oi;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?oi=(i,e)=>{ir(()=>{if(t)return;let n=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let t=!1;return{dispose(){t||(t=!0)}}}:oi=(i,e,t)=>{let n=i.requestIdleCallback(e,typeof t=="number"?{timeout:t}:void 0),s=!1;return{dispose(){s||(s=!0,i.cancelIdleCallback(n))}}},Rs=i=>oi(globalThis,i)})();var ws;(t=>{async function i(n){let s,o=await Promise.all(n.map(r=>r.then(a=>a,a=>{s||(s=a)})));if(typeof s<"u")throw s;return o}t.settled=i;function e(n){return new Promise(async(s,o)=>{try{await n(s,o)}catch(r){o(r)}})}t.withAsyncBody=e})(ws||={});var Q=class Q{static fromArray(e){return new Q(t=>{t.emitMany(e)})}static fromPromise(e){return new Q(async t=>{t.emitMany(await e)})}static fromPromises(e){return new Q(async t=>{await Promise.all(e.map(async n=>t.emitOne(await n)))})}static merge(e){return new Q(async t=>{await Promise.all(e.map(async n=>{for await(let s of n)t.emitOne(s)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new w,queueMicrotask(async()=>{let n={emitOne:s=>this.emitOne(s),emitMany:s=>this.emitMany(s),reject:s=>this.reject(s)};try{await Promise.resolve(e(n)),this.resolve()}catch(s){this.reject(s)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await te.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,t){return new Q(async n=>{for await(let s of e)n.emitOne(t(s))})}map(e){return Q.map(this,e)}static filter(e,t){return new Q(async n=>{for await(let s of e)t(s)&&n.emitOne(s)})}filter(e){return Q.filter(this,e)}static coalesce(e){return Q.filter(e,t=>!!t)}coalesce(){return Q.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return Q.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};Q.EMPTY=Q.fromArray([]);var lr=Q;function ur(i){return 55296<=i&&i<=56319}function Ci(i){return 56320<=i&&i<=57343}function cr(i,e){return(i-55296<<10)+(e-56320)+65536}function pr(i){return Ki(i,0)}function Ki(i,e){switch(typeof i){case"object":return i===null?Oe(349,e):Array.isArray(i)?Fs(i,e):Ss(i,e);case"string":return _r(i,e);case"boolean":return Ms(i,e);case"number":return Oe(i,e);case"undefined":return Oe(937,e);default:return Oe(617,e)}}function Oe(i,e){return(e<<5)-e+i|0}function Ms(i,e){return Oe(i?433:863,e)}function _r(i,e){e=Oe(149417,e);for(let t=0,n=i.length;t<n;t++)e=Oe(i.charCodeAt(t),e);return e}function Fs(i,e){return e=Oe(104579,e),i.reduce((t,n)=>Ki(n,t),e)}function Ss(i,e){return e=Oe(181387,e),Object.keys(i).sort().reduce((t,n)=>(t=_r(n,t),Ki(i[n],t)),e)}function Gi(i,e,t=32){let n=t-e,s=~((1<<n)-1);return(i<<e|(s&i)>>>n)>>>0}function dr(i,e=0,t=i.byteLength,n=0){for(let s=0;s<t;s++)i[e+s]=n}function Ps(i,e,t="0"){for(;i.length<e;)i=t+i;return i}function ht(i,e=32){return i instanceof ArrayBuffer?Array.from(new Uint8Array(i)).map(t=>t.toString(16).padStart(2,"0")).join(""):Ps((i>>>0).toString(16),e/4)}var ai=class ai{constructor(){this._h0=1732584193;this._h1=4023233417;this._h2=2562383102;this._h3=271733878;this._h4=3285377520;this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let t=e.length;if(t===0)return;let n=this._buff,s=this._buffLen,o=this._leftoverHighSurrogate,r,a;for(o!==0?(r=o,a=-1,o=0):(r=e.charCodeAt(0),a=0);;){let l=r;if(ur(r))if(a+1<t){let u=e.charCodeAt(a+1);Ci(u)?(a++,l=cr(r,u)):l=65533}else{o=r;break}else Ci(r)&&(l=65533);if(s=this._push(n,s,l),a++,a<t)r=e.charCodeAt(a);else break}this._buffLen=s,this._leftoverHighSurrogate=o}_push(e,t,n){return n<128?e[t++]=n:n<2048?(e[t++]=192|(n&1984)>>>6,e[t++]=128|(n&63)>>>0):n<65536?(e[t++]=224|(n&61440)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0):(e[t++]=240|(n&1835008)>>>18,e[t++]=128|(n&258048)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),ht(this._h0)+ht(this._h1)+ht(this._h2)+ht(this._h3)+ht(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,dr(this._buff,this._buffLen),this._buffLen>56&&(this._step(),dr(this._buff));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let e=ai._bigBlock32,t=this._buffDV;for(let d=0;d<64;d+=4)e.setUint32(d,t.getUint32(d,!1),!1);for(let d=64;d<320;d+=4)e.setUint32(d,Gi(e.getUint32(d-12,!1)^e.getUint32(d-32,!1)^e.getUint32(d-56,!1)^e.getUint32(d-64,!1),1),!1);let n=this._h0,s=this._h1,o=this._h2,r=this._h3,a=this._h4,l,u,c;for(let d=0;d<80;d++)d<20?(l=s&o|~s&r,u=1518500249):d<40?(l=s^o^r,u=1859775393):d<60?(l=s&o|s&r|o&r,u=2400959708):(l=s^o^r,u=3395469782),c=Gi(n,5)+l+a+u+e.getUint32(d*4,!1)&4294967295,a=r,r=o,o=Gi(s,30),s=n,n=c;this._h0=this._h0+n&4294967295,this._h1=this._h1+s&4294967295,this._h2=this._h2+o&4294967295,this._h3=this._h3+r&4294967295,this._h4=this._h4+a&4294967295}};ai._bigBlock32=new DataView(new ArrayBuffer(320));var hr=ai;var{registerWindow:Eu,getWindow:Ns,getDocument:xu,getWindows:Iu,getWindowsCount:yu,getWindowId:mr,getWindowById:Lu,hasWindow:Ou,onDidRegisterWindow:Au,onWillUnregisterWindow:Ru,onDidUnregisterWindow:wu}=function(){let i=new Map;ie;let e={window:ie,disposables:new me};i.set(ie.vscodeWindowId,e);let t=new w,n=new w,s=new w;function o(r,a){return(typeof r=="number"?i.get(r):void 0)??(a?e:void 0)}return{onDidRegisterWindow:t.event,onWillUnregisterWindow:s.event,onDidUnregisterWindow:n.event,registerWindow(r){if(i.has(r.vscodeWindowId))return H.None;let a=new me,l={window:r,disposables:a.add(new me)};return i.set(r.vscodeWindowId,l),a.add(S(()=>{i.delete(r.vscodeWindowId),n.fire(r)})),a.add(li(r,Hs.BEFORE_UNLOAD,()=>{s.fire(r)})),t.fire(l),a},getWindows(){return i.values()},getWindowsCount(){return i.size},getWindowId(r){return r.vscodeWindowId},hasWindow(r){return i.has(r)},getWindowById:o,getWindow(r){let a=r;if(a?.ownerDocument?.defaultView)return a.ownerDocument.defaultView.window;let l=r;return l?.view?l.view.window:ie},getDocument(r){return Ns(r).document}}}();var $i=class{constructor(e,t,n,s){this._node=e,this._type=t,this._handler=n,this._options=s||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function li(i,e,t,n){return new $i(i,e,t,n)}var Bs,fr;var pt=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Be(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let i=new Map,e=new Map,t=new Map,n=new Map,s=o=>{t.set(o,!1);let r=i.get(o)??[];for(e.set(o,r),i.set(o,[]),n.set(o,!0);r.length>0;)r.sort(pt.sort),r.shift().execute();n.set(o,!1)};fr=(o,r,a=0)=>{let l=mr(o),u=new pt(r,a),c=i.get(l);return c||(c=[],i.set(l,c)),c.push(u),t.get(l)||(t.set(l,!0),o.requestAnimationFrame(()=>s(l))),u},Bs=(o,r,a)=>{let l=mr(o);if(n.get(l)){let u=new pt(r,a),c=e.get(l);return c||(c=[],e.set(l,c)),c.push(u),u}else return fr(o,r,a)}})();var Ne=class Ne{constructor(e,t){this.width=e;this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new Ne(e,t):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof Ne?e:new Ne(e.width,e.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}};Ne.None=new Ne(0,0);var Tr=Ne;var Du=new class{constructor(){this.mutationObservers=new Map}observe(i,e,t){let n=this.mutationObservers.get(i);n||(n=new Map,this.mutationObservers.set(i,n));let s=pr(t),o=n.get(s);if(o)o.users+=1;else{let r=new w,a=new MutationObserver(u=>r.fire(u));a.observe(i,t);let l=o={users:1,observer:a,onDidMutate:r.event};e.add(S(()=>{l.users-=1,l.users===0&&(r.dispose(),a.disconnect(),n?.delete(s),n?.size===0&&this.mutationObservers.delete(i))})),n.set(s,o)}return o.onDidMutate}};var Hs={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:ut?"webkitAnimationStart":"animationstart",ANIMATION_END:ut?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:ut?"webkitAnimationIteration":"animationiteration"};var Ws=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function br(i,e,t,...n){let s=Ws.exec(e);if(!s)throw new Error("Bad use of emmet");let o=s[1]||"div",r;return i!=="http://www.w3.org/1999/xhtml"?r=document.createElementNS(i,o):r=document.createElement(o),s[3]&&(r.id=s[3]),s[4]&&(r.className=s[4].replace(/\./g," ").trim()),t&&Object.entries(t).forEach(([a,l])=>{typeof l>"u"||(/^on\w+$/.test(a)?r[a]=l:a==="selected"?l&&r.setAttribute(a,"true"):r.setAttribute(a,l))}),r.append(...n),r}function ks(i,e,...t){return br("http://www.w3.org/1999/xhtml",i,e,...t)}ks.SVG=function(i,e,...t){return br("http://www.w3.org/2000/svg",i,e,...t)};var ui=class extends H{constructor(t,n,s,o,r,a,l,u,c){super();this._terminal=t;this._characterJoinerService=n;this._charSizeService=s;this._coreBrowserService=o;this._coreService=r;this._decorationService=a;this._optionsService=l;this._themeService=u;this._cursorBlinkStateManager=new be;this._charAtlasDisposable=this._register(new be);this._observerDisposable=this._register(new be);this._model=new $t;this._workCell=new at;this._workCell2=new at;this._rectangleRenderer=this._register(new be);this._glyphRenderer=this._register(new be);this._onChangeTextureAtlas=this._register(new w);this.onChangeTextureAtlas=this._onChangeTextureAtlas.event;this._onAddTextureAtlasCanvas=this._register(new w);this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;this._onRemoveTextureAtlasCanvas=this._register(new w);this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event;this._onRequestRedraw=this._register(new w);this.onRequestRedraw=this._onRequestRedraw.event;this._onContextLoss=this._register(new w);this.onContextLoss=this._onContextLoss.event;this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");let d={antialias:!1,depth:!1,preserveDrawingBuffer:c};if(this._gl=this._canvas.getContext("webgl2",d),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new Dt(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new Xt(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,l,this._themeService)],this.dimensions=fn(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(l.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(li(this._canvas,"webglcontextlost",h=>{console.log("webglcontextlost event received"),h.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(h)},3e3)})),this._register(li(this._canvas,"webglcontextrestored",h=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,Di(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=Mi(this._canvas,this._coreBrowserService.window,(h,p)=>this._setCanvasDevicePixelDimensions(h,p)),this._register(this._coreBrowserService.onWindowChange(h=>{this._observerDisposable.value=Mi(this._canvas,h,(p,L)=>this._setCanvasDevicePixelDimensions(p,L))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(S(()=>{for(let h of this._renderLayers)h.dispose();this._canvas.parentElement?.removeChild(this._canvas),Di(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(t,n){this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(let s of this._renderLayers)s.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let t of this._renderLayers)t.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let t of this._renderLayers)t.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(t,n,s){for(let o of this._renderLayers)o.handleSelectionChanged(this._terminal,t,n,s);this._model.selection.update(this._core,t,n,s),this._requestRedrawViewport()}handleCursorMove(){for(let t of this._renderLayers)t.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new qt(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new Kt(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let t=Ht(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize);this._charAtlas!==t&&(this._onChangeTextureAtlas.fire(t.pages[0].canvas),this._charAtlasDisposable.value=yt(te.forward(t.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),te.forward(t.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=t,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(t){this._model.clear(),t&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(let t of this._renderLayers)t.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(t,n){if(!this._isAttached)if(this._core.screenElement?.isConnected&&this._charSizeService.width&&this._charSizeService.height)this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;else return;for(let s of this._renderLayers)s.handleGridChanged(this._terminal,t,n);!this._glyphRenderer.value||!this._rectangleRenderer.value||(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(t,n),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new kt(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(t,n){let s=this._core,o=this._workCell,r,a,l,u,c,d,h=0,p=!0,L,O,D,j,F,C,x,y,A;t=gr(t,s.rows-1,0),n=gr(n,s.rows-1,0);let G=this._coreService.decPrivateModes.cursorStyle??s.options.cursorStyle??"block",ce=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,Fe=ce-s.buffer.ydisp,de=Math.min(this._terminal.buffer.active.cursorX,s.cols-1),Ae=-1,M=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let oe=!1;for(a=t;a<=n;a++)for(l=a+s.buffer.ydisp,u=s.buffer.lines.get(l),this._model.lineLengths[a]=0,D=ce===l,h=0,c=this._characterJoinerService.getJoinedCharacters(l),y=0;y<s.cols;y++){if(r=this._cellColorResolver.result.bg,u.loadCell(y,o),y===0&&(r=this._cellColorResolver.result.bg),d=!1,p=y>=h,L=y,c.length>0&&y===c[0][0]&&p){O=c.shift();let b=this._model.selection.isCellSelected(this._terminal,O[0],l);for(x=O[0]+1;x<O[1];x++)p&&=b===this._model.selection.isCellSelected(this._terminal,x,l);p&&=!D||de<O[0]||de>=O[1],p?(d=!0,o=new Vi(o,u.translateToString(!0,O[0],O[1]),O[1]-O[0]),L=O[1]-1):h=O[1]}if(j=o.getChars(),F=o.getCode(),x=(a*s.cols+y)*ze,this._cellColorResolver.resolve(o,y,l,this.dimensions.device.cell.width),M&&l===ce&&(y===de&&(this._model.cursor={x:de,y:Fe,width:o.getWidth(),style:this._coreBrowserService.isFocused?G:s.options.cursorInactiveStyle,cursorWidth:s.options.cursorWidth,dpr:this._devicePixelRatio},Ae=de+o.getWidth()-1),y>=de&&y<=Ae&&(this._coreBrowserService.isFocused&&G==="block"||this._coreBrowserService.isFocused===!1&&s.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),F!==0&&(this._model.lineLengths[a]=y+1),!(this._model.cells[x]===F&&this._model.cells[x+qe]===this._cellColorResolver.result.bg&&this._model.cells[x+je]===this._cellColorResolver.result.fg&&this._model.cells[x+Vt]===this._cellColorResolver.result.ext)&&(oe=!0,j.length>1&&(F|=Gn),this._model.cells[x]=F,this._model.cells[x+qe]=this._cellColorResolver.result.bg,this._model.cells[x+je]=this._cellColorResolver.result.fg,this._model.cells[x+Vt]=this._cellColorResolver.result.ext,C=o.getWidth(),this._glyphRenderer.value.updateCell(y,a,F,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,j,C,r),d)){for(o=this._workCell,y++;y<=L;y++)A=(a*s.cols+y)*ze,this._glyphRenderer.value.updateCell(y,a,0,0,0,0,pn,0,0),this._model.cells[A]=0,this._model.cells[A+qe]=this._cellColorResolver.result.bg,this._model.cells[A+je]=this._cellColorResolver.result.fg,this._model.cells[A+Vt]=this._cellColorResolver.result.ext;y--}}oe&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){!this._charSizeService.width||!this._charSizeService.height||(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(t,n){this._canvas.width===t&&this._canvas.height===n||(this._canvas.width=t,this._canvas.height=n,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let t=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:t,end:t})}},Vi=class extends pe{constructor(t,n,s){super();this.content=0;this.combinedData="";this.fg=t.fg,this.bg=t.bg,this.combinedData=n,this._width=s}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(t){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function gr(i,e,t=0){return Math.max(Math.min(i,e),t)}var vr="di$target",Er="di$dependencies",zi=new Map;function _e(i){if(zi.has(i))return zi.get(i);let e=function(t,n,s){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Us(e,t,s)};return e._id=i,zi.set(i,e),e}function Us(i,e,t){e[vr]===e?e[Er].push({id:i,index:t}):(e[Er]=[{id:i,index:t}],e[vr]=e)}var Yu=_e("BufferService"),Qu=_e("CoreMouseService"),Ju=_e("CoreService"),ec=_e("CharsetService"),tc=_e("InstantiationService");var ic=_e("LogService"),xr=_e("OptionsService"),nc=_e("OscLinkService"),rc=_e("UnicodeService"),sc=_e("DecorationService");var Cs={trace:0,debug:1,info:2,warn:3,error:4,off:5},Gs="xterm.js: ",ci=class extends H{constructor(t){super();this._optionsService=t;this._logLevel=5;this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),Ir=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=Cs[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(t){for(let n=0;n<t.length;n++)typeof t[n]=="function"&&(t[n]=t[n]())}_log(t,n,s){this._evalLazyOptionalParams(s),t.call(console,(this._optionsService.options.logger?"":Gs)+n,...s)}trace(t,...n){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,t,n)}debug(t,...n){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,t,n)}info(t,...n){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,t,n)}warn(t,...n){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,t,n)}error(t,...n){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,t,n)}};ci=Zi([Yi(0,xr)],ci);var Ir;function yr(i){Ir=i}var Lr=class extends H{constructor(t){if(bi&&hn()<16){let n={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",n))throw new Error("Webgl2 is only supported on Safari 16 and above")}super();this._preserveDrawingBuffer=t;this._onChangeTextureAtlas=this._register(new w);this.onChangeTextureAtlas=this._onChangeTextureAtlas.event;this._onAddTextureAtlasCanvas=this._register(new w);this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;this._onRemoveTextureAtlasCanvas=this._register(new w);this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event;this._onContextLoss=this._register(new w);this.onContextLoss=this._onContextLoss.event}activate(t){let n=t._core;if(!t.element){this._register(n.onWillOpen(()=>this.activate(t)));return}this._terminal=t;let s=n.coreService,o=n.optionsService,r=n,a=r._renderService,l=r._characterJoinerService,u=r._charSizeService,c=r._coreBrowserService,d=r._decorationService,h=r._logService,p=r._themeService;yr(h),this._renderer=this._register(new ui(t,l,u,c,s,d,o,p,this._preserveDrawingBuffer)),this._register(te.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(te.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(te.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(te.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),a.setRenderer(this._renderer),this._register(S(()=>{if(this._terminal._core._store._isDisposed)return;let L=this._terminal._core._renderService;L.setRenderer(this._terminal._core._createRenderer()),L.handleResize(t.cols,t.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}};export{Lr as WebglAddon};
|
|
100
|
+
}`,Ae=8,Bi=Ae*Float32Array.BYTES_PER_ELEMENT,ps=20*Ae,Zt=class{constructor(){this.attributes=new Float32Array(ps),this.count=0}},xe=0,Vn=0,Kn=0,zn=0,Zn=0,qn=0,jn=0,qt=class extends k{constructor(t,n,r,o){super();this._terminal=t;this._gl=n;this._dimensions=r;this._themeService=o;this._vertices=new Zt;this._verticesCursor=new Zt;let s=this._gl;this._program=N($t(s,ds,hs)),this._register(P(()=>s.deleteProgram(this._program))),this._projectionLocation=N(s.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=s.createVertexArray(),s.bindVertexArray(this._vertexArrayObject);let a=new Float32Array([0,0,1,0,0,1,1,1]),l=s.createBuffer();this._register(P(()=>s.deleteBuffer(l))),s.bindBuffer(s.ARRAY_BUFFER,l),s.bufferData(s.ARRAY_BUFFER,a,s.STATIC_DRAW),s.enableVertexAttribArray(3),s.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let u=new Uint8Array([0,1,2,3]),c=s.createBuffer();this._register(P(()=>s.deleteBuffer(c))),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,c),s.bufferData(s.ELEMENT_ARRAY_BUFFER,u,s.STATIC_DRAW),this._attributesBuffer=N(s.createBuffer()),this._register(P(()=>s.deleteBuffer(this._attributesBuffer))),s.bindBuffer(s.ARRAY_BUFFER,this._attributesBuffer),s.enableVertexAttribArray(0),s.vertexAttribPointer(0,2,s.FLOAT,!1,Bi,0),s.vertexAttribDivisor(0,1),s.enableVertexAttribArray(1),s.vertexAttribPointer(1,2,s.FLOAT,!1,Bi,2*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(1,1),s.enableVertexAttribArray(2),s.vertexAttribPointer(2,4,s.FLOAT,!1,Bi,4*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(2,1),this._updateCachedColors(o.colors),this._register(this._themeService.onChangeColors(d=>{this._updateCachedColors(d),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(t){let n=this._gl;n.useProgram(this._program),n.bindVertexArray(this._vertexArrayObject),n.uniformMatrix4fv(this._projectionLocation,!1,Gt),n.bindBuffer(n.ARRAY_BUFFER,this._attributesBuffer),n.bufferData(n.ARRAY_BUFFER,t.attributes,n.DYNAMIC_DRAW),n.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,n.UNSIGNED_BYTE,0,t.count)}handleResize(){this._updateViewportRectangle()}setDimensions(t){this._dimensions=t}_updateCachedColors(t){this._bgFloat=this._colorToFloat32Array(t.background),this._cursorFloat=this._colorToFloat32Array(t.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(t){let n=this._terminal,r=this._vertices,o=1,s,a,l,u,c,d,h,p,m,_,A;for(s=0;s<n.rows;s++){for(l=-1,u=0,c=0,d=!1,a=0;a<n.cols;a++)h=(s*n.cols+a)*Ze,p=t.cells[h+qe],m=t.cells[h+je],_=!!(m&67108864),(p!==u||m!==c&&(d||_))&&((u!==0||d&&c!==0)&&(A=o++*Ae,this._updateRectangle(r,A,c,u,l,a,s)),l=a,u=p,c=m,d=_);(u!==0||d&&c!==0)&&(A=o++*Ae,this._updateRectangle(r,A,c,u,l,n.cols,s))}r.count=o}updateCursor(t){let n=this._verticesCursor,r=t.cursor;if(!r||r.style==="block"){n.count=0;return}let o,s=0;(r.style==="bar"||r.style==="outline")&&(o=s++*Ae,this._addRectangleFloat(n.attributes,o,r.x*this._dimensions.device.cell.width,r.y*this._dimensions.device.cell.height,r.style==="bar"?r.dpr*r.cursorWidth:r.dpr,this._dimensions.device.cell.height,this._cursorFloat)),(r.style==="underline"||r.style==="outline")&&(o=s++*Ae,this._addRectangleFloat(n.attributes,o,r.x*this._dimensions.device.cell.width,(r.y+1)*this._dimensions.device.cell.height-r.dpr,r.width*this._dimensions.device.cell.width,r.dpr,this._cursorFloat)),r.style==="outline"&&(o=s++*Ae,this._addRectangleFloat(n.attributes,o,r.x*this._dimensions.device.cell.width,r.y*this._dimensions.device.cell.height,r.width*this._dimensions.device.cell.width,r.dpr,this._cursorFloat),o=s++*Ae,this._addRectangleFloat(n.attributes,o,(r.x+r.width)*this._dimensions.device.cell.width-r.dpr,r.y*this._dimensions.device.cell.height,r.dpr,this._dimensions.device.cell.height,this._cursorFloat)),n.count=s}_updateRectangle(t,n,r,o,s,a,l){if(r&67108864)switch(r&50331648){case 16777216:case 33554432:xe=this._themeService.colors.ansi[r&255].rgba;break;case 50331648:xe=(r&16777215)<<8;break;case 0:default:xe=this._themeService.colors.foreground.rgba}else switch(o&50331648){case 16777216:case 33554432:xe=this._themeService.colors.ansi[o&255].rgba;break;case 50331648:xe=(o&16777215)<<8;break;case 0:default:xe=this._themeService.colors.background.rgba}t.attributes.length<n+4&&(t.attributes=Un(t.attributes,this._terminal.rows*this._terminal.cols*Ae)),Vn=s*this._dimensions.device.cell.width,Kn=l*this._dimensions.device.cell.height,zn=(xe>>24&255)/255,Zn=(xe>>16&255)/255,qn=(xe>>8&255)/255,jn=1,this._addRectangle(t.attributes,n,Vn,Kn,(a-s)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,zn,Zn,qn,jn)}_addRectangle(t,n,r,o,s,a,l,u,c,d){t[n]=r/this._dimensions.device.canvas.width,t[n+1]=o/this._dimensions.device.canvas.height,t[n+2]=s/this._dimensions.device.canvas.width,t[n+3]=a/this._dimensions.device.canvas.height,t[n+4]=l,t[n+5]=u,t[n+6]=c,t[n+7]=d}_addRectangleFloat(t,n,r,o,s,a,l){t[n]=r/this._dimensions.device.canvas.width,t[n+1]=o/this._dimensions.device.canvas.height,t[n+2]=s/this._dimensions.device.canvas.width,t[n+3]=a/this._dimensions.device.canvas.height,t[n+4]=l[0],t[n+5]=l[1],t[n+6]=l[2],t[n+7]=l[3]}_colorToFloat32Array(t){return new Float32Array([(t.rgba>>24&255)/255,(t.rgba>>16&255)/255,(t.rgba>>8&255)/255,(t.rgba&255)/255])}};var jt=class extends k{constructor(t,n,r,o,s,a,l,u){super();this._container=n;this._alpha=s;this._coreBrowserService=a;this._optionsService=l;this._themeService=u;this._deviceCharWidth=0;this._deviceCharHeight=0;this._deviceCellWidth=0;this._deviceCellHeight=0;this._deviceCharLeft=0;this._deviceCharTop=0;this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${r}-layer`),this._canvas.style.zIndex=o.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(c=>{this._refreshCharAtlas(t,c),this.reset(t)})),this._register(P(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=N(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(t){}handleFocus(t){}handleCursorMove(t){}handleGridChanged(t,n,r){}handleSelectionChanged(t,n,r,o=!1){}_setTransparency(t,n){if(n===this._alpha)return;let r=this._canvas;this._alpha=n,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,r),this._refreshCharAtlas(t,this._themeService.colors),this.handleGridChanged(t,0,t.rows-1)}_refreshCharAtlas(t,n){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=Wt(t,this._optionsService.rawOptions,n,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(t,n){this._deviceCellWidth=n.device.cell.width,this._deviceCellHeight=n.device.cell.height,this._deviceCharWidth=n.device.char.width,this._deviceCharHeight=n.device.char.height,this._deviceCharLeft=n.device.char.left,this._deviceCharTop=n.device.char.top,this._canvas.width=n.device.canvas.width,this._canvas.height=n.device.canvas.height,this._canvas.style.width=`${n.css.canvas.width}px`,this._canvas.style.height=`${n.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(t,this._themeService.colors)}_fillBottomLineAtCells(t,n,r=1){this._ctx.fillRect(t*this._deviceCellWidth,(n+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,r*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(t,n,r,o){this._alpha?this._ctx.clearRect(t*this._deviceCellWidth,n*this._deviceCellHeight,r*this._deviceCellWidth,o*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(t*this._deviceCellWidth,n*this._deviceCellHeight,r*this._deviceCellWidth,o*this._deviceCellHeight))}_fillCharTrueColor(t,n,r,o){this._ctx.font=this._getFont(t,!1,!1),this._ctx.textBaseline=Dt,this._clipCell(r,o,n.getWidth()),this._ctx.fillText(n.getChars(),r*this._deviceCellWidth+this._deviceCharLeft,o*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(t,n,r){this._ctx.beginPath(),this._ctx.rect(t*this._deviceCellWidth,n*this._deviceCellHeight,r*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(t,n,r){let o=n?t.options.fontWeightBold:t.options.fontWeight;return`${r?"italic":""} ${o} ${t.options.fontSize*this._coreBrowserService.dpr}px ${t.options.fontFamily}`}};var Yt=class extends jt{constructor(e,t,n,r,o,s,a){super(n,e,"link",t,!0,o,s,a),this._register(r.onShowLinkUnderline(l=>this._handleShowLinkUnderline(l))),this._register(r.onHideLinkUnderline(l=>this._handleHideLinkUnderline(l)))}resize(e,t){super.resize(e,t),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){if(e.fg===257?this._ctx.fillStyle=this._themeService.colors.background.css:e.fg!==void 0&&Wn(e.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}};var re=typeof window=="object"?window:globalThis;var Jt=class Jt{constructor(){this.mapWindowIdToZoomLevel=new Map;this._onDidChangeZoomLevel=new D;this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event;this.mapWindowIdToZoomFactor=new Map;this._onDidChangeFullscreen=new D;this.onDidChangeFullscreen=this._onDidChangeFullscreen.event;this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(n,e),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToFullScreen.set(n,e),this._onDidChangeFullscreen.fire(n)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};Jt.INSTANCE=new Jt;var Qt=Jt;function Ts(i,e,t){typeof e=="string"&&(e=i.matchMedia(e)),e.addEventListener("change",t)}var Xa=Qt.INSTANCE.onDidChangeZoomLevel;var Qa=Qt.INSTANCE.onDidChangeFullscreen,Ye=typeof navigator=="object"?navigator.userAgent:"",Yn=Ye.indexOf("Firefox")>=0,ct=Ye.indexOf("AppleWebKit")>=0,Xn=Ye.indexOf("Chrome")>=0,Wi=!Xn&&Ye.indexOf("Safari")>=0;var Ja=Ye.indexOf("Electron/")>=0,el=Ye.indexOf("Android")>=0,Xt=!1;if(typeof re.matchMedia=="function"){let i=re.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=re.matchMedia("(display-mode: fullscreen)");Xt=i.matches,Ts(re,i,({matches:t})=>{Xt&&e.matches||(Xt=t)})}function Qn(){return Xt}var Xe="en",Ci=!1,ri=!1,ii=!1,ms=!1,er=!1,tr=!1,fs=!1,bs=!1,gs=!1,vs=!1,ti,ni=Xe,Jn=Xe,Es,Oe,Re=globalThis,le;typeof Re.vscode<"u"&&typeof Re.vscode.process<"u"?le=Re.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(le=process);var ir=typeof le?.versions?.electron=="string",Ls=ir&&le?.type==="renderer";if(typeof le=="object"){Ci=le.platform==="win32",ri=le.platform==="darwin",ii=le.platform==="linux",ms=ii&&!!le.env.SNAP&&!!le.env.SNAP_REVISION,fs=ir,gs=!!le.env.CI||!!le.env.BUILD_ARTIFACTSTAGINGDIRECTORY,ti=Xe,ni=Xe;let i=le.env.VSCODE_NLS_CONFIG;if(i)try{let e=JSON.parse(i);ti=e.userLocale,Jn=e.osLocale,ni=e.resolvedLanguage||Xe,Es=e.languagePack?.translationsConfigFile}catch{}er=!0}else typeof navigator=="object"&&!Ls?(Oe=navigator.userAgent,Ci=Oe.indexOf("Windows")>=0,ri=Oe.indexOf("Macintosh")>=0,bs=(Oe.indexOf("Macintosh")>=0||Oe.indexOf("iPad")>=0||Oe.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,ii=Oe.indexOf("Linux")>=0,vs=Oe?.indexOf("Mobi")>=0,tr=!0,ni=globalThis._VSCODE_NLS_LANGUAGE||Xe,ti=navigator.language.toLowerCase(),Jn=ti):console.error("Unable to resolve platform.");var ki=0;ri?ki=1:Ci?ki=3:ii&&(ki=2);var dt=ri;var si=er;var Is=tr&&typeof Re.importScripts=="function",tl=Is?Re.origin:void 0;var ge=Oe,De=ni,ys;(n=>{function i(){return De}n.value=i;function e(){return De.length===2?De==="en":De.length>=3?De[0]==="e"&&De[1]==="n"&&De[2]==="-":!1}n.isDefaultVariant=e;function t(){return De==="en"}n.isDefault=t})(ys||={});var xs=typeof Re.postMessage=="function"&&!Re.importScripts,nr=(()=>{if(xs){let i=[];Re.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=i.length;n<r;n++){let o=i[n];if(o.id===t.data.vscodeScheduleAsyncWork){i.splice(n,1),o.callback();return}}});let e=0;return t=>{let n=++e;i.push({id:n,callback:t}),Re.postMessage({vscodeScheduleAsyncWork:n},"*")}}return i=>setTimeout(i)})();var As=!!(ge&&ge.indexOf("Chrome")>=0),il=!!(ge&&ge.indexOf("Firefox")>=0),nl=!!(!As&&ge&&ge.indexOf("Safari")>=0),rl=!!(ge&&ge.indexOf("Edg/")>=0),sl=!!(ge&&ge.indexOf("Android")>=0);var Se=typeof navigator=="object"?navigator:{},Os={clipboard:{writeText:si||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(Se&&Se.clipboard&&Se.clipboard.writeText),readText:si||!!(Se&&Se.clipboard&&Se.clipboard.readText)},keyboard:si||Qn()?0:Se.keyboard||Wi?1:2,touch:"ontouchstart"in re||Se.maxTouchPoints>0,pointerEvents:re.PointerEvent&&("ontouchstart"in re||navigator.maxTouchPoints>0)};var ht=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},Ui=new ht,rr=new ht,sr=new ht,Rs=new Array(230);var or;(s=>{function i(a){return Ui.keyCodeToStr(a)}s.toString=i;function e(a){return Ui.strToKeyCode(a)}s.fromString=e;function t(a){return rr.keyCodeToStr(a)}s.toUserSettingsUS=t;function n(a){return sr.keyCodeToStr(a)}s.toUserSettingsGeneral=n;function r(a){return rr.strToKeyCode(a)||sr.strToKeyCode(a)}s.fromUserSettings=r;function o(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Ui.keyCodeToStr(a)}s.toElectronAccelerator=o})(or||={});var vl=dt?256:2048,El=512,Ll=1024,Il=dt?2048:256;var lr=Object.freeze(function(i,e){let t=setTimeout(i.bind(e),0);return{dispose(){clearTimeout(t)}}}),Fs;(n=>{function i(r){return r===n.None||r===n.Cancelled||r instanceof Gi?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}n.isCancellationToken=i,n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ne.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:lr})})(Fs||={});var Gi=class{constructor(){this._isCancelled=!1;this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?lr:(this._emitter||(this._emitter=new D),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var ws=Symbol("MicrotaskDelay");var Ds,ai;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?ai=(i,e)=>{nr(()=>{if(t)return;let n=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let t=!1;return{dispose(){t||(t=!0)}}}:ai=(i,e,t)=>{let n=i.requestIdleCallback(e,typeof t=="number"?{timeout:t}:void 0),r=!1;return{dispose(){r||(r=!0,i.cancelIdleCallback(n))}}},Ds=i=>ai(globalThis,i)})();var Ss;(t=>{async function i(n){let r,o=await Promise.all(n.map(s=>s.then(a=>a,a=>{r||(r=a)})));if(typeof r<"u")throw r;return o}t.settled=i;function e(n){return new Promise(async(r,o)=>{try{await n(r,o)}catch(s){o(s)}})}t.withAsyncBody=e})(Ss||={});var J=class J{static fromArray(e){return new J(t=>{t.emitMany(e)})}static fromPromise(e){return new J(async t=>{t.emitMany(await e)})}static fromPromises(e){return new J(async t=>{await Promise.all(e.map(async n=>t.emitOne(await n)))})}static merge(e){return new J(async t=>{await Promise.all(e.map(async n=>{for await(let r of n)t.emitOne(r)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new D,queueMicrotask(async()=>{let n={emitOne:r=>this.emitOne(r),emitMany:r=>this.emitMany(r),reject:r=>this.reject(r)};try{await Promise.resolve(e(n)),this.resolve()}catch(r){this.reject(r)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await ne.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,t){return new J(async n=>{for await(let r of e)n.emitOne(t(r))})}map(e){return J.map(this,e)}static filter(e,t){return new J(async n=>{for await(let r of e)t(r)&&n.emitOne(r)})}filter(e){return J.filter(this,e)}static coalesce(e){return J.filter(e,t=>!!t)}coalesce(){return J.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return J.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};J.EMPTY=J.fromArray([]);var ur=J;function cr(i){return 55296<=i&&i<=56319}function $i(i){return 56320<=i&&i<=57343}function dr(i,e){return(i-55296<<10)+(e-56320)+65536}function _r(i){return Ki(i,0)}function Ki(i,e){switch(typeof i){case"object":return i===null?Me(349,e):Array.isArray(i)?Hs(i,e):Bs(i,e);case"string":return Tr(i,e);case"boolean":return Ns(i,e);case"number":return Me(i,e);case"undefined":return Me(937,e);default:return Me(617,e)}}function Me(i,e){return(e<<5)-e+i|0}function Ns(i,e){return Me(i?433:863,e)}function Tr(i,e){e=Me(149417,e);for(let t=0,n=i.length;t<n;t++)e=Me(i.charCodeAt(t),e);return e}function Hs(i,e){return e=Me(104579,e),i.reduce((t,n)=>Ki(n,t),e)}function Bs(i,e){return e=Me(181387,e),Object.keys(i).sort().reduce((t,n)=>(t=Tr(n,t),Ki(i[n],t)),e)}function Vi(i,e,t=32){let n=t-e,r=~((1<<n)-1);return(i<<e|(r&i)>>>n)>>>0}function hr(i,e=0,t=i.byteLength,n=0){for(let r=0;r<t;r++)i[e+r]=n}function Ws(i,e,t="0"){for(;i.length<e;)i=t+i;return i}function pt(i,e=32){return i instanceof ArrayBuffer?Array.from(new Uint8Array(i)).map(t=>t.toString(16).padStart(2,"0")).join(""):Ws((i>>>0).toString(16),e/4)}var li=class li{constructor(){this._h0=1732584193;this._h1=4023233417;this._h2=2562383102;this._h3=271733878;this._h4=3285377520;this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){let t=e.length;if(t===0)return;let n=this._buff,r=this._buffLen,o=this._leftoverHighSurrogate,s,a;for(o!==0?(s=o,a=-1,o=0):(s=e.charCodeAt(0),a=0);;){let l=s;if(cr(s))if(a+1<t){let u=e.charCodeAt(a+1);$i(u)?(a++,l=dr(s,u)):l=65533}else{o=s;break}else $i(s)&&(l=65533);if(r=this._push(n,r,l),a++,a<t)s=e.charCodeAt(a);else break}this._buffLen=r,this._leftoverHighSurrogate=o}_push(e,t,n){return n<128?e[t++]=n:n<2048?(e[t++]=192|(n&1984)>>>6,e[t++]=128|(n&63)>>>0):n<65536?(e[t++]=224|(n&61440)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0):(e[t++]=240|(n&1835008)>>>18,e[t++]=128|(n&258048)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),pt(this._h0)+pt(this._h1)+pt(this._h2)+pt(this._h3)+pt(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,hr(this._buff,this._buffLen),this._buffLen>56&&(this._step(),hr(this._buff));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let e=li._bigBlock32,t=this._buffDV;for(let d=0;d<64;d+=4)e.setUint32(d,t.getUint32(d,!1),!1);for(let d=64;d<320;d+=4)e.setUint32(d,Vi(e.getUint32(d-12,!1)^e.getUint32(d-32,!1)^e.getUint32(d-56,!1)^e.getUint32(d-64,!1),1),!1);let n=this._h0,r=this._h1,o=this._h2,s=this._h3,a=this._h4,l,u,c;for(let d=0;d<80;d++)d<20?(l=r&o|~r&s,u=1518500249):d<40?(l=r^o^s,u=1859775393):d<60?(l=r&o|r&s|o&s,u=2400959708):(l=r^o^s,u=3395469782),c=Vi(n,5)+l+a+u+e.getUint32(d*4,!1)&4294967295,a=s,s=o,o=Vi(r,30),r=n,n=c;this._h0=this._h0+n&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+o&4294967295,this._h3=this._h3+s&4294967295,this._h4=this._h4+a&4294967295}};li._bigBlock32=new DataView(new ArrayBuffer(320));var pr=li;var{registerWindow:xu,getWindow:ks,getDocument:Au,getWindows:Ou,getWindowsCount:Ru,getWindowId:mr,getWindowById:Mu,hasWindow:Fu,onDidRegisterWindow:wu,onWillUnregisterWindow:Du,onDidUnregisterWindow:Su}=function(){let i=new Map;re;let e={window:re,disposables:new me};i.set(re.vscodeWindowId,e);let t=new D,n=new D,r=new D;function o(s,a){return(typeof s=="number"?i.get(s):void 0)??(a?e:void 0)}return{onDidRegisterWindow:t.event,onWillUnregisterWindow:r.event,onDidUnregisterWindow:n.event,registerWindow(s){if(i.has(s.vscodeWindowId))return k.None;let a=new me,l={window:s,disposables:a.add(new me)};return i.set(s.vscodeWindowId,l),a.add(P(()=>{i.delete(s.vscodeWindowId),n.fire(s)})),a.add(ui(s,Us.BEFORE_UNLOAD,()=>{r.fire(s)})),t.fire(l),a},getWindows(){return i.values()},getWindowsCount(){return i.size},getWindowId(s){return s.vscodeWindowId},hasWindow(s){return i.has(s)},getWindowById:o,getWindow(s){let a=s;if(a?.ownerDocument?.defaultView)return a.ownerDocument.defaultView.window;let l=s;return l?.view?l.view.window:re},getDocument(s){return ks(s).document}}}();var zi=class{constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function ui(i,e,t,n){return new zi(i,e,t,n)}var Cs,fr;var _t=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Be(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let i=new Map,e=new Map,t=new Map,n=new Map,r=o=>{t.set(o,!1);let s=i.get(o)??[];for(e.set(o,s),i.set(o,[]),n.set(o,!0);s.length>0;)s.sort(_t.sort),s.shift().execute();n.set(o,!1)};fr=(o,s,a=0)=>{let l=mr(o),u=new _t(s,a),c=i.get(l);return c||(c=[],i.set(l,c)),c.push(u),t.get(l)||(t.set(l,!0),o.requestAnimationFrame(()=>r(l))),u},Cs=(o,s,a)=>{let l=mr(o);if(n.get(l)){let u=new _t(s,a),c=e.get(l);return c||(c=[],e.set(l,c)),c.push(u),u}else return fr(o,s,a)}})();var He=class He{constructor(e,t){this.width=e;this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new He(e,t):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof He?e:new He(e.width,e.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}};He.None=new He(0,0);var br=He;var Pu=new class{constructor(){this.mutationObservers=new Map}observe(i,e,t){let n=this.mutationObservers.get(i);n||(n=new Map,this.mutationObservers.set(i,n));let r=_r(t),o=n.get(r);if(o)o.users+=1;else{let s=new D,a=new MutationObserver(u=>s.fire(u));a.observe(i,t);let l=o={users:1,observer:a,onDidMutate:s.event};e.add(P(()=>{l.users-=1,l.users===0&&(s.dispose(),a.disconnect(),n?.delete(r),n?.size===0&&this.mutationObservers.delete(i))})),n.set(r,o)}return o.onDidMutate}};var Us={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:ct?"webkitAnimationStart":"animationstart",ANIMATION_END:ct?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:ct?"webkitAnimationIteration":"animationiteration"};var Gs=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function gr(i,e,t,...n){let r=Gs.exec(e);if(!r)throw new Error("Bad use of emmet");let o=r[1]||"div",s;return i!=="http://www.w3.org/1999/xhtml"?s=document.createElementNS(i,o):s=document.createElement(o),r[3]&&(s.id=r[3]),r[4]&&(s.className=r[4].replace(/\./g," ").trim()),t&&Object.entries(t).forEach(([a,l])=>{typeof l>"u"||(/^on\w+$/.test(a)?s[a]=l:a==="selected"?l&&s.setAttribute(a,"true"):s.setAttribute(a,l))}),s.append(...n),s}function $s(i,e,...t){return gr("http://www.w3.org/1999/xhtml",i,e,...t)}$s.SVG=function(i,e,...t){return gr("http://www.w3.org/2000/svg",i,e,...t)};var ci=class extends k{constructor(t,n,r,o,s,a,l,u,c){super();this._terminal=t;this._characterJoinerService=n;this._charSizeService=r;this._coreBrowserService=o;this._coreService=s;this._decorationService=a;this._optionsService=l;this._themeService=u;this._cursorBlinkStateManager=new Ee;this._charAtlasDisposable=this._register(new Ee);this._observerDisposable=this._register(new Ee);this._model=new Kt;this._workCell=new lt;this._workCell2=new lt;this._rectangleRenderer=this._register(new Ee);this._glyphRenderer=this._register(new Ee);this._onChangeTextureAtlas=this._register(new D);this.onChangeTextureAtlas=this._onChangeTextureAtlas.event;this._onAddTextureAtlasCanvas=this._register(new D);this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;this._onRemoveTextureAtlasCanvas=this._register(new D);this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event;this._onRequestRedraw=this._register(new D);this.onRequestRedraw=this._onRequestRedraw.event;this._onContextLoss=this._register(new D);this.onContextLoss=this._onContextLoss.event;this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");let d={antialias:!1,depth:!1,preserveDrawingBuffer:c};if(this._gl=this._canvas.getContext("webgl2",d),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new wt(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new Yt(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,l,this._themeService)],this.dimensions=bn(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(l.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(ui(this._canvas,"webglcontextlost",h=>{console.log("webglcontextlost event received"),h.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(h)},3e3)})),this._register(ui(this._canvas,"webglcontextrestored",h=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,Di(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=Si(this._canvas,this._coreBrowserService.window,(h,p)=>this._setCanvasDevicePixelDimensions(h,p)),this._register(this._coreBrowserService.onWindowChange(h=>{this._observerDisposable.value=Si(this._canvas,h,(p,m)=>this._setCanvasDevicePixelDimensions(p,m))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(P(()=>{for(let h of this._renderLayers)h.dispose();this._canvas.parentElement?.removeChild(this._canvas),Di(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(t,n){this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(let r of this._renderLayers)r.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let t of this._renderLayers)t.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let t of this._renderLayers)t.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(t,n,r){for(let o of this._renderLayers)o.handleSelectionChanged(this._terminal,t,n,r);this._model.selection.update(this._core,t,n,r),this._requestRedrawViewport()}handleCursorMove(){for(let t of this._renderLayers)t.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new qt(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new Vt(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let t=Wt(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize);this._charAtlas!==t&&(this._onChangeTextureAtlas.fire(t.pages[0].canvas),this._charAtlasDisposable.value=xt(ne.forward(t.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),ne.forward(t.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=t,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(t){this._model.clear(),t&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(let t of this._renderLayers)t.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(t,n){if(!this._isAttached)if(this._core.screenElement?.isConnected&&this._charSizeService.width&&this._charSizeService.height)this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;else return;for(let r of this._renderLayers)r.handleGridChanged(this._terminal,t,n);!this._glyphRenderer.value||!this._rectangleRenderer.value||(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(t,n),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new Ct(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(t,n){let r=this._core,o=this._workCell,s,a,l,u,c,d,h=0,p=!0,m,_,A,M,R,B,L,x,F;t=vr(t,r.rows-1,0),n=vr(n,r.rows-1,0);let C=this._coreService.decPrivateModes.cursorStyle??r.options.cursorStyle??"block",Y=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,ve=Y-r.buffer.ydisp,se=Math.min(this._terminal.buffer.active.cursorX,r.cols-1),Te=-1,S=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let ee=!1;for(a=t;a<=n;a++)for(l=a+r.buffer.ydisp,u=r.buffer.lines.get(l),this._model.lineLengths[a]=0,A=Y===l,h=0,c=this._characterJoinerService.getJoinedCharacters(l),x=0;x<r.cols;x++){if(s=this._cellColorResolver.result.bg,u.loadCell(x,o),x===0&&(s=this._cellColorResolver.result.bg),d=!1,p=x>=h,m=x,c.length>0&&x===c[0][0]&&p){_=c.shift();let E=this._model.selection.isCellSelected(this._terminal,_[0],l);for(L=_[0]+1;L<_[1];L++)p&&=E===this._model.selection.isCellSelected(this._terminal,L,l);p&&=!A||se<_[0]||se>=_[1],p?(d=!0,o=new Zi(o,u.translateToString(!0,_[0],_[1]),_[1]-_[0]),m=_[1]-1):h=_[1]}if(M=o.getChars(),R=o.getCode(),L=(a*r.cols+x)*Ze,this._cellColorResolver.resolve(o,x,l,this.dimensions.device.cell.width),S&&l===Y&&(x===se&&(this._model.cursor={x:se,y:ve,width:o.getWidth(),style:this._coreBrowserService.isFocused?C:r.options.cursorInactiveStyle,cursorWidth:r.options.cursorWidth,dpr:this._devicePixelRatio},Te=se+o.getWidth()-1),x>=se&&x<=Te&&(this._coreBrowserService.isFocused&&C==="block"||this._coreBrowserService.isFocused===!1&&r.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),R!==0&&(this._model.lineLengths[a]=x+1),!(this._model.cells[L]===R&&this._model.cells[L+qe]===this._cellColorResolver.result.bg&&this._model.cells[L+je]===this._cellColorResolver.result.fg&&this._model.cells[L+zt]===this._cellColorResolver.result.ext)&&(ee=!0,M.length>1&&(R|=$n),this._model.cells[L]=R,this._model.cells[L+qe]=this._cellColorResolver.result.bg,this._model.cells[L+je]=this._cellColorResolver.result.fg,this._model.cells[L+zt]=this._cellColorResolver.result.ext,B=o.getWidth(),this._glyphRenderer.value.updateCell(x,a,R,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,M,B,s),d)){for(o=this._workCell,x++;x<=m;x++)F=(a*r.cols+x)*Ze,this._glyphRenderer.value.updateCell(x,a,0,0,0,0,Tn,0,0),this._model.cells[F]=0,this._model.cells[F+qe]=this._cellColorResolver.result.bg,this._model.cells[F+je]=this._cellColorResolver.result.fg,this._model.cells[F+zt]=this._cellColorResolver.result.ext;x--}}ee&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){!this._charSizeService.width||!this._charSizeService.height||(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(t,n){this._canvas.width===t&&this._canvas.height===n||(this._canvas.width=t,this._canvas.height=n,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let t=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:t,end:t})}},Zi=class extends pe{constructor(t,n,r){super();this.content=0;this.combinedData="";this.fg=t.fg,this.bg=t.bg,this.combinedData=n,this._width=r}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(t){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function vr(i,e,t=0){return Math.max(Math.min(i,e),t)}var Er="di$target",Lr="di$dependencies",qi=new Map;function _e(i){if(qi.has(i))return qi.get(i);let e=function(t,n,r){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Vs(e,t,r)};return e._id=i,qi.set(i,e),e}function Vs(i,e,t){e[Er]===e?e[Lr].push({id:i,index:t}):(e[Lr]=[{id:i,index:t}],e[Er]=e)}var tc=_e("BufferService"),ic=_e("CoreMouseService"),nc=_e("CoreService"),rc=_e("CharsetService"),sc=_e("InstantiationService");var oc=_e("LogService"),Ir=_e("OptionsService"),ac=_e("OscLinkService"),lc=_e("UnicodeService"),uc=_e("DecorationService");var Ks={trace:0,debug:1,info:2,warn:3,error:4,off:5},zs="xterm.js: ",di=class extends k{constructor(t){super();this._optionsService=t;this._logLevel=5;this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),yr=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=Ks[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(t){for(let n=0;n<t.length;n++)typeof t[n]=="function"&&(t[n]=t[n]())}_log(t,n,r){this._evalLazyOptionalParams(r),t.call(console,(this._optionsService.options.logger?"":zs)+n,...r)}trace(t,...n){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,t,n)}debug(t,...n){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,t,n)}info(t,...n){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,t,n)}warn(t,...n){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,t,n)}error(t,...n){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,t,n)}};di=Qi([Ji(0,Ir)],di);var yr;function xr(i){yr=i}var Ar=class extends k{constructor(t){if(gi&&_n()<16){let n={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",n))throw new Error("Webgl2 is only supported on Safari 16 and above")}super();this._preserveDrawingBuffer=t;this._onChangeTextureAtlas=this._register(new D);this.onChangeTextureAtlas=this._onChangeTextureAtlas.event;this._onAddTextureAtlasCanvas=this._register(new D);this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;this._onRemoveTextureAtlasCanvas=this._register(new D);this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event;this._onContextLoss=this._register(new D);this.onContextLoss=this._onContextLoss.event}activate(t){let n=t._core;if(!t.element){this._register(n.onWillOpen(()=>this.activate(t)));return}this._terminal=t;let r=n.coreService,o=n.optionsService,s=n,a=s._renderService,l=s._characterJoinerService,u=s._charSizeService,c=s._coreBrowserService,d=s._decorationService,h=s._logService,p=s._themeService;xr(h),this._renderer=this._register(new ci(t,l,u,c,r,d,o,p,this._preserveDrawingBuffer)),this._register(ne.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(ne.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(ne.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(ne.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),a.setRenderer(this._renderer),this._register(P(()=>{if(this._terminal._core._store._isDisposed)return;let m=this._terminal._core._renderService;m.setRenderer(this._terminal._core._createRenderer()),m.handleResize(t.cols,t.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}};export{Ar as WebglAddon};
|
|
101
101
|
//# sourceMappingURL=addon-webgl.mjs.map
|