Moved the website sources in the "docs" folder in order to enable "ivandavidov.github.io/minimal" as backup website location. Some portions of the website may not work correctly (e.g. the emulator) and they have been dynamically disabled.
11
.gitignore
vendored
@ -1,16 +1,11 @@
|
|||||||
!.gitignore
|
!.gitignore
|
||||||
|
|
||||||
/www/download/**
|
/docs/www/download/**
|
||||||
/www/favicon.ico
|
/docs/www/favicon.ico
|
||||||
/www/images/**
|
/docs/www/images/**
|
||||||
|
|
||||||
/src/source/**
|
/src/source/**
|
||||||
/src/work/**
|
/src/work/**
|
||||||
/src/minimal_linux_live*
|
/src/minimal_linux_live*
|
||||||
/src/*.img
|
/src/*.img
|
||||||
/src/*.tgz
|
/src/*.tgz
|
||||||
|
|
||||||
/docs/mdbook
|
|
||||||
/docs/book/**
|
|
||||||
/docs/src/theme/**
|
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
theme: jekyll-theme-cayman
|
|
Before Width: | Height: | Size: 24 KiB |
631
docs/index.html
@ -1,630 +1 @@
|
|||||||
<!DOCTYPE html>
|
<html><head><meta http-equiv="refresh" content="0; url=./www"/><script>function r(){window.location.replace("./www");r();}</script></head><body onload="r();"><h1><a href="./www">Minimal Linux Live</a></h1></body></html>
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Minimal Linux Live</title>
|
|
||||||
<meta name="description" content="Minimal Linux Live">
|
|
||||||
<meta name="keywords" content="minimal minimalistic tiny linux live tutorial howto kernel busybox cd usb iso image" />
|
|
||||||
<meta name="author" content="Ivan Davidov - davidov (dot) i [at] gmail {dot} com">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="assets/css/style.min.css">
|
|
||||||
|
|
||||||
<link rel="icon" type="image/x-icon" href="assets/img/favicon.ico" />
|
|
||||||
</head>
|
|
||||||
<body onload="javascript:thankYou();">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns" style="text-align: center;">
|
|
||||||
<h2><a href="." style="text-decoration: none; color: #000;">Minimal Linux Live</a></h2>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns" style="text-align: center;">
|
|
||||||
<a class="button button-primary" href="#" onclick="javascript:menuSwap(1); return false;">Home</a>
|
|
||||||
<a class="button button-primary" href="#" onclick="javascript:menuSwap(2); return false;">Changes</a>
|
|
||||||
<a class="button button-primary" href="#" onclick="javascript:menuSwap(3); return false;">About</a>
|
|
||||||
<a class="button button-primary" href="#" onclick="javascript:menuSwap(4); return false;">Tutorial</a>
|
|
||||||
<a class="button button-primary" href="#" onclick="javascript:menuSwap(5); return false;">Emulator</a>
|
|
||||||
<a class="button button-primary" href="#" onclick="javascript:menuSwap(6); return false;">Download</a>
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="item1" style="display:block;">
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
<h4>Home</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
<strong>Minimal Linux Live</strong> is a set of Linux shell scripts which automatically build minimalistic Live Linux OS with basic network support via DHCP. The generated operating system is based on <a target="_blank" href="http://kernel.org">Linux kernel</a>, <a target="_blank" href="http://gnu.org/software/libc">GNU C library</a> and <a target="_blank" href="http://busybox.net">BusyBox</a>. All necessary sources are automatically downloaded and all build operations are fully encapsulated in the shell scripts.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
<iframe width="560" height="315" src="http://youtube.com/embed/LUxoOfC5Xiw?list=PLe3TW5jDbUAiN9E9lvYFLIFFqAjjZS9xS" frameborder="0" allowfullscreen></iframe>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
If you want to build your own Minimal Linux Live ISO image file, all you need to do is the following:
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
Get the latest scripts from the <a href="#" onclick="javascript:menuSwap(6); return false;">download</a> section.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Extract the scripts to some folder. Note that even though the scripts are small in size, you need ~2GB free disk space for the actual build process.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Just for convenience, make sure that all scripts are executable (<code>chmod -R +x *.sh</code>). If you decide to skip this step you can still run the scripts like this (example): <code>sh build_minimal_linux_live.sh</code>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Depending on which Linux OS you are using, there might be one or more (or none, or even more) build dependencies that you need to resolve before you start the build process. If you work with <a target="_blank" href="http://www.ubuntu.com/">Ubuntu</a>, the following command should resolve all necessary build dependencies:
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<code>sudo apt wget make gawk gcc bc genisoimage</code>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Execute the script <code>build_minimal_linux_live.sh</code> and wait. If you have resolved all build dependencies, the whole process should take less than 30 minutes on a modern computer. If the build fails for some reason, most probably there are unresolved build dependencies. Several users reported that the <code>build-essential</code> package resolves all unexpected build dependencies for Ubuntu. If you are using <a target="_blank" href="http://linuxmint.com">Linux Mint</a> try to install the package <code>g++</code> and if you still have troubles then try the <code>build-essential</code> package. On <a target="_blank" href="http://getfedora.org">Fedora</a> you might need the static 'glibc' package <code>glibc-static</code>. Please have in mind that the build dependencies can vary a lot depending on the Linux OS which you use and the software which you have already installed.
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
If you still have troubles then examine the failure message and google it. If you are unable to find solution, then you can ask more experienced Linux guru around you or as alternative you can <a href="http://github.com/ivandavidov/minimal/issues" target="_blank">submit an issue</a>.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
When the scripts finish their job you will find newly generated ISO image file <code>minimal_linux_live.iso</code> in the same folder where you executed the scripts. You can burn the ISO image file on CD/DVD, install it on USB flash drive via <a target="_blank" href="http://www.pendrivelinux.com">Universal USB Installer</a>, or run it directly via PC emulator like <a target="_blank" href="http://virtualbox.org">VirtualBox</a>. The most recent version of Minimal Linux Live requires 256MB RAM, otherwise the boot process most probably will hang.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
The generated ISO image file contains Linux kernel compiled with default options, GNU C library compiled with default options, BusyBox compiled with default options and quite simple initramfs. This means that you don't get Windows support out of the box, nor you get any fancy desktop environment. All you get is a simple shell console which supports all BusyBox applets and... well, that's all. This is why it's called "minimal".
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
The good news is that the build scripts are well organized and small in size. You can easily learn from the scripts and later modify them to include more stuff (I encourage you to do so). After you learn the basics, you will have all the necessary tools and skills to create your own fully functional Linux based operating system. Entirely from scratch!
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
The <a href="#" onclick="javascript:menuSwap(4); return false;">tutorial</a> provides more details about the inner structure of the scripts and the overall build process. I encourage you to go through this document when you have the time. The same tutorial document is automatically included in the generated ISO image, so you can always refer to it.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
Below you can find several screenshots which show what the environment looks like when you boot your newly generated Minimal Linux Live OS.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="four columns">
|
|
||||||
<a href="assets/img/mll_01.png" target="_blank" title="Minimal Linux Live - screenshot 1">
|
|
||||||
<img alt="Minimal Linux Live" id="screenshot1" width="100%" height="100%" border="0" src="assets/img/mll_01.png" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="four columns">
|
|
||||||
<a href="assets/img/mll_02.png" target="_blank" title="Minimal Linux Live - screenshot 2">
|
|
||||||
<img alt="Minimal Linux Live" id="screenshot2" width="100%" height="100%" border="0" src="assets/img/mll_02.png" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="four columns">
|
|
||||||
<a href="assets/img/mll_03.png" target="_blank" title="Minimal Linux Live - screenshot 3">
|
|
||||||
<img alt="Minimal Linux Live" id="screenshot3" width="100%" height="100%" border="0" src="assets/img/mll_03.png" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div class="row">
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="four columns">
|
|
||||||
<a href="assets/img/mll_04.png" target="_blank" title="Minimal Linux Live - screenshot 4">
|
|
||||||
<img alt="Minimal Linux Live" id="screenshot4" width="100%" height="100%" border="0" src="assets/img/mll_04.png" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="four columns">
|
|
||||||
<a href="assets/img/mll_05.png" target="_blank" title="Minimal Linux Live - screenshot 5">
|
|
||||||
<img alt="Minimal Linux Live" id="screenshot5" width="100%" height="100%" border="0" src="assets/img/mll_05.png" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="four columns">
|
|
||||||
<a href="assets/img/mll_06.png" target="_blank" title="Minimal Linux Live - screenshot 6">
|
|
||||||
<img alt="Minimal Linux Live" id="screenshot6" width="100%" height="100%" border="0" src="assets/img/mll_06.png" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="four columns">
|
|
||||||
<a href="assets/img/mll_07.png" target="_blank" title="Minimal Linux Live - screenshot 7">
|
|
||||||
<img alt="Minimal Linux Live" id="screenshot7" width="100%" height="100%" border="0" src="assets/img/mll_07.png" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="four columns">
|
|
||||||
<a href="assets/img/mll_08.png" target="_blank" title="Minimal Linux Live - screenshot 8">
|
|
||||||
<img alt="Minimal Linux Live" id="screenshot8" width="100%" height="100%" border="0" src="assets/img/mll_08.png" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="four columns">
|
|
||||||
<a href="assets/img/mll_09.png" target="_blank" title="Minimal Linux Live - screenshot 9">
|
|
||||||
<img alt="Minimal Linux Live" id="screenshot9" width="100%" height="100%" border="0" src="assets/img/mll_09.png" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="item2" style="display:none;">
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
<h4>Change Log</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
<div id="show6" style="display:none;">
|
|
||||||
<strong>20-Jan-2017</strong>
|
|
||||||
<a href="#" onclick="javascript:logSwap(6, true); return false;">show</a>
|
|
||||||
</div>
|
|
||||||
<div id="hide6" style="display:block;">
|
|
||||||
<strong>20-Jan-2017</strong>
|
|
||||||
<a href="#" onclick="javascript:logSwap(6, false); return false;">hide</a>
|
|
||||||
</div>
|
|
||||||
<div id="text6" style="display:block;">
|
|
||||||
<ul>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<li>
|
|
||||||
<strong>Updated software base</strong> - Minimal Linux Live (MLL) is based on Linux kernel 4.4.44, GNU C library 2.24 and BusyBox 1.26.2. The generated ISO image file is 7MB in size and requires 256MB RAM in order to run properly.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<strong>UEFI support</strong> - MLL is UEFI compliant and the live CD can boot on EFI based systems.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<strong>Additional software via overlay bundles</strong> - the MLL architecture has been significantly improved and you can add more software via the so called "overlay bindles". This feature has been documented in the ".config" file, as well as in the internal README documents. By default these overlay bundles are not part of the build process because they rely on the host machine environment and the may or may not be built correctly on your particular machine. Nevertheless, turning this feature on is very simple and I encourage you to experiment with it.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<strong>Persistence support</strong> - MLL has the ability to transparently persist the changes that have been made during the live session and these changes will be preserved between reboots. You can use this feature to add your own software in MLL, change the MLL file/directory structure or simply to persist whatever changes you've made during the live session. This feature has been documented in the ".config" file, the internal README documents and in the internal shell script comments.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<strong>Smaller ISO image size</strong> - one of the goals for this release was to minimize the ISO image size and make it as small as possible. The final result is ISO image which is now less than 7MB when MLL has been generated with the default configuration options. However, the smaller ISO image size comes at cost and you need more RAM (256MB) in order to boot MLL properly.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<strong>GCC optimization flags</strong> - the MLL configuration allows you to provide your own GCC flags which are used when the software pieces are compiled. These GCC optimization flags are not magical and they may or may not work fine on your particular host machine. They work fine on Ubuntu/Mint host machines and should work fine on other Debian based host machines. You can disable this feature if you get weird compilation issues on your host machine during the build process.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<strong>Syslinux as download dependency</strong> - the "Syslinux" build dependency is no longer mandatory prerequisite requirement because the Syslinux source package is downloaded automatically as part of the build process.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<strong>Graphical boot mode with configurable screen resolution</strong> - MLL can boot in graphical mode. At the begining of the boot process you are presented with option to choose the screen resolution. This feature currently works in BIOS boot mode only.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<strong>Rescue shells during boot</strong> - the MLL boot process has been enhanced and you can temporarily "exit" the boot process in the so called "rescue shell". In fact this is normal shell which runs with PID 1. This is useful if you want to have interactive environment (i.e. shell) while you are still in early "pre-init" boot stage.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<strong>Initial RAM filesystem in separate directory structure</strong> - the initramfs structure has been externalized in separate directory. This makes it easier to modify the initramfs environment.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<strong>Optional use of preconfigured Linux kernel and BusyBox</strong> - you can provide custom Linux kernel and BusyBox configurations. This is useful if you want to build MLL with many non-default options or if you want to distribute your own version of MLL.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<strong>Optional use of already downloaded sources</strong> - this feature does what it says: if you turn it on, you don't need internet connection and you will be using already downloaded sources. This is useful if you don't want to use internet connection or if you want to distribute your own version of MLL which includes specific sources.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<strong>Many more internal improvements</strong> - script enhancements, improved comments and better documentation, the newly introduced overlay build subsystem, additional helpful scripts, etc. Check the ".config" file and the internal README documents for more details.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div id="show5" style="display:block;">
|
|
||||||
<strong>03-Apr-2016</strong>
|
|
||||||
<a href="#" onclick="javascript:logSwap(5, true); return false;">show</a>
|
|
||||||
</div>
|
|
||||||
<div id="hide5" style="display:none;">
|
|
||||||
<strong>03-Apr-2016</strong>
|
|
||||||
<a href="#" onclick="javascript:logSwap(5, false); return false;">hide</a>
|
|
||||||
</div>
|
|
||||||
<div id="text5" style="display:none;">
|
|
||||||
<ul>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<li>
|
|
||||||
<strong>Minimal Linux Live</strong> is now based on <strong>Linux kernel 4.4.6</strong>, <strong>GNU C library 2.23</strong>
|
|
||||||
and <strong>BusyBox 1.24.2</strong>. The generated ISO image file is ~4MB larger due to glibc overhead and requires more RAM
|
|
||||||
(64MB is enough).
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
The build architecture has been revised and now the only core dependency to the host OS is the actual C compiler along with
|
|
||||||
the related binary utils. Kernel headers and main C library (which used to be implicit dependencies) are now automatically
|
|
||||||
generated and used as part of the overall build process.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
The DNS resolving issue has been fixed and the network/internet related BusyBox applets (ping, wget, etc.) now work fine.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
The ISO image generation process is now in a separate script file, completely detached from the kernel build infrastructure.
|
|
||||||
This allows the Minimal Linux Live users to modify the ISO image file/directory structure before the actual ISO generation.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
The internal script comments have been revised and now they are more descriptive than before.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
The experimental folder has been removed.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div id="show4" style="display:block;">
|
|
||||||
<strong>14-Sep-2015</strong>
|
|
||||||
<a href="#" onclick="javascript:logSwap(4, true); return false;">show</a>
|
|
||||||
</div>
|
|
||||||
<div id="hide4" style="display:none;">
|
|
||||||
<strong>14-Sep-2015</strong>
|
|
||||||
<a href="#" onclick="javascript:logSwap(4, false); return false;">hide</a>
|
|
||||||
</div>
|
|
||||||
<div id="text4" style="display:none;">
|
|
||||||
<ul>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<li>
|
|
||||||
<strong>Minimal Linux Live</strong> is now based on <strong>Linux kernel 4.1.6</strong> and <strong>BusyBox 1.23.2</strong>.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
The build process is now parallelized between all available CPU cores, therefore the overall build time is significantly
|
|
||||||
reduced.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
There is DHCP network support for all network devices detected by the kernel. Note that DNS is not working due to well
|
|
||||||
known static linking issues caused by glibc.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
The ISO image is now generated by using <strong>genisoimage</strong>. This fixes some issues with Debian and Arch based
|
|
||||||
host operating systems.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
In addition to the above changes, if you <a href="#" onclick="javascript:menuSwap(5); return false;">download</a> the latest
|
|
||||||
stable build scripts, you will notice a folder named <strong>experimental</strong>. This folder contains some interesting
|
|
||||||
scripts which produce ISO based on Linux kernel and <a href="http://landley.net/toybox" target="_blank">ToyBox</a> instead of
|
|
||||||
BusyBox. Please have in mind that this is work in progress and these scripts may not work on your host OS.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div id="show3" style="display:block;">
|
|
||||||
<strong>07-Feb-2015</strong>
|
|
||||||
<a href="#" onclick="javascript:logSwap(3, true); return false;">show</a>
|
|
||||||
</div>
|
|
||||||
<div id="hide3" style="display:none;">
|
|
||||||
<strong>07-Feb-2015</strong>
|
|
||||||
<a href="#" onclick="javascript:logSwap(3, false); return false;">hide</a>
|
|
||||||
</div>
|
|
||||||
<div id="text3" style="display:none;">
|
|
||||||
<ul>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<li>
|
|
||||||
<strong>Minimal Linux Live</strong> is now based on <strong>Linux kernel 3.18.6</strong> and <strong>BusyBox 1.23.1</strong>.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div id="show2" style="display:block;">
|
|
||||||
<strong>25-Aug-2014</strong>
|
|
||||||
<a href="#" onclick="javascript:logSwap(2, true); return false;">show</a>
|
|
||||||
</div>
|
|
||||||
<div id="hide2" style="display:none;">
|
|
||||||
<strong>25-Aug-2014</strong>
|
|
||||||
<a href="#" onclick="javascript:logSwap(2, false); return false;">hide</a>
|
|
||||||
</div>
|
|
||||||
<div id="text2" style="display:none;">
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<strong>Minimal Linux Live</strong> is now based on <strong>Linux kernel 3.16.1</strong> and <strong>BusyBox 1.22.1</strong>.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
The boot process is now based on <strong>/sbin/init</strong> and <strong>/etc/inittab</strong>. There are four
|
|
||||||
available consoles. You can switch between them with <strong>Alt + F1</strong> up to <strong>Alt + F4</strong>.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Shell scripts have been updated. Now the downloaded source bundles are stored in separate folder.
|
|
||||||
If the download process is interrupted, it will continue the next time the scripts are executed.
|
|
||||||
The most notable change is in <strong>5_generate_rootfs.sh</strong> which now generates root file system with
|
|
||||||
structure compatible with <strong>/sbin/init</strong> and <strong>/etc/inittab</strong>.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div id="show1" style="display:block;">
|
|
||||||
<strong>28-Jul-2014</strong>
|
|
||||||
<a href="#" onclick="javascript:logSwap(1, true); return false;">show</a>
|
|
||||||
</div>
|
|
||||||
<div id="hide1" style="display:none;">
|
|
||||||
<strong>28-Jul-2014</strong>
|
|
||||||
<a href="#" onclick="javascript:logSwap(1, false); return false;">hide</a>
|
|
||||||
</div>
|
|
||||||
<div id="text1" style="display:none;">
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<strong>Minimal Linux Live</strong> is now based on <strong>Linux kernel 3.15.6</strong> and <strong>BusyBox 1.22.1</strong>.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
The boot process is based on simple <strong>/init</strong> script.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="item3" style="display:none;">
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
<h4>About This Project</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
My name is <a target="_blank" href="http://linkedin.com/in/ivandavidov">Ivan Davidov</a> and I currently live and work in <a target="_blank" href="http://en.wikipedia.org/wiki/Sofia">Sofia</a>, <a target="_blank" href="http://en.wikipedia.org/wiki/Bulgaria">Bulgaria</a>.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
I am professional Java software engineer (surprisingly, Java developers tend to know some Linux stuff) and I had been trying to create my own Linux OS for a very long time. Over the years I found some good tutorials online but most of them are not simple to follow and pretty much none of them explain in details what has been done and why it's done in this particular way. In most cases the tutorials are outdated or incomplete and there is high chance that you end up with something broken.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
Don't get me wrong, you can learn a lot from these tutorials, as I did. In fact the scripts which I created are based on the same information resources which you might have already found. The difference is that this website provides you not only with fully functional set of shell scripts which automatically build fully functional live Linux OS, but also with detailed tutorial and probably the best internal documentation you will ever find in an open source project.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
You can follow MLL on <a href="http://facebook.com/MinimalLinuxLive" target="_blank">Facebook</a> and if you find this project useful, I'd very much appreciate it if you <a href="http://paypal.me/MinimalLinuxLive" target="_blank">buy me a beer</a>. Thanks! :)
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
If you'd like to contact me, my e-mail is: <strong>davidov [dot] i (at) gmail {dot} com</strong>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
My LinkedIn profile is here: <a target="_blank" href="http://linkedin.com/in/ivandavidov">http://linkedin.com/in/ivandavidov</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="item4" style="display:none;">
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
<h4>Minimal Linux Live Tutorial</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
Would you like to learn how to build your own minimal live Linux OS?
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
<a target="_blank" href="./the_dao_of_minimal_linux_live.txt">The Dao of Minimal Linux Live</a> is a tutorial document based on the first published version of Minimal Linux Live. The tutorial explains in details what steps are involved in creating simple live Linux OS entirely from scratch, the inner structure of the build scripts and provides you with more information on how to improve/upgrade the generated OS with other generic stuff (e.g. users & groups, /etc/inittab).
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
You can also refer to the <a href="http://github.com/ivandavidov/minimal-linux-script" target="_blank">Minimal Linux Script</a> project which provides you with the minimal set of shell scrip commands that you need in order to create simple, yet fully functional Linux based operating system.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="item5" style="display:none;">
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
<h4>Online PC Emulator</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
You can try <b>Minimal Linux Live</b> directly in your browser. The link below will open new browser window (or tab) with JavaScript based PC emulator which will automatically run the latest version of Minimal Linux Live. Please be advised that this PC emulator runs entirely in your browser and therefore it is not very fast.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
<a target="_blank" href="emulator">Minimal Linux Live - emulator</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
Some screenshots with Minimal Linux Live running in the JavaScript PC emulator:
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="three columns">
|
|
||||||
<a href="assets/img/emulator_01.jpg" target="_blank" title="Minimal Linux Live in JavaScript PC emulator- screenshot 1">
|
|
||||||
<img alt="Minimal Linux Live" id="emulator1" width="100%" height="100%" border="0" src="assets/img/emulator_01.jpg" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="three columns">
|
|
||||||
<a href="assets/img/emulator_02.jpg" target="_blank" title="Minimal Linux Live in JavaScript PC emulator- screenshot 2">
|
|
||||||
<img alt="Minimal Linux Live" id="emulator2" width="100%" height="100%" border="0" src="assets/img/emulator_02.jpg" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="three columns">
|
|
||||||
<a href="assets/img/emulator_03.jpg" target="_blank" title="Minimal Linux Live in JavaScript PC emulator- screenshot 3">
|
|
||||||
<img alt="Minimal Linux Live" id="emulator3" width="100%" height="100%" border="0" src="assets/img/emulator_03.jpg" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="three columns">
|
|
||||||
<a href="assets/img/emulator_04.jpg" target="_blank" title="Minimal Linux Live in JavaScript PC emulator- screenshot 4">
|
|
||||||
<img alt="Minimal Linux Live" id="emulator4" width="100%" height="100%" border="0" src="assets/img/emulator_04.jpg" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div class="row">
|
|
||||||
</div>
|
|
||||||
<div id="item6" style="display:none;">
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
<h4>Download Section</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
The latest stable scripts (20-Jan-2017) can be downloaded as "tar.xz" archive
|
|
||||||
<a href="./download/minimal_linux_live_20-Jan-2017_src.tar.xz" title="Minimal Linux Live - shell scripts">here</a>.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
Pre-built ISO image files generated with the latest stable scripts are available for
|
|
||||||
<a href="./download/minimal_linux_live_20-Jan-2017_32-bit.iso" title="Minimal Linux Live - ISO image file for 32-bit CPUs">32-bit</a>
|
|
||||||
and
|
|
||||||
<a href="./download/minimal_linux_live_20-Jan-2017_64-bit.iso" title="Minimal Linux Live - ISO image file for 64-bit CPUs">64-bit</a>
|
|
||||||
CPUs.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
You can also <a target="_blank" href="./download">browse the download directory</a>.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns">
|
|
||||||
You can take a look at the latest development sources in
|
|
||||||
<a target="_blank" href="http://github.com/ivandavidov/minimal">GitHub</a>.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="twelve columns" style="text-align: center;">
|
|
||||||
<a class="button" href="#">Go to top</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 10%;"> </div>
|
|
||||||
<div id="footer" class="row" style="text-align: center;">
|
|
||||||
<div class="twelve columns">
|
|
||||||
<a href="." title="Minimal Linux Live">Minimal Linux Live</a>
|
|
||||||
<span class="separator">|</span>
|
|
||||||
Copyright © 2014 - 2017
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script language="JavaScript" type="text/javascript">
|
|
||||||
function menuSwap(itemIndex) {
|
|
||||||
for(var i = 1; i <= 6; i++) {
|
|
||||||
var strItem = "item" + i;
|
|
||||||
var objItem = document.getElementById(strItem);
|
|
||||||
objItem.style.display = (i == itemIndex) ? "block" : "none";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function logSwap(itemIndex, show) {
|
|
||||||
for(var i = 1; i <= 6; i++) {
|
|
||||||
var showObj = document.getElementById("show" + i);
|
|
||||||
var hideObj = document.getElementById("hide" + i);
|
|
||||||
var textObj = document.getElementById("text" + i);
|
|
||||||
|
|
||||||
if(i == itemIndex) {
|
|
||||||
if(show == true) {
|
|
||||||
showObj.style.display = "none";
|
|
||||||
hideObj.style.display = "block";
|
|
||||||
textObj.style.display = "block";
|
|
||||||
} else {
|
|
||||||
showObj.style.display = "block";
|
|
||||||
hideObj.style.display = "none";
|
|
||||||
textObj.style.display = "none";
|
|
||||||
}
|
|
||||||
} else if(show == true) {
|
|
||||||
showObj.style.display = "block";
|
|
||||||
hideObj.style.display = "none";
|
|
||||||
textObj.style.display = "none";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function thankYou() {
|
|
||||||
var footer = document.getElementById("footer");
|
|
||||||
var footerDiv = footer.getElementsByTagName("div")[0];
|
|
||||||
var html = footerDiv.innerHTML;
|
|
||||||
|
|
||||||
var sepa = ' <span class="separator">|</span> ';
|
|
||||||
var afterSepa = '<a target="_blank" href="http://{1}">{2}</a>'
|
|
||||||
|
|
||||||
var hostname = window.location.hostname;
|
|
||||||
|
|
||||||
switch(hostname) {
|
|
||||||
case 'minimal.idzona.com' : {
|
|
||||||
html += sepa;
|
|
||||||
html += afterSepa.replace("{1}", 'microweber.com').replace("{2}", 'Microweber CMS');
|
|
||||||
|
|
||||||
footerDiv.innerHTML = html;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'linux.idzona.com' : {
|
|
||||||
html += sepa;
|
|
||||||
html += 'Hosted by John Doe - thank you!';
|
|
||||||
|
|
||||||
footerDiv.innerHTML = html;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'skamilinux.hu' : {
|
|
||||||
html += sepa;
|
|
||||||
html += 'Hosted by <a target="_blank" href="http://skamilinux.hu">skamilinux.hu</a> - thank you!';
|
|
||||||
|
|
||||||
footerDiv.innerHTML = html;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'minimal.linux-bg.org' : {
|
|
||||||
html += sepa;
|
|
||||||
html += 'Hosted by <a target="_blank" href="http://linux-bg.org">linux-bg.org</a> - thank you!';
|
|
||||||
|
|
||||||
footerDiv.innerHTML = html;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
if(hostname != "") {
|
|
||||||
html += sepa;
|
|
||||||
html += afterSepa.replace("{1}", hostname).replace("{2}", hostname);
|
|
||||||
|
|
||||||
footerDiv.innerHTML = html;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
if(window.location.hostname != "") {
|
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
||||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
||||||
ga('create', 'UA-53254151-1', 'auto');
|
|
||||||
ga('send', 'pageview');
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
@ -1,754 +0,0 @@
|
|||||||
|
|
||||||
The Dao of Minimal Linux Live (02-Oct-2016)
|
|
||||||
|
|
||||||
Author: Ivan Davidov
|
|
||||||
|
|
||||||
Website: http://minimal.idzona.com
|
|
||||||
http://skamilinux.hu/minimal
|
|
||||||
http://linux.idzona.com
|
|
||||||
http://minimal.linux-bg.org
|
|
||||||
|
|
||||||
GitHub: http://github.com/ivandavidov/minimal
|
|
||||||
http://github.com/ivandavidov/minimal-linux-script
|
|
||||||
|
|
||||||
Email: davidov (dot) i {at} gmail [dot] com
|
|
||||||
|
|
||||||
Redistributed by: <put your name and contact details somewhere here>
|
|
||||||
|
|
||||||
### ### ###
|
|
||||||
|
|
||||||
Contents
|
|
||||||
|
|
||||||
1. Preface
|
|
||||||
2. Boot Process
|
|
||||||
3. Inside The Shell Scripts
|
|
||||||
4. Possible Improvements
|
|
||||||
5. Next Steps
|
|
||||||
6. Epilogue
|
|
||||||
|
|
||||||
### ### ###
|
|
||||||
|
|
||||||
1. Preface
|
|
||||||
|
|
||||||
Please feel free to redistribute this document in any form you see fit. I only ask you to
|
|
||||||
respect my efforts and keep me as the original author. That's all I ask.
|
|
||||||
|
|
||||||
Note that the explanations regarding the script details are based on the "28-Jul-2014"
|
|
||||||
version of "Minimal Linux Live". Future versions of the scripts may already include some
|
|
||||||
of the stuff discussed in the section "Possible Improvements".
|
|
||||||
|
|
||||||
### ### ###
|
|
||||||
|
|
||||||
2. Boot Process
|
|
||||||
|
|
||||||
The overall boot process is quite complex but we need to know these details since we are
|
|
||||||
talking about operating systems and to be more precise - Linux based operating systems.
|
|
||||||
|
|
||||||
You can find some general information here:
|
|
||||||
|
|
||||||
http://en.wikipedia.org/wiki/Linux_startup_process
|
|
||||||
|
|
||||||
When we talk about live Linux OS, the overall boot process is the following:
|
|
||||||
|
|
||||||
1) BIOS gives the execution control to the boot loader present on the boot media such
|
|
||||||
as CD, DVD, USB flash or something else.
|
|
||||||
2) In most cases the boot loader is based on Syslinux. On our boot media we should have
|
|
||||||
two special files - the kernel file and the initramfs file.
|
|
||||||
3) The boot media also contains a special configuration file which points to the location
|
|
||||||
of the kernel/initramfs files.
|
|
||||||
4) Now that Syslinux knows where the kernel file is, it loads it in the RAM and passes
|
|
||||||
the execution control to it.
|
|
||||||
5) The kernel detects the available hardware, loads necessary drivers and then it passes
|
|
||||||
the execution control to the initramfs.
|
|
||||||
6) The initramfs file is an archive which is unpacked automatically by the kernel in the
|
|
||||||
RAM. The actual execution control is passed to the shell script file /init which must
|
|
||||||
be present in the initramfs file.
|
|
||||||
7) Since we are talking about minimal live CD, in theory /init is not supposed to do much.
|
|
||||||
All we need form /init is to prepare the environment and provide the user with shell.
|
|
||||||
In most live Linux distributions the /init script is supposed to do much more work
|
|
||||||
but in our case for now it is enough to know that the point at which we take the control
|
|
||||||
is exactly the /init script.
|
|
||||||
|
|
||||||
### ### ###
|
|
||||||
|
|
||||||
3. Inside The Shell Scripts
|
|
||||||
|
|
||||||
So far we learned that we need several pieces in order to build a live Linux OS:
|
|
||||||
|
|
||||||
1) boot loader - to make our media bootable.
|
|
||||||
2) kernel file - to take care of the initial system bootstrap process.
|
|
||||||
3) initramfs file - to prepare the necessary environment for the user.
|
|
||||||
|
|
||||||
This document focuses on parts (2) and (3). The reason we won't discuss (1) in details is
|
|
||||||
because the build process that we are going to rely on later, takes care of the boot loader
|
|
||||||
part automatically.
|
|
||||||
|
|
||||||
The ZIP which you have downloaded contains the following files:
|
|
||||||
|
|
||||||
.config
|
|
||||||
0_prepare.sh
|
|
||||||
1_get_kernel.sh
|
|
||||||
2_build_kernel.sh
|
|
||||||
3_get_busybox.sh
|
|
||||||
4_build_busybox.sh
|
|
||||||
5_generate_rootfs.sh
|
|
||||||
6_pack_rootfs.sh
|
|
||||||
7_generate_iso.sh
|
|
||||||
build_minimal_linux_live.sh
|
|
||||||
|
|
||||||
If you have followed the explanation posted on http://minimal.idzona.com then you already
|
|
||||||
know that you need to execute the script "build_minimal_linux_live.sh". If you open this
|
|
||||||
file with text editor you will find out that all this script does is to execute all other
|
|
||||||
scripts one by one.
|
|
||||||
|
|
||||||
From this point onwards, I encourage you to execute the script files one by one. We will
|
|
||||||
start with "0_prepare.sh". If you take a look at the script's contents, you will find out that
|
|
||||||
all the script does is to create an empty folder named "work". We will store our temporary
|
|
||||||
work files there.
|
|
||||||
|
|
||||||
OK, let's continue with the kernel. Somehow we need to end up with fully functional kernel which
|
|
||||||
is able to do the system initialization for us. We need to download the kernel sources, compile
|
|
||||||
these sources and finally pack the kernel.
|
|
||||||
|
|
||||||
The script "1_get_kernel.sh" downloads the kernel sources and unpacks them. Here is the full
|
|
||||||
source code of the script:
|
|
||||||
|
|
||||||
#/bin/sh
|
|
||||||
|
|
||||||
DOWNLOAD_URL=$(grep -i KERNEL_SOURCE_URL .config | cut -f2 -d'=')
|
|
||||||
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
|
|
||||||
|
|
||||||
cd work
|
|
||||||
rm -f $ARCHIVE_FILE
|
|
||||||
wget $DOWNLOAD_URL
|
|
||||||
rm -rf kernel
|
|
||||||
mkdir kernel
|
|
||||||
tar -xvf $ARCHIVE_FILE -C kernel
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
First we read the ".config" file to find the URL for the kernel sources. The URL is stored in
|
|
||||||
the variable "DOWNLOAD_URL". Then we get the actual name of the archive file and we store the
|
|
||||||
name in the variable "ARCHIVE_FILE".
|
|
||||||
|
|
||||||
The important part of the script is the line where we get the kernel sources:
|
|
||||||
|
|
||||||
wget $DOWNLOAD_URL
|
|
||||||
|
|
||||||
The next important part of the script is the line where we unpack the kernel sources:
|
|
||||||
|
|
||||||
tar -xvf $ARCHIVE_FILE -C kernel
|
|
||||||
|
|
||||||
At this point we have downloaded and unpacked the kernel sources. So far so good. Now we need
|
|
||||||
to compile them. We move to the next script in the chain called "2_build_kernel.sh". Here is
|
|
||||||
the full source code that we are going to analyse:
|
|
||||||
|
|
||||||
#/bin/sh
|
|
||||||
|
|
||||||
cd work/kernel
|
|
||||||
cd $(ls -d *)
|
|
||||||
make clean
|
|
||||||
make defconfig
|
|
||||||
sed -i "s/.*CONFIG_DEFAULT_HOSTNAME.*/CONFIG_DEFAULT_HOSTNAME=\"minimal-linux-live\"/" .config
|
|
||||||
make vmlinux
|
|
||||||
cd ../../..
|
|
||||||
|
|
||||||
First we navigate to the kernel source folder. Then we execute the following commands:
|
|
||||||
|
|
||||||
make clean
|
|
||||||
|
|
||||||
The above command cleans the output from our previous kernel builds. Obviously, if this is the
|
|
||||||
first time we go through the build process, we have nothing to clean.
|
|
||||||
|
|
||||||
make defconfig
|
|
||||||
|
|
||||||
The above command creates new ".config" file in the current folder which contains all default
|
|
||||||
configuration parameters that we need in order to build our new kernel. Note that the defaults
|
|
||||||
will be either 32 or 64 bit specific, depending on your Linux environment.
|
|
||||||
|
|
||||||
sed -i "s/.*CONFIG_DEFAULT_HOSTNAME.*/CONFIG_DEFAULT_HOSTNAME=\"minimal-linux-live\"/" .config
|
|
||||||
|
|
||||||
The above command searches for a specific line in the ".config" file which contains the string
|
|
||||||
"CONFIG_DEFAULT_HOSTNAME" and replaces the whole line with the following text:
|
|
||||||
|
|
||||||
CONFIG_DEFAULT_HOSTNAME="minimal-linux-live"
|
|
||||||
|
|
||||||
Later, when you boot up your live Linux OS you can execute the command "uname -a" and you will
|
|
||||||
see the string "minimal-linux-live" in the output. All we did was to replace the default value
|
|
||||||
"(none)" with our custom value.
|
|
||||||
|
|
||||||
Now you have a sample command which you can use to search for specific configurations in the
|
|
||||||
file ".config" and replace these configurations with your own. Obviously, you can skip this
|
|
||||||
replacement and everything will work just fine. Like I said, the only difference will be that
|
|
||||||
the default host name will be "minimal-linux-live" instead of "(none)".
|
|
||||||
|
|
||||||
Now we come to the most important and also the slowest part in the whole process. We need to
|
|
||||||
actually create the kernel.
|
|
||||||
|
|
||||||
make vmlinux
|
|
||||||
|
|
||||||
The above command will compile the Linux kernel. This takes a lot of time, so I guess it's
|
|
||||||
high time for a short break. The final kernel file is located here:
|
|
||||||
|
|
||||||
arch/x86/boot/bzImage
|
|
||||||
|
|
||||||
OK, at this point we should have a kernel file compiled with default options, where we have
|
|
||||||
changed the default host name with some other value of our own. Now we move to the next
|
|
||||||
part.
|
|
||||||
|
|
||||||
The kernel itself is far from enough - we also need some kind of environment with basic
|
|
||||||
command line tools like ls, cat, mkdir, etc. This environment is called "initramfs" which
|
|
||||||
stands for "initial RAM file system". This is what we are going to do:
|
|
||||||
|
|
||||||
1) We are going to download & compile BusyBox. This will give us the basic command line
|
|
||||||
tools that we need for normal work in console mode.
|
|
||||||
2) We will use BusyBox to provide us with some default directory/file structure which
|
|
||||||
we will modify into our own initramfs file.
|
|
||||||
|
|
||||||
One by one - we need to download and unpack the BusyBox sources. Let's take a look at the
|
|
||||||
script file "3_get_busybox.sh":
|
|
||||||
|
|
||||||
#/bin/sh
|
|
||||||
|
|
||||||
DOWNLOAD_URL=$(grep -i BUSYBOX_SOURCE_URL .config | cut -f2 -d'=')
|
|
||||||
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
|
|
||||||
|
|
||||||
cd work
|
|
||||||
rm -f $ARCHIVE_FILE
|
|
||||||
wget $DOWNLOAD_URL
|
|
||||||
rm -rf busybox
|
|
||||||
mkdir busybox
|
|
||||||
tar -xvf $ARCHIVE_FILE -C busybox
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
The contents is almost identical to the one in "1_get_kernel.sh" which we have already
|
|
||||||
explained above. Long story short - we get the source archive with "wget" and then we
|
|
||||||
unpack the sources with "tar". That's it. Nothing complex at all.
|
|
||||||
|
|
||||||
Now that we have BusyBox sources we need to compile them. Let's take a look at the next
|
|
||||||
script "4_build_busybox.sh" which we need to execute:
|
|
||||||
|
|
||||||
#/bin/sh
|
|
||||||
|
|
||||||
cd work/busybox
|
|
||||||
cd $(ls -d *)
|
|
||||||
make clean
|
|
||||||
make defconfig
|
|
||||||
sed -i "s/.*CONFIG_STATIC.*/CONFIG_STATIC=y/" .config
|
|
||||||
make busybox
|
|
||||||
make install
|
|
||||||
cd ../../..
|
|
||||||
|
|
||||||
You have probably already noticed it - we are going to execute several "make" commands
|
|
||||||
and meanwhile we are going to change one property in the ".config" file. Let's go
|
|
||||||
through all of these commands:
|
|
||||||
|
|
||||||
make clean
|
|
||||||
|
|
||||||
The above command ensures that we will get rid of all build artefacts, assuming this
|
|
||||||
is not the first time we go through the BusyBox build process.
|
|
||||||
|
|
||||||
make defconfig
|
|
||||||
|
|
||||||
The above command creates new ".config" file which contains the defaults for proper
|
|
||||||
BusyBox build process. Again, nothing extraordinary here.
|
|
||||||
|
|
||||||
sed -i "s/.*CONFIG_STATIC.*/CONFIG_STATIC=y/" .config
|
|
||||||
|
|
||||||
The above command is very important because we inform the build process to build
|
|
||||||
static version of BusyBox, which means that the BusyBox executable file will not
|
|
||||||
be dependent on any external library. We cannot skip this, otherwise our OS will
|
|
||||||
fail with "kernel panic" when we try to boot.
|
|
||||||
|
|
||||||
make busybox
|
|
||||||
|
|
||||||
The above command compiles BusyBox. Nothing interesting here. The build should be
|
|
||||||
significantly faster compared to the kernel build.
|
|
||||||
|
|
||||||
make install
|
|
||||||
|
|
||||||
The above command creates new "_install" folder and installs BusyBox in it. We
|
|
||||||
will use this folder as a base for our new initramfs file.
|
|
||||||
|
|
||||||
At this point we should have kernel compiled with default settings (yes, we changed
|
|
||||||
one setting but it's not a big deal) and we should also have BusyBox compiled with
|
|
||||||
static option enabled and all other default settings.
|
|
||||||
|
|
||||||
Now we come to the part where we create our own initramfs folder which later on we
|
|
||||||
will pack into a file. The steps that we are going to follow are these:
|
|
||||||
|
|
||||||
1) Use the already created "_install" folder as base for initramfs.
|
|
||||||
2) Create some new folders in the initramfs folder.
|
|
||||||
3) Create some configuration files in the initramfs folder.
|
|
||||||
|
|
||||||
Now we come to the script "5_generate_rootfs.sh" which is responsible to generate
|
|
||||||
proper initramfs folder with all necessary files and sub-folders in it.
|
|
||||||
|
|
||||||
#/bin/sh
|
|
||||||
|
|
||||||
cd work
|
|
||||||
rm -rf rootfs
|
|
||||||
cd busybox
|
|
||||||
cd $(ls -d *)
|
|
||||||
cp -R _install ../../rootfs
|
|
||||||
cd ../../rootfs
|
|
||||||
rm -f linuxrc
|
|
||||||
mkdir dev
|
|
||||||
mkdir etc
|
|
||||||
mkdir proc
|
|
||||||
mkdir src
|
|
||||||
mkdir sys
|
|
||||||
mkdir tmp
|
|
||||||
cd etc
|
|
||||||
touch welcome.txt
|
|
||||||
echo >> welcome.txt
|
|
||||||
echo ' #####################################' >> welcome.txt
|
|
||||||
echo ' # #' >> welcome.txt
|
|
||||||
echo ' # Welcome to "Minimal Linux Live" #' >> welcome.txt
|
|
||||||
echo ' # #' >> welcome.txt
|
|
||||||
echo ' #####################################' >> welcome.txt
|
|
||||||
echo >> welcome.txt
|
|
||||||
cd ..
|
|
||||||
touch init
|
|
||||||
echo '#!/bin/sh' >> init
|
|
||||||
echo 'dmesg -n 1' >> init
|
|
||||||
echo 'mount -t devtmpfs none /dev' >> init
|
|
||||||
echo 'mount -t proc none /proc' >> init
|
|
||||||
echo 'mount -t sysfs none /sys' >> init
|
|
||||||
echo 'cat /etc/welcome.txt' >> init
|
|
||||||
echo 'while true' >> init
|
|
||||||
echo 'do' >> init
|
|
||||||
echo ' setsid cttyhack /bin/sh' >> init
|
|
||||||
echo 'done' >> init
|
|
||||||
echo >> init
|
|
||||||
chmod +x init
|
|
||||||
cp ../../*.sh src
|
|
||||||
cp ../../.config src
|
|
||||||
cd ../..
|
|
||||||
|
|
||||||
As you see, this script is much longer than the others. Let's take a look at the
|
|
||||||
important parts one by one.
|
|
||||||
|
|
||||||
cd work
|
|
||||||
rm -rf rootfs
|
|
||||||
cd busybox
|
|
||||||
cd $(ls -d *)
|
|
||||||
cp -R _install ../../rootfs
|
|
||||||
cd ../../rootfs
|
|
||||||
|
|
||||||
The above code snippet removes the old initramfs folder called "rootfs" and then
|
|
||||||
copies the "_install" folder (the one created by BusyBox) with new name "rootfs".
|
|
||||||
This folder is going to be our new initramfs focal point.
|
|
||||||
|
|
||||||
rm -f linuxrc
|
|
||||||
|
|
||||||
The folder "rootfs" contains file "linuxrc" which we don't need since we are going
|
|
||||||
to use initramfs boot scheme. Take a look at the following Wikipedia article for
|
|
||||||
more details:
|
|
||||||
|
|
||||||
http://en.wikipedia.org/wiki/Initrd
|
|
||||||
|
|
||||||
OK, lets go on.
|
|
||||||
|
|
||||||
mkdir dev
|
|
||||||
mkdir etc
|
|
||||||
mkdir proc
|
|
||||||
mkdir src
|
|
||||||
mkdir sys
|
|
||||||
mkdir tmp
|
|
||||||
|
|
||||||
The above code snippet creates some basic folders which we are going to use later.
|
|
||||||
|
|
||||||
cd etc
|
|
||||||
touch welcome.txt
|
|
||||||
echo >> welcome.txt
|
|
||||||
echo ' #####################################' >> welcome.txt
|
|
||||||
echo ' # #' >> welcome.txt
|
|
||||||
echo ' # Welcome to "Minimal Linux Live" #' >> welcome.txt
|
|
||||||
echo ' # #' >> welcome.txt
|
|
||||||
echo ' #####################################' >> welcome.txt
|
|
||||||
echo >> welcome.txt
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
The above code snippet creates the file "/etc/welcome.txt" and fills it with the message
|
|
||||||
which will be displayed every time we boot up the system.
|
|
||||||
|
|
||||||
touch init
|
|
||||||
echo '#!/bin/sh' >> init
|
|
||||||
echo 'dmesg -n 1' >> init
|
|
||||||
echo 'mount -t devtmpfs none /dev' >> init
|
|
||||||
echo 'mount -t proc none /proc' >> init
|
|
||||||
echo 'mount -t sysfs none /sys' >> init
|
|
||||||
echo 'cat /etc/welcome.txt' >> init
|
|
||||||
echo 'while true' >> init
|
|
||||||
echo 'do' >> init
|
|
||||||
echo ' setsid cttyhack /bin/sh' >> init
|
|
||||||
echo 'done' >> init
|
|
||||||
echo >> init
|
|
||||||
|
|
||||||
The above code snippet creates the file "/init" which is going to be invoked by our kernel
|
|
||||||
when we boot up the system. In fact we create new shell script file. This is what our new
|
|
||||||
"/init" script does:
|
|
||||||
|
|
||||||
dmesg -n 1 - We hide all kernel messages. We don't want them in our
|
|
||||||
console. Only kernel panic messages will be displayed.
|
|
||||||
mount -t devtmpfs none /dev - With this command we politely ask the kernel to
|
|
||||||
populate the /dev folder with all necessary system
|
|
||||||
devices like "console", "tty", etc. We also have nice
|
|
||||||
names for the hardware devices like "sr0", "sda", etc.
|
|
||||||
mount -t proc none /proc - The kernel populates the /proc folder.
|
|
||||||
mount -t sysfs none /sys - The kernel populates the /sys folder.
|
|
||||||
cat /etc/welcome.txt - Now we display the welcome message.
|
|
||||||
while true - This code snippet starts shell on "tty" device and
|
|
||||||
setsid cttyhack /bin/sh we rest assured that when we execute the "exit"
|
|
||||||
done command new shell will be started automatically.
|
|
||||||
|
|
||||||
As you see, the "/init" script file doesn't do much but what it does is really essential.
|
|
||||||
We have only one more bit of code relevant to the "/init" file:
|
|
||||||
|
|
||||||
chmod +x init
|
|
||||||
|
|
||||||
The above command ensures that our "/init" script is executable.
|
|
||||||
|
|
||||||
cp ../../*.sh src
|
|
||||||
cp ../../.config src
|
|
||||||
|
|
||||||
The last thing we do is to copy all "Minimal Linux Live" shell scripts (including the
|
|
||||||
configuration file) in the "/src" folder. The scripts won't do anything there. This step
|
|
||||||
simply ensures that the live Linux ISO file which we are going to create later contains
|
|
||||||
the build sources, just for reference.
|
|
||||||
|
|
||||||
OK, at this point we have "rootfs" folder which contains all necessary files and
|
|
||||||
configurations for our initramfs file. The next step is to pack the "rootfs" folder
|
|
||||||
into an actual initramfs file. Let's take a look at "6_pack_rootfs.sh":
|
|
||||||
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
cd work
|
|
||||||
rm -f rootfs.cpio.gz
|
|
||||||
cd rootfs
|
|
||||||
find . | cpio -H newc -o | gzip > ../rootfs.cpio.gz
|
|
||||||
cd ../..
|
|
||||||
|
|
||||||
The above script removes the already existing initramfs file called "rootfs.cpio.gz"
|
|
||||||
and then creates a new file called "rootfs.cpio.gz" based on the contents of the
|
|
||||||
"rootfs" folder.
|
|
||||||
|
|
||||||
We are almost finished. At this point we have already compiled the Linux kernel and we
|
|
||||||
have also created initramfs file based on BusyBox and our own set of configurations.
|
|
||||||
The last thing to do is to generate bootable ISO file. Let's take a look at the last
|
|
||||||
script "7_generate_iso.sh":
|
|
||||||
|
|
||||||
#/bin/sh
|
|
||||||
|
|
||||||
rm -f minimal_linux_live.iso
|
|
||||||
cd work/kernel
|
|
||||||
cd $(ls -d *)
|
|
||||||
make isoimage FDINITRD=../../rootfs.cpio.gz
|
|
||||||
cp arch/x86/boot/image.iso ../../../minimal_linux_live.iso
|
|
||||||
cd ../../..
|
|
||||||
|
|
||||||
As usual, we first remove the already generated ISO file, assuming this is not the first
|
|
||||||
time we go through this process. Then we navigate to the kernel's source folder and
|
|
||||||
we execute the following command:
|
|
||||||
|
|
||||||
make isoimage FDINITRD=../../rootfs.cpio.gz
|
|
||||||
|
|
||||||
The above command generates bootable ISO based on the already compiled Linux kernel and
|
|
||||||
it uses the initramfs file which we pass to the "make" command as additional parameter.
|
|
||||||
The generated ISO file is then copied to the folder where we are executing our scripts.
|
|
||||||
|
|
||||||
UPDATE (02-Oct-2016): The "make isoimage" command relies on Syslinux older than 5.0.
|
|
||||||
The issue is that Syslinux versions after 5.0 require ldlinux.c32 which is not handled
|
|
||||||
correctly by the kernel's Makefile. You need to appply a patch to the Makefile in order
|
|
||||||
to make it work correctly. I find it easier to edit the Makefile and apply the patch
|
|
||||||
changes manually:
|
|
||||||
|
|
||||||
https://github.com/ivandavidov/minimal/issues/10
|
|
||||||
|
|
||||||
http://github.com/mhiramat/boot2minc/blob/master/src/patches/kernel/x86-copy-linux-c32-for-newer.patch
|
|
||||||
|
|
||||||
if [ -f /usr/$$i/syslinux/isolinux.bin ] ; then \ # old line
|
|
||||||
cp /usr/$$i/syslinux/isolinux.bin $(obj)/isoimage ; \ # old line
|
|
||||||
if [ -f /usr/$$i/syslinux/ldlinux.c32 ] ; then \ # new line (patch)
|
|
||||||
cp /usr/$$i/syslinux/ldlinux.c32 $(obj)/isoimage ; \ # new line (patch)
|
|
||||||
fi ; \ # new line (patch)
|
|
||||||
break ; \ # old line
|
|
||||||
fi ; \ # old line
|
|
||||||
|
|
||||||
Another possible solution is to manually generate the ISO image by executing the
|
|
||||||
command "genisoimage" with the appropriate arguaments. You can take a look at the
|
|
||||||
project "Minimal Linux Script" which follows the "genisoimage" approach:
|
|
||||||
|
|
||||||
http://github.com/ivandavidov/minimal-linux-script
|
|
||||||
|
|
||||||
### ### ###
|
|
||||||
|
|
||||||
4. Possible Improvements
|
|
||||||
|
|
||||||
Now that you have played around with your shiny new live Linux OS, you have probably
|
|
||||||
noticed that you are logged in automatically and you have no restrictions. However,
|
|
||||||
it only looks like you are automatically logged in. Yes, you get shell console and
|
|
||||||
this console allows you to perform "root" operations, but this doesn't mean that you
|
|
||||||
are logged in as "root" or any other user. In fact there are no users and groups in
|
|
||||||
the system.
|
|
||||||
|
|
||||||
I'll show you the proper way to add some users and groups from within your system
|
|
||||||
while it is still running. You can examine the final result for yourself and modify
|
|
||||||
the "5_generate_rootfs.sh" script according to your needs.
|
|
||||||
|
|
||||||
OK, let's go with the "root" account!
|
|
||||||
|
|
||||||
touch /etc/group
|
|
||||||
|
|
||||||
The above command will create empty file "/etc/group" where we store the information
|
|
||||||
for all groups.
|
|
||||||
|
|
||||||
addgroup -g 0 root
|
|
||||||
|
|
||||||
The above command will create a group "root" with group identification number "0".
|
|
||||||
It is important to provide 0 (zero) as group identifier (gid) because this is the
|
|
||||||
expected gid for "root".
|
|
||||||
|
|
||||||
touch /etc/passwd
|
|
||||||
|
|
||||||
The above command will create empty file "/etc/passwd" where we store the login
|
|
||||||
information for our users.
|
|
||||||
|
|
||||||
adduser -h /root -G root -u 0 root
|
|
||||||
|
|
||||||
The above command will create user "root" with home folder "/root", assign the new
|
|
||||||
user to the "root" group and set user identifier (uid) "0". It is important to
|
|
||||||
provide 0 (zero) as uid because this is the expected uid for the "root" user. Add
|
|
||||||
whatever password you want when asked. Try to remember it.
|
|
||||||
|
|
||||||
login
|
|
||||||
|
|
||||||
The above command will initiate the login process. Now you should be able to log in
|
|
||||||
as "root" with the password which you have provided.
|
|
||||||
|
|
||||||
--- --- ---
|
|
||||||
|
|
||||||
Another possible improvement is to set appropriate "global" rights (including the 't'
|
|
||||||
sticky flag) for the /tmp folder. You can do that by executing the following command:
|
|
||||||
|
|
||||||
chmod 1777 /tmp
|
|
||||||
|
|
||||||
The reason I haven't included this in the /init script is because in this particular
|
|
||||||
situation it doesn't really matter. By default we get uid=0 shell console and we have
|
|
||||||
full and unrestricted access to the /tmp folder. However, if you decide to add more
|
|
||||||
users to the system (not just the "root" user), you may also include the above command
|
|
||||||
in the /init script file.
|
|
||||||
|
|
||||||
--- --- ---
|
|
||||||
|
|
||||||
Probably the easiest update you can do is to re-compile the kernel with other than
|
|
||||||
default options. This is how we do it for the kernel. First of all we need to know
|
|
||||||
what possible options we have. Navigate to the kernel's source folder and execute the
|
|
||||||
following command:
|
|
||||||
|
|
||||||
make help
|
|
||||||
|
|
||||||
We have several options for interactive ".config" generation. Let's go with this one:
|
|
||||||
|
|
||||||
make menuconfig
|
|
||||||
|
|
||||||
You might need to resolve one more dependency ("ncurses") if you want the above command
|
|
||||||
to work. Once you do that you can choose any kernel configuration options you like. The
|
|
||||||
provided menu is quite complex but we are not in hurry. Take your time and enable or
|
|
||||||
disable any options you want. Don't forget to save your configuration. Now all we need
|
|
||||||
is to compile the new kernel.
|
|
||||||
|
|
||||||
make vmlinux
|
|
||||||
|
|
||||||
Depending on your configuration this time the build might take longer. Obviously if
|
|
||||||
you decide to go through manual kernel ".config" configuration you can no longer use
|
|
||||||
the script "2_build_kernel.sh" because it will override your new configuration with
|
|
||||||
the default configuration.
|
|
||||||
|
|
||||||
--- --- ---
|
|
||||||
|
|
||||||
Even though we haven't discussed this topic, you might have already noticed that the
|
|
||||||
file ".config" which comes along with the other build scripts contains the URL
|
|
||||||
locations for the kernel sources and the BusyBox sources. You can easily build live
|
|
||||||
Linux OS based on different kernel/BusyBox versions if you provide different
|
|
||||||
URLs in the ".config" file. Here is the content of the default ".config" file:
|
|
||||||
|
|
||||||
# You can find the latest Linux kernel source bundles here:
|
|
||||||
#
|
|
||||||
# http://kernel.org
|
|
||||||
#
|
|
||||||
KERNEL_SOURCE_URL=https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.15.6.tar.xz
|
|
||||||
|
|
||||||
# You can find the latest BusyBox source bundles here:
|
|
||||||
#
|
|
||||||
# http://busybox.net
|
|
||||||
#
|
|
||||||
BUSYBOX_SOURCE_URL=http://busybox.net/downloads/busybox-1.22.1.tar.bz2
|
|
||||||
|
|
||||||
Of course, once you do that you also need to go through the scripts "1_get_kernel.sh"
|
|
||||||
and "3_get_busybox.sh" or execute the relevant commands from these scripts manually.
|
|
||||||
|
|
||||||
--- --- ---
|
|
||||||
|
|
||||||
Another very interesting improvement is to execute /sbin/init and rely on further
|
|
||||||
configuration provided in /etc/inittab. Here is the modified version of the shell
|
|
||||||
script "5_generate_rootfs.sh":
|
|
||||||
|
|
||||||
#/bin/sh
|
|
||||||
|
|
||||||
cd work
|
|
||||||
rm -rf rootfs
|
|
||||||
cd busybox
|
|
||||||
cd $(ls -d *)
|
|
||||||
cp -R _install ../../rootfs
|
|
||||||
cd ../../rootfs
|
|
||||||
rm -f linuxrc
|
|
||||||
mkdir dev
|
|
||||||
mkdir etc
|
|
||||||
mkdir proc
|
|
||||||
mkdir src
|
|
||||||
mkdir sys
|
|
||||||
mkdir tmp
|
|
||||||
cd etc
|
|
||||||
touch bootscript.sh
|
|
||||||
echo '#!/bin/sh' >> bootscript.sh
|
|
||||||
echo 'dmesg -n 1' >> bootscript.sh
|
|
||||||
echo 'mount -t devtmpfs none /dev' >> bootscript.sh
|
|
||||||
echo 'mount -t proc none /proc' >> bootscript.sh
|
|
||||||
echo 'mount -t sysfs none /sys' >> bootscript.sh
|
|
||||||
echo >> bootscript.sh
|
|
||||||
chmod +x bootscript.sh
|
|
||||||
touch welcome.txt
|
|
||||||
echo >> welcome.txt
|
|
||||||
echo ' #####################################' >> welcome.txt
|
|
||||||
echo ' # #' >> welcome.txt
|
|
||||||
echo ' # Welcome to "Minimal Linux Live" #' >> welcome.txt
|
|
||||||
echo ' # #' >> welcome.txt
|
|
||||||
echo ' #####################################' >> welcome.txt
|
|
||||||
echo >> welcome.txt
|
|
||||||
touch inittab
|
|
||||||
echo '::sysinit:/etc/bootscript.sh' >> inittab
|
|
||||||
echo '::restart:/sbin/init' >> inittab
|
|
||||||
echo '::ctrlaltdel:/sbin/reboot' >> inittab
|
|
||||||
echo '::once:cat /etc/welcome.txt' >> inittab
|
|
||||||
echo '::respawn:/bin/cttyhack /bin/sh' >> inittab
|
|
||||||
echo 'tty2::once:cat /etc/welcome.txt' >> inittab
|
|
||||||
echo 'tty2::respawn:/bin/sh' >> inittab
|
|
||||||
echo 'tty3::once:cat /etc/welcome.txt' >> inittab
|
|
||||||
echo 'tty3::respawn:/bin/sh' >> inittab
|
|
||||||
echo 'tty4::once:cat /etc/welcome.txt' >> inittab
|
|
||||||
echo 'tty4::respawn:/bin/sh' >> inittab
|
|
||||||
echo >> inittab
|
|
||||||
cd ..
|
|
||||||
touch init
|
|
||||||
echo '#!/bin/sh' >> init
|
|
||||||
echo 'exec /sbin/init' >> init
|
|
||||||
echo >> init
|
|
||||||
chmod +x init
|
|
||||||
cp ../../*.sh src
|
|
||||||
cp ../../.config src
|
|
||||||
cd ../..
|
|
||||||
|
|
||||||
The above script creates very minimal /init which executes /sbin/init. Then the
|
|
||||||
new init process (that is /sbin/init with PID 1) reads the file /etc/inittab and
|
|
||||||
executes all commands provided there. The script /etc/bootscript.sh takes care of
|
|
||||||
the initial "mount" stuff. We also have 4 terminals (you can switch between them
|
|
||||||
with "Alt + F1" to "Alt + F4") and the contents of the file /etc/welcome.txt is
|
|
||||||
displayed before we access the shell for each of these terminals.
|
|
||||||
|
|
||||||
You can find more information about the supported /etc/inittab commands here:
|
|
||||||
|
|
||||||
http://git.busybox.net/busybox/tree/examples/inittab
|
|
||||||
|
|
||||||
Note that the above details are specific for BusyBox. Usually the "init" process
|
|
||||||
supports runlevels but that's not the case with BusyBox.
|
|
||||||
|
|
||||||
--- --- ---
|
|
||||||
|
|
||||||
Most probably you use normal user (i.e. not "root") when you execute the scripts.
|
|
||||||
One side effect is that the generated initrtamfs will keep the original ownership
|
|
||||||
of all files and folders. However, this leads to some interesting discrepancies
|
|
||||||
when you run the system. Some of the files/folders will have "root" ownership
|
|
||||||
(uid=0, gid=0) but most of the files/folders will have the same uid/gid as the
|
|
||||||
user which you used in order to build the system. This has no implications at all
|
|
||||||
since we have unrestricted shell console but if you'd like to "fix" this you will
|
|
||||||
have to either execute "5_generate_rootfs.sh" as "root" or manually change the
|
|
||||||
ownership of the initramfs folder (i.e. "work/rootfs") before you execute the
|
|
||||||
script "6_pack_rootfs.sh" with this command:
|
|
||||||
|
|
||||||
chown -R root:root work/rootfs
|
|
||||||
|
|
||||||
Note that the above command requires "root" permissions, so there is no way to
|
|
||||||
escape from the above described discrepancies if you don't have "root" access.
|
|
||||||
|
|
||||||
Also note that you may need to take care of the permissions for the script files
|
|
||||||
in the "work/rootfs/src" folder. Either delete the "src" folder before you run
|
|
||||||
"6_pack_rootfs.sh" or make sure that all files have global "read" permissions.
|
|
||||||
|
|
||||||
### ### ###
|
|
||||||
|
|
||||||
5. Next Steps
|
|
||||||
|
|
||||||
OK, now we know how to build and run a basic Linux system. But that's not enough.
|
|
||||||
Now we want to build more complex system, probably one which supports "pacman",
|
|
||||||
"apt-get", or any other package manager.
|
|
||||||
|
|
||||||
Building such system requires a lot more work. A lot more! I mean it!
|
|
||||||
|
|
||||||
For starters, "Minimal Linux Live" lives entirely in the "initramfs" space. Simply
|
|
||||||
said - this is the RAM space. We never really get out of there. Basically this is
|
|
||||||
what you need if you want more functional live Linux system:
|
|
||||||
|
|
||||||
1) Compressed file system (SquashFS)- this is where all the real stuff will be.
|
|
||||||
|
|
||||||
2) GNU Coreutils - these are the real shell command line utilities (ls, cd, etc.).
|
|
||||||
You need them because later we are going to "escape" from "initramfs" and use
|
|
||||||
the actual file system available in the compressed file. Alternatively, you can
|
|
||||||
overlay the whole "BusyBox" environment on top of the compressed file system but
|
|
||||||
that's not really professional approach.
|
|
||||||
|
|
||||||
3) You need to "switch_root" to the actual file system (the compressed one) which
|
|
||||||
you first need to locate, then mount and finally make it "writable" by overlaying
|
|
||||||
virtual RAM files/folders via UnionFS/AuFS (or something similar) if the bootable
|
|
||||||
media is not already writable. Remember that you are mounting compressed FS, which
|
|
||||||
means that if you make any changes on files located in the original FS, they will
|
|
||||||
not be persisted between reboots. Probably you want to handle this edge case.
|
|
||||||
|
|
||||||
4) You need to prepare in advance the stuff that you want to be present in the
|
|
||||||
compressed file system. Assuming that we are building a useful live Linux OS, the
|
|
||||||
absolute minimum is "GNU Coreutils", network management utilities and probably
|
|
||||||
some kind of package manager, e.g. "pacman" or "apt-get". Don't forget that most
|
|
||||||
of this additional stuff most probably relies on different kernel options that
|
|
||||||
also need to be enabled/configured in advance.
|
|
||||||
|
|
||||||
5) You need to rewrite /init and make it execute all necessary steps to fulfil point 3
|
|
||||||
from the above. Different live Linux systems use different approaches here.
|
|
||||||
|
|
||||||
All of the above is definitely *not* minimal but it's definitely doable if you put some
|
|
||||||
additional efforts. It will take time but as a result you will have fully functional live
|
|
||||||
Linux OS which you have created entirely by yourself.
|
|
||||||
|
|
||||||
### ### ###
|
|
||||||
|
|
||||||
6. Epilogue
|
|
||||||
|
|
||||||
That's all folks! I hope you find this tutorial useful. And remember, we are talking
|
|
||||||
about very minimal live Linux OS here. If you want to create something bigger, I
|
|
||||||
suggest you take a look at "Linux From Scratch" (google it, you'll find it).
|
|
||||||
|
|
||||||
At some point you may also find it useful to play around with other live Linux
|
|
||||||
distributions. Don't forget that the initramfs file is compressed and in order to
|
|
||||||
get to the actual /init script you will need to uncompress it. Then you can see
|
|
||||||
the actual file structure of the initial root file system and examine the /init
|
|
||||||
script file. This will give you more insight on the boot process for the
|
|
||||||
particular live Linux distributions that you are learning from.
|
|
||||||
|
|
||||||
One interesting live Linux distribution is "Slax". Just download it and take a
|
|
||||||
look at the /init script file (remember, you can uncompress the initramfs file).
|
|
||||||
There is also a very good document which explains the internal root file system
|
|
||||||
and the OS boot process for Slax:
|
|
||||||
|
|
||||||
http://slax.org/en/documentation.php#internals
|
|
||||||
|
|
||||||
The above URL may have changed but it is valid at the time I write this document.
|
|
||||||
|
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 152 KiB |
Before Width: | Height: | Size: 150 KiB After Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 190 KiB |
Before Width: | Height: | Size: 220 KiB After Width: | Height: | Size: 220 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 292 KiB After Width: | Height: | Size: 292 KiB |
Before Width: | Height: | Size: 315 KiB After Width: | Height: | Size: 315 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -19,13 +19,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="twelve columns" style="text-align: center;">
|
<div class="twelve columns" style="text-align: center;">
|
||||||
<a class="button button-primary" href="#" onclick="javascript:menuSwap(1); return false;">Home</a>
|
<a id="hm1" class="button button-primary" href="#" onclick="javascript:menuSwap(1); return false;">Home</a>
|
||||||
<a class="button button-primary" href="#" onclick="javascript:menuSwap(2); return false;">Changes</a>
|
<a id="hm2" class="button button-primary" href="#" onclick="javascript:menuSwap(2); return false;">Changes</a>
|
||||||
<a class="button button-primary" href="#" onclick="javascript:menuSwap(3); return false;">About</a>
|
<a id="hm3" class="button button-primary" href="#" onclick="javascript:menuSwap(3); return false;">About</a>
|
||||||
<a class="button button-primary" href="#" onclick="javascript:menuSwap(4); return false;">Tutorial</a>
|
<a id="hm4" class="button button-primary" href="#" onclick="javascript:menuSwap(4); return false;">Tutorial</a>
|
||||||
<a class="button button-primary" href="#" onclick="javascript:menuSwap(5); return false;">Emulator</a>
|
<a id="hm5" class="button button-primary" href="#" onclick="javascript:menuSwap(5); return false;">Emulator</a>
|
||||||
<a class="button button-primary" href="#" onclick="javascript:menuSwap(6); return false;">Download</a>
|
<a id="hm6" class="button button-primary" href="#" onclick="javascript:menuSwap(6); return false;">Download</a>
|
||||||
<a class="button" target="_blank" href="http://github.com/ivandavidov/minimal">GitHub</a>
|
<a id="hm7" class="button" target="_blank" href="http://github.com/ivandavidov/minimal">GitHub</a>
|
||||||
<hr />
|
<hr />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -537,10 +537,10 @@
|
|||||||
The build scripts for version <code>20-Jan-2017</code> are available as <strong>tar.xz</strong> archive.
|
The build scripts for version <code>20-Jan-2017</code> are available as <strong>tar.xz</strong> archive.
|
||||||
<div style="font-size: 10%;"> </div>
|
<div style="font-size: 10%;"> </div>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li id="dl1">
|
||||||
<a href="./download/minimal_linux_live_20-Jan-2017_src.tar.xz" title="Minimal Linux Live - shell scripts">minimal_linux_live_20-Jan-2017_src.tar.xz</a> - from GitHub.
|
<a href="./download/minimal_linux_live_20-Jan-2017_src.tar.xz" title="Minimal Linux Live - shell scripts">minimal_linux_live_20-Jan-2017_src.tar.xz</a> - from GitHub.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li id="dl2">
|
||||||
<a href="./download/minimal_linux_live_20-Jan-2017_src.tar.xz" title="Minimal Linux Live - shell scripts">minimal_linux_live_20-Jan-2017_src.tar.xz</a> - from this website.
|
<a href="./download/minimal_linux_live_20-Jan-2017_src.tar.xz" title="Minimal Linux Live - shell scripts">minimal_linux_live_20-Jan-2017_src.tar.xz</a> - from this website.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -551,16 +551,16 @@
|
|||||||
Pre-built ISO image files generated with the latest stable scripts are available for <strong>64-bit</strong> and <strong>32-bit</strong> Intel CPUs.
|
Pre-built ISO image files generated with the latest stable scripts are available for <strong>64-bit</strong> and <strong>32-bit</strong> Intel CPUs.
|
||||||
<div style="font-size: 10%;"> </div>
|
<div style="font-size: 10%;"> </div>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li id="dl3">
|
||||||
<a href="./download/minimal_linux_live_20-Jan-2017_64-bit.iso" title="Minimal Linux Live - ISO image file for 64-bit CPUs">minimal_linux_live_20-Jan-2017_64-bit.iso</a> - 64-bit ISO image from GitHub.
|
<a href="./download/minimal_linux_live_20-Jan-2017_64-bit.iso" title="Minimal Linux Live - ISO image file for 64-bit CPUs">minimal_linux_live_20-Jan-2017_64-bit.iso</a> - 64-bit ISO image from GitHub.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li id="dl4">
|
||||||
<a href="./download/minimal_linux_live_20-Jan-2017_32-bit.iso" title="Minimal Linux Live - ISO image file for 32-bit CPUs">minimal_linux_live_20-Jan-2017_32-bit.iso</a> - 32-bit ISO image from GitHub.
|
<a href="./download/minimal_linux_live_20-Jan-2017_32-bit.iso" title="Minimal Linux Live - ISO image file for 32-bit CPUs">minimal_linux_live_20-Jan-2017_32-bit.iso</a> - 32-bit ISO image from GitHub.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li id="dl5">
|
||||||
<a href="./download/minimal_linux_live_20-Jan-2017_64-bit.iso" title="Minimal Linux Live - ISO image file for 64-bit CPUs">minimal_linux_live_20-Jan-2017_64-bit.iso</a> - 64-bit ISO image from this website.
|
<a href="./download/minimal_linux_live_20-Jan-2017_64-bit.iso" title="Minimal Linux Live - ISO image file for 64-bit CPUs">minimal_linux_live_20-Jan-2017_64-bit.iso</a> - 64-bit ISO image from this website.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li id="dl6">
|
||||||
<a href="./download/minimal_linux_live_20-Jan-2017_32-bit.iso" title="Minimal Linux Live - ISO image file for 32-bit CPUs">minimal_linux_live_20-Jan-2017_32-bit.iso</a> - 32-bit ISO image from this website.
|
<a href="./download/minimal_linux_live_20-Jan-2017_32-bit.iso" title="Minimal Linux Live - ISO image file for 32-bit CPUs">minimal_linux_live_20-Jan-2017_32-bit.iso</a> - 32-bit ISO image from this website.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -568,7 +568,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="twelve columns">
|
<div class="twelve columns">
|
||||||
You can also browse the <a target="_blank" href="http://github.com/ivandavidov/minimal/releases">GitHub releases</a> or browse the <a target="_blank" href="./download">download directory</a> in this website.
|
You can also browse the <a target="_blank" href="http://github.com/ivandavidov/minimal/releases">GitHub releases</a><span id="gh1"> or browse the <a target="_blank" href="./download">download directory</a> in this website</span>.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 10%;"> </div>
|
<div style="font-size: 10%;"> </div>
|
||||||
@ -663,6 +663,22 @@
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 'ivandavidov.github.io' : {
|
||||||
|
document.getElementById('hm5').style.display="none";
|
||||||
|
|
||||||
|
document.getElementById('dl2').style.display="none";
|
||||||
|
document.getElementById('dl5').style.display="none";
|
||||||
|
document.getElementById('dl6').style.display="none";
|
||||||
|
|
||||||
|
document.getElementById('gh1').style.display="none";
|
||||||
|
|
||||||
|
html += sepa;
|
||||||
|
html += 'Development website - may not be fully functional.';
|
||||||
|
|
||||||
|
footerDiv.innerHTML = html;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
if(hostname != "") {
|
if(hostname != "") {
|
||||||
html += sepa;
|
html += sepa;
|
4
www/assets/css/style.min.css
vendored
Before Width: | Height: | Size: 152 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 190 KiB |
Before Width: | Height: | Size: 220 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 12 KiB |
@ -1,55 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="description" content="Minimal Linux Live">
|
|
||||||
<meta name="keywords" content="minimal minimalistic tiny linux live tutorial howto kernel busybox cd usb iso image"/>
|
|
||||||
<meta name="author" content="Ivan Davidov - davidov (dot) i [at] gmail {dot} com">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
|
|
||||||
<title>Minimal Linux Live - PC emulator</title>
|
|
||||||
|
|
||||||
<link rel="icon" type="image/x-icon" href="../assets/img/favicon.ico" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="title" style="white-space: pre; font: 20px monospace;">
|
|
||||||
Minimal Linux Live (version 20-Jan-2017)
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
<div id="screen_container">
|
|
||||||
<div style="white-space: pre; font: 20px monospace; line-height: 22px"></div>
|
|
||||||
<canvas style="display: none"></canvas>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="white-space: pre; font: 12px monospace;">
|
|
||||||
This is JavaScript based PC emulator which works entirely in your browser and some OS features may not behave
|
|
||||||
properly in it. All CPU instructions are emulated via JavaScript and the boot process may take 10-20 minutes.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="libv86.min.js"></script>
|
|
||||||
<script>
|
|
||||||
"use strict";
|
|
||||||
window.onload = function () {
|
|
||||||
var image_name = "minimal_linux_live_20-Jan-2017_32-bit.iso";
|
|
||||||
var cdrom_full = "../download/" + image_name;
|
|
||||||
var emulator = window.emulator = new V86Starter({
|
|
||||||
memory_size: 256 * 1024 * 1024,
|
|
||||||
vga_memory_size: 16 * 1024 * 1024,
|
|
||||||
screen_container: document.getElementById("screen_container"),
|
|
||||||
bios: {
|
|
||||||
url: "seabios.bin"
|
|
||||||
},
|
|
||||||
vga_bios: {
|
|
||||||
url: "vgabios.bin"
|
|
||||||
},
|
|
||||||
cdrom: {
|
|
||||||
url: cdrom_full
|
|
||||||
},
|
|
||||||
autostart: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
431
www/emulator/libv86.min.js
vendored
@ -1,431 +0,0 @@
|
|||||||
'use strict';var l;function aa(a,c){this.g=a;this.J=c;this.ha=function(){};this.K=9;this.L=1;this.v=new Uint8Array([6,0,104,111,115,116,57,112]);this.D="9P2000.L";this.m=this.o=8192;this.ua=new Uint8Array(2*this.m);this.ce=0;this.b=[]}aa.prototype.La=function(){var a=[];a[0]=this.K;a[1]=this.L;a[2]=this.v;a[3]=this.D;a[4]=this.o;a[5]=this.m;a[6]=this.ua;a[7]=this.ce;a[8]=this.b.map(function(a){return[a.$,a.type,a.uid]});return a};
|
|
||||||
aa.prototype.Ra=function(a){this.K=a[0];this.L=a[1];this.v=a[2];this.D=a[3];this.o=a[4];this.m=a[5];this.ua=a[6];this.ce=a[7];this.b=a[8].map(function(a){return{$:a[0],type:a[1],uid:a[2]}})};function ba(a,c,d,e){ca(["w","b","h"],[e+7,c+1,d],a.ua,0);a.ce=e+7}function da(a,c,d){d=ca(["w"],[d],a.ua,7);ba(a,6,c,d)}
|
|
||||||
function ea(a,c,d){var e=fa(["w","b","h"],d),f=e[0],h=e[1],r=e[2];switch(h){case 8:var f=a.g.K,k=[16914839];k[1]=a.o;k[2]=Math.floor(274877906944/k[1]);k[3]=k[2]-Math.floor(f/k[1]);k[4]=k[2]-Math.floor(f/k[1]);k[5]=a.g.b.length;k[6]=1048576;k[7]=0;k[8]=256;f=ca("wwddddddw".split(""),k,a.ua,7);ba(a,h,r,f);a.ha(0,c);break;case 112:case 12:var k=fa(["w","w"],d),t=k[0],e=k[1];d=a.b[t].$;var u=ga(a.g,d);d=ha(a.g,d);ia(a.g,a.b[t].$,function(){k[0]=u.Xa;k[1]=this.m-24;ca(["Q","w"],k,this.ua,7);ba(this,h,
|
|
||||||
r,17);this.ha(0,c)}.bind(a));break;case 70:k=fa(["w","w","s"],d);f=k[0];t=k[1];d=k[2];var u=ja(a.g),e=ga(a.g,a.b[t].$),z=a.g.g[a.b[t].$];u.mode=e.mode;u.size=e.size;u.Gd=e.Gd;for(var G=a.g.g[a.g.b.length]=new Uint8Array(u.size),e=0;e<u.size;e++)G[e]=z[e];u.name=d;u.va=a.b[f].$;ka(a.g,u);ba(a,h,r,0);a.ha(0,c);break;case 16:k=fa(["w","s","s","w"],d);t=k[0];d=k[1];f=k[3];d=la(a.g,d,a.b[t].$,k[2]);u=ga(a.g,d);u.uid=a.b[t].uid;u.Za=f;ca(["Q"],[u.Xa],a.ua,7);ba(a,h,r,13);a.ha(0,c);break;case 18:k=fa("wswwww".split(""),
|
|
||||||
d);t=k[0];d=k[1];e=k[2];z=k[3];G=k[4];f=k[5];d=ma(a.g,d,a.b[t].$,z,G);u=ga(a.g,d);u.mode=e;u.uid=a.b[t].uid;u.Za=f;ca(["Q"],[u.Xa],a.ua,7);ba(a,h,r,13);a.ha(0,c);break;case 22:k=fa(["w"],d);t=k[0];u=ga(a.g,a.b[t].$);f=ca(["s"],[u.Gd],a.ua,7);ba(a,h,r,f);a.ha(0,c);break;case 72:k=fa(["w","s","w","w"],d);t=k[0];d=k[1];e=k[2];f=k[3];d=na(a.g,d,a.b[t].$);u=ga(a.g,d);u.mode=e|oa;u.uid=a.b[t].uid;u.Za=f;ca(["Q"],[u.Xa],a.ua,7);ba(a,h,r,13);a.ha(0,c);break;case 14:k=fa(["w","s","w","w","w"],d);t=k[0];d=
|
|
||||||
k[1];e=k[3];f=k[4];d=pa(a.g,d,a.b[t].$);a.b[t].$=d;a.b[t].type=1;u=ga(a.g,d);u.uid=a.b[t].uid;u.Za=f;u.mode=e;ca(["Q","w"],[u.Xa,a.m-24],a.ua,7);ba(a,h,r,17);a.ha(0,c);break;case 52:ca(["w"],[0],a.ua,7);ba(a,h,r,1);a.ha(0,c);break;case 24:k=fa(["w","d"],d);t=k[0];u=ga(a.g,a.b[t].$);k[0]|=4096;k[0]=k[1];k[1]=u.Xa;k[2]=u.mode;k[3]=u.uid;k[4]=u.Za;k[5]=1;k[6]=u.df<<8|u.ef;k[7]=u.size;k[8]=a.o;k[9]=Math.floor(u.size/512+1);k[10]=u.ld;k[11]=0;k[12]=u.zd;k[13]=0;k[14]=u.qe;k[15]=0;k[16]=0;k[17]=0;k[18]=
|
|
||||||
0;k[19]=0;ca("dQwwwddddddddddddddd".split(""),k,a.ua,7);ba(a,h,r,153);a.ha(0,c);break;case 26:k=fa("wwwwwddddd".split(""),d);t=k[0];u=ga(a.g,a.b[t].$);k[1]&1&&(u.mode=k[2]);k[1]&2&&(u.uid=k[3]);k[1]&4&&(u.Za=k[4]);k[1]&128&&(u.ld=k[6]);k[1]&256&&(u.ld=k[8]);k[1]&16&&(u.ld=Math.floor((new Date).getTime()/1E3));k[1]&32&&(u.zd=Math.floor((new Date).getTime()/1E3));k[1]&64&&(u.qe=Math.floor((new Date).getTime()/1E3));k[1]&8&&qa(a.g,a.b[t].$,k[5]);ba(a,h,r,0);a.ha(0,c);break;case 50:k=fa(["w","d"],d);
|
|
||||||
t=k[0];ba(a,h,r,0);a.ha(0,c);break;case 40:case 116:var k=fa(["w","d","w"],d),t=k[0],F=k[1],L=k[2],u=ga(a.g,a.b[t].$);if(2==a.b[t].type){u.Ga.length<F+L&&(L=u.Ga.length-F);for(e=0;e<L;e++)a.ua[11+e]=u.Ga[F+e];ca(["w"],[L],a.ua,7);ba(a,h,r,4+L);a.ha(0,c)}else{var ya=a.g.b[a.b[t].$];a.J.send("9p-read-start");ha(a.g,a.b[t].$);ia(a.g,a.b[t].$,function(){this.J.send("9p-read-end",[ya.name,L]);u.size<F+L&&(L=u.size-F);var a=this.g.g[this.b[t].$];if(a)for(var f=0;f<L;f++)this.ua[11+f]=a[F+f];ca(["w"],[L],
|
|
||||||
this.ua,7);ba(this,h,r,4+L);this.ha(0,c)}.bind(a))}break;case 118:k=fa(["w","d","w"],d);t=k[0];F=k[1];L=k[2];ra(a.g,a.b[t].$,F,L,d);ya=a.g.b[a.b[t].$];a.J.send("9p-write-end",[ya.name,L]);ca(["w"],[L],a.ua,7);ba(a,h,r,4);a.ha(0,c);break;case 74:k=fa(["w","s","w","s"],d);d=sa(a.g,a.b[k[0]].$,k[1],a.b[k[2]].$,k[3]);if(0==d){da(a,r,2);a.ha(0,c);break}ba(a,h,r,0);a.ha(0,c);break;case 76:k=fa(["w","s","w"],d);e=k[0];d=k[1];t=ta(a.g,a.b[e].$,d);if(-1==t){da(a,r,2);a.ha(0,c);break}d=ua(a.g,t);if(!d){da(a,
|
|
||||||
r,39);a.ha(0,c);break}ba(a,h,r,0);a.ha(0,c);break;case 100:d=fa(["w","s"],d);a.m=d[0];f=ca(["w","s"],[a.m,a.D],a.ua,7);ba(a,h,r,f);a.ha(0,c);break;case 104:k=fa(["w","w","s","s","w"],d);t=k[0];a.b[t]={$:0,type:1,uid:k[4]};u=ga(a.g,a.b[t].$);ca(["Q"],[u.Xa],a.ua,7);ba(a,h,r,13);a.ha(0,c);break;case 108:k=fa(["h"],d);ba(a,h,r,0);a.ha(0,c);break;case 110:k=fa(["w","w","h"],d);t=k[0];f=k[1];z=k[2];if(0==z){a.b[f]={$:a.b[t].$,type:1,uid:a.b[t].uid};ca(["h"],[0],a.ua,7);ba(a,h,r,2);a.ha(0,c);break}G=[];
|
|
||||||
for(e=0;e<z;e++)G.push("s");G=fa(G,d);d=a.b[t].$;for(var F=9,Sa=0,e=0;e<z;e++){d=ta(a.g,d,G[e]);if(-1==d)break;F+=ca(["Q"],[a.g.b[d].Xa],a.ua,F);Sa++;a.b[f]={$:d,type:1,uid:a.b[t].uid}}ca(["h"],[Sa],a.ua,7);ba(a,h,r,F-7);a.ha(0,c);break;case 120:k=fa(["w"],d);a.b[k[0]]&&0<=a.b[k[0]].$&&(va(a.g,a.b[k[0]].$),a.b[k[0]].$=-1,a.b[k[0]].type=-1);ba(a,h,r,0);a.ha(0,c);break;case 32:k=fa(["w","s","d","w"],d);t=k[0];d=k[1];ba(a,h,r,0);a.ha(0,c);break;case 30:k=fa(["w","w","s"],d),t=k[0],e=k[1],d=k[2],a.b[e]=
|
|
||||||
{$:a.b[t].$,type:-1,uid:a.b[t].uid},f=0,"security.capability"==d&&(f=wa(a.g,a.b[t].$),a.b[e].type=2),ca(["d"],[f],a.ua,7),ba(a,h,r,8),a.ha(0,c)}};"undefined"===typeof window||window.requestAnimationFrame||(window.requestAnimationFrame=window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame);
|
|
||||||
function xa(a,c){function d(a){a=a.toString(16);return"#"+Array(7-a.length).join("0")+a}function e(){for(var a=0;a<Gc;a++)Cb[a]&&(Vb.g(a),Cb[a]=0);this.zb()}function f(){this.J.send("screen-fill-buffer");this.zb()}function h(a,c,f){a.style.webkitTransform=a.style.MozTransform=""+(1===c?"":" scaleX("+c+")")+(1===f?"":" scaleY("+f+")")}console.assert(a,"1st argument must be a DOM container");var r=a.getElementsByTagName("canvas")[0],k=r.getContext("2d"),t=r.nextElementSibling||r.previousElementSibling,
|
|
||||||
u=document.createElement("div"),z,G,F,L,ya=1,Sa=1,Ra,Cb,ue=!1,eb,ob,Gc,Vb=this;a=new Uint16Array([199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,186,191,8976,172,189,188,161,171,187,9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9561,9560,9554,9555,9579,9578,9496,
|
|
||||||
9484,9608,9604,9612,9616,9600,945,223,915,960,931,963,181,964,934,920,937,948,8734,966,949,8745,8801,177,8805,8804,8992,8993,247,8776,176,8729,183,8730,8319,178,9632,160]);for(var Zf=new Uint16Array([32,9786,9787,9829,9830,9827,9824,8226,9688,9675,9689,9794,9792,9834,9835,9788,9658,9668,8597,8252,182,167,9644,8616,8593,8595,8594,8592,8735,8596,9650,9660]),Wb=[],Xb,Za=0;256>Za;Za++)Xb=127<Za?a[Za-128]:32>Za?Zf[Za]:Za,Wb[Za]=String.fromCharCode(Xb);k.imageSmoothingEnabled=!1;k.mozImageSmoothingEnabled=
|
|
||||||
!1;u.style.position="absolute";u.style.backgroundColor="#ccc";u.style.width="7px";u.style.display="inline-block";t.style.display="block";r.style.display="none";this.J=c;c.register("screen-set-mode",function(a){this.dh(a)},this);c.register("screen-fill-buffer-end",function(a){this.kh(a[0],a[1])},this);c.register("screen-put-char",function(a){this.Xg(a[0],a[1],a[2],a[3],a[4])},this);c.register("screen-update-cursor",function(a){this.Kd(a[0],a[1])},this);c.register("screen-update-cursor-scanline",function(a){this.Ld(a[0],
|
|
||||||
a[1])},this);c.register("screen-set-size-text",function(a){this.zc(a[0],a[1])},this);c.register("screen-set-size-graphical",function(a){this.Fd(a[0],a[1])},this);this.ob=function(){this.zc(80,25);this.zb()};this.m=function(){try{window.open(r.toDataURL())}catch(a){}};this.Xg=function(a,c,f,d,e){a<Gc&&c<ob&&(c=3*(a*ob+c),eb[c]=f,eb[c+1]=d,eb[c+2]=e,Cb[a]=1)};this.zb=function(){requestAnimationFrame(ue?f:e)};e=e.bind(this);f=f.bind(this);this.cb=function(){};this.dh=function(a){(ue=a)?(t.style.display=
|
|
||||||
"none",r.style.display="block"):(t.style.display="block",r.style.display="none")};this.zc=function(a,c){if(a!==ob||c!==Gc){Cb=new Int8Array(c);eb=new Int32Array(a*c*3);ob=a;for(Gc=c;t.childNodes.length>c;)t.removeChild(t.firstChild);for(;t.childNodes.length<c;)t.appendChild(document.createElement("div"));for(a=0;a<c;a++)this.g(a)}};this.Fd=function(a,c){r.style.display="block";r.width=a;r.height=c;z=k.createImageData(a,c);new Uint8Array(z.data.buffer);G=new Int32Array(z.data.buffer);Ra=a;this.J.send("screen-tell-buffer",
|
|
||||||
[G],[G.buffer])};this.b=function(a,c){ya=a;Sa=c;h(r,ya,Sa);h(t,ya,Sa)};this.b(ya,Sa);this.Ld=function(a,c){a&32?u.style.display="none":(u.style.display="inline",u.style.height=Math.min(15,c-a)+"px",u.style.marginTop=Math.min(15,a)+"px")};this.Kd=function(a,c){if(a!==F||c!==L)Cb[a]=1,Cb[F]=1,F=a,L=c};this.g=function(a){var c=3*a*ob,f,e,h,r,k,ya;f=t.childNodes[a];for(h=document.createDocumentFragment();f.firstChild;)f.removeChild(f.firstChild);for(var z=0;z<ob;){e=document.createElement("span");r=eb[c+
|
|
||||||
1];k=eb[c+2];e.style.backgroundColor=d(r);e.style.color=d(k);for(ya="";z<ob&&eb[c+1]===r&&eb[c+2]===k;)if(ya+=Wb[eb[c]],z++,c+=3,a===F)if(z===L)break;else if(z===L+1){h.appendChild(u);break}e.textContent=ya;h.appendChild(e)}f.appendChild(h)};this.kh=function(a,c){c<a||(a=a/Ra|0,k.putImageData(z,0,0,0,a,Ra,(c/Ra|0)-a+1))};this.ob()};(function(){function a(a,f){a instanceof Array||(a=[a]);c(new Blob(a),f)}function c(a,c){var f=document.createElement("a");f.download=c;f.href=window.URL.createObjectURL(a);f.dataset.downloadurl=["application/octet-stream",f.download,f.href].join(":");document.createEvent?(a=document.createEvent("MouseEvent"),a.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),f.dispatchEvent(a)):f.click()}function d(){for(var a=location.search.substr(1).split("&"),c={},f=0;f<a.length;f++){var d=a[f].split("=");
|
|
||||||
c[d[0]]=decodeURIComponent(d[1])}return c}function e(a,c){for(var f="";0<c--;)f+=a;return f}function f(a){return document.getElementById(a)}function h(){function a(d){f("boot_options").style.display="none";document.title=d.name+" - Virtual x86";e.filesystem=d.filesystem;d.state&&(f("reset").style.display="none",e.Qc=d.state);e.Oa=d.Oa;e.Ka=d.Ka;e.Ma=d.Ma;e.bb=d.bb;e.Ca=d.Ca;e.id=d.id;void 0!==d.Ic&&(e.Ic=d.Ic);r(e,c)}function c(a){k.c&&setTimeout(function(){a.af(k.c+"\n")},25)}if("responseType"in
|
|
||||||
new XMLHttpRequest){var e={};f("start_emulation").onclick=function(){f("boot_options").style.display="none";z("custom");var a,c=f("floppy_image").files[0];c&&(a=c,e.Oa={buffer:c});if(c=f("cd_image").files[0])a=c,e.Ka={buffer:c};if(c=f("hd_image").files[0])a=c,e.Ma={buffer:c};a&&(document.title=a.name+" - Virtual x86");r(e)};var h=[{id:"archlinux",state:{url:F+"images/v86state.bin",size:142924774},name:"Arch Linux",bb:134217728,Ca:8388608,Ma:{url:F+"images/arch3.img",size:17179869184,async:!0},filesystem:{basefs:{url:F+
|
|
||||||
"images/fs.json",size:7510249},baseurl:F+"arch/"}},{id:"freedos",Oa:{url:F+"images/freedos722.img",size:737280},name:"FreeDOS"},{id:"oberon",Oa:{url:F+"images/oberon-boot.dsk",size:1474560},Ma:{url:F+"images/oberon.dsk",size:41943040},name:"Oberon"},{id:"windows1",Oa:{url:F+"images/windows101.img",size:1474560},name:"Windows"},{id:"linux26",Ka:{url:F+"images/linux.iso",size:5666816},name:"Linux"},{id:"linux3",Ka:{url:F+"images/linux3.iso",size:10000384},name:"Linux",filesystem:{}},{id:"kolibrios",
|
|
||||||
Oa:{url:G?"images/kolibri.img":"http://builds.kolibrios.org/eng/data/data/kolibri.img",size:1474560},name:"KolibriOS"},{id:"kolibrios-fallback",Oa:{url:"images/kolibri.img",size:1474560},name:"KolibriOS"},{id:"openbsd",Oa:{url:F+"images/openbsd.img",size:1474560},name:"OpenBSD"},{id:"solos",Oa:{url:F+"images/os8.dsk",size:1474560},name:"Sol OS"},{id:"dexos",Ka:{url:F+"images/DexOSv6.iso",size:1837056},name:"DexOS"},{id:"bootchess",Oa:{url:F+"images/bootchess.img"},name:"Bootchess"},{id:"windows98",
|
|
||||||
bb:67108864,Ma:{url:F+"images/windows98.img",async:!0,size:314572800},name:"Windows 98",Ic:306,state:{url:F+"images/windows98_state.bin",size:7576E4}}],k=d(),t=k.profile;k.use_bochs_bios&&(e.lh=!0);for(var u=0;u<h.length;u++){var L=h[u];if(t===L.id){a(L);return}var Vb=f("start_"+L.id);Vb&&(Vb.onclick=function(c,f){z(c.id);f.blur();a(c)}.bind(this,L,Vb))}"custom"===t&&(k["hda.url"]&&(e.Ma={size:parseInt(k["hda.size"],10)||void 0,url:k["hda.url"],async:!0}),k["cdrom.url"]&&(e.Ka={size:parseInt(k["cdrom.size"],
|
|
||||||
10)||void 0,url:k["cdrom.url"],async:!0}),k["fda.url"]&&(e.Oa={size:parseInt(k["fda.size"],10)||void 0,url:k["fda.url"],async:!0}),e.Oa||e.Ka||e.Ma)&&(f("boot_options").style.display="none",r(e,c))}else alert("Your browser is not supported because it doesn't have XMLHttpRequest.responseType")}function r(a,c){var d=a.bb;!d&&(d=1048576*parseInt(f("memory_size").value,10),16777216>d||2147483648<=d)&&(alert("Invalid memory size - ignored."),d=33554432);var h=a.Ca;!h&&(h=1048576*parseInt(f("video_memory_size").value,
|
|
||||||
10),65536>=h||2147483648<=h)&&(alert("Invalid video memory size - ignored."),h=8388608);if(a.lh)var r="bochs-bios.bin",t="bochs-vgabios.bin";else r="seabios.bin",t="vgabios.bin";var u,z;a.Qc||(u={url:"bios/"+r},z={url:"bios/"+t});var F=new n({memory_size:d,vga_memory_size:h,screen_container:f("screen_container"),serial_container:f("serial"),boot_order:a.Ic||parseInt(f("boot_order").value,16)||0,network_relay_url:"ws://relay.widgetry.org/",bios:u,vga_bios:z,fda:a.Oa,hda:a.Ma,cdrom:a.Ka,initial_state:a.Qc,
|
|
||||||
filesystem:a.filesystem||{},autostart:!0});F.Sa("emulator-ready",function(){k(a,F);c&&c(F)});F.Sa("download-progress",function(a){var c=f("loading");c.style.display="block";if(a.xe===a.we-1&&a.loaded>=a.total-2048)c.textContent="Done downloading. Starting now ...";else{var d="Downloading images ";"number"===typeof a.xe&&a.we&&(d+="["+(a.xe+1)+"/"+a.we+"] ");if(a.total&&"number"===typeof a.loaded){a=Math.floor(a.loaded/a.total*100);a=Math.min(100,Math.max(0,a));var h=Math.floor(a/2),d=d+(a+"% [")+
|
|
||||||
e("#",h),d=d+(e(" ",50-h)+"]")}else d+=e(".",L++%50);c.textContent=d}})}function k(d,e){function h(){var a=Date.now(),c=e.b?e.b.s.V:0,d=c-F;F=c;var r=a-z;L+=r;z=a;f("speed").textContent=d/r|0;f("avg_speed").textContent=c/L|0;a=f("running_time");c=L/1E3|0;a.textContent=60>c?c+"s":3600>c?(c/60|0)+"m "+za(c%60,2)+"s":(c/3600|0)+"h "+za((c/60|0)%60,2)+"m "+za(c%60,2)+"s"}function r(h,k){var t=f("get_"+k+"_image");!h||104857600<h.size?t.style.display="none":t.onclick=function(){var f=e.Kc[k],h=d.id+("cdrom"===
|
|
||||||
k?".iso":".img");f.Ye?(f=f.Ye(h),c(f,h)):f.sd(function(c){c?a(c,h):alert("The file could not be loaded. Maybe it's too big?")});t.blur()}}function k(a){a.ctrlKey?window.onbeforeunload=function(){window.onbeforeunload=null;return"CTRL-W cannot be sent to the emulator."}:window.onbeforeunload=null}f("boot_options").style.display="none";f("loading").style.display="none";f("runtime_options").style.display="block";f("runtime_infos").style.display="block";document.getElementsByClassName("phone_keyboard")[0].style.display=
|
|
||||||
"block";d.filesystem&&t(e);f("run").onclick=function(){e.Be()?(f("run").value="Run",e.Qd()):(f("run").value="Pause",e.je());f("run").blur()};f("exit").onclick=function(){e.Qd();location.href=location.pathname};f("lock_mouse").onclick=function(){if(!u)f("toggle_mouse").onclick();e.Xd();f("lock_mouse").blur()};var u=!0;f("toggle_mouse").onclick=function(){u=!u;e.ff(u);f("toggle_mouse").value=(u?"Dis":"En")+"able mouse";f("toggle_mouse").blur()};var z=0,L=0,F=0,G,Wb=!1;e.Sa("emulator-started",function(){z=
|
|
||||||
Date.now();G=setInterval(h,1E3)});e.Sa("emulator-stopped",function(){h();clearInterval(G)});var Xb=0,Za=0;e.Sa("9p-read-start",function(){f("info_filesystem").style.display="block";f("info_filesystem_status").textContent="Loading ..."});e.Sa("9p-read-end",function(a){Xb+=a[1];f("info_filesystem_status").textContent="Idle";f("info_filesystem_last_file").textContent=a[0];f("info_filesystem_bytes_read").textContent=Xb});e.Sa("9p-write-end",function(a){Za+=a[1];f("info_filesystem_last_file").textContent=
|
|
||||||
a[0];f("info_filesystem_bytes_written").textContent=Za});var re=0,se=0,te=0,ve=0;e.Sa("ide-read-start",function(){f("info_storage").style.display="block";f("info_storage_status").textContent="Loading ..."});e.Sa("ide-read-end",function(a){re+=a[1];se+=a[2];f("info_storage_status").textContent="Idle";f("info_storage_bytes_read").textContent=re;f("info_storage_sectors_read").textContent=se});e.Sa("ide-write-end",function(a){te+=a[1];ve+=a[2];f("info_storage_bytes_written").textContent=te;f("info_storage_sectors_written").textContent=
|
|
||||||
ve});var we=0,xe=0;e.Sa("eth-receive-end",function(a){xe+=a[0];f("info_network").style.display="block";f("info_network_bytes_received").textContent=xe});e.Sa("eth-transmit-end",function(a){we+=a[0];f("info_network").style.display="block";f("info_network_bytes_transmitted").textContent=we});e.Sa("mouse-enable",function(a){Wb=a;f("info_mouse_enabled").textContent=a?"Yes":"No"});e.Sa("screen-set-mode",function(a){a?f("info_vga_mode").textContent="Graphical":(f("info_vga_mode").textContent="Text",f("info_res").textContent=
|
|
||||||
"-",f("info_bpp").textContent="-")});e.Sa("screen-set-size-graphical",function(a){f("info_res").textContent=a[0]+"x"+a[1];f("info_bpp").textContent=a[2]});f("reset").onclick=function(){e.He();f("reset").blur()};r(d.Ma,"hda");r(d.Vd,"hdb");r(d.Oa,"fda");r(d.Se,"fdb");r(d.Ka,"cdrom");f("memory_dump").onclick=function(){a(e.b.s.memory.fa,"v86memory.bin");f("memory_dump").blur()};f("save_state").onclick=function(){e.Je(function(c,f){c?(console.log(c.stack),console.log("Couldn't save state: ",c)):a(f,
|
|
||||||
"v86state.bin")});f("save_state").blur()};f("load_state").onclick=function(){f("load_state_input").click();f("load_state").blur()};f("load_state_input").onchange=function(){var a=this.files[0];if(a){var c=e.Be();c&&e.Qd();var f=new FileReader;f.onload=function(a){try{e.Ie(a.target.result)}catch(f){throw alert("Something bad happened while restoring the state:\n"+f+"\n\nNote that the current configuration must be the same as the original"),f;}c&&e.je()};f.readAsArrayBuffer(a);this.value=""}};f("ctrlaltdel").onclick=
|
|
||||||
function(){e.Wd([29,56,83,157,184,211]);f("ctrlaltdel").blur()};f("alttab").onclick=function(){e.Wd([56,15]);setTimeout(function(){e.Wd([184,143])},100);f("alttab").blur()};f("scale").onchange=function(){var a=parseFloat(this.value);(a||0<a)&&e.wf(a,a)};f("fullscreen").onclick=function(){e.uf()};f("screen_container").onclick=function(){u&&Wb?(e.Xd(),f("lock_mouse").blur()):window.getSelection().isCollapsed&&document.getElementsByClassName("phone_keyboard")[0].focus()};f("take_screenshot").onclick=
|
|
||||||
function(){e.vf();f("take_screenshot").blur()};f("serial").style.display="block";window.addEventListener("keydown",k,!1);window.addEventListener("keyup",k,!1);window.addEventListener("blur",k,!1)}function t(c){f("filesystem_panel").style.display="block";f("filesystem_send_file").onchange=function(){Array.prototype.forEach.call(this.files,function(a){var f=new Aa(a);f.onload=function(){f.sd(function(f){c.Me("/"+a.name,new Uint8Array(f))})};f.load()},this);this.value="";this.blur()};f("filesystem_get_file").onkeypress=
|
|
||||||
function(f){13===f.which&&(this.disabled=!0,c.rf(this.value,function(c,f){this.disabled=!1;f?(c=this.value.replace(/\/$/,"").split("/"),c=c[c.length-1]||"root",a(f,c),this.value=""):alert("Can't read file")}.bind(this)))}}function u(){location.reload()}function z(a){window.history.pushState&&window.history.pushState({profile:a},"","?profile="+a)}var G=-1===location.host.indexOf("."),F=G?"":"//i.copy.sh/",L=0;window.addEventListener("load",h,!1);window.addEventListener("load",function(){setTimeout(function(){window.addEventListener("popstate",
|
|
||||||
u)},0)});"complete"===document.readyState&&h()})();function Ba(a){this.ports=[];this.H=Array(65536);this.memory=a;for(var c=0;65536>c;c++)this.ports[c]={da:this.Wf,ma:this.Uf,qf:this.Vf,sa:this.te,ad:this.te,Cc:this.te,U:void 0};for(var d=a.size,c=0;c<<17<d;c++)a.g[c]=a.m[c]=void 0,a.o[c]=a.v[c]=void 0;Ca(this,d,4294967296-d,function(){return 255},function(){},function(){return-1},function(){})}l=Ba.prototype;l.Wf=function(){return 255};l.Uf=function(){return 65535};l.Vf=function(){return-1};l.te=function(){};
|
|
||||||
function p(a,c,d,e,f,h){e&&(a.ports[c].da=e);f&&(a.ports[c].ma=f);h&&(a.ports[c].qf=h);a.ports[c].U=d}function q(a,c,d,e,f,h){e&&(a.ports[c].sa=e);f&&(a.ports[c].ad=f);h&&(a.ports[c].Cc=h);a.ports[c].U=d}
|
|
||||||
l.tf=function(a,c,d,e,f,h){function r(){return d.call(this)|e.call(this)<<8}function k(){return f.call(this)|h.call(this)<<8}function t(){return d.call(this)|e.call(this)<<8|f.call(this)<<16|h.call(this)<<24}f&&h?(p(this,a,c,d,r,t),p(this,a+1,c,e),p(this,a+2,c,f,k),p(this,a+3,c,h)):(p(this,a,c,d,r),p(this,a+1,c,e))};
|
|
||||||
l.Dd=function(a,c,d,e,f,h){function r(a){d.call(this,a&255);e.call(this,a>>8&255)}function k(a){f.call(this,a&255);h.call(this,a>>8&255)}function t(a){d.call(this,a&255);e.call(this,a>>8&255);f.call(this,a>>16&255);h.call(this,a>>>24)}f&&h?(q(this,a,c,d,r,t),q(this,a+1,c,e),q(this,a+2,c,f,k),q(this,a+3,c,h)):(q(this,a,c,d,r),q(this,a+1,c,e))};function Da(a,c,d){c>>>=0;d=c+(d>>>0);if(d>=a.memory.size)return!0;for(c&=-131072;c<d;){if(a.memory.b[c>>17])return!0;c+=131072}return!1}
|
|
||||||
l.hg=function(a){var c=this.memory.g[a>>>17];return c(a)|c(a+1)<<8|c(a+2)<<16|c(a+3)<<24};l.ig=function(a,c){var d=this.memory.m[a>>>17];d(a,c&255);d(a+1,c>>8&255);d(a+2,c>>16&255);d(a+3,c>>>24)};function Ca(a,c,d,e,f,h,r){h||(h=a.hg.bind(a));r||(r=a.ig.bind(a));for(c>>>=17;0<d;c++)a.memory.b[c]=1,a.memory.g[c]=e,a.memory.m[c]=f,a.memory.o[c]=h,a.memory.v[c]=r,d-=131072}function Ea(a,c,d){a=a.ports[c];a.sa.call(a.U,d)}function Fa(a,c,d){a=a.ports[c];a.ad.call(a.U,d)}
|
|
||||||
function Ga(a,c,d){a=a.ports[c];a.Cc.call(a.U,d)}function Ha(a,c){a=a.ports[c];return a.da.call(a.U)}function Ia(a,c){a=a.ports[c];return a.ma.call(a.U)}function Ja(a,c){a=a.ports[c];return a.qf.call(a.U)};function Ka(a){this.o=!0;this.m=this.g=!1;this.s=new v;this.J=a;a.register("cpu-init",this.ob,this);a.register("cpu-run",this.K,this);a.register("cpu-stop",this.L,this);a.register("cpu-restart",this.D,this);this.b=function(){console.assert(!1)};this.v=function(){console.assert(!1)}}Ka.prototype.K=function(){this.g||(this.J.send("emulator-started"),this.b())};
|
|
||||||
function La(a){if(a.m)a.m=a.g=!1,a.J.send("emulator-stopped");else{a.g=!0;var c;a:{var d=a.s;try{if(d.Pc){c=d.ba();break a}d.W()}catch(e){d.ue(e)}c=0}0>=c?a.b():a.v(c)}}Ka.prototype.L=function(){this.g&&(this.m=!0)};Ka.prototype.D=function(){this.s.reset();Ma(this.s)};Ka.prototype.ob=function(a){this.o&&(this.o=!1,Na(this));this.s.ob(a,this.J);this.J.send("emulator-ready")};
|
|
||||||
function Na(a){"undefined"!==typeof setImmediate?a.b=function(){setImmediate(function(){La(a)})}:"undefined"!==typeof window&&"undefined"!==typeof postMessage?(window.addEventListener("message",function(c){c.source===window&&43605===c.data&&La(a)},!1),a.b=function(){window.postMessage(43605,"*")}):a.b=function(){setTimeout(function(){La(a)},0)};a.v="undefined"!==typeof document&&"boolean"===typeof document.hidden?function(c){4>c||document.hidden?this.b():setTimeout(function(){La(a)},c)}:function(c){setTimeout(function(){La(a)},
|
|
||||||
c)}}var Oa="object"===typeof performance&&performance.now?function(){return performance.now()}:Date.now;if("undefined"!==typeof window&&window.crypto&&window.crypto.getRandomValues)var Pa=new Int32Array(1),Qa=function(){return!0},Ta=function(){window.crypto.getRandomValues(Pa);return Pa[0]};else Qa=function(){return!1},Ta=function(){console.assert(!1)};var Aa,Ua,Va,Wa,Xa,Ya;function za(a,c){for(a=a?a+"":"";a.length<c;)a="0"+a;return a}function $a(a){return"0x"+za((a?a.toString(16):"").toUpperCase(),1)}function ab(a){this.buffer=a;this.byteLength=a.byteLength;this.onload=void 0}ab.prototype.load=function(){this.onload&&this.onload({buffer:this.buffer})};ab.prototype.get=function(a,c,d){d(new Uint8Array(this.buffer,a,c))};ab.prototype.set=function(a,c,d){(new Uint8Array(this.buffer,a,c.byteLength)).set(c);d()};ab.prototype.sd=function(a){a(this.buffer)};
|
|
||||||
(function(){for(var a=new Int8Array(256),c=0,d=-2;256>c;c++)c&c-1||d++,a[c]=d;Ua=function(c){return a[c]};Va=function(c){var f=c>>>16;if(f){var d=f>>>8;return d?24+a[d]:16+a[f]}return(d=c>>>8)?8+a[d]:a[c]}})();function bb(a){var c=new Uint8Array(a),d,e;this.length=0;this.push=function(f){this.length!==a&&this.length++;c[e]=f;e=e+1&a-1};this.shift=function(){if(this.length){var f=c[d];d=d+1&a-1;this.length--;return f}return-1};this.clear=function(){this.length=e=d=0};this.clear()};function cb(a){this.s=a;this.g=new Float64Array(8);this.N=new Float32Array(1);new Uint8Array(this.N.buffer);this.Fa=new Int32Array(this.N.buffer);this.L=new Float64Array(1);this.v=new Uint8Array(this.L.buffer);this.D=new Int32Array(this.L.buffer);this.tb=new Uint8Array(this.g.buffer);new Int32Array(this.g.buffer);this.o=255;this.b=0;this.K=895;this.aa=this.W=this.ja=this.wa=this.ba=this.m=0;this.Ja=NaN;this.sb=new Float64Array([1,Math.log(10)/Math.LN2,Math.LOG2E,Math.PI,Math.log(2)/Math.LN10,Math.LN2,
|
|
||||||
0])}l=cb.prototype;l.La=function(){var a=[];a[0]=this.g;a[1]=this.o;a[2]=this.b;a[3]=this.K;a[4]=this.aa;a[5]=this.ba;a[6]=this.wa;a[7]=this.W;a[8]=this.aa;a[9]=this.ja;return a};l.Ra=function(a){this.g.set(a[0]);this.o=a[1];this.b=a[2];this.K=a[3];this.ba=a[5];this.wa=a[6];this.W=a[7];this.aa=a[8];this.ja=a[9]};function db(a){w(a.s)}function fb(a){a.m|=1}function gb(a,c){var d=hb(a);a.m&=-18177;d>c||(a.m=c>d?a.m|256:d===c?a.m|16384:a.m|17664)}
|
|
||||||
function ib(a,c){var d=a.g[a.b];a.s.u&=-70;a.s.h&=-70;d>c||(a.s.h=c>d?a.s.h|1:d===c?a.s.h|64:a.s.h|69)}function jb(a){a.K=895;a.m=0;a.ba=0;a.W=0;a.ja=0;a.o=255;a.b=0}function kb(a,c){if(a.s.Da){lb(a.s,c,26);mb(a.s,c,a.K);mb(a.s,c+4,a.m&-14337|a.b<<11);for(var d=0,e,f=0;8>f;f++)e=a.g[f],a.o>>f&1?d|=3<<(f<<1):e?isFinite(e)||(d|=2<<(f<<1)):d|=1<<(f<<1);mb(a.s,c+8,d);x(a.s,c+12,a.ba);mb(a.s,c+16,a.wa);mb(a.s,c+18,a.ja);x(a.s,c+20,a.W);mb(a.s,c+24,a.aa)}else db(a)}
|
|
||||||
function nb(a,c){if(a.s.Da){a.K=y(a.s,c);var d=y(a.s,c+4);a.m=d&-14337;a.b=d>>11&7;for(var d=y(a.s,c+8),e=a.o=0;8>e;e++)a.o|=d>>e&d>>e+1&1<<e;a.ba=A(a.s,c+12);a.wa=y(a.s,c+16);a.ja=y(a.s,c+18);a.W=A(a.s,c+20);a.aa=y(a.s,c+24)}else db(a)}function pb(a,c){if(a=a.K>>10&3)return 1===a||3===a&&0<c?Math.floor(c):Math.ceil(c);a=Math.round(c);.5===a-c&&a%2&&a--;return a}function qb(a){return 0<a?Math.floor(a):Math.ceil(a)}
|
|
||||||
l.push=function(a){this.b=this.b-1&7;this.o>>this.b&1?(this.m&=-513,this.o&=~(1<<this.b),this.g[this.b]=a):(this.m|=512,this.m|=65,this.g[this.b]=this.Ja)};l.pop=function(){this.o|=1<<this.b;this.b=this.b+1&7};function rb(a,c){c=c+a.b&7;return a.o>>c&1?(a.m&=-513,a.m|=65,a.Ja):a.g[c]}function hb(a){return a.o>>a.b&1?(a.m&=-513,a.m|=65,a.Ja):a.g[a.b]}
|
|
||||||
function sb(a,c){var d=y(a.s,c+8),e=A(a.s,c)>>>0,f=A(a.s,c+4)>>>0;c=d>>15;d&=-32769;if(0===d)return 0;if(!(32767>d))return a.v[7]=127|c<<7,a.v[6]=240|f>>30<<3&8,a.v[5]=0,a.v[4]=0,a.D[0]=0,a.L[0];a=e+4294967296*f;c&&(a=-a);return a*Math.pow(2,d-16383-63)}
|
|
||||||
function tb(a,c,d){a.L[0]=a.g[a.b+d&7];d=a.v[7]&128;var e=(a.v[7]&127)<<4|a.v[6]>>4,f,h;2047===e?(e=32767,f=0,h=2147483648|(a.D[1]&524288)<<11):e?(e+=15360,f=a.D[0]<<11,h=2147483648|(a.D[1]&1048575)<<11|a.D[0]>>>21):h=f=0;x(a.s,c,f);x(a.s,c+4,h);mb(a.s,c+8,d<<8|e)}function ub(a,c){var d=A(a.s,c);c=A(a.s,c+4);a.D[0]=d;a.D[1]=c;return a.L[0]}function vb(a,c){lb(a.s,c,8);a.L[0]=rb(a,0);x(a.s,c,a.D[0]);x(a.s,c+4,a.D[1])}function wb(a,c){a.Fa[0]=A(a.s,c);return a.N[0]}
|
|
||||||
l.sign=function(a){return this.tb[(this.b+a&7)<<3|7]>>7};function xb(a,c,d,e,f){this.pa=new yb(this,a,c,d,e,0,f);this.na=new yb(this,a,void 0,!1,e,0,f);this.za=this.pa;this.s=a;e?1===e&&(this.b=368,this.Ha=15,this.Tb=248):(this.b=496,this.Ha=14,this.Tb=240);this.m=this.b|516;this.g=46080;this.Uc=[134,128,32,58,5,0,160,2,0,143,1,1,0,0,0,0,this.b&255|1,this.b>>8,0,0,this.m&255|1,this.m>>8,0,0,0,0,0,0,0,0,0,0,this.g&255|1,this.g>>8,0,0,0,0,0,0,0,0,0,0,67,16,212,130,0,0,0,0,0,0,0,0,0,0,0,0,this.Ha,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.dc=[{size:8},{size:4},!1,!1,{size:16}];this.name="ide"+e;zb(a.H.Tc,this);this.o=2;p(a.A,this.b|7,this,function(){Ab(this.s,this.Ha);return this.sf()});p(a.A,this.m|2,this,this.sf);q(a.A,this.m|2,this,this.nh);p(a.A,this.b|0,this,function(){return Bb(this.za)},function(){return Bb(this.za)|Bb(this.za)<<8},function(){return Bb(this.za)|Bb(this.za)<<8|Bb(this.za)<<
|
|
||||||
16|Bb(this.za)<<24});p(a.A,this.b|1,this,function(){return this.za.error});p(a.A,this.b|2,this,function(){return this.za.ta&255});p(a.A,this.b|3,this,function(){return this.za.nb&255});p(a.A,this.b|4,this,function(){return this.za.ia&255});p(a.A,this.b|5,this,function(){return this.za.Aa&255});p(a.A,this.b|6,this,function(){return this.za.Mc});q(a.A,this.b|0,this,function(a){Db(this.za,a)},function(a){var c=this.za;Db(c,a&255);Db(c,a>>8&255)},function(a){var c=this.za;Db(c,a&255);Db(c,a>>8&255);Db(c,
|
|
||||||
a>>16&255);Db(c,a>>24&255)});q(a.A,this.b|1,this,function(a){this.pa.qc=(this.pa.qc<<8|a)&65535;this.na.qc=(this.na.qc<<8|a)&65535});q(a.A,this.b|2,this,function(a){this.pa.ta=(this.pa.ta<<8|a)&65535;this.na.ta=(this.na.ta<<8|a)&65535});q(a.A,this.b|3,this,function(a){this.pa.nb=(this.pa.nb<<8|a)&65535;this.na.nb=(this.na.nb<<8|a)&65535});q(a.A,this.b|4,this,function(a){this.pa.ia=(this.pa.ia<<8|a)&65535;this.na.ia=(this.na.ia<<8|a)&65535});q(a.A,this.b|5,this,function(a){this.pa.Aa=(this.pa.Aa<<
|
|
||||||
8|a)&65535;this.na.Aa=(this.na.Aa<<8|a)&65535});q(a.A,this.b|6,this,function(a){this.za=a&16?this.na:this.pa;this.pa.Mc=a;this.na.Mc=a;this.pa.Rc=this.na.Rc=a>>6&1;this.pa.head=this.na.head=a&15});this.oa=this.wc=0;q(a.A,this.b|7,this,function(a){var c=this.za;if(c.buffer)switch(c.error=0,a){case 0:c.Y();c.status=80;break;case 8:c.D=0;Eb(c,0);Fb(c);c.Y();break;case 16:c.Y();break;case 248:case 39:c.Y();Gb(c,new Uint8Array([0,0,0,0,c.buffer.byteLength&255,c.buffer.byteLength>>8&255,c.buffer.byteLength>>
|
|
||||||
16&255,c.buffer.byteLength>>24&255,0,0,0,0]));c.status=88;break;case 32:case 36:case 41:case 196:Hb(c,a);break;case 48:case 52:case 57:case 197:a:{if(48===a||197===a){a=c.ta&255;var f=c.Rc?Ib(c):Jb(c);a||(a=256)}else if(52===a||57===a)a=c.ta,f=Kb(c),a||(a=65536);else break a;var d=a*c.o,f=f*c.o;c.ia+=a;f+d>c.buffer.byteLength?c.status=255:(c.status=88,Lb(c,d),c.Fa=f,c.ja=1);c.Y()}break;case 144:c.Y();c.error=257;c.status=80;break;case 145:c.Y();break;case 160:c.ba&&(c.status=88,Lb(c,12),c.ja=2,c.ta=
|
|
||||||
1,c.Y());break;case 161:c.ba?(Mb(c),c.status=88,c.ia=20,c.Aa=235):c.status=80;c.Y();break;case 198:c.wa=c.ta;c.Y();break;case 200:Nb(c);break;case 64:c.Y();c.status=80;c.Y();break;case 202:Ob(c);break;case 218:c.status=65;c.error=4;break;case 225:c.Y();break;case 236:if(c.ba){c.status=65;c.error=4;c.Y();break}Mb(c);c.status=88;c.Y();break;case 234:c.Y();break;case 239:c.Y();break;case 245:c.status=80;c.Y();break;default:c.status=65,c.error=4}});p(a.A,this.g|4,this,void 0,void 0,this.Nf);q(a.A,this.g|
|
|
||||||
4,this,void 0,void 0,this.Rf);p(a.A,this.g,this,this.Pf,void 0,this.Of);q(a.A,this.g,this,this.Tf,void 0,this.Sf);p(a.A,this.g|2,this,this.Qf);q(a.A,this.g|2,this,this.Qe);p(a.A,this.g|8,this,function(){return 0});p(a.A,this.g|10,this,function(){return 0})}l=xb.prototype;l.sf=function(){return this.za.buffer?this.za.status:0};l.nh=function(a){this.o=a;a&4&&(Fb(this.pa),Fb(this.na))};l.Nf=function(){return this.wc};l.Rf=function(a){this.wc=a};l.Qf=function(){return this.oa};
|
|
||||||
l.Qe=function(a){this.oa&=~a};l.Of=function(){return 1|this.oa<<16};l.Pf=function(){return 1};l.Sf=function(a){a&1&&this.Y();this.Qe(a>>16&255)};l.Tf=function(a){a&1&&this.Y()};l.Y=function(){this.o&2||this.s.v(this.Ha)};l.La=function(){var a=[];a[0]=this.pa;a[1]=this.na;a[2]=this.b;a[3]=this.Ha;a[4]=this.Tb;a[5]=this.m;a[6]=this.g;a[7]=this.name;a[8]=this.o;a[9]=this.wc;a[10]=this.oa;a[11]=this.za===this.pa;return a};
|
|
||||||
l.Ra=function(a){this.pa=a[0];this.na=a[1];this.b=a[2];this.Ha=a[3];this.Tb=a[4];this.m=a[5];this.g=a[6];this.name=a[7];this.o=a[8];this.wc=a[9];this.oa=a[10];this.za=a[11]?this.pa:this.na};
|
|
||||||
function yb(a,c,d,e,f,h,r){this.U=a;this.J=r;this.Ja=f;this.s=c;this.memory=c.memory;this.buffer=d;this.o=e?2048:512;this.ba=e;this.v=this.K=this.L=this.g=0;this.buffer&&(this.g=this.buffer.byteLength/this.o,this.g!==(this.g|0)&&(this.g=Math.ceil(this.g)),e?(this.L=1,this.K=0):(this.L=16,this.K=63),this.v=this.g/this.L/this.K,this.v!==(this.v|0)&&(this.v=Math.floor(this.v)),a=c.H.fc,a.ea[57]|=1<<4*this.Ja,a.ea[18]=a.ea[18]&15|240,a.ea[27]=this.v&255,a.ea[28]=this.v>>8&255,a.ea[29]=this.L&255,a.ea[30]=
|
|
||||||
255,a.ea[31]=255,a.ea[32]=200,a.ea[33]=this.v&255,a.ea[34]=this.v>>8&255,a.ea[35]=this.K&255);this.Ia={xf:0,yf:0,Ke:0,Le:0,bf:!1};this.buffer=d;this.Mc=this.head=this.Aa=this.ia=this.qc=this.nb=this.ta=this.Rc=0;this.status=80;this.wa=1;this.D=this.error=0;this.m=new Uint8Array(65536);this.aa=this.W=this.Fa=0;this.b=new Uint8Array(4096);this.ja=0}function Fb(a){a.ba?(a.status=0,a.ta=1,a.error=1,a.nb=1,a.ia=20,a.Aa=235):(a.status=81,a.ta=1,a.error=1,a.nb=1,a.ia=0,a.Aa=0)}yb.prototype.Y=function(){this.U.Y()};
|
|
||||||
function Pb(a){var c=a.N,d=a.Aa<<8&65280|a.ia&255;d||(d=32768);c=Math.min(c,d);c&=-2;a.ia=c;a.Aa=c>>8}function Qb(a){a.status=80;a.buffer.set(a.Fa,a.b.subarray(0,a.W),function(){this.Y()}.bind(a));Rb(a,a.W)}function Lb(a,c){c>a.b.length&&(a.b=new Uint8Array(c));a.W=c;a.aa=0}
|
|
||||||
function Sb(a,c){var d=(c[7]<<8|c[8])*a.o;c=(c[2]<<24|c[3]<<16|c[4]<<8|c[5])*a.o;Tb(a,0);a.ia=a.Aa=0;c>=a.buffer.byteLength?(a.status=255,a.Y()):d?(d=Math.min(d,a.buffer.byteLength-c),a.status=208,Ub(a),a.buffer.get(c,d,function(a){Gb(this,a);this.status=88;this.ta|=2;this.D=0;this.Y();Pb(this);Yb(this,d)}.bind(a))):(a.status=80,a.D=0)}
|
|
||||||
function Zb(a,c){var d=(c[7]<<8|c[8])*a.o;c=(c[2]<<24|c[3]<<16|c[4]<<8|c[5])*a.o;Tb(a,d);c>=a.buffer.byteLength?(a.status=255,a.Y()):(d=Math.min(d,a.buffer.byteLength-c),a.status=128,Ub(a),a.buffer.get(c,d,function(a){var c=this.U.wc,h=0;do{var r=$b(this.memory,c),k=this.memory.ma(c+4),t=this.memory.da(c+7)&128;k||(k=65536);this.memory.fa.set(a.subarray(h,h+k),r);h+=k;c+=8}while(!t);this.status=80;this.U.oa&=-4;this.U.oa|=4;this.Y();Yb(this,d)}.bind(a)))}
|
|
||||||
function Bb(a){if(a.D<a.N){var c=!1;(a.D+1)%(512*a.wa)&&a.D+1!==a.N||(c=!0);a.ia?a.ia--:a.Aa&&(a.Aa--,a.ia=255);if(!a.ia&&!a.Aa){var d=a.N-a.D-1;65536<=d?(a.Aa=240,a.ia=0):(a.Aa=d>>8,a.ia=d)}a.D+1>=a.N&&(a.status=80,a.ta=a.ta&-8|3,c=!0);c&&a.Y();return a.m[a.D++]}a.D++;return 0}
|
|
||||||
function Db(a,c){if(!(a.aa>=a.W)&&(a.b[a.aa++]=c,a.aa%(512*a.wa)||a.Y(),a.aa===a.W))switch(a.ja){case 1:Qb(a);break;case 2:a.D=0;switch(a.b[0]){case 0:Eb(a,0);a.status=80;break;case 3:Eb(a,a.b[4]);a.status=88;a.m[0]=240;a.m[7]=8;break;case 18:c=a.b[4]|a.b[3]<<8;Eb(a,c);a.status=88;a.m.set([5,128,1,49,31,0,0,0,83,79,78,89,32,32,32,32,67,68,45,82,79,77,32,67,68,85,45,49,48,48,48,32,49,46,49,97]);break;case 30:Eb(a,0);a.status=80;break;case 37:c=a.g-1;Gb(a,new Uint8Array([c>>24&255,c>>16&255,c>>8&255,
|
|
||||||
c&255,0,0,a.o>>8&255,a.o&255]));a.status=88;break;case 40:a.qc&1?Zb(a,a.b):Sb(a,a.b);break;case 66:c=a.b[8];Eb(a,Math.min(8,c));a.status=88;break;case 67:var d=a.b[9]>>6;c=a.b[8]|a.b[7]<<8;Eb(a,c);1===d&&a.m.set(new Uint8Array([0,10,1,1,0,0,0,0,0,0,0,0]));a.status=88;break;case 70:Eb(a,a.b[8]|a.b[7]<<8);a.status=88;break;case 74:Eb(a,a.b[8]|a.b[7]<<8);a.status=88;break;case 81:Eb(a,0);a.status=80;break;case 26:Eb(a,a.b[4]);a.status=88;break;case 90:c=a.b[8]|a.b[7]<<8;42===a.b[2]&&Eb(a,Math.min(30,
|
|
||||||
c));a.status=88;break;case 189:Eb(a,a.b[9]|a.b[8]<<8);a.m[5]=1;a.status=88;break;default:a.status=80}a.ta=a.ta&-8|2;a.status&128||(Pb(a),a.Y());a.status&128||0!==a.N||(a.ta|=1,a.status&=-9)}}
|
|
||||||
function Hb(a,c){if(32===c||196===c){c=a.ta&255;var d=a.Rc?Ib(a):Jb(a);c||(c=256)}else if(36===c||41===c)c=a.ta,d=Kb(a),c||(c=65536);else return;var e=c*a.o,d=d*a.o;a.ia+=c;d+e>a.buffer.byteLength?(a.status=255,a.Y()):(a.status=128,Ub(a),a.buffer.get(d,e,function(a){Gb(this,a);this.status=88;this.D=0;this.Y();Yb(this,e)}.bind(a)))}
|
|
||||||
function Nb(a){var c=a.ta&255,d=c*a.o,e=Ib(a)*a.o;a.ia+=c;e+d>a.buffer.byteLength?(a.status=255,a.Y()):(a.status=216,a.U.oa|=1,Ub(a),a.buffer.get(e,d,function(a){var c=this.U.wc,e=0;do{var k=$b(this.memory,c),t=this.memory.ma(c+4),u=this.memory.da(c+7)&128;t||(t=65536);this.memory.fa.set(a.subarray(e,e+t),k);e+=t;c+=8}while(!u);this.status=80;this.U.oa&=-4;this.U.oa|=4;this.Y();Yb(this,d)}.bind(a)))}
|
|
||||||
function Ob(a){var c=a.ta&255,d=c*a.o,e=Ib(a)*a.o;a.ia+=c;if(e+d>a.buffer.byteLength)a.status=255,a.Y();else{a.status=128;a.U.oa|=1;var c=a.U.wc,f=0,h=0,r=0;do{var k=$b(a.memory,c),t=a.memory.ma(c+4),u=a.memory.da(c+7)&128;t||(t=65536);a.buffer.set(e+r,a.memory.fa.subarray(k,k+t),function(){h++;h===f&&(this.status=80,this.Y(),this.U.oa&=-4,this.U.oa|=4)}.bind(a));r+=t;c+=8;f++}while(!u);h===f&&(a.status=80,a.Y(),a.U.oa&=-4,a.U.oa|=4);Rb(a,d)}}
|
|
||||||
function Jb(a){return((a.ia&255|a.Aa<<8&65280)*a.L+a.head)*a.K+(a.nb&255)-1}function Ib(a){return a.nb&255|a.ia<<8&65280|a.Aa<<16&16711680|(a.head&15)<<24}function Kb(a){return(a.nb&255|a.ia<<8&65280|a.Aa<<16&16711680|a.nb>>8<<24&4278190080)>>>0}
|
|
||||||
function Mb(a){a.D=0;if(a.Mc&16)Eb(a,0);else{for(var c=0;512>c;c++)a.m[c]=0;Gb(a,[64,a.ba?133:0,a.v,a.v>>8,0,0,a.L,a.L>>8,a.K/512,a.K/512>>8,0,2,a.K,a.K>>8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,2,4,0,0,0,0,0,0,0,0,0,56,118,32,54,68,72,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,255,0,1,0,0,3,0,0,0,2,0,2,7,0,a.v,a.v>>8,a.L,a.L>>8,a.K,0,a.g&255,a.g>>8&255,a.g>>16&255,a.g>>24&255,0,0,a.g&255,a.g>>8&255,a.g>>16&255,a.g>>24&
|
|
||||||
255,0,0,0,4,0,0,30,0,30,0,30,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,126,0,0,0,0,0,0,116,0,64,0,64,0,116,0,64,0,0,0,0,0,0,0,0,0,0,1,96,0,0,0,0,0,0,0,0,0,0,0,0,a.g&255,a.g>>8&255,a.g>>16&255,a.g>>24&255]);a.N=512;16383<a.v&&(a.m[2]=a.m[108]=255,a.m[3]=a.m[109]=63)}}function Eb(a,c){Tb(a,c);for(var d=0;d<c;d++)a.m[d]=0}function Tb(a,c){a.m.length<c&&(a.m=new Uint8Array(c+3&-4));a.N=c}function Gb(a,c){a.m.length<c.length&&(a.m=new Uint8Array(c.length+3&-4));a.m.set(c);a.N=c.length}
|
|
||||||
function Ub(a){a.Ia.bf=!0;a.J.send("ide-read-start")}function Yb(a,c){a.Ia.bf=!1;var d=c/a.o|0;a.Ia.xf+=d;a.Ia.Ke+=c;a.J.send("ide-read-end",[a.Ja,c,d])}function Rb(a,c){var d=c/a.o|0;a.Ia.yf+=d;a.Ia.Le+=c;a.J.send("ide-write-end",[a.Ja,c,d])}
|
|
||||||
yb.prototype.La=function(){var a=[];a[0]=this.ta;a[1]=this.v;a[2]=this.Aa;a[3]=this.ia;a[4]=this.D;a[5]=this.b;a[6]=this.ja;a[7]=this.W;a[8]=this.aa;a[9]=this.Mc;a[10]=this.error;a[11]=this.head;a[12]=this.L;a[13]=this.ba;a[14]=this.Rc;a[15]=this.qc;a[16]=this.m;a[17]=this.N;a[18]=this.nb;a[19]=this.g;a[20]=this.o;a[21]=this.wa;a[22]=this.K;a[23]=this.status;a[24]=this.Fa;return a};
|
|
||||||
yb.prototype.Ra=function(a){this.ta=a[0];this.v=a[1];this.Aa=a[2];this.ia=a[3];this.D=a[4];this.b=a[5];this.ja=a[6];this.W=a[7];this.aa=a[8];this.Mc=a[9];this.error=a[10];this.head=a[11];this.L=a[12];this.ba=a[13];this.Rc=a[14];this.qc=a[15];this.m=a[16];this.N=a[17];this.nb=a[18];this.g=a[19];this.o=a[20];this.wa=a[21];this.K=a[22];this.status=a[23];this.Fa=a[24]};function ac(a){this.lb=new Uint8Array(4);this.vc=new Uint8Array(4);this.tc=new Uint8Array(4);this.uc=new Uint8Array(4);new Int32Array(this.lb.buffer);this.kg=new Int32Array(this.vc.buffer);this.hf=new Int32Array(this.tc.buffer);this.jf=new Int32Array(this.uc.buffer);this.mc=[];this.H=[];this.Zd=[];for(var c=0;256>c;c++)this.mc[c]=void 0,this.H[c]=void 0,this.Zd[c]=void 0;this.A=a.A;a.A.Dd(3324,this,function(a){this.vc[0]=a},function(a){this.vc[1]=a},function(a){this.vc[2]=a},function(a){this.vc[3]=
|
|
||||||
a;a=this.lb[2]<<8|this.lb[1];var c=this.lb[0]&252,f=this.mc[a],h=this.H[a];if(f){var r=this.kg[0];if(16<=c&&40>c){var k=c-16>>2;if(h=h.dc[k]){var c=c>>2,t=f[c]&1;-1===(r|3|h.size-1)?(r=~(h.size-1)|t,t||(f[c]=r)):t||(f[c]=this.Zd[a][k]&-4);1===t&&(bc(this,f[c]&65534,r&65534,h.size),f[c]=r|1)}else f[c>>2]=0}else f[c>>2]=r}});a.A.tf(3324,this,function(){return this.tc[0]},function(){return this.tc[1]},function(){return this.tc[2]},function(){return this.tc[3]});a.A.tf(3320,this,function(){return this.uc[0]},
|
|
||||||
function(){return this.uc[1]},function(){return this.uc[2]},function(){return this.uc[3]});a.A.Dd(3320,this,function(a){this.lb[0]=a},function(a){this.lb[1]=a},function(a){this.lb[2]=a},function(a){this.lb[3]=a;a=this.lb[0]&252;var c=this.mc[this.lb[2]<<8|this.lb[1]];void 0!==c?(this.jf[0]=-2147483648,this.hf[0]=a<c.byteLength?c[a>>2]:0):(this.hf[0]=-1,this.jf[0]=0)});zb(this,{Tb:0,Uc:[134,128,55,18,0,0,0,0,2,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
||||||
0,0,0,0,0,0,0,0,0,0,0],dc:[],name:"82441FX PMC"});zb(this,{Tb:8,Uc:[134,128,0,112,7,0,0,2,0,0,1,6,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],dc:[],name:"82371SB PIIX3 ISA"})}ac.prototype.La=function(){for(var a=[],c=0;256>c;c++)a[c]=this.mc[c];a[256]=this.lb;a[257]=this.vc;a[258]=this.tc;a[259]=this.uc;return a};
|
|
||||||
ac.prototype.Ra=function(a){for(var c=0;256>c;c++){var d=this.H[c],e=a[c];if(d&&e){for(var f=0;f<d.dc.length;f++){var h=d.dc[f],r=e[4+f];r&1&&bc(this,this.mc[c][4+f]&65534,r&65534,h.size)}this.mc[c].set(e)}}this.lb.set(a[256]);this.vc.set(a[257]);this.tc.set(a[258]);this.uc.set(a[259])};function zb(a,c){var d=c.Tb,e=new Int32Array((new Uint8Array(c.Uc)).buffer);a.mc[d]=e;a.H[d]=c;a.Zd[d]=new Int32Array(6);a.Zd[d].set(e.subarray(4,10))}
|
|
||||||
function bc(a,c,d,e){if(d!==c&&!(Math.abs(c-d)<e)){a=a.A.ports;for(var f=0;f<e;f++){var h=a[c+f];a[c+f]=a[d+f];a[d+f]=h}}};function cc(a,c){this.A=a.A;this.s=a;this.Lc=a.H.Lc;this.g=0;this.ba=new Uint8Array(10);this.ja=0;this.o=null;this.b=new Uint8Array(10);this.K=this.v=this.m=0;this.wa=c;this.aa=this.N=this.sb=this.Nb=this.Mb=this.tb=0;this.Fa=1;this.D=0;if(c){this.K=c.byteLength;var d;d={160:{type:1,Ab:40,xb:8,ub:1},180:{type:1,Ab:40,xb:9,ub:1},200:{type:1,Ab:40,xb:10,ub:1},320:{type:1,Ab:40,xb:8,ub:2},360:{type:1,Ab:40,xb:9,ub:2},400:{type:1,Ab:40,xb:10,ub:2},720:{type:3,Ab:80,xb:9,ub:2},1200:{type:2,Ab:80,xb:15,
|
|
||||||
ub:2},1440:{type:4,Ab:80,xb:18,ub:2},1722:{type:5,Ab:82,xb:21,ub:2},2880:{type:5,Ab:80,xb:36,ub:2}}[this.K>>10];if(!d||this.K&1023)throw"Unknown floppy size: "+$a(c.byteLength);a.H.fc.ea[16]=d.type<<4;a=d.xb;c=d.ub;d=d.Ab;this.L=a;this.W=c;this.Ja=d}else a.H.fc.ea[16]=64,this.K=this.Ja=this.W=this.L=0;p(this.A,1008,this,this.Ig);p(this.A,1010,this,this.Jg);p(this.A,1012,this,this.Lg);p(this.A,1013,this,this.Mg);p(this.A,1015,this,this.Og);q(this.A,1010,this,this.Kg);q(this.A,1013,this,this.Ng)}
|
|
||||||
l=cc.prototype;l.La=function(){var a=[];a[0]=this.g;a[1]=this.ba;a[2]=this.ja;a[4]=this.b;a[5]=this.m;a[6]=this.v;a[7]=this.K;a[8]=this.tb;a[9]=this.Mb;a[10]=this.Nb;a[11]=this.sb;a[12]=this.N;a[13]=this.aa;a[14]=this.Fa;a[15]=this.D;a[16]=this.L;a[17]=this.W;a[18]=this.Ja;return a};
|
|
||||||
l.Ra=function(a){this.g=a[0];this.ba=a[1];this.ja=a[2];this.o=a[3];this.b=a[4];this.m=a[5];this.v=a[6];this.K=a[7];this.tb=a[8];this.Mb=a[9];this.Nb=a[10];this.sb=a[11];this.N=a[12];this.aa=a[13];this.Fa=a[14];this.D=a[15];this.L=a[16];this.W=a[17];this.Ja=a[18]};l.Ig=function(){return 0};l.Lg=function(){var a=128;this.m<this.v&&(a|=80);this.D&8||(a|=32);return a};l.Og=function(){return 0};l.Mg=function(){return this.m<this.v?this.b[this.m++]:255};
|
|
||||||
l.Ng=function(a){if(0<this.g)this.ba[this.ja++]=a,this.g--,0===this.g&&this.o.call(this,this.ba);else{switch(a){case 3:this.o=this.Yf;this.g=2;break;case 4:this.o=this.Gf;this.g=1;break;case 5:case 197:this.o=function(a){dc(this,!0,a)};this.g=8;break;case 230:this.o=function(a){dc(this,!1,a)};this.g=8;break;case 7:this.o=this.Ff;this.g=1;break;case 8:this.m=0;this.v=2;this.b[0]=32;this.b[1]=this.N;break;case 74:this.o=this.Yg;this.g=1;break;case 15:this.g=2;this.o=this.Bf;break;case 14:this.b[0]=
|
|
||||||
128,this.m=0,this.v=1,this.g=0}this.ja=0}};l.Jg=function(){return this.D};l.Kg=function(a){4!==(a&4)||this.D&4||this.s.v(6);this.D=a};l.Gf=function(){this.m=0;this.v=1;this.b[0]=32};l.Bf=function(a){this.N=a[1];this.aa=a[0]>>2&1;ec(this)};l.Ff=function(){ec(this)};function dc(a,c,d){var e=d[2],f=d[1],h=d[3],r=((e+a.W*f)*a.L+h-1)*(128<<d[4]);a.wa&&(c?fc(a.Lc,a.wa,r,a.done.bind(a,d,f,e,h)):gc(a.Lc,a.wa,r,a.done.bind(a,d,f,e,h)))}
|
|
||||||
l.done=function(a,c,d,e,f){f||(e++,e>this.L&&(e=1,d++,d>=this.W&&(d=0,c++)),this.N=c,this.aa=d,this.Fa=e,this.m=0,this.v=7,this.b[0]=d<<2|32,this.b[1]=0,this.b[2]=0,this.b[3]=c,this.b[4]=d,this.b[5]=e,this.b[6]=a[4],ec(this))};l.Yf=function(){};l.Yg=function(){this.m=0;this.v=7;this.b[0]=0;this.b[1]=0;this.b[2]=0;this.b[3]=0;this.b[4]=0;this.b[5]=0;this.b[6]=0;ec(this)};function ec(a){a.D&8&&a.s.v(6)};function hc(a,c){this.size=a;this.b=new Uint8Array(32768);this.g=[];this.m=[];this.o=[];this.v=[];a=c?new ArrayBuffer(0):new ArrayBuffer(a);this.fa=new Uint8Array(a);this.D=new Uint16Array(a);this.Hb=new Int32Array(a)}l=hc.prototype;l.La=function(){return[this.size,this.fa]};l.Ra=function(a){this.size=a[0];this.fa=a[1];this.D=new Uint16Array(this.fa.buffer,this.fa.byteOffset,this.fa.length>>1);this.Hb=new Int32Array(this.fa.buffer,this.fa.byteOffset,this.fa.length>>2)};
|
|
||||||
function ic(a,c){a=a.g[c>>>17];return a(c)|a(c+1|0)<<8}function jc(a,c,d){a=a.m[c>>>17];a(c,d&255);a(c+1|0,d>>8&255)}l.da=function(a){return this.b[a>>>17]?this.g[a>>>17](a):this.fa[a]};l.ma=function(a){return this.b[a>>>17]?ic(this,a):this.fa[a]|this.fa[a+1|0]<<8};function kc(a,c){return a.b[c>>>16]?ic(a,c<<1):a.D[c]}function $b(a,c){return a.b[c>>>17]?a.o[c>>>17](c):a.fa[c]|a.fa[c+1|0]<<8|a.fa[c+2|0]<<16|a.fa[c+3|0]<<24}function lc(a,c){a.b[c>>>15]?(c<<=2,a=a.o[c>>>17](c)):a=a.Hb[c];return a}
|
|
||||||
l.sa=function(a,c){if(this.b[a>>>17])this.m[a>>>17](a,c);else this.fa[a]=c};l.ad=function(a,c){this.b[a>>>17]?jc(this,a,c):(this.fa[a]=c,this.fa[a+1|0]=c>>8)};function mc(a,c,d){a.b[c>>>16]?jc(a,c<<1,d):a.D[c]=d}l.Cc=function(a,c){if(this.b[a>>>17])this.v[a>>>17](a,c);else this.fa[a]=c,this.fa[a+1|0]=c>>8,this.fa[a+2|0]=c>>16,this.fa[a+3|0]=c>>24};function nc(a,c,d){a.b[c>>>15]?(c<<=2,a.v[c>>>17](c,d)):a.Hb[c]=d};function oc(a){this.memory=a.memory;this.b=new Int32Array(4);this.g=new Int32Array(4);this.m=0;a=a.A;q(a,4,this,this.mf.bind(this,4));q(a,5,this,this.mf.bind(this,5));q(a,10,this,this.Ug);q(a,11,this,this.Vg);q(a,12,this,this.Wg);q(a,129,this,this.Tg)}l=oc.prototype;l.La=function(){return[this.b,this.g,this.m]};l.Ra=function(a){this.b=a[0];this.g=a[1];this.m=a[2]};l.mf=function(a,c){if(8>a){var d=a>>1;a&1?this.g[d]=pc(this,this.g[d],c):this.b[d]=pc(this,this.b[d],c)}};l.Ug=function(){};l.Vg=function(){};
|
|
||||||
l.Wg=function(){this.m=0};l.Tg=function(a){this.b[2]=this.b[2]&65535|a<<16};function gc(a,c,d,e){var f=a.g[2]+1,h=a.b[2];if(d+f>c.byteLength)e(!0);else{var r=a.memory;a.b[2]+=f;c.get(d,f,function(a){r.fa.set(a,h);e(!1)})}}function fc(a,c,d,e){var f=a.g[2],h=a.b[2];d+f>c.byteLength?e(!0):(a.b[2]+=f,c.set(d,a.memory.fa.subarray(h,h+f+1),function(){e(!1)}))}function pc(a,c,d){a.m^=1;return a.m?c&-256|d:c&-65281|d<<8};function qc(a){this.s=a;this.o=new Float64Array(3);this.v=new Uint16Array(3);this.b=new Uint8Array(4);this.m=new Uint8Array(4);this.L=new Uint8Array(4);this.N=new Uint8Array(4);this.D=new Uint8Array(4);this.K=new Uint16Array(3);this.g=new Uint16Array(3);p(a.A,97,this,function(){var a=Oa(),d=66.66666666666667*a&1,a=rc(this,2,a);return d<<4|a<<5});p(a.A,64,this,function(){return sc(this,0)});p(a.A,65,this,function(){return sc(this,1)});p(a.A,66,this,function(){return sc(this,2)});q(a.A,64,this,function(a){tc(this,
|
|
||||||
0,a)});q(a.A,65,this,function(a){tc(this,1,a)});q(a.A,66,this,function(a){tc(this,2,a)});q(a.A,67,this,this.W)}qc.prototype.La=function(){var a=[];a[0]=this.b;a[1]=this.m;a[2]=this.L;a[3]=this.N;a[4]=this.D;a[5]=this.K;a[6]=this.g;a[7]=this.o;a[8]=this.v;return a};qc.prototype.Ra=function(a){this.b=a[0];this.m=a[1];this.L=a[2];this.N=a[3];this.D=a[4];this.K=a[5];this.g=a[6];this.o=a[7];this.v=a[8]};
|
|
||||||
qc.prototype.zb=function(a,c){!c&&this.m[0]&&rc(this,0,a)&&(this.v[0]=uc(this,0,a),this.o[0]=a,this.s.v(0),0===this.L[0]&&(this.m[0]=0));return 0};function uc(a,c,d){if(!a.m[c])return 0;d=a.v[c]-Math.floor(1193.1816666*(d-a.o[c]));0>d&&(a=a.g[c],d=d%a+a);return d}function rc(a,c,d){d-=a.o[c];return 0>d?!0:a.v[c]<Math.floor(1193.1816666*d)}function sc(a,c){var d=a.D[c];if(d)return a.D[c]--,2===d?a.K[c]&255:a.K[c]>>8;d=a.b[c];3===a.L[c]&&(a.b[c]^=1);a=uc(a,c,Oa());return d?a&255:a>>8}
|
|
||||||
function tc(a,c,d){a.g[c]=a.b[c]?a.g[c]&-256|d:a.g[c]&255|d<<8;3===a.N[c]&&a.b[c]||(a.g[c]||(a.g[c]=65535),a.v[c]=a.g[c],a.m[c]=!0,a.o[c]=Oa());3===a.N[c]&&(a.b[c]^=1)}qc.prototype.W=function(a){var c=a>>1&7,d=a>>6&3;a=a>>4&3;3!==d&&(a?(6<=c&&(c&=-5),this.b[d]=1===a?0:1,this.L[d]=c,this.N[d]=a):(this.D[d]=2,c=uc(this,d,Oa()),this.K[d]=c?c-1:0))};function vc(a,c,d){this.J=c;this.Ca=d;this.D=0;this.cd=14;this.bd=15;this.ba=80;this.Mb=25;this.m=this.Rd=this.Nb=0;this.Qb=!0;this.Db=!1;this.Lb=new Int32Array(256);this.K=this.v=this.aa=this.W=this.N=this.L=0;this.Ec=80;this.gc=!1;this.Wb=32;this.oe=this.wa=0;this.Uc=[222,16,32,10,7,0,0,0,162,0,0,3,0,0,128,0,8,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,1,0,0];this.Tb=144;this.dc=[];this.name="vga";zb(a.H.Tc,this);this.Ia={ze:!1,$g:0,ah:0,Ef:0};this.Fa=
|
|
||||||
this.Ja=this.Pd=this.dd=0;this.o=-1;this.Md=new Uint8Array(16);this.Dc=-1;this.g=15;this.Sd=0;this.tb=-1;this.fd=this.ed=this.gd=0;this.b=255;this.Nd=0;this.hd=this.Od=255;a=a.A;q(a,960,this,this.pg);p(a,960,this,this.kf,this.og);p(a,961,this,this.lf);q(a,962,this,this.qg);a.Dd(964,this,this.sg,this.ug);p(a,964,this,this.rg);p(a,965,this,this.tg);a.Dd(974,this,this.Bg,this.Dg);p(a,974,this,this.Ag);p(a,975,this,this.Cg);q(a,967,this,this.vg);q(a,968,this,this.wg);q(a,969,this,this.yg);p(a,969,this,
|
|
||||||
this.xg);p(a,972,this,this.zg);a.Dd(980,this,this.Eg,this.Gg);p(a,981,this,this.Fg);p(a,986,this,this.Hg);this.sb=-1;this.ja=0;q(a,462,this,void 0,this.lg);q(a,463,this,void 0,this.ng);p(a,463,this,void 0,this.mg);void 0===this.Ca||262144>this.Ca?this.Ca=262144:this.Ca&65535&&(this.Ca|=65535,this.Ca++);this.ra=new Uint8Array(this.Ca);this.Ua=this.Ca;this.Ta=0;this.se=void 0;c.register("screen-tell-buffer",function(a){this.se=a[0]},this);c.register("screen-fill-buffer",function(){if(this.Db&&this.se&&
|
|
||||||
!(this.Ta<this.Ua)){var a,c=0;this.gc?a=this.Wb:this.Qb?a=8:(a=8,c=262144);var d=this.se,e=this.Ua,t=this.Ta;switch(a){case 32:var u=e>>2,z=(t>>2)+1;for(a=u;a<z;a++)t=this.zf[a],d[a]=t<<16|t>>16&255|t&65280|4278190080;break;case 24:var u=e/3|0,z=(t/3|0)+1,G=3*u;for(a=u;G<t;a++){var F=this.ra[G++],c=this.ra[G++],e=this.ra[G++];d[a]=F<<16|c<<8|e|4278190080}break;case 16:u=e>>1;z=(t>>1)+1;for(a=u;a<z;a++)t=this.fh[a],e=255*(t>>11)/31|0,c=255*(t>>5&63)/63|0,F=255*(t&31)/31|0,d[a]=F<<16|c<<8|e|4278190080;
|
|
||||||
break;case 8:for(u=e-c,z=t-c+1,a=e;a<t;a++)e=this.Lb[this.ra[a]],d[a-c]=e&65280|e<<16|e>>16|4278190080}this.Ua=this.Ca;this.Ta=0;this.J.send("screen-fill-buffer-end",[u,z])}},this);this.fh=new Uint16Array(this.ra.buffer);this.zf=new Int32Array(this.ra.buffer);this.Fc=new Uint8Array(this.ra.buffer,0,262144);this.ke=new Uint8Array(this.ra.buffer,0,65536);this.le=new Uint8Array(this.ra.buffer,65536,65536);this.ie=new Uint8Array(this.ra.buffer,131072,65536);this.me=new Uint8Array(this.ra.buffer,196608,
|
|
||||||
65536);var e=this;Ca(a,655360,131072,function(a){a-=655360;!e.Db||e.Qb?(a|=e.wa,a=e.ra[a]):(a&=65535,e.L=e.ke[a],e.N=e.le[a],e.W=e.ie[a],e.aa=e.me[a],a=e.Fc[e.gd<<16|a]);return a},function(a,c){a-=655360;if(e.Db)if(e.Qb){var d=a,d=d|e.wa;e.Ua=d<e.Ua?d:e.Ua;e.Ta=d>e.Ta?d:e.Ta;e.ra[d]=c}else{if(!(65535<a)){var k,t,u,z=e.ed&3;z?2===z&&(e.g&1&&(d=e.L&~e.b|(c&1?255:0)&e.b),e.g&2&&(k=e.N&~e.b|(c&2?255:0)&e.b),e.g&4&&(t=e.W&~e.b|(c&4?255:0)&e.b),e.g&8&&(u=e.aa&~e.b|(c&8?255:0)&e.b)):d=k=t=u=c;if(z&&2!==
|
|
||||||
z)1===z&&(d=e.L,k=e.N,t=e.W,u=e.aa);else{switch(e.fd&24){case 8:d&=e.L;k&=e.N;t&=e.W;u&=e.aa;break;case 16:d|=e.L;k|=e.N;t|=e.W;u|=e.aa;break;case 24:d^=e.L,k^=e.N,t^=e.W,u^=e.aa}e.g&1&&(d=e.L&~e.b|d&e.b);e.g&2&&(k=e.N&~e.b|k&e.b);e.g&4&&(t=e.W&~e.b|t&e.b);e.g&8&&(u=e.aa&~e.b|u&e.b)}e.g&1?e.ke[a]=d:d=e.ke[a];e.g&2?e.le[a]=k:k=e.le[a];e.g&4?e.ie[a]=t:t=e.ie[a];e.g&8?e.me[a]=u:u=e.me[a];if(!(a>=e.Nb*e.Rd<<3))for(k<<=1,t<<=2,u<<=3,c=a<<3|7,a=c+262144,e.Ua=a-7<e.Ua?a-7:e.Ua,e.Ta=a>e.Ta?a:e.Ta,a=0;8>a;a++)e.ra[c+
|
|
||||||
262144]=e.Md[d>>a&1|k>>a&2|t>>a&4|u>>a&8],c--}}else d=a,98304>d||(t=(d-98304>>1)-e.m,k=t/e.ba|0,t%=e.ba,d&1?(a=c,u=e.Fc[d&-2]):(u=c,a=e.Fc[d|1]),e.J.send("screen-put-char",[k,t,u,e.Lb[a>>4&15],e.Lb[a&15]]),e.Fc[d]=c)});Ca(a,3758096384,this.Ca,function(a){return e.ra[a&268435455]},function(a,c){a&=268435455;e.ra[a]=c;e.Ua=a<e.Ua?a:e.Ua;e.Ta=a>e.Ta?a:e.Ta},function(a){a&=268435455;return a&3?e.ra[a]|e.ra[a+1]<<8|e.ra[a+2]<<16|e.ra[a+3]<<24:e.zf[a>>2]},function(a,c){a&=268435455;e.Ua=a<e.Ua?a:e.Ua;e.Ta=
|
|
||||||
a+3>e.Ta?a+3:e.Ta;e.ra[a]=c;e.ra[a+1]=c>>8;e.ra[a+2]=c>>16;e.ra[a+3]=c>>24})}l=vc.prototype;
|
|
||||||
l.La=function(){var a=[];a[0]=this.Ca;a[1]=this.D;a[2]=this.cd;a[3]=this.bd;a[4]=this.ba;a[5]=this.Mb;a[6]=this.Nb;a[7]=this.Rd;a[8]=this.m;a[9]=this.Db;a[10]=this.Lb;a[11]=this.L;a[12]=this.N;a[13]=this.W;a[14]=this.aa;a[15]=this.v;a[16]=this.K;a[17]=this.Ec;a[18]=this.gc;a[19]=this.Wb;a[20]=this.wa;a[21]=this.oe;a[22]=this.dd;a[23]=this.Ja;a[24]=this.Fa;a[25]=this.Md;a[26]=this.Dc;a[27]=this.g;a[28]=this.Sd;a[29]=this.tb;a[30]=this.gd;a[31]=this.ed;a[32]=this.fd;a[33]=this.b;a[34]=this.Nd;a[35]=
|
|
||||||
this.Od;a[36]=this.hd;a[37]=this.sb;a[38]=this.ja;a[39]=this.ra;a[40]=this.Qb;a[41]=this.o;a[42]=this.Pd;return a};
|
|
||||||
l.Ra=function(a){this.Ca=a[0];this.D=a[1];this.cd=a[2];this.bd=a[3];this.ba=a[4];this.Mb=a[5];this.Nb=a[6];this.Rd=a[7];this.m=a[8];this.Db=a[9];this.Lb=a[10];this.L=a[11];this.N=a[12];this.W=a[13];this.aa=a[14];this.v=a[15];this.K=a[16];this.Ec=a[17];this.gc=a[18];this.Wb=a[19];this.wa=a[20];this.oe=a[21];this.dd=a[22];this.Ja=a[23];this.Fa=a[24];this.Md=a[25];this.Dc=a[26];this.g=a[27];this.Sd=a[28];this.tb=a[29];this.gd=a[30];this.ed=a[31];this.fd=a[32];this.b=a[33];this.Nd=a[34];this.Od=a[35];
|
|
||||||
this.hd=a[36];this.sb=a[37];this.ja=a[38];this.ra.set(a[39]);this.Qb=a[40];this.o=a[41];this.Pd=a[42];this.J.send("screen-set-mode",this.Db);this.Db?this.Fd(this.v,this.K,this.Wb):(this.zc(this.ba,this.Mb),this.Ld(),this.Kd());wc(this)};l.Kd=function(){var a=(this.D-this.m)/this.ba|0,c=(this.D-this.m)%this.ba,a=Math.min(this.Mb-1,a);this.J.send("screen-update-cursor",[a,c])};
|
|
||||||
function wc(a){if(a.Db)a.Ua=0,a.Ta=a.Ca;else for(var c=98304|a.m<<1,d,e,f=0;f<a.Mb;f++)for(var h=0;h<a.ba;h++)d=a.Fc[c],e=a.Fc[c|1],a.J.send("screen-put-char",[f,h,d,a.Lb[e>>4&15],a.Lb[e&15]]),c+=2}l.cb=function(){};l.zc=function(a,c){this.ba=a;this.Mb=c;this.J.send("screen-set-size-text",[a,c])};l.Fd=function(a,c,d){this.Nb=a;this.Rd=c;this.Ia.Ef=d;this.Ia.ze=!0;this.Ia.$g=a;this.Ia.ah=c;this.J.send("screen-set-size-graphical",[a,c,d])};
|
|
||||||
l.Ld=function(){this.J.send("screen-update-cursor-scanline",[this.cd,this.bd])};function xc(a,c){var d=!1,e=0,f=0;switch(c){case 3:a.zc(a.Ec,25);break;case 16:e=640;f=350;d=!0;a.Qb=!1;break;case 18:e=640;f=480;d=!0;a.Qb=!1;break;case 19:e=320,f=200,d=!0,a.Qb=!0}a.J.send("screen-set-mode",d);if(a.Ia.ze=d)a.v=e,a.K=f,a.Fd(e,f,8);a.Db=d}l.pg=function(a){-1===this.o?this.o=a:(16>this.o&&(this.Md[this.o]=a),this.o=-1)};l.kf=function(){var a=this.o;this.o=-1;return a};
|
|
||||||
l.og=function(){return this.kf()&255|this.lf()<<8&65280};l.lf=function(){return this.o=-1};l.qg=function(a){this.Od=a;103===a?xc(this,3):227===a?xc(this,18):99===a?xc(this,19):163===a?xc(this,16):xc(this,3)};l.sg=function(a){this.Dc=a};l.rg=function(){return this.Dc};l.ug=function(a){switch(this.Dc){case 2:this.g=a;break;case 4:this.Sd=a}};l.tg=function(){switch(this.Dc){case 2:return this.g;case 4:return this.Sd;case 6:return 18}return 0};l.vg=function(a){this.Fa=3*a};
|
|
||||||
l.wg=function(a){this.Ja=3*a};l.yg=function(a){var c=this.Ja/3|0,d=this.Ja%3,e=this.Lb[c];a=255*a/63&255;this.Lb[c]=d?1===d?e&-65281|a<<8:e&-256|a:e&-16711681|a<<16;this.Ja++};l.xg=function(){var a=this.Fa%3,c=this.Lb[this.Fa/3|0];this.Fa++;return(c>>8*(2-a)&255)/255*63|0};l.zg=function(){return this.Od};l.Bg=function(a){this.tb=a};l.Ag=function(){return this.tb};l.Dg=function(a){switch(this.tb){case 3:this.fd=a;break;case 4:this.gd=a;break;case 5:this.ed=a;break;case 8:this.b=a}};
|
|
||||||
l.Cg=function(){switch(this.tb){case 3:return this.fd;case 4:return this.gd;case 5:return this.ed;case 8:return this.b}return 0};l.Eg=function(a){this.dd=a};
|
|
||||||
l.Gg=function(a){switch(this.dd){case 2:this.Ec=a;break;case 9:this.Nd=a;7===(a&31)?this.zc(this.Ec,50):this.zc(this.Ec,25);break;case 10:this.cd=a;this.Ld();break;case 11:this.bd=a;this.Ld();break;case 12:this.m=this.m&255|a<<8;wc(this);break;case 13:this.m=this.m&65280|a;wc(this);break;case 14:this.D=this.D&255|a<<8;this.Kd();break;case 15:this.D=this.D&65280|a;this.Kd();break;case 19:this.Pd=a}};
|
|
||||||
l.Fg=function(){switch(this.dd){case 9:return this.Nd;case 10:return this.cd;case 11:return this.bd;case 12:return this.m&255;case 13:return this.m>>8;case 14:return this.D>>8;case 15:return this.D&255;case 19:return this.Pd}return 0};l.Hg=function(){this.hd^=8;this.o=-1;return this.hd};l.lg=function(a){this.sb=a};
|
|
||||||
l.ng=function(a){switch(this.sb){case 1:this.v=a;2560<this.v&&(this.v=2560);break;case 2:this.K=a;1600<this.K&&(this.K=1600);break;case 3:this.Wb=a;break;case 4:this.gc=1===(a&1);this.ja=a;break;case 5:this.wa=a<<16;break;case 9:this.oe=this.v*(15===this.Wb?16:this.Wb)/8*a,wc(this)}!this.gc||this.v&&this.K||(this.gc=!1);this.gc&&4===this.sb&&(this.Fd(this.v,this.K,this.Wb),this.J.send("screen-set-mode",!0),this.Qb=this.Db=!0);this.gc||(this.wa=0)};l.mg=function(){return yc(this,this.sb)};
|
|
||||||
function yc(a,c){switch(c){case 0:return 45248;case 1:return a.ja&2?2560:a.v;case 2:return a.ja&2?1600:a.K;case 3:return a.ja&2?32:a.Wb;case 4:return a.ja;case 5:return a.wa>>>16;case 6:return a.Nb?a.Nb:1;case 8:return 0;case 10:return a.Ca/65536|0}return 255};function zc(a,c){this.s=a;this.J=c;this.ic=this.Yb=!1;this.ud=!0;this.sc=this.Jb=this.Ib=0;this.ja=!0;this.N=this.L=this.v=this.K=this.W=this.D=this.qd=!1;this.ka=new bb(1024);this.m=0;this.Yc=100;this.Xc=4;this.o=!1;this.b=new bb(1024);this.J.register("keyboard-code",function(a){this.qd&&(this.ka.push(a),Ac(this))},this);this.J.register("mouse-click",function(a){this.ud&&this.ic&&(this.sc=a[0]|a[2]<<1|a[1]<<2,this.Yb&&Bc(this,0,0))},this);this.J.register("mouse-delta",function(a){var c=a[1];if(this.ud&&
|
|
||||||
this.ic){var f=this.Xc*this.Yc/80;this.Ib+=a[0]*f;this.Jb+=c*f;this.Yb&&(a=this.Ib|0,c=this.Jb|0,a||c)&&(this.Ib-=a,this.Jb-=c,Bc(this,a,c))}},this);this.J.register("mouse-wheel",function(){},this);this.g=5;this.aa=this.ba=!1;p(a.A,96,this,this.Pg);p(a.A,100,this,this.Rg);q(a.A,96,this,this.Qg);q(a.A,100,this,this.Sg)}l=zc.prototype;
|
|
||||||
l.La=function(){var a=[];a[0]=this.Yb;a[1]=this.ic;a[2]=this.ud;a[3]=this.Ib;a[4]=this.Jb;a[5]=this.sc;a[6]=this.ja;a[7]=this.qd;a[8]=this.D;a[9]=this.W;a[10]=this.K;a[11]=this.v;a[12]=this.L;a[13]=this.N;a[15]=this.m;a[16]=this.Yc;a[17]=this.Xc;a[18]=this.o;a[20]=this.g;a[21]=this.ba;a[22]=this.aa;return a};
|
|
||||||
l.Ra=function(a){this.Yb=a[0];this.ic=a[1];this.ud=a[2];this.Ib=a[3];this.Jb=a[4];this.sc=a[5];this.ja=a[6];this.qd=a[7];this.D=a[8];this.W=a[9];this.K=a[10];this.v=a[11];this.L=a[12];this.N=a[13];this.m=a[15];this.Yc=a[16];this.Xc=a[17];this.o=a[18];this.g=a[20];this.ba=a[21];this.aa=a[22];this.J.send("mouse-enable",this.ic)};function Cc(a){a.g&2&&a.s.v(12)}function Ac(a){a.g&1&&a.s.v(1)}function Bc(a,c,d){a.b.push((0>d)<<5|(0>c)<<4|8|a.sc);a.b.push(c);a.b.push(d);Cc(a)}l.cb=function(){};
|
|
||||||
l.Pg=function(){if(!this.ka.length&&!this.b.length)return this.m;this.b.length&&!this.ka.length?(this.m=this.b.shift(),1<=this.b.length&&Cc(this)):(this.m=this.ka.shift(),1<=this.ka.length&&Ac(this));return this.m};l.Rg=function(){var a=16;if(this.b.length||this.ka.length)a|=1;this.b.length&&!this.ka.length&&(a|=32);return a};
|
|
||||||
l.Qg=function(a){if(this.aa)Ac(this),this.g=a,this.aa=!1;else if(this.ba)this.ba=!1,this.b.clear(),this.b.push(a),Cc(this);else if(this.W)this.W=!1,this.b.clear(),this.b.push(250),this.Yc=a,Cc(this);else if(this.N)this.N=!1,this.b.clear(),this.b.push(250),this.Xc=3<a?4:1<<a,Cc(this);else if(this.K)this.K=!1,this.ka.push(250),Ac(this);else if(this.v)this.v=!1,this.ka.push(250),Ac(this),a||this.ka.push(2);else if(this.L)this.L=!1,this.ka.push(250),Ac(this);else if(this.D){if(this.D=!1,this.ud){this.ka.clear();
|
|
||||||
this.b.clear();this.b.push(250);switch(a){case 230:this.o=!1;break;case 231:this.o=!0;break;case 232:this.N=!0;break;case 233:Bc(this,0,0);break;case 242:this.b.push(0);this.b.push(0);this.sc=this.Ib=this.Jb=0;break;case 243:this.W=!0;break;case 244:this.ic=this.Yb=!0;this.J.send("mouse-enable",!0);this.sc=this.Ib=this.Jb=0;break;case 245:this.Yb=!1;break;case 246:this.Yb=!1;this.Yc=100;this.o=!1;this.Xc=4;break;case 255:this.b.push(170),this.b.push(0),this.ic=!0,this.J.send("mouse-enable",!0),this.Yb=
|
|
||||||
!1,this.Yc=100,this.o=!1,this.Xc=4,this.sc=this.Ib=this.Jb=0}Cc(this)}}else{this.b.clear();this.ka.clear();this.ka.push(250);switch(a){case 237:this.K=!0;break;case 240:this.v=!0;break;case 242:this.ka.push(171);this.ka.push(83);break;case 243:this.L=!0;break;case 244:this.qd=!0;break;case 245:this.qd=!1;break;case 255:this.ka.clear(),this.ka.push(250),this.ka.push(170),this.ka.push(0)}Ac(this)}};
|
|
||||||
l.Sg=function(a){switch(a){case 32:this.ka.clear();this.b.clear();this.ka.push(this.g);break;case 96:this.aa=!0;break;case 211:this.ba=!0;break;case 212:this.D=!0;break;case 167:this.g|=32;break;case 168:this.g&=-33;break;case 169:this.ka.clear();this.b.clear();this.ka.push(0);break;case 170:this.ka.clear();this.b.clear();this.ka.push(85);break;case 171:this.ka.clear();this.b.clear();this.ka.push(0);break;case 173:this.g|=16;break;case 174:this.g&=-17;break;case 254:throw a=this.s,a.reset(),Ma(a),
|
|
||||||
233495534;}};function Dc(a,c){this.vb=this.ab=this.Z=this.wd=this.Sb=0;this.pa=c;this.b=!this.pa;this.na=void 0;this.name=this.b?"master":"slave ";this.rd=!1;this.ae=this.state=0;this.Gc=1;this.Re=this.Ge=0;this.s=a;this.b?(this.na=new Dc(this.s,this),this.md=function(){var a=this.ab&this.Sb;if(!a)return this.na.md();var a=a&-a,c=this.Ge?this.Sb:-1;if(this.Z&&(this.Z&-this.Z&c)<=a)return!1;c=Ua(a);this.ab&=~a;if(2===c)return this.na.md();this.Gc||(this.Z|=a);this.s.ga=this.s.w;Ec(this.s,this.wd|c,!1,!1);return!0}):
|
|
||||||
this.md=function(){var a=this.ab&this.Sb;if(!a)return!1;var a=a&-a,c=this.Ge?this.Sb:-1;if(this.Z&&(this.Z&-this.Z&c)<=a)return!1;c=Ua(a);this.ab&=~a;this.s.ga=this.s.w;Ec(this.s,this.wd|c,!1,!1);this.ab&&this.pa.Ed(2);this.pa.nd(2);this.Gc||(this.Z|=a,this.pa.Z|=4);return!0};this.g=function(){this.b&&this.na.g()};this.b?(a=32,c=1232):(a=160,c=1233);q(this.s.A,a,this,function(a){if(a&16)this.vb=this.Sb=this.ab=this.Z=0,this.Gc=1,this.rd=a&1,this.state=1;else if(a&8)a&2&&(this.ae=a&1),a&64&&(this.Ge=
|
|
||||||
32===(a&32));else{var c=a>>5;1===c?this.Z&=this.Z-1:3===c&&(this.Z&=~(1<<(a&7)));Fc(this.s)}});p(this.s.A,a,this,function(){return this.ae?this.Z:this.ab});q(this.s.A,a|1,this,function(a){0===this.state?this.rd?(this.rd=!1,this.Gc=a&2):(this.Sb=~a,Fc(this.s)):1===this.state?(this.wd=a,this.state++):2===this.state&&(this.state=0)});p(this.s.A,a|1,this,function(){return~this.Sb&255});q(this.s.A,c,this,function(a){this.Re=a});p(this.s.A,c,this,function(){return this.Re});this.b?(this.Ed=function(a){8<=
|
|
||||||
a&&(this.na.Ed(a-8),a=2);a=1<<a;this.ab|=a&~this.vb;this.vb|=a;Fc(this.s)},this.nd=function(a){8<=a&&(this.na.nd(a-8),a=2);this.vb&=~(1<<a)}):(this.Ed=function(a){a=1<<a;this.ab|=a&~this.vb;this.vb|=a},this.nd=function(a){this.vb&=~(1<<a)})}Dc.prototype.La=function(){var a=[];a[0]=this.Sb;a[1]=this.wd;a[2]=this.Z;a[3]=this.ab;a[4]=this.b;a[5]=this.na;a[6]=this.rd;a[7]=this.state;a[8]=this.ae;a[9]=this.Gc;return a};
|
|
||||||
Dc.prototype.Ra=function(a){this.Sb=a[0];this.wd=a[1];this.Z=a[2];this.ab=a[3];this.b=a[4];this.na=a[5];this.rd=a[6];this.state=a[7];this.ae=a[8];this.Gc=a[9]};function Hc(a){this.s=a;this.Jc=0;this.ea=new Uint8Array(128);this.L=this.b=Date.now();this.g=0;this.D=!0;this.N=!1;this.K=.9765625;this.v=38;this.m=2;this.Fe=this.o=0;q(a.A,112,this,function(a){this.Jc=a&127;this.Fe=a>>7});q(a.A,113,this,this.If);p(a.A,113,this,this.Hf)}l=Hc.prototype;l.La=function(){var a=[];a[0]=this.Jc;a[1]=this.ea;a[2]=this.b;a[3]=this.L;a[4]=this.g;a[5]=this.D;a[6]=this.N;a[7]=this.K;a[8]=this.v;a[9]=this.m;a[10]=this.o;a[11]=this.Fe;return a};
|
|
||||||
l.Ra=function(a){this.Jc=a[0];this.ea=a[1];this.b=a[2];this.L=a[3];this.g=a[4];this.D=a[5];this.N=a[6];this.K=a[7];this.v=a[8];this.m=a[9];this.o=a[10];this.Fe=a[11]};l.zb=function(a){a=Date.now();this.b+=a-this.L;this.L=a;return this.N&&this.D&&this.g<a?(this.D=!1,this.s.v(8),this.o|=192,this.g+=this.K*Math.ceil((a-this.g)/this.K),Math.max(0,a-this.g)):100};function Ic(a,c){if(a.m&4)a=c;else{a=c;for(var d=c=0,e;a;)e=a%10,d|=e<<4*c,c++,a=(a-e)/10;a=d}return a}
|
|
||||||
l.Hf=function(){switch(this.Jc){case 0:return Ic(this,(new Date(this.b)).getUTCSeconds());case 2:return Ic(this,(new Date(this.b)).getUTCMinutes());case 4:return Ic(this,(new Date(this.b)).getUTCHours());case 7:return Ic(this,(new Date(this.b)).getUTCDate());case 8:return Ic(this,(new Date(this.b)).getUTCMonth()+1);case 9:return Ic(this,(new Date(this.b)).getUTCFullYear()%100);case 10:return this.v;case 11:return this.m;case 12:this.D=!0;var a=this.o;this.o&=-241;return a;case 13:return 255;case 50:return Ic(this,
|
|
||||||
(new Date(this.b)).getUTCFullYear()/100|0);default:return this.ea[this.Jc]}};l.If=function(a){switch(this.Jc){case 10:this.v=a&127;this.K=1E3/(32768>>(this.v&15)-1);break;case 11:this.m=a,this.m&64&&(this.g=Date.now())}this.N=64===(this.m&64)&&0<(this.v&15)};function Jc(a,c,d){function e(a){if(this.cc&128)this.Xb=this.Xb&-256|a;else if(Kc(this),255!==a){var c=String.fromCharCode(a);this.J.send("serial0-output-char",c);this.re.push(a);"\n"===c&&(this.J.send("serial0-output-line",String.fromCharCode.apply("",this.re)),this.re=[])}}this.J=d;this.s=a;this.Rb=this.ve=this.b=this.cc=this.Xb=this.pb=0;this.$a=1;this.Ha=this.fe=this.Ee=this.Yd=0;this.input=new bb(4096);this.re=[];if(1E3===c||1016===c)this.Ha=4;else if(1E3===c||1E3===c)this.Ha=3;else return;this.J.register("serial0-input",
|
|
||||||
function(a){this.input.push(a);this.pb|=4096;this.Rb&1&&Lc(this)},this);a=a.A;q(a,c,this,function(a){e.call(this,a)},function(a){e.call(this,a&255);e.call(this,a>>8)});q(a,c|1,this,function(a){this.cc&128?this.Xb=this.Xb&255|a<<8:(this.Rb=a,Mc(this))});p(a,c,this,function(){if(this.cc&128)return this.Xb&255;var a=this.input.shift();this.input.length&&Lc(this);return a});p(a,c|1,this,function(){return this.cc&128?this.Xb>>8:this.Rb});p(a,c|2,this,function(){var a=this.$a&15|192;2===this.$a?Nc(this,
|
|
||||||
2):12===this.$a&&Nc(this,12);return a});q(a,c|2,this,function(a){this.ve=a});p(a,c|3,this,function(){return this.cc});q(a,c|3,this,function(a){this.cc=a});p(a,c|4,this,function(){return this.Yd});q(a,c|4,this,function(a){this.Yd=a});p(a,c|5,this,function(){var a=0;this.input.length&&(a|=1);return a|96});q(a,c|5,this,function(){});p(a,c|6,this,function(){return this.Ee});q(a,c|6,this,function(){});p(a,c|7,this,function(){return this.fe});q(a,c|7,this,function(a){this.fe=a})}
|
|
||||||
Jc.prototype.La=function(){var a=[];a[0]=this.pb;a[1]=this.Xb;a[2]=this.cc;a[3]=this.b;a[4]=this.ve;a[5]=this.Rb;a[6]=this.$a;a[7]=this.Yd;a[8]=this.Ee;a[9]=this.fe;a[10]=this.Ha;return a};Jc.prototype.Ra=function(a){this.pb=a[0];this.Xb=a[1];this.cc=a[2];this.b=a[3];this.ve=a[4];this.Rb=a[5];this.$a=a[6];this.Yd=a[7];this.Ee=a[8];this.fe=a[9];this.Ha=a[10]};Jc.prototype.Y=function(){this.s.v(this.Ha)};function Nc(a,c){a.pb&=~(1<<c);a.$a=1;c===a.$a&&Mc(a)}
|
|
||||||
function Lc(a){a.pb|=4096;a.Rb&1&&6!=a.$a&&4!=a.$a&&(a.$a=12,a.Y())}function Kc(a){a.pb|=4;a.Rb&2&&(a.$a&1||0==a.$a||2==a.$a)&&(a.$a=2,a.Y())}function Mc(a){a.pb&4096&&a.Rb&1?Lc(a):a.pb&4&&a.Rb&2?Kc(a):a.$a=1};function Oc(a){this.message=a}Oc.prototype=Error();function Pc(a,c){if("object"!==typeof a||null===a||a instanceof Array)return a;if(a.BYTES_PER_ELEMENT){var d=new Uint8Array(a.buffer,a.byteOffset,a.length*a.BYTES_PER_ELEMENT);return{__state_type__:a.constructor.name,buffer_id:c.push(d)-1}}a=a.La();for(var d=[],e=0;e<a.length;e++)d[e]=Pc(a[e],c);return d}
|
|
||||||
function Qc(a,c,d){if("object"!==typeof c||null===c)return c;if(a instanceof Array)return c;var e=c.__state_type__;if(void 0===e){for(var e=a.La(),f=0;f<c.length;f++)c[f]=Qc(e[f],c[f],d);a.Ra(c);return a}a={Uint8Array:Uint8Array,Int8Array:Int8Array,Uint16Array:Uint16Array,Int16Array:Int16Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Float32Array:Float32Array,Float64Array:Float64Array}[e];c=d.dg[c.buffer_id];return 1048576<=c.length&&a===Uint8Array?new Uint8Array(d.Xe,c.offset,c.length):new a(d.Xe.slice(c.offset,
|
|
||||||
c.offset+c.length))}
|
|
||||||
function Rc(a,c){var d=c.byteLength;if(16>d)throw new Oc("Invalid length: "+d);var e=new Int32Array(c,0,4);if(-2039052682!==e[0])throw new Oc("Invalid header: "+$a(e[0]>>>0));if(3!==e[1])throw new Oc("Version mismatch: dump="+e[1]+" we=3");if(e[2]!==d)throw new Oc("Length doesn't match header: real="+d+" header="+e[2]);e=e[3];if(0>e||e+12>=d||e%2)throw new Oc("Invalid info block length: "+e);for(var f=e/2,h=new Uint16Array(c,16,f),r="",d=0;d<f-8;)r+=String.fromCharCode(h[d++],h[d++],h[d++],h[d++],
|
|
||||||
h[d++],h[d++],h[d++],h[d++]);for(;d<f;)r+=String.fromCharCode(h[d++]);d=JSON.parse(r);f=d.state;h=d.buffer_infos;e=e+19&-4;for(d=0;d<h.length;d++)h[d].offset+=e;Qc(a,f,{Xe:c,dg:h})};function Sc(a,c){this.s=a;this.J=c;this.J.register("net0-receive",function(a){if(!(this.G&1)&&(this.J.send("eth-receive-end",[a.length]),this.ee&16||this.ee&4&&255===a[0]&&255===a[1]&&255===a[2]&&255===a[3]&&255===a[4]&&255===a[5]||!(this.ee&8&&1===(a[0]&1)||a[0]!==this.memory[0]||a[1]!==this.memory[2]||a[2]!==this.memory[4]||a[3]!==this.memory[6]||a[4]!==this.memory[8]||a[5]!==this.memory[10]))){var c=this.kc<<8,d=Math.max(60,a.length)+4,r=c+4,k=this.kc+1+(d>>8);if(c+d>this.memory.length){var t=
|
|
||||||
this.memory.length-r;this.memory.set(a.subarray(0,t),r);this.memory.set(a.subarray(t),76)}else if(this.memory.set(a,r),60>a.length)for(a=a.length;60>a;a++)this.memory[r+a]=0;k>=this.xc&&(k+=this.Vc-this.xc);this.memory[c]=1;this.memory[c+1]=k;this.memory[c+2]=d;this.memory[c+3]=d>>8;this.kc=k;Tc(this,1)}},this);this.name="ne2k";this.Uc=[236,16,41,128,3,1,0,0,0,0,0,2,0,0,0,0,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,244,26,0,17,0,0,184,254,0,0,0,0,0,0,0,0,11,1,0,0];this.Tb=40;this.dc=
|
|
||||||
[{size:32}];zb(a.H.Tc,this);this.vd=this.Z=0;this.G=1;this.od=0;this.Ha=11;this.ge=this.Bc=this.wb=0;this.memory=new Uint8Array(32768);this.ee=0;this.jh=1;c=[0,34,21,255*Math.random()|0,255*Math.random()|0,255*Math.random()|0];for(var d=0;6>d;d++)this.memory[d<<1]=this.memory[d<<1|1]=c[d];this.memory[14]=this.memory[15]=87;this.Ya=0;this.Vc=64;this.xc=128;this.Td=this.kc=76;a=a.A;p(a,768,this,function(){return this.G});q(a,768,this,function(a){this.G=a&-5;this.G&1||(a|24&&0===this.wb&&Tc(this,64),
|
|
||||||
a&4&&(a=this.ge<<8,a=this.memory.subarray(a,a+this.Bc),this.J.send("net0-send",a),this.J.send("eth-transmit-end",[a.length]),Tc(this,2)))});p(a,781,this,function(){return 0});p(a,782,this,function(){return 0});p(a,783,this,function(){return 0});p(a,799,this,function(){this.G&192||Tc(this,128);return 0});q(a,799,this,function(){});q(a,769,this,function(a){this.G&192||(this.Vc=a)});q(a,770,this,function(a){this.G&192||(this.xc=a)});p(a,775,this,function(){return this.G&192?this.kc:this.Z});q(a,775,
|
|
||||||
this,function(a){this.G&192?this.kc=a:this.Z&=~a});q(a,781,this,function(){});q(a,782,this,function(a){this.G&192||(this.od=a)});q(a,778,this,function(a){this.G&192||(this.wb=this.wb&65280|a&255)});q(a,779,this,function(a){this.G&192||(this.wb=this.wb&255|a<<8&65280)});q(a,776,this,function(a){this.G&192||(this.Ya=this.Ya&65280|a&255)});q(a,777,this,function(a){this.G&192||(this.Ya=this.Ya&255|a<<8&65280)});q(a,783,this,function(a){this.G&192||(this.vd=a,this.vd&this.Z&&this.s.v(this.Ha))});p(a,771,
|
|
||||||
this,function(){return this.G&192?0:this.Td});q(a,771,this,function(a){this.G&192||(this.Td=a)});p(a,772,this,function(){return this.G&192?0:this.jh});q(a,772,this,function(a){this.G&192||(this.ge=a)});q(a,773,this,function(a){this.G&192||(this.Bc=this.Bc&-256|a)});q(a,774,this,function(a){this.G&192||(this.Bc=this.Bc&255|a<<8)});p(a,780,this,function(){return this.G&192?0:9});q(a,780,this,function(a){this.ee=a});p(a,784,this,this.Lf,this.Oe,this.Kf);q(a,784,this,this.Pe,this.Pe,this.Mf)}l=Sc.prototype;
|
|
||||||
l.La=function(){var a=[];a[0]=this.Z;a[1]=this.vd;a[2]=this.G;a[3]=this.od;a[4]=this.wb;a[5]=this.Bc;a[6]=this.ge;a[7]=this.Ya;a[8]=this.Vc;a[9]=this.kc;a[10]=this.Td;return a};l.Ra=function(a){this.Z=a[0];this.vd=a[1];this.G=a[2];this.od=a[3];this.wb=a[4];this.Bc=a[5];this.ge=a[6];this.Ya=a[7];this.Vc=a[8];this.kc=a[9];this.Td=a[10]};function Tc(a,c){a.Z|=c;a.vd&a.Z&&a.s.v(a.Ha)}
|
|
||||||
function Uc(a,c){16<a.Ya&&16384>a.Ya||(a.wb--,a.memory[a.Ya++]=c,a.Ya>=a.xc<<8&&(a.Ya+=a.Vc-a.xc<<8),0===a.wb&&Tc(a,64))}l.Pe=function(a){Uc(this,a);this.od&1&&Uc(this,a>>8)};l.Mf=function(a){Uc(this,a);Uc(this,a>>8);Uc(this,a>>16);Uc(this,a>>24)};function Vc(a){var c=a.memory[a.Ya++];a.wb--;a.Ya>=a.xc<<8&&(a.Ya+=a.Vc-a.xc<<8);0===a.wb&&Tc(a,64);return c}l.Lf=function(){return this.Oe()&255};l.Oe=function(){return this.od&1?Vc(this)|Vc(this)<<8:Vc(this)};
|
|
||||||
l.Kf=function(){return Vc(this)|Vc(this)<<8|Vc(this)<<16|Vc(this)<<24};function Wc(a,c,d){this.Uc=[244,26,9,16,7,5,16,0,0,0,2,0,0,0,0,0,1,168,0,0,0,16,191,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,244,26,9,0,0,0,0,0,64,0,0,0,0,0,0,0,12,1,0,0];this.Tb=48;this.dc=[{size:256}];this.name="virtio";zb(a.H.Tc,this);var e=a.A;p(e,43008,this,void 0,void 0,function(){return 1});q(e,43012,this,void 0,void 0,function(){});q(e,43022,this,void 0,function(a){this.Cd=a},void 0);p(e,43020,this,void 0,function(){return this.Vb},void 0);p(e,43016,this,void 0,void 0,function(){return 0===
|
|
||||||
this.Cd?this.Ub:0});q(e,43016,this,void 0,void 0,function(a){this.Ub=a});q(e,43026,this,function(a){0===a&&this.reset();this.pd=a});p(e,43026,this,function(){return this.pd});p(e,43027,this,function(){var a=this.Z;this.Z=0;return a});q(e,43024,this,void 0,function(){for(var a=(this.Ub<<12)+16*this.Vb,c=a+4,a=this.memory.ma(a+2),d=this.Vb-1,a=a&d;this.pc!==a;){var e=this.memory.ma(c+2*this.pc);Xc(this,e);this.pc=this.pc+1&d}});this.Ha=12;this.s=a;this.J=c;this.pc=this.Z=this.pd=this.Cd=0;this.Vb=32;
|
|
||||||
this.Ub=0;this.memory=a.memory;for(a=0;128>a;a++)p(e,43028+a,this,function(a){return a<this.U.v.length?this.U.v[a]:0}.bind(this,a),void 0,void 0),q(e,43028+a,this,function(){}.bind(this,a),void 0,void 0);this.U=new aa(d,c);this.U.ha=this.b.bind(this)}Wc.prototype.La=function(){var a=[];a[0]=this.Ha;a[1]=this.Cd;a[2]=this.pd;a[3]=this.Z;a[4]=this.pc;a[5]=this.Vb;a[6]=this.Ub;a[7]=this.U;return a};
|
|
||||||
Wc.prototype.Ra=function(a){this.Ha=a[0];this.Cd=a[1];this.pd=a[2];this.Z=a[3];this.pc=a[4];this.Vb=a[5];this.Ub=a[6];this.U=a[7];this.U.ha=this.b.bind(this)};Wc.prototype.reset=function(){this.pc=this.Z=this.pd=this.Cd=0;this.Vb=32;this.Ub=0};
|
|
||||||
function Xc(a,c){var d=c,e=a.Ub<<12,f=0,h=[];do{var r=e+16*d,k=a.memory.ma(r+12);if(k&2)break;var t=$b(a.memory,r),d=$b(a.memory,r+4),u=$b(a.memory,r+8)>>>0;h.push({ne:t,Df:d,De:u});if(k&1)d=a.memory.ma(r+14);else{d=-1;break}}while(1);var z=-1,G=0;ea(a.U,{start:c,next:d},function(){if(G>=z){if(f===h.length)return 0;var a=h[f++];t=a.ne;z=a.De;G=0}return this.memory.da(t+G++)}.bind(a))}
|
|
||||||
Wc.prototype.b=function(a,c){if(-1!==c.next){var d=this.Vb-1;a=this.U.ce;var e=c.next,f=this.Ub<<12,h=0,r=[];do{var e=f+16*e,k=this.memory.ma(e+12);if(!(k&2))break;var t=$b(this.memory,e),u=$b(this.memory,e+4),z=$b(this.memory,e+8)>>>0;r.push({ne:t,Df:u,De:z});if(k&1)e=this.memory.ma(e+14);else break}while(1);k=-1;for(f=u=0;f<a;f++){e=this.U.ua[f];if(u>=k){if(h===r.length)return 0;k=r[h++];t=k.ne;k=k.De;u=0}this.memory.sa(t+u++,e)}t=(this.Ub<<12)+16*this.Vb+4+2*this.Vb;t=t+4095&-4096;this.memory.ma(t);
|
|
||||||
h=this.memory.ma(t+2);this.memory.ad(t+2,h+1);d=t+4+8*(h&d);this.memory.Cc(d,c.start);this.memory.Cc(d+4,a);this.Z|=1;this.s.v(this.Ha)}};function Yc(){this.yd={};this.b=void 0}Yc.prototype.register=function(a,c,d){var e=this.yd[a];void 0===e&&(e=this.yd[a]=[]);e.push({Ve:c,ih:d})};Yc.prototype.unregister=function(a,c){var d=this.yd[a];void 0!==d&&(this.yd[a]=d.filter(function(a){return a.Ve!==c}))};Yc.prototype.send=function(a,c){if(this.b&&(a=this.b.yd[a],void 0!==a))for(var d=0;d<a.length;d++){var e=a[d];e.Ve.call(e.ih,c)}};function Zc(){var a=new Yc,c=new Yc;a.b=c;c.b=a;return[a,c]};[[1,""],[2,"CPU"],[32768,"DISK"],[4,"FPU"],[8,"MEM"],[16,"DMA"],[32,"IO"],[64,"PS2"],[128,"PIC"],[256,"VGA"],[512,"PIT"],[1024,"MOUS"],[2048,"PCI"],[4096,"BIOS"],[8192,"CD"],[16384,"SERI"],[65536,"RTC"],[131072,"HPET"],[262144,"ACPI"],[524288,"APIC"],[1048576,"NET"],[2097152,"VIO"],[4194304,"9P"]].reduce(function(a,c){a[c[0]]=c[1];return a},{});function v(){this.bb=0;this.yb=[];this.Ea=[];this.Qa=[];this.N=new Int32Array(1048576);this.Kb=new Uint8Array(1048576);this.Id=new Uint8Array(1048576);this.qa=!1;this.$b=this.Nc=this.ac=this.Oc=0;this.K=!1;this.G=new Int32Array(8);this.G[0]=0;this.G[2]=0;this.G[3]=0;this.Ad=this.O=this.G[4]=0;this.Pc=this.la=this.gb=this.Da=this.Na=!1;this.H={jc:{zb:function(){},cb:function(){}},Bd:{zb:function(){},cb:function(){}}};this.D=this.o=this.f=this.Jd=this.F=this.m=this.T=this.Wa=this.Va=this.u=this.h=this.ca=
|
|
||||||
this.Zc=this.$c=this.Ac=this.aa=this.Sc=this.L=this.Gb=0;this.j=this.l;this.B=this.I=this.M=0;this.table=[];this.X=!1;this.ga=this.w=0;this.Hc={cf:null,jc:null};this.V=0;this.a=new Int32Array(8);this.Wc=new Uint32Array(this.a.buffer);this.yc=new Int16Array(this.a.buffer);this.l=new Uint16Array(this.a.buffer);this.be=new Int8Array(this.a.buffer);this.C=new Uint8Array(this.a.buffer);this.R=new Uint16Array(8);this.nc=new Int32Array(8);this.memory=null;this.ya=-1;this.Ba=this.A=void 0;$c(this);ad(this);
|
|
||||||
this.Jd=Oa();bd(this)}l=v.prototype;
|
|
||||||
l.La=function(){var a=[];a[0]=this.bb;a[1]=this.yb;a[2]=this.Ea;a[3]=this.Qa;a[4]=this.qa;a[5]=this.ac;a[6]=this.Oc;a[7]=this.$b;a[8]=this.Nc;a[9]=this.K;a[10]=this.G;a[11]=this.O;a[12]=this.Ad;a[13]=this.Na;a[14]=this.Da;a[15]=this.la;a[16]=this.gb;a[17]=this.Pc;a[18]=this.Gb;a[19]=this.L;a[20]=this.Sc;a[21]=this.aa;a[22]=this.Ac;a[23]=this.Zc;a[24]=this.$c;a[25]=this.ca;a[26]=this.h;a[27]=this.u;a[28]=this.Va;a[29]=this.Wa;a[30]=this.T;a[31]=this.m;a[32]=this.f;a[36]=this.X;a[37]=this.w;a[38]=this.ga;
|
|
||||||
a[39]=this.a;a[40]=this.R;a[41]=this.nc;a[42]=this.memory;a[43]=this.Ba;a[45]=this.H.he;a[47]=this.H.fc;a[48]=this.H.Tc;a[49]=this.H.Lc;a[51]=this.H.cg;a[52]=this.H.jc;a[53]=this.H.Bd;a[54]=this.H.Af;a[55]=this.H.Te;a[56]=this.H.Ka;a[57]=this.H.Ma;a[58]=this.H.$d;a[59]=this.H.gf;a[60]=this.H.ec;return a};
|
|
||||||
l.Ra=function(a){this.bb=a[0];this.yb=a[1];this.Ea=a[2];this.Qa=a[3];this.qa=a[4];this.ac=a[5];this.Oc=a[6];this.$b=a[7];this.Nc=a[8];this.K=a[9];this.G=a[10];this.O=a[11];this.Ad=a[12];this.Na=a[13];this.Da=a[14];this.la=a[15];this.gb=a[16];this.Pc=a[17];this.Gb=a[18];this.L=a[19];this.Sc=a[20];this.aa=a[21];this.Ac=a[22];this.Zc=a[23];this.$c=a[24];this.ca=a[25];this.h=a[26];this.u=a[27];this.Va=a[28];this.Wa=a[29];this.T=a[30];this.m=a[31];this.f=a[32];this.X=a[36];this.w=a[37];this.ga=a[38];this.a=
|
|
||||||
a[39];this.R=a[40];this.nc=a[41];this.memory=a[42];this.Ba=a[43];this.H.he=a[45];this.H.fc=a[47];this.H.Tc=a[48];this.H.Lc=a[49];this.H.cg=a[51];this.H.jc=a[52];this.H.Bd=a[53];this.H.Af=a[54];this.H.Te=a[55];this.H.Ka=a[56];this.H.Ma=a[57];this.H.$d=a[58];this.H.gf=a[59];this.H.ec=a[60];cd(this);this.Wc=new Uint32Array(this.a.buffer);this.yc=new Int16Array(this.a.buffer);this.l=new Uint16Array(this.a.buffer);this.be=new Int8Array(this.a.buffer);this.C=new Uint8Array(this.a.buffer);$c(this);ad(this)};
|
|
||||||
l.ue=function(a){if(233495534===a)this.K=!1,dd(this);else throw console.log(a),console.log(a.stack),a;};
|
|
||||||
l.reset=function(){this.yb=new Uint8Array(8);this.Qa=new Uint32Array(8);this.Ea=new Int32Array(8);cd(this);this.a=new Int32Array(8);this.Wc=new Uint32Array(this.a.buffer);this.yc=new Int16Array(this.a.buffer);this.l=new Uint16Array(this.a.buffer);this.be=new Int8Array(this.a.buffer);this.C=new Uint8Array(this.a.buffer);this.R=new Uint16Array(8);this.nc=new Int32Array(8);this.qa=!1;this.$b=this.Nc=this.ac=this.Oc=0;this.K=!1;this.G[0]=1610612752;this.G[2]=0;this.G[3]=0;this.G[4]=0;this.nc[6]=-61456;
|
|
||||||
this.nc[7]=1024;this.O=0;this.X=!1;this.Ad=0;this.la=this.gb=this.Da=this.Na=!1;this.Sc=this.Gb=-1;ad(this);$c(this);this.ga=this.V=0;this.Pc=!1;this.Zc=this.$c=this.Ac=0;this.ya=-1;this.ca=0;this.h=2;this.T=this.Wa=this.Va=this.m=this.F=this.u=0;this.Jd=Oa();this.w=1048560;B(this,1,61440);B(this,2,48);this.l[8]=256;this.H.he&&this.H.he.reset()};l.Ne=function(a,c){this.bb=a;this.memory=new hc(this.bb,c)};v.prototype.create_memory=v.prototype.Ne;
|
|
||||||
v.prototype.ob=function(a,c){this.Ne(a.bb||67108864,a.jg);this.reset();var d=new Ba(this.memory);this.A=d;this.Hc.cf=a.Hc;this.Hc.jc=a.mh;Ma(this);var e=0;p(d,179,this,function(){return 0});p(d,146,this,function(){return e});q(d,146,this,function(a){e=a});this.H={};a.gg&&(this.H.ec=new Dc(this),this.H.Tc=new ac(this),this.H.fc=new Hc(this),ed(this,this.H.fc,a),this.H.Lc=new oc(this),this.H.jc=new vc(this,c,a.Ca||8388608),this.Ba=new cb(this),this.H.Bd=new zc(this,c),this.H.Af=new Jc(this,1016,c),
|
|
||||||
this.H.Te=new cc(this,a.Oa),d=0,a.Ma&&(this.H.Ma=new xb(this,a.Ma,!1,d++,c)),a.Ka&&(this.H.Ka=new xb(this,a.Ka,!0,d++,c)),a.Vd&&(this.H.Vd=new xb(this,a.Vd,!1,d++,c)),this.H.$d=new qc(this),a.Xf&&(this.H.gf=new Sc(this,c)),a.Zb&&(this.H.he=new Wc(this,c,a.Zb)))};
|
|
||||||
function ed(a,c,d){d=d.Ic||531;c.ea[56]=1|d>>4&240;c.ea[61]=d&255;c.ea[21]=128;c.ea[22]=2;d=0;1048576<=a.bb&&(d=a.bb-1048576>>10,d=Math.min(d,65535));c.ea[23]=d&255;c.ea[24]=d>>8&255;c.ea[48]=d&255;c.ea[49]=d>>8&255;d=0;16777216<=a.bb&&(d=a.bb-16777216>>16,d=Math.min(d,65535));c.ea[52]=d&255;c.ea[53]=d>>8&255;c.ea[91]=0;c.ea[92]=0;c.ea[93]=0;c.ea[20]=47;c.ea[95]=0}
|
|
||||||
function Ma(a){var c=a.Hc.cf,d=a.Hc.jc;if(c){var e=new Uint8Array(c);a.memory.fa.set(e,1048576-c.byteLength);d&&(e=new Uint8Array(d),a.memory.fa.set(e,786432));Ca(a.A,4293918720,1048576,function(a){return this.memory.fa[a&1048575]}.bind(a),function(a,c){this.memory.fa[a&1048575]=c}.bind(a))}}v.prototype.W=function(){for(var a=Oa(),c=a;33>c-a;){this.H.$d.zb(c,!1);this.H.fc.zb(c,!1);Fc(this);for(c=11001;c--;)fd(this);c=Oa()}};
|
|
||||||
"undefined"!==typeof window&&(window.b=v.prototype.W,window.g=v.prototype.ue,window.m=v.prototype.ba);function fd(a){a.ga=a.w;a.V++;var c=C(a);a.table[c](a)}v.prototype.Jf=function(){try{fd(this)}catch(a){this.ue(a)}};v.prototype.cycle=v.prototype.Jf;function gd(a){a.table[C(a)](a)}v.prototype.ba=function(){var a=Oa();this.H.$d.zb(a,!1);this.H.fc.zb(a,!1);return 0};function dd(a){a.ca=0;a.ya=-1;a.la!==a.Na&&(a.la=a.Na,$c(a));a.Da!==a.Na&&(a.Da=a.Na,ad(a))}
|
|
||||||
function hd(a){var c=-2147483648===(a.G[0]&-2147483648);a.Ba||(a.G[0]|=4);a.G[0]|=16;c!==a.X&&(a.X=c,cd(a))}function id(a){a.Gb=-1;a.Sc=-1}function C(a){a.w&-4096^a.Gb&&(a.L=jd(a,a.w)^a.w,a.Gb=a.w&-4096);var c=a.memory.da(a.L^a.w);a.w=a.w+1|0;return c}function D(a){return C(a)<<24>>24}function E(a){if(4094<(a.w^a.Gb)>>>0)return C(a)|C(a)<<8;var c=a.memory.ma(a.L^a.w);a.w=a.w+2|0;return c}function H(a){if(4092<(a.w^a.Gb)>>>0)return E(a)|E(a)<<16;var c=$b(a.memory,a.L^a.w);a.w=a.w+4|0;return c}
|
|
||||||
function kd(a,c,d,e){a.memory.sa(c,e);a.memory.sa(d,e>>24);c&1?c&2?(a.memory.sa(d-2,e>>8),a.memory.sa(d-1,e>>16)):(a.memory.sa(c+1|0,e>>8),a.memory.sa(c+2|0,e>>16)):(a.memory.sa(c+1|0,e>>8),a.memory.sa(d-1,e>>16))}function ld(a,c){return a.memory.da(jd(a,c))}function y(a,c){return a.X&&4095===(c&4095)?ld(a,c)|ld(a,c+1|0)<<8:a.memory.ma(jd(a,c))}function A(a,c){return a.X&&4093<=(c&4095)?y(a,c)|y(a,c+2|0)<<16:$b(a.memory,jd(a,c))}function md(a,c,d){a.memory.sa(nd(a,c),d)}
|
|
||||||
function mb(a,c,d){var e=nd(a,c);4095===(c&4095)?(c=nd(a,c+1|0),a.memory.sa(e,d),a.memory.sa(c,d>>8)):a.memory.ad(e,d)}function x(a,c,d){var e=nd(a,c);4093<=(c&4095)?kd(a,e,nd(a,c+3|0),d):a.memory.Cc(e,d)}function od(a){return a.la?pd(a,3)+H(a)|0:pd(a,3)+E(a)|0}function qd(a){return a.h>>12&3}function rd(a){return!!(a.h&131072)}function sd(a){return a.h&-2262|!!a.Pa()|!!a.Ze()<<2|!!td(a)<<4|!!a.Pb()<<6|!!a.Ud()<<7|!!a.td()<<11}function ud(a){a.h=sd(a);a.u=0}
|
|
||||||
function vd(a,c){var d=1769472,e=2588629;a.h&131072?(d|=12288,e|=1572864):a.O&&(d|=12288,a.O>qd(a)&&(d|=512));a.h=(c^(a.h^c)&d)&e|2;a.u=0}function wd(a,c){a.gb?a.a[4]=c:a.l[8]=c}function I(a,c){a.gb?a.a[4]+=c:a.l[8]+=c}function J(a,c){return a.gb?K(a,2)+a.a[4]+c|0:K(a,2)+(a.l[8]+c&65535)|0}function xd(a){return a.w-K(a,1)|0}
|
|
||||||
function Ec(a,c,d,e){a.Pc=!1;if(a.qa){if(rd(a)&&a.G[4]&1)throw a.debug.S("VME");rd(a)&&d&&3>qd(a)&&M(a,0);if((c<<3|7)>a.Oc)throw a.debug.S("#GP handler");var f=a.ac+(c<<3)|0;a.X&&(f=yd(a,f));var h=a.memory.ma(f)|a.memory.ma(f+6|0)<<16,r=a.memory.ma(f+2|0),k=a.memory.da(f+5|0),t=k>>5&3,f=k&31;if(!(k&128))throw a.debug.S("#NP handler");d&&t<a.O&&M(a,c<<3|2);if(5===f){h=zd(a,r);if(!h.bc||h.kb||!h.ye)throw a.debug.S("#GP handler");if(11===(h.Bb&31))throw a.debug.S("#GP handler");if(!h.Eb)throw a.debug.S("#NP handler");
|
|
||||||
if(103>h.Ob)throw a.debug.S("#NP handler");c=a.Ea[6];d=sd(a);lb(a,c,102);x(a,c+32,xd(a));x(a,c+36,d);x(a,c+40,a.a[0]);x(a,c+44,a.a[1]);x(a,c+48,a.a[2]);x(a,c+52,a.a[3]);x(a,c+56,a.a[4]);x(a,c+60,a.a[5]);x(a,c+64,a.a[6]);x(a,c+68,a.a[7]);x(a,c+72,a.R[0]);x(a,c+76,a.R[1]);x(a,c+80,a.R[2]);x(a,c+84,a.R[3]);x(a,c+88,a.R[4]);x(a,c+92,a.R[5]);x(a,c+96,a.R[7]);a.memory.sa(h.Hd+5|0,a.memory.da(h.Hd+5|0)|2);d=h.Cb;f=A(a,d+28);a.h&=-131073;B(a,1,y(a,d+76));k=A(a,d+36);x(a,c+0,r);k|=16384;if(k&131072)throw a.debug.S("task switch to VM mode");
|
|
||||||
vd(a,k);c=y(a,d+96);Ad(a,c);a.a[0]=A(a,d+40);a.a[1]=A(a,d+44);a.a[2]=A(a,d+48);a.a[3]=A(a,d+52);a.a[4]=A(a,d+56);a.a[5]=A(a,d+60);a.a[6]=A(a,d+64);a.a[7]=A(a,d+68);B(a,0,y(a,d+72));B(a,2,y(a,d+80));B(a,3,y(a,d+84));B(a,4,y(a,d+88));B(a,5,y(a,d+92));a.w=K(a,1)+A(a,d+32)|0;a.Ea[6]=h.Cb;a.Qa[6]=h.Ob;a.R[6]=r;a.G[3]=f;Bd(a);a.G[0]|=8;!1!==e&&N(a,e)}else{if(6!==(f&-10))throw a.debug.S("#GP handler");c=1===(f&1);d=!(f&8);f=zd(a,r);if(f.kb)throw a.debug.S("#GP handler");if(!f.oc||f.xa>a.O)throw a.debug.S("#GP handler");
|
|
||||||
if(!f.Eb)throw a.debug.S("#NP handler");ud(a);k=a.h;if(!f.lc&&f.xa<a.O){var u=(f.xa<<3)+4|0;if((u+5|0)>a.Qa[6])throw a.debug.S("#TS handler");u=u+a.Ea[6]|0;a.X&&(u=yd(a,u));var t=$b(a.memory,u),u=a.memory.ma(u+4|0),z=zd(a,u);if(z.kb)throw a.debug.S("#TS handler");if(z.mb!==f.xa)throw a.debug.S("#TS handler");if(z.xa!==f.xa||!z.de)throw a.debug.S("#TS handler");if(!z.Eb)throw a.debug.S("#TS handler");var G=a.a[4],F=a.R[2],L=(d?2:4)*(5+(!1!==e)+4*(131072===(k&131072)));Cd(a,z.Cb+(z.size?t-L:t-L&65535));
|
|
||||||
Cd(a,z.Cb+t-1);a.O=f.xa;id(a);a.Na!==f.size&&Dd(a,f.size);a.h&=-196609;B(a,2,u);wd(a,t);k&131072&&!d&&(N(a,a.R[5]),N(a,a.R[4]),N(a,a.R[3]),N(a,a.R[0]));d?(O(a,F),O(a,G)):(N(a,F),N(a,G))}else if(f.lc||f.xa===a.O)a.h&131072&&M(a,r&-4),L=(d?2:4)*(3+(!1!==e)),lb(a,J(a,-L),L);else throw a.debug.S("#GP handler");d?(O(a,k),O(a,a.R[1]),O(a,xd(a)),!1!==e&&O(a,e),h&=65535):(N(a,k),N(a,a.R[1]),N(a,xd(a)),!1!==e&&N(a,e));k&131072&&(B(a,5,0),B(a,4,0),B(a,3,0),B(a,0,0));a.R[1]=r&-4|a.O;a.Na!==f.size&&Dd(a,f.size);
|
|
||||||
a.Qa[1]=f.Ob;a.Ea[1]=f.Cb;a.w=K(a,1)+h|0;a.h&=-213249;c?a.K||Fc(a):a.h&=-513}}else r=c<<2,e=a.memory.ma(r),r=a.memory.ma(r+2|0),ud(a),O(a,a.h),O(a,a.R[1]),O(a,xd(a)),a.h&=-513,B(a,1,r),a.w=K(a,1)+e|0}
|
|
||||||
function Ed(a,c){if(c)var d=y(a,J(a,0)),e=y(a,J(a,2)),f=y(a,J(a,4));else d=A(a,J(a,0)),e=y(a,J(a,4)),f=A(a,J(a,8));if(!a.qa||rd(a)&&3===qd(a)){if(d&4294901760)throw a.debug.S("#GP handler");B(a,1,e);a.w=d+K(a,1)|0;c?(vd(a,f|a.h&-65536),I(a,6)):(vd(a,f),I(a,12))}else{rd(a)&&M(a,0);a.h&16384&&M(a,0);if(f&131072)if(a.O)f&=-131073;else{var h=A(a,J(a,12)),r=y(a,J(a,16));c=y(a,J(a,20));var k=y(a,J(a,24)),t=y(a,J(a,28)),u=y(a,J(a,32));vd(a,f);a.h|=131072;B(a,1,e);a.w=(d&65535)+K(a,1)|0;B(a,0,c);B(a,3,k);
|
|
||||||
B(a,4,t);B(a,5,u);I(a,36);a.a[4]=h;B(a,2,r);a.O=3;id(a);Dd(a,!1);return}k=zd(a,e);if(k.kb)throw a.debug.S("is null");if(!k.Eb)throw a.debug.S("not present");if(!k.oc)throw a.debug.S("not exec");if(k.mb<a.O)throw a.debug.S("rpl < cpl");if(k.lc&&k.xa>k.mb)throw a.debug.S("conforming and dpl > rpl");k.mb>a.O?(c?(h=y(a,J(a,6)),r=y(a,J(a,8))):(h=A(a,J(a,12)),r=y(a,J(a,16))),c?vd(a,f|a.h&-65536):vd(a,f),a.O=k.mb,id(a),B(a,2,r),wd(a,h),a.O||(a.h=a.h&-1572865|f&1572864)):k.mb===a.O&&(c?(I(a,6),vd(a,f|a.h&
|
|
||||||
-65536)):(I(a,12),vd(a,f)),a.O||(a.h=a.h&-1572865|f&1572864));a.R[1]=e;k.size!==a.Na&&Dd(a,k.size);a.Qa[1]=k.Ob;a.Ea[1]=k.Cb;a.w=d+K(a,1)|0}Fc(a)}function Fd(a,c){Ec(a,c,!1,!1);throw 233495534;}function Gd(a){a.w=a.ga;Fd(a,0)}function w(a){a.w=a.ga;Fd(a,6)}function M(a,c){a.w=a.ga;Ec(a,13,!1,c);throw 233495534;}function Hd(a){a.G[0]&12&&(a.w=a.ga,Fd(a,7))}function P(a){return pd(a,3)}function Q(a){return pd(a,2)}function pd(a,c){return-1===a.ya?K(a,c):9===a.ya?0:K(a,a.ya)}
|
|
||||||
function K(a,c){a.qa&&a.yb[c]&&M(a,0);return a.Ea[c]}function Id(a){return 192>a.f?ld(a,a.P(a.f)):a.C[a.f<<2&12|a.f>>2&1]}function R(a){return 192>a.f?y(a,a.P(a.f)):a.l[a.f<<1&14]}function Jd(a){return 192>a.f?A(a,a.P(a.f)):a.a[a.f&7]}function Kd(a,c){if(192>a.f){var d=a.P(a.f);md(a,d,c)}else a.C[a.f<<2&12|a.f>>2&1]=c}function Ld(a,c){if(192>a.f){var d=a.P(a.f);mb(a,d,c)}else a.l[a.f<<1&14]=c}function Md(a,c){if(192>a.f){var d=a.P(a.f);x(a,d,c)}else a.a[a.f&7]=c}
|
|
||||||
function Nd(a){if(192>a.f){var c=a.P(a.f);a.o=nd(a,c);return a.memory.da(a.o)}return a.C[a.f<<2&12|a.f>>2&1]}function Od(a,c){192>a.f?a.memory.sa(a.o,c):a.C[a.f<<2&12|a.f>>2&1]=c}function S(a){if(192>a.f){var c=a.P(a.f);a.o=nd(a,c);if(a.X&&4095===(c&4095))return a.D=nd(a,c+1|0),c=a.D,a.memory.da(a.o)|a.memory.da(c)<<8;a.D=0;return a.memory.ma(a.o)}return a.l[a.f<<1&14]}
|
|
||||||
function T(a,c){if(192>a.f)if(a.D){var d=a.D;a.memory.sa(a.o,c);a.memory.sa(d,c>>8)}else a.memory.ad(a.o,c);else a.l[a.f<<1&14]=c}function U(a){if(192>a.f){var c=a.P(a.f);a.o=nd(a,c);if(a.X&&4093<=(c&4095)){a.D=nd(a,c+3|0);var c=a.o,d=a.D,e;c&1?e=c&2?kc(a.memory,d-2>>1):kc(a.memory,c+1>>1):(e=d-1|0,e=a.memory.da(c+1|0)|a.memory.da(e)<<8);return a.memory.da(c)|e<<8|a.memory.da(d)<<24}a.D=0;return $b(a.memory,a.o)}return a.a[a.f&7]}
|
|
||||||
function V(a,c){192>a.f?a.D?kd(a,a.o,a.D,c):a.memory.Cc(a.o,c):a.a[a.f&7]=c}function Pd(a){return a.l[a.f<<1&14]}function Qd(a,c){a.l[a.f<<1&14]=c}function Rd(a){return a.a[a.f&7]}function Sd(a,c){a.a[a.f&7]=c}function Td(a){return a.C[a.f>>1&12|a.f>>5&1]}function Ud(a,c){a.C[a.f>>1&12|a.f>>5&1]=c}function Vd(a){return a.l[a.f>>2&14]}function Wd(a){return a.yc[a.f>>2&14]}function Xd(a,c){a.l[a.f>>2&14]=c}function W(a){return a.a[a.f>>3&7]}function Yd(a,c){a.Wc[a.f>>3&7]=c}
|
|
||||||
function Fc(a){a.h&512&&!a.K&&(a.H.ec&&a.H.ec.md(),a.H.jd&&a.H.jd.md())}v.prototype.v=function(a){this.H.ec&&this.H.ec.Ed(a);this.H.jd&&this.H.jd.Ed(a);Ab(this,a)};function Ab(a,c){a.H.ec&&a.H.ec.nd(c);a.H.jd&&a.H.jd.nd(c)}function Zd(a,c,d){if(a.qa&&(a.O>qd(a)||a.h&131072)){var e=a.Qa[6],f=a.Ea[6];if(103<=e){var h=a.memory.ma(yd(a,f+100+2|0));if(e>=(h+((c+d-1|0)>>3)|0)&&(d=(1<<d)-1<<(c&7),c=yd(a,f+h+(c>>3)|0),!((d&65280?a.memory.ma(c):a.memory.da(c))&d)))return}M(a,0)}}
|
|
||||||
function Dd(a,c){a.Na=a.Da=a.la=c;ad(a);$c(a)}function ad(a){a.table=a.Da?a.wa:a.ja}function $c(a){a.la?(a.j=a.a,a.M=1,a.I=6,a.B=7):(a.j=a.l,a.M=2,a.I=12,a.B=14)}
|
|
||||||
function zd(a,c){var d=!(c&4),e=c&-8,f,h;f={mb:c&3,ye:d,kb:!1,bc:!0,Cb:0,Bb:0,h:0,type:0,xa:0,Fb:!1,Eb:!1,oc:!1,de:!1,lc:!1,size:!1,xd:!1,Ob:0,Ce:!1,Ae:!1,Hd:0,pf:0};d?(d=a.$b,h=a.Nc):(d=a.Ea[7],h=a.Qa[7]);if(!e)return f.kb=!0,f;if((c|7)>h)return f.bc=!1,f;d=d+e|0;a.X&&(d=yd(a,d));f.Hd=d;f.Cb=a.memory.ma(d+2|0)|a.memory.da(d+4|0)<<16|a.memory.da(d+7|0)<<24;f.Bb=a.memory.da(d+5|0);f.h=a.memory.da(d+6|0)>>4;f.pf=$b(a.memory,d+4|0);f.type=f.Bb&15;f.xa=f.Bb>>5&3;f.Fb=!(f.Bb&16);f.Eb=128===(f.Bb&128);
|
|
||||||
f.oc=8===(f.Bb&8);f.de=2===(f.Bb&2);f.lc=4===(f.Bb&4);f.xd=f.lc&&f.oc;f.size=4===(f.h&4);a=a.memory.ma(d)|(a.memory.da(d+6|0)&15)<<16;f.Ob=f.h&8?(a<<12|4095)>>>0:a;f.Ce=f.de&&!f.oc;f.Ae=f.de||!f.oc;return f}
|
|
||||||
function B(a,c,d){1===c&&(a.qa=1===(a.G[0]&1));if(!a.qa||rd(a))a.R[c]=d,a.yb[c]=0,a.Ea[c]=d<<4,2===c&&(a.gb=!1);else{var e=zd(a,d);if(2===c){e.kb&&M(a,0);e.bc&&!e.Fb&&e.mb===a.O&&e.Ce&&e.xa===a.O||M(a,d&-4);if(!e.Eb)throw a.w=a.ga,Ec(a,12,!1,d&-4),233495534;a.gb=e.size}else if(1===c){if(e.Fb)throw a.debug.S("load system segment descriptor, type = "+(e.Bb&15));e.oc||M(a,d&-4);if(!e.Eb)throw a.w=a.ga,Ec(a,11,!1,d&-4),233495534;if(e.mb>a.O)throw a.debug.S("privilege change");if(!e.lc&&e.xa<a.O)throw a.debug.S("inter privilege call");
|
|
||||||
if(!e.lc&&e.xa!==a.O)throw a.debug.S("#GP handler");e.size!==a.Na&&Dd(a,e.size)}else{if(e.kb){a.R[c]=d;a.yb[c]=1;return}(!e.bc||e.Fb||!e.Ae||!e.xd&&(e.mb>e.xa||a.O>e.xa))&&M(a,d&-4);if(!e.Eb)throw a.w=a.ga,Ec(a,11,!1,d&-4),233495534;}a.yb[c]=0;a.Qa[c]=e.Ob;a.Ea[c]=e.Cb;a.R[c]=d}}
|
|
||||||
function Ad(a,c){var d=zd(a,c);if(d.kb)a.Ea[7]=0,a.Qa[7]=0;else{if(!d.ye)throw a.debug.S("LDTR can only be loaded from GDT");if(!d.Eb)throw a.debug.S("#GP handler");if(!d.Fb)throw a.debug.S("#GP handler");if(2!==d.type)throw a.debug.S("#GP handler");a.Ea[7]=d.Cb;a.Qa[7]=d.Ob;a.R[7]=c}}function $d(a,c,d){c=zd(a,c);a.u&=-65;var e=c.xa<a.O||c.xa<c.mb;if(c.kb||!c.bc||(c.Fb?58817>>c.type&1||e:!c.xd&&e))return a.h&=-65,d;a.h|=64;return c.pf&16776960}
|
|
||||||
function ae(a,c,d){c=zd(a,c);a.u&=-65;var e=c.xa<a.O||c.xa<c.mb;if(c.kb||!c.bc||(c.Fb?62833>>c.type&1||e:!c.xd&&e))return a.h&=-65,d;a.h|=64;return c.Ob|0}function Bd(a){a.Gb=-1;a.Sc=-1;a.Kb.set(a.Id)}function cd(a){for(var c=new Int32Array(a.Id.buffer),d=0;262144>d;)c[d++]=c[d++]=c[d++]=c[d++]=0;Bd(a)}function jd(a,c){if(a.X)if(3===a.O)if(a.X){var d=c>>>12;a=a.Kb[d]&4?a.N[d]^c:be(a,c,0,1)|c&4095}else a=c;else a=yd(a,c);else a=c;return a}
|
|
||||||
function nd(a,c){if(a.X)if(3===a.O)if(a.X){var d=c>>>12;a=a.Kb[d]&8?a.N[d]^c:be(a,c,1,1)|c&4095}else a=c;else a=Cd(a,c);else a=c;return a}function Cd(a,c){if(!a.X)return c;var d=c>>>12;return a.Kb[d]&2?a.N[d]^c:be(a,c,1,0)|c&4095}function yd(a,c){if(!a.X)return c;var d=c>>>12;return a.Kb[d]&1?a.N[d]^c:be(a,c,0,0)|c&4095}
|
|
||||||
function be(a,c,d,e){var f=c>>>12,h=(a.G[3]>>>2)+(f>>10)|0,r=a.memory.Hb[h],k=!0,t=!0;r&1||(a.G[2]=c,ce(a,d,e,0));r&2||(k=!1,d&&(e||a.G[0]&65536)&&(a.G[2]=c,ce(a,d,e,1)));r&4||(t=!1,e&&(a.G[2]=c,ce(a,d,e,1)));if(r&a.Ad)a.memory.Hb[h]=r|32|d<<6,c=r&4290772992|c&4190208,r&=256;else{var u=((r&4294963200)>>>2)+(f&1023)|0,z=a.memory.Hb[u];z&1||(a.G[2]=c,ce(a,d,e,0));z&2||(k=!1,d&&(e||a.G[0]&65536)&&(a.G[2]=c,ce(a,d,e,1)));z&4||(t=!1,e&&(a.G[2]=c,ce(a,d,e,1)));a.memory.Hb[h]=r|32;a.memory.Hb[u]=z|32|d<<
|
|
||||||
6;c=z&4294963200;r=z&256}a.N[f]=c^f<<12;k=t?k?15:5:k?3:1;a.Kb[f]=k;r&&a.G[4]&128&&(a.Id[f]=k);return c}function lb(a,c,d){if(a.X){var e=3===a.O?1:0,f=e?8:2,h=c>>>12;a.Kb[h]&f||be(a,c,1,e);4096<=(c&4095)+d-1&&(a.Kb[h+1|0]&f||be(a,c+d-1|0,1,e))}}function ce(a,c,d,e){if(a.K)throw a.debug.S("Double fault");var f=a.G[2]>>>12;a.Kb[f]=0;a.Id[f]=0;a.w=a.ga;a.K=!0;Ec(a,14,!1,d<<2|c<<1|e);throw 233495534;};(function(){v.prototype.g=Array(192);v.prototype.b=Array(192);v.prototype.i=Array(256);v.prototype.g[0]=function(a){return P(a)+(a.l[6]+a.l[12]&65535)|0};v.prototype.g[64]=function(a){return P(a)+(a.l[6]+a.l[12]+D(a)&65535)|0};v.prototype.g[128]=function(a){return P(a)+(a.l[6]+a.l[12]+E(a)&65535)|0};v.prototype.g[1]=function(a){return P(a)+(a.l[6]+a.l[14]&65535)|0};v.prototype.g[65]=function(a){return P(a)+(a.l[6]+a.l[14]+D(a)&65535)|0};v.prototype.g[129]=function(a){return P(a)+(a.l[6]+a.l[14]+E(a)&
|
|
||||||
65535)|0};v.prototype.g[2]=function(a){return Q(a)+(a.l[10]+a.l[12]&65535)|0};v.prototype.g[66]=function(a){return Q(a)+(a.l[10]+a.l[12]+D(a)&65535)|0};v.prototype.g[130]=function(a){return Q(a)+(a.l[10]+a.l[12]+E(a)&65535)|0};v.prototype.g[3]=function(a){return Q(a)+(a.l[10]+a.l[14]&65535)|0};v.prototype.g[67]=function(a){return Q(a)+(a.l[10]+a.l[14]+D(a)&65535)|0};v.prototype.g[131]=function(a){return Q(a)+(a.l[10]+a.l[14]+E(a)&65535)|0};v.prototype.g[4]=function(a){return P(a)+(a.l[12]&65535)|
|
|
||||||
0};v.prototype.g[68]=function(a){return P(a)+(a.l[12]+D(a)&65535)|0};v.prototype.g[132]=function(a){return P(a)+(a.l[12]+E(a)&65535)|0};v.prototype.g[5]=function(a){return P(a)+(a.l[14]&65535)|0};v.prototype.g[69]=function(a){return P(a)+(a.l[14]+D(a)&65535)|0};v.prototype.g[133]=function(a){return P(a)+(a.l[14]+E(a)&65535)|0};v.prototype.g[6]=function(a){return Q(a)+(a.l[10]&65535)|0};v.prototype.g[70]=function(a){return Q(a)+(a.l[10]+D(a)&65535)|0};v.prototype.g[134]=function(a){return Q(a)+(a.l[10]+
|
|
||||||
E(a)&65535)|0};v.prototype.g[7]=function(a){return P(a)+(a.l[6]&65535)|0};v.prototype.g[71]=function(a){return P(a)+(a.l[6]+D(a)&65535)|0};v.prototype.g[135]=function(a){return P(a)+(a.l[6]+E(a)&65535)|0};v.prototype.b[0]=function(a){return P(a)+a.a[0]|0};v.prototype.b[64]=function(a){return P(a)+a.a[0]+D(a)|0};v.prototype.b[128]=function(a){return P(a)+a.a[0]+H(a)|0};v.prototype.b[1]=function(a){return P(a)+a.a[1]|0};v.prototype.b[65]=function(a){return P(a)+a.a[1]+D(a)|0};v.prototype.b[129]=function(a){return P(a)+
|
|
||||||
a.a[1]+H(a)|0};v.prototype.b[2]=function(a){return P(a)+a.a[2]|0};v.prototype.b[66]=function(a){return P(a)+a.a[2]+D(a)|0};v.prototype.b[130]=function(a){return P(a)+a.a[2]+H(a)|0};v.prototype.b[3]=function(a){return P(a)+a.a[3]|0};v.prototype.b[67]=function(a){return P(a)+a.a[3]+D(a)|0};v.prototype.b[131]=function(a){return P(a)+a.a[3]+H(a)|0};v.prototype.b[4]=function(a){return a.i[C(a)](a,!1)|0};v.prototype.b[68]=function(a){return a.i[C(a)](a,!1)+D(a)|0};v.prototype.b[132]=function(a){return a.i[C(a)](a,
|
|
||||||
!1)+H(a)|0};v.prototype.b[5]=function(a){return Q(a)+a.a[5]|0};v.prototype.b[69]=function(a){return Q(a)+a.a[5]+D(a)|0};v.prototype.b[133]=function(a){return Q(a)+a.a[5]+H(a)|0};v.prototype.b[6]=function(a){return P(a)+a.a[6]|0};v.prototype.b[70]=function(a){return P(a)+a.a[6]+D(a)|0};v.prototype.b[134]=function(a){return P(a)+a.a[6]+H(a)|0};v.prototype.b[7]=function(a){return P(a)+a.a[7]|0};v.prototype.b[71]=function(a){return P(a)+a.a[7]+D(a)|0};v.prototype.b[135]=function(a){return P(a)+a.a[7]+
|
|
||||||
H(a)|0};v.prototype.g[6]=function(a){return P(a)+E(a)|0};v.prototype.b[5]=function(a){return P(a)+H(a)|0};v.prototype.b[4]=function(a){return a.i[C(a)](a,!1)|0};v.prototype.b[68]=function(a){return a.i[C(a)](a,!0)+D(a)|0};v.prototype.b[132]=function(a){return a.i[C(a)](a,!0)+H(a)|0};for(var a=0;8>a;a++)for(var c=0;3>c;c++)for(var d=a|c<<6,e=1;8>e;e++)v.prototype.b[d|e<<3]=v.prototype.b[d],v.prototype.g[d|e<<3]=v.prototype.g[d];v.prototype.i[0]=function(a){return a.a[0]+P(a)+a.a[0]|0};v.prototype.i[1]=
|
|
||||||
function(a){return a.a[0]+P(a)+a.a[1]|0};v.prototype.i[2]=function(a){return a.a[0]+P(a)+a.a[2]|0};v.prototype.i[3]=function(a){return a.a[0]+P(a)+a.a[3]|0};v.prototype.i[4]=function(a){return a.a[0]+Q(a)+a.a[4]|0};v.prototype.i[5]=function(a,c){return a.a[0]+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[6]=function(a){return a.a[0]+P(a)+a.a[6]|0};v.prototype.i[7]=function(a){return a.a[0]+P(a)+a.a[7]|0};v.prototype.i[64]=function(a){return(a.a[0]<<1)+P(a)+a.a[0]|0};v.prototype.i[65]=function(a){return(a.a[0]<<
|
|
||||||
1)+P(a)+a.a[1]|0};v.prototype.i[66]=function(a){return(a.a[0]<<1)+P(a)+a.a[2]|0};v.prototype.i[67]=function(a){return(a.a[0]<<1)+P(a)+a.a[3]|0};v.prototype.i[68]=function(a){return(a.a[0]<<1)+Q(a)+a.a[4]|0};v.prototype.i[69]=function(a,c){return(a.a[0]<<1)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[70]=function(a){return(a.a[0]<<1)+P(a)+a.a[6]|0};v.prototype.i[71]=function(a){return(a.a[0]<<1)+P(a)+a.a[7]|0};v.prototype.i[128]=function(a){return(a.a[0]<<2)+P(a)+a.a[0]|0};v.prototype.i[129]=function(a){return(a.a[0]<<
|
|
||||||
2)+P(a)+a.a[1]|0};v.prototype.i[130]=function(a){return(a.a[0]<<2)+P(a)+a.a[2]|0};v.prototype.i[131]=function(a){return(a.a[0]<<2)+P(a)+a.a[3]|0};v.prototype.i[132]=function(a){return(a.a[0]<<2)+Q(a)+a.a[4]|0};v.prototype.i[133]=function(a,c){return(a.a[0]<<2)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[134]=function(a){return(a.a[0]<<2)+P(a)+a.a[6]|0};v.prototype.i[135]=function(a){return(a.a[0]<<2)+P(a)+a.a[7]|0};v.prototype.i[192]=function(a){return(a.a[0]<<3)+P(a)+a.a[0]|0};v.prototype.i[193]=
|
|
||||||
function(a){return(a.a[0]<<3)+P(a)+a.a[1]|0};v.prototype.i[194]=function(a){return(a.a[0]<<3)+P(a)+a.a[2]|0};v.prototype.i[195]=function(a){return(a.a[0]<<3)+P(a)+a.a[3]|0};v.prototype.i[196]=function(a){return(a.a[0]<<3)+Q(a)+a.a[4]|0};v.prototype.i[197]=function(a,c){return(a.a[0]<<3)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[198]=function(a){return(a.a[0]<<3)+P(a)+a.a[6]|0};v.prototype.i[199]=function(a){return(a.a[0]<<3)+P(a)+a.a[7]|0};v.prototype.i[8]=function(a){return a.a[1]+P(a)+a.a[0]|0};
|
|
||||||
v.prototype.i[9]=function(a){return a.a[1]+P(a)+a.a[1]|0};v.prototype.i[10]=function(a){return a.a[1]+P(a)+a.a[2]|0};v.prototype.i[11]=function(a){return a.a[1]+P(a)+a.a[3]|0};v.prototype.i[12]=function(a){return a.a[1]+Q(a)+a.a[4]|0};v.prototype.i[13]=function(a,c){return a.a[1]+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[14]=function(a){return a.a[1]+P(a)+a.a[6]|0};v.prototype.i[15]=function(a){return a.a[1]+P(a)+a.a[7]|0};v.prototype.i[72]=function(a){return(a.a[1]<<1)+P(a)+a.a[0]|0};v.prototype.i[73]=
|
|
||||||
function(a){return(a.a[1]<<1)+P(a)+a.a[1]|0};v.prototype.i[74]=function(a){return(a.a[1]<<1)+P(a)+a.a[2]|0};v.prototype.i[75]=function(a){return(a.a[1]<<1)+P(a)+a.a[3]|0};v.prototype.i[76]=function(a){return(a.a[1]<<1)+Q(a)+a.a[4]|0};v.prototype.i[77]=function(a,c){return(a.a[1]<<1)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[78]=function(a){return(a.a[1]<<1)+P(a)+a.a[6]|0};v.prototype.i[79]=function(a){return(a.a[1]<<1)+P(a)+a.a[7]|0};v.prototype.i[136]=function(a){return(a.a[1]<<2)+P(a)+a.a[0]|0};
|
|
||||||
v.prototype.i[137]=function(a){return(a.a[1]<<2)+P(a)+a.a[1]|0};v.prototype.i[138]=function(a){return(a.a[1]<<2)+P(a)+a.a[2]|0};v.prototype.i[139]=function(a){return(a.a[1]<<2)+P(a)+a.a[3]|0};v.prototype.i[140]=function(a){return(a.a[1]<<2)+Q(a)+a.a[4]|0};v.prototype.i[141]=function(a,c){return(a.a[1]<<2)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[142]=function(a){return(a.a[1]<<2)+P(a)+a.a[6]|0};v.prototype.i[143]=function(a){return(a.a[1]<<2)+P(a)+a.a[7]|0};v.prototype.i[200]=function(a){return(a.a[1]<<
|
|
||||||
3)+P(a)+a.a[0]|0};v.prototype.i[201]=function(a){return(a.a[1]<<3)+P(a)+a.a[1]|0};v.prototype.i[202]=function(a){return(a.a[1]<<3)+P(a)+a.a[2]|0};v.prototype.i[203]=function(a){return(a.a[1]<<3)+P(a)+a.a[3]|0};v.prototype.i[204]=function(a){return(a.a[1]<<3)+Q(a)+a.a[4]|0};v.prototype.i[205]=function(a,c){return(a.a[1]<<3)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[206]=function(a){return(a.a[1]<<3)+P(a)+a.a[6]|0};v.prototype.i[207]=function(a){return(a.a[1]<<3)+P(a)+a.a[7]|0};v.prototype.i[16]=function(a){return a.a[2]+
|
|
||||||
P(a)+a.a[0]|0};v.prototype.i[17]=function(a){return a.a[2]+P(a)+a.a[1]|0};v.prototype.i[18]=function(a){return a.a[2]+P(a)+a.a[2]|0};v.prototype.i[19]=function(a){return a.a[2]+P(a)+a.a[3]|0};v.prototype.i[20]=function(a){return a.a[2]+Q(a)+a.a[4]|0};v.prototype.i[21]=function(a,c){return a.a[2]+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[22]=function(a){return a.a[2]+P(a)+a.a[6]|0};v.prototype.i[23]=function(a){return a.a[2]+P(a)+a.a[7]|0};v.prototype.i[80]=function(a){return(a.a[2]<<1)+P(a)+a.a[0]|
|
|
||||||
0};v.prototype.i[81]=function(a){return(a.a[2]<<1)+P(a)+a.a[1]|0};v.prototype.i[82]=function(a){return(a.a[2]<<1)+P(a)+a.a[2]|0};v.prototype.i[83]=function(a){return(a.a[2]<<1)+P(a)+a.a[3]|0};v.prototype.i[84]=function(a){return(a.a[2]<<1)+Q(a)+a.a[4]|0};v.prototype.i[85]=function(a,c){return(a.a[2]<<1)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[86]=function(a){return(a.a[2]<<1)+P(a)+a.a[6]|0};v.prototype.i[87]=function(a){return(a.a[2]<<1)+P(a)+a.a[7]|0};v.prototype.i[144]=function(a){return(a.a[2]<<
|
|
||||||
2)+P(a)+a.a[0]|0};v.prototype.i[145]=function(a){return(a.a[2]<<2)+P(a)+a.a[1]|0};v.prototype.i[146]=function(a){return(a.a[2]<<2)+P(a)+a.a[2]|0};v.prototype.i[147]=function(a){return(a.a[2]<<2)+P(a)+a.a[3]|0};v.prototype.i[148]=function(a){return(a.a[2]<<2)+Q(a)+a.a[4]|0};v.prototype.i[149]=function(a,c){return(a.a[2]<<2)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[150]=function(a){return(a.a[2]<<2)+P(a)+a.a[6]|0};v.prototype.i[151]=function(a){return(a.a[2]<<2)+P(a)+a.a[7]|0};v.prototype.i[208]=
|
|
||||||
function(a){return(a.a[2]<<3)+P(a)+a.a[0]|0};v.prototype.i[209]=function(a){return(a.a[2]<<3)+P(a)+a.a[1]|0};v.prototype.i[210]=function(a){return(a.a[2]<<3)+P(a)+a.a[2]|0};v.prototype.i[211]=function(a){return(a.a[2]<<3)+P(a)+a.a[3]|0};v.prototype.i[212]=function(a){return(a.a[2]<<3)+Q(a)+a.a[4]|0};v.prototype.i[213]=function(a,c){return(a.a[2]<<3)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[214]=function(a){return(a.a[2]<<3)+P(a)+a.a[6]|0};v.prototype.i[215]=function(a){return(a.a[2]<<3)+P(a)+a.a[7]|
|
|
||||||
0};v.prototype.i[24]=function(a){return a.a[3]+P(a)+a.a[0]|0};v.prototype.i[25]=function(a){return a.a[3]+P(a)+a.a[1]|0};v.prototype.i[26]=function(a){return a.a[3]+P(a)+a.a[2]|0};v.prototype.i[27]=function(a){return a.a[3]+P(a)+a.a[3]|0};v.prototype.i[28]=function(a){return a.a[3]+Q(a)+a.a[4]|0};v.prototype.i[29]=function(a,c){return a.a[3]+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[30]=function(a){return a.a[3]+P(a)+a.a[6]|0};v.prototype.i[31]=function(a){return a.a[3]+P(a)+a.a[7]|0};v.prototype.i[88]=
|
|
||||||
function(a){return(a.a[3]<<1)+P(a)+a.a[0]|0};v.prototype.i[89]=function(a){return(a.a[3]<<1)+P(a)+a.a[1]|0};v.prototype.i[90]=function(a){return(a.a[3]<<1)+P(a)+a.a[2]|0};v.prototype.i[91]=function(a){return(a.a[3]<<1)+P(a)+a.a[3]|0};v.prototype.i[92]=function(a){return(a.a[3]<<1)+Q(a)+a.a[4]|0};v.prototype.i[93]=function(a,c){return(a.a[3]<<1)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[94]=function(a){return(a.a[3]<<1)+P(a)+a.a[6]|0};v.prototype.i[95]=function(a){return(a.a[3]<<1)+P(a)+a.a[7]|0};
|
|
||||||
v.prototype.i[152]=function(a){return(a.a[3]<<2)+P(a)+a.a[0]|0};v.prototype.i[153]=function(a){return(a.a[3]<<2)+P(a)+a.a[1]|0};v.prototype.i[154]=function(a){return(a.a[3]<<2)+P(a)+a.a[2]|0};v.prototype.i[155]=function(a){return(a.a[3]<<2)+P(a)+a.a[3]|0};v.prototype.i[156]=function(a){return(a.a[3]<<2)+Q(a)+a.a[4]|0};v.prototype.i[157]=function(a,c){return(a.a[3]<<2)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[158]=function(a){return(a.a[3]<<2)+P(a)+a.a[6]|0};v.prototype.i[159]=function(a){return(a.a[3]<<
|
|
||||||
2)+P(a)+a.a[7]|0};v.prototype.i[216]=function(a){return(a.a[3]<<3)+P(a)+a.a[0]|0};v.prototype.i[217]=function(a){return(a.a[3]<<3)+P(a)+a.a[1]|0};v.prototype.i[218]=function(a){return(a.a[3]<<3)+P(a)+a.a[2]|0};v.prototype.i[219]=function(a){return(a.a[3]<<3)+P(a)+a.a[3]|0};v.prototype.i[220]=function(a){return(a.a[3]<<3)+Q(a)+a.a[4]|0};v.prototype.i[221]=function(a,c){return(a.a[3]<<3)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[222]=function(a){return(a.a[3]<<3)+P(a)+a.a[6]|0};v.prototype.i[223]=
|
|
||||||
function(a){return(a.a[3]<<3)+P(a)+a.a[7]|0};v.prototype.i[32]=function(a){return P(a)+a.a[0]|0};v.prototype.i[33]=function(a){return P(a)+a.a[1]|0};v.prototype.i[34]=function(a){return P(a)+a.a[2]|0};v.prototype.i[35]=function(a){return P(a)+a.a[3]|0};v.prototype.i[36]=function(a){return Q(a)+a.a[4]|0};v.prototype.i[37]=function(a,c){return(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[38]=function(a){return P(a)+a.a[6]|0};v.prototype.i[39]=function(a){return P(a)+a.a[7]|0};v.prototype.i[96]=function(a){return P(a)+
|
|
||||||
a.a[0]|0};v.prototype.i[97]=function(a){return P(a)+a.a[1]|0};v.prototype.i[98]=function(a){return P(a)+a.a[2]|0};v.prototype.i[99]=function(a){return P(a)+a.a[3]|0};v.prototype.i[100]=function(a){return Q(a)+a.a[4]|0};v.prototype.i[101]=function(a,c){return(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[102]=function(a){return P(a)+a.a[6]|0};v.prototype.i[103]=function(a){return P(a)+a.a[7]|0};v.prototype.i[160]=function(a){return P(a)+a.a[0]|0};v.prototype.i[161]=function(a){return P(a)+a.a[1]|0};v.prototype.i[162]=
|
|
||||||
function(a){return P(a)+a.a[2]|0};v.prototype.i[163]=function(a){return P(a)+a.a[3]|0};v.prototype.i[164]=function(a){return Q(a)+a.a[4]|0};v.prototype.i[165]=function(a,c){return(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[166]=function(a){return P(a)+a.a[6]|0};v.prototype.i[167]=function(a){return P(a)+a.a[7]|0};v.prototype.i[224]=function(a){return P(a)+a.a[0]|0};v.prototype.i[225]=function(a){return P(a)+a.a[1]|0};v.prototype.i[226]=function(a){return P(a)+a.a[2]|0};v.prototype.i[227]=function(a){return P(a)+
|
|
||||||
a.a[3]|0};v.prototype.i[228]=function(a){return Q(a)+a.a[4]|0};v.prototype.i[229]=function(a,c){return(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[230]=function(a){return P(a)+a.a[6]|0};v.prototype.i[231]=function(a){return P(a)+a.a[7]|0};v.prototype.i[40]=function(a){return a.a[5]+P(a)+a.a[0]|0};v.prototype.i[41]=function(a){return a.a[5]+P(a)+a.a[1]|0};v.prototype.i[42]=function(a){return a.a[5]+P(a)+a.a[2]|0};v.prototype.i[43]=function(a){return a.a[5]+P(a)+a.a[3]|0};v.prototype.i[44]=function(a){return a.a[5]+
|
|
||||||
Q(a)+a.a[4]|0};v.prototype.i[45]=function(a,c){return a.a[5]+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[46]=function(a){return a.a[5]+P(a)+a.a[6]|0};v.prototype.i[47]=function(a){return a.a[5]+P(a)+a.a[7]|0};v.prototype.i[104]=function(a){return(a.a[5]<<1)+P(a)+a.a[0]|0};v.prototype.i[105]=function(a){return(a.a[5]<<1)+P(a)+a.a[1]|0};v.prototype.i[106]=function(a){return(a.a[5]<<1)+P(a)+a.a[2]|0};v.prototype.i[107]=function(a){return(a.a[5]<<1)+P(a)+a.a[3]|0};v.prototype.i[108]=function(a){return(a.a[5]<<
|
|
||||||
1)+Q(a)+a.a[4]|0};v.prototype.i[109]=function(a,c){return(a.a[5]<<1)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[110]=function(a){return(a.a[5]<<1)+P(a)+a.a[6]|0};v.prototype.i[111]=function(a){return(a.a[5]<<1)+P(a)+a.a[7]|0};v.prototype.i[168]=function(a){return(a.a[5]<<2)+P(a)+a.a[0]|0};v.prototype.i[169]=function(a){return(a.a[5]<<2)+P(a)+a.a[1]|0};v.prototype.i[170]=function(a){return(a.a[5]<<2)+P(a)+a.a[2]|0};v.prototype.i[171]=function(a){return(a.a[5]<<2)+P(a)+a.a[3]|0};v.prototype.i[172]=
|
|
||||||
function(a){return(a.a[5]<<2)+Q(a)+a.a[4]|0};v.prototype.i[173]=function(a,c){return(a.a[5]<<2)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[174]=function(a){return(a.a[5]<<2)+P(a)+a.a[6]|0};v.prototype.i[175]=function(a){return(a.a[5]<<2)+P(a)+a.a[7]|0};v.prototype.i[232]=function(a){return(a.a[5]<<3)+P(a)+a.a[0]|0};v.prototype.i[233]=function(a){return(a.a[5]<<3)+P(a)+a.a[1]|0};v.prototype.i[234]=function(a){return(a.a[5]<<3)+P(a)+a.a[2]|0};v.prototype.i[235]=function(a){return(a.a[5]<<3)+P(a)+a.a[3]|
|
|
||||||
0};v.prototype.i[236]=function(a){return(a.a[5]<<3)+Q(a)+a.a[4]|0};v.prototype.i[237]=function(a,c){return(a.a[5]<<3)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[238]=function(a){return(a.a[5]<<3)+P(a)+a.a[6]|0};v.prototype.i[239]=function(a){return(a.a[5]<<3)+P(a)+a.a[7]|0};v.prototype.i[48]=function(a){return a.a[6]+P(a)+a.a[0]|0};v.prototype.i[49]=function(a){return a.a[6]+P(a)+a.a[1]|0};v.prototype.i[50]=function(a){return a.a[6]+P(a)+a.a[2]|0};v.prototype.i[51]=function(a){return a.a[6]+P(a)+
|
|
||||||
a.a[3]|0};v.prototype.i[52]=function(a){return a.a[6]+Q(a)+a.a[4]|0};v.prototype.i[53]=function(a,c){return a.a[6]+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[54]=function(a){return a.a[6]+P(a)+a.a[6]|0};v.prototype.i[55]=function(a){return a.a[6]+P(a)+a.a[7]|0};v.prototype.i[112]=function(a){return(a.a[6]<<1)+P(a)+a.a[0]|0};v.prototype.i[113]=function(a){return(a.a[6]<<1)+P(a)+a.a[1]|0};v.prototype.i[114]=function(a){return(a.a[6]<<1)+P(a)+a.a[2]|0};v.prototype.i[115]=function(a){return(a.a[6]<<1)+
|
|
||||||
P(a)+a.a[3]|0};v.prototype.i[116]=function(a){return(a.a[6]<<1)+Q(a)+a.a[4]|0};v.prototype.i[117]=function(a,c){return(a.a[6]<<1)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[118]=function(a){return(a.a[6]<<1)+P(a)+a.a[6]|0};v.prototype.i[119]=function(a){return(a.a[6]<<1)+P(a)+a.a[7]|0};v.prototype.i[176]=function(a){return(a.a[6]<<2)+P(a)+a.a[0]|0};v.prototype.i[177]=function(a){return(a.a[6]<<2)+P(a)+a.a[1]|0};v.prototype.i[178]=function(a){return(a.a[6]<<2)+P(a)+a.a[2]|0};v.prototype.i[179]=function(a){return(a.a[6]<<
|
|
||||||
2)+P(a)+a.a[3]|0};v.prototype.i[180]=function(a){return(a.a[6]<<2)+Q(a)+a.a[4]|0};v.prototype.i[181]=function(a,c){return(a.a[6]<<2)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[182]=function(a){return(a.a[6]<<2)+P(a)+a.a[6]|0};v.prototype.i[183]=function(a){return(a.a[6]<<2)+P(a)+a.a[7]|0};v.prototype.i[240]=function(a){return(a.a[6]<<3)+P(a)+a.a[0]|0};v.prototype.i[241]=function(a){return(a.a[6]<<3)+P(a)+a.a[1]|0};v.prototype.i[242]=function(a){return(a.a[6]<<3)+P(a)+a.a[2]|0};v.prototype.i[243]=
|
|
||||||
function(a){return(a.a[6]<<3)+P(a)+a.a[3]|0};v.prototype.i[244]=function(a){return(a.a[6]<<3)+Q(a)+a.a[4]|0};v.prototype.i[245]=function(a,c){return(a.a[6]<<3)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[246]=function(a){return(a.a[6]<<3)+P(a)+a.a[6]|0};v.prototype.i[247]=function(a){return(a.a[6]<<3)+P(a)+a.a[7]|0};v.prototype.i[56]=function(a){return a.a[7]+P(a)+a.a[0]|0};v.prototype.i[57]=function(a){return a.a[7]+P(a)+a.a[1]|0};v.prototype.i[58]=function(a){return a.a[7]+P(a)+a.a[2]|0};v.prototype.i[59]=
|
|
||||||
function(a){return a.a[7]+P(a)+a.a[3]|0};v.prototype.i[60]=function(a){return a.a[7]+Q(a)+a.a[4]|0};v.prototype.i[61]=function(a,c){return a.a[7]+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[62]=function(a){return a.a[7]+P(a)+a.a[6]|0};v.prototype.i[63]=function(a){return a.a[7]+P(a)+a.a[7]|0};v.prototype.i[120]=function(a){return(a.a[7]<<1)+P(a)+a.a[0]|0};v.prototype.i[121]=function(a){return(a.a[7]<<1)+P(a)+a.a[1]|0};v.prototype.i[122]=function(a){return(a.a[7]<<1)+P(a)+a.a[2]|0};v.prototype.i[123]=
|
|
||||||
function(a){return(a.a[7]<<1)+P(a)+a.a[3]|0};v.prototype.i[124]=function(a){return(a.a[7]<<1)+Q(a)+a.a[4]|0};v.prototype.i[125]=function(a,c){return(a.a[7]<<1)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[126]=function(a){return(a.a[7]<<1)+P(a)+a.a[6]|0};v.prototype.i[127]=function(a){return(a.a[7]<<1)+P(a)+a.a[7]|0};v.prototype.i[184]=function(a){return(a.a[7]<<2)+P(a)+a.a[0]|0};v.prototype.i[185]=function(a){return(a.a[7]<<2)+P(a)+a.a[1]|0};v.prototype.i[186]=function(a){return(a.a[7]<<2)+P(a)+a.a[2]|
|
|
||||||
0};v.prototype.i[187]=function(a){return(a.a[7]<<2)+P(a)+a.a[3]|0};v.prototype.i[188]=function(a){return(a.a[7]<<2)+Q(a)+a.a[4]|0};v.prototype.i[189]=function(a,c){return(a.a[7]<<2)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[190]=function(a){return(a.a[7]<<2)+P(a)+a.a[6]|0};v.prototype.i[191]=function(a){return(a.a[7]<<2)+P(a)+a.a[7]|0};v.prototype.i[248]=function(a){return(a.a[7]<<3)+P(a)+a.a[0]|0};v.prototype.i[249]=function(a){return(a.a[7]<<3)+P(a)+a.a[1]|0};v.prototype.i[250]=function(a){return(a.a[7]<<
|
|
||||||
3)+P(a)+a.a[2]|0};v.prototype.i[251]=function(a){return(a.a[7]<<3)+P(a)+a.a[3]|0};v.prototype.i[252]=function(a){return(a.a[7]<<3)+Q(a)+a.a[4]|0};v.prototype.i[253]=function(a,c){return(a.a[7]<<3)+(c?Q(a)+a.a[5]:P(a)+H(a))|0};v.prototype.i[254]=function(a){return(a.a[7]<<3)+P(a)+a.a[6]|0};v.prototype.i[255]=function(a){return(a.a[7]<<3)+P(a)+a.a[7]|0};v.prototype.P=function(a){return 192>a?(this.la?this.b:this.g)[a](this):-1}})();function de(a,c){return 0>a?(c&4095)>>(-a>>1):(~c&4095)>>a}function ee(a,c,d){return Math.min(de(a,c),de(a,d))}function fe(a){var c=a.l[4];Zd(a,c,1);var d=K(a,0)+a.j[a.B]|0,e=a.h&1024?-1:1;if(0!==a.ca){var f=a.j[a.M]>>>0;if(f){var h=f,r=4096,k=nd(a,d);a.X&&(r=de(e,d));do a.memory.sa(k,Ha(a.A,c)),k+=e,d=!!--f;while(d&&r--);a.j[a.B]+=e*(h-f)|0;a.j[a.M]=f;a.V+=h-f;d&&fe(a)}}else md(a,d,Ha(a.A,c)),a.j[a.B]+=e}
|
|
||||||
function ge(a){var c=a.l[4];Zd(a,c,2);var d=K(a,0)+a.j[a.B]|0,e=a.h&1024?-2:2;if(0!==a.ca){var f=a.j[a.M]>>>0;if(f){var h,r=f,k=4096;if(d&1){do mb(a,d,Ia(a.A,c)),d+=e,a.j[a.B]+=e,h=!!--a.j[a.M];while(h&&k--)}else{var t=0>e?-1:1,u=nd(a,d)>>1;a.X&&(k=de(e,d));do mc(a.memory,u,Ia(a.A,c)),u+=t,h=!!--f;while(h&&k--);a.j[a.B]+=e*(r-f)|0;a.j[a.M]=f;a.V+=r-f}h&&ge(a)}}else mb(a,d,Ia(a.A,c)),a.j[a.B]+=e}
|
|
||||||
function he(a){var c=a.l[4];Zd(a,c,4);var d=K(a,0)+a.j[a.B]|0,e=a.h&1024?-4:4;if(0!==a.ca){var f=a.j[a.M]>>>0;if(f){var h,r=f,k=4096;if(d&3){do x(a,d,Ja(a.A,c)),d+=e,a.j[a.B]+=e,h=!!--a.j[a.M];while(h&&k--)}else{var t=0>e?-1:1,u=nd(a,d)>>>2;a.X&&(k=de(e,d));do nc(a.memory,u,Ja(a.A,c)),u+=t,h=!!--f;while(h&&k--);a.j[a.B]+=e*(r-f)|0;a.j[a.M]=f;a.V+=r-f}h&&he(a)}}else x(a,d,Ja(a.A,c)),a.j[a.B]+=e}
|
|
||||||
function ie(a){var c=a.l[4];Zd(a,c,1);var d=pd(a,3)+a.j[a.I]|0,e=a.h&1024?-1:1;if(0!==a.ca){var f=a.j[a.M]>>>0;if(f){var h=f,r=4096,k=jd(a,d);a.X&&(r=de(e,d));do Ea(a.A,c,a.memory.da(k)),k+=e,d=!!--f;while(d&&r--);a.j[a.I]+=e*(h-f)|0;a.j[a.M]=f;a.V+=h-f;d&&ie(a)}}else Ea(a.A,c,ld(a,d)),a.j[a.I]+=e}
|
|
||||||
function je(a){var c=a.l[4];Zd(a,c,2);var d=pd(a,3)+a.j[a.I]|0,e=a.h&1024?-2:2;if(0!==a.ca){var f=a.j[a.M]>>>0;if(f){var h,r=f,k=4096;if(d&1){do Fa(a.A,c,y(a,d)),d+=e,a.j[a.I]+=e,h=!!--a.j[a.M];while(h&&k--)}else{var t=0>e?-1:1,u=jd(a,d)>>1;a.X&&(k=de(e,d));do Fa(a.A,c,kc(a.memory,u)),u+=t,h=!!--f;while(h&&k--);a.j[a.I]+=e*(r-f)|0;a.j[a.M]=f;a.V+=r-f}h&&je(a)}}else Fa(a.A,c,y(a,d)),a.j[a.I]+=e}
|
|
||||||
function ke(a){var c=a.l[4];Zd(a,c,4);var d=pd(a,3)+a.j[a.I]|0,e=a.h&1024?-4:4;if(0!==a.ca){var f=a.j[a.M]>>>0;if(f){var h,r=f,k=4096;if(d&3){do Ga(a.A,c,A(a,d)),d+=e,a.j[a.I]+=e,h=!!--a.j[a.M];while(h&&k--)}else{var t=0>e?-1:1,u=jd(a,d)>>>2;a.X&&(k=de(e,d));do Ga(a.A,c,lc(a.memory,u)),u+=t,h=!!--f;while(h&&k--);a.j[a.I]+=e*(r-f)|0;a.j[a.M]=f;a.V+=r-f}h&&ke(a)}}else Ga(a.A,c,A(a,d)),a.j[a.I]+=e};function le(a,c,d){return a.add(c,d,7)}function me(a,c,d){return a.add(c,d,15)}function ne(a,c,d){return a.add(c,d,31)}function oe(a,c,d){return pe(a,c,d,7)}function qe(a,c,d){return pe(a,c,d,15)}function ye(a,c,d){return pe(a,c,d,31)}function ze(a,c,d){return Ae(a,c,d,7)}function Be(a,c,d){return Ae(a,c,d,15)}function Ce(a,c,d){return Ae(a,c,d,31)}function De(a,c,d){return Ee(a,c,d,7)}function Fe(a,c,d){return Ee(a,c,d,15)}function Ge(a,c,d){return Ee(a,c,d,31)}
|
|
||||||
v.prototype.add=function(a,c,d){this.Va=a;this.Wa=c;this.m=this.F=a+c|0;this.T=d;this.u=2261;return this.F};function pe(a,c,d,e){var f=a.Pa();a.Va=c;a.Wa=d;a.m=a.F=(c+d|0)+f|0;a.T=e;a.u=2261;return a.F}function Ae(a,c,d,e){a.m=c;a.Wa=d;a.Va=a.F=c-d|0;a.T=e;a.u=2261;return a.F}function Ee(a,c,d,e){var f=a.Pa();a.m=c;a.Wa=d;a.Va=a.F=c-d-f|0;a.T=e;a.u=2261;return a.F}function He(a,c,d){a.h=a.h&-2|a.Pa();a.Va=c;a.Wa=1;a.m=a.F=c+1|0;a.T=d;a.u=2260;return a.F}
|
|
||||||
function Ie(a,c,d){a.h=a.h&-2|a.Pa();a.m=c;a.Wa=1;a.Va=a.F=c-1|0;a.T=d;a.u=2260;return a.F}function Je(a,c,d){a.Va=a.F=-c|0;a.u=2261;a.m=0;a.Wa=c;a.T=d;return a.F}function Ke(a,c,d){c*=d;a.F=c&65535;a.T=15;a.h=32767<c||-32768>c?a.h|2049:a.h&-2050;a.u=212;return c}var Le=new Int32Array(2);function Me(a,c){var d=a&65535;a>>>=16;var e=c&65535;c>>>=16;var f=d*e,e=(f>>>16)+(a*e|0)|0,h=e>>>16,e=(e&65535)+(d*c|0)|0;Le[0]=e<<16|f&65535;Le[1]=((e>>>16)+(a*c|0)|0)+h|0;return Le}
|
|
||||||
function Ne(a,c){var d=!1;0>a&&(d=!0,a=-a|0);0>c&&(d=!d,c=-c|0);a=Me(a,c);d&&(a[0]=-a[0]|0,a[1]=~a[1]+!a[0]|0);return a}function Oe(a,c,d){c=Ne(c,d);a.F=c[0];a.T=31;a.h=c[1]===c[0]>>31?a.h&-2050:a.h|2049;a.u=212;return c[0]}var Pe=new Float64Array(2);function Qe(a,c,d,e){(d>=e||0===e)&&Gd(a);a=0;if(1048576<d){for(var f=32,h=e;h>d;)h>>>=1,f--;for(;1048576<d;){if(d>=h){d-=h;var r=e<<f>>>0;r>c&&d--;c=c-r>>>0;a|=1<<f}f--;h>>=1}a>>>=0}c+=4294967296*d;Pe[0]=a+(c/e|0);Pe[1]=c%e;return Pe}
|
|
||||||
function Re(a,c,d){return Se(a,c,d,7)}function Te(a,c,d){return Se(a,c,d,15)}function Ue(a,c,d){return Se(a,c,d,31)}function Ve(a,c,d){return We(a,c,d,7)}function Xe(a,c,d){return We(a,c,d,15)}function Ye(a,c,d){return We(a,c,d,31)}function Ze(a,c,d){return $e(a,c,d,7)}function af(a,c,d){return $e(a,c,d,15)}function bf(a,c,d){return $e(a,c,d,31)}function Se(a,c,d,e){a.F=c&d;a.T=e;a.h&=-2066;a.u=196;return a.F}function We(a,c,d,e){a.F=c|d;a.T=e;a.h&=-2066;a.u=196;return a.F}
|
|
||||||
function $e(a,c,d,e){a.F=c^d;a.T=e;a.h&=-2066;a.u=196;return a.F}function cf(a,c,d){if(!d)return c;d&=7;c=c<<d|c>>8-d;a.u&=-2050;a.h=a.h&-2050|c&1|(c<<11^c<<4)&2048;return c}function df(a,c,d){if(!d)return c;d&=15;c=c<<d|c>>16-d;a.u&=-2050;a.h=a.h&-2050|c&1|(c<<11^c>>4)&2048;return c}function ef(a,c,d){if(!d)return c;c=c<<d|c>>>32-d;a.u&=-2050;a.h=a.h&-2050|c&1|(c<<11^c>>20)&2048;return c}
|
|
||||||
function ff(a,c,d){d%=9;if(!d)return c;c=c<<d|a.Pa()<<d-1|c>>9-d;a.u&=-2050;a.h=a.h&-2050|c>>8&1|(c<<3^c<<4)&2048;return c}function gf(a,c,d){d%=17;if(!d)return c;c=c<<d|a.Pa()<<d-1|c>>17-d;a.u&=-2050;a.h=a.h&-2050|c>>16&1|(c>>5^c>>4)&2048;return c}function hf(a,c,d){if(!d)return c;var e=c<<d|a.Pa()<<d-1;1<d&&(e|=c>>>33-d);a.u&=-2050;a.h=a.h&-2050|c>>>32-d&1;a.h|=(a.h<<11^e>>20)&2048;return e}
|
|
||||||
function jf(a,c,d){if(!d)return c;d&=7;c=c>>d|c<<8-d;a.u&=-2050;a.h=a.h&-2050|c>>7&1|(c<<4^c<<5)&2048;return c}function kf(a,c,d){if(!d)return c;d&=15;c=c>>d|c<<16-d;a.u&=-2050;a.h=a.h&-2050|c>>15&1|(c>>4^c>>3)&2048;return c}function lf(a,c,d){if(!d)return c;c=c>>>d|c<<32-d;a.u&=-2050;a.h=a.h&-2050|c>>31&1|(c>>20^c>>19)&2048;return c}function mf(a,c,d){d%=9;if(!d)return c;c=c>>d|a.Pa()<<8-d|c<<9-d;a.u&=-2050;a.h=a.h&-2050|c>>8&1|(c<<4^c<<5)&2048;return c}
|
|
||||||
function nf(a,c,d){d%=17;if(!d)return c;c=c>>d|a.Pa()<<16-d|c<<17-d;a.u&=-2050;a.h=a.h&-2050|c>>16&1|(c>>4^c>>3)&2048;return c}function of(a,c,d){if(!d)return c;var e=c>>>d|a.Pa()<<32-d;1<d&&(e|=c<<33-d);a.u&=-2050;a.h=a.h&-2050|c>>d-1&1|(e>>20^e>>19)&2048;return e}function pf(a,c,d){if(0===d)return c;a.F=c<<d;a.T=7;a.u=212;a.h=a.h&-2050|a.F>>8&1|(a.F<<3^a.F<<4)&2048;return a.F}function qf(a,c,d){if(0===d)return c;a.F=c<<d;a.T=15;a.u=212;a.h=a.h&-2050|a.F>>16&1|(a.F>>5^a.F>>4)&2048;return a.F}
|
|
||||||
function rf(a,c,d){if(0===d)return c;a.F=c<<d;a.T=31;a.u=212;a.h=a.h&-2050|c>>>32-d&1;a.h|=(a.h&1^a.F>>31&1)<<11&2048;return a.F}function sf(a,c,d){if(0===d)return c;a.F=c>>d;a.T=7;a.u=212;a.h=a.h&-2050|c>>d-1&1|(c>>7&1)<<11&2048;return a.F}function tf(a,c,d){if(0===d)return c;a.F=c>>d;a.T=15;a.u=212;a.h=a.h&-2050|c>>d-1&1|c>>4&2048;return a.F}function uf(a,c,d){if(0===d)return c;a.F=c>>>d;a.T=31;a.u=212;a.h=a.h&-2050|c>>>d-1&1|c>>20&2048;return a.F}
|
|
||||||
function vf(a,c,d){if(0===d)return c;8>d?(a.F=c<<24>>d+24,a.h=a.h&-2050|c>>d-1&1):(a.F=c<<24>>31,a.h=a.h&-2050|a.F&1);a.T=7;a.u=212;return a.F}function wf(a,c,d){if(0===d)return c;16>d?(a.F=c<<16>>d+16,a.h=a.h&-2050|c>>d-1&1):(a.F=c<<16>>31,a.h=a.h&-2050|a.F&1);a.T=15;a.u=212;return a.F}function xf(a,c,d){if(0===d)return c;a.F=c>>d;a.T=31;a.u=212;a.h=a.h&-2050|c>>>d-1&1;return a.F}
|
|
||||||
function yf(a,c,d,e){if(0===e)return c;16>=e?(a.F=c>>e|d<<16-e,a.h=a.h&-2|c>>e-1&1):(a.F=c<<32-e|d>>e-16,a.h=a.h&-2|d>>e-17&1);a.T=15;a.u=212;a.h=a.h&-2049|(a.F^c)>>4&2048;return a.F}function zf(a,c,d,e){if(0===e)return c;a.F=c>>>e|d<<32-e;a.T=31;a.u=212;a.h=a.h&-2|c>>>e-1&1;a.h=a.h&-2049|(a.F^c)>>20&2048;return a.F}
|
|
||||||
function Af(a,c,d,e){if(0===e)return c;16>=e?(a.F=c<<e|d>>>16-e,a.h=a.h&-2|c>>>16-e&1):(a.F=c>>32-e|d<<e-16,a.h=a.h&-2|d>>>32-e&1);a.T=15;a.u=212;a.h=a.h&-2049|(a.h&1^a.F>>15&1)<<11;return a.F}function Bf(a,c,d,e){if(0===e)return c;a.F=c<<e|d>>>32-e;a.T=31;a.u=212;a.h=a.h&-2|c>>>32-e&1;a.h=a.h&-2049|(a.h&1^a.F>>31&1)<<11;return a.F}function Cf(a,c,d){a.h=a.h&-2|c>>d&1;a.u&=-2}function Df(a,c,d){a.h=a.h&-2|c>>d&1;a.u&=-2;return c^1<<d}function Ef(a,c,d){a.h=a.h&-2|c>>d&1;a.u&=-2;return c|1<<d}
|
|
||||||
function Ff(a,c,d){a.h=a.h&-2|c>>d&1;a.u&=-2;return c&~(1<<d)}function Gf(a,c,d){c=ld(a,c+(d>>3)|0);a.h=a.h&-2|c>>(d&7)&1;a.u&=-2}function Hf(a,c,d){c=nd(a,c+(d>>3)|0);var e=a.memory.da(c);d&=7;a.h=a.h&-2|e>>d&1;a.u&=-2;a.memory.sa(c,e^1<<d)}function If(a,c,d){c=nd(a,c+(d>>3)|0);var e=a.memory.da(c);d&=7;a.h=a.h&-2|e>>d&1;a.u&=-2;a.memory.sa(c,e&~(1<<d))}function Jf(a,c,d){c=nd(a,c+(d>>3)|0);var e=a.memory.da(c);d&=7;a.h=a.h&-2|e>>d&1;a.u&=-2;a.memory.sa(c,e|1<<d)}
|
|
||||||
function Kf(a,c){a.u=0;a.h&=-2262;if(c)return c-=c>>1&1431655765,c=(c&858993459)+(c>>2&858993459),16843009*(c+(c>>4)&252645135)>>24;a.h|=64;return 0};function Lf(a,c){c?(c=D(a),a.w=a.w+c|0):a.w=a.w+1|0}function Mf(a,c){var d=K(a,1);a.w-=d;a.w=a.w+c&65535;a.w=a.w+d|0}function Nf(a,c){c?Mf(a,E(a)):a.w=a.w+2|0}function Of(a,c){c?(c=H(a),a.w=a.w+c|0):a.w=a.w+4|0}function Pf(a,c){var d=R(a);c&&Xd(a,d)}function Qf(a,c){var d=Jd(a);c&&Yd(a,d)}function Rf(a,c){Kd(a,c?1:0)}l=v.prototype;l.loop=function(a){--this.j[this.M]&&(this.w=this.w+a|0,this.Da||xd(this))};
|
|
||||||
l.Pa=function(){return this.u&1?(this.Va^(this.Va^this.Wa)&(this.Wa^this.m))>>>this.T&1:this.h&1};l.Ze=function(){return this.u&4?154020>>((this.F^this.F>>4)&15)&4:this.h&4};function td(a){return a.u&16?(a.Va^a.Wa^a.m)&16:a.h&16}l.Pb=function(){return this.u&64?(~this.F&this.F-1)>>>this.T&1:this.h&64};l.Ud=function(){return this.u&128?this.F>>>this.T&1:this.h&128};l.td=function(){return this.u&2048?((this.Va^this.m)&(this.Wa^this.m))>>>this.T&1:this.h&2048};l.qb=v.prototype.td;l.hb=v.prototype.Pa;
|
|
||||||
l.jb=v.prototype.Pb;l.rb=v.prototype.Ud;l.ib=v.prototype.Ze;function Sf(a){return a.Pa()||a.Pb()}function Tf(a){return!a.Ud()!==!a.td()}function Uf(a){return a.Pb()||!a.Ud()!==!a.td()}function O(a,c){var d=J(a,-2);mb(a,d,c);I(a,-2)}function N(a,c){var d=J(a,-4);x(a,d,c);I(a,-4)}function Vf(a){var c=K(a,2)+(a.gb?a.a[4]:a.l[8])|0,c=y(a,c);I(a,2);return c}function Wf(a){var c=K(a,2)+(a.gb?a.a[4]:a.l[8])|0,c=A(a,c);I(a,4);return c}function Xf(a,c){var d=a.l[0];a.l[0]=a.l[c];a.l[c]=d}
|
|
||||||
function Yf(a,c){var d=a.a[0];a.a[0]=a.a[c];a.a[c]=d}function $f(a,c){192<=a.f&&w(a);var d=a.P(a.f),e=y(a,d),d=y(a,d+2|0);B(a,c,d);a.l[a.f>>2&14]=e}function ag(a,c){192<=a.f&&w(a);var d=a.P(a.f),e=A(a,d),d=y(a,d+4|0);B(a,c,d);a.a[a.f>>3&7]=e}function bg(a,c){var d=a.a[c];a.a[c]=d>>>24|d<<24|d>>8&65280|d<<8&16711680};var X=[],Y=[],Z=[];X[0]=function(a){a.f=C(a);Od(a,le(a,Nd(a),Td(a)))};Y[1]=function(a){a.f=C(a);T(a,me(a,S(a),Vd(a)))};Z[1]=function(a){a.f=C(a);V(a,ne(a,U(a),W(a)))};X[2]=function(a){a.f=C(a);Ud(a,le(a,Td(a),Id(a)))};Y[3]=function(a){a.f=C(a);Xd(a,me(a,Vd(a),R(a)))};Z[3]=function(a){a.f=C(a);Yd(a,ne(a,W(a),Jd(a)))};X[4]=function(a){a.C[0]=le(a,a.C[0],C(a))};Y[5]=function(a){a.l[0]=me(a,a.l[0],E(a))};Z[5]=function(a){a.a[0]=ne(a,a.a[0],H(a))};Y[6]=function(a){O(a,a.R[0])};Z[6]=function(a){N(a,a.R[0])};
|
|
||||||
Y[7]=function(a){B(a,0,y(a,J(a,0)));I(a,2)};Z[7]=function(a){B(a,0,y(a,J(a,0)));I(a,4)};X[8]=function(a){a.f=C(a);Od(a,Ve(a,Nd(a),Td(a)))};Y[9]=function(a){a.f=C(a);T(a,Xe(a,S(a),Vd(a)))};Z[9]=function(a){a.f=C(a);V(a,Ye(a,U(a),W(a)))};X[10]=function(a){a.f=C(a);Ud(a,Ve(a,Td(a),Id(a)))};Y[11]=function(a){a.f=C(a);Xd(a,Xe(a,Vd(a),R(a)))};Z[11]=function(a){a.f=C(a);Yd(a,Ye(a,W(a),Jd(a)))};X[12]=function(a){a.C[0]=Ve(a,a.C[0],C(a))};Y[13]=function(a){a.l[0]=Xe(a,a.l[0],E(a))};
|
|
||||||
Z[13]=function(a){a.a[0]=Ye(a,a.a[0],H(a))};Y[14]=function(a){O(a,a.R[1])};Z[14]=function(a){N(a,a.R[1])};Y[15]=function(a){a.gh[C(a)](a)};Z[15]=function(a){a.hh[C(a)](a)};X[16]=function(a){a.f=C(a);Od(a,oe(a,Nd(a),Td(a)))};Y[17]=function(a){a.f=C(a);T(a,qe(a,S(a),Vd(a)))};Z[17]=function(a){a.f=C(a);V(a,ye(a,U(a),W(a)))};X[18]=function(a){a.f=C(a);Ud(a,oe(a,Td(a),Id(a)))};Y[19]=function(a){a.f=C(a);Xd(a,qe(a,Vd(a),R(a)))};Z[19]=function(a){a.f=C(a);Yd(a,ye(a,W(a),Jd(a)))};
|
|
||||||
X[20]=function(a){a.C[0]=oe(a,a.C[0],C(a))};Y[21]=function(a){a.l[0]=qe(a,a.l[0],E(a))};Z[21]=function(a){a.a[0]=ye(a,a.a[0],H(a))};Y[22]=function(a){O(a,a.R[2])};Z[22]=function(a){N(a,a.R[2])};Y[23]=function(a){B(a,2,y(a,J(a,0)));I(a,2);dd(a);fd(a)};Z[23]=function(a){B(a,2,y(a,J(a,0)));I(a,4);dd(a);fd(a)};X[24]=function(a){a.f=C(a);Od(a,De(a,Nd(a),Td(a)))};Y[25]=function(a){a.f=C(a);T(a,Fe(a,S(a),Vd(a)))};Z[25]=function(a){a.f=C(a);V(a,Ge(a,U(a),W(a)))};
|
|
||||||
X[26]=function(a){a.f=C(a);Ud(a,De(a,Td(a),Id(a)))};Y[27]=function(a){a.f=C(a);Xd(a,Fe(a,Vd(a),R(a)))};Z[27]=function(a){a.f=C(a);Yd(a,Ge(a,W(a),Jd(a)))};X[28]=function(a){a.C[0]=De(a,a.C[0],C(a))};Y[29]=function(a){a.l[0]=Fe(a,a.l[0],E(a))};Z[29]=function(a){a.a[0]=Ge(a,a.a[0],H(a))};Y[30]=function(a){O(a,a.R[3])};Z[30]=function(a){N(a,a.R[3])};Y[31]=function(a){B(a,3,y(a,J(a,0)));I(a,2)};Z[31]=function(a){B(a,3,y(a,J(a,0)));I(a,4)};X[32]=function(a){a.f=C(a);Od(a,Re(a,Nd(a),Td(a)))};
|
|
||||||
Y[33]=function(a){a.f=C(a);T(a,Te(a,S(a),Vd(a)))};Z[33]=function(a){a.f=C(a);V(a,Ue(a,U(a),W(a)))};X[34]=function(a){a.f=C(a);Ud(a,Re(a,Td(a),Id(a)))};Y[35]=function(a){a.f=C(a);Xd(a,Te(a,Vd(a),R(a)))};Z[35]=function(a){a.f=C(a);Yd(a,Ue(a,W(a),Jd(a)))};X[36]=function(a){a.C[0]=Re(a,a.C[0],C(a))};Y[37]=function(a){a.l[0]=Te(a,a.l[0],E(a))};Z[37]=function(a){a.a[0]=Ue(a,a.a[0],H(a))};X[38]=function(a){a.ya=0;gd(a);a.ya=-1};
|
|
||||||
X[39]=function(a){var c=a.C[0],d=a.Pa(),e=td(a);a.h&=-18;if(9<(c&15)||e)a.C[0]+=6,a.h|=16;if(153<c||d)a.C[0]+=96,a.h|=1;a.F=a.C[0];a.T=7;a.Va=a.Wa=0;a.u=196};X[40]=function(a){a.f=C(a);Od(a,ze(a,Nd(a),Td(a)))};Y[41]=function(a){a.f=C(a);T(a,Be(a,S(a),Vd(a)))};Z[41]=function(a){a.f=C(a);V(a,Ce(a,U(a),W(a)))};X[42]=function(a){a.f=C(a);Ud(a,ze(a,Td(a),Id(a)))};Y[43]=function(a){a.f=C(a);Xd(a,Be(a,Vd(a),R(a)))};Z[43]=function(a){a.f=C(a);Yd(a,Ce(a,W(a),Jd(a)))};X[44]=function(a){a.C[0]=ze(a,a.C[0],C(a))};
|
|
||||||
Y[45]=function(a){a.l[0]=Be(a,a.l[0],E(a))};Z[45]=function(a){a.a[0]=Ce(a,a.a[0],H(a))};X[46]=function(a){a.ya=1;gd(a);a.ya=-1};X[47]=function(a){var c=a.C[0],d=a.Pa();a.h&=-2;9<(c&15)||td(a)?(a.C[0]-=6,a.h|=16,a.h=a.h&-2|d|a.C[0]>>7):a.h&=-17;if(153<c||d)a.C[0]-=96,a.h|=1;a.F=a.C[0];a.T=7;a.Va=a.Wa=0;a.u=196};X[48]=function(a){a.f=C(a);Od(a,Ze(a,Nd(a),Td(a)))};Y[49]=function(a){a.f=C(a);T(a,af(a,S(a),Vd(a)))};Z[49]=function(a){a.f=C(a);V(a,bf(a,U(a),W(a)))};
|
|
||||||
X[50]=function(a){a.f=C(a);Ud(a,Ze(a,Td(a),Id(a)))};Y[51]=function(a){a.f=C(a);Xd(a,af(a,Vd(a),R(a)))};Z[51]=function(a){a.f=C(a);Yd(a,bf(a,W(a),Jd(a)))};X[52]=function(a){a.C[0]=Ze(a,a.C[0],C(a))};Y[53]=function(a){a.l[0]=af(a,a.l[0],E(a))};Z[53]=function(a){a.a[0]=bf(a,a.a[0],H(a))};X[54]=function(a){a.ya=2;gd(a);a.ya=-1};X[55]=function(a){9<(a.C[0]&15)||td(a)?(a.l[0]+=6,a.C[1]+=1,a.h|=17):a.h&=-18;a.C[0]&=15;a.u&=-18};X[56]=function(a){a.f=C(a);var c=Id(a);Ae(a,c,Td(a),7)};
|
|
||||||
Y[57]=function(a){a.f=C(a);var c=R(a);Ae(a,c,Vd(a),15)};Z[57]=function(a){a.f=C(a);var c=Jd(a);Ae(a,c,W(a),31)};X[58]=function(a){a.f=C(a);var c=Id(a);Ae(a,Td(a),c,7)};Y[59]=function(a){a.f=C(a);var c=R(a);Ae(a,Vd(a),c,15)};Z[59]=function(a){a.f=C(a);var c=Jd(a);Ae(a,W(a),c,31)};X[60]=function(a){var c=C(a);Ae(a,a.C[0],c,7)};Y[61]=function(a){var c=E(a);Ae(a,a.l[0],c,15)};Z[61]=function(a){var c=H(a);Ae(a,a.a[0],c,31)};X[62]=function(a){a.ya=3;gd(a);a.ya=-1};
|
|
||||||
X[63]=function(a){9<(a.C[0]&15)||td(a)?(a.l[0]-=6,--a.C[1],a.h|=17):a.h&=-18;a.C[0]&=15;a.u&=-18};Y[64]=function(a){a.l[0]=He(a,a.l[0],15)};Z[64]=function(a){a.a[0]=He(a,a.a[0],31)};Y[65]=function(a){a.l[2]=He(a,a.l[2],15)};Z[65]=function(a){a.a[1]=He(a,a.a[1],31)};Y[66]=function(a){a.l[4]=He(a,a.l[4],15)};Z[66]=function(a){a.a[2]=He(a,a.a[2],31)};Y[67]=function(a){a.l[6]=He(a,a.l[6],15)};Z[67]=function(a){a.a[3]=He(a,a.a[3],31)};Y[68]=function(a){a.l[8]=He(a,a.l[8],15)};
|
|
||||||
Z[68]=function(a){a.a[4]=He(a,a.a[4],31)};Y[69]=function(a){a.l[10]=He(a,a.l[10],15)};Z[69]=function(a){a.a[5]=He(a,a.a[5],31)};Y[70]=function(a){a.l[12]=He(a,a.l[12],15)};Z[70]=function(a){a.a[6]=He(a,a.a[6],31)};Y[71]=function(a){a.l[14]=He(a,a.l[14],15)};Z[71]=function(a){a.a[7]=He(a,a.a[7],31)};Y[72]=function(a){a.l[0]=Ie(a,a.l[0],15)};Z[72]=function(a){a.a[0]=Ie(a,a.a[0],31)};Y[73]=function(a){a.l[2]=Ie(a,a.l[2],15)};Z[73]=function(a){a.a[1]=Ie(a,a.a[1],31)};
|
|
||||||
Y[74]=function(a){a.l[4]=Ie(a,a.l[4],15)};Z[74]=function(a){a.a[2]=Ie(a,a.a[2],31)};Y[75]=function(a){a.l[6]=Ie(a,a.l[6],15)};Z[75]=function(a){a.a[3]=Ie(a,a.a[3],31)};Y[76]=function(a){a.l[8]=Ie(a,a.l[8],15)};Z[76]=function(a){a.a[4]=Ie(a,a.a[4],31)};Y[77]=function(a){a.l[10]=Ie(a,a.l[10],15)};Z[77]=function(a){a.a[5]=Ie(a,a.a[5],31)};Y[78]=function(a){a.l[12]=Ie(a,a.l[12],15)};Z[78]=function(a){a.a[6]=Ie(a,a.a[6],31)};Y[79]=function(a){a.l[14]=Ie(a,a.l[14],15)};
|
|
||||||
Z[79]=function(a){a.a[7]=Ie(a,a.a[7],31)};Y[80]=function(a){O(a,a.l[0])};Z[80]=function(a){N(a,a.a[0])};Y[81]=function(a){O(a,a.l[2])};Z[81]=function(a){N(a,a.a[1])};Y[82]=function(a){O(a,a.l[4])};Z[82]=function(a){N(a,a.a[2])};Y[83]=function(a){O(a,a.l[6])};Z[83]=function(a){N(a,a.a[3])};Y[84]=function(a){O(a,a.l[8])};Z[84]=function(a){N(a,a.a[4])};Y[85]=function(a){O(a,a.l[10])};Z[85]=function(a){N(a,a.a[5])};Y[86]=function(a){O(a,a.l[12])};Z[86]=function(a){N(a,a.a[6])};Y[87]=function(a){O(a,a.l[14])};
|
|
||||||
Z[87]=function(a){N(a,a.a[7])};Y[88]=function(a){a.l[0]=Vf(a)};Z[88]=function(a){a.a[0]=Wf(a)};Y[89]=function(a){a.l[2]=Vf(a)};Z[89]=function(a){a.a[1]=Wf(a)};Y[90]=function(a){a.l[4]=Vf(a)};Z[90]=function(a){a.a[2]=Wf(a)};Y[91]=function(a){a.l[6]=Vf(a)};Z[91]=function(a){a.a[3]=Wf(a)};Y[92]=function(a){a.l[8]=Vf(a)};Z[92]=function(a){a.a[4]=Wf(a)};Y[93]=function(a){a.l[10]=Vf(a)};Z[93]=function(a){a.a[5]=Wf(a)};Y[94]=function(a){a.l[12]=Vf(a)};Z[94]=function(a){a.a[6]=Wf(a)};
|
|
||||||
Y[95]=function(a){a.l[14]=Vf(a)};Z[95]=function(a){a.a[7]=Wf(a)};Y[96]=function(a){var c=a.l[8];nd(a,J(a,-15));O(a,a.l[0]);O(a,a.l[2]);O(a,a.l[4]);O(a,a.l[6]);O(a,c);O(a,a.l[10]);O(a,a.l[12]);O(a,a.l[14])};Z[96]=function(a){var c=a.a[4];nd(a,J(a,-31));N(a,a.a[0]);N(a,a.a[1]);N(a,a.a[2]);N(a,a.a[3]);N(a,c);N(a,a.a[5]);N(a,a.a[6]);N(a,a.a[7])};Y[97]=function(a){jd(a,J(a,15));a.l[14]=Vf(a);a.l[12]=Vf(a);a.l[10]=Vf(a);I(a,2);a.l[6]=Vf(a);a.l[4]=Vf(a);a.l[2]=Vf(a);a.l[0]=Vf(a)};
|
|
||||||
Z[97]=function(a){jd(a,J(a,31));a.a[7]=Wf(a);a.a[6]=Wf(a);a.a[5]=Wf(a);I(a,4);a.a[3]=Wf(a);a.a[2]=Wf(a);a.a[1]=Wf(a);a.a[0]=Wf(a)};X[98]=function(){};X[99]=function(a){a.f=C(a);if(a.qa&&!rd(a)){var c;c=S(a);var d=a.f>>2&14;a.u&=-65;(c&3)<(a.l[d]&3)?(a.h|=64,c=c&-4|a.l[d]&3):a.h&=-65;T(a,c)}else w(a)};X[100]=function(a){a.ya=4;gd(a);a.ya=-1};X[101]=function(a){a.ya=5;gd(a);a.ya=-1};X[102]=function(a){a.Da=!a.Na;ad(a);gd(a);a.Da=a.Na;ad(a)};X[103]=function(a){a.la=!a.Na;$c(a);gd(a);a.la=a.Na;$c(a)};
|
|
||||||
Y[104]=function(a){O(a,E(a))};Z[104]=function(a){N(a,H(a))};Y[105]=function(a){a.f=C(a);Xd(a,Ke(a,R(a)<<16>>16,E(a)<<16>>16))};Z[105]=function(a){a.f=C(a);Yd(a,Oe(a,Jd(a),H(a)))};Y[106]=function(a){O(a,D(a))};Z[106]=function(a){N(a,D(a))};Y[107]=function(a){a.f=C(a);Xd(a,Ke(a,R(a)<<16>>16,D(a)))};Z[107]=function(a){a.f=C(a);Yd(a,Oe(a,Jd(a),D(a)))};X[108]=function(a){fe(a)};Y[109]=function(a){ge(a)};Z[109]=function(a){he(a)};X[110]=function(a){ie(a)};Y[111]=function(a){je(a)};Z[111]=function(a){ke(a)};
|
|
||||||
X[112]=function(a){Lf(a,a.qb())};X[113]=function(a){Lf(a,!a.qb())};X[114]=function(a){Lf(a,a.hb())};X[115]=function(a){Lf(a,!a.hb())};X[116]=function(a){Lf(a,a.jb())};X[117]=function(a){Lf(a,!a.jb())};X[118]=function(a){Lf(a,Sf(a))};X[119]=function(a){Lf(a,!Sf(a))};X[120]=function(a){Lf(a,a.rb())};X[121]=function(a){Lf(a,!a.rb())};X[122]=function(a){Lf(a,a.ib())};X[123]=function(a){Lf(a,!a.ib())};X[124]=function(a){Lf(a,Tf(a))};X[125]=function(a){Lf(a,!Tf(a))};X[126]=function(a){Lf(a,Uf(a))};
|
|
||||||
X[127]=function(a){Lf(a,!Uf(a))};X[128]=function(a){a.f=C(a);switch(a.f>>3&7){case 0:Od(a,le(a,Nd(a),C(a)));break;case 1:Od(a,Ve(a,Nd(a),C(a)));break;case 2:Od(a,oe(a,Nd(a),C(a)));break;case 3:Od(a,De(a,Nd(a),C(a)));break;case 4:Od(a,Re(a,Nd(a),C(a)));break;case 5:Od(a,ze(a,Nd(a),C(a)));break;case 6:Od(a,Ze(a,Nd(a),C(a)));break;case 7:var c=Id(a),d=C(a);Ae(a,c,d,7)}};
|
|
||||||
Y[129]=function(a){a.f=C(a);switch(a.f>>3&7){case 0:T(a,me(a,S(a),E(a)));break;case 1:T(a,Xe(a,S(a),E(a)));break;case 2:T(a,qe(a,S(a),E(a)));break;case 3:T(a,Fe(a,S(a),E(a)));break;case 4:T(a,Te(a,S(a),E(a)));break;case 5:T(a,Be(a,S(a),E(a)));break;case 6:T(a,af(a,S(a),E(a)));break;case 7:var c=R(a),d=E(a);Ae(a,c,d,15)}};
|
|
||||||
Z[129]=function(a){a.f=C(a);switch(a.f>>3&7){case 0:V(a,ne(a,U(a),H(a)));break;case 1:V(a,Ye(a,U(a),H(a)));break;case 2:V(a,ye(a,U(a),H(a)));break;case 3:V(a,Ge(a,U(a),H(a)));break;case 4:V(a,Ue(a,U(a),H(a)));break;case 5:V(a,Ce(a,U(a),H(a)));break;case 6:V(a,bf(a,U(a),H(a)));break;case 7:var c=Jd(a),d=H(a);Ae(a,c,d,31)}};X[130]=function(a){a.table[128](a)};
|
|
||||||
Y[131]=function(a){a.f=C(a);switch(a.f>>3&7){case 0:T(a,me(a,S(a),D(a)));break;case 1:T(a,Xe(a,S(a),D(a)));break;case 2:T(a,qe(a,S(a),D(a)));break;case 3:T(a,Fe(a,S(a),D(a)));break;case 4:T(a,Te(a,S(a),D(a)));break;case 5:T(a,Be(a,S(a),D(a)));break;case 6:T(a,af(a,S(a),D(a)));break;case 7:var c=R(a),d=D(a);Ae(a,c,d,15)}};
|
|
||||||
Z[131]=function(a){a.f=C(a);switch(a.f>>3&7){case 0:V(a,ne(a,U(a),D(a)));break;case 1:V(a,Ye(a,U(a),D(a)));break;case 2:V(a,ye(a,U(a),D(a)));break;case 3:V(a,Ge(a,U(a),D(a)));break;case 4:V(a,Ue(a,U(a),D(a)));break;case 5:V(a,Ce(a,U(a),D(a)));break;case 6:V(a,bf(a,U(a),D(a)));break;case 7:var c=Jd(a),d=D(a);Ae(a,c,d,31)}};X[132]=function(a){a.f=C(a);var c=Id(a);Se(a,c,Td(a),7)};Y[133]=function(a){a.f=C(a);var c=R(a);Se(a,c,Vd(a),15)};Z[133]=function(a){a.f=C(a);var c=Jd(a);Se(a,c,W(a),31)};
|
|
||||||
X[134]=function(a){a.f=C(a);var c=Nd(a),d=a.f,d=d>>1&12|d>>5&1,e=a.C[d];a.C[d]=c;Od(a,e)};Y[135]=function(a){a.f=C(a);var c=S(a),d=a.f>>2&14,e=a.l[d];a.l[d]=c;T(a,e)};Z[135]=function(a){a.f=C(a);var c=U(a),d=a.f>>3&7,e=a.a[d];a.a[d]=c;V(a,e)};X[136]=function(a){a.f=C(a);Kd(a,Td(a))};Y[137]=function(a){a.f=C(a);Ld(a,Vd(a))};Z[137]=function(a){a.f=C(a);Md(a,W(a))};X[138]=function(a){a.f=C(a);var c=Id(a);Ud(a,c)};Y[139]=function(a){a.f=C(a);var c=R(a);Xd(a,c)};
|
|
||||||
Z[139]=function(a){a.f=C(a);var c=Jd(a);Yd(a,c)};Y[140]=function(a){a.f=C(a);Ld(a,a.R[a.f>>3&7])};Z[140]=function(a){a.f=C(a);Md(a,a.R[a.f>>3&7])};Y[141]=function(a){a.f=C(a);192<=a.f&&w(a);var c=a.f>>3&7;a.ya=9;a.l[c<<1]=a.P(a.f);a.ya=-1};Z[141]=function(a){a.f=C(a);192<=a.f&&w(a);var c=a.f>>3&7;a.ya=9;a.a[c]=a.P(a.f);a.ya=-1};X[142]=function(a){a.f=C(a);var c=a.f>>3&7,d=R(a);B(a,c,d);2===c&&(dd(a),fd(a))};
|
|
||||||
Y[143]=function(a){a.f=C(a);var c=y(a,J(a,0));I(a,2);if(192>a.f){var d=a.P(a.f);I(a,-2);mb(a,d,c);I(a,2)}else Qd(a,c)};Z[143]=function(a){a.f=C(a);var c=A(a,J(a,0));I(a,4);if(192>a.f){var d=a.P(a.f);I(a,-4);x(a,d,c);I(a,4)}else Sd(a,c)};X[144]=function(){};Y[145]=function(a){Xf(a,2)};Z[145]=function(a){Yf(a,1)};Y[146]=function(a){Xf(a,4)};Z[146]=function(a){Yf(a,2)};Y[147]=function(a){Xf(a,6)};Z[147]=function(a){Yf(a,3)};Y[148]=function(a){Xf(a,8)};Z[148]=function(a){Yf(a,4)};
|
|
||||||
Y[149]=function(a){Xf(a,10)};Z[149]=function(a){Yf(a,5)};Y[150]=function(a){Xf(a,12)};Z[150]=function(a){Yf(a,6)};Y[151]=function(a){Xf(a,14)};Z[151]=function(a){Yf(a,7)};Y[152]=function(a){a.l[0]=a.be[0]};Z[152]=function(a){a.a[0]=a.yc[0]};Y[153]=function(a){a.l[4]=a.yc[0]>>15};Z[153]=function(a){a.a[2]=a.a[0]>>31};Y[154]=function(a){var c=E(a),d=E(a),e=a.R[1],f=xd(a);lb(a,J(a,-4),4);B(a,1,d);O(a,e);O(a,f);a.w=K(a,1)+c|0;a.la||xd(a)};
|
|
||||||
Z[154]=function(a){var c=H(a),d=E(a);if((!a.qa||rd(a))&&c&4294901760)throw a.debug.S("#GP handler");var e=a.R[1],f=xd(a);lb(a,J(a,-8),8);B(a,1,d);N(a,e);N(a,f);a.w=K(a,1)+c|0;a.la||xd(a)};X[155]=function(a){10===(a.G[0]&10)&&(a.w=a.ga,Fd(a,7))};Y[156]=function(a){a.h&131072&&3>qd(a)?M(a,0):(ud(a),O(a,a.h))};Z[156]=function(a){a.h&131072&&3>qd(a)?M(a,0):(ud(a),N(a,a.h&16580607))};Y[157]=function(a){a.h&131072&&3>qd(a)&&M(a,0);vd(a,a.h&-65536|Vf(a));Fc(a)};
|
|
||||||
Z[157]=function(a){a.h&131072&&3>qd(a)&&M(a,0);vd(a,Wf(a));Fc(a)};X[158]=function(a){a.h=a.h&-256|a.C[1];a.h=a.h&4161493|2;a.u=0};X[159]=function(a){ud(a);a.C[1]=a.h};X[160]=function(a){var c=ld(a,od(a));a.C[0]=c};Y[161]=function(a){var c=y(a,od(a));a.l[0]=c};Z[161]=function(a){var c=A(a,od(a));a.a[0]=c};X[162]=function(a){md(a,od(a),a.C[0])};Y[163]=function(a){mb(a,od(a),a.l[0])};Z[163]=function(a){x(a,od(a),a.a[0])};
|
|
||||||
X[164]=function(a){var c=pd(a,3)+a.j[a.I]|0,d=K(a,0)+a.j[a.B]|0,e=a.h&1024?-1:1;if(0!==a.ca){var f=a.j[a.M]>>>0;if(f){var h=f,r=4096,k=jd(a,c),t=nd(a,d);a.X&&(r=ee(e,c,d));do a.memory.sa(t,a.memory.da(k)),t+=e,k+=e,c=!!--f;while(c&&r--);e=e*(h-f)|0;a.j[a.B]+=e;a.j[a.I]+=e;a.j[a.M]=f;a.V+=h-f;c&&(a.w=a.ga)}}else md(a,d,ld(a,c)),a.j[a.B]+=e,a.j[a.I]+=e};
|
|
||||||
Y[165]=function(a){var c=pd(a,3)+a.j[a.I]|0,d=K(a,0)+a.j[a.B]|0,e=a.h&1024?-2:2;if(0!==a.ca){var f=a.j[a.M]>>>0;if(f){var h,r=f,k=4096;if(d&1||c&1){do mb(a,d,y(a,c)),d+=e,a.j[a.B]+=e,c+=e,a.j[a.I]+=e,h=!!--a.j[a.M];while(h&&k--)}else{var t=0>e?-1:1,u=jd(a,c)>>1,z=nd(a,d)>>1;a.X&&(k=ee(e,c,d));do mc(a.memory,z,kc(a.memory,u)),z+=t,u+=t,h=!!--f;while(h&&k--);c=e*(r-f)|0;a.j[a.B]+=c;a.j[a.I]+=c;a.j[a.M]=f;a.V+=r-f}h&&(a.w=a.ga)}}else mb(a,d,y(a,c)),a.j[a.B]+=e,a.j[a.I]+=e};
|
|
||||||
Z[165]=function(a){a:{if(0!==a.ca){var c=pd(a,3)+a.j[a.I]|0,d=K(a,0)+a.j[a.B]|0,e=a.j[a.M]>>>0;if(!e)break a;var f=a.X?4095:3;if(!(d&f||c&f||a.h&1024||(f=!1,a.X&&(c=jd(a,c),d=nd(a,d),1024<e&&(e=1024,f=!0)),Da(a.A,c,e)||Da(a.A,d,e)))){var h=e<<2;a.j[a.M]-=e;a.j[a.B]+=h;a.j[a.I]+=h;c>>=2;a.memory.Hb.set(a.memory.Hb.subarray(c,c+e),d>>2);f&&(a.w=a.ga);break a}}c=pd(a,3)+a.j[a.I]|0;d=K(a,0)+a.j[a.B]|0;h=a.h&1024?-4:4;if(0!==a.ca){if(e=a.j[a.M]>>>0){var r=e,k=4096;if(d&3||c&3){do x(a,d,A(a,c)),d+=h,a.j[a.B]+=
|
|
||||||
h,c+=h,a.j[a.I]+=h,f=!!--a.j[a.M];while(f&&k--)}else{var t=0>h?-1:1,u=jd(a,c)>>>2,z=nd(a,d)>>>2;a.X&&(k=ee(h,c,d));do nc(a.memory,z,lc(a.memory,u)),z+=t,u+=t,f=!!--e;while(f&&k--);h=h*(r-e)|0;a.j[a.B]+=h;a.j[a.I]+=h;a.j[a.M]=e;a.V+=r-e}f&&(a.w=a.ga)}}else x(a,d,A(a,c)),a.j[a.B]+=h,a.j[a.I]+=h}};
|
|
||||||
X[166]=function(a){a:{var c=pd(a,3)+a.j[a.I]|0,d=K(a,0)+a.j[a.B]|0,e=a.h&1024?-1:1;if(0!==a.ca){var f=a.j[a.M]>>>0;if(!f)break a;var h,r=f,k=2===a.ca,t=4096,u=jd(a,c),z=jd(a,d);a.X&&(t=ee(e,c,d));do d=a.memory.da(z),c=a.memory.da(u),z+=e,u+=e,h=!!--f&&c===d===k;while(h&&t--);e=e*(r-f)|0;a.j[a.B]+=e;a.j[a.I]+=e;a.j[a.M]=f;a.V+=r-f;h&&(a.w=a.ga)}else c=ld(a,c),d=ld(a,d),a.j[a.B]+=e,a.j[a.I]+=e;Ae(a,c,d,7)}};
|
|
||||||
Y[167]=function(a){a:{var c=pd(a,3)+a.j[a.I]|0,d=K(a,0)+a.j[a.B]|0,e,f,h=a.h&1024?-2:2;if(0!==a.ca){var r=a.j[a.M]>>>0;if(!r)break a;var k,t=r,u=2===a.ca,z=4096;if(d&1||c&1){do f=y(a,d),e=y(a,c),d+=h,a.j[a.B]+=h,c+=h,a.j[a.I]+=h,k=!!--a.j[a.M]&&e===f===u;while(k&&z--)}else{var G=0>h?-1:1,F=jd(a,c)>>1,L=jd(a,d)>>1;a.X&&(z=ee(h,c,d));do f=kc(a.memory,L),e=kc(a.memory,F),L+=G,F+=G,k=!!--r&&e===f===u;while(k&&z--);c=h*(t-r)|0;a.j[a.B]+=c;a.j[a.I]+=c;a.j[a.M]=r;a.V+=t-r}k&&(a.w=a.ga)}else f=y(a,d),e=y(a,
|
|
||||||
c),a.j[a.B]+=h,a.j[a.I]+=h;Ae(a,e,f,15)}};
|
|
||||||
Z[167]=function(a){a:{var c=pd(a,3)+a.j[a.I]|0,d=K(a,0)+a.j[a.B]|0,e,f,h=a.h&1024?-4:4;if(0!==a.ca){var r=a.j[a.M]>>>0;if(!r)break a;var k,t=r,u=2===a.ca,z=4096;if(d&3||c&3){do f=A(a,d),e=A(a,c),d+=h,a.j[a.B]+=h,c+=h,a.j[a.I]+=h,k=!!--a.j[a.M]&&e===f===u;while(k&&z--)}else{var G=0>h?-1:1,F=jd(a,c)>>>2,L=jd(a,d)>>>2;a.X&&(z=ee(h,c,d));do f=lc(a.memory,L),e=lc(a.memory,F),L+=G,F+=G,k=!!--r&&e===f===u;while(k&&z--);c=h*(t-r)|0;a.j[a.B]+=c;a.j[a.I]+=c;a.j[a.M]=r;a.V+=t-r}k&&(a.w=a.ga)}else f=A(a,d),e=
|
|
||||||
A(a,c),a.j[a.B]+=h,a.j[a.I]+=h;Ae(a,e,f,31)}};X[168]=function(a){var c=C(a);Se(a,a.C[0],c,7)};Y[169]=function(a){var c=E(a);Se(a,a.l[0],c,15)};Z[169]=function(a){var c=H(a);Se(a,a.a[0],c,31)};X[170]=function(a){var c=a.C[0],d=K(a,0)+a.j[a.B]|0,e=a.h&1024?-1:1;if(0!==a.ca){var f=a.j[a.M]>>>0;if(f){var h=f,r=4096,k=nd(a,d);a.X&&(r=de(e,d));do a.memory.sa(k,c),k+=e,d=!!--f;while(d&&r--);a.j[a.B]+=e*(h-f)|0;a.j[a.M]=f;a.V+=h-f;d&&(a.w=a.ga)}}else md(a,d,c),a.j[a.B]+=e};
|
|
||||||
Y[171]=function(a){var c=a.l[0],d=K(a,0)+a.j[a.B]|0,e=a.h&1024?-2:2;if(0!==a.ca){var f=a.j[a.M]>>>0;if(f){var h,r=f,k=4096;if(d&1){do mb(a,d,c),d+=e,a.j[a.B]+=e,h=!!--a.j[a.M];while(h&&k--)}else{var t=0>e?-1:1,u=nd(a,d)>>1;a.X&&(k=de(e,d));do mc(a.memory,u,c),u+=t,h=!!--f;while(h&&k--);a.j[a.B]+=e*(r-f)|0;a.j[a.M]=f;a.V+=r-f}h&&(a.w=a.ga)}}else mb(a,d,c),a.j[a.B]+=e};
|
|
||||||
Z[171]=function(a){var c=a.a[0],d=K(a,0)+a.j[a.B]|0,e=a.h&1024?-4:4;if(0!==a.ca){var f=a.j[a.M]>>>0;if(f){var h,r=f,k=4096;if(d&3){do x(a,d,c),d+=e,a.j[a.B]+=e,h=!!--a.j[a.M];while(h&&k--)}else{var t=0>e?-1:1,u=nd(a,d)>>>2;a.X&&(k=de(e,d));do nc(a.memory,u,c),u+=t,h=!!--f;while(h&&k--);a.j[a.B]+=e*(r-f)|0;a.j[a.M]=f;a.V+=r-f}h&&(a.w=a.ga)}}else x(a,d,c),a.j[a.B]+=e};
|
|
||||||
X[172]=function(a){var c=pd(a,3)+a.j[a.I]|0,d=a.h&1024?-1:1;if(0!==a.ca){var e=a.j[a.M]>>>0;if(e){var f=e,h=4096,r=jd(a,c);a.X&&(h=de(d,c));do a.C[0]=a.memory.da(r),r+=d,c=!!--e;while(c&&h--);a.j[a.I]+=d*(f-e)|0;a.j[a.M]=e;a.V+=f-e;c&&(a.w=a.ga)}}else a.C[0]=ld(a,c),a.j[a.I]+=d};Y[173]=function(a){var c=pd(a,3)+a.j[a.I]|0,d=a.h&1024?-2:2;if(0!==a.ca){if(a.j[a.M]>>>0){var e,f=4096;do a.l[0]=y(a,c),c+=d,a.j[a.I]+=d,e=!!--a.j[a.M];while(e&&f--);e&&(a.w=a.ga)}}else a.l[0]=y(a,c),a.j[a.I]+=d};
|
|
||||||
Z[173]=function(a){var c=pd(a,3)+a.j[a.I]|0,d=a.h&1024?-4:4;if(0!==a.ca){if(a.j[a.M]>>>0){var e,f=4096;do a.a[0]=A(a,c),c+=d,a.j[a.I]+=d,e=!!--a.j[a.M];while(e&&f--);e&&(a.w=a.ga)}}else a.a[0]=A(a,c),a.j[a.I]+=d};
|
|
||||||
X[174]=function(a){a:{var c=K(a,0)+a.j[a.B]|0,d=a.h&1024?-1:1,e=a.C[0];if(0!==a.ca){var f=a.j[a.M]>>>0;if(!f)break a;var h,r=f,k=2===a.ca,t=4096,u=jd(a,c);a.X&&(t=de(d,c));do c=a.memory.da(u),u+=d,h=!!--f&&e===c===k;while(h&&t--);a.j[a.B]+=d*(r-f)|0;a.j[a.M]=f;a.V+=r-f;h&&(a.w=a.ga)}else c=ld(a,c),a.j[a.B]+=d;Ae(a,e,c,7)}};
|
|
||||||
Y[175]=function(a){a:{var c=K(a,0)+a.j[a.B]|0,d=a.h&1024?-2:2,e,f=a.l[0];if(0!==a.ca){var h=a.j[a.M]>>>0;if(!h)break a;var r,k=h,t=2===a.ca,u=4096;if(c&1){do e=y(a,c),c+=d,a.j[a.B]+=d,r=!!--a.j[a.M]&&f===e===t;while(r&&u--)}else{var z=0>d?-1:1,G=jd(a,c)>>1;a.X&&(u=de(d,c));do e=kc(a.memory,G),G+=z,r=!!--h&&f===e===t;while(r&&u--);a.j[a.B]+=d*(k-h)|0;a.j[a.M]=h;a.V+=k-h}r&&(a.w=a.ga)}else e=y(a,c),a.j[a.B]+=d;Ae(a,f,e,15)}};
|
|
||||||
Z[175]=function(a){a:{var c=K(a,0)+a.j[a.B]|0,d=a.h&1024?-4:4,e,f=a.a[0];if(0!==a.ca){var h=a.j[a.M]>>>0;if(!h)break a;var r,k=h,t=2===a.ca,u=4096;if(c&3){do e=A(a,c),c+=d,a.j[a.B]+=d,r=!!--a.j[a.M]&&f===e===t;while(r&&u--)}else{var z=0>d?-1:1,G=jd(a,c)>>>2;a.X&&(u=de(d,c));do e=lc(a.memory,G),G+=z,r=!!--h&&f===e===t;while(r&&u--);a.j[a.B]+=d*(k-h)|0;a.j[a.M]=h;a.V+=k-h}r&&(a.w=a.ga)}else e=A(a,c),a.j[a.B]+=d;Ae(a,f,e,31)}};X[176]=function(a){a.C[0]=C(a)};X[177]=function(a){a.C[4]=C(a)};
|
|
||||||
X[178]=function(a){a.C[8]=C(a)};X[179]=function(a){a.C[12]=C(a)};X[180]=function(a){a.C[1]=C(a)};X[181]=function(a){a.C[5]=C(a)};X[182]=function(a){a.C[9]=C(a)};X[183]=function(a){a.C[13]=C(a)};Y[184]=function(a){a.l[0]=E(a)};Z[184]=function(a){a.a[0]=H(a)};Y[185]=function(a){a.l[2]=E(a)};Z[185]=function(a){a.a[1]=H(a)};Y[186]=function(a){a.l[4]=E(a)};Z[186]=function(a){a.a[2]=H(a)};Y[187]=function(a){a.l[6]=E(a)};Z[187]=function(a){a.a[3]=H(a)};Y[188]=function(a){a.l[8]=E(a)};
|
|
||||||
Z[188]=function(a){a.a[4]=H(a)};Y[189]=function(a){a.l[10]=E(a)};Z[189]=function(a){a.a[5]=H(a)};Y[190]=function(a){a.l[12]=E(a)};Z[190]=function(a){a.a[6]=H(a)};Y[191]=function(a){a.l[14]=E(a)};Z[191]=function(a){a.a[7]=H(a)};X[192]=function(a){a.f=C(a);var c=Nd(a),d=C(a)&31,e=0;switch(a.f>>3&7){case 0:e=cf(a,c,d);break;case 1:e=jf(a,c,d);break;case 2:e=ff(a,c,d);break;case 3:e=mf(a,c,d);break;case 4:e=pf(a,c,d);break;case 5:e=sf(a,c,d);break;case 6:e=pf(a,c,d);break;case 7:e=vf(a,c,d)}Od(a,e)};
|
|
||||||
Y[193]=function(a){a.f=C(a);var c=S(a),d=C(a)&31,e=0;switch(a.f>>3&7){case 0:e=df(a,c,d);break;case 1:e=kf(a,c,d);break;case 2:e=gf(a,c,d);break;case 3:e=nf(a,c,d);break;case 4:e=qf(a,c,d);break;case 5:e=tf(a,c,d);break;case 6:e=qf(a,c,d);break;case 7:e=wf(a,c,d)}T(a,e)};
|
|
||||||
Z[193]=function(a){a.f=C(a);var c=U(a),d=C(a)&31,e=0;switch(a.f>>3&7){case 0:e=ef(a,c,d);break;case 1:e=lf(a,c,d);break;case 2:e=hf(a,c,d);break;case 3:e=of(a,c,d);break;case 4:e=rf(a,c,d);break;case 5:e=uf(a,c,d);break;case 6:e=rf(a,c,d);break;case 7:e=xf(a,c,d)}V(a,e)};Y[194]=function(a){var c=E(a);a.w=K(a,1)+Vf(a)|0;a.la||xd(a);I(a,c)};Z[194]=function(a){var c=E(a),d=Wf(a);a.w=K(a,1)+d|0;I(a,c)};Y[195]=function(a){a.w=K(a,1)+Vf(a)|0};Z[195]=function(a){var c=Wf(a);a.w=K(a,1)+c|0};
|
|
||||||
Y[196]=function(a){a.f=C(a);$f(a,0)};Z[196]=function(a){a.f=C(a);ag(a,0)};Y[197]=function(a){a.f=C(a);$f(a,3)};Z[197]=function(a){a.f=C(a);ag(a,3)};X[198]=function(a){a.f=C(a);192>a.f?md(a,a.P(a.f),C(a)):a.C[a.f<<2&12|a.f>>2&1]=C(a)};Y[199]=function(a){a.f=C(a);192>a.f?mb(a,a.P(a.f),E(a)):a.l[a.f<<1&14]=E(a)};Z[199]=function(a){a.f=C(a);192>a.f?x(a,a.P(a.f),H(a)):a.a[a.f&7]=H(a)};
|
|
||||||
Y[200]=function(a){var c=E(a),d=C(a),d=d&31;O(a,a.l[10]);var e=a.l[8];if(0<d){for(var f=a.l[5],h=1;h<d;h++)f-=2,O(a,y(a,K(a,2)+f|0));O(a,e)}a.l[10]=e;a.l[8]-=c};Z[200]=function(a){var c=E(a),d=C(a),d=d&31;N(a,a.a[5]);var e=a.a[4];if(0<d){for(var f=a.a[5],h=1;h<d;h++)f-=4,N(a,A(a,K(a,2)+f|0));N(a,e)}a.a[5]=e;a.a[4]-=c};Y[201]=function(a){var c=a.gb?a.a[5]:a.l[10],d=y(a,K(a,2)+c|0);wd(a,c+2|0);a.l[10]=d};Z[201]=function(a){var c=a.gb?a.a[5]:a.l[10],d=A(a,K(a,2)+c|0);wd(a,c+4|0);a.a[5]=d};
|
|
||||||
Y[202]=function(a){var c=E(a),d=y(a,J(a,0)),e=y(a,J(a,2));B(a,1,e);a.w=K(a,1)+d|0;I(a,c+4|0)};Z[202]=function(a){var c=E(a),d=A(a,J(a,0)),e=A(a,J(a,4))&65535;B(a,1,e);a.w=K(a,1)+d|0;a.la||xd(a);I(a,c+8|0)};Y[203]=function(a){var c=y(a,J(a,0)),d=y(a,J(a,2));B(a,1,d);a.w=K(a,1)+c|0;a.la||xd(a);I(a,4)};Z[203]=function(a){var c=A(a,J(a,0)),d=A(a,J(a,4))&65535;B(a,1,d);a.w=K(a,1)+c|0;a.la||xd(a);I(a,8)};X[204]=function(a){Ec(a,3,!0,!1)};X[205]=function(a){var c=C(a);Ec(a,c,!0,!1)};
|
|
||||||
X[206]=function(a){a.td()&&Ec(a,4,!0,!1)};Y[207]=function(a){Ed(a,!0)};Z[207]=function(a){Ed(a,!1)};X[208]=function(a){a.f=C(a);var c=Nd(a),d=0;switch(a.f>>3&7){case 0:d=cf(a,c,1);break;case 1:d=jf(a,c,1);break;case 2:d=ff(a,c,1);break;case 3:d=mf(a,c,1);break;case 4:d=pf(a,c,1);break;case 5:d=sf(a,c,1);break;case 6:d=pf(a,c,1);break;case 7:d=vf(a,c,1)}Od(a,d)};
|
|
||||||
Y[209]=function(a){a.f=C(a);var c=S(a),d=0;switch(a.f>>3&7){case 0:d=df(a,c,1);break;case 1:d=kf(a,c,1);break;case 2:d=gf(a,c,1);break;case 3:d=nf(a,c,1);break;case 4:d=qf(a,c,1);break;case 5:d=tf(a,c,1);break;case 6:d=qf(a,c,1);break;case 7:d=wf(a,c,1)}T(a,d)};
|
|
||||||
Z[209]=function(a){a.f=C(a);var c=U(a),d=0;switch(a.f>>3&7){case 0:d=ef(a,c,1);break;case 1:d=lf(a,c,1);break;case 2:d=hf(a,c,1);break;case 3:d=of(a,c,1);break;case 4:d=rf(a,c,1);break;case 5:d=uf(a,c,1);break;case 6:d=rf(a,c,1);break;case 7:d=xf(a,c,1)}V(a,d)};
|
|
||||||
X[210]=function(a){a.f=C(a);var c=Nd(a),d=a.C[4]&31,e=0;switch(a.f>>3&7){case 0:e=cf(a,c,d);break;case 1:e=jf(a,c,d);break;case 2:e=ff(a,c,d);break;case 3:e=mf(a,c,d);break;case 4:e=pf(a,c,d);break;case 5:e=sf(a,c,d);break;case 6:e=pf(a,c,d);break;case 7:e=vf(a,c,d)}Od(a,e)};
|
|
||||||
Y[211]=function(a){a.f=C(a);var c=S(a),d=a.C[4]&31,e=0;switch(a.f>>3&7){case 0:e=df(a,c,d);break;case 1:e=kf(a,c,d);break;case 2:e=gf(a,c,d);break;case 3:e=nf(a,c,d);break;case 4:e=qf(a,c,d);break;case 5:e=tf(a,c,d);break;case 6:e=qf(a,c,d);break;case 7:e=wf(a,c,d)}T(a,e)};
|
|
||||||
Z[211]=function(a){a.f=C(a);var c=U(a),d=a.C[4]&31,e=0;switch(a.f>>3&7){case 0:e=ef(a,c,d);break;case 1:e=lf(a,c,d);break;case 2:e=hf(a,c,d);break;case 3:e=of(a,c,d);break;case 4:e=rf(a,c,d);break;case 5:e=uf(a,c,d);break;case 6:e=rf(a,c,d);break;case 7:e=xf(a,c,d)}V(a,e)};X[212]=function(a){var c=C(a);if(0===c)Gd(a);else{var d=a.C[0];a.C[1]=d/c;a.C[0]=d%c;a.F=a.C[0];a.u=196;a.h&=-2066}};X[213]=function(a){var c=C(a),c=a.C[0]+a.C[1]*c;a.F=c&255;a.l[0]=a.F;a.T=7;a.u=196;a.h&=-2066;65535<c&&(a.h|=1)};
|
|
||||||
X[214]=function(a){a.C[0]=-a.Pa()};X[215]=function(a){a.C[0]=a.la?ld(a,pd(a,3)+a.a[3]+a.C[0]):ld(a,pd(a,3)+a.l[6]+a.C[0])};X[216]=function(a){a.f=C(a);Hd(a);if(192>a.f){var c=a.Ba,d=a.f,e=a.P(a.f);a=d>>3&7;d=wb(c,e)}else c=a.Ba,d=a.f,a=d>>3&7,d=rb(c,d&7);e=hb(c);switch(a){case 0:c.g[c.b]=e+d;break;case 1:c.g[c.b]=e*d;break;case 2:gb(c,d);break;case 3:gb(c,d);c.pop();break;case 4:c.g[c.b]=e-d;break;case 5:c.g[c.b]=d-e;break;case 6:c.g[c.b]=e/d;break;case 7:c.g[c.b]=d/e}};
|
|
||||||
X[217]=function(a){a.f=C(a);Hd(a);if(192>a.f){var c=a.Ba,d=a.f;a=a.P(a.f);switch(d>>3&7){case 0:a=wb(c,a);c.push(a);break;case 1:db(c);break;case 2:d=hb(c);c.N[0]=d;x(c.s,a,c.Fa[0]);break;case 3:d=hb(c);c.N[0]=d;x(c.s,a,c.Fa[0]);c.pop();break;case 4:nb(c,a);break;case 5:c.K=y(c.s,a);break;case 6:kb(c,a);break;case 7:mb(c.s,a,c.K)}}else switch(c=a.Ba,d=a.f,a=d&7,d>>3&7){case 0:d=rb(c,a);c.push(d);break;case 1:d=rb(c,a);c.g[c.b+a&7]=hb(c);c.g[c.b]=d;break;case 2:switch(a){case 0:break;default:db(c)}break;
|
|
||||||
case 3:db(c);break;case 4:d=hb(c);switch(a){case 0:c.g[c.b]=-d;break;case 1:c.g[c.b]=Math.abs(d);break;case 4:a=d;c.m&=-18177;isNaN(a)?c.m|=17664:0===a?c.m|=16384:0>a&&(c.m|=256);break;case 5:a=d;c.m&=-18177;c.m|=c.sign(0)<<9;c.m=c.o>>c.b&1?c.m|16640:isNaN(a)?c.m|256:0===a?c.m|16384:Infinity===a||-Infinity===a?c.m|1280:c.m|1024;break;default:db(c)}break;case 5:c.push(c.sb[a]);break;case 6:d=hb(c);switch(a){case 0:c.g[c.b]=Math.pow(2,d)-1;break;case 1:c.g[c.b+1&7]=rb(c,1)*Math.log(d)/Math.LN2;c.pop();
|
|
||||||
break;case 2:c.g[c.b]=Math.tan(d);c.push(1);break;case 3:c.g[c.b+1&7]=Math.atan2(rb(c,1),d);c.pop();break;case 4:c.L[0]=hb(c);a=((c.v[7]&127)<<4|c.v[6]>>4)-1023;c.v[7]=63|c.v[7]&128;c.v[6]|=240;c.g[c.b]=a;c.push(c.L[0]);break;case 5:c.g[c.b]=d%rb(c,1);break;case 6:c.b=c.b-1&7;c.m&=-513;break;case 7:c.b=c.b+1&7,c.m&=-513}break;case 7:switch(d=hb(c),a){case 0:c.g[c.b]=d%rb(c,1);break;case 1:c.g[c.b+1&7]=rb(c,1)*Math.log(d+1)/Math.LN2;c.pop();break;case 2:c.g[c.b]=Math.sqrt(d);break;case 3:c.g[c.b]=
|
|
||||||
Math.sin(d);c.push(Math.cos(d));break;case 4:c.g[c.b]=pb(c,d);break;case 5:c.g[c.b]=d*Math.pow(2,qb(rb(c,1)));break;case 6:c.g[c.b]=Math.sin(d);break;case 7:c.g[c.b]=Math.cos(d)}}};
|
|
||||||
X[218]=function(a){a.f=C(a);Hd(a);if(192>a.f){var c=a.Ba,d=a.f,e=a.P(a.f);a=d>>3&7;d=A(c.s,e);e=hb(c);switch(a){case 0:c.g[c.b]=e+d;break;case 1:c.g[c.b]=e*d;break;case 2:gb(c,d);break;case 3:gb(c,d);c.pop();break;case 4:c.g[c.b]=e-d;break;case 5:c.g[c.b]=d-e;break;case 6:c.g[c.b]=e/d;break;case 7:c.g[c.b]=d/e}}else switch(c=a.Ba,a=a.f,d=a&7,a>>3&7){case 0:c.s.hb()&&(c.g[c.b]=rb(c,d),c.o&=~(1<<c.b));break;case 1:c.s.jb()&&(c.g[c.b]=rb(c,d),c.o&=~(1<<c.b));break;case 2:Sf(c.s)&&(c.g[c.b]=rb(c,d),c.o&=
|
|
||||||
~(1<<c.b));break;case 3:c.s.ib()&&(c.g[c.b]=rb(c,d),c.o&=~(1<<c.b));break;case 5:1===d?(a=rb(c,1),gb(c,a),c.pop(),c.pop()):db(c);break;default:db(c)}};
|
|
||||||
X[219]=function(a){a.f=C(a);Hd(a);if(192>a.f){var c=a.Ba,d=a.f;a=a.P(a.f);switch(d>>3&7){case 0:a=A(c.s,a);c.push(a);break;case 2:d=pb(c,hb(c));2147483647>=d&&-2147483648<=d?x(c.s,a,d):(fb(c),x(c.s,a,-2147483648));break;case 3:d=pb(c,hb(c));2147483647>=d&&-2147483648<=d?x(c.s,a,d):(fb(c),x(c.s,a,-2147483648));c.pop();break;case 5:c.push(sb(c,a));break;case 7:lb(c.s,a,10);tb(c,a,0);c.pop();break;default:db(c)}}else switch(c=a.Ba,a=a.f,d=a&7,a>>3&7){case 0:c.s.hb()||(c.g[c.b]=rb(c,d),c.o&=~(1<<c.b));
|
|
||||||
break;case 1:c.s.jb()||(c.g[c.b]=rb(c,d),c.o&=~(1<<c.b));break;case 2:Sf(c.s)||(c.g[c.b]=rb(c,d),c.o&=~(1<<c.b));break;case 3:c.s.ib()||(c.g[c.b]=rb(c,d),c.o&=~(1<<c.b));break;case 4:227===a?jb(c):228!==a&&225!==a&&(226===a?c.m=0:db(c));break;case 5:a=rb(c,d);ib(c,a);break;case 6:ib(c,rb(c,d));break;default:db(c)}};
|
|
||||||
X[220]=function(a){a.f=C(a);Hd(a);if(192>a.f){var c=a.Ba,d=a.f,e=a.P(a.f);a=d>>3&7;d=ub(c,e);e=hb(c);switch(a){case 0:c.g[c.b]=e+d;break;case 1:c.g[c.b]=e*d;break;case 2:gb(c,d);break;case 3:gb(c,d);c.pop();break;case 4:c.g[c.b]=e-d;break;case 5:c.g[c.b]=d-e;break;case 6:c.g[c.b]=e/d;break;case 7:c.g[c.b]=d/e}}else{c=a.Ba;d=a.f;a=d>>3&7;var e=d&7,d=c.b+e&7,e=rb(c,e),f=hb(c);switch(a){case 0:c.g[d]=e+f;break;case 1:c.g[d]=e*f;break;case 2:gb(c,e);break;case 3:gb(c,e);c.pop();break;case 4:c.g[d]=f-
|
|
||||||
e;break;case 5:c.g[d]=e-f;break;case 6:c.g[d]=f/e;break;case 7:c.g[d]=e/f}}};
|
|
||||||
X[221]=function(a){a.f=C(a);Hd(a);if(192>a.f){var c=a.Ba,d=a.f;a=a.P(a.f);switch(d>>3&7){case 0:a=ub(c,a);c.push(a);break;case 1:db(c);break;case 2:vb(c,a);break;case 3:vb(c,a);c.pop();break;case 4:nb(c,a);a+=28;for(d=0;8>d;d++)c.g[d]=sb(c,a),a+=10;break;case 5:db(c);break;case 6:lb(c.s,a,108);kb(c,a);a+=28;for(d=0;8>d;d++)tb(c,a,d-c.b&7),a+=10;jb(c);break;case 7:mb(c.s,a,c.m&-14337|c.b<<11)}}else switch(c=a.Ba,a=a.f,d=a&7,a>>3&7){case 0:c.o|=1<<(c.b+d&7);break;case 2:c.g[c.b+d&7]=hb(c);break;case 3:d&&
|
|
||||||
(c.g[c.b+d&7]=hb(c));c.pop();break;case 4:a=rb(c,d);gb(c,a);break;case 5:a=rb(c,d);gb(c,a);c.pop();break;default:db(c)}};
|
|
||||||
X[222]=function(a){a.f=C(a);Hd(a);if(192>a.f){var c=a.Ba,d=a.f,e=a.P(a.f);a=d>>3&7;d=y(c.s,e)<<16>>16;e=hb(c);switch(a){case 0:c.g[c.b]=e+d;break;case 1:c.g[c.b]=e*d;break;case 2:gb(c,d);break;case 3:gb(c,d);c.pop();break;case 4:c.g[c.b]=e-d;break;case 5:c.g[c.b]=d-e;break;case 6:c.g[c.b]=e/d;break;case 7:c.g[c.b]=d/e}}else{c=a.Ba;d=a.f;a=d>>3&7;var d=d&7,e=c.b+d&7,f=rb(c,d),h=hb(c);switch(a){case 0:c.g[e]=f+h;break;case 1:c.g[e]=f*h;break;case 2:gb(c,f);break;case 3:1===d?(gb(c,c.g[e]),c.pop()):
|
|
||||||
db(c);break;case 4:c.g[e]=h-f;break;case 5:c.g[e]=f-h;break;case 6:c.g[e]=h/f;break;case 7:c.g[e]=f/h}c.pop()}};
|
|
||||||
X[223]=function(a){a.f=C(a);Hd(a);if(192>a.f){var c=a.Ba,d=a.f;a=a.P(a.f);switch(d>>3&7){case 0:a=y(c.s,a)<<16>>16;c.push(a);break;case 1:db(c);break;case 2:d=pb(c,hb(c));32767>=d&&-32768<=d?mb(c.s,a,d):(fb(c),mb(c.s,a,32768));break;case 3:d=pb(c,hb(c));32767>=d&&-32768<=d?mb(c.s,a,d):(fb(c),mb(c.s,a,32768));c.pop();break;case 4:db(c);break;case 5:d=A(c.s,a)>>>0;a=A(c.s,a+4);c.push(d+4294967296*a);break;case 6:db(c);break;case 7:lb(c.s,a,8);var d=pb(c,hb(c)),e,f;0x7fffffffffffffff>d&&-9223372036854775808<=
|
|
||||||
d?(e=d|0,f=d/4294967296|0,!f&&0>d&&(f=-1)):(e=0,f=-2147483648,fb(c));x(c.s,a,e);x(c.s,a+4,f);c.pop()}}else switch(c=a.Ba,a=a.f,d=a&7,a>>3&7){case 4:224===a?c.s.l[0]=c.m&-14337|c.b<<11:db(c);break;case 5:a=rb(c,d);ib(c,a);c.pop();break;case 6:ib(c,rb(c,d));c.pop();break;default:db(c)}};X[224]=function(a){var c=D(a);--a.j[a.M]&&!a.Pb()&&(a.w=a.w+c|0,a.Da||xd(a))};X[225]=function(a){var c=D(a);--a.j[a.M]&&a.Pb()&&(a.w=a.w+c|0,a.Da||xd(a))};X[226]=function(a){a.loop(D(a))};
|
|
||||||
X[227]=function(a){var c=D(a);0===a.j[a.M]&&(a.w=a.w+c|0,a.Da||xd(a))};X[228]=function(a){var c=C(a);Zd(a,c,1);a.C[0]=Ha(a.A,c)};Y[229]=function(a){var c=C(a);Zd(a,c,2);a.l[0]=Ia(a.A,c)};Z[229]=function(a){var c=C(a);Zd(a,c,4);a.a[0]=Ja(a.A,c)};X[230]=function(a){var c=C(a);Zd(a,c,1);Ea(a.A,c,a.C[0])};Y[231]=function(a){var c=C(a);Zd(a,c,2);Fa(a.A,c,a.l[0])};Z[231]=function(a){var c=C(a);Zd(a,c,4);Ga(a.A,c,a.a[0])};Y[232]=function(a){var c=E(a)<<16>>16;O(a,xd(a));Mf(a,c)};
|
|
||||||
Z[232]=function(a){var c=H(a);N(a,xd(a));a.w=a.w+c|0;a.la||xd(a)};Y[233]=function(a){var c=E(a)<<16>>16;Mf(a,c)};Z[233]=function(a){var c=H(a);a.w=a.w+c|0;a.la||xd(a)};Y[234]=function(a){var c=E(a);B(a,1,E(a));a.w=c+K(a,1)|0;a.la||xd(a)};Z[234]=function(a){var c=H(a);B(a,1,E(a));if((!a.qa||rd(a))&&c&4294901760)throw a.debug.S("#GP handler");a.w=c+K(a,1)|0;a.la||xd(a)};X[235]=function(a){var c=D(a);a.w=a.w+c|0;a.la||xd(a);a.qa=1===(a.G[0]&1)};
|
|
||||||
X[236]=function(a){var c=a.l[4];Zd(a,c,1);a.C[0]=Ha(a.A,c)};Y[237]=function(a){var c=a.l[4];Zd(a,c,2);a.l[0]=Ia(a.A,c)};Z[237]=function(a){var c=a.l[4];Zd(a,c,4);a.a[0]=Ja(a.A,c)};X[238]=function(a){var c=a.l[4];Zd(a,c,1);Ea(a.A,c,a.C[0])};Y[239]=function(a){var c=a.l[4];Zd(a,c,2);Fa(a.A,c,a.l[0])};Z[239]=function(a){var c=a.l[4];Zd(a,c,4);Ga(a.A,c,a.a[0])};X[240]=function(a){gd(a)};X[241]=function(a){throw a.debug.S("int1 instruction");};X[242]=function(a){a.ca=1;gd(a);a.ca=0};
|
|
||||||
X[243]=function(a){a.ca=2;gd(a);a.ca=0};X[244]=function(a){a.O&&M(a,0);if(a.h&512)throw a.Pc=!0,233495534;a.debug.show("cpu halted");throw"HALT";};X[245]=function(a){a.h=(a.h|1)^a.Pa();a.u&=-2};
|
|
||||||
X[246]=function(a){a.f=C(a);switch(a.f>>3&7){case 0:var c=Id(a),d=C(a);Se(a,c,d,7);break;case 1:c=Id(a);d=C(a);Se(a,c,d,7);break;case 2:c=Nd(a);Od(a,~c);break;case 3:c=Nd(a);Od(a,Je(a,c,7));break;case 4:c=Id(a);c*=a.C[0];a.l[0]=c;a.F=c&255;a.T=7;a.h=256>c?a.h&-2050:a.h|2049;a.u=212;break;case 5:c=Id(a)<<24>>24;c*=a.be[0];a.l[0]=c;a.F=c&255;a.T=7;a.h=127<c||-128>c?a.h|2049:a.h&-2050;a.u=212;break;case 6:c=Id(a);if(0===c)Gd(a);else{var d=a.l[0],e=d/c|0;256<=e?Gd(a):(a.C[0]=e,a.C[1]=d%c)}break;case 7:c=
|
|
||||||
Id(a)<<24>>24,0===c?Gd(a):(d=a.yc[0],e=d/c|0,128<=e||-129>=e?Gd(a):(a.C[0]=e,a.C[1]=d%c))}};
|
|
||||||
Y[247]=function(a){a.f=C(a);switch(a.f>>3&7){case 0:var c=R(a),d=E(a);Se(a,c,d,15);break;case 1:c=R(a);d=E(a);Se(a,c,d,15);break;case 2:c=S(a);T(a,~c);break;case 3:c=S(a);T(a,Je(a,c,15));break;case 4:c=R(a);c*=a.l[0];d=c>>>16;a.l[0]=c;a.l[4]=d;a.F=c&65535;a.T=15;a.h=d?a.h|2049:a.h&-2050;a.u=212;break;case 5:c=R(a)<<16>>16;c*=a.yc[0];a.l[0]=c;a.l[4]=c>>16;a.F=c&65535;a.T=15;a.h=32767<c||-32768>c?a.h|2049:a.h&-2050;a.u=212;break;case 6:c=R(a);if(0===c)Gd(a);else{var d=(a.l[0]|a.l[4]<<16)>>>0,e=d/c|
|
|
||||||
0;65536<=e||0>e?Gd(a):(a.l[0]=e,a.l[4]=d%c)}break;case 7:c=R(a)<<16>>16,0===c?Gd(a):(d=a.l[0]|a.l[4]<<16,e=d/c|0,32768<=e||-32769>=e?Gd(a):(a.l[0]=e,a.l[4]=d%c))}};
|
|
||||||
Z[247]=function(a){a.f=C(a);switch(a.f>>3&7){case 0:var c=Jd(a),d=H(a);Se(a,c,d,31);break;case 1:c=Jd(a);d=H(a);Se(a,c,d,31);break;case 2:c=U(a);V(a,~c);break;case 3:c=U(a);V(a,Je(a,c,31));break;case 4:c=Jd(a)>>>0;c=Me(a.a[0],c);a.a[0]=c[0];a.a[2]=c[1];a.F=c[0];a.T=31;a.h=0===c[1]?a.h&-2050:a.h|2049;a.u=212;break;case 5:c=Jd(a);c=Ne(a.a[0],c);a.a[0]=c[0];a.a[2]=c[1];a.F=c[0];a.T=31;a.h=c[1]===c[0]>>31?a.h&-2050:a.h|2049;a.u=212;break;case 6:c=Jd(a)>>>0;d=Qe(a,a.Wc[0],a.Wc[2],c);c=d[0];d=d[1];4294967296<=
|
|
||||||
c?Gd(a):(a.a[0]=c,a.a[2]=d);break;case 7:var e=c=Jd(a),f=a.Wc[0],h=a.a[2],d=c=!1;0>e&&(d=!0,e=-e);0>h&&(c=!0,d=!d,f=-f>>>0,h=~h+!f);f=Qe(a,f,h,e);e=f[0];f=f[1];d&&(e=-e|0);c&&(f=-f|0);2147483648<=e||-2147483649>=e?Gd(a):(a.a[0]=e,a.a[2]=f)}};X[248]=function(a){a.h&=-2;a.u&=-2};X[249]=function(a){a.h|=1;a.u&=-2};X[250]=function(a){!a.qa||(a.h&131072?3===qd(a):qd(a)>=a.O)?a.h&=-513:M(a,0)};X[251]=function(a){!a.qa||(a.h&131072?3===qd(a):qd(a)>=a.O)?(a.h|=512,dd(a),fd(a),Fc(a)):M(a,0)};
|
|
||||||
X[252]=function(a){a.h&=-1025};X[253]=function(a){a.h|=1024};X[254]=function(a){a.f=C(a);var c=a.f&56;c?8===c?(c=Nd(a),Od(a,Ie(a,c,7))):w(a):(c=Nd(a),Od(a,He(a,c,7)))};
|
|
||||||
Y[255]=function(a){a.f=C(a);switch(a.f>>3&7){case 0:var c=S(a);T(a,He(a,c,15));break;case 1:c=S(a);T(a,Ie(a,c,15));break;case 2:c=R(a);O(a,xd(a));a.w=K(a,1)+c|0;a.la||xd(a);break;case 3:192<=a.f&&w(a);var d=a.P(a.f),c=y(a,d),d=y(a,d+2|0),e=a.R[1],f=xd(a);lb(a,J(a,-4),4);B(a,1,d);O(a,e);O(a,f);a.w=K(a,1)+c|0;a.la||xd(a);break;case 4:c=R(a);a.w=K(a,1)+c|0;a.la||xd(a);break;case 5:192<=a.f&&w(a);d=a.P(a.f);c=y(a,d);d=y(a,d+2|0);B(a,1,d);a.w=K(a,1)+c|0;a.la||xd(a);break;case 6:c=R(a);O(a,c);break;case 7:w(a)}};
|
|
||||||
Z[255]=function(a){a.f=C(a);switch(a.f>>3&7){case 0:var c=U(a);V(a,He(a,c,31));break;case 1:c=U(a);V(a,Ie(a,c,31));break;case 2:c=Jd(a);N(a,xd(a));a.w=K(a,1)+c|0;break;case 3:192<=a.f&&w(a);var d=a.P(a.f),c=A(a,d),d=y(a,d+4|0),e=a.R[1],f=xd(a);if((!a.qa||rd(a))&&c&4294901760)throw a.debug.S("#GP handler");lb(a,J(a,-8),8);B(a,1,d);N(a,e);N(a,f);a.w=K(a,1)+c|0;break;case 4:c=Jd(a);a.w=K(a,1)+c|0;break;case 5:192<=a.f&&w(a);d=a.P(a.f);c=A(a,d);d=y(a,d+4|0);if((!a.qa||rd(a))&&c&4294901760)throw a.debug.S("#GP handler");
|
|
||||||
B(a,1,d);a.w=K(a,1)+c|0;break;case 6:c=Jd(a);N(a,c);break;case 7:w(a)}};var cg=[],dg=[];v.prototype.ja=cg;v.prototype.wa=dg;for(var eg=0;256>eg;eg++)X[eg]?cg[eg]=dg[eg]=X[eg]:Y[eg]&&(cg[eg]=Y[eg],dg[eg]=Z[eg]);X=[];Y=[];Z=[];
|
|
||||||
X[0]=function(a){a.f=C(a);a.qa&&!rd(a)||w(a);switch(a.f>>3&7){case 0:Ld(a,a.R[7]);192<=a.f&&(a.a[a.f&7]&=65535);break;case 1:Ld(a,a.R[6]);192<=a.f&&(a.a[a.f&7]&=65535);break;case 2:a.O&&M(a,0);var c=R(a);Ad(a,c);break;case 3:a.O&&M(a,0);var c=R(a),d=zd(a,c);if(!d.ye)throw a.debug.S("TR can only be loaded from GDT");if(d.kb)throw a.debug.S("#GP handler");if(!d.Eb)throw a.debug.S("#GP handler");if(!d.Fb)throw a.debug.S("#GP handler");if(9!==d.type&&1!==d.type)throw a.debug.S("#GP handler");if(1===d.type)throw a.debug.S("286 tss");
|
|
||||||
a.Ea[6]=d.Cb;a.Qa[6]=d.Ob;a.R[6]=c;a.memory.sa(d.Hd+5|0,a.memory.da(d.Hd+5|0)|2);break;case 4:c=R(a);c=zd(a,c);a.u&=-65;a.h=c.kb||!c.bc||c.Fb||!c.Ae||!c.xd&&(c.xa<a.O||c.xa<c.mb)?a.h&-65:a.h|64;break;case 5:c=R(a);c=zd(a,c);a.u&=-65;a.h=c.kb||!c.bc||c.Fb||!c.Ce||c.xa<a.O||c.xa<c.mb?a.h&-65:a.h|64;break;default:w(a)}};
|
|
||||||
X[1]=function(a){a.f=C(a);var c=a.f>>3&7;if(4===c)Ld(a,a.G[0]);else if(6===c){a.O&&M(a,0);var d=R(a);a.G[0]=a.G[0]&-16|d&15;a.qa&&(a.G[0]|=1);hd(a)}else switch(192<=a.f&&w(a),2!==c&&3!==c||!a.qa||(a.ya=9),d=a.P(a.f),a.ya=-1,c){case 0:lb(a,d,6);mb(a,d,a.Nc);c=a.Da?-1:16777215;x(a,d+2,a.$b&c);break;case 1:lb(a,d,6);mb(a,d,a.Oc);c=a.Da?-1:16777215;x(a,d+2,a.ac&c);break;case 2:a.O&&M(a,0);c=y(a,d);d=A(a,d+2);a.Nc=c;a.$b=d;a.Da||(a.$b&=16777215);break;case 3:a.O&&M(a,0);c=y(a,d);d=A(a,d+2);a.Oc=c;a.ac=
|
|
||||||
d;a.Da||(a.ac&=16777215);break;case 7:a.O&&M(a,0);d>>>=12;a.Kb[d]=0;a.Id[d]=0;a.Gb=-1;a.Sc=-1;break;default:w(a)}};Y[2]=function(a){a.f=C(a);a.qa&&!rd(a)||w(a);var c=R(a);Xd(a,$d(a,c,Vd(a)))};Z[2]=function(a){a.f=C(a);a.qa&&!rd(a)||w(a);var c=R(a);Yd(a,$d(a,c,W(a)))};Y[3]=function(a){a.f=C(a);a.qa&&!rd(a)||w(a);var c=R(a);Xd(a,ae(a,c,Vd(a)))};Z[3]=function(a){a.f=C(a);a.qa&&!rd(a)||w(a);var c=R(a);Yd(a,ae(a,c,W(a)))};X[4]=function(a){w(a)};X[5]=function(a){w(a)};
|
|
||||||
X[6]=function(a){a.O?M(a,0):a.G[0]&=-9};X[7]=function(a){w(a)};X[8]=function(a){w(a)};X[9]=function(a){a.O&&M(a,0)};X[10]=function(a){w(a)};X[11]=function(a){w(a)};X[12]=function(a){w(a)};X[13]=function(a){w(a)};X[14]=function(a){w(a)};X[15]=function(a){w(a)};X[16]=function(a){w(a)};X[17]=function(a){w(a)};X[18]=function(a){w(a)};X[19]=function(a){w(a)};X[20]=function(a){w(a)};X[21]=function(a){w(a)};X[22]=function(a){w(a)};X[23]=function(a){w(a)};X[24]=function(a){a.f=C(a);192>a.f&&a.P(a.f)};
|
|
||||||
X[25]=function(a){w(a)};X[26]=function(a){w(a)};X[27]=function(a){w(a)};X[28]=function(a){w(a)};X[29]=function(a){w(a)};X[30]=function(a){w(a)};X[31]=function(a){w(a)};X[32]=function(a){a.f=C(a);a.O&&M(a,0);switch(a.f>>3&7){case 0:Sd(a,a.G[0]);break;case 2:Sd(a,a.G[2]);break;case 3:Sd(a,a.G[3]);break;case 4:Sd(a,a.G[4]);break;default:w(a)}};X[33]=function(a){a.f=C(a);a.O&&M(a,0);a.a[a.f&7]=a.nc[a.f>>3&7]};
|
|
||||||
X[34]=function(a){a.f=C(a);a.O&&M(a,0);var c=Rd(a);switch(a.f>>3&7){case 0:a.G[0]=c;if(-2147483648===(a.G[0]&-2147483647))throw a.debug.S("#GP handler");hd(a);break;case 2:a.G[2]=c;break;case 3:a.G[3]=c;Bd(a);break;case 4:c&-3565568&&M(a,0);(a.G[4]^c)&128&&(c&128?Bd(a):cd(a));a.G[4]=c;a.Ad=a.G[4]&16?128:0;if(a.G[4]&32)throw a.debug.S("PAE");break;default:w(a)}};X[35]=function(a){a.f=C(a);a.O&&M(a,0);a.nc[a.f>>3&7]=Rd(a)};X[36]=function(a){w(a)};X[37]=function(a){w(a)};X[38]=function(a){w(a)};
|
|
||||||
X[39]=function(a){w(a)};X[40]=function(a){w(a)};X[41]=function(a){w(a)};X[42]=function(a){w(a)};X[43]=function(a){w(a)};X[44]=function(a){w(a)};X[45]=function(a){w(a)};X[46]=function(a){w(a)};X[47]=function(a){w(a)};X[48]=function(a){a.O&&M(a,0);var c=a.a[0],d=a.a[2];switch(a.a[1]){case 372:a.Ac=c&65535;break;case 374:a.Zc=c;break;case 373:a.$c=c;break;case 16:c=(c>>>0)+4294967296*(d>>>0),a.Jd=Oa()-c/8192}};
|
|
||||||
X[49]=function(a){if(a.O&&a.G[4]&4)M(a,0);else{var c=Oa()-a.Jd;a.a[0]=8192*c;a.a[2]=1.9073486328125E-6*c}};X[50]=function(a){a.O&&M(a,0);var c=0,d=0;switch(a.a[1]){case 372:c=a.Ac;break;case 374:c=a.Zc;break;case 373:c=a.$c;break;case 16:d=Oa()-a.Jd;c=8192*d;d*=1.9073486328125E-6;break;case 27:c=4276092928}a.a[0]=c;a.a[2]=d};X[51]=function(a){w(a)};
|
|
||||||
X[52]=function(a){var c=a.Ac&65532;a.qa&&c||M(a,0);a.h&=-131585;a.w=a.Zc;a.a[4]=a.$c;a.R[1]=c;a.yb[1]=0;a.Qa[1]=-1;a.Ea[1]=0;a.Na||Dd(a,!0);a.O=0;id(a);a.R[2]=c+8;a.yb[2]=0;a.Qa[2]=-1;a.Ea[2]=0;a.gb=!0};X[53]=function(a){var c=a.Ac&65532;a.qa&&!a.O&&c||M(a,0);a.w=a.a[2];a.a[4]=a.a[1];a.R[1]=c+16|3;a.yb[1]=0;a.Qa[1]=-1;a.Ea[1]=0;a.Na||Dd(a,!0);a.O=3;id(a);a.R[2]=c+24|3;a.yb[2]=0;a.Qa[2]=-1;a.Ea[2]=0;a.gb=!0};X[54]=function(a){w(a)};X[55]=function(a){w(a)};X[56]=function(a){w(a)};X[57]=function(a){w(a)};
|
|
||||||
X[58]=function(a){w(a)};X[59]=function(a){w(a)};X[60]=function(a){w(a)};X[61]=function(a){w(a)};X[62]=function(a){w(a)};X[63]=function(a){w(a)};Y[64]=function(a){a.f=C(a);Pf(a,a.qb())};Z[64]=function(a){a.f=C(a);Qf(a,a.qb())};Y[65]=function(a){a.f=C(a);Pf(a,!a.qb())};Z[65]=function(a){a.f=C(a);Qf(a,!a.qb())};Y[66]=function(a){a.f=C(a);Pf(a,a.hb())};Z[66]=function(a){a.f=C(a);Qf(a,a.hb())};Y[67]=function(a){a.f=C(a);Pf(a,!a.hb())};Z[67]=function(a){a.f=C(a);Qf(a,!a.hb())};
|
|
||||||
Y[68]=function(a){a.f=C(a);Pf(a,a.jb())};Z[68]=function(a){a.f=C(a);Qf(a,a.jb())};Y[69]=function(a){a.f=C(a);Pf(a,!a.jb())};Z[69]=function(a){a.f=C(a);Qf(a,!a.jb())};Y[70]=function(a){a.f=C(a);Pf(a,Sf(a))};Z[70]=function(a){a.f=C(a);Qf(a,Sf(a))};Y[71]=function(a){a.f=C(a);Pf(a,!Sf(a))};Z[71]=function(a){a.f=C(a);Qf(a,!Sf(a))};Y[72]=function(a){a.f=C(a);Pf(a,a.rb())};Z[72]=function(a){a.f=C(a);Qf(a,a.rb())};Y[73]=function(a){a.f=C(a);Pf(a,!a.rb())};Z[73]=function(a){a.f=C(a);Qf(a,!a.rb())};
|
|
||||||
Y[74]=function(a){a.f=C(a);Pf(a,a.ib())};Z[74]=function(a){a.f=C(a);Qf(a,a.ib())};Y[75]=function(a){a.f=C(a);Pf(a,!a.ib())};Z[75]=function(a){a.f=C(a);Qf(a,!a.ib())};Y[76]=function(a){a.f=C(a);Pf(a,Tf(a))};Z[76]=function(a){a.f=C(a);Qf(a,Tf(a))};Y[77]=function(a){a.f=C(a);Pf(a,!Tf(a))};Z[77]=function(a){a.f=C(a);Qf(a,!Tf(a))};Y[78]=function(a){a.f=C(a);Pf(a,Uf(a))};Z[78]=function(a){a.f=C(a);Qf(a,Uf(a))};Y[79]=function(a){a.f=C(a);Pf(a,!Uf(a))};Z[79]=function(a){a.f=C(a);Qf(a,!Uf(a))};X[80]=function(a){w(a)};
|
|
||||||
X[81]=function(a){w(a)};X[82]=function(a){w(a)};X[83]=function(a){w(a)};X[84]=function(a){w(a)};X[85]=function(a){w(a)};X[86]=function(a){w(a)};X[87]=function(a){w(a)};X[88]=function(a){w(a)};X[89]=function(a){w(a)};X[90]=function(a){w(a)};X[91]=function(a){w(a)};X[92]=function(a){w(a)};X[93]=function(a){w(a)};X[94]=function(a){w(a)};X[95]=function(a){w(a)};X[96]=function(a){w(a)};X[97]=function(a){w(a)};X[98]=function(a){w(a)};X[99]=function(a){w(a)};X[100]=function(a){w(a)};X[101]=function(a){w(a)};
|
|
||||||
X[102]=function(a){w(a)};X[103]=function(a){w(a)};X[104]=function(a){w(a)};X[105]=function(a){w(a)};X[106]=function(a){w(a)};X[107]=function(a){w(a)};X[108]=function(a){w(a)};X[109]=function(a){w(a)};X[110]=function(a){w(a)};X[111]=function(a){w(a)};X[112]=function(a){w(a)};X[113]=function(a){w(a)};X[114]=function(a){w(a)};X[115]=function(a){w(a)};X[116]=function(a){w(a)};X[117]=function(a){w(a)};X[118]=function(a){w(a)};X[119]=function(a){w(a)};X[120]=function(a){w(a)};X[121]=function(a){w(a)};
|
|
||||||
X[122]=function(a){w(a)};X[123]=function(a){w(a)};X[124]=function(a){w(a)};X[125]=function(a){w(a)};X[126]=function(a){w(a)};X[127]=function(a){w(a)};Y[128]=function(a){Nf(a,a.qb())};Z[128]=function(a){Of(a,a.qb())};Y[129]=function(a){Nf(a,!a.qb())};Z[129]=function(a){Of(a,!a.qb())};Y[130]=function(a){Nf(a,a.hb())};Z[130]=function(a){Of(a,a.hb())};Y[131]=function(a){Nf(a,!a.hb())};Z[131]=function(a){Of(a,!a.hb())};Y[132]=function(a){Nf(a,a.jb())};Z[132]=function(a){Of(a,a.jb())};
|
|
||||||
Y[133]=function(a){Nf(a,!a.jb())};Z[133]=function(a){Of(a,!a.jb())};Y[134]=function(a){Nf(a,Sf(a))};Z[134]=function(a){Of(a,Sf(a))};Y[135]=function(a){Nf(a,!Sf(a))};Z[135]=function(a){Of(a,!Sf(a))};Y[136]=function(a){Nf(a,a.rb())};Z[136]=function(a){Of(a,a.rb())};Y[137]=function(a){Nf(a,!a.rb())};Z[137]=function(a){Of(a,!a.rb())};Y[138]=function(a){Nf(a,a.ib())};Z[138]=function(a){Of(a,a.ib())};Y[139]=function(a){Nf(a,!a.ib())};Z[139]=function(a){Of(a,!a.ib())};Y[140]=function(a){Nf(a,Tf(a))};
|
|
||||||
Z[140]=function(a){Of(a,Tf(a))};Y[141]=function(a){Nf(a,!Tf(a))};Z[141]=function(a){Of(a,!Tf(a))};Y[142]=function(a){Nf(a,Uf(a))};Z[142]=function(a){Of(a,Uf(a))};Y[143]=function(a){Nf(a,!Uf(a))};Z[143]=function(a){Of(a,!Uf(a))};X[144]=function(a){a.f=C(a);Rf(a,a.qb())};X[145]=function(a){a.f=C(a);Rf(a,!a.qb())};X[146]=function(a){a.f=C(a);Rf(a,a.hb())};X[147]=function(a){a.f=C(a);Rf(a,!a.hb())};X[148]=function(a){a.f=C(a);Rf(a,a.jb())};X[149]=function(a){a.f=C(a);Rf(a,!a.jb())};
|
|
||||||
X[150]=function(a){a.f=C(a);Rf(a,Sf(a))};X[151]=function(a){a.f=C(a);Rf(a,!Sf(a))};X[152]=function(a){a.f=C(a);Rf(a,a.rb())};X[153]=function(a){a.f=C(a);Rf(a,!a.rb())};X[154]=function(a){a.f=C(a);Rf(a,a.ib())};X[155]=function(a){a.f=C(a);Rf(a,!a.ib())};X[156]=function(a){a.f=C(a);Rf(a,Tf(a))};X[157]=function(a){a.f=C(a);Rf(a,!Tf(a))};X[158]=function(a){a.f=C(a);Rf(a,Uf(a))};X[159]=function(a){a.f=C(a);Rf(a,!Uf(a))};Y[160]=function(a){O(a,a.R[4])};Z[160]=function(a){N(a,a.R[4])};
|
|
||||||
Y[161]=function(a){B(a,4,y(a,J(a,0)));I(a,2)};Z[161]=function(a){B(a,4,y(a,J(a,0)));I(a,4)};
|
|
||||||
X[162]=function(a){var c=0,d=0,e=0,f=0;switch(a.a[0]){case 0:c=5;f=1970169159;e=1231384169;d=1818588270;break;case 1:c=3939;f=67584;d=1082130432;e=(a.Ba?1:0)|43322;e|=512;break;case 2:c=1717260289;d=f=0;e=8024064;break;case 4:switch(a.a[1]){case 0:c=289;f=29360191;d=63;e=1;break;case 1:c=290;f=29360191;d=63;e=1;break;case 2:c=323,f=96469055,d=4095,e=1}break;case -2147483648:c=5}a.a[0]=c;a.a[1]=d;a.a[2]=e;a.a[3]=f};Y[163]=function(a){a.f=C(a);192>a.f?Gf(a,a.P(a.f),Wd(a)):Cf(a,Pd(a),Vd(a)&15)};
|
|
||||||
Z[163]=function(a){a.f=C(a);192>a.f?Gf(a,a.P(a.f),W(a)):Cf(a,Rd(a),W(a)&31)};Y[164]=function(a){a.f=C(a);var c=S(a);T(a,Af(a,c,Vd(a),C(a)&31))};Z[164]=function(a){a.f=C(a);var c=U(a);V(a,Bf(a,c,W(a),C(a)&31))};Y[165]=function(a){a.f=C(a);var c=S(a);T(a,Af(a,c,Vd(a),a.C[4]&31))};Z[165]=function(a){a.f=C(a);var c=U(a);V(a,Bf(a,c,W(a),a.C[4]&31))};X[166]=function(a){w(a)};X[167]=function(a){w(a)};Y[168]=function(a){O(a,a.R[5])};Z[168]=function(a){N(a,a.R[5])};
|
|
||||||
Y[169]=function(a){B(a,5,y(a,J(a,0)));I(a,2)};Z[169]=function(a){B(a,5,y(a,J(a,0)));I(a,4)};X[170]=function(a){w(a)};Y[171]=function(a){a.f=C(a);192>a.f?Jf(a,a.P(a.f),Wd(a)):Qd(a,Ef(a,Pd(a),Wd(a)&15))};Z[171]=function(a){a.f=C(a);192>a.f?Jf(a,a.P(a.f),W(a)):Sd(a,Ef(a,Rd(a),W(a)&31))};Y[172]=function(a){a.f=C(a);var c=S(a);T(a,yf(a,c,Vd(a),C(a)&31))};Z[172]=function(a){a.f=C(a);var c=U(a);V(a,zf(a,c,W(a),C(a)&31))};Y[173]=function(a){a.f=C(a);var c=S(a);T(a,yf(a,c,Vd(a),a.C[4]&31))};
|
|
||||||
Z[173]=function(a){a.f=C(a);var c=U(a);V(a,zf(a,c,W(a),a.C[4]&31))};X[174]=function(a){a.f=C(a);switch(a.f>>3&7){case 5:break;case 6:break;default:w(a)}};Y[175]=function(a){a.f=C(a);var c=R(a)<<16>>16;Xd(a,Ke(a,Wd(a),c))};Z[175]=function(a){a.f=C(a);var c=Jd(a);Yd(a,Oe(a,W(a),c))};X[176]=function(a){a.f=C(a);if(192>a.f){var c=a.P(a.f);lb(a,c,1);var d=ld(a,c)}else d=a.C[a.f<<2&12|a.f>>2&1];Ae(a,a.C[0],d,7);a.Pb()?192>a.f?md(a,c,Td(a)):a.C[a.f<<2&12|a.f>>2&1]=Td(a):a.C[0]=d};
|
|
||||||
Y[177]=function(a){a.f=C(a);if(192>a.f){var c=a.P(a.f);lb(a,c,2);var d=y(a,c)}else d=Pd(a);Ae(a,a.l[0],d,15);a.Pb()?192>a.f?mb(a,c,Vd(a)):Qd(a,Vd(a)):a.l[0]=d};Z[177]=function(a){a.f=C(a);if(192>a.f){var c=a.P(a.f);lb(a,c,4);var d=A(a,c)}else d=Rd(a);Ae(a,a.a[0],d,31);a.Pb()?192>a.f?x(a,c,W(a)):Sd(a,W(a)):a.a[0]=d};Y[178]=function(a){a.f=C(a);$f(a,2)};Z[178]=function(a){a.f=C(a);ag(a,2)};Y[179]=function(a){a.f=C(a);192>a.f?If(a,a.P(a.f),Wd(a)):Qd(a,Ff(a,Pd(a),Wd(a)&15))};
|
|
||||||
Z[179]=function(a){a.f=C(a);192>a.f?If(a,a.P(a.f),W(a)):Sd(a,Ff(a,Rd(a),W(a)&31))};Y[180]=function(a){a.f=C(a);$f(a,4)};Z[180]=function(a){a.f=C(a);ag(a,4)};Y[181]=function(a){a.f=C(a);$f(a,5)};Z[181]=function(a){a.f=C(a);ag(a,5)};Y[182]=function(a){a.f=C(a);var c=Id(a);Xd(a,c)};Z[182]=function(a){a.f=C(a);var c=Id(a);Yd(a,c)};X[183]=function(a){a.f=C(a);var c=R(a);Yd(a,c)};Y[184]=function(a){a.f=C(a);var c=R(a);Xd(a,Kf(a,c))};Z[184]=function(a){a.f=C(a);var c=Jd(a);Yd(a,Kf(a,c))};X[185]=function(a){w(a)};
|
|
||||||
Y[186]=function(a){a.f=C(a);switch(a.f>>3&7){case 4:192>a.f?Gf(a,a.P(a.f),C(a)&15):Cf(a,Pd(a),C(a)&15);break;case 5:192>a.f?Jf(a,a.P(a.f),C(a)&15):Qd(a,Ef(a,Pd(a),C(a)&15));break;case 6:192>a.f?If(a,a.P(a.f),C(a)&15):Qd(a,Ff(a,Pd(a),C(a)&15));break;case 7:192>a.f?Hf(a,a.P(a.f),C(a)&15):Qd(a,Df(a,Pd(a),C(a)&15));break;default:w(a)}};
|
|
||||||
Z[186]=function(a){a.f=C(a);switch(a.f>>3&7){case 4:192>a.f?Gf(a,a.P(a.f),C(a)&31):Cf(a,Rd(a),C(a)&31);break;case 5:192>a.f?Jf(a,a.P(a.f),C(a)&31):Sd(a,Ef(a,Rd(a),C(a)&31));break;case 6:192>a.f?If(a,a.P(a.f),C(a)&31):Sd(a,Ff(a,Rd(a),C(a)&31));break;case 7:192>a.f?Hf(a,a.P(a.f),C(a)&31):Sd(a,Df(a,Rd(a),C(a)&31));break;default:w(a)}};Y[187]=function(a){a.f=C(a);192>a.f?Hf(a,a.P(a.f),Wd(a)):Qd(a,Df(a,Pd(a),Wd(a)&15))};Z[187]=function(a){a.f=C(a);192>a.f?Hf(a,a.P(a.f),W(a)):Sd(a,Df(a,Rd(a),W(a)&31))};
|
|
||||||
Y[188]=function(a){a.f=C(a);var c=R(a);var d=Vd(a);a.u=2197;a.T=15;0===c?(a.h|=64,c=d):(a.h&=-65,c=a.F=Va(-c&c));Xd(a,c)};Z[188]=function(a){a.f=C(a);var c=Jd(a);var d=W(a);a.u=2197;a.T=31;0===c?(a.h|=64,c=d):(a.h&=-65,c=a.F=Va((-c&c)>>>0));Yd(a,c)};Y[189]=function(a){a.f=C(a);var c=R(a);var d=Vd(a);a.u=2197;a.T=15;0===c?(a.h|=64,c=d):(a.h&=-65,c=a.F=Va(c));Xd(a,c)};Z[189]=function(a){a.f=C(a);var c=Jd(a);var d=W(a);a.u=2197;a.T=31;0===c?(a.h|=64,c=d):(a.h&=-65,c=a.F=Va(c>>>0));Yd(a,c)};
|
|
||||||
Y[190]=function(a){a.f=C(a);var c=Id(a)<<24>>24;Xd(a,c)};Z[190]=function(a){a.f=C(a);var c=Id(a)<<24>>24;Yd(a,c)};X[191]=function(a){a.f=C(a);var c=R(a)<<16>>16;Yd(a,c)};X[192]=function(a){a.f=C(a);var c;c=Nd(a);var d=a.f>>1&12|a.f>>5&1,e=a.C[d];a.C[d]=c;c=a.add(c,e,7);Od(a,c)};Y[193]=function(a){a.f=C(a);var c;c=S(a);var d=a.f>>2&14,e=a.l[d];a.l[d]=c;c=a.add(c,e,15);T(a,c)};Z[193]=function(a){a.f=C(a);var c;c=U(a);var d=a.f>>3&7,e=a.a[d];a.a[d]=c;c=a.add(c,e,31);V(a,c)};X[194]=function(a){w(a)};
|
|
||||||
X[195]=function(a){w(a)};X[196]=function(a){w(a)};X[197]=function(a){w(a)};X[198]=function(a){w(a)};X[199]=function(a){a.f=C(a);switch(a.f>>3&7){case 1:192<=a.f&&w(a);var c=a.P(a.f);lb(a,c,8);var d=A(a,c),e=A(a,c+4|0);a.a[0]===d&&a.a[2]===e?(a.h|=64,x(a,c,a.a[3]),x(a,c+4|0,a.a[1])):(a.h&=-65,a.a[0]=d,a.a[2]=e);a.u&=-65;break;case 6:d=(c=Qa())?Ta():0;a.Da?Md(a,d):Ld(a,d);a.h&=-2262;a.h|=c;a.u=0;break;default:w(a)}};X[200]=function(a){bg(a,0)};X[201]=function(a){bg(a,1)};X[202]=function(a){bg(a,2)};
|
|
||||||
X[203]=function(a){bg(a,3)};X[204]=function(a){bg(a,4)};X[205]=function(a){bg(a,5)};X[206]=function(a){bg(a,6)};X[207]=function(a){bg(a,7)};X[208]=function(a){w(a)};X[209]=function(a){w(a)};X[210]=function(a){w(a)};X[211]=function(a){w(a)};X[212]=function(a){w(a)};X[213]=function(a){w(a)};X[214]=function(a){w(a)};X[215]=function(a){w(a)};X[216]=function(a){w(a)};X[217]=function(a){w(a)};X[218]=function(a){w(a)};X[219]=function(a){w(a)};X[220]=function(a){w(a)};X[221]=function(a){w(a)};X[222]=function(a){w(a)};
|
|
||||||
X[223]=function(a){w(a)};X[224]=function(a){w(a)};X[225]=function(a){w(a)};X[226]=function(a){w(a)};X[227]=function(a){w(a)};X[228]=function(a){w(a)};X[229]=function(a){w(a)};X[230]=function(a){w(a)};X[231]=function(a){w(a)};X[232]=function(a){w(a)};X[233]=function(a){w(a)};X[234]=function(a){w(a)};X[235]=function(a){w(a)};X[236]=function(a){w(a)};X[237]=function(a){w(a)};X[238]=function(a){w(a)};X[239]=function(a){w(a)};X[240]=function(a){w(a)};X[241]=function(a){w(a)};X[242]=function(a){w(a)};
|
|
||||||
X[243]=function(a){w(a)};X[244]=function(a){w(a)};X[245]=function(a){w(a)};X[246]=function(a){w(a)};X[247]=function(a){w(a)};X[248]=function(a){w(a)};X[249]=function(a){w(a)};X[250]=function(a){w(a)};X[251]=function(a){w(a)};X[252]=function(a){w(a)};X[253]=function(a){w(a)};X[254]=function(a){w(a)};X[255]=function(a){w(a)};var fg=[],gg=[];v.prototype.gh=fg;v.prototype.hh=gg;for(eg=0;256>eg;eg++)X[eg]?fg[eg]=gg[eg]=X[eg]:Y[eg]&&(fg[eg]=Y[eg],gg[eg]=Z[eg]);function bd(a){var c={};a.debug=c;c.Hh=!1;c.Fh=void 0;c.oh=[];c.Ih=!1;c.show=function(a){if("undefined"!==typeof document){var c=document.getElementById("log");if(c){c.textContent+=a+"\n";c.style.display="block";c.scrollTop=1E9;return}}console.log(a)};c.ob=function(){};c.vh=function(){};c.th=function(){};c.Ah=function(){};c.wh=function(){};c.yh=function(){};c.xh=function(){};c.uh=function(){};c.rh=function(){};c.sh=function(){};c.Bh=function(){};c.Eh=function(){};c.Jh=function(){};c.step=function(){};
|
|
||||||
c.Gh=function(){};c.qh=function(){};c.S=function(a){a="Unimplemented"+(a?": "+a:"");c.show(a);c.show("Execution stopped");return a};c.Dh=function(){};c.ph=function(){}};var oa=16384;function hg(a){this.b=[];this.m=[];this.D=a;this.o=this.L=0;this.v=function(){};this.g={};this.K=0;na(this,"",-1)}function ia(a,c,d){0==ga(a,c).status?d():a.m.push({id:c,Cf:d})}function ig(a,c){a.o||(a.v=function(){});for(var d=[],e=0;e<a.m.length;e++)a.m[e].id==c?a.m[e].Cf():d.push(a.m[e]);a.m=d}
|
|
||||||
function jg(a,c){c=JSON.parse(c);if(2!==c.version)throw"The filesystem JSON format has changed. Please update your fs2json (https://github.com/copy/fs2json) and recreate the filesystem JSON.";var d=c.fsroot;a.K=c.size;setTimeout(function(){for(var c=0;c<d.length;c++)kg(a,d[c],0);a.v=function(){}},0)}
|
|
||||||
function kg(a,c,d){var e=ja(a);e.name=c[0];e.size=c[1];e.zd=c[2];e.qe=e.zd;e.ld=e.zd;e.mode=c[3];e.uid=c[4];e.Za=c[5];e.va=d;d=e.mode&61440;if(d===oa)for(c=c[6],e.hc=!0,d=a.b.length,ka(a,e),e=0;e<c.length;e++)kg(a,c[e],d);else 32768===d?(e.status=2,ka(a,e)):40960===d&&(e.Gd=c[6],ka(a,e))}function lg(a,c){var d=a.b[c];2==d.status&&(d.status=3,a.o++,a.D&&mg(a.D+ng(a,d.Ue),function(a){a=this.g[c]=new Uint8Array(a);d.size=a.length;d.status=0;this.o--;ig(this,c)}.bind(a),function(a){throw a;}))}
|
|
||||||
function ka(a,c){if(-1!=c.va){a.b.push(c);c.Ue=a.b.length-1;var d=a.b[c.va];d.hc=!0;c.fb=d.eb;d.eb=a.b.length-1}else a.b.length||a.b.push(c)}function og(a){this.hc=!1;this.fb=this.eb=this.va=-1;this.status=0;this.name="";this.ef=this.df=this.zd=this.ld=this.qe=this.Ue=this.Za=this.uid=this.size=0;this.Gd="";this.mode=493;this.Xa={type:0,version:0,path:a};this.Ga=void 0}function ja(a){return new og(++a.L)}
|
|
||||||
function na(a,c,d){var e=ja(a);e.name=c;e.va=d;e.mode=511|oa;e.hc=!0;0<=d&&(e.uid=a.b[d].uid,e.Za=a.b[d].Za,e.mode=a.b[d].mode&511|oa);e.Xa.type=oa>>8;ka(a,e);return a.b.length-1}function pa(a,c,d){var e=ja(a);e.name=c;e.va=d;e.uid=a.b[d].uid;e.Za=a.b[d].Za;e.Xa.type=128;e.mode=a.b[d].mode&438|32768;ka(a,e);return a.b.length-1}function ma(a,c,d,e,f){var h=ja(a);h.name=c;h.va=d;h.df=e;h.ef=f;h.uid=a.b[d].uid;h.Za=a.b[d].Za;h.Xa.type=192;h.mode=a.b[d].mode&438;ka(a,h);return a.b.length-1}
|
|
||||||
function la(a,c,d,e){var f=ja(a);f.name=c;f.va=d;f.uid=a.b[d].uid;f.Za=a.b[d].Za;f.Xa.type=160;f.Gd=e;f.mode=40960;ka(a,f);return a.b.length-1}function pg(a,c,d,e){c=pa(a,c,d);d=a.b[c];(a.g[c]=new Uint8Array(e.length)).set(e);d.size=e.length}
|
|
||||||
function ha(a,c){var d=ga(a,c);if((d.mode&61440)==oa){var e=ga(a,c);if(e.hc){var f=e.va;-1==f&&(f=0);for(var h=0,r=a.b[c].eb;-1!=r;)h+=24+qg(a.b[r].name),r=a.b[r].fb;var h=h+25+26,k=a.g[c]=new Uint8Array(h);e.size=h;h=0;h+=ca(["Q","d","b","s"],[a.b[c].Xa,h+25,a.b[c].mode>>12,"."],k,h);h+=ca(["Q","d","b","s"],[a.b[f].Xa,h+13+8+1+2+2,a.b[f].mode>>12,".."],k,h);for(r=a.b[c].eb;-1!=r;)h+=ca(["Q","d","b","s"],[a.b[r].Xa,h+13+8+1+2+qg(a.b[r].name),a.b[r].mode>>12,a.b[r].name],k,h),r=a.b[r].fb;e.hc=!1}}return 2==
|
|
||||||
d.status?(lg(a,c),!1):!0}function va(a,c){var d=ga(a,c);4==d.status&&(d.status=-1,delete a.g[c],d.size=0)}function sa(a,c,d,e,f){if(c==e&&d==f)return!0;d=ta(a,c,d);if(-1==d)return!1;var h=ta(a,e,f);-1!=h&&ua(a,h);h=a.b[d];if(a.b[h.va].eb==d)a.b[h.va].eb=h.fb;else{var r=rg(a,d);a.b[r].fb=h.fb}h.va=e;h.name=f;h.Xa.version++;h.fb=a.b[h.va].eb;a.b[h.va].eb=d;a.b[c].hc=!0;return a.b[e].hc=!0}
|
|
||||||
function ra(a,c,d,e,f){var h=a.b[c],r=a.g[c];!r||r.length<d+e?(qa(a,c,Math.floor(3*(d+e)/2)),h.size=d+e,r=a.g[c]):h.size<d+e&&(h.size=d+e);for(a=0;a<e;a++)r[d+a]=f()}function ta(a,c,d){for(c=a.b[c].eb;-1!=c;){if(a.b[c].name==d)return c;c=a.b[c].fb}return-1}function ng(a,c){for(var d="";0!=c;)d="/"+a.b[c].name+d,c=a.b[c].va;return d.substring(1)}function rg(a,c){for(var d=ga(a,c),d=a.b[d.va].eb;-1!=d&&a.b[d].fb!=c;)d=a.b[d].fb;return d}
|
|
||||||
function ua(a,c){if(0==c)return!1;var d=ga(a,c);if((d.mode&61440)==oa&&-1!=d.eb)return!1;a.b[d.va].eb==c?a.b[d.va].eb=d.fb:(c=rg(a,c),a.b[c].fb=d.fb);a.b[d.va].hc=!0;d.status=4;d.fb=-1;d.eb=-1;d.va=-1;return!0}function ga(a,c){return isNaN(c)||0>c||c>a.b.length?0:a.b[c]}function qa(a,c,d){var e=ga(a,c),f=a.g[c];if(d!=e.size&&(a=a.g[c]=new Uint8Array(d),e.size=d,f))for(d=Math.min(f.length,e.size),e=0;e<d;e++)a[e]=f[e]}
|
|
||||||
function sg(a,c){c=c.replace("//","/");c=c.split("/");var d=c.length;0==c[d-1].length&&c.pop();0==c[0].length&&c.shift();for(var d=c.length,e=0,f=-1,h=0;h<d;h++){f=ta(a,e,c[h]);if(-1==f)return h<d-1?{id:-1,va:-1,name:c[h]}:{id:-1,va:e,name:c[h]};e=f}return{id:f,va:e,name:c[h]}}
|
|
||||||
function wa(a,c){a=ga(a,c);if(a.Ga)return a.Ga.length;a.Ga=new Uint8Array(12);a.Ga[0]=0;a.Ga[1]=0;a.Ga[2]=0;a.Ga[3]=1;a.Ga[4]=255;a.Ga[5]=255;a.Ga[6]=255;a.Ga[7]=255;a.Ga[8]=255;a.Ga[9]=255;a.Ga[10]=255;a.Ga[11]=255;return a.Ga.length};var mg;mg="undefined"!==typeof XMLHttpRequest?function(a,c,d){var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onreadystatechange=function(){if(4==e.readyState)if(200!=e.status&&e.status)d("Error: Could not load file "+a);else{var f=e.response;f?c(f):d("Error: No data received from: "+a)}};e.send(null)}:function(a,c,d){require("fs").readFile(a,function(a,f){a?d(a):c((new Uint8Array(f)).buffer)})};function ca(a,c,d,e){for(var f,h=0,r=0;r<a.length;r++)switch(f=c[r],a[r]){case "w":d[e++]=f&255;d[e++]=f>>8&255;d[e++]=f>>16&255;d[e++]=f>>24&255;h+=4;break;case "d":d[e++]=f&255;d[e++]=f>>8&255;d[e++]=f>>16&255;d[e++]=f>>24&255;d[e++]=0;d[e++]=0;d[e++]=0;d[e++]=0;h+=8;break;case "h":d[e++]=f&255;d[e++]=f>>8;h+=2;break;case "b":d[e++]=f;h+=1;break;case "s":var k=e,t=0;d[e++]=0;d[e++]=0;var h=h+2,u;for(u in f)tg(f.charCodeAt(u)).forEach(function(a){d[e++]=a;h+=1;t++});d[k+0]=t&255;d[k+1]=t>>8&255;
|
|
||||||
break;case "Q":ca(["b","w","d"],[f.type,f.version,f.path],d,e),e+=13,h+=13}return h}
|
|
||||||
function fa(a,c){for(var d=[],e=0;e<a.length;e++)switch(a[e]){case "w":var f=c(),f=f+(c()<<8),f=f+(c()<<16),f=f+(c()<<24>>>0);d.push(f);break;case "d":f=c();f+=c()<<8;f+=c()<<16;f+=c()<<24>>>0;c();c();c();c();d.push(f);break;case "h":f=c();d.push(f+(c()<<8));break;case "b":d.push(c());break;case "s":for(var f=c(),f=f+(c()<<8),h="",r=new ug,k=0;k<f;k++){var t=r.m(c());-1!=t&&(h+=String.fromCharCode(t))}d.push(h)}return d};function ug(){this.b=new Uint8Array(5);this.g=0;this.m=function(a){this.b[this.g]=a;this.g++;switch(this.g){case 1:if(128>this.b[0])return this.g=0,this.b[0];break;case 2:if(192==(this.b[0]&224)&&128==(this.b[1]&192))return this.g=0,(this.b[0]&31)<<6|this.b[1]&63}return-1}}function tg(a){if(128>a)return[a];if(2048>a)return[192|a>>6&31,128|a&63]}function qg(a){for(var c=0,d=0;d<a.length;d++)c+=128>a.charCodeAt(d)?1:2;return c};function vg(a){function c(a){return f(a,!1)}function d(a){return f(a,!0)}function e(){for(var a=Object.keys(k),c,d=0;d<a.length;d++)c=+a[d],k[c]&&h(c,!1);k={}}function f(a,c){if(t.J&&(a.shiftKey&&a.ctrlKey&&74===a.keyCode||!t.g?0:a.target?"phone_keyboard"===a.target.className||"INPUT"!==a.target.nodeName&&"TEXTAREA"!==a.target.nodeName:1)){var d;a:{if(void 0!==a.code&&(d=F[a.code],void 0!==d))break a;d=u[a.keyCode]}if(d)return h(d,c),a.preventDefault&&a.preventDefault(),!1;console.log("Missing char in map: "+
|
|
||||||
a.keyCode.toString(16))}}function h(a,c){if(c)k[a]&&h(a,!1);else if(!k[a])return;(k[a]=c)||(a|=128);255<a?(r(a>>8),r(a&255)):r(a)}function r(a){t.J.send("keyboard-code",a)}var k={},t=this;this.g=!0;var u=new Uint16Array([0,0,0,0,0,0,0,0,14,15,0,0,0,28,0,0,42,29,56,0,58,0,0,0,0,0,0,1,0,0,0,0,57,57417,57425,57423,57415,57419,57416,57421,80,0,0,0,0,82,83,0,11,2,3,4,5,6,7,8,9,10,0,39,0,13,0,0,0,30,48,46,32,18,33,34,35,23,36,37,38,50,49,24,25,16,19,31,20,22,47,17,45,21,44,57435,57436,57437,0,0,82,79,80,
|
|
||||||
81,75,76,77,71,72,73,0,0,0,0,0,0,59,60,61,62,63,64,65,66,67,68,87,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,69,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,39,13,51,12,52,53,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,43,27,40,0,57435,57400,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),z={10:13,32:32,39:222,44:188,45:189,46:190,47:191,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,59:186,61:187,91:219,92:220,93:221,96:192,97:65,98:66,99:67,100:68,
|
|
||||||
101:69,102:70,103:71,104:72,105:73,106:74,107:75,108:76,109:77,110:78,111:79,112:80,113:81,114:82,115:83,116:84,117:85,118:86,119:87,120:88,121:89,122:90},G={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,42:56,43:187,58:186,60:188,62:190,63:191,64:50,65:65,66:66,67:67,68:68,69:69,70:70,71:71,72:72,73:73,74:74,75:75,76:76,77:77,78:78,79:79,80:80,81:81,82:82,83:83,84:84,85:85,86:86,87:87,88:88,89:89,90:90,94:54,95:189,123:219,124:220,125:221,126:192},F={Escape:1,Digit1:2,Digit2:3,Digit3:4,Digit4:5,
|
|
||||||
Digit5:6,Digit6:7,Digit7:8,Digit8:9,Digit9:10,Digit0:11,Minus:12,Equal:13,Backspace:14,Tab:15,KeyQ:16,KeyW:17,KeyE:18,KeyR:19,KeyT:20,KeyY:21,KeyU:22,KeyI:23,KeyO:24,KeyP:25,BracketLeft:26,BracketRight:27,Enter:28,ControlLeft:29,KeyA:30,KeyS:31,KeyD:32,KeyF:33,KeyG:34,KeyH:35,KeyJ:36,KeyK:37,KeyL:38,Semicolon:39,Quote:40,Backquote:41,ShiftLeft:42,Backslash:43,KeyZ:44,KeyX:45,KeyC:46,KeyV:47,KeyB:48,KeyN:49,KeyM:50,Comma:51,Period:52,Slash:53,ShiftRight:54,NumpadMultiply:55,AltLeft:56,Space:57,CapsLock:58,
|
|
||||||
F1:59,F2:60,F3:61,F4:62,F5:63,F6:64,F7:65,F8:66,F9:67,F10:68,NumLock:69,ScrollLock:70,Numpad7:71,Numpad8:72,Numpad9:73,NumpadSubtract:74,Numpad4:75,Numpad5:76,Numpad6:77,NumpadAdd:78,Numpad1:79,Numpad2:80,Numpad3:81,Numpad0:82,NumpadDecimal:83,IntlBackslash:86,F11:87,F12:88,NumpadEnter:57372,ControlRight:57373,NumpadDivide:57397,AltRight:57400,Home:57423,ArrowUp:57416,PageUp:57417,ArrowLeft:57419,ArrowRight:57421,End:57423,ArrowDown:57424,PageDown:57425,Insert:57426,Delete:57427,OSLeft:57435,OSRight:57436,
|
|
||||||
ContextMenu:57437};this.J=a;this.cb=function(){"undefined"!==typeof window&&(window.removeEventListener("keyup",c,!1),window.removeEventListener("keydown",d,!1),window.removeEventListener("blur",e,!1))};this.ob=function(){"undefined"!==typeof window&&(this.cb(),window.addEventListener("keyup",c,!1),window.addEventListener("keydown",d,!1),window.addEventListener("blur",e,!1))};this.ob();this.b=function(a){a={keyCode:a};f(a,!0);f(a,!1)};this.m=function(a){var c=a.charCodeAt(0);c in z?this.b(z[c]):c in
|
|
||||||
G?(r(42),this.b(G[c]),r(170)):console.log("ascii -> keyCode not found: ",c,a)}};function wg(a,c){function d(a){if(Ra.enabled&&Ra.b)if("mousemove"===a.type||"touchmove"===a.type)a=!0;else if("mousewheel"===a.type||"DOMMouseScroll"===a.type)a:{for(a=a.target;a.parentNode;){if(a===(c||document.body)){a=!0;break a}a=a.parentNode}a=!1}else a=!a.target||"INPUT"!==a.target.nodeName&&"TEXTAREA"!==a.target.nodeName;else a=!1;return a}function e(a){d(a)&&(a=a.changedTouches)&&a.length&&(a=a[a.length-1],ya=a.clientX,Sa=a.clientY)}function f(){if(G||L||F)Ra.J.send("mouse-click",[!1,!1,!1]),
|
|
||||||
G=L=F=!1}function h(a){if(Ra.J&&d(a)){var c=0,e=0,f=a.changedTouches;f?f.length&&(f=f[f.length-1],c=f.clientX-ya,e=f.clientY-Sa,ya=f.clientX,Sa=f.clientY,a.preventDefault()):"number"===typeof a.movementX?(c=a.movementX,e=a.movementY):"number"===typeof a.webkitMovementX?(c=a.webkitMovementX,e=a.webkitMovementY):"number"===typeof a.mozMovementX?(c=a.mozMovementX,e=a.mozMovementY):(c=a.clientX-ya,e=a.clientY-Sa,ya=a.clientX,Sa=a.clientY);Ra.J.send("mouse-delta",[.15*c,-(.15*e)])}}function r(a){d(a)&&
|
|
||||||
a.preventDefault()}function k(a){d(a)&&u(a,!0)}function t(a){d(a)&&u(a,!1)}function u(a,c){Ra.J&&(1===a.which?G=c:2===a.which?L=c:3===a.which?F=c:console.log("Unknown event.which: "+a.which),Ra.J.send("mouse-click",[G,L,F]),a.preventDefault())}function z(a){if(d(a)){var c=a.wheelDelta||-a.detail;0>c?c=-1:0<c&&(c=1);Ra.J.send("mouse-wheel",[c,0]);a.preventDefault()}}var G=!1,F=!1,L=!1,ya=0,Sa=0,Ra=this;this.enabled=!1;this.b=!0;this.J=a;this.J.register("mouse-enable",function(a){this.enabled=a},this);
|
|
||||||
this.cb=function(){window.removeEventListener("touchstart",e,!1);window.removeEventListener("touchend",f,!1);window.removeEventListener("touchmove",h,!1);window.removeEventListener("mousemove",h,!1);document.removeEventListener("contextmenu",r,!1);window.removeEventListener("mousedown",k,!1);window.removeEventListener("mouseup",t,!1);window.removeEventListener("DOMMouseScroll",z,!1);window.removeEventListener("mousewheel",z,!1)};this.ob=function(){"undefined"!==typeof window&&(this.cb(),window.addEventListener("touchstart",
|
|
||||||
e,!1),window.addEventListener("touchend",f,!1),window.addEventListener("touchmove",h,!1),window.addEventListener("mousemove",h,!1),document.addEventListener("contextmenu",r,!1),window.addEventListener("mousedown",k,!1),window.addEventListener("mouseup",t,!1),window.addEventListener("DOMMouseScroll",z,!1),window.addEventListener("mousewheel",z,!1))};this.ob()};function xg(a,c){function d(a){h.J&&h.enabled&&(h.m(a.which),a.preventDefault())}function e(a){8===a.which&&(h.m(127),a.preventDefault())}function f(a){if(h.enabled){for(var c=a.clipboardData.getData("text/plain"),d=0;d<c.length;d++)h.m(c.charCodeAt(d));a.preventDefault()}}var h=this;this.enabled=!0;this.J=c;this.g=[];this.o=this.b=!1;this.J.register("serial0-output-char",function(a){this.eh(a)},this);this.cb=function(){a.removeEventListener("keypress",d,!1);a.removeEventListener("keydown",e,!1);
|
|
||||||
a.removeEventListener("paste",f,!1)};this.ob=function(){this.cb();a.addEventListener("keypress",d,!1);a.addEventListener("keydown",e,!1);a.addEventListener("paste",f,!1);setInterval(function(){this.b&&(this.b=!1,a.value=this.g.join(""),this.o&&(this.o=!1,a.scrollTop=1E9))}.bind(this),16)};this.ob();this.eh=function(a){"\b"===a?(this.g.pop(),this.b=!0):"\r"!==a&&(this.b=!0,this.g.push(a),"\n"===a&&(this.o=!0))};this.m=function(a){h.J&&h.J.send("serial0-input",a)}};function yg(a,c){this.J=c;this.b=void 0;this.g=[];this.url=a;this.m=Date.now()-1E4;this.J.register("net0-send",function(a){this.send(a)},this)}l=yg.prototype;l.ag=function(a){this.J&&this.J.send("net0-receive",new Uint8Array(a.data))};l.$e=function(){this.connect();setTimeout(this.connect.bind(this),1E4)};l.bg=function(){for(var a=0;a<this.g.length;a++)this.send(this.g[a]);this.g=[]};l.$f=function(){};l.cb=function(){this.b&&this.b.close()};
|
|
||||||
l.connect=function(){if(this.b){var a=this.b.readyState;if(0===a||1===a)return}if(!(this.m+1E4>Date.now())){this.m=Date.now();try{this.b=new WebSocket(this.url)}catch(c){this.$e();return}this.b.binaryType="arraybuffer";this.b.onopen=this.bg.bind(this);this.b.onmessage=this.ag.bind(this);this.b.onclose=this.$e.bind(this);this.b.onerror=this.$f.bind(this)}};l.send=function(a){this.b&&1===this.b.readyState?this.b.send(a):(this.g.push(a),128<this.g.length&&(this.g=this.g.slice(-64)),this.connect())};(function(){function a(a,c){var d=new XMLHttpRequest;d.open(c.method||"get",a,!0);c.kd||(d.responseType="arraybuffer");if(c.headers)for(var e=Object.keys(c.headers),f=0;f<e.length;f++){var z=e[f];d.setRequestHeader(z,c.headers[z])}d.onload=function(){4===d.readyState&&(200!==d.status&&206!==d.status?console.log("Loading the image `"+a+"` failed"):d.response&&c.done&&c.done(d.response,d))};c.nf&&(d.onprogress=function(a){c.nf(a)});d.send(null)}function c(a,c){var d={encoding:c.kd?"utf-8":null};require("fs").readFile(a,
|
|
||||||
d,function(d,e){d?console.log("Could not read file:",a):(d=e,c.kd||(d=(new Uint8Array(d)).buffer),c.done(d))})}function d(a,c){this.m=a;this.b=256;this.byteLength=c;this.g={};this.onload=void 0}function e(a){this.b=a;this.byteLength=a.size;1073741824<a.size&&console.warn("SyncFileBuffer: Allocating buffer of "+(a.size>>20)+" MB ...");this.buffer=new ArrayBuffer(a.size);this.onload=void 0}function f(a){this.m=a;this.byteLength=a.size;this.b=256;this.g={};this.onload=void 0}"undefined"===typeof XMLHttpRequest?
|
|
||||||
Wa=c:Wa=a;Xa=d;Ya=f;Aa=e;d.prototype.load=function(){void 0!==this.byteLength?this.onload&&this.onload({}):a(this.m,{done:function(a,c){a=c.getResponseHeader("Content-Range")||"";(c=a.match(/\/(\d+)\s*$/))?(this.byteLength=+c[1],this.onload&&this.onload({})):console.assert(!1,"Cannot use: "+this.m+". `Range: bytes=...` header not supported (Got `"+a+"`)")}.bind(this),headers:{Range:"bytes=0-0"}})};d.prototype.o=function(a,c){var d=c/this.b;a/=this.b;for(var e=0;e<d;e++)if(!this.g[a+e])return;if(1===
|
|
||||||
d)return this.g[a];c=new Uint8Array(c);for(e=0;e<d;e++)c.set(this.g[a+e],e*this.b);return c};d.prototype.get=function(c,d,e){console.assert(!(c%this.b));console.assert(!(d%this.b));console.assert(d);var f=this.o(c,d);f?e(f):a(this.m,{done:function(a){a=new Uint8Array(a);this.v(c,d,a);e(a)}.bind(this),headers:{Range:"bytes="+c+"-"+(c+d-1)}})};d.prototype.set=function(a,c,d){console.assert(a+c.byteLength<=this.byteLength);var e=c.length;console.assert(!(a%this.b));console.assert(!(e%this.b));console.assert(e);
|
|
||||||
a/=this.b;for(var e=e/this.b,f=0;f<e;f++){var z=this.g[a+f];void 0===z&&(z=this.g[a+f]=new Uint8Array(this.b));var G=c.subarray(f*this.b,(f+1)*this.b);z.set(G);console.assert(z.byteLength===G.length)}d()};d.prototype.v=function(a,c,d){a/=this.b;c/=this.b;for(var e=0;e<c;e++){var f=this.g[a+e];f&&d.set(f,e*this.b)}};d.prototype.sd=function(a){a()};e.prototype.load=function(){this.g(0)};e.prototype.g=function(a){var c=new FileReader;c.onload=function(c){c=new Uint8Array(c.target.result);(new Uint8Array(this.buffer,
|
|
||||||
a)).set(c);this.g(a+4194304)}.bind(this);a<this.byteLength?c.readAsArrayBuffer(this.b.slice(a,Math.min(a+4194304,this.byteLength))):(this.b=void 0,this.onload&&this.onload({buffer:this.buffer}))};e.prototype.get=function(a,c,d){console.assert(a+c<=this.byteLength);d(new Uint8Array(this.buffer,a,c))};e.prototype.set=function(a,c,d){console.assert(a+c.byteLength<=this.byteLength);(new Uint8Array(this.buffer,a,c.byteLength)).set(c);d()};e.prototype.sd=function(a){a(this.buffer)};f.prototype.load=function(){this.onload&&
|
|
||||||
this.onload({})};f.prototype.get=function(a,c,d){console.assert(!(a%this.b));console.assert(!(c%this.b));console.assert(c);var e=this.o(a,c,d);e?d(e):(e=new FileReader,e.onload=function(e){e=new Uint8Array(e.target.result);this.v(a,c,e);d(e)}.bind(this),e.readAsArrayBuffer(this.m.slice(a,a+c)))};f.prototype.o=d.prototype.o;f.prototype.set=d.prototype.set;f.prototype.v=d.prototype.v;f.prototype.sd=function(a){a()};f.prototype.Ye=function(a){for(var c=[],d=Object.keys(this.g).map(Number).sort(function(a,
|
|
||||||
c){return a-c}),e=0,f=0;f<d.length;f++){var z=d[f],G=this.g[z],z=z*this.b;console.assert(z>=e);z!==e&&(c.push(this.m.slice(e,z)),e=z);c.push(G);e+=G.length}e!==this.m.size&&c.push(this.m.slice(e));a=new File(c,a);console.assert(a.size===this.m.size);return a}})();function n(a){function c(a,c){switch(a){case "hda":k.Ma=this.Kc.hda=c;break;case "hdb":k.Vd=this.Kc.hdb=c;break;case "cdrom":k.Ka=this.Kc.cdrom=c;break;case "fda":k.Oa=this.Kc.fda=c;break;case "fdb":k.Se=this.Kc.fdb=c;break;case "bios":k.Hc=c.buffer;break;case "vga_bios":k.mh=c.buffer;break;case "initial_state":k.Qc=c.buffer;break;case "fs9p_json":k.We=c.buffer}}function d(a,c){if(c)if(c.get&&c.set&&c.load)t.push({name:a,rc:c});else{c={buffer:c.buffer,async:c.async,url:c.url,size:c.size};if("bios"===
|
|
||||||
a||"vga_bios"===a||"initial_state"===a)c.async=!1;c.buffer instanceof ArrayBuffer?(c=new ab(c.buffer),t.push({name:a,rc:c})):c.buffer instanceof File?(void 0===c.async&&(c.async=268435456>c.buffer.size),c=c.async?new Aa(c.buffer):new Ya(c.buffer),t.push({name:a,rc:c})):c.url&&(c.async?(c=new Xa(c.url,c.size),t.push({name:a,rc:c})):t.push({name:a,url:c.url,size:c.size}))}}function e(){k.Qc&&(k.jg=!0);this.J.send("cpu-init",k);setTimeout(function(){k.Qc&&Rc(r.s,k.Qc);setTimeout(function(){k.Zb&&k.We&&
|
|
||||||
jg(k.Zb,k.We);a.autostart&&this.J.send("cpu-run")}.bind(this),0)}.bind(this),0)}this.pe=!1;var f=Zc(),h=this.J=f[0];this.o=f[1];var r=this.b=new Ka(this.o);this.J.register("emulator-stopped",function(){this.pe=!1},this);this.J.register("emulator-started",function(){this.pe=!0},this);var k={};this.Kc={fda:void 0,fdb:void 0,hda:void 0,hdb:void 0,cdrom:void 0};k.gg=!0;k.bb=a.memory_size||67108864;k.Ca=a.vga_memory_size||8388608;k.Ic=a.boot_order||531;k.Oa=void 0;k.Se=void 0;a.network_relay_url&&(new yg(a.network_relay_url,
|
|
||||||
h),k.Xf=!0);a.disable_keyboard||(this.g=new vg(h));a.disable_mouse||(this.v=new wg(h,a.screen_container));a.screen_container&&(this.m=new xa(a.screen_container,h));a.serial_container&&new xg(a.serial_container,h);for(var t=[],f="bios vga_bios cdrom hda hdb fda fdb initial_state".split(" "),h=0;h<f.length;h++)d(f[h],a[f[h]]);if(a.filesystem&&(f=a.filesystem.basefs,h=a.filesystem.baseurl,this.Zb=new hg(h),k.Zb=this.Zb,f)){console.assert(h,"Filesystem: baseurl must be specified");var u;"object"===typeof f&&
|
|
||||||
(u=f.size,f=f.url);t.push({name:"fs9p_json",url:f,size:u,kd:!0})}var z=this,G=t.length,F=function(a){if(a===G)setTimeout(e.bind(this),0);else{var d=t[a];d.rc?(d.rc.onload=function(){c.call(this,d.name,d.rc);F(a+1)}.bind(this),d.rc.load()):Wa(d.url,{done:function(e){c.call(this,d.name,new ab(e));F(a+1)}.bind(this),nf:function(c){z.o.send("download-progress",{xe:a,we:G,zh:d.url,lengthComputable:c.lengthComputable,total:c.total||d.size,loaded:c.loaded})},kd:d.kd})}}.bind(this);F(0)}l=n.prototype;
|
|
||||||
l.je=function(){this.J.send("cpu-run")};l.Qd=function(){this.J.send("cpu-stop")};l.cb=function(){this.g.cb()};l.He=function(){this.J.send("cpu-restart")};l.Sa=function(a,c){this.J.register(a,c,this)};l.Zg=function(a,c){this.J.unregister(a,c)};l.Ie=function(a){Rc(this.b.s,a)};
|
|
||||||
l.Je=function(a){setTimeout(function(){try{for(var c=[],d=Pc(this.b.s,c),e=[],f=0,h=0;h<c.length;h++){var r=c[h].byteLength;e[h]={offset:f,length:r};f+=r;f=f+3&-4}var k=JSON.stringify({buffer_infos:e,state:d}),t=16+2*k.length,t=t+3&-4,d=t+f,u=new ArrayBuffer(d),z=new Int32Array(u,0,4),G=new Uint16Array(u,16,k.length),F=new Uint8Array(u,t);z[0]=-2039052682;z[1]=3;z[2]=d;z[3]=2*k.length;for(h=0;h<k.length;h++)G[h]=k.charCodeAt(h);for(h=0;h<c.length;h++)F.set(new Uint8Array(c[h]),e[h].offset);a(null,
|
|
||||||
u)}catch(L){a(L,null)}}.bind(this),0)};l.Zf=function(){console.warn("V86Starter.prototype.get_statistics is deprecated. Use events instead.");var a={s:{Ch:this.b?this.b.s.V:0}};if(!this.b)return a;var c=this.b.s.H;c.Ma&&(a.Ma=c.Ma.Ia);c.Ka&&(a.Ka=c.Ka.Ia);c.Bd&&(a.mouse={enabled:c.Bd.ic});c.jc&&(a.vga={is_graphical:c.jc.Ia.ze});return a};l.Be=function(){return this.pe};l.Wd=function(a){for(var c=0;c<a.length;c++)this.J.send("keyboard-code",a[c])};l.eg=function(a){for(var c=0;c<a.length;c++)this.g.b(a[c])};
|
|
||||||
l.af=function(a){for(var c=0;c<a.length;c++)this.g.m(a[c])};l.vf=function(){this.m&&this.m.m()};l.wf=function(a,c){this.m&&this.m.b(a,c)};l.uf=function(){if(this.m){var a=document.getElementById("screen_container");if(a){var c=a.requestFullScreen||a.webkitRequestFullscreen||a.mozRequestFullScreen||a.msRequestFullScreen;c&&(c.call(a),(a=document.getElementsByClassName("phone_keyboard")[0])&&a.focus());this.Xd()}}};
|
|
||||||
l.Xd=function(){var a=document.body,c=a.requestPointerLock||a.mozRequestPointerLock||a.webkitRequestPointerLock;c&&c.call(a)};l.ff=function(a){this.v&&(this.v.b=a)};l.fg=function(a){this.g&&(this.g.g=a)};l.bh=function(a){for(var c=0;c<a.length;c++)this.J.send("serial0-input",a.charCodeAt(c))};l.Me=function(a,c,d){var e=this.Zb;if(e){var f=a.split("/"),f=f[f.length-1];a=sg(e,a).va;var h=""===f||-1===a;h||pg(e,f,a,c);d&&setTimeout(function(){h?d(new zg):d(null)},0)}};
|
|
||||||
l.rf=function(a,c){var d=this.Zb;if(d){var e=sg(d,a).id;-1===e?c(new zg,null):(ha(d,e),ia(d,e,function(){var a=d.g[e];a?c(null,a.subarray(0,d.b[e].size)):c(new zg,null)}))}};function zg(a){this.message=a||"File not found"}zg.prototype=Error.prototype;"undefined"!==typeof window?(window.V86Starter=n,window.V86=n):"undefined"!==typeof module&&"undefined"!==typeof module.exports?(module.exports.V86Starter=n,module.exports.V86=n):"function"===typeof importScripts&&(self.V86Starter=n,self.V86=n);
|
|
||||||
n.prototype.run=n.prototype.je;n.prototype.stop=n.prototype.Qd;n.prototype.restart=n.prototype.He;n.prototype.destroy=n.prototype.cb;n.prototype.add_listener=n.prototype.Sa;n.prototype.remove_listener=n.prototype.Zg;n.prototype.restore_state=n.prototype.Ie;n.prototype.save_state=n.prototype.Je;n.prototype.get_statistics=n.prototype.Zf;n.prototype.is_running=n.prototype.Be;n.prototype.keyboard_send_scancodes=n.prototype.Wd;n.prototype.keyboard_send_keys=n.prototype.eg;
|
|
||||||
n.prototype.keyboard_send_text=n.prototype.af;n.prototype.screen_make_screenshot=n.prototype.vf;n.prototype.screen_set_scale=n.prototype.wf;n.prototype.screen_go_fullscreen=n.prototype.uf;n.prototype.lock_mouse=n.prototype.Xd;n.prototype.mouse_set_status=n.prototype.ff;n.prototype.keyboard_set_status=n.prototype.fg;n.prototype.serial0_send=n.prototype.bh;n.prototype.create_file=n.prototype.Me;n.prototype.read_file=n.prototype.rf;
|
|
||||||
//# sourceMappingURL=v86_all.js.map
|
|