|
|
(self.webpackChunk=self.webpackChunk||[]).push([[49716],{42922:function(ce,B,o){"use strict";o.d(B,{Z:function(){return _}});var C=o(87462),d=o(67294),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},h=y,u=o(84089),l=function(s,c){return d.createElement(u.Z,(0,C.Z)({},s,{ref:c,icon:h}))},_=d.forwardRef(l)},63237:function(ce,B,o){"use strict";o.d(B,{Z:function(){return _}});var C=o(87462),d=o(67294),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},h=y,u=o(84089),l=function(s,c){return d.createElement(u.Z,(0,C.Z)({},s,{ref:c,icon:h}))},_=d.forwardRef(l)},99569:function(ce,B,o){"use strict";o.d(B,{Z:function(){return _}});var C=o(87462),d=o(67294),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},h=y,u=o(84089),l=function(s,c){return d.createElement(u.Z,(0,C.Z)({},s,{ref:c,icon:h}))},_=d.forwardRef(l)},72395:function(ce,B,o){"use strict";o.d(B,{Z:function(){return _}});var C=o(87462),d=o(67294),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},h=y,u=o(84089),l=function(s,c){return d.createElement(u.Z,(0,C.Z)({},s,{ref:c,icon:h}))},_=d.forwardRef(l)},53978:function(ce,B,o){"use strict";o.d(B,{Z:function(){return _}});var C=o(87462),d=o(67294),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},h=y,u=o(84089),l=function(s,c){return d.createElement(u.Z,(0,C.Z)({},s,{ref:c,icon:h}))},_=d.forwardRef(l)},77969:function(ce,B){"use strict";B.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},7621:function(ce,B,o){"use strict";o.d(B,{Z:function(){return h}});var C=o(35973),d={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},y=o(67294),h=({message:u,className:l,children:_,style:i={}})=>y.createElement("div",{className:`custom-spinner ${d.idsRingWrapper} ${l}`},y.createElement("div",{className:d.ldsRing},y.createElement("div",null),y.createElement("div",null),y.createElement("div",null),y.createElement("div",null)),u?y.createElement("p",{style:i},u):null,_,y.createElement(C.Outlet,null))},38658:function(ce,B,o){"use strict";o.d(B,{Z:function(){return l}});var C=o(67294),d={flex_box_center:"flex_box_center___Gc4dd",flex_space_between:"flex_space_between___K2f1v",flex_box_vertical_center:"flex_box_vertical_center___pupRp",flex_box_center_end:"flex_box_center_end___UDLRC",flex_box_column:"flex_box_column___a5uDo",result:"result___gu5zt",title:"title___xrnx2",left:"left___IAxp9",leftNode:"leftNode___HL8fG",right:"right___ZXYmw",rightNode:"rightNode___jYL5_"},y=o(94184),h=o.n(y),l=({className:_,style:i={},leftNode:s,leftTitle:c="\u81EA\u6D4B\u8F93\u5165",rightNode:t,rightTitle:n="\u8FD0\u884C\u7ED3\u679C"})=>C.createElement("div",{className:h()(d.result,_),style:i},C.createElement("div",{className:d.left},C.createElement("div",{className:d.title},C.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),C.createElement("span",null,c)),C.createElement("div",{className:d.leftNode},s)),C.createElement("div",{className:d.right},C.createElement("div",{className:d.title},C.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),C.createElement("span",null,n)),C.createElement("div",{className:d.rightNode},t)))},57560:function(ce,B,o){"use strict";o.r(B),o.d(B,{default:function(){return e}});var C=o(67294),d=o(77969),y=o(11320),h=o(35973),u=o(57953),l=o(33227),_=o(72971),i=o(36295),s=o(19575),c=o(27484),t=o.n(c),n=(r,a,f)=>new Promise((E,w)=>{var S=g=>{try{x(f.next(g))}catch(p){w(p)}},v=g=>{try{x(f.throw(g))}catch(p){w(p)}},x=g=>g.done?E(g.value):Promise.resolve(g.value).then(S,v);x((f=f.apply(r,a)).next())}),e=()=>{const{submitId:r,id:a}=(0,h.useParams)(),[f,E]=(0,C.useState)(void 0);console.log((0,h.useLocation)(),33);const w=(0,h.useLocation)();function S(){var H;h.history.push(`/problems/${a}/oj/${(H=w==null?void 0:w.query)==null?void 0:H.backId}?tab=1`)}(0,C.useEffect)(()=>((0,h.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,h.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,h.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,h.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,C.useEffect)(()=>{document.title="\u5728\u7EBF\u5237\u9898"}),(0,C.useEffect)(()=>{r&&function(){return n(this,null,function*(){const U=yield(0,l.X6)(r);E(U.data)})}()},[r]);const{status:v,created_at:x,code:g,name:p,language:m,pass_sets_count:b,set_count:D,error_msg:R,output:k,input:I,expected_output:N,execute_memory:M,user:F,execute_time:A,input_file_url:O,output_file_url:L,is_file:P,expected_output_file_url:T}=f||{};return C.createElement(u.Z,{spinning:!f,delay:500},C.createElement("div",{className:"record-detail-info"},f?C.createElement(C.Fragment,null,C.createElement("header",{className:d.Z.header},C.createElement("div",null,C.createElement("img",{src:`${y.Z.IMG_SERVER}/images/${F.image_url}`,alt:"user",width:30}),C.createElement("span",null,F.name)),C.createElement("h2",null," ",p," "),C.createElement("button",{className:"ant-btn",onClick:S,style:{border:"1px solid #bacffe",color:"#3061d0"}},"\u8FD4\u56DE\u8BE5\u9898")),C.createElement("div",{className:"record-detail-body"},C.createElement("h2",null," \u63D0\u4EA4\u8BB0\u5F55 "),C.createElement("ul",{className:"record-info"},C.createElement("li",null," \u72B6\u6001\uFF1A",C.createElement("span",{className:v===0?"c-green":"c-red"},_.Im[v])," "),C.createElement("li",null," \u63D0\u4EA4\u65F6\u95F4\uFF1A",C.createElement("span",null,t()(x).format("YYYY-MM-DD HH:mm:ss"))," "),C.createElement("li",null," \u8BED\u8A00\uFF1A",C.createElement("span",null,m)," "),C.createElement("li",null," \u6267\u884C\u7528\u65F6\uFF1A",C.createElement("span",null,A*1e3,"ms")," "),C.createElement("li",null," ",`${b} / ${D} \u4E2A\u901A\u8FC7\u7684\u6D4B\u8BD5\u7528\u4F8B`," ")),(0,_.gZ)({status:v,error_msg:R,execute_time:A,output:k,input:I,expected_output:N,input_file_url:O,output_file_url:L,is_file:P,expected_output_file_url:T}),C.createElement("h2",null," \u63D0\u4EA4\u7684\u5185\u5BB9 "),C.createElement(i.ZP,{height:"200px",width:"100%",language:m==null?void 0:m.toLocaleLowerCase(),value:s.Base64.decode(g),options:{readOnly:!0}}))):null))}},72971:function(ce,B,o){"use strict";o.d(B,{Im:function(){return R},ZP:function(){return A},gZ:function(){return M}});var C=o(67294),d=o(69677),y=o(71577),h=o(42922),u=o(53978),l=o(94189),_=o(19575),i=o(7621),s=o(35598),c=o(28706),t=o(38658),n=o(12320),e=o(94184),r=o.n(e),a=o(67294),f=Object.defineProperty,E=Object.defineProperties,w=Object.getOwnPropertyDescriptors,S=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,g=(O,L,P)=>L in O?f(O,L,{enumerable:!0,configurable:!0,writable:!0,value:P}):O[L]=P,p=(O,L)=>{for(var P in L||(L={}))v.call(L,P)&&g(O,P,L[P]);if(S)for(var P of S(L))x.call(L,P)&&g(O,P,L[P]);return O},m=(O,L)=>E(O,w(L));const{TextArea:b}=d.default,D={visible:!1,tabIndex:"0"},R={[l.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[l.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[l.h.OK]:"\u8C03\u8BD5\u901A\u8FC7",2:"\u8C03\u8BD5\u8D85\u65F6",3:"\u8C03\u8BD5pod\u5931\u8D25",4:"\u7F16\u8BD1\u5931\u8D25",5:"\u6267\u884C\u5931\u8D25"};var k=(O=>(O[O.SET_VISIBLE=0]="SET_VISIBLE",O[O.SET_TABINDEX=1]="SET_TABINDEX",O))(k||{});function I(O,L){switch(L.type){case 0:return m(p({},O),{visible:L.payload});case 1:return m(p({},O),{tabIndex:L.payload});default:throw new Error}}function N({value:O,className:L}){const[P,T]=(0,C.useState)(!1),H=(0,C.useRef)(),U=(0,C.useRef)();return(0,C.useEffect)(()=>{P&&(U.current.reset(),U.current.write((0,c.pp)(O||"")))},[O,P]),(0,C.useEffect)(()=>{var q,G,Q,j;if(H.current){U.current=new n.Terminal({fontSize:14,disableStdin:!0}),U.current.open(H.current);const W=H.current.offsetWidth-14,K=((j=(Q=(G=(q=U.current)==null?void 0:q._core)==null?void 0:G._renderService)==null?void 0:Q.dimensions)==null?void 0:j.actualCellWidth)||9.5,de=Math.ceil(W/K);U.current.resize(de,8),T(!0)}},[]),a.createElement("div",{ref:H,className:r()("XtermText-valueRef",L)})}function M(O){const{status:L,error_msg:P,output:T,input:H,expected_output:U,is_file:q,input_file_url:G,output_file_url:Q,expected_output_file_url:j}=O;let W=null;const K={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(L){case l.h.NOMATCH:W=a.createElement(a.Fragment,null,a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!q&&a.createElement(N,{className:"mb10",value:H}),q&&a.createElement("div",{style:K},a.createElement("a",{onClick:()=>(0,c.LR)(G,H)},H)),a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!q&&a.createElement(N,{className:"mb10",value:T&&_.Base64.decode(T)||""}),q&&a.createElement("div",{style:K},a.createElement("a",{onClick:()=>(0,c.LR)(Q,T)},T)),a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!q&&a.createElement(N,{className:"mb10",value:U&&_.Base64.decode(U)||""}),q&&a.createElement("div",{style:K},a.createElement("a",{onClick:()=>(0,c.LR)(j,U)},U)));break;case l.h.EXECUTEFAILURE:W=a.createElement(a.Fragment,null,a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!q&&a.createElement(s.Z,{value:H,style:K}),q&&a.createElement("div",{style:K},a.createElement("a",{onClick:()=>(0,c.LR)(G,H)},H)),a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),a.createElement("pre",{className:"error"},_.Base64.decode(P)));break;case l.h.COMPILEFAILURE:W=a.createElement(a.Fragment,null,a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!q&&a.createElement(s.Z,{value:H,style:K}),q&&a.createElement("div",{style:K},a.createElement("a",{onClick:()=>(0,c.LR)(G,H)},H)),a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),a.createElement("pre",{className:"error"},_.Base64.decode(P)));break;case l.h.PODFAILURE:W=a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case l.h.TIMEOUT:W=a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return a.createElement(a.Fragment,null," ",W," ")}function F(O){const{status:L,error_msg:P,execute_time:T,output:H,input:U,expected_output:q,is_file:G,input_file_url:Q,output_file_url:j,expected_output_file_url:W}=O;let K=null;switch(L){case l.h.OK:K=a.createElement(a.Fragment,null,a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",T,"\u79D2"),a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),a.createElement("pre",null,_.Base64.decode(H)));break;case l.h.NOMATCH:K=a.createElement(a.Fragment,null,a.createElement("p",null,"\u8F93\u5165\uFF1A",a.createElement("pre",null,U)),a.createElement("p",null,"\u8F93\u51FA\uFF1A",H&&_.Base64.decode(H)),a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",q&&_.Base64.decode(q)));break;case l.h.EXECUTEFAILURE:K=a.createElement(a.Fragment,null,a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",a.createElement("pre",null,U)),a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),a.createElement("pre",{className:"error"},_.Base64.decode(P)));break;case l.h.COMPILEFAILURE:K=a.createElement(a.Fragment,null,a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",a.createElement("pre",null,U)),a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),a.createElement("pre",{className:"error"},_.Base64.decode(P)));break;case l.h.PODFAILURE:K=a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case l.h.TIMEOUT:K=a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return a.createElement(a.Fragment,null," ",K," ")}var A=({id:O,is_file:L,input:P,debuging:T,submitting:H,executingMessage:U,debugResult:q,onChangeInput:G,onDebugCode:Q,onSubmitCode:j})=>{const[W,K]=(0,C.useReducer)(I,D),{visible:de,tabIndex:z}=W;(0,C.useEffect)(()=>{K({type:0,payload:!1})},[O]);function V(te){let X=te.target.id;K({type:1,payload:X})}function Z(){K({type:0,payload:!de})}const $=(0,C.useMemo)(()=>{if(q){const{status:te}=q;return a.createElement(a.Fragment,null,F(q))}return null},[q]);function J(){K({type:0,payload:!0}),K({type:1,payload:"1"}),Q()}return a.createElement("div",{className:"test-case-panel"},a.createElement("div",{className:`test-case-panel-body ${de?"active":""}`},a.createElement("ul",{className:"s-navs"},a.createElement("li",null,a.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),a.createElement(t.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:a.createElement(b,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\u81EA\u6D4B\u8FD0\u884C\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u586B\u5145\u7B2C\u4E00\u4E2A\u975E\u9690\u85CF\u7684\u6587\u672C\u7C7B\u578B\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF09",value:L?"":P,onChange:G}),rightNode:T?a.createElement(i.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):q?$:a.createElement("p",{style:{color:"#536879"}},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D")})),a.createElement("a",{className:`btn-collapse ${de?"up":""}`,onClick:Z},de?a.createElement(h.Z,null):a.createElement(u.Z,null)),a.createElement("footer",{className:"footer"},a.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),a.createElement("div",{className:"flex-container"},a.createElement(y.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),a.createElement(y.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),a.createElement(y.ZP,{className:"btn-green",type:"ghost",loading:T,onClick:J},"\u8C03\u8BD5\u4EE3\u7801"),a.createElement(y.ZP,{type:"primary",className:"custom-ant-disabled",loading:H,disabled:H,onClick:()=>{K({type:0,payload:!1}),j()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},94189:function(ce,B,o){"use strict";o.d(B,{h:function(){return C}});var C=(d=>(d[d.NOMATCH=-1]="NOMATCH",d[d.OK=0]="OK",d[d.TIMEOUT=2]="TIMEOUT",d[d.PODFAILURE=3]="PODFAILURE",d[d.COMPILEFAILURE=4]="COMPILEFAILURE",d[d.EXECUTEFAILURE=5]="EXECUTEFAILURE",d[d.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",d))(C||{})},33227:function(ce,B,o){"use strict";o.d(B,{H7:function(){return s},KC:function(){return r},M3:function(){return w},MK:function(){return i},MU:function(){return h},Rg:function(){return x},WH:function(){return a},X6:function(){return l},bM:function(){return y},bx:function(){return f},dd:function(){return n},de:function(){return p},fi:function(){return c},fu:function(){return d},gu:function(){return E},n4:function(){return t},qe:function(){return v},rL:function(){return g},rX:function(){return _},uc:function(){return m},vl:function(){return e},wO:function(){return S},zO:function(){return u}});var C=o(33170);function d(b){return(0,C.U2)(`mypractices/${b}.json`,{hidePopLogin:!0})}function y(b,D){return(0,C.v_)(`mypractices/${b}/code_submit.json`,D)}function h(b,D){return(0,C.v_)(`mypractices/${b}/code_debug.json`,D)}function u(b,D){return D.language&&(D.language=encodeURIComponent(D.language)),(0,C.U2)(`mypractices/${b}/submit_records.json`,D)}function l(b){return(0,C.U2)("mypractices/record_detail.json",{id:b})}function _(b,D){return(0,C.U2)(`mypractices/${b}/result.json`,{mode:D})}function i(b,D){return(0,C.v_)(`mypractices/${b}/add_notes.json`,D)}function s(b,D){return(0,C.v_)(`mypractices/${b}/restore_initial_code.json`,D)}function c(b,D){return(0,C.v_)(`mypractices/${b}/sync_code.json`,D)}function t(b,D){return(0,C.v_)(`mypractices/${b}/update_code.json`,D)}function n(b){return(0,C.v_)(`mypractices/${b}/initial_codes.json`)}function e(b,D){return(0,C.v_)(`discusses/${b}/plus.json`,D)}function r(b){return(0,C.U2)("practices/practices_list.json",b)}function a(b,D){return(0,C.U2)(`practices/${b}/question_solution_articles`,D)}function f(b,D){return(0,C.v_)(`practices/${b}/question_solution_articles`,D)}function E(b,D){return(0,C.gz)(`practices/${b}/question_solution_articles/${D==null?void 0:D.active}`,D)}function w(b,D){return(0,C.U2)(`practices/${b}/question_solution_articles/${D==null?void 0:D.active}/edit`,D)}function S(b,D){return(0,C.U2)(`practices/${b}/question_solution_articles/${D==null?void 0:D.active}`,D)}function v(b,D){return(0,C.v_)(`practices/${b}/question_solution_articles/${D==null?void 0:D.active}/set_authority_or_excellent`,D)}function x(b,D){return(0,C.v_)(`practices/${b}/question_solution_articles/${D==null?void 0:D.active}/praise_or_treads`,D)}function g(b,D){return(0,C.v_)(`practices/${b}/question_solution_articles/${D==null?void 0:D.active}/hide`)}function p(b,D){return(0,C.IV)(`practices/${b}/question_solution_articles/${D==null?void 0:D.active}`,D)}function m(b,D){return(0,C.v_)(`mypractices/${b}/update_practice_time_sum`,D)}},9708:function(ce,B,o){"use strict";o.d(B,{F:function(){return u},Z:function(){return h}});var C=o(94184),d=o.n(C);const y=null;function h(l,_,i){return d()({[`${l}-status-success`]:_==="success",[`${l}-status-warning`]:_==="warning",[`${l}-status-error`]:_==="error",[`${l}-status-validating`]:_==="validating",[`${l}-has-feedback`]:i})}const u=(l,_)=>_||l},82586:function(ce,B,o){"use strict";o.d(B,{Z:function(){return S},n:function(){return E}});var C=o(16646),d=o(94184),y=o.n(d),h=o(67656),u=o(17799),l=o(67294),_=o(9708),i=o(53124),s=o(98866),c=o(98675),t=o(65223),n=o(4173),e=o(72922),r=o(47673);function a(v){return!!(v.prefix||v.suffix||v.allowClear)}var f=function(v,x){var g={};for(var p in v)Object.prototype.hasOwnProperty.call(v,p)&&x.indexOf(p)<0&&(g[p]=v[p]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,p=Object.getOwnPropertySymbols(v);m<p.length;m++)x.indexOf(p[m])<0&&Object.prototype.propertyIsEnumerable.call(v,p[m])&&(g[p[m]]=v[p[m]]);return g};function E(v,x){if(!v)return;v.focus(x);const{cursor:g}=x||{};if(g){const p=v.value.length;switch(g){case"start":v.setSelectionRange(0,0);break;case"end":v.setSelectionRange(p,p);break;default:v.setSelectionRange(0,p);break}}}var S=(0,l.forwardRef)((v,x)=>{var g;const{prefixCls:p,bordered:m=!0,status:b,size:D,disabled:R,onBlur:k,onFocus:I,suffix:N,allowClear:M,addonAfter:F,addonBefore:A,className:O,style:L,styles:P,rootClassName:T,onChange:H,classNames:U}=v,q=f(v,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:G,direction:Q,input:j}=l.useContext(i.E_),W=G("input",p),K=(0,l.useRef)(null),[de,z]=(0,r.ZP)(W),{compactSize:V,compactItemClassnames:Z}=(0,n.ri)(W,Q),$=(0,c.Z)(ve=>{var ge;return(ge=D!=null?D:V)!==null&&ge!==void 0?ge:ve}),J=l.useContext(s.Z),te=R!=null?R:J,{status:X,hasFeedback:Y,feedbackIcon:ae}=(0,l.useContext)(t.aM),re=(0,_.F)(X,b),se=a(v)||!!Y,ue=(0,l.useRef)(se);(0,l.useEffect)(()=>{var ve;se&&ue.current,ue.current=se},[se]);const ie=(0,e.Z)(K,!0),ee=ve=>{ie(),k==null||k(ve)},he=ve=>{ie(),I==null||I(ve)},le=ve=>{ie(),H==null||H(ve)},fe=(Y||N)&&l.createElement(l.Fragment,null,N,Y&&ae);let ye;return typeof M=="object"&&(M!=null&&M.clearIcon)?ye=M:M&&(ye={clearIcon:l.createElement(C.Z,null)}),de(l.createElement(h.default,Object.assign({ref:(0,u.sQ)(x,K),prefixCls:W,autoComplete:j==null?void 0:j.autoComplete},q,{disabled:te,onBlur:ee,onFocus:he,style:Object.assign(Object.assign({},j==null?void 0:j.style),L),styles:Object.assign(Object.assign({},j==null?void 0:j.styles),P),suffix:fe,allowClear:ye,className:y()(O,T,Z,j==null?void 0:j.className),onChange:le,addonAfter:F&&l.createElement(n.BR,null,l.createElement(t.Ux,{override:!0,status:!0},F)),addonBefore:A&&l.createElement(n.BR,null,l.createElement(t.Ux,{override:!0,status:!0},A)),classNames:Object.assign(Object.assign(Object.assign({},U),j==null?void 0:j.classNames),{input:y()({[`${W}-sm`]:$==="small",[`${W}-lg`]:$==="large",[`${W}-rtl`]:Q==="rtl",[`${W}-borderless`]:!m},!se&&(0,_.Z)(W,re),U==null?void 0:U.input,(g=j==null?void 0:j.classNames)===null||g===void 0?void 0:g.input,z)}),classes:{affixWrapper:y()({[`${W}-affix-wrapper-sm`]:$==="small",[`${W}-affix-wrapper-lg`]:$==="large",[`${W}-affix-wrapper-rtl`]:Q==="rtl",[`${W}-affix-wrapper-borderless`]:!m},(0,_.Z)(`${W}-affix-wrapper`,re,Y),z),wrapper:y()({[`${W}-group-rtl`]:Q==="rtl"},z),group:y()({[`${W}-group-wrapper-sm`]:$==="small",[`${W}-group-wrapper-lg`]:$==="large",[`${W}-group-wrapper-rtl`]:Q==="rtl",[`${W}-group-wrapper-disabled`]:te},(0,_.Z)(`${W}-group-wrapper`,re,Y),z)}})))})},96330:function(ce,B,o){"use strict";var C=o(16646),d=o(94184),y=o.n(d),h=o(64701),u=o(67294),l=o(9708),_=o(53124),i=o(98866),s=o(98675),c=o(65223),t=o(82586),n=o(47673),e=function(a,f){var E={};for(var w in a)Object.prototype.hasOwnProperty.call(a,w)&&f.indexOf(w)<0&&(E[w]=a[w]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,w=Object.getOwnPropertySymbols(a);S<w.length;S++)f.indexOf(w[S])<0&&Object.prototype.propertyIsEnumerable.call(a,w[S])&&(E[w[S]]=a[w[S]]);return E};const r=(0,u.forwardRef)((a,f)=>{const{prefixCls:E,bordered:w=!0,size:S,disabled:v,status:x,allowClear:g,showCount:p,classNames:m,rootClassName:b,className:D}=a,R=e(a,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:k,direction:I}=u.useContext(_.E_),N=(0,s.Z)(S),M=u.useContext(i.Z),F=v!=null?v:M,{status:A,hasFeedback:O,feedbackIcon:L}=u.useContext(c.aM),P=(0,l.F)(A,x),T=u.useRef(null);u.useImperativeHandle(f,()=>{var Q;return{resizableTextArea:(Q=T.current)===null||Q===void 0?void 0:Q.resizableTextArea,focus:j=>{var W,K;(0,t.n)((K=(W=T.current)===null||W===void 0?void 0:W.resizableTextArea)===null||K===void 0?void 0:K.textArea,j)},blur:()=>{var j;return(j=T.current)===null||j===void 0?void 0:j.blur()}}});const H=k("input",E);let U;typeof g=="object"&&(g!=null&&g.clearIcon)?U=g:g&&(U={clearIcon:u.createElement(C.Z,null)});const[q,G]=(0,n.ZP)(H);return q(u.createElement(h.default,Object.assign({},R,{disabled:F,allowClear:U,className:y()(D,b),classes:{affixWrapper:y()(`${H}-textarea-affix-wrapper`,{[`${H}-affix-wrapper-rtl`]:I==="rtl",[`${H}-affix-wrapper-borderless`]:!w,[`${H}-affix-wrapper-sm`]:N==="small",[`${H}-affix-wrapper-lg`]:N==="large",[`${H}-textarea-show-count`]:p},(0,l.Z)(`${H}-affix-wrapper`,P),G)},classNames:Object.assign(Object.assign({},m),{textarea:y()({[`${H}-borderless`]:!w,[`${H}-sm`]:N==="small",[`${H}-lg`]:N==="large"},(0,l.Z)(H,P),G,m==null?void 0:m.textarea)}),prefixCls:H,suffix:O&&u.createElement("span",{className:`${H}-textarea-suffix`},L),showCount:p,ref:T})))});B.Z=r},72922:function(ce,B,o){"use strict";o.d(B,{Z:function(){return d}});var C=o(67294);function d(y,h){const u=(0,C.useRef)([]),l=()=>{u.current.push(setTimeout(()=>{var _,i,s,c;!((_=y.current)===null||_===void 0)&&_.input&&((i=y.current)===null||i===void 0?void 0:i.input.getAttribute("type"))==="password"&&(!((s=y.current)===null||s===void 0)&&s.input.hasAttribute("value"))&&((c=y.current)===null||c===void 0||c.input.removeAttribute("value"))}))};return(0,C.useEffect)(()=>(h&&l(),()=>u.current.forEach(_=>{_&&clearTimeout(_)})),[]),l}},69677:function(ce,B,o){"use strict";o.d(B,{default:function(){return N}});var C=o(94184),d=o.n(C),y=o(67294),h=o(53124),u=o(65223),l=o(47673),i=M=>{const{getPrefixCls:F,direction:A}=(0,y.useContext)(h.E_),{prefixCls:O,className:L}=M,P=F("input-group",O),T=F("input"),[H,U]=(0,l.ZP)(T),q=d()(P,{[`${P}-lg`]:M.size==="large",[`${P}-sm`]:M.size==="small",[`${P}-compact`]:M.compact,[`${P}-rtl`]:A==="rtl"},U,L),G=(0,y.useContext)(u.aM),Q=(0,y.useMemo)(()=>Object.assign(Object.assign({},G),{isFormItemInput:!1}),[G]);return H(y.createElement("span",{className:q,style:M.style,onMouseEnter:M.onMouseEnter,onMouseLeave:M.onMouseLeave,onFocus:M.onFocus,onBlur:M.onBlur},y.createElement(u.aM.Provider,{value:Q},M.children)))},s=o(82586),c=o(63237),t=o(99569),n=o(10366),e=o(17799),r=o(72922),a=function(M,F){var A={};for(var O in M)Object.prototype.hasOwnProperty.call(M,O)&&F.indexOf(O)<0&&(A[O]=M[O]);if(M!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,O=Object.getOwnPropertySymbols(M);L<O.length;L++)F.indexOf(O[L])<0&&Object.prototype.propertyIsEnumerable.call(M,O[L])&&(A[O[L]]=M[O[L]]);return A};const f=M=>M?y.createElement(t.Z,null):y.createElement(c.Z,null),E={click:"onClick",hover:"onMouseOver"};var S=y.forwardRef((M,F)=>{const{visibilityToggle:A=!0}=M,O=typeof A=="object"&&A.visible!==void 0,[L,P]=(0,y.useState)(()=>O?A.visible:!1),T=(0,y.useRef)(null);y.useEffect(()=>{O&&P(A.visible)},[O,A]);const H=(0,r.Z)(T),U=()=>{const{disabled:te}=M;te||(L&&H(),P(X=>{var Y;const ae=!X;return typeof A=="object"&&((Y=A.onVisibleChange)===null||Y===void 0||Y.call(A,ae)),ae}))},q=te=>{const{action:X="click",iconRender:Y=f}=M,ae=E[X]||"",re=Y(L),se={[ae]:U,className:`${te}-icon`,key:"passwordIcon",onMouseDown:ue=>{ue.preventDefault()},onMouseUp:ue=>{ue.preventDefault()}};return y.cloneElement(y.isValidElement(re)?re:y.createElement("span",null,re),se)},{className:G,prefixCls:Q,inputPrefixCls:j,size:W}=M,K=a(M,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:de}=y.useContext(h.E_),z=de("input",j),V=de("input-password",Q),Z=A&&q(V),$=d()(V,G,{[`${V}-${W}`]:!!W}),J=Object.assign(Object.assign({},(0,n.Z)(K,["suffix","iconRender","visibilityToggle"])),{type:L?"text":"password",className:$,prefixCls:z,suffix:Z});return W&&(J.size=W),y.createElement(s.Z,Object.assign({ref:(0,e.sQ)(F,T)},J))}),v=o(72395),x=o(96159),g=o(71577),p=o(98675),m=o(4173),b=function(M,F){var A={};for(var O in M)Object.prototype.hasOwnProperty.call(M,O)&&F.indexOf(O)<0&&(A[O]=M[O]);if(M!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,O=Object.getOwnPropertySymbols(M);L<O.length;L++)F.indexOf(O[L])<0&&Object.prototype.propertyIsEnumerable.call(M,O[L])&&(A[O[L]]=M[O[L]]);return A},R=y.forwardRef((M,F)=>{const{prefixCls:A,inputPrefixCls:O,className:L,size:P,suffix:T,enterButton:H=!1,addonAfter:U,loading:q,disabled:G,onSearch:Q,onChange:j,onCompositionStart:W,onCompositionEnd:K}=M,de=b(M,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:z,direction:V}=y.useContext(h.E_),Z=y.useRef(!1),$=z("input-search",A),J=z("input",O),{compactSize:te}=(0,m.ri)($,V),X=(0,p.Z)(ne=>{var pe;return(pe=P!=null?P:te)!==null&&pe!==void 0?pe:ne}),Y=y.useRef(null),ae=ne=>{ne&&ne.target&&ne.type==="click"&&Q&&Q(ne.target.value,ne,{source:"clear"}),j&&j(ne)},re=ne=>{var pe;document.activeElement===((pe=Y.current)===null||pe===void 0?void 0:pe.input)&&ne.preventDefault()},se=ne=>{var pe,me;Q&&Q((me=(pe=Y.current)===null||pe===void 0?void 0:pe.input)===null||me===void 0?void 0:me.value,ne,{source:"input"})},ue=ne=>{Z.current||q||se(ne)},ie=typeof H=="boolean"?y.createElement(v.Z,null):null,ee=`${$}-button`;let he;const le=H||{},fe=le.type&&le.type.__ANT_BUTTON===!0;fe||le.type==="button"?he=(0,x.Tm)(le,Object.assign({onMouseDown:re,onClick:ne=>{var pe,me;(me=(pe=le==null?void 0:le.props)===null||pe===void 0?void 0:pe.onClick)===null||me===void 0||me.call(pe,ne),se(ne)},key:"enterButton"},fe?{className:ee,size:X}:{})):he=y.createElement(g.ZP,{className:ee,type:H?"primary":void 0,size:X,disabled:G,key:"enterButton",onMouseDown:re,onClick:se,loading:q,icon:ie},H),U&&(he=[he,(0,x.Tm)(U,{key:"addonAfter"})]);const ye=d()($,{[`${$}-rtl`]:V==="rtl",[`${$}-${X}`]:!!X,[`${$}-with-button`]:!!H},L),ve=ne=>{Z.current=!0,W==null||W(ne)},ge=ne=>{Z.current=!1,K==null||K(ne)};return y.createElement(s.Z,Object.assign({ref:(0,e.sQ)(Y,F),onPressEnter:ue},de,{size:X,onCompositionStart:ve,onCompositionEnd:ge,prefixCls:J,addonAfter:he,suffix:T,onChange:ae,className:ye,disabled:G}))}),k=o(96330);const I=s.Z;I.Group=i,I.Search=R,I.TextArea=k.Z,I.Password=S;var N=I},47673:function(ce,B,o){"use strict";o.d(B,{M1:function(){return _},TM:function(){return x},Xy:function(){return i},bi:function(){return t},e5:function(){return v},ik:function(){return n},nz:function(){return u},pU:function(){return l},s7:function(){return e},x0:function(){return c}});var C=o(14747),d=o(80110),y=o(45503),h=o(67968);const u=g=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:g,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),l=g=>({borderColor:g.hoverBorderColor}),_=g=>({borderColor:g.activeBorderColor,boxShadow:g.activeShadow,outline:0}),i=g=>({color:g.colorTextDisabled,backgroundColor:g.colorBgContainerDisabled,borderColor:g.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},l((0,y.TS)(g,{hoverBorderColor:g.colorBorder})))}),s=g=>{const{paddingBlockLG:p,fontSizeLG:m,lineHeightLG:b,borderRadiusLG:D,paddingInlineLG:R}=g;return{padding:`${p}px ${R}px`,fontSize:m,lineHeight:b,borderRadius:D}},c=g=>({padding:`${g.paddingBlockSM}px ${g.paddingInlineSM}px`,borderRadius:g.borderRadiusSM}),t=(g,p)=>{const{componentCls:m,colorError:b,colorWarning:D,errorActiveShadow:R,warningActiveShadow:k,colorErrorBorderHover:I,colorWarningBorderHover:N}=g;return{[`&-status-error:not(${p}-disabled):not(${p}-borderless)${p}`]:{borderColor:b,"&:hover":{borderColor:I},"&:focus, &-focused":Object.assign({},_((0,y.TS)(g,{activeBorderColor:b,activeShadow:R}))),[`${m}-prefix, ${m}-suffix`]:{color:b}},[`&-status-warning:not(${p}-disabled):not(${p}-borderless)${p}`]:{borderColor:D,"&:hover":{borderColor:N},"&:focus, &-focused":Object.assign({},_((0,y.TS)(g,{activeBorderColor:D,activeShadow:k}))),[`${m}-prefix, ${m}-suffix`]:{color:D}}}},n=g=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${g.paddingBlock}px ${g.paddingInline}px`,color:g.colorText,fontSize:g.fontSize,lineHeight:g.lineHeight,backgroundColor:g.colorBgContainer,backgroundImage:"none",borderWidth:g.lineWidth,borderStyle:g.lineType,borderColor:g.colorBorder,borderRadius:g.borderRadius,transition:`all ${g.motionDurationMid}`},u(g.colorTextPlaceholder)),{"&:hover":Object.assign({},l(g)),"&:focus, &-focused":Object.assign({},_(g)),"&-disabled, &[disabled]":Object.assign({},i(g)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:g.controlHeight,lineHeight:g.lineHeight,verticalAlign:"bottom",transition:`all ${g.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},s(g)),"&-sm":Object.assign({},c(g)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),e=g=>{const{componentCls:p,antCls:m}=g;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:g.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${p}, &-lg > ${p}-group-addon`]:Object.assign({},s(g)),[`&-sm ${p}, &-sm > ${p}-group-addon`]:Object.assign({},c(g)),[`&-lg ${m}-select-single ${m}-select-selector`]:{height:g.controlHeightLG},[`&-sm ${m}-select-single ${m}-select-selector`]:{height:g.controlHeightSM},[`> ${p}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${p}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${g.paddingInline}px`,color:g.colorText,fontWeight:"normal",fontSize:g.fontSize,textAlign:"center",backgroundColor:g.colorFillAlter,border:`${g.lineWidth}px ${g.lineType} ${g.colorBorder}`,borderRadius:g.borderRadius,transition:`all ${g.motionDurationSlow}`,lineHeight:1,[`${m}-select`]:{margin:`-${g.paddingBlock+1}px -${g.paddingInline}px`,[`&${m}-select-single:not(${m}-select-customize-input)`]:{[`${m}-select-selector`]:{backgroundColor:"inherit",border:`${g.lineWidth}px ${g.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${m}-select-selector`]:{color:g.colorPrimary}}},[`${m}-cascader-picker`]:{margin:`-9px -${g.paddingInline}px`,backgroundColor:"transparent",[`${m}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${p}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${p}-search-with-button &`]:{zIndex:0}}},[`> ${p}:first-child, ${p}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${m}-select ${m}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${p}-affix-wrapper`]:{[`&:not(:first-child) ${p}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${p}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${p}:last-child, ${p}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${m}-select ${m}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${p}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${p}-search &`]:{borderStartStartRadius:g.borderRadius,borderEndStartRadius:g.borderRadius}},[`&:not(:first-child), ${p}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${p}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,C.dF)()),{[`${p}-group-addon, ${p}-group-wrap, > ${p}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:g.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${p}-affix-wrapper,
|
|
|
& > ${p}-number-affix-wrapper,
|
|
|
& > ${m}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-g.lineWidth,borderInlineEndWidth:g.lineWidth},[`${p}`]:{float:"none"},[`& > ${m}-select > ${m}-select-selector,
|
|
|
& > ${m}-select-auto-complete ${p},
|
|
|
& > ${m}-cascader-picker ${p},
|
|
|
& > ${p}-group-wrapper ${p}`]:{borderInlineEndWidth:g.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${m}-select-focused`]:{zIndex:1},[`& > ${m}-select > ${m}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${m}-select:first-child > ${m}-select-selector,
|
|
|
& > ${m}-select-auto-complete:first-child ${p},
|
|
|
& > ${m}-cascader-picker:first-child ${p}`]:{borderStartStartRadius:g.borderRadius,borderEndStartRadius:g.borderRadius},[`& > *:last-child,
|
|
|
& > ${m}-select:last-child > ${m}-select-selector,
|
|
|
& > ${m}-cascader-picker:last-child ${p},
|
|
|
& > ${m}-cascader-picker-focused:last-child ${p}`]:{borderInlineEndWidth:g.lineWidth,borderStartEndRadius:g.borderRadius,borderEndEndRadius:g.borderRadius},[`& > ${m}-select-auto-complete ${p}`]:{verticalAlign:"top"},[`${p}-group-wrapper + ${p}-group-wrapper`]:{marginInlineStart:-g.lineWidth,[`${p}-affix-wrapper`]:{borderRadius:0}},[`${p}-group-wrapper:not(:last-child)`]:{[`&${p}-search > ${p}-group`]:{[`& > ${p}-group-addon > ${p}-search-button`]:{borderRadius:0},[`& > ${p}`]:{borderStartStartRadius:g.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:g.borderRadius}}}})}},r=g=>{const{componentCls:p,controlHeightSM:m,lineWidth:b}=g,R=(m-b*2-16)/2;return{[p]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,C.Wf)(g)),n(g)),t(g,p)),{'&[type="color"]':{height:g.controlHeight,[`&${p}-lg`]:{height:g.controlHeightLG},[`&${p}-sm`]:{height:m,paddingTop:R,paddingBottom:R}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},a=g=>{const{componentCls:p}=g;return{[`${p}-clear-icon`]:{margin:0,color:g.colorTextQuaternary,fontSize:g.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${g.motionDurationSlow}`,"&:hover":{color:g.colorTextTertiary},"&:active":{color:g.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${g.inputAffixPadding}px`}}}},f=g=>{const{componentCls:p,inputAffixPadding:m,colorTextDescription:b,motionDurationSlow:D,colorIcon:R,colorIconHover:k,iconCls:I}=g;return{[`${p}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n(g)),{display:"inline-flex",[`&:not(${p}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},l(g)),{zIndex:1,[`${p}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${p}[disabled]`]:{background:"transparent"}},[`> input${p}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${p}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:g.paddingXS}},"&-show-count-suffix":{color:b},"&-show-count-has-suffix":{marginInlineEnd:g.paddingXXS},"&-prefix":{marginInlineEnd:m},"&-suffix":{marginInlineStart:m}}}),a(g)),{[`${I}${p}-password-icon`]:{color:R,cursor:"pointer",transition:`all ${D}`,"&:hover":{color:k}}}),t(g,`${p}-affix-wrapper`))}},E=g=>{const{componentCls:p,colorError:m,colorWarning:b,borderRadiusLG:D,borderRadiusSM:R}=g;return{[`${p}-group`]:Object.assign(Object.assign(Object.assign({},(0,C.Wf)(g)),e(g)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${p}-group-addon`]:{borderRadius:D,fontSize:g.fontSizeLG}},"&-sm":{[`${p}-group-addon`]:{borderRadius:R}},"&-status-error":{[`${p}-group-addon`]:{color:m,borderColor:m}},"&-status-warning":{[`${p}-group-addon`]:{color:b,borderColor:b}},"&-disabled":{[`${p}-group-addon`]:Object.assign({},i(g))},[`&:not(${p}-compact-first-item):not(${p}-compact-last-item)${p}-compact-item`]:{[`${p}, ${p}-group-addon`]:{borderRadius:0}},[`&:not(${p}-compact-last-item)${p}-compact-first-item`]:{[`${p}, ${p}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${p}-compact-first-item)${p}-compact-last-item`]:{[`${p}, ${p}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},w=g=>{const{componentCls:p,antCls:m}=g,b=`${p}-search`;return{[b]:{[`${p}`]:{"&:hover, &:focus":{borderColor:g.colorPrimaryHover,[`+ ${p}-group-addon ${b}-button:not(${m}-btn-primary)`]:{borderInlineStartColor:g.colorPrimaryHover}}},[`${p}-affix-wrapper`]:{borderRadius:0},[`${p}-lg`]:{lineHeight:g.lineHeightLG-2e-4},[`> ${p}-group`]:{[`> ${p}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${b}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:g.borderRadius,borderEndEndRadius:g.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${b}-button:not(${m}-btn-primary)`]:{color:g.colorTextDescription,"&:hover":{color:g.colorPrimaryHover},"&:active":{color:g.colorPrimaryActive},[`&${m}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${b}-button`]:{height:g.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${b}-button`]:{height:g.controlHeightLG},[`&-small ${b}-button`]:{height:g.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${p}-compact-item`]:{[`&:not(${p}-compact-last-item)`]:{[`${p}-group-addon`]:{[`${p}-search-button`]:{marginInlineEnd:-g.lineWidth,borderRadius:0}}},[`&:not(${p}-compact-first-item)`]:{[`${p},${p}-affix-wrapper`]:{borderRadius:0}},[`> ${p}-group-addon ${p}-search-button,
|
|
|
> ${p},
|
|
|
${p}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${p}-affix-wrapper-focused`]:{zIndex:2}}}}},S=g=>{const{componentCls:p,paddingLG:m}=g,b=`${p}-textarea`;return{[b]:{position:"relative","&-show-count":{[`> ${p}`]:{height:"100%"},[`${p}-data-count`]:{position:"absolute",bottom:-g.fontSize*g.lineHeight,insetInlineEnd:0,color:g.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${p}`]:{paddingInlineEnd:m}},[`&-affix-wrapper${b}-has-feedback`]:{[`${p}`]:{paddingInlineEnd:m}},[`&-affix-wrapper${p}-affix-wrapper`]:{padding:0,[`> textarea${p}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${p}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${p}-clear-icon`]:{position:"absolute",insetInlineEnd:g.paddingXS,insetBlockStart:g.paddingXS},[`${b}-suffix`]:{position:"absolute",top:0,insetInlineEnd:g.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function v(g){return(0,y.TS)(g,{inputAffixPadding:g.paddingXXS})}const x=g=>{const{controlHeight:p,fontSize:m,lineHeight:b,lineWidth:D,controlHeightSM:R,controlHeightLG:k,fontSizeLG:I,lineHeightLG:N,paddingSM:M,controlPaddingHorizontalSM:F,controlPaddingHorizontal:A,colorFillAlter:O,colorPrimaryHover:L,controlOutlineWidth:P,controlOutline:T,colorErrorOutline:H,colorWarningOutline:U}=g;return{paddingBlock:Math.max(Math.round((p-m*b)/2*10)/10-D,3),paddingBlockSM:Math.max(Math.round((R-m*b)/2*10)/10-D,0),paddingBlockLG:Math.ceil((k-I*N)/2*10)/10-D,paddingInline:M-D,paddingInlineSM:F-D,paddingInlineLG:A-D,addonBg:O,activeBorderColor:L,hoverBorderColor:L,activeShadow:`0 0 0 ${P}px ${T}`,errorActiveShadow:`0 0 0 ${P}px ${H}`,warningActiveShadow:`0 0 0 ${P}px ${U}`}};B.ZP=(0,h.Z)("Input",g=>{const p=(0,y.TS)(g,v(g));return[r(p),S(p),f(p),E(p),w(p),(0,d.c)(p)]},x)},64701:function(ce,B,o){"use strict";o.r(B),o.d(B,{ResizableTextArea:function(){return q},default:function(){return de}});var C=o(87462),d=o(1413),y=o(4942),h=o(71002),u=o(97685),l=o(45987),_=o(74902),i=o(94184),s=o.n(i),c=o(67656),t=o(87887),n=o(67294);function e(z){var V=n.useRef();V.current=z;var Z=n.useCallback(function(){for(var $,J=arguments.length,te=new Array(J),X=0;X<J;X++)te[X]=arguments[X];return($=V.current)===null||$===void 0?void 0:$.call.apply($,[V].concat(te))},[]);return Z}function r(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var a=r()?n.useLayoutEffect:n.useEffect,f=a,E=function(V,Z){var $=n.useRef(!0);a(function(){if(!$.current)return V()},Z),a(function(){return $.current=!1,function(){$.current=!0}},[])};function w(z){var V=n.useRef(!1),Z=n.useState(z),$=(0,u.Z)(Z,2),J=$[0],te=$[1];n.useEffect(function(){return V.current=!1,function(){V.current=!0}},[]);function X(Y,ae){ae&&V.current||te(Y)}return[J,X]}function S(z){return z!==void 0}function v(z,V){var Z=V||{},$=Z.defaultValue,J=Z.value,te=Z.onChange,X=Z.postState,Y=w(function(){return S(J)?J:S($)?typeof $=="function"?$():$:typeof z=="function"?z():z}),ae=(0,u.Z)(Y,2),re=ae[0],se=ae[1],ue=J!==void 0?J:re,ie=X?X(ue):ue,ee=e(te),he=w([ue]),le=(0,u.Z)(he,2),fe=le[0],ye=le[1];E(function(){var ge=fe[0];re!==ge&&ee(re,ge)},[fe]),E(function(){S(J)||se(J)},[J]);var ve=e(function(ge,ne){se(ge,ne),ye([ue],ne)});return[ie,ve]}var x=o(48555),g=function(V){return+setTimeout(V,16)},p=function(V){return clearTimeout(V)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(g=function(V){return window.requestAnimationFrame(V)},p=function(V){return window.cancelAnimationFrame(V)});var m=0,b=new Map;function D(z){b.delete(z)}var R=function(V){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;m+=1;var $=m;function J(te){if(te===0)D($),V();else{var X=g(function(){J(te-1)});b.set($,X)}}return J(Z),$};R.cancel=function(z){var V=b.get(z);return D(V),p(V)};var k=R,I=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,N=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],M={},F;function A(z){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Z=z.getAttribute("id")||z.getAttribute("data-reactid")||z.getAttribute("name");if(V&&M[Z])return M[Z];var $=window.getComputedStyle(z),J=$.getPropertyValue("box-sizing")||$.getPropertyValue("-moz-box-sizing")||$.getPropertyValue("-webkit-box-sizing"),te=parseFloat($.getPropertyValue("padding-bottom"))+parseFloat($.getPropertyValue("padding-top")),X=parseFloat($.getPropertyValue("border-bottom-width"))+parseFloat($.getPropertyValue("border-top-width")),Y=N.map(function(re){return"".concat(re,":").concat($.getPropertyValue(re))}).join(";"),ae={sizingStyle:Y,paddingSize:te,borderSize:X,boxSizing:J};return V&&Z&&(M[Z]=ae),ae}function O(z){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,$=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;F||(F=document.createElement("textarea"),F.setAttribute("tab-index","-1"),F.setAttribute("aria-hidden","true"),document.body.appendChild(F)),z.getAttribute("wrap")?F.setAttribute("wrap",z.getAttribute("wrap")):F.removeAttribute("wrap");var J=A(z,V),te=J.paddingSize,X=J.borderSize,Y=J.boxSizing,ae=J.sizingStyle;F.setAttribute("style","".concat(ae,";").concat(I)),F.value=z.value||z.placeholder||"";var re=void 0,se=void 0,ue,ie=F.scrollHeight;if(Y==="border-box"?ie+=X:Y==="content-box"&&(ie-=te),Z!==null||$!==null){F.value=" ";var ee=F.scrollHeight-te;Z!==null&&(re=ee*Z,Y==="border-box"&&(re=re+te+X),ie=Math.max(re,ie)),$!==null&&(se=ee*$,Y==="border-box"&&(se=se+te+X),ue=ie>se?"":"hidden",ie=Math.min(se,ie))}var he={height:ie,overflowY:ue,resize:"none"};return re&&(he.minHeight=re),se&&(he.maxHeight=se),he}var L=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],P=0,T=1,H=2,U=n.forwardRef(function(z,V){var Z=z,$=Z.prefixCls,J=Z.onPressEnter,te=Z.defaultValue,X=Z.value,Y=Z.autoSize,ae=Z.onResize,re=Z.className,se=Z.style,ue=Z.disabled,ie=Z.onChange,ee=Z.onInternalAutoSize,he=(0,l.Z)(Z,L),le=v(te,{value:X,postState:function(be){return be!=null?be:""}}),fe=(0,u.Z)(le,2),ye=fe[0],ve=fe[1],ge=function(be){ve(be.target.value),ie==null||ie(be)},ne=n.useRef();n.useImperativeHandle(V,function(){return{textArea:ne.current}});var pe=n.useMemo(function(){return Y&&(0,h.Z)(Y)==="object"?[Y.minRows,Y.maxRows]:[]},[Y]),me=(0,u.Z)(pe,2),Ae=me[0],xe=me[1],De=!!Y,We=function(){try{if(document.activeElement===ne.current){var be=ne.current,Ze=be.selectionStart,$e=be.selectionEnd,Oe=be.scrollTop;ne.current.setSelectionRange(Ze,$e),ne.current.scrollTop=Oe}}catch(Ve){}},Re=n.useState(H),Le=(0,u.Z)(Re,2),Se=Le[0],Te=Le[1],Ne=n.useState(),ze=(0,u.Z)(Ne,2),Pe=ze[0],qe=ze[1],Me=function(){Te(P)};f(function(){De&&Me()},[X,Ae,xe,De]),f(function(){if(Se===P)Te(T);else if(Se===T){var Ee=O(ne.current,!1,Ae,xe);Te(H),qe(Ee)}else We()},[Se]);var Ie=n.useRef(),ke=function(){k.cancel(Ie.current)},Be=function(be){Se===H&&(ae==null||ae(be),Y&&(ke(),Ie.current=k(function(){Me()})))};n.useEffect(function(){return ke},[]);var He=De?Pe:null,Fe=(0,d.Z)((0,d.Z)({},se),He);return(Se===P||Se===T)&&(Fe.overflowY="hidden",Fe.overflowX="hidden"),n.createElement(x.Z,{onResize:Be,disabled:!(Y||ae)},n.createElement("textarea",(0,C.Z)({},he,{ref:ne,style:Fe,className:s()($,re,(0,y.Z)({},"".concat($,"-disabled"),ue)),disabled:ue,value:ye,onChange:ge})))}),q=U,G=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Q(z,V){return(0,_.Z)(z||"").slice(0,V).join("")}function j(z,V,Z,$){var J=Z;return z?J=Q(Z,$):(0,_.Z)(V||"").length<Z.length&&(0,_.Z)(Z||"").length>$&&(J=V),J}var W=n.forwardRef(function(z,V){var Z,$=z.defaultValue,J=z.value,te=z.onFocus,X=z.onBlur,Y=z.onChange,ae=z.allowClear,re=z.maxLength,se=z.onCompositionStart,ue=z.onCompositionEnd,ie=z.suffix,ee=z.prefixCls,he=ee===void 0?"rc-textarea":ee,le=z.classes,fe=z.showCount,ye=z.className,ve=z.style,ge=z.disabled,ne=z.hidden,pe=z.classNames,me=z.styles,Ae=z.onResize,xe=(0,l.Z)(z,G),De=v($,{value:J,defaultValue:$}),We=(0,u.Z)(De,2),Re=We[0],Le=We[1],Se=(0,n.useRef)(null),Te=n.useState(!1),Ne=(0,u.Z)(Te,2),ze=Ne[0],Pe=Ne[1],qe=n.useState(!1),Me=(0,u.Z)(qe,2),Ie=Me[0],ke=Me[1],Be=n.useRef(),He=n.useRef(0),Fe=n.useState(null),Ee=(0,u.Z)(Fe,2),be=Ee[0],Ze=Ee[1],$e=function(){var oe;(oe=Se.current)===null||oe===void 0||oe.textArea.focus()};(0,n.useImperativeHandle)(V,function(){return{resizableTextArea:Se.current,focus:$e,blur:function(){var oe;(oe=Se.current)===null||oe===void 0||oe.textArea.blur()}}}),(0,n.useEffect)(function(){Pe(function(Ce){return!ge&&Ce})},[ge]);var Oe=Number(re)>0,Ve=function(oe){ke(!0),Be.current=Re,He.current=oe.currentTarget.selectionStart,se==null||se(oe)},Xe=function(oe){ke(!1);var _e=oe.currentTarget.value;if(Oe){var we,ot=He.current>=re+1||He.current===((we=Be.current)===null||we===void 0?void 0:we.length);_e=j(ot,Be.current,_e,re)}_e!==Re&&(Le(_e),(0,t.rJ)(oe.currentTarget,oe,Y,_e)),ue==null||ue(oe)},Ye=function(oe){var _e=oe.target.value;if(!Ie&&Oe){var we=oe.target.selectionStart>=re+1||oe.target.selectionStart===_e.length||!oe.target.selectionStart;_e=j(we,Re,_e,re)}Le(_e),(0,t.rJ)(oe.currentTarget,oe,Y,_e)},Je=function(oe){var _e=xe.onPressEnter,we=xe.onKeyDown;oe.key==="Enter"&&_e&&_e(oe),we==null||we(oe)},Qe=function(oe){Pe(!0),te==null||te(oe)},et=function(oe){Pe(!1),X==null||X(oe)},tt=function(oe){var _e;Le(""),$e(),(0,t.rJ)((_e=Se.current)===null||_e===void 0?void 0:_e.textArea,oe,Y)},je=(0,t.D7)(Re);!Ie&&Oe&&J==null&&(je=Q(je,re));var Ke=ie,Ue;if(fe){var Ge=(0,_.Z)(je).length;(0,h.Z)(fe)==="object"?Ue=fe.formatter({value:je,count:Ge,maxLength:re}):Ue="".concat(Ge).concat(Oe?" / ".concat(re):""),Ke=n.createElement(n.Fragment,null,Ke,n.createElement("span",{className:s()("".concat(he,"-data-count"),pe==null?void 0:pe.count),style:me==null?void 0:me.count},Ue))}var rt=function(oe){var _e;Ae==null||Ae(oe),(_e=Se.current)!==null&&_e!==void 0&&_e.textArea.style.height&&Ze(!0)},it=!xe.autoSize&&!fe&&!ae,nt=n.createElement(c.BaseInput,{value:je,allowClear:ae,handleReset:tt,suffix:Ke,prefixCls:he,classes:{affixWrapper:s()(le==null?void 0:le.affixWrapper,(Z={},(0,y.Z)(Z,"".concat(he,"-show-count"),fe),(0,y.Z)(Z,"".concat(he,"-textarea-allow-clear"),ae),Z))},disabled:ge,focused:ze,className:ye,style:(0,d.Z)((0,d.Z)({},ve),be&&!it?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ue=="string"?Ue:void 0}},hidden:ne,inputElement:n.createElement(q,(0,C.Z)({},xe,{onKeyDown:Je,onChange:Ye,onFocus:Qe,onBlur:et,onCompositionStart:Ve,onCompositionEnd:Xe,className:pe==null?void 0:pe.textarea,style:(0,d.Z)((0,d.Z)({},me==null?void 0:me.textarea),{},{resize:ve==null?void 0:ve.resize}),disabled:ge,prefixCls:he,onResize:rt,ref:Se}))});return nt}),K=W,de=K},19575:function(ce,B,o){var C,d;(function(y,h){ce.exports=h(y)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof o.g!="undefined"?o.g:this,function(y){"use strict";y=y||{};var h=y.Base64,u="2.6.4",l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=function(M){for(var F={},A=0,O=M.length;A<O;A++)F[M.charAt(A)]=A;return F}(l),i=String.fromCharCode,s=function(M){if(M.length<2){var F=M.charCodeAt(0);return F<128?M:F<2048?i(192|F>>>6)+i(128|F&63):i(224|F>>>12&15)+i(128|F>>>6&63)+i(128|F&63)}else{var F=65536+(M.charCodeAt(0)-55296)*1024+(M.charCodeAt(1)-56320);return i(240|F>>>18&7)+i(128|F>>>12&63)+i(128|F>>>6&63)+i(128|F&63)}},c=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,t=function(M){return M.replace(c,s)},n=function(M){var F=[0,2,1][M.length%3],A=M.charCodeAt(0)<<16|(M.length>1?M.charCodeAt(1):0)<<8|(M.length>2?M.charCodeAt(2):0),O=[l.charAt(A>>>18),l.charAt(A>>>12&63),F>=2?"=":l.charAt(A>>>6&63),F>=1?"=":l.charAt(A&63)];return O.join("")},e=y.btoa&&typeof y.btoa=="function"?function(M){return y.btoa(M)}:function(M){if(M.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return M.replace(/[\s\S]{1,3}/g,n)},r=function(M){return e(t(String(M)))},a=function(M){return M.replace(/[+\/]/g,function(F){return F=="+"?"-":"_"}).replace(/=/g,"")},f=function(M,F){return F?a(r(M)):r(M)},E=function(M){return f(M,!0)},w;y.Uint8Array&&(w=function(M,F){for(var A="",O=0,L=M.length;O<L;O+=3){var P=M[O],T=M[O+1],H=M[O+2],U=P<<16|T<<8|H;A+=l.charAt(U>>>18)+l.charAt(U>>>12&63)+(typeof T!="undefined"?l.charAt(U>>>6&63):"=")+(typeof H!="undefined"?l.charAt(U&63):"=")}return F?a(A):A});var S=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,v=function(M){switch(M.length){case 4:var F=(7&M.charCodeAt(0))<<18|(63&M.charCodeAt(1))<<12|(63&M.charCodeAt(2))<<6|63&M.charCodeAt(3),A=F-65536;return i((A>>>10)+55296)+i((A&1023)+56320);case 3:return i((15&M.charCodeAt(0))<<12|(63&M.charCodeAt(1))<<6|63&M.charCodeAt(2));default:return i((31&M.charCodeAt(0))<<6|63&M.charCodeAt(1))}},x=function(M){return M.replace(S,v)},g=function(M){var F=M.length,A=F%4,O=(F>0?_[M.charAt(0)]<<18:0)|(F>1?_[M.charAt(1)]<<12:0)|(F>2?_[M.charAt(2)]<<6:0)|(F>3?_[M.charAt(3)]:0),L=[i(O>>>16),i(O>>>8&255),i(O&255)];return L.length-=[0,0,2,1][A],L.join("")},p=y.atob&&typeof y.atob=="function"?function(M){return y.atob(M)}:function(M){return M.replace(/\S{1,4}/g,g)},m=function(M){return p(String(M).replace(/[^A-Za-z0-9\+\/]/g,""))},b=function(M){return x(p(M))},D=function(M){return String(M).replace(/[-_]/g,function(F){return F=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},R=function(M){return b(D(M))},k;y.Uint8Array&&(k=function(M){return Uint8Array.from(m(D(M)),function(F){return F.charCodeAt(0)})});var I=function(){var M=y.Base64;return y.Base64=h,M};if(y.Base64={VERSION:u,atob:m,btoa:e,fromBase64:R,toBase64:f,utob:t,encode:f,encodeURI:E,btou:x,decode:R,noConflict:I,fromUint8Array:w,toUint8Array:k},typeof Object.defineProperty=="function"){var N=function(M){return{value:M,enumerable:!1,writable:!0,configurable:!0}};y.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",N(function(){return R(this)})),Object.defineProperty(String.prototype,"toBase64",N(function(M){return f(this,M)})),Object.defineProperty(String.prototype,"toBase64URI",N(function(){return f(this,!0)}))}}return y.Meteor&&(Base64=y.Base64),ce.exports?ce.exports.Base64=y.Base64:(C=[],d=function(){return y.Base64}.apply(B,C),d!==void 0&&(ce.exports=d)),{Base64:y.Base64}})},67656:function(ce,B,o){"use strict";o.r(B),o.d(B,{BaseInput:function(){return c},default:function(){return S}});var C=o(87462),d=o(1413),y=o(4942),h=o(71002),u=o(94184),l=o.n(u),_=o(67294),i=o(87887),s=function(x){var g,p,m=x.inputElement,b=x.prefixCls,D=x.prefix,R=x.suffix,k=x.addonBefore,I=x.addonAfter,N=x.className,M=x.style,F=x.disabled,A=x.readOnly,O=x.focused,L=x.triggerFocus,P=x.allowClear,T=x.value,H=x.handleReset,U=x.hidden,q=x.classes,G=x.classNames,Q=x.dataAttrs,j=x.styles,W=x.components,K=(W==null?void 0:W.affixWrapper)||"span",de=(W==null?void 0:W.groupWrapper)||"span",z=(W==null?void 0:W.wrapper)||"span",V=(W==null?void 0:W.groupAddon)||"span",Z=(0,_.useRef)(null),$=function(le){var fe;(fe=Z.current)!==null&&fe!==void 0&&fe.contains(le.target)&&(L==null||L())},J=function(){var le;if(!P)return null;var fe=!F&&!A&&T,ye="".concat(b,"-clear-icon"),ve=(0,h.Z)(P)==="object"&&P!==null&&P!==void 0&&P.clearIcon?P.clearIcon:"\u2716";return _.createElement("span",{onClick:H,onMouseDown:function(ne){return ne.preventDefault()},className:l()(ye,(le={},(0,y.Z)(le,"".concat(ye,"-hidden"),!fe),(0,y.Z)(le,"".concat(ye,"-has-suffix"),!!R),le)),role:"button",tabIndex:-1},ve)},te=(0,_.cloneElement)(m,{value:T,hidden:U,className:l()((g=m.props)===null||g===void 0?void 0:g.className,!(0,i.X3)(x)&&!(0,i.He)(x)&&N)||null,style:(0,d.Z)((0,d.Z)({},(p=m.props)===null||p===void 0?void 0:p.style),!(0,i.X3)(x)&&!(0,i.He)(x)?M:{})});if((0,i.X3)(x)){var X,Y="".concat(b,"-affix-wrapper"),ae=l()(Y,(X={},(0,y.Z)(X,"".concat(Y,"-disabled"),F),(0,y.Z)(X,"".concat(Y,"-focused"),O),(0,y.Z)(X,"".concat(Y,"-readonly"),A),(0,y.Z)(X,"".concat(Y,"-input-with-clear-btn"),R&&P&&T),X),!(0,i.He)(x)&&N,q==null?void 0:q.affixWrapper,G==null?void 0:G.affixWrapper),re=(R||P)&&_.createElement("span",{className:l()("".concat(b,"-suffix"),G==null?void 0:G.suffix),style:j==null?void 0:j.suffix},J(),R);te=_.createElement(K,(0,C.Z)({className:ae,style:(0,d.Z)((0,d.Z)({},(0,i.He)(x)?void 0:M),j==null?void 0:j.affixWrapper),hidden:!(0,i.He)(x)&&U,onClick:$},Q==null?void 0:Q.affixWrapper,{ref:Z}),D&&_.createElement("span",{className:l()("".concat(b,"-prefix"),G==null?void 0:G.prefix),style:j==null?void 0:j.prefix},D),(0,_.cloneElement)(m,{value:T,hidden:null}),re)}if((0,i.He)(x)){var se="".concat(b,"-group"),ue="".concat(se,"-addon"),ie=l()("".concat(b,"-wrapper"),se,q==null?void 0:q.wrapper),ee=l()("".concat(b,"-group-wrapper"),N,q==null?void 0:q.group);return _.createElement(de,{className:ee,style:M,hidden:U},_.createElement(z,{className:ie},k&&_.createElement(V,{className:ue},k),(0,_.cloneElement)(te,{hidden:null}),I&&_.createElement(V,{className:ue},I)))}return te},c=s,t=o(74902),n=o(97685),e=o(45987),r=o(21770),a=o(98423),f=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],E=(0,_.forwardRef)(function(v,x){var g=v.autoComplete,p=v.onChange,m=v.onFocus,b=v.onBlur,D=v.onPressEnter,R=v.onKeyDown,k=v.prefixCls,I=k===void 0?"rc-input":k,N=v.disabled,M=v.htmlSize,F=v.className,A=v.maxLength,O=v.suffix,L=v.showCount,P=v.type,T=P===void 0?"text":P,H=v.classes,U=v.classNames,q=v.styles,G=(0,e.Z)(v,f),Q=(0,r.Z)(v.defaultValue,{value:v.value}),j=(0,n.Z)(Q,2),W=j[0],K=j[1],de=(0,_.useState)(!1),z=(0,n.Z)(de,2),V=z[0],Z=z[1],$=(0,_.useRef)(null),J=function(ee){$.current&&(0,i.nH)($.current,ee)};(0,_.useImperativeHandle)(x,function(){return{focus:J,blur:function(){var ee;(ee=$.current)===null||ee===void 0||ee.blur()},setSelectionRange:function(ee,he,le){var fe;(fe=$.current)===null||fe===void 0||fe.setSelectionRange(ee,he,le)},select:function(){var ee;(ee=$.current)===null||ee===void 0||ee.select()},input:$.current}}),(0,_.useEffect)(function(){Z(function(ie){return ie&&N?!1:ie})},[N]);var te=function(ee){v.value===void 0&&K(ee.target.value),$.current&&(0,i.rJ)($.current,ee,p)},X=function(ee){D&&ee.key==="Enter"&&D(ee),R==null||R(ee)},Y=function(ee){Z(!0),m==null||m(ee)},ae=function(ee){Z(!1),b==null||b(ee)},re=function(ee){K(""),J(),$.current&&(0,i.rJ)($.current,ee,p)},se=function(){var ee=(0,a.Z)(v,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return _.createElement("input",(0,C.Z)({autoComplete:g},ee,{onChange:te,onFocus:Y,onBlur:ae,onKeyDown:X,className:l()(I,(0,y.Z)({},"".concat(I,"-disabled"),N),U==null?void 0:U.input),style:q==null?void 0:q.input,ref:$,size:M,type:T}))},ue=function(){var ee=Number(A)>0;if(O||L){var he=(0,i.D7)(W),le=(0,t.Z)(he).length,fe=(0,h.Z)(L)==="object"?L.formatter({value:he,count:le,maxLength:A}):"".concat(le).concat(ee?" / ".concat(A):"");return _.createElement(_.Fragment,null,!!L&&_.createElement("span",{className:l()("".concat(I,"-show-count-suffix"),(0,y.Z)({},"".concat(I,"-show-count-has-suffix"),!!O),U==null?void 0:U.count),style:(0,d.Z)({},q==null?void 0:q.count)},fe),O)}return null};return _.createElement(c,(0,C.Z)({},G,{prefixCls:I,className:F,inputElement:se(),handleReset:re,value:(0,i.D7)(W),focused:V,triggerFocus:J,suffix:ue(),disabled:N,classes:H,classNames:U,styles:q}))}),w=E,S=w},87887:function(ce,B,o){"use strict";o.d(B,{D7:function(){return u},He:function(){return C},X3:function(){return d},nH:function(){return h},rJ:function(){return y}});function C(l){return!!(l.addonBefore||l.addonAfter)}function d(l){return!!(l.prefix||l.suffix||l.allowClear)}function y(l,_,i,s){if(i){var c=_;if(_.type==="click"){var t=l.cloneNode(!0);c=Object.create(_,{target:{value:t},currentTarget:{value:t}}),t.value="",i(c);return}if(s!==void 0){c=Object.create(_,{target:{value:l},currentTarget:{value:l}}),l.value=s,i(c);return}i(c)}}function h(l,_){if(l){l.focus(_);var i=_||{},s=i.cursor;if(s){var c=l.value.length;switch(s){case"start":l.setSelectionRange(0,0);break;case"end":l.setSelectionRange(c,c);break;default:l.setSelectionRange(0,c)}}}}function u(l){return typeof l=="undefined"||l===null?"":String(l)}},66680:function(ce,B,o){"use strict";o.d(B,{Z:function(){return d}});var C=o(67294);function d(y){var h=C.useRef();h.current=y;var u=C.useCallback(function(){for(var l,_=arguments.length,i=new Array(_),s=0;s<_;s++)i[s]=arguments[s];return(l=h.current)===null||l===void 0?void 0:l.call.apply(l,[h].concat(i))},[]);return u}},21770:function(ce,B,o){"use strict";o.d(B,{Z:function(){return l}});var C=o(97685),d=o(66680),y=o(8410),h=o(63896);function u(_){return _!==void 0}function l(_,i){var s=i||{},c=s.defaultValue,t=s.value,n=s.onChange,e=s.postState,r=(0,h.Z)(function(){return u(t)?t:u(c)?typeof c=="function"?c():c:typeof _=="function"?_():_}),a=(0,C.Z)(r,2),f=a[0],E=a[1],w=t!==void 0?t:f,S=e?e(w):w,v=(0,d.Z)(n),x=(0,h.Z)([w]),g=(0,C.Z)(x,2),p=g[0],m=g[1];(0,y.o)(function(){var D=p[0];f!==D&&v(f,D)},[p]),(0,y.o)(function(){u(t)||E(t)},[t]);var b=(0,d.Z)(function(D,R){E(D,R),m([w],R)});return[S,b]}},98423:function(ce,B,o){"use strict";o.d(B,{Z:function(){return d}});var C=o(1413);function d(y,h){var u=(0,C.Z)({},y);return Array.isArray(h)&&h.forEach(function(l){delete u[l]}),u}},12320:function(ce){(function(B,o){if(1)ce.exports=o();else var C,d})(window,function(){return function(B){var o={};function C(d){if(o[d])return o[d].exports;var y=o[d]={i:d,l:!1,exports:{}};return B[d].call(y.exports,y,y.exports,C),y.l=!0,y.exports}return C.m=B,C.c=o,C.d=function(d,y,h){C.o(d,y)||Object.defineProperty(d,y,{enumerable:!0,get:h})},C.r=function(d){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})},C.t=function(d,y){if(1&y&&(d=C(d)),8&y||4&y&&typeof d=="object"&&d&&d.__esModule)return d;var h=Object.create(null);if(C.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:d}),2&y&&typeof d!="string")for(var u in d)C.d(h,u,function(l){return d[l]}.bind(null,u));return h},C.n=function(d){var y=d&&d.__esModule?function(){return d.default}:function(){return d};return C.d(y,"a",y),y},C.o=function(d,y){return Object.prototype.hasOwnProperty.call(d,y)},C.p="",C(C.s=34)}([function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.forwardEvent=o.EventEmitter=void 0;var d=function(){function y(){this._listeners=[],this._disposed=!1}return Object.defineProperty(y.prototype,"event",{get:function(){var h=this;return this._event||(this._event=function(u){return h._listeners.push(u),{dispose:function(){if(!h._disposed){for(var l=0;l<h._listeners.length;l++)if(h._listeners[l]===u)return void h._listeners.splice(l,1)}}}}),this._event},enumerable:!1,configurable:!0}),y.prototype.fire=function(h,u){for(var l=[],_=0;_<this._listeners.length;_++)l.push(this._listeners[_]);for(_=0;_<l.length;_++)l[_].call(void 0,h,u)},y.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},y}();o.EventEmitter=d,o.forwardEvent=function(y,h){return y(function(u){return h.fire(u)})}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.IUnicodeService=o.IOptionsService=o.ILogService=o.IInstantiationService=o.IDirtyRowService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;var d=C(14);o.IBufferService=d.createDecorator("BufferService"),o.ICoreMouseService=d.createDecorator("CoreMouseService"),o.ICoreService=d.createDecorator("CoreService"),o.ICharsetService=d.createDecorator("CharsetService"),o.IDirtyRowService=d.createDecorator("DirtyRowService"),o.IInstantiationService=d.createDecorator("InstantiationService"),o.ILogService=d.createDecorator("LogService"),o.IOptionsService=d.createDecorator("OptionsService"),o.IUnicodeService=d.createDecorator("UnicodeService")},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.Disposable=void 0;var d=function(){function h(){this._disposables=[],this._isDisposed=!1}return h.prototype.dispose=function(){this._isDisposed=!0;for(var u=0,l=this._disposables;u<l.length;u++)l[u].dispose();this._disposables.length=0},h.prototype.register=function(u){return this._disposables.push(u),u},h.prototype.unregister=function(u){var l=this._disposables.indexOf(u);l!==-1&&this._disposables.splice(l,1)},h}();function y(h){for(var u=0,l=h;u<l.length;u++)l[u].dispose();h.length=0}o.Disposable=d,o.disposeArray=y,o.getDisposeArrayDisposable=function(h){return{dispose:function(){return y(h)}}}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=256,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(i,s){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,t){c.__proto__=t}||function(c,t){for(var n in t)t.hasOwnProperty(n)&&(c[n]=t[n])})(i,s)},function(i,s){function c(){this.constructor=i}d(i,s),i.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)});Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;var h=C(8),u=C(3),l=C(6),_=function(i){function s(){var c=i!==null&&i.apply(this,arguments)||this;return c.content=0,c.fg=0,c.bg=0,c.extended=new l.ExtendedAttrs,c.combinedData="",c}return y(s,i),s.fromCharData=function(c){var t=new s;return t.setFromCharData(c),t},s.prototype.isCombined=function(){return 2097152&this.content},s.prototype.getWidth=function(){return this.content>>22},s.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?h.stringFromCodePoint(2097151&this.content):""},s.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},s.prototype.setFromCharData=function(c){this.fg=c[u.CHAR_DATA_ATTR_INDEX],this.bg=0;var t=!1;if(c[u.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(c[u.CHAR_DATA_CHAR_INDEX].length===2){var n=c[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=n&&n<=56319){var e=c[u.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=e&&e<=57343?this.content=1024*(n-55296)+e-56320+65536|c[u.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=c[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[u.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=c[u.CHAR_DATA_CHAR_INDEX],this.content=2097152|c[u.CHAR_DATA_WIDTH_INDEX]<<22)},s.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},s}(l.AttributeData);o.CellData=_},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.ISoundService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;var d=C(14);o.ICharSizeService=d.createDecorator("CharSizeService"),o.ICoreBrowserService=d.createDecorator("CoreBrowserService"),o.IMouseService=d.createDecorator("MouseService"),o.IRenderService=d.createDecorator("RenderService"),o.ISelectionService=d.createDecorator("SelectionService"),o.ISoundService=d.createDecorator("SoundService")},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;var d=function(){function h(){this.fg=0,this.bg=0,this.extended=new y}return h.toColorRGB=function(u){return[u>>>16&255,u>>>8&255,255&u]},h.fromColorRGB=function(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]},h.prototype.clone=function(){var u=new h;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u},h.prototype.isInverse=function(){return 67108864&this.fg},h.prototype.isBold=function(){return 134217728&this.fg},h.prototype.isUnderline=function(){return 268435456&this.fg},h.prototype.isBlink=function(){return 536870912&this.fg},h.prototype.isInvisible=function(){return 1073741824&this.fg},h.prototype.isItalic=function(){return 67108864&this.bg},h.prototype.isDim=function(){return 134217728&this.bg},h.prototype.getFgColorMode=function(){return 50331648&this.fg},h.prototype.getBgColorMode=function(){return 50331648&this.bg},h.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},h.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},h.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},h.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},h.prototype.isFgDefault=function(){return(50331648&this.fg)==0},h.prototype.isBgDefault=function(){return(50331648&this.bg)==0},h.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},h.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},h.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},h.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},h.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},h.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},h.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},h.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},h.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},h.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},h.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},h}();o.AttributeData=d;var y=function(){function h(u,l){u===void 0&&(u=0),l===void 0&&(l=-1),this.underlineStyle=u,this.underlineColor=l}return h.prototype.clone=function(){return new h(this.underlineStyle,this.underlineColor)},h.prototype.isEmpty=function(){return this.underlineStyle===0},h}();o.ExtendedAttrs=y},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(d,y,h,u){d.addEventListener(y,h,u);var l=!1;return{dispose:function(){l||(l=!0,d.removeEventListener(y,h,u))}}}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},o.utf32ToString=function(h,u,l){u===void 0&&(u=0),l===void 0&&(l=h.length);for(var _="",i=u;i<l;++i){var s=h[i];s>65535?(s-=65536,_+=String.fromCharCode(55296+(s>>10))+String.fromCharCode(s%1024+56320)):_+=String.fromCharCode(s)}return _};var d=function(){function h(){this._interim=0}return h.prototype.clear=function(){this._interim=0},h.prototype.decode=function(u,l){var _=u.length;if(!_)return 0;var i=0,s=0;this._interim&&(56320<=(n=u.charCodeAt(s++))&&n<=57343?l[i++]=1024*(this._interim-55296)+n-56320+65536:(l[i++]=this._interim,l[i++]=n),this._interim=0);for(var c=s;c<_;++c){var t=u.charCodeAt(c);if(55296<=t&&t<=56319){if(++c>=_)return this._interim=t,i;var n;56320<=(n=u.charCodeAt(c))&&n<=57343?l[i++]=1024*(t-55296)+n-56320+65536:(l[i++]=t,l[i++]=n)}else l[i++]=t}return i},h}();o.StringToUtf32=d;var y=function(){function h(){this.interim=new Uint8Array(3)}return h.prototype.clear=function(){this.interim.fill(0)},h.prototype.decode=function(u,l){var _=u.length;if(!_)return 0;var i,s,c,t,n=0,e=0,r=0;if(this.interim[0]){var a=!1,f=this.interim[0];f&=(224&f)==192?31:(240&f)==224?15:7;for(var E=0,w=void 0;(w=63&this.interim[++E])&&E<4;)f<<=6,f|=w;for(var S=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,v=S-E;r<v;){if(r>=_)return 0;if((192&(w=u[r++]))!=128){r--,a=!0;break}this.interim[E++]=w,f<<=6,f|=63&w}a||(S===2?f<128?r--:l[n++]=f:S===3?f<2048||f>=55296&&f<=57343||(l[n++]=f):f<65536||f>1114111||(l[n++]=f)),this.interim.fill(0)}for(var x=_-4,g=r;g<_;){for(;!(!(g<x)||128&(i=u[g])||128&(s=u[g+1])||128&(c=u[g+2])||128&(t=u[g+3]));)l[n++]=i,l[n++]=s,l[n++]=c,l[n++]=t,g+=4;if((i=u[g++])<128)l[n++]=i;else if((224&i)==192){if(g>=_)return this.interim[0]=i,n;if((192&(s=u[g++]))!=128){g--;continue}if((e=(31&i)<<6|63&s)<128){g--;continue}l[n++]=e}else if((240&i)==224){if(g>=_)return this.interim[0]=i,n;if((192&(s=u[g++]))!=128){g--;continue}if(g>=_)return this.interim[0]=i,this.interim[1]=s,n;if((192&(c=u[g++]))!=128){g--;continue}if((e=(15&i)<<12|(63&s)<<6|63&c)<2048||e>=55296&&e<=57343)continue;l[n++]=e}else if((248&i)==240){if(g>=_)return this.interim[0]=i,n;if((192&(s=u[g++]))!=128){g--;continue}if(g>=_)return this.interim[0]=i,this.interim[1]=s,n;if((192&(c=u[g++]))!=128){g--;continue}if(g>=_)return this.interim[0]=i,this.interim[1]=s,this.interim[2]=c,n;if((192&(t=u[g++]))!=128){g--;continue}if((e=(7&i)<<18|(63&s)<<12|(63&c)<<6|63&t)<65536||e>1114111)continue;l[n++]=e}}return n},h}();o.Utf8ToUtf32=y},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.CHAR_ATLAS_CELL_SPACING=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0,o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.CHAR_ATLAS_CELL_SPACING=1},function(B,o,C){"use strict";var d,y,h,u;function l(i){var s=i.toString(16);return s.length<2?"0"+s:s}function _(i,s){return i<s?(s+.05)/(i+.05):(i+.05)/(s+.05)}Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=void 0,function(i){i.toCss=function(s,c,t,n){return n!==void 0?"#"+l(s)+l(c)+l(t)+l(n):"#"+l(s)+l(c)+l(t)},i.toRgba=function(s,c,t,n){return n===void 0&&(n=255),(s<<24|c<<16|t<<8|n)>>>0}}(d=o.channels||(o.channels={})),(y=o.color||(o.color={})).blend=function(i,s){var c=(255&s.rgba)/255;if(c===1)return{css:s.css,rgba:s.rgba};var t=s.rgba>>24&255,n=s.rgba>>16&255,e=s.rgba>>8&255,r=i.rgba>>24&255,a=i.rgba>>16&255,f=i.rgba>>8&255,E=r+Math.round((t-r)*c),w=a+Math.round((n-a)*c),S=f+Math.round((e-f)*c);return{css:d.toCss(E,w,S),rgba:d.toRgba(E,w,S)}},y.isOpaque=function(i){return(255&i.rgba)==255},y.ensureContrastRatio=function(i,s,c){var t=u.ensureContrastRatio(i.rgba,s.rgba,c);if(t)return u.toColor(t>>24&255,t>>16&255,t>>8&255)},y.opaque=function(i){var s=(255|i.rgba)>>>0,c=u.toChannels(s),t=c[0],n=c[1],e=c[2];return{css:d.toCss(t,n,e),rgba:s}},y.opacity=function(i,s){var c=Math.round(255*s),t=u.toChannels(i.rgba),n=t[0],e=t[1],r=t[2];return{css:d.toCss(n,e,r,c),rgba:d.toRgba(n,e,r,c)}},(o.css||(o.css={})).toColor=function(i){switch(i.length){case 7:return{css:i,rgba:(parseInt(i.slice(1),16)<<8|255)>>>0};case 9:return{css:i,rgba:parseInt(i.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(i){function s(c,t,n){var e=c/255,r=t/255,a=n/255;return .2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4))}i.relativeLuminance=function(c){return s(c>>16&255,c>>8&255,255&c)},i.relativeLuminance2=s}(h=o.rgb||(o.rgb={})),function(i){function s(t,n,e){for(var r=t>>24&255,a=t>>16&255,f=t>>8&255,E=n>>24&255,w=n>>16&255,S=n>>8&255,v=_(h.relativeLuminance2(E,S,w),h.relativeLuminance2(r,a,f));v<e&&(E>0||w>0||S>0);)E-=Math.max(0,Math.ceil(.1*E)),w-=Math.max(0,Math.ceil(.1*w)),S-=Math.max(0,Math.ceil(.1*S)),v=_(h.relativeLuminance2(E,S,w),h.relativeLuminance2(r,a,f));return(E<<24|w<<16|S<<8|255)>>>0}function c(t,n,e){for(var r=t>>24&255,a=t>>16&255,f=t>>8&255,E=n>>24&255,w=n>>16&255,S=n>>8&255,v=_(h.relativeLuminance2(E,S,w),h.relativeLuminance2(r,a,f));v<e&&(E<255||w<255||S<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),w=Math.min(255,w+Math.ceil(.1*(255-w))),S=Math.min(255,S+Math.ceil(.1*(255-S))),v=_(h.relativeLuminance2(E,S,w),h.relativeLuminance2(r,a,f));return(E<<24|w<<16|S<<8|255)>>>0}i.ensureContrastRatio=function(t,n,e){var r=h.relativeLuminance(t>>8),a=h.relativeLuminance(n>>8);if(_(r,a)<e)return a<r?s(t,n,e):c(t,n,e)},i.reduceLuminance=s,i.increaseLuminance=c,i.toChannels=function(t){return[t>>24&255,t>>16&255,t>>8&255,255&t]},i.toColor=function(t,n,e){return{css:d.toCss(t,n,e),rgba:d.toRgba(t,n,e)}}}(u=o.rgba||(o.rgba={})),o.toPaddedHex=l,o.contrastRatio=_},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.isSafari=o.isFirefox=void 0;var d=typeof navigator=="undefined",y=d?"node":navigator.userAgent,h=d?"node":navigator.platform;function u(l,_){return l.indexOf(_)>=0}o.isFirefox=!!~y.indexOf("Firefox"),o.isSafari=/^((?!chrome|android).)*safari/i.test(y),o.isMac=u(["Macintosh","MacIntel","MacPPC","Mac68K"],h),o.isIpad=h==="iPad",o.isIphone=h==="iPhone",o.isWindows=u(["Windows","Win16","Win32","WinCE"],h),o.isLinux=h.indexOf("Linux")>=0},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.C1=o.C0=void 0,function(d){d.NUL="\0",d.SOH="",d.STX="",d.ETX="",d.EOT="",d.ENQ="",d.ACK="",d.BEL="\x07",d.BS="\b",d.HT=" ",d.LF=`
|
|
|
`,d.VT="\v",d.FF="\f",d.CR="\r",d.SO="",d.SI="",d.DLE="",d.DC1="",d.DC2="",d.DC3="",d.DC4="",d.NAK="",d.SYN="",d.ETB="",d.CAN="",d.EM="",d.SUB="",d.ESC="\x1B",d.FS="",d.GS="",d.RS="",d.US="",d.SP=" ",d.DEL="\x7F"}(o.C0||(o.C0={})),function(d){d.PAD="\x80",d.HOP="\x81",d.BPH="\x82",d.NBH="\x83",d.IND="\x84",d.NEL="\x85",d.SSA="\x86",d.ESA="\x87",d.HTS="\x88",d.HTJ="\x89",d.VTS="\x8A",d.PLD="\x8B",d.PLU="\x8C",d.RI="\x8D",d.SS2="\x8E",d.SS3="\x8F",d.DCS="\x90",d.PU1="\x91",d.PU2="\x92",d.STS="\x93",d.CCH="\x94",d.MW="\x95",d.SPA="\x96",d.EPA="\x97",d.SOS="\x98",d.SGCI="\x99",d.SCI="\x9A",d.CSI="\x9B",d.ST="\x9C",d.OSC="\x9D",d.PM="\x9E",d.APC="\x9F"}(o.C1||(o.C1={}))},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.BaseRenderLayer=void 0;var d=C(3),y=C(9),h=C(25),u=C(6),l=C(28),_=C(10),i=C(17),s=function(){function c(t,n,e,r,a,f,E,w){this._container=t,this._alpha=r,this._colors=a,this._rendererId=f,this._bufferService=E,this._optionsService=w,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+n+"-layer"),this._canvas.style.zIndex=e.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return c.prototype.dispose=function(){var t;i.removeElementFromParent(this._canvas),(t=this._charAtlas)===null||t===void 0||t.dispose()},c.prototype._initCanvas=function(){this._ctx=l.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},c.prototype.onOptionsChanged=function(){},c.prototype.onBlur=function(){},c.prototype.onFocus=function(){},c.prototype.onCursorMove=function(){},c.prototype.onGridChanged=function(t,n){},c.prototype.onSelectionChanged=function(t,n,e){e===void 0&&(e=!1)},c.prototype.setColors=function(t){this._refreshCharAtlas(t)},c.prototype._setTransparency=function(t){if(t!==this._alpha){var n=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,n),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},c.prototype._refreshCharAtlas=function(t){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=h.acquireCharAtlas(this._optionsService.options,this._rendererId,t,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},c.prototype.resize=function(t){this._scaledCellWidth=t.scaledCellWidth,this._scaledCellHeight=t.scaledCellHeight,this._scaledCharWidth=t.scaledCharWidth,this._scaledCharHeight=t.scaledCharHeight,this._scaledCharLeft=t.scaledCharLeft,this._scaledCharTop=t.scaledCharTop,this._canvas.width=t.scaledCanvasWidth,this._canvas.height=t.scaledCanvasHeight,this._canvas.style.width=t.canvasWidth+"px",this._canvas.style.height=t.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},c.prototype._fillCells=function(t,n,e,r){this._ctx.fillRect(t*this._scaledCellWidth,n*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight)},c.prototype._fillBottomLineAtCells=function(t,n,e){e===void 0&&(e=1),this._ctx.fillRect(t*this._scaledCellWidth,(n+1)*this._scaledCellHeight-window.devicePixelRatio-1,e*this._scaledCellWidth,window.devicePixelRatio)},c.prototype._fillLeftLineAtCell=function(t,n,e){this._ctx.fillRect(t*this._scaledCellWidth,n*this._scaledCellHeight,window.devicePixelRatio*e,this._scaledCellHeight)},c.prototype._strokeRectAtCell=function(t,n,e,r){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,n*this._scaledCellHeight+window.devicePixelRatio/2,e*this._scaledCellWidth-window.devicePixelRatio,r*this._scaledCellHeight-window.devicePixelRatio)},c.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},c.prototype._clearCells=function(t,n,e,r){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,n*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,n*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight))},c.prototype._fillCharTrueColor=function(t,n,e){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(e),this._ctx.fillText(t.getChars(),n*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},c.prototype._drawChars=function(t,n,e){var r,a,f=this._getContrastColor(t);f||t.isFgRGB()||t.isBgRGB()?this._drawUncachedChars(t,n,e,f):(t.isInverse()?(r=t.isBgDefault()?y.INVERTED_DEFAULT_COLOR:t.getBgColor(),a=t.isFgDefault()?y.INVERTED_DEFAULT_COLOR:t.getFgColor()):(a=t.isBgDefault()?d.DEFAULT_COLOR:t.getBgColor(),r=t.isFgDefault()?d.DEFAULT_COLOR:t.getFgColor()),r+=this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&r<8?8:0,this._currentGlyphIdentifier.chars=t.getChars()||d.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=t.getCode()||d.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=a,this._currentGlyphIdentifier.fg=r,this._currentGlyphIdentifier.bold=!!t.isBold(),this._currentGlyphIdentifier.dim=!!t.isDim(),this._currentGlyphIdentifier.italic=!!t.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,n*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(t,n,e))},c.prototype._drawUncachedChars=function(t,n,e,r){if(this._ctx.save(),this._ctx.font=this._getFont(!!t.isBold(),!!t.isItalic()),this._ctx.textBaseline="middle",t.isInverse())if(r)this._ctx.fillStyle=r.css;else if(t.isBgDefault())this._ctx.fillStyle=_.color.opaque(this._colors.background).css;else if(t.isBgRGB())this._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(t.getBgColor()).join(",")+")";else{var a=t.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&a<8&&(a+=8),this._ctx.fillStyle=this._colors.ansi[a].css}else if(r)this._ctx.fillStyle=r.css;else if(t.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(t.isFgRGB())this._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(t.getFgColor()).join(",")+")";else{var f=t.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&f<8&&(f+=8),this._ctx.fillStyle=this._colors.ansi[f].css}this._clipRow(e),t.isDim()&&(this._ctx.globalAlpha=y.DIM_OPACITY),this._ctx.fillText(t.getChars(),n*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},c.prototype._clipRow=function(t){this._ctx.beginPath(),this._ctx.rect(0,t*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},c.prototype._getFont=function(t,n){return(n?"italic":"")+" "+(t?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},c.prototype._getContrastColor=function(t){if(this._optionsService.options.minimumContrastRatio!==1){var n=this._colors.contrastCache.getColor(t.bg,t.fg);if(n!==void 0)return n||void 0;var e=t.getFgColor(),r=t.getFgColorMode(),a=t.getBgColor(),f=t.getBgColorMode(),E=!!t.isInverse(),w=!!t.isInverse();if(E){var S=e;e=a,a=S;var v=r;r=f,f=v}var x=this._resolveBackgroundRgba(f,a,E),g=this._resolveForegroundRgba(r,e,E,w),p=_.rgba.ensureContrastRatio(x,g,this._optionsService.options.minimumContrastRatio);if(p){var m={css:_.channels.toCss(p>>24&255,p>>16&255,p>>8&255),rgba:p};return this._colors.contrastCache.setColor(t.bg,t.fg,m),m}this._colors.contrastCache.setColor(t.bg,t.fg,null)}},c.prototype._resolveBackgroundRgba=function(t,n,e){switch(t){case 16777216:case 33554432:return this._colors.ansi[n].rgba;case 50331648:return n<<8;case 0:default:return e?this._colors.foreground.rgba:this._colors.background.rgba}},c.prototype._resolveForegroundRgba=function(t,n,e,r){switch(t){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&r&&n<8&&(n+=8),this._colors.ansi[n].rgba;case 50331648:return n<<8;case 0:default:return e?this._colors.background.rgba:this._colors.foreground.rgba}},c}();o.BaseRenderLayer=s},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;function d(y,h,u){h.di$target===h?h.di$dependencies.push({id:y,index:u}):(h.di$dependencies=[{id:y,index:u}],h.di$target=h)}o.serviceRegistry=new Map,o.getServiceDependencies=function(y){return y.di$dependencies||[]},o.createDecorator=function(y){if(o.serviceRegistry.has(y))return o.serviceRegistry.get(y);var h=function(u,l,_){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");d(h,u,_)};return h.toString=function(){return y},o.serviceRegistry.set(y,h),h}},function(B,o,C){"use strict";function d(y,h,u,l){if(u===void 0&&(u=0),l===void 0&&(l=y.length),u>=y.length)return y;u=(y.length+u)%y.length,l=l>=y.length?y.length:(y.length+l)%y.length;for(var _=u;_<l;++_)y[_]=h;return y}Object.defineProperty(o,"__esModule",{value:!0}),o.concat=o.fillFallback=o.fill=void 0,o.fill=function(y,h,u,l){return y.fill?y.fill(h,u,l):d(y,h,u,l)},o.fillFallback=d,o.concat=function(y,h){var u=new y.constructor(y.length+h.length);return u.set(y),u.set(h,y.length),u}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;var d=C(8),y=C(3),h=C(4),u=C(6);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);var l=function(){function _(i,s,c){c===void 0&&(c=!1),this.isWrapped=c,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*i);for(var t=s||h.CellData.fromCharData([0,y.NULL_CELL_CHAR,y.NULL_CELL_WIDTH,y.NULL_CELL_CODE]),n=0;n<i;++n)this.setCell(n,t);this.length=i}return _.prototype.get=function(i){var s=this._data[3*i+0],c=2097151&s;return[this._data[3*i+1],2097152&s?this._combined[i]:c?d.stringFromCodePoint(c):"",s>>22,2097152&s?this._combined[i].charCodeAt(this._combined[i].length-1):c]},_.prototype.set=function(i,s){this._data[3*i+1]=s[y.CHAR_DATA_ATTR_INDEX],s[y.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[i]=s[1],this._data[3*i+0]=2097152|i|s[y.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*i+0]=s[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|s[y.CHAR_DATA_WIDTH_INDEX]<<22},_.prototype.getWidth=function(i){return this._data[3*i+0]>>22},_.prototype.hasWidth=function(i){return 12582912&this._data[3*i+0]},_.prototype.getFg=function(i){return this._data[3*i+1]},_.prototype.getBg=function(i){return this._data[3*i+2]},_.prototype.hasContent=function(i){return 4194303&this._data[3*i+0]},_.prototype.getCodePoint=function(i){var s=this._data[3*i+0];return 2097152&s?this._combined[i].charCodeAt(this._combined[i].length-1):2097151&s},_.prototype.isCombined=function(i){return 2097152&this._data[3*i+0]},_.prototype.getString=function(i){var s=this._data[3*i+0];return 2097152&s?this._combined[i]:2097151&s?d.stringFromCodePoint(2097151&s):""},_.prototype.loadCell=function(i,s){var c=3*i;return s.content=this._data[c+0],s.fg=this._data[c+1],s.bg=this._data[c+2],2097152&s.content&&(s.combinedData=this._combined[i]),268435456&s.bg&&(s.extended=this._extendedAttrs[i]),s},_.prototype.setCell=function(i,s){2097152&s.content&&(this._combined[i]=s.combinedData),268435456&s.bg&&(this._extendedAttrs[i]=s.extended),this._data[3*i+0]=s.content,this._data[3*i+1]=s.fg,this._data[3*i+2]=s.bg},_.prototype.setCellFromCodePoint=function(i,s,c,t,n,e){268435456&n&&(this._extendedAttrs[i]=e),this._data[3*i+0]=s|c<<22,this._data[3*i+1]=t,this._data[3*i+2]=n},_.prototype.addCodepointToCell=function(i,s){var c=this._data[3*i+0];2097152&c?this._combined[i]+=d.stringFromCodePoint(s):(2097151&c?(this._combined[i]=d.stringFromCodePoint(2097151&c)+d.stringFromCodePoint(s),c&=-2097152,c|=2097152):c=s|1<<22,this._data[3*i+0]=c)},_.prototype.insertCells=function(i,s,c,t){if((i%=this.length)&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new u.ExtendedAttrs),s<this.length-i){for(var n=new h.CellData,e=this.length-i-s-1;e>=0;--e)this.setCell(i+s+e,this.loadCell(i+e,n));for(e=0;e<s;++e)this.setCell(i+e,c)}else for(e=i;e<this.length;++e)this.setCell(e,c);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new u.ExtendedAttrs)},_.prototype.deleteCells=function(i,s,c,t){if(i%=this.length,s<this.length-i){for(var n=new h.CellData,e=0;e<this.length-i-s;++e)this.setCell(i+e,this.loadCell(i+s+e,n));for(e=this.length-s;e<this.length;++e)this.setCell(e,c)}else for(e=i;e<this.length;++e)this.setCell(e,c);i&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new u.ExtendedAttrs),this.getWidth(i)!==0||this.hasContent(i)||this.setCellFromCodePoint(i,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new u.ExtendedAttrs)},_.prototype.replaceCells=function(i,s,c,t){for(i&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new u.ExtendedAttrs),s<this.length&&this.getWidth(s-1)===2&&this.setCellFromCodePoint(s,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new u.ExtendedAttrs);i<s&&i<this.length;)this.setCell(i++,c)},_.prototype.resize=function(i,s){if(i!==this.length){if(i>this.length){var c=new Uint32Array(3*i);this.length&&(3*i<this._data.length?c.set(this._data.subarray(0,3*i)):c.set(this._data)),this._data=c;for(var t=this.length;t<i;++t)this.setCell(t,s)}else if(i){(c=new Uint32Array(3*i)).set(this._data.subarray(0,3*i)),this._data=c;var n=Object.keys(this._combined);for(t=0;t<n.length;t++){var e=parseInt(n[t],10);e>=i&&delete this._combined[e]}}else this._data=new Uint32Array(0),this._combined={};this.length=i}},_.prototype.fill=function(i){this._combined={},this._extendedAttrs={};for(var s=0;s<this.length;++s)this.setCell(s,i)},_.prototype.copyFrom=function(i){for(var s in this.length!==i.length?this._data=new Uint32Array(i._data):this._data.set(i._data),this.length=i.length,this._combined={},i._combined)this._combined[s]=i._combined[s];for(var s in this._extendedAttrs={},i._extendedAttrs)this._extendedAttrs[s]=i._extendedAttrs[s];this.isWrapped=i.isWrapped},_.prototype.clone=function(){var i=new _(0);for(var s in i._data=new Uint32Array(this._data),i.length=this.length,this._combined)i._combined[s]=this._combined[s];for(var s in this._extendedAttrs)i._extendedAttrs[s]=this._extendedAttrs[s];return i.isWrapped=this.isWrapped,i},_.prototype.getTrimmedLength=function(){for(var i=this.length-1;i>=0;--i)if(4194303&this._data[3*i+0])return i+(this._data[3*i+0]>>22);return 0},_.prototype.copyCellsFrom=function(i,s,c,t,n){var e=i._data;if(n)for(var r=t-1;r>=0;r--)for(var a=0;a<3;a++)this._data[3*(c+r)+a]=e[3*(s+r)+a];else for(r=0;r<t;r++)for(a=0;a<3;a++)this._data[3*(c+r)+a]=e[3*(s+r)+a];var f=Object.keys(i._combined);for(a=0;a<f.length;a++){var E=parseInt(f[a],10);E>=s&&(this._combined[E-s+c]=i._combined[E])}},_.prototype.translateToString=function(i,s,c){i===void 0&&(i=!1),s===void 0&&(s=0),c===void 0&&(c=this.length),i&&(c=Math.min(c,this.getTrimmedLength()));for(var t="";s<c;){var n=this._data[3*s+0],e=2097151&n;t+=2097152&n?this._combined[s]:e?d.stringFromCodePoint(e):y.WHITESPACE_CELL_CHAR,s+=n>>22||1}return t},_}();o.BufferLine=l},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.removeElementFromParent=void 0,o.removeElementFromParent=function(){for(var d,y=[],h=0;h<arguments.length;h++)y[h]=arguments[h];for(var u=0,l=y;u<l.length;u++){var _=l[u];(d=_==null?void 0:_.parentElement)===null||d===void 0||d.removeChild(_)}}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(g,p){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var D in b)b.hasOwnProperty(D)&&(m[D]=b[D])})(g,p)},function(g,p){function m(){this.constructor=g}d(g,p),g.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)});Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;var h,u=C(12),l=C(20),_=C(39),i=C(2),s=C(15),c=C(8),t=C(16),n=C(0),e=C(3),r=C(4),a=C(6),f=C(22),E=C(24),w={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function S(g,p){if(g>24)return p.setWinLines||!1;switch(g){case 1:return!!p.restoreWin;case 2:return!!p.minimizeWin;case 3:return!!p.setWinPosition;case 4:return!!p.setWinSizePixels;case 5:return!!p.raiseWin;case 6:return!!p.lowerWin;case 7:return!!p.refreshWin;case 8:return!!p.setWinSizeChars;case 9:return!!p.maximizeWin;case 10:return!!p.fullscreenWin;case 11:return!!p.getWinState;case 13:return!!p.getWinPosition;case 14:return!!p.getWinSizePixels;case 15:return!!p.getScreenSizePixels;case 16:return!!p.getCellSizePixels;case 18:return!!p.getWinSizeChars;case 19:return!!p.getScreenSizeChars;case 20:return!!p.getIconTitle;case 21:return!!p.getWinTitle;case 22:return!!p.pushTitle;case 23:return!!p.popTitle;case 24:return!!p.setWinLines}return!1}(function(g){g[g.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",g[g.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(h=o.WindowsOptionsReportType||(o.WindowsOptionsReportType={}));var v=function(){function g(p,m,b,D){this._bufferService=p,this._coreService=m,this._logService=b,this._optionsService=D,this._data=new Uint32Array(0)}return g.prototype.hook=function(p){this._data=new Uint32Array(0)},g.prototype.put=function(p,m,b){this._data=s.concat(this._data,p.subarray(m,b))},g.prototype.unhook=function(p){if(p){var m=c.utf32ToString(this._data);switch(this._data=new Uint32Array(0),m){case'"q':return this._coreService.triggerDataEvent(u.C0.ESC+'P1$r0"q'+u.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(u.C0.ESC+'P1$r61;1"p'+u.C0.ESC+"\\");case"r":var b=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(u.C0.ESC+"P1$r"+b+u.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(u.C0.ESC+"P1$r0m"+u.C0.ESC+"\\");case" q":var D={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return D-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(u.C0.ESC+"P1$r"+D+" q"+u.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",m),this._coreService.triggerDataEvent(u.C0.ESC+"P0$r"+u.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},g}(),x=function(g){function p(m,b,D,R,k,I,N,M,F){F===void 0&&(F=new _.EscapeSequenceParser);var A=g.call(this)||this;A._bufferService=m,A._charsetService=b,A._coreService=D,A._dirtyRowService=R,A._logService=k,A._optionsService=I,A._coreMouseService=N,A._unicodeService=M,A._parser=F,A._parseBuffer=new Uint32Array(4096),A._stringDecoder=new c.StringToUtf32,A._utf8Decoder=new c.Utf8ToUtf32,A._workCell=new r.CellData,A._windowTitle="",A._iconName="",A._windowTitleStack=[],A._iconNameStack=[],A._curAttrData=t.DEFAULT_ATTR_DATA.clone(),A._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone(),A._onRequestBell=new n.EventEmitter,A._onRequestRefreshRows=new n.EventEmitter,A._onRequestReset=new n.EventEmitter,A._onRequestScroll=new n.EventEmitter,A._onRequestSyncScrollBar=new n.EventEmitter,A._onRequestWindowsOptionsReport=new n.EventEmitter,A._onA11yChar=new n.EventEmitter,A._onA11yTab=new n.EventEmitter,A._onCursorMove=new n.EventEmitter,A._onLineFeed=new n.EventEmitter,A._onScroll=new n.EventEmitter,A._onTitleChange=new n.EventEmitter,A.register(A._parser),A._parser.setCsiHandlerFallback(function(T,H){A._logService.debug("Unknown CSI code: ",{identifier:A._parser.identToString(T),params:H.toArray()})}),A._parser.setEscHandlerFallback(function(T){A._logService.debug("Unknown ESC code: ",{identifier:A._parser.identToString(T)})}),A._parser.setExecuteHandlerFallback(function(T){A._logService.debug("Unknown EXECUTE code: ",{code:T})}),A._parser.setOscHandlerFallback(function(T,H,U){A._logService.debug("Unknown OSC code: ",{identifier:T,action:H,data:U})}),A._parser.setDcsHandlerFallback(function(T,H,U){H==="HOOK"&&(U=U.toArray()),A._logService.debug("Unknown DCS code: ",{identifier:A._parser.identToString(T),action:H,payload:U})}),A._parser.setPrintHandler(function(T,H,U){return A.print(T,H,U)}),A._parser.setCsiHandler({final:"@"},function(T){return A.insertChars(T)}),A._parser.setCsiHandler({intermediates:" ",final:"@"},function(T){return A.scrollLeft(T)}),A._parser.setCsiHandler({final:"A"},function(T){return A.cursorUp(T)}),A._parser.setCsiHandler({intermediates:" ",final:"A"},function(T){return A.scrollRight(T)}),A._parser.setCsiHandler({final:"B"},function(T){return A.cursorDown(T)}),A._parser.setCsiHandler({final:"C"},function(T){return A.cursorForward(T)}),A._parser.setCsiHandler({final:"D"},function(T){return A.cursorBackward(T)}),A._parser.setCsiHandler({final:"E"},function(T){return A.cursorNextLine(T)}),A._parser.setCsiHandler({final:"F"},function(T){return A.cursorPrecedingLine(T)}),A._parser.setCsiHandler({final:"G"},function(T){return A.cursorCharAbsolute(T)}),A._parser.setCsiHandler({final:"H"},function(T){return A.cursorPosition(T)}),A._parser.setCsiHandler({final:"I"},function(T){return A.cursorForwardTab(T)}),A._parser.setCsiHandler({final:"J"},function(T){return A.eraseInDisplay(T)}),A._parser.setCsiHandler({prefix:"?",final:"J"},function(T){return A.eraseInDisplay(T)}),A._parser.setCsiHandler({final:"K"},function(T){return A.eraseInLine(T)}),A._parser.setCsiHandler({prefix:"?",final:"K"},function(T){return A.eraseInLine(T)}),A._parser.setCsiHandler({final:"L"},function(T){return A.insertLines(T)}),A._parser.setCsiHandler({final:"M"},function(T){return A.deleteLines(T)}),A._parser.setCsiHandler({final:"P"},function(T){return A.deleteChars(T)}),A._parser.setCsiHandler({final:"S"},function(T){return A.scrollUp(T)}),A._parser.setCsiHandler({final:"T"},function(T){return A.scrollDown(T)}),A._parser.setCsiHandler({final:"X"},function(T){return A.eraseChars(T)}),A._parser.setCsiHandler({final:"Z"},function(T){return A.cursorBackwardTab(T)}),A._parser.setCsiHandler({final:"`"},function(T){return A.charPosAbsolute(T)}),A._parser.setCsiHandler({final:"a"},function(T){return A.hPositionRelative(T)}),A._parser.setCsiHandler({final:"b"},function(T){return A.repeatPrecedingCharacter(T)}),A._parser.setCsiHandler({final:"c"},function(T){return A.sendDeviceAttributesPrimary(T)}),A._parser.setCsiHandler({prefix:">",final:"c"},function(T){return A.sendDeviceAttributesSecondary(T)}),A._parser.setCsiHandler({final:"d"},function(T){return A.linePosAbsolute(T)}),A._parser.setCsiHandler({final:"e"},function(T){return A.vPositionRelative(T)}),A._parser.setCsiHandler({final:"f"},function(T){return A.hVPosition(T)}),A._parser.setCsiHandler({final:"g"},function(T){return A.tabClear(T)}),A._parser.setCsiHandler({final:"h"},function(T){return A.setMode(T)}),A._parser.setCsiHandler({prefix:"?",final:"h"},function(T){return A.setModePrivate(T)}),A._parser.setCsiHandler({final:"l"},function(T){return A.resetMode(T)}),A._parser.setCsiHandler({prefix:"?",final:"l"},function(T){return A.resetModePrivate(T)}),A._parser.setCsiHandler({final:"m"},function(T){return A.charAttributes(T)}),A._parser.setCsiHandler({final:"n"},function(T){return A.deviceStatus(T)}),A._parser.setCsiHandler({prefix:"?",final:"n"},function(T){return A.deviceStatusPrivate(T)}),A._parser.setCsiHandler({intermediates:"!",final:"p"},function(T){return A.softReset(T)}),A._parser.setCsiHandler({intermediates:" ",final:"q"},function(T){return A.setCursorStyle(T)}),A._parser.setCsiHandler({final:"r"},function(T){return A.setScrollRegion(T)}),A._parser.setCsiHandler({final:"s"},function(T){return A.saveCursor(T)}),A._parser.setCsiHandler({final:"t"},function(T){return A.windowOptions(T)}),A._parser.setCsiHandler({final:"u"},function(T){return A.restoreCursor(T)}),A._parser.setCsiHandler({intermediates:"'",final:"}"},function(T){return A.insertColumns(T)}),A._parser.setCsiHandler({intermediates:"'",final:"~"},function(T){return A.deleteColumns(T)}),A._parser.setExecuteHandler(u.C0.BEL,function(){return A.bell()}),A._parser.setExecuteHandler(u.C0.LF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(u.C0.VT,function(){return A.lineFeed()}),A._parser.setExecuteHandler(u.C0.FF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(u.C0.CR,function(){return A.carriageReturn()}),A._parser.setExecuteHandler(u.C0.BS,function(){return A.backspace()}),A._parser.setExecuteHandler(u.C0.HT,function(){return A.tab()}),A._parser.setExecuteHandler(u.C0.SO,function(){return A.shiftOut()}),A._parser.setExecuteHandler(u.C0.SI,function(){return A.shiftIn()}),A._parser.setExecuteHandler(u.C1.IND,function(){return A.index()}),A._parser.setExecuteHandler(u.C1.NEL,function(){return A.nextLine()}),A._parser.setExecuteHandler(u.C1.HTS,function(){return A.tabSet()}),A._parser.setOscHandler(0,new f.OscHandler(function(T){A.setTitle(T),A.setIconName(T)})),A._parser.setOscHandler(1,new f.OscHandler(function(T){return A.setIconName(T)})),A._parser.setOscHandler(2,new f.OscHandler(function(T){return A.setTitle(T)})),A._parser.setEscHandler({final:"7"},function(){return A.saveCursor()}),A._parser.setEscHandler({final:"8"},function(){return A.restoreCursor()}),A._parser.setEscHandler({final:"D"},function(){return A.index()}),A._parser.setEscHandler({final:"E"},function(){return A.nextLine()}),A._parser.setEscHandler({final:"H"},function(){return A.tabSet()}),A._parser.setEscHandler({final:"M"},function(){return A.reverseIndex()}),A._parser.setEscHandler({final:"="},function(){return A.keypadApplicationMode()}),A._parser.setEscHandler({final:">"},function(){return A.keypadNumericMode()}),A._parser.setEscHandler({final:"c"},function(){return A.fullReset()}),A._parser.setEscHandler({final:"n"},function(){return A.setgLevel(2)}),A._parser.setEscHandler({final:"o"},function(){return A.setgLevel(3)}),A._parser.setEscHandler({final:"|"},function(){return A.setgLevel(3)}),A._parser.setEscHandler({final:"}"},function(){return A.setgLevel(2)}),A._parser.setEscHandler({final:"~"},function(){return A.setgLevel(1)}),A._parser.setEscHandler({intermediates:"%",final:"@"},function(){return A.selectDefaultCharset()}),A._parser.setEscHandler({intermediates:"%",final:"G"},function(){return A.selectDefaultCharset()});var O=function(T){L._parser.setEscHandler({intermediates:"(",final:T},function(){return A.selectCharset("("+T)}),L._parser.setEscHandler({intermediates:")",final:T},function(){return A.selectCharset(")"+T)}),L._parser.setEscHandler({intermediates:"*",final:T},function(){return A.selectCharset("*"+T)}),L._parser.setEscHandler({intermediates:"+",final:T},function(){return A.selectCharset("+"+T)}),L._parser.setEscHandler({intermediates:"-",final:T},function(){return A.selectCharset("-"+T)}),L._parser.setEscHandler({intermediates:".",final:T},function(){return A.selectCharset("."+T)}),L._parser.setEscHandler({intermediates:"/",final:T},function(){return A.selectCharset("/"+T)})},L=this;for(var P in l.CHARSETS)O(P);return A._parser.setEscHandler({intermediates:"#",final:"8"},function(){return A.screenAlignmentPattern()}),A._parser.setErrorHandler(function(T){return A._logService.error("Parsing error: ",T),T}),A._parser.setDcsHandler({intermediates:"$",final:"q"},new v(A._bufferService,A._coreService,A._logService,A._optionsService)),A}return y(p,g),Object.defineProperty(p.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),p.prototype.dispose=function(){g.prototype.dispose.call(this)},p.prototype.parse=function(m){var b=this._bufferService.buffer,D=b.x,R=b.y;if(this._logService.debug("parsing data",m),this._parseBuffer.length<m.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(m.length,131072))),this._dirtyRowService.clearRange(),m.length>131072)for(var k=0;k<m.length;k+=131072){var I=k+131072<m.length?k+131072:m.length,N=typeof m=="string"?this._stringDecoder.decode(m.substring(k,I),this._parseBuffer):this._utf8Decoder.decode(m.subarray(k,I),this._parseBuffer);this._parser.parse(this._parseBuffer,N)}else N=typeof m=="string"?this._stringDecoder.decode(m,this._parseBuffer):this._utf8Decoder.decode(m,this._parseBuffer),this._parser.parse(this._parseBuffer,N);(b=this._bufferService.buffer).x===D&&b.y===R||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},p.prototype.print=function(m,b,D){var R,k,I=this._bufferService.buffer,N=this._charsetService.charset,M=this._optionsService.options.screenReaderMode,F=this._bufferService.cols,A=this._coreService.decPrivateModes.wraparound,O=this._coreService.modes.insertMode,L=this._curAttrData,P=I.lines.get(I.ybase+I.y);this._dirtyRowService.markDirty(I.y),I.x&&D-b>0&&P.getWidth(I.x-1)===2&&P.setCellFromCodePoint(I.x-1,0,1,L.fg,L.bg,L.extended);for(var T=b;T<D;++T){if(R=m[T],k=this._unicodeService.wcwidth(R),R<127&&N){var H=N[String.fromCharCode(R)];H&&(R=H.charCodeAt(0))}if(M&&this._onA11yChar.fire(c.stringFromCodePoint(R)),k||!I.x){if(I.x+k-1>=F){if(A){for(;I.x<F;)P.setCellFromCodePoint(I.x++,0,1,L.fg,L.bg,L.extended);I.x=0,I.y++,I.y===I.scrollBottom+1?(I.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(I.y>=this._bufferService.rows&&(I.y=this._bufferService.rows-1),I.lines.get(I.ybase+I.y).isWrapped=!0),P=I.lines.get(I.ybase+I.y)}else if(I.x=F-1,k===2)continue}if(O&&(P.insertCells(I.x,k,I.getNullCell(L),L),P.getWidth(F-1)===2&&P.setCellFromCodePoint(F-1,e.NULL_CELL_CODE,e.NULL_CELL_WIDTH,L.fg,L.bg,L.extended)),P.setCellFromCodePoint(I.x++,R,k,L.fg,L.bg,L.extended),k>0)for(;--k;)P.setCellFromCodePoint(I.x++,0,0,L.fg,L.bg,L.extended)}else P.getWidth(I.x-1)?P.addCodepointToCell(I.x-1,R):P.addCodepointToCell(I.x-2,R)}D-b>0&&(P.loadCell(I.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),I.x<F&&D-b>0&&P.getWidth(I.x)===0&&!P.hasContent(I.x)&&P.setCellFromCodePoint(I.x,0,1,L.fg,L.bg,L.extended),this._dirtyRowService.markDirty(I.y)},p.prototype.addCsiHandler=function(m,b){var D=this;return m.final!=="t"||m.prefix||m.intermediates?this._parser.addCsiHandler(m,b):this._parser.addCsiHandler(m,function(R){return!S(R.params[0],D._optionsService.options.windowOptions)||b(R)})},p.prototype.addDcsHandler=function(m,b){return this._parser.addDcsHandler(m,new E.DcsHandler(b))},p.prototype.addEscHandler=function(m,b){return this._parser.addEscHandler(m,b)},p.prototype.addOscHandler=function(m,b){return this._parser.addOscHandler(m,new f.OscHandler(b))},p.prototype.bell=function(){this._onRequestBell.fire()},p.prototype.lineFeed=function(){var m=this._bufferService.buffer;this._dirtyRowService.markDirty(m.y),this._optionsService.options.convertEol&&(m.x=0),m.y++,m.y===m.scrollBottom+1?(m.y--,this._onRequestScroll.fire(this._eraseAttrData())):m.y>=this._bufferService.rows&&(m.y=this._bufferService.rows-1),m.x>=this._bufferService.cols&&m.x--,this._dirtyRowService.markDirty(m.y),this._onLineFeed.fire()},p.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},p.prototype.backspace=function(){var m,b=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(b.x>0&&b.x--);if(this._restrictCursor(this._bufferService.cols),b.x>0)b.x--;else if(b.x===0&&b.y>b.scrollTop&&b.y<=b.scrollBottom&&(!((m=b.lines.get(b.ybase+b.y))===null||m===void 0)&&m.isWrapped)){b.lines.get(b.ybase+b.y).isWrapped=!1,b.y--,b.x=this._bufferService.cols-1;var D=b.lines.get(b.ybase+b.y);D.hasWidth(b.x)&&!D.hasContent(b.x)&&b.x--}this._restrictCursor()},p.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var m=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-m)}},p.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},p.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},p.prototype._restrictCursor=function(m){m===void 0&&(m=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(m,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},p.prototype._setCursor=function(m,b){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=m,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+b):(this._bufferService.buffer.x=m,this._bufferService.buffer.y=b),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},p.prototype._moveCursor=function(m,b){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+m,this._bufferService.buffer.y+b)},p.prototype.cursorUp=function(m){var b=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;b>=0?this._moveCursor(0,-Math.min(b,m.params[0]||1)):this._moveCursor(0,-(m.params[0]||1))},p.prototype.cursorDown=function(m){var b=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;b>=0?this._moveCursor(0,Math.min(b,m.params[0]||1)):this._moveCursor(0,m.params[0]||1)},p.prototype.cursorForward=function(m){this._moveCursor(m.params[0]||1,0)},p.prototype.cursorBackward=function(m){this._moveCursor(-(m.params[0]||1),0)},p.prototype.cursorNextLine=function(m){this.cursorDown(m),this._bufferService.buffer.x=0},p.prototype.cursorPrecedingLine=function(m){this.cursorUp(m),this._bufferService.buffer.x=0},p.prototype.cursorCharAbsolute=function(m){this._setCursor((m.params[0]||1)-1,this._bufferService.buffer.y)},p.prototype.cursorPosition=function(m){this._setCursor(m.length>=2?(m.params[1]||1)-1:0,(m.params[0]||1)-1)},p.prototype.charPosAbsolute=function(m){this._setCursor((m.params[0]||1)-1,this._bufferService.buffer.y)},p.prototype.hPositionRelative=function(m){this._moveCursor(m.params[0]||1,0)},p.prototype.linePosAbsolute=function(m){this._setCursor(this._bufferService.buffer.x,(m.params[0]||1)-1)},p.prototype.vPositionRelative=function(m){this._moveCursor(0,m.params[0]||1)},p.prototype.hVPosition=function(m){this.cursorPosition(m)},p.prototype.tabClear=function(m){var b=m.params[0];b===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:b===3&&(this._bufferService.buffer.tabs={})},p.prototype.cursorForwardTab=function(m){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var b=m.params[0]||1;b--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},p.prototype.cursorBackwardTab=function(m){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var b=m.params[0]||1,D=this._bufferService.buffer;b--;)D.x=D.prevStop()},p.prototype._eraseInBufferLine=function(m,b,D,R){R===void 0&&(R=!1);var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+m);k.replaceCells(b,D,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),R&&(k.isWrapped=!1)},p.prototype._resetBufferLine=function(m){var b=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+m);b.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),b.isWrapped=!1},p.prototype.eraseInDisplay=function(m){var b;switch(this._restrictCursor(),m.params[0]){case 0:for(b=this._bufferService.buffer.y,this._dirtyRowService.markDirty(b),this._eraseInBufferLine(b++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);b<this._bufferService.rows;b++)this._resetBufferLine(b);this._dirtyRowService.markDirty(b);break;case 1:for(b=this._bufferService.buffer.y,this._dirtyRowService.markDirty(b),this._eraseInBufferLine(b,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(b+1).isWrapped=!1);b--;)this._resetBufferLine(b);this._dirtyRowService.markDirty(0);break;case 2:for(b=this._bufferService.rows,this._dirtyRowService.markDirty(b-1);b--;)this._resetBufferLine(b);this._dirtyRowService.markDirty(0);break;case 3:var D=this._bufferService.buffer.lines.length-this._bufferService.rows;D>0&&(this._bufferService.buffer.lines.trimStart(D),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-D,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-D,0),this._onScroll.fire(0))}},p.prototype.eraseInLine=function(m){switch(this._restrictCursor(),m.params[0]){case 0:this._eraseInBufferLine(this._bufferService.buffer.y,this._bufferService.buffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.buffer.x+1);break;case 2:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.cols)}this._dirtyRowService.markDirty(this._bufferService.buffer.y)},p.prototype.insertLines=function(m){this._restrictCursor();var b=m.params[0]||1,D=this._bufferService.buffer;if(!(D.y>D.scrollBottom||D.y<D.scrollTop)){for(var R=D.ybase+D.y,k=this._bufferService.rows-1-D.scrollBottom,I=this._bufferService.rows-1+D.ybase-k+1;b--;)D.lines.splice(I-1,1),D.lines.splice(R,0,D.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(D.y,D.scrollBottom),D.x=0}},p.prototype.deleteLines=function(m){this._restrictCursor();var b=m.params[0]||1,D=this._bufferService.buffer;if(!(D.y>D.scrollBottom||D.y<D.scrollTop)){var R,k=D.ybase+D.y;for(R=this._bufferService.rows-1-D.scrollBottom,R=this._bufferService.rows-1+D.ybase-R;b--;)D.lines.splice(k,1),D.lines.splice(R,0,D.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(D.y,D.scrollBottom),D.x=0}},p.prototype.insertChars=function(m){this._restrictCursor();var b=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);b&&(b.insertCells(this._bufferService.buffer.x,m.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},p.prototype.deleteChars=function(m){this._restrictCursor();var b=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);b&&(b.deleteCells(this._bufferService.buffer.x,m.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},p.prototype.scrollUp=function(m){for(var b=m.params[0]||1,D=this._bufferService.buffer;b--;)D.lines.splice(D.ybase+D.scrollTop,1),D.lines.splice(D.ybase+D.scrollBottom,0,D.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(D.scrollTop,D.scrollBottom)},p.prototype.scrollDown=function(m){for(var b=m.params[0]||1,D=this._bufferService.buffer;b--;)D.lines.splice(D.ybase+D.scrollBottom,1),D.lines.splice(D.ybase+D.scrollTop,0,D.getBlankLine(t.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(D.scrollTop,D.scrollBottom)},p.prototype.scrollLeft=function(m){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var D=m.params[0]||1,R=b.scrollTop;R<=b.scrollBottom;++R){var k=b.lines.get(b.ybase+R);k.deleteCells(0,D,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},p.prototype.scrollRight=function(m){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var D=m.params[0]||1,R=b.scrollTop;R<=b.scrollBottom;++R){var k=b.lines.get(b.ybase+R);k.insertCells(0,D,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},p.prototype.insertColumns=function(m){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var D=m.params[0]||1,R=b.scrollTop;R<=b.scrollBottom;++R){var k=this._bufferService.buffer.lines.get(b.ybase+R);k.insertCells(b.x,D,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},p.prototype.deleteColumns=function(m){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var D=m.params[0]||1,R=b.scrollTop;R<=b.scrollBottom;++R){var k=b.lines.get(b.ybase+R);k.deleteCells(b.x,D,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},p.prototype.eraseChars=function(m){this._restrictCursor();var b=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);b&&(b.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(m.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},p.prototype.repeatPrecedingCharacter=function(m){if(this._parser.precedingCodepoint){for(var b=m.params[0]||1,D=new Uint32Array(b),R=0;R<b;++R)D[R]=this._parser.precedingCodepoint;this.print(D,0,D.length)}},p.prototype.sendDeviceAttributesPrimary=function(m){m.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c"))},p.prototype.sendDeviceAttributesSecondary=function(m){m.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(m.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c"))},p.prototype._is=function(m){return(this._optionsService.options.termName+"").indexOf(m)===0},p.prototype.setMode=function(m){for(var b=0;b<m.length;b++)switch(m.params[b]){case 4:this._coreService.modes.insertMode=!0}},p.prototype.setModePrivate=function(m){for(var b=0;b<m.length;b++)switch(m.params[b]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,l.DEFAULT_CHARSET),this._charsetService.setgCharset(1,l.DEFAULT_CHARSET),this._charsetService.setgCharset(2,l.DEFAULT_CHARSET),this._charsetService.setgCharset(3,l.DEFAULT_CHARSET);break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0;break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}},p.prototype.resetMode=function(m){for(var b=0;b<m.length;b++)switch(m.params[b]){case 4:this._coreService.modes.insertMode=!1}},p.prototype.resetModePrivate=function(m){for(var b=0;b<m.length;b++)switch(m.params[b]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),m.params[b]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}},p.prototype._updateAttrColor=function(m,b,D,R,k){return b===2?(m|=50331648,m&=-16777216,m|=a.AttributeData.fromColorRGB([D,R,k])):b===5&&(m&=-50331904,m|=33554432|255&D),m},p.prototype._extractColor=function(m,b,D){var R=[0,0,-1,0,0,0],k=0,I=0;do{if(R[I+k]=m.params[b+I],m.hasSubParams(b+I)){var N=m.getSubParams(b+I),M=0;do R[1]===5&&(k=1),R[I+M+1+k]=N[M];while(++M<N.length&&M+I+1+k<R.length);break}if(R[1]===5&&I+k>=2||R[1]===2&&I+k>=5)break;R[1]&&(k=1)}while(++I+b<m.length&&I+k<R.length);for(M=2;M<R.length;++M)R[M]===-1&&(R[M]=0);switch(R[0]){case 38:D.fg=this._updateAttrColor(D.fg,R[1],R[3],R[4],R[5]);break;case 48:D.bg=this._updateAttrColor(D.bg,R[1],R[3],R[4],R[5]);break;case 58:D.extended=D.extended.clone(),D.extended.underlineColor=this._updateAttrColor(D.extended.underlineColor,R[1],R[3],R[4],R[5])}return I},p.prototype._processUnderline=function(m,b){b.extended=b.extended.clone(),(!~m||m>5)&&(m=1),b.extended.underlineStyle=m,b.fg|=268435456,m===0&&(b.fg&=-268435457),b.updateExtended()},p.prototype.charAttributes=function(m){if(m.length===1&&m.params[0]===0)return this._curAttrData.fg=t.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=t.DEFAULT_ATTR_DATA.bg);for(var b,D=m.length,R=this._curAttrData,k=0;k<D;k++)(b=m.params[k])>=30&&b<=37?(R.fg&=-50331904,R.fg|=16777216|b-30):b>=40&&b<=47?(R.bg&=-50331904,R.bg|=16777216|b-40):b>=90&&b<=97?(R.fg&=-50331904,R.fg|=16777224|b-90):b>=100&&b<=107?(R.bg&=-50331904,R.bg|=16777224|b-100):b===0?(R.fg=t.DEFAULT_ATTR_DATA.fg,R.bg=t.DEFAULT_ATTR_DATA.bg):b===1?R.fg|=134217728:b===3?R.bg|=67108864:b===4?(R.fg|=268435456,this._processUnderline(m.hasSubParams(k)?m.getSubParams(k)[0]:1,R)):b===5?R.fg|=536870912:b===7?R.fg|=67108864:b===8?R.fg|=1073741824:b===2?R.bg|=134217728:b===21?this._processUnderline(2,R):b===22?(R.fg&=-134217729,R.bg&=-134217729):b===23?R.bg&=-67108865:b===24?R.fg&=-268435457:b===25?R.fg&=-536870913:b===27?R.fg&=-67108865:b===28?R.fg&=-1073741825:b===39?(R.fg&=-67108864,R.fg|=16777215&t.DEFAULT_ATTR_DATA.fg):b===49?(R.bg&=-67108864,R.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):b===38||b===48||b===58?k+=this._extractColor(m,k,R):b===59?(R.extended=R.extended.clone(),R.extended.underlineColor=-1,R.updateExtended()):b===100?(R.fg&=-67108864,R.fg|=16777215&t.DEFAULT_ATTR_DATA.fg,R.bg&=-67108864,R.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",b)},p.prototype.deviceStatus=function(m){switch(m.params[0]){case 5:this._coreService.triggerDataEvent(u.C0.ESC+"[0n");break;case 6:var b=this._bufferService.buffer.y+1,D=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(u.C0.ESC+"["+b+";"+D+"R")}},p.prototype.deviceStatusPrivate=function(m){switch(m.params[0]){case 6:var b=this._bufferService.buffer.y+1,D=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(u.C0.ESC+"[?"+b+";"+D+"R")}},p.prototype.softReset=function(m){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=t.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._bufferService.buffer.savedX=0,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1},p.prototype.setCursorStyle=function(m){var b=m.params[0]||1;switch(b){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var D=b%2==1;this._optionsService.options.cursorBlink=D},p.prototype.setScrollRegion=function(m){var b,D=m.params[0]||1;(m.length<2||(b=m.params[1])>this._bufferService.rows||b===0)&&(b=this._bufferService.rows),b>D&&(this._bufferService.buffer.scrollTop=D-1,this._bufferService.buffer.scrollBottom=b-1,this._setCursor(0,0))},p.prototype.windowOptions=function(m){if(S(m.params[0],this._optionsService.options.windowOptions)){var b=m.length>1?m.params[1]:0;switch(m.params[0]){case 14:b!==2&&this._onRequestWindowsOptionsReport.fire(h.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(h.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(u.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:b!==0&&b!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),b!==0&&b!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:b!==0&&b!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),b!==0&&b!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},p.prototype.saveCursor=function(m){this._bufferService.buffer.savedX=this._bufferService.buffer.x,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase+this._bufferService.buffer.y,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset},p.prototype.restoreCursor=function(m){this._bufferService.buffer.x=this._bufferService.buffer.savedX||0,this._bufferService.buffer.y=Math.max(this._bufferService.buffer.savedY-this._bufferService.buffer.ybase,0),this._curAttrData.fg=this._bufferService.buffer.savedCurAttrData.fg,this._curAttrData.bg=this._bufferService.buffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._bufferService.buffer.savedCharset&&(this._charsetService.charset=this._bufferService.buffer.savedCharset),this._restrictCursor()},p.prototype.setTitle=function(m){this._windowTitle=m,this._onTitleChange.fire(m)},p.prototype.setIconName=function(m){this._iconName=m},p.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},p.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},p.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},p.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,l.DEFAULT_CHARSET)},p.prototype.selectCharset=function(m){m.length===2?m[0]!=="/"&&this._charsetService.setgCharset(w[m[0]],l.CHARSETS[m[1]]||l.DEFAULT_CHARSET):this.selectDefaultCharset()},p.prototype.index=function(){this._restrictCursor();var m=this._bufferService.buffer;this._bufferService.buffer.y++,m.y===m.scrollBottom+1?(m.y--,this._onRequestScroll.fire(this._eraseAttrData())):m.y>=this._bufferService.rows&&(m.y=this._bufferService.rows-1),this._restrictCursor()},p.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},p.prototype.reverseIndex=function(){this._restrictCursor();var m=this._bufferService.buffer;if(m.y===m.scrollTop){var b=m.scrollBottom-m.scrollTop;m.lines.shiftElements(m.ybase+m.y,b,1),m.lines.set(m.ybase+m.y,m.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(m.scrollTop,m.scrollBottom)}else m.y--,this._restrictCursor()},p.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},p.prototype.reset=function(){this._curAttrData=t.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone()},p.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},p.prototype.setgLevel=function(m){this._charsetService.setgLevel(m)},p.prototype.screenAlignmentPattern=function(){var m=new r.CellData;m.content=1<<22|69,m.fg=this._curAttrData.fg,m.bg=this._curAttrData.bg;var b=this._bufferService.buffer;this._setCursor(0,0);for(var D=0;D<this._bufferService.rows;++D){var R=b.ybase+b.y+D,k=b.lines.get(R);k&&(k.fill(m),k.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},p}(i.Disposable);o.InputHandler=x},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},o.CHARSETS.A={"#":"\xA3"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},o.CHARSETS.C=o.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},o.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},o.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},o.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},o.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},o.CHARSETS.E=o.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},o.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},o.CHARSETS.H=o.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},o.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;var d=function(){function y(h,u){if(h===void 0&&(h=32),u===void 0&&(u=32),this.maxLength=h,this.maxSubParamsLength=u,u>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(u),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return y.fromArray=function(h){var u=new y;if(!h.length)return u;for(var l=h[0]instanceof Array?1:0;l<h.length;++l){var _=h[l];if(_ instanceof Array)for(var i=0;i<_.length;++i)u.addSubParam(_[i]);else u.addParam(_)}return u},y.prototype.clone=function(){var h=new y(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h},y.prototype.toArray=function(){for(var h=[],u=0;u<this.length;++u){h.push(this.params[u]);var l=this._subParamsIdx[u]>>8,_=255&this._subParamsIdx[u];_-l>0&&h.push(Array.prototype.slice.call(this._subParams,l,_))}return h},y.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},y.prototype.addParam=function(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>2147483647?2147483647:h}},y.prototype.addSubParam=function(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>2147483647?2147483647:h,this._subParamsIdx[this.length-1]++}},y.prototype.hasSubParams=function(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0},y.prototype.getSubParams=function(h){var u=this._subParamsIdx[h]>>8,l=255&this._subParamsIdx[h];return l-u>0?this._subParams.subarray(u,l):null},y.prototype.getSubParamsAll=function(){for(var h={},u=0;u<this.length;++u){var l=this._subParamsIdx[u]>>8,_=255&this._subParamsIdx[u];_-l>0&&(h[u]=this._subParams.slice(l,_))}return h},y.prototype.addDigit=function(h){var u;if(!(this._rejectDigits||!(u=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var l=this._digitIsSub?this._subParams:this.params,_=l[u-1];l[u-1]=~_?Math.min(10*_+h,2147483647):h}},y}();o.Params=d},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;var d=C(23),y=C(8),h=function(){function l(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return l.prototype.addHandler=function(_,i){this._handlers[_]===void 0&&(this._handlers[_]=[]);var s=this._handlers[_];return s.push(i),{dispose:function(){var c=s.indexOf(i);c!==-1&&s.splice(c,1)}}},l.prototype.setHandler=function(_,i){this._handlers[_]=[i]},l.prototype.clearHandler=function(_){this._handlers[_]&&delete this._handlers[_]},l.prototype.setHandlerFallback=function(_){this._handlerFb=_},l.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},l.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},l.prototype._start=function(){var _=this._handlers[this._id];if(_)for(var i=_.length-1;i>=0;i--)_[i].start();else this._handlerFb(this._id,"START")},l.prototype._put=function(_,i,s){var c=this._handlers[this._id];if(c)for(var t=c.length-1;t>=0;t--)c[t].put(_,i,s);else this._handlerFb(this._id,"PUT",y.utf32ToString(_,i,s))},l.prototype._end=function(_){var i=this._handlers[this._id];if(i){for(var s=i.length-1;s>=0&&i[s].end(_)===!1;s--);for(s--;s>=0;s--)i[s].end(!1)}else this._handlerFb(this._id,"END",_)},l.prototype.start=function(){this.reset(),this._id=-1,this._state=1},l.prototype.put=function(_,i,s){if(this._state!==3){if(this._state===1)for(;i<s;){var c=_[i++];if(c===59){this._state=2,this._start();break}if(c<48||57<c)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+c-48}this._state===2&&s-i>0&&this._put(_,i,s)}},l.prototype.end=function(_){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(_)),this._id=-1,this._state=0)},l}();o.OscParser=h;var u=function(){function l(_){this._handler=_,this._data="",this._hitLimit=!1}return l.prototype.start=function(){this._data="",this._hitLimit=!1},l.prototype.put=function(_,i,s){this._hitLimit||(this._data+=y.utf32ToString(_,i,s),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},l.prototype.end=function(_){var i;return this._hitLimit?i=!1:_&&(i=this._handler(this._data)),this._data="",this._hitLimit=!1,i},l}();o.OscHandler=u},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;var d=C(8),y=C(21),h=C(23),u=[],l=function(){function i(){this._handlers=Object.create(null),this._active=u,this._ident=0,this._handlerFb=function(){}}return i.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},i.prototype.addHandler=function(s,c){this._handlers[s]===void 0&&(this._handlers[s]=[]);var t=this._handlers[s];return t.push(c),{dispose:function(){var n=t.indexOf(c);n!==-1&&t.splice(n,1)}}},i.prototype.setHandler=function(s,c){this._handlers[s]=[c]},i.prototype.clearHandler=function(s){this._handlers[s]&&delete this._handlers[s]},i.prototype.setHandlerFallback=function(s){this._handlerFb=s},i.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=u,this._ident=0},i.prototype.hook=function(s,c){if(this.reset(),this._ident=s,this._active=this._handlers[s]||u,this._active.length)for(var t=this._active.length-1;t>=0;t--)this._active[t].hook(c);else this._handlerFb(this._ident,"HOOK",c)},i.prototype.put=function(s,c,t){if(this._active.length)for(var n=this._active.length-1;n>=0;n--)this._active[n].put(s,c,t);else this._handlerFb(this._ident,"PUT",d.utf32ToString(s,c,t))},i.prototype.unhook=function(s){if(this._active.length){for(var c=this._active.length-1;c>=0&&this._active[c].unhook(s)===!1;c--);for(c--;c>=0;c--)this._active[c].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",s);this._active=u,this._ident=0},i}();o.DcsParser=l;var _=function(){function i(s){this._handler=s,this._data="",this._hitLimit=!1}return i.prototype.hook=function(s){this._params=s.clone(),this._data="",this._hitLimit=!1},i.prototype.put=function(s,c,t){this._hitLimit||(this._data+=d.utf32ToString(s,c,t),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},i.prototype.unhook=function(s){var c;return this._hitLimit?c=!1:s&&(c=this._handler(this._data,this._params||new y.Params)),this._params=void 0,this._data="",this._hitLimit=!1,c},i}();o.DcsHandler=_},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.removeTerminalFromCache=o.acquireCharAtlas=void 0;var d=C(26),y=C(43),h=[];o.acquireCharAtlas=function(u,l,_,i,s){for(var c=d.generateConfig(i,s,u,_),t=0;t<h.length;t++){var n=(e=h[t]).ownedBy.indexOf(l);if(n>=0){if(d.configEquals(e.config,c))return e.atlas;e.ownedBy.length===1?(e.atlas.dispose(),h.splice(t,1)):e.ownedBy.splice(n,1);break}}for(t=0;t<h.length;t++){var e=h[t];if(d.configEquals(e.config,c))return e.ownedBy.push(l),e.atlas}var r={atlas:new y.DynamicCharAtlas(document,c),config:c,ownedBy:[l]};return h.push(r),r.atlas},o.removeTerminalFromCache=function(u){for(var l=0;l<h.length;l++){var _=h[l].ownedBy.indexOf(u);if(_!==-1){h[l].ownedBy.length===1?(h[l].atlas.dispose(),h.splice(l,1)):h[l].ownedBy.splice(_,1);break}}}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.is256Color=o.configEquals=o.generateConfig=void 0;var d=C(3);o.generateConfig=function(y,h,u,l){var _={foreground:l.foreground,background:l.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:l.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:y,scaledCharHeight:h,fontFamily:u.fontFamily,fontSize:u.fontSize,fontWeight:u.fontWeight,fontWeightBold:u.fontWeightBold,allowTransparency:u.allowTransparency,colors:_}},o.configEquals=function(y,h){for(var u=0;u<y.colors.ansi.length;u++)if(y.colors.ansi[u].rgba!==h.colors.ansi[u].rgba)return!1;return y.devicePixelRatio===h.devicePixelRatio&&y.fontFamily===h.fontFamily&&y.fontSize===h.fontSize&&y.fontWeight===h.fontWeight&&y.fontWeightBold===h.fontWeightBold&&y.allowTransparency===h.allowTransparency&&y.scaledCharWidth===h.scaledCharWidth&&y.scaledCharHeight===h.scaledCharHeight&&y.colors.foreground===h.colors.foreground&&y.colors.background===h.colors.background},o.is256Color=function(y){return y<d.DEFAULT_COLOR}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.ColorManager=o.DEFAULT_ANSI_COLORS=void 0;var d=C(10),y=C(45),h=d.css.toColor("#ffffff"),u=d.css.toColor("#000000"),l=d.css.toColor("#ffffff"),_=d.css.toColor("#000000"),i={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=function(){for(var c=[d.css.toColor("#2e3436"),d.css.toColor("#cc0000"),d.css.toColor("#4e9a06"),d.css.toColor("#c4a000"),d.css.toColor("#3465a4"),d.css.toColor("#75507b"),d.css.toColor("#06989a"),d.css.toColor("#d3d7cf"),d.css.toColor("#555753"),d.css.toColor("#ef2929"),d.css.toColor("#8ae234"),d.css.toColor("#fce94f"),d.css.toColor("#729fcf"),d.css.toColor("#ad7fa8"),d.css.toColor("#34e2e2"),d.css.toColor("#eeeeec")],t=[0,95,135,175,215,255],n=0;n<216;n++){var e=t[n/36%6|0],r=t[n/6%6|0],a=t[n%6];c.push({css:d.channels.toCss(e,r,a),rgba:d.channels.toRgba(e,r,a)})}for(n=0;n<24;n++){var f=8+10*n;c.push({css:d.channels.toCss(f,f,f),rgba:d.channels.toRgba(f,f,f)})}return c}();var s=function(){function c(t,n){this.allowTransparency=n;var e=t.createElement("canvas");e.width=1,e.height=1;var r=e.getContext("2d");if(!r)throw new Error("Could not get rendering context");this._ctx=r,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new y.ColorContrastCache,this.colors={foreground:h,background:u,cursor:l,cursorAccent:_,selectionTransparent:i,selectionOpaque:d.color.blend(u,i),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return c.prototype.onOptionsChange=function(t){t==="minimumContrastRatio"&&this._contrastCache.clear()},c.prototype.setTheme=function(t){t===void 0&&(t={}),this.colors.foreground=this._parseColor(t.foreground,h),this.colors.background=this._parseColor(t.background,u),this.colors.cursor=this._parseColor(t.cursor,l,!0),this.colors.cursorAccent=this._parseColor(t.cursorAccent,_,!0),this.colors.selectionTransparent=this._parseColor(t.selection,i,!0),this.colors.selectionOpaque=d.color.blend(this.colors.background,this.colors.selectionTransparent),d.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=d.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(t.black,o.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(t.red,o.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(t.green,o.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(t.yellow,o.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(t.blue,o.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(t.magenta,o.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(t.cyan,o.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(t.white,o.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(t.brightBlack,o.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(t.brightRed,o.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(t.brightGreen,o.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(t.brightYellow,o.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(t.brightBlue,o.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(t.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(t.brightCyan,o.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(t.brightWhite,o.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},c.prototype._parseColor=function(t,n,e){if(e===void 0&&(e=this.allowTransparency),t===void 0)return n;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=t,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+t+" is invalid using fallback "+n.css),n;this._ctx.fillRect(0,0,1,1);var r=this._ctx.getImageData(0,0,1,1).data;if(r[3]!==255){if(!e)return console.warn("Color: "+t+" is using transparency, but allowTransparency is false. Using fallback "+n.css+"."),n;var a=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(x){return Number(x)}),f=a[0],E=a[1],w=a[2],S=a[3],v=Math.round(255*S);return{rgba:d.channels.toRgba(f,E,w,v),css:t}}return{css:this._ctx.fillStyle,rgba:d.channels.toRgba(r[0],r[1],r[2],r[3])}},c}();o.ColorManager=s},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.throwIfFalsy=void 0,o.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d}},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(s,c){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(s,c)},function(s,c){function t(){this.constructor=s}d(s,c),s.prototype=c===null?Object.create(c):(t.prototype=c.prototype,new t)});Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerRegistry=o.JoinedCellData=void 0;var h=C(6),u=C(3),l=C(4),_=function(s){function c(t,n,e){var r=s.call(this)||this;return r.content=0,r.combinedData="",r.fg=t.fg,r.bg=t.bg,r.combinedData=n,r._width=e,r}return y(c,s),c.prototype.isCombined=function(){return 2097152},c.prototype.getWidth=function(){return this._width},c.prototype.getChars=function(){return this.combinedData},c.prototype.getCode=function(){return 2097151},c.prototype.setFromCharData=function(t){throw new Error("not implemented")},c.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},c}(h.AttributeData);o.JoinedCellData=_;var i=function(){function s(c){this._bufferService=c,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new l.CellData}return s.prototype.registerCharacterJoiner=function(c){var t={id:this._nextCharacterJoinerId++,handler:c};return this._characterJoiners.push(t),t.id},s.prototype.deregisterCharacterJoiner=function(c){for(var t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===c)return this._characterJoiners.splice(t,1),!0;return!1},s.prototype.getJoinedCharacters=function(c){if(this._characterJoiners.length===0)return[];var t=this._bufferService.buffer.lines.get(c);if(!t||t.length===0)return[];for(var n=[],e=t.translateToString(!0),r=0,a=0,f=0,E=t.getFg(0),w=t.getBg(0),S=0;S<t.getTrimmedLength();S++)if(t.loadCell(S,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==E||this._workCell.bg!==w){if(S-r>1)for(var v=this._getJoinedRanges(e,f,a,t,r),x=0;x<v.length;x++)n.push(v[x]);r=S,f=a,E=this._workCell.fg,w=this._workCell.bg}a+=this._workCell.getChars().length||u.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-r>1)for(v=this._getJoinedRanges(e,f,a,t,r),x=0;x<v.length;x++)n.push(v[x]);return n},s.prototype._getJoinedRanges=function(c,t,n,e,r){for(var a=c.substring(t,n),f=this._characterJoiners[0].handler(a),E=1;E<this._characterJoiners.length;E++)for(var w=this._characterJoiners[E].handler(a),S=0;S<w.length;S++)s._mergeRanges(f,w[S]);return this._stringRangesToCellRanges(f,e,r),f},s.prototype._stringRangesToCellRanges=function(c,t,n){var e=0,r=!1,a=0,f=c[e];if(f){for(var E=n;E<this._bufferService.cols;E++){var w=t.getWidth(E),S=t.getString(E).length||u.WHITESPACE_CELL_CHAR.length;if(w!==0){if(!r&&f[0]<=a&&(f[0]=E,r=!0),f[1]<=a){if(f[1]=E,!(f=c[++e]))break;f[0]<=a?(f[0]=E,r=!0):r=!1}a+=S}}f&&(f[1]=this._bufferService.cols)}},s._mergeRanges=function(c,t){for(var n=!1,e=0;e<c.length;e++){var r=c[e];if(n){if(t[1]<=r[0])return c[e-1][1]=t[1],c;if(t[1]<=r[1])return c[e-1][1]=Math.max(t[1],r[1]),c.splice(e,1),c;c.splice(e,1),e--}else{if(t[1]<=r[0])return c.splice(e,0,t),c;if(t[1]<=r[1])return r[0]=Math.min(t[0],r[0]),c;t[0]<r[1]&&(r[0]=Math.min(t[0],r[0]),n=!0)}}return n?c[c.length-1][1]=t[1]:c.push(t),c},s}();o.CharacterJoinerRegistry=i},function(B,o,C){"use strict";function d(y,h){var u=h.getBoundingClientRect();return[y.clientX-u.left,y.clientY-u.top]}Object.defineProperty(o,"__esModule",{value:!0}),o.getRawByteCoords=o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=d,o.getCoords=function(y,h,u,l,_,i,s,c){if(_){var t=d(y,h);if(t)return t[0]=Math.ceil((t[0]+(c?i/2:0))/i),t[1]=Math.ceil(t[1]/s),t[0]=Math.min(Math.max(t[0],1),u+(c?1:0)),t[1]=Math.min(Math.max(t[1],1),l),t}},o.getRawByteCoords=function(y){if(y)return{x:y[0]+32,y:y[1]+32}}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0;var d=function(){function y(h){this._renderCallback=h}return y.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},y.prototype.refresh=function(h,u,l){var _=this;this._rowCount=l,h=h!==void 0?h:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return _._innerRefresh()}))},y.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var h=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(h,u)}},y}();o.RenderDebouncer=d},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(u,l){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,i){_.__proto__=i}||function(_,i){for(var s in i)i.hasOwnProperty(s)&&(_[s]=i[s])})(u,l)},function(u,l){function _(){this.constructor=u}d(u,l),u.prototype=l===null?Object.create(l):(_.prototype=l.prototype,new _)});Object.defineProperty(o,"__esModule",{value:!0}),o.ScreenDprMonitor=void 0;var h=function(u){function l(){var _=u!==null&&u.apply(this,arguments)||this;return _._currentDevicePixelRatio=window.devicePixelRatio,_}return y(l,u),l.prototype.setListener=function(_){var i=this;this._listener&&this.clearListener(),this._listener=_,this._outerListener=function(){i._listener&&(i._listener(window.devicePixelRatio,i._currentDevicePixelRatio),i._updateDpr())},this._updateDpr()},l.prototype.dispose=function(){u.prototype.dispose.call(this),this.clearListener()},l.prototype._updateDpr=function(){var _;this._outerListener&&((_=this._resolutionMediaMatchList)===null||_===void 0||_.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},l.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},l}(C(2).Disposable);o.ScreenDprMonitor=h},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function d(y,h){if(h===void 0&&(h=5),typeof y!="object")return y;var u=Array.isArray(y)?[]:{};for(var l in y)u[l]=h<=1?y[l]:y[l]?d(y[l],h-1):y[l];return u}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;var d=C(4),y=C(35),h=C(18),u=C(0),l=C(83),_=function(){function e(r){this._core=new y.Terminal(r),this._addonManager=new l.AddonManager}return e.prototype._checkProposedApi=function(){if(!this._core.optionsService.options.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(e.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new t(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unicode",{get:function(){return this._checkProposedApi(),new n(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffer",{get:function(){return this._checkProposedApi(),new s(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),e.prototype.blur=function(){this._core.blur()},e.prototype.focus=function(){this._core.focus()},e.prototype.resize=function(r,a){this._verifyIntegers(r,a),this._core.resize(r,a)},e.prototype.open=function(r){this._core.open(r)},e.prototype.attachCustomKeyEventHandler=function(r){this._core.attachCustomKeyEventHandler(r)},e.prototype.registerLinkMatcher=function(r,a,f){return this._checkProposedApi(),this._core.registerLinkMatcher(r,a,f)},e.prototype.deregisterLinkMatcher=function(r){this._checkProposedApi(),this._core.deregisterLinkMatcher(r)},e.prototype.registerLinkProvider=function(r){return this._checkProposedApi(),this._core.registerLinkProvider(r)},e.prototype.registerCharacterJoiner=function(r){return this._checkProposedApi(),this._core.registerCharacterJoiner(r)},e.prototype.deregisterCharacterJoiner=function(r){this._checkProposedApi(),this._core.deregisterCharacterJoiner(r)},e.prototype.registerMarker=function(r){return this._checkProposedApi(),this._verifyIntegers(r),this._core.addMarker(r)},e.prototype.addMarker=function(r){return this.registerMarker(r)},e.prototype.hasSelection=function(){return this._core.hasSelection()},e.prototype.select=function(r,a,f){this._verifyIntegers(r,a,f),this._core.select(r,a,f)},e.prototype.getSelection=function(){return this._core.getSelection()},e.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},e.prototype.clearSelection=function(){this._core.clearSelection()},e.prototype.selectAll=function(){this._core.selectAll()},e.prototype.selectLines=function(r,a){this._verifyIntegers(r,a),this._core.selectLines(r,a)},e.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},e.prototype.scrollLines=function(r){this._verifyIntegers(r),this._core.scrollLines(r)},e.prototype.scrollPages=function(r){this._verifyIntegers(r),this._core.scrollPages(r)},e.prototype.scrollToTop=function(){this._core.scrollToTop()},e.prototype.scrollToBottom=function(){this._core.scrollToBottom()},e.prototype.scrollToLine=function(r){this._verifyIntegers(r),this._core.scrollToLine(r)},e.prototype.clear=function(){this._core.clear()},e.prototype.write=function(r,a){this._core.write(r,a)},e.prototype.writeUtf8=function(r,a){this._core.write(r,a)},e.prototype.writeln=function(r,a){this._core.write(r),this._core.write(`\r
|
|
|
`,a)},e.prototype.paste=function(r){this._core.paste(r)},e.prototype.getOption=function(r){return this._core.optionsService.getOption(r)},e.prototype.setOption=function(r,a){this._core.optionsService.setOption(r,a)},e.prototype.refresh=function(r,a){this._verifyIntegers(r,a),this._core.refresh(r,a)},e.prototype.reset=function(){this._core.reset()},e.prototype.loadAddon=function(r){return this._addonManager.loadAddon(this,r)},Object.defineProperty(e,"strings",{get:function(){return h},enumerable:!1,configurable:!0}),e.prototype._verifyIntegers=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];for(var f=0,E=r;f<E.length;f++){var w=E[f];if(w===1/0||isNaN(w)||w%1!=0)throw new Error("This API only accepts integers")}},e}();o.Terminal=_;var i=function(){function e(r,a){this._buffer=r,this.type=a}return e.prototype.init=function(r){return this._buffer=r,this},Object.defineProperty(e.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),e.prototype.getLine=function(r){var a=this._buffer.lines.get(r);if(a)return new c(a)},e.prototype.getNullCell=function(){return new d.CellData},e}(),s=function(){function e(r){var a=this;this._buffers=r,this._onBufferChange=new u.EventEmitter,this._normal=new i(this._buffers.normal,"normal"),this._alternate=new i(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return a._onBufferChange.fire(a.active)})}return Object.defineProperty(e.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){if(this._buffers.active===this._buffers.normal)return this.normal;if(this._buffers.active===this._buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),e}(),c=function(){function e(r){this._line=r}return Object.defineProperty(e.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),e.prototype.getCell=function(r,a){if(!(r<0||r>=this._line.length))return a?(this._line.loadCell(r,a),a):this._line.loadCell(r,new d.CellData)},e.prototype.translateToString=function(r,a,f){return this._line.translateToString(r,a,f)},e}(),t=function(){function e(r){this._core=r}return e.prototype.registerCsiHandler=function(r,a){return this._core.addCsiHandler(r,function(f){return a(f.toArray())})},e.prototype.addCsiHandler=function(r,a){return this.registerCsiHandler(r,a)},e.prototype.registerDcsHandler=function(r,a){return this._core.addDcsHandler(r,function(f,E){return a(f,E.toArray())})},e.prototype.addDcsHandler=function(r,a){return this.registerDcsHandler(r,a)},e.prototype.registerEscHandler=function(r,a){return this._core.addEscHandler(r,a)},e.prototype.addEscHandler=function(r,a){return this.registerEscHandler(r,a)},e.prototype.registerOscHandler=function(r,a){return this._core.addOscHandler(r,a)},e.prototype.addOscHandler=function(r,a){return this.registerOscHandler(r,a)},e}(),n=function(){function e(r){this._core=r}return e.prototype.register=function(r){this._core.unicodeService.register(r)},Object.defineProperty(e.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(r){this._core.unicodeService.activeVersion=r},enumerable:!1,configurable:!0}),e}()},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(F,A){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,L){O.__proto__=L}||function(O,L){for(var P in L)L.hasOwnProperty(P)&&(O[P]=L[P])})(F,A)},function(F,A){function O(){this.constructor=F}d(F,A),F.prototype=A===null?Object.create(A):(O.prototype=A.prototype,new O)});Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;var h=C(36),u=C(37),l=C(38),_=C(12),i=C(19),s=C(40),c=C(50),t=C(51),n=C(11),e=C(7),r=C(18),a=C(54),f=C(55),E=C(56),w=C(57),S=C(59),v=C(0),x=C(16),g=C(27),p=C(60),m=C(5),b=C(61),D=C(62),R=C(63),k=C(64),I=C(65),N=typeof window!="undefined"?window.document:null,M=function(F){function A(O){O===void 0&&(O={});var L=F.call(this,O)||this;return L.browser=n,L._keyDownHandled=!1,L._onCursorMove=new v.EventEmitter,L._onKey=new v.EventEmitter,L._onRender=new v.EventEmitter,L._onSelectionChange=new v.EventEmitter,L._onTitleChange=new v.EventEmitter,L._onFocus=new v.EventEmitter,L._onBlur=new v.EventEmitter,L._onA11yCharEmitter=new v.EventEmitter,L._onA11yTabEmitter=new v.EventEmitter,L._setup(),L.linkifier=L._instantiationService.createInstance(c.Linkifier),L.linkifier2=L.register(L._instantiationService.createInstance(R.Linkifier2)),L.register(L._inputHandler.onRequestBell(function(){return L.bell()})),L.register(L._inputHandler.onRequestRefreshRows(function(P,T){return L.refresh(P,T)})),L.register(L._inputHandler.onRequestReset(function(){return L.reset()})),L.register(L._inputHandler.onRequestScroll(function(P,T){return L.scroll(P,T||void 0)})),L.register(L._inputHandler.onRequestWindowsOptionsReport(function(P){return L._reportWindowsOptions(P)})),L.register(v.forwardEvent(L._inputHandler.onCursorMove,L._onCursorMove)),L.register(v.forwardEvent(L._inputHandler.onTitleChange,L._onTitleChange)),L.register(v.forwardEvent(L._inputHandler.onA11yChar,L._onA11yCharEmitter)),L.register(v.forwardEvent(L._inputHandler.onA11yTab,L._onA11yTabEmitter)),L.register(L._bufferService.onResize(function(P){return L._afterResize(P.cols,P.rows)})),L}return y(A,F),Object.defineProperty(A.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),A.prototype.dispose=function(){var O,L,P;this._isDisposed||(F.prototype.dispose.call(this),(O=this._renderService)===null||O===void 0||O.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(P=(L=this.element)===null||L===void 0?void 0:L.parentNode)===null||P===void 0||P.removeChild(this.element))},A.prototype._setup=function(){F.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(A.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),A.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},A.prototype._updateOptions=function(O){var L,P,T,H;switch(F.prototype._updateOptions.call(this,O),O){case"fontFamily":case"fontSize":(L=this._renderService)===null||L===void 0||L.clear(),(P=this._charSizeService)===null||P===void 0||P.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(T=this.viewport)===null||T===void 0||T.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new E.AccessibilityManager(this,this._renderService)):((H=this._accessibilityManager)===null||H===void 0||H.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},A.prototype._onTextAreaFocus=function(O){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(_.C0.ESC+"[I"),this.updateCursorStyle(O),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},A.prototype.blur=function(){var O;return(O=this.textarea)===null||O===void 0?void 0:O.blur()},A.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(_.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},A.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var O=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),L=this._bufferService.buffer.y*O,P=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=P+"px",this.textarea.style.top=L+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=O+"px",this.textarea.style.lineHeight=O+"px",this.textarea.style.zIndex="-5"}},A.prototype._initGlobal=function(){var O=this;this._bindKeys(),this.register(e.addDisposableDomListener(this.element,"copy",function(P){O.hasSelection()&&l.copyHandler(P,O._selectionService)}));var L=function(P){return l.handlePasteEvent(P,O.textarea,O._coreService)};this.register(e.addDisposableDomListener(this.textarea,"paste",L)),this.register(e.addDisposableDomListener(this.element,"paste",L)),n.isFirefox?this.register(e.addDisposableDomListener(this.element,"mousedown",function(P){P.button===2&&l.rightClickHandler(P,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})):this.register(e.addDisposableDomListener(this.element,"contextmenu",function(P){l.rightClickHandler(P,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})),n.isLinux&&this.register(e.addDisposableDomListener(this.element,"auxclick",function(P){P.button===1&&l.moveTextAreaUnderMouseCursor(P,O.textarea,O.screenElement)}))},A.prototype._bindKeys=function(){var O=this;this.register(e.addDisposableDomListener(this.textarea,"keyup",function(L){return O._keyUp(L)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keydown",function(L){return O._keyDown(L)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keypress",function(L){return O._keyPress(L)},!0)),this.register(e.addDisposableDomListener(this.textarea,"compositionstart",function(){return O._compositionHelper.compositionstart()})),this.register(e.addDisposableDomListener(this.textarea,"compositionupdate",function(L){return O._compositionHelper.compositionupdate(L)})),this.register(e.addDisposableDomListener(this.textarea,"compositionend",function(){return O._compositionHelper.compositionend()})),this.register(this.onRender(function(){return O._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(L){return O._queueLinkification(L.start,L.end)}))},A.prototype.open=function(O){var L=this;if(!O)throw new Error("Terminal requires a parent element.");N.body.contains(O)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=O.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),O.appendChild(this.element);var P=N.createDocumentFragment();this._viewportElement=N.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),P.appendChild(this._viewportElement),this._viewportScrollArea=N.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=N.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=N.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),P.appendChild(this.screenElement),this.textarea=N.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",r.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register(e.addDisposableDomListener(this.textarea,"focus",function(U){return L._onTextAreaFocus(U)})),this.register(e.addDisposableDomListener(this.textarea,"blur",function(){return L._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var T=this._instantiationService.createInstance(k.CoreBrowserService,this.textarea);this._instantiationService.setService(m.ICoreBrowserService,T),this._charSizeService=this._instantiationService.createInstance(b.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(m.ICharSizeService,this._charSizeService),this._compositionView=N.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(P),this._theme=this.options.theme||this._theme,this._colorManager=new g.ColorManager(N,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(U){return L._colorManager.onOptionsChange(U)})),this._colorManager.setTheme(this._theme);var H=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(p.RenderService,H,this.rows,this.screenElement)),this._instantiationService.setService(m.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(U){return L._onRender.fire(U)})),this.onResize(function(U){return L._renderService.resize(U.cols,U.rows)}),this._soundService=this._instantiationService.createInstance(a.SoundService),this._instantiationService.setService(m.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(D.MouseService),this._instantiationService.setService(m.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(u.Viewport,function(U,q){return L.scrollLines(U,q)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return L.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){L._renderService.onCursorMove(),L._syncTextArea()})),this.register(this.onResize(function(){return L._renderService.onResize(L.cols,L.rows)})),this.register(this.onBlur(function(){return L._renderService.onBlur()})),this.register(this.onFocus(function(){return L._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return L.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(t.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(m.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(U){return L.scrollLines(U.amount,U.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return L._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(U){return L._renderService.onSelectionChanged(U.start,U.end,U.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(U){L.textarea.value=U,L.textarea.focus(),L.textarea.select()})),this.register(this.onScroll(function(){L.viewport.syncScrollArea(),L._selectionService.refresh()})),this.register(e.addDisposableDomListener(this._viewportElement,"scroll",function(){return L._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(f.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return L._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(e.addDisposableDomListener(this.element,"mousedown",function(U){return L._selectionService.onMouseDown(U)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new E.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},A.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(s.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(w.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},A.prototype._setTheme=function(O){var L,P,T;this._theme=O,(L=this._colorManager)===null||L===void 0||L.setTheme(O),(P=this._renderService)===null||P===void 0||P.setColors(this._colorManager.colors),(T=this.viewport)===null||T===void 0||T.onThemeChange(this._colorManager.colors)},A.prototype.bindMouse=function(){var O=this,L=this,P=this.element;function T(j){var W,K,de=L._mouseService.getRawByteCoords(j,L.screenElement,L.cols,L.rows);if(!de)return!1;switch(j.overrideType||j.type){case"mousemove":K=32,j.buttons===void 0?(W=3,j.button!==void 0&&(W=j.button<3?j.button:3)):W=1&j.buttons?0:4&j.buttons?1:2&j.buttons?2:3;break;case"mouseup":K=0,W=j.button<3?j.button:3;break;case"mousedown":K=1,W=j.button<3?j.button:3;break;case"wheel":j.deltaY!==0&&(K=j.deltaY<0?0:1),W=4;break;default:return!1}return!(K===void 0||W===void 0||W>4)&&L._coreMouseService.triggerMouseEvent({col:de.x-33,row:de.y-33,button:W,action:K,ctrl:j.ctrlKey,alt:j.altKey,shift:j.shiftKey})}var H={mouseup:null,wheel:null,mousedrag:null,mousemove:null},U=function(j){return T(j),j.buttons||(O._document.removeEventListener("mouseup",H.mouseup),H.mousedrag&&O._document.removeEventListener("mousemove",H.mousedrag)),O.cancel(j)},q=function(j){return T(j),j.preventDefault(),O.cancel(j)},G=function(j){j.buttons&&T(j)},Q=function(j){j.buttons||T(j)};this.register(this._coreMouseService.onProtocolChange(function(j){j?(O.optionsService.options.logLevel==="debug"&&O._logService.debug("Binding to mouse events:",O._coreMouseService.explainEvents(j)),O.element.classList.add("enable-mouse-events"),O._selectionService.disable()):(O._logService.debug("Unbinding from mouse events."),O.element.classList.remove("enable-mouse-events"),O._selectionService.enable()),8&j?H.mousemove||(P.addEventListener("mousemove",Q),H.mousemove=Q):(P.removeEventListener("mousemove",H.mousemove),H.mousemove=null),16&j?H.wheel||(P.addEventListener("wheel",q,{passive:!1}),H.wheel=q):(P.removeEventListener("wheel",H.wheel),H.wheel=null),2&j?H.mouseup||(H.mouseup=U):(O._document.removeEventListener("mouseup",H.mouseup),H.mouseup=null),4&j?H.mousedrag||(H.mousedrag=G):(O._document.removeEventListener("mousemove",H.mousedrag),H.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(e.addDisposableDomListener(P,"mousedown",function(j){if(j.preventDefault(),O.focus(),O._coreMouseService.areMouseEventsActive&&!O._selectionService.shouldForceSelection(j))return T(j),H.mouseup&&O._document.addEventListener("mouseup",H.mouseup),H.mousedrag&&O._document.addEventListener("mousemove",H.mousedrag),O.cancel(j)})),this.register(e.addDisposableDomListener(P,"wheel",function(j){if(!H.wheel){if(!O.buffer.hasScrollback){var W=O.viewport.getLinesScrolled(j);if(W===0)return;for(var K=_.C0.ESC+(O._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(j.deltaY<0?"A":"B"),de="",z=0;z<Math.abs(W);z++)de+=K;O._coreService.triggerDataEvent(de,!0)}}},{passive:!0})),this.register(e.addDisposableDomListener(P,"wheel",function(j){if(!H.wheel)return O.viewport.onWheel(j)?void 0:O.cancel(j)},{passive:!1})),this.register(e.addDisposableDomListener(P,"touchstart",function(j){if(!O._coreMouseService.areMouseEventsActive)return O.viewport.onTouchStart(j),O.cancel(j)},{passive:!0})),this.register(e.addDisposableDomListener(P,"touchmove",function(j){if(!O._coreMouseService.areMouseEventsActive)return O.viewport.onTouchMove(j)?void 0:O.cancel(j)},{passive:!1}))},A.prototype.refresh=function(O,L){var P;(P=this._renderService)===null||P===void 0||P.refreshRows(O,L)},A.prototype._queueLinkification=function(O,L){var P;(P=this.linkifier)===null||P===void 0||P.linkifyRows(O,L)},A.prototype.updateCursorStyle=function(O){this._selectionService&&this._selectionService.shouldColumnSelect(O)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},A.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},A.prototype.scrollLines=function(O,L){F.prototype.scrollLines.call(this,O,L),this.refresh(0,this.rows-1)},A.prototype.paste=function(O){l.paste(O,this.textarea,this._coreService)},A.prototype.attachCustomKeyEventHandler=function(O){this._customKeyEventHandler=O},A.prototype.registerLinkMatcher=function(O,L,P){var T=this.linkifier.registerLinkMatcher(O,L,P);return this.refresh(0,this.rows-1),T},A.prototype.deregisterLinkMatcher=function(O){this.linkifier.deregisterLinkMatcher(O)&&this.refresh(0,this.rows-1)},A.prototype.registerLinkProvider=function(O){return this.linkifier2.registerLinkProvider(O)},A.prototype.registerCharacterJoiner=function(O){var L=this._renderService.registerCharacterJoiner(O);return this.refresh(0,this.rows-1),L},A.prototype.deregisterCharacterJoiner=function(O){this._renderService.deregisterCharacterJoiner(O)&&this.refresh(0,this.rows-1)},Object.defineProperty(A.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),A.prototype.addMarker=function(O){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+O)},A.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},A.prototype.select=function(O,L,P){this._selectionService.setSelection(O,L,P)},A.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},A.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},A.prototype.clearSelection=function(){var O;(O=this._selectionService)===null||O===void 0||O.clearSelection()},A.prototype.selectAll=function(){var O;(O=this._selectionService)===null||O===void 0||O.selectAll()},A.prototype.selectLines=function(O,L){var P;(P=this._selectionService)===null||P===void 0||P.selectLines(O,L)},A.prototype._keyDown=function(O){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;if(!this._compositionHelper.keydown(O))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var L=S.evaluateKeyboardEvent(O,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(O),L.type===3||L.type===2){var P=this.rows-1;return this.scrollLines(L.type===2?-P:P),this.cancel(O,!0)}return L.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,O)||(L.cancel&&this.cancel(O,!0),!L.key||(L.key!==_.C0.ETX&&L.key!==_.C0.CR||(this.textarea.value=""),this._onKey.fire({key:L.key,domEvent:O}),this._showCursor(),this._coreService.triggerDataEvent(L.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(O,!0)))},A.prototype._isThirdLevelShift=function(O,L){var P=O.isMac&&!this.options.macOptionIsMeta&&L.altKey&&!L.ctrlKey&&!L.metaKey||O.isWindows&&L.altKey&&L.ctrlKey&&!L.metaKey;return L.type==="keypress"?P:P&&(!L.keyCode||L.keyCode>47)},A.prototype._keyUp=function(O){this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1||(function(L){return L.keyCode===16||L.keyCode===17||L.keyCode===18}(O)||this.focus(),this.updateCursorStyle(O))},A.prototype._keyPress=function(O){var L;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;if(this.cancel(O),O.charCode)L=O.charCode;else if(O.which===null||O.which===void 0)L=O.keyCode;else{if(O.which===0||O.charCode===0)return!1;L=O.which}return!(!L||(O.altKey||O.ctrlKey||O.metaKey)&&!this._isThirdLevelShift(this.browser,O))&&(L=String.fromCharCode(L),this._onKey.fire({key:L,domEvent:O}),this._showCursor(),this._coreService.triggerDataEvent(L,!0),!0)},A.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},A.prototype.resize=function(O,L){O!==this.cols||L!==this.rows?F.prototype.resize.call(this,O,L):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},A.prototype._afterResize=function(O,L){var P,T;(P=this._charSizeService)===null||P===void 0||P.measure(),(T=this.viewport)===null||T===void 0||T.syncScrollArea(!0)},A.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var O=1;O<this.rows;O++)this.buffer.lines.push(this.buffer.getBlankLine(x.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},A.prototype.reset=function(){var O,L;this.options.rows=this.rows,this.options.cols=this.cols;var P=this._customKeyEventHandler;this._setup(),F.prototype.reset.call(this),(O=this._selectionService)===null||O===void 0||O.reset(),this._customKeyEventHandler=P,this.refresh(0,this.rows-1),(L=this.viewport)===null||L===void 0||L.syncScrollArea()},A.prototype._reportWindowsOptions=function(O){if(this._renderService)switch(O){case i.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var L=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),P=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(_.C0.ESC+"[4;"+P+";"+L+"t");break;case i.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var T=this._renderService.dimensions.scaledCellWidth.toFixed(0),H=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(_.C0.ESC+"[6;"+H+";"+T+"t")}},A.prototype.cancel=function(O,L){if(this.options.cancelEvents||L)return O.preventDefault(),O.stopPropagation(),!1},A.prototype._visualBell=function(){return!1},A.prototype._soundBell=function(){return this.options.bellStyle==="sound"},A}(I.CoreTerminal);o.Terminal=M},function(B,o,C){"use strict";var d=this&&this.__decorate||function(_,i,s,c){var t,n=arguments.length,e=n<3?i:c===null?c=Object.getOwnPropertyDescriptor(i,s):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(_,i,s,c);else for(var r=_.length-1;r>=0;r--)(t=_[r])&&(e=(n<3?t(e):n>3?t(i,s,e):t(i,s))||e);return n>3&&e&&Object.defineProperty(i,s,e),e},y=this&&this.__param||function(_,i){return function(s,c){i(s,c,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;var h=C(5),u=C(1),l=function(){function _(i,s,c,t,n,e){this._textarea=i,this._compositionView=s,this._bufferService=c,this._optionsService=t,this._charSizeService=n,this._coreService=e,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(_.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),_.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},_.prototype.compositionupdate=function(i){var s=this;this._compositionView.textContent=i.data,this.updateCompositionElements(),setTimeout(function(){s._compositionPosition.end=s._textarea.value.length},0)},_.prototype.compositionend=function(){this._finalizeComposition(!0)},_.prototype.keydown=function(i){if(this._isComposing||this._isSendingComposition){if(i.keyCode===229||i.keyCode===16||i.keyCode===17||i.keyCode===18)return!1;this._finalizeComposition(!1)}return i.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},_.prototype._finalizeComposition=function(i){var s=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,i){var c={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(s._isSendingComposition){s._isSendingComposition=!1;var n=void 0;n=s._isComposing?s._textarea.value.substring(c.start,c.end):s._textarea.value.substring(c.start),s._coreService.triggerDataEvent(n,!0)}},0)}else{this._isSendingComposition=!1;var t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}},_.prototype._handleAnyTextareaChanges=function(){var i=this,s=this._textarea.value;setTimeout(function(){if(!i._isComposing){var c=i._textarea.value.replace(s,"");c.length>0&&i._coreService.triggerDataEvent(c,!0)}},0)},_.prototype.updateCompositionElements=function(i){var s=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var c=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),t=this._bufferService.buffer.y*c,n=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=n+"px",this._compositionView.style.top=t+"px",this._compositionView.style.height=c+"px",this._compositionView.style.lineHeight=c+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var e=this._compositionView.getBoundingClientRect();this._textarea.style.left=n+"px",this._textarea.style.top=t+"px",this._textarea.style.width=e.width+"px",this._textarea.style.height=e.height+"px",this._textarea.style.lineHeight=e.height+"px"}i||setTimeout(function(){return s.updateCompositionElements(!0)},0)}},_=d([y(2,u.IBufferService),y(3,u.IOptionsService),y(4,h.ICharSizeService),y(5,u.ICoreService)],_)}();o.CompositionHelper=l},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(t,n){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])})(t,n)},function(t,n){function e(){this.constructor=t}d(t,n),t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}),h=this&&this.__decorate||function(t,n,e,r){var a,f=arguments.length,E=f<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,n,e,r);else for(var w=t.length-1;w>=0;w--)(a=t[w])&&(E=(f<3?a(E):f>3?a(n,e,E):a(n,e))||E);return f>3&&E&&Object.defineProperty(n,e,E),E},u=this&&this.__param||function(t,n){return function(e,r){n(e,r,t)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;var l=C(2),_=C(7),i=C(5),s=C(1),c=function(t){function n(e,r,a,f,E,w,S){var v=t.call(this)||this;return v._scrollLines=e,v._viewportElement=r,v._scrollArea=a,v._bufferService=f,v._optionsService=E,v._charSizeService=w,v._renderService=S,v.scrollBarWidth=0,v._currentRowHeight=0,v._lastRecordedBufferLength=0,v._lastRecordedViewportHeight=0,v._lastRecordedBufferHeight=0,v._lastTouchY=0,v._lastScrollTop=0,v._wheelPartialScroll=0,v._refreshAnimationFrame=null,v._ignoreNextScrollEvent=!1,v.scrollBarWidth=v._viewportElement.offsetWidth-v._scrollArea.offsetWidth||15,v.register(_.addDisposableDomListener(v._viewportElement,"scroll",v._onScroll.bind(v))),setTimeout(function(){return v.syncScrollArea()},0),v}return y(n,t),n.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},n.prototype._refresh=function(e){var r=this;if(e)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return r._innerRefresh()}))},n.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var r=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==r&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=r),this._refreshAnimationFrame=null},n.prototype.syncScrollArea=function(e){if(e===void 0&&(e=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var r=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===r&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(e)}else this._refresh(e)},n.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var r=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(r,!0)}},n.prototype._bubbleScroll=function(e,r){var a=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(r<0&&this._viewportElement.scrollTop!==0||r>0&&a<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},n.prototype.onWheel=function(e){var r=this._getPixelsScrolled(e);return r!==0&&(this._viewportElement.scrollTop+=r,this._bubbleScroll(e,r))},n.prototype._getPixelsScrolled=function(e){if(e.deltaY===0)return 0;var r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?r*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._currentRowHeight*this._bufferService.rows),r},n.prototype.getLinesScrolled=function(e){if(e.deltaY===0)return 0;var r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(r/=this._currentRowHeight+0,this._wheelPartialScroll+=r,r=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._bufferService.rows),r},n.prototype._applyScrollModifier=function(e,r){var a=this._optionsService.options.fastScrollModifier;return a==="alt"&&r.altKey||a==="ctrl"&&r.ctrlKey||a==="shift"&&r.shiftKey?e*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:e*this._optionsService.options.scrollSensitivity},n.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},n.prototype.onTouchMove=function(e){var r=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,r!==0&&(this._viewportElement.scrollTop+=r,this._bubbleScroll(e,r))},n=h([u(3,s.IBufferService),u(4,s.IOptionsService),u(5,i.ICharSizeService),u(6,i.IRenderService)],n)}(l.Disposable);o.Viewport=c},function(B,o,C){"use strict";function d(l){return l.replace(/\r?\n/g,"\r")}function y(l,_){return _?"\x1B[200~"+l+"\x1B[201~":l}function h(l,_,i){l=y(l=d(l),i.decPrivateModes.bracketedPasteMode),i.triggerDataEvent(l,!0),_.value=""}function u(l,_,i){var s=i.getBoundingClientRect(),c=l.clientX-s.left-10,t=l.clientY-s.top-10;_.style.width="20px",_.style.height="20px",_.style.left=c+"px",_.style.top=t+"px",_.style.zIndex="1000",_.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=d,o.bracketTextForPaste=y,o.copyHandler=function(l,_){l.clipboardData&&l.clipboardData.setData("text/plain",_.selectionText),l.preventDefault()},o.handlePasteEvent=function(l,_,i){l.stopPropagation(),l.clipboardData&&h(l.clipboardData.getData("text/plain"),_,i)},o.paste=h,o.moveTextAreaUnderMouseCursor=u,o.rightClickHandler=function(l,_,i,s,c){u(l,_,i),c&&!s.isClickInSelection(l)&&s.selectWordAtCursor(l),_.value=s.selectionText,_.select()}},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(t,n){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])})(t,n)},function(t,n){function e(){this.constructor=t}d(t,n),t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;var h=C(2),u=C(15),l=C(21),_=C(22),i=C(24),s=function(){function t(n){this.table=new Uint8Array(n)}return t.prototype.setDefault=function(n,e){u.fill(this.table,n<<4|e)},t.prototype.add=function(n,e,r,a){this.table[e<<8|n]=r<<4|a},t.prototype.addMany=function(n,e,r,a){for(var f=0;f<n.length;f++)this.table[e<<8|n[f]]=r<<4|a},t}();o.TransitionTable=s,o.VT500_TRANSITION_TABLE=function(){var t=new s(4095),n=Array.apply(null,Array(256)).map(function(w,S){return S}),e=function(w,S){return n.slice(w,S)},r=e(32,127),a=e(0,24);a.push(25),a.push.apply(a,e(28,32));var f,E=e(0,14);for(f in t.setDefault(1,0),t.addMany(r,0,2,0),E)t.addMany([24,26,153,154],f,3,0),t.addMany(e(128,144),f,3,0),t.addMany(e(144,152),f,3,0),t.add(156,f,0,0),t.add(27,f,11,1),t.add(157,f,4,8),t.addMany([152,158,159],f,0,7),t.add(155,f,11,3),t.add(144,f,11,9);return t.addMany(a,0,3,0),t.addMany(a,1,3,1),t.add(127,1,0,1),t.addMany(a,8,0,8),t.addMany(a,3,3,3),t.add(127,3,0,3),t.addMany(a,4,3,4),t.add(127,4,0,4),t.addMany(a,6,3,6),t.addMany(a,5,3,5),t.add(127,5,0,5),t.addMany(a,2,3,2),t.add(127,2,0,2),t.add(93,1,4,8),t.addMany(r,8,5,8),t.add(127,8,5,8),t.addMany([156,27,24,26,7],8,6,0),t.addMany(e(28,32),8,0,8),t.addMany([88,94,95],1,0,7),t.addMany(r,7,0,7),t.addMany(a,7,0,7),t.add(156,7,0,0),t.add(127,7,0,7),t.add(91,1,11,3),t.addMany(e(64,127),3,7,0),t.addMany(e(48,60),3,8,4),t.addMany([60,61,62,63],3,9,4),t.addMany(e(48,60),4,8,4),t.addMany(e(64,127),4,7,0),t.addMany([60,61,62,63],4,0,6),t.addMany(e(32,64),6,0,6),t.add(127,6,0,6),t.addMany(e(64,127),6,0,0),t.addMany(e(32,48),3,9,5),t.addMany(e(32,48),5,9,5),t.addMany(e(48,64),5,0,6),t.addMany(e(64,127),5,7,0),t.addMany(e(32,48),4,9,5),t.addMany(e(32,48),1,9,2),t.addMany(e(32,48),2,9,2),t.addMany(e(48,127),2,10,0),t.addMany(e(48,80),1,10,0),t.addMany(e(81,88),1,10,0),t.addMany([89,90,92],1,10,0),t.addMany(e(96,127),1,10,0),t.add(80,1,11,9),t.addMany(a,9,0,9),t.add(127,9,0,9),t.addMany(e(28,32),9,0,9),t.addMany(e(32,48),9,9,12),t.addMany(e(48,60),9,8,10),t.addMany([60,61,62,63],9,9,10),t.addMany(a,11,0,11),t.addMany(e(32,128),11,0,11),t.addMany(e(28,32),11,0,11),t.addMany(a,10,0,10),t.add(127,10,0,10),t.addMany(e(28,32),10,0,10),t.addMany(e(48,60),10,8,10),t.addMany([60,61,62,63],10,0,11),t.addMany(e(32,48),10,9,12),t.addMany(a,12,0,12),t.add(127,12,0,12),t.addMany(e(28,32),12,0,12),t.addMany(e(32,48),12,9,12),t.addMany(e(48,64),12,0,11),t.addMany(e(64,127),12,12,13),t.addMany(e(64,127),10,12,13),t.addMany(e(64,127),9,12,13),t.addMany(a,13,13,13),t.addMany(r,13,13,13),t.add(127,13,0,13),t.addMany([27,156,24,26],13,14,0),t.add(160,0,2,0),t.add(160,8,5,8),t.add(160,6,0,6),t.add(160,11,0,11),t.add(160,13,13,13),t}();var c=function(t){function n(e){e===void 0&&(e=o.VT500_TRANSITION_TABLE);var r=t.call(this)||this;return r._transitions=e,r.initialState=0,r.currentState=r.initialState,r._params=new l.Params,r._params.addParam(0),r._collect=0,r.precedingCodepoint=0,r._printHandlerFb=function(a,f,E){},r._executeHandlerFb=function(a){},r._csiHandlerFb=function(a,f){},r._escHandlerFb=function(a){},r._errorHandlerFb=function(a){return a},r._printHandler=r._printHandlerFb,r._executeHandlers=Object.create(null),r._csiHandlers=Object.create(null),r._escHandlers=Object.create(null),r._oscParser=new _.OscParser,r._dcsParser=new i.DcsParser,r._errorHandler=r._errorHandlerFb,r.setEscHandler({final:"\\"},function(){}),r}return y(n,t),n.prototype._identifier=function(e,r){r===void 0&&(r=[64,126]);var a=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if((a=e.prefix.charCodeAt(0))&&60>a||a>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var f=0;f<e.intermediates.length;++f){var E=e.intermediates.charCodeAt(f);if(32>E||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");a<<=8,a|=E}}if(e.final.length!==1)throw new Error("final must be a single byte");var w=e.final.charCodeAt(0);if(r[0]>w||w>r[1])throw new Error("final must be in range "+r[0]+" .. "+r[1]);return a<<=8,a|=w},n.prototype.identToString=function(e){for(var r=[];e;)r.push(String.fromCharCode(255&e)),e>>=8;return r.reverse().join("")},n.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},n.prototype.setPrintHandler=function(e){this._printHandler=e},n.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},n.prototype.addEscHandler=function(e,r){var a=this._identifier(e,[48,126]);this._escHandlers[a]===void 0&&(this._escHandlers[a]=[]);var f=this._escHandlers[a];return f.push(r),{dispose:function(){var E=f.indexOf(r);E!==-1&&f.splice(E,1)}}},n.prototype.setEscHandler=function(e,r){this._escHandlers[this._identifier(e,[48,126])]=[r]},n.prototype.clearEscHandler=function(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]},n.prototype.setEscHandlerFallback=function(e){this._escHandlerFb=e},n.prototype.setExecuteHandler=function(e,r){this._executeHandlers[e.charCodeAt(0)]=r},n.prototype.clearExecuteHandler=function(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]},n.prototype.setExecuteHandlerFallback=function(e){this._executeHandlerFb=e},n.prototype.addCsiHandler=function(e,r){var a=this._identifier(e);this._csiHandlers[a]===void 0&&(this._csiHandlers[a]=[]);var f=this._csiHandlers[a];return f.push(r),{dispose:function(){var E=f.indexOf(r);E!==-1&&f.splice(E,1)}}},n.prototype.setCsiHandler=function(e,r){this._csiHandlers[this._identifier(e)]=[r]},n.prototype.clearCsiHandler=function(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]},n.prototype.setCsiHandlerFallback=function(e){this._csiHandlerFb=e},n.prototype.addDcsHandler=function(e,r){return this._dcsParser.addHandler(this._identifier(e),r)},n.prototype.setDcsHandler=function(e,r){this._dcsParser.setHandler(this._identifier(e),r)},n.prototype.clearDcsHandler=function(e){this._dcsParser.clearHandler(this._identifier(e))},n.prototype.setDcsHandlerFallback=function(e){this._dcsParser.setHandlerFallback(e)},n.prototype.addOscHandler=function(e,r){return this._oscParser.addHandler(e,r)},n.prototype.setOscHandler=function(e,r){this._oscParser.setHandler(e,r)},n.prototype.clearOscHandler=function(e){this._oscParser.clearHandler(e)},n.prototype.setOscHandlerFallback=function(e){this._oscParser.setHandlerFallback(e)},n.prototype.setErrorHandler=function(e){this._errorHandler=e},n.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},n.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},n.prototype.parse=function(e,r){for(var a=0,f=0,E=this.currentState,w=this._oscParser,S=this._dcsParser,v=this._collect,x=this._params,g=this._transitions.table,p=0;p<r;++p){switch((f=g[E<<8|((a=e[p])<160?a:160)])>>4){case 2:for(var m=p+1;;++m){if(m>=r||(a=e[m])<32||a>126&&a<160){this._printHandler(e,p,m),p=m-1;break}if(++m>=r||(a=e[m])<32||a>126&&a<160){this._printHandler(e,p,m),p=m-1;break}if(++m>=r||(a=e[m])<32||a>126&&a<160){this._printHandler(e,p,m),p=m-1;break}if(++m>=r||(a=e[m])<32||a>126&&a<160){this._printHandler(e,p,m),p=m-1;break}}break;case 3:this._executeHandlers[a]?this._executeHandlers[a]():this._executeHandlerFb(a),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:p,code:a,currentState:E,collect:v,params:x,abort:!1}).abort)return;break;case 7:for(var b=this._csiHandlers[v<<8|a],D=b?b.length-1:-1;D>=0&&b[D](x)===!1;D--);D<0&&this._csiHandlerFb(v<<8|a,x),this.precedingCodepoint=0;break;case 8:do switch(a){case 59:x.addParam(0);break;case 58:x.addSubParam(-1);break;default:x.addDigit(a-48)}while(++p<r&&(a=e[p])>47&&a<60);p--;break;case 9:v<<=8,v|=a;break;case 10:for(var R=this._escHandlers[v<<8|a],k=R?R.length-1:-1;k>=0&&R[k]()===!1;k--);k<0&&this._escHandlerFb(v<<8|a),this.precedingCodepoint=0;break;case 11:x.reset(),x.addParam(0),v=0;break;case 12:S.hook(v<<8|a,x);break;case 13:for(var I=p+1;;++I)if(I>=r||(a=e[I])===24||a===26||a===27||a>127&&a<160){S.put(e,p,I),p=I-1;break}break;case 14:S.unhook(a!==24&&a!==26),a===27&&(f|=1),x.reset(),x.addParam(0),v=0,this.precedingCodepoint=0;break;case 4:w.start();break;case 5:for(var N=p+1;;N++)if(N>=r||(a=e[N])<32||a>127&&a<=159){w.put(e,p,N),p=N-1;break}break;case 6:w.end(a!==24&&a!==26),a===27&&(f|=1),x.reset(),x.addParam(0),v=0,this.precedingCodepoint=0}E=15&f}this._collect=v,this.currentState=E},n}(h.Disposable);o.EscapeSequenceParser=c},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(w,S){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,x){v.__proto__=x}||function(v,x){for(var g in x)x.hasOwnProperty(g)&&(v[g]=x[g])})(w,S)},function(w,S){function v(){this.constructor=w}d(w,S),w.prototype=S===null?Object.create(S):(v.prototype=S.prototype,new v)}),h=this&&this.__decorate||function(w,S,v,x){var g,p=arguments.length,m=p<3?S:x===null?x=Object.getOwnPropertyDescriptor(S,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(w,S,v,x);else for(var b=w.length-1;b>=0;b--)(g=w[b])&&(m=(p<3?g(m):p>3?g(S,v,m):g(S,v))||m);return p>3&&m&&Object.defineProperty(S,v,m),m},u=this&&this.__param||function(w,S){return function(v,x){S(v,x,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Renderer=void 0;var l=C(41),_=C(47),i=C(48),s=C(49),c=C(29),t=C(2),n=C(5),e=C(1),r=C(25),a=C(0),f=1,E=function(w){function S(v,x,g,p,m,b,D,R,k){var I=w.call(this)||this;I._colors=v,I._screenElement=x,I._bufferService=m,I._charSizeService=b,I._optionsService=D,I._id=f++,I._onRequestRedraw=new a.EventEmitter;var N=I._optionsService.options.allowTransparency;return I._characterJoinerRegistry=new c.CharacterJoinerRegistry(I._bufferService),I._renderLayers=[new l.TextRenderLayer(I._screenElement,0,I._colors,I._characterJoinerRegistry,N,I._id,I._bufferService,D),new _.SelectionRenderLayer(I._screenElement,1,I._colors,I._id,I._bufferService,D),new s.LinkRenderLayer(I._screenElement,2,I._colors,I._id,g,p,I._bufferService,D),new i.CursorRenderLayer(I._screenElement,3,I._colors,I._id,I._onRequestRedraw,I._bufferService,D,R,k)],I.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},I._devicePixelRatio=window.devicePixelRatio,I._updateDimensions(),I.onOptionsChanged(),I}return y(S,w),Object.defineProperty(S.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),S.prototype.dispose=function(){for(var v=0,x=this._renderLayers;v<x.length;v++)x[v].dispose();w.prototype.dispose.call(this),r.removeTerminalFromCache(this._id)},S.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},S.prototype.setColors=function(v){this._colors=v;for(var x=0,g=this._renderLayers;x<g.length;x++){var p=g[x];p.setColors(this._colors),p.reset()}},S.prototype.onResize=function(v,x){this._updateDimensions();for(var g=0,p=this._renderLayers;g<p.length;g++)p[g].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},S.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},S.prototype.onBlur=function(){this._runOperation(function(v){return v.onBlur()})},S.prototype.onFocus=function(){this._runOperation(function(v){return v.onFocus()})},S.prototype.onSelectionChanged=function(v,x,g){g===void 0&&(g=!1),this._runOperation(function(p){return p.onSelectionChanged(v,x,g)})},S.prototype.onCursorMove=function(){this._runOperation(function(v){return v.onCursorMove()})},S.prototype.onOptionsChanged=function(){this._runOperation(function(v){return v.onOptionsChanged()})},S.prototype.clear=function(){this._runOperation(function(v){return v.reset()})},S.prototype._runOperation=function(v){for(var x=0,g=this._renderLayers;x<g.length;x++)v(g[x])},S.prototype.renderRows=function(v,x){for(var g=0,p=this._renderLayers;g<p.length;g++)p[g].onGridChanged(v,x)},S.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharTop=this._optionsService.options.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},S.prototype.registerCharacterJoiner=function(v){return this._characterJoinerRegistry.registerCharacterJoiner(v)},S.prototype.deregisterCharacterJoiner=function(v){return this._characterJoinerRegistry.deregisterCharacterJoiner(v)},S=h([u(4,e.IBufferService),u(5,n.ICharSizeService),u(6,e.IOptionsService),u(7,e.ICoreService),u(8,n.ICoreBrowserService)],S)}(t.Disposable);o.Renderer=E},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(t,n){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])})(t,n)},function(t,n){function e(){this.constructor=t}d(t,n),t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(o,"__esModule",{value:!0}),o.TextRenderLayer=void 0;var h=C(42),u=C(13),l=C(6),_=C(3),i=C(29),s=C(4),c=function(t){function n(e,r,a,f,E,w,S,v){var x=t.call(this,e,"text",r,E,a,w,S,v)||this;return x._characterWidth=0,x._characterFont="",x._characterOverlapCache={},x._workCell=new s.CellData,x._state=new h.GridCache,x._characterJoinerRegistry=f,x}return y(n,t),n.prototype.resize=function(e){t.prototype.resize.call(this,e);var r=this._getFont(!1,!1);this._characterWidth===e.scaledCharWidth&&this._characterFont===r||(this._characterWidth=e.scaledCharWidth,this._characterFont=r,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},n.prototype.reset=function(){this._state.clear(),this._clearAll()},n.prototype._forEachCell=function(e,r,a,f){for(var E=e;E<=r;E++)for(var w=E+this._bufferService.buffer.ydisp,S=this._bufferService.buffer.lines.get(w),v=a?a.getJoinedCharacters(w):[],x=0;x<this._bufferService.cols;x++){S.loadCell(x,this._workCell);var g=this._workCell,p=!1,m=x;if(g.getWidth()!==0){if(v.length>0&&x===v[0][0]){p=!0;var b=v.shift();g=new i.JoinedCellData(this._workCell,S.translateToString(!0,b[0],b[1]),b[1]-b[0]),m=b[1]-1}!p&&this._isOverlapping(g)&&m<S.length-1&&S.getCodePoint(m+1)===_.NULL_CELL_CODE&&(g.content&=-12582913,g.content|=2<<22),f(g,x,E),x=m}}},n.prototype._drawBackground=function(e,r){var a=this,f=this._ctx,E=this._bufferService.cols,w=0,S=0,v=null;f.save(),this._forEachCell(e,r,null,function(x,g,p){var m=null;x.isInverse()?m=x.isFgDefault()?a._colors.foreground.css:x.isFgRGB()?"rgb("+l.AttributeData.toColorRGB(x.getFgColor()).join(",")+")":a._colors.ansi[x.getFgColor()].css:x.isBgRGB()?m="rgb("+l.AttributeData.toColorRGB(x.getBgColor()).join(",")+")":x.isBgPalette()&&(m=a._colors.ansi[x.getBgColor()].css),v===null&&(w=g,S=p),p!==S?(f.fillStyle=v||"",a._fillCells(w,S,E-w,1),w=g,S=p):v!==m&&(f.fillStyle=v||"",a._fillCells(w,S,g-w,1),w=g,S=p),v=m}),v!==null&&(f.fillStyle=v,this._fillCells(w,S,E-w,1)),f.restore()},n.prototype._drawForeground=function(e,r){var a=this;this._forEachCell(e,r,this._characterJoinerRegistry,function(f,E,w){if(!f.isInvisible()&&(a._drawChars(f,E,w),f.isUnderline())){if(a._ctx.save(),f.isInverse())if(f.isBgDefault())a._ctx.fillStyle=a._colors.background.css;else if(f.isBgRGB())a._ctx.fillStyle="rgb("+l.AttributeData.toColorRGB(f.getBgColor()).join(",")+")";else{var S=f.getBgColor();a._optionsService.options.drawBoldTextInBrightColors&&f.isBold()&&S<8&&(S+=8),a._ctx.fillStyle=a._colors.ansi[S].css}else if(f.isFgDefault())a._ctx.fillStyle=a._colors.foreground.css;else if(f.isFgRGB())a._ctx.fillStyle="rgb("+l.AttributeData.toColorRGB(f.getFgColor()).join(",")+")";else{var v=f.getFgColor();a._optionsService.options.drawBoldTextInBrightColors&&f.isBold()&&v<8&&(v+=8),a._ctx.fillStyle=a._colors.ansi[v].css}a._fillBottomLineAtCells(E,w,f.getWidth()),a._ctx.restore()}})},n.prototype.onGridChanged=function(e,r){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,e,this._bufferService.cols,r-e+1),this._drawBackground(e,r),this._drawForeground(e,r))},n.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},n.prototype._isOverlapping=function(e){if(e.getWidth()!==1||e.getCode()<256)return!1;var r=e.getChars();if(this._characterOverlapCache.hasOwnProperty(r))return this._characterOverlapCache[r];this._ctx.save(),this._ctx.font=this._characterFont;var a=Math.floor(this._ctx.measureText(r).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[r]=a,a},n}(u.BaseRenderLayer);o.TextRenderLayer=c},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.GridCache=void 0;var d=function(){function y(){this.cache=[]}return y.prototype.resize=function(h,u){for(var l=0;l<h;l++){this.cache.length<=l&&this.cache.push([]);for(var _=this.cache[l].length;_<u;_++)this.cache[l].push(void 0);this.cache[l].length=u}this.cache.length=h},y.prototype.clear=function(){for(var h=0;h<this.cache.length;h++)for(var u=0;u<this.cache[h].length;u++)this.cache[h][u]=void 0},y}();o.GridCache=d},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(a,f){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,w){E.__proto__=w}||function(E,w){for(var S in w)w.hasOwnProperty(S)&&(E[S]=w[S])})(a,f)},function(a,f){function E(){this.constructor=a}d(a,f),a.prototype=f===null?Object.create(f):(E.prototype=f.prototype,new E)});Object.defineProperty(o,"__esModule",{value:!0}),o.NoneCharAtlas=o.DynamicCharAtlas=o.getGlyphCacheKey=void 0;var h=C(9),u=C(44),l=C(27),_=C(46),i=C(11),s=C(28),c=C(10),t={css:"rgba(0, 0, 0, 0)",rgba:0};function n(a){return a.code<<21|a.bg<<12|a.fg<<3|(a.bold?0:4)+(a.dim?0:2)+(a.italic?0:1)}o.getGlyphCacheKey=n;var e=function(a){function f(E,w){var S=a.call(this)||this;S._config=w,S._drawToCacheCount=0,S._glyphsWaitingOnBitmap=[],S._bitmapCommitTimeout=null,S._bitmap=null,S._cacheCanvas=E.createElement("canvas"),S._cacheCanvas.width=1024,S._cacheCanvas.height=1024,S._cacheCtx=s.throwIfFalsy(S._cacheCanvas.getContext("2d",{alpha:!0}));var v=E.createElement("canvas");v.width=S._config.scaledCharWidth,v.height=S._config.scaledCharHeight,S._tmpCtx=s.throwIfFalsy(v.getContext("2d",{alpha:S._config.allowTransparency})),S._width=Math.floor(1024/S._config.scaledCharWidth),S._height=Math.floor(1024/S._config.scaledCharHeight);var x=S._width*S._height;return S._cacheMap=new _.LRUMap(x),S._cacheMap.prealloc(x),S}return y(f,a),f.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},f.prototype.beginFrame=function(){this._drawToCacheCount=0},f.prototype.draw=function(E,w,S,v){if(w.code===32)return!0;if(!this._canCache(w))return!1;var x=n(w),g=this._cacheMap.get(x);if(g!=null)return this._drawFromCache(E,g,S,v),!0;if(this._drawToCacheCount<100){var p=void 0;p=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var m=this._drawToCache(w,p);return this._cacheMap.set(x,m),this._drawFromCache(E,m,S,v),!0}return!1},f.prototype._canCache=function(E){return E.code<256},f.prototype._toCoordinateX=function(E){return E%this._width*this._config.scaledCharWidth},f.prototype._toCoordinateY=function(E){return Math.floor(E/this._width)*this._config.scaledCharHeight},f.prototype._drawFromCache=function(E,w,S,v){if(!w.isEmpty){var x=this._toCoordinateX(w.index),g=this._toCoordinateY(w.index);E.drawImage(w.inBitmap?this._bitmap:this._cacheCanvas,x,g,this._config.scaledCharWidth,this._config.scaledCharHeight,S,v,this._config.scaledCharWidth,this._config.scaledCharHeight)}},f.prototype._getColorFromAnsiIndex=function(E){return E<this._config.colors.ansi.length?this._config.colors.ansi[E]:l.DEFAULT_ANSI_COLORS[E]},f.prototype._getBackgroundColor=function(E){return this._config.allowTransparency?t:E.bg===h.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:E.bg<256?this._getColorFromAnsiIndex(E.bg):this._config.colors.background},f.prototype._getForegroundColor=function(E){return E.fg===h.INVERTED_DEFAULT_COLOR?c.color.opaque(this._config.colors.background):E.fg<256?this._getColorFromAnsiIndex(E.fg):this._config.colors.foreground},f.prototype._drawToCache=function(E,w){this._drawToCacheCount++,this._tmpCtx.save();var S=this._getBackgroundColor(E);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=S.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var v=E.bold?this._config.fontWeightBold:this._config.fontWeight,x=E.italic?"italic":"";this._tmpCtx.font=x+" "+v+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(E).css,E.dim&&(this._tmpCtx.globalAlpha=h.DIM_OPACITY),this._tmpCtx.fillText(E.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var g=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),p=!1;this._config.allowTransparency||(p=function(R,k){for(var I=!0,N=k.rgba>>>24,M=k.rgba>>>16&255,F=k.rgba>>>8&255,A=0;A<R.data.length;A+=4)R.data[A]===N&&R.data[A+1]===M&&R.data[A+2]===F?R.data[A+3]=0:I=!1;return I}(g,S));var m=this._toCoordinateX(w),b=this._toCoordinateY(w);this._cacheCtx.putImageData(g,m,b);var D={index:w,isEmpty:p,inBitmap:!1};return this._addGlyphToBitmap(D),D},f.prototype._addGlyphToBitmap=function(E){var w=this;!("createImageBitmap"in window)||i.isFirefox||i.isSafari||(this._glyphsWaitingOnBitmap.push(E),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return w._generateBitmap()},100)))},f.prototype._generateBitmap=function(){var E=this,w=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(S){E._bitmap=S;for(var v=0;v<w.length;v++)w[v].inBitmap=!0}),this._bitmapCommitTimeout=null},f}(u.BaseCharAtlas);o.DynamicCharAtlas=e;var r=function(a){function f(E,w){return a.call(this)||this}return y(f,a),f.prototype.draw=function(E,w,S,v){return!1},f}(u.BaseCharAtlas);o.NoneCharAtlas=r},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.BaseCharAtlas=void 0;var d=function(){function y(){this._didWarmUp=!1}return y.prototype.dispose=function(){},y.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},y.prototype._doWarmUp=function(){},y.prototype.beginFrame=function(){},y}();o.BaseCharAtlas=d},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;var d=function(){function y(){this._color={},this._rgba={}}return y.prototype.clear=function(){this._color={},this._rgba={}},y.prototype.setCss=function(h,u,l){this._rgba[h]||(this._rgba[h]={}),this._rgba[h][u]=l},y.prototype.getCss=function(h,u){return this._rgba[h]?this._rgba[h][u]:void 0},y.prototype.setColor=function(h,u,l){this._color[h]||(this._color[h]={}),this._color[h][u]=l},y.prototype.getColor=function(h,u){return this._color[h]?this._color[h][u]:void 0},y}();o.ColorContrastCache=d},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.LRUMap=void 0;var d=function(){function y(h){this.capacity=h,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return y.prototype._unlinkNode=function(h){var u=h.prev,l=h.next;h===this._head&&(this._head=l),h===this._tail&&(this._tail=u),u!==null&&(u.next=l),l!==null&&(l.prev=u)},y.prototype._appendNode=function(h){var u=this._tail;u!==null&&(u.next=h),h.prev=u,h.next=null,this._tail=h,this._head===null&&(this._head=h)},y.prototype.prealloc=function(h){for(var u=this._nodePool,l=0;l<h;l++)u.push({prev:null,next:null,key:null,value:null})},y.prototype.get=function(h){var u=this._map[h];return u!==void 0?(this._unlinkNode(u),this._appendNode(u),u.value):null},y.prototype.peekValue=function(h){var u=this._map[h];return u!==void 0?u.value:null},y.prototype.peek=function(){var h=this._head;return h===null?null:h.value},y.prototype.set=function(h,u){var l=this._map[h];if(l!==void 0)l=this._map[h],this._unlinkNode(l),l.value=u;else if(this.size>=this.capacity)l=this._head,this._unlinkNode(l),delete this._map[l.key],l.key=h,l.value=u,this._map[h]=l;else{var _=this._nodePool;_.length>0?((l=_.pop()).key=h,l.value=u):l={prev:null,next:null,key:h,value:u},this._map[h]=l,this.size++}this._appendNode(l)},y}();o.LRUMap=d},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(u,l){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,i){_.__proto__=i}||function(_,i){for(var s in i)i.hasOwnProperty(s)&&(_[s]=i[s])})(u,l)},function(u,l){function _(){this.constructor=u}d(u,l),u.prototype=l===null?Object.create(l):(_.prototype=l.prototype,new _)});Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionRenderLayer=void 0;var h=function(u){function l(_,i,s,c,t,n){var e=u.call(this,_,"selection",i,!0,s,c,t,n)||this;return e._clearState(),e}return y(l,u),l.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},l.prototype.resize=function(_){u.prototype.resize.call(this,_),this._clearState()},l.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},l.prototype.onSelectionChanged=function(_,i,s){if(this._didStateChange(_,i,s,this._bufferService.buffer.ydisp))if(this._clearAll(),_&&i){var c=_[1]-this._bufferService.buffer.ydisp,t=i[1]-this._bufferService.buffer.ydisp,n=Math.max(c,0),e=Math.min(t,this._bufferService.rows-1);if(!(n>=this._bufferService.rows||e<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,s){var r=_[0],a=i[0]-r,f=e-n+1;this._fillCells(r,n,a,f)}else{r=c===n?_[0]:0;var E=n===e?i[0]:this._bufferService.cols;this._fillCells(r,n,E-r,1);var w=Math.max(e-n-1,0);if(this._fillCells(0,n+1,this._bufferService.cols,w),n!==e){var S=t===e?i[0]:this._bufferService.cols;this._fillCells(0,e,S,1)}}this._state.start=[_[0],_[1]],this._state.end=[i[0],i[1]],this._state.columnSelectMode=s,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},l.prototype._didStateChange=function(_,i,s,c){return!this._areCoordinatesEqual(_,this._state.start)||!this._areCoordinatesEqual(i,this._state.end)||s!==this._state.columnSelectMode||c!==this._state.ydisp},l.prototype._areCoordinatesEqual=function(_,i){return!(!_||!i)&&_[0]===i[0]&&_[1]===i[1]},l}(C(13).BaseRenderLayer);o.SelectionRenderLayer=h},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(i,s){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,t){c.__proto__=t}||function(c,t){for(var n in t)t.hasOwnProperty(n)&&(c[n]=t[n])})(i,s)},function(i,s){function c(){this.constructor=i}d(i,s),i.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)});Object.defineProperty(o,"__esModule",{value:!0}),o.CursorRenderLayer=void 0;var h=C(13),u=C(4),l=function(i){function s(c,t,n,e,r,a,f,E,w){var S=i.call(this,c,"cursor",t,!0,n,e,a,f)||this;return S._onRequestRedraw=r,S._coreService=E,S._coreBrowserService=w,S._cell=new u.CellData,S._state={x:0,y:0,isFocused:!1,style:"",width:0},S._cursorRenderers={bar:S._renderBarCursor.bind(S),block:S._renderBlockCursor.bind(S),underline:S._renderUnderlineCursor.bind(S)},S}return y(s,i),s.prototype.resize=function(c){i.prototype.resize.call(this,c),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},s.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},s.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},s.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},s.prototype.onOptionsChanged=function(){var c,t=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new _(this._coreBrowserService.isFocused,function(){t._render(!0)})):((c=this._cursorBlinkStateManager)===null||c===void 0||c.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},s.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},s.prototype.onGridChanged=function(c,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},s.prototype._render=function(c){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,n=t-this._bufferService.buffer.ydisp;if(n<0||n>=this._bufferService.rows)this._clearCursor();else{var e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(t).loadCell(e,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var r=this._optionsService.options.cursorStyle;return r&&r!=="block"?this._cursorRenderers[r](e,n,this._cell):this._renderBlurCursor(e,n,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=n,this._state.isFocused=!1,this._state.style=r,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===e&&this._state.y===n&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](e,n,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=n,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},s.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},s.prototype._renderBarCursor=function(c,t,n){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(c,t,this._optionsService.options.cursorWidth),this._ctx.restore()},s.prototype._renderBlockCursor=function(c,t,n){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(c,t,n.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(n,c,t),this._ctx.restore()},s.prototype._renderUnderlineCursor=function(c,t,n){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(c,t),this._ctx.restore()},s.prototype._renderBlurCursor=function(c,t,n){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(c,t,n.getWidth(),1),this._ctx.restore()},s}(h.BaseRenderLayer);o.CursorRenderLayer=l;var _=function(){function i(s,c){this._renderCallback=c,this.isCursorVisible=!0,s&&this._restartInterval()}return Object.defineProperty(i.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),i.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},i.prototype.restartBlinkAnimation=function(){var s=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){s._renderCallback(),s._animationFrame=void 0})))},i.prototype._restartInterval=function(s){var c=this;s===void 0&&(s=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(c._animationTimeRestarted){var t=600-(Date.now()-c._animationTimeRestarted);if(c._animationTimeRestarted=void 0,t>0)return void c._restartInterval(t)}c.isCursorVisible=!1,c._animationFrame=window.requestAnimationFrame(function(){c._renderCallback(),c._animationFrame=void 0}),c._blinkInterval=window.setInterval(function(){if(c._animationTimeRestarted){var n=600-(Date.now()-c._animationTimeRestarted);return c._animationTimeRestarted=void 0,void c._restartInterval(n)}c.isCursorVisible=!c.isCursorVisible,c._animationFrame=window.requestAnimationFrame(function(){c._renderCallback(),c._animationFrame=void 0})},600)},s)},i.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},i.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},i}()},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(i,s){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,t){c.__proto__=t}||function(c,t){for(var n in t)t.hasOwnProperty(n)&&(c[n]=t[n])})(i,s)},function(i,s){function c(){this.constructor=i}d(i,s),i.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)});Object.defineProperty(o,"__esModule",{value:!0}),o.LinkRenderLayer=void 0;var h=C(13),u=C(9),l=C(26),_=function(i){function s(c,t,n,e,r,a,f,E){var w=i.call(this,c,"link",t,!0,n,e,f,E)||this;return r.onShowLinkUnderline(function(S){return w._onShowLinkUnderline(S)}),r.onHideLinkUnderline(function(S){return w._onHideLinkUnderline(S)}),a.onShowLinkUnderline(function(S){return w._onShowLinkUnderline(S)}),a.onHideLinkUnderline(function(S){return w._onHideLinkUnderline(S)}),w}return y(s,i),s.prototype.resize=function(c){i.prototype.resize.call(this,c),this._state=void 0},s.prototype.reset=function(){this._clearCurrentLink()},s.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var c=this._state.y2-this._state.y1-1;c>0&&this._clearCells(0,this._state.y1+1,this._state.cols,c),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},s.prototype._onShowLinkUnderline=function(c){if(c.fg===u.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:c.fg&&l.is256Color(c.fg)?this._ctx.fillStyle=this._colors.ansi[c.fg].css:this._ctx.fillStyle=this._colors.foreground.css,c.y1===c.y2)this._fillBottomLineAtCells(c.x1,c.y1,c.x2-c.x1);else{this._fillBottomLineAtCells(c.x1,c.y1,c.cols-c.x1);for(var t=c.y1+1;t<c.y2;t++)this._fillBottomLineAtCells(0,t,c.cols);this._fillBottomLineAtCells(0,c.y2,c.x2)}this._state=c},s.prototype._onHideLinkUnderline=function(c){this._clearCurrentLink()},s}(h.BaseRenderLayer);o.LinkRenderLayer=_},function(B,o,C){"use strict";var d=this&&this.__decorate||function(i,s,c,t){var n,e=arguments.length,r=e<3?s:t===null?t=Object.getOwnPropertyDescriptor(s,c):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,s,c,t);else for(var a=i.length-1;a>=0;a--)(n=i[a])&&(r=(e<3?n(r):e>3?n(s,c,r):n(s,c))||r);return e>3&&r&&Object.defineProperty(s,c,r),r},y=this&&this.__param||function(i,s){return function(c,t){s(c,t,i)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseZone=o.Linkifier=void 0;var h=C(0),u=C(1),l=function(){function i(s,c,t){this._bufferService=s,this._logService=c,this._unicodeService=t,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new h.EventEmitter,this._onHideLinkUnderline=new h.EventEmitter,this._onLinkTooltip=new h.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(i.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),i.prototype.attachToDom=function(s,c){this._element=s,this._mouseZoneManager=c},i.prototype.linkifyRows=function(s,c){var t=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=s,this._rowsToLinkify.end=c):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,s),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,c)),this._mouseZoneManager.clearAll(s,c),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return t._linkifyRows()},i._timeBeforeLatency))},i.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var s=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var c=s.ydisp+this._rowsToLinkify.start;if(!(c>=s.lines.length)){for(var t=s.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,n=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,c,t,n,n);e.hasNext();)for(var r=e.next(),a=0;a<this._linkMatchers.length;a++)this._doLinkifyRow(r.range.first,r.content,this._linkMatchers[a]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},i.prototype.registerLinkMatcher=function(s,c,t){if(t===void 0&&(t={}),!c)throw new Error("handler must be defined");var n={id:this._nextLinkMatcherId++,regex:s,handler:c,matchIndex:t.matchIndex,validationCallback:t.validationCallback,hoverTooltipCallback:t.tooltipCallback,hoverLeaveCallback:t.leaveCallback,willLinkActivate:t.willLinkActivate,priority:t.priority||0};return this._addLinkMatcherToList(n),n.id},i.prototype._addLinkMatcherToList=function(s){if(this._linkMatchers.length!==0){for(var c=this._linkMatchers.length-1;c>=0;c--)if(s.priority<=this._linkMatchers[c].priority)return void this._linkMatchers.splice(c+1,0,s);this._linkMatchers.splice(0,0,s)}else this._linkMatchers.push(s)},i.prototype.deregisterLinkMatcher=function(s){for(var c=0;c<this._linkMatchers.length;c++)if(this._linkMatchers[c].id===s)return this._linkMatchers.splice(c,1),!0;return!1},i.prototype._doLinkifyRow=function(s,c,t){for(var n,e=this,r=new RegExp(t.regex.source,(t.regex.flags||"")+"g"),a=-1,f=function(){var w=n[typeof t.matchIndex!="number"?0:t.matchIndex];if(!w)return E._logService.debug("match found without corresponding matchIndex",n,t),"break";if(a=c.indexOf(w,a+1),r.lastIndex=a+w.length,a<0)return"break";var S=E._bufferService.buffer.stringIndexToBufferIndex(s,a);if(S[0]<0)return"break";var v=E._bufferService.buffer.lines.get(S[0]);if(!v)return"break";var x=v.getFg(S[1]),g=x?x>>9&511:void 0;t.validationCallback?t.validationCallback(w,function(p){e._rowsTimeoutId||p&&e._addLink(S[1],S[0]-e._bufferService.buffer.ydisp,w,t,g)}):E._addLink(S[1],S[0]-E._bufferService.buffer.ydisp,w,t,g)},E=this;(n=r.exec(c))!==null&&f()!=="break";);},i.prototype._addLink=function(s,c,t,n,e){var r=this;if(this._mouseZoneManager&&this._element){var a=this._unicodeService.getStringCellWidth(t),f=s%this._bufferService.cols,E=c+Math.floor(s/this._bufferService.cols),w=(f+a)%this._bufferService.cols,S=E+Math.floor((f+a)/this._bufferService.cols);w===0&&(w=this._bufferService.cols,S--),this._mouseZoneManager.add(new _(f+1,E+1,w+1,S+1,function(v){if(n.handler)return n.handler(v,t);var x=window.open();x?(x.opener=null,x.location.href=t):console.warn("Opening link blocked as opener could not be cleared")},function(){r._onShowLinkUnderline.fire(r._createLinkHoverEvent(f,E,w,S,e)),r._element.classList.add("xterm-cursor-pointer")},function(v){r._onLinkTooltip.fire(r._createLinkHoverEvent(f,E,w,S,e)),n.hoverTooltipCallback&&n.hoverTooltipCallback(v,t,{start:{x:f,y:E},end:{x:w,y:S}})},function(){r._onHideLinkUnderline.fire(r._createLinkHoverEvent(f,E,w,S,e)),r._element.classList.remove("xterm-cursor-pointer"),n.hoverLeaveCallback&&n.hoverLeaveCallback()},function(v){return!n.willLinkActivate||n.willLinkActivate(v,t)}))}},i.prototype._createLinkHoverEvent=function(s,c,t,n,e){return{x1:s,y1:c,x2:t,y2:n,cols:this._bufferService.cols,fg:e}},i._timeBeforeLatency=200,i=d([y(0,u.IBufferService),y(1,u.ILogService),y(2,u.IUnicodeService)],i)}();o.Linkifier=l;var _=function(i,s,c,t,n,e,r,a,f){this.x1=i,this.y1=s,this.x2=c,this.y2=t,this.clickCallback=n,this.hoverCallback=e,this.tooltipCallback=r,this.leaveCallback=a,this.willLinkActivate=f};o.MouseZone=_},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(w,S){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,x){v.__proto__=x}||function(v,x){for(var g in x)x.hasOwnProperty(g)&&(v[g]=x[g])})(w,S)},function(w,S){function v(){this.constructor=w}d(w,S),w.prototype=S===null?Object.create(S):(v.prototype=S.prototype,new v)}),h=this&&this.__decorate||function(w,S,v,x){var g,p=arguments.length,m=p<3?S:x===null?x=Object.getOwnPropertyDescriptor(S,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(w,S,v,x);else for(var b=w.length-1;b>=0;b--)(g=w[b])&&(m=(p<3?g(m):p>3?g(S,v,m):g(S,v))||m);return p>3&&m&&Object.defineProperty(S,v,m),m},u=this&&this.__param||function(w,S){return function(v,x){S(v,x,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;var l=C(11),_=C(52),i=C(4),s=C(0),c=C(5),t=C(1),n=C(30),e=C(53),r=C(2),a="\xA0",f=new RegExp(a,"g"),E=function(w){function S(v,x,g,p,m,b,D){var R=w.call(this)||this;return R._element=v,R._screenElement=x,R._bufferService=g,R._coreService=p,R._mouseService=m,R._optionsService=b,R._renderService=D,R._dragScrollAmount=0,R._enabled=!0,R._workCell=new i.CellData,R._mouseDownTimeStamp=0,R._onLinuxMouseSelection=R.register(new s.EventEmitter),R._onRedrawRequest=R.register(new s.EventEmitter),R._onSelectionChange=R.register(new s.EventEmitter),R._onRequestScrollLines=R.register(new s.EventEmitter),R._mouseMoveListener=function(k){return R._onMouseMove(k)},R._mouseUpListener=function(k){return R._onMouseUp(k)},R._coreService.onUserInput(function(){R.hasSelection&&R.clearSelection()}),R._trimListener=R._bufferService.buffer.lines.onTrim(function(k){return R._onTrim(k)}),R.register(R._bufferService.buffers.onBufferActivate(function(k){return R._onBufferActivate(k)})),R.enable(),R._model=new _.SelectionModel(R._bufferService),R._activeSelectionMode=0,R}return y(S,w),Object.defineProperty(S.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),S.prototype.dispose=function(){this._removeMouseDownListeners()},S.prototype.reset=function(){this.clearSelection()},S.prototype.disable=function(){this.clearSelection(),this._enabled=!1},S.prototype.enable=function(){this._enabled=!0},Object.defineProperty(S.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"hasSelection",{get:function(){var v=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;return!(!v||!x)&&(v[0]!==x[0]||v[1]!==x[1])},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"selectionText",{get:function(){var v=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;if(!v||!x)return"";var g=this._bufferService.buffer,p=[];if(this._activeSelectionMode===3){if(v[0]===x[0])return"";for(var m=v[1];m<=x[1];m++){var b=g.translateBufferLineToString(m,!0,v[0],x[0]);p.push(b)}}else{var D=v[1]===x[1]?x[0]:void 0;for(p.push(g.translateBufferLineToString(v[1],!0,v[0],D)),m=v[1]+1;m<=x[1]-1;m++){var R=g.lines.get(m);b=g.translateBufferLineToString(m,!0),R&&R.isWrapped?p[p.length-1]+=b:p.push(b)}v[1]!==x[1]&&(R=g.lines.get(x[1]),b=g.translateBufferLineToString(x[1],!0,0,x[0]),R&&R.isWrapped?p[p.length-1]+=b:p.push(b))}return p.map(function(k){return k.replace(f," ")}).join(l.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),S.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},S.prototype.refresh=function(v){var x=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return x._refresh()})),l.isLinux&&v&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},S.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},S.prototype.isClickInSelection=function(v){var x=this._getMouseBufferCoords(v),g=this._model.finalSelectionStart,p=this._model.finalSelectionEnd;return!!(g&&p&&x)&&this._areCoordsInSelection(x,g,p)},S.prototype._areCoordsInSelection=function(v,x,g){return v[1]>x[1]&&v[1]<g[1]||x[1]===g[1]&&v[1]===x[1]&&v[0]>=x[0]&&v[0]<g[0]||x[1]<g[1]&&v[1]===g[1]&&v[0]<g[0]||x[1]<g[1]&&v[1]===x[1]&&v[0]>=x[0]},S.prototype.selectWordAtCursor=function(v){var x=this._getMouseBufferCoords(v);x&&(this._selectWordAt(x,!1),this._model.selectionEnd=void 0,this.refresh(!0))},S.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},S.prototype.selectLines=function(v,x){this._model.clearSelection(),v=Math.max(v,0),x=Math.min(x,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,v],this._model.selectionEnd=[this._bufferService.cols,x],this.refresh(),this._onSelectionChange.fire()},S.prototype._onTrim=function(v){this._model.onTrim(v)&&this.refresh()},S.prototype._getMouseBufferCoords=function(v){var x=this._mouseService.getCoords(v,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(x)return x[0]--,x[1]--,x[1]+=this._bufferService.buffer.ydisp,x},S.prototype._getMouseEventScrollAmount=function(v){var x=n.getCoordsRelativeToElement(v,this._screenElement)[1],g=this._renderService.dimensions.canvasHeight;return x>=0&&x<=g?0:(x>g&&(x-=g),x=Math.min(Math.max(x,-50),50),(x/=50)/Math.abs(x)+Math.round(14*x))},S.prototype.shouldForceSelection=function(v){return l.isMac?v.altKey&&this._optionsService.options.macOptionClickForcesSelection:v.shiftKey},S.prototype.onMouseDown=function(v){if(this._mouseDownTimeStamp=v.timeStamp,(v.button!==2||!this.hasSelection)&&v.button===0){if(!this._enabled){if(!this.shouldForceSelection(v))return;v.stopPropagation()}v.preventDefault(),this._dragScrollAmount=0,this._enabled&&v.shiftKey?this._onIncrementalClick(v):v.detail===1?this._onSingleClick(v):v.detail===2?this._onDoubleClick(v):v.detail===3&&this._onTripleClick(v),this._addMouseDownListeners(),this.refresh(!0)}},S.prototype._addMouseDownListeners=function(){var v=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return v._dragScroll()},50)},S.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},S.prototype._onIncrementalClick=function(v){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(v))},S.prototype._onSingleClick=function(v){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(v)?3:0,this._model.selectionStart=this._getMouseBufferCoords(v),this._model.selectionStart){this._model.selectionEnd=void 0;var x=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);x&&x.length!==this._model.selectionStart[0]&&x.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},S.prototype._onDoubleClick=function(v){var x=this._getMouseBufferCoords(v);x&&(this._activeSelectionMode=1,this._selectWordAt(x,!0))},S.prototype._onTripleClick=function(v){var x=this._getMouseBufferCoords(v);x&&(this._activeSelectionMode=2,this._selectLineAt(x[1]))},S.prototype.shouldColumnSelect=function(v){return v.altKey&&!(l.isMac&&this._optionsService.options.macOptionClickForcesSelection)},S.prototype._onMouseMove=function(v){if(v.stopImmediatePropagation(),this._model.selectionStart){var x=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(v),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(v),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var g=this._bufferService.buffer;if(this._model.selectionEnd[1]<g.lines.length){var p=g.lines.get(this._model.selectionEnd[1]);p&&p.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}x&&x[0]===this._model.selectionEnd[0]&&x[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},S.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var v=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(v.ydisp+this._bufferService.rows,v.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=v.ydisp),this.refresh()}},S.prototype._onMouseUp=function(v){var x=v.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&x<500&&v.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var g=this._mouseService.getCoords(v,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(g&&g[0]!==void 0&&g[1]!==void 0){var p=e.moveToCellSequence(g[0]-1,g[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(p,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},S.prototype._onBufferActivate=function(v){var x=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=v.activeBuffer.lines.onTrim(function(g){return x._onTrim(g)})},S.prototype._convertViewportColToCharacterIndex=function(v,x){for(var g=x[0],p=0;x[0]>=p;p++){var m=v.loadCell(p,this._workCell).getChars().length;this._workCell.getWidth()===0?g--:m>1&&x[0]!==p&&(g+=m-1)}return g},S.prototype.setSelection=function(v,x,g){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[v,x],this._model.selectionStartLength=g,this.refresh()},S.prototype._getWordAt=function(v,x,g,p){if(g===void 0&&(g=!0),p===void 0&&(p=!0),!(v[0]>=this._bufferService.cols)){var m=this._bufferService.buffer,b=m.lines.get(v[1]);if(b){var D=m.translateBufferLineToString(v[1],!1),R=this._convertViewportColToCharacterIndex(b,v),k=R,I=v[0]-R,N=0,M=0,F=0,A=0;if(D.charAt(R)===" "){for(;R>0&&D.charAt(R-1)===" ";)R--;for(;k<D.length&&D.charAt(k+1)===" ";)k++}else{var O=v[0],L=v[0];b.getWidth(O)===0&&(N++,O--),b.getWidth(L)===2&&(M++,L++);var P=b.getString(L).length;for(P>1&&(A+=P-1,k+=P-1);O>0&&R>0&&!this._isCharWordSeparator(b.loadCell(O-1,this._workCell));){b.loadCell(O-1,this._workCell);var T=this._workCell.getChars().length;this._workCell.getWidth()===0?(N++,O--):T>1&&(F+=T-1,R-=T-1),R--,O--}for(;L<b.length&&k+1<D.length&&!this._isCharWordSeparator(b.loadCell(L+1,this._workCell));){b.loadCell(L+1,this._workCell);var H=this._workCell.getChars().length;this._workCell.getWidth()===2?(M++,L++):H>1&&(A+=H-1,k+=H-1),k++,L++}}k++;var U=R+I-N+F,q=Math.min(this._bufferService.cols,k-R+N+M-F-A);if(x||D.slice(R,k).trim()!==""){if(g&&U===0&&b.getCodePoint(0)!==32){var G=m.lines.get(v[1]-1);if(G&&b.isWrapped&&G.getCodePoint(this._bufferService.cols-1)!==32){var Q=this._getWordAt([this._bufferService.cols-1,v[1]-1],!1,!0,!1);if(Q){var j=this._bufferService.cols-Q.start;U-=j,q+=j}}}if(p&&U+q===this._bufferService.cols&&b.getCodePoint(this._bufferService.cols-1)!==32){var W=m.lines.get(v[1]+1);if(W&&W.isWrapped&&W.getCodePoint(0)!==32){var K=this._getWordAt([0,v[1]+1],!1,!1,!0);K&&(q+=K.length)}}return{start:U,length:q}}}}},S.prototype._selectWordAt=function(v,x){var g=this._getWordAt(v,x);if(g){for(;g.start<0;)g.start+=this._bufferService.cols,v[1]--;this._model.selectionStart=[g.start,v[1]],this._model.selectionStartLength=g.length}},S.prototype._selectToWordAt=function(v){var x=this._getWordAt(v,!0);if(x){for(var g=v[1];x.start<0;)x.start+=this._bufferService.cols,g--;if(!this._model.areSelectionValuesReversed())for(;x.start+x.length>this._bufferService.cols;)x.length-=this._bufferService.cols,g++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?x.start:x.start+x.length,g]}},S.prototype._isCharWordSeparator=function(v){return v.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(v.getChars())>=0},S.prototype._selectLineAt=function(v){var x=this._bufferService.buffer.getWrappedRangeForLine(v);this._model.selectionStart=[0,x.first],this._model.selectionEnd=[this._bufferService.cols,x.last],this._model.selectionStartLength=0},S=h([u(2,t.IBufferService),u(3,t.ICoreService),u(4,c.IMouseService),u(5,t.IOptionsService),u(6,c.IRenderService)],S)}(r.Disposable);o.SelectionService=E},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0;var d=function(){function y(h){this._bufferService=h,this.isSelectAllActive=!1,this.selectionStartLength=0}return y.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(y.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[h,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),y.prototype.areSelectionValuesReversed=function(){var h=this.selectionStart,u=this.selectionEnd;return!(!h||!u)&&(h[1]>u[1]||h[1]===u[1]&&h[0]>u[0])},y.prototype.onTrim=function(h){return this.selectionStart&&(this.selectionStart[1]-=h),this.selectionEnd&&(this.selectionEnd[1]-=h),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},y}();o.SelectionModel=d},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;var d=C(12);function y(s,c,t,n){var e=s-h(t,s),r=c-h(t,c);return i(Math.abs(e-r)-function(a,f,E){for(var w=0,S=a-h(E,a),v=f-h(E,f),x=0;x<Math.abs(S-v);x++){var g=u(a,f)==="A"?-1:1,p=E.buffer.lines.get(S+g*x);p&&p.isWrapped&&w++}return w}(s,c,t),_(u(s,c),n))}function h(s,c){for(var t=0,n=s.buffer.lines.get(c),e=n&&n.isWrapped;e&&c>=0&&c<s.rows;)t++,e=(n=s.buffer.lines.get(--c))&&n.isWrapped;return t}function u(s,c){return s>c?"A":"B"}function l(s,c,t,n,e,r){for(var a=s,f=c,E="";a!==t||f!==n;)a+=e?1:-1,e&&a>r.cols-1?(E+=r.buffer.translateBufferLineToString(f,!1,s,a),a=0,s=0,f++):!e&&a<0&&(E+=r.buffer.translateBufferLineToString(f,!1,0,s+1),s=a=r.cols-1,f--);return E+r.buffer.translateBufferLineToString(f,!1,s,a)}function _(s,c){var t=c?"O":"[";return d.C0.ESC+t+s}function i(s,c){s=Math.floor(s);for(var t="",n=0;n<s;n++)t+=c;return t}o.moveToCellSequence=function(s,c,t,n){var e,r=t.buffer.x,a=t.buffer.y;if(!t.buffer.hasScrollback)return function(E,w,S,v,x,g){return y(w,v,x,g).length===0?"":i(l(E,w,E,w-h(x,w),!1,x).length,_("D",g))}(r,a,0,c,t,n)+y(a,c,t,n)+function(E,w,S,v,x,g){var p;p=y(w,v,x,g).length>0?v-h(x,v):w;var m=v,b=function(D,R,k,I,N,M){var F;return F=y(k,I,N,M).length>0?I-h(N,I):R,D<k&&F<=I||D>=k&&F<I?"C":"D"}(E,w,S,v,x,g);return i(l(E,p,S,m,b==="C",x).length,_(b,g))}(r,a,s,c,t,n);if(a===c)return e=r>s?"D":"C",i(Math.abs(r-s),_(e,n));e=a>c?"D":"C";var f=Math.abs(a-c);return i(function(E,w){return w.cols-E}(a>c?s:r,t)+(f-1)*t.cols+1+((a>c?r:s)-1),_(e,n))}},function(B,o,C){"use strict";var d=this&&this.__decorate||function(l,_,i,s){var c,t=arguments.length,n=t<3?_:s===null?s=Object.getOwnPropertyDescriptor(_,i):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(l,_,i,s);else for(var e=l.length-1;e>=0;e--)(c=l[e])&&(n=(t<3?c(n):t>3?c(_,i,n):c(_,i))||n);return t>3&&n&&Object.defineProperty(_,i,n),n},y=this&&this.__param||function(l,_){return function(i,s){_(i,s,l)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SoundService=void 0;var h=C(1),u=function(){function l(_){this._optionsService=_}return Object.defineProperty(l,"audioContext",{get:function(){if(!l._audioContext){var _=window.AudioContext||window.webkitAudioContext;if(!_)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;l._audioContext=new _}return l._audioContext},enumerable:!1,configurable:!0}),l.prototype.playBellSound=function(){var _=l.audioContext;if(_){var i=_.createBufferSource();_.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(s){i.buffer=s,i.connect(_.destination),i.start(0)})}},l.prototype._base64ToArrayBuffer=function(_){for(var i=window.atob(_),s=i.length,c=new Uint8Array(s),t=0;t<s;t++)c[t]=i.charCodeAt(t);return c.buffer},l.prototype._removeMimeType=function(_){return _.split(",")[1]},l=d([y(0,h.IOptionsService)],l)}();o.SoundService=u},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(t,n){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])})(t,n)},function(t,n){function e(){this.constructor=t}d(t,n),t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}),h=this&&this.__decorate||function(t,n,e,r){var a,f=arguments.length,E=f<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,n,e,r);else for(var w=t.length-1;w>=0;w--)(a=t[w])&&(E=(f<3?a(E):f>3?a(n,e,E):a(n,e))||E);return f>3&&E&&Object.defineProperty(n,e,E),E},u=this&&this.__param||function(t,n){return function(e,r){n(e,r,t)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseZoneManager=void 0;var l=C(2),_=C(7),i=C(5),s=C(1),c=function(t){function n(e,r,a,f,E,w){var S=t.call(this)||this;return S._element=e,S._screenElement=r,S._bufferService=a,S._mouseService=f,S._selectionService=E,S._optionsService=w,S._zones=[],S._areZonesActive=!1,S._lastHoverCoords=[void 0,void 0],S._initialSelectionLength=0,S.register(_.addDisposableDomListener(S._element,"mousedown",function(v){return S._onMouseDown(v)})),S._mouseMoveListener=function(v){return S._onMouseMove(v)},S._mouseLeaveListener=function(v){return S._onMouseLeave(v)},S._clickListener=function(v){return S._onClick(v)},S}return y(n,t),n.prototype.dispose=function(){t.prototype.dispose.call(this),this._deactivate()},n.prototype.add=function(e){this._zones.push(e),this._zones.length===1&&this._activate()},n.prototype.clearAll=function(e,r){if(this._zones.length!==0){e&&r||(e=0,r=this._bufferService.rows-1);for(var a=0;a<this._zones.length;a++){var f=this._zones[a];(f.y1>e&&f.y1<=r+1||f.y2>e&&f.y2<=r+1||f.y1<e&&f.y2>r+1)&&(this._currentZone&&this._currentZone===f&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(a--,1))}this._zones.length===0&&this._deactivate()}},n.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},n.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},n.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},n.prototype._onHover=function(e){var r=this,a=this._findZoneEventAt(e);a!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),a&&(this._currentZone=a,a.hoverCallback&&a.hoverCallback(e),this._tooltipTimeout=window.setTimeout(function(){return r._onTooltip(e)},this._optionsService.options.linkTooltipHoverDuration)))},n.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var r=this._findZoneEventAt(e);r&&r.tooltipCallback&&r.tooltipCallback(e)},n.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var r=this._findZoneEventAt(e);r!=null&&r.willLinkActivate(e)&&(e.preventDefault(),e.stopImmediatePropagation())}},n.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},n.prototype._onClick=function(e){var r=this._findZoneEventAt(e),a=this._getSelectionLength();r&&a===this._initialSelectionLength&&(r.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},n.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},n.prototype._findZoneEventAt=function(e){var r=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(r)for(var a=r[0],f=r[1],E=0;E<this._zones.length;E++){var w=this._zones[E];if(w.y1===w.y2){if(f===w.y1&&a>=w.x1&&a<w.x2)return w}else if(f===w.y1&&a>=w.x1||f===w.y2&&a<w.x2||f>w.y1&&f<w.y2)return w}},n=h([u(2,s.IBufferService),u(3,i.IMouseService),u(4,i.ISelectionService),u(5,s.IOptionsService)],n)}(l.Disposable);o.MouseZoneManager=c},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(n,e){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var f in a)a.hasOwnProperty(f)&&(r[f]=a[f])})(n,e)},function(n,e){function r(){this.constructor=n}d(n,e),n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;var h=C(18),u=C(11),l=C(31),_=C(7),i=C(2),s=C(32),c=C(17),t=function(n){function e(r,a){var f=n.call(this)||this;f._terminal=r,f._renderService=a,f._liveRegionLineCount=0,f._charsToConsume=[],f._charsToAnnounce="",f._accessibilityTreeRoot=document.createElement("div"),f._accessibilityTreeRoot.classList.add("xterm-accessibility"),f._rowContainer=document.createElement("div"),f._rowContainer.classList.add("xterm-accessibility-tree"),f._rowContainer.setAttribute("role","list"),f._rowElements=[];for(var E=0;E<f._terminal.rows;E++)f._rowElements[E]=f._createAccessibilityTreeNode(),f._rowContainer.appendChild(f._rowElements[E]);if(f._topBoundaryFocusListener=function(w){return f._onBoundaryFocus(w,0)},f._bottomBoundaryFocusListener=function(w){return f._onBoundaryFocus(w,1)},f._rowElements[0].addEventListener("focus",f._topBoundaryFocusListener),f._rowElements[f._rowElements.length-1].addEventListener("focus",f._bottomBoundaryFocusListener),f._refreshRowsDimensions(),f._accessibilityTreeRoot.appendChild(f._rowContainer),f._renderRowsDebouncer=new l.RenderDebouncer(f._renderRows.bind(f)),f._refreshRows(),f._liveRegion=document.createElement("div"),f._liveRegion.classList.add("live-region"),f._liveRegion.setAttribute("aria-live","assertive"),f._accessibilityTreeRoot.appendChild(f._liveRegion),!f._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return f._terminal.element.insertAdjacentElement("afterbegin",f._accessibilityTreeRoot),f.register(f._renderRowsDebouncer),f.register(f._terminal.onResize(function(w){return f._onResize(w.rows)})),f.register(f._terminal.onRender(function(w){return f._refreshRows(w.start,w.end)})),f.register(f._terminal.onScroll(function(){return f._refreshRows()})),f.register(f._terminal.onA11yChar(function(w){return f._onChar(w)})),f.register(f._terminal.onLineFeed(function(){return f._onChar(`
|
|
|
`)})),f.register(f._terminal.onA11yTab(function(w){return f._onTab(w)})),f.register(f._terminal.onKey(function(w){return f._onKey(w.key)})),f.register(f._terminal.onBlur(function(){return f._clearLiveRegion()})),f.register(f._renderService.onDimensionsChange(function(){return f._refreshRowsDimensions()})),f._screenDprMonitor=new s.ScreenDprMonitor,f.register(f._screenDprMonitor),f._screenDprMonitor.setListener(function(){return f._refreshRowsDimensions()}),f.register(_.addDisposableDomListener(window,"resize",function(){return f._refreshRowsDimensions()})),f}return y(e,n),e.prototype.dispose=function(){n.prototype.dispose.call(this),c.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},e.prototype._onBoundaryFocus=function(r,a){var f=r.target,E=this._rowElements[a===0?1:this._rowElements.length-2];if(f.getAttribute("aria-posinset")!==(a===0?"1":""+this._terminal.buffer.lines.length)&&r.relatedTarget===E){var w,S;if(a===0?(w=f,S=this._rowElements.pop(),this._rowContainer.removeChild(S)):(w=this._rowElements.shift(),S=f,this._rowContainer.removeChild(w)),w.removeEventListener("focus",this._topBoundaryFocusListener),S.removeEventListener("focus",this._bottomBoundaryFocusListener),a===0){var v=this._createAccessibilityTreeNode();this._rowElements.unshift(v),this._rowContainer.insertAdjacentElement("afterbegin",v)}else v=this._createAccessibilityTreeNode(),this._rowElements.push(v),this._rowContainer.appendChild(v);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(a===0?-1:1),this._rowElements[a===0?1:this._rowElements.length-2].focus(),r.preventDefault(),r.stopImmediatePropagation()}},e.prototype._onResize=function(r){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var a=this._rowContainer.children.length;a<this._terminal.rows;a++)this._rowElements[a]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[a]);for(;this._rowElements.length>r;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var r=document.createElement("div");return r.setAttribute("role","listitem"),r.tabIndex=-1,this._refreshRowDimensions(r),r},e.prototype._onTab=function(r){for(var a=0;a<r;a++)this._onChar(" ")},e.prototype._onChar=function(r){var a=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==r&&(this._charsToAnnounce+=r):this._charsToAnnounce+=r,r===`
|
|
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)),u.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){a._accessibilityTreeRoot.appendChild(a._liveRegion)},0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,u.isMac&&c.removeElementFromParent(this._liveRegion)},e.prototype._onKey=function(r){this._clearLiveRegion(),this._charsToConsume.push(r)},e.prototype._refreshRows=function(r,a){this._renderRowsDebouncer.refresh(r,a,this._terminal.rows)},e.prototype._renderRows=function(r,a){for(var f=this._terminal.buffer,E=f.lines.length.toString(),w=r;w<=a;w++){var S=f.translateBufferLineToString(f.ydisp+w,!0),v=(f.ydisp+w+1).toString(),x=this._rowElements[w];x&&(S.length===0?x.innerHTML=" ":x.textContent=S,x.setAttribute("aria-posinset",v),x.setAttribute("aria-setsize",E))}this._announceCharacters()},e.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var r=0;r<this._terminal.rows;r++)this._refreshRowDimensions(this._rowElements[r])}},e.prototype._refreshRowDimensions=function(r){r.style.height=this._renderService.dimensions.actualCellHeight+"px"},e.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},e}(i.Disposable);o.AccessibilityManager=t},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(f,E){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,S){w.__proto__=S}||function(w,S){for(var v in S)S.hasOwnProperty(v)&&(w[v]=S[v])})(f,E)},function(f,E){function w(){this.constructor=f}d(f,E),f.prototype=E===null?Object.create(E):(w.prototype=E.prototype,new w)}),h=this&&this.__decorate||function(f,E,w,S){var v,x=arguments.length,g=x<3?E:S===null?S=Object.getOwnPropertyDescriptor(E,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(f,E,w,S);else for(var p=f.length-1;p>=0;p--)(v=f[p])&&(g=(x<3?v(g):x>3?v(E,w,g):v(E,w))||g);return x>3&&g&&Object.defineProperty(E,w,g),g},u=this&&this.__param||function(f,E){return function(w,S){E(w,S,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;var l=C(58),_=C(9),i=C(2),s=C(5),c=C(1),t=C(0),n=C(10),e=C(17),r=1,a=function(f){function E(w,S,v,x,g,p,m,b,D){var R=f.call(this)||this;return R._colors=w,R._element=S,R._screenElement=v,R._viewportElement=x,R._linkifier=g,R._linkifier2=p,R._charSizeService=m,R._optionsService=b,R._bufferService=D,R._terminalClass=r++,R._rowElements=[],R._rowContainer=document.createElement("div"),R._rowContainer.classList.add("xterm-rows"),R._rowContainer.style.lineHeight="normal",R._rowContainer.setAttribute("aria-hidden","true"),R._refreshRowElements(R._bufferService.cols,R._bufferService.rows),R._selectionContainer=document.createElement("div"),R._selectionContainer.classList.add("xterm-selection"),R._selectionContainer.setAttribute("aria-hidden","true"),R.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},R._updateDimensions(),R._injectCss(),R._rowFactory=new l.DomRendererRowFactory(document,R._optionsService,R._colors),R._element.classList.add("xterm-dom-renderer-owner-"+R._terminalClass),R._screenElement.appendChild(R._rowContainer),R._screenElement.appendChild(R._selectionContainer),R._linkifier.onShowLinkUnderline(function(k){return R._onLinkHover(k)}),R._linkifier.onHideLinkUnderline(function(k){return R._onLinkLeave(k)}),R._linkifier2.onShowLinkUnderline(function(k){return R._onLinkHover(k)}),R._linkifier2.onHideLinkUnderline(function(k){return R._onLinkLeave(k)}),R}return y(E,f),Object.defineProperty(E.prototype,"onRequestRedraw",{get:function(){return new t.EventEmitter().event},enumerable:!1,configurable:!0}),E.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),e.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),f.prototype.dispose.call(this)},E.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var w=0,S=this._rowElements;w<S.length;w++){var v=S[w];v.style.width=this.dimensions.canvasWidth+"px",v.style.height=this.dimensions.actualCellHeight+"px",v.style.lineHeight=this.dimensions.actualCellHeight+"px",v.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var x=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=x,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},E.prototype.setColors=function(w){this._colors=w,this._injectCss()},E.prototype._injectCss=function(){var w=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var S=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";S+=this._terminalSelector+" span:not(."+l.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+l.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+l.ITALIC_CLASS+" { font-style: italic;}",S+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",S+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",S+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+l.CURSOR_CLASS+"."+l.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+l.CURSOR_CLASS+"."+l.CURSOR_BLINK_CLASS+":not(."+l.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+l.CURSOR_CLASS+"."+l.CURSOR_BLINK_CLASS+"."+l.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+l.CURSOR_CLASS+"."+l.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+l.CURSOR_CLASS+"."+l.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+l.CURSOR_CLASS+"."+l.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",S+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach(function(v,x){S+=w._terminalSelector+" .xterm-fg-"+x+" { color: "+v.css+"; }"+w._terminalSelector+" .xterm-bg-"+x+" { background-color: "+v.css+"; }"}),S+=this._terminalSelector+" .xterm-fg-"+_.INVERTED_DEFAULT_COLOR+" { color: "+n.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+_.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=S},E.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},E.prototype._refreshRowElements=function(w,S){for(var v=this._rowElements.length;v<=S;v++){var x=document.createElement("div");this._rowContainer.appendChild(x),this._rowElements.push(x)}for(;this._rowElements.length>S;)this._rowContainer.removeChild(this._rowElements.pop())},E.prototype.onResize=function(w,S){this._refreshRowElements(w,S),this._updateDimensions()},E.prototype.onCharSizeChanged=function(){this._updateDimensions()},E.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},E.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},E.prototype.onSelectionChanged=function(w,S,v){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(w&&S){var x=w[1]-this._bufferService.buffer.ydisp,g=S[1]-this._bufferService.buffer.ydisp,p=Math.max(x,0),m=Math.min(g,this._bufferService.rows-1);if(!(p>=this._bufferService.rows||m<0)){var b=document.createDocumentFragment();if(v)b.appendChild(this._createSelectionElement(p,w[0],S[0],m-p+1));else{var D=x===p?w[0]:0,R=p===m?S[0]:this._bufferService.cols;b.appendChild(this._createSelectionElement(p,D,R));var k=m-p-1;if(b.appendChild(this._createSelectionElement(p+1,0,this._bufferService.cols,k)),p!==m){var I=g===m?S[0]:this._bufferService.cols;b.appendChild(this._createSelectionElement(m,0,I))}}this._selectionContainer.appendChild(b)}}},E.prototype._createSelectionElement=function(w,S,v,x){x===void 0&&(x=1);var g=document.createElement("div");return g.style.height=x*this.dimensions.actualCellHeight+"px",g.style.top=w*this.dimensions.actualCellHeight+"px",g.style.left=S*this.dimensions.actualCellWidth+"px",g.style.width=this.dimensions.actualCellWidth*(v-S)+"px",g},E.prototype.onCursorMove=function(){},E.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},E.prototype.clear=function(){for(var w=0,S=this._rowElements;w<S.length;w++)S[w].innerHTML=""},E.prototype.renderRows=function(w,S){for(var v=this._bufferService.buffer.ybase+this._bufferService.buffer.y,x=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),g=this._optionsService.options.cursorBlink,p=w;p<=S;p++){var m=this._rowElements[p];m.innerHTML="";var b=p+this._bufferService.buffer.ydisp,D=this._bufferService.buffer.lines.get(b),R=this._optionsService.options.cursorStyle;m.appendChild(this._rowFactory.createRow(D,b===v,R,x,g,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(E.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),E.prototype.registerCharacterJoiner=function(w){return-1},E.prototype.deregisterCharacterJoiner=function(w){return!1},E.prototype._onLinkHover=function(w){this._setCellUnderline(w.x1,w.x2,w.y1,w.y2,w.cols,!0)},E.prototype._onLinkLeave=function(w){this._setCellUnderline(w.x1,w.x2,w.y1,w.y2,w.cols,!1)},E.prototype._setCellUnderline=function(w,S,v,x,g,p){for(;w!==S||v!==x;){var m=this._rowElements[v];if(!m)return;var b=m.children[w];b&&(b.style.textDecoration=p?"underline":"none"),++w>=g&&(w=0,v++)}},E=h([u(6,s.ICharSizeService),u(7,c.IOptionsService),u(8,c.IBufferService)],E)}(i.Disposable);o.DomRenderer=a},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=o.CURSOR_STYLE_UNDERLINE_CLASS=o.CURSOR_STYLE_BAR_CLASS=o.CURSOR_STYLE_BLOCK_CLASS=o.CURSOR_BLINK_CLASS=o.CURSOR_CLASS=o.UNDERLINE_CLASS=o.ITALIC_CLASS=o.DIM_CLASS=o.BOLD_CLASS=void 0;var d=C(9),y=C(3),h=C(4),u=C(10);o.BOLD_CLASS="xterm-bold",o.DIM_CLASS="xterm-dim",o.ITALIC_CLASS="xterm-italic",o.UNDERLINE_CLASS="xterm-underline",o.CURSOR_CLASS="xterm-cursor",o.CURSOR_BLINK_CLASS="xterm-cursor-blink",o.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",o.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",o.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var l=function(){function i(s,c,t){this._document=s,this._optionsService=c,this._colors=t,this._workCell=new h.CellData}return i.prototype.setColors=function(s){this._colors=s},i.prototype.createRow=function(s,c,t,n,e,r,a){for(var f=this._document.createDocumentFragment(),E=0,w=Math.min(s.length,a)-1;w>=0;w--)if(s.loadCell(w,this._workCell).getCode()!==y.NULL_CELL_CODE||c&&w===n){E=w+1;break}for(w=0;w<E;w++){s.loadCell(w,this._workCell);var S=this._workCell.getWidth();if(S!==0){var v=this._document.createElement("span");if(S>1&&(v.style.width=r*S+"px"),c&&w===n)switch(v.classList.add(o.CURSOR_CLASS),e&&v.classList.add(o.CURSOR_BLINK_CLASS),t){case"bar":v.classList.add(o.CURSOR_STYLE_BAR_CLASS);break;case"underline":v.classList.add(o.CURSOR_STYLE_UNDERLINE_CLASS);break;default:v.classList.add(o.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&v.classList.add(o.BOLD_CLASS),this._workCell.isItalic()&&v.classList.add(o.ITALIC_CLASS),this._workCell.isDim()&&v.classList.add(o.DIM_CLASS),this._workCell.isUnderline()&&v.classList.add(o.UNDERLINE_CLASS),this._workCell.isInvisible()?v.textContent=y.WHITESPACE_CELL_CHAR:v.textContent=this._workCell.getChars()||y.WHITESPACE_CELL_CHAR;var x=this._workCell.getFgColor(),g=this._workCell.getFgColorMode(),p=this._workCell.getBgColor(),m=this._workCell.getBgColorMode(),b=!!this._workCell.isInverse();if(b){var D=x;x=p,p=D;var R=g;g=m,m=R}switch(g){case 16777216:case 33554432:this._workCell.isBold()&&x<8&&this._optionsService.options.drawBoldTextInBrightColors&&(x+=8),this._applyMinimumContrast(v,this._colors.background,this._colors.ansi[x])||v.classList.add("xterm-fg-"+x);break;case 50331648:var k=u.rgba.toColor(x>>16&255,x>>8&255,255&x);this._applyMinimumContrast(v,this._colors.background,k)||this._addStyle(v,"color:#"+_(x.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(v,this._colors.background,this._colors.foreground)||b&&v.classList.add("xterm-fg-"+d.INVERTED_DEFAULT_COLOR)}switch(m){case 16777216:case 33554432:v.classList.add("xterm-bg-"+p);break;case 50331648:this._addStyle(v,"background-color:#"+_(p.toString(16),"0",6));break;case 0:default:b&&v.classList.add("xterm-bg-"+d.INVERTED_DEFAULT_COLOR)}f.appendChild(v)}}return f},i.prototype._applyMinimumContrast=function(s,c,t){if(this._optionsService.options.minimumContrastRatio===1)return!1;var n=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return n===void 0&&(n=u.color.ensureContrastRatio(c,t,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,n!=null?n:null)),!!n&&(this._addStyle(s,"color:"+n.css),!0)},i.prototype._addStyle=function(s,c){s.setAttribute("style",""+(s.getAttribute("style")||"")+c+";")},i}();function _(i,s,c){for(;i.length<c;)i=s+i;return i}o.DomRendererRowFactory=l},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;var d=C(12),y={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(h,u,l,_){var i={type:0,cancel:!1,key:void 0},s=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?i.key=u?d.C0.ESC+"OA":d.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?i.key=u?d.C0.ESC+"OD":d.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?i.key=u?d.C0.ESC+"OC":d.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(i.key=u?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:if(h.shiftKey){i.key=d.C0.BS;break}if(h.altKey){i.key=d.C0.ESC+d.C0.DEL;break}i.key=d.C0.DEL;break;case 9:if(h.shiftKey){i.key=d.C0.ESC+"[Z";break}i.key=d.C0.HT,i.cancel=!0;break;case 13:i.key=h.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,i.cancel=!0;break;case 27:i.key=d.C0.ESC,h.altKey&&(i.key=d.C0.ESC+d.C0.ESC),i.cancel=!0;break;case 37:if(h.metaKey)break;s?(i.key=d.C0.ESC+"[1;"+(s+1)+"D",i.key===d.C0.ESC+"[1;3D"&&(i.key=d.C0.ESC+(l?"b":"[1;5D"))):i.key=u?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(h.metaKey)break;s?(i.key=d.C0.ESC+"[1;"+(s+1)+"C",i.key===d.C0.ESC+"[1;3C"&&(i.key=d.C0.ESC+(l?"f":"[1;5C"))):i.key=u?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(h.metaKey)break;s?(i.key=d.C0.ESC+"[1;"+(s+1)+"A",l||i.key!==d.C0.ESC+"[1;3A"||(i.key=d.C0.ESC+"[1;5A")):i.key=u?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(h.metaKey)break;s?(i.key=d.C0.ESC+"[1;"+(s+1)+"B",l||i.key!==d.C0.ESC+"[1;3B"||(i.key=d.C0.ESC+"[1;5B")):i.key=u?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(i.key=d.C0.ESC+"[2~");break;case 46:i.key=s?d.C0.ESC+"[3;"+(s+1)+"~":d.C0.ESC+"[3~";break;case 36:i.key=s?d.C0.ESC+"[1;"+(s+1)+"H":u?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:i.key=s?d.C0.ESC+"[1;"+(s+1)+"F":u?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:h.shiftKey?i.type=2:i.key=d.C0.ESC+"[5~";break;case 34:h.shiftKey?i.type=3:i.key=d.C0.ESC+"[6~";break;case 112:i.key=s?d.C0.ESC+"[1;"+(s+1)+"P":d.C0.ESC+"OP";break;case 113:i.key=s?d.C0.ESC+"[1;"+(s+1)+"Q":d.C0.ESC+"OQ";break;case 114:i.key=s?d.C0.ESC+"[1;"+(s+1)+"R":d.C0.ESC+"OR";break;case 115:i.key=s?d.C0.ESC+"[1;"+(s+1)+"S":d.C0.ESC+"OS";break;case 116:i.key=s?d.C0.ESC+"[15;"+(s+1)+"~":d.C0.ESC+"[15~";break;case 117:i.key=s?d.C0.ESC+"[17;"+(s+1)+"~":d.C0.ESC+"[17~";break;case 118:i.key=s?d.C0.ESC+"[18;"+(s+1)+"~":d.C0.ESC+"[18~";break;case 119:i.key=s?d.C0.ESC+"[19;"+(s+1)+"~":d.C0.ESC+"[19~";break;case 120:i.key=s?d.C0.ESC+"[20;"+(s+1)+"~":d.C0.ESC+"[20~";break;case 121:i.key=s?d.C0.ESC+"[21;"+(s+1)+"~":d.C0.ESC+"[21~";break;case 122:i.key=s?d.C0.ESC+"[23;"+(s+1)+"~":d.C0.ESC+"[23~";break;case 123:i.key=s?d.C0.ESC+"[24;"+(s+1)+"~":d.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(l&&!_||!h.altKey||h.metaKey)l&&!h.altKey&&!h.ctrlKey&&h.metaKey?h.keyCode===65&&(i.type=1):h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?i.key=h.key:h.key&&h.ctrlKey&&h.key==="_"&&(i.key=d.C0.US);else{var c=y[h.keyCode],t=c&&c[h.shiftKey?1:0];if(t)i.key=d.C0.ESC+t;else if(h.keyCode>=65&&h.keyCode<=90){var n=h.ctrlKey?h.keyCode-64:h.keyCode+32;i.key=d.C0.ESC+String.fromCharCode(n)}}else h.keyCode>=65&&h.keyCode<=90?i.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?i.key=d.C0.NUL:h.keyCode>=51&&h.keyCode<=55?i.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?i.key=d.C0.DEL:h.keyCode===219?i.key=d.C0.ESC:h.keyCode===220?i.key=d.C0.FS:h.keyCode===221&&(i.key=d.C0.GS)}return i}},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(r,a){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,E){f.__proto__=E}||function(f,E){for(var w in E)E.hasOwnProperty(w)&&(f[w]=E[w])})(r,a)},function(r,a){function f(){this.constructor=r}d(r,a),r.prototype=a===null?Object.create(a):(f.prototype=a.prototype,new f)}),h=this&&this.__decorate||function(r,a,f,E){var w,S=arguments.length,v=S<3?a:E===null?E=Object.getOwnPropertyDescriptor(a,f):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,a,f,E);else for(var x=r.length-1;x>=0;x--)(w=r[x])&&(v=(S<3?w(v):S>3?w(a,f,v):w(a,f))||v);return S>3&&v&&Object.defineProperty(a,f,v),v},u=this&&this.__param||function(r,a){return function(f,E){a(f,E,r)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;var l=C(31),_=C(0),i=C(2),s=C(32),c=C(7),t=C(1),n=C(5),e=function(r){function a(f,E,w,S,v,x){var g=r.call(this)||this;if(g._renderer=f,g._rowCount=E,g._isPaused=!1,g._needsFullRefresh=!1,g._isNextRenderRedrawOnly=!0,g._needsSelectionRefresh=!1,g._canvasWidth=0,g._canvasHeight=0,g._selectionState={start:void 0,end:void 0,columnSelectMode:!1},g._onDimensionsChange=new _.EventEmitter,g._onRender=new _.EventEmitter,g._onRefreshRequest=new _.EventEmitter,g.register({dispose:function(){return g._renderer.dispose()}}),g._renderDebouncer=new l.RenderDebouncer(function(m,b){return g._renderRows(m,b)}),g.register(g._renderDebouncer),g._screenDprMonitor=new s.ScreenDprMonitor,g._screenDprMonitor.setListener(function(){return g.onDevicePixelRatioChange()}),g.register(g._screenDprMonitor),g.register(x.onResize(function(m){return g._fullRefresh()})),g.register(S.onOptionChange(function(){return g._renderer.onOptionsChanged()})),g.register(v.onCharSizeChange(function(){return g.onCharSizeChanged()})),g._renderer.onRequestRedraw(function(m){return g.refreshRows(m.start,m.end,!0)}),g.register(c.addDisposableDomListener(window,"resize",function(){return g.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var p=new IntersectionObserver(function(m){return g._onIntersectionChange(m[m.length-1])},{threshold:0});p.observe(w),g.register({dispose:function(){return p.disconnect()}})}return g}return y(a,r),Object.defineProperty(a.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),a.prototype._onIntersectionChange=function(f){this._isPaused=f.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},a.prototype.refreshRows=function(f,E,w){w===void 0&&(w=!1),this._isPaused?this._needsFullRefresh=!0:(w||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(f,E,this._rowCount))},a.prototype._renderRows=function(f,E){this._renderer.renderRows(f,E),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:f,end:E}),this._isNextRenderRedrawOnly=!0},a.prototype.resize=function(f,E){this._rowCount=E,this._fireOnCanvasResize()},a.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},a.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},a.prototype.dispose=function(){r.prototype.dispose.call(this)},a.prototype.setRenderer=function(f){var E=this;this._renderer.dispose(),this._renderer=f,this._renderer.onRequestRedraw(function(w){return E.refreshRows(w.start,w.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},a.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},a.prototype.setColors=function(f){this._renderer.setColors(f),this._fullRefresh()},a.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},a.prototype.onResize=function(f,E){this._renderer.onResize(f,E),this._fullRefresh()},a.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},a.prototype.onBlur=function(){this._renderer.onBlur()},a.prototype.onFocus=function(){this._renderer.onFocus()},a.prototype.onSelectionChanged=function(f,E,w){this._selectionState.start=f,this._selectionState.end=E,this._selectionState.columnSelectMode=w,this._renderer.onSelectionChanged(f,E,w)},a.prototype.onCursorMove=function(){this._renderer.onCursorMove()},a.prototype.clear=function(){this._renderer.clear()},a.prototype.registerCharacterJoiner=function(f){return this._renderer.registerCharacterJoiner(f)},a.prototype.deregisterCharacterJoiner=function(f){return this._renderer.deregisterCharacterJoiner(f)},a=h([u(3,t.IOptionsService),u(4,n.ICharSizeService),u(5,t.IBufferService)],a)}(i.Disposable);o.RenderService=e},function(B,o,C){"use strict";var d=this&&this.__decorate||function(i,s,c,t){var n,e=arguments.length,r=e<3?s:t===null?t=Object.getOwnPropertyDescriptor(s,c):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,s,c,t);else for(var a=i.length-1;a>=0;a--)(n=i[a])&&(r=(e<3?n(r):e>3?n(s,c,r):n(s,c))||r);return e>3&&r&&Object.defineProperty(s,c,r),r},y=this&&this.__param||function(i,s){return function(c,t){s(c,t,i)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;var h=C(1),u=C(0),l=function(){function i(s,c,t){this._optionsService=t,this.width=0,this.height=0,this._onCharSizeChange=new u.EventEmitter,this._measureStrategy=new _(s,c,this._optionsService)}return Object.defineProperty(i.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),i.prototype.measure=function(){var s=this._measureStrategy.measure();s.width===this.width&&s.height===this.height||(this.width=s.width,this.height=s.height,this._onCharSizeChange.fire())},i=d([y(2,h.IOptionsService)],i)}();o.CharSizeService=l;var _=function(){function i(s,c,t){this._document=s,this._parentElement=c,this._optionsService=t,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return i.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var s=this._measureElement.getBoundingClientRect();return s.width!==0&&s.height!==0&&(this._result.width=s.width,this._result.height=Math.ceil(s.height)),this._result},i}()},function(B,o,C){"use strict";var d=this&&this.__decorate||function(_,i,s,c){var t,n=arguments.length,e=n<3?i:c===null?c=Object.getOwnPropertyDescriptor(i,s):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(_,i,s,c);else for(var r=_.length-1;r>=0;r--)(t=_[r])&&(e=(n<3?t(e):n>3?t(i,s,e):t(i,s))||e);return n>3&&e&&Object.defineProperty(i,s,e),e},y=this&&this.__param||function(_,i){return function(s,c){i(s,c,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;var h=C(5),u=C(30),l=function(){function _(i,s){this._renderService=i,this._charSizeService=s}return _.prototype.getCoords=function(i,s,c,t,n){return u.getCoords(i,s,c,t,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,n)},_.prototype.getRawByteCoords=function(i,s,c,t){var n=this.getCoords(i,s,c,t);return u.getRawByteCoords(n)},_=d([y(0,h.IRenderService),y(1,h.ICharSizeService)],_)}();o.MouseService=l},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(t,n){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])})(t,n)},function(t,n){function e(){this.constructor=t}d(t,n),t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}),h=this&&this.__decorate||function(t,n,e,r){var a,f=arguments.length,E=f<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,n,e,r);else for(var w=t.length-1;w>=0;w--)(a=t[w])&&(E=(f<3?a(E):f>3?a(n,e,E):a(n,e))||E);return f>3&&E&&Object.defineProperty(n,e,E),E},u=this&&this.__param||function(t,n){return function(e,r){n(e,r,t)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier2=void 0;var l=C(1),_=C(0),i=C(2),s=C(7),c=function(t){function n(e){var r=t.call(this)||this;return r._bufferService=e,r._linkProviders=[],r._linkCacheDisposables=[],r._isMouseOut=!0,r._activeLine=-1,r._onShowLinkUnderline=r.register(new _.EventEmitter),r._onHideLinkUnderline=r.register(new _.EventEmitter),r.register(i.getDisposeArrayDisposable(r._linkCacheDisposables)),r}return y(n,t),Object.defineProperty(n.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),n.prototype.registerLinkProvider=function(e){var r=this;return this._linkProviders.push(e),{dispose:function(){var a=r._linkProviders.indexOf(e);a!==-1&&r._linkProviders.splice(a,1)}}},n.prototype.attachToDom=function(e,r,a){var f=this;this._element=e,this._mouseService=r,this._renderService=a,this.register(s.addDisposableDomListener(this._element,"mouseleave",function(){f._isMouseOut=!0,f._clearCurrentLink()})),this.register(s.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(s.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},n.prototype._onMouseMove=function(e){if(this._lastMouseEvent=e,this._element&&this._mouseService){var r=this._positionFromMouseEvent(e,this._element,this._mouseService);if(r){this._isMouseOut=!1;for(var a=e.composedPath(),f=0;f<a.length;f++){var E=a[f];if(E.classList.contains("xterm"))break;if(E.classList.contains("xterm-hover"))return}this._lastBufferCell&&r.x===this._lastBufferCell.x&&r.y===this._lastBufferCell.y||(this._onHover(r),this._lastBufferCell=r)}}},n.prototype._onHover=function(e){if(this._activeLine!==e.y)return this._clearCurrentLink(),void this._askForLink(e,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))},n.prototype._askForLink=function(e,r){var a=this;this._activeProviderReplies&&r||(this._activeProviderReplies=new Map,this._activeLine=e.y);var f=!1;this._linkProviders.forEach(function(E,w){var S;r?!((S=a._activeProviderReplies)===null||S===void 0)&&S.get(w)&&(f=a._checkLinkProviderResult(w,e,f)):E.provideLinks(e.y,function(v){var x,g;if(!a._isMouseOut){var p=v==null?void 0:v.map(function(m){return{link:m}});(x=a._activeProviderReplies)===null||x===void 0||x.set(w,p),f=a._checkLinkProviderResult(w,e,f),((g=a._activeProviderReplies)===null||g===void 0?void 0:g.size)===a._linkProviders.length&&a._removeIntersectingLinks(e.y,a._activeProviderReplies)}})})},n.prototype._removeIntersectingLinks=function(e,r){for(var a=new Set,f=0;f<r.size;f++){var E=r.get(f);if(E)for(var w=0;w<E.length;w++)for(var S=E[w],v=S.link.range.start.y<e?0:S.link.range.start.x,x=S.link.range.end.y>e?this._bufferService.cols:S.link.range.end.x,g=v;g<=x;g++){if(a.has(g)){E.splice(w--,1);break}a.add(g)}}},n.prototype._checkLinkProviderResult=function(e,r,a){var f,E=this;if(!this._activeProviderReplies)return a;for(var w=this._activeProviderReplies.get(e),S=!1,v=0;v<e;v++)this._activeProviderReplies.has(v)&&!this._activeProviderReplies.get(v)||(S=!0);if(!S&&w){var x=w.find(function(p){return E._linkAtPosition(p.link,r)});x&&(a=!0,this._handleNewLink(x))}if(this._activeProviderReplies.size===this._linkProviders.length&&!a)for(v=0;v<this._activeProviderReplies.size;v++){var g=(f=this._activeProviderReplies.get(v))===null||f===void 0?void 0:f.find(function(p){return E._linkAtPosition(p.link,r)});if(g){a=!0,this._handleNewLink(g);break}}return a},n.prototype._onClick=function(e){if(this._element&&this._mouseService&&this._currentLink){var r=this._positionFromMouseEvent(e,this._element,this._mouseService);r&&this._linkAtPosition(this._currentLink.link,r)&&this._currentLink.link.activate(e,this._currentLink.link.text)}},n.prototype._clearCurrentLink=function(e,r){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!r||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=r)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,i.disposeArray(this._linkCacheDisposables))},n.prototype._handleNewLink=function(e){var r=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var a=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);a&&this._linkAtPosition(e.link,a)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:function(){var f,E;return(E=(f=r._currentLink)===null||f===void 0?void 0:f.state)===null||E===void 0?void 0:E.decorations.pointerCursor},set:function(f){var E,w;!((E=r._currentLink)===null||E===void 0)&&E.state&&r._currentLink.state.decorations.pointerCursor!==f&&(r._currentLink.state.decorations.pointerCursor=f,r._currentLink.state.isHovered&&((w=r._element)===null||w===void 0||w.classList.toggle("xterm-cursor-pointer",f)))}},underline:{get:function(){var f,E;return(E=(f=r._currentLink)===null||f===void 0?void 0:f.state)===null||E===void 0?void 0:E.decorations.underline},set:function(f){var E,w,S;!((E=r._currentLink)===null||E===void 0)&&E.state&&((S=(w=r._currentLink)===null||w===void 0?void 0:w.state)===null||S===void 0?void 0:S.decorations.underline)!==f&&(r._currentLink.state.decorations.underline=f,r._currentLink.state.isHovered&&r._fireUnderlineEvent(e.link,f))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(f){var E=f.start===0?0:f.start+1+r._bufferService.buffer.ydisp;r._clearCurrentLink(E,f.end+1+r._bufferService.buffer.ydisp)})))}},n.prototype._linkHover=function(e,r,a){var f;!((f=this._currentLink)===null||f===void 0)&&f.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),r.hover&&r.hover(a,r.text)},n.prototype._fireUnderlineEvent=function(e,r){var a=e.range,f=this._bufferService.buffer.ydisp,E=this._createLinkUnderlineEvent(a.start.x-1,a.start.y-f-1,a.end.x,a.end.y-f-1,void 0);(r?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(E)},n.prototype._linkLeave=function(e,r,a){var f;!((f=this._currentLink)===null||f===void 0)&&f.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),r.leave&&r.leave(a,r.text)},n.prototype._linkAtPosition=function(e,r){var a=e.range.start.y===e.range.end.y,f=e.range.start.y<r.y,E=e.range.end.y>r.y;return(a&&e.range.start.x<=r.x&&e.range.end.x>=r.x||f&&e.range.end.x>=r.x||E&&e.range.start.x<=r.x||f&&E)&&e.range.start.y<=r.y&&e.range.end.y>=r.y},n.prototype._positionFromMouseEvent=function(e,r,a){var f=a.getCoords(e,r,this._bufferService.cols,this._bufferService.rows);if(f)return{x:f[0],y:f[1]+this._bufferService.buffer.ydisp}},n.prototype._createLinkUnderlineEvent=function(e,r,a,f,E){return{x1:e,y1:r,x2:a,y2:f,cols:this._bufferService.cols,fg:E}},n=h([u(0,l.IBufferService)],n)}(i.Disposable);o.Linkifier2=c},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;var d=function(){function y(h){this._textarea=h}return Object.defineProperty(y.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),y}();o.CoreBrowserService=d},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(v,x){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,p){g.__proto__=p}||function(g,p){for(var m in p)p.hasOwnProperty(m)&&(g[m]=p[m])})(v,x)},function(v,x){function g(){this.constructor=v}d(v,x),v.prototype=x===null?Object.create(x):(g.prototype=x.prototype,new g)});Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;var h=C(2),u=C(1),l=C(66),_=C(67),i=C(68),s=C(74),c=C(75),t=C(0),n=C(76),e=C(77),r=C(78),a=C(80),f=C(81),E=C(19),w=C(82),S=function(v){function x(g){var p=v.call(this)||this;return p._onBinary=new t.EventEmitter,p._onData=new t.EventEmitter,p._onLineFeed=new t.EventEmitter,p._onResize=new t.EventEmitter,p._onScroll=new t.EventEmitter,p._instantiationService=new l.InstantiationService,p.optionsService=new s.OptionsService(g),p._instantiationService.setService(u.IOptionsService,p.optionsService),p._bufferService=p.register(p._instantiationService.createInstance(i.BufferService)),p._instantiationService.setService(u.IBufferService,p._bufferService),p._logService=p._instantiationService.createInstance(_.LogService),p._instantiationService.setService(u.ILogService,p._logService),p._coreService=p.register(p._instantiationService.createInstance(c.CoreService,function(){return p.scrollToBottom()})),p._instantiationService.setService(u.ICoreService,p._coreService),p._coreMouseService=p._instantiationService.createInstance(n.CoreMouseService),p._instantiationService.setService(u.ICoreMouseService,p._coreMouseService),p._dirtyRowService=p._instantiationService.createInstance(e.DirtyRowService),p._instantiationService.setService(u.IDirtyRowService,p._dirtyRowService),p.unicodeService=p._instantiationService.createInstance(r.UnicodeService),p._instantiationService.setService(u.IUnicodeService,p.unicodeService),p._charsetService=p._instantiationService.createInstance(a.CharsetService),p._instantiationService.setService(u.ICharsetService,p._charsetService),p._inputHandler=new E.InputHandler(p._bufferService,p._charsetService,p._coreService,p._dirtyRowService,p._logService,p.optionsService,p._coreMouseService,p.unicodeService),p.register(t.forwardEvent(p._inputHandler.onLineFeed,p._onLineFeed)),p.register(p._inputHandler),p.register(t.forwardEvent(p._bufferService.onResize,p._onResize)),p.register(t.forwardEvent(p._coreService.onData,p._onData)),p.register(t.forwardEvent(p._coreService.onBinary,p._onBinary)),p.register(p.optionsService.onOptionChange(function(m){return p._updateOptions(m)})),p._writeBuffer=new w.WriteBuffer(function(m){return p._inputHandler.parse(m)}),p}return y(x,v),Object.defineProperty(x.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),x.prototype.dispose=function(){var g;this._isDisposed||(v.prototype.dispose.call(this),(g=this._windowsMode)===null||g===void 0||g.dispose(),this._windowsMode=void 0)},x.prototype.write=function(g,p){this._writeBuffer.write(g,p)},x.prototype.writeSync=function(g){this._writeBuffer.writeSync(g)},x.prototype.resize=function(g,p){isNaN(g)||isNaN(p)||(g=Math.max(g,i.MINIMUM_COLS),p=Math.max(p,i.MINIMUM_ROWS),this._bufferService.resize(g,p))},x.prototype.scroll=function(g,p){p===void 0&&(p=!1);var m,b=this._bufferService.buffer;(m=this._cachedBlankLine)&&m.length===this.cols&&m.getFg(0)===g.fg&&m.getBg(0)===g.bg||(m=b.getBlankLine(g,p),this._cachedBlankLine=m),m.isWrapped=p;var D=b.ybase+b.scrollTop,R=b.ybase+b.scrollBottom;if(b.scrollTop===0){var k=b.lines.isFull;R===b.lines.length-1?k?b.lines.recycle().copyFrom(m):b.lines.push(m.clone()):b.lines.splice(R+1,0,m.clone()),k?this._bufferService.isUserScrolling&&(b.ydisp=Math.max(b.ydisp-1,0)):(b.ybase++,this._bufferService.isUserScrolling||b.ydisp++)}else{var I=R-D+1;b.lines.shiftElements(D+1,I-1,-1),b.lines.set(R,m.clone())}this._bufferService.isUserScrolling||(b.ydisp=b.ybase),this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom),this._onScroll.fire(b.ydisp)},x.prototype.scrollLines=function(g,p){var m=this._bufferService.buffer;if(g<0){if(m.ydisp===0)return;this._bufferService.isUserScrolling=!0}else g+m.ydisp>=m.ybase&&(this._bufferService.isUserScrolling=!1);var b=m.ydisp;m.ydisp=Math.max(Math.min(m.ydisp+g,m.ybase),0),b!==m.ydisp&&(p||this._onScroll.fire(m.ydisp))},x.prototype.scrollPages=function(g){this.scrollLines(g*(this.rows-1))},x.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},x.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},x.prototype.scrollToLine=function(g){var p=g-this._bufferService.buffer.ydisp;p!==0&&this.scrollLines(p)},x.prototype.addEscHandler=function(g,p){return this._inputHandler.addEscHandler(g,p)},x.prototype.addDcsHandler=function(g,p){return this._inputHandler.addDcsHandler(g,p)},x.prototype.addCsiHandler=function(g,p){return this._inputHandler.addCsiHandler(g,p)},x.prototype.addOscHandler=function(g,p){return this._inputHandler.addOscHandler(g,p)},x.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},x.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},x.prototype._updateOptions=function(g){var p;switch(g){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((p=this._windowsMode)===null||p===void 0||p.dispose(),this._windowsMode=void 0)}},x.prototype._enableWindowsMode=function(){var g=this;if(!this._windowsMode){var p=[];p.push(this.onLineFeed(f.updateWindowsModeWrappedState.bind(null,this._bufferService))),p.push(this.addCsiHandler({final:"H"},function(){return f.updateWindowsModeWrappedState(g._bufferService),!1})),this._windowsMode={dispose:function(){for(var m=0,b=p;m<b.length;m++)b[m].dispose()}}}},x}(h.Disposable);o.CoreTerminal=S},function(B,o,C){"use strict";var d=this&&this.__spreadArrays||function(){for(var _=0,i=0,s=arguments.length;i<s;i++)_+=arguments[i].length;var c=Array(_),t=0;for(i=0;i<s;i++)for(var n=arguments[i],e=0,r=n.length;e<r;e++,t++)c[t]=n[e];return c};Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;var y=C(1),h=C(14),u=function(){function _(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];this._entries=new Map;for(var c=0,t=i;c<t.length;c++){var n=t[c],e=n[0],r=n[1];this.set(e,r)}}return _.prototype.set=function(i,s){var c=this._entries.get(i);return this._entries.set(i,s),c},_.prototype.forEach=function(i){this._entries.forEach(function(s,c){return i(c,s)})},_.prototype.has=function(i){return this._entries.has(i)},_.prototype.get=function(i){return this._entries.get(i)},_}();o.ServiceCollection=u;var l=function(){function _(){this._services=new u,this._services.set(y.IInstantiationService,this)}return _.prototype.setService=function(i,s){this._services.set(i,s)},_.prototype.getService=function(i){return this._services.get(i)},_.prototype.createInstance=function(i){for(var s=[],c=1;c<arguments.length;c++)s[c-1]=arguments[c];for(var t=h.getServiceDependencies(i).sort(function(w,S){return w.index-S.index}),n=[],e=0,r=t;e<r.length;e++){var a=r[e],f=this._services.get(a.id);if(!f)throw new Error("[createInstance] "+i.name+" depends on UNKNOWN service "+a.id+".");n.push(f)}var E=t.length>0?t[0].index:s.length;if(s.length!==E)throw new Error("[createInstance] First service dependency of "+i.name+" at position "+(E+1)+" conflicts with "+s.length+" static arguments");return new(i.bind.apply(i,d([void 0],d(s,n))))},_}();o.InstantiationService=l},function(B,o,C){"use strict";var d=this&&this.__decorate||function(s,c,t,n){var e,r=arguments.length,a=r<3?c:n===null?n=Object.getOwnPropertyDescriptor(c,t):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(s,c,t,n);else for(var f=s.length-1;f>=0;f--)(e=s[f])&&(a=(r<3?e(a):r>3?e(c,t,a):e(c,t))||a);return r>3&&a&&Object.defineProperty(c,t,a),a},y=this&&this.__param||function(s,c){return function(t,n){c(t,n,s)}},h=this&&this.__spreadArrays||function(){for(var s=0,c=0,t=arguments.length;c<t;c++)s+=arguments[c].length;var n=Array(s),e=0;for(c=0;c<t;c++)for(var r=arguments[c],a=0,f=r.length;a<f;a++,e++)n[e]=r[a];return n};Object.defineProperty(o,"__esModule",{value:!0}),o.LogService=o.LogLevel=void 0;var u,l=C(1);(function(s){s[s.DEBUG=0]="DEBUG",s[s.INFO=1]="INFO",s[s.WARN=2]="WARN",s[s.ERROR=3]="ERROR",s[s.OFF=4]="OFF"})(u=o.LogLevel||(o.LogLevel={}));var _={debug:u.DEBUG,info:u.INFO,warn:u.WARN,error:u.ERROR,off:u.OFF},i=function(){function s(c){var t=this;this._optionsService=c,this._updateLogLevel(),this._optionsService.onOptionChange(function(n){n==="logLevel"&&t._updateLogLevel()})}return s.prototype._updateLogLevel=function(){this._logLevel=_[this._optionsService.options.logLevel]},s.prototype._evalLazyOptionalParams=function(c){for(var t=0;t<c.length;t++)typeof c[t]=="function"&&(c[t]=c[t]())},s.prototype._log=function(c,t,n){this._evalLazyOptionalParams(n),c.call.apply(c,h([console,"xterm.js: "+t],n))},s.prototype.debug=function(c){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._logLevel<=u.DEBUG&&this._log(console.log,c,t)},s.prototype.info=function(c){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._logLevel<=u.INFO&&this._log(console.info,c,t)},s.prototype.warn=function(c){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._logLevel<=u.WARN&&this._log(console.warn,c,t)},s.prototype.error=function(c){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._logLevel<=u.ERROR&&this._log(console.error,c,t)},s=d([y(0,l.IOptionsService)],s)}();o.LogService=i},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(t,n){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])})(t,n)},function(t,n){function e(){this.constructor=t}d(t,n),t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}),h=this&&this.__decorate||function(t,n,e,r){var a,f=arguments.length,E=f<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,n,e,r);else for(var w=t.length-1;w>=0;w--)(a=t[w])&&(E=(f<3?a(E):f>3?a(n,e,E):a(n,e))||E);return f>3&&E&&Object.defineProperty(n,e,E),E},u=this&&this.__param||function(t,n){return function(e,r){n(e,r,t)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;var l=C(1),_=C(69),i=C(0),s=C(2);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;var c=function(t){function n(e){var r=t.call(this)||this;return r._optionsService=e,r.isUserScrolling=!1,r._onResize=new i.EventEmitter,r.cols=Math.max(e.options.cols,o.MINIMUM_COLS),r.rows=Math.max(e.options.rows,o.MINIMUM_ROWS),r.buffers=new _.BufferSet(e,r),r}return y(n,t),Object.defineProperty(n.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),n.prototype.dispose=function(){t.prototype.dispose.call(this),this.buffers.dispose()},n.prototype.resize=function(e,r){this.cols=e,this.rows=r,this.buffers.resize(e,r),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:r})},n.prototype.reset=function(){this.buffers.dispose(),this.buffers=new _.BufferSet(this._optionsService,this),this.isUserScrolling=!1},n=h([u(0,l.IOptionsService)],n)}(s.Disposable);o.BufferService=c},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(_,i){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,c){s.__proto__=c}||function(s,c){for(var t in c)c.hasOwnProperty(t)&&(s[t]=c[t])})(_,i)},function(_,i){function s(){this.constructor=_}d(_,i),_.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)});Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;var h=C(70),u=C(0),l=function(_){function i(s,c){var t=_.call(this)||this;return t._onBufferActivate=t.register(new u.EventEmitter),t._normal=new h.Buffer(!0,s,c),t._normal.fillViewportRows(),t._alt=new h.Buffer(!1,s,c),t._activeBuffer=t._normal,t.setupTabStops(),t}return y(i,_),Object.defineProperty(i.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),i.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},i.prototype.activateAltBuffer=function(s){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(s),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},i.prototype.resize=function(s,c){this._normal.resize(s,c),this._alt.resize(s,c)},i.prototype.setupTabStops=function(s){this._normal.setupTabStops(s),this._alt.setupTabStops(s)},i}(C(2).Disposable);o.BufferSet=l},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.BufferStringIterator=o.Buffer=o.MAX_BUFFER_SIZE=void 0;var d=C(71),y=C(16),h=C(4),u=C(3),l=C(72),_=C(73),i=C(20),s=C(6);o.MAX_BUFFER_SIZE=4294967295;var c=function(){function n(e,r,a){this._hasScrollback=e,this._optionsService=r,this._bufferService=a,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=y.DEFAULT_ATTR_DATA.clone(),this.savedCharset=i.DEFAULT_CHARSET,this.markers=[],this._nullCell=h.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]),this._whitespaceCell=h.CellData.fromCharData([0,u.WHITESPACE_CELL_CHAR,u.WHITESPACE_CELL_WIDTH,u.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return n.prototype.getNullCell=function(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new s.ExtendedAttrs),this._nullCell},n.prototype.getWhitespaceCell=function(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new s.ExtendedAttrs),this._whitespaceCell},n.prototype.getBlankLine=function(e,r){return new y.BufferLine(this._bufferService.cols,this.getNullCell(e),r)},Object.defineProperty(n.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isCursorInViewport",{get:function(){var e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows},enumerable:!1,configurable:!0}),n.prototype._getCorrectBufferLength=function(e){if(!this._hasScrollback)return e;var r=e+this._optionsService.options.scrollback;return r>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:r},n.prototype.fillViewportRows=function(e){if(this.lines.length===0){e===void 0&&(e=y.DEFAULT_ATTR_DATA);for(var r=this._rows;r--;)this.lines.push(this.getBlankLine(e))}},n.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},n.prototype.resize=function(e,r){var a=this.getNullCell(y.DEFAULT_ATTR_DATA),f=this._getCorrectBufferLength(r);if(f>this.lines.maxLength&&(this.lines.maxLength=f),this.lines.length>0){if(this._cols<e)for(var E=0;E<this.lines.length;E++)this.lines.get(E).resize(e,a);var w=0;if(this._rows<r)for(var S=this._rows;S<r;S++)this.lines.length<r+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new y.BufferLine(e,a)):this.ybase>0&&this.lines.length<=this.ybase+this.y+w+1?(this.ybase--,w++,this.ydisp>0&&this.ydisp--):this.lines.push(new y.BufferLine(e,a)));else for(S=this._rows;S>r;S--)this.lines.length>r+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(f<this.lines.maxLength){var v=this.lines.length-f;v>0&&(this.lines.trimStart(v),this.ybase=Math.max(this.ybase-v,0),this.ydisp=Math.max(this.ydisp-v,0),this.savedY=Math.max(this.savedY-v,0)),this.lines.maxLength=f}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,r-1),w&&(this.y+=w),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=r-1,this._isReflowEnabled&&(this._reflow(e,r),this._cols>e))for(E=0;E<this.lines.length;E++)this.lines.get(E).resize(e,a);this._cols=e,this._rows=r},Object.defineProperty(n.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),n.prototype._reflow=function(e,r){this._cols!==e&&(e>this._cols?this._reflowLarger(e,r):this._reflowSmaller(e,r))},n.prototype._reflowLarger=function(e,r){var a=l.reflowLargerGetLinesToRemove(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(y.DEFAULT_ATTR_DATA));if(a.length>0){var f=l.reflowLargerCreateNewLayout(this.lines,a);l.reflowLargerApplyNewLayout(this.lines,f.layout),this._reflowLargerAdjustViewport(e,r,f.countRemoved)}},n.prototype._reflowLargerAdjustViewport=function(e,r,a){for(var f=this.getNullCell(y.DEFAULT_ATTR_DATA),E=a;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<r&&this.lines.push(new y.BufferLine(e,f))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-a,0)},n.prototype._reflowSmaller=function(e,r){for(var a=this.getNullCell(y.DEFAULT_ATTR_DATA),f=[],E=0,w=this.lines.length-1;w>=0;w--){var S=this.lines.get(w);if(!(!S||!S.isWrapped&&S.getTrimmedLength()<=e)){for(var v=[S];S.isWrapped&&w>0;)S=this.lines.get(--w),v.unshift(S);var x=this.ybase+this.y;if(!(x>=w&&x<w+v.length)){var g=v[v.length-1].getTrimmedLength(),p=l.reflowSmallerGetNewLineLengths(v,this._cols,e),m=p.length-v.length,b=void 0;b=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+m):Math.max(0,this.lines.length-this.lines.maxLength+m);for(var D=[],R=0;R<m;R++){var k=this.getBlankLine(y.DEFAULT_ATTR_DATA,!0);D.push(k)}D.length>0&&(f.push({start:w+v.length+E,newLines:D}),E+=D.length),v.push.apply(v,D);var I=p.length-1,N=p[I];N===0&&(N=p[--I]);for(var M=v.length-m-1,F=g;M>=0;){var A=Math.min(F,N);if(v[I].copyCellsFrom(v[M],F-A,N-A,A,!0),(N-=A)===0&&(N=p[--I]),(F-=A)===0){M--;var O=Math.max(M,0);F=l.getWrappedLineTrimmedLength(v,O,this._cols)}}for(R=0;R<v.length;R++)p[R]<e&&v[R].setCell(p[R],a);for(var L=m-b;L-- >0;)this.ybase===0?this.y<r-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+E)-r&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+m,this.ybase+r-1)}}}if(f.length>0){var P=[],T=[];for(R=0;R<this.lines.length;R++)T.push(this.lines.get(R));var H=this.lines.length,U=H-1,q=0,G=f[q];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+E);var Q=0;for(R=Math.min(this.lines.maxLength-1,H+E-1);R>=0;R--)if(G&&G.start>U+Q){for(var j=G.newLines.length-1;j>=0;j--)this.lines.set(R--,G.newLines[j]);R++,P.push({index:U+1,amount:G.newLines.length}),Q+=G.newLines.length,G=f[++q]}else this.lines.set(R,T[U--]);var W=0;for(R=P.length-1;R>=0;R--)P[R].index+=W,this.lines.onInsertEmitter.fire(P[R]),W+=P[R].amount;var K=Math.max(0,H+E-this.lines.maxLength);K>0&&this.lines.onTrimEmitter.fire(K)}},n.prototype.stringIndexToBufferIndex=function(e,r,a){for(a===void 0&&(a=!1);r;){var f=this.lines.get(e);if(!f)return[-1,-1];for(var E=a?f.getTrimmedLength():f.length,w=0;w<E;++w)if(f.get(w)[u.CHAR_DATA_WIDTH_INDEX]&&(r-=f.get(w)[u.CHAR_DATA_CHAR_INDEX].length||1),r<0)return[e,w];e++}return[e,0]},n.prototype.translateBufferLineToString=function(e,r,a,f){a===void 0&&(a=0);var E=this.lines.get(e);return E?E.translateToString(r,a,f):""},n.prototype.getWrappedRangeForLine=function(e){for(var r=e,a=e;r>0&&this.lines.get(r).isWrapped;)r--;for(;a+1<this.lines.length&&this.lines.get(a+1).isWrapped;)a++;return{first:r,last:a}},n.prototype.setupTabStops=function(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.options.tabStopWidth)this.tabs[e]=!0},n.prototype.prevStop=function(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e},n.prototype.nextStop=function(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e},n.prototype.addMarker=function(e){var r=this,a=new _.Marker(e);return this.markers.push(a),a.register(this.lines.onTrim(function(f){a.line-=f,a.line<0&&a.dispose()})),a.register(this.lines.onInsert(function(f){a.line>=f.index&&(a.line+=f.amount)})),a.register(this.lines.onDelete(function(f){a.line>=f.index&&a.line<f.index+f.amount&&a.dispose(),a.line>f.index&&(a.line-=f.amount)})),a.register(a.onDispose(function(){return r._removeMarker(a)})),a},n.prototype._removeMarker=function(e){this.markers.splice(this.markers.indexOf(e),1)},n.prototype.iterator=function(e,r,a,f,E){return new t(this,e,r,a,f,E)},n}();o.Buffer=c;var t=function(){function n(e,r,a,f,E,w){a===void 0&&(a=0),f===void 0&&(f=e.lines.length),E===void 0&&(E=0),w===void 0&&(w=0),this._buffer=e,this._trimRight=r,this._startIndex=a,this._endIndex=f,this._startOverscan=E,this._endOverscan=w,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return n.prototype.hasNext=function(){return this._current<this._endIndex},n.prototype.next=function(){var e=this._buffer.getWrappedRangeForLine(this._current);e.first<this._startIndex-this._startOverscan&&(e.first=this._startIndex-this._startOverscan),e.last>this._endIndex+this._endOverscan&&(e.last=this._endIndex+this._endOverscan),e.first=Math.max(e.first,0),e.last=Math.min(e.last,this._buffer.lines.length);for(var r="",a=e.first;a<=e.last;++a)r+=this._buffer.translateBufferLineToString(a,this._trimRight);return this._current=e.last+1,{range:e,content:r}},n}();o.BufferStringIterator=t},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;var d=C(0),y=function(){function h(u){this._maxLength=u,this.onDeleteEmitter=new d.EventEmitter,this.onInsertEmitter=new d.EventEmitter,this.onTrimEmitter=new d.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(h.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"maxLength",{get:function(){return this._maxLength},set:function(u){if(this._maxLength!==u){for(var l=new Array(u),_=0;_<Math.min(u,this.length);_++)l[_]=this._array[this._getCyclicIndex(_)];this._array=l,this._maxLength=u,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"length",{get:function(){return this._length},set:function(u){if(u>this._length)for(var l=this._length;l<u;l++)this._array[l]=void 0;this._length=u},enumerable:!1,configurable:!0}),h.prototype.get=function(u){return this._array[this._getCyclicIndex(u)]},h.prototype.set=function(u,l){this._array[this._getCyclicIndex(u)]=l},h.prototype.push=function(u){this._array[this._getCyclicIndex(this._length)]=u,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},h.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(h.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),h.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},h.prototype.splice=function(u,l){for(var _=[],i=2;i<arguments.length;i++)_[i-2]=arguments[i];if(l){for(var s=u;s<this._length-l;s++)this._array[this._getCyclicIndex(s)]=this._array[this._getCyclicIndex(s+l)];this._length-=l}for(s=this._length-1;s>=u;s--)this._array[this._getCyclicIndex(s+_.length)]=this._array[this._getCyclicIndex(s)];for(s=0;s<_.length;s++)this._array[this._getCyclicIndex(u+s)]=_[s];if(this._length+_.length>this._maxLength){var c=this._length+_.length-this._maxLength;this._startIndex+=c,this._length=this._maxLength,this.onTrimEmitter.fire(c)}else this._length+=_.length},h.prototype.trimStart=function(u){u>this._length&&(u=this._length),this._startIndex+=u,this._length-=u,this.onTrimEmitter.fire(u)},h.prototype.shiftElements=function(u,l,_){if(!(l<=0)){if(u<0||u>=this._length)throw new Error("start argument out of range");if(u+_<0)throw new Error("Cannot shift elements in list beyond index 0");if(_>0){for(var i=l-1;i>=0;i--)this.set(u+i+_,this.get(u+i));var s=u+l+_-this._length;if(s>0)for(this._length+=s;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(i=0;i<l;i++)this.set(u+i+_,this.get(u+i))}},h.prototype._getCyclicIndex=function(u){return(this._startIndex+u)%this._maxLength},h}();o.CircularList=y},function(B,o,C){"use strict";function d(y,h,u){if(h===y.length-1)return y[h].getTrimmedLength();var l=!y[h].hasContent(u-1)&&y[h].getWidth(u-1)===1,_=y[h+1].getWidth(0)===2;return l&&_?u-1:u}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(y,h,u,l,_){for(var i=[],s=0;s<y.length-1;s++){var c=s,t=y.get(++c);if(t.isWrapped){for(var n=[y.get(s)];c<y.length&&t.isWrapped;)n.push(t),t=y.get(++c);if(l>=s&&l<c)s+=n.length-1;else{for(var e=0,r=d(n,e,h),a=1,f=0;a<n.length;){var E=d(n,a,h),w=E-f,S=u-r,v=Math.min(w,S);n[e].copyCellsFrom(n[a],f,r,v,!1),(r+=v)===u&&(e++,r=0),(f+=v)===E&&(a++,f=0),r===0&&e!==0&&n[e-1].getWidth(u-1)===2&&(n[e].copyCellsFrom(n[e-1],u-1,r++,1,!1),n[e-1].setCell(u-1,_))}n[e].replaceCells(r,u,_);for(var x=0,g=n.length-1;g>0&&(g>e||n[g].getTrimmedLength()===0);g--)x++;x>0&&(i.push(s+n.length-x),i.push(x)),s+=n.length-1}}}return i},o.reflowLargerCreateNewLayout=function(y,h){for(var u=[],l=0,_=h[l],i=0,s=0;s<y.length;s++)if(_===s){var c=h[++l];y.onDeleteEmitter.fire({index:s-i,amount:c}),s+=c-1,i+=c,_=h[++l]}else u.push(s);return{layout:u,countRemoved:i}},o.reflowLargerApplyNewLayout=function(y,h){for(var u=[],l=0;l<h.length;l++)u.push(y.get(h[l]));for(l=0;l<u.length;l++)y.set(l,u[l]);y.length=h.length},o.reflowSmallerGetNewLineLengths=function(y,h,u){for(var l=[],_=y.map(function(r,a){return d(y,a,h)}).reduce(function(r,a){return r+a}),i=0,s=0,c=0;c<_;){if(_-c<u){l.push(_-c);break}i+=u;var t=d(y,s,h);i>t&&(i-=t,s++);var n=y[s].getWidth(i-1)===2;n&&i--;var e=n?u-1:u;l.push(e),c+=e}return l},o.getWrappedLineTrimmedLength=d},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(l,_){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var c in s)s.hasOwnProperty(c)&&(i[c]=s[c])})(l,_)},function(l,_){function i(){this.constructor=l}d(l,_),l.prototype=_===null?Object.create(_):(i.prototype=_.prototype,new i)});Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;var h=C(0),u=function(l){function _(i){var s=l.call(this)||this;return s.line=i,s._id=_._nextId++,s.isDisposed=!1,s._onDispose=new h.EventEmitter,s}return y(_,l),Object.defineProperty(_.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),_.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},_._nextId=1,_}(C(2).Disposable);o.Marker=u},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=o.DEFAULT_BELL_SOUND=void 0;var d=C(0),y=C(11),h=C(33);o.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",o.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:o.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:y.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var u=["cols","rows"],l=function(){function _(i){this._onOptionChange=new d.EventEmitter,this.options=h.clone(o.DEFAULT_OPTIONS);for(var s=0,c=Object.keys(i);s<c.length;s++){var t=c[s];if(t in this.options){var n=i[t];this.options[t]=n}}}return Object.defineProperty(_.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),_.prototype.setOption=function(i,s){if(!(i in o.DEFAULT_OPTIONS))throw new Error('No option with key "'+i+'"');if(u.indexOf(i)!==-1)throw new Error('Option "'+i+'" can only be set in the constructor');this.options[i]!==s&&(s=this._sanitizeAndValidateOption(i,s),this.options[i]!==s&&(this.options[i]=s,this._onOptionChange.fire(i)))},_.prototype._sanitizeAndValidateOption=function(i,s){switch(i){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":s||(s=o.DEFAULT_OPTIONS[i]);break;case"cursorWidth":s=Math.floor(s);case"lineHeight":case"tabStopWidth":if(s<1)throw new Error(i+" cannot be less than 1, value: "+s);break;case"minimumContrastRatio":s=Math.max(1,Math.min(21,Math.round(10*s)/10));break;case"scrollback":if((s=Math.min(s,4294967295))<0)throw new Error(i+" cannot be less than 0, value: "+s);break;case"fastScrollSensitivity":case"scrollSensitivity":if(s<=0)throw new Error(i+" cannot be less than or equal to 0, value: "+s)}return s},_.prototype.getOption=function(i){if(!(i in o.DEFAULT_OPTIONS))throw new Error('No option with key "'+i+'"');return this.options[i]},_}();o.OptionsService=l},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(e,r){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,f){a.__proto__=f}||function(a,f){for(var E in f)f.hasOwnProperty(E)&&(a[E]=f[E])})(e,r)},function(e,r){function a(){this.constructor=e}d(e,r),e.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}),h=this&&this.__decorate||function(e,r,a,f){var E,w=arguments.length,S=w<3?r:f===null?f=Object.getOwnPropertyDescriptor(r,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(e,r,a,f);else for(var v=e.length-1;v>=0;v--)(E=e[v])&&(S=(w<3?E(S):w>3?E(r,a,S):E(r,a))||S);return w>3&&S&&Object.defineProperty(r,a,S),S},u=this&&this.__param||function(e,r){return function(a,f){r(a,f,e)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;var l=C(1),_=C(0),i=C(33),s=C(2),c=Object.freeze({insertMode:!1}),t=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),n=function(e){function r(a,f,E,w){var S=e.call(this)||this;return S._bufferService=f,S._logService=E,S._optionsService=w,S.isCursorInitialized=!1,S.isCursorHidden=!1,S._onData=S.register(new _.EventEmitter),S._onUserInput=S.register(new _.EventEmitter),S._onBinary=S.register(new _.EventEmitter),S._scrollToBottom=a,S.register({dispose:function(){return S._scrollToBottom=void 0}}),S.modes=i.clone(c),S.decPrivateModes=i.clone(t),S}return y(r,e),Object.defineProperty(r.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),r.prototype.reset=function(){this.modes=i.clone(c),this.decPrivateModes=i.clone(t)},r.prototype.triggerDataEvent=function(a,f){if(f===void 0&&(f=!1),!this._optionsService.options.disableStdin){var E=this._bufferService.buffer;E.ybase!==E.ydisp&&this._scrollToBottom(),f&&this._onUserInput.fire(),this._logService.debug('sending data "'+a+'"',function(){return a.split("").map(function(w){return w.charCodeAt(0)})}),this._onData.fire(a)}},r.prototype.triggerBinaryEvent=function(a){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+a+'"',function(){return a.split("").map(function(f){return f.charCodeAt(0)})}),this._onBinary.fire(a))},r=h([u(1,l.IBufferService),u(2,l.ILogService),u(3,l.IOptionsService)],r)}(s.Disposable);o.CoreService=n},function(B,o,C){"use strict";var d=this&&this.__decorate||function(t,n,e,r){var a,f=arguments.length,E=f<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,n,e,r);else for(var w=t.length-1;w>=0;w--)(a=t[w])&&(E=(f<3?a(E):f>3?a(n,e,E):a(n,e))||E);return f>3&&E&&Object.defineProperty(n,e,E),E},y=this&&this.__param||function(t,n){return function(e,r){n(e,r,t)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;var h=C(1),u=C(0),l={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(t){return t.button!==4&&t.action===1&&(t.ctrl=!1,t.alt=!1,t.shift=!1,!0)}},VT200:{events:19,restrict:function(t){return t.action!==32}},DRAG:{events:23,restrict:function(t){return t.action!==32||t.button!==3}},ANY:{events:31,restrict:function(t){return!0}}};function _(t,n){var e=(t.ctrl?16:0)|(t.shift?4:0)|(t.alt?8:0);return t.button===4?(e|=64,e|=t.action):(e|=3&t.button,4&t.button&&(e|=64),8&t.button&&(e|=128),t.action===32?e|=32:t.action!==0||n||(e|=3)),e}var i=String.fromCharCode,s={DEFAULT:function(t){var n=[_(t,!1)+32,t.col+32,t.row+32];return n[0]>255||n[1]>255||n[2]>255?"":"\x1B[M"+i(n[0])+i(n[1])+i(n[2])},SGR:function(t){var n=t.action===0&&t.button!==4?"m":"M";return"\x1B[<"+_(t,!0)+";"+t.col+";"+t.row+n}},c=function(){function t(n,e){this._bufferService=n,this._coreService=e,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new u.EventEmitter,this._lastEvent=null;for(var r=0,a=Object.keys(l);r<a.length;r++){var f=a[r];this.addProtocol(f,l[f])}for(var E=0,w=Object.keys(s);E<w.length;E++){var S=w[E];this.addEncoding(S,s[S])}this.reset()}return t.prototype.addProtocol=function(n,e){this._protocols[n]=e},t.prototype.addEncoding=function(n,e){this._encodings[n]=e},Object.defineProperty(t.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(n){if(!this._protocols[n])throw new Error('unknown protocol "'+n+'"');this._activeProtocol=n,this._onProtocolChange.fire(this._protocols[n].events)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(n){if(!this._encodings[n])throw new Error('unknown encoding "'+n+'"');this._activeEncoding=n},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(t.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),t.prototype.triggerMouseEvent=function(n){if(n.col<0||n.col>=this._bufferService.cols||n.row<0||n.row>=this._bufferService.rows||n.button===4&&n.action===32||n.button===3&&n.action!==32||n.button!==4&&(n.action===2||n.action===3)||(n.col++,n.row++,n.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,n))||!this._protocols[this._activeProtocol].restrict(n))return!1;var e=this._encodings[this._activeEncoding](n);return e&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(e):this._coreService.triggerDataEvent(e,!0)),this._lastEvent=n,!0},t.prototype.explainEvents=function(n){return{down:!!(1&n),up:!!(2&n),drag:!!(4&n),move:!!(8&n),wheel:!!(16&n)}},t.prototype._compareEvents=function(n,e){return n.col===e.col&&n.row===e.row&&n.button===e.button&&n.action===e.action&&n.ctrl===e.ctrl&&n.alt===e.alt&&n.shift===e.shift},t=d([y(0,h.IBufferService),y(1,h.ICoreService)],t)}();o.CoreMouseService=c},function(B,o,C){"use strict";var d=this&&this.__decorate||function(l,_,i,s){var c,t=arguments.length,n=t<3?_:s===null?s=Object.getOwnPropertyDescriptor(_,i):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(l,_,i,s);else for(var e=l.length-1;e>=0;e--)(c=l[e])&&(n=(t<3?c(n):t>3?c(_,i,n):c(_,i))||n);return t>3&&n&&Object.defineProperty(_,i,n),n},y=this&&this.__param||function(l,_){return function(i,s){_(i,s,l)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DirtyRowService=void 0;var h=C(1),u=function(){function l(_){this._bufferService=_,this.clearRange()}return Object.defineProperty(l.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),l.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},l.prototype.markDirty=function(_){_<this._start?this._start=_:_>this._end&&(this._end=_)},l.prototype.markRangeDirty=function(_,i){if(_>i){var s=_;_=i,i=s}_<this._start&&(this._start=_),i>this._end&&(this._end=i)},l.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},l=d([y(0,h.IBufferService)],l)}();o.DirtyRowService=u},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;var d=C(0),y=C(79),h=function(){function u(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter;var l=new y.UnicodeV6;this.register(l),this._active=l.version,this._activeProvider=l}return Object.defineProperty(u.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"activeVersion",{get:function(){return this._active},set:function(l){if(!this._providers[l])throw new Error('unknown Unicode version "'+l+'"');this._active=l,this._activeProvider=this._providers[l],this._onChange.fire(l)},enumerable:!1,configurable:!0}),u.prototype.register=function(l){this._providers[l.version]=l},u.prototype.wcwidth=function(l){return this._activeProvider.wcwidth(l)},u.prototype.getStringCellWidth=function(l){for(var _=0,i=l.length,s=0;s<i;++s){var c=l.charCodeAt(s);if(55296<=c&&c<=56319){if(++s>=i)return _+this.wcwidth(c);var t=l.charCodeAt(s);56320<=t&&t<=57343?c=1024*(c-55296)+t-56320+65536:_+=this.wcwidth(t)}_+=this.wcwidth(c)}return _},u}();o.UnicodeService=h},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;var d,y=C(15),h=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],u=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],l=function(){function _(){if(this.version="6",!d){d=new Uint8Array(65536),y.fill(d,1),d[0]=0,y.fill(d,0,1,32),y.fill(d,0,127,160),y.fill(d,2,4352,4448),d[9001]=2,d[9002]=2,y.fill(d,2,11904,42192),d[12351]=1,y.fill(d,2,44032,55204),y.fill(d,2,63744,64256),y.fill(d,2,65040,65050),y.fill(d,2,65072,65136),y.fill(d,2,65280,65377),y.fill(d,2,65504,65511);for(var i=0;i<h.length;++i)y.fill(d,0,h[i][0],h[i][1]+1)}}return _.prototype.wcwidth=function(i){return i<32?0:i<127?1:i<65536?d[i]:function(s,c){var t,n=0,e=c.length-1;if(s<c[0][0]||s>c[e][1])return!1;for(;e>=n;)if(s>c[t=n+e>>1][1])n=t+1;else{if(!(s<c[t][0]))return!0;e=t-1}return!1}(i,u)?0:i>=131072&&i<=196605||i>=196608&&i<=262141?2:1},_}();o.UnicodeV6=l},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0;var d=function(){function y(){this.glevel=0,this._charsets=[]}return y.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},y.prototype.setgLevel=function(h){this.glevel=h,this.charset=this._charsets[h]},y.prototype.setgCharset=function(h,u){this._charsets[h]=u,this.glevel===h&&(this.charset=u)},y}();o.CharsetService=d},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;var d=C(3);o.updateWindowsModeWrappedState=function(y){var h=y.buffer.lines.get(y.buffer.ybase+y.buffer.y-1),u=h==null?void 0:h.get(y.cols-1),l=y.buffer.lines.get(y.buffer.ybase+y.buffer.y);l&&u&&(l.isWrapped=u[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&u[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;var d=function(){function y(h){this._action=h,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return y.prototype.writeSync=function(h){if(this._writeBuffer.length){for(var u=this._bufferOffset;u<this._writeBuffer.length;++u){var l=this._writeBuffer[u],_=this._callbacks[u];this._action(l),_&&_()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(h)},y.prototype.write=function(h,u){var l=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return l._innerWrite()})),this._pendingData+=h.length,this._writeBuffer.push(h),this._callbacks.push(u)},y.prototype._innerWrite=function(){for(var h=this,u=Date.now();this._writeBuffer.length>this._bufferOffset;){var l=this._writeBuffer[this._bufferOffset],_=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(l),this._pendingData-=l.length,_&&_(),Date.now()-u>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return h._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},y}();o.WriteBuffer=d},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0;var d=function(){function y(){this._addons=[]}return y.prototype.dispose=function(){for(var h=this._addons.length-1;h>=0;h--)this._addons[h].instance.dispose()},y.prototype.loadAddon=function(h,u){var l=this,_={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(_),u.dispose=function(){return l._wrappedAddonDispose(_)},u.activate(h)},y.prototype._wrappedAddonDispose=function(h){if(!h.isDisposed){for(var u=-1,l=0;l<this._addons.length;l++)if(this._addons[l]===h){u=l;break}if(u===-1)throw new Error("Could not dispose an addon that has not been loaded");h.isDisposed=!0,h.dispose.apply(h.instance),this._addons.splice(u,1)}},y}();o.AddonManager=d}])})}}]);
|