</div>
</div>
<script src="auth_token.js"></script>
- <script>!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=100)}([function(t,e,n){var i=n(1),r=n(10),o=n(13),s=n(30),a=n(16),l="prototype",c=function(t,e,n){var u,h,f,_,p=t&c.F,d=t&c.G,m=t&c.S,y=t&c.P,v=t&c.B,b=d?i:m?i[e]||(i[e]={}):(i[e]||{})[l],g=d?r:r[e]||(r[e]={}),C=g[l]||(g[l]={});d&&(n=e);for(u in n)f=((h=!p&&b&&void 0!==b[u])?b:n)[u],_=v&&h?a(f,i):y&&"function"==typeof f?a(Function.call,f):f,b&&s(b,u,f,t&c.U),g[u]!=f&&o(g,u,_),y&&C[u]!=f&&(C[u]=f)};i.core=r,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var i=n(55)("wks"),r=n(24),o=n(1).Symbol,s="function"==typeof o;(t.exports=function(t){return i[t]||(i[t]=s&&o[t]||(s?o:r)("Symbol."+t))}).store=i},function(t,e,n){var i=n(52);t.exports=function(t){return Object(i(t))}},function(t,e,n){var i=n(19),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(11),r=n(76),o=n(28),s=Object.defineProperty;e.f=n(6)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var i=n(35),r=n(52);t.exports=function(t){return i(r(t))}},function(t,e){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},function(t,e,n){var i=n(2);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){"use strict";var i=n(8);t.exports=function(t,e){return!!t&&i(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){var i=n(7),r=n(29);t.exports=n(6)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(0),r=n(10),o=n(8);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],s={};s[t]=e(n),i(i.S+i.F*o(function(){n(1)}),"Object",s)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(17);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";if(n(6)){var i=n(23),r=n(1),o=n(8),s=n(0),a=n(50),l=n(69),c=n(16),u=n(66),h=n(29),f=n(13),_=n(68),p=n(19),d=n(5),m=n(91),y=n(33),v=n(28),b=n(15),g=n(38),C=n(2),w=n(4),S=n(58),A=n(34),x=n(37),k=n(40).f,E=n(60),O=n(24),L=n(3),T=n(20),R=n(43),I=n(49),M=n(64),P=n(31),D=n(61),H=n(45),N=n(63),B=n(81),F=n(7),j=n(22),Z=F.f,W=j.f,U=r.RangeError,z=r.TypeError,V=r.Uint8Array,K="ArrayBuffer",X="Shared"+K,G="BYTES_PER_ELEMENT",Y="prototype",q=Array[Y],Q=l.ArrayBuffer,J=l.DataView,$=T(0),tt=T(2),et=T(3),nt=T(4),it=T(5),rt=T(6),ot=R(!0),st=R(!1),at=M.values,lt=M.keys,ct=M.entries,ut=q.lastIndexOf,ht=q.reduce,ft=q.reduceRight,_t=q.join,pt=q.sort,dt=q.slice,mt=q.toString,yt=q.toLocaleString,vt=L("iterator"),bt=L("toStringTag"),gt=O("typed_constructor"),Ct=O("def_constructor"),wt=a.CONSTR,St=a.TYPED,At=a.VIEW,xt="Wrong length!",kt=T(1,function(t,e){return Rt(I(t,t[Ct]),e)}),Et=o(function(){return 1===new V(new Uint16Array([1]).buffer)[0]}),Ot=!!V&&!!V[Y].set&&o(function(){new V(1).set({})}),Lt=function(t,e){var n=p(t);if(n<0||n%e)throw U("Wrong offset!");return n},Tt=function(t){if(C(t)&&St in t)return t;throw z(t+" is not a typed array!")},Rt=function(t,e){if(!(C(t)&> in t))throw z("It is not a typed array constructor!");return new t(e)},It=function(t,e){return Mt(I(t,t[Ct]),e)},Mt=function(t,e){for(var n=0,i=e.length,r=Rt(t,i);i>n;)r[n]=e[n++];return r},Pt=function(t,e,n){Z(t,e,{get:function(){return this._d[n]}})},Dt=function(t){var e,n,i,r,o,s,a=w(t),l=arguments.length,u=l>1?arguments[1]:void 0,h=void 0!==u,f=E(a);if(void 0!=f&&!S(f)){for(s=f.call(a),i=[],e=0;!(o=s.next()).done;e++)i.push(o.value);a=i}for(h&&l>2&&(u=c(u,arguments[2],2)),e=0,n=d(a.length),r=Rt(this,n);n>e;e++)r[e]=h?u(a[e],e):a[e];return r},Ht=function(){for(var t=0,e=arguments.length,n=Rt(this,e);e>t;)n[t]=arguments[t++];return n},Nt=!!V&&o(function(){yt.call(new V(1))}),Bt=function(){return yt.apply(Nt?dt.call(Tt(this)):Tt(this),arguments)},Ft={copyWithin:function(t,e){return B.call(Tt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return nt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return N.apply(Tt(this),arguments)},filter:function(t){return It(this,tt(Tt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return it(Tt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return rt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){$(Tt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return st(Tt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return ot(Tt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return _t.apply(Tt(this),arguments)},lastIndexOf:function(t){return ut.apply(Tt(this),arguments)},map:function(t){return kt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ht.apply(Tt(this),arguments)},reduceRight:function(t){return ft.apply(Tt(this),arguments)},reverse:function(){for(var t,e=this,n=Tt(e).length,i=Math.floor(n/2),r=0;r<i;)t=e[r],e[r++]=e[--n],e[n]=t;return e},some:function(t){return et(Tt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return pt.call(Tt(this),t)},subarray:function(t,e){var n=Tt(this),i=n.length,r=y(t,i);return new(I(n,n[Ct]))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,d((void 0===e?i:y(e,i))-r))}},jt=function(t,e){return It(this,dt.call(Tt(this),t,e))},Zt=function(t){Tt(this);var e=Lt(arguments[1],1),n=this.length,i=w(t),r=d(i.length),o=0;if(r+e>n)throw U(xt);for(;o<r;)this[e+o]=i[o++]},Wt={entries:function(){return ct.call(Tt(this))},keys:function(){return lt.call(Tt(this))},values:function(){return at.call(Tt(this))}},Ut=function(t,e){return C(t)&&t[St]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},zt=function(t,e){return Ut(t,e=v(e,!0))?h(2,t[e]):W(t,e)},Vt=function(t,e,n){return!(Ut(t,e=v(e,!0))&&C(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?Z(t,e,n):(t[e]=n.value,t)};wt||(j.f=zt,F.f=Vt),s(s.S+s.F*!wt,"Object",{getOwnPropertyDescriptor:zt,defineProperty:Vt}),o(function(){mt.call({})})&&(mt=yt=function(){return _t.call(this)});var Kt=_({},Ft);_(Kt,Wt),f(Kt,vt,Wt.values),_(Kt,{slice:jt,set:Zt,constructor:function(){},toString:mt,toLocaleString:Bt}),Pt(Kt,"buffer","b"),Pt(Kt,"byteOffset","o"),Pt(Kt,"byteLength","l"),Pt(Kt,"length","e"),Z(Kt,bt,{get:function(){return this[St]}}),t.exports=function(t,e,n,l){var c=t+((l=!!l)?"Clamped":"")+"Array",h="get"+t,_="set"+t,p=r[c],y=p||{},v=p&&x(p),b=!p||!a.ABV,w={},S=p&&p[Y],E=function(t,n){Z(t,n,{get:function(){return t=n,(i=this._d).v[h](t*e+i.o,Et);var t,i},set:function(t){return i=n,r=t,o=this._d,l&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),void o.v[_](i*e+o.o,r,Et);var i,r,o},enumerable:!0})};b?(p=n(function(t,n,i,r){u(t,p,c,"_d");var o,s,a,l,h=0,_=0;if(C(n)){if(!(n instanceof Q||(l=g(n))==K||l==X))return St in n?Mt(p,n):Dt.call(p,n);o=n,_=Lt(i,e);var y=n.byteLength;if(void 0===r){if(y%e)throw U(xt);if((s=y-_)<0)throw U(xt)}else if((s=d(r)*e)+_>y)throw U(xt);a=s/e}else a=m(n),o=new Q(s=a*e);for(f(t,"_d",{b:o,o:_,l:s,e:a,v:new J(o)});h<a;)E(t,h++)}),S=p[Y]=A(Kt),f(S,"constructor",p)):o(function(){p(1)})&&o(function(){new p(-1)})&&D(function(t){new p,new p(null),new p(1.5),new p(t)},!0)||(p=n(function(t,n,i,r){var o;return u(t,p,c),C(n)?n instanceof Q||(o=g(n))==K||o==X?void 0!==r?new y(n,Lt(i,e),r):void 0!==i?new y(n,Lt(i,e)):new y(n):St in n?Mt(p,n):Dt.call(p,n):new y(m(n))}),$(v!==Function.prototype?k(y).concat(k(v)):k(y),function(t){t in p||f(p,t,y[t])}),p[Y]=S,i||(S.constructor=p));var O=S[vt],L=!!O&&("values"==O.name||void 0==O.name),T=Wt.values;f(p,gt,!0),f(S,St,c),f(S,At,!0),f(S,Ct,p),(l?new p(1)[bt]==c:bt in S)||Z(S,bt,{get:function(){return c}}),w[c]=p,s(s.G+s.W+s.F*(p!=y),w),s(s.S,c,{BYTES_PER_ELEMENT:e}),s(s.S+s.F*o(function(){y.of.call(p,1)}),c,{from:Dt,of:Ht}),G in S||f(S,G,e),s(s.P,c,Ft),H(c),s(s.P+s.F*Ot,c,{set:Zt}),s(s.P+s.F*!L,c,Wt),i||S.toString==mt||(S.toString=mt),s(s.P+s.F*o(function(){new p(1).slice()}),c,{slice:jt}),s(s.P+s.F*(o(function(){return[1,2].toLocaleString()!=new p([1,2]).toLocaleString()})||!o(function(){S.toLocaleString.call([1,2])})),c,{toLocaleString:Bt}),P[c]=L?O:T,i||L||f(S,vt,T)}}else t.exports=function(){}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(16),r=n(35),o=n(4),s=n(5),a=n(62);t.exports=function(t,e){var n=1==t,l=2==t,c=3==t,u=4==t,h=6==t,f=5==t||h,_=e||a;return function(e,a,p){for(var d,m,y=o(e),v=r(y),b=i(a,p,3),g=s(v.length),C=0,w=n?_(e,g):l?_(e,0):void 0;g>C;C++)if((f||C in v)&&(m=b(d=v[C],C,y),t))if(n)w[C]=m;else if(m)switch(t){case 3:return!0;case 5:return d;case 6:return C;case 2:w.push(d)}else if(u)return!1;return h?-1:c||u?u:w}}},function(t,e,n){var i=n(3)("unscopables"),r=Array.prototype;void 0==r[i]&&n(13)(r,i,{}),t.exports=function(t){r[i][t]=!0}},function(t,e,n){var i=n(39),r=n(29),o=n(9),s=n(28),a=n(15),l=n(76),c=Object.getOwnPropertyDescriptor;e.f=n(6)?c:function(t,e){if(t=o(t),e=s(e,!0),l)try{return c(t,e)}catch(t){}if(a(t,e))return r(!i.f.call(t,e),t[e])}},function(t,e){t.exports=!1},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e,n){var i=n(78),r=n(56);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(197);e.CHAR_DATA_ATTR_INDEX=0,e.CHAR_DATA_CHAR_INDEX=1,e.CHAR_DATA_WIDTH_INDEX=2,e.CHAR_DATA_CODE_INDEX=3,e.MAX_BUFFER_SIZE=4294967295;var r=function(){function t(t,e){this._terminal=t,this._hasScrollback=e,this.clear()}return Object.defineProperty(t.prototype,"lines",{get:function(){return this._lines},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._terminal.rows},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCursorInViewport",{get:function(){var t=this.ybase+this.y-this.ydisp;return t>=0&&t<this._terminal.rows},enumerable:!0,configurable:!0}),t.prototype._getCorrectBufferLength=function(t){if(!this._hasScrollback)return t;var n=t+this._terminal.options.scrollback;return n>e.MAX_BUFFER_SIZE?e.MAX_BUFFER_SIZE:n},t.prototype.fillViewportRows=function(){if(0===this._lines.length)for(var t=this._terminal.rows;t--;)this.lines.push(this._terminal.blankLine())},t.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this._lines=new i.CircularList(this._getCorrectBufferLength(this._terminal.rows)),this.scrollTop=0,this.scrollBottom=this._terminal.rows-1,this.setupTabStops()},t.prototype.resize=function(t,e){var n=this._getCorrectBufferLength(e);if(n>this._lines.maxLength&&(this._lines.maxLength=n),this._lines.length>0){if(this._terminal.cols<t)for(var i=[this._terminal.defAttr," ",1,32],r=0;r<this._lines.length;r++)for(void 0===this._lines.get(r)&&this._lines.set(r,this._terminal.blankLine(void 0,void 0,t));this._lines.get(r).length<t;)this._lines.get(r).push(i);var o=0;if(this._terminal.rows<e)for(var s=this._terminal.rows;s<e;s++)this._lines.length<e+this.ybase&&(this.ybase>0&&this._lines.length<=this.ybase+this.y+o+1?(this.ybase--,o++,this.ydisp>0&&this.ydisp--):this._lines.push(this._terminal.blankLine(void 0,void 0,t)));else for(s=this._terminal.rows;s>e;s--)this._lines.length>e+this.ybase&&(this._lines.length>this.ybase+this.y+1?this._lines.pop():(this.ybase++,this.ydisp++));if(n<this._lines.maxLength){var a=this._lines.length-n;a>0&&(this._lines.trimStart(a),this.ybase=Math.max(this.ybase-a,0),this.ydisp=Math.max(this.ydisp-a,0)),this._lines.maxLength=n}this.y>=e&&(this.y=e-1),o&&(this.y+=o),this.x>=t&&(this.x=t-1),this.scrollTop=0}this.scrollBottom=e-1},t.prototype.translateBufferLineToString=function(t,n,i,r){void 0===i&&(i=0),void 0===r&&(r=null);var o="",s=this.lines.get(t);if(!s)return"";for(var a=i,l=r=r||s.length,c=0;c<s.length;c++){var u=s[c];o+=u[e.CHAR_DATA_CHAR_INDEX],0===u[e.CHAR_DATA_WIDTH_INDEX]?(i>=c&&a--,r>=c&&l--):u[e.CHAR_DATA_CHAR_INDEX].length>1&&(i>c&&(a+=u[e.CHAR_DATA_CHAR_INDEX].length-1),r>c&&(l+=u[e.CHAR_DATA_CHAR_INDEX].length-1))}if(n){var h=o.search(/\s+$/);if(-1!==h&&(l=Math.min(l,h)),l<=a)return""}return o.substring(a,l)},t.prototype.setupTabStops=function(t){for(null!=t?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this._terminal.cols;t+=this._terminal.options.tabStopWidth)this.tabs[t]=!0},t.prototype.prevStop=function(t){for(null==t&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this._terminal.cols?this._terminal.cols-1:t<0?0:t},t.prototype.nextStop=function(t){for(null==t&&(t=this.x);!this.tabs[++t]&&t<this._terminal.cols;);return t>=this._terminal.cols?this._terminal.cols-1:t<0?0:t},t}();e.Buffer=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this._events=this._events||{}}return t.prototype.on=function(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)},t.prototype.off=function(t,e){if(this._events[t])for(var n=this._events[t],i=n.length;i--;)if(n[i]===e||n[i].listener===e)return void n.splice(i,1)},t.prototype.removeAllListeners=function(t){this._events[t]&&delete this._events[t]},t.prototype.once=function(t,e){function n(){var i=Array.prototype.slice.call(arguments);this.off(t,n),e.apply(this,i)}n.listener=e,this.on(t,n)},t.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(this._events[t])for(var i=this._events[t],r=0;r<i.length;r++)i[r].apply(this,e)},t.prototype.listeners=function(t){return this._events[t]||[]},t.prototype.destroy=function(){this._events={}},t}();e.EventEmitter=i},function(t,e,n){var i=n(2);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(1),r=n(13),o=n(15),s=n(24)("src"),a="toString",l=Function[a],c=(""+l).split(a);n(10).inspectSource=function(t){return l.call(t)},(t.exports=function(t,e,n,a){var l="function"==typeof n;l&&(o(n,"name")||r(n,"name",e)),t[e]!==n&&(l&&(o(n,s)||r(n,s,t[e]?""+t[e]:c.join(String(e)))),t===i?t[e]=n:a?t[e]?t[e]=n:r(t,e,n):(delete t[e],r(t,e,n)))})(Function.prototype,a,function(){return"function"==typeof this&&this[s]||l.call(this)})},function(t,e){t.exports={}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(19),r=Math.max,o=Math.min;t.exports=function(t,e){return(t=i(t))<0?r(t+e,0):o(t,e)}},function(t,e,n){var i=n(11),r=n(77),o=n(56),s=n(54)("IE_PROTO"),a=function(){},l="prototype",c=function(){var t,e=n(53)("iframe"),i=o.length;for(e.style.display="none",n(57).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;i--;)delete c[l][o[i]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[l]=i(t),n=new a,a[l]=null,n[s]=t):n=c(),void 0===e?n:r(n,e)}},function(t,e,n){var i=n(32);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(7).f,r=n(15),o=n(3)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},function(t,e,n){var i=n(15),r=n(4),o=n(54)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),i(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var i=n(32),r=n(3)("toStringTag"),o="Arguments"==i(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),r))?n:o?i(e):"Object"==(s=i(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var i=n(78),r=n(56).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},function(t,e,n){"use strict";t.exports.ZMLIB={ZDLE:24,XON:17,XOFF:19,ABORT_SEQUENCE:[24,24,24,24,24],strip_ignored_bytes:function(t){for(var e=t.length-1;e>=0;e--)switch(t[e]){case 17:case 145:case 19:case 147:t.splice(e,1);continue}return t},find_subarray:function(t,e){var n,i=0;Date.now();t:for(;-1!==i&&-1!==(i=t.indexOf(e[0],i));){for(n=1;n<e.length;n++)if(t[i+n]!==e[n]){i++;continue t}return i}return-1}}},function(t,e,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var r={aborted:"Session aborted",peer_aborted:"Peer aborted session",already_aborted:"Session already aborted",crc:function(t,e){return this.got=t.slice(0),this.expected=e.slice(0),"CRC check failed! (got: "+t.join()+"; expected: "+e.join()+")"},validation:function(t){return t}};t.exports.Error=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),o=function(t){var e=r[t];switch(void 0===e?"undefined":i(e)){case"string":return e;case"function":var n=[].slice.call(arguments).slice(1);return e.apply(this,n)}return null}.apply(n,arguments);return o?(n.type=t,n.message=o):n.message=t,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Error),e}()},function(t,e,n){var i=n(9),r=n(5),o=n(33);t.exports=function(t){return function(e,n,s){var a,l=i(e),c=r(l.length),u=o(s,c);if(t&&n!=n){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}}},function(t,e,n){var i=n(32);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){"use strict";var i=n(1),r=n(7),o=n(6),s=n(3)("species");t.exports=function(t){var e=i[t];o&&e&&!e[s]&&r.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){var i=n(24)("meta"),r=n(2),o=n(15),s=n(7).f,a=0,l=Object.isExtensible||function(){return!0},c=!n(8)(function(){return l(Object.preventExtensions({}))}),u=function(t){s(t,i,{value:{i:"O"+ ++a,w:{}}})},h=t.exports={KEY:i,NEED:!1,fastKey:function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,i)){if(!l(t))return"F";if(!e)return"E";u(t)}return t[i].i},getWeak:function(t,e){if(!o(t,i)){if(!l(t))return!0;if(!e)return!1;u(t)}return t[i].w},onFreeze:function(t){return c&&h.NEED&&l(t)&&!o(t,i)&&u(t),t}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){"use strict";t.exports=n(23)||!n(8)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n(1)[t]})},function(t,e,n){var i=n(11),r=n(17),o=n(3)("species");t.exports=function(t,e){var n,s=i(t).constructor;return void 0===s||void 0==(n=i(s)[o])?e:r(n)}},function(t,e,n){for(var i,r=n(1),o=n(13),s=n(24),a=s("typed_array"),l=s("view"),c=!(!r.ArrayBuffer||!r.DataView),u=c,h=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");h<9;)(i=r[f[h++]])?(o(i.prototype,a,!0),o(i.prototype,l,!0)):u=!1;t.exports={ABV:c,CONSTR:u,TYPED:a,VIEW:l}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(95),r=n(26);e.INVERTED_DEFAULT_COLOR=-1;var o=function(){function t(t,e,n,i,r){this._alpha=i,this._colors=r,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._canvas=document.createElement("canvas"),this._canvas.id="xterm-"+e+"-layer",this._canvas.style.zIndex=n.toString(),this._ctx=this._canvas.getContext("2d",{alpha:i}),this._ctx.scale(window.devicePixelRatio,window.devicePixelRatio),i||this.clearAll(),t.appendChild(this._canvas)}return t.prototype.onOptionsChanged=function(t){},t.prototype.onBlur=function(t){},t.prototype.onFocus=function(t){},t.prototype.onCursorMove=function(t){},t.prototype.onGridChanged=function(t,e,n){},t.prototype.onSelectionChanged=function(t,e,n){},t.prototype.onThemeChanged=function(t,e){this._refreshCharAtlas(t,e)},t.prototype._refreshCharAtlas=function(t,e){var n=this;if(!(this._scaledCharWidth<=0&&this._scaledCharHeight<=0)){this._charAtlas=null;var r=i.acquireCharAtlas(t,this._colors,this._scaledCharWidth,this._scaledCharHeight);r instanceof HTMLCanvasElement?this._charAtlas=r:r.then(function(t){return n._charAtlas=t})}},t.prototype.resize=function(t,e,n){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this.clearAll(),n&&this._refreshCharAtlas(t,this._colors)},t.prototype.fillCells=function(t,e,n,i){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,n*this._scaledCellWidth,i*this._scaledCellHeight)},t.prototype.fillBottomLineAtCells=function(t,e,n){void 0===n&&(n=1),this._ctx.fillRect(t*this._scaledCellWidth,(e+1)*this._scaledCellHeight-window.devicePixelRatio-1,n*this._scaledCellWidth,window.devicePixelRatio)},t.prototype.fillLeftLineAtCell=function(t,e){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,window.devicePixelRatio,this._scaledCellHeight)},t.prototype.strokeRectAtCell=function(t,e,n,i){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,e*this._scaledCellHeight+window.devicePixelRatio/2,n*this._scaledCellWidth-window.devicePixelRatio,i*this._scaledCellHeight-window.devicePixelRatio)},t.prototype.clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},t.prototype.clearCells=function(t,e,n,i){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,e*this._scaledCellHeight,n*this._scaledCellWidth,i*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background,this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,n*this._scaledCellWidth,i*this._scaledCellHeight))},t.prototype.fillCharTrueColor=function(t,e,n,i){this._ctx.font=t.options.fontSize*window.devicePixelRatio+"px "+t.options.fontFamily,this._ctx.textBaseline="top",this._clipRow(t,i),this._ctx.fillText(e[r.CHAR_DATA_CHAR_INDEX],n*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop)},t.prototype.drawChar=function(t,e,n,r,o,s,a,l,c,u){var h=0;a<256?h=a+2:c&&t.options.enableBold&&(h=1);var f=n<256,_=h>1&&a<16&&(a<8||c),p=a>=256,d=l>=256;if(this._charAtlas&&f&&(_||p)&&d){var m=this._scaledCharWidth+i.CHAR_ATLAS_CELL_SPACING,y=this._scaledCharHeight+i.CHAR_ATLAS_CELL_SPACING;u&&(this._ctx.globalAlpha=.5),c&&!t.options.enableBold&&h>1&&(h-=8),this._ctx.drawImage(this._charAtlas,n*m,h*y,m,this._scaledCharHeight,o*this._scaledCellWidth+this._scaledCharLeft,s*this._scaledCellHeight+this._scaledCharTop,m,this._scaledCharHeight)}else this._drawUncachedChar(t,e,r,a,o,s,c,u)},t.prototype._drawUncachedChar=function(t,n,i,r,o,s,a,l){this._ctx.save(),this._ctx.font=t.options.fontSize*window.devicePixelRatio+"px "+t.options.fontFamily,a&&t.options.enableBold&&(this._ctx.font="bold "+this._ctx.font),this._ctx.textBaseline="top",r===e.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background:this._ctx.fillStyle=r<256?this._colors.ansi[r]:this._colors.foreground,this._clipRow(t,s),l&&(this._ctx.globalAlpha=.5),this._ctx.fillText(n,o*this._scaledCellWidth+this._scaledCharLeft,s*this._scaledCellHeight+this._scaledCharTop),this._ctx.restore()},t.prototype._clipRow=function(t,e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,t.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},t}();e.BaseRenderLayer=o},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var i=n(2),r=n(1).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,n){var i=n(55)("keys"),r=n(24);t.exports=function(t){return i[t]||(i[t]=r(t))}},function(t,e,n){var i=n(1),r="__core-js_shared__",o=i[r]||(i[r]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var i=n(1).document;t.exports=i&&i.documentElement},function(t,e,n){var i=n(31),r=n(3)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||o[r]===t)}},function(t,e,n){"use strict";var i=n(7),r=n(29);t.exports=function(t,e,n){e in t?i.f(t,e,r(0,n)):t[e]=n}},function(t,e,n){var i=n(38),r=n(3)("iterator"),o=n(31);t.exports=n(10).getIteratorMethod=function(t){if(void 0!=t)return t[r]||t["@@iterator"]||o[i(t)]}},function(t,e,n){var i=n(3)("iterator"),r=!1;try{var o=[7][i]();o.return=function(){r=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var o=[7],s=o[i]();s.next=function(){return{done:n=!0}},o[i]=function(){return s},t(o)}catch(t){}return n}},function(t,e,n){var i=n(112);t.exports=function(t,e){return new(i(t))(e)}},function(t,e,n){"use strict";var i=n(4),r=n(33),o=n(5);t.exports=function(t){for(var e=i(this),n=o(e.length),s=arguments.length,a=r(s>1?arguments[1]:void 0,n),l=s>2?arguments[2]:void 0,c=void 0===l?n:r(l,n);c>a;)e[a++]=t;return e}},function(t,e,n){"use strict";var i=n(21),r=n(126),o=n(31),s=n(9);t.exports=n(75)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):r(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(t,e,n){"use strict";var i=n(38),r={};r[n(3)("toStringTag")]="z",r+""!="[object z]"&&n(30)(Object.prototype,"toString",function(){return"[object "+i(this)+"]"},!0)},function(t,e){t.exports=function(t,e,n,i){if(!(t instanceof e)||void 0!==i&&i in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){"use strict";var i=n(17);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t(function(t,i){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=i}),this.resolve=i(e),this.reject=i(n)}(t)}},function(t,e,n){var i=n(30);t.exports=function(t,e,n){for(var r in e)i(t,r,e[r],n);return t}},function(t,e,n){"use strict";var i=n(1),r=n(6),o=n(23),s=n(50),a=n(13),l=n(68),c=n(8),u=n(66),h=n(19),f=n(5),_=n(91),p=n(40).f,d=n(7).f,m=n(63),y=n(36),v="ArrayBuffer",b="DataView",g="prototype",C="Wrong index!",w=i[v],S=i[b],A=i.Math,x=i.RangeError,k=i.Infinity,E=w,O=A.abs,L=A.pow,T=A.floor,R=A.log,I=A.LN2,M="byteLength",P="byteOffset",D=r?"_b":"buffer",H=r?"_l":M,N=r?"_o":P;function B(t,e,n){var i,r,o,s=new Array(n),a=8*n-e-1,l=(1<<a)-1,c=l>>1,u=23===e?L(2,-24)-L(2,-77):0,h=0,f=t<0||0===t&&1/t<0?1:0;for((t=O(t))!=t||t===k?(r=t!=t?1:0,i=l):(i=T(R(t)/I),t*(o=L(2,-i))<1&&(i--,o*=2),(t+=i+c>=1?u/o:u*L(2,1-c))*o>=2&&(i++,o/=2),i+c>=l?(r=0,i=l):i+c>=1?(r=(t*o-1)*L(2,e),i+=c):(r=t*L(2,c-1)*L(2,e),i=0));e>=8;s[h++]=255&r,r/=256,e-=8);for(i=i<<e|r,a+=e;a>0;s[h++]=255&i,i/=256,a-=8);return s[--h]|=128*f,s}function F(t,e,n){var i,r=8*n-e-1,o=(1<<r)-1,s=o>>1,a=r-7,l=n-1,c=t[l--],u=127&c;for(c>>=7;a>0;u=256*u+t[l],l--,a-=8);for(i=u&(1<<-a)-1,u>>=-a,a+=e;a>0;i=256*i+t[l],l--,a-=8);if(0===u)u=1-s;else{if(u===o)return i?NaN:c?-k:k;i+=L(2,e),u-=s}return(c?-1:1)*i*L(2,u-e)}function j(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function Z(t){return[255&t]}function W(t){return[255&t,t>>8&255]}function U(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function z(t){return B(t,52,8)}function V(t){return B(t,23,4)}function K(t,e,n){d(t[g],e,{get:function(){return this[n]}})}function X(t,e,n,i){var r=_(+n);if(r+e>t[H])throw x(C);var o=t[D]._b,s=r+t[N],a=o.slice(s,s+e);return i?a:a.reverse()}function G(t,e,n,i,r,o){var s=_(+n);if(s+e>t[H])throw x(C);for(var a=t[D]._b,l=s+t[N],c=i(+r),u=0;u<e;u++)a[l+u]=c[o?u:e-u-1]}if(s.ABV){if(!c(function(){w(1)})||!c(function(){new w(-1)})||c(function(){return new w,new w(1.5),new w(NaN),w.name!=v})){for(var Y,q=(w=function(t){return u(this,w),new E(_(t))})[g]=E[g],Q=p(E),J=0;Q.length>J;)(Y=Q[J++])in w||a(w,Y,E[Y]);o||(q.constructor=w)}var $=new S(new w(2)),tt=S[g].setInt8;$.setInt8(0,2147483648),$.setInt8(1,2147483649),!$.getInt8(0)&&$.getInt8(1)||l(S[g],{setInt8:function(t,e){tt.call(this,t,e<<24>>24)},setUint8:function(t,e){tt.call(this,t,e<<24>>24)}},!0)}else w=function(t){u(this,w,v);var e=_(t);this._b=m.call(new Array(e),0),this[H]=e},S=function(t,e,n){u(this,S,b),u(t,w,b);var i=t[H],r=h(e);if(r<0||r>i)throw x("Wrong offset!");if(r+(n=void 0===n?i-r:f(n))>i)throw x("Wrong length!");this[D]=t,this[N]=r,this[H]=n},r&&(K(w,M,"_l"),K(S,"buffer","_b"),K(S,M,"_l"),K(S,P,"_o")),l(S[g],{getInt8:function(t){return X(this,1,t)[0]<<24>>24},getUint8:function(t){return X(this,1,t)[0]},getInt16:function(t){var e=X(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=X(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return j(X(this,4,t,arguments[1]))},getUint32:function(t){return j(X(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return F(X(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return F(X(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){G(this,1,t,Z,e)},setUint8:function(t,e){G(this,1,t,Z,e)},setInt16:function(t,e){G(this,2,t,W,e,arguments[2])},setUint16:function(t,e){G(this,2,t,W,e,arguments[2])},setInt32:function(t,e){G(this,4,t,U,e,arguments[2])},setUint32:function(t,e){G(this,4,t,U,e,arguments[2])},setFloat32:function(t,e){G(this,4,t,V,e,arguments[2])},setFloat64:function(t,e){G(this,8,t,z,e,arguments[2])}});y(w,v),y(S,b),a(S[g],s.VIEW,!0),e[v]=w,e[b]=S},function(t,e,n){"use strict";for(var i=t.exports,r=[48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102],o={},s=0;s<r.length;s++)o[r[s]]=s;i.ENCODELIB={pack_u16_be:function(t){if(t>65535)throw"Number cannot exceed 16 bits: "+t;return[t>>8,255&t]},pack_u32_le:function(t){var e=t/65536;return[255&t,(65535&t)>>8,255&e,e>>8]},unpack_u16_be:function(t){return(t[0]<<8)+t[1]},unpack_u32_le:function(t){return t[0]+(t[1]<<8)+(t[2]<<16)+16777216*t[3]},octets_to_hex:function(t){for(var e=[],n=0;n<t.length;n++)e.push(r[t[n]>>4],r[15&t[n]]);return e},parse_hex_octets:function(t){for(var e=new Array(t.length/2),n=0;n<e.length;n++)e[n]=(o[t[2*n]]<<4)+o[t[1+2*n]];return e}}},function(t,e,n){"use strict";var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();var r,o,s=t.exports;Object.assign(s,n(41));var a=s.ZMLIB.ZDLE;s.ZDLE=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._config={},e&&this.set_escape_ctrl_chars(!!e.escape_ctrl_chars)}return i(t,[{key:"set_escape_ctrl_chars",value:function(t){if("boolean"!=typeof t)throw"need boolean!";t!==this._config.escape_ctrl_chars&&(this._config.escape_ctrl_chars=t,this._setup_zdle_table())}},{key:"escapes_ctrl_chars",value:function(){return!!this._config.escape_ctrl_chars}},{key:"encode",value:function(t){if(!this._zdle_table)throw"No ZDLE encode table configured!";var e=this._zdle_table,n=this._lastcode,i=new ArrayBuffer(2*t.length),s=new Uint8Array(i),l=this._config.escape_ctrl_chars,c=0;for(r=0;r<t.length;r++){if(!(o=e[t[r]]))throw console.trace(),console.error("bad encode() call:",JSON.stringify(t)),this._lastcode=n,"Invalid octet: "+t[r];n=t[r],1===o||(l||2===o||64==(127&n))&&(s[c]=a,c++,n^=64),s[c]=n,c++}return this._lastcode=n,t.splice(0),t.push.apply(t,new Uint8Array(i,0,c)),t}},{key:"_setup_zdle_table",value:function(){for(var t=new Array(256),e=0;e<t.length;e++)if(96&e)t[e]=1;else switch(e){case a:case s.ZMLIB.XOFF:case s.ZMLIB.XON:case 128|s.ZMLIB.XOFF:case 128|s.ZMLIB.XON:t[e]=2;break;case 16:case 144:t[e]=this._config.turbo_escape?1:2;break;case 13:case 141:t[e]=this._config.escape_ctrl_chars?2:this._config.turbo_escape?1:3;break;default:t[e]=this._config.escape_ctrl_chars?2:1}this._zdle_table=t}}],[{key:"decode",value:function(t){for(var e=t.length-1;e>=0;e--)t[e]===a&&t.splice(e,2,t[e+1]-64);return t}},{key:"splice",value:function(e,n,i){var r=0;n||(n=0);for(var o=n;o<e.length&&r<i;o++)r++,e[o]===a&&o++;if(r===i){if(e.length===o-1)return;return e.splice(0,n),t.decode(e.splice(0,o-n))}}}]),t}()},function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),(i=e.C0||(e.C0={})).NUL="\0",i.SOH="\ 1",i.STX="\ 2",i.ETX="\ 3",i.EOT="\ 4",i.ENQ="\ 5",i.ACK="\ 6",i.BEL="\a",i.BS="\b",i.HT="\t",i.LF="\n",i.VT="\v",i.FF="\f",i.CR="\r",i.SO="\ e",i.SI="\ f",i.DLE="\10",i.DC1="\11",i.DC2="\12",i.DC3="\13",i.DC4="\14",i.NAK="\15",i.SYN="\16",i.ETB="\17",i.CAN="\18",i.EM="\19",i.SUB="\1a",i.ESC="\e",i.FS="\1c",i.GS="\1d",i.RS="\1e",i.US="\1f",i.SP=" ",i.DEL="\7f"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(207),r="undefined"==typeof navigator,o=r?"node":navigator.userAgent,s=r?"node":navigator.platform;e.isFirefox=!!~o.indexOf("Firefox"),e.isMSIE=!!~o.indexOf("MSIE")||!!~o.indexOf("Trident"),e.isMac=i.contains(["Macintosh","MacIntel","MacPPC","Mac68K"],s),e.isIpad="iPad"===s,e.isIphone="iPhone"===s,e.isMSWindows=i.contains(["Windows","Win16","Win32","WinCE"],s),e.isLinux=s.indexOf("Linux")>=0},function(t,e,n){"use strict";var i=n(103)(!0);n(75)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var i=n(23),r=n(0),o=n(30),s=n(13),a=n(15),l=n(31),c=n(104),u=n(36),h=n(37),f=n(3)("iterator"),_=!([].keys&&"next"in[].keys()),p="values",d=function(){return this};t.exports=function(t,e,n,m,y,v,b){c(n,e,m);var g,C,w,S=function(t){if(!_&&t in E)return E[t];switch(t){case"keys":case p:return function(){return new n(this,t)}}return function(){return new n(this,t)}},A=e+" Iterator",x=y==p,k=!1,E=t.prototype,O=E[f]||E["@@iterator"]||y&&E[y],L=!_&&O||S(y),T=y?x?S("entries"):L:void 0,R="Array"==e&&E.entries||O;if(R&&(w=h(R.call(new t)))!==Object.prototype&&w.next&&(u(w,A,!0),i||a(w,f)||s(w,f,d)),x&&O&&O.name!==p&&(k=!0,L=function(){return O.call(this)}),i&&!b||!_&&!k&&E[f]||s(E,f,L),l[e]=L,l[A]=d,y)if(g={values:x?L:S(p),keys:v?L:S("keys"),entries:T},b)for(C in g)C in E||o(E,C,g[C]);else r(r.P+r.F*(_||k),e,g);return g}},function(t,e,n){t.exports=!n(6)&&!n(8)(function(){return 7!=Object.defineProperty(n(53)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(7),r=n(11),o=n(25);t.exports=n(6)?Object.defineProperties:function(t,e){r(t);for(var n,s=o(e),a=s.length,l=0;a>l;)i.f(t,n=s[l++],e[n]);return t}},function(t,e,n){var i=n(15),r=n(9),o=n(43)(!1),s=n(54)("IE_PROTO");t.exports=function(t,e){var n,a=r(t),l=0,c=[];for(n in a)n!=s&&i(a,n)&&c.push(n);for(;e.length>l;)i(a,n=e[l++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var i=n(11);t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},function(t,e,n){var i=n(17),r=n(4),o=n(35),s=n(5);t.exports=function(t,e,n,a,l){i(e);var c=r(t),u=o(c),h=s(c.length),f=l?h-1:0,_=l?-1:1;if(n<2)for(;;){if(f in u){a=u[f],f+=_;break}if(f+=_,l?f<0:h<=f)throw TypeError("Reduce of empty array with no initial value")}for(;l?f>=0:h>f;f+=_)f in u&&(a=e(a,u[f],f,c));return a}},function(t,e,n){"use strict";var i=n(4),r=n(33),o=n(5);t.exports=[].copyWithin||function(t,e){var n=i(this),s=o(n.length),a=r(t,s),l=r(e,s),c=arguments.length>2?arguments[2]:void 0,u=Math.min((void 0===c?s:r(c,s))-l,s-a),h=1;for(l<a&&a<l+u&&(h=-1,l+=u-1,a+=u-1);u-- >0;)l in n?n[a]=n[l]:delete n[a],a+=h,l+=h;return n}},function(t,e,n){"use strict";var i=n(44),r=n(2),o=n(5),s=n(16),a=n(3)("isConcatSpreadable");t.exports=function t(e,n,l,c,u,h,f,_){for(var p,d,m=u,y=0,v=!!f&&s(f,_,3);y<c;){if(y in l){if(p=v?v(l[y],y,n):l[y],d=!1,r(p)&&(d=void 0!==(d=p[a])?!!d:i(p)),d&&h>0)m=t(e,n,p,o(p.length),m,h-1)-1;else{if(m>=9007199254740991)throw TypeError();e[m]=p}m++}y++}return m}},function(t,e,n){e.f=n(3)},function(t,e,n){var i=n(9),r=n(40).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?function(t){try{return r(t)}catch(t){return s.slice()}}(t):r(i(t))}},function(t,e,n){var i=n(40),r=n(47),o=n(11),s=n(1).Reflect;t.exports=s&&s.ownKeys||function(t){var e=i.f(o(t)),n=r.f;return n?e.concat(n(t)):e}},function(t,e,n){var i=n(25),r=n(9),o=n(39).f;t.exports=function(t){return function(e){for(var n,s=r(e),a=i(s),l=a.length,c=0,u=[];l>c;)o.call(s,n=a[c++])&&u.push(t?[n,s[n]]:s[n]);return u}}},function(t,e,n){var i=n(7),r=n(22),o=n(85),s=n(9);t.exports=function(t,e){for(var n,a=o(s(e)),l=a.length,c=0;l>c;)i.f(t,n=a[c++],r.f(e,n));return t}},function(t,e,n){var i,r,o,s=n(16),a=n(168),l=n(57),c=n(53),u=n(1),h=u.process,f=u.setImmediate,_=u.clearImmediate,p=u.MessageChannel,d=u.Dispatch,m=0,y={},v="onreadystatechange",b=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},g=function(t){b.call(t.data)};f&&_||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return y[++m]=function(){a("function"==typeof t?t:Function(t),e)},i(m),m},_=function(t){delete y[t]},"process"==n(32)(h)?i=function(t){h.nextTick(s(b,t,1))}:d&&d.now?i=function(t){d.now(s(b,t,1))}:p?(o=(r=new p).port2,r.port1.onmessage=g,i=s(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(i=function(t){u.postMessage(t+"","*")},u.addEventListener("message",g,!1)):i=v in c("script")?function(t){l.appendChild(c("script"))[v]=function(){l.removeChild(this),b.call(t)}}:function(t){setTimeout(s(b,t,1),0)}),t.exports={set:f,clear:_}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var i=n(11),r=n(2),o=n(67);t.exports=function(t,e){if(i(t),r(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var i=n(19),r=n(5);t.exports=function(t){if(void 0===t)return 0;var e=i(t),n=r(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){"use strict";var i,r=n(192),o=t.exports;Object.assign(o,n(42),n(70));var s=16,a=4129,l=65535,c=1<<s-1;function u(t,e){return i||function(){i=new Array(256);for(var t=s-8,e=0;e<256;e++){for(var n=e<<t&l,r=0;r<8;r++)0!=(n&c)?(n<<=1,n^=a):n<<=1;i[e]=n&l}}(),i[e>>8&255]^(255&e)<<8^t}function h(t,e){if(t.join()!==e.join())throw new o.Error("crc",e,t)}o.CRC={crc16:function(t){for(var e=t[0],n=1;n<t.length;n++)e=u(t[n],e);return e=u(0,u(0,e)),o.ENCODELIB.pack_u16_be(e)},crc32:function(t){return o.ENCODELIB.pack_u32_le(r.buf(t)>>>0)},verify16:function(t,e){return h(this.crc16(t),e)},verify32:function(t,e){try{h(this.crc32(t),e)}catch(e){throw e.input=t.slice(0),e}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CHARSETS={},e.DEFAULT_CHARSET=e.CHARSETS.B,e.CHARSETS[0]={"`":"◆",a:"▒",b:"\t",c:"\f",d:"\r",e:"\n",f:"°",g:"±",h:"",i:"\v",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},e.CHARSETS.A={"#":"£"},e.CHARSETS.B=null,e.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},e.CHARSETS.C=e.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},e.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},e.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},e.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},e.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},e.CHARSETS.E=e.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},e.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},e.CHARSETS.H=e.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},e.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),(i=e.FLAGS||(e.FLAGS={}))[i.BOLD=1]="BOLD",i[i.UNDERLINE=2]="UNDERLINE",i[i.BLINK=4]="BLINK",i[i.INVERSE=8]="INVERSE",i[i.INVISIBLE=16]="INVISIBLE",i[i.DIM=32]="DIM"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(73);e.CHAR_ATLAS_CELL_SPACING=1;var r,o=[];function s(t,e){for(var n=0;n<t.colors.ansi.length;n++)if(t.colors.ansi[n]!==e.colors.ansi[n])return!1;return t.fontFamily===e.fontFamily&&t.fontSize===e.fontSize&&t.scaledCharWidth===e.scaledCharWidth&&t.scaledCharHeight===e.scaledCharHeight&&t.colors.foreground===e.colors.foreground&&t.colors.background===e.colors.background}e.acquireCharAtlas=function(t,e,n,i){for(var a,l,c,u,h,f=(a=n,l=i,c=t,h={foreground:(u=e).foreground,background:u.background,cursor:null,cursorAccent:null,selection:null,ansi:u.ansi.slice(0,16)},{scaledCharWidth:a,scaledCharHeight:l,fontFamily:c.options.fontFamily,fontSize:c.options.fontSize,colors:h}),_=0;_<o.length;_++){var p=(d=o[_]).ownedBy.indexOf(t);if(p>=0){if(s(d.config,f))return d.bitmap;1===d.ownedBy.length?o.splice(_,1):d.ownedBy.splice(p,1);break}}for(_=0;_<o.length;_++){var d;if(s((d=o[_]).config,f))return d.ownedBy.push(t),d.bitmap}var m={bitmap:r.generate(n,i,t.options.fontSize,t.options.fontFamily,e.background,e.foreground,e.ansi),config:f,ownedBy:[t]};return o.push(m),m.bitmap},e.initialize=function(t){r||(r=new a(t))};var a=function(){function t(t){this._document=t,this._canvas=this._document.createElement("canvas"),this._ctx=this._canvas.getContext("2d",{alpha:!1}),this._ctx.scale(window.devicePixelRatio,window.devicePixelRatio)}return t.prototype.generate=function(t,n,r,o,s,a,l){var c=t+e.CHAR_ATLAS_CELL_SPACING,u=n+e.CHAR_ATLAS_CELL_SPACING;this._canvas.width=255*c,this._canvas.height=18*u,this._ctx.fillStyle=s,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height),this._ctx.save(),this._ctx.fillStyle=a,this._ctx.font=r*window.devicePixelRatio+"px "+o,this._ctx.textBaseline="top";for(var h=0;h<256;h++)this._ctx.save(),this._ctx.beginPath(),this._ctx.rect(h*c,0,c,u),this._ctx.clip(),this._ctx.fillText(String.fromCharCode(h),h*c,0),this._ctx.restore();this._ctx.save(),this._ctx.font="bold "+this._ctx.font;for(h=0;h<256;h++)this._ctx.save(),this._ctx.beginPath(),this._ctx.rect(h*c,u,c,u),this._ctx.clip(),this._ctx.fillText(String.fromCharCode(h),h*c,u),this._ctx.restore();this._ctx.restore(),this._ctx.font=r*window.devicePixelRatio+"px "+o;for(var f=0;f<16;f++){8===f&&(this._ctx.font="bold "+this._ctx.font);var _=(f+2)*u;for(h=0;h<256;h++)this._ctx.save(),this._ctx.beginPath(),this._ctx.rect(h*c,_,c,u),this._ctx.clip(),this._ctx.fillStyle=l[f],this._ctx.fillText(String.fromCharCode(h),h*c,_),this._ctx.restore()}if(this._ctx.restore(),!("createImageBitmap"in window)||i.isFirefox){var p=this._canvas;return this._canvas=this._document.createElement("canvas"),this._ctx=this._canvas.getContext("2d"),this._ctx.scale(window.devicePixelRatio,window.devicePixelRatio),p}var d=this._ctx.getImageData(0,0,this._canvas.width,this._canvas.height),m=parseInt(s.substr(1,2),16),y=parseInt(s.substr(3,2),16),v=parseInt(s.substr(5,2),16);this._clearColor(d,m,y,v);var b=window.createImageBitmap(d);return this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),b},t.prototype._clearColor=function(t,e,n,i){for(var r=0;r<t.data.length;r+=4)t.data[r]===e&&t.data[r+1]===n&&t.data[r+2]===i&&(t.data[r+3]=0)},t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="#ffffff",r="#000000",o="#ffffff",s="#000000",a="rgba(255, 255, 255, 0.3)";function l(t){var e=t.toString(16);return e.length<2?"0"+e:e}e.DEFAULT_ANSI_COLORS=["#2e3436","#cc0000","#4e9a06","#c4a000","#3465a4","#75507b","#06989a","#d3d7cf","#555753","#ef2929","#8ae234","#fce94f","#729fcf","#ad7fa8","#34e2e2","#eeeeec"];var c=function(){function t(){this.colors={foreground:i,background:r,cursor:o,cursorAccent:s,selection:a,ansi:function(t){for(var e=t.slice(),n=[0,95,135,175,215,255],i=0;i<216;i++){var r=l(n[i/36%6|0]),o=l(n[i/6%6|0]),s=l(n[i%6]);e.push("#"+r+o+s)}for(i=0;i<24;i++){var a=l(8+10*i);e.push("#"+a+a+a)}return e}(e.DEFAULT_ANSI_COLORS)}}return t.prototype.setTheme=function(t){this.colors.foreground=t.foreground||i,this.colors.background=this._validateColor(t.background,r),this.colors.cursor=t.cursor||o,this.colors.cursorAccent=t.cursorAccent||s,this.colors.selection=t.selection||a,this.colors.ansi[0]=t.black||e.DEFAULT_ANSI_COLORS[0],this.colors.ansi[1]=t.red||e.DEFAULT_ANSI_COLORS[1],this.colors.ansi[2]=t.green||e.DEFAULT_ANSI_COLORS[2],this.colors.ansi[3]=t.yellow||e.DEFAULT_ANSI_COLORS[3],this.colors.ansi[4]=t.blue||e.DEFAULT_ANSI_COLORS[4],this.colors.ansi[5]=t.magenta||e.DEFAULT_ANSI_COLORS[5],this.colors.ansi[6]=t.cyan||e.DEFAULT_ANSI_COLORS[6],this.colors.ansi[7]=t.white||e.DEFAULT_ANSI_COLORS[7],this.colors.ansi[8]=t.brightBlack||e.DEFAULT_ANSI_COLORS[8],this.colors.ansi[9]=t.brightRed||e.DEFAULT_ANSI_COLORS[9],this.colors.ansi[10]=t.brightGreen||e.DEFAULT_ANSI_COLORS[10],this.colors.ansi[11]=t.brightYellow||e.DEFAULT_ANSI_COLORS[11],this.colors.ansi[12]=t.brightBlue||e.DEFAULT_ANSI_COLORS[12],this.colors.ansi[13]=t.brightMagenta||e.DEFAULT_ANSI_COLORS[13],this.colors.ansi[14]=t.brightCyan||e.DEFAULT_ANSI_COLORS[14],this.colors.ansi[15]=t.brightWhite||e.DEFAULT_ANSI_COLORS[15]},t.prototype._validateColor=function(t,e){if(!t)return e;if(7===t.length&&"#"===t.charAt(0))return t;if(4===t.length&&"#"===t.charAt(0)){var n=t.charAt(1),i=t.charAt(2),r=t.charAt(3);return"#"+n+n+i+i+r+r}return e},t}();e.ColorManager=c},function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),(i=e.LinkHoverEventTypes||(e.LinkHoverEventTypes={})).HOVER="linkhover",i.TOOLTIP="linktooltip",i.LEAVE="linkleave"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){var e=this;this._terminal=t,this._zones=[],this._areZonesActive=!1,this._tooltipTimeout=null,this._currentZone=null,this._lastHoverCoords=[null,null],this._terminal.element.addEventListener("mousedown",function(t){return e._onMouseDown(t)}),this._mouseMoveListener=function(t){return e._onMouseMove(t)},this._clickListener=function(t){return e._onClick(t)}}return t.prototype.add=function(t){this._zones.push(t),1===this._zones.length&&this._activate()},t.prototype.clearAll=function(t,e){if(0!==this._zones.length){e||(t=0,e=this._terminal.rows-1);for(var n=0;n<this._zones.length;n++){var i=this._zones[n];i.y>t&&i.y<=e+1&&(this._currentZone&&this._currentZone===i&&(this._currentZone.leaveCallback(),this._currentZone=null),this._zones.splice(n--,1))}0===this._zones.length&&this._deactivate()}},t.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._terminal.element.addEventListener("mousemove",this._mouseMoveListener),this._terminal.element.addEventListener("click",this._clickListener))},t.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._terminal.element.removeEventListener("mousemove",this._mouseMoveListener),this._terminal.element.removeEventListener("click",this._clickListener))},t.prototype._onMouseMove=function(t){this._lastHoverCoords[0]===t.pageX&&this._lastHoverCoords[1]===t.pageY||(this._onHover(t),this._lastHoverCoords=[t.pageX,t.pageY])},t.prototype._onHover=function(t){var e=this,n=this._findZoneEventAt(t);n!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=null,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),n&&(this._currentZone=n,n.hoverCallback&&n.hoverCallback(t),this._tooltipTimeout=setTimeout(function(){return e._onTooltip(t)},500)))},t.prototype._onTooltip=function(t){this._tooltipTimeout=null;var e=this._findZoneEventAt(t);e&&e.tooltipCallback&&e.tooltipCallback(t)},t.prototype._onMouseDown=function(t){this._areZonesActive&&(this._findZoneEventAt(t)&&(t.preventDefault(),t.stopImmediatePropagation()))},t.prototype._onClick=function(t){var e=this._findZoneEventAt(t);e&&(e.clickCallback(t),t.preventDefault(),t.stopImmediatePropagation())},t.prototype._findZoneEventAt=function(t){var e=this._terminal.mouseHelper.getCoords(t,this._terminal.element,this._terminal.charMeasure,this._terminal.options.lineHeight,this._terminal.cols,this._terminal.rows);if(!e)return null;for(var n=0;n<this._zones.length;n++){var i=this._zones[n];if(i.y===e[1]&&i.x1<=e[0]&&i.x2>e[0])return i}return null},t}();e.MouseZoneManager=i;var r=function(){return function(t,e,n,i,r,o,s){this.x1=t,this.x2=e,this.y=n,this.clickCallback=i,this.hoverCallback=r,this.tooltipCallback=o,this.leaveCallback=s}}();e.MouseZone=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){this._renderer=t}return t.getCoordsRelativeToElement=function(t,e){if(null==t.pageX)return null;for(var n=e,i=t.pageX,r=t.pageY;e;)i-=e.offsetLeft,r-=e.offsetTop,e="offsetParent"in e?e.offsetParent:e.parentElement;for(e=n;e&&e!==e.ownerDocument.body;)i+=e.scrollLeft,r+=e.scrollTop,e=e.parentElement;return[i,r]},t.prototype.getCoords=function(e,n,i,r,o,s,a){if(!i.width||!i.height)return null;var l=t.getCoordsRelativeToElement(e,n);return l?(l[0]=Math.ceil((l[0]+(a?this._renderer.dimensions.actualCellWidth/2:0))/this._renderer.dimensions.actualCellWidth),l[1]=Math.ceil(l[1]/this._renderer.dimensions.actualCellHeight),l[0]=Math.min(Math.max(l[0],1),o+(a?1:0)),l[1]=Math.min(Math.max(l[1],1),s),l):null},t.prototype.getRawByteCoords=function(t,e,n,i,r,o){var s=this.getCoords(t,e,n,i,r,o),a=s[0],l=s[1];return{x:a+=32,y:l+=32}},t}();e.MouseHelper=i},function(t,e,n){n(101),t.exports=n(219)},function(t,e,n){"use strict";n(102),n(130),n(164),n(172),n(184);var i=n(186),r=n(195).Terminal;r.applyAddon(n(216)),r.applyAddon(n(217)),r.applyAddon(n(218));var o={self:document.getElementById("modal"),header:document.getElementById("header"),status:{self:document.getElementById("status"),filesRemaining:document.getElementById("files-remaining"),bytesRemaining:document.getElementById("bytes-remaining")},choose:{self:document.getElementById("choose"),files:document.getElementById("files"),filesNames:document.getElementById("file-names")},progress:{self:document.getElementById("progress"),fileName:document.getElementById("file-name"),progressBar:document.getElementById("progress-bar"),bytesReceived:document.getElementById("bytes-received"),bytesFile:document.getElementById("bytes-file"),percentReceived:document.getElementById("percent-received"),skip:document.getElementById("skip")}};function s(t){o.status.self.style.display="",o.choose.self.style.display="none",o.progress.self.style.display="",o.status.filesRemaining.textContent=t.files_remaining,o.status.bytesRemaining.textContent=u(t.bytes_remaining,2),o.progress.fileName.textContent=t.name}function a(){o.self.classList.remove("is-active")}function l(t){o.header.textContent=t,o.status.self.style.display="none",o.choose.self.style.display="none",o.progress.self.style.display="none",o.progress.bytesReceived.textContent="-",o.progress.percentReceived.textContent="-%",o.progress.progressBar.textContent="0%",o.progress.progressBar.value=0,o.progress.skip.style.display="none"}function c(t){var e=t.get_details().size,n=t.get_offset();o.progress.bytesReceived.textContent=u(n,2),o.progress.bytesFile.textContent=u(e,2);var i=(100*n/e).toFixed(2);o.progress.percentReceived.textContent=i+"%",o.progress.progressBar.textContent=i+"%",o.progress.progressBar.setAttribute("value",i)}function u(t,e){if(isNaN(parseFloat(t))||!isFinite(t))return"-";if(0===t)return 0;void 0===e&&(e=1);var n=Math.floor(Math.log(t)/Math.log(1024));return(t/Math.pow(1024,Math.floor(n))).toFixed(e)+" "+["bytes","KB","MB","GB","TB","PB"][n]}function h(t){return new Promise(function(e){var n;n=function(n){i.Browser.send_files(t,n,{on_progress:function(t,e){s(e.get_details()),c(e)},on_file_complete:function(t){}}).then(t.close.bind(t),console.error.bind(console)).then(function(){e()})},l("Sending files"),o.choose.self.style.display="",o.choose.files.disabled=!1,o.choose.files.value="",o.choose.filesNames.textContent="",o.choose.files.onchange=function(){this.disabled=!0;for(var t=this.files,e="",i=0;i<t.length;i++)0===i?e=t[i].name:e+=", "+t[i].name;o.choose.filesNames.textContent=e,n(t)},o.self.classList.add("is-active")})}function f(t){t.on("offer",function(t){var e;e=t,l("Receiving files"),s(e.get_details()),o.progress.skip.disabled=!1,o.progress.skip.onclick=function(){this.disabled=!0,e.skip()},o.progress.skip.style.display="",o.self.classList.add("is-active");var n=[];t.on("input",function(e){c(t),n.push(new Uint8Array(e))}),t.accept().then(function(){i.Browser.save_to_disk(n,t.get_details().name)},console.error.bind(console))});var e=new Promise(function(e){t.on("session_end",function(){e()})});return t.start(),e}var _,p,d,m,y=document.getElementById("terminal-container"),v=("https:"===window.location.protocol?"wss://":"ws://")+window.location.host+window.location.pathname+"ws",b=new TextDecoder,g=new TextEncoder,C="undefined"!=typeof tty_auth_token?tty_auth_token:null,w=-1,S=function t(){var e=new WebSocket(v,["tty"]),n=function(t){e.readyState===WebSocket.OPEN&&e.send(g.encode(t))},o=function(t){n("0"+t)},s=function(t){var e="Close terminal? this will also terminate the command.";return(t||window.event).returnValue=e,e},l=new i.Sentry({to_terminal:function(t){var e=new Uint8Array(t).buffer;p.write(b.decode(e))},sender:function(t){for(;t.length;){var n=t.splice(0,4095),i=new Uint8Array(n.length+1);i[0]="0".charCodeAt(0),i.set(n,1),e.send(i)}},on_retract:function(){},on_detect:function(t){p.setOption("disableStdin",!0);var e=t.confirm();("send"===e.type?h(e):f(e)).catch(console.error.bind(console)).then(function(){a(),p.setOption("disableStdin",!1)})}});e.binaryType="arraybuffer",e.onopen=function(t){for(console.log("Websocket connection opened"),m=!1,n(JSON.stringify({AuthToken:C})),void 0!==p&&p.destroy(),(p=new r({fontSize:13,fontFamily:'"Menlo for Powerline", Menlo, Consolas, "Liberation Mono", Courier, monospace',theme:{foreground:"#d2d2d2",background:"#2b2b2b",cursor:"#adadad",black:"#000000",red:"#d81e00",green:"#5ea702",yellow:"#cfae00",blue:"#427ab3",magenta:"#89658e",cyan:"#00a7aa",white:"#dbded8",brightBlack:"#686a66",brightRed:"#f54235",brightGreen:"#99e343",brightYellow:"#fdeb61",brightBlue:"#84b0d8",brightMagenta:"#bc94b7",brightCyan:"#37e6e8",brightWhite:"#f1f1f0"}})).on("resize",function(t){e.readyState===WebSocket.OPEN&&n("1"+JSON.stringify({columns:t.cols,rows:t.rows})),setTimeout(function(){p.showOverlay(t.cols+"x"+t.rows)},500)}),p.on("title",function(t){t&&""!==t&&(document.title=t+" | "+d)}),p.on("data",o);y.firstChild;)y.removeChild(y.firstChild);window.addEventListener("resize",function(){clearTimeout(window.resizedFinished),window.resizedFinished=setTimeout(function(){p.fit()},250)}),window.addEventListener("beforeunload",s),p.open(y,!0),p.winptyCompatInit(),p.fit(),p.focus()},e.onmessage=function(n){var i=new Uint8Array(n.data),r=String.fromCharCode(i[0]),o=i.slice(1).buffer;switch(r){case"0":try{l.consume(o)}catch(n){console.error(n),a(),clearTimeout(_),e.readyState!==WebSocket.CLOSED&&e.close(),t()}break;case"1":d=b.decode(o),document.title=d;break;case"2":var s=JSON.parse(b.decode(o));Object.keys(s).forEach(function(t){console.log("Setting "+t+": "+s[t]),p.setOption(t,s[t])});break;case"3":w=JSON.parse(b.decode(o)),console.log("Enabling reconnect: "+w+" seconds");break;default:console.log("Unknown command: "+r)}},e.onclose=function(e){console.log("Websocket connection closed with code: "+e.code),p&&(p.off("data"),p.off("resize"),m||p.showOverlay("Connection Closed",null)),window.removeEventListener("beforeunload",s),1e3!==e.code&&w>0&&(_=setTimeout(t,1e3*w))}};"complete"===document.readyState||"loading"!==document.readyState?S():document.addEventListener("DOMContentLoaded",S)},function(t,e,n){n(74),n(105),n(106),n(107),n(108),n(109),n(110),n(111),n(113),n(114),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(124),n(125),n(64),n(127),n(128),n(129),t.exports=n(10).Array},function(t,e,n){var i=n(19),r=n(52);t.exports=function(t){return function(e,n){var o,s,a=String(r(e)),l=i(n),c=a.length;return l<0||l>=c?t?"":void 0:(o=a.charCodeAt(l))<55296||o>56319||l+1===c||(s=a.charCodeAt(l+1))<56320||s>57343?t?a.charAt(l):o:t?a.slice(l,l+2):s-56320+(o-55296<<10)+65536}}},function(t,e,n){"use strict";var i=n(34),r=n(29),o=n(36),s={};n(13)(s,n(3)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(s,{next:r(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var i=n(0);i(i.S,"Array",{isArray:n(44)})},function(t,e,n){"use strict";var i=n(16),r=n(0),o=n(4),s=n(79),a=n(58),l=n(5),c=n(59),u=n(60);r(r.S+r.F*!n(61)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,r,h,f=o(t),_="function"==typeof this?this:Array,p=arguments.length,d=p>1?arguments[1]:void 0,m=void 0!==d,y=0,v=u(f);if(m&&(d=i(d,p>2?arguments[2]:void 0,2)),void 0==v||_==Array&&a(v))for(n=new _(e=l(f.length));e>y;y++)c(n,y,m?d(f[y],y):f[y]);else for(h=v.call(f),n=new _;!(r=h.next()).done;y++)c(n,y,m?s(h,d,[r.value,y],!0):r.value);return n.length=y,n}})},function(t,e,n){"use strict";var i=n(0),r=n(59);i(i.S+i.F*n(8)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)r(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var i=n(0),r=n(9),o=[].join;i(i.P+i.F*(n(35)!=Object||!n(12)(o)),"Array",{join:function(t){return o.call(r(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var i=n(0),r=n(57),o=n(32),s=n(33),a=n(5),l=[].slice;i(i.P+i.F*n(8)(function(){r&&l.call(r)}),"Array",{slice:function(t,e){var n=a(this.length),i=o(this);if(e=void 0===e?n:e,"Array"==i)return l.call(this,t,e);for(var r=s(t,n),c=s(e,n),u=a(c-r),h=new Array(u),f=0;f<u;f++)h[f]="String"==i?this.charAt(r+f):this[r+f];return h}})},function(t,e,n){"use strict";var i=n(0),r=n(17),o=n(4),s=n(8),a=[].sort,l=[1,2,3];i(i.P+i.F*(s(function(){l.sort(void 0)})||!s(function(){l.sort(null)})||!n(12)(a)),"Array",{sort:function(t){return void 0===t?a.call(o(this)):a.call(o(this),r(t))}})},function(t,e,n){"use strict";var i=n(0),r=n(20)(0),o=n(12)([].forEach,!0);i(i.P+i.F*!o,"Array",{forEach:function(t){return r(this,t,arguments[1])}})},function(t,e,n){var i=n(2),r=n(44),o=n(3)("species");t.exports=function(t){var e;return r(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!r(e.prototype)||(e=void 0),i(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){"use strict";var i=n(0),r=n(20)(1);i(i.P+i.F*!n(12)([].map,!0),"Array",{map:function(t){return r(this,t,arguments[1])}})},function(t,e,n){"use strict";var i=n(0),r=n(20)(2);i(i.P+i.F*!n(12)([].filter,!0),"Array",{filter:function(t){return r(this,t,arguments[1])}})},function(t,e,n){"use strict";var i=n(0),r=n(20)(3);i(i.P+i.F*!n(12)([].some,!0),"Array",{some:function(t){return r(this,t,arguments[1])}})},function(t,e,n){"use strict";var i=n(0),r=n(20)(4);i(i.P+i.F*!n(12)([].every,!0),"Array",{every:function(t){return r(this,t,arguments[1])}})},function(t,e,n){"use strict";var i=n(0),r=n(80);i(i.P+i.F*!n(12)([].reduce,!0),"Array",{reduce:function(t){return r(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){"use strict";var i=n(0),r=n(80);i(i.P+i.F*!n(12)([].reduceRight,!0),"Array",{reduceRight:function(t){return r(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var i=n(0),r=n(43)(!1),o=[].indexOf,s=!!o&&1/[1].indexOf(1,-0)<0;i(i.P+i.F*(s||!n(12)(o)),"Array",{indexOf:function(t){return s?o.apply(this,arguments)||0:r(this,t,arguments[1])}})},function(t,e,n){"use strict";var i=n(0),r=n(9),o=n(19),s=n(5),a=[].lastIndexOf,l=!!a&&1/[1].lastIndexOf(1,-0)<0;i(i.P+i.F*(l||!n(12)(a)),"Array",{lastIndexOf:function(t){if(l)return a.apply(this,arguments)||0;var e=r(this),n=s(e.length),i=n-1;for(arguments.length>1&&(i=Math.min(i,o(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in e&&e[i]===t)return i||0;return-1}})},function(t,e,n){var i=n(0);i(i.P,"Array",{copyWithin:n(81)}),n(21)("copyWithin")},function(t,e,n){var i=n(0);i(i.P,"Array",{fill:n(63)}),n(21)("fill")},function(t,e,n){"use strict";var i=n(0),r=n(20)(5),o="find",s=!0;o in[]&&Array(1)[o](function(){s=!1}),i(i.P+i.F*s,"Array",{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n(21)(o)},function(t,e,n){"use strict";var i=n(0),r=n(20)(6),o="findIndex",s=!0;o in[]&&Array(1)[o](function(){s=!1}),i(i.P+i.F*s,"Array",{findIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n(21)(o)},function(t,e,n){n(45)("Array")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var i=n(0),r=n(43)(!0);i(i.P,"Array",{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n(21)("includes")},function(t,e,n){"use strict";var i=n(0),r=n(82),o=n(4),s=n(5),a=n(17),l=n(62);i(i.P,"Array",{flatMap:function(t){var e,n,i=o(this);return a(t),e=s(i.length),n=l(i,0),r(n,i,i,e,0,1,t,arguments[1]),n}}),n(21)("flatMap")},function(t,e,n){"use strict";var i=n(0),r=n(82),o=n(4),s=n(5),a=n(19),l=n(62);i(i.P,"Array",{flatten:function(){var t=arguments[0],e=o(this),n=s(e.length),i=l(e,0);return r(i,e,e,n,0,void 0===t?1:a(t)),i}}),n(21)("flatten")},function(t,e,n){n(131),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(149),n(151),n(65),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161),n(162),n(163),t.exports=n(10).Object},function(t,e,n){"use strict";var i=n(1),r=n(15),o=n(6),s=n(0),a=n(30),l=n(46).KEY,c=n(8),u=n(55),h=n(36),f=n(24),_=n(3),p=n(83),d=n(132),m=n(133),y=n(44),v=n(11),b=n(2),g=n(9),C=n(28),w=n(29),S=n(34),A=n(84),x=n(22),k=n(7),E=n(25),O=x.f,L=k.f,T=A.f,R=i.Symbol,I=i.JSON,M=I&&I.stringify,P="prototype",D=_("_hidden"),H=_("toPrimitive"),N={}.propertyIsEnumerable,B=u("symbol-registry"),F=u("symbols"),j=u("op-symbols"),Z=Object[P],W="function"==typeof R,U=i.QObject,z=!U||!U[P]||!U[P].findChild,V=o&&c(function(){return 7!=S(L({},"a",{get:function(){return L(this,"a",{value:7}).a}})).a})?function(t,e,n){var i=O(Z,e);i&&delete Z[e],L(t,e,n),i&&t!==Z&&L(Z,e,i)}:L,K=function(t){var e=F[t]=S(R[P]);return e._k=t,e},X=W&&"symbol"==typeof R.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof R},G=function(t,e,n){return t===Z&&G(j,e,n),v(t),e=C(e,!0),v(n),r(F,e)?(n.enumerable?(r(t,D)&&t[D][e]&&(t[D][e]=!1),n=S(n,{enumerable:w(0,!1)})):(r(t,D)||L(t,D,w(1,{})),t[D][e]=!0),V(t,e,n)):L(t,e,n)},Y=function(t,e){v(t);for(var n,i=m(e=g(e)),r=0,o=i.length;o>r;)G(t,n=i[r++],e[n]);return t},q=function(t){var e=N.call(this,t=C(t,!0));return!(this===Z&&r(F,t)&&!r(j,t))&&(!(e||!r(this,t)||!r(F,t)||r(this,D)&&this[D][t])||e)},Q=function(t,e){if(t=g(t),e=C(e,!0),t!==Z||!r(F,e)||r(j,e)){var n=O(t,e);return!n||!r(F,e)||r(t,D)&&t[D][e]||(n.enumerable=!0),n}},J=function(t){for(var e,n=T(g(t)),i=[],o=0;n.length>o;)r(F,e=n[o++])||e==D||e==l||i.push(e);return i},$=function(t){for(var e,n=t===Z,i=T(n?j:g(t)),o=[],s=0;i.length>s;)!r(F,e=i[s++])||n&&!r(Z,e)||o.push(F[e]);return o};W||(a((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===Z&&e.call(j,n),r(this,D)&&r(this[D],t)&&(this[D][t]=!1),V(this,t,w(1,n))};return o&&z&&V(Z,t,{configurable:!0,set:e}),K(t)})[P],"toString",function(){return this._k}),x.f=Q,k.f=G,n(40).f=A.f=J,n(39).f=q,n(47).f=$,o&&!n(23)&&a(Z,"propertyIsEnumerable",q,!0),p.f=function(t){return K(_(t))}),s(s.G+s.W+s.F*!W,{Symbol:R});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)_(tt[et++]);for(var nt=E(_.store),it=0;nt.length>it;)d(nt[it++]);s(s.S+s.F*!W,"Symbol",{for:function(t){return r(B,t+="")?B[t]:B[t]=R(t)},keyFor:function(t){if(!X(t))throw TypeError(t+" is not a symbol!");for(var e in B)if(B[e]===t)return e},useSetter:function(){z=!0},useSimple:function(){z=!1}}),s(s.S+s.F*!W,"Object",{create:function(t,e){return void 0===e?S(t):Y(S(t),e)},defineProperty:G,defineProperties:Y,getOwnPropertyDescriptor:Q,getOwnPropertyNames:J,getOwnPropertySymbols:$}),I&&s(s.S+s.F*(!W||c(function(){var t=R();return"[null]"!=M([t])||"{}"!=M({a:t})||"{}"!=M(Object(t))})),"JSON",{stringify:function(t){for(var e,n,i=[t],r=1;arguments.length>r;)i.push(arguments[r++]);if(n=e=i[1],(b(e)||void 0!==t)&&!X(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!X(e))return e}),i[1]=e,M.apply(I,i)}}),R[P][H]||n(13)(R[P],H,R[P].valueOf),h(R,"Symbol"),h(Math,"Math",!0),h(i.JSON,"JSON",!0)},function(t,e,n){var i=n(1),r=n(10),o=n(23),s=n(83),a=n(7).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,n){var i=n(25),r=n(47),o=n(39);t.exports=function(t){var e=i(t),n=r.f;if(n)for(var s,a=n(t),l=o.f,c=0;a.length>c;)l.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,n){var i=n(0);i(i.S,"Object",{create:n(34)})},function(t,e,n){var i=n(0);i(i.S+i.F*!n(6),"Object",{defineProperty:n(7).f})},function(t,e,n){var i=n(0);i(i.S+i.F*!n(6),"Object",{defineProperties:n(77)})},function(t,e,n){var i=n(9),r=n(22).f;n(14)("getOwnPropertyDescriptor",function(){return function(t,e){return r(i(t),e)}})},function(t,e,n){var i=n(4),r=n(37);n(14)("getPrototypeOf",function(){return function(t){return r(i(t))}})},function(t,e,n){var i=n(4),r=n(25);n(14)("keys",function(){return function(t){return r(i(t))}})},function(t,e,n){n(14)("getOwnPropertyNames",function(){return n(84).f})},function(t,e,n){var i=n(2),r=n(46).onFreeze;n(14)("freeze",function(t){return function(e){return t&&i(e)?t(r(e)):e}})},function(t,e,n){var i=n(2),r=n(46).onFreeze;n(14)("seal",function(t){return function(e){return t&&i(e)?t(r(e)):e}})},function(t,e,n){var i=n(2),r=n(46).onFreeze;n(14)("preventExtensions",function(t){return function(e){return t&&i(e)?t(r(e)):e}})},function(t,e,n){var i=n(2);n(14)("isFrozen",function(t){return function(e){return!i(e)||!!t&&t(e)}})},function(t,e,n){var i=n(2);n(14)("isSealed",function(t){return function(e){return!i(e)||!!t&&t(e)}})},function(t,e,n){var i=n(2);n(14)("isExtensible",function(t){return function(e){return!!i(e)&&(!t||t(e))}})},function(t,e,n){var i=n(0);i(i.S+i.F,"Object",{assign:n(148)})},function(t,e,n){"use strict";var i=n(25),r=n(47),o=n(39),s=n(4),a=n(35),l=Object.assign;t.exports=!l||n(8)(function(){var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(t){e[t]=t}),7!=l({},t)[n]||Object.keys(l({},e)).join("")!=i})?function(t,e){for(var n=s(t),l=arguments.length,c=1,u=r.f,h=o.f;l>c;)for(var f,_=a(arguments[c++]),p=u?i(_).concat(u(_)):i(_),d=p.length,m=0;d>m;)h.call(_,f=p[m++])&&(n[f]=_[f]);return n}:l},function(t,e,n){var i=n(0);i(i.S,"Object",{is:n(150)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){var i=n(0);i(i.S,"Object",{setPrototypeOf:n(152).set})},function(t,e,n){var i=n(2),r=n(11),o=function(t,e){if(r(t),!i(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,i){try{(i=n(16)(Function.call,n(22).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:i(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){var i=n(0),r=n(85),o=n(9),s=n(22),a=n(59);i(i.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,i=o(t),l=s.f,c=r(i),u={},h=0;c.length>h;)void 0!==(n=l(i,e=c[h++]))&&a(u,e,n);return u}})},function(t,e,n){var i=n(0),r=n(86)(!1);i(i.S,"Object",{values:function(t){return r(t)}})},function(t,e,n){var i=n(0),r=n(86)(!0);i(i.S,"Object",{entries:function(t){return r(t)}})},function(t,e,n){"use strict";var i=n(0),r=n(4),o=n(17),s=n(7);n(6)&&i(i.P+n(48),"Object",{__defineGetter__:function(t,e){s.f(r(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(0),r=n(4),o=n(17),s=n(7);n(6)&&i(i.P+n(48),"Object",{__defineSetter__:function(t,e){s.f(r(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(0),r=n(4),o=n(28),s=n(37),a=n(22).f;n(6)&&i(i.P+n(48),"Object",{__lookupGetter__:function(t){var e,n=r(this),i=o(t,!0);do{if(e=a(n,i))return e.get}while(n=s(n))}})},function(t,e,n){"use strict";var i=n(0),r=n(4),o=n(28),s=n(37),a=n(22).f;n(6)&&i(i.P+n(48),"Object",{__lookupSetter__:function(t){var e,n=r(this),i=o(t,!0);do{if(e=a(n,i))return e.set}while(n=s(n))}})},function(t,e,n){var i=n(0);i(i.S+i.F,"Object",{isObject:n(2)})},function(t,e,n){var i=n(0);i(i.S+i.F,"Object",{classof:n(38)})},function(t,e,n){var i=n(0),r=n(87);i(i.S+i.F,"Object",{define:r})},function(t,e,n){var i=n(0),r=n(87),o=n(34);i(i.S+i.F,"Object",{make:function(t,e){return r(o(t),e)}})},function(t,e,n){n(65),n(74),n(165),n(166),n(170),n(171),t.exports=n(10).Promise},function(t,e,n){for(var i=n(64),r=n(25),o=n(30),s=n(1),a=n(13),l=n(31),c=n(3),u=c("iterator"),h=c("toStringTag"),f=l.Array,_={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=r(_),d=0;d<p.length;d++){var m,y=p[d],v=_[y],b=s[y],g=b&&b.prototype;if(g&&(g[u]||a(g,u,f),g[h]||a(g,h,y),l[y]=f,v))for(m in i)g[m]||o(g,m,i[m],!0)}},function(t,e,n){"use strict";var i,r,o,s,a=n(23),l=n(1),c=n(16),u=n(38),h=n(0),f=n(2),_=n(17),p=n(66),d=n(167),m=n(49),y=n(88).set,v=n(169)(),b=n(67),g=n(89),C=n(90),w="Promise",S=l.TypeError,A=l.process,x=l[w],k="process"==u(A),E=function(){},O=r=b.f,L=!!function(){try{var t=x.resolve(1),e=(t.constructor={})[n(3)("species")]=function(t){t(E,E)};return(k||"function"==typeof PromiseRejectionEvent)&&t.then(E)instanceof e}catch(t){}}(),T=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},R=function(t,e){if(!t._n){t._n=!0;var n=t._c;v(function(){for(var i=t._v,r=1==t._s,o=0,s=function(e){var n,o,s=r?e.ok:e.fail,a=e.resolve,l=e.reject,c=e.domain;try{s?(r||(2==t._h&&P(t),t._h=1),!0===s?n=i:(c&&c.enter(),n=s(i),c&&c.exit()),n===e.promise?l(S("Promise-chain cycle")):(o=T(n))?o.call(n,a,l):a(n)):l(i)}catch(t){l(t)}};n.length>o;)s(n[o++]);t._c=[],t._n=!1,e&&!t._h&&I(t)})}},I=function(t){y.call(l,function(){var e,n,i,r=t._v,o=M(t);if(o&&(e=g(function(){k?A.emit("unhandledRejection",r,t):(n=l.onunhandledrejection)?n({promise:t,reason:r}):(i=l.console)&&i.error&&i.error("Unhandled promise rejection",r)}),t._h=k||M(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},M=function(t){return 1!==t._h&&0===(t._a||t._c).length},P=function(t){y.call(l,function(){var e;k?A.emit("rejectionHandled",t):(e=l.onrejectionhandled)&&e({promise:t,reason:t._v})})},D=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),R(e,!0))},H=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=T(t))?v(function(){var i={_w:n,_d:!1};try{e.call(t,c(H,i,1),c(D,i,1))}catch(t){D.call(i,t)}}):(n._v=t,n._s=1,R(n,!1))}catch(t){D.call({_w:n,_d:!1},t)}}};L||(x=function(t){p(this,x,w,"_h"),_(t),i.call(this);try{t(c(H,this,1),c(D,this,1))}catch(t){D.call(this,t)}},(i=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(68)(x.prototype,{then:function(t,e){var n=O(m(this,x));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=k?A.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new i;this.promise=t,this.resolve=c(H,t,1),this.reject=c(D,t,1)},b.f=O=function(t){return t===x||t===s?new o(t):r(t)}),h(h.G+h.W+h.F*!L,{Promise:x}),n(36)(x,w),n(45)(w),s=n(10)[w],h(h.S+h.F*!L,w,{reject:function(t){var e=O(this);return(0,e.reject)(t),e.promise}}),h(h.S+h.F*(a||!L),w,{resolve:function(t){return C(a&&this===s?x:this,t)}}),h(h.S+h.F*!(L&&n(61)(function(t){x.all(t).catch(E)})),w,{all:function(t){var e=this,n=O(e),i=n.resolve,r=n.reject,o=g(function(){var n=[],o=0,s=1;d(t,!1,function(t){var a=o++,l=!1;n.push(void 0),s++,e.resolve(t).then(function(t){l||(l=!0,n[a]=t,--s||i(n))},r)}),--s||i(n)});return o.e&&r(o.v),n.promise},race:function(t){var e=this,n=O(e),i=n.reject,r=g(function(){d(t,!1,function(t){e.resolve(t).then(n.resolve,i)})});return r.e&&i(r.v),n.promise}})},function(t,e,n){var i=n(16),r=n(79),o=n(58),s=n(11),a=n(5),l=n(60),c={},u={};(e=t.exports=function(t,e,n,h,f){var _,p,d,m,y=f?function(){return t}:l(t),v=i(n,h,e?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(o(y)){for(_=a(t.length);_>b;b++)if((m=e?v(s(p=t[b])[0],p[1]):v(t[b]))===c||m===u)return m}else for(d=y.call(t);!(p=d.next()).done;)if((m=r(d,v,p.value,e))===c||m===u)return m}).BREAK=c,e.RETURN=u},function(t,e){t.exports=function(t,e,n){var i=void 0===n;switch(e.length){case 0:return i?t():t.call(n);case 1:return i?t(e[0]):t.call(n,e[0]);case 2:return i?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return i?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return i?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var i=n(1),r=n(88).set,o=i.MutationObserver||i.WebKitMutationObserver,s=i.process,a=i.Promise,l="process"==n(32)(s);t.exports=function(){var t,e,n,c=function(){var i,r;for(l&&(i=s.domain)&&i.exit();t;){r=t.fn,t=t.next;try{r()}catch(i){throw t?n():e=void 0,i}}e=void 0,i&&i.enter()};if(l)n=function(){s.nextTick(c)};else if(!o||i.navigator&&i.navigator.standalone)if(a&&a.resolve){var u=a.resolve();n=function(){u.then(c)}}else n=function(){r.call(i,c)};else{var h=!0,f=document.createTextNode("");new o(c).observe(f,{characterData:!0}),n=function(){f.data=h=!h}}return function(i){var r={fn:i,next:void 0};e&&(e.next=r),t||(t=r,n()),e=r}}},function(t,e,n){"use strict";var i=n(0),r=n(10),o=n(1),s=n(49),a=n(90);i(i.P+i.R,"Promise",{finally:function(t){var e=s(this,r.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return a(e,t()).then(function(){return n})}:t,n?function(n){return a(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var i=n(0),r=n(67),o=n(89);i(i.S,"Promise",{try:function(t){var e=r.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){n(173),n(174),n(175),n(176),n(177),n(178),n(179),n(180),n(181),n(182),n(183),n(65),t.exports=n(10)},function(t,e,n){"use strict";var i=n(0),r=n(50),o=n(69),s=n(11),a=n(33),l=n(5),c=n(2),u=n(1).ArrayBuffer,h=n(49),f=o.ArrayBuffer,_=o.DataView,p=r.ABV&&u.isView,d=f.prototype.slice,m=r.VIEW,y="ArrayBuffer";i(i.G+i.W+i.F*(u!==f),{ArrayBuffer:f}),i(i.S+i.F*!r.CONSTR,y,{isView:function(t){return p&&p(t)||c(t)&&m in t}}),i(i.P+i.U+i.F*n(8)(function(){return!new f(2).slice(1,void 0).byteLength}),y,{slice:function(t,e){if(void 0!==d&&void 0===e)return d.call(s(this),t);for(var n=s(this).byteLength,i=a(t,n),r=a(void 0===e?n:e,n),o=new(h(this,f))(l(r-i)),c=new _(this),u=new _(o),p=0;i<r;)u.setUint8(p++,c.getUint8(i++));return o}}),n(45)(y)},function(t,e,n){var i=n(0);i(i.G+i.W+i.F*!n(50).ABV,{DataView:n(69).DataView})},function(t,e,n){n(18)("Int8",1,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){n(18)("Uint8",1,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){n(18)("Uint8",1,function(t){return function(e,n,i){return t(this,e,n,i)}},!0)},function(t,e,n){n(18)("Int16",2,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){n(18)("Uint16",2,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){n(18)("Int32",4,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){n(18)("Uint32",4,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){n(18)("Float32",4,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){n(18)("Float64",8,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){(function(t){!function(t){function e(t){if("utf-8"!==(t=void 0===t?"utf-8":t))throw new RangeError("Failed to construct 'TextEncoder': The encoding label provided ('"+t+"') is invalid.")}function n(t,e){if(t=void 0===t?"utf-8":t,e=void 0===e?{fatal:!1}:e,"utf-8"!==t)throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+t+"') is invalid.");if(e.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}if(t.TextEncoder&&t.TextDecoder)return!1;Object.defineProperty(e.prototype,"encoding",{value:"utf-8"}),e.prototype.encode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");e=0;for(var n=t.length,i=0,r=Math.max(32,n+(n>>1)+7),o=new Uint8Array(r>>3<<3);e<n;){var s=t.charCodeAt(e++);if(55296<=s&&56319>=s){if(e<n){var a=t.charCodeAt(e);56320==(64512&a)&&(++e,s=((1023&s)<<10)+(1023&a)+65536)}if(55296<=s&&56319>=s)continue}if(i+4>o.length&&(r+=8,r=(r*=1+e/t.length*2)>>3<<3,(a=new Uint8Array(r)).set(o),o=a),0==(4294967168&s))o[i++]=s;else{if(0==(4294965248&s))o[i++]=s>>6&31|192;else if(0==(4294901760&s))o[i++]=s>>12&15|224,o[i++]=s>>6&63|128;else{if(0!=(4292870144&s))continue;o[i++]=s>>18&7|240,o[i++]=s>>12&63|128,o[i++]=s>>6&63|128}o[i++]=63&s|128}}return o.slice(0,i)},Object.defineProperty(n.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(n.prototype,"fatal",{value:!1}),Object.defineProperty(n.prototype,"ignoreBOM",{value:!1}),n.prototype.decode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");e=0;for(var n=(t=new Uint8Array(t)).length,i=[];e<n;){var r=t[e++];if(0===r)break;if(0==(128&r))i.push(r);else if(192==(224&r)){var o=63&t[e++];i.push((31&r)<<6|o)}else if(224==(240&r)){o=63&t[e++];var s=63&t[e++];i.push((31&r)<<12|o<<6|s)}else if(240==(248&r)){65535<(r=(7&r)<<18|(o=63&t[e++])<<12|(s=63&t[e++])<<6|63&t[e++])&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r)}}return String.fromCharCode.apply(null,i)},t.TextEncoder=e,t.TextDecoder=n}("undefined"!=typeof window?window:void 0!==t?t:this)}).call(e,n(185))},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var i=t.exports;function r(t){if(t.aborted())throw new i.Error("aborted")}window.Zmodem=i,Object.assign(i,n(187)),i.Browser={send_files:function(t,e,n){n||(n={});for(var i=[],o=0,s=e.length-1;s>=0;s--){var a=e[s];o+=a.size,i[s]={obj:a,name:a.name,size:a.size,mtime:new Date(a.lastModified),files_remaining:e.length-s,bytes_remaining:o}}var l=0;return function e(){var o=i[l];return o?(l++,t.send_offer(o).then(function(i){return n.on_offer_response&&n.on_offer_response(o.obj,i),void 0===i?e():new Promise(function(s){var a,l=new FileReader;l.onerror=function(t){throw console.error("file read error",t),"File read error: "+t},l.onprogress=function(e){e.target.result&&(a=new Uint8Array(e.target.result,i.get_offset()),r(t),i.send(a),n.on_progress&&n.on_progress(o.obj,i,a))},l.onload=function(l){a=new Uint8Array(l.target.result,i,a),r(t),i.end(a).then(function(){n.on_progress&&a.length&&n.on_progress(o.obj,i,a),n.on_file_complete&&n.on_file_complete(o.obj,i),s(e())})},l.readAsArrayBuffer(o.obj)})})):Promise.resolve()}()},save_to_disk:function(t,e){var n=new Blob(t),i=URL.createObjectURL(n),r=document.createElement("a");r.style.display="none",r.href=i,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}}},function(t,e,n){"use strict";Object.assign(t.exports,n(188))},function(t,e,n){"use strict";var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=t.exports;Object.assign(o,n(41),n(189));var s=[42,42,24,66,48],a=["to_terminal","on_detect","on_retract","sender"],l=function(){function t(e,n,i,o){r(this,t),this._confirmer=n,this._denier=i,this._is_valid=o,this._session_type=e}return i(t,[{key:"confirm",value:function(){return this._confirmer.apply(this,arguments)}},{key:"deny",value:function(){return this._denier.apply(this,arguments)}},{key:"is_valid",value:function(){return this._is_valid.apply(this,arguments)}},{key:"get_session_role",value:function(){return this._session_type}}]),t}();o.Sentry=function(){function t(e){if(r(this,t),!e)throw"Need options!";var n=this;a.forEach(function(t){if(!e[t])throw"Need “"+t+"”!";n["_"+t]=e[t]}),this._cache=[]}return i(t,[{key:"_after_session_end",value:function(){this._zsession=null}},{key:"consume",value:function(t){if(t instanceof Array||(t=Array.prototype.slice.call(new Uint8Array(t))),this._zsession){var e=this._zsession;if(e.consume(t),!e.has_ended())return;t="receive"===e.type?e.get_trailing_bytes():[]}var n=this._parse(t),i=t;if(n){!!this._parsed_session&&(this._parsed_session.type===n.type&&(i=[]),this._on_retract()),this._parsed_session=n;var r=this;this._on_detect(new l(n.type,function(){if(!this.is_valid())throw"Stale ZMODEM session!";return n.on("garbage",r._to_terminal),n.on("session_end",r._after_session_end.bind(r)),n.set_sender(r._sender),delete r._parsed_session,r._zsession=n},this._send_abort.bind(this),function(){return r._parsed_session===n}))}else{var o=this._parsed_session;this._parsed_session=null,o&&(1===i.length&&67===i[0]&&this._send_abort(),this._on_retract())}this._to_terminal(i)}},{key:"get_confirmed_session",value:function(){return this._zsession||null}},{key:"_send_abort",value:function(){this._sender(o.ZMLIB.ABORT_SEQUENCE)}},{key:"_parse",value:function(t){var e=this._cache;for(e.push.apply(e,t);;){var n=o.ZMLIB.find_subarray(e,s);if(-1===n)break;e.splice(0,n);var i=void 0;try{i=o.Session.parse(e)}catch(t){}if(!i)break;return 1===e.length&&e[0]===o.ZMLIB.XON&&e.shift(),e.length?null:i}return e.splice(21),null}}]),t}()},function(t,e,n){"use strict";var i=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var l=t.exports;Object.assign(l,n(70),n(190),n(71),n(41),n(191),n(193),n(194),n(42));var c=["CANFDX","CANOVIO","CANFC32"],u="spool_uint8array",h=[79,79],f=l.ZMLIB.ABORT_SEQUENCE,_=function(){function t(){a(this,t),this._on_evt={},this._evt_once_index={}}return r(t,[{key:"_Add_event",value:function(t){this._on_evt[t]=[],this._evt_once_index[t]=[]}},{key:"_get_evt_queue",value:function(t){if(!this._on_evt[t])throw"Bad event: "+t;return this._on_evt[t]}},{key:"on",value:function(t,e){return this._get_evt_queue(t).push(e),this}},{key:"off",value:function(t,e){var n=this._get_evt_queue(t);if(e){var i=n.indexOf(e);if(-1===i)throw"“"+e+"” is not in the “"+t+"” queue.";n.splice(i,1)}else n.pop();return this}},{key:"_Happen",value:function(t){var e=this._get_evt_queue(t),n=Array.apply(null,arguments);n.shift();var i=this;return e.forEach(function(t){t.apply(i,n)}),e.length}}]),t}();l.Session=function(t){function e(){a(this,e);var t=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t._config={},t._input_buffer=[],t._Add_event("receive"),t._Add_event("garbage"),t._Add_event("session_end"),t}return s(e,_),r(e,[{key:"set_sender",value:function(t){return this._sender=t,this}},{key:"has_ended",value:function(){return this._has_ended()}},{key:"consume",value:function(t){if(this._before_consume(t),this._aborted)throw new l.Error("already_aborted");t.length&&(this._strip_and_enqueue_input(t),this._check_for_abort_sequence(t)||this._consume_first())}},{key:"aborted",value:function(){return!!this._aborted}}],[{key:"parse",value:function(t){var e;try{e=l.Header.parse_hex(t)}catch(t){return}if(e)switch(e.NAME){case"ZRQINIT":return new l.Session.Receive;case"ZRINIT":return new l.Session.Send(e)}}}]),r(e,[{key:"get_role",value:function(){return this.type}},{key:"_trim_leading_garbage_until_header",value:function(){var t=l.Header.trim_leading_garbage(this._input_buffer);t.length&&0===this._Happen("garbage",t)&&console.debug("Garbage: ",String.fromCharCode.apply(String,t),t)}},{key:"_parse_and_consume_header",value:function(){this._trim_leading_garbage_until_header();var t=l.Header.parse(this._input_buffer);if(t)return this._consume_header(t[0]),this._last_header_name=t[0].NAME,this._last_header_crc=t[1],t[0]}},{key:"_consume_header",value:function(t){this._on_receive(t);var e=this._next_header_handler[t.NAME];if(!e)throw console.error("Unhandled header!",t,this._next_header_handler),new l.Error("Unhandled header: "+t.NAME);this._next_header_handler=null,e.call(this,t)}},{key:"_check_for_abort_sequence",value:function(){var t=l.ZMLIB.find_subarray(this._input_buffer,f);if(-1!==t)throw this._input_buffer.splice(0,t+f.length),this._aborted=!0,this._on_session_end(),new l.Error("peer_aborted")}},{key:"_send_header",value:function(t){if(!this._sender)throw"Need sender!";var e=Array.apply(null,arguments),n=this._create_header_bytes(e);this._sender(n[0]),this._last_sent_header=n[1]}},{key:"_create_header_bytes",value:function(t){var e=l.Header.build.apply(l.Header,t);return[e[this._get_header_formatter(t[0])](this._zencoder),e]}},{key:"_strip_and_enqueue_input",value:function(t){l.ZMLIB.strip_ignored_bytes(t),this._input_buffer.push.apply(this._input_buffer,t)}},{key:"abort",value:function(){this._sender(f.concat([8,8,8,8,8])),this._aborted=!0,this._sender=function(){throw new l.Error("already_aborted")},this._on_session_end()}},{key:"_on_session_end",value:function(){this._Happen("session_end")}},{key:"_on_receive",value:function(t){this._Happen("receive",t)}},{key:"_before_consume",value:function(){}}]),e}(),l.Session.Receive=function(t){function e(){a(this,e);var t=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t._Add_event("offer"),t._Add_event("data_in"),t._Add_event("file_end"),t}return s(e,l.Session),r(e,[{key:"_before_consume",value:function(t){if(this._bytes_after_OO)throw"PROTOCOL: Session is completed!";this._bytes_being_consumed=t}},{key:"get_trailing_bytes",value:function(){if(this._aborted)return[];if(!this._bytes_after_OO)throw"PROTOCOL: Session is not completed!";return this._bytes_after_OO.slice(0)}},{key:"_has_ended",value:function(){return this.aborted()||!!this._bytes_after_OO}},{key:"_get_header_formatter",value:function(){return"to_hex"}},{key:"_parse_and_consume_subpacket",value:function(){var t;t=16===this._last_header_crc?"parse16":"parse32";var e=l.Subpacket[t](this._input_buffer);return e&&(this._consume_data(e),e.frame_end()&&(this._next_subpacket_handler=null)),e}},{key:"_consume_first",value:function(){if(this._got_ZFIN){if(this._input_buffer.length<2)return;if(0===l.ZMLIB.find_subarray(this._input_buffer,h))return this._bytes_after_OO=(t=this._bytes_being_consumed.slice(0),0===l.ZMLIB.find_subarray(t,h)?t.splice(0,h.length):t[0]===h[h.length-1]&&t.splice(0,1),t),void this._on_session_end();throw"PROTOCOL: Only thing after ZFIN should be “OO” (79,79), not: "+array_buf.join()}var t,e;do{e=this._next_subpacket_handler?this._parse_and_consume_subpacket():this._parse_and_consume_header()}while(e&&this._input_buffer.length)}},{key:"_consume_data",value:function(t){if(this._on_receive(t),!this._next_subpacket_handler)throw"PROTOCOL: Received unexpected data packet after "+this._last_header_name+" header: "+t.get_payload().join();this._next_subpacket_handler.call(this,t)}},{key:"_octets_to_string",value:function(t){return this._textdecoder||(this._textdecoder=new l.Text.Decoder),this._textdecoder.decode(new Uint8Array(t))}},{key:"_consume_ZFILE_data",value:function(t,e){if(this._file_info)throw"PROTOCOL: second ZFILE data subpacket received";var n=e.get_payload(),i=n.indexOf(0),r=this._octets_to_string(n.slice(0,i)),o=this._octets_to_string(n.slice(1+i)).split(" "),s=o[1]&&parseInt(o[1],8)||void 0;s&&(s=new Date(1e3*s)),this._file_info={name:r,size:o[0]?parseInt(o[0],10):null,mtime:s||null,mode:o[2]&&parseInt(o[2],8)||null,serial:o[3]&&parseInt(o[3],10)||null,files_remaining:o[4]?parseInt(o[4],10):null,bytes_remaining:o[5]?parseInt(o[5],10):null};var a=new m(t.get_options(),this._file_info,this._accept.bind(this),this._skip.bind(this));this._current_transfer=a}},{key:"_consume_ZDATA_data",value:function(t){if(!this._accepted_offer)throw"PROTOCOL: Received data without accepting!";if(!this._offset_ok)return console.warn("offset not ok!"),void _send_ZRPOS();this._file_offset+=t.get_payload().length,this._on_data_in(t),t.ack_expected()&&!t.frame_end()&&this._send_header("ZACK",l.ENCODELIB.pack_u32_le(this._file_offset))}},{key:"_make_promise_for_between_files",value:function(){var t=this;return new Promise(function(e){var n={ZFILE:function(t){this._next_subpacket_handler=function(n){this._next_subpacket_handler=null,this._consume_ZFILE_data(t,n),this._Happen("offer",this._current_transfer),e(this._current_transfer)}},ZSINIT:function(e){t._next_subpacket_handler=function(e){t._next_subpacket_handler=null,t._consume_ZSINIT_data(e),t._send_header("ZACK"),t._next_header_handler=n}},ZFIN:function(){this._consume_ZFIN(),e()}};t._next_header_handler=n})}},{key:"_consume_ZSINIT_data",value:function(t){this._attn=t.get_payload()}},{key:"start",value:function(){if(this._started)throw"Already started!";this._started=!0;var t=this._make_promise_for_between_files();return this._send_ZRINIT(),t}},{key:"_accept",value:function(t){this._accepted_offer=!0,this._file_offset=t||0;var e=this,n=new Promise(function(t){e._next_header_handler={ZDATA:function(e){this._consume_ZDATA(e),this._next_subpacket_handler=this._consume_ZDATA_data,this._next_header_handler={ZEOF:function(e){this._next_subpacket_handler=null,this._consume_ZEOF(e);var n=this._make_promise_for_between_files();t(n)}}}}});return this._send_ZRPOS(),n}},{key:"_skip",value:function(){var t=this._make_promise_for_between_files();if(this._accepted_offer){var e=function(){this._accepted_offer=!1,this._next_subpacket_handler=null,this._make_promise_for_between_files()}.bind(this);Object.assign(this._next_header_handler,{ZEOF:e,ZDATA:function(){e(),this._next_header_handler.ZEOF=e}.bind(this)})}return this._file_info=null,this._send_header("ZSKIP"),t}},{key:"_send_ZRINIT",value:function(){this._send_header("ZRINIT",c)}},{key:"_consume_ZFIN",value:function(){this._got_ZFIN=!0,this._send_header("ZFIN")}},{key:"_consume_ZEOF",value:function(t){if(this._file_offset!==t.get_offset())throw"ZEOF offset mismatch; unimplemented (local: "+this._file_offset+"; ZEOF: "+t.get_offset()+")";this._send_ZRINIT(),this._on_file_end(),this._file_info=null,this._current_transfer=null}},{key:"_consume_ZDATA",value:function(t){if(this._file_offset!==t.get_offset())throw"Error correction is unimplemented.";this._offset_ok=!0}},{key:"_send_ZRPOS",value:function(){this._send_header("ZRPOS",this._file_offset)}},{key:"_on_file_end",value:function(){this._Happen("file_end"),this._current_transfer&&(this._current_transfer._Happen("complete"),this._current_transfer=null)}},{key:"_on_data_in",value:function(t){this._Happen("data_in",t),this._current_transfer&&this._current_transfer._Happen("input",t.get_payload())}}]),e}(),Object.assign(l.Session.Receive.prototype,{type:"receive"});var p={get_details:function(){return Object.assign({},this._file_info)},get_options:function(){return Object.assign({},this._zfile_opts)},get_offset:function(){return this._file_offset}},d=function(){function t(e,n,i,r){a(this,t),this._file_info=e,this._file_offset=n||0,this._send=i,this._end=r}return r(t,[{key:"send",value:function(t){this._send(t),this._file_offset+=t.length}},{key:"end",value:function(t){var e=this._end(t||[]);return t&&(this._file_offset+=t.length),e}}]),t}();Object.assign(d.prototype,p);var m=function(t){function e(t,n,i,r){a(this,e);var s=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return s._zfile_opts=t,s._file_info=n,s._accept_func=i,s._skip_func=r,s._Add_event("input"),s._Add_event("complete"),s.on("input",s._input_handler),s}return s(e,_),r(e,[{key:"_verify_not_skipped",value:function(){if(this._skipped)throw new l.Error("Already skipped!")}},{key:"skip",value:function(){return this._verify_not_skipped(),this._skipped=!0,this._skip_func.apply(this,arguments)}},{key:"accept",value:function(t){if(this._verify_not_skipped(),this._accepted)throw new l.Error("Already accepted!");switch(this._accepted=!0,t||(t={}),this._file_offset=t.offset||0,t.on_input){case null:case void 0:case"spool_array":case u:this._spool=[];break;default:if("function"!=typeof t.on_input)throw"Invalid “on_input”: "+t.on_input}return this._input_handler_mode=t.on_input||u,this._accept_func(this._file_offset).then(this._get_spool.bind(this))}},{key:"_input_handler",value:function(t){if(this._file_offset+=t.length,"function"==typeof this._input_handler_mode)this._input_handler_mode(t);else{if(this._input_handler_mode===u)t=new Uint8Array(t);else if("spool_array"!==this._input_handler_mode)throw new l.Error("WTF?? _input_handler_mode = "+this._input_handler_mode);this._spool.push(t)}}},{key:"_get_spool",value:function(){return this._spool}}]),e}();Object.assign(m.prototype,p);var y={ZFILE:!0,ZDATA:!0};l.Session.Send=function(t){function e(t){a(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(!t)throw"Need first header!";if("ZRINIT"!==t.NAME)throw"First header should be ZRINIT, not "+t.NAME;n._last_header_name="ZRINIT",n._subpacket_encode_func="encode16",n._zencoder=new l.ZDLE,n._consume_ZRINIT(t),n._file_offset=0;return n._start_keepalive_on_set_sender=!0,n}return s(e,l.Session),r(e,[{key:"set_sender",value:function(t){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"set_sender",this).call(this,t),this._start_keepalive_on_set_sender&&(this._start_keepalive_on_set_sender=!1,this._start_keepalive()),this}},{key:"_get_header_formatter",value:function(t){return y[t]?"to_binary16":"to_hex"}},{key:"_start_keepalive",value:function(){if(!this._keepalive_promise){var t=this;this._keepalive_promise=new Promise(function(e){t._keepalive_timeout=setTimeout(e,5e3)}).then(function(){t._next_header_handler={ZACK:function(){t._got_ZSINIT_ZACK=!0}},t._send_ZSINIT(),t._keepalive_promise=null,t._start_keepalive()})}}},{key:"_stop_keepalive",value:function(){this._keepalive_promise&&(clearTimeout(this._keepalive_timeout),this._keep_alive_promise=null)}},{key:"_send_ZSINIT",value:function(){var t=[];this._zencoder.escapes_ctrl_chars()&&t.push("ESCCTL"),this._send_header_and_data(["ZSINIT",t],[0],"end_ack")}},{key:"_consume_ZRINIT",value:function(t){if(this._last_ZRINIT=t,t.get_buffer_size())throw"Buffer size ("+t.get_buffer_size()+") is unsupported!";if(!t.can_full_duplex())throw"Half-duplex I/O is unsupported!";if(!t.can_overlap_io())throw"Non-overlap I/O is unsupported!";if(t.escape_8th_bit())throw"8-bit escaping is unsupported!";this._zencoder.set_escape_ctrl_chars(!0),t.escape_ctrl_chars()||console.debug("Peer didn’t request escape of all control characters. Will send ZSINIT to force recognition of escaped control characters.")}},{key:"_ensure_receiver_escapes_ctrl_chars",value:function(){var t;if(!this._last_ZRINIT.escape_ctrl_chars()&&!this._got_ZSINIT_ZACK){var e=this;t=new Promise(function(t){e._next_header_handler={ZACK:function(e){t()}},e._send_ZSINIT()})}else t=Promise.resolve();return t}},{key:"_convert_params_to_offer_payload_array",value:function(t){var e=(t=l.Validation.offer_parameters(t)).name+"\0",n=[(t.size||0).toString(10),t.mtime?t.mtime.toString(8):"0",t.mode?(32768|t.mode).toString(8):"0","0"];return t.files_remaining&&(n.push(t.files_remaining),t.bytes_remaining&&n.push(t.bytes_remaining)),e+=n.join(" "),this._string_to_octets(e)}},{key:"send_offer",value:function(t){if(!t)throw"need file params!";if(this._sending_file)throw"Already sending file!";var e=this._convert_params_to_offer_payload_array(t);this._stop_keepalive();var n=this,i=function(){var i=new Promise(function(e){n._next_header_handler={ZSKIP:function(){n._start_keepalive(),e()},ZRPOS:function(i){n._sending_file=!0,e(new d(t,i.get_offset(),n._send_interim_file_piece.bind(n),n._end_file.bind(n)))}}});return n._send_header_and_data(["ZFILE"],e,"end_ack"),delete n._sent_ZDATA,i};return this._ensure_receiver_escapes_ctrl_chars().then(i)}},{key:"_send_header_and_data",value:function(t,e,n){var i=this._create_header_bytes(t),r=this._build_subpacket_bytes(e,n);i[0].push.apply(i[0],r),this._sender(i[0]),this._last_sent_header=i[1]}},{key:"_build_subpacket_bytes",value:function(t,e){return l.Subpacket.build(t,e)[this._subpacket_encode_func](this._zencoder)}},{key:"_build_and_send_subpacket",value:function(t,e){this._sender(this._build_subpacket_bytes(t,e))}},{key:"_string_to_octets",value:function(t){this._textencoder||(this._textencoder=new l.Text.Encoder);var e=this._textencoder.encode(t);return Array.prototype.slice.call(e)}},{key:"_send_interim_file_piece",value:function(t){return this._send_file_part(t,"no_end_no_ack"),Promise.resolve()}},{key:"_ensure_we_are_sending",value:function(){if(!this._sending_file)throw"Not sending a file currently!"}},{key:"_end_file",value:function(t){this._ensure_we_are_sending(),this._send_file_part(t,"end_no_ack");var e=this,n=new Promise(function(t){e._sending_file=!1,e._prepare_to_receive_ZRINIT(t)});return this._send_header("ZEOF",this._file_offset),this._file_offset=0,n}},{key:"_prepare_to_receive_ZRINIT",value:function(t){this._next_header_handler={ZRINIT:function(e){this._consume_ZRINIT(e),t&&t()}}}},{key:"close",value:function(){var t="ZRINIT"===this._last_header_name;if(t||(t="ZSKIP"===this._last_header_name),t||(t="ZSINIT"===this._last_sent_header.name&&"ZACK"===this._last_header_name),!t)throw"Can’t close; last received header was “"+this._last_header_name+"”";var e=this,n=new Promise(function(t,n){e._next_header_handler={ZFIN:function(){e._sender(h),e._sent_OO=!0,e._on_session_end(),t()}}});return this._send_header("ZFIN"),n}},{key:"_has_ended",value:function(){return this.aborted()||!!this._sent_OO}},{key:"_send_file_part",value:function(t,e){this._sent_ZDATA||(this._send_header("ZDATA",this._file_offset),this._sent_ZDATA=!0);for(var n=0,i=t.length;;){var r=Math.min(n+8192,i)-n,o=r+n>=i,s=t.slice(n,n+r);if(s instanceof Array||(s=Array.prototype.slice.call(s)),this._build_and_send_subpacket(s,o?e:"no_end_no_ack"),this._file_offset+=r,(n+=r)>=i)break}}},{key:"_consume_first",value:function(){if(!this._parse_and_consume_header()&&"67"===this._input_buffer.join())throw"Receiver has fallen back to YMODEM."}},{key:"_on_session_end",value:function(){this._stop_keepalive(),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_on_session_end",this).call(this)}}]),e}(),Object.assign(l.Session.Send.prototype,{type:"send"})},function(t,e,n){"use strict";var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(){r(this,t)}return i(t,[{key:"encode",value:function(t){t=unescape(encodeURIComponent(t));for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return new Uint8Array(e)}}]),t}(),s=function(){function t(){r(this,t)}return i(t,[{key:"decode",value:function(t){return decodeURIComponent(escape(String.fromCharCode.apply(String,t)))}}]),t}();t.exports.Text={Encoder:"undefined"!=typeof TextEncoder?TextEncoder:o,Decoder:"undefined"!=typeof TextDecoder?TextDecoder:s}},function(t,e,n){"use strict";var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=t.exports;Object.assign(a,n(70),n(71),n(41),n(92),n(42));var l="*".charCodeAt(0),c="A".charCodeAt(0),u="B".charCodeAt(0),h="C".charCodeAt(0),f=[13,10],_=f.slice(0).concat([a.ZMLIB.XON]),p=[l,l,a.ZMLIB.ZDLE,u],d=[l,a.ZMLIB.ZDLE,c],m=[l,a.ZMLIB.ZDLE,h];a.Header=function(){function t(){s(this,t),this._bytes4||(this._bytes4=[0,0,0,0])}return i(t,[{key:"to_hex",value:function(){var t=this._crc_bytes();return p.concat(a.ENCODELIB.octets_to_hex(t.concat(a.CRC.crc16(t))),this._hex_header_ending)}},{key:"to_binary16",value:function(t){return this._to_binary(t,d,a.CRC.crc16)}},{key:"to_binary32",value:function(t){return this._to_binary(t,m,a.CRC.crc32)}}],[{key:"trim_leading_garbage",value:function(t){var e,n,i=[];t:for(;t.length&&!n;){var r=t.indexOf(l);if(-1===r){e=!0;break t}if(i.push.apply(i,t.splice(0,r)),t.length<2)break t;if(t[1]===l)if(t.length<p.length){if(t.join()===p.slice(0,t.length).join())break t}else t[2]===p[2]&&t[3]===p[3]&&(n=W);else if(t[1]===a.ZMLIB.ZDLE){if(t.length<d.length)break t;t[2]===d[2]?n=F:t[2]===m[2]&&(n=Z)}n||i.push(t.shift())}return e&&i.push.apply(i,t.splice(0)),i}},{key:"parse",value:function(t){var e;if(t[1]===l)return(e=W(t))&&[e,16];if(t[2]===c)return(e=F(t))&&[e,16];if(t[2]===h)return(e=Z(t))&&[e,32];if(!(t.length<3))throw"Unrecognized/unsupported octets: "+t.join()}},{key:"build",value:function(t){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments),n=D[t];if(!n)throw"No frame class “"+t+"” is defined!";return e.shift(),new(n.bind.apply(n,[null].concat(e)))}}]),i(t,[{key:"_to_binary",value:function(t,e,n){var i=this._crc_bytes();return e.concat(t.encode(i.concat(n(i))))}},{key:"_crc_bytes",value:function(){return[this.TYPENUM].concat(this._bytes4)}}]),t}(),a.Header.prototype._hex_header_ending=_;var y=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Header),e}(),v={CANFDX:1,CANOVIO:2,CANBRK:4,CANCRY:8,CANLZW:16,CANFC32:32,ESCCTL:64,ESC8:128};var b=function(t){function e(t,n){s(this,e);var i=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),o=0;return n||(n=0),t.forEach(function(t){o|=function(t){if(!v[t])throw new a.Error("Invalid ZRINIT flag: "+t);return v[t]}(t)}),i._bytes4=[255&n,n>>8,0,o],i}return o(e,a.Header),i(e,[{key:"get_buffer_size",value:function(){return a.ENCODELIB.unpack_u16_be(this._bytes4.slice(0,2))||void 0}},{key:"can_full_duplex",value:function(){return!!(this._bytes4[3]&v.CANFDX)}},{key:"can_overlap_io",value:function(){return!!(this._bytes4[3]&v.CANOVIO)}},{key:"can_break",value:function(){return!!(this._bytes4[3]&v.CANBRK)}},{key:"can_fcs_32",value:function(){return!!(this._bytes4[3]&v.CANFC32)}},{key:"escape_ctrl_chars",value:function(){return!!(this._bytes4[3]&v.ESCCTL)}},{key:"escape_8th_bit",value:function(){return!!(this._bytes4[3]&v.ESC8)}}]),e}(),g={ESCCTL:64,ESC8:128};var C=function(t){function e(t,n){s(this,e);var i=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),o=0;if(t.forEach(function(t){o|=function(t){if(!g[t])throw"Invalid ZSINIT flag: "+t;return g[t]}(t)}),i._bytes4=[0,0,0,o],n){if(n.length>31)throw"Attn sequence must be <= 31 bytes";if(n.some(function(t){return t>255}))throw"Attn sequence ("+n+") must be <256";i._data=n.concat([0])}return i}return o(e,a.Header),i(e,[{key:"escape_ctrl_chars",value:function(){return!!(this._bytes4[3]&g.ESCCTL)}},{key:"escape_8th_bit",value:function(){return!!(this._bytes4[3]&g.ESC8)}}]),e}(),w=function(t){function e(t){s(this,e);var n=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t&&(n._bytes4=t.slice()),n}return o(e,a.Header),e}();w.prototype._hex_header_ending=f;var S={extended:{sparse:64},transport:[void 0,"compress","encrypt","rle"],management:[void 0,"newer_or_longer","crc","append","clobber","newer","mtime_or_length","protect","rename"],conversion:[void 0,"binary","text","resume"]},A=["extended","transport","management","conversion"],x=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Header),i(e,[{key:"get_options",value:function(){var t={sparse:!!(64&this._bytes4[0])},e=this._bytes4.slice(0);return A.forEach(function(n,i){if(S[n]instanceof Array)"management"===n&&(t.skip_if_absent=!!(128&e[i]),e[i]&=31),t[n]=S[n][e[i]];else for(var r in S[n])t[r]=!!(e[i]&S[n][r]),t[r]&&(e[i]^=S[n][r]);!t[n]&&e[i]&&(t[n]="unknown:"+e[i])}),t}}]),e}(),k=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Header),e}(),E=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Header),e}(),O=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Header),e}(),L=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Header),e}();O.prototype._hex_header_ending=f;for(var T=function(t){function e(t){s(this,e);var n=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n._bytes4=a.ENCODELIB.pack_u32_le(t),n}return o(e,a.Header),i(e,[{key:"get_offset",value:function(){return a.ENCODELIB.unpack_u32_le(this._bytes4)}}]),e}(),R=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,T),e}(),I=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,T),e}(),M=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,T),e}(),P=[[y,"ZRQINIT"],[b,"ZRINIT"],[C,"ZSINIT"],[w,"ZACK"],[x,"ZFILE"],[k,"ZSKIP"],void 0,[E,"ZABORT"],[O,"ZFIN"],[R,"ZRPOS"],[I,"ZDATA"],[M,"ZEOF"],[L,"ZFERR"],void 0,void 0,void 0,void 0,void 0,void 0,void 0],D={},H=0;H<P.length;H++)P[H]&&(D[P[H][1]]=P[H][0],Object.assign(P[H][0].prototype,{TYPENUM:H,NAME:P[H][1]}));var N=[y,b,C,w,x,k,"ZNAK",E,O,R,I,M,L,"ZCRC","ZCHALLENGE","ZCOMPL","ZCAN","ZFREECNT","ZCOMMAND","ZSTDERR"];function B(t){var e=N[t];if("string"==typeof e)throw"Received unsupported header: "+e;return function(t){if(t.prototype instanceof T)return new t(0);return new t([])}(e)}function F(t){var e=a.ZDLE.splice(t,d.length,7);return e&&j(e)}function j(t){a.CRC.verify16(t.slice(0,5),t.slice(5));var e=B(t[0]);return e._bytes4=t.slice(1,5),e}function Z(t){var e=a.ZDLE.splice(t,m.length,9);if(e){a.CRC.verify32(e.slice(0,5),e.slice(5));var n=B(e[0]);return n._bytes4=e.slice(1,5),n}}function W(t){var e,n,i=t.indexOf(138);if(-1===i&&(i=t.indexOf(10)),-1!==i){if(n=t.splice(0,i),t.shift(),19===n.length){var r=n.pop();13!==r&&141!==r&&(e="Invalid hex header: (CR/)LF doesn’t have CR!")}else 18!==n.length&&(e="Invalid hex header: invalid number of bytes before LF!");if(e)throw e+=" ("+n.length+" bytes: "+n.join()+")";return n.splice(0,4),j(a.ENCODELIB.parse_hex_octets(n))}t.length>11&&(e="Invalid hex header - no LF detected within 12 bytes!")}a.Header.parse_hex=W},function(t,e,n){var i;i=function(t){t.version="1.1.1";var e=function(){for(var t=0,e=new Array(256),n=0;256!=n;++n)t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=n)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1,e[n]=t;return"undefined"!=typeof Int32Array?new Int32Array(e):e}();t.table=e,t.bstr=function(t,n){for(var i=-1^n,r=t.length-1,o=0;o<r;)i=(i=i>>>8^e[255&(i^t.charCodeAt(o++))])>>>8^e[255&(i^t.charCodeAt(o++))];return o===r&&(i=i>>>8^e[255&(i^t.charCodeAt(o))]),-1^i},t.buf=function(t,n){if(t.length>1e4)return function(t,n){for(var i=-1^n,r=t.length-7,o=0;o<r;)i=(i=(i=(i=(i=(i=(i=(i=i>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])];for(;o<r+7;)i=i>>>8^e[255&(i^t[o++])];return-1^i}(t,n);for(var i=-1^n,r=t.length-3,o=0;o<r;)i=(i=(i=(i=i>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])];for(;o<r+3;)i=i>>>8^e[255&(i^t[o++])];return-1^i},t.str=function(t,n){for(var i,r,o=-1^n,s=0,a=t.length;s<a;)(i=t.charCodeAt(s++))<128?o=o>>>8^e[255&(o^i)]:i<2048?o=(o=o>>>8^e[255&(o^(192|i>>6&31))])>>>8^e[255&(o^(128|63&i))]:i>=55296&&i<57344?(i=64+(1023&i),r=1023&t.charCodeAt(s++),o=(o=(o=(o=o>>>8^e[255&(o^(240|i>>8&7))])>>>8^e[255&(o^(128|i>>2&63))])>>>8^e[255&(o^(128|r>>6&15|(3&i)<<4))])>>>8^e[255&(o^(128|63&r))]):o=(o=(o=o>>>8^e[255&(o^(224|i>>12&15))])>>>8^e[255&(o^(128|i>>6&63))])>>>8^e[255&(o^(128|63&i))];return-1^o}},"undefined"==typeof DO_NOT_EXPORT_CRC?i(e):i({})},function(t,e,n){"use strict";var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=t.exports;Object.assign(a,n(92),n(71),n(41),n(42));var l;a.Subpacket=function(){function t(e){s(this,t),this._payload=e}return i(t,[{key:"encode16",value:function(t){return this._encode(t,a.CRC.crc16)}},{key:"encode32",value:function(t){return this._encode(t,a.CRC.crc32)}},{key:"get_payload",value:function(){return this._payload}}],[{key:"build",value:function(t,e){var n=l[e];if(!n)throw"No subpacket type “"+e+"” is defined! Try one of: "+Object.keys(l).join(", ");return new n(t)}},{key:"parse16",value:function(e){return t._parse(e,2)}},{key:"parse32",value:function(e){return t._parse(e,4)}}]),i(t,[{key:"_encode",value:function(t,e){return t.encode(this._payload.slice(0)).concat([a.ZMLIB.ZDLE,this._frameend_num],t.encode(e(this._payload.concat(this._frameend_num))))}}],[{key:"_parse",value:function(t,e){for(var n,i,r={104:h,105:_,106:p,107:f},o=0;o<t.length;){if(-1===(o=t.indexOf(a.ZMLIB.ZDLE,o)))return;if(i=r[t[o+1]]){n=o+1;break}o++}if(i){var s=t[n];if(t[n-1]!==a.ZMLIB.ZDLE)throw"Byte before frame end should be ZDLE, not "+t[n-1];var l=t.splice(0,n-1),c=a.ZDLE.splice(t,2,e);if(c){var u=a.ZDLE.decode(l);return a.CRC[2===e?"verify16":"verify32"](u.concat([s]),c),new i(u,c)}t.unshift.apply(t,l)}}}]),t}();var c=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Subpacket),i(e,[{key:"frame_end",value:function(){return!0}}]),e}(),u=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Subpacket),i(e,[{key:"frame_end",value:function(){return!1}}]),e}(),h=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,c),i(e,[{key:"ack_expected",value:function(){return!1}}]),e}();h.prototype._frameend_num=104;var f=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,c),i(e,[{key:"ack_expected",value:function(){return!0}}]),e}();f.prototype._frameend_num=107;var _=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,u),i(e,[{key:"ack_expected",value:function(){return!1}}]),e}();_.prototype._frameend_num=105;var p=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,u),i(e,[{key:"ack_expected",value:function(){return!0}}]),e}();p.prototype._frameend_num=106,l={end_no_ack:h,end_ack:f,no_end_no_ack:_,no_end_ack:p}},function(t,e,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=t.exports;Object.assign(r,n(42));var o=/\*\x18[AC]|\*\*\x18B/;function s(t,e){if(e<0)throw new r.Error("validation","“"+t+"” ("+e+") must be nonnegative.");if(e!==Math.floor(e))throw new r.Error("validation","“"+t+"” ("+e+") must be an integer.")}r.Validation={offer_parameters:function(t){if(!t.name)throw new r.Error("validation","Need “name”!");if("string"!=typeof t.name)throw new r.Error("validation","“name” ("+t.name+") must be a string!");if(t=Object.assign({},t),o.test(t.name)&&console.warn("The filename "+JSON.stringify(name)+" contains characters that look like a ZMODEM header. This could corrupt the ZMODEM session; consider renaming it so that the filename doesn’t contain control characters."),null!==t.serial&&void 0!==t.serial)throw new r.Error("validation","“serial” is meaningless.");if(t.serial=null,["size","mode","files_remaining","bytes_remaining"].forEach(function(e){var n;switch(i(t[e])){case"object":n=null===t[e];break;case"undefined":t[e]=null,n=!0;break;case"number":s(e,t[e]),n=!0}if(!n)throw new r.Error("validation","“"+e+"” ("+t[e]+") must be null, undefined, or a number.")}),"number"==typeof t.mode&&(t.mode|=32768),0===t.files_remaining)throw new r.Error("validation","“files_remaining”, if given, must be positive.");var e;switch(i(t.mtime)){case"object":if(e=!0,t.mtime instanceof Date){var n=t.mtime;if(t.mtime=Math.floor(n.getTime()/1e3),t.mtime<0)throw new r.Error("validation","“mtime” ("+n+") must not be earlier than 1970.")}else null!==t.mtime&&(e=!1);break;case"undefined":t.mtime=null,e=!0;break;case"number":s("mtime",t.mtime),e=!0}if(!e)throw new r.Error("validation","“mtime” ("+t.mtime+") must be null, undefined, a Date, or a number.");return t}}},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(196),s=n(26),a=n(198),l=n(27),c=n(199),u=n(200),h=n(72),f=n(201),_=n(203),p=n(204),d=n(211),m=n(212),y=n(214),v=n(73),b=n(99),g=n(215),C=n(96),w=n(98),S=n(95),A="undefined"!=typeof window?window.document:null,x={cols:80,rows:24,convertEol:!1,termName:"xterm",cursorBlink:!1,cursorStyle:"block",bellSound:g.BellSound,bellStyle:"none",enableBold:!0,fontFamily:"courier-new, courier, monospace",fontSize:15,lineHeight:1,letterSpacing:0,scrollback:1e3,screenKeys:!1,debug:!1,cancelEvents:!1,disableStdin:!1,useFlowControl:!1,tabStopWidth:8,theme:null},k=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;return n.browser=v,n.options=e,n.setup(),n}return r(e,t),e.prototype.setup=function(){var t=this;Object.keys(x).forEach(function(e){null==t.options[e]&&(t.options[e]=x[e]),t[e]=t.options[e]}),this.parent=A?A.body:null,this.cols=this.options.cols,this.rows=this.options.rows,this.options.handler&&this.on("data",this.options.handler),this.cursorState=0,this.cursorHidden=!1,this.sendDataQueue="",this.customKeyEventHandler=null,this.applicationKeypad=!1,this.applicationCursor=!1,this.originMode=!1,this.insertMode=!1,this.wraparoundMode=!0,this.bracketedPasteMode=!1,this.charset=null,this.gcharset=null,this.glevel=0,this.charsets=[null],this.readable=!0,this.writable=!0,this.defAttr=131840,this.curAttr=131840,this.params=[],this.currentParam=0,this.prefix="",this.postfix="",this.writeBuffer=[],this.writeInProgress=!1,this.xoffSentToCatchUp=!1,this.writeStopped=!1,this.surrogate_high="",this.userScrolling=!1,this.inputHandler=new f.InputHandler(this),this.parser=new _.Parser(this.inputHandler,this),this.renderer=this.renderer||null,this.selectionManager=this.selectionManager||null,this.linkifier=this.linkifier||new d.Linkifier(this),this._mouseZoneManager=this._mouseZoneManager||null,this.buffers=new o.BufferSet(this),this.buffer=this.buffers.active,this.buffers.on("activate",function(e){t.buffer=e}),this.selectionManager&&this.selectionManager.setBuffer(this.buffer)},e.prototype.eraseAttr=function(){return-512&this.defAttr|511&this.curAttr},e.prototype.focus=function(){this.textarea&&this.textarea.focus()},Object.defineProperty(e.prototype,"isFocused",{get:function(){return A.activeElement===this.textarea},enumerable:!0,configurable:!0}),e.prototype.getOption=function(t){if(!(t in x))throw new Error('No option with key "'+t+'"');return void 0!==this.options[t]?this.options[t]:this[t]},e.prototype.setOption=function(t,e){if(!(t in x))throw new Error('No option with key "'+t+'"');switch(t){case"bellStyle":e||(e="none");break;case"cursorStyle":e||(e="block");break;case"lineHeight":if(e<1)return void console.warn(t+" cannot be less than 1, value: "+e);case"tabStopWidth":if(e<1)return void console.warn(t+" cannot be less than 1, value: "+e);break;case"theme":if(this.renderer)return void this._setTheme(e);break;case"scrollback":if((e=Math.min(e,s.MAX_BUFFER_SIZE))<0)return void console.warn(t+" cannot be less than 0, value: "+e);if(this.options[t]!==e){var n=this.rows+e;if(this.buffer.lines.length>n){var i=this.buffer.lines.length-n,r=this.buffer.ydisp-i<0;this.buffer.lines.trimStart(i),this.buffer.ybase=Math.max(this.buffer.ybase-i,0),this.buffer.ydisp=Math.max(this.buffer.ydisp-i,0),r&&this.refresh(0,this.rows-1)}}}switch(this[t]=e,this.options[t]=e,t){case"fontFamily":case"fontSize":this.renderer.clear(),this.charMeasure.measure(this.options);break;case"enableBold":case"letterSpacing":case"lineHeight":this.renderer.clear(),this.renderer.onResize(this.cols,this.rows,!1),this.refresh(0,this.rows-1);case"scrollback":this.buffers.resize(this.cols,this.rows),this.viewport.syncScrollArea();break;case"tabStopWidth":this.buffers.setupTabStops();break;case"bellSound":case"bellStyle":this.syncBellSound()}this.renderer&&this.renderer.onOptionsChanged()},e.prototype._onTextAreaFocus=function(){this.sendFocus&&this.send(h.C0.ESC+"[I"),this.element.classList.add("focus"),this.showCursor(),this.emit("focus")},e.prototype.blur=function(){return this.textarea.blur()},e.prototype._onTextAreaBlur=function(){this.refresh(this.buffer.y,this.buffer.y),this.sendFocus&&this.send(h.C0.ESC+"[O"),this.element.classList.remove("focus"),this.emit("blur")},e.prototype.initGlobal=function(){var t=this;this.bindKeys(),E(this.element,"copy",function(e){t.hasSelection()&&u.copyHandler(e,t,t.selectionManager)});var e=function(e){return u.pasteHandler(e,t)};E(this.textarea,"paste",e),E(this.element,"paste",e),v.isFirefox?E(this.element,"mousedown",function(e){2===e.button&&u.rightClickHandler(e,t.textarea,t.selectionManager)}):E(this.element,"contextmenu",function(e){u.rightClickHandler(e,t.textarea,t.selectionManager)}),v.isLinux&&E(this.element,"auxclick",function(e){1===e.button&&u.moveTextAreaUnderMouseCursor(e,t.textarea)})},e.prototype.bindKeys=function(){var t=this,e=this;E(this.element,"keydown",function(t){A.activeElement===this&&e._keyDown(t)},!0),E(this.element,"keypress",function(t){A.activeElement===this&&e._keyPress(t)},!0),E(this.element,"keyup",function(e){var n;16!==(n=e).keyCode&&17!==n.keyCode&&18!==n.keyCode&&t.focus()},!0),E(this.textarea,"keydown",function(e){t._keyDown(e)},!0),E(this.textarea,"keypress",function(e){t._keyPress(e),t.textarea.value=""},!0),E(this.textarea,"compositionstart",function(){return t.compositionHelper.compositionstart()}),E(this.textarea,"compositionupdate",function(e){return t.compositionHelper.compositionupdate(e)}),E(this.textarea,"compositionend",function(){return t.compositionHelper.compositionend()}),this.on("refresh",function(){return t.compositionHelper.updateCompositionElements()}),this.on("refresh",function(e){return t.queueLinkification(e.start,e.end)})},e.prototype.open=function(t){var e=this;if(this.parent=t||this.parent,!this.parent)throw new Error("Terminal requires a parent element.");this.context=this.parent.ownerDocument.defaultView,this.document=this.parent.ownerDocument,this.body=this.document.body,S.initialize(this.document),this.element=this.document.createElement("div"),this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),this.parent.appendChild(this.element);var n=A.createDocumentFragment();this.viewportElement=A.createElement("div"),this.viewportElement.classList.add("xterm-viewport"),n.appendChild(this.viewportElement),this.viewportScrollArea=A.createElement("div"),this.viewportScrollArea.classList.add("xterm-scroll-area"),this.viewportElement.appendChild(this.viewportScrollArea),this._mouseZoneManager=new w.MouseZoneManager(this),this.on("scroll",function(){return e._mouseZoneManager.clearAll()}),this.linkifier.attachToDom(this._mouseZoneManager),this.helperContainer=A.createElement("div"),this.helperContainer.classList.add("xterm-helpers"),n.appendChild(this.helperContainer),this.textarea=A.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.textarea.addEventListener("focus",function(){return e._onTextAreaFocus()}),this.textarea.addEventListener("blur",function(){return e._onTextAreaBlur()}),this.helperContainer.appendChild(this.textarea),this.compositionView=A.createElement("div"),this.compositionView.classList.add("composition-view"),this.compositionHelper=new a.CompositionHelper(this.textarea,this.compositionView,this),this.helperContainer.appendChild(this.compositionView),this.charSizeStyleElement=A.createElement("style"),this.helperContainer.appendChild(this.charSizeStyleElement),this.charMeasure=new y.CharMeasure(A,this.helperContainer),this.syncBellSound(),this.element.appendChild(n),this.renderer=new p.Renderer(this,this.options.theme),this.options.theme=null,this.viewport=new c.Viewport(this,this.viewportElement,this.viewportScrollArea,this.charMeasure),this.viewport.onThemeChanged(this.renderer.colorManager.colors),this.on("cursormove",function(){return e.renderer.onCursorMove()}),this.on("resize",function(){return e.renderer.onResize(e.cols,e.rows,!1)}),this.on("blur",function(){return e.renderer.onBlur()}),this.on("focus",function(){return e.renderer.onFocus()}),window.addEventListener("resize",function(){return e.renderer.onWindowResize(window.devicePixelRatio)}),this.charMeasure.on("charsizechanged",function(){return e.renderer.onResize(e.cols,e.rows,!0)}),this.renderer.on("resize",function(t){return e.viewport.syncScrollArea()}),this.selectionManager=new m.SelectionManager(this,this.buffer,this.charMeasure),this.element.addEventListener("mousedown",function(t){return e.selectionManager.onMouseDown(t)}),this.selectionManager.on("refresh",function(t){return e.renderer.onSelectionChanged(t.start,t.end)}),this.selectionManager.on("newselection",function(t){e.textarea.value=t,e.textarea.focus(),e.textarea.select()}),this.on("scroll",function(){e.viewport.syncScrollArea(),e.selectionManager.refresh()}),this.viewportElement.addEventListener("scroll",function(){return e.selectionManager.refresh()}),this.mouseHelper=new b.MouseHelper(this.renderer),this.charMeasure.measure(this.options),this.refresh(0,this.rows-1),this.initGlobal(),this.bindMouse()},e.prototype._setTheme=function(t){var e=this.renderer.setTheme(t);this.viewport&&this.viewport.onThemeChanged(e)},e.applyAddon=function(t){t.apply(e)},e.prototype.bindMouse=function(){var t=this,e=this.element,n=this,i=32;function r(t){var e,r;if(e=function(t){var e,i,r,o,s;switch(t.overrideType||t.type){case"mousedown":e=null!=t.button?+t.button:null!=t.which?t.which-1:null,v.isMSIE&&(e=1===e?0:4===e?1:e);break;case"mouseup":e=3;break;case"DOMMouseScroll":e=t.detail<0?64:65;break;case"wheel":e=t.wheelDeltaY>0?64:65}i=t.shiftKey?4:0,r=t.metaKey?8:0,o=t.ctrlKey?16:0,s=i|r|o,n.vt200Mouse?s&=o:n.normalMouse||(s=0);return e=32+(s<<2)+e}(t),r=n.mouseHelper.getRawByteCoords(t,n.element,n.charMeasure,n.options.lineHeight,n.cols,n.rows))switch(a(e,r),t.overrideType||t.type){case"mousedown":i=e;break;case"mouseup":i=32}}function o(t){var e=i,r=n.mouseHelper.getRawByteCoords(t,n.element,n.charMeasure,n.options.lineHeight,n.cols,n.rows);r&&a(e+=32,r)}function s(t,e){if(n.utfMouse){if(2047===e)return void t.push(0);e<127?t.push(e):(e>2047&&(e=2047),t.push(192|e>>6),t.push(128|63&e))}else{if(255===e)return void t.push(0);e>127&&(e=127),t.push(e)}}function a(t,e){if(n.vt300Mouse){t&=3,e.x-=32,e.y-=32;var i=h.C0.ESC+"[24";if(0===t)i+="1";else if(1===t)i+="3";else if(2===t)i+="5";else{if(3===t)return;i+="0"}return i+="~["+e.x+","+e.y+"]\r",void n.send(i)}if(n.decLocator)return t&=3,e.x-=32,e.y-=32,0===t?t=2:1===t?t=4:2===t?t=6:3===t&&(t=3),void n.send(h.C0.ESC+"["+t+";"+(3===t?4:0)+";"+e.y+";"+e.x+";"+e.page||"0&w");if(n.urxvtMouse)return e.x-=32,e.y-=32,e.x++,e.y++,void n.send(h.C0.ESC+"["+t+";"+e.x+";"+e.y+"M");if(n.sgrMouse)return e.x-=32,e.y-=32,void n.send(h.C0.ESC+"[<"+((3==(3&t)?-4&t:t)-32)+";"+e.x+";"+e.y+(3==(3&t)?"m":"M"));var r=[];s(r,t),s(r,e.x),s(r,e.y),n.send(h.C0.ESC+"[M"+String.fromCharCode.apply(String,r))}E(e,"mousedown",function(e){if(e.preventDefault(),t.focus(),t.mouseEvents&&!t.selectionManager.shouldForceSelection(e)){if(r(e),t.vt200Mouse)return e.overrideType="mouseup",r(e),t.cancel(e);if(t.normalMouse&&E(t.document,"mousemove",o),!t.x10Mouse){var n=function(e){return r(e),t.normalMouse&&O(t.document,"mousemove",o),O(t.document,"mouseup",n),t.cancel(e)};E(t.document,"mouseup",n)}return t.cancel(e)}}),E(e,"wheel",function(e){t.mouseEvents&&(t.x10Mouse||t.vt300Mouse||t.decLocator||(r(e),e.preventDefault()))}),E(e,"wheel",function(e){if(!t.mouseEvents)return t.viewport.onWheel(e),t.cancel(e)}),E(e,"touchstart",function(e){if(!t.mouseEvents)return t.viewport.onTouchStart(e),t.cancel(e)}),E(e,"touchmove",function(e){if(!t.mouseEvents)return t.viewport.onTouchMove(e),t.cancel(e)})},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.readable=!1,this.writable=!1,this.handler=function(){},this.write=function(){},this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},e.prototype.refresh=function(t,e){this.renderer&&this.renderer.queueRefresh(t,e)},e.prototype.queueLinkification=function(t,e){this.linkifier&&this.linkifier.linkifyRows(t,e)},e.prototype.showCursor=function(){this.cursorState||(this.cursorState=1,this.refresh(this.buffer.y,this.buffer.y))},e.prototype.scroll=function(t){var e=this.blankLine(void 0,t),n=this.buffer.ybase+this.buffer.scrollTop,i=this.buffer.ybase+this.buffer.scrollBottom;if(0===this.buffer.scrollTop){var r=this.buffer.lines.length===this.buffer.lines.maxLength;i===this.buffer.lines.length-1?this.buffer.lines.push(e):this.buffer.lines.splice(i+1,0,e),r?this.userScrolling&&(this.buffer.ydisp=Math.max(this.buffer.ydisp-1,0)):(this.buffer.ybase++,this.userScrolling||this.buffer.ydisp++)}else{var o=i-n+1;this.buffer.lines.shiftElements(n+1,o-1,-1),this.buffer.lines.set(i,e)}this.userScrolling||(this.buffer.ydisp=this.buffer.ybase),this.updateRange(this.buffer.scrollTop),this.updateRange(this.buffer.scrollBottom),this.emit("scroll",this.buffer.ydisp)},e.prototype.scrollLines=function(t,e){if(t<0){if(0===this.buffer.ydisp)return;this.userScrolling=!0}else t+this.buffer.ydisp>=this.buffer.ybase&&(this.userScrolling=!1);var n=this.buffer.ydisp;this.buffer.ydisp=Math.max(Math.min(this.buffer.ydisp+t,this.buffer.ybase),0),n!==this.buffer.ydisp&&(e||this.emit("scroll",this.buffer.ydisp),this.refresh(0,this.rows-1))},e.prototype.scrollPages=function(t){this.scrollLines(t*(this.rows-1))},e.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},e.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},e.prototype.write=function(t){var e=this;this.writeBuffer.push(t),this.options.useFlowControl&&!this.xoffSentToCatchUp&&this.writeBuffer.length>=5&&(this.send(h.C0.DC3),this.xoffSentToCatchUp=!0),!this.writeInProgress&&this.writeBuffer.length>0&&(this.writeInProgress=!0,setTimeout(function(){e.innerWrite()}))},e.prototype.innerWrite=function(){for(var t=this,e=this.writeBuffer.splice(0,300);e.length>0;){var n=e.shift();this.xoffSentToCatchUp&&0===e.length&&0===this.writeBuffer.length&&(this.send(h.C0.DC1),this.xoffSentToCatchUp=!1),this.refreshStart=this.buffer.y,this.refreshEnd=this.buffer.y;var i=this.parser.parse(n);this.parser.setState(i),this.updateRange(this.buffer.y),this.refresh(this.refreshStart,this.refreshEnd)}this.writeBuffer.length>0?setTimeout(function(){return t.innerWrite()},0):this.writeInProgress=!1},e.prototype.writeln=function(t){this.write(t+"\r\n")},e.prototype.attachCustomKeyEventHandler=function(t){this.customKeyEventHandler=t},e.prototype.setHypertextLinkHandler=function(t){if(!this.linkifier)throw new Error("Cannot attach a hypertext link handler before Terminal.open is called");this.linkifier.setHypertextLinkHandler(t),this.refresh(0,this.rows-1)},e.prototype.setHypertextValidationCallback=function(t){if(!this.linkifier)throw new Error("Cannot attach a hypertext validation callback before Terminal.open is called");this.linkifier.setHypertextValidationCallback(t),this.refresh(0,this.rows-1)},e.prototype.registerLinkMatcher=function(t,e,n){if(this.linkifier){var i=this.linkifier.registerLinkMatcher(t,e,n);return this.refresh(0,this.rows-1),i}return 0},e.prototype.deregisterLinkMatcher=function(t){this.linkifier&&this.linkifier.deregisterLinkMatcher(t)&&this.refresh(0,this.rows-1)},e.prototype.hasSelection=function(){return!!this.selectionManager&&this.selectionManager.hasSelection},e.prototype.getSelection=function(){return this.selectionManager?this.selectionManager.selectionText:""},e.prototype.clearSelection=function(){this.selectionManager&&this.selectionManager.clearSelection()},e.prototype.selectAll=function(){this.selectionManager&&this.selectionManager.selectAll()},e.prototype._keyDown=function(t){if(this.customKeyEventHandler&&!1===this.customKeyEventHandler(t))return!1;if(!this.compositionHelper.keydown(t))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var e=this._evaluateKeyEscapeSequence(t);return e.key===h.C0.DC3?this.writeStopped=!0:e.key===h.C0.DC1&&(this.writeStopped=!1),e.scrollLines?(this.scrollLines(e.scrollLines),this.cancel(t,!0)):!!L(this.browser,t)||(e.cancel&&this.cancel(t,!0),!e.key||(this.emit("keydown",t),this.emit("key",e.key,t),this.showCursor(),this.handler(e.key),this.cancel(t,!0)))},e.prototype._evaluateKeyEscapeSequence=function(t){var e={cancel:!1,key:void 0,scrollLines:void 0},n=(t.shiftKey?1:0)|(t.altKey?2:0)|(t.ctrlKey?4:0)|(t.metaKey?8:0);switch(t.keyCode){case 0:"UIKeyInputUpArrow"===t.key?this.applicationCursor?e.key=h.C0.ESC+"OA":e.key=h.C0.ESC+"[A":"UIKeyInputLeftArrow"===t.key?this.applicationCursor?e.key=h.C0.ESC+"OD":e.key=h.C0.ESC+"[D":"UIKeyInputRightArrow"===t.key?this.applicationCursor?e.key=h.C0.ESC+"OC":e.key=h.C0.ESC+"[C":"UIKeyInputDownArrow"===t.key&&(this.applicationCursor?e.key=h.C0.ESC+"OB":e.key=h.C0.ESC+"[B");break;case 8:if(t.shiftKey){e.key=h.C0.BS;break}e.key=h.C0.DEL;break;case 9:if(t.shiftKey){e.key=h.C0.ESC+"[Z";break}e.key=h.C0.HT,e.cancel=!0;break;case 13:e.key=h.C0.CR,e.cancel=!0;break;case 27:e.key=h.C0.ESC,e.cancel=!0;break;case 37:n?(e.key=h.C0.ESC+"[1;"+(n+1)+"D",e.key===h.C0.ESC+"[1;3D"&&(e.key=this.browser.isMac?h.C0.ESC+"b":h.C0.ESC+"[1;5D")):this.applicationCursor?e.key=h.C0.ESC+"OD":e.key=h.C0.ESC+"[D";break;case 39:n?(e.key=h.C0.ESC+"[1;"+(n+1)+"C",e.key===h.C0.ESC+"[1;3C"&&(e.key=this.browser.isMac?h.C0.ESC+"f":h.C0.ESC+"[1;5C")):this.applicationCursor?e.key=h.C0.ESC+"OC":e.key=h.C0.ESC+"[C";break;case 38:n?(e.key=h.C0.ESC+"[1;"+(n+1)+"A",e.key===h.C0.ESC+"[1;3A"&&(e.key=h.C0.ESC+"[1;5A")):this.applicationCursor?e.key=h.C0.ESC+"OA":e.key=h.C0.ESC+"[A";break;case 40:n?(e.key=h.C0.ESC+"[1;"+(n+1)+"B",e.key===h.C0.ESC+"[1;3B"&&(e.key=h.C0.ESC+"[1;5B")):this.applicationCursor?e.key=h.C0.ESC+"OB":e.key=h.C0.ESC+"[B";break;case 45:t.shiftKey||t.ctrlKey||(e.key=h.C0.ESC+"[2~");break;case 46:e.key=n?h.C0.ESC+"[3;"+(n+1)+"~":h.C0.ESC+"[3~";break;case 36:n?e.key=h.C0.ESC+"[1;"+(n+1)+"H":this.applicationCursor?e.key=h.C0.ESC+"OH":e.key=h.C0.ESC+"[H";break;case 35:n?e.key=h.C0.ESC+"[1;"+(n+1)+"F":this.applicationCursor?e.key=h.C0.ESC+"OF":e.key=h.C0.ESC+"[F";break;case 33:t.shiftKey?e.scrollLines=-(this.rows-1):e.key=h.C0.ESC+"[5~";break;case 34:t.shiftKey?e.scrollLines=this.rows-1:e.key=h.C0.ESC+"[6~";break;case 112:e.key=n?h.C0.ESC+"[1;"+(n+1)+"P":h.C0.ESC+"OP";break;case 113:e.key=n?h.C0.ESC+"[1;"+(n+1)+"Q":h.C0.ESC+"OQ";break;case 114:e.key=n?h.C0.ESC+"[1;"+(n+1)+"R":h.C0.ESC+"OR";break;case 115:e.key=n?h.C0.ESC+"[1;"+(n+1)+"S":h.C0.ESC+"OS";break;case 116:e.key=n?h.C0.ESC+"[15;"+(n+1)+"~":h.C0.ESC+"[15~";break;case 117:e.key=n?h.C0.ESC+"[17;"+(n+1)+"~":h.C0.ESC+"[17~";break;case 118:e.key=n?h.C0.ESC+"[18;"+(n+1)+"~":h.C0.ESC+"[18~";break;case 119:e.key=n?h.C0.ESC+"[19;"+(n+1)+"~":h.C0.ESC+"[19~";break;case 120:e.key=n?h.C0.ESC+"[20;"+(n+1)+"~":h.C0.ESC+"[20~";break;case 121:e.key=n?h.C0.ESC+"[21;"+(n+1)+"~":h.C0.ESC+"[21~";break;case 122:e.key=n?h.C0.ESC+"[23;"+(n+1)+"~":h.C0.ESC+"[23~";break;case 123:e.key=n?h.C0.ESC+"[24;"+(n+1)+"~":h.C0.ESC+"[24~";break;default:!t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?this.browser.isMac||!t.altKey||t.ctrlKey||t.metaKey?this.browser.isMac&&!t.altKey&&!t.ctrlKey&&t.metaKey&&65===t.keyCode&&this.selectAll():t.keyCode>=65&&t.keyCode<=90?e.key=h.C0.ESC+String.fromCharCode(t.keyCode+32):192===t.keyCode?e.key=h.C0.ESC+"`":t.keyCode>=48&&t.keyCode<=57&&(e.key=h.C0.ESC+(t.keyCode-48)):t.keyCode>=65&&t.keyCode<=90?e.key=String.fromCharCode(t.keyCode-64):32===t.keyCode?e.key=String.fromCharCode(0):t.keyCode>=51&&t.keyCode<=55?e.key=String.fromCharCode(t.keyCode-51+27):56===t.keyCode?e.key=String.fromCharCode(127):219===t.keyCode?e.key=String.fromCharCode(27):220===t.keyCode?e.key=String.fromCharCode(28):221===t.keyCode&&(e.key=String.fromCharCode(29))}return e},e.prototype.setgLevel=function(t){this.glevel=t,this.charset=this.charsets[t]},e.prototype.setgCharset=function(t,e){this.charsets[t]=e,this.glevel===t&&(this.charset=e)},e.prototype._keyPress=function(t){var e;if(this.customKeyEventHandler&&!1===this.customKeyEventHandler(t))return!1;if(this.cancel(t),t.charCode)e=t.charCode;else if(null==t.which)e=t.keyCode;else{if(0===t.which||0===t.charCode)return!1;e=t.which}return!(!e||(t.altKey||t.ctrlKey||t.metaKey)&&!L(this.browser,t))&&(e=String.fromCharCode(e),this.emit("keypress",e,t),this.emit("key",e,t),this.showCursor(),this.handler(e),!0)},e.prototype.send=function(t){var e=this;this.sendDataQueue||setTimeout(function(){e.handler(e.sendDataQueue),e.sendDataQueue=""},1),this.sendDataQueue+=t},e.prototype.bell=function(){var t=this;this.emit("bell"),this.soundBell()&&this.bellAudioElement.play(),this.visualBell()&&(this.element.classList.add("visual-bell-active"),clearTimeout(this.visualBellTimer),this.visualBellTimer=window.setTimeout(function(){t.element.classList.remove("visual-bell-active")},200))},e.prototype.log=function(t,e){this.options.debug&&this.context.console&&this.context.console.log&&this.context.console.log(t,e)},e.prototype.error=function(t,e){this.options.debug&&this.context.console&&this.context.console.error&&this.context.console.error(t,e)},e.prototype.resize=function(t,e){isNaN(t)||isNaN(e)||(t!==this.cols||e!==this.rows?(t<1&&(t=1),e<1&&(e=1),this.buffers.resize(t,e),this.cols=t,this.rows=e,this.buffers.setupTabStops(this.cols),this.charMeasure.measure(this.options),this.refresh(0,this.rows-1),this.emit("resize",{cols:t,rows:e})):this.charMeasure.width&&this.charMeasure.height||this.charMeasure.measure(this.options))},e.prototype.updateRange=function(t){t<this.refreshStart&&(this.refreshStart=t),t>this.refreshEnd&&(this.refreshEnd=t)},e.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1},e.prototype.eraseRight=function(t,e){var n=this.buffer.lines.get(this.buffer.ybase+e);if(n){for(var i=[this.eraseAttr()," ",1,32];t<this.cols;t++)n[t]=i;this.updateRange(e)}},e.prototype.eraseLeft=function(t,e){var n=this.buffer.lines.get(this.buffer.ybase+e);if(n){var i=[this.eraseAttr()," ",1,32];for(t++;t--;)n[t]=i;this.updateRange(e)}},e.prototype.clear=function(){if(0!==this.buffer.ybase||0!==this.buffer.y){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 t=1;t<this.rows;t++)this.buffer.lines.push(this.blankLine());this.refresh(0,this.rows-1),this.emit("scroll",this.buffer.ydisp)}},e.prototype.eraseLine=function(t){this.eraseRight(0,t)},e.prototype.blankLine=function(t,e,n){var i=[t?this.eraseAttr():this.defAttr," ",1,32],r=[];e&&(r.isWrapped=e),n=n||this.cols;for(var o=0;o<n;o++)r[o]=i;return r},e.prototype.ch=function(t){return t?[this.eraseAttr()," ",1,32]:[this.defAttr," ",1,32]},e.prototype.is=function(t){return 0===(this.options.termName+"").indexOf(t)},e.prototype.handler=function(t){this.options.disableStdin||(this.selectionManager&&this.selectionManager.hasSelection&&this.selectionManager.clearSelection(),this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),this.emit("data",t))},e.prototype.handleTitle=function(t){this.emit("title",t)},e.prototype.index=function(){this.buffer.y++,this.buffer.y>this.buffer.scrollBottom&&(this.buffer.y--,this.scroll()),this.buffer.x>=this.cols&&this.buffer.x--},e.prototype.reverseIndex=function(){if(this.buffer.y===this.buffer.scrollTop){var t=this.buffer.scrollBottom-this.buffer.scrollTop;this.buffer.lines.shiftElements(this.buffer.y+this.buffer.ybase,t,1),this.buffer.lines.set(this.buffer.y+this.buffer.ybase,this.blankLine(!0)),this.updateRange(this.buffer.scrollTop),this.updateRange(this.buffer.scrollBottom)}else this.buffer.y--},e.prototype.reset=function(){this.options.rows=this.rows,this.options.cols=this.cols;var t=this.customKeyEventHandler,e=this.inputHandler,n=this.buffers;this.setup(),this.customKeyEventHandler=t,this.inputHandler=e,this.buffers=n,this.refresh(0,this.rows-1),this.viewport.syncScrollArea()},e.prototype.tabSet=function(){this.buffer.tabs[this.buffer.x]=!0},e.prototype.cancel=function(t,e){if(this.options.cancelEvents||e)return t.preventDefault(),t.stopPropagation(),!1},e.prototype.matchColor=function(t,e,n){return function(t,e,n){var i=t<<16|e<<8|n;if(null!=R[i])return R[i];for(var r,o,s,a,l,c=1/0,u=-1,h=0;h<T.length;h++){if(r=T[h],o=r[0],s=r[1],a=r[2],f=t,_=e,p=n,d=o,m=s,y=a,0===(l=Math.pow(30*(f-d),2)+Math.pow(59*(_-m),2)+Math.pow(11*(p-y),2))){u=h;break}l<c&&(c=l,u=h)}var f,_,p,d,m,y;return R[i]=u}(t,e,n)},e.prototype.visualBell=function(){return"visual"===this.options.bellStyle||"both"===this.options.bellStyle},e.prototype.soundBell=function(){return"sound"===this.options.bellStyle||"both"===this.options.bellStyle},e.prototype.syncBellSound=function(){this.element&&(this.soundBell()&&this.bellAudioElement?this.bellAudioElement.setAttribute("src",this.options.bellSound):this.soundBell()?(this.bellAudioElement=A.createElement("audio"),this.bellAudioElement.setAttribute("preload","auto"),this.bellAudioElement.setAttribute("src",this.options.bellSound),this.helperContainer.appendChild(this.bellAudioElement)):this.bellAudioElement&&this.helperContainer.removeChild(this.bellAudioElement))},e}(l.EventEmitter);e.Terminal=k;var E=function(t,e,n,i){Array.isArray(t)||(t=[t]),t.forEach(function(t){t.addEventListener(e,n,i||!1)})};function O(t,e,n,i){void 0===i&&(i=!1),t.removeEventListener(e,n,i)}function L(t,e){var n=t.isMac&&e.altKey&&!e.ctrlKey&&!e.metaKey||t.isMSWindows&&e.altKey&&e.ctrlKey&&!e.metaKey;return"keypress"===e.type?n:n&&(!e.keyCode||e.keyCode>47)}var T=function(){for(var t,e=C.DEFAULT_ANSI_COLORS.map(function(t){return t=t.substring(1),[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]}),n=[0,95,135,175,215,255],i=0;i<216;i++)e.push([n[i/36%6|0],n[i/6%6|0],n[i%6]]);for(i=0;i<24;i++)t=8+10*i,e.push([t,t,t]);return e}(),R={}},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(26),s=function(t){function e(e){var n=t.call(this)||this;return n._terminal=e,n._normal=new o.Buffer(n._terminal,!0),n._normal.fillViewportRows(),n._alt=new o.Buffer(n._terminal,!1),n._activeBuffer=n._normal,n.setupTabStops(),n}return r(e,t),Object.defineProperty(e.prototype,"alt",{get:function(){return this._alt},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},enumerable:!0,configurable:!0}),e.prototype.activateNormalBuffer=function(){this._alt.clear(),this._activeBuffer=this._normal,this.emit("activate",this._normal)},e.prototype.activateAltBuffer=function(){this._alt.fillViewportRows(),this._activeBuffer=this._alt,this.emit("activate",this._alt)},e.prototype.resize=function(t,e){this._normal.resize(t,e),this._alt.resize(t,e)},e.prototype.setupTabStops=function(t){this._normal.setupTabStops(t),this._alt.setupTabStops(t)},e}(n(27).EventEmitter);e.BufferSet=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=t.call(this)||this;return n._maxLength=e,n._array=new Array(n._maxLength),n._startIndex=0,n._length=0,n}return r(e,t),Object.defineProperty(e.prototype,"maxLength",{get:function(){return this._maxLength},set:function(t){if(this._maxLength!==t){for(var e=new Array(t),n=0;n<Math.min(t,this.length);n++)e[n]=this._array[this._getCyclicIndex(n)];this._array=e,this._maxLength=t,this._startIndex=0}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},set:function(t){if(t>this._length)for(var e=this._length;e<t;e++)this._array[e]=void 0;this._length=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"forEach",{get:function(){var t=this;return function(e){for(var n=t.length,i=0;i<n;i++)e(t.get(i),i)}},enumerable:!0,configurable:!0}),e.prototype.get=function(t){return this._array[this._getCyclicIndex(t)]},e.prototype.set=function(t,e){this._array[this._getCyclicIndex(t)]=e},e.prototype.push=function(t){this._array[this._getCyclicIndex(this._length)]=t,this._length===this._maxLength?(this._startIndex++,this._startIndex===this._maxLength&&(this._startIndex=0),this.emit("trim",1)):this._length++},e.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},e.prototype.splice=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(e){for(var r=t;r<this._length-e;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+e)];this._length-=e}if(n&&n.length){for(r=this._length-1;r>=t;r--)this._array[this._getCyclicIndex(r+n.length)]=this._array[this._getCyclicIndex(r)];for(r=0;r<n.length;r++)this._array[this._getCyclicIndex(t+r)]=n[r];if(this._length+n.length>this.maxLength){var o=this._length+n.length-this.maxLength;this._startIndex+=o,this._length=this.maxLength,this.emit("trim",o)}else this._length+=n.length}},e.prototype.trimStart=function(t){t>this._length&&(t=this._length),this._startIndex+=t,this._length-=t,this.emit("trim",t)},e.prototype.shiftElements=function(t,e,n){if(!(e<=0)){if(t<0||t>=this._length)throw new Error("start argument out of range");if(t+n<0)throw new Error("Cannot shift elements in list beyond index 0");if(n>0){for(var i=e-1;i>=0;i--)this.set(t+i+n,this.get(t+i));var r=t+e+n-this._length;if(r>0)for(this._length+=r;this._length>this.maxLength;)this._length--,this._startIndex++,this.emit("trim",1)}else for(i=0;i<e;i++)this.set(t+i+n,this.get(t+i))}},e.prototype._getCyclicIndex=function(t){return(this._startIndex+t)%this.maxLength},e}(n(27).EventEmitter);e.CircularList=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e,n){this.textarea=t,this.compositionView=e,this.terminal=n,this.isComposing=!1,this.isSendingComposition=!1,this.compositionPosition={start:null,end:null}}return t.prototype.compositionstart=function(){this.isComposing=!0,this.compositionPosition.start=this.textarea.value.length,this.compositionView.textContent="",this.compositionView.classList.add("active")},t.prototype.compositionupdate=function(t){var e=this;this.compositionView.textContent=t.data,this.updateCompositionElements(),setTimeout(function(){e.compositionPosition.end=e.textarea.value.length},0)},t.prototype.compositionend=function(){this.finalizeComposition(!0)},t.prototype.keydown=function(t){if(this.isComposing||this.isSendingComposition){if(229===t.keyCode)return!1;if(16===t.keyCode||17===t.keyCode||18===t.keyCode)return!1;this.finalizeComposition(!1)}return 229!==t.keyCode||(this.handleAnyTextareaChanges(),!1)},t.prototype.finalizeComposition=function(t){var e=this;if(this.compositionView.classList.remove("active"),this.isComposing=!1,this.clearTextareaPosition(),t){var n={start:this.compositionPosition.start,end:this.compositionPosition.end};this.isSendingComposition=!0,setTimeout(function(){if(e.isSendingComposition){e.isSendingComposition=!1;var t=void 0;t=e.isComposing?e.textarea.value.substring(n.start,n.end):e.textarea.value.substring(n.start),e.terminal.handler(t)}},0)}else{this.isSendingComposition=!1;var i=this.textarea.value.substring(this.compositionPosition.start,this.compositionPosition.end);this.terminal.handler(i)}},t.prototype.handleAnyTextareaChanges=function(){var t=this,e=this.textarea.value;setTimeout(function(){if(!t.isComposing){var n=t.textarea.value.replace(e,"");n.length>0&&t.terminal.handler(n)}},0)},t.prototype.updateCompositionElements=function(t){var e=this;if(this.isComposing){if(this.terminal.buffer.isCursorInViewport){var n=Math.ceil(this.terminal.charMeasure.height*this.terminal.options.lineHeight),i=this.terminal.buffer.y*n,r=this.terminal.buffer.x*this.terminal.charMeasure.width;this.compositionView.style.left=r+"px",this.compositionView.style.top=i+"px",this.compositionView.style.height=n+"px",this.compositionView.style.lineHeight=n+"px";var o=this.compositionView.getBoundingClientRect();this.textarea.style.left=r+"px",this.textarea.style.top=i+"px",this.textarea.style.width=o.width+"px",this.textarea.style.height=o.height+"px",this.textarea.style.lineHeight=o.height+"px"}t||setTimeout(function(){return e.updateCompositionElements(!0)},0)}},t.prototype.clearTextareaPosition=function(){this.textarea.style.left="",this.textarea.style.top=""},t}();e.CompositionHelper=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e,n,i){var r=this;this.terminal=t,this.viewportElement=e,this.scrollArea=n,this.charMeasure=i,this.currentRowHeight=0,this.lastRecordedBufferLength=0,this.lastRecordedViewportHeight=0,this.lastRecordedBufferHeight=0,this.viewportElement.addEventListener("scroll",this.onScroll.bind(this)),setTimeout(function(){return r.syncScrollArea()},0)}return t.prototype.onThemeChanged=function(t){this.viewportElement.style.backgroundColor=t.background},t.prototype.refresh=function(){if(this.charMeasure.height>0){this.currentRowHeight=this.terminal.renderer.dimensions.scaledCellHeight/window.devicePixelRatio,this.lastRecordedViewportHeight!==this.terminal.renderer.dimensions.canvasHeight&&(this.lastRecordedViewportHeight=this.terminal.renderer.dimensions.canvasHeight,this.viewportElement.style.height=this.lastRecordedViewportHeight+"px");var t=Math.round(this.currentRowHeight*this.lastRecordedBufferLength);this.lastRecordedBufferHeight!==t&&(this.lastRecordedBufferHeight=t,this.scrollArea.style.height=this.lastRecordedBufferHeight+"px")}},t.prototype.syncScrollArea=function(){this.lastRecordedBufferLength!==this.terminal.buffer.lines.length?(this.lastRecordedBufferLength=this.terminal.buffer.lines.length,this.refresh()):this.lastRecordedViewportHeight!==this.terminal.renderer.dimensions.canvasHeight?this.refresh():this.terminal.renderer.dimensions.scaledCellHeight/window.devicePixelRatio!==this.currentRowHeight&&this.refresh();var t=this.terminal.buffer.ydisp*this.currentRowHeight;this.viewportElement.scrollTop!==t&&(this.viewportElement.scrollTop=t)},t.prototype.onScroll=function(t){var e=Math.round(this.viewportElement.scrollTop/this.currentRowHeight)-this.terminal.buffer.ydisp;this.terminal.scrollLines(e,!0)},t.prototype.onWheel=function(t){if(0!==t.deltaY){var e=1;t.deltaMode===WheelEvent.DOM_DELTA_LINE?e=this.currentRowHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e=this.currentRowHeight*this.terminal.rows),this.viewportElement.scrollTop+=t.deltaY*e,t.preventDefault()}},t.prototype.onTouchStart=function(t){this.lastTouchY=t.touches[0].pageY},t.prototype.onTouchMove=function(t){var e=this.lastTouchY-t.touches[0].pageY;this.lastTouchY=t.touches[0].pageY,0!==e&&(this.viewportElement.scrollTop+=e,t.preventDefault())},t}();e.Viewport=i},function(t,e,n){"use strict";function i(t,e){return e?t.replace(/\r?\n/g,"\r"):t}function r(t,e){return e?"\e[200~"+t+"\e[201~":t}function o(t,e){e.style.position="fixed",e.style.width="20px",e.style.height="20px",e.style.left=t.clientX-10+"px",e.style.top=t.clientY-10+"px",e.style.zIndex="1000",e.focus(),setTimeout(function(){e.style.position=null,e.style.width=null,e.style.height=null,e.style.left=null,e.style.top=null,e.style.zIndex=null},4)}Object.defineProperty(e,"__esModule",{value:!0}),e.prepareTextForTerminal=i,e.bracketTextForPaste=r,e.copyHandler=function(t,e,n){e.browser.isMSIE?window.clipboardData.setData("Text",n.selectionText):t.clipboardData.setData("text/plain",n.selectionText),t.preventDefault()},e.pasteHandler=function(t,e){t.stopPropagation();var n=function(n){n=r(n=i(n,e.browser.isMSWindows),e.bracketedPasteMode),e.handler(n),e.textarea.value="",e.emit("paste",n),e.cancel(t)};e.browser.isMSIE?window.clipboardData&&n(window.clipboardData.getData("Text")):t.clipboardData&&n(t.clipboardData.getData("text/plain"))},e.moveTextAreaUnderMouseCursor=o,e.rightClickHandler=function(t,e,n){o(t,e),e.value=n.selectionText,e.select()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(72),r=n(93),o=n(26),s=n(94),a=n(202),l=function(){function t(t){this._terminal=t}return t.prototype.addChar=function(t,e){if(t>=" "){var n=a.wcwidth(e);this._terminal.charset&&this._terminal.charset[t]&&(t=this._terminal.charset[t]);var i=this._terminal.buffer.y+this._terminal.buffer.ybase;if(!n&&this._terminal.buffer.x)return void(this._terminal.buffer.lines.get(i)[this._terminal.buffer.x-1]&&(this._terminal.buffer.lines.get(i)[this._terminal.buffer.x-1][o.CHAR_DATA_WIDTH_INDEX]?(this._terminal.buffer.lines.get(i)[this._terminal.buffer.x-1][o.CHAR_DATA_CHAR_INDEX]+=t,this._terminal.buffer.lines.get(i)[this._terminal.buffer.x-1][3]=t.charCodeAt(0)):this._terminal.buffer.lines.get(i)[this._terminal.buffer.x-2]&&(this._terminal.buffer.lines.get(i)[this._terminal.buffer.x-2][o.CHAR_DATA_CHAR_INDEX]+=t,this._terminal.buffer.lines.get(i)[this._terminal.buffer.x-2][3]=t.charCodeAt(0)),this._terminal.updateRange(this._terminal.buffer.y)));if(this._terminal.buffer.x+n-1>=this._terminal.cols)if(this._terminal.wraparoundMode)this._terminal.buffer.x=0,this._terminal.buffer.y++,this._terminal.buffer.y>this._terminal.buffer.scrollBottom?(this._terminal.buffer.y--,this._terminal.scroll(!0)):this._terminal.buffer.lines.get(this._terminal.buffer.y).isWrapped=!0;else if(2===n)return;if(i=this._terminal.buffer.y+this._terminal.buffer.ybase,this._terminal.insertMode)for(var r=0;r<n;++r){0===this._terminal.buffer.lines.get(this._terminal.buffer.y+this._terminal.buffer.ybase).pop()[o.CHAR_DATA_WIDTH_INDEX]&&this._terminal.buffer.lines.get(i)[this._terminal.cols-2]&&2===this._terminal.buffer.lines.get(i)[this._terminal.cols-2][o.CHAR_DATA_WIDTH_INDEX]&&(this._terminal.buffer.lines.get(i)[this._terminal.cols-2]=[this._terminal.curAttr," ",1," ".charCodeAt(0)]),this._terminal.buffer.lines.get(i).splice(this._terminal.buffer.x,0,[this._terminal.curAttr," ",1," ".charCodeAt(0)])}this._terminal.buffer.lines.get(i)[this._terminal.buffer.x]=[this._terminal.curAttr,t,n,t.charCodeAt(0)],this._terminal.buffer.x++,this._terminal.updateRange(this._terminal.buffer.y),2===n&&(this._terminal.buffer.lines.get(i)[this._terminal.buffer.x]=[this._terminal.curAttr,"",0,void 0],this._terminal.buffer.x++)}},t.prototype.bell=function(){this._terminal.bell()},t.prototype.lineFeed=function(){this._terminal.convertEol&&(this._terminal.buffer.x=0),this._terminal.buffer.y++,this._terminal.buffer.y>this._terminal.buffer.scrollBottom&&(this._terminal.buffer.y--,this._terminal.scroll()),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--,this._terminal.emit("linefeed")},t.prototype.carriageReturn=function(){this._terminal.buffer.x=0},t.prototype.backspace=function(){this._terminal.buffer.x>0&&this._terminal.buffer.x--},t.prototype.tab=function(){this._terminal.buffer.x=this._terminal.buffer.nextStop()},t.prototype.shiftOut=function(){this._terminal.setgLevel(1)},t.prototype.shiftIn=function(){this._terminal.setgLevel(0)},t.prototype.insertChars=function(t){var e=t[0];e<1&&(e=1);for(var n=this._terminal.buffer.y+this._terminal.buffer.ybase,i=this._terminal.buffer.x,r=[this._terminal.eraseAttr()," ",1,32];e--&&i<this._terminal.cols;)this._terminal.buffer.lines.get(n).splice(i++,0,r),this._terminal.buffer.lines.get(n).pop()},t.prototype.cursorUp=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y-=e,this._terminal.buffer.y<0&&(this._terminal.buffer.y=0)},t.prototype.cursorDown=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y+=e,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--},t.prototype.cursorForward=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x+=e,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.cursorBackward=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--,this._terminal.buffer.x-=e,this._terminal.buffer.x<0&&(this._terminal.buffer.x=0)},t.prototype.cursorNextLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y+=e,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x=0},t.prototype.cursorPrecedingLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y-=e,this._terminal.buffer.y<0&&(this._terminal.buffer.y=0),this._terminal.buffer.x=0},t.prototype.cursorCharAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x=e-1},t.prototype.cursorPosition=function(t){var e,n=t[0]-1;e=t.length>=2?t[1]-1:0,n<0?n=0:n>=this._terminal.rows&&(n=this._terminal.rows-1),e<0?e=0:e>=this._terminal.cols&&(e=this._terminal.cols-1),this._terminal.buffer.x=e,this._terminal.buffer.y=n},t.prototype.cursorForwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.x=this._terminal.buffer.nextStop()},t.prototype.eraseInDisplay=function(t){var e;switch(t[0]){case 0:for(this._terminal.eraseRight(this._terminal.buffer.x,this._terminal.buffer.y),e=this._terminal.buffer.y+1;e<this._terminal.rows;e++)this._terminal.eraseLine(e);break;case 1:for(this._terminal.eraseLeft(this._terminal.buffer.x,this._terminal.buffer.y),e=this._terminal.buffer.y;e--;)this._terminal.eraseLine(e);break;case 2:for(e=this._terminal.rows;e--;)this._terminal.eraseLine(e);break;case 3:var n=this._terminal.buffer.lines.length-this._terminal.rows;n>0&&(this._terminal.buffer.lines.trimStart(n),this._terminal.buffer.ybase=Math.max(this._terminal.buffer.ybase-n,0),this._terminal.buffer.ydisp=Math.max(this._terminal.buffer.ydisp-n,0),this._terminal.emit("scroll",0))}},t.prototype.eraseInLine=function(t){switch(t[0]){case 0:this._terminal.eraseRight(this._terminal.buffer.x,this._terminal.buffer.y);break;case 1:this._terminal.eraseLeft(this._terminal.buffer.x,this._terminal.buffer.y);break;case 2:this._terminal.eraseLine(this._terminal.buffer.y)}},t.prototype.insertLines=function(t){var e=t[0];e<1&&(e=1);for(var n=this._terminal.buffer.y+this._terminal.buffer.ybase,i=this._terminal.rows-1-this._terminal.buffer.scrollBottom,r=this._terminal.rows-1+this._terminal.buffer.ybase-i+1;e--;)this._terminal.buffer.lines.splice(r-1,1),this._terminal.buffer.lines.splice(n,0,this._terminal.blankLine(!0));this._terminal.updateRange(this._terminal.buffer.y),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.deleteLines=function(t){var e=t[0];e<1&&(e=1);var n,i=this._terminal.buffer.y+this._terminal.buffer.ybase;for(n=this._terminal.rows-1-this._terminal.buffer.scrollBottom,n=this._terminal.rows-1+this._terminal.buffer.ybase-n;e--;)this._terminal.buffer.lines.splice(i,1),this._terminal.buffer.lines.splice(n,0,this._terminal.blankLine(!0));this._terminal.updateRange(this._terminal.buffer.y),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.deleteChars=function(t){var e=t[0];e<1&&(e=1);for(var n=this._terminal.buffer.y+this._terminal.buffer.ybase,i=[this._terminal.eraseAttr()," ",1,32];e--;)this._terminal.buffer.lines.get(n).splice(this._terminal.buffer.x,1),this._terminal.buffer.lines.get(n).push(i);this._terminal.updateRange(this._terminal.buffer.y)},t.prototype.scrollUp=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollTop,1),this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollBottom,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.buffer.scrollTop),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.scrollDown=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollBottom,1),this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollTop,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.buffer.scrollTop),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.eraseChars=function(t){var e=t[0];e<1&&(e=1);for(var n=this._terminal.buffer.y+this._terminal.buffer.ybase,i=this._terminal.buffer.x,r=[this._terminal.eraseAttr()," ",1,32];e--&&i<this._terminal.cols;)this._terminal.buffer.lines.get(n)[i++]=r},t.prototype.cursorBackwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.x=this._terminal.buffer.prevStop()},t.prototype.charPosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x=e-1,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.HPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x+=e,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.repeatPrecedingCharacter=function(t){for(var e=t[0]||1,n=this._terminal.buffer.lines.get(this._terminal.buffer.ybase+this._terminal.buffer.y),i=n[this._terminal.buffer.x-1]||[this._terminal.defAttr," ",1,32];e--;)n[this._terminal.buffer.x++]=i},t.prototype.sendDeviceAttributes=function(t){t[0]>0||(this._terminal.prefix?">"===this._terminal.prefix&&(this._terminal.is("xterm")?this._terminal.send(i.C0.ESC+"[>0;276;0c"):this._terminal.is("rxvt-unicode")?this._terminal.send(i.C0.ESC+"[>85;95;0c"):this._terminal.is("linux")?this._terminal.send(t[0]+"c"):this._terminal.is("screen")&&this._terminal.send(i.C0.ESC+"[>83;40003;0c")):this._terminal.is("xterm")||this._terminal.is("rxvt-unicode")||this._terminal.is("screen")?this._terminal.send(i.C0.ESC+"[?1;2c"):this._terminal.is("linux")&&this._terminal.send(i.C0.ESC+"[?6c"))},t.prototype.linePosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y=e-1,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1)},t.prototype.VPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y+=e,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--},t.prototype.HVPosition=function(t){t[0]<1&&(t[0]=1),t[1]<1&&(t[1]=1),this._terminal.buffer.y=t[0]-1,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x=t[1]-1,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.tabClear=function(t){var e=t[0];e<=0?delete this._terminal.buffer.tabs[this._terminal.buffer.x]:3===e&&(this._terminal.buffer.tabs={})},t.prototype.setMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.setMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!0;break;case 2:this._terminal.setgCharset(0,r.DEFAULT_CHARSET),this._terminal.setgCharset(1,r.DEFAULT_CHARSET),this._terminal.setgCharset(2,r.DEFAULT_CHARSET),this._terminal.setgCharset(3,r.DEFAULT_CHARSET);break;case 3:this._terminal.savedCols=this._terminal.cols,this._terminal.resize(132,this._terminal.rows);break;case 6:this._terminal.originMode=!0;break;case 7:this._terminal.wraparoundMode=!0;break;case 12:break;case 66:this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=9===t[0],this._terminal.vt200Mouse=1e3===t[0],this._terminal.normalMouse=t[0]>1e3,this._terminal.mouseEvents=!0,this._terminal.element.classList.add("enable-mouse-events"),this._terminal.selectionManager.disable(),this._terminal.log("Binding to mouse events.");break;case 1004:this._terminal.sendFocus=!0;break;case 1005:this._terminal.utfMouse=!0;break;case 1006:this._terminal.sgrMouse=!0;break;case 1015:this._terminal.urxvtMouse=!0;break;case 25:this._terminal.cursorHidden=!1;break;case 1049:case 47:case 1047:this._terminal.buffers.activateAltBuffer(),this._terminal.selectionManager.setBuffer(this._terminal.buffer),this._terminal.viewport.syncScrollArea(),this._terminal.showCursor();break;case 2004:this._terminal.bracketedPasteMode=!0}}else switch(t[0]){case 4:this._terminal.insertMode=!0}},t.prototype.resetMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.resetMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!1;break;case 3:132===this._terminal.cols&&this._terminal.savedCols&&this._terminal.resize(this._terminal.savedCols,this._terminal.rows),delete this._terminal.savedCols;break;case 6:this._terminal.originMode=!1;break;case 7:this._terminal.wraparoundMode=!1;break;case 12:break;case 66:this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=!1,this._terminal.vt200Mouse=!1,this._terminal.normalMouse=!1,this._terminal.mouseEvents=!1,this._terminal.element.classList.remove("enable-mouse-events"),this._terminal.selectionManager.enable();break;case 1004:this._terminal.sendFocus=!1;break;case 1005:this._terminal.utfMouse=!1;break;case 1006:this._terminal.sgrMouse=!1;break;case 1015:this._terminal.urxvtMouse=!1;break;case 25:this._terminal.cursorHidden=!0;break;case 1049:case 47:case 1047:this._terminal.buffers.activateNormalBuffer(),this._terminal.selectionManager.setBuffer(this._terminal.buffer),this._terminal.refresh(0,this._terminal.rows-1),this._terminal.viewport.syncScrollArea(),this._terminal.showCursor();break;case 2004:this._terminal.bracketedPasteMode=!1}}else switch(t[0]){case 4:this._terminal.insertMode=!1}},t.prototype.charAttributes=function(t){if(1!==t.length||0!==t[0]){for(var e,n=t.length,i=this._terminal.curAttr>>18,r=this._terminal.curAttr>>9&511,o=511&this._terminal.curAttr,a=0;a<n;a++)(e=t[a])>=30&&e<=37?r=e-30:e>=40&&e<=47?o=e-40:e>=90&&e<=97?r=(e+=8)-90:e>=100&&e<=107?o=(e+=8)-100:0===e?(i=this._terminal.defAttr>>18,r=this._terminal.defAttr>>9&511,o=511&this._terminal.defAttr):1===e?i|=s.FLAGS.BOLD:4===e?i|=s.FLAGS.UNDERLINE:5===e?i|=s.FLAGS.BLINK:7===e?i|=s.FLAGS.INVERSE:8===e?i|=s.FLAGS.INVISIBLE:2===e?i|=s.FLAGS.DIM:22===e?(i&=~s.FLAGS.BOLD,i&=~s.FLAGS.DIM):24===e?i&=~s.FLAGS.UNDERLINE:25===e?i&=~s.FLAGS.BLINK:27===e?i&=~s.FLAGS.INVERSE:28===e?i&=~s.FLAGS.INVISIBLE:39===e?r=this._terminal.defAttr>>9&511:49===e?o=511&this._terminal.defAttr:38===e?2===t[a+1]?(a+=2,-1===(r=this._terminal.matchColor(255&t[a],255&t[a+1],255&t[a+2]))&&(r=511),a+=2):5===t[a+1]&&(r=e=255&t[a+=2]):48===e?2===t[a+1]?(a+=2,-1===(o=this._terminal.matchColor(255&t[a],255&t[a+1],255&t[a+2]))&&(o=511),a+=2):5===t[a+1]&&(o=e=255&t[a+=2]):100===e?(r=this._terminal.defAttr>>9&511,o=511&this._terminal.defAttr):this._terminal.error("Unknown SGR attribute: %d.",e);this._terminal.curAttr=i<<18|r<<9|o}else this._terminal.curAttr=this._terminal.defAttr},t.prototype.deviceStatus=function(t){if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 6:this._terminal.send(i.C0.ESC+"[?"+(this._terminal.buffer.y+1)+";"+(this._terminal.buffer.x+1)+"R")}}else switch(t[0]){case 5:this._terminal.send(i.C0.ESC+"[0n");break;case 6:this._terminal.send(i.C0.ESC+"["+(this._terminal.buffer.y+1)+";"+(this._terminal.buffer.x+1)+"R")}},t.prototype.softReset=function(t){this._terminal.cursorHidden=!1,this._terminal.insertMode=!1,this._terminal.originMode=!1,this._terminal.wraparoundMode=!0,this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea(),this._terminal.applicationCursor=!1,this._terminal.buffer.scrollTop=0,this._terminal.buffer.scrollBottom=this._terminal.rows-1,this._terminal.curAttr=this._terminal.defAttr,this._terminal.buffer.x=this._terminal.buffer.y=0,this._terminal.charset=null,this._terminal.glevel=0,this._terminal.charsets=[null]},t.prototype.setCursorStyle=function(t){var e=t[0]<1?1:t[0];switch(e){case 1:case 2:this._terminal.setOption("cursorStyle","block");break;case 3:case 4:this._terminal.setOption("cursorStyle","underline");break;case 5:case 6:this._terminal.setOption("cursorStyle","bar")}var n=e%2==1;this._terminal.setOption("cursorBlink",n)},t.prototype.setScrollRegion=function(t){this._terminal.prefix||(this._terminal.buffer.scrollTop=(t[0]||1)-1,this._terminal.buffer.scrollBottom=(t[1]&&t[1]<=this._terminal.rows?t[1]:this._terminal.rows)-1,this._terminal.buffer.x=0,this._terminal.buffer.y=0)},t.prototype.saveCursor=function(t){this._terminal.buffer.savedX=this._terminal.buffer.x,this._terminal.buffer.savedY=this._terminal.buffer.y},t.prototype.restoreCursor=function(t){this._terminal.buffer.x=this._terminal.buffer.savedX||0,this._terminal.buffer.y=this._terminal.buffer.savedY||0},t}();e.InputHandler=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wcwidth=function(t){var e=[[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]],n=[[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]];function i(t,e){var n,i=0,r=e.length-1;if(t<e[0][0]||t>e[r][1])return!1;for(;r>=i;)if(t>e[n=i+r>>1][1])i=n+1;else{if(!(t<e[n][0]))return!0;r=n-1}return!1}var r=0|t.control,o=null;return function(s){if((s|=0)<32)return 0|r;if(s<127)return 1;var a,l=o||function(){var n,r;o="undefined"==typeof Uint32Array?new Array(4096):new Uint32Array(4096);for(var s=0;s<4096;++s){for(var a=0,l=16;l--;)a=a<<2|(n=16*s+l,r=void 0,0===n?t.nul:n<32||n>=127&&n<160?t.control:i(n,e)?0:(r=n)>=4352&&(r<=4447||9001===r||9002===r||r>=11904&&r<=42191&&12351!==r||r>=44032&&r<=55203||r>=63744&&r<=64255||r>=65040&&r<=65049||r>=65072&&r<=65135||r>=65280&&r<=65376||r>=65504&&r<=65510)?2:1);o[s]=a}return o}();return s<65536?l[s>>4]>>((15&s)<<1)&3:i(a=s,n)?0:a>=131072&&a<=196605||a>=196608&&a<=262141?2:1}}({nul:0,control:0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(72),r=n(93),o={};o[i.C0.BEL]=function(t,e){return e.bell()},o[i.C0.LF]=function(t,e){return e.lineFeed()},o[i.C0.VT]=o[i.C0.LF],o[i.C0.FF]=o[i.C0.LF],o[i.C0.CR]=function(t,e){return e.carriageReturn()},o[i.C0.BS]=function(t,e){return e.backspace()},o[i.C0.HT]=function(t,e){return e.tab()},o[i.C0.SO]=function(t,e){return e.shiftOut()},o[i.C0.SI]=function(t,e){return e.shiftIn()},o[i.C0.ESC]=function(t,e){return t.setState(l.ESCAPED)};var s={"[":function(t,e){e.params=[],e.currentParam=0,t.setState(l.CSI_PARAM)},"]":function(t,e){e.params=[],e.currentParam=0,t.setState(l.OSC)},P:function(t,e){e.params=[],e.currentParam=0,t.setState(l.DCS)},_:function(t,e){t.setState(l.IGNORE)},"^":function(t,e){t.setState(l.IGNORE)},c:function(t,e){e.reset()},E:function(t,e){e.buffer.x=0,e.index(),t.setState(l.NORMAL)},D:function(t,e){e.index(),t.setState(l.NORMAL)},M:function(t,e){e.reverseIndex(),t.setState(l.NORMAL)},"%":function(t,e){e.setgLevel(0),e.setgCharset(0,r.DEFAULT_CHARSET),t.setState(l.NORMAL),t.skipNextChar()}};s[i.C0.CAN]=function(t){return t.setState(l.NORMAL)};var a={"?":function(t){return t.setPrefix("?")},">":function(t){return t.setPrefix(">")},"!":function(t){return t.setPrefix("!")},0:function(t){return t.setParam(10*t.getParam())},1:function(t){return t.setParam(10*t.getParam()+1)},2:function(t){return t.setParam(10*t.getParam()+2)},3:function(t){return t.setParam(10*t.getParam()+3)},4:function(t){return t.setParam(10*t.getParam()+4)},5:function(t){return t.setParam(10*t.getParam()+5)},6:function(t){return t.setParam(10*t.getParam()+6)},7:function(t){return t.setParam(10*t.getParam()+7)},8:function(t){return t.setParam(10*t.getParam()+8)},9:function(t){return t.setParam(10*t.getParam()+9)},$:function(t){return t.setPostfix("$")},'"':function(t){return t.setPostfix('"')}," ":function(t){return t.setPostfix(" ")},"'":function(t){return t.setPostfix("'")},";":function(t){return t.finalizeParam()}};a[i.C0.CAN]=function(t){return t.setState(l.NORMAL)};var l,c,u={};u["@"]=function(t,e,n){return t.insertChars(e)},u.A=function(t,e,n){return t.cursorUp(e)},u.B=function(t,e,n){return t.cursorDown(e)},u.C=function(t,e,n){return t.cursorForward(e)},u.D=function(t,e,n){return t.cursorBackward(e)},u.E=function(t,e,n){return t.cursorNextLine(e)},u.F=function(t,e,n){return t.cursorPrecedingLine(e)},u.G=function(t,e,n){return t.cursorCharAbsolute(e)},u.H=function(t,e,n){return t.cursorPosition(e)},u.I=function(t,e,n){return t.cursorForwardTab(e)},u.J=function(t,e,n){return t.eraseInDisplay(e)},u.K=function(t,e,n){return t.eraseInLine(e)},u.L=function(t,e,n){return t.insertLines(e)},u.M=function(t,e,n){return t.deleteLines(e)},u.P=function(t,e,n){return t.deleteChars(e)},u.S=function(t,e,n){return t.scrollUp(e)},u.T=function(t,e,n){e.length<2&&!n&&t.scrollDown(e)},u.X=function(t,e,n){return t.eraseChars(e)},u.Z=function(t,e,n){return t.cursorBackwardTab(e)},u["`"]=function(t,e,n){return t.charPosAbsolute(e)},u.a=function(t,e,n){return t.HPositionRelative(e)},u.b=function(t,e,n){return t.repeatPrecedingCharacter(e)},u.c=function(t,e,n){return t.sendDeviceAttributes(e)},u.d=function(t,e,n){return t.linePosAbsolute(e)},u.e=function(t,e,n){return t.VPositionRelative(e)},u.f=function(t,e,n){return t.HVPosition(e)},u.g=function(t,e,n){return t.tabClear(e)},u.h=function(t,e,n){return t.setMode(e)},u.l=function(t,e,n){return t.resetMode(e)},u.m=function(t,e,n){return t.charAttributes(e)},u.n=function(t,e,n){return t.deviceStatus(e)},u.p=function(t,e,n){switch(n){case"!":t.softReset(e)}},u.q=function(t,e,n,i){" "===i&&t.setCursorStyle(e)},u.r=function(t,e){return t.setScrollRegion(e)},u.s=function(t,e){return t.saveCursor(e)},u.u=function(t,e){return t.restoreCursor(e)},u[i.C0.CAN]=function(t,e,n,i,r){return r.setState(l.NORMAL)},(c=l=e.ParserState||(e.ParserState={}))[c.NORMAL=0]="NORMAL",c[c.ESCAPED=1]="ESCAPED",c[c.CSI_PARAM=2]="CSI_PARAM",c[c.CSI=3]="CSI",c[c.OSC=4]="OSC",c[c.CHARSET=5]="CHARSET",c[c.DCS=6]="DCS",c[c.IGNORE=7]="IGNORE";var h=function(){function t(t,e){this._inputHandler=t,this._terminal=e,this._state=l.NORMAL}return t.prototype.parse=function(t){var e,n,c,h,f=t.length,_=this._terminal.buffer.x,p=this._terminal.buffer.y;for(this._terminal.debug&&this._terminal.log("data: "+t),this._position=0,this._terminal.surrogate_high&&(t=this._terminal.surrogate_high+t,this._terminal.surrogate_high="");this._position<f;this._position++){if(n=t[this._position],55296<=(c=t.charCodeAt(this._position))&&c<=56319){if(h=t.charCodeAt(this._position+1),isNaN(h)){this._terminal.surrogate_high=n;continue}c=1024*(c-55296)+(h-56320)+65536,n+=t.charAt(this._position+1)}if(!(56320<=c&&c<=57343))switch(this._state){case l.NORMAL:n in o?o[n](this,this._inputHandler):this._inputHandler.addChar(n,c);break;case l.ESCAPED:if(n in s){s[n](this,this._terminal);break}switch(n){case"(":case")":case"*":case"+":case"-":case".":switch(n){case"(":this._terminal.gcharset=0;break;case")":this._terminal.gcharset=1;break;case"*":this._terminal.gcharset=2;break;case"+":this._terminal.gcharset=3;break;case"-":this._terminal.gcharset=1;break;case".":this._terminal.gcharset=2}this._state=l.CHARSET;break;case"/":this._terminal.gcharset=3,this._state=l.CHARSET,this._position--;break;case"N":case"O":break;case"n":this._terminal.setgLevel(2);break;case"o":case"|":this._terminal.setgLevel(3);break;case"}":this._terminal.setgLevel(2);break;case"~":this._terminal.setgLevel(1);break;case"7":this._inputHandler.saveCursor(),this._state=l.NORMAL;break;case"8":this._inputHandler.restoreCursor(),this._state=l.NORMAL;break;case"#":this._state=l.NORMAL,this._position++;break;case"H":this._terminal.tabSet(),this._state=l.NORMAL;break;case"=":this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport&&this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;case">":this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport&&this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;default:this._state=l.NORMAL,this._terminal.error("Unknown ESC control: %s.",n)}break;case l.CHARSET:n in r.CHARSETS?(e=r.CHARSETS[n],"/"===n&&this.skipNextChar()):e=r.DEFAULT_CHARSET,this._terminal.setgCharset(this._terminal.gcharset,e),this._terminal.gcharset=null,this._state=l.NORMAL;break;case l.OSC:if(n===i.C0.ESC||n===i.C0.BEL){switch(n===i.C0.ESC&&this._position++,this._terminal.params.push(this._terminal.currentParam),this._terminal.params[0]){case 0:case 1:case 2:this._terminal.params[1]&&(this._terminal.title=this._terminal.params[1],this._terminal.handleTitle(this._terminal.title))}this._terminal.params=[],this._terminal.currentParam=0,this._state=l.NORMAL}else this._terminal.params.length?this._terminal.currentParam+=n:n>="0"&&n<="9"?this._terminal.currentParam=10*this._terminal.currentParam+n.charCodeAt(0)-48:";"===n&&(this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam="");break;case l.CSI_PARAM:if(n in a){a[n](this);break}this.finalizeParam(),this._state=l.CSI;case l.CSI:n in u?(this._terminal.debug&&this._terminal.log("CSI "+(this._terminal.prefix?this._terminal.prefix:"")+" "+(this._terminal.params?this._terminal.params.join(";"):"")+" "+(this._terminal.postfix?this._terminal.postfix:"")+" "+n),u[n](this._inputHandler,this._terminal.params,this._terminal.prefix,this._terminal.postfix,this)):this._terminal.error("Unknown CSI code: %s.",n),this._state=l.NORMAL,this._terminal.prefix="",this._terminal.postfix="";break;case l.DCS:if(n===i.C0.ESC||n===i.C0.BEL){n===i.C0.ESC&&this._position++;var d=void 0,m=void 0;switch(this._terminal.prefix){case"":break;case"$q":switch(m=!1,d=this._terminal.currentParam){case'"q':d='0"q';break;case'"p':d='61"p';break;case"r":d=this._terminal.buffer.scrollTop+1+";"+(this._terminal.buffer.scrollBottom+1)+"r";break;case"m":d="0m";break;default:this._terminal.error("Unknown DCS Pt: %s.",d),d=""}this._terminal.send(i.C0.ESC+"P"+ +m+"$r"+d+i.C0.ESC+"\\");break;case"+p":break;case"+q":d=this._terminal.currentParam,m=!1,this._terminal.send(i.C0.ESC+"P"+ +m+"+r"+d+i.C0.ESC+"\\");break;default:this._terminal.error("Unknown DCS prefix: %s.",this._terminal.prefix)}this._terminal.currentParam=0,this._terminal.prefix="",this._state=l.NORMAL}else this._terminal.currentParam?this._terminal.currentParam+=n:this._terminal.prefix||"$"===n||"+"===n?2===this._terminal.prefix.length?this._terminal.currentParam=n:this._terminal.prefix+=n:this._terminal.currentParam=n;break;case l.IGNORE:n!==i.C0.ESC&&n!==i.C0.BEL||(n===i.C0.ESC&&this._position++,this._state=l.NORMAL)}}return this._terminal.buffer.x===_&&this._terminal.buffer.y===p||this._terminal.emit("cursormove"),this._state},t.prototype.setState=function(t){this._state=t},t.prototype.setPrefix=function(t){this._terminal.prefix=t},t.prototype.setPostfix=function(t){this._terminal.postfix=t},t.prototype.setParam=function(t){this._terminal.currentParam=t},t.prototype.getParam=function(){return this._terminal.currentParam},t.prototype.finalizeParam=function(){this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam=0},t.prototype.skipNextChar=function(){this._position++},t}();e.Parser=h},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(205),s=n(208),a=n(209),l=n(96),c=n(210),u=function(t){function e(e,n){var i=t.call(this)||this;return i._terminal=e,i._refreshRowsQueue=[],i._refreshAnimationFrame=null,i.colorManager=new l.ColorManager,n&&i.colorManager.setTheme(n),i._renderLayers=[new o.TextRenderLayer(i._terminal.element,0,i.colorManager.colors),new s.SelectionRenderLayer(i._terminal.element,1,i.colorManager.colors),new c.LinkRenderLayer(i._terminal.element,2,i.colorManager.colors,i._terminal),new a.CursorRenderLayer(i._terminal.element,3,i.colorManager.colors)],i.dimensions={scaledCharWidth:null,scaledCharHeight:null,scaledCellWidth:null,scaledCellHeight:null,scaledCharLeft:null,scaledCharTop:null,scaledCanvasWidth:null,scaledCanvasHeight:null,canvasWidth:null,canvasHeight:null,actualCellWidth:null,actualCellHeight:null},i._devicePixelRatio=window.devicePixelRatio,i._updateDimensions(),i}return r(e,t),e.prototype.onWindowResize=function(t){this._devicePixelRatio!==t&&(this._devicePixelRatio=t,this.onResize(this._terminal.cols,this._terminal.rows,!0))},e.prototype.setTheme=function(t){var e=this;return this.colorManager.setTheme(t),this._renderLayers.forEach(function(t){t.onThemeChanged(e._terminal,e.colorManager.colors),t.reset(e._terminal)}),this._terminal.refresh(0,this._terminal.rows-1),this.colorManager.colors},e.prototype.onResize=function(t,e,n){var i=this;this._updateDimensions(),this._renderLayers.forEach(function(t){return t.resize(i._terminal,i.dimensions,n)}),this._terminal.refresh(0,this._terminal.rows-1),this.emit("resize",{width:this.dimensions.canvasWidth,height:this.dimensions.canvasHeight})},e.prototype.onCharSizeChanged=function(){this.onResize(this._terminal.cols,this._terminal.rows,!0)},e.prototype.onBlur=function(){var t=this;this._renderLayers.forEach(function(e){return e.onBlur(t._terminal)})},e.prototype.onFocus=function(){var t=this;this._renderLayers.forEach(function(e){return e.onFocus(t._terminal)})},e.prototype.onSelectionChanged=function(t,e){var n=this;this._renderLayers.forEach(function(i){return i.onSelectionChanged(n._terminal,t,e)})},e.prototype.onCursorMove=function(){var t=this;this._renderLayers.forEach(function(e){return e.onCursorMove(t._terminal)})},e.prototype.onOptionsChanged=function(){var t=this;this._renderLayers.forEach(function(e){return e.onOptionsChanged(t._terminal)})},e.prototype.clear=function(){var t=this;this._renderLayers.forEach(function(e){return e.reset(t._terminal)})},e.prototype.queueRefresh=function(t,e){this._refreshRowsQueue.push({start:t,end:e}),this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this)))},e.prototype._refreshLoop=function(){var t,e,n=this;if(this._refreshRowsQueue.length>4)t=0,e=this._terminal.rows-1;else{t=this._refreshRowsQueue[0].start,e=this._refreshRowsQueue[0].end;for(var i=1;i<this._refreshRowsQueue.length;i++)this._refreshRowsQueue[i].start<t&&(t=this._refreshRowsQueue[i].start),this._refreshRowsQueue[i].end>e&&(e=this._refreshRowsQueue[i].end)}this._refreshRowsQueue=[],this._refreshAnimationFrame=null,t=Math.max(t,0),e=Math.min(e,this._terminal.rows-1),this._renderLayers.forEach(function(i){return i.onGridChanged(n._terminal,t,e)}),this._terminal.emit("refresh",{start:t,end:e})},e.prototype._updateDimensions=function(){this._terminal.charMeasure.width&&this._terminal.charMeasure.height&&(this.dimensions.scaledCharWidth=Math.floor(this._terminal.charMeasure.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._terminal.charMeasure.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._terminal.options.lineHeight),this.dimensions.scaledCharTop=1===this._terminal.options.lineHeight?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._terminal.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._terminal.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._terminal.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._terminal.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._terminal.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._terminal.cols)},e}(n(27).EventEmitter);e.Renderer=u},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(26),s=n(94),a=n(206),l=n(51),c=function(t){function e(e,n,i){var r=t.call(this,e,"text",n,!1,i)||this;return r._characterOverlapCache={},r._state=new a.GridCache,r}return r(e,t),e.prototype.resize=function(e,n,i){t.prototype.resize.call(this,e,n,i);var r=e.options.fontSize*window.devicePixelRatio+"px "+e.options.fontFamily;this._characterWidth===n.scaledCharWidth&&this._characterFont===r||(this._characterWidth=n.scaledCharWidth,this._characterFont=r,this._characterOverlapCache={}),this._state.clear(),this._state.resize(e.cols,e.rows)},e.prototype.reset=function(t){this._state.clear(),this.clearAll()},e.prototype.onGridChanged=function(t,e,n){if(0!==this._state.cache.length)for(var i=e;i<=n;i++){var r=i+t.buffer.ydisp,a=t.buffer.lines.get(r);this.clearCells(0,i,t.cols,1);for(var c=0;c<t.cols;c++){var u=a[c],h=u[o.CHAR_DATA_CODE_INDEX],f=u[o.CHAR_DATA_CHAR_INDEX],_=u[o.CHAR_DATA_ATTR_INDEX],p=u[o.CHAR_DATA_WIDTH_INDEX];if(0!==p){if(32===h&&c>0){var d=a[c-1];if(this._isOverlapping(d))continue}var m=_>>18,y=511&_,v=y>=256,b=m&s.FLAGS.INVISIBLE,g=m&s.FLAGS.INVERSE;if(h&&(32!==h||!v||g)&&!b){0!==p&&this._isOverlapping(u)&&c<a.length-1&&32===a[c+1][o.CHAR_DATA_CODE_INDEX]&&(p=2);var C=_>>9&511;if(g){var w=y;y=C,256===(C=w)&&(C=l.INVERTED_DEFAULT_COLOR),257===y&&(y=l.INVERTED_DEFAULT_COLOR)}y<256&&(this._ctx.save(),this._ctx.fillStyle=y===l.INVERTED_DEFAULT_COLOR?this._colors.foreground:this._colors.ansi[y],this.fillCells(c,i,p,1),this._ctx.restore()),this._ctx.save(),m&s.FLAGS.BOLD&&(this._ctx.font="bold "+this._ctx.font,C<8&&(C+=8)),m&s.FLAGS.UNDERLINE&&(C===l.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background:this._ctx.fillStyle=C<256?this._colors.ansi[C]:this._colors.foreground,this.fillBottomLineAtCells(c,i)),this.drawChar(t,f,h,p,c,i,C,y,!!(m&s.FLAGS.BOLD),!!(m&s.FLAGS.DIM)),this._ctx.restore()}}}}},e.prototype._isOverlapping=function(t){if(1!==t[o.CHAR_DATA_WIDTH_INDEX])return!1;if(t[o.CHAR_DATA_CODE_INDEX]<256)return!1;var e=t[o.CHAR_DATA_CHAR_INDEX];if(this._characterOverlapCache.hasOwnProperty(e))return this._characterOverlapCache[e];this._ctx.save(),this._ctx.font=this._characterFont;var n=Math.floor(this._ctx.measureText(e).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[e]=n,n},e.prototype._clearChar=function(t,e){var n=1,i=this._state.cache[t][e];i&&2===i[o.CHAR_DATA_WIDTH_INDEX]&&(n=2),this.clearCells(t,e,n,1)},e}(l.BaseRenderLayer);e.TextRenderLayer=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this.cache=[]}return t.prototype.resize=function(t,e){for(var n=0;n<t;n++){this.cache.length<=n&&this.cache.push([]);for(var i=this.cache[n].length;i<e;i++)this.cache[n].push(null);this.cache[n].length=e}this.cache.length=t},t.prototype.clear=function(){for(var t=0;t<this.cache.length;t++)for(var e=0;e<this.cache[t].length;e++)this.cache[t][e]=null},t}();e.GridCache=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.contains=function(t,e){return t.indexOf(e)>=0}},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e,n,i){var r=t.call(this,e,"selection",n,!0,i)||this;return r._state={start:null,end:null},r}return r(e,t),e.prototype.resize=function(e,n,i){t.prototype.resize.call(this,e,n,i),this._state={start:null,end:null}},e.prototype.reset=function(t){this._state.start&&this._state.end&&(this._state={start:null,end:null},this.clearAll())},e.prototype.onSelectionChanged=function(t,e,n){if(this._state.start!==e&&this._state.end!==n&&(this.clearAll(),e&&n)){var i=e[1]-t.buffer.ydisp,r=n[1]-t.buffer.ydisp,o=Math.max(i,0),s=Math.min(r,t.rows-1);if(!(o>=t.rows||s<0)){var a=i===o?e[0]:0,l=o===s?n[0]:t.cols;this._ctx.fillStyle=this._colors.selection,this.fillCells(a,o,l-a,1);var c=Math.max(s-o-1,0);if(this.fillCells(0,o+1,t.cols,c),o!==s){var u=r===s?n[0]:t.cols;this.fillCells(0,s,u,1)}this._state.start=[e[0],e[1]],this._state.end=[n[0],n[1]]}}},e}(n(51).BaseRenderLayer);e.SelectionRenderLayer=o},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(26),s=function(t){function e(e,n,i){var r=t.call(this,e,"cursor",n,!0,i)||this;return r._state={x:null,y:null,isFocused:null,style:null,width:null},r._cursorRenderers={bar:r._renderBarCursor.bind(r),block:r._renderBlockCursor.bind(r),underline:r._renderUnderlineCursor.bind(r)},r}return r(e,t),e.prototype.resize=function(e,n,i){t.prototype.resize.call(this,e,n,i),this._state={x:null,y:null,isFocused:null,style:null,width:null}},e.prototype.reset=function(t){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=null,this.onOptionsChanged(t))},e.prototype.onBlur=function(t){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),t.refresh(t.buffer.y,t.buffer.y)},e.prototype.onFocus=function(t){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume(t):t.refresh(t.buffer.y,t.buffer.y)},e.prototype.onOptionsChanged=function(t){var e=this;t.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new a(t,function(){e._render(t,!0)})):(this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=null),t.refresh(t.buffer.y,t.buffer.y))},e.prototype.onCursorMove=function(t){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation(t)},e.prototype.onGridChanged=function(t,e,n){this._cursorBlinkStateManager&&!this._cursorBlinkStateManager.isPaused||this._render(t,!1)},e.prototype._render=function(t,e){if(t.cursorState&&!t.cursorHidden){var n=t.buffer.ybase+t.buffer.y,i=n-t.buffer.ydisp;if(i<0||i>=t.rows)this._clearCursor();else{var r=t.buffer.lines.get(n)[t.buffer.x];if(r){if(!t.isFocused)return this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor,this._renderBlurCursor(t,t.buffer.x,i,r),this._ctx.restore(),this._state.x=t.buffer.x,this._state.y=i,this._state.isFocused=!1,this._state.style=t.options.cursorStyle,void(this._state.width=r[o.CHAR_DATA_WIDTH_INDEX]);if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===t.buffer.x&&this._state.y===i&&this._state.isFocused===t.isFocused&&this._state.style===t.options.cursorStyle&&this._state.width===r[o.CHAR_DATA_WIDTH_INDEX])return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[t.options.cursorStyle||"block"](t,t.buffer.x,i,r),this._ctx.restore(),this._state.x=t.buffer.x,this._state.y=i,this._state.isFocused=!1,this._state.style=t.options.cursorStyle,this._state.width=r[o.CHAR_DATA_WIDTH_INDEX]}else this._clearCursor()}}}else this._clearCursor()},e.prototype._clearCursor=function(){this._state&&(this.clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:null,y:null,isFocused:null,style:null,width:null})},e.prototype._renderBarCursor=function(t,e,n,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor,this.fillLeftLineAtCell(e,n),this._ctx.restore()},e.prototype._renderBlockCursor=function(t,e,n,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor,this.fillCells(e,n,i[o.CHAR_DATA_WIDTH_INDEX],1),this._ctx.fillStyle=this._colors.cursorAccent,this.fillCharTrueColor(t,i,e,n),this._ctx.restore()},e.prototype._renderUnderlineCursor=function(t,e,n,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor,this.fillBottomLineAtCells(e,n),this._ctx.restore()},e.prototype._renderBlurCursor=function(t,e,n,i){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor,this.strokeRectAtCell(e,n,i[o.CHAR_DATA_WIDTH_INDEX],1),this._ctx.restore()},e}(n(51).BaseRenderLayer);e.CursorRenderLayer=s;var a=function(){function t(t,e){this.renderCallback=e,this.isCursorVisible=!0,t.isFocused&&this._restartInterval()}return Object.defineProperty(t.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=null),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=null),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=null)},t.prototype.restartBlinkAnimation=function(t){var e=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){e.renderCallback(),e._animationFrame=null})))},t.prototype._restartInterval=function(t){var e=this;void 0===t&&(t=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=setTimeout(function(){if(e._animationTimeRestarted){var t=600-(Date.now()-e._animationTimeRestarted);if(e._animationTimeRestarted=null,t>0)return void e._restartInterval(t)}e.isCursorVisible=!1,e._animationFrame=window.requestAnimationFrame(function(){e.renderCallback(),e._animationFrame=null}),e._blinkInterval=setInterval(function(){if(e._animationTimeRestarted){var t=600-(Date.now()-e._animationTimeRestarted);return e._animationTimeRestarted=null,void e._restartInterval(t)}e.isCursorVisible=!e.isCursorVisible,e._animationFrame=window.requestAnimationFrame(function(){e.renderCallback(),e._animationFrame=null})},600)},t)},t.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=null),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=null),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=null)},t.prototype.resume=function(t){this._animationTimeRestarted=null,this._restartInterval(),this.restartBlinkAnimation(t)},t}()},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(51),s=n(97),a=function(t){function e(e,n,i,r){var o=t.call(this,e,"link",n,!0,i)||this;return o._state=null,r.linkifier.on(s.LinkHoverEventTypes.HOVER,function(t){return o._onLinkHover(t)}),r.linkifier.on(s.LinkHoverEventTypes.LEAVE,function(t){return o._onLinkLeave(t)}),o}return r(e,t),e.prototype.resize=function(e,n,i){t.prototype.resize.call(this,e,n,i),this._state=null},e.prototype.reset=function(t){this._clearCurrentLink()},e.prototype._clearCurrentLink=function(){this._state&&(this.clearCells(this._state.x,this._state.y,this._state.length,1),this._state=null)},e.prototype._onLinkHover=function(t){this._ctx.fillStyle=this._colors.foreground,this.fillBottomLineAtCells(t.x,t.y,t.length),this._state=t},e.prototype._onLinkLeave=function(t){this._clearCurrentLink()},e}(o.BaseRenderLayer);e.LinkRenderLayer=a},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(97),s=n(98),a=n(27),l=new RegExp("(?:^|[^\\da-z\\.-]+)((https?:\\/\\/)((([\\da-z\\.-]+)\\.([a-z\\.]{2,6}))|((\\d{1,3}\\.){3}\\d{1,3})|(localhost))(:\\d{1,5})?(\\/[\\/\\w\\.\\-%~]*)*(\\?[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?(#[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?)($|[^\\/\\w\\.\\-%]+)"),c=0,u=function(t){function e(e){var n=t.call(this)||this;return n._terminal=e,n._linkMatchers=[],n._nextLinkMatcherId=c,n._rowsToLinkify={start:null,end:null},n.registerLinkMatcher(l,null,{matchIndex:1}),n}return r(e,t),e.prototype.attachToDom=function(t){this._mouseZoneManager=t},e.prototype.linkifyRows=function(t,n){var i=this;this._mouseZoneManager&&(this._rowsToLinkify.start?(this._rowsToLinkify.start=this._rowsToLinkify.start<t?this._rowsToLinkify.start:t,this._rowsToLinkify.end=this._rowsToLinkify.end>n?this._rowsToLinkify.end:n):(this._rowsToLinkify.start=t,this._rowsToLinkify.end=n),this._mouseZoneManager.clearAll(t,n),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return i._linkifyRows()},e.TIME_BEFORE_LINKIFY))},e.prototype._linkifyRows=function(){this._rowsTimeoutId=null;for(var t=this._rowsToLinkify.start;t<=this._rowsToLinkify.end;t++)this._linkifyRow(t);this._rowsToLinkify.start=null,this._rowsToLinkify.end=null},e.prototype.setHypertextLinkHandler=function(t){this._linkMatchers[c].handler=t},e.prototype.setHypertextValidationCallback=function(t){this._linkMatchers[c].validationCallback=t},e.prototype.registerLinkMatcher=function(t,e,n){if(void 0===n&&(n={}),this._nextLinkMatcherId!==c&&!e)throw new Error("handler must be defined");var i={id:this._nextLinkMatcherId++,regex:t,handler:e,matchIndex:n.matchIndex,validationCallback:n.validationCallback,hoverTooltipCallback:n.tooltipCallback,hoverLeaveCallback:n.leaveCallback,priority:n.priority||0};return this._addLinkMatcherToList(i),i.id},e.prototype._addLinkMatcherToList=function(t){if(0!==this._linkMatchers.length){for(var e=this._linkMatchers.length-1;e>=0;e--)if(t.priority<=this._linkMatchers[e].priority)return void this._linkMatchers.splice(e+1,0,t);this._linkMatchers.splice(0,0,t)}else this._linkMatchers.push(t)},e.prototype.deregisterLinkMatcher=function(t){for(var e=1;e<this._linkMatchers.length;e++)if(this._linkMatchers[e].id===t)return this._linkMatchers.splice(e,1),!0;return!1},e.prototype._linkifyRow=function(t){var e=this._terminal.buffer.ydisp+t;if(!(e>=this._terminal.buffer.lines.length))for(var n=this._terminal.buffer.translateBufferLineToString(e,!1),i=0;i<this._linkMatchers.length;i++)this._doLinkifyRow(t,n,this._linkMatchers[i])},e.prototype._doLinkifyRow=function(t,e,n,i){var r=this;void 0===i&&(i=0);n.id;var o=e.match(n.regex);if(o&&0!==o.length){var s=o["number"!=typeof n.matchIndex?0:n.matchIndex],a=e.indexOf(s);n.validationCallback?n.validationCallback(s,function(e){r._rowsTimeoutId||e&&r._addLink(i+a,t,s,n)}):this._addLink(i+a,t,s,n);var l=a+s.length,c=e.substr(l);c.length>0&&this._doLinkifyRow(t,c,n,i+l)}},e.prototype._addLink=function(t,e,n,i){var r=this;this._mouseZoneManager.add(new s.MouseZone(t+1,t+1+n.length,e+1,function(t){if(i.handler)return i.handler(t,n);window.open(n,"_blank")},function(i){r.emit(o.LinkHoverEventTypes.HOVER,{x:t,y:e,length:n.length}),r._terminal.element.style.cursor="pointer"},function(s){r.emit(o.LinkHoverEventTypes.TOOLTIP,{x:t,y:e,length:n.length}),i.hoverTooltipCallback&&i.hoverTooltipCallback(s,n)},function(){r.emit(o.LinkHoverEventTypes.LEAVE,{x:t,y:e,length:n.length}),r._terminal.element.style.cursor="",i.hoverLeaveCallback&&i.hoverLeaveCallback()}))},e.TIME_BEFORE_LINKIFY=200,e}(a.EventEmitter);e.Linkifier=u},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o,s,a=n(99),l=n(73),c=n(27),u=n(213),h=n(26),f=String.fromCharCode(160),_=new RegExp(f,"g");(s=o||(o={}))[s.NORMAL=0]="NORMAL",s[s.WORD=1]="WORD",s[s.LINE=2]="LINE";var p=function(t){function e(e,n,i){var r=t.call(this)||this;return r._terminal=e,r._buffer=n,r._charMeasure=i,r._enabled=!0,r._initListeners(),r.enable(),r._model=new u.SelectionModel(e),r._activeSelectionMode=o.NORMAL,r}return r(e,t),e.prototype._initListeners=function(){var t=this;this._mouseMoveListener=function(e){return t._onMouseMove(e)},this._mouseUpListener=function(e){return t._onMouseUp(e)},this._buffer.lines.on("trim",function(e){return t._onTrim(e)})},e.prototype.disable=function(){this.clearSelection(),this._enabled=!1},e.prototype.enable=function(){this._enabled=!0},e.prototype.setBuffer=function(t){this._buffer=t,this.clearSelection()},Object.defineProperty(e.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasSelection",{get:function(){var t=this._model.finalSelectionStart,e=this._model.finalSelectionEnd;return!(!t||!e)&&(t[0]!==e[0]||t[1]!==e[1])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectionText",{get:function(){var t=this._model.finalSelectionStart,e=this._model.finalSelectionEnd;if(!t||!e)return"";var n=t[1]===e[1]?e[0]:null,i=[];i.push(this._buffer.translateBufferLineToString(t[1],!0,t[0],n));for(var r=t[1]+1;r<=e[1]-1;r++){var o=this._buffer.lines.get(r),s=this._buffer.translateBufferLineToString(r,!0);o.isWrapped?i[i.length-1]+=s:i.push(s)}if(t[1]!==e[1]){o=this._buffer.lines.get(e[1]),s=this._buffer.translateBufferLineToString(e[1],!0,0,e[0]);o.isWrapped?i[i.length-1]+=s:i.push(s)}return i.map(function(t){return t.replace(_," ")}).join(l.isMSWindows?"\r\n":"\n")},enumerable:!0,configurable:!0}),e.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh()},e.prototype.refresh=function(t){var e=this;(this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return e._refresh()})),l.isLinux&&t)&&(this.selectionText.length&&this.emit("newselection",this.selectionText))},e.prototype._refresh=function(){this._refreshAnimationFrame=null,this.emit("refresh",{start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd})},e.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._terminal.emit("selection")},e.prototype._onTrim=function(t){this._model.onTrim(t)&&this.refresh()},e.prototype._getMouseBufferCoords=function(t){var e=this._terminal.mouseHelper.getCoords(t,this._terminal.element,this._charMeasure,this._terminal.options.lineHeight,this._terminal.cols,this._terminal.rows,!0);return e?(e[0]--,e[1]--,e[1]+=this._terminal.buffer.ydisp,e):null},e.prototype._getMouseEventScrollAmount=function(t){var e=a.MouseHelper.getCoordsRelativeToElement(t,this._terminal.element)[1],n=this._terminal.rows*Math.ceil(this._charMeasure.height*this._terminal.options.lineHeight);return e>=0&&e<=n?0:(e>n&&(e-=n),e=Math.min(Math.max(e,-50),50),(e/=50)/Math.abs(e)+Math.round(14*e))},e.prototype.shouldForceSelection=function(t){return l.isMac?t.altKey:t.shiftKey},e.prototype.onMouseDown=function(t){if((2!==t.button||!this.hasSelection)&&0===t.button){if(!this._enabled){if(!this.shouldForceSelection(t))return;t.stopPropagation()}t.preventDefault(),this._dragScrollAmount=0,this._enabled&&t.shiftKey?this._onIncrementalClick(t):1===t.detail?this._onSingleClick(t):2===t.detail?this._onDoubleClick(t):3===t.detail&&this._onTripleClick(t),this._addMouseDownListeners(),this.refresh(!0)}},e.prototype._addMouseDownListeners=function(){var t=this;this._terminal.element.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._terminal.element.ownerDocument.addEventListener("mouseup",this._mouseUpListener),this._dragScrollIntervalTimer=setInterval(function(){return t._dragScroll()},50)},e.prototype._removeMouseDownListeners=function(){this._terminal.element.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._terminal.element.ownerDocument.removeEventListener("mouseup",this._mouseUpListener),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=null},e.prototype._onIncrementalClick=function(t){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(t))},e.prototype._onSingleClick=function(t){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=o.NORMAL,this._model.selectionStart=this._getMouseBufferCoords(t),this._model.selectionStart){this._model.selectionEnd=null;var e=this._buffer.lines.get(this._model.selectionStart[1]);if(e)if(!(e.length>=this._model.selectionStart[0]))0===e[this._model.selectionStart[0]][h.CHAR_DATA_WIDTH_INDEX]&&this._model.selectionStart[0]++}},e.prototype._onDoubleClick=function(t){var e=this._getMouseBufferCoords(t);e&&(this._activeSelectionMode=o.WORD,this._selectWordAt(e))},e.prototype._onTripleClick=function(t){var e=this._getMouseBufferCoords(t);e&&(this._activeSelectionMode=o.LINE,this._selectLineAt(e[1]))},e.prototype._onMouseMove=function(t){t.stopImmediatePropagation();var e=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(t),this._model.selectionEnd){if(this._activeSelectionMode===o.LINE?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._terminal.cols:this._activeSelectionMode===o.WORD&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(t),this._dragScrollAmount>0?this._model.selectionEnd[0]=this._terminal.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]<this._buffer.lines.length){var n=this._buffer.lines.get(this._model.selectionEnd[1])[this._model.selectionEnd[0]];n&&0===n[h.CHAR_DATA_WIDTH_INDEX]&&this._model.selectionEnd[0]++}e&&e[0]===this._model.selectionEnd[0]&&e[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)},e.prototype._dragScroll=function(){this._dragScrollAmount&&(this._terminal.scrollLines(this._dragScrollAmount,!1),this._dragScrollAmount>0?this._model.selectionEnd=[this._terminal.cols-1,this._terminal.buffer.ydisp+this._terminal.rows]:this._model.selectionEnd=[0,this._terminal.buffer.ydisp],this.refresh())},e.prototype._onMouseUp=function(t){this._removeMouseDownListeners(),this.hasSelection&&this._terminal.emit("selection")},e.prototype._convertViewportColToCharacterIndex=function(t,e){for(var n=e[0],i=0;e[0]>=i;i++){var r=t[i];0===r[h.CHAR_DATA_WIDTH_INDEX]?n--:r[h.CHAR_DATA_CHAR_INDEX].length>1&&e[0]!==i&&(n+=r[h.CHAR_DATA_CHAR_INDEX].length-1)}return n},e.prototype.setSelection=function(t,e,n){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[t,e],this._model.selectionStartLength=n,this.refresh()},e.prototype._getWordAt=function(t){var e=this._buffer.lines.get(t[1]);if(!e)return null;var n=this._buffer.translateBufferLineToString(t[1],!1),i=this._convertViewportColToCharacterIndex(e,t),r=i,o=t[0]-i,s=0,a=0,l=0,c=0;if(" "===n.charAt(i)){for(;i>0&&" "===n.charAt(i-1);)i--;for(;r<n.length&&" "===n.charAt(r+1);)r++}else{var u=t[0],f=t[0];for(0===e[u][h.CHAR_DATA_WIDTH_INDEX]&&(s++,u--),2===e[f][h.CHAR_DATA_WIDTH_INDEX]&&(a++,f++),e[f][h.CHAR_DATA_CHAR_INDEX].length>1&&(c+=e[f][h.CHAR_DATA_CHAR_INDEX].length-1,r+=e[f][h.CHAR_DATA_CHAR_INDEX].length-1);u>0&&i>0&&!this._isCharWordSeparator(e[u-1]);){0===(_=e[u-1])[h.CHAR_DATA_WIDTH_INDEX]?(s++,u--):_[h.CHAR_DATA_CHAR_INDEX].length>1&&(l+=_[h.CHAR_DATA_CHAR_INDEX].length-1,i-=_[h.CHAR_DATA_CHAR_INDEX].length-1),i--,u--}for(;f<e.length&&r+1<n.length&&!this._isCharWordSeparator(e[f+1]);){var _;2===(_=e[f+1])[h.CHAR_DATA_WIDTH_INDEX]?(a++,f++):_[h.CHAR_DATA_CHAR_INDEX].length>1&&(c+=_[h.CHAR_DATA_CHAR_INDEX].length-1,r+=_[h.CHAR_DATA_CHAR_INDEX].length-1),r++,f++}}return r++,{start:i+o-s+l,length:Math.min(this._terminal.cols,r-i+s+a-l-c)}},e.prototype._selectWordAt=function(t){var e=this._getWordAt(t);e&&(this._model.selectionStart=[e.start,t[1]],this._model.selectionStartLength=e.length)},e.prototype._selectToWordAt=function(t){var e=this._getWordAt(t);e&&(this._model.selectionEnd=[this._model.areSelectionValuesReversed()?e.start:e.start+e.length,t[1]])},e.prototype._isCharWordSeparator=function(t){return 0!==t[h.CHAR_DATA_WIDTH_INDEX]&&" ()[]{}'\"".indexOf(t[h.CHAR_DATA_CHAR_INDEX])>=0},e.prototype._selectLineAt=function(t){this._model.selectionStart=[0,t],this._model.selectionStartLength=this._terminal.cols},e}(c.EventEmitter);e.SelectionManager=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){this._terminal=t,this.clearSelection()}return t.prototype.clearSelection=function(){this.selectionStart=null,this.selectionEnd=null,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(t.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"finalSelectionEnd",{get:function(){return this.isSelectAllActive?[this._terminal.cols,this._terminal.buffer.ybase+this._terminal.rows-1]:this.selectionStart?!this.selectionEnd||this.areSelectionValuesReversed()?[this.selectionStart[0]+this.selectionStartLength,this.selectionStart[1]]:this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd:null},enumerable:!0,configurable:!0}),t.prototype.areSelectionValuesReversed=function(){var t=this.selectionStart,e=this.selectionEnd;return!(!t||!e)&&(t[1]>e[1]||t[1]===e[1]&&t[0]>e[0])},t.prototype.onTrim=function(t){return this.selectionStart&&(this.selectionStart[1]-=t),this.selectionEnd&&(this.selectionEnd[1]-=t),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},t}();e.SelectionModel=i},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e,n){var i=t.call(this)||this;return i._document=e,i._parentElement=n,i._measureElement=i._document.createElement("span"),i._measureElement.style.position="absolute",i._measureElement.style.top="0",i._measureElement.style.left="-9999em",i._measureElement.style.lineHeight="normal",i._measureElement.textContent="W",i._measureElement.setAttribute("aria-hidden","true"),i._parentElement.appendChild(i._measureElement),i}return r(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),e.prototype.measure=function(t){this._measureElement.style.fontFamily=t.fontFamily,this._measureElement.style.fontSize=t.fontSize+"px";var e=this._measureElement.getBoundingClientRect();0!==e.width&&0!==e.height&&(this._width===e.width&&this._height===e.height||(this._width=e.width,this._height=Math.ceil(e.height),this.emit("charsizechanged")))},e}(n(27).EventEmitter);e.CharMeasure=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BellSound="data:audio/wav;base64,UklGRigBAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQQBAADpAFgCwAMlBZoG/wdmCcoKRAypDQ8PbRDBEQQTOxRtFYcWlBePGIUZXhoiG88bcBz7HHIdzh0WHlMeZx51HmkeUx4WHs8dah0AHXwc3hs9G4saxRnyGBIYGBcQFv8U4RPAEoYRQBACD70NWwwHC6gJOwjWBloF7gOBAhABkf8b/qv8R/ve+Xf4Ife79W/0JfPZ8Z/wde9N7ijtE+wU6xvqM+lb6H7nw+YX5mrlxuQz5Mzje+Ma49fioeKD4nXiYeJy4pHitOL04j/jn+MN5IPkFOWs5U3mDefM55/ogOl36m7rdOyE7abuyu8D8Unyj/Pg9D/2qfcb+Yn6/vuK/Qj/lAAlAg=="},function(t,e,n){"use strict";function i(t){if(!t.element.parentElement)return null;var e=window.getComputedStyle(t.element.parentElement),n=parseInt(e.getPropertyValue("height")),i=Math.max(0,parseInt(e.getPropertyValue("width"))-17),r=window.getComputedStyle(t.element),o=n-(parseInt(r.getPropertyValue("padding-top"))+parseInt(r.getPropertyValue("padding-bottom"))),s=i-(parseInt(r.getPropertyValue("padding-right"))+parseInt(r.getPropertyValue("padding-left")));return{cols:Math.floor(s/t.renderer.dimensions.actualCellWidth),rows:Math.floor(o/t.renderer.dimensions.actualCellHeight)}}function r(t){var e=i(t);e&&(t.rows===e.rows&&t.cols===e.cols||(t.renderer.clear(),t.resize(e.cols,e.rows)))}Object.defineProperty(e,"__esModule",{value:!0}),e.proposeGeometry=i,e.fit=r,e.apply=function(t){t.prototype.proposeGeometry=function(){return i(this)},t.prototype.fit=function(){return r(this)}}},function(t,e,n){"use strict";function i(t){["Windows","Win16","Win32","WinCE"].indexOf(navigator.platform)>=0&&t.on("linefeed",function(){32!==t.buffer.lines.get(t.buffer.ybase+t.buffer.y-1)[t.cols-1][3]&&(t.buffer.lines.get(t.buffer.ybase+t.buffer.y).isWrapped=!0)})}Object.defineProperty(e,"__esModule",{value:!0}),e.winptyCompatInit=i,e.apply=function(t){t.prototype.winptyCompatInit=function(){i(this)}}},function(t,e,n){"use strict";function i(t,e,n){if(!t.overlayNode_){if(!t.element)return;t.overlayNode_=document.createElement("div"),t.overlayNode_.style.cssText="border-radius: 15px;font-size: xx-large;opacity: 0.75;padding: 0.2em 0.5em 0.2em 0.5em;position: absolute;-webkit-user-select: none;-webkit-transition: opacity 180ms ease-in;-moz-user-select: none;-moz-transition: opacity 180ms ease-in;",t.overlayNode_.addEventListener("mousedown",function(t){t.preventDefault(),t.stopPropagation()},!0)}t.overlayNode_.style.color="#101010",t.overlayNode_.style.backgroundColor="#f0f0f0",t.overlayNode_.textContent=e,t.overlayNode_.style.opacity="0.75",t.overlayNode_.parentNode||t.element.appendChild(t.overlayNode_);var i=t.element.getBoundingClientRect(),r=t.overlayNode_.getBoundingClientRect();t.overlayNode_.style.top=(i.height-r.height)/2+"px",t.overlayNode_.style.left=(i.width-r.width)/2+"px",t.overlayTimeout_&&clearTimeout(t.overlayTimeout_),null!==n&&(t.overlayTimeout_=setTimeout(function(){t.overlayNode_.style.opacity="0",t.overlayTimeout_=setTimeout(function(){t.overlayNode_.parentNode&&t.overlayNode_.parentNode.removeChild(t.overlayNode_),t.overlayTimeout_=null,t.overlayNode_.style.opacity="0.75"},200)},n||1500))}Object.defineProperty(e,"__esModule",{value:!0}),e.showOverlay=i,e.apply=function(t){t.prototype.showOverlay=function(t,e){return i(this,t,e)}}},function(t,e){}]);</script>
+ <script>!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=100)}([function(t,e,n){var i=n(1),r=n(10),o=n(13),s=n(30),a=n(16),l="prototype",c=function(t,e,n){var u,h,f,_,p=t&c.F,d=t&c.G,m=t&c.S,y=t&c.P,v=t&c.B,b=d?i:m?i[e]||(i[e]={}):(i[e]||{})[l],g=d?r:r[e]||(r[e]={}),C=g[l]||(g[l]={});d&&(n=e);for(u in n)f=((h=!p&&b&&void 0!==b[u])?b:n)[u],_=v&&h?a(f,i):y&&"function"==typeof f?a(Function.call,f):f,b&&s(b,u,f,t&c.U),g[u]!=f&&o(g,u,_),y&&C[u]!=f&&(C[u]=f)};i.core=r,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var i=n(55)("wks"),r=n(24),o=n(1).Symbol,s="function"==typeof o;(t.exports=function(t){return i[t]||(i[t]=s&&o[t]||(s?o:r)("Symbol."+t))}).store=i},function(t,e,n){var i=n(52);t.exports=function(t){return Object(i(t))}},function(t,e,n){var i=n(19),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(11),r=n(76),o=n(28),s=Object.defineProperty;e.f=n(6)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var i=n(35),r=n(52);t.exports=function(t){return i(r(t))}},function(t,e){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},function(t,e,n){var i=n(2);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){"use strict";var i=n(8);t.exports=function(t,e){return!!t&&i(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){var i=n(7),r=n(29);t.exports=n(6)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(0),r=n(10),o=n(8);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],s={};s[t]=e(n),i(i.S+i.F*o(function(){n(1)}),"Object",s)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(17);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";if(n(6)){var i=n(23),r=n(1),o=n(8),s=n(0),a=n(50),l=n(69),c=n(16),u=n(66),h=n(29),f=n(13),_=n(68),p=n(19),d=n(5),m=n(91),y=n(33),v=n(28),b=n(15),g=n(38),C=n(2),w=n(4),S=n(58),A=n(34),x=n(37),k=n(40).f,E=n(60),O=n(24),L=n(3),T=n(20),R=n(43),I=n(49),M=n(64),P=n(31),D=n(61),H=n(45),N=n(63),B=n(81),F=n(7),j=n(22),Z=F.f,W=j.f,U=r.RangeError,z=r.TypeError,V=r.Uint8Array,K="ArrayBuffer",X="Shared"+K,G="BYTES_PER_ELEMENT",Y="prototype",q=Array[Y],Q=l.ArrayBuffer,J=l.DataView,$=T(0),tt=T(2),et=T(3),nt=T(4),it=T(5),rt=T(6),ot=R(!0),st=R(!1),at=M.values,lt=M.keys,ct=M.entries,ut=q.lastIndexOf,ht=q.reduce,ft=q.reduceRight,_t=q.join,pt=q.sort,dt=q.slice,mt=q.toString,yt=q.toLocaleString,vt=L("iterator"),bt=L("toStringTag"),gt=O("typed_constructor"),Ct=O("def_constructor"),wt=a.CONSTR,St=a.TYPED,At=a.VIEW,xt="Wrong length!",kt=T(1,function(t,e){return Rt(I(t,t[Ct]),e)}),Et=o(function(){return 1===new V(new Uint16Array([1]).buffer)[0]}),Ot=!!V&&!!V[Y].set&&o(function(){new V(1).set({})}),Lt=function(t,e){var n=p(t);if(n<0||n%e)throw U("Wrong offset!");return n},Tt=function(t){if(C(t)&&St in t)return t;throw z(t+" is not a typed array!")},Rt=function(t,e){if(!(C(t)&> in t))throw z("It is not a typed array constructor!");return new t(e)},It=function(t,e){return Mt(I(t,t[Ct]),e)},Mt=function(t,e){for(var n=0,i=e.length,r=Rt(t,i);i>n;)r[n]=e[n++];return r},Pt=function(t,e,n){Z(t,e,{get:function(){return this._d[n]}})},Dt=function(t){var e,n,i,r,o,s,a=w(t),l=arguments.length,u=l>1?arguments[1]:void 0,h=void 0!==u,f=E(a);if(void 0!=f&&!S(f)){for(s=f.call(a),i=[],e=0;!(o=s.next()).done;e++)i.push(o.value);a=i}for(h&&l>2&&(u=c(u,arguments[2],2)),e=0,n=d(a.length),r=Rt(this,n);n>e;e++)r[e]=h?u(a[e],e):a[e];return r},Ht=function(){for(var t=0,e=arguments.length,n=Rt(this,e);e>t;)n[t]=arguments[t++];return n},Nt=!!V&&o(function(){yt.call(new V(1))}),Bt=function(){return yt.apply(Nt?dt.call(Tt(this)):Tt(this),arguments)},Ft={copyWithin:function(t,e){return B.call(Tt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return nt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return N.apply(Tt(this),arguments)},filter:function(t){return It(this,tt(Tt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return it(Tt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return rt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){$(Tt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return st(Tt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return ot(Tt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return _t.apply(Tt(this),arguments)},lastIndexOf:function(t){return ut.apply(Tt(this),arguments)},map:function(t){return kt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ht.apply(Tt(this),arguments)},reduceRight:function(t){return ft.apply(Tt(this),arguments)},reverse:function(){for(var t,e=this,n=Tt(e).length,i=Math.floor(n/2),r=0;r<i;)t=e[r],e[r++]=e[--n],e[n]=t;return e},some:function(t){return et(Tt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return pt.call(Tt(this),t)},subarray:function(t,e){var n=Tt(this),i=n.length,r=y(t,i);return new(I(n,n[Ct]))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,d((void 0===e?i:y(e,i))-r))}},jt=function(t,e){return It(this,dt.call(Tt(this),t,e))},Zt=function(t){Tt(this);var e=Lt(arguments[1],1),n=this.length,i=w(t),r=d(i.length),o=0;if(r+e>n)throw U(xt);for(;o<r;)this[e+o]=i[o++]},Wt={entries:function(){return ct.call(Tt(this))},keys:function(){return lt.call(Tt(this))},values:function(){return at.call(Tt(this))}},Ut=function(t,e){return C(t)&&t[St]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},zt=function(t,e){return Ut(t,e=v(e,!0))?h(2,t[e]):W(t,e)},Vt=function(t,e,n){return!(Ut(t,e=v(e,!0))&&C(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?Z(t,e,n):(t[e]=n.value,t)};wt||(j.f=zt,F.f=Vt),s(s.S+s.F*!wt,"Object",{getOwnPropertyDescriptor:zt,defineProperty:Vt}),o(function(){mt.call({})})&&(mt=yt=function(){return _t.call(this)});var Kt=_({},Ft);_(Kt,Wt),f(Kt,vt,Wt.values),_(Kt,{slice:jt,set:Zt,constructor:function(){},toString:mt,toLocaleString:Bt}),Pt(Kt,"buffer","b"),Pt(Kt,"byteOffset","o"),Pt(Kt,"byteLength","l"),Pt(Kt,"length","e"),Z(Kt,bt,{get:function(){return this[St]}}),t.exports=function(t,e,n,l){var c=t+((l=!!l)?"Clamped":"")+"Array",h="get"+t,_="set"+t,p=r[c],y=p||{},v=p&&x(p),b=!p||!a.ABV,w={},S=p&&p[Y],E=function(t,n){Z(t,n,{get:function(){return t=n,(i=this._d).v[h](t*e+i.o,Et);var t,i},set:function(t){return i=n,r=t,o=this._d,l&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),void o.v[_](i*e+o.o,r,Et);var i,r,o},enumerable:!0})};b?(p=n(function(t,n,i,r){u(t,p,c,"_d");var o,s,a,l,h=0,_=0;if(C(n)){if(!(n instanceof Q||(l=g(n))==K||l==X))return St in n?Mt(p,n):Dt.call(p,n);o=n,_=Lt(i,e);var y=n.byteLength;if(void 0===r){if(y%e)throw U(xt);if((s=y-_)<0)throw U(xt)}else if((s=d(r)*e)+_>y)throw U(xt);a=s/e}else a=m(n),o=new Q(s=a*e);for(f(t,"_d",{b:o,o:_,l:s,e:a,v:new J(o)});h<a;)E(t,h++)}),S=p[Y]=A(Kt),f(S,"constructor",p)):o(function(){p(1)})&&o(function(){new p(-1)})&&D(function(t){new p,new p(null),new p(1.5),new p(t)},!0)||(p=n(function(t,n,i,r){var o;return u(t,p,c),C(n)?n instanceof Q||(o=g(n))==K||o==X?void 0!==r?new y(n,Lt(i,e),r):void 0!==i?new y(n,Lt(i,e)):new y(n):St in n?Mt(p,n):Dt.call(p,n):new y(m(n))}),$(v!==Function.prototype?k(y).concat(k(v)):k(y),function(t){t in p||f(p,t,y[t])}),p[Y]=S,i||(S.constructor=p));var O=S[vt],L=!!O&&("values"==O.name||void 0==O.name),T=Wt.values;f(p,gt,!0),f(S,St,c),f(S,At,!0),f(S,Ct,p),(l?new p(1)[bt]==c:bt in S)||Z(S,bt,{get:function(){return c}}),w[c]=p,s(s.G+s.W+s.F*(p!=y),w),s(s.S,c,{BYTES_PER_ELEMENT:e}),s(s.S+s.F*o(function(){y.of.call(p,1)}),c,{from:Dt,of:Ht}),G in S||f(S,G,e),s(s.P,c,Ft),H(c),s(s.P+s.F*Ot,c,{set:Zt}),s(s.P+s.F*!L,c,Wt),i||S.toString==mt||(S.toString=mt),s(s.P+s.F*o(function(){new p(1).slice()}),c,{slice:jt}),s(s.P+s.F*(o(function(){return[1,2].toLocaleString()!=new p([1,2]).toLocaleString()})||!o(function(){S.toLocaleString.call([1,2])})),c,{toLocaleString:Bt}),P[c]=L?O:T,i||L||f(S,vt,T)}}else t.exports=function(){}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(16),r=n(35),o=n(4),s=n(5),a=n(62);t.exports=function(t,e){var n=1==t,l=2==t,c=3==t,u=4==t,h=6==t,f=5==t||h,_=e||a;return function(e,a,p){for(var d,m,y=o(e),v=r(y),b=i(a,p,3),g=s(v.length),C=0,w=n?_(e,g):l?_(e,0):void 0;g>C;C++)if((f||C in v)&&(m=b(d=v[C],C,y),t))if(n)w[C]=m;else if(m)switch(t){case 3:return!0;case 5:return d;case 6:return C;case 2:w.push(d)}else if(u)return!1;return h?-1:c||u?u:w}}},function(t,e,n){var i=n(3)("unscopables"),r=Array.prototype;void 0==r[i]&&n(13)(r,i,{}),t.exports=function(t){r[i][t]=!0}},function(t,e,n){var i=n(39),r=n(29),o=n(9),s=n(28),a=n(15),l=n(76),c=Object.getOwnPropertyDescriptor;e.f=n(6)?c:function(t,e){if(t=o(t),e=s(e,!0),l)try{return c(t,e)}catch(t){}if(a(t,e))return r(!i.f.call(t,e),t[e])}},function(t,e){t.exports=!1},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e,n){var i=n(78),r=n(56);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(197);e.CHAR_DATA_ATTR_INDEX=0,e.CHAR_DATA_CHAR_INDEX=1,e.CHAR_DATA_WIDTH_INDEX=2,e.CHAR_DATA_CODE_INDEX=3,e.MAX_BUFFER_SIZE=4294967295;var r=function(){function t(t,e){this._terminal=t,this._hasScrollback=e,this.clear()}return Object.defineProperty(t.prototype,"lines",{get:function(){return this._lines},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._terminal.rows},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCursorInViewport",{get:function(){var t=this.ybase+this.y-this.ydisp;return t>=0&&t<this._terminal.rows},enumerable:!0,configurable:!0}),t.prototype._getCorrectBufferLength=function(t){if(!this._hasScrollback)return t;var n=t+this._terminal.options.scrollback;return n>e.MAX_BUFFER_SIZE?e.MAX_BUFFER_SIZE:n},t.prototype.fillViewportRows=function(){if(0===this._lines.length)for(var t=this._terminal.rows;t--;)this.lines.push(this._terminal.blankLine())},t.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this._lines=new i.CircularList(this._getCorrectBufferLength(this._terminal.rows)),this.scrollTop=0,this.scrollBottom=this._terminal.rows-1,this.setupTabStops()},t.prototype.resize=function(t,e){var n=this._getCorrectBufferLength(e);if(n>this._lines.maxLength&&(this._lines.maxLength=n),this._lines.length>0){if(this._terminal.cols<t)for(var i=[this._terminal.defAttr," ",1,32],r=0;r<this._lines.length;r++)for(void 0===this._lines.get(r)&&this._lines.set(r,this._terminal.blankLine(void 0,void 0,t));this._lines.get(r).length<t;)this._lines.get(r).push(i);var o=0;if(this._terminal.rows<e)for(var s=this._terminal.rows;s<e;s++)this._lines.length<e+this.ybase&&(this.ybase>0&&this._lines.length<=this.ybase+this.y+o+1?(this.ybase--,o++,this.ydisp>0&&this.ydisp--):this._lines.push(this._terminal.blankLine(void 0,void 0,t)));else for(s=this._terminal.rows;s>e;s--)this._lines.length>e+this.ybase&&(this._lines.length>this.ybase+this.y+1?this._lines.pop():(this.ybase++,this.ydisp++));if(n<this._lines.maxLength){var a=this._lines.length-n;a>0&&(this._lines.trimStart(a),this.ybase=Math.max(this.ybase-a,0),this.ydisp=Math.max(this.ydisp-a,0)),this._lines.maxLength=n}this.y>=e&&(this.y=e-1),o&&(this.y+=o),this.x>=t&&(this.x=t-1),this.scrollTop=0}this.scrollBottom=e-1},t.prototype.translateBufferLineToString=function(t,n,i,r){void 0===i&&(i=0),void 0===r&&(r=null);var o="",s=this.lines.get(t);if(!s)return"";for(var a=i,l=r=r||s.length,c=0;c<s.length;c++){var u=s[c];o+=u[e.CHAR_DATA_CHAR_INDEX],0===u[e.CHAR_DATA_WIDTH_INDEX]?(i>=c&&a--,r>=c&&l--):u[e.CHAR_DATA_CHAR_INDEX].length>1&&(i>c&&(a+=u[e.CHAR_DATA_CHAR_INDEX].length-1),r>c&&(l+=u[e.CHAR_DATA_CHAR_INDEX].length-1))}if(n){var h=o.search(/\s+$/);if(-1!==h&&(l=Math.min(l,h)),l<=a)return""}return o.substring(a,l)},t.prototype.setupTabStops=function(t){for(null!=t?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this._terminal.cols;t+=this._terminal.options.tabStopWidth)this.tabs[t]=!0},t.prototype.prevStop=function(t){for(null==t&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this._terminal.cols?this._terminal.cols-1:t<0?0:t},t.prototype.nextStop=function(t){for(null==t&&(t=this.x);!this.tabs[++t]&&t<this._terminal.cols;);return t>=this._terminal.cols?this._terminal.cols-1:t<0?0:t},t}();e.Buffer=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this._events=this._events||{}}return t.prototype.on=function(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)},t.prototype.off=function(t,e){if(this._events[t])for(var n=this._events[t],i=n.length;i--;)if(n[i]===e||n[i].listener===e)return void n.splice(i,1)},t.prototype.removeAllListeners=function(t){this._events[t]&&delete this._events[t]},t.prototype.once=function(t,e){function n(){var i=Array.prototype.slice.call(arguments);this.off(t,n),e.apply(this,i)}n.listener=e,this.on(t,n)},t.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(this._events[t])for(var i=this._events[t],r=0;r<i.length;r++)i[r].apply(this,e)},t.prototype.listeners=function(t){return this._events[t]||[]},t.prototype.destroy=function(){this._events={}},t}();e.EventEmitter=i},function(t,e,n){var i=n(2);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(1),r=n(13),o=n(15),s=n(24)("src"),a="toString",l=Function[a],c=(""+l).split(a);n(10).inspectSource=function(t){return l.call(t)},(t.exports=function(t,e,n,a){var l="function"==typeof n;l&&(o(n,"name")||r(n,"name",e)),t[e]!==n&&(l&&(o(n,s)||r(n,s,t[e]?""+t[e]:c.join(String(e)))),t===i?t[e]=n:a?t[e]?t[e]=n:r(t,e,n):(delete t[e],r(t,e,n)))})(Function.prototype,a,function(){return"function"==typeof this&&this[s]||l.call(this)})},function(t,e){t.exports={}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(19),r=Math.max,o=Math.min;t.exports=function(t,e){return(t=i(t))<0?r(t+e,0):o(t,e)}},function(t,e,n){var i=n(11),r=n(77),o=n(56),s=n(54)("IE_PROTO"),a=function(){},l="prototype",c=function(){var t,e=n(53)("iframe"),i=o.length;for(e.style.display="none",n(57).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;i--;)delete c[l][o[i]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[l]=i(t),n=new a,a[l]=null,n[s]=t):n=c(),void 0===e?n:r(n,e)}},function(t,e,n){var i=n(32);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(7).f,r=n(15),o=n(3)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},function(t,e,n){var i=n(15),r=n(4),o=n(54)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),i(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var i=n(32),r=n(3)("toStringTag"),o="Arguments"==i(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),r))?n:o?i(e):"Object"==(s=i(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var i=n(78),r=n(56).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},function(t,e,n){"use strict";t.exports.ZMLIB={ZDLE:24,XON:17,XOFF:19,ABORT_SEQUENCE:[24,24,24,24,24],strip_ignored_bytes:function(t){for(var e=t.length-1;e>=0;e--)switch(t[e]){case 17:case 145:case 19:case 147:t.splice(e,1);continue}return t},find_subarray:function(t,e){var n,i=0;Date.now();t:for(;-1!==i&&-1!==(i=t.indexOf(e[0],i));){for(n=1;n<e.length;n++)if(t[i+n]!==e[n]){i++;continue t}return i}return-1}}},function(t,e,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var r={aborted:"Session aborted",peer_aborted:"Peer aborted session",already_aborted:"Session already aborted",crc:function(t,e){return this.got=t.slice(0),this.expected=e.slice(0),"CRC check failed! (got: "+t.join()+"; expected: "+e.join()+")"},validation:function(t){return t}};t.exports.Error=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),o=function(t){var e=r[t];switch(void 0===e?"undefined":i(e)){case"string":return e;case"function":var n=[].slice.call(arguments).slice(1);return e.apply(this,n)}return null}.apply(n,arguments);return o?(n.type=t,n.message=o):n.message=t,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Error),e}()},function(t,e,n){var i=n(9),r=n(5),o=n(33);t.exports=function(t){return function(e,n,s){var a,l=i(e),c=r(l.length),u=o(s,c);if(t&&n!=n){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}}},function(t,e,n){var i=n(32);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){"use strict";var i=n(1),r=n(7),o=n(6),s=n(3)("species");t.exports=function(t){var e=i[t];o&&e&&!e[s]&&r.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){var i=n(24)("meta"),r=n(2),o=n(15),s=n(7).f,a=0,l=Object.isExtensible||function(){return!0},c=!n(8)(function(){return l(Object.preventExtensions({}))}),u=function(t){s(t,i,{value:{i:"O"+ ++a,w:{}}})},h=t.exports={KEY:i,NEED:!1,fastKey:function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,i)){if(!l(t))return"F";if(!e)return"E";u(t)}return t[i].i},getWeak:function(t,e){if(!o(t,i)){if(!l(t))return!0;if(!e)return!1;u(t)}return t[i].w},onFreeze:function(t){return c&&h.NEED&&l(t)&&!o(t,i)&&u(t),t}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){"use strict";t.exports=n(23)||!n(8)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n(1)[t]})},function(t,e,n){var i=n(11),r=n(17),o=n(3)("species");t.exports=function(t,e){var n,s=i(t).constructor;return void 0===s||void 0==(n=i(s)[o])?e:r(n)}},function(t,e,n){for(var i,r=n(1),o=n(13),s=n(24),a=s("typed_array"),l=s("view"),c=!(!r.ArrayBuffer||!r.DataView),u=c,h=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");h<9;)(i=r[f[h++]])?(o(i.prototype,a,!0),o(i.prototype,l,!0)):u=!1;t.exports={ABV:c,CONSTR:u,TYPED:a,VIEW:l}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(95),r=n(26);e.INVERTED_DEFAULT_COLOR=-1;var o=function(){function t(t,e,n,i,r){this._alpha=i,this._colors=r,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._canvas=document.createElement("canvas"),this._canvas.id="xterm-"+e+"-layer",this._canvas.style.zIndex=n.toString(),this._ctx=this._canvas.getContext("2d",{alpha:i}),this._ctx.scale(window.devicePixelRatio,window.devicePixelRatio),i||this.clearAll(),t.appendChild(this._canvas)}return t.prototype.onOptionsChanged=function(t){},t.prototype.onBlur=function(t){},t.prototype.onFocus=function(t){},t.prototype.onCursorMove=function(t){},t.prototype.onGridChanged=function(t,e,n){},t.prototype.onSelectionChanged=function(t,e,n){},t.prototype.onThemeChanged=function(t,e){this._refreshCharAtlas(t,e)},t.prototype._refreshCharAtlas=function(t,e){var n=this;if(!(this._scaledCharWidth<=0&&this._scaledCharHeight<=0)){this._charAtlas=null;var r=i.acquireCharAtlas(t,this._colors,this._scaledCharWidth,this._scaledCharHeight);r instanceof HTMLCanvasElement?this._charAtlas=r:r.then(function(t){return n._charAtlas=t})}},t.prototype.resize=function(t,e,n){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this.clearAll(),n&&this._refreshCharAtlas(t,this._colors)},t.prototype.fillCells=function(t,e,n,i){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,n*this._scaledCellWidth,i*this._scaledCellHeight)},t.prototype.fillBottomLineAtCells=function(t,e,n){void 0===n&&(n=1),this._ctx.fillRect(t*this._scaledCellWidth,(e+1)*this._scaledCellHeight-window.devicePixelRatio-1,n*this._scaledCellWidth,window.devicePixelRatio)},t.prototype.fillLeftLineAtCell=function(t,e){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,window.devicePixelRatio,this._scaledCellHeight)},t.prototype.strokeRectAtCell=function(t,e,n,i){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,e*this._scaledCellHeight+window.devicePixelRatio/2,n*this._scaledCellWidth-window.devicePixelRatio,i*this._scaledCellHeight-window.devicePixelRatio)},t.prototype.clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},t.prototype.clearCells=function(t,e,n,i){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,e*this._scaledCellHeight,n*this._scaledCellWidth,i*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background,this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,n*this._scaledCellWidth,i*this._scaledCellHeight))},t.prototype.fillCharTrueColor=function(t,e,n,i){this._ctx.font=t.options.fontSize*window.devicePixelRatio+"px "+t.options.fontFamily,this._ctx.textBaseline="top",this._clipRow(t,i),this._ctx.fillText(e[r.CHAR_DATA_CHAR_INDEX],n*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop)},t.prototype.drawChar=function(t,e,n,r,o,s,a,l,c,u){var h=0;a<256?h=a+2:c&&t.options.enableBold&&(h=1);var f=n<256,_=h>1&&a<16&&(a<8||c),p=a>=256,d=l>=256;if(this._charAtlas&&f&&(_||p)&&d){var m=this._scaledCharWidth+i.CHAR_ATLAS_CELL_SPACING,y=this._scaledCharHeight+i.CHAR_ATLAS_CELL_SPACING;u&&(this._ctx.globalAlpha=.5),c&&!t.options.enableBold&&h>1&&(h-=8),this._ctx.drawImage(this._charAtlas,n*m,h*y,m,this._scaledCharHeight,o*this._scaledCellWidth+this._scaledCharLeft,s*this._scaledCellHeight+this._scaledCharTop,m,this._scaledCharHeight)}else this._drawUncachedChar(t,e,r,a,o,s,c,u)},t.prototype._drawUncachedChar=function(t,n,i,r,o,s,a,l){this._ctx.save(),this._ctx.font=t.options.fontSize*window.devicePixelRatio+"px "+t.options.fontFamily,a&&t.options.enableBold&&(this._ctx.font="bold "+this._ctx.font),this._ctx.textBaseline="top",r===e.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background:this._ctx.fillStyle=r<256?this._colors.ansi[r]:this._colors.foreground,this._clipRow(t,s),l&&(this._ctx.globalAlpha=.5),this._ctx.fillText(n,o*this._scaledCellWidth+this._scaledCharLeft,s*this._scaledCellHeight+this._scaledCharTop),this._ctx.restore()},t.prototype._clipRow=function(t,e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,t.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},t}();e.BaseRenderLayer=o},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var i=n(2),r=n(1).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,n){var i=n(55)("keys"),r=n(24);t.exports=function(t){return i[t]||(i[t]=r(t))}},function(t,e,n){var i=n(1),r="__core-js_shared__",o=i[r]||(i[r]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var i=n(1).document;t.exports=i&&i.documentElement},function(t,e,n){var i=n(31),r=n(3)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||o[r]===t)}},function(t,e,n){"use strict";var i=n(7),r=n(29);t.exports=function(t,e,n){e in t?i.f(t,e,r(0,n)):t[e]=n}},function(t,e,n){var i=n(38),r=n(3)("iterator"),o=n(31);t.exports=n(10).getIteratorMethod=function(t){if(void 0!=t)return t[r]||t["@@iterator"]||o[i(t)]}},function(t,e,n){var i=n(3)("iterator"),r=!1;try{var o=[7][i]();o.return=function(){r=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var o=[7],s=o[i]();s.next=function(){return{done:n=!0}},o[i]=function(){return s},t(o)}catch(t){}return n}},function(t,e,n){var i=n(112);t.exports=function(t,e){return new(i(t))(e)}},function(t,e,n){"use strict";var i=n(4),r=n(33),o=n(5);t.exports=function(t){for(var e=i(this),n=o(e.length),s=arguments.length,a=r(s>1?arguments[1]:void 0,n),l=s>2?arguments[2]:void 0,c=void 0===l?n:r(l,n);c>a;)e[a++]=t;return e}},function(t,e,n){"use strict";var i=n(21),r=n(126),o=n(31),s=n(9);t.exports=n(75)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):r(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(t,e,n){"use strict";var i=n(38),r={};r[n(3)("toStringTag")]="z",r+""!="[object z]"&&n(30)(Object.prototype,"toString",function(){return"[object "+i(this)+"]"},!0)},function(t,e){t.exports=function(t,e,n,i){if(!(t instanceof e)||void 0!==i&&i in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){"use strict";var i=n(17);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t(function(t,i){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=i}),this.resolve=i(e),this.reject=i(n)}(t)}},function(t,e,n){var i=n(30);t.exports=function(t,e,n){for(var r in e)i(t,r,e[r],n);return t}},function(t,e,n){"use strict";var i=n(1),r=n(6),o=n(23),s=n(50),a=n(13),l=n(68),c=n(8),u=n(66),h=n(19),f=n(5),_=n(91),p=n(40).f,d=n(7).f,m=n(63),y=n(36),v="ArrayBuffer",b="DataView",g="prototype",C="Wrong index!",w=i[v],S=i[b],A=i.Math,x=i.RangeError,k=i.Infinity,E=w,O=A.abs,L=A.pow,T=A.floor,R=A.log,I=A.LN2,M="byteLength",P="byteOffset",D=r?"_b":"buffer",H=r?"_l":M,N=r?"_o":P;function B(t,e,n){var i,r,o,s=new Array(n),a=8*n-e-1,l=(1<<a)-1,c=l>>1,u=23===e?L(2,-24)-L(2,-77):0,h=0,f=t<0||0===t&&1/t<0?1:0;for((t=O(t))!=t||t===k?(r=t!=t?1:0,i=l):(i=T(R(t)/I),t*(o=L(2,-i))<1&&(i--,o*=2),(t+=i+c>=1?u/o:u*L(2,1-c))*o>=2&&(i++,o/=2),i+c>=l?(r=0,i=l):i+c>=1?(r=(t*o-1)*L(2,e),i+=c):(r=t*L(2,c-1)*L(2,e),i=0));e>=8;s[h++]=255&r,r/=256,e-=8);for(i=i<<e|r,a+=e;a>0;s[h++]=255&i,i/=256,a-=8);return s[--h]|=128*f,s}function F(t,e,n){var i,r=8*n-e-1,o=(1<<r)-1,s=o>>1,a=r-7,l=n-1,c=t[l--],u=127&c;for(c>>=7;a>0;u=256*u+t[l],l--,a-=8);for(i=u&(1<<-a)-1,u>>=-a,a+=e;a>0;i=256*i+t[l],l--,a-=8);if(0===u)u=1-s;else{if(u===o)return i?NaN:c?-k:k;i+=L(2,e),u-=s}return(c?-1:1)*i*L(2,u-e)}function j(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function Z(t){return[255&t]}function W(t){return[255&t,t>>8&255]}function U(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function z(t){return B(t,52,8)}function V(t){return B(t,23,4)}function K(t,e,n){d(t[g],e,{get:function(){return this[n]}})}function X(t,e,n,i){var r=_(+n);if(r+e>t[H])throw x(C);var o=t[D]._b,s=r+t[N],a=o.slice(s,s+e);return i?a:a.reverse()}function G(t,e,n,i,r,o){var s=_(+n);if(s+e>t[H])throw x(C);for(var a=t[D]._b,l=s+t[N],c=i(+r),u=0;u<e;u++)a[l+u]=c[o?u:e-u-1]}if(s.ABV){if(!c(function(){w(1)})||!c(function(){new w(-1)})||c(function(){return new w,new w(1.5),new w(NaN),w.name!=v})){for(var Y,q=(w=function(t){return u(this,w),new E(_(t))})[g]=E[g],Q=p(E),J=0;Q.length>J;)(Y=Q[J++])in w||a(w,Y,E[Y]);o||(q.constructor=w)}var $=new S(new w(2)),tt=S[g].setInt8;$.setInt8(0,2147483648),$.setInt8(1,2147483649),!$.getInt8(0)&&$.getInt8(1)||l(S[g],{setInt8:function(t,e){tt.call(this,t,e<<24>>24)},setUint8:function(t,e){tt.call(this,t,e<<24>>24)}},!0)}else w=function(t){u(this,w,v);var e=_(t);this._b=m.call(new Array(e),0),this[H]=e},S=function(t,e,n){u(this,S,b),u(t,w,b);var i=t[H],r=h(e);if(r<0||r>i)throw x("Wrong offset!");if(r+(n=void 0===n?i-r:f(n))>i)throw x("Wrong length!");this[D]=t,this[N]=r,this[H]=n},r&&(K(w,M,"_l"),K(S,"buffer","_b"),K(S,M,"_l"),K(S,P,"_o")),l(S[g],{getInt8:function(t){return X(this,1,t)[0]<<24>>24},getUint8:function(t){return X(this,1,t)[0]},getInt16:function(t){var e=X(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=X(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return j(X(this,4,t,arguments[1]))},getUint32:function(t){return j(X(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return F(X(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return F(X(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){G(this,1,t,Z,e)},setUint8:function(t,e){G(this,1,t,Z,e)},setInt16:function(t,e){G(this,2,t,W,e,arguments[2])},setUint16:function(t,e){G(this,2,t,W,e,arguments[2])},setInt32:function(t,e){G(this,4,t,U,e,arguments[2])},setUint32:function(t,e){G(this,4,t,U,e,arguments[2])},setFloat32:function(t,e){G(this,4,t,V,e,arguments[2])},setFloat64:function(t,e){G(this,8,t,z,e,arguments[2])}});y(w,v),y(S,b),a(S[g],s.VIEW,!0),e[v]=w,e[b]=S},function(t,e,n){"use strict";for(var i=t.exports,r=[48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102],o={},s=0;s<r.length;s++)o[r[s]]=s;i.ENCODELIB={pack_u16_be:function(t){if(t>65535)throw"Number cannot exceed 16 bits: "+t;return[t>>8,255&t]},pack_u32_le:function(t){var e=t/65536;return[255&t,(65535&t)>>8,255&e,e>>8]},unpack_u16_be:function(t){return(t[0]<<8)+t[1]},unpack_u32_le:function(t){return t[0]+(t[1]<<8)+(t[2]<<16)+16777216*t[3]},octets_to_hex:function(t){for(var e=[],n=0;n<t.length;n++)e.push(r[t[n]>>4],r[15&t[n]]);return e},parse_hex_octets:function(t){for(var e=new Array(t.length/2),n=0;n<e.length;n++)e[n]=(o[t[2*n]]<<4)+o[t[1+2*n]];return e}}},function(t,e,n){"use strict";var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();var r,o,s=t.exports;Object.assign(s,n(41));var a=s.ZMLIB.ZDLE;s.ZDLE=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._config={},e&&this.set_escape_ctrl_chars(!!e.escape_ctrl_chars)}return i(t,[{key:"set_escape_ctrl_chars",value:function(t){if("boolean"!=typeof t)throw"need boolean!";t!==this._config.escape_ctrl_chars&&(this._config.escape_ctrl_chars=t,this._setup_zdle_table())}},{key:"escapes_ctrl_chars",value:function(){return!!this._config.escape_ctrl_chars}},{key:"encode",value:function(t){if(!this._zdle_table)throw"No ZDLE encode table configured!";var e=this._zdle_table,n=this._lastcode,i=new ArrayBuffer(2*t.length),s=new Uint8Array(i),l=this._config.escape_ctrl_chars,c=0;for(r=0;r<t.length;r++){if(!(o=e[t[r]]))throw console.trace(),console.error("bad encode() call:",JSON.stringify(t)),this._lastcode=n,"Invalid octet: "+t[r];n=t[r],1===o||(l||2===o||64==(127&n))&&(s[c]=a,c++,n^=64),s[c]=n,c++}return this._lastcode=n,t.splice(0),t.push.apply(t,new Uint8Array(i,0,c)),t}},{key:"_setup_zdle_table",value:function(){for(var t=new Array(256),e=0;e<t.length;e++)if(96&e)t[e]=1;else switch(e){case a:case s.ZMLIB.XOFF:case s.ZMLIB.XON:case 128|s.ZMLIB.XOFF:case 128|s.ZMLIB.XON:t[e]=2;break;case 16:case 144:t[e]=this._config.turbo_escape?1:2;break;case 13:case 141:t[e]=this._config.escape_ctrl_chars?2:this._config.turbo_escape?1:3;break;default:t[e]=this._config.escape_ctrl_chars?2:1}this._zdle_table=t}}],[{key:"decode",value:function(t){for(var e=t.length-1;e>=0;e--)t[e]===a&&t.splice(e,2,t[e+1]-64);return t}},{key:"splice",value:function(e,n,i){var r=0;n||(n=0);for(var o=n;o<e.length&&r<i;o++)r++,e[o]===a&&o++;if(r===i){if(e.length===o-1)return;return e.splice(0,n),t.decode(e.splice(0,o-n))}}}]),t}()},function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),(i=e.C0||(e.C0={})).NUL="\0",i.SOH="\ 1",i.STX="\ 2",i.ETX="\ 3",i.EOT="\ 4",i.ENQ="\ 5",i.ACK="\ 6",i.BEL="\a",i.BS="\b",i.HT="\t",i.LF="\n",i.VT="\v",i.FF="\f",i.CR="\r",i.SO="\ e",i.SI="\ f",i.DLE="\10",i.DC1="\11",i.DC2="\12",i.DC3="\13",i.DC4="\14",i.NAK="\15",i.SYN="\16",i.ETB="\17",i.CAN="\18",i.EM="\19",i.SUB="\1a",i.ESC="\e",i.FS="\1c",i.GS="\1d",i.RS="\1e",i.US="\1f",i.SP=" ",i.DEL="\7f"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(207),r="undefined"==typeof navigator,o=r?"node":navigator.userAgent,s=r?"node":navigator.platform;e.isFirefox=!!~o.indexOf("Firefox"),e.isMSIE=!!~o.indexOf("MSIE")||!!~o.indexOf("Trident"),e.isMac=i.contains(["Macintosh","MacIntel","MacPPC","Mac68K"],s),e.isIpad="iPad"===s,e.isIphone="iPhone"===s,e.isMSWindows=i.contains(["Windows","Win16","Win32","WinCE"],s),e.isLinux=s.indexOf("Linux")>=0},function(t,e,n){"use strict";var i=n(103)(!0);n(75)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var i=n(23),r=n(0),o=n(30),s=n(13),a=n(15),l=n(31),c=n(104),u=n(36),h=n(37),f=n(3)("iterator"),_=!([].keys&&"next"in[].keys()),p="values",d=function(){return this};t.exports=function(t,e,n,m,y,v,b){c(n,e,m);var g,C,w,S=function(t){if(!_&&t in E)return E[t];switch(t){case"keys":case p:return function(){return new n(this,t)}}return function(){return new n(this,t)}},A=e+" Iterator",x=y==p,k=!1,E=t.prototype,O=E[f]||E["@@iterator"]||y&&E[y],L=!_&&O||S(y),T=y?x?S("entries"):L:void 0,R="Array"==e&&E.entries||O;if(R&&(w=h(R.call(new t)))!==Object.prototype&&w.next&&(u(w,A,!0),i||a(w,f)||s(w,f,d)),x&&O&&O.name!==p&&(k=!0,L=function(){return O.call(this)}),i&&!b||!_&&!k&&E[f]||s(E,f,L),l[e]=L,l[A]=d,y)if(g={values:x?L:S(p),keys:v?L:S("keys"),entries:T},b)for(C in g)C in E||o(E,C,g[C]);else r(r.P+r.F*(_||k),e,g);return g}},function(t,e,n){t.exports=!n(6)&&!n(8)(function(){return 7!=Object.defineProperty(n(53)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(7),r=n(11),o=n(25);t.exports=n(6)?Object.defineProperties:function(t,e){r(t);for(var n,s=o(e),a=s.length,l=0;a>l;)i.f(t,n=s[l++],e[n]);return t}},function(t,e,n){var i=n(15),r=n(9),o=n(43)(!1),s=n(54)("IE_PROTO");t.exports=function(t,e){var n,a=r(t),l=0,c=[];for(n in a)n!=s&&i(a,n)&&c.push(n);for(;e.length>l;)i(a,n=e[l++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var i=n(11);t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},function(t,e,n){var i=n(17),r=n(4),o=n(35),s=n(5);t.exports=function(t,e,n,a,l){i(e);var c=r(t),u=o(c),h=s(c.length),f=l?h-1:0,_=l?-1:1;if(n<2)for(;;){if(f in u){a=u[f],f+=_;break}if(f+=_,l?f<0:h<=f)throw TypeError("Reduce of empty array with no initial value")}for(;l?f>=0:h>f;f+=_)f in u&&(a=e(a,u[f],f,c));return a}},function(t,e,n){"use strict";var i=n(4),r=n(33),o=n(5);t.exports=[].copyWithin||function(t,e){var n=i(this),s=o(n.length),a=r(t,s),l=r(e,s),c=arguments.length>2?arguments[2]:void 0,u=Math.min((void 0===c?s:r(c,s))-l,s-a),h=1;for(l<a&&a<l+u&&(h=-1,l+=u-1,a+=u-1);u-- >0;)l in n?n[a]=n[l]:delete n[a],a+=h,l+=h;return n}},function(t,e,n){"use strict";var i=n(44),r=n(2),o=n(5),s=n(16),a=n(3)("isConcatSpreadable");t.exports=function t(e,n,l,c,u,h,f,_){for(var p,d,m=u,y=0,v=!!f&&s(f,_,3);y<c;){if(y in l){if(p=v?v(l[y],y,n):l[y],d=!1,r(p)&&(d=void 0!==(d=p[a])?!!d:i(p)),d&&h>0)m=t(e,n,p,o(p.length),m,h-1)-1;else{if(m>=9007199254740991)throw TypeError();e[m]=p}m++}y++}return m}},function(t,e,n){e.f=n(3)},function(t,e,n){var i=n(9),r=n(40).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?function(t){try{return r(t)}catch(t){return s.slice()}}(t):r(i(t))}},function(t,e,n){var i=n(40),r=n(47),o=n(11),s=n(1).Reflect;t.exports=s&&s.ownKeys||function(t){var e=i.f(o(t)),n=r.f;return n?e.concat(n(t)):e}},function(t,e,n){var i=n(25),r=n(9),o=n(39).f;t.exports=function(t){return function(e){for(var n,s=r(e),a=i(s),l=a.length,c=0,u=[];l>c;)o.call(s,n=a[c++])&&u.push(t?[n,s[n]]:s[n]);return u}}},function(t,e,n){var i=n(7),r=n(22),o=n(85),s=n(9);t.exports=function(t,e){for(var n,a=o(s(e)),l=a.length,c=0;l>c;)i.f(t,n=a[c++],r.f(e,n));return t}},function(t,e,n){var i,r,o,s=n(16),a=n(168),l=n(57),c=n(53),u=n(1),h=u.process,f=u.setImmediate,_=u.clearImmediate,p=u.MessageChannel,d=u.Dispatch,m=0,y={},v="onreadystatechange",b=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},g=function(t){b.call(t.data)};f&&_||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return y[++m]=function(){a("function"==typeof t?t:Function(t),e)},i(m),m},_=function(t){delete y[t]},"process"==n(32)(h)?i=function(t){h.nextTick(s(b,t,1))}:d&&d.now?i=function(t){d.now(s(b,t,1))}:p?(o=(r=new p).port2,r.port1.onmessage=g,i=s(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(i=function(t){u.postMessage(t+"","*")},u.addEventListener("message",g,!1)):i=v in c("script")?function(t){l.appendChild(c("script"))[v]=function(){l.removeChild(this),b.call(t)}}:function(t){setTimeout(s(b,t,1),0)}),t.exports={set:f,clear:_}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var i=n(11),r=n(2),o=n(67);t.exports=function(t,e){if(i(t),r(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var i=n(19),r=n(5);t.exports=function(t){if(void 0===t)return 0;var e=i(t),n=r(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){"use strict";var i,r=n(192),o=t.exports;Object.assign(o,n(42),n(70));var s=16,a=4129,l=65535,c=1<<s-1;function u(t,e){return i||function(){i=new Array(256);for(var t=s-8,e=0;e<256;e++){for(var n=e<<t&l,r=0;r<8;r++)0!=(n&c)?(n<<=1,n^=a):n<<=1;i[e]=n&l}}(),i[e>>8&255]^(255&e)<<8^t}function h(t,e){if(t.join()!==e.join())throw new o.Error("crc",e,t)}o.CRC={crc16:function(t){for(var e=t[0],n=1;n<t.length;n++)e=u(t[n],e);return e=u(0,u(0,e)),o.ENCODELIB.pack_u16_be(e)},crc32:function(t){return o.ENCODELIB.pack_u32_le(r.buf(t)>>>0)},verify16:function(t,e){return h(this.crc16(t),e)},verify32:function(t,e){try{h(this.crc32(t),e)}catch(e){throw e.input=t.slice(0),e}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CHARSETS={},e.DEFAULT_CHARSET=e.CHARSETS.B,e.CHARSETS[0]={"`":"◆",a:"▒",b:"\t",c:"\f",d:"\r",e:"\n",f:"°",g:"±",h:"",i:"\v",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},e.CHARSETS.A={"#":"£"},e.CHARSETS.B=null,e.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},e.CHARSETS.C=e.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},e.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},e.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},e.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},e.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},e.CHARSETS.E=e.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},e.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},e.CHARSETS.H=e.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},e.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),(i=e.FLAGS||(e.FLAGS={}))[i.BOLD=1]="BOLD",i[i.UNDERLINE=2]="UNDERLINE",i[i.BLINK=4]="BLINK",i[i.INVERSE=8]="INVERSE",i[i.INVISIBLE=16]="INVISIBLE",i[i.DIM=32]="DIM"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(73);e.CHAR_ATLAS_CELL_SPACING=1;var r,o=[];function s(t,e){for(var n=0;n<t.colors.ansi.length;n++)if(t.colors.ansi[n]!==e.colors.ansi[n])return!1;return t.fontFamily===e.fontFamily&&t.fontSize===e.fontSize&&t.scaledCharWidth===e.scaledCharWidth&&t.scaledCharHeight===e.scaledCharHeight&&t.colors.foreground===e.colors.foreground&&t.colors.background===e.colors.background}e.acquireCharAtlas=function(t,e,n,i){for(var a,l,c,u,h,f=(a=n,l=i,c=t,h={foreground:(u=e).foreground,background:u.background,cursor:null,cursorAccent:null,selection:null,ansi:u.ansi.slice(0,16)},{scaledCharWidth:a,scaledCharHeight:l,fontFamily:c.options.fontFamily,fontSize:c.options.fontSize,colors:h}),_=0;_<o.length;_++){var p=(d=o[_]).ownedBy.indexOf(t);if(p>=0){if(s(d.config,f))return d.bitmap;1===d.ownedBy.length?o.splice(_,1):d.ownedBy.splice(p,1);break}}for(_=0;_<o.length;_++){var d;if(s((d=o[_]).config,f))return d.ownedBy.push(t),d.bitmap}var m={bitmap:r.generate(n,i,t.options.fontSize,t.options.fontFamily,e.background,e.foreground,e.ansi),config:f,ownedBy:[t]};return o.push(m),m.bitmap},e.initialize=function(t){r||(r=new a(t))};var a=function(){function t(t){this._document=t,this._canvas=this._document.createElement("canvas"),this._ctx=this._canvas.getContext("2d",{alpha:!1}),this._ctx.scale(window.devicePixelRatio,window.devicePixelRatio)}return t.prototype.generate=function(t,n,r,o,s,a,l){var c=t+e.CHAR_ATLAS_CELL_SPACING,u=n+e.CHAR_ATLAS_CELL_SPACING;this._canvas.width=255*c,this._canvas.height=18*u,this._ctx.fillStyle=s,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height),this._ctx.save(),this._ctx.fillStyle=a,this._ctx.font=r*window.devicePixelRatio+"px "+o,this._ctx.textBaseline="top";for(var h=0;h<256;h++)this._ctx.save(),this._ctx.beginPath(),this._ctx.rect(h*c,0,c,u),this._ctx.clip(),this._ctx.fillText(String.fromCharCode(h),h*c,0),this._ctx.restore();this._ctx.save(),this._ctx.font="bold "+this._ctx.font;for(h=0;h<256;h++)this._ctx.save(),this._ctx.beginPath(),this._ctx.rect(h*c,u,c,u),this._ctx.clip(),this._ctx.fillText(String.fromCharCode(h),h*c,u),this._ctx.restore();this._ctx.restore(),this._ctx.font=r*window.devicePixelRatio+"px "+o;for(var f=0;f<16;f++){8===f&&(this._ctx.font="bold "+this._ctx.font);var _=(f+2)*u;for(h=0;h<256;h++)this._ctx.save(),this._ctx.beginPath(),this._ctx.rect(h*c,_,c,u),this._ctx.clip(),this._ctx.fillStyle=l[f],this._ctx.fillText(String.fromCharCode(h),h*c,_),this._ctx.restore()}if(this._ctx.restore(),!("createImageBitmap"in window)||i.isFirefox){var p=this._canvas;return this._canvas=this._document.createElement("canvas"),this._ctx=this._canvas.getContext("2d"),this._ctx.scale(window.devicePixelRatio,window.devicePixelRatio),p}var d=this._ctx.getImageData(0,0,this._canvas.width,this._canvas.height),m=parseInt(s.substr(1,2),16),y=parseInt(s.substr(3,2),16),v=parseInt(s.substr(5,2),16);this._clearColor(d,m,y,v);var b=window.createImageBitmap(d);return this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),b},t.prototype._clearColor=function(t,e,n,i){for(var r=0;r<t.data.length;r+=4)t.data[r]===e&&t.data[r+1]===n&&t.data[r+2]===i&&(t.data[r+3]=0)},t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="#ffffff",r="#000000",o="#ffffff",s="#000000",a="rgba(255, 255, 255, 0.3)";function l(t){var e=t.toString(16);return e.length<2?"0"+e:e}e.DEFAULT_ANSI_COLORS=["#2e3436","#cc0000","#4e9a06","#c4a000","#3465a4","#75507b","#06989a","#d3d7cf","#555753","#ef2929","#8ae234","#fce94f","#729fcf","#ad7fa8","#34e2e2","#eeeeec"];var c=function(){function t(){this.colors={foreground:i,background:r,cursor:o,cursorAccent:s,selection:a,ansi:function(t){for(var e=t.slice(),n=[0,95,135,175,215,255],i=0;i<216;i++){var r=l(n[i/36%6|0]),o=l(n[i/6%6|0]),s=l(n[i%6]);e.push("#"+r+o+s)}for(i=0;i<24;i++){var a=l(8+10*i);e.push("#"+a+a+a)}return e}(e.DEFAULT_ANSI_COLORS)}}return t.prototype.setTheme=function(t){this.colors.foreground=t.foreground||i,this.colors.background=this._validateColor(t.background,r),this.colors.cursor=t.cursor||o,this.colors.cursorAccent=t.cursorAccent||s,this.colors.selection=t.selection||a,this.colors.ansi[0]=t.black||e.DEFAULT_ANSI_COLORS[0],this.colors.ansi[1]=t.red||e.DEFAULT_ANSI_COLORS[1],this.colors.ansi[2]=t.green||e.DEFAULT_ANSI_COLORS[2],this.colors.ansi[3]=t.yellow||e.DEFAULT_ANSI_COLORS[3],this.colors.ansi[4]=t.blue||e.DEFAULT_ANSI_COLORS[4],this.colors.ansi[5]=t.magenta||e.DEFAULT_ANSI_COLORS[5],this.colors.ansi[6]=t.cyan||e.DEFAULT_ANSI_COLORS[6],this.colors.ansi[7]=t.white||e.DEFAULT_ANSI_COLORS[7],this.colors.ansi[8]=t.brightBlack||e.DEFAULT_ANSI_COLORS[8],this.colors.ansi[9]=t.brightRed||e.DEFAULT_ANSI_COLORS[9],this.colors.ansi[10]=t.brightGreen||e.DEFAULT_ANSI_COLORS[10],this.colors.ansi[11]=t.brightYellow||e.DEFAULT_ANSI_COLORS[11],this.colors.ansi[12]=t.brightBlue||e.DEFAULT_ANSI_COLORS[12],this.colors.ansi[13]=t.brightMagenta||e.DEFAULT_ANSI_COLORS[13],this.colors.ansi[14]=t.brightCyan||e.DEFAULT_ANSI_COLORS[14],this.colors.ansi[15]=t.brightWhite||e.DEFAULT_ANSI_COLORS[15]},t.prototype._validateColor=function(t,e){if(!t)return e;if(7===t.length&&"#"===t.charAt(0))return t;if(4===t.length&&"#"===t.charAt(0)){var n=t.charAt(1),i=t.charAt(2),r=t.charAt(3);return"#"+n+n+i+i+r+r}return e},t}();e.ColorManager=c},function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),(i=e.LinkHoverEventTypes||(e.LinkHoverEventTypes={})).HOVER="linkhover",i.TOOLTIP="linktooltip",i.LEAVE="linkleave"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){var e=this;this._terminal=t,this._zones=[],this._areZonesActive=!1,this._tooltipTimeout=null,this._currentZone=null,this._lastHoverCoords=[null,null],this._terminal.element.addEventListener("mousedown",function(t){return e._onMouseDown(t)}),this._mouseMoveListener=function(t){return e._onMouseMove(t)},this._clickListener=function(t){return e._onClick(t)}}return t.prototype.add=function(t){this._zones.push(t),1===this._zones.length&&this._activate()},t.prototype.clearAll=function(t,e){if(0!==this._zones.length){e||(t=0,e=this._terminal.rows-1);for(var n=0;n<this._zones.length;n++){var i=this._zones[n];i.y>t&&i.y<=e+1&&(this._currentZone&&this._currentZone===i&&(this._currentZone.leaveCallback(),this._currentZone=null),this._zones.splice(n--,1))}0===this._zones.length&&this._deactivate()}},t.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._terminal.element.addEventListener("mousemove",this._mouseMoveListener),this._terminal.element.addEventListener("click",this._clickListener))},t.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._terminal.element.removeEventListener("mousemove",this._mouseMoveListener),this._terminal.element.removeEventListener("click",this._clickListener))},t.prototype._onMouseMove=function(t){this._lastHoverCoords[0]===t.pageX&&this._lastHoverCoords[1]===t.pageY||(this._onHover(t),this._lastHoverCoords=[t.pageX,t.pageY])},t.prototype._onHover=function(t){var e=this,n=this._findZoneEventAt(t);n!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=null,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),n&&(this._currentZone=n,n.hoverCallback&&n.hoverCallback(t),this._tooltipTimeout=setTimeout(function(){return e._onTooltip(t)},500)))},t.prototype._onTooltip=function(t){this._tooltipTimeout=null;var e=this._findZoneEventAt(t);e&&e.tooltipCallback&&e.tooltipCallback(t)},t.prototype._onMouseDown=function(t){this._areZonesActive&&(this._findZoneEventAt(t)&&(t.preventDefault(),t.stopImmediatePropagation()))},t.prototype._onClick=function(t){var e=this._findZoneEventAt(t);e&&(e.clickCallback(t),t.preventDefault(),t.stopImmediatePropagation())},t.prototype._findZoneEventAt=function(t){var e=this._terminal.mouseHelper.getCoords(t,this._terminal.element,this._terminal.charMeasure,this._terminal.options.lineHeight,this._terminal.cols,this._terminal.rows);if(!e)return null;for(var n=0;n<this._zones.length;n++){var i=this._zones[n];if(i.y===e[1]&&i.x1<=e[0]&&i.x2>e[0])return i}return null},t}();e.MouseZoneManager=i;var r=function(){return function(t,e,n,i,r,o,s){this.x1=t,this.x2=e,this.y=n,this.clickCallback=i,this.hoverCallback=r,this.tooltipCallback=o,this.leaveCallback=s}}();e.MouseZone=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){this._renderer=t}return t.getCoordsRelativeToElement=function(t,e){if(null==t.pageX)return null;for(var n=e,i=t.pageX,r=t.pageY;e;)i-=e.offsetLeft,r-=e.offsetTop,e="offsetParent"in e?e.offsetParent:e.parentElement;for(e=n;e&&e!==e.ownerDocument.body;)i+=e.scrollLeft,r+=e.scrollTop,e=e.parentElement;return[i,r]},t.prototype.getCoords=function(e,n,i,r,o,s,a){if(!i.width||!i.height)return null;var l=t.getCoordsRelativeToElement(e,n);return l?(l[0]=Math.ceil((l[0]+(a?this._renderer.dimensions.actualCellWidth/2:0))/this._renderer.dimensions.actualCellWidth),l[1]=Math.ceil(l[1]/this._renderer.dimensions.actualCellHeight),l[0]=Math.min(Math.max(l[0],1),o+(a?1:0)),l[1]=Math.min(Math.max(l[1],1),s),l):null},t.prototype.getRawByteCoords=function(t,e,n,i,r,o){var s=this.getCoords(t,e,n,i,r,o),a=s[0],l=s[1];return{x:a+=32,y:l+=32}},t}();e.MouseHelper=i},function(t,e,n){n(101),t.exports=n(219)},function(t,e,n){"use strict";n(102),n(130),n(164),n(172),n(184);var i=n(186),r=n(195).Terminal;r.applyAddon(n(216)),r.applyAddon(n(217)),r.applyAddon(n(218));var o={self:document.getElementById("modal"),header:document.getElementById("header"),status:{self:document.getElementById("status"),filesRemaining:document.getElementById("files-remaining"),bytesRemaining:document.getElementById("bytes-remaining")},choose:{self:document.getElementById("choose"),files:document.getElementById("files"),filesNames:document.getElementById("file-names")},progress:{self:document.getElementById("progress"),fileName:document.getElementById("file-name"),progressBar:document.getElementById("progress-bar"),bytesReceived:document.getElementById("bytes-received"),bytesFile:document.getElementById("bytes-file"),percentReceived:document.getElementById("percent-received"),skip:document.getElementById("skip")}};function s(t){o.status.self.style.display="",o.choose.self.style.display="none",o.progress.self.style.display="",o.status.filesRemaining.textContent=t.files_remaining,o.status.bytesRemaining.textContent=u(t.bytes_remaining,2),o.progress.fileName.textContent=t.name}function a(){o.self.classList.remove("is-active")}function l(t){o.header.textContent=t,o.status.self.style.display="none",o.choose.self.style.display="none",o.progress.self.style.display="none",o.progress.bytesReceived.textContent="-",o.progress.percentReceived.textContent="-%",o.progress.progressBar.textContent="0%",o.progress.progressBar.value=0,o.progress.skip.style.display="none"}function c(t){var e=t.get_details().size,n=t.get_offset();o.progress.bytesReceived.textContent=u(n,2),o.progress.bytesFile.textContent=u(e,2);var i=(100*n/e).toFixed(2);o.progress.percentReceived.textContent=i+"%",o.progress.progressBar.textContent=i+"%",o.progress.progressBar.setAttribute("value",i)}function u(t,e){if(isNaN(parseFloat(t))||!isFinite(t))return"-";if(0===t)return 0;void 0===e&&(e=1);var n=Math.floor(Math.log(t)/Math.log(1024));return(t/Math.pow(1024,Math.floor(n))).toFixed(e)+" "+["bytes","KB","MB","GB","TB","PB"][n]}function h(t){return new Promise(function(e){var n;n=function(n){i.Browser.send_files(t,n,{on_progress:function(t,e){s(e.get_details()),c(e)},on_file_complete:function(t){}}).then(t.close.bind(t),console.error.bind(console)).then(function(){e()})},l("Sending files"),o.choose.self.style.display="",o.choose.files.disabled=!1,o.choose.files.value="",o.choose.filesNames.textContent="",o.choose.files.onchange=function(){this.disabled=!0;for(var t=this.files,e="",i=0;i<t.length;i++)0===i?e=t[i].name:e+=", "+t[i].name;o.choose.filesNames.textContent=e,n(t)},o.self.classList.add("is-active")})}function f(t){t.on("offer",function(t){var e;e=t,l("Receiving files"),s(e.get_details()),o.progress.skip.disabled=!1,o.progress.skip.onclick=function(){this.disabled=!0,e.skip()},o.progress.skip.style.display="",o.self.classList.add("is-active");var n=[];t.on("input",function(e){c(t),n.push(new Uint8Array(e))}),t.accept().then(function(){i.Browser.save_to_disk(n,t.get_details().name)},console.error.bind(console))});var e=new Promise(function(e){t.on("session_end",function(){e()})});return t.start(),e}var _,p,d,m,y=document.getElementById("terminal-container"),v=("https:"===window.location.protocol?"wss://":"ws://")+window.location.host+window.location.pathname+"ws",b=new TextDecoder,g=new TextEncoder,C="undefined"!=typeof tty_auth_token?tty_auth_token:null,w=-1,S=function t(){var e=new WebSocket(v,["tty"]),n=function(t){e.readyState===WebSocket.OPEN&&e.send(g.encode(t))},o=function(t){n("0"+t)},s=function(t){var e="Close terminal? this will also terminate the command.";return(t||window.event).returnValue=e,e},l=new i.Sentry({to_terminal:function(t){var e=new Uint8Array(t).buffer;p.write(b.decode(e))},sender:function(t){for(;t.length;){var n=t.splice(0,4095),i=new Uint8Array(n.length+1);i[0]="0".charCodeAt(0),i.set(n,1),e.send(i)}},on_retract:function(){},on_detect:function(t){p.setOption("disableStdin",!0);var e=t.confirm();("send"===e.type?h(e):f(e)).catch(console.error.bind(console)).then(function(){a(),p.setOption("disableStdin",!1)})}});e.binaryType="arraybuffer",e.onopen=function(t){for(console.log("Websocket connection opened"),m=!1,n(JSON.stringify({AuthToken:C})),void 0!==p&&p.destroy(),(p=new r({fontSize:13,fontFamily:'"Menlo for Powerline", Menlo, Consolas, "Liberation Mono", Courier, monospace',theme:{foreground:"#d2d2d2",background:"#2b2b2b",cursor:"#adadad",black:"#000000",red:"#d81e00",green:"#5ea702",yellow:"#cfae00",blue:"#427ab3",magenta:"#89658e",cyan:"#00a7aa",white:"#dbded8",brightBlack:"#686a66",brightRed:"#f54235",brightGreen:"#99e343",brightYellow:"#fdeb61",brightBlue:"#84b0d8",brightMagenta:"#bc94b7",brightCyan:"#37e6e8",brightWhite:"#f1f1f0"}})).on("resize",function(t){e.readyState===WebSocket.OPEN&&n("1"+JSON.stringify({columns:t.cols,rows:t.rows})),setTimeout(function(){p.showOverlay(t.cols+"x"+t.rows)},500)}),p.on("title",function(t){t&&""!==t&&(document.title=t+" | "+d)}),p.on("data",o);y.firstChild;)y.removeChild(y.firstChild);window.addEventListener("resize",function(){clearTimeout(window.resizedFinished),window.resizedFinished=setTimeout(function(){p.fit()},250)}),window.addEventListener("beforeunload",s),p.open(y,!0),p.winptyCompatInit(),p.fit(),p.focus()},e.onmessage=function(n){var i=new Uint8Array(n.data),r=String.fromCharCode(i[0]),o=i.slice(1).buffer;switch(r){case"0":try{l.consume(o)}catch(n){console.error(n),a(),clearTimeout(_),e.readyState!==WebSocket.CLOSED&&e.close(),t()}break;case"1":d=b.decode(o),document.title=d;break;case"2":var s=JSON.parse(b.decode(o));Object.keys(s).forEach(function(t){console.log("Setting "+t+": "+s[t]),p.setOption(t,s[t])});break;case"3":w=JSON.parse(b.decode(o)),console.log("Enabling reconnect: "+w+" seconds");break;default:console.log("Unknown command: "+r)}},e.onclose=function(e){console.log("Websocket connection closed with code: "+e.code),p&&(p.off("data"),p.off("resize"),m||p.showOverlay("Connection Closed",null)),window.removeEventListener("beforeunload",s),1e3!==e.code&&w>0&&(_=setTimeout(t,1e3*w))}};"complete"===document.readyState||"loading"!==document.readyState?S():document.addEventListener("DOMContentLoaded",S)},function(t,e,n){n(74),n(105),n(106),n(107),n(108),n(109),n(110),n(111),n(113),n(114),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(124),n(125),n(64),n(127),n(128),n(129),t.exports=n(10).Array},function(t,e,n){var i=n(19),r=n(52);t.exports=function(t){return function(e,n){var o,s,a=String(r(e)),l=i(n),c=a.length;return l<0||l>=c?t?"":void 0:(o=a.charCodeAt(l))<55296||o>56319||l+1===c||(s=a.charCodeAt(l+1))<56320||s>57343?t?a.charAt(l):o:t?a.slice(l,l+2):s-56320+(o-55296<<10)+65536}}},function(t,e,n){"use strict";var i=n(34),r=n(29),o=n(36),s={};n(13)(s,n(3)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(s,{next:r(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var i=n(0);i(i.S,"Array",{isArray:n(44)})},function(t,e,n){"use strict";var i=n(16),r=n(0),o=n(4),s=n(79),a=n(58),l=n(5),c=n(59),u=n(60);r(r.S+r.F*!n(61)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,r,h,f=o(t),_="function"==typeof this?this:Array,p=arguments.length,d=p>1?arguments[1]:void 0,m=void 0!==d,y=0,v=u(f);if(m&&(d=i(d,p>2?arguments[2]:void 0,2)),void 0==v||_==Array&&a(v))for(n=new _(e=l(f.length));e>y;y++)c(n,y,m?d(f[y],y):f[y]);else for(h=v.call(f),n=new _;!(r=h.next()).done;y++)c(n,y,m?s(h,d,[r.value,y],!0):r.value);return n.length=y,n}})},function(t,e,n){"use strict";var i=n(0),r=n(59);i(i.S+i.F*n(8)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)r(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var i=n(0),r=n(9),o=[].join;i(i.P+i.F*(n(35)!=Object||!n(12)(o)),"Array",{join:function(t){return o.call(r(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var i=n(0),r=n(57),o=n(32),s=n(33),a=n(5),l=[].slice;i(i.P+i.F*n(8)(function(){r&&l.call(r)}),"Array",{slice:function(t,e){var n=a(this.length),i=o(this);if(e=void 0===e?n:e,"Array"==i)return l.call(this,t,e);for(var r=s(t,n),c=s(e,n),u=a(c-r),h=new Array(u),f=0;f<u;f++)h[f]="String"==i?this.charAt(r+f):this[r+f];return h}})},function(t,e,n){"use strict";var i=n(0),r=n(17),o=n(4),s=n(8),a=[].sort,l=[1,2,3];i(i.P+i.F*(s(function(){l.sort(void 0)})||!s(function(){l.sort(null)})||!n(12)(a)),"Array",{sort:function(t){return void 0===t?a.call(o(this)):a.call(o(this),r(t))}})},function(t,e,n){"use strict";var i=n(0),r=n(20)(0),o=n(12)([].forEach,!0);i(i.P+i.F*!o,"Array",{forEach:function(t){return r(this,t,arguments[1])}})},function(t,e,n){var i=n(2),r=n(44),o=n(3)("species");t.exports=function(t){var e;return r(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!r(e.prototype)||(e=void 0),i(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){"use strict";var i=n(0),r=n(20)(1);i(i.P+i.F*!n(12)([].map,!0),"Array",{map:function(t){return r(this,t,arguments[1])}})},function(t,e,n){"use strict";var i=n(0),r=n(20)(2);i(i.P+i.F*!n(12)([].filter,!0),"Array",{filter:function(t){return r(this,t,arguments[1])}})},function(t,e,n){"use strict";var i=n(0),r=n(20)(3);i(i.P+i.F*!n(12)([].some,!0),"Array",{some:function(t){return r(this,t,arguments[1])}})},function(t,e,n){"use strict";var i=n(0),r=n(20)(4);i(i.P+i.F*!n(12)([].every,!0),"Array",{every:function(t){return r(this,t,arguments[1])}})},function(t,e,n){"use strict";var i=n(0),r=n(80);i(i.P+i.F*!n(12)([].reduce,!0),"Array",{reduce:function(t){return r(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){"use strict";var i=n(0),r=n(80);i(i.P+i.F*!n(12)([].reduceRight,!0),"Array",{reduceRight:function(t){return r(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var i=n(0),r=n(43)(!1),o=[].indexOf,s=!!o&&1/[1].indexOf(1,-0)<0;i(i.P+i.F*(s||!n(12)(o)),"Array",{indexOf:function(t){return s?o.apply(this,arguments)||0:r(this,t,arguments[1])}})},function(t,e,n){"use strict";var i=n(0),r=n(9),o=n(19),s=n(5),a=[].lastIndexOf,l=!!a&&1/[1].lastIndexOf(1,-0)<0;i(i.P+i.F*(l||!n(12)(a)),"Array",{lastIndexOf:function(t){if(l)return a.apply(this,arguments)||0;var e=r(this),n=s(e.length),i=n-1;for(arguments.length>1&&(i=Math.min(i,o(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in e&&e[i]===t)return i||0;return-1}})},function(t,e,n){var i=n(0);i(i.P,"Array",{copyWithin:n(81)}),n(21)("copyWithin")},function(t,e,n){var i=n(0);i(i.P,"Array",{fill:n(63)}),n(21)("fill")},function(t,e,n){"use strict";var i=n(0),r=n(20)(5),o="find",s=!0;o in[]&&Array(1)[o](function(){s=!1}),i(i.P+i.F*s,"Array",{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n(21)(o)},function(t,e,n){"use strict";var i=n(0),r=n(20)(6),o="findIndex",s=!0;o in[]&&Array(1)[o](function(){s=!1}),i(i.P+i.F*s,"Array",{findIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n(21)(o)},function(t,e,n){n(45)("Array")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var i=n(0),r=n(43)(!0);i(i.P,"Array",{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n(21)("includes")},function(t,e,n){"use strict";var i=n(0),r=n(82),o=n(4),s=n(5),a=n(17),l=n(62);i(i.P,"Array",{flatMap:function(t){var e,n,i=o(this);return a(t),e=s(i.length),n=l(i,0),r(n,i,i,e,0,1,t,arguments[1]),n}}),n(21)("flatMap")},function(t,e,n){"use strict";var i=n(0),r=n(82),o=n(4),s=n(5),a=n(19),l=n(62);i(i.P,"Array",{flatten:function(){var t=arguments[0],e=o(this),n=s(e.length),i=l(e,0);return r(i,e,e,n,0,void 0===t?1:a(t)),i}}),n(21)("flatten")},function(t,e,n){n(131),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(149),n(151),n(65),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161),n(162),n(163),t.exports=n(10).Object},function(t,e,n){"use strict";var i=n(1),r=n(15),o=n(6),s=n(0),a=n(30),l=n(46).KEY,c=n(8),u=n(55),h=n(36),f=n(24),_=n(3),p=n(83),d=n(132),m=n(133),y=n(44),v=n(11),b=n(2),g=n(9),C=n(28),w=n(29),S=n(34),A=n(84),x=n(22),k=n(7),E=n(25),O=x.f,L=k.f,T=A.f,R=i.Symbol,I=i.JSON,M=I&&I.stringify,P="prototype",D=_("_hidden"),H=_("toPrimitive"),N={}.propertyIsEnumerable,B=u("symbol-registry"),F=u("symbols"),j=u("op-symbols"),Z=Object[P],W="function"==typeof R,U=i.QObject,z=!U||!U[P]||!U[P].findChild,V=o&&c(function(){return 7!=S(L({},"a",{get:function(){return L(this,"a",{value:7}).a}})).a})?function(t,e,n){var i=O(Z,e);i&&delete Z[e],L(t,e,n),i&&t!==Z&&L(Z,e,i)}:L,K=function(t){var e=F[t]=S(R[P]);return e._k=t,e},X=W&&"symbol"==typeof R.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof R},G=function(t,e,n){return t===Z&&G(j,e,n),v(t),e=C(e,!0),v(n),r(F,e)?(n.enumerable?(r(t,D)&&t[D][e]&&(t[D][e]=!1),n=S(n,{enumerable:w(0,!1)})):(r(t,D)||L(t,D,w(1,{})),t[D][e]=!0),V(t,e,n)):L(t,e,n)},Y=function(t,e){v(t);for(var n,i=m(e=g(e)),r=0,o=i.length;o>r;)G(t,n=i[r++],e[n]);return t},q=function(t){var e=N.call(this,t=C(t,!0));return!(this===Z&&r(F,t)&&!r(j,t))&&(!(e||!r(this,t)||!r(F,t)||r(this,D)&&this[D][t])||e)},Q=function(t,e){if(t=g(t),e=C(e,!0),t!==Z||!r(F,e)||r(j,e)){var n=O(t,e);return!n||!r(F,e)||r(t,D)&&t[D][e]||(n.enumerable=!0),n}},J=function(t){for(var e,n=T(g(t)),i=[],o=0;n.length>o;)r(F,e=n[o++])||e==D||e==l||i.push(e);return i},$=function(t){for(var e,n=t===Z,i=T(n?j:g(t)),o=[],s=0;i.length>s;)!r(F,e=i[s++])||n&&!r(Z,e)||o.push(F[e]);return o};W||(a((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===Z&&e.call(j,n),r(this,D)&&r(this[D],t)&&(this[D][t]=!1),V(this,t,w(1,n))};return o&&z&&V(Z,t,{configurable:!0,set:e}),K(t)})[P],"toString",function(){return this._k}),x.f=Q,k.f=G,n(40).f=A.f=J,n(39).f=q,n(47).f=$,o&&!n(23)&&a(Z,"propertyIsEnumerable",q,!0),p.f=function(t){return K(_(t))}),s(s.G+s.W+s.F*!W,{Symbol:R});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)_(tt[et++]);for(var nt=E(_.store),it=0;nt.length>it;)d(nt[it++]);s(s.S+s.F*!W,"Symbol",{for:function(t){return r(B,t+="")?B[t]:B[t]=R(t)},keyFor:function(t){if(!X(t))throw TypeError(t+" is not a symbol!");for(var e in B)if(B[e]===t)return e},useSetter:function(){z=!0},useSimple:function(){z=!1}}),s(s.S+s.F*!W,"Object",{create:function(t,e){return void 0===e?S(t):Y(S(t),e)},defineProperty:G,defineProperties:Y,getOwnPropertyDescriptor:Q,getOwnPropertyNames:J,getOwnPropertySymbols:$}),I&&s(s.S+s.F*(!W||c(function(){var t=R();return"[null]"!=M([t])||"{}"!=M({a:t})||"{}"!=M(Object(t))})),"JSON",{stringify:function(t){for(var e,n,i=[t],r=1;arguments.length>r;)i.push(arguments[r++]);if(n=e=i[1],(b(e)||void 0!==t)&&!X(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!X(e))return e}),i[1]=e,M.apply(I,i)}}),R[P][H]||n(13)(R[P],H,R[P].valueOf),h(R,"Symbol"),h(Math,"Math",!0),h(i.JSON,"JSON",!0)},function(t,e,n){var i=n(1),r=n(10),o=n(23),s=n(83),a=n(7).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,n){var i=n(25),r=n(47),o=n(39);t.exports=function(t){var e=i(t),n=r.f;if(n)for(var s,a=n(t),l=o.f,c=0;a.length>c;)l.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,n){var i=n(0);i(i.S,"Object",{create:n(34)})},function(t,e,n){var i=n(0);i(i.S+i.F*!n(6),"Object",{defineProperty:n(7).f})},function(t,e,n){var i=n(0);i(i.S+i.F*!n(6),"Object",{defineProperties:n(77)})},function(t,e,n){var i=n(9),r=n(22).f;n(14)("getOwnPropertyDescriptor",function(){return function(t,e){return r(i(t),e)}})},function(t,e,n){var i=n(4),r=n(37);n(14)("getPrototypeOf",function(){return function(t){return r(i(t))}})},function(t,e,n){var i=n(4),r=n(25);n(14)("keys",function(){return function(t){return r(i(t))}})},function(t,e,n){n(14)("getOwnPropertyNames",function(){return n(84).f})},function(t,e,n){var i=n(2),r=n(46).onFreeze;n(14)("freeze",function(t){return function(e){return t&&i(e)?t(r(e)):e}})},function(t,e,n){var i=n(2),r=n(46).onFreeze;n(14)("seal",function(t){return function(e){return t&&i(e)?t(r(e)):e}})},function(t,e,n){var i=n(2),r=n(46).onFreeze;n(14)("preventExtensions",function(t){return function(e){return t&&i(e)?t(r(e)):e}})},function(t,e,n){var i=n(2);n(14)("isFrozen",function(t){return function(e){return!i(e)||!!t&&t(e)}})},function(t,e,n){var i=n(2);n(14)("isSealed",function(t){return function(e){return!i(e)||!!t&&t(e)}})},function(t,e,n){var i=n(2);n(14)("isExtensible",function(t){return function(e){return!!i(e)&&(!t||t(e))}})},function(t,e,n){var i=n(0);i(i.S+i.F,"Object",{assign:n(148)})},function(t,e,n){"use strict";var i=n(25),r=n(47),o=n(39),s=n(4),a=n(35),l=Object.assign;t.exports=!l||n(8)(function(){var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(t){e[t]=t}),7!=l({},t)[n]||Object.keys(l({},e)).join("")!=i})?function(t,e){for(var n=s(t),l=arguments.length,c=1,u=r.f,h=o.f;l>c;)for(var f,_=a(arguments[c++]),p=u?i(_).concat(u(_)):i(_),d=p.length,m=0;d>m;)h.call(_,f=p[m++])&&(n[f]=_[f]);return n}:l},function(t,e,n){var i=n(0);i(i.S,"Object",{is:n(150)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){var i=n(0);i(i.S,"Object",{setPrototypeOf:n(152).set})},function(t,e,n){var i=n(2),r=n(11),o=function(t,e){if(r(t),!i(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,i){try{(i=n(16)(Function.call,n(22).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:i(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){var i=n(0),r=n(85),o=n(9),s=n(22),a=n(59);i(i.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,i=o(t),l=s.f,c=r(i),u={},h=0;c.length>h;)void 0!==(n=l(i,e=c[h++]))&&a(u,e,n);return u}})},function(t,e,n){var i=n(0),r=n(86)(!1);i(i.S,"Object",{values:function(t){return r(t)}})},function(t,e,n){var i=n(0),r=n(86)(!0);i(i.S,"Object",{entries:function(t){return r(t)}})},function(t,e,n){"use strict";var i=n(0),r=n(4),o=n(17),s=n(7);n(6)&&i(i.P+n(48),"Object",{__defineGetter__:function(t,e){s.f(r(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(0),r=n(4),o=n(17),s=n(7);n(6)&&i(i.P+n(48),"Object",{__defineSetter__:function(t,e){s.f(r(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(0),r=n(4),o=n(28),s=n(37),a=n(22).f;n(6)&&i(i.P+n(48),"Object",{__lookupGetter__:function(t){var e,n=r(this),i=o(t,!0);do{if(e=a(n,i))return e.get}while(n=s(n))}})},function(t,e,n){"use strict";var i=n(0),r=n(4),o=n(28),s=n(37),a=n(22).f;n(6)&&i(i.P+n(48),"Object",{__lookupSetter__:function(t){var e,n=r(this),i=o(t,!0);do{if(e=a(n,i))return e.set}while(n=s(n))}})},function(t,e,n){var i=n(0);i(i.S+i.F,"Object",{isObject:n(2)})},function(t,e,n){var i=n(0);i(i.S+i.F,"Object",{classof:n(38)})},function(t,e,n){var i=n(0),r=n(87);i(i.S+i.F,"Object",{define:r})},function(t,e,n){var i=n(0),r=n(87),o=n(34);i(i.S+i.F,"Object",{make:function(t,e){return r(o(t),e)}})},function(t,e,n){n(65),n(74),n(165),n(166),n(170),n(171),t.exports=n(10).Promise},function(t,e,n){for(var i=n(64),r=n(25),o=n(30),s=n(1),a=n(13),l=n(31),c=n(3),u=c("iterator"),h=c("toStringTag"),f=l.Array,_={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=r(_),d=0;d<p.length;d++){var m,y=p[d],v=_[y],b=s[y],g=b&&b.prototype;if(g&&(g[u]||a(g,u,f),g[h]||a(g,h,y),l[y]=f,v))for(m in i)g[m]||o(g,m,i[m],!0)}},function(t,e,n){"use strict";var i,r,o,s,a=n(23),l=n(1),c=n(16),u=n(38),h=n(0),f=n(2),_=n(17),p=n(66),d=n(167),m=n(49),y=n(88).set,v=n(169)(),b=n(67),g=n(89),C=n(90),w="Promise",S=l.TypeError,A=l.process,x=l[w],k="process"==u(A),E=function(){},O=r=b.f,L=!!function(){try{var t=x.resolve(1),e=(t.constructor={})[n(3)("species")]=function(t){t(E,E)};return(k||"function"==typeof PromiseRejectionEvent)&&t.then(E)instanceof e}catch(t){}}(),T=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},R=function(t,e){if(!t._n){t._n=!0;var n=t._c;v(function(){for(var i=t._v,r=1==t._s,o=0,s=function(e){var n,o,s=r?e.ok:e.fail,a=e.resolve,l=e.reject,c=e.domain;try{s?(r||(2==t._h&&P(t),t._h=1),!0===s?n=i:(c&&c.enter(),n=s(i),c&&c.exit()),n===e.promise?l(S("Promise-chain cycle")):(o=T(n))?o.call(n,a,l):a(n)):l(i)}catch(t){l(t)}};n.length>o;)s(n[o++]);t._c=[],t._n=!1,e&&!t._h&&I(t)})}},I=function(t){y.call(l,function(){var e,n,i,r=t._v,o=M(t);if(o&&(e=g(function(){k?A.emit("unhandledRejection",r,t):(n=l.onunhandledrejection)?n({promise:t,reason:r}):(i=l.console)&&i.error&&i.error("Unhandled promise rejection",r)}),t._h=k||M(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},M=function(t){return 1!==t._h&&0===(t._a||t._c).length},P=function(t){y.call(l,function(){var e;k?A.emit("rejectionHandled",t):(e=l.onrejectionhandled)&&e({promise:t,reason:t._v})})},D=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),R(e,!0))},H=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=T(t))?v(function(){var i={_w:n,_d:!1};try{e.call(t,c(H,i,1),c(D,i,1))}catch(t){D.call(i,t)}}):(n._v=t,n._s=1,R(n,!1))}catch(t){D.call({_w:n,_d:!1},t)}}};L||(x=function(t){p(this,x,w,"_h"),_(t),i.call(this);try{t(c(H,this,1),c(D,this,1))}catch(t){D.call(this,t)}},(i=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(68)(x.prototype,{then:function(t,e){var n=O(m(this,x));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=k?A.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new i;this.promise=t,this.resolve=c(H,t,1),this.reject=c(D,t,1)},b.f=O=function(t){return t===x||t===s?new o(t):r(t)}),h(h.G+h.W+h.F*!L,{Promise:x}),n(36)(x,w),n(45)(w),s=n(10)[w],h(h.S+h.F*!L,w,{reject:function(t){var e=O(this);return(0,e.reject)(t),e.promise}}),h(h.S+h.F*(a||!L),w,{resolve:function(t){return C(a&&this===s?x:this,t)}}),h(h.S+h.F*!(L&&n(61)(function(t){x.all(t).catch(E)})),w,{all:function(t){var e=this,n=O(e),i=n.resolve,r=n.reject,o=g(function(){var n=[],o=0,s=1;d(t,!1,function(t){var a=o++,l=!1;n.push(void 0),s++,e.resolve(t).then(function(t){l||(l=!0,n[a]=t,--s||i(n))},r)}),--s||i(n)});return o.e&&r(o.v),n.promise},race:function(t){var e=this,n=O(e),i=n.reject,r=g(function(){d(t,!1,function(t){e.resolve(t).then(n.resolve,i)})});return r.e&&i(r.v),n.promise}})},function(t,e,n){var i=n(16),r=n(79),o=n(58),s=n(11),a=n(5),l=n(60),c={},u={};(e=t.exports=function(t,e,n,h,f){var _,p,d,m,y=f?function(){return t}:l(t),v=i(n,h,e?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(o(y)){for(_=a(t.length);_>b;b++)if((m=e?v(s(p=t[b])[0],p[1]):v(t[b]))===c||m===u)return m}else for(d=y.call(t);!(p=d.next()).done;)if((m=r(d,v,p.value,e))===c||m===u)return m}).BREAK=c,e.RETURN=u},function(t,e){t.exports=function(t,e,n){var i=void 0===n;switch(e.length){case 0:return i?t():t.call(n);case 1:return i?t(e[0]):t.call(n,e[0]);case 2:return i?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return i?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return i?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var i=n(1),r=n(88).set,o=i.MutationObserver||i.WebKitMutationObserver,s=i.process,a=i.Promise,l="process"==n(32)(s);t.exports=function(){var t,e,n,c=function(){var i,r;for(l&&(i=s.domain)&&i.exit();t;){r=t.fn,t=t.next;try{r()}catch(i){throw t?n():e=void 0,i}}e=void 0,i&&i.enter()};if(l)n=function(){s.nextTick(c)};else if(!o||i.navigator&&i.navigator.standalone)if(a&&a.resolve){var u=a.resolve();n=function(){u.then(c)}}else n=function(){r.call(i,c)};else{var h=!0,f=document.createTextNode("");new o(c).observe(f,{characterData:!0}),n=function(){f.data=h=!h}}return function(i){var r={fn:i,next:void 0};e&&(e.next=r),t||(t=r,n()),e=r}}},function(t,e,n){"use strict";var i=n(0),r=n(10),o=n(1),s=n(49),a=n(90);i(i.P+i.R,"Promise",{finally:function(t){var e=s(this,r.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return a(e,t()).then(function(){return n})}:t,n?function(n){return a(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var i=n(0),r=n(67),o=n(89);i(i.S,"Promise",{try:function(t){var e=r.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){n(173),n(174),n(175),n(176),n(177),n(178),n(179),n(180),n(181),n(182),n(183),n(65),t.exports=n(10)},function(t,e,n){"use strict";var i=n(0),r=n(50),o=n(69),s=n(11),a=n(33),l=n(5),c=n(2),u=n(1).ArrayBuffer,h=n(49),f=o.ArrayBuffer,_=o.DataView,p=r.ABV&&u.isView,d=f.prototype.slice,m=r.VIEW,y="ArrayBuffer";i(i.G+i.W+i.F*(u!==f),{ArrayBuffer:f}),i(i.S+i.F*!r.CONSTR,y,{isView:function(t){return p&&p(t)||c(t)&&m in t}}),i(i.P+i.U+i.F*n(8)(function(){return!new f(2).slice(1,void 0).byteLength}),y,{slice:function(t,e){if(void 0!==d&&void 0===e)return d.call(s(this),t);for(var n=s(this).byteLength,i=a(t,n),r=a(void 0===e?n:e,n),o=new(h(this,f))(l(r-i)),c=new _(this),u=new _(o),p=0;i<r;)u.setUint8(p++,c.getUint8(i++));return o}}),n(45)(y)},function(t,e,n){var i=n(0);i(i.G+i.W+i.F*!n(50).ABV,{DataView:n(69).DataView})},function(t,e,n){n(18)("Int8",1,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){n(18)("Uint8",1,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){n(18)("Uint8",1,function(t){return function(e,n,i){return t(this,e,n,i)}},!0)},function(t,e,n){n(18)("Int16",2,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){n(18)("Uint16",2,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){n(18)("Int32",4,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){n(18)("Uint32",4,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){n(18)("Float32",4,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){n(18)("Float64",8,function(t){return function(e,n,i){return t(this,e,n,i)}})},function(t,e,n){(function(t){!function(t){function e(t){if("utf-8"!==(t=void 0===t?"utf-8":t))throw new RangeError("Failed to construct 'TextEncoder': The encoding label provided ('"+t+"') is invalid.")}function n(t,e){if(t=void 0===t?"utf-8":t,e=void 0===e?{fatal:!1}:e,"utf-8"!==t)throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+t+"') is invalid.");if(e.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}if(t.TextEncoder&&t.TextDecoder)return!1;Object.defineProperty(e.prototype,"encoding",{value:"utf-8"}),e.prototype.encode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");e=0;for(var n=t.length,i=0,r=Math.max(32,n+(n>>1)+7),o=new Uint8Array(r>>3<<3);e<n;){var s=t.charCodeAt(e++);if(55296<=s&&56319>=s){if(e<n){var a=t.charCodeAt(e);56320==(64512&a)&&(++e,s=((1023&s)<<10)+(1023&a)+65536)}if(55296<=s&&56319>=s)continue}if(i+4>o.length&&(r+=8,r=(r*=1+e/t.length*2)>>3<<3,(a=new Uint8Array(r)).set(o),o=a),0==(4294967168&s))o[i++]=s;else{if(0==(4294965248&s))o[i++]=s>>6&31|192;else if(0==(4294901760&s))o[i++]=s>>12&15|224,o[i++]=s>>6&63|128;else{if(0!=(4292870144&s))continue;o[i++]=s>>18&7|240,o[i++]=s>>12&63|128,o[i++]=s>>6&63|128}o[i++]=63&s|128}}return o.slice(0,i)},Object.defineProperty(n.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(n.prototype,"fatal",{value:!1}),Object.defineProperty(n.prototype,"ignoreBOM",{value:!1}),n.prototype.decode=function(t,e){if((e=void 0===e?{stream:!1}:e).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");e=0;for(var n=(t=new Uint8Array(t)).length,i=[];e<n;){var r=t[e++];if(0===r)break;if(0==(128&r))i.push(r);else if(192==(224&r)){var o=63&t[e++];i.push((31&r)<<6|o)}else if(224==(240&r)){o=63&t[e++];var s=63&t[e++];i.push((31&r)<<12|o<<6|s)}else if(240==(248&r)){65535<(r=(7&r)<<18|(o=63&t[e++])<<12|(s=63&t[e++])<<6|63&t[e++])&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r)}}return String.fromCharCode.apply(null,i)},t.TextEncoder=e,t.TextDecoder=n}("undefined"!=typeof window?window:void 0!==t?t:this)}).call(e,n(185))},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var i=t.exports;function r(t){if(t.aborted())throw new i.Error("aborted")}window.Zmodem=i,Object.assign(i,n(187)),i.Browser={send_files:function(t,e,n){n||(n={});for(var i=[],o=0,s=e.length-1;s>=0;s--){var a=e[s];o+=a.size,i[s]={obj:a,name:a.name,size:a.size,mtime:new Date(a.lastModified),files_remaining:e.length-s,bytes_remaining:o}}var l=0;return function e(){var o=i[l];return o?(l++,t.send_offer(o).then(function(i){return n.on_offer_response&&n.on_offer_response(o.obj,i),void 0===i?e():new Promise(function(s){var a,l=new FileReader;l.onerror=function(t){throw console.error("file read error",t),"File read error: "+t},l.onprogress=function(e){e.target.result&&(a=new Uint8Array(e.target.result,i.get_offset()),r(t),i.send(a),n.on_progress&&n.on_progress(o.obj,i,a))},l.onload=function(l){a=new Uint8Array(l.target.result,i,a),r(t),i.end(a).then(function(){n.on_progress&&a.length&&n.on_progress(o.obj,i,a),n.on_file_complete&&n.on_file_complete(o.obj,i),s(e())})},l.readAsArrayBuffer(o.obj)})})):Promise.resolve()}()},save_to_disk:function(t,e){var n=new Blob(t),i=URL.createObjectURL(n),r=document.createElement("a");r.style.display="none",r.href=i,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}}},function(t,e,n){"use strict";Object.assign(t.exports,n(188))},function(t,e,n){"use strict";var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=t.exports;Object.assign(o,n(41),n(189));var s=[42,42,24,66,48],a=["to_terminal","on_detect","on_retract","sender"],l=function(){function t(e,n,i,o){r(this,t),this._confirmer=n,this._denier=i,this._is_valid=o,this._session_type=e}return i(t,[{key:"confirm",value:function(){return this._confirmer.apply(this,arguments)}},{key:"deny",value:function(){return this._denier.apply(this,arguments)}},{key:"is_valid",value:function(){return this._is_valid.apply(this,arguments)}},{key:"get_session_role",value:function(){return this._session_type}}]),t}();o.Sentry=function(){function t(e){if(r(this,t),!e)throw"Need options!";var n=this;a.forEach(function(t){if(!e[t])throw"Need “"+t+"”!";n["_"+t]=e[t]}),this._cache=[]}return i(t,[{key:"_after_session_end",value:function(){this._zsession=null}},{key:"consume",value:function(t){if(t instanceof Array||(t=Array.prototype.slice.call(new Uint8Array(t))),this._zsession){var e=this._zsession;if(e.consume(t),!e.has_ended())return;t="receive"===e.type?e.get_trailing_bytes():[]}var n=this._parse(t),i=t;if(n){!!this._parsed_session&&(this._parsed_session.type===n.type&&(i=[]),this._on_retract()),this._parsed_session=n;var r=this;this._on_detect(new l(n.type,function(){if(!this.is_valid())throw"Stale ZMODEM session!";return n.on("garbage",r._to_terminal),n.on("session_end",r._after_session_end.bind(r)),n.set_sender(r._sender),delete r._parsed_session,r._zsession=n},this._send_abort.bind(this),function(){return r._parsed_session===n}))}else{var o=this._parsed_session;this._parsed_session=null,o&&(1===i.length&&67===i[0]&&this._send_abort(),this._on_retract())}this._to_terminal(i)}},{key:"get_confirmed_session",value:function(){return this._zsession||null}},{key:"_send_abort",value:function(){this._sender(o.ZMLIB.ABORT_SEQUENCE)}},{key:"_parse",value:function(t){var e=this._cache;for(e.push.apply(e,t);;){var n=o.ZMLIB.find_subarray(e,s);if(-1===n)break;e.splice(0,n);var i=void 0;try{i=o.Session.parse(e)}catch(t){}if(!i)break;return 1===e.length&&e[0]===o.ZMLIB.XON&&e.shift(),e.length?null:i}return e.splice(21),null}}]),t}()},function(t,e,n){"use strict";var i=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var l=t.exports;Object.assign(l,n(70),n(190),n(71),n(41),n(191),n(193),n(194),n(42));var c=["CANFDX","CANOVIO","CANFC32"],u="spool_uint8array",h=[79,79],f=l.ZMLIB.ABORT_SEQUENCE,_=function(){function t(){a(this,t),this._on_evt={},this._evt_once_index={}}return r(t,[{key:"_Add_event",value:function(t){this._on_evt[t]=[],this._evt_once_index[t]=[]}},{key:"_get_evt_queue",value:function(t){if(!this._on_evt[t])throw"Bad event: "+t;return this._on_evt[t]}},{key:"on",value:function(t,e){return this._get_evt_queue(t).push(e),this}},{key:"off",value:function(t,e){var n=this._get_evt_queue(t);if(e){var i=n.indexOf(e);if(-1===i)throw"“"+e+"” is not in the “"+t+"” queue.";n.splice(i,1)}else n.pop();return this}},{key:"_Happen",value:function(t){var e=this._get_evt_queue(t),n=Array.apply(null,arguments);n.shift();var i=this;return e.forEach(function(t){t.apply(i,n)}),e.length}}]),t}();l.Session=function(t){function e(){a(this,e);var t=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t._config={},t._input_buffer=[],t._Add_event("receive"),t._Add_event("garbage"),t._Add_event("session_end"),t}return s(e,_),r(e,[{key:"set_sender",value:function(t){return this._sender=t,this}},{key:"has_ended",value:function(){return this._has_ended()}},{key:"consume",value:function(t){if(this._before_consume(t),this._aborted)throw new l.Error("already_aborted");t.length&&(this._strip_and_enqueue_input(t),this._check_for_abort_sequence(t)||this._consume_first())}},{key:"aborted",value:function(){return!!this._aborted}}],[{key:"parse",value:function(t){var e;try{e=l.Header.parse_hex(t)}catch(t){return}if(e)switch(e.NAME){case"ZRQINIT":return new l.Session.Receive;case"ZRINIT":return new l.Session.Send(e)}}}]),r(e,[{key:"get_role",value:function(){return this.type}},{key:"_trim_leading_garbage_until_header",value:function(){var t=l.Header.trim_leading_garbage(this._input_buffer);t.length&&0===this._Happen("garbage",t)&&console.debug("Garbage: ",String.fromCharCode.apply(String,t),t)}},{key:"_parse_and_consume_header",value:function(){this._trim_leading_garbage_until_header();var t=l.Header.parse(this._input_buffer);if(t)return this._consume_header(t[0]),this._last_header_name=t[0].NAME,this._last_header_crc=t[1],t[0]}},{key:"_consume_header",value:function(t){this._on_receive(t);var e=this._next_header_handler[t.NAME];if(!e)throw console.error("Unhandled header!",t,this._next_header_handler),new l.Error("Unhandled header: "+t.NAME);this._next_header_handler=null,e.call(this,t)}},{key:"_check_for_abort_sequence",value:function(){var t=l.ZMLIB.find_subarray(this._input_buffer,f);if(-1!==t)throw this._input_buffer.splice(0,t+f.length),this._aborted=!0,this._on_session_end(),new l.Error("peer_aborted")}},{key:"_send_header",value:function(t){if(!this._sender)throw"Need sender!";var e=Array.apply(null,arguments),n=this._create_header_bytes(e);this._sender(n[0]),this._last_sent_header=n[1]}},{key:"_create_header_bytes",value:function(t){var e=l.Header.build.apply(l.Header,t);return[e[this._get_header_formatter(t[0])](this._zencoder),e]}},{key:"_strip_and_enqueue_input",value:function(t){l.ZMLIB.strip_ignored_bytes(t),this._input_buffer.push.apply(this._input_buffer,t)}},{key:"abort",value:function(){this._sender(f.concat([8,8,8,8,8])),this._aborted=!0,this._sender=function(){throw new l.Error("already_aborted")},this._on_session_end()}},{key:"_on_session_end",value:function(){this._Happen("session_end")}},{key:"_on_receive",value:function(t){this._Happen("receive",t)}},{key:"_before_consume",value:function(){}}]),e}(),l.Session.Receive=function(t){function e(){a(this,e);var t=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t._Add_event("offer"),t._Add_event("data_in"),t._Add_event("file_end"),t}return s(e,l.Session),r(e,[{key:"_before_consume",value:function(t){if(this._bytes_after_OO)throw"PROTOCOL: Session is completed!";this._bytes_being_consumed=t}},{key:"get_trailing_bytes",value:function(){if(this._aborted)return[];if(!this._bytes_after_OO)throw"PROTOCOL: Session is not completed!";return this._bytes_after_OO.slice(0)}},{key:"_has_ended",value:function(){return this.aborted()||!!this._bytes_after_OO}},{key:"_get_header_formatter",value:function(){return"to_hex"}},{key:"_parse_and_consume_subpacket",value:function(){var t;t=16===this._last_header_crc?"parse16":"parse32";var e=l.Subpacket[t](this._input_buffer);return e&&(this._consume_data(e),e.frame_end()&&(this._next_subpacket_handler=null)),e}},{key:"_consume_first",value:function(){if(this._got_ZFIN){if(this._input_buffer.length<2)return;if(0===l.ZMLIB.find_subarray(this._input_buffer,h))return this._bytes_after_OO=(t=this._bytes_being_consumed.slice(0),0===l.ZMLIB.find_subarray(t,h)?t.splice(0,h.length):t[0]===h[h.length-1]&&t.splice(0,1),t),void this._on_session_end();throw"PROTOCOL: Only thing after ZFIN should be “OO” (79,79), not: "+array_buf.join()}var t,e;do{e=this._next_subpacket_handler?this._parse_and_consume_subpacket():this._parse_and_consume_header()}while(e&&this._input_buffer.length)}},{key:"_consume_data",value:function(t){if(this._on_receive(t),!this._next_subpacket_handler)throw"PROTOCOL: Received unexpected data packet after "+this._last_header_name+" header: "+t.get_payload().join();this._next_subpacket_handler.call(this,t)}},{key:"_octets_to_string",value:function(t){return this._textdecoder||(this._textdecoder=new l.Text.Decoder),this._textdecoder.decode(new Uint8Array(t))}},{key:"_consume_ZFILE_data",value:function(t,e){if(this._file_info)throw"PROTOCOL: second ZFILE data subpacket received";var n=e.get_payload(),i=n.indexOf(0),r=this._octets_to_string(n.slice(0,i)),o=this._octets_to_string(n.slice(1+i)).split(" "),s=o[1]&&parseInt(o[1],8)||void 0;s&&(s=new Date(1e3*s)),this._file_info={name:r,size:o[0]?parseInt(o[0],10):null,mtime:s||null,mode:o[2]&&parseInt(o[2],8)||null,serial:o[3]&&parseInt(o[3],10)||null,files_remaining:o[4]?parseInt(o[4],10):null,bytes_remaining:o[5]?parseInt(o[5],10):null};var a=new m(t.get_options(),this._file_info,this._accept.bind(this),this._skip.bind(this));this._current_transfer=a}},{key:"_consume_ZDATA_data",value:function(t){if(!this._accepted_offer)throw"PROTOCOL: Received data without accepting!";if(!this._offset_ok)return console.warn("offset not ok!"),void _send_ZRPOS();this._file_offset+=t.get_payload().length,this._on_data_in(t),t.ack_expected()&&!t.frame_end()&&this._send_header("ZACK",l.ENCODELIB.pack_u32_le(this._file_offset))}},{key:"_make_promise_for_between_files",value:function(){var t=this;return new Promise(function(e){var n={ZFILE:function(t){this._next_subpacket_handler=function(n){this._next_subpacket_handler=null,this._consume_ZFILE_data(t,n),this._Happen("offer",this._current_transfer),e(this._current_transfer)}},ZSINIT:function(e){t._next_subpacket_handler=function(e){t._next_subpacket_handler=null,t._consume_ZSINIT_data(e),t._send_header("ZACK"),t._next_header_handler=n}},ZFIN:function(){this._consume_ZFIN(),e()}};t._next_header_handler=n})}},{key:"_consume_ZSINIT_data",value:function(t){this._attn=t.get_payload()}},{key:"start",value:function(){if(this._started)throw"Already started!";this._started=!0;var t=this._make_promise_for_between_files();return this._send_ZRINIT(),t}},{key:"_accept",value:function(t){this._accepted_offer=!0,this._file_offset=t||0;var e=this,n=new Promise(function(t){e._next_header_handler={ZDATA:function(e){this._consume_ZDATA(e),this._next_subpacket_handler=this._consume_ZDATA_data,this._next_header_handler={ZEOF:function(e){this._next_subpacket_handler=null,this._consume_ZEOF(e);var n=this._make_promise_for_between_files();t(n)}}}}});return this._send_ZRPOS(),n}},{key:"_skip",value:function(){var t=this._make_promise_for_between_files();if(this._accepted_offer){var e=function(){this._accepted_offer=!1,this._next_subpacket_handler=null,this._make_promise_for_between_files()}.bind(this);Object.assign(this._next_header_handler,{ZEOF:e,ZDATA:function(){e(),this._next_header_handler.ZEOF=e}.bind(this)})}return this._file_info=null,this._send_header("ZSKIP"),t}},{key:"_send_ZRINIT",value:function(){this._send_header("ZRINIT",c)}},{key:"_consume_ZFIN",value:function(){this._got_ZFIN=!0,this._send_header("ZFIN")}},{key:"_consume_ZEOF",value:function(t){if(this._file_offset!==t.get_offset())throw"ZEOF offset mismatch; unimplemented (local: "+this._file_offset+"; ZEOF: "+t.get_offset()+")";this._send_ZRINIT(),this._on_file_end(),this._file_info=null,this._current_transfer=null}},{key:"_consume_ZDATA",value:function(t){if(this._file_offset!==t.get_offset())throw"Error correction is unimplemented.";this._offset_ok=!0}},{key:"_send_ZRPOS",value:function(){this._send_header("ZRPOS",this._file_offset)}},{key:"_on_file_end",value:function(){this._Happen("file_end"),this._current_transfer&&(this._current_transfer._Happen("complete"),this._current_transfer=null)}},{key:"_on_data_in",value:function(t){this._Happen("data_in",t),this._current_transfer&&this._current_transfer._Happen("input",t.get_payload())}}]),e}(),Object.assign(l.Session.Receive.prototype,{type:"receive"});var p={get_details:function(){return Object.assign({},this._file_info)},get_options:function(){return Object.assign({},this._zfile_opts)},get_offset:function(){return this._file_offset}},d=function(){function t(e,n,i,r){a(this,t),this._file_info=e,this._file_offset=n||0,this._send=i,this._end=r}return r(t,[{key:"send",value:function(t){this._send(t),this._file_offset+=t.length}},{key:"end",value:function(t){var e=this._end(t||[]);return t&&(this._file_offset+=t.length),e}}]),t}();Object.assign(d.prototype,p);var m=function(t){function e(t,n,i,r){a(this,e);var s=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return s._zfile_opts=t,s._file_info=n,s._accept_func=i,s._skip_func=r,s._Add_event("input"),s._Add_event("complete"),s.on("input",s._input_handler),s}return s(e,_),r(e,[{key:"_verify_not_skipped",value:function(){if(this._skipped)throw new l.Error("Already skipped!")}},{key:"skip",value:function(){return this._verify_not_skipped(),this._skipped=!0,this._skip_func.apply(this,arguments)}},{key:"accept",value:function(t){if(this._verify_not_skipped(),this._accepted)throw new l.Error("Already accepted!");switch(this._accepted=!0,t||(t={}),this._file_offset=t.offset||0,t.on_input){case null:case void 0:case"spool_array":case u:this._spool=[];break;default:if("function"!=typeof t.on_input)throw"Invalid “on_input”: "+t.on_input}return this._input_handler_mode=t.on_input||u,this._accept_func(this._file_offset).then(this._get_spool.bind(this))}},{key:"_input_handler",value:function(t){if(this._file_offset+=t.length,"function"==typeof this._input_handler_mode)this._input_handler_mode(t);else{if(this._input_handler_mode===u)t=new Uint8Array(t);else if("spool_array"!==this._input_handler_mode)throw new l.Error("WTF?? _input_handler_mode = "+this._input_handler_mode);this._spool.push(t)}}},{key:"_get_spool",value:function(){return this._spool}}]),e}();Object.assign(m.prototype,p);var y={ZFILE:!0,ZDATA:!0};l.Session.Send=function(t){function e(t){a(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(!t)throw"Need first header!";if("ZRINIT"!==t.NAME)throw"First header should be ZRINIT, not "+t.NAME;n._last_header_name="ZRINIT",n._subpacket_encode_func="encode16",n._zencoder=new l.ZDLE,n._consume_ZRINIT(t),n._file_offset=0;return n._start_keepalive_on_set_sender=!0,n}return s(e,l.Session),r(e,[{key:"set_sender",value:function(t){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"set_sender",this).call(this,t),this._start_keepalive_on_set_sender&&(this._start_keepalive_on_set_sender=!1,this._start_keepalive()),this}},{key:"_get_header_formatter",value:function(t){return y[t]?"to_binary16":"to_hex"}},{key:"_start_keepalive",value:function(){if(!this._keepalive_promise){var t=this;this._keepalive_promise=new Promise(function(e){t._keepalive_timeout=setTimeout(e,5e3)}).then(function(){t._next_header_handler={ZACK:function(){t._got_ZSINIT_ZACK=!0}},t._send_ZSINIT(),t._keepalive_promise=null,t._start_keepalive()})}}},{key:"_stop_keepalive",value:function(){this._keepalive_promise&&(clearTimeout(this._keepalive_timeout),this._keep_alive_promise=null)}},{key:"_send_ZSINIT",value:function(){var t=[];this._zencoder.escapes_ctrl_chars()&&t.push("ESCCTL"),this._send_header_and_data(["ZSINIT",t],[0],"end_ack")}},{key:"_consume_ZRINIT",value:function(t){if(this._last_ZRINIT=t,t.get_buffer_size())throw"Buffer size ("+t.get_buffer_size()+") is unsupported!";if(!t.can_full_duplex())throw"Half-duplex I/O is unsupported!";if(!t.can_overlap_io())throw"Non-overlap I/O is unsupported!";if(t.escape_8th_bit())throw"8-bit escaping is unsupported!";this._zencoder.set_escape_ctrl_chars(!0),t.escape_ctrl_chars()||console.debug("Peer didn’t request escape of all control characters. Will send ZSINIT to force recognition of escaped control characters.")}},{key:"_ensure_receiver_escapes_ctrl_chars",value:function(){var t;if(!this._last_ZRINIT.escape_ctrl_chars()&&!this._got_ZSINIT_ZACK){var e=this;t=new Promise(function(t){e._next_header_handler={ZACK:function(e){t()}},e._send_ZSINIT()})}else t=Promise.resolve();return t}},{key:"_convert_params_to_offer_payload_array",value:function(t){var e=(t=l.Validation.offer_parameters(t)).name+"\0",n=[(t.size||0).toString(10),t.mtime?t.mtime.toString(8):"0",t.mode?(32768|t.mode).toString(8):"0","0"];return t.files_remaining&&(n.push(t.files_remaining),t.bytes_remaining&&n.push(t.bytes_remaining)),e+=n.join(" "),this._string_to_octets(e)}},{key:"send_offer",value:function(t){if(!t)throw"need file params!";if(this._sending_file)throw"Already sending file!";var e=this._convert_params_to_offer_payload_array(t);this._stop_keepalive();var n=this,i=function(){var i=new Promise(function(e){n._next_header_handler={ZSKIP:function(){n._start_keepalive(),e()},ZRPOS:function(i){n._sending_file=!0,e(new d(t,i.get_offset(),n._send_interim_file_piece.bind(n),n._end_file.bind(n)))}}});return n._send_header_and_data(["ZFILE"],e,"end_ack"),delete n._sent_ZDATA,i};return this._ensure_receiver_escapes_ctrl_chars().then(i)}},{key:"_send_header_and_data",value:function(t,e,n){var i=this._create_header_bytes(t),r=this._build_subpacket_bytes(e,n);i[0].push.apply(i[0],r),this._sender(i[0]),this._last_sent_header=i[1]}},{key:"_build_subpacket_bytes",value:function(t,e){return l.Subpacket.build(t,e)[this._subpacket_encode_func](this._zencoder)}},{key:"_build_and_send_subpacket",value:function(t,e){this._sender(this._build_subpacket_bytes(t,e))}},{key:"_string_to_octets",value:function(t){this._textencoder||(this._textencoder=new l.Text.Encoder);var e=this._textencoder.encode(t);return Array.prototype.slice.call(e)}},{key:"_send_interim_file_piece",value:function(t){return this._send_file_part(t,"no_end_no_ack"),Promise.resolve()}},{key:"_ensure_we_are_sending",value:function(){if(!this._sending_file)throw"Not sending a file currently!"}},{key:"_end_file",value:function(t){this._ensure_we_are_sending(),this._send_file_part(t,"end_no_ack");var e=this,n=new Promise(function(t){e._sending_file=!1,e._prepare_to_receive_ZRINIT(t)});return this._send_header("ZEOF",this._file_offset),this._file_offset=0,n}},{key:"_prepare_to_receive_ZRINIT",value:function(t){this._next_header_handler={ZRINIT:function(e){this._consume_ZRINIT(e),t&&t()}}}},{key:"close",value:function(){var t="ZRINIT"===this._last_header_name;if(t||(t="ZSKIP"===this._last_header_name),t||(t="ZSINIT"===this._last_sent_header.name&&"ZACK"===this._last_header_name),!t)throw"Can’t close; last received header was “"+this._last_header_name+"”";var e=this,n=new Promise(function(t,n){e._next_header_handler={ZFIN:function(){e._sender(h),e._sent_OO=!0,e._on_session_end(),t()}}});return this._send_header("ZFIN"),n}},{key:"_has_ended",value:function(){return this.aborted()||!!this._sent_OO}},{key:"_send_file_part",value:function(t,e){this._sent_ZDATA||(this._send_header("ZDATA",this._file_offset),this._sent_ZDATA=!0);for(var n=0,i=t.length;;){var r=Math.min(n+8192,i)-n,o=r+n>=i,s=t.slice(n,n+r);if(s instanceof Array||(s=Array.prototype.slice.call(s)),this._build_and_send_subpacket(s,o?e:"no_end_no_ack"),this._file_offset+=r,(n+=r)>=i)break}}},{key:"_consume_first",value:function(){if(!this._parse_and_consume_header()&&"67"===this._input_buffer.join())throw"Receiver has fallen back to YMODEM."}},{key:"_on_session_end",value:function(){this._stop_keepalive(),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_on_session_end",this).call(this)}}]),e}(),Object.assign(l.Session.Send.prototype,{type:"send"})},function(t,e,n){"use strict";var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(){r(this,t)}return i(t,[{key:"encode",value:function(t){t=unescape(encodeURIComponent(t));for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return new Uint8Array(e)}}]),t}(),s=function(){function t(){r(this,t)}return i(t,[{key:"decode",value:function(t){return decodeURIComponent(escape(String.fromCharCode.apply(String,t)))}}]),t}();t.exports.Text={Encoder:"undefined"!=typeof TextEncoder?TextEncoder:o,Decoder:"undefined"!=typeof TextDecoder?TextDecoder:s}},function(t,e,n){"use strict";var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=t.exports;Object.assign(a,n(70),n(71),n(41),n(92),n(42));var l="*".charCodeAt(0),c="A".charCodeAt(0),u="B".charCodeAt(0),h="C".charCodeAt(0),f=[13,10],_=f.slice(0).concat([a.ZMLIB.XON]),p=[l,l,a.ZMLIB.ZDLE,u],d=[l,a.ZMLIB.ZDLE,c],m=[l,a.ZMLIB.ZDLE,h];a.Header=function(){function t(){s(this,t),this._bytes4||(this._bytes4=[0,0,0,0])}return i(t,[{key:"to_hex",value:function(){var t=this._crc_bytes();return p.concat(a.ENCODELIB.octets_to_hex(t.concat(a.CRC.crc16(t))),this._hex_header_ending)}},{key:"to_binary16",value:function(t){return this._to_binary(t,d,a.CRC.crc16)}},{key:"to_binary32",value:function(t){return this._to_binary(t,m,a.CRC.crc32)}}],[{key:"trim_leading_garbage",value:function(t){var e,n,i=[];t:for(;t.length&&!n;){var r=t.indexOf(l);if(-1===r){e=!0;break t}if(i.push.apply(i,t.splice(0,r)),t.length<2)break t;if(t[1]===l)if(t.length<p.length){if(t.join()===p.slice(0,t.length).join())break t}else t[2]===p[2]&&t[3]===p[3]&&(n=W);else if(t[1]===a.ZMLIB.ZDLE){if(t.length<d.length)break t;t[2]===d[2]?n=F:t[2]===m[2]&&(n=Z)}n||i.push(t.shift())}return e&&i.push.apply(i,t.splice(0)),i}},{key:"parse",value:function(t){var e;if(t[1]===l)return(e=W(t))&&[e,16];if(t[2]===c)return(e=F(t))&&[e,16];if(t[2]===h)return(e=Z(t))&&[e,32];if(!(t.length<3))throw"Unrecognized/unsupported octets: "+t.join()}},{key:"build",value:function(t){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments),n=D[t];if(!n)throw"No frame class “"+t+"” is defined!";return e.shift(),new(n.bind.apply(n,[null].concat(e)))}}]),i(t,[{key:"_to_binary",value:function(t,e,n){var i=this._crc_bytes();return e.concat(t.encode(i.concat(n(i))))}},{key:"_crc_bytes",value:function(){return[this.TYPENUM].concat(this._bytes4)}}]),t}(),a.Header.prototype._hex_header_ending=_;var y=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Header),e}(),v={CANFDX:1,CANOVIO:2,CANBRK:4,CANCRY:8,CANLZW:16,CANFC32:32,ESCCTL:64,ESC8:128};var b=function(t){function e(t,n){s(this,e);var i=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),o=0;return n||(n=0),t.forEach(function(t){o|=function(t){if(!v[t])throw new a.Error("Invalid ZRINIT flag: "+t);return v[t]}(t)}),i._bytes4=[255&n,n>>8,0,o],i}return o(e,a.Header),i(e,[{key:"get_buffer_size",value:function(){return a.ENCODELIB.unpack_u16_be(this._bytes4.slice(0,2))||void 0}},{key:"can_full_duplex",value:function(){return!!(this._bytes4[3]&v.CANFDX)}},{key:"can_overlap_io",value:function(){return!!(this._bytes4[3]&v.CANOVIO)}},{key:"can_break",value:function(){return!!(this._bytes4[3]&v.CANBRK)}},{key:"can_fcs_32",value:function(){return!!(this._bytes4[3]&v.CANFC32)}},{key:"escape_ctrl_chars",value:function(){return!!(this._bytes4[3]&v.ESCCTL)}},{key:"escape_8th_bit",value:function(){return!!(this._bytes4[3]&v.ESC8)}}]),e}(),g={ESCCTL:64,ESC8:128};var C=function(t){function e(t,n){s(this,e);var i=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),o=0;if(t.forEach(function(t){o|=function(t){if(!g[t])throw"Invalid ZSINIT flag: "+t;return g[t]}(t)}),i._bytes4=[0,0,0,o],n){if(n.length>31)throw"Attn sequence must be <= 31 bytes";if(n.some(function(t){return t>255}))throw"Attn sequence ("+n+") must be <256";i._data=n.concat([0])}return i}return o(e,a.Header),i(e,[{key:"escape_ctrl_chars",value:function(){return!!(this._bytes4[3]&g.ESCCTL)}},{key:"escape_8th_bit",value:function(){return!!(this._bytes4[3]&g.ESC8)}}]),e}(),w=function(t){function e(t){s(this,e);var n=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t&&(n._bytes4=t.slice()),n}return o(e,a.Header),e}();w.prototype._hex_header_ending=f;var S={extended:{sparse:64},transport:[void 0,"compress","encrypt","rle"],management:[void 0,"newer_or_longer","crc","append","clobber","newer","mtime_or_length","protect","rename"],conversion:[void 0,"binary","text","resume"]},A=["extended","transport","management","conversion"],x=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Header),i(e,[{key:"get_options",value:function(){var t={sparse:!!(64&this._bytes4[0])},e=this._bytes4.slice(0);return A.forEach(function(n,i){if(S[n]instanceof Array)"management"===n&&(t.skip_if_absent=!!(128&e[i]),e[i]&=31),t[n]=S[n][e[i]];else for(var r in S[n])t[r]=!!(e[i]&S[n][r]),t[r]&&(e[i]^=S[n][r]);!t[n]&&e[i]&&(t[n]="unknown:"+e[i])}),t}}]),e}(),k=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Header),e}(),E=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Header),e}(),O=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Header),e}(),L=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Header),e}();O.prototype._hex_header_ending=f;for(var T=function(t){function e(t){s(this,e);var n=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n._bytes4=a.ENCODELIB.pack_u32_le(t),n}return o(e,a.Header),i(e,[{key:"get_offset",value:function(){return a.ENCODELIB.unpack_u32_le(this._bytes4)}}]),e}(),R=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,T),e}(),I=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,T),e}(),M=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,T),e}(),P=[[y,"ZRQINIT"],[b,"ZRINIT"],[C,"ZSINIT"],[w,"ZACK"],[x,"ZFILE"],[k,"ZSKIP"],void 0,[E,"ZABORT"],[O,"ZFIN"],[R,"ZRPOS"],[I,"ZDATA"],[M,"ZEOF"],[L,"ZFERR"],void 0,void 0,void 0,void 0,void 0,void 0,void 0],D={},H=0;H<P.length;H++)P[H]&&(D[P[H][1]]=P[H][0],Object.assign(P[H][0].prototype,{TYPENUM:H,NAME:P[H][1]}));var N=[y,b,C,w,x,k,"ZNAK",E,O,R,I,M,L,"ZCRC","ZCHALLENGE","ZCOMPL","ZCAN","ZFREECNT","ZCOMMAND","ZSTDERR"];function B(t){var e=N[t];if("string"==typeof e)throw"Received unsupported header: "+e;return function(t){if(t.prototype instanceof T)return new t(0);return new t([])}(e)}function F(t){var e=a.ZDLE.splice(t,d.length,7);return e&&j(e)}function j(t){a.CRC.verify16(t.slice(0,5),t.slice(5));var e=B(t[0]);return e._bytes4=t.slice(1,5),e}function Z(t){var e=a.ZDLE.splice(t,m.length,9);if(e){a.CRC.verify32(e.slice(0,5),e.slice(5));var n=B(e[0]);return n._bytes4=e.slice(1,5),n}}function W(t){var e,n,i=t.indexOf(138);if(-1===i&&(i=t.indexOf(10)),-1!==i){if(n=t.splice(0,i),t.shift(),19===n.length){var r=n.pop();13!==r&&141!==r&&(e="Invalid hex header: (CR/)LF doesn’t have CR!")}else 18!==n.length&&(e="Invalid hex header: invalid number of bytes before LF!");if(e)throw e+=" ("+n.length+" bytes: "+n.join()+")";return n.splice(0,4),j(a.ENCODELIB.parse_hex_octets(n))}t.length>11&&(e="Invalid hex header - no LF detected within 12 bytes!")}a.Header.parse_hex=W},function(t,e,n){var i;i=function(t){t.version="1.1.1";var e=function(){for(var t=0,e=new Array(256),n=0;256!=n;++n)t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=n)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1,e[n]=t;return"undefined"!=typeof Int32Array?new Int32Array(e):e}();t.table=e,t.bstr=function(t,n){for(var i=-1^n,r=t.length-1,o=0;o<r;)i=(i=i>>>8^e[255&(i^t.charCodeAt(o++))])>>>8^e[255&(i^t.charCodeAt(o++))];return o===r&&(i=i>>>8^e[255&(i^t.charCodeAt(o))]),-1^i},t.buf=function(t,n){if(t.length>1e4)return function(t,n){for(var i=-1^n,r=t.length-7,o=0;o<r;)i=(i=(i=(i=(i=(i=(i=(i=i>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])];for(;o<r+7;)i=i>>>8^e[255&(i^t[o++])];return-1^i}(t,n);for(var i=-1^n,r=t.length-3,o=0;o<r;)i=(i=(i=(i=i>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])])>>>8^e[255&(i^t[o++])];for(;o<r+3;)i=i>>>8^e[255&(i^t[o++])];return-1^i},t.str=function(t,n){for(var i,r,o=-1^n,s=0,a=t.length;s<a;)(i=t.charCodeAt(s++))<128?o=o>>>8^e[255&(o^i)]:i<2048?o=(o=o>>>8^e[255&(o^(192|i>>6&31))])>>>8^e[255&(o^(128|63&i))]:i>=55296&&i<57344?(i=64+(1023&i),r=1023&t.charCodeAt(s++),o=(o=(o=(o=o>>>8^e[255&(o^(240|i>>8&7))])>>>8^e[255&(o^(128|i>>2&63))])>>>8^e[255&(o^(128|r>>6&15|(3&i)<<4))])>>>8^e[255&(o^(128|63&r))]):o=(o=(o=o>>>8^e[255&(o^(224|i>>12&15))])>>>8^e[255&(o^(128|i>>6&63))])>>>8^e[255&(o^(128|63&i))];return-1^o}},"undefined"==typeof DO_NOT_EXPORT_CRC?i(e):i({})},function(t,e,n){"use strict";var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=t.exports;Object.assign(a,n(92),n(71),n(41),n(42));var l;a.Subpacket=function(){function t(e){s(this,t),this._payload=e}return i(t,[{key:"encode16",value:function(t){return this._encode(t,a.CRC.crc16)}},{key:"encode32",value:function(t){return this._encode(t,a.CRC.crc32)}},{key:"get_payload",value:function(){return this._payload}}],[{key:"build",value:function(t,e){var n=l[e];if(!n)throw"No subpacket type “"+e+"” is defined! Try one of: "+Object.keys(l).join(", ");return new n(t)}},{key:"parse16",value:function(e){return t._parse(e,2)}},{key:"parse32",value:function(e){return t._parse(e,4)}}]),i(t,[{key:"_encode",value:function(t,e){return t.encode(this._payload.slice(0)).concat([a.ZMLIB.ZDLE,this._frameend_num],t.encode(e(this._payload.concat(this._frameend_num))))}}],[{key:"_parse",value:function(t,e){for(var n,i,r={104:h,105:_,106:p,107:f},o=0;o<t.length;){if(-1===(o=t.indexOf(a.ZMLIB.ZDLE,o)))return;if(i=r[t[o+1]]){n=o+1;break}o++}if(i){var s=t[n];if(t[n-1]!==a.ZMLIB.ZDLE)throw"Byte before frame end should be ZDLE, not "+t[n-1];var l=t.splice(0,n-1),c=a.ZDLE.splice(t,2,e);if(c){var u=a.ZDLE.decode(l);return a.CRC[2===e?"verify16":"verify32"](u.concat([s]),c),new i(u,c)}t.unshift.apply(t,l)}}}]),t}();var c=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Subpacket),i(e,[{key:"frame_end",value:function(){return!0}}]),e}(),u=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,a.Subpacket),i(e,[{key:"frame_end",value:function(){return!1}}]),e}(),h=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,c),i(e,[{key:"ack_expected",value:function(){return!1}}]),e}();h.prototype._frameend_num=104;var f=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,c),i(e,[{key:"ack_expected",value:function(){return!0}}]),e}();f.prototype._frameend_num=107;var _=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,u),i(e,[{key:"ack_expected",value:function(){return!1}}]),e}();_.prototype._frameend_num=105;var p=function(t){function e(){return s(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,u),i(e,[{key:"ack_expected",value:function(){return!0}}]),e}();p.prototype._frameend_num=106,l={end_no_ack:h,end_ack:f,no_end_no_ack:_,no_end_ack:p}},function(t,e,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=t.exports;Object.assign(r,n(42));var o=/\*\x18[AC]|\*\*\x18B/;function s(t,e){if(e<0)throw new r.Error("validation","“"+t+"” ("+e+") must be nonnegative.");if(e!==Math.floor(e))throw new r.Error("validation","“"+t+"” ("+e+") must be an integer.")}r.Validation={offer_parameters:function(t){if(!t.name)throw new r.Error("validation","Need “name”!");if("string"!=typeof t.name)throw new r.Error("validation","“name” ("+t.name+") must be a string!");if(t=Object.assign({},t),o.test(t.name)&&console.warn("The filename "+JSON.stringify(name)+" contains characters that look like a ZMODEM header. This could corrupt the ZMODEM session; consider renaming it so that the filename doesn’t contain control characters."),null!==t.serial&&void 0!==t.serial)throw new r.Error("validation","“serial” is meaningless.");if(t.serial=null,["size","mode","files_remaining","bytes_remaining"].forEach(function(e){var n;switch(i(t[e])){case"object":n=null===t[e];break;case"undefined":t[e]=null,n=!0;break;case"number":s(e,t[e]),n=!0}if(!n)throw new r.Error("validation","“"+e+"” ("+t[e]+") must be null, undefined, or a number.")}),"number"==typeof t.mode&&(t.mode|=32768),0===t.files_remaining)throw new r.Error("validation","“files_remaining”, if given, must be positive.");var e;switch(i(t.mtime)){case"object":if(e=!0,t.mtime instanceof Date){var n=t.mtime;if(t.mtime=Math.floor(n.getTime()/1e3),t.mtime<0)throw new r.Error("validation","“mtime” ("+n+") must not be earlier than 1970.")}else null!==t.mtime&&(e=!1);break;case"undefined":t.mtime=null,e=!0;break;case"number":s("mtime",t.mtime),e=!0}if(!e)throw new r.Error("validation","“mtime” ("+t.mtime+") must be null, undefined, a Date, or a number.");return t}}},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(196),s=n(26),a=n(198),l=n(27),c=n(199),u=n(200),h=n(72),f=n(201),_=n(203),p=n(204),d=n(211),m=n(212),y=n(214),v=n(73),b=n(99),g=n(215),C=n(96),w=n(98),S=n(95),A="undefined"!=typeof window?window.document:null,x={cols:80,rows:24,convertEol:!1,termName:"xterm",cursorBlink:!1,cursorStyle:"block",bellSound:g.BellSound,bellStyle:"none",enableBold:!0,fontFamily:"courier-new, courier, monospace",fontSize:15,lineHeight:1,letterSpacing:0,scrollback:1e3,screenKeys:!1,debug:!1,cancelEvents:!1,disableStdin:!1,useFlowControl:!1,tabStopWidth:8,theme:null},k=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;return n.browser=v,n.options=e,n.setup(),n}return r(e,t),e.prototype.setup=function(){var t=this;Object.keys(x).forEach(function(e){null==t.options[e]&&(t.options[e]=x[e]),t[e]=t.options[e]}),this.parent=A?A.body:null,this.cols=this.options.cols,this.rows=this.options.rows,this.options.handler&&this.on("data",this.options.handler),this.cursorState=0,this.cursorHidden=!1,this.sendDataQueue="",this.customKeyEventHandler=null,this.applicationKeypad=!1,this.applicationCursor=!1,this.originMode=!1,this.insertMode=!1,this.wraparoundMode=!0,this.bracketedPasteMode=!1,this.charset=null,this.gcharset=null,this.glevel=0,this.charsets=[null],this.readable=!0,this.writable=!0,this.defAttr=131840,this.curAttr=131840,this.params=[],this.currentParam=0,this.prefix="",this.postfix="",this.writeBuffer=[],this.writeInProgress=!1,this.xoffSentToCatchUp=!1,this.writeStopped=!1,this.surrogate_high="",this.userScrolling=!1,this.inputHandler=new f.InputHandler(this),this.parser=new _.Parser(this.inputHandler,this),this.renderer=this.renderer||null,this.selectionManager=this.selectionManager||null,this.linkifier=this.linkifier||new d.Linkifier(this),this._mouseZoneManager=this._mouseZoneManager||null,this.buffers=new o.BufferSet(this),this.buffer=this.buffers.active,this.buffers.on("activate",function(e){t.buffer=e}),this.selectionManager&&this.selectionManager.setBuffer(this.buffer)},e.prototype.eraseAttr=function(){return-512&this.defAttr|511&this.curAttr},e.prototype.focus=function(){this.textarea&&this.textarea.focus()},Object.defineProperty(e.prototype,"isFocused",{get:function(){return A.activeElement===this.textarea},enumerable:!0,configurable:!0}),e.prototype.getOption=function(t){if(!(t in x))throw new Error('No option with key "'+t+'"');return void 0!==this.options[t]?this.options[t]:this[t]},e.prototype.setOption=function(t,e){if(!(t in x))throw new Error('No option with key "'+t+'"');switch(t){case"bellStyle":e||(e="none");break;case"cursorStyle":e||(e="block");break;case"lineHeight":if(e<1)return void console.warn(t+" cannot be less than 1, value: "+e);case"tabStopWidth":if(e<1)return void console.warn(t+" cannot be less than 1, value: "+e);break;case"theme":if(this.renderer)return void this._setTheme(e);break;case"scrollback":if((e=Math.min(e,s.MAX_BUFFER_SIZE))<0)return void console.warn(t+" cannot be less than 0, value: "+e);if(this.options[t]!==e){var n=this.rows+e;if(this.buffer.lines.length>n){var i=this.buffer.lines.length-n,r=this.buffer.ydisp-i<0;this.buffer.lines.trimStart(i),this.buffer.ybase=Math.max(this.buffer.ybase-i,0),this.buffer.ydisp=Math.max(this.buffer.ydisp-i,0),r&&this.refresh(0,this.rows-1)}}}switch(this[t]=e,this.options[t]=e,t){case"fontFamily":case"fontSize":this.renderer.clear(),this.charMeasure.measure(this.options);break;case"enableBold":case"letterSpacing":case"lineHeight":this.renderer.clear(),this.renderer.onResize(this.cols,this.rows,!1),this.refresh(0,this.rows-1);case"scrollback":this.buffers.resize(this.cols,this.rows),this.viewport.syncScrollArea();break;case"tabStopWidth":this.buffers.setupTabStops();break;case"bellSound":case"bellStyle":this.syncBellSound()}this.renderer&&this.renderer.onOptionsChanged()},e.prototype._onTextAreaFocus=function(){this.sendFocus&&this.send(h.C0.ESC+"[I"),this.element.classList.add("focus"),this.showCursor(),this.emit("focus")},e.prototype.blur=function(){return this.textarea.blur()},e.prototype._onTextAreaBlur=function(){this.refresh(this.buffer.y,this.buffer.y),this.sendFocus&&this.send(h.C0.ESC+"[O"),this.element.classList.remove("focus"),this.emit("blur")},e.prototype.initGlobal=function(){var t=this;this.bindKeys(),E(this.element,"copy",function(e){t.hasSelection()&&u.copyHandler(e,t,t.selectionManager)});var e=function(e){return u.pasteHandler(e,t)};E(this.textarea,"paste",e),E(this.element,"paste",e),v.isFirefox?E(this.element,"mousedown",function(e){2===e.button&&u.rightClickHandler(e,t.textarea,t.selectionManager)}):E(this.element,"contextmenu",function(e){u.rightClickHandler(e,t.textarea,t.selectionManager)}),v.isLinux&&E(this.element,"auxclick",function(e){1===e.button&&u.moveTextAreaUnderMouseCursor(e,t.textarea)})},e.prototype.bindKeys=function(){var t=this,e=this;E(this.element,"keydown",function(t){A.activeElement===this&&e._keyDown(t)},!0),E(this.element,"keypress",function(t){A.activeElement===this&&e._keyPress(t)},!0),E(this.element,"keyup",function(e){var n;16!==(n=e).keyCode&&17!==n.keyCode&&18!==n.keyCode&&t.focus()},!0),E(this.textarea,"keydown",function(e){t._keyDown(e)},!0),E(this.textarea,"keypress",function(e){t._keyPress(e),t.textarea.value=""},!0),E(this.textarea,"compositionstart",function(){return t.compositionHelper.compositionstart()}),E(this.textarea,"compositionupdate",function(e){return t.compositionHelper.compositionupdate(e)}),E(this.textarea,"compositionend",function(){return t.compositionHelper.compositionend()}),this.on("refresh",function(){return t.compositionHelper.updateCompositionElements()}),this.on("refresh",function(e){return t.queueLinkification(e.start,e.end)})},e.prototype.open=function(t){var e=this;if(this.parent=t||this.parent,!this.parent)throw new Error("Terminal requires a parent element.");this.context=this.parent.ownerDocument.defaultView,this.document=this.parent.ownerDocument,this.body=this.document.body,S.initialize(this.document),this.element=this.document.createElement("div"),this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),this.parent.appendChild(this.element);var n=A.createDocumentFragment();this.viewportElement=A.createElement("div"),this.viewportElement.classList.add("xterm-viewport"),n.appendChild(this.viewportElement),this.viewportScrollArea=A.createElement("div"),this.viewportScrollArea.classList.add("xterm-scroll-area"),this.viewportElement.appendChild(this.viewportScrollArea),this._mouseZoneManager=new w.MouseZoneManager(this),this.on("scroll",function(){return e._mouseZoneManager.clearAll()}),this.linkifier.attachToDom(this._mouseZoneManager),this.helperContainer=A.createElement("div"),this.helperContainer.classList.add("xterm-helpers"),n.appendChild(this.helperContainer),this.textarea=A.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.textarea.addEventListener("focus",function(){return e._onTextAreaFocus()}),this.textarea.addEventListener("blur",function(){return e._onTextAreaBlur()}),this.helperContainer.appendChild(this.textarea),this.compositionView=A.createElement("div"),this.compositionView.classList.add("composition-view"),this.compositionHelper=new a.CompositionHelper(this.textarea,this.compositionView,this),this.helperContainer.appendChild(this.compositionView),this.charSizeStyleElement=A.createElement("style"),this.helperContainer.appendChild(this.charSizeStyleElement),this.charMeasure=new y.CharMeasure(A,this.helperContainer),this.syncBellSound(),this.element.appendChild(n),this.renderer=new p.Renderer(this,this.options.theme),this.options.theme=null,this.viewport=new c.Viewport(this,this.viewportElement,this.viewportScrollArea,this.charMeasure),this.viewport.onThemeChanged(this.renderer.colorManager.colors),this.on("cursormove",function(){return e.renderer.onCursorMove()}),this.on("resize",function(){return e.renderer.onResize(e.cols,e.rows,!1)}),this.on("blur",function(){return e.renderer.onBlur()}),this.on("focus",function(){return e.renderer.onFocus()}),window.addEventListener("resize",function(){return e.renderer.onWindowResize(window.devicePixelRatio)}),this.charMeasure.on("charsizechanged",function(){return e.renderer.onResize(e.cols,e.rows,!0)}),this.renderer.on("resize",function(t){return e.viewport.syncScrollArea()}),this.selectionManager=new m.SelectionManager(this,this.buffer,this.charMeasure),this.element.addEventListener("mousedown",function(t){return e.selectionManager.onMouseDown(t)}),this.selectionManager.on("refresh",function(t){return e.renderer.onSelectionChanged(t.start,t.end)}),this.selectionManager.on("newselection",function(t){e.textarea.value=t,e.textarea.focus(),e.textarea.select()}),this.on("scroll",function(){e.viewport.syncScrollArea(),e.selectionManager.refresh()}),this.viewportElement.addEventListener("scroll",function(){return e.selectionManager.refresh()}),this.mouseHelper=new b.MouseHelper(this.renderer),this.charMeasure.measure(this.options),this.refresh(0,this.rows-1),this.initGlobal(),this.bindMouse()},e.prototype._setTheme=function(t){var e=this.renderer.setTheme(t);this.viewport&&this.viewport.onThemeChanged(e)},e.applyAddon=function(t){t.apply(e)},e.prototype.bindMouse=function(){var t=this,e=this.element,n=this,i=32;function r(t){var e,r;if(e=function(t){var e,i,r,o,s;switch(t.overrideType||t.type){case"mousedown":e=null!=t.button?+t.button:null!=t.which?t.which-1:null,v.isMSIE&&(e=1===e?0:4===e?1:e);break;case"mouseup":e=3;break;case"DOMMouseScroll":e=t.detail<0?64:65;break;case"wheel":e=t.wheelDeltaY>0?64:65}i=t.shiftKey?4:0,r=t.metaKey?8:0,o=t.ctrlKey?16:0,s=i|r|o,n.vt200Mouse?s&=o:n.normalMouse||(s=0);return e=32+(s<<2)+e}(t),r=n.mouseHelper.getRawByteCoords(t,n.element,n.charMeasure,n.options.lineHeight,n.cols,n.rows))switch(a(e,r),t.overrideType||t.type){case"mousedown":i=e;break;case"mouseup":i=32}}function o(t){var e=i,r=n.mouseHelper.getRawByteCoords(t,n.element,n.charMeasure,n.options.lineHeight,n.cols,n.rows);r&&a(e+=32,r)}function s(t,e){if(n.utfMouse){if(2047===e)return void t.push(0);e<127?t.push(e):(e>2047&&(e=2047),t.push(192|e>>6),t.push(128|63&e))}else{if(255===e)return void t.push(0);e>127&&(e=127),t.push(e)}}function a(t,e){if(n.vt300Mouse){t&=3,e.x-=32,e.y-=32;var i=h.C0.ESC+"[24";if(0===t)i+="1";else if(1===t)i+="3";else if(2===t)i+="5";else{if(3===t)return;i+="0"}return i+="~["+e.x+","+e.y+"]\r",void n.send(i)}if(n.decLocator)return t&=3,e.x-=32,e.y-=32,0===t?t=2:1===t?t=4:2===t?t=6:3===t&&(t=3),void n.send(h.C0.ESC+"["+t+";"+(3===t?4:0)+";"+e.y+";"+e.x+";"+e.page||"0&w");if(n.urxvtMouse)return e.x-=32,e.y-=32,e.x++,e.y++,void n.send(h.C0.ESC+"["+t+";"+e.x+";"+e.y+"M");if(n.sgrMouse)return e.x-=32,e.y-=32,void n.send(h.C0.ESC+"[<"+((3==(3&t)?-4&t:t)-32)+";"+e.x+";"+e.y+(3==(3&t)?"m":"M"));var r=[];s(r,t),s(r,e.x),s(r,e.y),n.send(h.C0.ESC+"[M"+String.fromCharCode.apply(String,r))}E(e,"mousedown",function(e){if(e.preventDefault(),t.focus(),t.mouseEvents&&!t.selectionManager.shouldForceSelection(e)){if(r(e),t.vt200Mouse)return e.overrideType="mouseup",r(e),t.cancel(e);if(t.normalMouse&&E(t.document,"mousemove",o),!t.x10Mouse){var n=function(e){return r(e),t.normalMouse&&O(t.document,"mousemove",o),O(t.document,"mouseup",n),t.cancel(e)};E(t.document,"mouseup",n)}return t.cancel(e)}}),E(e,"wheel",function(e){t.mouseEvents&&(t.x10Mouse||t.vt300Mouse||t.decLocator||(r(e),e.preventDefault()))}),E(e,"wheel",function(e){if(!t.mouseEvents)return t.viewport.onWheel(e),t.cancel(e)}),E(e,"touchstart",function(e){if(!t.mouseEvents)return t.viewport.onTouchStart(e),t.cancel(e)}),E(e,"touchmove",function(e){if(!t.mouseEvents)return t.viewport.onTouchMove(e),t.cancel(e)})},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.readable=!1,this.writable=!1,this.handler=function(){},this.write=function(){},this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},e.prototype.refresh=function(t,e){this.renderer&&this.renderer.queueRefresh(t,e)},e.prototype.queueLinkification=function(t,e){this.linkifier&&this.linkifier.linkifyRows(t,e)},e.prototype.showCursor=function(){this.cursorState||(this.cursorState=1,this.refresh(this.buffer.y,this.buffer.y))},e.prototype.scroll=function(t){var e=this.blankLine(void 0,t),n=this.buffer.ybase+this.buffer.scrollTop,i=this.buffer.ybase+this.buffer.scrollBottom;if(0===this.buffer.scrollTop){var r=this.buffer.lines.length===this.buffer.lines.maxLength;i===this.buffer.lines.length-1?this.buffer.lines.push(e):this.buffer.lines.splice(i+1,0,e),r?this.userScrolling&&(this.buffer.ydisp=Math.max(this.buffer.ydisp-1,0)):(this.buffer.ybase++,this.userScrolling||this.buffer.ydisp++)}else{var o=i-n+1;this.buffer.lines.shiftElements(n+1,o-1,-1),this.buffer.lines.set(i,e)}this.userScrolling||(this.buffer.ydisp=this.buffer.ybase),this.updateRange(this.buffer.scrollTop),this.updateRange(this.buffer.scrollBottom),this.emit("scroll",this.buffer.ydisp)},e.prototype.scrollLines=function(t,e){if(t<0){if(0===this.buffer.ydisp)return;this.userScrolling=!0}else t+this.buffer.ydisp>=this.buffer.ybase&&(this.userScrolling=!1);var n=this.buffer.ydisp;this.buffer.ydisp=Math.max(Math.min(this.buffer.ydisp+t,this.buffer.ybase),0),n!==this.buffer.ydisp&&(e||this.emit("scroll",this.buffer.ydisp),this.refresh(0,this.rows-1))},e.prototype.scrollPages=function(t){this.scrollLines(t*(this.rows-1))},e.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},e.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},e.prototype.write=function(t){var e=this;this.writeBuffer.push(t),this.options.useFlowControl&&!this.xoffSentToCatchUp&&this.writeBuffer.length>=5&&(this.send(h.C0.DC3),this.xoffSentToCatchUp=!0),!this.writeInProgress&&this.writeBuffer.length>0&&(this.writeInProgress=!0,setTimeout(function(){e.innerWrite()}))},e.prototype.innerWrite=function(){for(var t=this,e=this.writeBuffer.splice(0,300);e.length>0;){var n=e.shift();this.xoffSentToCatchUp&&0===e.length&&0===this.writeBuffer.length&&(this.send(h.C0.DC1),this.xoffSentToCatchUp=!1),this.refreshStart=this.buffer.y,this.refreshEnd=this.buffer.y;var i=this.parser.parse(n);this.parser.setState(i),this.updateRange(this.buffer.y),this.refresh(this.refreshStart,this.refreshEnd)}this.writeBuffer.length>0?setTimeout(function(){return t.innerWrite()},0):this.writeInProgress=!1},e.prototype.writeln=function(t){this.write(t+"\r\n")},e.prototype.attachCustomKeyEventHandler=function(t){this.customKeyEventHandler=t},e.prototype.setHypertextLinkHandler=function(t){if(!this.linkifier)throw new Error("Cannot attach a hypertext link handler before Terminal.open is called");this.linkifier.setHypertextLinkHandler(t),this.refresh(0,this.rows-1)},e.prototype.setHypertextValidationCallback=function(t){if(!this.linkifier)throw new Error("Cannot attach a hypertext validation callback before Terminal.open is called");this.linkifier.setHypertextValidationCallback(t),this.refresh(0,this.rows-1)},e.prototype.registerLinkMatcher=function(t,e,n){if(this.linkifier){var i=this.linkifier.registerLinkMatcher(t,e,n);return this.refresh(0,this.rows-1),i}return 0},e.prototype.deregisterLinkMatcher=function(t){this.linkifier&&this.linkifier.deregisterLinkMatcher(t)&&this.refresh(0,this.rows-1)},e.prototype.hasSelection=function(){return!!this.selectionManager&&this.selectionManager.hasSelection},e.prototype.getSelection=function(){return this.selectionManager?this.selectionManager.selectionText:""},e.prototype.clearSelection=function(){this.selectionManager&&this.selectionManager.clearSelection()},e.prototype.selectAll=function(){this.selectionManager&&this.selectionManager.selectAll()},e.prototype._keyDown=function(t){if(this.customKeyEventHandler&&!1===this.customKeyEventHandler(t))return!1;if(!this.compositionHelper.keydown(t))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var e=this._evaluateKeyEscapeSequence(t);return e.key===h.C0.DC3?this.writeStopped=!0:e.key===h.C0.DC1&&(this.writeStopped=!1),e.scrollLines?(this.scrollLines(e.scrollLines),this.cancel(t,!0)):!!L(this.browser,t)||(e.cancel&&this.cancel(t,!0),!e.key||(this.emit("keydown",t),this.emit("key",e.key,t),this.showCursor(),this.handler(e.key),this.cancel(t,!0)))},e.prototype._evaluateKeyEscapeSequence=function(t){var e={cancel:!1,key:void 0,scrollLines:void 0},n=(t.shiftKey?1:0)|(t.altKey?2:0)|(t.ctrlKey?4:0)|(t.metaKey?8:0);switch(t.keyCode){case 0:"UIKeyInputUpArrow"===t.key?this.applicationCursor?e.key=h.C0.ESC+"OA":e.key=h.C0.ESC+"[A":"UIKeyInputLeftArrow"===t.key?this.applicationCursor?e.key=h.C0.ESC+"OD":e.key=h.C0.ESC+"[D":"UIKeyInputRightArrow"===t.key?this.applicationCursor?e.key=h.C0.ESC+"OC":e.key=h.C0.ESC+"[C":"UIKeyInputDownArrow"===t.key&&(this.applicationCursor?e.key=h.C0.ESC+"OB":e.key=h.C0.ESC+"[B");break;case 8:if(t.shiftKey){e.key=h.C0.BS;break}e.key=h.C0.DEL;break;case 9:if(t.shiftKey){e.key=h.C0.ESC+"[Z";break}e.key=h.C0.HT,e.cancel=!0;break;case 13:e.key=h.C0.CR,e.cancel=!0;break;case 27:e.key=h.C0.ESC,e.cancel=!0;break;case 37:n?(e.key=h.C0.ESC+"[1;"+(n+1)+"D",e.key===h.C0.ESC+"[1;3D"&&(e.key=this.browser.isMac?h.C0.ESC+"b":h.C0.ESC+"[1;5D")):this.applicationCursor?e.key=h.C0.ESC+"OD":e.key=h.C0.ESC+"[D";break;case 39:n?(e.key=h.C0.ESC+"[1;"+(n+1)+"C",e.key===h.C0.ESC+"[1;3C"&&(e.key=this.browser.isMac?h.C0.ESC+"f":h.C0.ESC+"[1;5C")):this.applicationCursor?e.key=h.C0.ESC+"OC":e.key=h.C0.ESC+"[C";break;case 38:n?(e.key=h.C0.ESC+"[1;"+(n+1)+"A",e.key===h.C0.ESC+"[1;3A"&&(e.key=h.C0.ESC+"[1;5A")):this.applicationCursor?e.key=h.C0.ESC+"OA":e.key=h.C0.ESC+"[A";break;case 40:n?(e.key=h.C0.ESC+"[1;"+(n+1)+"B",e.key===h.C0.ESC+"[1;3B"&&(e.key=h.C0.ESC+"[1;5B")):this.applicationCursor?e.key=h.C0.ESC+"OB":e.key=h.C0.ESC+"[B";break;case 45:t.shiftKey||t.ctrlKey||(e.key=h.C0.ESC+"[2~");break;case 46:e.key=n?h.C0.ESC+"[3;"+(n+1)+"~":h.C0.ESC+"[3~";break;case 36:n?e.key=h.C0.ESC+"[1;"+(n+1)+"H":this.applicationCursor?e.key=h.C0.ESC+"OH":e.key=h.C0.ESC+"[H";break;case 35:n?e.key=h.C0.ESC+"[1;"+(n+1)+"F":this.applicationCursor?e.key=h.C0.ESC+"OF":e.key=h.C0.ESC+"[F";break;case 33:t.shiftKey?e.scrollLines=-(this.rows-1):e.key=h.C0.ESC+"[5~";break;case 34:t.shiftKey?e.scrollLines=this.rows-1:e.key=h.C0.ESC+"[6~";break;case 112:e.key=n?h.C0.ESC+"[1;"+(n+1)+"P":h.C0.ESC+"OP";break;case 113:e.key=n?h.C0.ESC+"[1;"+(n+1)+"Q":h.C0.ESC+"OQ";break;case 114:e.key=n?h.C0.ESC+"[1;"+(n+1)+"R":h.C0.ESC+"OR";break;case 115:e.key=n?h.C0.ESC+"[1;"+(n+1)+"S":h.C0.ESC+"OS";break;case 116:e.key=n?h.C0.ESC+"[15;"+(n+1)+"~":h.C0.ESC+"[15~";break;case 117:e.key=n?h.C0.ESC+"[17;"+(n+1)+"~":h.C0.ESC+"[17~";break;case 118:e.key=n?h.C0.ESC+"[18;"+(n+1)+"~":h.C0.ESC+"[18~";break;case 119:e.key=n?h.C0.ESC+"[19;"+(n+1)+"~":h.C0.ESC+"[19~";break;case 120:e.key=n?h.C0.ESC+"[20;"+(n+1)+"~":h.C0.ESC+"[20~";break;case 121:e.key=n?h.C0.ESC+"[21;"+(n+1)+"~":h.C0.ESC+"[21~";break;case 122:e.key=n?h.C0.ESC+"[23;"+(n+1)+"~":h.C0.ESC+"[23~";break;case 123:e.key=n?h.C0.ESC+"[24;"+(n+1)+"~":h.C0.ESC+"[24~";break;default:!t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?this.browser.isMac||!t.altKey||t.ctrlKey||t.metaKey?this.browser.isMac&&!t.altKey&&!t.ctrlKey&&t.metaKey&&65===t.keyCode&&this.selectAll():t.keyCode>=65&&t.keyCode<=90?e.key=h.C0.ESC+String.fromCharCode(t.keyCode+32):192===t.keyCode?e.key=h.C0.ESC+"`":t.keyCode>=48&&t.keyCode<=57&&(e.key=h.C0.ESC+(t.keyCode-48)):t.keyCode>=65&&t.keyCode<=90?e.key=String.fromCharCode(t.keyCode-64):32===t.keyCode?e.key=String.fromCharCode(0):t.keyCode>=51&&t.keyCode<=55?e.key=String.fromCharCode(t.keyCode-51+27):56===t.keyCode?e.key=String.fromCharCode(127):219===t.keyCode?e.key=String.fromCharCode(27):220===t.keyCode?e.key=String.fromCharCode(28):221===t.keyCode&&(e.key=String.fromCharCode(29))}return e},e.prototype.setgLevel=function(t){this.glevel=t,this.charset=this.charsets[t]},e.prototype.setgCharset=function(t,e){this.charsets[t]=e,this.glevel===t&&(this.charset=e)},e.prototype._keyPress=function(t){var e;if(this.customKeyEventHandler&&!1===this.customKeyEventHandler(t))return!1;if(this.cancel(t),t.charCode)e=t.charCode;else if(null==t.which)e=t.keyCode;else{if(0===t.which||0===t.charCode)return!1;e=t.which}return!(!e||(t.altKey||t.ctrlKey||t.metaKey)&&!L(this.browser,t))&&(e=String.fromCharCode(e),this.emit("keypress",e,t),this.emit("key",e,t),this.showCursor(),this.handler(e),!0)},e.prototype.send=function(t){var e=this;this.sendDataQueue||setTimeout(function(){e.handler(e.sendDataQueue),e.sendDataQueue=""},1),this.sendDataQueue+=t},e.prototype.bell=function(){var t=this;this.emit("bell"),this.soundBell()&&this.bellAudioElement.play(),this.visualBell()&&(this.element.classList.add("visual-bell-active"),clearTimeout(this.visualBellTimer),this.visualBellTimer=window.setTimeout(function(){t.element.classList.remove("visual-bell-active")},200))},e.prototype.log=function(t,e){this.options.debug&&this.context.console&&this.context.console.log&&this.context.console.log(t,e)},e.prototype.error=function(t,e){this.options.debug&&this.context.console&&this.context.console.error&&this.context.console.error(t,e)},e.prototype.resize=function(t,e){isNaN(t)||isNaN(e)||(t!==this.cols||e!==this.rows?(t<1&&(t=1),e<1&&(e=1),this.buffers.resize(t,e),this.cols=t,this.rows=e,this.buffers.setupTabStops(this.cols),this.charMeasure.measure(this.options),this.refresh(0,this.rows-1),this.emit("resize",{cols:t,rows:e})):this.charMeasure.width&&this.charMeasure.height||this.charMeasure.measure(this.options))},e.prototype.updateRange=function(t){t<this.refreshStart&&(this.refreshStart=t),t>this.refreshEnd&&(this.refreshEnd=t)},e.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1},e.prototype.eraseRight=function(t,e){var n=this.buffer.lines.get(this.buffer.ybase+e);if(n){for(var i=[this.eraseAttr()," ",1,32];t<this.cols;t++)n[t]=i;this.updateRange(e)}},e.prototype.eraseLeft=function(t,e){var n=this.buffer.lines.get(this.buffer.ybase+e);if(n){var i=[this.eraseAttr()," ",1,32];for(t++;t--;)n[t]=i;this.updateRange(e)}},e.prototype.clear=function(){if(0!==this.buffer.ybase||0!==this.buffer.y){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 t=1;t<this.rows;t++)this.buffer.lines.push(this.blankLine());this.refresh(0,this.rows-1),this.emit("scroll",this.buffer.ydisp)}},e.prototype.eraseLine=function(t){this.eraseRight(0,t)},e.prototype.blankLine=function(t,e,n){var i=[t?this.eraseAttr():this.defAttr," ",1,32],r=[];e&&(r.isWrapped=e),n=n||this.cols;for(var o=0;o<n;o++)r[o]=i;return r},e.prototype.ch=function(t){return t?[this.eraseAttr()," ",1,32]:[this.defAttr," ",1,32]},e.prototype.is=function(t){return 0===(this.options.termName+"").indexOf(t)},e.prototype.handler=function(t){this.options.disableStdin||(this.selectionManager&&this.selectionManager.hasSelection&&this.selectionManager.clearSelection(),this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),this.emit("data",t))},e.prototype.handleTitle=function(t){this.emit("title",t)},e.prototype.index=function(){this.buffer.y++,this.buffer.y>this.buffer.scrollBottom&&(this.buffer.y--,this.scroll()),this.buffer.x>=this.cols&&this.buffer.x--},e.prototype.reverseIndex=function(){if(this.buffer.y===this.buffer.scrollTop){var t=this.buffer.scrollBottom-this.buffer.scrollTop;this.buffer.lines.shiftElements(this.buffer.y+this.buffer.ybase,t,1),this.buffer.lines.set(this.buffer.y+this.buffer.ybase,this.blankLine(!0)),this.updateRange(this.buffer.scrollTop),this.updateRange(this.buffer.scrollBottom)}else this.buffer.y--},e.prototype.reset=function(){this.options.rows=this.rows,this.options.cols=this.cols;var t=this.customKeyEventHandler,e=this.inputHandler,n=this.buffers;this.setup(),this.customKeyEventHandler=t,this.inputHandler=e,this.buffers=n,this.refresh(0,this.rows-1),this.viewport.syncScrollArea()},e.prototype.tabSet=function(){this.buffer.tabs[this.buffer.x]=!0},e.prototype.cancel=function(t,e){if(this.options.cancelEvents||e)return t.preventDefault(),t.stopPropagation(),!1},e.prototype.matchColor=function(t,e,n){return function(t,e,n){var i=t<<16|e<<8|n;if(null!=R[i])return R[i];for(var r,o,s,a,l,c=1/0,u=-1,h=0;h<T.length;h++){if(r=T[h],o=r[0],s=r[1],a=r[2],f=t,_=e,p=n,d=o,m=s,y=a,0===(l=Math.pow(30*(f-d),2)+Math.pow(59*(_-m),2)+Math.pow(11*(p-y),2))){u=h;break}l<c&&(c=l,u=h)}var f,_,p,d,m,y;return R[i]=u}(t,e,n)},e.prototype.visualBell=function(){return"visual"===this.options.bellStyle||"both"===this.options.bellStyle},e.prototype.soundBell=function(){return"sound"===this.options.bellStyle||"both"===this.options.bellStyle},e.prototype.syncBellSound=function(){this.element&&(this.soundBell()&&this.bellAudioElement?this.bellAudioElement.setAttribute("src",this.options.bellSound):this.soundBell()?(this.bellAudioElement=A.createElement("audio"),this.bellAudioElement.setAttribute("preload","auto"),this.bellAudioElement.setAttribute("src",this.options.bellSound),this.helperContainer.appendChild(this.bellAudioElement)):this.bellAudioElement&&this.helperContainer.removeChild(this.bellAudioElement))},e}(l.EventEmitter);e.Terminal=k;var E=function(t,e,n,i){Array.isArray(t)||(t=[t]),t.forEach(function(t){t.addEventListener(e,n,i||!1)})};function O(t,e,n,i){void 0===i&&(i=!1),t.removeEventListener(e,n,i)}function L(t,e){var n=t.isMac&&e.altKey&&!e.ctrlKey&&!e.metaKey||t.isMSWindows&&e.altKey&&e.ctrlKey&&!e.metaKey;return"keypress"===e.type?n:n&&(!e.keyCode||e.keyCode>47)}var T=function(){for(var t,e=C.DEFAULT_ANSI_COLORS.map(function(t){return t=t.substring(1),[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]}),n=[0,95,135,175,215,255],i=0;i<216;i++)e.push([n[i/36%6|0],n[i/6%6|0],n[i%6]]);for(i=0;i<24;i++)t=8+10*i,e.push([t,t,t]);return e}(),R={}},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(26),s=function(t){function e(e){var n=t.call(this)||this;return n._terminal=e,n._normal=new o.Buffer(n._terminal,!0),n._normal.fillViewportRows(),n._alt=new o.Buffer(n._terminal,!1),n._activeBuffer=n._normal,n.setupTabStops(),n}return r(e,t),Object.defineProperty(e.prototype,"alt",{get:function(){return this._alt},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal},enumerable:!0,configurable:!0}),e.prototype.activateNormalBuffer=function(){this._alt.clear(),this._activeBuffer=this._normal,this.emit("activate",this._normal)},e.prototype.activateAltBuffer=function(){this._alt.fillViewportRows(),this._activeBuffer=this._alt,this.emit("activate",this._alt)},e.prototype.resize=function(t,e){this._normal.resize(t,e),this._alt.resize(t,e)},e.prototype.setupTabStops=function(t){this._normal.setupTabStops(t),this._alt.setupTabStops(t)},e}(n(27).EventEmitter);e.BufferSet=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=t.call(this)||this;return n._maxLength=e,n._array=new Array(n._maxLength),n._startIndex=0,n._length=0,n}return r(e,t),Object.defineProperty(e.prototype,"maxLength",{get:function(){return this._maxLength},set:function(t){if(this._maxLength!==t){for(var e=new Array(t),n=0;n<Math.min(t,this.length);n++)e[n]=this._array[this._getCyclicIndex(n)];this._array=e,this._maxLength=t,this._startIndex=0}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},set:function(t){if(t>this._length)for(var e=this._length;e<t;e++)this._array[e]=void 0;this._length=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"forEach",{get:function(){var t=this;return function(e){for(var n=t.length,i=0;i<n;i++)e(t.get(i),i)}},enumerable:!0,configurable:!0}),e.prototype.get=function(t){return this._array[this._getCyclicIndex(t)]},e.prototype.set=function(t,e){this._array[this._getCyclicIndex(t)]=e},e.prototype.push=function(t){this._array[this._getCyclicIndex(this._length)]=t,this._length===this._maxLength?(this._startIndex++,this._startIndex===this._maxLength&&(this._startIndex=0),this.emit("trim",1)):this._length++},e.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},e.prototype.splice=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(e){for(var r=t;r<this._length-e;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+e)];this._length-=e}if(n&&n.length){for(r=this._length-1;r>=t;r--)this._array[this._getCyclicIndex(r+n.length)]=this._array[this._getCyclicIndex(r)];for(r=0;r<n.length;r++)this._array[this._getCyclicIndex(t+r)]=n[r];if(this._length+n.length>this.maxLength){var o=this._length+n.length-this.maxLength;this._startIndex+=o,this._length=this.maxLength,this.emit("trim",o)}else this._length+=n.length}},e.prototype.trimStart=function(t){t>this._length&&(t=this._length),this._startIndex+=t,this._length-=t,this.emit("trim",t)},e.prototype.shiftElements=function(t,e,n){if(!(e<=0)){if(t<0||t>=this._length)throw new Error("start argument out of range");if(t+n<0)throw new Error("Cannot shift elements in list beyond index 0");if(n>0){for(var i=e-1;i>=0;i--)this.set(t+i+n,this.get(t+i));var r=t+e+n-this._length;if(r>0)for(this._length+=r;this._length>this.maxLength;)this._length--,this._startIndex++,this.emit("trim",1)}else for(i=0;i<e;i++)this.set(t+i+n,this.get(t+i))}},e.prototype._getCyclicIndex=function(t){return(this._startIndex+t)%this.maxLength},e}(n(27).EventEmitter);e.CircularList=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e,n){this.textarea=t,this.compositionView=e,this.terminal=n,this.isComposing=!1,this.isSendingComposition=!1,this.compositionPosition={start:null,end:null}}return t.prototype.compositionstart=function(){this.isComposing=!0,this.compositionPosition.start=this.textarea.value.length,this.compositionView.textContent="",this.compositionView.classList.add("active")},t.prototype.compositionupdate=function(t){var e=this;this.compositionView.textContent=t.data,this.updateCompositionElements(),setTimeout(function(){e.compositionPosition.end=e.textarea.value.length},0)},t.prototype.compositionend=function(){this.finalizeComposition(!0)},t.prototype.keydown=function(t){if(this.isComposing||this.isSendingComposition){if(229===t.keyCode)return!1;if(16===t.keyCode||17===t.keyCode||18===t.keyCode)return!1;this.finalizeComposition(!1)}return 229!==t.keyCode||(this.handleAnyTextareaChanges(),!1)},t.prototype.finalizeComposition=function(t){var e=this;if(this.compositionView.classList.remove("active"),this.isComposing=!1,this.clearTextareaPosition(),t){var n={start:this.compositionPosition.start,end:this.compositionPosition.end};this.isSendingComposition=!0,setTimeout(function(){if(e.isSendingComposition){e.isSendingComposition=!1;var t=void 0;t=e.isComposing?e.textarea.value.substring(n.start,n.end):e.textarea.value.substring(n.start),e.terminal.handler(t)}},0)}else{this.isSendingComposition=!1;var i=this.textarea.value.substring(this.compositionPosition.start,this.compositionPosition.end);this.terminal.handler(i)}},t.prototype.handleAnyTextareaChanges=function(){var t=this,e=this.textarea.value;setTimeout(function(){if(!t.isComposing){var n=t.textarea.value.replace(e,"");n.length>0&&t.terminal.handler(n)}},0)},t.prototype.updateCompositionElements=function(t){var e=this;if(this.isComposing){if(this.terminal.buffer.isCursorInViewport){var n=Math.ceil(this.terminal.charMeasure.height*this.terminal.options.lineHeight),i=this.terminal.buffer.y*n,r=this.terminal.buffer.x*this.terminal.charMeasure.width;this.compositionView.style.left=r+"px",this.compositionView.style.top=i+"px",this.compositionView.style.height=n+"px",this.compositionView.style.lineHeight=n+"px";var o=this.compositionView.getBoundingClientRect();this.textarea.style.left=r+"px",this.textarea.style.top=i+"px",this.textarea.style.width=o.width+"px",this.textarea.style.height=o.height+"px",this.textarea.style.lineHeight=o.height+"px"}t||setTimeout(function(){return e.updateCompositionElements(!0)},0)}},t.prototype.clearTextareaPosition=function(){this.textarea.style.left="",this.textarea.style.top=""},t}();e.CompositionHelper=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e,n,i){var r=this;this.terminal=t,this.viewportElement=e,this.scrollArea=n,this.charMeasure=i,this.currentRowHeight=0,this.lastRecordedBufferLength=0,this.lastRecordedViewportHeight=0,this.lastRecordedBufferHeight=0,this.viewportElement.addEventListener("scroll",this.onScroll.bind(this)),setTimeout(function(){return r.syncScrollArea()},0)}return t.prototype.onThemeChanged=function(t){this.viewportElement.style.backgroundColor=t.background},t.prototype.refresh=function(){if(this.charMeasure.height>0){this.currentRowHeight=this.terminal.renderer.dimensions.scaledCellHeight/window.devicePixelRatio,this.lastRecordedViewportHeight!==this.terminal.renderer.dimensions.canvasHeight&&(this.lastRecordedViewportHeight=this.terminal.renderer.dimensions.canvasHeight,this.viewportElement.style.height=this.lastRecordedViewportHeight+"px");var t=Math.round(this.currentRowHeight*this.lastRecordedBufferLength);this.lastRecordedBufferHeight!==t&&(this.lastRecordedBufferHeight=t,this.scrollArea.style.height=this.lastRecordedBufferHeight+"px")}},t.prototype.syncScrollArea=function(){this.lastRecordedBufferLength!==this.terminal.buffer.lines.length?(this.lastRecordedBufferLength=this.terminal.buffer.lines.length,this.refresh()):this.lastRecordedViewportHeight!==this.terminal.renderer.dimensions.canvasHeight?this.refresh():this.terminal.renderer.dimensions.scaledCellHeight/window.devicePixelRatio!==this.currentRowHeight&&this.refresh();var t=this.terminal.buffer.ydisp*this.currentRowHeight;this.viewportElement.scrollTop!==t&&(this.viewportElement.scrollTop=t)},t.prototype.onScroll=function(t){var e=Math.round(this.viewportElement.scrollTop/this.currentRowHeight)-this.terminal.buffer.ydisp;this.terminal.scrollLines(e,!0)},t.prototype.onWheel=function(t){if(0!==t.deltaY){var e=1;t.deltaMode===WheelEvent.DOM_DELTA_LINE?e=this.currentRowHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e=this.currentRowHeight*this.terminal.rows),this.viewportElement.scrollTop+=t.deltaY*e,t.preventDefault()}},t.prototype.onTouchStart=function(t){this.lastTouchY=t.touches[0].pageY},t.prototype.onTouchMove=function(t){var e=this.lastTouchY-t.touches[0].pageY;this.lastTouchY=t.touches[0].pageY,0!==e&&(this.viewportElement.scrollTop+=e,t.preventDefault())},t}();e.Viewport=i},function(t,e,n){"use strict";function i(t,e){return e?t.replace(/\r?\n/g,"\r"):t}function r(t,e){return e?"\e[200~"+t+"\e[201~":t}function o(t,e){e.style.position="fixed",e.style.width="20px",e.style.height="20px",e.style.left=t.clientX-10+"px",e.style.top=t.clientY-10+"px",e.style.zIndex="1000",e.focus(),setTimeout(function(){e.style.position=null,e.style.width=null,e.style.height=null,e.style.left=null,e.style.top=null,e.style.zIndex=null},4)}Object.defineProperty(e,"__esModule",{value:!0}),e.prepareTextForTerminal=i,e.bracketTextForPaste=r,e.copyHandler=function(t,e,n){e.browser.isMSIE?window.clipboardData.setData("Text",n.selectionText):t.clipboardData.setData("text/plain",n.selectionText),t.preventDefault()},e.pasteHandler=function(t,e){t.stopPropagation();var n=function(n){n=r(n=i(n,e.browser.isMSWindows),e.bracketedPasteMode),e.handler(n),e.textarea.value="",e.emit("paste",n),e.cancel(t)};e.browser.isMSIE?window.clipboardData&&n(window.clipboardData.getData("Text")):t.clipboardData&&n(t.clipboardData.getData("text/plain"))},e.moveTextAreaUnderMouseCursor=o,e.rightClickHandler=function(t,e,n){o(t,e),e.value=n.selectionText,e.select()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(72),r=n(93),o=n(26),s=n(94),a=n(202),l=function(){function t(t){this._terminal=t}return t.prototype.addChar=function(t,e){if(t>=" "){var n=a.wcwidth(e);this._terminal.charset&&this._terminal.charset[t]&&(t=this._terminal.charset[t]);var i=this._terminal.buffer.y+this._terminal.buffer.ybase;if(!n&&this._terminal.buffer.x)return void(this._terminal.buffer.lines.get(i)[this._terminal.buffer.x-1]&&(this._terminal.buffer.lines.get(i)[this._terminal.buffer.x-1][o.CHAR_DATA_WIDTH_INDEX]?(this._terminal.buffer.lines.get(i)[this._terminal.buffer.x-1][o.CHAR_DATA_CHAR_INDEX]+=t,this._terminal.buffer.lines.get(i)[this._terminal.buffer.x-1][3]=t.charCodeAt(0)):this._terminal.buffer.lines.get(i)[this._terminal.buffer.x-2]&&(this._terminal.buffer.lines.get(i)[this._terminal.buffer.x-2][o.CHAR_DATA_CHAR_INDEX]+=t,this._terminal.buffer.lines.get(i)[this._terminal.buffer.x-2][3]=t.charCodeAt(0)),this._terminal.updateRange(this._terminal.buffer.y)));if(this._terminal.buffer.x+n-1>=this._terminal.cols)if(this._terminal.wraparoundMode)this._terminal.buffer.x=0,this._terminal.buffer.y++,this._terminal.buffer.y>this._terminal.buffer.scrollBottom?(this._terminal.buffer.y--,this._terminal.scroll(!0)):this._terminal.buffer.lines.get(this._terminal.buffer.y).isWrapped=!0;else if(2===n)return;if(i=this._terminal.buffer.y+this._terminal.buffer.ybase,this._terminal.insertMode)for(var r=0;r<n;++r){0===this._terminal.buffer.lines.get(this._terminal.buffer.y+this._terminal.buffer.ybase).pop()[o.CHAR_DATA_WIDTH_INDEX]&&this._terminal.buffer.lines.get(i)[this._terminal.cols-2]&&2===this._terminal.buffer.lines.get(i)[this._terminal.cols-2][o.CHAR_DATA_WIDTH_INDEX]&&(this._terminal.buffer.lines.get(i)[this._terminal.cols-2]=[this._terminal.curAttr," ",1," ".charCodeAt(0)]),this._terminal.buffer.lines.get(i).splice(this._terminal.buffer.x,0,[this._terminal.curAttr," ",1," ".charCodeAt(0)])}this._terminal.buffer.lines.get(i)[this._terminal.buffer.x]=[this._terminal.curAttr,t,n,t.charCodeAt(0)],this._terminal.buffer.x++,this._terminal.updateRange(this._terminal.buffer.y),2===n&&(this._terminal.buffer.lines.get(i)[this._terminal.buffer.x]=[this._terminal.curAttr,"",0,void 0],this._terminal.buffer.x++)}},t.prototype.bell=function(){this._terminal.bell()},t.prototype.lineFeed=function(){this._terminal.convertEol&&(this._terminal.buffer.x=0),this._terminal.buffer.y++,this._terminal.buffer.y>this._terminal.buffer.scrollBottom&&(this._terminal.buffer.y--,this._terminal.scroll()),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--,this._terminal.emit("linefeed")},t.prototype.carriageReturn=function(){this._terminal.buffer.x=0},t.prototype.backspace=function(){this._terminal.buffer.x>0&&this._terminal.buffer.x--},t.prototype.tab=function(){this._terminal.buffer.x=this._terminal.buffer.nextStop()},t.prototype.shiftOut=function(){this._terminal.setgLevel(1)},t.prototype.shiftIn=function(){this._terminal.setgLevel(0)},t.prototype.insertChars=function(t){var e=t[0];e<1&&(e=1);for(var n=this._terminal.buffer.y+this._terminal.buffer.ybase,i=this._terminal.buffer.x,r=[this._terminal.eraseAttr()," ",1,32];e--&&i<this._terminal.cols;)this._terminal.buffer.lines.get(n).splice(i++,0,r),this._terminal.buffer.lines.get(n).pop()},t.prototype.cursorUp=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y-=e,this._terminal.buffer.y<0&&(this._terminal.buffer.y=0)},t.prototype.cursorDown=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y+=e,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--},t.prototype.cursorForward=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x+=e,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.cursorBackward=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--,this._terminal.buffer.x-=e,this._terminal.buffer.x<0&&(this._terminal.buffer.x=0)},t.prototype.cursorNextLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y+=e,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x=0},t.prototype.cursorPrecedingLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y-=e,this._terminal.buffer.y<0&&(this._terminal.buffer.y=0),this._terminal.buffer.x=0},t.prototype.cursorCharAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x=e-1},t.prototype.cursorPosition=function(t){var e,n=t[0]-1;e=t.length>=2?t[1]-1:0,n<0?n=0:n>=this._terminal.rows&&(n=this._terminal.rows-1),e<0?e=0:e>=this._terminal.cols&&(e=this._terminal.cols-1),this._terminal.buffer.x=e,this._terminal.buffer.y=n},t.prototype.cursorForwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.x=this._terminal.buffer.nextStop()},t.prototype.eraseInDisplay=function(t){var e;switch(t[0]){case 0:for(this._terminal.eraseRight(this._terminal.buffer.x,this._terminal.buffer.y),e=this._terminal.buffer.y+1;e<this._terminal.rows;e++)this._terminal.eraseLine(e);break;case 1:for(this._terminal.eraseLeft(this._terminal.buffer.x,this._terminal.buffer.y),e=this._terminal.buffer.y;e--;)this._terminal.eraseLine(e);break;case 2:for(e=this._terminal.rows;e--;)this._terminal.eraseLine(e);break;case 3:var n=this._terminal.buffer.lines.length-this._terminal.rows;n>0&&(this._terminal.buffer.lines.trimStart(n),this._terminal.buffer.ybase=Math.max(this._terminal.buffer.ybase-n,0),this._terminal.buffer.ydisp=Math.max(this._terminal.buffer.ydisp-n,0),this._terminal.emit("scroll",0))}},t.prototype.eraseInLine=function(t){switch(t[0]){case 0:this._terminal.eraseRight(this._terminal.buffer.x,this._terminal.buffer.y);break;case 1:this._terminal.eraseLeft(this._terminal.buffer.x,this._terminal.buffer.y);break;case 2:this._terminal.eraseLine(this._terminal.buffer.y)}},t.prototype.insertLines=function(t){var e=t[0];e<1&&(e=1);for(var n=this._terminal.buffer.y+this._terminal.buffer.ybase,i=this._terminal.rows-1-this._terminal.buffer.scrollBottom,r=this._terminal.rows-1+this._terminal.buffer.ybase-i+1;e--;)this._terminal.buffer.lines.splice(r-1,1),this._terminal.buffer.lines.splice(n,0,this._terminal.blankLine(!0));this._terminal.updateRange(this._terminal.buffer.y),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.deleteLines=function(t){var e=t[0];e<1&&(e=1);var n,i=this._terminal.buffer.y+this._terminal.buffer.ybase;for(n=this._terminal.rows-1-this._terminal.buffer.scrollBottom,n=this._terminal.rows-1+this._terminal.buffer.ybase-n;e--;)this._terminal.buffer.lines.splice(i,1),this._terminal.buffer.lines.splice(n,0,this._terminal.blankLine(!0));this._terminal.updateRange(this._terminal.buffer.y),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.deleteChars=function(t){var e=t[0];e<1&&(e=1);for(var n=this._terminal.buffer.y+this._terminal.buffer.ybase,i=[this._terminal.eraseAttr()," ",1,32];e--;)this._terminal.buffer.lines.get(n).splice(this._terminal.buffer.x,1),this._terminal.buffer.lines.get(n).push(i);this._terminal.updateRange(this._terminal.buffer.y)},t.prototype.scrollUp=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollTop,1),this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollBottom,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.buffer.scrollTop),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.scrollDown=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollBottom,1),this._terminal.buffer.lines.splice(this._terminal.buffer.ybase+this._terminal.buffer.scrollTop,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.buffer.scrollTop),this._terminal.updateRange(this._terminal.buffer.scrollBottom)},t.prototype.eraseChars=function(t){var e=t[0];e<1&&(e=1);for(var n=this._terminal.buffer.y+this._terminal.buffer.ybase,i=this._terminal.buffer.x,r=[this._terminal.eraseAttr()," ",1,32];e--&&i<this._terminal.cols;)this._terminal.buffer.lines.get(n)[i++]=r},t.prototype.cursorBackwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.buffer.x=this._terminal.buffer.prevStop()},t.prototype.charPosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x=e-1,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.HPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.x+=e,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.repeatPrecedingCharacter=function(t){for(var e=t[0]||1,n=this._terminal.buffer.lines.get(this._terminal.buffer.ybase+this._terminal.buffer.y),i=n[this._terminal.buffer.x-1]||[this._terminal.defAttr," ",1,32];e--;)n[this._terminal.buffer.x++]=i},t.prototype.sendDeviceAttributes=function(t){t[0]>0||(this._terminal.prefix?">"===this._terminal.prefix&&(this._terminal.is("xterm")?this._terminal.send(i.C0.ESC+"[>0;276;0c"):this._terminal.is("rxvt-unicode")?this._terminal.send(i.C0.ESC+"[>85;95;0c"):this._terminal.is("linux")?this._terminal.send(t[0]+"c"):this._terminal.is("screen")&&this._terminal.send(i.C0.ESC+"[>83;40003;0c")):this._terminal.is("xterm")||this._terminal.is("rxvt-unicode")||this._terminal.is("screen")?this._terminal.send(i.C0.ESC+"[?1;2c"):this._terminal.is("linux")&&this._terminal.send(i.C0.ESC+"[?6c"))},t.prototype.linePosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y=e-1,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1)},t.prototype.VPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.buffer.y+=e,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x>=this._terminal.cols&&this._terminal.buffer.x--},t.prototype.HVPosition=function(t){t[0]<1&&(t[0]=1),t[1]<1&&(t[1]=1),this._terminal.buffer.y=t[0]-1,this._terminal.buffer.y>=this._terminal.rows&&(this._terminal.buffer.y=this._terminal.rows-1),this._terminal.buffer.x=t[1]-1,this._terminal.buffer.x>=this._terminal.cols&&(this._terminal.buffer.x=this._terminal.cols-1)},t.prototype.tabClear=function(t){var e=t[0];e<=0?delete this._terminal.buffer.tabs[this._terminal.buffer.x]:3===e&&(this._terminal.buffer.tabs={})},t.prototype.setMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.setMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!0;break;case 2:this._terminal.setgCharset(0,r.DEFAULT_CHARSET),this._terminal.setgCharset(1,r.DEFAULT_CHARSET),this._terminal.setgCharset(2,r.DEFAULT_CHARSET),this._terminal.setgCharset(3,r.DEFAULT_CHARSET);break;case 3:this._terminal.savedCols=this._terminal.cols,this._terminal.resize(132,this._terminal.rows);break;case 6:this._terminal.originMode=!0;break;case 7:this._terminal.wraparoundMode=!0;break;case 12:break;case 66:this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=9===t[0],this._terminal.vt200Mouse=1e3===t[0],this._terminal.normalMouse=t[0]>1e3,this._terminal.mouseEvents=!0,this._terminal.element.classList.add("enable-mouse-events"),this._terminal.selectionManager.disable(),this._terminal.log("Binding to mouse events.");break;case 1004:this._terminal.sendFocus=!0;break;case 1005:this._terminal.utfMouse=!0;break;case 1006:this._terminal.sgrMouse=!0;break;case 1015:this._terminal.urxvtMouse=!0;break;case 25:this._terminal.cursorHidden=!1;break;case 1049:case 47:case 1047:this._terminal.buffers.activateAltBuffer(),this._terminal.selectionManager.setBuffer(this._terminal.buffer),this._terminal.viewport.syncScrollArea(),this._terminal.showCursor();break;case 2004:this._terminal.bracketedPasteMode=!0}}else switch(t[0]){case 4:this._terminal.insertMode=!0}},t.prototype.resetMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.resetMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!1;break;case 3:132===this._terminal.cols&&this._terminal.savedCols&&this._terminal.resize(this._terminal.savedCols,this._terminal.rows),delete this._terminal.savedCols;break;case 6:this._terminal.originMode=!1;break;case 7:this._terminal.wraparoundMode=!1;break;case 12:break;case 66:this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=!1,this._terminal.vt200Mouse=!1,this._terminal.normalMouse=!1,this._terminal.mouseEvents=!1,this._terminal.element.classList.remove("enable-mouse-events"),this._terminal.selectionManager.enable();break;case 1004:this._terminal.sendFocus=!1;break;case 1005:this._terminal.utfMouse=!1;break;case 1006:this._terminal.sgrMouse=!1;break;case 1015:this._terminal.urxvtMouse=!1;break;case 25:this._terminal.cursorHidden=!0;break;case 1049:case 47:case 1047:this._terminal.buffers.activateNormalBuffer(),this._terminal.selectionManager.setBuffer(this._terminal.buffer),this._terminal.refresh(0,this._terminal.rows-1),this._terminal.viewport.syncScrollArea(),this._terminal.showCursor();break;case 2004:this._terminal.bracketedPasteMode=!1}}else switch(t[0]){case 4:this._terminal.insertMode=!1}},t.prototype.charAttributes=function(t){if(1!==t.length||0!==t[0]){for(var e,n=t.length,i=this._terminal.curAttr>>18,r=this._terminal.curAttr>>9&511,o=511&this._terminal.curAttr,a=0;a<n;a++)(e=t[a])>=30&&e<=37?r=e-30:e>=40&&e<=47?o=e-40:e>=90&&e<=97?r=(e+=8)-90:e>=100&&e<=107?o=(e+=8)-100:0===e?(i=this._terminal.defAttr>>18,r=this._terminal.defAttr>>9&511,o=511&this._terminal.defAttr):1===e?i|=s.FLAGS.BOLD:4===e?i|=s.FLAGS.UNDERLINE:5===e?i|=s.FLAGS.BLINK:7===e?i|=s.FLAGS.INVERSE:8===e?i|=s.FLAGS.INVISIBLE:2===e?i|=s.FLAGS.DIM:22===e?(i&=~s.FLAGS.BOLD,i&=~s.FLAGS.DIM):24===e?i&=~s.FLAGS.UNDERLINE:25===e?i&=~s.FLAGS.BLINK:27===e?i&=~s.FLAGS.INVERSE:28===e?i&=~s.FLAGS.INVISIBLE:39===e?r=this._terminal.defAttr>>9&511:49===e?o=511&this._terminal.defAttr:38===e?2===t[a+1]?(a+=2,-1===(r=this._terminal.matchColor(255&t[a],255&t[a+1],255&t[a+2]))&&(r=511),a+=2):5===t[a+1]&&(r=e=255&t[a+=2]):48===e?2===t[a+1]?(a+=2,-1===(o=this._terminal.matchColor(255&t[a],255&t[a+1],255&t[a+2]))&&(o=511),a+=2):5===t[a+1]&&(o=e=255&t[a+=2]):100===e?(r=this._terminal.defAttr>>9&511,o=511&this._terminal.defAttr):this._terminal.error("Unknown SGR attribute: %d.",e);this._terminal.curAttr=i<<18|r<<9|o}else this._terminal.curAttr=this._terminal.defAttr},t.prototype.deviceStatus=function(t){if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 6:this._terminal.send(i.C0.ESC+"[?"+(this._terminal.buffer.y+1)+";"+(this._terminal.buffer.x+1)+"R")}}else switch(t[0]){case 5:this._terminal.send(i.C0.ESC+"[0n");break;case 6:this._terminal.send(i.C0.ESC+"["+(this._terminal.buffer.y+1)+";"+(this._terminal.buffer.x+1)+"R")}},t.prototype.softReset=function(t){this._terminal.cursorHidden=!1,this._terminal.insertMode=!1,this._terminal.originMode=!1,this._terminal.wraparoundMode=!0,this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea(),this._terminal.applicationCursor=!1,this._terminal.buffer.scrollTop=0,this._terminal.buffer.scrollBottom=this._terminal.rows-1,this._terminal.curAttr=this._terminal.defAttr,this._terminal.buffer.x=this._terminal.buffer.y=0,this._terminal.charset=null,this._terminal.glevel=0,this._terminal.charsets=[null]},t.prototype.setCursorStyle=function(t){var e=t[0]<1?1:t[0];switch(e){case 1:case 2:this._terminal.setOption("cursorStyle","block");break;case 3:case 4:this._terminal.setOption("cursorStyle","underline");break;case 5:case 6:this._terminal.setOption("cursorStyle","bar")}var n=e%2==1;this._terminal.setOption("cursorBlink",n)},t.prototype.setScrollRegion=function(t){this._terminal.prefix||(this._terminal.buffer.scrollTop=(t[0]||1)-1,this._terminal.buffer.scrollBottom=(t[1]&&t[1]<=this._terminal.rows?t[1]:this._terminal.rows)-1,this._terminal.buffer.x=0,this._terminal.buffer.y=0)},t.prototype.saveCursor=function(t){this._terminal.buffer.savedX=this._terminal.buffer.x,this._terminal.buffer.savedY=this._terminal.buffer.y},t.prototype.restoreCursor=function(t){this._terminal.buffer.x=this._terminal.buffer.savedX||0,this._terminal.buffer.y=this._terminal.buffer.savedY||0},t}();e.InputHandler=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wcwidth=function(t){var e=[[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]],n=[[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]];function i(t,e){var n,i=0,r=e.length-1;if(t<e[0][0]||t>e[r][1])return!1;for(;r>=i;)if(t>e[n=i+r>>1][1])i=n+1;else{if(!(t<e[n][0]))return!0;r=n-1}return!1}var r=0|t.control,o=null;return function(s){if((s|=0)<32)return 0|r;if(s<127)return 1;var a,l=o||function(){var n,r;o="undefined"==typeof Uint32Array?new Array(4096):new Uint32Array(4096);for(var s=0;s<4096;++s){for(var a=0,l=16;l--;)a=a<<2|(n=16*s+l,r=void 0,0===n?t.nul:n<32||n>=127&&n<160?t.control:i(n,e)?0:(r=n)>=4352&&(r<=4447||9001===r||9002===r||r>=11904&&r<=42191&&12351!==r||r>=44032&&r<=55203||r>=63744&&r<=64255||r>=65040&&r<=65049||r>=65072&&r<=65135||r>=65280&&r<=65376||r>=65504&&r<=65510)?2:1);o[s]=a}return o}();return s<65536?l[s>>4]>>((15&s)<<1)&3:i(a=s,n)?0:a>=131072&&a<=196605||a>=196608&&a<=262141?2:1}}({nul:0,control:0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(72),r=n(93),o={};o[i.C0.BEL]=function(t,e){return e.bell()},o[i.C0.LF]=function(t,e){return e.lineFeed()},o[i.C0.VT]=o[i.C0.LF],o[i.C0.FF]=o[i.C0.LF],o[i.C0.CR]=function(t,e){return e.carriageReturn()},o[i.C0.BS]=function(t,e){return e.backspace()},o[i.C0.HT]=function(t,e){return e.tab()},o[i.C0.SO]=function(t,e){return e.shiftOut()},o[i.C0.SI]=function(t,e){return e.shiftIn()},o[i.C0.ESC]=function(t,e){return t.setState(l.ESCAPED)};var s={"[":function(t,e){e.params=[],e.currentParam=0,t.setState(l.CSI_PARAM)},"]":function(t,e){e.params=[],e.currentParam=0,t.setState(l.OSC)},P:function(t,e){e.params=[],e.currentParam=0,t.setState(l.DCS)},_:function(t,e){t.setState(l.IGNORE)},"^":function(t,e){t.setState(l.IGNORE)},c:function(t,e){e.reset()},E:function(t,e){e.buffer.x=0,e.index(),t.setState(l.NORMAL)},D:function(t,e){e.index(),t.setState(l.NORMAL)},M:function(t,e){e.reverseIndex(),t.setState(l.NORMAL)},"%":function(t,e){e.setgLevel(0),e.setgCharset(0,r.DEFAULT_CHARSET),t.setState(l.NORMAL),t.skipNextChar()}};s[i.C0.CAN]=function(t){return t.setState(l.NORMAL)};var a={"?":function(t){return t.setPrefix("?")},">":function(t){return t.setPrefix(">")},"!":function(t){return t.setPrefix("!")},0:function(t){return t.setParam(10*t.getParam())},1:function(t){return t.setParam(10*t.getParam()+1)},2:function(t){return t.setParam(10*t.getParam()+2)},3:function(t){return t.setParam(10*t.getParam()+3)},4:function(t){return t.setParam(10*t.getParam()+4)},5:function(t){return t.setParam(10*t.getParam()+5)},6:function(t){return t.setParam(10*t.getParam()+6)},7:function(t){return t.setParam(10*t.getParam()+7)},8:function(t){return t.setParam(10*t.getParam()+8)},9:function(t){return t.setParam(10*t.getParam()+9)},$:function(t){return t.setPostfix("$")},'"':function(t){return t.setPostfix('"')}," ":function(t){return t.setPostfix(" ")},"'":function(t){return t.setPostfix("'")},";":function(t){return t.finalizeParam()}};a[i.C0.CAN]=function(t){return t.setState(l.NORMAL)};var l,c,u={};u["@"]=function(t,e,n){return t.insertChars(e)},u.A=function(t,e,n){return t.cursorUp(e)},u.B=function(t,e,n){return t.cursorDown(e)},u.C=function(t,e,n){return t.cursorForward(e)},u.D=function(t,e,n){return t.cursorBackward(e)},u.E=function(t,e,n){return t.cursorNextLine(e)},u.F=function(t,e,n){return t.cursorPrecedingLine(e)},u.G=function(t,e,n){return t.cursorCharAbsolute(e)},u.H=function(t,e,n){return t.cursorPosition(e)},u.I=function(t,e,n){return t.cursorForwardTab(e)},u.J=function(t,e,n){return t.eraseInDisplay(e)},u.K=function(t,e,n){return t.eraseInLine(e)},u.L=function(t,e,n){return t.insertLines(e)},u.M=function(t,e,n){return t.deleteLines(e)},u.P=function(t,e,n){return t.deleteChars(e)},u.S=function(t,e,n){return t.scrollUp(e)},u.T=function(t,e,n){e.length<2&&!n&&t.scrollDown(e)},u.X=function(t,e,n){return t.eraseChars(e)},u.Z=function(t,e,n){return t.cursorBackwardTab(e)},u["`"]=function(t,e,n){return t.charPosAbsolute(e)},u.a=function(t,e,n){return t.HPositionRelative(e)},u.b=function(t,e,n){return t.repeatPrecedingCharacter(e)},u.c=function(t,e,n){return t.sendDeviceAttributes(e)},u.d=function(t,e,n){return t.linePosAbsolute(e)},u.e=function(t,e,n){return t.VPositionRelative(e)},u.f=function(t,e,n){return t.HVPosition(e)},u.g=function(t,e,n){return t.tabClear(e)},u.h=function(t,e,n){return t.setMode(e)},u.l=function(t,e,n){return t.resetMode(e)},u.m=function(t,e,n){return t.charAttributes(e)},u.n=function(t,e,n){return t.deviceStatus(e)},u.p=function(t,e,n){switch(n){case"!":t.softReset(e)}},u.q=function(t,e,n,i){" "===i&&t.setCursorStyle(e)},u.r=function(t,e){return t.setScrollRegion(e)},u.s=function(t,e){return t.saveCursor(e)},u.u=function(t,e){return t.restoreCursor(e)},u[i.C0.CAN]=function(t,e,n,i,r){return r.setState(l.NORMAL)},(c=l=e.ParserState||(e.ParserState={}))[c.NORMAL=0]="NORMAL",c[c.ESCAPED=1]="ESCAPED",c[c.CSI_PARAM=2]="CSI_PARAM",c[c.CSI=3]="CSI",c[c.OSC=4]="OSC",c[c.CHARSET=5]="CHARSET",c[c.DCS=6]="DCS",c[c.IGNORE=7]="IGNORE";var h=function(){function t(t,e){this._inputHandler=t,this._terminal=e,this._state=l.NORMAL}return t.prototype.parse=function(t){var e,n,c,h,f=t.length,_=this._terminal.buffer.x,p=this._terminal.buffer.y;for(this._terminal.debug&&this._terminal.log("data: "+t),this._position=0,this._terminal.surrogate_high&&(t=this._terminal.surrogate_high+t,this._terminal.surrogate_high="");this._position<f;this._position++){if(n=t[this._position],55296<=(c=t.charCodeAt(this._position))&&c<=56319){if(h=t.charCodeAt(this._position+1),isNaN(h)){this._terminal.surrogate_high=n;continue}c=1024*(c-55296)+(h-56320)+65536,n+=t.charAt(this._position+1)}if(!(56320<=c&&c<=57343))switch(this._state){case l.NORMAL:n in o?o[n](this,this._inputHandler):this._inputHandler.addChar(n,c);break;case l.ESCAPED:if(n in s){s[n](this,this._terminal);break}switch(n){case"(":case")":case"*":case"+":case"-":case".":switch(n){case"(":this._terminal.gcharset=0;break;case")":this._terminal.gcharset=1;break;case"*":this._terminal.gcharset=2;break;case"+":this._terminal.gcharset=3;break;case"-":this._terminal.gcharset=1;break;case".":this._terminal.gcharset=2}this._state=l.CHARSET;break;case"/":this._terminal.gcharset=3,this._state=l.CHARSET,this._position--;break;case"N":case"O":break;case"n":this._terminal.setgLevel(2);break;case"o":case"|":this._terminal.setgLevel(3);break;case"}":this._terminal.setgLevel(2);break;case"~":this._terminal.setgLevel(1);break;case"7":this._inputHandler.saveCursor(),this._state=l.NORMAL;break;case"8":this._inputHandler.restoreCursor(),this._state=l.NORMAL;break;case"#":this._state=l.NORMAL,this._position++;break;case"H":this._terminal.tabSet(),this._state=l.NORMAL;break;case"=":this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport&&this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;case">":this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport&&this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;default:this._state=l.NORMAL,this._terminal.error("Unknown ESC control: %s.",n)}break;case l.CHARSET:n in r.CHARSETS?(e=r.CHARSETS[n],"/"===n&&this.skipNextChar()):e=r.DEFAULT_CHARSET,this._terminal.setgCharset(this._terminal.gcharset,e),this._terminal.gcharset=null,this._state=l.NORMAL;break;case l.OSC:if(n===i.C0.ESC||n===i.C0.BEL){switch(n===i.C0.ESC&&this._position++,this._terminal.params.push(this._terminal.currentParam),this._terminal.params[0]){case 0:case 1:case 2:this._terminal.params[1]&&(this._terminal.title=this._terminal.params[1],this._terminal.handleTitle(this._terminal.title))}this._terminal.params=[],this._terminal.currentParam=0,this._state=l.NORMAL}else this._terminal.params.length?this._terminal.currentParam+=n:n>="0"&&n<="9"?this._terminal.currentParam=10*this._terminal.currentParam+n.charCodeAt(0)-48:";"===n&&(this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam="");break;case l.CSI_PARAM:if(n in a){a[n](this);break}this.finalizeParam(),this._state=l.CSI;case l.CSI:n in u?(this._terminal.debug&&this._terminal.log("CSI "+(this._terminal.prefix?this._terminal.prefix:"")+" "+(this._terminal.params?this._terminal.params.join(";"):"")+" "+(this._terminal.postfix?this._terminal.postfix:"")+" "+n),u[n](this._inputHandler,this._terminal.params,this._terminal.prefix,this._terminal.postfix,this)):this._terminal.error("Unknown CSI code: %s.",n),this._state=l.NORMAL,this._terminal.prefix="",this._terminal.postfix="";break;case l.DCS:if(n===i.C0.ESC||n===i.C0.BEL){n===i.C0.ESC&&this._position++;var d=void 0,m=void 0;switch(this._terminal.prefix){case"":break;case"$q":switch(m=!1,d=this._terminal.currentParam){case'"q':d='0"q';break;case'"p':d='61"p';break;case"r":d=this._terminal.buffer.scrollTop+1+";"+(this._terminal.buffer.scrollBottom+1)+"r";break;case"m":d="0m";break;default:this._terminal.error("Unknown DCS Pt: %s.",d),d=""}this._terminal.send(i.C0.ESC+"P"+ +m+"$r"+d+i.C0.ESC+"\\");break;case"+p":break;case"+q":d=this._terminal.currentParam,m=!1,this._terminal.send(i.C0.ESC+"P"+ +m+"+r"+d+i.C0.ESC+"\\");break;default:this._terminal.error("Unknown DCS prefix: %s.",this._terminal.prefix)}this._terminal.currentParam=0,this._terminal.prefix="",this._state=l.NORMAL}else this._terminal.currentParam?this._terminal.currentParam+=n:this._terminal.prefix||"$"===n||"+"===n?2===this._terminal.prefix.length?this._terminal.currentParam=n:this._terminal.prefix+=n:this._terminal.currentParam=n;break;case l.IGNORE:n!==i.C0.ESC&&n!==i.C0.BEL||(n===i.C0.ESC&&this._position++,this._state=l.NORMAL)}}return this._terminal.buffer.x===_&&this._terminal.buffer.y===p||this._terminal.emit("cursormove"),this._state},t.prototype.setState=function(t){this._state=t},t.prototype.setPrefix=function(t){this._terminal.prefix=t},t.prototype.setPostfix=function(t){this._terminal.postfix=t},t.prototype.setParam=function(t){this._terminal.currentParam=t},t.prototype.getParam=function(){return this._terminal.currentParam},t.prototype.finalizeParam=function(){this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam=0},t.prototype.skipNextChar=function(){this._position++},t}();e.Parser=h},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(205),s=n(208),a=n(209),l=n(96),c=n(210),u=function(t){function e(e,n){var i=t.call(this)||this;return i._terminal=e,i._refreshRowsQueue=[],i._refreshAnimationFrame=null,i.colorManager=new l.ColorManager,n&&i.colorManager.setTheme(n),i._renderLayers=[new o.TextRenderLayer(i._terminal.element,0,i.colorManager.colors),new s.SelectionRenderLayer(i._terminal.element,1,i.colorManager.colors),new c.LinkRenderLayer(i._terminal.element,2,i.colorManager.colors,i._terminal),new a.CursorRenderLayer(i._terminal.element,3,i.colorManager.colors)],i.dimensions={scaledCharWidth:null,scaledCharHeight:null,scaledCellWidth:null,scaledCellHeight:null,scaledCharLeft:null,scaledCharTop:null,scaledCanvasWidth:null,scaledCanvasHeight:null,canvasWidth:null,canvasHeight:null,actualCellWidth:null,actualCellHeight:null},i._devicePixelRatio=window.devicePixelRatio,i._updateDimensions(),i.onOptionsChanged(),i}return r(e,t),e.prototype.onWindowResize=function(t){this._devicePixelRatio!==t&&(this._devicePixelRatio=t,this.onResize(this._terminal.cols,this._terminal.rows,!0))},e.prototype.setTheme=function(t){var e=this;return this.colorManager.setTheme(t),this._renderLayers.forEach(function(t){t.onThemeChanged(e._terminal,e.colorManager.colors),t.reset(e._terminal)}),this._terminal.refresh(0,this._terminal.rows-1),this.colorManager.colors},e.prototype.onResize=function(t,e,n){var i=this;this._updateDimensions(),this._renderLayers.forEach(function(t){return t.resize(i._terminal,i.dimensions,n)}),this._terminal.refresh(0,this._terminal.rows-1),this.emit("resize",{width:this.dimensions.canvasWidth,height:this.dimensions.canvasHeight})},e.prototype.onCharSizeChanged=function(){this.onResize(this._terminal.cols,this._terminal.rows,!0)},e.prototype.onBlur=function(){var t=this;this._renderLayers.forEach(function(e){return e.onBlur(t._terminal)})},e.prototype.onFocus=function(){var t=this;this._renderLayers.forEach(function(e){return e.onFocus(t._terminal)})},e.prototype.onSelectionChanged=function(t,e){var n=this;this._renderLayers.forEach(function(i){return i.onSelectionChanged(n._terminal,t,e)})},e.prototype.onCursorMove=function(){var t=this;this._renderLayers.forEach(function(e){return e.onCursorMove(t._terminal)})},e.prototype.onOptionsChanged=function(){var t=this;this._renderLayers.forEach(function(e){return e.onOptionsChanged(t._terminal)})},e.prototype.clear=function(){var t=this;this._renderLayers.forEach(function(e){return e.reset(t._terminal)})},e.prototype.queueRefresh=function(t,e){this._refreshRowsQueue.push({start:t,end:e}),this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this)))},e.prototype._refreshLoop=function(){var t,e,n=this;if(this._refreshRowsQueue.length>4)t=0,e=this._terminal.rows-1;else{t=this._refreshRowsQueue[0].start,e=this._refreshRowsQueue[0].end;for(var i=1;i<this._refreshRowsQueue.length;i++)this._refreshRowsQueue[i].start<t&&(t=this._refreshRowsQueue[i].start),this._refreshRowsQueue[i].end>e&&(e=this._refreshRowsQueue[i].end)}this._refreshRowsQueue=[],this._refreshAnimationFrame=null,t=Math.max(t,0),e=Math.min(e,this._terminal.rows-1),this._renderLayers.forEach(function(i){return i.onGridChanged(n._terminal,t,e)}),this._terminal.emit("refresh",{start:t,end:e})},e.prototype._updateDimensions=function(){this._terminal.charMeasure.width&&this._terminal.charMeasure.height&&(this.dimensions.scaledCharWidth=Math.floor(this._terminal.charMeasure.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._terminal.charMeasure.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._terminal.options.lineHeight),this.dimensions.scaledCharTop=1===this._terminal.options.lineHeight?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._terminal.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._terminal.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._terminal.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._terminal.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._terminal.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._terminal.cols)},e}(n(27).EventEmitter);e.Renderer=u},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(26),s=n(94),a=n(206),l=n(51),c=function(t){function e(e,n,i){var r=t.call(this,e,"text",n,!1,i)||this;return r._characterOverlapCache={},r._state=new a.GridCache,r}return r(e,t),e.prototype.resize=function(e,n,i){t.prototype.resize.call(this,e,n,i);var r=e.options.fontSize*window.devicePixelRatio+"px "+e.options.fontFamily;this._characterWidth===n.scaledCharWidth&&this._characterFont===r||(this._characterWidth=n.scaledCharWidth,this._characterFont=r,this._characterOverlapCache={}),this._state.clear(),this._state.resize(e.cols,e.rows)},e.prototype.reset=function(t){this._state.clear(),this.clearAll()},e.prototype.onGridChanged=function(t,e,n){if(0!==this._state.cache.length)for(var i=e;i<=n;i++){var r=i+t.buffer.ydisp,a=t.buffer.lines.get(r);this.clearCells(0,i,t.cols,1);for(var c=0;c<t.cols;c++){var u=a[c],h=u[o.CHAR_DATA_CODE_INDEX],f=u[o.CHAR_DATA_CHAR_INDEX],_=u[o.CHAR_DATA_ATTR_INDEX],p=u[o.CHAR_DATA_WIDTH_INDEX];if(0!==p){if(32===h&&c>0){var d=a[c-1];if(this._isOverlapping(d))continue}var m=_>>18,y=511&_,v=y>=256,b=m&s.FLAGS.INVISIBLE,g=m&s.FLAGS.INVERSE;if(h&&(32!==h||!v||g)&&!b){0!==p&&this._isOverlapping(u)&&c<a.length-1&&32===a[c+1][o.CHAR_DATA_CODE_INDEX]&&(p=2);var C=_>>9&511;if(g){var w=y;y=C,256===(C=w)&&(C=l.INVERTED_DEFAULT_COLOR),257===y&&(y=l.INVERTED_DEFAULT_COLOR)}y<256&&(this._ctx.save(),this._ctx.fillStyle=y===l.INVERTED_DEFAULT_COLOR?this._colors.foreground:this._colors.ansi[y],this.fillCells(c,i,p,1),this._ctx.restore()),this._ctx.save(),m&s.FLAGS.BOLD&&(this._ctx.font="bold "+this._ctx.font,C<8&&(C+=8)),m&s.FLAGS.UNDERLINE&&(C===l.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background:this._ctx.fillStyle=C<256?this._colors.ansi[C]:this._colors.foreground,this.fillBottomLineAtCells(c,i)),this.drawChar(t,f,h,p,c,i,C,y,!!(m&s.FLAGS.BOLD),!!(m&s.FLAGS.DIM)),this._ctx.restore()}}}}},e.prototype._isOverlapping=function(t){if(1!==t[o.CHAR_DATA_WIDTH_INDEX])return!1;if(t[o.CHAR_DATA_CODE_INDEX]<256)return!1;var e=t[o.CHAR_DATA_CHAR_INDEX];if(this._characterOverlapCache.hasOwnProperty(e))return this._characterOverlapCache[e];this._ctx.save(),this._ctx.font=this._characterFont;var n=Math.floor(this._ctx.measureText(e).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[e]=n,n},e.prototype._clearChar=function(t,e){var n=1,i=this._state.cache[t][e];i&&2===i[o.CHAR_DATA_WIDTH_INDEX]&&(n=2),this.clearCells(t,e,n,1)},e}(l.BaseRenderLayer);e.TextRenderLayer=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this.cache=[]}return t.prototype.resize=function(t,e){for(var n=0;n<t;n++){this.cache.length<=n&&this.cache.push([]);for(var i=this.cache[n].length;i<e;i++)this.cache[n].push(null);this.cache[n].length=e}this.cache.length=t},t.prototype.clear=function(){for(var t=0;t<this.cache.length;t++)for(var e=0;e<this.cache[t].length;e++)this.cache[t][e]=null},t}();e.GridCache=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.contains=function(t,e){return t.indexOf(e)>=0}},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e,n,i){var r=t.call(this,e,"selection",n,!0,i)||this;return r._state={start:null,end:null},r}return r(e,t),e.prototype.resize=function(e,n,i){t.prototype.resize.call(this,e,n,i),this._state={start:null,end:null}},e.prototype.reset=function(t){this._state.start&&this._state.end&&(this._state={start:null,end:null},this.clearAll())},e.prototype.onSelectionChanged=function(t,e,n){if(this._state.start!==e&&this._state.end!==n&&(this.clearAll(),e&&n)){var i=e[1]-t.buffer.ydisp,r=n[1]-t.buffer.ydisp,o=Math.max(i,0),s=Math.min(r,t.rows-1);if(!(o>=t.rows||s<0)){var a=i===o?e[0]:0,l=o===s?n[0]:t.cols;this._ctx.fillStyle=this._colors.selection,this.fillCells(a,o,l-a,1);var c=Math.max(s-o-1,0);if(this.fillCells(0,o+1,t.cols,c),o!==s){var u=r===s?n[0]:t.cols;this.fillCells(0,s,u,1)}this._state.start=[e[0],e[1]],this._state.end=[n[0],n[1]]}}},e}(n(51).BaseRenderLayer);e.SelectionRenderLayer=o},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(26),s=function(t){function e(e,n,i){var r=t.call(this,e,"cursor",n,!0,i)||this;return r._state={x:null,y:null,isFocused:null,style:null,width:null},r._cursorRenderers={bar:r._renderBarCursor.bind(r),block:r._renderBlockCursor.bind(r),underline:r._renderUnderlineCursor.bind(r)},r}return r(e,t),e.prototype.resize=function(e,n,i){t.prototype.resize.call(this,e,n,i),this._state={x:null,y:null,isFocused:null,style:null,width:null}},e.prototype.reset=function(t){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=null,this.onOptionsChanged(t))},e.prototype.onBlur=function(t){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),t.refresh(t.buffer.y,t.buffer.y)},e.prototype.onFocus=function(t){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume(t):t.refresh(t.buffer.y,t.buffer.y)},e.prototype.onOptionsChanged=function(t){var e=this;t.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new a(t,function(){e._render(t,!0)})):(this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=null),t.refresh(t.buffer.y,t.buffer.y))},e.prototype.onCursorMove=function(t){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation(t)},e.prototype.onGridChanged=function(t,e,n){this._cursorBlinkStateManager&&!this._cursorBlinkStateManager.isPaused||this._render(t,!1)},e.prototype._render=function(t,e){if(t.cursorState&&!t.cursorHidden){var n=t.buffer.ybase+t.buffer.y,i=n-t.buffer.ydisp;if(i<0||i>=t.rows)this._clearCursor();else{var r=t.buffer.lines.get(n)[t.buffer.x];if(r){if(!t.isFocused)return this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor,this._renderBlurCursor(t,t.buffer.x,i,r),this._ctx.restore(),this._state.x=t.buffer.x,this._state.y=i,this._state.isFocused=!1,this._state.style=t.options.cursorStyle,void(this._state.width=r[o.CHAR_DATA_WIDTH_INDEX]);if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===t.buffer.x&&this._state.y===i&&this._state.isFocused===t.isFocused&&this._state.style===t.options.cursorStyle&&this._state.width===r[o.CHAR_DATA_WIDTH_INDEX])return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[t.options.cursorStyle||"block"](t,t.buffer.x,i,r),this._ctx.restore(),this._state.x=t.buffer.x,this._state.y=i,this._state.isFocused=!1,this._state.style=t.options.cursorStyle,this._state.width=r[o.CHAR_DATA_WIDTH_INDEX]}else this._clearCursor()}}}else this._clearCursor()},e.prototype._clearCursor=function(){this._state&&(this.clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:null,y:null,isFocused:null,style:null,width:null})},e.prototype._renderBarCursor=function(t,e,n,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor,this.fillLeftLineAtCell(e,n),this._ctx.restore()},e.prototype._renderBlockCursor=function(t,e,n,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor,this.fillCells(e,n,i[o.CHAR_DATA_WIDTH_INDEX],1),this._ctx.fillStyle=this._colors.cursorAccent,this.fillCharTrueColor(t,i,e,n),this._ctx.restore()},e.prototype._renderUnderlineCursor=function(t,e,n,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor,this.fillBottomLineAtCells(e,n),this._ctx.restore()},e.prototype._renderBlurCursor=function(t,e,n,i){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor,this.strokeRectAtCell(e,n,i[o.CHAR_DATA_WIDTH_INDEX],1),this._ctx.restore()},e}(n(51).BaseRenderLayer);e.CursorRenderLayer=s;var a=function(){function t(t,e){this.renderCallback=e,this.isCursorVisible=!0,t.isFocused&&this._restartInterval()}return Object.defineProperty(t.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=null),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=null),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=null)},t.prototype.restartBlinkAnimation=function(t){var e=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){e.renderCallback(),e._animationFrame=null})))},t.prototype._restartInterval=function(t){var e=this;void 0===t&&(t=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=setTimeout(function(){if(e._animationTimeRestarted){var t=600-(Date.now()-e._animationTimeRestarted);if(e._animationTimeRestarted=null,t>0)return void e._restartInterval(t)}e.isCursorVisible=!1,e._animationFrame=window.requestAnimationFrame(function(){e.renderCallback(),e._animationFrame=null}),e._blinkInterval=setInterval(function(){if(e._animationTimeRestarted){var t=600-(Date.now()-e._animationTimeRestarted);return e._animationTimeRestarted=null,void e._restartInterval(t)}e.isCursorVisible=!e.isCursorVisible,e._animationFrame=window.requestAnimationFrame(function(){e.renderCallback(),e._animationFrame=null})},600)},t)},t.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=null),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=null),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=null)},t.prototype.resume=function(t){this._animationTimeRestarted=null,this._restartInterval(),this.restartBlinkAnimation(t)},t}()},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(51),s=n(97),a=function(t){function e(e,n,i,r){var o=t.call(this,e,"link",n,!0,i)||this;return o._state=null,r.linkifier.on(s.LinkHoverEventTypes.HOVER,function(t){return o._onLinkHover(t)}),r.linkifier.on(s.LinkHoverEventTypes.LEAVE,function(t){return o._onLinkLeave(t)}),o}return r(e,t),e.prototype.resize=function(e,n,i){t.prototype.resize.call(this,e,n,i),this._state=null},e.prototype.reset=function(t){this._clearCurrentLink()},e.prototype._clearCurrentLink=function(){this._state&&(this.clearCells(this._state.x,this._state.y,this._state.length,1),this._state=null)},e.prototype._onLinkHover=function(t){this._ctx.fillStyle=this._colors.foreground,this.fillBottomLineAtCells(t.x,t.y,t.length),this._state=t},e.prototype._onLinkLeave=function(t){this._clearCurrentLink()},e}(o.BaseRenderLayer);e.LinkRenderLayer=a},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(97),s=n(98),a=n(27),l=new RegExp("(?:^|[^\\da-z\\.-]+)((https?:\\/\\/)((([\\da-z\\.-]+)\\.([a-z\\.]{2,6}))|((\\d{1,3}\\.){3}\\d{1,3})|(localhost))(:\\d{1,5})?(\\/[\\/\\w\\.\\-%~]*)*(\\?[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?(#[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?)($|[^\\/\\w\\.\\-%]+)"),c=0,u=function(t){function e(e){var n=t.call(this)||this;return n._terminal=e,n._linkMatchers=[],n._nextLinkMatcherId=c,n._rowsToLinkify={start:null,end:null},n.registerLinkMatcher(l,null,{matchIndex:1}),n}return r(e,t),e.prototype.attachToDom=function(t){this._mouseZoneManager=t},e.prototype.linkifyRows=function(t,n){var i=this;this._mouseZoneManager&&(this._rowsToLinkify.start?(this._rowsToLinkify.start=this._rowsToLinkify.start<t?this._rowsToLinkify.start:t,this._rowsToLinkify.end=this._rowsToLinkify.end>n?this._rowsToLinkify.end:n):(this._rowsToLinkify.start=t,this._rowsToLinkify.end=n),this._mouseZoneManager.clearAll(t,n),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return i._linkifyRows()},e.TIME_BEFORE_LINKIFY))},e.prototype._linkifyRows=function(){this._rowsTimeoutId=null;for(var t=this._rowsToLinkify.start;t<=this._rowsToLinkify.end;t++)this._linkifyRow(t);this._rowsToLinkify.start=null,this._rowsToLinkify.end=null},e.prototype.setHypertextLinkHandler=function(t){this._linkMatchers[c].handler=t},e.prototype.setHypertextValidationCallback=function(t){this._linkMatchers[c].validationCallback=t},e.prototype.registerLinkMatcher=function(t,e,n){if(void 0===n&&(n={}),this._nextLinkMatcherId!==c&&!e)throw new Error("handler must be defined");var i={id:this._nextLinkMatcherId++,regex:t,handler:e,matchIndex:n.matchIndex,validationCallback:n.validationCallback,hoverTooltipCallback:n.tooltipCallback,hoverLeaveCallback:n.leaveCallback,priority:n.priority||0};return this._addLinkMatcherToList(i),i.id},e.prototype._addLinkMatcherToList=function(t){if(0!==this._linkMatchers.length){for(var e=this._linkMatchers.length-1;e>=0;e--)if(t.priority<=this._linkMatchers[e].priority)return void this._linkMatchers.splice(e+1,0,t);this._linkMatchers.splice(0,0,t)}else this._linkMatchers.push(t)},e.prototype.deregisterLinkMatcher=function(t){for(var e=1;e<this._linkMatchers.length;e++)if(this._linkMatchers[e].id===t)return this._linkMatchers.splice(e,1),!0;return!1},e.prototype._linkifyRow=function(t){var e=this._terminal.buffer.ydisp+t;if(!(e>=this._terminal.buffer.lines.length))for(var n=this._terminal.buffer.translateBufferLineToString(e,!1),i=0;i<this._linkMatchers.length;i++)this._doLinkifyRow(t,n,this._linkMatchers[i])},e.prototype._doLinkifyRow=function(t,e,n,i){var r=this;void 0===i&&(i=0);n.id;var o=e.match(n.regex);if(o&&0!==o.length){var s=o["number"!=typeof n.matchIndex?0:n.matchIndex],a=e.indexOf(s);n.validationCallback?n.validationCallback(s,function(e){r._rowsTimeoutId||e&&r._addLink(i+a,t,s,n)}):this._addLink(i+a,t,s,n);var l=a+s.length,c=e.substr(l);c.length>0&&this._doLinkifyRow(t,c,n,i+l)}},e.prototype._addLink=function(t,e,n,i){var r=this;this._mouseZoneManager.add(new s.MouseZone(t+1,t+1+n.length,e+1,function(t){if(i.handler)return i.handler(t,n);window.open(n,"_blank")},function(i){r.emit(o.LinkHoverEventTypes.HOVER,{x:t,y:e,length:n.length}),r._terminal.element.style.cursor="pointer"},function(s){r.emit(o.LinkHoverEventTypes.TOOLTIP,{x:t,y:e,length:n.length}),i.hoverTooltipCallback&&i.hoverTooltipCallback(s,n)},function(){r.emit(o.LinkHoverEventTypes.LEAVE,{x:t,y:e,length:n.length}),r._terminal.element.style.cursor="",i.hoverLeaveCallback&&i.hoverLeaveCallback()}))},e.TIME_BEFORE_LINKIFY=200,e}(a.EventEmitter);e.Linkifier=u},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o,s,a=n(99),l=n(73),c=n(27),u=n(213),h=n(26),f=String.fromCharCode(160),_=new RegExp(f,"g");(s=o||(o={}))[s.NORMAL=0]="NORMAL",s[s.WORD=1]="WORD",s[s.LINE=2]="LINE";var p=function(t){function e(e,n,i){var r=t.call(this)||this;return r._terminal=e,r._buffer=n,r._charMeasure=i,r._enabled=!0,r._initListeners(),r.enable(),r._model=new u.SelectionModel(e),r._activeSelectionMode=o.NORMAL,r}return r(e,t),e.prototype._initListeners=function(){var t=this;this._mouseMoveListener=function(e){return t._onMouseMove(e)},this._mouseUpListener=function(e){return t._onMouseUp(e)},this._buffer.lines.on("trim",function(e){return t._onTrim(e)})},e.prototype.disable=function(){this.clearSelection(),this._enabled=!1},e.prototype.enable=function(){this._enabled=!0},e.prototype.setBuffer=function(t){this._buffer=t,this.clearSelection()},Object.defineProperty(e.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasSelection",{get:function(){var t=this._model.finalSelectionStart,e=this._model.finalSelectionEnd;return!(!t||!e)&&(t[0]!==e[0]||t[1]!==e[1])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectionText",{get:function(){var t=this._model.finalSelectionStart,e=this._model.finalSelectionEnd;if(!t||!e)return"";var n=t[1]===e[1]?e[0]:null,i=[];i.push(this._buffer.translateBufferLineToString(t[1],!0,t[0],n));for(var r=t[1]+1;r<=e[1]-1;r++){var o=this._buffer.lines.get(r),s=this._buffer.translateBufferLineToString(r,!0);o.isWrapped?i[i.length-1]+=s:i.push(s)}if(t[1]!==e[1]){o=this._buffer.lines.get(e[1]),s=this._buffer.translateBufferLineToString(e[1],!0,0,e[0]);o.isWrapped?i[i.length-1]+=s:i.push(s)}return i.map(function(t){return t.replace(_," ")}).join(l.isMSWindows?"\r\n":"\n")},enumerable:!0,configurable:!0}),e.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh()},e.prototype.refresh=function(t){var e=this;(this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return e._refresh()})),l.isLinux&&t)&&(this.selectionText.length&&this.emit("newselection",this.selectionText))},e.prototype._refresh=function(){this._refreshAnimationFrame=null,this.emit("refresh",{start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd})},e.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._terminal.emit("selection")},e.prototype._onTrim=function(t){this._model.onTrim(t)&&this.refresh()},e.prototype._getMouseBufferCoords=function(t){var e=this._terminal.mouseHelper.getCoords(t,this._terminal.element,this._charMeasure,this._terminal.options.lineHeight,this._terminal.cols,this._terminal.rows,!0);return e?(e[0]--,e[1]--,e[1]+=this._terminal.buffer.ydisp,e):null},e.prototype._getMouseEventScrollAmount=function(t){var e=a.MouseHelper.getCoordsRelativeToElement(t,this._terminal.element)[1],n=this._terminal.rows*Math.ceil(this._charMeasure.height*this._terminal.options.lineHeight);return e>=0&&e<=n?0:(e>n&&(e-=n),e=Math.min(Math.max(e,-50),50),(e/=50)/Math.abs(e)+Math.round(14*e))},e.prototype.shouldForceSelection=function(t){return l.isMac?t.altKey:t.shiftKey},e.prototype.onMouseDown=function(t){if((2!==t.button||!this.hasSelection)&&0===t.button){if(!this._enabled){if(!this.shouldForceSelection(t))return;t.stopPropagation()}t.preventDefault(),this._dragScrollAmount=0,this._enabled&&t.shiftKey?this._onIncrementalClick(t):1===t.detail?this._onSingleClick(t):2===t.detail?this._onDoubleClick(t):3===t.detail&&this._onTripleClick(t),this._addMouseDownListeners(),this.refresh(!0)}},e.prototype._addMouseDownListeners=function(){var t=this;this._terminal.element.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._terminal.element.ownerDocument.addEventListener("mouseup",this._mouseUpListener),this._dragScrollIntervalTimer=setInterval(function(){return t._dragScroll()},50)},e.prototype._removeMouseDownListeners=function(){this._terminal.element.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._terminal.element.ownerDocument.removeEventListener("mouseup",this._mouseUpListener),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=null},e.prototype._onIncrementalClick=function(t){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(t))},e.prototype._onSingleClick=function(t){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=o.NORMAL,this._model.selectionStart=this._getMouseBufferCoords(t),this._model.selectionStart){this._model.selectionEnd=null;var e=this._buffer.lines.get(this._model.selectionStart[1]);if(e)if(!(e.length>=this._model.selectionStart[0]))0===e[this._model.selectionStart[0]][h.CHAR_DATA_WIDTH_INDEX]&&this._model.selectionStart[0]++}},e.prototype._onDoubleClick=function(t){var e=this._getMouseBufferCoords(t);e&&(this._activeSelectionMode=o.WORD,this._selectWordAt(e))},e.prototype._onTripleClick=function(t){var e=this._getMouseBufferCoords(t);e&&(this._activeSelectionMode=o.LINE,this._selectLineAt(e[1]))},e.prototype._onMouseMove=function(t){t.stopImmediatePropagation();var e=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(t),this._model.selectionEnd){if(this._activeSelectionMode===o.LINE?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._terminal.cols:this._activeSelectionMode===o.WORD&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(t),this._dragScrollAmount>0?this._model.selectionEnd[0]=this._terminal.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]<this._buffer.lines.length){var n=this._buffer.lines.get(this._model.selectionEnd[1])[this._model.selectionEnd[0]];n&&0===n[h.CHAR_DATA_WIDTH_INDEX]&&this._model.selectionEnd[0]++}e&&e[0]===this._model.selectionEnd[0]&&e[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)},e.prototype._dragScroll=function(){this._dragScrollAmount&&(this._terminal.scrollLines(this._dragScrollAmount,!1),this._dragScrollAmount>0?this._model.selectionEnd=[this._terminal.cols-1,this._terminal.buffer.ydisp+this._terminal.rows]:this._model.selectionEnd=[0,this._terminal.buffer.ydisp],this.refresh())},e.prototype._onMouseUp=function(t){this._removeMouseDownListeners(),this.hasSelection&&this._terminal.emit("selection")},e.prototype._convertViewportColToCharacterIndex=function(t,e){for(var n=e[0],i=0;e[0]>=i;i++){var r=t[i];0===r[h.CHAR_DATA_WIDTH_INDEX]?n--:r[h.CHAR_DATA_CHAR_INDEX].length>1&&e[0]!==i&&(n+=r[h.CHAR_DATA_CHAR_INDEX].length-1)}return n},e.prototype.setSelection=function(t,e,n){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[t,e],this._model.selectionStartLength=n,this.refresh()},e.prototype._getWordAt=function(t){var e=this._buffer.lines.get(t[1]);if(!e)return null;var n=this._buffer.translateBufferLineToString(t[1],!1),i=this._convertViewportColToCharacterIndex(e,t),r=i,o=t[0]-i,s=0,a=0,l=0,c=0;if(" "===n.charAt(i)){for(;i>0&&" "===n.charAt(i-1);)i--;for(;r<n.length&&" "===n.charAt(r+1);)r++}else{var u=t[0],f=t[0];for(0===e[u][h.CHAR_DATA_WIDTH_INDEX]&&(s++,u--),2===e[f][h.CHAR_DATA_WIDTH_INDEX]&&(a++,f++),e[f][h.CHAR_DATA_CHAR_INDEX].length>1&&(c+=e[f][h.CHAR_DATA_CHAR_INDEX].length-1,r+=e[f][h.CHAR_DATA_CHAR_INDEX].length-1);u>0&&i>0&&!this._isCharWordSeparator(e[u-1]);){0===(_=e[u-1])[h.CHAR_DATA_WIDTH_INDEX]?(s++,u--):_[h.CHAR_DATA_CHAR_INDEX].length>1&&(l+=_[h.CHAR_DATA_CHAR_INDEX].length-1,i-=_[h.CHAR_DATA_CHAR_INDEX].length-1),i--,u--}for(;f<e.length&&r+1<n.length&&!this._isCharWordSeparator(e[f+1]);){var _;2===(_=e[f+1])[h.CHAR_DATA_WIDTH_INDEX]?(a++,f++):_[h.CHAR_DATA_CHAR_INDEX].length>1&&(c+=_[h.CHAR_DATA_CHAR_INDEX].length-1,r+=_[h.CHAR_DATA_CHAR_INDEX].length-1),r++,f++}}return r++,{start:i+o-s+l,length:Math.min(this._terminal.cols,r-i+s+a-l-c)}},e.prototype._selectWordAt=function(t){var e=this._getWordAt(t);e&&(this._model.selectionStart=[e.start,t[1]],this._model.selectionStartLength=e.length)},e.prototype._selectToWordAt=function(t){var e=this._getWordAt(t);e&&(this._model.selectionEnd=[this._model.areSelectionValuesReversed()?e.start:e.start+e.length,t[1]])},e.prototype._isCharWordSeparator=function(t){return 0!==t[h.CHAR_DATA_WIDTH_INDEX]&&" ()[]{}'\"".indexOf(t[h.CHAR_DATA_CHAR_INDEX])>=0},e.prototype._selectLineAt=function(t){this._model.selectionStart=[0,t],this._model.selectionStartLength=this._terminal.cols},e}(c.EventEmitter);e.SelectionManager=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){this._terminal=t,this.clearSelection()}return t.prototype.clearSelection=function(){this.selectionStart=null,this.selectionEnd=null,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(t.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"finalSelectionEnd",{get:function(){return this.isSelectAllActive?[this._terminal.cols,this._terminal.buffer.ybase+this._terminal.rows-1]:this.selectionStart?!this.selectionEnd||this.areSelectionValuesReversed()?[this.selectionStart[0]+this.selectionStartLength,this.selectionStart[1]]:this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd:null},enumerable:!0,configurable:!0}),t.prototype.areSelectionValuesReversed=function(){var t=this.selectionStart,e=this.selectionEnd;return!(!t||!e)&&(t[1]>e[1]||t[1]===e[1]&&t[0]>e[0])},t.prototype.onTrim=function(t){return this.selectionStart&&(this.selectionStart[1]-=t),this.selectionEnd&&(this.selectionEnd[1]-=t),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},t}();e.SelectionModel=i},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e,n){var i=t.call(this)||this;return i._document=e,i._parentElement=n,i._measureElement=i._document.createElement("span"),i._measureElement.style.position="absolute",i._measureElement.style.top="0",i._measureElement.style.left="-9999em",i._measureElement.style.lineHeight="normal",i._measureElement.textContent="W",i._measureElement.setAttribute("aria-hidden","true"),i._parentElement.appendChild(i._measureElement),i}return r(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),e.prototype.measure=function(t){this._measureElement.style.fontFamily=t.fontFamily,this._measureElement.style.fontSize=t.fontSize+"px";var e=this._measureElement.getBoundingClientRect();0!==e.width&&0!==e.height&&(this._width===e.width&&this._height===e.height||(this._width=e.width,this._height=Math.ceil(e.height),this.emit("charsizechanged")))},e}(n(27).EventEmitter);e.CharMeasure=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BellSound="data:audio/wav;base64,UklGRigBAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQQBAADpAFgCwAMlBZoG/wdmCcoKRAypDQ8PbRDBEQQTOxRtFYcWlBePGIUZXhoiG88bcBz7HHIdzh0WHlMeZx51HmkeUx4WHs8dah0AHXwc3hs9G4saxRnyGBIYGBcQFv8U4RPAEoYRQBACD70NWwwHC6gJOwjWBloF7gOBAhABkf8b/qv8R/ve+Xf4Ife79W/0JfPZ8Z/wde9N7ijtE+wU6xvqM+lb6H7nw+YX5mrlxuQz5Mzje+Ma49fioeKD4nXiYeJy4pHitOL04j/jn+MN5IPkFOWs5U3mDefM55/ogOl36m7rdOyE7abuyu8D8Unyj/Pg9D/2qfcb+Yn6/vuK/Qj/lAAlAg=="},function(t,e,n){"use strict";function i(t){if(!t.element.parentElement)return null;var e=window.getComputedStyle(t.element.parentElement),n=parseInt(e.getPropertyValue("height")),i=Math.max(0,parseInt(e.getPropertyValue("width"))-17),r=window.getComputedStyle(t.element),o=n-(parseInt(r.getPropertyValue("padding-top"))+parseInt(r.getPropertyValue("padding-bottom"))),s=i-(parseInt(r.getPropertyValue("padding-right"))+parseInt(r.getPropertyValue("padding-left")));return{cols:Math.floor(s/t.renderer.dimensions.actualCellWidth),rows:Math.floor(o/t.renderer.dimensions.actualCellHeight)}}function r(t){var e=i(t);e&&(t.rows===e.rows&&t.cols===e.cols||(t.renderer.clear(),t.resize(e.cols,e.rows)))}Object.defineProperty(e,"__esModule",{value:!0}),e.proposeGeometry=i,e.fit=r,e.apply=function(t){t.prototype.proposeGeometry=function(){return i(this)},t.prototype.fit=function(){return r(this)}}},function(t,e,n){"use strict";function i(t){["Windows","Win16","Win32","WinCE"].indexOf(navigator.platform)>=0&&t.on("linefeed",function(){32!==t.buffer.lines.get(t.buffer.ybase+t.buffer.y-1)[t.cols-1][3]&&(t.buffer.lines.get(t.buffer.ybase+t.buffer.y).isWrapped=!0)})}Object.defineProperty(e,"__esModule",{value:!0}),e.winptyCompatInit=i,e.apply=function(t){t.prototype.winptyCompatInit=function(){i(this)}}},function(t,e,n){"use strict";function i(t,e,n){if(!t.overlayNode_){if(!t.element)return;t.overlayNode_=document.createElement("div"),t.overlayNode_.style.cssText="border-radius: 15px;font-size: xx-large;opacity: 0.75;padding: 0.2em 0.5em 0.2em 0.5em;position: absolute;-webkit-user-select: none;-webkit-transition: opacity 180ms ease-in;-moz-user-select: none;-moz-transition: opacity 180ms ease-in;",t.overlayNode_.addEventListener("mousedown",function(t){t.preventDefault(),t.stopPropagation()},!0)}t.overlayNode_.style.color="#101010",t.overlayNode_.style.backgroundColor="#f0f0f0",t.overlayNode_.textContent=e,t.overlayNode_.style.opacity="0.75",t.overlayNode_.parentNode||t.element.appendChild(t.overlayNode_);var i=t.element.getBoundingClientRect(),r=t.overlayNode_.getBoundingClientRect();t.overlayNode_.style.top=(i.height-r.height)/2+"px",t.overlayNode_.style.left=(i.width-r.width)/2+"px",t.overlayTimeout_&&clearTimeout(t.overlayTimeout_),null!==n&&(t.overlayTimeout_=setTimeout(function(){t.overlayNode_.style.opacity="0",t.overlayTimeout_=setTimeout(function(){t.overlayNode_.parentNode&&t.overlayNode_.parentNode.removeChild(t.overlayNode_),t.overlayTimeout_=null,t.overlayNode_.style.opacity="0.75"},200)},n||1500))}Object.defineProperty(e,"__esModule",{value:!0}),e.showOverlay=i,e.apply=function(t){t.prototype.showOverlay=function(t,e){return i(this,t,e)}}},function(t,e){}]);</script>
</body>
</html>