Changeset 17410


Ignore:
Timestamp:
12/15/13 20:26:33 (11 years ago)
Author:
tbretz
Message:
Recompiled with the latest version of the closure compiler.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/termtv/termtv-min.js

    r17407 r17410  
    11// Input 0
    2 var p=void 0,t=!0,u=null,x=!1;function A(){return function(){}}var C;
    3 window.overlayTerminal=function(a){a=a?a.split("&"):location.search.substr(1).split("&");if(0!=a.length){for(var b={},c=0;c<a.length;c++){var d=a[c].indexOf("=");0>d&&(b[a[c]]=1);0<d&&(b[a[c].substring(0,d)]=a[c].substring(d+1))}b.name||(b.name=a[0]);b.title||(b.title=a[0].length?u:"");b.autostart||(b.autostart=1E3);b.warp||(b.warp=1);b.scan||(b.scan=x);b.noskip||(b.noskip=x);a[0].length?(!b.font&&!b.fontsize&&(b.fontsize=13),!b.fontfamily&&!b.font&&(b.font="fixed-8x13",b.boldfont="fixed-8x13B"),
    4 0==b.fontsize&&(b.fontsize=u)):!b.fontfamily&&!b.font&&(b.font="c64",b.fontfamily="c64");b.controls=b.controls?parseInt(b.controls,10):a[0].length;new aa(b);return x}};window.startDemo=function(){var a={debug:x,scan:x,autostart:1E3,warp:1,font:"c64",title:"",loop:1E3,controls:0,onclose:function(){a.loop=0}},b=document.getElementById("frame"),c=new ba(a);b.appendChild(c);return x};
     2var v;
     3window.overlayTerminal=function(a){a=a?a.split("&"):location.search.substr(1).split("&");if(0!=a.length){for(var b={},c=0;c<a.length;c++){var d=a[c].indexOf("=");0>d&&(b[a[c]]=1);0<d&&(b[a[c].substring(0,d)]=a[c].substring(d+1))}b.name||(b.name=a[0]);b.title||(b.title=a[0].length?null:"");b.autostart||(b.autostart=1E3);b.warp||(b.warp=1);b.scan||(b.scan=!1);b.noskip||(b.noskip=!1);a[0].length?(b.font||b.fontsize||(b.fontsize=13),b.fontfamily||b.font||(b.font="fixed-8x13",b.boldfont="fixed-8x13B"),0==
     4b.fontsize&&(b.fontsize=null)):b.fontfamily||b.font||(b.font="c64",b.fontfamily="c64");b.controls=b.controls?parseInt(b.controls,10):a[0].length;new aa(b);return!1}};window.startDemo=function(){var a={debug:!1,scan:!1,autostart:1E3,warp:1,font:"c64",title:"",loop:1E3,controls:0,onclose:function(){a.loop=0}},b=document.getElementById("frame"),c=new da(a);b.appendChild(c);return!1};
    55// Input 1
    6 var D=D||function(a,b){function c(){}var d={},e=d.ha={},f=e.bb={extend:function(a){c.prototype=this;var b=new c;a&&b.Ua(a);b.hasOwnProperty("init")||(b.I=function(){b.Xb.I.apply(this,arguments)});b.I.prototype=b;b.Xb=this;return b},create:function(){var a=this.extend();a.I.apply(a,arguments);return a},I:A(),Ua:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},X:function(){return this.I.prototype.extend(this)}},i=e.ra=f.extend({I:function(a,
    7 c){a=this.G=a||[];this.D=c!=b?c:4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.G,c=a.G,d=this.D,a=a.D;this.tb();if(d%4)for(var e=0;e<a;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-8*(e%4)&255)<<24-8*((d+e)%4);else if(65535<c.length)for(e=0;e<a;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);this.D+=a;return this},tb:function(){var b=this.G,c=this.D;b[c>>>2]&=4294967295<<32-8*(c%4);b.length=a.ceil(c/4)},X:function(){var a=f.X.call(this);a.G=this.G.slice(0);return a},
    8 random:function(b){for(var c=[],d=0;d<b;d+=4)c.push(4294967296*a.random()|0);return new i.I(c,b)}}),g=d.la={},h=g.Kc={stringify:function(a){for(var b=a.G,a=a.D,c=[],d=0;d<a;d++){var e=b[d>>>2]>>>24-8*(d%4)&255;c.push((e>>>4).toString(16));c.push((e&15).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d<b;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-4*(d%8);return new i.I(c,b/2)}},o=g.fb={stringify:function(a){for(var b=a.G,a=a.D,c=[],d=0;d<a;d++)c.push(String.fromCharCode(b[d>>>
    9 2]>>>24-8*(d%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d<b;d++)c[d>>>2]|=(a.charCodeAt(d)&255)<<24-8*(d%4);return new i.I(c,b)}},q=g.Qc={stringify:function(a){try{return decodeURIComponent(escape(o.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return o.parse(unescape(encodeURIComponent(a)))}},s=e.Zb=f.extend({reset:function(){this.ca=new i.I;this.Ka=0},sa:function(a){"string"==typeof a&&(a=q.parse(a));this.ca.concat(a);this.Ka+=a.D},
    10 da:function(b){var c=this.ca,d=c.G,e=c.D,f=this.W,h=e/(4*f),h=b?a.ceil(h):a.max((h|0)-this.mb,0),b=h*f,e=a.min(4*b,e);if(b){for(var q=0;q<b;q+=f)this.jb(d,q);q=d.splice(0,b);c.D-=e}return new i.I(q,e)},X:function(){var a=f.X.call(this);a.ca=this.ca.X();return a},mb:0});e.cc=s.extend({F:f.extend(),I:function(a){this.F=this.F.extend(a);this.reset()},reset:function(){s.reset.call(this);this.Ja()},update:function(a){this.sa(a);this.da();return this},Z:function(a){a&&this.sa(a);return this.ta()},W:16,
    11 Ia:function(a){return function(b,c){return(new a.I(c)).Z(b)}},fc:function(a){return function(b,c){return(new n.Jc.I(a,c)).Z(b)}}});var n=d.va={};return d}(Math);
    12 (function(){var a=D.ha.ra;D.la.cb={stringify:function(a){var c=a.G,d=a.D,e=this.lb;a.tb();for(var a=[],f=0;f<d;f+=3)for(var i=(c[f>>>2]>>>24-8*(f%4)&255)<<16|(c[f+1>>>2]>>>24-8*((f+1)%4)&255)<<8|c[f+2>>>2]>>>24-8*((f+2)%4)&255,g=0;4>g&&f+0.75*g<d;g++)a.push(e.charAt(i>>>6*(3-g)&63));if(c=e.charAt(64))for(;a.length%4;)a.push(c);return a.join("")},parse:function(b){var c=b.length,d=this.lb,e=d.charAt(64);e&&(e=b.indexOf(e),-1!=e&&(c=e));for(var e=[],f=0,i=0;i<c;i++)i%4&&(e[f>>>2]|=(d.indexOf(b.charAt(i-
    13 1))<<2*(i%4)|d.indexOf(b.charAt(i))>>>6-2*(i%4))<<24-8*(f%4),f++);return a.create(e,f)},lb:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();
    14 (function(a){function b(a,b,c,d,e,r,f){a=a+(b&c|~b&d)+e+f;return(a<<r|a>>>32-r)+b}function c(a,b,c,d,e,r,f){a=a+(b&d|c&~d)+e+f;return(a<<r|a>>>32-r)+b}function d(a,b,c,d,e,r,f){a=a+(b^c^d)+e+f;return(a<<r|a>>>32-r)+b}function e(a,b,c,d,e,r,f){a=a+(c^(b|~d))+e+f;return(a<<r|a>>>32-r)+b}for(var f=D.ha,i=f.ra,g=f.cc,f=D.va,h=[],o=0;64>o;o++)h[o]=4294967296*a.abs(a.sin(o+1))|0;f=f.gb=g.extend({Ja:function(){this.ua=new i.I([1732584193,4023233417,2562383102,271733878])},jb:function(a,f){for(var n=0;16>
    15 n;n++){var g=f+n,i=a[g];a[g]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var n=this.ua.G,g=a[f+0],i=a[f+1],r=a[f+2],w=a[f+3],o=a[f+4],H=a[f+5],K=a[f+6],y=a[f+7],M=a[f+8],O=a[f+9],Q=a[f+10],V=a[f+11],B=a[f+12],Z=a[f+13],da=a[f+14],ea=a[f+15],l=n[0],m=n[1],j=n[2],k=n[3],l=b(l,m,j,k,g,7,h[0]),k=b(k,l,m,j,i,12,h[1]),j=b(j,k,l,m,r,17,h[2]),m=b(m,j,k,l,w,22,h[3]),l=b(l,m,j,k,o,7,h[4]),k=b(k,l,m,j,H,12,h[5]),j=b(j,k,l,m,K,17,h[6]),m=b(m,j,k,l,y,22,h[7]),l=b(l,m,j,k,M,7,h[8]),k=b(k,l,m,j,O,12,h[9]),j=
    16 b(j,k,l,m,Q,17,h[10]),m=b(m,j,k,l,V,22,h[11]),l=b(l,m,j,k,B,7,h[12]),k=b(k,l,m,j,Z,12,h[13]),j=b(j,k,l,m,da,17,h[14]),m=b(m,j,k,l,ea,22,h[15]),l=c(l,m,j,k,i,5,h[16]),k=c(k,l,m,j,K,9,h[17]),j=c(j,k,l,m,V,14,h[18]),m=c(m,j,k,l,g,20,h[19]),l=c(l,m,j,k,H,5,h[20]),k=c(k,l,m,j,Q,9,h[21]),j=c(j,k,l,m,ea,14,h[22]),m=c(m,j,k,l,o,20,h[23]),l=c(l,m,j,k,O,5,h[24]),k=c(k,l,m,j,da,9,h[25]),j=c(j,k,l,m,w,14,h[26]),m=c(m,j,k,l,M,20,h[27]),l=c(l,m,j,k,Z,5,h[28]),k=c(k,l,m,j,r,9,h[29]),j=c(j,k,l,m,y,14,h[30]),m=c(m,
    17 j,k,l,B,20,h[31]),l=d(l,m,j,k,H,4,h[32]),k=d(k,l,m,j,M,11,h[33]),j=d(j,k,l,m,V,16,h[34]),m=d(m,j,k,l,da,23,h[35]),l=d(l,m,j,k,i,4,h[36]),k=d(k,l,m,j,o,11,h[37]),j=d(j,k,l,m,y,16,h[38]),m=d(m,j,k,l,Q,23,h[39]),l=d(l,m,j,k,Z,4,h[40]),k=d(k,l,m,j,g,11,h[41]),j=d(j,k,l,m,w,16,h[42]),m=d(m,j,k,l,K,23,h[43]),l=d(l,m,j,k,O,4,h[44]),k=d(k,l,m,j,B,11,h[45]),j=d(j,k,l,m,ea,16,h[46]),m=d(m,j,k,l,r,23,h[47]),l=e(l,m,j,k,g,6,h[48]),k=e(k,l,m,j,y,10,h[49]),j=e(j,k,l,m,da,15,h[50]),m=e(m,j,k,l,H,21,h[51]),l=e(l,
    18 m,j,k,B,6,h[52]),k=e(k,l,m,j,w,10,h[53]),j=e(j,k,l,m,Q,15,h[54]),m=e(m,j,k,l,i,21,h[55]),l=e(l,m,j,k,M,6,h[56]),k=e(k,l,m,j,ea,10,h[57]),j=e(j,k,l,m,K,15,h[58]),m=e(m,j,k,l,Z,21,h[59]),l=e(l,m,j,k,o,6,h[60]),k=e(k,l,m,j,V,10,h[61]),j=e(j,k,l,m,r,15,h[62]),m=e(m,j,k,l,O,21,h[63]);n[0]=n[0]+l|0;n[1]=n[1]+m|0;n[2]=n[2]+j|0;n[3]=n[3]+k|0},ta:function(){var b=this.ca,c=b.G,d=8*this.Ka,e=8*b.D;c[e>>>5]|=128<<24-e%32;var f=a.floor(d/4294967296);c[(e+64>>>9<<4)+15]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360;
    19 c[(e+64>>>9<<4)+14]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;b.D=4*(c.length+1);this.da();b=this.ua;c=b.G;for(d=0;4>d;d++)e=c[d],c[d]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360;return b},X:function(){var a=g.X.call(this);a.ua=this.ua.X();return a}});D.gb=g.Ia(f);D.Lc=g.fc(f)})(Math);
    20 (function(){var a=D.ha,b=a.bb,c=a.ra,a=D.va,d=a.eb=b.extend({F:b.extend({ga:4,uc:a.gb,wc:1}),I:function(a){this.F=this.F.extend(a)},ub:function(a,b){for(var d=this.F,g=d.uc.create(),h=c.create(),o=h.G,q=d.ga,d=d.wc;o.length<q;){s&&g.update(s);var s=g.update(a).Z(b);g.reset();for(var n=1;n<d;n++)s=g.Z(s),g.reset();h.concat(s)}h.D=4*q;return h}});D.eb=function(a,b,c){return d.create(c).ub(a,b)}})();
    21 D.ha.$b||function(a){function b(b,c,d){var e=this.kb;e?this.kb=a:e=this.ob;for(var f=0;f<d;f++)b[c+f]^=e[f]}var c=D,d=c.ha,e=d.bb,f=d.ra,i=d.Zb,g=c.la.cb,h=c.va.eb,o=d.$b=i.extend({F:e.extend(),Qa:function(a,b){return this.create(this.Ha,a,b)},Pa:function(a,b){return this.create(this.ec,a,b)},I:function(a,b,c){this.F=this.F.extend(c);this.pb=a;this.hc=b;this.reset()},reset:function(){i.reset.call(this);this.Ja()},ad:function(a){this.sa(a);return this.da()},Z:function(a){a&&this.sa(a);return this.ta()},
    22 ga:4,Hb:4,Ha:1,ec:2,Ia:function(a){return{za:function(b,c,d){return("string"==typeof c?z:v).za(a,b,c,d)},ka:function(b,c,d){return("string"==typeof c?z:v).ka(a,b,c,d)}}}});d.Pc=o.extend({ta:function(){return this.da(t)},W:1});var q=c.mode={},s=(d.Gc=e.extend({Qa:function(a,b){return this.bc.create(a,b)},Pa:function(a,b){return this.ac.create(a,b)},I:function(a,b){this.hb=a;this.kb=b}})).extend();s.bc=s.extend({Ub:function(a,c){var d=this.hb,e=d.W;b.call(this,a,c,e);d.qc(a,c);this.ob=a.slice(c,c+e)}});
    23 s.ac=s.extend({Ub:function(a,c){var d=this.hb,e=d.W,f=a.slice(c,c+e);d.pc(a,c);b.call(this,a,c,e);this.ob=f}});q=q.Hc=s;s=(c.Sb={}).Nc={Sb:function(a,b){for(var c=4*b,c=c-a.D%c,d=c<<24|c<<16|c<<8|c,e=[],h=0;h<c;h+=4)e.push(d);c=f.create(e,c);a.concat(c)},Ec:function(a){a.D-=a.G[a.D-1>>>2]&255}};d.Yb=o.extend({F:o.F.extend({mode:q,padding:s}),reset:function(){o.reset.call(this);var a=this.F,b=a.$,a=a.mode;if(this.pb==this.Ha)var c=a.Qa;else c=a.Pa,this.mb=1;this.jc=c.call(a,this,b&&b.G)},jb:function(a,
    24 b){this.jc.Ub(a,b)},ta:function(){var a=this.F.padding;if(this.pb==this.Ha){a.Sb(this.ca,this.W);var b=this.da(t)}else b=this.da(t),a.Ec(b);return b},W:4});var n=d.Ic=e.extend({I:function(a){this.Ua(a)},toString:function(a){return(a||this.sc).stringify(this)}}),q=(c.Aa={}).dc={stringify:function(a){var b=a.Na,a=a.Ya;return(a?f.create([1398893684,1701076831]).concat(a).concat(b):b).toString(g)},parse:function(a){var a=g.parse(a),b=a.G;if(1398893684==b[0]&&1701076831==b[1]){var c=f.create(b.slice(2,
    25 4));b.splice(0,4);a.D-=16}return n.create({Na:a,Ya:c})}},v=d.Oc=e.extend({F:e.extend({Aa:q}),za:function(a,b,c,d){var d=this.F.extend(d),e=a.Qa(c,d),b=e.Z(b),e=e.F;return n.create({Na:b,key:c,$:e.$,Rc:a,mode:e.mode,padding:e.padding,W:a.W,sc:d.Aa})},ka:function(a,b,c,d){d=this.F.extend(d);b=this.nb(b,d.Aa);return a.Pa(c,d).Z(b.Na)},nb:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),c=(c.Ta={}).dc={execute:function(a,b,c,d){d||(d=f.random(8));a=h.create({ga:b+c}).ub(a,d);c=f.create(a.G.slice(b),
    26 4*c);a.D=4*b;return n.create({key:a,$:c,Ya:d})}},z=d.Mc=v.extend({F:v.F.extend({Ta:c}),za:function(a,b,c,d){d=this.F.extend(d);c=d.Ta.execute(c,a.ga,a.Hb);d.$=c.$;a=v.za.call(this,a,b,c.key,d);a.Ua(c);return a},ka:function(a,b,c,d){d=this.F.extend(d);b=this.nb(b,d.Aa);c=d.Ta.execute(c,a.ga,a.Hb,b.Ya);d.$=c.$;return v.ka.call(this,a,b,c.key,d)}})}();
    27 (function(){for(var a=D.ha.Yb,b=D.va,c=[],d=[],e=[],f=[],i=[],g=[],h=[],o=[],q=[],s=[],n=[],v=0;256>v;v++)n[v]=128>v?v<<1:v<<1^283;for(var z=0,r=0,v=0;256>v;v++){var w=r^r<<1^r<<2^r<<3^r<<4,w=w>>>8^w&255^99;c[z]=w;d[w]=z;var E=n[z],H=n[E],K=n[H],y=257*n[w]^16843008*w;e[z]=y<<24|y>>>8;f[z]=y<<16|y>>>16;i[z]=y<<8|y>>>24;g[z]=y;y=16843009*K^65537*H^257*E^16843008*z;h[w]=y<<24|y>>>8;o[w]=y<<16|y>>>16;q[w]=y<<8|y>>>24;s[w]=y;z?(z=E^n[n[n[K^E]]],r^=n[n[r]]):z=r=1}var M=[0,1,2,4,8,16,32,64,128,27,54],b=
    28 b.ab=a.extend({Ja:function(){for(var a=this.hc,b=a.G,d=a.D/4,a=4*((this.kc=d+6)+1),e=this.ic=[],f=0;f<a;f++)if(f<d)e[f]=b[f];else{var g=e[f-1];f%d?6<d&&4==f%d&&(g=c[g>>>24]<<24|c[g>>>16&255]<<16|c[g>>>8&255]<<8|c[g&255]):(g=g<<8|g>>>24,g=c[g>>>24]<<24|c[g>>>16&255]<<16|c[g>>>8&255]<<8|c[g&255],g^=M[f/d|0]<<24);e[f]=e[f-d]^g}b=this.gc=[];for(d=0;d<a;d++)f=a-d,g=d%4?e[f]:e[f-4],b[d]=4>d||4>=f?g:h[c[g>>>24]]^o[c[g>>>16&255]]^q[c[g>>>8&255]]^s[c[g&255]]},qc:function(a,b){this.ib(a,b,this.ic,e,f,i,g,c)},
    29 pc:function(a,b){var c=a[b+1];a[b+1]=a[b+3];a[b+3]=c;this.ib(a,b,this.gc,h,o,q,s,d);c=a[b+1];a[b+1]=a[b+3];a[b+3]=c},ib:function(a,b,c,d,e,f,h,g){for(var i=this.kc,j=a[b]^c[0],k=a[b+1]^c[1],o=a[b+2]^c[2],n=a[b+3]^c[3],q=4,r=1;r<i;r++)var s=d[j>>>24]^e[k>>>16&255]^f[o>>>8&255]^h[n&255]^c[q++],v=d[k>>>24]^e[o>>>16&255]^f[n>>>8&255]^h[j&255]^c[q++],w=d[o>>>24]^e[n>>>16&255]^f[j>>>8&255]^h[k&255]^c[q++],n=d[n>>>24]^e[j>>>16&255]^f[k>>>8&255]^h[o&255]^c[q++],j=s,k=v,o=w;s=(g[j>>>24]<<24|g[k>>>16&255]<<
    30 16|g[o>>>8&255]<<8|g[n&255])^c[q++];v=(g[k>>>24]<<24|g[o>>>16&255]<<16|g[n>>>8&255]<<8|g[j&255])^c[q++];w=(g[o>>>24]<<24|g[n>>>16&255]<<16|g[j>>>8&255]<<8|g[k&255])^c[q++];n=(g[n>>>24]<<24|g[j>>>16&255]<<16|g[k>>>8&255]<<8|g[o&255])^c[q++];a[b]=s;a[b+1]=v;a[b+2]=w;a[b+3]=n},ga:8});D.ab=a.Ia(b)})();
     6var y=y||function(a,b){function c(){}var d={},e=d.fa={},f=e.ab={extend:function(a){c.prototype=this;var b=new c;a&&b.Ta(a);b.hasOwnProperty("init")||(b.I=function(){b.Ub.I.apply(this,arguments)});b.I.prototype=b;b.Ub=this;return b},create:function(){var a=this.extend();a.I.apply(a,arguments);return a},I:function(){},Ta:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},W:function(){return this.I.prototype.extend(this)}},k=e.qa=
     7f.extend({I:function(a,c){a=this.G=a||[];this.D=c!=b?c:4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.G,c=a.G,d=this.D;a=a.D;this.sb();if(d%4)for(var e=0;e<a;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-e%4*8&255)<<24-(d+e)%4*8;else if(65535<c.length)for(e=0;e<a;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);this.D+=a;return this},sb:function(){var b=this.G,c=this.D;b[c>>>2]&=4294967295<<32-c%4*8;b.length=a.ceil(c/4)},W:function(){var a=f.W.call(this);a.G=this.G.slice(0);
     8return a},random:function(b){for(var c=[],d=0;d<b;d+=4)c.push(4294967296*a.random()|0);return new k.I(c,b)}}),g=d.ja={},h=g.Ic={stringify:function(a){var b=a.G;a=a.D;for(var c=[],d=0;d<a;d++){var e=b[d>>>2]>>>24-d%4*8&255;c.push((e>>>4).toString(16));c.push((e&15).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d<b;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new k.I(c,b/2)}},r=g.eb={stringify:function(a){var b=a.G;a=a.D;for(var c=[],d=0;d<a;d++)c.push(String.fromCharCode(b[d>>>
     92]>>>24-d%4*8&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d<b;d++)c[d>>>2]|=(a.charCodeAt(d)&255)<<24-d%4*8;return new k.I(c,b)}},s=g.Oc={stringify:function(a){try{return decodeURIComponent(escape(r.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return r.parse(unescape(encodeURIComponent(a)))}},u=e.Wb=f.extend({reset:function(){this.aa=new k.I;this.Ja=0},ra:function(a){"string"==typeof a&&(a=s.parse(a));this.aa.concat(a);this.Ja+=a.D},ba:function(b){var c=
     10this.aa,d=c.G,e=c.D,f=this.V,h=e/(4*f),h=b?a.ceil(h):a.max((h|0)-this.lb,0);b=h*f;e=a.min(4*b,e);if(b){for(var s=0;s<b;s+=f)this.ib(d,s);s=d.splice(0,b);c.D-=e}return new k.I(s,e)},W:function(){var a=f.W.call(this);a.aa=this.aa.W();return a},lb:0});e.$b=u.extend({F:f.extend(),I:function(a){this.F=this.F.extend(a);this.reset()},reset:function(){u.reset.call(this);this.Ia()},update:function(a){this.ra(a);this.ba();return this},Z:function(a){a&&this.ra(a);return this.sa()},V:16,Ha:function(a){return function(b,
     11c){return(new a.I(c)).Z(b)}},cc:function(a){return function(b,c){return(new q.Hc.I(a,c)).Z(b)}}});var q=d.ua={};return d}(Math);
     12(function(){var a=y.fa.qa;y.ja.bb={stringify:function(a){var c=a.G,d=a.D,e=this.kb;a.sb();a=[];for(var f=0;f<d;f+=3)for(var k=(c[f>>>2]>>>24-f%4*8&255)<<16|(c[f+1>>>2]>>>24-(f+1)%4*8&255)<<8|c[f+2>>>2]>>>24-(f+2)%4*8&255,g=0;4>g&&f+0.75*g<d;g++)a.push(e.charAt(k>>>6*(3-g)&63));if(c=e.charAt(64))for(;a.length%4;)a.push(c);return a.join("")},parse:function(b){var c=b.length,d=this.kb,e=d.charAt(64);e&&(e=b.indexOf(e),-1!=e&&(c=e));for(var e=[],f=0,k=0;k<c;k++)k%4&&(e[f>>>2]|=(d.indexOf(b.charAt(k-1))<<
     13k%4*2|d.indexOf(b.charAt(k))>>>6-k%4*2)<<24-f%4*8,f++);return a.create(e,f)},kb:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();
     14(function(a){function b(a,b,c,d,e,t,f){a=a+(b&c|~b&d)+e+f;return(a<<t|a>>>32-t)+b}function c(a,b,c,d,e,t,f){a=a+(b&d|c&~d)+e+f;return(a<<t|a>>>32-t)+b}function d(a,b,c,d,e,t,f){a=a+(b^c^d)+e+f;return(a<<t|a>>>32-t)+b}function e(a,b,c,d,e,t,f){a=a+(c^(b|~d))+e+f;return(a<<t|a>>>32-t)+b}for(var f=y.fa,k=f.qa,g=f.$b,f=y.ua,h=[],r=0;64>r;r++)h[r]=4294967296*a.abs(a.sin(r+1))|0;f=f.fb=g.extend({Ia:function(){this.ta=new k.I([1732584193,4023233417,2562383102,271733878])},ib:function(a,f){for(var q=0;16>
     15q;q++){var g=f+q,k=a[g];a[g]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}var q=this.ta.G,g=a[f+0],k=a[f+1],t=a[f+2],x=a[f+3],r=a[f+4],G=a[f+5],I=a[f+6],z=a[f+7],K=a[f+8],M=a[f+9],O=a[f+10],T=a[f+11],C=a[f+12],X=a[f+13],ba=a[f+14],ca=a[f+15],n=q[0],p=q[1],l=q[2],m=q[3],n=b(n,p,l,m,g,7,h[0]),m=b(m,n,p,l,k,12,h[1]),l=b(l,m,n,p,t,17,h[2]),p=b(p,l,m,n,x,22,h[3]),n=b(n,p,l,m,r,7,h[4]),m=b(m,n,p,l,G,12,h[5]),l=b(l,m,n,p,I,17,h[6]),p=b(p,l,m,n,z,22,h[7]),n=b(n,p,l,m,K,7,h[8]),m=b(m,n,p,l,M,12,h[9]),l=
     16b(l,m,n,p,O,17,h[10]),p=b(p,l,m,n,T,22,h[11]),n=b(n,p,l,m,C,7,h[12]),m=b(m,n,p,l,X,12,h[13]),l=b(l,m,n,p,ba,17,h[14]),p=b(p,l,m,n,ca,22,h[15]),n=c(n,p,l,m,k,5,h[16]),m=c(m,n,p,l,I,9,h[17]),l=c(l,m,n,p,T,14,h[18]),p=c(p,l,m,n,g,20,h[19]),n=c(n,p,l,m,G,5,h[20]),m=c(m,n,p,l,O,9,h[21]),l=c(l,m,n,p,ca,14,h[22]),p=c(p,l,m,n,r,20,h[23]),n=c(n,p,l,m,M,5,h[24]),m=c(m,n,p,l,ba,9,h[25]),l=c(l,m,n,p,x,14,h[26]),p=c(p,l,m,n,K,20,h[27]),n=c(n,p,l,m,X,5,h[28]),m=c(m,n,p,l,t,9,h[29]),l=c(l,m,n,p,z,14,h[30]),p=c(p,
     17l,m,n,C,20,h[31]),n=d(n,p,l,m,G,4,h[32]),m=d(m,n,p,l,K,11,h[33]),l=d(l,m,n,p,T,16,h[34]),p=d(p,l,m,n,ba,23,h[35]),n=d(n,p,l,m,k,4,h[36]),m=d(m,n,p,l,r,11,h[37]),l=d(l,m,n,p,z,16,h[38]),p=d(p,l,m,n,O,23,h[39]),n=d(n,p,l,m,X,4,h[40]),m=d(m,n,p,l,g,11,h[41]),l=d(l,m,n,p,x,16,h[42]),p=d(p,l,m,n,I,23,h[43]),n=d(n,p,l,m,M,4,h[44]),m=d(m,n,p,l,C,11,h[45]),l=d(l,m,n,p,ca,16,h[46]),p=d(p,l,m,n,t,23,h[47]),n=e(n,p,l,m,g,6,h[48]),m=e(m,n,p,l,z,10,h[49]),l=e(l,m,n,p,ba,15,h[50]),p=e(p,l,m,n,G,21,h[51]),n=e(n,
     18p,l,m,C,6,h[52]),m=e(m,n,p,l,x,10,h[53]),l=e(l,m,n,p,O,15,h[54]),p=e(p,l,m,n,k,21,h[55]),n=e(n,p,l,m,K,6,h[56]),m=e(m,n,p,l,ca,10,h[57]),l=e(l,m,n,p,I,15,h[58]),p=e(p,l,m,n,X,21,h[59]),n=e(n,p,l,m,r,6,h[60]),m=e(m,n,p,l,T,10,h[61]),l=e(l,m,n,p,t,15,h[62]),p=e(p,l,m,n,M,21,h[63]);q[0]=q[0]+n|0;q[1]=q[1]+p|0;q[2]=q[2]+l|0;q[3]=q[3]+m|0},sa:function(){var b=this.aa,c=b.G,d=8*this.Ja,e=8*b.D;c[e>>>5]|=128<<24-e%32;var f=a.floor(d/4294967296);c[(e+64>>>9<<4)+15]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360;
     19c[(e+64>>>9<<4)+14]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;b.D=4*(c.length+1);this.ba();b=this.ta;c=b.G;for(d=0;4>d;d++)e=c[d],c[d]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360;return b},W:function(){var a=g.W.call(this);a.ta=this.ta.W();return a}});y.fb=g.Ha(f);y.Jc=g.cc(f)})(Math);
     20(function(){var a=y.fa,b=a.ab,c=a.qa,a=y.ua,d=a.cb=b.extend({F:b.extend({ea:4,sc:a.fb,uc:1}),I:function(a){this.F=this.F.extend(a)},tb:function(a,b){for(var d=this.F,g=d.sc.create(),h=c.create(),r=h.G,s=d.ea,d=d.uc;r.length<s;){u&&g.update(u);var u=g.update(a).Z(b);g.reset();for(var q=1;q<d;q++)u=g.Z(u),g.reset();h.concat(u)}h.D=4*s;return h}});y.cb=function(a,b,c){return d.create(c).tb(a,b)}})();
     21y.fa.Xb||function(a){function b(b,c,d){var e=this.jb;e?this.jb=a:e=this.nb;for(var f=0;f<d;f++)b[c+f]^=e[f]}var c=y,d=c.fa,e=d.ab,f=d.qa,k=d.Wb,g=c.ja.bb,h=c.ua.cb,r=d.Xb=k.extend({F:e.extend(),Pa:function(a,b){return this.create(this.Ga,a,b)},Oa:function(a,b){return this.create(this.bc,a,b)},I:function(a,b,c){this.F=this.F.extend(c);this.ob=a;this.ec=b;this.reset()},reset:function(){k.reset.call(this);this.Ia()},Zc:function(a){this.ra(a);return this.ba()},Z:function(a){a&&this.ra(a);return this.sa()},
     22ea:4,Eb:4,Ga:1,bc:2,Ha:function(a){return{ya:function(b,c,d){return("string"==typeof c?A:w).ya(a,b,c,d)},ia:function(b,c,d){return("string"==typeof c?A:w).ia(a,b,c,d)}}}});d.Nc=r.extend({sa:function(){return this.ba(!0)},V:1});var s=c.mode={},u=(d.Ec=e.extend({Pa:function(a,b){return this.Zb.create(a,b)},Oa:function(a,b){return this.Yb.create(a,b)},I:function(a,b){this.gb=a;this.jb=b}})).extend();u.Zb=u.extend({Rb:function(a,c){var d=this.gb,e=d.V;b.call(this,a,c,e);d.oc(a,c);this.nb=a.slice(c,c+
     23e)}});u.Yb=u.extend({Rb:function(a,c){var d=this.gb,e=d.V,f=a.slice(c,c+e);d.mc(a,c);b.call(this,a,c,e);this.nb=f}});s=s.Fc=u;u=(c.Pb={}).Lc={Pb:function(a,b){for(var c=4*b,c=c-a.D%c,d=c<<24|c<<16|c<<8|c,e=[],h=0;h<c;h+=4)e.push(d);c=f.create(e,c);a.concat(c)},Cc:function(a){a.D-=a.G[a.D-1>>>2]&255}};d.Vb=r.extend({F:r.F.extend({mode:s,padding:u}),reset:function(){r.reset.call(this);var a=this.F,b=a.$,a=a.mode;if(this.ob==this.Ga)var c=a.Pa;else c=a.Oa,this.lb=1;this.gc=c.call(a,this,b&&b.G)},ib:function(a,
     24b){this.gc.Rb(a,b)},sa:function(){var a=this.F.padding;if(this.ob==this.Ga){a.Pb(this.aa,this.V);var b=this.ba(!0)}else b=this.ba(!0),a.Cc(b);return b},V:4});var q=d.Gc=e.extend({I:function(a){this.Ta(a)},toString:function(a){return(a||this.qc).stringify(this)}}),s=(c.za={}).ac={stringify:function(a){var b=a.Ma;a=a.Xa;return(a?f.create([1398893684,1701076831]).concat(a).concat(b):b).toString(g)},parse:function(a){a=g.parse(a);var b=a.G;if(1398893684==b[0]&&1701076831==b[1]){var c=f.create(b.slice(2,
     254));b.splice(0,4);a.D-=16}return q.create({Ma:a,Xa:c})}},w=d.Mc=e.extend({F:e.extend({za:s}),ya:function(a,b,c,d){d=this.F.extend(d);var e=a.Pa(c,d);b=e.Z(b);e=e.F;return q.create({Ma:b,key:c,$:e.$,Pc:a,mode:e.mode,padding:e.padding,V:a.V,qc:d.za})},ia:function(a,b,c,d){d=this.F.extend(d);b=this.mb(b,d.za);return a.Oa(c,d).Z(b.Ma)},mb:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),c=(c.Sa={}).ac={execute:function(a,b,c,d){d||(d=f.random(8));a=h.create({ea:b+c}).tb(a,d);c=f.create(a.G.slice(b),
     264*c);a.D=4*b;return q.create({key:a,$:c,Xa:d})}},A=d.Kc=w.extend({F:w.F.extend({Sa:c}),ya:function(a,b,c,d){d=this.F.extend(d);c=d.Sa.execute(c,a.ea,a.Eb);d.$=c.$;a=w.ya.call(this,a,b,c.key,d);a.Ta(c);return a},ia:function(a,b,c,d){d=this.F.extend(d);b=this.mb(b,d.za);c=d.Sa.execute(c,a.ea,a.Eb,b.Xa);d.$=c.$;return w.ia.call(this,a,b,c.key,d)}})}();
     27(function(){for(var a=y.fa.Vb,b=y.ua,c=[],d=[],e=[],f=[],k=[],g=[],h=[],r=[],s=[],u=[],q=[],w=0;256>w;w++)q[w]=128>w?w<<1:w<<1^283;for(var A=0,t=0,w=0;256>w;w++){var x=t^t<<1^t<<2^t<<3^t<<4,x=x>>>8^x&255^99;c[A]=x;d[x]=A;var D=q[A],G=q[D],I=q[G],z=257*q[x]^16843008*x;e[A]=z<<24|z>>>8;f[A]=z<<16|z>>>16;k[A]=z<<8|z>>>24;g[A]=z;z=16843009*I^65537*G^257*D^16843008*A;h[x]=z<<24|z>>>8;r[x]=z<<16|z>>>16;s[x]=z<<8|z>>>24;u[x]=z;A?(A=D^q[q[q[I^D]]],t^=q[q[t]]):A=t=1}var K=[0,1,2,4,8,16,32,64,128,27,54],b=
     28b.$a=a.extend({Ia:function(){for(var a=this.ec,b=a.G,d=a.D/4,a=4*((this.hc=d+6)+1),e=this.fc=[],f=0;f<a;f++)if(f<d)e[f]=b[f];else{var g=e[f-1];f%d?6<d&&4==f%d&&(g=c[g>>>24]<<24|c[g>>>16&255]<<16|c[g>>>8&255]<<8|c[g&255]):(g=g<<8|g>>>24,g=c[g>>>24]<<24|c[g>>>16&255]<<16|c[g>>>8&255]<<8|c[g&255],g^=K[f/d|0]<<24);e[f]=e[f-d]^g}b=this.dc=[];for(d=0;d<a;d++)f=a-d,g=d%4?e[f]:e[f-4],b[d]=4>d||4>=f?g:h[c[g>>>24]]^r[c[g>>>16&255]]^s[c[g>>>8&255]]^u[c[g&255]]},oc:function(a,b){this.hb(a,b,this.fc,e,f,k,g,c)},
     29mc:function(a,b){var c=a[b+1];a[b+1]=a[b+3];a[b+3]=c;this.hb(a,b,this.dc,h,r,s,u,d);c=a[b+1];a[b+1]=a[b+3];a[b+3]=c},hb:function(a,b,c,d,e,f,h,g){for(var k=this.hc,l=a[b]^c[0],m=a[b+1]^c[1],r=a[b+2]^c[2],q=a[b+3]^c[3],s=4,t=1;t<k;t++)var u=d[l>>>24]^e[m>>>16&255]^f[r>>>8&255]^h[q&255]^c[s++],w=d[m>>>24]^e[r>>>16&255]^f[q>>>8&255]^h[l&255]^c[s++],x=d[r>>>24]^e[q>>>16&255]^f[l>>>8&255]^h[m&255]^c[s++],q=d[q>>>24]^e[l>>>16&255]^f[m>>>8&255]^h[r&255]^c[s++],l=u,m=w,r=x;u=(g[l>>>24]<<24|g[m>>>16&255]<<
     3016|g[r>>>8&255]<<8|g[q&255])^c[s++];w=(g[m>>>24]<<24|g[r>>>16&255]<<16|g[q>>>8&255]<<8|g[l&255])^c[s++];x=(g[r>>>24]<<24|g[q>>>16&255]<<16|g[l>>>8&255]<<8|g[m&255])^c[s++];q=(g[q>>>24]<<24|g[l>>>16&255]<<16|g[m>>>8&255]<<8|g[r&255])^c[s++];a[b]=u;a[b+1]=w;a[b+2]=x;a[b+3]=q},ea:8});y.$a=a.Ha(b)})();
    3131// Input 2
    32 function ca(a,b){var c=[];a.font=b;c[0]=a.measureText("WWWWI").width;a.font="bold "+b;c[1]=a.measureText("WWWWI").width;a.font="lighter "+b;c[2]=a.measureText("WWWWI").width;return c}
    33 function fa(a){if(a.fontsize){var b=a.canvas.getContext("2d"),c="300px "+a.fontFamily+", sans",d="300px "+a.fontFamily+", serif",e=ca(b,"300px sans"),f=ca(b,"300px serif"),c=ca(b,c),d=ca(b,d),i=c[1]!=d[1]||c[1]==e[1]||d[1]==f[1],g=c[2]!=d[2]||c[2]==e[2]||d[2]==f[2];c[0]!=d[0]||c[0]==e[0]||d[0]==f[0]||i||g?setTimeout(function(){fa(a)},20):(a.Kb="normal "+a.fontsize+"px "+a.fontFamily,a.ea="bold "+a.fontsize+"px "+a.fontFamily,a.Ib="lighter "+a.fontsize+"px "+a.fontFamily,b.font=a.Kb,e=b.measureText("W").width,
    34 b.font=a.ea,f=b.measureText("W").width,b.font=a.Ib,b=b.measureText("W").width,c=Math.max(e,f,b),a.Bc=parseInt((c-e)/2,10),a.lc=parseInt((c-f)/2,10),a.xc=parseInt((c-b)/2,10),a.font={},a.font.N=a.fontsize,a.font.L=c,a.debug("Using font-family '"+a.fontFamily+"' ["+c+" x "+a.fontsize+"]"),ga(a))}else new ha(a.Bb,function(b){a.font=b;ga(a)},a.options.debug),a.ea&&new ha(a.ea,function(b){a.P=b;ga(a)},a.options.debug)}
    35 function ia(a,b){var c=this;if(!(a instanceof HTMLCanvasElement))throw Error("First argument to TTVCanvas constructor must be an HTMLCanvasElement (was "+a+")");c.V=F("#000000,#b21818,#18b218,#b26818,#1818b2,#b218b2,#18b2b2,#b2b2b2".split(","));c.U=F("#686868,#ff5454,#54ff54,#ffff54,#5454ff,#ff54ff,#54ffff,#ffffff".split(","));c.Bb="qemu-vgafont";c.fontFamily="monospace";c.na=[];c.canvas=a;c.debug=function(a){b.debug?b.debug("canvasview.js: "+a):alert("canvasview.js: "+a)};c.options=b;b.fontsize&&
    36 (c.fontsize=b.fontsize);b.Y&&(c.Y=b.Y);b.font&&(c.Bb=b.font);b.Cb&&(c.fontFamily=b.Cb);b.P&&(c.ea=b.P);b.Y&&(c.Y=b.Y);b.Q&&(c.Q=b.Q);b.na&&c.na.push(b.na);c.cursor={};c.cursor.x=0;c.cursor.y=0;c.cursor.ba=t;c.o=new ja({debug:c.options.debug,A:c.options.A,width:c.options.width,height:c.options.height,mc:function(a,b,d){ka(c,a,b,d)},cursor:function(a,b,d){a>=c.o.width&&(a=c.o.width-1);ka(c,b,a,a);ka(c,c.cursor.y,c.cursor.x,c.cursor.x);c.cursor.x=a;c.cursor.y=b;c.cursor.ba=d},Dc:function(a){if(c.Q){(a.title||
    37 a.Db)&&c.Q(a);if(a.border){var b=a.border[0];b>=0&&b<8?c.Q({border:c.V[b],width:a.border[1]*c.font.L}):b>=10&&b<18?c.Q({border:c.U[b%10],width:a.border[1]*c.font.L}):c.Q({border:u})}}}});c.aa=new la(c.o,c.options.debug);c.ya=[];for(var d=0;d<c.o.height;d++)c.ya[d]={min:0,max:c.o.width-1};setTimeout(function(){fa(c)},1);return this}
    38 function ga(a){if(!a.fontsize){if(!a.font)return;if(a.ea){if(!a.P)return;if(a.font.L!=a.P.L||a.font.N!=a.P.N)a.debug("Normal font size ["+a.font.L+"x"+a.font.N+"] and bold font size ["+a.P.L+"x"+a.font.N+"] mismatch"),a.P=p}}a.Y&&(a.canvas.setAttribute("width",a.o.width*a.font.L),a.canvas.setAttribute("height",a.o.height*a.font.N));ma(a);a.na.forEach(function(a){a()})}ia.prototype.Fa=function(a){this.o.Fa(a.Ab);this.aa.buffer=a.aa};
    39 function ka(a,b,c,d){if(b>=a.o.height||0>c||d>=a.o.width)throw Error("makeSpanDirty "+b+" "+a.o.height+" "+c+" "+d+" "+a.o.width);a=a.ya[b];a.min>c&&(a.min=c);a.max<d&&(a.max=d)}
    40 function ma(a){var b=a.canvas.getContext("2d");b.textBaseline="bottom";b.lineWidth=1;b.beginPath();var c=a.font.L,d=a.font.N,e,f,i;if(a.fontsize)for(g=0;g<a.o.height;g++){h=a.ya[g];for(o=h.min;o<=h.max;o++)q=g*a.o.width+o,(r=a.cursor.x==o&&a.cursor.y==g&&a.cursor.ba)?(s=a.o.p.r.C[q]%10,r=(9<s||a.o.p.r.bold[q]?a.U:a.V)[s]):(n=a.o.p.r.B[q]%10,r=(9<n?a.U:a.V)[n]),f!=r&&(b.fillStyle=f=r),b.fillRect(o*c,g*d,c,d);for(o=h.min;o<=h.max;o++)q=g*a.o.width+o,v=a.o.p.r.bold[q],z=a.o.p.r.text[q],(r=a.cursor.x==
    41 o&&a.cursor.y==g&&a.cursor.ba)?(n=a.o.p.r.B[q]%10,s=(9<n?a.U:a.V)[n]):(s=a.o.p.r.C[q]%10,s=(9<s||v?a.U:a.V)[s]),32!=z.charCodeAt(0)&&(f!=s&&(b.fillStyle=f=s),n=a.Kb,r=a.Bc,v&&(n=a.ea,r=a.lc),a.o.p.r.K[q]&&(n=a.Ib,r=a.xc),e!=n&&(b.font=e=n),b.fillText(z,o*c+r,(g+1)*d),b.stroke()),a.o.p.r.M[q]&&(s!=i&&(b.stroke(),b.strokeStyle=i=s,b.beginPath()),b.moveTo(o*c,(g+1)*d-1),b.lineTo((o+1)*c,(g+1)*d-1));h.min=a.o.width-1;h.max=0}else for(var g=0;g<a.o.height;g++){for(var h=a.ya[g],o=h.min;o<=h.max;o++){var q=
    42 g*a.o.width+o,s=a.o.p.r.C[q]%10,n=a.o.p.r.B[q]%10,v=a.o.p.r.bold[q],z=a.o.p.r.text[q],r=a.cursor.x==o&&a.cursor.y==g&&a.cursor.ba;r?(r=(9<s||v?a.U:a.V)[s],s=(9<n?a.U:a.V)[n]):(s=(9<s||v?a.U:a.V)[s],r=(9<n?a.U:a.V)[n]);v&&a.P?a.P.zb(b,z,o*c,g*d,s,r):a.font.zb(b,z,o*c,g*d,s,r);a.o.p.r.M[q]&&(s!=i&&(b.stroke(),b.strokeStyle=i=s,b.beginPath()),b.moveTo(o*c,(g+1)*d-1),b.lineTo((o+1)*c,(g+1)*d-1))}h.min=a.o.width-1;h.max=0}b.stroke()};
     32function ea(a,b){var c=[];a.font=b;c[0]=a.measureText("WWWWI").width;a.font="bold "+b;c[1]=a.measureText("WWWWI").width;a.font="lighter "+b;c[2]=a.measureText("WWWWI").width;return c}
     33function fa(a){if(a.fontsize){var b=a.canvas.getContext("2d"),c="300px "+a.fontFamily+", sans",d="300px "+a.fontFamily+", serif",e=ea(b,"300px sans"),f=ea(b,"300px serif"),c=ea(b,c),d=ea(b,d),k=c[1]!=d[1]||c[1]==e[1]||d[1]==f[1],g=c[2]!=d[2]||c[2]==e[2]||d[2]==f[2];c[0]!=d[0]||c[0]==e[0]||d[0]==f[0]||k||g?setTimeout(function(){fa(a)},20):(a.Hb="normal "+a.fontsize+"px "+a.fontFamily,a.ca="bold "+a.fontsize+"px "+a.fontFamily,a.Fb="lighter "+a.fontsize+"px "+a.fontFamily,b.font=a.Hb,e=b.measureText("W").width,
     34b.font=a.ca,f=b.measureText("W").width,b.font=a.Fb,b=b.measureText("W").width,c=Math.max(e,f,b),a.zc=parseInt((c-e)/2,10),a.ic=parseInt((c-f)/2,10),a.vc=parseInt((c-b)/2,10),a.font={},a.font.N=a.fontsize,a.font.L=c,a.debug("Using font-family '"+a.fontFamily+"' ["+c+" x "+a.fontsize+"]"),ga(a))}else new ha(a.zb,function(b){a.font=b;ga(a)},a.options.debug),a.ca&&new ha(a.ca,function(b){a.P=b;ga(a)},a.options.debug)}
     35function ia(a,b){var c=this;if(!(a instanceof HTMLCanvasElement))throw Error("First argument to TTVCanvas constructor must be an HTMLCanvasElement (was "+a+")");c.U=B("#000000 #b21818 #18b218 #b26818 #1818b2 #b218b2 #18b2b2 #b2b2b2".split(" "));c.T=B("#686868 #ff5454 #54ff54 #ffff54 #5454ff #ff54ff #54ffff #ffffff".split(" "));c.zb="qemu-vgafont";c.fontFamily="monospace";c.la=[];c.canvas=a;c.debug=function(a){b.debug?b.debug("canvasview.js: "+a):alert("canvasview.js: "+a)};c.options=b;b.fontsize&&
     36(c.fontsize=b.fontsize);b.Y&&(c.Y=b.Y);b.font&&(c.zb=b.font);b.Ab&&(c.fontFamily=b.Ab);b.P&&(c.ca=b.P);b.Y&&(c.Y=b.Y);b.Q&&(c.Q=b.Q);b.la&&c.la.push(b.la);c.cursor={};c.cursor.x=0;c.cursor.y=0;c.cursor.visible=!0;c.o=new E({debug:c.options.debug,A:c.options.A,width:c.options.width,height:c.options.height,jc:function(a,b,d){ja(c,a,b,d)},cursor:function(a,b,d){a>=c.o.width&&(a=c.o.width-1);ja(c,b,a,a);ja(c,c.cursor.y,c.cursor.x,c.cursor.x);c.cursor.x=a;c.cursor.y=b;c.cursor.visible=d},Bc:function(a){if(c.Q&&
     37((a.title||a.icon)&&c.Q(a),a.border)){var b=a.border[0];0<=b&&8>b?c.Q({border:c.U[b],width:a.border[1]*c.font.L}):10<=b&&18>b?c.Q({border:c.T[b%10],width:a.border[1]*c.font.L}):c.Q({border:null})}}});c.na=new ka(c.o,c.options.debug);c.xa=[];for(var d=0;d<c.o.height;d++)c.xa[d]={min:0,max:c.o.width-1};setTimeout(function(){fa(c)},1);return this}
     38function ga(a){if(!a.fontsize){if(!a.font)return;if(a.ca){if(!a.P)return;if(a.font.L!=a.P.L||a.font.N!=a.P.N)a.debug("Normal font size ["+a.font.L+"x"+a.font.N+"] and bold font size ["+a.P.L+"x"+a.font.N+"] mismatch"),a.P=void 0}}a.Y&&(a.canvas.setAttribute("width",a.o.width*a.font.L),a.canvas.setAttribute("height",a.o.height*a.font.N));la(a);a.la.forEach(function(a){a()})}function ma(a){return{nc:a.o.freeze(),na:a.na.buffer}}ia.prototype.Ea=function(a){this.o.Ea(a.nc);this.na.buffer=a.na};
     39function ja(a,b,c,d){if(b>=a.o.height||0>c||d>=a.o.width)throw Error("makeSpanDirty "+b+" "+a.o.height+" "+c+" "+d+" "+a.o.width);a=a.xa[b];a.min>c&&(a.min=c);a.max<d&&(a.max=d)}
     40function la(a){var b=a.canvas.getContext("2d");b.textBaseline="bottom";b.lineWidth=1;b.beginPath();var c=a.font.L,d=a.font.N,e,f,k;if(a.fontsize)for(g=0;g<a.o.height;g++){h=a.xa[g];for(r=h.min;r<=h.max;r++)s=g*a.o.width+r,(t=a.cursor.x==r&&a.cursor.y==g&&a.cursor.visible)?(u=a.o.p.r.C[s]%10,t=(9<u||a.o.p.r.bold[s]?a.T:a.U)[u]):(q=a.o.p.r.B[s]%10,t=(9<q?a.T:a.U)[q]),f!=t&&(b.fillStyle=f=t),b.fillRect(r*c,g*d,c,d);for(r=h.min;r<=h.max;r++)s=g*a.o.width+r,w=a.o.p.r.bold[s],A=a.o.p.r.text[s],(t=a.cursor.x==
     41r&&a.cursor.y==g&&a.cursor.visible)?(q=a.o.p.r.B[s]%10,u=(9<q?a.T:a.U)[q]):(u=a.o.p.r.C[s]%10,u=(9<u||w?a.T:a.U)[u]),32!=A.charCodeAt(0)&&(f!=u&&(b.fillStyle=f=u),q=a.Hb,t=a.zc,w&&(q=a.ca,t=a.ic),a.o.p.r.K[s]&&(q=a.Fb,t=a.vc),e!=q&&(b.font=e=q),b.fillText(A,r*c+t,(g+1)*d),b.stroke()),a.o.p.r.M[s]&&(u!=k&&(b.stroke(),b.strokeStyle=k=u,b.beginPath()),b.moveTo(r*c,(g+1)*d-1),b.lineTo((r+1)*c,(g+1)*d-1));h.min=a.o.width-1;h.max=0}else for(var g=0;g<a.o.height;g++){for(var h=a.xa[g],r=h.min;r<=h.max;r++){var s=
     42g*a.o.width+r,u=a.o.p.r.C[s]%10,q=a.o.p.r.B[s]%10,w=a.o.p.r.bold[s],A=a.o.p.r.text[s],t=a.cursor.x==r&&a.cursor.y==g&&a.cursor.visible;t?(t=(9<u||w?a.T:a.U)[u],u=(9<q?a.T:a.U)[q]):(u=(9<u||w?a.T:a.U)[u],t=(9<q?a.T:a.U)[q]);w&&a.P?a.P.yb(b,A,r*c,g*d,u,t):a.font.yb(b,A,r*c,g*d,u,t);a.o.p.r.M[s]&&(u!=k&&(b.stroke(),b.strokeStyle=k=u,b.beginPath()),b.moveTo(r*c,(g+1)*d-1),b.lineTo((r+1)*c,(g+1)*d-1))}h.min=a.o.width-1;h.max=0}b.stroke()};
    4343// Input 3
    44 function F(a){if("object"!=typeof a||a===u)return a;var b="undefined"!=typeof a.length?Array(a.length):{},c;for(c in a)b[c]="object"==typeof a[c]?F(a[c]):a[c];return b};
     44function B(a){if("object"!=typeof a||null===a)return a;var b="undefined"!=typeof a.length?Array(a.length):{},c;for(c in a)b[c]="object"==typeof a[c]?B(a[c]):a[c];return b};
    4545// Input 4
    46 function na(a){for(var b=[],c=0;c<a.length;){var d=oa(a,c),e=oa(a,c+4),f=oa(a,c+8);if(0>f)throw Error("The stream seems to be broken [chunk size < 0]");if(0==f&&c+12+f>a.length)break;if(c+12+f>a.length)throw Error("The stream seems to be broken ["+f+";"+(c+12+f)+">"+a.length+"]");for(var i=a.substr(c+12,f),c=c+(f+12),g="",h=0;h<i.length;h++)g+=String.fromCharCode(i.charCodeAt(h)&255);b.push({time:d+e/1E6,Yc:f,data:g})}return b}
     46function na(a){for(var b=[],c=0;c<a.length;){var d=oa(a,c),e=oa(a,c+4),f=oa(a,c+8);if(0>f)throw Error("The stream seems to be broken [chunk size < 0]");if(0==f&&c+12+f>a.length)break;if(c+12+f>a.length)throw Error("The stream seems to be broken ["+f+";"+(c+12+f)+">"+a.length+"]");for(var k=a.substr(c+12,f),c=c+(f+12),g="",h=0;h<k.length;h++)g+=String.fromCharCode(k.charCodeAt(h)&255);b.push({time:d+e/1E6,Wc:f,data:g})}return b}
    4747function oa(a,b){return(a.charCodeAt(b+3)&255)<<24|(a.charCodeAt(b+2)&255)<<16|(a.charCodeAt(b+1)&255)<<8|a.charCodeAt(b)&255};
    4848// Input 5
    49 function ba(a){function b(a){return("0"+a).slice(-2)}var c;if(a.title||""===a.title)c=a.title;else{c=a.name.split("/").reverse()[0];var d=c.substr(-4,4);if(".rec"==d||".tty"==d)c=c.substr(0,c.length-4)}var e=document.createElement("div");e.setAttribute("class","tty");e.setAttribute("style","display:none;");d=document.createElement("table");d.setAttribute("class","tty");d.id="table";var f=document.createElement("tr"),i=document.createElement("td"),g=document.createElement("td"),h=document.createElement("td"),
    50 o=document.createElement("img"),q=document.createElement("img"),s=document.createTextNode(c);f.setAttribute("class","tty");f.id="row1";i.setAttribute("class","tty");g.setAttribute("class","tty");h.setAttribute("class","tty");i.id="cell11";g.id="cell12";h.id="cell13";o.setAttribute("class","tty");o.id="img11";q.setAttribute("class","tty");q.id="img13";a.onclose&&(q.onclick=a.onclose);i.appendChild(o);g.appendChild(s);h.appendChild(q);f.appendChild(i);f.appendChild(g);f.appendChild(h);d.appendChild(f);
    51 f=document.createElement("tr");f.setAttribute("class","tty");f.id="row2";var n=document.createElement("td");n.setAttribute("class","tty");n.id="cell21";var v=document.createElement("canvas");v.setAttribute("class","tty");v.id="canvas";n.setAttribute("colspan","3");v.width=1;v.height=1;n.appendChild(v);f.appendChild(n);d.appendChild(f);g=document.createElement("tr");g.setAttribute("class","tty");g.id="row3";h=document.createElement("td");o=document.createElement("td");q=document.createElement("td");
    52 h.setAttribute("class","tty");o.setAttribute("class","tty");q.setAttribute("class","tty");h.id="cell31";o.id="cell32";q.id="cell33";var z=document.createTextNode("TermTV"),f=document.createElement("span"),r=document.createElement("span"),w=document.createElement("span"),i=document.createElement("span"),E=document.createElement("span"),H=document.createElement("span"),K=document.createElement("span"),y=document.createElement("span"),M=document.createElement("span"),O=document.createElement("progress"),
    53 Q=document.createTextNode("00:00:00"),V=document.createTextNode("00:00:00");w.setAttribute("style","display:none;");H.setAttribute("style","display:none;");f.setAttribute("class","tty");r.setAttribute("class","tty");w.setAttribute("class","tty");i.setAttribute("class","tty");E.setAttribute("class","tty");H.setAttribute("class","tty");K.setAttribute("class","tty");f.id="input321";r.id="input322a";w.id="input322b";i.id="input326";E.id="input327a";H.id="input327b";K.id="input33";K.onclick=function(){var a=
    54 v.toDataURL("image/png"),a=a.replace("image/png","image/octet-stream");document.location.href=a;return x};y.setAttribute("class","tty");M.setAttribute("class","tty");y.id="span323";M.id="span325";O.max=1;O.value=0;y.appendChild(Q);M.appendChild(V);h.appendChild(z);o.appendChild(f);o.appendChild(r);o.appendChild(w);o.appendChild(y);o.appendChild(O);o.appendChild(M);o.appendChild(i);o.appendChild(E);o.appendChild(H);q.appendChild(K);g.appendChild(h);g.appendChild(o);g.appendChild(q);a.controls&&d.appendChild(g);
    55 var g=document.createElement("tr"),h=document.createElement("td"),B=document.createElement("div");h.setAttribute("style","max-width:1px;");h.setAttribute("colspan","3");B.setAttribute("class","tty");B.id="div4";B.onscroll=function(){B.Fc=B.scrollHeight-B.scrollTop!=B.clientHeight};h.appendChild(B);g.appendChild(h);a.debug&&d.appendChild(g);e.appendChild(d);if(a.debug){var Z=parseInt(a.debug,10);a.debugLevel=a.debug;a.debug=function(a){if(a&&!(Z==1&&a.substr(9,3)=="emu")){if(a.substr(9,3)=="par"){var b=
    56 document.createElement("div");b.setAttribute("style","color:green");b.appendChild(document.createTextNode(a));B.appendChild(b)}else{B.appendChild(document.createTextNode(a));B.appendChild(document.createElement("br"))}if(!B.Fc)B.scrollTop=B.scrollHeight}}}else a.debug=A();a.onready=function(a){V.nodeValue=b(a.getUTCHours())+":"+b(a.getUTCMinutes())+":"+b(a.getUTCSeconds());e.style.display="inherit"};a.callback=function(a){if(a.title){var b=c;b.length&&(b=b+": ");a.title&&(b=b+a.title);s.nodeValue=
    57 b}if(a.border){b=(a.width||0)+"px ";n.Mb=n.getAttribute("style");n.setAttribute("style","padding:"+b+b+b+b+"; background-color:"+a.border+";")}a.border==u&&n.Mb&&n.setAttribute("style",n.Mb)};a.onupdate=function(a,c){Q.nodeValue=b(a.getUTCHours())+":"+b(a.getUTCMinutes())+":"+b(a.getUTCSeconds());O.value=c};a.oncompletion=function(){w.setAttribute("style","display:none;");r.setAttribute("style","display:inline;");Q.nodeValue="--:--:--"};a.onbookmark=function(){E.setAttribute("style","display:none;");
    58 H.setAttribute("style","display:inline;")};a.onpause=function(){w.setAttribute("style","display:none;");r.setAttribute("style","display:inline;")};a.onplay=function(){r.setAttribute("style","display:none;");w.setAttribute("style","display:inline;")};e.ia=new G(v,a);f.onclick=function(){e.ia.Xa()};r.onclick=function(){e.ia.Va()};w.onclick=function(){e.ia.Va()};i.onclick=function(){e.ia.Vb()};E.onclick=function(){e.ia.Sa()};H.onclick=function(){e.ia.Sa()};return e}window.TTVDisplay=ba;
     49function da(a){function b(a){return("0"+a).slice(-2)}var c;if(a.title||""===a.title)c=a.title;else{c=a.name.split("/").reverse()[0];var d=c.substr(-4,4);if(".rec"==d||".tty"==d)c=c.substr(0,c.length-4)}var e=document.createElement("div");e.setAttribute("class","tty");e.setAttribute("style","display:none;");d=document.createElement("table");d.setAttribute("class","tty");d.id="table";var f=document.createElement("tr"),k=document.createElement("td"),g=document.createElement("td"),h=document.createElement("td"),
     50r=document.createElement("img"),s=document.createElement("img"),u=document.createTextNode(c);f.setAttribute("class","tty");f.id="row1";k.setAttribute("class","tty");g.setAttribute("class","tty");h.setAttribute("class","tty");k.id="cell11";g.id="cell12";h.id="cell13";r.setAttribute("class","tty");r.id="img11";s.setAttribute("class","tty");s.id="img13";a.onclose&&(s.onclick=a.onclose);k.appendChild(r);g.appendChild(u);h.appendChild(s);f.appendChild(k);f.appendChild(g);f.appendChild(h);d.appendChild(f);
     51f=document.createElement("tr");f.setAttribute("class","tty");f.id="row2";var q=document.createElement("td");q.setAttribute("class","tty");q.id="cell21";var w=document.createElement("canvas");w.setAttribute("class","tty");w.id="canvas";q.setAttribute("colspan","3");w.width=1;w.height=1;q.appendChild(w);f.appendChild(q);d.appendChild(f);g=document.createElement("tr");g.setAttribute("class","tty");g.id="row3";h=document.createElement("td");r=document.createElement("td");s=document.createElement("td");
     52h.setAttribute("class","tty");r.setAttribute("class","tty");s.setAttribute("class","tty");h.id="cell31";r.id="cell32";s.id="cell33";var A=document.createTextNode("TermTV"),f=document.createElement("span"),t=document.createElement("span"),x=document.createElement("span"),k=document.createElement("span"),D=document.createElement("span"),G=document.createElement("span"),I=document.createElement("span"),z=document.createElement("span"),K=document.createElement("span"),M=document.createElement("progress"),
     53O=document.createTextNode("00:00:00"),T=document.createTextNode("00:00:00");x.setAttribute("style","display:none;");G.setAttribute("style","display:none;");f.setAttribute("class","tty");t.setAttribute("class","tty");x.setAttribute("class","tty");k.setAttribute("class","tty");D.setAttribute("class","tty");G.setAttribute("class","tty");I.setAttribute("class","tty");f.id="input321";t.id="input322a";x.id="input322b";k.id="input326";D.id="input327a";G.id="input327b";I.id="input33";I.onclick=function(){var a=
     54w.toDataURL("image/png"),a=a.replace("image/png","image/octet-stream");document.location.href=a;return!1};z.setAttribute("class","tty");K.setAttribute("class","tty");z.id="span323";K.id="span325";M.max=1;M.value=0;z.appendChild(O);K.appendChild(T);h.appendChild(A);r.appendChild(f);r.appendChild(t);r.appendChild(x);r.appendChild(z);r.appendChild(M);r.appendChild(K);r.appendChild(k);r.appendChild(D);r.appendChild(G);s.appendChild(I);g.appendChild(h);g.appendChild(r);g.appendChild(s);a.controls&&d.appendChild(g);
     55var g=document.createElement("tr"),h=document.createElement("td"),C=document.createElement("div");h.setAttribute("style","max-width:1px;");h.setAttribute("colspan","3");C.setAttribute("class","tty");C.id="div4";C.onscroll=function(){C.Dc=C.scrollHeight-C.scrollTop!=C.clientHeight};h.appendChild(C);g.appendChild(h);a.debug&&d.appendChild(g);e.appendChild(d);if(a.debug){var X=parseInt(a.debug,10);a.debugLevel=a.debug;a.debug=function(a){if(a&&(1!=X||"emu"!=a.substr(9,3))){if("par"==a.substr(9,3)){var b=
     56document.createElement("div");b.setAttribute("style","color:green");b.appendChild(document.createTextNode(a));C.appendChild(b)}else C.appendChild(document.createTextNode(a)),C.appendChild(document.createElement("br"));C.Dc||(C.scrollTop=C.scrollHeight)}}}else a.debug=function(){};a.onready=function(a){T.nodeValue=b(a.getUTCHours())+":"+b(a.getUTCMinutes())+":"+b(a.getUTCSeconds());e.style.display="inherit"};a.callback=function(a){if(a.title){var b=c;b.length&&(b+=": ");a.title&&(b+=a.title);u.nodeValue=
     57b}a.border&&(b=(a.width||0)+"px ",q.Jb=q.getAttribute("style"),q.setAttribute("style","padding:"+b+b+b+b+"; background-color:"+a.border+";"));null==a.border&&q.Jb&&q.setAttribute("style",q.Jb)};a.onupdate=function(a,c){O.nodeValue=b(a.getUTCHours())+":"+b(a.getUTCMinutes())+":"+b(a.getUTCSeconds());M.value=c};a.oncompletion=function(){x.setAttribute("style","display:none;");t.setAttribute("style","display:inline;");O.nodeValue="--:--:--"};a.onbookmark=function(){D.setAttribute("style","display:none;");
     58G.setAttribute("style","display:inline;")};a.onpause=function(){x.setAttribute("style","display:none;");t.setAttribute("style","display:inline;")};a.onplay=function(){t.setAttribute("style","display:none;");x.setAttribute("style","display:inline;")};e.ga=new F(w,a);f.onclick=function(){e.ga.Wa()};t.onclick=function(){e.ga.Ua()};x.onclick=function(){e.ga.Ua()};k.onclick=function(){e.ga.Sb()};D.onclick=function(){e.ga.Ra()};G.onclick=function(){e.ga.Ra()};return e}window.TTVDisplay=da;
    5959// Input 6
    60 function ja(a){this.sb=a.mc;this.Wb=a.Dc;this.wb=a.cursor;this.A=a.A;this.debug=function(b){a.debug?a.debug("emulate.js: "+b):alert("emulate.js: "+b)};this.width=a.width||80;this.height=a.height||24;pa(this);return this}
    61 function pa(a){a.p={};a.cursor={};a.cursor.x=0;a.cursor.y=0;a.cursor.bold=x;a.cursor.M=x;a.cursor.K=x;a.cursor.blink=x;a.cursor.ja=x;a.cursor.Gb=x;a.cursor.C=7;a.cursor.B=0;a.cursor.ba=t;a.p.r={};a.p.r.text=[];a.p.r.bold=[];a.p.r.M=[];a.p.r.K=[];a.p.r.blink=[];a.p.r.C=[];a.p.r.B=[];a.p.Ca=x;a.p.xb=F(a.cursor);a.p.fa={};a.p.fa.x=0;a.p.fa.y=0;a.p.qb=t;for(var b=0;b<a.width*a.height;b++)a.p.r.text.push(" "),a.p.r.bold.push(x),a.p.r.M.push(x),a.p.r.K.push(x),a.p.r.blink.push(x),a.p.r.C.push(7),a.p.r.B.push(0);
    62 a.Da=F(a.p);a.mode={};a.mode.oc=t;a.mode.scroll="jump";a.mode.Ca=x;a.mode.oa="screen";a.mode.Sc=t;a.mode.yc=x;a.mode.zc=x;a.mode.vb=1;a.mode.Wc=x;a.mode.Fb=x;a.mode.Vc=0;a.mode.$c=t;a.mode.Ac="cr";a.s={};a.s.top=0;a.s.bottom=a.height-1;a.Ea={};for(b=0;b<a.width;b++)a.Ea[b]=0==b%8;a.qa="";a.ma="";a.H={};a.H.Tc="us";a.H.Uc="line";a.H.T="g0"}ja.prototype.freeze=function(){return F(this)};
    63 ja.prototype.Fa=function(a){this.p=F(a.p);this.Da=F(a.Da);this.mode=F(a.mode);this.cursor=F(a.cursor);this.s=F(a.s);this.Ea=F(a.Ea);this.H=F(a.H);this.qa=a.qa;this.ma=a.ma;for(var b=0;b<this.height;b++)I(this,b,0,this.height-1);J(this,{title:a.qa,icon:a.ma});L(this)};function N(a){return String.fromCharCode(parseInt(a,16))}
    64 ja.prototype.La={cd:{},bd:{"#":N("A3")},Zc:{_:" ","`":N("2666"),a:N("2591"),b:N("2409"),c:N("240C"),d:N("240D"),e:N("240A"),f:N("B0"),g:N("B1"),h:N("2424"),i:N("240B"),j:N("2518"),k:N("2510"),l:N("250C"),m:N("2514"),n:N("253C"),q:N("2500"),t:N("2524"),u:N("251C"),v:N("2534"),w:N("252C"),x:N("2502"),y:N("2264"),z:N("2265"),"{":N("3C0"),"|":N("2260"),"}":N("A3"),"~":N("B7")}};function I(a,b,c,d){a.sb&&a.sb(b,c,d)}function J(a,b){a.Wb&&a.Wb(b)}
    65 function L(a){a.wb&&a.wb(a.cursor.x,a.cursor.y,a.cursor.ba)}function qa(a,b,c,d){!d&&2<a.A&&a.debug("SET_MARGIN="+b+" "+c);b-=1;c-=1;b+1>=c&&(b=c-1);0>b&&(b=0);b>a.height-2&&(b=a.height-2);1>c&&(c=1);c>a.height-1&&(c=a.height-1);b+1>=c&&a.debug("numbers do not obey the laws of arithmetic in setMargins");a.s.top=b;a.s.bottom=c;P(a,1,1)}
    66 function R(a,b,c){2<a.A&&a.debug("CURSOR_STACK="+b+" [+attrib="+c+"]");"push"==b&&(c?a.p.xb=F(a.cursor):(a.p.fa.x=a.cursor.x,a.p.fa.y=a.cursor.y));"pop"==b&&(c?a.cursor=F(a.p.xb):(a.cursor.x=a.p.fa.x,a.cursor.y=a.p.fa.y));L(a)}
    67 function ra(a,b,c){!c&&2<a.A&&a.debug("SET_ATTRIB="+(!b[0]?"0":b));var d,e;if(!b[0]||0==b[0])a.cursor.bold=x,a.cursor.M=x,a.cursor.K=x,a.cursor.blink=x,a.cursor.ja=x,a.cursor.Gb=x,d=7,e=0;else if(30<=b[0]&&37>=b[0])d=b[0]-30;else if(39==b[0])d=7;else if(40<=b[0]&&47>=b[0])e=b[0]-40;else if(49==b[0])e=0;else if(90<=b[0]&&97>=b[0])d=b[0]-90+10;else if(99==b[0])d=7;else if(100<=b[0]&&107>=b[0])e=b[0]-100+10;else if(109==b[0])e=0;else if(1==b[0])a.cursor.bold=t,a.cursor.K=x;else if(2==b[0])a.cursor.K=
    68 t,a.cursor.bold=x;else if(21!=b[0])if(22==b[0])a.cursor.K=x,a.cursor.bold=x;else if(7==b[0]||27==b[0]){if(7==b[0]&&!a.cursor.ja&&(a.cursor.ja=t,d=a.cursor.C,e=a.cursor.B),27==b[0]&&a.cursor.ja)a.cursor.ja=x,e=a.cursor.C,d=a.cursor.B}else 4==b[0]||24==b[0]?a.cursor.M=4==b[0]:5==b[0]||25==b[0]?a.cursor.blink=5==b[0]:8==b[0]||28==b[0]?a.cursor.Gb=8==b:10==b[0]?a.H.T=p:11==b[0]?a.H.T=p:38==b[0]&&5==b[1]?(8>b[2]?d=b[2]:16>b[2]&&(d=b[2]-2),a.debug("Warning: 256-foreground color ("+b[2]+") not supported."),
    69 b=b.slice(2)):48==b[0]&&5==b[1]?(8>b[2]?e=b[2]:16>b[2]&&(e=b[2]-2),a.debug("Warning: 256-background color ("+b[2]+") not supported."),b=b.slice(2)):38==b[0]&&2==b[1]?(a.debug("Warning: 24bit color ("+b.slice(2)+") not supported."),b=b.slice(4)):48==b[0]&&2==b[1]?(a.debug("Warning: 24bit color ("+b.slice(2)+") not supported."),b=b.slice(4)):a.debug("Warning: ignoring setAttribute("+b+")");a.cursor.ja^a.p.Ca&&(c=d,d=e,e=c);d!=p&&(a.cursor.C=d);e!=p&&(a.cursor.B=e);1<b.length&&ra(a,b.slice(1),t)}
    70 function sa(a,b){2<a.A&&a.debug("STRING=["+a.cursor.x+"/"+a.cursor.y+";"+a.cursor.C+";"+a.cursor.B+";"+b+"]["+b.length+"]");for(var c=0;c<b.length;c++){var d=a,e=b[c];2<d.A&&d.debug("CHAR=["+d.cursor.x+"/"+d.cursor.y+";"+d.cursor.C+";"+d.cursor.B+";"+e+"]");d.H.T&&d.H[d.H.T]&&d.La[d.H[d.H.T]]&&d.La[d.H[d.H.T]][e]&&(e=d.La[d.H[d.H.T]][e]);if(d.cursor.x==d.width)if(d.p.qb){var f="screen"==d.mode.oa?d.height:d.s.bottom+1;d.cursor.x=0;d.cursor.y++;d.cursor.y>=f&&(d.cursor.y==f&&d.scroll(1),d.cursor.y=
    71 f-1)}else d.cursor.x--;d.mode.Fb?(ta(d,d.width-1,d.cursor.y),ua(d,e,d.cursor.x,d.cursor.y),I(d,d.cursor.y,d.cursor.x,d.width-1)):(va(d,e,d.cursor.x,d.cursor.y),I(d,d.cursor.y,d.cursor.x,d.cursor.x));d.cursor.x++;L(d)}}
    72 function S(a,b){2<a.A&&a.debug("SPECIAL_CHAR="+b);switch(b){case "carriageReturn":a.cursor.x=0;L(a);break;case "backspace":0<a.cursor.x&&(a.cursor.x--,L(a));break;case "lineFeed":case "formFeed":case "verticalTab":a.cursor.y++;a.cursor.y==a.s.bottom+1&&(a.scroll(1),a.cursor.y=a.s.bottom);a.cursor.y>=a.height&&(a.cursor.y=a.height-1);"crlf"==a.mode.Ac&&(a.cursor.x=0);L(a);break;case "horizontalTab":do a.cursor.x++;while(a.cursor.x<a.width&&!a.Ea[a.cursor.x]);L(a);break;case "bell":J(a,{bell:"bell"});
     60function E(a){this.rb=a.jc;this.Tb=a.Bc;this.vb=a.cursor;this.A=a.A;this.debug=function(b){a.debug?a.debug("emulate.js: "+b):alert("emulate.js: "+b)};this.width=a.width||80;this.height=a.height||24;pa(this);return this}
     61function pa(a){a.p={};a.cursor={};a.cursor.x=0;a.cursor.y=0;a.cursor.bold=!1;a.cursor.M=!1;a.cursor.K=!1;a.cursor.blink=!1;a.cursor.ha=!1;a.cursor.Db=!1;a.cursor.C=7;a.cursor.B=0;a.cursor.visible=!0;a.p.r={};a.p.r.text=[];a.p.r.bold=[];a.p.r.M=[];a.p.r.K=[];a.p.r.blink=[];a.p.r.C=[];a.p.r.B=[];a.p.Ba=!1;a.p.wb=B(a.cursor);a.p.da={};a.p.da.x=0;a.p.da.y=0;a.p.pb=!0;for(var b=0;b<a.width*a.height;b++)a.p.r.text.push(" "),a.p.r.bold.push(!1),a.p.r.M.push(!1),a.p.r.K.push(!1),a.p.r.blink.push(!1),a.p.r.C.push(7),
     62a.p.r.B.push(0);a.Ca=B(a.p);a.mode={};a.mode.lc=!0;a.mode.scroll="jump";a.mode.Ba=!1;a.mode.ma="screen";a.mode.Qc=!0;a.mode.wc=!1;a.mode.xc=!1;a.mode.ub=1;a.mode.Uc=!1;a.mode.Cb=!1;a.mode.Tc=0;a.mode.Yc=!0;a.mode.yc="cr";a.s={};a.s.top=0;a.s.bottom=a.height-1;a.Da={};for(b=0;b<a.width;b++)a.Da[b]=0==b%8;a.pa="";a.ka="";a.H={};a.H.Rc="us";a.H.Sc="line";a.H.S="g0"}E.prototype.freeze=function(){return B(this)};
     63E.prototype.Ea=function(a){this.p=B(a.p);this.Ca=B(a.Ca);this.mode=B(a.mode);this.cursor=B(a.cursor);this.s=B(a.s);this.Da=B(a.Da);this.H=B(a.H);this.pa=a.pa;this.ka=a.ka;for(var b=0;b<this.height;b++)H(this,b,0,this.height-1);J(this,{title:a.pa,icon:a.ka});L(this)};function N(a){return String.fromCharCode(parseInt(a,16))}
     64E.prototype.Ka={ad:{},$c:{"#":N("A3")},Xc:{_:" ","`":N("2666"),a:N("2591"),b:N("2409"),c:N("240C"),d:N("240D"),e:N("240A"),f:N("B0"),g:N("B1"),h:N("2424"),i:N("240B"),j:N("2518"),k:N("2510"),l:N("250C"),m:N("2514"),n:N("253C"),q:N("2500"),t:N("2524"),u:N("251C"),v:N("2534"),w:N("252C"),x:N("2502"),y:N("2264"),z:N("2265"),"{":N("3C0"),"|":N("2260"),"}":N("A3"),"~":N("B7")}};function H(a,b,c,d){a.rb&&a.rb(b,c,d)}function J(a,b){a.Tb&&a.Tb(b)}
     65function L(a){a.vb&&a.vb(a.cursor.x,a.cursor.y,a.cursor.visible)}function qa(a,b,c,d){!d&&2<a.A&&a.debug("SET_MARGIN="+b+" "+c);b-=1;c-=1;b+1>=c&&(b=c-1);0>b&&(b=0);b>a.height-2&&(b=a.height-2);1>c&&(c=1);c>a.height-1&&(c=a.height-1);b+1>=c&&a.debug("numbers do not obey the laws of arithmetic in setMargins");a.s.top=b;a.s.bottom=c;P(a,1,1)}
     66function Q(a,b,c){2<a.A&&a.debug("CURSOR_STACK="+b+" [+attrib="+c+"]");"push"==b&&(c?a.p.wb=B(a.cursor):(a.p.da.x=a.cursor.x,a.p.da.y=a.cursor.y));"pop"==b&&(c?a.cursor=B(a.p.wb):(a.cursor.x=a.p.da.x,a.cursor.y=a.p.da.y));L(a)}
     67function ra(a,b,c){!c&&2<a.A&&a.debug("SET_ATTRIB="+(b[0]?b:"0"));var d,e;b[0]&&0!=b[0]?30<=b[0]&&37>=b[0]?d=b[0]-30:39==b[0]?d=7:40<=b[0]&&47>=b[0]?e=b[0]-40:49==b[0]?e=0:90<=b[0]&&97>=b[0]?d=b[0]-90+10:99==b[0]?d=7:100<=b[0]&&107>=b[0]?e=b[0]-100+10:109==b[0]?e=0:1==b[0]?(a.cursor.bold=!0,a.cursor.K=!1):2==b[0]?(a.cursor.K=!0,a.cursor.bold=!1):21!=b[0]&&(22==b[0]?(a.cursor.K=!1,a.cursor.bold=!1):7==b[0]||27==b[0]?(7!=b[0]||a.cursor.ha||(a.cursor.ha=!0,d=a.cursor.C,e=a.cursor.B),27==b[0]&&a.cursor.ha&&
     68(a.cursor.ha=!1,e=a.cursor.C,d=a.cursor.B)):4==b[0]||24==b[0]?a.cursor.M=4==b[0]:5==b[0]||25==b[0]?a.cursor.blink=5==b[0]:8==b[0]||28==b[0]?a.cursor.Db=8==b:10==b[0]?a.H.S=void 0:11==b[0]?a.H.S=void 0:38==b[0]&&5==b[1]?(8>b[2]?d=b[2]:16>b[2]&&(d=b[2]-2),a.debug("Warning: 256-foreground color ("+b[2]+") not supported."),b=b.slice(2)):48==b[0]&&5==b[1]?(8>b[2]?e=b[2]:16>b[2]&&(e=b[2]-2),a.debug("Warning: 256-background color ("+b[2]+") not supported."),b=b.slice(2)):38==b[0]&&2==b[1]?(a.debug("Warning: 24bit color ("+
     69b.slice(2)+") not supported."),b=b.slice(4)):48==b[0]&&2==b[1]?(a.debug("Warning: 24bit color ("+b.slice(2)+") not supported."),b=b.slice(4)):a.debug("Warning: ignoring setAttribute("+b+")")):(a.cursor.bold=!1,a.cursor.M=!1,a.cursor.K=!1,a.cursor.blink=!1,a.cursor.ha=!1,a.cursor.Db=!1,d=7,e=0);a.cursor.ha^a.p.Ba&&(c=d,d=e,e=c);void 0!=d&&(a.cursor.C=d);void 0!=e&&(a.cursor.B=e);1<b.length&&ra(a,b.slice(1),!0)}
     70function R(a,b){2<a.A&&a.debug("STRING=["+a.cursor.x+"/"+a.cursor.y+";"+a.cursor.C+";"+a.cursor.B+";"+b+"]["+b.length+"]");for(var c=0;c<b.length;c++){var d=a,e=b[c];2<d.A&&d.debug("CHAR=["+d.cursor.x+"/"+d.cursor.y+";"+d.cursor.C+";"+d.cursor.B+";"+e+"]");d.H.S&&d.H[d.H.S]&&d.Ka[d.H[d.H.S]]&&d.Ka[d.H[d.H.S]][e]&&(e=d.Ka[d.H[d.H.S]][e]);if(d.cursor.x==d.width)if(d.p.pb){var f="screen"==d.mode.ma?d.height:d.s.bottom+1;d.cursor.x=0;d.cursor.y++;d.cursor.y>=f&&(d.cursor.y==f&&d.scroll(1),d.cursor.y=
     71f-1)}else d.cursor.x--;d.mode.Cb?(sa(d,d.width-1,d.cursor.y),ta(d,e,d.cursor.x,d.cursor.y),H(d,d.cursor.y,d.cursor.x,d.width-1)):(ua(d,e,d.cursor.x,d.cursor.y),H(d,d.cursor.y,d.cursor.x,d.cursor.x));d.cursor.x++;L(d)}}
     72function S(a,b){2<a.A&&a.debug("SPECIAL_CHAR="+b);switch(b){case "carriageReturn":a.cursor.x=0;L(a);break;case "backspace":0<a.cursor.x&&(a.cursor.x--,L(a));break;case "lineFeed":case "formFeed":case "verticalTab":a.cursor.y++;a.cursor.y==a.s.bottom+1&&(a.scroll(1),a.cursor.y=a.s.bottom);a.cursor.y>=a.height&&(a.cursor.y=a.height-1);"crlf"==a.mode.yc&&(a.cursor.x=0);L(a);break;case "horizontalTab":do a.cursor.x++;while(a.cursor.x<a.width&&!a.Da[a.cursor.x]);L(a);break;case "bell":J(a,{bell:"bell"});
    7373break;default:a.debug("Warning: skipping specialChar event for key "+b)}}
    74 function T(a,b,c){2<a.A&&a.debug("ARROW=["+a.cursor.x+"/"+a.cursor.y+"] + "+b+" "+c);var d="screen"==a.mode.oa?0:a.s.top,e="screen"==a.mode.oa?a.height:a.s.bottom+1;switch(b){case "up":a.cursor.y-=c;a.cursor.y<d&&(a.cursor.y=d);break;case "down":a.cursor.y+=c;a.cursor.y>=e&&(a.cursor.y=e-1);break;case "left":a.cursor.x-=c;0>a.cursor.x&&(a.cursor.x=0);break;case "right":a.cursor.x+=c;a.cursor.x>=a.width&&(a.cursor.x=a.width-1);break;default:a.debug("Can't handle arrow event with direction "+b);return}L(a)}
    75 function wa(a,b){2<a.A&&a.debug("DELETE_CHARS="+b);for(var c=0;c<b;c++){var d=a,e=a.width-1+a.cursor.y*d.width;d.p.r.text.splice(e,0," ");d.p.r.bold.splice(e,0,x);d.p.r.M.splice(e,0,x);d.p.r.K.splice(e,0,x);d.p.r.blink.splice(e,0,x);d.p.r.C.splice(e,0,7);d.p.r.B.splice(e,0,0);ta(a,a.cursor.x,a.cursor.y)}I(a,a.cursor.y,a.cursor.x,a.width-1)}
    76 function U(a,b,c){2<a.A&&a.debug("INDEX="+b);switch(b){case "down":for(b=0;b<c;b++)a.cursor.y==a.s.bottom?a.scroll(1):a.cursor.y++;L(a);break;case "up":for(b=0;b<c;b++)a.cursor.y==a.s.top?a.scroll(-1):a.cursor.y--;L(a);break;case "nextLine":U(a,"down",c);a.cursor.x=0;L(a);break;case "prevLine":U(a,"up",c);a.cursor.x=0;L(a);break;default:a.debug("Can't index with method "+b)}}
    77 function W(a,b,c){2<a.A&&a.debug("MODE="+b+" ["+c+"]");switch(b){case "insert":a.mode.Fb=c;break;case "cursorKeyANSI":a.mode.oc=c;break;case "keypad":a.mode.Xc=c;break;case "mouseTrackingUp":a.mode.zc=c;break;case "mouseTrackingDown":a.mode.yc=c;break;case "scroll":a.mode.scroll=c;break;case "autoWrap":a.p.qb=c;break;case "cursor":a.cursor.ba=c;L(a);break;case "cursorBlink":a.cursor.blink=c;break;case "width":a.debug("width="+c);break;case "height":a.debug("height="+c);break;case "currentScreen":if(c!=
    78 a.mode.vb){a.debug("Exchange screens");b=a.p;a.p=a.Da;a.Da=b;a.mode.vb=c;for(c=0;c<a.height;c++)I(a,c,0,a.width-1)}break;case "originMode":a.mode.oa=c;P(a,1,1);break;case "reverseScreen":if(c!=a.p.Ca){a.debug("Reverse screen");a.p.Ca=c;c=a.p.r.C;a.p.r.C=a.p.r.B;a.p.r.B=c;c=a.cursor.C;a.cursor.C=a.cursor.B;a.cursor.B=c;for(c=0;c<a.height;c++)I(a,c,0,a.width-1)}break;case "borderColor":J(a,{border:c});a.debug("Setting border to [col="+c[0]+"; width="+c[1]+"]");break;default:a.debug("Warning: can't handle mode change '"+
    79 b+"' to '"+c+"'")}}function X(a,b){2<a.A&&a.debug("ERASE_IN_LINE="+b);var c,d;switch(b){case "toEnd":c=a.cursor.x;d=a.width;break;case "toStart":c=0;d=a.cursor.x+1;break;case "whole":c=0;d=a.width;break;default:a.debug("Can't eraseInLine with method '"+b+"'");return}for(var e=c;e<d;e++)va(a," ",e,a.cursor.y);I(a,a.cursor.y,c,d-1)}
    80 function xa(a,b){2<a.A&&a.debug("ERASE_IN_DISPLAY="+b);var c,d;switch(b){case "toEnd":X(a,"toEnd");c=a.cursor.y+1;d=a.height;break;case "toStart":X(a,"toStart");c=0;d=a.cursor.y;break;case "whole":c=0;d=a.height;break;default:a.debug("Can't eraseInDisplay with method '"+b+"'");return}for(var e=c;e<d;e++)for(var f=0;f<a.width;f++)va(a," ",f,e);for(e=c;e<d;e++)I(a,e,0,a.width-1)}
    81 function P(a,b,c){2<a.A&&a.debug("GOTO="+b+","+c);var b=b-1,d=c-1;0>b&&(b=0);b>a.width&&(b=a.width);0>d&&(d=0);"screen"==a.mode.oa?d>=a.height&&(d=a.height-1):(d+=a.s.top,d>a.s.bottom&&(d=a.s.bottom));a.cursor.x=b;0<=c&&(a.cursor.y=d);L(a)}function ta(a,b,c){b+=c*a.width;a.p.r.text.splice(b,1);a.p.r.bold.splice(b,1);a.p.r.M.splice(b,1);a.p.r.K.splice(b,1);a.p.r.blink.splice(b,1);a.p.r.C.splice(b,1);a.p.r.B.splice(b,1)}
    82 function ua(a,b,c,d){c+=d*a.width;a.p.r.text.splice(c,0,b);a.p.r.bold.splice(c,0,a.cursor.bold);a.p.r.M.splice(c,0,a.cursor.M);a.p.r.K.splice(c,0,a.cursor.K);a.p.r.blink.splice(c,0,a.cursor.blink);a.p.r.C.splice(c,0,a.cursor.C);a.p.r.B.splice(c,0,a.cursor.B)}
    83 function va(a,b,c,d){c+=d*a.width;a.p.r.text.splice(c,1,b);a.p.r.bold.splice(c,1,a.cursor.bold);a.p.r.M.splice(c,1,a.cursor.M);a.p.r.K.splice(c,1,a.cursor.K);a.p.r.blink.splice(c,1,a.cursor.blink);a.p.r.C.splice(c,1,a.cursor.C);a.p.r.B.splice(c,1,a.cursor.B)}function ya(a,b,c){b+=c*a.width;a.p.r.text[b]=" ";a.p.r.bold[b]=x;a.p.r.M[b]=x;a.p.r.K[b]=x;a.p.r.blink[b]=x;a.p.r.C[b]=7;a.p.r.B[b]=0}
    84 function za(a,b,c){for(var d=0;d<a.width;d++){var e=a,f=d+b*a.width,i=d+c*a.width;e.p.r.text.splice(i,1,e.p.r.text[f]);e.p.r.bold.splice(i,1,e.p.r.bold[f]);e.p.r.M.splice(i,1,e.p.r.M[f]);e.p.r.K.splice(i,1,e.p.r.K[f]);e.p.r.blink.splice(i,1,e.p.r.blink[f]);e.p.r.C.splice(i,1,e.p.r.C[f]);e.p.r.B.splice(i,1,e.p.r.B[f])}}
    85 ja.prototype.scroll=function(a){2<this.A&&this.debug("SCROLL="+a);if(!(0==a||isNaN(a))){if(0<a)for(var b=0;b<a;b++)for(var c=0;c<this.width;c++)ua(this," ",0,this.s.bottom+1),ta(this,0,this.s.top);else for(b=a;0<b;b--)for(c=0;c<this.width;c++)ta(this,0,this.s.bottom),ua(this," ",0,this.s.top);for(a=this.s.top;a<=this.s.bottom;a++)I(this,a,0,this.width-1)}};function Y(a,b,c){a.debug("Warning: Event '"+b+"' not implemented: "+c)}function Aa(a,b){Y(a,"lineAttr",b)};
     74function U(a,b,c){2<a.A&&a.debug("ARROW=["+a.cursor.x+"/"+a.cursor.y+"] + "+b+" "+c);var d="screen"==a.mode.ma?0:a.s.top,e="screen"==a.mode.ma?a.height:a.s.bottom+1;switch(b){case "up":a.cursor.y-=c;a.cursor.y<d&&(a.cursor.y=d);break;case "down":a.cursor.y+=c;a.cursor.y>=e&&(a.cursor.y=e-1);break;case "left":a.cursor.x-=c;0>a.cursor.x&&(a.cursor.x=0);break;case "right":a.cursor.x+=c;a.cursor.x>=a.width&&(a.cursor.x=a.width-1);break;default:a.debug("Can't handle arrow event with direction "+b);return}L(a)}
     75function va(a,b){2<a.A&&a.debug("DELETE_CHARS="+b);for(var c=0;c<b;c++){var d=a,e=a.width-1+a.cursor.y*d.width;d.p.r.text.splice(e,0," ");d.p.r.bold.splice(e,0,!1);d.p.r.M.splice(e,0,!1);d.p.r.K.splice(e,0,!1);d.p.r.blink.splice(e,0,!1);d.p.r.C.splice(e,0,7);d.p.r.B.splice(e,0,0);sa(a,a.cursor.x,a.cursor.y)}H(a,a.cursor.y,a.cursor.x,a.width-1)}
     76function V(a,b,c){2<a.A&&a.debug("INDEX="+b);switch(b){case "down":for(b=0;b<c;b++)a.cursor.y==a.s.bottom?a.scroll(1):a.cursor.y++;L(a);break;case "up":for(b=0;b<c;b++)a.cursor.y==a.s.top?a.scroll(-1):a.cursor.y--;L(a);break;case "nextLine":V(a,"down",c);a.cursor.x=0;L(a);break;case "prevLine":V(a,"up",c);a.cursor.x=0;L(a);break;default:a.debug("Can't index with method "+b)}}
     77function W(a,b,c){2<a.A&&a.debug("MODE="+b+" ["+c+"]");switch(b){case "insert":a.mode.Cb=c;break;case "cursorKeyANSI":a.mode.lc=c;break;case "keypad":a.mode.Vc=c;break;case "mouseTrackingUp":a.mode.xc=c;break;case "mouseTrackingDown":a.mode.wc=c;break;case "scroll":a.mode.scroll=c;break;case "autoWrap":a.p.pb=c;break;case "cursor":a.cursor.visible=c;L(a);break;case "cursorBlink":a.cursor.blink=c;break;case "width":a.debug("width="+c);break;case "height":a.debug("height="+c);break;case "currentScreen":if(c!=
     78a.mode.ub)for(a.debug("Exchange screens"),b=a.p,a.p=a.Ca,a.Ca=b,a.mode.ub=c,c=0;c<a.height;c++)H(a,c,0,a.width-1);break;case "originMode":a.mode.ma=c;P(a,1,1);break;case "reverseScreen":if(c!=a.p.Ba)for(a.debug("Reverse screen"),a.p.Ba=c,c=a.p.r.C,a.p.r.C=a.p.r.B,a.p.r.B=c,c=a.cursor.C,a.cursor.C=a.cursor.B,a.cursor.B=c,c=0;c<a.height;c++)H(a,c,0,a.width-1);break;case "borderColor":J(a,{border:c});a.debug("Setting border to [col="+c[0]+"; width="+c[1]+"]");break;default:a.debug("Warning: can't handle mode change '"+
     79b+"' to '"+c+"'")}}function Y(a,b){2<a.A&&a.debug("ERASE_IN_LINE="+b);var c,d;switch(b){case "toEnd":c=a.cursor.x;d=a.width;break;case "toStart":c=0;d=a.cursor.x+1;break;case "whole":c=0;d=a.width;break;default:a.debug("Can't eraseInLine with method '"+b+"'");return}for(var e=c;e<d;e++)ua(a," ",e,a.cursor.y);H(a,a.cursor.y,c,d-1)}
     80function wa(a,b){2<a.A&&a.debug("ERASE_IN_DISPLAY="+b);var c,d;switch(b){case "toEnd":Y(a,"toEnd");c=a.cursor.y+1;d=a.height;break;case "toStart":Y(a,"toStart");c=0;d=a.cursor.y;break;case "whole":c=0;d=a.height;break;default:a.debug("Can't eraseInDisplay with method '"+b+"'");return}for(var e=c;e<d;e++)for(var f=0;f<a.width;f++)ua(a," ",f,e);for(e=c;e<d;e++)H(a,e,0,a.width-1)}
     81function P(a,b,c){2<a.A&&a.debug("GOTO="+b+","+c);b-=1;var d=c-1;0>b&&(b=0);b>a.width&&(b=a.width);0>d&&(d=0);"screen"==a.mode.ma?d>=a.height&&(d=a.height-1):(d+=a.s.top,d>a.s.bottom&&(d=a.s.bottom));a.cursor.x=b;0<=c&&(a.cursor.y=d);L(a)}function sa(a,b,c){b+=c*a.width;a.p.r.text.splice(b,1);a.p.r.bold.splice(b,1);a.p.r.M.splice(b,1);a.p.r.K.splice(b,1);a.p.r.blink.splice(b,1);a.p.r.C.splice(b,1);a.p.r.B.splice(b,1)}
     82function ta(a,b,c,d){c+=d*a.width;a.p.r.text.splice(c,0,b);a.p.r.bold.splice(c,0,a.cursor.bold);a.p.r.M.splice(c,0,a.cursor.M);a.p.r.K.splice(c,0,a.cursor.K);a.p.r.blink.splice(c,0,a.cursor.blink);a.p.r.C.splice(c,0,a.cursor.C);a.p.r.B.splice(c,0,a.cursor.B)}
     83function ua(a,b,c,d){c+=d*a.width;a.p.r.text.splice(c,1,b);a.p.r.bold.splice(c,1,a.cursor.bold);a.p.r.M.splice(c,1,a.cursor.M);a.p.r.K.splice(c,1,a.cursor.K);a.p.r.blink.splice(c,1,a.cursor.blink);a.p.r.C.splice(c,1,a.cursor.C);a.p.r.B.splice(c,1,a.cursor.B)}function xa(a,b,c){b+=c*a.width;a.p.r.text[b]=" ";a.p.r.bold[b]=!1;a.p.r.M[b]=!1;a.p.r.K[b]=!1;a.p.r.blink[b]=!1;a.p.r.C[b]=7;a.p.r.B[b]=0}
     84function ya(a,b,c){for(var d=0;d<a.width;d++){var e=a,f=d+b*a.width,k=d+c*a.width;e.p.r.text.splice(k,1,e.p.r.text[f]);e.p.r.bold.splice(k,1,e.p.r.bold[f]);e.p.r.M.splice(k,1,e.p.r.M[f]);e.p.r.K.splice(k,1,e.p.r.K[f]);e.p.r.blink.splice(k,1,e.p.r.blink[f]);e.p.r.C.splice(k,1,e.p.r.C[f]);e.p.r.B.splice(k,1,e.p.r.B[f])}}
     85E.prototype.scroll=function(a){2<this.A&&this.debug("SCROLL="+a);if(0!=a&&!isNaN(a)){if(0<a)for(var b=0;b<a;b++)for(var c=0;c<this.width;c++)ta(this," ",0,this.s.bottom+1),sa(this,0,this.s.top);else for(b=a;0<b;b--)for(c=0;c<this.width;c++)sa(this,0,this.s.bottom),ta(this," ",0,this.s.top);for(a=this.s.top;a<=this.s.bottom;a++)H(this,a,0,this.width-1)}};function Z(a,b,c){a.debug("Warning: Event '"+b+"' not implemented: "+c)}function za(a,b){Z(a,"lineAttr",b)};
    8686// Input 7
    87 var Ba={},$={},Ca="./fonts/";
    88 function ha(a,b,c){var d=this;if(Ba[a])b(Ba[a],u);else if($[a])$[a].xa.push(b);else{d.debug=function(a){c("font.js: "+a)};var e=$[a]={R:new Image,xa:[b]};e.R.onload=function(){e.vc=t;e.Jb&&g(a)};var f=Ca+a;e.R.onerror=function(){alert("ERROR[1] - Loading image '"+f+".png' failed.");e.xa.forEach(function(a){a(u,"Couldn't load stats file")});delete $[a]};e.R.src=f+".png";var i=new XMLHttpRequest;i.open("GET",f+".txt",t);i.onload=function(){200!=i.status?(alert("ERROR[0] - HTTP request '"+f+".txt': "+
    89 i.statusText+" ["+i.status+"]"),e.xa.forEach(function(a){a(u,"Couldn't load stats file")}),delete $[a]):(e.Jb=i.responseText,e.vc&&g(a))};i.send(u);var g=function(a){var b=$[a],c=new h(a,b.R,b.Jb);Ba[a]=c;delete $[a];d.debug(a+" ["+c.L+"x"+c.N+"] loaded.");b.xa.forEach(function(a){a(c,u)})},h=function(a,b,c){Ba[a]=this;this.R=b;var e=this.Ma={};this.Oa={};var f=0,g=0,h=0,i=0,E=0;c.split("\n").forEach(function(a){if(a.length)if(/^\d+$/.exec(a))e[a]=[f++,g],E=parseInt(a,10),h++;else if(/^y$/.exec(a))f>
    90 i&&(i=f),f=0,g++;else{var b=/^r(\d+)$/.exec(a);if(b){a=parseInt(b[1],10);for(b=E+1;b<=E+a;b++)e[b]=[f++,g];h+=a;E+=a}else d.debug('Stats file is corrupt, line="'+a+'"')}});f>i&&(i=f);this.nc=h;this.N=this.R.naturalHeight/(g+1);this.L=this.R.naturalWidth/i;this.L!=Math.floor(this.L)&&d.debug("font loading of "+a+" failed: image width is not a multiple of the character count (image width = "+this.R.naturalWidth+", character count = "+this.nc+")")};h.prototype.zb=function(a,b,c,e,f,g){var h=this.Ma[b.charCodeAt(0)];
    91 if(h===p&&(h=this.Ma[0],h===p&&(h=this.Ma[63],h===p))){d.debug("Can't draw '"+b+"', it is not mapped and neither is the missing character");return}b=f.substr(1)+g.substr(1)+h[1];this.Oa[b]||(this.Oa[b]=this.tc(f,g,h[1]));a.drawImage(this.Oa[b],h[0]*this.L,0,this.L,this.N,c,e,this.L,this.N)};h.prototype.tc=function(a,b,c){var d=this.R.naturalWidth,e=this.N,f=c*this.N,c=document.createElement("canvas");c.width=d;c.height=e;var g=c.getContext("2d");g.drawImage(this.R,0,f,d,e,0,0,d,e);for(var f=g.getImageData(0,
    92 0,d,e),h=g.createImageData(d,e),d=4*d*e,e=0;e<d;e+=4){var i=127<f.data[e]?b:a;h.data[e]=parseInt(i.substring(1,3),16);h.data[e+1]=parseInt(i.substring(3,5),16);h.data[e+2]=parseInt(i.substring(5,7),16);h.data[e+3]=255}g.putImageData(h,0,0);return c}}};
     87var Aa={},$={},Ba="./fonts/";
     88function ha(a,b,c){var d=this;if(Aa[a])b(Aa[a],null);else if($[a])$[a].wa.push(b);else{d.debug=function(a){c("font.js: "+a)};var e=$[a]={R:new Image,wa:[b]};e.R.onload=function(){e.tc=!0;e.Gb&&g(a)};var f=Ba+a;e.R.onerror=function(){alert("ERROR[1] - Loading image '"+f+".png' failed.");e.wa.forEach(function(a){a(null,"Couldn't load stats file")});delete $[a]};e.R.src=f+".png";var k=new XMLHttpRequest;k.open("GET",f+".txt",!0);k.onload=function(){200!=k.status?(alert("ERROR[0] - HTTP request '"+f+
     89".txt': "+k.statusText+" ["+k.status+"]"),e.wa.forEach(function(a){a(null,"Couldn't load stats file")}),delete $[a]):(e.Gb=k.responseText,e.tc&&g(a))};k.send(null);var g=function(a){var b=$[a],c=new h(a,b.R,b.Gb);Aa[a]=c;delete $[a];d.debug(a+" ["+c.L+"x"+c.N+"] loaded.");b.wa.forEach(function(a){a(c,null)})},h=function(a,b,c){Aa[a]=this;this.R=b;var e=this.La={};this.Na={};var f=0,g=0,h=0,k=0,D=0;c.split("\n").forEach(function(a){if(a.length)if(/^\d+$/.exec(a))e[a]=[f++,g],D=parseInt(a,10),h++;else if(/^y$/.exec(a))f>
     90k&&(k=f),f=0,g++;else{var b=/^r(\d+)$/.exec(a);if(b){a=parseInt(b[1],10);for(b=D+1;b<=D+a;b++)e[b]=[f++,g];h+=a;D+=a}else d.debug('Stats file is corrupt, line="'+a+'"')}});f>k&&(k=f);this.kc=h;this.N=this.R.naturalHeight/(g+1);this.L=this.R.naturalWidth/k;this.L!=Math.floor(this.L)&&d.debug("font loading of "+a+" failed: image width is not a multiple of the character count (image width = "+this.R.naturalWidth+", character count = "+this.kc+")")};h.prototype.yb=function(a,b,c,e,f,g){var h=this.La[b.charCodeAt(0)];
     91if(void 0===h&&(h=this.La[0],void 0===h&&(h=this.La[63],void 0===h))){d.debug("Can't draw '"+b+"', it is not mapped and neither is the missing character");return}b=f.substr(1)+g.substr(1)+h[1];this.Na[b]||(this.Na[b]=this.rc(f,g,h[1]));a.drawImage(this.Na[b],h[0]*this.L,0,this.L,this.N,c,e,this.L,this.N)};h.prototype.rc=function(a,b,c){var d=this.R.naturalWidth,e=this.N,f=c*this.N;c=document.createElement("canvas");c.width=d;c.height=e;var g=c.getContext("2d");g.drawImage(this.R,0,f,d,e,0,0,d,e);
     92for(var f=g.getImageData(0,0,d,e),h=g.createImageData(d,e),d=d*e*4,e=0;e<d;e+=4){var k=127<f.data[e]?b:a;h.data[e]=parseInt(k.substring(1,3),16);h.data[e+1]=parseInt(k.substring(3,5),16);h.data[e+2]=parseInt(k.substring(5,7),16);h.data[e+3]=255}g.putImageData(h,0,0);return c}}};
    9393// Input 8
    94 function aa(a){function b(){c.style.opacity=parseFloat(c.style.opacity)+0.03;if(0.79<c.style.opacity){var d=new ba(a);i.appendChild(d)}else setTimeout(b,1)}var c=document.createElement("span");c.setAttribute("style","position:fixed;top:0px;left:0px;width:100%;height:100%;opacity:0;background-color:black;");var d=document.getElementsByTagName("body")[0];d.appendChild(c);var e=document.createElement("table");e.setAttribute("style","position:fixed;top:0px;left:0px;width:100%;height:100%");var f=document.createElement("tr"),
    95 i=document.createElement("td");i.align="center";a.onclose=function(){d.removeChild(e);d.removeChild(c)};d.appendChild(e);e.appendChild(f);f.appendChild(i);b()}window.TTVOverlay=aa;
     94function aa(a){function b(){c.style.opacity=parseFloat(c.style.opacity)+0.03;if(0.79<c.style.opacity){var d=new da(a);k.appendChild(d)}else setTimeout(b,1)}var c=document.createElement("span");c.setAttribute("style","position:fixed;top:0px;left:0px;width:100%;height:100%;opacity:0;background-color:black;");var d=document.getElementsByTagName("body")[0];d.appendChild(c);var e=document.createElement("table");e.setAttribute("style","position:fixed;top:0px;left:0px;width:100%;height:100%");var f=document.createElement("tr"),
     95k=document.createElement("td");k.align="center";a.onclose=function(){d.removeChild(e);d.removeChild(c)};d.appendChild(e);e.appendChild(f);f.appendChild(k);b()}window.TTVOverlay=aa;
    9696// Input 9
    97 function la(a,b){this.debug=function(a){b?b("parse.js: "+a):alert("parse.js: "+a)};this.o=a;this.buffer="";return this}la.prototype.parse=function(a){for(this.buffer+=a;Da(this););};
    98 function Da(a){for(var b=0;b<a.Ra.length;b++){var c=a.Ra[b][0].exec(a.buffer);if(c&&0!=c[0].length)return a.Ra[b][1].call(a,c),a.buffer=a.buffer.substr(c[0].length),t}50<a.buffer.length&&"\u001b"==a.buffer[0]&&(a.debug("Unknown escape sequence: "+a.buffer[1].charCodeAt(0).toString(16)+" "+a.buffer[2].charCodeAt(0).toString(16)+" "+a.buffer[3].charCodeAt(0).toString(16)+" "+a.buffer[4].charCodeAt(0).toString(16)+" "+a.buffer[5].charCodeAt(0).toString(16)+" "+a.buffer[6].charCodeAt(0).toString(16)+
    99 " "+a.buffer[7].charCodeAt(0).toString(16)+" "+a.buffer[8].charCodeAt(0).toString(16)+" "+a.buffer[9].charCodeAt(0).toString(16)+" ["+a.buffer+"]"),sa(a.o,"\x00"),a.buffer=a.buffer.substr(1));return x}
    100 la.prototype.Ra=[[/^[\x20-\x7F]+/,function(a){sa(this.o,a[0])}],[/^[\xC2-\xDF][\x80-\xBF]/,function(a){sa(this.o,String.fromCharCode((a[0].charCodeAt(0)&31)<<6|a[0].charCodeAt(1)&63))}],[/^\033\[([0-9;]*)m/,function(a){ra(this.o,a[1].split(";"))}],[/^[\xE0-\xEF][\x80-\xBF][\x80-\xBF]/,function(a){sa(this.o,String.fromCharCode((a[0].charCodeAt(0)&15)<<12|(a[0].charCodeAt(1)&63)<<6|a[0].charCodeAt(2)&63))}],[/^[\xF0-\xF4][\x80-\xBF][\x80-\xBF][\x80-\xBF]/,function(a){sa(this.o,String.fromCharCode((a[0].charCodeAt(0)&
    101 7)<<18|(a[0].charCodeAt(1)&63)<<12|(a[0].charCodeAt(2)&63)<<6|a[0].charCodeAt(3)&63))}],[/^([\x80-\xFF])/,function(a){sa(this.o,a[0])}],[/^\007/,function(){S(this.o,"bell")}],[/^\010/,function(){S(this.o,"backspace")}],[/^\011/,function(){S(this.o,"horizontalTab")}],[/^\012/,function(){S(this.o,"lineFeed")}],[/^\013/,function(){S(this.o,"verticalTab")}],[/^\014/,function(){S(this.o,"formFeed")}],[/^\015/,function(){S(this.o,"carriageReturn")}],[/^\016/,function(){this.o.H.T=p}],[/^\017/,function(){this.o.H.T=
    102 p}],[/^\033F/,A()],[/^\033G/,A()],[/^\033\[[Hf]/,function(){P(this.o,1,1)}],[/^\033\[([0-9]*)G/,function(a){P(this.o,parseInt(a[1]||"1",10),-1)}],[/^\033\[([0-9]*);([0-9]*)[Hf]/,function(a){P(this.o,parseInt(a[2]||"1",10),parseInt(a[1]||"1",10))}],[/^\033\[([0-9]*)d/,function(a){P(this.o,1,parseInt(a[1]||"1",10))}],[/^[\000-\006]/,A()],[/^[\020-\032]/,A()],[/^[\034-\037]/,A()],[/^\033\[0?K/,function(){X(this.o,"toEnd")}],[/^\033\[1K/,function(){X(this.o,"toStart")}],[/^\033\[2K/,function(){X(this.o,
    103 "whole")}],[/^\033K/,function(){X(this.o,"toEnd")}],[/^\033\[0?J/,function(){xa(this.o,"toEnd")}],[/^\033\[1J/,function(){xa(this.o,"toStart")}],[/^\033\[2J/,function(){xa(this.o,"whole")}],[/^\033J/,function(){xa(this.o,"toEnd")}],[/^\033\[([0-9]*)P/,function(a){wa(this.o,parseInt(a[1]||"1",10))}],[/^\033\[([0-9]*)X/,function(a){wa(this.o,parseInt(a[1]||"1",10))}],[/^\033\[([0-9]*)L/,function(a){var b=this.o,a=parseInt(a[1]||"1",10);2<b.A&&b.debug("INSERT_LINES="+a);if(!(b.cursor.y>b.s.bottom||b.cursor.y<
    104 b.s.top)){for(var c=0;c<a;c++){for(var d=b.s.bottom;d>b.cursor.y;d--)za(b,d-1,d);for(d=0;d<b.width;d++)ya(b,d,b.cursor.y)}for(d=b.cursor.y;d<=b.s.bottom;d++)I(b,d,0,b.width-1)}}],[/^\033\[([0-9]*)M/,function(a){var b=this.o,a=parseInt(a[1]||"1",10);2<b.A&&b.debug("DELETE_LINES="+a);if(!(b.cursor.y>b.s.bottom||b.cursor.y<b.s.top)){for(var c=0;c<a;c++){for(var d=b.cursor.y;d<b.s.bottom;d++)za(b,d+1,d);for(d=0;d<b.width;d++)ya(b,d,b.s.bottom)}for(d=b.cursor.y;d<=b.s.bottom;d++)I(b,d,0,b.width-1)}}],
    105 [/^\033\[([0-9])*@/,function(a){var b=this.o,a=parseInt(a[1]||"1",10);2<b.A&&b.debug("INSERT_CHARS="+a);for(var c=0;c<a;c++)ta(b,b.width-1,b.cursor.y),ua(b," ",b.cursor.x,b.cursor.y);I(b,b.cursor.y,b.cursor.x,b.width-1)}],[/^\033\[([0-9]+);([0-9]+)r/,function(a){qa(this.o,parseInt(a[1],10),parseInt(a[2],10))}],[/^\033\[r/,function(){var a=this.o;2<a.A&&a.debug("RESET_MARGIN=1 "+a.height);qa(a,1,a.height,t)}],[/^\033\[\[([0-9;]*)m/,A()],[/^\033\[([0-9]*)A/,function(a){T(this.o,"up",parseInt(a[1]||
    106 "1",10))}],[/^\033\[([0-9]*)B/,function(a){T(this.o,"down",parseInt(a[1]||"1",10))}],[/^\033\[([0-9]*)C/,function(a){T(this.o,"right",parseInt(a[1]||"1",10))}],[/^\033\[([0-9]*)D/,function(a){T(this.o,"left",parseInt(a[1]||"1",10))}],[/^\033\[([0-9]*)E/,function(a){U(this.o,"nextLine",parseInt(a[1]||"1",10))}],[/^\033\[([0-9]*)F/,function(a){U(this.o,"prevLine",parseInt(a[1]||"1",10))}],[/^\033A([\x20-\x7F]?)/,function(a){T(this.o,"up",a[1]?a[1].charCodeAt(0)-32+1:1)}],[/^\033B([\x20-\x7F]?)/,function(a){T(this.o,
    107 "down",a[1]?a[1].charCodeAt(0)-32+1:1)}],[/^\033C([\x20-\x7F]?)/,function(a){T(this.o,"right",a[1]?a[1].charCodeAt(0)-32+1:1)}],[/^\033D/,function(){T(this.o,"left",1)}],[/^\033Y(..)/,function(a){P(this.o,a[1].charCodeAt(1)-32+1,a[1].charCodeAt(0)-32+1)}],[/^\033D/,function(){U(this.o,"down",1)}],[/^\033M/,function(){U(this.o,"up",1)}],[/^\033E/,function(){U(this.o,"nextLine",1)}],[/^\033[7]/,function(){R(this.o,"push",t)}],[/^\033[8]/,function(){R(this.o,"pop",t)}],[/^\033\[s/,function(){R(this.o,
    108 "push",x)}],[/^\033\[u/,function(){R(this.o,"pop",x)}],[/^\033=/,function(){W(this.o,"keypad","cursor")}],[/^\033>/,function(){W(this.o,"keypad","numeric")}],[/^\033\[(\??)([0-9;]+)h/,function(a){var b=this;a[2].split(";").forEach(function(c){c=a[1]+c;switch(c){case "?1":W(b.o,"cursorKeyANSI",x);break;case "?3":W(b.o,"width",132);break;case "?4":W(b.o,"scroll","smooth");break;case "?5":W(b.o,"reverseScreen",t);break;case "?6":W(b.o,"originMode","margin");break;case "?7":W(b.o,"autoWrap",t);break;
    109 case "?8":W(b.o,"autoRepeat",t);break;case "?9":W(b.o,"mouseTrackingDown",t);break;case "?12":W(b.o,"cursorBlink",t);break;case "?25":W(b.o,"cursor",t);break;case "?47":W(b.o,"currentScreen",0);break;case "?69":break;case "?1000":W(b.o,"mouseTrackingUp",t);break;case "?1034":W(b.o,"metaKey",t);break;case "?1047":W(b.o,"currentScreen",0);break;case "?1048":R(b.o,"push",t);break;case "?1049":R(b.o,"push",t);W(b.o,"currentScreen",0);X(b.o,"whole");break;case "2":W(b.o,"keyboardLocked",t);break;case "4":W(b.o,
    110 "insert",t);break;case "12":W(b.o,"localEcho",x);break;case "20":W(b.o,"newLineMode","crlf");break;default:b.debug('Unhandled set mode: "'+c+'"')}})}],[/^\033\[(\??)([0-9;]+)l/,function(a){var b=this;a[2].split(";").forEach(function(c){c=a[1]+c;switch(c){case "?1":W(b.o,"cursorKeyANSI",t);break;case "?2":W(b.o,"vt52",t);break;case "?3":W(b.o,"width",80);break;case "?4":W(b.o,"scroll","jump");break;case "?5":W(b.o,"reverseScreen",x);break;case "?6":W(b.o,"originMode","screen");break;case "?7":W(b.o,
    111 "autoWrap",x);break;case "?8":W(b.o,"autoRepeat",x);break;case "?9":W(b.o,"mouseTrackingDown",x);break;case "?12":W(b.o,"cursorBlink",x);break;case "?25":W(b.o,"cursor",x);break;case "?47":W(b.o,"currentScreen",1);break;case "?69":break;case "?1000":W(b.o,"mouseTrackingUp",x);break;case "?1034":W(b.o,"metaKey",x);break;case "?1047":X(b.o,"whole");W(b.o,"currentScreen",1);break;case "?1048":R(b.o,"pop",t);break;case "?1049":W(b.o,"currentScreen",1);R(b.o,"pop",t);break;case "2":W(b.o,"keyboardLocked",
    112 x);break;case "4":W(b.o,"insert",x);break;case "12":W(b.o,"localEcho",t);break;case "20":W(b.o,"newLineMode","cr");break;default:b.debug('Unhandled reset mode: "'+c+'"')}})}],[/^\033\[\?([0-9;]*)c/,function(a){this.debug("cursor layout"+a[1])}],[/^\033H/,function(){P(this.o,1,1)}],[/^\033\[0?g/,function(){Y(this.o,"tabStop","remove")}],[/^\033\[3g/,function(){Y(this.o,"tabStop","clear")}],[/^\033#3/,function(){Aa(this.o,"dwdhTopHalf")}],[/^\033#4/,function(){Aa(this.o,"dwdhBottomHalf")}],[/^\033#5/,
    113 function(){Aa(this.o,"swsh")}],[/^\033#6/,function(){Aa(this.o,"dwsh")}],[/^\033\[!p/,function(){Y(this.o,"softReset",p)}],[/^\033c/,function(){Y(this.o,"reset",p)}],[/^\033\[([0-9;]*)t/,A()],[/^\033\]2;([^\033\007]*)\007/,function(a){var b=this.o,a=a[1];2<b.A&&b.debug("SET_WINDOW_TITLE= "+a);b.qa=a;J(b,{title:a})}],[/^\033\]1;([^\033\007]*)\007/,function(a){var b=this.o,a=a[1];2<b.A&&b.debug("SET_ICON_TITLE= "+a);b.ma=a;J(b,{Db:a})}],[/^\033\]0;([^\033\007]*)\007/,function(a){var b=this.o,a=a[1];
    114 2<b.A&&b.debug("SET_TITLE= "+a);b.qa=a;b.ma=a;J(b,{title:a,Db:a})}],[/^\033\$?([()*+-./])([ABCEHKQRYZ0124567=])/,function(a){var b=a[1],a=a[2];switch(b){case ")":b="g0";break;case "(":b="g1";break;case "*":b="g2";break;case "+":b="g3"}switch(a){case "A":a="uk";break;case "B":a="us";break;case "0":a="line";break;case "1":a="rom";break;case "2":a="romSpecial"}this.o.H[b]=a}],[/^\033N(a|[^a])/,function(a){Y(this.o,"g2char",a[1])}],[/^\033O(a|[^a])/,function(a){Y(this.o,"g3char",a[1])}],[/^\033([0-9;?]*)n/,
    115 A()],[/^\033(\[0?c|Z)/,A()],[/^\033\[>c/,A()],[/^\033\[([0-9;]*)q/,function(a){var b=this;(a[1].length?a[1]:"0").split(";").forEach(function(a){0==parseInt(a,10)?Y(b.o,"led","off"):Y(b.o,"led","on")})}],[/^\033\[[145]?i/,A()],[/^\033\[([0-9;]*)y/,function(){Y(this.o,"hardware","selfTestRaw")}],[/^\033#8/,function(){Y(this.o,"hardware","screenAlignment")}],[/^\033%@/,A()],[/^\033%G/,A()],[/^\033\[9;([0-9]+)\]/,A()],[/^\033\[([0-9]+)(;[0-9]+)?\xb0/,function(a){W(this.o,"borderColor",[a[1],a[2]?a[2].substr(1):
    116 u])}]];
     97function ka(a,b){this.debug=function(a){b?b("parse.js: "+a):alert("parse.js: "+a)};this.o=a;this.buffer="";return this}ka.prototype.parse=function(a){for(this.buffer+=a;Ca(this););};
     98function Ca(a){for(var b=0;b<a.Qa.length;b++){var c=a.Qa[b][0].exec(a.buffer);if(c&&0!=c[0].length)return a.Qa[b][1].call(a,c),a.buffer=a.buffer.substr(c[0].length),!0}50<a.buffer.length&&"\u001b"==a.buffer[0]&&(a.debug("Unknown escape sequence: "+a.buffer[1].charCodeAt(0).toString(16)+" "+a.buffer[2].charCodeAt(0).toString(16)+" "+a.buffer[3].charCodeAt(0).toString(16)+" "+a.buffer[4].charCodeAt(0).toString(16)+" "+a.buffer[5].charCodeAt(0).toString(16)+" "+a.buffer[6].charCodeAt(0).toString(16)+
     99" "+a.buffer[7].charCodeAt(0).toString(16)+" "+a.buffer[8].charCodeAt(0).toString(16)+" "+a.buffer[9].charCodeAt(0).toString(16)+" ["+a.buffer+"]"),R(a.o,"\x00"),a.buffer=a.buffer.substr(1));return!1}
     100ka.prototype.Qa=[[/^[\x20-\x7F]+/,function(a){R(this.o,a[0])}],[/^[\xC2-\xDF][\x80-\xBF]/,function(a){R(this.o,String.fromCharCode((a[0].charCodeAt(0)&31)<<6|a[0].charCodeAt(1)&63))}],[/^\033\[([0-9;]*)m/,function(a){ra(this.o,a[1].split(";"))}],[/^[\xE0-\xEF][\x80-\xBF][\x80-\xBF]/,function(a){R(this.o,String.fromCharCode((a[0].charCodeAt(0)&15)<<12|(a[0].charCodeAt(1)&63)<<6|a[0].charCodeAt(2)&63))}],[/^[\xF0-\xF4][\x80-\xBF][\x80-\xBF][\x80-\xBF]/,function(a){R(this.o,String.fromCharCode((a[0].charCodeAt(0)&
     1017)<<18|(a[0].charCodeAt(1)&63)<<12|(a[0].charCodeAt(2)&63)<<6|a[0].charCodeAt(3)&63))}],[/^([\x80-\xFF])/,function(a){R(this.o,a[0])}],[/^\007/,function(){S(this.o,"bell")}],[/^\010/,function(){S(this.o,"backspace")}],[/^\011/,function(){S(this.o,"horizontalTab")}],[/^\012/,function(){S(this.o,"lineFeed")}],[/^\013/,function(){S(this.o,"verticalTab")}],[/^\014/,function(){S(this.o,"formFeed")}],[/^\015/,function(){S(this.o,"carriageReturn")}],[/^\016/,function(){this.o.H.S=void 0}],[/^\017/,function(){this.o.H.S=
     102void 0}],[/^\033F/,function(){}],[/^\033G/,function(){}],[/^\033\[[Hf]/,function(){P(this.o,1,1)}],[/^\033\[([0-9]*)G/,function(a){P(this.o,parseInt(a[1]||"1",10),-1)}],[/^\033\[([0-9]*);([0-9]*)[Hf]/,function(a){P(this.o,parseInt(a[2]||"1",10),parseInt(a[1]||"1",10))}],[/^\033\[([0-9]*)d/,function(a){P(this.o,1,parseInt(a[1]||"1",10))}],[/^[\000-\006]/,function(){}],[/^[\020-\032]/,function(){}],[/^[\034-\037]/,function(){}],[/^\033\[0?K/,function(){Y(this.o,"toEnd")}],[/^\033\[1K/,function(){Y(this.o,
     103"toStart")}],[/^\033\[2K/,function(){Y(this.o,"whole")}],[/^\033K/,function(){Y(this.o,"toEnd")}],[/^\033\[0?J/,function(){wa(this.o,"toEnd")}],[/^\033\[1J/,function(){wa(this.o,"toStart")}],[/^\033\[2J/,function(){wa(this.o,"whole")}],[/^\033J/,function(){wa(this.o,"toEnd")}],[/^\033\[([0-9]*)P/,function(a){va(this.o,parseInt(a[1]||"1",10))}],[/^\033\[([0-9]*)X/,function(a){va(this.o,parseInt(a[1]||"1",10))}],[/^\033\[([0-9]*)L/,function(a){var b=this.o;a=parseInt(a[1]||"1",10);2<b.A&&b.debug("INSERT_LINES="+
     104a);if(!(b.cursor.y>b.s.bottom||b.cursor.y<b.s.top)){for(var c=0;c<a;c++){for(var d=b.s.bottom;d>b.cursor.y;d--)ya(b,d-1,d);for(d=0;d<b.width;d++)xa(b,d,b.cursor.y)}for(d=b.cursor.y;d<=b.s.bottom;d++)H(b,d,0,b.width-1)}}],[/^\033\[([0-9]*)M/,function(a){var b=this.o;a=parseInt(a[1]||"1",10);2<b.A&&b.debug("DELETE_LINES="+a);if(!(b.cursor.y>b.s.bottom||b.cursor.y<b.s.top)){for(var c=0;c<a;c++){for(var d=b.cursor.y;d<b.s.bottom;d++)ya(b,d+1,d);for(d=0;d<b.width;d++)xa(b,d,b.s.bottom)}for(d=b.cursor.y;d<=
     105b.s.bottom;d++)H(b,d,0,b.width-1)}}],[/^\033\[([0-9])*@/,function(a){var b=this.o;a=parseInt(a[1]||"1",10);2<b.A&&b.debug("INSERT_CHARS="+a);for(var c=0;c<a;c++)sa(b,b.width-1,b.cursor.y),ta(b," ",b.cursor.x,b.cursor.y);H(b,b.cursor.y,b.cursor.x,b.width-1)}],[/^\033\[([0-9]+);([0-9]+)r/,function(a){qa(this.o,parseInt(a[1],10),parseInt(a[2],10))}],[/^\033\[r/,function(){var a=this.o;2<a.A&&a.debug("RESET_MARGIN=1 "+a.height);qa(a,1,a.height,!0)}],[/^\033\[\[([0-9;]*)m/,function(){}],[/^\033\[([0-9]*)A/,
     106function(a){U(this.o,"up",parseInt(a[1]||"1",10))}],[/^\033\[([0-9]*)B/,function(a){U(this.o,"down",parseInt(a[1]||"1",10))}],[/^\033\[([0-9]*)C/,function(a){U(this.o,"right",parseInt(a[1]||"1",10))}],[/^\033\[([0-9]*)D/,function(a){U(this.o,"left",parseInt(a[1]||"1",10))}],[/^\033\[([0-9]*)E/,function(a){V(this.o,"nextLine",parseInt(a[1]||"1",10))}],[/^\033\[([0-9]*)F/,function(a){V(this.o,"prevLine",parseInt(a[1]||"1",10))}],[/^\033A([\x20-\x7F]?)/,function(a){U(this.o,"up",a[1]?a[1].charCodeAt(0)-
     10732+1:1)}],[/^\033B([\x20-\x7F]?)/,function(a){U(this.o,"down",a[1]?a[1].charCodeAt(0)-32+1:1)}],[/^\033C([\x20-\x7F]?)/,function(a){U(this.o,"right",a[1]?a[1].charCodeAt(0)-32+1:1)}],[/^\033D/,function(){U(this.o,"left",1)}],[/^\033Y(..)/,function(a){P(this.o,a[1].charCodeAt(1)-32+1,a[1].charCodeAt(0)-32+1)}],[/^\033D/,function(){V(this.o,"down",1)}],[/^\033M/,function(){V(this.o,"up",1)}],[/^\033E/,function(){V(this.o,"nextLine",1)}],[/^\033[7]/,function(){Q(this.o,"push",!0)}],[/^\033[8]/,function(){Q(this.o,
     108"pop",!0)}],[/^\033\[s/,function(){Q(this.o,"push",!1)}],[/^\033\[u/,function(){Q(this.o,"pop",!1)}],[/^\033=/,function(){W(this.o,"keypad","cursor")}],[/^\033>/,function(){W(this.o,"keypad","numeric")}],[/^\033\[(\??)([0-9;]+)h/,function(a){var b=this;a[2].split(";").forEach(function(c){c=a[1]+c;switch(c){case "?1":W(b.o,"cursorKeyANSI",!1);break;case "?3":W(b.o,"width",132);break;case "?4":W(b.o,"scroll","smooth");break;case "?5":W(b.o,"reverseScreen",!0);break;case "?6":W(b.o,"originMode","margin");
     109break;case "?7":W(b.o,"autoWrap",!0);break;case "?8":W(b.o,"autoRepeat",!0);break;case "?9":W(b.o,"mouseTrackingDown",!0);break;case "?12":W(b.o,"cursorBlink",!0);break;case "?25":W(b.o,"cursor",!0);break;case "?47":W(b.o,"currentScreen",0);break;case "?69":break;case "?1000":W(b.o,"mouseTrackingUp",!0);break;case "?1034":W(b.o,"metaKey",!0);break;case "?1047":W(b.o,"currentScreen",0);break;case "?1048":Q(b.o,"push",!0);break;case "?1049":Q(b.o,"push",!0);W(b.o,"currentScreen",0);Y(b.o,"whole");break;
     110case "2":W(b.o,"keyboardLocked",!0);break;case "4":W(b.o,"insert",!0);break;case "12":W(b.o,"localEcho",!1);break;case "20":W(b.o,"newLineMode","crlf");break;default:b.debug('Unhandled set mode: "'+c+'"')}})}],[/^\033\[(\??)([0-9;]+)l/,function(a){var b=this;a[2].split(";").forEach(function(c){c=a[1]+c;switch(c){case "?1":W(b.o,"cursorKeyANSI",!0);break;case "?2":W(b.o,"vt52",!0);break;case "?3":W(b.o,"width",80);break;case "?4":W(b.o,"scroll","jump");break;case "?5":W(b.o,"reverseScreen",!1);break;
     111case "?6":W(b.o,"originMode","screen");break;case "?7":W(b.o,"autoWrap",!1);break;case "?8":W(b.o,"autoRepeat",!1);break;case "?9":W(b.o,"mouseTrackingDown",!1);break;case "?12":W(b.o,"cursorBlink",!1);break;case "?25":W(b.o,"cursor",!1);break;case "?47":W(b.o,"currentScreen",1);break;case "?69":break;case "?1000":W(b.o,"mouseTrackingUp",!1);break;case "?1034":W(b.o,"metaKey",!1);break;case "?1047":Y(b.o,"whole");W(b.o,"currentScreen",1);break;case "?1048":Q(b.o,"pop",!0);break;case "?1049":W(b.o,
     112"currentScreen",1);Q(b.o,"pop",!0);break;case "2":W(b.o,"keyboardLocked",!1);break;case "4":W(b.o,"insert",!1);break;case "12":W(b.o,"localEcho",!0);break;case "20":W(b.o,"newLineMode","cr");break;default:b.debug('Unhandled reset mode: "'+c+'"')}})}],[/^\033\[\?([0-9;]*)c/,function(a){this.debug("cursor layout"+a[1])}],[/^\033H/,function(){P(this.o,1,1)}],[/^\033\[0?g/,function(){Z(this.o,"tabStop","remove")}],[/^\033\[3g/,function(){Z(this.o,"tabStop","clear")}],[/^\033#3/,function(){za(this.o,"dwdhTopHalf")}],
     113[/^\033#4/,function(){za(this.o,"dwdhBottomHalf")}],[/^\033#5/,function(){za(this.o,"swsh")}],[/^\033#6/,function(){za(this.o,"dwsh")}],[/^\033\[!p/,function(){Z(this.o,"softReset",void 0)}],[/^\033c/,function(){Z(this.o,"reset",void 0)}],[/^\033\[([0-9;]*)t/,function(){}],[/^\033\]2;([^\033\007]*)\007/,function(a){var b=this.o;a=a[1];2<b.A&&b.debug("SET_WINDOW_TITLE= "+a);b.pa=a;J(b,{title:a})}],[/^\033\]1;([^\033\007]*)\007/,function(a){var b=this.o;a=a[1];2<b.A&&b.debug("SET_ICON_TITLE= "+a);b.ka=
     114a;J(b,{icon:a})}],[/^\033\]0;([^\033\007]*)\007/,function(a){var b=this.o;a=a[1];2<b.A&&b.debug("SET_TITLE= "+a);b.pa=a;b.ka=a;J(b,{title:a,icon:a})}],[/^\033\$?([()*+-./])([ABCEHKQRYZ0124567=])/,function(a){var b=a[1];a=a[2];switch(b){case ")":b="g0";break;case "(":b="g1";break;case "*":b="g2";break;case "+":b="g3"}switch(a){case "A":a="uk";break;case "B":a="us";break;case "0":a="line";break;case "1":a="rom";break;case "2":a="romSpecial"}this.o.H[b]=a}],[/^\033N(a|[^a])/,function(a){Z(this.o,"g2char",
     115a[1])}],[/^\033O(a|[^a])/,function(a){Z(this.o,"g3char",a[1])}],[/^\033([0-9;?]*)n/,function(){}],[/^\033(\[0?c|Z)/,function(){}],[/^\033\[>c/,function(){}],[/^\033\[([0-9;]*)q/,function(a){var b=this;(a[1].length?a[1]:"0").split(";").forEach(function(a){a=parseInt(a,10);0==a?Z(b.o,"led","off"):Z(b.o,"led","on")})}],[/^\033\[[145]?i/,function(){}],[/^\033\[([0-9;]*)y/,function(){Z(this.o,"hardware","selfTestRaw")}],[/^\033#8/,function(){Z(this.o,"hardware","screenAlignment")}],[/^\033%@/,function(){}],
     116[/^\033%G/,function(){}],[/^\033\[9;([0-9]+)\]/,function(){}],[/^\033\[([0-9]+)(;[0-9]+)?\xb0/,function(a){W(this.o,"borderColor",[a[1],a[2]?a[2].substr(1):null])}]];
    117117// Input 10
    118 function G(a,b){var c=this;b.name=b.name;b.title=b.title;b.font=b.font;b.fontsize=b.fontsize;b.Cb=b.fontfamily;b.P=b.boldfont;b.Za=b.scan;b.Ga=b.warp;b.loop=b.loop;b.rb=b.autostart;b.Rb=b.onready;b.debug=b.debug;b.Q=b.callback;b.Ba=b.onupdate;b.Ob=b.oncompletion;b.Nb=b.onbookmark;b.Pb=b.onpause;b.Qb=b.onplay;b.Lb=b.noskip;c.yb=function(a){if(c.options.debug)if(c.J&&c.J[c.O]){var d=new Date(1E3*(c.J[c.O].time-c.J[0].time));b.debug(("0"+d.getUTCHours()).slice(-2)+":"+("0"+d.getUTCMinutes()).slice(-2)+
    119 ":"+("0"+d.getUTCSeconds()).slice(-2)+" "+a)}else b.debug("--:--:-- "+a)};c.debug=function(a){c.yb("player.js: "+a)};c.options=b;c.options.Ga||(c.options.Ga=1);var d=b.name||"index.rec",e=new XMLHttpRequest;e.open("GET",d,t);e.setRequestHeader("Cache-Control","no-cache");e.setRequestHeader("If-Match","*");e.overrideMimeType("application/octet-stream; charset=x-user-defined");e.onload=function(){if(e.status!=200){alert("ERROR[0] - HTTP request '"+d+"': "+e.statusText+" ["+e.status+"]");if(b.onclose)b.onclose()}else{var f=
    120 e.responseText;if(f.search(/[^\x0a\x0dABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=]/)==-1){var i=f.replace(/[\x0A\x0C]/g,""),g=D.la.cb.parse(i);D.la.fb.stringify(g);if(g.G[0]==1398893684&&g.G[1]==1701076831)(g=prompt("Please enter a passphrase to decrypt the stream: "))&&(f=D.ab.ka(i,g).toString(D.la.fb))}try{c.J=new na(f);c.$a=c.J[c.J.length-1].time-c.J[0].time}catch(h){alert(h);if(c.options.onclose)c.options.onclose();return}c.debug("GO");for(var o,q,f="",i=0;i<c.J.length;i++){f=
    121 f+c.J[i].data;for(g=RegExp("\u001b\\[[8];([0-9]+);([0-9]+)t","g");;){g=g.exec(f);if(!g)break;c.debug("Found[1]: "+g[1]+"/"+g[2]);o=parseInt(g[2],10);q=parseInt(g[1],10);break}if(!o&&!q)for(var s=RegExp("\u001b\\[([0-9]+);([0-9]+)r","g");;){g=s.exec(f);if(!g)break;var n=parseInt(g[2],10);if(!q||n>q){c.debug("Found[0]: "+g[1]+"/"+n);q=n}}f=f.substr(-12)}c.debug("OK ["+o+"x"+q+"]");f=F(b);f.na=function(){Ea(c)};f.Q=b.Q||A();f.debug=function(a){c.yb(a)};f.width=o||80;f.height=q||24;f.Y=t;c.S=new ia(a,
    122 f)}};e.send(u);return this}function Ea(a){if(a.S)a.Eb={wa:{Ab:a.S.o.freeze(),aa:a.S.aa.buffer},index:0},a.options.Rb&&a.options.Rb(new Date(1E3*a.$a)),0<a.options.rb&&(b=a,setTimeout(function(){b.start()},parseInt(a.options.rb,10)));else{var b=a;setTimeout(function(){Ea(b)},10)}}C=G.prototype;C.start=function(a){var b=(new Date).getTime()/1E3,a=a||0;this.pa=t;this.startTime=b;this.rc=this.J[a].time;this.O=a;this.timeout=u;Fa(this);this.options.Qb&&this.options.Qb()};
    123 function Fa(a){for(var b=(new Date).getTime()/1E3;!a.action&&a.O<a.J.length&&(a.J[a.O].time-a.rc<(b-a.startTime)*a.options.Ga||a.options.Za);){a.S.aa.parse(a.J[a.O++].data);if(a.options.Lb)break;if(a.options.Za&&1<(new Date).getTime()/1E3-b)break}var c=a.options.Lb&&!a.options.Za||a.action||a.O==a.J.length,b=(new Date).getTime();if(19<b-a.Tb||c||!a.Tb)a.Tb=b,ma(a.S);if(!a.action||a.action(t))if(a.O<a.J.length){a.options.Ba&&(b=a.J[a.O].time-a.J[0].time,c=new Date(1E3*b),a.options.Ba(c,b/a.$a));var d=
    124 a;setTimeout(function(){Fa(d)},0)}else a.options.loop?(d=a,a.S.Fa(a.Eb),setTimeout(function(){d.start(0)},a.options.loop)):(a.timeout=u,a.pa=x,a.options.Ba&&(c=new Date(1E3*a.$a),a.options.Ba(c,1)),a.options.Ob&&a.options.Ob(),c=new Date((new Date).getTime()-1E3*a.startTime),a.debug("Completed ["+("0"+c.getUTCHours()).slice(-2)+":"+("0"+c.getUTCMinutes()).slice(-2)+":"+("0"+c.getUTCSeconds()).slice(-2)+"]"))}
    125 C.Va=function(){if(this.pa){var a=this;this.action=function(){a.action=u;a.pa=x;this.options.Pb&&this.options.Pb();return x};return x}this.O==this.J.length?this.Xa():this.start(this.O)};C.Vb=function(){var a=this;this.action=function(){a.action=u;a.wa={wa:{Ab:a.S.o.freeze(),aa:a.S.aa.buffer},index:a.O};this.options.Nb&&this.options.Nb();return t};this.pa||this.action(x);return x};
    126 C.Wa=function(a){if(a){var b=this;this.action=function(c){b.action=u;b.S.Fa(a.wa);ma(b.S);(c||0==a.index)&&setTimeout(function(){b.start(a.index)},1);return x};this.pa||this.action(x)}};C.Sa=function(){this.Wa(this.wa);return x};C.Xa=function(){this.Wa(this.Eb);return x};C.Cc=function(a){this.options.Ga=a;return x};window.TTVPlayer=G;G.prototype.rewind=G.prototype.Xa;G.prototype.playpause=G.prototype.Va;G.prototype.setBookmark=G.prototype.Vb;G.prototype.resume=G.prototype.Wa;G.prototype.jump=G.prototype.Sa;
    127 G.prototype.setWarpFactor=G.prototype.Cc;
     118function F(a,b){var c=this;b.name=b.name;b.title=b.title;b.font=b.font;b.fontsize=b.fontsize;b.Ab=b.fontfamily;b.P=b.boldfont;b.Ya=b.scan;b.Fa=b.warp;b.loop=b.loop;b.qb=b.autostart;b.Ob=b.onready;b.debug=b.debug;b.Q=b.callback;b.Aa=b.onupdate;b.Lb=b.oncompletion;b.Kb=b.onbookmark;b.Mb=b.onpause;b.Nb=b.onplay;b.Ib=b.noskip;c.xb=function(a){if(c.options.debug)if(c.J&&c.J[c.O]){var d=new Date(1E3*(c.J[c.O].time-c.J[0].time));b.debug(("0"+d.getUTCHours()).slice(-2)+":"+("0"+d.getUTCMinutes()).slice(-2)+
     119":"+("0"+d.getUTCSeconds()).slice(-2)+" "+a)}else b.debug("--:--:-- "+a)};c.debug=function(a){c.xb("player.js: "+a)};c.options=b;c.options.Fa||(c.options.Fa=1);var d=b.name||"index.rec",e=new XMLHttpRequest;e.open("GET",d,!0);e.setRequestHeader("Cache-Control","no-cache");e.setRequestHeader("If-Match","*");e.overrideMimeType("application/octet-stream; charset=x-user-defined");e.onload=function(){if(200!=e.status){if(alert("ERROR[0] - HTTP request '"+d+"': "+e.statusText+" ["+e.status+"]"),b.onclose)b.onclose()}else{var f=
     120e.responseText;if(-1==f.search(/[^\x0a\x0dABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=]/)){var k=f.replace(/[\x0A\x0C]/g,""),g=y.ja.bb.parse(k);y.ja.eb.stringify(g);1398893684==g.G[0]&&1701076831==g.G[1]&&(g=prompt("Please enter a passphrase to decrypt the stream: "))&&(f=y.$a.ia(k,g).toString(y.ja.eb))}try{c.J=new na(f),c.Za=c.J[c.J.length-1].time-c.J[0].time}catch(h){alert(h);if(c.options.onclose)c.options.onclose();return}c.debug("GO");for(var r,s,f="",k=0;k<c.J.length;k++){f+=
     121c.J[k].data;for(g=RegExp("\u001b\\[[8];([0-9]+);([0-9]+)t","g");;){g=g.exec(f);if(!g)break;c.debug("Found[1]: "+g[1]+"/"+g[2]);r=parseInt(g[2],10);s=parseInt(g[1],10);break}if(!r&&!s)for(var u=RegExp("\u001b\\[([0-9]+);([0-9]+)r","g");;){g=u.exec(f);if(!g)break;var q=parseInt(g[2],10);if(!s||q>s)c.debug("Found[0]: "+g[1]+"/"+q),s=q}f=f.substr(-12)}c.debug("OK ["+r+"x"+s+"]");f=B(b);f.la=function(){Da(c)};f.Q=b.Q||function(){};f.debug=function(a){c.xb(a)};f.width=r||80;f.height=s||24;f.Y=!0;c.X=new ia(a,
     122f)}};e.send(null);return this}function Da(a){if(a.X)a.Bb={va:ma(a.X),index:0},a.options.Ob&&a.options.Ob(new Date(1E3*a.Za)),0<a.options.qb&&(b=a,setTimeout(function(){b.start()},parseInt(a.options.qb,10)));else{var b=a;setTimeout(function(){Da(b)},10)}}v=F.prototype;v.start=function(a){var b=(new Date).getTime()/1E3;a=a||0;this.oa=!0;this.startTime=b;this.pc=this.J[a].time;this.O=a;this.timeout=null;Ea(this);this.options.Nb&&this.options.Nb()};
     123function Ea(a){for(var b=(new Date).getTime()/1E3;!a.action&&a.O<a.J.length&&(a.J[a.O].time-a.pc<(b-a.startTime)*a.options.Fa||a.options.Ya);){a.X.na.parse(a.J[a.O++].data);if(a.options.Ib)break;if(a.options.Ya&&1<(new Date).getTime()/1E3-b)break}var c=a.options.Ib&&!a.options.Ya||a.action||a.O==a.J.length,b=(new Date).getTime();if(19<b-a.Qb||c||!a.Qb)a.Qb=b,la(a.X);if(!a.action||a.action(!0))if(a.O<a.J.length){a.options.Aa&&(b=a.J[a.O].time-a.J[0].time,c=new Date(1E3*b),a.options.Aa(c,b/a.Za));var d=
     124a;setTimeout(function(){Ea(d)},0)}else a.options.loop?(d=a,a.X.Ea(a.Bb),setTimeout(function(){d.start(0)},a.options.loop)):(a.timeout=null,a.oa=!1,a.options.Aa&&(c=new Date(1E3*a.Za),a.options.Aa(c,1)),a.options.Lb&&a.options.Lb(),c=new Date((new Date).getTime()-1E3*a.startTime),a.debug("Completed ["+("0"+c.getUTCHours()).slice(-2)+":"+("0"+c.getUTCMinutes()).slice(-2)+":"+("0"+c.getUTCSeconds()).slice(-2)+"]"))}
     125v.Ua=function(){if(this.oa){var a=this;this.action=function(){a.action=null;a.oa=!1;this.options.Mb&&this.options.Mb();return!1};return!1}this.O==this.J.length?this.Wa():this.start(this.O)};v.Sb=function(){var a=this;this.action=function(){a.action=null;a.va={va:ma(a.X),index:a.O};this.options.Kb&&this.options.Kb();return!0};this.oa||this.action(!1);return!1};
     126v.Va=function(a){if(a){var b=this;this.action=function(c){b.action=null;b.X.Ea(a.va);la(b.X);(c||0==a.index)&&setTimeout(function(){b.start(a.index)},1);return!1};this.oa||this.action(!1)}};v.Ra=function(){this.Va(this.va);return!1};v.Wa=function(){this.Va(this.Bb);return!1};v.Ac=function(a){this.options.Fa=a;return!1};window.TTVPlayer=F;F.prototype.rewind=F.prototype.Wa;F.prototype.playpause=F.prototype.Ua;F.prototype.setBookmark=F.prototype.Sb;F.prototype.resume=F.prototype.Va;
     127F.prototype.jump=F.prototype.Ra;F.prototype.setWarpFactor=F.prototype.Ac;
Note: See TracChangeset for help on using the changeset viewer.