Fixed serial port transmitter interrupts, and added a new blog post (RetroReview: SPEEDUP)

This commit is contained in:
Jeff 2017-07-22 23:08:46 -07:00 committed by Jeff Parsons
commit a85662632c
8 changed files with 810 additions and 541 deletions

View file

@ -1,11 +1,11 @@
---
layout: post
title: Flickery Fakery
title: Flicker Fakery
date: 2017-07-15 10:00:00
permalink: /blog/2017/07/15/
---
For years, one of my pet peeves about PC emulators has been their obsession with raw speed, and how hard they
One of my long-standing pet peeves about PC emulators has been their obsession with raw speed, and how hard they
try to squeeze every last drop of performance out of their instruction execution loop, on the assumption that
everyone wants an 8088 that runs at, say, 500Mhz, as opposed to the stately 4.77Mhz of the original IBM PC.

View file

@ -0,0 +1,244 @@
---
layout: post
title: RetroReview: SPEEDUP
date: 2017-07-21 10:00:00
permalink: /blog/2017/07/21/
machines:
- id: pcsig08
type: pcx86
resume: 1
config: /disks/pcx86/shareware/pcsig08/debugger/machine.xml
autoMount:
A:
name: PC-DOS 1.00
B:
name: PCSIG08: DISK0011
---
While browsing the June/July 1982 issue of PC Magazine (Vol. 1, No. 3), I found the following
[User-To-User](https://books.google.com/books?id=w_OhaFDePS4C&lpg=RA3-PA151&ots=cXovjlDNc8&pg=RA3-PA151#v=onepage&q&f=false)
article about an intriguing little program called `SPEEDUP`. Unfortunately, the first time I tried it,
it immediately hung my test machine. Here's the original article, followed by my analysis of the program
and why it hung.
> ### Disk Speedup
> The undisputed celebrity of this months user tips is SPEEDUP--14 lines of BASIC program code that will make your
disk drives perform their chores in half the time. The program popped up on Wes Merchant's Annandale, Virginia IBM
Bulletin Board Service (see Club News). It was sent there by Chris Carson of Aurora, Colorado, who found the program
circulating in the Denver area. Good news travels fast. Here it is:
05 REM SPEEDUP DISK-ZAP
10 FOR I=1 TO 37:READ N:C=C+N
15 NEXT:READ N:IF N<>C THEN 40
20 RESTORE:OPEN "R",1,"SPEEDUP.COM",1
25 FIELD 1,1 AS N$:FOR I=1 TO 37
30 READ N:LSET N$=CHR$(N):PUT 1
35 NEXT:CLOSE:PRINT "Created":END
40 PRINT "** ERROR - Verify Data **":END
45 DATA 186,18,0,184,30,37,205,33,139
50 DATA 250,190,26,1,185,11,0,243,164
55 DATA 51,192,205,19,139,215,205,39
60 DATA 223,2,37,2,8,42,255,80,246,0,4
65 DATA 3866
70 END
> Even if you've never touched BASIC, the gem is too good to pass up. To create the program, place the PC-DOS
disk into your A: drive and load BASIC by typing *BASIC* and hitting *Enter*. Then type each of the lines above,
exactly as written. Hit *Enter* after each line. When you've *Enter* following line 70, hit the *F2* key to run
this short program.
> If you get a message saying "\*\* ERROR - Verify Data \*\*" then you've made a mistake copying the numbers in line
45 through 60. Otherwise, you will have created a new file on your PC-DOS disk called SPEEDUP.COM.
> Go back into PC-DOS by typing *system* and *Enter* and run the new program by typing *speedup* and *Enter*. Now
load and run any program or PC-DOS utility and be amazed. Your disk drives will miraculously zip along at almost
double speed, singing instead of groaning.
> Exactly how much faster? Well, for example, to format a new disk with the /S option: 25 seconds instead of 45
seconds. To copy the PC-DOS disk via the "DISKCOPY" command: 42 seconds instead of 83. To copy the entire PC-DOS
disk with "COPY \*.\*": 139 seconds instead of 206. If you're a speed and performance fanatic (who isn't), you've
just made up to a 100 percent improvement in your disk operations.
> According to Chris Carson, the program works its magic by reloading the diskette parameters table in PC-DOS.
IBM programmed the step rate for the machine's Tandon disk drives at eight milliseconds; SPEEDUP shortens this to
six, still within the Tandon-rated minimum of five milliseconds. The program also sets the head settle rate to
zero milliseconds, which is the Tandon minimum rating (IBM's conservative default setting is 25).
Fortunately, we don't have to type the program in. If you skim our archived copy of the
[PC-SIG Library 8th Edition CD-ROM (April 1990)](/disks/pcx86/shareware/pcsig08/), you'll see `SPEEDUP.BAS`
in the [Directory of PCSIG08: DISK0011](/disks/pcx86/shareware/pcsig08/#directory-of-pcsig08-disk0011).
So, fire up the [PC-SIG Machine (with Debugger)](/disks/pcx86/shareware/pcsig08/debugger/). Or use the machine
below, which has conveniently pre-loaded "PC-DOS 1.00" in drive A and "PCSIG80: DISK0011" in drive B.
At the DOS prompt, run `BASIC` and type `LOAD "B:SPEEDUP.BAS"`.
{% include machine.html id="pcsig08" %}
When you `LIST` the program to the serial port:
LIST,"COM1:"
you'll see that the program is virtually identical to the PC Magazine listing:
10 FOR I = 1 TO 37
11 READ N
12 C = C + N
15 NEXT
16 READ N
17 IF N <> C THEN 40
20 RESTORE
21 OPEN "R",1,"SPEEDUP.COM",1
25 FIELD 1 , 1 AS N$
26 FOR I = 1 TO 37
30 READ N
31 LSET N$ = CHR$(N)
32 PUT 1
35 NEXT
36 CLOSE
37 PRINT "created"
38 END
40 PRINT "** error. Verify DATA"
41 END
45 DATA 186,18,0,184,30,37,205,33,139
50 DATA 250,190,26,1,185,11,0,243,164
55 DATA 51,192,205,19,139,215,205,39
60 DATA 223,2,37,2,8,42,255,80,246,0,4
65 DATA 3866
If you `RUN` it, it should report "created". Type `SYSTEM` to exit BASIC and then type `DIR SPEEDUP.COM`
to verify that the program was created:
SPEEDUP COM 128 07-21-17
You'll notice that BASIC created a 128-byte file, even though it wrote only 37 bytes. This is an
artifact of PC-DOS 1.00 and BASIC Version D1.00, which were limited to File Control Block (FCB) DOS
functions that operated on files using 128-byte "records".
Alternatively, if we boot from "PC-DOS 2.00 (Disk 1)" and run BASIC Version D2.00, loading and running
`SPEEDUP.BAS` will produce the following `SPEEDUP.COM`:
Volume in drive A has no label
Directory of A:\
SPEEDUP COM 37 7-21-17 12:00a
1 File(s) 30720 bytes free
Let's take a closer look at this 37-byte program, using the `DEBUG` program on "PC-DOS 2.00 (Disk 2)":
A>B:DEBUG SPEEDUP.COM
-u100
0913:0100 BA1200 MOV DX,0012
0913:0103 B81E25 MOV AX,251E
0913:0106 CD21 INT 21
0913:0108 8BFA MOV DI,DX
0913:010A BE1A01 MOV SI,011A
0913:010D B90B00 MOV CX,000B
0913:0110 F3 REPZ
0913:0111 A4 MOVSB
0913:0112 33C0 XOR AX,AX
0913:0114 CD13 INT 13
0913:0116 8BD7 MOV DX,DI
0913:0118 CD27 INT 27
-d 11a lb
0913:011A DF 02 25 02 08 2A FF 50 F6 00 04
The program uses the DOS Set Vector function (INT 21h, AH=25h) to modify interrupt vector 1Eh (the Diskette
Parameter Table vector) to point DS:0012, inside the program's Program Segment Prefix (PSP). It then copies
0Bh bytes from offset 011Ah into the PSP at offset 0012h, issues a BIOS Disk Reset (INT 13h, AH=00h), and
then executes a Terminate and Stay Resident (TSR) request (INT 27h) with DX set to 1Dh, retaining the first 12h
bytes of the PSP plus an additional 0Bh bytes containing the new diskette parameter values.
Note that this TSR program doesn't actually want to retain the first 12h bytes of the PSP, but it must leave
those bytes in place so that the program will exit correctly.
In PC-DOS 1.00 (August 1981), the first 12h bytes of the PSP were used as follows:
00h-01h 2 bytes (code) CP/M exit (always contains INT 20h)
02h-03h 2 bytes Segment of the first byte beyond the memory allocated to the program
04h 1 byte Reserved
05h-09h 5 bytes (code) Far call to CP/M compatibility code within DOS
0Ah-0Dh 4 bytes Terminate address of previous program (old INT 22h)
0Eh-11h 4 bytes Break address of previous program (old INT 23h)
with bytes 12h-5Bh marked "Reserved" and the remaining PSP bytes defined as:
5Ch-6Bh 16 bytes Unopened Standard FCB 1
6Ch-7Fh 20 bytes Unopened Standard FCB 2 (overwritten if FCB 1 is opened)
80h 1 byte Number of bytes on command-line
81h-FFh 127 bytes Command-line tail (terminated by a 0Dh)
NOTE: The 128 bytes at offset 80h are also used as the default DOS Disk Transfer Area (DTA).
In May 1982, PC-DOS 1.10 added:
12h-15h 4 bytes Critical error address of previous program (old INT 24h)
16h-17h 2 bytes Parent's PSP segment (usually COMMAND.COM - internal)
In March 1983, PC-DOS 2.00 added:
18h-2Bh 20 bytes Job File Table (JFT) (internal)
2Ch-2Dh 2 bytes Environment segment
2Eh-31h 4 bytes SS:SP on entry to last INT 21h call (internal)
And in August 1984, PC-DOS 3.00 added:
32h-33h 2 bytes JFT size (internal)
34h-37h 4 bytes Pointer to JFT (internal)
This explains why, when I first ran `SPEEDUP` on PC-DOS 2.00, it crashed. In fact, the *only* version
of DOS that supports `SPEEDUP` is version 1.00. It crashes on all other versions of DOS because it "trashes"
critical PSP bytes; specifically, the Parent's PSP segment at offset 16h. The author of `SPEEDUP` ignored IBM's
warning that PSP bytes at offset 12h and higher were "reserved" and used them anyway.
> NOTE: Other sites, like [PC DOS Retro](https://sites.google.com/site/pcdosretro/doshist), suggest that
the "Parent's PSP segment" at offset 16h wasn't introduced until PC-DOS 2.00, but that's incorrect. Even though
the PC-DOS 1.10 Manual (p. E-6) mentions only the addition of the "Critical Error Exit Address" at offset 12h,
both fields were in fact added in PC-DOS 1.10.
Sadly, the history of the IBM PC and DOS is littered with examples of programmers ignoring the "reserved"
admonitions of others -- even IBM, when they designed the IBM PC to use interrupt vectors that Intel had "reserved"
for future use. This is apparently normal human thinking: "If something isn't a problem today, then let's punt
any foreseeable problems to future generations, because we've got more important things to do."
And on PC-DOS 1.00, does `SPEEDUP` actually speed things up? In the real world, it presumably did, but in
the world of emulation, there isn't any measurable difference, because hardware features like stepping rates and
head settling times are rarely simulated. As I suggested in my [last blog post](/blog/2017/07/15/), this is a
degree of authenticity that all emulators should strive for, and PCjs is no exception to that rule -- I just haven't
gotten around to it yet.
### Epilogue
There were some nice side benefits to debugging the problems introduced by `SPEEDUP`.
First, when attempting to `LIST` a BASIC program to a serial port, I discovered that BASIC depends on the port
generating a "Transmitter Holding Register Empty" interrupt after outputting each byte, and that I had never actually
implemented that interrupt. Only the "Received Data Available" and "Modem Status" interrupts had been implemented,
largely for serial mouse support. That has since been fixed, although "Line Status" interrupts still need to be
implemented, along with the proper queuing of all *four* possible types of serial port interrupts.
NOTE: Serial I/O from DOS (ie, redirection to or from a COM port) already worked because DOS performs polled I/O
rather than interrupt-driven I/O. Additionally, when DOS terminates a line, it outputs both CR (0Dh) and LF (0Ah)
bytes, whereas BASIC outputs only CR; so, when a machine uses a &lt;textarea&gt; control for serial I/O, we
automatically convert transform stand-alone CR bytes into LF bytes.
Second, when `SPEEDUP` crashed on newer versions of DOS, an invalid stack pointer would be loaded, and I noticed
that I had neglected to fully implement stack wrap-around on 8086/8088 processors; specifically, in the case where the
stack pointer is *odd*.
Normally, when the stack pointer is *even*, it will smoothly auto-decrement from 0000h to FFFEh or auto-increment
from FFFEh to 0000h. However, when the stack pointer is *odd* and it reaches 0001h, the next PUSH on a 8086/8088 must
automatically store the high byte at 0000h and the low byte at FFFFh; similarly, when the stack pointer is FFFFh,
the next POP must fetch the low byte from FFFFh and the high byte from 0000h.
Most emulators simulating an 8086/8088 in real-mode actually use V86-mode, which doesn't support stack operands that
wrap around the top of the stack segment; V86-mode will throw an exception, and the machine is toast. PCjs makes more
of an effort simulate real-mode, so any PUSH or POP should work smoothly, regardless whether the stack pointer is even
or odd.
PCjs is still far from perfect. For example, instruction fetches that cross a 64K boundary are supposed to wrap around
to 0000h as well. That's not implemented yet, but stay tuned.
*[@jeffpar](http://twitter.com/jeffpar)*
*Jul 21, 2017*

View file

@ -8,7 +8,7 @@
<rom id="romHDC" addr="0xc8000" size="0x2000" file="/devices/pcx86/hdc/ibm-xebec-1982.json"/>
<rom id="romBASIC" addr="0xf6000" size="0x8000" file="/devices/pcx86/rom/5160/basic/BASIC110.json"/>
<rom id="romBIOS" addr="0xfe000" size="0x2000" file="/devices/pcx86/rom/5160/1982-11-08/XTBIOS-REV1.json"/>
<video ref="/devices/pcx86/video/ibm/ega/1984-09-13/128kb-autolockfs.xml"/>
<video ref="/devices/pcx86/video/ibm/ega/1984-09-13/128kb-lockfs.xml"/>
<fdc ref="/disks/pcx86/compiled/shareware/pcsig08/pcsig08.xml"/>
<keyboard ref="/devices/pcx86/keyboard/us83-buttons-functions.xml"/>
<debugger id="debugger"/>

View file

@ -7,7 +7,7 @@
<rom id="romHDC" addr="0xc8000" size="0x2000" file="/devices/pcx86/hdc/ibm-xebec-1982.json"/>
<rom id="romBASIC" addr="0xf6000" size="0x8000" file="/devices/pcx86/rom/5160/basic/BASIC110.json"/>
<rom id="romBIOS" addr="0xfe000" size="0x2000" file="/devices/pcx86/rom/5160/1982-11-08/XTBIOS-REV1.json"/>
<video ref="/devices/pcx86/video/ibm/ega/1984-09-13/128kb-autolockfs.xml"/>
<video ref="/devices/pcx86/video/ibm/ega/1984-09-13/128kb-lockfs.xml"/>
<fdc ref="/disks/pcx86/compiled/shareware/pcsig08/pcsig08.xml"/>
<cpu id="cpu8088" model="8088" autoStart="true" pos="right" padRight="8px">
<control type="button" binding="run">Run</control>

View file

@ -100,7 +100,7 @@ function $b(a,b,c,d){void 0===d&&(d=b>=c>>2);d?(b=new Zb(a.x,a.y,a.Pc,a.A*b/c|0)
l.uc=function(a,b,c,d){this.pa=a;this.ma=b;this.H=c;this.ca=d;this.C=bc(a,"Keyboard")};l.Yb=function(a,b){b||cc();return!0};l.Xb=function(){return!0};l.Yd=function(a,b){a.button||(this.L=b?0:-1,dc(this,a,b))};l.uf=function(a){dc(this,a)};
function dc(a,b,c){var d=ec/null.offsetWidth,e=fc/null.offsetHeight,f=null.getBoundingClientRect(),d=(b.clientX-f.left)*d|0;b=(b.clientY-f.top)*e|0;null==c&&(a.L||(a.L=Math.abs(a.F-d)>Math.abs(a.G-b)?1:2),1==a.L?b=a.G:2==a.L&&(d=a.F));a.F=d;a.G=b;if(0<=d&&d<ec&&0<=b&&b<fc){a:{c=d;if(c<gc&&a.A&&a.A.He)for(f=0;f<a.A.He.length;f++)if(e=a.A.He[f],e.contains(c,b)){c-=e.x;b-=e.y;var d=a.A.lf[f],g=Ja(hc.Nk,a.A.Ug[d.Ql]),f=g*a.ma.B,d=(g+d.Id)*a.ma.B-1;0<b&&(f+=e.Pc*(b-1)*a.ea);f+=c*a.ea;f|=0;f>d&&(f=d);c=
f;break a}c=-1}if(-1!==c&&(c&=-16,c!=a.ga)){b=c;if(a.context&&a.N&&a.O){e=ic-jc;f=a.N.width;a.O.fillStyle=kc;a.O.fillRect(0,e,f,jc);lc(a,e+mc,a.N,a.O);a.W=a.ha.width/24|0;if(null==b)nc(a,"Mouse over memory to dump");else for(nc(a,q(b,8,!0),null,0,1),d=1;16>=d;d++){for(var g="",h=1;8>=h;h++){var k;k=a.ma;var m=b++;k=k.aa[(m&k.C)>>>k.A].ce(m&k.D,m);nc(a,q(k,2),null,1);g+=32<=k&&128>k?String.fromCharCode(k):"."}nc(a,g,null,0,1)}a.context.drawImage(a.N,0,e,f,jc,a.Ea,a.Ia,a.va,a.za)}a.ga=c}}}
function oc(a,b,c,d){a.A.lf[a.A.dj++]={Ql:b,Id:c,type:d};return Ia(hc,b,c,0,d)}function lc(a,b,c,d){var e,f=null.style.color,g=a.sa=10;a.B=g;a.I=b;a.J=a.aa=mc;e||(e=a.Z||a.aa+"px "+pc);a.M=a.Z=e;c&&(a.ha=c);d&&(a.D=d,a.ka=f||"white")}function nc(a,b,c,d,e){a.D.font=a.M;a.D.fillStyle=a.ka;a.D.fillText(b,a.B,a.I);a.B+=a.W;null!=c&&(16!=a.Da?b=c.toString():(b=8>a.qa?"0x":"",b+=q(c,a.qa)),a.D.fillText(b,a.B,a.I),a.B+=a.W);d&&(a.B+=a.W*d);e&&(a.B=a.sa,a.I+=(a.J+2)*(e||1))}
function oc(a,b,c,d){a.A.lf[a.A.dj++]={Ql:b,Id:c,type:d};return Ia(hc,b,c,0,d)}function lc(a,b,c,d){var e,f=null.style.color,g=a.ra=10;a.B=g;a.I=b;a.J=a.aa=mc;e||(e=a.Z||a.aa+"px "+pc);a.M=a.Z=e;c&&(a.ha=c);d&&(a.D=d,a.ka=f||"white")}function nc(a,b,c,d,e){a.D.font=a.M;a.D.fillStyle=a.ka;a.D.fillText(b,a.B,a.I);a.B+=a.W;null!=c&&(16!=a.Da?b=c.toString():(b=8>a.qa?"0x":"",b+=q(c,a.qa)),a.D.fillText(b,a.B,a.I),a.B+=a.W);d&&(a.B+=a.W*d);e&&(a.B=a.ra,a.I+=(a.J+2)*(e||1))}
function cc(){for(var a=!1,b=Bb(document,"pcx86","panel"),c=0;c<b.length;c++){var d=b[c],e=Cb(d),f=Eb(e.id);f||(a=!0,f=new ac(e));Ab(f,d);a&&Ob(f)}}var ec=1280,fc=720,mc=18,pc="Monaco, Lucida Console, Courier New",gc=3*ec>>2,qc=fc,ic=fc,kc="black",jc=fc>>1;cb(cc);
function rc(a,b,c){rb.call(this,"Bus",a);this.H=b;this.ca=c;this.I=a.busWidth||20;this.O=Math.pow(2,this.I);this.N=this.C=this.O-1|0;this.A=32==this.I||20>=this.I?12:24>=this.I?14:15;this.B=1<<this.A;this.ea=this.B>>2;this.D=this.B-1;this.M=this.O/this.B|0;this.W=this.M-1;this.F=[];this.G=[];this.K=this.L=!1;this.Y=[];this.Z=[];a=new w;tc(a,this.ca);this.aa=Array(this.M);for(b=0;b<this.M;b++)this.aa[b]=a;a=this.H;b=this.aa;c=this.A;a.sc=a.aa=b;a.kb=c;a.Pg=1<<a.kb;a.Cb=a.Pg-1;a.Xf=b.length;a.ff=a.Xf-
1;a=this.H;a.gf=a.dd=this.C;Ob(this)}ba(rc,rb);l=rc.prototype;l.reset=function(){uc(this,!0)};l.Yb=function(a,b){b||this.reset();return!0};
@ -164,7 +164,7 @@ function Af(a){var b;if(a.aa===a.sc){a.aa=Array(a.Xf);a.ag=new w(null,0,0,hd,nul
function zd(a,b,c,d){var e=(b&-4194304)>>>20,f=a.sc[(a.Uc+e&a.gf)>>>a.kb],g=f.Nd(e);if(!(g&1))return d||Cf.call(a,b,!1,c),a.hf;if(!(g&4)&&3==a.La)return d||Cf.call(a,b,!0,c),a.hf;var h=(b&4190208)>>>10,g=a.sc[((g&-4096)+h&a.gf)>>>a.kb],k=g.Nd(h);if(!(k&1))return d||Cf.call(a,b,!1,c),a.hf;if(!(k&4)&&3==a.La)return d||Cf.call(a,b,!0,c),a.hf;c=a.sc[((k&-4096)+(b&4095)&a.gf)>>>a.kb];if(d)return c;d=b>>>a.kb;k=a.aa[d];b&=-4096;var m;0<a.cg?(m=a.Vi[--a.cg],m.lh(b)):m=new w(b,0,0,jd);b=m;b.ud=c;b.ob=f;b.A=
e>>2;b.pb=g;b.B=h>>2;Tb&&Kc&&c.X&&!c.controller&&!c.le&&!c.me?(b.Oa=c.Oa,b.Ud=c.Ud,b.X=c.X,Fc(b,Cd)):(b.F=c?Ad(32):0,b.J=c?Ad(96):0,Fc(b,kd));tc(b,a.ca,k);a.aa[d]=b;a.Yf.push(d);return b}function Df(a){a.aa!==a.sc&&(a.aa=a.sc,a.ag=null,a.Yf=null,a.hf=null)}l=Ie.prototype;l.reset=function(){this.ba.ab&&this.Kb();yf(this);Gd(this);this.ba.error=!1};
function Ef(a,b){var c;switch(b){case 0:c=a.D;break;case 1:c=a.I;break;case 2:c=a.L;break;case 3:c=a.G;break;case 4:c=y(a);break;case 5:c=a.M;break;case 6:c=a.K;break;case 7:c=a.J}return c}function Ff(a,b,c){switch(b){case 0:a.D=c;break;case 1:a.I=c;break;case 2:a.L=c;break;case 3:a.G=c;break;case 4:pe(a,c);break;case 5:a.M=c;break;case 6:a.K=c;break;case 7:a.J=c}}
function yf(a){a.D=0;a.G=0;a.I=0;a.L=0;a.zc=0;a.M=0;a.K=0;a.J=0;a.vc=!1;a.Ba=a.Za=0;a.hn=[0,0];a.jn=[0,0];a.xa=0;a.sj=0;a.ga=0;a.qa=65520;a.Nb=0;a.ad=1023;a.O=a.lc=0;a.Td=a.jf=a.Sd=a.Ee=0;a.Kc=-1;a.od=a.Tc=-1;a.pd=a.sa=-1;a.Z=new ce(a,me,"CS");a.Da=new ce(a,De,"DS");a.oa=new ce(a,De,"ES");a.Y=new ce(a,ie,"SS");pe(a,0);oe(a,0);if(80386<=a.da){switch(a.Rd){case 80562:case 80563:a.L=771;break;case 80578:a.L=772;break;case 80594:a.L=773;break;case 80595:case 80596:a.L=776}a.qa=16;a.Qg=0;a.qd=0;a.Uc=0;
function yf(a){a.D=0;a.G=0;a.I=0;a.L=0;a.zc=0;a.M=0;a.K=0;a.J=0;a.vc=!1;a.Ba=a.Za=0;a.hn=[0,0];a.jn=[0,0];a.xa=0;a.sj=0;a.ga=0;a.qa=65520;a.Nb=0;a.ad=1023;a.O=a.lc=0;a.Td=a.jf=a.Sd=a.Ee=0;a.Kc=-1;a.od=a.Tc=-1;a.pd=a.ra=-1;a.Z=new ce(a,me,"CS");a.Da=new ce(a,De,"DS");a.oa=new ce(a,De,"ES");a.Y=new ce(a,ie,"SS");pe(a,0);oe(a,0);if(80386<=a.da){switch(a.Rd){case 80562:case 80563:a.L=771;break;case 80578:a.L=772;break;case 80594:a.L=773;break;case 80595:case 80596:a.L=776}a.qa=16;a.Qg=0;a.qd=0;a.Uc=0;
a.Rb=[0,0,0,0,null,null,0,0];a.dg=[null,null,null,null,null,null,0,0];a.Ga=new ce(a,De,"FS");a.Ia=new ce(a,De,"GS");Df(a)}a.Tg=new ce(a,0,"NULL");a.Ea=a.Da;a.Sb=a.Y;a.N=a.ha=0;a.C=a.F=-1;a.gb=a.Tg;a.Ya=0;if(80286>a.da)Ge(a,0,65535);else{a.Ib=0;a.Hc=65535;a.Db=new ce(a,5,"LDT",!0);a.ka=new ce(a,ke,"TSS",!0);a.xb=new ce(a,he,"VER",!0);Ge(a,65520,61440);var b,c=z(a);b=a.Z;var d=-65536;80386>b.gc.da&&(d&=16777215);b=b.ta=d;a.ea=b+c|0;a.Rg=(b>>>0)+(a.Z.Pa>>>0)+1}Fe(a,0);re(a)}
function Gf(a){2==a.Lc?(a.Tb=a.ja,a.kc=Hf,a.tc=If,a.ld=Jf,2==a.V?(a.la=Kf,a.za=Lf,a.lb=Mf):(a.la=Nf,a.za=Of,a.lb=Pf)):(a.Tb=a.ia,a.kc=Qf,a.tc=Rf,a.ld=Sf,2==a.V?(a.la=Tf,a.za=Uf,a.lb=Vf):(a.la=Wf,a.za=Xf,a.lb=Yf))}function se(a,b){a.V!=b&&(a.ha|=1024,a.V=b,a.R=2==b?65535:-1,Zf(a))}function Zf(a){2==a.V?(a.Fb=32768,a.mb=a.ja,a.Eb=a.hb,2==a.Lc?(a.la=Kf,a.za=Lf,a.lb=Mf):(a.la=Tf,a.za=Uf,a.lb=Vf)):(a.Fb=-2147483648,a.mb=a.ia,a.Eb=a.bb,2==a.Lc?(a.la=Nf,a.za=Of,a.lb=Pf):(a.la=Wf,a.za=Xf,a.lb=Yf))}
function $f(a){a.Lc=a.Z.Lc;a.wa=a.Z.wa;Gf(a);a.V=a.Z.V;a.R=a.Z.R;Zf(a);a.ha&=-3073}l.zj=function(){var a=this.D+this.G+this.I+this.L+y(this)+this.M+this.K+this.J|0;return a=a+z(this)+this.Z.U+this.Da.U+this.Y.U+this.oa.U+Ee(this)|0};function ag(a,b,c){void 0===a.Zf[b]&&(a.Zf[b]=[]);a.Zf[b].push(c)}function bg(a,b,c){c&&(null==a.$f[b]&&a.bg++,a.$f[b]=c)}function cg(a,b){var c=a.$f[b];null!=c&&(c(--a.bg),delete a.$f[b])}
@ -187,12 +187,12 @@ function Hg(a,b,c,d){var e=(d?a.sc:a.aa)[(b&a.dd)>>>a.kb];e&&e.type==hd&&(e=zd(a
l.ja=function(a){var b=a&this.Cb,c=(a&this.dd)>>>this.kb;this.A-=this.B.Bg;if(b<this.Cb)return this.aa[c].Nf(b,a);b=this.aa[c].Bc(b,a);this.N&4096||(b|=this.aa[c+1&this.ff].Bc(0,a+1)<<8);return b};l.ia=function(a){var b=a&this.Cb,c=(a&this.dd)>>>this.kb;if(b<this.Cb-2)return this.aa[c].Nd(b,a);for(var d=0,e=4,f=0,g=4-(b&3);e--;){d|=this.aa[c].Bc(b++,a++)<<f;if(this.N&4096)break;--g||(c=c+1&this.ff,b=0);f+=8}return d};l.Pb=function(a,b){this.aa[(a&this.dd)>>>this.kb].Dc(a&this.Cb,b&255,a)};
l.hb=function(a,b){var c=a&this.Cb,d=(a&this.dd)>>>this.kb;this.A-=this.B.Bg;c<this.Cb?this.aa[d].Uf(c,b&65535,a):(this.aa[d++].Dc(c,b&255,a),this.N&4096||this.aa[d&this.ff].Dc(0,b>>8&255,a+1))};l.bb=function(a,b){var c=a&this.Cb,d=(a&this.dd)>>>this.kb;this.A-=this.B.Bg;if(c<this.Cb-2)this.aa[d].Tf(c,b,a);else for(var e=4,f=4-(c&3);e--;){this.aa[d].Dc(c++,b&255,a++);if(this.N&4096)break;--f||(d=d+1&this.ff,c=0);b>>>=8}};
function Ig(a,b,c){a.gb=b;a.tb=c&a.wa;a.C=b.cc(a.tb,1);return a.N&1?0:a.Ja(a.C)}function C(a,b){return Ig(a,a.Ea,b)}function Jg(a,b){return Ig(a,a.Sb,b)}function Kg(a,b,c){a.gb=b;a.tb=c&a.wa;a.C=b.cc(a.tb,a.V);return a.N&1?0:a.mb(a.C)}function D(a,b){a.gb=a.Ea;a.tb=b&a.wa;a.C=a.gb.cc(a.tb,2);return a.N&1?0:a.ja(a.C)}function Lg(a,b){a.gb=a.Sb;a.tb=b&a.wa;a.C=a.gb.cc(a.tb,2);return a.N&1?0:a.ja(a.C)}function E(a,b){a.gb=a.Ea;a.tb=b&a.wa;a.C=a.gb.cc(a.tb,4);return a.N&1?0:a.ia(a.C)}
function Mg(a,b){a.gb=a.Sb;a.tb=b&a.wa;a.C=a.gb.cc(a.tb,4);return a.N&1?0:a.ia(a.C)}function Ng(a,b){a.N&2||a.Pb(a.gb.dc(a.tb,1),b)}function Og(a,b){a.N&2||a.hb(a.gb.dc(a.tb,2),b)}function Pg(a,b){a.N&2||a.bb(a.gb.dc(a.tb,4),b)}function te(a,b,c){return a.mb(b.cc(c,a.V))}l.ra=function(){var a=jg(this,1),b=this.Ja(this.ea);this.ea=a;return b};function Qg(a){var b=jg(a,2),c=a.ja(a.ea);a.ea=b;return c}function G(a){var b=jg(a,a.Lc),c=a.Tb(a.ea);a.ea=b;return c}
function Mg(a,b){a.gb=a.Sb;a.tb=b&a.wa;a.C=a.gb.cc(a.tb,4);return a.N&1?0:a.ia(a.C)}function Ng(a,b){a.N&2||a.Pb(a.gb.dc(a.tb,1),b)}function Og(a,b){a.N&2||a.hb(a.gb.dc(a.tb,2),b)}function Pg(a,b){a.N&2||a.bb(a.gb.dc(a.tb,4),b)}function te(a,b,c){return a.mb(b.cc(c,a.V))}l.sa=function(){var a=jg(this,1),b=this.Ja(this.ea);this.ea=a;return b};function Qg(a){var b=jg(a,2),c=a.ja(a.ea);a.ea=b;return c}function G(a){var b=jg(a,a.Lc),c=a.Tb(a.ea);a.ea=b;return c}
l.Fa=function(){var a=jg(this,this.V),b=this.mb(this.ea);this.ea=a;return b};l.S=function(){var a=jg(this,1),b=this.Ja(this.ea)<<24>>24;this.ea=a;return b};function ne(a){var b=a.mb(a.Aa);a.Aa=a.Aa+a.V|0;var c=(a.Sg>>>0)-(a.Aa>>>0);0>c&&(8088>=a.da?(pe(a,a.Aa-a.Y.ta&a.Y.wa),-1>c&&(b=b&255|a.Ja(a.Aa-1)<<8)):-1>c?x.call(a,12,0):(!a.Y.fd&&a.Y.Pa==a.Y.wa||a.Y.fd&&!a.Y.Pa)&&pe(a,a.Aa-a.Y.ta&a.Y.wa));return b}function xe(a,b){ue(a,b,a.V)}
function ue(a,b,c,d){d=void 0===d?c:d;var e=a.Aa-c|0,f=(e>>>0)-(a.Cj>>>0);if(0>f){if(8088>=a.da&&-1==f){a.Pb(e+1,b>>8);pe(a,e-a.Y.ta&a.Y.wa);a.Pb(a.Aa,b);return}if(!a.Y.fd&&a.Y.Pa==a.Y.wa||a.Y.fd&&!a.Y.Pa){if(f>-c){x.call(a,12,0);return}pe(a,e-a.Y.ta&a.Y.wa);e=a.Aa}else{x.call(a,12,0);return}}switch(d){case 1:a.Pb(e,b);break;case 2:a.hb(e,b);break;case 4:a.bb(e,b)}a.Aa=e}
function Rg(a,b,c){var d=4;1==b.length&&(d=1,c=c?1:0);if(80386>a.da)2<b.length&&(b=b.substr(1,2));else if("PS"==b||2<b.length)d=8;a.na[b]&&(void 0===c&&(Mb(a,"Value for "+b+" is invalid"),a.Kb()),d=!a.ba.ab||a.ba.pj?q(c,d):"--------".substr(0,d),a.na[b].textContent!=d&&(a.na[b].textContent=d))}
l.Ng=function(a){this.ba.complete=!0;var b=this.ba.oj=this.ca&&Sg(this.ca),c=a?this.ba.ri?0:1:-1;this.ba.ri=!1;this.bd=this.A=a;this.W&&!a&&Xd(this.W);a||r(this,1024)||(this.N|=4);do{var d=this.N&3312;if(d)this.ha|=d;else if(this.pd=this.ea,this.Ea=this.Da,this.Sb=this.Y,this.C=this.F=-1,this.ha&3072&&$f(this),this.ha=this.N&256,this.Ya){a:{if(!(this.N&4))for(var d=80286>this.da?0:1,e=0;2>e;e++){switch(d){case 0:if(this.Ya&1&&this.O&512){var f=Tg(this.W);if(-1<=f&&(this.Ya&=-2,0<=f)){this.Ya&=-5;
Ug.call(this,f);d=!0;break a}}break;case 1:if(this.Ya&2){this.Ya&=-3;80386<=this.da&&(this.Rb[6]|=16384);Ug.call(this,1);d=!0;break a}}d=1-d}d=!1}if(d&&!a){this.P("interrupt dispatched");this.N=0;break}if(this.Ya&4){this.N=this.A=0;break}}if(b){if(Vg(this.ca,this.ea,c)){this.Kb();break}c=1}this.N=0;this.va[this.ra()].call(this)}while(0<this.A);return this.ba.complete?this.bd-this.A:void 0===this.ba.complete?0:-1};var Bf=512;
Ug.call(this,f);d=!0;break a}}break;case 1:if(this.Ya&2){this.Ya&=-3;80386<=this.da&&(this.Rb[6]|=16384);Ug.call(this,1);d=!0;break a}}d=1-d}d=!1}if(d&&!a){this.P("interrupt dispatched");this.N=0;break}if(this.Ya&4){this.N=this.A=0;break}}if(b){if(Vg(this.ca,this.ea,c)){this.Kb();break}c=1}this.N=0;this.va[this.sa()].call(this)}while(0<this.A);return this.ba.complete?this.bd-this.A:void 0===this.ba.complete?0:-1};var Bf=512;
cb(function(){for(var a=Bb(document,"pcx86","cpu"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new Ie(d);Ab(d,c)}});
function Wg(a){rb.call(this,"FPU",a);this.da=a.model||8087;this.F=new Float64Array(8);this.L=new Int32Array(this.F.buffer);this.Z=new Float32Array(1);this.ha=new Int32Array(this.Z.buffer);this.K=new Float64Array(1);this.G=new Int32Array(this.K.buffer);this.D=Array(3);this.M=this.N=-1;this.I=this.J=this.O=this.A=0;this.Y=new Float64Array(1);this.aa=new Int32Array(this.Y.buffer);this.aa[0]=0;this.aa[1]=268402688;Xg(this);this.ga=Wg.prototype.pi;this.ea=Wg.prototype.hl}ba(Wg,rb);l=Wg.prototype;
l.uc=function(a,b,c){this.H=c;this.W=bc(a,"ChipSet");Ob(this)};l.Yb=function(a,b){if(!b)if(!a||!this.restore)Xg(this);else if(!this.restore(a))return!1;return!0};l.Xb=function(a){return a?this.save():!0};l.save=function(){var a=new fg(this),b=[],c=0;b[c++]=this.$b;b[c++]=kh(this);b[c++]=lh(this);for(var d=0;d<this.F.length;d++)b[c++]=this.F[d];a.set(0,b);return a.data()};
@ -232,113 +232,113 @@ function Pi(a){kf.call(this);return a}function Qi(a,b){a=Ri.call(this,this.S(),b
function Ri(a,b){a=(a<<16>>16)*(b<<16>>16)|0;32767<a||-32768>a?(tg(this),vg(this)):(ug(this),wg(this));this.A-=-1===this.C?9:12;return a&65535}function Ti(a,b){Ui.call(this,a,b);this.Za!=this.Ba>>31?(tg(this),vg(this)):(ug(this),wg(this));this.A-=-1===this.C?9:12;return this.Ba}function Wi(a,b){this.A-=14+(-1===this.C?0:2);Ag(this);-1!==this.xb.load(b)&&this.xb.qc>=this.La&&this.xb.qc>=(b&3)&&(Cg(this),a=this.xb.nb&-256,2<this.V&&(a|=(this.xb.ext&-65281)<<16));return a}
function Xi(a,b){if(-1===this.C)return kf.call(this),a;ve(this,this.ja(this.C+this.V));this.A-=this.B.Ze;return b}function Yi(){this.A-=this.B.rk;return this.C}function Zi(a,b){if(-1===this.C)return kf.call(this),a;we(this,this.ja(this.C+this.V));this.A-=this.B.Ze;return b}function $i(a,b){if(-1===this.C)return kf.call(this),a;a=this.ja(this.C+this.V);this.Ga.load(a);this.A-=this.B.Ze;return b}
function aj(a,b){if(-1===this.C)return kf.call(this),a;a=this.ja(this.C+this.V);this.Ia.load(a);this.A-=this.B.Ze;return b}function bj(a,b){this.A-=14+(-1===this.C?0:2);if(b&65528&&-1!==this.xb.load(b)&&(7168==(this.xb.nb&7168)||this.xb.qc>=this.La)&&this.xb.qc>=(b&3))return Cg(this),this.xb.Pa;Ag(this);return a}function cj(a,b){if(-1===this.C)return kf.call(this),a;oe(this,this.ja(this.C+this.V));this.A-=this.B.Ze;return b}
function dj(a,b){this.A-=-1===this.F?-1===this.C?this.B.yk:this.B.xk:this.B.vk;return b}function ej(a,b){switch(this.ga>>3&7){case 4:this.xa=this.D;break;case 5:this.xa=this.I;break;case 6:this.xa=this.L;break;case 7:this.xa=this.G}return b}function oj(a,b){return b}
function pj(a,b){a=this.ga>>3&7;switch(a){case 0:this.xa=this.D;break;case 2:this.xa=this.L;break;case 3:this.xa=this.G;break;default:if(80286==this.da||80386==this.da&&4!=a&&5!=a)x.call(this,6);else switch(a){case 1:this.xa=this.I;break;case 4:this.xa=y(this);break;case 5:this.xa=this.M;break;case 6:this.xa=this.K;break;case 7:this.xa=this.J}}return dj.call(this,0,b)}
function dj(a,b){this.A-=-1===this.F?-1===this.C?this.B.yk:this.B.xk:this.B.vk;return b}function ej(a,b){switch(this.ga>>3&7){case 4:this.xa=this.D;break;case 5:this.xa=this.I;break;case 6:this.xa=this.L;break;case 7:this.xa=this.G}return b}function fj(a,b){return b}
function gj(a,b){a=this.ga>>3&7;switch(a){case 0:this.xa=this.D;break;case 2:this.xa=this.L;break;case 3:this.xa=this.G;break;default:if(80286==this.da||80386==this.da&&4!=a&&5!=a)x.call(this,6);else switch(a){case 1:this.xa=this.I;break;case 4:this.xa=y(this);break;case 5:this.xa=this.M;break;case 6:this.xa=this.K;break;case 7:this.xa=this.J}}return dj.call(this,0,b)}
function qj(a,b){switch(this.ga>>3&7){case 0:b=this.oa.U;break;case 1:b=this.Z.U;break;case 2:b=this.Y.U;break;case 3:b=this.Da.U;break;case 4:if(80386<=this.da){b=this.Ga.U;break}x.call(this,6);b=a;break;case 5:if(80386<=this.da){b=this.Ia.U;break}default:x.call(this,6),b=a}-1!==this.F&&se(this,2);return dj.call(this,0,b)}
function Vi(a,b){if(a&-65536||b&-65536){var c=b&65535;b>>>=16;var d=a&65535;a>>>=16;var e=c*d,d=(e>>>16)+b*d,f=d>>>16,d=(d&65535)+c*a;this.Ba=d<<16|e&65535;this.Za=f+((d>>>16)+b*a)|0}else this.Ba=a*b|0,this.Za=0}function rj(a,b){this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return sg(this,a|b,128)}function sj(a,b){this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return sg(this,a|b,this.Fb)&this.R}
function tj(a,b){var c=a-b-yg(this)|0;lg(this,a,b,c,191,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return c&255}function uj(a,b){var c=a-b-yg(this)|0;lg(this,a,b,c,this.Fb|63,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return c&this.R}function vj(){return rg(this)?1:0}function wj(){return mg(this)?1:0}function xj(){return mg(this)?0:1}function yj(){return pg(this)?1:0}function zj(){return pg(this)?0:1}function Aj(){return mg(this)||pg(this)?1:0}
function Bj(){return mg(this)||pg(this)?0:1}function Cj(){return qg(this)?1:0}function Dj(){return qg(this)?0:1}function Ej(){return ng(this)?1:0}function Fj(){return ng(this)?0:1}function Gj(){return!qg(this)!=!rg(this)?1:0}function Hj(){return!qg(this)!=!rg(this)?0:1}function Ij(){return pg(this)||!qg(this)!=!rg(this)?1:0}function Jj(){return pg(this)||!qg(this)!=!rg(this)?0:1}function Kj(a,b){return Lj.call(this,a,b,this.ra())}function Mj(a,b){return Nj.call(this,a,b,this.ra())}
function Oj(a,b){return Lj.call(this,a,b,this.I&31)}function Pj(a,b){return Nj.call(this,a,b,this.I&31)}function Qj(a,b){return Rj.call(this,a,b,this.ra())}function Sj(a,b){return Tj.call(this,a,b,this.ra())}function Uj(a,b){return Rj.call(this,a,b,this.I&31)}function Vj(a,b){return Tj.call(this,a,b,this.I&31)}function Wj(a,b){var c=a-b|0;lg(this,a,b,c,191,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return c&255}
function Bj(){return mg(this)||pg(this)?0:1}function Cj(){return qg(this)?1:0}function Dj(){return qg(this)?0:1}function Ej(){return ng(this)?1:0}function Fj(){return ng(this)?0:1}function Gj(){return!qg(this)!=!rg(this)?1:0}function Hj(){return!qg(this)!=!rg(this)?0:1}function Ij(){return pg(this)||!qg(this)!=!rg(this)?1:0}function Jj(){return pg(this)||!qg(this)!=!rg(this)?0:1}function Kj(a,b){return Lj.call(this,a,b,this.sa())}function Mj(a,b){return Nj.call(this,a,b,this.sa())}
function Oj(a,b){return Lj.call(this,a,b,this.I&31)}function Pj(a,b){return Nj.call(this,a,b,this.I&31)}function Qj(a,b){return Rj.call(this,a,b,this.sa())}function Sj(a,b){return Tj.call(this,a,b,this.sa())}function Uj(a,b){return Rj.call(this,a,b,this.I&31)}function Vj(a,b){return Tj.call(this,a,b,this.I&31)}function Wj(a,b){var c=a-b|0;lg(this,a,b,c,191,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return c&255}
function Xj(a,b){var c=a-b|0;lg(this,a,b,c,this.Fb|63,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return c&this.R}function Yj(a,b){sg(this,a&b,128);this.A-=-1===this.F?-1===this.C?this.B.ei:this.B.Hf:this.B.Hf;this.N|=2;return a}function Zj(a,b){sg(this,a&b,this.Fb);this.A-=-1===this.F?-1===this.C?this.B.ei:this.B.Hf:this.B.Hf;this.N|=2;return a}function ak(a,b){var c=this.D&this.R,d=(1<<(this.I&31))-1;return a&~(d<<c)|(b&d)<<c}
function bk(a,b){return b>>(this.D&this.R)&(1<<(this.I&31))-1&this.R}function ck(a,b){if(-1===this.C){switch(this.ga&7){case 0:this.D=this.D&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.L=this.L&-256|a;break;case 3:this.G=this.G&-256|a;break;case 4:this.D=this.D&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.L=this.L&-65281|a<<8;break;case 7:this.G=this.G&-65281|a<<8}this.A-=this.B.gi}else this.F=this.C,Ng(this,a),this.A-=this.B.fi;return b}
function dk(a,b){if(-1===this.C){switch(this.ga&7){case 0:this.D=this.D&~this.R|a;break;case 1:this.I=this.I&~this.R|a;break;case 2:this.L=this.L&~this.R|a;break;case 3:this.G=this.G&~this.R|a;break;case 4:pe(this,y(this)&~this.R|a);break;case 5:this.M=this.G&~this.R|a;break;case 6:this.K=this.K&~this.R|a;break;case 7:this.J=this.J&~this.R|a}this.A-=this.B.gi}else this.F=this.C,this.N&2||this.Eb(this.gb.dc(this.tb,this.V),a),this.A-=this.B.fi;return b}
function ek(a,b){a^=b;sg(this,a,128);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return a}function fk(a,b){this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Jb:this.B.Ac;return sg(this,a^b,this.Fb)&this.R}function gk(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function hk(a){var b=a-1|0;lg(this,a,1,b,this.Fb|62,!0);this.A-=2;return a&~this.R|b&this.R}
function ik(a,b,c){c>>>=0;if(!c||c<=b>>>0)return!1;var d=0,e=1,f=this.hn;f[0]=c>>>0;f[1]=0;c=this.jn;c[0]=a>>>0;for(c[1]=b>>>0;0<gk(c,f);)b=a=f,a[0]+=b[0],a[1]+=b[1],4294967295<a[0]&&(a[0]>>>=0,a[1]++),e+=e;do 0<=gk(c,f)&&(a=c,b=f,a[0]-=b[0],a[1]-=b[1],0>a[0]&&(a[0]>>>=0,a[1]--),d+=e),a=f,a[0]>>>=1,a[1]&1&&(a[0]=(a[0]|2147483648)>>>0),a[1]>>>=1,e/=2;while(1<=e);this.Ba=d;this.Za=c[0];return!0}function jk(a){var b=a+1|0;lg(this,a,1,b,this.Fb|62);this.A-=2;return a&~this.R|b&this.R}
function kk(a){this.qa=a;re(this);this.qa&-2147483648?Af(this):Df(this)}function He(a){this.Uc=a;zc(this)}function lk(a){this.N|=1;this.tc.call(this,a);this.A-=-1===this.C?4:5}function Lj(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a<<c-1;a=(d<<1|b>>>16-c)&65535;sg(this,a,32768,d&32768)}return a}function Nj(a,b,c){if(c){var d=a<<c-1;a=d<<1|b>>>32-c;sg(this,a,-2147483648,d&-2147483648)}return a}
function Rj(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a>>>c-1;a=(d>>>1|b<<16-c)&65535;sg(this,a,32768,d&1)}return a}function Tj(a,b,c){if(c){var d=a>>>c-1;a=d>>>1|b<<32-c;sg(this,a,-2147483648,d&1)}return a}function mk(){this.A-=-1===this.C?2:this.B.Lk;return 1}function nk(){var a=this.I&255;this.A-=(-1===this.C?this.B.Yh:this.B.Xh)+(a<<this.B.Zh);return a}function ok(){var a=this.ra();this.A-=(-1===this.C?this.B.Yh:this.B.Xh)+(a<<this.B.Zh);return a}function pk(){return null}
function qk(){return this.xa}function rk(a,b){this.od=this.Z.U;this.Tc=this.Y.U;this.sa=this.Aa;var c=z(this),d=this.V;null!=Ge(this,a,b,!0)&&(ue(this,this.od,d,2),ue(this,c,d,d));this.od=this.Tc=this.sa=-1}function sk(a,b,c){this.A-=this.B.ik+(c||0);c=Ee(this);var d=this.Z.U,e=z(this);a=this.Z.Hj(a);-1!==a&&(xe(this,c),xe(this,d),xe(this,e),null!=b&&xe(this,b),this.Kc=-1,ig(this,a))}
function tk(a){this.Tc=this.Y.U;this.sa=this.Aa;var b=ne(this),c=ne(this);a&&pe(this,y(this)+a);Ge(this,b,c,!1)&&(a&&pe(this,y(this)+a),uk.call(this,this.Da),uk.call(this,this.oa),80386<=this.da&&(uk.call(this,this.Ga),uk.call(this,this.Ia)));2==a&&this.bg&&cg(this,this.ea);this.Tc=this.sa=-1}function vk(){8086==this.da?(this.Kc=-1,sk.call(this,0,null,2)):x.call(this,0,null,2)}function Ug(a,b){this.Kc=a;void 0===b&&(b=11);sk.call(this,a,null,b)}
function x(a,b,c,d){var e=!1;this.ba.complete?80186<=this.da&&(e=!0,0>this.Kc?(-1!=this.od&&(this.od!==this.Z.U&&(this.Z.zb=this.od&3,hg(this,this.od)),this.od=-1),this.pd!==this.ea&&ig(this,this.pd),-1!=this.Tc&&(this.Tc!==this.Y.U&&oe(this,this.Tc),this.Tc=-1),-1!==this.sa&&(this.sa!==this.Aa&&pe(this,this.zc&~this.Y.wa|this.sa-this.Y.ta),this.sa=-1)):8!=this.Kc?(b=0,a=8):(b=0,a=-1,yf(this),e=d=!1)):ig(this,this.pd);var f=a,g=b,h=32,k=Hg(this,this.ea);204!=k||this.ad||(d=!1);this.O&131072&&(6==
function Rj(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a>>>c-1;a=(d>>>1|b<<16-c)&65535;sg(this,a,32768,d&1)}return a}function Tj(a,b,c){if(c){var d=a>>>c-1;a=d>>>1|b<<32-c;sg(this,a,-2147483648,d&1)}return a}function mk(){this.A-=-1===this.C?2:this.B.Lk;return 1}function nk(){var a=this.I&255;this.A-=(-1===this.C?this.B.Yh:this.B.Xh)+(a<<this.B.Zh);return a}function ok(){var a=this.sa();this.A-=(-1===this.C?this.B.Yh:this.B.Xh)+(a<<this.B.Zh);return a}function pk(){return null}
function qk(){return this.xa}function rk(a,b){this.od=this.Z.U;this.Tc=this.Y.U;this.ra=this.Aa;var c=z(this),d=this.V;null!=Ge(this,a,b,!0)&&(ue(this,this.od,d,2),ue(this,c,d,d));this.od=this.Tc=this.ra=-1}function sk(a,b,c){this.A-=this.B.ik+(c||0);c=Ee(this);var d=this.Z.U,e=z(this);a=this.Z.Hj(a);-1!==a&&(xe(this,c),xe(this,d),xe(this,e),null!=b&&xe(this,b),this.Kc=-1,ig(this,a))}
function tk(a){this.Tc=this.Y.U;this.ra=this.Aa;var b=ne(this),c=ne(this);a&&pe(this,y(this)+a);Ge(this,b,c,!1)&&(a&&pe(this,y(this)+a),uk.call(this,this.Da),uk.call(this,this.oa),80386<=this.da&&(uk.call(this,this.Ga),uk.call(this,this.Ia)));2==a&&this.bg&&cg(this,this.ea);this.Tc=this.ra=-1}function vk(){8086==this.da?(this.Kc=-1,sk.call(this,0,null,2)):x.call(this,0,null,2)}function Ug(a,b){this.Kc=a;void 0===b&&(b=11);sk.call(this,a,null,b)}
function x(a,b,c,d){var e=!1;this.ba.complete?80186<=this.da&&(e=!0,0>this.Kc?(-1!=this.od&&(this.od!==this.Z.U&&(this.Z.zb=this.od&3,hg(this,this.od)),this.od=-1),this.pd!==this.ea&&ig(this,this.pd),-1!=this.Tc&&(this.Tc!==this.Y.U&&oe(this,this.Tc),this.Tc=-1),-1!==this.ra&&(this.ra!==this.Aa&&pe(this,this.zc&~this.Y.wa|this.ra-this.Y.ta),this.ra=-1)):8!=this.Kc?(b=0,a=8):(b=0,a=-1,yf(this),e=d=!1)):ig(this,this.pd);var f=a,g=b,h=32,k=Hg(this,this.ea);204!=k||this.ad||(d=!1);this.O&131072&&(6==
f&&99==k||13==f&&205==k)&&(d=!1);!1===d&&(h|=1);983040<=this.ea&&1048575>=this.ea&&(d=!1);r(this,h|-2147483648)&&(d=!0);if(r(this,h)||d){var m=this.ba.ab,f="Fault "+ta(f)+(null!=g?" ("+ua(g)+")":"")+" on opcode "+ta(k);d&&m&&(f+=" (blocked)");this.ca?(Rb(this,f,d||h,!0),d&&(d=m,this.ca.Kb())):(this.Ca(f),this.Kb())}if(d&&e)throw-1;if(e)throw this.Kc=a,sk.call(this,a,b,c),this.pd=this.ea,this.N=1==a?this.N|8192:this.N|4096,a;}
function Cf(a,b,c){this.qd=a;a=0;b&&(a|=1);c&&(a|=2);3==this.La&&(a|=4);x.call(this,14,a)}function uk(a){var b=a.nb&7680;a.U&65528&&(6144==b||7168==b||7168>b&&a.qc<this.La&&a.qc<(a.U&3))&&a.load(0)}
function Hf(a){var b,c;switch((this.ga=this.ra())&199){case 0:c=C(this,this.G+this.K);this.A-=this.B.Rc;break;case 1:c=C(this,this.G+this.J);this.A-=this.B.Sc;break;case 2:c=Jg(this,this.M+this.K);this.A-=this.B.Sc;break;case 3:c=Jg(this,this.M+this.J);this.A-=this.B.Rc;break;case 4:c=C(this,this.K);this.A-=this.B.wc;break;case 5:c=C(this,this.J);this.A-=this.B.wc;break;case 6:c=C(this,G(this));this.A-=this.B.zd;break;case 7:c=C(this,this.G);this.A-=this.B.wc;break;case 64:c=C(this,this.G+this.K+
function Hf(a){var b,c;switch((this.ga=this.sa())&199){case 0:c=C(this,this.G+this.K);this.A-=this.B.Rc;break;case 1:c=C(this,this.G+this.J);this.A-=this.B.Sc;break;case 2:c=Jg(this,this.M+this.K);this.A-=this.B.Sc;break;case 3:c=Jg(this,this.M+this.J);this.A-=this.B.Rc;break;case 4:c=C(this,this.K);this.A-=this.B.wc;break;case 5:c=C(this,this.J);this.A-=this.B.wc;break;case 6:c=C(this,G(this));this.A-=this.B.zd;break;case 7:c=C(this,this.G);this.A-=this.B.wc;break;case 64:c=C(this,this.G+this.K+
this.S());this.A-=this.B.Ub;break;case 65:c=C(this,this.G+this.J+this.S());this.A-=this.B.Vb;break;case 66:c=Jg(this,this.M+this.K+this.S());this.A-=this.B.Vb;break;case 67:c=Jg(this,this.M+this.J+this.S());this.A-=this.B.Ub;break;case 68:c=C(this,this.K+this.S());this.A-=this.B.Wa;break;case 69:c=C(this,this.J+this.S());this.A-=this.B.Wa;break;case 70:c=Jg(this,this.M+this.S());this.A-=this.B.Wa;break;case 71:c=C(this,this.G+this.S());this.A-=this.B.Wa;break;case 128:c=C(this,this.G+this.K+G(this));
this.A-=this.B.Ub;break;case 129:c=C(this,this.G+this.J+G(this));this.A-=this.B.Vb;break;case 130:c=Jg(this,this.M+this.K+G(this));this.A-=this.B.Vb;break;case 131:c=Jg(this,this.M+this.J+G(this));this.A-=this.B.Ub;break;case 132:c=C(this,this.K+G(this));this.A-=this.B.Wa;break;case 133:c=C(this,this.J+G(this));this.A-=this.B.Wa;break;case 134:c=Jg(this,this.M+G(this));this.A-=this.B.Wa;break;case 135:c=C(this,this.G+G(this));this.A-=this.B.Wa;break;case 192:c=this.D&255;break;case 193:c=this.I&255;
break;case 194:c=this.L&255;break;case 195:c=this.G&255;break;case 196:c=this.D>>8&255;break;case 197:c=this.I>>8&255;break;case 198:c=this.L>>8&255;break;case 199:c=this.G>>8&255;break;default:c=0}var d=this.ga>>3&7;switch(d){case 0:b=this.D&255;break;case 1:b=this.I&255;break;case 2:b=this.L&255;break;case 3:b=this.G&255;break;case 4:b=this.D>>8&255;break;case 5:b=this.I>>8&255;break;case 6:b=this.L>>8&255;break;case 7:b=this.G>>8&255;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.D=
this.D&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.L=this.L&-256|a;break;case 3:this.G=this.G&-256|a;break;case 4:this.D=this.D&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.L=this.L&-65281|a<<8;break;case 7:this.G=this.G&-65281|a<<8}}
function If(a){var b,c,d=(this.ga=this.ra())&199;switch(d){case 0:b=C(this,this.G+this.K);this.F=this.C;break;case 1:b=C(this,this.G+this.J);this.F=this.C;break;case 2:b=Jg(this,this.M+this.K);this.F=this.C;break;case 3:b=Jg(this,this.M+this.J);this.F=this.C;break;case 4:b=C(this,this.K);this.F=this.C;break;case 5:b=C(this,this.J);this.F=this.C;break;case 6:b=C(this,G(this));this.F=this.C;break;case 7:b=C(this,this.G);this.F=this.C;break;case 64:b=C(this,this.G+this.K+this.S());this.F=this.C;break;
function If(a){var b,c,d=(this.ga=this.sa())&199;switch(d){case 0:b=C(this,this.G+this.K);this.F=this.C;break;case 1:b=C(this,this.G+this.J);this.F=this.C;break;case 2:b=Jg(this,this.M+this.K);this.F=this.C;break;case 3:b=Jg(this,this.M+this.J);this.F=this.C;break;case 4:b=C(this,this.K);this.F=this.C;break;case 5:b=C(this,this.J);this.F=this.C;break;case 6:b=C(this,G(this));this.F=this.C;break;case 7:b=C(this,this.G);this.F=this.C;break;case 64:b=C(this,this.G+this.K+this.S());this.F=this.C;break;
case 65:b=C(this,this.G+this.J+this.S());this.F=this.C;break;case 66:b=Jg(this,this.M+this.K+this.S());this.F=this.C;break;case 67:b=Jg(this,this.M+this.J+this.S());this.F=this.C;break;case 68:b=C(this,this.K+this.S());this.F=this.C;break;case 69:b=C(this,this.J+this.S());this.F=this.C;break;case 70:b=Jg(this,this.M+this.S());this.F=this.C;break;case 71:b=C(this,this.G+this.S());this.F=this.C;break;case 128:b=C(this,this.G+this.K+G(this));this.F=this.C;break;case 129:b=C(this,this.G+this.J+G(this));
this.F=this.C;break;case 130:b=Jg(this,this.M+this.K+G(this));this.F=this.C;break;case 131:b=Jg(this,this.M+this.J+G(this));this.F=this.C;break;case 132:b=C(this,this.K+G(this));this.F=this.C;break;case 133:b=C(this,this.J+G(this));this.F=this.C;break;case 134:b=Jg(this,this.M+G(this));this.F=this.C;break;case 135:b=C(this,this.G+G(this));this.F=this.C;break;case 192:b=this.D&255;break;case 193:b=this.I&255;break;case 194:b=this.L&255;break;case 195:b=this.G&255;break;case 196:b=this.D>>8&255;break;
case 197:b=this.I>>8&255;break;case 198:b=this.L>>8&255;break;case 199:b=this.G>>8&255;break;default:b=0}switch(this.ga>>3&7){case 0:c=this.D&255;break;case 1:c=this.I&255;break;case 2:c=this.L&255;break;case 3:c=this.G&255;break;case 4:c=this.D>>8&255;break;case 5:c=this.I>>8&255;break;case 6:c=this.L>>8&255;break;case 7:c=this.G>>8&255;break;default:c=0}a=a.call(this,b,c);switch(d){case 0:case 3:Ng(this,a);this.A-=this.B.Rc;break;case 1:case 2:Ng(this,a);this.A-=this.B.Sc;break;case 4:case 5:case 7:Ng(this,
a);this.A-=this.B.wc;break;case 6:Ng(this,a);this.A-=this.B.zd;break;case 64:case 67:case 128:case 131:Ng(this,a);this.A-=this.B.Ub;break;case 65:case 66:case 129:case 130:Ng(this,a);this.A-=this.B.Vb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Ng(this,a);this.A-=this.B.Wa;break;case 192:this.D=this.D&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.G=this.G&-256|a;break;case 196:this.D=this.D&-65281|a<<8;break;case 197:this.I=
this.I&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.G=this.G&-65281|a<<8}}
function Jf(a,b){var c,d=(this.ga=this.ra())&199;switch(d){case 0:c=C(this,this.G+this.K);this.F=this.C;break;case 1:c=C(this,this.G+this.J);this.F=this.C;break;case 2:c=Jg(this,this.M+this.K);this.F=this.C;break;case 3:c=Jg(this,this.M+this.J);this.F=this.C;break;case 4:c=C(this,this.K);this.F=this.C;break;case 5:c=C(this,this.J);this.F=this.C;break;case 6:c=C(this,G(this));this.F=this.C;break;case 7:c=C(this,this.G);this.F=this.C;break;case 64:c=C(this,this.G+this.K+this.S());this.F=this.C;break;
function Jf(a,b){var c,d=(this.ga=this.sa())&199;switch(d){case 0:c=C(this,this.G+this.K);this.F=this.C;break;case 1:c=C(this,this.G+this.J);this.F=this.C;break;case 2:c=Jg(this,this.M+this.K);this.F=this.C;break;case 3:c=Jg(this,this.M+this.J);this.F=this.C;break;case 4:c=C(this,this.K);this.F=this.C;break;case 5:c=C(this,this.J);this.F=this.C;break;case 6:c=C(this,G(this));this.F=this.C;break;case 7:c=C(this,this.G);this.F=this.C;break;case 64:c=C(this,this.G+this.K+this.S());this.F=this.C;break;
case 65:c=C(this,this.G+this.J+this.S());this.F=this.C;break;case 66:c=Jg(this,this.M+this.K+this.S());this.F=this.C;break;case 67:c=Jg(this,this.M+this.J+this.S());this.F=this.C;break;case 68:c=C(this,this.K+this.S());this.F=this.C;break;case 69:c=C(this,this.J+this.S());this.F=this.C;break;case 70:c=Jg(this,this.M+this.S());this.F=this.C;break;case 71:c=C(this,this.G+this.S());this.F=this.C;break;case 128:c=C(this,this.G+this.K+G(this));this.F=this.C;break;case 129:c=C(this,this.G+this.J+G(this));
this.F=this.C;break;case 130:c=Jg(this,this.M+this.K+G(this));this.F=this.C;break;case 131:c=Jg(this,this.M+this.J+G(this));this.F=this.C;break;case 132:c=C(this,this.K+G(this));this.F=this.C;break;case 133:c=C(this,this.J+G(this));this.F=this.C;break;case 134:c=Jg(this,this.M+G(this));this.F=this.C;break;case 135:c=C(this,this.G+G(this));this.F=this.C;break;case 192:c=this.D&255;break;case 193:c=this.I&255;break;case 194:c=this.L&255;break;case 195:c=this.G&255;break;case 196:c=this.D>>8&255;break;
case 197:c=this.I>>8&255;break;case 198:c=this.L>>8&255;break;case 199:c=this.G>>8&255;break;default:c=0}a=a[this.ga>>3&7].call(this,c,b.call(this));switch(d){case 0:case 3:Ng(this,a);this.A-=this.B.Rc;break;case 1:case 2:Ng(this,a);this.A-=this.B.Sc;break;case 4:case 5:case 7:Ng(this,a);this.A-=this.B.wc;break;case 6:Ng(this,a);this.A-=this.B.zd;break;case 64:case 67:case 128:case 131:Ng(this,a);this.A-=this.B.Ub;break;case 65:case 66:case 129:case 130:Ng(this,a);this.A-=this.B.Vb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Ng(this,
a);this.A-=this.B.Wa;break;case 192:this.D=this.D&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.G=this.G&-256|a;break;case 196:this.D=this.D&-65281|a<<8;break;case 197:this.I=this.I&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.G=this.G&-65281|a<<8}}
function Kf(a){var b,c;switch((this.ga=this.ra())&199){case 0:c=D(this,this.G+this.K);this.A-=this.B.Rc;break;case 1:c=D(this,this.G+this.J);this.A-=this.B.Sc;break;case 2:c=Lg(this,this.M+this.K);this.A-=this.B.Sc;break;case 3:c=Lg(this,this.M+this.J);this.A-=this.B.Rc;break;case 4:c=D(this,this.K);this.A-=this.B.wc;break;case 5:c=D(this,this.J);this.A-=this.B.wc;break;case 6:c=D(this,G(this));this.A-=this.B.zd;break;case 7:c=D(this,this.G);this.A-=this.B.wc;break;case 64:c=D(this,this.G+this.K+
function Kf(a){var b,c;switch((this.ga=this.sa())&199){case 0:c=D(this,this.G+this.K);this.A-=this.B.Rc;break;case 1:c=D(this,this.G+this.J);this.A-=this.B.Sc;break;case 2:c=Lg(this,this.M+this.K);this.A-=this.B.Sc;break;case 3:c=Lg(this,this.M+this.J);this.A-=this.B.Rc;break;case 4:c=D(this,this.K);this.A-=this.B.wc;break;case 5:c=D(this,this.J);this.A-=this.B.wc;break;case 6:c=D(this,G(this));this.A-=this.B.zd;break;case 7:c=D(this,this.G);this.A-=this.B.wc;break;case 64:c=D(this,this.G+this.K+
this.S());this.A-=this.B.Ub;break;case 65:c=D(this,this.G+this.J+this.S());this.A-=this.B.Vb;break;case 66:c=Lg(this,this.M+this.K+this.S());this.A-=this.B.Vb;break;case 67:c=Lg(this,this.M+this.J+this.S());this.A-=this.B.Ub;break;case 68:c=D(this,this.K+this.S());this.A-=this.B.Wa;break;case 69:c=D(this,this.J+this.S());this.A-=this.B.Wa;break;case 70:c=Lg(this,this.M+this.S());this.A-=this.B.Wa;break;case 71:c=D(this,this.G+this.S());this.A-=this.B.Wa;break;case 128:c=D(this,this.G+this.K+G(this));
this.A-=this.B.Ub;break;case 129:c=D(this,this.G+this.J+G(this));this.A-=this.B.Vb;break;case 130:c=Lg(this,this.M+this.K+G(this));this.A-=this.B.Vb;break;case 131:c=Lg(this,this.M+this.J+G(this));this.A-=this.B.Ub;break;case 132:c=D(this,this.K+G(this));this.A-=this.B.Wa;break;case 133:c=D(this,this.J+G(this));this.A-=this.B.Wa;break;case 134:c=Lg(this,this.M+G(this));this.A-=this.B.Wa;break;case 135:c=D(this,this.G+G(this));this.A-=this.B.Wa;break;case 192:c=this.D&65535;break;case 193:c=this.I&
65535;break;case 194:c=this.L&65535;break;case 195:c=this.G&65535;break;case 196:c=y(this)&65535;break;case 197:c=this.M&65535;break;case 198:c=this.K&65535;break;case 199:c=this.J&65535;break;default:c=0}var d=this.ga>>3&7;switch(d){case 0:b=this.D&65535;break;case 1:b=this.I&65535;break;case 2:b=this.L&65535;break;case 3:b=this.G&65535;break;case 4:b=y(this)&65535;break;case 5:b=this.M&65535;break;case 6:b=this.K&65535;break;case 7:b=this.J&65535;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.D=
this.D&-65536|a;break;case 1:this.I=this.I&-65536|a;break;case 2:this.L=this.L&-65536|a;break;case 3:this.G=this.G&-65536|a;break;case 4:pe(this,y(this)&-65536|a);break;case 5:this.M=this.M&-65536|a;break;case 6:this.K=this.K&-65536|a;break;case 7:this.J=this.J&-65536|a}}
function Lf(a){var b,c,d=(this.ga=this.ra())&199;switch(d){case 0:b=D(this,this.G+this.K);this.F=this.C;break;case 1:b=D(this,this.G+this.J);this.F=this.C;break;case 2:b=Lg(this,this.M+this.K);this.F=this.C;break;case 3:b=Lg(this,this.M+this.J);this.F=this.C;break;case 4:b=D(this,this.K);this.F=this.C;break;case 5:b=D(this,this.J);this.F=this.C;break;case 6:b=D(this,G(this));this.F=this.C;break;case 7:b=D(this,this.G);this.F=this.C;break;case 64:b=D(this,this.G+this.K+this.S());this.F=this.C;break;
function Lf(a){var b,c,d=(this.ga=this.sa())&199;switch(d){case 0:b=D(this,this.G+this.K);this.F=this.C;break;case 1:b=D(this,this.G+this.J);this.F=this.C;break;case 2:b=Lg(this,this.M+this.K);this.F=this.C;break;case 3:b=Lg(this,this.M+this.J);this.F=this.C;break;case 4:b=D(this,this.K);this.F=this.C;break;case 5:b=D(this,this.J);this.F=this.C;break;case 6:b=D(this,G(this));this.F=this.C;break;case 7:b=D(this,this.G);this.F=this.C;break;case 64:b=D(this,this.G+this.K+this.S());this.F=this.C;break;
case 65:b=D(this,this.G+this.J+this.S());this.F=this.C;break;case 66:b=Lg(this,this.M+this.K+this.S());this.F=this.C;break;case 67:b=Lg(this,this.M+this.J+this.S());this.F=this.C;break;case 68:b=D(this,this.K+this.S());this.F=this.C;break;case 69:b=D(this,this.J+this.S());this.F=this.C;break;case 70:b=Lg(this,this.M+this.S());this.F=this.C;break;case 71:b=D(this,this.G+this.S());this.F=this.C;break;case 128:b=D(this,this.G+this.K+G(this));this.F=this.C;break;case 129:b=D(this,this.G+this.J+G(this));
this.F=this.C;break;case 130:b=Lg(this,this.M+this.K+G(this));this.F=this.C;break;case 131:b=Lg(this,this.M+this.J+G(this));this.F=this.C;break;case 132:b=D(this,this.K+G(this));this.F=this.C;break;case 133:b=D(this,this.J+G(this));this.F=this.C;break;case 134:b=Lg(this,this.M+G(this));this.F=this.C;break;case 135:b=D(this,this.G+G(this));this.F=this.C;break;case 192:b=this.D&65535;break;case 193:b=this.I&65535;break;case 194:b=this.L&65535;break;case 195:b=this.G&65535;break;case 196:b=y(this)&65535;
break;case 197:b=this.M&65535;break;case 198:b=this.K&65535;break;case 199:b=this.J&65535;break;default:b=0}switch(this.ga>>3&7){case 0:c=this.D&65535;break;case 1:c=this.I&65535;break;case 2:c=this.L&65535;break;case 3:c=this.G&65535;break;case 4:c=y(this)&65535;break;case 5:c=this.M&65535;break;case 6:c=this.K&65535;break;case 7:c=this.J&65535;break;default:c=0}a=a.call(this,b,c);switch(d){case 0:case 3:Og(this,a);this.A-=this.B.Rc;break;case 1:case 2:Og(this,a);this.A-=this.B.Sc;break;case 4:case 5:case 7:Og(this,
a);this.A-=this.B.wc;break;case 6:Og(this,a);this.A-=this.B.zd;break;case 64:case 67:case 128:case 131:Og(this,a);this.A-=this.B.Ub;break;case 65:case 66:case 129:case 130:Og(this,a);this.A-=this.B.Vb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Og(this,a);this.A-=this.B.Wa;break;case 192:this.D=this.D&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.L=this.L&-65536|a;break;case 195:this.G=this.G&-65536|a;break;case 196:pe(this,y(this)&-65536|a);break;
case 197:this.M=this.M&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a}}
function Mf(a,b){var c,d=(this.ga=this.ra())&199;switch(d){case 0:c=D(this,this.G+this.K);this.F=this.C;break;case 1:c=D(this,this.G+this.J);this.F=this.C;break;case 2:c=Lg(this,this.M+this.K);this.F=this.C;break;case 3:c=Lg(this,this.M+this.J);this.F=this.C;break;case 4:c=D(this,this.K);this.F=this.C;break;case 5:c=D(this,this.J);this.F=this.C;break;case 6:c=D(this,G(this));this.F=this.C;break;case 7:c=D(this,this.G);this.F=this.C;break;case 64:c=D(this,this.G+this.K+this.S());this.F=this.C;break;
function Mf(a,b){var c,d=(this.ga=this.sa())&199;switch(d){case 0:c=D(this,this.G+this.K);this.F=this.C;break;case 1:c=D(this,this.G+this.J);this.F=this.C;break;case 2:c=Lg(this,this.M+this.K);this.F=this.C;break;case 3:c=Lg(this,this.M+this.J);this.F=this.C;break;case 4:c=D(this,this.K);this.F=this.C;break;case 5:c=D(this,this.J);this.F=this.C;break;case 6:c=D(this,G(this));this.F=this.C;break;case 7:c=D(this,this.G);this.F=this.C;break;case 64:c=D(this,this.G+this.K+this.S());this.F=this.C;break;
case 65:c=D(this,this.G+this.J+this.S());this.F=this.C;break;case 66:c=Lg(this,this.M+this.K+this.S());this.F=this.C;break;case 67:c=Lg(this,this.M+this.J+this.S());this.F=this.C;break;case 68:c=D(this,this.K+this.S());this.F=this.C;break;case 69:c=D(this,this.J+this.S());this.F=this.C;break;case 70:c=Lg(this,this.M+this.S());this.F=this.C;break;case 71:c=D(this,this.G+this.S());this.F=this.C;break;case 128:c=D(this,this.G+this.K+G(this));this.F=this.C;break;case 129:c=D(this,this.G+this.J+G(this));
this.F=this.C;break;case 130:c=Lg(this,this.M+this.K+G(this));this.F=this.C;break;case 131:c=Lg(this,this.M+this.J+G(this));this.F=this.C;break;case 132:c=D(this,this.K+G(this));this.F=this.C;break;case 133:c=D(this,this.J+G(this));this.F=this.C;break;case 134:c=Lg(this,this.M+G(this));this.F=this.C;break;case 135:c=D(this,this.G+G(this));this.F=this.C;break;case 192:c=this.D&65535;break;case 193:c=this.I&65535;break;case 194:c=this.L&65535;break;case 195:c=this.G&65535;break;case 196:c=y(this)&65535;
break;case 197:c=this.M&65535;break;case 198:c=this.K&65535;break;case 199:c=this.J&65535;break;default:c=0}a=a[this.ga>>3&7].call(this,c,b.call(this));switch(d){case 0:case 3:Og(this,a);this.A-=this.B.Rc;break;case 1:case 2:Og(this,a);this.A-=this.B.Sc;break;case 4:case 5:case 7:Og(this,a);this.A-=this.B.wc;break;case 6:Og(this,a);this.A-=this.B.zd;break;case 64:case 67:case 128:case 131:Og(this,a);this.A-=this.B.Ub;break;case 65:case 66:case 129:case 130:Og(this,a);this.A-=this.B.Vb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Og(this,
a);this.A-=this.B.Wa;break;case 192:this.D=this.D&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.L=this.L&-65536|a;break;case 195:this.G=this.G&-65536|a;break;case 196:pe(this,y(this)&-65536|a);break;case 197:this.M=this.M&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a}}
function Nf(a){var b,c;switch((this.ga=this.ra())&199){case 0:c=E(this,this.G+this.K);this.A-=this.B.Rc;break;case 1:c=E(this,this.G+this.J);this.A-=this.B.Sc;break;case 2:c=Mg(this,this.M+this.K);this.A-=this.B.Sc;break;case 3:c=Mg(this,this.M+this.J);this.A-=this.B.Rc;break;case 4:c=E(this,this.K);this.A-=this.B.wc;break;case 5:c=E(this,this.J);this.A-=this.B.wc;break;case 6:c=E(this,G(this));this.A-=this.B.zd;break;case 7:c=E(this,this.G);this.A-=this.B.wc;break;case 64:c=E(this,this.G+this.K+
function Nf(a){var b,c;switch((this.ga=this.sa())&199){case 0:c=E(this,this.G+this.K);this.A-=this.B.Rc;break;case 1:c=E(this,this.G+this.J);this.A-=this.B.Sc;break;case 2:c=Mg(this,this.M+this.K);this.A-=this.B.Sc;break;case 3:c=Mg(this,this.M+this.J);this.A-=this.B.Rc;break;case 4:c=E(this,this.K);this.A-=this.B.wc;break;case 5:c=E(this,this.J);this.A-=this.B.wc;break;case 6:c=E(this,G(this));this.A-=this.B.zd;break;case 7:c=E(this,this.G);this.A-=this.B.wc;break;case 64:c=E(this,this.G+this.K+
this.S());this.A-=this.B.Ub;break;case 65:c=E(this,this.G+this.J+this.S());this.A-=this.B.Vb;break;case 66:c=Mg(this,this.M+this.K+this.S());this.A-=this.B.Vb;break;case 67:c=Mg(this,this.M+this.J+this.S());this.A-=this.B.Ub;break;case 68:c=E(this,this.K+this.S());this.A-=this.B.Wa;break;case 69:c=E(this,this.J+this.S());this.A-=this.B.Wa;break;case 70:c=Mg(this,this.M+this.S());this.A-=this.B.Wa;break;case 71:c=E(this,this.G+this.S());this.A-=this.B.Wa;break;case 128:c=E(this,this.G+this.K+G(this));
this.A-=this.B.Ub;break;case 129:c=E(this,this.G+this.J+G(this));this.A-=this.B.Vb;break;case 130:c=Mg(this,this.M+this.K+G(this));this.A-=this.B.Vb;break;case 131:c=Mg(this,this.M+this.J+G(this));this.A-=this.B.Ub;break;case 132:c=E(this,this.K+G(this));this.A-=this.B.Wa;break;case 133:c=E(this,this.J+G(this));this.A-=this.B.Wa;break;case 134:c=Mg(this,this.M+G(this));this.A-=this.B.Wa;break;case 135:c=E(this,this.G+G(this));this.A-=this.B.Wa;break;case 192:c=this.D;break;case 193:c=this.I;break;
case 194:c=this.L;break;case 195:c=this.G;break;case 196:c=y(this);break;case 197:c=this.M;break;case 198:c=this.K;break;case 199:c=this.J;break;default:c=0}var d=this.ga>>3&7;switch(d){case 0:b=this.D;break;case 1:b=this.I;break;case 2:b=this.L;break;case 3:b=this.G;break;case 4:b=y(this);break;case 5:b=this.M;break;case 6:b=this.K;break;case 7:b=this.J;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.D=a;break;case 1:this.I=a;break;case 2:this.L=a;break;case 3:this.G=a;break;case 4:pe(this,
a);break;case 5:this.M=a;break;case 6:this.K=a;break;case 7:this.J=a}}
function Of(a){var b,c,d=(this.ga=this.ra())&199;switch(d){case 0:b=E(this,this.G+this.K);this.F=this.C;break;case 1:b=E(this,this.G+this.J);this.F=this.C;break;case 2:b=Mg(this,this.M+this.K);this.F=this.C;break;case 3:b=Mg(this,this.M+this.J);this.F=this.C;break;case 4:b=E(this,this.K);this.F=this.C;break;case 5:b=E(this,this.J);this.F=this.C;break;case 6:b=E(this,G(this));this.F=this.C;break;case 7:b=E(this,this.G);this.F=this.C;break;case 64:b=E(this,this.G+this.K+this.S());this.F=this.C;break;
function Of(a){var b,c,d=(this.ga=this.sa())&199;switch(d){case 0:b=E(this,this.G+this.K);this.F=this.C;break;case 1:b=E(this,this.G+this.J);this.F=this.C;break;case 2:b=Mg(this,this.M+this.K);this.F=this.C;break;case 3:b=Mg(this,this.M+this.J);this.F=this.C;break;case 4:b=E(this,this.K);this.F=this.C;break;case 5:b=E(this,this.J);this.F=this.C;break;case 6:b=E(this,G(this));this.F=this.C;break;case 7:b=E(this,this.G);this.F=this.C;break;case 64:b=E(this,this.G+this.K+this.S());this.F=this.C;break;
case 65:b=E(this,this.G+this.J+this.S());this.F=this.C;break;case 66:b=Mg(this,this.M+this.K+this.S());this.F=this.C;break;case 67:b=Mg(this,this.M+this.J+this.S());this.F=this.C;break;case 68:b=E(this,this.K+this.S());this.F=this.C;break;case 69:b=E(this,this.J+this.S());this.F=this.C;break;case 70:b=Mg(this,this.M+this.S());this.F=this.C;break;case 71:b=E(this,this.G+this.S());this.F=this.C;break;case 128:b=E(this,this.G+this.K+G(this));this.F=this.C;break;case 129:b=E(this,this.G+this.J+G(this));
this.F=this.C;break;case 130:b=Mg(this,this.M+this.K+G(this));this.F=this.C;break;case 131:b=Mg(this,this.M+this.J+G(this));this.F=this.C;break;case 132:b=E(this,this.K+G(this));this.F=this.C;break;case 133:b=E(this,this.J+G(this));this.F=this.C;break;case 134:b=Mg(this,this.M+G(this));this.F=this.C;break;case 135:b=E(this,this.G+G(this));this.F=this.C;break;case 192:b=this.D;break;case 193:b=this.I;break;case 194:b=this.L;break;case 195:b=this.G;break;case 196:b=y(this);break;case 197:b=this.M;break;
case 198:b=this.K;break;case 199:b=this.J;break;default:b=0}switch(this.ga>>3&7){case 0:c=this.D;break;case 1:c=this.I;break;case 2:c=this.L;break;case 3:c=this.G;break;case 4:c=y(this);break;case 5:c=this.M;break;case 6:c=this.K;break;case 7:c=this.J;break;default:c=0}a=a.call(this,b,c);switch(d){case 0:case 3:Pg(this,a);this.A-=this.B.Rc;break;case 1:case 2:Pg(this,a);this.A-=this.B.Sc;break;case 4:case 5:case 7:Pg(this,a);this.A-=this.B.wc;break;case 6:Pg(this,a);this.A-=this.B.zd;break;case 64:case 67:case 128:case 131:Pg(this,
a);this.A-=this.B.Ub;break;case 65:case 66:case 129:case 130:Pg(this,a);this.A-=this.B.Vb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Pg(this,a);this.A-=this.B.Wa;break;case 192:this.D=a;break;case 193:this.I=a;break;case 194:this.L=a;break;case 195:this.G=a;break;case 196:pe(this,a);break;case 197:this.M=a;break;case 198:this.K=a;break;case 199:this.J=a}}
function Pf(a,b){var c,d=(this.ga=this.ra())&199;switch(d){case 0:c=E(this,this.G+this.K);this.F=this.C;break;case 1:c=E(this,this.G+this.J);this.F=this.C;break;case 2:c=Mg(this,this.M+this.K);this.F=this.C;break;case 3:c=Mg(this,this.M+this.J);this.F=this.C;break;case 4:c=E(this,this.K);this.F=this.C;break;case 5:c=E(this,this.J);this.F=this.C;break;case 6:c=E(this,G(this));this.F=this.C;break;case 7:c=E(this,this.G);this.F=this.C;break;case 64:c=E(this,this.G+this.K+this.S());this.F=this.C;break;
function Pf(a,b){var c,d=(this.ga=this.sa())&199;switch(d){case 0:c=E(this,this.G+this.K);this.F=this.C;break;case 1:c=E(this,this.G+this.J);this.F=this.C;break;case 2:c=Mg(this,this.M+this.K);this.F=this.C;break;case 3:c=Mg(this,this.M+this.J);this.F=this.C;break;case 4:c=E(this,this.K);this.F=this.C;break;case 5:c=E(this,this.J);this.F=this.C;break;case 6:c=E(this,G(this));this.F=this.C;break;case 7:c=E(this,this.G);this.F=this.C;break;case 64:c=E(this,this.G+this.K+this.S());this.F=this.C;break;
case 65:c=E(this,this.G+this.J+this.S());this.F=this.C;break;case 66:c=Mg(this,this.M+this.K+this.S());this.F=this.C;break;case 67:c=Mg(this,this.M+this.J+this.S());this.F=this.C;break;case 68:c=E(this,this.K+this.S());this.F=this.C;break;case 69:c=E(this,this.J+this.S());this.F=this.C;break;case 70:c=Mg(this,this.M+this.S());this.F=this.C;break;case 71:c=E(this,this.G+this.S());this.F=this.C;break;case 128:c=E(this,this.G+this.K+G(this));this.F=this.C;break;case 129:c=E(this,this.G+this.J+G(this));
this.F=this.C;break;case 130:c=Mg(this,this.M+this.K+G(this));this.F=this.C;break;case 131:c=Mg(this,this.M+this.J+G(this));this.F=this.C;break;case 132:c=E(this,this.K+G(this));this.F=this.C;break;case 133:c=E(this,this.J+G(this));this.F=this.C;break;case 134:c=Mg(this,this.M+G(this));this.F=this.C;break;case 135:c=E(this,this.G+G(this));this.F=this.C;break;case 192:c=this.D;break;case 193:c=this.I;break;case 194:c=this.L;break;case 195:c=this.G;break;case 196:c=y(this);break;case 197:c=this.M;break;
case 198:c=this.K;break;case 199:c=this.J}a=a[this.ga>>3&7].call(this,c,b.call(this));switch(d){case 0:case 3:Pg(this,a);this.A-=this.B.Rc;break;case 1:case 2:Pg(this,a);this.A-=this.B.Sc;break;case 4:case 5:case 7:Pg(this,a);this.A-=this.B.wc;break;case 6:Pg(this,a);this.A-=this.B.zd;break;case 64:case 67:case 128:case 131:Pg(this,a);this.A-=this.B.Ub;break;case 65:case 66:case 129:case 130:Pg(this,a);this.A-=this.B.Vb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Pg(this,
a);this.A-=this.B.Wa;break;case 192:this.D=a;break;case 193:this.I=a;break;case 194:this.L=a;break;case 195:this.G=a;break;case 196:pe(this,a);break;case 197:this.M=a;break;case 198:this.K=a;break;case 199:this.J=a}}
function Qf(a){var b,c;switch((this.ga=this.ra())&199){case 0:c=C(this,this.D);break;case 1:c=C(this,this.I);break;case 2:c=C(this,this.L);break;case 3:c=C(this,this.G);break;case 4:c=C(this,wk.call(this,0));break;case 5:c=C(this,G(this));break;case 6:c=C(this,this.K);break;case 7:c=C(this,this.J);break;case 64:c=C(this,this.D+this.S());break;case 65:c=C(this,this.I+this.S());break;case 66:c=C(this,this.L+this.S());break;case 67:c=C(this,this.G+this.S());break;case 68:c=C(this,wk.call(this,1)+this.S());
function Qf(a){var b,c;switch((this.ga=this.sa())&199){case 0:c=C(this,this.D);break;case 1:c=C(this,this.I);break;case 2:c=C(this,this.L);break;case 3:c=C(this,this.G);break;case 4:c=C(this,wk.call(this,0));break;case 5:c=C(this,G(this));break;case 6:c=C(this,this.K);break;case 7:c=C(this,this.J);break;case 64:c=C(this,this.D+this.S());break;case 65:c=C(this,this.I+this.S());break;case 66:c=C(this,this.L+this.S());break;case 67:c=C(this,this.G+this.S());break;case 68:c=C(this,wk.call(this,1)+this.S());
break;case 69:c=Jg(this,this.M+this.S());break;case 70:c=C(this,this.K+this.S());break;case 71:c=C(this,this.J+this.S());break;case 128:c=C(this,this.D+G(this));break;case 129:c=C(this,this.I+G(this));break;case 130:c=C(this,this.L+G(this));break;case 131:c=C(this,this.G+G(this));break;case 132:c=C(this,wk.call(this,2)+G(this));break;case 133:c=Jg(this,this.M+G(this));break;case 134:c=C(this,this.K+G(this));break;case 135:c=C(this,this.J+G(this));break;case 192:c=this.D&255;break;case 193:c=this.I&
255;break;case 194:c=this.L&255;break;case 195:c=this.G&255;break;case 196:c=this.D>>8&255;break;case 197:c=this.I>>8&255;break;case 198:c=this.L>>8&255;break;case 199:c=this.G>>8&255;break;default:c=0}var d=this.ga>>3&7;switch(d){case 0:b=this.D&255;break;case 1:b=this.I&255;break;case 2:b=this.L&255;break;case 3:b=this.G&255;break;case 4:b=this.D>>8&255;break;case 5:b=this.I>>8&255;break;case 6:b=this.L>>8&255;break;case 7:b=this.G>>8&255;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.D=
this.D&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.L=this.L&-256|a;break;case 3:this.G=this.G&-256|a;break;case 4:this.D=this.D&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.L=this.L&-65281|a<<8;break;case 7:this.G=this.G&-65281|a<<8}}
function Rf(a){var b,c,d=(this.ga=this.ra())&199;switch(d){case 0:b=C(this,this.D);this.F=this.C;break;case 1:b=C(this,this.I);this.F=this.C;break;case 2:b=C(this,this.L);this.F=this.C;break;case 3:b=C(this,this.G);this.F=this.C;break;case 4:b=C(this,wk.call(this,0));this.F=this.C;break;case 5:b=C(this,G(this));this.F=this.C;break;case 6:b=C(this,this.K);this.F=this.C;break;case 7:b=C(this,this.J);this.F=this.C;break;case 64:b=C(this,this.D+this.S());this.F=this.C;break;case 65:b=C(this,this.I+this.S());
function Rf(a){var b,c,d=(this.ga=this.sa())&199;switch(d){case 0:b=C(this,this.D);this.F=this.C;break;case 1:b=C(this,this.I);this.F=this.C;break;case 2:b=C(this,this.L);this.F=this.C;break;case 3:b=C(this,this.G);this.F=this.C;break;case 4:b=C(this,wk.call(this,0));this.F=this.C;break;case 5:b=C(this,G(this));this.F=this.C;break;case 6:b=C(this,this.K);this.F=this.C;break;case 7:b=C(this,this.J);this.F=this.C;break;case 64:b=C(this,this.D+this.S());this.F=this.C;break;case 65:b=C(this,this.I+this.S());
this.F=this.C;break;case 66:b=C(this,this.L+this.S());this.F=this.C;break;case 67:b=C(this,this.G+this.S());this.F=this.C;break;case 68:b=C(this,wk.call(this,1)+this.S());this.F=this.C;break;case 69:b=Jg(this,this.M+this.S());this.F=this.C;break;case 70:b=C(this,this.K+this.S());this.F=this.C;break;case 71:b=C(this,this.J+this.S());this.F=this.C;break;case 128:b=C(this,this.D+G(this));this.F=this.C;break;case 129:b=C(this,this.I+G(this));this.F=this.C;break;case 130:b=C(this,this.L+G(this));this.F=
this.C;break;case 131:b=C(this,this.G+G(this));this.F=this.C;break;case 132:b=C(this,wk.call(this,2)+G(this));this.F=this.C;break;case 133:b=Jg(this,this.M+G(this));this.F=this.C;break;case 134:b=C(this,this.K+G(this));this.F=this.C;break;case 135:b=C(this,this.J+G(this));this.F=this.C;break;case 192:b=this.D&255;break;case 193:b=this.I&255;break;case 194:b=this.L&255;break;case 195:b=this.G&255;break;case 196:b=this.D>>8&255;break;case 197:b=this.I>>8&255;break;case 198:b=this.L>>8&255;break;case 199:b=
this.G>>8&255;break;default:b=0}switch(this.ga>>3&7){case 0:c=this.D&255;break;case 1:c=this.I&255;break;case 2:c=this.L&255;break;case 3:c=this.G&255;break;case 4:c=this.D>>8&255;break;case 5:c=this.I>>8&255;break;case 6:c=this.L>>8&255;break;case 7:c=this.G>>8&255;break;default:c=0}a=a.call(this,b,c);switch(d){case 192:this.D=this.D&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.G=this.G&-256|a;break;case 196:this.D=this.D&-65281|a<<8;break;case 197:this.I=
this.I&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.G=this.G&-65281|a<<8;break;default:Ng(this,a)}}
function Sf(a,b){var c,d=(this.ga=this.ra())&199;switch(d){case 0:c=C(this,this.D);this.F=this.C;break;case 1:c=C(this,this.I);this.F=this.C;break;case 2:c=C(this,this.L);this.F=this.C;break;case 3:c=C(this,this.G);this.F=this.C;break;case 4:c=C(this,wk.call(this,0));this.F=this.C;break;case 5:c=C(this,G(this));this.F=this.C;break;case 6:c=C(this,this.K);this.F=this.C;break;case 7:c=C(this,this.J);this.F=this.C;break;case 64:c=C(this,this.D+this.S());this.F=this.C;break;case 65:c=C(this,this.I+this.S());
function Sf(a,b){var c,d=(this.ga=this.sa())&199;switch(d){case 0:c=C(this,this.D);this.F=this.C;break;case 1:c=C(this,this.I);this.F=this.C;break;case 2:c=C(this,this.L);this.F=this.C;break;case 3:c=C(this,this.G);this.F=this.C;break;case 4:c=C(this,wk.call(this,0));this.F=this.C;break;case 5:c=C(this,G(this));this.F=this.C;break;case 6:c=C(this,this.K);this.F=this.C;break;case 7:c=C(this,this.J);this.F=this.C;break;case 64:c=C(this,this.D+this.S());this.F=this.C;break;case 65:c=C(this,this.I+this.S());
this.F=this.C;break;case 66:c=C(this,this.L+this.S());this.F=this.C;break;case 67:c=C(this,this.G+this.S());this.F=this.C;break;case 68:c=C(this,wk.call(this,1)+this.S());this.F=this.C;break;case 69:c=Jg(this,this.M+this.S());this.F=this.C;break;case 70:c=C(this,this.K+this.S());this.F=this.C;break;case 71:c=C(this,this.J+this.S());this.F=this.C;break;case 128:c=C(this,this.D+G(this));this.F=this.C;break;case 129:c=C(this,this.I+G(this));this.F=this.C;break;case 130:c=C(this,this.L+G(this));this.F=
this.C;break;case 131:c=C(this,this.G+G(this));this.F=this.C;break;case 132:c=C(this,wk.call(this,2)+G(this));this.F=this.C;break;case 133:c=Jg(this,this.M+G(this));this.F=this.C;break;case 134:c=C(this,this.K+G(this));this.F=this.C;break;case 135:c=C(this,this.J+G(this));this.F=this.C;break;case 192:c=this.D&255;break;case 193:c=this.I&255;break;case 194:c=this.L&255;break;case 195:c=this.G&255;break;case 196:c=this.D>>8&255;break;case 197:c=this.I>>8&255;break;case 198:c=this.L>>8&255;break;case 199:c=
this.G>>8&255;break;default:c=0}a=a[this.ga>>3&7].call(this,c,b.call(this));switch(d){case 192:this.D=this.D&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.G=this.G&-256|a;break;case 196:this.D=this.D&-65281|a<<8;break;case 197:this.I=this.I&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.G=this.G&-65281|a<<8;break;default:Ng(this,a)}}
function Tf(a){var b,c;switch((this.ga=this.ra())&199){case 0:c=D(this,this.D);break;case 1:c=D(this,this.I);break;case 2:c=D(this,this.L);break;case 3:c=D(this,this.G);break;case 4:c=D(this,wk.call(this,0));break;case 5:c=D(this,G(this));break;case 6:c=D(this,this.K);break;case 7:c=D(this,this.J);break;case 64:c=D(this,this.D+this.S());break;case 65:c=D(this,this.I+this.S());break;case 66:c=D(this,this.L+this.S());break;case 67:c=D(this,this.G+this.S());break;case 68:c=D(this,wk.call(this,1)+this.S());
function Tf(a){var b,c;switch((this.ga=this.sa())&199){case 0:c=D(this,this.D);break;case 1:c=D(this,this.I);break;case 2:c=D(this,this.L);break;case 3:c=D(this,this.G);break;case 4:c=D(this,wk.call(this,0));break;case 5:c=D(this,G(this));break;case 6:c=D(this,this.K);break;case 7:c=D(this,this.J);break;case 64:c=D(this,this.D+this.S());break;case 65:c=D(this,this.I+this.S());break;case 66:c=D(this,this.L+this.S());break;case 67:c=D(this,this.G+this.S());break;case 68:c=D(this,wk.call(this,1)+this.S());
break;case 69:c=Lg(this,this.M+this.S());break;case 70:c=D(this,this.K+this.S());break;case 71:c=D(this,this.J+this.S());break;case 128:c=D(this,this.D+G(this));break;case 129:c=D(this,this.I+G(this));break;case 130:c=D(this,this.L+G(this));break;case 131:c=D(this,this.G+G(this));break;case 132:c=D(this,wk.call(this,2)+G(this));break;case 133:c=Lg(this,this.M+G(this));break;case 134:c=D(this,this.K+G(this));break;case 135:c=D(this,this.J+G(this));break;case 192:c=this.D&65535;break;case 193:c=this.I&
65535;break;case 194:c=this.L&65535;break;case 195:c=this.G&65535;break;case 196:c=y(this)&65535;break;case 197:c=this.M&65535;break;case 198:c=this.K&65535;break;case 199:c=this.J&65535;break;default:c=0}var d=this.ga>>3&7;switch(d){case 0:b=this.D&65535;break;case 1:b=this.I&65535;break;case 2:b=this.L&65535;break;case 3:b=this.G&65535;break;case 4:b=y(this)&65535;break;case 5:b=this.M&65535;break;case 6:b=this.K&65535;break;case 7:b=this.J&65535;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.D=
this.D&-65536|a;break;case 1:this.I=this.I&-65536|a;break;case 2:this.L=this.L&-65536|a;break;case 3:this.G=this.G&-65536|a;break;case 4:pe(this,y(this)&-65536|a);break;case 5:this.M=this.M&-65536|a;break;case 6:this.K=this.K&-65536|a;break;case 7:this.J=this.J&-65536|a}}
function Uf(a){var b,c,d=(this.ga=this.ra())&199;switch(d){case 0:b=D(this,this.D);this.F=this.C;break;case 1:b=D(this,this.I);this.F=this.C;break;case 2:b=D(this,this.L);this.F=this.C;break;case 3:b=D(this,this.G);this.F=this.C;break;case 4:b=D(this,wk.call(this,0));this.F=this.C;break;case 5:b=D(this,G(this));this.F=this.C;break;case 6:b=D(this,this.K);this.F=this.C;break;case 7:b=D(this,this.J);this.F=this.C;break;case 64:b=D(this,this.D+this.S());this.F=this.C;break;case 65:b=D(this,this.I+this.S());
function Uf(a){var b,c,d=(this.ga=this.sa())&199;switch(d){case 0:b=D(this,this.D);this.F=this.C;break;case 1:b=D(this,this.I);this.F=this.C;break;case 2:b=D(this,this.L);this.F=this.C;break;case 3:b=D(this,this.G);this.F=this.C;break;case 4:b=D(this,wk.call(this,0));this.F=this.C;break;case 5:b=D(this,G(this));this.F=this.C;break;case 6:b=D(this,this.K);this.F=this.C;break;case 7:b=D(this,this.J);this.F=this.C;break;case 64:b=D(this,this.D+this.S());this.F=this.C;break;case 65:b=D(this,this.I+this.S());
this.F=this.C;break;case 66:b=D(this,this.L+this.S());this.F=this.C;break;case 67:b=D(this,this.G+this.S());this.F=this.C;break;case 68:b=D(this,wk.call(this,1)+this.S());this.F=this.C;break;case 69:b=Lg(this,this.M+this.S());this.F=this.C;break;case 70:b=D(this,this.K+this.S());this.F=this.C;break;case 71:b=D(this,this.J+this.S());this.F=this.C;break;case 128:b=D(this,this.D+G(this));this.F=this.C;break;case 129:b=D(this,this.I+G(this));this.F=this.C;break;case 130:b=D(this,this.L+G(this));this.F=
this.C;break;case 131:b=D(this,this.G+G(this));this.F=this.C;break;case 132:b=D(this,wk.call(this,2)+G(this));this.F=this.C;break;case 133:b=Lg(this,this.M+G(this));this.F=this.C;break;case 134:b=D(this,this.K+G(this));this.F=this.C;break;case 135:b=D(this,this.J+G(this));this.F=this.C;break;case 192:b=this.D&65535;break;case 193:b=this.I&65535;break;case 194:b=this.L&65535;break;case 195:b=this.G&65535;break;case 196:b=y(this)&65535;break;case 197:b=this.M&65535;break;case 198:b=this.K&65535;break;
case 199:b=this.J&65535;break;default:b=0}switch(this.ga>>3&7){case 0:c=this.D&65535;break;case 1:c=this.I&65535;break;case 2:c=this.L&65535;break;case 3:c=this.G&65535;break;case 4:c=y(this)&65535;break;case 5:c=this.M&65535;break;case 6:c=this.K&65535;break;case 7:c=this.J&65535;break;default:c=0}a=a.call(this,b,c);switch(d){case 192:this.D=this.D&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.L=this.L&-65536|a;break;case 195:this.G=this.G&-65536|a;break;case 196:pe(this,y(this)&
-65536|a);break;case 197:this.M=this.M&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a;break;default:Og(this,a)}}
function Vf(a,b){var c,d=(this.ga=this.ra())&199;switch(d){case 0:c=D(this,this.D);this.F=this.C;break;case 1:c=D(this,this.I);this.F=this.C;break;case 2:c=D(this,this.L);this.F=this.C;break;case 3:c=D(this,this.G);this.F=this.C;break;case 4:c=D(this,wk.call(this,0));this.F=this.C;break;case 5:c=D(this,G(this));this.F=this.C;break;case 6:c=D(this,this.K);this.F=this.C;break;case 7:c=D(this,this.J);this.F=this.C;break;case 64:c=D(this,this.D+this.S());this.F=this.C;break;case 65:c=D(this,this.I+this.S());
function Vf(a,b){var c,d=(this.ga=this.sa())&199;switch(d){case 0:c=D(this,this.D);this.F=this.C;break;case 1:c=D(this,this.I);this.F=this.C;break;case 2:c=D(this,this.L);this.F=this.C;break;case 3:c=D(this,this.G);this.F=this.C;break;case 4:c=D(this,wk.call(this,0));this.F=this.C;break;case 5:c=D(this,G(this));this.F=this.C;break;case 6:c=D(this,this.K);this.F=this.C;break;case 7:c=D(this,this.J);this.F=this.C;break;case 64:c=D(this,this.D+this.S());this.F=this.C;break;case 65:c=D(this,this.I+this.S());
this.F=this.C;break;case 66:c=D(this,this.L+this.S());this.F=this.C;break;case 67:c=D(this,this.G+this.S());this.F=this.C;break;case 68:c=D(this,wk.call(this,1)+this.S());this.F=this.C;break;case 69:c=Lg(this,this.M+this.S());this.F=this.C;break;case 70:c=D(this,this.K+this.S());this.F=this.C;break;case 71:c=D(this,this.J+this.S());this.F=this.C;break;case 128:c=D(this,this.D+G(this));this.F=this.C;break;case 129:c=D(this,this.I+G(this));this.F=this.C;break;case 130:c=D(this,this.L+G(this));this.F=
this.C;break;case 131:c=D(this,this.G+G(this));this.F=this.C;break;case 132:c=D(this,wk.call(this,2)+G(this));this.F=this.C;break;case 133:c=Lg(this,this.M+G(this));this.F=this.C;break;case 134:c=D(this,this.K+G(this));this.F=this.C;break;case 135:c=D(this,this.J+G(this));this.F=this.C;break;case 192:c=this.D&65535;break;case 193:c=this.I&65535;break;case 194:c=this.L&65535;break;case 195:c=this.G&65535;break;case 196:c=y(this)&65535;break;case 197:c=this.M&65535;break;case 198:c=this.K&65535;break;
case 199:c=this.J&65535;break;default:c=0}a=a[this.ga>>3&7].call(this,c,b.call(this));switch(d){case 192:this.D=this.D&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.L=this.L&-65536|a;break;case 195:this.G=this.G&-65536|a;break;case 196:pe(this,y(this)&-65536|a);break;case 197:this.M=this.M&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a;break;default:Og(this,a)}}
function Wf(a){var b,c;switch((this.ga=this.ra())&199){case 0:c=E(this,this.D);break;case 1:c=E(this,this.I);break;case 2:c=E(this,this.L);break;case 3:c=E(this,this.G);break;case 4:c=E(this,wk.call(this,0));break;case 5:c=E(this,G(this));break;case 6:c=E(this,this.K);break;case 7:c=E(this,this.J);break;case 64:c=E(this,this.D+this.S());break;case 65:c=E(this,this.I+this.S());break;case 66:c=E(this,this.L+this.S());break;case 67:c=E(this,this.G+this.S());break;case 68:c=E(this,wk.call(this,1)+this.S());
function Wf(a){var b,c;switch((this.ga=this.sa())&199){case 0:c=E(this,this.D);break;case 1:c=E(this,this.I);break;case 2:c=E(this,this.L);break;case 3:c=E(this,this.G);break;case 4:c=E(this,wk.call(this,0));break;case 5:c=E(this,G(this));break;case 6:c=E(this,this.K);break;case 7:c=E(this,this.J);break;case 64:c=E(this,this.D+this.S());break;case 65:c=E(this,this.I+this.S());break;case 66:c=E(this,this.L+this.S());break;case 67:c=E(this,this.G+this.S());break;case 68:c=E(this,wk.call(this,1)+this.S());
break;case 69:c=Mg(this,this.M+this.S());break;case 70:c=E(this,this.K+this.S());break;case 71:c=E(this,this.J+this.S());break;case 128:c=E(this,this.D+G(this));break;case 129:c=E(this,this.I+G(this));break;case 130:c=E(this,this.L+G(this));break;case 131:c=E(this,this.G+G(this));break;case 132:c=E(this,wk.call(this,2)+G(this));break;case 133:c=Mg(this,this.M+G(this));break;case 134:c=E(this,this.K+G(this));break;case 135:c=E(this,this.J+G(this));break;case 192:c=this.D;break;case 193:c=this.I;break;
case 194:c=this.L;break;case 195:c=this.G;break;case 196:c=y(this);break;case 197:c=this.M;break;case 198:c=this.K;break;case 199:c=this.J;break;default:c=0}var d=this.ga>>3&7;switch(d){case 0:b=this.D;break;case 1:b=this.I;break;case 2:b=this.L;break;case 3:b=this.G;break;case 4:b=y(this);break;case 5:b=this.M;break;case 6:b=this.K;break;case 7:b=this.J;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.D=a;break;case 1:this.I=a;break;case 2:this.L=a;break;case 3:this.G=a;break;case 4:pe(this,
a);break;case 5:this.M=a;break;case 6:this.K=a;break;case 7:this.J=a}}
function Xf(a){var b,c,d=(this.ga=this.ra())&199;switch(d){case 0:b=E(this,this.D);this.F=this.C;break;case 1:b=E(this,this.I);this.F=this.C;break;case 2:b=E(this,this.L);this.F=this.C;break;case 3:b=E(this,this.G);this.F=this.C;break;case 4:b=E(this,wk.call(this,0));this.F=this.C;break;case 5:b=E(this,G(this));this.F=this.C;break;case 6:b=E(this,this.K);this.F=this.C;break;case 7:b=E(this,this.J);this.F=this.C;break;case 64:b=E(this,this.D+this.S());this.F=this.C;break;case 65:b=E(this,this.I+this.S());
function Xf(a){var b,c,d=(this.ga=this.sa())&199;switch(d){case 0:b=E(this,this.D);this.F=this.C;break;case 1:b=E(this,this.I);this.F=this.C;break;case 2:b=E(this,this.L);this.F=this.C;break;case 3:b=E(this,this.G);this.F=this.C;break;case 4:b=E(this,wk.call(this,0));this.F=this.C;break;case 5:b=E(this,G(this));this.F=this.C;break;case 6:b=E(this,this.K);this.F=this.C;break;case 7:b=E(this,this.J);this.F=this.C;break;case 64:b=E(this,this.D+this.S());this.F=this.C;break;case 65:b=E(this,this.I+this.S());
this.F=this.C;break;case 66:b=E(this,this.L+this.S());this.F=this.C;break;case 67:b=E(this,this.G+this.S());this.F=this.C;break;case 68:b=E(this,wk.call(this,1)+this.S());this.F=this.C;break;case 69:b=Mg(this,this.M+this.S());this.F=this.C;break;case 70:b=E(this,this.K+this.S());this.F=this.C;break;case 71:b=E(this,this.J+this.S());this.F=this.C;break;case 128:b=E(this,this.D+G(this));this.F=this.C;break;case 129:b=E(this,this.I+G(this));this.F=this.C;break;case 130:b=E(this,this.L+G(this));this.F=
this.C;break;case 131:b=E(this,this.G+G(this));this.F=this.C;break;case 132:b=E(this,wk.call(this,2)+G(this));this.F=this.C;break;case 133:b=Mg(this,this.M+G(this));this.F=this.C;break;case 134:b=E(this,this.K+G(this));this.F=this.C;break;case 135:b=E(this,this.J+G(this));this.F=this.C;break;case 192:b=this.D;break;case 193:b=this.I;break;case 194:b=this.L;break;case 195:b=this.G;break;case 196:b=y(this);break;case 197:b=this.M;break;case 198:b=this.K;break;case 199:b=this.J;break;default:b=0}switch(this.ga>>
3&7){case 0:c=this.D;break;case 1:c=this.I;break;case 2:c=this.L;break;case 3:c=this.G;break;case 4:c=y(this);break;case 5:c=this.M;break;case 6:c=this.K;break;case 7:c=this.J;break;default:c=0}a=a.call(this,b,c);switch(d){case 192:this.D=a;break;case 193:this.I=a;break;case 194:this.L=a;break;case 195:this.G=a;break;case 196:pe(this,a);break;case 197:this.M=a;break;case 198:this.K=a;break;case 199:this.J=a;break;default:Pg(this,a)}}
function Yf(a,b){var c,d=(this.ga=this.ra())&199;switch(d){case 0:c=E(this,this.D);this.F=this.C;break;case 1:c=E(this,this.I);this.F=this.C;break;case 2:c=E(this,this.L);this.F=this.C;break;case 3:c=E(this,this.G);this.F=this.C;break;case 4:c=E(this,wk.call(this,0));this.F=this.C;break;case 5:c=E(this,G(this));this.F=this.C;break;case 6:c=E(this,this.K);this.F=this.C;break;case 7:c=E(this,this.J);this.F=this.C;break;case 64:c=E(this,this.D+this.S());this.F=this.C;break;case 65:c=E(this,this.I+this.S());
function Yf(a,b){var c,d=(this.ga=this.sa())&199;switch(d){case 0:c=E(this,this.D);this.F=this.C;break;case 1:c=E(this,this.I);this.F=this.C;break;case 2:c=E(this,this.L);this.F=this.C;break;case 3:c=E(this,this.G);this.F=this.C;break;case 4:c=E(this,wk.call(this,0));this.F=this.C;break;case 5:c=E(this,G(this));this.F=this.C;break;case 6:c=E(this,this.K);this.F=this.C;break;case 7:c=E(this,this.J);this.F=this.C;break;case 64:c=E(this,this.D+this.S());this.F=this.C;break;case 65:c=E(this,this.I+this.S());
this.F=this.C;break;case 66:c=E(this,this.L+this.S());this.F=this.C;break;case 67:c=E(this,this.G+this.S());this.F=this.C;break;case 68:c=E(this,wk.call(this,1)+this.S());this.F=this.C;break;case 69:c=Mg(this,this.M+this.S());this.F=this.C;break;case 70:c=E(this,this.K+this.S());this.F=this.C;break;case 71:c=E(this,this.J+this.S());this.F=this.C;break;case 128:c=E(this,this.D+G(this));this.F=this.C;break;case 129:c=E(this,this.I+G(this));this.F=this.C;break;case 130:c=E(this,this.L+G(this));this.F=
this.C;break;case 131:c=E(this,this.G+G(this));this.F=this.C;break;case 132:c=E(this,wk.call(this,2)+G(this));this.F=this.C;break;case 133:c=Mg(this,this.M+G(this));this.F=this.C;break;case 134:c=E(this,this.K+G(this));this.F=this.C;break;case 135:c=E(this,this.J+G(this));this.F=this.C;break;case 192:c=this.D;break;case 193:c=this.I;break;case 194:c=this.L;break;case 195:c=this.G;break;case 196:c=y(this);break;case 197:c=this.M;break;case 198:c=this.K;break;case 199:c=this.J;break;default:c=0}a=a[this.ga>>
3&7].call(this,c,b.call(this));switch(d){case 192:this.D=a;break;case 193:this.I=a;break;case 194:this.L=a;break;case 195:this.G=a;break;case 196:pe(this,a);break;case 197:this.M=a;break;case 198:this.K=a;break;case 199:this.J=a;break;default:Pg(this,a)}}
function wk(a){var b=this.ra(),c=b>>6,d,e;switch(b>>3&7){case 0:d=this.D;break;case 1:d=this.I;break;case 2:d=this.L;break;case 3:d=this.G;break;case 4:d=0;break;case 5:d=this.M;break;case 6:d=this.K;break;case 7:d=this.J}switch(b&7){case 0:e=this.D;break;case 1:e=this.I;break;case 2:e=this.L;break;case 3:e=this.G;break;case 4:e=y(this);this.Ea=this.Sb;break;case 5:a?(e=this.M,this.Ea=this.Sb):e=G(this);break;case 6:e=this.K;break;case 7:e=this.J}return(d<<c)+e|0}
function ef(){this.Fd[this.ra()].call(this)}function lf(){xe(this,y(this)&this.R);this.A-=this.B.Jc}function Oe(){this.sa=this.Aa;var a=y(this)&this.R;xe(this,this.D&this.R);xe(this,this.I&this.R);xe(this,this.L&this.R);xe(this,this.G&this.R);xe(this,a);xe(this,this.M&this.R);xe(this,this.K&this.R);xe(this,this.J&this.R);this.A-=this.B.Fk;this.sa=-1}
function Pe(){this.sa=this.Aa;this.J=this.J&~this.R|ne(this);this.K=this.K&~this.R|ne(this);this.M=this.M&~this.R|ne(this);pe(this,y(this)+this.V);this.G=this.G&~this.R|ne(this);this.L=this.L&~this.R|ne(this);this.I=this.I&~this.R|ne(this);this.D=this.D&~this.R|ne(this);this.A-=this.B.Dk;this.sa=-1}function Qe(){this.la.call(this,Ai)}function mf(){!(this.qa&1)||this.O&131072?x.call(this,6):this.za.call(this,zi)}function nf(){this.N|=20;this.Ea=this.Sb=this.Ga;this.A-=this.B.$c}
function wk(a){var b=this.sa(),c=b>>6,d,e;switch(b>>3&7){case 0:d=this.D;break;case 1:d=this.I;break;case 2:d=this.L;break;case 3:d=this.G;break;case 4:d=0;break;case 5:d=this.M;break;case 6:d=this.K;break;case 7:d=this.J}switch(b&7){case 0:e=this.D;break;case 1:e=this.I;break;case 2:e=this.L;break;case 3:e=this.G;break;case 4:e=y(this);this.Ea=this.Sb;break;case 5:a?(e=this.M,this.Ea=this.Sb):e=G(this);break;case 6:e=this.K;break;case 7:e=this.J}return(d<<c)+e|0}
function ef(){this.Fd[this.sa()].call(this)}function lf(){xe(this,y(this)&this.R);this.A-=this.B.Jc}function Oe(){this.ra=this.Aa;var a=y(this)&this.R;xe(this,this.D&this.R);xe(this,this.I&this.R);xe(this,this.L&this.R);xe(this,this.G&this.R);xe(this,a);xe(this,this.M&this.R);xe(this,this.K&this.R);xe(this,this.J&this.R);this.A-=this.B.Fk;this.ra=-1}
function Pe(){this.ra=this.Aa;this.J=this.J&~this.R|ne(this);this.K=this.K&~this.R|ne(this);this.M=this.M&~this.R|ne(this);pe(this,y(this)+this.V);this.G=this.G&~this.R|ne(this);this.L=this.L&~this.R|ne(this);this.I=this.I&~this.R|ne(this);this.D=this.D&~this.R|ne(this);this.A-=this.B.Dk;this.ra=-1}function Qe(){this.la.call(this,Ai)}function mf(){!(this.qa&1)||this.O&131072?x.call(this,6):this.za.call(this,zi)}function nf(){this.N|=20;this.Ea=this.Sb=this.Ga;this.A-=this.B.$c}
function of(){this.N|=20;this.Ea=this.Sb=this.Ia;this.A-=this.B.$c}function pf(){this.N|=1024;this.ha&1024||(this.V^=6,this.R^=-65536,Zf(this));this.A-=this.B.$c}function qf(){this.N|=2048;this.ha&2048||(this.Lc^=6,this.wa^=-65536,Gf(this));this.A-=this.B.$c}function Re(){xe(this,this.Fa());this.A-=this.B.Jc}function Se(){this.la.call(this,Si)}function Te(){xe(this,this.S());this.A-=this.B.Jc}function Ue(){this.la.call(this,Qi)}
function Ve(){var a=1,b=0,c=this.wa,d=5;this.ha&192&&(a=this.I&c,b=1,this.ha&256&&(d=4));if(a--){var e=this.L&65535;Gg(this,e,1,!0)&&(e=Uc(this.ma,e,1,this.ea-b-1),this.Pb(this.oa.dc(this.J&c,1),e),this.J=this.J&~c|this.J+(this.O&1024?-1:1)&c,this.I=this.I&~c|this.I-b&c,this.A-=d,a&&(kg(this),this.N|=256))}}
function We(){var a=1,b=0,c=this.wa,d=5;this.ha&192&&(a=this.I&c,b=1,this.ha&256&&(d=4));if(a--){var e=this.L&65535;Gg(this,e,this.V,!0)&&(e=Uc(this.ma,e,this.V,this.ea-b-1),this.Eb(this.oa.dc(this.J&c,this.V),e),this.J=this.J&~c|this.J+(this.O&1024?-this.V:this.V)&c,this.I=this.I&~c|this.I-b&c,this.A-=d,a&&(kg(this),this.N|=256))}}
@ -347,42 +347,42 @@ function Ye(){var a=1,b=0,c=this.wa,d=5;this.ha&192&&(a=this.I&c,b=1,this.ha&256
function yk(){var a=this.S();rg(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)}function zk(){var a=this.S();mg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra}function Ak(){var a=this.S();mg(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)}function Bk(){var a=this.S();pg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra}function Ck(){var a=this.S();pg(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)}
function Dk(){var a=this.S();mg(this)||pg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra}function Ek(){var a=this.S();mg(this)||pg(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)}function Fk(){var a=this.S();qg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra}function Gk(){var a=this.S();qg(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)}function Hk(){var a=this.S();ng(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra}
function Ik(){var a=this.S();ng(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)}function Jk(){var a=this.S();!qg(this)!=!rg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra}function Kk(){var a=this.S();!qg(this)==!rg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra}function Lk(){var a=this.S();pg(this)||!qg(this)!=!rg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra}
function Mk(){var a=this.S();pg(this)||!qg(this)!=!rg(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)}function Nk(){this.ld.call(this,Ok,this.ra);this.A-=-1===this.F?1:this.B.Ag}function Pk(){this.N|=1;this.tc.call(this,dj)}function Qk(){this.N|=1;this.za.call(this,dj)}function Rk(){this.kc.call(this,dj)}function Sk(){this.la.call(this,dj)}function Ze(){this.ld.call(this,Tk,ok)}function $e(){this.lb.call(this,2==this.V?Uk:Vk,ok)}
function Wk(){var a=Qg(this),b=ne(this);B(this,b);a&&pe(this,y(this)+a);this.A-=this.B.Kk}function Xk(){var a=ne(this);B(this,a);this.A-=this.B.Hk}function af(){this.sa=this.Aa;var a=Qg(this),b=this.ra()&31;this.A-=11;xe(this,this.M);var c=y(this)&this.R;if(0<b){for(this.A-=(b<<2)+(1<b?1:0);--b;)this.M=this.M&~this.R|this.M-this.V&this.R,xe(this,te(this,this.Y,this.M&this.R));xe(this,c)}this.M=this.M&~this.R|c;pe(this,y(this)&~this.Y.wa|y(this)-a&this.Y.wa);this.sa=-1}
function bf(){this.sa=this.Aa;pe(this,y(this)&~this.Y.wa|this.M&this.Y.wa);this.M=this.M&~this.R|ne(this)&this.R;this.A-=5;this.sa=-1}function Yk(){tk.call(this,Qg(this));this.A-=this.B.Jk}function Zk(){tk.call(this,0);this.A-=this.B.Ik}function $k(a){this.sj=a;this.la.call(this,Ni)}function al(){this.N|=36;this.A-=this.B.$c}function cf(){kf.call(this)}function Ne(){x.call(this,6)}
function Mk(){var a=this.S();pg(this)||!qg(this)!=!rg(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)}function Nk(){this.ld.call(this,Ok,this.sa);this.A-=-1===this.F?1:this.B.Ag}function Pk(){this.N|=1;this.tc.call(this,dj)}function Qk(){this.N|=1;this.za.call(this,dj)}function Rk(){this.kc.call(this,dj)}function Sk(){this.la.call(this,dj)}function Ze(){this.ld.call(this,Tk,ok)}function $e(){this.lb.call(this,2==this.V?Uk:Vk,ok)}
function Wk(){var a=Qg(this),b=ne(this);B(this,b);a&&pe(this,y(this)+a);this.A-=this.B.Kk}function Xk(){var a=ne(this);B(this,a);this.A-=this.B.Hk}function af(){this.ra=this.Aa;var a=Qg(this),b=this.sa()&31;this.A-=11;xe(this,this.M);var c=y(this)&this.R;if(0<b){for(this.A-=(b<<2)+(1<b?1:0);--b;)this.M=this.M&~this.R|this.M-this.V&this.R,xe(this,te(this,this.Y,this.M&this.R));xe(this,c)}this.M=this.M&~this.R|c;pe(this,y(this)&~this.Y.wa|y(this)-a&this.Y.wa);this.ra=-1}
function bf(){this.ra=this.Aa;pe(this,y(this)&~this.Y.wa|this.M&this.Y.wa);this.M=this.M&~this.R|ne(this)&this.R;this.A-=5;this.ra=-1}function Yk(){tk.call(this,Qg(this));this.A-=this.B.Jk}function Zk(){tk.call(this,0);this.A-=this.B.Ik}function $k(a){this.sj=a;this.la.call(this,Ni)}function al(){this.N|=36;this.A-=this.B.$c}function cf(){kf.call(this)}function Ne(){x.call(this,6)}
function kf(){B(this,this.pd-this.Z.ta);Mb(this,"Undefined opcode "+ta(this.Ja(this.ea))+" at "+q(this.ea,8,!0));this.Kb()}
var Je=[function(){this.tc.call(this,vi)},function(){this.za.call(this,wi)},function(){this.kc.call(this,vi)},function(){this.la.call(this,wi)},function(){this.D=this.D&-256|vi.call(this,this.D&255,this.ra());this.A--},function(){this.D=this.D&~this.R|wi.call(this,this.D&this.R,this.Fa());this.A--},function(){ue(this,this.oa.U,this.V,2);this.A-=this.B.we},function(){this.sa=this.Aa;we(this,ne(this));this.A-=this.B.nc;this.sa=-1},function(){this.tc.call(this,rj)},function(){this.za.call(this,sj)},
function(){this.kc.call(this,rj)},function(){this.la.call(this,sj)},function(){this.D=this.D&-256|rj.call(this,this.D&255,this.ra());this.A--},function(){this.D=this.D&~this.R|sj.call(this,this.D&this.R,this.Fa());this.A--},function(){ue(this,this.Z.U,this.V,2);this.A-=this.B.we},function(){hg(this,ne(this));this.A-=this.B.nc},function(){this.tc.call(this,ti)},function(){this.za.call(this,ui)},function(){this.kc.call(this,ti)},function(){this.la.call(this,ui)},function(){this.D=this.D&-256|ti.call(this,
this.D&255,this.ra());this.A--},function(){this.D=this.D&~this.R|ui.call(this,this.D&this.R,this.Fa());this.A--},function(){ue(this,this.Y.U,this.V,2);this.A-=this.B.we},function(){this.sa=this.Aa;oe(this,ne(this));this.A-=this.B.nc;this.sa=-1},function(){this.tc.call(this,tj)},function(){this.za.call(this,uj)},function(){this.kc.call(this,tj)},function(){this.la.call(this,uj)},function(){this.D=this.D&-256|tj.call(this,this.D&255,this.ra());this.A--},function(){this.D=this.D&~this.R|uj.call(this,
this.D&this.R,this.Fa());this.A--},function(){ue(this,this.Da.U,this.V,2);this.A-=this.B.we},function(){this.sa=this.Aa;ve(this,ne(this));this.A-=this.B.nc;this.sa=-1},function(){this.tc.call(this,xi)},function(){this.za.call(this,yi)},function(){this.kc.call(this,xi)},function(){this.la.call(this,yi)},function(){this.D=this.D&-256|xi.call(this,this.D&255,this.ra());this.A--},function(){this.D=this.D&~this.R|yi.call(this,this.D&this.R,this.Fa());this.A--},function(){this.N|=20;this.Ea=this.Sb=this.oa;
this.A-=this.B.$c},function(){var a=this.D&255,b=og(this),c=mg(this);9<(a&15)||b?(a+=6,b=16):b=0;159<a||c?(a+=96,c=1):c=0;a&=255;this.D=this.D&-256|a;sg(this,a,128);c?tg(this):ug(this);b?Bg(this):zg(this);this.A-=this.B.ve},function(){this.tc.call(this,Wj)},function(){this.za.call(this,Xj)},function(){this.kc.call(this,Wj)},function(){this.la.call(this,Xj)},function(){this.D=this.D&-256|Wj.call(this,this.D&255,this.ra());this.A--},function(){this.D=this.D&~this.R|Xj.call(this,this.D&this.R,this.Fa());
this.A--},function(){this.N|=20;this.Ea=this.Sb=this.Z;this.A-=this.B.$c},function(){var a=this.D&255,b=og(this),c=mg(this);9<(a&15)||b?(a-=6,b=16):b=0;159<a||c?(a-=96,c=1):c=0;a&=255;this.D=this.D&-256|a;sg(this,a,128);c?tg(this):ug(this);b?Bg(this):zg(this);this.A-=this.B.ve},function(){this.tc.call(this,ek)},function(){this.za.call(this,fk)},function(){this.kc.call(this,ek)},function(){this.la.call(this,fk)},function(){this.D=this.D&-256|ek.call(this,this.D&255,this.ra());this.A--},function(){this.D=
var Je=[function(){this.tc.call(this,vi)},function(){this.za.call(this,wi)},function(){this.kc.call(this,vi)},function(){this.la.call(this,wi)},function(){this.D=this.D&-256|vi.call(this,this.D&255,this.sa());this.A--},function(){this.D=this.D&~this.R|wi.call(this,this.D&this.R,this.Fa());this.A--},function(){ue(this,this.oa.U,this.V,2);this.A-=this.B.we},function(){this.ra=this.Aa;we(this,ne(this));this.A-=this.B.nc;this.ra=-1},function(){this.tc.call(this,rj)},function(){this.za.call(this,sj)},
function(){this.kc.call(this,rj)},function(){this.la.call(this,sj)},function(){this.D=this.D&-256|rj.call(this,this.D&255,this.sa());this.A--},function(){this.D=this.D&~this.R|sj.call(this,this.D&this.R,this.Fa());this.A--},function(){ue(this,this.Z.U,this.V,2);this.A-=this.B.we},function(){hg(this,ne(this));this.A-=this.B.nc},function(){this.tc.call(this,ti)},function(){this.za.call(this,ui)},function(){this.kc.call(this,ti)},function(){this.la.call(this,ui)},function(){this.D=this.D&-256|ti.call(this,
this.D&255,this.sa());this.A--},function(){this.D=this.D&~this.R|ui.call(this,this.D&this.R,this.Fa());this.A--},function(){ue(this,this.Y.U,this.V,2);this.A-=this.B.we},function(){this.ra=this.Aa;oe(this,ne(this));this.A-=this.B.nc;this.ra=-1},function(){this.tc.call(this,tj)},function(){this.za.call(this,uj)},function(){this.kc.call(this,tj)},function(){this.la.call(this,uj)},function(){this.D=this.D&-256|tj.call(this,this.D&255,this.sa());this.A--},function(){this.D=this.D&~this.R|uj.call(this,
this.D&this.R,this.Fa());this.A--},function(){ue(this,this.Da.U,this.V,2);this.A-=this.B.we},function(){this.ra=this.Aa;ve(this,ne(this));this.A-=this.B.nc;this.ra=-1},function(){this.tc.call(this,xi)},function(){this.za.call(this,yi)},function(){this.kc.call(this,xi)},function(){this.la.call(this,yi)},function(){this.D=this.D&-256|xi.call(this,this.D&255,this.sa());this.A--},function(){this.D=this.D&~this.R|yi.call(this,this.D&this.R,this.Fa());this.A--},function(){this.N|=20;this.Ea=this.Sb=this.oa;
this.A-=this.B.$c},function(){var a=this.D&255,b=og(this),c=mg(this);9<(a&15)||b?(a+=6,b=16):b=0;159<a||c?(a+=96,c=1):c=0;a&=255;this.D=this.D&-256|a;sg(this,a,128);c?tg(this):ug(this);b?Bg(this):zg(this);this.A-=this.B.ve},function(){this.tc.call(this,Wj)},function(){this.za.call(this,Xj)},function(){this.kc.call(this,Wj)},function(){this.la.call(this,Xj)},function(){this.D=this.D&-256|Wj.call(this,this.D&255,this.sa());this.A--},function(){this.D=this.D&~this.R|Xj.call(this,this.D&this.R,this.Fa());
this.A--},function(){this.N|=20;this.Ea=this.Sb=this.Z;this.A-=this.B.$c},function(){var a=this.D&255,b=og(this),c=mg(this);9<(a&15)||b?(a-=6,b=16):b=0;159<a||c?(a-=96,c=1):c=0;a&=255;this.D=this.D&-256|a;sg(this,a,128);c?tg(this):ug(this);b?Bg(this):zg(this);this.A-=this.B.ve},function(){this.tc.call(this,ek)},function(){this.za.call(this,fk)},function(){this.kc.call(this,ek)},function(){this.la.call(this,fk)},function(){this.D=this.D&-256|ek.call(this,this.D&255,this.sa());this.A--},function(){this.D=
this.D&~this.R|fk.call(this,this.D&this.R,this.Fa());this.A--},function(){this.N|=20;this.Ea=this.Sb=this.Y;this.A-=this.B.$c},function(){var a,b,c=this.D&255,d=this.D>>8&255;9<(c&15)||og(this)?(c+=6,80286<=this.da&&255<c&&d++,d++,a=b=1):a=b=0;this.D=this.D&-65536|(d<<8|c)&65295;a?tg(this):ug(this);b?Bg(this):zg(this);this.A-=this.B.ve},function(){this.tc.call(this,Li)},function(){this.za.call(this,Mi)},function(){this.kc.call(this,Li)},function(){this.la.call(this,Mi)},function(){Li.call(this,this.D&
255,this.ra());this.A--},function(){Mi.call(this,this.D&this.R,this.Fa());this.A--},function(){this.N|=20;this.Ea=this.Sb=this.Da;this.A-=this.B.$c},function(){var a,b,c=this.D&255,d=this.D>>8&255;9<(c&15)||og(this)?(c=c-6&15,d=d-1&255,a=b=1):a=b=0;this.D=this.D&-65536|d<<8|c;a?tg(this):ug(this);b?Bg(this):zg(this);this.A-=this.B.ve},function(){this.D=jk.call(this,this.D)},function(){this.I=jk.call(this,this.I)},function(){this.L=jk.call(this,this.L)},function(){this.G=jk.call(this,this.G)},function(){pe(this,
255,this.sa());this.A--},function(){Mi.call(this,this.D&this.R,this.Fa());this.A--},function(){this.N|=20;this.Ea=this.Sb=this.Da;this.A-=this.B.$c},function(){var a,b,c=this.D&255,d=this.D>>8&255;9<(c&15)||og(this)?(c=c-6&15,d=d-1&255,a=b=1):a=b=0;this.D=this.D&-65536|d<<8|c;a?tg(this):ug(this);b?Bg(this):zg(this);this.A-=this.B.ve},function(){this.D=jk.call(this,this.D)},function(){this.I=jk.call(this,this.I)},function(){this.L=jk.call(this,this.L)},function(){this.G=jk.call(this,this.G)},function(){pe(this,
jk.call(this,y(this)))},function(){this.M=jk.call(this,this.M)},function(){this.K=jk.call(this,this.K)},function(){this.J=jk.call(this,this.J)},function(){this.D=hk.call(this,this.D)},function(){this.I=hk.call(this,this.I)},function(){this.L=hk.call(this,this.L)},function(){this.G=hk.call(this,this.G)},function(){pe(this,hk.call(this,y(this)))},function(){this.M=hk.call(this,this.M)},function(){this.K=hk.call(this,this.K)},function(){this.J=hk.call(this,this.J)},function(){xe(this,this.D&this.R);
this.A-=this.B.Jc},function(){xe(this,this.I&this.R);this.A-=this.B.Jc},function(){xe(this,this.L&this.R);this.A-=this.B.Jc},function(){xe(this,this.G&this.R);this.A-=this.B.Jc},function(){xe(this,y(this)-2&65535);this.A-=this.B.Jc},function(){xe(this,this.M&this.R);this.A-=this.B.Jc},function(){xe(this,this.K&this.R);this.A-=this.B.Jc},function(){xe(this,this.J&this.R);this.A-=this.B.Jc},function(){this.D=this.D&~this.R|ne(this);this.A-=this.B.nc},function(){this.I=this.I&~this.R|ne(this);this.A-=
this.B.nc},function(){this.L=this.L&~this.R|ne(this);this.A-=this.B.nc},function(){this.G=this.G&~this.R|ne(this);this.A-=this.B.nc},function(){pe(this,y(this)&~this.R|ne(this));this.A-=this.B.nc},function(){this.M=this.M&~this.R|ne(this);this.A-=this.B.nc},function(){this.K=this.K&~this.R|ne(this);this.A-=this.B.nc},function(){this.J=this.J&~this.R|ne(this);this.A-=this.B.nc},xk,yk,zk,Ak,Bk,Ck,Dk,Ek,Fk,Gk,Hk,Ik,Jk,Kk,Lk,Mk,xk,yk,zk,Ak,Bk,Ck,Dk,Ek,Fk,Gk,Hk,Ik,Jk,Kk,Lk,Mk,Nk,function(){this.lb.call(this,
bl,this.Fa);this.A-=-1===this.F?1:this.B.Ag},Nk,function(){this.lb.call(this,bl,this.S);this.A-=-1===this.F?1:this.B.Ag},function(){this.tc.call(this,Yj)},function(){this.za.call(this,Zj)},function(){this.kc.call(this,ck)},function(){this.la.call(this,dk)},Pk,Qk,Rk,Sk,function(){this.N|=1;this.za.call(this,qj)},function(){this.N|=1;this.Ea=this.Sb=this.Tg;this.la.call(this,Yi)},function(){var a;this.la.call(this,pj);switch(this.ga>>3&7){case 0:a=this.D;this.D=this.xa;we(this,a);break;case 1:a=this.I;
this.I=this.xa;hg(this,a);break;case 2:a=this.L;this.L=this.xa;oe(this,a);break;case 3:a=this.G;this.G=this.xa;ve(this,a);break;case 4:a=y(this);pe(this,this.xa);80386<=this.da?this.Ga.load(a):we(this,a);break;case 5:a=this.M;this.M=this.xa;80386<=this.da?this.Ia.load(a):hg(this,a);break;case 6:a=this.K;this.K=this.xa;oe(this,a);break;case 7:a=this.J,this.J=this.xa,ve(this,a)}},function(){this.N|=1;this.sa=this.Aa;this.xa=ne(this);this.lb.call(this,cl,qk);this.sa=-1},function(){this.A-=3},function(){var a=
bl,this.Fa);this.A-=-1===this.F?1:this.B.Ag},Nk,function(){this.lb.call(this,bl,this.S);this.A-=-1===this.F?1:this.B.Ag},function(){this.tc.call(this,Yj)},function(){this.za.call(this,Zj)},function(){this.kc.call(this,ck)},function(){this.la.call(this,dk)},Pk,Qk,Rk,Sk,function(){this.N|=1;this.za.call(this,qj)},function(){this.N|=1;this.Ea=this.Sb=this.Tg;this.la.call(this,Yi)},function(){var a;this.la.call(this,gj);switch(this.ga>>3&7){case 0:a=this.D;this.D=this.xa;we(this,a);break;case 1:a=this.I;
this.I=this.xa;hg(this,a);break;case 2:a=this.L;this.L=this.xa;oe(this,a);break;case 3:a=this.G;this.G=this.xa;ve(this,a);break;case 4:a=y(this);pe(this,this.xa);80386<=this.da?this.Ga.load(a):we(this,a);break;case 5:a=this.M;this.M=this.xa;80386<=this.da?this.Ia.load(a):hg(this,a);break;case 6:a=this.K;this.K=this.xa;oe(this,a);break;case 7:a=this.J,this.J=this.xa,ve(this,a)}},function(){this.N|=1;this.ra=this.Aa;this.xa=ne(this);this.lb.call(this,cl,qk);this.ra=-1},function(){this.A-=3},function(){var a=
this.D;this.D=this.D&~this.R|this.I&this.R;this.I=this.I&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.L&this.R;this.L=this.L&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.G&this.R;this.G=this.G&~this.R|a&this.R;this.A-=3},function(){var a=this.D,b=y(this);this.D=this.D&~this.R|b&this.R;pe(this,b&~this.R|a&this.R);this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.M&this.R;this.M=this.M&~this.R|a&this.R;this.A-=3},function(){var a=
this.D;this.D=this.D&~this.R|this.K&this.R;this.K=this.K&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.J&this.R;this.J=this.J&~this.R|a&this.R;this.A-=3},function(){this.D=2==this.V?this.D&-65536|this.D<<24>>24&65535:this.D<<16>>16;this.A-=2},function(){this.L=2==this.V?this.L&-65536|(this.D&32768?65535:0):this.D&-2147483648?-1:0;this.A-=this.B.Qj},function(){rk.call(this,this.Fa(),Qg(this));this.A-=this.B.Tj},function(){this.A-=3},function(){var a=Ee(this);a&131072&&
3>this.lc?x.call(this,13,0):(xe(this,a&-196609),this.A-=this.B.Jc)},function(){if(this.O&131072&&3>this.lc)x.call(this,13,0);else{var a=ne(this),a=a&65535|this.O&-65536;Fe(this,a);this.A-=this.B.nc}},function(){var a=this.D>>8&255;a&1?tg(this):ug(this);a&4?(this.resultType&=-3,this.O|=4):(this.resultType&=-3,this.O&=-5);a&16?Bg(this):zg(this);a&64?Cg(this):Ag(this);a&128?(this.resultType&=-17,this.O|=128):(this.resultType&=-17,this.O&=-129);this.A-=this.B.Wb},function(){this.D=this.D&-65281|(Ee(this)&
213)<<8;this.A-=this.B.Wb},function(){var a=this.D&-256,b;b=G(this);b=this.Ja(this.Ea.cc(b,1));this.D=a|b;this.A-=this.B.Nh},function(){this.D=this.D&~this.R|te(this,this.Ea,G(this));this.A-=this.B.Nh},function(){var a=G(this),b=this.D;this.Pb(this.Ea.dc(a,1),b);this.A-=this.B.Oh},function(){var a=G(this),b=this.D;this.Eb(this.Ea.dc(a,this.V),b);this.A-=this.B.Oh},function(){var a=1,b=0,c=this.wa,d=this.B.Ph;this.ha&192&&(a=this.I&c,b=1,d=this.B.Rh,this.ha&256||(this.A-=this.B.Qh));if(a--){var e=
this.Ja(this.Ea.cc(this.K&c,1));this.Pb(this.oa.dc(this.J&c,1),e);e=this.O&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d;this.I=this.I&~c|this.I-b&c;a&&(kg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Ph;this.ha&192&&(a=this.I&c,b=1,d=this.B.Rh,this.ha&256||(this.A-=this.B.Qh));if(a--){var e=te(this,this.Ea,this.K&c);this.Eb(this.oa.dc(this.J&c,this.V),e);e=this.O&1024?-this.V:this.V;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d;
this.I=this.I&~c|this.I-b&c;a&&(kg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Ah;this.ha&192&&(a=this.I&c,b=1,d=this.B.Ch,this.ha&256||(this.A-=this.B.Bh));if(a--){var e=Ig(this,this.Ea,this.K),f=Ig(this,this.oa,this.J);this.F=this.C;Li.call(this,e,f);e=this.O&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Jb;a&&pg(this)==(this.ha&64)&&(kg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Ah;this.ha&192&&
(a=this.I&c,b=1,d=this.B.Ch,this.ha&256||(this.A-=this.B.Bh));if(a--){var e=Kg(this,this.Ea,this.K&c),f=Kg(this,this.oa,this.J&c);this.F=this.C;Mi.call(this,e,f);e=this.O&1024?-this.V:this.V;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Jb;a&&pg(this)==(this.ha&64)&&(kg(this),this.N|=256)}},function(){sg(this,this.D&this.ra(),128);this.A-=this.B.ve},function(){sg(this,this.D&this.Fa(),this.Fb);this.A-=this.B.ve},function(){var a=1,b=0,c=this.wa,
(a=this.I&c,b=1,d=this.B.Ch,this.ha&256||(this.A-=this.B.Bh));if(a--){var e=Kg(this,this.Ea,this.K&c),f=Kg(this,this.oa,this.J&c);this.F=this.C;Mi.call(this,e,f);e=this.O&1024?-this.V:this.V;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Jb;a&&pg(this)==(this.ha&64)&&(kg(this),this.N|=256)}},function(){sg(this,this.D&this.sa(),128);this.A-=this.B.ve},function(){sg(this,this.D&this.Fa(),this.Fb);this.A-=this.B.ve},function(){var a=1,b=0,c=this.wa,
d=this.B.$h;this.ha&192&&(a=this.I&c,b=1,d=this.B.bi,this.ha&256||(this.A-=this.B.ai));if(a--){var e=this.D;this.Pb(this.oa.dc(this.J&c,1),e);this.I=this.I&~c|this.I-b&c;80546<=this.Rd&&80564>=this.Rd&&!(this.ha&2048)!=(103!=this.Ja(this.ea))&&(c^=-65536);this.J=this.J&~c|this.J+(this.O&1024?-1:1)&c;this.A-=d;a&&(kg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.$h;this.ha&192&&(a=this.I&c,b=1,d=this.B.bi,this.ha&256||(this.A-=this.B.ai));if(a--){var e=this.D;this.Eb(this.oa.dc(this.J&
c,this.V),e);this.J=this.J&~c|this.J+(this.O&1024?-this.V:this.V)&c;this.I=this.I&~c|this.I-b&c;this.A-=d;a&&(kg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Hh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Jh,this.ha&256||(this.A-=this.B.Ih));if(a--){var e=this.Ja(this.Ea.cc(this.K&c,1));this.D=this.D&-256|e;this.K=this.K&~c|this.K+(this.O&1024?-1:1)&c;this.I=this.I&~c|this.I-b&c;this.A-=d;a&&(kg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Hh;this.ha&192&&(a=this.I&c,
b=1,d=this.B.Jh,this.ha&256||(this.A-=this.B.Ih));if(a--){var e=te(this,this.Ea,this.K&c);this.D=this.D&~this.R|e;this.K=this.K&~c|this.K+(this.O&1024?-this.V:this.V)&c;this.I=this.I&~c|this.I-b&c;this.A-=d;a&&(kg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Uh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Wh,this.ha&256||(this.A-=this.B.Vh));if(a--){var e=this.D&255,f=Ig(this,this.oa,this.J);this.F=this.C;Li.call(this,e,f);this.J=this.J&~c|this.J+(this.O&1024?-1:1)&c;this.I=this.I&~c|this.I-
b&c;this.A-=d-this.B.Jb;a&&pg(this)==(this.ha&64)&&(kg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Uh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Wh,this.ha&256||(this.A-=this.B.Vh));if(a--){var e=this.D&this.R,f=Kg(this,this.oa,this.J&c);this.F=this.C;Mi.call(this,e,f);this.J=this.J&~c|this.J+(this.O&1024?-this.V:this.V)&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Jb;a&&pg(this)==(this.ha&64)&&(kg(this),this.N|=256)}},function(){this.D=this.D&-256|this.ra();this.A-=this.B.Wb},function(){this.I=
this.I&-256|this.ra();this.A-=this.B.Wb},function(){this.L=this.L&-256|this.ra();this.A-=this.B.Wb},function(){this.G=this.G&-256|this.ra();this.A-=this.B.Wb},function(){this.D=this.D&-65281|this.ra()<<8;this.A-=this.B.Wb},function(){this.I=this.I&-65281|this.ra()<<8;this.A-=this.B.Wb},function(){this.L=this.L&-65281|this.ra()<<8;this.A-=this.B.Wb},function(){this.G=this.G&-65281|this.ra()<<8;this.A-=this.B.Wb},function(){this.D=this.D&~this.R|this.Fa();this.A-=this.B.Wb},function(){this.I=this.I&
b&c;this.A-=d-this.B.Jb;a&&pg(this)==(this.ha&64)&&(kg(this),this.N|=256)}},function(){var a=1,b=0,c=this.wa,d=this.B.Uh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Wh,this.ha&256||(this.A-=this.B.Vh));if(a--){var e=this.D&this.R,f=Kg(this,this.oa,this.J&c);this.F=this.C;Mi.call(this,e,f);this.J=this.J&~c|this.J+(this.O&1024?-this.V:this.V)&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Jb;a&&pg(this)==(this.ha&64)&&(kg(this),this.N|=256)}},function(){this.D=this.D&-256|this.sa();this.A-=this.B.Wb},function(){this.I=
this.I&-256|this.sa();this.A-=this.B.Wb},function(){this.L=this.L&-256|this.sa();this.A-=this.B.Wb},function(){this.G=this.G&-256|this.sa();this.A-=this.B.Wb},function(){this.D=this.D&-65281|this.sa()<<8;this.A-=this.B.Wb},function(){this.I=this.I&-65281|this.sa()<<8;this.A-=this.B.Wb},function(){this.L=this.L&-65281|this.sa()<<8;this.A-=this.B.Wb},function(){this.G=this.G&-65281|this.sa()<<8;this.A-=this.B.Wb},function(){this.D=this.D&~this.R|this.Fa();this.A-=this.B.Wb},function(){this.I=this.I&
~this.R|this.Fa();this.A-=this.B.Wb},function(){this.L=this.L&~this.R|this.Fa();this.A-=this.B.Wb},function(){this.G=this.G&~this.R|this.Fa();this.A-=this.B.Wb},function(){pe(this,y(this)&~this.R|this.Fa());this.A-=this.B.Wb},function(){this.M=this.M&~this.R|this.Fa();this.A-=this.B.Wb},function(){this.K=this.K&~this.R|this.Fa();this.A-=this.B.Wb},function(){this.J=this.J&~this.R|this.Fa();this.A-=this.B.Wb},Wk,Xk,Wk,Xk,function(){this.la.call(this,Zi)},function(){this.la.call(this,Xi)},function(){this.N|=
1;this.ld.call(this,dl,this.ra)},function(){this.N|=1;this.lb.call(this,dl,this.Fa)},Yk,Zk,Yk,Zk,function(){if(this.O&131072&&3>this.lc)x.call(this,13,0);else{var a=this.B.jk;this.Kc=-1;sk.call(this,3,null,a)}},function(){var a=this.ra();if(this.O&131072&&3>this.lc)x.call(this,13,0);else{var b;a:{b=this.Zf[a];if(void 0!==b)for(var c=0;c<b.length;c++)if(!b[c](this.ea)){b=!1;break a}this.ba.oj&&r(this,16)&&el(this.ca,a,this.ea);b=!0}b?(this.Kc=-1,sk.call(this,a,null,0)):this.A--}},function(){if(rg(this))if(this.O&
131072&&3>this.lc)x.call(this,13,0);else{var a=this.B.kk;this.Kc=-1;sk.call(this,4,null,a)}else this.A-=this.B.lk},function(){if(this.O&131072&&3>this.lc)x.call(this,13,0);else{this.Tc=this.Y.U;this.sa=this.Aa;this.A-=this.B.hk;if(this.qa&1&&this.O&16384){var a=this.ja(this.ka.ta+0);qe(this.Z,a,!1)}else{var a=this.La,b=ne(this),c=ne(this),d=ne(this);if(this.O&131072)d=d&131071|this.O&-131072;else if(d&131072){var e=ne(this),f=ne(this),g=ne(this),h=ne(this),k=ne(this),m=ne(this);re(this,!0,!0);oe(this,
f);pe(this,e);we(this,g);ve(this,h);this.Ga.load(k);this.Ia.load(m)}null!=Ge(this,b,c,!1)&&(Fe(this,d,a),this.bg&&cg(this,this.ea))}this.Tc=this.sa=-1}},function(){this.ld.call(this,Tk,mk)},function(){this.lb.call(this,2==this.V?Uk:Vk,mk)},function(){this.ld.call(this,Tk,nk)},function(){this.lb.call(this,2==this.V?Uk:Vk,nk)},function(){var a=this.ra();if(a){var b=this.D&255;this.D=this.D&-65536|b/a<<8|b%a;sg(this,this.D,128);this.A-=this.B.Nj}else vk.call(this)},function(){var a=this.D&255,b=(this.D>>
8&255)*this.ra()|0,c=a+b|0;this.D=this.D&-65536|c&255;lg(this,a,b,c,191);this.A-=this.B.Mj},function(){this.D=this.D&-256|(mg(this)?255:0);this.A-=2},function(){this.D=this.D&-256|Ig(this,this.Ea,this.G+(this.D&255));this.A-=this.B.Mk},function(){$k.call(this,216)},function(){$k.call(this,217)},function(){$k.call(this,218)},function(){$k.call(this,219)},function(){$k.call(this,220)},function(){$k.call(this,221)},function(){$k.call(this,222)},function(){$k.call(this,223)},function(){var a=this.S(),
b=this.I-1&this.wa;this.I=this.I&~this.wa|b;b&&!pg(this)?(B(this,z(this)+a),this.A-=this.B.tk):this.A-=this.B.Kh},function(){var a=this.S(),b=this.I-1&this.wa;this.I=this.I&~this.wa|b;b&&pg(this)?(B(this,z(this)+a),this.A-=this.B.Lh):this.A-=this.B.Mh},function(){var a=this.S(),b=this.I-1&this.wa;this.I=this.I&~this.wa|b;b?(B(this,z(this)+a),this.A-=this.B.sk):this.A-=this.B.Kh},function(){var a=this.S();this.I&this.wa?this.A-=this.B.Mh:(B(this,z(this)+a),this.A-=this.B.Lh)},function(){var a=this.ra();
Gg(this,a,1,!0)&&(this.D=this.D&-256|Uc(this.ma,a,1,this.ea-2)&255,this.A-=this.B.Fh)},function(){var a=this.ra();Gg(this,a,this.V,!0)&&(this.D=this.D&~this.R|Uc(this.ma,a,this.V,this.ea-2)&this.R,this.A-=this.B.Fh)},function(){var a=this.ra();Gg(this,a,1,!1)&&(Yc(this.ma,a,1,this.D&255,this.ea-2),this.A-=this.B.Th)},function(){var a=this.ra();Gg(this,a,this.V,!1)&&(Yc(this.ma,a,this.V,this.D&this.R,this.ea-2),this.A-=this.B.Th)},function(){var a=this.Fa(),b=z(this),a=b+a;xe(this,b);B(this,a);this.A-=
1;this.ld.call(this,dl,this.sa)},function(){this.N|=1;this.lb.call(this,dl,this.Fa)},Yk,Zk,Yk,Zk,function(){if(this.O&131072&&3>this.lc)x.call(this,13,0);else{var a=this.B.jk;this.Kc=-1;sk.call(this,3,null,a)}},function(){var a=this.sa();if(this.O&131072&&3>this.lc)x.call(this,13,0);else{var b;a:{b=this.Zf[a];if(void 0!==b)for(var c=0;c<b.length;c++)if(!b[c](this.ea)){b=!1;break a}this.ba.oj&&r(this,16)&&el(this.ca,a,this.ea);b=!0}b?(this.Kc=-1,sk.call(this,a,null,0)):this.A--}},function(){if(rg(this))if(this.O&
131072&&3>this.lc)x.call(this,13,0);else{var a=this.B.kk;this.Kc=-1;sk.call(this,4,null,a)}else this.A-=this.B.lk},function(){if(this.O&131072&&3>this.lc)x.call(this,13,0);else{this.Tc=this.Y.U;this.ra=this.Aa;this.A-=this.B.hk;if(this.qa&1&&this.O&16384){var a=this.ja(this.ka.ta+0);qe(this.Z,a,!1)}else{var a=this.La,b=ne(this),c=ne(this),d=ne(this);if(this.O&131072)d=d&131071|this.O&-131072;else if(d&131072){var e=ne(this),f=ne(this),g=ne(this),h=ne(this),k=ne(this),m=ne(this);re(this,!0,!0);oe(this,
f);pe(this,e);we(this,g);ve(this,h);this.Ga.load(k);this.Ia.load(m)}null!=Ge(this,b,c,!1)&&(Fe(this,d,a),this.bg&&cg(this,this.ea))}this.Tc=this.ra=-1}},function(){this.ld.call(this,Tk,mk)},function(){this.lb.call(this,2==this.V?Uk:Vk,mk)},function(){this.ld.call(this,Tk,nk)},function(){this.lb.call(this,2==this.V?Uk:Vk,nk)},function(){var a=this.sa();if(a){var b=this.D&255;this.D=this.D&-65536|b/a<<8|b%a;sg(this,this.D,128);this.A-=this.B.Nj}else vk.call(this)},function(){var a=this.D&255,b=(this.D>>
8&255)*this.sa()|0,c=a+b|0;this.D=this.D&-65536|c&255;lg(this,a,b,c,191);this.A-=this.B.Mj},function(){this.D=this.D&-256|(mg(this)?255:0);this.A-=2},function(){this.D=this.D&-256|Ig(this,this.Ea,this.G+(this.D&255));this.A-=this.B.Mk},function(){$k.call(this,216)},function(){$k.call(this,217)},function(){$k.call(this,218)},function(){$k.call(this,219)},function(){$k.call(this,220)},function(){$k.call(this,221)},function(){$k.call(this,222)},function(){$k.call(this,223)},function(){var a=this.S(),
b=this.I-1&this.wa;this.I=this.I&~this.wa|b;b&&!pg(this)?(B(this,z(this)+a),this.A-=this.B.tk):this.A-=this.B.Kh},function(){var a=this.S(),b=this.I-1&this.wa;this.I=this.I&~this.wa|b;b&&pg(this)?(B(this,z(this)+a),this.A-=this.B.Lh):this.A-=this.B.Mh},function(){var a=this.S(),b=this.I-1&this.wa;this.I=this.I&~this.wa|b;b?(B(this,z(this)+a),this.A-=this.B.sk):this.A-=this.B.Kh},function(){var a=this.S();this.I&this.wa?this.A-=this.B.Mh:(B(this,z(this)+a),this.A-=this.B.Lh)},function(){var a=this.sa();
Gg(this,a,1,!0)&&(this.D=this.D&-256|Uc(this.ma,a,1,this.ea-2)&255,this.A-=this.B.Fh)},function(){var a=this.sa();Gg(this,a,this.V,!0)&&(this.D=this.D&~this.R|Uc(this.ma,a,this.V,this.ea-2)&this.R,this.A-=this.B.Fh)},function(){var a=this.sa();Gg(this,a,1,!1)&&(Yc(this.ma,a,1,this.D&255,this.ea-2),this.A-=this.B.Th)},function(){var a=this.sa();Gg(this,a,this.V,!1)&&(Yc(this.ma,a,this.V,this.D&this.R,this.ea-2),this.A-=this.B.Th)},function(){var a=this.Fa(),b=z(this),a=b+a;xe(this,b);B(this,a);this.A-=
this.B.Rj},function(){var a=this.Fa();B(this,z(this)+a);this.A-=this.B.Gh},function(){Ge(this,this.Fa(),Qg(this));this.A-=this.B.nk},function(){var a=this.S();B(this,z(this)+a);this.A-=this.B.Gh},function(){var a=this.L&65535;Gg(this,a,1,!0)&&(this.D=this.D&-256|Uc(this.ma,a,1,this.ea-1)&255,this.A-=this.B.Eh)},function(){var a=this.L&65535;Gg(this,a,this.V,!0)&&(this.D=this.D&~this.R|Uc(this.ma,a,this.V,this.ea-1)&this.R,this.A-=this.B.Eh)},function(){var a=this.L&65535;Gg(this,a,1,!1)&&(Yc(this.ma,
a,1,this.D&255,this.ea-1),this.A-=this.B.Sh)},function(){var a=this.L&65535;Gg(this,a,2,!1)&&(Yc(this.ma,a,this.V,this.D&this.R,this.ea-1),this.A-=this.B.Sh)},al,al,function(){this.N|=132;this.A-=this.B.$c},function(){this.N|=68;this.A-=this.B.$c},function(){this.O&131072?x.call(this,13,0):(this.Ya|=4,this.A-=2,this.ca&&r(this,-2147483648)?(kg(this),this.ca.Kb()):this.O&512||(this.ca&&kg(this),this.Kb()))},function(){mg(this)?ug(this):tg(this);this.A-=2},function(){this.vc=!1;this.ld.call(this,fl,
pk);this.vc&&(this.D=this.D&~this.R|this.Ba&this.R)},function(){this.vc=!1;this.lb.call(this,gl,pk);this.vc&&(this.D=this.D&~this.R|this.Ba&this.R,this.L=this.L&~this.R|this.Za&this.R)},function(){ug(this);this.A-=2},function(){tg(this);this.A-=2},function(){this.La>this.lc?x.call(this,13,0):(this.O&=-513,this.A-=this.B.Pj)},function(){this.La>this.lc?x.call(this,13,0):(this.O|=512,this.N|=4,this.A-=2)},function(){this.O&=-1025;this.A-=2},function(){this.O|=1024;this.A-=2},function(){this.ld.call(this,
@ -391,34 +391,34 @@ function(a,b){var c=a;if(b&=this.Sa){var d=yg(this);(b%=9)?(c=(a<<b|d<<b-1|a>>9-
(b=9),b=a<<24>>24>>b-1,a=b>>1&255,sg(this,a,128,b&1);return a}],Uk=[function(a,b){var c=a;if(b&=this.Sa){var d;(b&=15)?(d=a<<b-1,c=(a<<b|a>>16-b)&65535):d=a<<15;xg(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.Sa){var d;(b&=15)?(d=a<<16-b,c=(a>>>b|d)&65535):d=a;xg(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.Sa){var d=yg(this);(b%=17)?(c=(a<<b|d<<b-1|a>>17-b)&65535,d=a<<b-1):d<<=15;xg(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.Sa){var d=yg(this);(b%=17)?
(c=(a>>b|d<<16-b|a<<17-b)&65535,d=a<<16-b):d<<=15;xg(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.Sa){var d=0;16<b?c=0:(d=a<<b-1,c=d<<1&65535);sg(this,c,32768,d&32768,(c^d)&32768)}return c},function(a,b){if(b&=this.Sa)b=16<b?0:a>>>b-1,a=b>>>1&65535,sg(this,a,32768,b&1,a&32768);return a},Pi,function(a,b){if(b&=this.Sa)17<b&&(b=17),b=a<<16>>16>>b-1,a=b>>1&65535,sg(this,a,32768,b&1);return a}],Vk=[function(a,b){var c=a;if(b&=this.Sa)c=a<<b|a>>>32-b,xg(this,c,a<<b-1,-2147483648);return c},
function(a,b){var c=a;if(b&=this.Sa){var d=a<<32-b,c=a>>>b|d;xg(this,c,d,-2147483648)}return c},function(a,b){var c=a;if(b&=this.Sa)c=yg(this),c=a<<b|c<<b-1|a>>>32-b>>>1,xg(this,c,a<<b-1,-2147483648);return c},function(a,b){var c=a;if(b&=this.Sa)c=yg(this),c=a>>>b|c<<32-b|a<<32-b<<1,xg(this,c,a<<32-b,-2147483648);return c},function(a,b){var c=a;if(b&=this.Sa)a<<=b-1,c=a<<1,sg(this,c,-2147483648,a&-2147483648,(c^a)&-2147483648);return c},function(a,b){if(b&=this.Sa)b=a>>>b-1,a=b>>>1,sg(this,a,-2147483648,
b&1,a&-2147483648);return a},Pi,function(a,b){if(b&=this.Sa)b=a>>b-1,a=b>>1,sg(this,a,-2147483648,b&1);return a}],fl=[function(a,b){b=this.ra();sg(this,a&b,128);this.A-=-1===this.C?this.B.di:this.B.ci;this.N|=2;return a},Pi,function(a){this.A-=-1===this.C?this.B.Gf:this.B.Ff;return a^255},function(a){var b=-a|0;lg(this,0,a,b,191,!0);this.A-=-1===this.C?this.B.Gf:this.B.Ff;return b&255},function(a){this.Ba=(this.D&255)*a&65535;this.Ba&65280?(tg(this),vg(this)):(ug(this),wg(this));this.vc=!0;this.A-=
b&1,a&-2147483648);return a},Pi,function(a,b){if(b&=this.Sa)b=a>>b-1,a=b>>1,sg(this,a,-2147483648,b&1);return a}],fl=[function(a,b){b=this.sa();sg(this,a&b,128);this.A-=-1===this.C?this.B.di:this.B.ci;this.N|=2;return a},Pi,function(a){this.A-=-1===this.C?this.B.Gf:this.B.Ff;return a^255},function(a){var b=-a|0;lg(this,0,a,b,191,!0);this.A-=-1===this.C?this.B.Gf:this.B.Ff;return b&255},function(a){this.Ba=(this.D&255)*a&65535;this.Ba&65280?(tg(this),vg(this)):(ug(this),wg(this));this.vc=!0;this.A-=
-1===this.C?this.B.Ak:this.B.zk;this.N|=2;return a},function(a){var b=(this.D<<24>>24)*(a<<24>>24)|0;this.Ba=b&65535;127<b||-128>b?(tg(this),vg(this)):(ug(this),wg(this));this.vc=!0;this.A-=-1===this.C?this.B.ek:this.B.dk;this.N|=2;return a},function(a,b){if(!a)return vk.call(this),a;var c=(b=this.D&65535)/a;if(255<c)return vk.call(this),a;this.Ba=c&255|(b%a&255)<<8;this.vc=!0;this.A-=-1===this.C?this.B.Xj:this.B.Wj;this.N|=2;return a},function(a,b){if(!a)return vk.call(this),a;var c=a<<24>>24,d=
(b=this.D<<16>>16)/c|0;if(d!=d<<24>>24||8086==this.da&&-128==d)return vk.call(this),a;this.Ba=d&255|(b%c&255)<<8;this.vc=!0;this.A-=-1===this.C?this.B.ak:this.B.$j;this.N|=2;return a}],gl=[function(a,b){b=this.Fa();sg(this,a&b,this.Fb);this.A-=-1===this.C?this.B.di:this.B.ci;this.N|=2;return a},Pi,function(a){this.A-=-1===this.C?this.B.Gf:this.B.Ff;return a^this.R},function(a){var b=-a|0;lg(this,0,a,b,this.Fb|63,!0);this.A-=-1===this.C?this.B.Gf:this.B.Ff;return b&this.R},function(a,b){2==this.V?
(b=this.D&65535,b=b*a|0,this.Ba=b&65535,this.Za=b>>16&65535):(Vi.call(this,a,this.D),80563==this.Rd&&68657152==this.D&&129==a&&(this.Za=0));this.Za?(tg(this),vg(this)):(ug(this),wg(this));this.vc=!0;this.A-=-1===this.C?this.B.Ck:this.B.Bk;this.N|=2;return a},function(a,b){2==this.V?(b=this.D&65535,b=(b<<16>>16)*(a<<16>>16)|0,this.Ba=b&65535,this.Za=b>>16&65535,b=32767<b||-32768>b):(Ui.call(this,a,this.D),b=this.Za!=this.Ba>>31);b?(tg(this),vg(this)):(ug(this),wg(this));this.vc=!0;this.A-=-1===this.C?
this.B.gk:this.B.fk;this.N|=2;return a},function(a,b){if(2==this.V){if(!a)return vk.call(this),a;b=65536*(this.L&65535)+(this.D&65535);var c=b/a;if(65536<=c)return vk.call(this),a;this.Ba=c&65535;this.Za=b%a&65535}else{if(!ik.call(this,this.D,this.L,a))return vk.call(this),a;this.Ba|=0;this.Za|=0}this.vc=!0;this.A-=-1===this.C?this.B.Zj:this.B.Yj;this.N|=2;return a},function(a,b){if(2==this.V){if(!a)return vk.call(this),a;var c=a<<16>>16,d=(b=this.L<<16|this.D&65535)/c|0;if(d!=d<<16>>16||8086==this.da&&
-32768==d)return vk.call(this),a;this.Ba=d&65535;this.Za=b%c&65535}else{b=this.D;var c=this.L,d=a,e=0,f=0;0>d&&(d=-d|0,e=1-e);0>c&&(b=-b|0,c=~c+(b?0:1)|0,f=1,e=1-e);!ik.call(this,b,c,d)||this.Ba>2147483647+e||this.Za>2147483647+f?b=!1:(e&&(this.Ba=-this.Ba),f&&(this.Za=-this.Za),b=!0);if(!b)return vk.call(this),a;this.Ba|=0;this.Za|=0}this.vc=!0;this.A-=-1===this.C?this.B.ck:this.B.bk;this.N|=2;return a}],Ke=[function(a){var b=a+1|0;lg(this,a,1,b,190);this.A-=-1===this.C?this.B.Ef:this.B.Df;return b&
255},function(a){var b=a-1|0;lg(this,a,1,b,190,!0);this.A-=-1===this.C?this.B.Ef:this.B.Df;return b&255},Pi,Pi,Pi,Pi,Pi,Pi],Le=[function(a){var b=a+1|0;lg(this,a,1,b,this.Fb|62);this.A-=-1===this.C?this.B.Ef:this.B.Df;return b&this.R},function(a){var b=a-1|0;lg(this,a,1,b,this.Fb|62,!0);this.A-=-1===this.C?this.B.Ef:this.B.Df;return b&this.R},function(a){xe(this,z(this));B(this,a);this.A-=-1===this.C?this.B.Vj:this.B.Uj;this.N|=2;return a},function(a){if(-1===this.C)return Pi.call(this,a);this.sa=
this.Aa;rk.call(this,a,this.ja(this.C+this.V));this.A-=this.B.Sj;this.N|=2;this.sa=-1;return a},function(a){B(this,a);this.A-=-1===this.C?this.B.qk:this.B.pk;this.N|=2;return a},function(a){if(-1===this.C)return Pi.call(this,a);Ge(this,a,this.ja(this.C+this.V));this.A-=this.B.mk;this.N|=2;return a},function(a){var b=a;this.N&512&&(a=a-2&65535,80286>this.da&&(b=a));xe(this,b);this.A-=-1===this.C?this.B.Jc:this.B.Gk;this.N|=2;return a},Pi];
255},function(a){var b=a-1|0;lg(this,a,1,b,190,!0);this.A-=-1===this.C?this.B.Ef:this.B.Df;return b&255},Pi,Pi,Pi,Pi,Pi,Pi],Le=[function(a){var b=a+1|0;lg(this,a,1,b,this.Fb|62);this.A-=-1===this.C?this.B.Ef:this.B.Df;return b&this.R},function(a){var b=a-1|0;lg(this,a,1,b,this.Fb|62,!0);this.A-=-1===this.C?this.B.Ef:this.B.Df;return b&this.R},function(a){xe(this,z(this));B(this,a);this.A-=-1===this.C?this.B.Vj:this.B.Uj;this.N|=2;return a},function(a){if(-1===this.C)return Pi.call(this,a);this.ra=
this.Aa;rk.call(this,a,this.ja(this.C+this.V));this.A-=this.B.Sj;this.N|=2;this.ra=-1;return a},function(a){B(this,a);this.A-=-1===this.C?this.B.qk:this.B.pk;this.N|=2;return a},function(a){if(-1===this.C)return Pi.call(this,a);Ge(this,a,this.ja(this.C+this.V));this.A-=this.B.mk;this.N|=2;return a},function(a){var b=a;this.N&512&&(a=a-2&65535,80286>this.da&&(b=a));xe(this,b);this.A-=-1===this.C?this.B.Jc:this.B.Gk;this.N|=2;return a},Pi];
function rf(){this.la.call(this,bk);this.A-=-1===this.C?6:13}function sf(){this.za.call(this,ak);this.A-=-1===this.C?12:19}var ff=Array(256);ff[0]=function(){16>(this.Ja(this.ea)&56)&&(this.N|=1);this.lb.call(this,this.nj,pk)};ff[1]=function(){this.Ja(this.ea)&16||(this.N|=1);this.lb.call(this,hl,pk)};ff[2]=function(){!(this.qa&1)||this.O&131072?x.call(this,6):this.la.call(this,Wi)};ff[3]=function(){!(this.qa&1)||this.O&131072?x.call(this,6):this.la.call(this,bj)};
ff[5]=function(){this.La?x.call(this,13,0,0,!0):(Fg(this,this.ja(2054)),this.J=this.ja(2086),this.K=this.ja(2088),this.M=this.ja(2090),this.G=this.ja(2094),this.L=this.ja(2096),this.I=this.ja(2098),this.D=this.ja(2100),le(this.oa,2102,this.ja(2084)),le(this.Z,2108,this.ja(2082)),le(this.Y,2114,this.ja(2080)),le(this.Da,2120,this.ja(2078)),Fe(this,this.ja(2072)),B(this,this.ja(2074)),pe(this,this.ja(2092)),this.Ib=this.ja(2126)|this.Ja(2128)<<16,this.Hc=this.Ib+this.ja(2130),this.Nb=this.ja(2138)|
this.Ja(2140)<<16,this.ad=this.Nb+this.ja(2142),le(this.Db,2132,this.ja(2076)),le(this.ka,2144,this.ja(2070)),this.A-=195)};ff[6]=function(){this.La?x.call(this,13,0):(this.qa&=-9,this.A-=2)};ff[11]=Ne;ff[166]=Ne;ff[255]=Ne;var A=[];A[5]=Ne;
A[7]=function(){if(this.La)x.call(this,13,0,0,!0);else{var a=this.oa.cc(this.J&this.wa,204);if(-1!==a){kk.call(this,this.ia(a));var b=this.ia(a+168),c=(b&24576)>>13;Fe(this,this.ia(a+4),c);this.Ib=this.ia(a+112);this.Hc=this.Ib+this.ia(a+116);this.Nb=this.ia(a+100);this.ad=this.Nb+this.ia(a+104);je(this.Db,this.ia(a+56),this.ia(a+120),this.ia(a+124),this.ia(a+128));je(this.ka,this.ia(a+52),this.ia(a+84),this.ia(a+88),this.ia(a+92));this.J=this.ia(a+12);this.K=this.ia(a+16);this.M=this.ia(a+20);this.G=
this.ia(a+28);this.L=this.ia(a+32);this.I=this.ia(a+36);this.D=this.ia(a+40);je(this.Ia,this.ia(a+60),this.ia(a+132),this.ia(a+136),this.ia(a+140));je(this.Ga,this.ia(a+64),this.ia(a+144),this.ia(a+148),this.ia(a+152));je(this.Da,this.ia(a+68),this.ia(a+156),this.ia(a+160),this.ia(a+164));je(this.Y,this.ia(a+72),b,this.ia(a+172),this.ia(a+176));je(this.Z,this.ia(a+76),this.ia(a+180),this.ia(a+184),this.ia(a+188));je(this.oa,this.ia(a+80),this.ia(a+192),this.ia(a+196),this.ia(a+200));B(this,this.ia(a+
8));pe(this,this.ia(a+24))}this.A-=122<<(a&3?1:0)}};A[16]=Pk;A[17]=Qk;A[18]=Rk;A[19]=Sk;A[32]=function(){if(this.La)x.call(this,13,0);else{var a,b=this.ra();switch((b&56)>>3){case 0:a=this.qa;break;case 2:a=this.qd;break;case 3:a=this.Uc;break;default:kf.call(this);return}Ff(this,b&7,a);this.A-=6}};A[33]=function(){if(this.La)x.call(this,13,0);else{var a=this.ra(),b=(a&56)>>3;4==b||5==b?kf.call(this):(Ff(this,a&7,this.Rb[b]),this.A-=22)}};
A[34]=function(){if(this.La)x.call(this,13,0);else{var a=this.ra(),b=Ef(this,a&7);switch((a&56)>>3){case 0:kk.call(this,b);this.A-=10;break;case 2:this.qd=b;this.A-=4;break;case 3:He.call(this,b);this.A-=5;break;default:kf.call(this)}}};A[35]=function(){if(this.La)x.call(this,13,0);else{var a=this.ra(),b=(a&56)>>3;4==b||5==b?kf.call(this):(a=Ef(this,a&7),a!=this.Rb[b]&&(dg(this,!1),this.Rb[b]=a,dg(this,!0)),this.A-=4>b?22:14)}};
A[36]=function(){if(this.La)x.call(this,13,0);else{var a=this.ra(),b=(a&56)>>3;6>b?kf.call(this):(Ff(this,a&7,this.dg[b]),this.A-=12)}};A[38]=function(){if(this.La)x.call(this,13,0);else{var a=this.ra(),b=(a&56)>>3;6>b?kf.call(this):(this.dg[b]=Ef(this,a&7),this.A-=12)}};A[128]=function(){var a=this.Fa();rg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};A[129]=function(){var a=this.Fa();rg(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)};
8));pe(this,this.ia(a+24))}this.A-=122<<(a&3?1:0)}};A[16]=Pk;A[17]=Qk;A[18]=Rk;A[19]=Sk;A[32]=function(){if(this.La)x.call(this,13,0);else{var a,b=this.sa();switch((b&56)>>3){case 0:a=this.qa;break;case 2:a=this.qd;break;case 3:a=this.Uc;break;default:kf.call(this);return}Ff(this,b&7,a);this.A-=6}};A[33]=function(){if(this.La)x.call(this,13,0);else{var a=this.sa(),b=(a&56)>>3;4==b||5==b?kf.call(this):(Ff(this,a&7,this.Rb[b]),this.A-=22)}};
A[34]=function(){if(this.La)x.call(this,13,0);else{var a=this.sa(),b=Ef(this,a&7);switch((a&56)>>3){case 0:kk.call(this,b);this.A-=10;break;case 2:this.qd=b;this.A-=4;break;case 3:He.call(this,b);this.A-=5;break;default:kf.call(this)}}};A[35]=function(){if(this.La)x.call(this,13,0);else{var a=this.sa(),b=(a&56)>>3;4==b||5==b?kf.call(this):(a=Ef(this,a&7),a!=this.Rb[b]&&(dg(this,!1),this.Rb[b]=a,dg(this,!0)),this.A-=4>b?22:14)}};
A[36]=function(){if(this.La)x.call(this,13,0);else{var a=this.sa(),b=(a&56)>>3;6>b?kf.call(this):(Ff(this,a&7,this.dg[b]),this.A-=12)}};A[38]=function(){if(this.La)x.call(this,13,0);else{var a=this.sa(),b=(a&56)>>3;6>b?kf.call(this):(this.dg[b]=Ef(this,a&7),this.A-=12)}};A[128]=function(){var a=this.Fa();rg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};A[129]=function(){var a=this.Fa();rg(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)};
A[130]=function(){var a=this.Fa();mg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};A[131]=function(){var a=this.Fa();mg(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)};A[132]=function(){var a=this.Fa();pg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};A[133]=function(){var a=this.Fa();pg(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)};A[134]=function(){var a=this.Fa();mg(this)||pg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};
A[135]=function(){var a=this.Fa();mg(this)||pg(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)};A[136]=function(){var a=this.Fa();qg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};A[137]=function(){var a=this.Fa();qg(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)};A[138]=function(){var a=this.Fa();ng(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};A[139]=function(){var a=this.Fa();ng(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)};
A[140]=function(){var a=this.Fa();!qg(this)!=!rg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};A[141]=function(){var a=this.Fa();!qg(this)==!rg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};A[142]=function(){var a=this.Fa();pg(this)||!qg(this)!=!rg(this)?(B(this,z(this)+a),this.A-=this.B.Qa):this.A-=this.B.Ra};A[143]=function(){var a=this.Fa();pg(this)||!qg(this)!=!rg(this)?this.A-=this.B.Ra:(B(this,z(this)+a),this.A-=this.B.Qa)};A[144]=function(){lk.call(this,vj)};
A[145]=function(){lk.call(this,vj)};A[146]=function(){lk.call(this,wj)};A[147]=function(){lk.call(this,xj)};A[148]=function(){lk.call(this,yj)};A[149]=function(){lk.call(this,zj)};A[150]=function(){lk.call(this,Aj)};A[151]=function(){lk.call(this,Bj)};A[152]=function(){lk.call(this,Cj)};A[153]=function(){lk.call(this,Dj)};A[154]=function(){lk.call(this,Ej)};A[155]=function(){lk.call(this,Fj)};A[156]=function(){lk.call(this,Gj)};A[157]=function(){lk.call(this,Hj)};A[158]=function(){lk.call(this,Ij)};
A[159]=function(){lk.call(this,Jj)};A[160]=function(){ue(this,this.Ga.U,this.V,2);this.A-=this.B.we};A[161]=function(){this.sa=this.Aa;var a=ne(this);this.Ga.load(a);this.A-=this.B.nc;this.sa=-1};A[163]=function(){this.za.call(this,Hi);-1!==this.C&&(this.A-=6)};A[164]=function(){this.za.call(this,2==this.V?Kj:Mj);this.A-=-1===this.C?3:7};A[165]=function(){this.za.call(this,2==this.V?Oj:Pj);this.A-=-1===this.C?3:7};A[168]=function(){ue(this,this.Ia.U,this.V,2);this.A-=this.B.we};
A[169]=function(){this.sa=this.Aa;var a=ne(this);this.Ia.load(a);this.A-=this.B.nc;this.sa=-1};A[171]=function(){this.za.call(this,Ki);-1!==this.C&&(this.A-=5)};A[172]=function(){this.za.call(this,2==this.V?Qj:Sj);this.A-=-1===this.C?3:7};A[173]=function(){this.za.call(this,2==this.V?Uj:Vj);this.A-=-1===this.C?3:7};A[175]=function(){this.la.call(this,2==this.V?Ri:Ti)};A[178]=function(){this.la.call(this,cj)};A[179]=function(){this.za.call(this,Ji);-1!==this.C&&(this.A-=5)};
A[159]=function(){lk.call(this,Jj)};A[160]=function(){ue(this,this.Ga.U,this.V,2);this.A-=this.B.we};A[161]=function(){this.ra=this.Aa;var a=ne(this);this.Ga.load(a);this.A-=this.B.nc;this.ra=-1};A[163]=function(){this.za.call(this,Hi);-1!==this.C&&(this.A-=6)};A[164]=function(){this.za.call(this,2==this.V?Kj:Mj);this.A-=-1===this.C?3:7};A[165]=function(){this.za.call(this,2==this.V?Oj:Pj);this.A-=-1===this.C?3:7};A[168]=function(){ue(this,this.Ia.U,this.V,2);this.A-=this.B.we};
A[169]=function(){this.ra=this.Aa;var a=ne(this);this.Ia.load(a);this.A-=this.B.nc;this.ra=-1};A[171]=function(){this.za.call(this,Ki);-1!==this.C&&(this.A-=5)};A[172]=function(){this.za.call(this,2==this.V?Qj:Sj);this.A-=-1===this.C?3:7};A[173]=function(){this.za.call(this,2==this.V?Uj:Vj);this.A-=-1===this.C?3:7};A[175]=function(){this.la.call(this,2==this.V?Ri:Ti)};A[178]=function(){this.la.call(this,cj)};A[179]=function(){this.za.call(this,Ji);-1!==this.C&&(this.A-=5)};
A[180]=function(){this.la.call(this,$i)};A[181]=function(){this.la.call(this,aj)};
A[182]=function(){this.kc.call(this,ej);switch(this.ga>>3&7){case 0:this.D=this.D&~this.R|this.D&255;break;case 1:this.I=this.I&~this.R|this.I&255;break;case 2:this.L=this.L&~this.R|this.L&255;break;case 3:this.G=this.G&~this.R|this.G&255;break;case 4:this.zc=this.zc&~this.R|this.D>>8&255;this.D=this.xa;break;case 5:this.M=this.M&~this.R|this.I>>8&255;this.I=this.xa;break;case 6:this.K=this.K&~this.R|this.L>>8&255;this.L=this.xa;break;case 7:this.J=this.J&~this.R|this.G>>8&255,this.G=this.xa}this.A-=
-1===this.C?3:6};A[183]=function(){se(this,2);this.la.call(this,oj);switch(this.ga>>3&7){case 0:this.D=this.D&65535;break;case 1:this.I=this.I&65535;break;case 2:this.L=this.L&65535;break;case 3:this.G=this.G&65535;break;case 4:this.zc=this.zc&65535;break;case 5:this.M=this.M&65535;break;case 6:this.K=this.K&65535;break;case 7:this.J=this.J&65535}this.A-=-1===this.C?3:6};A[186]=function(){this.lb.call(this,il,this.ra)};A[187]=function(){this.za.call(this,Ii);-1!==this.C&&(this.A-=5)};
-1===this.C?3:6};A[183]=function(){se(this,2);this.la.call(this,fj);switch(this.ga>>3&7){case 0:this.D=this.D&65535;break;case 1:this.I=this.I&65535;break;case 2:this.L=this.L&65535;break;case 3:this.G=this.G&65535;break;case 4:this.zc=this.zc&65535;break;case 5:this.M=this.M&65535;break;case 6:this.K=this.K&65535;break;case 7:this.J=this.J&65535}this.A-=-1===this.C?3:6};A[186]=function(){this.lb.call(this,il,this.sa)};A[187]=function(){this.za.call(this,Ii);-1!==this.C&&(this.A-=5)};
A[188]=function(){this.la.call(this,Bi)};A[189]=function(){this.la.call(this,Ci)};
A[190]=function(){this.kc.call(this,ej);switch(this.ga>>3&7){case 0:this.D=this.D&~this.R|(this.D&255)<<24>>24&this.R;break;case 1:this.I=this.I&~this.R|(this.I&255)<<24>>24&this.R;break;case 2:this.L=this.L&~this.R|(this.L&255)<<24>>24&this.R;break;case 3:this.G=this.G&~this.R|(this.G&255)<<24>>24&this.R;break;case 4:this.zc=this.zc&~this.R|this.D<<16>>24&this.R;this.D=this.xa;break;case 5:this.M=this.M&~this.R|this.I<<16>>24&this.R;this.I=this.xa;break;case 6:this.K=this.K&~this.R|this.L<<16>>24&
this.R;this.L=this.xa;break;case 7:this.J=this.J&~this.R|this.G<<16>>24&this.R,this.G=this.xa}this.A-=-1===this.C?3:6};A[191]=function(){se(this,2);this.la.call(this,oj);switch(this.ga>>3&7){case 0:this.D=this.D<<16>>16;break;case 1:this.I=this.I<<16>>16;break;case 2:this.L=this.L<<16>>16;break;case 3:this.G=this.G<<16>>16;break;case 4:this.zc=this.zc<<16>>16;break;case 5:this.M=this.M<<16>>16;break;case 6:this.K=this.K<<16>>16;break;case 7:this.J=this.J<<16>>16}this.A-=-1===this.C?3:6};
this.R;this.L=this.xa;break;case 7:this.J=this.J&~this.R|this.G<<16>>24&this.R,this.G=this.xa}this.A-=-1===this.C?3:6};A[191]=function(){se(this,2);this.la.call(this,fj);switch(this.ga>>3&7){case 0:this.D=this.D<<16>>16;break;case 1:this.I=this.I<<16>>16;break;case 2:this.L=this.L<<16>>16;break;case 3:this.G=this.G<<16>>16;break;case 4:this.zc=this.zc<<16>>16;break;case 5:this.M=this.M<<16>>16;break;case 6:this.K=this.K<<16>>16;break;case 7:this.J=this.J<<16>>16}this.A-=-1===this.C?3:6};
var eg=[function(){this.A-=2+(-1===this.C?0:1);return this.Db.U},function(){this.A-=2+(-1===this.C?0:1);return this.ka.U},function(a){this.N|=2;this.Db.load(a);this.A-=17+(-1===this.C?0:2);return a},function(a){this.N|=2;-1!==this.ka.load(a)&&(this.hb(this.ka.Lb+4,this.ka.nb|=512),this.ka.type|=512);this.A-=17+(-1===this.C?0:2);return a},function(a){this.N|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.xb.load(a)&&2048!=(this.xb.nb&2560)&&(this.xb.qc>=this.La&&this.xb.qc>=(a&3)||7168==(this.xb.nb&7168)))return Cg(this),
a;Ag(this);return a},function(a){this.N|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.xb.load(a)&&512==(this.xb.nb&2560)&&this.xb.qc>=this.La&&this.xb.qc>=(a&3))return Cg(this),a;Ag(this);return a},Pi,Pi],Me=[df,df,df,df,df,df,Pi,Pi],hl=[function(a){if(-1===this.C)x.call(this,6);else{a=this.Hc-this.Ib;var b=this.Ib;80286==this.da?b|=-16777216:80386<=this.da&&2!=this.V&&(a|=b<<16);this.bb(this.C+2,b);this.A-=11}return a},function(a){if(-1===this.C)x.call(this,6);else{a=this.ad-this.Nb;var b=this.Nb;
80286==this.da?b|=-16777216:80386<=this.da&&2!=this.V&&(a|=b<<16);this.bb(this.C+2,b);this.A-=12}return a},function(a){-1===this.C||this.O&131072?x.call(this,6):(this.Ib=this.ia(this.C+2)&(this.R|this.R<<8),a&=65535,this.Hc=this.Ib+a,this.N|=2,this.A-=11);return a},function(a){-1===this.C||this.O&131072?x.call(this,6):(this.Nb=this.ia(this.C+2)&(this.R|this.R<<8),a&=65535,this.ad=this.Nb+a,this.N|=2,this.A-=12);return a},function(){this.A-=2+(-1===this.C?0:1);return this.qa},Pi,function(a){this.O&
@ -428,13 +428,13 @@ window.webkitAudioContext),this.Ea&&(this.ka=new this.Ea));this.reset(!0);Ob(thi
l.uc=function(a,b,c,d){this.ma=b;this.H=c;this.ca=d;this.pa=a;this.Ic=bc(a,"FPU");ol(this,wl,this.Ic?1:0,!0);this.C=bc(a,"Keyboard");this.Ba=c.T.yd/xl;Tc(b,this,yl);Xc(b,this,zl);this.da<oh?this.da!=ul?(Tc(b,this,Al),Xc(b,this,Bl)):(Tc(b,this,Cl),Xc(b,this,Dl)):(Tc(b,this,El),Xc(b,this,Fl),(this.da|0)==Gl&&(Tc(b,this,Hl),Xc(b,this,Il)));if(d){var e=this;Jl(d,1024,function(){for(var a=0;a<e.hc.length;a++){for(var b=e.hc[a],c="PIC"+a+":",d=0;d<b.Mc.length;d++)c+=" IC"+(d+1)+"="+ta(b.Mc[d]);c+=" IMR="+
ta(b.td)+" IRR="+ta(b.bc)+" ISR="+ta(b.Ec)+" DELAY="+b.Ye;e.ca.P(c)}});Jl(d,2048,function(a){a=(a=a[0])?+a:null;for(var b=0;b<e.G.length;b++)if(null==a||b==a){Kl(e,b);var c=e.G[b],d="TIMER"+b+":",f=0;if(null!=c.Zc)for(var p=0;p<=c.Zc;p++)f|=c.qb[p]<<8*p;d+=" mode="+(c.mode>>1)+" bytes="+c.Zc+" count="+ua(f);e.ca.P(d)}});Jl(d,4096,function(){for(var a="",b=0;b<Ll;b++){var c=b<=Ml?Nl(e,b):e.A[b];a&&(a+="\n");a+="CMOS["+ta(b)+"]: "+ta(c)}e.ca.P(a)})}ag(c,26,this.bn.bind(this))};
l.Yb=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.Xb=function(a){return a?this.save():!0};
l.reset=function(a){var b;Ol(this);this.F=Array(this.za);for(b=0;b<this.za;b++)Pl(this,b);this.hc=Array(this.ha);Ql(this,Rl,Sl);1<this.ha&&Ql(this,Tl,Ul);this.va=this.sa=null;this.G=Array((this.da|0)==Gl?6:3);for(b=0;b<this.G.length;b++)Vl(this,b);this.ga=this.Da=this.J=this.xa=null;this.ea=sh;this.da==ul&&(this.aa=0);if(this.da>=oh){this.D=Wl;this.L=0;this.K=Xl;this.oa=0;this.M=Yl|Zl;512<=$l(this)&&(this.M|=am);+bm(this,ql,void 0)==cm&&(this.M|=dm);(this.da|0)==Gl&&(this.M=this.M|em|fm);this.qa=
l.reset=function(a){var b;Ol(this);this.F=Array(this.za);for(b=0;b<this.za;b++)Pl(this,b);this.hc=Array(this.ha);Ql(this,Rl,Sl);1<this.ha&&Ql(this,Tl,Ul);this.va=this.ra=null;this.G=Array((this.da|0)==Gl?6:3);for(b=0;b<this.G.length;b++)Vl(this,b);this.ga=this.Da=this.J=this.xa=null;this.ea=sh;this.da==ul&&(this.aa=0);if(this.da>=oh){this.D=Wl;this.L=0;this.K=Xl;this.oa=0;this.M=Yl|Zl;512<=$l(this)&&(this.M|=am);+bm(this,ql,void 0)==cm&&(this.M|=dm);(this.da|0)==Gl&&(this.M=this.M|em|fm);this.qa=
gm|hm;this.Y=Array(8);this.W=0;a&&(this.A=Array(Ll));im(this,this.La);for(a=jm;a<=km;a++)this.A[a]=0;for(a=lm;a<mm;a++)void 0===this.A[a]&&(this.A[a]=0);a=0|+bm(this,ql,void 0)<<nm.Og&nm.yc;a|=+bm(this,wl,void 0)?om:0;b=+bm(this,pl,void 0);a|=b?b-1<<pm.Og&pm.yc|pm.tl:0;this.A[qm]=a;this.A[rm]=sm(this,0)<<4|sm(this,1);tm(this)}};
function im(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.P("CMOS date invalid ("+b+"), using "+c)):b&&a.P("CMOS date: "+c);a.A[um]=c.getSeconds();a.A[vm]=0;a.A[wm]=c.getMinutes();a.A[xm]=0;a.A[ym]=c.getHours();a.A[zm]=0;a.A[Am]=c.getDay()+1;a.A[Bm]=c.getDate();a.A[Cm]=c.getMonth()+1;b=c.getFullYear();a.A[Xm]=b%100;b/=100;a.A[Ym]=b%10|b/10<<4;a.A[Zm]=38;a.A[$d]=$m;a.A[an]=0;a.A[Ml]=bn;a.la=a.Z=0;a.Ia=a.Aa=null}
function im(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.P("CMOS date invalid ("+b+"), using "+c)):b&&a.P("CMOS date: "+c);a.A[um]=c.getSeconds();a.A[vm]=0;a.A[wm]=c.getMinutes();a.A[xm]=0;a.A[ym]=c.getHours();a.A[zm]=0;a.A[Am]=c.getDay()+1;a.A[Bm]=c.getDate();a.A[Cm]=c.getMonth()+1;b=c.getFullYear();a.A[Dm]=b%100;b/=100;a.A[Ym]=b%10|b/10<<4;a.A[Zm]=38;a.A[$d]=$m;a.A[an]=0;a.A[Ml]=bn;a.la=a.Z=0;a.Ia=a.Aa=null}
function Nl(a,b){var c=a.A[b];if(b<Zm){var d=!1;b!=ym&&b!=zm||a.A[$d]&$m||(12>c?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[$d]&cn||(d&&128<c&&(c-=48),c=c%10|c/10<<4)}else b==Zm&&(a.A[b]^=dn);return c}function en(a){var b;void 0===b&&(b=a.Aa);a.Z=Kd(a.H,a.O)+b;a.A[$d]&ae&&Od(a.H,b)}function tm(a){for(var b=0,c=rm;c<mm;c++)b+=a.A[c];a.A[fn]=b&255;a.A[mm]=b>>8}
l.save=function(){var a=new fg(this);a.set(0,[this.B]);for(var b=[],c=0;c<this.F;c++){for(var d=this.F[c],e=d,f=[],g=0;g<e.oc.length;g++){var h=e.oc[g];f[g]=[h.re,h.fg,h.pc,h.ub,h.qb,h.mode,h.ig,h.Vo,h.Wo]}b[c]=[d.Mb,d.$g,d.aj,d.yb,f,d.bj]}a.set(1,[b]);b=[];for(c=0;c<this.hc.length;c++)d=this.hc[c],b[c]=[d.Ye,d.Mc,d.Ld,d.td,d.bc,d.Ec,d.ke,d.nf];a.set(2,[b]);b=[];for(c=0;c<this.G.length;c++)d=this.G[c],b[c]=[d.pc,d.Oc,d.qb,d.ne,d.bh,d.mode,d.Rf,d.wd,d.Zc,d.gd,d.Pe,d.pe,d.jd,d.Mb,d.Te];a.set(3,[this.sa,
l.save=function(){var a=new fg(this);a.set(0,[this.B]);for(var b=[],c=0;c<this.F;c++){for(var d=this.F[c],e=d,f=[],g=0;g<e.oc.length;g++){var h=e.oc[g];f[g]=[h.re,h.fg,h.pc,h.ub,h.qb,h.mode,h.ig,h.Vo,h.Wo]}b[c]=[d.Mb,d.$g,d.aj,d.yb,f,d.bj]}a.set(1,[b]);b=[];for(c=0;c<this.hc.length;c++)d=this.hc[c],b[c]=[d.Ye,d.Mc,d.Ld,d.td,d.bc,d.Ec,d.ke,d.nf];a.set(2,[b]);b=[];for(c=0;c<this.G.length;c++)d=this.G[c],b[c]=[d.pc,d.Oc,d.qb,d.ne,d.bh,d.mode,d.Rf,d.wd,d.Zc,d.gd,d.Pe,d.pe,d.jd,d.Mb,d.Te];a.set(3,[this.ra,
b,this.va]);a.set(4,[this.xa,this.J,this.Da,this.ga,this.ea]);this.da>=oh&&(a.set(5,[this.D,this.L,this.K,this.oa,this.M,this.qa]),a.set(6,[this.Y[7],this.Y,this.W,this.A,this.la,this.Z]));return a.data()};
l.restore=function(a){var b,c;b=a[0];Array.isArray(b[0])?this.B=b[0]:(this.B[0][0]=b[0],this.B[1][0]=b[1]&15,this.B[0][1]=b[2],this.B[1][1]=b[3]&15);Ol(this);b=a[1];for(c=0;c<this.za;c++)Pl(this,c,1==b.length?b[0][c]:b);b=a[2];for(c=0;c<this.ha;c++)Ql(this,c,c?Ul:Sl,b[0][c]);b=a[3];this.sa=b[0];this.va=b[2];for(c=0;c<this.G.length;c++)Vl(this,c,b[1][c]);b=a[4];this.xa=b[0];this.J=b[1];this.Da=b[2];this.ga=b[3];this.ea=b[4];if(b=a[5])this.D=b[0],this.L=b[1],this.K=b[2],this.oa=b[3],this.M=b[4],this.qa=
l.restore=function(a){var b,c;b=a[0];Array.isArray(b[0])?this.B=b[0]:(this.B[0][0]=b[0],this.B[1][0]=b[1]&15,this.B[0][1]=b[2],this.B[1][1]=b[3]&15);Ol(this);b=a[1];for(c=0;c<this.za;c++)Pl(this,c,1==b.length?b[0][c]:b);b=a[2];for(c=0;c<this.ha;c++)Ql(this,c,c?Ul:Sl,b[0][c]);b=a[3];this.ra=b[0];this.va=b[2];for(c=0;c<this.G.length;c++)Vl(this,c,b[1][c]);b=a[4];this.xa=b[0];this.J=b[1];this.Da=b[2];this.ga=b[3];this.ea=b[4];if(b=a[5])this.D=b[0],this.L=b[1],this.K=b[2],this.oa=b[3],this.M=b[4],this.qa=
b[5];if(b=a[6])this.Y=b[1],this.Y[7]=b[0],this.W=b[2],this.A=b[3],this.la=b[4],this.Z=b[5],im(this);return!0};l.start=function(){gn(this)};l.stop=function(){gn(this)};function Pl(a,b,c){var d=a.F[b];d||(d={oc:Array(4)});c=c&&5<=c.length?c:hn;d.Mb=c[0];d.$g=c[1];d.aj=c[2];d.yb=c[3];d.rn=b<<2;for(var e=0;e<d.oc.length;e++)jn(d,e,c[4][e]);d.bj=c[5]||0;a.F[b]=d}
function jn(a,b,c){var d=a.oc[b];d||(d={fg:[0,0],pc:[0,0],ub:[0,0],qb:[0,0]});c=c&&8==c.length?c:kn;d.re=c[0];d.fg[0]=c[1][0];d.fg[1]=c[1][1];d.pc[0]=c[2][0];d.pc[1]=c[2][1];d.ub[0]=c[3][0];d.ub[1]=c[3][1];d.qb[0]=c[4][0];d.qb[1]=c[4][1];d.mode=c[5];d.ig=c[6];d.controller=a;d.Dj=b;ln(d,c[8],c[9]);a.oc[b]=d}function ln(a,b,c,d){"string"==typeof b&&(b=Eb(b));b&&(a.done=null,a.Vo=b.id,a.Wo=c,a.ng=b,a.hh=b[c],a.Cg=d)}
function Ql(a,b,c,d){var e=a.hc[b];e||(e={Mc:[null,null,null,null]});d=d&&8==d.length?d:mn;e.port=c;e.mq=b<<3;e.Ye=d[0];e.Mc[0]=d[1][0];e.Mc[1]=d[1][1];e.Mc[2]=d[1][2];e.Mc[3]=d[1][3];e.Ld=d[2];e.td=d[3];e.bc=d[4];e.Ec=d[5];e.ke=d[6];e.nf=d[7];a.hc[b]=e}
@ -455,12 +455,12 @@ function io(a,b,c,d){var e=a.hc[b];r(a,34048)&&t(a,e.port,c,d,"PIC"+b,null,!0);i
ta(c),!0,!0)}else d==to?e.ke=c&qo:r(a,1073741824)&&Rb(a,"PIC"+b+"("+ta(e.port)+"): unsupported OCW2 automatic EOI command "+ta(c),!0,!0)}function uo(a,b,c){var d=a.hc[b],e=d.td;r(a,34048)&&t(a,d.port+1,null,c,"PIC"+b,e,!0);return e}function vo(a,b,c,d){var e=a.hc[b];r(a,34048)&&t(a,e.port+1,c,d,"PIC"+b,null,!0);e.Ld<e.Mc.length?(e.Mc[e.Ld++]=c,2==e.Ld&&e.Mc[0]&wo&&e.Ld++,3!=e.Ld||e.Mc[0]&xo||e.Ld++):(e.td=c,d=a.H,d.N|=4,ro(a,b||253!=c?0:6))}
function rh(a,b,c){var d=a.hc[b>>3];b=1<<(b&7);d.bc&b||(d.bc|=b,d.Ye=c||0,ro(a))}function ph(a,b){var c=a.hc[b>>3];b=1<<(b&7);c.bc&b&&(c.bc&=~b,ro(a))}function ro(a,b){var c,d=-1;1<a.ha&&(c=a.hc[1],d=~(c.Ec|c.td)&c.bc);c=a.hc[0];0<=d&&(c.bc=d?c.bc|1<<yo:c.bc&~(1<<yo));d=~(c.Ec|c.td)&c.bc;a=a.H;a.W&&(a.Ya=d?a.Ya|1:a.Ya&-2);d&&b&&(c.Ye=b)}
function Tg(a,b){void 0===b&&(b=0);var c=-1,d=a.hc[b];if(d.Ye)c=-2,d.Ye--;else for(var e=d.bc&((d.Ec|d.td)^255),f=d.ke+1;;){var f=f&7,g=1<<f;if(d.Ec&g)break;if(e&g){b||f!=yo?c=d.Mc[1]+f:c=Tg(a,1);0<=c&&(d.Ec|=g,d.bc&=~g);break}if(f++==d.ke)break}return c}function zo(a,b,c,d,e){var f;f=b?3:0;var g=a.G[f+c];g.Te?(f=g.Mb,g.Te=!1):(g.wd==g.Zc&&Ao(a,f+c),g.Pe?(f=g.ne[g.wd++],g.wd==g.Zc&&(g.Pe=!1)):(Kl(a,f+c),f=g.qb[g.wd++]));r(a,2304)&&t(a,d,null,e,"PIT"+b+".TIMER"+c,f,!0);return f}
function Bo(a,b,c,d,e,f){r(a,2304)&&t(a,d,e,f,"PIT"+b+".TIMER"+c,null,!0);f=b?3:0;d=a.G[f+c];d.wd==d.Zc&&Ao(a,f+c);d.pc[d.wd++]=e;d.wd==d.Zc&&(d.pe&&d.mode!=Co&&d.mode!=Do||(d.Pe=!1,d.qb[0]=d.Oc[0]=d.pc[0],d.qb[1]=d.Oc[1]=d.pc[1],d.jd=Kd(a.H,a.O),d.pe=!0,d.gd=d.mode!=Co,b==Eo&&c==Fo&&(ph(a,Go),e=Ho(a,Fo)*a.Ba|0,d.mode==Zd&&(e>>=1),Od(a.H,e))),b==Eo&&c==Io&&gn(a))}function Jo(a,b,c,d){t(a,c,null,d,"PIT"+b+".CTRL",null,2048);return b?a.va:a.sa}
function Ko(a,b,c,d,e){t(a,c,d,e,"PIT"+b+".CTRL",null,2048);e=0;c=d&Lo;b?(e=3,a.va=d):a.sa=d;if(c==Mo){if(!(d&No))for(c=0;2>=c;c++)if(d&Oo<<c){b=e+c;var f=a.G[b];f.Te||(Kl(a,b),f.Mb=f.bh|f.mode|f.Rf|(f.wd<f.Zc?Po:0)|(f.gd?Qo:0),f.Te=!0)}if(!(d&Ro))for(c=0;2>=c;c++)d&Oo<<c&&So(a,e+c)}else{c>>=To;var f=d&Uo,g=d&Vo;d&=Wo;if(d==Xo)So(a,e+c);else{e+=c;var h=a.G[e];h.Rf=d;h.mode=g;h.bh=f;h.pc=[0,0];h.qb=[0,0];h.ne=[0,0];h.gd=!1;h.Pe=!1;h.pe=!1;h.Te=!1;Ao(a,e);b==Eo&&c==Fo&&ph(a,Go);b==Eo&&c==Io&&255==a.hc[0].td&&
function Bo(a,b,c,d,e,f){r(a,2304)&&t(a,d,e,f,"PIT"+b+".TIMER"+c,null,!0);f=b?3:0;d=a.G[f+c];d.wd==d.Zc&&Ao(a,f+c);d.pc[d.wd++]=e;d.wd==d.Zc&&(d.pe&&d.mode!=Co&&d.mode!=Do||(d.Pe=!1,d.qb[0]=d.Oc[0]=d.pc[0],d.qb[1]=d.Oc[1]=d.pc[1],d.jd=Kd(a.H,a.O),d.pe=!0,d.gd=d.mode!=Co,b==Eo&&c==Fo&&(ph(a,Go),e=Ho(a,Fo)*a.Ba|0,d.mode==Zd&&(e>>=1),Od(a.H,e))),b==Eo&&c==Io&&gn(a))}function Jo(a,b,c,d){t(a,c,null,d,"PIT"+b+".CTRL",null,2048);return b?a.va:a.ra}
function Ko(a,b,c,d,e){t(a,c,d,e,"PIT"+b+".CTRL",null,2048);e=0;c=d&Lo;b?(e=3,a.va=d):a.ra=d;if(c==Mo){if(!(d&No))for(c=0;2>=c;c++)if(d&Oo<<c){b=e+c;var f=a.G[b];f.Te||(Kl(a,b),f.Mb=f.bh|f.mode|f.Rf|(f.wd<f.Zc?Po:0)|(f.gd?Qo:0),f.Te=!0)}if(!(d&Ro))for(c=0;2>=c;c++)d&Oo<<c&&So(a,e+c)}else{c>>=To;var f=d&Uo,g=d&Vo;d&=Wo;if(d==Xo)So(a,e+c);else{e+=c;var h=a.G[e];h.Rf=d;h.mode=g;h.bh=f;h.pc=[0,0];h.qb=[0,0];h.ne=[0,0];h.gd=!1;h.Pe=!1;h.pe=!1;h.Te=!1;Ao(a,e);b==Eo&&c==Fo&&ph(a,Go);b==Eo&&c==Io&&255==a.hc[0].td&&
a.J==(Yo|Zo|$o|ap)&&(b=a.G[0],b.Oc[0]=b.pc[0],b.Oc[1]=b.pc[1],b.jd=Kd(a.H,a.O))}}}function Ho(a,b){a=a.G[b];(b=a.pc[1]<<8|a.pc[0])||(b=1==a.Zc?256:65536);return b}function Yd(a,b){a=a.G[b];(b=a.Oc[1]<<8|a.Oc[0])||(b=1==a.Zc?256:65536);return b}function So(a,b){Kl(a,b);var c=a.G[b];c.ne[0]=c.qb[0];c.ne[1]=c.qb[1];c.Pe=!0;Ao(a,b)}function Ao(a,b){a=a.G[b];a.wd=a.Rf==bp?1:0;a.Zc=a.Rf==cp?2:1}
function Kl(a,b,c){var d=a.G[b];if(d.pe&&(b!=Io||a.J&Yo)){var e=Kd(a.H,a.O),f=(e-d.jd)/a.Ba|0;0>f&&(d.jd=e,f=0);var g=Ho(a,b),h=Yd(a,b)-f;d.mode==Co?(0>=h&&(h=0),h||(d.gd=!0,d.pe=!1,b||rh(a,Go))):d.mode==dp?(d.gd=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.Oc[0]=h&255,d.Oc[1]=h>>8&255,d.jd=e,!b&&d.gd&&rh(a,Go))):d.mode==Zd&&(h-=f,0>=h&&(d.gd=!d.gd,h=g+h,0>=h&&(h=g),d.Oc[0]=h&255,d.Oc[1]=h>>8&255,d.jd=e,!b&&d.gd&&rh(a,Go)));d.qb[0]=h&255;d.qb[1]=h>>8&255;c&&(a.jd=0)}return d}
function Xd(a,b){for(var c=0;c<a.G.length;c++)Kl(a,c,b);if(a.da>=oh){b=a.H.T.yd;c=Kd(a.H,a.O);null==a.Aa&&(a.la=Kd(a.H,a.O),a.Ia=1024,a.Aa=Math.floor(a.H.T.yd/a.Ia),en(a));c>=a.Z&&(a.A[an]|=ep,a.A[$d]&ae&&(a.A[an]|=fp,rh(a,gp)),a.Z=c+a.Aa);a.A[um]==a.A[vm]&&a.A[wm]==a.A[xm]&&a.A[ym]==a.A[zm]&&(a.A[an]|=hp,a.A[$d]&ip&&(a.A[an]|=fp,rh(a,gp)));var d=c-a.la,e=Math.floor(d/b);if(e&&!(a.A[$d]&jp)){for(;e--;)if(60<=++a.A[um]&&(a.A[um]=0,60<=++a.A[wm]&&(a.A[wm]=0,24<=++a.A[ym]))){a.A[ym]=0;a.A[Am]=a.A[Am]%
7+1;var f;f=a.A[Xm];var g=La[a.A[Cm]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[Bm]>f&&(a.A[Bm]=1,12<++a.A[Cm]&&(a.A[Cm]=1,a.A[Xm]=(a.A[Xm]+1)%100))}a.A[an]|=kp;a.A[$d]&lp&&(a.A[an]|=fp,rh(a,gp))}a.la=c-d%b}}l.Lm=function(a,b){var c=this.xa;this.ga&mp&&(this.J&np?c=this.B[0][1]:this.C&&(c=op(this.C)));t(this,a,null,b,"PPI_A",c);return c};l.qo=function(a,b,c){t(this,a,b,c,"PPI_A");this.xa=b};l.Mm=function(a,b){var c=this.J;t(this,a,null,b,"PPI_B",c);return c};
7+1;var f;f=a.A[Dm];var g=La[a.A[Cm]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[Bm]>f&&(a.A[Bm]=1,12<++a.A[Cm]&&(a.A[Cm]=1,a.A[Dm]=(a.A[Dm]+1)%100))}a.A[an]|=kp;a.A[$d]&lp&&(a.A[an]|=fp,rh(a,gp))}a.la=c-d%b}}l.Lm=function(a,b){var c=this.xa;this.ga&mp&&(this.J&np?c=this.B[0][1]:this.C&&(c=op(this.C)));t(this,a,null,b,"PPI_A",c);return c};l.qo=function(a,b,c){t(this,a,b,c,"PPI_A");this.xa=b};l.Mm=function(a,b){var c=this.J;t(this,a,null,b,"PPI_B",c);return c};
l.ro=function(a,b,c){t(this,a,b,c,"PPI_B");pp(this,b)};function pp(a,b){var c=!!(b&qp),d=!!(a.J&qp);a.J=b;a.C&&rp(a.C,!(b&np),!!(b&ap));c!=d&&gn(a,c)}l.Nm=function(a,b){var c=0,c=(this.da|0)==tl?this.J&Zo?c|this.B[1][1]&sp:c|this.B[1][1]>>4&1:this.J&tp?c|this.B[0][1]>>4:c|this.B[0][1]&15;this.J&Yo&&Kl(this,Io).gd&&(c=this.J&qp?c|up:c|vp);t(this,a,null,b,"PPI_C",c,32896);return c};l.so=function(a,b,c){t(this,a,b,c,"PPI_C");this.Da=b};l.Om=function(a,b){var c=this.ga;t(this,a,null,b,"PPI_CTRL",c);return c};
l.to=function(a,b,c){t(this,a,b,c,"PPI_CTRL");this.ga=b};l.Xl=function(a,b){var c=this.C?op(this.C):0;t(this,a,null,b,"8041_KBD",c);this.aa&=~wp;return c};l.An=function(a,b,c){t(this,a,b,c,"8041_KBD")};l.Wl=function(a,b){var c=this.J;t(this,a,null,b,"8041_CTRL",c);return c};l.zn=function(a,b,c){t(this,a,b,c,"8041_CTRL");pp(this,b)};l.Yl=function(a,b){var c=this.aa;t(this,a,null,b,"8041_STATUS",c);return c};
l.Zl=function(a,b){var c=this.oa;t(this,a,null,b,"8042_OUTBUFF",c,16384);this.D&=~(wp|xp);this.C&&yp(this.C);return c};
@ -477,7 +477,7 @@ var nl="sw1",rl="sw2",vl="swdesc",cm=3,Gn=1,Hn=15,Kn=3,Ln=4,On=3,Xn=12,ao=0,Yn=4
yc:48,Og:4},pl=1,wl=3,ql=4,wn=5,xn=6,qn={};qn[tl]=[{},{}];qn[tl][0][pl]={yc:192,Xc:{1:0,2:64,3:128,4:192},Gd:"Number of Floppy Drives"};qn[tl][0][wl]={yc:2,Xc:{0:0,1:2},Gd:"FPU"};qn[tl][0][ql]={yc:48,Xc:{0:0,1:16,2:32,3:48,none:0,tv:16,color:32,cga:32,mda:48,mono:48,ega:0,vga:0},Gd:"Monitor Type"};qn[tl][0][wn]={yc:12,Xc:{16:0,32:4,48:8,64:12},Gd:"Base Memory (16Kb Increments)"};
qn[tl][1][xn]={yc:31,Xc:{0:0,32:1,64:2,96:3,128:4,160:5,192:6,224:7,256:8,288:9,320:10,352:11,384:12,416:13,448:14,480:15,512:16,544:17,576:18},Gd:"Expansion Memory (32Kb Increments)"};qn[5160]=[{},{}];qn[5160][0][pl]=qn[tl][0][pl];qn[5160][0][wl]=qn[tl][0][wl];qn[5160][0][ql]=qn[tl][0][ql];qn[5160][0][wn]={yc:12,Xc:{64:0,128:4,192:8,256:12},Gd:"Base Memory (64Kb Increments)"};qn[5160][1][xn]=qn[tl][1][xn];qn[ul]=[{},{}];qn[ul][0][wn]={yc:143,Xc:{128:1,256:130,512:8,640:141},Gd:"Base Memory (128Kb Increments)"};
qn[ul][0][wl]={yc:16,Xc:{0:0,1:16},Gd:"FPU"};qn[ul][1][2]={yc:1,Xc:{0:0,1:1},Gd:"Floppy Type"};qn[ul][1][pl]=qn[tl][0][pl];qn[ul][1][ql]=qn[tl][0][ql];
var $p=4,aq=8,Xl=16,Sp=85,Up=0,em=4,fm=8,am=16,Yl=32,dm=64,Zl=128,gm=1,hm=2,Yp=1,Mp=16,Lp=192,Op=32,Ap=96,Rp=170,Tp=171,Pp=173,Qp=174,Vp=192,Wp=208,Cp=209,Xp=224,Np=240,wp=1,Zp=4,zp=8,Wl=16,xp=256,um=0,vm=1,wm=2,xm=3,ym=4,zm=5,Am=6,Bm=7,Cm=8,Xm=9,Zm=10,$d=11,an=12,Ml=13,lm=14,rm=16,qm=20,jm=21,km=24,mm=46,fn=47,Ym=50,hq=63,Ll=64,fq=128,dn=128,jp=128,ae=64,ip=32,lp=16,cn=4,$m=2,fp=128,ep=64,hp=32,kp=16,iq=15,bn=128,vn=0,rn=1,tn=2,sn=3,un=4,gq=128,sh=0,hn=[0,null,null,0,Array(4),0],kn=[!0,[0,0],[0,
var $p=4,aq=8,Xl=16,Sp=85,Up=0,em=4,fm=8,am=16,Yl=32,dm=64,Zl=128,gm=1,hm=2,Yp=1,Mp=16,Lp=192,Op=32,Ap=96,Rp=170,Tp=171,Pp=173,Qp=174,Vp=192,Wp=208,Cp=209,Xp=224,Np=240,wp=1,Zp=4,zp=8,Wl=16,xp=256,um=0,vm=1,wm=2,xm=3,ym=4,zm=5,Am=6,Bm=7,Cm=8,Dm=9,Zm=10,$d=11,an=12,Ml=13,lm=14,rm=16,qm=20,jm=21,km=24,mm=46,fn=47,Ym=50,hq=63,Ll=64,fq=128,dn=128,jp=128,ae=64,ip=32,lp=16,cn=4,$m=2,fp=128,ep=64,hp=32,kp=16,iq=15,bn=128,vn=0,rn=1,tn=2,sn=3,un=4,gq=128,sh=0,hn=[0,null,null,0,Array(4),0],kn=[!0,[0,0],[0,
0],[0,0],[0,0]],mn=[0,Array(4)],nn=[[0,0],[0,0],[0,0],[0,0]],yl={0:function(a,b){return An(this,0,0,a,b)},1:function(a,b){return Dn(this,0,0,a,b)},2:function(a,b){return An(this,0,1,a,b)},3:function(a,b){return Dn(this,0,1,a,b)},4:function(a,b){return An(this,0,2,a,b)},5:function(a,b){return Dn(this,0,2,a,b)},6:function(a,b){return An(this,0,3,a,b)},7:function(a,b){return Dn(this,0,3,a,b)},8:function(a,b){return Fn(this,0,a,b)},13:function(a,b){return Pn(this,0,a,b)},32:function(a,b){return eo(this,
Rl,b)},33:function(a,b){return uo(this,Rl,b)},64:function(a,b){return zo(this,Eo,Fo,a,b)},65:function(a,b){return zo(this,Eo,1,a,b)},66:function(a,b){return zo(this,Eo,Io,a,b)},67:function(a,b){return Jo(this,Eo,a,b)},129:function(a,b){return Rn(this,0,2,a,b)},130:function(a,b){return Rn(this,0,3,a,b)},131:function(a,b){return Rn(this,0,1,a,b)},135:function(a,b){return Rn(this,0,0,a,b)}},Al={96:jl.prototype.Lm,97:jl.prototype.Mm,98:jl.prototype.Nm,99:jl.prototype.Om},El={96:jl.prototype.Zl,97:jl.prototype.$l,
100:jl.prototype.am,112:jl.prototype.om,113:jl.prototype.pm,128:function(a,b){return Tn(this,7,a,b)},132:function(a,b){return Tn(this,0,a,b)},133:function(a,b){return Tn(this,1,a,b)},134:function(a,b){return Tn(this,2,a,b)},136:function(a,b){return Tn(this,3,a,b)},137:function(a,b){return Rn(this,1,2,a,b)},138:function(a,b){return Rn(this,1,3,a,b)},139:function(a,b){return Rn(this,1,1,a,b)},140:function(a,b){return Tn(this,4,a,b)},141:function(a,b){return Tn(this,5,a,b)},142:function(a,b){return Tn(this,
@ -542,7 +542,7 @@ as[1|Mr]=function(a){a+=this.H;var b=a&-2;a=this.controller.jb&(b==a?16711935:-1
as[98]=function(a,b){a+=this.H;b=xs[b&15];b&=this.controller.vb;b=b&this.controller.Ab|this.controller.vb&~this.controller.Ab;b=b&this.controller.jb|this.X[a]&~this.controller.jb;this.X[a]!=b&&(this.X[a]=b,this.Na=!0)};as[162]=function(a,b){a+=this.H;b=xs[b&15];b|=this.controller.vb;b=b&this.controller.Ab|this.controller.vb&~this.controller.Ab;b=b&this.controller.jb|this.X[a]&~this.controller.jb;this.X[a]!=b&&(this.X[a]=b,this.Na=!0)};
as[226]=function(a,b){a+=this.H;b=xs[b&15];b^=this.controller.vb;b=b&this.controller.Ab|this.controller.vb&~this.controller.Ab;b=b&this.controller.jb|this.X[a]&~this.controller.jb;this.X[a]!=b&&(this.X[a]=b,this.Na=!0)};as[3]=function(a,b){a+=this.H;b=b>>this.controller.Qc|b<<8-this.controller.Qc&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Ab;b=this.controller.If&b|this.controller.vb&~b;b=b&this.controller.jb|this.X[a]&~this.controller.jb;this.X[a]!=b&&(this.X[a]=b,this.Na=!0)};
function Q(a,b,c,d,e){rb.call(this,"Video",a,262144);var f=this;this.ad=Wa("Gecko/");var g=["","moz","ms","webkit"];this.da=a.model;var h=ys[this.da]||ys.mda;this.Ka=h[0];this.vd=a.memory||0;this.od=a.switches;this.ea=a.mode;if(null==this.ea||null==zs[this.ea])this.ea=h[1];this.Nb=a.charCols;this.zc=a.charRows;if(void 0===this.Nb||void 0===this.zc)this.Nb=zs[this.ea][0],this.zc=zs[this.ea][1];this.Z=a.screenWidth;this.ka=a.screenHeight;this.bd=a.scale;this.Rd=12<=Math.round(this.Z/this.Nb);this.O=
b;this.L=c;this.D=(this.rg=d)||b||null;this.kc=a.screenColor||"black";this.md=(1-(Xa("flicker")||a.flicker||0)).toString();this.Eb=!1;b&&(b.style.backgroundColor=this.kc);e&&(e.style.backgroundColor=this.kc);b=a.smoothing;(c=Xa("smoothing"))&&(b="true"==c);if(null!=b)for(c=0;c<g.length;c++)if(d=(d=g[c])?d+"ImageSmoothingEnabled":"imageSmoothingEnabled",void 0!==this.L[d]){this.L[d]=b;break}this.pd=a.touchScreen;this.Hc=As;this.G=null;this.Qd=a.autoLock;this.cb=this.Qb=0;this.sa=[];this.ha=Array(this.Ka==
b;this.L=c;this.D=(this.rg=d)||b||null;this.kc=a.screenColor||"black";this.md=(1-(Xa("flicker")||a.flicker||0)).toString();this.Eb=!1;b&&(b.style.backgroundColor=this.kc);e&&(e.style.backgroundColor=this.kc);b=a.smoothing;(c=Xa("smoothing"))&&(b="true"==c);if(null!=b)for(c=0;c<g.length;c++)if(d=(d=g[c])?d+"ImageSmoothingEnabled":"imageSmoothingEnabled",void 0!==this.L[d]){this.L[d]=b;break}this.pd=a.touchScreen;this.Hc=As;this.G=null;this.Qd=a.autoLock;this.cb=this.Qb=0;this.ra=[];this.ha=Array(this.Ka==
pq?256:16);this.Ia=!1;if(this.N=e)if(this.N.A=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen,this.N.A){for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenchange","on"+d in document){document.addEventListener(d,function(){Bs(f,!!(document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement))},!1);break}for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenerror","on"+d in document){document.addEventListener(d,
function(){Bs(f,null)},!1);break}}this.D&&(this.D.onfocus=function(){return f.Dg(!0)},this.D.onblur=function(){return f.Dg(!1)},this.D.qe=this.D.requestPointerLock||this.D.mozRequestPointerLock||this.D.webkitRequestPointerLock,this.D.B=this.D.exitPointerLock||this.D.mozExitPointerLock||this.D.webkitExitPointerLock,this.D.qe&&(e=function(){f.Kf(document.pointerLockElement===f.D||document.mozPointerLockElement===f.D||document.webkitPointerLockElement===f.D)},"onpointerlockchange"in document?document.addEventListener("pointerlockchange",
e,!1):"onmozpointerlockchange"in document?document.addEventListener("mozpointerlockchange",e,!1):"onwebkitpointerlockchange"in document&&document.addEventListener("webkitpointerlockchange",e,!1)));(this.za=a.fontROM)&&"json"!=wa(this.za)&&(this.za=Pa()+"/api/v1/dump?file="+this.za+"&format=bytes")}ba(Q,rb);l=Q.prototype;
@ -563,22 +563,22 @@ function Ps(a,b,c,d){if(d)a.Ca("Unable to load font ROM (error "+d+": "+b+")",0>
function ht(a,b){if(1==b)return a.ha[0]=it[ct],a.ha[1]=it[at],a.ha;if(2==b){var c=a.B.af;if(a.B===a.A){var d=a.A.Cc[0],c=d&7;d&16&&(c|=8);18!=a.A.Cc[1]&&(c|=32)}a.ha[0]=it[c&15];c=c&32?jt:kt;for(d=0;d<c.length;d++)a.ha[d+1]=it[c[d]];return a.ha}if(a.K===a.Db)return it;a.Ia&&b&&!a.ha[16]&&(a.Ia=!1);if(!a.Ia){var c=a.A,d=c.bf,e,f,g,h;if(8==b)for(e=0;256>e;e++)f=d[e]||0,g=f<<2&252,h=f>>4&252,f=f>>10&252,a.ha[e]=[g,h,f,255];else{var k=d&&d[255];b=null!=c.Cc[15]?c.Cc:lt;for(e=0;16>e;e++)f=b[e]&63,k?(f|=
(c.Cc[20]&12)<<4,c.Cc[16]&128&&(f&=-49,f|=(c.Cc[20]&3)<<4),f=d[f],g=f<<2&252,h=f>>4&252,f=f>>10&252):(g=(f&4?170:0)|(f&32?85:0),h=(f&2?170:0)|(f&16?85:0),f=(f&1?170:0)|(f&8?85:0)),a.ha[e]=[g,h,f,255]}a.Ia=!0}return a.ha}function oq(a,b,c,d){a.xb=b;a.Ya=c;a.Ea=d}
function Ys(a,b){var c=!1;if(window&&a.xb&&(!b||a.I)){var d=0,e=a.Ea?a.Ea:8,f=ht(a);null!=a.Ya[0]&&mt(a,nt,a.Ya[0],d,e,8,a.xb,f)&&(c=!0);d=a.Ea?0:2048;e=a.Ea?a.Ea:9;null!=a.Ya[1]&&(mt(a,ot,a.Ya[1],d,e,14,a.xb,pt,qt)&&(c=!0),a.Ea&&mt(a,a.Ka,a.Ya[1],0,a.Ea,14,a.xb,f)&&(c=!0))}b||(a.aa=-1,a.Aa=-1,a.va=0);return c}function mt(a,b,c,d,e,f,g,h,k){var m=!1;null!=c&&(rt(a,b,c,d,e,f,g,h,k)&&(m=!0),a.Rd&&rt(a,b<<1,c,d,e,f,g,h,k)&&(m=!0));return m}
function rt(a,b,c,d,e,f,g,h,k){var m=!1,p=b&1?0:1,v=a.sa[b],u=16>h.length?h.length:16;v||(v={Fc:e<<p,Gc:f<<p,Ge:Array(u),Ui:h.slice(0,u),kf:k,Vg:Array(u)});for(k=0;k<u;k++){var F=h[k],J=v.Ge[k]?v.Ui[k]:[];if(F[0]!==J[0]||F[1]!==J[1]||F[2]!==J[2]){var m=v,J=k,H=p,I=c,P=d,L=e,ka=f,Z=g,jb=[0,0,0,0],qa=document.createElement("canvas");qa.width=m.Fc<<4;qa.height=m.Gc<<4;var db=qa.getContext("2d"),Oa,kb,eb,sc=8>ka||!P?ka:8,lb=db.createImageData(m.Fc,m.Gc);for(Oa=0;256>Oa;Oa++){for(eb=0;eb<ka;eb++)for(var gf=
m.kf&&J&1&&eb>=ka-2,Nd=Z[eb<sc?I+Oa*sc+eb:P+Oa*sc+eb-sc],hf=0;hf<=H;hf++)for(kb=0;kb<L;kb++){var Dg=kb<<H,jf=(eb<<H)+hf,Eg=gf||Nd&128>>(8<=kb&&192<=Oa&&223>=Oa?7:kb)?F:jb;st(lb,Dg,jf,Eg);H&&st(lb,Dg+1,jf,Eg)}db.putImageData(lb,(Oa&15)*m.Fc,(Oa>>4)*m.Gc)}m.Ge[J]="#"+q(F[0],2)+q(F[1],2)+q(F[2],2);m.Ui[J]=F;m.Vg[J]=qa;m=!0}}a.sa[b]=v;return m}function tt(a){0<a.va||0<=a.aa?0>a.Aa&&(a.Aa=0):a.Aa=-1}
function rt(a,b,c,d,e,f,g,h,k){var m=!1,p=b&1?0:1,v=a.ra[b],u=16>h.length?h.length:16;v||(v={Fc:e<<p,Gc:f<<p,Ge:Array(u),Ui:h.slice(0,u),kf:k,Vg:Array(u)});for(k=0;k<u;k++){var F=h[k],J=v.Ge[k]?v.Ui[k]:[];if(F[0]!==J[0]||F[1]!==J[1]||F[2]!==J[2]){var m=v,J=k,H=p,I=c,P=d,L=e,ka=f,Z=g,jb=[0,0,0,0],qa=document.createElement("canvas");qa.width=m.Fc<<4;qa.height=m.Gc<<4;var db=qa.getContext("2d"),Oa,kb,eb,sc=8>ka||!P?ka:8,lb=db.createImageData(m.Fc,m.Gc);for(Oa=0;256>Oa;Oa++){for(eb=0;eb<ka;eb++)for(var gf=
m.kf&&J&1&&eb>=ka-2,Nd=Z[eb<sc?I+Oa*sc+eb:P+Oa*sc+eb-sc],hf=0;hf<=H;hf++)for(kb=0;kb<L;kb++){var Dg=kb<<H,jf=(eb<<H)+hf,Eg=gf||Nd&128>>(8<=kb&&192<=Oa&&223>=Oa?7:kb)?F:jb;st(lb,Dg,jf,Eg);H&&st(lb,Dg+1,jf,Eg)}db.putImageData(lb,(Oa&15)*m.Fc,(Oa>>4)*m.Gc)}m.Ge[J]="#"+q(F[0],2)+q(F[1],2)+q(F[2],2);m.Ui[J]=F;m.Vg[J]=qa;m=!0}}a.ra[b]=v;return m}function tt(a){0<a.va||0<=a.aa?0>a.Aa&&(a.Aa=0):a.Aa=-1}
function gt(a){if(a.I){for(var b=10;15>=b;b++)if(null==a.B.Xa[b])return;var c=a.B.Xa[10],b=c&31,d=a.B.Xa[11]&ws[11],e=a.B.Xa[9]&ws[9],f=!1;a.B===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)ut(a);else{c=a.B.Xa[15];c|=(a.B.Xa[14]&a.B.gg)<<8;a.aa!=c&&(ut(a),a.aa=c);d=d-b+1;if(a.Fd!=b||a.Tc!=d)a.Fd=b,a.Tc=d;a.xa=e+1;tt(a)}}}
function ut(a){if(0<=a.aa){if(void 0!==a.M){var b=vt<<8,c=a.M[a.aa];if(c&b){var c=c&~b,b=a.aa%a.F,d=a.aa/a.F|0;a.I&&a.sa[a.I]&&(a.Da&&wt(a,b,d,c,a.Da),wt(a,b,d,c));a.M[a.aa]=c}}a.aa=-1}}
function ut(a){if(0<=a.aa){if(void 0!==a.M){var b=vt<<8,c=a.M[a.aa];if(c&b){var c=c&~b,b=a.aa%a.F,d=a.aa/a.F|0;a.I&&a.ra[a.I]&&(a.Da&&wt(a,b,d,c,a.Da),wt(a,b,d,c));a.M[a.aa]=c}}a.aa=-1}}
function xt(a){var b,c=a.B;a.Uc=!1;var d=c.Cd[5];if(null!=d){b=Jr;var e=Lr,f=c.Cd[3]&31;switch(d&3){case 0:if(f){e=Lr|32;switch(f&24){case 8:e=Lr|96;break;case 16:e=Lr|160;break;case 24:e=Lr|224}c.Qc=f&7}break;case 1:e=1;break;case 2:switch(f&24){default:e=2;break;case 8:e=98;break;case 16:e=162;break;case 24:e=226}break;case 3:a.Ka==pq&&(e=3,c.Qc=f&7)}d&8&&(b=1280);c=c.de[4];null!=c&&(c&4||(b|=Kr,e|=Mr),d&64&&(c&8&&(b|=16384,e|=4),a.Uc=!0));b|=e}return b}
function yt(a,b){var c=a.B;return c&&null!=b&&b!=c.vg?(c.Mg(b),a.ma.Mg(c.cb,c.Qb,c.ih(),!0),!0):!1}
function ft(a,b){var c,d=a.la,e=a.B;if(e)if(e.Ka==Fs)d=Ws;else if(e.Ka>=nq){var d=null,f=e.vd>>2,g=32768<f?32768:f,h=e.Cd[6];if(null!=h){switch(h&12){case 0:e.cb=655360;e.Qb=f;d=zt;break;case 4:e.cb=655360;e.Qb=f;d=a.ga==cm?At:Bt;break;case 8:e.cb=720896;e.Qb=g;d=Ws;break;case 12:e.cb=753664,e.Qb=g,d=a.ga==cm?Ct:Us}c=80==(e.Cd[5]&80);!c||e.cb==a.cb&&e.Qb==a.Qb||(b=!0);var f=Zr(e,cs),g=e.Xa[us],k=e.Xa[23],m=e.de[1]&8;d!=zt&&(h&1?655360==e.cb||c||k&1?e.Cd[5]&64?d=g&31?143>=e.Xa[ks]?Dt:Et:Ft:g&128||
350>f?d=m?Gt:Ht:480<=f&&(d=a.ga==cm?It:Jt):d=m?7-d:Kt:d-=m?2:0);c=xt(a)}}else e.Vc&8?(e.Vc&2?(d=e.Vc&16?Kt:Lt,e.Vc&4||--d):(d=e.Vc&1?Us:Mt,e.Vc&4&&--d),a.Eb&&(a.O.style.opacity="1",a.Eb=!1)):!a.Eb&&1>+a.md&&(a.Eb=!0,a.O.style.opacity=a.md,e=a.H,Ud(e),e.T.ue=0,Id(e));else a.la=null,null==d&&(d=a.ea);if(!Zs(a,d,b))return!1;yt(a,c);return!0}
function Zs(a,b,c){if(null!=b&&(b!=a.la||c)){a.Pd=0;a.la=b;a.Ia=!1;b=a.B||(b==Ws?a.Y:a.K);if(b!=a.B||b.cb!=a.cb||b.Qb!=a.Qb){ut(a);if(a.cb){if(!Hc(a.ma,a.cb,a.Qb))return!1;a.B&&(a.B.rc=!1)}a.B=b;b.rc=!0;a.cb=b.cb;a.Qb=b.Qb;if(!vc(a.ma,b.cb,b.Qb,3,b===a.A?b:null))return!1}a:{a.I=0;a.F=a.Nb;a.J=a.zc;a.Sa=a.F;a.Ib=zs[Ws][2];b=0;if(c=zs[a.la])a.F=c[0],a.J=c[1],a.Ib=c[2],b=c[3],a.I=c[4],4!=a.ga&&7!=a.ga||a.B!==a.A||a.I!=nt||(7==(a.A.Xa[us]&31)?a.J=350>Zr(a.A,ks)?43:50:a.I=a.Ka);a.ld=a.F*a.J|0;a.dd=a.ld/
a.Ib|0;a.Za=a.dd;a.Sb=0;void 0!==b&&(a.Za=(a.Za<<1)+b|0,a.Sb=a.Za+b>>1);if(a.sa.length){a.oa=a.Z/a.F|0;a.qa=a.ka/a.J|0;if(a.I){b=a.sa[a.I];if(!b)break a;c=a.sa[a.I<<1];a.bd&&80==a.F?c&&a.oa>=3*c.Fc>>2&&(a.I<<=1,b=c):(c&&a.oa>=c.Fc&&(a.I<<=1,b=c),a.bd||(a.oa=b.Fc,a.qa=b.Gc));a.gb=a.kb=0;b&&(a.gb=a.F*b.Fc,a.kb=a.J*b.Gc)}else a.oa=a.qa=1,a.gb=a.F,a.kb=a.J;a.La=a.L.createImageData(a.gb,a.kb);a.Ba=document.createElement("canvas");a.Ba.width=a.gb;a.Ba.height=a.kb;a.Da=a.Ba.getContext("2d");a.Ic=a.Kc=0;
a.Ib|0;a.Za=a.dd;a.Sb=0;void 0!==b&&(a.Za=(a.Za<<1)+b|0,a.Sb=a.Za+b>>1);if(a.ra.length){a.oa=a.Z/a.F|0;a.qa=a.ka/a.J|0;if(a.I){b=a.ra[a.I];if(!b)break a;c=a.ra[a.I<<1];a.bd&&80==a.F?c&&a.oa>=3*c.Fc>>2&&(a.I<<=1,b=c):(c&&a.oa>=c.Fc&&(a.I<<=1,b=c),a.bd||(a.oa=b.Fc,a.qa=b.Gc));a.gb=a.kb=0;b&&(a.gb=a.F*b.Fc,a.kb=a.J*b.Gc)}else a.oa=a.qa=1,a.gb=a.F,a.kb=a.J;a.La=a.L.createImageData(a.gb,a.kb);a.Ba=document.createElement("canvas");a.Ba.width=a.gb;a.Ba.height=a.kb;a.Da=a.Ba.getContext("2d");a.Ic=a.Kc=0;
a.lc=a.Z;a.sc=a.ka;b=a.Z-a.F*a.oa;c=a.ka-a.J*a.qa;0<b&&(a.Ic=b>>1,a.lc-=b);0<c&&(a.Kc=c>>1,a.sc-=c);if(b||c)a.L.fillStyle=a.O.style.backgroundColor,a.L.fillRect(0,0,a.Z,a.ka)}}Nt(a,!0);Qs(a)}return!0}function st(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function Ot(a){a.va=-1;a.Ga=!1;var b=a.dd;if(void 0===a.M||a.M.length!=b)a.M=Array(b)}function Nt(a,b){b||(a.Ia=!1);Ot(a)}
function wt(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.sa[a.I];h.kf&&(d=h.kf[d]);var k=g>>4&15;h.kf&&(k=h.kf[k]);e?(b*=h.Fc,c*=h.Gc,e.fillStyle=h.Ge[k],e.fillRect(b,c,h.Fc,h.Gc)):(b=b*a.oa+a.Ic,c=c*a.qa+a.Kc,a.L.fillStyle=h.Ge[k],a.L.fillRect(b,c,a.oa,a.qa));g&Pt&&(k=(f&15)*h.Fc,f=(f>>4)*h.Gc,e?e.drawImage(h.Vg[d],k,f,h.Fc,h.Gc,b,c,h.Fc,h.Gc):a.L.drawImage(h.Vg[d],k,f,h.Fc,h.Gc,b,c,a.oa,a.qa));g&vt&&(f=a.Fd,g=a.Tc,e?(a.xa&&a.xa!==h.Gc&&(f=f*h.Gc/a.xa|0,g=g*h.Gc/a.xa|0),e.fillStyle=h.Ge[d],e.fillRect(b,
function wt(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.ra[a.I];h.kf&&(d=h.kf[d]);var k=g>>4&15;h.kf&&(k=h.kf[k]);e?(b*=h.Fc,c*=h.Gc,e.fillStyle=h.Ge[k],e.fillRect(b,c,h.Fc,h.Gc)):(b=b*a.oa+a.Ic,c=c*a.qa+a.Kc,a.L.fillStyle=h.Ge[k],a.L.fillRect(b,c,a.oa,a.qa));g&Pt&&(k=(f&15)*h.Fc,f=(f>>4)*h.Gc,e?e.drawImage(h.Vg[d],k,f,h.Fc,h.Gc,b,c,h.Fc,h.Gc):a.L.drawImage(h.Vg[d],k,f,h.Fc,h.Gc,b,c,a.oa,a.qa));g&vt&&(f=a.Fd,g=a.Tc,e?(a.xa&&a.xa!==h.Gc&&(f=f*h.Gc/a.xa|0,g=g*h.Gc/a.xa|0),e.fillStyle=h.Ge[d],e.fillRect(b,
c+f,h.Fc,g)):(a.xa&&a.xa!==a.qa&&(f=f*a.qa/a.xa|0,g=g*a.qa/a.xa|0),a.L.fillStyle=h.Ge[d],a.L.fillRect(b,c+f,a.oa,g)))}
function Qs(a,b){b=void 0===b?!1:b;if(a.ba.Zb){var c=!1,d=a.B;d&&(d!==a.A?d.Vc&8&&(c=!0):d.Bd&32&&(c=!0));if(c||b){if(b)Ot(a);else if(void 0===a.M)return;c=!1;!(b||++a.Pd&15)&&0<=a.Aa&&(a.Aa++,c=!0);var e=a.ld,f=a.cb,g=f,h=g+a.Qb;a.la>=Dt&&(f=g=655360,h=g+65536);if(Qt(a,d)&8||d.Jf&&d.Jf<d.ii){var k=d.Xa[Cr],k=k|(d.Xa[Dr]&d.gg)<<8;d.be!==k&&(d.be=k,Nt(a));d.Jf=0}var m=d.be<<(a.I?1:0),g=g+m,k=a.Za;a.Ka>=nq&&d.Xa[19]&&d.Xa[19]<<1!=d.Xa[1]+1&&(a.Sa=d.Xa[19]<<(a.I?1:d.Xa[20]&64?3:4),k=(a.Sa*(a.J-1)+a.F)/
a.Ib|0,a.la<=Ws&&(k<<=1));var p=d=0;g+k>h&&(p=k,g>=h?(d=f+(g-h),k=0):(d=f,k=h-g,p-=k));h=a.aa-(m>>1);g=pu(a,f,g,k,0,h,e,b,c);p&&(g+=pu(a,f,d,p,0+g,h,e,b,c));g&&(a.Ga=!0)}}}
function pu(a,b,c,d,e,f,g,h,k){var m=d>>1;m>g&&(m=g);var p=c+d;if(h=!h&&a.Ga){h=a.ma;for(var v=!0,u=c>>>h.A,F=h.B-(c&h.D);0<d&&u<h.aa.length;)h.aa[u].Na&&(h.aa[u].Na=v=!1,h.aa[u].vj=!0),d-=F,F=h.B,u++;h=v}if(h){if(!k)return m;if(!a.va){f-=e;if(0>f)return m;c+=f<<1;e+=f;g=e+1}}if(a.I){if(a.sa[a.I]){b=c;c=e;k=f=e=0;h=Pt<<8;d=1048575;u=a.B.Vc&32;a.Ka>=nq&&(u=a.B.Cc[16]&8);v=a.aa-a.B.be;u&&(k=$s<<8,d&=~k,a.Aa&2||(d&=~h));for(a.va=0;b<p&&c<g;)u=Pc(a.ma,b),u|=h,u&k&&(a.va++,u&=d),c==v&&(u|=a.Aa&1?vt<<8:
function pu(a,b,c,d,e,f,g,h,k){var m=d>>1;m>g&&(m=g);var p=c+d;if(h=!h&&a.Ga){h=a.ma;for(var v=!0,u=c>>>h.A,F=h.B-(c&h.D);0<d&&u<h.aa.length;)h.aa[u].Na&&(h.aa[u].Na=v=!1,h.aa[u].vj=!0),d-=F,F=h.B,u++;h=v}if(h){if(!k)return m;if(!a.va){f-=e;if(0>f)return m;c+=f<<1;e+=f;g=e+1}}if(a.I){if(a.ra[a.I]){b=c;c=e;k=f=e=0;h=Pt<<8;d=1048575;u=a.B.Vc&32;a.Ka>=nq&&(u=a.B.Cc[16]&8);v=a.aa-a.B.be;u&&(k=$s<<8,d&=~k,a.Aa&2||(d&=~h));for(a.va=0;b<p&&c<g;)u=Pc(a.ma,b),u|=h,u&k&&(a.va++,u&=d),c==v&&(u|=a.Aa&1?vt<<8:
0),a.Ga&&u===a.M[c]||(wt(a,c%a.F,c/a.F|0,u,a.Da),a.M[c]=u,f++),b+=2,e++,c++;f&&a.Da&&a.L.drawImage(a.Ba,0,0,a.gb,a.kb,a.Ic,a.Kc,a.lc,a.sc);tt(a)}}else{if(a.Sb){b=c;m=p-b>>1;g=0;c=a.Ib;e=b;f=16==c?65536:196608;k=16==c?1:2;h=ht(a,k);var v=d=0,u=a.F,F=0,J=a.J,H=0;for(a.va=0;e<p;){var I=Pc(a.ma,e);if(a.Ga&&I===a.M[g])d+=c;else{a.M[g]=I;var I=I>>8|(I&255)<<8,P=f,L=16;d<u&&(u=d);for(var ka=0;ka<c;ka++){var Z=(I&(P>>=k))>>(L-=k);st(a.La,d++,v,h[Z])}d>F&&(F=d);v<J&&(J=v);v>=H&&(H=v+1)}e+=2;g++;if(d>=a.F){d=
0;v+=2;if(v>a.J)break;v==a.J&&(v=1,e=b+a.Sb)}}u<a.F&&(a.Da.putImageData(a.La,0,0,u,J,F-u,H-J),a.L.drawImage(a.Ba,0,0,a.F,a.J,0,0,a.Z,a.ka));a=m}else{if(a.Uc){m=0;g=p-c;e=ht(a,8);f=a.B.ed;h=k=0;d=a.F;v=0;u=a.J;F=0;J=a.B.de[4]&8?4:1;H=a.B.Cc[19]&15;I=a.Sa>a.F?a.Sa-a.F-H>>3:0;for(a.va=0;c<p;){P=f[c-b];ka=4;H||(a.Ga&&P===a.M[m]?(k+=ka,ka=0):a.M[m]=P,m++);if(ka){k<d&&(d=k);for(L=0;L<ka;L++)st(a.La,k++,h,e[P&255]),P>>=8;k>v&&(v=k);h<u&&(u=h);h>=F&&(F=h+1)}c+=J;if(k>=a.F){k=0;if(++h>a.J)break;c+=I}}H&&(g=
0)}else{m=0;g=p-c;e=ht(a);f=a.B.ed;h=k=0;d=a.F;v=0;u=a.J;F=0;J=a.B.Cc[19]&15;H=a.Sa>a.F?a.Sa-a.F-J>>3:0;for(a.va=0;c<p;){I=c++-b;I=f[I];L=8;J?k?(P=a.F-k,L>P&&(L=P)):(I<<=J,L-=J,a.Ga=!1):(a.Ga&&I===a.M[m]?(k+=L,L=0):a.M[m]=I,m++);if(L){k<d&&(d=k);for(P=0;P<L;P++)ka=ru[I&2155905152]||0,st(a.La,k++,h,e[ka]),I<<=1;k>v&&(v=k);h<u&&(u=h);h>=F&&(F=h+1)}if(k>=a.F){k=0;if(++h>a.J)break;c+=H}}J&&(g=0)}d<a.F&&(a.Da.putImageData(a.La,0,0,d,u,v-d,F-u),a.L.drawImage(a.Ba,0,0,a.F,a.J,0,0,a.Z,a.ka));a=g}m=a}return m}
@ -608,298 +608,298 @@ l.uc=function(a,b,c,d){this.ma=b;this.H=c;this.ca=d;this.W=bc(a,"ChipSet");Tc(b,
function Cu(a,b){var c=0;b||(b=[0,0,0]);a.F=b[c++];a.Mb=b[c++];a.mf=b[c];return!0}l.um=function(a,b){var c=this.F;t(this,a,null,b,"DATA",c);return c};l.Sm=function(a,b){var c=this.Mb;t(this,a,null,b,"STAT",c);return c};l.qm=function(a,b){var c=this.mf;t(this,a,null,b,"CTRL",c);return c};
l.Yn=function(a,b,c){t(this,a,b,c,"DATA");this.F=b;this.Mb|=Du;a=!1;Rb(this,"transmitByte("+ta(b)+")");this.A&&(8==b?this.A.value=this.A.value.slice(0,-1):(this.A.value+=String.fromCharCode(b),this.A.scrollTop=this.A.scrollHeight),a=!0);if(null!=this.B){if(10==b||1024<=this.B.length)this.P(this.B),this.B="";10!=b&&(this.B+=String.fromCharCode(b));a=!0}a&&(this.Mb&=~Du);Eu(this)};l.Tn=function(a,b,c){t(this,a,b,c,"CTRL");this.mf=b;Eu(this)};
function Eu(a){a.W&&a.C&&(a.mf&Fu&&!(a.Mb&Du)?rh(a.W,a.C):ph(a.W,a.C))}var zu="buffer",Du=64,Fu=16,Au={0:yu.prototype.um,1:yu.prototype.Sm,2:yu.prototype.qm},Bu={0:yu.prototype.Yn,2:yu.prototype.Tn};cb(function(){for(var a=Bb(document,"pcx86","parallel"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new yu(d);Ab(d,c)}});
function Gu(a){rb.call(this,"SerialPort",a,8388608);this.ha=a.adapter;switch(this.ha){case 1:this.ea=1016;this.M=4;break;case 2:this.ea=760;this.M=3;break;default:mb("Unrecognized serial adapter #"+this.ha);return}this.F=this.I=null;this.oa=a.tabSize;this.la=a.charBOL;this.K=0;this.qa=Hu|Iu;this.O=!0;a=a.binding;"console"==a?this.I="":yb(this,a,Ju);this.D=this.aa=this.Y=null;this.exports={connect:this.Ej,receiveData:this.Pf,receiveStatus:this.vl}}ba(Gu,rb);l=Gu.prototype;
l.Zi=function(a,b,c){var d=null;a!=this.Ce||this.D||(this.D=b,this.Y=c,this.O=!1,d=this);return d};l.Bb=function(a,b,c){var d=this;switch(b){case Ju:return this.na[b]=this.F=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),d.Pf(b);return!0},c.onkeypress=function(a){a=a||window.event;d.Pf(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.removeAttribute("readonly"),!0}return!1};
function Gu(a){rb.call(this,"SerialPort",a,8388608);this.ha=a.adapter;switch(this.ha){case 1:this.ea=1016;this.N=4;break;case 2:this.ea=760;this.N=3;break;default:mb("Unrecognized serial adapter #"+this.ha);return}this.G=this.I=null;this.qa=a.tabSize;this.la=a.charBOL;this.K=this.oa=0;this.ra=Hu|Iu;this.O=!0;a=a.binding;"console"==a?this.I="":yb(this,a,Ju);this.F=this.aa=this.Y=null;this.exports={connect:this.Ej,receiveData:this.Pf,receiveStatus:this.vl}}ba(Gu,rb);l=Gu.prototype;
l.Zi=function(a,b,c){var d=null;a!=this.Ce||this.F||(this.F=b,this.Y=c,this.O=!1,d=this);return d};l.Bb=function(a,b,c){var d=this;switch(b){case Ju:return this.na[b]=this.G=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),d.Pf(b);return!0},c.onkeypress=function(a){a=a||window.event;d.Pf(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.removeAttribute("readonly"),!0}return!1};
l.uc=function(a,b,c,d){this.pa=a;this.ma=b;this.H=c;this.ca=d;this.W=bc(a,"ChipSet");Tc(b,this,Ku,this.ea);Xc(b,this,Lu,this.ea);Ob(this)};
l.Ej=function(a){if(!this.D){var b=Fd(this.pa,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ba(c[0]);if(d!=this.Ce)return;c=Ba(c[1]);if(this.D=Eb(c)){var e=this.D.exports;if(e){var f=e.connect;f&&f.call(this.D,this.O);if(this.aa=e.receiveData){this.O=a;this.Y=e.receiveStatus;this.status("Connected "+this.De+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};
l.Yb=function(a,b){if(!b)if(this.Ej(this.O),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Xb=function(a){return a?this.save():!0};l.reset=function(){Mu(this)};l.save=function(){var a=new fg(this),b=0,c=[];c[b++]=this.ga;c[b++]=this.ka;c[b++]=this.L;c[b++]=this.N;c[b++]=this.G;c[b++]=this.C;c[b++]=this.Z;c[b++]=this.B;c[b++]=this.A;c[b]=this.J;a.set(0,c);return a.data()};l.restore=function(a){return Mu(this,a[0])};
function Mu(a,b){var c=0;b||(b=[0,0,Nu,0,Ou,0,0,Pu|Qu,a.qa,[]]);a.ga=b[c++];a.ka=b[c++];a.L=b[c++];a.N=b[c++];a.G=b[c++];a.C=b[c++];a.Z=b[c++];a.B=b[c++];a.A=b[c++];a.J=b[c];return!0}l.Pf=function(a){if("number"==typeof a)this.J.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.J.push(a.charCodeAt(b));else this.J=this.J.concat(a);Ru(this);return!0};l.vl=function(a){var b=this.A;this.A&=~(Hu|Iu);a&32&&(this.A=this.A|Hu|Su);a&64&&(this.A=this.A|Iu|Tu);b!=this.A&&Uu(this)};
function Ru(a){0<a.J.length&&!(a.B&Vu)&&(a.ga=a.J.shift(),a.B|=Vu);Uu(a)}l.Pm=function(a,b){var c=this.C&Wu?this.L&255:this.ga;t(this,a,null,b,this.C&Wu?"DLL":"RBR",c);this.B&=~Vu;Ru(this);return c};l.Bm=function(a,b){var c=this.C&Wu?this.L>>8:this.N;t(this,a,null,b,this.C&Wu?"DLM":"IER",c);return c};l.Cm=function(a,b){var c=this.G;t(this,a,null,b,"IIR",c);return c};l.Dm=function(a,b){var c=this.C;t(this,a,null,b,"LCR",c);return c};l.Fm=function(a,b){var c=this.Z;t(this,a,null,b,"MCR",c);return c};
l.Em=function(a,b){var c=this.B;t(this,a,null,b,"LSR",c);return c};l.Km=function(a,b){var c=this.A;this.A&=~(Su|Tu);t(this,a,null,b,"MSR",c);return c};
l.wo=function(a,b,c){t(this,a,b,c,this.C&Wu?"DLL":"THR");if(this.C&Wu)this.L=this.L&-256|b;else{this.ka=b;this.B&=~(Pu|Qu);a=!1;Rb(this,"transmitByte("+ta(b)+")");this.aa&&this.aa.call(this.D,b)&&(a=!0);if(this.F){if(13==b)this.K=0;else if(8==b)this.F.value=this.F.value.slice(0,-1),0<this.K&&this.K--;else{var d;13!=b&&10!=b&&(d=Ca[b]);d=d?"<"+d+">":String.fromCharCode(b);a=d.length;32>b&&1==a&&(a=0);9==b&&(b=this.oa||8,a=b-this.K%b,this.oa&&(d=Aa("",a)));this.la&&!this.K&&a&&(d=String.fromCharCode(this.la)+
d);this.F.value+=d;this.F.scrollTop=this.F.scrollHeight;this.K+=a}a=!0}else if(null!=this.I){if(10==b||1024<=this.I.length)this.P(this.I),this.I="";10!=b&&(this.I+=String.fromCharCode(b));a=!0}a&&(this.B=this.B|Pu|Qu)}};l.jo=function(a,b,c){t(this,a,b,c,this.C&Wu?"DLM":"IER");this.C&Wu?this.L=this.L&255|b<<8:this.N=b};l.ko=function(a,b,c){t(this,a,b,c,"LCR");this.C=b};
l.lo=function(a,b,c){var d=b^this.Z;t(this,a,b,c,"MCR");this.Z=b;d&(Xu|Yu)&&this.Y&&(a=0,this.O?(a|=b&Yu?32:0,a|=b&Xu?320:0):(a|=b&Yu?16:0,a|=b&Xu?1048576:0),this.Y.call(this.D,a))};function Uu(a){var b=-1;a.B&Vu&&a.N&Zu?b=$u:a.A&(Su|Tu)&&a.N&av&&(b=bv);0<=b?(a.G&=~(Ou|cv),a.G|=b,a.W&&a.M&&rh(a.W,a.M,100)):(a.G|=Ou,a.W&&a.M&&ph(a.W,a.M))}
var Ju="buffer",Nu=384,Zu=1,av=8,Ou=1,$u=4,bv=0,cv=6,Wu=128,Xu=1,Yu=2,Vu=1,Pu=32,Qu=64,Su=1,Tu=2,Hu=16,Iu=32,Ku={0:Gu.prototype.Pm,1:Gu.prototype.Bm,2:Gu.prototype.Cm,3:Gu.prototype.Dm,4:Gu.prototype.Fm,5:Gu.prototype.Em,6:Gu.prototype.Km},Lu={0:Gu.prototype.wo,1:Gu.prototype.jo,3:Gu.prototype.ko,4:Gu.prototype.lo};cb(function(){for(var a=Bb(document,"pcx86","serial"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new Gu(d);Ab(d,c)}});
function dv(a){rb.call(this,"Mouse",a,16777216);if(this.O=a.serial)this.W="SerialPort";this.N=this.M=this.rc=!1;this.C=[];this.B=[];Ob(this)}ba(dv,rb);l=dv.prototype;l.uc=function(a,b,c,d){this.pa=a;this.ma=b;this.H=c;this.ca=d;for(b=null;b=bc(a,"Video",b);)this.C.push(b)};
l.Yb=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.W&&!this.D){for(a=null;(a=bc(this.pa,this.W,a))&&(!a.Zi||!(this.D=a.Zi(this.O,this,this.ul))););if(this.D)for(this.B=[],a=0;a<this.C.length;a++)b=this.C[a],b.G=this,(b=b.D)&&this.B.push(b);else mb(this.id+": "+this.W+" "+this.O+" unavailable")}this.rc?ev(this):fv(this)}return!0};l.Xb=function(a){return a?this.save():!0};l.reset=function(){gv(this)};
l.save=function(){var a=new fg(this),b=0,c=[];c[b++]=this.rc;c[b++]=this.F;c[b++]=this.G;c[b++]=this.I;c[b++]=this.J;c[b++]=this.K;c[b++]=this.L;c[b]=this.A;a.set(0,c);return a.data()};l.restore=function(a){return gv(this,a[0])};function gv(a,b){var c=0;b||(b=[!1,-1,-1,0,0,!1,!1,0]);var d=b[c++];a.rc=d;a.F=b[c++];a.G=b[c++];a.I=b[c++];a.J=b[c++];a.K=b[c++];a.L=b[c++];a.A=b[c];a.A&(Xu|Yu)&&(a.A=(a.A&Xu?1048576:0)|(a.A&Yu?16:0));return!0}l.Kf=function(a){this.M=a};
function ev(a){if(!a.N)for(var b=0;b<a.B.length;b++)hv(a,a.B[b])&&(a.N=!0)}function fv(a){if(a.N)for(var b=0;b<a.B.length;b++){var c=a.B[b];c&&(c.style.cursor="auto")}}function hv(a,b){return b?(b.addEventListener("mousemove",function(b){iv(a,b)},!1),b.addEventListener("mousedown",function(b){iv(a,b,!0)},!1),b.addEventListener("mouseup",function(b){iv(a,b,!1)},!1),b.style.cursor="none",!0):!1}
function iv(a,b,c){if(void 0!==c){var d;!(d=!1!==a.M)&&(d=a.C.length)&&(d=a.C[0],d=d.Qd?d.qe(!0):!1);d||(a.M=null);a.Yd(b.button,c)}else{if(0>a.F||0>a.G)a.F=b.screenX,a.G=b.screenY;a.M?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.screenX-a.F,d=b.screenY-a.G);a.F=b.screenX;a.G=b.screenY;a.uf(c,d,a.F,a.G)}}
l.Yd=function(a,b){if(this.rc&&this.H&&this.H.ba.ab){var c="mouse button"+a+" "+(b?"dn":"up");switch(a){case Ss:if(this.K!=b){this.K=b;jv(this,c);return}break;case kv:if(this.L!=b){this.L=b;jv(this,c);return}}Rb(this,c+": ignored")}};l.uf=function(a,b,c,d){this.rc&&this.H&&this.H.ba.ab&&(a||b)&&(r(this,16777216)&&Rb(this,"moveMouse("+a+","+b+")"),this.I=a,this.J=b,jv(this,null,c,d))};
function jv(a,b,c,d){var e=64|(a.K?32:0)|(a.L?16:0)|(a.J&192)>>4|(a.I&192)>>6,f=a.I&63,g=a.J&63;r(a,8388608)&&Rb(a,(b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+ta(e)+","+ta(f)+","+ta(g)+"]",0,!0);a.D.Pf([e,f,g]);a.I=a.J=0}
l.ul=function(a){var b=1048592==(a&1048592);if(b){if(!this.rc){var c=!1;this.A&16||(this.reset(),Rb(this,"serial mouse reset"),c=!0);this.A&1048576||(Rb(this,"serial mouse ID requested"),c=!0);c&&(this.D.Pf([lv,lv]),Rb(this,"serial mouse ID sent"));ev(this);this.rc=b}}else this.rc&&(Rb(this,"serial mouse inactive"),fv(this),this.rc=b);this.A=a};var lv=77,Ss=0,kv=2;cb(function(){for(var a=Bb(document,"pcx86","mouse"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new dv(d);Ab(d,c)}});
function mv(a,b,c){rb.call(this,"Disk",{id:a.De+".disk"+q(++nv,4)},2097152);this.controller=a;this.Ca=a.Ca;this.P=a.P;this.pa=a.pa;this.ca=a.ca;this.B=b;this.kd=b.name;this.Re=b.Re;this.pg=this.D=!1;ov(this,c,b.rb,b.eb,b.Ua,b.Ma);this.I=[];this.L=[];this.F=null;this.N=0;this.M=!1;Ob(this)}ba(mv,rb);l=mv.prototype;l.uc=function(a,b,c,d){this.ca=d};l.Yb=function(a,b){b||!this.pg||this.D||(Ob(this,!1),this.load(this.kd,this.G,null,this.Ll,this));return!0};l.Ll=function(){Ob(this,!0)};
l.Xb=function(a,b){if(this.D){var c,d=0;if(this.M&&!vb("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=pv(this,!1);)if(d=c[0]){this.Ca('Unable to save "'+this.kd+'" (error '+d+")");break}b&&this.D&&(b="action=close&volume="+this.G,b+="&machine="+qv(this.controller),b+="&user="+rv(this.controller),Na(Pa()+"/api/v1/disk?"+b,null,!0),this.D=!1);!d&&a&&this.Ca(this.kd+" saved")}return!0};
function ov(a,b,c,d,e,f){a.mode=b;a.rb=c;a.eb=d;a.Ua=e;a.Ma=f;a.A=[];if("preload"!=a.mode){b=Array(a.rb);for(c=0;c<b.length;c++){d=Array(a.eb);for(e=0;e<d.length;e++){f=Array(a.Ua);for(var g=1;g<=f.length;g++)f[g-1]=sv(null,c,e,g,a.Ma,"local"==a.mode?0:null);d[e]=f}b[c]=d}a.A=b}a.K=null}
l.load=function(a,b,c,d,e){var f=b;if(this.J)return!0;this.kd=a;this.G=b;this.Lg=va(b);var g=this;this.J=d;this.O=e||this.controller;if(c){var h=new FileReader;h.onload=function(){var a=h.result,b,c=a?a.byteLength:0,d=la[c];if(d){g.rb=d[0];g.eb=d[1];g.Ua=d[2];g.Ma=d[3]||512;b=g.Ma>>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.rb);for(c=0;c<g.A.length;c++)for(var f=g.A[c]=Array(g.eb),k=0;k<f.length;k++)for(var I=f[k]=Array(g.Ua),P=0;P<I.length;P++){for(var L=sv(null,c,k,P+1,g.Ma,0),ka=L.data,Z=0;Z<
b;Z++,e+=4)var jb=ka[Z]=a.getInt32(e,!0),d=d+jb&-1;L.Nc=b;I[P]=L}g.K=d;b=g}else g.Ca("Unrecognized disk format ("+c+" bytes)");g.J&&(g.J.call(g.controller,g.B,b,g.kd,g.G),g.J=null)};h.readAsArrayBuffer(c);return!0}0>b.indexOf("/api/v1/dump")&&(a=wa(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=tv(this,b),this.pg=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):xa(b,
"/")&&(c="dir"),f=Pa()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.Re?"":d)+"&format=json"));var k="Loading "+f+"...";return!!Na(f,null,!0,function(a,b,c){uv(g,a,b,c)},function(){g.P(k,Lb.Fe)})};
function uv(a,b,c,d){var e=null;a.Ue=!1;var f=!(!(0>d&&a.pa)||a.pa.ba.Zb);if(a.pg)d?a.Ca('Unable to connect to disk "'+a.G+'" (error '+d+": "+c+")",f):(a.D=!0,vv(a),e=a);else if(d)a.Ca('Unable to load disk "'+a.kd+'" (error '+d+": "+b+")",f);else{tb(a.controller.De,b,c);try{if(0<va(a.Lg,!0).toLowerCase().indexOf("-readonly"))a.Ue=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.Ue=!0)}var h;"<"==c.substr(0,1)?h=["Missing disk image: "+a.kd]:h=0>c.indexOf("0x")&&
l.Ej=function(a){if(!this.F){var b=Fd(this.pa,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ba(c[0]);if(d!=this.Ce)return;c=Ba(c[1]);if(this.F=Eb(c)){var e=this.F.exports;if(e){var f=e.connect;f&&f.call(this.F,this.O);if(this.aa=e.receiveData){this.O=a;this.Y=e.receiveStatus;this.status("Connected "+this.De+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};
l.Yb=function(a,b){if(!b)if(this.Ej(this.O),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Xb=function(a){return a?this.save():!0};l.reset=function(){Mu(this)};l.save=function(){var a=new fg(this),b=0,c=[];c[b++]=this.ga;c[b++]=this.ka;c[b++]=this.L;c[b++]=this.M;c[b++]=this.D;c[b++]=this.C;c[b++]=this.Z;c[b++]=this.A;c[b++]=this.B;c[b]=this.J;a.set(0,c);return a.data()};l.restore=function(a){return Mu(this,a[0])};
function Mu(a,b){var c=0;b||(b=[0,0,Nu,0,Ou,0,0,Pu|Qu,a.ra,[]]);a.ga=b[c++];a.ka=b[c++];a.L=b[c++];a.M=b[c++];a.D=b[c++];a.C=b[c++];a.Z=b[c++];a.A=b[c++];a.B=b[c++];a.J=b[c];return!0}l.Pf=function(a){if("number"==typeof a)this.J.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.J.push(a.charCodeAt(b));else this.J=this.J.concat(a);Ru(this);return!0};l.vl=function(a){var b=this.B;this.B&=~(Hu|Iu);a&32&&(this.B=this.B|Hu|Su);a&64&&(this.B=this.B|Iu|Tu);b!=this.B&&Uu(this)};
function Ru(a){0<a.J.length&&!(a.A&Vu)&&(a.ga=a.J.shift(),a.A|=Vu);Uu(a)}l.Pm=function(a,b){var c=this.C&Wu?this.L&255:this.ga;t(this,a,null,b,this.C&Wu?"DLL":"RBR",c);this.A&=~Vu;Ru(this);return c};l.Bm=function(a,b){var c=this.C&Wu?this.L>>8:this.M;t(this,a,null,b,this.C&Wu?"DLM":"IER",c);return c};l.Cm=function(a,b){var c=this.D;this.D|=Ou;t(this,a,null,b,"IIR",c);return c};l.Dm=function(a,b){var c=this.C;t(this,a,null,b,"LCR",c);return c};
l.Fm=function(a,b){var c=this.Z;t(this,a,null,b,"MCR",c);return c};l.Em=function(a,b){var c=this.A;t(this,a,null,b,"LSR",c);return c};l.Km=function(a,b){var c=this.B;this.B&=~(Su|Tu);t(this,a,null,b,"MSR",c);return c};
l.wo=function(a,b,c){t(this,a,b,c,this.C&Wu?"DLL":"THR");if(this.C&Wu)this.L=this.L&-256|b;else{this.ka=b;this.A&=~(Pu|Qu);a=!1;Rb(this,"transmitByte("+ta(b)+")");this.aa&&this.aa.call(this.F,b)&&(a=!0);if(this.G){if(13==b)this.K=0;else if(8==b)this.G.value=this.G.value.slice(0,-1),0<this.K&&this.K--;else{var d;13!=b&&10!=b&&(d=Ca[b]);d=d?"<"+d+">":String.fromCharCode(b);a=d.length;32>b&&1==a&&(a=0);9==b&&(a=this.qa||8,a-=this.K%a,this.qa&&(d=Aa("",a)));!this.K&&a&&(10!=this.oa&&(d="\n"+d),this.la&&
(d=String.fromCharCode(this.la)+d));this.G.value+=d;this.G.scrollTop=this.G.scrollHeight;this.K+=a}this.oa=b;a=!0}else if(null!=this.I){if(10==b||1024<=this.I.length)this.P(this.I),this.I="";10!=b&&(this.I+=String.fromCharCode(b));a=!0}a&&(this.A=this.A|Pu|Qu,Uu(this))}};l.jo=function(a,b,c){t(this,a,b,c,this.C&Wu?"DLM":"IER");this.C&Wu?this.L=this.L&255|b<<8:this.M=b};l.ko=function(a,b,c){t(this,a,b,c,"LCR");this.C=b};
l.lo=function(a,b,c){var d=b^this.Z;t(this,a,b,c,"MCR");this.Z=b;d&(Xu|Yu)&&this.Y&&(a=0,this.O?(a|=b&Yu?32:0,a|=b&Xu?320:0):(a|=b&Yu?16:0,a|=b&Xu?1048576:0),this.Y.call(this.F,a))};function Uu(a){var b=-1;a.A&Vu&&a.M&Zu?b=$u:a.A&Pu&&a.M&av?b=bv:a.B&(Su|Tu)&&a.M&cv&&(b=dv);0<=b?(a.D&=~(Ou|ev),a.D|=b,a.W&&a.N&&rh(a.W,a.N,100)):(a.D|=Ou,a.W&&a.N&&ph(a.W,a.N))}
var Ju="buffer",Nu=384,Zu=1,av=2,cv=8,Ou=1,$u=4,bv=2,dv=0,ev=6,Wu=128,Xu=1,Yu=2,Vu=1,Pu=32,Qu=64,Su=1,Tu=2,Hu=16,Iu=32,Ku={0:Gu.prototype.Pm,1:Gu.prototype.Bm,2:Gu.prototype.Cm,3:Gu.prototype.Dm,4:Gu.prototype.Fm,5:Gu.prototype.Em,6:Gu.prototype.Km},Lu={0:Gu.prototype.wo,1:Gu.prototype.jo,3:Gu.prototype.ko,4:Gu.prototype.lo};cb(function(){for(var a=Bb(document,"pcx86","serial"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new Gu(d);Ab(d,c)}});
function fv(a){rb.call(this,"Mouse",a,16777216);if(this.O=a.serial)this.W="SerialPort";this.N=this.M=this.rc=!1;this.C=[];this.B=[];Ob(this)}ba(fv,rb);l=fv.prototype;l.uc=function(a,b,c,d){this.pa=a;this.ma=b;this.H=c;this.ca=d;for(b=null;b=bc(a,"Video",b);)this.C.push(b)};
l.Yb=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.W&&!this.D){for(a=null;(a=bc(this.pa,this.W,a))&&(!a.Zi||!(this.D=a.Zi(this.O,this,this.ul))););if(this.D)for(this.B=[],a=0;a<this.C.length;a++)b=this.C[a],b.G=this,(b=b.D)&&this.B.push(b);else mb(this.id+": "+this.W+" "+this.O+" unavailable")}this.rc?gv(this):hv(this)}return!0};l.Xb=function(a){return a?this.save():!0};l.reset=function(){iv(this)};
l.save=function(){var a=new fg(this),b=0,c=[];c[b++]=this.rc;c[b++]=this.F;c[b++]=this.G;c[b++]=this.I;c[b++]=this.J;c[b++]=this.K;c[b++]=this.L;c[b]=this.A;a.set(0,c);return a.data()};l.restore=function(a){return iv(this,a[0])};function iv(a,b){var c=0;b||(b=[!1,-1,-1,0,0,!1,!1,0]);var d=b[c++];a.rc=d;a.F=b[c++];a.G=b[c++];a.I=b[c++];a.J=b[c++];a.K=b[c++];a.L=b[c++];a.A=b[c];a.A&(Xu|Yu)&&(a.A=(a.A&Xu?1048576:0)|(a.A&Yu?16:0));return!0}l.Kf=function(a){this.M=a};
function gv(a){if(!a.N)for(var b=0;b<a.B.length;b++)jv(a,a.B[b])&&(a.N=!0)}function hv(a){if(a.N)for(var b=0;b<a.B.length;b++){var c=a.B[b];c&&(c.style.cursor="auto")}}function jv(a,b){return b?(b.addEventListener("mousemove",function(b){kv(a,b)},!1),b.addEventListener("mousedown",function(b){kv(a,b,!0)},!1),b.addEventListener("mouseup",function(b){kv(a,b,!1)},!1),b.style.cursor="none",!0):!1}
function kv(a,b,c){if(void 0!==c){var d;!(d=!1!==a.M)&&(d=a.C.length)&&(d=a.C[0],d=d.Qd?d.qe(!0):!1);d||(a.M=null);a.Yd(b.button,c)}else{if(0>a.F||0>a.G)a.F=b.screenX,a.G=b.screenY;a.M?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.screenX-a.F,d=b.screenY-a.G);a.F=b.screenX;a.G=b.screenY;a.uf(c,d,a.F,a.G)}}
l.Yd=function(a,b){if(this.rc&&this.H&&this.H.ba.ab){var c="mouse button"+a+" "+(b?"dn":"up");switch(a){case Ss:if(this.K!=b){this.K=b;lv(this,c);return}break;case mv:if(this.L!=b){this.L=b;lv(this,c);return}}Rb(this,c+": ignored")}};l.uf=function(a,b,c,d){this.rc&&this.H&&this.H.ba.ab&&(a||b)&&(r(this,16777216)&&Rb(this,"moveMouse("+a+","+b+")"),this.I=a,this.J=b,lv(this,null,c,d))};
function lv(a,b,c,d){var e=64|(a.K?32:0)|(a.L?16:0)|(a.J&192)>>4|(a.I&192)>>6,f=a.I&63,g=a.J&63;r(a,8388608)&&Rb(a,(b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+ta(e)+","+ta(f)+","+ta(g)+"]",0,!0);a.D.Pf([e,f,g]);a.I=a.J=0}
l.ul=function(a){var b=1048592==(a&1048592);if(b){if(!this.rc){var c=!1;this.A&16||(this.reset(),Rb(this,"serial mouse reset"),c=!0);this.A&1048576||(Rb(this,"serial mouse ID requested"),c=!0);c&&(this.D.Pf([nv,nv]),Rb(this,"serial mouse ID sent"));gv(this);this.rc=b}}else this.rc&&(Rb(this,"serial mouse inactive"),hv(this),this.rc=b);this.A=a};var nv=77,Ss=0,mv=2;cb(function(){for(var a=Bb(document,"pcx86","mouse"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new fv(d);Ab(d,c)}});
function ov(a,b,c){rb.call(this,"Disk",{id:a.De+".disk"+q(++pv,4)},2097152);this.controller=a;this.Ca=a.Ca;this.P=a.P;this.pa=a.pa;this.ca=a.ca;this.B=b;this.kd=b.name;this.Re=b.Re;this.pg=this.D=!1;qv(this,c,b.rb,b.eb,b.Ua,b.Ma);this.I=[];this.L=[];this.F=null;this.N=0;this.M=!1;Ob(this)}ba(ov,rb);l=ov.prototype;l.uc=function(a,b,c,d){this.ca=d};l.Yb=function(a,b){b||!this.pg||this.D||(Ob(this,!1),this.load(this.kd,this.G,null,this.Ll,this));return!0};l.Ll=function(){Ob(this,!0)};
l.Xb=function(a,b){if(this.D){var c,d=0;if(this.M&&!vb("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=rv(this,!1);)if(d=c[0]){this.Ca('Unable to save "'+this.kd+'" (error '+d+")");break}b&&this.D&&(b="action=close&volume="+this.G,b+="&machine="+sv(this.controller),b+="&user="+tv(this.controller),Na(Pa()+"/api/v1/disk?"+b,null,!0),this.D=!1);!d&&a&&this.Ca(this.kd+" saved")}return!0};
function qv(a,b,c,d,e,f){a.mode=b;a.rb=c;a.eb=d;a.Ua=e;a.Ma=f;a.A=[];if("preload"!=a.mode){b=Array(a.rb);for(c=0;c<b.length;c++){d=Array(a.eb);for(e=0;e<d.length;e++){f=Array(a.Ua);for(var g=1;g<=f.length;g++)f[g-1]=uv(null,c,e,g,a.Ma,"local"==a.mode?0:null);d[e]=f}b[c]=d}a.A=b}a.K=null}
l.load=function(a,b,c,d,e){var f=b;if(this.J)return!0;this.kd=a;this.G=b;this.Lg=va(b);var g=this;this.J=d;this.O=e||this.controller;if(c){var h=new FileReader;h.onload=function(){var a=h.result,b,c=a?a.byteLength:0,d=la[c];if(d){g.rb=d[0];g.eb=d[1];g.Ua=d[2];g.Ma=d[3]||512;b=g.Ma>>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.rb);for(c=0;c<g.A.length;c++)for(var f=g.A[c]=Array(g.eb),k=0;k<f.length;k++)for(var I=f[k]=Array(g.Ua),P=0;P<I.length;P++){for(var L=uv(null,c,k,P+1,g.Ma,0),ka=L.data,Z=0;Z<
b;Z++,e+=4)var jb=ka[Z]=a.getInt32(e,!0),d=d+jb&-1;L.Nc=b;I[P]=L}g.K=d;b=g}else g.Ca("Unrecognized disk format ("+c+" bytes)");g.J&&(g.J.call(g.controller,g.B,b,g.kd,g.G),g.J=null)};h.readAsArrayBuffer(c);return!0}0>b.indexOf("/api/v1/dump")&&(a=wa(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=vv(this,b),this.pg=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):xa(b,
"/")&&(c="dir"),f=Pa()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.Re?"":d)+"&format=json"));var k="Loading "+f+"...";return!!Na(f,null,!0,function(a,b,c){wv(g,a,b,c)},function(){g.P(k,Lb.Fe)})};
function wv(a,b,c,d){var e=null;a.Ue=!1;var f=!(!(0>d&&a.pa)||a.pa.ba.Zb);if(a.pg)d?a.Ca('Unable to connect to disk "'+a.G+'" (error '+d+": "+c+")",f):(a.D=!0,xv(a),e=a);else if(d)a.Ca('Unable to load disk "'+a.kd+'" (error '+d+": "+b+")",f);else{tb(a.controller.De,b,c);try{if(0<va(a.Lg,!0).toLowerCase().indexOf("-readonly"))a.Ue=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.Ue=!0)}var h;"<"==c.substr(0,1)?h=["Missing disk image: "+a.kd]:h=0>c.indexOf("0x")&&
'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+c+")");if(h.length)if(1==h.length)mb(h[0]);else{a.rb=h.length;a.eb=h[0].length;a.Ua=h[0][0].length;var k=h[0][0][0];a.Ma=k&&k.length||512;for(d=c=0;d<a.rb;d++)for(f=0;f<a.eb;f++)for(g=0;g<a.Ua;g++)if(k=h[d][f][g]){var m=k.length;void 0===m&&(m=k.length=512);var m=m>>2,p=k.pattern;void 0===p&&(p=k.pattern=0);var v=k.data;if(void 0===v){var u=k.bytes;if(void 0!==u&&u.length){for(var F=m<<2,J=u.length;J<
F;J++)u[J]=p;wv(k,u,0)}else k.data=v=[],u&&(k.pattern=p|p<<8|p<<16|p<<24);delete k.bytes}sv(k,d,f);for(F=0;F<v.length;F++)c=c+v[F]&-1}a.A=h;a.K=c;vv(a);e=a}else mb("Empty disk image: "+a.kd)}catch(H){mb("Disk image error ("+b+"): "+H.message)}}a.J&&(a.J.call(a.O,a.B,e,a.kd,a.G),a.J=null)}
function vv(a){var b,c,d={},e;if(a.C&&a.C.length)for(b=a.A,c=0;c<b.length;c++)for(var f=0;f<b[c].length;f++)for(e=0;e<b[c][f].length;e++){var g=b[c][f][e];g&&(delete g.file,delete g.yn)}a.C=[];d.Mf=d.tf=0;b=a.rb*a.eb*a.Ua*a.Ma;a.D&&a.log("ignore any synchronous XMLHttpRequest warnings here (for now)");if(e=xv(a,0)){d.Ma=yv(a,e,11,2);if(d.Ma!=a.Ma){f=!1;d.sf=1;d.xg=12;d.oh=d.sf+2;d.wf=1;d.Ma=a.Ma;if(163840==b&&254==zv(a,d,0,0))d.tf=320,d.yh=64,f=!0;else if(327680==b&&255==zv(a,d,0,0))d.tf=640,d.yh=
112,d.wf++,f=!0;else for(c=446,b=0;4>b;b++){if(128==yv(a,e,c+0,1)){d.Mf=yv(a,e,c+8,4);(e=xv(a,d.Mf))&&(f=!0);break}c+=16}if(!f)return}d.tf||(d.tf=yv(a,e,19,2)||yv(a,e,32,4),d.sf=yv(a,e,14,2),d.oh=d.sf+yv(a,e,22,2)*yv(a,e,16,1),d.yh=yv(a,e,17,2),d.wf=yv(a,e,13,1));d.mh=d.oh+((32*d.yh+(d.Ma-1))/d.Ma|0);d.sn=(d.tf-d.mh)/d.wf|0;d.xg=4084>=d.sn?12:16;d.Sl=12==d.xg?4086:65526;b=[];for(e=d.oh;e<d.mh;e++)b.push(d.Mf+e);Av(a,d,a.Lg,"",b);for(b=0;b<a.C.length;b++){d=a.C[b];for(e=c=0;e<d.ie.length;e++){var f=
d.ie[e],g=c,h=a.eb*a.Ua,k=f%h,m=k/a.Ua|0,k=k%a.Ua,p=void 0,v=void 0,u=void 0;(p=a.A[f/h|0])&&(v=p[m])&&(u=v[k])&&!u.file&&(u.file=d,u.yn=g);c+=a.Ma}e=d;if((xa(e.ac,".EXE")||xa(e.ac,".DLL")||xa(e.ac,".DRV"))&&Bv(e,Cv)==Dv&&Bv(e,Ev)==Fv&&(c=Bv(e,Gv),Bv(e,Hv,c)==Iv)){m=Bv(e,Jv,c);g=Bv(e,Kv,c);h=Bv(e,Lv,c);if(g&&m){d=e;f=g+c;g=m;h=h||0;m=1;d.rd=[];for(d.A=[];g--;){if(k=Mv(d,f)<<h)p=Mv(d,f+2)||65536,d.rd[m++]={ji:k,Ok:k+p-1,he:[]};f+=8}d.rd[254]={ji:0,Ok:0,he:[]}}g=Bv(e,Nv,c);h=Bv(e,Ov,c);if(g&&h)for(d=
e,f=g+=c,g+=h,h=1;f<g;){k=Mv(d,f);m=k&255;if(!m)break;k>>=8;f+=2;if(k)for(;m--;)Mv(d,f,1),254>=k?(p=k,v=Mv(d,f+1),f+=3):(p=Mv(d,f+3,1),v=Mv(d,f+4),f+=6),d.rd[p]&&(d.rd[p].he[h]=[v]),d.A[h]=[p,v],h++;else h+=m}(g=Bv(e,Pv,c))&&Qv(e,g+c);g=Bv(e,Rv,c);h=Bv(e,Sv,c);g&&h&&Qv(e,g,g+h)}}}}
function Av(a,b,c,d,e){var f,g=a.C.length,h=b.Ma/32|0;b.nq=d+"\\";for(var k=0;k<e.length;k++)for(var m=e[k],p=0;p<h;p++){var v=a,u=b;f=p;u.ee&&u.li&&u.li==m||(u.li=m,u.ee=xv(v,u.li));if(u.ee){f*=32;var F=yv(v,u.ee,f,1);if(F){if(229==F)u.ac=null;else{u.ac=Ba(Tv(v,u.ee,f+0,8));F=Ba(Tv(v,u.ee,f+8,3));F.length&&(u.ac+="."+F);u.Zg=yv(v,u.ee,f+11,1);u.ej=yv(v,u.ee,f+28,2);u.Rl=yv(v,u.ee,f+26,2);f=u;var F=[],J=u.Rl;if(J){do{if(2>J)break;for(var H=u.mh+(J-2)*u.wf,I=0;I<u.wf;I++)F.push(u.Mf+H++);J=zv(v,u,
J,0)|zv(v,u,J,1)}while(J<=u.Sl)}f.ie=F}f=!0}else f=!1}else f=!1;if(!f){k=e.length;break}null!=b.ac&&"."!=b.ac&&".."!=b.ac&&(f=new Uv(a,0,b.ac,b.Zg,b.ej,b.ie),a.C.push(f))}for(e=a.C.length;g<e;g++)f=a.C[g],f.Zg&16&&f.ie.length&&Av(a,b,c,d+"\\"+f.ac,f.ie)}function zv(a,b,c,d){var e=0,f=8*b.Ma;c=b.xg*c+(d?8:0);var g=c/f|0;b.oi&&b.nh&&b.nh==b.sf+g||(b.nh=b.sf+g,b.oi=xv(a,b.Mf+b.nh));b.oi&&(c=c%f|0,e=yv(a,b.oi,c>>3,1),d?e=16==b.xg?e<<8:c&7?e<<4:(e&15)<<8:c&7&&(e>>=4));return e}
function xv(a,b){var c=a.eb*a.Ua,d=b/c|0;return d<a.rb?(b%=c,a.seek(d,b/a.Ua|0,b%a.Ua+1)):null}function yv(a,b,c,d){for(var e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}function Tv(a,b,c,d){for(var e="";d--;){var f=a.read(b,c++);if(0>=f)break;e+=String.fromCharCode(f)}return e}function sv(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Tl=b;a.Ul=c;a.hd=a.Nc=0;a.Na=!1;return a}
function tv(a,b){b="action=open&volume="+b+("&mode="+a.mode);b+="&chs="+a.rb+":"+a.eb+":"+a.Ua+":"+a.Ma;b+="&machine="+qv(a.controller);b+="&user="+rv(a.controller);return Pa()+"/api/v1/disk?"+b}
function Vv(a,b,c,d,e,f,g){if(a.D){var h;h="action=read&volume="+a.G;h+="&chs="+a.rb+":"+a.eb+":"+a.Ua+":"+a.Ma;h=h+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+qv(a.controller));h+="&user="+rv(a.controller);Na(Pa()+"/api/v1/disk?"+h,null,f,function(h,m,p){h=[b,c,d,e,f,g];var k=!1,u=h[0],F=h[1],J=h[2],H=h[3];if(!p){m=JSON.parse(m);for(k=0;H--;){var I=a.seek(u,F,J,!0);if(!I)break;wv(I,m,k);k+=I.length;J++}k=h[4]}(h=h[5])&&h(p,k)})}else g&&g(-1,!1)}
function Wv(a,b,c,d,e,f,g){if(a.D){var h={};a.M=!0;h.action="write";h.volume=a.G;h.chs=a.rb+":"+a.eb+":"+a.Ua+":"+a.Ma;h.addr=b+":"+c+":"+d+":"+e;h.machine=qv(a.controller);h.user=rv(a.controller);h.data=JSON.stringify(f);Na(Pa()+"/api/v1/disk",h,g,function(f,h,p){var k=[b,c,d,e,g];f=k[0];h=k[1];var m=k[2],F=k[3],k=k[4];a.M=!1;if(0<=f&&f<a.A.length&&0<=h&&h<a.A[f].length)for(--m;0<F--&&0<=m&&m<a.A[f][h].length;m++){var J=a.A[f][h][m];p?Xv(a,J,!1):J.Na||(J.hd=J.Nc=0)}k&&Yv(a)})}return!1}
function Xv(a,b,c){b.Na=!0;var d=a.I.indexOf(b);0<=d&&(a.I.splice(d,1),a.L.splice(d,1));a.I.push(b);a.L.push(Ma());c&&Yv(a)}function Yv(a){if(a.I.length){var b=a.L[0]+2E3;a.F&&a.N<b&&(clearTimeout(a.F),a.F=null);if(!a.F){var c=Ma(),b=b-c;0>b&&(b=0);2E3<b&&(b=2E3);a.F=setTimeout(function(){pv(a,!0)},b);a.N=c+b}}else a.F&&(clearTimeout(a.F),a.F=null)}
function pv(a,b){b&&(a.F=null);var c=a.I[0];if(c){for(var d=c.Tl,e=c.Ul,c=c.sector,f=0,g=[],h=c-1;h<a.A[d][e].length;h++){var k=a.A[d][e][h];if(!k.Na)break;var m=a.I.indexOf(k);a.I.splice(m,1);a.L.splice(m,1);g=g.concat(Zv(k));k.Na=!1;f++}a=Wv(a,d,e,c,f,g,b);return b||a}return!1}l.info=function(){return this.A.length?[this.A.length,this.A[0].length,this.A[0][0].length,this.A[0][0][0].length]:[0,0,0,0]};
l.seek=function(a,b,c,d,e){var f=null,g=this.B,h=this.A[a];if(h){var k=h[b];if(!k&&g.ah&&b<g.eb){k=h[b]=Array(g.Wd);for(h=0;h<k.length;h++)k[h]=sv(null,a,b,h+1,g.wb,0);this.eb<=b&&(this.eb=b+1)}if(k){for(h=0;h<k.length;h++)if(k[h]&&k[h].sector==c){f=k[h];if(null===f.pattern)if(d)f.pattern=0;else{for(d=1;++h<k.length;)null===k[h].pattern&&d++;Vv(this,a,b,c,d,!!e,function(a,b){a&&(f=null);e&&e(f,b)});return e?null:f}break}!f&&g.ah&&9==g.ib&&(f=k[h]=sv(null,a,b,g.ib,g.wb,0),this.Ua<g.ib&&(this.Ua=g.ib))}}e&&
e(f,!1);return f};function wv(a,b,c){for(var d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}function Zv(a){var b=a.length,c=Array(b),d=0,b=b>>2,e=a.data;a=a.pattern;for(var f=0;f<b;f++){var g=f<e.length?e[f]:a;c[d++]=g&255;c[d++]=g>>8&255;c[d++]=g>>16&255;c[d++]=g>>24&255}return c}l.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};
l.write=function(a,b,c){if(this.Ue)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Nc?f<a.hd?(a.Nc+=a.hd-f,a.hd=f):f>=a.hd+a.Nc&&(a.Nc+=f-(a.hd+a.Nc)+1):(a.hd=f,a.Nc=1);d[f]=d[f]&~(255<<b)|c<<b;this.D&&Xv(this,a,!0)}return!0}return null};function $v(a){for(var b="",c=0,d;d=xv(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(yv(a,d,e,1));return btoa(b)}
F;J++)u[J]=p;yv(k,u,0)}else k.data=v=[],u&&(k.pattern=p|p<<8|p<<16|p<<24);delete k.bytes}uv(k,d,f);for(F=0;F<v.length;F++)c=c+v[F]&-1}a.A=h;a.K=c;xv(a);e=a}else mb("Empty disk image: "+a.kd)}catch(H){mb("Disk image error ("+b+"): "+H.message)}}a.J&&(a.J.call(a.O,a.B,e,a.kd,a.G),a.J=null)}
function xv(a){var b,c,d={},e;if(a.C&&a.C.length)for(b=a.A,c=0;c<b.length;c++)for(var f=0;f<b[c].length;f++)for(e=0;e<b[c][f].length;e++){var g=b[c][f][e];g&&(delete g.file,delete g.yn)}a.C=[];d.Mf=d.tf=0;b=a.rb*a.eb*a.Ua*a.Ma;a.D&&a.log("ignore any synchronous XMLHttpRequest warnings here (for now)");if(e=zv(a,0)){d.Ma=Av(a,e,11,2);if(d.Ma!=a.Ma){f=!1;d.sf=1;d.xg=12;d.oh=d.sf+2;d.wf=1;d.Ma=a.Ma;if(163840==b&&254==Bv(a,d,0,0))d.tf=320,d.yh=64,f=!0;else if(327680==b&&255==Bv(a,d,0,0))d.tf=640,d.yh=
112,d.wf++,f=!0;else for(c=446,b=0;4>b;b++){if(128==Av(a,e,c+0,1)){d.Mf=Av(a,e,c+8,4);(e=zv(a,d.Mf))&&(f=!0);break}c+=16}if(!f)return}d.tf||(d.tf=Av(a,e,19,2)||Av(a,e,32,4),d.sf=Av(a,e,14,2),d.oh=d.sf+Av(a,e,22,2)*Av(a,e,16,1),d.yh=Av(a,e,17,2),d.wf=Av(a,e,13,1));d.mh=d.oh+((32*d.yh+(d.Ma-1))/d.Ma|0);d.sn=(d.tf-d.mh)/d.wf|0;d.xg=4084>=d.sn?12:16;d.Sl=12==d.xg?4086:65526;b=[];for(e=d.oh;e<d.mh;e++)b.push(d.Mf+e);Cv(a,d,a.Lg,"",b);for(b=0;b<a.C.length;b++){d=a.C[b];for(e=c=0;e<d.ie.length;e++){var f=
d.ie[e],g=c,h=a.eb*a.Ua,k=f%h,m=k/a.Ua|0,k=k%a.Ua,p=void 0,v=void 0,u=void 0;(p=a.A[f/h|0])&&(v=p[m])&&(u=v[k])&&!u.file&&(u.file=d,u.yn=g);c+=a.Ma}e=d;if((xa(e.ac,".EXE")||xa(e.ac,".DLL")||xa(e.ac,".DRV"))&&Dv(e,Ev)==Fv&&Dv(e,Gv)==Hv&&(c=Dv(e,Iv),Dv(e,Jv,c)==Kv)){m=Dv(e,Lv,c);g=Dv(e,Mv,c);h=Dv(e,Nv,c);if(g&&m){d=e;f=g+c;g=m;h=h||0;m=1;d.rd=[];for(d.A=[];g--;){if(k=Ov(d,f)<<h)p=Ov(d,f+2)||65536,d.rd[m++]={ji:k,Ok:k+p-1,he:[]};f+=8}d.rd[254]={ji:0,Ok:0,he:[]}}g=Dv(e,Pv,c);h=Dv(e,Qv,c);if(g&&h)for(d=
e,f=g+=c,g+=h,h=1;f<g;){k=Ov(d,f);m=k&255;if(!m)break;k>>=8;f+=2;if(k)for(;m--;)Ov(d,f,1),254>=k?(p=k,v=Ov(d,f+1),f+=3):(p=Ov(d,f+3,1),v=Ov(d,f+4),f+=6),d.rd[p]&&(d.rd[p].he[h]=[v]),d.A[h]=[p,v],h++;else h+=m}(g=Dv(e,Rv,c))&&Sv(e,g+c);g=Dv(e,Tv,c);h=Dv(e,Uv,c);g&&h&&Sv(e,g,g+h)}}}}
function Cv(a,b,c,d,e){var f,g=a.C.length,h=b.Ma/32|0;b.nq=d+"\\";for(var k=0;k<e.length;k++)for(var m=e[k],p=0;p<h;p++){var v=a,u=b;f=p;u.ee&&u.li&&u.li==m||(u.li=m,u.ee=zv(v,u.li));if(u.ee){f*=32;var F=Av(v,u.ee,f,1);if(F){if(229==F)u.ac=null;else{u.ac=Ba(Vv(v,u.ee,f+0,8));F=Ba(Vv(v,u.ee,f+8,3));F.length&&(u.ac+="."+F);u.Zg=Av(v,u.ee,f+11,1);u.ej=Av(v,u.ee,f+28,2);u.Rl=Av(v,u.ee,f+26,2);f=u;var F=[],J=u.Rl;if(J){do{if(2>J)break;for(var H=u.mh+(J-2)*u.wf,I=0;I<u.wf;I++)F.push(u.Mf+H++);J=Bv(v,u,
J,0)|Bv(v,u,J,1)}while(J<=u.Sl)}f.ie=F}f=!0}else f=!1}else f=!1;if(!f){k=e.length;break}null!=b.ac&&"."!=b.ac&&".."!=b.ac&&(f=new Wv(a,0,b.ac,b.Zg,b.ej,b.ie),a.C.push(f))}for(e=a.C.length;g<e;g++)f=a.C[g],f.Zg&16&&f.ie.length&&Cv(a,b,c,d+"\\"+f.ac,f.ie)}function Bv(a,b,c,d){var e=0,f=8*b.Ma;c=b.xg*c+(d?8:0);var g=c/f|0;b.oi&&b.nh&&b.nh==b.sf+g||(b.nh=b.sf+g,b.oi=zv(a,b.Mf+b.nh));b.oi&&(c=c%f|0,e=Av(a,b.oi,c>>3,1),d?e=16==b.xg?e<<8:c&7?e<<4:(e&15)<<8:c&7&&(e>>=4));return e}
function zv(a,b){var c=a.eb*a.Ua,d=b/c|0;return d<a.rb?(b%=c,a.seek(d,b/a.Ua|0,b%a.Ua+1)):null}function Av(a,b,c,d){for(var e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}function Vv(a,b,c,d){for(var e="";d--;){var f=a.read(b,c++);if(0>=f)break;e+=String.fromCharCode(f)}return e}function uv(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Tl=b;a.Ul=c;a.hd=a.Nc=0;a.Na=!1;return a}
function vv(a,b){b="action=open&volume="+b+("&mode="+a.mode);b+="&chs="+a.rb+":"+a.eb+":"+a.Ua+":"+a.Ma;b+="&machine="+sv(a.controller);b+="&user="+tv(a.controller);return Pa()+"/api/v1/disk?"+b}
function Xv(a,b,c,d,e,f,g){if(a.D){var h;h="action=read&volume="+a.G;h+="&chs="+a.rb+":"+a.eb+":"+a.Ua+":"+a.Ma;h=h+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+sv(a.controller));h+="&user="+tv(a.controller);Na(Pa()+"/api/v1/disk?"+h,null,f,function(h,m,p){h=[b,c,d,e,f,g];var k=!1,u=h[0],F=h[1],J=h[2],H=h[3];if(!p){m=JSON.parse(m);for(k=0;H--;){var I=a.seek(u,F,J,!0);if(!I)break;yv(I,m,k);k+=I.length;J++}k=h[4]}(h=h[5])&&h(p,k)})}else g&&g(-1,!1)}
function Yv(a,b,c,d,e,f,g){if(a.D){var h={};a.M=!0;h.action="write";h.volume=a.G;h.chs=a.rb+":"+a.eb+":"+a.Ua+":"+a.Ma;h.addr=b+":"+c+":"+d+":"+e;h.machine=sv(a.controller);h.user=tv(a.controller);h.data=JSON.stringify(f);Na(Pa()+"/api/v1/disk",h,g,function(f,h,p){var k=[b,c,d,e,g];f=k[0];h=k[1];var m=k[2],F=k[3],k=k[4];a.M=!1;if(0<=f&&f<a.A.length&&0<=h&&h<a.A[f].length)for(--m;0<F--&&0<=m&&m<a.A[f][h].length;m++){var J=a.A[f][h][m];p?Zv(a,J,!1):J.Na||(J.hd=J.Nc=0)}k&&$v(a)})}return!1}
function Zv(a,b,c){b.Na=!0;var d=a.I.indexOf(b);0<=d&&(a.I.splice(d,1),a.L.splice(d,1));a.I.push(b);a.L.push(Ma());c&&$v(a)}function $v(a){if(a.I.length){var b=a.L[0]+2E3;a.F&&a.N<b&&(clearTimeout(a.F),a.F=null);if(!a.F){var c=Ma(),b=b-c;0>b&&(b=0);2E3<b&&(b=2E3);a.F=setTimeout(function(){rv(a,!0)},b);a.N=c+b}}else a.F&&(clearTimeout(a.F),a.F=null)}
function rv(a,b){b&&(a.F=null);var c=a.I[0];if(c){for(var d=c.Tl,e=c.Ul,c=c.sector,f=0,g=[],h=c-1;h<a.A[d][e].length;h++){var k=a.A[d][e][h];if(!k.Na)break;var m=a.I.indexOf(k);a.I.splice(m,1);a.L.splice(m,1);g=g.concat(aw(k));k.Na=!1;f++}a=Yv(a,d,e,c,f,g,b);return b||a}return!1}l.info=function(){return this.A.length?[this.A.length,this.A[0].length,this.A[0][0].length,this.A[0][0][0].length]:[0,0,0,0]};
l.seek=function(a,b,c,d,e){var f=null,g=this.B,h=this.A[a];if(h){var k=h[b];if(!k&&g.ah&&b<g.eb){k=h[b]=Array(g.Wd);for(h=0;h<k.length;h++)k[h]=uv(null,a,b,h+1,g.wb,0);this.eb<=b&&(this.eb=b+1)}if(k){for(h=0;h<k.length;h++)if(k[h]&&k[h].sector==c){f=k[h];if(null===f.pattern)if(d)f.pattern=0;else{for(d=1;++h<k.length;)null===k[h].pattern&&d++;Xv(this,a,b,c,d,!!e,function(a,b){a&&(f=null);e&&e(f,b)});return e?null:f}break}!f&&g.ah&&9==g.ib&&(f=k[h]=uv(null,a,b,g.ib,g.wb,0),this.Ua<g.ib&&(this.Ua=g.ib))}}e&&
e(f,!1);return f};function yv(a,b,c){for(var d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}function aw(a){var b=a.length,c=Array(b),d=0,b=b>>2,e=a.data;a=a.pattern;for(var f=0;f<b;f++){var g=f<e.length?e[f]:a;c[d++]=g&255;c[d++]=g>>8&255;c[d++]=g>>16&255;c[d++]=g>>24&255}return c}l.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};
l.write=function(a,b,c){if(this.Ue)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Nc?f<a.hd?(a.Nc+=a.hd-f,a.hd=f):f>=a.hd+a.Nc&&(a.Nc+=f-(a.hd+a.Nc)+1):(a.hd=f,a.Nc=1);d[f]=d[f]&~(255<<b)|c<<b;this.D&&Zv(this,a,!0)}return!0}return null};function bw(a){for(var b="",c=0,d;d=zv(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(Av(a,d,e,1));return btoa(b)}
l.save=function(){var a=0,b=[];b[a++]=[this.G,this.K,this.rb,this.eb,this.Ua,this.Ma];if(!this.D&&!this.Ue)for(var c=this.A,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.Nc){for(var h=[],k=0,m=g.hd,p=g.hd+g.Nc;m<p;)h[k++]=g.data[m++];b[a++]=[d,e,f,g.hd,h]}}return b};
l.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.A.length&&6<=e.length?ov(this,"local",e[2],e[3],e[4],e[5]):null!=e[0]&&null!=e[1]&&null!=this.K&&e[1]!=this.K&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.K+")",b=-2));for(this.A.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],k=g[f++],m=g[f++];if(h>=this.A.length||k>=this.A[h].length||m>=this.A[h][k].length){c="sector (CHS="+h+":"+k+":"+m+") out of range ("+
b+" changes applied)";b=-1;break}if(this.Ue){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.A[h][k][m]){for(k=h.data.length;k<e;)h.data[k++]=h.pattern;k=0;h.hd=e;for(h.Nc=f.length;e<g;)h.data[e++]=f[k++];b++}}}0>b?-2!=b&&this.Ca("Unable to restore disk '"+this.kd+": "+c):vv(this);return b};
l.toJSON=function(){var a;a=0;for(var b;b=xv(this,a++);)aw(b);a=JSON.stringify(this.A,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
function aw(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}var nv=0;function Uv(a,b,c,d,e,f){this.ua=a;this.ac=c;this.Zg=d;this.ej=e;this.ie=f}function Mv(a,b,c){var d;c=c||2;var e=b&511,f=xv(a.ua,a.ie[b>>9]);if(f){if(e+c<=f.length)return yv(a.ua,f,e,c);for(e=d=0;c--;)d|=Mv(a,b++,1)<<e,e+=8}return d}function Bv(a,b,c){return Mv(a,b[0]+(c||0),b[1])}
function Qv(a,b,c){for(var d=0;!c||b<c;){var e=Mv(a,b,1);if(!e)break;var f;f=a;var g=b+1,h=e,k="";for(h||(h=-1);h--;){var m=Mv(f,g++,1);if(!m)break;k+=String.fromCharCode(m)}f=k;if(!f)break;b+=1+e;if(d){if(e=Mv(a,b),g=a.A[e])g=g[0],a.rd[g]&&a.rd[g].he[e].push(f)}else c||(a.Sf=f);b+=2;d++}}
Uv.prototype.Bj=function(a,b){var c=null;if(this.rd)for(var d in this.rd){var e=this.rd[d];if(a>=e.ji&&a<=e.Ok){d=a-=e.ji;var f,g;for(g in e.he){var h=e.he[g],k=a-h[0];if(!k){c=this.Sf+"!"+h[1];break}b&&0<k&&k<d&&(f=h,d=k)}!c&&f&&(c=this.Sf+"!"+f[1]+"+"+q(d,0,!0));break}}return c||this.ac+"+"+q(a,0,!0)};var Dv=23117,Cv=[0,2],Ev=[24,2],Gv=[60,4],Fv=64,Iv=17742,Hv=[0,2],Nv=[4,2],Ov=[6,2],Jv=[28,2],Sv=[32,2],Kv=[34,2],Pv=[38,2],Rv=[44,4],Lv=[50,2];
function bw(a){rb.call(this,"FDC",a,524288);this.dmaRead=bw.prototype.ol;this.dmaWrite=bw.prototype.pl;this.dmaFormat=bw.prototype.Hl;this.M=cw(a.autoMount);this.J=a.sortBy||"name";"none"==this.J&&(this.J=null);this.B=[];this.L=!Wa("Mobi")&&window&&"FileReader"in window;this.exports={loadDisk:this.Ij}}ba(bw,rb);l=bw.prototype;
l.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.A.length&&6<=e.length?qv(this,"local",e[2],e[3],e[4],e[5]):null!=e[0]&&null!=e[1]&&null!=this.K&&e[1]!=this.K&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.K+")",b=-2));for(this.A.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],k=g[f++],m=g[f++];if(h>=this.A.length||k>=this.A[h].length||m>=this.A[h][k].length){c="sector (CHS="+h+":"+k+":"+m+") out of range ("+
b+" changes applied)";b=-1;break}if(this.Ue){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.A[h][k][m]){for(k=h.data.length;k<e;)h.data[k++]=h.pattern;k=0;h.hd=e;for(h.Nc=f.length;e<g;)h.data[e++]=f[k++];b++}}}0>b?-2!=b&&this.Ca("Unable to restore disk '"+this.kd+": "+c):xv(this);return b};
l.toJSON=function(){var a;a=0;for(var b;b=zv(this,a++);)cw(b);a=JSON.stringify(this.A,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
function cw(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}var pv=0;function Wv(a,b,c,d,e,f){this.ua=a;this.ac=c;this.Zg=d;this.ej=e;this.ie=f}function Ov(a,b,c){var d;c=c||2;var e=b&511,f=zv(a.ua,a.ie[b>>9]);if(f){if(e+c<=f.length)return Av(a.ua,f,e,c);for(e=d=0;c--;)d|=Ov(a,b++,1)<<e,e+=8}return d}function Dv(a,b,c){return Ov(a,b[0]+(c||0),b[1])}
function Sv(a,b,c){for(var d=0;!c||b<c;){var e=Ov(a,b,1);if(!e)break;var f;f=a;var g=b+1,h=e,k="";for(h||(h=-1);h--;){var m=Ov(f,g++,1);if(!m)break;k+=String.fromCharCode(m)}f=k;if(!f)break;b+=1+e;if(d){if(e=Ov(a,b),g=a.A[e])g=g[0],a.rd[g]&&a.rd[g].he[e].push(f)}else c||(a.Sf=f);b+=2;d++}}
Wv.prototype.Bj=function(a,b){var c=null;if(this.rd)for(var d in this.rd){var e=this.rd[d];if(a>=e.ji&&a<=e.Ok){d=a-=e.ji;var f,g;for(g in e.he){var h=e.he[g],k=a-h[0];if(!k){c=this.Sf+"!"+h[1];break}b&&0<k&&k<d&&(f=h,d=k)}!c&&f&&(c=this.Sf+"!"+f[1]+"+"+q(d,0,!0));break}}return c||this.ac+"+"+q(a,0,!0)};var Fv=23117,Ev=[0,2],Gv=[24,2],Iv=[60,4],Hv=64,Kv=17742,Jv=[0,2],Pv=[4,2],Qv=[6,2],Lv=[28,2],Uv=[32,2],Mv=[34,2],Rv=[38,2],Tv=[44,4],Nv=[50,2];
function dw(a){rb.call(this,"FDC",a,524288);this.dmaRead=dw.prototype.ol;this.dmaWrite=dw.prototype.pl;this.dmaFormat=dw.prototype.Hl;this.M=ew(a.autoMount);this.J=a.sortBy||"name";"none"==this.J&&(this.J=null);this.B=[];this.L=!Wa("Mobi")&&window&&"FileReader"in window;this.exports={loadDisk:this.Ij}}ba(dw,rb);l=dw.prototype;
l.Bb=function(a,b,c){var d=this;switch(b){case "listDisks":this.na[b]=c;if(this.J){b=[];for(a=0;a<c.options.length;a++)b.push(c.options[a]);b.sort(function(a,b){return"path"!=d.J?a.text.localeCompare(b.text):a.value.localeCompare(b.value)});for(a=0;a<b.length;a++)try{c.options[a]=b[a]}catch(e){break}}c.onchange=function(){var a=d.na.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){mb("FDC option error: "+h.message)}b=g.desc;void 0===
b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.na[b]=c,c.onchange=function(){var a=oa(c.value,10);null!=a&&dw(d,a)},!0;case "loadDisk":return this.na[b]=c,c.onclick=function(){d.Ij()},!0;case "saveDisk":if(!this.L){c.parentNode.removeChild(c);break}this.na[b]=c;c.onclick=function(){var a=d.na.listDrives;a&&a.options&&d.A&&((a=d.A[oa(a.value,10)||0])?(a=a.ua)?(a=Za($v(a),"octet-stream",!0,a.Lg.replace(".json",
".img")),mb(a)):d.Ca("No diskette loaded in drive."):d.Ca("No diskette drive selected."))};return!0;case "mountDisk":if(this.L)return this.na[b]=c,c.onchange=function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length},c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;ew(d,va(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
l.uc=function(a,b,c,d){this.ma=b;this.H=c;this.ca=d;this.pa=a;this.W=bc(a,"ChipSet");cw(Fd(this.pa,"autoMount"),this.M);fw(this);Tc(b,this,gw);Xc(b,this,hw);iw(this,"None","",!0);this.L&&iw(this,"Local Disk","?");iw(this,"Remote Disk","??");jw(this)||Ob(this)};function cw(a,b){if(a){if("string"==typeof a)try{a=eval("("+a+")")}catch(d){mb("FDC auto-mount error: "+d.message+" ("+a+")"),a={}}}else a={};for(var c in a)b&&(b[c]=a[c]);return a}
l.Yb=function(a,b){if(!b){if(!a){if(this.reset(),this.pa.Y){this.B=[];for(a=0;a<this.A.length;a++)kw(this,a,!0);jw(this,!0)}}else if(!this.restore(a))return!1;if(a=this.na.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.N;b++){var c=document.createElement("option");c.value=b;c.text=String.fromCharCode(65+b)+":";a.appendChild(c)}0<this.N&&(a.value="0",dw(this,0))}}return!0};l.Xb=function(a){return a?this.save():!0};l.reset=function(){fw(this)};
l.save=function(){var a=new fg(this);a.set(0,lw(this));return a.data()};l.restore=function(a){return fw(this,a[0])};
function fw(a,b){var c=0,d,e=!0;b||(b=[0,0,mw,Array(9),0,0,0,[]]);a.Va=b[c++];c++;a.fa=b[c++];a.F=b[c++];a.D=b[c++];a.C=b[c++];a.I=b[c++];var f=b[c++];d=b[c++];null!=d&&(a.B=d);void 0===a.A&&(a.N=4,a.W&&(a.N=+bm(a.W,pl,void 0)),a.A=Array(4));for(d=0;d<a.A.length;d++){var g=a.A[d];if(void 0===g){var g=a.A[d]={},h;if(a.W)a:{h=a.W;if(d<+bm(h,pl,void 0)){if(!h.N){h=360;break a}if(d<h.N.length){h=h.N[d];break a}}h=0}else h=0;switch(h){case 160:case 180:g.eb=1;default:g.rb=40;g.Ua=9;break;case 720:g.rb=
80;g.Ua=9;break;case 1200:g.rb=80;g.Ua=15;break;case 1440:g.rb=80,g.Ua=18}}var k=a,m=d,p=f[d],v=0;h=!0;g.Va=m;g.Oe=g.Qe=!1;p||(p=[nw,!0,0,2,0]);"boolean"==typeof p[1]&&(p[1]=[ow,g.rb||40,g.eb||p[3],g.Ua||9,g.Ma||512,p[1],g.wg,g.Bf,g.Cf]);g.sb=p[v++];var u=p[v++];g.name=u[0];g.rb=u[1];g.eb=u[2];g.Ua=u[3];g.Ma=u[4];g.Re=u[5];(g.wg=u[6])?(g.Bf=u[7],g.Cf=u[8]):(g.wg=g.rb,g.Bf=g.eb,g.Cf=g.Ua);g.$a=p[v++];g.Vd=p[v++];g.Gb=p[v++];g.Vd=100<=g.Vd?g.Vd-100:g.Vd-g.Gb;g.ib=p[v++];g.Wd=p[v++];g.wb=p[v++];g.Ta=
p[v++];g.fb=null;g.ua||(g.ye="");var F=p[v++];102==F&&(F=!1);"boolean"==typeof F?(u=p[v++],p=p[v],F?(v=k.A[m],kw(k,m,!0,!0),v.Qe=!0,m=new mv(k,v,"preload"),k.qj(v,m,u,p,!0)):pw(k,m,u,p,!0)?g.ua&&p&&qw(k,u,p,g.ua):Ob(k,!1)):void 0!==F&&g.ua&&0>g.ua.restore(F)&&(h=!1);h&&g.ua&&void 0!==g.Ta&&(g.fb=g.ua.seek(g.Gb,g.$a,g.ib));h||(e=!1)}a.G=b[c++]||0;a.$b=b[c]||rw;return e}
function lw(a){var b=0,c=[];c[b++]=a.Va;c[b++]=0;c[b++]=a.fa;c[b++]=a.F;c[b++]=a.D;c[b++]=a.C;c[b++]=a.I;for(var d=b++,e=0,f=[],g=0;g<a.A.length;g++){var h=e++,k=a.A[g],m=0,p=[];p[m++]=k.sb;p[m++]=[k.name,k.rb,k.eb,k.Ua,k.Ma,k.Re,k.wg,k.Bf,k.Cf];p[m++]=k.$a;p[m++]=k.Vd+100;p[m++]=k.Gb;p[m++]=k.ib;p[m++]=k.Wd;p[m++]=k.wb;p[m++]=k.Ta;p[m++]=k.Qe;p[m++]=k.el;p[m]=k.ye;f[h]=p}c[d]=f;d=b++;for(e=0;e<a.A.length;e++)f=a.A[e],f.ua&&sw(a,f.ye,f.ua);c[d]=a.B;c[b++]=a.G;c[b]=a.$b;return c}
l.lj=function(a){var b;a=this.A[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b};l.fl=function(a,b,c){if(a.ua){var d=a.ua.info(),e=d[2],f=d[1]*e;if(b+c<=d[0]*f)return a.Gb=Math.floor(b/f),b%=f,a.$a=Math.floor(b/e),a.ib=b%e+1,a.wb=c*d[3],a.sb=tw,!0}return!1};
function jw(a,b){b||(a.K=0);for(var c in a.M){var d=a.M[c],e;if(!(e=d.path))a:{if(e=d.name){var f=a.na.listDisks;if(f&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.text==e){e=h.value;break a}}}e=""}e&&(f=c.charCodeAt(0)-65,0<=f&&f<a.A.length?!pw(a,f,d.name||uw(a,e)||va(e,!0),e,!0)&&b&&Ob(a,!1):a.Ca("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")"))}return!!a.K}
l.Ij=function(){var a=this.na.listDisks;return a?ew(this,a.options[a.selectedIndex].text,a.value):!1};
function ew(a,b,c,d){var e,f=a.na.listDrives;if(f&&!isNaN(e=oa(f.value,10))&&0<=e&&e<a.A.length){if(!c)return kw(a,e),!0;if("?"==c)return a.Ca('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return!1;b=va(c)}for(;0>pw(a,e,b,c,!1,d);){if(!window.confirm("Click OK to reload the original disk and discard any changes."))return!1;var f=a,g=c,h;for(h=0;h<f.B.length;h++)if(f.B[h][1]==g){f.B.splice(h,1);
break}kw(a,e,!1,!0)}return!0}a.Ca("Unable to load the selected drive");return!1}function pw(a,b,c,d,e,f){var g=a.A[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.ye.toLowerCase()!=d.toLowerCase())){kw(a,b,e,!0);if(g.Oe)return a.Ca("Drive "+b+" busy"),0;g.Oe=!0;e&&(g.oe=!0,a.K++,r(a)&&Rb(a,"loading diskette '"+c+"'"));g.Qe=!!f;return(new mv(a,g,"preload")).load(c,d,f,a.qj)?1:0}return-1}
l.qj=function(a,b,c,d,e){var f;a.Oe=!1;b&&(f=b.info(),b&&f[0]>a.rb||f[1]>a.eb)&&(this.Ca('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.Va)),b=null);b?(a.ua=b,a.el=c,a.ye=d,uw(this,d)||iw(this,c,d),qw(this,c,d,b),f=b.info(),this.G|=vw,this.Ca('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.Va),a.oe||e),a.wg=f[0],a.Bf=f[1],a.Cf=f[2],this.pa&&this.pa.nd()):a.Qe=!1;a.oe&&(a.oe=!1,--this.K||Ob(this));dw(this,a.Va)};
function iw(a,b,c,d){if((a=a.na.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function uw(a,b){if((a=a.na.listDisks)&&a.options)for(var c=0;c<a.options.length;c++){var d=a.options[c];if(d.value==b)return d.text}return null}
function dw(a,b){if(0<=b&&b<a.A.length){var c=a.A[b],d=a.na.listDisks;a=a.na.listDrives;if(d&&a&&d.options&&a.options&&(a=oa(a.value,10),c=c.Qe?"?":c.ye,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function kw(a,b,c,d){var e=a.A[b];e.ua&&(sw(a,e.ye,e.ua),e.el="",e.ye="",e.ua=null,e.Qe=!1,a.G|=vw,d||a.Ca("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||dw(a,b))}
function qw(a,b,c,d){var e;for(e=0;e<a.B.length;e++)if(a.B[e][1]==c){d.restore(a.B[e][2]);return}a.B[e]=[b,c,[]]}function sw(a,b,c){var d;for(d=0;d<a.B.length;d++)if(a.B[d][1]==b){a.B[d][2]=c.save();break}}l.ao=function(a,b,c){t(this,a,b,c,"OUTPUT");b&ww?this.I&ww||this.I&xw&&this.W&&rh(this.W,6):fw(this);this.I=b};l.wm=function(a,b){t(this,a,null,b,"DIAG",80);return 80};l.ym=function(a,b){t(this,a,null,b,"STATUS",this.fa);return this.fa};
l.vm=function(a,b){var c=0;this.D<this.C&&(c=this.F[this.D]);this.I&xw&&this.W&&ph(this.W,6);r(this)&&t(this,a,null,b,"DATA["+this.D+"]",c);++this.D>=this.C&&(this.fa&=~(yw|zw),this.D=this.C=0);return c};
l.$n=function(a,b,c){r(this)&&t(this,a,b,c,"DATA["+this.C+"]");this.C<this.F.length&&(this.F[this.C++]=b);a=this.F[0]&Aw;if(void 0!==Bw[a]&&this.C>=Bw[a].Jd){b=!1;this.D=0;a=Cw(this);var d,e,f,g,h=a&Aw;switch(h){case Dw:Cw(this);Cw(this);Ew(this);break;case Fw:c=Cw(this);this.Va=c&3;d=this.A[this.Va];Ew(this);Gw(this,(d.sb&Hw)>>>24);break;case Iw:case Jw:c=Cw(this);b=c>>2&1;this.Va=c&3;d=this.A[this.Va];d.$a=b;c=d.Gb=Cw(this);e=Cw(this);f=d.ib=Cw(this);g=Cw(this);d.wb=128<<g;d.Wd=Cw(this);Cw(this);
Cw(this);h==Jw?(h=d,h.sb=Kw|Lw,h.ua&&(h.fb=null,h.sb=tw,this.W&&(Vn(this.W,2,this,"dmaRead",h),Mn(this.W,2)))):(h=d,h.sb=Kw|Lw,h.ua&&(h.ua.Ue?h.sb=Mw|Lw:(h.fb=null,h.sb=tw,this.W&&(Vn(this.W,2,this,"dmaWrite",h),Mn(this.W,2)))));Nw(this,d,a,b,c,e,f,g);b=!0;break;case Ow:c=Cw(this);this.Va=c&3;d=this.A[this.Va];d.Gb=d.Vd=0;d.sb=Pw|Qw;Ew(this);b=!0;break;case Rw:d=this.A[this.Va];d.$a=0;Ew(this);Gw(this,d.Va|d.$a<<2|d.sb&Sw);Gw(this,d.Gb);this.Va=this.Va+1&3;break;case Tw:c=Cw(this);b=c>>2&1;this.Va=
c&3;d=this.A[this.Va];c=d.Gb;e=d.$a=b;f=d.ib=1;g=0;d.sb=tw;d.ua&&(d.fb=d.ua.seek(d.Gb,d.$a,d.ib))?g=d.fb.length>>8:d.sb=Kw|Lw;Nw(this,d,a,b,c,e,f,g);b=!0;break;case Uw:c=Cw(this);b=c>>2&1;this.Va=c&3;d=this.A[this.Va];c=d.Gb;e=d.$a=b;f=1;g=Cw(this);d.wb=128<<g;d.Wd=Cw(this);Cw(this);d.$i=Cw(this);h=d;h.sb=Kw|Lw;h.ua&&(h.fb=null,h.sb=tw,this.W&&(h.Le=0,h.Yc=Array(4),h.ah=!0,h.kg=0,Vn(this.W,2,this,"dmaFormat",h),Mn(this.W,2),h.ah=!1));Nw(this,d,a,b,c,e,f,g);b=!0;break;case Vw:c=Cw(this),this.Va=c&
3,d=this.A[this.Va],d.$a=c>>2&1,c=Cw(this),d.Gb+=c-d.Vd,0>d.Gb&&(d.Gb=0),d.Gb>=d.rb&&(d.Gb=d.rb-1),d.Vd=c,d.sb=Pw,d.Gb||(d.sb|=Qw),Ew(this),b=!0}0<this.C&&(this.fa=this.fa|yw|zw);this.I&xw&&(!d||d.sb&Kw||!b||this.W&&rh(this.W,6))}};l.xm=function(a,b){var c=this.G;this.G&=~vw;t(this,a,null,b,"INPUT",c);return c};l.Zn=function(a,b,c){t(this,a,b,c,"CONTROL");this.$b=b};
function Nw(a,b,c,d,e,f,g,h){Ew(a);Gw(a,b.Va|b.$a<<2|b.sb&Sw);Gw(a,(b.sb&Ww)>>>8);Gw(a,(b.sb&Xw)>>>16);var k=0;if(e!=b.Gb||f!=b.$a)k=g=1;c&Yw&&(f^=k,d||(k=0));Gw(a,e+k);Gw(a,f);Gw(a,g);Gw(a,h)}function Cw(a){var b=a.F[a.D];a.D++;return b}function Ew(a){a.D=a.C=0}function Gw(a,b){a.F[a.C++]=b}l.ol=function(a,b,c){void 0===b||0>b?this.xe(a,c):c(-1,!1)};l.pl=function(a,b){return void 0!==b&&0<=b?Zw(a,b):-1};
l.Hl=function(a,b){if(void 0!==b&&0<=b)a:if(a.sb)a=-1;else{a.Yc[a.Le++]=b;if(a.Le==a.Yc.length){a.Gb=a.Yc[0];a.$a=a.Yc[1];a.ib=a.Yc[2];a.wb=128<<a.Yc[3];for(var c=a.Le=0;c<a.wb;c++)if(0>Zw(a,a.$i)){a=-1;break a}a.kg++}a.kg>=a.Wd&&(b=-1);a=b}else a=-1;return a};l.xe=function(a,b){var c=-1,d=null,e=0;if(!a.sb&&a.ua){do{if(a.fb&&(e=a.Ta,0<=(c=a.ua.read(a.fb,a.Ta++)))){d=a.fb;break}a.fb=a.ua.seek(a.Gb,a.$a,a.ib);if(!a.fb){a.sb=$w|Lw;break}a.Ta=0;ax(a)}while(1)}b(c,!1,d,e)};
function Zw(a,b){if(a.sb||!a.ua)return-1;do{if(a.fb&&a.ua.write(a.fb,a.Ta++,b))break;a.fb=a.ua.seek(a.Gb,a.$a,a.ib);if(!a.fb){a.sb=bx|Lw;b=-1;break}a.Ta=0;ax(a)}while(1);return b}function ax(a){a.ib++;a.ib>=a.Cf+1&&(a.ib=1,a.$a++,a.$a>=a.Bf&&(a.$a=0,a.Gb++))}var ow="Floppy Drive",ww=4,xw=8,zw=16,yw=64,mw=128,Dw=3,Fw=4,Iw=5,Jw=6,Ow=7,Rw=8,Tw=10,Uw=13,Vw=15,Aw=31,Yw=128,tw=0,Kw=8,Pw=32,Lw=64,nw=192,Sw=255,Mw=512,$w=1024,bx=8192,Ww=65280,Xw=16711680,Qw=268435456,Hw=-16777216,vw=128,rw=0;aa={};
var Bw={3:{Jd:3,Xd:0,name:aa.fq},4:{Jd:2,Xd:1,name:aa.cq},5:{Jd:9,Xd:7,name:aa.kq},6:{Jd:9,Xd:7,name:aa.Zp},7:{Jd:2,Xd:0,name:aa.aq},8:{Jd:1,Xd:2,name:aa.eq},10:{Jd:2,Xd:7,name:aa.$p},13:{Jd:6,Xd:7,name:aa.Vp},15:{Jd:3,Xd:0,name:aa.bq}},gw={1009:bw.prototype.wm,1012:bw.prototype.ym,1013:bw.prototype.vm,1015:bw.prototype.xm},hw={1010:bw.prototype.ao,1013:bw.prototype.$n,1015:bw.prototype.Zn};
cb(function(){for(var a=Bb(document,"pcx86","fdc"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new bw(d);Ab(d,c)}});function cx(a){rb.call(this,"HDC",a,1048576);this.dmaRead=cx.prototype.ql;this.dmaWrite=cx.prototype.rl;this.dmaWriteBuffer=cx.prototype.Il;this.dmaWriteFormat=cx.prototype.Jl;this.Z=[];this.ka=a.drives;this.M="at"==a.type;this.xa=!Wa("Mobi")&&window&&"FileReader"in window}ba(cx,rb);l=cx.prototype;
l.Bb=function(a,b,c){var d=this;switch(b){case "saveHD0":case "saveHD1":if(this.xa)return this.na[b]=c,c.onclick=function(a){return function(){var b=d.A&&d.A[a];if(b&&b.ua){var b=b.ua,c=b.Lg||b.kd,e=c.lastIndexOf(".");0<=e&&(c=c.substr(0,e));c+=".img";b=Za($v(b),"octet-stream",!0,c);mb(b)}else d.Ca("Hard drive "+a+" is not available.")}}(+b.slice(-1)),!0;c.parentNode.removeChild(c)}return!1};
l.uc=function(a,b,c,d){this.ma=b;this.H=c;this.ca=d;this.pa=a;if(d=Fd(a,"drives"))this.Z=d;else if(this.ka)try{this.Z=eval("("+this.ka+")")}catch(e){mb("HDC drive configuration error: "+e.message+" ("+this.ka+")")}this.W=bc(a,"ChipSet");this.G=0;this.la=3;Tc(b,this,this.M?dx:ex);Xc(b,this,this.M?fx:gx);this.M&&(this.G++,this.W&&this.W.da==Gl&&this.G++,this.la=2,b.Y[hx]=2,b.Z[hx]=2);ag(c,19,this.$m.bind(this));ag(c,64,this.an.bind(this));this.reset();ix(this)||Ob(this)};
l.Yb=function(a,b){if(!b)if(!a)jx(this),this.pa.Y&&ix(this,!0);else if(!this.restore(a))return!1;return!0};l.Xb=function(a){return a?this.save():!0};function qv(a){return a.pa?a.pa.sa:""}function rv(a){return a.pa?a.pa.B||"":""}l.reset=function(){jx(this,null,!0)};l.save=function(){var a=new fg(this);a.set(0,kx(this));return a.data()};l.restore=function(a){return jx(this,a[0])};
function jx(a,b,c){var d=0,e=!0;a.Va=-1;if(a.M){if(b||(b=[0,0,0,0,0,0,0,lx,0,[0,-1]]),a.I=b[d++],a.va=b[d++],a.J=b[d++],a.ga=b[d++],a.ea=b[d++],a.aa=b[d++],a.Y=b[d++],a.fa=b[d++],a.ha=b[d++],a.L=b[d++],"object"==typeof a.L){var f=a.L;a.L=f[0];a.Va=f[1]}}else b||(b=[0,mx,Array(14),0,0]),a.O=b[d++],a.fa=b[d++],a.F=b[d++],a.D=b[d++],a.C=b[d++],a.sa=b[d++],a.qa=b[d++],a.oa=b[d++],f=b[d++],void 0!==f?a.N=f:void 0===a.N&&(a.N=-1);void 0===a.A&&(a.A=Array(a.Z.length));b=b[d];void 0===b&&(b=[]);for(d=0;d<
a.A.length;d++){void 0===a.A[d]&&(a.A[d]={});var f=a.A[d],g=a,h=d,k=f,m=a.Z[d],p=b[d],v=c,u=0,F=!0;p||(p=[nx,0,!1,Array(8)]);k.Va=h;k.errorCode=p[u++];k.gl=p[u++];k.Re=p[u++];k.Ie=p[u++];k.Je=p[u++];k.$a=p[u++];k.eb=p[u++];k.Od=p[u++];k.ib=p[u++];k.Wd=p[u++];k.wb=p[u++];k.jg=g.M?0:1;k.name=m.name;void 0===k.name&&(k.name=ox);k.path=m.path;k.mode=m.mode||(k.path?"preload":"local");"demandro"!=k.mode&&"demandrw"!=k.mode||rv(g)||(k.mode="local");k.type=m.type;if(void 0===k.type||void 0===px[g.G][k.type])k.type=
g.la;m=px[g.G][k.type];k.Ua=m[2]||17;k.Ma=m[3]||512;if(v&&g.W){var m=g.W,J=k.type;if(m.A){var v=null,H=m.A[18];15<J&&(v=J,J=15);h?(H=H&240|J,J=26):(H=H&15|J<<4,J=25);var I=m;I.A&&(I.A[18]=H,tm(I));null!=v&&m.A&&(m.A[J]=v,tm(m))}}void 0===k.ua&&(k.ua=null,g.Ca("Type "+k.type+' "'+k.name+'" is fixed disk '+h,!0));qx(g,k);k.Ta=p[u++];k.fb=null;k.ua&&(g=p[u],void 0!==g&&0>k.ua.restore(g)&&(F=!1),F&&void 0!==k.Ta&&(k.fb=k.ua.seek(k.Od,k.$a,k.ib+k.jg)));F||(e=!1);null!=a.O&&1>=d&&(a.O|=(f.type&3)<<(1-d<<
b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.na[b]=c,c.onchange=function(){var a=oa(c.value,10);null!=a&&fw(d,a)},!0;case "loadDisk":return this.na[b]=c,c.onclick=function(){d.Ij()},!0;case "saveDisk":if(!this.L){c.parentNode.removeChild(c);break}this.na[b]=c;c.onclick=function(){var a=d.na.listDrives;a&&a.options&&d.A&&((a=d.A[oa(a.value,10)||0])?(a=a.ua)?(a=Za(bw(a),"octet-stream",!0,a.Lg.replace(".json",
".img")),mb(a)):d.Ca("No diskette loaded in drive."):d.Ca("No diskette drive selected."))};return!0;case "mountDisk":if(this.L)return this.na[b]=c,c.onchange=function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length},c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;gw(d,va(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
l.uc=function(a,b,c,d){this.ma=b;this.H=c;this.ca=d;this.pa=a;this.W=bc(a,"ChipSet");ew(Fd(this.pa,"autoMount"),this.M);hw(this);Tc(b,this,iw);Xc(b,this,jw);kw(this,"None","",!0);this.L&&kw(this,"Local Disk","?");kw(this,"Remote Disk","??");lw(this)||Ob(this)};function ew(a,b){if(a){if("string"==typeof a)try{a=eval("("+a+")")}catch(d){mb("FDC auto-mount error: "+d.message+" ("+a+")"),a={}}}else a={};for(var c in a)b&&(b[c]=a[c]);return a}
l.Yb=function(a,b){if(!b){if(!a){if(this.reset(),this.pa.Y){this.B=[];for(a=0;a<this.A.length;a++)mw(this,a,!0);lw(this,!0)}}else if(!this.restore(a))return!1;if(a=this.na.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.N;b++){var c=document.createElement("option");c.value=b;c.text=String.fromCharCode(65+b)+":";a.appendChild(c)}0<this.N&&(a.value="0",fw(this,0))}}return!0};l.Xb=function(a){return a?this.save():!0};l.reset=function(){hw(this)};
l.save=function(){var a=new fg(this);a.set(0,nw(this));return a.data()};l.restore=function(a){return hw(this,a[0])};
function hw(a,b){var c=0,d,e=!0;b||(b=[0,0,ow,Array(9),0,0,0,[]]);a.Va=b[c++];c++;a.fa=b[c++];a.F=b[c++];a.D=b[c++];a.C=b[c++];a.I=b[c++];var f=b[c++];d=b[c++];null!=d&&(a.B=d);void 0===a.A&&(a.N=4,a.W&&(a.N=+bm(a.W,pl,void 0)),a.A=Array(4));for(d=0;d<a.A.length;d++){var g=a.A[d];if(void 0===g){var g=a.A[d]={},h;if(a.W)a:{h=a.W;if(d<+bm(h,pl,void 0)){if(!h.N){h=360;break a}if(d<h.N.length){h=h.N[d];break a}}h=0}else h=0;switch(h){case 160:case 180:g.eb=1;default:g.rb=40;g.Ua=9;break;case 720:g.rb=
80;g.Ua=9;break;case 1200:g.rb=80;g.Ua=15;break;case 1440:g.rb=80,g.Ua=18}}var k=a,m=d,p=f[d],v=0;h=!0;g.Va=m;g.Oe=g.Qe=!1;p||(p=[pw,!0,0,2,0]);"boolean"==typeof p[1]&&(p[1]=[qw,g.rb||40,g.eb||p[3],g.Ua||9,g.Ma||512,p[1],g.wg,g.Bf,g.Cf]);g.sb=p[v++];var u=p[v++];g.name=u[0];g.rb=u[1];g.eb=u[2];g.Ua=u[3];g.Ma=u[4];g.Re=u[5];(g.wg=u[6])?(g.Bf=u[7],g.Cf=u[8]):(g.wg=g.rb,g.Bf=g.eb,g.Cf=g.Ua);g.$a=p[v++];g.Vd=p[v++];g.Gb=p[v++];g.Vd=100<=g.Vd?g.Vd-100:g.Vd-g.Gb;g.ib=p[v++];g.Wd=p[v++];g.wb=p[v++];g.Ta=
p[v++];g.fb=null;g.ua||(g.ye="");var F=p[v++];102==F&&(F=!1);"boolean"==typeof F?(u=p[v++],p=p[v],F?(v=k.A[m],mw(k,m,!0,!0),v.Qe=!0,m=new ov(k,v,"preload"),k.qj(v,m,u,p,!0)):rw(k,m,u,p,!0)?g.ua&&p&&sw(k,u,p,g.ua):Ob(k,!1)):void 0!==F&&g.ua&&0>g.ua.restore(F)&&(h=!1);h&&g.ua&&void 0!==g.Ta&&(g.fb=g.ua.seek(g.Gb,g.$a,g.ib));h||(e=!1)}a.G=b[c++]||0;a.$b=b[c]||tw;return e}
function nw(a){var b=0,c=[];c[b++]=a.Va;c[b++]=0;c[b++]=a.fa;c[b++]=a.F;c[b++]=a.D;c[b++]=a.C;c[b++]=a.I;for(var d=b++,e=0,f=[],g=0;g<a.A.length;g++){var h=e++,k=a.A[g],m=0,p=[];p[m++]=k.sb;p[m++]=[k.name,k.rb,k.eb,k.Ua,k.Ma,k.Re,k.wg,k.Bf,k.Cf];p[m++]=k.$a;p[m++]=k.Vd+100;p[m++]=k.Gb;p[m++]=k.ib;p[m++]=k.Wd;p[m++]=k.wb;p[m++]=k.Ta;p[m++]=k.Qe;p[m++]=k.el;p[m]=k.ye;f[h]=p}c[d]=f;d=b++;for(e=0;e<a.A.length;e++)f=a.A[e],f.ua&&uw(a,f.ye,f.ua);c[d]=a.B;c[b++]=a.G;c[b]=a.$b;return c}
l.lj=function(a){var b;a=this.A[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b};l.fl=function(a,b,c){if(a.ua){var d=a.ua.info(),e=d[2],f=d[1]*e;if(b+c<=d[0]*f)return a.Gb=Math.floor(b/f),b%=f,a.$a=Math.floor(b/e),a.ib=b%e+1,a.wb=c*d[3],a.sb=vw,!0}return!1};
function lw(a,b){b||(a.K=0);for(var c in a.M){var d=a.M[c],e;if(!(e=d.path))a:{if(e=d.name){var f=a.na.listDisks;if(f&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.text==e){e=h.value;break a}}}e=""}e&&(f=c.charCodeAt(0)-65,0<=f&&f<a.A.length?!rw(a,f,d.name||ww(a,e)||va(e,!0),e,!0)&&b&&Ob(a,!1):a.Ca("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")"))}return!!a.K}
l.Ij=function(){var a=this.na.listDisks;return a?gw(this,a.options[a.selectedIndex].text,a.value):!1};
function gw(a,b,c,d){var e,f=a.na.listDrives;if(f&&!isNaN(e=oa(f.value,10))&&0<=e&&e<a.A.length){if(!c)return mw(a,e),!0;if("?"==c)return a.Ca('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return!1;b=va(c)}for(;0>rw(a,e,b,c,!1,d);){if(!window.confirm("Click OK to reload the original disk and discard any changes."))return!1;var f=a,g=c,h;for(h=0;h<f.B.length;h++)if(f.B[h][1]==g){f.B.splice(h,1);
break}mw(a,e,!1,!0)}return!0}a.Ca("Unable to load the selected drive");return!1}function rw(a,b,c,d,e,f){var g=a.A[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.ye.toLowerCase()!=d.toLowerCase())){mw(a,b,e,!0);if(g.Oe)return a.Ca("Drive "+b+" busy"),0;g.Oe=!0;e&&(g.oe=!0,a.K++,r(a)&&Rb(a,"loading diskette '"+c+"'"));g.Qe=!!f;return(new ov(a,g,"preload")).load(c,d,f,a.qj)?1:0}return-1}
l.qj=function(a,b,c,d,e){var f;a.Oe=!1;b&&(f=b.info(),b&&f[0]>a.rb||f[1]>a.eb)&&(this.Ca('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.Va)),b=null);b?(a.ua=b,a.el=c,a.ye=d,ww(this,d)||kw(this,c,d),sw(this,c,d,b),f=b.info(),this.G|=xw,this.Ca('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.Va),a.oe||e),a.wg=f[0],a.Bf=f[1],a.Cf=f[2],this.pa&&this.pa.nd()):a.Qe=!1;a.oe&&(a.oe=!1,--this.K||Ob(this));fw(this,a.Va)};
function kw(a,b,c,d){if((a=a.na.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function ww(a,b){if((a=a.na.listDisks)&&a.options)for(var c=0;c<a.options.length;c++){var d=a.options[c];if(d.value==b)return d.text}return null}
function fw(a,b){if(0<=b&&b<a.A.length){var c=a.A[b],d=a.na.listDisks;a=a.na.listDrives;if(d&&a&&d.options&&a.options&&(a=oa(a.value,10),c=c.Qe?"?":c.ye,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function mw(a,b,c,d){var e=a.A[b];e.ua&&(uw(a,e.ye,e.ua),e.el="",e.ye="",e.ua=null,e.Qe=!1,a.G|=xw,d||a.Ca("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||fw(a,b))}
function sw(a,b,c,d){var e;for(e=0;e<a.B.length;e++)if(a.B[e][1]==c){d.restore(a.B[e][2]);return}a.B[e]=[b,c,[]]}function uw(a,b,c){var d;for(d=0;d<a.B.length;d++)if(a.B[d][1]==b){a.B[d][2]=c.save();break}}l.ao=function(a,b,c){t(this,a,b,c,"OUTPUT");b&yw?this.I&yw||this.I&zw&&this.W&&rh(this.W,6):hw(this);this.I=b};l.wm=function(a,b){t(this,a,null,b,"DIAG",80);return 80};l.ym=function(a,b){t(this,a,null,b,"STATUS",this.fa);return this.fa};
l.vm=function(a,b){var c=0;this.D<this.C&&(c=this.F[this.D]);this.I&zw&&this.W&&ph(this.W,6);r(this)&&t(this,a,null,b,"DATA["+this.D+"]",c);++this.D>=this.C&&(this.fa&=~(Aw|Bw),this.D=this.C=0);return c};
l.$n=function(a,b,c){r(this)&&t(this,a,b,c,"DATA["+this.C+"]");this.C<this.F.length&&(this.F[this.C++]=b);a=this.F[0]&Cw;if(void 0!==Dw[a]&&this.C>=Dw[a].Jd){b=!1;this.D=0;a=Ew(this);var d,e,f,g,h=a&Cw;switch(h){case Fw:Ew(this);Ew(this);Gw(this);break;case Hw:c=Ew(this);this.Va=c&3;d=this.A[this.Va];Gw(this);Iw(this,(d.sb&Jw)>>>24);break;case Kw:case Lw:c=Ew(this);b=c>>2&1;this.Va=c&3;d=this.A[this.Va];d.$a=b;c=d.Gb=Ew(this);e=Ew(this);f=d.ib=Ew(this);g=Ew(this);d.wb=128<<g;d.Wd=Ew(this);Ew(this);
Ew(this);h==Lw?(h=d,h.sb=Mw|Nw,h.ua&&(h.fb=null,h.sb=vw,this.W&&(Vn(this.W,2,this,"dmaRead",h),Mn(this.W,2)))):(h=d,h.sb=Mw|Nw,h.ua&&(h.ua.Ue?h.sb=Ow|Nw:(h.fb=null,h.sb=vw,this.W&&(Vn(this.W,2,this,"dmaWrite",h),Mn(this.W,2)))));Pw(this,d,a,b,c,e,f,g);b=!0;break;case Qw:c=Ew(this);this.Va=c&3;d=this.A[this.Va];d.Gb=d.Vd=0;d.sb=Rw|Sw;Gw(this);b=!0;break;case Tw:d=this.A[this.Va];d.$a=0;Gw(this);Iw(this,d.Va|d.$a<<2|d.sb&Uw);Iw(this,d.Gb);this.Va=this.Va+1&3;break;case Vw:c=Ew(this);b=c>>2&1;this.Va=
c&3;d=this.A[this.Va];c=d.Gb;e=d.$a=b;f=d.ib=1;g=0;d.sb=vw;d.ua&&(d.fb=d.ua.seek(d.Gb,d.$a,d.ib))?g=d.fb.length>>8:d.sb=Mw|Nw;Pw(this,d,a,b,c,e,f,g);b=!0;break;case Ww:c=Ew(this);b=c>>2&1;this.Va=c&3;d=this.A[this.Va];c=d.Gb;e=d.$a=b;f=1;g=Ew(this);d.wb=128<<g;d.Wd=Ew(this);Ew(this);d.$i=Ew(this);h=d;h.sb=Mw|Nw;h.ua&&(h.fb=null,h.sb=vw,this.W&&(h.Le=0,h.Yc=Array(4),h.ah=!0,h.kg=0,Vn(this.W,2,this,"dmaFormat",h),Mn(this.W,2),h.ah=!1));Pw(this,d,a,b,c,e,f,g);b=!0;break;case Xw:c=Ew(this),this.Va=c&
3,d=this.A[this.Va],d.$a=c>>2&1,c=Ew(this),d.Gb+=c-d.Vd,0>d.Gb&&(d.Gb=0),d.Gb>=d.rb&&(d.Gb=d.rb-1),d.Vd=c,d.sb=Rw,d.Gb||(d.sb|=Sw),Gw(this),b=!0}0<this.C&&(this.fa=this.fa|Aw|Bw);this.I&zw&&(!d||d.sb&Mw||!b||this.W&&rh(this.W,6))}};l.xm=function(a,b){var c=this.G;this.G&=~xw;t(this,a,null,b,"INPUT",c);return c};l.Zn=function(a,b,c){t(this,a,b,c,"CONTROL");this.$b=b};
function Pw(a,b,c,d,e,f,g,h){Gw(a);Iw(a,b.Va|b.$a<<2|b.sb&Uw);Iw(a,(b.sb&Yw)>>>8);Iw(a,(b.sb&Zw)>>>16);var k=0;if(e!=b.Gb||f!=b.$a)k=g=1;c&$w&&(f^=k,d||(k=0));Iw(a,e+k);Iw(a,f);Iw(a,g);Iw(a,h)}function Ew(a){var b=a.F[a.D];a.D++;return b}function Gw(a){a.D=a.C=0}function Iw(a,b){a.F[a.C++]=b}l.ol=function(a,b,c){void 0===b||0>b?this.xe(a,c):c(-1,!1)};l.pl=function(a,b){return void 0!==b&&0<=b?ax(a,b):-1};
l.Hl=function(a,b){if(void 0!==b&&0<=b)a:if(a.sb)a=-1;else{a.Yc[a.Le++]=b;if(a.Le==a.Yc.length){a.Gb=a.Yc[0];a.$a=a.Yc[1];a.ib=a.Yc[2];a.wb=128<<a.Yc[3];for(var c=a.Le=0;c<a.wb;c++)if(0>ax(a,a.$i)){a=-1;break a}a.kg++}a.kg>=a.Wd&&(b=-1);a=b}else a=-1;return a};l.xe=function(a,b){var c=-1,d=null,e=0;if(!a.sb&&a.ua){do{if(a.fb&&(e=a.Ta,0<=(c=a.ua.read(a.fb,a.Ta++)))){d=a.fb;break}a.fb=a.ua.seek(a.Gb,a.$a,a.ib);if(!a.fb){a.sb=bx|Nw;break}a.Ta=0;cx(a)}while(1)}b(c,!1,d,e)};
function ax(a,b){if(a.sb||!a.ua)return-1;do{if(a.fb&&a.ua.write(a.fb,a.Ta++,b))break;a.fb=a.ua.seek(a.Gb,a.$a,a.ib);if(!a.fb){a.sb=dx|Nw;b=-1;break}a.Ta=0;cx(a)}while(1);return b}function cx(a){a.ib++;a.ib>=a.Cf+1&&(a.ib=1,a.$a++,a.$a>=a.Bf&&(a.$a=0,a.Gb++))}var qw="Floppy Drive",yw=4,zw=8,Bw=16,Aw=64,ow=128,Fw=3,Hw=4,Kw=5,Lw=6,Qw=7,Tw=8,Vw=10,Ww=13,Xw=15,Cw=31,$w=128,vw=0,Mw=8,Rw=32,Nw=64,pw=192,Uw=255,Ow=512,bx=1024,dx=8192,Yw=65280,Zw=16711680,Sw=268435456,Jw=-16777216,xw=128,tw=0;aa={};
var Dw={3:{Jd:3,Xd:0,name:aa.fq},4:{Jd:2,Xd:1,name:aa.cq},5:{Jd:9,Xd:7,name:aa.kq},6:{Jd:9,Xd:7,name:aa.Zp},7:{Jd:2,Xd:0,name:aa.aq},8:{Jd:1,Xd:2,name:aa.eq},10:{Jd:2,Xd:7,name:aa.$p},13:{Jd:6,Xd:7,name:aa.Vp},15:{Jd:3,Xd:0,name:aa.bq}},iw={1009:dw.prototype.wm,1012:dw.prototype.ym,1013:dw.prototype.vm,1015:dw.prototype.xm},jw={1010:dw.prototype.ao,1013:dw.prototype.$n,1015:dw.prototype.Zn};
cb(function(){for(var a=Bb(document,"pcx86","fdc"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new dw(d);Ab(d,c)}});function ex(a){rb.call(this,"HDC",a,1048576);this.dmaRead=ex.prototype.ql;this.dmaWrite=ex.prototype.rl;this.dmaWriteBuffer=ex.prototype.Il;this.dmaWriteFormat=ex.prototype.Jl;this.Z=[];this.ka=a.drives;this.M="at"==a.type;this.xa=!Wa("Mobi")&&window&&"FileReader"in window}ba(ex,rb);l=ex.prototype;
l.Bb=function(a,b,c){var d=this;switch(b){case "saveHD0":case "saveHD1":if(this.xa)return this.na[b]=c,c.onclick=function(a){return function(){var b=d.A&&d.A[a];if(b&&b.ua){var b=b.ua,c=b.Lg||b.kd,e=c.lastIndexOf(".");0<=e&&(c=c.substr(0,e));c+=".img";b=Za(bw(b),"octet-stream",!0,c);mb(b)}else d.Ca("Hard drive "+a+" is not available.")}}(+b.slice(-1)),!0;c.parentNode.removeChild(c)}return!1};
l.uc=function(a,b,c,d){this.ma=b;this.H=c;this.ca=d;this.pa=a;if(d=Fd(a,"drives"))this.Z=d;else if(this.ka)try{this.Z=eval("("+this.ka+")")}catch(e){mb("HDC drive configuration error: "+e.message+" ("+this.ka+")")}this.W=bc(a,"ChipSet");this.G=0;this.la=3;Tc(b,this,this.M?fx:gx);Xc(b,this,this.M?hx:ix);this.M&&(this.G++,this.W&&this.W.da==Gl&&this.G++,this.la=2,b.Y[jx]=2,b.Z[jx]=2);ag(c,19,this.$m.bind(this));ag(c,64,this.an.bind(this));this.reset();kx(this)||Ob(this)};
l.Yb=function(a,b){if(!b)if(!a)lx(this),this.pa.Y&&kx(this,!0);else if(!this.restore(a))return!1;return!0};l.Xb=function(a){return a?this.save():!0};function sv(a){return a.pa?a.pa.ra:""}function tv(a){return a.pa?a.pa.B||"":""}l.reset=function(){lx(this,null,!0)};l.save=function(){var a=new fg(this);a.set(0,mx(this));return a.data()};l.restore=function(a){return lx(this,a[0])};
function lx(a,b,c){var d=0,e=!0;a.Va=-1;if(a.M){if(b||(b=[0,0,0,0,0,0,0,nx,0,[0,-1]]),a.I=b[d++],a.va=b[d++],a.J=b[d++],a.ga=b[d++],a.ea=b[d++],a.aa=b[d++],a.Y=b[d++],a.fa=b[d++],a.ha=b[d++],a.L=b[d++],"object"==typeof a.L){var f=a.L;a.L=f[0];a.Va=f[1]}}else b||(b=[0,ox,Array(14),0,0]),a.O=b[d++],a.fa=b[d++],a.F=b[d++],a.D=b[d++],a.C=b[d++],a.ra=b[d++],a.qa=b[d++],a.oa=b[d++],f=b[d++],void 0!==f?a.N=f:void 0===a.N&&(a.N=-1);void 0===a.A&&(a.A=Array(a.Z.length));b=b[d];void 0===b&&(b=[]);for(d=0;d<
a.A.length;d++){void 0===a.A[d]&&(a.A[d]={});var f=a.A[d],g=a,h=d,k=f,m=a.Z[d],p=b[d],v=c,u=0,F=!0;p||(p=[px,0,!1,Array(8)]);k.Va=h;k.errorCode=p[u++];k.gl=p[u++];k.Re=p[u++];k.Ie=p[u++];k.Je=p[u++];k.$a=p[u++];k.eb=p[u++];k.Od=p[u++];k.ib=p[u++];k.Wd=p[u++];k.wb=p[u++];k.jg=g.M?0:1;k.name=m.name;void 0===k.name&&(k.name=qx);k.path=m.path;k.mode=m.mode||(k.path?"preload":"local");"demandro"!=k.mode&&"demandrw"!=k.mode||tv(g)||(k.mode="local");k.type=m.type;if(void 0===k.type||void 0===rx[g.G][k.type])k.type=
g.la;m=rx[g.G][k.type];k.Ua=m[2]||17;k.Ma=m[3]||512;if(v&&g.W){var m=g.W,J=k.type;if(m.A){var v=null,H=m.A[18];15<J&&(v=J,J=15);h?(H=H&240|J,J=26):(H=H&15|J<<4,J=25);var I=m;I.A&&(I.A[18]=H,tm(I));null!=v&&m.A&&(m.A[J]=v,tm(m))}}void 0===k.ua&&(k.ua=null,g.Ca("Type "+k.type+' "'+k.name+'" is fixed disk '+h,!0));sx(g,k);k.Ta=p[u++];k.fb=null;k.ua&&(g=p[u],void 0!==g&&0>k.ua.restore(g)&&(F=!1),F&&void 0!==k.Ta&&(k.fb=k.ua.seek(k.Od,k.$a,k.ib+k.jg)));F||(e=!1);null!=a.O&&1>=d&&(a.O|=(f.type&3)<<(1-d<<
1))}0<=a.Va&&(a.B=a.A[a.Va]);return e}
function kx(a){var b=0,c=[];a.M?(c[b++]=a.I,c[b++]=a.va,c[b++]=a.J,c[b++]=a.ga,c[b++]=a.ea,c[b++]=a.aa,c[b++]=a.Y,c[b++]=a.fa,c[b++]=a.ha,c[b++]=[a.L,a.Va]):(c[b++]=a.O,c[b++]=a.fa,c[b++]=a.F,c[b++]=a.D,c[b++]=a.C,c[b++]=a.sa,c[b++]=a.qa,c[b++]=a.oa,c[b++]=a.N);for(var d=0,e=[],f=0;f<a.A.length;f++){var g=d++,h=a.A[f],k=0,m=[];m[k++]=h.errorCode;m[k++]=h.gl;m[k++]=h.Re;m[k++]=h.Ie;m[k++]=h.Je;m[k++]=h.$a;m[k++]=h.eb;m[k++]=h.Od;m[k++]=h.ib;m[k++]=h.Wd;m[k++]=h.wb;m[k++]=h.Ta;m[k]=h.ua?h.ua.save():
null;e[g]=m}c[b]=e;return c}l.lj=function(a){var b;a=this.A[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b};function qx(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.Ie[2])?e=b.Ie[0]<<8|b.Ie[1]:c=b.type);null==c||d||(d=px[a.G][c][1],e=px[a.G][c][0]);d&&((c=px[a.G][b.type])&&e!=c[0]&&d!=c[1]&&a.Ca("Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.rb=e,b.eb=d,null==b.ua&&(b.ua=new mv(a,b,b.mode)))}}
l.fl=function(a,b,c){if(a.ua){var d=a.ua.info(),e=d[0];if(e){var f=d[2],g=d[1]*f;if(b+c<=e*g)return a.Od=Math.floor(b/g),b%=g,a.$a=Math.floor(b/f),a.ib=b%f,a.wb=c*d[3],a.errorCode=nx,!0}}return!1};function ix(a,b){b||(a.K=0);for(var c=0;c<a.A.length;c++){var d=a.A[c];d.name&&d.path?b&&d.ua&&d.ua.pg||!a.nn(c,d.name,d.path,!0)&&b&&Ob(a,!1):b&&void 0!==d.type&&(d.ua=null,qx(a,d,d.type))}return!!a.K}
l.nn=function(a,b,c,d){var e=this.A[a];if(e.Oe)return this.Ca("Drive "+a+" busy"),!0;e.Oe=!0;d&&(e.oe=!0,this.K++,r(this)&&Rb(this,"loading "+b));(e.ua||new mv(this,e,e.mode)).load(b,c,null,this.Kl);return!1};
l.Kl=function(a,b,c){a.Oe=!1;if(a.ua=b)this.Ca('Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.Va),a.oe),b=b.info(),b[0]==a.rb&&b[1]==a.eb&&b[2]==a.Ua&&b[3]==a.Ma||this.Ca("Warning: disk geometry ("+b[0]+":"+b[1]+":"+b[2]+") does not match "+rx[this.G]+" drive type "+a.type+" ("+a.rb+":"+a.eb+":"+a.Ua+")");a.oe&&(a.oe=!1,--this.K||Ob(this))};
l.Ym=function(a,b){var c=0;this.D<this.C&&(c=this.F[this.D]);this.W&&ph(this.W,5);this.fa&=~sx;t(this,a,null,b,"DATA["+this.D+"]",c);++this.D>=this.C&&(this.D=this.C=0,this.fa&=~(tx|ux|vx));return c};l.yo=function(a,b,c){t(this,a,b,c,"DATA["+this.C+"]");this.C<this.F.length&&(this.F[this.C++]=b);a=this.F[0]!=wx?6:this.F.length;6==this.C&&(this.fa&=~xx);this.C>=a&&(this.fa|=tx,this.fa&=~xx,yx(this))};l.Zm=function(a,b){var c=this.fa;t(this,a,null,b,"STATUS",c);this.D<this.C&&(this.fa|=xx);return c};
l.Bo=function(a,b,c){t(this,a,b,c,"RESET");this.sa=b;this.W&&ph(this.W,5);jx(this)};l.Xm=function(a,b){t(this,a,null,b,"CONFIG",this.O);return this.O};l.Ao=function(a,b,c){t(this,a,b,c,"PULSE");this.qa=b;this.fa=xx|ux|vx};l.zo=function(a,b,c){t(this,a,b,c,"PATTERN");this.oa=b};l.ki=function(a,b,c){t(this,a,b,c,"NOISE")};
function zx(a,b,c){var d=-1;a.B&&(d=a.xe(a.B,function(){}),1==a.B.Ta||a.B.Ta==a.B.Ma)&&(r(a,1048832)&&t(a,b,null,c,"DATA["+a.B.Ta+"]",d),1<a.B.Ta&&(a.B.wb-=a.B.Ma,a.J=a.J-1&255,a.B.wb>=a.B.Ma?(a.fa=Ax,a.xe(a.B,function(b){0<=b?(Bx(a),a.W&&a.W.da==Gl&&(a.fa=0),a.fa=a.fa|lx|Cx|Dx):(a.fa=Ex,a.I=Fx)},!1)):a.fa=lx|Cx));return d}l.sl=function(a,b){return zx(this,a,b)|zx(this,a,b)<<8};
function Gx(a,b,c,d){if(a.B&&a.B.wb>=a.B.Ma)if(0>Hx(a.B,c))a.fa=Ex,a.I=Fx;else if(1==a.B.Ta||a.B.Ta==a.B.Ma)r(a,1048832)&&t(a,b,c,d,"DATA["+a.B.Ta+"]"),1<a.B.Ta&&(a.B.wb-=a.B.Ma,a.J=a.J-1&255,Bx(a),a.fa=lx|Cx,a.B.wb>=a.B.Ma&&(a.fa|=Dx))}l.Hn=function(a,b,c){Gx(this,a,b&255,c);Gx(this,a,b>>8&255,c)};l.em=function(a,b){var c=this.I;t(this,a,null,b,"ERROR",c);return c};l.Mn=function(a,b,c){t(this,a,b,c,"WPREC");this.va=b};l.gm=function(a,b){var c=this.J;t(this,a,null,b,"SECCNT",c);return c};
function mx(a){var b=0,c=[];a.M?(c[b++]=a.I,c[b++]=a.va,c[b++]=a.J,c[b++]=a.ga,c[b++]=a.ea,c[b++]=a.aa,c[b++]=a.Y,c[b++]=a.fa,c[b++]=a.ha,c[b++]=[a.L,a.Va]):(c[b++]=a.O,c[b++]=a.fa,c[b++]=a.F,c[b++]=a.D,c[b++]=a.C,c[b++]=a.ra,c[b++]=a.qa,c[b++]=a.oa,c[b++]=a.N);for(var d=0,e=[],f=0;f<a.A.length;f++){var g=d++,h=a.A[f],k=0,m=[];m[k++]=h.errorCode;m[k++]=h.gl;m[k++]=h.Re;m[k++]=h.Ie;m[k++]=h.Je;m[k++]=h.$a;m[k++]=h.eb;m[k++]=h.Od;m[k++]=h.ib;m[k++]=h.Wd;m[k++]=h.wb;m[k++]=h.Ta;m[k]=h.ua?h.ua.save():
null;e[g]=m}c[b]=e;return c}l.lj=function(a){var b;a=this.A[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b};function sx(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.Ie[2])?e=b.Ie[0]<<8|b.Ie[1]:c=b.type);null==c||d||(d=rx[a.G][c][1],e=rx[a.G][c][0]);d&&((c=rx[a.G][b.type])&&e!=c[0]&&d!=c[1]&&a.Ca("Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.rb=e,b.eb=d,null==b.ua&&(b.ua=new ov(a,b,b.mode)))}}
l.fl=function(a,b,c){if(a.ua){var d=a.ua.info(),e=d[0];if(e){var f=d[2],g=d[1]*f;if(b+c<=e*g)return a.Od=Math.floor(b/g),b%=g,a.$a=Math.floor(b/f),a.ib=b%f,a.wb=c*d[3],a.errorCode=px,!0}}return!1};function kx(a,b){b||(a.K=0);for(var c=0;c<a.A.length;c++){var d=a.A[c];d.name&&d.path?b&&d.ua&&d.ua.pg||!a.nn(c,d.name,d.path,!0)&&b&&Ob(a,!1):b&&void 0!==d.type&&(d.ua=null,sx(a,d,d.type))}return!!a.K}
l.nn=function(a,b,c,d){var e=this.A[a];if(e.Oe)return this.Ca("Drive "+a+" busy"),!0;e.Oe=!0;d&&(e.oe=!0,this.K++,r(this)&&Rb(this,"loading "+b));(e.ua||new ov(this,e,e.mode)).load(b,c,null,this.Kl);return!1};
l.Kl=function(a,b,c){a.Oe=!1;if(a.ua=b)this.Ca('Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.Va),a.oe),b=b.info(),b[0]==a.rb&&b[1]==a.eb&&b[2]==a.Ua&&b[3]==a.Ma||this.Ca("Warning: disk geometry ("+b[0]+":"+b[1]+":"+b[2]+") does not match "+tx[this.G]+" drive type "+a.type+" ("+a.rb+":"+a.eb+":"+a.Ua+")");a.oe&&(a.oe=!1,--this.K||Ob(this))};
l.Ym=function(a,b){var c=0;this.D<this.C&&(c=this.F[this.D]);this.W&&ph(this.W,5);this.fa&=~ux;t(this,a,null,b,"DATA["+this.D+"]",c);++this.D>=this.C&&(this.D=this.C=0,this.fa&=~(vx|wx|xx));return c};l.yo=function(a,b,c){t(this,a,b,c,"DATA["+this.C+"]");this.C<this.F.length&&(this.F[this.C++]=b);a=this.F[0]!=yx?6:this.F.length;6==this.C&&(this.fa&=~zx);this.C>=a&&(this.fa|=vx,this.fa&=~zx,Ax(this))};l.Zm=function(a,b){var c=this.fa;t(this,a,null,b,"STATUS",c);this.D<this.C&&(this.fa|=zx);return c};
l.Bo=function(a,b,c){t(this,a,b,c,"RESET");this.ra=b;this.W&&ph(this.W,5);lx(this)};l.Xm=function(a,b){t(this,a,null,b,"CONFIG",this.O);return this.O};l.Ao=function(a,b,c){t(this,a,b,c,"PULSE");this.qa=b;this.fa=zx|wx|xx};l.zo=function(a,b,c){t(this,a,b,c,"PATTERN");this.oa=b};l.ki=function(a,b,c){t(this,a,b,c,"NOISE")};
function Bx(a,b,c){var d=-1;a.B&&(d=a.xe(a.B,function(){}),1==a.B.Ta||a.B.Ta==a.B.Ma)&&(r(a,1048832)&&t(a,b,null,c,"DATA["+a.B.Ta+"]",d),1<a.B.Ta&&(a.B.wb-=a.B.Ma,a.J=a.J-1&255,a.B.wb>=a.B.Ma?(a.fa=Cx,a.xe(a.B,function(b){0<=b?(Dx(a),a.W&&a.W.da==Gl&&(a.fa=0),a.fa=a.fa|nx|Ex|Fx):(a.fa=Gx,a.I=Hx)},!1)):a.fa=nx|Ex));return d}l.sl=function(a,b){return Bx(this,a,b)|Bx(this,a,b)<<8};
function Ix(a,b,c,d){if(a.B&&a.B.wb>=a.B.Ma)if(0>Jx(a.B,c))a.fa=Gx,a.I=Hx;else if(1==a.B.Ta||a.B.Ta==a.B.Ma)r(a,1048832)&&t(a,b,c,d,"DATA["+a.B.Ta+"]"),1<a.B.Ta&&(a.B.wb-=a.B.Ma,a.J=a.J-1&255,Dx(a),a.fa=nx|Ex,a.B.wb>=a.B.Ma&&(a.fa|=Fx))}l.Hn=function(a,b,c){Ix(this,a,b&255,c);Ix(this,a,b>>8&255,c)};l.em=function(a,b){var c=this.I;t(this,a,null,b,"ERROR",c);return c};l.Mn=function(a,b,c){t(this,a,b,c,"WPREC");this.va=b};l.gm=function(a,b){var c=this.J;t(this,a,null,b,"SECCNT",c);return c};
l.Kn=function(a,b,c){t(this,a,b,c,"SECCNT");this.J=b};l.hm=function(a,b){var c=this.ga;t(this,a,null,b,"SECNUM",c);return c};l.Ln=function(a,b,c){t(this,a,b,c,"SECNUM");this.ga=b};l.cm=function(a,b){var c=this.ea;t(this,a,null,b,"CYLLO",c);return c};l.Gn=function(a,b,c){t(this,a,b,c,"CYLLO");this.ea=b};l.bm=function(a,b){var c=this.aa;t(this,a,null,b,"CYLHI",c);return c};l.Fn=function(a,b,c){t(this,a,b,c,"CYLHI");this.aa=b};l.dm=function(a,b){var c=this.Y;t(this,a,null,b,"DRVHD",c);return c};
l.In=function(a,b,c){t(this,a,b,c,"DRVHD");this.Y=b;this.fa=this.A[this.Y&Ix?1:0]?this.fa|lx|Cx:this.fa&~lx};l.im=function(a,b){var c=this.fa;t(this,a,null,b,"STATUS",c);this.fa&lx&&(this.fa&=~Ax);return c};l.En=function(a,b,c){t(this,a,b,c,"COMMAND");this.ha=b;this.W&&ph(this.W,14);Jx(this)};l.Jn=function(a,b,c){t(this,a,b,c,"FDR");this.L&Kx&&!(b&Kx)&&(this.I=Lx);this.L=b};
function Jx(a){var b=!1,c=a.ha,d=a.Y&Ix?1:0,e=a.Y&Mx,f=a.ea|(a.aa&Nx)<<8,g=a.ga,h=a.J||256;a.Va=-1;a.B=null;a.I=Ox;a.fa=lx|Cx;var k=a.A[d];k?(k.Od=f,k.$a=e,k.ib=g,k.wb=h*k.Ma,c=c>=Px?c:c&Qx,k.fb=null,k.Ta=0,k.errorCode=0,a.Va=d,a.B=k):c=-1;switch(c&Qx){case Rx:b=!0;break;case Sx:a.fa=Ax;a.xe(k,function(b){0<=b&&a.W?(Bx(a),a.fa=lx|Cx|Dx):(a.fa=Ex,a.I=Fx)},!1);break;case Tx:a.fa=Dx;break;case Ux:b=!0;break;case Vx:b=!0;break;case Px:a.I=Lx;b=!0;break;case Wx:k.eb=e+1,k.Ua=h,b=!0}b&&Bx(a)}
function Bx(a){!a.W||a.L&Xx||rh(a.W,14,120)}
function yx(a){a.D=0;var b=Yx(a),c=Yx(a),d=c&32,e=d>>5,f=c&31,g=Yx(a),h=Yx(a),k=g<<2&768|h,m=g&63,p=Yx(a),v=Yx(a),u=a.A[e];u&&(u.Od=k,u.$a=f,u.ib=m,u.wb=p*u.Ma);switch(b){case Zx:$x(a,u?u.errorCode:ay);by(a,c);by(a,g);by(a,h);by(a,cy|d);b=-1;break;case wx:for(c=0;0<=(b=Yx(a));)u&&c<u.Ie.length&&(u.Ie[c++]=b);u&&qx(a,u);b=cy;u||a.N!=e||(a.N=-1,b=dy);$x(a,b|d);b=-1;break;case ey:case fy:$x(a,cy|d),b=-1}if(0<=b)switch(void 0===u?b=-1:(u.errorCode=nx,u.gl=0),b){case gy:$x(a,cy|d);break;case hy:u.mf=v;
$x(a,cy|d);break;case iy:$x(a,cy|d);break;case jy:ky(a,u,function(b){$x(a,b|d)});break;case ly:my(a,u,function(b){$x(a,b|d)});break;case ny:oy(a,u,function(b){$x(a,b|d)});break;default:$x(a,dy|d)}}function Yx(a){var b=-1;a.D<a.C&&(b=a.F[a.D++]);return b}function $x(a,b){a.D=a.C=0;void 0!==b&&by(a,b);a.W&&rh(a.W,5);a.fa|=sx}function by(a,b){a.F[a.C++]=b}l.ql=function(a,b,c){void 0===b||0>b?this.xe(a,c):c(-1,!1)};l.rl=function(a,b){return void 0!==b&&0<=b?Hx(a,b):-1};
l.Il=function(a,b){void 0!==b&&0<=b?(a.Ta<a.Je.length?a.Je[a.Ta++]=b:(a.errorCode=py,b=-1),a=b):a=-1;return a};l.Jl=function(a,b){if(void 0!==b&&0<=b)a:if(a.errorCode)a=-1;else{a.Yc[a.Le++]=b;if(a.Le==a.Yc.length){a.Od=a.Yc[0];a.$a=a.Yc[1];a.ib=a.Yc[2];a.wb=128<<a.Yc[3];for(var c=a.Le=0;c<a.wb;c++)if(0>Hx(a,a.$i)){a=-1;break a}a.kg++}a.kg>=a.Wd&&(b=-1);a=b}else a=-1;return a};
function ky(a,b,c){b.errorCode=ay;if(b.ua&&(b.fb=null,a.W)){b.errorCode=nx;Vn(a.W,3,a,"dmaRead",b);Mn(a.W,3,function(a){a||b.errorCode!=nx||(b.errorCode=ay);c(b.errorCode?dy:cy)});return}c(b.errorCode?dy:cy)}function my(a,b,c){b.errorCode=ay;if(b.ua&&(b.fb=null,a.W)){b.errorCode=nx;Vn(a.W,3,a,"dmaWrite",b);Mn(a.W,3,function(a){a||(b.errorCode==nx&&(b.errorCode=ay),b.errorCode==py&&(b.errorCode=nx));c(b.errorCode?dy:cy)});return}c(b.errorCode?dy:cy)}
function oy(a,b,c){b.errorCode=ay;b.Je&&b.Je.length==b.wb||(b.Je=Array(b.wb));b.Ta=0;a.W?(b.errorCode=nx,Vn(a.W,3,a,"dmaWriteBuffer",b),Mn(a.W,3,function(a){a||b.errorCode!=nx||(b.errorCode=ay);c(b.errorCode?dy:cy)})):c(b.errorCode?dy:cy)}
l.xe=function(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.fb&&(f=a.Ta,d=a.ua.read(a.fb,a.Ta),a.Ta+=g,0<=d))return e=a.fb,b&&b(d,!1,e,f),d;if(b){if(a.ua)return a.ua.seek(a.Od,a.$a,a.ib+a.jg,!1,function(c,k){(a.fb=c)?(e=c,f=a.Ta=0,qy(a),d=a.ua.read(a.fb,a.Ta),a.Ta+=g):a.errorCode=py;b(d,k,e,f)}),d;a.errorCode=py;b(d,!1,e,f)}return d};
function Hx(a,b){if(a.errorCode)return-1;do{if(a.fb&&a.ua.write(a.fb,a.Ta++,b))break;a.ua&&a.ua.seek(a.Od,a.$a,a.ib+a.jg,!0,function(b){a.fb=b});if(!a.fb){a.errorCode=py;b=-1;break}a.Ta=0;qy(a)}while(1);return b}function qy(a){a.ib++;var b=1-a.jg;a.ib>=a.Ua+b&&(a.ib=b,a.$a++,a.$a>=a.eb&&(a.$a=0,a.Od++))}l.$m=function(){var a=this.H.L&255;!(this.H.D>>8)&&128<a&&(this.N=a-128);return!0};l.an=function(){var a;(a=this.H.D>>8||!this.W)||(a=!(this.W.hc[0].td&64));return a?!0:!1};
var ox="Hard Drive",rx=["XTC","ATC","COMPAQ"],px=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7],16:[612,4],17:[977,5],18:[977,7],19:[1024,7],20:[733,5],21:[733,7],22:[733,5],23:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[1023,8],5:[940,6],6:[697,5],7:[462,8],8:[925,5],9:[900,15],10:[980,5],11:[925,7],12:[925,9],13:[612,8],14:[980,4],16:[612,4],17:[980,5],18:[966,
6],19:[1023,8],20:[733,5],21:[733,7],22:[524,4,40],23:[924,8],24:[966,14],25:[966,16],26:[1023,14],27:[832,6,33],28:[1222,15,34],29:[1240,7,34],30:[615,4,25],31:[615,8,25],32:[905,9,25],33:[832,8,33],34:[966,7,34],35:[966,8,34],36:[966,9,34],37:[966,5,34],38:[612,16,63],39:[1023,11,33],40:[1023,15,34],41:[1630,15,52],42:[1023,16,63],43:[805,4,26],44:[805,2,26],45:[748,8,33],46:[748,6,33],47:[966,5,25]}],hx=496,Lx=1,Ox=0,Fx=16,Nx=3,Mx=15,Ix=16,Ex=1,Dx=8,Cx=16,lx=64,Ax=128,Rx=16,Sx=32,Tx=48,Ux=64,Vx=
112,Px=144,Wx=145,Qx=240,Xx=2,Kx=4,cy=0,dy=2,gy=0,hy=1,Zx=3,iy=5,jy=8,ly=10,wx=12,ny=15,ey=224,fy=228,nx=0,ay=4,py=20,mx=0,xx=1,tx=2,ux=4,vx=8,sx=32,ex={800:cx.prototype.Ym,801:cx.prototype.Zm,802:cx.prototype.Xm},dx={496:cx.prototype.sl,497:cx.prototype.em,498:cx.prototype.gm,499:cx.prototype.hm,500:cx.prototype.cm,501:cx.prototype.bm,502:cx.prototype.dm,503:cx.prototype.im},gx={800:cx.prototype.yo,801:cx.prototype.Bo,802:cx.prototype.Ao,803:cx.prototype.zo,807:cx.prototype.ki,811:cx.prototype.ki,
815:cx.prototype.ki},fx={496:cx.prototype.Hn,497:cx.prototype.Mn,498:cx.prototype.Kn,499:cx.prototype.Ln,500:cx.prototype.Gn,501:cx.prototype.Fn,502:cx.prototype.In,503:cx.prototype.En,1014:cx.prototype.Jn};cb(function(){for(var a=Bb(document,"pcx86","hdc"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new cx(d);Ab(d,c)}});function ry(a){rb.call(this,"Debugger",a);this.D=+a.base||16;this.ha=["{","}"];this.Ba=["[","]"];this.aa=this.ka=this.O=0;this.ga=!1;this.A=-1;this.C=[];this.I={}}ba(ry,rb);
ry.prototype.jh=function(){return-1};ry.prototype.kh=function(){};ry.prototype.Vk=function(a,b){return a.replace("["+b+"]","unimplemented")};
ry.prototype.Eg=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else this.ga?a="end":a=this.C[this.A+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Ba(a.substring(d,f))),d=f+1}}return b};
function sy(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<<b)-1;else{if(b=Math.pow(2,b),0>a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a<<32-b>>32-b:(b=Math.pow(2,b-1),a>=b?(d=a%b,(a/b|0)&1&&(d-=b)):a<-b&&(d=a%b,((-a-1)/b|0)&1?d&&(d+=b):d||(d-=b)));a!=d&&(a=d);return a}
function ty(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "^/":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e<f?1:0;break;case "<=":e=e<=f?1:0;break;case ">":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&=
f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case ",,":e=sy(e,18,!0)*Math.pow(2,18)+sy(f,18,!0);break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=sy(e,0,!0),e=0<f?e*Math.pow(2,f):Math.trunc(e/Math.pow(2,-f)));break;default:return!1}a.push(sy(e))}return!0}
function uy(a,b,c,d,e,f){var g,h,k,m=!1,p=0,v=[],u=[],F=a.D;for(a.D=e;c<d;){var J;h=b[c++].trim();k=c<d?b[c++]:"";if(h)J=vy(a,h,null,f,p);else if("{"==k){h=1;for(J=c;c<d;)if(c++,k=c<b.length?b[c++]:"","{"==k)h++;else if("}"==k&&!--h)break;J=uy(a,b,J,c-1,a.D,f);null!=J&&p&&(J=wy(J,p));h=c<d?b[c++].trim():"";k=c<d?b[c++]:""}else{if(" "==k)continue;if("^B"==k){a.D=2;continue}if("^O"==k){a.D=8;continue}if("^D"==k){a.D=10;continue}if(!(p&-1073741824)){if("+"==k)continue;if("-"==k){p=p<<2|1;continue}if("~"==
k||"^-"==k){p=p<<2|2;continue}if("^L"==k){p=p<<2|3;continue}}m=!0;break}if(void 0===J)if(f)f.push(h),J=0;else{m=!0;f=[];break}v.push(sy(J));if(" "==k)if(c<b.length-1&&!b[c])c++,k=b[c++];else{m=!0;break}if(!k)break;p="<"==a.ha[0]?xy:yy;if(!p[k]){m=!0;break}u.length&&p[k]<=p[u[u.length-1]]&&ty(v,u,1);u.push(k);a.D="^_"==k?10:e;p=0}if(m||!ty(v,u)||1!=v.length)m=!0;m?f||a.P("parse error ("+(h||k)+")"):g=v.pop();a.D=F;return g}
function zy(a,b,c,d,e){for(var f;0<=(f=b.indexOf(c));){for(var g=0,h=f+1,k=e;h<b.length;){var m=b[h++];if(m==c){k=-1;break}if(!k)break;k--;m=m.charCodeAt(0);7==d?m&=127:m=m-32&63;g=sy(g*Math.pow(2,d)+m,d*e,!0)}if(0<=k){a.P("parse error ("+c+b+c+")");return}b=b.substr(0,f)+Ay(a,g,-1)+b.substr(h)}return b}
function By(a,b,c){var d=void 0,e=!1===c;c=Array.isArray(c)?c:void 0;if(b){"{"!=a.ha[0]&&(b=b.split(a.ha[0]).join("{").split(a.ha[1]).join("}"));b=zy(a,b,'"',7,5);if(!b)return d;b=zy(a,b,"'",6,6);if(!b)return d;16!=a.D&&(b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2^_").replace(/\s+/g," "));b=b.split(/({|}|\|\||&&|\||\^!|\^B|\^O|\^D|\^L|\^-|~|\^_|_|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|\^\/|\/|\*|,,| )/);d=uy(a,b,0,b.length,a.D,c);void 0!==d&&e&&Cy(a,null,d)}return d}
function Dy(a,b){var c,d=a.ha[0],e=a.ha[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=By(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?Ay(a,g):"undefined")}if(a.Ba.length)for(d=a.Ba[0],e=a.Ba[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=a.Vk(b,c[1]);for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e=a.aa-a.ka}if(null==
e)break;b=b.replace(d[0],e.toString())}return b}function wy(a,b){for(;b;){switch(b&3){case 1:a=-sy(a);break;case 2:a|=-1;break;case 3:for(var c=35;0<=c&&!(a&Math.pow(2,c));)c--;a=35-c}b>>>=2}return a}
function vy(a,b,c,d,e){e=void 0===e?0:e;var f,g=Array.isArray(d)?d:void 0;if(null!=b){f=a.jh(b);if(0<=f)f=a.kh(f);else if(f=b,a.I[f]?f=a.I[f].value:(f=f.substr(0,6),f=a.I[f]&&a.I[f].value),null!=f){var h=a.I[b]&&a.I[b].Xo;h&&(g?g.push(h):(g=By(a,h,d),void 0!==g?f+=g:(d||a.P("undefined "+(c||"value")+": "+b+" ("+h+")"),f=void 0)))}else f=oa(b,1<b.length||10<a.D?a.D:10);null!=f?f=sy(wy(f,e)):d||a.P("invalid "+(c||"value")+": "+b)}else d||a.P("missing "+(c||"value"));return f}
function Cy(a,b,c){var d,e=!1;void 0!==c&&(e=!0,d=8==a.D?Ay(a,c,32,8,1)+" "+c+".":Ay(a,c,32,16,1)+" "+Ay(a,c,32,8,1)+" "+Ay(a,c,32,2,8)+" "+c+".",32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e}function Ey(a,b){var c=0;if(a.I){if(b)return Cy(a,b,a.I[b]&&a.I[b].value);b=Object.keys(a.I);b.sort();for(var d=0;d<b.length;d++)Cy(a,b[d],a.I[b[d]].value),c++}return 0<c}
function Ay(a,b,c,d,e){c=void 0===c?0:c;e=void 0===e?0:e;switch((void 0===d?0:d)||a.D){case 2:b=ra(b,0<c?c:0,e);break;case 8:b=sa(b,0<c?(c+2)/3|0:0,!!e);break;case 10:(a=0<c?Math.ceil(.3*c):0)?11<a&&(a=11):a=99999>=Math.abs(b)?5:11;b=pa(b,10,a);break;default:b=q(b,0<c?c+3>>2:0,!!e)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}
var yy={"||":5,"&&":6,"!":7,"|":7,"^!":8,"&":9,"!=":10,"==":10,">=":11,">":11,"<=":11,"<":11,">>>":12,">>":12,"<<":12,"-":13,"+":13,"^/":14,"/":14,"*":14,_:19,"^_":19,"{":20,"}":20},xy={",,":1,"||":5,"&&":6,"!=":10,"==":10,">=":11,">":11,"<=":11,"<":11,">>>":12,">>":12,"<<":12,"-":13,"+":13,"^/":14,"/":14,"*":14,"!":15,"|":15,"^!":15,"&":15,_:19,"^_":19,"{":20,"}":20};
function Fy(a){ry.call(this,a);this.sa=4;this.la=5;this.wa=1048575;this.N=Gy(this,0,0);this.Aa=Gy(this,0,0);this.ea=Gy(this,0,0);this.F=[];this.B=this.W=this.L=[];Hy(this);this.xa=0;Iy(this);this.Da={};Jy(this,a.messages);this.Ia=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return Ky(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return Ky(b,a)})}ba(Fy,ry);l=Fy.prototype;
l.uc=function(a,b,c,d){this.ma=b;this.H=c;this.pa=a;this.gb=bc(a,"FDC");this.Sa=bc(a,"HDC");this.Ic=bc(a,"FPU");this.G=bc(a,"Mouse");(a=Fd(a,"messages"))&&Jy(this,a);this.la=b.I>>2;this.wa=b.N;this.Za=new ce(this.H,7,"DBG");this.qa=Ly;80186<=this.H.da&&(this.qa=Ly.slice(),this.qa[15]=My,80286<=this.H.da&&(this.qa[15]=Ny,80386<=this.H.da&&(this.sa=8)));Jl(this,64,function(a){Oy(d,d.H.sc,a[0])});Jl(this,4,function(a){if(a=a[0]){var b=vy(d,a);if(void 0===b)d.P("invalid selector: "+a);else if(a=Py(d,
b,Qy),d.P("dumpSel("+ua(a?a.U:b)+"): %"+q(a?a.Lb:null,d.la)),a){var c,b=!1;if(a.type&4096)a.type&2048?(c="code"+(a.type&512?",readable":",execonly"),a.type&1024&&(c+=",conforming")):(c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown")),a.type&256&&(c+=",accessed");else{var e=Ry[a.type];e&&(c=e[0],b=e[1])}!c||a.nb&32768||(c+=",not present");d.P((b?"seg="+ua(a.ta&65535)+" off="+ua(a.Pa):"base="+q(a.ta,d.la)+" limit="+Sy(a.Pa))+" type="+ta(a.type>>8)+" ("+c+") ext="+ua(a.ext&-65296)+
" dpl="+ta(a.qc))}}else d.P("no selector")});Jl(this,134217728,function(a){var b;(a=a[0])&&(b=vy(d,a));if(void 0===b)d.P("invalid MCB");else for(d.P("dumpMCB("+ua(b)+")");b;){a=Gy(d,0,b);var c=d.Ja(a,1),e=d.Wc(a,2),k=d.Wc(a,5);if(77!=c&&90!=c)break;d.P(Ty(0,b)+": '"+String.fromCharCode(c)+"' PID="+ua(e)+" LEN="+ua(k)+' "'+Uy(d,a,8)+'"');b+=1+k}});Jl(this,128,function(a){Oy(d,d.H.aa,a[0],d.H.aa!==d.H.sc)});Jl(this,8,function(a){a:{if(a=a[0]){var b=vy(d,a);if(void 0===b){d.P("invalid task selector: "+
a);break a}a=Py(d,b,Qy)}else a=d.H.ka;d.P("dumpTSS("+ua(a?a.U:b)+"): %"+q(a?a.ta:null,d.la));if(a){var b="",c=a.type&-513,e=256==c?4:8,k=256==c?Vy:Wy,m,p,v,u;for(u in k)m=k[u],p=a.ta+m,v=Hg(d.H,p,2),2304==c&&(v|=Hg(d.H,p+2,2)<<16),b&&(b+="\n"),b+=ua(m)+" "+Aa(u+":",11)+q(v,e);if(2304==c)for(u=0,m=v>>>16;m<a.Ob&&1023>u;){p=a.ta+m;v=Hg(d.H,p,2);p=2;c="";if(!p||4<p)p=4;for(e=0;e<p;e++)c&&(c=","+c),c=ra(v&255,8)+c,v>>=8;b+="\n"+ua(m)+" ports "+ua(u)+"-"+ua(u+15)+": "+(""+c);u+=16;m+=2}d.P(b)}}});this.J=
null;this.La=0;this.Ea=!1;ag(this.H,48,this.dn.bind(this));ag(this.H,65,this.en.bind(this));this.Z=null;ag(this.H,104,this.fn.bind(this));Ob(this)};function Xy(a,b,c,d,e,f){b=Uy(a,b);var g=Py(a,d),g=g?g.Pa+1:0,h=(e?"_CODE":"_DATA")+q(c,2);f&&r(a,128)&&a.message(b+" "+(e?"code":"data")+"("+q(c,4)+")=#"+q(d,4)+" len "+q(g));e=Yy(a,b,c);e[b+h]=0;lq(a,b,c,d,0,null,g,e)}
function Zy(a,b,c,d){var e=a.Wc(b,2),f=a.Wc(b,2),g=$y(a,b,4),h=$y(a,b,4),k=Gy(a,$y(a,b,4),a.Wc(b,2));b=Gy(a,$y(a,b,4),a.Wc(b,2));b=Uy(a,b).toUpperCase();var k=Uy(a,k).toUpperCase(),m=(c?"_CODE":"_DATA")+q(e,2);d&&r(a,128)&&a.message((b==k?"":b+"!")+k+" "+(c?"code":"data")+"("+q(e,4)+")="+q(f,4)+":"+q(g)+" len "+q(h));c=Yy(a,k,e);c[k+m]=g;lq(a,k,e,f,g,null,h,c)}function az(a,b,c){c=Uy(a,c).toUpperCase();bz(a,c,b)}
l.dn=function(){var a=this.H;if(null!=this.J&&2752554==a.D){var b=a.L&65535,c=a.K&65535,d=Gy(this,y(a)+12,a.Y.U);switch($y(this,d)){case 336:Zy(this,Gy(this,a.G,b),!c,!!this.J)}}return!0};
l.en=function(a){var b=this.H,c=b.D&65535,d=b.G&65535,e=b.I&65535,f=b.L&65535,g=b.K&65535,h=b.J&65535,k=b.oa.U;if(null==this.J)return 79==c&&bg(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Rb(a,"INT 0x41 handling enabled",128),a.J=!0):(Rb(a,"INT 0x41 monitoring enabled",128),a.J=!1)}}(this)),!0;switch(c){case 79:this.J&&(b.D=b.D&-65536|62342,Rb(this,"INT 0x41 handling enabled",128));break;case 80:Xy(this,Gy(this,h,k),d+1,e,!(g&1),!!this.J);break;case 82:bz(this,null,
d);break;case 127:this.J&&(b.D=b.D&-65536|(this.Ea?0:1));break;case 131:this.J&&(a=Gy(this,b.L,e),this.La++?(this.P("TRAPFAULT failed"),cz(this,this.B,a,!0,!0),this.La=0,this.Kb()):(this.P("INT 0x41 TRAPFAULT: fault="+ua(d)+" error="+q(b.K,8,!0)+" addr="+dz(a)),this.sd(this.B,a,!0),Iy(this,!0)));break;case 141:this.J&&(b.D=b.D&-65536|1);break;case 336:Zy(this,Gy(this,b.G,f),!g,!!this.J);break;case 338:az(this,d,Gy(this,b.J,f))}this.Ea=!1;return!this.J};
l.In=function(a,b,c){t(this,a,b,c,"DRVHD");this.Y=b;this.fa=this.A[this.Y&Kx?1:0]?this.fa|nx|Ex:this.fa&~nx};l.im=function(a,b){var c=this.fa;t(this,a,null,b,"STATUS",c);this.fa&nx&&(this.fa&=~Cx);return c};l.En=function(a,b,c){t(this,a,b,c,"COMMAND");this.ha=b;this.W&&ph(this.W,14);Lx(this)};l.Jn=function(a,b,c){t(this,a,b,c,"FDR");this.L&Mx&&!(b&Mx)&&(this.I=Nx);this.L=b};
function Lx(a){var b=!1,c=a.ha,d=a.Y&Kx?1:0,e=a.Y&Ox,f=a.ea|(a.aa&Px)<<8,g=a.ga,h=a.J||256;a.Va=-1;a.B=null;a.I=Qx;a.fa=nx|Ex;var k=a.A[d];k?(k.Od=f,k.$a=e,k.ib=g,k.wb=h*k.Ma,c=c>=Rx?c:c&Sx,k.fb=null,k.Ta=0,k.errorCode=0,a.Va=d,a.B=k):c=-1;switch(c&Sx){case Tx:b=!0;break;case Ux:a.fa=Cx;a.xe(k,function(b){0<=b&&a.W?(Dx(a),a.fa=nx|Ex|Fx):(a.fa=Gx,a.I=Hx)},!1);break;case Vx:a.fa=Fx;break;case Wx:b=!0;break;case Xx:b=!0;break;case Rx:a.I=Nx;b=!0;break;case Yx:k.eb=e+1,k.Ua=h,b=!0}b&&Dx(a)}
function Dx(a){!a.W||a.L&Zx||rh(a.W,14,120)}
function Ax(a){a.D=0;var b=$x(a),c=$x(a),d=c&32,e=d>>5,f=c&31,g=$x(a),h=$x(a),k=g<<2&768|h,m=g&63,p=$x(a),v=$x(a),u=a.A[e];u&&(u.Od=k,u.$a=f,u.ib=m,u.wb=p*u.Ma);switch(b){case ay:by(a,u?u.errorCode:cy);dy(a,c);dy(a,g);dy(a,h);dy(a,ey|d);b=-1;break;case yx:for(c=0;0<=(b=$x(a));)u&&c<u.Ie.length&&(u.Ie[c++]=b);u&&sx(a,u);b=ey;u||a.N!=e||(a.N=-1,b=fy);by(a,b|d);b=-1;break;case gy:case hy:by(a,ey|d),b=-1}if(0<=b)switch(void 0===u?b=-1:(u.errorCode=px,u.gl=0),b){case iy:by(a,ey|d);break;case jy:u.mf=v;
by(a,ey|d);break;case ky:by(a,ey|d);break;case ly:my(a,u,function(b){by(a,b|d)});break;case ny:oy(a,u,function(b){by(a,b|d)});break;case py:qy(a,u,function(b){by(a,b|d)});break;default:by(a,fy|d)}}function $x(a){var b=-1;a.D<a.C&&(b=a.F[a.D++]);return b}function by(a,b){a.D=a.C=0;void 0!==b&&dy(a,b);a.W&&rh(a.W,5);a.fa|=ux}function dy(a,b){a.F[a.C++]=b}l.ql=function(a,b,c){void 0===b||0>b?this.xe(a,c):c(-1,!1)};l.rl=function(a,b){return void 0!==b&&0<=b?Jx(a,b):-1};
l.Il=function(a,b){void 0!==b&&0<=b?(a.Ta<a.Je.length?a.Je[a.Ta++]=b:(a.errorCode=ry,b=-1),a=b):a=-1;return a};l.Jl=function(a,b){if(void 0!==b&&0<=b)a:if(a.errorCode)a=-1;else{a.Yc[a.Le++]=b;if(a.Le==a.Yc.length){a.Od=a.Yc[0];a.$a=a.Yc[1];a.ib=a.Yc[2];a.wb=128<<a.Yc[3];for(var c=a.Le=0;c<a.wb;c++)if(0>Jx(a,a.$i)){a=-1;break a}a.kg++}a.kg>=a.Wd&&(b=-1);a=b}else a=-1;return a};
function my(a,b,c){b.errorCode=cy;if(b.ua&&(b.fb=null,a.W)){b.errorCode=px;Vn(a.W,3,a,"dmaRead",b);Mn(a.W,3,function(a){a||b.errorCode!=px||(b.errorCode=cy);c(b.errorCode?fy:ey)});return}c(b.errorCode?fy:ey)}function oy(a,b,c){b.errorCode=cy;if(b.ua&&(b.fb=null,a.W)){b.errorCode=px;Vn(a.W,3,a,"dmaWrite",b);Mn(a.W,3,function(a){a||(b.errorCode==px&&(b.errorCode=cy),b.errorCode==ry&&(b.errorCode=px));c(b.errorCode?fy:ey)});return}c(b.errorCode?fy:ey)}
function qy(a,b,c){b.errorCode=cy;b.Je&&b.Je.length==b.wb||(b.Je=Array(b.wb));b.Ta=0;a.W?(b.errorCode=px,Vn(a.W,3,a,"dmaWriteBuffer",b),Mn(a.W,3,function(a){a||b.errorCode!=px||(b.errorCode=cy);c(b.errorCode?fy:ey)})):c(b.errorCode?fy:ey)}
l.xe=function(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.fb&&(f=a.Ta,d=a.ua.read(a.fb,a.Ta),a.Ta+=g,0<=d))return e=a.fb,b&&b(d,!1,e,f),d;if(b){if(a.ua)return a.ua.seek(a.Od,a.$a,a.ib+a.jg,!1,function(c,k){(a.fb=c)?(e=c,f=a.Ta=0,sy(a),d=a.ua.read(a.fb,a.Ta),a.Ta+=g):a.errorCode=ry;b(d,k,e,f)}),d;a.errorCode=ry;b(d,!1,e,f)}return d};
function Jx(a,b){if(a.errorCode)return-1;do{if(a.fb&&a.ua.write(a.fb,a.Ta++,b))break;a.ua&&a.ua.seek(a.Od,a.$a,a.ib+a.jg,!0,function(b){a.fb=b});if(!a.fb){a.errorCode=ry;b=-1;break}a.Ta=0;sy(a)}while(1);return b}function sy(a){a.ib++;var b=1-a.jg;a.ib>=a.Ua+b&&(a.ib=b,a.$a++,a.$a>=a.eb&&(a.$a=0,a.Od++))}l.$m=function(){var a=this.H.L&255;!(this.H.D>>8)&&128<a&&(this.N=a-128);return!0};l.an=function(){var a;(a=this.H.D>>8||!this.W)||(a=!(this.W.hc[0].td&64));return a?!0:!1};
var qx="Hard Drive",tx=["XTC","ATC","COMPAQ"],rx=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7],16:[612,4],17:[977,5],18:[977,7],19:[1024,7],20:[733,5],21:[733,7],22:[733,5],23:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[1023,8],5:[940,6],6:[697,5],7:[462,8],8:[925,5],9:[900,15],10:[980,5],11:[925,7],12:[925,9],13:[612,8],14:[980,4],16:[612,4],17:[980,5],18:[966,
6],19:[1023,8],20:[733,5],21:[733,7],22:[524,4,40],23:[924,8],24:[966,14],25:[966,16],26:[1023,14],27:[832,6,33],28:[1222,15,34],29:[1240,7,34],30:[615,4,25],31:[615,8,25],32:[905,9,25],33:[832,8,33],34:[966,7,34],35:[966,8,34],36:[966,9,34],37:[966,5,34],38:[612,16,63],39:[1023,11,33],40:[1023,15,34],41:[1630,15,52],42:[1023,16,63],43:[805,4,26],44:[805,2,26],45:[748,8,33],46:[748,6,33],47:[966,5,25]}],jx=496,Nx=1,Qx=0,Hx=16,Px=3,Ox=15,Kx=16,Gx=1,Fx=8,Ex=16,nx=64,Cx=128,Tx=16,Ux=32,Vx=48,Wx=64,Xx=
112,Rx=144,Yx=145,Sx=240,Zx=2,Mx=4,ey=0,fy=2,iy=0,jy=1,ay=3,ky=5,ly=8,ny=10,yx=12,py=15,gy=224,hy=228,px=0,cy=4,ry=20,ox=0,zx=1,vx=2,wx=4,xx=8,ux=32,gx={800:ex.prototype.Ym,801:ex.prototype.Zm,802:ex.prototype.Xm},fx={496:ex.prototype.sl,497:ex.prototype.em,498:ex.prototype.gm,499:ex.prototype.hm,500:ex.prototype.cm,501:ex.prototype.bm,502:ex.prototype.dm,503:ex.prototype.im},ix={800:ex.prototype.yo,801:ex.prototype.Bo,802:ex.prototype.Ao,803:ex.prototype.zo,807:ex.prototype.ki,811:ex.prototype.ki,
815:ex.prototype.ki},hx={496:ex.prototype.Hn,497:ex.prototype.Mn,498:ex.prototype.Kn,499:ex.prototype.Ln,500:ex.prototype.Gn,501:ex.prototype.Fn,502:ex.prototype.In,503:ex.prototype.En,1014:ex.prototype.Jn};cb(function(){for(var a=Bb(document,"pcx86","hdc"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new ex(d);Ab(d,c)}});function ty(a){rb.call(this,"Debugger",a);this.D=+a.base||16;this.ha=["{","}"];this.Ba=["[","]"];this.aa=this.ka=this.O=0;this.ga=!1;this.A=-1;this.C=[];this.I={}}ba(ty,rb);
ty.prototype.jh=function(){return-1};ty.prototype.kh=function(){};ty.prototype.Vk=function(a,b){return a.replace("["+b+"]","unimplemented")};
ty.prototype.Eg=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else this.ga?a="end":a=this.C[this.A+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Ba(a.substring(d,f))),d=f+1}}return b};
function uy(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<<b)-1;else{if(b=Math.pow(2,b),0>a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a<<32-b>>32-b:(b=Math.pow(2,b-1),a>=b?(d=a%b,(a/b|0)&1&&(d-=b)):a<-b&&(d=a%b,((-a-1)/b|0)&1?d&&(d+=b):d||(d-=b)));a!=d&&(a=d);return a}
function vy(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "^/":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e<f?1:0;break;case "<=":e=e<=f?1:0;break;case ">":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&=
f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case ",,":e=uy(e,18,!0)*Math.pow(2,18)+uy(f,18,!0);break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=uy(e,0,!0),e=0<f?e*Math.pow(2,f):Math.trunc(e/Math.pow(2,-f)));break;default:return!1}a.push(uy(e))}return!0}
function wy(a,b,c,d,e,f){var g,h,k,m=!1,p=0,v=[],u=[],F=a.D;for(a.D=e;c<d;){var J;h=b[c++].trim();k=c<d?b[c++]:"";if(h)J=xy(a,h,null,f,p);else if("{"==k){h=1;for(J=c;c<d;)if(c++,k=c<b.length?b[c++]:"","{"==k)h++;else if("}"==k&&!--h)break;J=wy(a,b,J,c-1,a.D,f);null!=J&&p&&(J=yy(J,p));h=c<d?b[c++].trim():"";k=c<d?b[c++]:""}else{if(" "==k)continue;if("^B"==k){a.D=2;continue}if("^O"==k){a.D=8;continue}if("^D"==k){a.D=10;continue}if(!(p&-1073741824)){if("+"==k)continue;if("-"==k){p=p<<2|1;continue}if("~"==
k||"^-"==k){p=p<<2|2;continue}if("^L"==k){p=p<<2|3;continue}}m=!0;break}if(void 0===J)if(f)f.push(h),J=0;else{m=!0;f=[];break}v.push(uy(J));if(" "==k)if(c<b.length-1&&!b[c])c++,k=b[c++];else{m=!0;break}if(!k)break;p="<"==a.ha[0]?zy:Ay;if(!p[k]){m=!0;break}u.length&&p[k]<=p[u[u.length-1]]&&vy(v,u,1);u.push(k);a.D="^_"==k?10:e;p=0}if(m||!vy(v,u)||1!=v.length)m=!0;m?f||a.P("parse error ("+(h||k)+")"):g=v.pop();a.D=F;return g}
function By(a,b,c,d,e){for(var f;0<=(f=b.indexOf(c));){for(var g=0,h=f+1,k=e;h<b.length;){var m=b[h++];if(m==c){k=-1;break}if(!k)break;k--;m=m.charCodeAt(0);7==d?m&=127:m=m-32&63;g=uy(g*Math.pow(2,d)+m,d*e,!0)}if(0<=k){a.P("parse error ("+c+b+c+")");return}b=b.substr(0,f)+Cy(a,g,-1)+b.substr(h)}return b}
function Dy(a,b,c){var d=void 0,e=!1===c;c=Array.isArray(c)?c:void 0;if(b){"{"!=a.ha[0]&&(b=b.split(a.ha[0]).join("{").split(a.ha[1]).join("}"));b=By(a,b,'"',7,5);if(!b)return d;b=By(a,b,"'",6,6);if(!b)return d;16!=a.D&&(b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2^_").replace(/\s+/g," "));b=b.split(/({|}|\|\||&&|\||\^!|\^B|\^O|\^D|\^L|\^-|~|\^_|_|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|\^\/|\/|\*|,,| )/);d=wy(a,b,0,b.length,a.D,c);void 0!==d&&e&&Ey(a,null,d)}return d}
function Fy(a,b){var c,d=a.ha[0],e=a.ha[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=Dy(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?Cy(a,g):"undefined")}if(a.Ba.length)for(d=a.Ba[0],e=a.Ba[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=a.Vk(b,c[1]);for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e=a.aa-a.ka}if(null==
e)break;b=b.replace(d[0],e.toString())}return b}function yy(a,b){for(;b;){switch(b&3){case 1:a=-uy(a);break;case 2:a|=-1;break;case 3:for(var c=35;0<=c&&!(a&Math.pow(2,c));)c--;a=35-c}b>>>=2}return a}
function xy(a,b,c,d,e){e=void 0===e?0:e;var f,g=Array.isArray(d)?d:void 0;if(null!=b){f=a.jh(b);if(0<=f)f=a.kh(f);else if(f=b,a.I[f]?f=a.I[f].value:(f=f.substr(0,6),f=a.I[f]&&a.I[f].value),null!=f){var h=a.I[b]&&a.I[b].Xo;h&&(g?g.push(h):(g=Dy(a,h,d),void 0!==g?f+=g:(d||a.P("undefined "+(c||"value")+": "+b+" ("+h+")"),f=void 0)))}else f=oa(b,1<b.length||10<a.D?a.D:10);null!=f?f=uy(yy(f,e)):d||a.P("invalid "+(c||"value")+": "+b)}else d||a.P("missing "+(c||"value"));return f}
function Ey(a,b,c){var d,e=!1;void 0!==c&&(e=!0,d=8==a.D?Cy(a,c,32,8,1)+" "+c+".":Cy(a,c,32,16,1)+" "+Cy(a,c,32,8,1)+" "+Cy(a,c,32,2,8)+" "+c+".",32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e}function Gy(a,b){var c=0;if(a.I){if(b)return Ey(a,b,a.I[b]&&a.I[b].value);b=Object.keys(a.I);b.sort();for(var d=0;d<b.length;d++)Ey(a,b[d],a.I[b[d]].value),c++}return 0<c}
function Cy(a,b,c,d,e){c=void 0===c?0:c;e=void 0===e?0:e;switch((void 0===d?0:d)||a.D){case 2:b=ra(b,0<c?c:0,e);break;case 8:b=sa(b,0<c?(c+2)/3|0:0,!!e);break;case 10:(a=0<c?Math.ceil(.3*c):0)?11<a&&(a=11):a=99999>=Math.abs(b)?5:11;b=pa(b,10,a);break;default:b=q(b,0<c?c+3>>2:0,!!e)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}
var Ay={"||":5,"&&":6,"!":7,"|":7,"^!":8,"&":9,"!=":10,"==":10,">=":11,">":11,"<=":11,"<":11,">>>":12,">>":12,"<<":12,"-":13,"+":13,"^/":14,"/":14,"*":14,_:19,"^_":19,"{":20,"}":20},zy={",,":1,"||":5,"&&":6,"!=":10,"==":10,">=":11,">":11,"<=":11,"<":11,">>>":12,">>":12,"<<":12,"-":13,"+":13,"^/":14,"/":14,"*":14,"!":15,"|":15,"^!":15,"&":15,_:19,"^_":19,"{":20,"}":20};
function Hy(a){ty.call(this,a);this.ra=4;this.la=5;this.wa=1048575;this.N=Iy(this,0,0);this.Aa=Iy(this,0,0);this.ea=Iy(this,0,0);this.F=[];this.B=this.W=this.L=[];Jy(this);this.xa=0;Ky(this);this.Da={};Ly(this,a.messages);this.Ia=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return My(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return My(b,a)})}ba(Hy,ty);l=Hy.prototype;
l.uc=function(a,b,c,d){this.ma=b;this.H=c;this.pa=a;this.gb=bc(a,"FDC");this.Sa=bc(a,"HDC");this.Ic=bc(a,"FPU");this.G=bc(a,"Mouse");(a=Fd(a,"messages"))&&Ly(this,a);this.la=b.I>>2;this.wa=b.N;this.Za=new ce(this.H,7,"DBG");this.qa=Ny;80186<=this.H.da&&(this.qa=Ny.slice(),this.qa[15]=Oy,80286<=this.H.da&&(this.qa[15]=Py,80386<=this.H.da&&(this.ra=8)));Jl(this,64,function(a){Qy(d,d.H.sc,a[0])});Jl(this,4,function(a){if(a=a[0]){var b=xy(d,a);if(void 0===b)d.P("invalid selector: "+a);else if(a=Ry(d,
b,Sy),d.P("dumpSel("+ua(a?a.U:b)+"): %"+q(a?a.Lb:null,d.la)),a){var c,b=!1;if(a.type&4096)a.type&2048?(c="code"+(a.type&512?",readable":",execonly"),a.type&1024&&(c+=",conforming")):(c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown")),a.type&256&&(c+=",accessed");else{var e=Ty[a.type];e&&(c=e[0],b=e[1])}!c||a.nb&32768||(c+=",not present");d.P((b?"seg="+ua(a.ta&65535)+" off="+ua(a.Pa):"base="+q(a.ta,d.la)+" limit="+Uy(a.Pa))+" type="+ta(a.type>>8)+" ("+c+") ext="+ua(a.ext&-65296)+
" dpl="+ta(a.qc))}}else d.P("no selector")});Jl(this,134217728,function(a){var b;(a=a[0])&&(b=xy(d,a));if(void 0===b)d.P("invalid MCB");else for(d.P("dumpMCB("+ua(b)+")");b;){a=Iy(d,0,b);var c=d.Ja(a,1),e=d.Wc(a,2),k=d.Wc(a,5);if(77!=c&&90!=c)break;d.P(Vy(0,b)+": '"+String.fromCharCode(c)+"' PID="+ua(e)+" LEN="+ua(k)+' "'+Wy(d,a,8)+'"');b+=1+k}});Jl(this,128,function(a){Qy(d,d.H.aa,a[0],d.H.aa!==d.H.sc)});Jl(this,8,function(a){a:{if(a=a[0]){var b=xy(d,a);if(void 0===b){d.P("invalid task selector: "+
a);break a}a=Ry(d,b,Sy)}else a=d.H.ka;d.P("dumpTSS("+ua(a?a.U:b)+"): %"+q(a?a.ta:null,d.la));if(a){var b="",c=a.type&-513,e=256==c?4:8,k=256==c?Xy:Yy,m,p,v,u;for(u in k)m=k[u],p=a.ta+m,v=Hg(d.H,p,2),2304==c&&(v|=Hg(d.H,p+2,2)<<16),b&&(b+="\n"),b+=ua(m)+" "+Aa(u+":",11)+q(v,e);if(2304==c)for(u=0,m=v>>>16;m<a.Ob&&1023>u;){p=a.ta+m;v=Hg(d.H,p,2);p=2;c="";if(!p||4<p)p=4;for(e=0;e<p;e++)c&&(c=","+c),c=ra(v&255,8)+c,v>>=8;b+="\n"+ua(m)+" ports "+ua(u)+"-"+ua(u+15)+": "+(""+c);u+=16;m+=2}d.P(b)}}});this.J=
null;this.La=0;this.Ea=!1;ag(this.H,48,this.dn.bind(this));ag(this.H,65,this.en.bind(this));this.Z=null;ag(this.H,104,this.fn.bind(this));Ob(this)};function Zy(a,b,c,d,e,f){b=Wy(a,b);var g=Ry(a,d),g=g?g.Pa+1:0,h=(e?"_CODE":"_DATA")+q(c,2);f&&r(a,128)&&a.message(b+" "+(e?"code":"data")+"("+q(c,4)+")=#"+q(d,4)+" len "+q(g));e=$y(a,b,c);e[b+h]=0;lq(a,b,c,d,0,null,g,e)}
function az(a,b,c,d){var e=a.Wc(b,2),f=a.Wc(b,2),g=bz(a,b,4),h=bz(a,b,4),k=Iy(a,bz(a,b,4),a.Wc(b,2));b=Iy(a,bz(a,b,4),a.Wc(b,2));b=Wy(a,b).toUpperCase();var k=Wy(a,k).toUpperCase(),m=(c?"_CODE":"_DATA")+q(e,2);d&&r(a,128)&&a.message((b==k?"":b+"!")+k+" "+(c?"code":"data")+"("+q(e,4)+")="+q(f,4)+":"+q(g)+" len "+q(h));c=$y(a,k,e);c[k+m]=g;lq(a,k,e,f,g,null,h,c)}function cz(a,b,c){c=Wy(a,c).toUpperCase();dz(a,c,b)}
l.dn=function(){var a=this.H;if(null!=this.J&&2752554==a.D){var b=a.L&65535,c=a.K&65535,d=Iy(this,y(a)+12,a.Y.U);switch(bz(this,d)){case 336:az(this,Iy(this,a.G,b),!c,!!this.J)}}return!0};
l.en=function(a){var b=this.H,c=b.D&65535,d=b.G&65535,e=b.I&65535,f=b.L&65535,g=b.K&65535,h=b.J&65535,k=b.oa.U;if(null==this.J)return 79==c&&bg(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Rb(a,"INT 0x41 handling enabled",128),a.J=!0):(Rb(a,"INT 0x41 monitoring enabled",128),a.J=!1)}}(this)),!0;switch(c){case 79:this.J&&(b.D=b.D&-65536|62342,Rb(this,"INT 0x41 handling enabled",128));break;case 80:Zy(this,Iy(this,h,k),d+1,e,!(g&1),!!this.J);break;case 82:dz(this,null,
d);break;case 127:this.J&&(b.D=b.D&-65536|(this.Ea?0:1));break;case 131:this.J&&(a=Iy(this,b.L,e),this.La++?(this.P("TRAPFAULT failed"),ez(this,this.B,a,!0,!0),this.La=0,this.Kb()):(this.P("INT 0x41 TRAPFAULT: fault="+ua(d)+" error="+q(b.K,8,!0)+" addr="+fz(a)),this.sd(this.B,a,!0),Ky(this,!0)));break;case 141:this.J&&(b.D=b.D&-65536|1);break;case 336:az(this,Iy(this,b.G,f),!g,!!this.J);break;case 338:cz(this,d,Iy(this,b.J,f))}this.Ea=!1;return!this.J};
l.fn=function(a){var b=this.H,c=b.D&255,d=b.D>>8&255,e=b.G&65535,f=b.I&65535,g=b.L&65535,h=b.J&65535,k=b.oa.U;if(null==this.Z){if(67==d){if(609437257==b.ia((b.Z.U<<4)+10)||1111835735==b.ia((b.Z.U<<4)+95))return!0;bg(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Rb(a,"INT 0x68 handling enabled",128),a.J=a.Z=!0):(Rb(a,"INT 0x68 monitoring enabled",128),a.Z=!1)}}(this))}return!0}switch(d){case 67:this.Z&&(b.D=b.D&-65536|62342);break;case 68:this.Z&&(a=ee(b.Z,this.Dl.bind(this)))&&
(b.J=a[0],we(b,a[1]));break;case 72:bz(this,null,e);break;case 80:32==c?Xy(this,Gy(this,h,k),0,f,!0,!!this.Z):128>c?Xy(this,Gy(this,h,k),e+1,c&64?g:f,!(c&1),!!this.Z):Zy(this,Gy(this,h,k),!(c&1),!!this.Z),this.Z&&(b.D=b.D&-256|1)}return!this.Z};l.Dl=function(){var a=this.H;5==(a.D&255)&&(a.I=a.K=0,a.D=a.D&-256|1);return!1};
l.Bb=function(a,b,c){var d=this;switch(b){case "debugInput":return this.va=this.na[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",Ky(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.A<d.C.length-1&&(b=d.C[++d.A])):40==a.keyCode&&(0<d.A?b=d.C[--d.A]:(b="",d.A=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.na[b]=c,ab(c,function(){if(d.va){var a=d.va.value;
d.va.value="";Ky(d,a,!0);return!0}return!1}),!0;case "step":return this.na[b]=c,ab(c,function(a){var b=!1;Pb(d,!0)||(Qb(d,!0),b=ez(d,a?1:0),Qb(d,!1));return b}),!0}return!1};l.nd=function(){this.va&&this.va.focus()};function fz(a){return!(!(a.H&&a.H.qa&1)||a.H.O&131072)}
function Py(a,b,c){var d=fz(a)?Qy:gz;c||(c=d);if(c==d){if(b===a.H.Z.U)return a.H.Z;if(b===a.H.Da.U)return a.H.Da;if(b===a.H.oa.U)return a.H.oa;if(b===a.H.Y.U)return a.H.Y;if(80386<=a.H.da){if(b===a.H.Ga.U)return a.H.Ga;if(b===a.H.Ia.U)return a.H.Ia}if(a.Ga&&c==Qy||!a.Za)return null}a=a.Za;if(c!=Qy)a.ph(b),a.Pa=65535,a.Ob=65536;else{var e;c=a.gc;b&=65535;b&4?(d=c.Db.ta,e=d+c.Db.Pa|0):(d=c.Ib,e=c.Hc);d=d+(b&65528)|0;if(e-d|0){e=Hg(c,d+0,2);var f=Hg(c,d+4,2),g=f&7936,h=Hg(c,d+2,2)|(f&255)<<16,k=Hg(c,
d+6,2);80386<=c.da&&(h|=(k&65280)<<16,e|=(k&15)<<16,k&128&&(e=e<<12|4095));a.U=b;a.ta=h;a.Pa=e;a.Ob=(e>>>0)+1;a.nb=f;a.type=g;a.ext=k;a.Lb=d;de(a,!0,!0,!1)}}return a}l.Tb=function(a,b,c){var d=a&&a.ya;if(null==d&&(d=-1,a)){var e=Py(this,a.U,a.type);e&&(b=a.Ha||0,c=c||1,d=e=-1===e.Lb||e.fd&&(b>>>0)+c>e.Ob||!e.fd&&(b>>>0)+c<=e.Ob?e.ta+b|0:-1,a.ya=d)}return d};l.Ja=function(a,b){var c=255,d=this.Tb(a,!1,1);-1!==d&&(c=Hg(this.H,d,1,a.type==hz)|0,b&&iz(this,a,b));return c};
l.mb=function(a,b){return a.Hb?$y(this,a,b?4:0):this.Wc(a,b?2:0)};l.Wc=function(a,b){var c=65535,d=this.Tb(a,!1,2);-1!==d&&(c=Hg(this.H,d,2,a.type==hz)|0,b&&iz(this,a,b));return c};function $y(a,b,c){var d=-1,e=a.Tb(b,!1,4);-1!==e&&(d=Hg(a.H,e,4,b.type==hz)|0,c&&iz(a,b,c));return d}l.Pb=function(a,b,c,d){var e=this.Tb(a,!0,1);if(-1!==e){if(a.type!=hz)this.H.Pb(e,b);else{var f=this.ma;f.aa[(e&f.C)>>>f.A].df(e&f.D,b&255,e)}c&&iz(this,a,c);d||Id(this.H,!0)}};
l.nl=function(a,b,c){var d=this.Tb(a,!0,2);-1!==d&&(a.type!=hz?this.H.hb(d,b):Qc(this.ma,d,b),c&&iz(this,a,c),Id(this.H,!0))};function Gy(a,b,c,d,e,f,g){return jz(a,{},b,c,d,e,f,g)}function jz(a,b,c,d,e,f,g,h){b.Ha=c||0;b.U=d;b.ya=e;b.type=f||(fz(a)?Qy:gz);b.Hb=null!=g?g:!(!a.H||4!=a.H.Z.V);b.ec=null!=h?h:!(!a.H||4!=a.H.Z.Lc);b.xd=!1;return b}function kz(a){return[a.Ha,a.U,a.ya,a.xd,a.Hb,a.ec,a.Ke,a.fh]}function lz(a){return{Ha:a[0],U:a[1],ya:a[2],xd:a[3],Hb:a[4],ec:a[5],Ke:a[6],fh:a[7]}}
function mz(a,b,c){if(null!=b.U&&(a=Py(a,b.U,b.type))){var d=b.Ha&a.wa;if(!a.fd){if(d>>>0>=a.Ob)return!1}else if(d>>>0<a.Ob)return!1;c&&(b.Ha=d,b.Hb=4==a.V,b.ec=4==a.Lc)}return!0}
function nz(a,b,c,d){var e,f=c?a.N:a.Aa;c=d?oz:f.type;var g=f.Ha,h=f.U,f=f.ya;if(void 0!==b){b=Dy(a,b);e=b.charAt(0);f=b.indexOf(":");switch(e){case "&":c=gz;break;case "#":c=Qy;break;case "%":c=pz;e=b.charAt(1);"%"==e&&(c=hz,e+=e);g=0;h=null;break;default:0<=f&&(c=oz),e=""}e&&(b=b.substr(e.length),f-=e.length);e=b;var k;if(e.match(/^[a-z_][a-z0-9_]*$/i))for(var m=e.toUpperCase(),p=0;p<a.F.length;p++){e=a.F[p];var v=e.Hd[m];if(void 0!==v){m=v.o;void 0!==m&&(k=v.s,void 0===k&&(k=e.U),k=Gy(a,m,k,v.p));
break}}if(e=k)return e;0>f?null!=h?(g=By(a,b,void 0),f=null):(f=By(a,b,void 0),null==f&&(g=null)):(h=By(a,b.substring(0,f),void 0),g=By(a,b.substring(f+1),void 0),f=null)}null!=g&&(e=Gy(a,g,h,f,c),d||mz(a,e,!0)||(a.P("invalid offset: "+dz(e)),e=null));return e}function qz(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.xl=a.Eg(b.dl=c[2]))}l.Vk=function(a,b){var c=nz(this,b);return a.replace("["+b+"]",c?q(this.mb(c),c.Hb?8:4):"undefined")};
function iz(a,b,c){c=c||1;null!=b.ya&&(b.ya+=c);null!=b.U&&(b.Ha+=c,mz(a,b)||(b.Ha=0,b.ya=null))}function Ty(a,b,c){return null!=b?q(b,4)+":"+q(a,a&-65536||c?8:4):q(a)}function dz(a){var b;switch(a.type){case gz:case rz:b="&";break;case Qy:b="#";break;case pz:b="%";break;case hz:b="%%";break;default:b=a.U?"":"%"}return a.type>=pz||null==a.U?b+q(a.ya):b+Ty(a.Ha,a.U,a.ec)}
function Uy(a,b,c){var d="";for(c=c||256;d.length<c;){var e=a.Ja(b,1);if(!e||36==e||127<=e)break;d+=32<=e?String.fromCharCode(e):"."}return d}
function Oy(a,b,c,d){var e=0,f=0,g=b.length;if(c){e=a.Tb(nz(a,c));if(-1===e){a.P("invalid address: "+c);return}f=e>>>a.H.kb;g=1}a.P("blockid "+(d?"linear ":"physical")+" blockaddr used size type");a.P("-------- --------- ---------- ------ ------ ----");c=-1;for(var h=0;g--;)(d=b[f])&&d.type==hd&&(d=zd(a.H,e,!1,!0)),d.type==c?h++||a.P("..."):(c=d.type,h=Ac[c],c==jd&&(d=d.ud,h+=" -> "+Ac[d.type]),d&&a.P(q(d.id,8)+" %"+q(f<<a.H.kb,8)+" %%"+q(d.ya,8)+" "+ua(d.Be)+" "+ua(d.size)+
" "+h),c!=gd&&c!=hd&&(c=-1),h=0),e+=a.H.Pg,f++}function sz(a,b,c){a=q(a)+" "+q(b)+" ";a=a+(c&&b&64?"D":"-")+(b&32?"A":"-")+(b&4?"U":"S");a+=b&2?"W":"R";return a+=b&1?"P":"N"}function Yy(a,b,c){var d=[],e;for(e=null;e=bc(a.pa,"Disk",e);){var f=e,g=b,h=c,d={};if(f.C)for(var k=0;k<f.C.length;k++){var m=f.C[k];if(m.Sf==g&&(m=m.rd[h])){for(var p in m.he)f=m.he[p],d[f[1]]=f[0];break}}if(d.length)break}return d}
function Jy(a,b){a.ca=a;a.ic=a.Bl=1073741824;a.za=null;b=a.Eg(b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in Xb)0<=Ka(b,c)&&(a.ic|=Xb[c],a.P(c+" messages enabled"));Iy(a)}function Jl(a,b,c){for(var d in Xb)if(b==Xb[d]){a.Da[d]=c;break}}l.jh=function(a,b){var c;a=a.toUpperCase();null==b?c=Ka(tz,a):(c=Ka(tz,a.substr(b,3)),0>c&&(c=Ka(tz,a.substr(b,2))));return c};
function uz(a,b){var c=0,d=a.kh(b);if(null!=d)switch(b){case vz:case wz:case xz:case yz:case zz:case Az:case Bz:case Cz:c=2;break;case Dz:case Ez:case Fz:case Gz:case Hz:case Iz:case Jz:case Kz:case Lz:case Mz+Nz:case Mz+Oz:case Mz+Pz:case Mz+Qz:case Mz+Rz:case Mz+Sz:c=4;break;case Tz:case Uz:case Vz:case Wz:case Xz:case Yz:case Zz:case $z:case aA:case bA:case cA:case dA:case eA:c=8;break;case fA:c=a.sa}return c?q(d,c):"??"}
l.kh=function(a){var b;if(0<=a){var c=this.H;switch(a){case vz:b=c.D&255;break;case wz:b=c.I&255;break;case xz:b=c.L&255;break;case yz:b=c.G&255;break;case zz:b=c.D>>8&255;break;case Az:b=c.I>>8&255;break;case Bz:b=c.L>>8&255;break;case Cz:b=c.G>>8&255;break;case Dz:b=c.D&65535;break;case Ez:b=c.I&65535;break;case Fz:b=c.L&65535;break;case Gz:b=c.G&65535;break;case Hz:b=y(c)&65535;break;case Iz:b=c.M&65535;break;case Jz:b=c.K&65535;break;case Kz:b=c.J&65535;break;case Lz:b=z(c)&65535;break;case fA:b=
Ee(c);break;case Mz+Nz:b=c.oa.U;break;case Mz+Oz:b=c.Z.U;break;case Mz+Pz:b=c.Y.U;break;case Mz+Qz:b=c.Da.U;break;default:if(80286==this.H.da)a==aA&&(b=c.qa);else if(80386<=this.H.da)switch(a){case Tz:b=c.D;break;case Uz:b=c.I;break;case Vz:b=c.L;break;case Wz:b=c.G;break;case Xz:b=y(c);break;case Yz:b=c.M;break;case Zz:b=c.K;break;case $z:b=c.J;break;case aA:b=c.qa;break;case bA:b=c.Qg;break;case cA:b=c.qd;break;case dA:b=c.Uc;break;case Mz+Rz:b=c.Ga.U;break;case Mz+Sz:b=c.Ia.U;break;case eA:b=z(c)}}}return b};
function gA(a,b){b=Dy(a,b)||b;for(var c=0,d,e;0<=(c=b.indexOf("@",c));)e=a.jh(b,c+1),0<=e&&(b=b.substr(0,c)+uz(a,e)+b.substr(c+1+tz[e].length)),c++;for(c=0;0<=(c=b.indexOf("#",c));)e=b.substr(c+1,2),d=oa(e,16),null!=d&&32<=d&&128>d?(d=e+" '"+String.fromCharCode(d)+"'",b=b.replace("#"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("$",c));)e=b.substr(c+1,9),(d=nz(a,e))?(d=e+' "'+Uy(a,d)+'"',b=b.replace("$"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("^",c));)e=b.substr(c+1,9),(d=nz(a,e))?(iz(a,d),
d=e+' "'+Uy(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+dz(Gy(this,z(this.H),this.H.Z.U))+" (%"+q(this.H.ea)+")");this.za&&a==this.za||(this.za=a,this.ic&-2147483648&&(this.Kb(),a+=" (cpu halted)"),this.P(a),this.H&&(a=this.H,Ud(a),a.T.ue=0,Id(a)))};
function el(a,b,c,d){var e,f;if(!d&&(d=r(a,1)&&0>hA.indexOf(b),!d)){var g=iA[b];g&&(d=r(a,g)?!0:524288==g&&r(a,g=1048576))}d&&(e=a.H.D>>8&255,f=a.H.L&255,33==b&&11==e||524288==g&&128<=f||1048576==g&&128>f)&&(d=!1);d&&((g=(g=Wb[b])&&g[e]||"")&&(g=" "+gA(a,g)),a.message("INT "+ta(b)+": AH="+ta(e)+" at "+Ty(c-2-a.H.Z.ta,a.H.Z.U)+g));return d}
function Sb(a,b,c,d,e,f,g,h){h|=256;if(null==e||(a.ic&h)==h)h=null,null!=e&&(h=a.H.Z.U,e-=a.H.Z.ta),a.message(b.Ce+"."+(null!=d?"outPort":"inPort")+"("+ua(c)+","+(f?f:"unknown")+(null!=d?","+ta(d):"")+")"+(null!=g?": "+ta(g):"")+(null!=e?" at "+Ty(e,h):""))}l.lh=function(){this.P("Type ? for help with PCx86 Debugger commands");jA(this);if(this.Ia){var a=this.Ia;this.Ia=null;Ky(this,a)}};
function Iy(a,b){var c;if(Sg(a)){if(!a.Y||!a.Y.length){a.Y=Array(kA);for(c=0;c<a.Y.length;c++)a.Y[c]=Gy(a);a.oa=0;b||a.P("instruction history buffer allocated")}if(!a.M||!a.M.length)for(a.M=Array(256),c=0;c<a.M.length;c++)a.M[c]=[c,0]}else a.Y&&a.Y.length&&!b&&a.P("instruction history buffer freed"),a.oa=0,a.Y=[],a.M=[]}function lA(a,b){if(!mA(a))return!1;a.H.Vf(b);return!0}
function ez(a,b,c,d){if(!mA(a))return!1;a.O=0;do{b||Sg(a)&&Vg(a,a.H.ea,0);try{var e=a.H.Ng(b);0<e&&(a.O+=e,Pd(a.H,e,!0),Jd(a.H,e),a.aa++)}catch(g){if("number"!=typeof g){var f=g;a.O=0;Mb(a.H,f.stack||f.message)}}}while(a.H.N&3312);!1!==d&&Id(a.H);jA(a,c||!1);return 0<a.O}l.Kb=function(a){this.H&&this.H.Kb(a)};function jA(a,b){void 0===b&&(b=!0);a.N=Gy(a,z(a.H),a.H.Z.U);b&&1!=a.K?nA(a):oA(a)}
function mA(a){var b;if(b=a.H&&Nb(a.H))b=a.H,b.ba.Zb?b=!0:(b.P(b.toString()+" not powered"),b=!1);b&&!Pb(a.H)?(a=a.H,a.ba.error?(a.P(a.toString()+" error"),a=!0):a=!1,a=!a):a=!1;return a}l.Yb=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};l.Xb=function(a,b){b&&this.P(a?"suspending":"shutting down");return a?this.save():!0};l.reset=function(a){Iy(this);this.aa=this.ka=0;this.za=null;this.O=0;this.N=Gy(this,z(this.H),this.H.Z.U);this.ba.ab=!1;pA(this);a||jA(this)};
l.save=function(){var a=new fg(this);a.set(0,kz(this.N));a.set(1,kz(this.Aa));a.set(2,kz(this.ea));a.set(3,[this.C,this.ga,this.ic]);a.set(4,this.F);a.set(5,[this.B,this.W,this.L]);return a.data()};
l.restore=function(a){var b=0;a[b]&&(this.N=lz(a[b++]));a[5]&&(this.Aa=lz(a[b++]));a[b]&&(this.ea=lz(a[b++]));a[b]&&(this.C=a[b][0],"string"==typeof this.C&&(this.C=[this.C]),this.ga=a[b][1],this.ic|=a[b][2],b++);a[b]&&(this.F=a[b++]);a[b]&&(qA(this,this.B,a[b][0]),qA(this,this.W,a[b][1]),qA(this,this.L,a[b][2]));return!0};l.start=function(a,b){this.K||this.P("running");this.ba.ab=!0;this.kb=a;this.jd=b};
l.stop=function(a,b){if(this.ba.ab){this.ba.ab=!1;this.O=b-this.jd;if(!this.K){b="stopped";if(this.O){a-=this.kb;var c=0<a?Math.round(1E3*this.O/a):0;b+=" (";Sg(this)&&(b+=this.aa+" opcodes, ",this.ka-=this.aa,this.aa=0);b+=this.O+" cycles, "+a+" ms, "+c+" hz)"}else r(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.P(b)}jA(this,!0);this.nd();pA(this,this.H.ea)}};function Sg(a){return 1<a.B.length||!!a.xa||r(a,16)}
function Vg(a,b,c){var d=a.H;if(0<c&&(a.xa&&!--a.xa||rA(a,b,1,a.B)))return!0;0<=c&&a.M.length&&(a.aa++,b=Hg(d,b),null!=b&&(a.M[b][1]++,b=a.Y[a.oa],jz(a,b,z(d),d.Z.U),b.mj=Kd(d),++a.oa==a.Y.length&&(a.oa=0)));return!1}function wd(a,b,c){return rA(a,b,c||1,a.W)?(a.Kb(!0),!0):!1}function yd(a,b,c){return rA(a,b,c||1,a.L)?(a.Kb(!0),!0):!1}function Vc(a,b,c){a.P("break on input from port "+ua(b)+": "+q(c));a.Kb(!0)}function Zc(a,b,c){a.P("break on output to port "+ua(b)+": "+q(c));a.Kb(!0)}
function Hy(a){var b,c;a.B=["bp"];if(a.W)for(b=1;b<a.W.length;b++)c=a.W[b],zf(a.H,a.Tb(c),!1,c.type==hz);a.W=["br"];if(a.L)for(b=1;b<a.L.length;b++)c=a.L[b],zf(a.H,a.Tb(c),!0,c.type==hz);a.L=["bw"];a.Ga=0}
l.sd=function(a,b,c,d){var e=!0;c||cz(this,a,b,!1,!0);if(a!=this.B){var f=this.Tb(b);if(-1===f)this.P("invalid address: "+dz(b)),e=!1;else{var g=this.H,h=b.type==hz;(h?g.sc:g.aa)[f>>>g.kb].sd(f&g.Cb,a==this.L);h&&zc(g)}}e&&(a.push(b),c?(null!=b.ya&&(b.U=null),b.xd=!0):(d||sA(this,a,a.length-1,"set"),Iy(this)));return e};
function cz(a,b,c,d,e){for(var f=!1,g=tA(a,a.Tb(c)),h=1;h<b.length;h++){var k=b[h];if(-1!==g&&g==tA(a,a.Tb(k))||-1===g&&c.U==k.U&&c.Ha==k.Ha)if(!d||k.xd){f=!0;k.xd||e||sA(a,b,h,"cleared");b.splice(h,1);b!=a.B&&zf(a.H,g,b==a.L,k.type==hz);k.xd||Iy(a);break}}return f}function uA(a,b){for(var c=1;c<b.length;c++)sA(a,b,c);return b.length-1}function sA(a,b,c,d){c=b[c];a.P(b[0]+" "+dz(c)+(d?" "+d:c.dl?' "'+c.dl+'"':""))}
function qA(a,b,c){if(c[0]==b[0])for(var d=1;d<c.length;d++){var e=c[d];a.sd(b,e,e.xd,!0)}}function pA(a,b){if(void 0!==b)rA(a,b,1,a.B,!0),a.K=0;else for(b=1;b<a.B.length;b++){var c=a.B[b];if(c.xd){if(!cz(a,a.B,c,!0))break;b=0}}}function tA(a,b){-1!==b&&(a=a.wa&-65536,(b&a)==a&&(b&=1048575));return b}
function rA(a,b,c,d,e){var f=!1;if(!a.Ga++){b=tA(a,b);r(a,-2147483632)&&204==Hg(a.H,b)&&(f=!0);for(var g=1;!f&&g<d.length;g++){var h=d[g];if(!e||h.xd){null!=h.U&&(h.ya=null);for(var k=tA(a,a.Tb(h)),m=0;m<c;m++)if(b+m==k){var p,f=!0;h.xd&&(cz(a,d,h,!0),e=!0);if(p=h.xl){for(var f=!1,v=0;v<p.length;v++)if(!vA(a,p[v],!0)){if(p[v].indexOf("if")){f=!0;break}for(var u=v+1;u<p.length&&p[u].indexOf("else");u++)v++;if(u==p.length){f=!0;break}}a.H.ba.ab||(f=!0)}if(f){e||sA(a,d,g,"hit");break}}}}}a.Ga--;return f}
function wA(a,b,c,d){for(var e=Gy(a,b.Ha,b.U,b.ya,b.type),f=a.Ja(b,1),g=4,h=0,k=!1,m=!1;(102==f||103==f)&&g--;)102==f?k||(b.Hb=!b.Hb,k=!0):m||(b.ec=!b.ec,m=!0),h++,f=a.Ja(b,1);var g=-1,p=xA,k=a.qa[f],m=k[0];m==yA&&(m=a.Ja(b,1),k=zA[m]||My,f|=m<<8,m=k[0]);if(m==AA){var g=a.Ja(b,1),v;v=null;var u=g>>3&7,F=(3>(g>>6&3)?0:48)+u;(217==f||219==f)&&52<=F&&(F=u<<4|g&7);(u=BA[f])&&(v=u[F]);v&&(p=CA,k=v,m=k[0])}m>=p.length&&(g=a.Ja(b,1),k=DA[m-p.length][g>>3&7],m=k[0]);p=p[m];u=k.length-1;v="";b.Hb&&(m==EA?
p="CWDE":m==FA?p="CDQ":m>=GA&&m<=HA&&(p+="D"));if(164<=f&&167>=f||170<=f&&175>=f)u=0,b.Hb&&"W"==p.slice(-1)&&(p=p.slice(0,-1)+"D");for(var f=-1,F=!0,J=1;J<=u;J++){var H,I;H="";I=k[J];if(void 0!==I){0>f&&(f=I>>IA);m==JA&&(f==KA?v="[%800]":f==LA&&(v="ES:["+(b.ec?"E":"")+"DI]"));var P=I&MA;if(P!=NA)if(P==OA)F=!1;else{var L=I&PA;if(L>=R)if(0>g&&(g=a.Ja(b,1)),L<QA){L=a;H=I;var ka=u;I=b;var Z="",jb=g>>6,qa=g&7;if(3>jb){P=!p.indexOf("FI");if(!jb&&(!I.ec&&6==qa||I.ec&&5==qa))jb=2;else{if(I.ec)if(4!=qa)qa+=
8;else{var Z=L,db=jb,Oa=I,kb=Z.Ja(Oa,1),eb=kb>>6,sc=kb>>3&7,kb=kb&7,lb="";if(db||5!=kb)lb=RA[kb+8];4!=sc&&(lb&&(lb+="+"),lb+=RA[sc+8],eb&&(lb+="*"+(1<<eb)));db||5!=kb||(lb&&(lb+="+"),lb+=q($y(Z,Oa,4)));Z=lb}Z||(Z=RA[qa])}1==jb?(L=L.Ja(I,1),Z=L&128?Z+("-"+q(-(L<<24>>24),2)):Z+("+"+q(L,2))):2==jb&&(Z&&(Z+="+"),I.ec?(L=$y(L,I,4),Z+=q(L)):(L=L.Wc(I,2),Z+=q(L,4)));Z="["+Z+"]";if(1==ka){L="";H&=MA;H==S&&(H=I.Hb?SA:T);switch(H){case TA:L="FAR";break;case U:L="BYTE";break;case T:if(P){L="INT16";break}L="WORD";
break;case SA:L="DWORD";break;case UA:if(P){L="INT32";break}case VA:L="REAL32";break;case WA:if(P){L="INT64";break}case XA:L="REAL64";break;case YA:L="REAL80";break;case ZA:L="BCD80"}L&&(Z=L+" "+Z)}}else Z=$A(L,qa,H,I);H=Z}else H=L==QA?$A(a,g&7,I,b):$A(a,g>>3&7,I,b);else if(L==aB)H="1";else if(L==V){H=a;P=I;L=b;I=" ";switch(P&MA){case U:P&W&&(I=q(H.Ja(L,1),2));break;case bB:I=q(H.Ja(L,1)<<24>>24,L.Hb?8:4);break;case S:if(L.Hb){I=q($y(H,L,4));break}case T:I=q(H.Wc(L,2),4);break;case TA:L=Gy(H,H.mb(L,
!0),H.Wc(L,2),null,L.type,L.Hb,L.ec);I=dz(L);H=cB(H,L);H[0]&&(I+=" ("+H[0]+")");break;default:I="imm("+ua(P)+")"}H=I}else L==dB?(b.ec?(H=8,I=$y(a,b,4)):(H=4,I=a.Wc(b,2)),H="["+q(I,H)+"]"):L==eB?(H=P==U?a.Ja(b,1)<<24>>24:a.mb(b,!0),I=b.Ha+H&(b.Hb?-1:65535),H=q(I,b.Hb?8:4),I=cB(a,Gy(a,I,b.U)),I[0]&&(H+=" ("+I[0]+")")):L==X?H=P==fB?"ST":P==gB?"ST("+(g&7)+")":$A(a,(I&hB)>>8,I,b):L==iB?H=$A(a,(I&hB)>>8,jB,b):L==kB?H="DS:[SI]":L==lB&&(H="ES:[DI]");if(!H||!H.length){v="INVALID";break}0<v.length&&(v+=",");
v+=H||"???"}}}g="";k=dz(e)+" ";if(-1!==e.ya&&-1!==b.ya){do if(g+=q(a.Ja(e,1),2),null==e.ya)break;while(e.ya!=b.ya)}k+=Aa(g,e.ec?24:16);k+=Aa(p,8);v&&(k+=" "+v);a.H.da<mB[f]&&(c=mB[f]+" CPU only");c&&F&&(k=Aa(k,e.ec?74:56)+";"+c,k=a.H.ba.Me?k+("cycles="+Kd(a.H).toString()+" cs="+q(a.H.T.vf)):k+(null!=d?"="+d.toString():""));nB(b,F,h);return k}
function $A(a,b,c,d){var e=c&PA;if(e==jB){if(b>Sz||b>=Rz&&80386>a.H.da)return"??";b+=Mz}else if(e==oB)b+=aA;else if(e==pB)b+=qB;else if(e==rB)b+=sB;else if(a=c&MA,a>=T&&(b<Dz&&(b+=Dz-vz),a==SA||a==S&&d.Hb))b+=Tz-Dz;return tz[b]}
function tB(a,b){switch(b){case "V":a=rg(a.H);break;case "D":a=a.H.O&1024;break;case "I":a=a.H.O&512;break;case "T":a=a.H.O&256;break;case "S":a=qg(a.H);break;case "Z":a=pg(a.H);break;case "A":a=og(a.H);break;case "P":a=ng(a.H);break;case "C":a=mg(a.H);break;default:a=0}return b+(a?"1":"0")+" "}function Sy(a){return q(a,a&-65536?8:4)}function uB(a,b){b>=Dz&&b<=Kz&&4<a.sa&&(b+=Tz-Dz);var c=tz[b];b==aA&&80286==a.H.da&&(c="MS");return c+"="+uz(a,b)+" "}
function vB(a,b,c){return b.ac+"="+q(b.U,4)+(c?"["+q(b.ta,a.la)+","+Sy(b.Pa)+"]":"")}function wB(a,b,c,d,e){return b+"="+(null!=c?q(c,4):"")+"["+q(d,a.la)+","+q(e-d,4)+"]"}
function xB(a,b){var c;void 0===b&&(b=fz(a));c=uB(a,Dz)+uB(a,Gz)+uB(a,Ez)+uB(a,Fz)+(4<a.sa?"\n":"")+uB(a,Hz)+uB(a,Iz)+uB(a,Jz)+uB(a,Kz)+"\n"+vB(a,a.H.Y,b)+" "+vB(a,a.H.Da,b)+" "+vB(a,a.H.oa,b)+" ";if(b){var d="TR="+q(a.H.ka.U,4),e=a.ma,e="A20="+(e.J||e.N!=e.C?"OFF ":"ON ");80386>a.H.da&&(d="\n"+d,c+=e,e="");c+="\n"+vB(a,a.H.Z,b)+" ";80386<=a.H.da&&(e+="\n",c+=vB(a,a.H.Ga,b)+" "+vB(a,a.H.Ia,b)+"\n");c+=wB(a,"LD",a.H.Db.U,a.H.Db.ta,a.H.Db.ta+a.H.Db.Pa)+" "+wB(a,"GD",null,a.H.Ib,a.H.Hc)+" "+wB(a,"ID",
null,a.H.Nb,a.H.ad)+" ";c=c+(d+" "+e)+uB(a,aA);80386<=a.H.da&&(c+=uB(a,cA)+uB(a,dA))}else 80386<=a.H.da&&(c+=vB(a,a.H.Ga,b)+" "+vB(a,a.H.Ia,b)+" ");return c+=uB(a,fA)+tB(a,"V")+tB(a,"D")+tB(a,"I")+tB(a,"T")+tB(a,"S")+tB(a,"Z")+tB(a,"A")+tB(a,"P")+tB(a,"C")}l.kj=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
(b.J=a[0],we(b,a[1]));break;case 72:dz(this,null,e);break;case 80:32==c?Zy(this,Iy(this,h,k),0,f,!0,!!this.Z):128>c?Zy(this,Iy(this,h,k),e+1,c&64?g:f,!(c&1),!!this.Z):az(this,Iy(this,h,k),!(c&1),!!this.Z),this.Z&&(b.D=b.D&-256|1)}return!this.Z};l.Dl=function(){var a=this.H;5==(a.D&255)&&(a.I=a.K=0,a.D=a.D&-256|1);return!1};
l.Bb=function(a,b,c){var d=this;switch(b){case "debugInput":return this.va=this.na[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",My(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.A<d.C.length-1&&(b=d.C[++d.A])):40==a.keyCode&&(0<d.A?b=d.C[--d.A]:(b="",d.A=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.na[b]=c,ab(c,function(){if(d.va){var a=d.va.value;
d.va.value="";My(d,a,!0);return!0}return!1}),!0;case "step":return this.na[b]=c,ab(c,function(a){var b=!1;Pb(d,!0)||(Qb(d,!0),b=gz(d,a?1:0),Qb(d,!1));return b}),!0}return!1};l.nd=function(){this.va&&this.va.focus()};function hz(a){return!(!(a.H&&a.H.qa&1)||a.H.O&131072)}
function Ry(a,b,c){var d=hz(a)?Sy:iz;c||(c=d);if(c==d){if(b===a.H.Z.U)return a.H.Z;if(b===a.H.Da.U)return a.H.Da;if(b===a.H.oa.U)return a.H.oa;if(b===a.H.Y.U)return a.H.Y;if(80386<=a.H.da){if(b===a.H.Ga.U)return a.H.Ga;if(b===a.H.Ia.U)return a.H.Ia}if(a.Ga&&c==Sy||!a.Za)return null}a=a.Za;if(c!=Sy)a.ph(b),a.Pa=65535,a.Ob=65536;else{var e;c=a.gc;b&=65535;b&4?(d=c.Db.ta,e=d+c.Db.Pa|0):(d=c.Ib,e=c.Hc);d=d+(b&65528)|0;if(e-d|0){e=Hg(c,d+0,2);var f=Hg(c,d+4,2),g=f&7936,h=Hg(c,d+2,2)|(f&255)<<16,k=Hg(c,
d+6,2);80386<=c.da&&(h|=(k&65280)<<16,e|=(k&15)<<16,k&128&&(e=e<<12|4095));a.U=b;a.ta=h;a.Pa=e;a.Ob=(e>>>0)+1;a.nb=f;a.type=g;a.ext=k;a.Lb=d;de(a,!0,!0,!1)}}return a}l.Tb=function(a,b,c){var d=a&&a.ya;if(null==d&&(d=-1,a)){var e=Ry(this,a.U,a.type);e&&(b=a.Ha||0,c=c||1,d=e=-1===e.Lb||e.fd&&(b>>>0)+c>e.Ob||!e.fd&&(b>>>0)+c<=e.Ob?e.ta+b|0:-1,a.ya=d)}return d};l.Ja=function(a,b){var c=255,d=this.Tb(a,!1,1);-1!==d&&(c=Hg(this.H,d,1,a.type==jz)|0,b&&kz(this,a,b));return c};
l.mb=function(a,b){return a.Hb?bz(this,a,b?4:0):this.Wc(a,b?2:0)};l.Wc=function(a,b){var c=65535,d=this.Tb(a,!1,2);-1!==d&&(c=Hg(this.H,d,2,a.type==jz)|0,b&&kz(this,a,b));return c};function bz(a,b,c){var d=-1,e=a.Tb(b,!1,4);-1!==e&&(d=Hg(a.H,e,4,b.type==jz)|0,c&&kz(a,b,c));return d}l.Pb=function(a,b,c,d){var e=this.Tb(a,!0,1);if(-1!==e){if(a.type!=jz)this.H.Pb(e,b);else{var f=this.ma;f.aa[(e&f.C)>>>f.A].df(e&f.D,b&255,e)}c&&kz(this,a,c);d||Id(this.H,!0)}};
l.nl=function(a,b,c){var d=this.Tb(a,!0,2);-1!==d&&(a.type!=jz?this.H.hb(d,b):Qc(this.ma,d,b),c&&kz(this,a,c),Id(this.H,!0))};function Iy(a,b,c,d,e,f,g){return lz(a,{},b,c,d,e,f,g)}function lz(a,b,c,d,e,f,g,h){b.Ha=c||0;b.U=d;b.ya=e;b.type=f||(hz(a)?Sy:iz);b.Hb=null!=g?g:!(!a.H||4!=a.H.Z.V);b.ec=null!=h?h:!(!a.H||4!=a.H.Z.Lc);b.xd=!1;return b}function mz(a){return[a.Ha,a.U,a.ya,a.xd,a.Hb,a.ec,a.Ke,a.fh]}function nz(a){return{Ha:a[0],U:a[1],ya:a[2],xd:a[3],Hb:a[4],ec:a[5],Ke:a[6],fh:a[7]}}
function oz(a,b,c){if(null!=b.U&&(a=Ry(a,b.U,b.type))){var d=b.Ha&a.wa;if(!a.fd){if(d>>>0>=a.Ob)return!1}else if(d>>>0<a.Ob)return!1;c&&(b.Ha=d,b.Hb=4==a.V,b.ec=4==a.Lc)}return!0}
function pz(a,b,c,d){var e,f=c?a.N:a.Aa;c=d?qz:f.type;var g=f.Ha,h=f.U,f=f.ya;if(void 0!==b){b=Fy(a,b);e=b.charAt(0);f=b.indexOf(":");switch(e){case "&":c=iz;break;case "#":c=Sy;break;case "%":c=rz;e=b.charAt(1);"%"==e&&(c=jz,e+=e);g=0;h=null;break;default:0<=f&&(c=qz),e=""}e&&(b=b.substr(e.length),f-=e.length);e=b;var k;if(e.match(/^[a-z_][a-z0-9_]*$/i))for(var m=e.toUpperCase(),p=0;p<a.F.length;p++){e=a.F[p];var v=e.Hd[m];if(void 0!==v){m=v.o;void 0!==m&&(k=v.s,void 0===k&&(k=e.U),k=Iy(a,m,k,v.p));
break}}if(e=k)return e;0>f?null!=h?(g=Dy(a,b,void 0),f=null):(f=Dy(a,b,void 0),null==f&&(g=null)):(h=Dy(a,b.substring(0,f),void 0),g=Dy(a,b.substring(f+1),void 0),f=null)}null!=g&&(e=Iy(a,g,h,f,c),d||oz(a,e,!0)||(a.P("invalid offset: "+fz(e)),e=null));return e}function sz(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.xl=a.Eg(b.dl=c[2]))}l.Vk=function(a,b){var c=pz(this,b);return a.replace("["+b+"]",c?q(this.mb(c),c.Hb?8:4):"undefined")};
function kz(a,b,c){c=c||1;null!=b.ya&&(b.ya+=c);null!=b.U&&(b.Ha+=c,oz(a,b)||(b.Ha=0,b.ya=null))}function Vy(a,b,c){return null!=b?q(b,4)+":"+q(a,a&-65536||c?8:4):q(a)}function fz(a){var b;switch(a.type){case iz:case tz:b="&";break;case Sy:b="#";break;case rz:b="%";break;case jz:b="%%";break;default:b=a.U?"":"%"}return a.type>=rz||null==a.U?b+q(a.ya):b+Vy(a.Ha,a.U,a.ec)}
function Wy(a,b,c){var d="";for(c=c||256;d.length<c;){var e=a.Ja(b,1);if(!e||36==e||127<=e)break;d+=32<=e?String.fromCharCode(e):"."}return d}
function Qy(a,b,c,d){var e=0,f=0,g=b.length;if(c){e=a.Tb(pz(a,c));if(-1===e){a.P("invalid address: "+c);return}f=e>>>a.H.kb;g=1}a.P("blockid "+(d?"linear ":"physical")+" blockaddr used size type");a.P("-------- --------- ---------- ------ ------ ----");c=-1;for(var h=0;g--;)(d=b[f])&&d.type==hd&&(d=zd(a.H,e,!1,!0)),d.type==c?h++||a.P("..."):(c=d.type,h=Ac[c],c==jd&&(d=d.ud,h+=" -> "+Ac[d.type]),d&&a.P(q(d.id,8)+" %"+q(f<<a.H.kb,8)+" %%"+q(d.ya,8)+" "+ua(d.Be)+" "+ua(d.size)+
" "+h),c!=gd&&c!=hd&&(c=-1),h=0),e+=a.H.Pg,f++}function uz(a,b,c){a=q(a)+" "+q(b)+" ";a=a+(c&&b&64?"D":"-")+(b&32?"A":"-")+(b&4?"U":"S");a+=b&2?"W":"R";return a+=b&1?"P":"N"}function $y(a,b,c){var d=[],e;for(e=null;e=bc(a.pa,"Disk",e);){var f=e,g=b,h=c,d={};if(f.C)for(var k=0;k<f.C.length;k++){var m=f.C[k];if(m.Sf==g&&(m=m.rd[h])){for(var p in m.he)f=m.he[p],d[f[1]]=f[0];break}}if(d.length)break}return d}
function Ly(a,b){a.ca=a;a.ic=a.Bl=1073741824;a.za=null;b=a.Eg(b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in Xb)0<=Ka(b,c)&&(a.ic|=Xb[c],a.P(c+" messages enabled"));Ky(a)}function Jl(a,b,c){for(var d in Xb)if(b==Xb[d]){a.Da[d]=c;break}}l.jh=function(a,b){var c;a=a.toUpperCase();null==b?c=Ka(vz,a):(c=Ka(vz,a.substr(b,3)),0>c&&(c=Ka(vz,a.substr(b,2))));return c};
function wz(a,b){var c=0,d=a.kh(b);if(null!=d)switch(b){case xz:case yz:case zz:case Az:case Bz:case Cz:case Dz:case Ez:c=2;break;case Fz:case Gz:case Hz:case Iz:case Jz:case Kz:case Lz:case Mz:case Nz:case Oz+Pz:case Oz+Qz:case Oz+Rz:case Oz+Sz:case Oz+Tz:case Oz+Uz:c=4;break;case Vz:case Wz:case Xz:case Yz:case Zz:case $z:case aA:case bA:case cA:case dA:case eA:case fA:case gA:c=8;break;case hA:c=a.ra}return c?q(d,c):"??"}
l.kh=function(a){var b;if(0<=a){var c=this.H;switch(a){case xz:b=c.D&255;break;case yz:b=c.I&255;break;case zz:b=c.L&255;break;case Az:b=c.G&255;break;case Bz:b=c.D>>8&255;break;case Cz:b=c.I>>8&255;break;case Dz:b=c.L>>8&255;break;case Ez:b=c.G>>8&255;break;case Fz:b=c.D&65535;break;case Gz:b=c.I&65535;break;case Hz:b=c.L&65535;break;case Iz:b=c.G&65535;break;case Jz:b=y(c)&65535;break;case Kz:b=c.M&65535;break;case Lz:b=c.K&65535;break;case Mz:b=c.J&65535;break;case Nz:b=z(c)&65535;break;case hA:b=
Ee(c);break;case Oz+Pz:b=c.oa.U;break;case Oz+Qz:b=c.Z.U;break;case Oz+Rz:b=c.Y.U;break;case Oz+Sz:b=c.Da.U;break;default:if(80286==this.H.da)a==cA&&(b=c.qa);else if(80386<=this.H.da)switch(a){case Vz:b=c.D;break;case Wz:b=c.I;break;case Xz:b=c.L;break;case Yz:b=c.G;break;case Zz:b=y(c);break;case $z:b=c.M;break;case aA:b=c.K;break;case bA:b=c.J;break;case cA:b=c.qa;break;case dA:b=c.Qg;break;case eA:b=c.qd;break;case fA:b=c.Uc;break;case Oz+Tz:b=c.Ga.U;break;case Oz+Uz:b=c.Ia.U;break;case gA:b=z(c)}}}return b};
function iA(a,b){b=Fy(a,b)||b;for(var c=0,d,e;0<=(c=b.indexOf("@",c));)e=a.jh(b,c+1),0<=e&&(b=b.substr(0,c)+wz(a,e)+b.substr(c+1+vz[e].length)),c++;for(c=0;0<=(c=b.indexOf("#",c));)e=b.substr(c+1,2),d=oa(e,16),null!=d&&32<=d&&128>d?(d=e+" '"+String.fromCharCode(d)+"'",b=b.replace("#"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("$",c));)e=b.substr(c+1,9),(d=pz(a,e))?(d=e+' "'+Wy(a,d)+'"',b=b.replace("$"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("^",c));)e=b.substr(c+1,9),(d=pz(a,e))?(kz(a,d),
d=e+' "'+Wy(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+fz(Iy(this,z(this.H),this.H.Z.U))+" (%"+q(this.H.ea)+")");this.za&&a==this.za||(this.za=a,this.ic&-2147483648&&(this.Kb(),a+=" (cpu halted)"),this.P(a),this.H&&(a=this.H,Ud(a),a.T.ue=0,Id(a)))};
function el(a,b,c,d){var e,f;if(!d&&(d=r(a,1)&&0>jA.indexOf(b),!d)){var g=kA[b];g&&(d=r(a,g)?!0:524288==g&&r(a,g=1048576))}d&&(e=a.H.D>>8&255,f=a.H.L&255,33==b&&11==e||524288==g&&128<=f||1048576==g&&128>f)&&(d=!1);d&&((g=(g=Wb[b])&&g[e]||"")&&(g=" "+iA(a,g)),a.message("INT "+ta(b)+": AH="+ta(e)+" at "+Vy(c-2-a.H.Z.ta,a.H.Z.U)+g));return d}
function Sb(a,b,c,d,e,f,g,h){h|=256;if(null==e||(a.ic&h)==h)h=null,null!=e&&(h=a.H.Z.U,e-=a.H.Z.ta),a.message(b.Ce+"."+(null!=d?"outPort":"inPort")+"("+ua(c)+","+(f?f:"unknown")+(null!=d?","+ta(d):"")+")"+(null!=g?": "+ta(g):"")+(null!=e?" at "+Vy(e,h):""))}l.lh=function(){this.P("Type ? for help with PCx86 Debugger commands");lA(this);if(this.Ia){var a=this.Ia;this.Ia=null;My(this,a)}};
function Ky(a,b){var c;if(Sg(a)){if(!a.Y||!a.Y.length){a.Y=Array(mA);for(c=0;c<a.Y.length;c++)a.Y[c]=Iy(a);a.oa=0;b||a.P("instruction history buffer allocated")}if(!a.M||!a.M.length)for(a.M=Array(256),c=0;c<a.M.length;c++)a.M[c]=[c,0]}else a.Y&&a.Y.length&&!b&&a.P("instruction history buffer freed"),a.oa=0,a.Y=[],a.M=[]}function nA(a,b){if(!oA(a))return!1;a.H.Vf(b);return!0}
function gz(a,b,c,d){if(!oA(a))return!1;a.O=0;do{b||Sg(a)&&Vg(a,a.H.ea,0);try{var e=a.H.Ng(b);0<e&&(a.O+=e,Pd(a.H,e,!0),Jd(a.H,e),a.aa++)}catch(g){if("number"!=typeof g){var f=g;a.O=0;Mb(a.H,f.stack||f.message)}}}while(a.H.N&3312);!1!==d&&Id(a.H);lA(a,c||!1);return 0<a.O}l.Kb=function(a){this.H&&this.H.Kb(a)};function lA(a,b){void 0===b&&(b=!0);a.N=Iy(a,z(a.H),a.H.Z.U);b&&1!=a.K?pA(a):qA(a)}
function oA(a){var b;if(b=a.H&&Nb(a.H))b=a.H,b.ba.Zb?b=!0:(b.P(b.toString()+" not powered"),b=!1);b&&!Pb(a.H)?(a=a.H,a.ba.error?(a.P(a.toString()+" error"),a=!0):a=!1,a=!a):a=!1;return a}l.Yb=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};l.Xb=function(a,b){b&&this.P(a?"suspending":"shutting down");return a?this.save():!0};l.reset=function(a){Ky(this);this.aa=this.ka=0;this.za=null;this.O=0;this.N=Iy(this,z(this.H),this.H.Z.U);this.ba.ab=!1;rA(this);a||lA(this)};
l.save=function(){var a=new fg(this);a.set(0,mz(this.N));a.set(1,mz(this.Aa));a.set(2,mz(this.ea));a.set(3,[this.C,this.ga,this.ic]);a.set(4,this.F);a.set(5,[this.B,this.W,this.L]);return a.data()};
l.restore=function(a){var b=0;a[b]&&(this.N=nz(a[b++]));a[5]&&(this.Aa=nz(a[b++]));a[b]&&(this.ea=nz(a[b++]));a[b]&&(this.C=a[b][0],"string"==typeof this.C&&(this.C=[this.C]),this.ga=a[b][1],this.ic|=a[b][2],b++);a[b]&&(this.F=a[b++]);a[b]&&(sA(this,this.B,a[b][0]),sA(this,this.W,a[b][1]),sA(this,this.L,a[b][2]));return!0};l.start=function(a,b){this.K||this.P("running");this.ba.ab=!0;this.kb=a;this.jd=b};
l.stop=function(a,b){if(this.ba.ab){this.ba.ab=!1;this.O=b-this.jd;if(!this.K){b="stopped";if(this.O){a-=this.kb;var c=0<a?Math.round(1E3*this.O/a):0;b+=" (";Sg(this)&&(b+=this.aa+" opcodes, ",this.ka-=this.aa,this.aa=0);b+=this.O+" cycles, "+a+" ms, "+c+" hz)"}else r(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.P(b)}lA(this,!0);this.nd();rA(this,this.H.ea)}};function Sg(a){return 1<a.B.length||!!a.xa||r(a,16)}
function Vg(a,b,c){var d=a.H;if(0<c&&(a.xa&&!--a.xa||tA(a,b,1,a.B)))return!0;0<=c&&a.M.length&&(a.aa++,b=Hg(d,b),null!=b&&(a.M[b][1]++,b=a.Y[a.oa],lz(a,b,z(d),d.Z.U),b.mj=Kd(d),++a.oa==a.Y.length&&(a.oa=0)));return!1}function wd(a,b,c){return tA(a,b,c||1,a.W)?(a.Kb(!0),!0):!1}function yd(a,b,c){return tA(a,b,c||1,a.L)?(a.Kb(!0),!0):!1}function Vc(a,b,c){a.P("break on input from port "+ua(b)+": "+q(c));a.Kb(!0)}function Zc(a,b,c){a.P("break on output to port "+ua(b)+": "+q(c));a.Kb(!0)}
function Jy(a){var b,c;a.B=["bp"];if(a.W)for(b=1;b<a.W.length;b++)c=a.W[b],zf(a.H,a.Tb(c),!1,c.type==jz);a.W=["br"];if(a.L)for(b=1;b<a.L.length;b++)c=a.L[b],zf(a.H,a.Tb(c),!0,c.type==jz);a.L=["bw"];a.Ga=0}
l.sd=function(a,b,c,d){var e=!0;c||ez(this,a,b,!1,!0);if(a!=this.B){var f=this.Tb(b);if(-1===f)this.P("invalid address: "+fz(b)),e=!1;else{var g=this.H,h=b.type==jz;(h?g.sc:g.aa)[f>>>g.kb].sd(f&g.Cb,a==this.L);h&&zc(g)}}e&&(a.push(b),c?(null!=b.ya&&(b.U=null),b.xd=!0):(d||uA(this,a,a.length-1,"set"),Ky(this)));return e};
function ez(a,b,c,d,e){for(var f=!1,g=vA(a,a.Tb(c)),h=1;h<b.length;h++){var k=b[h];if(-1!==g&&g==vA(a,a.Tb(k))||-1===g&&c.U==k.U&&c.Ha==k.Ha)if(!d||k.xd){f=!0;k.xd||e||uA(a,b,h,"cleared");b.splice(h,1);b!=a.B&&zf(a.H,g,b==a.L,k.type==jz);k.xd||Ky(a);break}}return f}function wA(a,b){for(var c=1;c<b.length;c++)uA(a,b,c);return b.length-1}function uA(a,b,c,d){c=b[c];a.P(b[0]+" "+fz(c)+(d?" "+d:c.dl?' "'+c.dl+'"':""))}
function sA(a,b,c){if(c[0]==b[0])for(var d=1;d<c.length;d++){var e=c[d];a.sd(b,e,e.xd,!0)}}function rA(a,b){if(void 0!==b)tA(a,b,1,a.B,!0),a.K=0;else for(b=1;b<a.B.length;b++){var c=a.B[b];if(c.xd){if(!ez(a,a.B,c,!0))break;b=0}}}function vA(a,b){-1!==b&&(a=a.wa&-65536,(b&a)==a&&(b&=1048575));return b}
function tA(a,b,c,d,e){var f=!1;if(!a.Ga++){b=vA(a,b);r(a,-2147483632)&&204==Hg(a.H,b)&&(f=!0);for(var g=1;!f&&g<d.length;g++){var h=d[g];if(!e||h.xd){null!=h.U&&(h.ya=null);for(var k=vA(a,a.Tb(h)),m=0;m<c;m++)if(b+m==k){var p,f=!0;h.xd&&(ez(a,d,h,!0),e=!0);if(p=h.xl){for(var f=!1,v=0;v<p.length;v++)if(!xA(a,p[v],!0)){if(p[v].indexOf("if")){f=!0;break}for(var u=v+1;u<p.length&&p[u].indexOf("else");u++)v++;if(u==p.length){f=!0;break}}a.H.ba.ab||(f=!0)}if(f){e||uA(a,d,g,"hit");break}}}}}a.Ga--;return f}
function yA(a,b,c,d){for(var e=Iy(a,b.Ha,b.U,b.ya,b.type),f=a.Ja(b,1),g=4,h=0,k=!1,m=!1;(102==f||103==f)&&g--;)102==f?k||(b.Hb=!b.Hb,k=!0):m||(b.ec=!b.ec,m=!0),h++,f=a.Ja(b,1);var g=-1,p=zA,k=a.qa[f],m=k[0];m==AA&&(m=a.Ja(b,1),k=BA[m]||Oy,f|=m<<8,m=k[0]);if(m==CA){var g=a.Ja(b,1),v;v=null;var u=g>>3&7,F=(3>(g>>6&3)?0:48)+u;(217==f||219==f)&&52<=F&&(F=u<<4|g&7);(u=DA[f])&&(v=u[F]);v&&(p=EA,k=v,m=k[0])}m>=p.length&&(g=a.Ja(b,1),k=FA[m-p.length][g>>3&7],m=k[0]);p=p[m];u=k.length-1;v="";b.Hb&&(m==GA?
p="CWDE":m==HA?p="CDQ":m>=IA&&m<=JA&&(p+="D"));if(164<=f&&167>=f||170<=f&&175>=f)u=0,b.Hb&&"W"==p.slice(-1)&&(p=p.slice(0,-1)+"D");for(var f=-1,F=!0,J=1;J<=u;J++){var H,I;H="";I=k[J];if(void 0!==I){0>f&&(f=I>>KA);m==LA&&(f==MA?v="[%800]":f==NA&&(v="ES:["+(b.ec?"E":"")+"DI]"));var P=I&OA;if(P!=PA)if(P==QA)F=!1;else{var L=I&RA;if(L>=R)if(0>g&&(g=a.Ja(b,1)),L<SA){L=a;H=I;var ka=u;I=b;var Z="",jb=g>>6,qa=g&7;if(3>jb){P=!p.indexOf("FI");if(!jb&&(!I.ec&&6==qa||I.ec&&5==qa))jb=2;else{if(I.ec)if(4!=qa)qa+=
8;else{var Z=L,db=jb,Oa=I,kb=Z.Ja(Oa,1),eb=kb>>6,sc=kb>>3&7,kb=kb&7,lb="";if(db||5!=kb)lb=TA[kb+8];4!=sc&&(lb&&(lb+="+"),lb+=TA[sc+8],eb&&(lb+="*"+(1<<eb)));db||5!=kb||(lb&&(lb+="+"),lb+=q(bz(Z,Oa,4)));Z=lb}Z||(Z=TA[qa])}1==jb?(L=L.Ja(I,1),Z=L&128?Z+("-"+q(-(L<<24>>24),2)):Z+("+"+q(L,2))):2==jb&&(Z&&(Z+="+"),I.ec?(L=bz(L,I,4),Z+=q(L)):(L=L.Wc(I,2),Z+=q(L,4)));Z="["+Z+"]";if(1==ka){L="";H&=OA;H==S&&(H=I.Hb?UA:T);switch(H){case VA:L="FAR";break;case U:L="BYTE";break;case T:if(P){L="INT16";break}L="WORD";
break;case UA:L="DWORD";break;case WA:if(P){L="INT32";break}case XA:L="REAL32";break;case YA:if(P){L="INT64";break}case ZA:L="REAL64";break;case $A:L="REAL80";break;case aB:L="BCD80"}L&&(Z=L+" "+Z)}}else Z=bB(L,qa,H,I);H=Z}else H=L==SA?bB(a,g&7,I,b):bB(a,g>>3&7,I,b);else if(L==cB)H="1";else if(L==V){H=a;P=I;L=b;I=" ";switch(P&OA){case U:P&W&&(I=q(H.Ja(L,1),2));break;case dB:I=q(H.Ja(L,1)<<24>>24,L.Hb?8:4);break;case S:if(L.Hb){I=q(bz(H,L,4));break}case T:I=q(H.Wc(L,2),4);break;case VA:L=Iy(H,H.mb(L,
!0),H.Wc(L,2),null,L.type,L.Hb,L.ec);I=fz(L);H=eB(H,L);H[0]&&(I+=" ("+H[0]+")");break;default:I="imm("+ua(P)+")"}H=I}else L==fB?(b.ec?(H=8,I=bz(a,b,4)):(H=4,I=a.Wc(b,2)),H="["+q(I,H)+"]"):L==gB?(H=P==U?a.Ja(b,1)<<24>>24:a.mb(b,!0),I=b.Ha+H&(b.Hb?-1:65535),H=q(I,b.Hb?8:4),I=eB(a,Iy(a,I,b.U)),I[0]&&(H+=" ("+I[0]+")")):L==X?H=P==hB?"ST":P==iB?"ST("+(g&7)+")":bB(a,(I&jB)>>8,I,b):L==kB?H=bB(a,(I&jB)>>8,lB,b):L==mB?H="DS:[SI]":L==nB&&(H="ES:[DI]");if(!H||!H.length){v="INVALID";break}0<v.length&&(v+=",");
v+=H||"???"}}}g="";k=fz(e)+" ";if(-1!==e.ya&&-1!==b.ya){do if(g+=q(a.Ja(e,1),2),null==e.ya)break;while(e.ya!=b.ya)}k+=Aa(g,e.ec?24:16);k+=Aa(p,8);v&&(k+=" "+v);a.H.da<oB[f]&&(c=oB[f]+" CPU only");c&&F&&(k=Aa(k,e.ec?74:62)+";"+c,k=a.H.ba.Me?k+("cycles="+Kd(a.H).toString()+" cs="+q(a.H.T.vf)):k+(null!=d?"="+d.toString():""));pB(b,F,h);return k}
function bB(a,b,c,d){var e=c&RA;if(e==lB){if(b>Uz||b>=Tz&&80386>a.H.da)return"??";b+=Oz}else if(e==qB)b+=cA;else if(e==rB)b+=sB;else if(e==tB)b+=uB;else if(a=c&OA,a>=T&&(b<Fz&&(b+=Fz-xz),a==UA||a==S&&d.Hb))b+=Vz-Fz;return vz[b]}
function vB(a,b){switch(b){case "V":a=rg(a.H);break;case "D":a=a.H.O&1024;break;case "I":a=a.H.O&512;break;case "T":a=a.H.O&256;break;case "S":a=qg(a.H);break;case "Z":a=pg(a.H);break;case "A":a=og(a.H);break;case "P":a=ng(a.H);break;case "C":a=mg(a.H);break;default:a=0}return b+(a?"1":"0")+" "}function Uy(a){return q(a,a&-65536?8:4)}function wB(a,b){b>=Fz&&b<=Mz&&4<a.ra&&(b+=Vz-Fz);var c=vz[b];b==cA&&80286==a.H.da&&(c="MS");return c+"="+wz(a,b)+" "}
function xB(a,b,c){return b.ac+"="+q(b.U,4)+(c?"["+q(b.ta,a.la)+","+Uy(b.Pa)+"]":"")}function yB(a,b,c,d,e){return b+"="+(null!=c?q(c,4):"")+"["+q(d,a.la)+","+q(e-d,4)+"]"}
function zB(a,b){var c;void 0===b&&(b=hz(a));c=wB(a,Fz)+wB(a,Iz)+wB(a,Gz)+wB(a,Hz)+(4<a.ra?"\n":"")+wB(a,Jz)+wB(a,Kz)+wB(a,Lz)+wB(a,Mz)+"\n"+xB(a,a.H.Y,b)+" "+xB(a,a.H.Da,b)+" "+xB(a,a.H.oa,b)+" ";if(b){var d="TR="+q(a.H.ka.U,4),e=a.ma,e="A20="+(e.J||e.N!=e.C?"OFF ":"ON ");80386>a.H.da&&(d="\n"+d,c+=e,e="");c+="\n"+xB(a,a.H.Z,b)+" ";80386<=a.H.da&&(e+="\n",c+=xB(a,a.H.Ga,b)+" "+xB(a,a.H.Ia,b)+"\n");c+=yB(a,"LD",a.H.Db.U,a.H.Db.ta,a.H.Db.ta+a.H.Db.Pa)+" "+yB(a,"GD",null,a.H.Ib,a.H.Hc)+" "+yB(a,"ID",
null,a.H.Nb,a.H.ad)+" ";c=c+(d+" "+e)+wB(a,cA);80386<=a.H.da&&(c+=wB(a,eA)+wB(a,fA))}else 80386<=a.H.da&&(c+=xB(a,a.H.Ga,b)+" "+xB(a,a.H.Ia,b)+" ");return c+=wB(a,hA)+vB(a,"V")+vB(a,"D")+vB(a,"I")+vB(a,"T")+vB(a,"S")+vB(a,"Z")+vB(a,"A")+vB(a,"P")+vB(a,"C")}l.kj=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
function lq(a,b,c,d,e,f,g,h){var k={},m=[],p;for(p in h){var v=h[p];"number"==typeof v&&(h[p]=v={o:v});var u=v.o,F=v.s,J=v.a;if(void 0!==u){void 0!==F&&(k.Ha=u,k.U=F,k.ya=null,a.Tb(k),(k.ya&-65536)==(a.ma.N&-65536)&&(k.ya&=1048575),v.p=k.ya);var F=m,u=[u>>>0,p],H=Da(F,u,a.kj);0>H&&F.splice(-(H+1),0,u)}J&&(v.a=J.replace(/''/g,'"'))}a.F.push({Sf:b,wn:c,U:d,Ha:e,ya:f,mn:g,Hd:h,Ti:m})}
function bz(a,b,c){for(var d=0;d<a.F.length;d++){var e=a.F[d];if(!b||e.Sf==b)if(b&&c==e.wn||!b&&c==e.U){a.F.splice(d,1);break}}}function cB(a,b,c){for(var d=[],e=b.Ha>>>0,f=a.Tb(b)>>>0,g=0;g<a.F.length;g++){var h=a.F[g],k=h.U,m=h.Ha>>>0,p=h.ya;null!=p&&(p>>>=0);var v=h.mn;48==k&&(k=40);if(k==b.U&&e>=m&&e<m+v||null!=p&&f>=p&&f<p+v){b=Da(h.Ti,[e],a.kj);0<=b?yB(a,g,b,d):c&&(b=~b,yB(a,g,b-1,d),yB(a,g,b,d));break}}!d.length&&(a=a.ma.Bj(f,!0))&&(d.push(a),d.push(f));return d}
function yB(a,b,c,d){var e={},f=a.F[b].Ti,g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.F[b].Hd[h],h="."==h.charAt(0)?null:e.l||h);d.push(h);d.push(g);d.push(e.a);d.push(e.c)}
function zB(a,b){if("?"==b)a.P("frequency commands:"),a.P("\tclear\tclear all frequency counts");else{var c=0;if(a.M)if("clear"==b){for(b=0;b<a.M.length;b++)a.M[b]=[b,0];a.P("frequency data cleared");c++}else if(void 0!==b)a.P("unknown frequency command: "+b),c++;else{var d=a.M.slice();d.sort(function(a,b){return b[1]-a[1]});for(b=0;b<d.length;b++){var e=d[b][0],f=d[b][1];f&&(a.P((xA[a.qa[e][0]]+" ").substr(0,5)+" ("+ta(e)+"): "+f+" times"),c++)}}c||a.P("no frequency data available")}}
function AB(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return Ey(a)||a.P("no variables"),!0;if(!c[2])return Ey(a,c[1]);if(!c[3])return delete a.I[c[1]],!0;b=By(a,c[3]);return void 0!==b?(a.I[c[1]]={value:b,Xo:void 0},!0):!1}a.P("invalid assignment:"+b);return!1}
function BB(a,b,c){var d=null;if(b=nz(a,b,!0)){a.Tb(b);var e=cB(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.Ha-e[1])&&(g=" + "+ua(f)),f=e[0]+" ("+Ty(e[1],b.U)+")"+g,c&&a.P(f),d=f);4<e.length&&e[4]&&(g="",(f=e[5]-b.Ha)&&(g=" - "+ua(f)),f=e[4]+" ("+Ty(e[5],b.U)+")"+g,c&&a.P(f),d||(d=f))}else c&&a.P("no symbols")}return d}
function CB(a,b){if(b[1]&&"?"!=b[1]){var c="json"==b[1],d,e=0,f=0,g=c?{}:nz(a,b[1]);if(g&&(d=vy(a,b[2],"drive #"),void 0!==d)){if(!c){e=vy(a,b[3],"sector #");if(void 0===e)return;f=vy(a,b[4],"# of sectors");void 0===f&&(f=1)}var h=a.gb;2<=d&&a.Sa&&(d-=2,h=a.Sa);if(h){var k=h.lj(d);if(k)if(k.ua)if(c)DB(a.pa),a.P(k.ua.toJSON());else if(h.fl(k,e,f)){var m=0,p=!1;for(b=dz(g);!p&&0<k.wb--;)(function(a,b){h.xe(k,function(c){0>c?(a.P("out of data at address "+dz(b)),p=!0):(a.Pb(b,c,1,!0),m++)})})(a,g);Id(a.H,
function dz(a,b,c){for(var d=0;d<a.F.length;d++){var e=a.F[d];if(!b||e.Sf==b)if(b&&c==e.wn||!b&&c==e.U){a.F.splice(d,1);break}}}function eB(a,b,c){for(var d=[],e=b.Ha>>>0,f=a.Tb(b)>>>0,g=0;g<a.F.length;g++){var h=a.F[g],k=h.U,m=h.Ha>>>0,p=h.ya;null!=p&&(p>>>=0);var v=h.mn;48==k&&(k=40);if(k==b.U&&e>=m&&e<m+v||null!=p&&f>=p&&f<p+v){b=Da(h.Ti,[e],a.kj);0<=b?AB(a,g,b,d):c&&(b=~b,AB(a,g,b-1,d),AB(a,g,b,d));break}}!d.length&&(a=a.ma.Bj(f,!0))&&(d.push(a),d.push(f));return d}
function AB(a,b,c,d){var e={},f=a.F[b].Ti,g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.F[b].Hd[h],h="."==h.charAt(0)?null:e.l||h);d.push(h);d.push(g);d.push(e.a);d.push(e.c)}
function BB(a,b){if("?"==b)a.P("frequency commands:"),a.P("\tclear\tclear all frequency counts");else{var c=0;if(a.M)if("clear"==b){for(b=0;b<a.M.length;b++)a.M[b]=[b,0];a.P("frequency data cleared");c++}else if(void 0!==b)a.P("unknown frequency command: "+b),c++;else{var d=a.M.slice();d.sort(function(a,b){return b[1]-a[1]});for(b=0;b<d.length;b++){var e=d[b][0],f=d[b][1];f&&(a.P((zA[a.qa[e][0]]+" ").substr(0,5)+" ("+ta(e)+"): "+f+" times"),c++)}}c||a.P("no frequency data available")}}
function CB(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return Gy(a)||a.P("no variables"),!0;if(!c[2])return Gy(a,c[1]);if(!c[3])return delete a.I[c[1]],!0;b=Dy(a,c[3]);return void 0!==b?(a.I[c[1]]={value:b,Xo:void 0},!0):!1}a.P("invalid assignment:"+b);return!1}
function DB(a,b,c){var d=null;if(b=pz(a,b,!0)){a.Tb(b);var e=eB(a,b,!0);if(e.length){var f,g;e[0]&&(g="",(f=b.Ha-e[1])&&(g=" + "+ua(f)),f=e[0]+" ("+Vy(e[1],b.U)+")"+g,c&&a.P(f),d=f);4<e.length&&e[4]&&(g="",(f=e[5]-b.Ha)&&(g=" - "+ua(f)),f=e[4]+" ("+Vy(e[5],b.U)+")"+g,c&&a.P(f),d||(d=f))}else c&&a.P("no symbols")}return d}
function EB(a,b){if(b[1]&&"?"!=b[1]){var c="json"==b[1],d,e=0,f=0,g=c?{}:pz(a,b[1]);if(g&&(d=xy(a,b[2],"drive #"),void 0!==d)){if(!c){e=xy(a,b[3],"sector #");if(void 0===e)return;f=xy(a,b[4],"# of sectors");void 0===f&&(f=1)}var h=a.gb;2<=d&&a.Sa&&(d-=2,h=a.Sa);if(h){var k=h.lj(d);if(k)if(k.ua)if(c)FB(a.pa),a.P(k.ua.toJSON());else if(h.fl(k,e,f)){var m=0,p=!1;for(b=fz(g);!p&&0<k.wb--;)(function(a,b){h.xe(k,function(c){0>c?(a.P("out of data at address "+fz(b)),p=!0):(a.Pb(b,c,1,!0),m++)})})(a,g);Id(a.H,
!0);a.P(m+" bytes read at "+b)}else a.P("sector "+e+" request out of range");else a.P("drive "+d+" not loaded");else a.P("invalid drive: "+d)}else a.P("disk controller not present")}}else a.P("load commands:"),a.P("\tl [address] [drive #] [sector #] [# sectors]")}
function nA(a,b){var c;if(b&&"?"==b[1])a.P("register commands:"),a.P("\tr\tdump registers"),a.Ic&&a.P("\trfp\tdump floating-point registers"),a.P("\trp\tdump all registers"),a.P("\trx [#]\tset flag or register x to [#]");else{var d;null==c&&(c=!0);if(b&&1<b.length){var e=b[1];if(a.Ic&&"fp"==e){c=a.Ic;d=kh(c);b=c.$b;for(var f=0;8>f;f++){var g=c,e=null;if(f<g.F.length){var e=[],h=g.B+f&7;e[0]=h;e[1]=Bh(g,h);e[2]=g.F[h];h<<=1;e[3]=g.L[h];e[4]=g.L[h+1];g=Fh(g,e[3],e[4]);e[5]=g[0];e[6]=g[1];e[7]=g[2]}if(!e)break;
a.P("ST"+f+": "+Aa(e[2].toFixed(15),24,!0)+" "+q(e[4])+","+q(e[3])+" ["+e[0]+":"+EB[e[1]]+"]")}a.P(" B3SSS210ESPUOZDI xxxIRRPPIxPUOZDI");a.P("SW: "+ra(d,16)+" ("+ua(d)+") CW: "+ra(b,16)+" ("+ua(b)+")");return}if("p"==e)d=80286<=a.H.da;else{f=e.indexOf("=");if(0<f)b=e.substr(f+1),e=e.substr(0,f);else if(2<b.length)b=b[2];else{a.P("missing value for "+b[1]);return}g=By(a,b);if(void 0===g)return;f=!0;h=e.toUpperCase();"E"==h.charAt(0)&&4>=a.sa&&(h=null);switch(h){case "AL":a.H.D=
function pA(a,b){var c;if(b&&"?"==b[1])a.P("register commands:"),a.P("\tr\tdump registers"),a.Ic&&a.P("\trfp\tdump floating-point registers"),a.P("\trp\tdump all registers"),a.P("\trx [#]\tset flag or register x to [#]");else{var d;null==c&&(c=!0);if(b&&1<b.length){var e=b[1];if(a.Ic&&"fp"==e){c=a.Ic;d=kh(c);b=c.$b;for(var f=0;8>f;f++){var g=c,e=null;if(f<g.F.length){var e=[],h=g.B+f&7;e[0]=h;e[1]=Bh(g,h);e[2]=g.F[h];h<<=1;e[3]=g.L[h];e[4]=g.L[h+1];g=Fh(g,e[3],e[4]);e[5]=g[0];e[6]=g[1];e[7]=g[2]}if(!e)break;
a.P("ST"+f+": "+Aa(e[2].toFixed(15),24,!0)+" "+q(e[4])+","+q(e[3])+" ["+e[0]+":"+GB[e[1]]+"]")}a.P(" B3SSS210ESPUOZDI xxxIRRPPIxPUOZDI");a.P("SW: "+ra(d,16)+" ("+ua(d)+") CW: "+ra(b,16)+" ("+ua(b)+")");return}if("p"==e)d=80286<=a.H.da;else{f=e.indexOf("=");if(0<f)b=e.substr(f+1),e=e.substr(0,f);else if(2<b.length)b=b[2];else{a.P("missing value for "+b[1]);return}g=Dy(a,b);if(void 0===g)return;f=!0;h=e.toUpperCase();"E"==h.charAt(0)&&4>=a.ra&&(h=null);switch(h){case "AL":a.H.D=
a.H.D&-256|g&255;break;case "AH":a.H.D=a.H.D&-65281|g<<8&255;break;case "AX":a.H.D=a.H.D&-65536|g&65535;break;case "BL":a.H.G=a.H.G&-256|g&255;break;case "BH":a.H.G=a.H.G&-65281|g<<8&255;break;case "BX":a.H.G=a.H.G&-65536|g&65535;break;case "CL":a.H.I=a.H.I&-256|g&255;break;case "CH":a.H.I=a.H.I&-65281|g<<8&255;break;case "CX":a.H.I=a.H.I&-65536|g&65535;break;case "DL":a.H.L=a.H.L&-256|g&255;break;case "DH":a.H.L=a.H.L&-65281|g<<8&255;break;case "DX":a.H.L=a.H.L&-65536|g&65535;break;case "SP":pe(a.H,
y(a.H)&-65536|g&65535);break;case "BP":a.H.M=a.H.M&-65536|g&65535;break;case "SI":a.H.K=a.H.K&-65536|g&65535;break;case "DI":a.H.J=a.H.J&-65536|g&65535;break;case "DS":ve(a.H,g);break;case "ES":we(a.H,g);break;case "SS":oe(a.H,g);break;case "CS":hg(a.H,g);a.N=Gy(a,z(a.H),a.H.Z.U);break;case "IP":case "EIP":B(a.H,g);a.N=Gy(a,z(a.H),a.H.Z.U);break;case "PC":case "PS":Fe(a.H,g);break;case "C":g?tg(a.H):ug(a.H);break;case "P":g?(e=a.H,e.resultType&=-3,e.O|=4):(e=a.H,e.resultType&=-3,e.O&=-5);break;case "A":g?
y(a.H)&-65536|g&65535);break;case "BP":a.H.M=a.H.M&-65536|g&65535;break;case "SI":a.H.K=a.H.K&-65536|g&65535;break;case "DI":a.H.J=a.H.J&-65536|g&65535;break;case "DS":ve(a.H,g);break;case "ES":we(a.H,g);break;case "SS":oe(a.H,g);break;case "CS":hg(a.H,g);a.N=Iy(a,z(a.H),a.H.Z.U);break;case "IP":case "EIP":B(a.H,g);a.N=Iy(a,z(a.H),a.H.Z.U);break;case "PC":case "PS":Fe(a.H,g);break;case "C":g?tg(a.H):ug(a.H);break;case "P":g?(e=a.H,e.resultType&=-3,e.O|=4):(e=a.H,e.resultType&=-3,e.O&=-5);break;case "A":g?
Bg(a.H):zg(a.H);break;case "Z":g?Cg(a.H):Ag(a.H);break;case "S":g?(e=a.H,e.resultType&=-17,e.O|=128):(e=a.H,e.resultType&=-17,e.O&=-129);break;case "I":g?(e=a.H,e.O|=512):(e=a.H,e.O&=-513);break;case "D":g?(e=a.H,e.O|=1024):(e=a.H,e.O&=-1025);break;case "V":g?vg(a.H):wg(a.H);break;default:var k=!0;if(80286<=a.H.da)switch(k=!1,h){case "MS":Fg(a.H,g);break;case "TR":-1===a.H.ka.load(g)&&(f=!1);break;default:if(k=!0,80386<=a.H.da)switch(k=!1,h){case "EAX":a.H.D=g;break;case "EBX":a.H.G=g;break;case "ECX":a.H.I=
g;break;case "EDX":a.H.L=g;break;case "ESP":pe(a.H,g);break;case "EBP":a.H.M=g;break;case "ESI":a.H.K=g;break;case "EDI":a.H.J=g;break;case "FS":a.H.Ga.load(g);break;case "GS":a.H.Ia.load(g);break;case "CR0":a.H.qa=g;kk.call(a.H,g);break;case "CR2":a.H.qd=g;break;case "CR3":a.H.Uc=g;He.call(a.H,g);break;default:k=!0}}if(k){a.P("unknown register: "+e);return}}if(!f){a.P("invalid value: "+b);return}Id(a.H);a.P("updated registers:")}}a.P(xB(a,d));c&&(a.N=Gy(a,z(a.H),a.H.Z.U),oA(a,dz(a.N)))}}
function FB(a,b){b=Ba(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.P(gA(a,c[2])):By(a,b,!1)}function GB(a,b,c){for(var d=null,e=b.Ha,f=e,g=1;6>=g&&e;g++){if(2<g){b.Ha=e;b.ya=null;var h=wA(a,b);if(0<=h.indexOf("CALL")||c&&0<=h.indexOf("INT")){var k=h.indexOf(" ");if(e+(h.indexOf(" ",k+1)-k-1)/2==f){d=h;break}}}e--}b.Ha=f;return d}function HB(a,b,c){var d="t"!=b;c=vy(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);$a(c,function(){return Qb(a,!0)&&ez(a,e,d,!1)},function(){Id(a.H);Qb(a,!1)})}
function nB(a,b,c){if(a.fh=b)null!=a.uj&&(a.Hb=a.uj),null!=a.tj&&(a.ec=a.tj),a.uj=a.Hb,a.tj=a.ec;a.Ke=c||0}
function oA(a,b,c,d){if(b=nz(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=nz(a,c,!0);if(!d||d.Ha<b.Ha)return;e=d.Ha-b.Ha+1;0>e&&(e=1);4096<e&&(e=4096);d=-1}c=0;var f;for(nB(b,!0);0<e&&d--;){f=Pb(a,!1)||a.K?a.O:null;var g=null!=f?"cycles":null,h=cB(a,b),k=b.ya;if(h[0]&&d&&(!c&&d||0>h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.P(m)}h[3]&&(g=h[3],f=null);f=wA(a,b,g,f);b.fh||d||d++;a.P(f);a.N=b;e-=b.ya-k;c++}}}
g;break;case "EDX":a.H.L=g;break;case "ESP":pe(a.H,g);break;case "EBP":a.H.M=g;break;case "ESI":a.H.K=g;break;case "EDI":a.H.J=g;break;case "FS":a.H.Ga.load(g);break;case "GS":a.H.Ia.load(g);break;case "CR0":a.H.qa=g;kk.call(a.H,g);break;case "CR2":a.H.qd=g;break;case "CR3":a.H.Uc=g;He.call(a.H,g);break;default:k=!0}}if(k){a.P("unknown register: "+e);return}}if(!f){a.P("invalid value: "+b);return}Id(a.H);a.P("updated registers:")}}a.P(zB(a,d));c&&(a.N=Iy(a,z(a.H),a.H.Z.U),qA(a,fz(a.N)))}}
function HB(a,b){b=Ba(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.P(iA(a,c[2])):Dy(a,b,!1)}function IB(a,b,c){for(var d=null,e=b.Ha,f=e,g=1;6>=g&&e;g++){if(2<g){b.Ha=e;b.ya=null;var h=yA(a,b);if(0<=h.indexOf("CALL")||c&&0<=h.indexOf("INT")){var k=h.indexOf(" ");if(e+(h.indexOf(" ",k+1)-k-1)/2==f){d=h;break}}}e--}b.Ha=f;return d}function JB(a,b,c){var d="t"!=b;c=xy(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);$a(c,function(){return Qb(a,!0)&&gz(a,e,d,!1)},function(){Id(a.H);Qb(a,!1)})}
function pB(a,b,c){if(a.fh=b)null!=a.uj&&(a.Hb=a.uj),null!=a.tj&&(a.ec=a.tj),a.uj=a.Hb,a.tj=a.ec;a.Ke=c||0}
function qA(a,b,c,d){if(b=pz(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=pz(a,c,!0);if(!d||d.Ha<b.Ha)return;e=d.Ha-b.Ha+1;0>e&&(e=1);4096<e&&(e=4096);d=-1}c=0;var f;for(pB(b,!0);0<e&&d--;){f=Pb(a,!1)||a.K?a.O:null;var g=null!=f?"cycles":null,h=eB(a,b),k=b.ya;if(h[0]&&d&&(!c&&d||0>h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.P(m)}h[3]&&(g=h[3],f=null);f=yA(a,b,g,f);b.fh||d||d++;a.P(f);a.N=b;e-=b.ya-k;c++}}}
l.Eg=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else a=this.C[this.A+1];b=[];if(a){a=a.toLowerCase().replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Ba(a.substring(d,f))),d=f+1}}return b};
function vA(a,b,c){var d=!0;try{if(!b.length||"end"==b)a.ga&&(a.P("ended assemble at "+dz(a.ea)),a.N=a.ea,a.ga=!1),b="";else if(!c){var e=">> ";a.H.qa&1&&(e=a.H.O&131072?"-- ":"## ");a.P(e+b)}var f=b.charAt(0);if('"'==f||"'"==f)return!0;a.za=null;if(Nb(a)&&0<b.length){a.ga&&(b="a "+dz(a.ea)+" "+b);var g=b.replace(/ +/g," ").split(" ");if(g&&g.length)for(var h=g[0],k=h.charAt(0),m=1;m<h.length;m++){var p=h.charAt(m);if("?"==k||"r"==k||"a">p||"z"<p){g[0]=h.substr(m);g.unshift(h.substr(0,m));break}}switch(g[0].charAt(0)){case "a":var v=
nz(a,g[1],!0);if(v)if(a.ea=v,void 0===g[2])a.P("begin assemble at "+dz(v)),a.ga=!0,Id(a.H);else{var u;a.P("not supported yet");u=[];if(u.length){for(var F=0;F<u.length;F++)a.Pb(v,u[F],1);a.P(wA(a,a.ea))}}break;case "b":a:{var J=g[0],H=g[1],I=b;if("?"==H)a.P("breakpoint commands:"),a.P("\tbi [p]\ttoggle break on input port [p]"),a.P("\tbo [p]\ttoggle break on output port [p]"),a.P("\tbp [a]\tset exec breakpoint at addr [a]"),a.P("\tbr [a]\tset read breakpoint at addr [a]"),a.P("\tbw [a]\tset write breakpoint at addr [a]"),
a.P("\tbc [a]\tclear breakpoint at addr [a]"),a.P("\tbl\tlist all breakpoints"),a.P("\tbn [n]\tbreak after [n] instruction(s)");else{var P=J.charAt(1);if("l"==P){var L;L=0+uA(a,a.B);L+=uA(a,a.W);(L+=uA(a,a.L))||a.P("no breakpoints")}else if("n"==P)a.xa=vy(a,H),a.P("break after "+a.xa+" instruction(s)");else if(void 0===H)a.P("missing breakpoint address");else{var ka={};if("*"!=H&&(ka=nz(a,H,!0,!0),!ka))break a;H=null==ka.Ha?H:ua(ka.Ha);"c"==P?null==ka.Ha?(Hy(a),a.P("all breakpoints cleared")):cz(a,
a.B,ka)||cz(a,a.W,ka)||cz(a,a.L,ka)||a.P("breakpoint missing: "+dz(ka)):"i"==P?a.P("breakpoint "+(Sc(a.ma,ka.Ha)?"enabled":"cleared")+": port "+H+" (input)"):"o"==P?a.P("breakpoint "+(Wc(a.ma,ka.Ha)?"enabled":"cleared")+": port "+H+" (output)"):null!=ka.Ha&&(qz(a,ka,I),"p"==P?a.sd(a.B,ka):"r"==P?a.sd(a.W,ka):"w"==P?a.sd(a.L,ka):a.P("unknown breakpoint command: "+P))}}}break;case "c":DB(a.pa);break;case "d":a:{var Z=g,jb,qa=Z[0],db=Z[1],Oa=Z[2],kb=Z[3];if("?"==db){var eb="";for(jb in Xb)a.Da[jb]&&
(eb&&(eb+=","),eb+=jb);eb+=",state,symbols";a.P("dump memory commands:");a.P("\tdb [a] [#] dump # bytes at address a");a.P("\tdw [a] [#] dump # words at address a");a.P("\tdd [a] [#] dump # dwords at address a");a.P("\tdh [#] [#] dump # instructions from history");a.P("\tdi [#] dump descriptor info for IDT #");a.P("\tds [#] dump descriptor info for selector #");eb.length&&a.P("dump extension commands:\n\t"+eb)}else if("state"==db){var sc=IB(a.pa,!0);sc?"console"==Oa?console.log(sc):
(DB(a.pa),a.P(sc)):a.P("powerOff() error")}else if("symbols"==db)for(var lb=0;lb<a.F.length;lb++){var gf=a.F[lb],Nd;for(Nd in gf.Hd)if("."!=Nd.charAt(0)){var hf=gf.Hd[Nd],Dg=hf.o;if(void 0!==Dg){var jf=hf.s;void 0===jf&&(jf=gf.U);var Eg=gf.Hd[Nd].l;Eg&&(Nd=Eg);a.P(Ty(Dg,jf)+" "+Nd)}}}else{if("ds"==qa||"dg"==qa||"dl"==qa)qa="d",Z=[qa,"desc",db];"d"==qa&&"page"==db&&(qa="dp",Z.shift());if("dp"==qa){Z.shift();var Dm=Z[0];if(Dm){var Yg=a.Tb(nz(a,Dm));if(-1===Yg)a.P("invalid address: "+Dm);else{var tf,
Ra=null;if(80386<=a.H.da){var uf=a.ma,Ra={};Ra.Pk=(Yg&-4194304)>>>20;Ra.Xi=a.H.Uc+Ra.Pk;Ra.ob=uf.aa[(Ra.Xi&uf.C)>>>uf.A];Ra.Fj=Ra.ob.Nd(Ra.Pk);Ra.Qk=(Yg&4190208)>>>10;Ra.Yi=(Ra.Fj&-4096)+Ra.Qk;Ra.pb=uf.aa[(Ra.Yi&uf.C)>>>uf.A];Ra.Gj=Ra.pb.Nd(Ra.Qk);Ra.zl=(Ra.Gj&-4096)+(Yg&4095)}if(tf=Ra){a.P("linear PDE addr PDE PTE addr PTE physical");a.P("--------- ---------- -------- ---------- -------- ----------");var ye="%"+q(Yg),ye=ye+(" %%"+sz(tf.Xi,tf.Fj)),ye=
ye+(" %%"+sz(tf.Yi,tf.Gj,!0)),ye=ye+(" %%"+q(tf.zl));a.P(ye)}else a.P("unsupported operation")}}else a.P("missing address")}else{if("d"==qa){if("disk"==db){Z[0]="l";Z[1]="json";CB(a,Z);break a}for(jb in Xb)if(Z[1]==jb){var Rt=a.Da[jb];Rt?(Z.shift(),Z.shift(),Rt(Z)):a.P("no dump registered for "+db);break a}db||(qa=a.lb||"db")}if("dh"==qa){var St=db,Tt=Oa,Zg=kb,Zg=void 0===Zg?"history":Zg,Ut="",Vt=0,Nc=a.oa,md=a.Y;if(md.length){var wc=+St||a.Ya,$g=+Tt||10;isNaN(wc)?wc=$g:Ut="more ";wc>md.length&&
(a.P("note: only "+md.length+" available"),wc=md.length);Nc-=wc;0>Nc&&(null==md[md.length-1].U?(wc=Nc+wc,Nc=0):Nc+=md.length);var Em=[];"call"==Tt&&($g=1E5,Em=["CALL"]);for(void 0!==St&&a.P(wc+" instructions earlier:");0<$g&&Nc!=a.oa;){var nd=md[Nc++];if(null==nd.U)break;var ah=Gy(a,nd.Ha,nd.U,nd.ya,nd.type,nd.Hb,nd.ec),Wt=wc--;null!=nd.mj&&"cycles"==Zg&&(Wt=nd.mj);var Xt=wA(a,ah,Zg,Wt);(!Em.length||0<=Xt.indexOf(Em[0]))&&a.P(Xt);ah.Ke&&(Nc+=ah.Ke,$g-=ah.Ke,wc-=ah.Ke);Nc>=md.length&&(Nc=0);a.Ya=wc;
Vt++;$g--}}Vt||(a.P("no "+Ut+"history available"),a.Ya=void 0)}else if("di"==qa){Z.shift();var Fm=Z[0];if(Fm){var bh=vy(a,Fm);if(void 0===bh||0>bh||255<bh)a.P("invalid vector: "+Fm);else{var Yt="&",Zt=!!(a.H.qa&1),$t=!1,fj=a.H.Nb+(bh<<(Zt?3:2)),au=a.H.ja(fj+0),yC=a.H.ja(fj+2);Zt&&(Yt="#",a.H.ja(fj+4)&2048&&($t=!0,au|=a.H.ja(fj+6)<<16));a.P("dumpIDT("+ua(bh)+"): "+Yt+q(yC,4)+":"+q(au,$t?8:4))}}else a.P("no IDT vector")}else if("dt"==qa)Z.shift(),a.P("no information");else if(qa[1]&&0>"abwd".indexOf(qa[1]))a.P("unrecognized dump command");
else{a.lb=qa;var ze=nz(a,db);if(ze&&(null!=ze.U||null!=ze.ya)){var vf=0;if(Oa){if("l"==Oa.charAt(0))Oa=Oa.substr(1)||kb,vf=vy(a,Oa);else{var bu=nz(a,Oa);if(!bu)break a;vf=bu.Ha-ze.Ha+1}if(0>vf||65536<vf)vf=0}var Ae="",Gm=!1,wf="dd"==qa?4:"dw"==qa?2:1,ch=wf*vf||128,Hm=ch+15>>4||1,Im=4==wf?16:a.D;"a"==qa[1]&&(Gm=!0,Hm=25,Im=160,ch=Hm*Im);for(;Hm--&&0<ch;){var dh=0,Jm=0,eh,Km="",gj="",db=dz(ze);for(eh=Im;0<eh&&0<ch;eh--){var hj=a.Ja(ze,1),dh=dh|hj<<(Jm++<<3);Jm==wf&&(Km+=8==a.D?sa(dh,3*wf):q(dh,2*wf),
Km+=1==wf?9==eh?"-":" ":" ",dh=Jm=0);gj+=32<=hj&&128>hj?String.fromCharCode(hj):Gm?"":".";ch--}Ae&&(Ae+="\n");Ae=Gm?Ae+gj:Ae+(db+" "+Km+Aa(gj,gj.length+3*eh+1,!0))}Ae&&a.P(Ae.replace(/\s*$/,""));a.Aa=ze}}}}}break;case "e":if("else"==g[0])break;var ij=1,cu=255,du=a.Ja,eu=a.Pb;"ew"==g[0]&&(ij=2,cu=65535,du=a.Wc,eu=a.nl);var fu=ij<<1,gu=g[1];if(null==gu)a.P("edit memory commands:"),a.P("\teb [a] [...] edit bytes at address a"),a.P("\tew [a] [...] edit words at address a");else{var jj=nz(a,gu);if(jj)for(var kj=
2;kj<g.length;kj++){var fh=By(a,g[kj]);if(void 0===fh){a.P("unrecognized value: "+g[kj]);break}fh&~cu&&a.P("warning: "+q(fh)+" exceeds "+ij+"-byte value");var zC=du.call(a,jj);a.P("changing "+dz(jj)+" from "+q(zC,fu,!0)+" to "+q(fh,fu,!0));eu.call(a,jj,fh,ij)}}break;case "f":zB(a,g[1]);break;case "g":a:{var hu=g[1],AC=b;"gt"==g[0]&&(a.Ea=!0);if(void 0!==hu){var Lm=nz(a,hu,!0);if(!Lm)break a;qz(a,Lm,AC);a.sd(a.B,Lm,!0)}lA(a,!0)||c||a.P("cpu busy or unavailable, run command ignored")}break;case "h":a:{var Mm;
if(a.ba.ab)Mm="halting",a.Kb();else{if(Pb(a,!0))break a;Mm="already halted"}c||a.P(Mm)}break;case "i":if("if"==g[0]){var Nm;var gh=b.substr(2),gh=Ba(gh);By(a,gh)?(c||a.P("true: "+gh),Nm=!0):(c||a.P("false: "+gh),Nm=!1);Nm||(d=!1);break}if("int"==g[0]){var lj;a:switch(vy(a,g[1])){case 19:el(a,19,a.H.ea,!0);a.ka=a.aa;lj=!0;break a;case 33:el(a,33,a.H.ea,!0);a.ka=a.aa;lj=!0;break a;default:lj=!1}lj||(d=!1);break}var Om=g[1];if(Om&&"?"!=Om){var Pm=vy(a,Om);if(void 0!==Pm){var BC=Uc(a.ma,Pm,1);a.P(ua(Pm)+
": "+ta(BC))}}else a.P("input commands:"),a.P("\ti [p]\tread port [p]"),a.P("warning: port accesses can affect hardware state");break;case "k":var CC=g[0];if("?"==g[1])a.P("stack trace commands:"),a.P("\tk\tshow frame addresses"),a.P("\tks\tshow symbol information");else{var Qm=0,iu=a.H.Z.U,hh=Gy(a),Vd=Gy(a,y(a.H),a.H.Y.U);for(a.P("stack trace for "+dz(Vd));10>Qm;){for(var od=null,DC=256;Vd.Ha>>>0<a.H.Sg>>>0;){hh.Ha=a.mb(Vd,!0);if(null==Vd.ya||!DC--)break;hh.U=iu;if(od=GB(a,hh))break;hh.U=a.mb(Vd);
if(od=GB(a,hh,!0)){iu=a.mb(Vd,!0);0<od.indexOf("INT")&&a.mb(Vd,!0);break}}if(!od||null==od)break;var ju=null;if("ks"==CC){var ku=od.match(/[0-9A-F]+$/);ku&&(ju=BB(a,ku[0]))}od=Aa(od,50)+" ;"+(ju||"stack="+dz(Vd));a.P(od);Qm++}Qm||a.P("no return addresses found")}break;case "l":if("ln"==g[0]){BB(a,g[1],!0);break}CB(a,g);break;case "m":if("mouse"==g[0]){var Rm=g[1],mj=g[2];if(a.G){var lu=1;"-"==mj.charAt(0)&&(lu=-1,mj=mj.substr(1));var Be=vy(a,mj,Rm);if(void 0!==Be)switch(Be=Be*lu|0,Rm){case "x":a.G.uf(Be,
0);break;case "y":a.G.uf(0,Be);break;case "click":a.G.Yd(Be,!0);a.G.Yd(Be,!1);break;default:a.P("unknown action: "+Rm)}}else a.P("no mouse");break}a:{var pd,qd=null,gb=g[1];"?"==gb&&(gb=void 0);if(void 0!==gb){var Ce=0;if("all"==gb)Ce=1610481663,gb=null;else if("on"==gb)qd=!0,gb=null;else if("off"==gb)qd=!1,gb=null;else{"keys"==gb&&(gb="key");"kbd"==gb&&(gb="keyboard");for(pd in Xb)if(gb==pd){Ce=Xb[pd];qd=!!(a.ic&Ce);break}if(!Ce){a.P("unknown message category: "+gb);break a}}Ce&&("on"==g[2]?(a.ic|=
Ce,qd=!0):"off"==g[2]&&(a.ic&=~Ce,qd=!1))}var EC=0,ih="";for(pd in Xb)if(!gb||gb==pd){var FC=!!(a.ic&Xb[pd]);if(null===qd||qd==FC)ih&&(ih+=","),++EC%10||(ih+="\n\t"),"key"==pd&&(pd="keys"),ih+=pd}void 0===gb&&a.P("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.P((null!==qd?qd?"messages on: ":"messages off: ":"message categories:\n\t")+(ih||"none"));Iy(a)}break;case "o":var Sm=g[1],GC=g[2];if(Sm&&"?"!=Sm){var Tm=vy(a,Sm,"port #"),Um=vy(a,GC);void 0!==Tm&&void 0!==Um&&(Yc(a.ma,
Tm,1,Um),a.P(ua(Tm)+": "+ta(Um)))}else a.P("output commands:"),a.P("\to [p] [b]\twrite byte [b] to port [p]"),a.P("warning: port accesses can affect hardware state");break;case "p":if("print"==g[0]){FB(a,b.substr(5));break}var mu="pr"==g[0]?1:0,xf=1+mu;if(a.K)a.P("step in progress");else{var nj,nu=!1,Jb=Gy(a,z(a.H),a.H.Z.U);do switch(nj=!1,a.Ja(Jb)){case 38:case 46:case 54:case 62:case 100:case 101:case 102:case 103:case 240:iz(a,Jb,1);nj=!0;break;case 204:case 206:a.K=xf;iz(a,Jb,1);break;case 205:case 224:case 225:case 226:a.K=
xf;iz(a,Jb,Jb.Hb?4:2);break;case 232:a.K=xf;iz(a,Jb,Jb.Hb?5:3);break;case 154:a.K=xf;iz(a,Jb,Jb.Hb?7:5);break;case 255:var ou=a.mb(Jb)&14591;if(4351==ou||6399==ou)a.K=xf,wA(a,Jb);break;case 243:case 242:iz(a,Jb,1);nu=nj=!0;break;case 108:case 109:case 110:case 111:case 164:case 165:case 166:case 167:case 170:case 171:case 172:case 173:case 174:case 175:nu&&(a.K=xf,iz(a,Jb,1))}while(nj);a.K?(a.sd(a.B,Jb,!0),lA(a)||(a.pa&&a.pa.nd(),a.K=0)):HB(a,mu?"tr":"t")}break;case "r":if("reset"==b){a.pa&&a.pa.reset();
break}nA(a,g);break;case "t":HB(a,g[0],g[1]);break;case "u":oA(a,g[1],g[2],8);break;case "v":if("var"==g[0]){AB(a,b.substr(3))||(d=!1);break}a.P("PCx86 version 1.36.0 ("+a.H.da+",RELEASE,NOPREFETCH"+(Tb?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.P(Qa());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var jh;void 0!==g[3]&&(jh=+g[3]);switch(g[2]){case "int":a.H.T.Ve=jh;break;case "start":a.H.T.xf=jh;break;case "stop":a.H.T.Xe=jh;break;default:a.P("unknown cs option");break a}void 0!==
function xA(a,b,c){var d=!0;try{if(!b.length||"end"==b)a.ga&&(a.P("ended assemble at "+fz(a.ea)),a.N=a.ea,a.ga=!1),b="";else if(!c){var e=">> ";a.H.qa&1&&(e=a.H.O&131072?"-- ":"## ");a.P(e+b)}var f=b.charAt(0);if('"'==f||"'"==f)return!0;a.za=null;if(Nb(a)&&0<b.length){a.ga&&(b="a "+fz(a.ea)+" "+b);var g=b.replace(/ +/g," ").split(" ");if(g&&g.length)for(var h=g[0],k=h.charAt(0),m=1;m<h.length;m++){var p=h.charAt(m);if("?"==k||"r"==k||"a">p||"z"<p){g[0]=h.substr(m);g.unshift(h.substr(0,m));break}}switch(g[0].charAt(0)){case "a":var v=
pz(a,g[1],!0);if(v)if(a.ea=v,void 0===g[2])a.P("begin assemble at "+fz(v)),a.ga=!0,Id(a.H);else{var u;a.P("not supported yet");u=[];if(u.length){for(var F=0;F<u.length;F++)a.Pb(v,u[F],1);a.P(yA(a,a.ea))}}break;case "b":a:{var J=g[0],H=g[1],I=b;if("?"==H)a.P("breakpoint commands:"),a.P("\tbi [p]\ttoggle break on input port [p]"),a.P("\tbo [p]\ttoggle break on output port [p]"),a.P("\tbp [a]\tset exec breakpoint at addr [a]"),a.P("\tbr [a]\tset read breakpoint at addr [a]"),a.P("\tbw [a]\tset write breakpoint at addr [a]"),
a.P("\tbc [a]\tclear breakpoint at addr [a]"),a.P("\tbl\tlist all breakpoints"),a.P("\tbn [n]\tbreak after [n] instruction(s)");else{var P=J.charAt(1);if("l"==P){var L;L=0+wA(a,a.B);L+=wA(a,a.W);(L+=wA(a,a.L))||a.P("no breakpoints")}else if("n"==P)a.xa=xy(a,H),a.P("break after "+a.xa+" instruction(s)");else if(void 0===H)a.P("missing breakpoint address");else{var ka={};if("*"!=H&&(ka=pz(a,H,!0,!0),!ka))break a;H=null==ka.Ha?H:ua(ka.Ha);"c"==P?null==ka.Ha?(Jy(a),a.P("all breakpoints cleared")):ez(a,
a.B,ka)||ez(a,a.W,ka)||ez(a,a.L,ka)||a.P("breakpoint missing: "+fz(ka)):"i"==P?a.P("breakpoint "+(Sc(a.ma,ka.Ha)?"enabled":"cleared")+": port "+H+" (input)"):"o"==P?a.P("breakpoint "+(Wc(a.ma,ka.Ha)?"enabled":"cleared")+": port "+H+" (output)"):null!=ka.Ha&&(sz(a,ka,I),"p"==P?a.sd(a.B,ka):"r"==P?a.sd(a.W,ka):"w"==P?a.sd(a.L,ka):a.P("unknown breakpoint command: "+P))}}}break;case "c":FB(a.pa);break;case "d":a:{var Z=g,jb,qa=Z[0],db=Z[1],Oa=Z[2],kb=Z[3];if("?"==db){var eb="";for(jb in Xb)a.Da[jb]&&
(eb&&(eb+=","),eb+=jb);eb+=",state,symbols";a.P("dump memory commands:");a.P("\tdb [a] [#] dump # bytes at address a");a.P("\tdw [a] [#] dump # words at address a");a.P("\tdd [a] [#] dump # dwords at address a");a.P("\tdh [#] [#] dump # instructions from history");a.P("\tdi [#] dump descriptor info for IDT #");a.P("\tds [#] dump descriptor info for selector #");eb.length&&a.P("dump extension commands:\n\t"+eb)}else if("state"==db){var sc=KB(a.pa,!0);sc?"console"==Oa?console.log(sc):
(FB(a.pa),a.P(sc)):a.P("powerOff() error")}else if("symbols"==db)for(var lb=0;lb<a.F.length;lb++){var gf=a.F[lb],Nd;for(Nd in gf.Hd)if("."!=Nd.charAt(0)){var hf=gf.Hd[Nd],Dg=hf.o;if(void 0!==Dg){var jf=hf.s;void 0===jf&&(jf=gf.U);var Eg=gf.Hd[Nd].l;Eg&&(Nd=Eg);a.P(Vy(Dg,jf)+" "+Nd)}}}else{if("ds"==qa||"dg"==qa||"dl"==qa)qa="d",Z=[qa,"desc",db];"d"==qa&&"page"==db&&(qa="dp",Z.shift());if("dp"==qa){Z.shift();var Em=Z[0];if(Em){var Yg=a.Tb(pz(a,Em));if(-1===Yg)a.P("invalid address: "+Em);else{var tf,
Ra=null;if(80386<=a.H.da){var uf=a.ma,Ra={};Ra.Pk=(Yg&-4194304)>>>20;Ra.Xi=a.H.Uc+Ra.Pk;Ra.ob=uf.aa[(Ra.Xi&uf.C)>>>uf.A];Ra.Fj=Ra.ob.Nd(Ra.Pk);Ra.Qk=(Yg&4190208)>>>10;Ra.Yi=(Ra.Fj&-4096)+Ra.Qk;Ra.pb=uf.aa[(Ra.Yi&uf.C)>>>uf.A];Ra.Gj=Ra.pb.Nd(Ra.Qk);Ra.zl=(Ra.Gj&-4096)+(Yg&4095)}if(tf=Ra){a.P("linear PDE addr PDE PTE addr PTE physical");a.P("--------- ---------- -------- ---------- -------- ----------");var ye="%"+q(Yg),ye=ye+(" %%"+uz(tf.Xi,tf.Fj)),ye=
ye+(" %%"+uz(tf.Yi,tf.Gj,!0)),ye=ye+(" %%"+q(tf.zl));a.P(ye)}else a.P("unsupported operation")}}else a.P("missing address")}else{if("d"==qa){if("disk"==db){Z[0]="l";Z[1]="json";EB(a,Z);break a}for(jb in Xb)if(Z[1]==jb){var Rt=a.Da[jb];Rt?(Z.shift(),Z.shift(),Rt(Z)):a.P("no dump registered for "+db);break a}db||(qa=a.lb||"db")}if("dh"==qa){var St=db,Tt=Oa,Zg=kb,Zg=void 0===Zg?"history":Zg,Ut="",Vt=0,Nc=a.oa,md=a.Y;if(md.length){var wc=+St||a.Ya,$g=+Tt||10;isNaN(wc)?wc=$g:Ut="more ";wc>md.length&&
(a.P("note: only "+md.length+" available"),wc=md.length);Nc-=wc;0>Nc&&(null==md[md.length-1].U?(wc=Nc+wc,Nc=0):Nc+=md.length);var Fm=[];"call"==Tt&&($g=1E5,Fm=["CALL"]);for(void 0!==St&&a.P(wc+" instructions earlier:");0<$g&&Nc!=a.oa;){var nd=md[Nc++];if(null==nd.U)break;var ah=Iy(a,nd.Ha,nd.U,nd.ya,nd.type,nd.Hb,nd.ec),Wt=wc--;null!=nd.mj&&"cycles"==Zg&&(Wt=nd.mj);var Xt=yA(a,ah,Zg,Wt);(!Fm.length||0<=Xt.indexOf(Fm[0]))&&a.P(Xt);ah.Ke&&(Nc+=ah.Ke,$g-=ah.Ke,wc-=ah.Ke);Nc>=md.length&&(Nc=0);a.Ya=wc;
Vt++;$g--}}Vt||(a.P("no "+Ut+"history available"),a.Ya=void 0)}else if("di"==qa){Z.shift();var Gm=Z[0];if(Gm){var bh=xy(a,Gm);if(void 0===bh||0>bh||255<bh)a.P("invalid vector: "+Gm);else{var Yt="&",Zt=!!(a.H.qa&1),$t=!1,hj=a.H.Nb+(bh<<(Zt?3:2)),au=a.H.ja(hj+0),AC=a.H.ja(hj+2);Zt&&(Yt="#",a.H.ja(hj+4)&2048&&($t=!0,au|=a.H.ja(hj+6)<<16));a.P("dumpIDT("+ua(bh)+"): "+Yt+q(AC,4)+":"+q(au,$t?8:4))}}else a.P("no IDT vector")}else if("dt"==qa)Z.shift(),a.P("no information");else if(qa[1]&&0>"abwd".indexOf(qa[1]))a.P("unrecognized dump command");
else{a.lb=qa;var ze=pz(a,db);if(ze&&(null!=ze.U||null!=ze.ya)){var vf=0;if(Oa){if("l"==Oa.charAt(0))Oa=Oa.substr(1)||kb,vf=xy(a,Oa);else{var bu=pz(a,Oa);if(!bu)break a;vf=bu.Ha-ze.Ha+1}if(0>vf||65536<vf)vf=0}var Ae="",Hm=!1,wf="dd"==qa?4:"dw"==qa?2:1,ch=wf*vf||128,Im=ch+15>>4||1,Jm=4==wf?16:a.D;"a"==qa[1]&&(Hm=!0,Im=25,Jm=160,ch=Im*Jm);for(;Im--&&0<ch;){var dh=0,Km=0,eh,Lm="",ij="",db=fz(ze);for(eh=Jm;0<eh&&0<ch;eh--){var jj=a.Ja(ze,1),dh=dh|jj<<(Km++<<3);Km==wf&&(Lm+=8==a.D?sa(dh,3*wf):q(dh,2*wf),
Lm+=1==wf?9==eh?"-":" ":" ",dh=Km=0);ij+=32<=jj&&128>jj?String.fromCharCode(jj):Hm?"":".";ch--}Ae&&(Ae+="\n");Ae=Hm?Ae+ij:Ae+(db+" "+Lm+Aa(ij,ij.length+3*eh+1,!0))}Ae&&a.P(Ae.replace(/\s*$/,""));a.Aa=ze}}}}}break;case "e":if("else"==g[0])break;var kj=1,cu=255,du=a.Ja,eu=a.Pb;"ew"==g[0]&&(kj=2,cu=65535,du=a.Wc,eu=a.nl);var fu=kj<<1,gu=g[1];if(null==gu)a.P("edit memory commands:"),a.P("\teb [a] [...] edit bytes at address a"),a.P("\tew [a] [...] edit words at address a");else{var lj=pz(a,gu);if(lj)for(var mj=
2;mj<g.length;mj++){var fh=Dy(a,g[mj]);if(void 0===fh){a.P("unrecognized value: "+g[mj]);break}fh&~cu&&a.P("warning: "+q(fh)+" exceeds "+kj+"-byte value");var BC=du.call(a,lj);a.P("changing "+fz(lj)+" from "+q(BC,fu,!0)+" to "+q(fh,fu,!0));eu.call(a,lj,fh,kj)}}break;case "f":BB(a,g[1]);break;case "g":a:{var hu=g[1],CC=b;"gt"==g[0]&&(a.Ea=!0);if(void 0!==hu){var Mm=pz(a,hu,!0);if(!Mm)break a;sz(a,Mm,CC);a.sd(a.B,Mm,!0)}nA(a,!0)||c||a.P("cpu busy or unavailable, run command ignored")}break;case "h":a:{var Nm;
if(a.ba.ab)Nm="halting",a.Kb();else{if(Pb(a,!0))break a;Nm="already halted"}c||a.P(Nm)}break;case "i":if("if"==g[0]){var Om;var gh=b.substr(2),gh=Ba(gh);Dy(a,gh)?(c||a.P("true: "+gh),Om=!0):(c||a.P("false: "+gh),Om=!1);Om||(d=!1);break}if("int"==g[0]){var nj;a:switch(xy(a,g[1])){case 19:el(a,19,a.H.ea,!0);a.ka=a.aa;nj=!0;break a;case 33:el(a,33,a.H.ea,!0);a.ka=a.aa;nj=!0;break a;default:nj=!1}nj||(d=!1);break}var Pm=g[1];if(Pm&&"?"!=Pm){var Qm=xy(a,Pm);if(void 0!==Qm){var DC=Uc(a.ma,Qm,1);a.P(ua(Qm)+
": "+ta(DC))}}else a.P("input commands:"),a.P("\ti [p]\tread port [p]"),a.P("warning: port accesses can affect hardware state");break;case "k":var EC=g[0];if("?"==g[1])a.P("stack trace commands:"),a.P("\tk\tshow frame addresses"),a.P("\tks\tshow symbol information");else{var Rm=0,iu=a.H.Z.U,hh=Iy(a),Vd=Iy(a,y(a.H),a.H.Y.U);for(a.P("stack trace for "+fz(Vd));10>Rm;){for(var od=null,FC=256;Vd.Ha>>>0<a.H.Sg>>>0;){hh.Ha=a.mb(Vd,!0);if(null==Vd.ya||!FC--)break;hh.U=iu;if(od=IB(a,hh))break;hh.U=a.mb(Vd);
if(od=IB(a,hh,!0)){iu=a.mb(Vd,!0);0<od.indexOf("INT")&&a.mb(Vd,!0);break}}if(!od||null==od)break;var ju=null;if("ks"==EC){var ku=od.match(/[0-9A-F]+$/);ku&&(ju=DB(a,ku[0]))}od=Aa(od,50)+" ;"+(ju||"stack="+fz(Vd));a.P(od);Rm++}Rm||a.P("no return addresses found")}break;case "l":if("ln"==g[0]){DB(a,g[1],!0);break}EB(a,g);break;case "m":if("mouse"==g[0]){var Sm=g[1],oj=g[2];if(a.G){var lu=1;"-"==oj.charAt(0)&&(lu=-1,oj=oj.substr(1));var Be=xy(a,oj,Sm);if(void 0!==Be)switch(Be=Be*lu|0,Sm){case "x":a.G.uf(Be,
0);break;case "y":a.G.uf(0,Be);break;case "click":a.G.Yd(Be,!0);a.G.Yd(Be,!1);break;default:a.P("unknown action: "+Sm)}}else a.P("no mouse");break}a:{var pd,qd=null,gb=g[1];"?"==gb&&(gb=void 0);if(void 0!==gb){var Ce=0;if("all"==gb)Ce=1610481663,gb=null;else if("on"==gb)qd=!0,gb=null;else if("off"==gb)qd=!1,gb=null;else{"keys"==gb&&(gb="key");"kbd"==gb&&(gb="keyboard");for(pd in Xb)if(gb==pd){Ce=Xb[pd];qd=!!(a.ic&Ce);break}if(!Ce){a.P("unknown message category: "+gb);break a}}Ce&&("on"==g[2]?(a.ic|=
Ce,qd=!0):"off"==g[2]&&(a.ic&=~Ce,qd=!1))}var GC=0,ih="";for(pd in Xb)if(!gb||gb==pd){var HC=!!(a.ic&Xb[pd]);if(null===qd||qd==HC)ih&&(ih+=","),++GC%10||(ih+="\n\t"),"key"==pd&&(pd="keys"),ih+=pd}void 0===gb&&a.P("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.P((null!==qd?qd?"messages on: ":"messages off: ":"message categories:\n\t")+(ih||"none"));Ky(a)}break;case "o":var Tm=g[1],IC=g[2];if(Tm&&"?"!=Tm){var Um=xy(a,Tm,"port #"),Vm=xy(a,IC);void 0!==Um&&void 0!==Vm&&(Yc(a.ma,
Um,1,Vm),a.P(ua(Um)+": "+ta(Vm)))}else a.P("output commands:"),a.P("\to [p] [b]\twrite byte [b] to port [p]"),a.P("warning: port accesses can affect hardware state");break;case "p":if("print"==g[0]){HB(a,b.substr(5));break}var mu="pr"==g[0]?1:0,xf=1+mu;if(a.K)a.P("step in progress");else{var pj,nu=!1,Jb=Iy(a,z(a.H),a.H.Z.U);do switch(pj=!1,a.Ja(Jb)){case 38:case 46:case 54:case 62:case 100:case 101:case 102:case 103:case 240:kz(a,Jb,1);pj=!0;break;case 204:case 206:a.K=xf;kz(a,Jb,1);break;case 205:case 224:case 225:case 226:a.K=
xf;kz(a,Jb,Jb.Hb?4:2);break;case 232:a.K=xf;kz(a,Jb,Jb.Hb?5:3);break;case 154:a.K=xf;kz(a,Jb,Jb.Hb?7:5);break;case 255:var ou=a.mb(Jb)&14591;if(4351==ou||6399==ou)a.K=xf,yA(a,Jb);break;case 243:case 242:kz(a,Jb,1);nu=pj=!0;break;case 108:case 109:case 110:case 111:case 164:case 165:case 166:case 167:case 170:case 171:case 172:case 173:case 174:case 175:nu&&(a.K=xf,kz(a,Jb,1))}while(pj);a.K?(a.sd(a.B,Jb,!0),nA(a)||(a.pa&&a.pa.nd(),a.K=0)):JB(a,mu?"tr":"t")}break;case "r":if("reset"==b){a.pa&&a.pa.reset();
break}pA(a,g);break;case "t":JB(a,g[0],g[1]);break;case "u":qA(a,g[1],g[2],8);break;case "v":if("var"==g[0]){CB(a,b.substr(3))||(d=!1);break}a.P("PCx86 version 1.36.0 ("+a.H.da+",RELEASE,NOPREFETCH"+(Tb?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.P(Qa());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var jh;void 0!==g[3]&&(jh=+g[3]);switch(g[2]){case "int":a.H.T.Ve=jh;break;case "start":a.H.T.xf=jh;break;case "stop":a.H.T.Xe=jh;break;default:a.P("unknown cs option");break a}void 0!==
jh&&Hd(a.H);a.P("checksums "+(a.H.ba.Me?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Md(a.H,+g[2])||a.P("warning: using 1x multiplier, previous target not reached"));a.P("target speed: "+(a.H.T.se.toFixed(2)+"Mhz")+" ("+a.H.T.Kd+"x)");break;default:a.P("unknown option: "+g[1])}else a.P("execution options:"),a.P("\tcs int #\tset checksum cycle interval to #"),a.P("\tcs start #\tset checksum cycle start count to #"),a.P("\tcs stop #\tset checksum cycle stop count to #"),a.P("\tsp #\t\tset speed multiplier to #");
break;case "?":if(g[1]){FB(a,b.substr(1));break}var Vm="commands:",Wm;for(Wm in JB)Vm+="\n"+Aa(Wm,7)+JB[Wm];Sg(a)||(Vm+="\nnote: frequency/history disabled if no exec breakpoints");a.P(Vm);break;default:a.P("unknown command: "+b),d=!1}}}catch(qu){a.P("debugger error: "+(qu.stack||qu.message)),d=!1}return d}function Ky(a,b,c){b=a.Eg(b,c);for(var d in b)if(!vA(a,b[+d]))return!1;return!0}
var iA={16:262144,19:524288,21:32768,22:65536,28:2048,33:134217728,51:16777216},hA=[26,28,40,42,109],JB={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory",f:"frequencies","g [#]":"go [to #]",h:"halt","i [#]":"input port #","if":"eval expression",k:"stack trace",l:"load sector(s)",ln:"list nearest symbol(s)",m:"messages",mouse:"mouse action","o [#]":"output port #",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",
"t [#]":"trace","u [#]":"unassemble",x:"execution options",v:"print version","var":"assign variable"},oz=0,gz=1,Qy=2,rz=3,pz=4,hz=5,EA=18,FA=28,AA=36,JA=80,GA=104,HA=107,yA=176,xA="INVALID AAA AAD AAM AAS ADC ADD AND ARPL AS: BOUND BSF BSR BT BTC BTR BTS CALL CBW CLC CLD CLI CLTS CMC CMP CMPSB CMPSW CS: CWD DAA DAS DEC DIV DS: ENTER ES: ESC FS: GS: HLT IBTS IDIV IMUL IN INC INS INT INT3 INTO IRET JBE JC JCXZ JG JGE JL JLE JMP JA JNC JNO JNP JNS JNZ JO JP JS JZ LAHF LAR LDS LEA LEAVE LES LFS LGDT LGS LIDT LLDT LMSW LOADALL LOCK LODSB LODSW LOOP LOOPNZ LOOPZ LSL LSS LTR MOV MOVSB MOVSW MOVSX MOVZX MUL NEG NOP NOT OR OS: OUT OUTS POP POPA POPF PUSHF PUSHA PUSH RCL RCR REPNZ REPZ RET RETF ROL ROR SAHF SALC SAR SBB SCASB SCASW SETBE SETC SETG SETGE SETL SETLE SETNBE SETNC SETNO SETNP SETNS SETNZ SETO SETP SETS SETZ SGDT SHL SHLD SHR SHRD SIDT SLDT SMSW SS: STC STD STI STOSB STOSW STR SUB TEST VERR VERW WAIT XBTS XCHG XLAT XOR".split(" "),
CA="FLD FST FSTP FXCH FILD FIST FISTP FBLD FBSTP FADD FADDP FIADD FSUB FSUBP FISUB FSUBR FSUBRP FISUBR FMUL FMULP FIMUL FDIV FDIVP FIDIV FDIVR FDIVRP FIDIVR FSQRT FSCALE FPREM FRNDINT FXTRACT FABS FCHS FCOM FCOMP FCOMPP FICOM FICOMP FTST FXAM FPTAN FPATAN F2XM1 FYL2X FYL2XP1 FLDZ FLD1 FLDPI FLDL2T FLDL2E FLDLG2 FLDLN2 FINIT FNINIT FDISI FNDISI FENI FNENI FLDCW FSTCW FNSTCW FSTSW FNSTSW FCLEX FNCLEX FSTENV FNSTENV FLDENV FSAVE FNSAVE FRSTOR FINCSTP FDECSTP FFREE FFREEP FNOP FWAIT FSETPM FSINCOS FSTSWAX".split(" "),
EB=["VALID","ZERO ","SPEC ","EMPTY"],KA=2,LA=3,mB=[8086,80186,80286,80386],vz=0,wz=1,xz=2,yz=3,zz=4,Az=5,Bz=6,Cz=7,Dz=8,Ez=9,Fz=10,Gz=11,Hz=12,Iz=13,Jz=14,Kz=15,Mz=16,Lz=22,fA=23,Tz=24,Uz=25,Vz=26,Wz=27,Xz=28,Yz=29,Zz=30,$z=31,aA=32,bA=33,cA=34,dA=35,qB=40,sB=48,eA=56,tz=["AL","CL","DL","BL","AH","CH","DH","BH","AX","CX","DX","BX","SP","BP","SI","DI","ES","CS","SS","DS","FS","GS","IP","PS","EAX","ECX","EDX","EBX","ESP","EBP","ESI","EDI","CR0","CR1","CR2","CR3",null,null,null,null,"DR0","DR1","DR2",
"DR3",null,null,"DR6","DR7",null,null,null,null,null,null,"TR6","TR7","EIP"],Nz=0,Oz=1,Pz=2,Qz=3,Rz=4,Sz=5,RA="BX+SI BX+DI BP+SI BP+DI SI DI BP BX EAX ECX EDX EBX ESP EBP ESI EDI".split(" "),MA=15,PA=240,hB=3840,NA=0,U=1,bB=2,T=3,S=4,SA=5,TA=7,OA=8,fB=9,gB=10,UA=11,VA=11,WA=12,XA=12,YA=13,ZA=14,V=0,aB=16,dB=32,eB=48,kB=64,lB=80,X=96,iB=112,R=128,QA=160,jB=192,oB=208,pB=224,rB=240,KB=vz<<8|X|U,LB=wz<<8|X|U,MB=Dz<<8|X|S,NB=Ez<<8|X|S,OB=Fz<<8|X|S,PB=Gz<<8|X|S,QB=Hz<<8|X|S,RB=Iz<<8|X|S,SB=Jz<<8|X|S,TB=
Kz<<8|X|S,UB=Nz<<8|iB|T,VB=Oz<<8|iB|T,WB=Pz<<8|iB|T,XB=Qz<<8|iB|T,YB=Rz<<8|iB|T,ZB=Sz<<8|iB|T,W=12288,$B=KA<<14,Y=LA<<14,IA=14,kA=1E3,My=[0,NA],Ny=[yA,T|W],Ly=[[6,R|U|W,U|4272],[6,R|S|W,S|4272],[6,176|U|W,R|U|4096],[6,176|S|W,R|S|4096],[6,KB|W,V|U|4096],[6,MB|W,V|S|4096],[108,UB|4096],[103,UB|8192],[99,R|U|W,U|4272],[99,R|S|W,S|4272],[99,176|U|W,R|U|4096],[99,176|S|W,R|S|4096],[99,KB|W,V|U|4096],[99,MB|W,V|S|4096],[108,VB|4096],[103,VB|8192],[5,R|U|W,U|4272],[5,R|S|W,S|4272],[5,176|U|W,R|U|4096],
[5,176|S|W,R|S|4096],[5,KB|W,V|U|4096],[5,MB|W,V|S|4096],[108,WB|4096],[103,WB|8192],[120,R|U|W,U|4272],[120,R|S|W,S|4272],[120,176|U|W,R|U|4096],[120,176|S|W,R|S|4096],[120,KB|W,V|U|4096],[120,MB|W,V|S|4096],[108,XB|4096],[103,XB|8192],[7,R|U|W,U|4272],[7,R|S|W,S|4272],[7,176|U|W,R|U|4096],[7,176|S|W,R|S|4096],[7,KB|W,V|U|4096],[7,MB|W,V|S|4096],[35,OA],[29],[154,R|U|W,U|4272],[154,R|S|W,S|4272],[154,176|U|W,R|U|4096],[154,176|S|W,R|S|4096],[154,KB|W,V|U|4096],[154,MB|W,V|S|4096],[27,OA],[30],[162,
R|U|W,U|4272],[162,R|S|W,S|4272],[162,176|U|W,R|U|4096],[162,176|S|W,R|S|4096],[162,KB|W,V|U|4096],[162,MB|W,V|S|4096],[147,OA],[1],[24,R|U|4096,U|4272],[24,R|S|4096,S|4272],[24,U|4272,R|U|4096],[24,S|4272,R|S|4096],[24,KB|4096,V|U|4096],[24,MB|4096,V|S|4096],[33,OA],[4],[44,MB|W],[44,NB|W],[44,OB|W],[44,PB|W],[44,QB|W],[44,RB|W],[44,SB|W],[44,TB|W],[31,MB|W],[31,NB|W],[31,OB|W],[31,PB|W],[31,QB|W],[31,RB|W],[31,SB|W],[31,TB|W],[108,MB|4096],[108,NB|4096],[108,OB|4096],[108,PB|4096],[108,QB|4096],
[108,RB|4096],[108,SB|4096],[108,TB|4096],[103,MB|8192],[103,NB|8192],[103,OB|8192],[103,PB|8192],[103,QB|8192],[103,RB|8192],[103,SB|8192],[103,TB|8192],[HA,NA|$B],[GA,NA|$B],[10,S|4272|$B,R|S|4096],[8,R|T|8192,T|4272],[37,OA|Y],[38,OA|Y],[100,OA|Y],[9,OA|Y],[108,V|S|4096|$B],[42,176|T|W|$B,R|S|4096,V|S|4096],[108,V|bB|4096|$B],[42,T|8368|$B,R|S|4096,V|U|4096],[45,lB|U|8192|$B,OB|4096],[45,lB|S|8192|$B,OB|4096],[102,OB|4096|$B,kB|U|4096],[102,OB|4096|$B,kB|S|4096],[64,eB|U|4096],[60,eB|U|4096],[51,
eB|U|4096],[59,eB|U|4096],[67,eB|U|4096],[63,eB|U|4096],[50,eB|U|4096],[58,eB|U|4096],[66,eB|U|4096],[62,eB|U|4096],[65,eB|U|4096],[61,eB|U|4096],[55,eB|U|4096],[54,eB|U|4096],[56,eB|U|4096],[53,eB|U|4096],[163,R|U|W,V|U|4096],[164,R|S|W,V|S|4096],[163,R|U|W,V|U|4096],[165,R|S|W,V|U|4096],[155,R|U|4096,U|4272],[155,R|S|4096,S|4272],[160,176|U|W,R|U|W],[160,176|S|W,R|S|W],[90,R|U|8192,U|4272],[90,R|S|8192,S|4272],[90,U|8368,R|U|4096],[90,S|8368,R|S|4096],[90,R|S|8192,jB|T|4096],[71,S|8368,144|S],[90,
jB|T|8192,R|S|4096],[103,R|S|8192],[97],[160,MB|W,NB|W],[160,MB|W,OB|W],[160,MB|W,PB|W],[160,MB|W,QB|W],[160,MB|W,RB|W],[160,MB|W,SB|W],[160,MB|W,TB|W],[EA],[FA],[17,V|TA|4096],[158],[106],[105],[117],[68],[90,KB|8192,dB|U|4096],[90,MB|8192,dB|S|4096],[90,dB|U|8192,KB|4096],[90,dB|S|8192,MB|4096],[91,lB|U|8192,kB|U|4096],[92,lB|S|8192,kB|S|4096],[25,lB|U|4096,kB|U|4096],[26,lB|S|4096,kB|S|4096],[155,KB|4096,V|U|4096],[155,MB|4096,V|S|4096],[151,lB|U|8192,KB|4096],[152,lB|S|8192,MB|4096],[82,KB|8192,
kB|U|4096],[83,MB|8192,kB|S|4096],[121,KB|4096,lB|U|4096],[122,MB|4096,lB|S|4096],[90,KB|8192,V|U|4096],[90,LB|8192,V|U|4096],[90,xz<<8|X|U|8192,V|U|4096],[90,yz<<8|X|U|8192,V|U|4096],[90,zz<<8|X|U|8192,V|U|4096],[90,Az<<8|X|U|8192,V|U|4096],[90,Bz<<8|X|U|8192,V|U|4096],[90,Cz<<8|X|U|8192,V|U|4096],[90,MB|8192,V|S|4096],[90,NB|8192,V|S|4096],[90,OB|8192,V|S|4096],[90,PB|8192,V|S|4096],[90,QB|8192,V|S|4096],[90,RB|8192,V|S|4096],[90,SB|8192,V|S|4096],[90,TB|8192,V|S|4096],[166,R|U|W|16384,V|U|4096],
[167,R|S|W|16384,V|U|4096],[113,V|T|4096],[113],[73,S|8368,4246],[70,S|8368,4246],[90,R|U|8192,V|U|4096],[90,R|S|8192,V|S|4096],[34,V|T|4096|$B,V|U|4096],[72,NA|$B],[114,V|T|4096],[114],[47],[46,V|U|4096],[48],[49],[168,R|U|W,aB|U|4096],[169,R|S|W,aB|U|4096],[170,R|U|W,LB|4096],[171,R|S|W,LB|4096],[3,V|U],[2,V|U],[118],[161],[AA,R|S|4096],[AA,R|S|4096],[AA,R|S|4096],[AA,R|S|4096],[AA,R|S|4096],[AA,R|S|4096],[AA,R|S|4096],[AA,R|S|4096],[85,eB|U|4096],[86,eB|U|4096],[84,eB|U|4096],[52,eB|U|4096],[43,
KB|8192,V|U|4096],[43,MB|8192,V|U|4096],[101,V|U|4096,KB|4096],[101,V|U|4096,MB|4096],[17,eB|S|4096],[57,eB|S|4096],[57,V|TA|4096],[57,eB|U|4096],[43,KB|8192,OB|T|4096],[43,MB|8192,OB|T|4096],[101,OB|T|4096,KB|4096],[101,OB|T|4096,MB|4096],[81,OA],[0],[111,OA],[112,OA],[39],[23],[172,R|U|W],[173,R|S|W],[19],[148],[21],[150],[20],[149],[174,R|U|W],[175,R|S|W]],zA={0:[177,R|T|W],1:[178,R|T|W],2:[69,T|8368|$B,T|4240],3:[87,T|8368|$B,T|4240],5:[JA,$B],6:[22,$B],7:[JA,Y],32:[90,QA|SA|8192|Y,oB|SA|4096],
33:[90,QA|SA|8192|Y,pB|SA|4096],34:[90,oB|SA|8192|Y,QA|SA|4096],35:[90,pB|SA|8192|Y,QA|SA|4096],36:[90,QA|SA|8192|Y,rB|SA|4096],38:[90,rB|SA|8192|Y,QA|SA|4096],128:[64,eB|S|4096|Y],129:[60,eB|S|4096|Y],130:[51,eB|S|4096|Y],131:[59,eB|S|4096|Y],132:[67,eB|S|4096|Y],133:[63,eB|S|4096|Y],134:[50,eB|S|4096|Y],135:[58,eB|S|4096|Y],136:[66,eB|S|4096|Y],137:[62,eB|S|4096|Y],138:[65,eB|S|4096|Y],139:[61,eB|S|4096|Y],140:[55,eB|S|4096|Y],141:[54,eB|S|4096|Y],142:[56,eB|S|4096|Y],143:[53,eB|S|4096|Y],144:[135,
R|U|8192|Y],145:[131,R|U|8192|Y],146:[124,R|U|8192|Y],147:[130,R|U|8192|Y],148:[138,R|U|8192|Y],149:[134,R|U|8192|Y],150:[123,R|U|8192|Y],151:[129,R|U|8192|Y],152:[137,R|U|8192|Y],153:[133,R|U|8192|Y],154:[136,R|U|8192|Y],155:[132,R|U|8192|Y],156:[127,R|U|8192|Y],157:[126,R|U|8192|Y],158:[128,R|U|8192|Y],159:[125,R|U|8192|Y],160:[108,YB|4096|Y],161:[103,YB|8192|Y],163:[13,R|S|4096|Y,S|4272],164:[141,R|S|8192|Y,S|4272,V|U|4096],165:[141,R|S|8192|Y,S|4272,LB|4096],166:[159,S|8368|Y,R|S|4096,MB|4096,
LB|4096],167:[40,R|S|8192|Y,MB|4096,LB|4096,S|4272],168:[108,ZB|4096|Y],169:[103,ZB|8192|Y],171:[16,R|S|8192|Y,S|4272],172:[143,R|S|8192|Y,S|4272,V|U|4096],173:[143,R|S|8192|Y,S|4272,LB|4096],175:[42,R|S|W|Y,S|4272],178:[88,S|8368,4246],179:[15,R|S|8192|Y,S|4272],180:[74,S|8368,4246],181:[76,S|8368,4246],182:[94,S|8368|Y,R|U|4096],183:[94,SA|8368|Y,R|T|4096],186:[179,R|S|W|Y,V|U|4096],187:[14,R|S|8192|Y,S|4272],188:[11,S|8368|Y,R|S|4096],189:[12,S|8368|Y,R|S|4096],190:[93,S|8368|Y,R|U|4096],191:[93,
SA|8368|Y,R|T|4096]},BA={216:{0:[9,R|VA|4096],1:[18,R|VA|4096],2:[34,R|VA|4096],3:[35,R|VA|4096],4:[12,R|VA|4096],5:[15,R|VA|4096],6:[21,R|VA|4096],7:[24,R|VA|4096],48:[9,X|fB|8192,X|gB|4096],49:[18,X|fB|8192,X|gB|4096],50:[34,X|fB|8192,X|gB|4096],51:[35,X|fB|8192,X|gB|4096],52:[12,X|fB|8192,X|gB|4096],53:[15,X|fB|8192,X|gB|4096],54:[21,X|fB|8192,X|gB|4096],55:[24,X|fB|8192,X|gB|4096]},217:{0:[0,R|VA|4096],2:[1,R|VA|8192],3:[2,R|VA|8192],4:[68,R|4111],5:[59,R|T|4096],6:[66,R|8207],7:[60,R|T|8192],
48:[0,X|gB|8192],49:[3,X|gB|8192],50:[76],51:[2,X|gB|8192],64:[33],65:[32],68:[39],69:[40],80:[47],81:[49],82:[50],83:[48],84:[51],85:[52],86:[46],96:[43],97:[44],98:[41],99:[42],100:[31],102:[73],103:[72],112:[29],113:[45],114:[27],116:[30],117:[28]},218:{0:[11,R|UA|4096],1:[20,R|UA|4096],2:[37,R|UA|4096],3:[38,R|UA|4096],4:[14,R|UA|4096],5:[17,R|UA|4096],6:[23,R|UA|4096],7:[26,R|UA|4096]},219:{0:[4,R|UA|4096],2:[5,R|UA|8192],3:[6,R|UA|8192],5:[0,R|YA|4096],7:[2,R|YA|8192],64:[57],65:[55],66:[64],
67:[53],68:[78,$B],115:[79,Y]},220:{0:[9,R|XA|4096],1:[18,R|XA|4096],2:[34,R|XA|4096],3:[35,R|XA|4096],4:[12,R|XA|4096],5:[15,R|XA|4096],6:[21,R|XA|4096],7:[24,R|XA|4096],48:[9,X|gB|8192,X|fB|4096],49:[18,X|gB|8192,X|fB|4096],50:[34,X|gB|4096],51:[35,X|gB|4096],52:[15,X|gB|8192,X|fB|4096],53:[12,X|gB|8192,X|fB|4096],54:[24,X|gB|8192,X|fB|4096],55:[21,X|gB|8192,X|fB|4096]},221:{0:[0,R|XA|4096],2:[1,R|XA|8192],3:[2,R|XA|8192],4:[71,R|4111],6:[69,R|8207],7:[62,R|T|8192],48:[74,X|gB|4096],49:[3,X|gB|
8192],50:[1,X|gB|4096],51:[2,X|gB|4096]},222:{0:[11,R|T|4096],1:[20,R|T|4096],2:[37,R|T|4096],3:[38,R|T|4096],4:[14,R|T|4096],5:[17,R|T|4096],6:[23,R|T|4096],7:[26,R|T|4096],48:[10,X|gB|8192,X|fB|4096],49:[19,X|gB|8192,X|fB|4096],50:[35,X|gB|4096],51:[36,X|gB|4096],52:[16,X|gB|8192,X|fB|4096],53:[13,X|gB|8192,X|fB|4096],54:[25,X|gB|8192,X|fB|4096],55:[22,X|gB|8192,X|fB|4096]},223:{0:[4,R|T|4096],2:[5,R|T|8192],3:[6,R|T|8192],4:[7,R|ZA|4096],5:[4,R|WA|4096],6:[8,R|ZA|8192],7:[6,R|WA|8192],48:[75,X|
gB|4096],49:[3,X|gB|8192],50:[2,X|gB|4096],51:[2,X|gB|4096],52:[80,$B]}},DA=[[[6,R|U|W,V|U|4096],[99,R|U|W,V|U|4096],[5,R|U|W,V|U|4096],[120,R|U|W,V|U|4096],[7,R|U|W,V|U|4096],[154,R|U|W,V|U|4096],[162,R|U|W,V|U|4096],[24,R|U|4096,V|U|4096]],[[6,R|S|W,V|S|4096],[99,R|S|W,V|S|4096],[5,R|S|W,V|S|4096],[120,R|S|W,V|S|4096],[7,R|S|W,V|S|4096],[154,R|S|W,V|S|4096],[162,R|S|W,V|S|4096],[24,R|S|4096,V|S|4096]],[[6,R|S|W,V|bB|4096],[99,R|S|W,V|bB|4096],[5,R|S|W,V|bB|4096],[120,R|S|W,V|bB|4096],[7,R|S|W,V|
bB|4096],[154,R|S|W,V|bB|4096],[162,R|S|W,V|bB|4096],[24,R|S|4096,V|bB|4096]],[[115,R|U|W|$B,V|U|4096],[116,R|U|W|$B,V|U|4096],[109,R|U|W|$B,V|U|4096],[110,R|U|W|$B,V|U|4096],[140,R|U|W|$B,V|U|4096],[142,R|U|W|$B,V|U|4096],My,[119,R|U|W|$B,V|U|4096]],[[115,R|S|W|$B,V|U|4096],[116,R|S|W|$B,V|U|4096],[109,R|S|W|$B,V|U|4096],[110,R|S|W|$B,V|U|4096],[140,R|S|W|$B,V|U|4096],[142,R|S|W|$B,V|U|4096],My,[119,R|S|W|$B,V|U|4096]],[[115,R|U|W,aB|U|4096],[116,R|U|W,aB|U|4096],[109,R|U|W,aB|U|4096],[110,R|U|W,
aB|U|4096],[140,R|U|W,aB|U|4096],[142,R|U|W,aB|U|4096],My,[119,R|U|W,aB|U|4096]],[[115,R|S|W,aB|U|4096],[116,R|S|W,aB|U|4096],[109,R|S|W,aB|U|4096],[110,R|S|W,aB|U|4096],[140,R|S|W,aB|U|4096],[142,R|S|W,aB|U|4096],My,[119,R|S|W,aB|U|4096]],[[115,R|U|W,LB|4096],[116,R|U|W,LB|4096],[109,R|U|W,LB|4096],[110,R|U|W,LB|4096],[140,R|U|W,LB|4096],[142,R|U|W,LB|4096],My,[119,R|U|W,LB|4096]],[[115,R|S|W,LB|4096],[116,R|S|W,LB|4096],[109,R|S|W,LB|4096],[110,R|S|W,LB|4096],[140,R|S|W,LB|4096],[142,R|S|W,LB|4096],
My,[119,R|S|W,LB|4096]],[[155,R|U|4096,V|U|4096],My,[98,R|U|W],[96,R|U|W],[95,R|U|4096],[42,R|U|W],[32,R|U|4096],[41,R|U|W]],[[155,R|S|4096,V|S|4096],My,[98,R|S|W],[96,R|S|W],[95,R|S|4096],[42,R|S|W],[32,R|S|4096],[41,R|S|W]],[[44,R|U|W],[31,R|U|W],My,My,My,My,My,My],[[44,R|S|W],[31,R|S|W],[17,R|S|4096],[17,R|TA|4096],[57,R|S|4096],[57,R|TA|4096],[108,R|S|4096],My],[],[[145,R|T|8192|$B],[153,R|T|8192|$B],[78,R|T|4096|$B],[89,R|T|4096|$B],[156,R|T|4096|$B],[157,R|T|4096|$B],My,My],[[139,R|T|8192|$B],
[144,R|T|8192|$B],[75,R|T|4096|$B],[77,R|T|4096|$B],[146,R|T|8192|$B],My,[79,R|T|4096|$B],My],[My,My,My,My,[13,R|S|4096|Y,V|U|4096],[16,R|S|8192|Y,V|U|4096],[15,R|S|8192|Y,V|U|4096],[14,R|S|8192|Y,V|U|4096]]],Ry={256:["tss286",!1],512:["ldt",!1],768:["busy tss286",!1],1024:["call gate",!0],1280:["task gate",!0],1536:["int gate286",!0],1792:["trap gate286",!0],2304:["tss386",!1],2816:["busy tss386",!1],3072:["call gate386",!0],3584:["int gate386",!0],3840:["trap gate386",!0]},Vy={PREV_TSS:0,CPL0_SP:2,
CPL0_SS:4,CPL1_SP:6,CPL1_SS:8,CPL2_SP:10,CPL2_SS:12,TASK_IP:14,TASK_PS:16,TASK_AX:18,TASK_CX:20,TASK_DX:22,TASK_BX:24,TASK_SP:26,TASK_BP:28,TASK_SI:30,TASK_DI:32,TASK_ES:34,TASK_CS:36,TASK_SS:38,TASK_DS:40,TASK_LDT:42},Wy={PREV_TSS:0,CPL0_ESP:4,CPL0_SS:8,CPL1_ESP:12,CPL1_SS:16,CPL2_ESP:20,CPL2_SS:24,TASK_CR3:28,TASK_EIP:32,TASK_PS:36,TASK_EAX:40,TASK_ECX:44,TASK_EDX:48,TASK_EBX:52,TASK_ESP:56,TASK_EBP:60,TASK_ESI:64,TASK_EDI:68,TASK_ES:72,TASK_CS:76,TASK_SS:80,TASK_DS:84,TASK_FS:88,TASK_GS:92,TASK_LDT:96,
TASK_IOPM:100};cb(function(){for(var a=Bb(document,"pcx86","debugger"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new Fy(d);Ab(d,c)}});
function aC(a,b,c){rb.call(this,"Computer",a,67108864);var d=this;bC(this,b);this.W=Fd(this,"autoPower",a);this.D=0;this.oa=a.busWidth||a.buswidth;this.A=cC;this.M=null;this.J=this.ga=!1;this.qa=Fd(this,"url")||"";this.sa=(Math.random()+.1).toString(36).substr(2,12);this.B=dC(this);if(this.H=zb("CPU",this.id)){this.ca=zb("Debugger",this.id);this.C=[];for(b=null;b=bc(this,"Video",b);)this.C.push(b);this.ma=new rc({id:this.De+".bus",busWidth:this.oa},this.H,this.ca);var e,f=Db(this.id);this.I=(this.F=
zb("Panel",this.id))&&this.F.na.print;this.ha=this.Ca;this.ka=this.print;this.la=this.P;this.I&&(this.ha=this.F.Ca,this.ka=this.F.print,this.la=this.F.P);for(b=0;b<f.length;b++)e=f[b],e.Ca=function(a,b,c){eC(d,a);return d.ha.call(this,a,b,c)}.bind(e),e.print=function(a){return d.ka.call(this,a)}.bind(e),e.P=function(a,b,c){eC(d,a,b);return d.la.call(this,a,b,c)}.bind(e);this.O=0;this.I||fC(this);this.P("PCx86 v1.36.0\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");
for(b=0;b<f.length;b++)e=f[b],e.uc&&e.uc(this,this.ma,this.H,this.ca);b=null;e=Fd(this,"resume");void 0!==e&&(1<e.length?b=this.L=e:this.A=parseInt(e,10));e=!1;f=Xa("state");f||(e=!0,f=Fd(this,"state",a));f&&(b=this.Z=f,e||(this.J=!0,this.A=cC),this.A&&(this.N=new fg(this,"1.36.0"),this.N.load()?b=null:delete this.N));!b&&this.A&&(b=gC(this))&&(this.J=!0);if(this.aa=b){var g="Loading "+this.aa+"...";Na(this.aa,null,!0,function(a,b,c){c?(d.L=null,d.J=!1,d.Ca("Unable to load machine state from server (error "+
c+(b?": "+Ba(b):"")+")")):(d.M=b,d.ga=!0);Ob(d)},function(){d.P(g,Lb.Fe)})}else Ob(this);this.na.power||(this.W=!0);!c&&this.W&&hC(this,this.$e)}else mb("Unable to find CPU component")}ba(aC,rb);function DB(a){a.I&&(a.I.value="")}function fC(a){for(var b=0;b<a.C.length;b++){var c=a.C[b];c&&(c=c.rg)&&(c.style.opacity="1",c.style.lineHeight="1",a.O++)}}function eC(a,b,c){if(a.O)for(var d=0;d<a.C.length;d++){var e=a.C[d];e&&(e=e.rg)&&(c!=Lb.Fe||"..."!=b.slice(-3)?wb(e,b+"\n"):xb(e,b,b+"."))}}
function bC(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){mb(d.message+" ("+c+")")}}a.K=b}function Fd(a,b,c){var d=Xa(b);void 0===d&&a.K&&(d=a.K[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function hC(a,b,c){for(var d=Db(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Nb(f)){Nb(f,function(){hC(a,b,c)});return}}b.call(a,c)}
function iC(a,b){var c=new fg(a,"1.36.0",jC);if(c.load()&&kC(c)){var d=c.get(lC),e=b?b.get(lC):"unknown";d!=e&&(a.Ca("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}l=aC.prototype;
l.$e=function(a){void 0===a&&(a=this.A||(this.M?mC:cC));if(!this.D){this.D++;var b=!1,c=!1;this.ea=!1;var d=this.N||new fg(this,"1.36.0");if(a==Ld)b=!0;else if(a>cC){if(d.load(this.M)){this.G=new fg(this,"1.36.0",nC);this.G.load()&&(a!=mC&&oC(this,d)&&(a=pC),qC(this.G));this.G.set(lC,Ea());rC(this.G);var e=this.A&&!this.J;if(a==mC||vb("Click OK to restore the previous PCx86 machine state.")){if(c=kC(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=g?(this.Ca("Error: "+
g),"unable to verify user"==g&&(Va(sC,""),this.B=null)):this.P(f+": "+g),qC(d),d.load()?(c=kC(d),e=!0):c=!1))}e&&iC(this,c?d:null)}else a==pC&&d.clear()}else iC(this);delete this.M;delete this.N}e=Db(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.H&&(c=tC(this,g,d,b,c));b=[d,a,c];a!=Ld?hC(this,this.rj,b):this.rj(b)}};
function tC(a,b,c,d,e){if(!b.ba.Zb){b.ba.Zb=!0;if(b.Yb){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/-[0-9]+\./i,"."))));"string"===typeof f&&(f=null);!b.Yb(f,d)&&f&&(b.Ca("Unable to restore hardware state")&&(a.Z&&!a.ga?(c.clear(),a.A=cC,window&&window.location.reload()):a.ea=!0),b.Yb(null),e=!1)}b.ba.rf=!0;if(!d&&b.yj)for(a=b.yj.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
l.rj=function(a){var b=a[0],c=0>a[1];a=a[2];if(!this.ba.rf){for(var d=0;d<this.C.length;d++){var e=this.C[d];if(e&&(e=e.rg)){var f=Qa();e.style.opacity="0";e.style.lineHeight="0";if(0<=f.indexOf("MSIE")||0<=f.indexOf("Trident"))e.style.fontSize="0";e.value=""}}this.O=0;this.ba.rf=!0}this.ba.Zb=!0;if(d=this.na.power)d.textContent="Shutdown";this.H&&(tC(this,this.H,b,c,a),this.H.je());this.ea&&(oC(this,b),b.clear());!c&&this.G&&(this.G.clear(),delete this.G);this.D=0};
function oC(a,b){if(!a.ba.Ae){if(vb("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.36.0"};d.url=a.qa;d.user=c;d.type="bug";d.data=b;Na("http://www.pcjs.org/api/v1/report",d,!0)}return!0}return!1}
function IB(a,b,c){var d,e="none";if(a.D)return null;a.D--;var f=new fg(a,"1.36.0"),g=new fg(a,"1.36.0",jC),h=Ea();g.set(lC,h);f.set(lC,h);f.set(uC,"1.36.0");f.set(vC,window?window.location.href:null);f.set(wC,Qa());a.H&&a.H.Xb&&(d=a.H.Xb(b,c),"object"===typeof d&&f.set(a.H.id,d),c&&(a.H.ba.Zb=!1,!1===d&&(e=null)));for(var h=Db(a.id),k=0;k<h.length;k++){var m=h[k];m.ba.Zb&&(m.Xb&&(d=m.Xb(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.ba.Zb=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&xC(a,a.B,f.toString()),
rC(g)&&rC(f)||(e=null,d=h=!0)):a.A&&(d=!0,h=a.A==HC),d&&f.clear(h)):e=f.toString());c&&(a.ba.Zb=!1,b=a.na.power)&&(b.textContent="Power");a.D=0;return e}l.reset=function(){this.ma&&this.ma.reset&&(Rb(this,"Resetting "+this.ma.type),this.ma.reset());for(var a=Db(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.ma&&c.reset&&(Rb(this,"Resetting "+c.type),c.reset())}};l.start=function(a,b){for(var c=Db(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};
break;case "?":if(g[1]){HB(a,b.substr(1));break}var Wm="commands:",Xm;for(Xm in LB)Wm+="\n"+Aa(Xm,7)+LB[Xm];Sg(a)||(Wm+="\nnote: frequency/history disabled if no exec breakpoints");a.P(Wm);break;default:a.P("unknown command: "+b),d=!1}}}catch(qu){a.P("debugger error: "+(qu.stack||qu.message)),d=!1}return d}function My(a,b,c){b=a.Eg(b,c);for(var d in b)if(!xA(a,b[+d]))return!1;return!0}
var kA={16:262144,19:524288,21:32768,22:65536,28:2048,33:134217728,51:16777216},jA=[26,28,40,42,109],LB={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory",f:"frequencies","g [#]":"go [to #]",h:"halt","i [#]":"input port #","if":"eval expression",k:"stack trace",l:"load sector(s)",ln:"list nearest symbol(s)",m:"messages",mouse:"mouse action","o [#]":"output port #",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",
"t [#]":"trace","u [#]":"unassemble",x:"execution options",v:"print version","var":"assign variable"},qz=0,iz=1,Sy=2,tz=3,rz=4,jz=5,GA=18,HA=28,CA=36,LA=80,IA=104,JA=107,AA=176,zA="INVALID AAA AAD AAM AAS ADC ADD AND ARPL AS: BOUND BSF BSR BT BTC BTR BTS CALL CBW CLC CLD CLI CLTS CMC CMP CMPSB CMPSW CS: CWD DAA DAS DEC DIV DS: ENTER ES: ESC FS: GS: HLT IBTS IDIV IMUL IN INC INS INT INT3 INTO IRET JBE JC JCXZ JG JGE JL JLE JMP JA JNC JNO JNP JNS JNZ JO JP JS JZ LAHF LAR LDS LEA LEAVE LES LFS LGDT LGS LIDT LLDT LMSW LOADALL LOCK LODSB LODSW LOOP LOOPNZ LOOPZ LSL LSS LTR MOV MOVSB MOVSW MOVSX MOVZX MUL NEG NOP NOT OR OS: OUT OUTS POP POPA POPF PUSHF PUSHA PUSH RCL RCR REPNZ REPZ RET RETF ROL ROR SAHF SALC SAR SBB SCASB SCASW SETBE SETC SETG SETGE SETL SETLE SETNBE SETNC SETNO SETNP SETNS SETNZ SETO SETP SETS SETZ SGDT SHL SHLD SHR SHRD SIDT SLDT SMSW SS: STC STD STI STOSB STOSW STR SUB TEST VERR VERW WAIT XBTS XCHG XLAT XOR".split(" "),
EA="FLD FST FSTP FXCH FILD FIST FISTP FBLD FBSTP FADD FADDP FIADD FSUB FSUBP FISUB FSUBR FSUBRP FISUBR FMUL FMULP FIMUL FDIV FDIVP FIDIV FDIVR FDIVRP FIDIVR FSQRT FSCALE FPREM FRNDINT FXTRACT FABS FCHS FCOM FCOMP FCOMPP FICOM FICOMP FTST FXAM FPTAN FPATAN F2XM1 FYL2X FYL2XP1 FLDZ FLD1 FLDPI FLDL2T FLDL2E FLDLG2 FLDLN2 FINIT FNINIT FDISI FNDISI FENI FNENI FLDCW FSTCW FNSTCW FSTSW FNSTSW FCLEX FNCLEX FSTENV FNSTENV FLDENV FSAVE FNSAVE FRSTOR FINCSTP FDECSTP FFREE FFREEP FNOP FWAIT FSETPM FSINCOS FSTSWAX".split(" "),
GB=["VALID","ZERO ","SPEC ","EMPTY"],MA=2,NA=3,oB=[8086,80186,80286,80386],xz=0,yz=1,zz=2,Az=3,Bz=4,Cz=5,Dz=6,Ez=7,Fz=8,Gz=9,Hz=10,Iz=11,Jz=12,Kz=13,Lz=14,Mz=15,Oz=16,Nz=22,hA=23,Vz=24,Wz=25,Xz=26,Yz=27,Zz=28,$z=29,aA=30,bA=31,cA=32,dA=33,eA=34,fA=35,sB=40,uB=48,gA=56,vz=["AL","CL","DL","BL","AH","CH","DH","BH","AX","CX","DX","BX","SP","BP","SI","DI","ES","CS","SS","DS","FS","GS","IP","PS","EAX","ECX","EDX","EBX","ESP","EBP","ESI","EDI","CR0","CR1","CR2","CR3",null,null,null,null,"DR0","DR1","DR2",
"DR3",null,null,"DR6","DR7",null,null,null,null,null,null,"TR6","TR7","EIP"],Pz=0,Qz=1,Rz=2,Sz=3,Tz=4,Uz=5,TA="BX+SI BX+DI BP+SI BP+DI SI DI BP BX EAX ECX EDX EBX ESP EBP ESI EDI".split(" "),OA=15,RA=240,jB=3840,PA=0,U=1,dB=2,T=3,S=4,UA=5,VA=7,QA=8,hB=9,iB=10,WA=11,XA=11,YA=12,ZA=12,$A=13,aB=14,V=0,cB=16,fB=32,gB=48,mB=64,nB=80,X=96,kB=112,R=128,SA=160,lB=192,qB=208,rB=224,tB=240,MB=xz<<8|X|U,NB=yz<<8|X|U,OB=Fz<<8|X|S,PB=Gz<<8|X|S,QB=Hz<<8|X|S,RB=Iz<<8|X|S,SB=Jz<<8|X|S,TB=Kz<<8|X|S,UB=Lz<<8|X|S,VB=
Mz<<8|X|S,WB=Pz<<8|kB|T,XB=Qz<<8|kB|T,YB=Rz<<8|kB|T,ZB=Sz<<8|kB|T,$B=Tz<<8|kB|T,aC=Uz<<8|kB|T,W=12288,bC=MA<<14,Y=NA<<14,KA=14,mA=1E3,Oy=[0,PA],Py=[AA,T|W],Ny=[[6,R|U|W,U|4272],[6,R|S|W,S|4272],[6,176|U|W,R|U|4096],[6,176|S|W,R|S|4096],[6,MB|W,V|U|4096],[6,OB|W,V|S|4096],[108,WB|4096],[103,WB|8192],[99,R|U|W,U|4272],[99,R|S|W,S|4272],[99,176|U|W,R|U|4096],[99,176|S|W,R|S|4096],[99,MB|W,V|U|4096],[99,OB|W,V|S|4096],[108,XB|4096],[103,XB|8192],[5,R|U|W,U|4272],[5,R|S|W,S|4272],[5,176|U|W,R|U|4096],
[5,176|S|W,R|S|4096],[5,MB|W,V|U|4096],[5,OB|W,V|S|4096],[108,YB|4096],[103,YB|8192],[120,R|U|W,U|4272],[120,R|S|W,S|4272],[120,176|U|W,R|U|4096],[120,176|S|W,R|S|4096],[120,MB|W,V|U|4096],[120,OB|W,V|S|4096],[108,ZB|4096],[103,ZB|8192],[7,R|U|W,U|4272],[7,R|S|W,S|4272],[7,176|U|W,R|U|4096],[7,176|S|W,R|S|4096],[7,MB|W,V|U|4096],[7,OB|W,V|S|4096],[35,QA],[29],[154,R|U|W,U|4272],[154,R|S|W,S|4272],[154,176|U|W,R|U|4096],[154,176|S|W,R|S|4096],[154,MB|W,V|U|4096],[154,OB|W,V|S|4096],[27,QA],[30],[162,
R|U|W,U|4272],[162,R|S|W,S|4272],[162,176|U|W,R|U|4096],[162,176|S|W,R|S|4096],[162,MB|W,V|U|4096],[162,OB|W,V|S|4096],[147,QA],[1],[24,R|U|4096,U|4272],[24,R|S|4096,S|4272],[24,U|4272,R|U|4096],[24,S|4272,R|S|4096],[24,MB|4096,V|U|4096],[24,OB|4096,V|S|4096],[33,QA],[4],[44,OB|W],[44,PB|W],[44,QB|W],[44,RB|W],[44,SB|W],[44,TB|W],[44,UB|W],[44,VB|W],[31,OB|W],[31,PB|W],[31,QB|W],[31,RB|W],[31,SB|W],[31,TB|W],[31,UB|W],[31,VB|W],[108,OB|4096],[108,PB|4096],[108,QB|4096],[108,RB|4096],[108,SB|4096],
[108,TB|4096],[108,UB|4096],[108,VB|4096],[103,OB|8192],[103,PB|8192],[103,QB|8192],[103,RB|8192],[103,SB|8192],[103,TB|8192],[103,UB|8192],[103,VB|8192],[JA,PA|bC],[IA,PA|bC],[10,S|4272|bC,R|S|4096],[8,R|T|8192,T|4272],[37,QA|Y],[38,QA|Y],[100,QA|Y],[9,QA|Y],[108,V|S|4096|bC],[42,176|T|W|bC,R|S|4096,V|S|4096],[108,V|dB|4096|bC],[42,T|8368|bC,R|S|4096,V|U|4096],[45,nB|U|8192|bC,QB|4096],[45,nB|S|8192|bC,QB|4096],[102,QB|4096|bC,mB|U|4096],[102,QB|4096|bC,mB|S|4096],[64,gB|U|4096],[60,gB|U|4096],[51,
gB|U|4096],[59,gB|U|4096],[67,gB|U|4096],[63,gB|U|4096],[50,gB|U|4096],[58,gB|U|4096],[66,gB|U|4096],[62,gB|U|4096],[65,gB|U|4096],[61,gB|U|4096],[55,gB|U|4096],[54,gB|U|4096],[56,gB|U|4096],[53,gB|U|4096],[163,R|U|W,V|U|4096],[164,R|S|W,V|S|4096],[163,R|U|W,V|U|4096],[165,R|S|W,V|U|4096],[155,R|U|4096,U|4272],[155,R|S|4096,S|4272],[160,176|U|W,R|U|W],[160,176|S|W,R|S|W],[90,R|U|8192,U|4272],[90,R|S|8192,S|4272],[90,U|8368,R|U|4096],[90,S|8368,R|S|4096],[90,R|S|8192,lB|T|4096],[71,S|8368,144|S],[90,
lB|T|8192,R|S|4096],[103,R|S|8192],[97],[160,OB|W,PB|W],[160,OB|W,QB|W],[160,OB|W,RB|W],[160,OB|W,SB|W],[160,OB|W,TB|W],[160,OB|W,UB|W],[160,OB|W,VB|W],[GA],[HA],[17,V|VA|4096],[158],[106],[105],[117],[68],[90,MB|8192,fB|U|4096],[90,OB|8192,fB|S|4096],[90,fB|U|8192,MB|4096],[90,fB|S|8192,OB|4096],[91,nB|U|8192,mB|U|4096],[92,nB|S|8192,mB|S|4096],[25,nB|U|4096,mB|U|4096],[26,nB|S|4096,mB|S|4096],[155,MB|4096,V|U|4096],[155,OB|4096,V|S|4096],[151,nB|U|8192,MB|4096],[152,nB|S|8192,OB|4096],[82,MB|8192,
mB|U|4096],[83,OB|8192,mB|S|4096],[121,MB|4096,nB|U|4096],[122,OB|4096,nB|S|4096],[90,MB|8192,V|U|4096],[90,NB|8192,V|U|4096],[90,zz<<8|X|U|8192,V|U|4096],[90,Az<<8|X|U|8192,V|U|4096],[90,Bz<<8|X|U|8192,V|U|4096],[90,Cz<<8|X|U|8192,V|U|4096],[90,Dz<<8|X|U|8192,V|U|4096],[90,Ez<<8|X|U|8192,V|U|4096],[90,OB|8192,V|S|4096],[90,PB|8192,V|S|4096],[90,QB|8192,V|S|4096],[90,RB|8192,V|S|4096],[90,SB|8192,V|S|4096],[90,TB|8192,V|S|4096],[90,UB|8192,V|S|4096],[90,VB|8192,V|S|4096],[166,R|U|W|16384,V|U|4096],
[167,R|S|W|16384,V|U|4096],[113,V|T|4096],[113],[73,S|8368,4246],[70,S|8368,4246],[90,R|U|8192,V|U|4096],[90,R|S|8192,V|S|4096],[34,V|T|4096|bC,V|U|4096],[72,PA|bC],[114,V|T|4096],[114],[47],[46,V|U|4096],[48],[49],[168,R|U|W,cB|U|4096],[169,R|S|W,cB|U|4096],[170,R|U|W,NB|4096],[171,R|S|W,NB|4096],[3,V|U],[2,V|U],[118],[161],[CA,R|S|4096],[CA,R|S|4096],[CA,R|S|4096],[CA,R|S|4096],[CA,R|S|4096],[CA,R|S|4096],[CA,R|S|4096],[CA,R|S|4096],[85,gB|U|4096],[86,gB|U|4096],[84,gB|U|4096],[52,gB|U|4096],[43,
MB|8192,V|U|4096],[43,OB|8192,V|U|4096],[101,V|U|4096,MB|4096],[101,V|U|4096,OB|4096],[17,gB|S|4096],[57,gB|S|4096],[57,V|VA|4096],[57,gB|U|4096],[43,MB|8192,QB|T|4096],[43,OB|8192,QB|T|4096],[101,QB|T|4096,MB|4096],[101,QB|T|4096,OB|4096],[81,QA],[0],[111,QA],[112,QA],[39],[23],[172,R|U|W],[173,R|S|W],[19],[148],[21],[150],[20],[149],[174,R|U|W],[175,R|S|W]],BA={0:[177,R|T|W],1:[178,R|T|W],2:[69,T|8368|bC,T|4240],3:[87,T|8368|bC,T|4240],5:[LA,bC],6:[22,bC],7:[LA,Y],32:[90,SA|UA|8192|Y,qB|UA|4096],
33:[90,SA|UA|8192|Y,rB|UA|4096],34:[90,qB|UA|8192|Y,SA|UA|4096],35:[90,rB|UA|8192|Y,SA|UA|4096],36:[90,SA|UA|8192|Y,tB|UA|4096],38:[90,tB|UA|8192|Y,SA|UA|4096],128:[64,gB|S|4096|Y],129:[60,gB|S|4096|Y],130:[51,gB|S|4096|Y],131:[59,gB|S|4096|Y],132:[67,gB|S|4096|Y],133:[63,gB|S|4096|Y],134:[50,gB|S|4096|Y],135:[58,gB|S|4096|Y],136:[66,gB|S|4096|Y],137:[62,gB|S|4096|Y],138:[65,gB|S|4096|Y],139:[61,gB|S|4096|Y],140:[55,gB|S|4096|Y],141:[54,gB|S|4096|Y],142:[56,gB|S|4096|Y],143:[53,gB|S|4096|Y],144:[135,
R|U|8192|Y],145:[131,R|U|8192|Y],146:[124,R|U|8192|Y],147:[130,R|U|8192|Y],148:[138,R|U|8192|Y],149:[134,R|U|8192|Y],150:[123,R|U|8192|Y],151:[129,R|U|8192|Y],152:[137,R|U|8192|Y],153:[133,R|U|8192|Y],154:[136,R|U|8192|Y],155:[132,R|U|8192|Y],156:[127,R|U|8192|Y],157:[126,R|U|8192|Y],158:[128,R|U|8192|Y],159:[125,R|U|8192|Y],160:[108,$B|4096|Y],161:[103,$B|8192|Y],163:[13,R|S|4096|Y,S|4272],164:[141,R|S|8192|Y,S|4272,V|U|4096],165:[141,R|S|8192|Y,S|4272,NB|4096],166:[159,S|8368|Y,R|S|4096,OB|4096,
NB|4096],167:[40,R|S|8192|Y,OB|4096,NB|4096,S|4272],168:[108,aC|4096|Y],169:[103,aC|8192|Y],171:[16,R|S|8192|Y,S|4272],172:[143,R|S|8192|Y,S|4272,V|U|4096],173:[143,R|S|8192|Y,S|4272,NB|4096],175:[42,R|S|W|Y,S|4272],178:[88,S|8368,4246],179:[15,R|S|8192|Y,S|4272],180:[74,S|8368,4246],181:[76,S|8368,4246],182:[94,S|8368|Y,R|U|4096],183:[94,UA|8368|Y,R|T|4096],186:[179,R|S|W|Y,V|U|4096],187:[14,R|S|8192|Y,S|4272],188:[11,S|8368|Y,R|S|4096],189:[12,S|8368|Y,R|S|4096],190:[93,S|8368|Y,R|U|4096],191:[93,
UA|8368|Y,R|T|4096]},DA={216:{0:[9,R|XA|4096],1:[18,R|XA|4096],2:[34,R|XA|4096],3:[35,R|XA|4096],4:[12,R|XA|4096],5:[15,R|XA|4096],6:[21,R|XA|4096],7:[24,R|XA|4096],48:[9,X|hB|8192,X|iB|4096],49:[18,X|hB|8192,X|iB|4096],50:[34,X|hB|8192,X|iB|4096],51:[35,X|hB|8192,X|iB|4096],52:[12,X|hB|8192,X|iB|4096],53:[15,X|hB|8192,X|iB|4096],54:[21,X|hB|8192,X|iB|4096],55:[24,X|hB|8192,X|iB|4096]},217:{0:[0,R|XA|4096],2:[1,R|XA|8192],3:[2,R|XA|8192],4:[68,R|4111],5:[59,R|T|4096],6:[66,R|8207],7:[60,R|T|8192],
48:[0,X|iB|8192],49:[3,X|iB|8192],50:[76],51:[2,X|iB|8192],64:[33],65:[32],68:[39],69:[40],80:[47],81:[49],82:[50],83:[48],84:[51],85:[52],86:[46],96:[43],97:[44],98:[41],99:[42],100:[31],102:[73],103:[72],112:[29],113:[45],114:[27],116:[30],117:[28]},218:{0:[11,R|WA|4096],1:[20,R|WA|4096],2:[37,R|WA|4096],3:[38,R|WA|4096],4:[14,R|WA|4096],5:[17,R|WA|4096],6:[23,R|WA|4096],7:[26,R|WA|4096]},219:{0:[4,R|WA|4096],2:[5,R|WA|8192],3:[6,R|WA|8192],5:[0,R|$A|4096],7:[2,R|$A|8192],64:[57],65:[55],66:[64],
67:[53],68:[78,bC],115:[79,Y]},220:{0:[9,R|ZA|4096],1:[18,R|ZA|4096],2:[34,R|ZA|4096],3:[35,R|ZA|4096],4:[12,R|ZA|4096],5:[15,R|ZA|4096],6:[21,R|ZA|4096],7:[24,R|ZA|4096],48:[9,X|iB|8192,X|hB|4096],49:[18,X|iB|8192,X|hB|4096],50:[34,X|iB|4096],51:[35,X|iB|4096],52:[15,X|iB|8192,X|hB|4096],53:[12,X|iB|8192,X|hB|4096],54:[24,X|iB|8192,X|hB|4096],55:[21,X|iB|8192,X|hB|4096]},221:{0:[0,R|ZA|4096],2:[1,R|ZA|8192],3:[2,R|ZA|8192],4:[71,R|4111],6:[69,R|8207],7:[62,R|T|8192],48:[74,X|iB|4096],49:[3,X|iB|
8192],50:[1,X|iB|4096],51:[2,X|iB|4096]},222:{0:[11,R|T|4096],1:[20,R|T|4096],2:[37,R|T|4096],3:[38,R|T|4096],4:[14,R|T|4096],5:[17,R|T|4096],6:[23,R|T|4096],7:[26,R|T|4096],48:[10,X|iB|8192,X|hB|4096],49:[19,X|iB|8192,X|hB|4096],50:[35,X|iB|4096],51:[36,X|iB|4096],52:[16,X|iB|8192,X|hB|4096],53:[13,X|iB|8192,X|hB|4096],54:[25,X|iB|8192,X|hB|4096],55:[22,X|iB|8192,X|hB|4096]},223:{0:[4,R|T|4096],2:[5,R|T|8192],3:[6,R|T|8192],4:[7,R|aB|4096],5:[4,R|YA|4096],6:[8,R|aB|8192],7:[6,R|YA|8192],48:[75,X|
iB|4096],49:[3,X|iB|8192],50:[2,X|iB|4096],51:[2,X|iB|4096],52:[80,bC]}},FA=[[[6,R|U|W,V|U|4096],[99,R|U|W,V|U|4096],[5,R|U|W,V|U|4096],[120,R|U|W,V|U|4096],[7,R|U|W,V|U|4096],[154,R|U|W,V|U|4096],[162,R|U|W,V|U|4096],[24,R|U|4096,V|U|4096]],[[6,R|S|W,V|S|4096],[99,R|S|W,V|S|4096],[5,R|S|W,V|S|4096],[120,R|S|W,V|S|4096],[7,R|S|W,V|S|4096],[154,R|S|W,V|S|4096],[162,R|S|W,V|S|4096],[24,R|S|4096,V|S|4096]],[[6,R|S|W,V|dB|4096],[99,R|S|W,V|dB|4096],[5,R|S|W,V|dB|4096],[120,R|S|W,V|dB|4096],[7,R|S|W,V|
dB|4096],[154,R|S|W,V|dB|4096],[162,R|S|W,V|dB|4096],[24,R|S|4096,V|dB|4096]],[[115,R|U|W|bC,V|U|4096],[116,R|U|W|bC,V|U|4096],[109,R|U|W|bC,V|U|4096],[110,R|U|W|bC,V|U|4096],[140,R|U|W|bC,V|U|4096],[142,R|U|W|bC,V|U|4096],Oy,[119,R|U|W|bC,V|U|4096]],[[115,R|S|W|bC,V|U|4096],[116,R|S|W|bC,V|U|4096],[109,R|S|W|bC,V|U|4096],[110,R|S|W|bC,V|U|4096],[140,R|S|W|bC,V|U|4096],[142,R|S|W|bC,V|U|4096],Oy,[119,R|S|W|bC,V|U|4096]],[[115,R|U|W,cB|U|4096],[116,R|U|W,cB|U|4096],[109,R|U|W,cB|U|4096],[110,R|U|W,
cB|U|4096],[140,R|U|W,cB|U|4096],[142,R|U|W,cB|U|4096],Oy,[119,R|U|W,cB|U|4096]],[[115,R|S|W,cB|U|4096],[116,R|S|W,cB|U|4096],[109,R|S|W,cB|U|4096],[110,R|S|W,cB|U|4096],[140,R|S|W,cB|U|4096],[142,R|S|W,cB|U|4096],Oy,[119,R|S|W,cB|U|4096]],[[115,R|U|W,NB|4096],[116,R|U|W,NB|4096],[109,R|U|W,NB|4096],[110,R|U|W,NB|4096],[140,R|U|W,NB|4096],[142,R|U|W,NB|4096],Oy,[119,R|U|W,NB|4096]],[[115,R|S|W,NB|4096],[116,R|S|W,NB|4096],[109,R|S|W,NB|4096],[110,R|S|W,NB|4096],[140,R|S|W,NB|4096],[142,R|S|W,NB|4096],
Oy,[119,R|S|W,NB|4096]],[[155,R|U|4096,V|U|4096],Oy,[98,R|U|W],[96,R|U|W],[95,R|U|4096],[42,R|U|W],[32,R|U|4096],[41,R|U|W]],[[155,R|S|4096,V|S|4096],Oy,[98,R|S|W],[96,R|S|W],[95,R|S|4096],[42,R|S|W],[32,R|S|4096],[41,R|S|W]],[[44,R|U|W],[31,R|U|W],Oy,Oy,Oy,Oy,Oy,Oy],[[44,R|S|W],[31,R|S|W],[17,R|S|4096],[17,R|VA|4096],[57,R|S|4096],[57,R|VA|4096],[108,R|S|4096],Oy],[],[[145,R|T|8192|bC],[153,R|T|8192|bC],[78,R|T|4096|bC],[89,R|T|4096|bC],[156,R|T|4096|bC],[157,R|T|4096|bC],Oy,Oy],[[139,R|T|8192|bC],
[144,R|T|8192|bC],[75,R|T|4096|bC],[77,R|T|4096|bC],[146,R|T|8192|bC],Oy,[79,R|T|4096|bC],Oy],[Oy,Oy,Oy,Oy,[13,R|S|4096|Y,V|U|4096],[16,R|S|8192|Y,V|U|4096],[15,R|S|8192|Y,V|U|4096],[14,R|S|8192|Y,V|U|4096]]],Ty={256:["tss286",!1],512:["ldt",!1],768:["busy tss286",!1],1024:["call gate",!0],1280:["task gate",!0],1536:["int gate286",!0],1792:["trap gate286",!0],2304:["tss386",!1],2816:["busy tss386",!1],3072:["call gate386",!0],3584:["int gate386",!0],3840:["trap gate386",!0]},Xy={PREV_TSS:0,CPL0_SP:2,
CPL0_SS:4,CPL1_SP:6,CPL1_SS:8,CPL2_SP:10,CPL2_SS:12,TASK_IP:14,TASK_PS:16,TASK_AX:18,TASK_CX:20,TASK_DX:22,TASK_BX:24,TASK_SP:26,TASK_BP:28,TASK_SI:30,TASK_DI:32,TASK_ES:34,TASK_CS:36,TASK_SS:38,TASK_DS:40,TASK_LDT:42},Yy={PREV_TSS:0,CPL0_ESP:4,CPL0_SS:8,CPL1_ESP:12,CPL1_SS:16,CPL2_ESP:20,CPL2_SS:24,TASK_CR3:28,TASK_EIP:32,TASK_PS:36,TASK_EAX:40,TASK_ECX:44,TASK_EDX:48,TASK_EBX:52,TASK_ESP:56,TASK_EBP:60,TASK_ESI:64,TASK_EDI:68,TASK_ES:72,TASK_CS:76,TASK_SS:80,TASK_DS:84,TASK_FS:88,TASK_GS:92,TASK_LDT:96,
TASK_IOPM:100};cb(function(){for(var a=Bb(document,"pcx86","debugger"),b=0;b<a.length;b++){var c=a[b],d=Cb(c),d=new Hy(d);Ab(d,c)}});
function cC(a,b,c){rb.call(this,"Computer",a,67108864);var d=this;dC(this,b);this.W=Fd(this,"autoPower",a);this.D=0;this.oa=a.busWidth||a.buswidth;this.A=eC;this.M=null;this.J=this.ga=!1;this.qa=Fd(this,"url")||"";this.ra=(Math.random()+.1).toString(36).substr(2,12);this.B=fC(this);if(this.H=zb("CPU",this.id)){this.ca=zb("Debugger",this.id);this.C=[];for(b=null;b=bc(this,"Video",b);)this.C.push(b);this.ma=new rc({id:this.De+".bus",busWidth:this.oa},this.H,this.ca);var e,f=Db(this.id);this.I=(this.F=
zb("Panel",this.id))&&this.F.na.print;this.ha=this.Ca;this.ka=this.print;this.la=this.P;this.I&&(this.ha=this.F.Ca,this.ka=this.F.print,this.la=this.F.P);for(b=0;b<f.length;b++)e=f[b],e.Ca=function(a,b,c){gC(d,a);return d.ha.call(this,a,b,c)}.bind(e),e.print=function(a){return d.ka.call(this,a)}.bind(e),e.P=function(a,b,c){gC(d,a,b);return d.la.call(this,a,b,c)}.bind(e);this.O=0;this.I||hC(this);this.P("PCx86 v1.36.0\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");
for(b=0;b<f.length;b++)e=f[b],e.uc&&e.uc(this,this.ma,this.H,this.ca);b=null;e=Fd(this,"resume");void 0!==e&&(1<e.length?b=this.L=e:this.A=parseInt(e,10));e=!1;f=Xa("state");f||(e=!0,f=Fd(this,"state",a));f&&(b=this.Z=f,e||(this.J=!0,this.A=eC),this.A&&(this.N=new fg(this,"1.36.0"),this.N.load()?b=null:delete this.N));!b&&this.A&&(b=iC(this))&&(this.J=!0);if(this.aa=b){var g="Loading "+this.aa+"...";Na(this.aa,null,!0,function(a,b,c){c?(d.L=null,d.J=!1,d.Ca("Unable to load machine state from server (error "+
c+(b?": "+Ba(b):"")+")")):(d.M=b,d.ga=!0);Ob(d)},function(){d.P(g,Lb.Fe)})}else Ob(this);this.na.power||(this.W=!0);!c&&this.W&&jC(this,this.$e)}else mb("Unable to find CPU component")}ba(cC,rb);function FB(a){a.I&&(a.I.value="")}function hC(a){for(var b=0;b<a.C.length;b++){var c=a.C[b];c&&(c=c.rg)&&(c.style.opacity="1",c.style.lineHeight="1",a.O++)}}function gC(a,b,c){if(a.O)for(var d=0;d<a.C.length;d++){var e=a.C[d];e&&(e=e.rg)&&(c!=Lb.Fe||"..."!=b.slice(-3)?wb(e,b+"\n"):xb(e,b,b+"."))}}
function dC(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){mb(d.message+" ("+c+")")}}a.K=b}function Fd(a,b,c){var d=Xa(b);void 0===d&&a.K&&(d=a.K[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function jC(a,b,c){for(var d=Db(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Nb(f)){Nb(f,function(){jC(a,b,c)});return}}b.call(a,c)}
function kC(a,b){var c=new fg(a,"1.36.0",lC);if(c.load()&&mC(c)){var d=c.get(nC),e=b?b.get(nC):"unknown";d!=e&&(a.Ca("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}l=cC.prototype;
l.$e=function(a){void 0===a&&(a=this.A||(this.M?oC:eC));if(!this.D){this.D++;var b=!1,c=!1;this.ea=!1;var d=this.N||new fg(this,"1.36.0");if(a==Ld)b=!0;else if(a>eC){if(d.load(this.M)){this.G=new fg(this,"1.36.0",pC);this.G.load()&&(a!=oC&&qC(this,d)&&(a=rC),sC(this.G));this.G.set(nC,Ea());tC(this.G);var e=this.A&&!this.J;if(a==oC||vb("Click OK to restore the previous PCx86 machine state.")){if(c=mC(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=g?(this.Ca("Error: "+
g),"unable to verify user"==g&&(Va(uC,""),this.B=null)):this.P(f+": "+g),sC(d),d.load()?(c=mC(d),e=!0):c=!1))}e&&kC(this,c?d:null)}else a==rC&&d.clear()}else kC(this);delete this.M;delete this.N}e=Db(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.H&&(c=vC(this,g,d,b,c));b=[d,a,c];a!=Ld?jC(this,this.rj,b):this.rj(b)}};
function vC(a,b,c,d,e){if(!b.ba.Zb){b.ba.Zb=!0;if(b.Yb){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/-[0-9]+\./i,"."))));"string"===typeof f&&(f=null);!b.Yb(f,d)&&f&&(b.Ca("Unable to restore hardware state")&&(a.Z&&!a.ga?(c.clear(),a.A=eC,window&&window.location.reload()):a.ea=!0),b.Yb(null),e=!1)}b.ba.rf=!0;if(!d&&b.yj)for(a=b.yj.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
l.rj=function(a){var b=a[0],c=0>a[1];a=a[2];if(!this.ba.rf){for(var d=0;d<this.C.length;d++){var e=this.C[d];if(e&&(e=e.rg)){var f=Qa();e.style.opacity="0";e.style.lineHeight="0";if(0<=f.indexOf("MSIE")||0<=f.indexOf("Trident"))e.style.fontSize="0";e.value=""}}this.O=0;this.ba.rf=!0}this.ba.Zb=!0;if(d=this.na.power)d.textContent="Shutdown";this.H&&(vC(this,this.H,b,c,a),this.H.je());this.ea&&(qC(this,b),b.clear());!c&&this.G&&(this.G.clear(),delete this.G);this.D=0};
function qC(a,b){if(!a.ba.Ae){if(vb("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.36.0"};d.url=a.qa;d.user=c;d.type="bug";d.data=b;Na("http://www.pcjs.org/api/v1/report",d,!0)}return!0}return!1}
function KB(a,b,c){var d,e="none";if(a.D)return null;a.D--;var f=new fg(a,"1.36.0"),g=new fg(a,"1.36.0",lC),h=Ea();g.set(nC,h);f.set(nC,h);f.set(wC,"1.36.0");f.set(xC,window?window.location.href:null);f.set(yC,Qa());a.H&&a.H.Xb&&(d=a.H.Xb(b,c),"object"===typeof d&&f.set(a.H.id,d),c&&(a.H.ba.Zb=!1,!1===d&&(e=null)));for(var h=Db(a.id),k=0;k<h.length;k++){var m=h[k];m.ba.Zb&&(m.Xb&&(d=m.Xb(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.ba.Zb=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&zC(a,a.B,f.toString()),
tC(g)&&tC(f)||(e=null,d=h=!0)):a.A&&(d=!0,h=a.A==JC),d&&f.clear(h)):e=f.toString());c&&(a.ba.Zb=!1,b=a.na.power)&&(b.textContent="Power");a.D=0;return e}l.reset=function(){this.ma&&this.ma.reset&&(Rb(this,"Resetting "+this.ma.type),this.ma.reset());for(var a=Db(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.ma&&c.reset&&(Rb(this,"Resetting "+c.type),c.reset())}};l.start=function(a,b){for(var c=Db(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};
l.stop=function(a,b){for(var c=Db(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
l.Bb=function(a,b,c){var d=this;switch(b){case "power":return this.na[b]=c,c.onclick=function(){d.D||(d.ba.Zb?IB(d,!1,!0):hC(d,d.$e))},!0;case "reset":return this.na[b]=c,c.onclick=function(){if(d.ba.Zb&&!d.D)if(d.H&&(d.H.ba.je=d.H.ba.ab),d.A&&!d.L){var a=d.ba.Ae||!vb("Click OK to reset this PCx86 machine and discard all disk modifications.");IB(d,a,!0);!a&&d.Z?window&&window.location.reload():(a||(d.Y=!0),d.$e(cC),d.Y=!1)}else d.reset(),d.H&&d.H.je()},!0;case "save":if(xa(Pa(),"pcjs.org"))c.parentNode.removeChild(c);
else return this.na[b]=c,c.onclick=function(){var a=dC(d,!0);if(a){var b=!!(d.A&&!d.L||d.Z),c=IB(d,b);b?xC(d,a,c):d.Ca("Resume disabled, machine state not saved")}},!0}return!1};
function dC(a,b){var c=a.B;c||((c=Ua(sC),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=IC(a,c))||a.Ca("The user ID is invalid.")):b&&a.Ca("Browser local storage is not available"));return c}
function IC(a,b){a.B=null;b=Na(Pa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Va(sC,b.data),a.B=b.data)}catch(d){mb(d.message+" ("+c+")")}return a.B}function gC(a){var b=null;a.B&&(b=Pa()+"/api/v1/user?req=load&user="+a.B+"&state="+JC(a,"1.36.0"));return b}
function xC(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=JC(a,"1.36.0");d.data=c;b=Na(Pa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.Ca("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.Ca(c),Va(sC,""),a.B=null)}}
l.Bb=function(a,b,c){var d=this;switch(b){case "power":return this.na[b]=c,c.onclick=function(){d.D||(d.ba.Zb?KB(d,!1,!0):jC(d,d.$e))},!0;case "reset":return this.na[b]=c,c.onclick=function(){if(d.ba.Zb&&!d.D)if(d.H&&(d.H.ba.je=d.H.ba.ab),d.A&&!d.L){var a=d.ba.Ae||!vb("Click OK to reset this PCx86 machine and discard all disk modifications.");KB(d,a,!0);!a&&d.Z?window&&window.location.reload():(a||(d.Y=!0),d.$e(eC),d.Y=!1)}else d.reset(),d.H&&d.H.je()},!0;case "save":if(xa(Pa(),"pcjs.org"))c.parentNode.removeChild(c);
else return this.na[b]=c,c.onclick=function(){var a=fC(d,!0);if(a){var b=!!(d.A&&!d.L||d.Z),c=KB(d,b);b?zC(d,a,c):d.Ca("Resume disabled, machine state not saved")}},!0}return!1};
function fC(a,b){var c=a.B;c||((c=Ua(uC),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=KC(a,c))||a.Ca("The user ID is invalid.")):b&&a.Ca("Browser local storage is not available"));return c}
function KC(a,b){a.B=null;b=Na(Pa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Va(uC,b.data),a.B=b.data)}catch(d){mb(d.message+" ("+c+")")}return a.B}function iC(a){var b=null;a.B&&(b=Pa()+"/api/v1/user?req=load&user="+a.B+"&state="+LC(a,"1.36.0"));return b}
function zC(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=LC(a,"1.36.0");d.data=c;b=Na(Pa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.Ca("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.Ca(c),Va(uC,""),a.B=null)}}
function bc(a,b,c){a=Db(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}l.nd=function(a){if(this.C.length){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);var d=this.C[0];d.D&&d.D.focus();!a&&window&&window.scrollTo(b,c)}};
function Wd(a,b){a.H&&(a=a.H,a.xj&&(b||!a.ba.ab||a.ba.pj)&&(Rg(a,"EAX",a.D),Rg(a,"EBX",a.G),Rg(a,"ECX",a.I),Rg(a,"EDX",a.L),Rg(a,"ESP",y(a)),Rg(a,"EBP",a.M),Rg(a,"ESI",a.K),Rg(a,"EDI",a.J),Rg(a,"CS",a.Z.U),Rg(a,"DS",a.Da.U),Rg(a,"SS",a.Y.U),Rg(a,"ES",a.oa.U),Rg(a,"EIP",z(a)),b=Ee(a),Rg(a,"PS",b),Rg(a,"V",b&2048),Rg(a,"D",b&1024),Rg(a,"I",b&512),Rg(a,"T",b&256),Rg(a,"S",b&128),Rg(a,"Z",b&64),Rg(a,"A",b&16),Rg(a,"P",b&4),Rg(a,"C",b&1),80386==a.da&&(Rg(a,"FS",a.Ga.U),Rg(a,"GS",a.Ia.U),Rg(a,"CR0",a.qa),
Rg(a,"CR2",a.qd),Rg(a,"CR3",a.Uc))),b=a.na.speed)&&(b.textContent=a.ba.ab&&a.T.Zd?a.T.Zd.toFixed(2)+"Mhz":"Stopped")}
function be(a,b){for(var c=0;c<a.C.length;c++)Qs(a.C[c],b);if(a.F&&(a=a.F,a.oa)){lc(a,mc,a.K,a.la);if(a.Ba){b=a.ma;var c=a.A,d,e;null==d&&(d=0);null==e&&(e=b.O-d|0);c||(c={eh:0,Id:0,Ug:[]});var f=d>>>b.A;d=d+e-1>>>b.A;c.eh=0;for(c.Id=0;f<=d;)e=b.aa[f],c.eh+=e.size,e.size&&(c.Ug.push(Ia(hc,f,0,0,e.type)),c.Id++),f++;a.A=c;a.ea=a.A.Id*a.ma.B/(gc*qc);d=0;a.A.dj=0;a.A.lf||(a.A.lf=[]);e=-1;b=0;for(var g=-1,c=0;c<a.A.Id;c++){var h=a.A.Ug[c],f=Ja(hc.type,h),h=Ja(hc.Nk,h);if(f!=e||h!=g+1)(g=c-b)&&(d+=oc(a,
b,g,e)),e=f,b=c;g=h}d+=oc(a,b,c-b,e);e=a.A.Gl!=d;a.A.Gl=d;if(e){e=new Zb(0,0,a.K.width,a.K.height);a.A.He=[];b=a.A.Id;for(d=0;d<a.A.dj;d++)c=a.A.lf[d].Id,a.A.He.push($b(e,c,b,!d)),b-=c;for(d=0;d<a.A.He.length;d++)e=a.A.lf[d],b=c=a.A.He[d],f=a.la,(g=Bd[e.type])||(g=new Yb),f.strokeStyle="black",f.strokeRect(b.x,b.y,b.Pc,b.A),f.fillStyle="string"==typeof g?g:g.toString(),f.fillRect(b.x,b.y,b.Pc,b.A),b=a,f=c,b.M=b.Z,b.J=b.aa,c=f.x+(f.Pc>>1),g=f.y+(f.A>>1),h=f.A,f.Pc<f.A&&(h=f.Pc,b.Y=!0,b.D.save(),b.D.translate(c,
g),b.D.rotate(-Math.PI/2),c=g=0),h<b.J&&(b.J=h,b.M=b.J+"px "+pc),f=g,b.B=c,b.I=f,b=a,e=Ac[e.type]+" ("+(e.Id*a.ma.B/1024|0)+"Kb)",b.D.font=b.M,b.B-=b.D.measureText(e).width>>1,b.I+=(b.J>>1)-2,nc(b,e),b.Y&&(b.D.restore(),b.Y=!1)}}else nc(a,"This space intentionally left blank");a.context.drawImage(a.K,0,0,a.K.width,a.K.height,a.Ga,a.La,a.xa,a.Aa);a.oa=!1}}var nC="failsafe",jC="validate",lC="timestamp",uC="version",vC="url",wC="browser",sC="user",Ld=-1,cC=0,mC=1,pC=2,HC=3;
cb(function(){for(var a=Bb(document,"pcx86-machine"),b=0;b<a.length;b++)for(var c=a[b],d=Cb(c),c=Bb(c,"pcx86","computer"),e=0;e<c.length;e++){var f=c[e],g=Cb(f),g=new aC(g,d,!0);Ab(g,f);g.W&&hC(g,g.$e)}});fb.show.push(function(){for(var a=Bb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=Cb(a[b]);if(c=zb("Computer",c.id))c.ba.Ae=!1,c.ba.rf&&!c.ba.Zb&&c.$e(Ld)}});
fb.exit.push(function(){for(var a=Bb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=Cb(a[b]);if(c=zb("Computer",c.id))c.ba.Ae=!0,c.ba.Zb&&IB(c,!(!c.A||c.L),!0)}});function fg(a,b,c){this.id=a.id;this.ca=a.ca;this.A="";this.state={};this.B=this.C=!1;this.key=JC(a,b,c);qC(this,a.Uk)}l=fg.prototype;l.set=function(a,b){try{this.state[a]=b}catch(c){}};l.get=function(a){return this.state[a]||null};l.data=function(){return this.state};
l.load=function(a){return a?(this.A=a,this.B=!0,this.C=!1,!0):this.B?!0:Sa()&&(a=Ua(this.key))?(this.A=a,this.B=!0):!1};function kC(a){var b=!0;if(!a.C)try{a.state=JSON.parse(a.A),a.C=!0}catch(c){mb(c.message||c),b=!1}return b}function rC(a){var b=!0;if(Sa()){var c=JSON.stringify(a.state);Va(a.key,c)||(mb("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}l.toString=function(){return this.state?JSON.stringify(this.state):this.A};
function qC(a,b){a.A="";a.state={};a.B=a.C=!1;b&&a.set("parms",b)}l.clear=function(a){qC(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,1);c=0}};function JC(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}var KC=0;
function LC(a,b,c,d,e,f){e("Loading "+a+"...");Na(a,null,!0,function(g,h,k){k?(h||(h="unable to load "+a+" ("+k+")"),f(h,null)):MC(h,a,b,c,d,e,f)})}
function MC(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(tb(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),d=d.replace(/\$/g,"$$$$"),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,
"$1PCx86$2"),a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?NC(a,f,h):h(a,null):g("no data"+(b?" for file: "+
g),b.D.rotate(-Math.PI/2),c=g=0),h<b.J&&(b.J=h,b.M=b.J+"px "+pc),f=g,b.B=c,b.I=f,b=a,e=Ac[e.type]+" ("+(e.Id*a.ma.B/1024|0)+"Kb)",b.D.font=b.M,b.B-=b.D.measureText(e).width>>1,b.I+=(b.J>>1)-2,nc(b,e),b.Y&&(b.D.restore(),b.Y=!1)}}else nc(a,"This space intentionally left blank");a.context.drawImage(a.K,0,0,a.K.width,a.K.height,a.Ga,a.La,a.xa,a.Aa);a.oa=!1}}var pC="failsafe",lC="validate",nC="timestamp",wC="version",xC="url",yC="browser",uC="user",Ld=-1,eC=0,oC=1,rC=2,JC=3;
cb(function(){for(var a=Bb(document,"pcx86-machine"),b=0;b<a.length;b++)for(var c=a[b],d=Cb(c),c=Bb(c,"pcx86","computer"),e=0;e<c.length;e++){var f=c[e],g=Cb(f),g=new cC(g,d,!0);Ab(g,f);g.W&&jC(g,g.$e)}});fb.show.push(function(){for(var a=Bb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=Cb(a[b]);if(c=zb("Computer",c.id))c.ba.Ae=!1,c.ba.rf&&!c.ba.Zb&&c.$e(Ld)}});
fb.exit.push(function(){for(var a=Bb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=Cb(a[b]);if(c=zb("Computer",c.id))c.ba.Ae=!0,c.ba.Zb&&KB(c,!(!c.A||c.L),!0)}});function fg(a,b,c){this.id=a.id;this.ca=a.ca;this.A="";this.state={};this.B=this.C=!1;this.key=LC(a,b,c);sC(this,a.Uk)}l=fg.prototype;l.set=function(a,b){try{this.state[a]=b}catch(c){}};l.get=function(a){return this.state[a]||null};l.data=function(){return this.state};
l.load=function(a){return a?(this.A=a,this.B=!0,this.C=!1,!0):this.B?!0:Sa()&&(a=Ua(this.key))?(this.A=a,this.B=!0):!1};function mC(a){var b=!0;if(!a.C)try{a.state=JSON.parse(a.A),a.C=!0}catch(c){mb(c.message||c),b=!1}return b}function tC(a){var b=!0;if(Sa()){var c=JSON.stringify(a.state);Va(a.key,c)||(mb("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}l.toString=function(){return this.state?JSON.stringify(this.state):this.A};
function sC(a,b){a.A="";a.state={};a.B=a.C=!1;b&&a.set("parms",b)}l.clear=function(a){sC(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,1);c=0}};function LC(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}var MC=0;
function NC(a,b,c,d,e,f){e("Loading "+a+"...");Na(a,null,!0,function(g,h,k){k?(h||(h="unable to load "+a+" ("+k+")"),f(h,null)):OC(h,a,b,c,d,e,f)})}
function OC(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(tb(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),d=d.replace(/\$/g,"$$$$"),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,
"$1PCx86$2"),a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?PC(a,f,h):h(a,null):g("no data"+(b?" for file: "+
b:""),null)}
function NC(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Na(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,p=/( [a-z]+=)(['"])(.*?)\2/gi;m=p.exec(f);)k=0>k.toLowerCase().indexOf(m[1].toLowerCase())?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+
"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,"");a=a.replace(d[0],g);NC(a,b,c)}})}else c(a,null)}
function OC(a,b,c,d){function e(a){if(void 0===h){var b=g&&Bb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ya(a))}function f(a){e("Error: "+a);k&&(--KC||nb(!0));k=!1}var g,h,k=!0;KC++;ub[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=m:v.appendChild(document.createTextNode(m));p.appendChild(v)}c||
(c="/versions/pcx86/1.36.0/components.xsl");m=function(d,h){h?LC(c,null,null,!1,e,function(d,k){k?(tb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--KC||nb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--KC||nb(!0)):f("invalid machine element: "+
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?LC(b,a,d,!0,e,m):MC(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(u){f(u.message)}return k}function PC(a,b,c,d){nb(!1);return OC(a,b,c,d)}window.embedPC=PC;window.embedPCx86=PC;window.findMachineComponent=function(a,b){return zb(b,a+".machine")};
function PC(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Na(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,p=/( [a-z]+=)(['"])(.*?)\2/gi;m=p.exec(f);)k=0>k.toLowerCase().indexOf(m[1].toLowerCase())?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+
"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,"");a=a.replace(d[0],g);PC(a,b,c)}})}else c(a,null)}
function QC(a,b,c,d){function e(a){if(void 0===h){var b=g&&Bb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ya(a))}function f(a){e("Error: "+a);k&&(--MC||nb(!0));k=!1}var g,h,k=!0;MC++;ub[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=m:v.appendChild(document.createTextNode(m));p.appendChild(v)}c||
(c="/versions/pcx86/1.36.0/components.xsl");m=function(d,h){h?NC(c,null,null,!1,e,function(d,k){k?(tb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--MC||nb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--MC||nb(!0)):f("invalid machine element: "+
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?NC(b,a,d,!0,e,m):OC(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(u){f(u.message)}return k}function RC(a,b,c,d){nb(!1);return QC(a,b,c,d)}window.embedPC=RC;window.embedPCx86=RC;window.findMachineComponent=function(a,b){return zb(b,a+".machine")};
window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!Gb[a]){for(var c=!0,d=Gb,e=a,f=b.length,g=[],h=[],k="",m=null,p=0;p<f;p++){var v=b[p];if('"'==v||"'"==v)m&&v!=m?k+=v:(m?m=null:m=v,k&&(h.push(k),k=""));else{if(!m){if("\r"==v||"\n"==v)v=";";if(" "==v||"\t"==v||";"==v){k&&(h.push(k),k="");";"==v&&h.length&&(g.push(h),h=[]);continue}}k+=v}}k&&h.push(k);h.length&&g.push(h);d[e]=g;Fb(a)||(c=!1)}return c};window.enableEvents=nb;window.sendEvent=pb;
function QC(a,b,c,d){if(!c&&b){d.push(b);a=ub[d[0]];b=null;for(var e in a)if(xa(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Na(b,null,!0,function(a,b){RC(b,d)}):RC(null,d)}else mb("Error ("+c+") requesting "+a)}
function RC(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var h=ub[f],k={},m;for(m in h){var p=h[m],v=wa(m);if("xml"==v){for(v=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=v.exec(h[m]);){var u=d[2];u&&(h[u]||(p=p.replace(d[0],"")))}d=m=va(m)}else"xsl"==v&&(e=m=va(m));k[m]=p}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
function SC(a,b,c,d){if(!c&&b){d.push(b);a=ub[d[0]];b=null;for(var e in a)if(xa(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Na(b,null,!0,function(a,b){TC(b,d)}):TC(null,d)}else mb("Error ("+c+") requesting "+a)}
function TC(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var h=ub[f],k={},m;for(m in h){var p=h[m],v=wa(m);if("xml"==v){for(v=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=v.exec(h[m]);){var u=d[2];u&&(h[u]||(p=p.replace(d[0],"")))}d=m=va(m)}else"xsl"==v&&(e=m=va(m));k[m]=p}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
"&#xA9;"),a=Za(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('<div id="'+f+'"></div>\n')+"...\n",a=a+('<script type="text/javascript" src="'+g+'">\x3c/script>\n')+('<script type="text/javascript">embedPC("'+f+'","'+d+'","'+e+'");\x3c/script>\n\n')+"The machine should appear where the <div> is located.",mb(a)):mb("Missing XML/XSL resources")}
window.savePC=function(a,b,c){var d=zb("Computer",a),e=zb("Debugger",a);if(d){var f=IB(d,!0),g=d.K?JSON.stringify(d.K):null;b||(b="/versions/pcx86/1.36.0/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Uk:g}))return!0;Na(b,null,!0,function(c,d,e){QC(c,d,e,[a,va(b,!0),g,f])});return!0}mb("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.36.0/pcx86-dbg.map
window.savePC=function(a,b,c){var d=zb("Computer",a),e=zb("Debugger",a);if(d){var f=KB(d,!0),g=d.K?JSON.stringify(d.K):null;b||(b="/versions/pcx86/1.36.0/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Uk:g}))return!0;Na(b,null,!0,function(c,d,e){SC(c,d,e,[a,va(b,!0),g,f])});return!0}mb("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.36.0/pcx86-dbg.map

View file

@ -67,7 +67,7 @@ function Na(a){if(!Oa){var b,c={};if(window){b||(b=window.location.search.substr
function Pa(a,b,c,d){var e=null;b="data:application/"+b+(c?";base64":"")+",";b=Ma("Firefox")?b+(c?a:encodeURIComponent(a)):b+(c?a:encodeURI(a));d&&(e=document.createElement("a"),"string"!=typeof e.download&&(e=null));e?(e.href=b,e.download=d,document.body.appendChild(e),e.click(),document.body.removeChild(e),a="Check your Downloads folder for "+d+"."):(window.open(b),a="Check your browser for a new window/tab containing the requested data"+(d?" ("+d+")":"")+".");return a}
function Qa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ra(a){Sa.init.push(a)}function Ta(a){if(Ua)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){q(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks."))}}function Va(a){!Ua&&a?(Ua=!0,Wa&&Xa("init"),Ya&&Xa("show")):Ua=a}function Xa(a){Sa[a]&&Ta(Sa[a])}var Oa=null,Sa={init:[],show:[],exit:[]},Wa=!1,Ya=!1,Ua=!0,Ja=null;
Qa("onload",function(){Wa=!0;Ta(Sa.init)});Qa("onpageshow",function(){Ya=!0;Ta(Sa.show)});Qa(Ma("iOS")?"onpagehide":Ma("Opera")?"onunload":"onbeforeunload",function(){Ta(Sa.exit)});
function u(a,b){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.ti=b.comment;this.Mj=b;this.exports={};this.ja=this.bindings={};a=this.id.indexOf(".");0>a?this.Ce=this.id:(this.Yd=this.id.substr(0,a),this.Ce=this.id.substr(a+1));this.Y={ready:!1,zf:!1,ng:!1,Le:!1,Qb:!1,Xd:!1,error:!1};this.Hf=null;this.Y.error=!1;this.Ea=this.S=this.na=this.oa=null;Za.push(this)}function $a(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function q(a){window&&window.alert(a)}
function u(a,b){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.ti=b.comment;this.Mj=b;this.exports={};this.ja=this.bindings={};a=this.id.indexOf(".");0>a?this.Ce=this.id:(this.Yd=this.id.substr(0,a),this.Ce=this.id.substr(a+1));this.Y={ready:!1,zf:!1,ng:!1,Le:!1,Qb:!1,Xd:!1,error:!1};this.Hf=null;this.Y.error=!1;this.Ea=this.S=this.na=this.pa=null;Za.push(this)}function $a(a,b,c){ab[a]&&b&&(ab[a][b]=c)}function q(a){window&&window.alert(a)}
function bb(a){var b=!1;window&&(b=window.confirm(a));return b}function cb(a,b){a.value+=b;b=a.value;8192<b.length&&(a.value=b.substr(b.length-4096));a.scrollTop=a.scrollHeight}function db(a,b,c){var d=a.value,e=d.lastIndexOf(b);0>e?d+=b+"\n":d=d.substr(0,e)+c+d.substr(e+b.length);8192<d.length&&(d=d.substr(d.length-4096));a.value=d;a.scrollTop=a.scrollHeight}function eb(a,b,c){var d;b&&(void 0===d&&(d="Panel"),(d=fb(d,a.id))&&(b=d.ja[b])&&a.yb(null,c,b))}
function gb(a,b){b=hb(b.parentNode,"pcx86-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var h=g.split(" "),k=0;k<h.length;k++)switch(g=h[k],g){case "pcx86-binding":(g=ib(f))&&g.binding&&a.yb(g.type,g.binding,f,g.value),k=h.length}}}}function jb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<Za.length;b++){var d=Za[b];a&&d.id.indexOf(a)||c.push(d)}return c}
function kb(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<Za.length;c++)if(Za[c].id===a)return Za[c]}return null}function fb(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<Za.length;d++)if(c)c==Za[d]&&(c=null);else if(!(a!=Za[d].type||b&&Za[d].id.indexOf(b)))return Za[d]}return null}function ib(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){q(c.message+" ("+a+")")}return b}
@ -84,16 +84,16 @@ var vb="undefined"!==typeof ArrayBuffer,wb={Sf:4,ec:5,Zc:6,Cc:7,Dc:8,Na:9,Hb:11,
Bj:16,Pd:10,Hc:2,Dg:18,Eg:7,Fg:15,Kg:12,Lg:7,Mg:11,Sg:18,Tg:7,Ug:15,Xg:15,Yg:7,Zg:13,dh:11,eh:7,fh:8,Cj:8,Fj:12,Dj:18,Ej:17,Gj:15,ah:8,$g:20,bh:2,ih:3,Ye:9,hh:5,gh:11,kh:4,jh:17,Hj:11},xb={Sf:0,ec:0,Zc:0,Cc:0,Dc:0,Na:0,Hb:1,Ib:1,Od:3,Ii:14,Ji:16,Yb:2,xb:7,mc:7,Rf:0,Ni:7,Pi:13,Ri:7,Qi:11,Oi:16,Li:3,Gg:6,Mi:2,Ki:13,Ig:5,Hg:5,Ve:2,Ue:7,ej:23,fj:0,gj:1,hj:3,dj:17,Jg:7,jj:11,Ia:7,Ja:3,lj:7,kj:11,ij:15,Jb:2,mj:3,ve:7,nj:8,Og:8,oj:8,Ng:4,Pg:4,tj:2,sj:3,qj:5,rj:2,pj:3,Qg:5,Rg:3,Ti:14,Vi:22,Si:17,Ui:25,Xi:17,
Zi:25,Wi:20,Yi:28,vj:13,xj:21,uj:16,wj:24,aj:13,cj:21,$i:16,bj:24,Xe:2,We:7,Wg:5,Vg:5,yj:19,Zb:5,zj:5,Aj:17,tc:3,Bj:5,Pd:3,Hc:0,Dg:8,Eg:5,Fg:9,Kg:5,Lg:5,Mg:4,Sg:5,Tg:5,Ug:4,Xg:7,Yg:5,Zg:8,dh:3,eh:4,fh:3,Cj:11,Fj:11,Dj:15,Ej:15,Gj:7,ah:5,$g:8,bh:0,ih:2,Ye:6,hh:3,gh:6,kh:3,jh:5,Hj:5};function yb(a,b,c,d){this.A=[a,b,c,d];this.B=null;void 0===a&&(this.A[0]=256*Math.random()|0,this.A[1]=256*Math.random()|0,this.A[2]=256*Math.random()|0,this.A[3]=255,this.B=null)}
yb.prototype.toString=function(){this.B||(this.B="#"+na(this.A[0],2)+na(this.A[1],2)+na(this.A[2],2));return this.B};function zb(a,b,c,d){this.x=a;this.y=b;this.Ac=c;this.A=d}zb.prototype.contains=function(a,b){return a>=this.x&&a<this.x+this.Ac&&b>=this.y&&b<this.y+this.A};function Ab(a,b,c,d){void 0===d&&(d=b>=c>>2);d?(b=new zb(a.x,a.y,a.Ac,a.A*b/c|0),a.y+=b.A,a.A-=b.A):(b=new zb(a.x,a.y,a.Ac*b/c|0,a.A),a.x+=b.Ac,a.Ac-=b.Ac);return b}
function Bb(a){u.call(this,"Panel",a);this.F=this.G=this.K=-1}ba(Bb,u);l=Bb.prototype;l.yb=function(a,b,c,d){return this.oa&&this.oa.yb(a,b,c,d)||this.S&&this.S.yb(a,b,c,d)||this.C&&this.C.yb(a,b,c,d)?!0:u.prototype.yb.call(this,a,b,c,d)};l.ic=function(a,b,c,d){this.oa=a;this.na=b;this.S=c;this.Ea=d;this.C=Cb(a,"Keyboard")};l.Pb=function(a,b){b||Db();return!0};l.Ob=function(){return!0};l.je=function(a,b){a.button||(this.K=b?0:-1,Eb(this,a,b))};l.tg=function(a){Eb(this,a)};
function Bb(a){u.call(this,"Panel",a);this.F=this.G=this.K=-1}ba(Bb,u);l=Bb.prototype;l.yb=function(a,b,c,d){return this.pa&&this.pa.yb(a,b,c,d)||this.S&&this.S.yb(a,b,c,d)||this.C&&this.C.yb(a,b,c,d)?!0:u.prototype.yb.call(this,a,b,c,d)};l.ic=function(a,b,c,d){this.pa=a;this.na=b;this.S=c;this.Ea=d;this.C=Cb(a,"Keyboard")};l.Pb=function(a,b){b||Db();return!0};l.Ob=function(){return!0};l.je=function(a,b){a.button||(this.K=b?0:-1,Eb(this,a,b))};l.tg=function(a){Eb(this,a)};
function Eb(a,b,c){var d=Fb/null.offsetWidth,e=Gb/null.offsetHeight,f=null.getBoundingClientRect(),d=(b.clientX-f.left)*d|0;b=(b.clientY-f.top)*e|0;null==c&&(a.K||(a.K=Math.abs(a.F-d)>Math.abs(a.G-b)?1:2),1==a.K?b=a.G:2==a.K&&(d=a.F));a.F=d;a.G=b;if(0<=d&&d<Fb&&0<=b&&b<Gb){a:{c=d;if(c<Hb&&a.A&&a.A.ce)for(f=0;f<a.A.ce.length;f++)if(e=a.A.ce[f],e.contains(c,b)){c-=e.x;b-=e.y;var d=a.A.Ge[f],g=Ba(Ib.Ij,a.A.hg[d.Dk]),f=g*a.na.A,d=(g+d.fd)*a.na.A-1;0<b&&(f+=e.Ac*(b-1)*a.ba);f+=c*a.ba;f|=0;f>d&&(f=d);c=
f;break a}c=-1}if(-1!==c&&(c&=-16,c!=a.da)){b=c;if(a.context&&a.M&&a.N){e=Jb-Kb;f=a.M.width;a.N.fillStyle=Lb;a.N.fillRect(0,e,f,Kb);Mb(a,e+Ob,a.M,a.N);a.V=a.fa.width/24|0;if(null==b)Pb(a,"Mouse over memory to dump");else for(Pb(a,na(b,8,!0),null,0,1),d=1;16>=d;d++){for(var g="",h=1;8>=h;h++){var k;k=a.na;var m=b++;k=k.X[(m&k.D)>>>k.B].Bd(m&k.C,m);Pb(a,na(k,2),null,1);g+=32<=k&&128>k?String.fromCharCode(k):"."}Pb(a,g,null,0,1)}a.context.drawImage(a.M,0,e,f,Kb,a.Ca,a.Ha,a.ta,a.xa)}a.da=c}}}
function Qb(a,b,c,d){a.A.Ge[a.A.fi++]={Dk:b,fd:c,type:d};return Aa(Ib,b,c,0,d)}function Mb(a,b,c,d){var e,f=null.style.color,g=a.qa=10;a.B=g;a.H=b;a.I=a.aa=Ob;e||(e=a.X||a.aa+"px "+Rb);a.L=a.X=e;c&&(a.fa=c);d&&(a.D=d,a.ia=f||"white")}function Pb(a,b,c,d,e){a.D.font=a.L;a.D.fillStyle=a.ia;a.D.fillText(b,a.B,a.H);a.B+=a.V;null!=c&&(16!=a.Ba?b=c.toString():(b=8>a.pa?"0x":"",b+=na(c,a.pa)),a.D.fillText(b,a.B,a.H),a.B+=a.V);d&&(a.B+=a.V*d);e&&(a.B=a.qa,a.H+=(a.I+2)*(e||1))}
function Qb(a,b,c,d){a.A.Ge[a.A.fi++]={Dk:b,fd:c,type:d};return Aa(Ib,b,c,0,d)}function Mb(a,b,c,d){var e,f=null.style.color,g=a.qa=10;a.B=g;a.H=b;a.I=a.aa=Ob;e||(e=a.X||a.aa+"px "+Rb);a.L=a.X=e;c&&(a.fa=c);d&&(a.D=d,a.ia=f||"white")}function Pb(a,b,c,d,e){a.D.font=a.L;a.D.fillStyle=a.ia;a.D.fillText(b,a.B,a.H);a.B+=a.V;null!=c&&(16!=a.Ba?b=c.toString():(b=8>a.oa?"0x":"",b+=na(c,a.oa)),a.D.fillText(b,a.B,a.H),a.B+=a.V);d&&(a.B+=a.V*d);e&&(a.B=a.qa,a.H+=(a.I+2)*(e||1))}
function Db(){for(var a=!1,b=hb(document,"pcx86","panel"),c=0;c<b.length;c++){var d=b[c],e=ib(d),f=kb(e.id);f||(a=!0,f=new Bb(e));gb(f,d);a&&tb(f)}}var Fb=1280,Gb=720,Ob=18,Rb="Monaco, Lucida Console, Courier New",Hb=3*Fb>>2,Sb=Gb,Jb=Gb,Lb="black",Kb=Gb>>1;Ra(Db);
function Tb(a,b,c){u.call(this,"Bus",a);this.S=b;this.Ea=c;this.F=a.busWidth||20;this.K=Math.pow(2,this.F);this.W=this.D=this.K-1|0;this.B=32==this.F||20>=this.F?12:24>=this.F?14:15;this.A=1<<this.B;this.V=this.A>>2;this.C=this.A-1;this.H=this.K/this.A|0;this.L=this.H-1;this.I=[];this.J=[];this.M=[];this.N=[];a=new v;Ub(a,this.Ea);this.X=Array(this.H);for(b=0;b<this.H;b++)this.X[b]=a;a=this.S;b=this.X;c=this.B;a.Nc=a.X=b;a.Bb=c;a.Xh=1<<a.Bb;a.Ab=a.Xh-1;a.nf=b.length;a.Ae=a.nf-1;a=this.S;a.Be=a.Ic=
this.D;tb(this)}ba(Tb,u);l=Tb.prototype;l.reset=function(){Vb(this,!0)};l.Pb=function(a,b){b||this.reset();return!0};
function Wb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.B;0<g&&h<a.X.length;){var k=a.X[h],m=h*a.A,r=a.A-(f-m);r>g&&(r=g);if(k&&k.size){if(k.type==d&&k.controller==e){if(f+g<=k.fe)return k.ze+=k.fe-f,k.fe=f,!0;if(f>=k.fe+k.ze){r=k.size-(f-m);r>g&&(r=g);k.ze=f-k.fe+r;f=m+a.A;g-=r;h++;continue}}return Xb(a,Yb,f,g)}f=new v(f,r,a.A,d,e);Ub(f,a.Ea,k);a.X[h++]=f;f=m+a.A;g-=r}return 0>=g?(e=a.S,e.pa&-2147483648&&Zb(e),a.S.Y.nb||(e=c/1024|0,a.status((e?e+"Kb ":c+" bytes ")+$b[d]+" at "+na(b))),!0):Xb(a,ac,b,c)}
function Wb(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.B;0<g&&h<a.X.length;){var k=a.X[h],m=h*a.A,r=a.A-(f-m);r>g&&(r=g);if(k&&k.size){if(k.type==d&&k.controller==e){if(f+g<=k.fe)return k.ze+=k.fe-f,k.fe=f,!0;if(f>=k.fe+k.ze){r=k.size-(f-m);r>g&&(r=g);k.ze=f-k.fe+r;f=m+a.A;g-=r;h++;continue}}return Xb(a,Yb,f,g)}f=new v(f,r,a.A,d,e);Ub(f,a.Ea,k);a.X[h++]=f;f=m+a.A;g-=r}return 0>=g?(e=a.S,e.oa&-2147483648&&Zb(e),a.S.Y.nb||(e=c/1024|0,a.status((e?e+"Kb ":c+" bytes ")+$b[d]+" at "+na(b))),!0):Xb(a,ac,b,c)}
function Vb(a,b){32==a.F?b?a.G&&(bc(a,1048576,1048576,a.G),a.G=null):a.G||(a.G=cc(a,1048576,1048576),bc(a,1048576,1048576,cc(a,0,1048576))):20<a.F&&(b=a.D&-1048577|(b?1048576:0),b!=a.D&&(a.D=b,a.S&&(a=a.S,a.Be=a.Ic=b)))}l.bg=function(a,b,c,d){if(!(a&this.C||!b||b&this.C)){for(var e=a>>>this.B;0<b;){var f=this.X[e];if(!f.controller)return Xb(this,dc,a,b,d);ec(f,c,!0);b-=this.A;e++}return!0}return Xb(this,fc,a,b)};
function gc(a,b,c){if(!(b&a.C||!c||c&a.C)){for(var d=b>>>a.B;0<c;){var e=a.X[d];b=new v(b);Ub(b,a.Ea,e);a.X[d++]=b;b=d*a.A;c-=a.A}a=a.S;a.pa&-2147483648&&Zb(a);return!0}return Xb(a,hc,b,c)}function cc(a,b,c){var d=[];for(b>>>=a.B;0<c&&b<a.X.length;)d.push(a.X[b++]),c-=a.A;return d}
function gc(a,b,c){if(!(b&a.C||!c||c&a.C)){for(var d=b>>>a.B;0<c;){var e=a.X[d];b=new v(b);Ub(b,a.Ea,e);a.X[d++]=b;b=d*a.A;c-=a.A}a=a.S;a.oa&-2147483648&&Zb(a);return!0}return Xb(a,hc,b,c)}function cc(a,b,c){var d=[];for(b>>>=a.B;0<c&&b<a.X.length;)d.push(a.X[b++]),c-=a.A;return d}
function bc(a,b,c,d,e){for(var f=0,g=b>>>a.B;0<c&&g<a.X.length;){var h=d[f++];if(!h)break;if(void 0!==e){var k=new v(b),m=k,r=e,y=a.Ea;m.id=h.id|1;m.ze=h.ze;m.size=h.size;r&&(m.type=r,m.H=r==ic);vb?(m.L=h.L,m.K=h.K,m.Ga=h.Ga,m.sd=h.sd,m.U=h.U,ec(m,jc?kc:lc)):(m.U=h.U,ec(m,mc));Ub(m,y,h);h=k}a.X[g++]=h;c-=a.A}}l.Eb=function(a){return this.X[(a&this.D)>>>this.B].nc(a&this.C,a)};function nc(a,b){var c=b&a.C,d=(b&a.D)>>>a.B;return c!=a.C?a.X[d].df(c,b):a.X[d++].Bd(c,b)|a.X[d&a.L].Bd(0,b+1)<<8}
l.oc=function(a,b){this.X[(a&this.D)>>>this.B].pc(a&this.C,b&255,a)};function oc(a,b,c){var d=b&a.C,e=(b&a.D)>>>a.B;d!=a.C?a.X[e].wh(d,c&65535,b):(a.X[e++].jf(d,c&255,b),a.X[e&a.L].jf(0,c>>8&255,b+1))}
function pc(a,b){var c=0,d=[],e=!a.G&&a.W==a.D;e||Vb(a,!0);for(var f=0;f<a.H;f++){var g=a.X[f];if(b&&g.type!=ic||g.Da||g.ri){d[c++]=f;var h=c++;if(g=g.save()){for(var k=0,m=0,r=[];k<g.length;){for(var y=g[k],t=k+1;t<g.length&&g[t]===y;)t++;r[m++]=t-k;r[m++]=y;k=t}r.length<g.length&&(g=r)}d[h]=g}}e||Vb(a,!1);d[c]=e;return d}
@ -115,16 +115,16 @@ l.Kn=function(a,b){a&3?(this.Ga[a]=b,this.Ga[a+1]=b>>8,this.Ga[a+2]=b>>16,this.G
var Cc=0,ic=2,Dc=5,Fc=6,Pc=["black","blue","green","cyan"],$b="NONE RAM ROM VIDEO H/W UNPAGED PAGED".split(" "),Bc=0,Hc=[],mc=[v.prototype.en,v.prototype.Dn,v.prototype.rn,v.prototype.Pn,v.prototype.ln,v.prototype.Jn],Lc=[v.prototype.dn,v.prototype.Cn,v.prototype.qn,v.prototype.On,v.prototype.kn,v.prototype.In],Gc=[v.prototype.gn,v.prototype.Fn,v.prototype.tn,v.prototype.Rn,v.prototype.nn,v.prototype.Ln],Ec=[v.prototype.hn,v.prototype.Gn,v.prototype.un,v.prototype.Sn,v.prototype.on,v.prototype.Mn];
if(vb)var lc=[v.prototype.cn,v.prototype.Bn,v.prototype.pn,v.prototype.Nn,v.prototype.jn,v.prototype.Hn],kc=[v.prototype.Nj,v.prototype.$j,v.prototype.Sj,v.prototype.bk,v.prototype.Pj,v.prototype.ak],Qc=[v.prototype.fn,v.prototype.En,v.prototype.sn,v.prototype.Qn,v.prototype.mn,v.prototype.Kn];
function Rc(a,b){u.call(this,"CPU",a);b=a.cycles||b;var c=a.multiplier||1;this.R={};this.R.Yc=b;this.R.yd=c;this.R.Kf=Math.round(this.R.Yc/1E4)/100;this.R.se=this.R.Kf*this.R.yd;this.Y.nb=!1;this.Y.Yj=!1;this.Y.Gd=a.autoStart;this.Y.mi=!1;this.Y.Df=!1;this.R.Mf=this.R.te=0;this.R.Nf=a.csStart;this.R.Me=a.csInterval;this.R.Ne=a.csStop;this.Pl=this.cg.bind(this);tb(this)}ba(Rc,u);l=Rc.prototype;
l.ic=function(a,b,c,d){this.oa=a;this.na=b;this.Ea=d;for(b=0;b<Sc.length;b++)(c=this.ja[Sc[b]])&&this.oa.yb(null,Sc[b],c);this.od=Cb(a,"FPU");this.V=Cb(a,"ChipSet");a=Tc(a,"autoStart");null!=a&&(this.Y.Gd="true"==a?!0:"false"==a?!1:!!a);tb(this)};l.reset=function(){};l.save=function(){return null};l.restore=function(){return!1};l.Pb=function(a,b){if(!b){if(a&&this.restore){Uc(this);if(!this.restore(a))return!1;Vc(this)}else this.reset();this.vb("No debugger detected")}Wc(this);return!0};
l.ic=function(a,b,c,d){this.pa=a;this.na=b;this.Ea=d;for(b=0;b<Sc.length;b++)(c=this.ja[Sc[b]])&&this.pa.yb(null,Sc[b],c);this.od=Cb(a,"FPU");this.V=Cb(a,"ChipSet");a=Tc(a,"autoStart");null!=a&&(this.Y.Gd="true"==a?!0:"false"==a?!1:!!a);tb(this)};l.reset=function(){};l.save=function(){return null};l.restore=function(){return!1};l.Pb=function(a,b){if(!b){if(a&&this.restore){Uc(this);if(!this.restore(a))return!1;Vc(this)}else this.reset();this.vb("No debugger detected")}Wc(this);return!0};
l.Ob=function(a,b){var c=this.Y.nb;b&&Xc(this);return a?this.save(c):!0};l.Gd=function(){return this.Y.Gd||void 0===this.ja.run?(this.cg(),!0):!1};l.vi=function(){return 0};function Vc(a){void 0===a.R.Nf&&(a.R.Nf=0);void 0===a.R.Me&&(a.R.Me=-1);void 0===a.R.Ne&&(a.R.Ne=-1);a.Y.Df=0<=a.R.Nf&&0<a.R.Me;a.Y.Df&&(a.R.Mf=0,a.R.te=a.R.Nf-a.cd)}
l.yb=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.ja[b]=c;a=!0;break;case "run":this.ja[b]=c;c.onclick=function(){var a=d.Y.nb,b;if(b=d.oa)if(b=d.oa,b.Y.Xd&&(b.Y.Xd=!1,b.Y.Le&&!b.Y.Qb&&b.we(Yc)),b.Y.Qb)b=!0;else{var c=null,h,k=jb(b.id);for(h=0;h<k.length&&(c=k[h],c===b||c.Y.ready);h++);if(h==k.length)for(h=0;h<k.length&&(c=k[h],c===b||c.Y.Qb);h++);h==k.length&&(c=b);q("The "+c.type+" component ("+c.id+") is not "+(c.Y.ready?"powered yet":"ready yet"+(c.Hf?" (waiting for notification)":
l.yb=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.ja[b]=c;a=!0;break;case "run":this.ja[b]=c;c.onclick=function(){var a=d.Y.nb,b;if(b=d.pa)if(b=d.pa,b.Y.Xd&&(b.Y.Xd=!1,b.Y.Le&&!b.Y.Qb&&b.we(Yc)),b.Y.Qb)b=!0;else{var c=null,h,k=jb(b.id);for(h=0;h<k.length&&(c=k[h],c===b||c.Y.ready);h++);if(h==k.length)for(h=0;h<k.length&&(c=k[h],c===b||c.Y.Qb);h++);h==k.length&&(c=b);q("The "+c.type+" component ("+c.id+") is not "+(c.Y.ready?"powered yet":"ready yet"+(c.Hf?" (waiting for notification)":
""))+".");b=!1}b&&a==d.Y.nb&&(d.Y.nb?Xc(d,!0):d.cg(!0))};a=!0;break;case "speed":this.ja[b]=c;a=!0;break;case "setSpeed":this.ja[b]=c,c.onclick=function(){Zc(d,d.R.yd<<1,!0)},c.textContent=this.R.se.toFixed(2)+"Mhz",a=!0}return a};function $c(a,b){a.Y.nb&&(b=a.A-b,a.A-=b,a.jc-=b)}function ad(a,b,c){a.cd+=b;c&&(a.jc=a.A=0)}
function bd(a,b){var c=cd;c<dd&&(c=dd);c<ed&&(c=ed);var d=1;b&&1<a.R.yd&&a.R.wd&&(d=a.R.wd/a.R.Kf);a.R.Fi=Math.round(1E3/cd);a.R.Zl=Math.floor(a.R.Yc/c*d);a.R.zg=Math.floor(a.R.Yc/cd*d);a.R.Hi=Math.floor(a.R.Yc/dd*d);a.R.Gi=Math.floor(a.R.Yc/ed*d);b||(a.R.ue=a.R.zg,a.R.Pe=a.R.Hi,a.R.Oe=a.R.Gi);a.R.Ag=0}function fd(a,b){var c=a.cd+a.Sc+a.jc-a.A;b&&1<a.R.yd&&a.R.wd>a.R.Kf&&(c=Math.round(c/a.R.yd));return c}function Uc(a){a.R.wd=0;a.cd=a.Sc=a.jc=a.A=0;Vc(a);Zc(a,1)}
function Zc(a,b,c){if(void 0!==b){(c||a.Y.nb)&&.8>a.R.wd/a.R.se&&(b=1);a.R.yd=b;b=a.R.Kf*a.R.yd;if(a.R.se!=b){a.R.se=b;b=a.R.se.toFixed(2)+"Mhz";var d=a.ja.setSpeed;d&&(d.textContent=b);a.vb("target speed: "+b)}c&&a.oa&&gd(a.oa)}ad(a,a.Sc);a.Sc=0;a.R.xd=Da();a.R.Nd=0;bd(a)}
l.cg=function(a){if(ub(this,!0)){if(!this.Y.nb){Zc(this);this.oa&&this.oa.start(this.R.xd,fd(this));this.Y.nb=!0;this.Y.Yj=!0;this.V&&this.V.start();var b=this.ja.run;b&&(b.textContent="Halt");this.oa&&(hd(this.oa,!0),a&&gd(this.oa,!0))}this.R.Ag>=this.R.Yc&&bd(this,!0);this.R.Qe=0;this.R.Lf=Da();this.R.Nd&&(a=this.R.Lf-this.R.Nd,a>this.R.Fi&&(this.R.xd+=a,this.R.xd>this.R.Lf&&(this.R.xd=this.R.Lf)));try{do{var c=this.Y.Df?1:this.R.Zl;if(this.V){id(this.V);var d=this.V;a=c;var e=d.H[0];if(e.Kd){var f=
function Zc(a,b,c){if(void 0!==b){(c||a.Y.nb)&&.8>a.R.wd/a.R.se&&(b=1);a.R.yd=b;b=a.R.Kf*a.R.yd;if(a.R.se!=b){a.R.se=b;b=a.R.se.toFixed(2)+"Mhz";var d=a.ja.setSpeed;d&&(d.textContent=b);a.vb("target speed: "+b)}c&&a.pa&&gd(a.pa)}ad(a,a.Sc);a.Sc=0;a.R.xd=Da();a.R.Nd=0;bd(a)}
l.cg=function(a){if(ub(this,!0)){if(!this.Y.nb){Zc(this);this.pa&&this.pa.start(this.R.xd,fd(this));this.Y.nb=!0;this.Y.Yj=!0;this.V&&this.V.start();var b=this.ja.run;b&&(b.textContent="Halt");this.pa&&(hd(this.pa,!0),a&&gd(this.pa,!0))}this.R.Ag>=this.R.Yc&&bd(this,!0);this.R.Qe=0;this.R.Lf=Da();this.R.Nd&&(a=this.R.Lf-this.R.Nd,a>this.R.Fi&&(this.R.xd+=a,this.R.xd>this.R.Lf&&(this.R.xd=this.R.Lf)));try{do{var c=this.Y.Df?1:this.R.Zl;if(this.V){id(this.V);var d=this.V;a=c;var e=d.H[0];if(e.Kd){var f=
(fd(d.S,d.V)-e.jd)/d.Aa|0,g=jd(d,0)-f;e.mode==kd&&(g-=f);var h=g*d.Aa|0;e.mode==kd&&(h>>=1);a>h&&(a=h)}var c=a,k=this.V;a=c;if(k.A&&k.A[ld]&md){var m=k.X-fd(k.S,k.V);0<m&&a>m&&(a=m)}c=a}try{this.Ah(c)}catch(y){if("number"!=typeof y)throw y;}var r=this.jc-this.A;this.Sc+=r;this.R.Qe+=r;ad(this,0,!0);a=r;this.Y.Df&&(b=!1,this.R.Mf=this.R.Mf+this.vi()|0,this.R.te-=a,0>=this.R.te&&(this.R.te+=this.R.Me,b=!0),0<=this.R.Ne&&this.R.Ne<=fd(this)&&(this.R.Me=this.R.Ne=-1,Vc(this),Xc(this),b=!0),b&&this.vb(fd(this)+
" cycles: checksum="+na(this.R.Mf)));this.R.Pe-=r;0>=this.R.Pe&&(this.R.Pe+=this.R.Hi,this.oa&&nd(this.oa));this.R.Oe-=r;0>=this.R.Oe&&(this.R.Oe+=this.R.Gi,this.oa&&hd(this.oa));this.R.ue-=r;if(0>=this.R.ue){this.R.ue+=this.R.zg;break}}while(this.Y.nb)}catch(y){Xc(this);Wc(this);this.oa&&this.oa.stop(Da(),fd(this));ub(this,!1);rb(this,y.stack||y.message);return}c=setTimeout;d=this.Pl;this.R.Nd=Da();e=this.R.Fi;this.R.Qe&&(e=Math.round(e*this.R.Qe/this.R.zg));e-=this.R.Nd-this.R.Lf;if(f=this.R.Nd-
this.R.xd)this.R.wd=Math.round(this.Sc/(10*f))/100,864E5<=f&&(this.cd=0,this.V&&id(this.V,!0),Zc(this));if(0>e||this.R.wd<this.R.se)-1E3>e&&(this.R.xd-=e),e=0;this.R.Ag+=this.R.Qe;this.R.Nd+=e;c(d,e)}else Wc(this),this.oa&&this.oa.stop(Da(),fd(this))};l.Ah=function(){return 0};function Xc(a,b){a.Y.zf&&(a.Y.ng=!0);a.jc-=a.A;a.A=0;ad(a,a.Sc);a.Sc=0;if(a.Y.nb){a.Y.nb=!1;a.V&&a.V.stop();var c=a.ja.run;c&&(c.textContent="Run")}a.Y.complete=b}function Wc(a){a.oa&&(nd(a.oa,void 0),hd(a.oa,void 0))}
" cycles: checksum="+na(this.R.Mf)));this.R.Pe-=r;0>=this.R.Pe&&(this.R.Pe+=this.R.Hi,this.pa&&nd(this.pa));this.R.Oe-=r;0>=this.R.Oe&&(this.R.Oe+=this.R.Gi,this.pa&&hd(this.pa));this.R.ue-=r;if(0>=this.R.ue){this.R.ue+=this.R.zg;break}}while(this.Y.nb)}catch(y){Xc(this);Wc(this);this.pa&&this.pa.stop(Da(),fd(this));ub(this,!1);rb(this,y.stack||y.message);return}c=setTimeout;d=this.Pl;this.R.Nd=Da();e=this.R.Fi;this.R.Qe&&(e=Math.round(e*this.R.Qe/this.R.zg));e-=this.R.Nd-this.R.Lf;if(f=this.R.Nd-
this.R.xd)this.R.wd=Math.round(this.Sc/(10*f))/100,864E5<=f&&(this.cd=0,this.V&&id(this.V,!0),Zc(this));if(0>e||this.R.wd<this.R.se)-1E3>e&&(this.R.xd-=e),e=0;this.R.Ag+=this.R.Qe;this.R.Nd+=e;c(d,e)}else Wc(this),this.pa&&this.pa.stop(Da(),fd(this))};l.Ah=function(){return 0};function Xc(a,b){a.Y.zf&&(a.Y.ng=!0);a.jc-=a.A;a.A=0;ad(a,a.Sc);a.Sc=0;if(a.Y.nb){a.Y.nb=!1;a.V&&a.V.stop();var c=a.ja.run;c&&(c.textContent="Run")}a.Y.complete=b}function Wc(a){a.pa&&(nd(a.pa,void 0),hd(a.pa,void 0))}
var cd=30,dd=60,ed=2,Sc=["power","reset"];function od(a,b,c,d){this.B=a;this.Ea=a.Ea;this.id=b;this.ag=c||"";this.ha=0;this.ab=65535;this.C=this.ab+1;this.pb=this.hc=this.ext=this.kb=this.type=this.va=0;this.ac=-1;this.T=this.Jc=2;this.O=this.ra=65535;this.J=this.Di;this.H=this.ii;this.I=this.ki;this.A={ha:-1,va:0,ab:0,kb:0,type:0,ext:0,ac:-1};1==this.id&&(this.bf=0,this.D=null,this.pe=!1,this.G=Array(32),this.F=[]);pd(this,!0,d)}l=od.prototype;
l.Di=function(a){this.ha=a&65535;return this.va=this.ha<<4};l.Jf=function(a,b){var c,d,e=this.B;a&=65535;a&4?(c=e.lc.va,d=c+e.lc.ab|0):(c=e.Lb,d=e.Oc);if(c){c=c+(a&65528)|0;if(d-c|0)return e.A-=15,qd(this,c,a,b);this.id<sd&&w.call(e,b&&this.id==td?10:13,a&65532)}return-1};l.Ul=function(a){var b=this.B;a=b.Ub+(a<<2);var c=b.ga(a);b.N&=-769;return this.load(b.ga(a+2))+c|0};
l.Tl=function(a){var b=this.B;a<<=3;var c=b.Ub+a|0;if(7<=(b.Pc-c|0))return this.D=!0,a=qd(this,c,a),-1!==a&&(a+=this.bf),a;w.call(b,13,a|2);return-1};l.ii=function(a){return this.va+a|0};l.ki=function(a){return this.va+a|0};l.hi=function(a,b){return(a>>>0)+b<=this.C?this.va+a|0:this.Bf()};l.qk=function(a,b){return(a>>>0)+b>this.C?this.va+a|0:this.Bf()};l.Bf=function(){w.call(this.B,13,0);return-1};l.ji=function(a,b){return(a>>>0)+b<=this.C?this.va+a|0:this.Cf()};
@ -137,8 +137,8 @@ e.rb.ha,4,2),e.rb.load(0),Ed(e,e.ob.ha,4,2),e.ob.load(0),Ed(e,e.Ca.ha,4,2),Fd(e,
function Ad(a,b,c){var d=a.B,e=a.pb,f=d.ka.ha,g=d.ka.va;if(!c){if(!(d.ka.type&512))return w.call(d,13,b&65532),!1;d.Wa(d.ka.ac+4,d.ka.kb&=-513)}if(-1===d.ka.load(b))return!1;var h=d.ka.va;if(!1!==c){if(d.ka.type&512)return w.call(d,13,b&65532),!1;d.Wa(d.ka.ac+4,d.ka.kb|=512)}d.ka.type=d.ka.type&-513|d.ka.kb&512;256==d.ka.type||768==d.ka.type?(d.Wa(g+14,D(d)),d.Wa(g+16,Id(d)),d.Wa(g+18,d.F),d.Wa(g+20,d.H),d.Wa(g+22,d.K),d.Wa(g+24,d.G),d.Wa(g+26,B(d)),d.Wa(g+28,d.L),d.Wa(g+30,d.J),d.Wa(g+32,d.I),d.Wa(g+
34,d.ua.ha),d.Wa(g+36,d.fa.ha),d.Wa(g+38,d.W.ha),d.Wa(g+40,d.Ca.ha),d.lc.load(d.ga(h+42)),Jd(d,d.ga(h+16)|(c?16384:0)),d.F=d.ga(h+18),d.H=d.ga(h+20),d.K=d.ga(h+22),d.G=d.ga(h+24),d.L=d.ga(h+28),d.J=d.ga(h+30),d.I=d.ga(h+32),d.ua.load(d.ga(h+34)),d.Ca.load(d.ga(h+40)),Kd(d,d.ga(h+14),d.ga(h+36)),b=38,g=26,a.pb<e&&(g=(a.pb<<2)+2,b=g+2),zd(d,d.ga(h+b),!0),A(d,d.ga(h+g))):(d.Pa(g+28,d.dd),d.Pa(g+32,D(d)),d.Pa(g+36,Id(d)),d.Pa(g+40,d.F),d.Pa(g+44,d.H),d.Pa(g+48,d.K),d.Pa(g+52,d.G),d.Pa(g+56,B(d)),d.Pa(g+
60,d.L),d.Pa(g+64,d.J),d.Pa(g+68,d.I),d.Pa(g+72,d.ua.ha),d.Pa(g+76,d.fa.ha),d.Pa(g+80,d.W.ha),d.Pa(g+84,d.Ca.ha),d.Pa(g+88,d.ob.ha),d.Pa(g+92,d.rb.ha),Ld.call(d,d.ea(h+28)),d.lc.load(d.ga(h+96)),Jd(d,d.ea(h+36)|(c?16384:0)),d.F=d.ea(h+40),d.H=d.ea(h+44),d.K=d.ea(h+48),d.G=d.ea(h+52),d.L=d.ea(h+60),d.J=d.ea(h+64),d.I=d.ea(h+68),d.ua.load(d.ga(h+72)),d.Ca.load(d.ga(h+84)),d.ob.load(d.ga(h+88)),d.rb.load(d.ga(h+92)),Kd(d,d.ea(h+32),d.ga(h+76)),b=80,g=56,a.pb<e&&(g=(a.pb<<3)+4,b=g+4),zd(d,d.ga(h+b),!0),
A(d,d.ea(h+g)));c&&d.Wa(h+0,f);d.pa|=8;return!0}l.save=function(){return[this.ha,this.va,this.ab,this.kb,this.id,this.ag,this.pb,this.hc,this.ac,this.Jc,this.ra,this.T,this.O,this.type,this.C]};l.restore=function(a){"number"==typeof a?this.load(a):(this.ha=a[0],this.va=a[1],this.ab=a[2],this.kb=a[3],this.id=a[4],this.ag=a[5],this.pb=a[6],this.hc=a[7],this.ac=a[8],this.Jc=a[9]||2,this.ra=a[10]||65535,this.T=a[11]||2,this.O=a[12]||65535,this.type=a[13]||this.kb&7936,this.C=a[14]||(this.ab>>>0)+1)};
function pd(a,b,c,d){void 0===c&&(c=!!(a.B.pa&1));a.me=!1;if(c)if(a.load=a.Jf,a.Ci=a.Tl,a.Mb=a.hi,a.Nb=a.ji,void 0===d&&(d=!!(a.B.N&131072)),d)a.load=a.J,a.Mb=a.H,a.Nb=a.I,a.pb=a.hc=3,a.T=2,a.O=a.ra=65535,a.ab=65535,a.C=a.ab+1,a.Jc=a.T,a.ac=-1,a.pe=!1;else{if(!(a.ha&-4))a.Mb=a.Bf,a.Nb=a.Cf;else if(a.type&4096){6144==(a.type&6656)&&(a.Mb=a.Bf);if(a.type&2048||!(a.type&512))a.Nb=a.Cf;1024==(a.type&3072)&&(a.Mb==a.hi&&(a.Mb=a.qk),a.Nb==a.ji&&(a.Nb=a.rk),a.me=!0);b&&a.id<sd&&a.ha&-4&&-1!==a.ac&&(c=a.ac+
A(d,d.ea(h+g)));c&&d.Wa(h+0,f);d.oa|=8;return!0}l.save=function(){return[this.ha,this.va,this.ab,this.kb,this.id,this.ag,this.pb,this.hc,this.ac,this.Jc,this.ra,this.T,this.O,this.type,this.C]};l.restore=function(a){"number"==typeof a?this.load(a):(this.ha=a[0],this.va=a[1],this.ab=a[2],this.kb=a[3],this.id=a[4],this.ag=a[5],this.pb=a[6],this.hc=a[7],this.ac=a[8],this.Jc=a[9]||2,this.ra=a[10]||65535,this.T=a[11]||2,this.O=a[12]||65535,this.type=a[13]||this.kb&7936,this.C=a[14]||(this.ab>>>0)+1)};
function pd(a,b,c,d){void 0===c&&(c=!!(a.B.oa&1));a.me=!1;if(c)if(a.load=a.Jf,a.Ci=a.Tl,a.Mb=a.hi,a.Nb=a.ji,void 0===d&&(d=!!(a.B.N&131072)),d)a.load=a.J,a.Mb=a.H,a.Nb=a.I,a.pb=a.hc=3,a.T=2,a.O=a.ra=65535,a.ab=65535,a.C=a.ab+1,a.Jc=a.T,a.ac=-1,a.pe=!1;else{if(!(a.ha&-4))a.Mb=a.Bf,a.Nb=a.Cf;else if(a.type&4096){6144==(a.type&6656)&&(a.Mb=a.Bf);if(a.type&2048||!(a.type&512))a.Nb=a.Cf;1024==(a.type&3072)&&(a.Mb==a.hi&&(a.Mb=a.qk),a.Nb==a.ji&&(a.Nb=a.rk),a.me=!0);b&&a.id<sd&&a.ha&-4&&-1!==a.ac&&(c=a.ac+
5,d=a.B.Eb(c),d&1||a.B.oc(c,d|1))}b&&(a.pb=a.ha&3,a.hc=(a.kb&24576)>>13,80386>a.B.ca||!(a.ext&64)?(a.T=2,a.O=65535):(a.T=4,a.O=-1),a.Jc=a.T,a.ra=a.O)}else a.load=a.Di,a.Ci=a.Ul,a.Mb=a.ii,a.Nb=a.ki,a.pb=a.hc=0,a.ac=-1,a.pe=!1}var xd=1,Hd=2,td=3,vd=4,sd=6,yd=1;
function Md(a){var b=+a.model||8088,c;switch(b){default:c=4772727;break;case 80286:c=6E6;break;case 80386:c=16E6}Rc.call(this,a,c);this.ca=b;a=a.stepping;this.nd=b+(a?ma(a,16):0);this.Vh=61442;this.Dd=1792;this.Th=28672;this.mf=4;this.Ha=255;this.B=80286<=this.ca?xb:wb;this.qa=Nd;this.$h=Od;this.ei=Pd;this.gi=Qd;if(80186<=this.ca&&(this.qa=Nd.slice(),this.$h=Od.slice(),this.ei=Pd.slice(),this.Ha=31,this.qa[15]=Rd,this.qa[96]=Sd,this.qa[97]=Td,this.qa[98]=Ud,this.qa[99]=Rd,this.qa[100]=Rd,this.qa[101]=
Rd,this.qa[102]=Rd,this.qa[103]=Rd,this.qa[104]=Vd,this.qa[105]=Wd,this.qa[106]=Xd,this.qa[107]=Yd,this.qa[108]=Zd,this.qa[109]=$d,this.qa[110]=ae,this.qa[111]=be,this.qa[192]=ce,this.qa[193]=de,this.qa[200]=ee,this.qa[201]=fe,this.qa[241]=ge,this.$h[7]=he,this.ei[7]=he,80286<=this.ca)){this.Vh=2;this.Dd|=28672;this.mf=0;this.qa[15]=ie;this.bd=je.slice();for(b=0;b<this.bd.length;b++)this.bd[b]||(this.bd[b]=ke);this.qa[84]=le;this.qa[99]=me;if(80386<=this.ca){var d;this.Th=0;this.Dd|=196608;this.qa[100]=
@ -147,15 +147,15 @@ function Zb(a){var b;if(a.X===a.Nc){a.X=Array(a.nf);a.rf=new v(null,0,0,Dc,null,
function Nc(a,b,c,d){var e=(b&-4194304)>>>20,f=a.Nc[(a.dd+e&a.Be)>>>a.Bb],g=f.Qd(e);if(!(g&1))return d||ve.call(a,b,!1,c),a.De;if(!(g&4)&&3==a.Fa)return d||ve.call(a,b,!0,c),a.De;var h=(b&4190208)>>>10,g=a.Nc[((g&-4096)+h&a.Be)>>>a.Bb],k=g.Qd(h);if(!(k&1))return d||ve.call(a,b,!1,c),a.De;if(!(k&4)&&3==a.Fa)return d||ve.call(a,b,!0,c),a.De;c=a.Nc[((k&-4096)+(b&4095)&a.Be)>>>a.Bb];if(d)return c;d=b>>>a.Bb;k=a.X[d];b&=-4096;var m;0<a.sf?(m=a.Yh[--a.sf],m.Kl(b)):m=new v(b,0,0,Fc);b=m;b.J=c;b.A=f;b.C=
e>>2;b.B=g;b.D=h>>2;vb&&jc&&c.U&&!c.controller&&!c.ge&&!c.he?(b.Ga=c.Ga,b.sd=c.sd,b.U=c.U,ec(b,Qc)):(b.I=c?Oc(32):0,b.M=c?Oc(96):0,ec(b,Gc));Ub(b,a.Ea,k);a.X[d]=b;a.pf.push(d);return b}function we(a){a.X!==a.Nc&&(a.X=a.Nc,a.rf=null,a.pf=null,a.De=null)}l=Md.prototype;l.reset=function(){this.Y.nb&&Xc(this);te(this);Uc(this);this.Y.error=!1};
function xe(a,b){var c;switch(b){case 0:c=a.F;break;case 1:c=a.H;break;case 2:c=a.K;break;case 3:c=a.G;break;case 4:c=B(a);break;case 5:c=a.L;break;case 6:c=a.J;break;case 7:c=a.I}return c}function ye(a,b,c){switch(b){case 0:a.F=c;break;case 1:a.H=c;break;case 2:a.K=c;break;case 3:a.G=c;break;case 4:A(a,c);break;case 5:a.L=c;break;case 6:a.J=c;break;case 7:a.I=c}}
function te(a){a.F=0;a.G=0;a.H=0;a.K=0;a.kc=0;a.L=0;a.J=0;a.I=0;a.dc=!1;a.Aa=a.Sa=0;a.Rl=[0,0];a.Wl=[0,0];a.ta=0;a.li=0;a.aa=0;a.pa=65520;a.Ub=0;a.Pc=1023;a.N=a.Xb=0;a.Zd=a.Ee=a.qd=a.$d=0;a.sc=-1;a.Tc=a.uc=-1;a.Uc=a.ma=-1;a.fa=new od(a,xd,"CS");a.Ca=new od(a,Hd,"DS");a.ua=new od(a,Hd,"ES");a.W=new od(a,td,"SS");A(a,0);zd(a,0);if(80386<=a.ca){switch(a.nd){case 80562:case 80563:a.K=771;break;case 80578:a.K=772;break;case 80594:a.K=773;break;case 80595:case 80596:a.K=776}a.pa=16;a.xi=0;a.pd=0;a.dd=0;
function te(a){a.F=0;a.G=0;a.H=0;a.K=0;a.kc=0;a.L=0;a.J=0;a.I=0;a.dc=!1;a.Aa=a.Sa=0;a.Rl=[0,0];a.Wl=[0,0];a.ta=0;a.li=0;a.aa=0;a.oa=65520;a.Ub=0;a.Pc=1023;a.N=a.Xb=0;a.Zd=a.Ee=a.qd=a.$d=0;a.sc=-1;a.Tc=a.uc=-1;a.Uc=a.ma=-1;a.fa=new od(a,xd,"CS");a.Ca=new od(a,Hd,"DS");a.ua=new od(a,Hd,"ES");a.W=new od(a,td,"SS");A(a,0);zd(a,0);if(80386<=a.ca){switch(a.nd){case 80562:case 80563:a.K=771;break;case 80578:a.K=772;break;case 80594:a.K=773;break;case 80595:case 80596:a.K=776}a.oa=16;a.xi=0;a.pd=0;a.dd=0;
a.zb=[0,0,0,0,null,null,0,0];a.tf=[null,null,null,null,null,null,0,0];a.ob=new od(a,Hd,"FS");a.rb=new od(a,Hd,"GS");we(a)}a.gg=new od(a,0,"NULL");a.Ba=a.Ca;a.Db=a.W;a.M=a.ba=0;a.C=a.D=-1;a.Ya=a.gg;a.Ka=0;if(80286>a.ca)Kd(a,0,65535);else{a.Lb=0;a.Oc=65535;a.lc=new od(a,5,"LDT",!0);a.ka=new od(a,vd,"TSS",!0);a.eb=new od(a,sd,"VER",!0);Kd(a,65520,61440);var b,c=D(a);b=a.fa;var d=-65536;80386>b.B.ca&&(d&=16777215);b=b.va=d;a.da=b+c|0;a.fg=(b>>>0)+(a.fa.ab>>>0)+1}Jd(a,0);Bd(a)}
function ze(a){2==a.Jc?(a.ui=a.ga,a.Wb=Ae,a.cc=Be,a.Rc=Ce,2==a.T?(a.ia=De,a.xa=Ee,a.bb=Fe):(a.ia=Ge,a.xa=He,a.bb=Ie)):(a.ui=a.ea,a.Wb=Je,a.cc=Ke,a.Rc=Le,2==a.T?(a.ia=Me,a.xa=Ne,a.bb=Oe):(a.ia=Pe,a.xa=Qe,a.bb=Re))}function Cd(a,b){a.T!=b&&(a.ba|=1024,a.T=b,a.O=2==b?65535:-1,Se(a))}function Se(a){2==a.T?(a.tb=32768,a.jb=a.ga,a.sb=a.Wa,2==a.Jc?(a.ia=De,a.xa=Ee,a.bb=Fe):(a.ia=Me,a.xa=Ne,a.bb=Oe)):(a.tb=-2147483648,a.jb=a.ea,a.sb=a.Pa,2==a.Jc?(a.ia=Ge,a.xa=He,a.bb=Ie):(a.ia=Pe,a.xa=Qe,a.bb=Re))}
function Te(a){a.Jc=a.fa.Jc;a.ra=a.fa.ra;ze(a);a.T=a.fa.T;a.O=a.fa.O;Se(a);a.ba&=-3073}l.vi=function(){var a=this.F+this.G+this.H+this.K+B(this)+this.L+this.J+this.I|0;return a=a+D(this)+this.fa.ha+this.Ca.ha+this.W.ha+this.ua.ha+Id(this)|0};function Ue(a,b,c){void 0===a.qf[b]&&(a.qf[b]=[]);a.qf[b].push(c)}function Ve(a,b){var c=a.xh[b];null!=c&&(c(--a.eg),delete a.xh[b])}
function We(a,b){for(var c=a.zb[7],d=c>>16,e=0;4>e;e++){if(c&3){var f=!!(d&1),g=a.zb[e],g=g&~(d>>2&3);if(b){var g=a.X[g>>>a.Bb],h=a;f?g.he++||(h&&(g.F=h),Kc(g,Lc,!1)):g.ge++||(h&&(g.F=h),Ic(g,Lc,!1))}else g=a.X[g>>>a.Bb],f?--g.he||(f=g,f.pc=f.H?f.uh:f.jf,f.lf=f.H?f.vh:f.wh,f.kf=f.H?f.th:f.S):--g.ge||(f=g,f.nc=f.Bd,f.cf=f.df,f.Qd=f.oh)}c>>=2;d>>=4}}
function Mc(a,b,c,d){if(!(a.M&8192)&&a.zb[7]&255){c--;var e=a.zb[7],f=e>>16;d=d?1:0==d?3:0;for(var g=0;4>g;g++){if(e&3&&(f&3)==d){var h=f>>2;if(b+c>=a.zb[g]&&b<=a.zb[g]+h){a.zb[6]|=1<<g;a.Ka|=2;break}}e>>=2;f>>=4}}}function Bd(a,b,c){void 0===b&&(b=!!(a.pa&1));void 0===c&&(c=!!(a.N&131072));a.gi=b&&!c?Xe:Qd;pd(a.fa,!1,b,c);pd(a.Ca,!1,b,c);pd(a.W,!1,b,c);pd(a.ua,!1,b,c);80386<=a.ca&&(pd(a.ob,!1,b,c),pd(a.rb,!1,b,c));Te(a)}
l.save=function(a){var b=new Ye(this);b.set(0,[this.F,this.G,this.H,this.K,B(this),this.L,this.J,this.I]);var c=D(this),d=this.fa.save(),e=this.Ca.save(),f=this.W.save(),g=this.ua.save(),h;null!=this.Lb?(h=[this.pa,this.Lb,this.Oc,this.Ub,this.Pc,this.lc.save(),this.ka.save(),this.Xb],80386<=this.ca&&(h.push(this.xi),h.push(this.pd),h.push(this.dd),h.push(this.zb),h.push(this.tf))):h=null;c=[c,d,e,f,g,h,Id(this)];80386<=this.ca&&(c.push(this.ob.save()),c.push(this.rb.save()));b.set(1,c);b.set(2,[this.Ba.ag,
this.Db.ag,this.M,this.ba,this.Ka,this.C,this.D]);b.set(3,[0,this.cd,this.R.yd,a]);b.set(4,pc(this.na,!!(this.pa&-2147483648)));return b.data()};
l.restore=function(a){var b=a[0];this.F=b[0];this.G=b[1];this.H=b[2];this.K=b[3];var c=b[4];this.L=b[5];this.J=b[6];this.I=b[7];b=a[1];this.fa.restore(b[1]);this.Ca.restore(b[2]);this.W.restore(b[3]);this.ua.restore(b[4]);var d=b[5];d&&d.length&&(this.pa=d[0],this.Lb=d[1],this.Oc=d[2],this.Ub=d[3],this.Pc=d[4],this.lc.restore(d[5]),this.ka.restore(d[6]),this.Xb=d[7],80386<=this.ca&&(this.xi=d[8],this.pd=d[9],this.dd=d[10],this.zb=d[11],this.tf=d[12]),Bd(this));Jd(this,b[6]);var d=!1,e;a:{e=this.na;
function Mc(a,b,c,d){if(!(a.M&8192)&&a.zb[7]&255){c--;var e=a.zb[7],f=e>>16;d=d?1:0==d?3:0;for(var g=0;4>g;g++){if(e&3&&(f&3)==d){var h=f>>2;if(b+c>=a.zb[g]&&b<=a.zb[g]+h){a.zb[6]|=1<<g;a.Ka|=2;break}}e>>=2;f>>=4}}}function Bd(a,b,c){void 0===b&&(b=!!(a.oa&1));void 0===c&&(c=!!(a.N&131072));a.gi=b&&!c?Xe:Qd;pd(a.fa,!1,b,c);pd(a.Ca,!1,b,c);pd(a.W,!1,b,c);pd(a.ua,!1,b,c);80386<=a.ca&&(pd(a.ob,!1,b,c),pd(a.rb,!1,b,c));Te(a)}
l.save=function(a){var b=new Ye(this);b.set(0,[this.F,this.G,this.H,this.K,B(this),this.L,this.J,this.I]);var c=D(this),d=this.fa.save(),e=this.Ca.save(),f=this.W.save(),g=this.ua.save(),h;null!=this.Lb?(h=[this.oa,this.Lb,this.Oc,this.Ub,this.Pc,this.lc.save(),this.ka.save(),this.Xb],80386<=this.ca&&(h.push(this.xi),h.push(this.pd),h.push(this.dd),h.push(this.zb),h.push(this.tf))):h=null;c=[c,d,e,f,g,h,Id(this)];80386<=this.ca&&(c.push(this.ob.save()),c.push(this.rb.save()));b.set(1,c);b.set(2,[this.Ba.ag,
this.Db.ag,this.M,this.ba,this.Ka,this.C,this.D]);b.set(3,[0,this.cd,this.R.yd,a]);b.set(4,pc(this.na,!!(this.oa&-2147483648)));return b.data()};
l.restore=function(a){var b=a[0];this.F=b[0];this.G=b[1];this.H=b[2];this.K=b[3];var c=b[4];this.L=b[5];this.J=b[6];this.I=b[7];b=a[1];this.fa.restore(b[1]);this.Ca.restore(b[2]);this.W.restore(b[3]);this.ua.restore(b[4]);var d=b[5];d&&d.length&&(this.oa=d[0],this.Lb=d[1],this.Oc=d[2],this.Ub=d[3],this.Pc=d[4],this.lc.restore(d[5]),this.ka.restore(d[6]),this.Xb=d[7],80386<=this.ca&&(this.xi=d[8],this.pd=d[9],this.dd=d[10],this.zb=d[11],this.tf=d[12]),Bd(this));Jd(this,b[6]);var d=!1,e;a:{e=this.na;
var f=a[4],g;for(g=0;g<f.length-1;g+=2){var h=f[g],k=f[g+1];if(k&&k.length<e.V){for(var m=0,r=Array(e.V),y=0;y<k.length-1;)for(var t=k[y++],z=k[y++];t--;)r[m++]=z;k=r}m=e.X[h];if(!m||!m.restore(k)){q("Unable to restore memory block "+h);e=!1;break a}}void 0!==f[g]&&Vb(e,f[g]);e=!0}e&&(Kd(this,b[0],this.fa.ha),A(this,c),zd(this,this.W.ha),80386<=this.ca&&(this.ob.restore(b[7]),this.rb.restore(b[8])),d=!0);b=a[2];this.Ba=null!=b[0]&&Ze(this,b[0])||this.Ca;this.Db=null!=b[1]&&Ze(this,b[1])||this.W;this.M=
b[2];this.ba=b[3];this.Ka=b[4];this.C=b[5];this.D=b[6];b=a[3];this.cd=b[1];Zc(this,b[2]);null!=b[3]&&(this.Y.Gd=b[3]);return d};function Ze(a,b){switch(b){case "CS":return a.fa;case "DS":return a.Ca;case "SS":return a.W;case "ES":return a.ua;case "NULL":return a.gg;default:return[0,b,0,0,""]}}function $e(a,b){null!=Kd(a,D(a),b)&&(a.M|=a.mf)}function Fd(a,b){-1!==a.Ca.load(b)&&(a.M|=a.mf)}
function zd(a,b,c){var d=B(a);-1!==a.W.load(b)&&(A(a,d),a.W.me?(a.zi=a.W.va+a.W.ra|0,a.Bi=a.W.va+a.W.ab|0):(a.zi=a.W.va+a.W.ab|0,a.Bi=a.W.va),c||(a.M|=4))}function Gd(a,b){-1!==a.ua.load(b)&&(a.M|=a.mf)}function D(a){return a.da-a.fa.va|0}function G(a,b){a.da=a.fa.va+(b&a.O)|0}function af(a,b){a.da=b;a.fg=(a.fa.va>>>0)+(a.fa.ab>>>0)+1;a.Fa=a.fa.pb;Te(a)}function Kd(a,b,c,d){var e=a.fa;e.bf=b;e.D=d;b=e.load(c);return-1!==b?(af(a,b+(a.fa.bf&a.fa.O)),a.fa.pe):null}
@ -163,8 +163,8 @@ function bf(a,b){b=(a.da>>>0)+b;b>a.fg&&(8088>=a.ca||a.fa.ab==a.fa.ra?b=a.fa.va+
function lf(a,b,c,d,e){a.resultType=c|26;a.$d=b;d?mf(a):nf(a);e?of(a):pf(a);return b}function qf(a,b,c,d){c&d?mf(a):nf(a);(b^c)&d?of(a):pf(a)}function rf(a){return ef(a)?1:0}function ef(a){a.resultType&1&&(a.N&=-2,(a.Zd^(a.Zd^a.Ee)&(a.Ee^a.qd))&a.resultType&-2147450752&&(a.N|=1),a.resultType&=-2);return a.N&1}function ff(a){a.resultType&2&&(a.N&=-5,38505>>((a.$d^a.$d>>4)&15)&1&&(a.N|=4),a.resultType&=-3);return a.N&4}
function gf(a){a.resultType&4&&(a.N&=-17,(a.qd^a.Zd^a.Ee)&16&&(a.N|=16),a.resultType&=-5);return a.N&16}function hf(a){a.resultType&8&&(a.N&=-65,a.$d&((a.resultType&-2147450752)-1|a.resultType&-2147450752)||(a.N|=64),a.resultType&=-9);return a.N&64}function jf(a){a.resultType&16&&(a.N&=-129,a.$d&a.resultType&-2147450752&&(a.N|=128),a.resultType&=-17);return a.N&128}
function kf(a){a.resultType&32&&(a.N&=-2049,(a.Zd^a.qd)&(a.Ee^a.qd)&a.resultType&-2147450752&&(a.N|=2048),a.resultType&=-33);return a.N&2048}function nf(a){a.resultType&=-2;a.N&=-2}function sf(a){a.resultType&=-5;a.N&=-17}function tf(a){a.resultType&=-9;a.N&=-65}function pf(a){a.resultType&=-33;a.N&=-2049}function mf(a){a.resultType&=-2;a.N|=1}function uf(a){a.resultType&=-5;a.N|=16}function vf(a){a.resultType&=-9;a.N|=64}function of(a){a.resultType&=-33;a.N|=2048}
function Id(a){return a.N&-2262|ef(a)|ff(a)|gf(a)|hf(a)|jf(a)|kf(a)}function wf(a,b){b|=a.pa&1|65520;a.pa=a.pa&-65536|b&65535;a.pa&1&&Bd(a,!0)}function Jd(a,b,c){a.pa&1||(b&=~a.Th);void 0===c&&(c=a.Fa);c?b=b&-12289|a.N&12288:a.Xb=(b&12288)>>12;c>a.Xb&&(b=b&-513|a.N&512);a.resultType=128;a.N=a.N&~(a.Dd|2261)|b&(a.Dd|2261)|a.Vh;a.N&256&&(a.Ka|=2,a.M|=4)}
function xf(a,b,c){var d=0;if(a.pa&1&&(a.Fa>a.Xb||a.N&131072)&&a.ka.ai)for(var e=a.ka.ai+(b>>>3),d=(1<<c)-1<<(b&7);d&&e<=a.ka.mk&&!(a.Eb(e)&d);)d>>>=8,e++;return d?(w.call(a,13,0),!1):!0}
function Id(a){return a.N&-2262|ef(a)|ff(a)|gf(a)|hf(a)|jf(a)|kf(a)}function wf(a,b){b|=a.oa&1|65520;a.oa=a.oa&-65536|b&65535;a.oa&1&&Bd(a,!0)}function Jd(a,b,c){a.oa&1||(b&=~a.Th);void 0===c&&(c=a.Fa);c?b=b&-12289|a.N&12288:a.Xb=(b&12288)>>12;c>a.Xb&&(b=b&-513|a.N&512);a.resultType=128;a.N=a.N&~(a.Dd|2261)|b&(a.Dd|2261)|a.Vh;a.N&256&&(a.Ka|=2,a.M|=4)}
function xf(a,b,c){var d=0;if(a.oa&1&&(a.Fa>a.Xb||a.N&131072)&&a.ka.ai)for(var e=a.ka.ai+(b>>>3),d=(1<<c)-1<<(b&7);d&&e<=a.ka.mk&&!(a.Eb(e)&d);)d>>>=8,e++;return d?(w.call(a,13,0),!1):!0}
l.yb=function(a,b,c){switch(b){case "EAX":case "EBX":case "ECX":case "EDX":case "ESP":case "EBP":case "ESI":case "EDI":case "EIP":case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "IP":case "PC":case "CS":case "DS":case "SS":case "ES":case "FS":case "GS":case "CR0":case "CR2":case "CR3":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "V":this.ja[b]=c;this.pi++;a=!0;break;default:a=Rc.prototype.yb.call(this,a,b,c)}return a};
function yf(a,b,c,d){var e=(d?a.Nc:a.X)[(b&a.Ic)>>>a.Bb];e&&e.type==Dc&&(e=Nc(a,b,!1,!0));if(e){var f=b&a.Ab;if(!c||1==c)return e.Bd(f,b);if(2==c)return f<a.Ab?e.df(f,b):e.Bd(f,b)|yf(a,b+1,1,d)<<8;if(4==c)return f<a.Ab-2?e.oh(f,b):f==a.Ab-1?e.df(f,b)|yf(a,b+2,2,d)<<16:e.Bd(f,b)|yf(a,b+1,1,d)<<8|yf(a,b+2,1,d)<<16|yf(a,b+3,1,d)<<24}return null}l.Eb=function(a){return this.X[(a&this.Ic)>>>this.Bb].nc(a&this.Ab,a)};
l.ga=function(a){var b=a&this.Ab,c=(a&this.Ic)>>>this.Bb;this.A-=this.B.Sf;if(b<this.Ab)return this.X[c].cf(b,a);b=this.X[c].nc(b,a);this.M&4096||(b|=this.X[c+1&this.Ae].nc(0,a+1)<<8);return b};l.ea=function(a){var b=a&this.Ab,c=(a&this.Ic)>>>this.Bb;if(b<this.Ab-2)return this.X[c].Qd(b,a);for(var d=0,e=4,f=0,g=4-(b&3);e--;){d|=this.X[c].nc(b++,a++)<<f;if(this.M&4096)break;--g||(c=c+1&this.Ae,b=0);f+=8}return d};l.oc=function(a,b){this.X[(a&this.Ic)>>>this.Bb].pc(a&this.Ab,b&255,a)};
@ -186,8 +186,8 @@ function P(a,b){var c=null;b=a.B+b&7;a.C&1<<b?c=a.H[b]:Sf(a,1)||(c=a.W[0]);retur
function gg(a){return a.S.ea(a.S.C)}function hg(a){a.ia[0]=a.S.ea(a.S.C);return a.X[0]}function ig(a){a.G[0]=a.S.ea(a.S.C);a.G[1]=a.S.ea(a.S.C+4);return a.K[0]}function jg(a){a.D[0]=a.S.ea(a.S.C);a.D[1]=a.S.ea(a.S.C+4);a.D[2]=a.S.ga(a.S.C+8);return a.D}l.sh=function(){this.S.Pa(this.S.C,this.G[0])};l.Xj=function(){this.S.Pa(this.S.C,this.G[0]);this.S.Pa(this.S.C+4,this.G[1])};function kg(a){a.S.Pa(a.S.C,a.D[0]);a.S.Pa(a.S.C+4,a.D[1]);a.S.Wa(a.S.C+8,a.D[2])}
function lg(a,b){var c=b[1],d=(b[2]&32768)>>4,e=b[2]&32767;b=b[0]>>>11|c<<21;c=c>>11&1048575;32767==e?e=2047:e&&(e+=-15360,0>=e&&(e=2047,b=c=0));a.G[0]=b;a.G[1]=c|(d|e)<<20;return a.K[0]}function mg(a,b){for(var c=0,d=1;b--;)c+=(a&15)*d,d*=10,a>>=4;return c}function ng(a,b){for(var c=0,d=0;b--;)c|=a%10<<d,a/=10,d+=4;return c}function og(a){var b=null,c=1<<a.B;if(!(a.C&c)&&(a.Z&=-513,Sf(a,65)))return b;a.C&=~c;b=a.H[a.B];a.B=a.B+1&7;return b}
function pg(a,b){if(null!=b){var c=a.B-1&7,d=1<<c;if(a.C&d&&(a.Z|=512,Sf(a,65)))return;if(isNaN(b)&&Sf(a,1)){if(Sf(a,1))return;b=NaN}a.H[a.B=c]=b;a.C|=d}}
function qg(a,b){var c,d=a.S;c=d.jb(b);a.F=c&-57409;c=d.jb(b+=d.T);a.Z=c&-14337;a.B=(c&14336)>>11;Lf(a);Mf(a,d.jb(b+=d.T));!(d.pa&1)||d.N&131072?(a.I=d.jb(b+=d.T),c=d.jb(b+=d.T),a.N=c&2047,a.I|=(c&-4096)<<4,a.L=-1,a.J=d.jb(b+=d.T),a.J|=(d.jb(b+=d.T)&-4096)<<4,a.M=-1):(a.I=d.jb(b+=d.T),c=d.jb(b+=d.T),a.L=c&65535,a.N=c>>16&2047,a.J=d.jb(b+=d.T),a.M=d.jb(b+=d.T)&65535);return b+d.T}
function rg(a,b){var c=a.S;c.sb(b,a.F);c.sb(b+=c.T,a.Z|a.B<<11);c.sb(b+=c.T,Kf(a));if(!(c.pa&1)||c.N&131072){var d=(a.L<<4)+a.I;c.sb(b+=c.T,d);c.sb(b+=c.T,d>>4&-4096|a.N);d=(a.M<<4)+a.J;c.sb(b+=c.T,d);c.sb(b+=c.T,d>>4&-4096)}else c.sb(b+=c.T,a.I),c.sb(b+=c.T,a.L|a.N<<16),c.sb(b+=c.T,a.J),c.sb(b+=c.T,a.M);return b+c.T}function sg(){this.Z&=-32896;Lf(this)}function tg(){$f(this,P(this,0),P(this,this.A))}function ug(){$f(this,P(this,0),P(this,this.A))&&og(this)}function vg(){ug.call(this)}
function qg(a,b){var c,d=a.S;c=d.jb(b);a.F=c&-57409;c=d.jb(b+=d.T);a.Z=c&-14337;a.B=(c&14336)>>11;Lf(a);Mf(a,d.jb(b+=d.T));!(d.oa&1)||d.N&131072?(a.I=d.jb(b+=d.T),c=d.jb(b+=d.T),a.N=c&2047,a.I|=(c&-4096)<<4,a.L=-1,a.J=d.jb(b+=d.T),a.J|=(d.jb(b+=d.T)&-4096)<<4,a.M=-1):(a.I=d.jb(b+=d.T),c=d.jb(b+=d.T),a.L=c&65535,a.N=c>>16&2047,a.J=d.jb(b+=d.T),a.M=d.jb(b+=d.T)&65535);return b+d.T}
function rg(a,b){var c=a.S;c.sb(b,a.F);c.sb(b+=c.T,a.Z|a.B<<11);c.sb(b+=c.T,Kf(a));if(!(c.oa&1)||c.N&131072){var d=(a.L<<4)+a.I;c.sb(b+=c.T,d);c.sb(b+=c.T,d>>4&-4096|a.N);d=(a.M<<4)+a.J;c.sb(b+=c.T,d);c.sb(b+=c.T,d>>4&-4096)}else c.sb(b+=c.T,a.I),c.sb(b+=c.T,a.L|a.N<<16),c.sb(b+=c.T,a.J),c.sb(b+=c.T,a.M);return b+c.T}function sg(){this.Z&=-32896;Lf(this)}function tg(){$f(this,P(this,0),P(this,this.A))}function ug(){$f(this,P(this,0),P(this,this.A))&&og(this)}function vg(){ug.call(this)}
function wg(){Q(this,0,Zf(this,P(this,0),hg(this)))}function xg(){this.C&=~(1<<this.B)}function yg(){Jf(this)}function zg(){this.F=this.S.ga(this.S.C)&-57409}function Ag(){qg(this,this.S.C)}function Bg(){for(var a=this.S,b=qg(this,a.C),c=this.D,d=0;d<this.H.length;d++)c[0]=a.ea(b),c[1]=a.ea(b+=4),c[2]=a.ga(b+=4),c&&Q(this,d,lg(this,c)),b+=2}function Cg(){for(var a=this.S,b=rg(this,a.C),c=0;c<this.H.length;c++){var d=eg(this,c,!0);a.Pa(b,d[0]);a.Pa(b+=4,d[1]);a.Wa(b+=4,d[2]);b+=2}Jf(this)}
function Dg(){rg(this,this.S.C);this.F|=63}function Eg(){Q(this,this.A,P(this,0))&&og(this)}function Fg(){Eg.call(this)}function Gg(){this.S.Wa(this.S.C,this.F)}function Hg(){this.S.Wa(this.S.C,this.Z|this.B<<11)}function Ig(){80287<=this.ca&&(this.S.F=this.S.F&-65536|this.Z|this.B<<11)}function Jg(){var a=P(this,0);Q(this,0,P(this,this.A));Q(this,this.A,a)}function Kg(){Jg.call(this)}
var Lg=Math.log(10)/Math.LN2,Mg=Math.LOG2E,Ng=Math.PI,Og=Math.log(2)/Math.LN10,Pg=Math.LN2,Qg=Math.pow(2,63),Rg={216:{0:function(){Q(this,0,Uf(this,P(this,0),hg(this)))},1:function(){Q(this,0,Yf(this,P(this,0),hg(this)))},2:function(){$f(this,P(this,0),hg(this))},3:function(){$f(this,P(this,0),hg(this))&&og(this)},4:function(){Q(this,0,Xf(this,P(this,0),hg(this)))},5:function(){Q(this,0,Xf(this,hg(this),P(this,0)))},6:wg,7:wg,48:function(){Q(this,0,Uf(this,P(this,0),P(this,this.A)))},49:function(){Q(this,
@ -219,14 +219,14 @@ function Fh(a,b){a=this.aa>>3&7;switch(a){case 0:this.ta=this.F;break;case 2:thi
function Gh(a,b){switch(this.aa>>3&7){case 0:b=this.ua.ha;break;case 1:b=this.fa.ha;break;case 2:b=this.W.ha;break;case 3:b=this.Ca.ha;break;case 4:if(80386<=this.ca){b=this.ob.ha;break}w.call(this,6);b=a;break;case 5:if(80386<=this.ca){b=this.rb.ha;break}default:w.call(this,6),b=a}-1!==this.D&&Cd(this,2);return Ch.call(this,0,b)}
function th(a,b){if(a&-65536||b&-65536){var c=b&65535;b>>>=16;var d=a&65535;a>>>=16;var e=c*d,d=(e>>>16)+b*d,f=d>>>16,d=(d&65535)+c*a;this.Aa=d<<16|e&65535;this.Sa=f+((d>>>16)+b*a)|0}else this.Aa=a*b|0,this.Sa=0}function Hh(a,b){this.A-=-1===this.D?-1===this.C?this.B.Yb:this.B.xb:this.B.mc;return lf(this,a|b,128)}function Ih(a,b){this.A-=-1===this.D?-1===this.C?this.B.Yb:this.B.xb:this.B.mc;return lf(this,a|b,this.tb)&this.O}
function Jh(a,b){var c=a-b-rf(this)|0;df(this,a,b,c,191,!0);this.A-=-1===this.D?-1===this.C?this.B.Yb:this.B.xb:this.B.mc;return c&255}function Kh(a,b){var c=a-b-rf(this)|0;df(this,a,b,c,this.tb|63,!0);this.A-=-1===this.D?-1===this.C?this.B.Yb:this.B.xb:this.B.mc;return c&this.O}function Lh(){return kf(this)?1:0}function Mh(){return ef(this)?1:0}function Nh(){return ef(this)?0:1}function Oh(){return hf(this)?1:0}function Ph(){return hf(this)?0:1}function Qh(){return ef(this)||hf(this)?1:0}
function Rh(){return ef(this)||hf(this)?0:1}function Sh(){return jf(this)?1:0}function Th(){return jf(this)?0:1}function Uh(){return ff(this)?1:0}function Vh(){return ff(this)?0:1}function Wh(){return!jf(this)!=!kf(this)?1:0}function Xh(){return!jf(this)!=!kf(this)?0:1}function Yh(){return hf(this)||!jf(this)!=!kf(this)?1:0}function Zh(){return hf(this)||!jf(this)!=!kf(this)?0:1}function $h(a,b){return ai.call(this,a,b,this.la())}function ei(a,b){return fi.call(this,a,b,this.la())}
function gi(a,b){return ai.call(this,a,b,this.H&31)}function hi(a,b){return fi.call(this,a,b,this.H&31)}function ii(a,b){return ji.call(this,a,b,this.la())}function ki(a,b){return li.call(this,a,b,this.la())}function mi(a,b){return ji.call(this,a,b,this.H&31)}function ni(a,b){return li.call(this,a,b,this.H&31)}function oi(a,b){var c=a-b|0;df(this,a,b,c,191,!0);this.A-=-1===this.D?-1===this.C?this.B.Yb:this.B.xb:this.B.mc;return c&255}
function Rh(){return ef(this)||hf(this)?0:1}function Sh(){return jf(this)?1:0}function Th(){return jf(this)?0:1}function Uh(){return ff(this)?1:0}function Vh(){return ff(this)?0:1}function Wh(){return!jf(this)!=!kf(this)?1:0}function Xh(){return!jf(this)!=!kf(this)?0:1}function Yh(){return hf(this)||!jf(this)!=!kf(this)?1:0}function Zh(){return hf(this)||!jf(this)!=!kf(this)?0:1}function $h(a,b){return ai.call(this,a,b,this.la())}function bi(a,b){return ci.call(this,a,b,this.la())}
function gi(a,b){return ai.call(this,a,b,this.H&31)}function hi(a,b){return ci.call(this,a,b,this.H&31)}function ii(a,b){return ji.call(this,a,b,this.la())}function ki(a,b){return li.call(this,a,b,this.la())}function mi(a,b){return ji.call(this,a,b,this.H&31)}function ni(a,b){return li.call(this,a,b,this.H&31)}function oi(a,b){var c=a-b|0;df(this,a,b,c,191,!0);this.A-=-1===this.D?-1===this.C?this.B.Yb:this.B.xb:this.B.mc;return c&255}
function pi(a,b){var c=a-b|0;df(this,a,b,c,this.tb|63,!0);this.A-=-1===this.D?-1===this.C?this.B.Yb:this.B.xb:this.B.mc;return c&this.O}function qi(a,b){lf(this,a&b,128);this.A-=-1===this.D?-1===this.C?this.B.ih:this.B.Ye:this.B.Ye;this.M|=2;return a}function ri(a,b){lf(this,a&b,this.tb);this.A-=-1===this.D?-1===this.C?this.B.ih:this.B.Ye:this.B.Ye;this.M|=2;return a}function si(a,b){var c=this.F&this.O,d=(1<<(this.H&31))-1;return a&~(d<<c)|(b&d)<<c}
function ti(a,b){return b>>(this.F&this.O)&(1<<(this.H&31))-1&this.O}function ui(a,b){if(-1===this.C){switch(this.aa&7){case 0:this.F=this.F&-256|a;break;case 1:this.H=this.H&-256|a;break;case 2:this.K=this.K&-256|a;break;case 3:this.G=this.G&-256|a;break;case 4:this.F=this.F&-65281|a<<8;break;case 5:this.H=this.H&-65281|a<<8;break;case 6:this.K=this.K&-65281|a<<8;break;case 7:this.G=this.G&-65281|a<<8}this.A-=this.B.kh}else this.D=this.C,Bf(this,a),this.A-=this.B.jh;return b}
function vi(a,b){if(-1===this.C){switch(this.aa&7){case 0:this.F=this.F&~this.O|a;break;case 1:this.H=this.H&~this.O|a;break;case 2:this.K=this.K&~this.O|a;break;case 3:this.G=this.G&~this.O|a;break;case 4:A(this,B(this)&~this.O|a);break;case 5:this.L=this.G&~this.O|a;break;case 6:this.J=this.J&~this.O|a;break;case 7:this.I=this.I&~this.O|a}this.A-=this.B.kh}else this.D=this.C,this.M&2||this.sb(this.Ya.Nb(this.cb,this.T),a),this.A-=this.B.jh;return b}
function wi(a,b){a^=b;lf(this,a,128);this.A-=-1===this.D?-1===this.C?this.B.Yb:this.B.xb:this.B.mc;return a}function xi(a,b){this.A-=-1===this.D?-1===this.C?this.B.Yb:this.B.xb:this.B.mc;return lf(this,a^b,this.tb)&this.O}function yi(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function zi(a){var b=a-1|0;df(this,a,1,b,this.tb|62,!0);this.A-=2;return a&~this.O|b&this.O}
function Ai(a,b,c){c>>>=0;if(!c||c<=b>>>0)return!1;var d=0,e=1,f=this.Rl;f[0]=c>>>0;f[1]=0;c=this.Wl;c[0]=a>>>0;for(c[1]=b>>>0;0<yi(c,f);)b=a=f,a[0]+=b[0],a[1]+=b[1],4294967295<a[0]&&(a[0]>>>=0,a[1]++),e+=e;do 0<=yi(c,f)&&(a=c,b=f,a[0]-=b[0],a[1]-=b[1],0>a[0]&&(a[0]>>>=0,a[1]--),d+=e),a=f,a[0]>>>=1,a[1]&1&&(a[0]=(a[0]|2147483648)>>>0),a[1]>>>=1,e/=2;while(1<=e);this.Aa=d;this.Sa=c[0];return!0}function Bi(a){var b=a+1|0;df(this,a,1,b,this.tb|62);this.A-=2;return a&~this.O|b&this.O}
function Ld(a){this.dd=a;this.pa&-2147483648&&Zb(this)}function Ci(a){this.M|=1;this.cc.call(this,a);this.A-=-1===this.C?4:5}function ai(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a<<c-1;a=(d<<1|b>>>16-c)&65535;lf(this,a,32768,d&32768)}return a}function fi(a,b,c){if(c){var d=a<<c-1;a=d<<1|b>>>32-c;lf(this,a,-2147483648,d&-2147483648)}return a}function ji(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a>>>c-1;a=(d>>>1|b<<16-c)&65535;lf(this,a,32768,d&1)}return a}
function Ld(a){this.dd=a;this.oa&-2147483648&&Zb(this)}function Ci(a){this.M|=1;this.cc.call(this,a);this.A-=-1===this.C?4:5}function ai(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a<<c-1;a=(d<<1|b>>>16-c)&65535;lf(this,a,32768,d&32768)}return a}function ci(a,b,c){if(c){var d=a<<c-1;a=d<<1|b>>>32-c;lf(this,a,-2147483648,d&-2147483648)}return a}function ji(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a>>>c-1;a=(d>>>1|b<<16-c)&65535;lf(this,a,32768,d&1)}return a}
function li(a,b,c){if(c){var d=a>>>c-1;a=d>>>1|b<<32-c;lf(this,a,-2147483648,d&1)}return a}function Di(){this.A-=-1===this.C?2:this.B.Gj;return 1}function Ei(){var a=this.H&255;this.A-=(-1===this.C?this.B.ah:this.B.$g)+(a<<this.B.bh);return a}function Fi(){var a=this.la();this.A-=(-1===this.C?this.B.ah:this.B.$g)+(a<<this.B.bh);return a}function Gi(){return null}function Hi(){return this.ta}
function Ii(a,b){this.Tc=this.fa.ha;this.uc=this.W.ha;this.ma=this.za;var c=D(this),d=this.T;null!=Kd(this,a,b,!0)&&(Ed(this,this.Tc,d,2),Ed(this,c,d,d));this.Tc=this.uc=this.ma=-1}function Ji(a,b,c){this.A-=this.B.ej+(c||0);c=Id(this);var d=this.fa.ha,e=D(this);a=this.fa.Ci(a);-1!==a&&(C(this,c),C(this,d),C(this,e),null!=b&&C(this,b),this.sc=-1,af(this,a))}
function Ki(a){this.uc=this.W.ha;this.ma=this.za;var b=x(this),c=x(this);a&&A(this,B(this)+a);Kd(this,b,c,!1)&&(a&&A(this,B(this)+a),Li.call(this,this.Ca),Li.call(this,this.ua),80386<=this.ca&&(Li.call(this,this.ob),Li.call(this,this.rb)));2==a&&this.eg&&Ve(this,this.da);this.uc=this.ma=-1}function Mi(){8086==this.ca?(this.sc=-1,Ji.call(this,0,null,2)):w.call(this,0,null,2)}function Hf(a,b){this.sc=a;void 0===b&&(b=11);Ji.call(this,a,null,b)}
@ -320,7 +320,7 @@ this.C;break;case 131:c=L(this,this.G+N(this));this.D=this.C;break;case 132:c=L(
3&7].call(this,c,b.call(this));switch(d){case 192:this.F=a;break;case 193:this.H=a;break;case 194:this.K=a;break;case 195:this.G=a;break;case 196:A(this,a);break;case 197:this.L=a;break;case 198:this.J=a;break;case 199:this.I=a;break;default:Df(this,a)}}
function Ni(a){var b=this.la(),c=b>>6,d,e;switch(b>>3&7){case 0:d=this.F;break;case 1:d=this.H;break;case 2:d=this.K;break;case 3:d=this.G;break;case 4:d=0;break;case 5:d=this.L;break;case 6:d=this.J;break;case 7:d=this.I}switch(b&7){case 0:e=this.F;break;case 1:e=this.H;break;case 2:e=this.K;break;case 3:e=this.G;break;case 4:e=B(this);this.Ba=this.Db;break;case 5:a?(e=this.L,this.Ba=this.Db):e=N(this);break;case 6:e=this.J;break;case 7:e=this.I}return(d<<c)+e|0}
function ie(){this.bd[this.la()].call(this)}function le(){C(this,B(this)&this.O);this.A-=this.B.tc}function Sd(){this.ma=this.za;var a=B(this)&this.O;C(this,this.F&this.O);C(this,this.H&this.O);C(this,this.K&this.O);C(this,this.G&this.O);C(this,a);C(this,this.L&this.O);C(this,this.J&this.O);C(this,this.I&this.O);this.A-=this.B.Aj;this.ma=-1}
function Td(){this.ma=this.za;this.I=this.I&~this.O|x(this);this.J=this.J&~this.O|x(this);this.L=this.L&~this.O|x(this);A(this,B(this)+this.T);this.G=this.G&~this.O|x(this);this.K=this.K&~this.O|x(this);this.H=this.H&~this.O|x(this);this.F=this.F&~this.O|x(this);this.A-=this.B.yj;this.ma=-1}function Ud(){this.ia.call(this,$g)}function me(){!(this.pa&1)||this.N&131072?w.call(this,6):this.xa.call(this,Zg)}function ne(){this.M|=20;this.Ba=this.Db=this.ob;this.A-=this.B.Hc}
function Td(){this.ma=this.za;this.I=this.I&~this.O|x(this);this.J=this.J&~this.O|x(this);this.L=this.L&~this.O|x(this);A(this,B(this)+this.T);this.G=this.G&~this.O|x(this);this.K=this.K&~this.O|x(this);this.H=this.H&~this.O|x(this);this.F=this.F&~this.O|x(this);this.A-=this.B.yj;this.ma=-1}function Ud(){this.ia.call(this,$g)}function me(){!(this.oa&1)||this.N&131072?w.call(this,6):this.xa.call(this,Zg)}function ne(){this.M|=20;this.Ba=this.Db=this.ob;this.A-=this.B.Hc}
function oe(){this.M|=20;this.Ba=this.Db=this.rb;this.A-=this.B.Hc}function pe(){this.M|=1024;this.ba&1024||(this.T^=6,this.O^=-65536,Se(this));this.A-=this.B.Hc}function qe(){this.M|=2048;this.ba&2048||(this.Jc^=6,this.ra^=-65536,ze(this));this.A-=this.B.Hc}function Vd(){C(this,this.ya());this.A-=this.B.tc}function Wd(){this.ia.call(this,qh)}function Xd(){C(this,this.P());this.A-=this.B.tc}function Yd(){this.ia.call(this,oh)}
function Zd(){var a=1,b=0,c=this.ra,d=5;this.ba&192&&(a=this.H&c,b=1,this.ba&256&&(d=4));if(a--){var e=this.K&65535;xf(this,e,1)&&(e=sc(this.na,e,1,this.da-b-1),this.oc(this.ua.Nb(this.I&c,1),e),this.I=this.I&~c|this.I+(this.N&1024?-1:1)&c,this.H=this.H&~c|this.H-b&c,this.A-=d,a&&(cf(this),this.M|=256))}}
function $d(){var a=1,b=0,c=this.ra,d=5;this.ba&192&&(a=this.H&c,b=1,this.ba&256&&(d=4));if(a--){var e=this.K&65535;xf(this,e,this.T)&&(e=sc(this.na,e,this.T,this.da-b-1),this.sb(this.ua.Nb(this.I&c,this.T),e),this.I=this.I&~c|this.I+(this.N&1024?-this.T:this.T)&c,this.H=this.H&~c|this.H-b&c,this.A-=d,a&&(cf(this),this.M|=256))}}
@ -360,7 +360,7 @@ a&&hf(this)==(this.ba&64)&&(cf(this),this.M|=256)}},function(){var a=1,b=0,c=thi
this.la();this.A-=this.B.Jb},function(){this.K=this.K&-256|this.la();this.A-=this.B.Jb},function(){this.G=this.G&-256|this.la();this.A-=this.B.Jb},function(){this.F=this.F&-65281|this.la()<<8;this.A-=this.B.Jb},function(){this.H=this.H&-65281|this.la()<<8;this.A-=this.B.Jb},function(){this.K=this.K&-65281|this.la()<<8;this.A-=this.B.Jb},function(){this.G=this.G&-65281|this.la()<<8;this.A-=this.B.Jb},function(){this.F=this.F&~this.O|this.ya();this.A-=this.B.Jb},function(){this.H=this.H&~this.O|this.ya();
this.A-=this.B.Jb},function(){this.K=this.K&~this.O|this.ya();this.A-=this.B.Jb},function(){this.G=this.G&~this.O|this.ya();this.A-=this.B.Jb},function(){A(this,B(this)&~this.O|this.ya());this.A-=this.B.Jb},function(){this.L=this.L&~this.O|this.ya();this.A-=this.B.Jb},function(){this.J=this.J&~this.O|this.ya();this.A-=this.B.Jb},function(){this.I=this.I&~this.O|this.ya();this.A-=this.B.Jb},mj,nj,mj,nj,function(){this.ia.call(this,xh)},function(){this.ia.call(this,vh)},function(){this.M|=1;this.Rc.call(this,
uj,this.la)},function(){this.M|=1;this.bb.call(this,uj,this.ya)},oj,pj,oj,pj,function(){if(this.N&131072&&3>this.Xb)w.call(this,13,0);else{var a=this.B.fj;this.sc=-1;Ji.call(this,3,null,a)}},function(){var a=this.la();if(this.N&131072&&3>this.Xb)w.call(this,13,0);else{var b;a:{b=this.qf[a];if(void 0!==b)for(var c=0;c<b.length;c++)if(!b[c](this.da)){b=!1;break a}b=!0}b?(this.sc=-1,Ji.call(this,a,null,0)):this.A--}},function(){if(kf(this))if(this.N&131072&&3>this.Xb)w.call(this,13,0);else{var a=this.B.gj;
this.sc=-1;Ji.call(this,4,null,a)}else this.A-=this.B.hj},function(){if(this.N&131072&&3>this.Xb)w.call(this,13,0);else{this.uc=this.W.ha;this.ma=this.za;this.A-=this.B.dj;if(this.pa&1&&this.N&16384){var a=this.ga(this.ka.va+0);Ad(this.fa,a,!1)}else{var a=this.Fa,b=x(this),c=x(this),d=x(this);if(this.N&131072)d=d&131071|this.N&-131072;else if(d&131072){var e=x(this),f=x(this),g=x(this),h=x(this),k=x(this),m=x(this);Bd(this,!0,!0);zd(this,f);A(this,e);Gd(this,g);Fd(this,h);this.ob.load(k);this.rb.load(m)}null!=
this.sc=-1;Ji.call(this,4,null,a)}else this.A-=this.B.hj},function(){if(this.N&131072&&3>this.Xb)w.call(this,13,0);else{this.uc=this.W.ha;this.ma=this.za;this.A-=this.B.dj;if(this.oa&1&&this.N&16384){var a=this.ga(this.ka.va+0);Ad(this.fa,a,!1)}else{var a=this.Fa,b=x(this),c=x(this),d=x(this);if(this.N&131072)d=d&131071|this.N&-131072;else if(d&131072){var e=x(this),f=x(this),g=x(this),h=x(this),k=x(this),m=x(this);Bd(this,!0,!0);zd(this,f);A(this,e);Gd(this,g);Fd(this,h);this.ob.load(k);this.rb.load(m)}null!=
Kd(this,b,c,!1)&&(Jd(this,d,a),this.eg&&Ve(this,this.da))}this.uc=this.ma=-1}},function(){this.Rc.call(this,jj,Di)},function(){this.bb.call(this,2==this.T?kj:lj,Di)},function(){this.Rc.call(this,jj,Ei)},function(){this.bb.call(this,2==this.T?kj:lj,Ei)},function(){var a=this.la();if(a){var b=this.F&255;this.F=this.F&-65536|b/a<<8|b%a;lf(this,this.F,128);this.A-=this.B.Ji}else Mi.call(this)},function(){var a=this.F&255,b=(this.F>>8&255)*this.la()|0,c=a+b|0;this.F=this.F&-65536|c&255;df(this,a,b,c,191);
this.A-=this.B.Ii},function(){this.F=this.F&-256|(ef(this)?255:0);this.A-=2},function(){this.F=this.F&-256|zf(this,this.Ba,this.G+(this.F&255));this.A-=this.B.Hj},function(){qj.call(this,216)},function(){qj.call(this,217)},function(){qj.call(this,218)},function(){qj.call(this,219)},function(){qj.call(this,220)},function(){qj.call(this,221)},function(){qj.call(this,222)},function(){qj.call(this,223)},function(){var a=this.P(),b=this.H-1&this.ra;this.H=this.H&~this.ra|b;b&&!hf(this)?(G(this,D(this)+
a),this.A-=this.B.oj):this.A-=this.B.Ng},function(){var a=this.P(),b=this.H-1&this.ra;this.H=this.H&~this.ra|b;b&&hf(this)?(G(this,D(this)+a),this.A-=this.B.Og):this.A-=this.B.Pg},function(){var a=this.P(),b=this.H-1&this.ra;this.H=this.H&~this.ra|b;b?(G(this,D(this)+a),this.A-=this.B.nj):this.A-=this.B.Ng},function(){var a=this.P();this.H&this.ra?this.A-=this.B.Pg:(G(this,D(this)+a),this.A-=this.B.Og)},function(){var a=this.la();xf(this,a,1)&&(this.F=this.F&-256|sc(this.na,a,1,this.da-2)&255,this.A-=
@ -381,19 +381,19 @@ this.F,this.K,a))return Mi.call(this),a;this.Aa|=0;this.Sa|=0}this.dc=!0;this.A-
b=!1:(e&&(this.Aa=-this.Aa),f&&(this.Sa=-this.Sa),b=!0);if(!b)return Mi.call(this),a;this.Aa|=0;this.Sa|=0}this.dc=!0;this.A-=-1===this.C?this.B.Zi:this.B.Yi;this.M|=2;return a}],Od=[function(a){var b=a+1|0;df(this,a,1,b,190);this.A-=-1===this.C?this.B.Ve:this.B.Ue;return b&255},function(a){var b=a-1|0;df(this,a,1,b,190,!0);this.A-=-1===this.C?this.B.Ve:this.B.Ue;return b&255},R,R,R,R,R,R],Pd=[function(a){var b=a+1|0;df(this,a,1,b,this.tb|62);this.A-=-1===this.C?this.B.Ve:this.B.Ue;return b&this.O},
function(a){var b=a-1|0;df(this,a,1,b,this.tb|62,!0);this.A-=-1===this.C?this.B.Ve:this.B.Ue;return b&this.O},function(a){C(this,D(this));G(this,a);this.A-=-1===this.C?this.B.Ri:this.B.Qi;this.M|=2;return a},function(a){if(-1===this.C)return R.call(this,a);this.ma=this.za;Ii.call(this,a,this.ga(this.C+this.T));this.A-=this.B.Oi;this.M|=2;this.ma=-1;return a},function(a){G(this,a);this.A-=-1===this.C?this.B.lj:this.B.kj;this.M|=2;return a},function(a){if(-1===this.C)return R.call(this,a);Kd(this,a,
this.ga(this.C+this.T));this.A-=this.B.ij;this.M|=2;return a},function(a){var b=a;this.M&512&&(a=a-2&65535,80286>this.ca&&(b=a));C(this,b);this.A-=-1===this.C?this.B.tc:this.B.Bj;this.M|=2;return a},R];function re(){this.ia.call(this,ti);this.A-=-1===this.C?6:13}function se(){this.xa.call(this,si);this.A-=-1===this.C?12:19}var je=Array(256);je[0]=function(){16>(this.Eb(this.da)&56)&&(this.M|=1);this.bb.call(this,this.gi,Gi)};je[1]=function(){this.Eb(this.da)&16||(this.M|=1);this.bb.call(this,xj,Gi)};
je[2]=function(){!(this.pa&1)||this.N&131072?w.call(this,6):this.ia.call(this,uh)};je[3]=function(){!(this.pa&1)||this.N&131072?w.call(this,6):this.ia.call(this,Ah)};
je[2]=function(){!(this.oa&1)||this.N&131072?w.call(this,6):this.ia.call(this,uh)};je[3]=function(){!(this.oa&1)||this.N&131072?w.call(this,6):this.ia.call(this,Ah)};
je[5]=function(){this.Fa?w.call(this,13,0,0,!0):(wf(this,this.ga(2054)),this.I=this.ga(2086),this.J=this.ga(2088),this.L=this.ga(2090),this.G=this.ga(2094),this.K=this.ga(2096),this.H=this.ga(2098),this.F=this.ga(2100),wd(this.ua,2102,this.ga(2084)),wd(this.fa,2108,this.ga(2082)),wd(this.W,2114,this.ga(2080)),wd(this.Ca,2120,this.ga(2078)),Jd(this,this.ga(2072)),G(this,this.ga(2074)),A(this,this.ga(2092)),this.Lb=this.ga(2126)|this.Eb(2128)<<16,this.Oc=this.Lb+this.ga(2130),this.Ub=this.ga(2138)|
this.Eb(2140)<<16,this.Pc=this.Ub+this.ga(2142),wd(this.lc,2132,this.ga(2076)),wd(this.ka,2144,this.ga(2070)),this.A-=195)};je[6]=function(){this.Fa?w.call(this,13,0):(this.pa&=-9,this.A-=2)};je[11]=Rd;je[166]=Rd;je[255]=Rd;var F=[];F[5]=Rd;
F[7]=function(){if(this.Fa)w.call(this,13,0,0,!0);else{var a=this.ua.Mb(this.I&this.ra,204);if(-1!==a){this.pa=this.ea(a);Bd(this);this.pa&-2147483648?Zb(this):we(this);var b=this.ea(a+168),c=(b&24576)>>13;Jd(this,this.ea(a+4),c);this.Lb=this.ea(a+112);this.Oc=this.Lb+this.ea(a+116);this.Ub=this.ea(a+100);this.Pc=this.Ub+this.ea(a+104);ud(this.lc,this.ea(a+56),this.ea(a+120),this.ea(a+124),this.ea(a+128));ud(this.ka,this.ea(a+52),this.ea(a+84),this.ea(a+88),this.ea(a+92));this.I=this.ea(a+12);this.J=
this.Eb(2140)<<16,this.Pc=this.Ub+this.ga(2142),wd(this.lc,2132,this.ga(2076)),wd(this.ka,2144,this.ga(2070)),this.A-=195)};je[6]=function(){this.Fa?w.call(this,13,0):(this.oa&=-9,this.A-=2)};je[11]=Rd;je[166]=Rd;je[255]=Rd;var F=[];F[5]=Rd;
F[7]=function(){if(this.Fa)w.call(this,13,0,0,!0);else{var a=this.ua.Mb(this.I&this.ra,204);if(-1!==a){this.oa=this.ea(a);Bd(this);this.oa&-2147483648?Zb(this):we(this);var b=this.ea(a+168),c=(b&24576)>>13;Jd(this,this.ea(a+4),c);this.Lb=this.ea(a+112);this.Oc=this.Lb+this.ea(a+116);this.Ub=this.ea(a+100);this.Pc=this.Ub+this.ea(a+104);ud(this.lc,this.ea(a+56),this.ea(a+120),this.ea(a+124),this.ea(a+128));ud(this.ka,this.ea(a+52),this.ea(a+84),this.ea(a+88),this.ea(a+92));this.I=this.ea(a+12);this.J=
this.ea(a+16);this.L=this.ea(a+20);this.G=this.ea(a+28);this.K=this.ea(a+32);this.H=this.ea(a+36);this.F=this.ea(a+40);ud(this.rb,this.ea(a+60),this.ea(a+132),this.ea(a+136),this.ea(a+140));ud(this.ob,this.ea(a+64),this.ea(a+144),this.ea(a+148),this.ea(a+152));ud(this.Ca,this.ea(a+68),this.ea(a+156),this.ea(a+160),this.ea(a+164));ud(this.W,this.ea(a+72),b,this.ea(a+172),this.ea(a+176));ud(this.fa,this.ea(a+76),this.ea(a+180),this.ea(a+184),this.ea(a+188));ud(this.ua,this.ea(a+80),this.ea(a+192),this.ea(a+
196),this.ea(a+200));G(this,this.ea(a+8));A(this,this.ea(a+24))}this.A-=122<<(a&3?1:0)}};F[16]=fj;F[17]=gj;F[18]=hj;F[19]=ij;F[32]=function(){if(this.Fa)w.call(this,13,0);else{var a,b=this.la();switch((b&56)>>3){case 0:a=this.pa;break;case 2:a=this.pd;break;case 3:a=this.dd;break;default:ke.call(this);return}ye(this,b&7,a);this.A-=6}};F[33]=function(){if(this.Fa)w.call(this,13,0);else{var a=this.la(),b=(a&56)>>3;4==b||5==b?ke.call(this):(ye(this,a&7,this.zb[b]),this.A-=22)}};
F[34]=function(){if(this.Fa)w.call(this,13,0);else{var a=this.la(),b=xe(this,a&7);switch((a&56)>>3){case 0:this.pa=b;Bd(this);this.pa&-2147483648?Zb(this):we(this);this.A-=10;break;case 2:this.pd=b;this.A-=4;break;case 3:Ld.call(this,b);this.A-=5;break;default:ke.call(this)}}};F[35]=function(){if(this.Fa)w.call(this,13,0);else{var a=this.la(),b=(a&56)>>3;4==b||5==b?ke.call(this):(a=xe(this,a&7),a!=this.zb[b]&&(We(this,!1),this.zb[b]=a,We(this,!0)),this.A-=4>b?22:14)}};
196),this.ea(a+200));G(this,this.ea(a+8));A(this,this.ea(a+24))}this.A-=122<<(a&3?1:0)}};F[16]=fj;F[17]=gj;F[18]=hj;F[19]=ij;F[32]=function(){if(this.Fa)w.call(this,13,0);else{var a,b=this.la();switch((b&56)>>3){case 0:a=this.oa;break;case 2:a=this.pd;break;case 3:a=this.dd;break;default:ke.call(this);return}ye(this,b&7,a);this.A-=6}};F[33]=function(){if(this.Fa)w.call(this,13,0);else{var a=this.la(),b=(a&56)>>3;4==b||5==b?ke.call(this):(ye(this,a&7,this.zb[b]),this.A-=22)}};
F[34]=function(){if(this.Fa)w.call(this,13,0);else{var a=this.la(),b=xe(this,a&7);switch((a&56)>>3){case 0:this.oa=b;Bd(this);this.oa&-2147483648?Zb(this):we(this);this.A-=10;break;case 2:this.pd=b;this.A-=4;break;case 3:Ld.call(this,b);this.A-=5;break;default:ke.call(this)}}};F[35]=function(){if(this.Fa)w.call(this,13,0);else{var a=this.la(),b=(a&56)>>3;4==b||5==b?ke.call(this):(a=xe(this,a&7),a!=this.zb[b]&&(We(this,!1),this.zb[b]=a,We(this,!0)),this.A-=4>b?22:14)}};
F[36]=function(){if(this.Fa)w.call(this,13,0);else{var a=this.la(),b=(a&56)>>3;6>b?ke.call(this):(ye(this,a&7,this.tf[b]),this.A-=12)}};F[38]=function(){if(this.Fa)w.call(this,13,0);else{var a=this.la(),b=(a&56)>>3;6>b?ke.call(this):(this.tf[b]=xe(this,a&7),this.A-=12)}};F[128]=function(){var a=this.ya();kf(this)?(G(this,D(this)+a),this.A-=this.B.Ia):this.A-=this.B.Ja};F[129]=function(){var a=this.ya();kf(this)?this.A-=this.B.Ja:(G(this,D(this)+a),this.A-=this.B.Ia)};
F[130]=function(){var a=this.ya();ef(this)?(G(this,D(this)+a),this.A-=this.B.Ia):this.A-=this.B.Ja};F[131]=function(){var a=this.ya();ef(this)?this.A-=this.B.Ja:(G(this,D(this)+a),this.A-=this.B.Ia)};F[132]=function(){var a=this.ya();hf(this)?(G(this,D(this)+a),this.A-=this.B.Ia):this.A-=this.B.Ja};F[133]=function(){var a=this.ya();hf(this)?this.A-=this.B.Ja:(G(this,D(this)+a),this.A-=this.B.Ia)};F[134]=function(){var a=this.ya();ef(this)||hf(this)?(G(this,D(this)+a),this.A-=this.B.Ia):this.A-=this.B.Ja};
F[135]=function(){var a=this.ya();ef(this)||hf(this)?this.A-=this.B.Ja:(G(this,D(this)+a),this.A-=this.B.Ia)};F[136]=function(){var a=this.ya();jf(this)?(G(this,D(this)+a),this.A-=this.B.Ia):this.A-=this.B.Ja};F[137]=function(){var a=this.ya();jf(this)?this.A-=this.B.Ja:(G(this,D(this)+a),this.A-=this.B.Ia)};F[138]=function(){var a=this.ya();ff(this)?(G(this,D(this)+a),this.A-=this.B.Ia):this.A-=this.B.Ja};F[139]=function(){var a=this.ya();ff(this)?this.A-=this.B.Ja:(G(this,D(this)+a),this.A-=this.B.Ia)};
F[140]=function(){var a=this.ya();!jf(this)!=!kf(this)?(G(this,D(this)+a),this.A-=this.B.Ia):this.A-=this.B.Ja};F[141]=function(){var a=this.ya();!jf(this)==!kf(this)?(G(this,D(this)+a),this.A-=this.B.Ia):this.A-=this.B.Ja};F[142]=function(){var a=this.ya();hf(this)||!jf(this)!=!kf(this)?(G(this,D(this)+a),this.A-=this.B.Ia):this.A-=this.B.Ja};F[143]=function(){var a=this.ya();hf(this)||!jf(this)!=!kf(this)?this.A-=this.B.Ja:(G(this,D(this)+a),this.A-=this.B.Ia)};F[144]=function(){Ci.call(this,Lh)};
F[145]=function(){Ci.call(this,Lh)};F[146]=function(){Ci.call(this,Mh)};F[147]=function(){Ci.call(this,Nh)};F[148]=function(){Ci.call(this,Oh)};F[149]=function(){Ci.call(this,Ph)};F[150]=function(){Ci.call(this,Qh)};F[151]=function(){Ci.call(this,Rh)};F[152]=function(){Ci.call(this,Sh)};F[153]=function(){Ci.call(this,Th)};F[154]=function(){Ci.call(this,Uh)};F[155]=function(){Ci.call(this,Vh)};F[156]=function(){Ci.call(this,Wh)};F[157]=function(){Ci.call(this,Xh)};F[158]=function(){Ci.call(this,Yh)};
F[159]=function(){Ci.call(this,Zh)};F[160]=function(){Ed(this,this.ob.ha,this.T,2);this.A-=this.B.Pd};F[161]=function(){this.ma=this.za;var a=x(this);this.ob.load(a);this.A-=this.B.Zb;this.ma=-1};F[163]=function(){this.xa.call(this,gh);-1!==this.C&&(this.A-=6)};F[164]=function(){this.xa.call(this,2==this.T?$h:ei);this.A-=-1===this.C?3:7};F[165]=function(){this.xa.call(this,2==this.T?gi:hi);this.A-=-1===this.C?3:7};F[168]=function(){Ed(this,this.rb.ha,this.T,2);this.A-=this.B.Pd};
F[159]=function(){Ci.call(this,Zh)};F[160]=function(){Ed(this,this.ob.ha,this.T,2);this.A-=this.B.Pd};F[161]=function(){this.ma=this.za;var a=x(this);this.ob.load(a);this.A-=this.B.Zb;this.ma=-1};F[163]=function(){this.xa.call(this,gh);-1!==this.C&&(this.A-=6)};F[164]=function(){this.xa.call(this,2==this.T?$h:bi);this.A-=-1===this.C?3:7};F[165]=function(){this.xa.call(this,2==this.T?gi:hi);this.A-=-1===this.C?3:7};F[168]=function(){Ed(this,this.rb.ha,this.T,2);this.A-=this.B.Pd};
F[169]=function(){this.ma=this.za;var a=x(this);this.rb.load(a);this.A-=this.B.Zb;this.ma=-1};F[171]=function(){this.xa.call(this,jh);-1!==this.C&&(this.A-=5)};F[172]=function(){this.xa.call(this,2==this.T?ii:ki);this.A-=-1===this.C?3:7};F[173]=function(){this.xa.call(this,2==this.T?mi:ni);this.A-=-1===this.C?3:7};F[175]=function(){this.ia.call(this,2==this.T?ph:rh)};F[178]=function(){this.ia.call(this,Bh)};F[179]=function(){this.xa.call(this,ih);-1!==this.C&&(this.A-=5)};
F[180]=function(){this.ia.call(this,yh)};F[181]=function(){this.ia.call(this,zh)};
F[182]=function(){this.Wb.call(this,Dh);switch(this.aa>>3&7){case 0:this.F=this.F&~this.O|this.F&255;break;case 1:this.H=this.H&~this.O|this.H&255;break;case 2:this.K=this.K&~this.O|this.K&255;break;case 3:this.G=this.G&~this.O|this.G&255;break;case 4:this.kc=this.kc&~this.O|this.F>>8&255;this.F=this.ta;break;case 5:this.L=this.L&~this.O|this.H>>8&255;this.H=this.ta;break;case 6:this.J=this.J&~this.O|this.K>>8&255;this.K=this.ta;break;case 7:this.I=this.I&~this.O|this.G>>8&255,this.G=this.ta}this.A-=
@ -403,18 +403,18 @@ F[190]=function(){this.Wb.call(this,Dh);switch(this.aa>>3&7){case 0:this.F=this.
this.O;this.K=this.ta;break;case 7:this.I=this.I&~this.O|this.G<<16>>24&this.O,this.G=this.ta}this.A-=-1===this.C?3:6};F[191]=function(){Cd(this,2);this.ia.call(this,Eh);switch(this.aa>>3&7){case 0:this.F=this.F<<16>>16;break;case 1:this.H=this.H<<16>>16;break;case 2:this.K=this.K<<16>>16;break;case 3:this.G=this.G<<16>>16;break;case 4:this.kc=this.kc<<16>>16;break;case 5:this.L=this.L<<16>>16;break;case 6:this.J=this.J<<16>>16;break;case 7:this.I=this.I<<16>>16}this.A-=-1===this.C?3:6};
var Xe=[function(){this.A-=2+(-1===this.C?0:1);return this.lc.ha},function(){this.A-=2+(-1===this.C?0:1);return this.ka.ha},function(a){this.M|=2;this.lc.load(a);this.A-=17+(-1===this.C?0:2);return a},function(a){this.M|=2;-1!==this.ka.load(a)&&(this.Wa(this.ka.ac+4,this.ka.kb|=512),this.ka.type|=512);this.A-=17+(-1===this.C?0:2);return a},function(a){this.M|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.eb.load(a)&&2048!=(this.eb.kb&2560)&&(this.eb.hc>=this.Fa&&this.eb.hc>=(a&3)||7168==(this.eb.kb&
7168)))return vf(this),a;tf(this);return a},function(a){this.M|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.eb.load(a)&&512==(this.eb.kb&2560)&&this.eb.hc>=this.Fa&&this.eb.hc>=(a&3))return vf(this),a;tf(this);return a},R,R],Qd=[he,he,he,he,he,he,R,R],xj=[function(a){if(-1===this.C)w.call(this,6);else{a=this.Oc-this.Lb;var b=this.Lb;80286==this.ca?b|=-16777216:80386<=this.ca&&2!=this.T&&(a|=b<<16);this.Pa(this.C+2,b);this.A-=11}return a},function(a){if(-1===this.C)w.call(this,6);else{a=this.Pc-this.Ub;
var b=this.Ub;80286==this.ca?b|=-16777216:80386<=this.ca&&2!=this.T&&(a|=b<<16);this.Pa(this.C+2,b);this.A-=12}return a},function(a){-1===this.C||this.N&131072?w.call(this,6):(this.Lb=this.ea(this.C+2)&(this.O|this.O<<8),a&=65535,this.Oc=this.Lb+a,this.M|=2,this.A-=11);return a},function(a){-1===this.C||this.N&131072?w.call(this,6):(this.Ub=this.ea(this.C+2)&(this.O|this.O<<8),a&=65535,this.Pc=this.Ub+a,this.M|=2,this.A-=12);return a},function(){this.A-=2+(-1===this.C?0:1);return this.pa},R,function(a){this.N&
var b=this.Ub;80286==this.ca?b|=-16777216:80386<=this.ca&&2!=this.T&&(a|=b<<16);this.Pa(this.C+2,b);this.A-=12}return a},function(a){-1===this.C||this.N&131072?w.call(this,6):(this.Lb=this.ea(this.C+2)&(this.O|this.O<<8),a&=65535,this.Oc=this.Lb+a,this.M|=2,this.A-=11);return a},function(a){-1===this.C||this.N&131072?w.call(this,6):(this.Ub=this.ea(this.C+2)&(this.O|this.O<<8),a&=65535,this.Pc=this.Ub+a,this.M|=2,this.A-=12);return a},function(){this.A-=2+(-1===this.C?0:1);return this.oa},R,function(a){this.N&
131072?w.call(this,6):(wf(this,a),this.A-=-1===this.C?3:6,this.M|=2);return a},R],yj=[R,R,R,R,ch,fh,eh,dh];
function S(a){u.call(this,"ChipSet",a);var b=a.model;b&&!zj[b]&&q("Unrecognized ChipSet model: "+b);this.ca=zj[b]||Aj;this.B=[];b=Bj(a[Cj]);this.B[0]=[b,b];null==b&&(this.N=[360,360],(b=a.floppies)&&b.length&&(this.N=b),Dj(this,Ej,this.N.length),Dj(this,Fj,a.monitor||(this.ca<Nf?"mono":"ega")));b=Bj(a[Gj]);this.B[1]=[b,b];this.xa=this.ia=1;this.ca>=Nf&&(this.xa=this.ia=2);this.V=a.scaleTimers||!1;this.Ka=a.rtcDate;this.Fa=!1;a.sound&&(this.Ca=this.ka=null,window&&(this.Ca=window.AudioContext||window.webkitAudioContext),
this.Ca&&(this.ka=new this.Ca));this.reset(!0);tb(this)}ba(S,u);l=S.prototype;l.yb=function(a,b,c){switch(b){case Cj:return this.ja[b]=c,Hj(this,0,b),!0;case Gj:if((this.ca|0)==Ij||this.ca==Jj)return this.ja[b]=c,Hj(this,1,b),!0;break;case Kj:return this.ja[b]=c,!0}return!1};
l.ic=function(a,b,c,d){this.na=b;this.S=c;this.Ea=d;this.oa=a;this.od=Cb(a,"FPU");Dj(this,Lj,this.od?1:0,!0);this.C=Cb(a,"Keyboard");this.Aa=c.R.Yc/Mj;rc(b,this,Nj);tc(b,this,Oj);this.ca<Nf?this.ca!=Jj?(rc(b,this,Pj),tc(b,this,Qj)):(rc(b,this,Rj),tc(b,this,Sj)):(rc(b,this,Tj),tc(b,this,Uj),(this.ca|0)==Vj&&(rc(b,this,Wj),tc(b,this,Xj)))};l.Pb=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.Ob=function(a){return a?this.save():!0};
l.reset=function(a){var b;Yj(this);this.D=Array(this.xa);for(b=0;b<this.xa;b++)Zj(this,b);this.$b=Array(this.ia);ak(this,bk,ck);1<this.ia&&ak(this,dk,ek);this.da=this.ta=null;this.H=Array((this.ca|0)==Vj?6:3);for(b=0;b<this.H.length;b++)fk(this,b);this.fa=this.Ba=this.J=this.ua=null;this.ba=Rf;this.ca==Jj&&(this.aa=0);if(this.ca>=Nf){this.F=gk;this.L=0;this.K=hk;this.pa=0;this.M=ik|jk;512<=kk(this)&&(this.M|=lk);+mk(this,Fj,void 0)==nk&&(this.M|=ok);(this.ca|0)==Vj&&(this.M=this.M|pk|qk);this.qa=
l.ic=function(a,b,c,d){this.na=b;this.S=c;this.Ea=d;this.pa=a;this.od=Cb(a,"FPU");Dj(this,Lj,this.od?1:0,!0);this.C=Cb(a,"Keyboard");this.Aa=c.R.Yc/Mj;rc(b,this,Nj);tc(b,this,Oj);this.ca<Nf?this.ca!=Jj?(rc(b,this,Pj),tc(b,this,Qj)):(rc(b,this,Rj),tc(b,this,Sj)):(rc(b,this,Tj),tc(b,this,Uj),(this.ca|0)==Vj&&(rc(b,this,Wj),tc(b,this,Xj)))};l.Pb=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.Ob=function(a){return a?this.save():!0};
l.reset=function(a){var b;Yj(this);this.D=Array(this.xa);for(b=0;b<this.xa;b++)Zj(this,b);this.$b=Array(this.ia);ak(this,bk,ck);1<this.ia&&ak(this,dk,ek);this.da=this.ta=null;this.H=Array((this.ca|0)==Vj?6:3);for(b=0;b<this.H.length;b++)fk(this,b);this.fa=this.Ba=this.J=this.ua=null;this.ba=Rf;this.ca==Jj&&(this.aa=0);if(this.ca>=Nf){this.F=gk;this.L=0;this.K=hk;this.oa=0;this.M=ik|jk;512<=kk(this)&&(this.M|=lk);+mk(this,Fj,void 0)==nk&&(this.M|=ok);(this.ca|0)==Vj&&(this.M=this.M|pk|qk);this.qa=
rk|sk;this.G=Array(8);this.W=0;a&&(this.A=Array(tk));uk(this,this.Ka);for(a=vk;a<=wk;a++)this.A[a]=0;for(a=xk;a<yk;a++)void 0===this.A[a]&&(this.A[a]=0);a=0|+mk(this,Fj,void 0)<<zk.dg&zk.gc;a|=+mk(this,Lj,void 0)?Ak:0;b=+mk(this,Ej,void 0);a|=b?b-1<<Bk.dg&Bk.gc|Bk.ik:0;this.A[Ck]=a;this.A[Dk]=Ek(this,0)<<4|Ek(this,1);Fk(this)}};
function uk(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.vb("CMOS date invalid ("+b+"), using "+c)):b&&a.vb("CMOS date: "+c);a.A[Gk]=c.getSeconds();a.A[Hk]=0;a.A[Ik]=c.getMinutes();a.A[Jk]=0;a.A[Kk]=c.getHours();a.A[Lk]=0;a.A[Mk]=c.getDay()+1;a.A[Nk]=c.getDate();a.A[Ok]=c.getMonth()+1;b=c.getFullYear();a.A[Pk]=b%100;b/=100;a.A[Qk]=b%10|b/10<<4;a.A[Rk]=38;a.A[ld]=Sk;a.A[Tk]=0;a.A[Uk]=Vk;a.ma=a.X=0;a.Ha=a.za=null}
function Wk(a){var b;void 0===b&&(b=a.za);a.X=fd(a.S,a.V)+b;a.A[ld]&md&&$c(a.S,b)}function Fk(a){for(var b=0,c=Dk;c<yk;c++)b+=a.A[c];a.A[Xk]=b&255;a.A[yk]=b>>8}
l.save=function(){var a=new Ye(this);a.set(0,[this.B]);for(var b=[],c=0;c<this.D;c++){for(var d=this.D[c],e=d,f=[],g=0;g<e.Rb.length;g++){var h=e.Rb[g];f[g]=[h.Md,h.vf,h.bc,h.fb,h.gb,h.mode,h.xf,h.wn,h.xn]}b[c]=[d.Cb,d.jg,d.di,d.Gb,f,d.lg]}a.set(1,[b]);b=[];for(c=0;c<this.$b.length;c++)d=this.$b[c],b[c]=[d.Re,d.Kc,d.kd,d.Vc,d.Sb,d.xc,d.Hd,d.Ie];a.set(2,[b]);b=[];for(c=0;c<this.H.length;c++)d=this.H[c],b[c]=[d.bc,d.zc,d.gb,d.Id,d.mg,d.mode,d.hf,d.Xc,d.hd,d.Lc,d.le,d.Kd,d.jd,d.Cb,d.qe];a.set(3,[this.ta,
b,this.da]);a.set(4,[this.ua,this.J,this.Ba,this.fa,this.ba]);this.ca>=Nf&&(a.set(5,[this.F,this.L,this.K,this.pa,this.M,this.qa]),a.set(6,[this.G[7],this.G,this.W,this.A,this.ma,this.X]));return a.data()};
l.restore=function(a){var b,c;b=a[0];Array.isArray(b[0])?this.B=b[0]:(this.B[0][0]=b[0],this.B[1][0]=b[1]&15,this.B[0][1]=b[2],this.B[1][1]=b[3]&15);Yj(this);b=a[1];for(c=0;c<this.xa;c++)Zj(this,c,1==b.length?b[0][c]:b);b=a[2];for(c=0;c<this.ia;c++)ak(this,c,c?ek:ck,b[0][c]);b=a[3];this.ta=b[0];this.da=b[2];for(c=0;c<this.H.length;c++)fk(this,c,b[1][c]);b=a[4];this.ua=b[0];this.J=b[1];this.Ba=b[2];this.fa=b[3];this.ba=b[4];if(b=a[5])this.F=b[0],this.L=b[1],this.K=b[2],this.pa=b[3],this.M=b[4],this.qa=
b,this.da]);a.set(4,[this.ua,this.J,this.Ba,this.fa,this.ba]);this.ca>=Nf&&(a.set(5,[this.F,this.L,this.K,this.oa,this.M,this.qa]),a.set(6,[this.G[7],this.G,this.W,this.A,this.ma,this.X]));return a.data()};
l.restore=function(a){var b,c;b=a[0];Array.isArray(b[0])?this.B=b[0]:(this.B[0][0]=b[0],this.B[1][0]=b[1]&15,this.B[0][1]=b[2],this.B[1][1]=b[3]&15);Yj(this);b=a[1];for(c=0;c<this.xa;c++)Zj(this,c,1==b.length?b[0][c]:b);b=a[2];for(c=0;c<this.ia;c++)ak(this,c,c?ek:ck,b[0][c]);b=a[3];this.ta=b[0];this.da=b[2];for(c=0;c<this.H.length;c++)fk(this,c,b[1][c]);b=a[4];this.ua=b[0];this.J=b[1];this.Ba=b[2];this.fa=b[3];this.ba=b[4];if(b=a[5])this.F=b[0],this.L=b[1],this.K=b[2],this.oa=b[3],this.M=b[4],this.qa=
b[5];if(b=a[6])this.G=b[1],this.G[7]=b[0],this.W=b[2],this.A=b[3],this.ma=b[4],this.X=b[5],uk(this);return!0};l.start=function(){Yk(this)};l.stop=function(){Yk(this)};function Zj(a,b,c){var d=a.D[b];d||(d={Rb:Array(4)});c=c&&5<=c.length?c:Zk;d.Cb=c[0];d.jg=c[1];d.di=c[2];d.Gb=c[3];d.Xl=b<<2;for(var e=0;e<d.Rb.length;e++)$k(d,e,c[4][e]);d.lg=c[5]||0;a.D[b]=d}
function $k(a,b,c){var d=a.Rb[b];d||(d={vf:[0,0],bc:[0,0],fb:[0,0],gb:[0,0]});c=c&&8==c.length?c:al;d.Md=c[0];d.vf[0]=c[1][0];d.vf[1]=c[1][1];d.bc[0]=c[2][0];d.bc[1]=c[2][1];d.fb[0]=c[3][0];d.fb[1]=c[3][1];d.gb[0]=c[4][0];d.gb[1]=c[4][1];d.mode=c[5];d.xf=c[6];d.controller=a;d.yi=b;bl(d,c[8],c[9]);a.Rb[b]=d}function bl(a,b,c,d){"string"==typeof b&&(b=kb(b));b&&(a.done=null,a.wn=b.id,a.xn=c,a.Ef=b,a.qg=b[c],a.Tf=d)}
function ak(a,b,c,d){var e=a.$b[b];e||(e={Kc:[null,null,null,null]});d=d&&8==d.length?d:cl;e.port=c;e.No=b<<3;e.Re=d[0];e.Kc[0]=d[1][0];e.Kc[1]=d[1][1];e.Kc[2]=d[1][2];e.Kc[3]=d[1][3];e.kd=d[2];e.Vc=d[3];e.Sb=d[4];e.xc=d[5];e.Hd=d[6];e.Ie=d[7];a.$b[b]=e}
@ -436,12 +436,12 @@ function pm(a,b,c){var d=0,e=c&qm;b?(d=3,a.da=c):a.ta=c;if(e==rm){if(!(c&sm))for
e.zc[0]=e.bc[0],e.zc[1]=e.bc[1],e.jd=fd(a.S,a.V))}}}function nm(a,b){a=a.H[b];(b=a.bc[1]<<8|a.bc[0])||(b=1==a.hd?256:65536);return b}function jd(a,b){a=a.H[b];(b=a.zc[1]<<8|a.zc[0])||(b=1==a.hd?256:65536);return b}function xm(a,b){gm(a,b);var c=a.H[b];c.Id[0]=c.gb[0];c.Id[1]=c.gb[1];c.le=!0;fm(a,b)}function fm(a,b){a=a.H[b];a.Xc=a.hf==Hm?1:0;a.hd=a.hf==Im?2:1}
function gm(a,b,c){var d=a.H[b];if(d.Kd&&(b!=om||a.J&Dm)){var e=fd(a.S,a.V),f=(e-d.jd)/a.Aa|0;0>f&&(d.jd=e,f=0);var g=nm(a,b),h=jd(a,b)-f;d.mode==im?(0>=h&&(h=0),h||(d.Lc=!0,d.Kd=!1,b||Qf(a,mm))):d.mode==Jm?(d.Lc=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.zc[0]=h&255,d.zc[1]=h>>8&255,d.jd=e,!b&&d.Lc&&Qf(a,mm))):d.mode==kd&&(h-=f,0>=h&&(d.Lc=!d.Lc,h=g+h,0>=h&&(h=g),d.zc[0]=h&255,d.zc[1]=h>>8&255,d.jd=e,!b&&d.Lc&&Qf(a,mm)));d.gb[0]=h&255;d.gb[1]=h>>8&255;c&&(a.jd=0)}return d}
function id(a,b){for(var c=0;c<a.H.length;c++)gm(a,c,b);if(a.ca>=Nf){b=a.S.R.Yc;c=fd(a.S,a.V);null==a.za&&(a.ma=fd(a.S,a.V),a.Ha=1024,a.za=Math.floor(a.S.R.Yc/a.Ha),Wk(a));c>=a.X&&(a.A[Tk]|=Km,a.A[ld]&md&&(a.A[Tk]|=Lm,Qf(a,Mm)),a.X=c+a.za);a.A[Gk]==a.A[Hk]&&a.A[Ik]==a.A[Jk]&&a.A[Kk]==a.A[Lk]&&(a.A[Tk]|=Nm,a.A[ld]&Om&&(a.A[Tk]|=Lm,Qf(a,Mm)));var d=c-a.ma,e=Math.floor(d/b);if(e&&!(a.A[ld]&Pm)){for(;e--;)if(60<=++a.A[Gk]&&(a.A[Gk]=0,60<=++a.A[Ik]&&(a.A[Ik]=0,24<=++a.A[Kk]))){a.A[Kk]=0;a.A[Mk]=a.A[Mk]%
7+1;var f;f=a.A[Pk];var g=Ca[a.A[Ok]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[Nk]>f&&(a.A[Nk]=1,12<++a.A[Ok]&&(a.A[Ok]=1,a.A[Pk]=(a.A[Pk]+1)%100))}a.A[Tk]|=Qm;a.A[ld]&Rm&&(a.A[Tk]|=Lm,Qf(a,Mm))}a.ma=c-d%b}}l.vl=function(){var a=this.ua;this.fa&Sm&&(this.J&Tm?a=this.B[0][1]:this.C&&(a=Um(this.C)));return a};l.Rm=function(a,b){this.ua=b};l.wl=function(){return this.J};l.Sm=function(a,b){Zm(this,b)};
function Zm(a,b){var c=!!(b&$m),d=!!(a.J&$m);a.J=b;a.C&&an(a.C,!(b&Tm),!!(b&Gm));c!=d&&Yk(a,c)}l.xl=function(){var a=0,a=(this.ca|0)==Ij?this.J&Em?a|this.B[1][1]&bn:a|this.B[1][1]>>4&1:this.J&cn?a|this.B[0][1]>>4:a|this.B[0][1]&15;this.J&Dm&&gm(this,om).Lc&&(a=this.J&$m?a|dn:a|en);return a};l.Tm=function(a,b){this.Ba=b};l.yl=function(){return this.fa};l.Um=function(a,b){this.fa=b};l.Hk=function(){var a=this.C?Um(this.C):0;this.aa&=~fn;return a};l.cm=function(){};l.Gk=function(){return this.J};
l.bm=function(a,b){Zm(this,b)};l.Ik=function(){return this.aa};l.Jk=function(){var a=this.pa;this.F&=~(fn|gn);this.C&&hn(this.C);return a};l.em=function(a,b){if(this.F&jn)switch(this.L){case kn:ln(this,b);break;case mn:nn(this,b);break;default:if(ln(this,this.K&~hk),this.C){a=this.C;var c=b,d=-1;switch(a.G||c){case on:d=pn;a.Kb=[];qn(a,rn);break;case sn:a.G&&(c=0);qn(a,pn);a.G=c;break;case tn:a.G&&(c=0),qn(a,pn),a.G=c}un(this,d)}}this.L=b;this.F&=~jn};
l.Kk=function(){return this.J&~(vn|wn)|(fd(this.S)&64?wn:0)};l.fm=function(a,b){Zm(this,b)};l.Lk=function(){var a=this.F&255;this.F&gn&&(this.F|=fn,this.F&=~gn);return a};
7+1;var f;f=a.A[Pk];var g=Ca[a.A[Ok]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[Nk]>f&&(a.A[Nk]=1,12<++a.A[Ok]&&(a.A[Ok]=1,a.A[Pk]=(a.A[Pk]+1)%100))}a.A[Tk]|=Qm;a.A[ld]&Rm&&(a.A[Tk]|=Lm,Qf(a,Mm))}a.ma=c-d%b}}l.vl=function(){var a=this.ua;this.fa&Sm&&(this.J&Tm?a=this.B[0][1]:this.C&&(a=Um(this.C)));return a};l.Rm=function(a,b){this.ua=b};l.wl=function(){return this.J};l.Sm=function(a,b){Vm(this,b)};
function Vm(a,b){var c=!!(b&$m),d=!!(a.J&$m);a.J=b;a.C&&an(a.C,!(b&Tm),!!(b&Gm));c!=d&&Yk(a,c)}l.xl=function(){var a=0,a=(this.ca|0)==Ij?this.J&Em?a|this.B[1][1]&bn:a|this.B[1][1]>>4&1:this.J&cn?a|this.B[0][1]>>4:a|this.B[0][1]&15;this.J&Dm&&gm(this,om).Lc&&(a=this.J&$m?a|dn:a|en);return a};l.Tm=function(a,b){this.Ba=b};l.yl=function(){return this.fa};l.Um=function(a,b){this.fa=b};l.Hk=function(){var a=this.C?Um(this.C):0;this.aa&=~fn;return a};l.cm=function(){};l.Gk=function(){return this.J};
l.bm=function(a,b){Vm(this,b)};l.Ik=function(){return this.aa};l.Jk=function(){var a=this.oa;this.F&=~(fn|gn);this.C&&hn(this.C);return a};l.em=function(a,b){if(this.F&jn)switch(this.L){case kn:ln(this,b);break;case mn:nn(this,b);break;default:if(ln(this,this.K&~hk),this.C){a=this.C;var c=b,d=-1;switch(a.G||c){case on:d=pn;a.Kb=[];qn(a,rn);break;case sn:a.G&&(c=0);qn(a,pn);a.G=c;break;case tn:a.G&&(c=0),qn(a,pn),a.G=c}un(this,d)}}this.L=b;this.F&=~jn};
l.Kk=function(){return this.J&~(vn|wn)|(fd(this.S)&64?wn:0)};l.fm=function(a,b){Vm(this,b)};l.Lk=function(){var a=this.F&255;this.F&gn&&(this.F|=fn,this.F&=~gn);return a};
l.dm=function(a,b){this.L=b;this.F|=jn;a=0;this.L>=xn&&(a=this.L^15,this.L=xn);switch(this.L){case yn:un(this,this.K);break;case zn:ln(this,this.K|hk);break;case An:ln(this,this.K&~hk);this.C&&hn(this.C);break;case Bn:this.C&&(this.C.Kb=[]);ln(this,this.K|hk);un(this,Cn);nn(this,rk|sk);break;case Dn:un(this,En);break;case Fn:un(this,this.M);break;case Gn:un(this,this.qa);break;case Hn:un(this,this.K&hk?0:In);break;case xn:a&1&&te(this.S)}};
function ln(a,b){a.K=b;a.F=a.F&~Jn|b&Kn;a.C&&an(a.C,!!(b&Ln),!(b&hk))}function un(a,b,c){0<=b&&(a.pa=b,c?a.F|=fn:(a.F&=~fn,a.F|=gn))}function nn(a,b){a.qa=b;Vb(a.na,!!(b&sk));b&rk||te(a.S)}function Mn(a,b){a.ca<Nf?(Qf(a,Nn,4),a.aa|=fn):a.K&hk||a.F&(fn|gn)||(un(a,b,!0),On(a.C),Qf(a,Nn,120))}l.Zk=function(){return this.W};l.tm=function(a,b){this.W=b;this.ba=b&Pn?Rf:Qn};
function ln(a,b){a.K=b;a.F=a.F&~Jn|b&Kn;a.C&&an(a.C,!!(b&Ln),!(b&hk))}function un(a,b,c){0<=b&&(a.oa=b,c?a.F|=fn:(a.F&=~fn,a.F|=gn))}function nn(a,b){a.qa=b;Vb(a.na,!!(b&sk));b&rk||te(a.S)}function Mn(a,b){a.ca<Nf?(Qf(a,Nn,4),a.aa|=fn):a.K&hk||a.F&(fn|gn)||(un(a,b,!0),On(a.C),Qf(a,Nn,120))}l.Zk=function(){return this.W};l.tm=function(a,b){this.W=b;this.ba=b&Pn?Rf:Qn};
l.$k=function(a,b){a=this.W&Rn;var c;if(a<=Uk)if(c=this.A[a],a<Rk){var d=!1;a!=Kk&&a!=Lk||this.A[ld]&Sk||(12>c?c=c?c:12:c=(c-=12)?c+128:140,d=!0);this.A[ld]&Sn||(d&&128<c&&(c-=48),c=c%10|c/10<<4)}else a==Rk&&(this.A[a]^=Tn);else c=this.A[a];null!=b&&a==Tk&&(this.A[a]&=Un,c&Lm&&Of(this,Mm),c&Km&&this.A[ld]&md&&Wk(this));return c};
l.um=function(a,b){a=this.W&Rn;var c=b^this.A[a],d;if(a<=Uk){if(d=b,a<Rk){var e=!1;this.A[ld]&Sn||(d=10*(d>>4)+(d&15),e=!0);if(a==Kk||a==Lk)e&&23<d&&(d+=48),this.A[ld]&Sk||(12>=d?d=12==d?0:d:(d-=116,d=24==d?12:d))}}else d=b;this.A[a]=d;a==ld&&c&md&&b&md&&Wk(this)};l.Lj=function(a,b){this.ba=b};l.Em=function(){};l.Fm=function(){this.od&&Jf(this.od)};
function Yk(a,b){if(a.ka)try{void 0!==b?a.Fa=b:b=!!(a.Fa&&a.S&&a.S.Y.nb);var c=Math.round(Mj/nm(a,om));if(20>c||2E4<c)b=!1;b?a.I?a.I.frequency.value=c:(a.I=a.ka.createOscillator(),a.I&&(a.I.type="number"==typeof a.I.type?1:"square",a.I.connect(a.ka.destination),a.I.frequency.value=c,"start"in a.I?a.I.start(0):a.I.noteOn(0))):a.I&&("stop"in a.I?a.I.stop(0):a.I.noteOff(0),a.I.disconnect(),delete a.I)}catch(d){a.wa("AudioContext exception: "+d.message),a.ka=null}}
@ -460,7 +460,7 @@ b},132:function(a,b){this.G[0]=b},133:function(a,b){this.G[1]=b},134:function(a,
b){rl(this,1,1,b)},198:function(a,b){tl(this,1,1,b)},200:function(a,b){rl(this,1,2,b)},202:function(a,b){tl(this,1,2,b)},204:function(a,b){rl(this,1,3,b)},206:function(a,b){tl(this,1,3,b)},208:function(a,b){this.D[1].jg=b},210:function(a,b){xl(this,1,b)},212:function(a,b){yl(this,1,b)},214:function(a,b){this.D[1].Rb[b&3].mode=b},216:function(){this.D[1].Gb=0},218:function(){Cl(this,1)},240:S.prototype.Em,241:S.prototype.Fm},Sj={96:S.prototype.cm,97:S.prototype.bm,160:S.prototype.Lj},Xj={72:function(a,
b){hm(this,1,0,b)},73:function(a,b){hm(this,1,1,b)},74:function(a,b){hm(this,1,2,b)},75:function(a,b){pm(this,1,b)}};Ra(function(){for(var a=hb(document,"pcx86","chipset"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new S(d);gb(d,c);ol(d)}});
function Vn(a){u.call(this,"ROM",a);this.A=null;this.G=a.addr;this.C=a.size;this.F=a.alias;this.B=a.notify;this.I=null;if(this.B){var b=this.B.indexOf("[");if(0<b){try{this.I=eval(this.B.substr(b))}catch(c){}this.B=this.B.substr(0,b)}}if(this.D=this.J=a.file)a=pa(oa(this.D)),"json"!=a&&"hex"!=a&&(this.D=Fa()+"/api/v1/dump?file="+this.J+"&format=bytes&decimal=true")}ba(Vn,u);
Vn.prototype.ic=function(a,b,c,d){this.oa=a;this.na=b;this.S=c;this.Ea=d;if(this.D){var e=this,f="Loading "+this.D+"...";Ea(this.D,null,!0,function(a,b,c){Wn(e,a,b,c)},function(){e.vb(f,qb.ae)})}};Vn.prototype.Pb=function(){this.H&&(this.Ea&&this.Ea.A(this.id,0,this.G>>>4,0,this.G,this.C,this.H),delete this.H);return!0};Vn.prototype.Ob=function(){return!0};
Vn.prototype.ic=function(a,b,c,d){this.pa=a;this.na=b;this.S=c;this.Ea=d;if(this.D){var e=this,f="Loading "+this.D+"...";Ea(this.D,null,!0,function(a,b,c){Wn(e,a,b,c)},function(){e.vb(f,qb.ae)})}};Vn.prototype.Pb=function(){this.H&&(this.Ea&&this.Ea.A(this.id,0,this.G>>>4,0,this.G,this.C,this.H),delete this.H);return!0};Vn.prototype.Ob=function(){return!0};
function Wn(a,b,c,d){if(d)a.wa("Unable to load system ROM (error "+d+": "+b+")",0>d);else{$a(a.Yd,b,c);if("["==c.charAt(0)||"{"==c.charAt(0))try{var e=eval("("+c+")"),f=e.bytes,g=e.longs||e.data;if(f)a.A=f;else if(g)for(a.A=Array(4*g.length),d=c=0;c<g.length;c++)a.A[d++]=g[c]&255,a.A[d++]=g[c]>>8&255,a.A[d++]=g[c]>>16&255,a.A[d++]=g[c]>>24&255;else a.A=e;a.H=e.symbols;if(!a.A.length){q("Empty ROM: "+b);return}if(1==a.A.length){q(a.A[0]);return}}catch(h){a.wa("ROM data error: "+h.message);return}else for(b=
c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.A=Array(b.length),e=0;e<b.length;e++)a.A[e]=ma(b[e],16);Xn(a)}}
function Xn(a){if(!sb(a))if(!a.J)tb(a);else if(a.A&&a.na){a.C||(a.C=a.A.length);if(a.A.length!=a.C)rb(a,"ROM size ("+na(a.A.length,8,!0)+") does not match specified size ("+na(a.C,8,!0)+")");else{var b;b=a.G;if(Wb(a.na,b,a.C,ic)){for(var c=0;c<a.A.length;c++){var d=a.na,e=b+c;d.X[(e&d.D)>>>d.B].jf(e&d.C,a.A[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.F?b.push(a.F):null!=a.F&&a.F.length&&(b=a.F);for(c=0;c<b.length;c++){var d=a,e=b[c],f=cc(d.na,d.G,d.C);bc(d.na,e,d.C,f)}a.B&&((b=kb(a.B,a.id))?
@ -470,10 +470,10 @@ l.reset=function(){if(!this.B&&!this.D&&this.V){var a=1024*kk(this.V);this.A&&a!
l.save=function(){var a=new Ye(this);this.controller&&a.set(0,this.controller.save());return a.data()};l.restore=function(a){return this.controller?this.controller.restore(a[0]):!0};function bo(a){this.F=a;this.C=eo;this.D=fo;this.B=go;this.A=null}l=bo.prototype;l.save=function(){return[this.C,this.B]};l.restore=function(a){this.oc(0,a[0]&255);this.oc(2,a[1]&255);return!0};l.Eb=function(a){var b=255;2>a?b=a&1?this.D>>8:this.D&255:4>a&&(b=a&1?this.B>>8:this.B&255);return b};
l.oc=function(a,b){if(a)2==a&&(this.B=this.B&-256|b);else if(b!=(this.C&255)){a=this.F.na;if(b&ho)this.A&&(bc(a,io,jo,this.A),this.A=null);else{this.A||(this.A=cc(a,io,jo));var c=cc(a,ko,jo);bc(a,io,jo,c,b&lo?1:ic)}this.C=this.C&-256|b}};l.wi=function(){return mo};l.rg=function(){return no};var co=-2134900736,ko=16646144,io=917504,jo=131072,ho=1,lo=2,eo=65535,fo=2575,go=2,mo=[null,0],no=[function(a){return this.controller.Eb(a)},null,null,function(a,b){this.controller.oc(a,b)},null,null];
Ra(function(){for(var a=hb(document,"pcx86","ram"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new ao(d);gb(d,c)}});function oo(a){u.call(this,"Keyboard",a);po(this,a.model);this.W=Ma("Mobi");this.N=Ma("MSIE");this.L=0;this.M=this.pg=!1;this.A=[];this.aa=50;this.D=null;this.F=a.autoType;tb(this)}ba(oo,u);l=oo.prototype;
l.yb=function(a,b,c,d){var e=this,f=a+"-"+b;if(void 0===this.ja[f])switch(b){case "kbd":case "screen":return c.onkeydown=function(a){return qo(e,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;e.B="";var b=!U[a]||!!(e.Tb&ro);b||so(e,a,!0);return b},c.onkeyup=function(a){return qo(e,a,!1)},!0;case "caps-lock":return this.ja[f]=c,c.onclick=function(){e.oa&&gd(e.oa);so(e,to,!0)},!0;case "num-lock":return this.ja[f]=c,c.onclick=function(){e.oa&&gd(e.oa);so(e,uo,!0)},!0;case "scroll-lock":return this.ja[f]=
c,c.onclick=function(){e.oa&&gd(e.oa);so(e,vo,!0)},!0;default:var g=b.toUpperCase().replace(/-/g,"_");if(void 0!==wo[g]&&"button"==a)return this.ja[f]=c,c.onclick=function(a,b,c){return function(){a.oa&&gd(a.oa,!0);a.B="";xo(a,c,!0);so(a,c,!0)}}(this,g,wo[g]),!0;if(void 0!==yo[b])return this.L++,this.ja[f]=c,a=function(a,b,c){return function(){a.B="";so(a,c)}}(this,b,yo[b]),b=function(a,b,c){return function(){zo(a,c)}}(this,b,yo[b]),"ontouchstart"in window?(c.ontouchstart=a,c.ontouchend=b):(c.onmousedown=
a,c.onmouseup=c.onmouseout=b),!0;if(d)return this.ja[f]=c,c.onclick=function(){e.oa&&gd(e.oa);d&&!e.B&&(e.B=d,Ao(e,150))},!0}return!1};function Bo(a,b,c){if(a.L){for(var d in p)if(b==p[d]){b=+d;(d=la[d])&&(b=d);break}for(var e in yo)if((d=yo[e]==b)||(d=b,d>=n.Fd&&d<=n.z&&(d-=n.Fd-n.Ed),d=yo[e]==d),d){(a=a.ja["key-"+e])&&void 0!==c&&(a.style.color=c?"#ffffff":"#000000",a.style.backgroundColor=c?"#000000":"#ffffff");break}}}
l.ic=function(a,b,c,d){this.oa=a;this.na=b;this.S=c;this.Ea=d;this.V=Cb(a,"ChipSet");this.F=Tc(a,"autoType")||this.F;Ue(c,33,this.Nl.bind(this))};l.Nl=function(){if(10==(this.S.F>>8&255)&&!this.D&&this.F){var a=this.D=Co(this.F);a&&!this.B&&(this.B=a,Ao(this,150))}return!0};
l.yb=function(a,b,c,d){var e=this,f=a+"-"+b;if(void 0===this.ja[f])switch(b){case "kbd":case "screen":return c.onkeydown=function(a){return qo(e,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;e.B="";var b=!U[a]||!!(e.Tb&ro);b||so(e,a,!0);return b},c.onkeyup=function(a){return qo(e,a,!1)},!0;case "caps-lock":return this.ja[f]=c,c.onclick=function(){e.pa&&gd(e.pa);so(e,to,!0)},!0;case "num-lock":return this.ja[f]=c,c.onclick=function(){e.pa&&gd(e.pa);so(e,uo,!0)},!0;case "scroll-lock":return this.ja[f]=
c,c.onclick=function(){e.pa&&gd(e.pa);so(e,vo,!0)},!0;default:var g=b.toUpperCase().replace(/-/g,"_");if(void 0!==wo[g]&&"button"==a)return this.ja[f]=c,c.onclick=function(a,b,c){return function(){a.pa&&gd(a.pa,!0);a.B="";xo(a,c,!0);so(a,c,!0)}}(this,g,wo[g]),!0;if(void 0!==yo[b])return this.L++,this.ja[f]=c,a=function(a,b,c){return function(){a.B="";so(a,c)}}(this,b,yo[b]),b=function(a,b,c){return function(){zo(a,c)}}(this,b,yo[b]),"ontouchstart"in window?(c.ontouchstart=a,c.ontouchend=b):(c.onmousedown=
a,c.onmouseup=c.onmouseout=b),!0;if(d)return this.ja[f]=c,c.onclick=function(){e.pa&&gd(e.pa);d&&!e.B&&(e.B=d,Ao(e,150))},!0}return!1};function Bo(a,b,c){if(a.L){for(var d in p)if(b==p[d]){b=+d;(d=la[d])&&(b=d);break}for(var e in yo)if((d=yo[e]==b)||(d=b,d>=n.Fd&&d<=n.z&&(d-=n.Fd-n.Ed),d=yo[e]==d),d){(a=a.ja["key-"+e])&&void 0!==c&&(a.style.color=c?"#ffffff":"#000000",a.style.backgroundColor=c?"#000000":"#ffffff");break}}}
l.ic=function(a,b,c,d){this.pa=a;this.na=b;this.S=c;this.Ea=d;this.V=Cb(a,"ChipSet");this.F=Tc(a,"autoType")||this.F;Ue(c,33,this.Nl.bind(this))};l.Nl=function(){if(10==(this.S.F>>8&255)&&!this.D&&this.F){var a=this.D=Co(this.F);a&&!this.B&&(this.B=a,Ao(this,150))}return!0};
function Co(a){if(a){for(var b,c=/(?:^|[^$])\$([a-z]+)/g;b=c.exec(a);){var d;switch(b[1]){case "date":d=wa("n-j-Y");break;case "time":d=wa("h:i:s");break;default:continue}a=a.replace("$"+b[1],d)}a=a.replace(/\$\$/g,"$$")}return a}function po(a,b){var c=0;a.ca=null;"string"==typeof b&&(a.ca=b.toUpperCase(),c=Do.indexOf(a.ca),0>c&&(c=0));if(b=Do[c])a.X=parseInt(b.substr(2),10)}function an(a,b,c){a.J!==c&&(a.J=a.K=c)&&(a.H=!0);a.I!==b&&(a.I=b)&&!a.K&&On(a,!0);a.I&&a.K&&(a.Kb=[],qn(a,rn),a.K=!1)}
function qn(a,b){a.V&&(a.Kb.unshift(b),a.H=!0,Mn(a.V,b))}function hn(a){var b;a.Kb.length&&a.H&&(b=a.Kb[0],a.V&&Mn(a.V,b))}function Um(a){var b=0;a.Kb.length&&(b=a.Kb[0]);return b}function On(a,b){0<a.Kb.length&&(a.Kb.shift(),(a.H=b)&&a.Kb.length&&a.V&&Mn(a.V,a.Kb[0]))}l.Pb=function(a,b){return!b&&(this.reset(),a&&this.restore&&!this.restore(a))?!1:!0};l.Ob=function(a){return a?this.save():!0};
l.reset=function(){if(!this.ca&&this.V)switch(this.V.ca){case Ij:case 5160:po(this,Do[0]);break;default:po(this,Do[1])}Eo(this)};l.save=function(){var a=new Ye(this),b=[];b[0]=this.J;b[1]=this.I;a.set(0,b);return a.data()};l.restore=function(a){return Eo(this,a[0])};function Eo(a,b){var c=0;b?a.D=Co(a.F):(b=[],a.D=null);a.J=b[c++];a.I=b[c];a.G=0;a.Tb=a.C=0;a.Kb=[];a.H=!0;a.B="";return!0}
@ -522,28 +522,28 @@ l.yb=function(a,b,c){var d=this;if(!this.ja[b])switch(this.ja[b]=c,b){case "full
l.af=function(a){this.K&&(this.K.af(a),this.C&&(this.C.pg=a));var b=this.ja.lockPointer;b&&(b.textContent=a?"Press Esc to Unlock Pointer":this.qd)};function qq(a,b){var c=a.D;c&&!a.lc&&(c.addEventListener("touchstart",function(b){vq(a,b,!0)},!1),c.addEventListener("touchmove",function(b){vq(a,b)},!0),c.addEventListener("touchend",function(b){vq(a,b,!1)},!1),a.lc=b,a.jb=a.ob=a.cd=-1,a.jc=!1,a.Bb=null,a.dc=!1,a.pd=function(){a.dc=!0;a.K.je(wq,!0)})}l.Uf=function(a){this.C&&this.C.Uf(a)};
function vq(a,b,c){var d,e,f=0,g=0;d=a.N;do isNaN(d.offsetLeft)||(f+=d.offsetLeft,g+=d.offsetTop);while(d=d.offsetParent);var h=a.X/a.N.offsetWidth,k=a.ia/a.N.offsetHeight;b.targetTouches&&b.targetTouches.length?(d=b.targetTouches[0].pageX,e=b.targetTouches[0].pageY):(d=b.pageX,e=b.pageY);d=(d-f)*h;e=(e-g)*k;if(a.lc==sq)c&&so(a.C,xq[e/(a.ia/3)|0][d/(a.X/3)|0],!0);else if(a.K){g=a.jc;f=b.timeStamp-a.cd;!0===c?(a.jc=500<f,a.cd=b.timeStamp,a.Bb=setTimeout(a.pd,500)):null!=a.Bb&&(clearTimeout(a.Bb),a.Bb=
null);void 0===c&&(a.jc=!1);g||b.preventDefault();if(!1===c){a.dc?(a.K.je(wq,!1),a.dc=!1,b=!0):b=!1;if(b)return;if(200>f){a.K.je(wq,!0);a.K.je(wq,!1);return}}if(c||0>a.jb||0>a.ob)a.jb=d,a.ob=e;c=Math.round(d-a.jb);b=Math.round(e-a.ob);a.jb=d;a.ob=e;a.K.tg(c,b,a.jb,a.ob)}}l.Pb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Ob=function(a){return a?this.save():!0};
l.reset=function(){var a=!0,b=0;this.V&&(b=+mk(this.V,Fj,void 0));this.ca||(this.Ma=b==nk?jq:gq);this.ba=yq;switch(this.Ma){case $n:b=7;break;case Yn:var c=zq[this.sb];c&&(b=c[0]);b||(b=4);break;case jq:b=nk;this.ba=Aq;break;default:b=2}this.da!==b&&(this.da=b,a=!0);this.B=null;this.W=this.Lb=new hp(this,jq);this.I=this.tb=new hp(this,gq);this.Ma<Yn?this.A=new hp:(this.A=new hp(this,this.Ma,null,this.Wc),Bq(this));Cq(this);this.pa=null;Dq(this,this.ba);if(this.B.Za&&a){a=this.B.Za+this.bb;for(b=this.B.Za;b<
a;b+=2){var d=65536*Math.random()|0;4==this.da||7==this.da?(c=b>>1&255,d=d>>8&~Eq,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?Fq|Gq:Hq|Iq)|Jq&d>>8);oc(this.na,b,c|d<<8)}uq(this,!0)}};function Bq(a){a.A.gf&op?(a.W=a.Lb,a.I=a.A):(a.W=a.A,a.I=a.tb)}l.save=function(){var a=new Ye(this);a.set(0,Cp(this.Lb));a.set(1,Cp(this.tb));a.set(2,[this.da,this.ba,this.pa]);a.set(3,Cp(this.A));return a.data()};
l.restore=function(a){var b=a[2];this.da=b[0];this.ba=b[1];this.pa=b[2];this.B=null;this.W=this.Lb=new hp(this,jq,a[0]);this.I=this.tb=new hp(this,gq,a[1]);this.A=new hp(this,this.Ma,a[3],this.Wc);this.A.Vb&&Bq(this);Cq(this);if(!Kq(this))return!1;Lq(this);return!0};
l.reset=function(){var a=!0,b=0;this.V&&(b=+mk(this.V,Fj,void 0));this.ca||(this.Ma=b==nk?jq:gq);this.ba=yq;switch(this.Ma){case $n:b=7;break;case Yn:var c=zq[this.sb];c&&(b=c[0]);b||(b=4);break;case jq:b=nk;this.ba=Aq;break;default:b=2}this.da!==b&&(this.da=b,a=!0);this.B=null;this.W=this.Lb=new hp(this,jq);this.I=this.tb=new hp(this,gq);this.Ma<Yn?this.A=new hp:(this.A=new hp(this,this.Ma,null,this.Wc),Bq(this));Cq(this);this.oa=null;Dq(this,this.ba);if(this.B.Za&&a){a=this.B.Za+this.bb;for(b=this.B.Za;b<
a;b+=2){var d=65536*Math.random()|0;4==this.da||7==this.da?(c=b>>1&255,d=d>>8&~Eq,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?Fq|Gq:Hq|Iq)|Jq&d>>8);oc(this.na,b,c|d<<8)}uq(this,!0)}};function Bq(a){a.A.gf&op?(a.W=a.Lb,a.I=a.A):(a.W=a.A,a.I=a.tb)}l.save=function(){var a=new Ye(this);a.set(0,Cp(this.Lb));a.set(1,Cp(this.tb));a.set(2,[this.da,this.ba,this.oa]);a.set(3,Cp(this.A));return a.data()};
l.restore=function(a){var b=a[2];this.da=b[0];this.ba=b[1];this.oa=b[2];this.B=null;this.W=this.Lb=new hp(this,jq,a[0]);this.I=this.tb=new hp(this,gq,a[1]);this.A=new hp(this,this.Ma,a[3],this.Wc);this.A.Vb&&Bq(this);Cq(this);if(!Kq(this))return!1;Lq(this);return!0};
function tq(a,b,c,d){if(d)a.wa("Unable to load font ROM (error "+d+": "+b+")",0>d);else{$a(a.Yd,b,c);try{var e=eval("("+c+")"),f=e.bytes||e;if(!f.length){q("Empty font ROM: "+b);return}if(1==f.length){q(f[0]);return}if(8192==f.length)Zn(a,f,[6144,0]);else if(2048==f.length)Zn(a,f,[0]);else{a.wa("Unrecognized font data length ("+f.length+")");return}}catch(g){a.wa("Font ROM data error: "+g.message);return}(a.J||a.Ea)&&tb(a)}}
function Mq(a,b){if(1==b)return a.fa[0]=Nq[Hq],a.fa[1]=Nq[Fq],a.fa;if(2==b){var c=a.B.ff;if(a.B===a.A){var d=a.A.vc[0],c=d&7;d&16&&(c|=8);18!=a.A.vc[1]&&(c|=32)}a.fa[0]=Nq[c&15];c=c&32?Oq:Pq;for(d=0;d<c.length;d++)a.fa[d+1]=Nq[c[d]];return a.fa}if(a.I===a.tb)return Nq;a.Ha&&b&&!a.fa[16]&&(a.Ha=!1);if(!a.Ha){var c=a.A,d=c.ye,e,f,g,h;if(8==b)for(e=0;256>e;e++)f=d[e]||0,g=f<<2&252,h=f>>4&252,f=f>>10&252,a.fa[e]=[g,h,f,255];else{var k=d&&d[255];b=null!=c.vc[15]?c.vc:Qq;for(e=0;16>e;e++)f=b[e]&63,k?(f|=
(c.vc[20]&12)<<4,c.vc[16]&128&&(f&=-49,f|=(c.vc[20]&3)<<4),f=d[f],g=f<<2&252,h=f>>4&252,f=f>>10&252):(g=(f&4?170:0)|(f&32?85:0),h=(f&2?170:0)|(f&16?85:0),f=(f&1?170:0)|(f&8?85:0)),a.fa[e]=[g,h,f,255]}a.Ha=!0}return a.fa}function Zn(a,b,c,d){a.rb=b;a.Ya=c;a.Ca=d}
function Cq(a,b){var c=!1;if(window&&a.rb&&(!b||a.G)){var d=0,e=a.Ca?a.Ca:8,f=Mq(a);null!=a.Ya[0]&&Rq(a,Sq,a.Ya[0],d,e,8,a.rb,f)&&(c=!0);d=a.Ca?0:2048;e=a.Ca?a.Ca:9;null!=a.Ya[1]&&(Rq(a,Tq,a.Ya[1],d,e,14,a.rb,Uq,Vq)&&(c=!0),a.Ca&&Rq(a,a.Ma,a.Ya[1],0,a.Ca,14,a.rb,f)&&(c=!0))}b||(a.aa=-1,a.za=-1,a.ta=0);return c}function Rq(a,b,c,d,e,f,g,h,k){var m=!1;null!=c&&(Wq(a,b,c,d,e,f,g,h,k)&&(m=!0),a.od&&Wq(a,b<<1,c,d,e,f,g,h,k)&&(m=!0));return m}
function Wq(a,b,c,d,e,f,g,h,k){var m=!1,r=b&1?0:1,y=a.qa[b],t=16>h.length?h.length:16;y||(y={qc:e<<r,rc:f<<r,be:Array(t),Zh:h.slice(0,t),Fe:k,ig:Array(t)});for(k=0;k<t;k++){var z=h[k],E=y.be[k]?y.Zh[k]:[];if(z[0]!==E[0]||z[1]!==E[1]||z[2]!==E[2]){var m=y,E=k,X=r,O=c,Z=d,ya=e,Ha=f,Jc=g,bi=[0,0,0,0],Vf=document.createElement("canvas");Vf.width=m.qc<<4;Vf.height=m.rc<<4;var Vm=Vf.getContext("2d"),Nb,rd,qc,Wf=8>Ha||!Z?Ha:8,ci=Vm.createImageData(m.qc,m.rc);for(Nb=0;256>Nb;Nb++){for(qc=0;qc<Ha;qc++)for(var $t=
m.Fe&&E&1&&qc>=Ha-2,au=Jc[qc<Wf?O+Nb*Wf+qc:Z+Nb*Wf+qc-Wf],di=0;di<=X;di++)for(rd=0;rd<ya;rd++){var Wm=rd<<X,Xm=(qc<<X)+di,Ym=$t||au&128>>(8<=rd&&192<=Nb&&223>=Nb?7:rd)?z:bi;Xq(ci,Wm,Xm,Ym);X&&Xq(ci,Wm+1,Xm,Ym)}Vm.putImageData(ci,(Nb&15)*m.qc,(Nb>>4)*m.rc)}m.be[E]="#"+na(z[0],2)+na(z[1],2)+na(z[2],2);m.Zh[E]=z;m.ig[E]=Vf;m=!0}}a.qa[b]=y;return m}function Yq(a){0<a.ta||0<=a.aa?0>a.za&&(a.za=0):a.za=-1}
function Wq(a,b,c,d,e,f,g,h,k){var m=!1,r=b&1?0:1,y=a.qa[b],t=16>h.length?h.length:16;y||(y={qc:e<<r,rc:f<<r,be:Array(t),Zh:h.slice(0,t),Fe:k,ig:Array(t)});for(k=0;k<t;k++){var z=h[k],E=y.be[k]?y.Zh[k]:[];if(z[0]!==E[0]||z[1]!==E[1]||z[2]!==E[2]){var m=y,E=k,X=r,O=c,Z=d,ya=e,Ha=f,Jc=g,di=[0,0,0,0],Vf=document.createElement("canvas");Vf.width=m.qc<<4;Vf.height=m.rc<<4;var Wm=Vf.getContext("2d"),Nb,rd,qc,Wf=8>Ha||!Z?Ha:8,ei=Wm.createImageData(m.qc,m.rc);for(Nb=0;256>Nb;Nb++){for(qc=0;qc<Ha;qc++)for(var $t=
m.Fe&&E&1&&qc>=Ha-2,au=Jc[qc<Wf?O+Nb*Wf+qc:Z+Nb*Wf+qc-Wf],fi=0;fi<=X;fi++)for(rd=0;rd<ya;rd++){var Xm=rd<<X,Ym=(qc<<X)+fi,Zm=$t||au&128>>(8<=rd&&192<=Nb&&223>=Nb?7:rd)?z:di;Xq(ei,Xm,Ym,Zm);X&&Xq(ei,Xm+1,Ym,Zm)}Wm.putImageData(ei,(Nb&15)*m.qc,(Nb>>4)*m.rc)}m.be[E]="#"+na(z[0],2)+na(z[1],2)+na(z[2],2);m.Zh[E]=z;m.ig[E]=Vf;m=!0}}a.qa[b]=y;return m}function Yq(a){0<a.ta||0<=a.aa?0>a.za&&(a.za=0):a.za=-1}
function Lq(a){if(a.G){for(var b=10;15>=b;b++)if(null==a.B.Qa[b])return;var c=a.B.Qa[10],b=c&31,d=a.B.Qa[11]&aq[11],e=a.B.Qa[9]&aq[9],f=!1;a.B===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)Zq(a);else{c=a.B.Qa[15];c|=(a.B.Qa[14]&a.B.wf)<<8;a.aa!=c&&(Zq(a),a.aa=c);d=d-b+1;if(a.dd!=b||a.Ic!=d)a.dd=b,a.Ic=d;a.ua=e+1;Yq(a)}}}
function Zq(a){if(0<=a.aa){if(void 0!==a.L){var b=$q<<8,c=a.L[a.aa];if(c&b){var c=c&~b,b=a.aa%a.F,d=a.aa/a.F|0;a.G&&a.qa[a.G]&&(a.Ba&&ar(a,b,d,c,a.Ba),ar(a,b,d,c));a.L[a.aa]=c}}a.aa=-1}}
function br(a){var b,c=a.B;a.Nc=!1;var d=c.md[5];if(null!=d){b=rp;var e=tp,f=c.md[3]&31;switch(d&3){case 0:if(f){e=tp|32;switch(f&24){case 8:e=tp|96;break;case 16:e=tp|160;break;case 24:e=tp|224}c.Bc=f&7}break;case 1:e=1;break;case 2:switch(f&24){default:e=2;break;case 8:e=98;break;case 16:e=162;break;case 24:e=226}break;case 3:a.Ma==$n&&(e=3,c.Bc=f&7)}d&8&&(b=1280);c=c.Td[4];null!=c&&(c&4||(b|=sp,e|=up),d&64&&(c&8&&(b|=16384,e|=4),a.Nc=!0));b|=e}return b}
function cr(a,b){var c=a.B;return c&&null!=b&&b!=c.ug?(c.bg(b),a.na.bg(c.Za,c.Fb,c.rg(),!0),!0):!1}
function Kq(a,b){var c,d=a.pa,e=a.B;if(e)if(e.Ma==jq)d=Aq;else if(e.Ma>=Yn){var d=null,f=e.Wc>>2,g=32768<f?32768:f,h=e.md[6];if(null!=h){switch(h&12){case 0:e.Za=655360;e.Fb=f;d=dr;break;case 4:e.Za=655360;e.Fb=f;d=a.da==nk?er:fr;break;case 8:e.Za=720896;e.Fb=g;d=Aq;break;case 12:e.Za=753664,e.Fb=g,d=a.da==nk?gr:yq}c=80==(e.md[5]&80);!c||e.Za==a.Za&&e.Fb==a.Fb||(b=!0);var f=Gp(e,Hp),g=e.Qa[Zp],k=e.Qa[23],m=e.Td[1]&8;d!=dr&&(h&1?655360==e.Za||c||k&1?e.md[5]&64?d=g&31?143>=e.Qa[Pp]?hr:ir:jr:g&128||
350>f?d=m?kr:lr:480<=f&&(d=a.da==nk?mr:nr):d=m?7-d:or:d-=m?2:0);c=br(a)}}else e.Ec&8?(e.Ec&2?(d=e.Ec&16?or:pr,e.Ec&4||--d):(d=e.Ec&1?yq:qr,e.Ec&4&&--d),a.Ab&&(a.N.style.opacity="1",a.Ab=!1)):!a.Ab&&1>+a.Tc&&(a.Ab=!0,a.N.style.opacity=a.Tc,e=a.S,e.jc-=e.A,e.A=0,e.R.ue=0,Wc(e));else a.pa=null,null==d&&(d=a.ba);if(!Dq(a,d,b))return!1;cr(a,c);return!0}
function Dq(a,b,c){if(null!=b&&(b!=a.pa||c)){a.Dd=0;a.pa=b;a.Ha=!1;b=a.B||(b==Aq?a.W:a.I);if(b!=a.B||b.Za!=a.Za||b.Fb!=a.Fb){Zq(a);if(a.Za){if(!gc(a.na,a.Za,a.Fb))return!1;a.B&&(a.B.Vb=!1)}a.B=b;b.Vb=!0;a.Za=b.Za;a.Fb=b.Fb;if(!Wb(a.na,b.Za,b.Fb,3,b===a.A?b:null))return!1}a:{a.G=0;a.F=a.Db;a.H=a.kc;a.Sa=a.F;a.zb=dq[Aq][2];b=0;if(c=dq[a.pa])a.F=c[0],a.H=c[1],a.zb=c[2],b=c[3],a.G=c[4],4!=a.da&&7!=a.da||a.B!==a.A||a.G!=Sq||(7==(a.A.Qa[Zp]&31)?a.H=350>Gp(a.A,Pp)?43:50:a.G=a.Ma);a.Sc=a.F*a.H|0;a.Rc=a.Sc/
function Kq(a,b){var c,d=a.oa,e=a.B;if(e)if(e.Ma==jq)d=Aq;else if(e.Ma>=Yn){var d=null,f=e.Wc>>2,g=32768<f?32768:f,h=e.md[6];if(null!=h){switch(h&12){case 0:e.Za=655360;e.Fb=f;d=dr;break;case 4:e.Za=655360;e.Fb=f;d=a.da==nk?er:fr;break;case 8:e.Za=720896;e.Fb=g;d=Aq;break;case 12:e.Za=753664,e.Fb=g,d=a.da==nk?gr:yq}c=80==(e.md[5]&80);!c||e.Za==a.Za&&e.Fb==a.Fb||(b=!0);var f=Gp(e,Hp),g=e.Qa[Zp],k=e.Qa[23],m=e.Td[1]&8;d!=dr&&(h&1?655360==e.Za||c||k&1?e.md[5]&64?d=g&31?143>=e.Qa[Pp]?hr:ir:jr:g&128||
350>f?d=m?kr:lr:480<=f&&(d=a.da==nk?mr:nr):d=m?7-d:or:d-=m?2:0);c=br(a)}}else e.Ec&8?(e.Ec&2?(d=e.Ec&16?or:pr,e.Ec&4||--d):(d=e.Ec&1?yq:qr,e.Ec&4&&--d),a.Ab&&(a.N.style.opacity="1",a.Ab=!1)):!a.Ab&&1>+a.Tc&&(a.Ab=!0,a.N.style.opacity=a.Tc,e=a.S,e.jc-=e.A,e.A=0,e.R.ue=0,Wc(e));else a.oa=null,null==d&&(d=a.ba);if(!Dq(a,d,b))return!1;cr(a,c);return!0}
function Dq(a,b,c){if(null!=b&&(b!=a.oa||c)){a.Dd=0;a.oa=b;a.Ha=!1;b=a.B||(b==Aq?a.W:a.I);if(b!=a.B||b.Za!=a.Za||b.Fb!=a.Fb){Zq(a);if(a.Za){if(!gc(a.na,a.Za,a.Fb))return!1;a.B&&(a.B.Vb=!1)}a.B=b;b.Vb=!0;a.Za=b.Za;a.Fb=b.Fb;if(!Wb(a.na,b.Za,b.Fb,3,b===a.A?b:null))return!1}a:{a.G=0;a.F=a.Db;a.H=a.kc;a.Sa=a.F;a.zb=dq[Aq][2];b=0;if(c=dq[a.oa])a.F=c[0],a.H=c[1],a.zb=c[2],b=c[3],a.G=c[4],4!=a.da&&7!=a.da||a.B!==a.A||a.G!=Sq||(7==(a.A.Qa[Zp]&31)?a.H=350>Gp(a.A,Pp)?43:50:a.G=a.Ma);a.Sc=a.F*a.H|0;a.Rc=a.Sc/
a.zb|0;a.bb=a.Rc;a.Ub=0;void 0!==b&&(a.bb=(a.bb<<1)+b|0,a.Ub=a.bb+b>>1);if(a.qa.length){a.ka=a.X/a.F|0;a.ma=a.ia/a.H|0;if(a.G){b=a.qa[a.G];if(!b)break a;c=a.qa[a.G<<1];a.Pc&&80==a.F?c&&a.ka>=3*c.qc>>2&&(a.G<<=1,b=c):(c&&a.ka>=c.qc&&(a.G<<=1,b=c),a.Pc||(a.ka=b.qc,a.ma=b.rc));a.cb=a.eb=0;b&&(a.cb=a.F*b.qc,a.eb=a.H*b.rc)}else a.ka=a.ma=1,a.cb=a.F,a.eb=a.H;a.Ka=a.J.createImageData(a.cb,a.eb);a.Aa=document.createElement("canvas");a.Aa.width=a.cb;a.Aa.height=a.eb;a.Ba=a.Aa.getContext("2d");a.sc=a.uc=0;
a.Xb=a.X;a.cc=a.ia;b=a.X-a.F*a.ka;c=a.ia-a.H*a.ma;0<b&&(a.sc=b>>1,a.Xb-=b);0<c&&(a.uc=c>>1,a.cc-=c);if(b||c)a.J.fillStyle=a.N.style.backgroundColor,a.J.fillRect(0,0,a.X,a.ia)}}rr(a,!0);uq(a)}return!0}function Xq(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function sr(a){a.ta=-1;a.Fa=!1;var b=a.Rc;if(void 0===a.L||a.L.length!=b)a.L=Array(b)}function rr(a,b){b||(a.Ha=!1);sr(a)}
function ar(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.qa[a.G];h.Fe&&(d=h.Fe[d]);var k=g>>4&15;h.Fe&&(k=h.Fe[k]);e?(b*=h.qc,c*=h.rc,e.fillStyle=h.be[k],e.fillRect(b,c,h.qc,h.rc)):(b=b*a.ka+a.sc,c=c*a.ma+a.uc,a.J.fillStyle=h.be[k],a.J.fillRect(b,c,a.ka,a.ma));g&tr&&(k=(f&15)*h.qc,f=(f>>4)*h.rc,e?e.drawImage(h.ig[d],k,f,h.qc,h.rc,b,c,h.qc,h.rc):a.J.drawImage(h.ig[d],k,f,h.qc,h.rc,b,c,a.ka,a.ma));g&$q&&(f=a.dd,g=a.Ic,e?(a.ua&&a.ua!==h.rc&&(f=f*h.rc/a.ua|0,g=g*h.rc/a.ua|0),e.fillStyle=h.be[d],e.fillRect(b,
c+f,h.qc,g)):(a.ua&&a.ua!==a.ma&&(f=f*a.ma/a.ua|0,g=g*a.ma/a.ua|0),a.J.fillStyle=h.be[d],a.J.fillRect(b,c+f,a.ka,g)))}
function uq(a,b){b=void 0===b?!1:b;if(a.Y.Qb){var c=!1,d=a.B;d&&(d!==a.A?d.Ec&8&&(c=!0):d.Rd&32&&(c=!0));if(c||b){if(b)sr(a);else if(void 0===a.L)return;c=!1;!(b||++a.Dd&15)&&0<=a.za&&(a.za++,c=!0);var e=a.Sc,f=a.Za,g=f,h=g+a.Fb;a.pa>=hr&&(f=g=655360,h=g+65536);if(ur(a,d)&8||d.$e&&d.$e<d.mh){var k=d.Qa[lp],k=k|(d.Qa[mp]&d.wf)<<8;d.Ad!==k&&(d.Ad=k,rr(a));d.$e=0}var m=d.Ad<<(a.G?1:0),g=g+m,k=a.bb;a.Ma>=Yn&&d.Qa[19]&&d.Qa[19]<<1!=d.Qa[1]+1&&(a.Sa=d.Qa[19]<<(a.G?1:d.Qa[20]&64?3:4),k=(a.Sa*(a.H-1)+a.F)/
a.zb|0,a.pa<=Aq&&(k<<=1));var r=d=0;g+k>h&&(r=k,g>=h?(d=f+(g-h),k=0):(d=f,k=h-g,r-=k));h=a.aa-(m>>1);g=vr(a,f,g,k,0,h,e,b,c);r&&(g+=vr(a,f,d,r,0+g,h,e,b,c));g&&(a.Fa=!0)}}}
function uq(a,b){b=void 0===b?!1:b;if(a.Y.Qb){var c=!1,d=a.B;d&&(d!==a.A?d.Ec&8&&(c=!0):d.Rd&32&&(c=!0));if(c||b){if(b)sr(a);else if(void 0===a.L)return;c=!1;!(b||++a.Dd&15)&&0<=a.za&&(a.za++,c=!0);var e=a.Sc,f=a.Za,g=f,h=g+a.Fb;a.oa>=hr&&(f=g=655360,h=g+65536);if(ur(a,d)&8||d.$e&&d.$e<d.mh){var k=d.Qa[lp],k=k|(d.Qa[mp]&d.wf)<<8;d.Ad!==k&&(d.Ad=k,rr(a));d.$e=0}var m=d.Ad<<(a.G?1:0),g=g+m,k=a.bb;a.Ma>=Yn&&d.Qa[19]&&d.Qa[19]<<1!=d.Qa[1]+1&&(a.Sa=d.Qa[19]<<(a.G?1:d.Qa[20]&64?3:4),k=(a.Sa*(a.H-1)+a.F)/
a.zb|0,a.oa<=Aq&&(k<<=1));var r=d=0;g+k>h&&(r=k,g>=h?(d=f+(g-h),k=0):(d=f,k=h-g,r-=k));h=a.aa-(m>>1);g=vr(a,f,g,k,0,h,e,b,c);r&&(g+=vr(a,f,d,r,0+g,h,e,b,c));g&&(a.Fa=!0)}}}
function vr(a,b,c,d,e,f,g,h,k){var m=d>>1;m>g&&(m=g);var r=c+d;if(h=!h&&a.Fa){h=a.na;for(var y=!0,t=c>>>h.B,z=h.A-(c&h.C);0<d&&t<h.X.length;)h.X[t].Da&&(h.X[t].Da=y=!1,h.X[t].ri=!0),d-=z,z=h.A,t++;h=y}if(h){if(!k)return m;if(!a.ta){f-=e;if(0>f)return m;c+=f<<1;e+=f;g=e+1}}if(a.G){if(a.qa[a.G]){b=c;c=e;k=f=e=0;h=tr<<8;d=1048575;t=a.B.Ec&32;a.Ma>=Yn&&(t=a.B.vc[16]&8);y=a.aa-a.B.Ad;t&&(k=Eq<<8,d&=~k,a.za&2||(d&=~h));for(a.ta=0;b<r&&c<g;)t=nc(a.na,b),t|=h,t&k&&(a.ta++,t&=d),c==y&&(t|=a.za&1?$q<<8:0),
a.Fa&&t===a.L[c]||(ar(a,c%a.F,c/a.F|0,t,a.Ba),a.L[c]=t,f++),b+=2,e++,c++;f&&a.Ba&&a.J.drawImage(a.Aa,0,0,a.cb,a.eb,a.sc,a.uc,a.Xb,a.cc);Yq(a)}}else{if(a.Ub){b=c;m=r-b>>1;g=0;c=a.zb;e=b;f=16==c?65536:196608;k=16==c?1:2;h=Mq(a,k);var y=d=0,t=a.F,z=0,E=a.H,X=0;for(a.ta=0;e<r;){var O=nc(a.na,e);if(a.Fa&&O===a.L[g])d+=c;else{a.L[g]=O;var O=O>>8|(O&255)<<8,Z=f,ya=16;d<t&&(t=d);for(var Ha=0;Ha<c;Ha++){var Jc=(O&(Z>>=k))>>(ya-=k);Xq(a.Ka,d++,y,h[Jc])}d>z&&(z=d);y<E&&(E=y);y>=X&&(X=y+1)}e+=2;g++;if(d>=a.F){d=
0;y+=2;if(y>a.H)break;y==a.H&&(y=1,e=b+a.Ub)}}t<a.F&&(a.Ba.putImageData(a.Ka,0,0,t,E,z-t,X-E),a.J.drawImage(a.Aa,0,0,a.F,a.H,0,0,a.X,a.ia));a=m}else{if(a.Nc){m=0;g=r-c;e=Mq(a,8);f=a.B.rd;h=k=0;d=a.F;y=0;t=a.H;z=0;E=a.B.Td[4]&8?4:1;X=a.B.vc[19]&15;O=a.Sa>a.F?a.Sa-a.F-X>>3:0;for(a.ta=0;c<r;){Z=f[c-b];Ha=4;X||(a.Fa&&Z===a.L[m]?(k+=Ha,Ha=0):a.L[m]=Z,m++);if(Ha){k<d&&(d=k);for(ya=0;ya<Ha;ya++)Xq(a.Ka,k++,h,e[Z&255]),Z>>=8;k>y&&(y=k);h<t&&(t=h);h>=z&&(z=h+1)}c+=E;if(k>=a.F){k=0;if(++h>a.H)break;c+=O}}X&&
@ -569,140 +569,140 @@ function Br(a){u.call(this,"ParallelPort",a);this.G=a.adapter;switch(this.G){cas
l.ic=function(a,b,c,d){this.na=b;this.S=c;this.Ea=d;this.V=Cb(a,"ChipSet");rc(b,this,Dr,this.D);tc(b,this,Er,this.D);tb(this)};l.Pb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Ob=function(a){return a?this.save():!0};l.reset=function(){Fr(this)};l.save=function(){var a=new Ye(this),b=0,c=[];c[b++]=this.F;c[b++]=this.Cb;c[b]=this.He;a.set(0,c);return a.data()};l.restore=function(a){return Fr(this,a[0])};
function Fr(a,b){var c=0;b||(b=[0,0,0]);a.F=b[c++];a.Cb=b[c++];a.He=b[c];return!0}l.el=function(){return this.F};l.Cl=function(){return this.Cb};l.al=function(){return this.He};l.Am=function(a,b){this.F=b;this.Cb|=Gr;a=!1;this.A&&(8==b?this.A.value=this.A.value.slice(0,-1):(this.A.value+=String.fromCharCode(b),this.A.scrollTop=this.A.scrollHeight),a=!0);if(null!=this.B){if(10==b||1024<=this.B.length)this.vb(this.B),this.B="";10!=b&&(this.B+=String.fromCharCode(b));a=!0}a&&(this.Cb&=~Gr);Hr(this)};
l.vm=function(a,b){this.He=b;Hr(this)};function Hr(a){a.V&&a.C&&(a.He&Ir&&!(a.Cb&Gr)?Qf(a.V,a.C):Of(a.V,a.C))}var Cr="buffer",Gr=64,Ir=16,Dr={0:Br.prototype.el,1:Br.prototype.Cl,2:Br.prototype.al},Er={0:Br.prototype.Am,2:Br.prototype.vm};Ra(function(){for(var a=hb(document,"pcx86","parallel"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new Br(d);gb(d,c)}});
function Jr(a){u.call(this,"SerialPort",a);this.fa=a.adapter;switch(this.fa){case 1:this.ba=1016;this.L=4;break;case 2:this.ba=760;this.L=3;break;default:q("Unrecognized serial adapter #"+this.fa);return}this.D=this.G=null;this.ma=a.tabSize;this.ka=a.charBOL;this.J=0;this.pa=Kr|Lr;this.N=!0;a=a.binding;"console"==a?this.G="":eb(this,a,Mr);this.C=this.aa=this.W=null;this.exports={connect:this.Ai,receiveData:this.ef,receiveStatus:this.kk}}ba(Jr,u);l=Jr.prototype;
l.bi=function(a,b,c){var d=null;a!=this.Ce||this.C||(this.C=b,this.W=c,this.N=!1,d=this);return d};l.yb=function(a,b,c){var d=this;switch(b){case Mr:return this.ja[b]=this.D=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),d.ef(b);return!0},c.onkeypress=function(a){a=a||window.event;d.ef(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.removeAttribute("readonly"),!0}return!1};
l.ic=function(a,b,c,d){this.oa=a;this.na=b;this.S=c;this.Ea=d;this.V=Cb(a,"ChipSet");rc(b,this,Nr,this.ba);tc(b,this,Or,this.ba);tb(this)};
l.Ai=function(a){if(!this.C){var b=Tc(this.oa,"connection");if(b){var c=b.split("->");if(2==c.length){var d=ta(c[0]);if(d!=this.Ce)return;c=ta(c[1]);if(this.C=kb(c)){var e=this.C.exports;if(e){var f=e.connect;f&&f.call(this.C,this.N);if(this.aa=e.receiveData){this.N=a;this.W=e.receiveStatus;this.status("Connected "+this.Yd+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};
l.Pb=function(a,b){if(!b)if(this.Ai(this.N),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Ob=function(a){return a?this.save():!0};l.reset=function(){Pr(this)};l.save=function(){var a=new Ye(this),b=0,c=[];c[b++]=this.da;c[b++]=this.ia;c[b++]=this.K;c[b++]=this.M;c[b++]=this.F;c[b++]=this.I;c[b++]=this.X;c[b++]=this.B;c[b++]=this.A;c[b]=this.H;a.set(0,c);return a.data()};l.restore=function(a){return Pr(this,a[0])};
function Pr(a,b){var c=0;b||(b=[0,0,Qr,0,Rr,0,0,Sr|Tr,a.pa,[]]);a.da=b[c++];a.ia=b[c++];a.K=b[c++];a.M=b[c++];a.F=b[c++];a.I=b[c++];a.X=b[c++];a.B=b[c++];a.A=b[c++];a.H=b[c];return!0}l.ef=function(a){if("number"==typeof a)this.H.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.H.push(a.charCodeAt(b));else this.H=this.H.concat(a);Ur(this);return!0};l.kk=function(a){var b=this.A;this.A&=~(Kr|Lr);a&32&&(this.A=this.A|Kr|Vr);a&64&&(this.A=this.A|Lr|Wr);b!=this.A&&Xr(this)};
function Ur(a){0<a.H.length&&!(a.B&Yr)&&(a.da=a.H.shift(),a.B|=Yr);Xr(a)}l.zl=function(){var a=this.I&Zr?this.K&255:this.da;this.B&=~Yr;Ur(this);return a};l.ll=function(){return this.I&Zr?this.K>>8:this.M};l.ml=function(){return this.F};l.nl=function(){return this.I};l.pl=function(){return this.X};l.ol=function(){return this.B};l.ul=function(){var a=this.A;this.A&=~(Vr|Wr);return a};
l.Xm=function(a,b){if(this.I&Zr)this.K=this.K&-256|b;else{this.ia=b;this.B&=~(Sr|Tr);a=!1;this.aa&&this.aa.call(this.C,b)&&(a=!0);if(this.D){if(13==b)this.J=0;else if(8==b)this.D.value=this.D.value.slice(0,-1),0<this.J&&this.J--;else{var c;13!=b&&10!=b&&(c=ua[b]);c=c?"<"+c+">":String.fromCharCode(b);a=c.length;32>b&&1==a&&(a=0);9==b&&(b=this.ma||8,a=b-this.J%b,this.ma&&(c=" ".slice(0,a)));this.ka&&!this.J&&a&&(c=String.fromCharCode(this.ka)+c);this.D.value+=
c;this.D.scrollTop=this.D.scrollHeight;this.J+=a}a=!0}else if(null!=this.G){if(10==b||1024<=this.G.length)this.vb(this.G),this.G="";10!=b&&(this.G+=String.fromCharCode(b));a=!0}a&&(this.B=this.B|Sr|Tr)}};l.Km=function(a,b){this.I&Zr?this.K=this.K&255|b<<8:this.M=b};l.Lm=function(a,b){this.I=b};l.Mm=function(a,b){a=b^this.X;this.X=b;a&($r|as)&&this.W&&(a=0,this.N?(a|=b&as?32:0,a|=b&$r?320:0):(a|=b&as?16:0,a|=b&$r?1048576:0),this.W.call(this.C,a))};
function Xr(a){var b=-1;a.B&Yr&&a.M&bs?b=cs:a.A&(Vr|Wr)&&a.M&ds&&(b=es);0<=b?(a.F&=~(Rr|fs),a.F|=b,a.V&&a.L&&Qf(a.V,a.L,100)):(a.F|=Rr,a.V&&a.L&&Of(a.V,a.L))}var Mr="buffer",Qr=384,bs=1,ds=8,Rr=1,cs=4,es=0,fs=6,Zr=128,$r=1,as=2,Yr=1,Sr=32,Tr=64,Vr=1,Wr=2,Kr=16,Lr=32,Nr={0:Jr.prototype.zl,1:Jr.prototype.ll,2:Jr.prototype.ml,3:Jr.prototype.nl,4:Jr.prototype.pl,5:Jr.prototype.ol,6:Jr.prototype.ul},Or={0:Jr.prototype.Xm,1:Jr.prototype.Km,3:Jr.prototype.Lm,4:Jr.prototype.Mm};
Ra(function(){for(var a=hb(document,"pcx86","serial"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new Jr(d);gb(d,c)}});function gs(a){u.call(this,"Mouse",a);if(this.N=a.serial)this.V="SerialPort";this.M=this.L=this.Vb=!1;this.C=[];this.B=[];tb(this)}ba(gs,u);l=gs.prototype;l.ic=function(a,b,c,d){this.oa=a;this.na=b;this.S=c;this.Ea=d;for(b=null;b=Cb(a,"Video",b);)this.C.push(b)};
l.Pb=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.V&&!this.D){for(a=null;(a=Cb(this.oa,this.V,a))&&(!a.bi||!(this.D=a.bi(this.N,this,this.jk))););if(this.D)for(this.B=[],a=0;a<this.C.length;a++)b=this.C[a],b.K=this,(b=b.D)&&this.B.push(b);else q(this.id+": "+this.V+" "+this.N+" unavailable")}this.Vb?hs(this):is(this)}return!0};l.Ob=function(a){return a?this.save():!0};l.reset=function(){js(this)};
l.save=function(){var a=new Ye(this),b=0,c=[];c[b++]=this.Vb;c[b++]=this.F;c[b++]=this.G;c[b++]=this.H;c[b++]=this.I;c[b++]=this.J;c[b++]=this.K;c[b]=this.A;a.set(0,c);return a.data()};l.restore=function(a){return js(this,a[0])};function js(a,b){var c=0;b||(b=[!1,-1,-1,0,0,!1,!1,0]);var d=b[c++];a.Vb=d;a.F=b[c++];a.G=b[c++];a.H=b[c++];a.I=b[c++];a.J=b[c++];a.K=b[c++];a.A=b[c];a.A&($r|as)&&(a.A=(a.A&$r?1048576:0)|(a.A&as?16:0));return!0}l.af=function(a){this.L=a};
function hs(a){if(!a.M)for(var b=0;b<a.B.length;b++)ks(a,a.B[b])&&(a.M=!0)}function is(a){if(a.M)for(var b=0;b<a.B.length;b++){var c=a.B[b];c&&(c.style.cursor="auto")}}function ks(a,b){return b?(b.addEventListener("mousemove",function(b){ls(a,b)},!1),b.addEventListener("mousedown",function(b){ls(a,b,!0)},!1),b.addEventListener("mouseup",function(b){ls(a,b,!1)},!1),b.style.cursor="none",!0):!1}
function ls(a,b,c){if(void 0!==c){var d;!(d=!1!==a.L)&&(d=a.C.length)&&(d=a.C[0],d=d.nd?d.Ld(!0):!1);d||(a.L=null);a.je(b.button,c)}else{if(0>a.F||0>a.G)a.F=b.screenX,a.G=b.screenY;a.L?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.screenX-a.F,d=b.screenY-a.G);a.F=b.screenX;a.G=b.screenY;a.tg(c,d,a.F,a.G)}}
l.je=function(a,b){if(this.Vb&&this.S&&this.S.Y.nb)switch(a){case wq:this.J!=b&&(this.J=b,ms(this));break;case ns:this.K!=b&&(this.K=b,ms(this))}};l.tg=function(a,b){this.Vb&&this.S&&this.S.Y.nb&&(a||b)&&(this.H=a,this.I=b,ms(this))};function ms(a){a.D.ef([64|(a.J?32:0)|(a.K?16:0)|(a.I&192)>>4|(a.H&192)>>6,a.H&63,a.I&63]);a.H=a.I=0}
l.jk=function(a){var b=1048592==(a&1048592);if(b){if(!this.Vb){var c=!1;this.A&16||(this.reset(),c=!0);this.A&1048576||(c=!0);c&&this.D.ef([os,os]);hs(this);this.Vb=b}}else this.Vb&&(is(this),this.Vb=b);this.A=a};var os=77,wq=0,ns=2;Ra(function(){for(var a=hb(document,"pcx86","mouse"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new gs(d);gb(d,c)}});
function ps(a,b,c){u.call(this,"Disk",{id:a.Yd+".disk"+na(++qs,4)});this.controller=a;this.wa=a.wa;this.vb=a.vb;this.oa=a.oa;this.Ea=a.Ea;this.B=b;this.Qc=b.name;this.oe=b.oe;this.Gf=this.C=!1;rs(this,c,b.hb,b.Xa,b.Ua,b.lb);this.G=[];this.J=[];this.D=null;this.L=0;this.K=!1;tb(this)}ba(ps,u);l=ps.prototype;l.ic=function(a,b,c,d){this.Ea=d};l.Pb=function(a,b){b||!this.Gf||this.C||(tb(this,!1),this.load(this.Qc,this.F,null,this.yk,this));return!0};l.yk=function(){tb(this,!0)};
l.Ob=function(a,b){if(this.C){var c,d=0;if(this.K&&!bb("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=ss(this,!1);)if(d=c[0]){this.wa('Unable to save "'+this.Qc+'" (error '+d+")");break}b&&this.C&&(b="action=close&volume="+this.F,b+="&machine="+ts(this.controller),b+="&user="+us(this.controller),Ea(Fa()+"/api/v1/disk?"+b,null,!0),this.C=!1);!d&&a&&this.wa(this.Qc+" saved")}return!0};
function rs(a,b,c,d,e,f){a.mode=b;a.hb=c;a.Xa=d;a.Ua=e;a.lb=f;a.A=[];if("preload"!=a.mode){b=Array(a.hb);for(c=0;c<b.length;c++){d=Array(a.Xa);for(e=0;e<d.length;e++){f=Array(a.Ua);for(var g=1;g<=f.length;g++)f[g-1]=vs(null,c,e,g,a.lb,"local"==a.mode?0:null);d[e]=f}b[c]=d}a.A=b}a.I=null}
l.load=function(a,b,c,d,e){var f=b;if(this.H)return!0;this.Qc=a;this.F=b;this.rh=oa(b);var g=this;this.H=d;this.M=e||this.controller;if(c){var h=new FileReader;h.onload=function(){var a=h.result,b,c=a?a.byteLength:0,d=ka[c];if(d){g.hb=d[0];g.Xa=d[1];g.Ua=d[2];g.lb=d[3]||512;b=g.lb>>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.hb);for(c=0;c<g.A.length;c++)for(var f=g.A[c]=Array(g.Xa),k=0;k<f.length;k++)for(var O=f[k]=Array(g.Ua),Z=0;Z<O.length;Z++){for(var ya=vs(null,c,k,Z+1,g.lb,0),Ha=ya.data,Jc=
0;Jc<b;Jc++,e+=4)var bi=Ha[Jc]=a.getInt32(e,!0),d=d+bi&-1;ya.yc=b;O[Z]=ya}g.I=d;b=g}else g.wa("Unrecognized disk format ("+c+" bytes)");g.H&&(g.H.call(g.controller,g.B,b,g.Qc,g.F),g.H=null)};h.readAsArrayBuffer(c);return!0}0>b.indexOf("/api/v1/dump")&&(a=pa(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=ws(this,b),this.Gf=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):
qa(b,"/")&&(c="dir"),f=Fa()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.oe?"":d)+"&format=json"));var k="Loading "+f+"...";return!!Ea(f,null,!0,function(a,b,c){xs(g,a,b,c)},function(){g.vb(k,qb.ae)})};
function xs(a,b,c,d){var e=null;a.re=!1;var f=!(!(0>d&&a.oa)||a.oa.Y.Qb);if(a.Gf)d?a.wa('Unable to connect to disk "'+a.F+'" (error '+d+": "+c+")",f):(a.C=!0,e=a);else if(d)a.wa('Unable to load disk "'+a.Qc+'" (error '+d+": "+b+")",f);else{$a(a.controller.Yd,b,c);try{if(0<oa(a.rh,!0).toLowerCase().indexOf("-readonly"))a.re=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.re=!0)}var h;"<"==c.substr(0,1)?h=["Missing disk image: "+a.Qc]:h=0>c.indexOf("0x")&&
function Jr(a){u.call(this,"SerialPort",a);this.fa=a.adapter;switch(this.fa){case 1:this.ba=1016;this.M=4;break;case 2:this.ba=760;this.M=3;break;default:q("Unrecognized serial adapter #"+this.fa);return}this.F=this.G=null;this.oa=a.tabSize;this.ka=a.charBOL;this.J=this.ma=0;this.qa=Kr|Lr;this.N=!0;a=a.binding;"console"==a?this.G="":eb(this,a,Mr);this.D=this.aa=this.W=null;this.exports={connect:this.Ai,receiveData:this.ef,receiveStatus:this.kk}}ba(Jr,u);l=Jr.prototype;
l.bi=function(a,b,c){var d=null;a!=this.Ce||this.D||(this.D=b,this.W=c,this.N=!1,d=this);return d};l.yb=function(a,b,c){var d=this;switch(b){case Mr:return this.ja[b]=this.F=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),d.ef(b);return!0},c.onkeypress=function(a){a=a||window.event;d.ef(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.removeAttribute("readonly"),!0}return!1};
l.ic=function(a,b,c,d){this.pa=a;this.na=b;this.S=c;this.Ea=d;this.V=Cb(a,"ChipSet");rc(b,this,Nr,this.ba);tc(b,this,Or,this.ba);tb(this)};
l.Ai=function(a){if(!this.D){var b=Tc(this.pa,"connection");if(b){var c=b.split("->");if(2==c.length){var d=ta(c[0]);if(d!=this.Ce)return;c=ta(c[1]);if(this.D=kb(c)){var e=this.D.exports;if(e){var f=e.connect;f&&f.call(this.D,this.N);if(this.aa=e.receiveData){this.N=a;this.W=e.receiveStatus;this.status("Connected "+this.Yd+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};
l.Pb=function(a,b){if(!b)if(this.Ai(this.N),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Ob=function(a){return a?this.save():!0};l.reset=function(){Pr(this)};l.save=function(){var a=new Ye(this),b=0,c=[];c[b++]=this.da;c[b++]=this.ia;c[b++]=this.K;c[b++]=this.L;c[b++]=this.C;c[b++]=this.I;c[b++]=this.X;c[b++]=this.A;c[b++]=this.B;c[b]=this.H;a.set(0,c);return a.data()};l.restore=function(a){return Pr(this,a[0])};
function Pr(a,b){var c=0;b||(b=[0,0,Qr,0,Rr,0,0,Sr|Tr,a.qa,[]]);a.da=b[c++];a.ia=b[c++];a.K=b[c++];a.L=b[c++];a.C=b[c++];a.I=b[c++];a.X=b[c++];a.A=b[c++];a.B=b[c++];a.H=b[c];return!0}l.ef=function(a){if("number"==typeof a)this.H.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.H.push(a.charCodeAt(b));else this.H=this.H.concat(a);Ur(this);return!0};l.kk=function(a){var b=this.B;this.B&=~(Kr|Lr);a&32&&(this.B=this.B|Kr|Vr);a&64&&(this.B=this.B|Lr|Wr);b!=this.B&&Xr(this)};
function Ur(a){0<a.H.length&&!(a.A&Yr)&&(a.da=a.H.shift(),a.A|=Yr);Xr(a)}l.zl=function(){var a=this.I&Zr?this.K&255:this.da;this.A&=~Yr;Ur(this);return a};l.ll=function(){return this.I&Zr?this.K>>8:this.L};l.ml=function(){var a=this.C;this.C|=Rr;return a};l.nl=function(){return this.I};l.pl=function(){return this.X};l.ol=function(){return this.A};l.ul=function(){var a=this.B;this.B&=~(Vr|Wr);return a};
l.Xm=function(a,b){if(this.I&Zr)this.K=this.K&-256|b;else{this.ia=b;this.A&=~(Sr|Tr);a=!1;this.aa&&this.aa.call(this.D,b)&&(a=!0);if(this.F){if(13==b)this.J=0;else if(8==b)this.F.value=this.F.value.slice(0,-1),0<this.J&&this.J--;else{var c;13!=b&&10!=b&&(c=ua[b]);c=c?"<"+c+">":String.fromCharCode(b);a=c.length;32>b&&1==a&&(a=0);9==b&&(a=this.oa||8,a-=this.J%a,this.oa&&(c=" ".slice(0,a)));!this.J&&a&&(10!=this.ma&&(c="\n"+c),this.ka&&(c=String.fromCharCode(this.ka)+
c));this.F.value+=c;this.F.scrollTop=this.F.scrollHeight;this.J+=a}this.ma=b;a=!0}else if(null!=this.G){if(10==b||1024<=this.G.length)this.vb(this.G),this.G="";10!=b&&(this.G+=String.fromCharCode(b));a=!0}a&&(this.A=this.A|Sr|Tr,Xr(this))}};l.Km=function(a,b){this.I&Zr?this.K=this.K&255|b<<8:this.L=b};l.Lm=function(a,b){this.I=b};l.Mm=function(a,b){a=b^this.X;this.X=b;a&($r|as)&&this.W&&(a=0,this.N?(a|=b&as?32:0,a|=b&$r?320:0):(a|=b&as?16:0,a|=b&$r?1048576:0),this.W.call(this.D,a))};
function Xr(a){var b=-1;a.A&Yr&&a.L&bs?b=cs:a.A&Sr&&a.L&ds?b=es:a.B&(Vr|Wr)&&a.L&fs&&(b=gs);0<=b?(a.C&=~(Rr|hs),a.C|=b,a.V&&a.M&&Qf(a.V,a.M,100)):(a.C|=Rr,a.V&&a.M&&Of(a.V,a.M))}var Mr="buffer",Qr=384,bs=1,ds=2,fs=8,Rr=1,cs=4,es=2,gs=0,hs=6,Zr=128,$r=1,as=2,Yr=1,Sr=32,Tr=64,Vr=1,Wr=2,Kr=16,Lr=32,Nr={0:Jr.prototype.zl,1:Jr.prototype.ll,2:Jr.prototype.ml,3:Jr.prototype.nl,4:Jr.prototype.pl,5:Jr.prototype.ol,6:Jr.prototype.ul},Or={0:Jr.prototype.Xm,1:Jr.prototype.Km,3:Jr.prototype.Lm,4:Jr.prototype.Mm};
Ra(function(){for(var a=hb(document,"pcx86","serial"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new Jr(d);gb(d,c)}});function is(a){u.call(this,"Mouse",a);if(this.N=a.serial)this.V="SerialPort";this.M=this.L=this.Vb=!1;this.C=[];this.B=[];tb(this)}ba(is,u);l=is.prototype;l.ic=function(a,b,c,d){this.pa=a;this.na=b;this.S=c;this.Ea=d;for(b=null;b=Cb(a,"Video",b);)this.C.push(b)};
l.Pb=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.V&&!this.D){for(a=null;(a=Cb(this.pa,this.V,a))&&(!a.bi||!(this.D=a.bi(this.N,this,this.jk))););if(this.D)for(this.B=[],a=0;a<this.C.length;a++)b=this.C[a],b.K=this,(b=b.D)&&this.B.push(b);else q(this.id+": "+this.V+" "+this.N+" unavailable")}this.Vb?js(this):ks(this)}return!0};l.Ob=function(a){return a?this.save():!0};l.reset=function(){ls(this)};
l.save=function(){var a=new Ye(this),b=0,c=[];c[b++]=this.Vb;c[b++]=this.F;c[b++]=this.G;c[b++]=this.H;c[b++]=this.I;c[b++]=this.J;c[b++]=this.K;c[b]=this.A;a.set(0,c);return a.data()};l.restore=function(a){return ls(this,a[0])};function ls(a,b){var c=0;b||(b=[!1,-1,-1,0,0,!1,!1,0]);var d=b[c++];a.Vb=d;a.F=b[c++];a.G=b[c++];a.H=b[c++];a.I=b[c++];a.J=b[c++];a.K=b[c++];a.A=b[c];a.A&($r|as)&&(a.A=(a.A&$r?1048576:0)|(a.A&as?16:0));return!0}l.af=function(a){this.L=a};
function js(a){if(!a.M)for(var b=0;b<a.B.length;b++)ms(a,a.B[b])&&(a.M=!0)}function ks(a){if(a.M)for(var b=0;b<a.B.length;b++){var c=a.B[b];c&&(c.style.cursor="auto")}}function ms(a,b){return b?(b.addEventListener("mousemove",function(b){ns(a,b)},!1),b.addEventListener("mousedown",function(b){ns(a,b,!0)},!1),b.addEventListener("mouseup",function(b){ns(a,b,!1)},!1),b.style.cursor="none",!0):!1}
function ns(a,b,c){if(void 0!==c){var d;!(d=!1!==a.L)&&(d=a.C.length)&&(d=a.C[0],d=d.nd?d.Ld(!0):!1);d||(a.L=null);a.je(b.button,c)}else{if(0>a.F||0>a.G)a.F=b.screenX,a.G=b.screenY;a.L?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.screenX-a.F,d=b.screenY-a.G);a.F=b.screenX;a.G=b.screenY;a.tg(c,d,a.F,a.G)}}
l.je=function(a,b){if(this.Vb&&this.S&&this.S.Y.nb)switch(a){case wq:this.J!=b&&(this.J=b,os(this));break;case ps:this.K!=b&&(this.K=b,os(this))}};l.tg=function(a,b){this.Vb&&this.S&&this.S.Y.nb&&(a||b)&&(this.H=a,this.I=b,os(this))};function os(a){a.D.ef([64|(a.J?32:0)|(a.K?16:0)|(a.I&192)>>4|(a.H&192)>>6,a.H&63,a.I&63]);a.H=a.I=0}
l.jk=function(a){var b=1048592==(a&1048592);if(b){if(!this.Vb){var c=!1;this.A&16||(this.reset(),c=!0);this.A&1048576||(c=!0);c&&this.D.ef([qs,qs]);js(this);this.Vb=b}}else this.Vb&&(ks(this),this.Vb=b);this.A=a};var qs=77,wq=0,ps=2;Ra(function(){for(var a=hb(document,"pcx86","mouse"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new is(d);gb(d,c)}});
function rs(a,b,c){u.call(this,"Disk",{id:a.Yd+".disk"+na(++ss,4)});this.controller=a;this.wa=a.wa;this.vb=a.vb;this.pa=a.pa;this.Ea=a.Ea;this.B=b;this.Qc=b.name;this.oe=b.oe;this.Gf=this.C=!1;ts(this,c,b.hb,b.Xa,b.Ua,b.lb);this.G=[];this.J=[];this.D=null;this.L=0;this.K=!1;tb(this)}ba(rs,u);l=rs.prototype;l.ic=function(a,b,c,d){this.Ea=d};l.Pb=function(a,b){b||!this.Gf||this.C||(tb(this,!1),this.load(this.Qc,this.F,null,this.yk,this));return!0};l.yk=function(){tb(this,!0)};
l.Ob=function(a,b){if(this.C){var c,d=0;if(this.K&&!bb("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=us(this,!1);)if(d=c[0]){this.wa('Unable to save "'+this.Qc+'" (error '+d+")");break}b&&this.C&&(b="action=close&volume="+this.F,b+="&machine="+vs(this.controller),b+="&user="+ws(this.controller),Ea(Fa()+"/api/v1/disk?"+b,null,!0),this.C=!1);!d&&a&&this.wa(this.Qc+" saved")}return!0};
function ts(a,b,c,d,e,f){a.mode=b;a.hb=c;a.Xa=d;a.Ua=e;a.lb=f;a.A=[];if("preload"!=a.mode){b=Array(a.hb);for(c=0;c<b.length;c++){d=Array(a.Xa);for(e=0;e<d.length;e++){f=Array(a.Ua);for(var g=1;g<=f.length;g++)f[g-1]=xs(null,c,e,g,a.lb,"local"==a.mode?0:null);d[e]=f}b[c]=d}a.A=b}a.I=null}
l.load=function(a,b,c,d,e){var f=b;if(this.H)return!0;this.Qc=a;this.F=b;this.rh=oa(b);var g=this;this.H=d;this.M=e||this.controller;if(c){var h=new FileReader;h.onload=function(){var a=h.result,b,c=a?a.byteLength:0,d=ka[c];if(d){g.hb=d[0];g.Xa=d[1];g.Ua=d[2];g.lb=d[3]||512;b=g.lb>>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.hb);for(c=0;c<g.A.length;c++)for(var f=g.A[c]=Array(g.Xa),k=0;k<f.length;k++)for(var O=f[k]=Array(g.Ua),Z=0;Z<O.length;Z++){for(var ya=xs(null,c,k,Z+1,g.lb,0),Ha=ya.data,Jc=
0;Jc<b;Jc++,e+=4)var di=Ha[Jc]=a.getInt32(e,!0),d=d+di&-1;ya.yc=b;O[Z]=ya}g.I=d;b=g}else g.wa("Unrecognized disk format ("+c+" bytes)");g.H&&(g.H.call(g.controller,g.B,b,g.Qc,g.F),g.H=null)};h.readAsArrayBuffer(c);return!0}0>b.indexOf("/api/v1/dump")&&(a=pa(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=ys(this,b),this.Gf=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):
qa(b,"/")&&(c="dir"),f=Fa()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.oe?"":d)+"&format=json"));var k="Loading "+f+"...";return!!Ea(f,null,!0,function(a,b,c){zs(g,a,b,c)},function(){g.vb(k,qb.ae)})};
function zs(a,b,c,d){var e=null;a.re=!1;var f=!(!(0>d&&a.pa)||a.pa.Y.Qb);if(a.Gf)d?a.wa('Unable to connect to disk "'+a.F+'" (error '+d+": "+c+")",f):(a.C=!0,e=a);else if(d)a.wa('Unable to load disk "'+a.Qc+'" (error '+d+": "+b+")",f);else{$a(a.controller.Yd,b,c);try{if(0<oa(a.rh,!0).toLowerCase().indexOf("-readonly"))a.re=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.re=!0)}var h;"<"==c.substr(0,1)?h=["Missing disk image: "+a.Qc]:h=0>c.indexOf("0x")&&
'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+c+")");if(h.length)if(1==h.length)q(h[0]);else{a.hb=h.length;a.Xa=h[0].length;a.Ua=h[0][0].length;var k=h[0][0][0];a.lb=k&&k.length||512;for(d=c=0;d<a.hb;d++)for(f=0;f<a.Xa;f++)for(g=0;g<a.Ua;g++)if(k=h[d][f][g]){var m=k.length;void 0===m&&(m=k.length=512);var m=m>>2,r=k.pattern;void 0===r&&(r=k.pattern=0);var y=k.data;if(void 0===y){var t=k.bytes;if(void 0!==t&&t.length){for(var z=m<<2,E=t.length;E<
z;E++)t[E]=r;ys(k,t,0)}else k.data=y=[],t&&(k.pattern=r|r<<8|r<<16|r<<24);delete k.bytes}vs(k,d,f);for(z=0;z<y.length;z++)c=c+y[z]&-1}a.A=h;a.I=c;e=a}else q("Empty disk image: "+a.Qc)}catch(X){q("Disk image error ("+b+"): "+X.message)}}a.H&&(a.H.call(a.M,a.B,e,a.Qc,a.F),a.H=null)}function zs(a,b){var c=a.Xa*a.Ua,d=b/c|0;return d<a.hb?(b%=c,a.seek(d,b/a.Ua|0,b%a.Ua+1)):null}function As(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}
function vs(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Ek=b;a.Fk=c;a.Mc=a.yc=0;a.Da=!1;return a}function ws(a,b){b="action=open&volume="+b+("&mode="+a.mode);b+="&chs="+a.hb+":"+a.Xa+":"+a.Ua+":"+a.lb;b+="&machine="+ts(a.controller);b+="&user="+us(a.controller);return Fa()+"/api/v1/disk?"+b}
function Bs(a,b,c,d,e,f,g){if(a.C){var h;h="action=read&volume="+a.F;h+="&chs="+a.hb+":"+a.Xa+":"+a.Ua+":"+a.lb;h=h+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+ts(a.controller));h+="&user="+us(a.controller);Ea(Fa()+"/api/v1/disk?"+h,null,f,function(h,m,r){h=[b,c,d,e,f,g];var k=!1,t=h[0],z=h[1],E=h[2],X=h[3];if(!r){m=JSON.parse(m);for(k=0;X--;){var O=a.seek(t,z,E,!0);if(!O)break;ys(O,m,k);k+=O.length;E++}k=h[4]}(h=h[5])&&h(r,k)})}else g&&g(-1,!1)}
function Cs(a,b,c,d,e,f,g){if(a.C){var h={};a.K=!0;h.action="write";h.volume=a.F;h.chs=a.hb+":"+a.Xa+":"+a.Ua+":"+a.lb;h.addr=b+":"+c+":"+d+":"+e;h.machine=ts(a.controller);h.user=us(a.controller);h.data=JSON.stringify(f);Ea(Fa()+"/api/v1/disk",h,g,function(f,h,r){var k=[b,c,d,e,g];f=k[0];h=k[1];var m=k[2],z=k[3],k=k[4];a.K=!1;if(0<=f&&f<a.A.length&&0<=h&&h<a.A[f].length)for(--m;0<z--&&0<=m&&m<a.A[f][h].length;m++){var E=a.A[f][h][m];r?Ds(a,E,!1):E.Da||(E.Mc=E.yc=0)}k&&Es(a)})}return!1}
function Ds(a,b,c){b.Da=!0;var d=a.G.indexOf(b);0<=d&&(a.G.splice(d,1),a.J.splice(d,1));a.G.push(b);a.J.push(Da());c&&Es(a)}function Es(a){if(a.G.length){var b=a.J[0]+2E3;a.D&&a.L<b&&(clearTimeout(a.D),a.D=null);if(!a.D){var c=Da(),b=b-c;0>b&&(b=0);2E3<b&&(b=2E3);a.D=setTimeout(function(){ss(a,!0)},b);a.L=c+b}}else a.D&&(clearTimeout(a.D),a.D=null)}
function ss(a,b){b&&(a.D=null);var c=a.G[0];if(c){for(var d=c.Ek,e=c.Fk,c=c.sector,f=0,g=[],h=c-1;h<a.A[d][e].length;h++){var k=a.A[d][e][h];if(!k.Da)break;var m=a.G.indexOf(k);a.G.splice(m,1);a.J.splice(m,1);g=g.concat(Fs(k));k.Da=!1;f++}a=Cs(a,d,e,c,f,g,b);return b||a}return!1}l.info=function(){return this.A.length?[this.A.length,this.A[0].length,this.A[0][0].length,this.A[0][0][0].length]:[0,0,0,0]};
l.seek=function(a,b,c,d,e){var f=null,g=this.B,h=this.A[a];if(h){var k=h[b];if(!k&&g.kg&&b<g.Xa){k=h[b]=Array(g.ud);for(h=0;h<k.length;h++)k[h]=vs(null,a,b,h+1,g.ub,0);this.Xa<=b&&(this.Xa=b+1)}if(k){for(h=0;h<k.length;h++)if(k[h]&&k[h].sector==c){f=k[h];if(null===f.pattern)if(d)f.pattern=0;else{for(d=1;++h<k.length;)null===k[h].pattern&&d++;Bs(this,a,b,c,d,!!e,function(a,b){a&&(f=null);e&&e(f,b)});return e?null:f}break}!f&&g.kg&&9==g.$a&&(f=k[h]=vs(null,a,b,g.$a,g.ub,0),this.Ua<g.$a&&(this.Ua=g.$a))}}e&&
e(f,!1);return f};function ys(a,b,c){for(var d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}function Fs(a){var b=a.length,c=Array(b),d=0,b=b>>2,e=a.data;a=a.pattern;for(var f=0;f<b;f++){var g=f<e.length?e[f]:a;c[d++]=g&255;c[d++]=g>>8&255;c[d++]=g>>16&255;c[d++]=g>>24&255}return c}l.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};
l.write=function(a,b,c){if(this.re)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.yc?f<a.Mc?(a.yc+=a.Mc-f,a.Mc=f):f>=a.Mc+a.yc&&(a.yc+=f-(a.Mc+a.yc)+1):(a.Mc=f,a.yc=1);d[f]=d[f]&~(255<<b)|c<<b;this.C&&Ds(this,a,!0)}return!0}return null};function Gs(a){for(var b="",c=0,d;d=zs(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(As(a,d,e));return btoa(b)}
z;E++)t[E]=r;As(k,t,0)}else k.data=y=[],t&&(k.pattern=r|r<<8|r<<16|r<<24);delete k.bytes}xs(k,d,f);for(z=0;z<y.length;z++)c=c+y[z]&-1}a.A=h;a.I=c;e=a}else q("Empty disk image: "+a.Qc)}catch(X){q("Disk image error ("+b+"): "+X.message)}}a.H&&(a.H.call(a.M,a.B,e,a.Qc,a.F),a.H=null)}function Bs(a,b){var c=a.Xa*a.Ua,d=b/c|0;return d<a.hb?(b%=c,a.seek(d,b/a.Ua|0,b%a.Ua+1)):null}function Cs(a,b,c){for(var d=1,e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}
function xs(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Ek=b;a.Fk=c;a.Mc=a.yc=0;a.Da=!1;return a}function ys(a,b){b="action=open&volume="+b+("&mode="+a.mode);b+="&chs="+a.hb+":"+a.Xa+":"+a.Ua+":"+a.lb;b+="&machine="+vs(a.controller);b+="&user="+ws(a.controller);return Fa()+"/api/v1/disk?"+b}
function Ds(a,b,c,d,e,f,g){if(a.C){var h;h="action=read&volume="+a.F;h+="&chs="+a.hb+":"+a.Xa+":"+a.Ua+":"+a.lb;h=h+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+vs(a.controller));h+="&user="+ws(a.controller);Ea(Fa()+"/api/v1/disk?"+h,null,f,function(h,m,r){h=[b,c,d,e,f,g];var k=!1,t=h[0],z=h[1],E=h[2],X=h[3];if(!r){m=JSON.parse(m);for(k=0;X--;){var O=a.seek(t,z,E,!0);if(!O)break;As(O,m,k);k+=O.length;E++}k=h[4]}(h=h[5])&&h(r,k)})}else g&&g(-1,!1)}
function Es(a,b,c,d,e,f,g){if(a.C){var h={};a.K=!0;h.action="write";h.volume=a.F;h.chs=a.hb+":"+a.Xa+":"+a.Ua+":"+a.lb;h.addr=b+":"+c+":"+d+":"+e;h.machine=vs(a.controller);h.user=ws(a.controller);h.data=JSON.stringify(f);Ea(Fa()+"/api/v1/disk",h,g,function(f,h,r){var k=[b,c,d,e,g];f=k[0];h=k[1];var m=k[2],z=k[3],k=k[4];a.K=!1;if(0<=f&&f<a.A.length&&0<=h&&h<a.A[f].length)for(--m;0<z--&&0<=m&&m<a.A[f][h].length;m++){var E=a.A[f][h][m];r?Fs(a,E,!1):E.Da||(E.Mc=E.yc=0)}k&&Gs(a)})}return!1}
function Fs(a,b,c){b.Da=!0;var d=a.G.indexOf(b);0<=d&&(a.G.splice(d,1),a.J.splice(d,1));a.G.push(b);a.J.push(Da());c&&Gs(a)}function Gs(a){if(a.G.length){var b=a.J[0]+2E3;a.D&&a.L<b&&(clearTimeout(a.D),a.D=null);if(!a.D){var c=Da(),b=b-c;0>b&&(b=0);2E3<b&&(b=2E3);a.D=setTimeout(function(){us(a,!0)},b);a.L=c+b}}else a.D&&(clearTimeout(a.D),a.D=null)}
function us(a,b){b&&(a.D=null);var c=a.G[0];if(c){for(var d=c.Ek,e=c.Fk,c=c.sector,f=0,g=[],h=c-1;h<a.A[d][e].length;h++){var k=a.A[d][e][h];if(!k.Da)break;var m=a.G.indexOf(k);a.G.splice(m,1);a.J.splice(m,1);g=g.concat(Hs(k));k.Da=!1;f++}a=Es(a,d,e,c,f,g,b);return b||a}return!1}l.info=function(){return this.A.length?[this.A.length,this.A[0].length,this.A[0][0].length,this.A[0][0][0].length]:[0,0,0,0]};
l.seek=function(a,b,c,d,e){var f=null,g=this.B,h=this.A[a];if(h){var k=h[b];if(!k&&g.kg&&b<g.Xa){k=h[b]=Array(g.ud);for(h=0;h<k.length;h++)k[h]=xs(null,a,b,h+1,g.ub,0);this.Xa<=b&&(this.Xa=b+1)}if(k){for(h=0;h<k.length;h++)if(k[h]&&k[h].sector==c){f=k[h];if(null===f.pattern)if(d)f.pattern=0;else{for(d=1;++h<k.length;)null===k[h].pattern&&d++;Ds(this,a,b,c,d,!!e,function(a,b){a&&(f=null);e&&e(f,b)});return e?null:f}break}!f&&g.kg&&9==g.$a&&(f=k[h]=xs(null,a,b,g.$a,g.ub,0),this.Ua<g.$a&&(this.Ua=g.$a))}}e&&
e(f,!1);return f};function As(a,b,c){for(var d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}function Hs(a){var b=a.length,c=Array(b),d=0,b=b>>2,e=a.data;a=a.pattern;for(var f=0;f<b;f++){var g=f<e.length?e[f]:a;c[d++]=g&255;c[d++]=g>>8&255;c[d++]=g>>16&255;c[d++]=g>>24&255}return c}l.read=function(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c};
l.write=function(a,b,c){if(this.re)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.yc?f<a.Mc?(a.yc+=a.Mc-f,a.Mc=f):f>=a.Mc+a.yc&&(a.yc+=f-(a.Mc+a.yc)+1):(a.Mc=f,a.yc=1);d[f]=d[f]&~(255<<b)|c<<b;this.C&&Fs(this,a,!0)}return!0}return null};function Is(a){for(var b="",c=0,d;d=Bs(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(Cs(a,d,e));return btoa(b)}
l.save=function(){var a=0,b=[];b[a++]=[this.F,this.I,this.hb,this.Xa,this.Ua,this.lb];if(!this.C&&!this.re)for(var c=this.A,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.yc){for(var h=[],k=0,m=g.Mc,r=g.Mc+g.yc;m<r;)h[k++]=g.data[m++];b[a++]=[d,e,f,g.Mc,h]}}return b};
l.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.A.length&&6<=e.length?rs(this,"local",e[2],e[3],e[4],e[5]):null!=e[0]&&null!=e[1]&&null!=this.I&&e[1]!=this.I&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.I+")",b=-2));for(this.A.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],k=g[f++],m=g[f++];if(h>=this.A.length||k>=this.A[h].length||m>=this.A[h][k].length){c="sector (CHS="+h+":"+k+":"+m+") out of range ("+
l.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.A.length&&6<=e.length?ts(this,"local",e[2],e[3],e[4],e[5]):null!=e[0]&&null!=e[1]&&null!=this.I&&e[1]!=this.I&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.I+")",b=-2));for(this.A.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],k=g[f++],m=g[f++];if(h>=this.A.length||k>=this.A[h].length||m>=this.A[h][k].length){c="sector (CHS="+h+":"+k+":"+m+") out of range ("+
b+" changes applied)";b=-1;break}if(this.re){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.A[h][k][m]){for(k=h.data.length;k<e;)h.data[k++]=h.pattern;k=0;h.Mc=e;for(h.yc=f.length;e<g;)h.data[e++]=f[k++];b++}}}0>b&&-2!=b&&this.wa("Unable to restore disk '"+this.Qc+": "+c);return b};
l.toJSON=function(){var a;a=0;for(var b;b=zs(this,a++);)Hs(b);a=JSON.stringify(this.A,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
function Hs(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}var qs=0;function Is(a){u.call(this,"FDC",a);this.dmaRead=Is.prototype.dk;this.dmaWrite=Is.prototype.ek;this.dmaFormat=Is.prototype.uk;this.M=Js(a.autoMount);this.K=a.sortBy||"name";"none"==this.K&&(this.K=null);this.B=[];this.L=!Ma("Mobi")&&window&&"FileReader"in window;this.exports={loadDisk:this.Ei}}ba(Is,u);l=Is.prototype;
l.toJSON=function(){var a;a=0;for(var b;b=Bs(this,a++);)Js(b);a=JSON.stringify(this.A,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
function Js(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}var ss=0;function Ks(a){u.call(this,"FDC",a);this.dmaRead=Ks.prototype.dk;this.dmaWrite=Ks.prototype.ek;this.dmaFormat=Ks.prototype.uk;this.M=Ls(a.autoMount);this.K=a.sortBy||"name";"none"==this.K&&(this.K=null);this.B=[];this.L=!Ma("Mobi")&&window&&"FileReader"in window;this.exports={loadDisk:this.Ei}}ba(Ks,u);l=Ks.prototype;
l.yb=function(a,b,c){var d=this;switch(b){case "listDisks":this.ja[b]=c;if(this.K){b=[];for(a=0;a<c.options.length;a++)b.push(c.options[a]);b.sort(function(a,b){return"path"!=d.K?a.text.localeCompare(b.text):a.value.localeCompare(b.value)});for(a=0;a<b.length;a++)try{c.options[a]=b[a]}catch(e){break}}c.onchange=function(){var a=d.ja.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("FDC option error: "+h.message)}b=g.desc;void 0===
b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.ja[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&Ks(d,a)},!0;case "loadDisk":return this.ja[b]=c,c.onclick=function(){d.Ei()},!0;case "saveDisk":if(!this.L){c.parentNode.removeChild(c);break}this.ja[b]=c;c.onclick=function(){var a=d.ja.listDrives;a&&a.options&&d.A&&((a=d.A[ma(a.value,10)||0])?(a=a.sa)?(a=Pa(Gs(a),"octet-stream",!0,a.rh.replace(".json",
".img")),q(a)):d.wa("No diskette loaded in drive."):d.wa("No diskette drive selected."))};return!0;case "mountDisk":if(this.L)return this.ja[b]=c,c.onchange=function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length},c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Ls(d,oa(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
l.ic=function(a,b,c,d){this.na=b;this.S=c;this.Ea=d;this.oa=a;this.V=Cb(a,"ChipSet");Js(Tc(this.oa,"autoMount"),this.M);Ms(this);rc(b,this,Ns);tc(b,this,Os);Ps(this,"None","",!0);this.L&&Ps(this,"Local Disk","?");Ps(this,"Remote Disk","??");Qs(this)||tb(this)};function Js(a,b){if(a){if("string"==typeof a)try{a=eval("("+a+")")}catch(d){q("FDC auto-mount error: "+d.message+" ("+a+")"),a={}}}else a={};for(var c in a)b&&(b[c]=a[c]);return a}
l.Pb=function(a,b){if(!b){if(!a){if(this.reset(),this.oa.V){this.B=[];for(a=0;a<this.A.length;a++)Rs(this,a,!0);Qs(this,!0)}}else if(!this.restore(a))return!1;if(a=this.ja.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.N;b++){var c=document.createElement("option");c.value=b;c.text=String.fromCharCode(65+b)+":";a.appendChild(c)}0<this.N&&(a.value="0",Ks(this,0))}}return!0};l.Ob=function(a){return a?this.save():!0};l.reset=function(){Ms(this)};
l.save=function(){var a=new Ye(this);a.set(0,Ss(this));return a.data()};l.restore=function(a){return Ms(this,a[0])};
function Ms(a,b){var c=0,d,e=!0;b||(b=[0,0,Ts,Array(9),0,0,0,[]]);a.La=b[c++];c++;a.Z=b[c++];a.G=b[c++];a.D=b[c++];a.C=b[c++];a.I=b[c++];var f=b[c++];d=b[c++];null!=d&&(a.B=d);void 0===a.A&&(a.N=4,a.V&&(a.N=+mk(a.V,Ej,void 0)),a.A=Array(4));for(d=0;d<a.A.length;d++){var g=a.A[d];if(void 0===g){var g=a.A[d]={},h;if(a.V)a:{h=a.V;if(d<+mk(h,Ej,void 0)){if(!h.N){h=360;break a}if(d<h.N.length){h=h.N[d];break a}}h=0}else h=0;switch(h){case 160:case 180:g.Xa=1;default:g.hb=40;g.Ua=9;break;case 720:g.hb=
80;g.Ua=9;break;case 1200:g.hb=80;g.Ua=15;break;case 1440:g.hb=80,g.Ua=18}}var k=a,m=d,r=f[d],y=0;h=!0;g.La=m;g.ke=g.ne=!1;r||(r=[Us,!0,0,2,0]);"boolean"==typeof r[1]&&(r[1]=[Vs,g.hb||40,g.Xa||r[3],g.Ua||9,g.lb||512,r[1],g.Of,g.Se,g.Te]);g.ib=r[y++];var t=r[y++];g.name=t[0];g.hb=t[1];g.Xa=t[2];g.Ua=t[3];g.lb=t[4];g.oe=t[5];(g.Of=t[6])?(g.Se=t[7],g.Te=t[8]):(g.Of=g.hb,g.Se=g.Xa,g.Te=g.Ua);g.Ta=r[y++];g.td=r[y++];g.wb=r[y++];g.td=100<=g.td?g.td-100:g.td-g.wb;g.$a=r[y++];g.ud=r[y++];g.ub=r[y++];g.Oa=
r[y++];g.Ra=null;g.sa||(g.Vd="");var z=r[y++];102==z&&(z=!1);"boolean"==typeof z?(t=r[y++],r=r[y],z?(y=k.A[m],Rs(k,m,!0,!0),y.ne=!0,m=new ps(k,y,"preload"),k.ni(y,m,t,r,!0)):Ws(k,m,t,r,!0)?g.sa&&r&&Xs(k,t,r,g.sa):tb(k,!1)):void 0!==z&&g.sa&&0>g.sa.restore(z)&&(h=!1);h&&g.sa&&void 0!==g.Oa&&(g.Ra=g.sa.seek(g.wb,g.Ta,g.$a));h||(e=!1)}a.H=b[c++]||0;a.F=b[c]||Ys;return e}
function Ss(a){var b=0,c=[];c[b++]=a.La;c[b++]=0;c[b++]=a.Z;c[b++]=a.G;c[b++]=a.D;c[b++]=a.C;c[b++]=a.I;for(var d=b++,e=0,f=[],g=0;g<a.A.length;g++){var h=e++,k=a.A[g],m=0,r=[];r[m++]=k.ib;r[m++]=[k.name,k.hb,k.Xa,k.Ua,k.lb,k.oe,k.Of,k.Se,k.Te];r[m++]=k.Ta;r[m++]=k.td+100;r[m++]=k.wb;r[m++]=k.$a;r[m++]=k.ud;r[m++]=k.ub;r[m++]=k.Oa;r[m++]=k.ne;r[m++]=k.Vj;r[m]=k.Vd;f[h]=r}c[d]=f;d=b++;for(e=0;e<a.A.length;e++)f=a.A[e],f.sa&&Zs(a,f.Vd,f.sa);c[d]=a.B;c[b++]=a.H;c[b]=a.F;return c}
function Qs(a,b){b||(a.J=0);for(var c in a.M){var d=a.M[c],e;if(!(e=d.path))a:{if(e=d.name){var f=a.ja.listDisks;if(f&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.text==e){e=h.value;break a}}}e=""}e&&(f=c.charCodeAt(0)-65,0<=f&&f<a.A.length?!Ws(a,f,d.name||$s(a,e)||oa(e,!0),e,!0)&&b&&tb(a,!1):a.wa("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")"))}return!!a.J}
l.Ei=function(){var a=this.ja.listDisks;return a?Ls(this,a.options[a.selectedIndex].text,a.value):!1};
function Ls(a,b,c,d){var e,f=a.ja.listDrives;if(f&&!isNaN(e=ma(f.value,10))&&0<=e&&e<a.A.length){if(!c)return Rs(a,e),!0;if("?"==c)return a.wa('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return!1;b=oa(c)}for(;0>Ws(a,e,b,c,!1,d);){if(!window.confirm("Click OK to reload the original disk and discard any changes."))return!1;var f=a,g=c,h;for(h=0;h<f.B.length;h++)if(f.B[h][1]==g){f.B.splice(h,1);
break}Rs(a,e,!1,!0)}return!0}a.wa("Unable to load the selected drive");return!1}function Ws(a,b,c,d,e,f){var g=a.A[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.Vd.toLowerCase()!=d.toLowerCase())){Rs(a,b,e,!0);if(g.ke)return a.wa("Drive "+b+" busy"),0;g.ke=!0;e&&(g.Jd=!0,a.J++);g.ne=!!f;return(new ps(a,g,"preload")).load(c,d,f,a.ni)?1:0}return-1}
l.ni=function(a,b,c,d,e){var f;a.ke=!1;b&&(f=b.info(),b&&f[0]>a.hb||f[1]>a.Xa)&&(this.wa('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.La)),b=null);b?(a.sa=b,a.Vj=c,a.Vd=d,$s(this,d)||Ps(this,c,d),Xs(this,c,d,b),f=b.info(),this.H|=at,this.wa('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.La),a.Jd||e),a.Of=f[0],a.Se=f[1],a.Te=f[2],this.oa&&gd(this.oa)):a.ne=!1;a.Jd&&(a.Jd=!1,--this.J||tb(this));Ks(this,a.La)};
function Ps(a,b,c,d){if((a=a.ja.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function $s(a,b){if((a=a.ja.listDisks)&&a.options)for(var c=0;c<a.options.length;c++){var d=a.options[c];if(d.value==b)return d.text}return null}
function Ks(a,b){if(0<=b&&b<a.A.length){var c=a.A[b],d=a.ja.listDisks;a=a.ja.listDrives;if(d&&a&&d.options&&a.options&&(a=ma(a.value,10),c=c.ne?"?":c.Vd,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function Rs(a,b,c,d){var e=a.A[b];e.sa&&(Zs(a,e.Vd,e.sa),e.Vj="",e.Vd="",e.sa=null,e.ne=!1,a.H|=at,d||a.wa("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||Ks(a,b))}
function Xs(a,b,c,d){var e;for(e=0;e<a.B.length;e++)if(a.B[e][1]==c){d.restore(a.B[e][2]);return}a.B[e]=[b,c,[]]}function Zs(a,b,c){var d;for(d=0;d<a.B.length;d++)if(a.B[d][1]==b){a.B[d][2]=c.save();break}}l.Dm=function(a,b){b&bt?this.I&bt||this.I&ct&&this.V&&Qf(this.V,6):Ms(this);this.I=b};l.gl=function(){return 80};l.il=function(){return this.Z};l.fl=function(){var a=0;this.D<this.C&&(a=this.G[this.D]);this.I&ct&&this.V&&Of(this.V,6);++this.D>=this.C&&(this.Z&=~(dt|et),this.D=this.C=0);return a};
l.Cm=function(a,b){this.C<this.G.length&&(this.G[this.C++]=b);a=this.G[0]&ft;if(void 0!==gt[a]&&this.C>=gt[a].gd){b=!1;this.D=0;a=ht(this);var c,d,e,f,g,h=a&ft;switch(h){case it:ht(this);ht(this);jt(this);break;case kt:d=ht(this);this.La=d&3;c=this.A[this.La];jt(this);lt(this,(c.ib&mt)>>>24);break;case nt:case ot:d=ht(this);b=d>>2&1;this.La=d&3;c=this.A[this.La];c.Ta=b;d=c.wb=ht(this);e=ht(this);f=c.$a=ht(this);g=ht(this);c.ub=128<<g;c.ud=ht(this);ht(this);ht(this);h==ot?(h=c,h.ib=pt|qt,h.sa&&(h.Ra=
null,h.ib=rt,this.V&&(Fl(this.V,2,this,"dmaRead",h),Bl(this.V,2)))):(h=c,h.ib=pt|qt,h.sa&&(h.sa.re?h.ib=st|qt:(h.Ra=null,h.ib=rt,this.V&&(Fl(this.V,2,this,"dmaWrite",h),Bl(this.V,2)))));tt(this,c,a,b,d,e,f,g);b=!0;break;case ut:d=ht(this);this.La=d&3;c=this.A[this.La];c.wb=c.td=0;c.ib=vt|wt;jt(this);b=!0;break;case xt:c=this.A[this.La];c.Ta=0;jt(this);lt(this,c.La|c.Ta<<2|c.ib&yt);lt(this,c.wb);this.La=this.La+1&3;break;case zt:d=ht(this);b=d>>2&1;this.La=d&3;c=this.A[this.La];d=c.wb;e=c.Ta=b;f=c.$a=
1;g=0;c.ib=rt;c.sa&&(c.Ra=c.sa.seek(c.wb,c.Ta,c.$a))?g=c.Ra.length>>8:c.ib=pt|qt;tt(this,c,a,b,d,e,f,g);b=!0;break;case At:d=ht(this);b=d>>2&1;this.La=d&3;c=this.A[this.La];d=c.wb;e=c.Ta=b;f=1;g=ht(this);c.ub=128<<g;c.ud=ht(this);ht(this);c.ci=ht(this);h=c;h.ib=pt|qt;h.sa&&(h.Ra=null,h.ib=rt,this.V&&(h.ie=0,h.Gc=Array(4),h.kg=!0,h.Af=0,Fl(this.V,2,this,"dmaFormat",h),Bl(this.V,2),h.kg=!1));tt(this,c,a,b,d,e,f,g);b=!0;break;case Bt:d=ht(this),this.La=d&3,c=this.A[this.La],c.Ta=d>>2&1,d=ht(this),c.wb+=
d-c.td,0>c.wb&&(c.wb=0),c.wb>=c.hb&&(c.wb=c.hb-1),c.td=d,c.ib=vt,c.wb||(c.ib|=wt),jt(this),b=!0}0<this.C&&(this.Z=this.Z|dt|et);this.I&ct&&(!c||c.ib&pt||!b||this.V&&Qf(this.V,6))}};l.hl=function(){var a=this.H;this.H&=~at;return a};l.Bm=function(a,b){this.F=b};function tt(a,b,c,d,e,f,g,h){jt(a);lt(a,b.La|b.Ta<<2|b.ib&yt);lt(a,(b.ib&Ct)>>>8);lt(a,(b.ib&Dt)>>>16);var k=0;if(e!=b.wb||f!=b.Ta)k=g=1;c&Et&&(f^=k,d||(k=0));lt(a,e+k);lt(a,f);lt(a,g);lt(a,h)}function ht(a){var b=a.G[a.D];a.D++;return b}
function jt(a){a.D=a.C=0}function lt(a,b){a.G[a.C++]=b}l.dk=function(a,b,c){void 0===b||0>b?this.xe(a,c):c(-1,!1)};l.ek=function(a,b){return void 0!==b&&0<=b?Ft(a,b):-1};l.uk=function(a,b){if(void 0!==b&&0<=b)a:if(a.ib)a=-1;else{a.Gc[a.ie++]=b;if(a.ie==a.Gc.length){a.wb=a.Gc[0];a.Ta=a.Gc[1];a.$a=a.Gc[2];a.ub=128<<a.Gc[3];for(var c=a.ie=0;c<a.ub;c++)if(0>Ft(a,a.ci)){a=-1;break a}a.Af++}a.Af>=a.ud&&(b=-1);a=b}else a=-1;return a};
l.xe=function(a,b){var c=-1,d=null,e=0;if(!a.ib&&a.sa){do{if(a.Ra&&(e=a.Oa,0<=(c=a.sa.read(a.Ra,a.Oa++)))){d=a.Ra;break}a.Ra=a.sa.seek(a.wb,a.Ta,a.$a);if(!a.Ra){a.ib=Gt|qt;break}a.Oa=0;Ht(a)}while(1)}b(c,!1,d,e)};function Ft(a,b){if(a.ib||!a.sa)return-1;do{if(a.Ra&&a.sa.write(a.Ra,a.Oa++,b))break;a.Ra=a.sa.seek(a.wb,a.Ta,a.$a);if(!a.Ra){a.ib=It|qt;b=-1;break}a.Oa=0;Ht(a)}while(1);return b}function Ht(a){a.$a++;a.$a>=a.Te+1&&(a.$a=1,a.Ta++,a.Ta>=a.Se&&(a.Ta=0,a.wb++))}
var Vs="Floppy Drive",bt=4,ct=8,et=16,dt=64,Ts=128,it=3,kt=4,nt=5,ot=6,ut=7,xt=8,zt=10,At=13,Bt=15,ft=31,Et=128,rt=0,pt=8,vt=32,qt=64,Us=192,yt=255,st=512,Gt=1024,It=8192,Ct=65280,Dt=16711680,wt=268435456,mt=-16777216,at=128,Ys=0;aa={};
var gt={3:{gd:3,vd:0,name:aa.Go},4:{gd:2,vd:1,name:aa.Eo},5:{gd:9,vd:7,name:aa.Lo},6:{gd:9,vd:7,name:aa.Ao},7:{gd:2,vd:0,name:aa.Co},8:{gd:1,vd:2,name:aa.Fo},10:{gd:2,vd:7,name:aa.Bo},13:{gd:6,vd:7,name:aa.wo},15:{gd:3,vd:0,name:aa.Do}},Ns={1009:Is.prototype.gl,1012:Is.prototype.il,1013:Is.prototype.fl,1015:Is.prototype.hl},Os={1010:Is.prototype.Dm,1013:Is.prototype.Cm,1015:Is.prototype.Bm};
Ra(function(){for(var a=hb(document,"pcx86","fdc"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new Is(d);gb(d,c)}});function Y(a){u.call(this,"HDC",a);this.dmaRead=Y.prototype.fk;this.dmaWrite=Y.prototype.gk;this.dmaWriteBuffer=Y.prototype.vk;this.dmaWriteFormat=Y.prototype.wk;this.X=[];this.ia=a.drives;this.L="at"==a.type;this.ua=!Ma("Mobi")&&window&&"FileReader"in window}ba(Y,u);l=Y.prototype;
l.yb=function(a,b,c){var d=this;switch(b){case "saveHD0":case "saveHD1":if(this.ua)return this.ja[b]=c,c.onclick=function(a){return function(){var b=d.A&&d.A[a];if(b&&b.sa){var b=b.sa,c=b.rh||b.Qc,e=c.lastIndexOf(".");0<=e&&(c=c.substr(0,e));c+=".img";b=Pa(Gs(b),"octet-stream",!0,c);q(b)}else d.wa("Hard drive "+a+" is not available.")}}(+b.slice(-1)),!0;c.parentNode.removeChild(c)}return!1};
l.ic=function(a,b,c,d){this.na=b;this.S=c;this.Ea=d;this.oa=a;if(d=Tc(a,"drives"))this.X=d;else if(this.ia)try{this.X=eval("("+this.ia+")")}catch(e){q("HDC drive configuration error: "+e.message+" ("+this.ia+")")}this.V=Cb(a,"ChipSet");this.F=0;this.ka=3;rc(b,this,this.L?Jt:Kt);tc(b,this,this.L?Lt:Mt);this.L&&(this.F++,this.V&&this.V.ca==Vj&&this.F++,this.ka=2,b.M[Nt]=2,b.N[Nt]=2);Ue(c,19,this.Ll.bind(this));Ue(c,64,this.Ml.bind(this));this.reset();Ot(this)||tb(this)};
l.Pb=function(a,b){if(!b)if(!a)Pt(this),this.oa.V&&Ot(this,!0);else if(!this.restore(a))return!1;return!0};l.Ob=function(a){return a?this.save():!0};function ts(a){return a.oa?a.oa.qa:""}function us(a){return a.oa?a.oa.B||"":""}l.reset=function(){Pt(this,null,!0)};l.save=function(){var a=new Ye(this);a.set(0,Qt(this));return a.data()};l.restore=function(a){return Pt(this,a[0])};
function Pt(a,b,c){var d=0,e=!0;a.La=-1;if(a.L){if(b||(b=[0,0,0,0,0,0,0,Rt,0,[0,-1]]),a.H=b[d++],a.ta=b[d++],a.I=b[d++],a.da=b[d++],a.ba=b[d++],a.aa=b[d++],a.N=b[d++],a.Z=b[d++],a.fa=b[d++],a.K=b[d++],"object"==typeof a.K){var f=a.K;a.K=f[0];a.La=f[1]}}else b||(b=[0,St,Array(14),0,0]),a.W=b[d++],a.Z=b[d++],a.G=b[d++],a.D=b[d++],a.C=b[d++],a.qa=b[d++],a.pa=b[d++],a.ma=b[d++],f=b[d++],void 0!==f?a.M=f:void 0===a.M&&(a.M=-1);void 0===a.A&&(a.A=Array(a.X.length));b=b[d];void 0===b&&(b=[]);for(d=0;d<a.A.length;d++){void 0===
a.A[d]&&(a.A[d]={});var f=a.A[d],g=a,h=d,k=f,m=a.X[d],r=b[d],y=c,t=0,z=!0;r||(r=[Tt,0,!1,Array(8)]);k.La=h;k.errorCode=r[t++];k.Wj=r[t++];k.oe=r[t++];k.de=r[t++];k.ee=r[t++];k.Ta=r[t++];k.Xa=r[t++];k.Cd=r[t++];k.$a=r[t++];k.ud=r[t++];k.ub=r[t++];k.yf=g.L?0:1;k.name=m.name;void 0===k.name&&(k.name=Ut);k.path=m.path;k.mode=m.mode||(k.path?"preload":"local");"demandro"!=k.mode&&"demandrw"!=k.mode||us(g)||(k.mode="local");k.type=m.type;if(void 0===k.type||void 0===Vt[g.F][k.type])k.type=g.ka;m=Vt[g.F][k.type];
k.Ua=m[2]||17;k.lb=m[3]||512;if(y&&g.V){var m=g.V,E=k.type;if(m.A){var y=null,X=m.A[18];15<E&&(y=E,E=15);h?(X=X&240|E,E=26):(X=X&15|E<<4,E=25);var O=m;O.A&&(O.A[18]=X,Fk(O));null!=y&&m.A&&(m.A[E]=y,Fk(m))}}void 0===k.sa&&(k.sa=null,g.wa("Type "+k.type+' "'+k.name+'" is fixed disk '+h,!0));Wt(g,k);k.Oa=r[t++];k.Ra=null;k.sa&&(g=r[t],void 0!==g&&0>k.sa.restore(g)&&(z=!1),z&&void 0!==k.Oa&&(k.Ra=k.sa.seek(k.Cd,k.Ta,k.$a+k.yf)));z||(e=!1);null!=a.W&&1>=d&&(a.W|=(f.type&3)<<(1-d<<1))}0<=a.La&&(a.B=a.A[a.La]);
b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.ja[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&Ms(d,a)},!0;case "loadDisk":return this.ja[b]=c,c.onclick=function(){d.Ei()},!0;case "saveDisk":if(!this.L){c.parentNode.removeChild(c);break}this.ja[b]=c;c.onclick=function(){var a=d.ja.listDrives;a&&a.options&&d.A&&((a=d.A[ma(a.value,10)||0])?(a=a.sa)?(a=Pa(Is(a),"octet-stream",!0,a.rh.replace(".json",
".img")),q(a)):d.wa("No diskette loaded in drive."):d.wa("No diskette drive selected."))};return!0;case "mountDisk":if(this.L)return this.ja[b]=c,c.onchange=function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length},c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Ns(d,oa(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};
l.ic=function(a,b,c,d){this.na=b;this.S=c;this.Ea=d;this.pa=a;this.V=Cb(a,"ChipSet");Ls(Tc(this.pa,"autoMount"),this.M);Os(this);rc(b,this,Ps);tc(b,this,Qs);Rs(this,"None","",!0);this.L&&Rs(this,"Local Disk","?");Rs(this,"Remote Disk","??");Ss(this)||tb(this)};function Ls(a,b){if(a){if("string"==typeof a)try{a=eval("("+a+")")}catch(d){q("FDC auto-mount error: "+d.message+" ("+a+")"),a={}}}else a={};for(var c in a)b&&(b[c]=a[c]);return a}
l.Pb=function(a,b){if(!b){if(!a){if(this.reset(),this.pa.V){this.B=[];for(a=0;a<this.A.length;a++)Ts(this,a,!0);Ss(this,!0)}}else if(!this.restore(a))return!1;if(a=this.ja.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.N;b++){var c=document.createElement("option");c.value=b;c.text=String.fromCharCode(65+b)+":";a.appendChild(c)}0<this.N&&(a.value="0",Ms(this,0))}}return!0};l.Ob=function(a){return a?this.save():!0};l.reset=function(){Os(this)};
l.save=function(){var a=new Ye(this);a.set(0,Us(this));return a.data()};l.restore=function(a){return Os(this,a[0])};
function Os(a,b){var c=0,d,e=!0;b||(b=[0,0,Vs,Array(9),0,0,0,[]]);a.La=b[c++];c++;a.Z=b[c++];a.G=b[c++];a.D=b[c++];a.C=b[c++];a.I=b[c++];var f=b[c++];d=b[c++];null!=d&&(a.B=d);void 0===a.A&&(a.N=4,a.V&&(a.N=+mk(a.V,Ej,void 0)),a.A=Array(4));for(d=0;d<a.A.length;d++){var g=a.A[d];if(void 0===g){var g=a.A[d]={},h;if(a.V)a:{h=a.V;if(d<+mk(h,Ej,void 0)){if(!h.N){h=360;break a}if(d<h.N.length){h=h.N[d];break a}}h=0}else h=0;switch(h){case 160:case 180:g.Xa=1;default:g.hb=40;g.Ua=9;break;case 720:g.hb=
80;g.Ua=9;break;case 1200:g.hb=80;g.Ua=15;break;case 1440:g.hb=80,g.Ua=18}}var k=a,m=d,r=f[d],y=0;h=!0;g.La=m;g.ke=g.ne=!1;r||(r=[Ws,!0,0,2,0]);"boolean"==typeof r[1]&&(r[1]=[Xs,g.hb||40,g.Xa||r[3],g.Ua||9,g.lb||512,r[1],g.Of,g.Se,g.Te]);g.ib=r[y++];var t=r[y++];g.name=t[0];g.hb=t[1];g.Xa=t[2];g.Ua=t[3];g.lb=t[4];g.oe=t[5];(g.Of=t[6])?(g.Se=t[7],g.Te=t[8]):(g.Of=g.hb,g.Se=g.Xa,g.Te=g.Ua);g.Ta=r[y++];g.td=r[y++];g.wb=r[y++];g.td=100<=g.td?g.td-100:g.td-g.wb;g.$a=r[y++];g.ud=r[y++];g.ub=r[y++];g.Oa=
r[y++];g.Ra=null;g.sa||(g.Vd="");var z=r[y++];102==z&&(z=!1);"boolean"==typeof z?(t=r[y++],r=r[y],z?(y=k.A[m],Ts(k,m,!0,!0),y.ne=!0,m=new rs(k,y,"preload"),k.ni(y,m,t,r,!0)):Ys(k,m,t,r,!0)?g.sa&&r&&Zs(k,t,r,g.sa):tb(k,!1)):void 0!==z&&g.sa&&0>g.sa.restore(z)&&(h=!1);h&&g.sa&&void 0!==g.Oa&&(g.Ra=g.sa.seek(g.wb,g.Ta,g.$a));h||(e=!1)}a.H=b[c++]||0;a.F=b[c]||$s;return e}
function Us(a){var b=0,c=[];c[b++]=a.La;c[b++]=0;c[b++]=a.Z;c[b++]=a.G;c[b++]=a.D;c[b++]=a.C;c[b++]=a.I;for(var d=b++,e=0,f=[],g=0;g<a.A.length;g++){var h=e++,k=a.A[g],m=0,r=[];r[m++]=k.ib;r[m++]=[k.name,k.hb,k.Xa,k.Ua,k.lb,k.oe,k.Of,k.Se,k.Te];r[m++]=k.Ta;r[m++]=k.td+100;r[m++]=k.wb;r[m++]=k.$a;r[m++]=k.ud;r[m++]=k.ub;r[m++]=k.Oa;r[m++]=k.ne;r[m++]=k.Vj;r[m]=k.Vd;f[h]=r}c[d]=f;d=b++;for(e=0;e<a.A.length;e++)f=a.A[e],f.sa&&at(a,f.Vd,f.sa);c[d]=a.B;c[b++]=a.H;c[b]=a.F;return c}
function Ss(a,b){b||(a.J=0);for(var c in a.M){var d=a.M[c],e;if(!(e=d.path))a:{if(e=d.name){var f=a.ja.listDisks;if(f&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.text==e){e=h.value;break a}}}e=""}e&&(f=c.charCodeAt(0)-65,0<=f&&f<a.A.length?!Ys(a,f,d.name||bt(a,e)||oa(e,!0),e,!0)&&b&&tb(a,!1):a.wa("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")"))}return!!a.J}
l.Ei=function(){var a=this.ja.listDisks;return a?Ns(this,a.options[a.selectedIndex].text,a.value):!1};
function Ns(a,b,c,d){var e,f=a.ja.listDrives;if(f&&!isNaN(e=ma(f.value,10))&&0<=e&&e<a.A.length){if(!c)return Ts(a,e),!0;if("?"==c)return a.wa('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return!1;b=oa(c)}for(;0>Ys(a,e,b,c,!1,d);){if(!window.confirm("Click OK to reload the original disk and discard any changes."))return!1;var f=a,g=c,h;for(h=0;h<f.B.length;h++)if(f.B[h][1]==g){f.B.splice(h,1);
break}Ts(a,e,!1,!0)}return!0}a.wa("Unable to load the selected drive");return!1}function Ys(a,b,c,d,e,f){var g=a.A[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.Vd.toLowerCase()!=d.toLowerCase())){Ts(a,b,e,!0);if(g.ke)return a.wa("Drive "+b+" busy"),0;g.ke=!0;e&&(g.Jd=!0,a.J++);g.ne=!!f;return(new rs(a,g,"preload")).load(c,d,f,a.ni)?1:0}return-1}
l.ni=function(a,b,c,d,e){var f;a.ke=!1;b&&(f=b.info(),b&&f[0]>a.hb||f[1]>a.Xa)&&(this.wa('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.La)),b=null);b?(a.sa=b,a.Vj=c,a.Vd=d,bt(this,d)||Rs(this,c,d),Zs(this,c,d,b),f=b.info(),this.H|=ct,this.wa('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.La),a.Jd||e),a.Of=f[0],a.Se=f[1],a.Te=f[2],this.pa&&gd(this.pa)):a.ne=!1;a.Jd&&(a.Jd=!1,--this.J||tb(this));Ms(this,a.La)};
function Rs(a,b,c,d){if((a=a.ja.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function bt(a,b){if((a=a.ja.listDisks)&&a.options)for(var c=0;c<a.options.length;c++){var d=a.options[c];if(d.value==b)return d.text}return null}
function Ms(a,b){if(0<=b&&b<a.A.length){var c=a.A[b],d=a.ja.listDisks;a=a.ja.listDrives;if(d&&a&&d.options&&a.options&&(a=ma(a.value,10),c=c.ne?"?":c.Vd,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}function Ts(a,b,c,d){var e=a.A[b];e.sa&&(at(a,e.Vd,e.sa),e.Vj="",e.Vd="",e.sa=null,e.ne=!1,a.H|=ct,d||a.wa("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||Ms(a,b))}
function Zs(a,b,c,d){var e;for(e=0;e<a.B.length;e++)if(a.B[e][1]==c){d.restore(a.B[e][2]);return}a.B[e]=[b,c,[]]}function at(a,b,c){var d;for(d=0;d<a.B.length;d++)if(a.B[d][1]==b){a.B[d][2]=c.save();break}}l.Dm=function(a,b){b&dt?this.I&dt||this.I&et&&this.V&&Qf(this.V,6):Os(this);this.I=b};l.gl=function(){return 80};l.il=function(){return this.Z};l.fl=function(){var a=0;this.D<this.C&&(a=this.G[this.D]);this.I&et&&this.V&&Of(this.V,6);++this.D>=this.C&&(this.Z&=~(ft|gt),this.D=this.C=0);return a};
l.Cm=function(a,b){this.C<this.G.length&&(this.G[this.C++]=b);a=this.G[0]&ht;if(void 0!==it[a]&&this.C>=it[a].gd){b=!1;this.D=0;a=jt(this);var c,d,e,f,g,h=a&ht;switch(h){case kt:jt(this);jt(this);lt(this);break;case mt:d=jt(this);this.La=d&3;c=this.A[this.La];lt(this);nt(this,(c.ib&ot)>>>24);break;case pt:case qt:d=jt(this);b=d>>2&1;this.La=d&3;c=this.A[this.La];c.Ta=b;d=c.wb=jt(this);e=jt(this);f=c.$a=jt(this);g=jt(this);c.ub=128<<g;c.ud=jt(this);jt(this);jt(this);h==qt?(h=c,h.ib=rt|st,h.sa&&(h.Ra=
null,h.ib=tt,this.V&&(Fl(this.V,2,this,"dmaRead",h),Bl(this.V,2)))):(h=c,h.ib=rt|st,h.sa&&(h.sa.re?h.ib=ut|st:(h.Ra=null,h.ib=tt,this.V&&(Fl(this.V,2,this,"dmaWrite",h),Bl(this.V,2)))));vt(this,c,a,b,d,e,f,g);b=!0;break;case wt:d=jt(this);this.La=d&3;c=this.A[this.La];c.wb=c.td=0;c.ib=xt|yt;lt(this);b=!0;break;case zt:c=this.A[this.La];c.Ta=0;lt(this);nt(this,c.La|c.Ta<<2|c.ib&At);nt(this,c.wb);this.La=this.La+1&3;break;case Bt:d=jt(this);b=d>>2&1;this.La=d&3;c=this.A[this.La];d=c.wb;e=c.Ta=b;f=c.$a=
1;g=0;c.ib=tt;c.sa&&(c.Ra=c.sa.seek(c.wb,c.Ta,c.$a))?g=c.Ra.length>>8:c.ib=rt|st;vt(this,c,a,b,d,e,f,g);b=!0;break;case Ct:d=jt(this);b=d>>2&1;this.La=d&3;c=this.A[this.La];d=c.wb;e=c.Ta=b;f=1;g=jt(this);c.ub=128<<g;c.ud=jt(this);jt(this);c.ci=jt(this);h=c;h.ib=rt|st;h.sa&&(h.Ra=null,h.ib=tt,this.V&&(h.ie=0,h.Gc=Array(4),h.kg=!0,h.Af=0,Fl(this.V,2,this,"dmaFormat",h),Bl(this.V,2),h.kg=!1));vt(this,c,a,b,d,e,f,g);b=!0;break;case Dt:d=jt(this),this.La=d&3,c=this.A[this.La],c.Ta=d>>2&1,d=jt(this),c.wb+=
d-c.td,0>c.wb&&(c.wb=0),c.wb>=c.hb&&(c.wb=c.hb-1),c.td=d,c.ib=xt,c.wb||(c.ib|=yt),lt(this),b=!0}0<this.C&&(this.Z=this.Z|ft|gt);this.I&et&&(!c||c.ib&rt||!b||this.V&&Qf(this.V,6))}};l.hl=function(){var a=this.H;this.H&=~ct;return a};l.Bm=function(a,b){this.F=b};function vt(a,b,c,d,e,f,g,h){lt(a);nt(a,b.La|b.Ta<<2|b.ib&At);nt(a,(b.ib&Et)>>>8);nt(a,(b.ib&Ft)>>>16);var k=0;if(e!=b.wb||f!=b.Ta)k=g=1;c&Gt&&(f^=k,d||(k=0));nt(a,e+k);nt(a,f);nt(a,g);nt(a,h)}function jt(a){var b=a.G[a.D];a.D++;return b}
function lt(a){a.D=a.C=0}function nt(a,b){a.G[a.C++]=b}l.dk=function(a,b,c){void 0===b||0>b?this.xe(a,c):c(-1,!1)};l.ek=function(a,b){return void 0!==b&&0<=b?Ht(a,b):-1};l.uk=function(a,b){if(void 0!==b&&0<=b)a:if(a.ib)a=-1;else{a.Gc[a.ie++]=b;if(a.ie==a.Gc.length){a.wb=a.Gc[0];a.Ta=a.Gc[1];a.$a=a.Gc[2];a.ub=128<<a.Gc[3];for(var c=a.ie=0;c<a.ub;c++)if(0>Ht(a,a.ci)){a=-1;break a}a.Af++}a.Af>=a.ud&&(b=-1);a=b}else a=-1;return a};
l.xe=function(a,b){var c=-1,d=null,e=0;if(!a.ib&&a.sa){do{if(a.Ra&&(e=a.Oa,0<=(c=a.sa.read(a.Ra,a.Oa++)))){d=a.Ra;break}a.Ra=a.sa.seek(a.wb,a.Ta,a.$a);if(!a.Ra){a.ib=It|st;break}a.Oa=0;Jt(a)}while(1)}b(c,!1,d,e)};function Ht(a,b){if(a.ib||!a.sa)return-1;do{if(a.Ra&&a.sa.write(a.Ra,a.Oa++,b))break;a.Ra=a.sa.seek(a.wb,a.Ta,a.$a);if(!a.Ra){a.ib=Kt|st;b=-1;break}a.Oa=0;Jt(a)}while(1);return b}function Jt(a){a.$a++;a.$a>=a.Te+1&&(a.$a=1,a.Ta++,a.Ta>=a.Se&&(a.Ta=0,a.wb++))}
var Xs="Floppy Drive",dt=4,et=8,gt=16,ft=64,Vs=128,kt=3,mt=4,pt=5,qt=6,wt=7,zt=8,Bt=10,Ct=13,Dt=15,ht=31,Gt=128,tt=0,rt=8,xt=32,st=64,Ws=192,At=255,ut=512,It=1024,Kt=8192,Et=65280,Ft=16711680,yt=268435456,ot=-16777216,ct=128,$s=0;aa={};
var it={3:{gd:3,vd:0,name:aa.Go},4:{gd:2,vd:1,name:aa.Eo},5:{gd:9,vd:7,name:aa.Lo},6:{gd:9,vd:7,name:aa.Ao},7:{gd:2,vd:0,name:aa.Co},8:{gd:1,vd:2,name:aa.Fo},10:{gd:2,vd:7,name:aa.Bo},13:{gd:6,vd:7,name:aa.wo},15:{gd:3,vd:0,name:aa.Do}},Ps={1009:Ks.prototype.gl,1012:Ks.prototype.il,1013:Ks.prototype.fl,1015:Ks.prototype.hl},Qs={1010:Ks.prototype.Dm,1013:Ks.prototype.Cm,1015:Ks.prototype.Bm};
Ra(function(){for(var a=hb(document,"pcx86","fdc"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new Ks(d);gb(d,c)}});function Y(a){u.call(this,"HDC",a);this.dmaRead=Y.prototype.fk;this.dmaWrite=Y.prototype.gk;this.dmaWriteBuffer=Y.prototype.vk;this.dmaWriteFormat=Y.prototype.wk;this.X=[];this.ia=a.drives;this.L="at"==a.type;this.ua=!Ma("Mobi")&&window&&"FileReader"in window}ba(Y,u);l=Y.prototype;
l.yb=function(a,b,c){var d=this;switch(b){case "saveHD0":case "saveHD1":if(this.ua)return this.ja[b]=c,c.onclick=function(a){return function(){var b=d.A&&d.A[a];if(b&&b.sa){var b=b.sa,c=b.rh||b.Qc,e=c.lastIndexOf(".");0<=e&&(c=c.substr(0,e));c+=".img";b=Pa(Is(b),"octet-stream",!0,c);q(b)}else d.wa("Hard drive "+a+" is not available.")}}(+b.slice(-1)),!0;c.parentNode.removeChild(c)}return!1};
l.ic=function(a,b,c,d){this.na=b;this.S=c;this.Ea=d;this.pa=a;if(d=Tc(a,"drives"))this.X=d;else if(this.ia)try{this.X=eval("("+this.ia+")")}catch(e){q("HDC drive configuration error: "+e.message+" ("+this.ia+")")}this.V=Cb(a,"ChipSet");this.F=0;this.ka=3;rc(b,this,this.L?Lt:Mt);tc(b,this,this.L?Nt:Ot);this.L&&(this.F++,this.V&&this.V.ca==Vj&&this.F++,this.ka=2,b.M[Pt]=2,b.N[Pt]=2);Ue(c,19,this.Ll.bind(this));Ue(c,64,this.Ml.bind(this));this.reset();Qt(this)||tb(this)};
l.Pb=function(a,b){if(!b)if(!a)Rt(this),this.pa.V&&Qt(this,!0);else if(!this.restore(a))return!1;return!0};l.Ob=function(a){return a?this.save():!0};function vs(a){return a.pa?a.pa.qa:""}function ws(a){return a.pa?a.pa.B||"":""}l.reset=function(){Rt(this,null,!0)};l.save=function(){var a=new Ye(this);a.set(0,St(this));return a.data()};l.restore=function(a){return Rt(this,a[0])};
function Rt(a,b,c){var d=0,e=!0;a.La=-1;if(a.L){if(b||(b=[0,0,0,0,0,0,0,Tt,0,[0,-1]]),a.H=b[d++],a.ta=b[d++],a.I=b[d++],a.da=b[d++],a.ba=b[d++],a.aa=b[d++],a.N=b[d++],a.Z=b[d++],a.fa=b[d++],a.K=b[d++],"object"==typeof a.K){var f=a.K;a.K=f[0];a.La=f[1]}}else b||(b=[0,Ut,Array(14),0,0]),a.W=b[d++],a.Z=b[d++],a.G=b[d++],a.D=b[d++],a.C=b[d++],a.qa=b[d++],a.oa=b[d++],a.ma=b[d++],f=b[d++],void 0!==f?a.M=f:void 0===a.M&&(a.M=-1);void 0===a.A&&(a.A=Array(a.X.length));b=b[d];void 0===b&&(b=[]);for(d=0;d<a.A.length;d++){void 0===
a.A[d]&&(a.A[d]={});var f=a.A[d],g=a,h=d,k=f,m=a.X[d],r=b[d],y=c,t=0,z=!0;r||(r=[Vt,0,!1,Array(8)]);k.La=h;k.errorCode=r[t++];k.Wj=r[t++];k.oe=r[t++];k.de=r[t++];k.ee=r[t++];k.Ta=r[t++];k.Xa=r[t++];k.Cd=r[t++];k.$a=r[t++];k.ud=r[t++];k.ub=r[t++];k.yf=g.L?0:1;k.name=m.name;void 0===k.name&&(k.name=Wt);k.path=m.path;k.mode=m.mode||(k.path?"preload":"local");"demandro"!=k.mode&&"demandrw"!=k.mode||ws(g)||(k.mode="local");k.type=m.type;if(void 0===k.type||void 0===Xt[g.F][k.type])k.type=g.ka;m=Xt[g.F][k.type];
k.Ua=m[2]||17;k.lb=m[3]||512;if(y&&g.V){var m=g.V,E=k.type;if(m.A){var y=null,X=m.A[18];15<E&&(y=E,E=15);h?(X=X&240|E,E=26):(X=X&15|E<<4,E=25);var O=m;O.A&&(O.A[18]=X,Fk(O));null!=y&&m.A&&(m.A[E]=y,Fk(m))}}void 0===k.sa&&(k.sa=null,g.wa("Type "+k.type+' "'+k.name+'" is fixed disk '+h,!0));Yt(g,k);k.Oa=r[t++];k.Ra=null;k.sa&&(g=r[t],void 0!==g&&0>k.sa.restore(g)&&(z=!1),z&&void 0!==k.Oa&&(k.Ra=k.sa.seek(k.Cd,k.Ta,k.$a+k.yf)));z||(e=!1);null!=a.W&&1>=d&&(a.W|=(f.type&3)<<(1-d<<1))}0<=a.La&&(a.B=a.A[a.La]);
return e}
function Qt(a){var b=0,c=[];a.L?(c[b++]=a.H,c[b++]=a.ta,c[b++]=a.I,c[b++]=a.da,c[b++]=a.ba,c[b++]=a.aa,c[b++]=a.N,c[b++]=a.Z,c[b++]=a.fa,c[b++]=[a.K,a.La]):(c[b++]=a.W,c[b++]=a.Z,c[b++]=a.G,c[b++]=a.D,c[b++]=a.C,c[b++]=a.qa,c[b++]=a.pa,c[b++]=a.ma,c[b++]=a.M);for(var d=0,e=[],f=0;f<a.A.length;f++){var g=d++,h=a.A[f],k=0,m=[];m[k++]=h.errorCode;m[k++]=h.Wj;m[k++]=h.oe;m[k++]=h.de;m[k++]=h.ee;m[k++]=h.Ta;m[k++]=h.Xa;m[k++]=h.Cd;m[k++]=h.$a;m[k++]=h.ud;m[k++]=h.ub;m[k++]=h.Oa;m[k]=h.sa?h.sa.save():null;
e[g]=m}c[b]=e;return c}function Wt(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.de[2])?e=b.de[0]<<8|b.de[1]:c=b.type);null==c||d||(d=Vt[a.F][c][1],e=Vt[a.F][c][0]);d&&((c=Vt[a.F][b.type])&&e!=c[0]&&d!=c[1]&&a.wa("Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.hb=e,b.Xa=d,null==b.sa&&(b.sa=new ps(a,b,b.mode)))}}
function Ot(a,b){b||(a.J=0);for(var c=0;c<a.A.length;c++){var d=a.A[c];d.name&&d.path?b&&d.sa&&d.sa.Gf||!a.Sl(c,d.name,d.path,!0)&&b&&tb(a,!1):b&&void 0!==d.type&&(d.sa=null,Wt(a,d,d.type))}return!!a.J}l.Sl=function(a,b,c,d){var e=this.A[a];if(e.ke)return this.wa("Drive "+a+" busy"),!0;e.ke=!0;d&&(e.Jd=!0,this.J++);(e.sa||new ps(this,e,e.mode)).load(b,c,null,this.xk);return!1};
l.xk=function(a,b,c){a.ke=!1;if(a.sa=b)this.wa('Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.La),a.Jd),b=b.info(),b[0]==a.hb&&b[1]==a.Xa&&b[2]==a.Ua&&b[3]==a.lb||this.wa("Warning: disk geometry ("+b[0]+":"+b[1]+":"+b[2]+") does not match "+Xt[this.F]+" drive type "+a.type+" ("+a.hb+":"+a.Xa+":"+a.Ua+")");a.Jd&&(a.Jd=!1,--this.J||tb(this))};
l.Il=function(){var a=0;this.D<this.C&&(a=this.G[this.D]);this.V&&Of(this.V,5);this.Z&=~Yt;++this.D>=this.C&&(this.D=this.C=0,this.Z&=~(Zt|bu|cu));return a};l.Zm=function(a,b){this.C<this.G.length&&(this.G[this.C++]=b);a=this.G[0]!=du?6:this.G.length;6==this.C&&(this.Z&=~eu);this.C>=a&&(this.Z|=Zt,this.Z&=~eu,fu(this))};l.Jl=function(){var a=this.Z;this.D<this.C&&(this.Z|=eu);return a};l.bn=function(a,b){this.qa=b;this.V&&Of(this.V,5);Pt(this)};l.Hl=function(){return this.W};
l.an=function(a,b){this.pa=b;this.Z=eu|bu|cu};l.$m=function(a,b){this.ma=b};l.nh=function(){};function gu(a){var b=-1;a.B&&(b=a.xe(a.B,function(){}),(1==a.B.Oa||a.B.Oa==a.B.lb)&&1<a.B.Oa&&(a.B.ub-=a.B.lb,a.I=a.I-1&255,a.B.ub>=a.B.lb?(a.Z=hu,a.xe(a.B,function(b){0<=b?(iu(a),a.V&&a.V.ca==Vj&&(a.Z=0),a.Z=a.Z|Rt|ju|ku):(a.Z=lu,a.H=mu)},!1)):a.Z=Rt|ju));return b}l.hk=function(){return gu(this)|gu(this)<<8};
function nu(a,b){a.B&&a.B.ub>=a.B.lb&&(0>ou(a.B,b)?(a.Z=lu,a.H=mu):(1==a.B.Oa||a.B.Oa==a.B.lb)&&1<a.B.Oa&&(a.B.ub-=a.B.lb,a.I=a.I-1&255,iu(a),a.Z=Rt|ju,a.B.ub>=a.B.lb&&(a.Z|=ku)))}l.jm=function(a,b){nu(this,b&255);nu(this,b>>8&255)};l.Pk=function(){return this.H};l.om=function(a,b){this.ta=b};l.Rk=function(){return this.I};l.mm=function(a,b){this.I=b};l.Sk=function(){return this.da};l.nm=function(a,b){this.da=b};l.Nk=function(){return this.ba};l.im=function(a,b){this.ba=b};l.Mk=function(){return this.aa};
l.hm=function(a,b){this.aa=b};l.Ok=function(){return this.N};l.km=function(a,b){this.N=b;this.Z=this.A[this.N&pu?1:0]?this.Z|Rt|ju:this.Z&~Rt};l.Tk=function(){var a=this.Z;this.Z&Rt&&(this.Z&=~hu);return a};l.gm=function(a,b){this.fa=b;this.V&&Of(this.V,14);qu(this)};l.lm=function(a,b){this.K&ru&&!(b&ru)&&(this.H=su);this.K=b};
function qu(a){var b=!1,c=a.fa,d=a.N&pu?1:0,e=a.N&tu,f=a.ba|(a.aa&uu)<<8,g=a.da,h=a.I||256;a.La=-1;a.B=null;a.H=vu;a.Z=Rt|ju;var k=a.A[d];k?(k.Cd=f,k.Ta=e,k.$a=g,k.ub=h*k.lb,c=c>=wu?c:c&xu,k.Ra=null,k.Oa=0,k.errorCode=0,a.La=d,a.B=k):c=-1;switch(c&xu){case yu:b=!0;break;case zu:a.Z=hu;a.xe(k,function(b){0<=b&&a.V?(iu(a),a.Z=Rt|ju|ku):(a.Z=lu,a.H=mu)},!1);break;case Au:a.Z=ku;break;case Bu:b=!0;break;case Cu:b=!0;break;case wu:a.H=su;b=!0;break;case Du:k.Xa=e+1,k.Ua=h,b=!0}b&&iu(a)}
function iu(a){!a.V||a.K&Eu||Qf(a.V,14,120)}
function fu(a){a.D=0;var b=Fu(a),c=Fu(a),d=c&32,e=d>>5,f=c&31,g=Fu(a),h=Fu(a),k=g<<2&768|h,m=g&63,r=Fu(a),y=Fu(a),t=a.A[e];t&&(t.Cd=k,t.Ta=f,t.$a=m,t.ub=r*t.lb);switch(b){case Gu:Hu(a,t?t.errorCode:Iu);Ju(a,c);Ju(a,g);Ju(a,h);Ju(a,Ku|d);b=-1;break;case du:for(c=0;0<=(b=Fu(a));)t&&c<t.de.length&&(t.de[c++]=b);t&&Wt(a,t);b=Ku;t||a.M!=e||(a.M=-1,b=Lu);Hu(a,b|d);b=-1;break;case Mu:case Nu:Hu(a,Ku|d),b=-1}if(0<=b)switch(void 0===t?b=-1:(t.errorCode=Tt,t.Wj=0),b){case Ou:Hu(a,Ku|d);break;case Pu:t.He=y;
Hu(a,Ku|d);break;case Qu:Hu(a,Ku|d);break;case Ru:Su(a,t,function(b){Hu(a,b|d)});break;case Tu:Uu(a,t,function(b){Hu(a,b|d)});break;case Vu:Wu(a,t,function(b){Hu(a,b|d)});break;default:Hu(a,Lu|d)}}function Fu(a){var b=-1;a.D<a.C&&(b=a.G[a.D++]);return b}function Hu(a,b){a.D=a.C=0;void 0!==b&&Ju(a,b);a.V&&Qf(a.V,5);a.Z|=Yt}function Ju(a,b){a.G[a.C++]=b}l.fk=function(a,b,c){void 0===b||0>b?this.xe(a,c):c(-1,!1)};l.gk=function(a,b){return void 0!==b&&0<=b?ou(a,b):-1};
l.vk=function(a,b){void 0!==b&&0<=b?(a.Oa<a.ee.length?a.ee[a.Oa++]=b:(a.errorCode=Xu,b=-1),a=b):a=-1;return a};l.wk=function(a,b){if(void 0!==b&&0<=b)a:if(a.errorCode)a=-1;else{a.Gc[a.ie++]=b;if(a.ie==a.Gc.length){a.Cd=a.Gc[0];a.Ta=a.Gc[1];a.$a=a.Gc[2];a.ub=128<<a.Gc[3];for(var c=a.ie=0;c<a.ub;c++)if(0>ou(a,a.ci)){a=-1;break a}a.Af++}a.Af>=a.ud&&(b=-1);a=b}else a=-1;return a};
function Su(a,b,c){b.errorCode=Iu;if(b.sa&&(b.Ra=null,a.V)){b.errorCode=Tt;Fl(a.V,3,a,"dmaRead",b);Bl(a.V,3,function(a){a||b.errorCode!=Tt||(b.errorCode=Iu);c(b.errorCode?Lu:Ku)});return}c(b.errorCode?Lu:Ku)}function Uu(a,b,c){b.errorCode=Iu;if(b.sa&&(b.Ra=null,a.V)){b.errorCode=Tt;Fl(a.V,3,a,"dmaWrite",b);Bl(a.V,3,function(a){a||(b.errorCode==Tt&&(b.errorCode=Iu),b.errorCode==Xu&&(b.errorCode=Tt));c(b.errorCode?Lu:Ku)});return}c(b.errorCode?Lu:Ku)}
function Wu(a,b,c){b.errorCode=Iu;b.ee&&b.ee.length==b.ub||(b.ee=Array(b.ub));b.Oa=0;a.V?(b.errorCode=Tt,Fl(a.V,3,a,"dmaWriteBuffer",b),Bl(a.V,3,function(a){a||b.errorCode!=Tt||(b.errorCode=Iu);c(b.errorCode?Lu:Ku)})):c(b.errorCode?Lu:Ku)}
l.xe=function(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.Ra&&(f=a.Oa,d=a.sa.read(a.Ra,a.Oa),a.Oa+=g,0<=d))return e=a.Ra,b&&b(d,!1,e,f),d;if(b){if(a.sa)return a.sa.seek(a.Cd,a.Ta,a.$a+a.yf,!1,function(c,k){(a.Ra=c)?(e=c,f=a.Oa=0,Yu(a),d=a.sa.read(a.Ra,a.Oa),a.Oa+=g):a.errorCode=Xu;b(d,k,e,f)}),d;a.errorCode=Xu;b(d,!1,e,f)}return d};
function ou(a,b){if(a.errorCode)return-1;do{if(a.Ra&&a.sa.write(a.Ra,a.Oa++,b))break;a.sa&&a.sa.seek(a.Cd,a.Ta,a.$a+a.yf,!0,function(b){a.Ra=b});if(!a.Ra){a.errorCode=Xu;b=-1;break}a.Oa=0;Yu(a)}while(1);return b}function Yu(a){a.$a++;var b=1-a.yf;a.$a>=a.Ua+b&&(a.$a=b,a.Ta++,a.Ta>=a.Xa&&(a.Ta=0,a.Cd++))}l.Ll=function(){var a=this.S.K&255;!(this.S.F>>8)&&128<a&&(this.M=a-128);return!0};l.Ml=function(){var a;(a=this.S.F>>8||!this.V)||(a=!(this.V.$b[0].Vc&64));return a?!0:!1};
var Ut="Hard Drive",Xt=["XTC","ATC","COMPAQ"],Vt=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7],16:[612,4],17:[977,5],18:[977,7],19:[1024,7],20:[733,5],21:[733,7],22:[733,5],23:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[1023,8],5:[940,6],6:[697,5],7:[462,8],8:[925,5],9:[900,15],10:[980,5],11:[925,7],12:[925,9],13:[612,8],14:[980,4],16:[612,4],17:[980,5],18:[966,
6],19:[1023,8],20:[733,5],21:[733,7],22:[524,4,40],23:[924,8],24:[966,14],25:[966,16],26:[1023,14],27:[832,6,33],28:[1222,15,34],29:[1240,7,34],30:[615,4,25],31:[615,8,25],32:[905,9,25],33:[832,8,33],34:[966,7,34],35:[966,8,34],36:[966,9,34],37:[966,5,34],38:[612,16,63],39:[1023,11,33],40:[1023,15,34],41:[1630,15,52],42:[1023,16,63],43:[805,4,26],44:[805,2,26],45:[748,8,33],46:[748,6,33],47:[966,5,25]}],Nt=496,su=1,vu=0,mu=16,uu=3,tu=15,pu=16,lu=1,ku=8,ju=16,Rt=64,hu=128,yu=16,zu=32,Au=48,Bu=64,Cu=
112,wu=144,Du=145,xu=240,Eu=2,ru=4,Ku=0,Lu=2,Ou=0,Pu=1,Gu=3,Qu=5,Ru=8,Tu=10,du=12,Vu=15,Mu=224,Nu=228,Tt=0,Iu=4,Xu=20,St=0,eu=1,Zt=2,bu=4,cu=8,Yt=32,Kt={800:Y.prototype.Il,801:Y.prototype.Jl,802:Y.prototype.Hl},Jt={496:Y.prototype.hk,497:Y.prototype.Pk,498:Y.prototype.Rk,499:Y.prototype.Sk,500:Y.prototype.Nk,501:Y.prototype.Mk,502:Y.prototype.Ok,503:Y.prototype.Tk},Mt={800:Y.prototype.Zm,801:Y.prototype.bn,802:Y.prototype.an,803:Y.prototype.$m,807:Y.prototype.nh,811:Y.prototype.nh,815:Y.prototype.nh},
Lt={496:Y.prototype.jm,497:Y.prototype.om,498:Y.prototype.mm,499:Y.prototype.nm,500:Y.prototype.im,501:Y.prototype.hm,502:Y.prototype.km,503:Y.prototype.gm,1014:Y.prototype.lm};Ra(function(){for(var a=hb(document,"pcx86","hdc"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new Y(d);gb(d,c)}});
function Zu(a,b,c){u.call(this,"Computer",a);var d=this;$u(this,b);this.N=Tc(this,"autoPower",a);this.D=0;this.ma=a.busWidth||a.buswidth;this.A=av;this.K=null;this.H=this.da=!1;this.pa=Tc(this,"url")||"";this.qa=(Math.random()+.1).toString(36).substr(2,12);this.B=bv(this);if(this.S=fb("CPU",this.id)){this.Ea=fb("Debugger",this.id);this.C=[];for(b=null;b=Cb(this,"Video",b);)this.C.push(b);this.na=new Tb({id:this.Yd+".bus",busWidth:this.ma},this.S,this.Ea);var e,f=jb(this.id);this.aa=(this.F=fb("Panel",
this.id))&&this.F.ja.print;this.fa=this.wa;this.ia=this.print;this.ka=this.vb;this.aa&&(this.fa=this.F.wa,this.ia=this.F.print,this.ka=this.F.vb);for(b=0;b<f.length;b++)e=f[b],e.wa=function(a,b,c){cv(d,a);return d.fa.call(this,a,b,c)}.bind(e),e.print=function(a){return d.ia.call(this,a)}.bind(e),e.vb=function(a,b,c){cv(d,a,b);return d.ka.call(this,a,b,c)}.bind(e);this.M=0;this.aa||dv(this);this.vb("PCx86 v1.36.0\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");
for(b=0;b<f.length;b++)e=f[b],e.ic&&e.ic(this,this.na,this.S,this.Ea);b=null;e=Tc(this,"resume");void 0!==e&&(1<e.length?b=this.J=e:this.A=parseInt(e,10));e=!1;f=Na("state");f||(e=!0,f=Tc(this,"state",a));f&&(b=this.W=f,e||(this.H=!0,this.A=av),this.A&&(this.L=new Ye(this,"1.36.0"),this.L.load()?b=null:delete this.L));!b&&this.A&&(b=ev(this))&&(this.H=!0);if(this.X=b){var g="Loading "+this.X+"...";Ea(this.X,null,!0,function(a,b,c){c?(d.J=null,d.H=!1,d.wa("Unable to load machine state from server (error "+
c+(b?": "+ta(b):"")+")")):(d.K=b,d.da=!0);tb(d)},function(){d.vb(g,qb.ae)})}else tb(this);this.ja.power||(this.N=!0);!c&&this.N&&fv(this,this.we)}else q("Unable to find CPU component")}ba(Zu,u);function dv(a){for(var b=0;b<a.C.length;b++){var c=a.C[b];c&&(c=c.If)&&(c.style.opacity="1",c.style.lineHeight="1",a.M++)}}function cv(a,b,c){if(a.M)for(var d=0;d<a.C.length;d++){var e=a.C[d];e&&(e=e.If)&&(c!=qb.ae||"..."!=b.slice(-3)?cb(e,b+"\n"):db(e,b,b+"."))}}
function $u(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){q(d.message+" ("+c+")")}}a.I=b}function Tc(a,b,c){var d=Na(b);void 0===d&&a.I&&(d=a.I[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function fv(a,b,c){for(var d=jb(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!sb(f)){sb(f,function(){fv(a,b,c)});return}}b.call(a,c)}
function gv(a,b){var c=new Ye(a,"1.36.0",hv);if(c.load()&&iv(c)){var d=c.get(jv),e=b?b.get(jv):"unknown";d!=e&&(a.wa("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}l=Zu.prototype;
l.we=function(a){void 0===a&&(a=this.A||(this.K?kv:av));if(!this.D){this.D++;var b=!1,c=!1;this.ba=!1;var d=this.L||new Ye(this,"1.36.0");if(a==Yc)b=!0;else if(a>av){if(d.load(this.K)){this.G=new Ye(this,"1.36.0",lv);this.G.load()&&(a!=kv&&mv(this,d)&&(a=nv),ov(this.G));this.G.set(jv,va());pv(this.G);var e=this.A&&!this.H;if(a==kv||bb("Click OK to restore the previous PCx86 machine state.")){if(c=iv(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=g?(this.wa("Error: "+
g),"unable to verify user"==g&&(La(qv,""),this.B=null)):this.vb(f+": "+g),ov(d),d.load()?(c=iv(d),e=!0):c=!1))}e&&gv(this,c?d:null)}else a==nv&&d.clear()}else gv(this);delete this.K;delete this.L}e=jb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.S&&(c=rv(this,g,d,b,c));b=[d,a,c];a!=Yc?fv(this,this.oi,b):this.oi(b)}};
function rv(a,b,c,d,e){if(!b.Y.Qb){b.Y.Qb=!0;if(b.Pb){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/-[0-9]+\./i,"."))));"string"===typeof f&&(f=null);!b.Pb(f,d)&&f&&(b.wa("Unable to restore hardware state")&&(a.W&&!a.da?(c.clear(),a.A=av,window&&window.location.reload()):a.ba=!0),b.Pb(null),e=!1)}b.Y.Le=!0;if(!d&&b.ti)for(a=b.ti.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
l.oi=function(a){var b=a[0],c=0>a[1];a=a[2];if(!this.Y.Le){for(var d=0;d<this.C.length;d++){var e=this.C[d];if(e&&(e=e.If)){var f=Ga();e.style.opacity="0";e.style.lineHeight="0";if(0<=f.indexOf("MSIE")||0<=f.indexOf("Trident"))e.style.fontSize="0";e.value=""}}this.M=0;this.Y.Le=!0}this.Y.Qb=!0;if(d=this.ja.power)d.textContent="Shutdown";this.S&&(rv(this,this.S,b,c,a),this.S.Gd());this.ba&&(mv(this,b),b.clear());!c&&this.G&&(this.G.clear(),delete this.G);this.D=0};
function mv(a,b){if(!a.Y.Xd){if(bb("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.36.0"};d.url=a.pa;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}return!0}return!1}
function sv(a,b,c){var d,e="none";if(a.D)return null;a.D--;var f=new Ye(a,"1.36.0"),g=new Ye(a,"1.36.0",hv),h=va();g.set(jv,h);f.set(jv,h);f.set(tv,"1.36.0");f.set(uv,window?window.location.href:null);f.set(vv,Ga());a.S&&a.S.Ob&&(d=a.S.Ob(b,c),"object"===typeof d&&f.set(a.S.id,d),c&&(a.S.Y.Qb=!1,!1===d&&(e=null)));for(var h=jb(a.id),k=0;k<h.length;k++){var m=h[k];m.Y.Qb&&(m.Ob&&(d=m.Ob(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.Y.Qb=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&wv(a,a.B,f.toString()),
pv(g)&&pv(f)||(e=null,d=h=!0)):a.A&&(d=!0,h=a.A==xv),d&&f.clear(h)):e=f.toString());c&&(a.Y.Qb=!1,b=a.ja.power)&&(b.textContent="Power");a.D=0;return e}l.reset=function(){this.na&&this.na.reset&&this.na.reset();for(var a=jb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.na&&c.reset&&c.reset()}};l.start=function(a,b){for(var c=jb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};
function St(a){var b=0,c=[];a.L?(c[b++]=a.H,c[b++]=a.ta,c[b++]=a.I,c[b++]=a.da,c[b++]=a.ba,c[b++]=a.aa,c[b++]=a.N,c[b++]=a.Z,c[b++]=a.fa,c[b++]=[a.K,a.La]):(c[b++]=a.W,c[b++]=a.Z,c[b++]=a.G,c[b++]=a.D,c[b++]=a.C,c[b++]=a.qa,c[b++]=a.oa,c[b++]=a.ma,c[b++]=a.M);for(var d=0,e=[],f=0;f<a.A.length;f++){var g=d++,h=a.A[f],k=0,m=[];m[k++]=h.errorCode;m[k++]=h.Wj;m[k++]=h.oe;m[k++]=h.de;m[k++]=h.ee;m[k++]=h.Ta;m[k++]=h.Xa;m[k++]=h.Cd;m[k++]=h.$a;m[k++]=h.ud;m[k++]=h.ub;m[k++]=h.Oa;m[k]=h.sa?h.sa.save():null;
e[g]=m}c[b]=e;return c}function Yt(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.de[2])?e=b.de[0]<<8|b.de[1]:c=b.type);null==c||d||(d=Xt[a.F][c][1],e=Xt[a.F][c][0]);d&&((c=Xt[a.F][b.type])&&e!=c[0]&&d!=c[1]&&a.wa("Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.hb=e,b.Xa=d,null==b.sa&&(b.sa=new rs(a,b,b.mode)))}}
function Qt(a,b){b||(a.J=0);for(var c=0;c<a.A.length;c++){var d=a.A[c];d.name&&d.path?b&&d.sa&&d.sa.Gf||!a.Sl(c,d.name,d.path,!0)&&b&&tb(a,!1):b&&void 0!==d.type&&(d.sa=null,Yt(a,d,d.type))}return!!a.J}l.Sl=function(a,b,c,d){var e=this.A[a];if(e.ke)return this.wa("Drive "+a+" busy"),!0;e.ke=!0;d&&(e.Jd=!0,this.J++);(e.sa||new rs(this,e,e.mode)).load(b,c,null,this.xk);return!1};
l.xk=function(a,b,c){a.ke=!1;if(a.sa=b)this.wa('Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.La),a.Jd),b=b.info(),b[0]==a.hb&&b[1]==a.Xa&&b[2]==a.Ua&&b[3]==a.lb||this.wa("Warning: disk geometry ("+b[0]+":"+b[1]+":"+b[2]+") does not match "+Zt[this.F]+" drive type "+a.type+" ("+a.hb+":"+a.Xa+":"+a.Ua+")");a.Jd&&(a.Jd=!1,--this.J||tb(this))};
l.Il=function(){var a=0;this.D<this.C&&(a=this.G[this.D]);this.V&&Of(this.V,5);this.Z&=~bu;++this.D>=this.C&&(this.D=this.C=0,this.Z&=~(cu|du|eu));return a};l.Zm=function(a,b){this.C<this.G.length&&(this.G[this.C++]=b);a=this.G[0]!=fu?6:this.G.length;6==this.C&&(this.Z&=~gu);this.C>=a&&(this.Z|=cu,this.Z&=~gu,hu(this))};l.Jl=function(){var a=this.Z;this.D<this.C&&(this.Z|=gu);return a};l.bn=function(a,b){this.qa=b;this.V&&Of(this.V,5);Rt(this)};l.Hl=function(){return this.W};
l.an=function(a,b){this.oa=b;this.Z=gu|du|eu};l.$m=function(a,b){this.ma=b};l.nh=function(){};function iu(a){var b=-1;a.B&&(b=a.xe(a.B,function(){}),(1==a.B.Oa||a.B.Oa==a.B.lb)&&1<a.B.Oa&&(a.B.ub-=a.B.lb,a.I=a.I-1&255,a.B.ub>=a.B.lb?(a.Z=ju,a.xe(a.B,function(b){0<=b?(ku(a),a.V&&a.V.ca==Vj&&(a.Z=0),a.Z=a.Z|Tt|lu|mu):(a.Z=nu,a.H=ou)},!1)):a.Z=Tt|lu));return b}l.hk=function(){return iu(this)|iu(this)<<8};
function pu(a,b){a.B&&a.B.ub>=a.B.lb&&(0>qu(a.B,b)?(a.Z=nu,a.H=ou):(1==a.B.Oa||a.B.Oa==a.B.lb)&&1<a.B.Oa&&(a.B.ub-=a.B.lb,a.I=a.I-1&255,ku(a),a.Z=Tt|lu,a.B.ub>=a.B.lb&&(a.Z|=mu)))}l.jm=function(a,b){pu(this,b&255);pu(this,b>>8&255)};l.Pk=function(){return this.H};l.om=function(a,b){this.ta=b};l.Rk=function(){return this.I};l.mm=function(a,b){this.I=b};l.Sk=function(){return this.da};l.nm=function(a,b){this.da=b};l.Nk=function(){return this.ba};l.im=function(a,b){this.ba=b};l.Mk=function(){return this.aa};
l.hm=function(a,b){this.aa=b};l.Ok=function(){return this.N};l.km=function(a,b){this.N=b;this.Z=this.A[this.N&ru?1:0]?this.Z|Tt|lu:this.Z&~Tt};l.Tk=function(){var a=this.Z;this.Z&Tt&&(this.Z&=~ju);return a};l.gm=function(a,b){this.fa=b;this.V&&Of(this.V,14);su(this)};l.lm=function(a,b){this.K&tu&&!(b&tu)&&(this.H=uu);this.K=b};
function su(a){var b=!1,c=a.fa,d=a.N&ru?1:0,e=a.N&vu,f=a.ba|(a.aa&wu)<<8,g=a.da,h=a.I||256;a.La=-1;a.B=null;a.H=xu;a.Z=Tt|lu;var k=a.A[d];k?(k.Cd=f,k.Ta=e,k.$a=g,k.ub=h*k.lb,c=c>=yu?c:c&zu,k.Ra=null,k.Oa=0,k.errorCode=0,a.La=d,a.B=k):c=-1;switch(c&zu){case Au:b=!0;break;case Bu:a.Z=ju;a.xe(k,function(b){0<=b&&a.V?(ku(a),a.Z=Tt|lu|mu):(a.Z=nu,a.H=ou)},!1);break;case Cu:a.Z=mu;break;case Du:b=!0;break;case Eu:b=!0;break;case yu:a.H=uu;b=!0;break;case Fu:k.Xa=e+1,k.Ua=h,b=!0}b&&ku(a)}
function ku(a){!a.V||a.K&Gu||Qf(a.V,14,120)}
function hu(a){a.D=0;var b=Hu(a),c=Hu(a),d=c&32,e=d>>5,f=c&31,g=Hu(a),h=Hu(a),k=g<<2&768|h,m=g&63,r=Hu(a),y=Hu(a),t=a.A[e];t&&(t.Cd=k,t.Ta=f,t.$a=m,t.ub=r*t.lb);switch(b){case Iu:Ju(a,t?t.errorCode:Ku);Lu(a,c);Lu(a,g);Lu(a,h);Lu(a,Mu|d);b=-1;break;case fu:for(c=0;0<=(b=Hu(a));)t&&c<t.de.length&&(t.de[c++]=b);t&&Yt(a,t);b=Mu;t||a.M!=e||(a.M=-1,b=Nu);Ju(a,b|d);b=-1;break;case Ou:case Pu:Ju(a,Mu|d),b=-1}if(0<=b)switch(void 0===t?b=-1:(t.errorCode=Vt,t.Wj=0),b){case Qu:Ju(a,Mu|d);break;case Ru:t.He=y;
Ju(a,Mu|d);break;case Su:Ju(a,Mu|d);break;case Tu:Uu(a,t,function(b){Ju(a,b|d)});break;case Vu:Wu(a,t,function(b){Ju(a,b|d)});break;case Xu:Yu(a,t,function(b){Ju(a,b|d)});break;default:Ju(a,Nu|d)}}function Hu(a){var b=-1;a.D<a.C&&(b=a.G[a.D++]);return b}function Ju(a,b){a.D=a.C=0;void 0!==b&&Lu(a,b);a.V&&Qf(a.V,5);a.Z|=bu}function Lu(a,b){a.G[a.C++]=b}l.fk=function(a,b,c){void 0===b||0>b?this.xe(a,c):c(-1,!1)};l.gk=function(a,b){return void 0!==b&&0<=b?qu(a,b):-1};
l.vk=function(a,b){void 0!==b&&0<=b?(a.Oa<a.ee.length?a.ee[a.Oa++]=b:(a.errorCode=Zu,b=-1),a=b):a=-1;return a};l.wk=function(a,b){if(void 0!==b&&0<=b)a:if(a.errorCode)a=-1;else{a.Gc[a.ie++]=b;if(a.ie==a.Gc.length){a.Cd=a.Gc[0];a.Ta=a.Gc[1];a.$a=a.Gc[2];a.ub=128<<a.Gc[3];for(var c=a.ie=0;c<a.ub;c++)if(0>qu(a,a.ci)){a=-1;break a}a.Af++}a.Af>=a.ud&&(b=-1);a=b}else a=-1;return a};
function Uu(a,b,c){b.errorCode=Ku;if(b.sa&&(b.Ra=null,a.V)){b.errorCode=Vt;Fl(a.V,3,a,"dmaRead",b);Bl(a.V,3,function(a){a||b.errorCode!=Vt||(b.errorCode=Ku);c(b.errorCode?Nu:Mu)});return}c(b.errorCode?Nu:Mu)}function Wu(a,b,c){b.errorCode=Ku;if(b.sa&&(b.Ra=null,a.V)){b.errorCode=Vt;Fl(a.V,3,a,"dmaWrite",b);Bl(a.V,3,function(a){a||(b.errorCode==Vt&&(b.errorCode=Ku),b.errorCode==Zu&&(b.errorCode=Vt));c(b.errorCode?Nu:Mu)});return}c(b.errorCode?Nu:Mu)}
function Yu(a,b,c){b.errorCode=Ku;b.ee&&b.ee.length==b.ub||(b.ee=Array(b.ub));b.Oa=0;a.V?(b.errorCode=Vt,Fl(a.V,3,a,"dmaWriteBuffer",b),Bl(a.V,3,function(a){a||b.errorCode!=Vt||(b.errorCode=Ku);c(b.errorCode?Nu:Mu)})):c(b.errorCode?Nu:Mu)}
l.xe=function(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.Ra&&(f=a.Oa,d=a.sa.read(a.Ra,a.Oa),a.Oa+=g,0<=d))return e=a.Ra,b&&b(d,!1,e,f),d;if(b){if(a.sa)return a.sa.seek(a.Cd,a.Ta,a.$a+a.yf,!1,function(c,k){(a.Ra=c)?(e=c,f=a.Oa=0,$u(a),d=a.sa.read(a.Ra,a.Oa),a.Oa+=g):a.errorCode=Zu;b(d,k,e,f)}),d;a.errorCode=Zu;b(d,!1,e,f)}return d};
function qu(a,b){if(a.errorCode)return-1;do{if(a.Ra&&a.sa.write(a.Ra,a.Oa++,b))break;a.sa&&a.sa.seek(a.Cd,a.Ta,a.$a+a.yf,!0,function(b){a.Ra=b});if(!a.Ra){a.errorCode=Zu;b=-1;break}a.Oa=0;$u(a)}while(1);return b}function $u(a){a.$a++;var b=1-a.yf;a.$a>=a.Ua+b&&(a.$a=b,a.Ta++,a.Ta>=a.Xa&&(a.Ta=0,a.Cd++))}l.Ll=function(){var a=this.S.K&255;!(this.S.F>>8)&&128<a&&(this.M=a-128);return!0};l.Ml=function(){var a;(a=this.S.F>>8||!this.V)||(a=!(this.V.$b[0].Vc&64));return a?!0:!1};
var Wt="Hard Drive",Zt=["XTC","ATC","COMPAQ"],Xt=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7],16:[612,4],17:[977,5],18:[977,7],19:[1024,7],20:[733,5],21:[733,7],22:[733,5],23:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[1023,8],5:[940,6],6:[697,5],7:[462,8],8:[925,5],9:[900,15],10:[980,5],11:[925,7],12:[925,9],13:[612,8],14:[980,4],16:[612,4],17:[980,5],18:[966,
6],19:[1023,8],20:[733,5],21:[733,7],22:[524,4,40],23:[924,8],24:[966,14],25:[966,16],26:[1023,14],27:[832,6,33],28:[1222,15,34],29:[1240,7,34],30:[615,4,25],31:[615,8,25],32:[905,9,25],33:[832,8,33],34:[966,7,34],35:[966,8,34],36:[966,9,34],37:[966,5,34],38:[612,16,63],39:[1023,11,33],40:[1023,15,34],41:[1630,15,52],42:[1023,16,63],43:[805,4,26],44:[805,2,26],45:[748,8,33],46:[748,6,33],47:[966,5,25]}],Pt=496,uu=1,xu=0,ou=16,wu=3,vu=15,ru=16,nu=1,mu=8,lu=16,Tt=64,ju=128,Au=16,Bu=32,Cu=48,Du=64,Eu=
112,yu=144,Fu=145,zu=240,Gu=2,tu=4,Mu=0,Nu=2,Qu=0,Ru=1,Iu=3,Su=5,Tu=8,Vu=10,fu=12,Xu=15,Ou=224,Pu=228,Vt=0,Ku=4,Zu=20,Ut=0,gu=1,cu=2,du=4,eu=8,bu=32,Mt={800:Y.prototype.Il,801:Y.prototype.Jl,802:Y.prototype.Hl},Lt={496:Y.prototype.hk,497:Y.prototype.Pk,498:Y.prototype.Rk,499:Y.prototype.Sk,500:Y.prototype.Nk,501:Y.prototype.Mk,502:Y.prototype.Ok,503:Y.prototype.Tk},Ot={800:Y.prototype.Zm,801:Y.prototype.bn,802:Y.prototype.an,803:Y.prototype.$m,807:Y.prototype.nh,811:Y.prototype.nh,815:Y.prototype.nh},
Nt={496:Y.prototype.jm,497:Y.prototype.om,498:Y.prototype.mm,499:Y.prototype.nm,500:Y.prototype.im,501:Y.prototype.hm,502:Y.prototype.km,503:Y.prototype.gm,1014:Y.prototype.lm};Ra(function(){for(var a=hb(document,"pcx86","hdc"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new Y(d);gb(d,c)}});
function av(a,b,c){u.call(this,"Computer",a);var d=this;bv(this,b);this.N=Tc(this,"autoPower",a);this.D=0;this.ma=a.busWidth||a.buswidth;this.A=cv;this.K=null;this.H=this.da=!1;this.oa=Tc(this,"url")||"";this.qa=(Math.random()+.1).toString(36).substr(2,12);this.B=dv(this);if(this.S=fb("CPU",this.id)){this.Ea=fb("Debugger",this.id);this.C=[];for(b=null;b=Cb(this,"Video",b);)this.C.push(b);this.na=new Tb({id:this.Yd+".bus",busWidth:this.ma},this.S,this.Ea);var e,f=jb(this.id);this.aa=(this.F=fb("Panel",
this.id))&&this.F.ja.print;this.fa=this.wa;this.ia=this.print;this.ka=this.vb;this.aa&&(this.fa=this.F.wa,this.ia=this.F.print,this.ka=this.F.vb);for(b=0;b<f.length;b++)e=f[b],e.wa=function(a,b,c){ev(d,a);return d.fa.call(this,a,b,c)}.bind(e),e.print=function(a){return d.ia.call(this,a)}.bind(e),e.vb=function(a,b,c){ev(d,a,b);return d.ka.call(this,a,b,c)}.bind(e);this.M=0;this.aa||fv(this);this.vb("PCx86 v1.36.0\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");
for(b=0;b<f.length;b++)e=f[b],e.ic&&e.ic(this,this.na,this.S,this.Ea);b=null;e=Tc(this,"resume");void 0!==e&&(1<e.length?b=this.J=e:this.A=parseInt(e,10));e=!1;f=Na("state");f||(e=!0,f=Tc(this,"state",a));f&&(b=this.W=f,e||(this.H=!0,this.A=cv),this.A&&(this.L=new Ye(this,"1.36.0"),this.L.load()?b=null:delete this.L));!b&&this.A&&(b=gv(this))&&(this.H=!0);if(this.X=b){var g="Loading "+this.X+"...";Ea(this.X,null,!0,function(a,b,c){c?(d.J=null,d.H=!1,d.wa("Unable to load machine state from server (error "+
c+(b?": "+ta(b):"")+")")):(d.K=b,d.da=!0);tb(d)},function(){d.vb(g,qb.ae)})}else tb(this);this.ja.power||(this.N=!0);!c&&this.N&&hv(this,this.we)}else q("Unable to find CPU component")}ba(av,u);function fv(a){for(var b=0;b<a.C.length;b++){var c=a.C[b];c&&(c=c.If)&&(c.style.opacity="1",c.style.lineHeight="1",a.M++)}}function ev(a,b,c){if(a.M)for(var d=0;d<a.C.length;d++){var e=a.C[d];e&&(e=e.If)&&(c!=qb.ae||"..."!=b.slice(-3)?cb(e,b+"\n"):db(e,b,b+"."))}}
function bv(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){q(d.message+" ("+c+")")}}a.I=b}function Tc(a,b,c){var d=Na(b);void 0===d&&a.I&&(d=a.I[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function hv(a,b,c){for(var d=jb(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!sb(f)){sb(f,function(){hv(a,b,c)});return}}b.call(a,c)}
function iv(a,b){var c=new Ye(a,"1.36.0",jv);if(c.load()&&kv(c)){var d=c.get(lv),e=b?b.get(lv):"unknown";d!=e&&(a.wa("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}l=av.prototype;
l.we=function(a){void 0===a&&(a=this.A||(this.K?mv:cv));if(!this.D){this.D++;var b=!1,c=!1;this.ba=!1;var d=this.L||new Ye(this,"1.36.0");if(a==Yc)b=!0;else if(a>cv){if(d.load(this.K)){this.G=new Ye(this,"1.36.0",nv);this.G.load()&&(a!=mv&&ov(this,d)&&(a=pv),qv(this.G));this.G.set(lv,va());rv(this.G);var e=this.A&&!this.H;if(a==mv||bb("Click OK to restore the previous PCx86 machine state.")){if(c=kv(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=g?(this.wa("Error: "+
g),"unable to verify user"==g&&(La(sv,""),this.B=null)):this.vb(f+": "+g),qv(d),d.load()?(c=kv(d),e=!0):c=!1))}e&&iv(this,c?d:null)}else a==pv&&d.clear()}else iv(this);delete this.K;delete this.L}e=jb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.S&&(c=tv(this,g,d,b,c));b=[d,a,c];a!=Yc?hv(this,this.oi,b):this.oi(b)}};
function tv(a,b,c,d,e){if(!b.Y.Qb){b.Y.Qb=!0;if(b.Pb){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/-[0-9]+\./i,"."))));"string"===typeof f&&(f=null);!b.Pb(f,d)&&f&&(b.wa("Unable to restore hardware state")&&(a.W&&!a.da?(c.clear(),a.A=cv,window&&window.location.reload()):a.ba=!0),b.Pb(null),e=!1)}b.Y.Le=!0;if(!d&&b.ti)for(a=b.ti.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
l.oi=function(a){var b=a[0],c=0>a[1];a=a[2];if(!this.Y.Le){for(var d=0;d<this.C.length;d++){var e=this.C[d];if(e&&(e=e.If)){var f=Ga();e.style.opacity="0";e.style.lineHeight="0";if(0<=f.indexOf("MSIE")||0<=f.indexOf("Trident"))e.style.fontSize="0";e.value=""}}this.M=0;this.Y.Le=!0}this.Y.Qb=!0;if(d=this.ja.power)d.textContent="Shutdown";this.S&&(tv(this,this.S,b,c,a),this.S.Gd());this.ba&&(ov(this,b),b.clear());!c&&this.G&&(this.G.clear(),delete this.G);this.D=0};
function ov(a,b){if(!a.Y.Xd){if(bb("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.36.0"};d.url=a.oa;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}return!0}return!1}
function uv(a,b,c){var d,e="none";if(a.D)return null;a.D--;var f=new Ye(a,"1.36.0"),g=new Ye(a,"1.36.0",jv),h=va();g.set(lv,h);f.set(lv,h);f.set(vv,"1.36.0");f.set(wv,window?window.location.href:null);f.set(xv,Ga());a.S&&a.S.Ob&&(d=a.S.Ob(b,c),"object"===typeof d&&f.set(a.S.id,d),c&&(a.S.Y.Qb=!1,!1===d&&(e=null)));for(var h=jb(a.id),k=0;k<h.length;k++){var m=h[k];m.Y.Qb&&(m.Ob&&(d=m.Ob(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.Y.Qb=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.B&&yv(a,a.B,f.toString()),
rv(g)&&rv(f)||(e=null,d=h=!0)):a.A&&(d=!0,h=a.A==zv),d&&f.clear(h)):e=f.toString());c&&(a.Y.Qb=!1,b=a.ja.power)&&(b.textContent="Power");a.D=0;return e}l.reset=function(){this.na&&this.na.reset&&this.na.reset();for(var a=jb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.na&&c.reset&&c.reset()}};l.start=function(a,b){for(var c=jb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};
l.stop=function(a,b){for(var c=jb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
l.yb=function(a,b,c){var d=this;switch(b){case "power":return this.ja[b]=c,c.onclick=function(){d.D||(d.Y.Qb?sv(d,!1,!0):fv(d,d.we))},!0;case "reset":return this.ja[b]=c,c.onclick=function(){if(d.Y.Qb&&!d.D)if(d.S&&(d.S.Y.Gd=d.S.Y.nb),d.A&&!d.J){var a=d.Y.Xd||!bb("Click OK to reset this PCx86 machine and discard all disk modifications.");sv(d,a,!0);!a&&d.W?window&&window.location.reload():(a||(d.V=!0),d.we(av),d.V=!1)}else d.reset(),d.S&&d.S.Gd()},!0;case "save":if(qa(Fa(),"pcjs.org"))c.parentNode.removeChild(c);
else return this.ja[b]=c,c.onclick=function(){var a=bv(d,!0);if(a){var b=!!(d.A&&!d.J||d.W),c=sv(d,b);b?wv(d,a,c):d.wa("Resume disabled, machine state not saved")}},!0}return!1};
function bv(a,b){var c=a.B;c||((c=Ka(qv),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=yv(a,c))||a.wa("The user ID is invalid.")):b&&a.wa("Browser local storage is not available"));return c}
function yv(a,b){a.B=null;b=Ea(Fa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(La(qv,b.data),a.B=b.data)}catch(d){q(d.message+" ("+c+")")}return a.B}function ev(a){var b=null;a.B&&(b=Fa()+"/api/v1/user?req=load&user="+a.B+"&state="+zv(a,"1.36.0"));return b}
function wv(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=zv(a,"1.36.0");d.data=c;b=Ea(Fa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.wa("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.wa(c),La(qv,""),a.B=null)}}
l.yb=function(a,b,c){var d=this;switch(b){case "power":return this.ja[b]=c,c.onclick=function(){d.D||(d.Y.Qb?uv(d,!1,!0):hv(d,d.we))},!0;case "reset":return this.ja[b]=c,c.onclick=function(){if(d.Y.Qb&&!d.D)if(d.S&&(d.S.Y.Gd=d.S.Y.nb),d.A&&!d.J){var a=d.Y.Xd||!bb("Click OK to reset this PCx86 machine and discard all disk modifications.");uv(d,a,!0);!a&&d.W?window&&window.location.reload():(a||(d.V=!0),d.we(cv),d.V=!1)}else d.reset(),d.S&&d.S.Gd()},!0;case "save":if(qa(Fa(),"pcjs.org"))c.parentNode.removeChild(c);
else return this.ja[b]=c,c.onclick=function(){var a=dv(d,!0);if(a){var b=!!(d.A&&!d.J||d.W),c=uv(d,b);b?yv(d,a,c):d.wa("Resume disabled, machine state not saved")}},!0}return!1};
function dv(a,b){var c=a.B;c||((c=Ka(sv),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=Av(a,c))||a.wa("The user ID is invalid.")):b&&a.wa("Browser local storage is not available"));return c}
function Av(a,b){a.B=null;b=Ea(Fa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(La(sv,b.data),a.B=b.data)}catch(d){q(d.message+" ("+c+")")}return a.B}function gv(a){var b=null;a.B&&(b=Fa()+"/api/v1/user?req=load&user="+a.B+"&state="+Bv(a,"1.36.0"));return b}
function yv(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Bv(a,"1.36.0");d.data=c;b=Ea(Fa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.wa("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.wa(c),La(sv,""),a.B=null)}}
function Cb(a,b,c){a=jb(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}function gd(a,b){if(a.C.length){var c=0,d=0;!b&&window&&(c=window.scrollX,d=window.scrollY);a=a.C[0];a.D&&a.D.focus();!b&&window&&window.scrollTo(c,d)}}
function hd(a,b){a.S&&(a=a.S,a.pi&&(b||!a.Y.nb||a.Y.mi)&&(Ff(a,"EAX",a.F),Ff(a,"EBX",a.G),Ff(a,"ECX",a.H),Ff(a,"EDX",a.K),Ff(a,"ESP",B(a)),Ff(a,"EBP",a.L),Ff(a,"ESI",a.J),Ff(a,"EDI",a.I),Ff(a,"CS",a.fa.ha),Ff(a,"DS",a.Ca.ha),Ff(a,"SS",a.W.ha),Ff(a,"ES",a.ua.ha),Ff(a,"EIP",D(a)),b=Id(a),Ff(a,"PS",b),Ff(a,"V",b&2048),Ff(a,"D",b&1024),Ff(a,"I",b&512),Ff(a,"T",b&256),Ff(a,"S",b&128),Ff(a,"Z",b&64),Ff(a,"A",b&16),Ff(a,"P",b&4),Ff(a,"C",b&1),80386==a.ca&&(Ff(a,"FS",a.ob.ha),Ff(a,"GS",a.rb.ha),Ff(a,"CR0",
a.pa),Ff(a,"CR2",a.pd),Ff(a,"CR3",a.dd))),b=a.ja.speed)&&(b.textContent=a.Y.nb&&a.R.wd?a.R.wd.toFixed(2)+"Mhz":"Stopped")}
a.oa),Ff(a,"CR2",a.pd),Ff(a,"CR3",a.dd))),b=a.ja.speed)&&(b.textContent=a.Y.nb&&a.R.wd?a.R.wd.toFixed(2)+"Mhz":"Stopped")}
function nd(a,b){for(var c=0;c<a.C.length;c++)uq(a.C[c],b);if(a.F&&(a=a.F,a.ma)){Mb(a,Ob,a.J,a.ka);if(a.Aa){b=a.na;var c=a.A,d,e;null==d&&(d=0);null==e&&(e=b.K-d|0);c||(c={og:0,fd:0,hg:[]});var f=d>>>b.B;d=d+e-1>>>b.B;c.og=0;for(c.fd=0;f<=d;)e=b.X[f],c.og+=e.size,e.size&&(c.hg.push(Aa(Ib,f,0,0,e.type)),c.fd++),f++;a.A=c;a.ba=a.A.fd*a.na.A/(Hb*Sb);d=0;a.A.fi=0;a.A.Ge||(a.A.Ge=[]);e=-1;b=0;for(var g=-1,c=0;c<a.A.fd;c++){var h=a.A.hg[c],f=Ba(Ib.type,h),h=Ba(Ib.Ij,h);if(f!=e||h!=g+1)(g=c-b)&&(d+=Qb(a,
b,g,e)),e=f,b=c;g=h}d+=Qb(a,b,c-b,e);e=a.A.sk!=d;a.A.sk=d;if(e){e=new zb(0,0,a.J.width,a.J.height);a.A.ce=[];b=a.A.fd;for(d=0;d<a.A.fi;d++)c=a.A.Ge[d].fd,a.A.ce.push(Ab(e,c,b,!d)),b-=c;for(d=0;d<a.A.ce.length;d++)e=a.A.Ge[d],b=c=a.A.ce[d],f=a.ka,(g=Pc[e.type])||(g=new yb),f.strokeStyle="black",f.strokeRect(b.x,b.y,b.Ac,b.A),f.fillStyle="string"==typeof g?g:g.toString(),f.fillRect(b.x,b.y,b.Ac,b.A),b=a,f=c,b.L=b.X,b.I=b.aa,c=f.x+(f.Ac>>1),g=f.y+(f.A>>1),h=f.A,f.Ac<f.A&&(h=f.Ac,b.W=!0,b.D.save(),b.D.translate(c,
g),b.D.rotate(-Math.PI/2),c=g=0),h<b.I&&(b.I=h,b.L=b.I+"px "+Rb),f=g,b.B=c,b.H=f,b=a,e=$b[e.type]+" ("+(e.fd*a.na.A/1024|0)+"Kb)",b.D.font=b.L,b.B-=b.D.measureText(e).width>>1,b.H+=(b.I>>1)-2,Pb(b,e),b.W&&(b.D.restore(),b.W=!1)}}else Pb(a,"This space intentionally left blank");a.context.drawImage(a.J,0,0,a.J.width,a.J.height,a.Fa,a.Ka,a.ua,a.za);a.ma=!1}}var lv="failsafe",hv="validate",jv="timestamp",tv="version",uv="url",vv="browser",qv="user",Yc=-1,av=0,kv=1,nv=2,xv=3;
Ra(function(){for(var a=hb(document,"pcx86-machine"),b=0;b<a.length;b++)for(var c=a[b],d=ib(c),c=hb(c,"pcx86","computer"),e=0;e<c.length;e++){var f=c[e],g=ib(f),g=new Zu(g,d,!0);gb(g,f);g.N&&fv(g,g.we)}});Sa.show.push(function(){for(var a=hb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=ib(a[b]);if(c=fb("Computer",c.id))c.Y.Xd=!1,c.Y.Le&&!c.Y.Qb&&c.we(Yc)}});
Sa.exit.push(function(){for(var a=hb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=ib(a[b]);if(c=fb("Computer",c.id))c.Y.Xd=!0,c.Y.Qb&&sv(c,!(!c.A||c.J),!0)}});function Ye(a,b,c){this.id=a.id;this.Ea=a.Ea;this.A="";this.state={};this.B=this.C=!1;this.key=zv(a,b,c);ov(this,a.Mj)}l=Ye.prototype;l.set=function(a,b){try{this.state[a]=b}catch(c){}};l.get=function(a){return this.state[a]||null};l.data=function(){return this.state};
l.load=function(a){return a?(this.A=a,this.B=!0,this.C=!1,!0):this.B?!0:Ia()&&(a=Ka(this.key))?(this.A=a,this.B=!0):!1};function iv(a){var b=!0;if(!a.C)try{a.state=JSON.parse(a.A),a.C=!0}catch(c){q(c.message||c),b=!1}return b}function pv(a){var b=!0;if(Ia()){var c=JSON.stringify(a.state);La(a.key,c)||(q("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}l.toString=function(){return this.state?JSON.stringify(this.state):this.A};
function ov(a,b){a.A="";a.state={};a.B=a.C=!1;b&&a.set("parms",b)}l.clear=function(a){ov(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,1);c=0}};function zv(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}var Av=0;
function Bv(a,b,c,d,e,f){e("Loading "+a+"...");Ea(a,null,!0,function(g,h,k){k?(h||(h="unable to load "+a+" ("+k+")"),f(h,null)):Cv(h,a,b,c,d,e,f)})}
function Cv(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&($a(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),d=d.replace(/\$/g,"$$$$"),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,
"$1PCx86$2"),a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(r){f=null,a=r.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?Dv(a,f,h):h(a,null):g("no data"+(b?" for file: "+
g),b.D.rotate(-Math.PI/2),c=g=0),h<b.I&&(b.I=h,b.L=b.I+"px "+Rb),f=g,b.B=c,b.H=f,b=a,e=$b[e.type]+" ("+(e.fd*a.na.A/1024|0)+"Kb)",b.D.font=b.L,b.B-=b.D.measureText(e).width>>1,b.H+=(b.I>>1)-2,Pb(b,e),b.W&&(b.D.restore(),b.W=!1)}}else Pb(a,"This space intentionally left blank");a.context.drawImage(a.J,0,0,a.J.width,a.J.height,a.Fa,a.Ka,a.ua,a.za);a.ma=!1}}var nv="failsafe",jv="validate",lv="timestamp",vv="version",wv="url",xv="browser",sv="user",Yc=-1,cv=0,mv=1,pv=2,zv=3;
Ra(function(){for(var a=hb(document,"pcx86-machine"),b=0;b<a.length;b++)for(var c=a[b],d=ib(c),c=hb(c,"pcx86","computer"),e=0;e<c.length;e++){var f=c[e],g=ib(f),g=new av(g,d,!0);gb(g,f);g.N&&hv(g,g.we)}});Sa.show.push(function(){for(var a=hb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=ib(a[b]);if(c=fb("Computer",c.id))c.Y.Xd=!1,c.Y.Le&&!c.Y.Qb&&c.we(Yc)}});
Sa.exit.push(function(){for(var a=hb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=ib(a[b]);if(c=fb("Computer",c.id))c.Y.Xd=!0,c.Y.Qb&&uv(c,!(!c.A||c.J),!0)}});function Ye(a,b,c){this.id=a.id;this.Ea=a.Ea;this.A="";this.state={};this.B=this.C=!1;this.key=Bv(a,b,c);qv(this,a.Mj)}l=Ye.prototype;l.set=function(a,b){try{this.state[a]=b}catch(c){}};l.get=function(a){return this.state[a]||null};l.data=function(){return this.state};
l.load=function(a){return a?(this.A=a,this.B=!0,this.C=!1,!0):this.B?!0:Ia()&&(a=Ka(this.key))?(this.A=a,this.B=!0):!1};function kv(a){var b=!0;if(!a.C)try{a.state=JSON.parse(a.A),a.C=!0}catch(c){q(c.message||c),b=!1}return b}function rv(a){var b=!0;if(Ia()){var c=JSON.stringify(a.state);La(a.key,c)||(q("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}l.toString=function(){return this.state?JSON.stringify(this.state):this.A};
function qv(a,b){a.A="";a.state={};a.B=a.C=!1;b&&a.set("parms",b)}l.clear=function(a){qv(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,1);c=0}};function Bv(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}var Cv=0;
function Dv(a,b,c,d,e,f){e("Loading "+a+"...");Ea(a,null,!0,function(g,h,k){k?(h||(h="unable to load "+a+" ("+k+")"),f(h,null)):Ev(h,a,b,c,d,e,f)})}
function Ev(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&($a(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),d=d.replace(/\$/g,"$$$$"),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,
"$1PCx86$2"),a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(r){f=null,a=r.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?Fv(a,f,h):h(a,null):g("no data"+(b?" for file: "+
b:""),null)}
function Dv(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,r=/( [a-z]+=)(['"])(.*?)\2/gi;m=r.exec(f);)k=0>k.toLowerCase().indexOf(m[1].toLowerCase())?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+
"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,"");a=a.replace(d[0],g);Dv(a,b,c)}})}else c(a,null)}
function Ev(a,b,c,d){function e(a){if(void 0===h){var b=g&&hb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ra(a))}function f(a){e("Error: "+a);k&&(--Av||Va(!0));k=!1}var g,h,k=!0;Av++;ab[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var r=document.head||document.getElementsByTagName("head")[0],y=document.createElement("style");y.type="text/css";y.styleSheet?y.styleSheet.cssText=m:y.appendChild(document.createTextNode(m));r.appendChild(y)}c||
(c="/versions/pcx86/1.36.0/components.xsl");m=function(d,h){h?Bv(c,null,null,!1,e,function(d,k){k?($a(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--Av||Va(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--Av||Va(!0)):f("invalid machine element: "+
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Bv(b,a,d,!0,e,m):Cv(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return k}function Fv(a,b,c,d){Va(!1);return Ev(a,b,c,d)}window.embedPC=Fv;window.embedPCx86=Fv;window.findMachineComponent=function(a,b){return fb(b,a+".machine")};
function Fv(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,r=/( [a-z]+=)(['"])(.*?)\2/gi;m=r.exec(f);)k=0>k.toLowerCase().indexOf(m[1].toLowerCase())?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+
"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,"");a=a.replace(d[0],g);Fv(a,b,c)}})}else c(a,null)}
function Gv(a,b,c,d){function e(a){if(void 0===h){var b=g&&hb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ra(a))}function f(a){e("Error: "+a);k&&(--Cv||Va(!0));k=!1}var g,h,k=!0;Cv++;ab[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var r=document.head||document.getElementsByTagName("head")[0],y=document.createElement("style");y.type="text/css";y.styleSheet?y.styleSheet.cssText=m:y.appendChild(document.createTextNode(m));r.appendChild(y)}c||
(c="/versions/pcx86/1.36.0/components.xsl");m=function(d,h){h?Dv(c,null,null,!1,e,function(d,k){k?($a(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--Cv||Va(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--Cv||Va(!0)):f("invalid machine element: "+
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Dv(b,a,d,!0,e,m):Ev(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return k}function Hv(a,b,c,d){Va(!1);return Gv(a,b,c,d)}window.embedPC=Hv;window.embedPCx86=Hv;window.findMachineComponent=function(a,b){return fb(b,a+".machine")};
window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!mb[a]){for(var c=!0,d=mb,e=a,f=b.length,g=[],h=[],k="",m=null,r=0;r<f;r++){var y=b[r];if('"'==y||"'"==y)m&&y!=m?k+=y:(m?m=null:m=y,k&&(h.push(k),k=""));else{if(!m){if("\r"==y||"\n"==y)y=";";if(" "==y||"\t"==y||";"==y){k&&(h.push(k),k="");";"==y&&h.length&&(g.push(h),h=[]);continue}}k+=y}}k&&h.push(k);h.length&&g.push(h);d[e]=g;lb(a)||(c=!1)}return c};window.enableEvents=Va;window.sendEvent=Xa;
function Gv(a,b,c,d){if(!c&&b){d.push(b);a=ab[d[0]];b=null;for(var e in a)if(qa(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Ea(b,null,!0,function(a,b){Hv(b,d)}):Hv(null,d)}else q("Error ("+c+") requesting "+a)}
function Hv(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var h=ab[f],k={},m;for(m in h){var r=h[m],y=pa(m);if("xml"==y){for(y=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=y.exec(h[m]);){var t=d[2];t&&(h[t]||(r=r.replace(d[0],"")))}d=m=oa(m)}else"xsl"==y&&(e=m=oa(m));k[m]=r}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
function Iv(a,b,c,d){if(!c&&b){d.push(b);a=ab[d[0]];b=null;for(var e in a)if(qa(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Ea(b,null,!0,function(a,b){Jv(b,d)}):Jv(null,d)}else q("Error ("+c+") requesting "+a)}
function Jv(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var h=ab[f],k={},m;for(m in h){var r=h[m],y=pa(m);if("xml"==y){for(y=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=y.exec(h[m]);){var t=d[2];t&&(h[t]||(r=r.replace(d[0],"")))}d=m=oa(m)}else"xsl"==y&&(e=m=oa(m));k[m]=r}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
"&#xA9;"),a=Pa(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('<div id="'+f+'"></div>\n')+"...\n",a=a+('<script type="text/javascript" src="'+g+'">\x3c/script>\n')+('<script type="text/javascript">embedPC("'+f+'","'+d+'","'+e+'");\x3c/script>\n\n')+"The machine should appear where the <div> is located.",q(a)):q("Missing XML/XSL resources")}
window.savePC=function(a,b,c){var d=fb("Computer",a),e=fb("Debugger",a);if(d){var f=sv(d,!0),g=d.I?JSON.stringify(d.I):null;b||(b="/versions/pcx86/1.36.0/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Mj:g}))return!0;Ea(b,null,!0,function(c,d,e){Gv(c,d,e,[a,oa(b,!0),g,f])});return!0}q("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.36.0/pcx86.map
window.savePC=function(a,b,c){var d=fb("Computer",a),e=fb("Debugger",a);if(d){var f=uv(d,!0),g=d.I?JSON.stringify(d.I):null;b||(b="/versions/pcx86/1.36.0/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Mj:g}))return!0;Ea(b,null,!0,function(c,d,e){Iv(c,d,e,[a,oa(b,!0),g,f])});return!0}q("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.36.0/pcx86.map

View file

@ -3785,7 +3785,7 @@ class DebuggerX86 extends Debugger {
}
if (sComment && fComplete) {
sLine = Str.pad(sLine, dbgAddrIns.fAddr32? 74 : 56) + ';' + sComment;
sLine = Str.pad(sLine, dbgAddrIns.fAddr32? 74 : 62) + ';' + sComment;
if (!this.cpu.flags.checksum) {
sLine += (nSequence != null? '=' + nSequence.toString() : "");
} else {

View file

@ -146,6 +146,7 @@ class SerialPort extends Component {
*/
this.tabSize = parmsSerial['tabSize'];
this.charBOL = parmsSerial['charBOL'];
this.charPrev = 0;
this.iLogicalCol = 0;
this.bMSRInit = SerialPort.MSR.CTS | SerialPort.MSR.DSR;
@ -610,6 +611,15 @@ class SerialPort extends Component {
inIIR(port, addrFrom)
{
var b = this.bIIR;
/*
* TODO: Based on how BASIC.COM polls this register repeatedly in its serial ISR, it's clear that we
* should maintain a separate set of "trigger" bits for each of the four possible interrupt conditions,
* and that updateIRR() should test-and-clear each of those trigger bits in priority order, updating the
* IIR register as appropriate. Then we could simply call updateIRR() here to set the next interrupt
* condition, if any. As things stand now, another interrupt won't occur until another explicit
* "triggering" call to updateIRR() is issued, so we have to set the NO_INT bit here every time.
*/
this.bIIR |= SerialPort.IIR.NO_INT;
this.printMessageIO(port, null, addrFrom, "IIR", b);
return b;
}
@ -693,6 +703,7 @@ class SerialPort extends Component {
this.bLSR &= ~(SerialPort.LSR.THRE | SerialPort.LSR.TSRE);
if (this.transmitByte(bOut)) {
this.bLSR |= (SerialPort.LSR.THRE | SerialPort.LSR.TSRE);
this.updateIRR();
/*
* QUESTION: Does this mean we should also flush/zero bTHR?
*/
@ -771,9 +782,15 @@ class SerialPort extends Component {
updateIRR()
{
var bIIR = -1;
/*
* We check all the interrupt conditions in priority order. TODO: Add INT_LSR.
*/
if ((this.bLSR & SerialPort.LSR.DR) && (this.bIER & SerialPort.IER.RBR_AVAIL)) {
bIIR = SerialPort.IIR.INT_RBR;
}
else if ((this.bLSR & SerialPort.LSR.THRE) && (this.bIER & SerialPort.IER.THR_EMPTY)) {
bIIR = SerialPort.IIR.INT_THR;
}
else if ((this.bMSR & (SerialPort.MSR.DCTS | SerialPort.MSR.DDSR)) && (this.bIER & SerialPort.IER.MSR_DELTA)) {
bIIR = SerialPort.IIR.INT_MSR;
}
@ -782,7 +799,7 @@ class SerialPort extends Component {
this.bIIR |= bIIR;
/*
* TODO: Remove this arbitrary 100-instruction delay once we've added support for baud rate throttling
* (see TODO above regarding baud rate).
* (see notes above regarding baud rate).
*/
if (this.chipset && this.nIRQ) this.chipset.setIRR(this.nIRQ, 100);
} else {
@ -830,11 +847,19 @@ class SerialPort extends Component {
nChars = tabSize - (this.iLogicalCol % tabSize);
if (this.tabSize) s = Str.pad("", nChars);
}
if (this.charBOL && !this.iLogicalCol && nChars) s = String.fromCharCode(this.charBOL) + s;
if (!this.iLogicalCol && nChars) {
/*
* When BASIC.COM outputs a listing to a serial port, it ends every line with a CR (0x0D)
* but no LF (0x0A), which seems a bit odd. We fix that here.
*/
if (this.charPrev != 0x0A) s = "\n" + s;
if (this.charBOL) s = String.fromCharCode(this.charBOL) + s;
}
this.controlIOBuffer.value += s;
this.controlIOBuffer.scrollTop = this.controlIOBuffer.scrollHeight;
this.iLogicalCol += nChars;
}
this.charPrev = b;
fTransmitted = true;
}
else if (this.consoleOutput != null) {