@tt-a1i/hive 0.6.0-alpha.4 → 0.6.0-alpha.5
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/CHANGELOG.md +44 -0
- package/README.md +15 -4
- package/README.zh-CN.md +6 -1
- package/dist/src/cli/team.d.ts +8 -0
- package/dist/src/cli/team.js +69 -26
- package/dist/src/cli/team.js.map +1 -1
- package/dist/src/server/agent-run-store.d.ts +1 -2
- package/dist/src/server/agent-run-store.js +5 -13
- package/dist/src/server/agent-run-store.js.map +1 -1
- package/dist/src/server/agent-runtime-ports.d.ts +1 -2
- package/dist/src/server/agent-session-store.d.ts +1 -1
- package/dist/src/server/agent-session-store.js +28 -34
- package/dist/src/server/agent-session-store.js.map +1 -1
- package/dist/src/server/agent-startup-instructions.js +1 -1
- package/dist/src/server/agent-startup-instructions.js.map +1 -1
- package/dist/src/server/app-state-store.d.ts +1 -1
- package/dist/src/server/app-state-store.js +1 -3
- package/dist/src/server/app-state-store.js.map +1 -1
- package/dist/src/server/command-preset-store.d.ts +1 -1
- package/dist/src/server/command-preset-store.js +2 -8
- package/dist/src/server/command-preset-store.js.map +1 -1
- package/dist/src/server/dispatch-ledger-store.d.ts +18 -4
- package/dist/src/server/dispatch-ledger-store.js +0 -66
- package/dist/src/server/dispatch-ledger-store.js.map +1 -1
- package/dist/src/server/hive-team-guidance.js +7 -4
- package/dist/src/server/hive-team-guidance.js.map +1 -1
- package/dist/src/server/message-log-store.d.ts +1 -3
- package/dist/src/server/message-log-store.js +2 -59
- package/dist/src/server/message-log-store.js.map +1 -1
- package/dist/src/server/role-template-store.d.ts +1 -1
- package/dist/src/server/role-template-store.js +2 -6
- package/dist/src/server/role-template-store.js.map +1 -1
- package/dist/src/server/routes-workspaces.js +7 -7
- package/dist/src/server/routes-workspaces.js.map +1 -1
- package/dist/src/server/runtime-database.d.ts +1 -1
- package/dist/src/server/runtime-database.js +8 -4
- package/dist/src/server/runtime-database.js.map +1 -1
- package/dist/src/server/runtime-store-helpers.js +2 -4
- package/dist/src/server/runtime-store-helpers.js.map +1 -1
- package/dist/src/server/runtime-store.d.ts +1 -1
- package/dist/src/server/runtime-store.js +1 -1
- package/dist/src/server/runtime-store.js.map +1 -1
- package/dist/src/server/settings-store.d.ts +1 -1
- package/dist/src/server/settings-store.js.map +1 -1
- package/dist/src/server/team-list-serializer.d.ts +1 -1
- package/dist/src/server/team-list-serializer.js +2 -2
- package/dist/src/server/team-list-serializer.js.map +1 -1
- package/dist/src/server/terminal-state-mirror.d.ts +1 -1
- package/dist/src/server/terminal-state-mirror.js +1 -1
- package/dist/src/server/terminal-state-mirror.js.map +1 -1
- package/dist/src/server/worker-output-tracker.d.ts +1 -1
- package/dist/src/server/worker-output-tracker.js +2 -2
- package/dist/src/server/worker-output-tracker.js.map +1 -1
- package/dist/src/server/workspace-store-hydration.d.ts +2 -2
- package/dist/src/server/workspace-store-hydration.js +1 -4
- package/dist/src/server/workspace-store-hydration.js.map +1 -1
- package/dist/src/server/workspace-store.d.ts +1 -1
- package/dist/src/server/workspace-store.js +5 -5
- package/dist/src/server/workspace-store.js.map +1 -1
- package/dist/src/shared/types.d.ts +6 -3
- package/package.json +5 -1
- package/web/dist/assets/addon-clipboard-wHJhZAA4.js +1 -0
- package/web/dist/assets/addon-unicode11-Bt8F3D7-.js +7 -0
- package/web/dist/assets/addon-web-links-DIbG5aQx.js +1 -0
- package/web/dist/assets/addon-webgl-DCtw1yLn.js +64 -0
- package/web/dist/assets/index-CMHbdGhT.css +1 -0
- package/web/dist/assets/index-CkY03NZW.js +76 -0
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-CnUabdqK.js +0 -73
- package/web/dist/assets/index-DqkpIE12.css +0 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var Si=(e,t,i,r)=>{for(var s=t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=n(s)||s);return s},Ai=(e,t)=>(i,r)=>t(i,r,e),Ri=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?yt.isErrorNoTelemetry(e)?new yt(e.message+`
|
|
2
|
+
|
|
3
|
+
`+e.stack):new Error(e.message+`
|
|
4
|
+
|
|
5
|
+
`+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)}},Ti=new Ri;function et(e){Bi(e)||Ti.onUnexpectedError(e)}var ut="Canceled";function Bi(e){return e instanceof Ei?!0:e instanceof Error&&e.name===ut&&e.message===ut}var Ei=class extends Error{constructor(){super(ut),this.name=this.message}},yt=class _t extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof _t)return t;let i=new _t;return i.message=t.message,i.stack=t.stack,i}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},ki;(e=>{function t(o){return o<0}e.isLessThan=t;function i(o){return o<=0}e.isLessThanOrEqual=i;function r(o){return o>0}e.isGreaterThan=r;function s(o){return o===0}e.isNeitherLessOrGreaterThan=s,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(ki||={});function Fi(e,t){let i=this,r=!1,s;return function(){return r||(r=!0,t||(s=e.apply(i,arguments))),s}}var Qt;(e=>{function t(x){return x&&typeof x=="object"&&typeof x[Symbol.iterator]=="function"}e.is=t;let i=Object.freeze([]);function r(){return i}e.empty=r;function*s(x){yield x}e.single=s;function o(x){return t(x)?x:s(x)}e.wrap=o;function n(x){return x||i}e.from=n;function*a(x){for(let M=x.length-1;M>=0;M--)yield x[M]}e.reverse=a;function l(x){return!x||x[Symbol.iterator]().next().done===!0}e.isEmpty=l;function h(x){return x[Symbol.iterator]().next().value}e.first=h;function c(x,M){let A=0;for(let U of x)if(M(U,A++))return!0;return!1}e.some=c;function d(x,M){for(let A of x)if(M(A))return A}e.find=d;function*u(x,M){for(let A of x)M(A)&&(yield A)}e.filter=u;function*g(x,M){let A=0;for(let U of x)yield M(U,A++)}e.map=g;function*y(x,M){let A=0;for(let U of x)yield*M(U,A++)}e.flatMap=y;function*T(...x){for(let M of x)yield*M}e.concat=T;function $(x,M,A){let U=A;for(let X of x)U=M(U,X);return U}e.reduce=$;function*O(x,M,A=x.length){for(M<0&&(M+=x.length),A<0?A+=x.length:A>x.length&&(A=x.length);M<A;M++)yield x[M]}e.slice=O;function R(x,M=Number.POSITIVE_INFINITY){let A=[];if(M===0)return[A,x];let U=x[Symbol.iterator]();for(let X=0;X<M;X++){let oe=U.next();if(oe.done)return[A,e.empty()];A.push(oe.value)}return[A,{[Symbol.iterator](){return U}}]}e.consume=R;async function S(x){let M=[];for await(let A of x)M.push(A);return Promise.resolve(M)}e.asyncToArray=S})(Qt||={});function Kt(e){if(Qt.is(e)){let t=[];for(let i of e)if(i)try{i.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Jt(...e){return Y(()=>Kt(e))}function Y(e){return{dispose:Fi(()=>{e()})}}var ei=class ti{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Kt(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?ti.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(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),void 0)}};ei.DISABLE_DISPOSED_WARNING=!1;var ke=ei,ne=class{constructor(){this._store=new ke,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};ne.None=Object.freeze({dispose(){}});var Pe=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e}},mt=typeof process<"u"&&"title"in process,Qe=mt?"node":navigator.userAgent,Pi=mt?"node":navigator.platform,$i=Qe.includes("Firefox"),Di=Qe.includes("Edge"),ii=/^((?!chrome|android).)*safari/i.test(Qe);function Ii(){if(!ii)return 0;let e=Qe.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}Pi.indexOf("Linux")>=0;var zi="",q=0,G=0,H=0,I=0,ie={css:"#00000000",rgba:0},Q;(e=>{function t(s,o,n,a){return a!==void 0?`#${be(s)}${be(o)}${be(n)}${be(a)}`:`#${be(s)}${be(o)}${be(n)}`}e.toCss=t;function i(s,o,n,a=255){return(s<<24|o<<16|n<<8|a)>>>0}e.toRgba=i;function r(s,o,n,a){return{css:e.toCss(s,o,n,a),rgba:e.toRgba(s,o,n,a)}}e.toColor=r})(Q||={});var ze;(e=>{function t(l,h){if(I=(h.rgba&255)/255,I===1)return{css:h.css,rgba:h.rgba};let c=h.rgba>>24&255,d=h.rgba>>16&255,u=h.rgba>>8&255,g=l.rgba>>24&255,y=l.rgba>>16&255,T=l.rgba>>8&255;q=g+Math.round((c-g)*I),G=y+Math.round((d-y)*I),H=T+Math.round((u-T)*I);let $=Q.toCss(q,G,H),O=Q.toRgba(q,G,H);return{css:$,rgba:O}}e.blend=t;function i(l){return(l.rgba&255)===255}e.isOpaque=i;function r(l,h,c){let d=Me.ensureContrastRatio(l.rgba,h.rgba,c);if(d)return Q.toColor(d>>24&255,d>>16&255,d>>8&255)}e.ensureContrastRatio=r;function s(l){let h=(l.rgba|255)>>>0;return[q,G,H]=Me.toChannels(h),{css:Q.toCss(q,G,H),rgba:h}}e.opaque=s;function o(l,h){return I=Math.round(h*255),[q,G,H]=Me.toChannels(l.rgba),{css:Q.toCss(q,G,H,I),rgba:Q.toRgba(q,G,H,I)}}e.opacity=o;function n(l,h){return I=l.rgba&255,o(l,I*h/255)}e.multiplyOpacity=n;function a(l){return[l.rgba>>24&255,l.rgba>>16&255,l.rgba>>8&255]}e.toColorRGB=a})(ze||={});var Wi;(e=>{let t,i;try{let s=document.createElement("canvas");s.width=1,s.height=1;let o=s.getContext("2d",{willReadFrequently:!0});o&&(t=o,t.globalCompositeOperation="copy",i=t.createLinearGradient(0,0,1,1))}catch{}function r(s){if(s.match(/#[\da-f]{3,8}/i))switch(s.length){case 4:return q=parseInt(s.slice(1,2).repeat(2),16),G=parseInt(s.slice(2,3).repeat(2),16),H=parseInt(s.slice(3,4).repeat(2),16),Q.toColor(q,G,H);case 5:return q=parseInt(s.slice(1,2).repeat(2),16),G=parseInt(s.slice(2,3).repeat(2),16),H=parseInt(s.slice(3,4).repeat(2),16),I=parseInt(s.slice(4,5).repeat(2),16),Q.toColor(q,G,H,I);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 q=parseInt(o[1]),G=parseInt(o[2]),H=parseInt(o[3]),I=Math.round((o[5]===void 0?1:parseFloat(o[5]))*255),Q.toColor(q,G,H,I);if(!t||!i)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=i,t.fillStyle=s,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[q,G,H,I]=t.getImageData(0,0,1,1).data,I!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Q.toRgba(q,G,H,I),css:s}}e.toColor=r})(Wi||={});var Z;(e=>{function t(r){return i(r>>16&255,r>>8&255,r&255)}e.relativeLuminance=t;function i(r,s,o){let n=r/255,a=s/255,l=o/255,h=n<=.03928?n/12.92:Math.pow((n+.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 h*.2126+c*.7152+d*.0722}e.relativeLuminance2=i})(Z||={});var Me;(e=>{function t(n,a){if(I=(a&255)/255,I===1)return a;let l=a>>24&255,h=a>>16&255,c=a>>8&255,d=n>>24&255,u=n>>16&255,g=n>>8&255;return q=d+Math.round((l-d)*I),G=u+Math.round((h-u)*I),H=g+Math.round((c-g)*I),Q.toRgba(q,G,H)}e.blend=t;function i(n,a,l){let h=Z.relativeLuminance(n>>8),c=Z.relativeLuminance(a>>8);if(ue(h,c)<l){if(c<h){let g=r(n,a,l),y=ue(h,Z.relativeLuminance(g>>8));if(y<l){let T=s(n,a,l),$=ue(h,Z.relativeLuminance(T>>8));return y>$?g:T}return g}let d=s(n,a,l),u=ue(h,Z.relativeLuminance(d>>8));if(u<l){let g=r(n,a,l),y=ue(h,Z.relativeLuminance(g>>8));return u>y?d:g}return d}}e.ensureContrastRatio=i;function r(n,a,l){let h=n>>24&255,c=n>>16&255,d=n>>8&255,u=a>>24&255,g=a>>16&255,y=a>>8&255,T=ue(Z.relativeLuminance2(u,g,y),Z.relativeLuminance2(h,c,d));for(;T<l&&(u>0||g>0||y>0);)u-=Math.max(0,Math.ceil(u*.1)),g-=Math.max(0,Math.ceil(g*.1)),y-=Math.max(0,Math.ceil(y*.1)),T=ue(Z.relativeLuminance2(u,g,y),Z.relativeLuminance2(h,c,d));return(u<<24|g<<16|y<<8|255)>>>0}e.reduceLuminance=r;function s(n,a,l){let h=n>>24&255,c=n>>16&255,d=n>>8&255,u=a>>24&255,g=a>>16&255,y=a>>8&255,T=ue(Z.relativeLuminance2(u,g,y),Z.relativeLuminance2(h,c,d));for(;T<l&&(u<255||g<255||y<255);)u=Math.min(255,u+Math.ceil((255-u)*.1)),g=Math.min(255,g+Math.ceil((255-g)*.1)),y=Math.min(255,y+Math.ceil((255-y)*.1)),T=ue(Z.relativeLuminance2(u,g,y),Z.relativeLuminance2(h,c,d));return(u<<24|g<<16|y<<8|255)>>>0}e.increaseLuminance=s;function o(n){return[n>>24&255,n>>16&255,n>>8&255,n&255]}e.toChannels=o})(Me||={});function be(e){let t=e.toString(16);return t.length<2?"0"+t:t}function ue(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}function W(e){if(!e)throw new Error("value must not be falsy");return e}function wt(e){return 57508<=e&&e<=57558}function Oi(e){return 57520<=e&&e<=57527}function Ui(e){return 57344<=e&&e<=63743}function Ni(e){return 9472<=e&&e<=9631}function qi(e){return e>=128512&&e<=128591||e>=127744&&e<=128511||e>=128640&&e<=128767||e>=9728&&e<=9983||e>=9984&&e<=10175||e>=65024&&e<=65039||e>=129280&&e<=129535||e>=127462&&e<=127487}function Gi(e,t,i,r){return t===1&&i>Math.ceil(r*1.5)&&e!==void 0&&e>255&&!qi(e)&&!wt(e)&&!Ui(e)}function si(e){return wt(e)||Ni(e)}function Hi(){return{css:{canvas:qe(),cell:qe()},device:{canvas:qe(),cell:qe(),char:{width:0,height:0,left:0,top:0}}}}function qe(){return{width:0,height:0}}function Vi(e,t,i=0){return(e-(Math.round(t)*2-i))%(Math.round(t)*2)}var V=0,N=0,he=!1,_e=!1,Ge=!1,K,tt=0,ji=class{constructor(e,t,i,r,s,o){this._terminal=e,this._optionService=t,this._selectionRenderModel=i,this._decorationService=r,this._coreBrowserService=s,this._themeService=o,this.result={fg:0,bg:0,ext:0}}resolve(e,t,i,r){if(this.result.bg=e.bg,this.result.fg=e.fg,this.result.ext=e.bg&268435456?e.extended.ext:0,N=0,V=0,_e=!1,he=!1,Ge=!1,K=this._themeService.colors,tt=0,e.getCode()!==0&&e.extended.underlineStyle===4){let s=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));tt=t*r%(Math.round(s)*2)}if(this._decorationService.forEachDecorationAtCell(t,i,"bottom",s=>{s.backgroundColorRGB&&(N=s.backgroundColorRGB.rgba>>8&16777215,_e=!0),s.foregroundColorRGB&&(V=s.foregroundColorRGB.rgba>>8&16777215,he=!0)}),Ge=this._selectionRenderModel.isCellSelected(this._terminal,t,i),Ge){if(this.result.fg&67108864||(this.result.bg&50331648)!==0){if(this.result.fg&67108864)switch(this.result.fg&50331648){case 16777216:case 33554432:N=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:N=(this.result.fg&16777215)<<8|255;break;default:N=this._themeService.colors.foreground.rgba}else switch(this.result.bg&50331648){case 16777216:case 33554432:N=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:N=(this.result.bg&16777215)<<8|255;break}N=Me.blend(N,(this._coreBrowserService.isFocused?K.selectionBackgroundOpaque:K.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}else N=(this._coreBrowserService.isFocused?K.selectionBackgroundOpaque:K.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(_e=!0,K.selectionForeground&&(V=K.selectionForeground.rgba>>8&16777215,he=!0),si(e.getCode())){if(this.result.fg&67108864&&(this.result.bg&50331648)===0)V=(this._coreBrowserService.isFocused?K.selectionBackgroundOpaque:K.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(this.result.fg&67108864)switch(this.result.bg&50331648){case 16777216:case 33554432:V=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:V=(this.result.bg&16777215)<<8|255;break}else switch(this.result.fg&50331648){case 16777216:case 33554432:V=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:V=(this.result.fg&16777215)<<8|255;break;default:V=this._themeService.colors.foreground.rgba}V=Me.blend(V,(this._coreBrowserService.isFocused?K.selectionBackgroundOpaque:K.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}he=!0}}this._decorationService.forEachDecorationAtCell(t,i,"top",s=>{s.backgroundColorRGB&&(N=s.backgroundColorRGB.rgba>>8&16777215,_e=!0),s.foregroundColorRGB&&(V=s.foregroundColorRGB.rgba>>8&16777215,he=!0)}),_e&&(Ge?N=e.bg&-16777216&-134217729|N|50331648:N=e.bg&-16777216|N|50331648),he&&(V=e.fg&-16777216&-67108865|V|50331648),this.result.fg&67108864&&(_e&&!he&&((this.result.bg&50331648)===0?V=this.result.fg&-134217728|K.background.rgba>>8&16777215&16777215|50331648:V=this.result.fg&-134217728|this.result.bg&67108863,he=!0),!_e&&he&&((this.result.fg&50331648)===0?N=this.result.bg&-67108864|K.foreground.rgba>>8&16777215&16777215|50331648:N=this.result.bg&-67108864|this.result.fg&67108863,_e=!0)),K=void 0,this.result.bg=_e?N:this.result.bg,this.result.fg=he?V:this.result.fg,this.result.ext&=536870911,this.result.ext|=tt<<29&3758096384}},Yi=.5,ri=$i||Di?"bottom":"ideographic",Xi={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{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}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{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}],"🮖":[{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}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]},Zi={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]},Qi={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(e,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"║":{1:(e,t)=>`M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1`},"╒":{1:(e,t)=>`M.5,1 L.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"╓":{1:(e,t)=>`M${.5-e},1 L${.5-e},.5 L1,.5 M${.5+e},.5 L${.5+e},1`},"╔":{1:(e,t)=>`M1,${.5-t} L${.5-e},${.5-t} L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1`},"╕":{1:(e,t)=>`M0,${.5-t} L.5,${.5-t} L.5,1 M0,${.5+t} L.5,${.5+t}`},"╖":{1:(e,t)=>`M${.5+e},1 L${.5+e},.5 L0,.5 M${.5-e},.5 L${.5-e},1`},"╗":{1:(e,t)=>`M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M0,${.5-t} L${.5+e},${.5-t} L${.5+e},1`},"╘":{1:(e,t)=>`M.5,0 L.5,${.5+t} L1,${.5+t} M.5,${.5-t} L1,${.5-t}`},"╙":{1:(e,t)=>`M1,.5 L${.5-e},.5 L${.5-e},0 M${.5+e},.5 L${.5+e},0`},"╚":{1:(e,t)=>`M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0 M1,${.5+t} L${.5-e},${.5+t} L${.5-e},0`},"╛":{1:(e,t)=>`M0,${.5+t} L.5,${.5+t} L.5,0 M0,${.5-t} L.5,${.5-t}`},"╜":{1:(e,t)=>`M0,.5 L${.5+e},.5 L${.5+e},0 M${.5-e},.5 L${.5-e},0`},"╝":{1:(e,t)=>`M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0 M0,${.5+t} L${.5+e},${.5+t} L${.5+e},0`},"╞":{1:(e,t)=>`M.5,0 L.5,1 M.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"╟":{1:(e,t)=>`M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1 M${.5+e},.5 L1,.5`},"╠":{1:(e,t)=>`M${.5-e},0 L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1 M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0`},"╡":{1:(e,t)=>`M.5,0 L.5,1 M0,${.5-t} L.5,${.5-t} M0,${.5+t} L.5,${.5+t}`},"╢":{1:(e,t)=>`M0,.5 L${.5-e},.5 M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1`},"╣":{1:(e,t)=>`M${.5+e},0 L${.5+e},1 M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0`},"╤":{1:(e,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t} M.5,${.5+t} L.5,1`},"╥":{1:(e,t)=>`M0,.5 L1,.5 M${.5-e},.5 L${.5-e},1 M${.5+e},.5 L${.5+e},1`},"╦":{1:(e,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1`},"╧":{1:(e,t)=>`M.5,0 L.5,${.5-t} M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"╨":{1:(e,t)=>`M0,.5 L1,.5 M${.5-e},.5 L${.5-e},0 M${.5+e},.5 L${.5+e},0`},"╩":{1:(e,t)=>`M0,${.5+t} L1,${.5+t} M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0 M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0`},"╪":{1:(e,t)=>`M.5,0 L.5,1 M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"╫":{1:(e,t)=>`M0,.5 L1,.5 M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1`},"╬":{1:(e,t)=>`M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1 M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0 M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{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"},"┉":{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"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(e,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,1,.5`},"╮":{1:(e,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,0,.5`},"╯":{1:(e,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,0,.5`},"╰":{1:(e,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,1,.5`}},We={"":{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},"":{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},"":{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},"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{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},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{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},"":{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},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}};We[""]=We[""];We[""]=We[""];function Ki(e,t,i,r,s,o,n,a){let l=Xi[t];if(l)return Ji(e,l,i,r,s,o),!0;let h=Zi[t];if(h)return es(e,h,i,r,s,o),!0;let c=Qi[t];if(c)return ts(e,c,i,r,s,o,a),!0;let d=We[t];return d?(is(e,d,i,r,s,o,n,a),!0):!1}function Ji(e,t,i,r,s,o){for(let n=0;n<t.length;n++){let a=t[n],l=s/8,h=o/8;e.fillRect(i+a.x*l,r+a.y*h,a.w*l,a.h*h)}}var Mt=new Map;function es(e,t,i,r,s,o){let n=Mt.get(t);n||(n=new Map,Mt.set(t,n));let a=e.fillStyle;if(typeof a!="string")throw new Error(`Unexpected fillStyle type "${a}"`);let l=n.get(a);if(!l){let h=t[0].length,c=t.length,d=e.canvas.ownerDocument.createElement("canvas");d.width=h,d.height=c;let u=W(d.getContext("2d")),g=new ImageData(h,c),y,T,$,O;if(a.startsWith("#"))y=parseInt(a.slice(1,3),16),T=parseInt(a.slice(3,5),16),$=parseInt(a.slice(5,7),16),O=a.length>7&&parseInt(a.slice(7,9),16)||1;else if(a.startsWith("rgba"))[y,T,$,O]=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 S=0;S<h;S++)g.data[(R*h+S)*4]=y,g.data[(R*h+S)*4+1]=T,g.data[(R*h+S)*4+2]=$,g.data[(R*h+S)*4+3]=t[R][S]*(O*255);u.putImageData(g,0,0),l=W(e.createPattern(d,null)),n.set(a,l)}e.fillStyle=l,e.fillRect(i,r,s,o)}function ts(e,t,i,r,s,o,n){e.strokeStyle=e.fillStyle;for(let[a,l]of Object.entries(t)){e.beginPath(),e.lineWidth=n*Number.parseInt(a);let h;if(typeof l=="function"){let c=.15/o*s;h=l(.15,c)}else h=l;for(let c of h.split(" ")){let d=c[0],u=ni[d];if(!u){console.error(`Could not find drawing instructions for "${d}"`);continue}let g=c.substring(1).split(",");!g[0]||!g[1]||u(e,oi(g,s,o,i,r,!0,n))}e.stroke(),e.closePath()}}function is(e,t,i,r,s,o,n,a){let l=new Path2D;l.rect(i,r,s,o),e.clip(l),e.beginPath();let h=n/12;e.lineWidth=a*h;for(let c of t.d.split(" ")){let d=c[0],u=ni[d];if(!u){console.error(`Could not find drawing instructions for "${d}"`);continue}let g=c.substring(1).split(",");!g[0]||!g[1]||u(e,oi(g,s,o,i,r,!1,a,(t.leftPadding??0)*(h/2),(t.rightPadding??0)*(h/2)))}t.type===1?(e.strokeStyle=e.fillStyle,e.stroke()):e.fill(),e.closePath()}function St(e,t,i=0){return Math.max(Math.min(e,t),i)}var ni={C:(e,t)=>e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]),L:(e,t)=>e.lineTo(t[0],t[1]),M:(e,t)=>e.moveTo(t[0],t[1])};function oi(e,t,i,r,s,o,n,a=0,l=0){let h=e.map(c=>parseFloat(c)||parseInt(c));if(h.length<2)throw new Error("Too few arguments for instruction");for(let c=0;c<h.length;c+=2)h[c]*=t-a*n-l*n,o&&h[c]!==0&&(h[c]=St(Math.round(h[c]+.5)-.5,t,0)),h[c]+=r+a*n;for(let c=1;c<h.length;c+=2)h[c]*=i,o&&h[c]!==0&&(h[c]=St(Math.round(h[c]+.5)-.5,i,0)),h[c]+=s;return h}var At=class{constructor(){this._data={}}set(e,t,i){this._data[e]||(this._data[e]={}),this._data[e][t]=i}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},Rt=class{constructor(){this._data=new At}set(e,t,i,r,s){this._data.get(e,t)||this._data.set(e,t,new At),this._data.get(e,t).set(i,r,s)}get(e,t,i,r){return this._data.get(e,t)?.get(i,r)}clear(){this._data.clear()}},ai=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,i=0,r=e.timeRemaining(),s=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),i=Math.max(t,i),s=e.timeRemaining(),i*1.5>s){r-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-t))}ms`),this._start();return}r=s}this.clear()}},ss=class extends ai{_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())}}},rs=class extends ai{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},ns=!mt&&"requestIdleCallback"in window?rs:ss,Be=class hi{constructor(){this.fg=0,this.bg=0,this.extended=new li}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new hi;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}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}},li=class ci{constructor(t=0,i=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=i}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new ci(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},os=globalThis.performance&&typeof globalThis.performance.now=="function",as=class di{static create(t){return new di(t)}constructor(t){this._now=os&&t===!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}},pe;(e=>{e.None=()=>ne.None;function t(m,_){return d(m,()=>{},0,void 0,!0,void 0,_)}e.defer=t;function i(m){return(_,p=null,v)=>{let b=!1,f;return f=m(w=>{if(!b)return f?f.dispose():b=!0,_.call(p,w)},null,v),b&&f.dispose(),f}}e.once=i;function r(m,_,p){return h((v,b=null,f)=>m(w=>v.call(b,_(w)),null,f),p)}e.map=r;function s(m,_,p){return h((v,b=null,f)=>m(w=>{_(w),v.call(b,w)},null,f),p)}e.forEach=s;function o(m,_,p){return h((v,b=null,f)=>m(w=>_(w)&&v.call(b,w),null,f),p)}e.filter=o;function n(m){return m}e.signal=n;function a(...m){return(_,p=null,v)=>{let b=Jt(...m.map(f=>f(w=>_.call(p,w))));return c(b,v)}}e.any=a;function l(m,_,p,v){let b=p;return r(m,f=>(b=_(b,f),b),v)}e.reduce=l;function h(m,_){let p,v={onWillAddFirstListener(){p=m(b.fire,b)},onDidRemoveLastListener(){p?.dispose()}},b=new P(v);return _?.add(b),b.event}function c(m,_){return _ instanceof Array?_.push(m):_&&_.add(m),m}function d(m,_,p=100,v=!1,b=!1,f,w){let L,C,E,j=0,k,Le={leakWarningThreshold:f,onWillAddFirstListener(){L=m(de=>{j++,C=_(C,de),v&&!E&&(ae.fire(C),C=void 0),k=()=>{let J=C;C=void 0,E=void 0,(!v||j>1)&&ae.fire(J),j=0},typeof p=="number"?(clearTimeout(E),E=setTimeout(k,p)):E===void 0&&(E=0,queueMicrotask(k))})},onWillRemoveListener(){b&&j>0&&k?.()},onDidRemoveLastListener(){k=void 0,L.dispose()}},ae=new P(Le);return w?.add(ae),ae.event}e.debounce=d;function u(m,_=0,p){return e.debounce(m,(v,b)=>v?(v.push(b),v):[b],_,void 0,!0,void 0,p)}e.accumulate=u;function g(m,_=(v,b)=>v===b,p){let v=!0,b;return o(m,f=>{let w=v||!_(f,b);return v=!1,b=f,w},p)}e.latch=g;function y(m,_,p){return[e.filter(m,_,p),e.filter(m,v=>!_(v),p)]}e.split=y;function T(m,_=!1,p=[],v){let b=p.slice(),f=m(C=>{b?b.push(C):L.fire(C)});v&&v.add(f);let w=()=>{b?.forEach(C=>L.fire(C)),b=null},L=new P({onWillAddFirstListener(){f||(f=m(C=>L.fire(C)),v&&v.add(f))},onDidAddFirstListener(){b&&(_?setTimeout(w):w())},onDidRemoveLastListener(){f&&f.dispose(),f=null}});return v&&v.add(L),L.event}e.buffer=T;function $(m,_){return(p,v,b)=>{let f=_(new R);return m(function(w){let L=f.evaluate(w);L!==O&&p.call(v,L)},void 0,b)}}e.chain=$;let O=Symbol("HaltChainable");class R{constructor(){this.steps=[]}map(_){return this.steps.push(_),this}forEach(_){return this.steps.push(p=>(_(p),p)),this}filter(_){return this.steps.push(p=>_(p)?p:O),this}reduce(_,p){let v=p;return this.steps.push(b=>(v=_(v,b),v)),this}latch(_=(p,v)=>p===v){let p=!0,v;return this.steps.push(b=>{let f=p||!_(b,v);return p=!1,v=b,f?b:O}),this}evaluate(_){for(let p of this.steps)if(_=p(_),_===O)break;return _}}function S(m,_,p=v=>v){let v=(...L)=>w.fire(p(...L)),b=()=>m.on(_,v),f=()=>m.removeListener(_,v),w=new P({onWillAddFirstListener:b,onDidRemoveLastListener:f});return w.event}e.fromNodeEventEmitter=S;function x(m,_,p=v=>v){let v=(...L)=>w.fire(p(...L)),b=()=>m.addEventListener(_,v),f=()=>m.removeEventListener(_,v),w=new P({onWillAddFirstListener:b,onDidRemoveLastListener:f});return w.event}e.fromDOMEventEmitter=x;function M(m){return new Promise(_=>i(m)(_))}e.toPromise=M;function A(m){let _=new P;return m.then(p=>{_.fire(p)},()=>{_.fire(void 0)}).finally(()=>{_.dispose()}),_.event}e.fromPromise=A;function U(m,_){return m(p=>_.fire(p))}e.forward=U;function X(m,_,p){return _(p),m(v=>_(v))}e.runAndSubscribe=X;class oe{constructor(_,p){this._observable=_,this._counter=0,this._hasChanged=!1;let v={onWillAddFirstListener:()=>{_.addObserver(this)},onDidRemoveLastListener:()=>{_.removeObserver(this)}};this.emitter=new P(v),p&&p.add(this.emitter)}beginUpdate(_){this._counter++}handlePossibleChange(_){}handleChange(_,p){this._hasChanged=!0}endUpdate(_){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function me(m,_){return new oe(m,_).emitter.event}e.fromObservable=me;function B(m){return(_,p,v)=>{let b=0,f=!1,w={beginUpdate(){b++},endUpdate(){b--,b===0&&(m.reportChanges(),f&&(f=!1,_.call(p)))},handlePossibleChange(){},handleChange(){f=!0}};m.addObserver(w),m.reportChanges();let L={dispose(){m.removeObserver(w)}};return v instanceof ke?v.add(L):Array.isArray(v)&&v.push(L),L}}e.fromObservableLight=B})(pe||={});var gt=class ft{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${ft._idPool++}`,ft.all.add(this)}start(t){this._stopWatch=new as,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};gt.all=new Set,gt._idPool=0;var hs=gt,ls=-1,ui=class _i{constructor(t,i,r=(_i._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=i,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,i){let r=this.threshold;if(r<=0||i<r)return;this._stacks||(this._stacks=new Map);let s=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,s+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=r*.5;let[o,n]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${n}):`;console.warn(a),console.warn(o);let l=new us(a,o);this._errorHandler(l)}return()=>{let o=this._stacks.get(t.value)||0;this._stacks.set(t.value,o-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,i=0;for(let[r,s]of this._stacks)(!t||i<s)&&(t=[r,s],i=s);return t}};ui._idPool=1;var cs=ui,ds=class gi{constructor(t){this.value=t}static create(){let t=new Error;return new gi(t.stack??"")}print(){console.warn(this.value.split(`
|
|
6
|
+
`).slice(2).join(`
|
|
7
|
+
`))}},us=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},_s=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},gs=0,it=class{constructor(e){this.value=e,this.id=gs++}},fs=2,vs,P=class{constructor(e){this._size=0,this._options=e,this._leakageMon=this._options?.leakWarningThreshold?new cs(e?.onListenerError??et,this._options?.leakWarningThreshold??ls):void 0,this._perfMon=this._options?._profName?new hs(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,t,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let n=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(n);let a=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],l=new _s(`${n}. HINT: Stack shows most frequent listener (${a[1]}-times)`,a[0]);return(this._options?.onListenerError||et)(l),ne.None}if(this._disposed)return ne.None;t&&(e=e.bind(t));let r=new it(e),s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=ds.create(),s=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof it?(this._deliveryQueue??=new ps,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let o=Y(()=>{s?.(),this._removeListener(r)});return i instanceof ke?i.add(o):Array.isArray(i)&&i.push(o),o},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,i=t.indexOf(e);if(i===-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[i]=void 0;let r=this._deliveryQueue.current===this;if(this._size*fs<=t.length){let s=0;for(let o=0;o<t.length;o++)t[o]?t[s++]=t[o]:r&&(this._deliveryQueue.end--,s<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=s}}_deliver(e,t){if(!e)return;let i=this._options?.onListenerError||et;if(!i){e.value(t);return}try{e.value(t)}catch(r){i(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 it)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}},ps=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Tt={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}},$e=2,De,Ce=class Te{constructor(t,i,r){this._document=t,this._config=i,this._unicodeService=r,this._didWarmUp=!1,this._cacheMap=new Rt,this._cacheMapCombined=new Rt,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new Be,this._textureSize=512,this._onAddTextureAtlasCanvas=new P,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new P,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=fi(t,this._config.deviceCellWidth*4+$e*2,this._config.deviceCellHeight+$e*2),this._tmpCtx=W(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}get pages(){return this._pages}dispose(){this._tmpCanvas.remove();for(let t of this.pages)t.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){let t=new ns;for(let i=33;i<126;i++)t.enqueue(()=>{if(!this._cacheMap.get(i,0,0,0)){let r=this._drawToCache(i,0,0,0,!1,void 0);this._cacheMap.set(i,0,0,0,r)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(!(this._pages[0].currentRow.x===0&&this._pages[0].currentRow.y===0)){for(let t of this._pages)t.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(Te.maxAtlasPages&&this._pages.length>=Math.max(4,Te.maxAtlasPages)){let i=this._pages.filter(h=>h.canvas.width*2<=(Te.maxTextureSize||4096)).sort((h,c)=>c.canvas.width!==h.canvas.width?c.canvas.width-h.canvas.width:c.percentageUsed-h.percentageUsed),r=-1,s=0;for(let h=0;h<i.length;h++)if(i[h].canvas.width!==s)r=h,s=i[h].canvas.width;else if(h-r===3)break;let o=i.slice(r,r+4),n=o.map(h=>h.glyphs[0].texturePage).sort((h,c)=>h>c?1:-1),a=this.pages.length-o.length,l=this._mergePages(o,a);l.version++;for(let h=n.length-1;h>=0;h--)this._deletePage(n[h]);this.pages.push(l),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(l.canvas)}let t=new st(this._document,this._textureSize);return this._pages.push(t),this._activePages.push(t),this._onAddTextureAtlasCanvas.fire(t.canvas),t}_mergePages(t,i){let r=t[0].canvas.width*2,s=new st(this._document,r,t);for(let[o,n]of t.entries()){let a=o*n.canvas.width%r,l=Math.floor(o/2)*n.canvas.height;s.ctx.drawImage(n.canvas,a,l);for(let c of n.glyphs)c.texturePage=i,c.sizeClipSpace.x=c.size.x/r,c.sizeClipSpace.y=c.size.y/r,c.texturePosition.x+=a,c.texturePosition.y+=l,c.texturePositionClipSpace.x=c.texturePosition.x/r,c.texturePositionClipSpace.y=c.texturePosition.y/r;this._onRemoveTextureAtlasCanvas.fire(n.canvas);let h=this._activePages.indexOf(n);h!==-1&&this._activePages.splice(h,1)}return s}_deletePage(t){this._pages.splice(t,1);for(let i=t;i<this._pages.length;i++){let r=this._pages[i];for(let s of r.glyphs)s.texturePage--;r.version++}}getRasterizedGlyphCombinedChar(t,i,r,s,o,n){return this._getFromCacheMap(this._cacheMapCombined,t,i,r,s,o,n)}getRasterizedGlyph(t,i,r,s,o,n){return this._getFromCacheMap(this._cacheMap,t,i,r,s,o,n)}_getFromCacheMap(t,i,r,s,o,n,a){return De=t.get(i,r,s,o),De||(De=this._drawToCache(i,r,s,o,n,a),t.set(i,r,s,o,De)),De}_getColorFromAnsiIndex(t){if(t>=this._config.colors.ansi.length)throw new Error("No color found for idx "+t);return this._config.colors.ansi[t]}_getBackgroundColor(t,i,r,s){if(this._config.allowTransparency)return ie;let o;switch(t){case 16777216:case 33554432:o=this._getColorFromAnsiIndex(i);break;case 50331648:let n=Be.toColorRGB(i);o=Q.toColor(n[0],n[1],n[2]);break;default:r?o=ze.opaque(this._config.colors.foreground):o=this._config.colors.background;break}return this._config.allowTransparency||(o=ze.opaque(o)),o}_getForegroundColor(t,i,r,s,o,n,a,l,h,c){let d=this._getMinimumContrastColor(t,i,r,s,o,n,a,h,l,c);if(d)return d;let u;switch(o){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&h&&n<8&&(n+=8),u=this._getColorFromAnsiIndex(n);break;case 50331648:let g=Be.toColorRGB(n);u=Q.toColor(g[0],g[1],g[2]);break;default:a?u=this._config.colors.background:u=this._config.colors.foreground}return this._config.allowTransparency&&(u=ze.opaque(u)),l&&(u=ze.multiplyOpacity(u,Yi)),u}_resolveBackgroundRgba(t,i,r){switch(t){case 16777216:case 33554432:return this._getColorFromAnsiIndex(i).rgba;case 50331648:return i<<8;default:return r?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(t,i,r,s){switch(t){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&s&&i<8&&(i+=8),this._getColorFromAnsiIndex(i).rgba;case 50331648:return i<<8;default:return r?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(t,i,r,s,o,n,a,l,h,c){if(this._config.minimumContrastRatio===1||c)return;let d=this._getContrastCache(h),u=d.getColor(t,s);if(u!==void 0)return u||void 0;let g=this._resolveBackgroundRgba(i,r,a),y=this._resolveForegroundRgba(o,n,a,l),T=Me.ensureContrastRatio(g,y,this._config.minimumContrastRatio/(h?2:1));if(!T){d.setColor(t,s,null);return}let $=Q.toColor(T>>24&255,T>>16&255,T>>8&255);return d.setColor(t,s,$),$}_getContrastCache(t){return t?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(t,i,r,s,o,n){let a=typeof t=="number"?String.fromCharCode(t):t;n&&this._tmpCanvas.parentElement!==n&&(this._tmpCanvas.style.display="none",n.append(this._tmpCanvas));let l=Math.min(this._config.deviceCellWidth*Math.max(a.length,2)+$e*2,this._config.deviceMaxTextureSize);this._tmpCanvas.width<l&&(this._tmpCanvas.width=l);let h=Math.min(this._config.deviceCellHeight+$e*4,this._textureSize);if(this._tmpCanvas.height<h&&(this._tmpCanvas.height=h),this._tmpCtx.save(),this._workAttributeData.fg=r,this._workAttributeData.bg=i,this._workAttributeData.extended.ext=s,!!this._workAttributeData.isInvisible())return Tt;let c=!!this._workAttributeData.isBold(),d=!!this._workAttributeData.isInverse(),u=!!this._workAttributeData.isDim(),g=!!this._workAttributeData.isItalic(),y=!!this._workAttributeData.isUnderline(),T=!!this._workAttributeData.isStrikethrough(),$=!!this._workAttributeData.isOverline(),O=this._workAttributeData.getFgColor(),R=this._workAttributeData.getFgColorMode(),S=this._workAttributeData.getBgColor(),x=this._workAttributeData.getBgColorMode();if(d){let C=O;O=S,S=C;let E=R;R=x,x=E}let M=this._getBackgroundColor(x,S,d,u);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=M.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";let A=c?this._config.fontWeightBold:this._config.fontWeight,U=g?"italic":"";this._tmpCtx.font=`${U} ${A} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=ri;let X=a.length===1&&wt(a.charCodeAt(0)),oe=a.length===1&&Oi(a.charCodeAt(0)),me=this._getForegroundColor(i,x,S,r,R,O,d,u,c,si(a.charCodeAt(0)));this._tmpCtx.fillStyle=me.css;let B=oe?0:$e*2,m=!1;this._config.customGlyphs!==!1&&(m=Ki(this._tmpCtx,a,B,B,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let _=!X,p;if(typeof t=="number"?p=this._unicodeService.wcwidth(t):p=this._unicodeService.getStringCellWidth(t),y){this._tmpCtx.save();let C=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),E=C%2===1?.5:0;if(this._tmpCtx.lineWidth=C,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())_=!1,this._tmpCtx.strokeStyle=`rgb(${Be.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{_=!1;let J=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&J<8&&(J+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(J).css}this._tmpCtx.beginPath();let j=B,k=Math.ceil(B+this._config.deviceCharHeight)-E-(o?C*2:0),Le=k+C,ae=k+C*2,de=this._workAttributeData.getUnderlineVariantOffset();for(let J=0;J<p;J++){this._tmpCtx.save();let z=j+J*this._config.deviceCellWidth,ee=j+(J+1)*this._config.deviceCellWidth,Ke=z+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(z,k),this._tmpCtx.lineTo(ee,k),this._tmpCtx.moveTo(z,ae),this._tmpCtx.lineTo(ee,ae);break;case 3:let Oe=C<=1?ae:Math.ceil(B+this._config.deviceCharHeight-C/2)-E,Ue=C<=1?k:Math.ceil(B+this._config.deviceCharHeight+C/2)-E,xt=new Path2D;xt.rect(z,k,this._config.deviceCellWidth,ae-k),this._tmpCtx.clip(xt),this._tmpCtx.moveTo(z-this._config.deviceCellWidth/2,Le),this._tmpCtx.bezierCurveTo(z-this._config.deviceCellWidth/2,Ue,z,Ue,z,Le),this._tmpCtx.bezierCurveTo(z,Oe,Ke,Oe,Ke,Le),this._tmpCtx.bezierCurveTo(Ke,Ue,ee,Ue,ee,Le),this._tmpCtx.bezierCurveTo(ee,Oe,ee+this._config.deviceCellWidth/2,Oe,ee+this._config.deviceCellWidth/2,Le);break;case 4:let Ne=de===0?0:de>=C?C*2-de:C-de;de>=C||Ne===0?(this._tmpCtx.setLineDash([Math.round(C),Math.round(C)]),this._tmpCtx.moveTo(z+Ne,k),this._tmpCtx.lineTo(ee,k)):(this._tmpCtx.setLineDash([Math.round(C),Math.round(C)]),this._tmpCtx.moveTo(z,k),this._tmpCtx.lineTo(z+Ne,k),this._tmpCtx.moveTo(z+Ne+C,k),this._tmpCtx.lineTo(ee,k)),de=Vi(ee-z,C,de);break;case 5:let bi=.6,yi=.3,Je=ee-z,Lt=Math.floor(bi*Je),bt=Math.floor(yi*Je),Mi=Je-Lt-bt;this._tmpCtx.setLineDash([Lt,bt,Mi]),this._tmpCtx.moveTo(z,k),this._tmpCtx.lineTo(ee,k);break;default:this._tmpCtx.moveTo(z,k),this._tmpCtx.lineTo(ee,k);break}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!m&&this._config.fontSize>=12&&!this._config.allowTransparency&&a!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";let J=this._tmpCtx.measureText(a);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in J&&J.actualBoundingBoxDescent>0){this._tmpCtx.save();let z=new Path2D;z.rect(j,k-Math.ceil(C/2),this._config.deviceCellWidth*p,ae-k+Math.ceil(C/2)),this._tmpCtx.clip(z),this._tmpCtx.lineWidth=this._config.devicePixelRatio*3,this._tmpCtx.strokeStyle=M.css,this._tmpCtx.strokeText(a,B,B+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if($){let C=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),E=C%2===1?.5:0;this._tmpCtx.lineWidth=C,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(B,B+E),this._tmpCtx.lineTo(B+this._config.deviceCharWidth*p,B+E),this._tmpCtx.stroke()}if(m||this._tmpCtx.fillText(a,B,B+this._config.deviceCharHeight),a==="_"&&!this._config.allowTransparency){let C=rt(this._tmpCtx.getImageData(B,B,this._config.deviceCellWidth,this._config.deviceCellHeight),M,me,_);if(C)for(let E=1;E<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=M.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(a,B,B+this._config.deviceCharHeight-E),C=rt(this._tmpCtx.getImageData(B,B,this._config.deviceCellWidth,this._config.deviceCellHeight),M,me,_),!!C);E++);}if(T){let C=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),E=this._tmpCtx.lineWidth%2===1?.5:0;this._tmpCtx.lineWidth=C,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(B,B+Math.floor(this._config.deviceCharHeight/2)-E),this._tmpCtx.lineTo(B+this._config.deviceCharWidth*p,B+Math.floor(this._config.deviceCharHeight/2)-E),this._tmpCtx.stroke()}this._tmpCtx.restore();let v=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height),b;if(this._config.allowTransparency?b=ms(v):b=rt(v,M,me,_),b)return Tt;let f=this._findGlyphBoundingBox(v,this._workBoundingBox,l,oe,m,B),w,L;for(;;){if(this._activePages.length===0){let C=this._createNewPage();w=C,L=C.currentRow,L.height=f.size.y;break}w=this._activePages[this._activePages.length-1],L=w.currentRow;for(let C of this._activePages)f.size.y<=C.currentRow.height&&(w=C,L=C.currentRow);for(let C=this._activePages.length-1;C>=0;C--)for(let E of this._activePages[C].fixedRows)E.height<=L.height&&f.size.y<=E.height&&(w=this._activePages[C],L=E);if(f.size.x>this._textureSize){this._overflowSizePage||(this._overflowSizePage=new st(this._document,this._config.deviceMaxTextureSize),this.pages.push(this._overflowSizePage),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(this._overflowSizePage.canvas)),w=this._overflowSizePage,L=this._overflowSizePage.currentRow,L.x+f.size.x>=w.canvas.width&&(L.x=0,L.y+=L.height,L.height=0);break}if(L.y+f.size.y>=w.canvas.height||L.height>f.size.y+2){let C=!1;if(w.currentRow.y+w.currentRow.height+f.size.y>=w.canvas.height){let E;for(let j of this._activePages)if(j.currentRow.y+j.currentRow.height+f.size.y<j.canvas.height){E=j;break}if(E)w=E;else if(Te.maxAtlasPages&&this._pages.length>=Te.maxAtlasPages&&L.y+f.size.y<=w.canvas.height&&L.height>=f.size.y&&L.x+f.size.x<=w.canvas.width)C=!0;else{let j=this._createNewPage();w=j,L=j.currentRow,L.height=f.size.y,C=!0}}C||(w.currentRow.height>0&&w.fixedRows.push(w.currentRow),L={x:0,y:w.currentRow.y+w.currentRow.height,height:f.size.y},w.fixedRows.push(L),w.currentRow={x:0,y:L.y+L.height,height:0})}if(L.x+f.size.x<=w.canvas.width)break;L===w.currentRow?(L.x=0,L.y+=L.height,L.height=0):w.fixedRows.splice(w.fixedRows.indexOf(L),1)}return f.texturePage=this._pages.indexOf(w),f.texturePosition.x=L.x,f.texturePosition.y=L.y,f.texturePositionClipSpace.x=L.x/w.canvas.width,f.texturePositionClipSpace.y=L.y/w.canvas.height,f.sizeClipSpace.x/=w.canvas.width,f.sizeClipSpace.y/=w.canvas.height,L.height=Math.max(L.height,f.size.y),L.x+=f.size.x,w.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),w.addGlyph(f),w.version++,f}_findGlyphBoundingBox(t,i,r,s,o,n){i.top=0;let a=s?this._config.deviceCellHeight:this._tmpCanvas.height,l=s?this._config.deviceCellWidth:r,h=!1;for(let c=0;c<a;c++){for(let d=0;d<l;d++){let u=c*this._tmpCanvas.width*4+d*4+3;if(t.data[u]!==0){i.top=c,h=!0;break}}if(h)break}i.left=0,h=!1;for(let c=0;c<n+l;c++){for(let d=0;d<a;d++){let u=d*this._tmpCanvas.width*4+c*4+3;if(t.data[u]!==0){i.left=c,h=!0;break}}if(h)break}i.right=l,h=!1;for(let c=n+l-1;c>=n;c--){for(let d=0;d<a;d++){let u=d*this._tmpCanvas.width*4+c*4+3;if(t.data[u]!==0){i.right=c,h=!0;break}}if(h)break}i.bottom=a,h=!1;for(let c=a-1;c>=0;c--){for(let d=0;d<l;d++){let u=c*this._tmpCanvas.width*4+d*4+3;if(t.data[u]!==0){i.bottom=c,h=!0;break}}if(h)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:i.right-i.left+1,y:i.bottom-i.top+1},sizeClipSpace:{x:i.right-i.left+1,y:i.bottom-i.top+1},offset:{x:-i.left+n+(s||o?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-i.top+n+(s||o?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}},st=class{constructor(e,t,i){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],i)for(let r of i)this._glyphs.push(...r.glyphs),this._usedPixels+=r._usedPixels;this.canvas=fi(e,t,t),this.ctx=W(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 rt(e,t,i,r){let s=t.rgba>>>24,o=t.rgba>>>16&255,n=t.rgba>>>8&255,a=i.rgba>>>24,l=i.rgba>>>16&255,h=i.rgba>>>8&255,c=Math.floor((Math.abs(s-a)+Math.abs(o-l)+Math.abs(n-h))/12),d=!0;for(let u=0;u<e.data.length;u+=4)e.data[u]===s&&e.data[u+1]===o&&e.data[u+2]===n||r&&Math.abs(e.data[u]-s)+Math.abs(e.data[u+1]-o)+Math.abs(e.data[u+2]-n)<c?e.data[u+3]=0:d=!1;return d}function ms(e){for(let t=0;t<e.data.length;t+=4)if(e.data[t+3]>0)return!1;return!0}function fi(e,t,i){let r=e.createElement("canvas");return r.width=t,r.height=i,r}function ws(e,t,i,r,s,o,n,a){let l={foreground:o.foreground,background:o.background,cursor:ie,cursorAccent:ie,selectionForeground:ie,selectionBackgroundTransparent:ie,selectionBackgroundOpaque:ie,selectionInactiveBackgroundTransparent:ie,selectionInactiveBackgroundOpaque:ie,overviewRulerBorder:ie,scrollbarSliderBackground:ie,scrollbarSliderHoverBackground:ie,scrollbarSliderActiveBackground:ie,ansi:o.ansi.slice(),contrastCache:o.contrastCache,halfContrastCache:o.halfContrastCache};return{customGlyphs:s.customGlyphs,devicePixelRatio:n,deviceMaxTextureSize:a,letterSpacing:s.letterSpacing,lineHeight:s.lineHeight,deviceCellWidth:e,deviceCellHeight:t,deviceCharWidth:i,deviceCharHeight:r,fontFamily:s.fontFamily,fontSize:s.fontSize,fontWeight:s.fontWeight,fontWeightBold:s.fontWeightBold,allowTransparency:s.allowTransparency,drawBoldTextInBrightColors:s.drawBoldTextInBrightColors,minimumContrastRatio:s.minimumContrastRatio,colors:l}}function Bt(e,t){for(let i=0;i<e.colors.ansi.length;i++)if(e.colors.ansi[i].rgba!==t.colors.ansi[i].rgba)return!1;return e.devicePixelRatio===t.devicePixelRatio&&e.customGlyphs===t.customGlyphs&&e.lineHeight===t.lineHeight&&e.letterSpacing===t.letterSpacing&&e.fontFamily===t.fontFamily&&e.fontSize===t.fontSize&&e.fontWeight===t.fontWeight&&e.fontWeightBold===t.fontWeightBold&&e.allowTransparency===t.allowTransparency&&e.deviceCharWidth===t.deviceCharWidth&&e.deviceCharHeight===t.deviceCharHeight&&e.drawBoldTextInBrightColors===t.drawBoldTextInBrightColors&&e.minimumContrastRatio===t.minimumContrastRatio&&e.colors.foreground.rgba===t.colors.foreground.rgba&&e.colors.background.rgba===t.colors.background.rgba}function Cs(e){return(e&50331648)===16777216||(e&50331648)===33554432}var re=[];function vi(e,t,i,r,s,o,n,a,l){let h=ws(r,s,o,n,t,i,a,l);for(let u=0;u<re.length;u++){let g=re[u],y=g.ownedBy.indexOf(e);if(y>=0){if(Bt(g.config,h))return g.atlas;g.ownedBy.length===1?(g.atlas.dispose(),re.splice(u,1)):g.ownedBy.splice(y,1);break}}for(let u=0;u<re.length;u++){let g=re[u];if(Bt(g.config,h))return g.ownedBy.push(e),g.atlas}let c=e._core,d={atlas:new Ce(document,h,c.unicodeService),config:h,ownedBy:[e]};return re.push(d),d.atlas}function Et(e){for(let t=0;t<re.length;t++){let i=re[t].ownedBy.indexOf(e);if(i!==-1){re[t].ownedBy.length===1?(re[t].atlas.dispose(),re.splice(t,1)):re[t].ownedBy.splice(i,1);break}}}var He=600,xs=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=He){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){let t=He-(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=He-(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})},He)},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 kt(e,t,i){let r=new t.ResizeObserver(s=>{let o=s.find(l=>l.target===e);if(!o)return;if(!("devicePixelContentBoxSize"in o)){r?.disconnect(),r=void 0;return}let n=o.devicePixelContentBoxSize[0].inlineSize,a=o.devicePixelContentBoxSize[0].blockSize;n>0&&a>0&&i(n,a)});try{r.observe(e,{box:["device-pixel-content-box"]})}catch{r.disconnect(),r=void 0}return Y(()=>r?.disconnect())}function Ls(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}var Ft=class pi extends Be{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new li,this.combinedData=""}static fromCharData(t){let i=new pi;return i.setFromCharData(t),i}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Ls(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 i=!1;if(t[1].length>2)i=!0;else if(t[1].length===2){let r=t[1].charCodeAt(0);if(55296<=r&&r<=56319){let s=t[1].charCodeAt(1);56320<=s&&s<=57343?this.content=(r-55296)*1024+s-56320+65536|t[2]<<22:i=!0}else i=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;i&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},mi=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]);function wi(e,t,i){let r=W(e.createProgram());if(e.attachShader(r,W(Pt(e,e.VERTEX_SHADER,t))),e.attachShader(r,W(Pt(e,e.FRAGMENT_SHADER,i))),e.linkProgram(r),e.getProgramParameter(r,e.LINK_STATUS))return r;console.error(e.getProgramInfoLog(r)),e.deleteProgram(r)}function Pt(e,t,i){let r=W(e.createShader(t));if(e.shaderSource(r,i),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS))return r;console.error(e.getShaderInfoLog(r)),e.deleteShader(r)}function bs(e,t){let i=Math.min(e.length*2,t),r=new Float32Array(i);for(let s=0;s<e.length;s++)r[s]=e[s];return r}var ys=class{constructor(e){this.texture=e,this.version=-1}},Ms=`#version 300 es
|
|
8
|
+
layout (location = 0) in vec2 a_unitquad;
|
|
9
|
+
layout (location = 1) in vec2 a_cellpos;
|
|
10
|
+
layout (location = 2) in vec2 a_offset;
|
|
11
|
+
layout (location = 3) in vec2 a_size;
|
|
12
|
+
layout (location = 4) in float a_texpage;
|
|
13
|
+
layout (location = 5) in vec2 a_texcoord;
|
|
14
|
+
layout (location = 6) in vec2 a_texsize;
|
|
15
|
+
|
|
16
|
+
uniform mat4 u_projection;
|
|
17
|
+
uniform vec2 u_resolution;
|
|
18
|
+
|
|
19
|
+
out vec2 v_texcoord;
|
|
20
|
+
flat out int v_texpage;
|
|
21
|
+
|
|
22
|
+
void main() {
|
|
23
|
+
vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
|
|
24
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
25
|
+
v_texpage = int(a_texpage);
|
|
26
|
+
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
|
27
|
+
}`;function Ss(e){let t="";for(let i=1;i<e;i++)t+=` else if (v_texpage == ${i}) { outColor = texture(u_texture[${i}], v_texcoord); }`;return`#version 300 es
|
|
28
|
+
precision lowp float;
|
|
29
|
+
|
|
30
|
+
in vec2 v_texcoord;
|
|
31
|
+
flat in int v_texpage;
|
|
32
|
+
|
|
33
|
+
uniform sampler2D u_texture[${e}];
|
|
34
|
+
|
|
35
|
+
out vec4 outColor;
|
|
36
|
+
|
|
37
|
+
void main() {
|
|
38
|
+
if (v_texpage == 0) {
|
|
39
|
+
outColor = texture(u_texture[0], v_texcoord);
|
|
40
|
+
} ${t}
|
|
41
|
+
}`}var xe=11,Ae=xe*Float32Array.BYTES_PER_ELEMENT,As=2,D=0,F,nt=0,Ie=0,Rs=class extends ne{constructor(e,t,i,r){super(),this._terminal=e,this._gl=t,this._dimensions=i,this._optionsService=r,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,W(s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS))),Ce.maxTextureSize=W(s.getParameter(s.MAX_TEXTURE_SIZE))),this._program=W(wi(s,Ms,Ss(Ce.maxAtlasPages))),this._register(Y(()=>s.deleteProgram(this._program))),this._projectionLocation=W(s.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=W(s.getUniformLocation(this._program,"u_resolution")),this._textureLocation=W(s.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=s.createVertexArray(),s.bindVertexArray(this._vertexArrayObject);let o=new Float32Array([0,0,1,0,0,1,1,1]),n=s.createBuffer();this._register(Y(()=>s.deleteBuffer(n))),s.bindBuffer(s.ARRAY_BUFFER,n),s.bufferData(s.ARRAY_BUFFER,o,s.STATIC_DRAW),s.enableVertexAttribArray(0),s.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);let a=new Uint8Array([0,1,2,3]),l=s.createBuffer();this._register(Y(()=>s.deleteBuffer(l))),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,l),s.bufferData(s.ELEMENT_ARRAY_BUFFER,a,s.STATIC_DRAW),this._attributesBuffer=W(s.createBuffer()),this._register(Y(()=>s.deleteBuffer(this._attributesBuffer))),s.bindBuffer(s.ARRAY_BUFFER,this._attributesBuffer),s.enableVertexAttribArray(2),s.vertexAttribPointer(2,2,s.FLOAT,!1,Ae,0),s.vertexAttribDivisor(2,1),s.enableVertexAttribArray(3),s.vertexAttribPointer(3,2,s.FLOAT,!1,Ae,2*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(3,1),s.enableVertexAttribArray(4),s.vertexAttribPointer(4,1,s.FLOAT,!1,Ae,4*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(4,1),s.enableVertexAttribArray(5),s.vertexAttribPointer(5,2,s.FLOAT,!1,Ae,5*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(5,1),s.enableVertexAttribArray(6),s.vertexAttribPointer(6,2,s.FLOAT,!1,Ae,7*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(6,1),s.enableVertexAttribArray(1),s.vertexAttribPointer(1,2,s.FLOAT,!1,Ae,9*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(1,1),s.useProgram(this._program);let h=new Int32Array(Ce.maxAtlasPages);for(let c=0;c<Ce.maxAtlasPages;c++)h[c]=c;s.uniform1iv(this._textureLocation,h),s.uniformMatrix4fv(this._projectionLocation,!1,mi),this._atlasTextures=[];for(let c=0;c<Ce.maxAtlasPages;c++){let d=new ys(W(s.createTexture()));this._register(Y(()=>s.deleteTexture(d.texture))),s.activeTexture(s.TEXTURE0+c),s.bindTexture(s.TEXTURE_2D,d.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[c]=d}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(e,t,i,r,s,o,n,a,l){this._updateCell(this._vertices.attributes,e,t,i,r,s,o,n,a,l)}_updateCell(e,t,i,r,s,o,n,a,l,h){if(D=(i*this._terminal.cols+t)*xe,r===0||r===void 0){e.fill(0,D,D+xe-1-As);return}this._atlas&&(a&&a.length>1?F=this._atlas.getRasterizedGlyphCombinedChar(a,s,o,n,!1,this._terminal.element):F=this._atlas.getRasterizedGlyph(r,s,o,n,!1,this._terminal.element),nt=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),s!==h&&F.offset.x>nt?(Ie=F.offset.x-nt,e[D]=-(F.offset.x-Ie)+this._dimensions.device.char.left,e[D+1]=-F.offset.y+this._dimensions.device.char.top,e[D+2]=(F.size.x-Ie)/this._dimensions.device.canvas.width,e[D+3]=F.size.y/this._dimensions.device.canvas.height,e[D+4]=F.texturePage,e[D+5]=F.texturePositionClipSpace.x+Ie/this._atlas.pages[F.texturePage].canvas.width,e[D+6]=F.texturePositionClipSpace.y,e[D+7]=F.sizeClipSpace.x-Ie/this._atlas.pages[F.texturePage].canvas.width,e[D+8]=F.sizeClipSpace.y):(e[D]=-F.offset.x+this._dimensions.device.char.left,e[D+1]=-F.offset.y+this._dimensions.device.char.top,e[D+2]=F.size.x/this._dimensions.device.canvas.width,e[D+3]=F.size.y/this._dimensions.device.canvas.height,e[D+4]=F.texturePage,e[D+5]=F.texturePositionClipSpace.x,e[D+6]=F.texturePositionClipSpace.y,e[D+7]=F.sizeClipSpace.x,e[D+8]=F.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&Gi(r,l,F.size.x,this._dimensions.device.cell.width)&&(e[D+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width))}clear(){let e=this._terminal,t=e.cols*e.rows*xe;this._vertices.count!==t?this._vertices.attributes=new Float32Array(t):this._vertices.attributes.fill(0);let i=0;for(;i<this._vertices.attributesBuffers.length;i++)this._vertices.count!==t?this._vertices.attributesBuffers[i]=new Float32Array(t):this._vertices.attributesBuffers[i].fill(0);this._vertices.count=t,i=0;for(let r=0;r<e.rows;r++)for(let s=0;s<e.cols;s++)this._vertices.attributes[i+9]=s/e.cols,this._vertices.attributes[i+10]=r/e.rows,i+=xe}handleResize(){let e=this._gl;e.useProgram(this._program),e.viewport(0,0,e.canvas.width,e.canvas.height),e.uniform2f(this._resolutionLocation,e.canvas.width,e.canvas.height),this.clear()}render(e){if(!this._atlas)return;let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;let i=this._vertices.attributesBuffers[this._activeBuffer],r=0;for(let s=0;s<e.lineLengths.length;s++){let o=s*this._terminal.cols*xe,n=this._vertices.attributes.subarray(o,o+e.lineLengths[s]*xe);i.set(n,r),r+=n.length}t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,i.subarray(0,r),t.STREAM_DRAW);for(let s=0;s<this._atlas.pages.length;s++)this._atlas.pages[s].version!==this._atlasTextures[s].version&&this._bindAtlasPageTexture(t,this._atlas,s);t.drawElementsInstanced(t.TRIANGLE_STRIP,4,t.UNSIGNED_BYTE,0,r/xe)}setAtlas(e){this._atlas=e;for(let t of this._atlasTextures)t.version=-1}_bindAtlasPageTexture(e,t,i){e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,this._atlasTextures[i].texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.pages[i].canvas),e.generateMipmap(e.TEXTURE_2D),this._atlasTextures[i].version=t.pages[i].version}setDimensions(e){this._dimensions=e}},Ts=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,i,r=!1){if(this.selectionStart=t,this.selectionEnd=i,!t||!i||t[0]===i[0]&&t[1]===i[1]){this.clear();return}let s=e.buffers.active.ydisp,o=t[1]-s,n=i[1]-s,a=Math.max(o,0),l=Math.min(n,e.rows-1);if(a>=e.rows||l<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=r,this.viewportStartRow=o,this.viewportEndRow=n,this.viewportCappedStartRow=a,this.viewportCappedEndRow=l,this.startCol=t[0],this.endCol=i[0]}isCellSelected(e,t,i){return this.hasSelection?(i-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&i>=this.viewportCappedStartRow&&t<this.endCol&&i<=this.viewportCappedEndRow:t<this.startCol&&i>=this.viewportCappedStartRow&&t>=this.endCol&&i<=this.viewportCappedEndRow:i>this.viewportStartRow&&i<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol):!1}};function Bs(){return new Ts}var Ze=4,je=1,Ye=2,ot=3,Es=2147483648,ks=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=Bs()}resize(e,t){let i=e*t*Ze;i!==this.cells.length&&(this.cells=new Uint32Array(i),this.lineLengths=new Uint32Array(t))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}},Fs=`#version 300 es
|
|
42
|
+
layout (location = 0) in vec2 a_position;
|
|
43
|
+
layout (location = 1) in vec2 a_size;
|
|
44
|
+
layout (location = 2) in vec4 a_color;
|
|
45
|
+
layout (location = 3) in vec2 a_unitquad;
|
|
46
|
+
|
|
47
|
+
uniform mat4 u_projection;
|
|
48
|
+
|
|
49
|
+
out vec4 v_color;
|
|
50
|
+
|
|
51
|
+
void main() {
|
|
52
|
+
vec2 zeroToOne = a_position + (a_unitquad * a_size);
|
|
53
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
54
|
+
v_color = a_color;
|
|
55
|
+
}`,Ps=`#version 300 es
|
|
56
|
+
precision lowp float;
|
|
57
|
+
|
|
58
|
+
in vec4 v_color;
|
|
59
|
+
|
|
60
|
+
out vec4 outColor;
|
|
61
|
+
|
|
62
|
+
void main() {
|
|
63
|
+
outColor = v_color;
|
|
64
|
+
}`,ve=8,at=ve*Float32Array.BYTES_PER_ELEMENT,$s=20*ve,$t=class{constructor(){this.attributes=new Float32Array($s),this.count=0}},ge=0,Dt=0,It=0,zt=0,Wt=0,Ot=0,Ut=0,Ds=class extends ne{constructor(e,t,i,r){super(),this._terminal=e,this._gl=t,this._dimensions=i,this._themeService=r,this._vertices=new $t,this._verticesCursor=new $t;let s=this._gl;this._program=W(wi(s,Fs,Ps)),this._register(Y(()=>s.deleteProgram(this._program))),this._projectionLocation=W(s.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=s.createVertexArray(),s.bindVertexArray(this._vertexArrayObject);let o=new Float32Array([0,0,1,0,0,1,1,1]),n=s.createBuffer();this._register(Y(()=>s.deleteBuffer(n))),s.bindBuffer(s.ARRAY_BUFFER,n),s.bufferData(s.ARRAY_BUFFER,o,s.STATIC_DRAW),s.enableVertexAttribArray(3),s.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let a=new Uint8Array([0,1,2,3]),l=s.createBuffer();this._register(Y(()=>s.deleteBuffer(l))),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,l),s.bufferData(s.ELEMENT_ARRAY_BUFFER,a,s.STATIC_DRAW),this._attributesBuffer=W(s.createBuffer()),this._register(Y(()=>s.deleteBuffer(this._attributesBuffer))),s.bindBuffer(s.ARRAY_BUFFER,this._attributesBuffer),s.enableVertexAttribArray(0),s.vertexAttribPointer(0,2,s.FLOAT,!1,at,0),s.vertexAttribDivisor(0,1),s.enableVertexAttribArray(1),s.vertexAttribPointer(1,2,s.FLOAT,!1,at,2*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(1,1),s.enableVertexAttribArray(2),s.vertexAttribPointer(2,4,s.FLOAT,!1,at,4*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(2,1),this._updateCachedColors(r.colors),this._register(this._themeService.onChangeColors(h=>{this._updateCachedColors(h),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(e){let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,mi),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,e.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,t.UNSIGNED_BYTE,0,e.count)}handleResize(){this._updateViewportRectangle()}setDimensions(e){this._dimensions=e}_updateCachedColors(e){this._bgFloat=this._colorToFloat32Array(e.background),this._cursorFloat=this._colorToFloat32Array(e.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(e){let t=this._terminal,i=this._vertices,r=1,s,o,n,a,l,h,c,d,u,g,y;for(s=0;s<t.rows;s++){for(n=-1,a=0,l=0,h=!1,o=0;o<t.cols;o++)c=(s*t.cols+o)*Ze,d=e.cells[c+je],u=e.cells[c+Ye],g=!!(u&67108864),(d!==a||u!==l&&(h||g))&&((a!==0||h&&l!==0)&&(y=r++*ve,this._updateRectangle(i,y,l,a,n,o,s)),n=o,a=d,l=u,h=g);(a!==0||h&&l!==0)&&(y=r++*ve,this._updateRectangle(i,y,l,a,n,t.cols,s))}i.count=r}updateCursor(e){let t=this._verticesCursor,i=e.cursor;if(!i||i.style==="block"){t.count=0;return}let r,s=0;(i.style==="bar"||i.style==="outline")&&(r=s++*ve,this._addRectangleFloat(t.attributes,r,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,i.style==="bar"?i.dpr*i.cursorWidth:i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),(i.style==="underline"||i.style==="outline")&&(r=s++*ve,this._addRectangleFloat(t.attributes,r,i.x*this._dimensions.device.cell.width,(i.y+1)*this._dimensions.device.cell.height-i.dpr,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat)),i.style==="outline"&&(r=s++*ve,this._addRectangleFloat(t.attributes,r,i.x*this._dimensions.device.cell.width,i.y*this._dimensions.device.cell.height,i.width*this._dimensions.device.cell.width,i.dpr,this._cursorFloat),r=s++*ve,this._addRectangleFloat(t.attributes,r,(i.x+i.width)*this._dimensions.device.cell.width-i.dpr,i.y*this._dimensions.device.cell.height,i.dpr,this._dimensions.device.cell.height,this._cursorFloat)),t.count=s}_updateRectangle(e,t,i,r,s,o,n){if(i&67108864)switch(i&50331648){case 16777216:case 33554432:ge=this._themeService.colors.ansi[i&255].rgba;break;case 50331648:ge=(i&16777215)<<8;break;default:ge=this._themeService.colors.foreground.rgba}else switch(r&50331648){case 16777216:case 33554432:ge=this._themeService.colors.ansi[r&255].rgba;break;case 50331648:ge=(r&16777215)<<8;break;default:ge=this._themeService.colors.background.rgba}e.attributes.length<t+4&&(e.attributes=bs(e.attributes,this._terminal.rows*this._terminal.cols*ve)),Dt=s*this._dimensions.device.cell.width,It=n*this._dimensions.device.cell.height,zt=(ge>>24&255)/255,Wt=(ge>>16&255)/255,Ot=(ge>>8&255)/255,Ut=1,this._addRectangle(e.attributes,t,Dt,It,(o-s)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,zt,Wt,Ot,Ut)}_addRectangle(e,t,i,r,s,o,n,a,l,h){e[t]=i/this._dimensions.device.canvas.width,e[t+1]=r/this._dimensions.device.canvas.height,e[t+2]=s/this._dimensions.device.canvas.width,e[t+3]=o/this._dimensions.device.canvas.height,e[t+4]=n,e[t+5]=a,e[t+6]=l,e[t+7]=h}_addRectangleFloat(e,t,i,r,s,o,n){e[t]=i/this._dimensions.device.canvas.width,e[t+1]=r/this._dimensions.device.canvas.height,e[t+2]=s/this._dimensions.device.canvas.width,e[t+3]=o/this._dimensions.device.canvas.height,e[t+4]=n[0],e[t+5]=n[1],e[t+6]=n[2],e[t+7]=n[3]}_colorToFloat32Array(e){return new Float32Array([(e.rgba>>24&255)/255,(e.rgba>>16&255)/255,(e.rgba>>8&255)/255,(e.rgba&255)/255])}},Is=class extends ne{constructor(e,t,i,r,s,o,n,a){super(),this._container=t,this._alpha=s,this._coreBrowserService=o,this._optionsService=n,this._themeService=a,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-${i}-layer`),this._canvas.style.zIndex=r.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(l=>{this._refreshCharAtlas(e,l),this.reset(e)})),this._register(Y(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=W(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(e){}handleFocus(e){}handleCursorMove(e){}handleGridChanged(e,t,i){}handleSelectionChanged(e,t,i,r=!1){}_setTransparency(e,t){if(t===this._alpha)return;let i=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,i),this._refreshCharAtlas(e,this._themeService.colors),this.handleGridChanged(e,0,e.rows-1)}_refreshCharAtlas(e,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=vi(e,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(e,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(e,this._themeService.colors)}_fillBottomLineAtCells(e,t,i=1){this._ctx.fillRect(e*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,i*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(e,t,i,r){this._alpha?this._ctx.clearRect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,r*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,r*this._deviceCellHeight))}_fillCharTrueColor(e,t,i,r){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline=ri,this._clipCell(i,r,t.getWidth()),this._ctx.fillText(t.getChars(),i*this._deviceCellWidth+this._deviceCharLeft,r*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(e,t,i){this._ctx.beginPath(),this._ctx.rect(e*this._deviceCellWidth,t*this._deviceCellHeight,i*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(e,t,i){let r=t?e.options.fontWeightBold:e.options.fontWeight;return`${i?"italic":""} ${r} ${e.options.fontSize*this._coreBrowserService.dpr}px ${e.options.fontFamily}`}},zs=class extends Is{constructor(e,t,i,r,s,o,n){super(i,e,"link",t,!0,s,o,n),this._register(r.onShowLinkUnderline(a=>this._handleShowLinkUnderline(a))),this._register(r.onHideLinkUnderline(a=>this._handleHideLinkUnderline(a)))}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&&Cs(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()}},ye=typeof window=="object"?window:globalThis,vt=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new P,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new P,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,i){if(this.getZoomLevel(i)===t)return;let r=this.getWindowId(i);this.mapWindowIdToZoomLevel.set(r,t),this._onDidChangeZoomLevel.fire(r)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,i){this.mapWindowIdToZoomFactor.set(this.getWindowId(i),t)}setFullscreen(t,i){if(this.isFullscreen(i)===t)return;let r=this.getWindowId(i);this.mapWindowIdToFullScreen.set(r,t),this._onDidChangeFullscreen.fire(r)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};vt.INSTANCE=new vt;var Ci=vt;function Ws(e,t,i){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",i)}Ci.INSTANCE.onDidChangeZoomLevel;Ci.INSTANCE.onDidChangeFullscreen;var Fe=typeof navigator=="object"?navigator.userAgent:"";Fe.indexOf("Firefox")>=0;Fe.indexOf("AppleWebKit")>=0;var Os=Fe.indexOf("Chrome")>=0;!Os&&Fe.indexOf("Safari")>=0;Fe.indexOf("Electron/")>=0;Fe.indexOf("Android")>=0;var ht=!1;if(typeof ye.matchMedia=="function"){let e=ye.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=ye.matchMedia("(display-mode: fullscreen)");ht=e.matches,Ws(ye,e,({matches:i})=>{ht&&t.matches||(ht=i)})}var Ee="en",lt=!1,xi=!1,Ve,Xe=Ee,Nt=Ee,Us,fe,Se=globalThis,te;typeof Se.vscode<"u"&&typeof Se.vscode.process<"u"?te=Se.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(te=process);var Ns=typeof te?.versions?.electron=="string",qs=Ns&&te?.type==="renderer";if(typeof te=="object"){te.platform,te.platform,lt=te.platform==="linux",lt&&te.env.SNAP&&te.env.SNAP_REVISION,te.env.CI||te.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Ve=Ee,Xe=Ee;let e=te.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);Ve=t.userLocale,Nt=t.osLocale,Xe=t.resolvedLanguage||Ee,Us=t.languagePack?.translationsConfigFile}catch{}xi=!0}else typeof navigator=="object"&&!qs?(fe=navigator.userAgent,fe.indexOf("Windows")>=0,fe.indexOf("Macintosh")>=0,(fe.indexOf("Macintosh")>=0||fe.indexOf("iPad")>=0||fe.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,lt=fe.indexOf("Linux")>=0,fe?.indexOf("Mobi")>=0,Xe=globalThis._VSCODE_NLS_LANGUAGE||Ee,Ve=navigator.language.toLowerCase(),Nt=Ve):console.error("Unable to resolve platform.");var qt=xi,le=fe,we=Xe,Gs;(e=>{function t(){return we}e.value=t;function i(){return we.length===2?we==="en":we.length>=3?we[0]==="e"&&we[1]==="n"&&we[2]==="-":!1}e.isDefaultVariant=i;function r(){return we==="en"}e.isDefault=r})(Gs||={});var Hs=typeof Se.postMessage=="function"&&!Se.importScripts;(()=>{if(Hs){let e=[];Se.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let r=0,s=e.length;r<s;r++){let o=e[r];if(o.id===i.data.vscodeScheduleAsyncWork){e.splice(r,1),o.callback();return}}});let t=0;return i=>{let r=++t;e.push({id:r,callback:i}),Se.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();var Vs=!!(le&&le.indexOf("Chrome")>=0);le&&le.indexOf("Firefox")>=0;!Vs&&le&&le.indexOf("Safari")>=0;le&&le.indexOf("Edg/")>=0;le&&le.indexOf("Android")>=0;var Re=typeof navigator=="object"?navigator:{};qt||document.queryCommandSupported&&document.queryCommandSupported("copy")||Re&&Re.clipboard&&Re.clipboard.writeText,qt||Re&&Re.clipboard&&Re.clipboard.readText;var Ct=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}},ct=new Ct,Gt=new Ct,Ht=new Ct;new Array(230);var js;(e=>{function t(a){return ct.keyCodeToStr(a)}e.toString=t;function i(a){return ct.strToKeyCode(a)}e.fromString=i;function r(a){return Gt.keyCodeToStr(a)}e.toUserSettingsUS=r;function s(a){return Ht.keyCodeToStr(a)}e.toUserSettingsGeneral=s;function o(a){return Gt.strToKeyCode(a)||Ht.strToKeyCode(a)}e.fromUserSettings=o;function n(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 ct.keyCodeToStr(a)}e.toElectronAccelerator=n})(js||={});var Li=Object.freeze(function(e,t){let i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}),Ys;(e=>{function t(i){return i===e.None||i===e.Cancelled||i instanceof Xs?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:pe.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Li})})(Ys||={});var Xs=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?Li:(this._emitter||(this._emitter=new P),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Zs;(e=>{async function t(r){let s,o=await Promise.all(r.map(n=>n.then(a=>a,a=>{s||(s=a)})));if(typeof s<"u")throw s;return o}e.settled=t;function i(r){return new Promise(async(s,o)=>{try{await r(s,o)}catch(n){o(n)}})}e.withAsyncBody=i})(Zs||={});var Vt=class se{static fromArray(t){return new se(i=>{i.emitMany(t)})}static fromPromise(t){return new se(async i=>{i.emitMany(await t)})}static fromPromises(t){return new se(async i=>{await Promise.all(t.map(async r=>i.emitOne(await r)))})}static merge(t){return new se(async i=>{await Promise.all(t.map(async r=>{for await(let s of r)i.emitOne(s)}))})}constructor(t,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new P,queueMicrotask(async()=>{let r={emitOne:s=>this.emitOne(s),emitMany:s=>this.emitMany(s),reject:s=>this.reject(s)};try{await Promise.resolve(t(r)),this.resolve()}catch(s){this.reject(s)}finally{r.emitOne=void 0,r.emitMany=void 0,r.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await pe.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,i){return new se(async r=>{for await(let s of t)r.emitOne(i(s))})}map(t){return se.map(this,t)}static filter(t,i){return new se(async r=>{for await(let s of t)i(s)&&r.emitOne(s)})}filter(t){return se.filter(this,t)}static coalesce(t){return se.filter(t,i=>!!i)}coalesce(){return se.coalesce(this)}static async toPromise(t){let i=[];for await(let r of t)i.push(r);return i}toPromise(){return se.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};Vt.EMPTY=Vt.fromArray([]);var{getWindow:Qs}=(function(){let e=new Map,t={window:ye,disposables:new ke};e.set(ye.vscodeWindowId,t);let i=new P,r=new P,s=new P;function o(n,a){return(typeof n=="number"?e.get(n):void 0)??(a?t:void 0)}return{onDidRegisterWindow:i.event,onWillUnregisterWindow:s.event,onDidUnregisterWindow:r.event,registerWindow(n){if(e.has(n.vscodeWindowId))return ne.None;let a=new ke,l={window:n,disposables:a.add(new ke)};return e.set(n.vscodeWindowId,l),a.add(Y(()=>{e.delete(n.vscodeWindowId),r.fire(n)})),a.add(pt(n,Js.BEFORE_UNLOAD,()=>{s.fire(n)})),i.fire(l),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(n){return n.vscodeWindowId},hasWindow(n){return e.has(n)},getWindowById:o,getWindow(n){let a=n;if(a?.ownerDocument?.defaultView)return a.ownerDocument.defaultView.window;let l=n;return l?.view?l.view.window:ye},getDocument(n){return Qs(n).document}}})(),Ks=class{constructor(e,t,i,r){this._node=e,this._type=t,this._handler=i,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 pt(e,t,i,r){return new Ks(e,t,i,r)}var Js={BEFORE_UNLOAD:"beforeunload"},er=class extends ne{constructor(e,t,i,r,s,o,n,a,l){super(),this._terminal=e,this._characterJoinerService=t,this._charSizeService=i,this._coreBrowserService=r,this._coreService=s,this._decorationService=o,this._optionsService=n,this._themeService=a,this._cursorBlinkStateManager=new Pe,this._charAtlasDisposable=this._register(new Pe),this._observerDisposable=this._register(new Pe),this._model=new ks,this._workCell=new Ft,this._workCell2=new Ft,this._rectangleRenderer=this._register(new Pe),this._glyphRenderer=this._register(new Pe),this._onChangeTextureAtlas=this._register(new P),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new P),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new P),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new P),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new P),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");let h={antialias:!1,depth:!1,preserveDrawingBuffer:l};if(this._gl=this._canvas.getContext("webgl2",h),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new ji(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new zs(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,n,this._themeService)],this.dimensions=Hi(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(n.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(pt(this._canvas,"webglcontextlost",c=>{console.log("webglcontextlost event received"),c.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(c)},3e3)})),this._register(pt(this._canvas,"webglcontextrestored",c=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,Et(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=kt(this._canvas,this._coreBrowserService.window,(c,d)=>this._setCanvasDevicePixelDimensions(c,d)),this._register(this._coreBrowserService.onWindowChange(c=>{this._observerDisposable.value=kt(this._canvas,c,(d,u)=>this._setCanvasDevicePixelDimensions(d,u))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(Y(()=>{for(let c of this._renderLayers)c.dispose();this._canvas.parentElement?.removeChild(this._canvas),Et(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(e,t){this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(let i of this._renderLayers)i.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 e of this._renderLayers)e.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let e of this._renderLayers)e.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(e,t,i){for(let r of this._renderLayers)r.handleSelectionChanged(this._terminal,e,t,i);this._model.selection.update(this._core,e,t,i),this._requestRedrawViewport()}handleCursorMove(){for(let e of this._renderLayers)e.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new Ds(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new Rs(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 e=vi(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!==e&&(this._onChangeTextureAtlas.fire(e.pages[0].canvas),this._charAtlasDisposable.value=Jt(pe.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),pe.forward(e.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=e,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(e){this._model.clear(),e&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(let e of this._renderLayers)e.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(e,t){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 i of this._renderLayers)i.handleGridChanged(this._terminal,e,t);!this._glyphRenderer.value||!this._rectangleRenderer.value||(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(e,t),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 xs(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(e,t){let i=this._core,r=this._workCell,s,o,n,a,l,h,c=0,d=!0,u,g,y,T,$,O,R,S,x;e=jt(e,i.rows-1,0),t=jt(t,i.rows-1,0);let M=this._coreService.decPrivateModes.cursorStyle??i.options.cursorStyle??"block",A=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,U=A-i.buffer.ydisp,X=Math.min(this._terminal.buffer.active.cursorX,i.cols-1),oe=-1,me=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let B=!1;for(o=e;o<=t;o++)for(n=o+i.buffer.ydisp,a=i.buffer.lines.get(n),this._model.lineLengths[o]=0,y=A===n,c=0,l=this._characterJoinerService.getJoinedCharacters(n),S=0;S<i.cols;S++){if(s=this._cellColorResolver.result.bg,a.loadCell(S,r),S===0&&(s=this._cellColorResolver.result.bg),h=!1,d=S>=c,u=S,l.length>0&&S===l[0][0]&&d){g=l.shift();let m=this._model.selection.isCellSelected(this._terminal,g[0],n);for(R=g[0]+1;R<g[1];R++)d&&=m===this._model.selection.isCellSelected(this._terminal,R,n);d&&=!y||X<g[0]||X>=g[1],d?(h=!0,r=new tr(r,a.translateToString(!0,g[0],g[1]),g[1]-g[0]),u=g[1]-1):c=g[1]}if(T=r.getChars(),$=r.getCode(),R=(o*i.cols+S)*Ze,this._cellColorResolver.resolve(r,S,n,this.dimensions.device.cell.width),me&&n===A&&(S===X&&(this._model.cursor={x:X,y:U,width:r.getWidth(),style:this._coreBrowserService.isFocused?M:i.options.cursorInactiveStyle,cursorWidth:i.options.cursorWidth,dpr:this._devicePixelRatio},oe=X+r.getWidth()-1),S>=X&&S<=oe&&(this._coreBrowserService.isFocused&&M==="block"||this._coreBrowserService.isFocused===!1&&i.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)),$!==0&&(this._model.lineLengths[o]=S+1),!(this._model.cells[R]===$&&this._model.cells[R+je]===this._cellColorResolver.result.bg&&this._model.cells[R+Ye]===this._cellColorResolver.result.fg&&this._model.cells[R+ot]===this._cellColorResolver.result.ext)&&(B=!0,T.length>1&&($|=Es),this._model.cells[R]=$,this._model.cells[R+je]=this._cellColorResolver.result.bg,this._model.cells[R+Ye]=this._cellColorResolver.result.fg,this._model.cells[R+ot]=this._cellColorResolver.result.ext,O=r.getWidth(),this._glyphRenderer.value.updateCell(S,o,$,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,T,O,s),h)){for(r=this._workCell,S++;S<=u;S++)x=(o*i.cols+S)*Ze,this._glyphRenderer.value.updateCell(S,o,0,0,0,0,zi,0,0),this._model.cells[x]=0,this._model.cells[x+je]=this._cellColorResolver.result.bg,this._model.cells[x+Ye]=this._cellColorResolver.result.fg,this._model.cells[x+ot]=this._cellColorResolver.result.ext;S--}}B&&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(e,t){this._canvas.width===e&&this._canvas.height===t||(this._canvas.width=e,this._canvas.height=t,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let e=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:e,end:e})}},tr=class extends Be{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function jt(e,t,i=0){return Math.max(Math.min(e,t),i)}var Yt="di$target",Xt="di$dependencies",dt=new Map;function ce(e){if(dt.has(e))return dt.get(e);let t=function(i,r,s){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");ir(t,i,s)};return t._id=e,dt.set(e,t),t}function ir(e,t,i){t[Yt]===t?t[Xt].push({id:e,index:i}):(t[Xt]=[{id:e,index:i}],t[Yt]=t)}ce("BufferService");ce("CoreMouseService");ce("CoreService");ce("CharsetService");ce("InstantiationService");ce("LogService");var sr=ce("OptionsService");ce("OscLinkService");ce("UnicodeService");ce("DecorationService");var rr={trace:0,debug:1,info:2,warn:3,error:4,off:5},nr="xterm.js: ",Zt=class extends ne{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=rr[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,i){this._evalLazyOptionalParams(i),e.call(console,(this._optionsService.options.logger?"":nr)+t,...i)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};Zt=Si([Ai(0,sr)],Zt);var ar=class extends ne{constructor(e){if(ii&&Ii()<16){let t={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",t))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=e,this._onChangeTextureAtlas=this._register(new P),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new P),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new P),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new P),this.onContextLoss=this._onContextLoss.event}activate(e){let t=e._core;if(!e.element){this._register(t.onWillOpen(()=>this.activate(e)));return}this._terminal=e;let i=t.coreService,r=t.optionsService,s=t,o=s._renderService,n=s._characterJoinerService,a=s._charSizeService,l=s._coreBrowserService,h=s._decorationService;s._logService;let c=s._themeService;this._renderer=this._register(new er(e,n,a,l,i,h,r,c,this._preserveDrawingBuffer)),this._register(pe.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(pe.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(pe.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(pe.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),o.setRenderer(this._renderer),this._register(Y(()=>{if(this._terminal._core._store._isDisposed)return;let d=this._terminal._core._renderService;d.setRenderer(this._terminal._core._createRenderer()),d.handleResize(e.cols,e.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}};export{ar as WebglAddon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--text-xs:11px;--text-xs--line-height:calc(1 / .75);--text-sm:12px;--text-sm--line-height:calc(1.25 / .875);--text-base:13px;--text-base--line-height: 1.5 ;--text-lg:16px;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:20px;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:24px;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--tracking-normal:0em;--tracking-wider:.05em;--leading-tight:1.25;--radius-sm:.25rem;--radius-lg:.5rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-accent:#3358d4;--color-status-red:#d4544f}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.top-1{top:calc(var(--spacing) * 1)}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.top-8{top:calc(var(--spacing) * 8)}.right-0{right:calc(var(--spacing) * 0)}.right-1{right:calc(var(--spacing) * 1)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-8{bottom:calc(var(--spacing) * 8)}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-auto{margin:auto}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.-mt-0\.5{margin-top:calc(var(--spacing) * -.5)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-5{margin-top:calc(var(--spacing) * 5)}.-mr-1{margin-right:calc(var(--spacing) * -1)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-24{height:calc(var(--spacing) * 24)}.h-\[16px\]{height:16px}.h-full{height:100%}.h-screen{height:100vh}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-\[calc\(100vh-32px\)\]{max-height:calc(100vh - 32px)}.max-h-screen{max-height:100vh}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-\[78px\]{min-height:78px}.min-h-\[200px\]{min-height:200px}.min-h-\[360px\]{min-height:360px}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-24{width:calc(var(--spacing) * 24)}.w-\[280px\]{width:280px}.w-\[380px\]{width:380px}.w-\[420px\]{width:420px}.w-\[440px\]{width:440px}.w-\[480px\]{width:480px}.w-\[560px\]{width:560px}.w-\[760px\]{width:760px}.w-full{width:100%}.w-px{width:1px}.max-w-\[380px\]{max-width:380px}.max-w-\[400px\]{max-width:400px}.max-w-\[480px\]{max-width:480px}.max-w-\[calc\(100vw-32px\)\]{max-width:calc(100vw - 32px)}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[16px\]{min-width:16px}.min-w-\[260px\]{min-width:260px}.min-w-\[320px\]{min-width:320px}.min-w-\[480px\]{min-width:480px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-rotate-90{rotate:-90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[var\(--border-bright\)\]{border-color:var(--border-bright)}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pr-7{padding-right:calc(var(--spacing) * 7)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-2\.5{padding-bottom:calc(var(--spacing) * 2.5)}.pl-3{padding-left:calc(var(--spacing) * 3)}.text-center{text-align:center}.text-left{text-align:left}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--color-accent)}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.group-open\:rotate-0:is(:where(.group):is([open],:popover-open,:open) *){rotate:0deg}@media(hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.last\:mb-0:last-child{margin-bottom:calc(var(--spacing) * 0)}.focus-within\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-\[var\(--ring-focus\)\]:focus-within{--tw-ring-color:var(--ring-focus)}.focus-within\:outline-none:focus-within{--tw-outline-style:none;outline-style:none}@media(hover:hover){.hover\:text-status-red:hover{color:var(--color-status-red)}}.focus\:border-\[var\(--accent\)\]:focus{border-color:var(--accent)}.focus\:opacity-100:focus{opacity:1}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-45:disabled{opacity:.45}.disabled\:opacity-50:disabled{opacity:.5}}:root{--bg-0:#171717;--bg-1:#1b1b1b;--bg-2:#1d1d1d;--bg-3:#222;--bg-crust:#0e0e0e;--bg-overlay:#000000b8;--bg-elevated:#222;--charcoal-775:#1c1e21;--charcoal-750:#212327;--charcoal-700:#272a2e;--charcoal-650:#2c3034;--charcoal-600:#3b3e45;--background-dimmed:var(--bg-1);--background-bright:var(--bg-2);--grid-dimmed:var(--border);--grid-bright:var(--border-bright);--border:#1d1d1d;--border-bright:#484848;--text-primary:#ebebeb;--text-secondary:#b3b3b3;--text-tertiary:#9c9c9c;--text-light:#9c9c9c;--text-extra-light:#6f6f6f;--text-inverted:#1b1b1b;--text-danger:var(--status-red);--accent:#3358d4;--accent-hover:#5072dd;--status-green:#54a271;--status-orange:#e67333;--status-red:#d4544f;--status-blue:#3358d4;--status-purple:#8551c0;--status-gold:#ffeb38;--icon-xs:12px;--icon-sm:14px;--icon-md:16px;--icon-lg:20px;--radius-sm:4px;--radius-md:6px;--radius-lg:8px;--radius-xl:12px;--ease-out:cubic-bezier(.16, 1, .3, 1);--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-modal:cubic-bezier(.32, .72, 0, 1);--ease-overshoot:cubic-bezier(.34, 1.56, .64, 1);--dur-fast:.1s;--dur-base:.15s;--dur-slow:.28s;--ring-focus:#5e6ad273;--shadow-tint:41 47 61;--shadow-elev-2:0 4px 12px rgba(var(--shadow-tint), .4), 0 1px 2px rgba(var(--shadow-tint), .3);--shadow-card:0 0 0 1px rgba(var(--shadow-tint), .12);--shadow-card-hover:0 0 0 1px var(--accent)}@supports (color:color-mix(in lab,red,red)){:root{--shadow-card-hover:0 0 0 1px color-mix(in oklab, var(--accent) 35%, transparent)}}:root{color-scheme:dark}::selection{background:var(--accent)}@supports (color:color-mix(in lab,red,red)){::selection{background:color-mix(in oklab,var(--accent) 22%,transparent)}}::selection{color:var(--text-primary)}html,body{background:var(--bg-0);height:100%;color:var(--text-primary);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;caret-color:var(--accent);margin:0;padding:0;font-family:Inter,sans-serif;font-size:13px;line-height:1.5;overflow:hidden}#root{height:100%}.mono{font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,monospace}.bg-0{background:var(--bg-0)}.bg-1{background:var(--bg-1)}.bg-2{background:var(--bg-2)}.bg-3{background:var(--bg-3)}.bg-crust{background:var(--bg-crust)}.text-pri{color:var(--text-primary)}.text-sec{color:var(--text-secondary)}.text-ter{color:var(--text-tertiary)}.border-d{border-color:var(--border)}.border-b1{border-color:var(--border-bright)}.accent{color:var(--accent)}.bg-accent{background:var(--accent)}.scroll-y{overflow-y:auto}.scroll-y::-webkit-scrollbar{width:8px;height:8px}.input::-webkit-scrollbar{width:8px;height:8px}.xterm-viewport::-webkit-scrollbar{width:8px;height:8px}.scroll-y::-webkit-scrollbar-thumb{background:var(--bg-3);border-radius:4px}.input::-webkit-scrollbar-thumb{background:var(--bg-3);border-radius:4px}.xterm-viewport::-webkit-scrollbar-thumb{background:var(--bg-3);border-radius:4px}.scroll-y::-webkit-scrollbar-thumb:hover{background:var(--border-bright)}.input::-webkit-scrollbar-thumb:hover{background:var(--border-bright)}.xterm-viewport::-webkit-scrollbar-thumb:hover{background:var(--border-bright)}.scroll-y::-webkit-scrollbar-track{background:0 0}.input::-webkit-scrollbar-track{background:0 0}.xterm-viewport::-webkit-scrollbar-track{background:0 0}.scroll-y,.input,.xterm-viewport{scrollbar-width:thin;scrollbar-color:var(--bg-3) transparent}.xterm.focus{box-shadow:inset 0 0 0 1px var(--accent)}@supports (color:color-mix(in lab,red,red)){.xterm.focus{box-shadow:inset 0 0 0 1px color-mix(in oklab,var(--accent) 35%,transparent)}}.ws-row{transition:background var(--dur-fast) ease,color var(--dur-fast) ease;cursor:pointer;border-radius:4px;margin:0 6px;position:relative}.ws-row:hover{background:#ffffff0d}.ws-row.active{background:#ffffff12}.ws-row-delete:hover{background:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.ws-row-delete:hover{background:color-mix(in oklab,var(--status-red) 14%,transparent)}}.ws-add{transition:background var(--dur-fast) ease,border-color var(--dur-fast) ease,color var(--dur-fast) ease;background:0 0}.ws-add:hover{background:var(--accent)}@supports (color:color-mix(in lab,red,red)){.ws-add:hover{background:color-mix(in oklab,var(--accent) 6%,transparent)}}.ws-add:hover{border-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.ws-add:hover{border-color:color-mix(in oklab,var(--accent) 50%,var(--border-bright))}}.ws-add:hover{color:var(--text-primary)}.workspace-sidebar{container:ws-sidebar/inline-size}@container ws-sidebar (max-width:140px){.ws-row__path,.ws-add__label{display:none}.ws-add{padding-left:8px;padding-right:8px}}@container ws-sidebar (max-width:96px){.ws-row{display:none}.ws-avatar-cell{display:flex}.ws-sidebar-title__text,.ws-sidebar-count,.ws-row-delete{display:none}.ws-add--inline{border-radius:4px;width:32px;height:32px;margin-top:6px;margin-left:auto;margin-right:auto;padding:0}}.workspace-sidebar-resizer{z-index:20;cursor:col-resize;touch-action:none;border:0;outline:none;width:8px;height:100%;margin:0;position:absolute;top:0;right:-4px}.workspace-sidebar-resizer:before{content:"";width:1px;transition:background var(--dur-fast) ease,box-shadow var(--dur-fast) ease;background:0 0;position:absolute;top:0;bottom:0;left:3px}.workspace-sidebar-resizer:hover:before,.workspace-sidebar-resizer:focus-visible:before,.workspace-sidebar-resizer[data-resizing=true]:before{background:var(--accent)}@supports (color:color-mix(in lab,red,red)){.workspace-sidebar-resizer:hover:before,.workspace-sidebar-resizer:focus-visible:before,.workspace-sidebar-resizer[data-resizing=true]:before{background:color-mix(in oklab,var(--accent) 68%,var(--border-bright))}}.workspace-sidebar-resizer:hover:before,.workspace-sidebar-resizer:focus-visible:before,.workspace-sidebar-resizer[data-resizing=true]:before{box-shadow:0 0 0 2px var(--accent)}@supports (color:color-mix(in lab,red,red)){.workspace-sidebar-resizer:hover:before,.workspace-sidebar-resizer:focus-visible:before,.workspace-sidebar-resizer[data-resizing=true]:before{box-shadow:0 0 0 2px color-mix(in oklab,var(--accent) 12%,transparent)}}.dot{vertical-align:middle;border-radius:50%;width:7px;height:7px;display:inline-block}.pulse-green{background:var(--status-green);animation:1.6s ease-in-out infinite hive-pulse}.pulse-orange{background:var(--status-orange);animation:1.6s ease-in-out infinite hive-pulse}@keyframes hive-pulse{0%,to{opacity:1}50%{opacity:.45}}.status-dot{vertical-align:middle;width:8px;height:8px;transition:background var(--dur-base) ease;border-radius:50%;flex-shrink:0;display:inline-block}.status-dot--working{background:var(--status-green);animation:1.8s ease-in-out infinite hive-ripple-green}.status-dot--idle{background:var(--text-tertiary);box-shadow:0 0 0 2px var(--text-tertiary)}@supports (color:color-mix(in lab,red,red)){.status-dot--idle{box-shadow:0 0 0 2px color-mix(in oklab,var(--text-tertiary) 18%,transparent)}}.status-dot--queued{background:var(--status-orange);animation:1.8s ease-in-out infinite hive-ripple-orange}.status-dot--stopped{background:var(--status-red);box-shadow:0 0 0 2px var(--status-red)}@supports (color:color-mix(in lab,red,red)){.status-dot--stopped{box-shadow:0 0 0 2px color-mix(in oklab,var(--status-red) 22%,transparent)}}.status-dot--stopped{opacity:.85}@keyframes hive-ripple-green{0%,to{box-shadow:0 0 0 3px color-mix(in oklab,var(--status-green) 22%,transparent)}50%{box-shadow:0 0 0 7px color-mix(in oklab,var(--status-green) 6%,transparent)}}@keyframes hive-ripple-orange{0%,to{box-shadow:0 0 0 3px color-mix(in oklab,var(--status-orange) 22%,transparent)}50%{box-shadow:0 0 0 7px color-mix(in oklab,var(--status-orange) 6%,transparent)}}@media(prefers-reduced-motion:reduce){.status-dot--working,.status-dot--queued{animation:none}}.pill{letter-spacing:.1px;white-space:nowrap;border:1px solid #0000;border-radius:999px;align-items:center;gap:6px;padding:2px 8px;font-size:11px;font-weight:500;display:inline-flex}.pill--green{color:var(--status-green)}@supports (color:color-mix(in lab,red,red)){.pill--green{color:color-mix(in oklab,var(--status-green) 55%,white)}}.pill--green{background:var(--status-green)}@supports (color:color-mix(in lab,red,red)){.pill--green{background:color-mix(in oklab,var(--status-green) 14%,transparent)}}.pill--green{border-color:var(--status-green)}@supports (color:color-mix(in lab,red,red)){.pill--green{border-color:color-mix(in oklab,var(--status-green) 28%,transparent)}}.pill--orange{color:var(--status-orange)}@supports (color:color-mix(in lab,red,red)){.pill--orange{color:color-mix(in oklab,var(--status-orange) 65%,white)}}.pill--orange{background:var(--status-orange)}@supports (color:color-mix(in lab,red,red)){.pill--orange{background:color-mix(in oklab,var(--status-orange) 12%,transparent)}}.pill--orange{border-color:var(--status-orange)}@supports (color:color-mix(in lab,red,red)){.pill--orange{border-color:color-mix(in oklab,var(--status-orange) 28%,transparent)}}.pill--red{color:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.pill--red{color:color-mix(in oklab,var(--status-red) 50%,white)}}.pill--red{background:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.pill--red{background:color-mix(in oklab,var(--status-red) 14%,transparent)}}.pill--red{border-color:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.pill--red{border-color:color-mix(in oklab,var(--status-red) 30%,transparent)}}.pill--neutral{color:var(--text-secondary);background:var(--bg-3);border-color:var(--border)}.pill--ghost{color:var(--text-tertiary);background:0 0;border-color:#0000;padding-left:0;padding-right:0}.icon-btn{height:28px;color:var(--text-secondary);border:1px solid var(--border-bright);background:var(--bg-2);cursor:pointer;border-radius:4px;align-items:center;gap:6px;padding:0 10px;font-size:13px;font-weight:500;transition:background .1s,border-color .1s,color .1s;display:inline-flex}.icon-btn:hover{background:var(--bg-3);color:var(--text-primary)}.icon-btn:active{background:var(--bg-3)}.icon-btn:focus-visible{box-shadow:0 0 0 3px var(--accent);outline:none}@supports (color:color-mix(in lab,red,red)){.icon-btn:focus-visible{box-shadow:0 0 0 3px color-mix(in oklab,var(--accent) 30%,transparent)}}.icon-btn:disabled{opacity:.4;cursor:not-allowed}.icon-btn--primary{background:var(--accent);color:#fff;border-color:var(--accent)}.icon-btn--primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);color:#fff}.icon-btn--danger{color:var(--status-red);border-color:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.icon-btn--danger{border-color:color-mix(in oklab,var(--status-red) 30%,var(--border-bright))}}.icon-btn--danger:hover{background:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.icon-btn--danger:hover{background:color-mix(in oklab,var(--status-red) 14%,transparent)}}.icon-btn--danger:hover{border-color:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.icon-btn--danger:hover{border-color:color-mix(in oklab,var(--status-red) 40%,transparent)}}.icon-btn--danger:hover{color:var(--status-red)}.icon-btn--danger-solid{background:var(--status-red);color:#fff;border-color:var(--status-red)}.icon-btn--danger-solid:hover{background:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.icon-btn--danger-solid:hover{background:color-mix(in oklab,var(--status-red) 88%,#000)}}.icon-btn--danger-solid:hover{border-color:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.icon-btn--danger-solid:hover{border-color:color-mix(in oklab,var(--status-red) 88%,#000)}}.icon-btn--danger-solid:hover{color:#fff}.icon-btn--tertiary{background:var(--charcoal-700);border-color:#0000}.icon-btn--tertiary:hover{background:var(--charcoal-600);border-color:#0000}.icon-btn--ghost{box-shadow:none;color:var(--text-tertiary);background:0 0;border-color:#0000}.icon-btn--ghost:hover{background:var(--charcoal-700);color:var(--text-primary);box-shadow:none;border-color:#0000}.icon-btn--link{box-shadow:none;color:var(--text-secondary);background:0 0;border-color:#0000;padding-left:2px;padding-right:2px}.icon-btn--link:hover{color:var(--text-primary);text-underline-offset:3px;background:0 0;border-color:#0000;text-decoration:underline}.card{background:var(--bg-elevated);border:1px solid var(--border);border-radius:4px;transition:border-color .1s,background .1s;position:relative}.card--interactive{cursor:pointer}.card--interactive:hover{border-color:var(--border-bright)}.selectable-card{background:var(--bg-2);border:1px solid var(--border);border-radius:var(--radius-sm);text-align:left;cursor:pointer;transition:border-color var(--dur-fast) ease,background var(--dur-fast) ease,box-shadow var(--dur-fast) ease;position:relative}.selectable-card--dashed{border-style:dashed;border-color:var(--border-bright)}.selectable-card:hover:not([aria-pressed=true]){border-color:var(--border-bright);background:var(--accent)}@supports (color:color-mix(in lab,red,red)){.selectable-card:hover:not([aria-pressed=true]){background:color-mix(in oklab,var(--accent) 3%,var(--bg-2))}}.selectable-card:focus-visible{box-shadow:0 0 0 3px var(--accent);outline:none}@supports (color:color-mix(in lab,red,red)){.selectable-card:focus-visible{box-shadow:0 0 0 3px color-mix(in oklab,var(--accent) 30%,transparent)}}.selectable-card[aria-pressed=true]{border-color:var(--accent);background:var(--accent)}@supports (color:color-mix(in lab,red,red)){.selectable-card[aria-pressed=true]{background:color-mix(in oklab,var(--accent) 14%,var(--bg-2))}}.role-badge{letter-spacing:.3px;text-transform:uppercase;white-space:nowrap;border-radius:3px;flex-shrink:0;padding:1px 6px;font-size:11px;font-weight:500;display:inline-block}.role-badge--coder{background:var(--status-blue)}@supports (color:color-mix(in lab,red,red)){.role-badge--coder{background:color-mix(in oklab,var(--status-blue) 22%,var(--bg-2))}}.role-badge--coder{color:var(--status-blue)}.role-badge--tester{background:var(--status-orange)}@supports (color:color-mix(in lab,red,red)){.role-badge--tester{background:color-mix(in oklab,var(--status-orange) 22%,var(--bg-2))}}.role-badge--tester{color:var(--status-orange)}.role-badge--reviewer{background:var(--status-purple)}@supports (color:color-mix(in lab,red,red)){.role-badge--reviewer{background:color-mix(in oklab,var(--status-purple) 22%,var(--bg-2))}}.role-badge--reviewer{color:var(--status-purple)}.role-badge--orch,.role-badge--custom{background:var(--bg-3);color:var(--text-secondary)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.drawer{transition:transform .25s ease-out;transform:translate(100%)}.drawer.open{transform:translate(0)}.task-progress-thin{background:var(--bg-3);border-radius:999px;height:2px;overflow:hidden}.task-progress-thin>span{border-radius:inherit;background:var(--accent);height:100%;transition:width .15s;display:block}.task-drawer__header{flex-shrink:0;align-items:center;gap:12px;padding:14px 16px 12px;display:flex}.task-drawer__progress{margin:0 16px 8px}.task-list{flex-direction:column;gap:2px;display:flex}.task-node{position:relative}.task-row{min-width:0;transition:background-color var(--dur-fast) ease;border-radius:6px;align-items:flex-start;gap:12px;padding:8px 10px 8px 12px;display:flex;position:relative}.task-row:before{content:"";width:2px;transition:background-color var(--dur-fast) ease;background:0 0;border-radius:999px;position:absolute;top:8px;bottom:8px;left:0}.task-row:hover{background:var(--bg-2)}.task-row:hover:before,.task-row:focus-within:before{background:var(--accent)}@supports (color:color-mix(in lab,red,red)){.task-row:hover:before,.task-row:focus-within:before{background:color-mix(in oklab,var(--accent) 60%,transparent)}}.task-row__indicator{border-radius:999px;flex-shrink:0;justify-content:center;align-items:center;width:20px;height:20px;margin-top:2px;display:inline-flex}.task-row__title{word-break:break-word;font-size:14px;line-height:1.4}.task-row__checkbox-cell{cursor:pointer;flex-shrink:0;align-items:flex-start;display:inline-flex}.task-row__input{width:100%;color:var(--text-primary);background:0 0;border:none;outline:none;padding:0;font-family:inherit;font-size:14px;line-height:1.4}.task-row__input::placeholder{color:var(--text-tertiary)}.task-row__actions{opacity:0;transition:opacity var(--dur-fast) ease;align-items:center;gap:2px;margin-left:4px;display:inline-flex}.task-row:hover .task-row__actions,.task-row:focus-within .task-row__actions{opacity:1}.task-row__action{width:22px;height:22px;color:var(--text-tertiary);cursor:pointer;transition:background-color var(--dur-fast) ease,color var(--dur-fast) ease;background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;display:inline-flex}.task-row__action:hover{background:var(--bg-3);color:var(--text-primary)}.task-row__action--danger:hover{background:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.task-row__action--danger:hover{background:color-mix(in oklab,var(--status-red) 18%,transparent)}}.task-row__action--danger:hover{color:var(--status-red)}.task-row--child-input{cursor:default}.task-row--child-input:hover{background:var(--bg-2)}.task-children{margin-left:22px;padding-left:14px;position:relative}.task-children:before{content:"";background:var(--border-bright);width:1px;position:absolute;top:4px;bottom:8px;left:0}.task-status-open{color:var(--text-tertiary);background:var(--bg-3)}.task-status-done{color:var(--status-green);background:var(--status-green)}@supports (color:color-mix(in lab,red,red)){.task-status-done{background:color-mix(in oklab,var(--status-green) 13%,transparent)}}.task-owner{height:20px;color:var(--owner-tone,var(--status-blue));border-radius:999px;align-items:center;gap:4px;padding:0 8px;font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;display:inline-flex}@supports (color:color-mix(in lab,red,red)){.task-owner{color:color-mix(in oklab,var(--owner-tone,var(--status-blue)) 35%,white)}}.task-owner{background:var(--owner-tone,var(--status-blue))}@supports (color:color-mix(in lab,red,red)){.task-owner{background:color-mix(in oklab,var(--owner-tone,var(--status-blue)) 16%,transparent)}}.task-owner{border:1px solid var(--owner-tone,var(--status-blue))}@supports (color:color-mix(in lab,red,red)){.task-owner{border:1px solid color-mix(in oklab,var(--owner-tone,var(--status-blue)) 30%,transparent)}}.task-mention{border:1px solid var(--status-blue);align-items:center;height:20px;display:inline-flex}@supports (color:color-mix(in lab,red,red)){.task-mention{border:1px solid color-mix(in oklab,var(--status-blue) 28%,transparent)}}.task-mention{color:var(--status-blue);border-radius:999px;padding:0 8px}@supports (color:color-mix(in lab,red,red)){.task-mention{color:color-mix(in oklab,var(--status-blue) 30%,white)}}.task-mention{background:var(--status-blue)}@supports (color:color-mix(in lab,red,red)){.task-mention{background:color-mix(in oklab,var(--status-blue) 14%,transparent)}}.task-mention{font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px}.task-child-count{height:18px;color:var(--text-tertiary);background:var(--bg-3);border-radius:999px;align-items:center;gap:1px;padding:0 6px 0 4px;font-size:11px;display:inline-flex}.task-add-toggle{text-align:left;width:100%;color:var(--text-tertiary);cursor:pointer;transition:background-color var(--dur-fast) ease,color var(--dur-fast) ease;border-radius:6px;align-items:center;gap:12px;padding:8px 10px 8px 12px;font-size:13px;display:flex}.task-add-toggle:hover{background:var(--bg-2);color:var(--text-secondary)}.task-add-toggle__icon{border:1px dashed var(--border-bright);width:20px;height:20px;color:var(--text-tertiary);border-radius:999px;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.task-add-input{background:var(--bg-2);border-radius:6px;align-items:center;gap:12px;padding:8px 10px 8px 12px;display:flex}.task-add-input__icon{background:var(--bg-3);width:20px;height:20px;color:var(--text-secondary);border-radius:999px;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.task-add-input__field{min-width:0;color:var(--text-primary);background:0 0;outline:none;flex:1;font-size:14px}.task-add-input__field::placeholder{color:var(--text-tertiary)}.task-completed-toggle{text-align:left;text-transform:uppercase;letter-spacing:.04em;width:100%;color:var(--text-tertiary);cursor:pointer;transition:background-color var(--dur-fast) ease,color var(--dur-fast) ease;border-radius:6px;align-items:center;gap:6px;padding:6px 10px;font-size:11px;display:flex}.task-completed-toggle:hover{background:var(--bg-2);color:var(--text-secondary)}.modal-backdrop,.app-overlay{background:var(--bg-overlay)}.elev-1{box-shadow:0 2px 6px rgba(var(--shadow-tint),.36)}.elev-2{box-shadow:0 12px 28px rgba(var(--shadow-tint),.46),0 4px 10px rgba(var(--shadow-tint),.36)}.input{width:100%;color:var(--text-primary);background:var(--bg-1);border:1px solid var(--border);border-radius:4px;outline:none;padding:8px 12px;font-size:13px;transition:border-color .1s,box-shadow .1s;display:block}.input::placeholder{color:var(--text-tertiary);font-weight:500}.input:hover:not(:focus){border-color:var(--border-bright)}.input:focus-visible{border-color:var(--accent);box-shadow:none}.input--readonly{background:var(--bg-0);color:var(--text-secondary);cursor:default}.input--error{border-color:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.input--error{border-color:color-mix(in oklab,var(--status-red) 50%,var(--border-bright))}}.input--error:hover:not(:focus){border-color:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.input--error:hover:not(:focus){border-color:color-mix(in oklab,var(--status-red) 65%,var(--border-bright))}}.input--error:focus-visible{border-color:var(--status-red);box-shadow:none}@keyframes dialog-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes dialog-overlay-out{0%{opacity:1}to{opacity:0}}@keyframes dialog-pop-in{0%{opacity:0;transform:translate(-50%,-50%)}to{opacity:1;transform:translate(-50%,-50%)}}@keyframes dialog-pop-out{0%{opacity:1;transform:translate(-50%,-50%)}to{opacity:0;transform:translate(-50%,-50%)}}@keyframes dialog-scale-pop-in{0%{opacity:0}to{opacity:1}}@keyframes dialog-scale-pop-out{0%{opacity:1}to{opacity:0}}@keyframes drawer-pop-in{0%{opacity:0;transform:translate(24px)}to{opacity:1;transform:translate(0)}}@keyframes drawer-pop-out{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(24px)}}.app-overlay[data-state=open]{animation:dialog-overlay-in .18s var(--ease-out)}.app-overlay[data-state=closed]{animation:dialog-overlay-out .14s var(--ease-in)}.dialog-pop[data-state=open]{animation:dialog-pop-in .3s var(--ease-out) both}.dialog-pop[data-state=closed]{animation:dialog-pop-out .14s var(--ease-in) both}.dialog-scale-pop[data-state=open]{animation:dialog-scale-pop-in .3s var(--ease-out) both}.dialog-scale-pop[data-state=closed]{animation:dialog-scale-pop-out .14s var(--ease-in) both}.drawer-pop[data-state=open]{animation:drawer-pop-in .22s var(--ease-modal) both}.drawer-pop[data-state=closed]{animation:drawer-pop-out .16s var(--ease-in) both}@media(prefers-reduced-motion:reduce){.app-overlay[data-state=open],.app-overlay[data-state=closed],.dialog-pop[data-state=open],.dialog-pop[data-state=closed],.dialog-scale-pop[data-state=open],.dialog-scale-pop[data-state=closed],.drawer-pop[data-state=open],.drawer-pop[data-state=closed]{animation:none}}.tooltip{z-index:70;color:var(--text-primary);background:var(--bg-elevated);border:1px solid var(--border-bright);box-shadow:var(--shadow-elev-2);border-radius:4px;max-width:260px;padding:4px 8px;font-size:11px;font-weight:500;line-height:1.4;animation:.1s dialog-overlay-in}.toast-progress-bar{opacity:.5;transform-origin:0;pointer-events:none;height:2px;animation:linear forwards toast-progress;position:absolute;bottom:0;left:0;right:0}.toast:hover .toast-progress-bar{animation-play-state:paused}@keyframes toast-progress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@media(prefers-reduced-motion:reduce){.toast-progress-bar{opacity:0;animation:none}}@keyframes toast-in{0%{opacity:0;transform:translateY(16px)scale(.95)}to{opacity:1;transform:translateY(0)scale(1)}}.toast-pop{animation:toast-in .32s var(--ease-overshoot)}@media(prefers-reduced-motion:reduce){.toast-pop{animation:none}}.float-action{border:1px solid var(--border-bright);background:var(--bg-1);width:30px;height:30px;color:var(--text-secondary);cursor:pointer;transition:background var(--dur-fast) ease,color var(--dur-fast) ease,border-color var(--dur-fast) ease;border-radius:4px;justify-content:center;align-items:center;display:inline-flex}.float-action:hover{background:var(--bg-2)}@supports (color:color-mix(in lab,red,red)){.float-action:hover{background:color-mix(in oklab,var(--bg-2) 85%,transparent)}}.float-action:hover{border-color:var(--border-bright);color:var(--text-primary)}.float-action:active{background:var(--bg-3)}@supports (color:color-mix(in lab,red,red)){.float-action:active{background:color-mix(in oklab,var(--bg-3) 90%,transparent)}}.float-action:focus-visible{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent);outline:none}@supports (color:color-mix(in lab,red,red)){.float-action:focus-visible{box-shadow:0 0 0 3px color-mix(in oklab,var(--accent) 30%,transparent)}}.float-action:disabled{opacity:.5;cursor:not-allowed}.float-action[data-variant=primary]{background:var(--accent);color:#fff;border-color:var(--accent)}.float-action[data-variant=primary]:hover{background:var(--accent-hover)}.float-action[data-variant=danger]{color:var(--status-red)}.float-action[data-variant=danger]:hover{background:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.float-action[data-variant=danger]:hover{background:color-mix(in oklab,var(--status-red) 18%,transparent)}}.float-action[data-variant=danger]:hover{border-color:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.float-action[data-variant=danger]:hover{border-color:color-mix(in oklab,var(--status-red) 50%,var(--border-bright))}}.float-action[data-variant=danger]:hover{color:var(--status-red)}.float-action-divider{background:var(--border-bright);width:1px;height:18px;margin:0 4px}@supports (color:color-mix(in lab,red,red)){.float-action-divider{background:color-mix(in oklab,var(--border-bright) 80%,transparent)}}.worker-card-grid{grid-template-columns:repeat(auto-fill,minmax(min(200px,100%),1fr));gap:10px;display:grid}.worker-card-shell{position:relative}.worker-card-shell[data-status=stopped] .worker-card{opacity:.65;filter:saturate(.6);transition:opacity var(--dur-fast) ease,filter var(--dur-fast) ease}.worker-card-shell[data-status=stopped]:hover .worker-card,.worker-card-shell[data-status=stopped]:focus-within .worker-card{opacity:1;filter:none}.worker-card__status{align-self:flex-start}.worker-card-shell:hover .worker-card__actions,.worker-card-shell:focus-within .worker-card__actions{opacity:1;pointer-events:auto;transform:translateY(0)}.worker-card__actions{opacity:0;transition:opacity var(--dur-fast) ease,transform var(--dur-fast) ease;pointer-events:none;z-index:2;align-items:center;gap:4px;display:flex;position:absolute;top:8px;right:8px;transform:translateY(-2px)}.worker-card__action{border:1px solid var(--border-bright);background:var(--bg-2);width:24px;height:24px;color:var(--text-secondary);cursor:pointer;transition:background var(--dur-fast) ease,border-color var(--dur-fast) ease,color var(--dur-fast) ease;border-radius:4px;justify-content:center;align-items:center;display:inline-flex}.worker-card__action:hover{background:var(--bg-3);border-color:var(--text-tertiary);color:var(--text-primary)}.worker-card__action:active{background:var(--charcoal-700)}.worker-card__action:disabled{opacity:.5;cursor:not-allowed}.worker-card__action[data-variant=primary]{background:var(--accent);border-color:var(--accent);color:#fff}.worker-card__action[data-variant=primary]:hover{background:var(--accent-hover);border-color:var(--accent-hover)}.worker-card__action[data-variant=danger]:hover{background:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.worker-card__action[data-variant=danger]:hover{background:color-mix(in oklab,var(--status-red) 14%,transparent)}}.worker-card__action[data-variant=danger]:hover{border-color:var(--status-red)}@supports (color:color-mix(in lab,red,red)){.worker-card__action[data-variant=danger]:hover{border-color:color-mix(in oklab,var(--status-red) 40%,var(--border-bright))}}.worker-card__action[data-variant=danger]:hover{color:var(--status-red)}.modal-resize-handle{cursor:ew-resize;z-index:6;-webkit-user-select:none;user-select:none;touch-action:none;outline:none;width:8px;position:absolute;top:0;bottom:0}.modal-resize-handle--left{left:-4px}.modal-resize-handle--right{right:-4px}.modal-resize-handle:before{content:"";width:1px;transition:background var(--dur-fast) ease,box-shadow var(--dur-fast) ease;background:0 0;position:absolute;top:0;bottom:0}.modal-resize-handle--left:before{left:4px}.modal-resize-handle--right:before{right:4px}.modal-resize-handle:hover:before,.modal-resize-handle[data-resizing]:before{background:var(--accent)}@supports (color:color-mix(in lab,red,red)){.modal-resize-handle:hover:before,.modal-resize-handle[data-resizing]:before{background:color-mix(in oklab,var(--accent) 68%,var(--border-bright))}}.modal-resize-handle:hover:before,.modal-resize-handle[data-resizing]:before{box-shadow:0 0 0 2px var(--accent)}@supports (color:color-mix(in lab,red,red)){.modal-resize-handle:hover:before,.modal-resize-handle[data-resizing]:before{box-shadow:0 0 0 2px color-mix(in oklab,var(--accent) 12%,transparent)}}.pane-splitter{cursor:col-resize;z-index:5;-webkit-user-select:none;user-select:none;touch-action:none;background:0 0;outline:none;width:8px;position:absolute;top:0;bottom:0}.pane-splitter:before{content:"";width:1px;transition:background var(--dur-fast) ease,box-shadow var(--dur-fast) ease;background:0 0;position:absolute;top:0;bottom:0;left:3px}.pane-splitter:hover:before,.pane-splitter:focus-visible:before,.pane-splitter[data-dragging]:before{background:var(--accent)}@supports (color:color-mix(in lab,red,red)){.pane-splitter:hover:before,.pane-splitter:focus-visible:before,.pane-splitter[data-dragging]:before{background:color-mix(in oklab,var(--accent) 68%,var(--border-bright))}}.pane-splitter:hover:before,.pane-splitter:focus-visible:before,.pane-splitter[data-dragging]:before{box-shadow:0 0 0 2px var(--accent)}@supports (color:color-mix(in lab,red,red)){.pane-splitter:hover:before,.pane-splitter:focus-visible:before,.pane-splitter[data-dragging]:before{box-shadow:0 0 0 2px color-mix(in oklab,var(--accent) 12%,transparent)}}.cli-select{background:var(--bg-1);border:1px solid var(--border);border-radius:4px;align-items:center;transition:border-color .1s,box-shadow .1s;display:flex;position:relative}.cli-select:hover{border-color:var(--border-bright)}.cli-select:focus-within{border-color:var(--accent);box-shadow:none}.cli-select__leading{color:var(--text-tertiary);pointer-events:none;position:absolute;left:10px}.cli-select__trailing{color:var(--text-secondary);pointer-events:none;transition:transform var(--dur-fast) ease;position:absolute;right:10px}.cli-select:focus-within .cli-select__trailing{transform:translateY(1px)}.cli-select__field{appearance:none;width:100%;color:var(--text-primary);cursor:pointer;background:0 0;border:0;outline:none;padding:8px 32px;font-family:inherit;font-size:13px;font-weight:500}.cli-select__field:disabled{color:var(--text-tertiary);cursor:not-allowed}.cli-select__field option{background:var(--bg-elevated);color:var(--text-primary)}.cli-select__field--button{cursor:pointer;justify-content:flex-start;align-items:center;display:inline-flex}.cli-select__menu{z-index:60;background:var(--bg-elevated);border:1px solid var(--border-bright);box-shadow:var(--shadow-elev-2);max-height:240px;animation:dialog-scale-pop-in .12s var(--ease-out) both;transform-origin:top;border-radius:4px;margin:0;padding:4px;list-style:none;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow-y:auto}.cli-select__option{width:100%;color:var(--text-primary);text-align:left;cursor:pointer;transition:background var(--dur-fast) ease;background:0 0;border-radius:4px;align-items:center;gap:8px;padding:6px 10px;font-size:13px;display:flex}.cli-select__option:hover,.cli-select__option:focus-visible{background:var(--accent)}@supports (color:color-mix(in lab,red,red)){.cli-select__option:hover,.cli-select__option:focus-visible{background:color-mix(in oklab,var(--accent) 16%,transparent)}}.cli-select__option:hover,.cli-select__option:focus-visible{outline:none}.cli-select__option[aria-selected=true]{color:var(--accent)}.cli-select__check{color:var(--accent);flex-shrink:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;inset:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;inset:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}
|