Commit d75140ed authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

viewer added

parent 4edcdbba
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
......@@ -7,17 +7,15 @@
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
......@@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
......@@ -72,7 +60,7 @@ modification follow.
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
......@@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
......@@ -631,45 +629,33 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU Affero General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.
\ No newline at end of file
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
#INSTALL:
* Copy to a known place
#USE:
* http://.../x3d_web_viewer/index.html?model=[path-to-x3d-model]
#NOTES:
* Works with x3d models of specific structure
\ No newline at end of file
[Dolphin]
Timestamp=2015,12,6,1,56,4
Version=3
ViewMode=1
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
.btn-default,
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
}
.btn-default:active,
.btn-primary:active,
.btn-success:active,
.btn-info:active,
.btn-warning:active,
.btn-danger:active,
.btn-default.active,
.btn-primary.active,
.btn-success.active,
.btn-info.active,
.btn-warning.active,
.btn-danger.active {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
.btn-default.disabled,
.btn-primary.disabled,
.btn-success.disabled,
.btn-info.disabled,
.btn-warning.disabled,
.btn-danger.disabled,
.btn-default[disabled],
.btn-primary[disabled],
.btn-success[disabled],
.btn-info[disabled],
.btn-warning[disabled],
.btn-danger[disabled],
fieldset[disabled] .btn-default,
fieldset[disabled] .btn-primary,
fieldset[disabled] .btn-success,
fieldset[disabled] .btn-info,
fieldset[disabled] .btn-warning,
fieldset[disabled] .btn-danger {
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-default .badge,
.btn-primary .badge,
.btn-success .badge,
.btn-info .badge,
.btn-warning .badge,
.btn-danger .badge {
text-shadow: none;
}
.btn:active,
.btn.active {
background-image: none;
}
.btn-default {
text-shadow: 0 1px 0 #fff;
background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #dbdbdb;
border-color: #ccc;
}
.btn-default:hover,
.btn-default:focus {
background-color: #e0e0e0;
background-position: 0 -15px;
}
.btn-default:active,
.btn-default.active {
background-color: #e0e0e0;
border-color: #dbdbdb;
}
.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
fieldset[disabled] .btn-default.focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
background-color: #e0e0e0;
background-image: none;
}
.btn-primary {
background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #245580;
}
.btn-primary:hover,
.btn-primary:focus {
background-color: #265a88;
background-position: 0 -15px;
}
.btn-primary:active,
.btn-primary.active {
background-color: #265a88;
border-color: #245580;
}
.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus,
.btn-primary[disabled].focus,
fieldset[disabled] .btn-primary.focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
background-color: #265a88;
background-image: none;
}
.btn-success {
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #3e8f3e;
}
.btn-success:hover,
.btn-success:focus {
background-color: #419641;
background-position: 0 -15px;
}
.btn-success:active,
.btn-success.active {
background-color: #419641;
border-color: #3e8f3e;
}
.btn-success.disabled,
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled.focus,
.btn-success[disabled].focus,
fieldset[disabled] .btn-success.focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
background-color: #419641;
background-image: none;
}
.btn-info {
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #28a4c9;
}
.btn-info:hover,
.btn-info:focus {
background-color: #2aabd2;
background-position: 0 -15px;
}
.btn-info:active,
.btn-info.active {
background-color: #2aabd2;
border-color: #28a4c9;
}
.btn-info.disabled,
.btn-info[disabled],
fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled.focus,
.btn-info[disabled].focus,
fieldset[disabled] .btn-info.focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
background-color: #2aabd2;
background-image: none;
}
.btn-warning {
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #e38d13;
}
.btn-warning:hover,
.btn-warning:focus {
background-color: #eb9316;
background-position: 0 -15px;
}
.btn-warning:active,
.btn-warning.active {
background-color: #eb9316;
border-color: #e38d13;
}
.btn-warning.disabled,
.btn-warning[disabled],
fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled.focus,
.btn-warning[disabled].focus,
fieldset[disabled] .btn-warning.focus,
.btn-warning.disabled:active,
.btn-warning[disabled]:active,
fieldset[disabled] .btn-warning:active,
.btn-warning.disabled.active,
.btn-warning[disabled].active,
fieldset[disabled] .btn-warning.active {
background-color: #eb9316;
background-image: none;
}
.btn-danger {
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #b92c28;
}
.btn-danger:hover,
.btn-danger:focus {
background-color: #c12e2a;
background-position: 0 -15px;
}
.btn-danger:active,
.btn-danger.active {
background-color: #c12e2a;
border-color: #b92c28;
}
.btn-danger.disabled,
.btn-danger[disabled],
fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled.focus,
.btn-danger[disabled].focus,
fieldset[disabled] .btn-danger.focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
background-color: #c12e2a;
background-image: none;
}
.thumbnail,
.img-thumbnail {
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
background-color: #e8e8e8;
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
background-repeat: repeat-x;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
background-color: #2e6da4;
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
.navbar-default {
background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .active > a {
background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
background-repeat: repeat-x;
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
}
.navbar-brand,
.navbar-nav > li > a {
text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}
.navbar-inverse {
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-radius: 4px;
}
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .active > a {
background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
background-repeat: repeat-x;
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
}
.navbar-inverse .navbar-brand,
.navbar-inverse .navbar-nav > li > a {
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
}
.navbar-static-top,
.navbar-fixed-top,
.navbar-fixed-bottom {
border-radius: 0;
}
@media (max-width: 767px) {
.navbar .navbar-nav .open .dropdown-menu > .active > a,
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #fff;
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
}
.alert {
text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
}
.alert-success {
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
background-repeat: repeat-x;
border-color: #b2dba1;
}
.alert-info {
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
background-repeat: repeat-x;
border-color: #9acfea;
}
.alert-warning {
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
background-repeat: repeat-x;
border-color: #f5e79e;
}
.alert-danger {
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
background-repeat: repeat-x;
border-color: #dca7a7;
}
.progress {
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar {
background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-success {
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-info {
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-warning {
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-danger {
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-striped {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
}
.list-group {
border-radius: 4px;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
}
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus {
text-shadow: 0 -1px 0 #286090;
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
background-repeat: repeat-x;
border-color: #2b669a;
}
.list-group-item.active .badge,
.list-group-item.active:hover .badge,
.list-group-item.active:focus .badge {
text-shadow: none;
}
.panel {
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.panel-default > .panel-heading {
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
background-repeat: repeat-x;
}
.panel-primary > .panel-heading {
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
.panel-success > .panel-heading {
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
background-repeat: repeat-x;
}
.panel-info > .panel-heading {
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
background-repeat: repeat-x;
}
.panel-warning > .panel-heading {
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
background-repeat: repeat-x;
}
.panel-danger > .panel-heading {
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
background-repeat: repeat-x;
}
.well {
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
background-repeat: repeat-x;
border-color: #dcdcdc;
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
}
/*# sourceMappingURL=bootstrap-theme.css.map */
{"version":3,"sources":["bootstrap-theme.css","less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":"AAAA;;;;GAIG;ACeH;;;;;;EAME,yCAAA;EC2CA,4FAAA;EACQ,oFAAA;CFvDT;ACgBC;;;;;;;;;;;;ECsCA,yDAAA;EACQ,iDAAA;CFxCT;ACMC;;;;;;;;;;;;;;;;;;ECiCA,yBAAA;EACQ,iBAAA;CFnBT;AC/BD;;;;;;EAuBI,kBAAA;CDgBH;ACyBC;;EAEE,uBAAA;CDvBH;AC4BD;EErEI,sEAAA;EACA,iEAAA;EACA,2FAAA;EAAA,oEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;EAuC2C,0BAAA;EAA2B,mBAAA;CDjBvE;ACpBC;;EAEE,0BAAA;EACA,6BAAA;CDsBH;ACnBC;;EAEE,0BAAA;EACA,sBAAA;CDqBH;ACfG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CD6BL;ACbD;EEtEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CD8DD;AC5DC;;EAEE,0BAAA;EACA,6BAAA;CD8DH;AC3DC;;EAEE,0BAAA;EACA,sBAAA;CD6DH;ACvDG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CDqEL;ACpDD;EEvEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CDsGD;ACpGC;;EAEE,0BAAA;EACA,6BAAA;CDsGH;ACnGC;;EAEE,0BAAA;EACA,sBAAA;CDqGH;AC/FG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CD6GL;AC3FD;E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T","file":"bootstrap-theme.css","sourcesContent":["/*!\n * Bootstrap v3.3.6 (http://getbootstrap.com)\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.btn-default:active,\n.btn-primary:active,\n.btn-success:active,\n.btn-info:active,\n.btn-warning:active,\n.btn-danger:active,\n.btn-default.active,\n.btn-primary.active,\n.btn-success.active,\n.btn-info.active,\n.btn-warning.active,\n.btn-danger.active {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-default.disabled,\n.btn-primary.disabled,\n.btn-success.disabled,\n.btn-info.disabled,\n.btn-warning.disabled,\n.btn-danger.disabled,\n.btn-default[disabled],\n.btn-primary[disabled],\n.btn-success[disabled],\n.btn-info[disabled],\n.btn-warning[disabled],\n.btn-danger[disabled],\nfieldset[disabled] .btn-default,\nfieldset[disabled] .btn-primary,\nfieldset[disabled] .btn-success,\nfieldset[disabled] .btn-info,\nfieldset[disabled] .btn-warning,\nfieldset[disabled] .btn-danger {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-default .badge,\n.btn-primary .badge,\n.btn-success .badge,\n.btn-info .badge,\n.btn-warning .badge,\n.btn-danger .badge {\n text-shadow: none;\n}\n.btn:active,\n.btn.active {\n background-image: none;\n}\n.btn-default {\n background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #dbdbdb;\n text-shadow: 0 1px 0 #fff;\n border-color: #ccc;\n}\n.btn-default:hover,\n.btn-default:focus {\n background-color: #e0e0e0;\n background-position: 0 -15px;\n}\n.btn-default:active,\n.btn-default.active {\n background-color: #e0e0e0;\n border-color: #dbdbdb;\n}\n.btn-default.disabled,\n.btn-default[disabled],\nfieldset[disabled] .btn-default,\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus,\n.btn-default.disabled:active,\n.btn-default[disabled]:active,\nfieldset[disabled] .btn-default:active,\n.btn-default.disabled.active,\n.btn-default[disabled].active,\nfieldset[disabled] .btn-default.active {\n background-color: #e0e0e0;\n background-image: none;\n}\n.btn-primary {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #245580;\n}\n.btn-primary:hover,\n.btn-primary:focus {\n background-color: #265a88;\n background-position: 0 -15px;\n}\n.btn-primary:active,\n.btn-primary.active {\n background-color: #265a88;\n border-color: #245580;\n}\n.btn-primary.disabled,\n.btn-primary[disabled],\nfieldset[disabled] .btn-primary,\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus,\n.btn-primary.disabled:active,\n.btn-primary[disabled]:active,\nfieldset[disabled] .btn-primary:active,\n.btn-primary.disabled.active,\n.btn-primary[disabled].active,\nfieldset[disabled] .btn-primary.active {\n background-color: #265a88;\n background-image: none;\n}\n.btn-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #3e8f3e;\n}\n.btn-success:hover,\n.btn-success:focus {\n background-color: #419641;\n background-position: 0 -15px;\n}\n.btn-success:active,\n.btn-success.active {\n background-color: #419641;\n border-color: #3e8f3e;\n}\n.btn-success.disabled,\n.btn-success[disabled],\nfieldset[disabled] .btn-success,\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus,\n.btn-success.disabled:active,\n.btn-success[disabled]:active,\nfieldset[disabled] .btn-success:active,\n.btn-success.disabled.active,\n.btn-success[disabled].active,\nfieldset[disabled] .btn-success.active {\n background-color: #419641;\n background-image: none;\n}\n.btn-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #28a4c9;\n}\n.btn-info:hover,\n.btn-info:focus {\n background-color: #2aabd2;\n background-position: 0 -15px;\n}\n.btn-info:active,\n.btn-info.active {\n background-color: #2aabd2;\n border-color: #28a4c9;\n}\n.btn-info.disabled,\n.btn-info[disabled],\nfieldset[disabled] .btn-info,\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus,\n.btn-info.disabled:active,\n.btn-info[disabled]:active,\nfieldset[disabled] .btn-info:active,\n.btn-info.disabled.active,\n.btn-info[disabled].active,\nfieldset[disabled] .btn-info.active {\n background-color: #2aabd2;\n background-image: none;\n}\n.btn-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #e38d13;\n}\n.btn-warning:hover,\n.btn-warning:focus {\n background-color: #eb9316;\n background-position: 0 -15px;\n}\n.btn-warning:active,\n.btn-warning.active {\n background-color: #eb9316;\n border-color: #e38d13;\n}\n.btn-warning.disabled,\n.btn-warning[disabled],\nfieldset[disabled] .btn-warning,\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus,\n.btn-warning.disabled:active,\n.btn-warning[disabled]:active,\nfieldset[disabled] .btn-warning:active,\n.btn-warning.disabled.active,\n.btn-warning[disabled].active,\nfieldset[disabled] .btn-warning.active {\n background-color: #eb9316;\n background-image: none;\n}\n.btn-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #b92c28;\n}\n.btn-danger:hover,\n.btn-danger:focus {\n background-color: #c12e2a;\n background-position: 0 -15px;\n}\n.btn-danger:active,\n.btn-danger.active {\n background-color: #c12e2a;\n border-color: #b92c28;\n}\n.btn-danger.disabled,\n.btn-danger[disabled],\nfieldset[disabled] .btn-danger,\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus,\n.btn-danger.disabled:active,\n.btn-danger[disabled]:active,\nfieldset[disabled] .btn-danger:active,\n.btn-danger.disabled.active,\n.btn-danger[disabled].active,\nfieldset[disabled] .btn-danger.active {\n background-color: #c12e2a;\n background-image: none;\n}\n.thumbnail,\n.img-thumbnail {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n background-color: #e8e8e8;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n background-color: #2e6da4;\n}\n.navbar-default {\n background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);\n}\n.navbar-inverse {\n background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);\n background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);\n background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n border-radius: 4px;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n}\n.navbar-inverse .navbar-brand,\n.navbar-inverse .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n@media (max-width: 767px) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n }\n}\n.alert {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.alert-success {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n border-color: #b2dba1;\n}\n.alert-info {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);\n border-color: #9acfea;\n}\n.alert-warning {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);\n border-color: #f5e79e;\n}\n.alert-danger {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);\n border-color: #dca7a7;\n}\n.progress {\n background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);\n}\n.progress-bar {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);\n}\n.progress-bar-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);\n}\n.progress-bar-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);\n}\n.progress-bar-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);\n}\n.progress-bar-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);\n}\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.list-group {\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 #286090;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);\n border-color: #2b669a;\n}\n.list-group-item.active .badge,\n.list-group-item.active:hover .badge,\n.list-group-item.active:focus .badge {\n text-shadow: none;\n}\n.panel {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.panel-default > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n}\n.panel-primary > .panel-heading {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n}\n.panel-success > .panel-heading {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);\n}\n.panel-info > .panel-heading {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);\n}\n.panel-warning > .panel-heading {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);\n}\n.panel-danger > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);\n}\n.well {\n background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);\n border-color: #dcdcdc;\n -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n/*# sourceMappingURL=bootstrap-theme.css.map */","/*!\n * Bootstrap v3.3.6 (http://getbootstrap.com)\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n .box-shadow(none);\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &.focus,\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n border-radius: @navbar-border-radius;\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: #fff;\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n }\n }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]}
\ No newline at end of file
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
/*# sourceMappingURL=bootstrap-theme.min.css.map */
\ No newline at end of file
{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":";;;;AAmBA,YAAA,aAAA,UAAA,aAAA,aAAA,aAME,YAAA,EAAA,KAAA,EAAA,eC2CA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBDvCR,mBAAA,mBAAA,oBAAA,oBAAA,iBAAA,iBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBCsCA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBDlCR,qBAAA,sBAAA,sBAAA,uBAAA,mBAAA,oBAAA,sBAAA,uBAAA,sBAAA,uBAAA,sBAAA,uBAAA,+BAAA,gCAAA,6BAAA,gCAAA,gCAAA,gCCiCA,mBAAA,KACQ,WAAA,KDlDV,mBAAA,oBAAA,iBAAA,oBAAA,oBAAA,oBAuBI,YAAA,KAyCF,YAAA,YAEE,iBAAA,KAKJ,aErEI,YAAA,EAAA,IAAA,EAAA,KACA,iBAAA,iDACA,iBAAA,4CAAA,iBAAA,qEAEA,iBAAA,+CCnBF,OAAA,+GH4CA,OAAA,0DACA,kBAAA,SAuC2C,aAAA,QAA2B,aAAA,KArCtE,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAA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ACA,kBAAA,SF4PJ,8BEhQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF6PJ,6BEjQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFoQJ,MExQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFsQF,aAAA,QC3NA,mBAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA,qBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA"}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"version":3,"sources":["less/normalize.less","less/print.less","bootstrap.css","dist/css/bootstrap.css","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labels.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/mixins/reset-text.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":";;;;4EAQA,KACE,YAAA,WACA,yBAAA,KACA,qBAAA,KAOF,KACE,OAAA,EAaF,QAAA,MAAA,QAAA,WAAA,OAAA,OAAA,OAAA,OAAA,KAAA,KAAA,IAAA,QAAA,QAaE,QAAA,MAQF,MAAA,OAAA,SAAA,MAIE,QAAA,aACA,eAAA,SAQF,sBACE,QAAA,KACA,OAAA,EAQF,SAAA,SAEE,QAAA,KAUF,EACE,iBAAA,YAQF,SAAA,QAEE,QAAA,EAUF,YACE,cAAA,IAAA,OAOF,EAAA,OAEE,YAAA,IAOF,IACE,WAAA,OAQF,GACE,OAAA,MAAA,EACA,UAAA,IAOF,KACE,MAAA,KACA,WAAA,KAOF,MACE,UAAA,IAOF,IAAA,IAEE,SAAA,SACA,UAAA,IACA,YAAA,EACA,eAAA,SAGF,IACE,IAAA,MAGF,IACE,OAAA,OAUF,IACE,OAAA,EAOF,eACE,SAAA,OAUF,OACE,OAAA,IAAA,KAOF,GACE,OAAA,EAAA,mBAAA,YAAA,gBAAA,YACA,WAAA,YAOF,IACE,SAAA,KAOF,KAAA,IAAA,IAAA,KAIE,YAAA,UAAA,UACA,UAAA,IAkBF,OAAA,MAAA,SAAA,OAAA,SAKE,OAAA,EACA,KAAA,QACA,MAAA,QAOF,OACE,SAAA,QAUF,OAAA,OAEE,eAAA,KAWF,OAAA,wBAAA,kBAAA,mBAIE,mBAAA,OACA,OAAA,QAOF,iBAAA,qBAEE,OAAA,QAOF,yBAAA,wBAEE,QAAA,EACA,OAAA,EAQF,MACE,YAAA,OAWF,qBAAA,kBAEE,mBAAA,WAAA,gBAAA,WAAA,WAAA,WACA,QAAA,EASF,8CAAA,8CAEE,OAAA,KAQF,mBACE,mBAAA,YACA,gBAAA,YAAA,WAAA,YAA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AcE,QAAS,iB/Ds3MZ,sB+Dn4MC,QAAS,e/Ds4MV,a+Dh4MC,sBAOE,QAAS,kB/D83MZ,4B+D/3MC,QAAS,eCpLT,ahEujNC,4BACF,QAAA,wBC6BD,aACE,cACE,QAAS"}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license
*/
if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\'s JavaScript requires jQuery')
}
+function ($) {
'use strict';
var version = $.fn.jquery.split(' ')[0].split('.')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) {
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')
}
}(jQuery);
/* ========================================================================
* Bootstrap: transition.js v3.3.6
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
function transitionEnd() {
var el = document.createElement('bootstrap')
var transEndEventNames = {
WebkitTransition : 'webkitTransitionEnd',
MozTransition : 'transitionend',
OTransition : 'oTransitionEnd otransitionend',
transition : 'transitionend'
}
for (var name in transEndEventNames) {
if (el.style[name] !== undefined) {
return { end: transEndEventNames[name] }
}
}
return false // explicit for ie8 ( ._.)
}
// http://blog.alexmaccaw.com/css-transitions
$.fn.emulateTransitionEnd = function (duration) {
var called = false
var $el = this
$(this).one('bsTransitionEnd', function () { called = true })
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
setTimeout(callback, duration)
return this
}
$(function () {
$.support.transition = transitionEnd()
if (!$.support.transition) return
$.event.special.bsTransitionEnd = {
bindType: $.support.transition.end,
delegateType: $.support.transition.end,
handle: function (e) {
if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
}
}
})
}(jQuery);
/* ========================================================================
* Bootstrap: alert.js v3.3.6
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// ALERT CLASS DEFINITION
// ======================
var dismiss = '[data-dismiss="alert"]'
var Alert = function (el) {
$(el).on('click', dismiss, this.close)
}
Alert.VERSION = '3.3.6'
Alert.TRANSITION_DURATION = 150
Alert.prototype.close = function (e) {
var $this = $(this)
var selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
var $parent = $(selector)
if (e) e.preventDefault()
if (!$parent.length) {
$parent = $this.closest('.alert')
}
$parent.trigger(e = $.Event('close.bs.alert'))
if (e.isDefaultPrevented()) return
$parent.removeClass('in')
function removeElement() {
// detach from parent, fire event then clean up data
$parent.detach().trigger('closed.bs.alert').remove()
}
$.support.transition && $parent.hasClass('fade') ?
$parent
.one('bsTransitionEnd', removeElement)
.emulateTransitionEnd(Alert.TRANSITION_DURATION) :
removeElement()
}
// ALERT PLUGIN DEFINITION
// =======================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.alert')
if (!data) $this.data('bs.alert', (data = new Alert(this)))
if (typeof option == 'string') data[option].call($this)
})
}
var old = $.fn.alert
$.fn.alert = Plugin
$.fn.alert.Constructor = Alert
// ALERT NO CONFLICT
// =================
$.fn.alert.noConflict = function () {
$.fn.alert = old
return this
}
// ALERT DATA-API
// ==============
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
}(jQuery);
/* ========================================================================
* Bootstrap: button.js v3.3.6
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// BUTTON PUBLIC CLASS DEFINITION
// ==============================
var Button = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, Button.DEFAULTS, options)
this.isLoading = false
}
Button.VERSION = '3.3.6'
Button.DEFAULTS = {
loadingText: 'loading...'
}
Button.prototype.setState = function (state) {
var d = 'disabled'
var $el = this.$element
var val = $el.is('input') ? 'val' : 'html'
var data = $el.data()
state += 'Text'
if (data.resetText == null) $el.data('resetText', $el[val]())
// push to event loop to allow forms to submit
setTimeout($.proxy(function () {
$el[val](data[state] == null ? this.options[state] : data[state])
if (state == 'loadingText') {
this.isLoading = true
$el.addClass(d).attr(d, d)
} else if (this.isLoading) {
this.isLoading = false
$el.removeClass(d).removeAttr(d)
}
}, this), 0)
}
Button.prototype.toggle = function () {
var changed = true
var $parent = this.$element.closest('[data-toggle="buttons"]')
if ($parent.length) {
var $input = this.$element.find('input')
if ($input.prop('type') == 'radio') {
if ($input.prop('checked')) changed = false
$parent.find('.active').removeClass('active')
this.$element.addClass('active')
} else if ($input.prop('type') == 'checkbox') {
if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
this.$element.toggleClass('active')
}
$input.prop('checked', this.$element.hasClass('active'))
if (changed) $input.trigger('change')
} else {
this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
this.$element.toggleClass('active')
}
}
// BUTTON PLUGIN DEFINITION
// ========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.button')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.button', (data = new Button(this, options)))
if (option == 'toggle') data.toggle()
else if (option) data.setState(option)
})
}
var old = $.fn.button
$.fn.button = Plugin
$.fn.button.Constructor = Button
// BUTTON NO CONFLICT
// ==================
$.fn.button.noConflict = function () {
$.fn.button = old
return this
}
// BUTTON DATA-API
// ===============
$(document)
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
Plugin.call($btn, 'toggle')
if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
})
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
})
}(jQuery);
/* ========================================================================
* Bootstrap: carousel.js v3.3.6
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// CAROUSEL CLASS DEFINITION
// =========================
var Carousel = function (element, options) {
this.$element = $(element)
this.$indicators = this.$element.find('.carousel-indicators')
this.options = options
this.paused = null
this.sliding = null
this.interval = null
this.$active = null
this.$items = null
this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
Carousel.VERSION = '3.3.6'
Carousel.TRANSITION_DURATION = 600
Carousel.DEFAULTS = {
interval: 5000,
pause: 'hover',
wrap: true,
keyboard: true
}
Carousel.prototype.keydown = function (e) {
if (/input|textarea/i.test(e.target.tagName)) return
switch (e.which) {
case 37: this.prev(); break
case 39: this.next(); break
default: return
}
e.preventDefault()
}
Carousel.prototype.cycle = function (e) {
e || (this.paused = false)
this.interval && clearInterval(this.interval)
this.options.interval
&& !this.paused
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
return this
}
Carousel.prototype.getItemIndex = function (item) {
this.$items = item.parent().children('.item')
return this.$items.index(item || this.$active)
}
Carousel.prototype.getItemForDirection = function (direction, active) {
var activeIndex = this.getItemIndex(active)
var willWrap = (direction == 'prev' && activeIndex === 0)
|| (direction == 'next' && activeIndex == (this.$items.length - 1))
if (willWrap && !this.options.wrap) return active
var delta = direction == 'prev' ? -1 : 1
var itemIndex = (activeIndex + delta) % this.$items.length
return this.$items.eq(itemIndex)
}
Carousel.prototype.to = function (pos) {
var that = this
var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
if (pos > (this.$items.length - 1) || pos < 0) return
if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
if (activeIndex == pos) return this.pause().cycle()
return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
}
Carousel.prototype.pause = function (e) {
e || (this.paused = true)
if (this.$element.find('.next, .prev').length && $.support.transition) {
this.$element.trigger($.support.transition.end)
this.cycle(true)
}
this.interval = clearInterval(this.interval)
return this
}
Carousel.prototype.next = function () {
if (this.sliding) return
return this.slide('next')
}
Carousel.prototype.prev = function () {
if (this.sliding) return
return this.slide('prev')
}
Carousel.prototype.slide = function (type, next) {
var $active = this.$element.find('.item.active')
var $next = next || this.getItemForDirection(type, $active)
var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right'
var that = this
if ($next.hasClass('active')) return (this.sliding = false)
var relatedTarget = $next[0]
var slideEvent = $.Event('slide.bs.carousel', {
relatedTarget: relatedTarget,
direction: direction
})
this.$element.trigger(slideEvent)
if (slideEvent.isDefaultPrevented()) return
this.sliding = true
isCycling && this.pause()
if (this.$indicators.length) {
this.$indicators.find('.active').removeClass('active')
var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
$nextIndicator && $nextIndicator.addClass('active')
}
var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
if ($.support.transition && this.$element.hasClass('slide')) {
$next.addClass(type)
$next[0].offsetWidth // force reflow
$active.addClass(direction)
$next.addClass(direction)
$active
.one('bsTransitionEnd', function () {
$next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' '))
that.sliding = false
setTimeout(function () {
that.$element.trigger(slidEvent)
}, 0)
})
.emulateTransitionEnd(Carousel.TRANSITION_DURATION)
} else {
$active.removeClass('active')
$next.addClass('active')
this.sliding = false
this.$element.trigger(slidEvent)
}
isCycling && this.cycle()
return this
}
// CAROUSEL PLUGIN DEFINITION
// ==========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.carousel')
var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
var action = typeof option == 'string' ? option : options.slide
if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
if (typeof option == 'number') data.to(option)
else if (action) data[action]()
else if (options.interval) data.pause().cycle()
})
}
var old = $.fn.carousel
$.fn.carousel = Plugin
$.fn.carousel.Constructor = Carousel
// CAROUSEL NO CONFLICT
// ====================
$.fn.carousel.noConflict = function () {
$.fn.carousel = old
return this
}
// CAROUSEL DATA-API
// =================
var clickHandler = function (e) {
var href
var $this = $(this)
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
if (!$target.hasClass('carousel')) return
var options = $.extend({}, $target.data(), $this.data())
var slideIndex = $this.attr('data-slide-to')
if (slideIndex) options.interval = false
Plugin.call($target, options)
if (slideIndex) {
$target.data('bs.carousel').to(slideIndex)
}
e.preventDefault()
}
$(document)
.on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
.on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
$(window).on('load', function () {
$('[data-ride="carousel"]').each(function () {
var $carousel = $(this)
Plugin.call($carousel, $carousel.data())
})
})
}(jQuery);
/* ========================================================================
* Bootstrap: collapse.js v3.3.6
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// COLLAPSE PUBLIC CLASS DEFINITION
// ================================
var Collapse = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, Collapse.DEFAULTS, options)
this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
'[data-toggle="collapse"][data-target="#' + element.id + '"]')
this.transitioning = null
if (this.options.parent) {
this.$parent = this.getParent()
} else {
this.addAriaAndCollapsedClass(this.$element, this.$trigger)
}
if (this.options.toggle) this.toggle()
}
Collapse.VERSION = '3.3.6'
Collapse.TRANSITION_DURATION = 350
Collapse.DEFAULTS = {
toggle: true
}
Collapse.prototype.dimension = function () {
var hasWidth = this.$element.hasClass('width')
return hasWidth ? 'width' : 'height'
}
Collapse.prototype.show = function () {
if (this.transitioning || this.$element.hasClass('in')) return
var activesData
var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
if (actives && actives.length) {
activesData = actives.data('bs.collapse')
if (activesData && activesData.transitioning) return
}
var startEvent = $.Event('show.bs.collapse')
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
if (actives && actives.length) {
Plugin.call(actives, 'hide')
activesData || actives.data('bs.collapse', null)
}
var dimension = this.dimension()
this.$element
.removeClass('collapse')
.addClass('collapsing')[dimension](0)
.attr('aria-expanded', true)
this.$trigger
.removeClass('collapsed')
.attr('aria-expanded', true)
this.transitioning = 1
var complete = function () {
this.$element
.removeClass('collapsing')
.addClass('collapse in')[dimension]('')
this.transitioning = 0
this.$element
.trigger('shown.bs.collapse')
}
if (!$.support.transition) return complete.call(this)
var scrollSize = $.camelCase(['scroll', dimension].join('-'))
this.$element
.one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
}
Collapse.prototype.hide = function () {
if (this.transitioning || !this.$element.hasClass('in')) return
var startEvent = $.Event('hide.bs.collapse')
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
var dimension = this.dimension()
this.$element[dimension](this.$element[dimension]())[0].offsetHeight
this.$element
.addClass('collapsing')
.removeClass('collapse in')
.attr('aria-expanded', false)
this.$trigger
.addClass('collapsed')
.attr('aria-expanded', false)
this.transitioning = 1
var complete = function () {
this.transitioning = 0
this.$element
.removeClass('collapsing')
.addClass('collapse')
.trigger('hidden.bs.collapse')
}
if (!$.support.transition) return complete.call(this)
this.$element
[dimension](0)
.one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(Collapse.TRANSITION_DURATION)
}
Collapse.prototype.toggle = function () {
this[this.$element.hasClass('in') ? 'hide' : 'show']()
}
Collapse.prototype.getParent = function () {
return $(this.options.parent)
.find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
.each($.proxy(function (i, element) {
var $element = $(element)
this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
}, this))
.end()
}
Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
var isOpen = $element.hasClass('in')
$element.attr('aria-expanded', isOpen)
$trigger
.toggleClass('collapsed', !isOpen)
.attr('aria-expanded', isOpen)
}
function getTargetFromTrigger($trigger) {
var href
var target = $trigger.attr('data-target')
|| (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
return $(target)
}
// COLLAPSE PLUGIN DEFINITION
// ==========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.collapse')
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.collapse
$.fn.collapse = Plugin
$.fn.collapse.Constructor = Collapse
// COLLAPSE NO CONFLICT
// ====================
$.fn.collapse.noConflict = function () {
$.fn.collapse = old
return this
}
// COLLAPSE DATA-API
// =================
$(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
var $this = $(this)
if (!$this.attr('data-target')) e.preventDefault()
var $target = getTargetFromTrigger($this)
var data = $target.data('bs.collapse')
var option = data ? 'toggle' : $this.data()
Plugin.call($target, option)
})
}(jQuery);
/* ========================================================================
* Bootstrap: dropdown.js v3.3.6
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// DROPDOWN CLASS DEFINITION
// =========================
var backdrop = '.dropdown-backdrop'
var toggle = '[data-toggle="dropdown"]'
var Dropdown = function (element) {
$(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.VERSION = '3.3.6'
function getParent($this) {
var selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
var $parent = selector && $(selector)
return $parent && $parent.length ? $parent : $this.parent()
}
function clearMenus(e) {
if (e && e.which === 3) return
$(backdrop).remove()
$(toggle).each(function () {
var $this = $(this)
var $parent = getParent($this)
var relatedTarget = { relatedTarget: this }
if (!$parent.hasClass('open')) return
if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return
$this.attr('aria-expanded', 'false')
$parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
})
}
Dropdown.prototype.toggle = function (e) {
var $this = $(this)
if ($this.is('.disabled, :disabled')) return
var $parent = getParent($this)
var isActive = $parent.hasClass('open')
clearMenus()
if (!isActive) {
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
// if mobile we use a backdrop because click events don't delegate
$(document.createElement('div'))
.addClass('dropdown-backdrop')
.insertAfter($(this))
.on('click', clearMenus)
}
var relatedTarget = { relatedTarget: this }
$parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return
$this
.trigger('focus')
.attr('aria-expanded', 'true')
$parent
.toggleClass('open')
.trigger($.Event('shown.bs.dropdown', relatedTarget))
}
return false
}
Dropdown.prototype.keydown = function (e) {
if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
var $this = $(this)
e.preventDefault()
e.stopPropagation()
if ($this.is('.disabled, :disabled')) return
var $parent = getParent($this)
var isActive = $parent.hasClass('open')
if (!isActive && e.which != 27 || isActive && e.which == 27) {
if (e.which == 27) $parent.find(toggle).trigger('focus')
return $this.trigger('click')
}
var desc = ' li:not(.disabled):visible a'
var $items = $parent.find('.dropdown-menu' + desc)
if (!$items.length) return
var index = $items.index(e.target)
if (e.which == 38 && index > 0) index-- // up
if (e.which == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0
$items.eq(index).trigger('focus')
}
// DROPDOWN PLUGIN DEFINITION
// ==========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.dropdown')
if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}
var old = $.fn.dropdown
$.fn.dropdown = Plugin
$.fn.dropdown.Constructor = Dropdown
// DROPDOWN NO CONFLICT
// ====================
$.fn.dropdown.noConflict = function () {
$.fn.dropdown = old
return this
}
// APPLY TO STANDARD DROPDOWN ELEMENTS
// ===================================
$(document)
.on('click.bs.dropdown.data-api', clearMenus)
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
}(jQuery);
/* ========================================================================
* Bootstrap: modal.js v3.3.6
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// MODAL CLASS DEFINITION
// ======================
var Modal = function (element, options) {
this.options = options
this.$body = $(document.body)
this.$element = $(element)
this.$dialog = this.$element.find('.modal-dialog')
this.$backdrop = null
this.isShown = null
this.originalBodyPad = null
this.scrollbarWidth = 0
this.ignoreBackdropClick = false
if (this.options.remote) {
this.$element
.find('.modal-content')
.load(this.options.remote, $.proxy(function () {
this.$element.trigger('loaded.bs.modal')
}, this))
}
}
Modal.VERSION = '3.3.6'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
Modal.DEFAULTS = {
backdrop: true,
keyboard: true,
show: true
}
Modal.prototype.toggle = function (_relatedTarget) {
return this.isShown ? this.hide() : this.show(_relatedTarget)
}
Modal.prototype.show = function (_relatedTarget) {
var that = this
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
this.$element.trigger(e)
if (this.isShown || e.isDefaultPrevented()) return
this.isShown = true
this.checkScrollbar()
this.setScrollbar()
this.$body.addClass('modal-open')
this.escape()
this.resize()
this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
this.$dialog.on('mousedown.dismiss.bs.modal', function () {
that.$element.one('mouseup.dismiss.bs.modal', function (e) {
if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
})
})
this.backdrop(function () {
var transition = $.support.transition && that.$element.hasClass('fade')
if (!that.$element.parent().length) {
that.$element.appendTo(that.$body) // don't move modals dom position
}
that.$element
.show()
.scrollTop(0)
that.adjustDialog()
if (transition) {
that.$element[0].offsetWidth // force reflow
}
that.$element.addClass('in')
that.enforceFocus()
var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
transition ?
that.$dialog // wait for modal to slide in
.one('bsTransitionEnd', function () {
that.$element.trigger('focus').trigger(e)
})
.emulateTransitionEnd(Modal.TRANSITION_DURATION) :
that.$element.trigger('focus').trigger(e)
})
}
Modal.prototype.hide = function (e) {
if (e) e.preventDefault()
e = $.Event('hide.bs.modal')
this.$element.trigger(e)
if (!this.isShown || e.isDefaultPrevented()) return
this.isShown = false
this.escape()
this.resize()
$(document).off('focusin.bs.modal')
this.$element
.removeClass('in')
.off('click.dismiss.bs.modal')
.off('mouseup.dismiss.bs.modal')
this.$dialog.off('mousedown.dismiss.bs.modal')
$.support.transition && this.$element.hasClass('fade') ?
this.$element
.one('bsTransitionEnd', $.proxy(this.hideModal, this))
.emulateTransitionEnd(Modal.TRANSITION_DURATION) :
this.hideModal()
}
Modal.prototype.enforceFocus = function () {
$(document)
.off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', $.proxy(function (e) {
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
this.$element.trigger('focus')
}
}, this))
}
Modal.prototype.escape = function () {
if (this.isShown && this.options.keyboard) {
this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
e.which == 27 && this.hide()
}, this))
} else if (!this.isShown) {
this.$element.off('keydown.dismiss.bs.modal')
}
}
Modal.prototype.resize = function () {
if (this.isShown) {
$(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
} else {
$(window).off('resize.bs.modal')
}
}
Modal.prototype.hideModal = function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.$body.removeClass('modal-open')
that.resetAdjustments()
that.resetScrollbar()
that.$element.trigger('hidden.bs.modal')
})
}
Modal.prototype.removeBackdrop = function () {
this.$backdrop && this.$backdrop.remove()
this.$backdrop = null
}
Modal.prototype.backdrop = function (callback) {
var that = this
var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
var doAnimate = $.support.transition && animate
this.$backdrop = $(document.createElement('div'))
.addClass('modal-backdrop ' + animate)
.appendTo(this.$body)
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
if (this.ignoreBackdropClick) {
this.ignoreBackdropClick = false
return
}
if (e.target !== e.currentTarget) return
this.options.backdrop == 'static'
? this.$element[0].focus()
: this.hide()
}, this))
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
this.$backdrop.addClass('in')
if (!callback) return
doAnimate ?
this.$backdrop
.one('bsTransitionEnd', callback)
.emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
callback()
} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass('in')
var callbackRemove = function () {
that.removeBackdrop()
callback && callback()
}
$.support.transition && this.$element.hasClass('fade') ?
this.$backdrop
.one('bsTransitionEnd', callbackRemove)
.emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
callbackRemove()
} else if (callback) {
callback()
}
}
// these following methods are used to handle overflowing modals
Modal.prototype.handleUpdate = function () {
this.adjustDialog()
}
Modal.prototype.adjustDialog = function () {
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
this.$element.css({
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
})
}
Modal.prototype.resetAdjustments = function () {
this.$element.css({
paddingLeft: '',
paddingRight: ''
})
}
Modal.prototype.checkScrollbar = function () {
var fullWindowWidth = window.innerWidth
if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
var documentElementRect = document.documentElement.getBoundingClientRect()
fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
}
this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
this.scrollbarWidth = this.measureScrollbar()
}
Modal.prototype.setScrollbar = function () {
var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
this.originalBodyPad = document.body.style.paddingRight || ''
if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
}
Modal.prototype.resetScrollbar = function () {
this.$body.css('padding-right', this.originalBodyPad)
}
Modal.prototype.measureScrollbar = function () { // thx walsh
var scrollDiv = document.createElement('div')
scrollDiv.className = 'modal-scrollbar-measure'
this.$body.append(scrollDiv)
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
this.$body[0].removeChild(scrollDiv)
return scrollbarWidth
}
// MODAL PLUGIN DEFINITION
// =======================
function Plugin(option, _relatedTarget) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.modal')
var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
if (typeof option == 'string') data[option](_relatedTarget)
else if (options.show) data.show(_relatedTarget)
})
}
var old = $.fn.modal
$.fn.modal = Plugin
$.fn.modal.Constructor = Modal
// MODAL NO CONFLICT
// =================
$.fn.modal.noConflict = function () {
$.fn.modal = old
return this
}
// MODAL DATA-API
// ==============
$(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
var $this = $(this)
var href = $this.attr('href')
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
if ($this.is('a')) e.preventDefault()
$target.one('show.bs.modal', function (showEvent) {
if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
$target.one('hidden.bs.modal', function () {
$this.is(':visible') && $this.trigger('focus')
})
})
Plugin.call($target, option, this)
})
}(jQuery);
/* ========================================================================
* Bootstrap: tooltip.js v3.3.6
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// TOOLTIP PUBLIC CLASS DEFINITION
// ===============================
var Tooltip = function (element, options) {
this.type = null
this.options = null
this.enabled = null
this.timeout = null
this.hoverState = null
this.$element = null
this.inState = null
this.init('tooltip', element, options)
}
Tooltip.VERSION = '3.3.6'
Tooltip.TRANSITION_DURATION = 150
Tooltip.DEFAULTS = {
animation: true,
placement: 'top',
selector: false,
template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
trigger: 'hover focus',
title: '',
delay: 0,
html: false,
container: false,
viewport: {
selector: 'body',
padding: 0
}
}
Tooltip.prototype.init = function (type, element, options) {
this.enabled = true
this.type = type
this.$element = $(element)
this.options = this.getOptions(options)
this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
this.inState = { click: false, hover: false, focus: false }
if (this.$element[0] instanceof document.constructor && !this.options.selector) {
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
}
var triggers = this.options.trigger.split(' ')
for (var i = triggers.length; i--;) {
var trigger = triggers[i]
if (trigger == 'click') {
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
} else if (trigger != 'manual') {
var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
}
}
this.options.selector ?
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
this.fixTitle()
}
Tooltip.prototype.getDefaults = function () {
return Tooltip.DEFAULTS
}
Tooltip.prototype.getOptions = function (options) {
options = $.extend({}, this.getDefaults(), this.$element.data(), options)
if (options.delay && typeof options.delay == 'number') {
options.delay = {
show: options.delay,
hide: options.delay
}
}
return options
}
Tooltip.prototype.getDelegateOptions = function () {
var options = {}
var defaults = this.getDefaults()
this._options && $.each(this._options, function (key, value) {
if (defaults[key] != value) options[key] = value
})
return options
}
Tooltip.prototype.enter = function (obj) {
var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget).data('bs.' + this.type)
if (!self) {
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
$(obj.currentTarget).data('bs.' + this.type, self)
}
if (obj instanceof $.Event) {
self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
}
if (self.tip().hasClass('in') || self.hoverState == 'in') {
self.hoverState = 'in'
return
}
clearTimeout(self.timeout)
self.hoverState = 'in'
if (!self.options.delay || !self.options.delay.show) return self.show()
self.timeout = setTimeout(function () {
if (self.hoverState == 'in') self.show()
}, self.options.delay.show)
}
Tooltip.prototype.isInStateTrue = function () {
for (var key in this.inState) {
if (this.inState[key]) return true
}
return false
}
Tooltip.prototype.leave = function (obj) {
var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget).data('bs.' + this.type)
if (!self) {
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
$(obj.currentTarget).data('bs.' + this.type, self)
}
if (obj instanceof $.Event) {
self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
}
if (self.isInStateTrue()) return
clearTimeout(self.timeout)
self.hoverState = 'out'
if (!self.options.delay || !self.options.delay.hide) return self.hide()
self.timeout = setTimeout(function () {
if (self.hoverState == 'out') self.hide()
}, self.options.delay.hide)
}
Tooltip.prototype.show = function () {
var e = $.Event('show.bs.' + this.type)
if (this.hasContent() && this.enabled) {
this.$element.trigger(e)
var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
if (e.isDefaultPrevented() || !inDom) return
var that = this
var $tip = this.tip()
var tipId = this.getUID(this.type)
this.setContent()
$tip.attr('id', tipId)
this.$element.attr('aria-describedby', tipId)
if (this.options.animation) $tip.addClass('fade')
var placement = typeof this.options.placement == 'function' ?
this.options.placement.call(this, $tip[0], this.$element[0]) :
this.options.placement
var autoToken = /\s?auto?\s?/i
var autoPlace = autoToken.test(placement)
if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
$tip
.detach()
.css({ top: 0, left: 0, display: 'block' })
.addClass(placement)
.data('bs.' + this.type, this)
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
this.$element.trigger('inserted.bs.' + this.type)
var pos = this.getPosition()
var actualWidth = $tip[0].offsetWidth
var actualHeight = $tip[0].offsetHeight
if (autoPlace) {
var orgPlacement = placement
var viewportDim = this.getPosition(this.$viewport)
placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
placement
$tip
.removeClass(orgPlacement)
.addClass(placement)
}
var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
this.applyPlacement(calculatedOffset, placement)
var complete = function () {
var prevHoverState = that.hoverState
that.$element.trigger('shown.bs.' + that.type)
that.hoverState = null
if (prevHoverState == 'out') that.leave(that)
}
$.support.transition && this.$tip.hasClass('fade') ?
$tip
.one('bsTransitionEnd', complete)
.emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
complete()
}
}
Tooltip.prototype.applyPlacement = function (offset, placement) {
var $tip = this.tip()
var width = $tip[0].offsetWidth
var height = $tip[0].offsetHeight
// manually read margins because getBoundingClientRect includes difference
var marginTop = parseInt($tip.css('margin-top'), 10)
var marginLeft = parseInt($tip.css('margin-left'), 10)
// we must check for NaN for ie 8/9
if (isNaN(marginTop)) marginTop = 0
if (isNaN(marginLeft)) marginLeft = 0
offset.top += marginTop
offset.left += marginLeft
// $.fn.offset doesn't round pixel values
// so we use setOffset directly with our own function B-0
$.offset.setOffset($tip[0], $.extend({
using: function (props) {
$tip.css({
top: Math.round(props.top),
left: Math.round(props.left)
})
}
}, offset), 0)
$tip.addClass('in')
// check to see if placing tip in new offset caused the tip to resize itself
var actualWidth = $tip[0].offsetWidth
var actualHeight = $tip[0].offsetHeight
if (placement == 'top' && actualHeight != height) {
offset.top = offset.top + height - actualHeight
}
var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
if (delta.left) offset.left += delta.left
else offset.top += delta.top
var isVertical = /top|bottom/.test(placement)
var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
$tip.offset(offset)
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
}
Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
this.arrow()
.css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
.css(isVertical ? 'top' : 'left', '')
}
Tooltip.prototype.setContent = function () {
var $tip = this.tip()
var title = this.getTitle()
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
$tip.removeClass('fade in top bottom left right')
}
Tooltip.prototype.hide = function (callback) {
var that = this
var $tip = $(this.$tip)
var e = $.Event('hide.bs.' + this.type)
function complete() {
if (that.hoverState != 'in') $tip.detach()
that.$element
.removeAttr('aria-describedby')
.trigger('hidden.bs.' + that.type)
callback && callback()
}
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$tip.removeClass('in')
$.support.transition && $tip.hasClass('fade') ?
$tip
.one('bsTransitionEnd', complete)
.emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
complete()
this.hoverState = null
return this
}
Tooltip.prototype.fixTitle = function () {
var $e = this.$element
if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
}
}
Tooltip.prototype.hasContent = function () {
return this.getTitle()
}
Tooltip.prototype.getPosition = function ($element) {
$element = $element || this.$element
var el = $element[0]
var isBody = el.tagName == 'BODY'
var elRect = el.getBoundingClientRect()
if (elRect.width == null) {
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
}
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
return $.extend({}, elRect, scroll, outerDims, elOffset)
}
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
}
Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
var delta = { top: 0, left: 0 }
if (!this.$viewport) return delta
var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
var viewportDimensions = this.getPosition(this.$viewport)
if (/right|left/.test(placement)) {
var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
if (topEdgeOffset < viewportDimensions.top) { // top overflow
delta.top = viewportDimensions.top - topEdgeOffset
} else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
}
} else {
var leftEdgeOffset = pos.left - viewportPadding
var rightEdgeOffset = pos.left + viewportPadding + actualWidth
if (leftEdgeOffset < viewportDimensions.left) { // left overflow
delta.left = viewportDimensions.left - leftEdgeOffset
} else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
}
}
return delta
}
Tooltip.prototype.getTitle = function () {
var title
var $e = this.$element
var o = this.options
title = $e.attr('data-original-title')
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
return title
}
Tooltip.prototype.getUID = function (prefix) {
do prefix += ~~(Math.random() * 1000000)
while (document.getElementById(prefix))
return prefix
}
Tooltip.prototype.tip = function () {
if (!this.$tip) {
this.$tip = $(this.options.template)
if (this.$tip.length != 1) {
throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
}
}
return this.$tip
}
Tooltip.prototype.arrow = function () {
return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
}
Tooltip.prototype.enable = function () {
this.enabled = true
}
Tooltip.prototype.disable = function () {
this.enabled = false
}
Tooltip.prototype.toggleEnabled = function () {
this.enabled = !this.enabled
}
Tooltip.prototype.toggle = function (e) {
var self = this
if (e) {
self = $(e.currentTarget).data('bs.' + this.type)
if (!self) {
self = new this.constructor(e.currentTarget, this.getDelegateOptions())
$(e.currentTarget).data('bs.' + this.type, self)
}
}
if (e) {
self.inState.click = !self.inState.click
if (self.isInStateTrue()) self.enter(self)
else self.leave(self)
} else {
self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
}
}
Tooltip.prototype.destroy = function () {
var that = this
clearTimeout(this.timeout)
this.hide(function () {
that.$element.off('.' + that.type).removeData('bs.' + that.type)
if (that.$tip) {
that.$tip.detach()
}
that.$tip = null
that.$arrow = null
that.$viewport = null
})
}
// TOOLTIP PLUGIN DEFINITION
// =========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tooltip')
var options = typeof option == 'object' && option
if (!data && /destroy|hide/.test(option)) return
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.tooltip
$.fn.tooltip = Plugin
$.fn.tooltip.Constructor = Tooltip
// TOOLTIP NO CONFLICT
// ===================
$.fn.tooltip.noConflict = function () {
$.fn.tooltip = old
return this
}
}(jQuery);
/* ========================================================================
* Bootstrap: popover.js v3.3.6
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// POPOVER PUBLIC CLASS DEFINITION
// ===============================
var Popover = function (element, options) {
this.init('popover', element, options)
}
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
Popover.VERSION = '3.3.6'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
})
// NOTE: POPOVER EXTENDS tooltip.js
// ================================
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
Popover.prototype.constructor = Popover
Popover.prototype.getDefaults = function () {
return Popover.DEFAULTS
}
Popover.prototype.setContent = function () {
var $tip = this.tip()
var title = this.getTitle()
var content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
$tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
](content)
$tip.removeClass('fade top bottom left right in')
// IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
// this manually by checking the contents.
if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
}
Popover.prototype.hasContent = function () {
return this.getTitle() || this.getContent()
}
Popover.prototype.getContent = function () {
var $e = this.$element
var o = this.options
return $e.attr('data-content')
|| (typeof o.content == 'function' ?
o.content.call($e[0]) :
o.content)
}
Popover.prototype.arrow = function () {
return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
}
// POPOVER PLUGIN DEFINITION
// =========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.popover')
var options = typeof option == 'object' && option
if (!data && /destroy|hide/.test(option)) return
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.popover
$.fn.popover = Plugin
$.fn.popover.Constructor = Popover
// POPOVER NO CONFLICT
// ===================
$.fn.popover.noConflict = function () {
$.fn.popover = old
return this
}
}(jQuery);
/* ========================================================================
* Bootstrap: scrollspy.js v3.3.6
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// SCROLLSPY CLASS DEFINITION
// ==========================
function ScrollSpy(element, options) {
this.$body = $(document.body)
this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
this.selector = (this.options.target || '') + ' .nav li > a'
this.offsets = []
this.targets = []
this.activeTarget = null
this.scrollHeight = 0
this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
this.refresh()
this.process()
}
ScrollSpy.VERSION = '3.3.6'
ScrollSpy.DEFAULTS = {
offset: 10
}
ScrollSpy.prototype.getScrollHeight = function () {
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
}
ScrollSpy.prototype.refresh = function () {
var that = this
var offsetMethod = 'offset'
var offsetBase = 0
this.offsets = []
this.targets = []
this.scrollHeight = this.getScrollHeight()
if (!$.isWindow(this.$scrollElement[0])) {
offsetMethod = 'position'
offsetBase = this.$scrollElement.scrollTop()
}
this.$body
.find(this.selector)
.map(function () {
var $el = $(this)
var href = $el.data('target') || $el.attr('href')
var $href = /^#./.test(href) && $(href)
return ($href
&& $href.length
&& $href.is(':visible')
&& [[$href[offsetMethod]().top + offsetBase, href]]) || null
})
.sort(function (a, b) { return a[0] - b[0] })
.each(function () {
that.offsets.push(this[0])
that.targets.push(this[1])
})
}
ScrollSpy.prototype.process = function () {
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
var scrollHeight = this.getScrollHeight()
var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
var offsets = this.offsets
var targets = this.targets
var activeTarget = this.activeTarget
var i
if (this.scrollHeight != scrollHeight) {
this.refresh()
}
if (scrollTop >= maxScroll) {
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
}
if (activeTarget && scrollTop < offsets[0]) {
this.activeTarget = null
return this.clear()
}
for (i = offsets.length; i--;) {
activeTarget != targets[i]
&& scrollTop >= offsets[i]
&& (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
&& this.activate(targets[i])
}
}
ScrollSpy.prototype.activate = function (target) {
this.activeTarget = target
this.clear()
var selector = this.selector +
'[data-target="' + target + '"],' +
this.selector + '[href="' + target + '"]'
var active = $(selector)
.parents('li')
.addClass('active')
if (active.parent('.dropdown-menu').length) {
active = active
.closest('li.dropdown')
.addClass('active')
}
active.trigger('activate.bs.scrollspy')
}
ScrollSpy.prototype.clear = function () {
$(this.selector)
.parentsUntil(this.options.target, '.active')
.removeClass('active')
}
// SCROLLSPY PLUGIN DEFINITION
// ===========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.scrollspy')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.scrollspy
$.fn.scrollspy = Plugin
$.fn.scrollspy.Constructor = ScrollSpy
// SCROLLSPY NO CONFLICT
// =====================
$.fn.scrollspy.noConflict = function () {
$.fn.scrollspy = old
return this
}
// SCROLLSPY DATA-API
// ==================
$(window).on('load.bs.scrollspy.data-api', function () {
$('[data-spy="scroll"]').each(function () {
var $spy = $(this)
Plugin.call($spy, $spy.data())
})
})
}(jQuery);
/* ========================================================================
* Bootstrap: tab.js v3.3.6
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// TAB CLASS DEFINITION
// ====================
var Tab = function (element) {
// jscs:disable requireDollarBeforejQueryAssignment
this.element = $(element)
// jscs:enable requireDollarBeforejQueryAssignment
}
Tab.VERSION = '3.3.6'
Tab.TRANSITION_DURATION = 150
Tab.prototype.show = function () {
var $this = this.element
var $ul = $this.closest('ul:not(.dropdown-menu)')
var selector = $this.data('target')
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
if ($this.parent('li').hasClass('active')) return
var $previous = $ul.find('.active:last a')
var hideEvent = $.Event('hide.bs.tab', {
relatedTarget: $this[0]
})
var showEvent = $.Event('show.bs.tab', {
relatedTarget: $previous[0]
})
$previous.trigger(hideEvent)
$this.trigger(showEvent)
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
var $target = $(selector)
this.activate($this.closest('li'), $ul)
this.activate($target, $target.parent(), function () {
$previous.trigger({
type: 'hidden.bs.tab',
relatedTarget: $this[0]
})
$this.trigger({
type: 'shown.bs.tab',
relatedTarget: $previous[0]
})
})
}
Tab.prototype.activate = function (element, container, callback) {
var $active = container.find('> .active')
var transition = callback
&& $.support.transition
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', false)
element
.addClass('active')
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)
if (transition) {
element[0].offsetWidth // reflow for transition
element.addClass('in')
} else {
element.removeClass('fade')
}
if (element.parent('.dropdown-menu').length) {
element
.closest('li.dropdown')
.addClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)
}
callback && callback()
}
$active.length && transition ?
$active
.one('bsTransitionEnd', next)
.emulateTransitionEnd(Tab.TRANSITION_DURATION) :
next()
$active.removeClass('in')
}
// TAB PLUGIN DEFINITION
// =====================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tab')
if (!data) $this.data('bs.tab', (data = new Tab(this)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.tab
$.fn.tab = Plugin
$.fn.tab.Constructor = Tab
// TAB NO CONFLICT
// ===============
$.fn.tab.noConflict = function () {
$.fn.tab = old
return this
}
// TAB DATA-API
// ============
var clickHandler = function (e) {
e.preventDefault()
Plugin.call($(this), 'show')
}
$(document)
.on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
.on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
}(jQuery);
/* ========================================================================
* Bootstrap: affix.js v3.3.6
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// AFFIX CLASS DEFINITION
// ======================
var Affix = function (element, options) {
this.options = $.extend({}, Affix.DEFAULTS, options)
this.$target = $(this.options.target)
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
this.$element = $(element)
this.affixed = null
this.unpin = null
this.pinnedOffset = null
this.checkPosition()
}
Affix.VERSION = '3.3.6'
Affix.RESET = 'affix affix-top affix-bottom'
Affix.DEFAULTS = {
offset: 0,
target: window
}
Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
var scrollTop = this.$target.scrollTop()
var position = this.$element.offset()
var targetHeight = this.$target.height()
if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
if (this.affixed == 'bottom') {
if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
}
var initializing = this.affixed == null
var colliderTop = initializing ? scrollTop : position.top
var colliderHeight = initializing ? targetHeight : height
if (offsetTop != null && scrollTop <= offsetTop) return 'top'
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
return false
}
Affix.prototype.getPinnedOffset = function () {
if (this.pinnedOffset) return this.pinnedOffset
this.$element.removeClass(Affix.RESET).addClass('affix')
var scrollTop = this.$target.scrollTop()
var position = this.$element.offset()
return (this.pinnedOffset = position.top - scrollTop)
}
Affix.prototype.checkPositionWithEventLoop = function () {
setTimeout($.proxy(this.checkPosition, this), 1)
}
Affix.prototype.checkPosition = function () {
if (!this.$element.is(':visible')) return
var height = this.$element.height()
var offset = this.options.offset
var offsetTop = offset.top
var offsetBottom = offset.bottom
var scrollHeight = Math.max($(document).height(), $(document.body).height())
if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
if (this.affixed != affix) {
if (this.unpin != null) this.$element.css('top', '')
var affixType = 'affix' + (affix ? '-' + affix : '')
var e = $.Event(affixType + '.bs.affix')
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
this.affixed = affix
this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
this.$element
.removeClass(Affix.RESET)
.addClass(affixType)
.trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
}
if (affix == 'bottom') {
this.$element.offset({
top: scrollHeight - height - offsetBottom
})
}
}
// AFFIX PLUGIN DEFINITION
// =======================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.affix')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.affix
$.fn.affix = Plugin
$.fn.affix.Constructor = Affix
// AFFIX NO CONFLICT
// =================
$.fn.affix.noConflict = function () {
$.fn.affix = old
return this
}
// AFFIX DATA-API
// ==============
$(window).on('load', function () {
$('[data-spy="affix"]').each(function () {
var $spy = $(this)
var data = $spy.data()
data.offset = data.offset || {}
if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
if (data.offsetTop != null) data.offset.top = data.offsetTop
Plugin.call($spy, data)
})
})
}(jQuery);
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");
d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
\ No newline at end of file
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('../../js/transition.js')
require('../../js/alert.js')
require('../../js/button.js')
require('../../js/carousel.js')
require('../../js/collapse.js')
require('../../js/dropdown.js')
require('../../js/modal.js')
require('../../js/tooltip.js')
require('../../js/popover.js')
require('../../js/scrollspy.js')
require('../../js/tab.js')
require('../../js/affix.js')
\ No newline at end of file
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="x3dom-1.7.0/x3dom.css">
<link rel="stylesheet" href="viewmodel.css">
<script src="jquery-2.1.4.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script type='text/javascript' src='x3dom-1.7.0/x3dom.js'> </script>
<script src="viewmodel.js"></script>
</head>
<body>
<div id='main'>
<!-- <x3d id='x3d_canvas' width='700px' height='600px' showProgress="true" showStat="true" showLog="true">
<scene>
<navigationinfo id="navi" type='"examine" "any"' ></navigationinfo>
<Viewpoint fieldOfView='0.2'></Viewpoint>
<inline id='topinline' nameSpaceName="foo" url="models/nc393_07_flat_noassy.x3d" onLoad = "document.getElementById('x3d_canvas').runtime.showAll()"></inline>
</scene>
</x3d>-->
<div id='thrd'>
<div class="dropdown">
<button class="btn-my dropdown-toggle btn nooutline" data-toggle="dropdown" href="#">View <span class="caret"></span></button>
<ul class="dropdown-menu" style="padding:0px">
<li id="v1">view 1 (+<b>x</b>)</li>
<li id="v2">view 2 (&minus;<b>x</b>)</li>
<li id="v3">view 3 (+<b>y</b>)</li>
<li id="v4">view 4 (&minus;<b>y</b>)</li>
<li id="v5">view 5 (+<b>z</b>)</li>
<li id="v6">view 6 (&minus;<b>z</b>)</li>
</ul>
</div>
</div>
</div>
<div id="test:5" secretvalue='-4'></div>
</body>
</html>
\ No newline at end of file
/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){
return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ia={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td;function ja(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function la(a){var b=ga.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ma(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function na(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function oa(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pa(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=oa(h),f=oa(a),d=0,e=f.length;e>d;d++)pa(f[d],g[d]);if(b)if(c)for(f=f||oa(a),g=g||oa(h),d=0,e=f.length;e>d;d++)na(f[d],g[d]);else na(a,h);return g=oa(h,"script"),g.length>0&&ma(g,!i&&oa(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(ca.test(e)){f=f||k.appendChild(b.createElement("div")),g=(ba.exec(e)||["",""])[1].toLowerCase(),h=ia[g]||ia._default,f.innerHTML=h[1]+e.replace(aa,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=oa(k.appendChild(e),"script"),i&&ma(f),c)){j=0;while(e=f[j++])fa.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(oa(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&ma(oa(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(oa(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!da.test(a)&&!ia[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(aa,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(oa(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(oa(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&ea.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(oa(c,"script"),ka),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,oa(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,la),j=0;g>j;j++)h=f[j],fa.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qa,ra={};function sa(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function ta(a){var b=l,c=ra[a];return c||(c=sa(a,b),"none"!==c&&c||(qa=(qa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qa[0].contentDocument,b.write(),b.close(),c=sa(a,b),qa.detach()),ra[a]=c),c}var ua=/^margin/,va=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wa=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xa(a,b,c){var d,e,f,g,h=a.style;return c=c||wa(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),va.test(g)&&ua.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function ya(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var za=/^(none|table(?!-c[ea]).+)/,Aa=new RegExp("^("+Q+")(.*)$","i"),Ba=new RegExp("^([+-])=("+Q+")","i"),Ca={position:"absolute",visibility:"hidden",display:"block"},Da={letterSpacing:"0",fontWeight:"400"},Ea=["Webkit","O","Moz","ms"];function Fa(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Ea.length;while(e--)if(b=Ea[e]+c,b in a)return b;return d}function Ga(a,b,c){var d=Aa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Ha(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ia(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wa(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xa(a,b,f),(0>e||null==e)&&(e=a.style[b]),va.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Ha(a,b,c||(g?"border":"content"),d,f)+"px"}function Ja(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",ta(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xa(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fa(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Ba.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fa(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xa(a,b,d)),"normal"===e&&b in Da&&(e=Da[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?za.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Ca,function(){return Ia(a,b,d)}):Ia(a,b,d):void 0},set:function(a,c,d){var e=d&&wa(a);return Ga(a,c,d?Ha(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=ya(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ua.test(a)||(n.cssHooks[a+b].set=Ga)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wa(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Ja(this,!0)},hide:function(){return Ja(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Ka(a,b,c,d,e){return new Ka.prototype.init(a,b,c,d,e)}n.Tween=Ka,Ka.prototype={constructor:Ka,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ka.propHooks[this.prop];return a&&a.get?a.get(this):Ka.propHooks._default.get(this)},run:function(a){var b,c=Ka.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ka.propHooks._default.set(this),this}},Ka.prototype.init.prototype=Ka.prototype,Ka.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Ka.propHooks.scrollTop=Ka.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Ka.prototype.init,n.fx.step={};var La,Ma,Na=/^(?:toggle|show|hide)$/,Oa=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pa=/queueHooks$/,Qa=[Va],Ra={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Oa.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Oa.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sa(){return setTimeout(function(){La=void 0}),La=n.now()}function Ta(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ua(a,b,c){for(var d,e=(Ra[b]||[]).concat(Ra["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Va(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||ta(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Na.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?ta(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ua(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wa(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xa(a,b,c){var d,e,f=0,g=Qa.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=La||Sa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:La||Sa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wa(k,j.opts.specialEasing);g>f;f++)if(d=Qa[f].call(j,a,k,j.opts))return d;return n.map(k,Ua,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xa,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Ra[c]=Ra[c]||[],Ra[c].unshift(b)},prefilter:function(a,b){b?Qa.unshift(a):Qa.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xa(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pa.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Ta(b,!0),a,d,e)}}),n.each({slideDown:Ta("show"),slideUp:Ta("hide"),slideToggle:Ta("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(La=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),La=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ma||(Ma=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Ma),Ma=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Ya,Za,$a=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Za:Ya)),
void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Za={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$a[b]||n.find.attr;$a[b]=function(a,b,d){var e,f;return d||(f=$a[b],$a[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$a[b]=f),e}});var _a=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_a.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ab=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ab," ").indexOf(b)>=0)return!0;return!1}});var bb=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cb=n.now(),db=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var eb=/#.*$/,fb=/([?&])_=[^&]*/,gb=/^(.*?):[ \t]*([^\r\n]*)$/gm,hb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ib=/^(?:GET|HEAD)$/,jb=/^\/\//,kb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lb={},mb={},nb="*/".concat("*"),ob=a.location.href,pb=kb.exec(ob.toLowerCase())||[];function qb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rb(a,b,c,d){var e={},f=a===mb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function sb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function ub(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ob,type:"GET",isLocal:hb.test(pb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sb(sb(a,n.ajaxSettings),b):sb(n.ajaxSettings,a)},ajaxPrefilter:qb(lb),ajaxTransport:qb(mb),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gb.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||ob)+"").replace(eb,"").replace(jb,pb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kb.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pb[1]&&h[2]===pb[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pb[3]||("http:"===pb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rb(lb,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ib.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(db.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fb.test(d)?d.replace(fb,"$1_="+cb++):d+(db.test(d)?"&":"?")+"_="+cb++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+nb+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rb(mb,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tb(k,v,f)),u=ub(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vb=/%20/g,wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&").replace(vb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bb=0,Cb={},Db={0:200,1223:204},Eb=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Cb)Cb[a]()}),k.cors=!!Eb&&"withCredentials"in Eb,k.ajax=Eb=!!Eb,n.ajaxTransport(function(a){var b;return k.cors||Eb&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cb[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Db[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cb[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Fb=[],Gb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fb.pop()||n.expando+"_"+cb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Gb.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Gb,"$1"+e):b.jsonp!==!1&&(b.url+=(db.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Fb.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Hb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Hb)return Hb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Ib=a.document.documentElement;function Jb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Jb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Ib;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ib})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Jb(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=ya(k.pixelPosition,function(a,c){return c?(c=xa(a,b),va.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kb=a.jQuery,Lb=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Lb),b&&a.jQuery===n&&(a.jQuery=Kb),n},typeof b===U&&(a.jQuery=a.$=n),n});
#x3d_canvas{
/* background:#000 url(http://i.stack.imgur.com/p9mUO.jpg); */
}
body{
padding:5px;
}
.nooutline{
/*font-weight:bold;*/
outline:none;
}
.nooutline:focus{
outline:none;
}
#thrd li {
padding:2px 2px 2px 10px;
}
#thrd li:hover{
background-color:rgba(200,200,200,0.2);
}
#x3dom-state-viewer {
position: absolute;
top:1px;
left:1px;
background-color:rgba(100,100,100,0.7);
border: 1px solid gray;
color:rgba(250,250,250,1);
border-radius: 1px;
padding: 3px;
}
.btn-my {
background:rgba(100,100,100,0.7);
border:1px solid gray;
color: white;
/*font-weight: bold;*/
/*border-radius: 1px;*/
}
.btn-my:hover{
background:rgba(100,100,100,0.9);
color: white;
}
.btn-my:focus {
background:rgba(100,100,100,0.9);
}
.btn-my:active {
background:rgba(100,100,100,0.9);
color: white;
}
.btn-my.disabled {
color: red;
}
#bom li{
padding:2px 2px 2px 10px;
border:0px solid black;
}
#bom button{
/*padding:5px 15px 5px 15px;*/
border: 1px solid rgba(50,50,50,0.5);
}
\ No newline at end of file
/*
FILE NAME : viewmodel.js
DESCRIPTION: x3d viewer
REVISION: 1.00
AUTHOR: Oleg Dzhimiev <oleg@elphel.com>
Copyright (C) 2015 Elphel, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
*/
var model = "Undefined";
var NSN = "m";
var elphel_wiki_prefix = "http://wiki.elphel.com/index.php?search="
function resize(){
var w = $(window).width();
var h = $(window).height();
if (w>h){
$("#main").css({width:(h-10)+"px",height:(h-10)+"px"});
$("#x3d_canvas").css({width:(h-10)+"px",height:(h-10)+"px"});
$("#bom").css({left:(h)+"px"});
//$("#thrd").css({left:(h-107)+"px"});
}else{
$("#main").css({width:(w-10)+"px",height:(w-10)+"px"});
$("#x3d_canvas").css({width:(w-10)+"px",height:(w-10)+"px"});
$("#bom").css({left:(w)+"px"});
//$("#thrd").css({left:(w-107)+"px"});
}
}
var resizeTimer;
$(function(){
$(window).resize(function(){
clearTimeout(resizeTimer);
resizeTimer = setTimeout(resize(),250);
});
//"model" and some other parameters
parseURL();
//create and init x3d canvas
var x3d_cnv = $("<x3d>",{
id:"x3d_canvas",width:"700px",height:"600px"
}).css({
position:"absolute",
border: "1px solid gray",
"border-radius": "2px",
outline: "none"
}).addClass("nooutline");
var x3d_cnv_ni = $("<navigationinfo>",{id:"navi",type:"'examine' 'any'"});
var x3d_cnv_vp = $("<Viewpoint>").attr("fieldOfView",0.2);
var x3d_cnv_in = $("<inline>",{
id:"topinline",
nameSpaceName:NSN,
url: model,
onLoad:"document.getElementById('x3d_canvas').runtime.showAll()"
});
x3d_cnv.append($("<Scene>").append(x3d_cnv_ni).append(x3d_cnv_vp).append(x3d_cnv_in));
$("#main").css({
position:"absolute",
width: x3d_cnv.width()+"px",
height: x3d_cnv.height()+"px"
});
$("#main").prepend(x3d_cnv);
resize();
var element = document.getElementById('x3d_canvas');
//on load: showAll()?!
var showall = 10;
$(document).load(function(){
element.runtime.enterFrame = function() {
if (showall==1) {
element.runtime.showAll();
element.runtime.examine();
run();
}
if (showall>0) showall--;
};
});
//help button
var hlp = $("<a href='http://www.x3dom.org/documentation/interaction/'>").addClass("btn btn-primary nooutline btn-sm btn-my").html("?");
hlp.css({
position:"absolute",
right: "3px",
top: "3px",
background:"rgba(100,100,100,0.7)",
border: "1px solid gray",
padding: "0px 6px 0px 6px"
});
$("#main").append(hlp);
$("#thrd").css({
position:"absolute",
top: "3px",
right: "27px"
});
$("#v1").css({cursor:"pointer"}).click(function(){element.runtime.showAll("posX");});
$("#v2").css({cursor:"pointer"}).click(function(){element.runtime.showAll("negX");});
$("#v3").css({cursor:"pointer"}).click(function(){element.runtime.showAll("posY");});
$("#v4").css({cursor:"pointer"}).click(function(){element.runtime.showAll("negY");});
$("#v5").css({cursor:"pointer"}).click(function(){element.runtime.showAll("posZ");});
$("#v6").css({cursor:"pointer"}).click(function(){element.runtime.showAll("negZ");});
});
function run(){
showBOM();
bindCanvas();
resize();
}
function showBOM(){
//var bom = $("<ul>",{id:"bom",class:"list-group"}).css({
var bom = $("<table>",{id:"bom"}).css({
position:"absolute",
top:"5px",
left:"705px"
});
var top = $("#topinline");
//upper case was important
var parts_unique = top.find("Inline");
//remove the first element - because of the specific model structure?
parts_unique.splice(0,1);
//set default transparency?
parts_unique.find("Material").attr("transparency",0.1);
parts_unique.each(function(i){
var part = $(this);
var tmp_nsn = this.getAttribute("nameSpaceName");
//find secondary appearances
var sublist = top.find("[USE="+tmp_nsn+"]");
var ele_sublist = "";
var btn_subpart = false;
ele_ul = $("<ul>",{class:"dropdown-menu","data-toggle":"dropdown"}).css({padding:"10px","min-width":"100px",border:"1px solid rgba(50,50,50,0.5)"});
btn_part = $("<button>",{class:"btn-part btn btn-default btn-sm btn-success"}).css({"min-width":"100px"}).html(tmp_nsn);
btn_part.attr("nsn",tmp_nsn);
btn_part.attr("state","normal");
ele_sublist = $("<div>",{class:"btn-group"}).append(btn_part).append(
$("<button>",{class:"dropdown-toggle btn btn-default btn-sm nooutline",
"data-toggle":"dropdown",
"aria-haspopup":"true",
"aria-expanded":"false"
}).append(
$("<span>",{class:"caret"})
).append(
$("<span>",{class:"sr-only"}).html("Toggle Dropdown")
)
);
ele_sublist.attr("blockpropagation",false);
//toggle all button
btn_subpart = $("<button>",{class:"btn-subpart btn btn-default btn-sm btn-success",title:"Toggle all"}).css({width:"40px"}).html("all");
btn_subpart.attr("index",sublist.length);
btn_subpart.attr("nsn",tmp_nsn);
btn_subpart.attr("selected",true);
//btn_subpart.click(function(){btn_subpart_click_all($(this),ele_sublist);});
btn_subpart.click(function(e){
model_run_cmd(tmp_nsn,"click-int-all");
e.stopPropagation();
});
btn_link_to_wiki = $("<a>",{href:elphel_wiki_prefix+tmp_nsn,class:"btn btn-default btn-sm",title:"Elphel Wiki docs"}).html("<span class=\"glyphicon glyphicon-link\" aria-hidden=\"true\"></span>").css({padding:"7px 13px 7px 13px",margin:"6px"});
btn_link_to_wiki.click(function(e){
window.location.href = $(e.target).attr('href');
});
ele_ul.append($("<li>").append(btn_subpart.css({display:"inline"})).append(btn_link_to_wiki.css({display:"inline"})).css({padding:"3px","min-width":"100px",width:"100px"}));
//build a list for unique and multiple parts
for(var j=0;j<=sublist.length;j++){
btn_subpart = $("<button>",{class:"btn-subpart btn btn-default btn-sm btn-success",title:"Toggle element"}).css({width:"40px"}).html(j+1);
btn_subpart.attr("index",j);
//btn_subpart.attr("maxindex",sublist.length);
btn_subpart.attr("nsn",tmp_nsn);
btn_subpart.attr("selected",true);
btn_subpart.click(function(){btn_subpart_click($(this),ele_sublist);});
if (j%5==0) {
list_el = $("<li>").css({padding:"3px","min-width":"100px",width:"237px"});
ele_ul.append(list_el);
}
list_el.append(btn_subpart.css({display:"inline",margin:"0px 6px 0px 0px"}));
}
ele_sublist.click(function(e){
if ($(this).attr("blockpropagation")=="true") {
e.stopPropagation();
}
$(this).attr("blockpropagation",false);
});
ele_sublist.append(ele_ul);
//var ele = $("<li>",{class:"list-group-item"}).append($(ele_sublist));
var ele = $("<td>").css({padding:"2px 5px 2px 0px"}).append($(ele_sublist));
if(i%3==0){
bomtr = $("<tr>");
bom.append(bomtr);
}
bomtr.append(ele);
btn_part.click(function(){
model_run_cmd(tmp_nsn,"click-ext");
});
});
$("body").append(bom);
}
var blockclick = false;
function bindCanvas(){
//whichChoice for Group tag didn't work
$("Switch").each(function(){
var hmm = $(this);
var id = hmm.attr("id");
var pn_arr = id.split(/[_:]/);
var pn = pn_arr[pn_arr.length-2];
$(this).attr("nsn",pn);
$(this).attr("state","normal");
});
//unblock click
$("Switch").mousedown(function(){blockclick = false;});
//block click is the model was rotated
$("Switch").mousemove(function(){blockclick = true;});
//click
$("Switch").click(function(event){
if (!blockclick){
var hmm = $(this);
var id = hmm.attr("id");
var pn_arr = id.split(/[_:]/);
var pn = pn_arr[pn_arr.length-2];
if (event.which==1){
//fighting multiple click events
if (pn_arr[pn_arr.length-1]=="0") model_run_cmd(pn,"left-click");
}
if (event.which==3){
//fighting multiple click events
if (pn_arr[pn_arr.length-1]=="0") model_run_cmd(pn,"right-click");
}
console.log("The pointer is over "+hmm.attr("id")+", whichChoice="+hmm.attr("whichChoice")+" render="+hmm.attr("render")+" DEF="+hmm.attr("DEF"));
}
});
//$("Switch").attr("onclick","handleClick(event)");
/*
$(".btn-subpart").each(function(){
var index = $(this).attr("index");
var selected = $(this).attr("selected");
var nsn = $(this).attr("nsn");
var some_subpart = document.getElementById(NSN+"__switch_"+nsn+":"+index);
$(some_subpart).click(function(){
//$(this).attr("whichChoice",-1);
console.log("CLIKED: "+$(this).attr("id"));
});
});
*/
}
function model_run_cmd(name,cmd){
var state = $("Switch[nsn="+name+"]").attr("state");
switch(cmd){
case "right-click":
//update status to "disabled"
$("Switch[nsn="+name+"]").attr("state","disabled");
//whichChoice -1
$("Switch[nsn="+name+"]").attr("whichChoice",-1);
//ext buttons - white
$(".btn-part[nsn="+name+"]").removeClass("btn-success")
.removeClass("btn-primary").css({opacity:"1.0"});
//int buttons - white
$(".btn-subpart[nsn="+name+"]").removeClass("btn-success");
//other buttons - untouched
break;
case "left-click":
if (state=="normal"){
//other buttons - deselect!
//other states to normal
//make others who are visible - almost transparent
$("Switch").each(function(){
$(this).find("Material").attr("transparency",0.9);
if (($(this).attr("state")=="selected")||($(this).attr("state")=="superselected")) {
$(this).attr("state","normal");
$(".btn-part[nsn="+$(this).attr("nsn")+"]").addClass("btn-success").removeClass("btn-primary");
}
$(".btn-part[nsn="+$(this).attr("nsn")+"]").css({opacity:"1.0"});
});
//update status to "selected"
$("Switch[nsn="+name+"]").attr("state","selected");
$("Switch[nsn="+name+"]").find("Material").attr("transparency",0.0);
//ext button - blue
$(".btn-part[nsn="+name+"]").addClass("btn-primary").removeClass("btn-success").css({opacity:"1.0"});
//int buttons - green
$(".btn-subpart[nsn="+name+"]").addClass("btn-success");
}
if ((state=="selected")||(state=="superselected")){
$("Switch").each(function(){
$(this).find("Material").attr("transparency",0.1);
if (($(this).attr("state")=="selected")||($(this).attr("state")=="superselected")){
$(this).attr("state","normal");
$(".btn-part[nsn="+$(this).attr("nsn")+"]").addClass("btn-success").removeClass("btn-primary");
}
$(".btn-part[nsn="+$(this).attr("nsn")+"]").css({opacity:"1.0"});
});
}
break;
case "click-int-all":
if (state=="disabled"){
//update status to "normal"
$("Switch[nsn="+name+"]").attr("state","normal");
//whichChoice 0
$("Switch[nsn="+name+"]").attr("whichChoice",0);
//ext button - green
$(".btn-part[nsn="+name+"]").addClass("btn-success");
//int buttons - green
$(".btn-subpart[nsn="+name+"]").addClass("btn-success");
//other buttons - untouched
}else{
//update status to "disabled"
//whichChoice = -1
//ext button - white
//int buttons - white
//other buttons - untouched
model_run_cmd(name,"right-click");
}
break;
case "click-ext":
//disbled, whichChoice=-1?
if (state=="disabled"){
//update status to "selected"
//whichChoice = 0
//ext button - "blue"
//int buttons - "green"
//other buttons
//whichChoice = -1?
//do not touch
//else?
//selected?
//to normal == green
model_run_cmd(name,"click-int-all");
}
if (state=="selected"){
//others - switch to normal, make transparent
$("Switch").each(function(){
$(this).find("Material").attr("transparency",1.0);
if ($(this).attr("state")=="selected") {
$(this).attr("state","normal");
$(".btn-part[nsn="+$(this).attr("nsn")+"]").addClass("btn-success").removeClass("btn-primary");
}
if ($(this).attr("state")!="disabled") $(".btn-part[nsn="+$(this).attr("nsn")+"]").css({opacity:"0.5"});
});
$("Switch[nsn="+name+"]").attr("state","superselected");
$("Switch[nsn="+name+"]").find("Material").attr("transparency",0.0);
$(".btn-part[nsn="+name+"]").removeClass("btn-success").addClass("btn-primary").css({opacity:"1.0"});
//selected?
// superselected
// update status to superselected
// all white? but not permanent? transparent?
//superselected?
// update status to normal
// all normal?
//normal?
// update status to selected
// all normal?
}
if (state=="normal"){
model_run_cmd(name,"left-click");
}
if (state=="superselected"){
$("Switch").each(function(){
$(this).find("Material").attr("transparency",0.1);
if (($(this).attr("state")=="selected")||($(this).attr("state")=="superselected")) {
$(this).attr("state","normal");
$(".btn-part[nsn="+$(this).attr("nsn")+"]").addClass("btn-success").removeClass("btn-primary");
}
$(".btn-part[nsn="+$(this).attr("nsn")+"]").css({opacity:"1.0"});
});
model_run_cmd(name,"click-int-all");
}
break;
default:
return false;
}
}
function handleClick(event){
console.log(event.hitPnt);
console.log($(this));
}
function btn_subpart_click(subpart,sublist){
var index = subpart.attr("index");
var selected = subpart.attr("selected");
var nsn = subpart.attr("nsn");
var some_subpart = document.getElementById(NSN+"__switch_"+nsn+":"+index);
if (selected) {
$(some_subpart).attr("whichChoice",-1);
subpart.removeClass("btn-success");
}else{
$(some_subpart).attr("whichChoice", 0);
subpart.addClass("btn-success");
}
subpart.attr("selected",!subpart.attr("selected"));
sublist.attr("blockpropagation",true);
}
function btn_subpart_click_all(subpart,sublist){
var index = subpart.attr("index");
var selected = subpart.attr("selected");
var nsn = subpart.attr("nsn");
for(var i=0;i<=index;i++){
var some_subpart = document.getElementById(NSN+"__switch_"+nsn+":"+i);
if (selected) {
$(some_subpart).attr("whichChoice",-1);
subpart.removeClass("btn-success");
}else{
$(some_subpart).attr("whichChoice", 0);
subpart.addClass("btn-success");
}
}
subpart.attr("selected",!subpart.attr("selected"));
sublist.attr("blockpropagation",true);
}
function btn_subpart_enableAll(){
$(".btn-subpart").each(function(){
var index = $(this).attr("index");
var selected = $(this).attr("selected");
var nsn = $(this).attr("nsn");
var some_subpart = document.getElementById(NSN+"__switch_"+nsn+":"+index);
$(some_subpart).attr("whichChoice","0");
});
}
function parseURL() {
var parameters=location.href.replace(/\?/ig,"&").split("&");
for (var i=0;i<parameters.length;i++) parameters[i]=parameters[i].split("=");
for (var i=1;i<parameters.length;i++) {
switch (parameters[i][0]) {
case "model": model = parameters[i][1];break;
}
}
console.log("Opening model: "+model);
}
X3DOM has been developed by Fraunhofer IGD (VCST group).
Contributions to core X3DOM components:
* Johannes Behr
* Yvonne Jung
* Timo Sturm
* Andreas Aderhold
* Katarzyna Wilkosinska
* Max Limper
* Maik Thoener
* Christian Stein
* Tobias Franke
* Peter Eschler
* Timm Drevensek
Contributions to shadow mapping:
* Nicolas Eicke
Contributions to BVHRefiner component:
* Michael Englert
Contributions to the CAD component:
* Don Brutzman <brutzman@nps.edu>
* Vincent Marchetti <vmarchetti@ameritech.net>
* "이효광 (Hyokwang Lee)" <adpc92@gmail.com>
* Joe D Williams <joedwil@earthlink.net>
Contributions to the Geo component:
* "Byounghyun Yoo (유병현)" <yoo@byoo.net>
* Andreas Plesch <andreasplesch@gmail.com>
Other much-appreciated contributors:
* x3domer
* James Sweet
* John Congote
* Ander Arbelaiz <aarbelaiz@vicomtech.org>
* Yurai Núñez-Rodríguez <yurai@weblakes.com>
* ...
* Your Name <couldbe@here.com>
A big thank you to Philip Taylor. X3DOM is originally based on his first prototypical implementation of a scene graph in HTML 5. http://philip.html5.org
This source diff could not be displayed because it is too large. You can view the blob instead.
Dual licensed under the MIT and GPL licenses.
==[MIT]====================================================================
Copyright (c) 2009 X3DOM
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
==[GPL]====================================================================
X3DOM - Declarative 3D for HTML
Copyright (C) 2009 X3DOM
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Welcome to X3DOM
================
X3DOM is a framework for integrating and manipulating (X)3D scenes as HTML5
DOM elements, which are rendered via an X3D plugin, Flash/Stage3D or WebGL.
The open-source system allows defining 3D scene description and runtime
behavior declaratively, without any low-level JavaScript or GLSL coding.
Getting started
---------------
Please have a look at the official documentation in order to get started:
http://doc.x3dom.org
Need help?
----------
If you want to use X3DOM and seek help and exchange of knowledge, please use
the x3dom-users mailing list or the forums. Beginner questions usually have
been asked already and in many cases the mailinglist or forum archives provide
quick answers to many questions.
If you decide to post to the mailing list or forum, please include as much
info as possible and describe your problem and what you tried already
succinctly.
Mailing List
-------------
Please use the mailinglists as much as you can. The
[x3dom-users][] list is the one you are most likely interested in
and the first address for help or questions.
Issue Tracker
-------------
Please report issues and attach patches here. For general help and questions
direct your inquiry to the x3dom-users mailing list or one of the forums.
https://github.com/x3dom/x3dom/issues
**Uploading Files to the Issue Tracker**
The GitHub issue tracker does not allow to upload files. However, there is a
service that helps you with sharing files: https://gist.github.com. Just copy
and paste your file contents there and then copy the Gist URL into the
issues form.
It immensely helps us if you can provide a live web page illustrating your
problem. So if you have webspace and can upload and post the URL with your
issue, the chances we will have a look at it increase.
Contributing
------------
We encourage you to contribute to X3DOM! If you would like to contribute to
X3DOM, you should subscribe to the developers mailing list ([x3dom-dev][]),
where the developers of X3DOM discuss the development of the library itself.
You can send pull requests via GitHub. Patches should:
1. Follow the style of the existing code.
2. One commit should do exactly one thing.
3. Commit messages should start with a summary line below 80 characters
followed by a blank line, and then the reasoning/analysis for why the
change was made (if appropriate).
4. Commits that fix a bug in a previous commit (which has already been
merged) should start with `fixup!` and then the summary line of the
commit it fixes.
5. Rebase your branch against the upstream’s master. We don’t want to pull
redundant merge commits.
6. **Be clear about what license applies to your patch:** The files within
this repository are under the GPL3 (or later) but, as the original
creators, we are still allowed to create non-free derivatives. However,
if patches are given to us under GPL then those cannot make it into any
non-free derivatives we may later wish to create. So to make it easier
for us (and avoid any legal issues) we prefer if patches are released as
public domain.
### GitHub Workflow
Developing patches should follow this workflow:
1. Fork on GitHub (click Fork button)
2. Clone to computer: `git clone git@github.com:«github account»/x3dom.git`
3. cd into your repo: `cd x3dom`
4. Set up remote upstream: `git remote add -f upstream git://github.com/x3dom/x3dom.git`
5. Create a branch for the new feature: `git checkout -b my_new_feature`
6. Work on your feature, add and commit as usual
Creating a branch is not strictly necessary, but it makes it easy to delete
your branch when the feature has been merged into upstream, diff your branch
with the version that actually ended in upstream, and to submit pull requests
for multiple features (branches).
7. Push branch to GitHub: `git push origin my_new_feature`
8. Issue pull request: Click Pull Request button on GitHub
#### Useful Commands
If a lot of changes have happened upstream you can replay your local changes
on top of these, this is done with `rebase`, e.g.:
git fetch upstream
git rebase upstream/master
This will fetch changes and re-apply your commits on top of these.
This is generally better than merge, as it will give a clear picture of which
commits are local to your branch. It will also “prune” any of your local
commits if the same changes have been applied upstream.
You can use `-i` with `rebase` for an “interactive” rebase. This allows you
to drop, re-arrange, merge, and reword commits, e.g.:
git rebase -i upstream/master
There's always the [x3dom-dev][] mailinglist.
[x3dom-users]: https://lists.sourceforge.net/lists/listinfo/x3dom-users
[x3dom-dev]: https://lists.sourceforge.net/lists/listinfo/x3dom-developers
[GPL 3]: http://www.gnu.org/copyleft/gpl.html
This source diff could not be displayed because it is too large. You can view the blob instead.
/** X3DOM Runtime, http://www.x3dom.org/ 1.7.0 - f33e92d248a2f25d52fa63ede8ffee570c8a6304 - Wed Jun 17 09:49:25 2015 +0200 */
x3dom.registerNodeType("Patch","BVHRefiner",defineClass(x3dom.nodeTypes.X3DSpatialGeometryNode,function(ctx){x3dom.nodeTypes.Patch.superClass.call(this,ctx);this.addField_SFVec2f(ctx,'size',2,2);this.addField_SFVec2f(ctx,'subdivision',1,1);this.addField_SFVec3f(ctx,'center',0,0,0);this.addField_MFString(ctx,'primType',['TRIANGLES']);var sx=this._vf.size.x,sy=this._vf.size.y;var subx=this._vf.subdivision.x,suby=this._vf.subdivision.y;this._indexBufferTriangulationParts=[];var x=0,y=0;var xstep=sx/subx/2;var ystep=sy/suby/2;sx/=2;sy/=2;var countX=subx*2+1;var countY=suby*2+1;for(y=0;y<=suby*2;y++){for(x=0;x<=subx*2;x++){this._mesh._positions[0].push(this._vf.center.x+x*xstep-sx);this._mesh._positions[0].push(this._vf.center.y+y*ystep-sy);this._mesh._positions[0].push(this._vf.center.z);this._mesh._normals[0].push(0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(1);this._mesh._texCoords[0].push(x/(subx*2));this._mesh._texCoords[0].push(y/(suby*2));}}
for(y=0;y<countY-2;y+=2){for(x=0;x<countX-2;x+=2){this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);}}
this._indexBufferTriangulationParts.push({offset:0,count:subx*suby*6});for(y=0;y<countY-2;y+=2){for(x=0;x<2;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+1)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
for(y=0;y<countY-2;y+=2){for(x=2;x<countX-2;x+=2){this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);}}
this._indexBufferTriangulationParts.push({offset:this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].offset+
this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].count*2,count:subx*suby*6+suby*9});for(y=0;y<countY-2;y+=2){for(x=countX-3;x<countX-2;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+1)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
for(y=0;y<countY-2;y+=2){for(x=0;x<countX-4;x+=2){this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);}}
this._indexBufferTriangulationParts.push({offset:this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].offset+
this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].count*2,count:subx*suby*6+suby*9});for(y=2;y<countY-2;y+=2){for(x=0;x<countX-2;x+=2){this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);}}
for(y=0;y<2;y+=2){for(x=0;x<countX-2;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+1)+y*countX);this._mesh._indices[0].push((x+1)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
this._indexBufferTriangulationParts.push({offset:this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].offset+
this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].count*2,count:subx*suby*6+subx*9});for(y=countY-3;y<countY-2;y+=2){for(x=0;x<countX-2;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+1)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
for(y=0;y<countY-4;y+=2){for(x=0;x<countX-2;x+=2){this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);}}
this._indexBufferTriangulationParts.push({offset:this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].offset+
this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].count*2,count:subx*suby*6+subx*9});for(y=countY-3;y<countY-2;y+=2){for(x=countX-3;x<countX-2;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+1)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+1)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
for(y=0;y<countY-4;y+=2){for(x=0;x<countX-4;x+=2){this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);}}
for(y=0;y<countY-4;y+=2){for(x=countX-3;x<countX-2;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+1)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
for(y=countY-3;y<countY-2;y+=2){for(x=0;x<countX-4;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+1)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
this._indexBufferTriangulationParts.push({offset:this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].offset+
this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].count*2,count:subx*suby*6+subx*9+(suby-1)*9+3});for(y=countY-3;y<countY-2;y+=2){for(x=0;x<2;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+1)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+1)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
for(y=0;y<countY-4;y+=2){for(x=2;x<countX-2;x+=2){this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);}}
for(y=countY-3;y<countY-2;y+=2){for(x=2;x<countX-2;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+1)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
for(y=0;y<countY-4;y+=2){for(x=0;x<2;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+1)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
this._indexBufferTriangulationParts.push({offset:this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].offset+
this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].count*2,count:subx*suby*6+subx*9+(suby-1)*9+3});for(y=0;y<2;y+=2){for(x=0;x<2;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+1)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+1)+y*countX);this._mesh._indices[0].push((x+1)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
for(y=2;y<countY-2;y+=2){for(x=2;x<countX-2;x+=2){this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);}}
for(y=2;y<countY-2;y+=2){for(x=0;x<2;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+1)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
for(y=0;y<2;y+=2){for(x=2;x<countX-2;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+1)+y*countX);this._mesh._indices[0].push((x+1)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
this._indexBufferTriangulationParts.push({offset:this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].offset+
this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].count*2,count:subx*suby*6+subx*9+(suby-1)*9+3});for(y=0;y<2;y+=2){for(x=countX-3;x<countX-2;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+1)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+1)+y*countX);this._mesh._indices[0].push((x+1)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
for(y=2;y<countY-2;y+=2){for(x=0;x<countX-4;x+=2){this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);}}
for(y=2;y<countY-2;y+=2){for(x=countX-3;x<countX-2;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+1)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
for(y=0;y<2;y+=2){for(x=0;x<countX-4;x+=2){this._mesh._indices[0].push((x)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+2)+(y+2)*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+2)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x+1)+y*countX);this._mesh._indices[0].push((x+1)+y*countX);this._mesh._indices[0].push((x+1)+(y+1)*countX);this._mesh._indices[0].push((x)+y*countX);}}
this._indexBufferTriangulationParts.push({offset:this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].offset+
this._indexBufferTriangulationParts[this._indexBufferTriangulationParts.length-1].count*2,count:subx*suby*6+subx*9+(suby-1)*9+3});this._mesh._invalidate=true;this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;},{hasIndexOffset:function(){return true;},getTriangulationAttributes:function(triangulationIndex){return this._indexBufferTriangulationParts[triangulationIndex];}}));x3dom.registerNodeType("BVHRefiner","BVHRefiner",defineClass(x3dom.nodeTypes.X3DLODNode,function(ctx){x3dom.nodeTypes.BVHRefiner.superClass.call(this,ctx);this.addField_SFFloat(ctx,'factor',1.0);this.addField_SFInt32(ctx,'maxDepth',3);this.addField_SFInt32(ctx,'minDepth',0);this.addField_SFInt32(ctx,'smoothLoading',1);this.addField_SFInt32(ctx,'interactionDepth',this._vf.maxDepth);this.addField_SFVec2f(ctx,'size',1,1);this.addField_SFVec3f(ctx,'octSize',1,1,1);this.addField_SFVec2f(ctx,'subdivision',1,1);this.addField_SFString(ctx,'url',"");this.addField_SFString(ctx,'elevationUrl',"");this.addField_SFString(ctx,'textureUrl',"");this.addField_SFString(ctx,'normalUrl',"");this.addField_SFString(ctx,'mode',"3d");this.addField_SFString(ctx,'subMode',"wmts");this.addField_SFString(ctx,'elevationFormat',"png");this.addField_SFString(ctx,'textureFormat',"png");this.addField_SFString(ctx,'normalFormat',"png");this.addField_SFFloat(ctx,'maxElevation',1.0);this.addField_SFBool(ctx,'useNormals',true);this.addField_SFBool(ctx,'lit',true);this.addField_SFInt32(ctx,'bvhCount',8);this.creationSmooth=0;this.togglePoints=true;this.nodeProducer=new NodeProducer();var nodeListSize=0;for(var x=0;x<=this._vf.maxDepth;x++){nodeListSize+=Math.pow(4,x);}
this.nodeList=new Array(nodeListSize);if(this._vf.mode==="bin"){this.rootNode=new QuadtreeNodeBin(ctx,this,0,0,0,null);}
else if(this._vf.mode==="3d"||this._vf.mode==="2d"){var geometry=new x3dom.nodeTypes.Plane(ctx);geometry._vf.subdivision.setValues(this._vf.subdivision);geometry.fieldChanged("subdivision");geometry._vf.size.setValues(this._vf.size);if(this._vf.mode==="2d"){if(this._vf.subMode==="wmts"){this.rootNode=new QuadtreeNode2dWMTS(ctx,this,0,0,x3dom.fields.SFMatrix4f.identity(),0,0,geometry);}
else{this.rootNode=new QuadtreeNode2D(ctx,this,0,0,x3dom.fields.SFMatrix4f.identity(),0,0,geometry,"/",1);}}
else{if(this._vf.subMode==="32bit"){this.rootNode=new QuadtreeNode3D_32bit(ctx,this,0,0,x3dom.fields.SFMatrix4f.identity(),0,0,geometry);}
else{geometry=new x3dom.nodeTypes.Patch(ctx);this.rootNode=new QuadtreeNode3D(ctx,this,0,0,x3dom.fields.SFMatrix4f.identity(),0,0,geometry);}}}
else if(this._vf.mode==="bvh"){this.rootNode=new BVHNode(ctx,this,0,"/",1,this._vf.bvhCount);}
else{x3dom.debug.logError("Error attribute mode. Value: '"+this._vf.mode+"' isn't conform. Please use type 'bin', '2d' or '3d'");}},{visitChildren:function(transform,drawableCollection,singlePath,invalidateCache,planeMask){var x3dElement=this._nameSpace.doc._x3dElem;if(this._vf.mode==="oct"){if(x3dElement.runtime.isReady&&this.togglePoints){x3dElement.runtime.togglePoints();this.togglePoints=false;this.view=drawableCollection.viewarea;}
this.creationSmooth++;singlePath=false;invalidateCache=true;this.rootNode.collectDrawables(transform,drawableCollection,singlePath,invalidateCache,planeMask);if(!this.view.isMovingOrAnimating()&&((this.creationSmooth%this._vf.smoothLoading)===0)){this.nodeProducer.CreateNewNode();}}
else{if(x3dElement.runtime.isReady&&this.togglePoints){this.view=x3dElement.runtime.canvas.doc._viewarea;this.togglePoints=false;}
this.createChildren=0;this.creationSmooth++;singlePath=false;invalidateCache=true;this.rootNode.collectDrawables(transform,drawableCollection,singlePath,invalidateCache,planeMask);if(!this.view.isMovingOrAnimating()&&((this.creationSmooth%this._vf.smoothLoading)===0)){this.nodeProducer.CreateNewNode();}}},getVolume:function()
{var vol=this._graph.volume;if(!this.volumeValid()&&this._vf.render)
{var childVol=this.rootNode.getVolume();if(childVol&&childVol.isValid())
vol.extendBounds(childVol.min,childVol.max);}
return vol;}}));function NodeProducer()
{var nextNode=null;var nearestDistance=1000000;var smallestDepth=1000000;this.AddNewNode=function(node,distance){if(node.Level()<smallestDepth){smallestDepth=node.Level();nextNode=node;}
if(node.Level()===smallestDepth){if(distance<nearestDistance){distance=nearestDistance;nextNode=node;}}};this.CreateNewNode=function(){if(nextNode!==null){nextNode.CreateChildren();}
nextNode=null;smallestDepth=1000;};}
function QuadtreeNode2dWMTS(ctx,bvhRefiner,level,nodeNumber,nodeTransformation,columnNr,rowNr,geometry)
{var children=[];var shape=new x3dom.nodeTypes.Shape();var position=null;var readyState=false;var childrenReadyState=false;var url=bvhRefiner._vf.textureUrl+"/"+level+"/"+columnNr+"/"+rowNr+"."+(bvhRefiner._vf.textureFormat).toLowerCase();var resizeFac=(bvhRefiner._vf.size.x+bvhRefiner._vf.size.y)/2.0;var cullObject={};function initialize(){var appearance=new x3dom.nodeTypes.Appearance(ctx);var texture=new x3dom.nodeTypes.ImageTexture(ctx);shape._nameSpace=bvhRefiner._nameSpace;var texProp=new x3dom.nodeTypes.TextureProperties(ctx);texProp._vf.boundaryModeS="CLAMP_TO_EDGE";texProp._vf.boundaryModeT="CLAMP_TO_EDGE";texProp._vf.boundaryModeR="CLAMP_TO_EDGE";texProp._vf.minificationFilter="LINEAR";texProp._vf.magnificationFilter="LINEAR";texture.addChild(texProp,"textureProperties");texture.nodeChanged();texture._nameSpace=bvhRefiner._nameSpace;texture._vf.url[0]=url;position=nodeTransformation.e3();appearance.addChild(texture);texture.nodeChanged();shape.addChild(appearance);appearance.nodeChanged();shape.addChild(geometry);geometry.nodeChanged();bvhRefiner.addChild(shape);shape.nodeChanged();cullObject.boundedNode=shape;cullObject.volume=shape.getVolume();}
this.CreateChildren=function(){create();};function create(){var deltaR=Math.sqrt(Math.pow(4,level));var deltaR1=Math.sqrt(Math.pow(4,level+1));var lt=Math.floor(nodeNumber/deltaR)*4*deltaR+
(nodeNumber%deltaR)*2;var rt=lt+1;var lb=lt+deltaR1;var rb=lb+1;var s=(bvhRefiner._vf.size).multiply(0.25);children.push(new QuadtreeNode2dWMTS(ctx,bvhRefiner,(level+1),lt,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(-s.x,s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2),(rowNr*2),geometry));children.push(new QuadtreeNode2dWMTS(ctx,bvhRefiner,(level+1),rt,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(s.x,s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2+1),(rowNr*2),geometry));children.push(new QuadtreeNode2dWMTS(ctx,bvhRefiner,(level+1),lb,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(-s.x,-s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2),(rowNr*2+1),geometry));children.push(new QuadtreeNode2dWMTS(ctx,bvhRefiner,(level+1),rb,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(s.x,-s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2+1),(rowNr*2+1),geometry));}
this.Shape=function(){return shape;};this.Ready=function(){if(shape._webgl!==undefined&&shape._webgl.texture!==undefined){return ready();}
return false;};function ready(){readyState=true;for(var i=0;i<shape._webgl.texture.length;i++){if(!shape._webgl.texture[i].texture.ready){readyState=false;}}
return readyState;}
function updateLoadingState(drawableCollection,transform){childrenReadyState=true;for(var i=0;i<children.length;i++){if(!children[i].Ready()){childrenReadyState=false;}}
if(children.length<4){childrenReadyState=false;}
else if(childrenReadyState){for(var i=0;i<children.length;i++){children[i].Shape()._vf.render=true;}}
if(shape._webgl===undefined||shape._webgl.texture===undefined){drawableCollection.context.setupShape(drawableCollection.gl,{shape:shape,transform:transform},drawableCollection.viewarea);}
else{ready();}}
this.collectDrawables=function(transform,drawableCollection,singlePath,invalidateCache,planeMask){cullObject.localMatrix=nodeTransformation;planeMask=drawableCollection.cull(nodeTransformation,cullObject,singlePath,planeMask);if(!readyState||!childrenReadyState)
updateLoadingState(drawableCollection,nodeTransformation);if(readyState&&planeMask>0){var mat_view=drawableCollection.viewMatrix;var vPos=mat_view.multMatrixPnt(nodeTransformation.multMatrixPnt(position));var distanceToCamera=Math.sqrt(Math.pow(vPos.x,2)+Math.pow(vPos.y,2)+Math.pow(vPos.z,2));if((distanceToCamera<Math.pow((bvhRefiner._vf.maxDepth-level),2)*resizeFac/bvhRefiner._vf.factor)||level<bvhRefiner._vf.minDepth){if(bvhRefiner.view.isMovingOrAnimating()&&children.length===0||bvhRefiner.view.isMovingOrAnimating()&&level>=bvhRefiner._vf.interactionDepth){shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);}
else{if(children.length===0){bvhRefiner.nodeProducer.AddNewNode(that,distanceToCamera);shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);}
else{if(childrenReadyState){for(var i=0;i<children.length;i++){children[i].collectDrawables(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask);}}
else{shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);for(var i=0;i<children.length;i++){children[i].collectDrawables(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask);children[i].Shape()._vf.render=false;}}}}}
else{shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);}}};this.getVolume=function(){return shape.getVolume();};this.Level=function(){return level;};var that=this;initialize();}
function QuadtreeNode2D(ctx,bvhRefiner,level,nodeNumber,nodeTransformation,columnNr,rowNr,geometry,path,imgNumber)
{var children=[];var shape=new x3dom.nodeTypes.Shape();var position=null;var readyState=false;var childrenReadyState=false;var exists=true;var url=bvhRefiner._vf.textureUrl+path+imgNumber+"."+bvhRefiner._vf.textureFormat;var resizeFac=(bvhRefiner._vf.size.x+bvhRefiner._vf.size.y)/2.0;var cullObject={};function initialize(){var appearance=new x3dom.nodeTypes.Appearance(ctx);var texture=new x3dom.nodeTypes.ImageTexture(ctx);shape._nameSpace=bvhRefiner._nameSpace;var texProp=new x3dom.nodeTypes.TextureProperties(ctx);texProp._vf.boundaryModeS="CLAMP_TO_EDGE";texProp._vf.boundaryModeT="CLAMP_TO_EDGE";texProp._vf.boundaryModeR="CLAMP_TO_EDGE";texProp._vf.minificationFilter="LINEAR";texProp._vf.magnificationFilter="LINEAR";texture.addChild(texProp,"textureProperties");texture.nodeChanged();texture._nameSpace=bvhRefiner._nameSpace;texture._vf.url[0]=url;position=nodeTransformation.e3();appearance.addChild(texture);texture.nodeChanged();shape.addChild(appearance);appearance.nodeChanged();shape.addChild(geometry);geometry.nodeChanged();bvhRefiner.addChild(shape);shape.nodeChanged();cullObject.boundedNode=shape;cullObject.volume=shape.getVolume();}
this.CreateChildren=function(){create();};function create(){var deltaR=Math.sqrt(Math.pow(4,level));var deltaR1=Math.sqrt(Math.pow(4,level+1));var lt=Math.floor(nodeNumber/deltaR)*4*deltaR+
(nodeNumber%deltaR)*2;var rt=lt+1;var lb=lt+deltaR1;var rb=lb+1;var s=(bvhRefiner._vf.size).multiply(0.25);children.push(new QuadtreeNode2D(ctx,bvhRefiner,(level+1),lt,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(-s.x,s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2),(rowNr*2),geometry,path+imgNumber+"/",1));children.push(new QuadtreeNode2D(ctx,bvhRefiner,(level+1),rt,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(s.x,s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2+1),(rowNr*2),geometry,path+imgNumber+"/",3));children.push(new QuadtreeNode2D(ctx,bvhRefiner,(level+1),lb,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(-s.x,-s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2),(rowNr*2+1),geometry,path+imgNumber+"/",2));children.push(new QuadtreeNode2D(ctx,bvhRefiner,(level+1),rb,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(s.x,-s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2+1),(rowNr*2+1),geometry,path+imgNumber+"/",4));}
this.Shape=function(){return shape;};this.Ready=function(){if(shape._webgl!==undefined&&shape._webgl.texture!==undefined){return ready();}
return false;};function ready(){readyState=true;for(var i=0;i<shape._webgl.texture.length;i++){if(!shape._webgl.texture[i].texture.ready){readyState=false;}}
return readyState;}
function updateLoadingState(drawableCollection,transform){childrenReadyState=true;for(var i=0;i<children.length;i++){if(!children[i].Ready()){childrenReadyState=false;}}
if(children.length<4){childrenReadyState=false;}
else if(childrenReadyState){for(var i=0;i<children.length;i++){children[i].Shape()._vf.render=true;}}
if(shape._webgl===undefined||shape._webgl.texture===undefined){drawableCollection.context.setupShape(drawableCollection.gl,{shape:shape,transform:transform},drawableCollection.viewarea);}
else{ready();}}
this.collectDrawables=function(transform,drawableCollection,singlePath,invalidateCache,planeMask){cullObject.localMatrix=nodeTransformation;if(!readyState||!childrenReadyState){updateLoadingState(drawableCollection,nodeTransformation);}
if(readyState&&(planeMask=drawableCollection.cull(nodeTransformation,cullObject,singlePath,planeMask))>0){var mat_view=drawableCollection.viewMatrix;var vPos=mat_view.multMatrixPnt(nodeTransformation.multMatrixPnt(position));var distanceToCamera=Math.sqrt(Math.pow(vPos.x,2)+Math.pow(vPos.y,2)+Math.pow(vPos.z,2));if((distanceToCamera<Math.pow((bvhRefiner._vf.maxDepth-level),2)*resizeFac/bvhRefiner._vf.factor)||level<bvhRefiner._vf.minDepth){if(bvhRefiner.view.isMovingOrAnimating()&&children.length===0||bvhRefiner.view.isMovingOrAnimating()&&level>=bvhRefiner._vf.interactionDepth){shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);}
else{if(children.length===0){bvhRefiner.nodeProducer.AddNewNode(that,distanceToCamera);shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);}
else{if(childrenReadyState){for(var i=0;i<children.length;i++){children[i].collectDrawables(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask);}}
else{shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);for(var i=0;i<children.length;i++){children[i].collectDrawables(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask);children[i].Shape()._vf.render=false;}}}}}
else{shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);}}};this.getVolume=function(){return shape.getVolume();};this.Level=function(){return level;};var that=this;initialize();}
function QuadtreeNode3D(ctx,bvhRefiner,level,nodeNumber,nodeTransformation,columnNr,rowNr,geometry)
{var children=[];var neighbors=[];var shape=new x3dom.nodeTypes.Shape();var position=null;var imageAddressColor=bvhRefiner._vf.textureUrl+"/"+level+"/"+
columnNr+"/"+rowNr+"."+
(bvhRefiner._vf.textureFormat).toLowerCase();var imageAddressHeight=bvhRefiner._vf.elevationUrl+"/"+level+"/"+
columnNr+"/"+rowNr+"."+
(bvhRefiner._vf.elevationFormat).toLowerCase();if(bvhRefiner._vf.normalUrl!=="")
var imageAddressNormal=bvhRefiner._vf.normalUrl+"/"+level+"/"+
columnNr+"/"+rowNr+"."+
(bvhRefiner._vf.normalFormat).toLowerCase();var readyState=false;var childrenReadyState=false;var resizeFac=(bvhRefiner._vf.size.x+bvhRefiner._vf.size.y)/2.0;var cullObject={};var lastIndice=0;var triangulationAttributes=null;function initialize(){var appearance=new x3dom.nodeTypes.Appearance(ctx);var textures=new x3dom.nodeTypes.MultiTexture(ctx);var colorTexture=new x3dom.nodeTypes.ImageTexture(ctx);var heightTexture=new x3dom.nodeTypes.ImageTexture(ctx);var normalTexture=new x3dom.nodeTypes.ImageTexture(ctx);var composedShader=new x3dom.nodeTypes.ComposedShader(ctx);shape._nameSpace=bvhRefiner._nameSpace;position=nodeTransformation.e3();position.z=bvhRefiner._vf.maxElevation/2;var vertexShader=new x3dom.nodeTypes.ShaderPart(ctx);vertexShader._vf.type='vertex';vertexShader._vf.url[0]=createVertexShader();var fragmentShader=new x3dom.nodeTypes.ShaderPart(ctx);fragmentShader._vf.type='fragment';fragmentShader._vf.url[0]=createFragmentShader();composedShader.addChild(vertexShader,'parts');composedShader.addChild(fragmentShader,'parts');var colorTexProp=new x3dom.nodeTypes.TextureProperties(ctx);colorTexProp._vf.boundaryModeS="CLAMP_TO_EDGE";colorTexProp._vf.boundaryModeT="CLAMP_TO_EDGE";colorTexProp._vf.boundaryModeR="CLAMP_TO_EDGE";colorTexProp._vf.minificationFilter="LINEAR";colorTexProp._vf.magnificationFilter="LINEAR";colorTexture.addChild(colorTexProp,"textureProperties");colorTexture.nodeChanged();colorTexture._nameSpace=bvhRefiner._nameSpace;colorTexture._vf.url[0]=imageAddressColor;colorTexture._vf.repeatT=false;colorTexture._vf.repeatS=false;textures.addChild(colorTexture,'texture');colorTexture.nodeChanged();var colorTextureField=new x3dom.nodeTypes.Field(ctx);colorTextureField._vf.name='texColor';colorTextureField._vf.type='SFInt32';colorTextureField._vf.value=0;composedShader.addChild(colorTextureField,'fields');colorTextureField.nodeChanged();var heightTexProp=new x3dom.nodeTypes.TextureProperties(ctx);heightTexProp._vf.boundaryModeS="CLAMP_TO_EDGE";heightTexProp._vf.boundaryModeT="CLAMP_TO_EDGE";heightTexProp._vf.boundaryModeR="CLAMP_TO_EDGE";heightTexProp._vf.minificationFilter="NEAREST";heightTexProp._vf.magnificationFilter="NEAREST";heightTexture.addChild(heightTexProp,"textureProperties");heightTexture.nodeChanged();heightTexture._nameSpace=bvhRefiner._nameSpace;heightTexture._vf.url[0]=imageAddressHeight;heightTexture._vf.repeatT=false;heightTexture._vf.repeatS=false;heightTexture._vf.scale=false;textures.addChild(heightTexture,'texture');heightTexture.nodeChanged();var heightTextureField=new x3dom.nodeTypes.Field(ctx);heightTextureField._vf.name='texHeight';heightTextureField._vf.type='SFInt32';heightTextureField._vf.value=1;composedShader.addChild(heightTextureField,'fields');heightTextureField.nodeChanged();if(bvhRefiner._vf.normalUrl!==""){var normalTexProp=new x3dom.nodeTypes.TextureProperties(ctx);normalTexProp._vf.boundaryModeS="CLAMP_TO_EDGE";normalTexProp._vf.boundaryModeT="CLAMP_TO_EDGE";normalTexProp._vf.boundaryModeR="CLAMP_TO_EDGE";normalTexProp._vf.minificationFilter="LINEAR";normalTexProp._vf.magnificationFilter="LINEAR";normalTexture.addChild(normalTexProp,"textureProperties");normalTexture.nodeChanged();normalTexture._nameSpace=bvhRefiner._nameSpace;normalTexture._vf.url[0]=imageAddressNormal;normalTexture._vf.repeatT=false;normalTexture._vf.repeatS=false;textures.addChild(normalTexture,'texture');normalTexture.nodeChanged();var normalTextureField=new x3dom.nodeTypes.Field(ctx);normalTextureField._vf.name='texNormal';normalTextureField._vf.type='SFInt32';normalTextureField._vf.value=2;composedShader.addChild(normalTextureField,'fields');normalTextureField.nodeChanged();}
var maxHeight=new x3dom.nodeTypes.Field(ctx);maxHeight._vf.name='maxElevation';maxHeight._vf.type='SFFloat';maxHeight._vf.value=bvhRefiner._vf.maxElevation;composedShader.addChild(maxHeight,'fields');maxHeight.nodeChanged();appearance.addChild(textures);textures.nodeChanged();appearance.addChild(composedShader);composedShader.nodeChanged();shape.addChild(appearance);appearance.nodeChanged();shape.addChild(geometry);bvhRefiner.addChild(shape);shape.nodeChanged();cullObject.boundedNode=shape;cullObject.volume=shape.getVolume();cullObject.volume.max.z=bvhRefiner._vf.maxElevation;cullObject.volume.min.z=0;cullObject.volume.center=cullObject.volume.min.add(cullObject.volume.max).multiply(0.5);cullObject.volume.transform(nodeTransformation);calculateNeighborhood();}
function calculateNeighborhood(){var levelStartID=0;for(var i=0;i<level;i++){levelStartID+=Math.pow(4,i);}
var sid=levelStartID+nodeNumber;bvhRefiner.nodeList[sid]=that;var c=Math.sqrt(Math.pow(4,level));neighbors[0]=levelStartID+(Math.ceil(((nodeNumber+1)/c)-1)*c+((nodeNumber+(c-1))%c));neighbors[1]=levelStartID+(Math.ceil(((nodeNumber+1)/c)-1)*c+((nodeNumber+1)%c));neighbors[3]=levelStartID+(nodeNumber+(c*(c-1)))%(Math.pow(4,level));neighbors[2]=levelStartID+(nodeNumber+c)%(Math.pow(4,level));if(columnNr===0){neighbors[0]=-1;}
if(rowNr===0){neighbors[3]=-1;}
if(columnNr===c-1){neighbors[1]=-1;}
if(rowNr===c-1){neighbors[2]=-1;}}
function createVertexShader(){if(bvhRefiner._vf.normalUrl!=="")
return"attribute vec3 position;\n"+"attribute vec3 texcoord;\n"+"uniform mat4 modelViewMatrix;\n"+"uniform mat4 modelViewProjectionMatrix;\n"+"uniform sampler2D texColor;\n"+"uniform sampler2D texHeight;\n"+"uniform float maxElevation;\n"+"uniform sampler2D texNormal;\n"+"varying vec2 texC;\n"+"varying vec3 vLight;\n"+"const float shininess = 32.0;\n"+"\n"+"void main(void) {\n"+" vec3 uLightPosition = vec3(160.0, -9346.0, 4806.0);\n"+" vec4 colr = texture2D(texColor, vec2(texcoord[0], 1.0-texcoord[1]));\n"+" vec3 uAmbientMaterial = vec3(1.0, 1.0, 0.9);"+" vec3 uAmbientLight = vec3(0.5, 0.5, 0.5);"+" vec3 uDiffuseMaterial = vec3(0.7, 0.7, 0.7);"+" vec3 uDiffuseLight = vec3(1.0, 1.0, 1.0);"+" vec4 vertexPositionEye4 = modelViewMatrix * vec4(position, 1.0);"+" vec3 vertexPositionEye3 = vec3((modelViewMatrix * vec4(vertexPositionEye4.xyz, 1.0)).xyz);"+" vec3 vectorToLightSource = normalize(uLightPosition - vertexPositionEye3);"+" vec4 height = texture2D(texHeight, vec2(texcoord[0], 1.0 - texcoord[1]));\n"+" vec4 normalEye = 2.0 * texture2D(texNormal, vec2(texcoord[0], 1.0-texcoord[1])) - 1.0;\n"+" float diffuseLightWeighting = max(dot(normalEye.xyz, vectorToLightSource), 0.0);"+" texC = vec2(texcoord[0], 1.0-texcoord[1]);\n"+" vec3 diffuseReflectance = uDiffuseMaterial * uDiffuseLight * diffuseLightWeighting;"+" vec3 uSpecularMaterial = vec3(0.0, 0.0, 0.0);"+" vec3 uSpecularLight = vec3(1.0, 1.0, 1.0);"+" vec3 reflectionVector = normalize(reflect(-vectorToLightSource, normalEye.xyz));"+" vec3 viewVectorEye = -normalize(vertexPositionEye3);"+" float rdotv = max(dot(reflectionVector, viewVectorEye), 0.0);"+" float specularLightWeight = pow(rdotv, shininess);"+" vec3 specularReflection = uSpecularMaterial * uSpecularLight * specularLightWeight;"+" vLight = vec4(uAmbientMaterial * uAmbientLight + diffuseReflectance + specularReflection, 1.0).xyz;"+" gl_Position = modelViewProjectionMatrix * vec4(position.xy, height.x * maxElevation, 1.0);\n"+"}\n";else
return"attribute vec3 position;\n"+"attribute vec3 texcoord;\n"+"uniform mat4 modelViewProjectionMatrix;\n"+"uniform sampler2D texHeight;\n"+"uniform float maxElevation;\n"+"varying vec2 texC;\n"+"\n"+"void main(void) {\n"+" vec4 height = texture2D(texHeight, vec2(texcoord[0], 1.0 - texcoord[1]));\n"+" texC = vec2(texcoord[0], 1.0-texcoord[1]);\n"+" gl_Position = modelViewProjectionMatrix * vec4(position.xy, height.x * maxElevation, 1.0);\n"+"}\n";}
function createFragmentShader(){if(bvhRefiner._vf.normalUrl!=="")
return"#ifdef GL_ES\n"+"precision highp float;\n"+"#endif\n"+"uniform sampler2D texColor;\n"+"uniform sampler2D texNormal;\n"+"varying vec2 texC;\n"+"varying vec3 vLight;\n"+"\n"+"\n"+"void main(void) {\n"+" vec4 normal = 2.0 * texture2D(texNormal, texC) - 1.0;\n"+" vec4 colr = texture2D(texColor, texC);\n"+" gl_FragColor = vec4(colr.xyz * vLight, colr.w);\n"+"}\n";else
return"#ifdef GL_ES\n"+"precision highp float;\n"+"#endif\n"+"uniform sampler2D texColor;\n"+"varying vec2 texC;\n"+"\n"+"\n"+"void main(void) {\n"+" gl_FragColor = texture2D(texColor, texC);\n"+"}\n";}
this.CreateChildren=function(){create();};function create(){var deltaR=Math.sqrt(Math.pow(4,level));var deltaR1=Math.sqrt(Math.pow(4,level+1));var lt=Math.floor(nodeNumber/deltaR)*4*deltaR+
(nodeNumber%deltaR)*2;var rt=lt+1;var lb=lt+deltaR1;var rb=lb+1;var s=(bvhRefiner._vf.size).multiply(0.25);children.push(new QuadtreeNode3D(ctx,bvhRefiner,(level+1),lt,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(-s.x,s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2),(rowNr*2),geometry));children.push(new QuadtreeNode3D(ctx,bvhRefiner,(level+1),rt,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(s.x,s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2+1),(rowNr*2),geometry));children.push(new QuadtreeNode3D(ctx,bvhRefiner,(level+1),lb,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(-s.x,-s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2),(rowNr*2+1),geometry));children.push(new QuadtreeNode3D(ctx,bvhRefiner,(level+1),rb,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(s.x,-s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2+1),(rowNr*2+1),geometry));}
this.Shape=function(){return shape;};this.ChildrenReady=function(){return childrenReadyState;};this.Ready=function(){if(shape._webgl!==undefined&&shape._webgl.texture!==undefined){return ready();}
return false;};function ready(){readyState=true;for(var i=0;i<shape._webgl.texture.length;i++){if(!shape._webgl.texture[i].texture.ready){readyState=false;}}
return readyState;}
function updateLoadingState(drawableCollection,transform){childrenReadyState=true;for(var i=0;i<children.length;i++){if(!children[i].Ready()){childrenReadyState=false;}}
if(children.length<4){childrenReadyState=false;}
else if(childrenReadyState){for(var i=0;i<children.length;i++){children[i].Shape()._vf.render=true;}}
if(shape._webgl===undefined||shape._webgl.texture===undefined){drawableCollection.context.setupShape(drawableCollection.gl,{shape:shape,transform:transform},drawableCollection.viewarea);}
else{ready();}}
this.collectDrawables=function(transform,drawableCollection,singlePath,invalidateCache,planeMask){drawableCollection.frustumCulling=false;cullObject.localMatrix=nodeTransformation;if(!readyState||!childrenReadyState){updateLoadingState(drawableCollection,nodeTransformation);}
var mat_view=drawableCollection.viewMatrix;var vPos=mat_view.multMatrixPnt(nodeTransformation.multMatrixPnt(position));var distanceToCamera=Math.sqrt(Math.pow(vPos.x,2)+Math.pow(vPos.y,2)+Math.pow(vPos.z,2));if(readyState&&vPos.z-(cullObject.volume.diameter/2)<0){if((distanceToCamera<Math.pow((bvhRefiner._vf.maxDepth-level),2)*resizeFac/bvhRefiner._vf.factor)||level<bvhRefiner._vf.minDepth){if(bvhRefiner.view.isMovingOrAnimating()&&(children.length==0||level>=bvhRefiner._vf.interactionDepth)){render(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask);}
else{if(children.length===0){bvhRefiner.nodeProducer.AddNewNode(that,distanceToCamera);render(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask);}
else{if(childrenReadyState){for(var i=0;i<children.length;i++){children[i].collectDrawables(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask);}}
else{render(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask);for(var i=0;i<children.length;i++){children[i].collectDrawables(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask);children[i].Shape()._vf.render=false;}}}}}
else{render(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask);}}};this.hasHigherRenderLevel=function(drawableCollection){var mat_view=drawableCollection.viewMatrix;var vPos=mat_view.multMatrixPnt(nodeTransformation.multMatrixPnt(position));var distanceToCamera=Math.sqrt(Math.pow(vPos.x,2)+Math.pow(vPos.y,2)+Math.pow(vPos.z,2));if(distanceToCamera<Math.pow((bvhRefiner._vf.maxDepth-level),2)*resizeFac/bvhRefiner._vf.factor){return true;}
return false;};function render(transform,drawableCollection,singlePath,invalidateCache,planeMask){var hasNeighborHigherResolution=[];for(var i=0;i<neighbors.length;i++){if(bvhRefiner.nodeList[neighbors[i]]!==undefined){if(bvhRefiner.nodeList[neighbors[i]].ChildrenReady()&&bvhRefiner.nodeList[neighbors[i]].hasHigherRenderLevel(drawableCollection))
hasNeighborHigherResolution.push(true);else
hasNeighborHigherResolution.push(false);}
else{hasNeighborHigherResolution.push(false);}}
var indiceNumber=0;if(hasNeighborHigherResolution[3]){if(hasNeighborHigherResolution[1]){indiceNumber=5;}
else if(hasNeighborHigherResolution[0]){indiceNumber=6;}
else{indiceNumber=4;}}
else if(hasNeighborHigherResolution[2]){if(hasNeighborHigherResolution[1]){indiceNumber=8;}
else if(hasNeighborHigherResolution[0]){indiceNumber=7;}
else{indiceNumber=3;}}
else if(hasNeighborHigherResolution[0]){indiceNumber=1;}
else if(hasNeighborHigherResolution[1]){indiceNumber=2;}
if(lastIndice!==indiceNumber||triangulationAttributes===null){triangulationAttributes=shape._cf.geometry.node.getTriangulationAttributes(indiceNumber);lastIndice=indiceNumber;}
shape._tessellationProperties=[triangulationAttributes];shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);}
this.getVolume=function(){return shape.getVolume();};this.Level=function(){return level;};var that=this;initialize();}
function QuadtreeNodeBin(ctx,bvhRefiner,level,columnNr,rowNr,resizeFac)
{var cullObject={};var mat_view;var vPos;var distanceToCamera;var fac=((1/4*Math.pow(level,2)+1.5)*0.1)*bvhRefiner._vf.factor;var children=[];var childrenExist=false;var readyState=false;var childrenReadyState=false;var path=bvhRefiner._vf.url+"/"+level+"/"+columnNr+"/";var file=path+rowNr+".x3d";var position=new x3dom.fields.SFVec3f(0.0,0.0,0.0);var exists=false;var shape=new x3dom.nodeTypes.Shape(ctx);var xhr=new XMLHttpRequest();xhr.open("GET",file,false);try{xhr.send();var xmlDoc=xhr.responseXML;if(xmlDoc!==null){var replacer=new RegExp("\"","g");createGeometry(shape);initialize();exists=true;}}
catch(exp){x3dom.debug.logException("Error loading file '"+file+"': "+exp);}
this.Exists=function(){return exists;};this.Shape=function(){return shape;};function createGeometry(parent){this._nameSpace=new x3dom.NodeNameSpace("",bvhRefiner._nameSpace.doc);this._nameSpace.setBaseURL(bvhRefiner._nameSpace.baseURL+path);var tempShape=xmlDoc.getElementsByTagName("Shape")[0];shape=this._nameSpace.setupTree(tempShape);if(!bvhRefiner._vf.useNormals){var appearance=new x3dom.nodeTypes.Appearance(ctx);var material=new x3dom.nodeTypes.Material(ctx);appearance.addChild(material);shape._cf.appearance=appearance;}
position=x3dom.fields.SFVec3f.copy(shape._cf.geometry.node._vf.position);}
function initialize(){cullObject.boundedNode=shape;cullObject.volume=shape.getVolume();}
this.CreateChildren=function(){create();};function create(){children.push(new QuadtreeNodeBin(ctx,bvhRefiner,(level+1),(columnNr*2),(rowNr*2),resizeFac));children.push(new QuadtreeNodeBin(ctx,bvhRefiner,(level+1),(columnNr*2+1),(rowNr*2),resizeFac));children.push(new QuadtreeNodeBin(ctx,bvhRefiner,(level+1),(columnNr*2),(rowNr*2+1),resizeFac));children.push(new QuadtreeNodeBin(ctx,bvhRefiner,(level+1),(columnNr*2+1),(rowNr*2+1),resizeFac));}
this.Ready=function(){if(shape._webgl!==undefined&&shape._webgl.internalDownloadCount!==undefined){return ready();}
return false;};function ready(){readyState=true;if(shape._webgl.internalDownloadCount>0){readyState=false;}
return readyState;}
function updateLoadingState(drawableCollection,transform){childrenReadyState=true;for(var i=0;i<children.length;i++){if(!children[i].Ready()){childrenReadyState=false;}}
if(childrenReadyState){for(var i=0;i<children.length;i++){children[i].Shape()._vf.render=true;}}
if(shape._cf.geometry.node!==null){if(shape._webgl===undefined||shape._webgl.internalDownloadCount===undefined){drawableCollection.context.setupShape(drawableCollection.gl,{shape:shape,transform:transform},drawableCollection.viewarea);}
else{ready();}}}
this.collectDrawables=function(transform,drawableCollection,singlePath,invalidateCache,planeMask){fac=((1/4*Math.pow(level,2)+1.5)*0.1)*bvhRefiner._vf.factor;cullObject.localMatrix=transform;if(!readyState||!childrenReadyState){updateLoadingState(drawableCollection,transform);}
if(readyState&&exists&&(planeMask=drawableCollection.cull(transform,cullObject,singlePath,planeMask))>0){mat_view=drawableCollection.viewMatrix;vPos=mat_view.multMatrixPnt(transform.multMatrixPnt(position));distanceToCamera=Math.sqrt(Math.pow(vPos.x,2)+Math.pow(vPos.y,2)+Math.pow(vPos.z,2));if((distanceToCamera<Math.pow((bvhRefiner._vf.maxDepth-level),2)/fac*1000)||level<bvhRefiner._vf.minDepth){if(bvhRefiner.view.isMovingOrAnimating()&&level>=bvhRefiner._vf.interactionDepth){shape.collectDrawableObjects(transform,drawableCollection,singlePath,invalidateCache,planeMask,[]);}
else{if(children.length===0){bvhRefiner.nodeProducer.AddNewNode(that,distanceToCamera);shape.collectDrawableObjects(transform,drawableCollection,singlePath,invalidateCache,planeMask,[]);}
else if(children.length===0&&bvhRefiner.createChildren>0){shape.collectDrawableObjects(transform,drawableCollection,singlePath,invalidateCache,planeMask,[]);}
else{if(!childrenExist){for(var i=0;i<children.length;i++){if(children[i].Exists()){childrenExist=true;break;}}}
if(childrenExist&&childrenReadyState){for(var i=0;i<children.length;i++){children[i].collectDrawables(transform,drawableCollection,singlePath,invalidateCache,planeMask);}}
else{for(var i=0;i<children.length;i++){children[i].collectDrawables(transform,drawableCollection,singlePath,invalidateCache,planeMask);children[i].Shape()._vf.render=false;}
shape.collectDrawableObjects(transform,drawableCollection,singlePath,invalidateCache,planeMask,[]);}}}}
else{shape.collectDrawableObjects(transform,drawableCollection,singlePath,invalidateCache,planeMask,[]);}}};this.getVolume=function(){return shape.getVolume();};this.Level=function(){return level;};var that=this;initialize();}
function BVHNode(ctx,bvhRefiner,level,path,imgNumber,count)
{var cullObject={};var mat_view;var vPos;var distanceToCamera;var fac=((1/4*Math.pow(level,2)+1.5)*0.1)*bvhRefiner._vf.factor;var children=[];var childrenExist=false;var readyState=false;var childrenReadyState=false;var file=bvhRefiner._vf.url+path+imgNumber+".x3d";var position=new x3dom.fields.SFVec3f(0.0,0.0,0.0);var exists=false;var shape=new x3dom.nodeTypes.Shape(ctx);this.RecalcFactor=function(){fac=((1/4*Math.pow(level,2)+1.5)*0.1)*bvhRefiner._vf.factor;for(var i=0;i<children.length;i++){children[i].RecalcFactor();}};var xhr=new XMLHttpRequest();xhr.open("GET",file,false);try{xhr.send();var xmlDoc=xhr.responseXML;if(xmlDoc!==null){var replacer=new RegExp("\"","g");createGeometry(shape);initialize();exists=true;}}
catch(exp){x3dom.debug.logException("Error loading file '"+file+"': "+exp);}
this.Exists=function()
{return exists;};this.Shape=function(){return shape;};function createGeometry(parent){this._nameSpace=new x3dom.NodeNameSpace("",bvhRefiner._nameSpace.doc);this._nameSpace.setBaseURL(bvhRefiner._nameSpace.baseURL+bvhRefiner._vf.url+path);var tempShape=xmlDoc.getElementsByTagName("Shape")[0];shape=this._nameSpace.setupTree(tempShape);if(!bvhRefiner._vf.useNormals){var appearance=new x3dom.nodeTypes.Appearance(ctx);var material=new x3dom.nodeTypes.Material(ctx);appearance.addChild(material);shape._cf.appearance=appearance;}
position=x3dom.fields.SFVec3f.copy(shape._cf.geometry.node._vf.position);}
function initialize(){cullObject.boundedNode=shape;cullObject.volume=shape.getVolume();}
this.CreateChildren=function(){create();};function create(){for(var i=0;i<count;i++){children.push(new BVHNode(ctx,bvhRefiner,(level+1),path+imgNumber+"/",i+1,count));}}
this.Ready=function(){if(shape._webgl!==undefined&&shape._webgl.internalDownloadCount!==undefined){return ready();}
return false;};function ready(){return(shape._webgl.internalDownloadCount<=0);}
function updateLoadingState(drawableCollection,transform){for(var i=0;i<children.length;i++){childrenReadyState=true;if(!children[i].Ready()){childrenReadyState=false;}
else{children[i].Shape()._vf.render=true;}}
if(shape._cf.geometry.node!==null){if(shape._webgl===undefined||shape._webgl.internalDownloadCount===undefined){drawableCollection.context.setupShape(drawableCollection.gl,{shape:shape,transform:transform},drawableCollection.viewarea);}
else{ready();}}}
this.collectDrawables=function(transform,drawableCollection,singlePath,invalidateCache,planeMask){fac=((1/4*Math.pow(level,2)+1.5)*0.1)*bvhRefiner._vf.factor;cullObject.localMatrix=transform;if(!readyState||!childrenReadyState){updateLoadingState(drawableCollection,transform);}
if(readyState&&exists&&(planeMask=drawableCollection.cull(transform,cullObject,singlePath,planeMask))>0){mat_view=drawableCollection.viewMatrix;vPos=mat_view.multMatrixPnt(transform.multMatrixPnt(position));distanceToCamera=Math.sqrt(Math.pow(vPos.x,2)+Math.pow(vPos.y,2)+Math.pow(vPos.z,2));if((distanceToCamera<Math.pow((bvhRefiner._vf.maxDepth-level),2)/fac)||level<bvhRefiner._vf.minDepth){if(bvhRefiner.view.isMovingOrAnimating()&&level>=bvhRefiner._vf.interactionDepth){shape.collectDrawableObjects(transform,drawableCollection,singlePath,invalidateCache,planeMask,[]);}
else{if(children.length===0){bvhRefiner.nodeProducer.AddNewNode(that,distanceToCamera);shape.collectDrawableObjects(transform,drawableCollection,singlePath,invalidateCache,planeMask,[]);}
else if(children.length===0&&bvhRefiner.createChildren>0){shape.collectDrawableObjects(transform,drawableCollection,singlePath,invalidateCache,planeMask,[]);}
else{if(!childrenExist){for(var i=0;i<children.length;i++){if(children[i].Exists()){childrenExist=true;break;}}}
if(childrenExist&&childrenReadyState){for(var i=0;i<children.length;i++){children[i].collectDrawables(transform,drawableCollection,singlePath,invalidateCache,planeMask);}}
else{for(var i=0;i<children.length;i++){children[i].collectDrawables(transform,drawableCollection,singlePath,invalidateCache,planeMask);children[i].Shape()._vf.render=false;}
shape.collectDrawableObjects(transform,drawableCollection,singlePath,invalidateCache,planeMask,[]);}}}}
else{shape.collectDrawableObjects(transform,drawableCollection,singlePath,invalidateCache,planeMask,[]);}}};this.getVolume=function(){return shape.getVolume();};this.Level=function(){return level;};var that=this;initialize();}
function QuadtreeNode3D_NEW(ctx,bvhRefiner,level,nodeNumber,nodeTransformation,columnNr,rowNr,geometry)
{var children=[];var shape=new x3dom.nodeTypes.Shape();var position=null;var imageAddressColor=bvhRefiner._vf.textureUrl+"/"+level+"/"+
columnNr+"/"+rowNr+"."+
(bvhRefiner._vf.textureFormat).toLowerCase();var imageAddressHeight=bvhRefiner._vf.elevationUrl+"/"+level+"/"+
columnNr+"/"+rowNr+"."+
(bvhRefiner._vf.elevationFormat).toLowerCase();var imageAddressNormal=bvhRefiner._vf.normalUrl+"/"+level+"/"+
columnNr+"/"+rowNr+"."+
(bvhRefiner._vf.normalFormat).toLowerCase();var exists=true;var resizeFac=(bvhRefiner._vf.size.x+bvhRefiner._vf.size.y)/2.0;var cullObject={};function initialize(){var appearance=new x3dom.nodeTypes.Appearance(ctx);var shader=new x3dom.nodeTypes.CommonSurfaceShader(ctx);var ssTexColor=new x3dom.nodeTypes.SurfaceShaderTexture(ctx);var colorTexture=new x3dom.nodeTypes.ImageTexture(ctx);var ssTexDisplace=new x3dom.nodeTypes.SurfaceShaderTexture(ctx);var heightTexture=new x3dom.nodeTypes.ImageTexture(ctx);shape._nameSpace=bvhRefiner._nameSpace;position=nodeTransformation.e3();shader._vf.displacementFactor=bvhRefiner._vf.maxElevation;colorTexture._nameSpace=bvhRefiner._nameSpace;colorTexture._vf.url[0]=imageAddressColor;colorTexture._vf.repeatT=false;colorTexture._vf.repeatS=false;ssTexColor.addChild(colorTexture,'texture');colorTexture.nodeChanged();shader.addChild(ssTexColor,'diffuseTexture');ssTexColor.nodeChanged();heightTexture._nameSpace=bvhRefiner._nameSpace;heightTexture._vf.url[0]=imageAddressHeight;heightTexture._vf.repeatT=false;heightTexture._vf.repeatS=false;ssTexDisplace.addChild(heightTexture,'texture');heightTexture.nodeChanged();shader.addChild(ssTexDisplace,'displacementTexture');heightTexture.nodeChanged();appearance.addChild(shader,'shaders');shader.nodeChanged();shape.addChild(appearance);appearance.nodeChanged();shape.addChild(geometry);geometry.nodeChanged();bvhRefiner.addChild(shape);shape.nodeChanged();cullObject.boundedNode=shape;cullObject.volume=shape.getVolume();cullObject.volume.max.z=Math.round(bvhRefiner._vf.maxElevation/2);cullObject.volume.min.z=-cullObject.volume.max.z;}
function createVertexShader(){return"attribute vec3 position;\n"+"attribute vec3 texcoord;\n"+"uniform mat4 modelViewMatrix;\n"+"uniform mat4 modelViewProjectionMatrix;\n"+"uniform sampler2D texColor;\n"+"uniform sampler2D texHeight;\n"+"uniform float maxElevation;\n"+"uniform sampler2D texNormal;\n"+"varying vec2 texC;\n"+"varying vec3 vLight;\n"+"const float shininess = 32.0;\n"+"\n"+"void main(void) {\n"+" vec3 uLightPosition = vec3(160.0, -9346.0, 4806.0);\n"+" vec4 colr = texture2D(texColor, vec2(texcoord[0], 1.0-texcoord[1]));\n"+" vec3 uAmbientMaterial = vec3(1.0, 1.0, 0.9);"+" vec3 uAmbientLight = vec3(0.5, 0.5, 0.5);"+" vec3 uDiffuseMaterial = vec3(0.7, 0.7, 0.7);"+" vec3 uDiffuseLight = vec3(1.0, 1.0, 1.0);"+" vec4 vertexPositionEye4 = modelViewMatrix * vec4(position, 1.0);"+" vec3 vertexPositionEye3 = vec3((modelViewMatrix * vec4(vertexPositionEye4.xyz, 1.0)).xyz);"+" vec3 vectorToLightSource = normalize(uLightPosition - vertexPositionEye3);"+" vec4 height = texture2D(texHeight, vec2(texcoord[0], 1.0 - texcoord[1]));\n"+" vec4 normalEye = 2.0 * texture2D(texNormal, vec2(texcoord[0], 1.0-texcoord[1])) - 1.0;\n"+" float diffuseLightWeighting = max(dot(normalEye.xyz, vectorToLightSource), 0.0);"+" texC = vec2(texcoord[0], 1.0-texcoord[1]);\n"+" vec3 diffuseReflectance = uDiffuseMaterial * uDiffuseLight * diffuseLightWeighting;"+" vec3 uSpecularMaterial = vec3(0.0, 0.0, 0.0);"+" vec3 uSpecularLight = vec3(1.0, 1.0, 1.0);"+" vec3 reflectionVector = normalize(reflect(-vectorToLightSource, normalEye.xyz));"+" vec3 viewVectorEye = -normalize(vertexPositionEye3);"+" float rdotv = max(dot(reflectionVector, viewVectorEye), 0.0);"+" float specularLightWeight = pow(rdotv, shininess);"+" vec3 specularReflection = uSpecularMaterial * uSpecularLight * specularLightWeight;"+" vLight = vec4(uAmbientMaterial * uAmbientLight + diffuseReflectance + specularReflection, 1.0).xyz;"+" gl_Position = modelViewProjectionMatrix * vec4(position.xy, height.x * maxElevation, 1.0);\n"+"}\n";}
function createFragmentShader(){return"#ifdef GL_ES\n"+"precision highp float;\n"+"#endif\n"+"uniform sampler2D texColor;\n"+"uniform sampler2D texNormal;\n"+"varying vec2 texC;\n"+"varying vec3 vLight;\n"+"\n"+"\n"+"void main(void) {\n"+" vec4 normal = 2.0 * texture2D(texNormal, texC) - 1.0;\n"+" vec4 colr = texture2D(texColor, texC);\n"+" gl_FragColor = vec4(colr.xyz * vLight, colr.w);\n"+"}\n";}
function create(){var deltaR=Math.sqrt(Math.pow(4,level));var deltaR1=Math.sqrt(Math.pow(4,level+1));var lt=Math.floor(nodeNumber/deltaR)*4*deltaR+
(nodeNumber%deltaR)*2;var rt=lt+1;var lb=lt+deltaR1;var rb=lb+1;var s=(bvhRefiner._vf.size).multiply(0.25);children.push(new QuadtreeNode3D_NEW(ctx,bvhRefiner,(level+1),lt,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(-s.x,s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2),(rowNr*2),geometry));children.push(new QuadtreeNode3D_NEW(ctx,bvhRefiner,(level+1),rt,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(s.x,s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2+1),(rowNr*2),geometry));children.push(new QuadtreeNode3D_NEW(ctx,bvhRefiner,(level+1),lb,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(-s.x,-s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2),(rowNr*2+1),geometry));children.push(new QuadtreeNode3D_NEW(ctx,bvhRefiner,(level+1),rb,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(s.x,-s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2+1),(rowNr*2+1),geometry));}
this.collectDrawables=function(transform,drawableCollection,singlePath,invalidateCache,planeMask){cullObject.localMatrix=nodeTransformation;if(exists&&(planeMask=drawableCollection.cull(transform,cullObject,singlePath,planeMask))>0){var mat_view=drawableCollection.viewMatrix;var vPos=mat_view.multMatrixPnt(transform.multMatrixPnt(position));var distanceToCamera=Math.sqrt(Math.pow(vPos.x,2)+Math.pow(vPos.y,2)+Math.pow(vPos.z,2));if((distanceToCamera<Math.pow((bvhRefiner._vf.maxDepth-level),2)*resizeFac/bvhRefiner._vf.factor)){if(children.length===0&&bvhRefiner.createChildren===0){bvhRefiner.createChildren++;create();shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);}
else if(children.length===0&&bvhRefiner.createChildren>0){shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);}
else{for(var i=0;i<children.length;i++){children[i].collectDrawables(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask);}}}
else{shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);}}};this.getVolume=function(){return shape.getVolume();};initialize();}
function OctreeNode(ctx,bvhRefiner,level,nodeTransformation)
{var children=[];var position=nodeTransformation.e3();var shape=new x3dom.nodeTypes.Shape(ctx);var cullObject={};var resizeFac=(bvhRefiner._vf.octSize.x+bvhRefiner._vf.octSize.y+bvhRefiner._vf.octSize.z)/3.0;function initialize(){var appearance=new x3dom.nodeTypes.Appearance(ctx);var geometry=new x3dom.nodeTypes.Box(ctx);geometry._vf.size=bvhRefiner._vf.octSize;geometry.fieldChanged('size');shape._nameSpace=new x3dom.NodeNameSpace("",bvhRefiner._nameSpace.doc);shape._nameSpace.setBaseURL(bvhRefiner._nameSpace.baseURL);shape.addChild(appearance);appearance.nodeChanged();shape.addChild(geometry);geometry.nodeChanged();shape.nodeChanged();cullObject.boundedNode=shape;cullObject.volume=shape.getVolume();}
function create(){var s=bvhRefiner._vf.octSize.multiply(0.25);children.push(new OctreeNode(ctx,bvhRefiner,(level+1),nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(-s.x,s.y,s.z))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,0.5)))));children.push(new OctreeNode(ctx,bvhRefiner,(level+1),nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(s.x,s.y,s.z))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,0.5)))));children.push(new OctreeNode(ctx,bvhRefiner,(level+1),nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(-s.x,-s.y,s.z))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,0.5)))));children.push(new OctreeNode(ctx,bvhRefiner,(level+1),nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(s.x,-s.y,s.z))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,0.5)))));children.push(new OctreeNode(ctx,bvhRefiner,(level+1),nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(-s.x,s.y,-s.z))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,0.5)))));children.push(new OctreeNode(ctx,bvhRefiner,(level+1),nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(s.x,s.y,-s.z))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,0.5)))));children.push(new OctreeNode(ctx,bvhRefiner,(level+1),nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(-s.x,-s.y,-s.z))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,0.5)))));children.push(new OctreeNode(ctx,bvhRefiner,(level+1),nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(s.x,-s.y,-s.z))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,0.5)))));}
this.collectDrawables=function(transform,drawableCollection,singlePath,invalidateCache,planeMask){cullObject.localMatrix=nodeTransformation;if((planeMask=drawableCollection.cull(transform,cullObject,singlePath,planeMask))>0){var mat_view=drawableCollection.viewMatrix;var vPos=mat_view.multMatrixPnt(transform.multMatrixPnt(position));var distanceToCamera=Math.sqrt(Math.pow(vPos.x,2)+Math.pow(vPos.y,2)+Math.pow(vPos.z,2));if((distanceToCamera<Math.pow((bvhRefiner._vf.maxDepth-level),2)*resizeFac/bvhRefiner._vf.factor)){if(children.length===0){create();}
else{for(var i=0;i<children.length;i++){children[i].collectDrawables(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask);}}}
else{shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);}}};this.getVolume=function(){return shape.getVolume();};initialize();}
function QuadtreeNode3D_32bit(ctx,bvhRefiner,level,nodeNumber,nodeTransformation,columnNr,rowNr,geometry)
{var children=[];var shape=new x3dom.nodeTypes.Shape();var position=null;var imageAddressColor=bvhRefiner._vf.textureUrl+"/"+level+"/"+
columnNr+"/"+rowNr+"."+
(bvhRefiner._vf.textureFormat).toLowerCase();var imageAddressHeight=bvhRefiner._vf.elevationUrl+"/"+level+"/"+
columnNr+"/"+rowNr+"."+
(bvhRefiner._vf.elevationFormat).toLowerCase();var imageAddressNormal=bvhRefiner._vf.normalUrl+"/"+level+"/"+
columnNr+"/"+rowNr+"."+
(bvhRefiner._vf.normalFormat).toLowerCase();var exists=true;var resizeFac=(bvhRefiner._vf.size.x+bvhRefiner._vf.size.y)/2.0;var cullObject={};function initialize(){var appearance=new x3dom.nodeTypes.Appearance(ctx);var textures=new x3dom.nodeTypes.MultiTexture(ctx);var colorTexture=new x3dom.nodeTypes.ImageTexture(ctx);var heightTexture=new x3dom.nodeTypes.ImageTexture(ctx);var normalTexture=new x3dom.nodeTypes.ImageTexture(ctx);var composedShader=new x3dom.nodeTypes.ComposedShader(ctx);shape._nameSpace=bvhRefiner._nameSpace;position=nodeTransformation.e3();var vertexShader=new x3dom.nodeTypes.ShaderPart(ctx);vertexShader._vf.type='vertex';vertexShader._vf.url[0]=createVertexShader();var fragmentShader=new x3dom.nodeTypes.ShaderPart(ctx);fragmentShader._vf.type='fragment';fragmentShader._vf.url[0]=createFragmentShader();composedShader.addChild(vertexShader,'parts');composedShader.addChild(fragmentShader,'parts');colorTexture._nameSpace=bvhRefiner._nameSpace;colorTexture._vf.url[0]=imageAddressColor;colorTexture._vf.repeatT=false;colorTexture._vf.repeatS=false;colorTexture._vf.generateMipMaps=false;textures.addChild(colorTexture,'texture');colorTexture.nodeChanged();var colorTextureField=new x3dom.nodeTypes.Field(ctx);colorTextureField._vf.name='texColor';colorTextureField._vf.type='SFInt32';colorTextureField._vf.value=0;composedShader.addChild(colorTextureField,'fields');colorTextureField.nodeChanged();heightTexture._nameSpace=bvhRefiner._nameSpace;heightTexture._vf.url[0]=imageAddressHeight;heightTexture._vf.repeatT=false;heightTexture._vf.repeatS=false;textures.addChild(heightTexture,'texture');heightTexture.nodeChanged();var heightTextureField=new x3dom.nodeTypes.Field(ctx);heightTextureField._vf.name='texHeight';heightTextureField._vf.type='SFInt32';heightTextureField._vf.value=1;composedShader.addChild(heightTextureField,'fields');heightTextureField.nodeChanged();normalTexture._nameSpace=bvhRefiner._nameSpace;normalTexture._vf.url[0]=imageAddressNormal;normalTexture._vf.repeatT=false;normalTexture._vf.repeatS=false;textures.addChild(normalTexture,'texture');normalTexture.nodeChanged();var normalTextureField=new x3dom.nodeTypes.Field(ctx);normalTextureField._vf.name='texNormal';normalTextureField._vf.type='SFInt32';normalTextureField._vf.value=2;composedShader.addChild(normalTextureField,'fields');normalTextureField.nodeChanged();var maxHeight=new x3dom.nodeTypes.Field(ctx);maxHeight._vf.name='maxElevation';maxHeight._vf.type='SFFloat';maxHeight._vf.value=bvhRefiner._vf.maxElevation;composedShader.addChild(maxHeight,'fields');maxHeight.nodeChanged();appearance.addChild(textures);textures.nodeChanged();appearance.addChild(composedShader);composedShader.nodeChanged();shape.addChild(appearance);appearance.nodeChanged();shape.addChild(geometry);geometry.nodeChanged();bvhRefiner.addChild(shape);shape.nodeChanged();cullObject.boundedNode=shape;cullObject.volume=shape.getVolume();cullObject.volume.max.z=Math.round(bvhRefiner._vf.maxElevation);cullObject.volume.min.z=-cullObject.volume.max.z;}
function createVertexShader(){return"attribute vec3 position;\n"+"attribute vec3 texcoord;\n"+"uniform mat4 modelViewMatrix;\n"+"uniform mat4 modelViewProjectionMatrix;\n"+"uniform sampler2D texColor;\n"+"uniform sampler2D texHeight;\n"+"uniform float maxElevation;\n"+"uniform sampler2D texNormal;\n"+"varying vec2 texC;\n"+"varying vec3 vLight;\n"+"const float shininess = 32.0;\n"+"\n"+"void main(void) {\n"+" vec3 uLightPosition = vec3(160.0, -9346.0, 4806.0);\n"+" vec4 colr = texture2D(texColor, vec2(texcoord[0], 1.0-texcoord[1]));\n"+" vec3 uAmbientMaterial = vec3(1.0, 1.0, 0.9);"+" vec3 uAmbientLight = vec3(0.5, 0.5, 0.5);"+" vec3 uDiffuseMaterial = vec3(0.7, 0.7, 0.7);"+" vec3 uDiffuseLight = vec3(1.0, 1.0, 1.0);"+" vec4 vertexPositionEye4 = modelViewMatrix * vec4(position, 1.0);"+" vec3 vertexPositionEye3 = vec3((modelViewMatrix * vec4(vertexPositionEye4.xyz, 1.0)).xyz);"+" vec3 vectorToLightSource = normalize(uLightPosition - vertexPositionEye3);"+" vec4 height = texture2D(texHeight, vec2(texcoord[0], 1.0 - texcoord[1]));\n"+" vec4 normalEye = 2.0 * texture2D(texNormal, vec2(texcoord[0], 1.0-texcoord[1])) - 1.0;\n"+" float diffuseLightWeighting = max(dot(normalEye.xyz, vectorToLightSource), 0.0);"+" texC = vec2(texcoord[0], 1.0-texcoord[1]);\n"+" vec3 diffuseReflectance = uDiffuseMaterial * uDiffuseLight * diffuseLightWeighting;"+" vec3 uSpecularMaterial = vec3(0.0, 0.0, 0.0);"+" vec3 uSpecularLight = vec3(1.0, 1.0, 1.0);"+" vec3 reflectionVector = normalize(reflect(-vectorToLightSource, normalEye.xyz));"+" vec3 viewVectorEye = -normalize(vertexPositionEye3);"+" float rdotv = max(dot(reflectionVector, viewVectorEye), 0.0);"+" float specularLightWeight = pow(rdotv, shininess);"+" vec3 specularReflection = uSpecularMaterial * uSpecularLight * specularLightWeight;"+" vLight = vec4(uAmbientMaterial * uAmbientLight + diffuseReflectance + specularReflection, 1.0).xyz;"+" gl_Position = modelViewProjectionMatrix * vec4(position.xy, ((height.g * 256.0)+height.b) * maxElevation, 1.0);\n"+"}\n";}
function createFragmentShader(){return"#ifdef GL_ES\n"+"precision highp float;\n"+"#endif\n"+"uniform sampler2D texColor;\n"+"uniform sampler2D texNormal;\n"+"varying vec2 texC;\n"+"varying vec3 vLight;\n"+"\n"+"\n"+"void main(void) {\n"+" vec4 normal = 2.0 * texture2D(texNormal, texC) - 1.0;\n"+" vec4 colr = texture2D(texColor, texC);\n"+" float coler = ((colr.g * 256.0)+colr.b);"+" gl_FragColor = vec4(vLight * coler, 1.0);\n"+"}\n";}
function create(){var deltaR=Math.sqrt(Math.pow(4,level));var deltaR1=Math.sqrt(Math.pow(4,level+1));var lt=Math.floor(nodeNumber/deltaR)*4*deltaR+
(nodeNumber%deltaR)*2;var rt=lt+1;var lb=lt+deltaR1;var rb=lb+1;var s=(bvhRefiner._vf.size).multiply(0.25);children.push(new QuadtreeNode3D_32bit(ctx,bvhRefiner,(level+1),lt,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(-s.x,s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2),(rowNr*2),geometry));children.push(new QuadtreeNode3D_32bit(ctx,bvhRefiner,(level+1),rt,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(s.x,s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2+1),(rowNr*2),geometry));children.push(new QuadtreeNode3D_32bit(ctx,bvhRefiner,(level+1),lb,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(-s.x,-s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2),(rowNr*2+1),geometry));children.push(new QuadtreeNode3D_32bit(ctx,bvhRefiner,(level+1),rb,nodeTransformation.mult(x3dom.fields.SFMatrix4f.translation(new x3dom.fields.SFVec3f(s.x,-s.y,0.0))).mult(x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(0.5,0.5,1.0))),(columnNr*2+1),(rowNr*2+1),geometry));}
this.collectDrawables=function(transform,drawableCollection,singlePath,invalidateCache,planeMask){cullObject.localMatrix=nodeTransformation;if(exists&&(planeMask=drawableCollection.cull(transform,cullObject,singlePath,planeMask))>0){var mat_view=drawableCollection.viewMatrix;var vPos=mat_view.multMatrixPnt(transform.multMatrixPnt(position));var distanceToCamera=Math.sqrt(Math.pow(vPos.x,2)+Math.pow(vPos.y,2)+Math.pow(vPos.z,2));if((distanceToCamera<Math.pow((bvhRefiner._vf.maxDepth-level),2)*resizeFac/bvhRefiner._vf.factor)){if(children.length===0&&bvhRefiner.createChildren===0){bvhRefiner.createChildren++;create();shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);}
else if(children.length===0&&bvhRefiner.createChildren>0){shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);}
else{for(var i=0;i<children.length;i++){children[i].collectDrawables(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask);}}}
else{shape.collectDrawableObjects(nodeTransformation,drawableCollection,singlePath,invalidateCache,planeMask,[]);}}};this.getVolume=function(){return shape.getVolume();};initialize();}
\ No newline at end of file
/** X3DOM Runtime, http://www.x3dom.org/ 1.7.0 - f33e92d248a2f25d52fa63ede8ffee570c8a6304 - Wed Jun 17 09:49:25 2015 +0200 */
x3dom.registerNodeType("IndexedQuadSet","CADGeometry",defineClass(x3dom.nodeTypes.X3DComposedGeometryNode,function(ctx){x3dom.nodeTypes.IndexedQuadSet.superClass.call(this,ctx);this.addField_MFInt32(ctx,'index',[]);},{nodeChanged:function()
{var time0=new Date().getTime();this.handleAttribs();var colPerVert=this._vf.colorPerVertex;var normPerVert=this._vf.normalPerVertex;var indexes=this._vf.index;var hasNormal=false,hasTexCoord=false,hasColor=false;var positions,normals,texCoords,colors;var coordNode=this._cf.coord.node;x3dom.debug.assert(coordNode);positions=coordNode._vf.point;var normalNode=this._cf.normal.node;if(normalNode){hasNormal=true;normals=normalNode._vf.vector;}
else{hasNormal=false;}
var texMode="",numTexComponents=2;var texCoordNode=this._cf.texCoord.node;if(x3dom.isa(texCoordNode,x3dom.nodeTypes.MultiTextureCoordinate)){if(texCoordNode._cf.texCoord.nodes.length)
texCoordNode=texCoordNode._cf.texCoord.nodes[0];}
if(texCoordNode){if(texCoordNode._vf.point){hasTexCoord=true;texCoords=texCoordNode._vf.point;if(x3dom.isa(texCoordNode,x3dom.nodeTypes.TextureCoordinate3D)){numTexComponents=3;}}
else if(texCoordNode._vf.mode){texMode=texCoordNode._vf.mode;}}
else{hasTexCoord=false;}
var numColComponents=3;var colorNode=this._cf.color.node;if(colorNode){hasColor=true;colors=colorNode._vf.color;if(x3dom.isa(colorNode,x3dom.nodeTypes.ColorRGBA)){numColComponents=4;}}
else{hasColor=false;}
this._mesh._indices[0]=[];this._mesh._positions[0]=[];this._mesh._normals[0]=[];this._mesh._texCoords[0]=[];this._mesh._colors[0]=[];var i,t,cnt,faceCnt,posMax;var p0,p1,p2,n0,n1,n2,t0,t1,t2,c0,c1,c2;while(positions.length%4>0){positions.push(positions.length-1);}
posMax=positions.length;{faceCnt=0;for(i=0;i<indexes.length;i++)
{if((i>0)&&(i%4===3)){faceCnt++;this._mesh._indices[0].push(indexes[i-3]);this._mesh._indices[0].push(indexes[i-1]);this._mesh._indices[0].push(indexes[i]);}
else{this._mesh._indices[0].push(indexes[i]);}
if(!normPerVert&&hasNormal){this._mesh._normals[0].push(normals[faceCnt].x);this._mesh._normals[0].push(normals[faceCnt].y);this._mesh._normals[0].push(normals[faceCnt].z);}
if(!colPerVert&&hasColor){this._mesh._colors[0].push(colors[faceCnt].r);this._mesh._colors[0].push(colors[faceCnt].g);this._mesh._colors[0].push(colors[faceCnt].b);if(numColComponents===4){this._mesh._colors[0].push(colors[faceCnt].a);}}}
this._mesh._positions[0]=positions.toGL();if(hasNormal){this._mesh._normals[0]=normals.toGL();}
else{this._mesh.calcNormals(normPerVert?Math.PI:0);}
if(hasTexCoord){this._mesh._texCoords[0]=texCoords.toGL();this._mesh._numTexComponents=numTexComponents;}
else{this._mesh.calcTexCoords(texMode);}
if(hasColor&&colPerVert){this._mesh._colors[0]=colors.toGL();this._mesh._numColComponents=numColComponents;}}
this.invalidateVolume();this._mesh._numFaces=0;this._mesh._numCoords=0;for(i=0;i<this._mesh._indices.length;i++){this._mesh._numFaces+=this._mesh._indices[i].length/3;this._mesh._numCoords+=this._mesh._positions[i].length/3;}
var time1=new Date().getTime()-time0;},fieldChanged:function(fieldName)
{var pnts=this._cf.coord.node._vf.point;if(pnts.length>x3dom.Utils.maxIndexableCoords)
{x3dom.debug.logWarning("IndexedQuadSet: fieldChanged with "+"too many coordinates not yet implemented!");return;}
if(fieldName=="coord")
{this._mesh._positions[0]=pnts.toGL();this.invalidateVolume();Array.forEach(this._parentNodes,function(node){node._dirty.positions=true;node.invalidateVolume();});}
else if(fieldName=="color")
{pnts=this._cf.color.node._vf.color;if(this._vf.colorPerVertex){this._mesh._colors[0]=pnts.toGL();}else if(!this._vf.colorPerVertex){var faceCnt=0;var numColComponents=3;if(x3dom.isa(this._cf.color.node,x3dom.nodeTypes.ColorRGBA)){numColComponents=4;}
this._mesh._colors[0]=[];var indexes=this._vf.index;for(i=0;i<indexes.length;++i)
{if((i>0)&&(i%3===0)){faceCnt++;}
this._mesh._colors[0].push(pnts[faceCnt].r);this._mesh._colors[0].push(pnts[faceCnt].g);this._mesh._colors[0].push(pnts[faceCnt].b);if(numColComponents===4){this._mesh._colors[0].push(pnts[faceCnt].a);}}}
Array.forEach(this._parentNodes,function(node){node._dirty.colors=true;});}
else if(fieldName=="normal")
{pnts=this._cf.normal.node._vf.vector;if(this._vf.normalPerVertex){this._mesh._normals[0]=pnts.toGL();}else if(!this._vf.normalPerVertex){var indexes=this._vf.index;this._mesh._normals[0]=[];var faceCnt=0;for(i=0;i<indexes.length;++i)
{if((i>0)&&(i%3===0)){faceCnt++;}
this._mesh._normals[0].push(pnts[faceCnt].x);this._mesh._normals[0].push(pnts[faceCnt].y);this._mesh._normals[0].push(pnts[faceCnt].z);}}
Array.forEach(this._parentNodes,function(node){node._dirty.normals=true;});}
else if(fieldName=="texCoord")
{var texCoordNode=this._cf.texCoord.node;if(x3dom.isa(texCoordNode,x3dom.nodeTypes.MultiTextureCoordinate)){if(texCoordNode._cf.texCoord.nodes.length)
texCoordNode=texCoordNode._cf.texCoord.nodes[0];}
pnts=texCoordNode._vf.point;this._mesh._texCoords[0]=pnts.toGL();Array.forEach(this._parentNodes,function(node){node._dirty.texcoords=true;});}}}));x3dom.registerNodeType("QuadSet","CADGeometry",defineClass(x3dom.nodeTypes.X3DComposedGeometryNode,function(ctx){x3dom.nodeTypes.QuadSet.superClass.call(this,ctx);},{nodeChanged:function()
{var time0=new Date().getTime();this.handleAttribs();var colPerVert=this._vf.colorPerVertex;var normPerVert=this._vf.normalPerVertex;var hasNormal=false,hasTexCoord=false,hasColor=false;var positions,normals,texCoords,colors;var coordNode=this._cf.coord.node;x3dom.debug.assert(coordNode);positions=coordNode._vf.point;var normalNode=this._cf.normal.node;if(normalNode){hasNormal=true;normals=normalNode._vf.vector;}
else{hasNormal=false;}
var texMode="",numTexComponents=2;var texCoordNode=this._cf.texCoord.node;if(x3dom.isa(texCoordNode,x3dom.nodeTypes.MultiTextureCoordinate)){if(texCoordNode._cf.texCoord.nodes.length)
texCoordNode=texCoordNode._cf.texCoord.nodes[0];}
if(texCoordNode){if(texCoordNode._vf.point){hasTexCoord=true;texCoords=texCoordNode._vf.point;if(x3dom.isa(texCoordNode,x3dom.nodeTypes.TextureCoordinate3D)){numTexComponents=3;}}
else if(texCoordNode._vf.mode){texMode=texCoordNode._vf.mode;}}
else{hasTexCoord=false;}
var numColComponents=3;var colorNode=this._cf.color.node;if(colorNode){hasColor=true;colors=colorNode._vf.color;if(x3dom.isa(colorNode,x3dom.nodeTypes.ColorRGBA)){numColComponents=4;}}
else{hasColor=false;}
this._mesh._indices[0]=[];this._mesh._positions[0]=[];this._mesh._normals[0]=[];this._mesh._texCoords[0]=[];this._mesh._colors[0]=[];var i,t,cnt,faceCnt,posMax;var p0,p1,p2,n0,n1,n2,t0,t1,t2,c0,c1,c2;while(positions.length%4>0){positions.push(positions.length-1);}
posMax=positions.length;if(1)
{faceCnt=0;for(i=0;i<positions.length;i++)
{if((i>0)&&(i%4===3)){faceCnt++;this._mesh._indices[0].push(i-3);this._mesh._indices[0].push(i-1);this._mesh._indices[0].push(i);}
else{this._mesh._indices[0].push(i);}
if(!normPerVert&&hasNormal){this._mesh._normals[0].push(normals[faceCnt].x);this._mesh._normals[0].push(normals[faceCnt].y);this._mesh._normals[0].push(normals[faceCnt].z);}
if(!colPerVert&&hasColor){this._mesh._colors[0].push(colors[faceCnt].r);this._mesh._colors[0].push(colors[faceCnt].g);this._mesh._colors[0].push(colors[faceCnt].b);if(numColComponents===4){this._mesh._colors[0].push(colors[faceCnt].a);}}}
this._mesh._positions[0]=positions.toGL();if(hasNormal){this._mesh._normals[0]=normals.toGL();}
else{this._mesh.calcNormals(normPerVert?Math.PI:0);}
if(hasTexCoord){this._mesh._texCoords[0]=texCoords.toGL();this._mesh._numTexComponents=numTexComponents;}
else{this._mesh.calcTexCoords(texMode);}
if(hasColor&&colPerVert){this._mesh._colors[0]=colors.toGL();this._mesh._numColComponents=numColComponents;}}
this.invalidateVolume();this._mesh._numFaces=0;this._mesh._numCoords=0;for(i=0;i<this._mesh._indices.length;i++){this._mesh._numFaces+=this._mesh._indices[i].length/3;this._mesh._numCoords+=this._mesh._positions[i].length/3;}
var time1=new Date().getTime()-time0;},fieldChanged:function(fieldName)
{var pnts=this._cf.coord.node._vf.point;if(pnts.length>x3dom.Utils.maxIndexableCoords)
{x3dom.debug.logWarning("QuadSet: fieldChanged with "+"too many coordinates not yet implemented!");return;}
if(fieldName=="coord")
{this._mesh._positions[0]=pnts.toGL();this.invalidateVolume();Array.forEach(this._parentNodes,function(node){node._dirty.positions=true;node.invalidateVolume();});}
else if(fieldName=="color")
{pnts=this._cf.color.node._vf.color;if(this._vf.colorPerVertex){this._mesh._colors[0]=pnts.toGL();}else if(!this._vf.colorPerVertex){var faceCnt=0;var numColComponents=3;if(x3dom.isa(this._cf.color.node,x3dom.nodeTypes.ColorRGBA)){numColComponents=4;}
this._mesh._colors[0]=[];var indexes=this._vf.index;for(i=0;i<indexes.length;++i)
{if((i>0)&&(i%3===0)){faceCnt++;}
this._mesh._colors[0].push(pnts[faceCnt].r);this._mesh._colors[0].push(pnts[faceCnt].g);this._mesh._colors[0].push(pnts[faceCnt].b);if(numColComponents===4){this._mesh._colors[0].push(pnts[faceCnt].a);}}}
Array.forEach(this._parentNodes,function(node){node._dirty.colors=true;});}
else if(fieldName=="normal")
{pnts=this._cf.normal.node._vf.vector;if(this._vf.normalPerVertex){this._mesh._normals[0]=pnts.toGL();}else if(!this._vf.normalPerVertex){var indexes=this._vf.index;this._mesh._normals[0]=[];var faceCnt=0;for(i=0;i<indexes.length;++i)
{if((i>0)&&(i%3===0)){faceCnt++;}
this._mesh._normals[0].push(pnts[faceCnt].x);this._mesh._normals[0].push(pnts[faceCnt].y);this._mesh._normals[0].push(pnts[faceCnt].z);}}
Array.forEach(this._parentNodes,function(node){node._dirty.normals=true;});}
else if(fieldName=="texCoord")
{var texCoordNode=this._cf.texCoord.node;if(x3dom.isa(texCoordNode,x3dom.nodeTypes.MultiTextureCoordinate)){if(texCoordNode._cf.texCoord.nodes.length)
texCoordNode=texCoordNode._cf.texCoord.nodes[0];}
pnts=texCoordNode._vf.point;this._mesh._texCoords[0]=pnts.toGL();Array.forEach(this._parentNodes,function(node){node._dirty.texcoords=true;});}}}));x3dom.registerNodeType("CADLayer","CADGeometry",defineClass(x3dom.nodeTypes.X3DGroupingNode,function(ctx){x3dom.nodeTypes.CADLayer.superClass.call(this,ctx);this.addField_SFString(ctx,'name',"");}));x3dom.registerNodeType("CADAssembly","CADGeometry",defineClass(x3dom.nodeTypes.X3DGroupingNode,function(ctx){x3dom.nodeTypes.CADAssembly.superClass.call(this,ctx);this.addField_SFString(ctx,'name',"");}));x3dom.registerNodeType("CADPart","CADGeometry",defineClass(x3dom.nodeTypes.Transform,function(ctx){x3dom.nodeTypes.CADPart.superClass.call(this,ctx);this.addField_SFString(ctx,'name',"");}));x3dom.registerNodeType("CADFace","CADGeometry",defineClass(x3dom.nodeTypes.X3DGroupingNode,function(ctx){x3dom.nodeTypes.CADFace.superClass.call(this,ctx);this.addField_SFString(ctx,'name',"");this.addField_SFNode('shape',x3dom.nodeTypes.X3DShapeNode);},{getVolume:function()
{var vol=this._graph.volume;if(!this.volumeValid()&&this._vf.render)
{var child=this._cf.shape.node;var childVol=(child&&child._vf.render===true)?child.getVolume():null;if(childVol&&childVol.isValid())
vol.extendBounds(childVol.min,childVol.max);}
return vol;},collectDrawableObjects:function(transform,drawableCollection,singlePath,invalidateCache,planeMask,clipPlanes)
{if(singlePath&&(this._parentNodes.length>1))
singlePath=false;if(singlePath&&(invalidateCache=invalidateCache||this.cacheInvalid()))
this.invalidateCache();if(!this._cf.shape.node||(planeMask=drawableCollection.cull(transform,this.graphState(),singlePath,planeMask))<=0){return;}
var cnode,childTransform;if(singlePath){if(!this._graph.globalMatrix){this._graph.globalMatrix=this.transformMatrix(transform);}
childTransform=this._graph.globalMatrix;}
else{childTransform=this.transformMatrix(transform);}
if((cnode=this._cf.shape.node)){cnode.collectDrawableObjects(childTransform,drawableCollection,singlePath,invalidateCache,planeMask,clipPlanes);}}}));
\ No newline at end of file
/** X3DOM Runtime, http://www.x3dom.org/ 1.7.0 - f33e92d248a2f25d52fa63ede8ffee570c8a6304 - Wed Jun 17 09:49:25 2015 +0200 */
x3dom.registerNodeType("X3DPlanarGeometryNode","Geometry2D",defineClass(x3dom.nodeTypes.X3DGeometryNode,function(ctx){x3dom.nodeTypes.X3DPlanarGeometryNode.superClass.call(this,ctx);}));x3dom.registerNodeType("Arc2D","Geometry2D",defineClass(x3dom.nodeTypes.X3DPlanarGeometryNode,function(ctx){x3dom.nodeTypes.Arc2D.superClass.call(this,ctx);this.addField_SFFloat(ctx,'radius',1);this.addField_SFFloat(ctx,'startAngle',0);this.addField_SFFloat(ctx,'endAngle',1.570796);this.addField_SFFloat(ctx,'subdivision',32);this._mesh._primType='LINES';var r=this._vf.radius;var start=this._vf.startAngle;var end=this._vf.endAngle;var Pi2=Math.PI*2.0;start-=Math.floor(start/Pi2)*Pi2;end-=Math.floor(end/Pi2)*Pi2;if(end<=start)
end+=Pi2;var geoCacheID='Arc2D_'+r+start+end;if(this._vf.useGeoCache&&x3dom.geoCache[geoCacheID]!==undefined){this._mesh=x3dom.geoCache[geoCacheID];}else{var anzahl=this._vf.subdivision;var t=(end-start)/anzahl;var theta=start;for(var i=0;i<=anzahl+1;i++){var x=Math.cos(theta)*r;var y=Math.sin(theta)*r;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);theta+=t;}
for(var j=0;j<anzahl;j++){this._mesh._indices[0].push(j);this._mesh._indices[0].push(j+1);}
this._mesh._invalidate=true;this._mesh._numFaces=this._mesh._indices[0].length/2;this._mesh._numCoords=this._mesh._positions[0].length/3;x3dom.geoCache[geoCacheID]=this._mesh;}},{fieldChanged:function(fieldName){if(fieldName=="radius"||fieldName=="subdivision"||fieldName=="startAngle"||fieldName=="endAngle"){this._mesh._positions[0]=[];this._mesh._indices[0]=[];var r=this._vf.radius;var start=this._vf.startAngle;var end=this._vf.endAngle;var anzahl=this._vf.subdivision;var Pi2=Math.PI*2.0;start-=Math.floor(start/Pi2)*Pi2;end-=Math.floor(end/Pi2)*Pi2;if(end<=start)
end+=Pi2;var t=(end-start)/anzahl;var theta=start;for(var i=0;i<=anzahl+1;i++){var x=Math.cos(theta)*r;var y=Math.sin(theta)*r;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);theta+=t;}
for(var j=0;j<anzahl;j++){this._mesh._indices[0].push(j);this._mesh._indices[0].push(j+1);}
this.invalidateVolume();this._mesh._numFaces=this._mesh._indices[0].length/2;this._mesh._numCoords=this._mesh._positions[0].length/3;Array.forEach(this._parentNodes,function(node){node._dirty.positions=true;node._dirty.indexes=true;node.invalidateVolume();});}}}));x3dom.registerNodeType("ArcClose2D","Geometry2D",defineClass(x3dom.nodeTypes.X3DPlanarGeometryNode,function(ctx){x3dom.nodeTypes.ArcClose2D.superClass.call(this,ctx);this.addField_SFString(ctx,'closureType',"PIE");this.addField_SFFloat(ctx,'radius',1);this.addField_SFFloat(ctx,'startAngle',0);this.addField_SFFloat(ctx,'endAngle',1.570796);this.addField_SFFloat(ctx,'subdivision',32);var r=this._vf.radius;var start=this._vf.startAngle;var end=this._vf.endAngle;var anzahl=this._vf.subdivision;var Pi2=Math.PI*2.0;start-=Math.floor(start/Pi2)*Pi2;end-=Math.floor(end/Pi2)*Pi2;if(end<=start)
end+=Pi2;var geoCacheID='ArcClose2D_'+r+start+end+this._vf.closureType;if(this._vf.useGeoCache&&x3dom.geoCache[geoCacheID]!==undefined){this._mesh=x3dom.geoCache[geoCacheID];}else{var t=(end-start)/anzahl;var theta=start;if(this._vf.closureType.toUpperCase()=='PIE'){this._mesh._positions[0].push(0.0);this._mesh._positions[0].push(0.0);this._mesh._positions[0].push(0.0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(1);this._mesh._texCoords[0].push(0.5);this._mesh._texCoords[0].push(0.5);for(var i=0;i<=anzahl;i++){var x=Math.cos(theta)*r;var y=Math.sin(theta)*r;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(1);this._mesh._texCoords[0].push((x+r)/(2*r));this._mesh._texCoords[0].push((y+r)/(2*r));theta+=t;}
for(var j=1;j<=anzahl;j++){this._mesh._indices[0].push(j+1);this._mesh._indices[0].push(0);this._mesh._indices[0].push(j);}}else{for(var i=0;i<=anzahl;i++){var x=Math.cos(theta)*r;var y=Math.sin(theta)*r;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(1);this._mesh._texCoords[0].push((x+r)/(2*r));this._mesh._texCoords[0].push((y+r)/(2*r));theta+=t;}
var x=(this._mesh._positions[0][0]+this._mesh._positions[0][this._mesh._positions[0].length-3])/2;var y=(this._mesh._positions[0][1]+this._mesh._positions[0][this._mesh._positions[0].length-2])/2;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(1);this._mesh._texCoords[0].push((x+r)/(2*r));this._mesh._texCoords[0].push((y+r)/(2*r));for(var j=0;j<anzahl;j++){this._mesh._indices[0].push(j+1);this._mesh._indices[0].push(anzahl+1);this._mesh._indices[0].push(j);}}
this._mesh._numTexComponents=2;this._mesh._invalidate=true;this._mesh._numFaces=this._mesh._indices[0].length/2;this._mesh._numCoords=this._mesh._positions[0].length/3;x3dom.geoCache[geoCacheID]=this._mesh;}},{fieldChanged:function(fieldName){var r=this._vf.radius;var start=this._vf.startAngle;var end=this._vf.endAngle;var anzahl=this._vf.subdivision;var Pi2=Math.PI*2.0;start-=Math.floor(start/Pi2)*Pi2;end-=Math.floor(end/Pi2)*Pi2;if(end<=start)
end+=Pi2;var t=(end-start)/anzahl;var theta=start;if(fieldName==="radius"){this._mesh._positions[0]=[];if(this._vf.closureType.toUpperCase()=='PIE'){this._mesh._positions[0].push(0.0);this._mesh._positions[0].push(0.0);this._mesh._positions[0].push(0.0);for(var i=0;i<=anzahl;i++){var x=Math.cos(theta)*r;var y=Math.sin(theta)*r;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);theta+=t;}}else{for(var i=0;i<=anzahl;i++){var x=Math.cos(theta)*r;var y=Math.sin(theta)*r;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);theta+=t;}
var x=(this._mesh._positions[0][0]+this._mesh._positions[0][this._mesh._positions[0].length-3])/2;var y=(this._mesh._positions[0][1]+this._mesh._positions[0][this._mesh._positions[0].length-2])/2;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);}
this.invalidateVolume();this._mesh._numCoords=this._mesh._positions[0].length/3;Array.forEach(this._parentNodes,function(node){node._dirty.positions=true;node.invalidateVolume();});}else if(fieldName=="closureType"||fieldName=="subdivision"||fieldName=="startAngle"||fieldName=="endAngle"){this._mesh._positions[0]=[];this._mesh._indices[0]=[];this._mesh._normals[0]=[];this._mesh._texCoords[0]=[];if(this._vf.closureType.toUpperCase()=='PIE'){this._mesh._positions[0].push(0.0);this._mesh._positions[0].push(0.0);this._mesh._positions[0].push(0.0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(1);this._mesh._texCoords[0].push(0.5);this._mesh._texCoords[0].push(0.5);for(var i=0;i<=anzahl;i++){var x=Math.cos(theta)*r;var y=Math.sin(theta)*r;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(1);this._mesh._texCoords[0].push((x+r)/(2*r));this._mesh._texCoords[0].push((y+r)/(2*r));theta+=t;}
for(var j=1;j<=anzahl;j++){this._mesh._indices[0].push(j+1);this._mesh._indices[0].push(0);this._mesh._indices[0].push(j);}}else{for(var i=0;i<=anzahl;i++){var x=Math.cos(theta)*r;var y=Math.sin(theta)*r;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(1);this._mesh._texCoords[0].push((x+r)/(2*r));this._mesh._texCoords[0].push((y+r)/(2*r));theta+=t;}
var x=(this._mesh._positions[0][0]+this._mesh._positions[0][this._mesh._positions[0].length-3])/2;var y=(this._mesh._positions[0][1]+this._mesh._positions[0][this._mesh._positions[0].length-2])/2;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(1);this._mesh._texCoords[0].push((x+r)/(2*r));this._mesh._texCoords[0].push((y+r)/(2*r));for(var j=0;j<anzahl;j++){this._mesh._indices[0].push(j+1);this._mesh._indices[0].push(anzahl+1);this._mesh._indices[0].push(j);}}
this._mesh._numTexComponents=2;this.invalidateVolume();this._mesh._numFaces=this._mesh._indices[0].length/2;this._mesh._numCoords=this._mesh._positions[0].length/3;Array.forEach(this._parentNodes,function(node){node.setAllDirty();});}}}));x3dom.registerNodeType("Circle2D","Geometry2D",defineClass(x3dom.nodeTypes.X3DPlanarGeometryNode,function(ctx){x3dom.nodeTypes.Circle2D.superClass.call(this,ctx);this.addField_SFFloat(ctx,'radius',1);this.addField_SFFloat(ctx,'subdivision',32);this._mesh._primType='LINES';var r=this._vf.radius;var geoCacheID='Circle2D_'+r;if(this._vf.useGeoCache&&x3dom.geoCache[geoCacheID]!==undefined){this._mesh=x3dom.geoCache[geoCacheID];}else{var anzahl=this._vf.subdivision;for(var i=0;i<=anzahl;i++){var theta=i*((2*Math.PI)/anzahl);var x=Math.cos(theta)*r;var y=Math.sin(theta)*r;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);}
for(i=0;i<anzahl;i++){this._mesh._indices[0].push(i);if((i+1)==anzahl){this._mesh._indices[0].push(0);}else{this._mesh._indices[0].push(i+1);}}
this._mesh._invalidate=true;this._mesh._numFaces=this._mesh._indices[0].length/2;this._mesh._numCoords=this._mesh._positions[0].length/3;x3dom.geoCache[geoCacheID]=this._mesh;}},{fieldChanged:function(fieldName){if(fieldName=="radius"||fieldName=="subdivision"){var r=this._vf.radius;var anzahl=this._vf.subdivision;this._mesh._positions[0]=[];this._mesh._indices[0]=[];for(var i=0;i<=anzahl;i++){var theta=i*((2*Math.PI)/anzahl);var x=Math.cos(theta)*r;var y=Math.sin(theta)*r;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);}
for(i=0;i<anzahl;i++){this._mesh._indices[0].push(i);if((i+1)==anzahl){this._mesh._indices[0].push(0);}else{this._mesh._indices[0].push(i+1);}}
this.invalidateVolume();this._mesh._numFaces=this._mesh._indices[0].length/2;this._mesh._numCoords=this._mesh._positions[0].length/3;Array.forEach(this._parentNodes,function(node){node._dirty.positions=true;node._dirty.indexes=true;node.invalidateVolume();});}}}));x3dom.registerNodeType("Disk2D","Geometry2D",defineClass(x3dom.nodeTypes.X3DPlanarGeometryNode,function(ctx){x3dom.nodeTypes.Disk2D.superClass.call(this,ctx);this.addField_SFFloat(ctx,'innerRadius',0);this.addField_SFFloat(ctx,'outerRadius',1);this.addField_SFFloat(ctx,'subdivision',32);var ir=this._vf.innerRadius;var or=this._vf.outerRadius;var geoCacheID='Disk2D_'+ir+or;if(this._vf.useGeoCache&&x3dom.geoCache[geoCacheID]!==undefined){this._mesh=x3dom.geoCache[geoCacheID];}else{var anzahl=this._vf.subdivision;for(var i=0;i<=anzahl;i++){var theta=i*((2*Math.PI)/anzahl);var ox=Math.cos(theta)*or;var oy=Math.sin(theta)*or;var ix=Math.cos(theta)*ir;var iy=Math.sin(theta)*ir;this._mesh._positions[0].push(ox);this._mesh._positions[0].push(oy);this._mesh._positions[0].push(0.0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(1);this._mesh._texCoords[0].push((ox+or)/(2*or));this._mesh._texCoords[0].push((oy+or)/(2*or));this._mesh._positions[0].push(ix);this._mesh._positions[0].push(iy);this._mesh._positions[0].push(0.0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(1);this._mesh._texCoords[0].push((ix+or)/(2*or));this._mesh._texCoords[0].push((iy+or)/(2*or));}
for(i=0;i<anzahl*2;i=i+2){if(i==(anzahl*2)-2){this._mesh._indices[0].push(i+1);this._mesh._indices[0].push(i);this._mesh._indices[0].push(1);this._mesh._indices[0].push(1);this._mesh._indices[0].push(i);this._mesh._indices[0].push(0);}else{this._mesh._indices[0].push(i+1);this._mesh._indices[0].push(i);this._mesh._indices[0].push(i+3);this._mesh._indices[0].push(i+3);this._mesh._indices[0].push(i);this._mesh._indices[0].push(i+2);}}
this._mesh._numTexComponents=2;this._mesh._invalidate=true;this._mesh._numFaces=this._mesh._indices[0].length/2;this._mesh._numCoords=this._mesh._positions[0].length/3;x3dom.geoCache[geoCacheID]=this._mesh;}},{fieldChanged:function(fieldName){if(fieldName=="innerRadius"||fieldName=="outerRadius"||fieldName=="subdivision"){this._mesh._positions[0]=[];this._mesh._indices[0]=[];this._mesh._normals[0]=[];this._mesh._texCoords[0]=[];var ir=this._vf.innerRadius;var or=this._vf.outerRadius;var anzahl=this._vf.subdivision;for(var i=0;i<=anzahl;i++){var theta=i*((2*Math.PI)/anzahl);var ox=Math.cos(theta)*or;var oy=Math.sin(theta)*or;var ix=Math.cos(theta)*ir;var iy=Math.sin(theta)*ir;this._mesh._positions[0].push(ox);this._mesh._positions[0].push(oy);this._mesh._positions[0].push(0.0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(1);this._mesh._texCoords[0].push((ox+or)/(2*or));this._mesh._texCoords[0].push((oy+or)/(2*or));this._mesh._positions[0].push(ix);this._mesh._positions[0].push(iy);this._mesh._positions[0].push(0.0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(1);this._mesh._texCoords[0].push((ix+or)/(2*or));this._mesh._texCoords[0].push((iy+or)/(2*or));}
for(i=0;i<anzahl*2;i=i+2){if(i==(anzahl*2)-2){this._mesh._indices[0].push(i+1);this._mesh._indices[0].push(i);this._mesh._indices[0].push(1);this._mesh._indices[0].push(1);this._mesh._indices[0].push(i);this._mesh._indices[0].push(0);}else{this._mesh._indices[0].push(i+1);this._mesh._indices[0].push(i);this._mesh._indices[0].push(i+3);this._mesh._indices[0].push(i+3);this._mesh._indices[0].push(i);this._mesh._indices[0].push(i+2);}}
this._mesh._numTexComponents=2;this.invalidateVolume();this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;Array.forEach(this._parentNodes,function(node){node.setAllDirty();});}}}));x3dom.registerNodeType("Polyline2D","Geometry2D",defineClass(x3dom.nodeTypes.X3DPlanarGeometryNode,function(ctx){x3dom.nodeTypes.Polyline2D.superClass.call(this,ctx);this.addField_MFVec2f(ctx,'lineSegments',[]);this._mesh._primType='LINES';var x=0,y=0;if(this._vf.lineSegments.length){x=this._vf.lineSegments[0].x;y=this._vf.lineSegments[0].y;}
var geoCacheID='Polyline2D_'+x+'-'+y;if(this._vf.useGeoCache&&x3dom.geoCache[geoCacheID]!==undefined){this._mesh=x3dom.geoCache[geoCacheID];}
else{for(var i=0;i<this._vf.lineSegments.length;i++){x=this._vf.lineSegments[i].x;y=this._vf.lineSegments[i].y;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);}
for(var j=0;j<this._vf.lineSegments.length-1;j++){this._mesh._indices[0].push(j);this._mesh._indices[0].push(j+1);}
this._mesh._invalidate=true;this._mesh._numFaces=this._mesh._indices[0].length/2;this._mesh._numCoords=this._mesh._positions[0].length/3;x3dom.geoCache[geoCacheID]=this._mesh;}},{fieldChanged:function(fieldName){if(fieldName=="lineSegments"){var x,y;this._mesh._positions[0]=[];this._mesh._indices[0]=[];for(var i=0;i<this._vf.lineSegments.length;i++){x=this._vf.lineSegments[i].x;y=this._vf.lineSegments[i].y;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);}
for(var j=0;j<this._vf.lineSegments.length-1;j++){this._mesh._indices[0].push(j);this._mesh._indices[0].push(j+1);}
this.invalidateVolume();this._mesh._numFaces=this._mesh._indices[0].length/2;this._mesh._numCoords=this._mesh._positions[0].length/3;Array.forEach(this._parentNodes,function(node){node._dirty.positions=true;node._dirty.indexes=true;node.invalidateVolume();});}}}));x3dom.registerNodeType("Polypoint2D","Geometry2D",defineClass(x3dom.nodeTypes.X3DPlanarGeometryNode,function(ctx){x3dom.nodeTypes.Polypoint2D.superClass.call(this,ctx);this.addField_MFVec2f(ctx,'point',[]);this._mesh._primType='POINTS';var x=0,y=0;if(this._vf.point.length){x=this._vf.point[0].x;y=this._vf.point[0].y;}
var geoCacheID='Polypoint2D_'+x+'-'+y;if(this._vf.useGeoCache&&x3dom.geoCache[geoCacheID]!==undefined){this._mesh=x3dom.geoCache[geoCacheID];}
else{for(var i=0;i<this._vf.point.length;i++){x=this._vf.point[i].x;y=this._vf.point[i].y;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);}
this._mesh._invalidate=true;this._mesh._numCoords=this._mesh._positions[0].length/3;x3dom.geoCache[geoCacheID]=this._mesh;}},{fieldChanged:function(fieldName){if(fieldName=="point"){this._mesh._positions[0]=[];this._mesh._indices[0]=[];for(var i=0;i<this._vf.point.length;i++){var x=this._vf.point[i].x;var y=this._vf.point[i].y;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);}
this.invalidateVolume();this._mesh._numCoords=this._mesh._positions[0].length/3;Array.forEach(this._parentNodes,function(node){node._dirty.positions=true;node.invalidateVolume();});}}}));x3dom.registerNodeType("Rectangle2D","Geometry2D",defineClass(x3dom.nodeTypes.X3DPlanarGeometryNode,function(ctx){x3dom.nodeTypes.Rectangle2D.superClass.call(this,ctx);this.addField_SFVec2f(ctx,'size',2,2);this.addField_SFVec2f(ctx,'subdivision',1,1);var sx=this._vf.size.x,sy=this._vf.size.y;var partx=this._vf.subdivision.x,party=this._vf.subdivision.y;var geoCacheID='Rectangle2D_'+sx+'-'+sy;if(this._vf.useGeoCache&&x3dom.geoCache[geoCacheID]!==undefined){this._mesh=x3dom.geoCache[geoCacheID];}
else{var xstep=sx/partx;var ystep=sy/party;sx/=2;sy/=2;for(var i=0;i<=partx;i++){for(var j=0;j<=party;j++){this._mesh._positions[0].push(i*xstep-sx,j*ystep-sy,0);this._mesh._normals[0].push(0,0,1);this._mesh._texCoords[0].push(i/partx,j/party);}}
for(var i=1;i<=party;i++){for(var j=0;j<partx;j++){this._mesh._indices[0].push((i-1)*(partx+1)+j+1);this._mesh._indices[0].push((i-1)*(partx+1)+j);this._mesh._indices[0].push(i*(partx+1)+j);this._mesh._indices[0].push((i-1)*(partx+1)+j+1);this._mesh._indices[0].push(i*(partx+1)+j);this._mesh._indices[0].push(i*(partx+1)+j+1);}}
this._mesh._invalidate=true;this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;x3dom.geoCache[geoCacheID]=this._mesh;}},{fieldChanged:function(fieldName){if(fieldName=="size"){this._mesh._positions[0]=[];var size=this._vf.size;var sx=size.x/2;var sy=size.y/2;var partx=this._vf.subdivision.x,party=this._vf.subdivision.y;var xstep=sx/partx;var ystep=sy/party;sx/=2;sy/=2;for(var i=0;i<=partx;i++){for(var j=0;j<=party;j++){this._mesh._positions[0].push(i*xstep-sx,j*ystep-sy,0);}}
this.invalidateVolume();this._mesh._numCoords=this._mesh._positions[0].length/3;Array.forEach(this._parentNodes,function(node){node.setAllDirty();});}else if(fieldName=="subdivision"){this._mesh._positions[0]=[];this._mesh._indices[0]=[];this._mesh._normals[0]=[];this._mesh._texCoords[0]=[];var sx=this._vf.size.x/2;var sy=this._vf.size.y/2;var partx=this._vf.subdivision.x,party=this._vf.subdivision.y;var xstep=sx/partx;var ystep=sy/party;sx/=2;sy/=2;for(var i=0;i<=partx;i++){for(var j=0;j<=party;j++){this._mesh._positions[0].push(i*xstep-sx,j*ystep-sy,0);this._mesh._normals[0].push(0,0,1);this._mesh._texCoords[0].push(i/partx,j/party);}}
for(var i=1;i<=party;i++){for(var j=0;j<partx;j++){this._mesh._indices[0].push((i-1)*(partx+1)+j+1);this._mesh._indices[0].push((i-1)*(partx+1)+j);this._mesh._indices[0].push(i*(partx+1)+j);this._mesh._indices[0].push((i-1)*(partx+1)+j+1);this._mesh._indices[0].push(i*(partx+1)+j);this._mesh._indices[0].push(i*(partx+1)+j+1);}}
this.invalidateVolume();this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;Array.forEach(this._parentNodes,function(node){node.setAllDirty();});}}}));x3dom.registerNodeType("TriangleSet2D","Geometry2D",defineClass(x3dom.nodeTypes.X3DPlanarGeometryNode,function(ctx){x3dom.nodeTypes.TriangleSet2D.superClass.call(this,ctx);this.addField_MFVec2f(ctx,'vertices',[]);var x=0,y=0;if(this._vf.vertices.length){x=this._vf.vertices[0].x;y=this._vf.vertices[0].y;}
var geoCacheID='TriangleSet2D_'+x+'-'+y;if(this._vf.useGeoCache&&x3dom.geoCache[geoCacheID]!==undefined){this._mesh=x3dom.geoCache[geoCacheID];}
else{var minx=0,miny=0,maxx=0,maxy=0;if(this._vf.vertices.length){minx=this._vf.vertices[0].x;miny=this._vf.vertices[0].y;maxx=this._vf.vertices[0].x;maxy=this._vf.vertices[0].y;}
for(var i=0;i<this._vf.vertices.length;i++){if(this._vf.vertices[i].x<minx){minx=this._vf.vertices[i].x}
if(this._vf.vertices[i].y<miny){miny=this._vf.vertices[i].y}
if(this._vf.vertices[i].x>maxx){maxx=this._vf.vertices[i].x}
if(this._vf.vertices[i].y>maxy){maxy=this._vf.vertices[i].y}}
for(var i=0;i<this._vf.vertices.length;i++){x=this._vf.vertices[i].x;y=this._vf.vertices[i].y;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(1);this._mesh._texCoords[0].push((x-minx)/(maxx-minx));this._mesh._texCoords[0].push((y-miny)/(maxy-miny));}
for(var j=0;j<this._vf.vertices.length;j+=3){this._mesh._indices[0].push(j);this._mesh._indices[0].push(j+2);this._mesh._indices[0].push(j+1);}
this._mesh._numTexComponents=2;this._mesh._invalidate=true;this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;x3dom.geoCache[geoCacheID]=this._mesh;}},{fieldChanged:function(fieldName){if(fieldName=="vertices"){this._mesh._positions[0]=[];this._mesh._indices[0]=[];this._mesh._normals[0]=[];this._mesh._texCoords[0]=[];var minx=this._vf.vertices[0].x;var miny=this._vf.vertices[0].y;var maxx=this._vf.vertices[0].x;var maxy=this._vf.vertices[0].y;for(var i=0;i<this._vf.vertices.length;i++){if(this._vf.vertices[i].x<minx){minx=this._vf.vertices[i].x}
if(this._vf.vertices[i].y<miny){miny=this._vf.vertices[i].y}
if(this._vf.vertices[i].x>maxx){maxx=this._vf.vertices[i].x}
if(this._vf.vertices[i].y>maxy){maxy=this._vf.vertices[i].y}}
for(var i=0;i<this._vf.vertices.length;i++){var x=this._vf.vertices[i].x;var y=this._vf.vertices[i].y;this._mesh._positions[0].push(x);this._mesh._positions[0].push(y);this._mesh._positions[0].push(0.0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(0);this._mesh._normals[0].push(1);this._mesh._texCoords[0].push((x-minx)/(maxx-minx));this._mesh._texCoords[0].push((y-miny)/(maxy-miny));}
for(var j=0;j<this._vf.vertices.length;j+=3){this._mesh._indices[0].push(j);this._mesh._indices[0].push(j+2);this._mesh._indices[0].push(j+1);}
this._mesh._numTexComponents=2;this.invalidateVolume();this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;Array.forEach(this._parentNodes,function(node){node.setAllDirty();});}}}));
\ No newline at end of file
/** X3DOM Runtime, http://www.x3dom.org/ 1.7.0 - f33e92d248a2f25d52fa63ede8ffee570c8a6304 - Wed Jun 17 09:49:25 2015 +0200 */
x3dom.registerNodeType("Snout","Geometry3DExt",defineClass(x3dom.nodeTypes.X3DSpatialGeometryNode,function(ctx){x3dom.nodeTypes.Snout.superClass.call(this,ctx);this.addField_SFFloat(ctx,'dbottom',1.0);this.addField_SFFloat(ctx,'dtop',0.5);this.addField_SFFloat(ctx,'height',1.0);this.addField_SFFloat(ctx,'xoff',0.25);this.addField_SFFloat(ctx,'yoff',0.25);this.addField_SFBool(ctx,'bottom',true);this.addField_SFBool(ctx,'top',true);this.addField_SFFloat(ctx,'subdivision',32);this.rebuildGeometry();},{rebuildGeometry:function()
{this._mesh._positions[0]=[];this._mesh._normals[0]=[];this._mesh._texCoords[0]=[];this._mesh._indices[0]=[];var bottomRadius=this._vf.dbottom/2,height=this._vf.height;var topRadius=this._vf.dtop/2,sides=this._vf.subdivision;var beta,x,z;var delta=2.0*Math.PI/sides;var incl=(bottomRadius-topRadius)/height;var nlen=1.0/Math.sqrt(1.0+incl*incl);var j=0,k=0;var h,base;if(height>0){var px=0,pz=0;for(j=0,k=0;j<=sides;j++){beta=j*delta;x=Math.sin(beta);z=-Math.cos(beta);px=x*topRadius+this._vf.xoff;pz=z*topRadius+this._vf.yoff;this._mesh._positions[0].push(px,height/2,pz);this._mesh._normals[0].push(x/nlen,incl/nlen,z/nlen);this._mesh._texCoords[0].push(1.0-j/sides,1);this._mesh._positions[0].push(x*bottomRadius,-height/2,z*bottomRadius);this._mesh._normals[0].push(x/nlen,incl/nlen,z/nlen);this._mesh._texCoords[0].push(1.0-j/sides,0);if(j>0){this._mesh._indices[0].push(k);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+3);k+=2;}}}
if(bottomRadius>0&&this._vf.bottom){base=this._mesh._positions[0].length/3;for(j=sides-1;j>=0;j--){beta=j*delta;x=bottomRadius*Math.sin(beta);z=-bottomRadius*Math.cos(beta);this._mesh._positions[0].push(x,-height/2,z);this._mesh._normals[0].push(0,-1,0);this._mesh._texCoords[0].push(x/bottomRadius/2+0.5,z/bottomRadius/2+0.5);}
h=base+1;for(j=2;j<sides;j++){this._mesh._indices[0].push(h);this._mesh._indices[0].push(base);h=base+j;this._mesh._indices[0].push(h);}}
if(topRadius>x3dom.fields.Eps&&this._vf.top){base=this._mesh._positions[0].length/3;for(j=sides-1;j>=0;j--){beta=j*delta;x=topRadius*Math.sin(beta);z=-topRadius*Math.cos(beta);this._mesh._positions[0].push(x+this._vf.xoff,height/2,z+this._vf.yoff);this._mesh._normals[0].push(0,1,0);this._mesh._texCoords[0].push(x/topRadius/2+0.5,1.0-z/topRadius/2+0.5);}
h=base+1;for(j=2;j<sides;j++){this._mesh._indices[0].push(base);this._mesh._indices[0].push(h);h=base+j;this._mesh._indices[0].push(h);}}
this.invalidateVolume();this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;},fieldChanged:function(fieldName)
{if(fieldName=="dtop"||fieldName=="dbottom"||fieldName=="height"||fieldName=="subdivision"||fieldName=="xoff"||fieldName=="yoff"||fieldName=="bottom"||fieldName=="top")
{this.rebuildGeometry();Array.forEach(this._parentNodes,function(node){node.setAllDirty();node.invalidateVolume();});}}}));x3dom.registerNodeType("Dish","Geometry3DExt",defineClass(x3dom.nodeTypes.X3DSpatialGeometryNode,function(ctx){x3dom.nodeTypes.Dish.superClass.call(this,ctx);this.addField_SFFloat(ctx,'diameter',2);this.addField_SFFloat(ctx,'height',1);this.addField_SFFloat(ctx,'radius',this._vf.diameter/2);this.addField_SFBool(ctx,'bottom',true);this.addField_SFVec2f(ctx,'subdivision',24,24);this.rebuildGeometry();},{rebuildGeometry:function()
{this._mesh._positions[0]=[];this._mesh._normals[0]=[];this._mesh._texCoords[0]=[];this._mesh._indices[0]=[];var twoPi=Math.PI*2,halfPi=Math.PI/2;var halfDia=this._vf.diameter/2;var r=this._vf.radius;r=(r==0||Math.abs(halfDia-r)<=x3dom.fields.Eps)?halfDia:r;var h=Math.min(this._vf.height,r);var offset=r-h;var a=halfDia;var b=r;var c=halfDia;var latitudeBands=this._vf.subdivision.x,longitudeBands=this._vf.subdivision.y;var latNumber,longNumber;var segTheta=halfPi-Math.asin(1-h/r);var segL=Math.ceil(latitudeBands/halfPi*segTheta);var theta,sinTheta,cosTheta;var phi,sinPhi,cosPhi;var x,y,z,u,v;var tmpPosArr=[],tmpTcArr=[];for(latNumber=0;latNumber<=latitudeBands;latNumber++){if(segL==latNumber){theta=segTheta;}
else{theta=(latNumber*halfPi)/latitudeBands;}
sinTheta=Math.sin(theta);cosTheta=Math.cos(theta);for(longNumber=0;longNumber<=longitudeBands;longNumber++){phi=(longNumber*twoPi)/longitudeBands;sinPhi=Math.sin(phi);cosPhi=Math.cos(phi);x=a*(-cosPhi*sinTheta);y=b*cosTheta;z=c*(-sinPhi*sinTheta);u=0.25-(longNumber/longitudeBands);v=latNumber/latitudeBands;this._mesh._positions[0].push(x,y-offset,z);this._mesh._texCoords[0].push(u,v);this._mesh._normals[0].push(x/(a*a),y/(b*b),z/(c*c));if((latNumber==latitudeBands)||(segL==latNumber)){tmpPosArr.push(x,y-offset,z);tmpTcArr.push(u,v);}}
if(segL==latNumber)
break;}
for(latNumber=0;latNumber<latitudeBands;latNumber++){if(segL==latNumber)
break;for(longNumber=0;longNumber<longitudeBands;longNumber++){var first=(latNumber*(longitudeBands+1))+longNumber;var second=first+longitudeBands+1;this._mesh._indices[0].push(first+1);this._mesh._indices[0].push(second);this._mesh._indices[0].push(first);this._mesh._indices[0].push(first+1);this._mesh._indices[0].push(second+1);this._mesh._indices[0].push(second);}}
if(this._vf.bottom)
{var origPos=this._mesh._positions[0].length/3;var t=origPos+1;for(var i=0,m=tmpPosArr.length/3;i<m;i++){var j=3*i;this._mesh._positions[0].push(tmpPosArr[j]);this._mesh._positions[0].push(tmpPosArr[j+1]);this._mesh._positions[0].push(tmpPosArr[j+2]);j=2*i;this._mesh._texCoords[0].push(tmpTcArr[j]);this._mesh._texCoords[0].push(tmpTcArr[j+1]);this._mesh._normals[0].push(0,-1,0);if(i>=2){this._mesh._indices[0].push(origPos);this._mesh._indices[0].push(t);t=origPos+i;this._mesh._indices[0].push(t);}}}
this.invalidateVolume();this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;},fieldChanged:function(fieldName)
{if(fieldName=="radius"||fieldName=="height"||fieldName=="diameter"||fieldName=="subdivision"||fieldName=="bottom")
{this.rebuildGeometry();Array.forEach(this._parentNodes,function(node){node.setAllDirty();node.invalidateVolume();});}}}));x3dom.registerNodeType("Pyramid","Geometry3DExt",defineClass(x3dom.nodeTypes.X3DSpatialGeometryNode,function(ctx){x3dom.nodeTypes.Pyramid.superClass.call(this,ctx);this.addField_SFFloat(ctx,'xbottom',1);this.addField_SFFloat(ctx,'ybottom',1);this.addField_SFFloat(ctx,'xtop',0.5);this.addField_SFFloat(ctx,'ytop',0.5);this.addField_SFFloat(ctx,'height',1);this.addField_SFFloat(ctx,'xoff',0.25);this.addField_SFFloat(ctx,'yoff',0.25);var xTop=this._vf.xtop/2;var yTop=this._vf.ytop/2;var xBot=this._vf.xbottom/2;var yBot=this._vf.ybottom/2;var xOff=this._vf.xoff;var yOff=this._vf.yoff;var sy=this._vf.height/2;this._mesh._positions[0]=[-xBot,-sy,-yBot,-xTop+xOff,sy,-yTop+yOff,xTop+xOff,sy,-yTop+yOff,xBot,-sy,-yBot,-xBot,-sy,yBot,-xTop+xOff,sy,yTop+yOff,xTop+xOff,sy,yTop+yOff,xBot,-sy,yBot,-xBot,-sy,-yBot,-xBot,-sy,yBot,-xTop+xOff,sy,yTop+yOff,-xTop+xOff,sy,-yTop+yOff,xBot,-sy,-yBot,xBot,-sy,yBot,xTop+xOff,sy,yTop+yOff,xTop+xOff,sy,-yTop+yOff,-xTop+xOff,sy,-yTop+yOff,-xTop+xOff,sy,yTop+yOff,xTop+xOff,sy,yTop+yOff,xTop+xOff,sy,-yTop+yOff,-xBot,-sy,-yBot,-xBot,-sy,yBot,xBot,-sy,yBot,xBot,-sy,-yBot];this._mesh._texCoords[0]=[1,0,1,1,0,1,0,0,0,0,0,1,1,1,1,0,0,0,1,0,1,1,0,1,1,0,0,0,0,1,1,1,0,1,0,0,1,0,1,1,0,0,0,1,1,1,1,0];this._mesh._indices[0]=[0,1,2,2,3,0,6,5,4,4,7,6,8,9,10,10,11,8,12,15,14,14,13,12,16,17,18,18,19,16,20,23,22,22,21,20];this._mesh.calcNormals(Math.PI,this._vf.ccw);this._mesh._invalidate=true;this._mesh._numFaces=12;this._mesh._numCoords=24;},{fieldChanged:function(fieldName)
{if(fieldName=="xbottom"||fieldName=="ybottom"||fieldName=="xtop"||fieldName=="ytop"||fieldName=="xoff"||fieldName=="yoff"||fieldName=="height")
{var xTop=this._vf.xtop/2;var yTop=this._vf.ytop/2;var xBot=this._vf.xbottom/2;var yBot=this._vf.ybottom/2;var xOff=this._vf.xoff;var yOff=this._vf.yoff;var sy=this._vf.height/2;this._mesh._positions[0]=[-xBot,-sy,-yBot,-xTop+xOff,sy,-yTop+yOff,xTop+xOff,sy,-yTop+yOff,xBot,-sy,-yBot,-xBot,-sy,yBot,-xTop+xOff,sy,yTop+yOff,xTop+xOff,sy,yTop+yOff,xBot,-sy,yBot,-xBot,-sy,-yBot,-xBot,-sy,yBot,-xTop+xOff,sy,yTop+yOff,-xTop+xOff,sy,-yTop+yOff,xBot,-sy,-yBot,xBot,-sy,yBot,xTop+xOff,sy,yTop+yOff,xTop+xOff,sy,-yTop+yOff,-xTop+xOff,sy,-yTop+yOff,-xTop+xOff,sy,yTop+yOff,xTop+xOff,sy,yTop+yOff,xTop+xOff,sy,-yTop+yOff,-xBot,-sy,-yBot,-xBot,-sy,yBot,xBot,-sy,yBot,xBot,-sy,-yBot];this._mesh._normals[0]=[];this._mesh.calcNormals(Math.PI,this._vf.ccw);this.invalidateVolume();Array.forEach(this._parentNodes,function(node){node.setAllDirty();node.invalidateVolume();});}}}));x3dom.registerNodeType("RectangularTorus","Geometry3DExt",defineClass(x3dom.nodeTypes.X3DSpatialGeometryNode,function(ctx){x3dom.nodeTypes.RectangularTorus.superClass.call(this,ctx);this.addField_SFFloat(ctx,'innerRadius',0.5);this.addField_SFFloat(ctx,'outerRadius',1);this.addField_SFFloat(ctx,'height',1);this.addField_SFFloat(ctx,'angle',2*Math.PI);this.addField_SFBool(ctx,'caps',true);this.addField_SFFloat(ctx,'subdivision',32);this._origCCW=this._vf.ccw;this.rebuildGeometry();},{rebuildGeometry:function()
{this._mesh._positions[0]=[];this._mesh._normals[0]=[];this._mesh._texCoords[0]=[];this._mesh._indices[0]=[];var twoPi=2.0*Math.PI;this._vf.ccw=!this._origCCW;if(this._vf.angle<0)
this._vf.angle=0;else if(this._vf.angle>twoPi)
this._vf.angle=twoPi;if(this._vf.innerRadius>this._vf.outerRadius)
{var tmp=this._vf.innerRadius;this._vf.innerRadius=this._vf.outerRadius;this._vf.outerRadius=tmp;}
var innerRadius=this._vf.innerRadius;var outerRadius=this._vf.outerRadius;var height=this._vf.height/2;var angle=this._vf.angle;var sides=this._vf.subdivision;var beta,x,z,k,j,nx,nz;var delta=angle/sides;for(j=0,k=0;j<=sides;j++)
{beta=j*delta;nx=Math.cos(beta);nz=-Math.sin(beta);x=outerRadius*nx;z=outerRadius*nz;this._mesh._positions[0].push(x,-height,z);this._mesh._normals[0].push(nx,0,nz);this._mesh._positions[0].push(x,height,z);this._mesh._normals[0].push(nx,0,nz);if(j>0)
{this._mesh._indices[0].push(k);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+3);k+=2;}}
for(j=0,k=k+2;j<=sides;j++)
{beta=j*delta;nx=Math.cos(beta);nz=-Math.sin(beta);x=innerRadius*nx;z=innerRadius*nz;this._mesh._positions[0].push(x,-height,z);this._mesh._normals[0].push(-nx,0,-nz);this._mesh._positions[0].push(x,height,z);this._mesh._normals[0].push(-nx,0,-nz);if(j>0)
{this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k);this._mesh._indices[0].push(k+3);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+2);k+=2;}}
for(j=0,k=k+2;j<=sides;j++)
{beta=j*delta;nx=Math.cos(beta);nz=-Math.sin(beta);x=outerRadius*nx;z=outerRadius*nz;this._mesh._positions[0].push(x,height,z);this._mesh._normals[0].push(0,1,0);x=innerRadius*nx;z=innerRadius*nz;this._mesh._positions[0].push(x,height,z);this._mesh._normals[0].push(0,1,0);if(j>0)
{this._mesh._indices[0].push(k);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+3);k+=2;}}
for(j=0,k=k+2;j<=sides;j++)
{beta=j*delta;nx=Math.cos(beta);nz=-Math.sin(beta);x=outerRadius*nx;z=outerRadius*nz;this._mesh._positions[0].push(x,-height,z);this._mesh._normals[0].push(0,-1,0);x=innerRadius*nx;z=innerRadius*nz;this._mesh._positions[0].push(x,-height,z);this._mesh._normals[0].push(0,-1,0);if(j>0)
{this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k);this._mesh._indices[0].push(k+3);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+2);k+=2;}}
if(angle<twoPi&&this._vf.caps==true)
{k+=2;x=outerRadius;z=0;this._mesh._positions[0].push(x,height,z);this._mesh._normals[0].push(0,0,1);this._mesh._positions[0].push(x,-height,z);this._mesh._normals[0].push(0,0,1);x=innerRadius;z=0;this._mesh._positions[0].push(x,height,z);this._mesh._normals[0].push(0,0,1);this._mesh._positions[0].push(x,-height,z);this._mesh._normals[0].push(0,0,1);this._mesh._indices[0].push(k);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+3);k+=4;nx=Math.cos(angle);nz=-Math.sin(angle);x=outerRadius*nx;z=outerRadius*nz;this._mesh._positions[0].push(x,height,z);this._mesh._normals[0].push(nz,0,-nx);this._mesh._positions[0].push(x,-height,z);this._mesh._normals[0].push(nz,0,-nx);x=innerRadius*nx;z=innerRadius*nz;this._mesh._positions[0].push(x,height,z);this._mesh._normals[0].push(nz,0,-nx);this._mesh._positions[0].push(x,-height,z);this._mesh._normals[0].push(nz,0,-nx);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k);this._mesh._indices[0].push(k+3);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+2);}
this.invalidateVolume();this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;},fieldChanged:function(fieldName)
{if(fieldName=="innerRadius"||fieldName=="outerRadius"||fieldName=="height"||fieldName=="angle"||fieldName=="subdivision"||fieldName=="caps")
{this.rebuildGeometry();Array.forEach(this._parentNodes,function(node){node.setAllDirty();node.invalidateVolume();});}}}));x3dom.registerNodeType("SlopedCylinder","Geometry3DExt",defineClass(x3dom.nodeTypes.X3DSpatialGeometryNode,function(ctx){x3dom.nodeTypes.SlopedCylinder.superClass.call(this,ctx);this.addField_SFFloat(ctx,'radius',1.0);this.addField_SFFloat(ctx,'height',2.0);this.addField_SFBool(ctx,'bottom',true);this.addField_SFBool(ctx,'top',true);this.addField_SFFloat(ctx,'xtshear',0.26179);this.addField_SFFloat(ctx,'ytshear',0.0);this.addField_SFFloat(ctx,'xbshear',0.26179);this.addField_SFFloat(ctx,'ybshear',0.0);this.addField_SFFloat(ctx,'subdivision',32);this.rebuildGeometry();},{rebuildGeometry:function()
{this._mesh._positions[0]=[];this._mesh._normals[0]=[];this._mesh._texCoords[0]=[];this._mesh._indices[0]=[];var topSlopeX=this._vf.xtshear;var topSlopeY=this._vf.ytshear;var botSlopeX=this._vf.xbshear;var botSlopeY=this._vf.ybshear;var sides=this._vf.subdivision;var radius=this._vf.radius;var height=this._vf.height/2;var delta=2.0*Math.PI/sides;var beta,x,y,z;var j,k;for(j=0,k=0;j<=sides;j++)
{beta=j*delta;x=Math.sin(beta);z=-Math.cos(beta);this._mesh._positions[0].push(x*radius,-height+x*botSlopeX+z*botSlopeY,z*radius);this._mesh._texCoords[0].push(1.0-j/sides,0);this._mesh._positions[0].push(x*radius,height+x*topSlopeX+z*topSlopeY,z*radius);this._mesh._texCoords[0].push(1.0-j/sides,1);if(j>0)
{this._mesh._indices[0].push(k);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+3);k+=2;}}
var h,base;if(this._vf.top&&radius>0)
{base=this._mesh._positions[0].length/3;for(j=sides-1;j>=0;j--)
{k=6*j;x=this._mesh._positions[0][k+3];y=this._mesh._positions[0][k+4];z=this._mesh._positions[0][k+5];this._mesh._positions[0].push(x,y,z);this._mesh._texCoords[0].push(x/2+0.5,-z/2+0.5);}
h=base+1;for(j=2;j<sides;j++)
{this._mesh._indices[0].push(base);this._mesh._indices[0].push(h);h=base+j;this._mesh._indices[0].push(h);}}
if(this._vf.bottom&&radius>0)
{base=this._mesh._positions[0].length/3;for(j=sides-1;j>=0;j--)
{k=6*j;x=this._mesh._positions[0][k];y=this._mesh._positions[0][k+1];z=this._mesh._positions[0][k+2];this._mesh._positions[0].push(x,y,z);this._mesh._texCoords[0].push(x/2+0.5,z/2+0.5);}
h=base+1;for(j=2;j<sides;j++)
{this._mesh._indices[0].push(h);this._mesh._indices[0].push(base);h=base+j;this._mesh._indices[0].push(h);}}
this._mesh.calcNormals(Math.PI,this._vf.ccw);var n0b=new x3dom.fields.SFVec3f(this._mesh._normals[0][0],this._mesh._normals[0][1],this._mesh._normals[0][2]);var n0t=new x3dom.fields.SFVec3f(this._mesh._normals[0][3],this._mesh._normals[0][4],this._mesh._normals[0][5]);k=6*sides;var n1b=new x3dom.fields.SFVec3f(this._mesh._normals[0][k],this._mesh._normals[0][k+1],this._mesh._normals[0][k+2]);var n1t=new x3dom.fields.SFVec3f(this._mesh._normals[0][k+3],this._mesh._normals[0][k+4],this._mesh._normals[0][k+5]);var nb=n0b.add(n1b).normalize();var nt=n0t.add(n1t).normalize();this._mesh._normals[0][0]=nb.x;this._mesh._normals[0][1]=nb.y;this._mesh._normals[0][2]=nb.z;this._mesh._normals[0][3]=nt.x;this._mesh._normals[0][4]=nt.y;this._mesh._normals[0][5]=nt.z;this._mesh._normals[0][k]=nb.x;this._mesh._normals[0][k+1]=nb.y;this._mesh._normals[0][k+2]=nb.z;this._mesh._normals[0][k+3]=nt.x;this._mesh._normals[0][k+4]=nt.y;this._mesh._normals[0][k+5]=nt.z;this.invalidateVolume();this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;},fieldChanged:function(fieldName)
{if(fieldName=="xtshear"||fieldName=="ytshear"||fieldName=="xbshear"||fieldName=="ybshear"||fieldName=="radius"||fieldName=="height"||fieldName=="bottom"||fieldName=="top"||fieldName=="subdivision")
{this.rebuildGeometry();Array.forEach(this._parentNodes,function(node){node.setAllDirty();node.invalidateVolume();});}}}));x3dom.registerNodeType("Nozzle","Geometry3DExt",defineClass(x3dom.nodeTypes.X3DSpatialGeometryNode,function(ctx){x3dom.nodeTypes.Nozzle.superClass.call(this,ctx);this.addField_SFFloat(ctx,'nozzleHeight',0.1);this.addField_SFFloat(ctx,'nozzleRadius',0.6);this.addField_SFFloat(ctx,'height',1.0);this.addField_SFFloat(ctx,'outerRadius',0.5);this.addField_SFFloat(ctx,'innerRadius',0.4);this.addField_SFFloat(ctx,'subdivision',32);this.rebuildGeometry();},{rebuildGeometry:function()
{this._mesh._positions[0]=[];this._mesh._normals[0]=[];this._mesh._texCoords[0]=[];this._mesh._indices[0]=[];var twoPi=2.0*Math.PI;var sides=this._vf.subdivision;var height=this._vf.height;var center=height/2;if(this._vf.innerRadius>this._vf.outerRadius)
{var tmp=this._vf.innerRadius;this._vf.innerRadius=this._vf.outerRadius;this._vf.outerRadius=tmp;}
var innerRadius=this._vf.innerRadius;var outerRadius=this._vf.outerRadius;if(this._vf.nozzleRadius<outerRadius)
{this._vf.nozzleRadius=outerRadius;}
var nozzleRadius=this._vf.nozzleRadius;if(this._vf.nozzleHeight>height)
{this._vf.nozzleHeight=height;}
var nozzleHeight=this._vf.nozzleHeight;var beta,delta,x,z,k,j,nx,nz;delta=twoPi/sides;for(j=0,k=0;j<=sides;j++)
{beta=j*delta;nx=Math.sin(beta);nz=-Math.cos(beta);x=outerRadius*nx;z=outerRadius*nz;this._mesh._positions[0].push(x,-center,z);this._mesh._normals[0].push(nx,0,nz);this._mesh._positions[0].push(x,(height-nozzleHeight)-center,z);this._mesh._normals[0].push(nx,0,nz);if(j>0)
{this._mesh._indices[0].push(k);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+3);k+=2;}}
for(j=0,k=k+2;j<=sides;j++)
{beta=j*delta;nx=Math.sin(beta);nz=-Math.cos(beta);x=innerRadius*nx;z=innerRadius*nz;this._mesh._positions[0].push(x,-center,z);this._mesh._normals[0].push(-nx,0,-nz);this._mesh._positions[0].push(x,(height-nozzleHeight)-center,z);this._mesh._normals[0].push(-nx,0,-nz);if(j>0)
{this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k);this._mesh._indices[0].push(k+3);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+2);k+=2;}}
for(j=0,k=k+2;j<=sides;j++)
{beta=j*delta;nx=Math.sin(beta);nz=-Math.cos(beta);x=outerRadius*nx;z=outerRadius*nz;this._mesh._positions[0].push(x,-center,z);this._mesh._normals[0].push(0,-1,0);x=innerRadius*nx;z=innerRadius*nz;this._mesh._positions[0].push(x,-center,z);this._mesh._normals[0].push(0,-1,0);if(j>0)
{this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k);this._mesh._indices[0].push(k+3);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+2);k+=2;}}
for(j=0,k=k+2;j<=sides;j++)
{beta=j*delta;nx=Math.sin(beta);nz=-Math.cos(beta);x=nozzleRadius*nx;z=nozzleRadius*nz;this._mesh._positions[0].push(x,(height-nozzleHeight)-center,z);this._mesh._normals[0].push(nx,0,nz);this._mesh._positions[0].push(x,center,z);this._mesh._normals[0].push(nx,0,nz);if(j>0)
{this._mesh._indices[0].push(k);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+3);k+=2;}}
for(j=0,k=k+2;j<=sides;j++)
{beta=j*delta;nx=Math.sin(beta);nz=-Math.cos(beta);x=innerRadius*nx;z=innerRadius*nz;this._mesh._positions[0].push(x,(height-nozzleHeight)-center,z);this._mesh._normals[0].push(-nx,0,-nz);this._mesh._positions[0].push(x,center,z);this._mesh._normals[0].push(-nx,0,-nz);if(j>0)
{this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k);this._mesh._indices[0].push(k+3);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+2);k+=2;}}
for(j=0,k=k+2;j<=sides;j++)
{beta=j*delta;nx=Math.sin(beta);nz=-Math.cos(beta);x=nozzleRadius*nx;z=nozzleRadius*nz;this._mesh._positions[0].push(x,(height-nozzleHeight)-center,z);this._mesh._normals[0].push(0,-1,0);x=outerRadius*nx;z=outerRadius*nz;this._mesh._positions[0].push(x,(height-nozzleHeight)-center,z);this._mesh._normals[0].push(0,-1,0);if(j>0)
{this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k);this._mesh._indices[0].push(k+3);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+2);k+=2;}}
for(j=0,k=k+2;j<=sides;j++)
{beta=j*delta;nx=Math.sin(beta);nz=-Math.cos(beta);x=nozzleRadius*nx;z=nozzleRadius*nz;this._mesh._positions[0].push(x,center,z);this._mesh._normals[0].push(0,1,0);x=innerRadius*nx;z=innerRadius*nz;this._mesh._positions[0].push(x,center,z);this._mesh._normals[0].push(0,1,0);if(j>0)
{this._mesh._indices[0].push(k);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+2);this._mesh._indices[0].push(k+1);this._mesh._indices[0].push(k+3);k+=2;}}
this.invalidateVolume();this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;},fieldChanged:function(fieldName)
{if(fieldName=="nozzleHeight"||fieldName=="nozzleRadius"||fieldName=="height"||fieldName=="outerRadius"||fieldName=="innerRadius"||fieldName=="subdivision")
{this.rebuildGeometry();Array.forEach(this._parentNodes,function(node){node.setAllDirty();node.invalidateVolume();});}}}));x3dom.registerNodeType("SolidOfRevolution","Geometry3DExt",defineClass(x3dom.nodeTypes.X3DGeometryNode,function(ctx){x3dom.nodeTypes.SolidOfRevolution.superClass.call(this,ctx);this.addField_SFFloat(ctx,'creaseAngle',0);this.addField_MFVec2f(ctx,'crossSection',[]);this.addField_SFFloat(ctx,'angle',2*Math.PI);this.addField_SFBool(ctx,'caps',true);this.addField_SFFloat(ctx,'subdivision',32);this._origCCW=this._vf.ccw;this.rebuildGeometry();},{rebuildGeometry:function()
{this._mesh._positions[0]=[];this._mesh._normals[0]=[];this._mesh._texCoords[0]=[];this._mesh._indices[0]=[];var twoPi=2.0*Math.PI;if(this._vf.angle<-twoPi)
this._vf.angle=-twoPi;else if(this._vf.angle>twoPi)
this._vf.angle=twoPi;var crossSection=this._vf.crossSection,angle=this._vf.angle,steps=this._vf.subdivision;var i,j,k,l,m,n=crossSection.length;if(n<1){x3dom.debug.logWarning("SolidOfRevolution requires crossSection curve.");return;}
var loop=(n>2)?crossSection[0].equals(crossSection[n-1],x3dom.fields.Eps):false;var fullRevolution=(twoPi-Math.abs(angle)<=x3dom.fields.Eps);var alpha,delta=angle/steps;var positions=[],baseCurve=[];this._vf.ccw=(angle<0)?this._origCCW:!this._origCCW;if(!loop)
{if(Math.abs(crossSection[n-1].y)>x3dom.fields.Eps){crossSection.push(new x3dom.fields.SFVec2f(crossSection[n-1].x,0));}
if(Math.abs(crossSection[0].y)>x3dom.fields.Eps){crossSection.unshift(new x3dom.fields.SFVec2f(crossSection[0].x,0));}
n=crossSection.length;}
var pos=null,lastPos=null,penultimatePos=null;var duplicate=[];for(j=0;j<n;j++)
{if(pos){if(lastPos){penultimatePos=lastPos;}
lastPos=pos;}
pos=new x3dom.fields.SFVec3f(crossSection[j].x,0,crossSection[j].y);if(j>=2)
{alpha=pos.subtract(lastPos).normalize();alpha=alpha.dot(lastPos.subtract(penultimatePos).normalize());alpha=Math.abs(Math.cos(alpha));if(alpha>this._vf.creaseAngle)
{baseCurve.push(x3dom.fields.SFVec3f.copy(lastPos));duplicate.push(true);}}
baseCurve.push(pos);duplicate.push(false);}
n=baseCurve.length;for(i=0,alpha=0;i<=steps;i++,alpha+=delta)
{var mat=x3dom.fields.SFMatrix4f.rotationX(alpha);for(j=0;j<n;j++)
{pos=mat.multMatrixPnt(baseCurve[j]);positions.push(pos);this._mesh._positions[0].push(pos.x,pos.y,pos.z);if(i>0&&j>0)
{this._mesh._indices[0].push((i-1)*n+(j-1),(i-1)*n+j,i*n+j);this._mesh._indices[0].push(i*n+j,i*n+(j-1),(i-1)*n+(j-1));}}}
if(!fullRevolution&&this._vf.caps==true)
{var linklist=new x3dom.DoublyLinkedList();m=this._mesh._positions[0].length/3;for(j=0,i=0;j<n;j++)
{if(!duplicate[j])
{linklist.appendNode(new x3dom.DoublyLinkedList.ListNode(positions[j],i++));pos=positions[j];this._mesh._positions[0].push(pos.x,pos.y,pos.z);}}
var linklist_indices=x3dom.EarClipping.getIndexes(linklist);for(j=linklist_indices.length-1;j>=0;j--)
{this._mesh._indices[0].push(m+linklist_indices[j]);}
m=this._mesh._positions[0].length/3;for(j=0;j<n;j++)
{if(!duplicate[j])
{pos=positions[n*steps+j];this._mesh._positions[0].push(pos.x,pos.y,pos.z);}}
for(j=0;j<linklist_indices.length;j++)
{this._mesh._indices[0].push(m+linklist_indices[j]);}}
this._mesh.calcNormals(Math.PI,this._vf.ccw);if(fullRevolution)
{m=3*n*steps;for(j=0;j<n;j++)
{k=3*j;this._mesh._normals[0][m+k]=this._mesh._normals[0][k];this._mesh._normals[0][m+k+1]=this._mesh._normals[0][k+1];this._mesh._normals[0][m+k+2]=this._mesh._normals[0][k+2];}}
this._mesh.calcTexCoords("");this.invalidateVolume();this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;},fieldChanged:function(fieldName)
{if(fieldName=="crossSection"||fieldName=="angle"||fieldName=="caps"||fieldName=="subdivision"||fieldName=="creaseAngle")
{this.rebuildGeometry();Array.forEach(this._parentNodes,function(node){node.setAllDirty();node.invalidateVolume();});}}}));x3dom.registerNodeType("SphereSegment","Geometry3DExt",defineClass(x3dom.nodeTypes.X3DSpatialGeometryNode,function(ctx){x3dom.nodeTypes.SphereSegment.superClass.call(this,ctx);this.addField_SFFloat(ctx,'radius',1);this.addField_MFFloat(ctx,'longitude',[]);this.addField_MFFloat(ctx,'latitude',[]);this.addField_SFVec2f(ctx,'stepSize',1,1);var r=this._vf.radius;var longs=this._vf.longitude;var lats=this._vf.latitude;var subx=longs.length,suby=lats.length;var first,second;var latNumber,longNumber;var latitudeBands=suby;var longitudeBands=subx;var theta,sinTheta,cosTheta;var phi,sinPhi,cosPhi;var x,y,z,u,v;for(latNumber=0;latNumber<=latitudeBands;latNumber++){theta=((lats[latNumber]+90)*Math.PI)/180;sinTheta=Math.sin(theta);cosTheta=Math.cos(theta);for(longNumber=0;longNumber<=longitudeBands;longNumber++){phi=((longs[longNumber])*Math.PI)/180;sinPhi=Math.sin(phi);cosPhi=Math.cos(phi);x=-cosPhi*sinTheta;y=-cosTheta;z=-sinPhi*sinTheta;u=longNumber/(longitudeBands-1);v=latNumber/(latitudeBands-1);this._mesh._positions[0].push(r*x,r*y,r*z);this._mesh._normals[0].push(x,y,z);this._mesh._texCoords[0].push(u,v);}}
for(latNumber=0;latNumber<latitudeBands;latNumber++){for(longNumber=0;longNumber<longitudeBands;longNumber++){first=(latNumber*(longitudeBands+1))+longNumber;second=first+longitudeBands+1;this._mesh._indices[0].push(first);this._mesh._indices[0].push(second);this._mesh._indices[0].push(first+1);this._mesh._indices[0].push(second);this._mesh._indices[0].push(second+1);this._mesh._indices[0].push(first+1);}}
this._mesh._invalidate=true;this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;}));x3dom.registerNodeType("ElevationGrid","Geometry3DExt",defineClass(x3dom.nodeTypes.X3DGeometryNode,function(ctx){x3dom.nodeTypes.ElevationGrid.superClass.call(this,ctx);this.addField_SFBool(ctx,'colorPerVertex',true);this.addField_SFBool(ctx,'normalPerVertex',true);this.addField_SFFloat(ctx,'creaseAngle',0);this.addField_MFNode('attrib',x3dom.nodeTypes.X3DVertexAttributeNode);this.addField_SFNode('normal',x3dom.nodeTypes.Normal);this.addField_SFNode('color',x3dom.nodeTypes.X3DColorNode);this.addField_SFNode('texCoord',x3dom.nodeTypes.X3DTextureCoordinateNode);this.addField_MFFloat(ctx,'height',[]);this.addField_SFInt32(ctx,'xDimension',0);this.addField_SFFloat(ctx,'xSpacing',1.0);this.addField_SFInt32(ctx,'zDimension',0);this.addField_SFFloat(ctx,'zSpacing',1.0);},{nodeChanged:function()
{this._mesh._indices[0]=[];this._mesh._positions[0]=[];this._mesh._normals[0]=[];this._mesh._texCoords[0]=[];this._mesh._colors[0]=[];var x=0,y=0;var subx=this._vf.xDimension-1;var suby=this._vf.zDimension-1;var h=this._vf.height;x3dom.debug.assert((h.length>=this._vf.xDimension*this._vf.zDimension),"Too few height values for given x/zDimension!");var normals=null,texCoords=null,colors=null;if(this._cf.normal.node){normals=this._cf.normal.node._vf.vector;}
var numTexComponents=2;var texCoordNode=this._cf.texCoord.node;if(x3dom.isa(texCoordNode,x3dom.nodeTypes.MultiTextureCoordinate)){if(texCoordNode._cf.texCoord.nodes.length)
texCoordNode=texCoordNode._cf.texCoord.nodes[0];}
if(texCoordNode){if(texCoordNode._vf.point){texCoords=texCoordNode._vf.point;if(x3dom.isa(texCoordNode,x3dom.nodeTypes.TextureCoordinate3D)){numTexComponents=3;}}}
var numColComponents=3;if(this._cf.color.node){colors=this._cf.color.node._vf.color;if(x3dom.isa(this._cf.color.node,x3dom.nodeTypes.ColorRGBA)){numColComponents=4;}}
var c=0;var faceCnt=0;for(y=0;y<=suby;y++)
{for(x=0;x<=subx;x++)
{this._mesh._positions[0].push(x*this._vf.xSpacing);this._mesh._positions[0].push(h[c]);this._mesh._positions[0].push(y*this._vf.zSpacing);if(normals){if(this._vf.normalPerVertex){this._mesh._normals[0].push(normals[c].x);this._mesh._normals[0].push(normals[c].y);this._mesh._normals[0].push(normals[c].z);}}
if(texCoords){this._mesh._texCoords[0].push(texCoords[c].x);this._mesh._texCoords[0].push(texCoords[c].y);if(numTexComponents===3){this._mesh._texCoords[0].push(texCoords[c].z);}}
else{this._mesh._texCoords[0].push(x/subx);this._mesh._texCoords[0].push(y/suby);}
if(colors){if(this._vf.colorPerVertex){this._mesh._colors[0].push(colors[c].r);this._mesh._colors[0].push(colors[c].g);this._mesh._colors[0].push(colors[c].b);if(numColComponents===4){this._mesh._colors[0].push(colors[c].a);}}}
c++;}}
for(y=1;y<=suby;y++){for(x=0;x<subx;x++){this._mesh._indices[0].push((y-1)*(subx+1)+x);this._mesh._indices[0].push(y*(subx+1)+x);this._mesh._indices[0].push((y-1)*(subx+1)+x+1);this._mesh._indices[0].push(y*(subx+1)+x);this._mesh._indices[0].push(y*(subx+1)+x+1);this._mesh._indices[0].push((y-1)*(subx+1)+x+1);}}
if(!normals)
this._mesh.calcNormals(Math.PI,this._vf.ccw);this.invalidateVolume();this._mesh._numTexComponents=numTexComponents;this._mesh._numColComponents=numColComponents;this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;},fieldChanged:function(fieldName)
{var i,n;var normals=null;if(this._cf.normal.node){normals=this._cf.normal.node._vf.vector;}
if(fieldName=="height")
{n=this._mesh._positions[0].length/3;var h=this._vf.height;for(i=0;i<n;i++){this._mesh._positions[0][3*i+1]=h[i];}
if(!normals){this._mesh._normals[0]=[];this._mesh.calcNormals(Math.PI,this._vf.ccw);}
this.invalidateVolume();Array.forEach(this._parentNodes,function(node){node._dirty.positions=true;if(!normals)
node._dirty.normals=true;node.invalidateVolume();});}
else if(fieldName=="xSpacing"||fieldName=="zSpacing")
{for(var y=0;y<this._vf.zDimension;y++){for(var x=0;x<this._vf.xDimension;x++){var j=3*(y*this._vf.xDimension+x);this._mesh._positions[0][j]=x*this._vf.xSpacing;this._mesh._positions[0][j+2]=y*this._vf.zSpacing;}}
if(!normals){this._mesh._normals[0]=[];this._mesh.calcNormals(Math.PI,this._vf.ccw);}
this.invalidateVolume();Array.forEach(this._parentNodes,function(node){node._dirty.positions=true;if(!normals)
node._dirty.normals=true;node.invalidateVolume();});}
else if(fieldName=="xDimension"||fieldName=="zDimension")
{this.nodeChanged();Array.forEach(this._parentNodes,function(node){node.setGeoDirty();node.invalidateVolume();});}
else if(fieldName=="color")
{n=this._mesh._colors[0].length/3;var c=this._cf.color.node._vf.color;for(i=0;i<n;i++){this._mesh._colors[0][i*3]=c[i].r;this._mesh._colors[0][i*3+1]=c[i].g;this._mesh._colors[0][i*3+2]=c[i].b;}
Array.forEach(this._parentNodes,function(node){node._dirty.colors=true;});}}}));x3dom.registerNodeType("Extrusion","Geometry3DExt",defineClass(x3dom.nodeTypes.X3DGeometryNode,function(ctx){x3dom.nodeTypes.Extrusion.superClass.call(this,ctx);this.addField_SFBool(ctx,'beginCap',true);this.addField_SFBool(ctx,'endCap',true);this.addField_SFBool(ctx,'convex',true);this.addField_SFFloat(ctx,'creaseAngle',0);this.addField_MFVec2f(ctx,'crossSection',[new x3dom.fields.SFVec2f(1,1),new x3dom.fields.SFVec2f(1,-1),new x3dom.fields.SFVec2f(-1,-1),new x3dom.fields.SFVec2f(-1,1),new x3dom.fields.SFVec2f(1,1)]);this.addField_MFRotation(ctx,'orientation',[new x3dom.fields.Quaternion(0,0,0,1)]);this.addField_MFVec2f(ctx,'scale',[new x3dom.fields.SFVec2f(1,1)]);this.addField_MFVec3f(ctx,'spine',[new x3dom.fields.SFVec3f(0,0,0),new x3dom.fields.SFVec3f(0,1,0)]);this.addField_SFFloat(ctx,'height',0);this.rebuildGeometry();},{rebuildGeometry:function()
{this._mesh._positions[0]=[];this._mesh._normals[0]=[];this._mesh._texCoords[0]=[];this._mesh._indices[0]=[];var i,j,n,m,len,sx=1,sy=1;var spine=this._vf.spine,scale=this._vf.scale,orientation=this._vf.orientation,crossSection=this._vf.crossSection;var positions=[],index=0;m=spine.length;n=crossSection.length;if(this._vf.height>0){spine[0]=new x3dom.fields.SFVec3f(0,0,0);spine[1]=new x3dom.fields.SFVec3f(0,this._vf.height,0);m=2;}
var x,y,z;var last_z=new x3dom.fields.SFVec3f(0,0,1);if(m>2){for(i=1;i<m-1;i++){var last_z_candidate=spine[i+1].subtract(spine[i]).cross(spine[i-1].subtract(spine[i]));if(last_z_candidate.length()>x3dom.fields.Eps){last_z=x3dom.fields.SFVec3f.copy(last_z_candidate.normalize());break;}}}
var texCoordV=0;var texCoordsV=[0];for(i=1;i<m;i++){var v=spine[i].subtract(spine[i-1]).length();texCoordV=texCoordV+v;texCoordsV[i]=texCoordV;}
var texCoordU=0;var texCoordsU=[0];var maxTexU_x=0,minTexU_x=0;var maxTexU_z=0,minTexU_z=0;for(j=1;j<n;j++){var u=crossSection[j].subtract(crossSection[j-1]).length();texCoordU=texCoordU+u;texCoordsU[j]=texCoordU;if(j==1){maxTexU_x=minTexU_x=crossSection[j-1].x;maxTexU_z=minTexU_z=crossSection[j-1].y;}
if(maxTexU_x<crossSection[j].x){maxTexU_x=crossSection[j].x;}
if(minTexU_x>crossSection[j].x){minTexU_x=crossSection[j].x;}
if(maxTexU_z<crossSection[j].y){maxTexU_z=crossSection[j].y;}
if(minTexU_z>crossSection[j].y){minTexU_z=crossSection[j].y;}}
if(Math.abs(maxTexU_x-minTexU_x)<Math.abs(maxTexU_z-minTexU_z)){var helpMax=maxTexU_x;var helpMin=minTexU_x;maxTexU_x=maxTexU_z;minTexU_x=minTexU_z;maxTexU_z=helpMax;minTexU_z=helpMin;}
var diffTexU_x=Math.abs(maxTexU_x-minTexU_x);var diffTexU_z=Math.abs(maxTexU_z-minTexU_z);var spineClosed=(m>2)?spine[0].equals(spine[spine.length-1],x3dom.fields.Eps):false;for(i=0;i<m;i++){if((len=scale.length)>0){if(i<len){sx=scale[i].x;sy=scale[i].y;}
else{sx=scale[len-1].x;sy=scale[len-1].y;}}
for(j=0;j<n;j++){var pos=new x3dom.fields.SFVec3f(crossSection[j].x*sx+spine[i].x,spine[i].y,crossSection[j].y*sy+spine[i].z);if(m>2){if(i==0){if(spineClosed){y=spine[1].subtract(spine[m-2]);z=spine[1].subtract(spine[0]).cross(spine[m-2].subtract(spine[0]));}
else{y=spine[1].subtract(spine[0]);z=spine[2].subtract(spine[1]).cross(spine[0].subtract(spine[1]));}
if(z.length()>x3dom.fields.Eps){last_z=x3dom.fields.SFVec3f.copy(z);}}
else if(i==m-1){if(spineClosed){y=spine[1].subtract(spine[m-2]);z=spine[1].subtract(spine[0]).cross(spine[m-2].subtract(spine[0]));}
else{y=spine[m-1].subtract(spine[m-2]);z=x3dom.fields.SFVec3f.copy(last_z);}}
else{y=spine[i+1].subtract(spine[i-1]);z=y.cross(spine[i-1].subtract(spine[i]));}
if(z.dot(last_z)<0){z=z.negate();}
y=y.normalize();z=z.normalize();if(z.length()<=x3dom.fields.Eps){z=x3dom.fields.SFVec3f.copy(last_z);}
if(i!=0){last_z=x3dom.fields.SFVec3f.copy(z);}
x=y.cross(z).normalize();var baseMat=x3dom.fields.SFMatrix4f.identity();baseMat.setValue(x,y,z);var rotMat=(i<orientation.length)?orientation[i].toMatrix():((orientation.length>0)?orientation[orientation.length-1].toMatrix():x3dom.fields.SFMatrix4f.identity());pos=pos.subtract(spine[i]);pos=baseMat.multMatrixPnt(rotMat.multMatrixPnt(pos));pos=pos.add(spine[i]);}
pos.crossSection=crossSection[j];positions.push(pos);if(this._vf.creaseAngle<=x3dom.fields.Eps){if(i>0&&j>0){var iPos=(i-1)*n+(j-1);this._mesh._positions[0].push(positions[iPos].x,positions[iPos].y,positions[iPos].z);this._mesh._texCoords[0].push(texCoordsU[j-1]/texCoordU,texCoordsV[i-1]/texCoordV);iPos=(i-1)*n+j;this._mesh._positions[0].push(positions[iPos].x,positions[iPos].y,positions[iPos].z);this._mesh._texCoords[0].push(texCoordsU[j]/texCoordU,texCoordsV[i-1]/texCoordV);iPos=i*n+j;this._mesh._positions[0].push(positions[iPos].x,positions[iPos].y,positions[iPos].z);this._mesh._texCoords[0].push(texCoordsU[j]/texCoordU,texCoordsV[i]/texCoordV);this._mesh._indices[0].push(index++,index++,index++);this._mesh._positions[0].push(positions[iPos].x,positions[iPos].y,positions[iPos].z);this._mesh._texCoords[0].push(texCoordsU[j]/texCoordU,texCoordsV[i]/texCoordV);iPos=i*n+(j-1);this._mesh._positions[0].push(positions[iPos].x,positions[iPos].y,positions[iPos].z);this._mesh._texCoords[0].push(texCoordsU[j-1]/texCoordU,texCoordsV[i]/texCoordV);iPos=(i-1)*n+(j-1);this._mesh._positions[0].push(positions[iPos].x,positions[iPos].y,positions[iPos].z);this._mesh._texCoords[0].push(texCoordsU[j-1]/texCoordU,texCoordsV[i-1]/texCoordV);this._mesh._indices[0].push(index++,index++,index++);}}
else{this._mesh._positions[0].push(pos.x,pos.y,pos.z);this._mesh._texCoords[0].push(texCoordsU[j]/texCoordU,texCoordsV[i]/texCoordV);if(i>0&&j>0){this._mesh._indices[0].push((i-1)*n+(j-1),(i-1)*n+j,i*n+j);this._mesh._indices[0].push(i*n+j,i*n+(j-1),(i-1)*n+(j-1));}}}
if(i==m-1){var p0,l,startPos;var linklist,linklist_indices;if(this._vf.beginCap){linklist=new x3dom.DoublyLinkedList();l=this._mesh._positions[0].length/3;for(j=0;j<n;j++){linklist.appendNode(new x3dom.DoublyLinkedList.ListNode(positions[j],j));if(this._vf.creaseAngle>x3dom.fields.Eps){p0=positions[j];this._mesh._positions[0].push(p0.x,p0.y,p0.z);this._mesh._texCoords[0].push((p0.crossSection.x-minTexU_x)/diffTexU_x,(p0.crossSection.y-minTexU_z)/diffTexU_z);}}
if(this._vf.ccw==false)
linklist.invert();linklist_indices=x3dom.EarClipping.getIndexes(linklist);for(j=linklist_indices.length-1;j>=0;j--){if(this._vf.creaseAngle>x3dom.fields.Eps){this._mesh._indices[0].push(l+linklist_indices[j]);}
else{p0=positions[linklist_indices[j]];this._mesh._positions[0].push(p0.x,p0.y,p0.z);this._mesh._texCoords[0].push((p0.crossSection.x-minTexU_x)/diffTexU_x,(p0.crossSection.y-minTexU_z)/diffTexU_z);this._mesh._indices[0].push(index++);}}}
if(this._vf.endCap){linklist=new x3dom.DoublyLinkedList();startPos=(m-1)*n;l=this._mesh._positions[0].length/3;for(j=0;j<n;j++){linklist.appendNode(new x3dom.DoublyLinkedList.ListNode(positions[startPos+j],startPos+j));if(this._vf.creaseAngle>x3dom.fields.Eps){p0=positions[startPos+j];this._mesh._positions[0].push(p0.x,p0.y,p0.z);this._mesh._texCoords[0].push((p0.crossSection.x-minTexU_x)/diffTexU_x,(p0.crossSection.y-minTexU_z)/diffTexU_z);}}
if(this._vf.ccw==false)
linklist.invert();linklist_indices=x3dom.EarClipping.getIndexes(linklist);for(j=0;j<linklist_indices.length;j++){if(this._vf.creaseAngle>x3dom.fields.Eps){this._mesh._indices[0].push(l+(linklist_indices[j]-startPos));}
else{p0=positions[linklist_indices[j]];this._mesh._positions[0].push(p0.x,p0.y,p0.z);this._mesh._texCoords[0].push((p0.crossSection.x-minTexU_x)/diffTexU_x,(p0.crossSection.y-minTexU_z)/diffTexU_z);this._mesh._indices[0].push(index++);}}}}}
this._mesh.calcNormals(this._vf.creaseAngle,this._vf.ccw);this.invalidateVolume();this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;},fieldChanged:function(fieldName)
{if(fieldName=="beginCap"||fieldName=="endCap"||fieldName=="crossSection"||fieldName=="orientation"||fieldName=="scale"||fieldName=="spine"||fieldName=="height"||fieldName=="creaseAngle")
{this.rebuildGeometry();Array.forEach(this._parentNodes,function(node){node.setAllDirty();node.invalidateVolume();});}}}));
\ No newline at end of file
/** X3DOM Runtime, http://www.x3dom.org/ 1.7.0 - f33e92d248a2f25d52fa63ede8ffee570c8a6304 - Wed Jun 17 09:49:25 2015 +0200 */
x3dom.registerNodeType("GeoCoordinate","Geospatial",defineClass(x3dom.nodeTypes.X3DCoordinateNode,function(ctx){x3dom.nodeTypes.GeoCoordinate.superClass.call(this,ctx);this.addField_MFVec3f(ctx,'point',[]);this.addField_MFString(ctx,'geoSystem',['GD','WE']);this.addField_SFNode('geoOrigin',x3dom.nodeTypes.GeoOrigin);},{elipsoideParameters:{'AA':['Airy 1830','6377563.396','299.3249646'],'AM':['Modified Airy','6377340.189','299.3249646'],'AN':['Australian National','6378160','298.25'],'BN':['Bessel 1841 (Namibia)','6377483.865','299.1528128'],'BR':['Bessel 1841 (Ethiopia Indonesia...)','6377397.155','299.1528128'],'CC':['Clarke 1866','6378206.4','294.9786982'],'CD':['Clarke 1880','6378249.145','293.465'],'EA':['Everest (India 1830)','6377276.345','300.8017'],'EB':['Everest (Sabah & Sarawak)','6377298.556','300.8017'],'EC':['Everest (India 1956)','6377301.243','300.8017'],'ED':['Everest (W. Malaysia 1969)','6377295.664','300.8017'],'EE':['Everest (W. Malaysia & Singapore 1948)','6377304.063','300.8017'],'EF':['Everest (Pakistan)','6377309.613','300.8017'],'FA':['Modified Fischer 1960','6378155','298.3'],'HE':['Helmert 1906','6378200','298.3'],'HO':['Hough 1960','6378270','297'],'ID':['Indonesian 1974','6378160','298.247'],'IN':['International 1924','6378388','297'],'KA':['Krassovsky 1940','6378245','298.3'],'RF':['Geodetic Reference System 1980 (GRS 80)','6378137','298.257222101'],'SA':['South American 1969','6378160','298.25'],'WD':['WGS 72','6378135','298.26'],'WE':['WGS 84','6378137','298.257223563']},fieldChanged:function(fieldName){if(fieldName=="point"||fieldName=="geoSystem"){Array.forEach(this._parentNodes,function(node){node.fieldChanged("coord");});}},isLogitudeFirst:function(geoSystem){for(var i=0;i<geoSystem.length;++i)
if(geoSystem[i]=='longitude_first')
return true;return false;},getElipsoideCode:function(geoSystem)
{for(var i=0;i<geoSystem.length;++i)
{var code=geoSystem[i];if(this.elipsoideParameters[code])
return code;}
return'WE';},getElipsoide:function(geoSystem)
{return this.elipsoideParameters[this.getElipsoideCode(geoSystem)];},getReferenceFrame:function(geoSystem)
{for(var i=0;i<geoSystem.length;++i)
{var code=geoSystem[i];if(code=='GD'||code=='GDC')
return'GD';if(code=='GC'||code=='GCC')
return'GC';if(code=='UTM')
return'UTM';else
x3dom.debug.logError('Unknown GEO system: ['+geoSystem+']');}
return'GD';},getUTMZone:function(geoSystem)
{for(var i=0;i<geoSystem.length;++i)
{var code=geoSystem[i];if(code[0]=='Z')
return code.substring(1);}
x3dom.debug.logError('no UTM zone but is required:'+geoSystem);},getUTMHemisphere:function(geoSystem)
{for(var i=0;i<geoSystem.length;++i)
{var code=geoSystem[i];if(code=='S')
return code;}
return'N';},isUTMEastingFirst:function(geoSystem)
{for(var i=0;i<geoSystem.length;++i)
{var code=geoSystem[i];if(code=='easting_first')
return true;}
return false;},UTMtoGC:function(geoSystem,coords)
{var utmzone=this.getUTMZone(geoSystem);if(utmzone<1||utmzone>60||utmzone===undefined)
return x3dom.debug.logError('invalid UTM zone: '+utmzone+' in geosystem '+geoSystem);var hemisphere=this.getUTMHemisphere(geoSystem);var eastingFirst=this.isUTMEastingFirst(geoSystem);var elipsoide=this.getElipsoide(geoSystem);var a=elipsoide[1];var f=1/elipsoide[2];var k0=0.9996;var b=a*(1-f);var esq=(1-(b/a)*(b/a));var e=Math.sqrt(esq);var e0=e/Math.sqrt(1-esq);var e0sq=esq/(1-esq);var zcm=3+6*(utmzone-1)-180;var e1=(1-Math.sqrt(1-esq))/(1+Math.sqrt(1-esq));var e1sq=e1*e1;var output=new x3dom.fields.MFVec3f();var rad2deg=180/Math.PI;var f3o64=3/64;var f5o256=5/256;var f27o32=27/32;var f21o16=21/16;var f55o32=55/32;var f151o96=151/96;var f1097o512=1097/512;var fmua=1-esq*(0.25+esq*(f3o64+f5o256*esq));var fphi11=e1*(1.5-f27o32*e1sq);var fphi12=e1sq*(f21o16-f55o32*e1sq);var current,x,y,z,M,mu,phi1,cosphi1,C1,tanphi1,T1,T1sq;var esinphi1,oneesinphi1,N1,R1,D,Dsq,C1sq,phi,lng;for(var i=0;i<coords.length;++i)
{x=(eastingFirst?coords[i].x:coords[i].y);y=(eastingFirst?coords[i].y:coords[i].x);z=coords[i].z;M=(hemisphere=="S"?(y-10000000):y)/k0;mu=M/(a*fmua);phi1=mu+fphi11*Math.sin(2*mu)+fphi12*Math.sin(4*mu);phi1=phi1+e1*(e1sq*(Math.sin(6*mu)*f151o96+Math.sin(8*mu)*f1097o512));cosphi1=Math.cos(phi1);C1=e0sq*cosphi1*cosphi1;tanphi1=Math.tan(phi1);T1=tanphi1*tanphi1;T1sq=T1*T1;esinphi1=e*Math.sin(phi1);oneesinphi1=1-esinphi1*esinphi1;N1=a/Math.sqrt(oneesinphi1);R1=N1*(1-esq)/oneesinphi1;D=(x-500000)/(N1*k0);Dsq=D*D;C1sq=C1*C1;phi=Dsq*(0.5-Dsq*(5+3*T1+10*C1-4*C1sq-9*e0sq)/24);phi=phi+Math.pow(D,6)*(61+90*T1+298*C1+45*T1sq-252*e0sq-3*C1sq)/720;phi=phi1-(N1*tanphi1/R1)*phi;lng=D*(1+Dsq*((-1-2*T1-C1)/6+Dsq*(5-2*C1+28*T1-3*C1sq+8*e0sq+24*T1sq)/120))/cosphi1;current=new x3dom.fields.SFVec3f();current.x=zcm+rad2deg*lng;current.y=rad2deg*phi;current.z=coords[i].z;output.push(current);}
var GDgeoSystem=new x3dom.fields.MFString();GDgeoSystem.push("GD");GDgeoSystem.push(this.getElipsoideCode(geoSystem));GDgeoSystem.push("longitude_first");return this.GDtoGC(GDgeoSystem,output);},GCtoUTM:function(geoSystem,coords){var coordsGD=this.GCtoGD(geoSystem,coords);var utmzone=this.getUTMZone(geoSystem);if(utmzone<1||utmzone>60||utmzone===undefined)
return x3dom.debug.logError('invalid UTM zone: '+utmzone+' in geosystem '+geoSystem);var hemisphere=this.getUTMHemisphere(geoSystem);var eastingFirst=this.isUTMEastingFirst(geoSystem);var elipsoide=this.getElipsoide(geoSystem);var a=elipsoide[1];var f=1/elipsoide[2];var k0=0.9996;var b=a*(1-f);var esq=(1-(b/a)*(b/a));var e=Math.sqrt(esq);var e0sq=esq/(1-esq);var M0=0;var deg2rad=Math.PI/180;var zcmrad=(3+6*(utmzone-1)-180)*deg2rad;var coordsUTM=new x3dom.fields.MFVec3f();var N,T,C,A,M,x,y,phi,lng,cosphi,tanphi,Asq;var i,current;var fMphi=1-esq*(1/4+esq*(3/64+5*esq/256));var fM2phi=esq*(3/8+esq*(3/32+45*esq/1024));var fM4phi=esq*esq*(15/256+esq*45/1024);var fM6phi=esq*esq*esq*(35/3072);for(i=0;i<coordsGD.length;++i){current=new x3dom.fields.SFVec3f();phi=coordsGD[i].y*deg2rad;lng=coordsGD[i].x*deg2rad;cosphi=Math.cos(phi);tanphi=Math.tan(phi);N=a/Math.sqrt(1-Math.pow(e*Math.sin(phi),2));T=Math.pow(tanphi,2);C=e0sq*Math.pow(cosphi,2);A=(lng-zcmrad)*cosphi;M=phi*fMphi;M=M-Math.sin(2*phi)*fM2phi;M=M+Math.sin(4*phi)*fM4phi;M=M-Math.sin(6*phi)*fM6phi;M=M*a;Asq=A*A;x=k0*N*A*(1+Asq*((1-T+C)/6+Asq*(5-T*(18+T)+72*C-58*e0sq)/120));x=x+500000;y=k0*(M-M0+N*tanphi*(Asq*(0.5+Asq*((5-T+9*C+4*C*C)/24+Asq*(61-T*(58+T)+600*C-330*e0sq)/720))));if(y<0){if(hemisphere=="N"){x3dom.debug.logError('UTM zone in northern hemisphere but coordinates in southern!');}
y=10000000+y;}
current.x=eastingFirst?x:y;current.y=eastingFirst?y:x;current.z=coordsGD[i].z;coordsUTM.push(current);}
return coordsUTM;},GDtoGC:function(geoSystem,coords){var output=new x3dom.fields.MFVec3f();var elipsoide=this.getElipsoide(geoSystem);var A=elipsoide[1];var eccentricity=elipsoide[2];var longitudeFirst=this.isLogitudeFirst(geoSystem);var A2=A*A;var F=1.0/eccentricity;var C=A*(1.0-F);var C2=C*C;var C2oA2=C2/A2;var Eps2=F*(2.0-F);var radiansPerDegree=0.0174532925199432957692;var i,current,source_lat,source_lon,slat,slat2,clat,Rn,RnPh;for(i=0;i<coords.length;++i)
{current=new x3dom.fields.SFVec3f();source_lat=radiansPerDegree*(longitudeFirst==true?coords[i].y:coords[i].x);source_lon=radiansPerDegree*(longitudeFirst==true?coords[i].x:coords[i].y);slat=Math.sin(source_lat);slat2=slat*slat;clat=Math.cos(source_lat);Rn=A/Math.sqrt(1.0-Eps2*slat2);RnPh=Rn+coords[i].z;current.x=RnPh*clat*Math.cos(source_lon);current.y=RnPh*clat*Math.sin(source_lon);current.z=(C2oA2*Rn+coords[i].z)*slat;output.push(current);}
return output;},GCtoGD:function(geoSystem,coords){var output=new x3dom.fields.MFVec3f();var rad2deg=180/Math.PI;var ellipsoide=this.getElipsoide(geoSystem);var a=ellipsoide[1];var f=1/ellipsoide[2];var b=a*(1-f);var esq=(1-(b/a)*(b/a));var eps=esq/(1-esq);var i,current,x,y,z,p,q,lat,nu,elev,lon;for(i=0;i<coords.length;++i){x=coords[i].x;y=coords[i].y;z=coords[i].z;p=Math.sqrt(x*x+y*y);q=Math.atan((z*a)/(p*b));lat=Math.atan((z+eps*b*Math.pow(Math.sin(q),3))/(p-esq*a*Math.pow(Math.cos(q),3)));nu=a/Math.sqrt(1-esq*Math.pow(Math.sin(lat),2));elev=p/Math.cos(lat)-nu;lon=Math.atan2(y,x);current=new x3dom.fields.SFVec3f();current.x=lon*rad2deg;current.y=lat*rad2deg;current.z=elev;output.push(current);}
return output;},GEOtoGC:function(geoSystem,geoOrigin,coords){var referenceFrame=this.getReferenceFrame(geoSystem);if(referenceFrame=='GD')
return this.GDtoGC(geoSystem,coords);else if(referenceFrame=='UTM')
return this.UTMtoGC(geoSystem,coords);else if(referenceFrame=='GC')
{if(geoOrigin.node)
{var copy=new x3dom.fields.MFVec3f();for(var i=0;i<coords.length;++i)
{var current=new x3dom.fields.SFVec3f();current.x=coords[i].x;current.y=coords[i].y;current.z=coords[i].z;copy.push(current);}
return copy;}
else
return coords;}
else{x3dom.debug.logError('Unknown geoSystem: '+geoSystem[0]);return new x3dom.fields.MFVec3f();}},GCtoGEO:function(geoSystem,geoOrigin,coords){var referenceFrame=this.getReferenceFrame(geoSystem);if(referenceFrame=='GD'){var coordsGD=this.GCtoGD(geoSystem,coords);if(!this.isLogitudeFirst(geoSystem)){var currentx;for(var i=0;i<coordsGD.length;++i){currentx=coordsGD[i].x;coordsGD[i].x=coordsGD[i].y;coordsGD[i].y=currentx;}}
return coordsGD;}
else if(referenceFrame=='UTM')
return this.GCtoUTM(geoSystem,coords);else if(referenceFrame=='GC')
{if(geoOrigin.node)
{var copy=new x3dom.fields.MFVec3f();for(var i=0;i<coords.length;++i)
{var current=new x3dom.fields.SFVec3f();current.x=coords[i].x;current.y=coords[i].y;current.z=coords[i].z;copy.push(current);}
return copy;}
else
return coords;}
else{x3dom.debug.logError('Unknown geoSystem: '+geoSystem[0]);return new x3dom.fields.MFVec3f();}},OriginToGC:function(geoOrigin)
{var geoCoords=geoOrigin.node._vf.geoCoords;var geoSystem=geoOrigin.node._vf.geoSystem;var point=new x3dom.fields.SFVec3f();point.x=geoCoords.x;point.y=geoCoords.y;point.z=geoCoords.z;var temp=new x3dom.fields.MFVec3f();temp.push(point);var origin=this.GEOtoGC(geoSystem,geoOrigin,temp);return origin[0];},GCtoX3D:function(geoSystem,geoOrigin,coords)
{var gc=coords;if(geoOrigin.node)
{var origin=this.OriginToGC(geoOrigin);var matrix=x3dom.fields.SFMatrix4f.translation(origin.negate());if(geoOrigin.node._vf.rotateYUp)
{var rotmat=x3dom.nodeTypes.GeoLocation.prototype.getGeoRotMat(geoSystem,origin).inverse();matrix=rotmat.mult(matrix);}
for(var i=0;i<coords.length;++i)
gc[i]=matrix.multMatrixPnt(coords[i]);}
return gc;},GEOtoX3D:function(geoSystem,geoOrigin,coords)
{var gc=this.GEOtoGC(geoSystem,geoOrigin,coords);return this.GCtoX3D(geoSystem,geoOrigin,gc);},getPoints:function()
{return this.GEOtoX3D(this._vf.geoSystem,this._cf.geoOrigin,this._vf.point);}}));x3dom.registerNodeType("GeoElevationGrid","Geospatial",defineClass(x3dom.nodeTypes.X3DGeometryNode,function(ctx){x3dom.nodeTypes.GeoElevationGrid.superClass.call(this,ctx);this.addField_MFString(ctx,'geoSystem',['GD','WE']);this.addField_SFVec3d(ctx,'geoGridOrigin',0,0,0);this.addField_MFDouble(ctx,'height',0,0);this.addField_SFBool(ctx,'ccw',true);this.addField_SFDouble(ctx,'creaseAngle',0);this.addField_SFInt32(ctx,'xDimension',0);this.addField_SFDouble(ctx,'xSpacing',1.0);this.addField_SFFloat(ctx,'yScale',1);this.addField_SFInt32(ctx,'zDimension',0);this.addField_SFDouble(ctx,'zSpacing',1.0);this.addField_SFNode('geoOrigin',x3dom.nodeTypes.GeoOrigin);this.addField_SFBool(ctx,'lit',true);},{nodeChanged:function()
{var geoSystem=this._vf.geoSystem;var geoOrigin=this._cf.geoOrigin;var height=this._vf.height;var yScale=this._vf.yScale;var xDimension=this._vf.xDimension;var zDimension=this._vf.zDimension;var xSpacing=this._vf.xSpacing;var zSpacing=this._vf.zSpacing;var geoGridOrigin=this._vf.geoGridOrigin;if(height.length!==(xDimension*zDimension))
x3dom.debug.logError('GeoElevationGrid: height.length('+height.length+') != x/zDimension('+xDimension+'*'+zDimension+')');var longitude_first=x3dom.nodeTypes.GeoCoordinate.prototype.isLogitudeFirst(geoSystem);var easting_first=x3dom.nodeTypes.GeoCoordinate.prototype.isUTMEastingFirst(geoSystem);var ccw=this._vf.ccw;var delta_x=1/(xDimension-1);var delta_z=1/(zDimension-1);var positions=new x3dom.fields.MFVec3f();var texCoords=new x3dom.fields.MFVec2f();for(var z=0;z<zDimension;++z)
for(var x=0;x<xDimension;++x)
{var tex_coord=new x3dom.fields.SFVec2f(x*delta_x,z*delta_z);texCoords.push(tex_coord);var coord=new x3dom.fields.SFVec3f();if(longitude_first||easting_first)
{coord.x=x*xSpacing;coord.y=z*zSpacing;}
else
{coord.x=z*zSpacing;coord.y=x*xSpacing;}
coord.z=height[(z*xDimension)+x]*yScale;coord=coord.add(geoGridOrigin);positions.push(coord);}
var indices=new x3dom.fields.MFInt32();for(var z=0;z<(zDimension-1);z++)
{for(var x=0;x<(xDimension-1);x++)
{var p0=x+(z*xDimension);var p1=x+(z*xDimension)+1;var p2=x+((z+1)*xDimension)+1;var p3=x+((z+1)*xDimension);if(ccw)
{indices.push(p0);indices.push(p1);indices.push(p2);indices.push(p0);indices.push(p2);indices.push(p3);}
else
{indices.push(p0);indices.push(p3);indices.push(p2);indices.push(p0);indices.push(p2);indices.push(p1);}}}
var transformed=x3dom.nodeTypes.GeoCoordinate.prototype.GEOtoX3D(geoSystem,geoOrigin,positions);if(this._vf.creaseAngle<=x3dom.fields.Eps){var that=this;(function(){var indicesFlat=new x3dom.fields.MFInt32(),positionsFlat=new x3dom.fields.MFVec3f(),texCoordsFlat=new x3dom.fields.MFVec3f();that.generateNonIndexedTriangleData(indices,transformed,null,texCoords,null,positionsFlat,null,texCoordsFlat,null);for(var i=0;i<positionsFlat.length;++i){indicesFlat.push(i);}
that._mesh._indices[0]=indicesFlat.toGL();that._mesh._positions[0]=positionsFlat.toGL();that._mesh._texCoords[0]=texCoordsFlat.toGL();})();this._mesh.calcNormals(0);}
else{this._mesh._indices[0]=indices.toGL();this._mesh._positions[0]=transformed.toGL();this._mesh._texCoords[0]=texCoords.toGL();this._mesh.calcNormals(Math.PI);}
this._mesh._invalidate=true;this._mesh._numFaces=this._mesh._indices[0].length/3;this._mesh._numCoords=this._mesh._positions[0].length/3;},generateNonIndexedTriangleData:function(indices,positions,normals,texCoords,colors,newPositions,newNormals,newTexCoords,newColors)
{for(var i=0;i<indices.length;i+=3){var i0=indices[i],i1=indices[i+1],i2=indices[i+2];if(positions){var p0=new x3dom.fields.SFVec3f(),p1=new x3dom.fields.SFVec3f(),p2=new x3dom.fields.SFVec3f();p0.setValues(positions[i0]);p1.setValues(positions[i1]);p2.setValues(positions[i2]);newPositions.push(p0);newPositions.push(p1);newPositions.push(p2);}
if(normals){var n0=new x3dom.fields.SFVec3f(),n1=new x3dom.fields.SFVec3f(),n2=new x3dom.fields.SFVec3f();n0.setValues(normals[i0]);n1.setValues(normals[i1]);n2.setValues(normals[i2]);newNormals.push(n0);newNormals.push(n1);newNormals.push(n2);}
if(texCoords){var t0=new x3dom.fields.SFVec2f(),t1=new x3dom.fields.SFVec2f(),t2=new x3dom.fields.SFVec2f();t0.setValues(texCoords[i0]);t1.setValues(texCoords[i1]);t1.setValues(texCoords[i2]);newTexCoords.push(t0);newTexCoords.push(t1);newTexCoords.push(t2);}
if(colors){var c0=new x3dom.fields.SFVec3f(),c1=new x3dom.fields.SFVec3f(),c2=new x3dom.fields.SFVec3f();c0.setValues(texCoords[i0]);c1.setValues(texCoords[i1]);c1.setValues(texCoords[i2]);newColors.push(c0);newColors.push(c1);newColors.push(c2);}}}}));x3dom.registerNodeType("GeoLOD","Geospatial",defineClass(x3dom.nodeTypes.X3DLODNode,function(ctx){x3dom.nodeTypes.GeoLOD.superClass.call(this,ctx);this.addField_MFString(ctx,'geoSystem',['GD','WE']);this.addField_MFString(ctx,'rootUrl',[]);this.addField_MFString(ctx,'child1Url',[]);this.addField_MFString(ctx,'child2Url',[]);this.addField_MFString(ctx,'child3Url',[]);this.addField_MFString(ctx,'child4Url',[]);this.addField_SFFloat(ctx,'range',10);this.addField_SFString(ctx,'referenceBindableDescription',[]);this.addField_SFNode('geoOrigin',x3dom.nodeTypes.X3DChildNode);this.addField_SFNode('rootNode',x3dom.nodeTypes.X3DChildNode);this.addField_SFNode('privateChild1Node',x3dom.nodeTypes.X3DChildNode);this.addField_SFNode('privateChild2Node',x3dom.nodeTypes.X3DChildNode);this.addField_SFNode('privateChild3Node',x3dom.nodeTypes.X3DChildNode);this.addField_SFNode('privateChild4Node',x3dom.nodeTypes.X3DChildNode);this.addField_SFNode('privateRootNode',x3dom.nodeTypes.X3DChildNode);}));x3dom.registerNodeType("GeoLocation","Geospatial",defineClass(x3dom.nodeTypes.X3DTransformNode,function(ctx){x3dom.nodeTypes.GeoLocation.superClass.call(this,ctx);this.addField_MFString(ctx,'geoSystem',['GD','WE']);this.addField_SFVec3d(ctx,'geoCoords',0,0,0);this.addField_SFNode('geoOrigin',x3dom.nodeTypes.GeoOrigin);},{nodeChanged:function()
{var position=this._vf.geoCoords;var geoSystem=this._vf.geoSystem;var geoOrigin=this._cf.geoOrigin;this._trafo=this.getGeoTransRotMat(geoSystem,geoOrigin,position);},getGeoRotMat:function(geoSystem,positionGC)
{var coords=new x3dom.fields.MFVec3f();coords.push(positionGC);var positionGD=x3dom.nodeTypes.GeoCoordinate.prototype.GCtoGD(geoSystem,coords)[0];var Xaxis=new x3dom.fields.SFVec3f(1,0,0);var rotlat=180-positionGD.y;var deg2rad=Math.PI/180;var rotUpQuat=x3dom.fields.Quaternion.axisAngle(Xaxis,rotlat*deg2rad);var Zaxis=new x3dom.fields.SFVec3f(0,0,1);var rotlon=90+positionGD.x;var rotZQuat=x3dom.fields.Quaternion.axisAngle(Zaxis,rotlon*deg2rad);return rotZQuat.multiply(rotUpQuat).toMatrix();},getGeoTransRotMat:function(geoSystem,geoOrigin,position)
{var coords=new x3dom.fields.MFVec3f();coords.push(position);var transformed=x3dom.nodeTypes.GeoCoordinate.prototype.GEOtoGC(geoSystem,geoOrigin,coords)[0];var rotMat=this.getGeoRotMat(geoSystem,transformed);if(geoOrigin.node)
{var origin=x3dom.nodeTypes.GeoCoordinate.prototype.OriginToGC(geoOrigin);if(geoOrigin.node._vf.rotateYUp)
{var rotMatOrigin=this.getGeoRotMat(geoSystem,origin);return rotMatOrigin.inverse().mult(x3dom.fields.SFMatrix4f.translation(transformed.subtract(origin)).mult(rotMat));}
return x3dom.fields.SFMatrix4f.translation(transformed.subtract(origin)).mult(rotMat);}
else
{return x3dom.fields.SFMatrix4f.translation(transformed).mult(rotMat);}},fieldChanged:function(fieldName)
{if(fieldName=="geoSystem"||fieldName=="geoCoords"||fieldName=="geoOrigin")
{var position=this._vf.geoCoords;var geoSystem=this._vf.geoSystem;var geoOrigin=this._cf.geoOrigin;this._trafo=this.getGeoTransRotMat(geoSystem,geoOrigin,position);this.invalidateVolume();}
else if(fieldName=="render"){this.invalidateVolume();}}}));x3dom.registerNodeType("GeoMetadata","Geospatial",defineClass(x3dom.nodeTypes.X3DInfoNode,function(ctx){x3dom.nodeTypes.GeoMetadata.superClass.call(this,ctx);this.addField_MFString(ctx,'url',[]);this.addField_MFNode('data',x3dom.nodeTypes.X3DInfoNode);this.addField_MFString(ctx,'summary',[]);}));x3dom.registerNodeType("GeoOrigin","Geospatial",defineClass(x3dom.nodeTypes.X3DNode,function(ctx){x3dom.nodeTypes.GeoOrigin.superClass.call(this,ctx);this.addField_MFString(ctx,'geoSystem',['GD','WE']);this.addField_SFVec3d(ctx,'geoCoords',0,0,0);this.addField_SFBool(ctx,'rotateYUp',false);}));x3dom.registerNodeType("GeoPositionInterpolator","Geospatial",defineClass(x3dom.nodeTypes.X3DInterpolatorNode,function(ctx){x3dom.nodeTypes.GeoPositionInterpolator.superClass.call(this,ctx);this.addField_MFString(ctx,'geoSystem',['GD','WE']);this.addField_MFVec3f(ctx,'keyValue',[]);this.addField_SFNode('geoOrigin',x3dom.nodeTypes.GeoOrigin);this.addField_SFBool(ctx,'onGreatCircle',false);},{linearInterpHintKeyValue:function(time,keyHint,key,keyValue,interp){var keylength=key.length;if(time<=key[0])
return[0,keyValue[0]];else if(time>=key[keylength-1])
return[keylength-1,keyValue[keylength-1]];var keyIndexStart=keyHint;var i;for(var ii=0;ii<keylength-1;++ii){i=(keyIndexStart+ii)%keylength;if((key[i]<time)&&(time<=key[i+1]))
return[i,interp(keyValue[i],keyValue[i+1],(time-key[i])/(key[i+1]-key[i]))];i=(keyIndexStart-ii+keylength)%keylength;if((key[i]<time)&&(time<=key[i+1]))
return[i,interp(keyValue[i],keyValue[i+1],(time-key[i])/(key[i+1]-key[i]))];}
return[0,keyValue[0]];},slerp:function(a,b,t){var cosom=a.dot(b)/(a.length()*b.length());var rot1;{rot1=new x3dom.fields.SFVec3f(b.x,b.y,b.z);}
var scalerot0,scalerot1;if((1.0-cosom)>0.00001)
{var omega=Math.acos(cosom);var sinom=Math.sin(omega);scalerot0=Math.sin((1.0-t)*omega)/sinom;scalerot1=Math.sin(t*omega)/sinom;}
else
{scalerot0=1.0-t;scalerot1=t;}
return a.multiply(scalerot0).add(rot1.multiply(scalerot1));},nodeChanged:function(){this._keyValueGC=x3dom.nodeTypes.GeoCoordinate.prototype.GEOtoGC(this._vf.geoSystem,this._cf.geoOrigin,this._vf.keyValue);this._keyHint=0;},fieldChanged:function(fieldName)
{if(fieldName==="set_fraction"){var value,indexValue,valueGC,valueX3D,coords;if(this._vf.onGreatCircle){indexValue=this.linearInterpHintKeyValue(this._vf.set_fraction,this._keyHint,this._vf.key,this._keyValueGC,x3dom.nodeTypes.GeoPositionInterpolator.prototype.slerp);this._keyHint=indexValue[0];valueGC=indexValue[1];coords=new x3dom.fields.MFVec3f();coords.push(valueGC);value=x3dom.nodeTypes.GeoCoordinate.prototype.GCtoGEO(this._vf.geoSystem,this._cf.geoOrigin,coords)[0];}
else{indexValue=this.linearInterpHintKeyValue(this._vf.set_fraction,this._keyHint,this._vf.key,this._vf.keyValue,function(a,b,t){return a.multiply(1.0-t).add(b.multiply(t));});this._keyHint=indexValue[0];value=indexValue[1];coords=new x3dom.fields.MFVec3f();coords.push(value);valueGC=x3dom.nodeTypes.GeoCoordinate.prototype.GEOtoGC(this._vf.geoSystem,this._cf.geoOrigin,coords)[0];}
coords=new x3dom.fields.MFVec3f();coords.push(valueGC);var GCgeoSystem=new x3dom.fields.MFString();GCgeoSystem.push("GC");GCgeoSystem.push(x3dom.nodeTypes.GeoCoordinate.prototype.getElipsoideCode(this._vf.geoSystem));valueX3D=x3dom.nodeTypes.GeoCoordinate.prototype.GCtoX3D(GCgeoSystem,this._cf.geoOrigin,coords)[0];this.postMessage('value_changed',valueX3D);this.postMessage('geovalue_changed',value);}}}));x3dom.registerNodeType("GeoTransform","Geospatial",defineClass(x3dom.nodeTypes.X3DGroupingNode,function(ctx){x3dom.nodeTypes.GeoTransform.superClass.call(this,ctx);this.addField_SFVec3d(ctx,'geoCenter',0,0,0);this.addField_SFRotation(ctx,'rotation',0,0,1,0);this.addField_SFVec3f(ctx,'scale',1,1,1);this.addField_SFRotation(ctx,'scaleOrientation',0,0,1,0);this.addField_SFVec3f(ctx,'translation',0,0,0);this.addField_SFNode('geoOrigin',x3dom.nodeTypes.Transform);this.addField_MFString(ctx,'geoSystem',['GD','WE']);}));x3dom.registerNodeType("GeoViewpoint","Geospatial",defineClass(x3dom.nodeTypes.X3DViewpointNode,function(ctx){x3dom.nodeTypes.GeoViewpoint.superClass.call(this,ctx);this.addField_MFString(ctx,'geoSystem',['GD','WE']);this.addField_SFFloat(ctx,'fieldOfView',0.785398);this.addField_SFRotation(ctx,'orientation',0,0,1,0);this.addField_SFVec3f(ctx,'centerOfRotation',0,0,0);this.addField_SFVec3d(ctx,'position',0,0,100000);this.addField_SFBool(ctx,'headlight',undefined);this.addField_MFString(ctx,'navType',undefined);this.addField_SFFloat(ctx,'speedFactor',1.0);this.addField_SFFloat(ctx,'zNear',-1);this.addField_SFFloat(ctx,'zFar',-1);this.addField_SFBool(ctx,'elevationScaling',true);this.addField_SFNode('geoOrigin',x3dom.nodeTypes.GeoOrigin);this._geoCenterOfRotation=this._vf.centerOfRotation;},{activate:function(prev){var viewarea=this._nameSpace.doc._viewarea;if(prev){viewarea.animateTo(this,prev._autoGen?null:prev);}
viewarea._needNavigationMatrixUpdate=true;x3dom.nodeTypes.X3DBindableNode.prototype.activate.call(this,prev);var navi=viewarea._scene.getNavigationInfo();this._initSpeed=navi._vf.speed;this._examineSpeed=navi._vf.speed;this._lastSpeed=navi._vf.speed;this._userSpeedFactor=1.0;this._lastNavType=navi.getType();x3dom.debug.logInfo("initial navigation speed: "+this._initSpeed);if(this._vf.headlight!==undefined){navi._vf.headlight=this._vf.headlight;}
if(this._vf.navType!==undefined){navi._vf.navType=this._vf.navType;}},deactivate:function(prev){var viewarea=this._nameSpace.doc._viewarea;var navi=viewarea._scene.getNavigationInfo();navi._vf.speed=this._examineSpeed;x3dom.debug.logInfo("navigation speed restored to: "+this._examineSpeed);x3dom.nodeTypes.X3DBindableNode.prototype.deactivate.call(this,prev);},nodeChanged:function(){this._stack=this._nameSpace.doc._bindableBag.addBindable(this);this._geoOrigin=this._cf.geoOrigin;this._geoSystem=this._vf.geoSystem;this._position=this._vf.position;this._orientation=this._vf.orientation;this._viewMatrix=this.getInitViewMatrix(this._orientation,this._geoSystem,this._geoOrigin,this._position);this._vf.centerOfRotation=this.getGeoCenterOfRotation(this._geoSystem,this._geoOrigin,this._geoCenterOfRotation);this._projMatrix=null;this._lastAspect=1.0;this._zRatio=10000;this._zNear=this._vf.zNear;this._zFar=this._vf.zFar;this._imgPlaneHeightAtDistOne=2.0*Math.tan(this._vf.fieldOfView/2.0);},fieldChanged:function(fieldName){if(fieldName=="position"||fieldName=="orientation"){this.resetView();}
else if(fieldName=="fieldOfView"||fieldName=="zNear"||fieldName=="zFar"){this._projMatrix=null;this._zNear=this._vf.zNear;this._zFar=this._vf.zFar;this._imgPlaneHeightAtDistOne=2.0*Math.tan(this._vf.fieldOfView/2.0);}
else if(fieldName.indexOf("bind")>=0){this.bind(this._vf.bind);}},setProjectionMatrix:function(matrix)
{this._projMatrix=matrix;},getCenterOfRotation:function(){return this.getCurrentTransform().multMatrixPnt(this._vf.centerOfRotation);},getGeoCenterOfRotation:function(geoSystem,geoOrigin,geoCenterOfRotation){var coords=new x3dom.fields.MFVec3f();coords.push(geoCenterOfRotation);var transformed=x3dom.nodeTypes.GeoCoordinate.prototype.GEOtoX3D(geoSystem,geoOrigin,coords);return transformed[0];},isExamineMode:function(navType){return(navType=='examine'||navType=='turntable'||navType=='lookaround'||navType=='lookat');},getViewMatrix:function(){if(this._vf.isActive&&this._vf.elevationScaling){var viewarea=this._nameSpace.doc._viewarea;var navi=viewarea._scene.getNavigationInfo();var navType=navi.getType();if(this.isExamineMode(navType)){if(!this.isExamineMode(this._lastNavType)){navi._vf.speed=this._examineSpeed;}
this._lastNavType=navType;}
else{if(this.isExamineMode(this._lastNavType)){this._examineSpeed=navi._vf.speed;x3dom.debug.logInfo("back from examine mode, resume speed: "+this._lastSpeed);navi._vf.speed=this._lastSpeed;}
this._lastNavType=navType;if(navi._vf.speed!=this._lastSpeed){this._userSpeedFactor*=navi._vf.speed/this._lastSpeed;x3dom.debug.logInfo("interactive speed factor changed: "+this._userSpeedFactor);}
var viewtrafo=viewarea._scene.getViewpoint().getCurrentTransform();viewtrafo=viewtrafo.inverse().mult(this._viewMatrix);var position=viewtrafo.inverse().e3();var geoOrigin=this._geoOrigin;var geoSystem=this._geoSystem;var positionGC=position;if(geoOrigin.node){var origin=x3dom.nodeTypes.GeoCoordinate.prototype.OriginToGC(geoOrigin);if(geoOrigin.node._vf.rotateYUp){var rotmat=x3dom.nodeTypes.GeoLocation.prototype.getGeoRotMat(geoSystem,origin);positionGC=rotmat.multMatrixPnt(position);}
positionGC=positionGC.add(origin);}
var coords=new x3dom.fields.MFVec3f();coords.push(positionGC);var positionGD=x3dom.nodeTypes.GeoCoordinate.prototype.GCtoGD(geoSystem,coords)[0];var elevationSpeed=Math.abs(positionGD.z/10);elevationSpeed=elevationSpeed>1?elevationSpeed:1;navi._vf.speed=elevationSpeed*this._vf.speedFactor*this._userSpeedFactor;this._lastSpeed=navi._vf.speed;}}
return this._viewMatrix;},getInitViewMatrix:function(orientation,geoSystem,geoOrigin,position){var coords=new x3dom.fields.MFVec3f();coords.push(position);var positionGC=x3dom.nodeTypes.GeoCoordinate.prototype.GEOtoGC(geoSystem,geoOrigin,coords)[0];var orientMatrix=orientation.toMatrix();var rotMat=x3dom.nodeTypes.GeoLocation.prototype.getGeoRotMat(geoSystem,positionGC);var rotOrient=rotMat.mult(orientMatrix);if(geoOrigin.node){if(geoOrigin.node._vf.rotateYUp){var origin=x3dom.nodeTypes.GeoCoordinate.prototype.OriginToGC(geoOrigin);var rotMatOrigin=x3dom.nodeTypes.GeoLocation.prototype.getGeoRotMat(geoSystem,origin);rotOrient=rotMatOrigin.inverse().mult(rotOrient);}}
var positionX3D=x3dom.nodeTypes.GeoCoordinate.prototype.GEOtoX3D(geoSystem,geoOrigin,coords)[0];return x3dom.fields.SFMatrix4f.translation(positionX3D).mult(rotOrient).inverse();},getFieldOfView:function(){return this._vf.fieldOfView;},resetView:function(){this._viewMatrix=this.getInitViewMatrix(this._vf.orientation,this._vf.geoSystem,this._cf.geoOrigin,this._vf.position);this._vf.centerOfRotation=this.getGeoCenterOfRotation(this._vf.geoSystem,this._cf.geoOrigin,this._geoCenterOfRotation);if(this._nameSpace.doc._viewarea){this._nameSpace.doc._viewarea.resetNavHelpers();}},getNear:function(){return this._zNear;},getFar:function(){return this._zFar;},getImgPlaneHeightAtDistOne:function(){return this._imgPlaneHeightAtDistOne;},getProjectionMatrix:function(aspect)
{var fovy=this._vf.fieldOfView;var zfar=this._vf.zFar;var znear=this._vf.zNear;if(znear<=0||zfar<=0)
{var nearScale=0.8,farScale=1.2;var viewarea=this._nameSpace.doc._viewarea;var scene=viewarea._scene;var min=x3dom.fields.SFVec3f.copy(scene._lastMin);var max=x3dom.fields.SFVec3f.copy(scene._lastMax);var dia=max.subtract(min);var sRad=dia.length()/2;var mat=viewarea.getViewMatrix().inverse();var vp=mat.e3();var translation=new x3dom.fields.SFVec3f(0,0,0),scaleFactor=new x3dom.fields.SFVec3f(1,1,1);var rotation=new x3dom.fields.Quaternion(0,0,1,0),scaleOrientation=new x3dom.fields.Quaternion(0,0,1,0);mat.getTransform(translation,rotation,scaleFactor,scaleOrientation);var minScal=scaleFactor.x,maxScal=scaleFactor.x;if(maxScal<scaleFactor.y)maxScal=scaleFactor.y;if(minScal>scaleFactor.y)minScal=scaleFactor.y;if(maxScal<scaleFactor.z)maxScal=scaleFactor.z;if(minScal>scaleFactor.z)minScal=scaleFactor.z;if(maxScal>1)
nearScale/=maxScal;else if(minScal>x3dom.fields.Eps&&minScal<1)
farScale/=minScal;var sCenter=min.add(dia.multiply(0.5));var vDist=(vp.subtract(sCenter)).length();if(sRad){if(vDist>sRad)
znear=(vDist-sRad)*nearScale;else
znear=0;zfar=(vDist+sRad)*farScale;}
else{znear=0.1;zfar=100000;}
var zNearLimit=zfar/this._zRatio;znear=Math.max(znear,Math.max(x3dom.fields.Eps,zNearLimit));if(zfar>this._vf.zNear&&this._vf.zNear>0)
znear=this._vf.zNear;if(this._vf.zFar>znear)
zfar=this._vf.zFar;if(zfar<=znear)
zfar=znear+1;}
if(this._projMatrix==null)
{this._projMatrix=x3dom.fields.SFMatrix4f.perspective(fovy,aspect,znear,zfar);}
else if(this._zNear!=znear||this._zFar!=zfar)
{var div=znear-zfar;this._projMatrix._22=(znear+zfar)/div;this._projMatrix._23=2*znear*zfar/div;}
else if(this._lastAspect!=aspect)
{this._projMatrix._00=(1/Math.tan(fovy/2))/aspect;this._lastAspect=aspect;}
this._zNear=znear;this._zFar=zfar;return this._projMatrix;}}));
\ No newline at end of file
/** X3DOM Runtime, http://www.x3dom.org/ 1.7.0 - f33e92d248a2f25d52fa63ede8ffee570c8a6304 - Wed Jun 17 09:49:25 2015 +0200 */
x3dom.registerNodeType("HAnimDisplacer","H-Anim",defineClass(x3dom.nodeTypes.X3DGeometricPropertyNode,function(ctx){x3dom.nodeTypes.HAnimDisplacer.superClass.call(this,ctx);this.addField_SFString(ctx,'name',"");this.addField_SFFloat(ctx,'weight',0);this.addField_MFInt32(ctx,'coordIndex',[]);this.addField_MFVec3f(ctx,'displacements',[]);x3dom.debug.logWarning("HAnimDisplacer NYI!");}));x3dom.registerNodeType("HAnimJoint","H-Anim",defineClass(x3dom.nodeTypes.Transform,function(ctx){x3dom.nodeTypes.HAnimJoint.superClass.call(this,ctx);this.addField_SFString(ctx,'name',"");this.addField_MFNode('displacers',x3dom.nodeTypes.HAnimDisplacer);this.addField_SFRotation(ctx,'limitOrientation',0,0,1,0);this.addField_MFFloat(ctx,'llimit',[]);this.addField_MFFloat(ctx,'ulimit',[]);this.addField_MFInt32(ctx,'skinCoordIndex',[]);this.addField_MFFloat(ctx,'skinCoordWeight',[]);}));x3dom.registerNodeType("HAnimSegment","H-Anim",defineClass(x3dom.nodeTypes.X3DGroupingNode,function(ctx){x3dom.nodeTypes.HAnimSegment.superClass.call(this,ctx);this.addField_SFString(ctx,'name',"");this.addField_SFVec3f(ctx,'centerOfMass',0,0,0);this.addField_SFFloat(ctx,'mass',0);this.addField_MFFloat(ctx,'momentsOfInertia',[0,0,0,0,0,0,0,0,0]);this.addField_SFNode('coord',x3dom.nodeTypes.X3DCoordinateNode);this.addField_MFNode('displacers',x3dom.nodeTypes.HAnimDisplacer);},{}));x3dom.registerNodeType("HAnimSite","H-Anim",defineClass(x3dom.nodeTypes.Transform,function(ctx){x3dom.nodeTypes.HAnimSite.superClass.call(this,ctx);this.addField_SFString(ctx,'name',"");}));x3dom.registerNodeType("HAnimHumanoid","H-Anim",defineClass(x3dom.nodeTypes.Transform,function(ctx){x3dom.nodeTypes.HAnimHumanoid.superClass.call(this,ctx);this.addField_SFString(ctx,'name',"");this.addField_SFString(ctx,'version',"");this.addField_MFString(ctx,'info',[]);this.addField_MFNode('joints',x3dom.nodeTypes.HAnimJoint);this.addField_MFNode('segments',x3dom.nodeTypes.HAnimSegment);this.addField_MFNode('sites',x3dom.nodeTypes.HAnimSite);this.addField_MFNode('skeleton',x3dom.nodeTypes.HAnimJoint);this.addField_MFNode('skin',x3dom.nodeTypes.X3DChildNode);this.addField_MFNode('skinCoord',x3dom.nodeTypes.X3DCoordinateNode);this.addField_MFNode('skinNormal',x3dom.nodeTypes.X3DNormalNode);this.addField_MFNode('viewpoints',x3dom.nodeTypes.HAnimSite);},{}));
\ No newline at end of file
/** X3DOM Runtime, http://www.x3dom.org/ 1.7.0 - f33e92d248a2f25d52fa63ede8ffee570c8a6304 - Wed Jun 17 09:49:25 2015 +0200 */
x3dom.registerNodeType("ScreenGroup","Layout",defineClass(x3dom.nodeTypes.X3DGroupingNode,function(ctx){x3dom.nodeTypes.ScreenGroup.superClass.call(this,ctx);},{collectDrawableObjects:function(transform,drawableCollection,singlePath,invalidateCache,planeMask,clipPlanes)
{if(singlePath&&(this._parentNodes.length>1))
singlePath=false;if(singlePath&&(invalidateCache=invalidateCache||this.cacheInvalid()))
this.invalidateCache();planeMask=drawableCollection.cull(transform,this.graphState(),singlePath,planeMask);if(planeMask<=0){return;}
singlePath=false;var doc,vp,minus_one,zero,viewport_height,one_to_one_pixel_depth,view_transform,view_direction,model_transform,camera_position,screengroup_position,viewpoint_to_screengroup,ratio,scale_matrix;doc=this._nameSpace.doc;vp=doc._scene.getViewpoint();viewport_height=doc._x3dElem.clientHeight;one_to_one_pixel_depth=viewport_height/vp.getImgPlaneHeightAtDistOne();minus_one=new x3dom.fields.SFVec3f(0,0,-1.0);zero=new x3dom.fields.SFVec3f(0,0,0);view_transform=drawableCollection.viewMatrix;model_transform=transform;view_direction=minus_one;camera_position=zero;screengroup_position=view_transform.multMatrixPnt(model_transform.multMatrixPnt(zero));viewpoint_to_screengroup=screengroup_position.subtract(camera_position);ratio=view_direction.dot(viewpoint_to_screengroup)/one_to_one_pixel_depth;scale_matrix=x3dom.fields.SFMatrix4f.scale(new x3dom.fields.SFVec3f(ratio,ratio,ratio));var childTransform=this.transformMatrix(model_transform.mult(scale_matrix));for(var i=0,i_n=this._childNodes.length;i<i_n;i++)
{var cnode=this._childNodes[i];if(cnode){cnode.collectDrawableObjects(childTransform,drawableCollection,singlePath,invalidateCache,planeMask,clipPlanes);}}}}));
\ No newline at end of file
/** X3DOM Runtime, http://www.x3dom.org/ 1.7.0 - f33e92d248a2f25d52fa63ede8ffee570c8a6304 - Wed Jun 17 09:49:25 2015 +0200 */
function X3DCollidableShape(){var CollidableShape=new x3dom.fields.SFNode();var RigidBody=new x3dom.fields.SFNode();var RigidBodyCollection=new x3dom.fields.SFNode();var CollisionCollection=new x3dom.fields.SFNode();var Transform=new x3dom.fields.SFNode();var RB_setup=new x3dom.fields.MFBoolean();var T_setup=new x3dom.fields.MFBoolean();var CC_setup=new x3dom.fields.MFBoolean();var createRigid=new x3dom.fields.MFBoolean();var isMotor=new x3dom.fields.MFBoolean();var torque=new x3dom.fields.SFVec3f();var isInline=new x3dom.fields.MFBoolean();var inlineExternalTransform=new x3dom.fields.SFNode();var inlineInternalTransform=new x3dom.fields.SFNode();}
function X3DJoint(){var createJoint=new x3dom.fields.MFBoolean();var Joint=[];}
(function(){var CollidableShapes=[],JointShapes=[],bulletWorld,x3dWorld=null,initScene,main,updateRigidbodies,MakeUpdateList,X3DRigidBodyComponents,CreateX3DCollidableShape,UpdateTransforms,CreateRigidbodies,rigidbodies=[],mousePickObject,mousePos=new x3dom.fields.SFVec3f(),drag=false,interactiveTransforms=[],UpdateRigidbody,intervalVar,building_constraints=true,ParseX3DElement,InlineObjectList,inline_x3dList=[],inlineLoad=false,completeJointSetup=false;function ParseX3DElement(){for(var cv in x3dom.canvases){for(var sc in x3dom.canvases[cv].x3dElem.children){if(x3dom.isa(x3dom.canvases[cv].x3dElem.children[sc]._x3domNode,x3dom.nodeTypes.Scene)){x3dWorld=x3dom.canvases[cv].x3dElem.children[sc];}}}
if(x3dWorld){for(var i in x3dWorld.children){if(x3dom.isa(x3dWorld.children[i]._x3domNode,x3dom.nodeTypes.Transform)){if(x3dom.isa(x3dWorld.children[i]._x3domNode._cf.children.nodes[0]._xmlNode._x3domNode,x3dom.nodeTypes.Inline)){if(inline_x3dList.length==0){inline_x3dList.push(x3dWorld.children[i]);}
else{for(var n in inline_x3dList){if(inline_x3dList[n]._x3domNode._DEF.toString()==x3dWorld.children[i]._x3domNode._DEF.toString()){break;}
else{if(n==inline_x3dList.length-1){inline_x3dList.push(x3dWorld.children[i]);}}}}}}
if(x3dom.isa(x3dWorld.children[i]._x3domNode,x3dom.nodeTypes.Group)){for(var all in x3dWorld.children[i].childNodes){CreateX3DCollidableShape(x3dWorld.children[i].childNodes[all],null);}}
else{CreateX3DCollidableShape(x3dWorld.children[i],null);}}}}
function CreateX3DCollidableShape(a,b){if(x3dom.isa(a._x3domNode,x3dom.nodeTypes.CollidableShape)){var X3D_CS=new X3DCollidableShape;CollidableShapes.push(X3D_CS);X3D_CS.CollidableShape=a;X3D_CS.createRigid=true;X3D_CS.RB_setup=false;X3D_CS.T_setup=false;X3D_CS.CC_setup=false;X3D_CS.isMotor=false;X3D_CS.torque=new x3dom.fields.SFVec3f(0,0,0);X3D_CS.isInline=false;X3D_CS.inlineExternalTransform=null;X3D_CS.Transform=a._x3domNode._cf.transform;if(b){X3D_CS.isInline=true;X3D_CS.inlineExternalTransform=b;}}
if(x3dom.isa(a._x3domNode,x3dom.nodeTypes.RigidBodyCollection)){for(var ea in a._x3domNode._cf.joints.nodes){if(x3dom.isa(a._x3domNode._cf.joints.nodes[ea],x3dom.nodeTypes.BallJoint)||x3dom.isa(a._x3domNode._cf.joints.nodes[ea],x3dom.nodeTypes.UniversalJoint)||x3dom.isa(a._x3domNode._cf.joints.nodes[ea],x3dom.nodeTypes.SliderJoint)||x3dom.isa(a._x3domNode._cf.joints.nodes[ea],x3dom.nodeTypes.MotorJoint)||x3dom.isa(a._x3domNode._cf.joints.nodes[ea],x3dom.nodeTypes.SingleAxisHingeJoint)||x3dom.isa(a._x3domNode._cf.joints.nodes[ea],x3dom.nodeTypes.DoubleAxisHingeJoint)){var X3D_J=new X3DJoint;X3D_J.createJoint=true;X3D_J.Joint=a._x3domNode._cf.joints.nodes[ea];JointShapes.push(X3D_J);}}
completeJointSetup=true;}
if(inlineLoad){X3DRigidBodyComponents(a);}
if(a.parentNode){for(var ea in a.parentNode.children){if(a.parentNode&&a.parentNode.children.hasOwnProperty(ea)&&a.parentNode.children[ea]){if(x3dom.isa(a.parentNode.children[ea]._x3domNode,x3dom.nodeTypes.Group)){for(var all in a.parentNode.children[ea].childNodes){if(a.parentNode.children[ea].childNodes.hasOwnProperty(all)&&a.parentNode.children[ea].childNodes[all]){X3DRigidBodyComponents(a.parentNode.children[ea].childNodes[all]);}}}
else{X3DRigidBodyComponents(a.parentNode.children[ea]);}}}}}
function X3DRigidBodyComponents(a){if(x3dom.isa(a._x3domNode,x3dom.nodeTypes.CollisionSensor)){for(var ea in a._x3domNode._cf.collider._x3domNode._cf.collidables.nodes){for(var cs in CollidableShapes){if(!CollidableShapes[cs].CC_setup&&CollidableShapes[cs].CollidableShape._x3domNode._DEF==a._x3domNode._cf.collider._x3domNode._cf.collidables.nodes[ea]._DEF){CollidableShapes[cs].CC_setup=true;CollidableShapes[cs].CollisionCollection=a._x3domNode._cf.collider;}}}}
if(x3dom.isa(a._x3domNode,x3dom.nodeTypes.CollisionCollection)){for(var ea in a._x3domNode._cf.collidables.nodes){for(var cs in CollidableShapes){if(!CollidableShapes[cs].CC_setup&&CollidableShapes[cs].CollidableShape._x3domNode._DEF==a._x3domNode._cf.collidables.nodes[ea]._DEF){CollidableShapes[cs].CC_setup=true;CollidableShapes[cs].CollisionCollection=a._x3domNode._cf.collider;}}}}
if(x3dom.isa(a._x3domNode,x3dom.nodeTypes.Transform)){for(var cs in CollidableShapes){if(!CollidableShapes[cs].T_setup&&CollidableShapes[cs].Transform._x3domNode._DEF==a._x3domNode._DEF){CollidableShapes[cs].T_setup=true;CollidableShapes[cs].inlineInternalTransform=null;interactiveTransforms.push(a);if(!CollidableShapes[cs].inlineInternalTransform&&CollidableShapes[cs].isInline){CollidableShapes[cs].inlineInternalTransform=a;}}}}
if(x3dom.isa(a._x3domNode,x3dom.nodeTypes.RigidBodyCollection)){for(var ea in a._x3domNode._cf.bodies.nodes){for(var eac in a._x3domNode._cf.bodies.nodes[ea]._cf.geometry.nodes){for(var cs in CollidableShapes){if(!CollidableShapes[cs].RB_setup&&CollidableShapes[cs].CollidableShape._x3domNode._DEF==a._x3domNode._cf.bodies.nodes[ea]._cf.geometry.nodes[eac]._DEF){CollidableShapes[cs].RB_setup=true;CollidableShapes[cs].RigidBody=a._x3domNode._cf.bodies.nodes[ea];CollidableShapes[cs].RigidBodyCollection=a;}}}}}}
initScene=function(){var collisionConfiguration,dispatcher,overlappingPairCache,solver,WorldGravity=new x3dom.fields.SFVec3f();collisionConfiguration=new Ammo.btDefaultCollisionConfiguration();dispatcher=new Ammo.btCollisionDispatcher(collisionConfiguration);overlappingPairCache=new Ammo.btDbvtBroadphase();solver=new Ammo.btSequentialImpulseConstraintSolver();bulletWorld=new Ammo.btDiscreteDynamicsWorld(dispatcher,overlappingPairCache,solver,collisionConfiguration);bulletWorld.setGravity(new Ammo.btVector3(0,-9.81,0));};CreateRigidbodies=function(){var mass,startTransform,localInertia,sphereShape,boxShape,cylinderShape,coneShape,indexedfacesetShape,centerOfMass,motionState,rbInfo,sphereAmmo,boxAmmo,cylinderAmmo,coneAmmo,indexedfacesetAmmo;building_constraints=true;for(var cs in CollidableShapes){if(CollidableShapes[cs].CC_setup&&CollidableShapes[cs].T_setup&&CollidableShapes[cs].RB_setup&&CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._xmlNode.nodeName&&CollidableShapes[cs].createRigid==true){switch(CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._xmlNode.nodeName.toLowerCase())
{case"sphere":{var sphere=CollidableShapes[cs];if(!CollidableShapes[cs].RigidBody._vf.enabled||CollidableShapes[cs].RigidBody._vf.fixed){mass=0;}
else{mass=CollidableShapes[cs].RigidBody._vf.mass;}
startTransform=new Ammo.btTransform();startTransform.setIdentity();startTransform.setOrigin(new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.z));if(CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.x==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.y==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.z==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.w==1){startTransform.setRotation(new Ammo.btQuaternion(0,0,1,0));}
else{CollidableShapes[cs].Transform._x3domNode._vf.rotation=CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation;startTransform.setRotation(new Ammo.btQuaternion(CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.z,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.w));}
if(CollidableShapes[cs].RigidBody._vf.centerOfMass!=null){centerOfMass=new Ammo.btTransform(startTransform.getRotation(),new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.x+CollidableShapes[cs].RigidBody._vf.centerOfMass.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.y+CollidableShapes[cs].RigidBody._vf.centerOfMass.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.z+CollidableShapes[cs].RigidBody._vf.centerOfMass.z));}
else{centerOfMass=startTransform;}
if(CollidableShapes[cs].RigidBody._vf.inertia){if(CollidableShapes[cs].RigidBody._vf.inertia[0]+CollidableShapes[cs].RigidBody._vf.inertia[1]+CollidableShapes[cs].RigidBody._vf.inertia[2]==CollidableShapes[cs].RigidBody._vf.inertia[3]+CollidableShapes[cs].RigidBody._vf.inertia[4]+CollidableShapes[cs].RigidBody._vf.inertia[5]==CollidableShapes[cs].RigidBody._vf.inertia[6]+CollidableShapes[cs].RigidBody._vf.inertia[7]+CollidableShapes[cs].RigidBody._vf.inertia[8]==1){localInertia=new Ammo.btVector3(0,0,0);}
else{localInertia=new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.inertia[0]+CollidableShapes[cs].RigidBody._vf.inertia[1]+CollidableShapes[cs].RigidBody._vf.inertia[2],CollidableShapes[cs].RigidBody._vf.inertia[3]+CollidableShapes[cs].RigidBody._vf.inertia[4]+CollidableShapes[cs].RigidBody._vf.inertia[5],CollidableShapes[cs].RigidBody._vf.inertia[6]+CollidableShapes[cs].RigidBody._vf.inertia[7]+CollidableShapes[cs].RigidBody._vf.inertia[8]);}}
else{localInertia=new Ammo.btVector3(0,0,0);}
sphereShape=new Ammo.btSphereShape(CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._vf.radius);sphereShape.calculateLocalInertia(mass,localInertia);sphereShape.setMargin(CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.contactSurfaceThickness);motionState=new Ammo.btDefaultMotionState(startTransform);rbInfo=new Ammo.btRigidBodyConstructionInfo(mass,motionState,sphereShape,localInertia);rbInfo.m_friction=CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.x;rbInfo.m_rollingFriction=CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.y;sphereAmmo=new Ammo.btRigidBody(rbInfo);if(CollidableShapes[cs].RigidBody._vf.autoDamp){sphereAmmo.setDamping(CollidableShapes[cs].RigidBody._vf.linearDampingFactor,CollidableShapes[cs].RigidBody._vf.angularDampingFactor);}
else{sphereAmmo.setDamping(0,0);}
sphereAmmo.setAngularVelocity(new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.angularVelocity.x,CollidableShapes[cs].RigidBody._vf.angularVelocity.y,CollidableShapes[cs].RigidBody._vf.angularVelocity.z));sphereAmmo.setLinearVelocity(new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.linearVelocity.x,CollidableShapes[cs].RigidBody._vf.linearVelocity.y,CollidableShapes[cs].RigidBody._vf.linearVelocity.z));if(CollidableShapes[cs].CollisionCollection._x3domNode._vf.bounce!=null){sphereAmmo.setRestitution(CollidableShapes[cs].CollisionCollection._x3domNode._vf.bounce);}
else{sphereAmmo.setRestitution(1.0);}
if(CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients!=null){sphereAmmo.setFriction(CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.y);}
else{sphereAmmo.setFriction(0);}
if(CollidableShapes[cs].RigidBody._vf.disableLinearSpeed&&CollidableShapes[cs].RigidBody._vf.disableAngularSpeed){sphereAmmo.setSleepingThresholds(CollidableShapes[cs].RigidBody._vf.disableLinearSpeed,CollidableShapes[cs].RigidBody._vf.disableAngularSpeed);}
if(CollidableShapes[cs].RigidBody._vf.useGlobalGravity){sphereAmmo.setGravity(new Ammo.btVector3(CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.x,CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.y,CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.z));sphereAmmo.setFlags(0);}
else{sphereAmmo.setFlags(1);}
sphereAmmo.setCenterOfMassTransform(centerOfMass);if(UpdateRigidbody!=null){bulletWorld.removeRigidBody(rigidbodies[UpdateRigidbody]);bulletWorld.addRigidBody(sphereAmmo);sphereAmmo.geometry=sphere;rigidbodies.splice(UpdateRigidbody,1,sphereAmmo);}
else{bulletWorld.addRigidBody(sphereAmmo);sphereAmmo.geometry=sphere;rigidbodies.push(sphereAmmo);}}
break;case"box":{var box=CollidableShapes[cs];if(!CollidableShapes[cs].RigidBody._vf.enabled||CollidableShapes[cs].RigidBody._vf.fixed){mass=0;}
else{mass=CollidableShapes[cs].RigidBody._vf.mass;}
startTransform=new Ammo.btTransform();startTransform.setIdentity();startTransform.setBasis(CollidableShapes[cs].RigidBody._vf.inertia);startTransform.setOrigin(new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.z));var zeroRot=new x3dom.fields.Quaternion(0,0,0,1);if(CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.x==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.y==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.z==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.w==1){startTransform.setRotation(new Ammo.btQuaternion(0,0,1,0));}
else{startTransform.setRotation(new Ammo.btQuaternion(CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.z,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.w));}
if(CollidableShapes[cs].RigidBody._vf.centerOfMass!=null){centerOfMass=new Ammo.btTransform(startTransform.getRotation(),new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.x+CollidableShapes[cs].RigidBody._vf.centerOfMass.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.y+CollidableShapes[cs].RigidBody._vf.centerOfMass.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.z+CollidableShapes[cs].RigidBody._vf.centerOfMass.z));}
else{centerOfMass=startTransform;}
if(CollidableShapes[cs].RigidBody._vf.inertia){if(CollidableShapes[cs].RigidBody._vf.inertia[0]+CollidableShapes[cs].RigidBody._vf.inertia[1]+CollidableShapes[cs].RigidBody._vf.inertia[2]==CollidableShapes[cs].RigidBody._vf.inertia[3]+CollidableShapes[cs].RigidBody._vf.inertia[4]+CollidableShapes[cs].RigidBody._vf.inertia[5]==CollidableShapes[cs].RigidBody._vf.inertia[6]+CollidableShapes[cs].RigidBody._vf.inertia[7]+CollidableShapes[cs].RigidBody._vf.inertia[8]==1){localInertia=new Ammo.btVector3(0,0,0);}
else{localInertia=new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.inertia[0]+CollidableShapes[cs].RigidBody._vf.inertia[1]+CollidableShapes[cs].RigidBody._vf.inertia[2],CollidableShapes[cs].RigidBody._vf.inertia[3]+CollidableShapes[cs].RigidBody._vf.inertia[4]+CollidableShapes[cs].RigidBody._vf.inertia[5],CollidableShapes[cs].RigidBody._vf.inertia[6]+CollidableShapes[cs].RigidBody._vf.inertia[7]+CollidableShapes[cs].RigidBody._vf.inertia[8]);}}
else{localInertia=new Ammo.btVector3(0,0,0);}
boxShape=new Ammo.btBoxShape(new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._vf.size.x/2,CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._vf.size.y/2,CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._vf.size.z/2));localInertia=new Ammo.btVector3(0,0,0);boxShape.calculateLocalInertia(mass,localInertia);boxShape.setMargin(CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.contactSurfaceThickness);motionState=new Ammo.btDefaultMotionState(startTransform);rbInfo=new Ammo.btRigidBodyConstructionInfo(mass,motionState,boxShape,localInertia);rbInfo.m_friction=CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.x;rbInfo.m_rollingFriction=CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.y;boxAmmo=new Ammo.btRigidBody(rbInfo);if(CollidableShapes[cs].RigidBody._vf.autoDamp){boxAmmo.setDamping(CollidableShapes[cs].RigidBody._vf.linearDampingFactor,CollidableShapes[cs].RigidBody._vf.angularDampingFactor);}
else{boxAmmo.setDamping(0,0);}
boxAmmo.setAngularVelocity(new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.angularVelocity.x,CollidableShapes[cs].RigidBody._vf.angularVelocity.y,CollidableShapes[cs].RigidBody._vf.angularVelocity.z));boxAmmo.setLinearVelocity(new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.linearVelocity.x,CollidableShapes[cs].RigidBody._vf.linearVelocity.y,CollidableShapes[cs].RigidBody._vf.linearVelocity.z));if(CollidableShapes[cs].CollisionCollection._x3domNode._vf.bounce!=null){boxAmmo.setRestitution(CollidableShapes[cs].CollisionCollection._x3domNode._vf.bounce);}
else{boxAmmo.setRestitution(1.0);}
if(CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients!=null){boxAmmo.setFriction(CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.y);}
else{boxAmmo.setFriction(1);}
if(CollidableShapes[cs].RigidBody._vf.disableLinearSpeed&&CollidableShapes[cs].RigidBody._vf.disableAngularSpeed){boxAmmo.setSleepingThresholds(CollidableShapes[cs].RigidBody._vf.disableLinearSpeed,CollidableShapes[cs].RigidBody._vf.disableAngularSpeed);}
if(CollidableShapes[cs].RigidBody._vf.useGlobalGravity){boxAmmo.setGravity(new Ammo.btVector3(CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.x,CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.y,CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.z));boxAmmo.setFlags(0);}
else{boxAmmo.setFlags(1);}
boxAmmo.setCenterOfMassTransform(centerOfMass);if(UpdateRigidbody!=null){bulletWorld.removeRigidBody(rigidbodies[UpdateRigidbody]);bulletWorld.addRigidBody(boxAmmo);boxAmmo.geometry=box;rigidbodies.splice(UpdateRigidbody,1,boxAmmo);}
else{bulletWorld.addRigidBody(boxAmmo);boxAmmo.geometry=box;rigidbodies.push(boxAmmo);}}
break;case"cylinder":{var cylinder=CollidableShapes[cs];if(!CollidableShapes[cs].RigidBody._vf.enabled||CollidableShapes[cs].RigidBody._vf.fixed){mass=0;}
else{mass=CollidableShapes[cs].RigidBody._vf.mass;}
startTransform=new Ammo.btTransform();startTransform.setIdentity();startTransform.setBasis(CollidableShapes[cs].RigidBody._vf.inertia);startTransform.setOrigin(new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.z));if(CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.x==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.y==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.z==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.w==1){startTransform.setRotation(new Ammo.btQuaternion(0,0,1,0));}
else{CollidableShapes[cs].Transform._x3domNode._vf.rotation=CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation;startTransform.setRotation(new Ammo.btQuaternion(CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.z,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.w));}
if(CollidableShapes[cs].RigidBody._vf.centerOfMass!=null){centerOfMass=new Ammo.btTransform(startTransform.getRotation(),new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.x+CollidableShapes[cs].RigidBody._vf.centerOfMass.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.y+CollidableShapes[cs].RigidBody._vf.centerOfMass.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.z+CollidableShapes[cs].RigidBody._vf.centerOfMass.z));}
else{centerOfMass=startTransform;}
if(CollidableShapes[cs].RigidBody._vf.inertia){if(CollidableShapes[cs].RigidBody._vf.inertia[0]+CollidableShapes[cs].RigidBody._vf.inertia[1]+CollidableShapes[cs].RigidBody._vf.inertia[2]==CollidableShapes[cs].RigidBody._vf.inertia[3]+CollidableShapes[cs].RigidBody._vf.inertia[4]+CollidableShapes[cs].RigidBody._vf.inertia[5]==CollidableShapes[cs].RigidBody._vf.inertia[6]+CollidableShapes[cs].RigidBody._vf.inertia[7]+CollidableShapes[cs].RigidBody._vf.inertia[8]==1){localInertia=new Ammo.btVector3(0,0,0);}
else{localInertia=new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.inertia[0]+CollidableShapes[cs].RigidBody._vf.inertia[1]+CollidableShapes[cs].RigidBody._vf.inertia[2],CollidableShapes[cs].RigidBody._vf.inertia[3]+CollidableShapes[cs].RigidBody._vf.inertia[4]+CollidableShapes[cs].RigidBody._vf.inertia[5],CollidableShapes[cs].RigidBody._vf.inertia[6]+CollidableShapes[cs].RigidBody._vf.inertia[7]+CollidableShapes[cs].RigidBody._vf.inertia[8]);}}
else{localInertia=new Ammo.btVector3(0,0,0);}
cylinderShape=new Ammo.btCylinderShape(new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._vf.radius,CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._vf.height/2,CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._vf.radius));cylinderShape.calculateLocalInertia(mass,localInertia);cylinderShape.setMargin(CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.contactSurfaceThickness);motionState=new Ammo.btDefaultMotionState(startTransform);rbInfo=new Ammo.btRigidBodyConstructionInfo(mass,motionState,cylinderShape,localInertia);rbInfo.m_friction=CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.x;rbInfo.m_rollingFriction=CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.y;cylinderAmmo=new Ammo.btRigidBody(rbInfo);if(CollidableShapes[cs].RigidBody._vf.autoDamp){cylinderAmmo.setDamping(CollidableShapes[cs].RigidBody._vf.linearDampingFactor,CollidableShapes[cs].RigidBody._vf.angularDampingFactor);}
else{cylinderAmmo.setDamping(0,0);}
cylinderAmmo.setAngularVelocity(new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.angularVelocity.x,CollidableShapes[cs].RigidBody._vf.angularVelocity.y,CollidableShapes[cs].RigidBody._vf.angularVelocity.z));cylinderAmmo.setLinearVelocity(new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.linearVelocity.x,CollidableShapes[cs].RigidBody._vf.linearVelocity.y,CollidableShapes[cs].RigidBody._vf.linearVelocity.z));if(CollidableShapes[cs].CollisionCollection._x3domNode._vf.bounce!=null){cylinderAmmo.setRestitution(CollidableShapes[cs].CollisionCollection._x3domNode._vf.bounce);}
else{cylinderAmmo.setRestitution(1.0);}
if(CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients!=null){cylinderAmmo.setFriction(CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.y);}
else{cylinderAmmo.setFriction(1);}
if(CollidableShapes[cs].RigidBody._vf.disableLinearSpeed&&CollidableShapes[cs].RigidBody._vf.disableAngularSpeed){cylinderAmmo.setSleepingThresholds(CollidableShapes[cs].RigidBody._vf.disableLinearSpeed,CollidableShapes[cs].RigidBody._vf.disableAngularSpeed);}
if(CollidableShapes[cs].RigidBody._vf.useGlobalGravity){cylinderAmmo.setGravity(new Ammo.btVector3(CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.x,CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.y,CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.z));cylinderAmmo.setFlags(0);}
else{cylinderAmmo.setFlags(1);}
cylinderAmmo.setCenterOfMassTransform(centerOfMass);if(UpdateRigidbody!=null){bulletWorld.removeRigidBody(rigidbodies[UpdateRigidbody]);bulletWorld.addRigidBody(cylinderAmmo);cylinderAmmo.geometry=cylinder;rigidbodies.splice(UpdateRigidbody,1,cylinderAmmo);}
else{bulletWorld.addRigidBody(cylinderAmmo);cylinderAmmo.geometry=cylinder;rigidbodies.push(cylinderAmmo);}}
break;case"cone":{var cone=CollidableShapes[cs];if(!CollidableShapes[cs].RigidBody._vf.enabled||CollidableShapes[cs].RigidBody._vf.fixed){mass=0;}
else{mass=CollidableShapes[cs].RigidBody._vf.mass;}
startTransform=new Ammo.btTransform();startTransform.setIdentity();startTransform.setBasis(CollidableShapes[cs].RigidBody._vf.inertia);startTransform.setOrigin(new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.z));if(CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.x==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.y==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.z==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.w==1){startTransform.setRotation(new Ammo.btQuaternion(0,0,1,0));}
else{CollidableShapes[cs].Transform._x3domNode._vf.rotation=CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation;startTransform.setRotation(new Ammo.btQuaternion(CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.z,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.w));}
if(CollidableShapes[cs].RigidBody._vf.centerOfMass!=null){centerOfMass=new Ammo.btTransform(startTransform.getRotation(),new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.x+CollidableShapes[cs].RigidBody._vf.centerOfMass.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.y+CollidableShapes[cs].RigidBody._vf.centerOfMass.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.z+CollidableShapes[cs].RigidBody._vf.centerOfMass.z));}
else{centerOfMass=startTransform;}
if(CollidableShapes[cs].RigidBody._vf.inertia){if(CollidableShapes[cs].RigidBody._vf.inertia[0]+CollidableShapes[cs].RigidBody._vf.inertia[1]+CollidableShapes[cs].RigidBody._vf.inertia[2]==CollidableShapes[cs].RigidBody._vf.inertia[3]+CollidableShapes[cs].RigidBody._vf.inertia[4]+CollidableShapes[cs].RigidBody._vf.inertia[5]==CollidableShapes[cs].RigidBody._vf.inertia[6]+CollidableShapes[cs].RigidBody._vf.inertia[7]+CollidableShapes[cs].RigidBody._vf.inertia[8]==1){localInertia=new Ammo.btVector3(0,0,0);}
else{localInertia=new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.inertia[0]+CollidableShapes[cs].RigidBody._vf.inertia[1]+CollidableShapes[cs].RigidBody._vf.inertia[2],CollidableShapes[cs].RigidBody._vf.inertia[3]+CollidableShapes[cs].RigidBody._vf.inertia[4]+CollidableShapes[cs].RigidBody._vf.inertia[5],CollidableShapes[cs].RigidBody._vf.inertia[6]+CollidableShapes[cs].RigidBody._vf.inertia[7]+CollidableShapes[cs].RigidBody._vf.inertia[8]);}}
else{localInertia=new Ammo.btVector3(0,0,0);}
coneShape=new Ammo.btConeShape(CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._vf.radius,CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._vf.height);coneShape.setConeUpIndex(1);coneShape.setMargin(CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.contactSurfaceThickness);coneShape.calculateLocalInertia(mass,localInertia);motionState=new Ammo.btDefaultMotionState(startTransform);rbInfo=new Ammo.btRigidBodyConstructionInfo(mass,motionState,coneShape,localInertia);rbInfo.m_friction=CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.x;rbInfo.m_rollingFriction=CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.y;coneAmmo=new Ammo.btRigidBody(rbInfo);if(CollidableShapes[cs].RigidBody._vf.autoDamp){coneAmmo.setDamping(CollidableShapes[cs].RigidBody._vf.linearDampingFactor,CollidableShapes[cs].RigidBody._vf.angularDampingFactor);}
else{coneAmmo.setDamping(0,0);}
coneAmmo.setAngularVelocity(new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.angularVelocity.x,CollidableShapes[cs].RigidBody._vf.angularVelocity.y,CollidableShapes[cs].RigidBody._vf.angularVelocity.z));coneAmmo.setLinearVelocity(new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.linearVelocity.x,CollidableShapes[cs].RigidBody._vf.linearVelocity.y,CollidableShapes[cs].RigidBody._vf.linearVelocity.z));if(CollidableShapes[cs].CollisionCollection._x3domNode._vf.bounce!=null){coneAmmo.setRestitution(CollidableShapes[cs].CollisionCollection._x3domNode._vf.bounce);}
else{coneAmmo.setRestitution(1.0);}
if(CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients!=null){coneAmmo.setFriction(CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.y);}
else{coneAmmo.setFriction(1);}
if(CollidableShapes[cs].RigidBody._vf.disableLinearSpeed&&CollidableShapes[cs].RigidBody._vf.disableAngularSpeed){coneAmmo.setSleepingThresholds(CollidableShapes[cs].RigidBody._vf.disableLinearSpeed,CollidableShapes[cs].RigidBody._vf.disableAngularSpeed);}
if(CollidableShapes[cs].RigidBody._vf.useGlobalGravity){coneAmmo.setGravity(new Ammo.btVector3(CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.x,CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.y,CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.z));coneAmmo.setFlags(0);}
else{coneAmmo.setFlags(1);}
coneAmmo.setCenterOfMassTransform(centerOfMass);if(UpdateRigidbody!=null){bulletWorld.removeRigidBody(rigidbodies[UpdateRigidbody]);bulletWorld.addRigidBody(coneAmmo);coneAmmo.geometry=cone;rigidbodies.splice(UpdateRigidbody,1,coneAmmo);}
else{bulletWorld.addRigidBody(coneAmmo);coneAmmo.geometry=cone;rigidbodies.push(coneAmmo);}}
break;case"indexedfaceset":{var indexedfaceset=CollidableShapes[cs];if(!CollidableShapes[cs].RigidBody._vf.enabled||CollidableShapes[cs].RigidBody._vf.fixed){mass=0;}
else{mass=CollidableShapes[cs].RigidBody._vf.mass;}
startTransform=new Ammo.btTransform();startTransform.setIdentity();startTransform.setBasis(CollidableShapes[cs].RigidBody._vf.inertia);startTransform.setOrigin(new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.z));if(CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.x==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.y==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.z==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.w==1){startTransform.setRotation(new Ammo.btQuaternion(0,0,1,0));}
else{CollidableShapes[cs].Transform._x3domNode._vf.rotation=CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation;startTransform.setRotation(new Ammo.btQuaternion(CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.z,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.w));}
if(CollidableShapes[cs].RigidBody._vf.centerOfMass!=null){centerOfMass=new Ammo.btTransform(startTransform.getRotation(),new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.x+CollidableShapes[cs].RigidBody._vf.centerOfMass.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.y+CollidableShapes[cs].RigidBody._vf.centerOfMass.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.z+CollidableShapes[cs].RigidBody._vf.centerOfMass.z));}
else{centerOfMass=startTransform;}
if(CollidableShapes[cs].RigidBody._vf.inertia){if(CollidableShapes[cs].RigidBody._vf.inertia[0]+CollidableShapes[cs].RigidBody._vf.inertia[1]+CollidableShapes[cs].RigidBody._vf.inertia[2]==CollidableShapes[cs].RigidBody._vf.inertia[3]+CollidableShapes[cs].RigidBody._vf.inertia[4]+CollidableShapes[cs].RigidBody._vf.inertia[5]==CollidableShapes[cs].RigidBody._vf.inertia[6]+CollidableShapes[cs].RigidBody._vf.inertia[7]+CollidableShapes[cs].RigidBody._vf.inertia[8]==1){localInertia=new Ammo.btVector3(0,0,0);}
else{localInertia=new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.inertia[0]+CollidableShapes[cs].RigidBody._vf.inertia[1]+CollidableShapes[cs].RigidBody._vf.inertia[2],CollidableShapes[cs].RigidBody._vf.inertia[3]+CollidableShapes[cs].RigidBody._vf.inertia[4]+CollidableShapes[cs].RigidBody._vf.inertia[5],CollidableShapes[cs].RigidBody._vf.inertia[6]+CollidableShapes[cs].RigidBody._vf.inertia[7]+CollidableShapes[cs].RigidBody._vf.inertia[8]);}}
else{localInertia=new Ammo.btVector3(0,0,0);}
var convexHullShape=new Ammo.btConvexHullShape();for(var p in CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._cf.coord.node._vf.point){convexHullShape.addPoint(new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._cf.coord.node._vf.point[p].x,CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._cf.coord.node._vf.point[p].y,CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._cf.coord.node._vf.point[p].z),true);}
var compoundShape=new Ammo.btCompoundShape();compoundShape.addChildShape(startTransform,convexHullShape);compoundShape.setMargin(CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.contactSurfaceThickness);compoundShape.createAabbTreeFromChildren();compoundShape.updateChildTransform(0,new Ammo.btTransform(new Ammo.btQuaternion(0,0,0,1),new Ammo.btVector3(0,0,0)),true);compoundShape.calculateLocalInertia(mass,localInertia);motionState=new Ammo.btDefaultMotionState(startTransform);rbInfo=new Ammo.btRigidBodyConstructionInfo(mass,motionState,compoundShape,localInertia);rbInfo.m_friction=CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.x;rbInfo.m_rollingFriction=CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.y;indexedfacesetAmmo=new Ammo.btRigidBody(rbInfo);if(CollidableShapes[cs].RigidBody._vf.autoDamp){indexedfacesetAmmo.setDamping(CollidableShapes[cs].RigidBody._vf.linearDampingFactor,CollidableShapes[cs].RigidBody._vf.angularDampingFactor);}
else{indexedfacesetAmmo.setDamping(0,0);}
indexedfacesetAmmo.setAngularVelocity(new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.angularVelocity.x,CollidableShapes[cs].RigidBody._vf.angularVelocity.y,CollidableShapes[cs].RigidBody._vf.angularVelocity.z));indexedfacesetAmmo.setLinearVelocity(new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.linearVelocity.x,CollidableShapes[cs].RigidBody._vf.linearVelocity.y,CollidableShapes[cs].RigidBody._vf.linearVelocity.z));if(CollidableShapes[cs].CollisionCollection._x3domNode._vf.bounce!=null){indexedfacesetAmmo.setRestitution(CollidableShapes[cs].CollisionCollection._x3domNode._vf.bounce);}
else{indexedfacesetAmmo.setRestitution(1.0);}
if(CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients!=null){indexedfacesetAmmo.setFriction(CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.y);}
else{indexedfacesetAmmo.setFriction(1);}
if(CollidableShapes[cs].RigidBody._vf.disableLinearSpeed&&CollidableShapes[cs].RigidBody._vf.disableAngularSpeed){indexedfacesetAmmo.setSleepingThresholds(CollidableShapes[cs].RigidBody._vf.disableLinearSpeed,CollidableShapes[cs].RigidBody._vf.disableAngularSpeed);}
if(CollidableShapes[cs].RigidBody._vf.useGlobalGravity){indexedfacesetAmmo.setGravity(new Ammo.btVector3(CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.x,CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.y,CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.z));indexedfacesetAmmo.setFlags(0);}
else{indexedfacesetAmmo.setFlags(1);}
indexedfacesetAmmo.setCenterOfMassTransform(centerOfMass);if(UpdateRigidbody!=null){bulletWorld.removeRigidBody(rigidbodies[UpdateRigidbody]);bulletWorld.addRigidBody(indexedfacesetAmmo);indexedfacesetAmmo.geometry=indexedfaceset;rigidbodies.splice(UpdateRigidbody,1,indexedfacesetAmmo);}
else{bulletWorld.addRigidBody(indexedfacesetAmmo);indexedfacesetAmmo.geometry=indexedfaceset;rigidbodies.push(indexedfacesetAmmo);}}
break;case"indexedtriangleset":{var triangleset=CollidableShapes[cs];if(!CollidableShapes[cs].RigidBody._vf.enabled||CollidableShapes[cs].RigidBody._vf.fixed){mass=0;}
else{mass=CollidableShapes[cs].RigidBody._vf.mass;}
startTransform=new Ammo.btTransform();startTransform.setIdentity();startTransform.setBasis(CollidableShapes[cs].RigidBody._vf.inertia);startTransform.setOrigin(new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.z));if(CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.x==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.y==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.z==0&&CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.w==1){startTransform.setRotation(new Ammo.btQuaternion(0,0,1,0));}
else{CollidableShapes[cs].Transform._x3domNode._vf.rotation=CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation;startTransform.setRotation(new Ammo.btQuaternion(CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.z,CollidableShapes[cs].CollidableShape._x3domNode._vf.rotation.w));}
if(CollidableShapes[cs].RigidBody._vf.centerOfMass!=null){centerOfMass=new Ammo.btTransform(startTransform.getRotation(),new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.x+CollidableShapes[cs].RigidBody._vf.centerOfMass.x,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.y+CollidableShapes[cs].RigidBody._vf.centerOfMass.y,CollidableShapes[cs].CollidableShape._x3domNode._vf.translation.z+CollidableShapes[cs].RigidBody._vf.centerOfMass.z));}
else{centerOfMass=startTransform;}
if(CollidableShapes[cs].RigidBody._vf.inertia){if(CollidableShapes[cs].RigidBody._vf.inertia[0]+CollidableShapes[cs].RigidBody._vf.inertia[1]+CollidableShapes[cs].RigidBody._vf.inertia[2]==CollidableShapes[cs].RigidBody._vf.inertia[3]+CollidableShapes[cs].RigidBody._vf.inertia[4]+CollidableShapes[cs].RigidBody._vf.inertia[5]==CollidableShapes[cs].RigidBody._vf.inertia[6]+CollidableShapes[cs].RigidBody._vf.inertia[7]+CollidableShapes[cs].RigidBody._vf.inertia[8]==1){localInertia=new Ammo.btVector3(0,0,0);}
else{localInertia=new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.inertia[0]+CollidableShapes[cs].RigidBody._vf.inertia[1]+CollidableShapes[cs].RigidBody._vf.inertia[2],CollidableShapes[cs].RigidBody._vf.inertia[3]+CollidableShapes[cs].RigidBody._vf.inertia[4]+CollidableShapes[cs].RigidBody._vf.inertia[5],CollidableShapes[cs].RigidBody._vf.inertia[6]+CollidableShapes[cs].RigidBody._vf.inertia[7]+CollidableShapes[cs].RigidBody._vf.inertia[8]);}}
else{localInertia=new Ammo.btVector3(0,0,0);}
var convexHullShape=new Ammo.btConvexHullShape();for(var p in CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._cf.coord.node._vf.point){convexHullShape.addPoint(new Ammo.btVector3(CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._cf.coord.node._vf.point[p].x,CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._cf.coord.node._vf.point[p].y,CollidableShapes[cs].CollidableShape._x3domNode._cf.shape._x3domNode._cf.geometry.node._cf.coord.node._vf.point[p].z),true);}
var compoundShape=new Ammo.btCompoundShape();compoundShape.addChildShape(startTransform,convexHullShape);compoundShape.setMargin(CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.contactSurfaceThickness);compoundShape.createAabbTreeFromChildren();compoundShape.updateChildTransform(0,new Ammo.btTransform(new Ammo.btQuaternion(0,0,0,1),new Ammo.btVector3(0,0,0)),true);compoundShape.calculateLocalInertia(mass,localInertia);motionState=new Ammo.btDefaultMotionState(startTransform);rbInfo=new Ammo.btRigidBodyConstructionInfo(mass,motionState,compoundShape,localInertia);rbInfo.m_friction=CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.x;rbInfo.m_rollingFriction=CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.y;trianglesetAmmo=new Ammo.btRigidBody(rbInfo);if(CollidableShapes[cs].RigidBody._vf.autoDamp){trianglesetAmmo.setDamping(CollidableShapes[cs].RigidBody._vf.linearDampingFactor,CollidableShapes[cs].RigidBody._vf.angularDampingFactor);}
else{trianglesetAmmo.setDamping(0,0);}
trianglesetAmmo.setAngularVelocity(new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.angularVelocity.x,CollidableShapes[cs].RigidBody._vf.angularVelocity.y,CollidableShapes[cs].RigidBody._vf.angularVelocity.z));trianglesetAmmo.setLinearVelocity(new Ammo.btVector3(CollidableShapes[cs].RigidBody._vf.linearVelocity.x,CollidableShapes[cs].RigidBody._vf.linearVelocity.y,CollidableShapes[cs].RigidBody._vf.linearVelocity.z));if(CollidableShapes[cs].CollisionCollection._x3domNode._vf.bounce!=null){trianglesetAmmo.setRestitution(CollidableShapes[cs].CollisionCollection._x3domNode._vf.bounce);}
else{trianglesetAmmo.setRestitution(1.0);}
if(CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients!=null){trianglesetAmmo.setFriction(CollidableShapes[cs].CollisionCollection._x3domNode._vf.frictionCoefficients.y);}
else{trianglesetAmmo.setFriction(1);}
if(CollidableShapes[cs].RigidBody._vf.disableLinearSpeed&&CollidableShapes[cs].RigidBody._vf.disableAngularSpeed){trianglesetAmmo.setSleepingThresholds(CollidableShapes[cs].RigidBody._vf.disableLinearSpeed,CollidableShapes[cs].RigidBody._vf.disableAngularSpeed);}
if(CollidableShapes[cs].RigidBody._vf.useGlobalGravity){trianglesetAmmo.setGravity(new Ammo.btVector3(CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.x,CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.y,CollidableShapes[cs].RigidBodyCollection._x3domNode._vf.gravity.z));trianglesetAmmo.setFlags(0);}
else{trianglesetAmmo.setFlags(1);}
trianglesetAmmo.setCenterOfMassTransform(centerOfMass);if(UpdateRigidbody!=null){bulletWorld.removeRigidBody(rigidbodies[UpdateRigidbody]);bulletWorld.addRigidBody(trianglesetAmmo);trianglesetAmmo.geometry=triangleset;rigidbodies.splice(UpdateRigidbody,1,trianglesetAmmo);}
else{bulletWorld.addRigidBody(trianglesetAmmo);trianglesetAmmo.geometry=triangleset;rigidbodies.push(trianglesetAmmo);}}
break;}}}
CreateJoints();MakeUpdateList();};CreateJoints=function(){if(UpdateRigidbody!=null){var constraintNum=bulletWorld.getNumConstraints();for(cn=constraintNum;cn>=0;cn--){var constr=bulletWorld.getConstraint(cn);bulletWorld.removeConstraint(constr);}}
for(var js in JointShapes){if(JointShapes[js].Joint._xmlNode.nodeName){switch(JointShapes[js].Joint._xmlNode.nodeName.toLowerCase()){case"balljoint":{for(var j in rigidbodies){if(rigidbodies[j].geometry.RigidBody._DEF&&rigidbodies[j].geometry.RigidBody._DEF==JointShapes[js].Joint._cf.body1.node._DEF){var object1=rigidbodies[j];}
if(rigidbodies[j].geometry.RigidBody._DEF&&rigidbodies[j].geometry.RigidBody._DEF==JointShapes[js].Joint._cf.body2.node._DEF){var object2=rigidbodies[j];}}
if(object1&&object2){var newBallJoint=new Ammo.btPoint2PointConstraint(object1,object2,new Ammo.btVector3(JointShapes[js].Joint._vf.anchorPoint.x,JointShapes[js].Joint._vf.anchorPoint.y,JointShapes[js].Joint._vf.anchorPoint.z),new Ammo.btVector3(-JointShapes[js].Joint._vf.anchorPoint.x,-JointShapes[js].Joint._vf.anchorPoint.y,-JointShapes[js].Joint._vf.anchorPoint.z));bulletWorld.addConstraint(newBallJoint);}}
break;case"sliderjoint":{for(j=0;j<rigidbodies.length;j++){if(rigidbodies[j].geometry.RigidBody._DEF&&rigidbodies[j].geometry.RigidBody._DEF==JointShapes[js].Joint._cf.body1.node._DEF){var object1=rigidbodies[j];}
if(rigidbodies[j].geometry.RigidBody._DEF&&rigidbodies[j].geometry.RigidBody._DEF==JointShapes[js].Joint._cf.body2.node._DEF){var object2=rigidbodies[j];}}
if(object1&&object2){var newSliderJoint=new Ammo.btSliderConstraint(object1,object2,object1.getWorldTransform(),object2.getWorldTransform(),true);newSliderJoint.setFrames(object1.getWorldTransform(),object2.getWorldTransform());bulletWorld.addConstraint(newSliderJoint);}}
break;case"universaljoint":{for(j=0;j<rigidbodies.length;j++){if(rigidbodies[j].geometry.RigidBody._DEF&&rigidbodies[j].geometry.RigidBody._DEF==JointShapes[js].Joint._cf.body1.node._DEF){var object1=rigidbodies[j];}
if(rigidbodies[j].geometry.RigidBody._DEF&&rigidbodies[j].geometry.RigidBody._DEF==JointShapes[js].Joint._cf.body2.node._DEF){var object2=rigidbodies[j];}}
if(object1&&object2){var newUniversalJoint=new btUniversalConstraint(object1,object2,new Ammo.btVector3(JointShapes[js].Joint._vf.anchorPoint.x,JointShapes[js].Joint._vf.anchorPoint.y,JointShapes[js].Joint._vf.anchorPoint.z),new Ammo.btVector3(JointShapes[js].Joint._vf.axis1.x,JointShapes[js].Joint._vf.axis1.y,JointShapes[js].Joint._vf.axis1.z),new Ammo.btVector3(JointShapes[js].Joint._vf.axis2.x,JointShapes[js].Joint._vf.axis2.y,JointShapes[js].Joint._vf.axis2.z));bulletWorld.addConstraint(newUniversalJoint);}}
break;case"motorjoint":{for(j=0;j<rigidbodies.length;j++){if(rigidbodies[j].geometry.RigidBody._DEF&&rigidbodies[j].geometry.RigidBody._DEF==JointShapes[js].Joint._cf.body1.node._DEF){var object1=rigidbodies[j];rigidbodies[j].geometry.isMotor=true;rigidbodies[j].geometry.torque=new x3dom.fields.SFVec3f(JointShapes[js].Joint._vf.axis2Torque*JointShapes[js].Joint._vf.motor2Axis.x,JointShapes[js].Joint._vf.axis2Torque*JointShapes[js].Joint._vf.motor2Axis.y,JointShapes[js].Joint._vf.axis2Torque*JointShapes[js].Joint._vf.motor2Axis.z);}
if(rigidbodies[j].geometry.RigidBody._DEF&&rigidbodies[j].geometry.RigidBody._DEF==JointShapes[js].Joint._cf.body2.node._DEF){var object2=rigidbodies[j];rigidbodies[j].geometry.isMotor=true;rigidbodies[j].geometry.torque=new x3dom.fields.SFVec3f(JointShapes[js].Joint._vf.axis3Torque*JointShapes[js].Joint._vf.motor3Axis.x,JointShapes[js].Joint._vf.axis3Torque*JointShapes[js].Joint._vf.motor3Axis.y,JointShapes[js].Joint._vf.axis3Torque*JointShapes[js].Joint._vf.motor3Axis.z);}}
if(object1&&object2){var newGearJoint=new btGeneric6DofConstraint(object1,object2,object1.getWorldTransform(),object2.getWorldTransform(),true);if(JointShapes[js].Joint._vf.motor3Axis.x!=0){newGearJoint.getRotationalLimitMotor(0).m_enableMotor=true;newGearJoint.getRotationalLimitMotor(0).m_targetVelocity=JointShapes[js].Joint._vf.axis1Torque;newGearJoint.getRotationalLimitMotor(0).m_maxMotorForce=100.0;newGearJoint.getRotationalLimitMotor(0).m_loLimit=0.0;newGearJoint.getRotationalLimitMotor(0).m_hiLimit=10.0;}
else{newGearJoint.getRotationalLimitMotor(0).m_enableMotor=false;newGearJoint.getRotationalLimitMotor(0).m_targetVelocity=0;newGearJoint.getRotationalLimitMotor(0).m_maxMotorForce=0.0;newGearJoint.getRotationalLimitMotor(0).m_loLimit=0.0;newGearJoint.getRotationalLimitMotor(0).m_hiLimit=0.0;}
if(JointShapes[js].Joint._vf.motor3Axis.y!=0){newGearJoint.getRotationalLimitMotor(1).m_enableMotor=true;newGearJoint.getRotationalLimitMotor(1).m_targetVelocity=JointShapes[js].Joint._vf.axis2Torque;newGearJoint.getRotationalLimitMotor(1).m_maxMotorForce=100.0;newGearJoint.getRotationalLimitMotor(1).m_loLimit=0.0;newGearJoint.getRotationalLimitMotor(1).m_hiLimit=10.0;}
else{newGearJoint.getRotationalLimitMotor(1).m_enableMotor=false;newGearJoint.getRotationalLimitMotor(1).m_targetVelocity=0;newGearJoint.getRotationalLimitMotor(1).m_maxMotorForce=0.0;newGearJoint.getRotationalLimitMotor(1).m_loLimit=0.0;newGearJoint.getRotationalLimitMotor(1).m_hiLimit=0.0;}
if(JointShapes[js].Joint._vf.motor3Axis.z!=0){newGearJoint.getRotationalLimitMotor(2).m_enableMotor=true;newGearJoint.getRotationalLimitMotor(2).m_targetVelocity=JointShapes[js].Joint._vf.axis3Torque;newGearJoint.getRotationalLimitMotor(2).m_maxMotorForce=100.0;newGearJoint.getRotationalLimitMotor(2).m_loLimit=0.0;newGearJoint.getRotationalLimitMotor(2).m_hiLimit=10.0;}
else{newGearJoint.getRotationalLimitMotor(2).m_enableMotor=false;newGearJoint.getRotationalLimitMotor(2).m_targetVelocity=0;newGearJoint.getRotationalLimitMotor(2).m_maxMotorForce=0.0;newGearJoint.getRotationalLimitMotor(2).m_loLimit=0.0;newGearJoint.getRotationalLimitMotor(2).m_hiLimit=0.0;}
newGearJoint.enableFeedback(true);bulletWorld.addConstraint(newGearJoint,true);}}
break;case"singleaxishingejoint":{for(j=0;j<rigidbodies.length;j++){if(rigidbodies[j].geometry.RigidBody._DEF&&rigidbodies[j].geometry.RigidBody._DEF==JointShapes[js].Joint._cf.body1.node._DEF){var object1=rigidbodies[j];}
if(rigidbodies[j].geometry.RigidBody._DEF&&rigidbodies[j].geometry.RigidBody._DEF==JointShapes[js].Joint._cf.body2.node._DEF){var object2=rigidbodies[j];}}
if(object1&&object2){var newSingleHingeJoint=new btHingeConstraint(object1,object2,new Ammo.btVector3(JointShapes[js].Joint._vf.anchorPoint.x,JointShapes[js].Joint._vf.anchorPoint.y,JointShapes[js].Joint._vf.anchorPoint.z),new Ammo.btVector3(-JointShapes[js].Joint._vf.anchorPoint.x,-JointShapes[js].Joint._vf.anchorPoint.y,-JointShapes[js].Joint._vf.anchorPoint.z),new Ammo.btVector3(JointShapes[js].Joint._vf.axis.x,JointShapes[js].Joint._vf.axis.y,JointShapes[js].Joint._vf.axis.z),new Ammo.btVector3(JointShapes[js].Joint._vf.axis.x,JointShapes[js].Joint._vf.axis.y,JointShapes[js].Joint._vf.axis.z),false);newSingleHingeJoint.setLimit(JointShapes[js].Joint._vf.minAngle,JointShapes[js].Joint._vf.maxAngle,0.9,0.3,1.0);bulletWorld.addConstraint(newSingleHingeJoint);}}
break;case"doubleaxishingejoint":{for(j=0;j<rigidbodies.length;j++){if(rigidbodies[j].geometry.RigidBody._DEF&&rigidbodies[j].geometry.RigidBody._DEF==JointShapes[js].Joint._cf.body1.node._DEF){var object1=rigidbodies[j];}
if(rigidbodies[j].geometry.RigidBody._DEF&&rigidbodies[j].geometry.RigidBody._DEF==JointShapes[js].Joint._cf.body2.node._DEF){var object2=rigidbodies[j];}}
if(object1&&object2){var newDoubleHingeJoint=new btHingeConstraint(object1,object2,new Ammo.btVector3(JointShapes[js].Joint._vf.anchorPoint.x,JointShapes[js].Joint._vf.anchorPoint.y,JointShapes[js].Joint._vf.anchorPoint.z),new Ammo.btVector3(-JointShapes[js].Joint._vf.anchorPoint.x,-JointShapes[js].Joint._vf.anchorPoint.y,-JointShapes[js].Joint._vf.anchorPoint.z),new Ammo.btVector3(JointShapes[js].Joint._vf.axis1.x,JointShapes[js].Joint._vf.axis1.y,JointShapes[js].Joint._vf.axis1.z),new Ammo.btVector3(JointShapes[js].Joint._vf.axis2.x,JointShapes[js].Joint._vf.axis2.y,JointShapes[js].Joint._vf.axis2.z),false);newDoubleHingeJoint.setLimit(JointShapes[js].Joint._vf.minAngle1,JointShapes[js].Joint._vf.maxAngle1,0.9,0.3,1.0);bulletWorld.addConstraint(newDoubleHingeJoint,true);}}
break;}}}};MakeUpdateList=function(){for(var r=0;r<rigidbodies.length;r++){if(!drag&&rigidbodies[r].geometry.createRigid){rigidbodies[r].geometry.createRigid=false;}}
for(var r=0;r<JointShapes.length;r++){if(!drag&&JointShapes[r].createJoint){JointShapes[r].createJoint=false;}}
building_constraints=false;};CreateInteractiveObjects=function(){if(x3dWorld){x3dWorld.parentElement.addEventListener('mouseup',MouseControlStop,false);x3dWorld.parentElement.addEventListener('mousedown',MouseControlStart,false);x3dWorld.parentElement.addEventListener('mousemove',MouseControlMove,false);for(var t in interactiveTransforms){for(var cs in CollidableShapes){if(CollidableShapes[cs].Transform._x3domNode._DEF==interactiveTransforms[t]._x3domNode._DEF){if(!CollidableShapes[cs].RigidBody._vf.fixed){interactiveTransforms[t].addEventListener('mousedown',MouseControlStart,false);interactiveTransforms[t].addEventListener('mousemove',MouseControlMove,false);new x3dom.Moveable(x3dWorld.parentElement,interactiveTransforms[t],null,0);}}}}}};UpdateConstraints=function(){if(drag&&building_constraints==false){for(var r=0;r<rigidbodies.length;r++){if(rigidbodies[r].geometry.Transform){if(rigidbodies[r].geometry.Transform._x3domNode._DEF==mousePickObject._DEF){UpdateRigidbody=r;}}}
CreateRigidbodies();}
else{clearInterval(intervalVar);CreateRigidbodies();UpdateRigidbody=null;mousePickObject=null;}};MouseControlMove=function(e){if(e.hitPnt){mousePos=new x3dom.fields.SFVec3f.parse(e.hitPnt);}};MouseControlStart=function(e){if(!drag){drag=true;if(e.hitObject){for(var pn in e.hitObject._x3domNode._parentNodes){if(x3dom.isa(e.hitObject._x3domNode._parentNodes[pn],x3dom.nodeTypes.Transform)){mousePickObject=e.hitObject._x3domNode._parentNodes[pn];}}}
if(mousePickObject){for(var r in rigidbodies){if(rigidbodies[r]&&rigidbodies[r].geometry.Transform._x3domNode._DEF==mousePickObject._DEF){rigidbodies[r].activate(false);rigidbodies[r].geometry.createRigid=true;intervalVar=setInterval(UpdateConstraints,1);}}}
else{drag=false;mousePickObject=null;}}};MouseControlStop=function(e){if(drag){drag=false;}};updateRigidbodies=function(){bulletWorld.stepSimulation(1/60,100);var r,transform=new Ammo.btTransform(),origin=new Ammo.btVector3(),rotation=new Ammo.btQuaternion();for(r=0;r<rigidbodies.length;r++){if(!rigidbodies[r].geometry.createRigid){rigidbodies[r].getMotionState().getWorldTransform(transform);origin=transform.getOrigin();rigidbodies[r].geometry.CollidableShape._x3domNode._vf.translation.x=origin.x();rigidbodies[r].geometry.CollidableShape._x3domNode._vf.translation.y=origin.y();rigidbodies[r].geometry.CollidableShape._x3domNode._vf.translation.z=origin.z();rotation=transform.getRotation();rigidbodies[r].geometry.CollidableShape._x3domNode._vf.rotation.x=rotation.x();rigidbodies[r].geometry.CollidableShape._x3domNode._vf.rotation.y=rotation.y();rigidbodies[r].geometry.CollidableShape._x3domNode._vf.rotation.z=rotation.z();rigidbodies[r].geometry.CollidableShape._x3domNode._vf.rotation.w=rotation.w();}
else{if(mousePos){rigidbodies[r].getMotionState().getWorldTransform(transform);transform.setOrigin(new Ammo.btVector3(mousePos.x,mousePos.y,mousePos.z));origin=transform.getOrigin();rigidbodies[r].geometry.CollidableShape._x3domNode._vf.translation.x=origin.x();rigidbodies[r].geometry.CollidableShape._x3domNode._vf.translation.y=origin.y();rigidbodies[r].geometry.CollidableShape._x3domNode._vf.translation.z=origin.z();}}
for(var x in x3dWorld.children){if(x3dWorld.children[x].nodeName&&x3dWorld.children[x].nodeName.toLowerCase()=="group"){for(var c in x3dWorld.children[x].childNodes){if(x3dWorld.children[x].childNodes.hasOwnProperty(c)&&x3dWorld.children[x].childNodes[c]!=null){UpdateTransforms(x3dWorld.children[x].childNodes[c],rigidbodies[r]);}}}
else{UpdateTransforms(x3dWorld.children[x],rigidbodies[r]);}}
if(rigidbodies[r].geometry.isMotor==true){rigidbodies[r].applyTorque(new Ammo.btVector3(rigidbodies[r].geometry.torque.x,rigidbodies[r].geometry.torque.y,rigidbodies[r].geometry.torque.z));}
if(rigidbodies[r].geometry.RigidBody._vf.torques.length>0){for(var num in rigidbodies[r].geometry.RigidBody._vf.torques){rigidbodies[r].applyTorque(new Ammo.btVector3(rigidbodies[r].geometry.RigidBody._vf.torques[num].x,rigidbodies[r].geometry.RigidBody._vf.torques[num].y,rigidbodies[r].geometry.RigidBody._vf.torques[num].z));}}}};function UpdateTransforms(a,b){if(x3dom.isa(a._x3domNode,x3dom.nodeTypes.Transform)){if(b.geometry.isInline){if(a==b.geometry.inlineExternalTransform){if(b.geometry.inlineInternalTransform){b.geometry.inlineInternalTransform.translation=b.geometry.CollidableShape._x3domNode._vf.translation;b.geometry.inlineInternalTransform.rotation=b.geometry.CollidableShape._x3domNode._vf.rotation;}}}
else{if(b.geometry.Transform){if(b.geometry.Transform._x3domNode._DEF==a._x3domNode._DEF){a.translation=b.geometry.CollidableShape._x3domNode._vf.translation;a.rotation=b.geometry.CollidableShape._x3domNode._vf.rotation;}}}}}
function InlineObjectList(a,b){for(var x in a.children){CreateX3DCollidableShape(a.children[x],b);}
b.translation=new x3dom.fields.SFVec3f(0,0,0);}
main=function main(){updateRigidbodies();window.requestAnimFrame(main);if(document.readyState==="complete"&&!inlineLoad&&inline_x3dList.length){for(var x in inline_x3dList){if(inline_x3dList[x]._x3domNode._cf.children.nodes[0]._xmlNode._x3domNode._childNodes[0]){inlineLoad=true;InlineObjectList(inline_x3dList[x]._x3domNode._cf.children.nodes[0]._xmlNode._x3domNode._childNodes[0]._xmlNode,inline_x3dList[x]);CreateRigidbodies();}}}};window.onload=function(){ParseX3DElement();initScene();requestAnimFrame(main);if(!inline_x3dList.length){CreateRigidbodies();}
CreateInteractiveObjects();}})();window['requestAnimFrame']=(function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback,element){window.setTimeout(callback,1000/60);};})();x3dom.registerNodeType("RigidBodyCollection","RigidBodyPhysics",defineClass(x3dom.nodeTypes.X3DChildNode,function(ctx){x3dom.nodeTypes.RigidBodyCollection.superClass.call(this,ctx);this.addField_SFBool(ctx,'autoDisable',false);this.addField_SFFloat(ctx,'constantForceMix',0.0001);this.addField_SFFloat(ctx,'contactSurfaceThickness',0);this.addField_SFFloat(ctx,'disableAngularSpeed',0);this.addField_SFFloat(ctx,'disableLinearSpeed',0);this.addField_SFFloat(ctx,'disableTime',0);this.addField_SFBool(ctx,'enabled',true);this.addField_SFFloat(ctx,'errorCorrection',0.8);this.addField_SFVec3f(ctx,'gravity',0,-9.8,0);this.addField_SFInt32(ctx,'iterations',1);this.addField_SFFloat(ctx,'maxCorrectionSpeed',-1);this.addField_SFBool(ctx,'preferAccuracy',false);this.addField_MFNode('bodies',x3dom.nodeTypes.RigidBody);this.addField_MFNode('joints',x3dom.nodeTypes.X3DRigidJointNode);},{nodeChanged:function(){if(!this._cf.joints.nodes){for(var x in this._xmlNode.children){if(x3dom.isa(this._xmlNode.children[x]._x3domNode,x3dom.nodeTypes.X3DRigidJointNode)){this._cf.joints=this._xmlNode.children[x];}}}
if(!this._cf.bodies.nodes){for(var x in this._xmlNode.children){if(x3dom.isa(this._xmlNode.children[x]._x3domNode,x3dom.nodeTypes.RigidBody)){this._cf.bodies=this._xmlNode.children[x];}}}}}));x3dom.registerNodeType("RigidBody","RigidBodyPhysics",defineClass(x3dom.nodeTypes.X3DNode,function(ctx){x3dom.nodeTypes.RigidBody.superClass.call(this,ctx);this.addField_SFFloat(ctx,'angularDampingFactor',0.001);this.addField_SFVec3f(ctx,'angularVelocity',0,0,0);this.addField_SFBool(ctx,'autoDamp',false);this.addField_SFBool(ctx,'autoDisable',false);this.addField_SFVec3f(ctx,'centerOfMass',0,0,0);this.addField_SFFloat(ctx,'disableAngularSpeed',0);this.addField_SFFloat(ctx,'disableLinearSpeed',0);this.addField_SFFloat(ctx,'disableTime',0);this.addField_SFBool(ctx,'enabled',true);this.addField_SFVec3f(ctx,'finiteRotationAxis',0,0,0);this.addField_SFBool(ctx,'fixed',false);this.addField_MFVec3f(ctx,'forces',[]);this.addField_MFFloat(ctx,'inertia',[1,0,0,0,1,0,0,0,1]);this.addField_SFFloat(ctx,'linearDampingFactor',0.001);this.addField_SFVec3f(ctx,'linearVelocity',0,0,0);this.addField_SFFloat(ctx,'mass',1);this.addField_SFRotation(ctx,'orientation',0,0,1,0);this.addField_SFVec3f(ctx,'position',0,0,0);this.addField_MFVec3f(ctx,'torques',[]);this.addField_SFBool(ctx,'useFiniteRotation',false);this.addField_SFBool(ctx,'useGlobalGravity',true);this.addField_MFNode('massDensityModel',x3dom.nodeTypes.Shape);this.addField_MFNode('geometry',x3dom.nodeTypes.X3DNBodyCollidableNode);},{nodeChanged:function(){if(!this._cf.geometry.nodes){for(var x in this._xmlNode.children){if(x3dom.isa(this._xmlNode.children[x]._x3domNode,x3dom.nodeTypes.X3DNBodyCollidableNode)){this._cf.geometry=this._xmlNode.children[x];}}}
if(!this._cf.massDensityModel.nodes){for(var x in this._xmlNode.children){if(x3dom.isa(this._xmlNode.children[x]._x3domNode,x3dom.nodeTypes.Shape)){this._cf.massDensityModel=this._xmlNode.children[x];}}}}}));x3dom.registerNodeType("X3DNBodyCollidableNode","RigidBodyPhysics",defineClass(x3dom.nodeTypes.X3DBoundedObject,function(ctx){x3dom.nodeTypes.X3DNBodyCollidableNode.superClass.call(this,ctx);this.addField_SFBool(ctx,'enabled',true);this.addField_SFRotation(ctx,'rotation',0,0,1,0);this.addField_SFVec3f(ctx,'translation',0,0,0);},{nodeChanged:function()
{}}));x3dom.registerNodeType("CollidableShape","RigidBodyPhysics",defineClass(x3dom.nodeTypes.X3DNBodyCollidableNode,function(ctx){x3dom.nodeTypes.CollidableShape.superClass.call(this,ctx);this.addField_SFNode('transform',x3dom.nodeTypes.Transform);this.addField_SFNode('shape',x3dom.nodeTypes.Shape);},{nodeChanged:function(){if(!this._cf.transform.node){for(var x in this._xmlNode.children){if(x3dom.isa(this._xmlNode.children[x]._x3domNode,x3dom.nodeTypes.Transform)){this._cf.transform=this._xmlNode.children[x];}}}
if(!this._cf.shape.node){for(var x in this._xmlNode.children){if(x3dom.isa(this._xmlNode.children[x]._x3domNode,x3dom.nodeTypes.Shape)){this._cf.shape=this._xmlNode.children[x];}}}}}));x3dom.registerNodeType("CollisionCollection","RigidBodyPhysics",defineClass(x3dom.nodeTypes.X3DChildNode,function(ctx){x3dom.nodeTypes.CollisionCollection.superClass.call(this,ctx);this.addField_SFFloat(ctx,'bounce',0);this.addField_SFBool(ctx,'enabled',true);this.addField_SFVec2f(ctx,'frictionCoefficients',0,0);this.addField_SFFloat(ctx,'minBounceSpeed',0.1);this.addField_SFVec2f(ctx,'slipFactors',0,0);this.addField_SFFloat(ctx,'softnessConstantForceMix',0.0001);this.addField_SFFloat(ctx,'softnessErrorCorrection',0.8);this.addField_SFVec2f(ctx,'surfaceSpeed',0,0);this.addField_MFNode('collidables',x3dom.nodeTypes.X3DNBodyCollidableNode);},{nodeChanged:function(){if(!this._cf.collidables.nodes){for(var x in this._xmlNode.children){if(x3dom.isa(this._xmlNode.children[x]._x3domNode,x3dom.nodeTypes.X3DNBodyCollidableNode)){this._cf.collidables=this._xmlNode.children[x];}}}}}));x3dom.registerNodeType("CollisionSensor","RigidBodyPhysics",defineClass(x3dom.nodeTypes.X3DSensorNode,function(ctx){x3dom.nodeTypes.CollisionSensor.superClass.call(this,ctx);this.addField_SFNode('collider',x3dom.nodeTypes.CollisionCollection);},{nodeChanged:function(){if(!this._cf.collider.node){for(var x in this._xmlNode.children){if(x3dom.isa(this._xmlNode.children[x]._x3domNode,x3dom.nodeTypes.CollisionCollection)){this._cf.collider=this._xmlNode.children[x];}}}}}));x3dom.registerNodeType("X3DRigidJointNode","RigidBodyPhysics",defineClass(x3dom.nodeTypes.X3DNode,function(ctx){x3dom.nodeTypes.X3DRigidJointNode.superClass.call(this,ctx);this.addField_SFString(ctx,'forceOutput',"");this.addField_SFNode('body1',x3dom.nodeTypes.RigidBody);this.addField_SFNode('body2',x3dom.nodeTypes.RigidBody);},{nodeChanged:function(){if(!this._cf.body1.node){for(var x in this._xmlNode.children){if(x3dom.isa(this._xmlNode.children[x]._x3domNode,x3dom.nodeTypes.RigidBody)){this._cf.body1=this._xmlNode.children[x];}}}
if(!this._cf.body2.node){for(var x in this._xmlNode.children){if(x3dom.isa(this._xmlNode.children[x]._x3domNode,x3dom.nodeTypes.RigidBody)){this._cf.body2=this._xmlNode.children[x];}}}}}));x3dom.registerNodeType("BallJoint","RigidBodyPhysics",defineClass(x3dom.nodeTypes.X3DRigidJointNode,function(ctx){x3dom.nodeTypes.BallJoint.superClass.call(this,ctx);this.addField_SFVec3f(ctx,'anchorPoint',0,0,0);},{nodeChanged:function(){}}));x3dom.registerNodeType("MotorJoint","RigidBodyPhysics",defineClass(x3dom.nodeTypes.X3DRigidJointNode,function(ctx){x3dom.nodeTypes.MotorJoint.superClass.call(this,ctx);this.addField_SFFloat(ctx,'axis1Angle',0);this.addField_SFFloat(ctx,'axis1Torque',0);this.addField_SFFloat(ctx,'axis2Angle',0);this.addField_SFFloat(ctx,'axis2Torque',0);this.addField_SFFloat(ctx,'axis3Angle',0);this.addField_SFFloat(ctx,'axis3Torque',0);this.addField_SFInt32(ctx,'enabledAxes',1);this.addField_SFVec3f(ctx,'motor1Axis',0,0,0);this.addField_SFVec3f(ctx,'motor2Axis',0,0,0);this.addField_SFVec3f(ctx,'motor3Axis',0,0,0);this.addField_SFFloat(ctx,'stop1Bounce',0);this.addField_SFFloat(ctx,'stop1ErrorCorrection',0.8);this.addField_SFFloat(ctx,'stop2Bounce',0);this.addField_SFFloat(ctx,'stop2ErrorCorrection',0.8);this.addField_SFFloat(ctx,'stop3Bounce',0);this.addField_SFFloat(ctx,'stop3ErrorCorrection',0.8);},{nodeChanged:function(){}}));x3dom.registerNodeType("SliderJoint","RigidBodyPhysics",defineClass(x3dom.nodeTypes.X3DRigidJointNode,function(ctx){x3dom.nodeTypes.SliderJoint.superClass.call(this,ctx);this.addField_SFVec3f(ctx,'axis',0,1,0);this.addField_SFFloat(ctx,'maxSeparation',1);this.addField_SFFloat(ctx,'minSeparation',0);this.addField_SFFloat(ctx,'stopBounce',0);this.addField_SFFloat(ctx,'stopErrorCorrection',1);},{nodeChanged:function(){}}));x3dom.registerNodeType("UniversalJoint","RigidBodyPhysics",defineClass(x3dom.nodeTypes.X3DRigidJointNode,function(ctx){x3dom.nodeTypes.UniversalJoint.superClass.call(this,ctx);this.addField_SFVec3f(ctx,'anchorPoint',0,0,0);this.addField_SFVec3f(ctx,'axis1',0,0,0);this.addField_SFVec3f(ctx,'axis2',0,0,0);this.addField_SFFloat(ctx,'stop1Bounce',0);this.addField_SFFloat(ctx,'stop1ErrorCorrection',0.8);this.addField_SFFloat(ctx,'stop2Bounce',0);this.addField_SFFloat(ctx,'stop2ErrorCorrection',0.8);},{nodeChanged:function(){}}));x3dom.registerNodeType("SingleAxisHingeJoint","RigidBodyPhysics",defineClass(x3dom.nodeTypes.X3DRigidJointNode,function(ctx){x3dom.nodeTypes.SingleAxisHingeJoint.superClass.call(this,ctx);this.addField_SFVec3f(ctx,'anchorPoint',0,0,0);this.addField_SFVec3f(ctx,'axis',0,0,0);this.addField_SFFloat(ctx,'maxAngle',90);this.addField_SFFloat(ctx,'minAngle',-90);this.addField_SFFloat(ctx,'stopBounce',0);this.addField_SFFloat(ctx,'stopErrorCorrection',0.8);},{nodeChanged:function(){}}));x3dom.registerNodeType("DoubleAxisHingeJoint","RigidBodyPhysics",defineClass(x3dom.nodeTypes.X3DRigidJointNode,function(ctx){x3dom.nodeTypes.DoubleAxisHingeJoint.superClass.call(this,ctx);this.addField_SFVec3f(ctx,'anchorPoint',0,0,0);this.addField_SFVec3f(ctx,'axis1',0,0,0);this.addField_SFVec3f(ctx,'axis2',0,0,0);this.addField_SFFloat(ctx,'desiredAngularVelocity1',0);this.addField_SFFloat(ctx,'desiredAngularVelocity2',0);this.addField_SFFloat(ctx,'maxAngle1',90);this.addField_SFFloat(ctx,'minAngle1',-90);this.addField_SFFloat(ctx,'maxTorque1',0);this.addField_SFFloat(ctx,'maxTorque2',0);this.addField_SFFloat(ctx,'stopBounce1',0);this.addField_SFFloat(ctx,'stopConstantForceMix1',0.001);this.addField_SFFloat(ctx,'stopErrorCorrection1',0.8);this.addField_SFFloat(ctx,'suspensionErrorCorrection',0.8);this.addField_SFFloat(ctx,'suspensionForce',0);},{nodeChanged:function(){}}));
\ No newline at end of file
/** X3DOM Runtime, http://www.x3dom.org/ 1.7.0 - f33e92d248a2f25d52fa63ede8ffee570c8a6304 - Wed Jun 17 09:49:25 2015 +0200 */
x3dom.registerNodeType("X3DVolumeDataNode","VolumeRendering",defineClass(x3dom.nodeTypes.X3DShapeNode,function(ctx){x3dom.nodeTypes.X3DVolumeDataNode.superClass.call(this,ctx);this.addField_SFVec3f(ctx,'dimensions',1,1,1);this.addField_SFNode('voxels',x3dom.nodeTypes.Texture);this._textureID=0;this._first=true;this._styleList=[];this.surfaceNormalsNeeded=false;this.normalTextureProvided=false;this.fragmentPreamble="#ifdef GL_FRAGMENT_PRECISION_HIGH\n"+" precision highp float;\n"+"#else\n"+" precision mediump float;\n"+"#endif\n\n";},{getTextureSize:function(texture){var size={w:0,h:0,valid:false};var texBag=this._webgl?this._webgl.texture:null;var t,n=(texture&&texBag)?texBag.length:0;for(t=0;t<n;t++){if(texture==texBag[t].node&&texBag[t].texture){size.w=texBag[t].texture.width;size.h=texBag[t].texture.height;if(size.w&&size.h){size.valid=true;}
break;}}
return size;},vertexShaderText:function(){var shader="attribute vec3 position;\n"+"uniform vec3 dimensions;\n"+"uniform mat4 modelViewProjectionMatrix;\n"+"varying vec4 vertexPosition;\n"+"varying vec4 pos;\n";if(x3dom.nodeTypes.X3DLightNode.lightID>0){shader+="uniform mat4 modelViewMatrix;\n"+"varying vec4 position_eye;\n";}
shader+="\n"+"void main()\n"+"{\n"+" vertexPosition = modelViewProjectionMatrix * vec4(position, 1.0);\n";if(x3dom.nodeTypes.X3DLightNode.lightID>0){shader+=" position_eye = modelViewMatrix * vec4(position, 1.0);\n";}
shader+=" pos = vec4((position/dimensions)+0.5, 1.0);\n"+" gl_Position = vertexPosition;\n"+"}";return shader;},defaultUniformsShaderText:function(numberOfSlices,slicesOverX,slicesOverY){var uniformsText="uniform sampler2D uVolData;\n"+"uniform vec3 dimensions;\n"+"uniform vec3 offset;\n"+"uniform mat4 modelViewMatrix;\n"+"uniform mat4 modelViewMatrixInverse;\n"+"varying vec4 vertexPosition;\n"+"varying vec4 pos;\n";if(x3dom.nodeTypes.X3DLightNode.lightID>0){uniformsText+="varying vec4 position_eye;\n";}
for(var l=0;l<x3dom.nodeTypes.X3DLightNode.lightID;l++){uniformsText+="uniform float light"+l+"_On;\n"+"uniform float light"+l+"_Type;\n"+"uniform vec3 light"+l+"_Location;\n"+"uniform vec3 light"+l+"_Direction;\n"+"uniform vec3 light"+l+"_Color;\n"+"uniform vec3 light"+l+"_Attenuation;\n"+"uniform float light"+l+"_Radius;\n"+"uniform float light"+l+"_Intensity;\n"+"uniform float light"+l+"_AmbientIntensity;\n"+"uniform float light"+l+"_BeamWidth;\n"+"uniform float light"+l+"_CutOffAngle;\n"+"uniform float light"+l+"_ShadowIntensity;\n";}
uniformsText+="const float Steps = 60.0;\n"+"const float numberOfSlices = "+numberOfSlices.toPrecision(5)+";\n"+"const float slicesOverX = "+slicesOverX.toPrecision(5)+";\n"+"const float slicesOverY = "+slicesOverY.toPrecision(5)+";\n";return uniformsText;},texture3DFunctionShaderText:"vec4 cTexture3D(sampler2D vol, vec3 volpos, float nS, float nX, float nY)\n"+"{\n"+" float s1,s2;\n"+" float dx1,dy1;\n"+" float dx2,dy2;\n"+" vec2 texpos1,texpos2;\n"+" s1 = floor(volpos.z*nS);\n"+" s2 = s1+1.0;\n"+" dx1 = fract(s1/nX);\n"+" dy1 = floor(s1/nY)/nY;\n"+" dx2 = fract(s2/nX);\n"+" dy2 = floor(s2/nY)/nY;\n"+" texpos1.x = dx1+(volpos.x/nX);\n"+" texpos1.y = dy1+(volpos.y/nY);\n"+" texpos2.x = dx2+(volpos.x/nX);\n"+" texpos2.y = dy2+(volpos.y/nY);\n"+" return mix( texture2D(vol,texpos1), texture2D(vol,texpos2), (volpos.z*nS)-s1);\n"+"}\n"+"\n",normalFunctionShaderText:function(){if(this.surfaceNormalsNeeded){return"vec4 getNormalFromTexture(sampler2D sampler, vec3 pos, float nS, float nX, float nY) {\n"+" vec4 n = (2.0*cTexture3D(sampler, pos, nS, nX, nY)-1.0);\n"+" return vec4(normalize(n.xyz), length(n.xyz));\n"+"}\n"+"\n"+"vec4 getNormalOnTheFly(sampler2D sampler, vec3 voxPos, float nS, float nX, float nY){\n"+" float v0 = cTexture3D(sampler, voxPos + vec3(offset.x, 0, 0), nS, nX, nY).r;\n"+" float v1 = cTexture3D(sampler, voxPos - vec3(offset.x, 0, 0), nS, nX, nY).r;\n"+" float v2 = cTexture3D(sampler, voxPos + vec3(0, offset.y, 0), nS, nX, nY).r;\n"+" float v3 = cTexture3D(sampler, voxPos - vec3(0, offset.y, 0), nS, nX, nY).r;\n"+" float v4 = cTexture3D(sampler, voxPos + vec3(0, 0, offset.z), nS, nX, nY).r;\n"+" float v5 = cTexture3D(sampler, voxPos - vec3(0, 0, offset.z), nS, nX, nY).r;\n"+" vec3 grad = vec3(v0-v1, v2-v3, v4-v5)*0.5;\n"+" return vec4(normalize(grad), length(grad));\n"+"}\n"+"\n";}else{return"";}},defaultLoopFragmentShaderText:function(inlineShaderText,inlineLightAssigment,initializeValues){initializeValues=typeof initializeValues!=='undefined'?initializeValues:"";var shaderLoop="void main()\n"+"{\n"+" bool out_box = all(bvec2(any(greaterThan(pos.xyz, vec3(1.0))), any(lessThan(pos.xyz, vec3(0.0)))));\n"+" if(out_box) discard;\n"+" vec3 cam_pos = vec3(modelViewMatrixInverse[3][0], modelViewMatrixInverse[3][1], modelViewMatrixInverse[3][2]);\n"+" vec3 dir = normalize(pos.xyz-(cam_pos/dimensions+0.5));\n"+" vec3 ray_pos = pos.xyz;\n"+" vec4 accum = vec4(0.0, 0.0, 0.0, 0.0);\n"+" vec4 sample = vec4(0.0, 0.0, 0.0, 0.0);\n"+" vec4 value = vec4(0.0, 0.0, 0.0, 0.0);\n"+" float cont = 0.0;\n"+" vec3 step_size = dir/Steps;\n";if(x3dom.nodeTypes.X3DLightNode.lightID>0){shaderLoop+=" vec3 ambient = vec3(0.0, 0.0, 0.0);\n"+" vec3 diffuse = vec3(0.0, 0.0, 0.0);\n"+" vec3 specular = vec3(0.0, 0.0, 0.0);\n"+" vec4 step_eye = modelViewMatrix * vec4(step_size, 0.0);\n"+" vec4 positionE = position_eye;\n"+" float lightFactor = 1.0;\n";}else{shaderLoop+=" float lightFactor = 1.2;\n";}
shaderLoop+=initializeValues+" float opacityFactor = 10.0;\n"+" float t_near;\n"+" float t_far;\n"+" for(float i = 0.0; i < Steps; i+=1.0)\n"+" {\n"+" value = cTexture3D(uVolData, ray_pos, numberOfSlices, slicesOverX, slicesOverY);\n"+" value = value.rgbr;\n";if(this.surfaceNormalsNeeded){if(this.normalTextureProvided){shaderLoop+=" vec4 gradEye = getNormalFromTexture(uSurfaceNormals, ray_pos, numberOfSlices, slicesOverX, slicesOverY);\n";}else{shaderLoop+=" vec4 gradEye = getNormalOnTheFly(uVolData, ray_pos, numberOfSlices, slicesOverX, slicesOverY);\n";}
shaderLoop+=" vec4 grad = vec4((modelViewMatrix * vec4(gradEye.xyz, 0.0)).xyz, gradEye.a);\n";}
shaderLoop+=inlineShaderText;if(x3dom.nodeTypes.X3DLightNode.lightID>0){shaderLoop+=inlineLightAssigment;}
shaderLoop+=" sample.a = value.a * opacityFactor * (1.0/Steps);\n"+" sample.rgb = value.rgb * sample.a * lightFactor;\n"+" accum.rgb += (1.0 - accum.a) * sample.rgb;\n"+" accum.a += (1.0 - accum.a) * sample.a;\n"+" ray_pos.xyz += step_size;\n";if(x3dom.nodeTypes.X3DLightNode.lightID>0){shaderLoop+=" positionE += step_eye;\n";}
shaderLoop+=" if(accum.a >= 1.0 || ray_pos.x < 0.0 || ray_pos.y < 0.0 || ray_pos.z < 0.0 || ray_pos.x > 1.0 || ray_pos.y > 1.0 || ray_pos.z > 1.0)\n"+" break;\n"+" }\n"+" gl_FragColor = accum;\n"+"}";return shaderLoop;}}));x3dom.registerNodeType("X3DVolumeRenderStyleNode","VolumeRendering",defineClass(x3dom.nodeTypes.X3DNode,function(ctx){x3dom.nodeTypes.X3DVolumeRenderStyleNode.superClass.call(this,ctx);this.addField_SFBool(ctx,'enabled',true);this._styleID=0;this._first=false;this._volumeDataParent=null;},{nodeChanged:function(){if(!this._styleID){this._styleID=++x3dom.nodeTypes.X3DVolumeRenderStyleNode.styleID;}},updateProperties:function(volumeData){if(this._cf.renderStyle){if(this._cf.renderStyle.nodes){for(var i=0;i<this._cf.renderStyle.nodes.length;i++){if(this._cf.renderStyle.nodes[i].updateProperties!=undefined){this._cf.renderStyle.nodes[i].updateProperties(volumeData);}}}else if(this._cf.renderStyle.node){this._cf.renderStyle.node.updateProperties(volumeData);}}
this._volumeDataParent=volumeData;if(this._volumeDataParent._styleList.indexOf(this.typeName())!=-1){this._first=false;}else{this._first=true;this._volumeDataParent._styleList.push(this.typeName());}},initializeValues:function(){return"";},styleUniformsShaderText:function(){return"";},styleShaderText:function(){return"";},inlineStyleShaderText:function(){return"";},lightAssigment:function(){var shaderText="";for(var l=0;l<x3dom.nodeTypes.X3DLightNode.lightID;l++){shaderText+=" lighting(light"+l+"_Type, "+"light"+l+"_Location, "+"light"+l+"_Direction, "+"light"+l+"_Color, "+"light"+l+"_Attenuation, "+"light"+l+"_Radius, "+"light"+l+"_Intensity, "+"light"+l+"_AmbientIntensity, "+"light"+l+"_BeamWidth, "+"light"+l+"_CutOffAngle, "+"grad.xyz, positionE.xyz, ambient, diffuse, specular);\n";}
shaderText+=" value.rgb = ambient*value.rgb + diffuse*value.rgb + specular;\n";return shaderText;},lightEquationShaderText:function(){if(x3dom.nodeTypes.X3DLightNode.lightID>0){return"void lighting(in float lType, in vec3 lLocation, in vec3 lDirection, in vec3 lColor, in vec3 lAttenuation, "+"in float lRadius, in float lIntensity, in float lAmbientIntensity, in float lBeamWidth, "+"in float lCutOffAngle, in vec3 N, in vec3 V, inout vec3 ambient, inout vec3 diffuse, "+"inout vec3 specular)\n"+"{\n"+" vec3 L;\n"+" float spot = 1.0, attentuation = 0.0;\n"+" if(lType == 0.0) {\n"+" L = -normalize(lDirection);\n"+" V = normalize(V);\n"+" attentuation = 1.0;\n"+" } else{\n"+" L = (lLocation - (-V));\n"+" float d = length(L);\n"+" L = normalize(L);\n"+" V = normalize(V);\n"+" if(lRadius == 0.0 || d <= lRadius) {\n"+" attentuation = 1.0 / max(lAttenuation.x + lAttenuation.y * d + lAttenuation.z * (d * d), 1.0);\n"+" }\n"+" if(lType == 2.0) {\n"+" float spotAngle = acos(max(0.0, dot(-L, normalize(lDirection))));\n"+" if(spotAngle >= lCutOffAngle) spot = 0.0;\n"+" else if(spotAngle <= lBeamWidth) spot = 1.0;\n"+" else spot = (spotAngle - lCutOffAngle ) / (lBeamWidth - lCutOffAngle);\n"+" }\n"+" }\n"+" vec3 H = normalize( L + V );\n"+" float NdotL = max(0.0, dot(L, N));\n"+" float NdotH = max(0.0, dot(H, N));\n"+" float ambientFactor = lAmbientIntensity;\n"+" float diffuseFactor = lIntensity * NdotL;\n"+" float specularFactor = lIntensity * pow(NdotH,128.0);\n"+" ambient += lColor * ambientFactor * attentuation * spot;\n"+" diffuse += lColor * diffuseFactor * attentuation * spot;\n"+" specular += lColor * specularFactor * attentuation * spot;\n"+"}\n"+"\n";}else{return"";}}}));x3dom.nodeTypes.X3DVolumeRenderStyleNode.styleID=0;x3dom.registerNodeType("X3DComposableVolumeRenderStyleNode","VolumeRendering",defineClass(x3dom.nodeTypes.X3DVolumeRenderStyleNode,function(ctx){x3dom.nodeTypes.X3DComposableVolumeRenderStyleNode.superClass.call(this,ctx);this.addField_SFNode('surfaceNormals',x3dom.nodeTypes.Texture);},{}));x3dom.registerNodeType("BlendedVolumeStyle","VolumeRendering",defineClass(x3dom.nodeTypes.X3DComposableVolumeRenderStyleNode,function(ctx){x3dom.nodeTypes.BlendedVolumeStyle.superClass.call(this,ctx);this.addField_SFNode('renderStyle',x3dom.nodeTypes.X3DComposableVolumeRenderStyleNode);this.addField_SFNode('voxels',x3dom.nodeTypes.X3DVolumeDataNode);this.addField_SFFloat(ctx,'weightConstant1',0.5);this.addField_SFFloat(ctx,'weightConstant2',0.5);this.addField_SFString(ctx,'weightFunction1',"CONSTANT");this.addField_SFString(ctx,'weightFunction2',"CONSTANT");this.addField_SFNode('weightTransferFunction1',x3dom.nodeTypes.X3DTexture2DNode);this.addField_SFNode('weightTransferFunction2',x3dom.nodeTypes.X3DTexture2DNode);this.uniformFloatWeightConstant1=new x3dom.nodeTypes.Uniform(ctx);this.uniformFloatWeightConstant2=new x3dom.nodeTypes.Uniform(ctx);this.uniformSampler2DVoxels=new x3dom.nodeTypes.Uniform(ctx);this.uniformSampler2DWeightTransferFunction1=new x3dom.nodeTypes.Uniform(ctx);this.uniformSampler2DWeightTransferFunction2=new x3dom.nodeTypes.Uniform(ctx);},{fieldChanged:function(fieldName){switch(fieldName){case'weightConstant1':this.uniformFloatWeightConstant1._vf.value=this._vf.weightConstant1;this.uniformFloatWeightConstant1.fieldChanged("value");break;case'weightConstant2':this.uniformFloatWeightConstant2._vf.value=this._vf.weightConstant2;this.uniformFloatWeightConstant2.fieldChanged("value");break;case'weightFunction1':break;case'weightFunction2':break;}},uniforms:function(){var unis=[];if(this._cf.voxels.node||this._cf.weightTransferFunction1.node||this._cf.weightTransferFunction2.node){this.uniformSampler2DVoxels._vf.name='uVolBlendData';this.uniformSampler2DVoxels._vf.type='SFInt32';this.uniformSampler2DVoxels._vf.value=this._volumeDataParent._textureID++;unis.push(this.uniformSampler2DVoxels);if(this._cf.weightTransferFunction1.node){this.uniformSampler2DWeightTransferFunction1._vf.name='uWeightTransferFunctionA';this.uniformSampler2DWeightTransferFunction1._vf.type='SFInt32';this.uniformSampler2DWeightTransferFunction1._vf.value=this._volumeDataParent._textureID++;unis.push(this.uniformSampler2DWeightTransferFunction1);}
if(this._cf.weightTransferFunction2.node){this.uniformSampler2DWeightTransferFunction2._vf.name='uWeightTransferFunctionB';this.uniformSampler2DWeightTransferFunction2._vf.type='SFInt32';this.uniformSampler2DWeightTransferFunction2._vf.value=this._volumeDataParent._textureID++;unis.push(this.uniformSampler2DWeightTransferFunction2);}}
this.uniformFloatWeightConstant1._vf.name='uWeightConstantA';this.uniformFloatWeightConstant1._vf.type='SFFloat';this.uniformFloatWeightConstant1._vf.value=this._vf.weightConstant1;unis.push(this.uniformFloatWeightConstant1);this.uniformFloatWeightConstant2._vf.name='uWeightConstantB';this.uniformFloatWeightConstant2._vf.type='SFFloat';this.uniformFloatWeightConstant2._vf.value=this._vf.weightConstant2;unis.push(this.uniformFloatWeightConstant2);if(this._cf.renderStyle.node){var renderStyleUniforms=this._cf.renderStyle.node.uniforms();Array.forEach(renderStyleUniforms,function(uni){uni._vf.name=uni._vf.name.replace(/uSurfaceNormals/,"uBlendSurfaceNormals")});unis=unis.concat(renderStyleUniforms);}
return unis;},textures:function(){var texs=[];if(this._cf.voxels.node){var tex=this._cf.voxels.node;tex._vf.repeatS=false;tex._vf.repeatT=false;texs.push(tex);}
if(this._cf.weightTransferFunction1.node){var tex=this._cf.weightTransferFunction1.node;tex._vf.repeatS=false;tex._vf.repeatT=false;texs.push(tex);}
if(this._cf.weightTransferFunction2.node){var tex=this._cf.weightTransferFunction2.node;tex._vf.repeatS=false;tex._vf.repeatT=false;texs.push(tex);}
if(this._cf.renderStyle.node){var renderStyleTextures=this._cf.renderStyle.node.textures();texs=texs.concat(renderStyleTextures);}
return texs;},initializeValues:function(){var initialValues="";if(x3dom.nodeTypes.X3DLightNode.lightID>0){initialValues+=" vec3 ambientBlend = vec3(0.0, 0.0, 0.0);\n"+" vec3 diffuseBlend = vec3(0.0, 0.0, 0.0);\n"+" vec3 specularBlend = vec3(0.0, 0.0, 0.0);\n";}
return initialValues;},styleUniformsShaderText:function(){var uniformsText="uniform float uWeightConstantA;\n"+"uniform float uWeightConstantB;\n"+"uniform sampler2D uBlendSurfaceNormals;\n";if(this._cf.voxels.node){uniformsText+="uniform sampler2D uVolBlendData;\n";}
if(this._cf.weightTransferFunction1.node){uniformsText+="uniform sampler2D uWeightTransferFunctionA;\n";}
if(this._cf.weightTransferFunction2.node){uniformsText+="uniform sampler2D uWeightTransferFunctionB;\n";}
if(this._cf.renderStyle.node){uniformsText+=this._cf.renderStyle.node.styleUniformsShaderText();}
return uniformsText;},styleShaderText:function(){var styleText="";if(this._cf.renderStyle.node&&this._cf.renderStyle.node.styleShaderText!=undefined){styleText+=this._cf.renderStyle.node.styleShaderText();}
return styleText;},inlineStyleShaderText:function(){var nSlices=this._cf.voxels.node._vf.numberOfSlices.toPrecision(5);var xSlices=this._cf.voxels.node._vf.slicesOverX.toPrecision(5);var ySlices=this._cf.voxels.node._vf.slicesOverY.toPrecision(5);var inlineText=" vec4 blendValue = cTexture3D(uVolBlendData, ray_pos, "+nSlices+", "+xSlices+", "+ySlices+");\n"+" blendValue = vec4(blendValue.rgb,(0.299*blendValue.r)+(0.587*blendValue.g)+(0.114*blendValue.b));\n";if(this._cf.renderStyle.node&&this._cf.renderStyle.node._cf.surfaceNormals.node){inlineText+=" vec4 blendGradEye = getNormalFromTexture(uBlendSurfaceNormals, ray_pos, "+nSlices+", "+xSlices+", "+ySlices+");\n";}else{inlineText+=" vec4 blendGradEye = getNormalOnTheFly(uVolBlendData, ray_pos, "+nSlices+", "+xSlices+", "+ySlices+");\n";}
inlineText+=" vec4 blendGrad = vec4((modelViewMatrix * vec4(blendGradEye.xyz, 0.0)).xyz, blendGradEye.a);\n";if(this._cf.renderStyle.node){var tempText=this._cf.renderStyle.node.inlineStyleShaderText().replace(/value/gm,"blendValue").replace(/grad/gm,"blendGrad");inlineText+=tempText.replace(/ambient/gm,"ambientBlend").replace(/diffuse/gm,"diffuseBlend").replace(/specular/gm,"specularBlend");}
switch(this._vf.weightFunction1.toUpperCase()){case"CONSTANT":inlineText+=" float wA = uWeightConstantA;\n";break;case"ALPHA0":inlineText+=" float wA = value.a;\n";break;case"ALPHA1":inlineText+=" float wA = blendValue.a;\n";break;case"ONE_MINUS_ALPHA0":inlineText+=" float wA = 1.0 - value.a;\n";break;case"ONE_MINUS_ALPHA1":inlineText+=" float wA = 1.0 - blendValue.a;\n";break;case"TABLE":if(this._cf.weightTransferFunction1){inlineText+=" float wA = texture2D(uWeightTransferFunctionA, vec2(value.a, blendValue.a));\n";}else{inlineText+=" float wA = value.a;\n";x3dom.debug.logWarning('[VolumeRendering][BlendedVolumeStyle] TABLE specified on weightFunction1 but not weightTrnafer function provided, using ALPHA0.');}
break;}
switch(this._vf.weightFunction2.toUpperCase()){case"CONSTANT":inlineText+=" float wB = uWeightConstantB;\n";break;case"ALPHA0":inlineText+=" float wB = value.a;\n";break;case"ALPHA1":inlineText+=" float wB = blendValue.a;\n";break;case"ONE_MINUS_ALPHA0":inlineText+=" float wB = 1.0 - value.a;\n";break;case"ONE_MINUS_ALPHA1":inlineText+=" float wB = 1.0 - blendValue.a;\n";break;case"TABLE":if(this._cf.weightTransferFunction2){inlineText+=" float wB = texture2D(uWeightTransferFunctionB, vec2(value.a, blendValue.a));\n";}else{inlineText+=" float wB = value.a;\n";x3dom.debug.logWarning('[VolumeRendering][BlendedVolumeStyle] TABLE specified on weightFunction2 but not weightTrasnferFunction provided, using ALPHA0.');}
break;}
if(x3dom.nodeTypes.X3DLightNode.lightID==0){inlineText+=" value = clamp(value * wA + blendValue * wB, 0.0, 1.0);\n";}
return inlineText;},lightAssigment:function(){var inlineText="";if(x3dom.nodeTypes.X3DLightNode.lightID>0){if(this._cf.renderStyle.node){var tempText=this._cf.renderStyle.node.lightAssigment().replace(/value/gm,"blendValue").replace(/grad/gm,"blendGrad");inlineText+=tempText.replace(/ambient/gm,"ambientBlend").replace(/diffuse/gm,"diffuseBlend").replace(/specular/gm,"specularBlend");}else{for(var l=0;l<x3dom.nodeTypes.X3DLightNode.lightID;l++){inlineText+=" lighting(light"+l+"_Type, "+"light"+l+"_Location, "+"light"+l+"_Direction, "+"light"+l+"_Color, "+"light"+l+"_Attenuation, "+"light"+l+"_Radius, "+"light"+l+"_Intensity, "+"light"+l+"_AmbientIntensity, "+"light"+l+"_BeamWidth, "+"light"+l+"_CutOffAngle, "+"blendGradEye.xyz, -positionE.xyz, ambientBlend, diffuseBlend, specularBlend);\n";}
inlineText+=" blendValue.rgb = ambientBlend*blendValue.rgb + diffuseBlend*blendValue.rgb + specularBlend;\n";}}
inlineText+=" value.rgb = clamp(value.rgb * wA + blendValue.rgb * wB, 0.0, 1.0);\n"+" value.a = clamp(value.a * wA + blendValue.a * wB, 0.0, 1.0);\n";return inlineText;}}));x3dom.registerNodeType("BoundaryEnhancementVolumeStyle","VolumeRendering",defineClass(x3dom.nodeTypes.X3DComposableVolumeRenderStyleNode,function(ctx){x3dom.nodeTypes.BoundaryEnhancementVolumeStyle.superClass.call(this,ctx);this.addField_SFFloat(ctx,'retainedOpacity',1);this.addField_SFFloat(ctx,'boundaryOpacity',0);this.addField_SFFloat(ctx,'opacityFactor',1);this.uniformFloatRetainedOpacity=new x3dom.nodeTypes.Uniform(ctx);this.uniformFloatBoundaryOpacity=new x3dom.nodeTypes.Uniform(ctx);this.uniformFloatOpacityFactor=new x3dom.nodeTypes.Uniform(ctx);this.uniformSampler2DSurfaceNormals=new x3dom.nodeTypes.Uniform(ctx);this.uniformBoolEnableBoundary=new x3dom.nodeTypes.Uniform(ctx);},{fieldChanged:function(fieldName){switch(fieldName){case'retainedOpacity':this.uniformFloatRetainedOpacity._vf.value=this._vf.retainedOpacity;this.uniformFloatRetainedOpacity.fieldChanged("value");break;case'boundaryOpacity':this.uniformFloatBoundaryOpacity._vf.value=this._vf.boundaryOpacity;this.uniformFloatBoundaryOpacity.fieldChanged("value");break;case'opacityFactor':this.uniformFloatOpacityFactor._vf.value=this._vf.opacityFactor;this.uniformFloatOpacityFactor.fieldChanged("value");break;}},uniforms:function(){var unis=[];if(this._cf.surfaceNormals.node){var volumeDataParent=this._parentNodes[0];while(!x3dom.isa(volumeDataParent,x3dom.nodeTypes.X3DVolumeDataNode)||!x3dom.isa(volumeDataParent,x3dom.nodeTypes.X3DNode)){volumeDataParent=volumeDataParent._parentNodes[0];}
if(x3dom.isa(volumeDataParent,x3dom.nodeTypes.X3DVolumeDataNode)==false){x3dom.debug.logError("[VolumeRendering][BoundaryEnhancementVolumeStyle] Not VolumeData parent found!");volumeDataParent=null;}
this.uniformSampler2DSurfaceNormals._vf.name='uSurfaceNormals';this.uniformSampler2DSurfaceNormals._vf.type='SFInt32';this.uniformSampler2DSurfaceNormals._vf.value=volumeDataParent._textureID++;unis.push(this.uniformSampler2DSurfaceNormals);}
this.uniformFloatRetainedOpacity._vf.name='uRetainedOpacity'+this._styleID;this.uniformFloatRetainedOpacity._vf.type='SFFloat';this.uniformFloatRetainedOpacity._vf.value=this._vf.retainedOpacity;unis.push(this.uniformFloatRetainedOpacity);this.uniformFloatBoundaryOpacity._vf.name='uBoundaryOpacity'+this._styleID;this.uniformFloatBoundaryOpacity._vf.type='SFFloat';this.uniformFloatBoundaryOpacity._vf.value=this._vf.boundaryOpacity;unis.push(this.uniformFloatBoundaryOpacity);this.uniformFloatOpacityFactor._vf.name='uOpacityFactor'+this._styleID;this.uniformFloatOpacityFactor._vf.type='SFFloat';this.uniformFloatOpacityFactor._vf.value=this._vf.opacityFactor;unis.push(this.uniformFloatOpacityFactor);this.uniformBoolEnableBoundary._vf.name='uEnableBoundary'+this._styleID;this.uniformBoolEnableBoundary._vf.type='SFBool';this.uniformBoolEnableBoundary._vf.value=this._vf.enabled;unis.push(this.uniformBoolEnableBoundary);return unis;},textures:function(){var texs=[];if(!(this._cf.surfaceNormals.node==null)){var tex=this._cf.surfaceNormals.node;tex._vf.repeatS=false;tex._vf.repeatT=false;texs.push(tex)}
return texs;},styleUniformsShaderText:function(){return"uniform float uRetainedOpacity"+this._styleID+";\n"+"uniform float uBoundaryOpacity"+this._styleID+";\n"+"uniform float uOpacityFactor"+this._styleID+";\n"+"uniform bool uEnableBoundary"+this._styleID+";\n";},styleShaderText:function(){if(this._first){return"void boundaryEnhancement(inout vec4 original_color, in float gradientMagnitude, in float retainedOpacity, in float boundaryOpacity, in float opacityFactor){\n"+" original_color.a = original_color.a * (retainedOpacity + (boundaryOpacity * pow(gradientMagnitude, opacityFactor)));\n"+"}\n";}else{return"";}},inlineStyleShaderText:function(){var inlineText=" if(uEnableBoundary"+this._styleID+"){\n"+" boundaryEnhancement(value, grad.w, uRetainedOpacity"+this._styleID+", uBoundaryOpacity"+this._styleID+", uOpacityFactor"+this._styleID+");\n"+"}\n";return inlineText;}}));x3dom.registerNodeType("CartoonVolumeStyle","VolumeRendering",defineClass(x3dom.nodeTypes.X3DComposableVolumeRenderStyleNode,function(ctx){x3dom.nodeTypes.CartoonVolumeStyle.superClass.call(this,ctx);this.addField_SFColor(ctx,'parallelColor',0,0,0);this.addField_SFColor(ctx,'orthogonalColor',1,1,1);this.addField_SFInt32(ctx,'colorSteps',4);this.uniformParallelColor=new x3dom.nodeTypes.Uniform(ctx);this.uniformOrthogonalColor=new x3dom.nodeTypes.Uniform(ctx);this.uniformIntColorSteps=new x3dom.nodeTypes.Uniform(ctx);this.uniformSampler2DSurfaceNormals=new x3dom.nodeTypes.Uniform(ctx);this.uniformBoolEnableCartoon=new x3dom.nodeTypes.Uniform(ctx);},{fieldChanged:function(fieldName){switch(fieldName){case'parallelColor':this.uniformParallelColor._vf.value=this._vf.parallelColor;this.uniformParallelColor.fieldChanged("value");break;case'orthogonalColor':this.uniformOrthogonalColor._vf.value=this._vf.orthogonalColor;this.uniformOrthogonalColor.fieldChanged("value");break;case'colorSteps':this.uniformIntColorSteps._vf.value=this._vf.colorSteps;this.uniformIntColorSteps.fieldChanged("value");break;}},uniforms:function(){var unis=[];if(this._cf.surfaceNormals.node){this.uniformSampler2DSurfaceNormals._vf.name='uSurfaceNormals';this.uniformSampler2DSurfaceNormals._vf.type='SFInt32';this.uniformSampler2DSurfaceNormals._vf.value=this._volumeDataParent._textureID++;unis.push(this.uniformSampler2DSurfaceNormals);}
this.uniformParallelColor._vf.name='uParallelColor'+this._styleID;this.uniformParallelColor._vf.type='SFColor';this.uniformParallelColor._vf.value=this._vf.parallelColor;unis.push(this.uniformParallelColor);this.uniformOrthogonalColor._vf.name='uOrthogonalColor'+this._styleID;this.uniformOrthogonalColor._vf.type='SFColor';this.uniformOrthogonalColor._vf.value=this._vf.orthogonalColor;unis.push(this.uniformOrthogonalColor);this.uniformIntColorSteps._vf.name='uColorSteps'+this._styleID;this.uniformIntColorSteps._vf.type='SFInt32';this.uniformIntColorSteps._vf.value=this._vf.colorSteps;unis.push(this.uniformIntColorSteps);this.uniformBoolEnableCartoon._vf.name='uEnableCartoon'+this._styleID;this.uniformBoolEnableCartoon._vf.type='SFBool';this.uniformBoolEnableCartoon._vf.value=this._vf.enabled;unis.push(this.uniformBoolEnableCartoon);return unis;},textures:function(){var texs=[];if(this._cf.surfaceNormals.node){var tex=this._cf.surfaceNormals.node;tex._vf.repeatS=false;tex._vf.repeatT=false;texs.push(tex);}
return texs;},styleShaderText:function(){if(this._first){return"//Convert RGBA color to HSVA\n"+"vec4 rgba2hsva(vec4 rgba){\n"+" float zat, izen;\n"+" float R = rgba.r, G = rgba.g, B = rgba.b;\n"+" float minim = min(R, min(G, B)), maxim = max(R, max(G, B));\n"+" float delta = maxim-minim;\n"+" if(minim == maxim){\n"+" return vec4(0.0, 0.0, maxim, rgba.a);\n"+" }else{\n"+" zat = (R == maxim) ? G - B : ((G == maxim) ? B - R : R - G);\n"+" izen = (R == maxim) ? ((G<B) ? 6.0 : 0.0) : ((G == maxim) ? 2.0 : 4.0);\n"+" return vec4((zat/delta + izen)/6.0, delta/maxim, maxim, rgba.a);\n"+" }\n"+"}\n"+"\n"+"//Convert RGB color to HSV\n"+"vec3 rgb2hsv(vec3 rgb){\n"+" return rgba2hsva(vec4(rgb, 1.0)).rgb;\n"+"}\n"+"\n"+"//Convert HSVA color to RGBA\n"+"vec4 hsva2rgba(vec4 hsva){\n"+" float r, g, b;\n"+" float h=hsva.x, s=hsva.y, v=hsva.z;\n"+" float i = floor(h * 6.0);\n"+" float f = h * 6.0 - i;\n"+" float p = v * (1.0 - s);\n"+" float q = v * (1.0 - f * s);\n"+" float t = v * (1.0 - (1.0 - f) * s);\n"+" i = mod(i,6.0);\n"+" if( i == 6.0 || i == 0.0 ) r = v, g = t, b = p;\n"+" else if( i == 1.0) r = q, g = v, b = p;\n"+" else if( i == 2.0) r = p, g = v, b = t;\n"+" else if( i == 3.0) r = p, g = q, b = v;\n"+" else if( i == 4.0) r = t, g = p, b = v;\n"+" else if( i == 5.0) r = v, g = p, b = q;\n"+" return vec4(r,g,b,hsva.w);\n"+"}\n"+"\n"+"//Convert HSV color to RGB\n"+"vec3 hsv2rgb(vec3 hsv){\n"+" return hsva2rgba(vec4(hsv, 1.0)).rgb;\n"+"}\n"+"void getCartoonStyle(inout vec4 outputColor, vec3 orthogonalColor, vec3 parallelColor, int colorSteps, vec4 surfNormal, vec3 V)\n"+"{\n"+" float steps = clamp(float(colorSteps), 1.0,64.0);\n"+" float range_size = pi_half / steps;\n"+" float cos_angle = abs(dot(surfNormal.xyz, V));\n"+" float interval = clamp(floor(cos_angle / range_size),0.0,steps);\n"+" float ang = interval * range_size;\n"+" outputColor.rgb = hsv2rgb(mix(orthogonalColor, parallelColor, ang));\n"+"}\n"+"\n";}else{return"";}},styleUniformsShaderText:function(){var styleText="uniform vec3 uParallelColor"+this._styleID+";\n"+"uniform vec3 uOrthogonalColor"+this._styleID+";\n"+"uniform int uColorSteps"+this._styleID+";\n"+"uniform bool uEnableCartoon"+this._styleID+";\n";if(this._first){styleText+="const float pi_half = "+(Math.PI/2.0).toPrecision(5)+";\n";}
return styleText;},inlineStyleShaderText:function(){var inlineText=" if(uEnableCartoon"+this._styleID+"){\n"+" getCartoonStyle(value, rgb2hsv(uOrthogonalColor"+this._styleID+"), rgb2hsv(uParallelColor"+this._styleID+"), uColorSteps"+this._styleID+", gradEye, dir);\n"+" }\n";return inlineText;}}));x3dom.registerNodeType("ComposedVolumeStyle","VolumeRendering",defineClass(x3dom.nodeTypes.X3DComposableVolumeRenderStyleNode,function(ctx){x3dom.nodeTypes.ComposedVolumeStyle.superClass.call(this,ctx);this.addField_MFNode('renderStyle',x3dom.nodeTypes.X3DComposableVolumeRenderStyleNode);this.normalTextureProvided=false;},{uniforms:function(){var unis=[];var i,n=this._cf.renderStyle.nodes.length;for(i=0;i<n;i++){var that=this;Array.forEach(this._cf.renderStyle.nodes[i].uniforms(),function(uniform){var contains_uniform=false;Array.forEach(unis,function(accum){if(accum._vf.name==uniform._vf.name){contains_uniform=true;}});if(contains_uniform==false){unis=unis.concat(uniform);}});}
return unis;},textures:function(){var texs=[];var i,n=this._cf.renderStyle.nodes.length;for(i=0;i<n;i++){Array.forEach(this._cf.renderStyle.nodes[i].textures(),function(texture){var contains_texture=false;Array.forEach(texs,function(accum){if(accum._vf.url[0]==texture._vf.url[0]){contains_texture=true;}});if(contains_texture==false){texs=texs.concat(texture);}});}
return texs;},initializeValues:function(){var initialValues="";var n=this._cf.renderStyle.nodes.length;for(var i=0;i<n;i++){if(this._cf.renderStyle.nodes[i].initializeValues!=undefined){initialValues+=this._cf.renderStyle.nodes[i].initializeValues()+"\n";}}
return initialValues;},styleUniformsShaderText:function(){var styleText="";var n=this._cf.renderStyle.nodes.length;if(n==1&&!x3dom.isa(this._cf.renderStyle.nodes[0],x3dom.nodeTypes.OpacityMapVolumeStyle)){this.surfaceNormalsNeeded=true;}
for(var i=0;i<n;i++){styleText+=this._cf.renderStyle.nodes[i].styleUniformsShaderText()+"\n";if(this._cf.renderStyle.nodes[i]._cf.surfaceNormals&&this._cf.renderStyle.nodes[i]._cf.surfaceNormals.node!=null){this.normalTextureProvided=true;this._cf.surfaceNormals.node=this._cf.renderStyle.nodes[i]._cf.surfaceNormals.node;}}
return styleText;},styleShaderText:function(){var styleText="";var n=this._cf.renderStyle.nodes.length;for(var i=0;i<n;i++){if(this._cf.renderStyle.nodes[i].styleShaderText!=undefined){styleText+=this._cf.renderStyle.nodes[i].styleShaderText()+"\n";}}
return styleText;},inlineStyleShaderText:function(){var inlineText="";var n=this._cf.renderStyle.nodes.length;for(var i=0;i<n;i++){inlineText+=this._cf.renderStyle.nodes[i].inlineStyleShaderText();}
return inlineText;},lightAssigment:function(){var isBlendedStyle=false;var blendedLightAssigmentText;Array.forEach(this._cf.renderStyle.nodes,function(style){if(x3dom.isa(style,x3dom.nodeTypes.BlendedVolumeStyle)){isBlendedStyle=true;blendedLightAssigmentText=style.lightAssigment();}});if(!isBlendedStyle){return this._cf.renderStyle.nodes[0].lightAssigment();}else{return this._cf.renderStyle.nodes[0].lightAssigment()+blendedLightAssigmentText;}},lightEquationShaderText:function(){return this._cf.renderStyle.nodes[0].lightEquationShaderText();}}));x3dom.registerNodeType("EdgeEnhancementVolumeStyle","VolumeRendering",defineClass(x3dom.nodeTypes.X3DComposableVolumeRenderStyleNode,function(ctx){x3dom.nodeTypes.EdgeEnhancementVolumeStyle.superClass.call(this,ctx);this.addField_SFColor(ctx,'edgeColor',0,0,0);this.addField_SFFloat(ctx,'gradientThreshold',0.4);this.uniformColorEdgeColor=new x3dom.nodeTypes.Uniform(ctx);this.uniformFloatGradientThreshold=new x3dom.nodeTypes.Uniform(ctx);this.uniformSampler2DSurfaceNormals=new x3dom.nodeTypes.Uniform(ctx);this.uniformBoolEdgeEnable=new x3dom.nodeTypes.Uniform(ctx);},{fieldChanged:function(fieldName){if(fieldName=="edgeColor"){this.uniformColorEdgeColor._vf.value=this._vf.edgeColor;this.uniformColorEdgeColor.fieldChanged("value");}else if(fieldName=="gradientThreshold"){this.uniformFloatGradientThreshold._vf.value=this._vf.gradientThreshold;this.uniformFloatGradientThreshold.fieldChanged("value");}},uniforms:function(){var unis=[];if(this._cf.surfaceNormals.node){this.uniformSampler2DSurfaceNormals._vf.name='uSurfaceNormals';this.uniformSampler2DSurfaceNormals._vf.type='SFInt32';this.uniformSampler2DSurfaceNormals._vf.value=this._volumeDataParent._textureID++;unis.push(this.uniformSampler2DSurfaceNormals);}
this.uniformColorEdgeColor._vf.name='uEdgeColor'+this._styleID;this.uniformColorEdgeColor._vf.type='SFColor';this.uniformColorEdgeColor._vf.value=this._vf.edgeColor;unis.push(this.uniformColorEdgeColor);this.uniformFloatGradientThreshold._vf.name='uGradientThreshold'+this._styleID;this.uniformFloatGradientThreshold._vf.type='SFFloat';this.uniformFloatGradientThreshold._vf.value=this._vf.gradientThreshold;unis.push(this.uniformFloatGradientThreshold);this.uniformBoolEdgeEnable._vf.name='uEnableEdge'+this._styleID;this.uniformBoolEdgeEnable._vf.type='SFBool';this.uniformBoolEdgeEnable._vf.value=this._vf.enabled;unis.push(this.uniformBoolEdgeEnable);return unis;},textures:function(){var texs=[];if(this._cf.surfaceNormals.node){var tex=this._cf.surfaceNormals.node;tex._vf.repeatS=false;tex._vf.repeatT=false;texs.push(tex)}
return texs;},styleUniformsShaderText:function(){return"uniform vec3 uEdgeColor"+this._styleID+";\n"+"uniform float uGradientThreshold"+this._styleID+";\n"+"uniform bool uEnableEdge"+this._styleID+";\n";},styleShaderText:function(){if(this._first){return"void edgeEnhancement(inout vec4 originalColor, in vec4 gradient, in vec3 V, in vec3 edgeColor, in float gradientT)\n"+"{\n"+" if(gradient.a > 0.05){\n"+" float angle_dif = abs(dot(gradient.xyz,V));\n"+" if(angle_dif > cos(gradientT)){\n"+" originalColor.rgb = mix(edgeColor, originalColor.rgb, angle_dif);\n"+" }\n"+" }\n"+"}\n";}else{return"";}},inlineStyleShaderText:function(){var inlineText=" if(uEnableEdge"+this._styleID+"){\n"+" edgeEnhancement(value, gradEye, dir, uEdgeColor"+this._styleID+", uGradientThreshold"+this._styleID+");\n"+" }\n";return inlineText;}}));x3dom.registerNodeType("IsoSurfaceVolumeData","VolumeRendering",defineClass(x3dom.nodeTypes.X3DVolumeDataNode,function(ctx){x3dom.nodeTypes.IsoSurfaceVolumeData.superClass.call(this,ctx);this.addField_MFNode('renderStyle',x3dom.nodeTypes.X3DVolumeRenderStyleNode);this.addField_SFNode('gradients',x3dom.nodeTypes.Texture);this.addField_MFFloat(ctx,'surfaceValues',[0.0]);this.addField_SFFloat(ctx,'contourStepSize',0);this.addField_SFFloat(ctx,'surfaceTolerance',0);this.uniformSampler2DGradients=new x3dom.nodeTypes.Uniform(ctx);this.uniformFloatContourStepSize=new x3dom.nodeTypes.Uniform(ctx);this.uniformFloatSurfaceTolerance=new x3dom.nodeTypes.Uniform(ctx);this.uniformFloatArraySurfaceValues=new x3dom.nodeTypes.Uniform(ctx);this.vrcMultiTexture=new x3dom.nodeTypes.MultiTexture(ctx);this.vrcVolumeTexture=null;this.vrcSinglePassShader=new x3dom.nodeTypes.ComposedShader(ctx);this.vrcSinglePassShaderVertex=new x3dom.nodeTypes.ShaderPart(ctx);this.vrcSinglePassShaderFragment=new x3dom.nodeTypes.ShaderPart(ctx);this.vrcSinglePassShaderFieldVolData=new x3dom.nodeTypes.Field(ctx);this.vrcSinglePassShaderFieldOffset=new x3dom.nodeTypes.Field(ctx);this.vrcSinglePassShaderFieldDimensions=new x3dom.nodeTypes.Field(ctx);},{fieldChanged:function(fieldName){switch(fieldName){case'surfaceValues':this.uniformFloatArraySurfaceValues._vf.value=this._vf.surfaceValues;this.uniformFloatArraySurfaceValues.fieldChanged("value");break;case'surfaceTolerance':this.uniformFloatSurfaceTolerance._vf.value=this._vf.surfaceTolerance;this.uniformFloatSurfaceTolerance.fieldChanged("value");break;case'contourStepSize':break;}},uniforms:function(){var unis=[];if(this._cf.gradients.node){this.uniformSampler2DGradients._vf.name='uSurfaceNormals';this.uniformSampler2DGradients._vf.type='SFInt32';this.uniformSampler2DGradients._vf.value=this._textureID++;unis.push(this.uniformSampler2DGradients);}
this.uniformFloatArraySurfaceValues._vf.name='uSurfaceValues';this.uniformFloatArraySurfaceValues._vf.type='MFFloat';this.uniformFloatArraySurfaceValues._vf.value=this._vf.surfaceValues;unis.push(this.uniformFloatArraySurfaceValues);this.uniformFloatSurfaceTolerance._vf.name='uSurfaceTolerance';this.uniformFloatSurfaceTolerance._vf.type='MFFloat';this.uniformFloatSurfaceTolerance._vf.value=this._vf.surfaceTolerance;unis.push(this.uniformFloatSurfaceTolerance);if(this._cf.renderStyle.nodes){var n=this._cf.renderStyle.nodes.length;for(var i=0;i<n;i++){Array.forEach(this._cf.renderStyle.nodes[i].uniforms(),function(uniform){var contains_uniform=false;Array.forEach(unis,function(accum){if(accum._vf.name==uniform._vf.name){contains_uniform=true;}});if(contains_uniform==false){unis=unis.concat(uniform);}});}}
return unis;},textures:function(){var texs=[];if(this._cf.gradients.node){var tex=this._cf.gradients.node;tex._vf.repeatS=false;tex._vf.repeatT=false;texs.push(tex);}
var i,n=this._cf.renderStyle.nodes.length;for(i=0;i<n;i++){Array.forEach(this._cf.renderStyle.nodes[i].textures(),function(texture){var contains_texture=false;Array.forEach(texs,function(accum){if(accum._vf.url[0]==texture._vf.url[0]){contains_texture=true;}});if(contains_texture==false){texs=texs.concat(texture);}});}
return texs;},initializeValues:function(){var initialValues=" float previous_value = 0.0;\n";var n=this._cf.renderStyle.nodes.length;for(var i=0;i<n;i++){if(this._cf.renderStyle.nodes[i].initializeValues!=undefined){initialValues+=this._cf.renderStyle.nodes[i].initializeValues()+"\n";}}
return initialValues;},styleUniformsShaderText:function(){var styleText="uniform float uSurfaceTolerance;\n"+"uniform float uSurfaceValues["+this._vf.surfaceValues.length+"];\n";if(this._cf.gradients.node){styleText+="uniform sampler2D uSurfaceNormals;\n";}
var n=this._cf.renderStyle.nodes.length;for(var i=0;i<n;i++){styleText+=this._cf.renderStyle.nodes[i].styleUniformsShaderText()+"\n";if(this._cf.renderStyle.nodes[i]._cf.surfaceNormals&&this._cf.renderStyle.nodes[i]._cf.surfaceNormals.node!=null){this.normalTextureProvided=true;this.surfaceNormals=this._cf.renderStyle.nodes[i]._cf.surfaceNormals.node;}}
this.surfaceNormalsNeeded=true;return styleText;},inlineStyleShaderText:function(){var inlineText=" sample = value.r;\n";if(this._vf.surfaceValues.length==1){if(this._vf.contourStepSize==0.0){inlineText+=" if(((sample>=uSurfaceValues[0] && previous_value<uSurfaceValues[0])||(sample<uSurfaceValues[0] && previous_value>=uSurfaceValues[0])) && (grad.a>=uSurfaceTolerance)){\n"+" value = vec4(vec3(uSurfaceValues[0]),1.0);\n";if(this._cf.renderStyle.nodes){inlineText+=this._cf.renderStyle.nodes[0].inlineStyleShaderText();}
inlineText+=" accum.rgb += (1.0 - accum.a) * (value.rgb * value.a);\n"+" accum.a += (1.0 - accum.a) * value.a;\n"+" }\n";}else{var tmp=this._vf.surfaceValues[0];var positive_range=[tmp];var negative_range=[];var range=[];while(tmp+this._vf.contourStepSize<=1.0){tmp+=this._vf.contourStepSize;positive_range.push(tmp);}
tmp=this._vf.surfaceValues[0];while(tmp-this._vf.contourStepSize>=0.0){tmp-=this._vf.contourStepSize;negative_range.unshift(tmp);}
range=negative_range.concat(positive_range);for(var i=0;i<=range.length-1;i++){var s_value=range[i].toPrecision(3);inlineText+=" if(((sample>="+s_value+" && previous_value<"+s_value+")||(sample<"+s_value+" && previous_value>="+s_value+")) && (grad.a>=uSurfaceTolerance)){\n"+" value = vec4(vec3("+s_value+"),1.0);\n";if(this._cf.renderStyle.nodes){inlineText+=this._cf.renderStyle.nodes[0].inlineStyleShaderText();}
inlineText+=" accum.rgb += (1.0 - accum.a) * (value.rgb * value.a);\n"+" accum.a += (1.0 - accum.a) * value.a;\n"+" }\n";};}}else{var n_styles=this._cf.renderStyle.nodes.length-1;var s_values=this._vf.surfaceValues.length;for(var i=0;i<s_values;i++){var index=Math.min(i,n_styles);inlineText+=" if(((sample>=uSurfaceValues["+i+"] && previous_value<uSurfaceValues["+i+"])||(sample<uSurfaceValues["+i+"] && previous_value>=uSurfaceValues["+i+"])) && (grad.a>=uSurfaceTolerance)){\n"+" value = vec4(vec3(uSurfaceValues["+i+"]),1.0);\n";if(this._cf.renderStyle.nodes){inlineText+=this._cf.renderStyle.nodes[index].inlineStyleShaderText();}
inlineText+=" accum.rgb += (1.0 - accum.a) * (value.rgb * value.a);\n"+" accum.a += (1.0 - accum.a) * value.a;\n"+" }\n";}}
inlineText+=" previous_value = sample;\n";return inlineText;},styleShaderText:function(){var styleText="";var n=this._cf.renderStyle.nodes.length;for(var i=0;i<n;i++){if(this._cf.renderStyle.nodes[i].styleShaderText!=undefined){styleText+=this._cf.renderStyle.nodes[i].styleShaderText()+"\n";}}
return styleText;},lightAssigment:function(){return this._cf.renderStyle.nodes[0].lightAssigment();},lightEquationShaderText:function(){return this._cf.renderStyle.nodes[0].lightEquationShaderText();},nodeChanged:function()
{if(!this._cf.appearance.node)
{var i;this.addChild(new x3dom.nodeTypes.Appearance());this.vrcVolumeTexture=this._cf.voxels.node;this.vrcVolumeTexture._vf.repeatS=false;this.vrcVolumeTexture._vf.repeatT=false;this.vrcMultiTexture._nameSpace=this._nameSpace;this.vrcMultiTexture.addChild(this.vrcVolumeTexture,'texture');this.vrcVolumeTexture.nodeChanged();var styleTextures=this.textures();for(i=0;i<styleTextures.length;i++)
{this.vrcMultiTexture.addChild(styleTextures[i],'texture');this.vrcVolumeTexture.nodeChanged();}
this._cf.appearance.node.addChild(this.vrcMultiTexture);this.vrcMultiTexture.nodeChanged();for(var i=0;i<this._cf.renderStyle.nodes.length;i++){this._cf.renderStyle.nodes[i].updateProperties(this);}
this.vrcSinglePassShaderVertex._vf.type='vertex';this.vrcSinglePassShaderVertex._vf.url[0]=this.vertexShaderText();;this.vrcSinglePassShaderFragment._vf.type='fragment';shaderText=this.fragmentPreamble+
this.defaultUniformsShaderText(this.vrcVolumeTexture._vf.numberOfSlices,this.vrcVolumeTexture._vf.slicesOverX,this.vrcVolumeTexture._vf.slicesOverY)+
this.styleUniformsShaderText()+
this.styleShaderText()+
this.texture3DFunctionShaderText+
this.normalFunctionShaderText()+
this.lightEquationShaderText();shaderText+="void main()\n"+"{\n"+" bool out_box = all(bvec2(any(greaterThan(pos.xyz, vec3(1.0))), any(lessThan(pos.xyz, vec3(0.0)))));\n"+" if(out_box) discard;\n"+" vec3 cam_pos = vec3(modelViewMatrixInverse[3][0], modelViewMatrixInverse[3][1], modelViewMatrixInverse[3][2]);\n"+" vec3 dir = normalize(pos.xyz-(cam_pos/dimensions+0.5));\n"+" vec3 ray_pos = pos.xyz;\n"+" vec4 accum = vec4(0.0, 0.0, 0.0, 0.0);\n"+" float sample = 0.0;\n"+" vec4 value = vec4(0.0, 0.0, 0.0, 0.0);\n"+" float cont = 0.0;\n"+" vec3 step = dir/Steps;\n";if(x3dom.nodeTypes.X3DLightNode.lightID>0){shaderText+=" vec3 ambient = vec3(0.0, 0.0, 0.0);\n"+" vec3 diffuse = vec3(0.0, 0.0, 0.0);\n"+" vec3 specular = vec3(0.0, 0.0, 0.0);\n"+" vec4 step_eye = modelViewMatrix * vec4(step, 0.0);\n"+" vec4 positionE = position_eye;\n"+" float lightFactor = 1.0;\n";}else{shaderText+=" float lightFactor = 1.2;\n";}
shaderText+=this.initializeValues()+" float opacityFactor = 6.0;\n"+" float t_near;\n"+" float t_far;\n"+" for(float i = 0.0; i < Steps; i+=1.0)\n"+" {\n"+" value = cTexture3D(uVolData, ray_pos, numberOfSlices, slicesOverX, slicesOverY);\n"+" value = value.rgbr;\n";if(this._cf.gradients.node){shaderText+=" vec4 gradEye = getNormalFromTexture(uSurfaceNormals, ray_pos, numberOfSlices, slicesOverX, slicesOverY);\n";}else{shaderText+=" vec4 gradEye = getNormalOnTheFly(uVolData, ray_pos, numberOfSlices, slicesOverX, slicesOverY);\n";}
shaderText+=" vec4 grad = vec4((modelViewMatrix * vec4(gradEye.xyz, 0.0)).xyz, gradEye.a);\n";for(var l=0;l<x3dom.nodeTypes.X3DLightNode.lightID;l++){shaderText+=" lighting(light"+l+"_Type, "+"light"+l+"_Location, "+"light"+l+"_Direction, "+"light"+l+"_Color, "+"light"+l+"_Attenuation, "+"light"+l+"_Radius, "+"light"+l+"_Intensity, "+"light"+l+"_AmbientIntensity, "+"light"+l+"_BeamWidth, "+"light"+l+"_CutOffAngle, "+"grad.xyz, positionE.xyz, ambient, diffuse, specular);\n";}
shaderText+=this.inlineStyleShaderText();if(x3dom.nodeTypes.X3DLightNode.lightID>0){shaderText+=this.lightAssigment();}
shaderText+=" //advance the current position\n"+" ray_pos.xyz += step;\n";if(x3dom.nodeTypes.X3DLightNode.lightID>0){shaderText+=" positionE += step_eye;\n";}
shaderText+=" //break if the position is greater than <1, 1, 1>\n"+" if(ray_pos.x > 1.0 || ray_pos.y > 1.0 || ray_pos.z > 1.0 || ray_pos.x <= 0.0 || ray_pos.y <= 0.0 || ray_pos.z <= 0.0 || accum.a>=1.0)\n"+" break;\n"+" }\n"+" gl_FragColor = accum;\n"+"}";this.vrcSinglePassShaderFragment._vf.url[0]=shaderText;this.vrcSinglePassShader.addChild(this.vrcSinglePassShaderVertex,'parts');this.vrcSinglePassShaderVertex.nodeChanged();this.vrcSinglePassShader.addChild(this.vrcSinglePassShaderFragment,'parts');this.vrcSinglePassShaderFragment.nodeChanged();this.vrcSinglePassShaderFieldVolData._vf.name='uVolData';this.vrcSinglePassShaderFieldVolData._vf.type='SFInt32';this.vrcSinglePassShaderFieldVolData._vf.value=this._textureID++;this.vrcSinglePassShaderFieldDimensions._vf.name='dimensions';this.vrcSinglePassShaderFieldDimensions._vf.type='SFVec3f';this.vrcSinglePassShaderFieldDimensions._vf.value=this._vf.dimensions;this.vrcSinglePassShaderFieldOffset._vf.name='offset';this.vrcSinglePassShaderFieldOffset._vf.type='SFVec3f';this.vrcSinglePassShaderFieldOffset._vf.value="0.01 0.01 0.01";this.vrcSinglePassShader.addChild(this.vrcSinglePassShaderFieldVolData,'fields');this.vrcSinglePassShaderFieldVolData.nodeChanged();this.vrcSinglePassShader.addChild(this.vrcSinglePassShaderFieldDimensions,'fields');this.vrcSinglePassShaderFieldDimensions.nodeChanged();this.vrcSinglePassShader.addChild(this.vrcSinglePassShaderFieldOffset,'fields');this.offsetInterval=window.setInterval((function(aTex,obj){return function(){x3dom.debug.logInfo('[VolumeRendering][IsoSurfaceVolumeData] Looking for Volume Texture size...');var s=obj.getTextureSize(aTex);if(s.valid){clearInterval(obj.offsetInterval);obj.vrcSinglePassShaderFieldOffset._vf.value=new x3dom.fields.SFVec3f(1.0/(s.w/aTex._vf.slicesOverX),1.0/(s.h/aTex._vf.slicesOverY),1.0/aTex._vf.numberOfSlices);obj.vrcSinglePassShader.nodeChanged();x3dom.debug.logInfo('[VolumeRendering][IsoSurfaceVolumeData] Volume Texture size obtained');}}})(this.vrcVolumeTexture,this),1000);var ShaderUniforms=this.uniforms();for(i=0;i<ShaderUniforms.length;i++)
{this.vrcSinglePassShader.addChild(ShaderUniforms[i],'fields');}
this._cf.appearance.node.addChild(this.vrcSinglePassShader);this.vrcSinglePassShader.nodeChanged();this._cf.appearance.node.nodeChanged();}
if(!this._cf.geometry.node){this.addChild(new x3dom.nodeTypes.Box());this._cf.geometry.node._vf.hasHelperColors=false;this._cf.geometry.node._vf.size=new x3dom.fields.SFVec3f(this._vf.dimensions.x,this._vf.dimensions.y,this._vf.dimensions.z);this._cf.geometry.node.fieldChanged("size");}}}));x3dom.registerNodeType("MPRVolumeStyle","VolumeRendering",defineClass(x3dom.nodeTypes.X3DVolumeRenderStyleNode,function(ctx){x3dom.nodeTypes.MPRVolumeStyle.superClass.call(this,ctx);this.addField_SFVec3f(ctx,'originLine',1.0,1.0,0.0);this.addField_SFVec3f(ctx,'finalLine',0.0,1.0,0.0);this.addField_SFFloat(ctx,'positionLine',0.2);this.uniformVec3fOriginLine=new x3dom.nodeTypes.Uniform(ctx);this.uniformVec3fFinalLine=new x3dom.nodeTypes.Uniform(ctx);this.uniformFloatPosition=new x3dom.nodeTypes.Uniform(ctx);},{fieldChanged:function(fieldName){switch(fieldName){case'positionLine':this.uniformFloatPosition._vf.value=this._vf.positionLine;this.uniformFloatPosition.fieldChanged("value");break;case'originLine':this.uniformVec3fOriginLine._vf.value=this._vf.originLine;this.uniformVec3fOriginLine.fieldChanged("value");break;case'finalLine':this.uniformVec3fFinalLine._vf.value=this._vf.finalLine;this.uniformVec3fFinalLine.fieldChanged("value");break;}},uniforms:function(){var unis=[];this.uniformVec3fOriginLine._vf.name='originLine';this.uniformVec3fOriginLine._vf.type='SFVec3f';this.uniformVec3fOriginLine._vf.value=this._vf.originLine;unis.push(this.uniformVec3fOriginLine);this.uniformVec3fFinalLine._vf.name='finalLine';this.uniformVec3fFinalLine._vf.type='SFVec3f';this.uniformVec3fFinalLine._vf.value=this._vf.finalLine;unis.push(this.uniformVec3fFinalLine);this.uniformFloatPosition._vf.name='positionLine';this.uniformFloatPosition._vf.type='SFFloat';this.uniformFloatPosition._vf.value=this._vf.positionLine;unis.push(this.uniformFloatPosition);return unis;},styleUniformsShaderText:function(){return"uniform vec3 originLine;\nuniform vec3 finalLine;\nuniform float positionLine;\n";},fragmentShaderText:function(numberOfSlices,slicesOverX,slicesOverY){var shader=this._parentNodes[0].fragmentPreamble+
this._parentNodes[0].defaultUniformsShaderText(numberOfSlices,slicesOverX,slicesOverY)+
this.styleUniformsShaderText()+
this._parentNodes[0].texture3DFunctionShaderText+"void main()\n"+"{\n"+" vec3 cam_pos = vec3(modelViewMatrixInverse[3][0], modelViewMatrixInverse[3][1], modelViewMatrixInverse[3][2]);\n"+" cam_pos = cam_pos/dimensions+0.5;\n"+" vec3 dir = normalize(pos.xyz-cam_pos);\n"+" vec3 normalPlane = finalLine-originLine;\n"+" vec3 pointLine = normalPlane*positionLine+originLine;\n"+" float d = dot(pointLine-pos.xyz,normalPlane)/dot(dir,normalPlane);\n"+" vec4 color = vec4(0.0,0.0,0.0,0.0);\n"+" vec3 pos = d*dir+pos.rgb;\n"+" if (!(pos.x > 1.0 || pos.y > 1.0 || pos.z > 1.0 || pos.x<0.0 || pos.y<0.0 || pos.z<0.0)){\n"+" color = vec4(cTexture3D(uVolData,pos.rgb,numberOfSlices,slicesOverX,slicesOverY).rgb,1.0);\n"+" }\n"+" gl_FragColor = color;\n"+"}";return shader;}}));x3dom.registerNodeType("OpacityMapVolumeStyle","VolumeRendering",defineClass(x3dom.nodeTypes.X3DComposableVolumeRenderStyleNode,function(ctx){x3dom.nodeTypes.OpacityMapVolumeStyle.superClass.call(this,ctx);this.addField_SFNode('transferFunction',x3dom.nodeTypes.Texture);this.addField_SFString(ctx,'type',"simple");this.addField_SFFloat(ctx,'opacityFactor',6.0);this.addField_SFFloat(ctx,'lightFactor',1.2);this.uniformFloatOpacityFactor=new x3dom.nodeTypes.Uniform(ctx);this.uniformFloatLightFactor=new x3dom.nodeTypes.Uniform(ctx);this.uniformSampler2DTransferFunction=new x3dom.nodeTypes.Uniform(ctx);this.uniformBoolEnableOpacityMap=new x3dom.nodeTypes.Uniform(ctx);},{fieldChanged:function(fieldName){switch(fieldName){case'opacityFactor':this.uniformFloatOpacityFactor._vf.value=this._vf.opacityFactor;this.uniformFloatOpacityFactor.fieldChanged("value");break;case'lightFactor':this.uniformFloatLightFactor._vf.value=this._vf.lightFactor;this.uniformFloatLightFactor.fieldChanged("value");break;}},uniforms:function(){var unis=[];if(this._cf.transferFunction.node){this.uniformSampler2DTransferFunction._vf.name='uTransferFunction'+this._styleID;this.uniformSampler2DTransferFunction._vf.type='SFInt32';this.uniformSampler2DTransferFunction._vf.value=this._volumeDataParent._textureID++;unis.push(this.uniformSampler2DTransferFunction);}
this.uniformFloatOpacityFactor._vf.name='uOpacityFactor'+this._styleID;this.uniformFloatOpacityFactor._vf.type='SFFloat';this.uniformFloatOpacityFactor._vf.value=this._vf.opacityFactor;unis.push(this.uniformFloatOpacityFactor);this.uniformFloatLightFactor._vf.name='uLightFactor'+this._styleID;this.uniformFloatLightFactor._vf.type='SFFloat';this.uniformFloatLightFactor._vf.value=this._vf.lightFactor;unis.push(this.uniformFloatLightFactor);this.uniformBoolEnableOpacityMap._vf.name='uEnableOpacityMap'+this._styleID;this.uniformBoolEnableOpacityMap._vf.type='SFBool';this.uniformBoolEnableOpacityMap._vf.value=this._vf.enabled;unis.push(this.uniformBoolEnableOpacityMap);return unis;},textures:function(){var texs=[];var tex=this._cf.transferFunction.node;if(tex){tex._vf.repeatS=false;tex._vf.repeatT=false;texs.push(tex);}
return texs;},styleUniformsShaderText:function(){var uniformsText="uniform float uOpacityFactor"+this._styleID+";\n"+"uniform float uLightFactor"+this._styleID+";\n"+"uniform bool uEnableOpacityMap"+this._styleID+";\n";if(this._cf.transferFunction.node){uniformsText+="uniform sampler2D uTransferFunction"+this._styleID+";\n";}
return uniformsText;},inlineStyleShaderText:function(){var shaderText=" if(uEnableOpacityMap"+this._styleID+"){\n"+" opacityFactor = uOpacityFactor"+this._styleID+";\n"+" lightFactor = uLightFactor"+this._styleID+";\n";if(this._cf.transferFunction.node){shaderText+=" value = texture2D(uTransferFunction"+this._styleID+",vec2(value.r,0.5));\n";}
shaderText+=" }\n";return shaderText;}}));x3dom.registerNodeType("ProjectionVolumeStyle","VolumeRendering",defineClass(x3dom.nodeTypes.X3DVolumeRenderStyleNode,function(ctx){x3dom.nodeTypes.ProjectionVolumeStyle.superClass.call(this,ctx);this.addField_SFFloat(ctx,'intensityThreshold',0);this.addField_SFString(ctx,'type',"MAX");this.uniformIntensityThreshold=new x3dom.nodeTypes.Uniform(ctx);},{fieldChanged:function(fieldName){if(fieldName==='intensityThreshold'){this.uniformIntensityThreshold._vf.value=this._vf.intensityThreshold;this.uniformIntensityThreshold.fieldChanged("value");}else if(fieldName==='type'){}},uniforms:function(){var unis=[];this.uniformIntensityThreshold._vf.name='uIntensityThreshold';this.uniformIntensityThreshold._vf.type='SFFloat';this.uniformIntensityThreshold._vf.value=this._vf.intensityThreshold;unis.push(this.uniformIntensityThreshold);return unis;},styleUniformsShaderText:function(){return"uniform int uType;\n"+"uniform float uIntensityThreshold;\n";},fragmentShaderText:function(numberOfSlices,slicesOverX,slicesOverY){var shader=this._parentNodes[0].fragmentPreamble+
this._parentNodes[0].defaultUniformsShaderText(numberOfSlices,slicesOverX,slicesOverY)+
this.styleUniformsShaderText()+
this._parentNodes[0].texture3DFunctionShaderText+"void main()\n"+"{\n"+" vec3 cam_pos = vec3(modelViewMatrixInverse[3][0], modelViewMatrixInverse[3][1], modelViewMatrixInverse[3][2]);\n"+" cam_pos = cam_pos/dimensions+0.5;\n"+" vec3 dir = normalize(pos.xyz-cam_pos);\n"+" vec3 ray_pos = pos.xyz;\n"+" vec4 accum = vec4(0.0, 0.0, 0.0, 0.0);\n"+" vec4 sample = vec4(0.0, 0.0, 0.0, 0.0);\n"+" vec4 value = vec4(0.0, 0.0, 0.0, 0.0);\n"+" vec4 color = vec4(0.0);\n";if(this._vf.type.toLowerCase()==="max"){shader+="vec2 previous_value = vec2(0.0);\n";}else{shader+="vec2 previous_value = vec2(1.0);\n";}
shader+=" float cont = 0.0;\n"+" vec3 step_size = dir/Steps;\n"+" const float lightFactor = 1.3;\n"+" const float opacityFactor = 3.0;\n"+" for(float i = 0.0; i < Steps; i+=1.0)\n"+" {\n"+" value = cTexture3D(uVolData,ray_pos,numberOfSlices,slicesOverX,slicesOverY);\n"+" value = vec4(value.rgb,(0.299*value.r)+(0.587*value.g)+(0.114*value.b));\n"+" //Process the volume sample\n"+" sample.a = value.a * opacityFactor * (1.0/Steps);\n"+" sample.rgb = value.rgb * sample.a * lightFactor;\n"+" accum.a += (1.0-accum.a)*sample.a;\n";if(this._vf.enabled){switch(this._vf.type.toLowerCase()){case"max":shader+="if(value.r > uIntensityThreshold && value.r <= previous_value.x){\n"+" break;\n"+"}\n"+"color.rgb = vec3(max(value.r, previous_value.x));\n"+"color.a = (value.r > previous_value.x) ? accum.a : previous_value.y;\n";break;case"min":shader+="if(value.r < uIntensityThreshold && value.r >= previous_value.x){\n"+" break;\n"+"}\n"+"color.rgb = vec3(min(value.r, previous_value.x));\n"+"color.a = (value.r < previous_value.x) ? accum.a : previous_value.y;\n";break;case"average":shader+="color.rgb += (1.0 - accum.a) * sample.rgb;\n"+"color.a = accum.a;\n";break;}}
shader+=" //update the previous value and keeping the accumulated alpha\n"+" previous_value.x = color.r;\n"+" previous_value.y = accum.a;\n"+" //advance the current position\n"+" ray_pos.xyz += step_size;\n"+" //break if the position is greater than <1, 1, 1>\n"+" if(ray_pos.x > 1.0 || ray_pos.y > 1.0 || ray_pos.z > 1.0 || ray_pos.x <= 0.0 || ray_pos.y <= 0.0 || ray_pos.z <= 0.0 || accum.a>=1.0){\n";if(this._vf.type.toLowerCase()=="average"&&this._vf.enabled){shader+=" if((i > 0.0) && (i < Steps-1.0)){\n"+"color.rgb = color.rgb/i;\n"+"}\n";}
shader+=" break;\n"+" }\n"+" }\n"+" gl_FragColor = color;\n"+"}";return shader;}}));x3dom.registerNodeType("SegmentedVolumeData","VolumeRendering",defineClass(x3dom.nodeTypes.X3DVolumeDataNode,function(ctx){x3dom.nodeTypes.SegmentedVolumeData.superClass.call(this,ctx);this.addField_MFNode('renderStyle',x3dom.nodeTypes.X3DComposableVolumeRenderStyleNode);this.addField_SFNode('segmentIdentifiers',x3dom.nodeTypes.Texture);this.addField_SFFloat(ctx,'numberOfMaxSegments',10.0);this.uniformSampler2DSegmentIdentifiers=new x3dom.nodeTypes.Uniform(ctx);this.normalTextureProvided=false;this.vrcMultiTexture=new x3dom.nodeTypes.MultiTexture(ctx);this.vrcVolumeTexture=null;this.vrcSinglePassShader=new x3dom.nodeTypes.ComposedShader(ctx);this.vrcSinglePassShaderVertex=new x3dom.nodeTypes.ShaderPart(ctx);this.vrcSinglePassShaderFragment=new x3dom.nodeTypes.ShaderPart(ctx);this.vrcSinglePassShaderFieldBackCoord=new x3dom.nodeTypes.Field(ctx);this.vrcSinglePassShaderFieldVolData=new x3dom.nodeTypes.Field(ctx);this.vrcSinglePassShaderFieldOffset=new x3dom.nodeTypes.Field(ctx);this.vrcSinglePassShaderFieldDimensions=new x3dom.nodeTypes.Field(ctx);},{fieldChanged:function(fieldName){if(fieldName==="numberOfMaxSegments"||fieldname==="segmentIdentifiers"){}},uniforms:function(){var unis=[];if(this._cf.segmentIdentifiers.node){this.uniformSampler2DSegmentIdentifiers._vf.name='uSegmentIdentifiers';this.uniformSampler2DSegmentIdentifiers._vf.type='SFInt32';this.uniformSampler2DSegmentIdentifiers._vf.value=this._textureID++;unis.push(this.uniformSampler2DSegmentIdentifiers);}
if(this._cf.renderStyle.nodes){var i,n=this._cf.renderStyle.nodes.length;for(i=0;i<n;i++){var that=this;Array.forEach(this._cf.renderStyle.nodes[i].uniforms(),function(uniform){var contains_uniform=false;Array.forEach(unis,function(accum){if(accum._vf.name==uniform._vf.name){contains_uniform=true;}});if(contains_uniform==false){unis=unis.concat(uniform);}});}}
return unis;},textures:function(){var texs=[];if(this._cf.segmentIdentifiers.node){var tex=this._cf.segmentIdentifiers.node;tex._vf.repeatS=false;tex._vf.repeatT=false;texs.push(tex);}
var i,n=this._cf.renderStyle.nodes.length;for(i=0;i<n;i++){Array.forEach(this._cf.renderStyle.nodes[i].textures(),function(texture){var contains_texture=false;Array.forEach(texs,function(accum){if(accum._vf.url[0]==texture._vf.url[0]){contains_texture=true;}});if(contains_texture==false){texs=texs.concat(texture);}});}
return texs;},initializeValues:function(){var initialValues="";var n=this._cf.renderStyle.nodes.length;for(var i=0;i<n;i++){if(this._cf.renderStyle.nodes[i].initializeValues!=undefined){initialValues+=this._cf.renderStyle.nodes[i].initializeValues()+"\n";}}
return initialValues;},styleUniformsShaderText:function(){var styleText="const float maxSegments = "+this._vf.numberOfMaxSegments.toPrecision(3)+";\n"+"uniform sampler2D uSegmentIdentifiers;\n";var n=this._cf.renderStyle.nodes.length;for(var i=0;i<n;i++){styleText+=this._cf.renderStyle.nodes[i].styleUniformsShaderText()+"\n";if(this._cf.renderStyle.nodes[i]._cf.surfaceNormals&&this._cf.renderStyle.nodes[i]._cf.surfaceNormals.node!=null){styleText+="uniform sampler2D uSurfaceNormals;\n";this.normalTextureProvided=true;this.surfaceNormals=this._cf.renderStyle.nodes[i]._cf.surfaceNormals.node;}
if(!x3dom.isa(this._cf.renderStyle.nodes[i],x3dom.nodeTypes.OpacityMapVolumeStyle)){this.surfaceNormalsNeeded=true;}}
return styleText;},styleShaderText:function(){var styleText="";var n=this._cf.renderStyle.nodes.length;for(var i=0;i<n;i++){if(this._cf.renderStyle.nodes[i].styleShaderText!=undefined){styleText+=this._cf.renderStyle.nodes[i].styleShaderText()+"\n";}}
return styleText;},inlineStyleShaderText:function(){var inlineText="";if(this._cf.segmentIdentifiers.node){inlineText+=" float t_id = cTexture3D(uSegmentIdentifiers, ray_pos, numberOfSlices, slicesOverX, slicesOverY).r;\n"+" int s_id = int(clamp(floor(t_id*maxSegments-0.5),0.0,maxSegments));\n"+" opacityFactor = 10.0;\n";if(x3dom.nodeTypes.X3DLightNode.lightID>0){inlineText+=" lightFactor = 1.0;\n";}else{inlineText+=" lightFactor = 1.2;\n";}}else{inlineText+=" int s_id = 0;\n";}
var n=this._cf.renderStyle.nodes.length;for(var i=0;i<n;i++){inlineText+=" if (s_id == "+i+"){\n"+
this._cf.renderStyle.nodes[i].inlineStyleShaderText()+" }\n";}
return inlineText;},lightAssigment:function(){return this._cf.renderStyle.nodes[0].lightAssigment();},lightEquationShaderText:function(){return this._cf.renderStyle.nodes[0].lightEquationShaderText();},nodeChanged:function()
{if(!this._cf.appearance.node)
{var i;this.addChild(new x3dom.nodeTypes.Appearance());this.vrcVolumeTexture=this._cf.voxels.node;this.vrcVolumeTexture._vf.repeatS=false;this.vrcVolumeTexture._vf.repeatT=false;this.vrcMultiTexture._nameSpace=this._nameSpace;this.vrcMultiTexture.addChild(this.vrcVolumeTexture,'texture');this.vrcVolumeTexture.nodeChanged();var styleTextures=this.textures();for(i=0;i<styleTextures.length;i++)
{this.vrcMultiTexture.addChild(styleTextures[i],'texture');this.vrcVolumeTexture.nodeChanged();}
this._cf.appearance.node.addChild(this.vrcMultiTexture);this.vrcMultiTexture.nodeChanged();for(var i=0;i<this._cf.renderStyle.nodes.length;i++){this._cf.renderStyle.nodes[i].updateProperties(this);}
this.vrcSinglePassShaderVertex._vf.type='vertex';this.vrcSinglePassShaderVertex._vf.url[0]=this.vertexShaderText();this.vrcSinglePassShaderFragment._vf.type='fragment';shaderText=this.fragmentPreamble+
this.defaultUniformsShaderText(this.vrcVolumeTexture._vf.numberOfSlices,this.vrcVolumeTexture._vf.slicesOverX,this.vrcVolumeTexture._vf.slicesOverY)+
this.styleUniformsShaderText()+
this.styleShaderText()+
this.texture3DFunctionShaderText+
this.normalFunctionShaderText()+
this.lightEquationShaderText()+
this.defaultLoopFragmentShaderText(this.inlineStyleShaderText(),this.lightAssigment(),this.initializeValues());this.vrcSinglePassShaderFragment._vf.url[0]=shaderText;this.vrcSinglePassShader.addChild(this.vrcSinglePassShaderVertex,'parts');this.vrcSinglePassShaderVertex.nodeChanged();this.vrcSinglePassShader.addChild(this.vrcSinglePassShaderFragment,'parts');this.vrcSinglePassShaderFragment.nodeChanged();this.vrcSinglePassShaderFieldVolData._vf.name='uVolData';this.vrcSinglePassShaderFieldVolData._vf.type='SFInt32';this.vrcSinglePassShaderFieldVolData._vf.value=this._textureID++;this.vrcSinglePassShaderFieldDimensions._vf.name='dimensions';this.vrcSinglePassShaderFieldDimensions._vf.type='SFVec3f';this.vrcSinglePassShaderFieldDimensions._vf.value=this._vf.dimensions;this.vrcSinglePassShaderFieldOffset._vf.name='offset';this.vrcSinglePassShaderFieldOffset._vf.type='SFVec3f';this.vrcSinglePassShaderFieldOffset._vf.value="0.01 0.01 0.01";this.vrcSinglePassShader.addChild(this.vrcSinglePassShaderFieldVolData,'fields');this.vrcSinglePassShaderFieldVolData.nodeChanged();this.vrcSinglePassShader.addChild(this.vrcSinglePassShaderFieldDimensions,'fields');this.vrcSinglePassShaderFieldDimensions.nodeChanged();this.vrcSinglePassShader.addChild(this.vrcSinglePassShaderFieldOffset,'fields');this.offsetInterval=window.setInterval((function(aTex,obj){return function(){x3dom.debug.logInfo('[VolumeRendering][SegmentedVolumeData] Looking for Volume Texture size...');var s=obj.getTextureSize(aTex);if(s.valid){clearInterval(obj.offsetInterval);obj.vrcSinglePassShaderFieldOffset._vf.value=new x3dom.fields.SFVec3f(1.0/(s.w/aTex._vf.slicesOverX),1.0/(s.h/aTex._vf.slicesOverY),1.0/aTex._vf.numberOfSlices);obj.vrcSinglePassShader.nodeChanged();x3dom.debug.logInfo('[VolumeRendering][SegmentedVolumeData] Volume Texture size obtained');}}})(this.vrcVolumeTexture,this),1000);var ShaderUniforms=this.uniforms();for(i=0;i<ShaderUniforms.length;i++)
{this.vrcSinglePassShader.addChild(ShaderUniforms[i],'fields');}
this._cf.appearance.node.addChild(this.vrcSinglePassShader);this.vrcSinglePassShader.nodeChanged();this._cf.appearance.node.nodeChanged();}
if(!this._cf.geometry.node){this.addChild(new x3dom.nodeTypes.Box());this._cf.geometry.node._vf.size=new x3dom.fields.SFVec3f(this._vf.dimensions.x,this._vf.dimensions.y,this._vf.dimensions.z);this._cf.geometry.node.fieldChanged("size");}}}));x3dom.registerNodeType("ShadedVolumeStyle","VolumeRendering",defineClass(x3dom.nodeTypes.X3DComposableVolumeRenderStyleNode,function(ctx){x3dom.nodeTypes.ShadedVolumeStyle.superClass.call(this,ctx);this.addField_SFNode('material',x3dom.nodeTypes.X3DMaterialNode);this.addField_SFBool(ctx,'lighting',false);this.addField_SFBool(ctx,'shadows',false);this.addField_SFString(ctx,'phaseFunction',"Henyey-Greenstein");this.uniformBoolLigthning=new x3dom.nodeTypes.Uniform(ctx);this.uniformBoolShadows=new x3dom.nodeTypes.Uniform(ctx);this.uniformSampler2DSurfaceNormals=new x3dom.nodeTypes.Uniform(ctx);this.uniformColorSpecular=new x3dom.nodeTypes.Uniform(ctx);this.uniformFloatAmbientIntensity=new x3dom.nodeTypes.Uniform(ctx);this.uniformFloatShininess=new x3dom.nodeTypes.Uniform(ctx);this.uniformFloatTransparency=new x3dom.nodeTypes.Uniform(ctx);this.uniformColorEmissive=new x3dom.nodeTypes.Uniform(ctx);this.uniformColorDiffuse=new x3dom.nodeTypes.Uniform(ctx);this.uniformBoolEnableShaded=new x3dom.nodeTypes.Uniform(ctx);},{fieldChanged:function(fieldName){switch(fieldName){case'lightning':this.uniformBoolLightning._vf.value=this._vf.lightning;this.uniformBoolLightning.fieldChanged("value");break;case'shadows':this.uniformBoolShadows._vf.value=this._vf.shadows;this.uniformBoolShadows.fieldChanged("value");break;default:break;}},uniforms:function(){var unis=[];if(this._cf.surfaceNormals.node){this.uniformSampler2DSurfaceNormals._vf.name='uSurfaceNormals';this.uniformSampler2DSurfaceNormals._vf.type='SFInt32';this.uniformSampler2DSurfaceNormals._vf.value=this._volumeDataParent._textureID++;unis.push(this.uniformSampler2DSurfaceNormals);}
this.uniformBoolLigthning._vf.name='uLightning'+this._styleID;this.uniformBoolLigthning._vf.type='SFBool';this.uniformBoolLigthning._vf.value=this._vf.lighting;unis.push(this.uniformBoolLigthning);this.uniformBoolShadows._vf.name='uShadows'+this._styleID;this.uniformBoolShadows._vf.type='SFBool';this.uniformBoolShadows._vf.value=this._vf.shadows;unis.push(this.uniformBoolShadows);if(this._cf.material.node!=null){this.uniformColorSpecular._vf.name='specularColor'+this._styleID;this.uniformColorSpecular._vf.type='SFColor';this.uniformColorSpecular._vf.value=this._cf.material.node._vf.specularColor;unis.push(this.uniformColorSpecular);this.uniformColorDiffuse._vf.name='diffuseColor'+this._styleID;this.uniformColorDiffuse._vf.type='SFColor';this.uniformColorDiffuse._vf.value=this._cf.material.node._vf.diffuseColor;unis.push(this.uniformColorDiffuse);this.uniformColorEmissive._vf.name='emissiveColor'+this._styleID;this.uniformColorEmissive._vf.type='SFColor';this.uniformColorEmissive._vf.value=this._cf.material.node._vf.emissiveColor;unis.push(this.uniformColorEmissive);this.uniformFloatAmbientIntensity._vf.name='ambientIntensity'+this._styleID;this.uniformFloatAmbientIntensity._vf.type='SFFloat';this.uniformFloatAmbientIntensity._vf.value=this._cf.material.node._vf.ambientIntensity;unis.push(this.uniformFloatAmbientIntensity);this.uniformFloatShininess._vf.name='shininess'+this._styleID;this.uniformFloatShininess._vf.type='SFFloat';this.uniformFloatShininess._vf.value=this._cf.material.node._vf.shininess;unis.push(this.uniformFloatShininess);this.uniformFloatTransparency._vf.name='transparency'+this._styleID;this.uniformFloatTransparency._vf.type='SFFloat';this.uniformFloatTransparency._vf.value=this._cf.material.node._vf.transperency;unis.push(this.uniformFloatTransparency);}
this.uniformBoolEnableShaded._vf.name='uEnableShaded'+this._styleID;this.uniformBoolEnableShaded._vf.type='SFBool';this.uniformBoolEnableShaded._vf.value=this._vf.enabled;unis.push(this.uniformBoolEnableShaded);return unis;},textures:function(){var texs=[];if(this._cf.surfaceNormals.node){var tex=this._cf.surfaceNormals.node;tex._vf.repeatS=false;tex._vf.repeatT=false;texs.push(tex)}
return texs;},styleUniformsShaderText:function(){var uniformText="uniform bool uLightning"+this._styleID+";\n"+"uniform bool uShadows"+this._styleID+";\n"+"uniform float fogRange;\n"+"uniform vec3 fogColor;\n"+"uniform float fogType;\n"+"uniform bool uEnableShaded"+this._styleID+";\n";if(this._cf.material.node){uniformText+="uniform vec3 diffuseColor"+this._styleID+";\n"+"uniform vec3 specularColor"+this._styleID+";\n"+"uniform vec3 emissiveColor"+this._styleID+";\n"+"uniform float shininess"+this._styleID+";\n"+"uniform float transparency"+this._styleID+";\n"+"uniform float ambientIntensity"+this._styleID+";\n";}
return uniformText;},styleShaderText:function(){if(this._first){return"float computeFogInterpolant(float distanceFromPoint)\n"+"{\n"+" if (distanceFromPoint > fogRange){\n"+" return 0.0;\n"+" }else if (fogType == 0.0){\n"+" return clamp((fogRange-distanceFromPoint) / fogRange, 0.0, 1.0);\n"+" }else{\n"+" return clamp(exp(-distanceFromPoint / (fogRange-distanceFromPoint)), 0.0, 1.0);\n"+" }\n"+"}\n";}else{return"";}},lightEquationShaderText:function(){if(this._first){return"void lighting(in float lType, in vec3 lLocation, in vec3 lDirection, in vec3 lColor, in vec3 lAttenuation, "+"in float lRadius, in float lIntensity, in float lAmbientIntensity, in float lBeamWidth, "+"in float lCutOffAngle, in float ambientIntensity, in float shininess, in vec3 N, in vec3 V, inout vec3 ambient, inout vec3 diffuse, "+"inout vec3 specular)\n"+"{\n"+" vec3 L;\n"+" float spot = 1.0, attentuation = 0.0;\n"+" if(lType == 0.0) {\n"+" L = -normalize(lDirection);\n"+" V = normalize(V);\n"+" attentuation = 1.0;\n"+" } else{\n"+" L = (lLocation - (-V));\n"+" float d = length(L);\n"+" L = normalize(L);\n"+" V = normalize(V);\n"+" if(lRadius == 0.0 || d <= lRadius) {\n"+" attentuation = 1.0 / max(lAttenuation.x + lAttenuation.y * d + lAttenuation.z * (d * d), 1.0);\n"+" }\n"+" if(lType == 2.0) {\n"+" float spotAngle = acos(max(0.0, dot(-L, normalize(lDirection))));\n"+" if(spotAngle >= lCutOffAngle) spot = 0.0;\n"+" else if(spotAngle <= lBeamWidth) spot = 1.0;\n"+" else spot = (spotAngle - lCutOffAngle ) / (lBeamWidth - lCutOffAngle);\n"+" }\n"+" }\n"+" vec3 H = normalize( L + V );\n"+" float NdotL = max(0.0, dot(L, N));\n"+" float NdotH = max(0.0, dot(H, N));\n"+" float ambientFactor = lAmbientIntensity * ambientIntensity;\n"+" float diffuseFactor = lIntensity * NdotL;\n"+" float specularFactor = lIntensity * pow(NdotH, shininess*128.0);\n"+" ambient += lColor * ambientFactor * attentuation * spot;\n"+" diffuse += lColor * diffuseFactor * attentuation * spot;\n"+" specular += lColor * specularFactor * attentuation * spot;\n"+"}\n";}else{return"";}},inlineStyleShaderText:function(){if(this._first){return" float fogFactor = computeFogInterpolant(length(cam_pos-ray_pos));\n";}else{return"";}},lightAssigment:function(){var shaderText=" if(uEnableShaded"+this._styleID+"){\n";for(var l=0;l<x3dom.nodeTypes.X3DLightNode.lightID;l++){shaderText+=" lighting(light"+l+"_Type, "+"light"+l+"_Location, "+"light"+l+"_Direction, "+"light"+l+"_Color, "+"light"+l+"_Attenuation, "+"light"+l+"_Radius, "+"light"+l+"_Intensity, "+"light"+l+"_AmbientIntensity, "+"light"+l+"_BeamWidth, "+"light"+l+"_CutOffAngle, "+"ambientIntensity"+this._styleID+", "+"shininess"+this._styleID+", "+"grad.xyz, positionE.xyz, ambient, diffuse, specular);\n";}
if(this._vf.lighting==true){if(this._cf.material.node){shaderText+=" value.rgb = (fogColor*(1.0-fogFactor))+fogFactor*(emissiveColor"+this._styleID+" + ambient*value.rgb + diffuse*diffuseColor"+this._styleID+"*value.rgb + specular*specularColor"+this._styleID+");\n"+" value.a = value.a*(1.0-transparency"+this._styleID+");\n";}else{shaderText+=" value.rgb = (fogColor*(1.0-fogFactor))+fogFactor*(ambient*value.rgb + diffuse*value.rgb + specular);\n";}}
shaderText+=" }\n";return shaderText;}}));x3dom.registerNodeType("SilhouetteEnhancementVolumeStyle","VolumeRendering",defineClass(x3dom.nodeTypes.X3DComposableVolumeRenderStyleNode,function(ctx){x3dom.nodeTypes.SilhouetteEnhancementVolumeStyle.superClass.call(this,ctx);this.addField_SFFloat(ctx,'silhouetteBoundaryOpacity',0);this.addField_SFFloat(ctx,'silhouetteRetainedOpacity',1);this.addField_SFFloat(ctx,'silhouetteSharpness',0.5);this.uniformFloatBoundaryOpacity=new x3dom.nodeTypes.Uniform(ctx);this.uniformFloatRetainedOpacity=new x3dom.nodeTypes.Uniform(ctx);this.uniformFloatSilhouetteSharpness=new x3dom.nodeTypes.Uniform(ctx);this.uniformSampler2DSurfaceNormals=new x3dom.nodeTypes.Uniform(ctx);this.uniformBoolEnableSilhouette=new x3dom.nodeTypes.Uniform(ctx);},{fieldChanged:function(fieldName){switch(fieldName){case'silhouetteBoundaryOpacity':this.uniformFloatBoundaryOpacity._vf.value=this._vf.silhouetteBoundaryOpacity;this.uniformFloatBoundaryOpacity.fieldChanged("value");break;case'silhouetteRetainedOpacity':this.uniformFloatRetainedOpacity._vf.value=this._vf.silhouetteRetainedOpacity;this.uniformFloatRetainedOpacity.fieldChanged("value");break;case'silhouetteSharpness':this.uniformFloatSilhouetteSharpness._vf.value=this._vf.silhouetteSharpness;this.uniformFloatSilhouetteSharpness.fieldChanged("value");break;}},uniforms:function(){var unis=[];if(this._cf.surfaceNormals.node){this.uniformSampler2DSurfaceNormals._vf.name='uSurfaceNormals';this.uniformSampler2DSurfaceNormals._vf.type='SFInt32';this.uniformSampler2DSurfaceNormals._vf.value=this._volumeDataParent._textureID++;unis.push(this.uniformSampler2DSurfaceNormals);}
this.uniformFloatBoundaryOpacity._vf.name='uSilhouetteBoundaryOpacity'+this._styleID;this.uniformFloatBoundaryOpacity._vf.type='SFFloat';this.uniformFloatBoundaryOpacity._vf.value=this._vf.silhouetteBoundaryOpacity;unis.push(this.uniformFloatBoundaryOpacity);this.uniformFloatRetainedOpacity._vf.name='uSilhouetteRetainedOpacity'+this._styleID;this.uniformFloatRetainedOpacity._vf.type='SFFloat';this.uniformFloatRetainedOpacity._vf.value=this._vf.silhouetteRetainedOpacity;unis.push(this.uniformFloatRetainedOpacity);this.uniformFloatSilhouetteSharpness._vf.name='uSilhouetteSharpness'+this._styleID;this.uniformFloatSilhouetteSharpness._vf.type='SFFloat';this.uniformFloatSilhouetteSharpness._vf.value=this._vf.silhouetteSharpness;unis.push(this.uniformFloatSilhouetteSharpness);this.uniformBoolEnableSilhouette._vf.name='uEnableSilhouette'+this._styleID;this.uniformBoolEnableSilhouette._vf.type='SFBool';this.uniformBoolEnableSilhouette._vf.value=this._vf.enabled;unis.push(this.uniformBoolEnableSilhouette);return unis;},textures:function(){var texs=[];if(!(this._cf.surfaceNormals.node==null)){var tex=this._cf.surfaceNormals.node;tex._vf.repeatS=false;tex._vf.repeatT=false;texs.push(tex)}
return texs;},styleUniformsShaderText:function(){return"uniform float uSilhouetteBoundaryOpacity"+this._styleID+";\n"+"uniform float uSilhouetteRetainedOpacity"+this._styleID+";\n"+"uniform float uSilhouetteSharpness"+this._styleID+";\n"+"uniform bool uEnableSilhouette"+this._styleID+";\n";},styleShaderText:function(){if(this._first){return"void silhouetteEnhancement(inout vec4 orig_color, in vec4 normal, in vec3 V, in float sBoundary, in float sRetained, in float sSharpness)\n"+"{\n"+" if(normal.w > 0.02){\n"+" orig_color.a = orig_color.a * (sRetained + sBoundary * pow((1.0-abs(dot(normal.xyz, V))), sSharpness));\n"+" }\n"+"}\n"+"\n";}else{return"";}},inlineStyleShaderText:function(){var inlineText=" if(uEnableSilhouette"+this._styleID+"){\n"+" silhouetteEnhancement(value, gradEye, dir, uSilhouetteBoundaryOpacity"+this._styleID+", uSilhouetteRetainedOpacity"+this._styleID+", uSilhouetteSharpness"+this._styleID+");\n"+" }\n";return inlineText;}}));x3dom.registerNodeType("StippleVolumeStyle","VolumeRendering",defineClass(x3dom.nodeTypes.X3DVolumeRenderStyleNode,function(ctx){x3dom.nodeTypes.StippleVolumeStyle.superClass.call(this,ctx);this.addField_SFFloat(ctx,'distanceFactor',1);this.addField_SFFloat(ctx,'interiorFactor',1);this.addField_SFFloat(ctx,'lightingFactor',1);this.addField_SFFloat(ctx,'gradientThreshold',0.4);this.addField_SFFloat(ctx,'gradientRetainedOpacity',1);this.addField_SFFloat(ctx,'gradientBoundaryOpacity',0);this.addField_SFFloat(ctx,'gradientOpacityFactor',1);this.addField_SFFloat(ctx,'silhouetteRetainedOpacity',1);this.addField_SFFloat(ctx,'silhouetteBoundaryOpacity',0);this.addField_SFFloat(ctx,'silhouetteOpacityFactor',1);this.addField_SFFloat(ctx,'resolutionFactor',1);}));x3dom.registerNodeType("ToneMappedVolumeStyle","VolumeRendering",defineClass(x3dom.nodeTypes.X3DComposableVolumeRenderStyleNode,function(ctx){x3dom.nodeTypes.ToneMappedVolumeStyle.superClass.call(this,ctx);this.addField_SFColor(ctx,'coolColor',0,0,1);this.addField_SFColor(ctx,'warmColor',1,1,0);this.uniformCoolColor=new x3dom.nodeTypes.Uniform(ctx);this.uniformWarmColor=new x3dom.nodeTypes.Uniform(ctx);this.uniformSampler2DSurfaceNormals=new x3dom.nodeTypes.Uniform(ctx);this.uniformBoolEnableToneMapped=new x3dom.nodeTypes.Uniform(ctx);},{fieldChanged:function(fieldName){switch(fieldName){case'coolColor':this.uniformCoolColor._vf.value=this._vf.coolColor;this.uniformCoolColor.fieldChanged("value");break;case'warmColor':this.uniformWarmColor._vf.value=this._vf.warmColor;this.uniformWarmColor.fieldChanged("value");break;}},uniforms:function(){var unis=[];if(this._cf.surfaceNormals.node){this.uniformSampler2DSurfaceNormals._vf.name='uSurfaceNormals';this.uniformSampler2DSurfaceNormals._vf.type='SFInt32';this.uniformSampler2DSurfaceNormals._vf.value=this._volumeDataParent._textureID++;unis.push(this.uniformSampler2DSurfaceNormals);}
this.uniformCoolColor._vf.name='uCoolColor'+this._styleID;this.uniformCoolColor._vf.type='SFColor';this.uniformCoolColor._vf.value=this._vf.coolColor;unis.push(this.uniformCoolColor);this.uniformWarmColor._vf.name='uWarmColor'+this._styleID;this.uniformWarmColor._vf.type='SFColor';this.uniformWarmColor._vf.value=this._vf.warmColor;unis.push(this.uniformWarmColor);this.uniformBoolEnableToneMapped._vf.name='uEnableToneMapped'+this._styleID;this.uniformBoolEnableToneMapped._vf.type='SFBool';this.uniformBoolEnableToneMapped._vf.value=this._vf.enabled;unis.push(this.uniformBoolEnableToneMapped);return unis;},textures:function(){var texs=[];if(this._cf.surfaceNormals.node){var tex=this._cf.surfaceNormals.node;tex._vf.repeatS=false;tex._vf.repeatT=false;texs.push(tex)}
return texs;},styleUniformsShaderText:function(){return"uniform vec3 uCoolColor"+this._styleID+";\n"+"uniform vec3 uWarmColor"+this._styleID+";\n"+"uniform bool uEnableToneMapped"+this._styleID+";\n";},styleShaderText:function(){if(this._first){return"void toneMapped(inout vec4 original_color, inout vec3 accum_color, in vec4 surfNormal, in vec3 lightDir, in vec3 cColor, in vec3 wColor)\n"+"{\n"+" if(surfNormal.a > 0.02){\n"+" float color_factor = (1.0 + dot(lightDir, surfNormal.xyz))*0.5;\n"+" accum_color += mix(wColor, cColor, color_factor);\n"+" original_color.rgb = accum_color;\n"+" }else{\n"+" accum_color += mix(wColor, cColor, 0.5);\n"+" original_color.rgb = accum_color;\n"+" }\n"+"}\n";}else{return"";}},inlineStyleShaderText:function(){var shaderText=" if(uEnableToneMapped"+this._styleID+"){\n"+" vec3 toneColor = vec3(0.0, 0.0, 0.0);\n"+" vec3 L = vec3(0.0, 0.0, 0.0);\n";for(var l=0;l<x3dom.nodeTypes.X3DLightNode.lightID;l++){shaderText+=" L = (light"+l+"_Type == 1.0) ? normalize(light"+l+"_Location - positionE.xyz) : -light"+l+"_Direction;\n"+" toneMapped(value, toneColor, grad, L, uCoolColor"+this._styleID+", uWarmColor"+this._styleID+");\n";}
shaderText+=" }\n";return shaderText;},lightAssigment:function(){return"";}}));x3dom.registerNodeType("VolumeData","VolumeRendering",defineClass(x3dom.nodeTypes.X3DVolumeDataNode,function(ctx){x3dom.nodeTypes.VolumeData.superClass.call(this,ctx);this.addField_SFNode('renderStyle',x3dom.nodeTypes.X3DVolumeRenderStyleNode);this.vrcMultiTexture=new x3dom.nodeTypes.MultiTexture(ctx);this.vrcVolumeTexture=null;this.vrcSinglePassShader=new x3dom.nodeTypes.ComposedShader(ctx);this.vrcSinglePassShaderVertex=new x3dom.nodeTypes.ShaderPart(ctx);this.vrcSinglePassShaderFragment=new x3dom.nodeTypes.ShaderPart(ctx);this.vrcSinglePassShaderFieldBackCoord=new x3dom.nodeTypes.Field(ctx);this.vrcSinglePassShaderFieldVolData=new x3dom.nodeTypes.Field(ctx);this.vrcSinglePassShaderFieldOffset=new x3dom.nodeTypes.Field(ctx);this.vrcSinglePassShaderFieldDimensions=new x3dom.nodeTypes.Field(ctx);},{initializeValues:function(){var initialValues="";if(this._cf.renderStyle.node.initializeValues!=undefined){initialValues+=this._cf.renderStyle.node.initializeValues();}
return initialValues;},styleUniformsShaderText:function(){var styleUniformsText=this._cf.renderStyle.node.styleUniformsShaderText();this.surfaceNormalsNeeded=true;if(this._cf.renderStyle.node._cf.surfaceNormals&&this._cf.renderStyle.node._cf.surfaceNormals.node!=null){styleUniformsText+="uniform sampler2D uSurfaceNormals;\n";this.normalTextureProvided=true;this.surfaceNormals=this._cf.renderStyle.node._cf.surfaceNormals.node;}else if(x3dom.isa(this._cf.renderStyle.node,x3dom.nodeTypes.OpacityMapVolumeStyle)){this.surfaceNormalsNeeded=false;this.normalTextureProvided=false;}
return styleUniformsText;},styleShaderText:function(){var styleText="";if(this._cf.renderStyle.node.styleShaderText!=undefined){styleText+=this._cf.renderStyle.node.styleShaderText();}
return styleText;},inlineStyleShaderText:function(){return this._cf.renderStyle.node.inlineStyleShaderText();},lightAssigment:function(){return this._cf.renderStyle.node.lightAssigment();},lightEquationShaderText:function(){return this._cf.renderStyle.node.lightEquationShaderText();},nodeChanged:function()
{if(!this._cf.appearance.node)
{var i;this.addChild(new x3dom.nodeTypes.Appearance());this.vrcVolumeTexture=this._cf.voxels.node;this.vrcVolumeTexture._vf.repeatS=false;this.vrcVolumeTexture._vf.repeatT=false;this.vrcMultiTexture._nameSpace=this._nameSpace;this.vrcMultiTexture.addChild(this.vrcVolumeTexture,'texture');this.vrcVolumeTexture.nodeChanged();if(this._cf.renderStyle.node.textures){var styleTextures=this._cf.renderStyle.node.textures();for(i=0;i<styleTextures.length;i++)
{this.vrcMultiTexture.addChild(styleTextures[i],'texture');this.vrcVolumeTexture.nodeChanged();}}
this._cf.appearance.node.addChild(this.vrcMultiTexture);this.vrcMultiTexture.nodeChanged();this._cf.renderStyle.node.updateProperties(this);this.vrcSinglePassShaderVertex._vf.type='vertex';this.vrcSinglePassShaderVertex._vf.url[0]=this.vertexShaderText();this.vrcSinglePassShaderFragment._vf.type='fragment';var shaderText="";if(x3dom.isa(this._cf.renderStyle.node,x3dom.nodeTypes.X3DComposableVolumeRenderStyleNode)){shaderText+=this.fragmentPreamble+
this.defaultUniformsShaderText(this.vrcVolumeTexture._vf.numberOfSlices,this.vrcVolumeTexture._vf.slicesOverX,this.vrcVolumeTexture._vf.slicesOverY)+
this.styleUniformsShaderText()+
this.styleShaderText()+
this.texture3DFunctionShaderText+
this.normalFunctionShaderText()+
this.lightEquationShaderText()+
this.defaultLoopFragmentShaderText(this.inlineStyleShaderText(),this.lightAssigment(),this.initializeValues());}else{shaderText+=this._cf.renderStyle.node.fragmentShaderText(this.vrcVolumeTexture._vf.numberOfSlices,this.vrcVolumeTexture._vf.slicesOverX,this.vrcVolumeTexture._vf.slicesOverY);}
this.vrcSinglePassShaderFragment._vf.url[0]=shaderText;this.vrcSinglePassShader.addChild(this.vrcSinglePassShaderVertex,'parts');this.vrcSinglePassShaderVertex.nodeChanged();this.vrcSinglePassShader.addChild(this.vrcSinglePassShaderFragment,'parts');this.vrcSinglePassShaderFragment.nodeChanged();this.vrcSinglePassShaderFieldVolData._vf.name='uVolData';this.vrcSinglePassShaderFieldVolData._vf.type='SFInt32';this.vrcSinglePassShaderFieldVolData._vf.value=this._textureID++;this.vrcSinglePassShaderFieldDimensions._vf.name='dimensions';this.vrcSinglePassShaderFieldDimensions._vf.type='SFVec3f';this.vrcSinglePassShaderFieldDimensions._vf.value=this._vf.dimensions;this.vrcSinglePassShaderFieldOffset._vf.name='offset';this.vrcSinglePassShaderFieldOffset._vf.type='SFVec3f';this.vrcSinglePassShaderFieldOffset._vf.value="0.01 0.01 0.01";this.vrcSinglePassShader.addChild(this.vrcSinglePassShaderFieldVolData,'fields');this.vrcSinglePassShaderFieldVolData.nodeChanged();this.vrcSinglePassShader.addChild(this.vrcSinglePassShaderFieldDimensions,'fields');this.vrcSinglePassShaderFieldDimensions.nodeChanged();this.vrcSinglePassShader.addChild(this.vrcSinglePassShaderFieldOffset,'fields');this.offsetInterval=window.setInterval((function(aTex,obj){return function(){x3dom.debug.logInfo('[VolumeRendering][VolumeData] Looking for Volume Texture size...');var s=obj.getTextureSize(aTex);if(s.valid){clearInterval(obj.offsetInterval);obj.vrcSinglePassShaderFieldOffset._vf.value=new x3dom.fields.SFVec3f(1.0/(s.w/aTex._vf.slicesOverX),1.0/(s.h/aTex._vf.slicesOverY),1.0/aTex._vf.numberOfSlices);obj.vrcSinglePassShader.nodeChanged();x3dom.debug.logInfo('[VolumeRendering][VolumeData] Volume Texture size obtained');}}})(this.vrcVolumeTexture,this),1000);var ShaderUniforms=this._cf.renderStyle.node.uniforms();for(i=0;i<ShaderUniforms.length;i++)
{this.vrcSinglePassShader.addChild(ShaderUniforms[i],'fields');}
this._cf.appearance.node.addChild(this.vrcSinglePassShader);this.vrcSinglePassShader.nodeChanged();this._cf.appearance.node.nodeChanged();}
if(!this._cf.geometry.node){this.addChild(new x3dom.nodeTypes.Box());this._cf.geometry.node._vf.hasHelperColors=false;this._cf.geometry.node._vf.size=new x3dom.fields.SFVec3f(this._vf.dimensions.x,this._vf.dimensions.y,this._vf.dimensions.z);this._cf.geometry.node.fieldChanged("size");}}}));
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* X3DOM JavaScript Library
* http://www.x3dom.org
*
* (C)2009 Fraunhofer IGD, Darmstadt, Germany
* Dual licensed under the MIT and GPL
*
* Based on code originally provided by
* Philip Taylor: http://philip.html5.org
*/
body {
background-color: white;
font-family: Helvetica, sans-serif;
font-size: 12px;
}
X3D, x3d {
position:relative; /* in order to be able to position stat-div within X3D */
float:left; /* float the element so it has the same size like the canvas */
cursor:pointer;
margin: 0;
padding: 0;
border: 1px solid #000;
}
object {
margin: 0;
padding: 0;
border: none;
z-index: 0;
width:100%;
height:100%;
float:left;
}
X3D:hover,
x3d:hover,
.x3dom-canvas:hover {
-webkit-user-select: none;
-webkit-touch-callout: none;
}
.x3dom-canvas {
border:none;
cursor:pointer;
cursor:-webkit-grab;
cursor:grab;
width:100%;
height:100%;
float:left;
}
.x3dom-canvas-mousedown {
cursor:-webkit-grabbing;
cursor:grabbing;
}
.x3dom-canvas:focus {
outline:none;
}
.x3dom-progress {
margin: 0;
padding: 6px 8px 0px 26px;
left: 0px;
top: 0px;
position: absolute;
color: #0f0;
font-family: Helvetica, sans-serif;
line-height:10px;
font-size: 10px;
min-width: 45px;
min-height: 20px;
border: 0px;
background-position: 4px 4px;
background-repeat: no-repeat;
background-color: #333;
background-color: rgba(51, 51, 51, 0.9);
z-index: 100;
background-image: url('data:image/gif;base64,R0lGODlhEAAQAPQAADMzM////z4+Po+Pj0pKSsbGxpycnP///7e3t+Hh4XR0dGZmZu7u7oGBgfr6+tLS0qqqqgAAAAAAAAAAAAA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h+QQJCgAAACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==');
}
.x3dom-progress.bar span {
position: absolute;
left: 0;
top: 0;
line-height: 20px;
background-color: red;
}
.x3dom-statdiv {
margin: 0;
padding: 0;
right: 10px;
top: 10px;
position: absolute;
color: #0f0;
font-family: Helvetica, sans-serif;
line-height:10px;
font-size: 10px;
width: 75px;
height: 70px;
border: 0px;
}
#x3dom-state-canvas {
margin: 2px;
padding: 0;
right: 0%;
top: 0%;
position: absolute;
}
#x3dom-state-viewer {
position: absolute;
margin: 2px;
padding: 5px;
width: 135px;
top: 0%;
right: 0%;
opacity: 0.9;
background-color: #323232;
z-index: 1000;
font-family: Arial, sans-serif;
color: #C8C8C8;
font-weight: bold;
text-transform: uppercase;
cursor: help;
}
.x3dom-states-head {
display: block;
font-size: 26px;
}
.x3dom-states-rendermode-software {
font-size: 10px;
margin: 0 0 2px 2px;
}
.x3dom-states-rendermode-hardware {
font-size: 10px;
margin: 0 0 2px 2px;
}
.x3dom-states-head2 {
font-size: 10px;
}
.x3dom-states-list {
float: left;
width: 100%;
border-top: 1px solid #C8C8C8;
list-style: none;
font-size: 9px;
line-height: 16px;
margin:0;
padding: 0;
padding-top: 2px;
}
.x3dom-states-item {
width: 100%;
float: left;
}
.x3dom-states-item-title {
float: left;
margin-left: 2px;
}
.x3dom-states-item-value {
float: right;
margin-right: 2px;
}
.x3dom-touch-marker {
display: inline;
padding: 5px;
border-radius: 10px;
position: absolute;
font-family: Helvetica, sans-serif;
line-height:10px;
font-size: 10px;
color: darkorange;
background: cornsilk;
opacity: 0.6;
border: 2px solid orange;
z-index: 200;
}
.x3dom-logContainer {
border: 2px solid olivedrab;
height: 200px;
padding: 4px;
overflow: auto;
white-space: pre-wrap;
font-family: sans-serif;
font-size: x-small;
color: #00ff00;
background-color: black;
margin-right: 10px;
}
.x3dom-nox3d {
font-family: Helvetica, sans-serif;
font-size: 14px;
background-color: #eb7a7a;
padding: 1em;
opacity: 0.75;
}
.x3dom-nox3d p {
color: #fff;
font-size: 14px;
}
.x3dom-nox3d a {
color: #fff;
font-size: 14px;
}
/* self-clearing floats */
.group:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment