summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2014-10-10 20:46:33 +0200
committerAlexander Shorin <kxepal@apache.org>2014-12-10 14:07:01 +0300
commit78f367cfaf4c8dccdab60535f01833181a462a7f (patch)
treeb167a48c892860421e2b7094b1fde2b1a241e493
parent6a4893aabdb26eb957a4e57be91ff8d0152161f8 (diff)
downloadcouchdb-78f367cfaf4c8dccdab60535f01833181a462a7f.tar.gz
Goodbye Futon, old friend <3
-rw-r--r--share/www/_sidebar.html67
-rw-r--r--share/www/config.html135
-rw-r--r--share/www/couch_tests.html98
-rw-r--r--share/www/custom_test.html112
-rw-r--r--share/www/database.html270
-rw-r--r--share/www/dialog/_admin_party.html33
-rw-r--r--share/www/dialog/_change_password.html31
-rw-r--r--share/www/dialog/_compact_cleanup.html51
-rw-r--r--share/www/dialog/_create_admin.html50
-rw-r--r--share/www/dialog/_create_config.html42
-rw-r--r--share/www/dialog/_create_database.html33
-rw-r--r--share/www/dialog/_database_security.html50
-rw-r--r--share/www/dialog/_delete_database.html29
-rw-r--r--share/www/dialog/_delete_document.html26
-rw-r--r--share/www/dialog/_login.html34
-rw-r--r--share/www/dialog/_save_view_as.html35
-rw-r--r--share/www/dialog/_share_test_reports.html42
-rw-r--r--share/www/dialog/_signup.html35
-rw-r--r--share/www/dialog/_upload_attachment.html36
-rw-r--r--share/www/document.html114
-rw-r--r--share/www/fauxton/css/index.css37
-rw-r--r--share/www/fauxton/img/FontAwesome.otfbin61896 -> 0 bytes
-rw-r--r--share/www/fauxton/img/couchdb-site.pngbin4946 -> 0 bytes
-rw-r--r--share/www/fauxton/img/couchdblogo.pngbin2738 -> 0 bytes
-rw-r--r--share/www/fauxton/img/fontawesome-webfont.eotbin37405 -> 0 bytes
-rw-r--r--share/www/fauxton/img/fontawesome-webfont.svg399
-rw-r--r--share/www/fauxton/img/fontawesome-webfont.ttfbin79076 -> 0 bytes
-rw-r--r--share/www/fauxton/img/fontawesome-webfont.woffbin43572 -> 0 bytes
-rw-r--r--share/www/fauxton/img/fontcustom_fauxton.eotbin7364 -> 0 bytes
-rw-r--r--share/www/fauxton/img/fontcustom_fauxton.svg200
-rw-r--r--share/www/fauxton/img/fontcustom_fauxton.ttfbin9636 -> 0 bytes
-rw-r--r--share/www/fauxton/img/fontcustom_fauxton.woffbin4816 -> 0 bytes
-rw-r--r--share/www/fauxton/img/glyphicons-halflings-white.pngbin8777 -> 0 bytes
-rw-r--r--share/www/fauxton/img/glyphicons-halflings.pngbin13826 -> 0 bytes
-rw-r--r--share/www/fauxton/img/linen.pngbin87134 -> 0 bytes
-rw-r--r--share/www/fauxton/img/loader.gifbin5193 -> 0 bytes
-rw-r--r--share/www/fauxton/img/minilogo.pngbin2927 -> 0 bytes
-rw-r--r--share/www/fauxton/index.html45
-rw-r--r--share/www/fauxton/js/ace/mode-javascript.js886
-rw-r--r--share/www/fauxton/js/ace/mode-json.js578
-rw-r--r--share/www/fauxton/js/ace/theme-crimson_editor.js148
-rw-r--r--share/www/fauxton/js/ace/worker-javascript.js10088
-rw-r--r--share/www/fauxton/js/ace/worker-json.js2271
-rw-r--r--share/www/fauxton/js/require.js35
-rw-r--r--share/www/favicon.icobin1406 -> 0 bytes
-rw-r--r--share/www/image/add.pngbin709 -> 0 bytes
-rw-r--r--share/www/image/apply.gifbin652 -> 0 bytes
-rw-r--r--share/www/image/bg.pngbin372 -> 0 bytes
-rw-r--r--share/www/image/cancel.gifbin659 -> 0 bytes
-rw-r--r--share/www/image/compact.pngbin28735 -> 0 bytes
-rw-r--r--share/www/image/delete-mini.pngbin418 -> 0 bytes
-rw-r--r--share/www/image/delete.pngbin718 -> 0 bytes
-rw-r--r--share/www/image/grippie.gifbin75 -> 0 bytes
-rw-r--r--share/www/image/hgrad.gifbin118 -> 0 bytes
-rw-r--r--share/www/image/key.pngbin859 -> 0 bytes
-rw-r--r--share/www/image/load.pngbin780 -> 0 bytes
-rw-r--r--share/www/image/logo.pngbin3010 -> 0 bytes
-rw-r--r--share/www/image/order-asc.gifbin195 -> 0 bytes
-rw-r--r--share/www/image/order-desc.gifbin187 -> 0 bytes
-rw-r--r--share/www/image/path.gifbin104 -> 0 bytes
-rw-r--r--share/www/image/progress.gifbin10819 -> 0 bytes
-rw-r--r--share/www/image/rarrow.pngbin27721 -> 0 bytes
-rw-r--r--share/www/image/run-mini.pngbin478 -> 0 bytes
-rw-r--r--share/www/image/run.pngbin718 -> 0 bytes
-rw-r--r--share/www/image/running.pngbin284 -> 0 bytes
-rw-r--r--share/www/image/save.pngbin843 -> 0 bytes
-rw-r--r--share/www/image/sidebar-toggle.pngbin512 -> 0 bytes
-rw-r--r--share/www/image/spinner.gifbin3008 -> 0 bytes
-rw-r--r--share/www/image/spinner_33.gifbin2987 -> 0 bytes
-rw-r--r--share/www/image/spinner_6b.gifbin2969 -> 0 bytes
-rw-r--r--share/www/image/test_failure.gifbin114 -> 0 bytes
-rw-r--r--share/www/image/test_success.gifbin185 -> 0 bytes
-rw-r--r--share/www/image/thead-key.gifbin77 -> 0 bytes
-rw-r--r--share/www/image/thead.gifbin51 -> 0 bytes
-rw-r--r--share/www/image/toggle-collapse.gifbin176 -> 0 bytes
-rw-r--r--share/www/image/toggle-expand.gifbin181 -> 0 bytes
-rw-r--r--share/www/image/twisty.gifbin160 -> 0 bytes
-rw-r--r--share/www/index.html94
-rw-r--r--share/www/plugins.html121
-rw-r--r--share/www/replicator.html184
-rw-r--r--share/www/script/base64.js124
-rw-r--r--share/www/script/couch.js520
-rw-r--r--share/www/script/couch_test_runner.js465
-rw-r--r--share/www/script/couch_tests.js114
-rw-r--r--share/www/script/futon.browse.js1344
-rw-r--r--share/www/script/futon.format.js146
-rw-r--r--share/www/script/futon.js597
-rw-r--r--share/www/script/jquery-ui-1.8.11.custom.min.js81
-rw-r--r--share/www/script/jquery.couch.js1079
-rw-r--r--share/www/script/jquery.dialog.js96
-rw-r--r--share/www/script/jquery.editinline.js114
-rw-r--r--share/www/script/jquery.form.js803
-rw-r--r--share/www/script/jquery.js9472
-rw-r--r--share/www/script/jquery.resizer.js84
-rw-r--r--share/www/script/jquery.suggest.js161
-rw-r--r--share/www/script/json2.js482
-rw-r--r--share/www/script/jspec/jspec.css149
-rw-r--r--share/www/script/jspec/jspec.jquery.js72
-rw-r--r--share/www/script/jspec/jspec.js1756
-rw-r--r--share/www/script/jspec/jspec.xhr.js195
-rw-r--r--share/www/script/oauth.js511
-rw-r--r--share/www/script/replicator_db_inc.js96
-rw-r--r--share/www/script/sha1.js202
-rw-r--r--share/www/session.html96
-rw-r--r--share/www/spec/couch_js_class_methods_spec.js401
-rw-r--r--share/www/spec/couch_js_instance_methods_1_spec.js311
-rw-r--r--share/www/spec/couch_js_instance_methods_2_spec.js246
-rw-r--r--share/www/spec/couch_js_instance_methods_3_spec.js215
-rw-r--r--share/www/spec/custom_helpers.js51
-rw-r--r--share/www/spec/jquery_couch_js_class_methods_spec.js523
-rw-r--r--share/www/spec/jquery_couch_js_instance_methods_1_spec.js202
-rw-r--r--share/www/spec/jquery_couch_js_instance_methods_2_spec.js433
-rw-r--r--share/www/spec/jquery_couch_js_instance_methods_3_spec.js540
-rw-r--r--share/www/spec/run.html47
-rw-r--r--share/www/status.html152
-rw-r--r--share/www/style/jquery-ui-1.8.11.custom.css347
-rw-r--r--share/www/style/layout.css626
-rw-r--r--share/www/verify_install.html119
118 files changed, 0 insertions, 39381 deletions
diff --git a/share/www/_sidebar.html b/share/www/_sidebar.html
deleted file mode 100644
index 7ef351366..000000000
--- a/share/www/_sidebar.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<div id="sidebar">
- <a id="sidebar-toggle" href="#" title="Hide Sidebar"></a>
- <a href="index.html">
- <img id="logo" src="image/logo.png" width="175" height="150" alt="Apache CouchDB: Relax">
- </a>
- <ul id="nav">
- <li><span>Tools</span><ul>
- <li><a href="index.html">Overview</a></li>
- <li><a href="config.html">Configuration</a></li>
- <li><a href="replicator.html">Replicator</a></li>
- <li><a href="status.html">Status</a></li>
- <!-- <li><a href="plugins.html">Plugins</a></li> -->
- </ul></li>
- <li><span>Documentation</span><ul>
- <li><a href="docs/">Manual</a></li>
- </ul></li>
- <li><span>Diagnostics</span><ul>
- <li><a href="verify_install.html">Verify Installation</a></li>
- <!-- These tests are run during installation, so this link is disabled by default. -->
- <!-- <li><a href="couch_tests.html?script/couch_tests.js">Test Suite</a></li> -->
- </ul></li>
- <li><span>Recent Databases</span>
- <ul id="dbs"></ul>
- </li>
- </ul>
- <div id="footer">
- <span id="userCtx">
- <span class="loggedout">
- <a href="#" class="signup">Signup</a> or <a href="#" class="login">Login</a>
- </span>
- <span class="loggedin">
- Welcome <a class="name">?</a>!
- <br/>
- <span class="loggedinadmin">
- <a href="#" class="createadmin">Setup more admins</a> or
- <br/>
- </span>
- <a href="#" class="changepass">Change password</a> or
- <a href="#" class="logout">Logout</a>
- </span>
- <span class="adminparty">
- Welcome to Admin Party!
- <br/>
- Everyone is admin. <a href="#" class="createadmin">Fix this</a>
- </span>
- </span>
- <hr/>
- <span class="couch">
- Futon on <a href="http://couchdb.apache.org/">Apache CouchDB</a>
- <span id="version">?</span>
- </span>
- </div>
-</div>
diff --git a/share/www/config.html b/share/www/config.html
deleted file mode 100644
index cfb1a5ba7..000000000
--- a/share/www/config.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<!DOCTYPE html>
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<html lang="en">
- <head>
- <title>Configuration</title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <link rel="stylesheet" href="style/layout.css?0.11.0" type="text/css">
- <script src="script/json2.js"></script>
- <script src="script/sha1.js"></script>
- <script src="script/jquery.js"></script>
- <script src="script/jquery.couch.js"></script>
- <script src="script/jquery.dialog.js"></script>
- <script src="script/futon.js"></script>
- <script src="script/jquery.editinline.js"></script>
- <script>
- $(function() {
- $.couch.config({
- success: function(resp) {
- var sections = [];
- for (var sectionName in resp) {
- sections.push(sectionName);
- }
- sections.sort();
- $.each(sections, function(idx, sectionName) {
- var row = $("<tr><th></th></tr>")
- .find("th").text(sectionName).end()
- .appendTo("#config tbody.content");
- var section = resp[sectionName]
- var options = [];
- for (var option in section) {
- options.push(option);
- }
- options = options.sort();
- var prev = null;
- $.each(options, function(idx, optionName) {
- var cur = idx == 0 ? row : $("<tr></tr>");
- $("<td class='name' section="+sectionName+"><b></b></td>")
- .find("b").text(optionName).end().appendTo(cur);
- $("<td class='value'><code></code></td>")
- .find("code").text(section[optionName]).end().appendTo(cur);
- cur.data("section", sectionName).data("option", optionName);
- if (cur !== row) cur.insertAfter(prev);
- prev = cur;
- });
- row.find("th").attr("rowspan", options.length);
- });
- $("#config tbody tr").removeClass("odd").filter(":odd").addClass("odd");
- $("#config tbody td.value code").makeEditable({
- accept: function(newValue) {
- var row = $(this).parents("tr").eq(0);
- $.couch.config({
- success: function(resp) {
- row.find("td.value code").text(newValue);
- }}, row.data("section"), row.data("option"), newValue);
- }
- }).parent().parent()
- .append($('<td><div style="text-align:center;""><a class="remove" href="#remove">x</a></div></td>'))
- .click(function (ev) {
- // There is a listener that stops all events below this element which is
- // why the remove link listener has to be here
- var n = $(ev.target).parent().parent().parent();
- if ($(ev.target).attr('href') === "#remove" ) {
- $.couch.config({ success: function () {location = location.href.split('#')[0];} }
- , n.find('td.name').attr("section"), n.find('td.name').text(), null);
- }
- })
- var add = $('<a href="#add">Add a new section</a>').click(function () {
- $.showDialog("dialog/_create_config.html", {
- submit: function(data, callback) {
- var fail = false;
- if (!data.section || data.section.length == 0) {
- callback({section: "Please enter a section."});
- fail = true;
- }
- if (!data.option || data.option.length == 0) {
- callback({option: "Please enter a option."});
- fail = true;
- }
- if (!data.val || data.val.length == 0) {
- callback({val: "Please enter a value."});
- fail = true;
- }
- if (fail) {return}
- $.couch.config({ success: function () {callback();location = location.href.split('#')[0]} }
- , data.section, data.option, data.val);
- }
- });
- })
- $("div#content").append(add)
- }
- });
-
- });
- </script>
- </head>
- <body><div id="wrap">
- <h1>
- <a href="index.html">Overview</a>
- <strong>Configuration</strong>
- </h1>
- <div id="content">
- <p class="help">
- <strong>Note:</strong> Some configuration options may require
- restarting the server to take effect after modification.
- </p>
- <p class="help">
- For the strongest consistency guarantees, <tt>delayed_commits</tt> should be set to <tt>false</tt>. The default value of <tt>true</tt> is designed for single-user performance. For more details see <a href="http://wiki.apache.org/couchdb/Durability_Matrix">a discussion of durability on the CouchDB wiki</a>.
- </p>
- <table id="config" class="listing" cellspacing="0">
- <caption>Configuration</caption>
- <thead><tr>
- <th>Section</th>
- <th>Option</th>
- <th>Value</th>
- <th>Delete</th>
- </tr></thead>
- <tbody class="content"></tbody>
- </table>
-
- </div>
- </div></body>
-</html>
diff --git a/share/www/couch_tests.html b/share/www/couch_tests.html
deleted file mode 100644
index 8f47ce3a5..000000000
--- a/share/www/couch_tests.html
+++ /dev/null
@@ -1,98 +0,0 @@
-<!DOCTYPE html>
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<html lang="en">
- <head>
- <title>Test Suite</title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <link rel="stylesheet" href="style/layout.css?0.11.0" type="text/css">
- <script src="script/json2.js"></script>
- <script src="script/sha1.js"></script>
- <script src="script/jquery.js"></script>
- <script src="script/jquery.couch.js"></script>
- <script src="script/jquery.dialog.js"></script>
- <script src="script/futon.js"></script>
- <script src="script/couch.js"></script>
- <script src="script/couch_test_runner.js"></script>
- <script>
- $(function() {
- updateTestsListing();
- $("#toolbar button.run").click(function() {
- setupAdminParty(runAllTests) ;
- });
- $("#toolbar button.load").click(function() {
- location.reload(true);
- });
- $("#toolbar button.share").click(function() {
- $.showDialog("dialog/_share_test_reports.html", {
- submit: function(data, callback) {
- $.couch.replicate("test_suite_reports", "http://couchdb.couchdb.org/test_suite_reports");
- callback();
- }
- });
- });
- $("#toolbar button.add").click(function() {
- location = "custom_test.html";
- });
- });
- var testsPath = document.location.toString().split('?')[1];
- loadScript(testsPath||"script/couch_tests.js");
- </script>
- </head>
- <body><div id="wrap">
- <h1>
- <a href="index.html">Overview</a>
- <strong>Test Suite</strong>
- </h1>
- <div id="content">
- <ul id="toolbar">
- <li><button class="run">Run All</button></li>
- <li><button class="load">Reload</button></li>
- <li><button class="share">Share Test Reports</button></li>
- <li><button class="add">Custom Test</button></li>
- <li class="current"></li>
- </ul>
- <p class="help">
- <strong>Note:</strong> Each of the tests will block the browser. If the
- connection to your CouchDB server is slow, running the tests will take
- some time, and you'll not be able to do much with your browser while
- a test is being executed. <strong>Also:</strong> The test suite is designed
- to work with Firefox (with Firebug disabled). Patches are welcome for
- convenience compatibility with other browsers, but official support is
- for Firefox (latest stable version) only.
- </p>
-
- <table class="listing" id="tests" cellspacing="0">
- <caption>Tests</caption>
- <thead>
- <tr>
- <th class="name">Name</th>
- <th class="status">Status</th>
- <th class="duration">Elapsed Time</th>
- <th class="details">Details</th>
- </tr>
- </thead>
- <tbody class="content">
- </tbody>
- <tbody class="footer">
- <tr>
- <td colspan="4"></td>
- </tr>
- </tbody>
- </table>
-
- </div>
- </div></body>
-</html>
diff --git a/share/www/custom_test.html b/share/www/custom_test.html
deleted file mode 100644
index 155b18585..000000000
--- a/share/www/custom_test.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<!DOCTYPE html>
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<html lang="en">
- <head>
- <title>Custom Test</title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <link rel="stylesheet" href="style/layout.css?0.11.0" type="text/css">
- <script src="script/json2.js"></script>
- <script src="script/sha1.js"></script>
- <script src="script/jquery.js"></script>
- <script src="script/jquery.couch.js"></script>
- <script src="script/jquery.dialog.js"></script>
- <script src="script/futon.js"></script>
- <script src="script/jquery.resizer.js"></script>
- <script src="script/couch.js"></script>
- <script src="script/couch_test_runner.js"></script>
- <script src="script/couch_tests.js"></script>
- <script>
- function T(arg, desc) {
- if(!arg) {
- mesg = "Assertion failed" + (desc ? ": " + desc : "");
- throw new Error(mesg);
- }
- }
-
- function TEquals(expect, found, descr) {
- var mesg = "expected '" + expect + "', got '" + found + "' " + descr;
- T(expect === found, mesg);
- }
-
- $.futon.navigation.ready(function() {
- this.updateSelection(
- location.pathname.replace(/custom_test\.html/, "couch_tests.html"),
- "?script/couch_tests.js");
- });
-
- $(function() {
- $("#status").removeClass("failure").removeClass("success");
- $("#viewcode textarea").enableTabInsertion().makeResizable({
- always: true,
- grippie: $("#viewcode .bottom"),
- vertical: true
- });
- $("#viewcode button.run").click(function() {
- $("#status").removeClass("failure").removeClass("success");
- var code = $("#code").val();
- try {
- var couchTests = {};
- var debug = false;
- code = eval(code);
- $.each(couchTests, function(elm) {
- couchTests[elm](debug);
- });
- } catch(e) {
- alert("" + e);
- $("#status").text("failure").addClass("failure");
- return false;
- }
- $("#status").text("success").addClass("success");
- return false;
- });
- });
- </script>
- </head>
- <body><div id="wrap">
- <h1>
- <a href="index.html">Overview</a>
- <a class="dbname" href="couch_tests.html">Test Suite</a>
- <strong>Custom Test</strong>
- </h1>
-
- <div id="content">
- <div id="viewcode">
- <div class="top">
- <span>Test Function</span>
- </div>
- <table summary="Custom Test Function" cellspacing="0"><tr>
- <td class="code">
- <textarea name="code" id="code" rows="18" cols="120">
-couchTests.custom_test = function(debug) {
- var db = new CouchDB("test_suite_db", {"X-Couch-Full-Commit":"false"});
- db.deleteDb();
- db.createDb();
-
- if (debug) debugger;
-
- alert("You can start writing your test now.");
-};
-</textarea>
- </td>
- </tr></table>
- <div class="bottom">
- <button class="run" type="button">Run</button>
- <span id="status">&nbsp;&nbsp;</span>
- </div>
- </div>
- </div>
- </div></body>
-</html>
diff --git a/share/www/database.html b/share/www/database.html
deleted file mode 100644
index c64f749c2..000000000
--- a/share/www/database.html
+++ /dev/null
@@ -1,270 +0,0 @@
-<!DOCTYPE html>
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<html lang="en">
- <head>
- <title>Browse Database</title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <link rel="stylesheet" href="style/layout.css" type="text/css">
- <script src="script/json2.js"></script>
- <script src="script/sha1.js"></script>
- <script src="script/jquery.js"></script>
- <script src="script/jquery.couch.js"></script>
- <script src="script/jquery.dialog.js"></script>
- <script src="script/futon.js"></script>
- <script src="script/jquery.resizer.js"></script>
- <script src="script/jquery.suggest.js"></script>
- <script src="script/futon.browse.js"></script>
- <script src="script/futon.format.js"></script>
- <script>
- var page = new $.futon.CouchDatabasePage();
- $.futon.navigation.ready(function() {
- this.addDatabase(page.db.name);
- this.updateSelection(location.pathname, "?" + page.db.name);
- });
-
- $(function() {
- if (page.redirecting) return;
- $("h1 strong").text(page.db.name);
- var viewPath = page.viewName || "_all_docs";
- if (viewPath != "_temp_view" && viewPath != "_design_docs") {
- viewPath = $.map(viewPath.split("/"), function (part) {
- return encodeURIComponent(part);
- }).join("/");
-
- $("h1 a.raw").attr("href", "/" + encodeURIComponent(page.db.name) +
- "/" + viewPath);
- }
-
- $("#viewcode span").click(function() {
- $("#viewcode").toggleClass("collapsed");
- });
- $("#viewcode button.run").click(function() {
- page.updateDocumentListing();
- });
- $("#viewcode button.revert").click(function() {
- page.revertViewChanges();
- });
- $("#viewcode button.save").click(function() {
- page.saveViewChanges();
- });
- $("#viewcode button.saveas").click(function() {
- page.saveViewAs();
- });
- $("#viewcode textarea").makeResizable({
- always: true,
- grippie: $("#viewcode .bottom"),
- vertical: true
- });
- $("#viewcode td.map").makeResizable({
- always: true,
- grippie: $("#viewcode td.splitter"),
- horizontal: true
- });
-
- // Restore preferences/state
- $("#documents thead th.key").toggleClass("desc", !!$.futon.storage.get("desc"));
- var reduce = !!$.futon.storage.get("reduce");
- $("#reduce :checkbox")[0].checked = reduce;
- $("#grouplevel select").val(parseInt($.futon.storage.get("group_level")));
- $("#grouplevel").toggleClass("disabled", !reduce).find("select").each(function() {
- this.disabled = !reduce;
- });
-
- $("#perpage").val(parseInt($.futon.storage.get("per_page")));
-
- var staleViews = !!$.futon.storage.get("stale");
- $("#staleviews :checkbox")[0].checked = staleViews;
-
- page.populateViewsMenu();
- page.populateViewEditor();
- if (page.isTempView) {
- $("#viewcode").show().removeClass("collapsed").find("textarea")[0].focus();
- $("#documents").hide();
- }
-
- $("#switch select").change(function() {
- var viewName = $(this).val();
- if (!viewName) $.futon.storage.del("view");
- location.href = "?" + encodeURIComponent(page.db.name) +
- (viewName ? "/" + viewName : "");
- });
- $("#staleviews :checkbox").click(function() {
- $.futon.storage.set("stale", this.checked);
- });
- $("#documents thead th.key span").click(function() {
- $(this).closest("th").toggleClass("desc");
- page.updateDocumentListing();
- });
- $("#grouplevel select").change(function() {
- page.updateDocumentListing();
- $.futon.storage.set("group_level", this.value);
- });
- $("#reduce :checkbox").click(function() {
- page.updateDocumentListing();
- var cb = this;
- $("#grouplevel").toggleClass("disabled", !cb.checked).find("select").each(function() {
- this.disabled = !cb.checked;
- });
- $.futon.storage.set("reduce", this.checked);
- });
- $("#perpage").change(function() {
- page.updateDocumentListing();
- $.futon.storage.set("per_page", this.value);
- });
- $("#toolbar button.add").click(page.newDocument);
- $("#toolbar button.compact").click(page.compactAndCleanup);
- $("#toolbar button.delete").click(page.deleteDatabase);
- $("#toolbar button.security").click(page.databaseSecurity);
-
- $('#jumpto input').suggest(function(text, callback) {
- page.db.allDocs({
- limit: 10, startkey: text, endkey: text + 'zzz',
- success: function(docs) {
- var matches = [];
- for (var i = 0; i < docs.rows.length; i++) {
- if (docs.rows[i].id.indexOf(text) == 0) {
- matches[i] = docs.rows[i].id;
- }
- }
- callback(matches);
- }
- });
- }).keypress(function(e) {
- if (e.keyCode == 13) {
- page.jumpToDocument($(this).val());
- }
- });
- });
- </script>
- </head>
-
- <body><div id="wrap">
- <h1>
- <a href="index.html">Overview</a>
- <strong>?</strong>
- <a class="raw" title="Raw view"></a>
- </h1>
- <div id="content">
- <div id="staleviews">
- <label>Stale views
- <input name="staleviews" type="checkbox" />
- </label>
- </div>
- <div id="switch">
- <label>View: <select autocomplete="false">
- <option value="_all_docs">All documents</option>
- <option value="_design_docs">Design documents</option>
- <option value="_temp_view">Temporary view…</option>
- </select></label>
- </div>
- <div id="jumpto">
- <label>Jump to:
- <input type="text" name="docid" placeholder="Document ID" autocomplete="off" />
- </label>
- </div>
- <ul id="toolbar">
- <li><button class="add">New Document</button></li>
- <li><button class="security userAdmin serverAdmin">Security…</button></li>
- <li><button class="compact">Compact &amp; Cleanup…</button></li>
- <li><button class="delete serverAdmin">Delete Database…</button></li>
- </ul>
-
- <div id="viewcode" class="collapsed" style="display: none">
- <div class="top">
- <a id="designdoc-link"></a>
- <span id="view-toggle">View Code</span>
- </div>
- <table summary="View functions" cellspacing="0"><tr>
- <td class="code map">
- <label for="viewcode_map">Map Function:</label>
- <textarea id="viewcode_map" class="map" rows="5" cols="20" spellcheck="false" wrap="off"></textarea>
- </td>
- <td class="splitter"></td>
- <td class="code reduce">
- <label for="viewcode_reduce">Reduce Function (optional):</label>
- <textarea id="viewcode_reduce" class="reduce" rows="5" cols="20" spellcheck="false" wrap="off"></textarea>
- </td>
- </tr></table>
- <div class="bottom">
- <button class="save" type="button" disabled>Save</button>
- <button class="saveas" type="button">Save As…</button>
- <button class="revert" type="button" disabled>Revert</button>
- <button class="run" type="button">Run</button>
- <label>Language: <select id="language"></select></label>
- </div>
- </div>
- <p id="tempwarn">
- <strong>Warning</strong>: Please note that temporary views are not
- suitable for use in production, as they are really slow for any
- database with more than a few dozen documents. You can use a temporary
- view to experiment with view functions, but switch to a permanent view
- before using them in an application.
- </p>
-
- <table id="documents" class="listing" cellspacing="0">
- <caption>Documents</caption>
- <thead>
- <tr>
- <th class="key">
- <label id="grouplevel">
- Grouping: <select>
- <option value="0">none</option>
- <option value="1">level 1</option>
- <option value="2">level 2</option>
- <option value="3">level 3</option>
- <option value="4">level 4</option>
- <option value="5">level 5</option>
- <option value="6">level 6</option>
- <option value="7">level 7</option>
- <option value="8">level 8</option>
- <option value="9">level 9</option>
- <option value="100" selected>exact</option>
- </select>
- </label>
- <span>Key</span>
- </th>
- <th class="value">
- <label id="reduce"><input type="checkbox" autocomplete="off" checked> Reduce</label>
- Value
- </th>
- </tr>
- </thead>
- <tbody class="content">
- </tbody>
- <tbody class="footer">
- <tr>
- <td colspan="4">
- <div id="paging">
- <a class="prev">← Previous Page</a> |
- <label>Rows per page: <select id="perpage">
- <option selected>10</option>
- <option>25</option>
- <option>50</option>
- <option>100</option>
- </select></label> |
- <a class="next">Next Page →</a>
- </div>
- <span></span>
- </td>
- </tr>
- </tbody>
- </table>
- <p id="viewrequestduration">
- View request duration: <span class="timestamp"></span>
- </p>
- </div>
- </div></body>
-</html>
diff --git a/share/www/dialog/_admin_party.html b/share/www/dialog/_admin_party.html
deleted file mode 100644
index ea9fb15a4..000000000
--- a/share/www/dialog/_admin_party.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<form action="" method="post">
- <h2>Admin Party!</h2>
- <fieldset>
- <p class="help">
- The test suite requires CouchDB to be in <em>Admin Party</em> mode. This
- mode give all users admin capabilities. This is the least secure mode of
- operation. Do not run the tests on production servers, as you'll impact
- both performance and security.
- </p>
- <p class="help">
- Clicking “Remove Admins” will remove all admins from the configuration. You will
- have to recreate any admins by hand after the tests have finished.
- </p>
- </fieldset>
- <div class="buttons">
- <button type="submit">Remove Admins</button>
- <button type="button" class="cancel">Cancel</button>
- </div>
-</form>
diff --git a/share/www/dialog/_change_password.html b/share/www/dialog/_change_password.html
deleted file mode 100644
index 40601d9a7..000000000
--- a/share/www/dialog/_change_password.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<form action="" method="post">
- <h2>Change Password</h2>
- <fieldset>
- <table summary=""><tbody><tr>
- <th><label>New Password:</label></th>
- <td><input type="password" name="password" size="24" /></td>
- </tr><tr>
- <th><label>Verify New Password:</label></th>
- <td><input type="password" name="verify_password" size="24" /></td>
- </tr>
- </tbody></table>
- </fieldset>
- <div class="buttons">
- <button type="submit">Login</button>
- <button type="button" class="cancel">Cancel</button>
- </div>
-</form>
diff --git a/share/www/dialog/_compact_cleanup.html b/share/www/dialog/_compact_cleanup.html
deleted file mode 100644
index 506417f45..000000000
--- a/share/www/dialog/_compact_cleanup.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<form action="" method="post">
- <h2>Compact &amp; Cleanup</h2>
- <fieldset class="radiogroup">
- <label>
- <input type="radio" name="action" value="compact_database" checked>
- Compact Database
- </label>
- <p class="help">
- Compacting a database removes deleted documents and previous revisions.
- It is an <strong>irreversible operation</strong> and may take
- a while to complete for large databases.
- </p>
- <hr>
- <label>
- <input type="radio" name="action" value="compact_views">
- Compact Views
- </label>
- <p class="help">
- View compaction will affect all views in this design document. This
- operation may take some time to complete. Your views will still operate
- normally during compaction.
- </p>
- <hr>
- <label>
- <input type="radio" name="action" value="view_cleanup">
- Cleanup Views
- </label>
- <p class="help">
- Cleaning up views in a database removes old view files still stored
- on the filesystem. It is an <strong>irreversible operation</strong>.
- </p>
- </fieldset>
- <div class="buttons">
- <button type="submit">Run</button>
- <button type="button" class="cancel">Cancel</button>
- </div>
-</form>
diff --git a/share/www/dialog/_create_admin.html b/share/www/dialog/_create_admin.html
deleted file mode 100644
index d4aec95a4..000000000
--- a/share/www/dialog/_create_admin.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<form action="" method="post">
- <h2>Create Server Admin</h2>
- <fieldset>
- <p class="help">
- Before a server admin is configured, all clients have admin privileges.
- This is fine when HTTP access is restricted
- to trusted users. <strong>If end-users will be accessing this CouchDB, you must
- create an admin account to prevent accidental (or malicious) data loss.</strong>
- </p>
- <p class="help">Server admins can create and destroy databases, install
- and update _design documents, run the test suite, and edit all aspects of CouchDB
- configuration.
- </p>
- <table summary=""><tbody><tr>
- <th><label>Username:</label></th>
- <td><input type="text" name="name" size="24"></td>
- </tr><tr>
- <th><label>Password:</label></th>
- <td><input type="password" name="password" size="24"></td>
- </tr>
- </tbody></table>
- <p class="help">Non-admin users have read and write access to all databases, which
- are controlled by validation functions. CouchDB can be configured to block all
- access to anonymous users.
- </p>
- <h3>About Authentication</h3>
- <p class="help">
- Couch has a pluggable authentication mechanism. Futon exposes a user friendly cookie-auth which handles login and logout, so app developers can relax. Just use <tt>$.couch.session()</tt> to load the current user's info.
- </p>
-
- </fieldset>
- <div class="buttons">
- <button type="submit">Create</button>
- <button type="button" class="cancel">Cancel</button>
- </div>
-</form>
diff --git a/share/www/dialog/_create_config.html b/share/www/dialog/_create_config.html
deleted file mode 100644
index 79e08b080..000000000
--- a/share/www/dialog/_create_config.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<form action="" method="post">
- <h2>Create New Config Option</h2>
- <fieldset>
- <p class="help">
- Please enter the section, option, and value.
- </p>
- <table summary="">
- <tbody>
- <tr>
- <th><label>section:</label></th>
- <td><input type="text" name="section" size="24"></td>
- </tr>
- <tr>
- <th><label>option:</label></th>
- <td><input type="text" name="option" size="24"></td>
- </tr>
- <tr>
- <th><label>value:</label></th>
- <td><input type="text" name="val" size="24"></td>
- </tr>
- </tbody>
- </table>
- </fieldset>
- <div class="buttons">
- <button type="submit">Create</button>
- <button type="button" class="cancel">Cancel</button>
- </div>
-</form>
diff --git a/share/www/dialog/_create_database.html b/share/www/dialog/_create_database.html
deleted file mode 100644
index 74e7ea615..000000000
--- a/share/www/dialog/_create_database.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<form action="" method="post">
- <h2>Create New Database</h2>
- <fieldset>
- <p class="help">
- Please enter the name of the database. Note that only lowercase
- characters (<tt>a-z</tt>), digits (<tt>0-9</tt>), or any of the
- characters <tt>_</tt>, <tt>$</tt>, <tt>(</tt>, <tt>)</tt>, <tt>+</tt>,
- <tt>-</tt>, and <tt>/</tt> are allowed.
- </p>
- <table summary=""><tbody><tr>
- <th><label>Database Name:</label></th>
- <td><input type="text" name="name" size="24"></td>
- </tr></table>
- </fieldset>
- <div class="buttons">
- <button type="submit">Create</button>
- <button type="button" class="cancel">Cancel</button>
- </div>
-</form>
diff --git a/share/www/dialog/_database_security.html b/share/www/dialog/_database_security.html
deleted file mode 100644
index 265cb6f00..000000000
--- a/share/www/dialog/_database_security.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<form action="" method="post">
- <h2>Security</h2>
- <fieldset>
- <p class="help">
- Each database contains lists of admins and members.
- Admins and members are each defined by <tt>names</tt> and <tt>roles</tt>, which are lists of strings.
- </p>
-
- <h3>Admins</h3>
- <p class="help">Database admins can update design documents and edit the admin and member lists.</p>
- <table summary=""><tbody><tr>
- <th><label>Names:</label></th>
- <td><input type="text" name="admin_names" size="40"></td>
- </tr><tr>
- <th><label>Roles:</label></th>
- <td><input type="text" name="admin_roles" size="40"></td>
- </tr>
- </tbody></table>
-
- <h3>Members</h3>
- <p class="help">Database members can access the database. If no members are defined, the database is public.</p>
- <table summary=""><tbody><tr>
- <th><label>Names:</label></th>
- <td><input type="text" name="member_names" size="40"></td>
- </tr><tr>
- <th><label>Roles:</label></th>
- <td><input type="text" name="member_roles" size="40"></td>
- </tr>
- </tbody></table>
-
- </fieldset>
- <div class="buttons">
- <button type="submit">Update</button>
- <button type="button" class="cancel">Cancel</button>
- </div>
-</form>
diff --git a/share/www/dialog/_delete_database.html b/share/www/dialog/_delete_database.html
deleted file mode 100644
index 7fdf62fd9..000000000
--- a/share/www/dialog/_delete_database.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<form action="" method="post">
- <h2>Delete Database</h2>
- <fieldset>
- <p class="help">
- Are you sure you want to delete this database? This includes all
- documents, design documents, views and security settings.
- <br><br>
- Note that this is an <strong>irreversible operation</strong>!
- </p>
- </fieldset>
- <div class="buttons">
- <button type="submit">Delete</button>
- <button type="button" class="cancel">Cancel</button>
- </div>
-</form>
diff --git a/share/www/dialog/_delete_document.html b/share/www/dialog/_delete_document.html
deleted file mode 100644
index 8ae89710c..000000000
--- a/share/www/dialog/_delete_document.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<form action="" method="post">
- <h2>Delete Document</h2>
- <fieldset>
- <p class="help">
- Are you sure you want to delete this document?
- </p>
- </fieldset>
- <div class="buttons">
- <button type="submit">Delete</button>
- <button type="button" class="cancel">Cancel</button>
- </div>
-</form>
diff --git a/share/www/dialog/_login.html b/share/www/dialog/_login.html
deleted file mode 100644
index f05a5fdc9..000000000
--- a/share/www/dialog/_login.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<form action="" method="post">
- <h2>Login</h2>
- <fieldset>
- <p class="help">
- Login to CouchDB with your name and password.
- </p>
- <table summary=""><tbody><tr>
- <th><label>Username:</label></th>
- <td><input type="text" name="name" size="24"></td>
- </tr><tr>
- <th><label>Password:</label></th>
- <td><input type="password" name="password" size="24"></td>
- </tr>
- </tbody></table>
- </fieldset>
- <div class="buttons">
- <button type="submit">Login</button>
- <button type="button" class="cancel">Cancel</button>
- </div>
-</form>
diff --git a/share/www/dialog/_save_view_as.html b/share/www/dialog/_save_view_as.html
deleted file mode 100644
index d59122bfd..000000000
--- a/share/www/dialog/_save_view_as.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<form action="" method="post" id="view-save-as" onload="initForm(this)">
- <h2>Save View As&hellip;</h2>
- <fieldset>
- <p class="help">
- You can save this function code as a permanent view in the database. Just
- enter or select the design document and the name of the view below. Note
- that if you choose an existing view, it will be overwritten!
- </p>
- <table summary=""><tbody><tr>
- <th><label for="input_docid">Design Document:</label></th>
- <td><tt>_design/</tt><input type="text" id="input_docid" name="docid" size="20"></td>
- </tr><tr>
- <th><label for="input_name">View Name:<label></th>
- <td><input type="text" id="input_name" name="name" size="30"></td>
- </tr></table>
- </fieldset>
- <div class="buttons">
- <button type="submit">Save</button>
- <button type="button" class="cancel">Cancel</button>
- </div>
-</form>
diff --git a/share/www/dialog/_share_test_reports.html b/share/www/dialog/_share_test_reports.html
deleted file mode 100644
index 82b49a747..000000000
--- a/share/www/dialog/_share_test_reports.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<form action="" method="post">
- <h2>Share Test Reports</h2>
- <fieldset>
- <p class="help">
- After each test run, a results summary document is stored in
- <a href="/_utils/database.html?test_suite_reports">your local
- <tt>test_suite_reports</tt> database.</a> The data has no personally
- identifying information, just details about the test run and your CouchDB
- and browser versions. (Click the red link above to see what's stored.)
- The data remains private until you click the "share" button below.
- </p>
- <p class="help">
- Test reports are very valuable to the CouchDB community, and are easy to share.
- Clicking the "share" button below triggers replication from
- your local <tt>test_suite_reports</tt> database, to a database hosted by the
- project.
- </p>
- <p class="help">
- <a href="http://couchdb.couchdb.org/_utils/database.html?test_suite_reports">
- Browse test reports shared by other users.</a>
- Thank you for sharing!
- </p>
- </fieldset>
- <div class="buttons">
- <button type="submit">Share</button>
- <button type="button" class="cancel">Cancel</button>
- </div>
-</form>
diff --git a/share/www/dialog/_signup.html b/share/www/dialog/_signup.html
deleted file mode 100644
index 7ba3448a7..000000000
--- a/share/www/dialog/_signup.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<form action="" method="post">
- <h2>Create User Account</h2>
- <fieldset>
- <p class="help">
- Create a user document on this CouchDB. You will be logged in as this
- user after the document is created.
- </p>
- <table summary=""><tbody><tr>
- <th><label>Username:</label></th>
- <td><input type="text" name="name" size="24"></td>
- </tr><tr>
- <th><label>Password:</label></th>
- <td><input type="password" name="password" size="24"></td>
- </tr>
- </tbody></table>
- </fieldset>
- <div class="buttons">
- <button type="submit">Create</button>
- <button type="button" class="cancel">Cancel</button>
- </div>
-</form>
diff --git a/share/www/dialog/_upload_attachment.html b/share/www/dialog/_upload_attachment.html
deleted file mode 100644
index 50b7e1fa5..000000000
--- a/share/www/dialog/_upload_attachment.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<form action="" method="post" id="upload-form">
- <h2>Upload Attachment</h2>
- <fieldset>
- <p class="help">
- Please select the file you want to upload as an attachment to this
- document. Please note that this will result in the immediate creation of
- a new revision of the document, so it's not necessary to save the
- document after the upload.
- </p>
- <table summary=""><tbody><tr>
- <th><label>File:</label></th>
- <td><input type="file" name="_attachments"></td>
- </tr><tr>
- <td id="progress" colspan="2">&nbsp;</td>
- </tr></table>
- </fieldset>
- <div class="buttons">
- <input type="hidden" name="_rev" value="">
- <button type="submit">Upload</button>
- <button type="button" class="cancel">Cancel</button>
- </div>
-</form>
diff --git a/share/www/document.html b/share/www/document.html
deleted file mode 100644
index e041cd9f0..000000000
--- a/share/www/document.html
+++ /dev/null
@@ -1,114 +0,0 @@
-<!DOCTYPE html>
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<html lang="en">
- <head>
- <title>View Document</title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <link rel="stylesheet" href="style/layout.css?0.11.0" type="text/css">
- <script src="script/json2.js"></script>
- <script src="script/sha1.js"></script>
- <script src="script/base64.js"></script>
- <script src="script/jquery.js"></script>
- <script src="script/jquery.couch.js"></script>
- <script src="script/jquery.dialog.js"></script>
- <script src="script/futon.js"></script>
- <script src="script/jquery.resizer.js"></script>
- <script src="script/futon.browse.js"></script>
- <script src="script/futon.format.js"></script>
- <script src="script/jquery.editinline.js"></script>
- <script src="script/jquery.form.js"></script>
- <script>
- var page = new $.futon.CouchDocumentPage();
-
- $.futon.navigation.ready(function() {
- this.addDatabase(page.db.name);
- this.updateSelection(
- location.pathname.replace(/document\.html/, "database.html"),
- "?" + page.db.name
- );
- });
-
- $(function() {
- $("h1 a.dbname").text(page.dbName)
- .attr("href", "database.html?" + encodeURIComponent(page.db.name));
- $("h1 strong").text(page.docId);
- $("h1 a.raw").attr("href", "/" + encodeURIComponent(page.db.name) +
- "/" + encodeURIComponent(page.docId));
- page.updateFieldListing();
-
- $("#tabs li.tabular a").click(page.activateTabularView);
- $("#tabs li.source a").click(page.activateSourceView);
-
- $("#toolbar button.save").click(page.saveDocument);
- $("#toolbar button.add").click(page.addField);
- $("#toolbar button.load").click(page.uploadAttachment);
- if (page.isNew) {
- $("#toolbar button.delete").hide();
- } else {
- $("#toolbar button.delete").click(page.deleteDocument);
- }
- });
- </script>
- </head>
-
- <body><div id="wrap">
- <h1>
- <a href="index.html">Overview</a>
- <a class="dbname" href="#">?</a>
- <strong>?</strong>
- <a class="raw" title="Raw document"></a>
- </h1>
- <div id="content">
- <ul id="toolbar">
- <li><button class="save">Save Document</button></li>
- <li><button class="add">Add Field</button></li>
- <li><button class="load">Upload Attachment…</button></li>
- <li><button class="delete">Delete Document…</button></li>
- </ul>
-
- <ul id="tabs">
- <li class="active tabular"><a href="#tabular">Fields</a></li>
- <li class="source"><a href="#source">Source</a></li>
- </ul>
- <table id="fields" class="listing" cellspacing="0">
- <col class="field"><col class="value">
- <caption>Fields</caption>
- <thead>
- <tr>
- <th>Field</th>
- <th>Value</th>
- </tr>
- </thead>
- <tbody class="content">
- </tbody>
- <tbody class="source" style="display: none">
- <tr><td colspan="2"></td></tr>
- </tbody>
- <tbody class="footer">
- <tr>
- <td colspan="2">
- <div id="paging">
- <a class="prev">← Previous Version</a> | <a class="next">Next Version →</a>
- </div>
- <span></span>
- </td>
- </tr>
- </tbody>
- </table>
-
- </div>
- </div></body>
-</html>
diff --git a/share/www/fauxton/css/index.css b/share/www/fauxton/css/index.css
deleted file mode 100644
index 16bf698e0..000000000
--- a/share/www/fauxton/css/index.css
+++ /dev/null
@@ -1,37 +0,0 @@
-.task-tabs li{cursor:pointer}table.active-tasks{font-size:16px}.menuDropdown{display:none}.compaction-option{background-color:#F7F7F7;border:1px solid #DDD;margin-bottom:30px;padding:10px}table.config #config-trash{width:5%}table.config #delete-value{text-align:center}button#add-section{float:right}/*!
- *
- * Fauxton less style files
- *
- */ /*!
- * Bootstrap v2.3.2
- *
- * Copyright 2012 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */ .clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{max-width:100%;width:auto\9;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}label,select,button,input[type=button],input[type=reset],input[type=submit],input[type=radio],input[type=checkbox]{cursor:pointer}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#e33f3b;text-decoration:none}a:hover,a:focus{color:#b71e1a;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:"";line-height:0}.row:after{clear:both}.row:before,.row:after{display:table;content:"";line-height:0}.row:after{clear:both}[class*=span]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:"";line-height:0}.row:after{clear:both}.row:before,.row:after{display:table;content:"";line-height:0}.row:after{clear:both}[class*=span]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid [class*=span]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574468085%;*margin-left:2.074468085106383%}.row-fluid [class*=span]:first-child{margin-left:0}.row-fluid .controls-row [class*=span]+[class*=span]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid [class*=span]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574468085%;*margin-left:2.074468085106383%}.row-fluid [class*=span]:first-child{margin-left:0}.row-fluid .controls-row [class*=span]+[class*=span]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*=span].hide,.row-fluid [class*=span].hide{display:none}[class*=span].pull-right,.row-fluid [class*=span].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;content:"";line-height:0}.container:after{clear:both}.container:before,.container:after{display:table;content:"";line-height:0}.container:after{clear:both}.container:before,.container:after{display:table;content:"";line-height:0}.container:after{clear:both}.container:before,.container:after{display:table;content:"";line-height:0}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;content:"";line-height:0}.container-fluid:after{clear:both}.container-fluid:before,.container-fluid:after{display:table;content:"";line-height:0}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:700}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:hover,a.muted:focus{color:gray}.text-warning{color:#c09853}a.text-warning:hover,a.text-warning:focus{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover,a.text-error:focus{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover,a.text-info:focus{color:#2d6987}.text-success{color:#468847}a.text-success:hover,a.text-success:focus{color:#356635}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:700;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:400;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}ul.inline,ol.inline{margin-left:0;list-style:none}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;*zoom:1;padding-left:5px;padding-right:5px}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:700}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;content:"";line-height:0}.dl-horizontal:after{clear:both}.dl-horizontal:before,.dl-horizontal:after{display:table;content:"";line-height:0}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;white-space:nowrap}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:400;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type=text],input[type=password],input[type=datetime],input[type=datetime-local],input[type=date],input[type=month],input[type=time],input[type=week],input[type=number],input[type=email],input[type=url],input[type=search],input[type=tel],input[type=color],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;vertical-align:middle}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type=text],input[type=password],input[type=datetime],input[type=datetime-local],input[type=date],input[type=month],input[type=time],input[type=week],input[type=number],input[type=email],input[type=url],input[type=search],input[type=tel],input[type=color],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type=text]:focus,input[type=password]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=date]:focus,input[type=month]:focus,input[type=time]:focus,input[type=week]:focus,input[type=number]:focus,input[type=email]:focus,input[type=url]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=color]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6)}input[type=radio],input[type=checkbox]{margin:4px 0 0;*margin-top:0;margin-top:1px \9;line-height:normal}input[type=file],input[type=image],input[type=submit],input[type=reset],input[type=button],input[type=radio],input[type=checkbox]{width:auto}select,input[type=file]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;border:1px solid #ccc;background-color:#fff}select[multiple],select[size]{height:auto}select:focus,input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.025);box-shadow:inset 0 1px 2px rgba(0,0,0,.025);cursor:not-allowed}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:20px;padding-left:20px}.radio input[type=radio],.checkbox input[type=checkbox]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*=span],select[class*=span],textarea[class*=span],.uneditable-input[class*=span],.row-fluid input[class*=span],.row-fluid select[class*=span],.row-fluid textarea[class*=span],.row-fluid .uneditable-input[class*=span]{float:none;margin-left:0}.input-append input[class*=span],.input-append .uneditable-input[class*=span],.input-prepend input[class*=span],.input-prepend .uneditable-input[class*=span],.row-fluid input[class*=span],.row-fluid select[class*=span],.row-fluid textarea[class*=span],.row-fluid .uneditable-input[class*=span],.row-fluid .input-prepend [class*=span],.row-fluid .input-append [class*=span]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*=span]+[class*=span]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*=span]+[class*=span]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;content:"";line-height:0}.controls-row:after{clear:both}.controls-row:before,.controls-row:after{display:table;content:"";line-height:0}.controls-row:after{clear:both}.controls-row [class*=span],.row-fluid .controls-row [class*=span]{float:left}.controls-row .checkbox[class*=span],.controls-row .radio[class*=span]{padding-top:5px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type=radio][disabled],input[type=checkbox][disabled],input[type=radio][readonly],input[type=checkbox][readonly]{background-color:transparent}.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;content:"";line-height:0}.form-actions:after{clear:both}.form-actions:before,.form-actions:after{display:table;content:"";line-height:0}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;vertical-align:middle;font-size:0;white-space:nowrap}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:400;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#cdf355;border-color:#7fa30c}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;*zoom:1;margin-bottom:0;vertical-align:middle}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type=radio],.form-search .checkbox input[type=checkbox],.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";line-height:0}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";line-height:0}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:700}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px}.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px}.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}table td[class*=span],table th[class*=span],.row-fluid table td[class*=span],.row-fluid table th[class*=span]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}/*!
- * Font Awesome 3.2.1
- * the iconic font designed for Bootstrap
- * ------------------------------------------------------------------------------
- * The full suite of pictographic icons, examples, and documentation can be
- * found at http://fontawesome.io. Stay up to date on Twitter at
- * http://twitter.com/fontawesome.
- *
- * License
- * ------------------------------------------------------------------------------
- * - The Font Awesome font is licensed under SIL OFL 1.1 -
- * http://scripts.sil.org/OFL
- * - Font Awesome CSS, LESS, and SASS files are licensed under MIT License -
- * http://opensource.org/licenses/mit-license.html
- * - Font Awesome documentation licensed under CC BY 3.0 -
- * http://creativecommons.org/licenses/by/3.0/
- * - Attribution is no longer required in Font Awesome 3.0, but much appreciated:
- * "Font Awesome by Dave Gandy - http://fontawesome.io"
- *
- * Author - Dave Gandy
- * ------------------------------------------------------------------------------
- * Email: dave@fontawesome.io
- * Twitter: http://twitter.com/davegandy
- * Work: Lead Product Designer @ Kyruus - http://kyruus.com
- */ @font-face{font-family:FontAwesome;src:url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.eot?v=3.2.1);src:url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.eot?#iefix&v=3.2.1) format('embedded-opentype'),url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.woff?v=3.2.1) format('woff'),url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.ttf?v=3.2.1) format('truetype'),url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1) format('svg');font-weight:400;font-style:normal}[class^=icon-],[class*=" icon-"]{font-family:FontAwesome;font-weight:400;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em}[class^=icon-]:before,[class*=" icon-"]:before{text-decoration:inherit;display:inline-block;speak:none}.icon-large:before{vertical-align:-10%;font-size:1.3333333333333333em}a [class^=icon-],a [class*=" icon-"]{display:inline}[class^=icon-].icon-fixed-width,[class*=" icon-"].icon-fixed-width{display:inline-block;width:1.1428571428571428em;text-align:right;padding-right:.2857142857142857em}[class^=icon-].icon-fixed-width.icon-large,[class*=" icon-"].icon-fixed-width.icon-large{width:1.4285714285714286em}.icons-ul{margin-left:2.142857142857143em;list-style-type:none}.icons-ul>li{position:relative}.icons-ul .icon-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;text-align:center;line-height:inherit}[class^=icon-].hide,[class*=" icon-"].hide{display:none}.icon-muted{color:#eee}.icon-light{color:#fff}.icon-dark{color:#333}.icon-border{border:solid 1px #eee;padding:.2em .25em .15em;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.icon-2x{font-size:2em}.icon-2x.icon-border{border-width:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.icon-3x{font-size:3em}.icon-3x.icon-border{border-width:3px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.icon-4x{font-size:4em}.icon-4x.icon-border{border-width:4px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.icon-5x{font-size:5em}.icon-5x.icon-border{border-width:5px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.pull-right{float:right}.pull-left{float:left}[class^=icon-].pull-left,[class*=" icon-"].pull-left{margin-right:.3em}[class^=icon-].pull-right,[class*=" icon-"].pull-right{margin-left:.3em}[class^=icon-],[class*=" icon-"]{display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0 0;background-repeat:repeat;margin-top:0}.icon-white,.nav-pills>.active>a>[class^=icon-],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^=icon-],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^=icon-],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^=icon-],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^=icon-],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^=icon-],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:none}.btn [class^=icon-].icon-large,.nav [class^=icon-].icon-large,.btn [class*=" icon-"].icon-large,.nav [class*=" icon-"].icon-large{line-height:.9em}.btn [class^=icon-].icon-spin,.nav [class^=icon-].icon-spin,.btn [class*=" icon-"].icon-spin,.nav [class*=" icon-"].icon-spin{display:inline-block}.nav-tabs [class^=icon-],.nav-pills [class^=icon-],.nav-tabs [class*=" icon-"],.nav-pills [class*=" icon-"],.nav-tabs [class^=icon-].icon-large,.nav-pills [class^=icon-].icon-large,.nav-tabs [class*=" icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large{line-height:.9em}.btn [class^=icon-].pull-left.icon-2x,.btn [class*=" icon-"].pull-left.icon-2x,.btn [class^=icon-].pull-right.icon-2x,.btn [class*=" icon-"].pull-right.icon-2x{margin-top:.18em}.btn [class^=icon-].icon-spin.icon-large,.btn [class*=" icon-"].icon-spin.icon-large{line-height:.8em}.btn.btn-small [class^=icon-].pull-left.icon-2x,.btn.btn-small [class*=" icon-"].pull-left.icon-2x,.btn.btn-small [class^=icon-].pull-right.icon-2x,.btn.btn-small [class*=" icon-"].pull-right.icon-2x{margin-top:.25em}.btn.btn-large [class^=icon-],.btn.btn-large [class*=" icon-"]{margin-top:0}.btn.btn-large [class^=icon-].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x,.btn.btn-large [class^=icon-].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-top:.05em}.btn.btn-large [class^=icon-].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x{margin-right:.2em}.btn.btn-large [class^=icon-].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-left:.2em}.nav-list [class^=icon-],.nav-list [class*=" icon-"]{line-height:inherit}.icon-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:-35%}.icon-stack [class^=icon-],.icon-stack [class*=" icon-"]{display:block;text-align:center;position:absolute;width:100%;height:100%;font-size:1em;line-height:inherit;*line-height:2em}.icon-stack .icon-stack-base{font-size:2em;*line-height:1em}.icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}a .icon-stack,a .icon-spin{display:inline-block;text-decoration:none}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.icon-rotate-90:before{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}.icon-rotate-180:before{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2)}.icon-rotate-270:before{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3)}.icon-flip-horizontal:before{-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.icon-flip-vertical:before{-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}a .icon-rotate-90:before,a .icon-rotate-180:before,a .icon-rotate-270:before,a .icon-flip-horizontal:before,a .icon-flip-vertical:before{display:inline-block}.icon-glass:before{content:"\f000"}.icon-music:before{content:"\f001"}.icon-search:before{content:"\f002"}.icon-envelope-alt:before{content:"\f003"}.icon-heart:before{content:"\f004"}.icon-star:before{content:"\f005"}.icon-star-empty:before{content:"\f006"}.icon-user:before{content:"\f007"}.icon-film:before{content:"\f008"}.icon-th-large:before{content:"\f009"}.icon-th:before{content:"\f00a"}.icon-th-list:before{content:"\f00b"}.icon-ok:before{content:"\f00c"}.icon-remove:before{content:"\f00d"}.icon-zoom-in:before{content:"\f00e"}.icon-zoom-out:before{content:"\f010"}.icon-power-off:before,.icon-off:before{content:"\f011"}.icon-signal:before{content:"\f012"}.icon-gear:before,.icon-cog:before{content:"\f013"}.icon-trash:before{content:"\f014"}.icon-home:before{content:"\f015"}.icon-file-alt:before{content:"\f016"}.icon-time:before{content:"\f017"}.icon-road:before{content:"\f018"}.icon-download-alt:before{content:"\f019"}.icon-download:before{content:"\f01a"}.icon-upload:before{content:"\f01b"}.icon-inbox:before{content:"\f01c"}.icon-play-circle:before{content:"\f01d"}.icon-rotate-right:before,.icon-repeat:before{content:"\f01e"}.icon-refresh:before{content:"\f021"}.icon-list-alt:before{content:"\f022"}.icon-lock:before{content:"\f023"}.icon-flag:before{content:"\f024"}.icon-headphones:before{content:"\f025"}.icon-volume-off:before{content:"\f026"}.icon-volume-down:before{content:"\f027"}.icon-volume-up:before{content:"\f028"}.icon-qrcode:before{content:"\f029"}.icon-barcode:before{content:"\f02a"}.icon-tag:before{content:"\f02b"}.icon-tags:before{content:"\f02c"}.icon-book:before{content:"\f02d"}.icon-bookmark:before{content:"\f02e"}.icon-print:before{content:"\f02f"}.icon-camera:before{content:"\f030"}.icon-font:before{content:"\f031"}.icon-bold:before{content:"\f032"}.icon-italic:before{content:"\f033"}.icon-text-height:before{content:"\f034"}.icon-text-width:before{content:"\f035"}.icon-align-left:before{content:"\f036"}.icon-align-center:before{content:"\f037"}.icon-align-right:before{content:"\f038"}.icon-align-justify:before{content:"\f039"}.icon-list:before{content:"\f03a"}.icon-indent-left:before{content:"\f03b"}.icon-indent-right:before{content:"\f03c"}.icon-facetime-video:before{content:"\f03d"}.icon-picture:before{content:"\f03e"}.icon-pencil:before{content:"\f040"}.icon-map-marker:before{content:"\f041"}.icon-adjust:before{content:"\f042"}.icon-tint:before{content:"\f043"}.icon-edit:before{content:"\f044"}.icon-share:before{content:"\f045"}.icon-check:before{content:"\f046"}.icon-move:before{content:"\f047"}.icon-step-backward:before{content:"\f048"}.icon-fast-backward:before{content:"\f049"}.icon-backward:before{content:"\f04a"}.icon-play:before{content:"\f04b"}.icon-pause:before{content:"\f04c"}.icon-stop:before{content:"\f04d"}.icon-forward:before{content:"\f04e"}.icon-fast-forward:before{content:"\f050"}.icon-step-forward:before{content:"\f051"}.icon-eject:before{content:"\f052"}.icon-chevron-left:before{content:"\f053"}.icon-chevron-right:before{content:"\f054"}.icon-plus-sign:before{content:"\f055"}.icon-minus-sign:before{content:"\f056"}.icon-remove-sign:before{content:"\f057"}.icon-ok-sign:before{content:"\f058"}.icon-question-sign:before{content:"\f059"}.icon-info-sign:before{content:"\f05a"}.icon-screenshot:before{content:"\f05b"}.icon-remove-circle:before{content:"\f05c"}.icon-ok-circle:before{content:"\f05d"}.icon-ban-circle:before{content:"\f05e"}.icon-arrow-left:before{content:"\f060"}.icon-arrow-right:before{content:"\f061"}.icon-arrow-up:before{content:"\f062"}.icon-arrow-down:before{content:"\f063"}.icon-mail-forward:before,.icon-share-alt:before{content:"\f064"}.icon-resize-full:before{content:"\f065"}.icon-resize-small:before{content:"\f066"}.icon-plus:before{content:"\f067"}.icon-minus:before{content:"\f068"}.icon-asterisk:before{content:"\f069"}.icon-exclamation-sign:before{content:"\f06a"}.icon-gift:before{content:"\f06b"}.icon-leaf:before{content:"\f06c"}.icon-fire:before{content:"\f06d"}.icon-eye-open:before{content:"\f06e"}.icon-eye-close:before{content:"\f070"}.icon-warning-sign:before{content:"\f071"}.icon-plane:before{content:"\f072"}.icon-calendar:before{content:"\f073"}.icon-random:before{content:"\f074"}.icon-comment:before{content:"\f075"}.icon-magnet:before{content:"\f076"}.icon-chevron-up:before{content:"\f077"}.icon-chevron-down:before{content:"\f078"}.icon-retweet:before{content:"\f079"}.icon-shopping-cart:before{content:"\f07a"}.icon-folder-close:before{content:"\f07b"}.icon-folder-open:before{content:"\f07c"}.icon-resize-vertical:before{content:"\f07d"}.icon-resize-horizontal:before{content:"\f07e"}.icon-bar-chart:before{content:"\f080"}.icon-twitter-sign:before{content:"\f081"}.icon-facebook-sign:before{content:"\f082"}.icon-camera-retro:before{content:"\f083"}.icon-key:before{content:"\f084"}.icon-gears:before,.icon-cogs:before{content:"\f085"}.icon-comments:before{content:"\f086"}.icon-thumbs-up-alt:before{content:"\f087"}.icon-thumbs-down-alt:before{content:"\f088"}.icon-star-half:before{content:"\f089"}.icon-heart-empty:before{content:"\f08a"}.icon-signout:before{content:"\f08b"}.icon-linkedin-sign:before{content:"\f08c"}.icon-pushpin:before{content:"\f08d"}.icon-external-link:before{content:"\f08e"}.icon-signin:before{content:"\f090"}.icon-trophy:before{content:"\f091"}.icon-github-sign:before{content:"\f092"}.icon-upload-alt:before{content:"\f093"}.icon-lemon:before{content:"\f094"}.icon-phone:before{content:"\f095"}.icon-unchecked:before,.icon-check-empty:before{content:"\f096"}.icon-bookmark-empty:before{content:"\f097"}.icon-phone-sign:before{content:"\f098"}.icon-twitter:before{content:"\f099"}.icon-facebook:before{content:"\f09a"}.icon-github:before{content:"\f09b"}.icon-unlock:before{content:"\f09c"}.icon-credit-card:before{content:"\f09d"}.icon-rss:before{content:"\f09e"}.icon-hdd:before{content:"\f0a0"}.icon-bullhorn:before{content:"\f0a1"}.icon-bell:before{content:"\f0a2"}.icon-certificate:before{content:"\f0a3"}.icon-hand-right:before{content:"\f0a4"}.icon-hand-left:before{content:"\f0a5"}.icon-hand-up:before{content:"\f0a6"}.icon-hand-down:before{content:"\f0a7"}.icon-circle-arrow-left:before{content:"\f0a8"}.icon-circle-arrow-right:before{content:"\f0a9"}.icon-circle-arrow-up:before{content:"\f0aa"}.icon-circle-arrow-down:before{content:"\f0ab"}.icon-globe:before{content:"\f0ac"}.icon-wrench:before{content:"\f0ad"}.icon-tasks:before{content:"\f0ae"}.icon-filter:before{content:"\f0b0"}.icon-briefcase:before{content:"\f0b1"}.icon-fullscreen:before{content:"\f0b2"}.icon-group:before{content:"\f0c0"}.icon-link:before{content:"\f0c1"}.icon-cloud:before{content:"\f0c2"}.icon-beaker:before{content:"\f0c3"}.icon-cut:before{content:"\f0c4"}.icon-copy:before{content:"\f0c5"}.icon-paperclip:before,.icon-paper-clip:before{content:"\f0c6"}.icon-save:before{content:"\f0c7"}.icon-sign-blank:before{content:"\f0c8"}.icon-reorder:before{content:"\f0c9"}.icon-list-ul:before{content:"\f0ca"}.icon-list-ol:before{content:"\f0cb"}.icon-strikethrough:before{content:"\f0cc"}.icon-underline:before{content:"\f0cd"}.icon-table:before{content:"\f0ce"}.icon-magic:before{content:"\f0d0"}.icon-truck:before{content:"\f0d1"}.icon-pinterest:before{content:"\f0d2"}.icon-pinterest-sign:before{content:"\f0d3"}.icon-google-plus-sign:before{content:"\f0d4"}.icon-google-plus:before{content:"\f0d5"}.icon-money:before{content:"\f0d6"}.icon-caret-down:before{content:"\f0d7"}.icon-caret-up:before{content:"\f0d8"}.icon-caret-left:before{content:"\f0d9"}.icon-caret-right:before{content:"\f0da"}.icon-columns:before{content:"\f0db"}.icon-sort:before{content:"\f0dc"}.icon-sort-down:before{content:"\f0dd"}.icon-sort-up:before{content:"\f0de"}.icon-envelope:before{content:"\f0e0"}.icon-linkedin:before{content:"\f0e1"}.icon-rotate-left:before,.icon-undo:before{content:"\f0e2"}.icon-legal:before{content:"\f0e3"}.icon-dashboard:before{content:"\f0e4"}.icon-comment-alt:before{content:"\f0e5"}.icon-comments-alt:before{content:"\f0e6"}.icon-bolt:before{content:"\f0e7"}.icon-sitemap:before{content:"\f0e8"}.icon-umbrella:before{content:"\f0e9"}.icon-paste:before{content:"\f0ea"}.icon-lightbulb:before{content:"\f0eb"}.icon-exchange:before{content:"\f0ec"}.icon-cloud-download:before{content:"\f0ed"}.icon-cloud-upload:before{content:"\f0ee"}.icon-user-md:before{content:"\f0f0"}.icon-stethoscope:before{content:"\f0f1"}.icon-suitcase:before{content:"\f0f2"}.icon-bell-alt:before{content:"\f0f3"}.icon-coffee:before{content:"\f0f4"}.icon-food:before{content:"\f0f5"}.icon-file-text-alt:before{content:"\f0f6"}.icon-building:before{content:"\f0f7"}.icon-hospital:before{content:"\f0f8"}.icon-ambulance:before{content:"\f0f9"}.icon-medkit:before{content:"\f0fa"}.icon-fighter-jet:before{content:"\f0fb"}.icon-beer:before{content:"\f0fc"}.icon-h-sign:before{content:"\f0fd"}.icon-plus-sign-alt:before{content:"\f0fe"}.icon-double-angle-left:before{content:"\f100"}.icon-double-angle-right:before{content:"\f101"}.icon-double-angle-up:before{content:"\f102"}.icon-double-angle-down:before{content:"\f103"}.icon-angle-left:before{content:"\f104"}.icon-angle-right:before{content:"\f105"}.icon-angle-up:before{content:"\f106"}.icon-angle-down:before{content:"\f107"}.icon-desktop:before{content:"\f108"}.icon-laptop:before{content:"\f109"}.icon-tablet:before{content:"\f10a"}.icon-mobile-phone:before{content:"\f10b"}.icon-circle-blank:before{content:"\f10c"}.icon-quote-left:before{content:"\f10d"}.icon-quote-right:before{content:"\f10e"}.icon-spinner:before{content:"\f110"}.icon-circle:before{content:"\f111"}.icon-mail-reply:before,.icon-reply:before{content:"\f112"}.icon-github-alt:before{content:"\f113"}.icon-folder-close-alt:before{content:"\f114"}.icon-folder-open-alt:before{content:"\f115"}.icon-expand-alt:before{content:"\f116"}.icon-collapse-alt:before{content:"\f117"}.icon-smile:before{content:"\f118"}.icon-frown:before{content:"\f119"}.icon-meh:before{content:"\f11a"}.icon-gamepad:before{content:"\f11b"}.icon-keyboard:before{content:"\f11c"}.icon-flag-alt:before{content:"\f11d"}.icon-flag-checkered:before{content:"\f11e"}.icon-terminal:before{content:"\f120"}.icon-code:before{content:"\f121"}.icon-reply-all:before{content:"\f122"}.icon-mail-reply-all:before{content:"\f122"}.icon-star-half-full:before,.icon-star-half-empty:before{content:"\f123"}.icon-location-arrow:before{content:"\f124"}.icon-crop:before{content:"\f125"}.icon-code-fork:before{content:"\f126"}.icon-unlink:before{content:"\f127"}.icon-question:before{content:"\f128"}.icon-info:before{content:"\f129"}.icon-exclamation:before{content:"\f12a"}.icon-superscript:before{content:"\f12b"}.icon-subscript:before{content:"\f12c"}.icon-eraser:before{content:"\f12d"}.icon-puzzle-piece:before{content:"\f12e"}.icon-microphone:before{content:"\f130"}.icon-microphone-off:before{content:"\f131"}.icon-shield:before{content:"\f132"}.icon-calendar-empty:before{content:"\f133"}.icon-fire-extinguisher:before{content:"\f134"}.icon-rocket:before{content:"\f135"}.icon-maxcdn:before{content:"\f136"}.icon-chevron-sign-left:before{content:"\f137"}.icon-chevron-sign-right:before{content:"\f138"}.icon-chevron-sign-up:before{content:"\f139"}.icon-chevron-sign-down:before{content:"\f13a"}.icon-html5:before{content:"\f13b"}.icon-css3:before{content:"\f13c"}.icon-anchor:before{content:"\f13d"}.icon-unlock-alt:before{content:"\f13e"}.icon-bullseye:before{content:"\f140"}.icon-ellipsis-horizontal:before{content:"\f141"}.icon-ellipsis-vertical:before{content:"\f142"}.icon-rss-sign:before{content:"\f143"}.icon-play-sign:before{content:"\f144"}.icon-ticket:before{content:"\f145"}.icon-minus-sign-alt:before{content:"\f146"}.icon-check-minus:before{content:"\f147"}.icon-level-up:before{content:"\f148"}.icon-level-down:before{content:"\f149"}.icon-check-sign:before{content:"\f14a"}.icon-edit-sign:before{content:"\f14b"}.icon-external-link-sign:before{content:"\f14c"}.icon-share-sign:before{content:"\f14d"}.icon-compass:before{content:"\f14e"}.icon-collapse:before{content:"\f150"}.icon-collapse-top:before{content:"\f151"}.icon-expand:before{content:"\f152"}.icon-euro:before,.icon-eur:before{content:"\f153"}.icon-gbp:before{content:"\f154"}.icon-dollar:before,.icon-usd:before{content:"\f155"}.icon-rupee:before,.icon-inr:before{content:"\f156"}.icon-yen:before,.icon-jpy:before{content:"\f157"}.icon-renminbi:before,.icon-cny:before{content:"\f158"}.icon-won:before,.icon-krw:before{content:"\f159"}.icon-bitcoin:before,.icon-btc:before{content:"\f15a"}.icon-file:before{content:"\f15b"}.icon-file-text:before{content:"\f15c"}.icon-sort-by-alphabet:before{content:"\f15d"}.icon-sort-by-alphabet-alt:before{content:"\f15e"}.icon-sort-by-attributes:before{content:"\f160"}.icon-sort-by-attributes-alt:before{content:"\f161"}.icon-sort-by-order:before{content:"\f162"}.icon-sort-by-order-alt:before{content:"\f163"}.icon-thumbs-up:before{content:"\f164"}.icon-thumbs-down:before{content:"\f165"}.icon-youtube-sign:before{content:"\f166"}.icon-youtube:before{content:"\f167"}.icon-xing:before{content:"\f168"}.icon-xing-sign:before{content:"\f169"}.icon-youtube-play:before{content:"\f16a"}.icon-dropbox:before{content:"\f16b"}.icon-stackexchange:before{content:"\f16c"}.icon-instagram:before{content:"\f16d"}.icon-flickr:before{content:"\f16e"}.icon-adn:before{content:"\f170"}.icon-bitbucket:before{content:"\f171"}.icon-bitbucket-sign:before{content:"\f172"}.icon-tumblr:before{content:"\f173"}.icon-tumblr-sign:before{content:"\f174"}.icon-long-arrow-down:before{content:"\f175"}.icon-long-arrow-up:before{content:"\f176"}.icon-long-arrow-left:before{content:"\f177"}.icon-long-arrow-right:before{content:"\f178"}.icon-apple:before{content:"\f179"}.icon-windows:before{content:"\f17a"}.icon-android:before{content:"\f17b"}.icon-linux:before{content:"\f17c"}.icon-dribbble:before{content:"\f17d"}.icon-skype:before{content:"\f17e"}.icon-foursquare:before{content:"\f180"}.icon-trello:before{content:"\f181"}.icon-female:before{content:"\f182"}.icon-male:before{content:"\f183"}.icon-gittip:before{content:"\f184"}.icon-sun:before{content:"\f185"}.icon-moon:before{content:"\f186"}.icon-archive:before{content:"\f187"}.icon-bug:before{content:"\f188"}.icon-vk:before{content:"\f189"}.icon-weibo:before{content:"\f18a"}.icon-renren:before{content:"\f18b"}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{text-decoration:none;color:#fff;background-color:#e23632;background-image:-moz-linear-gradient(top,#e33f3b,#e02925);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e33f3b),to(#e02925));background-image:-webkit-linear-gradient(top,#e33f3b,#e02925);background-image:-o-linear-gradient(top,#e33f3b,#e02925);background-image:linear-gradient(to bottom,#e33f3b,#e02925);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe33f3b', endColorstr='#ffe02925', GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#e23632;background-image:-moz-linear-gradient(top,#e33f3b,#e02925);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e33f3b),to(#e02925));background-image:-webkit-linear-gradient(top,#e33f3b,#e02925);background-image:-o-linear-gradient(top,#e33f3b,#e02925);background-image:linear-gradient(to bottom,#e33f3b,#e02925);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe33f3b', endColorstr='#ffe02925', GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:default}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px;-moz-border-radius:0 6px 6px;border-radius:0 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#ccc;margin-top:5px;margin-right:-10px}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-left:20px;padding-right:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:700;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^=icon-],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^=icon-],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^=icon-],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#e3553b;background-image:-moz-linear-gradient(top,#e33f3b,#e3773b);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e33f3b),to(#e3773b));background-image:-webkit-linear-gradient(top,#e33f3b,#e3773b);background-image:-o-linear-gradient(top,#e33f3b,#e3773b);background-image:linear-gradient(to bottom,#e33f3b,#e3773b);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe33f3b', endColorstr='#ffe3773b', GradientType=0);border-color:#e3773b #e3773b #b7521a;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e3773b;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#e3773b;*background-color:#e06825}.btn-primary:active,.btn-primary.active{background-color:#ce5c1d \9}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#e3773b;*background-color:#e06825}.btn-primary:active,.btn-primary.active{background-color:#ce5c1d \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#f58258;background-image:-moz-linear-gradient(top,#f79875,#f3622d);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f79875),to(#f3622d));background-image:-webkit-linear-gradient(top,#f79875,#f3622d);background-image:-o-linear-gradient(top,#f79875,#f3622d);background-image:linear-gradient(to bottom,#f79875,#f3622d);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff79875', endColorstr='#fff3622d', GradientType=0);border-color:#f3622d #f3622d #c83e0b;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#f3622d;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f3622d;*background-color:#f25015}.btn-warning:active,.btn-warning.active{background-color:#e0450d \9}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f3622d;*background-color:#f25015}.btn-warning:active,.btn-warning.active{background-color:#e0450d \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#5bb75b;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#49afcd;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#363636;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);border-color:#222 #222 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#222;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type=submit].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type=submit].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type=submit].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type=submit].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{border-color:transparent;cursor:pointer;color:#e33f3b;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#b71e1a;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*zoom:1;font-size:0;vertical-align:middle;white-space:nowrap;*margin-left:.3em}.btn-group:first-child{*margin-left:0}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{font-size:0;margin-top:10px;margin-bottom:10px}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);*padding-top:5px;*padding-bottom:5px}.btn-group>.btn-mini+.dropdown-toggle{padding-left:5px;padding-right:5px;*padding-top:2px;*padding-bottom:2px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{padding-left:12px;padding-right:12px;*padding-top:7px;*padding-bottom:7px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#e3773b}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f3622d}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px}.btn-large .caret{border-left-width:5px;border-right-width:5px;border-top-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-left:0;margin-top:-1px}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847}.alert-success h4{color:#468847}.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-left:0;margin-bottom:20px;list-style:none}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:700;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-left:15px;padding-right:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255,255,255,.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.2);background-color:#e33f3b}.nav-list [class^=icon-],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";line-height:0}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";line-height:0}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#fff;background-color:#e33f3b}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{border-color:#ddd;z-index:2}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{border-top-color:#e33f3b;border-bottom-color:#e33f3b;margin-top:6px}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#b71e1a;border-bottom-color:#b71e1a}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;content:"";line-height:0}.tabbable:after{clear:both}.tabbable:before,.tabbable:after{display:table;content:"";line-height:0}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-bottom-color:transparent;border-top-color:#ddd}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;background-color:transparent;cursor:default}.navbar{overflow:visible;margin-bottom:20px;*position:relative;*z-index:2}.navbar-inner{min-height:40px;padding-left:20px;padding-right:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,.065);box-shadow:0 1px 4px rgba(0,0,0,.065);*zoom:1}.navbar-inner:before,.navbar-inner:after{display:table;content:"";line-height:0}.navbar-inner:after{clear:both}.navbar-inner:before,.navbar-inner:after{display:table;content:"";line-height:0}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{float:left;display:block;padding:10px 20px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-left:1px solid #f2f2f2;border-right:1px solid #fff}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;content:"";line-height:0}.navbar-form:after{clear:both}.navbar-form:before,.navbar-form:after{display:table;content:"";line-height:0}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type=image],.navbar-form input[type=checkbox],.navbar-form input[type=radio]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{margin-bottom:0;padding:4px 14px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:400;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,.1);box-shadow:0 1px 10px rgba(0,0,0,.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,.1);box-shadow:0 -1px 10px rgba(0,0,0,.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{background-color:transparent;color:#333;text-decoration:none}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,.125);box-shadow:inset 0 3px 8px rgba(0,0,0,.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#ededed;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e5e5e5;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,.25);box-shadow:0 1px 0 rgba(0,0,0,.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:9px}.navbar .nav>li>.dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:10px}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);border-bottom:0;bottom:-7px;top:auto}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{border-top:6px solid #fff;border-bottom:0;bottom:-6px;top:auto}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{background-color:#e5e5e5;color:#555}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{left:auto;right:0}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{left:auto;right:12px}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{left:auto;right:13px}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{left:auto;right:100%;margin-left:0;margin-right:-1px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);border-color:#252525}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#fff}.navbar-inverse .brand{color:#999}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{background-color:transparent;color:#fff}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#fff}.navbar-inverse .divider-vertical{border-left-color:#111;border-right-color:#222}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{background-color:#111;color:#fff}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 rgba(255,255,255,.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 rgba(255,255,255,.15);box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 rgba(255,255,255,.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);-moz-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15);outline:0}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e0e0e;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);border-color:#040404 #040404 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#040404;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 0 #fff}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;background-color:transparent;cursor:default}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-bottomleft:3px;border-bottom-left-radius:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-bottomright:3px;border-bottom-right-radius:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;list-style:none;text-align:center;*zoom:1}.pager:before,.pager:after{display:table;content:"";line-height:0}.pager:after{clear:both}.pager:before,.pager:after{display:table;content:"";line-height:0}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:default}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,.3);box-shadow:0 3px 7px rgba(0,0,0,.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;outline:0}.modal.fade{-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out;top:-25%}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;overflow-y:auto;max-height:400px;padding:15px}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;*zoom:1}.modal-footer:before,.modal-footer:after{display:table;content:"";line-height:0}.modal-footer:after{clear:both}.modal-footer:before,.modal-footer:after{display:table;content:"";line-height:0}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right .arrow:after{left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom .arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left .arrow:after{right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;content:"";line-height:0}.thumbnails:after{clear:both}.thumbnails:before,.thumbnails:after{display:table;content:"";line-height:0}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,.055);box-shadow:0 1px 3px rgba(0,0,0,.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover,a.thumbnail:focus{border-color:#e33f3b;-webkit-box-shadow:0 1px 4px rgba(0,105,214,.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,.25);box-shadow:0 1px 4px rgba(0,105,214,.25)}.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:700;line-height:14px;color:#fff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-left:9px;padding-right:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f3622d}.label-warning[href],.badge-warning[href]{background-color:#e0450d}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.progress .bar{width:0;height:100%;color:#fff;float:left;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));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:-moz-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);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));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:-moz-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)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));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:-moz-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)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));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:-moz-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)}.progress-warning .bar,.progress .bar-warning{background-color:#f58258;background-image:-moz-linear-gradient(top,#f79875,#f3622d);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f79875),to(#f3622d));background-image:-webkit-linear-gradient(top,#f79875,#f3622d);background-image:-o-linear-gradient(top,#f79875,#f3622d);background-image:linear-gradient(to bottom,#f79875,#f3622d);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff79875', endColorstr='#fff3622d', GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#f79875;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));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:-moz-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)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{overflow:hidden;width:100%;position:relative}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{left:auto;right:15px}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255,255,255,.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:15px;background:#333;background:rgba(0,0,0,.75)}.carousel-caption h4,.carousel-caption p{color:#fff;line-height:20px}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.config-item{height:41px}.config-item .edit-button{float:right;display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;padding-top:12px;padding-bottom:12px;margin-top:0;padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;display:none}.config-item .edit-button [class^=icon-].icon-large,.config-item .edit-button [class*=" icon-"].icon-large{line-height:.9em}.config-item .edit-button [class^=icon-].icon-spin,.config-item .edit-button [class*=" icon-"].icon-spin{display:inline-block}.config-item .edit-button [class^=icon-].pull-left.icon-2x,.config-item .edit-button [class*=" icon-"].pull-left.icon-2x,.config-item .edit-button [class^=icon-].pull-right.icon-2x,.config-item .edit-button [class*=" icon-"].pull-right.icon-2x{margin-top:.18em}.config-item .edit-button [class^=icon-].icon-spin.icon-large,.config-item .edit-button [class*=" icon-"].icon-spin.icon-large{line-height:.8em}.config-item .edit-button:hover,.config-item .edit-button:focus,.config-item .edit-button:active,.config-item .edit-button.active,.config-item .edit-button.disabled,.config-item .edit-button[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.config-item .edit-button:active,.config-item .edit-button.active{background-color:#ccc \9}.config-item .edit-button:hover,.config-item .edit-button:focus,.config-item .edit-button:active,.config-item .edit-button.active,.config-item .edit-button.disabled,.config-item .edit-button[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.config-item .edit-button:active,.config-item .edit-button.active{background-color:#ccc \9}.config-item .edit-button:first-child{*margin-left:0}.config-item .edit-button:first-child{*margin-left:0}.config-item .edit-button:hover,.config-item .edit-button:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.config-item .edit-button:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.config-item .edit-button.active,.config-item .edit-button:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.config-item .edit-button.disabled,.config-item .edit-button[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.config-item .edit-button .label,.config-item .edit-button .badge{position:relative;top:-1px}.config-item .edit-button .label,.config-item .edit-button .badge{top:0}.config-item td:hover .edit-button{display:block}.config-item .value-input{width:98%}.config-item #delete-value{cursor:pointer}.button-margin{margin-bottom:15px}#add-section-modal{width:400px}#log-sidebar ul{margin-left:0;list-style:none}#log-sidebar .remove-filter{opacity:.2}pre.prettyprint{background:#000;border-radius:0;font-size:83%;line-height:1.4;margin:0;padding:16px}.prettyprint .pln,.prettyprint .pun,.prettyprint .typ{color:#f8f8f8}.prettyprint .kwd{color:#ff8300}.prettyprint .str{color:#ff8300}.prettyprint .lit{color:#0f0}.prettyprint .com{color:#666}.CodeMirror-wrap pre.view-code-error{color:#af2d24}.CodeMirror-wrap pre .tooltip{z-index:100000000}#db-tools{position:absolute;top:-7px;right:0;width:390px}#db-tools .btn-group{position:absolute;left:0;top:6px}#db-tools form{position:absolute;right:0;top:0}.tools .nav{margin-bottom:10px}#sidenav{padding-top:10px}#sidenav h3{margin:10px 0}#sidenav li a span.divider{background:0;color:#ccc;padding:0 2px}#sidenav li.nav-header a{display:inline}#sidenav div.btn-group{display:inline-block}#sidenav li.nav-header,#sidenav #sidenav li a{padding-left:4px}#sidenav li.active a{background-color:#ddd;color:#333;text-shadow:none}.edit{display:none}.edit form{margin-bottom:0}.edit h3{border-bottom:1px solid #ccc;font-size:100%;line-height:1;margin-bottom:18px}.edit textarea{height:100px;width:95%}.edit .btn-toolbar{margin-bottom:0}.edit .preview{width:100px}#new-view-index .confirm{display:none}#new-view-index .confirm .progress{display:none;margin:20px}#new-view-index textarea{height:100px;width:95%}.view{display:none}.view .result-tools{float:left;width:100%;margin-bottom:10px}.view table td div{position:relative}.view table td div div{display:none;line-height:1;position:absolute;right:4px;top:4px}.view table td div:hover div a.edits{padding-left:16px;padding-right:16px}.view table td div:hover div{display:block}.view.show{display:block}.view.show.hidden-by-params{display:none}#database .view table tr td{padding:0}.loading{display:none}.view-request-duration{padding-right:10px;float:right}table.active-tasks th{cursor:pointer}.well .row-fluid{margin:0}.well .row-fluid .row-fluid:last-child .well-item{border:0}.well .well-item{color:#666;font-size:12px;border-bottom:1px solid #e5e5e5;padding:8px 4px}.well .well-item strong{font-size:16px}#doc .dropdown-menu{width:auto}.databases a.db-actions,.databases a.db-actions:visited{color:#e33f3b;border:1px solid #e3e3e3;padding:5px 7px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;text-decoration:none;font-size:19px}.btn-group ul.dropdown-menu li a:before{margin-right:10px}.design-doc-group .span3{margin:0}.design-doc-group #new-ddoc-section{margin-top:10px}.design-doc-group #new-ddoc-section label{width:100px}.design-doc-group #new-ddoc-section .controls{margin-left:100px}table#changes-table #changes{width:50%}table#changes-table #seq,table#changes-table #deleted{width:5%}.doc-editor-buttons{margin-bottom:15px}.doc-editor-buttons a.button.btn-large.gray{padding:9px 10px;vertical-align:middle}@font-face{font-family:fauxtonicon;src:url(../img/fontcustom_fauxton.eot);src:url(../img/fontcustom_fauxton.eot?#iefix) format("embedded-opentype"),url(../img/fontcustom_fauxton.woff) format("woff"),url(../img/fontcustom_fauxton.ttf) format("truetype"),url(../img/fontcustom_fauxton.svg#fontcustom_fauxton) format("svg");font-weight:400;font-style:normal}.fonticon-activetasks:before,.fonticon-bookmark:before,.fonticon-carrot:before,.fonticon-circle-check:before,.fonticon-circle-minus:before,.fonticon-circle-plus:before,.fonticon-circle-x:before,.fonticon-cog:before,.fonticon-collapse:before,.fonticon-dashboard:before,.fonticon-database:before,.fonticon-document:before,.fonticon-documents:before,.fonticon-expand:before,.fonticon-eye:before,.fonticon-key:before,.fonticon-link:before,.fonticon-log:before,.fonticon-minus:before,.fonticon-mixer:before,.fonticon-new-database:before,.fonticon-paperclip:before,.fonticon-pencil:before,.fonticon-play:before,.fonticon-plus:before,.fonticon-profile:before,.fonticon-replicate:before,.fonticon-reply:before,.fonticon-save:before,.fonticon-search:before,.fonticon-stats:before,.fonticon-support:before,.fonticon-swap-arrows:before,.fonticon-trash:before,.fonticon-user:before,.fonticon-users:before,.fonticon-wrench:before,.fonticon-x:before{font-family:fauxtonicon;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;display:inline-block;text-decoration:inherit}.fonticon-activetasks:before{content:"\f100"}.fonticon-bookmark:before{content:"\f101"}.fonticon-carrot:before{content:"\f102"}.fonticon-circle-check:before{content:"\f103"}.fonticon-circle-minus:before{content:"\f104"}.fonticon-circle-plus:before{content:"\f105"}.fonticon-circle-x:before{content:"\f106"}.fonticon-cog:before{content:"\f107"}.fonticon-collapse:before{content:"\f108"}.fonticon-dashboard:before{content:"\f109"}.fonticon-database:before{content:"\f10a"}.fonticon-document:before{content:"\f10b"}.fonticon-documents:before{content:"\f10c"}.fonticon-expand:before{content:"\f10d"}.fonticon-eye:before{content:"\f10e"}.fonticon-key:before{content:"\f10f"}.fonticon-link:before{content:"\f110"}.fonticon-log:before{content:"\f111"}.fonticon-minus:before{content:"\f112"}.fonticon-mixer:before{content:"\f113"}.fonticon-new-database:before{content:"\f114"}.fonticon-paperclip:before{content:"\f115"}.fonticon-pencil:before{content:"\f116"}.fonticon-play:before{content:"\f117"}.fonticon-plus:before{content:"\f118"}.fonticon-profile:before{content:"\f119"}.fonticon-replicate:before{content:"\f11a"}.fonticon-reply:before{content:"\f11b"}.fonticon-save:before{content:"\f11c"}.fonticon-search:before{content:"\f11d"}.fonticon-stats:before{content:"\f11e"}.fonticon-support:before{content:"\f11f"}.fonticon-swap-arrows:before{content:"\f120"}.fonticon-trash:before{content:"\f121"}.fonticon-user:before{content:"\f122"}.fonticon-users:before{content:"\f123"}.fonticon-wrench:before{content:"\f124"}.fonticon-x:before{content:"\f125"}body{background-color:#F2F2F2}#main>footer{position:fixed;bottom:0;font-size:10px;margin-left:220px;padding:5px 10px;background-color:#F2F2F2;width:100%}.closeMenu #main>footer{margin-left:62px}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.row{margin-left:0}body{font-size:16px;line-height:1.3;padding-bottom:0;color:#333;padding-top:92px;background-color:#f2f2f2}body#home{padding-top:90px}body .btn{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-image:none;text-shadow:none;background-repeat:no-repeat}h2,h3,h4{font-weight:600}a,.btn{-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear}a,a:visited,a:active{color:#e33f3b}a:hover{color:#e33f3b}.loader{background:url(../img/loader.gif) center center no-repeat;min-height:100px}#app-container.loader{min-height:400px}#app-container.loader>*{display:none}#global-notifications{position:fixed;top:0;display:block;z-index:100000;left:220px;width:100%}.closeMenu #global-notifications{left:62px}#app-container{padding:0;height:100%;width:100%;position:absolute;top:0;left:0}#app-container>.row-fluid{height:100%}.container-fluid{padding-right:0;padding-left:0}#primary-navbar{height:100%;position:fixed;width:220px;top:0;bottom:0;background-color:#3a2c2b}#primary-navbar #footer-links{position:absolute;bottom:0;width:100%}#primary-navbar .navbar .brand{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;-webkit-transition:left,1s cubic-bezier(0.805,.005,.165,.985);-moz-transition:left,1s cubic-bezier(0.805,.005,.165,.985);-ms-transition:left,1s cubic-bezier(0.805,.005,.165,.985);-o-transition:left,1s cubic-bezier(0.805,.005,.165,.985);transition:left,1s cubic-bezier(0.805,.005,.165,.985);-webkit-transition-timing-function:cubic-bezier(0.805,.005,.165,.985);-moz-transition-timing-function:cubic-bezier(0.805,.005,.165,.985);-ms-transition-timing-function:cubic-bezier(0.805,.005,.165,.985);-o-transition-timing-function:cubic-bezier(0.805,.005,.165,.985);transition-timing-function:cubic-bezier(0.805,.005,.165,.985);margin:10px 0 6px;width:174px;height:40px;padding:10px}#primary-navbar .navbar .brand .icon{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background:url(../img/couchdb-site.png) no-repeat 0 0;display:block;height:100%;width:100%}#primary-navbar .navbar .brand .burger{-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;padding-top:6px;left:-8px;position:absolute}#primary-navbar .navbar .brand .burger div{-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;height:4px;width:8px;-webkit-border-radius:2;-moz-border-radius:2;border-radius:2;background-color:#af2d24;margin:4px 0}#primary-navbar .navbar .brand:hover .burger div{background-color:#f3622d}.closeMenu #primary-navbar .navbar .brand{width:45px}.closeMenu #primary-navbar .navbar .brand .icon{background:url(../img/minilogo.png) no-repeat 0 0}.closeMenu #primary-navbar .navbar .brand .burger{left:0}#primary-navbar .navbar nav .nav{margin:0}#primary-navbar .navbar nav .nav li{-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;padding:0;font-size:20px;line-height:23px;width:220px;font-weight:400;font-family:helvetica;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:#af2d24;border-bottom:1px solid #3a2c2b;min-height:55px}#primary-navbar .navbar nav .nav li.active,#primary-navbar .navbar nav .nav li:hover{background-color:#e33f3b}#primary-navbar .navbar nav .nav li.active a,#primary-navbar .navbar nav .nav li:hover a{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#primary-navbar .navbar nav .nav li:hover a.fonticon:before{color:#fff}#primary-navbar .navbar nav .nav li.active a.fonticon:before,#primary-navbar .navbar nav .nav li:hover a.fonticon:before{text-shadow:2px 2px rgba(0,0,0,.2);color:#fff}#primary-navbar .navbar nav .nav li a{padding:17px 25px 12px 60px;background-color:transparent;color:#fff;text-shadow:1px 2px rgba(0,0,0,0)}#primary-navbar .navbar nav .nav li a.closeMenu{color:transparent}#primary-navbar .navbar nav .nav li a span.fonticon{position:relative}#primary-navbar .navbar nav .nav li a span.fonticon:before{position:absolute;top:-5px;left:-44px;font-size:28px;color:#3a2c2b;text-shadow:2px 2px rgba(0,0,0,0)}.closeMenu #primary-navbar .navbar nav .nav li a{color:transparent}#primary-navbar .navbar nav ul#footer-nav-links li{background-color:#3a2c2b;border-top:1px solid #e33f3b;border-bottom:0;font-size:12px;padding:12px;min-height:44px}#primary-navbar .navbar nav ul#footer-nav-links li.active,#primary-navbar .navbar nav ul#footer-nav-links li:hover{background-color:#da4f49;border-top:1px solid #e33f3b}#primary-navbar .navbar nav ul#footer-nav-links li.active a,#primary-navbar .navbar nav ul#footer-nav-links li:hover a{color:#fff}#primary-navbar .navbar nav ul#footer-nav-links li a{color:#e33f3b}#primary-navbar .navbar nav ul#bottom-nav-links{margin-top:0}#primary-navbar .navbar nav ul#bottom-nav-links li{min-height:46px;background-color:#554d4c}#primary-navbar .navbar nav ul#bottom-nav-links li.active{background-color:#da4f49}#primary-navbar .navbar nav ul#bottom-nav-links li:hover{background-color:#e33f3b}#primary-navbar .navbar nav ul#bottom-nav-links li a.fonticon{position:relative}#primary-navbar .navbar nav ul#bottom-nav-links li a.fonticon:before{left:-40px;font-size:22px}#dashboard{max-width:1500px;-webkit-box-shadow:-6px 0 rgba(0,0,0,.1);-moz-box-shadow:-6px 0 rgba(0,0,0,.1);box-shadow:-6px 0 rgba(0,0,0,.1);border-left:1px solid #999;position:absolute;left:220px;margin-left:0;background-color:#f2f2f2;min-width:600px;height:100%}.closeMenu #dashboard{left:62px}#dashboard.one-pane{min-width:800px;margin-top:0}#dashboard-content{padding:20px}#dashboard-content.row-fluid,#dashboard-content.window-resizeable{margin-left:0}.with-sidebar #dashboard-content{border-left:1px solid #999;border-right:1px solid #999;width:auto;-webkit-box-shadow:-6px 0 rgba(0,0,0,.1);-moz-box-shadow:-6px 0 rgba(0,0,0,.1);box-shadow:-6px 0 rgba(0,0,0,.1);padding:0;bottom:0;top:60px;position:absolute;overflow-x:hidden;overflow-y:auto;left:330px;right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#dashboard-content>div.inner{display:block}.with-sidebar.content-area{position:absolute;top:0;bottom:0;left:0;right:0}.row-fluid.content-area{background-color:#f2f2f2}.fixed-header{background-color:#f1f1f1;position:fixed;top:0;right:0;left:220px;border-bottom:5px solid #e33f3b;-webkit-box-shadow:0 4px 6px -2px gray;-moz-box-shadow:0 4px 6px -2px gray;box-shadow:0 4px 6px -2px gray;z-index:100}.closeMenu .fixed-header{left:62px}.one-pane .fixed-header{position:relative;border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;left:auto}#breadcrumbs{padding:15px 20px}#breadcrumbs .breadcrumb{margin-bottom:0;background-color:transparent;padding:0}#breadcrumbs .breadcrumb li{color:#e33f3b;font-size:18px;text-shadow:none}#breadcrumbs .breadcrumb li .divider{font-size:12px;color:#999}#breadcrumbs .breadcrumb li:first-child{font-size:30px}#breadcrumbs .breadcrumb li.active{color:#333}#breadcrumbs .breadcrumb li a{color:#e33f3b}footer#mainFooter{position:fixed;bottom:0}.topmenu-defaults{height:70px;padding:12px 10px 0;border-bottom:1px solid #af2d24;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#dashboard-upper-menu{position:fixed;z-index:11;height:70px;padding:12px 10px 0;border-bottom:1px solid #af2d24;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:#CBCBCB}#dashboard-lower-content{padding:20px;background-color:#F1F1F1}#dashboard-upper-content .well{padding:20px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#sidenav{padding:0}#sidenav header{width:330px;-webkit-box-shadow:inset -7px 0 15px -6px #000;-moz-box-shadow:inset -7px 0 15px -6px #000;box-shadow:inset -7px 0 15px -6px #000;background:transparent url(../img/linen.png) repeat 0 0;height:70px;padding:12px 10px 0;border-bottom:1px solid #af2d24;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sidenav nav .nav-list .divider{border:0}#sidenav nav .nav-list li.active a{background-color:#af2d24;color:#fff}#sidenav nav .nav-list a{display:block;padding:10px 5px 10px 15px;color:#333;border-bottom:1px solid #989898}#sidenav nav .nav-list .nav-header{background-color:#B2B2B2;padding:5px;text-shadow:none;color:#333;border-bottom:1px solid #989898}#sidebar-content{-webkit-box-shadow:-7px 0 15px -6px #000;-moz-box-shadow:-7px 0 15px -6px #000;box-shadow:-7px 0 15px -6px #000;position:absolute;bottom:0;top:60px;width:330px;left:0;overflow-x:hidden;overflow-y:auto;background-color:#e4dfdc}#sidebar-content>div.inner{display:block}.result-tools{padding:5px 0;border-bottom:1px solid #999;padding:10px 0;float:left;width:100%;margin-bottom:10px}.navbar-form.pull-right.database-search{margin:-10px 50px 12px 0;padding:11px}.navbar-form.pull-right.database-search input[type=text]{margin-top:0}#db-views-tabs-nav{position:fixed;z-index:12;margin-top:31px;margin-bottom:0;padding:0 20px}.db-views-smaller{max-width:500px}.nav-tabs>li{margin-right:2px}.nav-tabs>li>a{cursor:pointer;color:#333;border-color:#eee #eee #ddd;text-decoration:none;background-color:#eee;border-radius:0;border-left:0;border-right:0}.nav-tabs>li>a.fonticon:before{margin-right:6px;font-size:16px}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{background-color:#da4f49;border-top:1px solid #e33f3b;color:#fff}.tab-content{margin-top:70px}.well .controls-group{margin-bottom:8px}.well .controls-group:first-child,.well .controls-group:last-child{margin-top:24px}.well .controls-row{margin-bottom:8px}table.table{table-layout:fixed}table tr td{word-wrap:break-word}table tr td.select{width:20px}table.databases{clear:both}thead{border-bottom:2px solid #e33f3b}tbody{padding-top:10px}.table-condensed td{padding:18px 5px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#F7F7F7}.btn-group>.btn+.dropdown-toggle,.btn-group>.btn:first-child,.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-image:none;text-shadow:none}.btn{padding-top:12px;padding-bottom:12px;margin-top:0}.button{padding:10px 15px;cursor:pointer;-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;border:0;background-color:#e33f3b;color:#fff;padding:10px}.button:before{padding-right:5px}.button.outlineGray{border:1px solid #999;background-color:transparent;color:#333}.button.outlineGray:hover{border:1px solid #f3622d}.button.gray{background-color:#ddd;color:#333}.button.green{background-color:#7fa30c}.button.round-btn{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.button .icon{margin-right:10px;font-size:20px}.button:hover{color:#fff;text-decoration:none;background-color:#f3622d}a.button,a.button:visited,a.button:active{color:#fff}.button:disabled{opacity:.5}.button .icon{margin-right:10px;font-size:20px}.button:hover{color:#fff;text-decoration:none}.button-style{background-color:#e33f3b;color:#fff;padding:10px 15px;cursor:pointer}.button-style:before{padding-right:5px}.button-style.outlineGray{border:1px solid #999;background-color:transparent;color:#333}.button-style.outlineGray:hover{border:1px solid #f3622d}.button-style.gray{background-color:#ddd;color:#333}.button-style.green{background-color:#7fa30c}.button-style.round-btn{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.button-style .icon{margin-right:10px;font-size:20px}.button-style:hover{color:#fff;text-decoration:none;background-color:#f3622d}a.button-style,a.button-style:visited,a.button-style:active{color:#fff}.button-style:disabled{opacity:.5}a.button,a.button:visited,a.button:active{background-color:#e33f3b;color:#fff;padding:10px 15px;cursor:pointer}a.button:before,a.button:visited:before,a.button:active:before{padding-right:5px}a.button.outlineGray,a.button:visited.outlineGray,a.button:active.outlineGray{border:1px solid #999;background-color:transparent;color:#333}a.button.outlineGray:hover,a.button:visited.outlineGray:hover,a.button:active.outlineGray:hover{border:1px solid #f3622d}a.button.gray,a.button:visited.gray,a.button:active.gray{background-color:#ddd;color:#333}a.button.green,a.button:visited.green,a.button:active.green{background-color:#7fa30c}a.button.round-btn,a.button:visited.round-btn,a.button:active.round-btn{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}a.button .icon,a.button:visited .icon,a.button:active .icon{margin-right:10px;font-size:20px}a.button:hover,a.button:visited:hover,a.button:active:hover{color:#fff;text-decoration:none;background-color:#f3622d}aa.button,aa.button:visited,aa.button:active,aa.button:visited,aa.button:visited:visited,aa.button:active:visited,aa.button:active,aa.button:visited:active,aa.button:active:active{color:#fff}a.button:disabled,a.button:visited:disabled,a.button:active:disabled{opacity:.5}.select>a{display:block;padding:5px 15px 5px 5px;border:1px solid #989898;position:relative;background-color:#FFF;color:#666}.select>a:after{content:'';width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #989898;position:absolute;right:9px;top:12px}.select>a:before{content:'';border-left:1px solid #989898;height:30px;position:absolute;right:30px;top:0}input[type=text],input[type=password],.navbar-form input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;padding:12px;border:1px solid #ccc;height:auto;font-size:16px;margin-top:0}label.fonticon-search{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;position:relative}label.fonticon-search:before{-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;font-size:16px;position:absolute;right:-47px;background-color:#E1E1E1;height:46px;width:48px;border:1px solid #ccc;padding:14px;top:-4px}label.fonticon-search:hover{color:#fff}label.fonticon-search:hover:before{background-color:#e33f3b}.form-inline input[type=password],.form-inline input[type=text]{width:auto}*,:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=file],input[type=checkbox],input[type=radio],select{margin:0 0 1em}.well select{margin:0}form.custom .hidden-field{margin-left:-99999px;position:absolute;visibility:hidden}.checkbox label{display:inline-block;padding-left:25px}label{margin-right:15px;padding-left:0;display:block;cursor:pointer;position:relative;font-size:14px}label.inline{display:inline-block}.help-block{font-size:12px}input[type=text].error{border:red 1px solid}.custom-inputs input[type=radio],.custom-inputs input[type=checkbox]{display:none}.custom-inputs .checkbox label:before{border-radius:3px}.custom-inputs .controls>.radio:first-child,.custom-inputs .controls>.checkbox:first-child{padding-top:15px}.custom-inputs .radio.inline,.custom-inputs .checkbox.inline{display:inline-block;padding-top:15px;margin-bottom:12px;vertical-align:middle}.custom-inputs input[type=checkbox]:checked+label:before{content:"\00d7";text-shadow:1px 1px 1px rgba(0,0,0,.2);font-size:16px;background-color:#e33f3b;color:#fff;text-align:center;line-height:15px}.custom-inputs label:before{content:"";display:inline-block;width:16px;height:16px;margin-right:10px;position:absolute;left:0;bottom:1px;background-color:#aaa;box-shadow:inset 0 2px 3px 0 rgba(0,0,0,.3),0 1px 0 0 rgba(255,255,255,.8)}.custom-inputs .radio label:before{border-radius:8px}.custom-inputs input[type=radio]:checked+label:before{content:"\2022";color:#f3f3f3;font-size:30px;text-align:center;line-height:18px}.custom-inputs label.drop-down:before{display:none}form.view-query-update,form.view-query-save{max-width:100%}.form-actions{background:0;border:0}.input-append .add-on,.input-prepend .add-on{font-size:18px;padding:14px 5px 30px}.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{padding:10px 5px 14px}.input-append .btn{padding:10px 5px 14px}.row-fluid .input-append [class*=span],.input-prepend input[class*=span]{width:auto}pre.prettyprint{background:#E5E0DD;border:0}.prettyprint .str,.prettyprint .lit{color:#e33f3b}.prettyprint .pln,.prettyprint .pun,.prettyprint .typ{color:#333}tr.all-docs-item{border:0;background:transparent}#log-sidebar{padding:20px}.view.show{color:gray}div.spinner{position:absolute;left:50%;top:50%}.CodeMirror-scroll{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:solid 1px #ddd}.btn-primary a:visited{color:#fff}#api-navbar{position:relative}.button.api-url-btn{position:absolute;right:15px;top:-50px}.button.api-url-btn span.icon{font-size:11px}.api-navbar{border-top:1px solid #e33f3b;padding:20px 20px 15px}.api-navbar .input-append.input-prepend{margin-bottom:0}.api-navbar .input-append.input-prepend .add-on{background:0;padding:14px 12px 32px;border:0}.api-navbar .input-append.input-prepend .btn:last-child{margin-left:-1px;background:0;padding:13px 12px 11px}.api-navbar .input-append.input-prepend .btn:last-child:hover{background-color:#e33f3b;color:#fff}#jump-to-doc,#jump-to-db{width:auto;float:right}#jump-to-doc button,#jump-to-db button{padding-left:20px;padding-right:10px}#map-function,#reduce-function{width:100%;font-size:16px}#editor-container{width:1316px;height:688px;font-size:16px}#delete-database{float:right}.border-hdr{border-bottom:1px solid #E3E3E3;margin-bottom:10px}.border-hdr h3{text-transform:capitalize;margin-bottom:0}.permission-items.unstyled{margin-left:0}.permission-items.unstyled li{padding:5px;border-bottom:1px solid #E3E3E3;border-right:1px solid #E3E3E3;border-left:3px solid #E3E3E3}.permission-items.unstyled li:first-child{border-top:1px solid #E3E3E3}.permission-items.unstyled li:nth-child(odd){border-left:3px solid red}.permission-items.unstyled li button{float:right;margin-bottom:6px}form#replication{position:relative;max-width:none;width:auto}form#replication .form_set{width:350px;display:inline-block;border:1px solid #a59d9d;padding:15px 10px 0;margin-bottom:20px}form#replication .form_set.middle{width:100px;border:0;position:relative;height:100px;margin:0}form#replication .form_set input,form#replication .form_set select{margin:0 0 16px 5px;height:40px;width:318px}form#replication .form_set .btn-group{margin:0 0 16px 5px}form#replication .form_set .btn-group .btn{padding:10px 57px}form#replication .form_set.local .local_option{display:block}form#replication .form_set.local .remote_option{display:none}form#replication .form_set.local .local-btn{background-color:#e33f3b;color:#fff}form#replication .form_set.local .remote-btn{background-color:#f5f5f5;color:gray}form#replication .form_set .local_option{display:none}form#replication .form_set .remote-btn{background-color:#e33f3b;color:#fff}form#replication .options{position:relative}form#replication .options:after{content:'';display:block;position:absolute;right:-16px;top:9px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000;border-top:0}form#replication .options.off:after{content:'';display:block;position:absolute;right:-16px;top:9px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:0;border-top:5px solid #000}form#replication .control-group label{float:left;min-height:30px;vertical-align:top;padding-right:5px;min-width:130px;padding-left:0}form#replication .control-group input[type=radio],form#replication .control-group input[type=checkbox]{margin:0 0 2px}form#replication .circle{z-index:0;position:absolute;top:20px;left:15px}form#replication .circle:after{width:70px;height:70px;content:'';display:block;position:relative;margin:0 auto;border:1px solid #a59d9d;-webkit-border-radius:40px;-moz-border-radius:40px;border-radius:40px}form#replication .swap{text-decoration:none;z-index:30;cursor:pointer;position:absolute;font-size:40px;width:27px;height:12px;top:31px;left:30px}form#replication .swap:hover{color:#a59d9d}#replicationStatus.showHeader li.header{display:block;border:0}#replicationStatus.showHeader ul{border:1px solid #a59d9d}#replicationStatus li.header{display:none}#replicationStatus ul{margin:0}#replicationStatus ul li{padding:10px;margin:0;list-style:none;border-top:1px solid #a59d9d}#replicationStatus ul li .progress,#replicationStatus ul li p{margin:0;vertical-align:bottom}#replicationStatus ul li .progress.break,#replicationStatus ul li p.break{-ms-word-break:break-all;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto}.datatypes{border:#d3d3d3 1px solid;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:15px}#start{margin-bottom:20px}.chartWrap{margin:0;padding:0;overflow:hidden}.nvtooltip{position:absolute;background-color:rgba(255,255,255,1);padding:10px;border:1px solid #ddd;z-index:10000;font-family:Arial;font-size:13px;transition:opacity 500ms linear;-moz-transition:opacity 500ms linear;-webkit-transition:opacity 500ms linear;transition-delay:500ms;-moz-transition-delay:500ms;-webkit-transition-delay:500ms;-moz-box-shadow:4px 4px 8px rgba(0,0,0,.5);-webkit-box-shadow:4px 4px 8px rgba(0,0,0,.5);box-shadow:4px 4px 8px rgba(0,0,0,.5);-moz-border-radius:10px;border-radius:10px;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.nvtooltip h3{margin:0;padding:0;text-align:center}.nvtooltip p{margin:0;padding:0;text-align:center}.nvtooltip span{display:inline-block;margin:2px 0}.nvtooltip-pending-removal{position:absolute;pointer-events:none}svg{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;width:100%;height:100%}svg text{font:400 12px Arial}svg .title{font:700 14px Arial}.nvd3 .nv-background{fill:#fff;fill-opacity:0}.nvd3.nv-noData{font-size:18px;font-weight:bolf}.nv-brush .extent{fill-opacity:.125;shape-rendering:crispEdges}.nvd3 .nv-legend .nv-series{cursor:pointer}.nvd3 .nv-legend .disabled circle{fill-opacity:0}.nvd3 .nv-axis path{fill:none;stroke:#000;stroke-opacity:.75;shape-rendering:crispEdges}.nvd3 .nv-axis path.domain{stroke-opacity:.75}.nvd3 .nv-axis.nv-x path.domain{stroke-opacity:0}.nvd3 .nv-axis line{fill:none;stroke:#000;stroke-opacity:.25;shape-rendering:crispEdges}.nvd3 .nv-axis line.zero{stroke-opacity:.75}.nvd3 .nv-axis .nv-axisMaxMin text{font-weight:700}.nvd3 .x .nv-axis .nv-axisMaxMin text,.nvd3 .x2 .nv-axis .nv-axisMaxMin text,.nvd3 .x3 .nv-axis .nv-axisMaxMin text{text-anchor:middle}.nv-brush .resize path{fill:#eee;stroke:#666}.nvd3 .nv-bars .negative rect{zfill:brown}.nvd3 .nv-bars rect{zfill:steelblue;fill-opacity:.75;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-bars rect:hover{fill-opacity:1}.nvd3 .nv-bars .hover rect{fill:lightblue}.nvd3 .nv-bars text{fill:rgba(0,0,0,0)}.nvd3 .nv-bars .hover text{fill:rgba(0,0,0,1)}.nvd3 .nv-multibar .nv-groups rect,.nvd3 .nv-multibarHorizontal .nv-groups rect,.nvd3 .nv-discretebar .nv-groups rect{stroke-opacity:0;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-multibar .nv-groups rect:hover,.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,.nvd3 .nv-discretebar .nv-groups rect:hover{fill-opacity:1}.nvd3 .nv-discretebar .nv-groups text,.nvd3 .nv-multibarHorizontal .nv-groups text{font-weight:700;fill:rgba(0,0,0,1);stroke:rgba(0,0,0,0)}.nvd3.nv-pie path{stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-pie .nv-slice text{stroke:#000;stroke-width:0}.nvd3.nv-pie path{stroke:#fff;stroke-width:1px;stroke-opacity:1}.nvd3.nv-pie .hover path{fill-opacity:.7}.nvd3.nv-pie .nv-label rect{fill-opacity:0;stroke-opacity:0}.nvd3 .nv-groups path.nv-line{fill:none;stroke-width:2.5px}.nvd3 .nv-groups path.nv-area{stroke:none}.nvd3 .nv-line.hover path{stroke-width:6px}.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{fill-opacity:0;stroke-opacity:0}.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point{fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-groups .nv-point{transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-scatter .nv-groups .nv-point.hover,.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-point-paths path{stroke:#aaa;stroke-opacity:0;fill:#eee;fill-opacity:0}.nvd3 .nv-indexLine{cursor:ew-resize}.nvd3 .nv-distribution{pointer-events:none}.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.5}.nvd3 .nv-scatter .nv-point.hover{fill-opacity:1}.nvd3.nv-stackedarea path.nv-area{fill-opacity:.7;stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-stackedarea path.nv-area.hover{fill-opacity:.9}.nvd3.nv-stackedarea .nv-groups .nv-point{stroke-opacity:0;fill-opacity:0}.nvd3.nv-stackedarea .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.75;fill-opacity:1}.nvd3.nv-linePlusBar .nv-bar rect{fill-opacity:.75}.nvd3.nv-linePlusBar .nv-bar rect:hover{fill-opacity:1}.nvd3.nv-bullet{font:10px sans-serif}.nvd3.nv-bullet .nv-measure{fill-opacity:.8}.nvd3.nv-bullet .nv-measure:hover{fill-opacity:1}.nvd3.nv-bullet .nv-marker{stroke:#000;stroke-width:2px}.nvd3.nv-bullet .nv-markerTriangle{stroke:#000;fill:#fff;stroke-width:1.5px}.nvd3.nv-bullet .nv-tick line{stroke:#666;stroke-width:.5px}.nvd3.nv-bullet .nv-range.nv-s0{fill:#eee}.nvd3.nv-bullet .nv-range.nv-s1{fill:#ddd}.nvd3.nv-bullet .nv-range.nv-s2{fill:#ccc}.nvd3.nv-bullet .nv-title{font-size:14px;font-weight:700}.nvd3.nv-bullet .nv-subtitle{fill:#999}.nvd3.nv-bullet .nv-range{fill:#999;fill-opacity:.4}.nvd3.nv-bullet .nv-range:hover{fill-opacity:.7}.nvd3.nv-sparkline path{fill:none}.nvd3.nv-sparklineplus g.nv-hoverValue{pointer-events:none}.nvd3.nv-sparklineplus .nv-hoverValue line{stroke:#333;stroke-width:1.5px}.nvd3.nv-sparklineplus,.nvd3.nv-sparklineplus g{pointer-events:all}.nvd3 .nv-hoverArea{fill-opacity:0;stroke-opacity:0}.nvd3.nv-sparklineplus .nv-xValue,.nvd3.nv-sparklineplus .nv-yValue{stroke-width:0;font-size:.9em;font-weight:400}.nvd3.nv-sparklineplus .nv-yValue{stroke:#f66}.nvd3.nv-sparklineplus .nv-maxValue{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-sparklineplus .nv-minValue{stroke:#d62728;fill:#d62728}.nvd3.nv-sparklineplus .nv-currentValue{font-weight:700;font-size:1.1em}.nvd3.nv-ohlcBar .nv-ticks .nv-tick{stroke-width:2px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover{stroke-width:4px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive{stroke:#2ca02c}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative{stroke:#d62728}.nvd3.nv-historicalStockChart .nv-axis .nv-axislabel{font-weight:700}.nvd3.nv-historicalStockChart .nv-dragTarget{fill-opacity:0;stroke:none;cursor:move}.nvd3 .nv-brush .extent{fill-opacity:0!important}.nvd3 .nv-brushBackground rect{stroke:#000;stroke-width:.4;fill:#fff;fill-opacity:.7}.nvd3.nv-indentedtree .name{margin-left:5px}.nvd3.nv-indentedtree .clickable{color:#08C;cursor:pointer}.nvd3.nv-indentedtree span.clickable:hover{color:#005580;text-decoration:underline}.nvd3.nv-indentedtree .nv-childrenCount{display:inline-block;margin-left:5px}.nvd3.nv-indentedtree .nv-treeicon{cursor:pointer}.nvd3.nv-indentedtree .nv-treeicon.nv-folded{cursor:pointer}.chartWrap{margin:0;padding:0;overflow:hidden}.nvtooltip{position:absolute;background-color:rgba(255,255,255,1);padding:10px;border:1px solid #ddd;z-index:10000;font-family:Arial;font-size:13px;transition:opacity 500ms linear;-moz-transition:opacity 500ms linear;-webkit-transition:opacity 500ms linear;transition-delay:500ms;-moz-transition-delay:500ms;-webkit-transition-delay:500ms;-moz-box-shadow:4px 4px 8px rgba(0,0,0,.5);-webkit-box-shadow:4px 4px 8px rgba(0,0,0,.5);box-shadow:4px 4px 8px rgba(0,0,0,.5);-moz-border-radius:10px;border-radius:10px;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.nvtooltip h3{margin:0;padding:0;text-align:center}.nvtooltip p{margin:0;padding:0;text-align:center}.nvtooltip span{display:inline-block;margin:2px 0}.nvtooltip-pending-removal{position:absolute;pointer-events:none}svg{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;width:100%;height:100%}svg text{font:400 12px Arial}svg .title{font:700 14px Arial}.nvd3 .nv-background{fill:#fff;fill-opacity:0}.nvd3.nv-noData{font-size:18px;font-weight:bolf}.nv-brush .extent{fill-opacity:.125;shape-rendering:crispEdges}.nvd3 .nv-legend .nv-series{cursor:pointer}.nvd3 .nv-legend .disabled circle{fill-opacity:0}.nvd3 .nv-axis path{fill:none;stroke:#000;stroke-opacity:.75;shape-rendering:crispEdges}.nvd3 .nv-axis path.domain{stroke-opacity:.75}.nvd3 .nv-axis.nv-x path.domain{stroke-opacity:0}.nvd3 .nv-axis line{fill:none;stroke:#000;stroke-opacity:.25;shape-rendering:crispEdges}.nvd3 .nv-axis line.zero{stroke-opacity:.75}.nvd3 .nv-axis .nv-axisMaxMin text{font-weight:700}.nvd3 .x .nv-axis .nv-axisMaxMin text,.nvd3 .x2 .nv-axis .nv-axisMaxMin text,.nvd3 .x3 .nv-axis .nv-axisMaxMin text{text-anchor:middle}.nv-brush .resize path{fill:#eee;stroke:#666}.nvd3 .nv-bars .negative rect{zfill:brown}.nvd3 .nv-bars rect{zfill:steelblue;fill-opacity:.75;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-bars rect:hover{fill-opacity:1}.nvd3 .nv-bars .hover rect{fill:lightblue}.nvd3 .nv-bars text{fill:rgba(0,0,0,0)}.nvd3 .nv-bars .hover text{fill:rgba(0,0,0,1)}.nvd3 .nv-multibar .nv-groups rect,.nvd3 .nv-multibarHorizontal .nv-groups rect,.nvd3 .nv-discretebar .nv-groups rect{stroke-opacity:0;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-multibar .nv-groups rect:hover,.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,.nvd3 .nv-discretebar .nv-groups rect:hover{fill-opacity:1}.nvd3 .nv-discretebar .nv-groups text,.nvd3 .nv-multibarHorizontal .nv-groups text{font-weight:700;fill:rgba(0,0,0,1);stroke:rgba(0,0,0,0)}.nvd3.nv-pie path{stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-pie .nv-slice text{stroke:#000;stroke-width:0}.nvd3.nv-pie path{stroke:#fff;stroke-width:1px;stroke-opacity:1}.nvd3.nv-pie .hover path{fill-opacity:.7}.nvd3.nv-pie .nv-label rect{fill-opacity:0;stroke-opacity:0}.nvd3 .nv-groups path.nv-line{fill:none;stroke-width:2.5px}.nvd3 .nv-groups path.nv-area{stroke:none}.nvd3 .nv-line.hover path{stroke-width:6px}.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{fill-opacity:0;stroke-opacity:0}.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point{fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-groups .nv-point{transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-scatter .nv-groups .nv-point.hover,.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-point-paths path{stroke:#aaa;stroke-opacity:0;fill:#eee;fill-opacity:0}.nvd3 .nv-indexLine{cursor:ew-resize}.nvd3 .nv-distribution{pointer-events:none}.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.5}.nvd3 .nv-scatter .nv-point.hover{fill-opacity:1}.nvd3.nv-stackedarea path.nv-area{fill-opacity:.7;stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-stackedarea path.nv-area.hover{fill-opacity:.9}.nvd3.nv-stackedarea .nv-groups .nv-point{stroke-opacity:0;fill-opacity:0}.nvd3.nv-stackedarea .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.75;fill-opacity:1}.nvd3.nv-linePlusBar .nv-bar rect{fill-opacity:.75}.nvd3.nv-linePlusBar .nv-bar rect:hover{fill-opacity:1}.nvd3.nv-bullet{font:10px sans-serif}.nvd3.nv-bullet .nv-measure{fill-opacity:.8}.nvd3.nv-bullet .nv-measure:hover{fill-opacity:1}.nvd3.nv-bullet .nv-marker{stroke:#000;stroke-width:2px}.nvd3.nv-bullet .nv-markerTriangle{stroke:#000;fill:#fff;stroke-width:1.5px}.nvd3.nv-bullet .nv-tick line{stroke:#666;stroke-width:.5px}.nvd3.nv-bullet .nv-range.nv-s0{fill:#eee}.nvd3.nv-bullet .nv-range.nv-s1{fill:#ddd}.nvd3.nv-bullet .nv-range.nv-s2{fill:#ccc}.nvd3.nv-bullet .nv-title{font-size:14px;font-weight:700}.nvd3.nv-bullet .nv-subtitle{fill:#999}.nvd3.nv-bullet .nv-range{fill:#999;fill-opacity:.4}.nvd3.nv-bullet .nv-range:hover{fill-opacity:.7}.nvd3.nv-sparkline path{fill:none}.nvd3.nv-sparklineplus g.nv-hoverValue{pointer-events:none}.nvd3.nv-sparklineplus .nv-hoverValue line{stroke:#333;stroke-width:1.5px}.nvd3.nv-sparklineplus,.nvd3.nv-sparklineplus g{pointer-events:all}.nvd3 .nv-hoverArea{fill-opacity:0;stroke-opacity:0}.nvd3.nv-sparklineplus .nv-xValue,.nvd3.nv-sparklineplus .nv-yValue{stroke-width:0;font-size:.9em;font-weight:400}.nvd3.nv-sparklineplus .nv-yValue{stroke:#f66}.nvd3.nv-sparklineplus .nv-maxValue{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-sparklineplus .nv-minValue{stroke:#d62728;fill:#d62728}.nvd3.nv-sparklineplus .nv-currentValue{font-weight:700;font-size:1.1em}.nvd3.nv-ohlcBar .nv-ticks .nv-tick{stroke-width:2px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover{stroke-width:4px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive{stroke:#2ca02c}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative{stroke:#d62728}.nvd3.nv-historicalStockChart .nv-axis .nv-axislabel{font-weight:700}.nvd3.nv-historicalStockChart .nv-dragTarget{fill-opacity:0;stroke:none;cursor:move}.nvd3 .nv-brush .extent{fill-opacity:0!important}.nvd3 .nv-brushBackground rect{stroke:#000;stroke-width:.4;fill:#fff;fill-opacity:.7}.nvd3.nv-indentedtree .name{margin-left:5px}.nvd3.nv-indentedtree .clickable{color:#08C;cursor:pointer}.nvd3.nv-indentedtree span.clickable:hover{color:#005580;text-decoration:underline}.nvd3.nv-indentedtree .nv-childrenCount{display:inline-block;margin-left:5px}.nvd3.nv-indentedtree .nv-treeicon{cursor:pointer}.nvd3.nv-indentedtree .nv-treeicon.nv-folded{cursor:pointer} \ No newline at end of file
diff --git a/share/www/fauxton/img/FontAwesome.otf b/share/www/fauxton/img/FontAwesome.otf
deleted file mode 100644
index 70125459f..000000000
--- a/share/www/fauxton/img/FontAwesome.otf
+++ /dev/null
Binary files differ
diff --git a/share/www/fauxton/img/couchdb-site.png b/share/www/fauxton/img/couchdb-site.png
deleted file mode 100644
index a9b3a998e..000000000
--- a/share/www/fauxton/img/couchdb-site.png
+++ /dev/null
Binary files differ
diff --git a/share/www/fauxton/img/couchdblogo.png b/share/www/fauxton/img/couchdblogo.png
deleted file mode 100644
index cbe991cda..000000000
--- a/share/www/fauxton/img/couchdblogo.png
+++ /dev/null
Binary files differ
diff --git a/share/www/fauxton/img/fontawesome-webfont.eot b/share/www/fauxton/img/fontawesome-webfont.eot
deleted file mode 100644
index 0662cb96b..000000000
--- a/share/www/fauxton/img/fontawesome-webfont.eot
+++ /dev/null
Binary files differ
diff --git a/share/www/fauxton/img/fontawesome-webfont.svg b/share/www/fauxton/img/fontawesome-webfont.svg
deleted file mode 100644
index 2edb4ec34..000000000
--- a/share/www/fauxton/img/fontawesome-webfont.svg
+++ /dev/null
@@ -1,399 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
-<svg xmlns="http://www.w3.org/2000/svg">
-<metadata></metadata>
-<defs>
-<font id="fontawesomeregular" horiz-adv-x="1536" >
-<font-face units-per-em="1792" ascent="1536" descent="-256" />
-<missing-glyph horiz-adv-x="448" />
-<glyph unicode=" " horiz-adv-x="448" />
-<glyph unicode="&#x09;" horiz-adv-x="448" />
-<glyph unicode="&#xa0;" horiz-adv-x="448" />
-<glyph unicode="&#xa8;" horiz-adv-x="1792" />
-<glyph unicode="&#xa9;" horiz-adv-x="1792" />
-<glyph unicode="&#xae;" horiz-adv-x="1792" />
-<glyph unicode="&#xb4;" horiz-adv-x="1792" />
-<glyph unicode="&#xc6;" horiz-adv-x="1792" />
-<glyph unicode="&#x2000;" horiz-adv-x="768" />
-<glyph unicode="&#x2001;" />
-<glyph unicode="&#x2002;" horiz-adv-x="768" />
-<glyph unicode="&#x2003;" />
-<glyph unicode="&#x2004;" horiz-adv-x="512" />
-<glyph unicode="&#x2005;" horiz-adv-x="384" />
-<glyph unicode="&#x2006;" horiz-adv-x="256" />
-<glyph unicode="&#x2007;" horiz-adv-x="256" />
-<glyph unicode="&#x2008;" horiz-adv-x="192" />
-<glyph unicode="&#x2009;" horiz-adv-x="307" />
-<glyph unicode="&#x200a;" horiz-adv-x="85" />
-<glyph unicode="&#x202f;" horiz-adv-x="307" />
-<glyph unicode="&#x205f;" horiz-adv-x="384" />
-<glyph unicode="&#x2122;" horiz-adv-x="1792" />
-<glyph unicode="&#x221e;" horiz-adv-x="1792" />
-<glyph unicode="&#x2260;" horiz-adv-x="1792" />
-<glyph unicode="&#xe000;" horiz-adv-x="500" d="M0 0z" />
-<glyph unicode="&#xf000;" horiz-adv-x="1792" d="M1699 1350q0 -35 -43 -78l-632 -632v-768h320q26 0 45 -19t19 -45t-19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45t45 19h320v768l-632 632q-43 43 -43 78q0 23 18 36.5t38 17.5t43 4h1408q23 0 43 -4t38 -17.5t18 -36.5z" />
-<glyph unicode="&#xf001;" d="M1536 1312v-1120q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v537l-768 -237v-709q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89 t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v967q0 31 19 56.5t49 35.5l832 256q12 4 28 4q40 0 68 -28t28 -68z" />
-<glyph unicode="&#xf002;" horiz-adv-x="1664" d="M1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -52 -38 -90t-90 -38q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5 t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
-<glyph unicode="&#xf003;" horiz-adv-x="1792" d="M1664 32v768q-32 -36 -69 -66q-268 -206 -426 -338q-51 -43 -83 -67t-86.5 -48.5t-102.5 -24.5h-1h-1q-48 0 -102.5 24.5t-86.5 48.5t-83 67q-158 132 -426 338q-37 30 -69 66v-768q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1664 1083v11v13.5t-0.5 13 t-3 12.5t-5.5 9t-9 7.5t-14 2.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5q0 -168 147 -284q193 -152 401 -317q6 -5 35 -29.5t46 -37.5t44.5 -31.5t50.5 -27.5t43 -9h1h1q20 0 43 9t50.5 27.5t44.5 31.5t46 37.5t35 29.5q208 165 401 317q54 43 100.5 115.5t46.5 131.5z M1792 1120v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" />
-<glyph unicode="&#xf004;" horiz-adv-x="1792" d="M896 -128q-26 0 -44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600 q-18 -18 -44 -18z" />
-<glyph unicode="&#xf005;" horiz-adv-x="1664" d="M1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -21 -10.5 -35.5t-30.5 -14.5q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455 l502 -73q56 -9 56 -46z" />
-<glyph unicode="&#xf006;" horiz-adv-x="1664" d="M1137 532l306 297l-422 62l-189 382l-189 -382l-422 -62l306 -297l-73 -421l378 199l377 -199zM1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -50 -41 -50q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500 l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46z" />
-<glyph unicode="&#xf007;" horiz-adv-x="1408" d="M1408 131q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q9 0 42 -21.5t74.5 -48t108 -48t133.5 -21.5t133.5 21.5t108 48t74.5 48t42 21.5q61 0 111.5 -20t85.5 -53.5t62 -81 t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" />
-<glyph unicode="&#xf008;" horiz-adv-x="1920" d="M384 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 320v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 704v128q0 26 -19 45t-45 19h-128 q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 -64v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM384 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45 t45 -19h128q26 0 45 19t19 45zM1792 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 704v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1792 320v128 q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 704v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19 t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1920 1248v-1344q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1344q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
-<glyph unicode="&#xf009;" horiz-adv-x="1664" d="M768 512v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM768 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 512v-384q0 -52 -38 -90t-90 -38 h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
-<glyph unicode="&#xf00a;" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 288v-192q0 -40 -28 -68t-68 -28h-320 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68z" />
-<glyph unicode="&#xf00b;" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-960 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h960q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68z" />
-<glyph unicode="&#xf00c;" horiz-adv-x="1792" d="M1671 970q0 -40 -28 -68l-724 -724l-136 -136q-28 -28 -68 -28t-68 28l-136 136l-362 362q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -295l656 657q28 28 68 28t68 -28l136 -136q28 -28 28 -68z" />
-<glyph unicode="&#xf00d;" horiz-adv-x="1408" d="M1298 214q0 -40 -28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68t28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68 t-28 -68l-294 -294l294 -294q28 -28 28 -68z" />
-<glyph unicode="&#xf00e;" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-224q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v224h-224q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h224v224q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-224h224 q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5 t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
-<glyph unicode="&#xf010;" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-576q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h576q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5z M1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z " />
-<glyph unicode="&#xf011;" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61t-298 61t-245 164t-164 245t-61 298q0 182 80.5 343t226.5 270q43 32 95.5 25t83.5 -50q32 -42 24.5 -94.5t-49.5 -84.5q-98 -74 -151.5 -181t-53.5 -228q0 -104 40.5 -198.5t109.5 -163.5t163.5 -109.5 t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5q0 121 -53.5 228t-151.5 181q-42 32 -49.5 84.5t24.5 94.5q31 43 84 50t95 -25q146 -109 226.5 -270t80.5 -343zM896 1408v-640q0 -52 -38 -90t-90 -38t-90 38t-38 90v640q0 52 38 90t90 38t90 -38t38 -90z" />
-<glyph unicode="&#xf012;" horiz-adv-x="1792" d="M256 96v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 224v-320q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 480v-576q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1408 864v-960q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1376v-1472q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1472q0 14 9 23t23 9h192q14 0 23 -9t9 -23z" />
-<glyph unicode="&#xf013;" d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1536 749v-222q0 -12 -8 -23t-20 -13l-185 -28q-19 -54 -39 -91q35 -50 107 -138q10 -12 10 -25t-9 -23q-27 -37 -99 -108t-94 -71q-12 0 -26 9l-138 108q-44 -23 -91 -38 q-16 -136 -29 -186q-7 -28 -36 -28h-222q-14 0 -24.5 8.5t-11.5 21.5l-28 184q-49 16 -90 37l-141 -107q-10 -9 -25 -9q-14 0 -25 11q-126 114 -165 168q-7 10 -7 23q0 12 8 23q15 21 51 66.5t54 70.5q-27 50 -41 99l-183 27q-13 2 -21 12.5t-8 23.5v222q0 12 8 23t19 13 l186 28q14 46 39 92q-40 57 -107 138q-10 12 -10 24q0 10 9 23q26 36 98.5 107.5t94.5 71.5q13 0 26 -10l138 -107q44 23 91 38q16 136 29 186q7 28 36 28h222q14 0 24.5 -8.5t11.5 -21.5l28 -184q49 -16 90 -37l142 107q9 9 24 9q13 0 25 -10q129 -119 165 -170q7 -8 7 -22 q0 -12 -8 -23q-15 -21 -51 -66.5t-54 -70.5q26 -50 41 -98l183 -28q13 -2 21 -12.5t8 -23.5z" />
-<glyph unicode="&#xf014;" horiz-adv-x="1408" d="M512 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM768 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1024 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1152 76v948h-896v-948q0 -22 7 -40.5t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832 q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
-<glyph unicode="&#xf015;" horiz-adv-x="1664" d="M1408 544v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6zM1631 613l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5t11 21.5 l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5z" />
-<glyph unicode="&#xf016;" horiz-adv-x="1280" d="M128 0h1024v768h-416q-40 0 -68 28t-28 68v416h-512v-1280zM768 896h376q-10 29 -22 41l-313 313q-12 12 -41 22v-376zM1280 864v-896q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h640q40 0 88 -20t76 -48l312 -312q28 -28 48 -76t20 -88z " />
-<glyph unicode="&#xf017;" d="M896 992v-448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf018;" horiz-adv-x="1920" d="M1111 540v4l-24 320q-1 13 -11 22.5t-23 9.5h-186q-13 0 -23 -9.5t-11 -22.5l-24 -320v-4q-1 -12 8 -20t21 -8h244q12 0 21 8t8 20zM1870 73q0 -73 -46 -73h-704q13 0 22 9.5t8 22.5l-20 256q-1 13 -11 22.5t-23 9.5h-272q-13 0 -23 -9.5t-11 -22.5l-20 -256 q-1 -13 8 -22.5t22 -9.5h-704q-46 0 -46 73q0 54 26 116l417 1044q8 19 26 33t38 14h339q-13 0 -23 -9.5t-11 -22.5l-15 -192q-1 -14 8 -23t22 -9h166q13 0 22 9t8 23l-15 192q-1 13 -11 22.5t-23 9.5h339q20 0 38 -14t26 -33l417 -1044q26 -62 26 -116z" />
-<glyph unicode="&#xf019;" horiz-adv-x="1664" d="M1280 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 416v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h465l135 -136 q58 -56 136 -56t136 56l136 136h464q40 0 68 -28t28 -68zM1339 985q17 -41 -14 -70l-448 -448q-18 -19 -45 -19t-45 19l-448 448q-31 29 -14 70q17 39 59 39h256v448q0 26 19 45t45 19h256q26 0 45 -19t19 -45v-448h256q42 0 59 -39z" />
-<glyph unicode="&#xf01a;" d="M1120 608q0 -12 -10 -24l-319 -319q-11 -9 -23 -9t-23 9l-320 320q-15 16 -7 35q8 20 30 20h192v352q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-352h192q14 0 23 -9t9 -23zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273 t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf01b;" d="M1118 660q-8 -20 -30 -20h-192v-352q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v352h-192q-14 0 -23 9t-9 23q0 12 10 24l319 319q11 9 23 9t23 -9l320 -320q15 -16 7 -35zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198 t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf01c;" d="M1023 576h316q-1 3 -2.5 8t-2.5 8l-212 496h-708l-212 -496q-1 -2 -2.5 -8t-2.5 -8h316l95 -192h320zM1536 546v-482q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v482q0 62 25 123l238 552q10 25 36.5 42t52.5 17h832q26 0 52.5 -17t36.5 -42l238 -552 q25 -61 25 -123z" />
-<glyph unicode="&#xf01d;" d="M1184 640q0 -37 -32 -55l-544 -320q-15 -9 -32 -9q-16 0 -32 8q-32 19 -32 56v640q0 37 32 56q33 18 64 -1l544 -320q32 -18 32 -55zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf01e;" d="M1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l138 138q-148 137 -349 137q-104 0 -198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5q119 0 225 52t179 147q7 10 23 12q14 0 25 -9 l137 -138q9 -8 9.5 -20.5t-7.5 -22.5q-109 -132 -264 -204.5t-327 -72.5q-156 0 -298 61t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q147 0 284.5 -55.5t244.5 -156.5l130 129q29 31 70 14q39 -17 39 -59z" />
-<glyph unicode="&#xf021;" d="M1511 480q0 -5 -1 -7q-64 -268 -268 -434.5t-478 -166.5q-146 0 -282.5 55t-243.5 157l-129 -129q-19 -19 -45 -19t-45 19t-19 45v448q0 26 19 45t45 19h448q26 0 45 -19t19 -45t-19 -45l-137 -137q71 -66 161 -102t187 -36q134 0 250 65t186 179q11 17 53 117 q8 23 30 23h192q13 0 22.5 -9.5t9.5 -22.5zM1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-26 0 -45 19t-19 45t19 45l138 138q-148 137 -349 137q-134 0 -250 -65t-186 -179q-11 -17 -53 -117q-8 -23 -30 -23h-199q-13 0 -22.5 9.5t-9.5 22.5v7q65 268 270 434.5t480 166.5 q146 0 284 -55.5t245 -156.5l130 129q19 19 45 19t45 -19t19 -45z" />
-<glyph unicode="&#xf022;" horiz-adv-x="1792" d="M384 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M384 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1536 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5z M1536 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5zM1536 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5 t9.5 -22.5zM1664 160v832q0 13 -9.5 22.5t-22.5 9.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1792 1248v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47 t47 -113z" />
-<glyph unicode="&#xf023;" horiz-adv-x="1152" d="M320 768h512v192q0 106 -75 181t-181 75t-181 -75t-75 -181v-192zM1152 672v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v192q0 184 132 316t316 132t316 -132t132 -316v-192h32q40 0 68 -28t28 -68z" />
-<glyph unicode="&#xf024;" horiz-adv-x="1792" d="M320 1280q0 -72 -64 -110v-1266q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v1266q-64 38 -64 110q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -25 -12.5 -38.5t-39.5 -27.5q-215 -116 -369 -116q-61 0 -123.5 22t-108.5 48 t-115.5 48t-142.5 22q-192 0 -464 -146q-17 -9 -33 -9q-26 0 -45 19t-19 45v742q0 32 31 55q21 14 79 43q236 120 421 120q107 0 200 -29t219 -88q38 -19 88 -19q54 0 117.5 21t110 47t88 47t54.5 21q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf025;" horiz-adv-x="1664" d="M1664 650q0 -166 -60 -314l-20 -49l-185 -33q-22 -83 -90.5 -136.5t-156.5 -53.5v-32q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-32q71 0 130 -35.5t93 -95.5l68 12q29 95 29 193q0 148 -88 279t-236.5 209t-315.5 78 t-315.5 -78t-236.5 -209t-88 -279q0 -98 29 -193l68 -12q34 60 93 95.5t130 35.5v32q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v32q-88 0 -156.5 53.5t-90.5 136.5l-185 33l-20 49q-60 148 -60 314q0 151 67 291t179 242.5 t266 163.5t320 61t320 -61t266 -163.5t179 -242.5t67 -291z" />
-<glyph unicode="&#xf026;" horiz-adv-x="768" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45z" />
-<glyph unicode="&#xf027;" horiz-adv-x="1152" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142z" />
-<glyph unicode="&#xf028;" horiz-adv-x="1664" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142zM1408 640q0 -153 -85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5 t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5q140 -59 225 -188.5t85 -282.5zM1664 640q0 -230 -127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289 t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19q13 0 26 -5q211 -91 338 -283.5t127 -422.5z" />
-<glyph unicode="&#xf029;" horiz-adv-x="1408" d="M384 384v-128h-128v128h128zM384 1152v-128h-128v128h128zM1152 1152v-128h-128v128h128zM128 129h384v383h-384v-383zM128 896h384v384h-384v-384zM896 896h384v384h-384v-384zM640 640v-640h-640v640h640zM1152 128v-128h-128v128h128zM1408 128v-128h-128v128h128z M1408 640v-384h-384v128h-128v-384h-128v640h384v-128h128v128h128zM640 1408v-640h-640v640h640zM1408 1408v-640h-640v640h640z" />
-<glyph unicode="&#xf02a;" horiz-adv-x="1792" d="M63 0h-63v1408h63v-1408zM126 1h-32v1407h32v-1407zM220 1h-31v1407h31v-1407zM377 1h-31v1407h31v-1407zM534 1h-62v1407h62v-1407zM660 1h-31v1407h31v-1407zM723 1h-31v1407h31v-1407zM786 1h-31v1407h31v-1407zM943 1h-63v1407h63v-1407zM1100 1h-63v1407h63v-1407z M1226 1h-63v1407h63v-1407zM1352 1h-63v1407h63v-1407zM1446 1h-63v1407h63v-1407zM1635 1h-94v1407h94v-1407zM1698 1h-32v1407h32v-1407zM1792 0h-63v1408h63v-1408z" />
-<glyph unicode="&#xf02b;" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91z" />
-<glyph unicode="&#xf02c;" horiz-adv-x="1920" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91zM1899 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-36 0 -59 14t-53 45l470 470q37 37 37 90q0 52 -37 91l-715 714q-38 38 -102 64.5t-117 26.5h224q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91z" />
-<glyph unicode="&#xf02d;" horiz-adv-x="1664" d="M1639 1058q40 -57 18 -129l-275 -906q-19 -64 -76.5 -107.5t-122.5 -43.5h-923q-77 0 -148.5 53.5t-99.5 131.5q-24 67 -2 127q0 4 3 27t4 37q1 8 -3 21.5t-3 19.5q2 11 8 21t16.5 23.5t16.5 23.5q23 38 45 91.5t30 91.5q3 10 0.5 30t-0.5 28q3 11 17 28t17 23 q21 36 42 92t25 90q1 9 -2.5 32t0.5 28q4 13 22 30.5t22 22.5q19 26 42.5 84.5t27.5 96.5q1 8 -3 25.5t-2 26.5q2 8 9 18t18 23t17 21q8 12 16.5 30.5t15 35t16 36t19.5 32t26.5 23.5t36 11.5t47.5 -5.5l-1 -3q38 9 51 9h761q74 0 114 -56t18 -130l-274 -906 q-36 -119 -71.5 -153.5t-128.5 -34.5h-869q-27 0 -38 -15q-11 -16 -1 -43q24 -70 144 -70h923q29 0 56 15.5t35 41.5l300 987q7 22 5 57q38 -15 59 -43zM575 1056q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5 t-16.5 -22.5zM492 800q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5z" />
-<glyph unicode="&#xf02e;" horiz-adv-x="1280" d="M1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
-<glyph unicode="&#xf02f;" horiz-adv-x="1664" d="M384 0h896v256h-896v-256zM384 640h896v384h-160q-40 0 -68 28t-28 68v160h-640v-640zM1536 576q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 576v-416q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-160q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68 v160h-224q-13 0 -22.5 9.5t-9.5 22.5v416q0 79 56.5 135.5t135.5 56.5h64v544q0 40 28 68t68 28h672q40 0 88 -20t76 -48l152 -152q28 -28 48 -76t20 -88v-256h64q79 0 135.5 -56.5t56.5 -135.5z" />
-<glyph unicode="&#xf030;" horiz-adv-x="1920" d="M960 864q119 0 203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5t84.5 203.5t203.5 84.5zM1664 1280q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181v896q0 106 75 181t181 75h224l51 136 q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224zM960 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
-<glyph unicode="&#xf031;" horiz-adv-x="1664" d="M725 977l-170 -450q73 -1 153.5 -2t119 -1.5t52.5 -0.5l29 2q-32 95 -92 241q-53 132 -92 211zM21 -128h-21l2 79q22 7 80 18q89 16 110 31q20 16 48 68l237 616l280 724h75h53l11 -21l205 -480q103 -242 124 -297q39 -102 96 -235q26 -58 65 -164q24 -67 65 -149 q22 -49 35 -57q22 -19 69 -23q47 -6 103 -27q6 -39 6 -57q0 -14 -1 -26q-80 0 -192 8q-93 8 -189 8q-79 0 -135 -2l-200 -11l-58 -2q0 45 4 78l131 28q56 13 68 23q12 12 12 27t-6 32l-47 114l-92 228l-450 2q-29 -65 -104 -274q-23 -64 -23 -84q0 -31 17 -43 q26 -21 103 -32q3 0 13.5 -2t30 -5t40.5 -6q1 -28 1 -58q0 -17 -2 -27q-66 0 -349 20l-48 -8q-81 -14 -167 -14z" />
-<glyph unicode="&#xf032;" horiz-adv-x="1408" d="M555 15q76 -32 140 -32q131 0 216 41t122 113q38 70 38 181q0 114 -41 180q-58 94 -141 126q-80 32 -247 32q-74 0 -101 -10v-144l-1 -173l3 -270q0 -15 12 -44zM541 761q43 -7 109 -7q175 0 264 65t89 224q0 112 -85 187q-84 75 -255 75q-52 0 -130 -13q0 -44 2 -77 q7 -122 6 -279l-1 -98q0 -43 1 -77zM0 -128l2 94q45 9 68 12q77 12 123 31q17 27 21 51q9 66 9 194l-2 497q-5 256 -9 404q-1 87 -11 109q-1 4 -12 12q-18 12 -69 15q-30 2 -114 13l-4 83l260 6l380 13l45 1q5 0 14 0.5t14 0.5q1 0 21.5 -0.5t40.5 -0.5h74q88 0 191 -27 q43 -13 96 -39q57 -29 102 -76q44 -47 65 -104t21 -122q0 -70 -32 -128t-95 -105q-26 -20 -150 -77q177 -41 267 -146q92 -106 92 -236q0 -76 -29 -161q-21 -62 -71 -117q-66 -72 -140 -108q-73 -36 -203 -60q-82 -15 -198 -11l-197 4q-84 2 -298 -11q-33 -3 -272 -11z" />
-<glyph unicode="&#xf033;" horiz-adv-x="1024" d="M0 -126l17 85q4 1 77 20q76 19 116 39q29 37 41 101l27 139l56 268l12 64q8 44 17 84.5t16 67t12.5 46.5t9 30.5t3.5 11.5l29 157l16 63l22 135l8 50v38q-41 22 -144 28q-28 2 -38 4l19 103l317 -14q39 -2 73 -2q66 0 214 9q33 2 68 4.5t36 2.5q-2 -19 -6 -38 q-7 -29 -13 -51q-55 -19 -109 -31q-64 -16 -101 -31q-12 -31 -24 -88q-9 -44 -13 -82q-44 -199 -66 -306l-61 -311l-38 -158l-43 -235l-12 -45q-2 -7 1 -27q64 -15 119 -21q36 -5 66 -10q-1 -29 -7 -58q-7 -31 -9 -41q-18 0 -23 -1q-24 -2 -42 -2q-9 0 -28 3q-19 4 -145 17 l-198 2q-41 1 -174 -11q-74 -7 -98 -9z" />
-<glyph unicode="&#xf034;" horiz-adv-x="1792" d="M81 1407l54 -27q20 -5 211 -5h130l19 3l115 1l215 -1h293l34 -2q14 -1 28 7t21 16l7 8l42 1q15 0 28 -1v-104.5t1 -131.5l1 -100l-1 -58q0 -32 -4 -51q-39 -15 -68 -18q-25 43 -54 128q-8 24 -15.5 62.5t-11.5 65.5t-6 29q-13 15 -27 19q-7 2 -42.5 2t-103.5 -1t-111 -1 q-34 0 -67 -5q-10 -97 -8 -136l1 -152v-332l3 -359l-1 -147q-1 -46 11 -85q49 -25 89 -32q2 0 18 -5t44 -13t43 -12q30 -8 50 -18q5 -45 5 -50q0 -10 -3 -29q-14 -1 -34 -1q-110 0 -187 10q-72 8 -238 8q-88 0 -233 -14q-48 -4 -70 -4q-2 22 -2 26l-1 26v9q21 33 79 49 q139 38 159 50q9 21 12 56q8 192 6 433l-5 428q-1 62 -0.5 118.5t0.5 102.5t-2 57t-6 15q-6 5 -14 6q-38 6 -148 6q-43 0 -100 -13.5t-73 -24.5q-13 -9 -22 -33t-22 -75t-24 -84q-6 -19 -19.5 -32t-20.5 -13q-44 27 -56 44v297v86zM1744 128q33 0 42 -18.5t-11 -44.5 l-126 -162q-20 -26 -49 -26t-49 26l-126 162q-20 26 -11 44.5t42 18.5h80v1024h-80q-33 0 -42 18.5t11 44.5l126 162q20 26 49 26t49 -26l126 -162q20 -26 11 -44.5t-42 -18.5h-80v-1024h80z" />
-<glyph unicode="&#xf035;" d="M81 1407l54 -27q20 -5 211 -5h130l19 3l115 1l446 -1h318l34 -2q14 -1 28 7t21 16l7 8l42 1q15 0 28 -1v-104.5t1 -131.5l1 -100l-1 -58q0 -32 -4 -51q-39 -15 -68 -18q-25 43 -54 128q-8 24 -15.5 62.5t-11.5 65.5t-6 29q-13 15 -27 19q-7 2 -58.5 2t-138.5 -1t-128 -1 q-94 0 -127 -5q-10 -97 -8 -136l1 -152v52l3 -359l-1 -147q-1 -46 11 -85q49 -25 89 -32q2 0 18 -5t44 -13t43 -12q30 -8 50 -18q5 -45 5 -50q0 -10 -3 -29q-14 -1 -34 -1q-110 0 -187 10q-72 8 -238 8q-82 0 -233 -13q-45 -5 -70 -5q-2 22 -2 26l-1 26v9q21 33 79 49 q139 38 159 50q9 21 12 56q6 137 6 433l-5 44q0 265 -2 278q-2 11 -6 15q-6 5 -14 6q-38 6 -148 6q-50 0 -168.5 -14t-132.5 -24q-13 -9 -22 -33t-22 -75t-24 -84q-6 -19 -19.5 -32t-20.5 -13q-44 27 -56 44v297v86zM1505 113q26 -20 26 -49t-26 -49l-162 -126 q-26 -20 -44.5 -11t-18.5 42v80h-1024v-80q0 -33 -18.5 -42t-44.5 11l-162 126q-26 20 -26 49t26 49l162 126q26 20 44.5 11t18.5 -42v-80h1024v80q0 33 18.5 42t44.5 -11z" />
-<glyph unicode="&#xf036;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf037;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h896q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45t-45 -19 h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h640q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf038;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf039;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf03a;" horiz-adv-x="1792" d="M256 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM256 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5 t9.5 -22.5zM256 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344 q13 0 22.5 -9.5t9.5 -22.5zM256 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192 q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5z" />
-<glyph unicode="&#xf03b;" horiz-adv-x="1792" d="M384 992v-576q0 -13 -9.5 -22.5t-22.5 -9.5q-14 0 -23 9l-288 288q-9 9 -9 23t9 23l288 288q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
-<glyph unicode="&#xf03c;" horiz-adv-x="1792" d="M352 704q0 -14 -9 -23l-288 -288q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v576q0 13 9.5 22.5t22.5 9.5q14 0 23 -9l288 -288q9 -9 9 -23zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
-<glyph unicode="&#xf03d;" horiz-adv-x="1792" d="M1792 1184v-1088q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-403 403v-166q0 -119 -84.5 -203.5t-203.5 -84.5h-704q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h704q119 0 203.5 -84.5t84.5 -203.5v-165l403 402q18 19 45 19q12 0 25 -5 q39 -17 39 -59z" />
-<glyph unicode="&#xf03e;" horiz-adv-x="1920" d="M640 960q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 576v-448h-1408v192l320 320l160 -160l512 512zM1760 1280h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216 q0 13 -9.5 22.5t-22.5 9.5zM1920 1248v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
-<glyph unicode="&#xf040;" d="M363 0l91 91l-235 235l-91 -91v-107h128v-128h107zM886 928q0 22 -22 22q-10 0 -17 -7l-542 -542q-7 -7 -7 -17q0 -22 22 -22q10 0 17 7l542 542q7 7 7 17zM832 1120l416 -416l-832 -832h-416v416zM1515 1024q0 -53 -37 -90l-166 -166l-416 416l166 165q36 38 90 38 q53 0 91 -38l235 -234q37 -39 37 -91z" />
-<glyph unicode="&#xf041;" horiz-adv-x="1024" d="M768 896q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1024 896q0 -109 -33 -179l-364 -774q-16 -33 -47.5 -52t-67.5 -19t-67.5 19t-46.5 52l-365 774q-33 70 -33 179q0 212 150 362t362 150t362 -150t150 -362z" />
-<glyph unicode="&#xf042;" d="M768 96v1088q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf043;" horiz-adv-x="1024" d="M512 384q0 36 -20 69q-1 1 -15.5 22.5t-25.5 38t-25 44t-21 50.5q-4 16 -21 16t-21 -16q-7 -23 -21 -50.5t-25 -44t-25.5 -38t-15.5 -22.5q-20 -33 -20 -69q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 512q0 -212 -150 -362t-362 -150t-362 150t-150 362 q0 145 81 275q6 9 62.5 90.5t101 151t99.5 178t83 201.5q9 30 34 47t51 17t51.5 -17t33.5 -47q28 -93 83 -201.5t99.5 -178t101 -151t62.5 -90.5q81 -127 81 -275z" />
-<glyph unicode="&#xf044;" horiz-adv-x="1792" d="M888 352l116 116l-152 152l-116 -116v-56h96v-96h56zM1328 1072q-16 16 -33 -1l-350 -350q-17 -17 -1 -33t33 1l350 350q17 17 1 33zM1408 478v-190q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-14 -14 -32 -8q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v126q0 13 9 22l64 64q15 15 35 7t20 -29zM1312 1216l288 -288l-672 -672h-288v288zM1756 1084l-92 -92 l-288 288l92 92q28 28 68 28t68 -28l152 -152q28 -28 28 -68t-28 -68z" />
-<glyph unicode="&#xf045;" horiz-adv-x="1664" d="M1408 547v-259q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h255v0q13 0 22.5 -9.5t9.5 -22.5q0 -27 -26 -32q-77 -26 -133 -60q-10 -4 -16 -4h-112q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832 q66 0 113 47t47 113v214q0 19 18 29q28 13 54 37q16 16 35 8q21 -9 21 -29zM1645 1043l-384 -384q-18 -19 -45 -19q-12 0 -25 5q-39 17 -39 59v192h-160q-323 0 -438 -131q-119 -137 -74 -473q3 -23 -20 -34q-8 -2 -12 -2q-16 0 -26 13q-10 14 -21 31t-39.5 68.5t-49.5 99.5 t-38.5 114t-17.5 122q0 49 3.5 91t14 90t28 88t47 81.5t68.5 74t94.5 61.5t124.5 48.5t159.5 30.5t196.5 11h160v192q0 42 39 59q13 5 25 5q26 0 45 -19l384 -384q19 -19 19 -45t-19 -45z" />
-<glyph unicode="&#xf046;" horiz-adv-x="1664" d="M1408 606v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832 q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3q20 -8 20 -29zM1639 1095l-814 -814q-24 -24 -57 -24t-57 24l-430 430q-24 24 -24 57t24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110 q24 -24 24 -57t-24 -57z" />
-<glyph unicode="&#xf047;" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-384v-384h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v384h-384v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45 t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h384v384h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-384h384v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
-<glyph unicode="&#xf048;" horiz-adv-x="1024" d="M979 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19z" />
-<glyph unicode="&#xf049;" horiz-adv-x="1792" d="M1747 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19l710 710 q19 19 32 13t13 -32v-710q4 11 13 19z" />
-<glyph unicode="&#xf04a;" horiz-adv-x="1664" d="M1619 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-8 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-19 19 -19 45t19 45l710 710q19 19 32 13t13 -32v-710q5 11 13 19z" />
-<glyph unicode="&#xf04b;" horiz-adv-x="1408" d="M1384 609l-1328 -738q-23 -13 -39.5 -3t-16.5 36v1472q0 26 16.5 36t39.5 -3l1328 -738q23 -13 23 -31t-23 -31z" />
-<glyph unicode="&#xf04c;" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45zM640 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf04d;" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf04e;" horiz-adv-x="1664" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q19 -19 19 -45t-19 -45l-710 -710q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
-<glyph unicode="&#xf050;" horiz-adv-x="1792" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19l-710 -710 q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
-<glyph unicode="&#xf051;" horiz-adv-x="1024" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19z" />
-<glyph unicode="&#xf052;" horiz-adv-x="1538" d="M14 557l710 710q19 19 45 19t45 -19l710 -710q19 -19 13 -32t-32 -13h-1472q-26 0 -32 13t13 32zM1473 0h-1408q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19z" />
-<glyph unicode="&#xf053;" horiz-adv-x="1152" d="M742 -37l-652 651q-37 37 -37 90.5t37 90.5l652 651q37 37 90.5 37t90.5 -37l75 -75q37 -37 37 -90.5t-37 -90.5l-486 -486l486 -485q37 -38 37 -91t-37 -90l-75 -75q-37 -37 -90.5 -37t-90.5 37z" />
-<glyph unicode="&#xf054;" horiz-adv-x="1152" d="M1099 704q0 -52 -37 -91l-652 -651q-37 -37 -90 -37t-90 37l-76 75q-37 39 -37 91q0 53 37 90l486 486l-486 485q-37 39 -37 91q0 53 37 90l76 75q36 38 90 38t90 -38l652 -651q37 -37 37 -90z" />
-<glyph unicode="&#xf055;" d="M1216 576v128q0 26 -19 45t-45 19h-256v256q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-256h-256q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h256v-256q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v256h256q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5 t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf056;" d="M1216 576v128q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 t103 -385.5z" />
-<glyph unicode="&#xf057;" d="M1149 414q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45q0 -27 19 -46l90 -90q19 -19 46 -19 q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19l90 90q19 19 19 46zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf058;" d="M1284 802q0 28 -18 46l-91 90q-19 19 -45 19t-45 -19l-408 -407l-226 226q-19 19 -45 19t-45 -19l-91 -90q-18 -18 -18 -46q0 -27 18 -45l362 -362q19 -19 45 -19q27 0 46 19l543 543q18 18 18 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf059;" d="M896 160v192q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h192q14 0 23 9t9 23zM1152 832q0 88 -55.5 163t-138.5 116t-170 41q-243 0 -371 -213q-15 -24 8 -42l132 -100q7 -6 19 -6q16 0 25 12q53 68 86 92q34 24 86 24q48 0 85.5 -26t37.5 -59 q0 -38 -20 -61t-68 -45q-63 -28 -115.5 -86.5t-52.5 -125.5v-36q0 -14 9 -23t23 -9h192q14 0 23 9t9 23q0 19 21.5 49.5t54.5 49.5q32 18 49 28.5t46 35t44.5 48t28 60.5t12.5 81zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf05a;" d="M1024 160v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23zM896 1056v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23 t23 -9h192q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf05b;" d="M1197 512h-109q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h109q-32 108 -112.5 188.5t-188.5 112.5v-109q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v109q-108 -32 -188.5 -112.5t-112.5 -188.5h109q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-109 q32 -108 112.5 -188.5t188.5 -112.5v109q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-109q108 32 188.5 112.5t112.5 188.5zM1536 704v-128q0 -26 -19 -45t-45 -19h-143q-37 -161 -154.5 -278.5t-278.5 -154.5v-143q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v143 q-161 37 -278.5 154.5t-154.5 278.5h-143q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h143q37 161 154.5 278.5t278.5 154.5v143q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-143q161 -37 278.5 -154.5t154.5 -278.5h143q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf05c;" d="M1097 457l-146 -146q-10 -10 -23 -10t-23 10l-137 137l-137 -137q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23t10 23l137 137l-137 137q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l137 -137l137 137q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23 l-137 -137l137 -137q10 -10 10 -23t-10 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5 t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf05d;" d="M1171 723l-422 -422q-19 -19 -45 -19t-45 19l-294 294q-19 19 -19 45t19 45l102 102q19 19 45 19t45 -19l147 -147l275 275q19 19 45 19t45 -19l102 -102q19 -19 19 -45t-19 -45zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198 t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf05e;" d="M1312 643q0 161 -87 295l-754 -753q137 -89 297 -89q111 0 211.5 43.5t173.5 116.5t116 174.5t43 212.5zM313 344l755 754q-135 91 -300 91q-148 0 -273 -73t-198 -199t-73 -274q0 -162 89 -299zM1536 643q0 -157 -61 -300t-163.5 -246t-245 -164t-298.5 -61t-298.5 61 t-245 164t-163.5 246t-61 300t61 299.5t163.5 245.5t245 164t298.5 61t298.5 -61t245 -164t163.5 -245.5t61 -299.5z" />
-<glyph unicode="&#xf060;" d="M1536 640v-128q0 -53 -32.5 -90.5t-84.5 -37.5h-704l293 -294q38 -36 38 -90t-38 -90l-75 -76q-37 -37 -90 -37q-52 0 -91 37l-651 652q-37 37 -37 90q0 52 37 91l651 650q38 38 91 38q52 0 90 -38l75 -74q38 -38 38 -91t-38 -91l-293 -293h704q52 0 84.5 -37.5 t32.5 -90.5z" />
-<glyph unicode="&#xf061;" d="M1472 576q0 -54 -37 -91l-651 -651q-39 -37 -91 -37q-51 0 -90 37l-75 75q-38 38 -38 91t38 91l293 293h-704q-52 0 -84.5 37.5t-32.5 90.5v128q0 53 32.5 90.5t84.5 37.5h704l-293 294q-38 36 -38 90t38 90l75 75q38 38 90 38q53 0 91 -38l651 -651q37 -35 37 -90z" />
-<glyph unicode="&#xf062;" horiz-adv-x="1664" d="M1611 565q0 -51 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-294 293v-704q0 -52 -37.5 -84.5t-90.5 -32.5h-128q-53 0 -90.5 32.5t-37.5 84.5v704l-294 -293q-36 -38 -90 -38t-90 38l-75 75q-38 38 -38 90q0 53 38 91l651 651q35 37 90 37q54 0 91 -37l651 -651 q37 -39 37 -91z" />
-<glyph unicode="&#xf063;" horiz-adv-x="1664" d="M1611 704q0 -53 -37 -90l-651 -652q-39 -37 -91 -37q-53 0 -90 37l-651 652q-38 36 -38 90q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l294 -294v704q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-704l294 294q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91z" />
-<glyph unicode="&#xf064;" horiz-adv-x="1792" d="M1792 896q0 -26 -19 -45l-512 -512q-19 -19 -45 -19t-45 19t-19 45v256h-224q-98 0 -175.5 -6t-154 -21.5t-133 -42.5t-105.5 -69.5t-80 -101t-48.5 -138.5t-17.5 -181q0 -55 5 -123q0 -6 2.5 -23.5t2.5 -26.5q0 -15 -8.5 -25t-23.5 -10q-16 0 -28 17q-7 9 -13 22 t-13.5 30t-10.5 24q-127 285 -127 451q0 199 53 333q162 403 875 403h224v256q0 26 19 45t45 19t45 -19l512 -512q19 -19 19 -45z" />
-<glyph unicode="&#xf065;" d="M755 480q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23zM1536 1344v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332 q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf066;" d="M768 576v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45zM1523 1248q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45 t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23z" />
-<glyph unicode="&#xf067;" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-416v-416q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v416h-416q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h416v416q0 40 28 68t68 28h192q40 0 68 -28t28 -68v-416h416q40 0 68 -28t28 -68z" />
-<glyph unicode="&#xf068;" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-1216q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h1216q40 0 68 -28t28 -68z" />
-<glyph unicode="&#xf069;" horiz-adv-x="1664" d="M1482 486q46 -26 59.5 -77.5t-12.5 -97.5l-64 -110q-26 -46 -77.5 -59.5t-97.5 12.5l-266 153v-307q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v307l-266 -153q-46 -26 -97.5 -12.5t-77.5 59.5l-64 110q-26 46 -12.5 97.5t59.5 77.5l266 154l-266 154 q-46 26 -59.5 77.5t12.5 97.5l64 110q26 46 77.5 59.5t97.5 -12.5l266 -153v307q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-307l266 153q46 26 97.5 12.5t77.5 -59.5l64 -110q26 -46 12.5 -97.5t-59.5 -77.5l-266 -154z" />
-<glyph unicode="&#xf06a;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM896 161v190q0 14 -9 23.5t-22 9.5h-192q-13 0 -23 -10t-10 -23v-190q0 -13 10 -23t23 -10h192 q13 0 22 9.5t9 23.5zM894 505l18 621q0 12 -10 18q-10 8 -24 8h-220q-14 0 -24 -8q-10 -6 -10 -18l17 -621q0 -10 10 -17.5t24 -7.5h185q14 0 23.5 7.5t10.5 17.5z" />
-<glyph unicode="&#xf06b;" d="M928 180v56v468v192h-320v-192v-468v-56q0 -25 18 -38.5t46 -13.5h192q28 0 46 13.5t18 38.5zM472 1024h195l-126 161q-26 31 -69 31q-40 0 -68 -28t-28 -68t28 -68t68 -28zM1160 1120q0 40 -28 68t-68 28q-43 0 -69 -31l-125 -161h194q40 0 68 28t28 68zM1536 864v-320 q0 -14 -9 -23t-23 -9h-96v-416q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v416h-96q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h440q-93 0 -158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5q107 0 168 -77l128 -165l128 165q61 77 168 77q93 0 158.5 -65.5t65.5 -158.5 t-65.5 -158.5t-158.5 -65.5h440q14 0 23 -9t9 -23z" />
-<glyph unicode="&#xf06c;" horiz-adv-x="1792" d="M1280 832q0 26 -19 45t-45 19q-172 0 -318 -49.5t-259.5 -134t-235.5 -219.5q-19 -21 -19 -45q0 -26 19 -45t45 -19q24 0 45 19q27 24 74 71t67 66q137 124 268.5 176t313.5 52q26 0 45 19t19 45zM1792 1030q0 -95 -20 -193q-46 -224 -184.5 -383t-357.5 -268 q-214 -108 -438 -108q-148 0 -286 47q-15 5 -88 42t-96 37q-16 0 -39.5 -32t-45 -70t-52.5 -70t-60 -32q-30 0 -51 11t-31 24t-27 42q-2 4 -6 11t-5.5 10t-3 9.5t-1.5 13.5q0 35 31 73.5t68 65.5t68 56t31 48q0 4 -14 38t-16 44q-9 51 -9 104q0 115 43.5 220t119 184.5 t170.5 139t204 95.5q55 18 145 25.5t179.5 9t178.5 6t163.5 24t113.5 56.5l29.5 29.5t29.5 28t27 20t36.5 16t43.5 4.5q39 0 70.5 -46t47.5 -112t24 -124t8 -96z" />
-<glyph unicode="&#xf06d;" horiz-adv-x="1408" d="M1408 -160v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1152 896q0 -78 -24.5 -144t-64 -112.5t-87.5 -88t-96 -77.5t-87.5 -72t-64 -81.5t-24.5 -96.5q0 -96 67 -224l-4 1l1 -1 q-90 41 -160 83t-138.5 100t-113.5 122.5t-72.5 150.5t-27.5 184q0 78 24.5 144t64 112.5t87.5 88t96 77.5t87.5 72t64 81.5t24.5 96.5q0 94 -66 224l3 -1l-1 1q90 -41 160 -83t138.5 -100t113.5 -122.5t72.5 -150.5t27.5 -184z" />
-<glyph unicode="&#xf06e;" horiz-adv-x="1792" d="M1664 576q-152 236 -381 353q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5 t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1792 576q0 -34 -20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69t20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69z" />
-<glyph unicode="&#xf070;" horiz-adv-x="1792" d="M555 201l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353q167 -258 427 -375zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1307 1151q0 -7 -1 -9 q-105 -188 -315 -566t-316 -567l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87q-143 65 -263.5 173t-208.5 245q-20 31 -20 69t20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5 q16 -10 16 -27zM1344 704q0 -139 -79 -253.5t-209 -164.5l280 502q8 -45 8 -84zM1792 576q0 -35 -20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69z " />
-<glyph unicode="&#xf071;" horiz-adv-x="1792" d="M1024 161v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5zM1022 535l18 459q0 12 -10 19q-13 11 -24 11h-220q-11 0 -24 -11q-10 -7 -10 -21l17 -457q0 -10 10 -16.5t24 -6.5h185 q14 0 23.5 6.5t10.5 16.5zM1008 1469l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126l768 1408q17 31 47 49t65 18t65 -18t47 -49z" />
-<glyph unicode="&#xf072;" horiz-adv-x="1408" d="M1376 1376q44 -52 12 -148t-108 -172l-161 -161l160 -696q5 -19 -12 -33l-128 -96q-7 -6 -19 -6q-4 0 -7 1q-15 3 -21 16l-279 508l-259 -259l53 -194q5 -17 -8 -31l-96 -96q-9 -9 -23 -9h-2q-15 2 -24 13l-189 252l-252 189q-11 7 -13 23q-1 13 9 25l96 97q9 9 23 9 q6 0 8 -1l194 -53l259 259l-508 279q-14 8 -17 24q-2 16 9 27l128 128q14 13 30 8l665 -159l160 160q76 76 172 108t148 -12z" />
-<glyph unicode="&#xf073;" horiz-adv-x="1664" d="M128 -128h288v288h-288v-288zM480 -128h320v288h-320v-288zM128 224h288v320h-288v-320zM480 224h320v320h-320v-320zM128 608h288v288h-288v-288zM864 -128h320v288h-320v-288zM480 608h320v288h-320v-288zM1248 -128h288v288h-288v-288zM864 224h320v320h-320v-320z M512 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1248 224h288v320h-288v-320zM864 608h320v288h-320v-288zM1248 608h288v288h-288v-288zM1280 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64 q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47 h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
-<glyph unicode="&#xf074;" horiz-adv-x="1792" d="M666 1055q-60 -92 -137 -273q-22 45 -37 72.5t-40.5 63.5t-51 56.5t-63 35t-81.5 14.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q250 0 410 -225zM1792 256q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192q-32 0 -85 -0.5t-81 -1t-73 1 t-71 5t-64 10.5t-63 18.5t-58 28.5t-59 40t-55 53.5t-56 69.5q59 93 136 273q22 -45 37 -72.5t40.5 -63.5t51 -56.5t63 -35t81.5 -14.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1792 1152q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5 v192h-256q-48 0 -87 -15t-69 -45t-51 -61.5t-45 -77.5q-32 -62 -78 -171q-29 -66 -49.5 -111t-54 -105t-64 -100t-74 -83t-90 -68.5t-106.5 -42t-128 -16.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q48 0 87 15t69 45t51 61.5t45 77.5q32 62 78 171q29 66 49.5 111 t54 105t64 100t74 83t90 68.5t106.5 42t128 16.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
-<glyph unicode="&#xf075;" horiz-adv-x="1792" d="M1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22q-17 -2 -30.5 9t-17.5 29v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281 q0 130 71 248.5t191 204.5t286 136.5t348 50.5q244 0 450 -85.5t326 -233t120 -321.5z" />
-<glyph unicode="&#xf076;" d="M1536 704v-128q0 -201 -98.5 -362t-274 -251.5t-395.5 -90.5t-395.5 90.5t-274 251.5t-98.5 362v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -52 23.5 -90t53.5 -57t71 -30t64 -13t44 -2t44 2t64 13t71 30t53.5 57t23.5 90v128q0 26 19 45t45 19h384 q26 0 45 -19t19 -45zM512 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45zM1536 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf077;" horiz-adv-x="1664" d="M1611 320q0 -53 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-486 485l-486 -485q-36 -38 -90 -38t-90 38l-75 75q-38 36 -38 90q0 53 38 91l651 651q37 37 90 37q52 0 91 -37l650 -651q38 -38 38 -91z" />
-<glyph unicode="&#xf078;" horiz-adv-x="1664" d="M1611 832q0 -53 -37 -90l-651 -651q-38 -38 -91 -38q-54 0 -90 38l-651 651q-38 36 -38 90q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l486 -486l486 486q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91z" />
-<glyph unicode="&#xf079;" horiz-adv-x="1920" d="M1280 32q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-8 0 -13.5 2t-9 7t-5.5 8t-3 11.5t-1 11.5v13v11v160v416h-192q-26 0 -45 19t-19 45q0 24 15 41l320 384q19 22 49 22t49 -22l320 -384q15 -17 15 -41q0 -26 -19 -45t-45 -19h-192v-384h576q16 0 25 -11l160 -192q7 -11 7 -21 zM1920 448q0 -24 -15 -41l-320 -384q-20 -23 -49 -23t-49 23l-320 384q-15 17 -15 41q0 26 19 45t45 19h192v384h-576q-16 0 -25 12l-160 192q-7 9 -7 20q0 13 9.5 22.5t22.5 9.5h960q8 0 13.5 -2t9 -7t5.5 -8t3 -11.5t1 -11.5v-13v-11v-160v-416h192q26 0 45 -19t19 -45z " />
-<glyph unicode="&#xf07a;" horiz-adv-x="1664" d="M640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5 l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5 t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf07b;" horiz-adv-x="1664" d="M1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
-<glyph unicode="&#xf07c;" horiz-adv-x="1920" d="M1879 584q0 -31 -31 -66l-336 -396q-43 -51 -120.5 -86.5t-143.5 -35.5h-1088q-34 0 -60.5 13t-26.5 43q0 31 31 66l336 396q43 51 120.5 86.5t143.5 35.5h1088q34 0 60.5 -13t26.5 -43zM1536 928v-160h-832q-94 0 -197 -47.5t-164 -119.5l-337 -396l-5 -6q0 4 -0.5 12.5 t-0.5 12.5v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158z" />
-<glyph unicode="&#xf07d;" horiz-adv-x="768" d="M704 1216q0 -26 -19 -45t-45 -19h-128v-1024h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v1024h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45z" />
-<glyph unicode="&#xf07e;" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-1024v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h1024v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
-<glyph unicode="&#xf080;" horiz-adv-x="1920" d="M512 512v-384h-256v384h256zM896 1024v-896h-256v896h256zM1280 768v-640h-256v640h256zM1664 1152v-1024h-256v1024h256zM1792 32v1216q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5z M1920 1248v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
-<glyph unicode="&#xf081;" d="M1280 926q-56 -25 -121 -34q68 40 93 117q-65 -38 -134 -51q-61 66 -153 66q-87 0 -148.5 -61.5t-61.5 -148.5q0 -29 5 -48q-129 7 -242 65t-192 155q-29 -50 -29 -106q0 -114 91 -175q-47 1 -100 26v-2q0 -75 50 -133.5t123 -72.5q-29 -8 -51 -8q-13 0 -39 4 q21 -63 74.5 -104t121.5 -42q-116 -90 -261 -90q-26 0 -50 3q148 -94 322 -94q112 0 210 35.5t168 95t120.5 137t75 162t24.5 168.5q0 18 -1 27q63 45 105 109zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5 t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf082;" d="M1307 618l23 219h-198v109q0 49 15.5 68.5t71.5 19.5h110v219h-175q-152 0 -218 -72t-66 -213v-131h-131v-219h131v-635h262v635h175zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960 q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf083;" horiz-adv-x="1792" d="M928 704q0 14 -9 23t-23 9q-66 0 -113 -47t-47 -113q0 -14 9 -23t23 -9t23 9t9 23q0 40 28 68t68 28q14 0 23 9t9 23zM1152 574q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM128 0h1536v128h-1536v-128zM1280 574q0 159 -112.5 271.5 t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM256 1216h384v128h-384v-128zM128 1024h1536v118v138h-828l-64 -128h-644v-128zM1792 1280v-1280q0 -53 -37.5 -90.5t-90.5 -37.5h-1536q-53 0 -90.5 37.5t-37.5 90.5v1280 q0 53 37.5 90.5t90.5 37.5h1536q53 0 90.5 -37.5t37.5 -90.5z" />
-<glyph unicode="&#xf084;" horiz-adv-x="1792" d="M832 1024q0 80 -56 136t-136 56t-136 -56t-56 -136q0 -42 19 -83q-41 19 -83 19q-80 0 -136 -56t-56 -136t56 -136t136 -56t136 56t56 136q0 42 -19 83q41 -19 83 -19q80 0 136 56t56 136zM1683 320q0 -17 -49 -66t-66 -49q-9 0 -28.5 16t-36.5 33t-38.5 40t-24.5 26 l-96 -96l220 -220q28 -28 28 -68q0 -42 -39 -81t-81 -39q-40 0 -68 28l-671 671q-176 -131 -365 -131q-163 0 -265.5 102.5t-102.5 265.5q0 160 95 313t248 248t313 95q163 0 265.5 -102.5t102.5 -265.5q0 -189 -131 -365l355 -355l96 96q-3 3 -26 24.5t-40 38.5t-33 36.5 t-16 28.5q0 17 49 66t66 49q13 0 23 -10q6 -6 46 -44.5t82 -79.5t86.5 -86t73 -78t28.5 -41z" />
-<glyph unicode="&#xf085;" horiz-adv-x="1920" d="M896 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1664 128q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1152q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1280 731v-185q0 -10 -7 -19.5t-16 -10.5l-155 -24q-11 -35 -32 -76q34 -48 90 -115q7 -10 7 -20q0 -12 -7 -19q-23 -30 -82.5 -89.5t-78.5 -59.5q-11 0 -21 7l-115 90q-37 -19 -77 -31q-11 -108 -23 -155q-7 -24 -30 -24h-186q-11 0 -20 7.5t-10 17.5 l-23 153q-34 10 -75 31l-118 -89q-7 -7 -20 -7q-11 0 -21 8q-144 133 -144 160q0 9 7 19q10 14 41 53t47 61q-23 44 -35 82l-152 24q-10 1 -17 9.5t-7 19.5v185q0 10 7 19.5t16 10.5l155 24q11 35 32 76q-34 48 -90 115q-7 11 -7 20q0 12 7 20q22 30 82 89t79 59q11 0 21 -7 l115 -90q34 18 77 32q11 108 23 154q7 24 30 24h186q11 0 20 -7.5t10 -17.5l23 -153q34 -10 75 -31l118 89q8 7 20 7q11 0 21 -8q144 -133 144 -160q0 -9 -7 -19q-12 -16 -42 -54t-45 -60q23 -48 34 -82l152 -23q10 -2 17 -10.5t7 -19.5zM1920 198v-140q0 -16 -149 -31 q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20 t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31zM1920 1222v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68 q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70 q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31z" />
-<glyph unicode="&#xf086;" horiz-adv-x="1792" d="M1408 768q0 -139 -94 -257t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224 q0 139 94 257t256.5 186.5t353.5 68.5t353.5 -68.5t256.5 -186.5t94 -257zM1792 512q0 -120 -71 -224.5t-195 -176.5q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7 q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230z" />
-<glyph unicode="&#xf087;" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 768q0 51 -39 89.5t-89 38.5h-352q0 58 48 159.5t48 160.5q0 98 -32 145t-128 47q-26 -26 -38 -85t-30.5 -125.5t-59.5 -109.5q-22 -23 -77 -91q-4 -5 -23 -30t-31.5 -41t-34.5 -42.5 t-40 -44t-38.5 -35.5t-40 -27t-35.5 -9h-32v-640h32q13 0 31.5 -3t33 -6.5t38 -11t35 -11.5t35.5 -12.5t29 -10.5q211 -73 342 -73h121q192 0 192 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5q32 1 53.5 47t21.5 81zM1536 769 q0 -89 -49 -163q9 -33 9 -69q0 -77 -38 -144q3 -21 3 -43q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5h-36h-93q-96 0 -189.5 22.5t-216.5 65.5q-116 40 -138 40h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h274q36 24 137 155q58 75 107 128 q24 25 35.5 85.5t30.5 126.5t62 108q39 37 90 37q84 0 151 -32.5t102 -101.5t35 -186q0 -93 -48 -192h176q104 0 180 -76t76 -179z" />
-<glyph unicode="&#xf088;" d="M256 1088q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 512q0 35 -21.5 81t-53.5 47q15 17 25 47.5t10 55.5q0 69 -53 119q18 32 18 69t-17.5 73.5t-47.5 52.5q5 30 5 56q0 85 -49 126t-136 41h-128q-131 0 -342 -73q-5 -2 -29 -10.5 t-35.5 -12.5t-35 -11.5t-38 -11t-33 -6.5t-31.5 -3h-32v-640h32q16 0 35.5 -9t40 -27t38.5 -35.5t40 -44t34.5 -42.5t31.5 -41t23 -30q55 -68 77 -91q41 -43 59.5 -109.5t30.5 -125.5t38 -85q96 0 128 47t32 145q0 59 -48 160.5t-48 159.5h352q50 0 89 38.5t39 89.5z M1536 511q0 -103 -76 -179t-180 -76h-176q48 -99 48 -192q0 -118 -35 -186q-35 -69 -102 -101.5t-151 -32.5q-51 0 -90 37q-34 33 -54 82t-25.5 90.5t-17.5 84.5t-31 64q-48 50 -107 127q-101 131 -137 155h-274q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5 h288q22 0 138 40q128 44 223 66t200 22h112q140 0 226.5 -79t85.5 -216v-5q60 -77 60 -178q0 -22 -3 -43q38 -67 38 -144q0 -36 -9 -69q49 -74 49 -163z" />
-<glyph unicode="&#xf089;" horiz-adv-x="896" d="M832 1504v-1339l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41z" />
-<glyph unicode="&#xf08a;" horiz-adv-x="1792" d="M1664 940q0 81 -21.5 143t-55 98.5t-81.5 59.5t-94 31t-98 8t-112 -25.5t-110.5 -64t-86.5 -72t-60 -61.5q-18 -22 -49 -22t-49 22q-24 28 -60 61.5t-86.5 72t-110.5 64t-112 25.5t-98 -8t-94 -31t-81.5 -59.5t-55 -98.5t-21.5 -143q0 -168 187 -355l581 -560l580 559 q188 188 188 356zM1792 940q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5 q224 0 351 -124t127 -344z" />
-<glyph unicode="&#xf08b;" horiz-adv-x="1664" d="M640 96q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h320q13 0 22.5 -9.5t9.5 -22.5q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-66 0 -113 -47t-47 -113v-704 q0 -66 47 -113t113 -47h288h11h13t11.5 -1t11.5 -3t8 -5.5t7 -9t2 -13.5zM1568 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45z" />
-<glyph unicode="&#xf08c;" d="M237 122h231v694h-231v-694zM483 1030q-1 52 -36 86t-93 34t-94.5 -34t-36.5 -86q0 -51 35.5 -85.5t92.5 -34.5h1q59 0 95 34.5t36 85.5zM1068 122h231v398q0 154 -73 233t-193 79q-136 0 -209 -117h2v101h-231q3 -66 0 -694h231v388q0 38 7 56q15 35 45 59.5t74 24.5 q116 0 116 -157v-371zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf08d;" horiz-adv-x="1152" d="M480 672v448q0 14 -9 23t-23 9t-23 -9t-9 -23v-448q0 -14 9 -23t23 -9t23 9t9 23zM1152 320q0 -26 -19 -45t-45 -19h-429l-51 -483q-2 -12 -10.5 -20.5t-20.5 -8.5h-1q-27 0 -32 27l-76 485h-404q-26 0 -45 19t-19 45q0 123 78.5 221.5t177.5 98.5v512q-52 0 -90 38 t-38 90t38 90t90 38h640q52 0 90 -38t38 -90t-38 -90t-90 -38v-512q99 0 177.5 -98.5t78.5 -221.5z" />
-<glyph unicode="&#xf08e;" horiz-adv-x="1792" d="M1408 608v-320q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v320 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1792 1472v-512q0 -26 -19 -45t-45 -19t-45 19l-176 176l-652 -652q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l652 652l-176 176q-19 19 -19 45t19 45t45 19h512q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf090;" d="M1184 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45zM1536 992v-704q0 -119 -84.5 -203.5t-203.5 -84.5h-320q-13 0 -22.5 9.5t-9.5 22.5 q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q66 0 113 47t47 113v704q0 66 -47 113t-113 47h-288h-11h-13t-11.5 1t-11.5 3t-8 5.5t-7 9t-2 13.5q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf091;" horiz-adv-x="1664" d="M458 653q-74 162 -74 371h-256v-96q0 -78 94.5 -162t235.5 -113zM1536 928v96h-256q0 -209 -74 -371q141 29 235.5 113t94.5 162zM1664 1056v-128q0 -71 -41.5 -143t-112 -130t-173 -97.5t-215.5 -44.5q-42 -54 -95 -95q-38 -34 -52.5 -72.5t-14.5 -89.5q0 -54 30.5 -91 t97.5 -37q75 0 133.5 -45.5t58.5 -114.5v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 69 58.5 114.5t133.5 45.5q67 0 97.5 37t30.5 91q0 51 -14.5 89.5t-52.5 72.5q-53 41 -95 95q-113 5 -215.5 44.5t-173 97.5t-112 130t-41.5 143v128q0 40 28 68t68 28h288v96 q0 66 47 113t113 47h576q66 0 113 -47t47 -113v-96h288q40 0 68 -28t28 -68z" />
-<glyph unicode="&#xf092;" d="M394 184q-8 -9 -20 3q-13 11 -4 19q8 9 20 -3q12 -11 4 -19zM352 245q9 -12 0 -19q-8 -6 -17 7t0 18q9 7 17 -6zM291 305q-5 -7 -13 -2q-10 5 -7 12q3 5 13 2q10 -5 7 -12zM322 271q-6 -7 -16 3q-9 11 -2 16q6 6 16 -3q9 -11 2 -16zM451 159q-4 -12 -19 -6q-17 4 -13 15 t19 7q16 -5 13 -16zM514 154q0 -11 -16 -11q-17 -2 -17 11q0 11 16 11q17 2 17 -11zM572 164q2 -10 -14 -14t-18 8t14 15q16 2 18 -9zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-224q-16 0 -24.5 1t-19.5 5t-16 14.5t-5 27.5v239q0 97 -52 142q57 6 102.5 18t94 39 t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103 q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -103t0.5 -68q0 -22 -11 -33.5t-22 -13t-33 -1.5 h-224q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf093;" horiz-adv-x="1664" d="M1280 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 288v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h427q21 -56 70.5 -92 t110.5 -36h256q61 0 110.5 36t70.5 92h427q40 0 68 -28t28 -68zM1339 936q-17 -40 -59 -40h-256v-448q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v448h-256q-42 0 -59 40q-17 39 14 69l448 448q18 19 45 19t45 -19l448 -448q31 -30 14 -69z" />
-<glyph unicode="&#xf094;" d="M1407 710q0 44 -7 113.5t-18 96.5q-12 30 -17 44t-9 36.5t-4 48.5q0 23 5 68.5t5 67.5q0 37 -10 55q-4 1 -13 1q-19 0 -58 -4.5t-59 -4.5q-60 0 -176 24t-175 24q-43 0 -94.5 -11.5t-85 -23.5t-89.5 -34q-137 -54 -202 -103q-96 -73 -159.5 -189.5t-88 -236t-24.5 -248.5 q0 -40 12.5 -120t12.5 -121q0 -23 -11 -66.5t-11 -65.5t12 -36.5t34 -14.5q24 0 72.5 11t73.5 11q57 0 169.5 -15.5t169.5 -15.5q181 0 284 36q129 45 235.5 152.5t166 245.5t59.5 275zM1535 712q0 -165 -70 -327.5t-196 -288t-281 -180.5q-124 -44 -326 -44 q-57 0 -170 14.5t-169 14.5q-24 0 -72.5 -14.5t-73.5 -14.5q-73 0 -123.5 55.5t-50.5 128.5q0 24 11 68t11 67q0 40 -12.5 120.5t-12.5 121.5q0 111 18 217.5t54.5 209.5t100.5 194t150 156q78 59 232 120q194 78 316 78q60 0 175.5 -24t173.5 -24q19 0 57 5t58 5 q81 0 118 -50.5t37 -134.5q0 -23 -5 -68t-5 -68q0 -10 1 -18.5t3 -17t4 -13.5t6.5 -16t6.5 -17q16 -40 25 -118.5t9 -136.5z" />
-<glyph unicode="&#xf095;" horiz-adv-x="1408" d="M1408 296q0 -27 -10 -70.5t-21 -68.5q-21 -50 -122 -106q-94 -51 -186 -51q-27 0 -52.5 3.5t-57.5 12.5t-47.5 14.5t-55.5 20.5t-49 18q-98 35 -175 83q-128 79 -264.5 215.5t-215.5 264.5q-48 77 -83 175q-3 9 -18 49t-20.5 55.5t-14.5 47.5t-12.5 57.5t-3.5 52.5 q0 92 51 186q56 101 106 122q25 11 68.5 21t70.5 10q14 0 21 -3q18 -6 53 -76q11 -19 30 -54t35 -63.5t31 -53.5q3 -4 17.5 -25t21.5 -35.5t7 -28.5q0 -20 -28.5 -50t-62 -55t-62 -53t-28.5 -46q0 -9 5 -22.5t8.5 -20.5t14 -24t11.5 -19q76 -137 174 -235t235 -174 q2 -1 19 -11.5t24 -14t20.5 -8.5t22.5 -5q18 0 46 28.5t53 62t55 62t50 28.5q14 0 28.5 -7t35.5 -21.5t25 -17.5q25 -15 53.5 -31t63.5 -35t54 -30q70 -35 76 -53q3 -7 3 -21z" />
-<glyph unicode="&#xf096;" horiz-adv-x="1408" d="M1120 1280h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf097;" horiz-adv-x="1280" d="M1152 1280h-1024v-1242l423 406l89 85l89 -85l423 -406v1242zM1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289 q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
-<glyph unicode="&#xf098;" d="M1280 343q0 11 -2 16q-3 8 -38.5 29.5t-88.5 49.5l-53 29q-5 3 -19 13t-25 15t-21 5q-18 0 -47 -32.5t-57 -65.5t-44 -33q-7 0 -16.5 3.5t-15.5 6.5t-17 9.5t-14 8.5q-99 55 -170.5 126.5t-126.5 170.5q-2 3 -8.5 14t-9.5 17t-6.5 15.5t-3.5 16.5q0 13 20.5 33.5t45 38.5 t45 39.5t20.5 36.5q0 10 -5 21t-15 25t-13 19q-3 6 -15 28.5t-25 45.5t-26.5 47.5t-25 40.5t-16.5 18t-16 2q-48 0 -101 -22q-46 -21 -80 -94.5t-34 -130.5q0 -16 2.5 -34t5 -30.5t9 -33t10 -29.5t12.5 -33t11 -30q60 -164 216.5 -320.5t320.5 -216.5q6 -2 30 -11t33 -12.5 t29.5 -10t33 -9t30.5 -5t34 -2.5q57 0 130.5 34t94.5 80q22 53 22 101zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf099;" horiz-adv-x="1664" d="M1620 1128q-67 -98 -162 -167q1 -14 1 -42q0 -130 -38 -259.5t-115.5 -248.5t-184.5 -210.5t-258 -146t-323 -54.5q-271 0 -496 145q35 -4 78 -4q225 0 401 138q-105 2 -188 64.5t-114 159.5q33 -5 61 -5q43 0 85 11q-112 23 -185.5 111.5t-73.5 205.5v4q68 -38 146 -41 q-66 44 -105 115t-39 154q0 88 44 163q121 -149 294.5 -238.5t371.5 -99.5q-8 38 -8 74q0 134 94.5 228.5t228.5 94.5q140 0 236 -102q109 21 205 78q-37 -115 -142 -178q93 10 186 50z" />
-<glyph unicode="&#xf09a;" horiz-adv-x="768" d="M511 980h257l-30 -284h-227v-824h-341v824h-170v284h170v171q0 182 86 275.5t283 93.5h227v-284h-142q-39 0 -62.5 -6.5t-34 -23.5t-13.5 -34.5t-3 -49.5v-142z" />
-<glyph unicode="&#xf09b;" d="M1536 640q0 -251 -146.5 -451.5t-378.5 -277.5q-27 -5 -39.5 7t-12.5 30v211q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5 q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23 q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -89t0.5 -54q0 -18 -13 -30t-40 -7q-232 77 -378.5 277.5t-146.5 451.5q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf09c;" horiz-adv-x="1664" d="M1664 960v-256q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-192h96q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h672v192q0 185 131.5 316.5t316.5 131.5 t316.5 -131.5t131.5 -316.5z" />
-<glyph unicode="&#xf09d;" horiz-adv-x="1920" d="M1760 1408q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600zM160 1280q-13 0 -22.5 -9.5t-9.5 -22.5v-224h1664v224q0 13 -9.5 22.5t-22.5 9.5h-1600zM1760 0q13 0 22.5 9.5t9.5 22.5v608h-1664v-608 q0 -13 9.5 -22.5t22.5 -9.5h1600zM256 128v128h256v-128h-256zM640 128v128h384v-128h-384z" />
-<glyph unicode="&#xf09e;" horiz-adv-x="1408" d="M384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 69q2 -28 -17 -48q-18 -21 -47 -21h-135q-25 0 -43 16.5t-20 41.5q-22 229 -184.5 391.5t-391.5 184.5q-25 2 -41.5 20t-16.5 43v135q0 29 21 47q17 17 43 17h5q160 -13 306 -80.5 t259 -181.5q114 -113 181.5 -259t80.5 -306zM1408 67q2 -27 -18 -47q-18 -20 -46 -20h-143q-26 0 -44.5 17.5t-19.5 42.5q-12 215 -101 408.5t-231.5 336t-336 231.5t-408.5 102q-25 1 -42.5 19.5t-17.5 43.5v143q0 28 20 46q18 18 44 18h3q262 -13 501.5 -120t425.5 -294 q187 -186 294 -425.5t120 -501.5z" />
-<glyph unicode="&#xf0a0;" d="M1040 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1296 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1408 160v320q0 13 -9.5 22.5t-22.5 9.5 h-1216q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5zM178 640h1180l-157 482q-4 13 -16 21.5t-26 8.5h-782q-14 0 -26 -8.5t-16 -21.5zM1536 480v-320q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v320q0 25 16 75 l197 606q17 53 63 86t101 33h782q55 0 101 -33t63 -86l197 -606q16 -50 16 -75z" />
-<glyph unicode="&#xf0a1;" horiz-adv-x="1792" d="M1664 896q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5v-384q0 -52 -38 -90t-90 -38q-417 347 -812 380q-58 -19 -91 -66t-31 -100.5t40 -92.5q-20 -33 -23 -65.5t6 -58t33.5 -55t48 -50t61.5 -50.5q-29 -58 -111.5 -83t-168.5 -11.5t-132 55.5q-7 23 -29.5 87.5 t-32 94.5t-23 89t-15 101t3.5 98.5t22 110.5h-122q-66 0 -113 47t-47 113v192q0 66 47 113t113 47h480q435 0 896 384q52 0 90 -38t38 -90v-384zM1536 292v954q-394 -302 -768 -343v-270q377 -42 768 -341z" />
-<glyph unicode="&#xf0a2;" horiz-adv-x="1664" d="M848 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM183 128h1298q-164 181 -246.5 411.5t-82.5 484.5q0 256 -320 256t-320 -256q0 -254 -82.5 -484.5t-246.5 -411.5zM1664 128q0 -52 -38 -90t-90 -38 h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q190 161 287 397.5t97 498.5q0 165 96 262t264 117q-8 18 -8 37q0 40 28 68t68 28t68 -28t28 -68q0 -19 -8 -37q168 -20 264 -117t96 -262q0 -262 97 -498.5t287 -397.5z" />
-<glyph unicode="&#xf0a3;" d="M1376 640l138 -135q30 -28 20 -70q-12 -41 -52 -51l-188 -48l53 -186q12 -41 -19 -70q-29 -31 -70 -19l-186 53l-48 -188q-10 -40 -51 -52q-12 -2 -19 -2q-31 0 -51 22l-135 138l-135 -138q-28 -30 -70 -20q-41 11 -51 52l-48 188l-186 -53q-41 -12 -70 19q-31 29 -19 70 l53 186l-188 48q-40 10 -52 51q-10 42 20 70l138 135l-138 135q-30 28 -20 70q12 41 52 51l188 48l-53 186q-12 41 19 70q29 31 70 19l186 -53l48 188q10 41 51 51q41 12 70 -19l135 -139l135 139q29 30 70 19q41 -10 51 -51l48 -188l186 53q41 12 70 -19q31 -29 19 -70 l-53 -186l188 -48q40 -10 52 -51q10 -42 -20 -70z" />
-<glyph unicode="&#xf0a4;" horiz-adv-x="1792" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 768q0 51 -39 89.5t-89 38.5h-576q0 20 15 48.5t33 55t33 68t15 84.5q0 67 -44.5 97.5t-115.5 30.5q-24 0 -90 -139q-24 -44 -37 -65q-40 -64 -112 -145q-71 -81 -101 -106 q-69 -57 -140 -57h-32v-640h32q72 0 167 -32t193.5 -64t179.5 -32q189 0 189 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5h331q52 0 90 38t38 90zM1792 769q0 -105 -75.5 -181t-180.5 -76h-169q-4 -62 -37 -119q3 -21 3 -43 q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5q-133 0 -322 69q-164 59 -223 59h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h288q10 0 21.5 4.5t23.5 14t22.5 18t24 22.5t20.5 21.5t19 21.5t14 17q65 74 100 129q13 21 33 62t37 72t40.5 63t55 49.5 t69.5 17.5q125 0 206.5 -67t81.5 -189q0 -68 -22 -128h374q104 0 180 -76t76 -179z" />
-<glyph unicode="&#xf0a5;" horiz-adv-x="1792" d="M1376 128h32v640h-32q-35 0 -67.5 12t-62.5 37t-50 46t-49 54q-2 3 -3.5 4.5t-4 4.5t-4.5 5q-72 81 -112 145q-14 22 -38 68q-1 3 -10.5 22.5t-18.5 36t-20 35.5t-21.5 30.5t-18.5 11.5q-71 0 -115.5 -30.5t-44.5 -97.5q0 -43 15 -84.5t33 -68t33 -55t15 -48.5h-576 q-50 0 -89 -38.5t-39 -89.5q0 -52 38 -90t90 -38h331q-15 -17 -25 -47.5t-10 -55.5q0 -69 53 -119q-18 -32 -18 -69t17.5 -73.5t47.5 -52.5q-4 -24 -4 -56q0 -85 48.5 -126t135.5 -41q84 0 183 32t194 64t167 32zM1664 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45 t45 -19t45 19t19 45zM1792 768v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-288q-59 0 -223 -59q-190 -69 -317 -69q-142 0 -230 77.5t-87 217.5l1 5q-61 76 -61 178q0 22 3 43q-33 57 -37 119h-169q-105 0 -180.5 76t-75.5 181q0 103 76 179t180 76h374q-22 60 -22 128 q0 122 81.5 189t206.5 67q38 0 69.5 -17.5t55 -49.5t40.5 -63t37 -72t33 -62q35 -55 100 -129q2 -3 14 -17t19 -21.5t20.5 -21.5t24 -22.5t22.5 -18t23.5 -14t21.5 -4.5h288q53 0 90.5 -37.5t37.5 -90.5z" />
-<glyph unicode="&#xf0a6;" d="M1280 -64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 700q0 189 -167 189q-26 0 -56 -5q-16 30 -52.5 47.5t-73.5 17.5t-69 -18q-50 53 -119 53q-25 0 -55.5 -10t-47.5 -25v331q0 52 -38 90t-90 38q-51 0 -89.5 -39t-38.5 -89v-576 q-20 0 -48.5 15t-55 33t-68 33t-84.5 15q-67 0 -97.5 -44.5t-30.5 -115.5q0 -24 139 -90q44 -24 65 -37q64 -40 145 -112q81 -71 106 -101q57 -69 57 -140v-32h640v32q0 72 32 167t64 193.5t32 179.5zM1536 705q0 -133 -69 -322q-59 -164 -59 -223v-288q0 -53 -37.5 -90.5 t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5v288q0 10 -4.5 21.5t-14 23.5t-18 22.5t-22.5 24t-21.5 20.5t-21.5 19t-17 14q-74 65 -129 100q-21 13 -62 33t-72 37t-63 40.5t-49.5 55t-17.5 69.5q0 125 67 206.5t189 81.5q68 0 128 -22v374q0 104 76 180t179 76 q105 0 181 -75.5t76 -180.5v-169q62 -4 119 -37q21 3 43 3q101 0 178 -60q139 1 219.5 -85t80.5 -227z" />
-<glyph unicode="&#xf0a7;" d="M1408 576q0 84 -32 183t-64 194t-32 167v32h-640v-32q0 -35 -12 -67.5t-37 -62.5t-46 -50t-54 -49q-9 -8 -14 -12q-81 -72 -145 -112q-22 -14 -68 -38q-3 -1 -22.5 -10.5t-36 -18.5t-35.5 -20t-30.5 -21.5t-11.5 -18.5q0 -71 30.5 -115.5t97.5 -44.5q43 0 84.5 15t68 33 t55 33t48.5 15v-576q0 -50 38.5 -89t89.5 -39q52 0 90 38t38 90v331q46 -35 103 -35q69 0 119 53q32 -18 69 -18t73.5 17.5t52.5 47.5q24 -4 56 -4q85 0 126 48.5t41 135.5zM1280 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 580 q0 -142 -77.5 -230t-217.5 -87l-5 1q-76 -61 -178 -61q-22 0 -43 3q-54 -30 -119 -37v-169q0 -105 -76 -180.5t-181 -75.5q-103 0 -179 76t-76 180v374q-54 -22 -128 -22q-121 0 -188.5 81.5t-67.5 206.5q0 38 17.5 69.5t49.5 55t63 40.5t72 37t62 33q55 35 129 100 q3 2 17 14t21.5 19t21.5 20.5t22.5 24t18 22.5t14 23.5t4.5 21.5v288q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-288q0 -59 59 -223q69 -190 69 -317z" />
-<glyph unicode="&#xf0a8;" d="M1280 576v128q0 26 -19 45t-45 19h-502l189 189q19 19 19 45t-19 45l-91 91q-18 18 -45 18t-45 -18l-362 -362l-91 -91q-18 -18 -18 -45t18 -45l91 -91l362 -362q18 -18 45 -18t45 18l91 91q18 18 18 45t-18 45l-189 189h502q26 0 45 19t19 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf0a9;" d="M1285 640q0 27 -18 45l-91 91l-362 362q-18 18 -45 18t-45 -18l-91 -91q-18 -18 -18 -45t18 -45l189 -189h-502q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h502l-189 -189q-19 -19 -19 -45t19 -45l91 -91q18 -18 45 -18t45 18l362 362l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf0aa;" d="M1284 641q0 27 -18 45l-362 362l-91 91q-18 18 -45 18t-45 -18l-91 -91l-362 -362q-18 -18 -18 -45t18 -45l91 -91q18 -18 45 -18t45 18l189 189v-502q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v502l189 -189q19 -19 45 -19t45 19l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf0ab;" d="M1284 639q0 27 -18 45l-91 91q-18 18 -45 18t-45 -18l-189 -189v502q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-502l-189 189q-19 19 -45 19t-45 -19l-91 -91q-18 -18 -18 -45t18 -45l362 -362l91 -91q18 -18 45 -18t45 18l91 91l362 362q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf0ac;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1042 887q-2 -1 -9.5 -9.5t-13.5 -9.5q2 0 4.5 5t5 11t3.5 7q6 7 22 15q14 6 52 12q34 8 51 -11 q-2 2 9.5 13t14.5 12q3 2 15 4.5t15 7.5l2 22q-12 -1 -17.5 7t-6.5 21q0 -2 -6 -8q0 7 -4.5 8t-11.5 -1t-9 -1q-10 3 -15 7.5t-8 16.5t-4 15q-2 5 -9.5 10.5t-9.5 10.5q-1 2 -2.5 5.5t-3 6.5t-4 5.5t-5.5 2.5t-7 -5t-7.5 -10t-4.5 -5q-3 2 -6 1.5t-4.5 -1t-4.5 -3t-5 -3.5 q-3 -2 -8.5 -3t-8.5 -2q15 5 -1 11q-10 4 -16 3q9 4 7.5 12t-8.5 14h5q-1 4 -8.5 8.5t-17.5 8.5t-13 6q-8 5 -34 9.5t-33 0.5q-5 -6 -4.5 -10.5t4 -14t3.5 -12.5q1 -6 -5.5 -13t-6.5 -12q0 -7 14 -15.5t10 -21.5q-3 -8 -16 -16t-16 -12q-5 -8 -1.5 -18.5t10.5 -16.5 q2 -2 1.5 -4t-3.5 -4.5t-5.5 -4t-6.5 -3.5l-3 -2q-11 -5 -20.5 6t-13.5 26q-7 25 -16 30q-23 8 -29 -1q-5 13 -41 26q-25 9 -58 4q6 1 0 15q-7 15 -19 12q3 6 4 17.5t1 13.5q3 13 12 23q1 1 7 8.5t9.5 13.5t0.5 6q35 -4 50 11q5 5 11.5 17t10.5 17q9 6 14 5.5t14.5 -5.5 t14.5 -5q14 -1 15.5 11t-7.5 20q12 -1 3 17q-5 7 -8 9q-12 4 -27 -5q-8 -4 2 -8q-1 1 -9.5 -10.5t-16.5 -17.5t-16 5q-1 1 -5.5 13.5t-9.5 13.5q-8 0 -16 -15q3 8 -11 15t-24 8q19 12 -8 27q-7 4 -20.5 5t-19.5 -4q-5 -7 -5.5 -11.5t5 -8t10.5 -5.5t11.5 -4t8.5 -3 q14 -10 8 -14q-2 -1 -8.5 -3.5t-11.5 -4.5t-6 -4q-3 -4 0 -14t-2 -14q-5 5 -9 17.5t-7 16.5q7 -9 -25 -6l-10 1q-4 0 -16 -2t-20.5 -1t-13.5 8q-4 8 0 20q1 4 4 2q-4 3 -11 9.5t-10 8.5q-46 -15 -94 -41q6 -1 12 1q5 2 13 6.5t10 5.5q34 14 42 7l5 5q14 -16 20 -25 q-7 4 -30 1q-20 -6 -22 -12q7 -12 5 -18q-4 3 -11.5 10t-14.5 11t-15 5q-16 0 -22 -1q-146 -80 -235 -222q7 -7 12 -8q4 -1 5 -9t2.5 -11t11.5 3q9 -8 3 -19q1 1 44 -27q19 -17 21 -21q3 -11 -10 -18q-1 2 -9 9t-9 4q-3 -5 0.5 -18.5t10.5 -12.5q-7 0 -9.5 -16t-2.5 -35.5 t-1 -23.5l2 -1q-3 -12 5.5 -34.5t21.5 -19.5q-13 -3 20 -43q6 -8 8 -9q3 -2 12 -7.5t15 -10t10 -10.5q4 -5 10 -22.5t14 -23.5q-2 -6 9.5 -20t10.5 -23q-1 0 -2.5 -1t-2.5 -1q3 -7 15.5 -14t15.5 -13q1 -3 2 -10t3 -11t8 -2q2 20 -24 62q-15 25 -17 29q-3 5 -5.5 15.5 t-4.5 14.5q2 0 6 -1.5t8.5 -3.5t7.5 -4t2 -3q-3 -7 2 -17.5t12 -18.5t17 -19t12 -13q6 -6 14 -19.5t0 -13.5q9 0 20 -10t17 -20q5 -8 8 -26t5 -24q2 -7 8.5 -13.5t12.5 -9.5l16 -8t13 -7q5 -2 18.5 -10.5t21.5 -11.5q10 -4 16 -4t14.5 2.5t13.5 3.5q15 2 29 -15t21 -21 q36 -19 55 -11q-2 -1 0.5 -7.5t8 -15.5t9 -14.5t5.5 -8.5q5 -6 18 -15t18 -15q6 4 7 9q-3 -8 7 -20t18 -10q14 3 14 32q-31 -15 -49 18q0 1 -2.5 5.5t-4 8.5t-2.5 8.5t0 7.5t5 3q9 0 10 3.5t-2 12.5t-4 13q-1 8 -11 20t-12 15q-5 -9 -16 -8t-16 9q0 -1 -1.5 -5.5t-1.5 -6.5 q-13 0 -15 1q1 3 2.5 17.5t3.5 22.5q1 4 5.5 12t7.5 14.5t4 12.5t-4.5 9.5t-17.5 2.5q-19 -1 -26 -20q-1 -3 -3 -10.5t-5 -11.5t-9 -7q-7 -3 -24 -2t-24 5q-13 8 -22.5 29t-9.5 37q0 10 2.5 26.5t3 25t-5.5 24.5q3 2 9 9.5t10 10.5q2 1 4.5 1.5t4.5 0t4 1.5t3 6q-1 1 -4 3 q-3 3 -4 3q7 -3 28.5 1.5t27.5 -1.5q15 -11 22 2q0 1 -2.5 9.5t-0.5 13.5q5 -27 29 -9q3 -3 15.5 -5t17.5 -5q3 -2 7 -5.5t5.5 -4.5t5 0.5t8.5 6.5q10 -14 12 -24q11 -40 19 -44q7 -3 11 -2t4.5 9.5t0 14t-1.5 12.5l-1 8v18l-1 8q-15 3 -18.5 12t1.5 18.5t15 18.5q1 1 8 3.5 t15.5 6.5t12.5 8q21 19 15 35q7 0 11 9q-1 0 -5 3t-7.5 5t-4.5 2q9 5 2 16q5 3 7.5 11t7.5 10q9 -12 21 -2q7 8 1 16q5 7 20.5 10.5t18.5 9.5q7 -2 8 2t1 12t3 12q4 5 15 9t13 5l17 11q3 4 0 4q18 -2 31 11q10 11 -6 20q3 6 -3 9.5t-15 5.5q3 1 11.5 0.5t10.5 1.5 q15 10 -7 16q-17 5 -43 -12zM879 10q206 36 351 189q-3 3 -12.5 4.5t-12.5 3.5q-18 7 -24 8q1 7 -2.5 13t-8 9t-12.5 8t-11 7q-2 2 -7 6t-7 5.5t-7.5 4.5t-8.5 2t-10 -1l-3 -1q-3 -1 -5.5 -2.5t-5.5 -3t-4 -3t0 -2.5q-21 17 -36 22q-5 1 -11 5.5t-10.5 7t-10 1.5t-11.5 -7 q-5 -5 -6 -15t-2 -13q-7 5 0 17.5t2 18.5q-3 6 -10.5 4.5t-12 -4.5t-11.5 -8.5t-9 -6.5t-8.5 -5.5t-8.5 -7.5q-3 -4 -6 -12t-5 -11q-2 4 -11.5 6.5t-9.5 5.5q2 -10 4 -35t5 -38q7 -31 -12 -48q-27 -25 -29 -40q-4 -22 12 -26q0 -7 -8 -20.5t-7 -21.5q0 -6 2 -16z" />
-<glyph unicode="&#xf0ad;" horiz-adv-x="1664" d="M384 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1028 484l-682 -682q-37 -37 -90 -37q-52 0 -91 37l-106 108q-38 36 -38 90q0 53 38 91l681 681q39 -98 114.5 -173.5t173.5 -114.5zM1662 919q0 -39 -23 -106q-47 -134 -164.5 -217.5 t-258.5 -83.5q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q58 0 121.5 -16.5t107.5 -46.5q16 -11 16 -28t-16 -28l-293 -169v-224l193 -107q5 3 79 48.5t135.5 81t70.5 35.5q15 0 23.5 -10t8.5 -25z" />
-<glyph unicode="&#xf0ae;" horiz-adv-x="1792" d="M1024 128h640v128h-640v-128zM640 640h1024v128h-1024v-128zM1280 1152h384v128h-384v-128zM1792 320v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 832v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19 t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf0b0;" horiz-adv-x="1408" d="M1403 1241q17 -41 -14 -70l-493 -493v-742q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-256 256q-19 19 -19 45v486l-493 493q-31 29 -14 70q17 39 59 39h1280q42 0 59 -39z" />
-<glyph unicode="&#xf0b1;" horiz-adv-x="1792" d="M640 1280h512v128h-512v-128zM1792 640v-480q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v480h672v-160q0 -26 19 -45t45 -19h320q26 0 45 19t19 45v160h672zM1024 640v-128h-256v128h256zM1792 1120v-384h-1792v384q0 66 47 113t113 47h352v160q0 40 28 68 t68 28h576q40 0 68 -28t28 -68v-160h352q66 0 113 -47t47 -113z" />
-<glyph unicode="&#xf0b2;" d="M1283 995l-355 -355l355 -355l144 144q29 31 70 14q39 -17 39 -59v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l144 144l-355 355l-355 -355l144 -144q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l144 -144 l355 355l-355 355l-144 -144q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v448q0 26 19 45t45 19h448q42 0 59 -40q17 -39 -14 -69l-144 -144l355 -355l355 355l-144 144q-31 30 -14 69q17 40 59 40h448q26 0 45 -19t19 -45v-448q0 -42 -39 -59q-13 -5 -25 -5q-26 0 -45 19z " />
-<glyph unicode="&#xf0c0;" horiz-adv-x="1920" d="M593 640q-162 -5 -265 -128h-134q-82 0 -138 40.5t-56 118.5q0 353 124 353q6 0 43.5 -21t97.5 -42.5t119 -21.5q67 0 133 23q-5 -37 -5 -66q0 -139 81 -256zM1664 3q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5 t43 97.5t62 81t85.5 53.5t111.5 20q10 0 43 -21.5t73 -48t107 -48t135 -21.5t135 21.5t107 48t73 48t43 21.5q61 0 111.5 -20t85.5 -53.5t62 -81t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM640 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75 t75 -181zM1344 896q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5zM1920 671q0 -78 -56 -118.5t-138 -40.5h-134q-103 123 -265 128q81 117 81 256q0 29 -5 66q66 -23 133 -23q59 0 119 21.5t97.5 42.5 t43.5 21q124 0 124 -353zM1792 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181z" />
-<glyph unicode="&#xf0c1;" horiz-adv-x="1664" d="M1456 320q0 40 -28 68l-208 208q-28 28 -68 28q-42 0 -72 -32q3 -3 19 -18.5t21.5 -21.5t15 -19t13 -25.5t3.5 -27.5q0 -40 -28 -68t-68 -28q-15 0 -27.5 3.5t-25.5 13t-19 15t-21.5 21.5t-18.5 19q-33 -31 -33 -73q0 -40 28 -68l206 -207q27 -27 68 -27q40 0 68 26 l147 146q28 28 28 67zM753 1025q0 40 -28 68l-206 207q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l208 -208q27 -27 68 -27q42 0 72 31q-3 3 -19 18.5t-21.5 21.5t-15 19t-13 25.5t-3.5 27.5q0 40 28 68t68 28q15 0 27.5 -3.5t25.5 -13t19 -15 t21.5 -21.5t18.5 -19q33 31 33 73zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-206 207q-83 83 -83 203q0 123 88 209l-88 88q-86 -88 -208 -88q-120 0 -204 84l-208 208q-84 84 -84 204t85 203l147 146q83 83 203 83q121 0 204 -85l206 -207 q83 -83 83 -203q0 -123 -88 -209l88 -88q86 88 208 88q120 0 204 -84l208 -208q84 -84 84 -204z" />
-<glyph unicode="&#xf0c2;" horiz-adv-x="1920" d="M1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088q-185 0 -316.5 131.5t-131.5 316.5q0 132 71 241.5t187 163.5q-2 28 -2 43q0 212 150 362t362 150q158 0 286.5 -88t187.5 -230q70 62 166 62q106 0 181 -75t75 -181q0 -75 -41 -138q129 -30 213 -134.5t84 -239.5z " />
-<glyph unicode="&#xf0c3;" horiz-adv-x="1664" d="M1527 88q56 -89 21.5 -152.5t-140.5 -63.5h-1152q-106 0 -140.5 63.5t21.5 152.5l503 793v399h-64q-26 0 -45 19t-19 45t19 45t45 19h512q26 0 45 -19t19 -45t-19 -45t-45 -19h-64v-399zM748 813l-272 -429h712l-272 429l-20 31v37v399h-128v-399v-37z" />
-<glyph unicode="&#xf0c4;" horiz-adv-x="1792" d="M960 640q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1260 576l507 -398q28 -20 25 -56q-5 -35 -35 -51l-128 -64q-13 -7 -29 -7q-17 0 -31 8l-690 387l-110 -66q-8 -4 -12 -5q14 -49 10 -97q-7 -77 -56 -147.5t-132 -123.5q-132 -84 -277 -84 q-136 0 -222 78q-90 84 -79 207q7 76 56 147t131 124q132 84 278 84q83 0 151 -31q9 13 22 22l122 73l-122 73q-13 9 -22 22q-68 -31 -151 -31q-146 0 -278 84q-82 53 -131 124t-56 147q-5 59 15.5 113t63.5 93q85 79 222 79q145 0 277 -84q83 -52 132 -123t56 -148 q4 -48 -10 -97q4 -1 12 -5l110 -66l690 387q14 8 31 8q16 0 29 -7l128 -64q30 -16 35 -51q3 -36 -25 -56zM579 836q46 42 21 108t-106 117q-92 59 -192 59q-74 0 -113 -36q-46 -42 -21 -108t106 -117q92 -59 192 -59q74 0 113 36zM494 91q81 51 106 117t-21 108 q-39 36 -113 36q-100 0 -192 -59q-81 -51 -106 -117t21 -108q39 -36 113 -36q100 0 192 59zM672 704l96 -58v11q0 36 33 56l14 8l-79 47l-26 -26q-3 -3 -10 -11t-12 -12q-2 -2 -4 -3.5t-3 -2.5zM896 480l96 -32l736 576l-128 64l-768 -431v-113l-160 -96l9 -8q2 -2 7 -6 q4 -4 11 -12t11 -12l26 -26zM1600 64l128 64l-520 408l-177 -138q-2 -3 -13 -7z" />
-<glyph unicode="&#xf0c5;" horiz-adv-x="1792" d="M1696 1152q40 0 68 -28t28 -68v-1216q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v288h-544q-40 0 -68 28t-28 68v672q0 40 20 88t48 76l408 408q28 28 76 48t88 20h416q40 0 68 -28t28 -68v-328q68 40 128 40h416zM1152 939l-299 -299h299v299zM512 1323l-299 -299 h299v299zM708 676l316 316v416h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h512v256q0 40 20 88t48 76zM1664 -128v1152h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h896z" />
-<glyph unicode="&#xf0c6;" horiz-adv-x="1408" d="M1404 151q0 -117 -79 -196t-196 -79q-135 0 -235 100l-777 776q-113 115 -113 271q0 159 110 270t269 111q158 0 273 -113l605 -606q10 -10 10 -22q0 -16 -30.5 -46.5t-46.5 -30.5q-13 0 -23 10l-606 607q-79 77 -181 77q-106 0 -179 -75t-73 -181q0 -105 76 -181 l776 -777q63 -63 145 -63q64 0 106 42t42 106q0 82 -63 145l-581 581q-26 24 -60 24q-29 0 -48 -19t-19 -48q0 -32 25 -59l410 -410q10 -10 10 -22q0 -16 -31 -47t-47 -31q-12 0 -22 10l-410 410q-63 61 -63 149q0 82 57 139t139 57q88 0 149 -63l581 -581q100 -98 100 -235 z" />
-<glyph unicode="&#xf0c7;" d="M384 0h768v384h-768v-384zM1280 0h128v896q0 14 -10 38.5t-20 34.5l-281 281q-10 10 -34 20t-39 10v-416q0 -40 -28 -68t-68 -28h-576q-40 0 -68 28t-28 68v416h-128v-1280h128v416q0 40 28 68t68 28h832q40 0 68 -28t28 -68v-416zM896 928v320q0 13 -9.5 22.5t-22.5 9.5 h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5zM1536 896v-928q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h928q40 0 88 -20t76 -48l280 -280q28 -28 48 -76t20 -88z" />
-<glyph unicode="&#xf0c8;" d="M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf0c9;" d="M1536 192v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 704v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 1216v-128q0 -26 -19 -45 t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf0ca;" horiz-adv-x="1792" d="M384 128q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 640q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1152q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z M1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
-<glyph unicode="&#xf0cb;" horiz-adv-x="1792" d="M381 -84q0 -80 -54.5 -126t-135.5 -46q-106 0 -172 66l57 88q49 -45 106 -45q29 0 50.5 14.5t21.5 42.5q0 64 -105 56l-26 56q8 10 32.5 43.5t42.5 54t37 38.5v1q-16 0 -48.5 -1t-48.5 -1v-53h-106v152h333v-88l-95 -115q51 -12 81 -49t30 -88zM383 543v-159h-362 q-6 36 -6 54q0 51 23.5 93t56.5 68t66 47.5t56.5 43.5t23.5 45q0 25 -14.5 38.5t-39.5 13.5q-46 0 -81 -58l-85 59q24 51 71.5 79.5t105.5 28.5q73 0 123 -41.5t50 -112.5q0 -50 -34 -91.5t-75 -64.5t-75.5 -50.5t-35.5 -52.5h127v60h105zM1792 224v-192q0 -13 -9.5 -22.5 t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1123v-99h-335v99h107q0 41 0.5 122t0.5 121v12h-2q-8 -17 -50 -54l-71 76l136 127h106v-404h108zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5 t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
-<glyph unicode="&#xf0cc;" horiz-adv-x="1792" d="M1760 640q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1728q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h1728zM483 704q-28 35 -51 80q-48 97 -48 188q0 181 134 309q133 127 393 127q50 0 167 -19q66 -12 177 -48q10 -38 21 -118q14 -123 14 -183q0 -18 -5 -45l-12 -3l-84 6 l-14 2q-50 149 -103 205q-88 91 -210 91q-114 0 -182 -59q-67 -58 -67 -146q0 -73 66 -140t279 -129q69 -20 173 -66q58 -28 95 -52h-743zM990 448h411q7 -39 7 -92q0 -111 -41 -212q-23 -55 -71 -104q-37 -35 -109 -81q-80 -48 -153 -66q-80 -21 -203 -21q-114 0 -195 23 l-140 40q-57 16 -72 28q-8 8 -8 22v13q0 108 -2 156q-1 30 0 68l2 37v44l102 2q15 -34 30 -71t22.5 -56t12.5 -27q35 -57 80 -94q43 -36 105 -57q59 -22 132 -22q64 0 139 27q77 26 122 86q47 61 47 129q0 84 -81 157q-34 29 -137 71z" />
-<glyph unicode="&#xf0cd;" d="M48 1313q-37 2 -45 4l-3 88q13 1 40 1q60 0 112 -4q132 -7 166 -7q86 0 168 3q116 4 146 5q56 0 86 2l-1 -14l2 -64v-9q-60 -9 -124 -9q-60 0 -79 -25q-13 -14 -13 -132q0 -13 0.5 -32.5t0.5 -25.5l1 -229l14 -280q6 -124 51 -202q35 -59 96 -92q88 -47 177 -47 q104 0 191 28q56 18 99 51q48 36 65 64q36 56 53 114q21 73 21 229q0 79 -3.5 128t-11 122.5t-13.5 159.5l-4 59q-5 67 -24 88q-34 35 -77 34l-100 -2l-14 3l2 86h84l205 -10q76 -3 196 10l18 -2q6 -38 6 -51q0 -7 -4 -31q-45 -12 -84 -13q-73 -11 -79 -17q-15 -15 -15 -41 q0 -7 1.5 -27t1.5 -31q8 -19 22 -396q6 -195 -15 -304q-15 -76 -41 -122q-38 -65 -112 -123q-75 -57 -182 -89q-109 -33 -255 -33q-167 0 -284 46q-119 47 -179 122q-61 76 -83 195q-16 80 -16 237v333q0 188 -17 213q-25 36 -147 39zM1536 -96v64q0 14 -9 23t-23 9h-1472 q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h1472q14 0 23 9t9 23z" />
-<glyph unicode="&#xf0ce;" horiz-adv-x="1664" d="M512 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23 v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 160v192 q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192 q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1664 1248v-1088q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1344q66 0 113 -47t47 -113 z" />
-<glyph unicode="&#xf0d0;" horiz-adv-x="1664" d="M1190 955l293 293l-107 107l-293 -293zM1637 1248q0 -27 -18 -45l-1286 -1286q-18 -18 -45 -18t-45 18l-198 198q-18 18 -18 45t18 45l1286 1286q18 18 45 18t45 -18l198 -198q18 -18 18 -45zM286 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM636 1276 l196 -60l-196 -60l-60 -196l-60 196l-196 60l196 60l60 196zM1566 798l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM926 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98z" />
-<glyph unicode="&#xf0d1;" horiz-adv-x="1792" d="M640 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM256 640h384v256h-158q-13 0 -22 -9l-195 -195q-9 -9 -9 -22v-30zM1536 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM1792 1216v-1024q0 -15 -4 -26.5t-13.5 -18.5 t-16.5 -11.5t-23.5 -6t-22.5 -2t-25.5 0t-22.5 0.5q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-64q-3 0 -22.5 -0.5t-25.5 0t-22.5 2t-23.5 6t-16.5 11.5t-13.5 18.5t-4 26.5q0 26 19 45t45 19v320q0 8 -0.5 35t0 38 t2.5 34.5t6.5 37t14 30.5t22.5 30l198 198q19 19 50.5 32t58.5 13h160v192q0 26 19 45t45 19h1024q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf0d2;" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103q-111 0 -218 32q59 93 78 164q9 34 54 211q20 -39 73 -67.5t114 -28.5q121 0 216 68.5t147 188.5t52 270q0 114 -59.5 214t-172.5 163t-255 63q-105 0 -196 -29t-154.5 -77t-109 -110.5t-67 -129.5t-21.5 -134 q0 -104 40 -183t117 -111q30 -12 38 20q2 7 8 31t8 30q6 23 -11 43q-51 61 -51 151q0 151 104.5 259.5t273.5 108.5q151 0 235.5 -82t84.5 -213q0 -170 -68.5 -289t-175.5 -119q-61 0 -98 43.5t-23 104.5q8 35 26.5 93.5t30 103t11.5 75.5q0 50 -27 83t-77 33 q-62 0 -105 -57t-43 -142q0 -73 25 -122l-99 -418q-17 -70 -13 -177q-206 91 -333 281t-127 423q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf0d3;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-725q85 122 108 210q9 34 53 209q21 -39 73.5 -67t112.5 -28q181 0 295.5 147.5t114.5 373.5q0 84 -35 162.5t-96.5 139t-152.5 97t-197 36.5q-104 0 -194.5 -28.5t-153 -76.5 t-107.5 -109.5t-66.5 -128t-21.5 -132.5q0 -102 39.5 -180t116.5 -110q13 -5 23.5 0t14.5 19q10 44 15 61q6 23 -11 42q-50 62 -50 150q0 150 103.5 256.5t270.5 106.5q149 0 232.5 -81t83.5 -210q0 -168 -67.5 -286t-173.5 -118q-60 0 -97 43.5t-23 103.5q8 34 26.5 92.5 t29.5 102t11 74.5q0 49 -26.5 81.5t-75.5 32.5q-61 0 -103.5 -56.5t-42.5 -139.5q0 -72 24 -121l-98 -414q-24 -100 -7 -254h-183q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960z" />
-<glyph unicode="&#xf0d4;" d="M678 -57q0 -38 -10 -71h-380q-95 0 -171.5 56.5t-103.5 147.5q24 45 69 77.5t100 49.5t107 24t107 7q32 0 49 -2q6 -4 30.5 -21t33 -23t31 -23t32 -25.5t27.5 -25.5t26.5 -29.5t21 -30.5t17.5 -34.5t9.5 -36t4.5 -40.5zM385 294q-234 -7 -385 -85v433q103 -118 273 -118 q32 0 70 5q-21 -61 -21 -86q0 -67 63 -149zM558 805q0 -100 -43.5 -160.5t-140.5 -60.5q-51 0 -97 26t-78 67.5t-56 93.5t-35.5 104t-11.5 99q0 96 51.5 165t144.5 69q66 0 119 -41t84 -104t47 -130t16 -128zM1536 896v-736q0 -119 -84.5 -203.5t-203.5 -84.5h-468 q39 73 39 157q0 66 -22 122.5t-55.5 93t-72 71t-72 59.5t-55.5 54.5t-22 59.5q0 36 23 68t56 61.5t65.5 64.5t55.5 93t23 131t-26.5 145.5t-75.5 118.5q-6 6 -14 11t-12.5 7.5t-10 9.5t-10.5 17h135l135 64h-437q-138 0 -244.5 -38.5t-182.5 -133.5q0 126 81 213t207 87h960 q119 0 203.5 -84.5t84.5 -203.5v-96h-256v256h-128v-256h-256v-128h256v-256h128v256h256z" />
-<glyph unicode="&#xf0d5;" horiz-adv-x="1664" d="M876 71q0 21 -4.5 40.5t-9.5 36t-17.5 34.5t-21 30.5t-26.5 29.5t-27.5 25.5t-32 25.5t-31 23t-33 23t-30.5 21q-17 2 -50 2q-54 0 -106 -7t-108 -25t-98 -46t-69 -75t-27 -107q0 -68 35.5 -121.5t93 -84t120.5 -45.5t127 -15q59 0 112.5 12.5t100.5 39t74.5 73.5 t27.5 110zM756 933q0 60 -16.5 127.5t-47 130.5t-84 104t-119.5 41q-93 0 -144 -69t-51 -165q0 -47 11.5 -99t35.5 -104t56 -93.5t78 -67.5t97 -26q97 0 140.5 60.5t43.5 160.5zM625 1408h437l-135 -79h-135q71 -45 110 -126t39 -169q0 -74 -23 -131.5t-56 -92.5t-66 -64.5 t-56 -61t-23 -67.5q0 -26 16.5 -51t43 -48t58.5 -48t64 -55.5t58.5 -66t43 -85t16.5 -106.5q0 -160 -140 -282q-152 -131 -420 -131q-59 0 -119.5 10t-122 33.5t-108.5 58t-77 89t-30 121.5q0 61 37 135q32 64 96 110.5t145 71t155 36t150 13.5q-64 83 -64 149q0 12 2 23.5 t5 19.5t8 21.5t7 21.5q-40 -5 -70 -5q-149 0 -255.5 98t-106.5 246q0 140 95 250.5t234 141.5q94 20 187 20zM1664 1152v-128h-256v-256h-128v256h-256v128h256v256h128v-256h256z" />
-<glyph unicode="&#xf0d6;" horiz-adv-x="1920" d="M768 384h384v96h-128v448h-114l-148 -137l77 -80q42 37 55 57h2v-288h-128v-96zM1280 640q0 -70 -21 -142t-59.5 -134t-101.5 -101t-138 -39t-138 39t-101.5 101t-59.5 134t-21 142t21 142t59.5 134t101.5 101t138 39t138 -39t101.5 -101t59.5 -134t21 -142zM1792 384 v512q-106 0 -181 75t-75 181h-1152q0 -106 -75 -181t-181 -75v-512q106 0 181 -75t75 -181h1152q0 106 75 181t181 75zM1920 1216v-1152q0 -26 -19 -45t-45 -19h-1792q-26 0 -45 19t-19 45v1152q0 26 19 45t45 19h1792q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf0d7;" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf0d8;" horiz-adv-x="1024" d="M1024 320q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
-<glyph unicode="&#xf0d9;" horiz-adv-x="640" d="M640 1088v-896q0 -26 -19 -45t-45 -19t-45 19l-448 448q-19 19 -19 45t19 45l448 448q19 19 45 19t45 -19t19 -45z" />
-<glyph unicode="&#xf0da;" horiz-adv-x="640" d="M576 640q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19t-19 45v896q0 26 19 45t45 19t45 -19l448 -448q19 -19 19 -45z" />
-<glyph unicode="&#xf0db;" horiz-adv-x="1664" d="M160 0h608v1152h-640v-1120q0 -13 9.5 -22.5t22.5 -9.5zM1536 32v1120h-640v-1152h608q13 0 22.5 9.5t9.5 22.5zM1664 1248v-1216q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1344q66 0 113 -47t47 -113z" />
-<glyph unicode="&#xf0dc;" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45zM1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
-<glyph unicode="&#xf0dd;" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf0de;" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
-<glyph unicode="&#xf0e0;" horiz-adv-x="1792" d="M1792 826v-794q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v794q44 -49 101 -87q362 -246 497 -345q57 -42 92.5 -65.5t94.5 -48t110 -24.5h1h1q51 0 110 24.5t94.5 48t92.5 65.5q170 123 498 345q57 39 100 87zM1792 1120q0 -79 -49 -151t-122 -123 q-376 -261 -468 -325q-10 -7 -42.5 -30.5t-54 -38t-52 -32.5t-57.5 -27t-50 -9h-1h-1q-23 0 -50 9t-57.5 27t-52 32.5t-54 38t-42.5 30.5q-91 64 -262 182.5t-205 142.5q-62 42 -117 115.5t-55 136.5q0 78 41.5 130t118.5 52h1472q65 0 112.5 -47t47.5 -113z" />
-<glyph unicode="&#xf0e1;" d="M349 911v-991h-330v991h330zM370 1217q1 -73 -50.5 -122t-135.5 -49h-2q-82 0 -132 49t-50 122q0 74 51.5 122.5t134.5 48.5t133 -48.5t51 -122.5zM1536 488v-568h-329v530q0 105 -40.5 164.5t-126.5 59.5q-63 0 -105.5 -34.5t-63.5 -85.5q-11 -30 -11 -81v-553h-329 q2 399 2 647t-1 296l-1 48h329v-144h-2q20 32 41 56t56.5 52t87 43.5t114.5 15.5q171 0 275 -113.5t104 -332.5z" />
-<glyph unicode="&#xf0e2;" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298z" />
-<glyph unicode="&#xf0e3;" horiz-adv-x="1792" d="M1771 0q0 -53 -37 -90l-107 -108q-39 -37 -91 -37q-53 0 -90 37l-363 364q-38 36 -38 90q0 53 43 96l-256 256l-126 -126q-14 -14 -34 -14t-34 14q2 -2 12.5 -12t12.5 -13t10 -11.5t10 -13.5t6 -13.5t5.5 -16.5t1.5 -18q0 -38 -28 -68q-3 -3 -16.5 -18t-19 -20.5 t-18.5 -16.5t-22 -15.5t-22 -9t-26 -4.5q-40 0 -68 28l-408 408q-28 28 -28 68q0 13 4.5 26t9 22t15.5 22t16.5 18.5t20.5 19t18 16.5q30 28 68 28q10 0 18 -1.5t16.5 -5.5t13.5 -6t13.5 -10t11.5 -10t13 -12.5t12 -12.5q-14 14 -14 34t14 34l348 348q14 14 34 14t34 -14 q-2 2 -12.5 12t-12.5 13t-10 11.5t-10 13.5t-6 13.5t-5.5 16.5t-1.5 18q0 38 28 68q3 3 16.5 18t19 20.5t18.5 16.5t22 15.5t22 9t26 4.5q40 0 68 -28l408 -408q28 -28 28 -68q0 -13 -4.5 -26t-9 -22t-15.5 -22t-16.5 -18.5t-20.5 -19t-18 -16.5q-30 -28 -68 -28 q-10 0 -18 1.5t-16.5 5.5t-13.5 6t-13.5 10t-11.5 10t-13 12.5t-12 12.5q14 -14 14 -34t-14 -34l-126 -126l256 -256q43 43 96 43q52 0 91 -37l363 -363q37 -39 37 -91z" />
-<glyph unicode="&#xf0e4;" horiz-adv-x="1792" d="M384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM576 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1004 351l101 382q6 26 -7.5 48.5t-38.5 29.5 t-48 -6.5t-30 -39.5l-101 -382q-60 -5 -107 -43.5t-63 -98.5q-20 -77 20 -146t117 -89t146 20t89 117q16 60 -6 117t-72 91zM1664 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 1024q0 53 -37.5 90.5 t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1472 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 384q0 -261 -141 -483q-19 -29 -54 -29h-1402q-35 0 -54 29 q-141 221 -141 483q0 182 71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
-<glyph unicode="&#xf0e5;" horiz-adv-x="1792" d="M896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640 q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 174 120 321.5 t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z" />
-<glyph unicode="&#xf0e6;" horiz-adv-x="1792" d="M704 1152q-153 0 -286 -52t-211.5 -141t-78.5 -191q0 -82 53 -158t149 -132l97 -56l-35 -84q34 20 62 39l44 31l53 -10q78 -14 153 -14q153 0 286 52t211.5 141t78.5 191t-78.5 191t-211.5 141t-286 52zM704 1280q191 0 353.5 -68.5t256.5 -186.5t94 -257t-94 -257 t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224q0 139 94 257t256.5 186.5 t353.5 68.5zM1526 111q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129 q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230q0 -120 -71 -224.5t-195 -176.5z" />
-<glyph unicode="&#xf0e7;" horiz-adv-x="896" d="M885 970q18 -20 7 -44l-540 -1157q-13 -25 -42 -25q-4 0 -14 2q-17 5 -25.5 19t-4.5 30l197 808l-406 -101q-4 -1 -12 -1q-18 0 -31 11q-18 15 -13 39l201 825q4 14 16 23t28 9h328q19 0 32 -12.5t13 -29.5q0 -8 -5 -18l-171 -463l396 98q8 2 12 2q19 0 34 -15z" />
-<glyph unicode="&#xf0e8;" horiz-adv-x="1792" d="M1792 288v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192q0 52 38 90t90 38h512v192h-96q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-96v-192h512q52 0 90 -38t38 -90v-192h96q40 0 68 -28t28 -68 z" />
-<glyph unicode="&#xf0e9;" horiz-adv-x="1664" d="M896 708v-580q0 -104 -76 -180t-180 -76t-180 76t-76 180q0 26 19 45t45 19t45 -19t19 -45q0 -50 39 -89t89 -39t89 39t39 89v580q33 11 64 11t64 -11zM1664 681q0 -13 -9.5 -22.5t-22.5 -9.5q-11 0 -23 10q-49 46 -93 69t-102 23q-68 0 -128 -37t-103 -97 q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -28 -17q-18 0 -29 17q-4 6 -14.5 24t-17.5 28q-43 60 -102.5 97t-127.5 37t-127.5 -37t-102.5 -97q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -29 -17q-17 0 -28 17q-4 6 -14.5 24t-17.5 28q-43 60 -103 97t-128 37q-58 0 -102 -23t-93 -69 q-12 -10 -23 -10q-13 0 -22.5 9.5t-9.5 22.5q0 5 1 7q45 183 172.5 319.5t298 204.5t360.5 68q140 0 274.5 -40t246.5 -113.5t194.5 -187t115.5 -251.5q1 -2 1 -7zM896 1408v-98q-42 2 -64 2t-64 -2v98q0 26 19 45t45 19t45 -19t19 -45z" />
-<glyph unicode="&#xf0ea;" horiz-adv-x="1792" d="M768 -128h896v640h-416q-40 0 -68 28t-28 68v416h-384v-1152zM1024 1312v64q0 13 -9.5 22.5t-22.5 9.5h-704q-13 0 -22.5 -9.5t-9.5 -22.5v-64q0 -13 9.5 -22.5t22.5 -9.5h704q13 0 22.5 9.5t9.5 22.5zM1280 640h299l-299 299v-299zM1792 512v-672q0 -40 -28 -68t-68 -28 h-960q-40 0 -68 28t-28 68v160h-544q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1088q40 0 68 -28t28 -68v-328q21 -13 36 -28l408 -408q28 -28 48 -76t20 -88z" />
-<glyph unicode="&#xf0eb;" horiz-adv-x="1024" d="M736 960q0 -13 -9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5q0 46 -54 71t-106 25q-13 0 -22.5 9.5t-9.5 22.5t9.5 22.5t22.5 9.5q50 0 99.5 -16t87 -54t37.5 -90zM896 960q0 72 -34.5 134t-90 101.5t-123 62t-136.5 22.5t-136.5 -22.5t-123 -62t-90 -101.5t-34.5 -134 q0 -101 68 -180q10 -11 30.5 -33t30.5 -33q128 -153 141 -298h228q13 145 141 298q10 11 30.5 33t30.5 33q68 79 68 180zM1024 960q0 -155 -103 -268q-45 -49 -74.5 -87t-59.5 -95.5t-34 -107.5q47 -28 47 -82q0 -37 -25 -64q25 -27 25 -64q0 -52 -45 -81q13 -23 13 -47 q0 -46 -31.5 -71t-77.5 -25q-20 -44 -60 -70t-87 -26t-87 26t-60 70q-46 0 -77.5 25t-31.5 71q0 24 13 47q-45 29 -45 81q0 37 25 64q-25 27 -25 64q0 54 47 82q-4 50 -34 107.5t-59.5 95.5t-74.5 87q-103 113 -103 268q0 99 44.5 184.5t117 142t164 89t186.5 32.5 t186.5 -32.5t164 -89t117 -142t44.5 -184.5z" />
-<glyph unicode="&#xf0ec;" horiz-adv-x="1792" d="M1792 352v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5q-12 0 -24 10l-319 320q-9 9 -9 22q0 14 9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h1376q13 0 22.5 -9.5t9.5 -22.5zM1792 896q0 -14 -9 -23l-320 -320q-9 -9 -23 -9 q-13 0 -22.5 9.5t-9.5 22.5v192h-1376q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1376v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
-<glyph unicode="&#xf0ed;" horiz-adv-x="1920" d="M1280 608q0 14 -9 23t-23 9h-224v352q0 13 -9.5 22.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-352h-224q-13 0 -22.5 -9.5t-9.5 -22.5q0 -14 9 -23l352 -352q9 -9 23 -9t23 9l351 351q10 12 10 24zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
-<glyph unicode="&#xf0ee;" horiz-adv-x="1920" d="M1280 672q0 14 -9 23l-352 352q-9 9 -23 9t-23 -9l-351 -351q-10 -12 -10 -24q0 -14 9 -23t23 -9h224v-352q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5v352h224q13 0 22.5 9.5t9.5 22.5zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
-<glyph unicode="&#xf0f0;" horiz-adv-x="1408" d="M384 192q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM1408 131q0 -121 -73 -190t-194 -69h-874q-121 0 -194 69t-73 190q0 68 5.5 131t24 138t47.5 132.5t81 103t120 60.5q-22 -52 -22 -120v-203q-58 -20 -93 -70t-35 -111q0 -80 56 -136t136 -56 t136 56t56 136q0 61 -35.5 111t-92.5 70v203q0 62 25 93q132 -104 295 -104t295 104q25 -31 25 -93v-64q-106 0 -181 -75t-75 -181v-89q-32 -29 -32 -71q0 -40 28 -68t68 -28t68 28t28 68q0 42 -32 71v89q0 52 38 90t90 38t90 -38t38 -90v-89q-32 -29 -32 -71q0 -40 28 -68 t68 -28t68 28t28 68q0 42 -32 71v89q0 68 -34.5 127.5t-93.5 93.5q0 10 0.5 42.5t0 48t-2.5 41.5t-7 47t-13 40q68 -15 120 -60.5t81 -103t47.5 -132.5t24 -138t5.5 -131zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5 t271.5 -112.5t112.5 -271.5z" />
-<glyph unicode="&#xf0f1;" horiz-adv-x="1408" d="M1280 832q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 832q0 -62 -35.5 -111t-92.5 -70v-395q0 -159 -131.5 -271.5t-316.5 -112.5t-316.5 112.5t-131.5 271.5v132q-164 20 -274 128t-110 252v512q0 26 19 45t45 19q6 0 16 -2q17 30 47 48 t65 18q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5q-33 0 -64 18v-402q0 -106 94 -181t226 -75t226 75t94 181v402q-31 -18 -64 -18q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5q35 0 65 -18t47 -48q10 2 16 2q26 0 45 -19t19 -45v-512q0 -144 -110 -252 t-274 -128v-132q0 -106 94 -181t226 -75t226 75t94 181v395q-57 21 -92.5 70t-35.5 111q0 80 56 136t136 56t136 -56t56 -136z" />
-<glyph unicode="&#xf0f2;" horiz-adv-x="1792" d="M640 1152h512v128h-512v-128zM288 1152v-1280h-64q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h64zM1408 1152v-1280h-1024v1280h128v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h128zM1792 928v-832q0 -92 -66 -158t-158 -66h-64v1280h64q92 0 158 -66 t66 -158z" />
-<glyph unicode="&#xf0f3;" horiz-adv-x="1664" d="M848 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM1664 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q190 161 287 397.5t97 498.5 q0 165 96 262t264 117q-8 18 -8 37q0 40 28 68t68 28t68 -28t28 -68q0 -19 -8 -37q168 -20 264 -117t96 -262q0 -262 97 -498.5t287 -397.5z" />
-<glyph unicode="&#xf0f4;" horiz-adv-x="1920" d="M1664 896q0 80 -56 136t-136 56h-64v-384h64q80 0 136 56t56 136zM0 128h1792q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181zM1856 896q0 -159 -112.5 -271.5t-271.5 -112.5h-64v-32q0 -92 -66 -158t-158 -66h-704q-92 0 -158 66t-66 158v736q0 26 19 45 t45 19h1152q159 0 271.5 -112.5t112.5 -271.5z" />
-<glyph unicode="&#xf0f5;" horiz-adv-x="1408" d="M640 1472v-640q0 -61 -35.5 -111t-92.5 -70v-779q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v779q-57 20 -92.5 70t-35.5 111v640q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45 t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45zM1408 1472v-1600q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v512h-224q-13 0 -22.5 9.5t-9.5 22.5v800q0 132 94 226t226 94h256q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf0f6;" horiz-adv-x="1280" d="M1024 352v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23 -9t9 -23zM1024 608v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23 -9t9 -23zM128 0h1024v768h-416q-40 0 -68 28t-28 68v416h-512v-1280z M768 896h376q-10 29 -22 41l-313 313q-12 12 -41 22v-376zM1280 864v-896q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h640q40 0 88 -20t76 -48l312 -312q28 -28 48 -76t20 -88z" />
-<glyph unicode="&#xf0f7;" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1536h-1152v-1536h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM1408 1472v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf0f8;" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1152h-256v-32q0 -40 -28 -68t-68 -28h-448q-40 0 -68 28t-28 68v32h-256v-1152h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM896 1056v320q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-96h-128v96q0 13 -9.5 22.5 t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5v96h128v-96q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1408 1088v-1280q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1280q0 26 19 45t45 19h320 v288q0 40 28 68t68 28h448q40 0 68 -28t28 -68v-288h320q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf0f9;" horiz-adv-x="1920" d="M640 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM256 640h384v256h-158q-14 -2 -22 -9l-195 -195q-7 -12 -9 -22v-30zM1536 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1664 800v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM1920 1344v-1152 q0 -26 -19 -45t-45 -19h-192q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-128q-26 0 -45 19t-19 45t19 45t45 19v416q0 26 13 58t32 51l198 198q19 19 51 32t58 13h160v320q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf0fa;" horiz-adv-x="1792" d="M1280 416v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM640 1152h512v128h-512v-128zM256 1152v-1280h-32 q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h32zM1440 1152v-1280h-1088v1280h160v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h160zM1792 928v-832q0 -92 -66 -158t-158 -66h-32v1280h32q92 0 158 -66t66 -158z" />
-<glyph unicode="&#xf0fb;" horiz-adv-x="1920" d="M1920 576q-1 -32 -288 -96l-352 -32l-224 -64h-64l-293 -352h69q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-96h-160h-64v32h64v416h-160l-192 -224h-96l-32 32v192h32v32h128v8l-192 24v128l192 24v8h-128v32h-32v192l32 32h96l192 -224h160v416h-64v32h64h160h96 q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-69l293 -352h64l224 -64l352 -32q261 -58 287 -93z" />
-<glyph unicode="&#xf0fc;" horiz-adv-x="1664" d="M640 640v384h-256v-256q0 -53 37.5 -90.5t90.5 -37.5h128zM1664 192v-192h-1152v192l128 192h-128q-159 0 -271.5 112.5t-112.5 271.5v320l-64 64l32 128h480l32 128h960l32 -192l-64 -32v-800z" />
-<glyph unicode="&#xf0fd;" d="M1280 192v896q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-512v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-896q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h512v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf0fe;" d="M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf100;" horiz-adv-x="1024" d="M627 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23zM1011 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23z" />
-<glyph unicode="&#xf101;" horiz-adv-x="1024" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM979 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23 l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
-<glyph unicode="&#xf102;" horiz-adv-x="1152" d="M1075 224q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM1075 608q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393 q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
-<glyph unicode="&#xf103;" horiz-adv-x="1152" d="M1075 672q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23zM1075 1056q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
-<glyph unicode="&#xf104;" horiz-adv-x="640" d="M627 992q0 -13 -10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
-<glyph unicode="&#xf105;" horiz-adv-x="640" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
-<glyph unicode="&#xf106;" horiz-adv-x="1152" d="M1075 352q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
-<glyph unicode="&#xf107;" horiz-adv-x="1152" d="M1075 800q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
-<glyph unicode="&#xf108;" horiz-adv-x="1920" d="M1792 544v832q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5zM1920 1376v-1088q0 -66 -47 -113t-113 -47h-544q0 -37 16 -77.5t32 -71t16 -43.5q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19 t-19 45q0 14 16 44t32 70t16 78h-544q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
-<glyph unicode="&#xf109;" horiz-adv-x="1920" d="M416 256q-66 0 -113 47t-47 113v704q0 66 47 113t113 47h1088q66 0 113 -47t47 -113v-704q0 -66 -47 -113t-113 -47h-1088zM384 1120v-704q0 -13 9.5 -22.5t22.5 -9.5h1088q13 0 22.5 9.5t9.5 22.5v704q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5z M1760 192h160v-96q0 -40 -47 -68t-113 -28h-1600q-66 0 -113 28t-47 68v96h160h1600zM1040 96q16 0 16 16t-16 16h-160q-16 0 -16 -16t16 -16h160z" />
-<glyph unicode="&#xf10a;" horiz-adv-x="1152" d="M640 128q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1024 288v960q0 13 -9.5 22.5t-22.5 9.5h-832q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h832q13 0 22.5 9.5t9.5 22.5zM1152 1248v-1088q0 -66 -47 -113t-113 -47h-832 q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h832q66 0 113 -47t47 -113z" />
-<glyph unicode="&#xf10b;" horiz-adv-x="768" d="M464 128q0 33 -23.5 56.5t-56.5 23.5t-56.5 -23.5t-23.5 -56.5t23.5 -56.5t56.5 -23.5t56.5 23.5t23.5 56.5zM672 288v704q0 13 -9.5 22.5t-22.5 9.5h-512q-13 0 -22.5 -9.5t-9.5 -22.5v-704q0 -13 9.5 -22.5t22.5 -9.5h512q13 0 22.5 9.5t9.5 22.5zM480 1136 q0 16 -16 16h-160q-16 0 -16 -16t16 -16h160q16 0 16 16zM768 1152v-1024q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v1024q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
-<glyph unicode="&#xf10c;" d="M768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103 t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf10d;" horiz-adv-x="1664" d="M768 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z M1664 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z" />
-<glyph unicode="&#xf10e;" horiz-adv-x="1664" d="M768 1216v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136zM1664 1216 v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136z" />
-<glyph unicode="&#xf110;" horiz-adv-x="1568" d="M496 192q0 -60 -42.5 -102t-101.5 -42q-60 0 -102 42t-42 102t42 102t102 42q59 0 101.5 -42t42.5 -102zM928 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM320 640q0 -66 -47 -113t-113 -47t-113 47t-47 113 t47 113t113 47t113 -47t47 -113zM1360 192q0 -46 -33 -79t-79 -33t-79 33t-33 79t33 79t79 33t79 -33t33 -79zM528 1088q0 -73 -51.5 -124.5t-124.5 -51.5t-124.5 51.5t-51.5 124.5t51.5 124.5t124.5 51.5t124.5 -51.5t51.5 -124.5zM992 1280q0 -80 -56 -136t-136 -56 t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1536 640q0 -40 -28 -68t-68 -28t-68 28t-28 68t28 68t68 28t68 -28t28 -68zM1328 1088q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5z" />
-<glyph unicode="&#xf111;" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf112;" horiz-adv-x="1792" d="M1792 416q0 -166 -127 -451q-3 -7 -10.5 -24t-13.5 -30t-13 -22q-12 -17 -28 -17q-15 0 -23.5 10t-8.5 25q0 9 2.5 26.5t2.5 23.5q5 68 5 123q0 101 -17.5 181t-48.5 138.5t-80 101t-105.5 69.5t-133 42.5t-154 21.5t-175.5 6h-224v-256q0 -26 -19 -45t-45 -19t-45 19 l-512 512q-19 19 -19 45t19 45l512 512q19 19 45 19t45 -19t19 -45v-256h224q713 0 875 -403q53 -134 53 -333z" />
-<glyph unicode="&#xf113;" horiz-adv-x="1664" d="M640 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1280 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1440 320 q0 120 -69 204t-187 84q-41 0 -195 -21q-71 -11 -157 -11t-157 11q-152 21 -195 21q-118 0 -187 -84t-69 -204q0 -88 32 -153.5t81 -103t122 -60t140 -29.5t149 -7h168q82 0 149 7t140 29.5t122 60t81 103t32 153.5zM1664 496q0 -207 -61 -331q-38 -77 -105.5 -133t-141 -86 t-170 -47.5t-171.5 -22t-167 -4.5q-78 0 -142 3t-147.5 12.5t-152.5 30t-137 51.5t-121 81t-86 115q-62 123 -62 331q0 237 136 396q-27 82 -27 170q0 116 51 218q108 0 190 -39.5t189 -123.5q147 35 309 35q148 0 280 -32q105 82 187 121t189 39q51 -102 51 -218 q0 -87 -27 -168q136 -160 136 -398z" />
-<glyph unicode="&#xf114;" horiz-adv-x="1664" d="M1536 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68v-960q0 -40 28 -68t68 -28h1216q40 0 68 28t28 68zM1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320 q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
-<glyph unicode="&#xf115;" horiz-adv-x="1920" d="M1781 605q0 35 -53 35h-1088q-40 0 -85.5 -21.5t-71.5 -52.5l-294 -363q-18 -24 -18 -40q0 -35 53 -35h1088q40 0 86 22t71 53l294 363q18 22 18 39zM640 768h768v160q0 40 -28 68t-68 28h-576q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68 v-853l256 315q44 53 116 87.5t140 34.5zM1909 605q0 -62 -46 -120l-295 -363q-43 -53 -116 -87.5t-140 -34.5h-1088q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158v-160h192q54 0 99 -24.5t67 -70.5q15 -32 15 -68z " />
-<glyph unicode="&#xf116;" horiz-adv-x="1152" d="M896 608v-64q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v224q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-224h224q14 0 23 -9t9 -23zM1024 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 -28 t-28 -68v-704q0 -40 28 -68t68 -28h704q40 0 68 28t28 68zM1152 928v-704q0 -92 -65.5 -158t-158.5 -66h-704q-93 0 -158.5 66t-65.5 158v704q0 93 65.5 158.5t158.5 65.5h704q93 0 158.5 -65.5t65.5 -158.5z" />
-<glyph unicode="&#xf117;" horiz-adv-x="1152" d="M928 1152q93 0 158.5 -65.5t65.5 -158.5v-704q0 -92 -65.5 -158t-158.5 -66h-704q-93 0 -158.5 66t-65.5 158v704q0 93 65.5 158.5t158.5 65.5h704zM1024 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 -28t-28 -68v-704q0 -40 28 -68t68 -28h704q40 0 68 28t28 68z M864 640q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-576q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h576z" />
-<glyph unicode="&#xf118;" d="M1134 461q-37 -121 -138 -195t-228 -74t-228 74t-138 195q-8 25 4 48.5t38 31.5q25 8 48.5 -4t31.5 -38q25 -80 92.5 -129.5t151.5 -49.5t151.5 49.5t92.5 129.5q8 26 32 38t49 4t37 -31.5t4 -48.5zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5 t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf119;" d="M1134 307q8 -25 -4 -48.5t-37 -31.5t-49 4t-32 38q-25 80 -92.5 129.5t-151.5 49.5t-151.5 -49.5t-92.5 -129.5q-8 -26 -31.5 -38t-48.5 -4q-26 8 -38 31.5t-4 48.5q37 121 138 195t228 74t228 -74t138 -195zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204 t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf11a;" d="M1152 448q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h640q26 0 45 -19t19 -45zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf11b;" horiz-adv-x="1920" d="M832 448v128q0 14 -9 23t-23 9h-192v192q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-192h-192q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h192v-192q0 -14 9 -23t23 -9h128q14 0 23 9t9 23v192h192q14 0 23 9t9 23zM1408 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1920 512q0 -212 -150 -362t-362 -150q-192 0 -338 128h-220q-146 -128 -338 -128q-212 0 -362 150 t-150 362t150 362t362 150h896q212 0 362 -150t150 -362z" />
-<glyph unicode="&#xf11c;" horiz-adv-x="1920" d="M384 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM512 624v-96q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h224q16 0 16 -16zM384 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 368v-96q0 -16 -16 -16 h-864q-16 0 -16 16v96q0 16 16 16h864q16 0 16 -16zM768 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM640 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1024 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16 h96q16 0 16 -16zM896 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1280 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1152 880v-96 q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 880v-352q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h112v240q0 16 16 16h96q16 0 16 -16zM1792 128v896h-1664v-896 h1664zM1920 1024v-896q0 -53 -37.5 -90.5t-90.5 -37.5h-1664q-53 0 -90.5 37.5t-37.5 90.5v896q0 53 37.5 90.5t90.5 37.5h1664q53 0 90.5 -37.5t37.5 -90.5z" />
-<glyph unicode="&#xf11d;" horiz-adv-x="1792" d="M1664 491v616q-169 -91 -306 -91q-82 0 -145 32q-100 49 -184 76.5t-178 27.5q-173 0 -403 -127v-599q245 113 433 113q55 0 103.5 -7.5t98 -26t77 -31t82.5 -39.5l28 -14q44 -22 101 -22q120 0 293 92zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9 h-64q-14 0 -23 9t-9 23v1266q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102 q-15 -9 -33 -9q-16 0 -32 8q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
-<glyph unicode="&#xf11e;" horiz-adv-x="1792" d="M832 536v192q-181 -16 -384 -117v-185q205 96 384 110zM832 954v197q-172 -8 -384 -126v-189q215 111 384 118zM1664 491v184q-235 -116 -384 -71v224q-20 6 -39 15q-5 3 -33 17t-34.5 17t-31.5 15t-34.5 15.5t-32.5 13t-36 12.5t-35 8.5t-39.5 7.5t-39.5 4t-44 2 q-23 0 -49 -3v-222h19q102 0 192.5 -29t197.5 -82q19 -9 39 -15v-188q42 -17 91 -17q120 0 293 92zM1664 918v189q-169 -91 -306 -91q-45 0 -78 8v-196q148 -42 384 90zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v1266 q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102q-15 -9 -33 -9q-16 0 -32 8 q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
-<glyph unicode="&#xf120;" horiz-adv-x="1664" d="M585 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23zM1664 96v-64q0 -14 -9 -23t-23 -9h-960q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h960q14 0 23 -9 t9 -23z" />
-<glyph unicode="&#xf121;" horiz-adv-x="1920" d="M617 137l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23zM1208 1204l-373 -1291q-4 -13 -15.5 -19.5t-23.5 -2.5l-62 17q-13 4 -19.5 15.5t-2.5 24.5 l373 1291q4 13 15.5 19.5t23.5 2.5l62 -17q13 -4 19.5 -15.5t2.5 -24.5zM1865 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23z" />
-<glyph unicode="&#xf122;" horiz-adv-x="1792" d="M640 454v-70q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-69l-397 -398q-19 -19 -19 -45t19 -45zM1792 416q0 -58 -17 -133.5t-38.5 -138t-48 -125t-40.5 -90.5l-20 -40q-8 -17 -28 -17q-6 0 -9 1 q-25 8 -23 34q43 400 -106 565q-64 71 -170.5 110.5t-267.5 52.5v-251q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-262q411 -28 599 -221q169 -173 169 -509z" />
-<glyph unicode="&#xf123;" horiz-adv-x="1664" d="M1186 579l257 250l-356 52l-66 10l-30 60l-159 322v-963l59 -31l318 -168l-60 355l-12 66zM1638 841l-363 -354l86 -500q5 -33 -6 -51.5t-34 -18.5q-17 0 -40 12l-449 236l-449 -236q-23 -12 -40 -12q-23 0 -34 18.5t-6 51.5l86 500l-364 354q-32 32 -23 59.5t54 34.5 l502 73l225 455q20 41 49 41q28 0 49 -41l225 -455l502 -73q45 -7 54 -34.5t-24 -59.5z" />
-<glyph unicode="&#xf124;" horiz-adv-x="1408" d="M1401 1187l-640 -1280q-17 -35 -57 -35q-5 0 -15 2q-22 5 -35.5 22.5t-13.5 39.5v576h-576q-22 0 -39.5 13.5t-22.5 35.5t4 42t29 30l1280 640q13 7 29 7q27 0 45 -19q15 -14 18.5 -34.5t-6.5 -39.5z" />
-<glyph unicode="&#xf125;" horiz-adv-x="1664" d="M557 256h595v595zM512 301l595 595h-595v-595zM1664 224v-192q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v224h-864q-14 0 -23 9t-9 23v864h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224v224q0 14 9 23t23 9h192q14 0 23 -9t9 -23 v-224h851l246 247q10 9 23 9t23 -9q9 -10 9 -23t-9 -23l-247 -246v-851h224q14 0 23 -9t9 -23z" />
-<glyph unicode="&#xf126;" horiz-adv-x="1024" d="M288 64q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM288 1216q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM928 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1024 1088q0 -52 -26 -96.5t-70 -69.5 q-2 -287 -226 -414q-68 -38 -203 -81q-128 -40 -169.5 -71t-41.5 -100v-26q44 -25 70 -69.5t26 -96.5q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 52 26 96.5t70 69.5v820q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136q0 -52 -26 -96.5t-70 -69.5v-497 q54 26 154 57q55 17 87.5 29.5t70.5 31t59 39.5t40.5 51t28 69.5t8.5 91.5q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136z" />
-<glyph unicode="&#xf127;" horiz-adv-x="1664" d="M439 265l-256 -256q-10 -9 -23 -9q-12 0 -23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23zM608 224v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM384 448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23t9 23t23 9h320 q14 0 23 -9t9 -23zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-334 335q-21 21 -42 56l239 18l273 -274q27 -27 68 -27.5t68 26.5l147 146q28 28 28 67q0 40 -28 68l-274 275l18 239q35 -21 56 -42l336 -336q84 -86 84 -204zM1031 1044l-239 -18 l-273 274q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l274 -274l-18 -240q-35 21 -56 42l-336 336q-84 86 -84 204q0 120 85 203l147 146q83 83 203 83q121 0 204 -85l334 -335q21 -21 42 -56zM1664 960q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9 t-9 23t9 23t23 9h320q14 0 23 -9t9 -23zM1120 1504v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM1527 1353l-256 -256q-11 -9 -23 -9t-23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" />
-<glyph unicode="&#xf128;" horiz-adv-x="1024" d="M704 280v-240q0 -16 -12 -28t-28 -12h-240q-16 0 -28 12t-12 28v240q0 16 12 28t28 12h240q16 0 28 -12t12 -28zM1020 880q0 -54 -15.5 -101t-35 -76.5t-55 -59.5t-57.5 -43.5t-61 -35.5q-41 -23 -68.5 -65t-27.5 -67q0 -17 -12 -32.5t-28 -15.5h-240q-15 0 -25.5 18.5 t-10.5 37.5v45q0 83 65 156.5t143 108.5q59 27 84 56t25 76q0 42 -46.5 74t-107.5 32q-65 0 -108 -29q-35 -25 -107 -115q-13 -16 -31 -16q-12 0 -25 8l-164 125q-13 10 -15.5 25t5.5 28q160 266 464 266q80 0 161 -31t146 -83t106 -127.5t41 -158.5z" />
-<glyph unicode="&#xf129;" horiz-adv-x="640" d="M640 192v-128q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64v384h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-576h64q26 0 45 -19t19 -45zM512 1344v-192q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v192 q0 26 19 45t45 19h256q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf12a;" horiz-adv-x="640" d="M512 288v-224q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v224q0 26 19 45t45 19h256q26 0 45 -19t19 -45zM542 1344l-28 -768q-1 -26 -20.5 -45t-45.5 -19h-256q-26 0 -45.5 19t-20.5 45l-28 768q-1 26 17.5 45t44.5 19h320q26 0 44.5 -19t17.5 -45z" />
-<glyph unicode="&#xf12b;" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1534 846v-206h-514l-3 27 q-4 28 -4 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q83 65 188 65q110 0 178 -59.5t68 -158.5q0 -56 -24.5 -103t-62 -76.5t-81.5 -58.5t-82 -50.5t-65.5 -51.5t-30.5 -63h232v80 h126z" />
-<glyph unicode="&#xf12c;" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1536 -50v-206h-514l-4 27 q-3 45 -3 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q80 65 188 65q110 0 178 -59.5t68 -158.5q0 -66 -34.5 -118.5t-84 -86t-99.5 -62.5t-87 -63t-41 -73h232v80h126z" />
-<glyph unicode="&#xf12d;" horiz-adv-x="1920" d="M896 128l336 384h-768l-336 -384h768zM1909 1205q15 -34 9.5 -71.5t-30.5 -65.5l-896 -1024q-38 -44 -96 -44h-768q-38 0 -69.5 20.5t-47.5 54.5q-15 34 -9.5 71.5t30.5 65.5l896 1024q38 44 96 44h768q38 0 69.5 -20.5t47.5 -54.5z" />
-<glyph unicode="&#xf12e;" horiz-adv-x="1664" d="M1664 438q0 -81 -44.5 -135t-123.5 -54q-41 0 -77.5 17.5t-59 38t-56.5 38t-71 17.5q-110 0 -110 -124q0 -39 16 -115t15 -115v-5q-22 0 -33 -1q-34 -3 -97.5 -11.5t-115.5 -13.5t-98 -5q-61 0 -103 26.5t-42 83.5q0 37 17.5 71t38 56.5t38 59t17.5 77.5q0 79 -54 123.5 t-135 44.5q-84 0 -143 -45.5t-59 -127.5q0 -43 15 -83t33.5 -64.5t33.5 -53t15 -50.5q0 -45 -46 -89q-37 -35 -117 -35q-95 0 -245 24q-9 2 -27.5 4t-27.5 4l-13 2q-1 0 -3 1q-2 0 -2 1v1024q2 -1 17.5 -3.5t34 -5t21.5 -3.5q150 -24 245 -24q80 0 117 35q46 44 46 89 q0 22 -15 50.5t-33.5 53t-33.5 64.5t-15 83q0 82 59 127.5t144 45.5q80 0 134 -44.5t54 -123.5q0 -41 -17.5 -77.5t-38 -59t-38 -56.5t-17.5 -71q0 -57 42 -83.5t103 -26.5q64 0 180 15t163 17v-2q-1 -2 -3.5 -17.5t-5 -34t-3.5 -21.5q-24 -150 -24 -245q0 -80 35 -117 q44 -46 89 -46q22 0 50.5 15t53 33.5t64.5 33.5t83 15q82 0 127.5 -59t45.5 -143z" />
-<glyph unicode="&#xf130;" horiz-adv-x="1152" d="M1152 832v-128q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-217 24 -364.5 187.5t-147.5 384.5v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -185 131.5 -316.5t316.5 -131.5 t316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45zM896 1216v-512q0 -132 -94 -226t-226 -94t-226 94t-94 226v512q0 132 94 226t226 94t226 -94t94 -226z" />
-<glyph unicode="&#xf131;" horiz-adv-x="1408" d="M271 591l-101 -101q-42 103 -42 214v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -53 15 -113zM1385 1193l-361 -361v-128q0 -132 -94 -226t-226 -94q-55 0 -109 19l-96 -96q97 -51 205 -51q185 0 316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45v-128 q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-125 13 -235 81l-254 -254q-10 -10 -23 -10t-23 10l-82 82q-10 10 -10 23t10 23l1234 1234q10 10 23 10t23 -10l82 -82q10 -10 10 -23 t-10 -23zM1005 1325l-621 -621v512q0 132 94 226t226 94q102 0 184.5 -59t116.5 -152z" />
-<glyph unicode="&#xf132;" horiz-adv-x="1280" d="M1088 576v640h-448v-1137q119 63 213 137q235 184 235 360zM1280 1344v-768q0 -86 -33.5 -170.5t-83 -150t-118 -127.5t-126.5 -103t-121 -77.5t-89.5 -49.5t-42.5 -20q-12 -6 -26 -6t-26 6q-16 7 -42.5 20t-89.5 49.5t-121 77.5t-126.5 103t-118 127.5t-83 150 t-33.5 170.5v768q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf133;" horiz-adv-x="1664" d="M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280 q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
-<glyph unicode="&#xf134;" horiz-adv-x="1408" d="M512 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 1376v-320q0 -16 -12 -25q-8 -7 -20 -7q-4 0 -7 1l-448 96q-11 2 -18 11t-7 20h-256v-102q111 -23 183.5 -111t72.5 -203v-800q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v800 q0 106 62.5 190.5t161.5 114.5v111h-32q-59 0 -115 -23.5t-91.5 -53t-66 -66.5t-40.5 -53.5t-14 -24.5q-17 -35 -57 -35q-16 0 -29 7q-23 12 -31.5 37t3.5 49q5 10 14.5 26t37.5 53.5t60.5 70t85 67t108.5 52.5q-25 42 -25 86q0 66 47 113t113 47t113 -47t47 -113 q0 -33 -14 -64h302q0 11 7 20t18 11l448 96q3 1 7 1q12 0 20 -7q12 -9 12 -25z" />
-<glyph unicode="&#xf135;" horiz-adv-x="1664" d="M1440 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1664 1376q0 -249 -75.5 -430.5t-253.5 -360.5q-81 -80 -195 -176l-20 -379q-2 -16 -16 -26l-384 -224q-7 -4 -16 -4q-12 0 -23 9l-64 64q-13 14 -8 32l85 276l-281 281l-276 -85q-3 -1 -9 -1 q-14 0 -23 9l-64 64q-17 19 -5 39l224 384q10 14 26 16l379 20q96 114 176 195q188 187 358 258t431 71q14 0 24 -9.5t10 -22.5z" />
-<glyph unicode="&#xf136;" horiz-adv-x="1792" d="M1708 881l-188 -881h-304l181 849q4 21 1 43q-4 20 -16 35q-10 14 -28 24q-18 9 -40 9h-197l-205 -960h-303l204 960h-304l-205 -960h-304l272 1280h1139q157 0 245 -118q86 -116 52 -281z" />
-<glyph unicode="&#xf137;" d="M909 141l102 102q19 19 19 45t-19 45l-307 307l307 307q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf138;" d="M717 141l454 454q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l307 -307l-307 -307q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf139;" d="M1165 397l102 102q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l307 307l307 -307q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf13a;" d="M813 237l454 454q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-307 -307l-307 307q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf13b;" horiz-adv-x="1408" d="M1130 939l16 175h-884l47 -534h612l-22 -228l-197 -53l-196 53l-13 140h-175l22 -278l362 -100h4v1l359 99l50 544h-644l-15 181h674zM0 1408h1408l-128 -1438l-578 -162l-574 162z" />
-<glyph unicode="&#xf13c;" horiz-adv-x="1792" d="M275 1408h1505l-266 -1333l-804 -267l-698 267l71 356h297l-29 -147l422 -161l486 161l68 339h-1208l58 297h1209l38 191h-1208z" />
-<glyph unicode="&#xf13d;" horiz-adv-x="1792" d="M960 1280q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1792 352v-352q0 -22 -20 -30q-8 -2 -12 -2q-13 0 -23 9l-93 93q-119 -143 -318.5 -226.5t-429.5 -83.5t-429.5 83.5t-318.5 226.5l-93 -93q-9 -9 -23 -9q-4 0 -12 2q-20 8 -20 30v352 q0 14 9 23t23 9h352q22 0 30 -20q8 -19 -7 -35l-100 -100q67 -91 189.5 -153.5t271.5 -82.5v647h-192q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h192v163q-58 34 -93 92.5t-35 128.5q0 106 75 181t181 75t181 -75t75 -181q0 -70 -35 -128.5t-93 -92.5v-163h192q26 0 45 -19 t19 -45v-128q0 -26 -19 -45t-45 -19h-192v-647q149 20 271.5 82.5t189.5 153.5l-100 100q-15 16 -7 35q8 20 30 20h352q14 0 23 -9t9 -23z" />
-<glyph unicode="&#xf13e;" horiz-adv-x="1152" d="M1056 768q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v320q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45q0 106 -75 181t-181 75t-181 -75t-75 -181 v-320h736z" />
-<glyph unicode="&#xf140;" d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM1152 640q0 159 -112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM1280 640q0 -212 -150 -362t-362 -150t-362 150 t-150 362t150 362t362 150t362 -150t150 -362zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf141;" horiz-adv-x="1408" d="M384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM896 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM1408 800v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
-<glyph unicode="&#xf142;" horiz-adv-x="384" d="M384 288v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 1312v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
-<glyph unicode="&#xf143;" d="M512 256q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM863 162q-13 232 -177 396t-396 177q-14 1 -24 -9t-10 -23v-128q0 -13 8.5 -22t21.5 -10q154 -11 264 -121t121 -264q1 -13 10 -21.5t22 -8.5h128q13 0 23 10 t9 24zM1247 161q-5 154 -56 297.5t-139.5 260t-205 205t-260 139.5t-297.5 56q-14 1 -23 -9q-10 -10 -10 -23v-128q0 -13 9 -22t22 -10q204 -7 378 -111.5t278.5 -278.5t111.5 -378q1 -13 10 -22t22 -9h128q13 0 23 10q11 9 9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf144;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1152 585q32 18 32 55t-32 55l-544 320q-31 19 -64 1q-32 -19 -32 -56v-640q0 -37 32 -56 q16 -8 32 -8q17 0 32 9z" />
-<glyph unicode="&#xf145;" horiz-adv-x="1792" d="M1024 1084l316 -316l-572 -572l-316 316zM813 105l618 618q19 19 19 45t-19 45l-362 362q-18 18 -45 18t-45 -18l-618 -618q-19 -19 -19 -45t19 -45l362 -362q18 -18 45 -18t45 18zM1702 742l-907 -908q-37 -37 -90.5 -37t-90.5 37l-126 126q56 56 56 136t-56 136 t-136 56t-136 -56l-125 126q-37 37 -37 90.5t37 90.5l907 906q37 37 90.5 37t90.5 -37l125 -125q-56 -56 -56 -136t56 -136t136 -56t136 56l126 -125q37 -37 37 -90.5t-37 -90.5z" />
-<glyph unicode="&#xf146;" d="M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" />
-<glyph unicode="&#xf147;" horiz-adv-x="1408" d="M1152 736v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h832q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5 t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf148;" horiz-adv-x="1024" d="M1018 933q-18 -37 -58 -37h-192v-864q0 -14 -9 -23t-23 -9h-704q-21 0 -29 18q-8 20 4 35l160 192q9 11 25 11h320v640h-192q-40 0 -58 37q-17 37 9 68l320 384q18 22 49 22t49 -22l320 -384q27 -32 9 -68z" />
-<glyph unicode="&#xf149;" horiz-adv-x="1024" d="M32 1280h704q13 0 22.5 -9.5t9.5 -23.5v-863h192q40 0 58 -37t-9 -69l-320 -384q-18 -22 -49 -22t-49 22l-320 384q-26 31 -9 69q18 37 58 37h192v640h-320q-14 0 -25 11l-160 192q-13 14 -4 34q9 19 29 19z" />
-<glyph unicode="&#xf14a;" d="M685 237l614 614q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-467 -467l-211 211q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l358 -358q19 -19 45 -19t45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5 t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf14b;" d="M404 428l152 -152l-52 -52h-56v96h-96v56zM818 818q14 -13 -3 -30l-291 -291q-17 -17 -30 -3q-14 13 3 30l291 291q17 17 30 3zM544 128l544 544l-288 288l-544 -544v-288h288zM1152 736l92 92q28 28 28 68t-28 68l-152 152q-28 28 -68 28t-68 -28l-92 -92zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf14c;" d="M1280 608v480q0 26 -19 45t-45 19h-480q-42 0 -59 -39q-17 -41 14 -70l144 -144l-534 -534q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l534 534l144 -144q18 -19 45 -19q12 0 25 5q39 17 39 59zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf14d;" d="M1005 435l352 352q19 19 19 45t-19 45l-352 352q-30 31 -69 14q-40 -17 -40 -59v-160q-119 0 -216 -19.5t-162.5 -51t-114 -79t-76.5 -95.5t-44.5 -109t-21.5 -111.5t-5 -110.5q0 -181 167 -404q10 -12 25 -12q7 0 13 3q22 9 19 33q-44 354 62 473q46 52 130 75.5 t224 23.5v-160q0 -42 40 -59q12 -5 24 -5q26 0 45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf14e;" d="M640 448l256 128l-256 128v-256zM1024 1039v-542l-512 -256v542zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf150;" d="M1145 861q18 -35 -5 -66l-320 -448q-19 -27 -52 -27t-52 27l-320 448q-23 31 -5 66q17 35 57 35h640q40 0 57 -35zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf151;" d="M1145 419q-17 -35 -57 -35h-640q-40 0 -57 35q-18 35 5 66l320 448q19 27 52 27t52 -27l320 -448q23 -31 5 -66zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf152;" d="M1088 640q0 -33 -27 -52l-448 -320q-31 -23 -66 -5q-35 17 -35 57v640q0 40 35 57q35 18 66 -5l448 -320q27 -19 27 -52zM1280 160v960q0 14 -9 23t-23 9h-960q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h960q14 0 23 9t9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf153;" horiz-adv-x="1024" d="M976 229l35 -159q3 -12 -3 -22.5t-17 -14.5l-5 -1q-4 -2 -10.5 -3.5t-16 -4.5t-21.5 -5.5t-25.5 -5t-30 -5t-33.5 -4.5t-36.5 -3t-38.5 -1q-234 0 -409 130.5t-238 351.5h-95q-13 0 -22.5 9.5t-9.5 22.5v113q0 13 9.5 22.5t22.5 9.5h66q-2 57 1 105h-67q-14 0 -23 9 t-9 23v114q0 14 9 23t23 9h98q67 210 243.5 338t400.5 128q102 0 194 -23q11 -3 20 -15q6 -11 3 -24l-43 -159q-3 -13 -14 -19.5t-24 -2.5l-4 1q-4 1 -11.5 2.5l-17.5 3.5t-22.5 3.5t-26 3t-29 2.5t-29.5 1q-126 0 -226 -64t-150 -176h468q16 0 25 -12q10 -12 7 -26 l-24 -114q-5 -26 -32 -26h-488q-3 -37 0 -105h459q15 0 25 -12q9 -12 6 -27l-24 -112q-2 -11 -11 -18.5t-20 -7.5h-387q48 -117 149.5 -185.5t228.5 -68.5q18 0 36 1.5t33.5 3.5t29.5 4.5t24.5 5t18.5 4.5l12 3l5 2q13 5 26 -2q12 -7 15 -21z" />
-<glyph unicode="&#xf154;" horiz-adv-x="1024" d="M1020 399v-367q0 -14 -9 -23t-23 -9h-956q-14 0 -23 9t-9 23v150q0 13 9.5 22.5t22.5 9.5h97v383h-95q-14 0 -23 9.5t-9 22.5v131q0 14 9 23t23 9h95v223q0 171 123.5 282t314.5 111q185 0 335 -125q9 -8 10 -20.5t-7 -22.5l-103 -127q-9 -11 -22 -12q-13 -2 -23 7 q-5 5 -26 19t-69 32t-93 18q-85 0 -137 -47t-52 -123v-215h305q13 0 22.5 -9t9.5 -23v-131q0 -13 -9.5 -22.5t-22.5 -9.5h-305v-379h414v181q0 13 9 22.5t23 9.5h162q14 0 23 -9.5t9 -22.5z" />
-<glyph unicode="&#xf155;" horiz-adv-x="1024" d="M978 351q0 -153 -99.5 -263.5t-258.5 -136.5v-175q0 -14 -9 -23t-23 -9h-135q-13 0 -22.5 9.5t-9.5 22.5v175q-66 9 -127.5 31t-101.5 44.5t-74 48t-46.5 37.5t-17.5 18q-17 21 -2 41l103 135q7 10 23 12q15 2 24 -9l2 -2q113 -99 243 -125q37 -8 74 -8q81 0 142.5 43 t61.5 122q0 28 -15 53t-33.5 42t-58.5 37.5t-66 32t-80 32.5q-39 16 -61.5 25t-61.5 26.5t-62.5 31t-56.5 35.5t-53.5 42.5t-43.5 49t-35.5 58t-21 66.5t-8.5 78q0 138 98 242t255 134v180q0 13 9.5 22.5t22.5 9.5h135q14 0 23 -9t9 -23v-176q57 -6 110.5 -23t87 -33.5 t63.5 -37.5t39 -29t15 -14q17 -18 5 -38l-81 -146q-8 -15 -23 -16q-14 -3 -27 7q-3 3 -14.5 12t-39 26.5t-58.5 32t-74.5 26t-85.5 11.5q-95 0 -155 -43t-60 -111q0 -26 8.5 -48t29.5 -41.5t39.5 -33t56 -31t60.5 -27t70 -27.5q53 -20 81 -31.5t76 -35t75.5 -42.5t62 -50 t53 -63.5t31.5 -76.5t13 -94z" />
-<glyph unicode="&#xf156;" horiz-adv-x="898" d="M898 1066v-102q0 -14 -9 -23t-23 -9h-168q-23 -144 -129 -234t-276 -110q167 -178 459 -536q14 -16 4 -34q-8 -18 -29 -18h-195q-16 0 -25 12q-306 367 -498 571q-9 9 -9 22v127q0 13 9.5 22.5t22.5 9.5h112q132 0 212.5 43t102.5 125h-427q-14 0 -23 9t-9 23v102 q0 14 9 23t23 9h413q-57 113 -268 113h-145q-13 0 -22.5 9.5t-9.5 22.5v133q0 14 9 23t23 9h832q14 0 23 -9t9 -23v-102q0 -14 -9 -23t-23 -9h-233q47 -61 64 -144h171q14 0 23 -9t9 -23z" />
-<glyph unicode="&#xf157;" horiz-adv-x="1027" d="M603 0h-172q-13 0 -22.5 9t-9.5 23v330h-288q-13 0 -22.5 9t-9.5 23v103q0 13 9.5 22.5t22.5 9.5h288v85h-288q-13 0 -22.5 9t-9.5 23v104q0 13 9.5 22.5t22.5 9.5h214l-321 578q-8 16 0 32q10 16 28 16h194q19 0 29 -18l215 -425q19 -38 56 -125q10 24 30.5 68t27.5 61 l191 420q8 19 29 19h191q17 0 27 -16q9 -14 1 -31l-313 -579h215q13 0 22.5 -9.5t9.5 -22.5v-104q0 -14 -9.5 -23t-22.5 -9h-290v-85h290q13 0 22.5 -9.5t9.5 -22.5v-103q0 -14 -9.5 -23t-22.5 -9h-290v-330q0 -13 -9.5 -22.5t-22.5 -9.5z" />
-<glyph unicode="&#xf158;" horiz-adv-x="1664" d="M1664 352v-32q0 -132 -94 -226t-226 -94h-128q-132 0 -226 94t-94 226v480h-224q-2 -102 -14.5 -190.5t-30.5 -156t-48.5 -126.5t-57 -99.5t-67.5 -77.5t-69.5 -58.5t-74 -44t-69 -32t-65.5 -25.5q-4 -2 -32 -13q-8 -2 -12 -2q-22 0 -30 20l-71 178q-5 13 0 25t17 17 q7 3 20 7.5t18 6.5q31 12 46.5 18.5t44.5 20t45.5 26t42 32.5t40.5 42.5t34.5 53.5t30.5 68.5t22.5 83.5t17 103t6.5 123h-256q-14 0 -23 9t-9 23v160q0 14 9 23t23 9h1216q14 0 23 -9t9 -23v-160q0 -14 -9 -23t-23 -9h-224v-512q0 -26 19 -45t45 -19h128q26 0 45 19t19 45 v64q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1280 1376v-160q0 -14 -9 -23t-23 -9h-960q-14 0 -23 9t-9 23v160q0 14 9 23t23 9h960q14 0 23 -9t9 -23z" />
-<glyph unicode="&#xf159;" horiz-adv-x="1792" d="M514 341l81 299h-159l75 -300q1 -1 1 -3t1 -3q0 1 0.5 3.5t0.5 3.5zM630 768l35 128h-292l32 -128h225zM822 768h139l-35 128h-70zM1271 340l78 300h-162l81 -299q0 -1 0.5 -3.5t1.5 -3.5q0 1 0.5 3t0.5 3zM1382 768l33 128h-297l34 -128h230zM1792 736v-64q0 -14 -9 -23 t-23 -9h-213l-164 -616q-7 -24 -31 -24h-159q-24 0 -31 24l-166 616h-209l-167 -616q-7 -24 -31 -24h-159q-11 0 -19.5 7t-10.5 17l-160 616h-208q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h175l-33 128h-142q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h109l-89 344q-5 15 5 28 q10 12 26 12h137q26 0 31 -24l90 -360h359l97 360q7 24 31 24h126q24 0 31 -24l98 -360h365l93 360q5 24 31 24h137q16 0 26 -12q10 -13 5 -28l-91 -344h111q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-145l-34 -128h179q14 0 23 -9t9 -23z" />
-<glyph unicode="&#xf15a;" horiz-adv-x="1280" d="M1167 896q18 -182 -131 -258q117 -28 175 -103t45 -214q-7 -71 -32.5 -125t-64.5 -89t-97 -58.5t-121.5 -34.5t-145.5 -15v-255h-154v251q-80 0 -122 1v-252h-154v255q-18 0 -54 0.5t-55 0.5h-200l31 183h111q50 0 58 51v402h16q-6 1 -16 1v287q-13 68 -89 68h-111v164 l212 -1q64 0 97 1v252h154v-247q82 2 122 2v245h154v-252q79 -7 140 -22.5t113 -45t82.5 -78t36.5 -114.5zM952 351q0 36 -15 64t-37 46t-57.5 30.5t-65.5 18.5t-74 9t-69 3t-64.5 -1t-47.5 -1v-338q8 0 37 -0.5t48 -0.5t53 1.5t58.5 4t57 8.5t55.5 14t47.5 21t39.5 30 t24.5 40t9.5 51zM881 827q0 33 -12.5 58.5t-30.5 42t-48 28t-55 16.5t-61.5 8t-58 2.5t-54 -1t-39.5 -0.5v-307q5 0 34.5 -0.5t46.5 0t50 2t55 5.5t51.5 11t48.5 18.5t37 27t27 38.5t9 51z" />
-<glyph unicode="&#xf15b;" horiz-adv-x="1280" d="M1280 768v-800q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h544v-544q0 -40 28 -68t68 -28h544zM1277 896h-509v509q82 -15 132 -65l312 -312q50 -50 65 -132z" />
-<glyph unicode="&#xf15c;" horiz-adv-x="1280" d="M1024 160v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM1024 416v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM1280 768v-800q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28 t-28 68v1344q0 40 28 68t68 28h544v-544q0 -40 28 -68t68 -28h544zM1277 896h-509v509q82 -15 132 -65l312 -312q50 -50 65 -132z" />
-<glyph unicode="&#xf15d;" horiz-adv-x="1664" d="M1191 1128h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1572 -23 v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -11v-2l14 2q9 2 30 2h248v119h121zM1661 874v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162 l230 -662h70z" />
-<glyph unicode="&#xf15e;" horiz-adv-x="1664" d="M1191 104h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1661 -150 v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162l230 -662h70zM1572 1001v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -10v-3l14 3q9 1 30 1h248 v119h121z" />
-<glyph unicode="&#xf160;" horiz-adv-x="1792" d="M736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1792 -32v-192q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832 q14 0 23 -9t9 -23zM1600 480v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1408 992v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1216 1504v-192q0 -14 -9 -23t-23 -9h-256 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23z" />
-<glyph unicode="&#xf161;" horiz-adv-x="1792" d="M1216 -32v-192q0 -14 -9 -23t-23 -9h-256q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192 q14 0 23 -9t9 -23zM1408 480v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1600 992v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1792 1504v-192q0 -14 -9 -23t-23 -9h-832 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832q14 0 23 -9t9 -23z" />
-<glyph unicode="&#xf162;" d="M1346 223q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23 zM1486 165q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5 t82 -252.5zM1456 882v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165z" />
-<glyph unicode="&#xf163;" d="M1346 1247q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9 t9 -23zM1456 -142v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165zM1486 1189q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13 q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5t82 -252.5z" />
-<glyph unicode="&#xf164;" horiz-adv-x="1664" d="M256 192q0 26 -19 45t-45 19q-27 0 -45.5 -19t-18.5 -45q0 -27 18.5 -45.5t45.5 -18.5q26 0 45 18.5t19 45.5zM416 704v-640q0 -26 -19 -45t-45 -19h-288q-26 0 -45 19t-19 45v640q0 26 19 45t45 19h288q26 0 45 -19t19 -45zM1600 704q0 -86 -55 -149q15 -44 15 -76 q3 -76 -43 -137q17 -56 0 -117q-15 -57 -54 -94q9 -112 -49 -181q-64 -76 -197 -78h-36h-76h-17q-66 0 -144 15.5t-121.5 29t-120.5 39.5q-123 43 -158 44q-26 1 -45 19.5t-19 44.5v641q0 25 18 43.5t43 20.5q24 2 76 59t101 121q68 87 101 120q18 18 31 48t17.5 48.5 t13.5 60.5q7 39 12.5 61t19.5 52t34 50q19 19 45 19q46 0 82.5 -10.5t60 -26t40 -40.5t24 -45t12 -50t5 -45t0.5 -39q0 -38 -9.5 -76t-19 -60t-27.5 -56q-3 -6 -10 -18t-11 -22t-8 -24h277q78 0 135 -57t57 -135z" />
-<glyph unicode="&#xf165;" horiz-adv-x="1664" d="M256 960q0 -26 -19 -45t-45 -19q-27 0 -45.5 19t-18.5 45q0 27 18.5 45.5t45.5 18.5q26 0 45 -18.5t19 -45.5zM416 448v640q0 26 -19 45t-45 19h-288q-26 0 -45 -19t-19 -45v-640q0 -26 19 -45t45 -19h288q26 0 45 19t19 45zM1545 597q55 -61 55 -149q-1 -78 -57.5 -135 t-134.5 -57h-277q4 -14 8 -24t11 -22t10 -18q18 -37 27 -57t19 -58.5t10 -76.5q0 -24 -0.5 -39t-5 -45t-12 -50t-24 -45t-40 -40.5t-60 -26t-82.5 -10.5q-26 0 -45 19q-20 20 -34 50t-19.5 52t-12.5 61q-9 42 -13.5 60.5t-17.5 48.5t-31 48q-33 33 -101 120q-49 64 -101 121 t-76 59q-25 2 -43 20.5t-18 43.5v641q0 26 19 44.5t45 19.5q35 1 158 44q77 26 120.5 39.5t121.5 29t144 15.5h17h76h36q133 -2 197 -78q58 -69 49 -181q39 -37 54 -94q17 -61 0 -117q46 -61 43 -137q0 -32 -15 -76z" />
-<glyph unicode="&#xf166;" d="M919 233v157q0 50 -29 50q-17 0 -33 -16v-224q16 -16 33 -16q29 0 29 49zM1103 355h66v34q0 51 -33 51t-33 -51v-34zM532 621v-70h-80v-423h-74v423h-78v70h232zM733 495v-367h-67v40q-39 -45 -76 -45q-33 0 -42 28q-6 16 -6 54v290h66v-270q0 -24 1 -26q1 -15 15 -15 q20 0 42 31v280h67zM985 384v-146q0 -52 -7 -73q-12 -42 -53 -42q-35 0 -68 41v-36h-67v493h67v-161q32 40 68 40q41 0 53 -42q7 -21 7 -74zM1236 255v-9q0 -29 -2 -43q-3 -22 -15 -40q-27 -40 -80 -40q-52 0 -81 38q-21 27 -21 86v129q0 59 20 86q29 38 80 38t78 -38 q21 -28 21 -86v-76h-133v-65q0 -51 34 -51q24 0 30 26q0 1 0.5 7t0.5 16.5v21.5h68zM785 1079v-156q0 -51 -32 -51t-32 51v156q0 52 32 52t32 -52zM1318 366q0 177 -19 260q-10 44 -43 73.5t-76 34.5q-136 15 -412 15q-275 0 -411 -15q-44 -5 -76.5 -34.5t-42.5 -73.5 q-20 -87 -20 -260q0 -176 20 -260q10 -43 42.5 -73t75.5 -35q137 -15 412 -15t412 15q43 5 75.5 35t42.5 73q20 84 20 260zM563 1017l90 296h-75l-51 -195l-53 195h-78l24 -69t23 -69q35 -103 46 -158v-201h74v201zM852 936v130q0 58 -21 87q-29 38 -78 38q-51 0 -78 -38 q-21 -29 -21 -87v-130q0 -58 21 -87q27 -38 78 -38q49 0 78 38q21 27 21 87zM1033 816h67v370h-67v-283q-22 -31 -42 -31q-15 0 -16 16q-1 2 -1 26v272h-67v-293q0 -37 6 -55q11 -27 43 -27q36 0 77 45v-40zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf167;" d="M971 292v-211q0 -67 -39 -67q-23 0 -45 22v301q22 22 45 22q39 0 39 -67zM1309 291v-46h-90v46q0 68 45 68t45 -68zM343 509h107v94h-312v-94h105v-569h100v569zM631 -60h89v494h-89v-378q-30 -42 -57 -42q-18 0 -21 21q-1 3 -1 35v364h-89v-391q0 -49 8 -73 q12 -37 58 -37q48 0 102 61v-54zM1060 88v197q0 73 -9 99q-17 56 -71 56q-50 0 -93 -54v217h-89v-663h89v48q45 -55 93 -55q54 0 71 55q9 27 9 100zM1398 98v13h-91q0 -51 -2 -61q-7 -36 -40 -36q-46 0 -46 69v87h179v103q0 79 -27 116q-39 51 -106 51q-68 0 -107 -51 q-28 -37 -28 -116v-173q0 -79 29 -116q39 -51 108 -51q72 0 108 53q18 27 21 54q2 9 2 58zM790 1011v210q0 69 -43 69t-43 -69v-210q0 -70 43 -70t43 70zM1509 260q0 -234 -26 -350q-14 -59 -58 -99t-102 -46q-184 -21 -555 -21t-555 21q-58 6 -102.5 46t-57.5 99 q-26 112 -26 350q0 234 26 350q14 59 58 99t103 47q183 20 554 20t555 -20q58 -7 102.5 -47t57.5 -99q26 -112 26 -350zM511 1536h102l-121 -399v-271h-100v271q-14 74 -61 212q-37 103 -65 187h106l71 -263zM881 1203v-175q0 -81 -28 -118q-37 -51 -106 -51q-67 0 -105 51 q-28 38 -28 118v175q0 80 28 117q38 51 105 51q69 0 106 -51q28 -37 28 -117zM1216 1365v-499h-91v55q-53 -62 -103 -62q-46 0 -59 37q-8 24 -8 75v394h91v-367q0 -33 1 -35q3 -22 21 -22q27 0 57 43v381h91z" />
-<glyph unicode="&#xf168;" horiz-adv-x="1408" d="M597 869q-10 -18 -257 -456q-27 -46 -65 -46h-239q-21 0 -31 17t0 36l253 448q1 0 0 1l-161 279q-12 22 -1 37q9 15 32 15h239q40 0 66 -45zM1403 1511q11 -16 0 -37l-528 -934v-1l336 -615q11 -20 1 -37q-10 -15 -32 -15h-239q-42 0 -66 45l-339 622q18 32 531 942 q25 45 64 45h241q22 0 31 -15z" />
-<glyph unicode="&#xf169;" d="M685 771q0 1 -126 222q-21 34 -52 34h-184q-18 0 -26 -11q-7 -12 1 -29l125 -216v-1l-196 -346q-9 -14 0 -28q8 -13 24 -13h185q31 0 50 36zM1309 1268q-7 12 -24 12h-187q-30 0 -49 -35l-411 -729q1 -2 262 -481q20 -35 52 -35h184q18 0 25 12q8 13 -1 28l-260 476v1 l409 723q8 16 0 28zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf16a;" horiz-adv-x="1792" d="M1280 640q0 37 -30 54l-512 320q-31 20 -65 2q-33 -18 -33 -56v-640q0 -38 33 -56q16 -8 31 -8q20 0 34 10l512 320q30 17 30 54zM1792 640q0 -96 -1 -150t-8.5 -136.5t-22.5 -147.5q-16 -73 -69 -123t-124 -58q-222 -25 -671 -25t-671 25q-71 8 -124.5 58t-69.5 123 q-14 65 -21.5 147.5t-8.5 136.5t-1 150t1 150t8.5 136.5t22.5 147.5q16 73 69 123t124 58q222 25 671 25t671 -25q71 -8 124.5 -58t69.5 -123q14 -65 21.5 -147.5t8.5 -136.5t1 -150z" />
-<glyph unicode="&#xf16b;" horiz-adv-x="1792" d="M402 829l494 -305l-342 -285l-490 319zM1388 274v-108l-490 -293v-1l-1 1l-1 -1v1l-489 293v108l147 -96l342 284v2l1 -1l1 1v-2l343 -284zM554 1418l342 -285l-494 -304l-338 270zM1390 829l338 -271l-489 -319l-343 285zM1239 1418l489 -319l-338 -270l-494 304z" />
-<glyph unicode="&#xf16c;" horiz-adv-x="1408" d="M928 135v-151l-707 -1v151zM1169 481v-701l-1 -35v-1h-1132l-35 1h-1v736h121v-618h928v618h120zM241 393l704 -65l-13 -150l-705 65zM309 709l683 -183l-39 -146l-683 183zM472 1058l609 -360l-77 -130l-609 360zM832 1389l398 -585l-124 -85l-399 584zM1285 1536 l121 -697l-149 -26l-121 697z" />
-<glyph unicode="&#xf16d;" d="M1362 110v648h-135q20 -63 20 -131q0 -126 -64 -232.5t-174 -168.5t-240 -62q-197 0 -337 135.5t-140 327.5q0 68 20 131h-141v-648q0 -26 17.5 -43.5t43.5 -17.5h1069q25 0 43 17.5t18 43.5zM1078 643q0 124 -90.5 211.5t-218.5 87.5q-127 0 -217.5 -87.5t-90.5 -211.5 t90.5 -211.5t217.5 -87.5q128 0 218.5 87.5t90.5 211.5zM1362 1003v165q0 28 -20 48.5t-49 20.5h-174q-29 0 -49 -20.5t-20 -48.5v-165q0 -29 20 -49t49 -20h174q29 0 49 20t20 49zM1536 1211v-1142q0 -81 -58 -139t-139 -58h-1142q-81 0 -139 58t-58 139v1142q0 81 58 139 t139 58h1142q81 0 139 -58t58 -139z" />
-<glyph unicode="&#xf16e;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM698 640q0 88 -62 150t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150zM1262 640q0 88 -62 150 t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150z" />
-<glyph unicode="&#xf170;" d="M768 914l201 -306h-402zM1133 384h94l-459 691l-459 -691h94l104 160h522zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf171;" horiz-adv-x="1408" d="M815 677q8 -63 -50.5 -101t-111.5 -6q-39 17 -53.5 58t-0.5 82t52 58q36 18 72.5 12t64 -35.5t27.5 -67.5zM926 698q-14 107 -113 164t-197 13q-63 -28 -100.5 -88.5t-34.5 -129.5q4 -91 77.5 -155t165.5 -56q91 8 152 84t50 168zM1165 1240q-20 27 -56 44.5t-58 22 t-71 12.5q-291 47 -566 -2q-43 -7 -66 -12t-55 -22t-50 -43q30 -28 76 -45.5t73.5 -22t87.5 -11.5q228 -29 448 -1q63 8 89.5 12t72.5 21.5t75 46.5zM1222 205q-8 -26 -15.5 -76.5t-14 -84t-28.5 -70t-58 -56.5q-86 -48 -189.5 -71.5t-202 -22t-201.5 18.5q-46 8 -81.5 18 t-76.5 27t-73 43.5t-52 61.5q-25 96 -57 292l6 16l18 9q223 -148 506.5 -148t507.5 148q21 -6 24 -23t-5 -45t-8 -37zM1403 1166q-26 -167 -111 -655q-5 -30 -27 -56t-43.5 -40t-54.5 -31q-252 -126 -610 -88q-248 27 -394 139q-15 12 -25.5 26.5t-17 35t-9 34t-6 39.5 t-5.5 35q-9 50 -26.5 150t-28 161.5t-23.5 147.5t-22 158q3 26 17.5 48.5t31.5 37.5t45 30t46 22.5t48 18.5q125 46 313 64q379 37 676 -50q155 -46 215 -122q16 -20 16.5 -51t-5.5 -54z" />
-<glyph unicode="&#xf172;" d="M848 666q0 43 -41 66t-77 1q-43 -20 -42.5 -72.5t43.5 -70.5q39 -23 81 4t36 72zM928 682q8 -66 -36 -121t-110 -61t-119 40t-56 113q-2 49 25.5 93t72.5 64q70 31 141.5 -10t81.5 -118zM1100 1073q-20 -21 -53.5 -34t-53 -16t-63.5 -8q-155 -20 -324 0q-44 6 -63 9.5 t-52.5 16t-54.5 32.5q13 19 36 31t40 15.5t47 8.5q198 35 408 1q33 -5 51 -8.5t43 -16t39 -31.5zM1142 327q0 7 5.5 26.5t3 32t-17.5 16.5q-161 -106 -365 -106t-366 106l-12 -6l-5 -12q26 -154 41 -210q47 -81 204 -108q249 -46 428 53q34 19 49 51.5t22.5 85.5t12.5 71z M1272 1020q9 53 -8 75q-43 55 -155 88q-216 63 -487 36q-132 -12 -226 -46q-38 -15 -59.5 -25t-47 -34t-29.5 -54q8 -68 19 -138t29 -171t24 -137q1 -5 5 -31t7 -36t12 -27t22 -28q105 -80 284 -100q259 -28 440 63q24 13 39.5 23t31 29t19.5 40q48 267 80 473zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf173;" horiz-adv-x="1024" d="M390 1408h219v-388h364v-241h-364v-394q0 -136 14 -172q13 -37 52 -60q50 -31 117 -31q117 0 232 76v-242q-102 -48 -178 -65q-77 -19 -173 -19q-105 0 -186 27q-78 25 -138 75q-58 51 -79 105q-22 54 -22 161v539h-170v217q91 30 155 84q64 55 103 132q39 78 54 196z " />
-<glyph unicode="&#xf174;" d="M1123 127v181q-88 -56 -174 -56q-51 0 -88 23q-29 17 -39 45q-11 30 -11 129v295h274v181h-274v291h-164q-11 -90 -40 -147t-78 -99q-48 -40 -116 -63v-163h127v-404q0 -78 17 -121q17 -42 59 -78q43 -37 104 -57q62 -20 140 -20q67 0 129 14q57 13 134 49zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
-<glyph unicode="&#xf175;" horiz-adv-x="768" d="M765 237q8 -19 -5 -35l-350 -384q-10 -10 -23 -10q-14 0 -24 10l-355 384q-13 16 -5 35q9 19 29 19h224v1248q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1248h224q21 0 29 -19z" />
-<glyph unicode="&#xf176;" horiz-adv-x="768" d="M765 1043q-9 -19 -29 -19h-224v-1248q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1248h-224q-21 0 -29 19t5 35l350 384q10 10 23 10q14 0 24 -10l355 -384q13 -16 5 -35z" />
-<glyph unicode="&#xf177;" horiz-adv-x="1792" d="M1792 736v-192q0 -14 -9 -23t-23 -9h-1248v-224q0 -21 -19 -29t-35 5l-384 350q-10 10 -10 23q0 14 10 24l384 354q16 14 35 6q19 -9 19 -29v-224h1248q14 0 23 -9t9 -23z" />
-<glyph unicode="&#xf178;" horiz-adv-x="1792" d="M1728 643q0 -14 -10 -24l-384 -354q-16 -14 -35 -6q-19 9 -19 29v224h-1248q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h1248v224q0 21 19 29t35 -5l384 -350q10 -10 10 -23z" />
-<glyph unicode="&#xf179;" horiz-adv-x="1408" d="M1393 321q-39 -125 -123 -250q-129 -196 -257 -196q-49 0 -140 32q-86 32 -151 32q-61 0 -142 -33q-81 -34 -132 -34q-152 0 -301 259q-147 261 -147 503q0 228 113 374q112 144 284 144q72 0 177 -30q104 -30 138 -30q45 0 143 34q102 34 173 34q119 0 213 -65 q52 -36 104 -100q-79 -67 -114 -118q-65 -94 -65 -207q0 -124 69 -223t158 -126zM1017 1494q0 -61 -29 -136q-30 -75 -93 -138q-54 -54 -108 -72q-37 -11 -104 -17q3 149 78 257q74 107 250 148q1 -3 2.5 -11t2.5 -11q0 -4 0.5 -10t0.5 -10z" />
-<glyph unicode="&#xf17a;" horiz-adv-x="1664" d="M682 530v-651l-682 94v557h682zM682 1273v-659h-682v565zM1664 530v-786l-907 125v661h907zM1664 1408v-794h-907v669z" />
-<glyph unicode="&#xf17b;" horiz-adv-x="1408" d="M493 1053q16 0 27.5 11.5t11.5 27.5t-11.5 27.5t-27.5 11.5t-27 -11.5t-11 -27.5t11 -27.5t27 -11.5zM915 1053q16 0 27 11.5t11 27.5t-11 27.5t-27 11.5t-27.5 -11.5t-11.5 -27.5t11.5 -27.5t27.5 -11.5zM103 869q42 0 72 -30t30 -72v-430q0 -43 -29.5 -73t-72.5 -30 t-73 30t-30 73v430q0 42 30 72t73 30zM1163 850v-666q0 -46 -32 -78t-77 -32h-75v-227q0 -43 -30 -73t-73 -30t-73 30t-30 73v227h-138v-227q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73l-1 227h-74q-46 0 -78 32t-32 78v666h918zM931 1255q107 -55 171 -153.5t64 -215.5 h-925q0 117 64 215.5t172 153.5l-71 131q-7 13 5 20q13 6 20 -6l72 -132q95 42 201 42t201 -42l72 132q7 12 20 6q12 -7 5 -20zM1408 767v-430q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73v430q0 43 30 72.5t72 29.5q43 0 73 -29.5t30 -72.5z" />
-<glyph unicode="&#xf17c;" d="M663 1125q-11 -1 -15.5 -10.5t-8.5 -9.5q-5 -1 -5 5q0 12 19 15h10zM750 1111q-4 -1 -11.5 6.5t-17.5 4.5q24 11 32 -2q3 -6 -3 -9zM399 684q-4 1 -6 -3t-4.5 -12.5t-5.5 -13.5t-10 -13q-7 -10 -1 -12q4 -1 12.5 7t12.5 18q1 3 2 7t2 6t1.5 4.5t0.5 4v3t-1 2.5t-3 2z M1254 325q0 18 -55 42q4 15 7.5 27.5t5 26t3 21.5t0.5 22.5t-1 19.5t-3.5 22t-4 20.5t-5 25t-5.5 26.5q-10 48 -47 103t-72 75q24 -20 57 -83q87 -162 54 -278q-11 -40 -50 -42q-31 -4 -38.5 18.5t-8 83.5t-11.5 107q-9 39 -19.5 69t-19.5 45.5t-15.5 24.5t-13 15t-7.5 7 q-14 62 -31 103t-29.5 56t-23.5 33t-15 40q-4 21 6 53.5t4.5 49.5t-44.5 25q-15 3 -44.5 18t-35.5 16q-8 1 -11 26t8 51t36 27q37 3 51 -30t4 -58q-11 -19 -2 -26.5t30 -0.5q13 4 13 36v37q-5 30 -13.5 50t-21 30.5t-23.5 15t-27 7.5q-107 -8 -89 -134q0 -15 -1 -15 q-9 9 -29.5 10.5t-33 -0.5t-15.5 5q1 57 -16 90t-45 34q-27 1 -41.5 -27.5t-16.5 -59.5q-1 -15 3.5 -37t13 -37.5t15.5 -13.5q10 3 16 14q4 9 -7 8q-7 0 -15.5 14.5t-9.5 33.5q-1 22 9 37t34 14q17 0 27 -21t9.5 -39t-1.5 -22q-22 -15 -31 -29q-8 -12 -27.5 -23.5 t-20.5 -12.5q-13 -14 -15.5 -27t7.5 -18q14 -8 25 -19.5t16 -19t18.5 -13t35.5 -6.5q47 -2 102 15q2 1 23 7t34.5 10.5t29.5 13t21 17.5q9 14 20 8q5 -3 6.5 -8.5t-3 -12t-16.5 -9.5q-20 -6 -56.5 -21.5t-45.5 -19.5q-44 -19 -70 -23q-25 -5 -79 2q-10 2 -9 -2t17 -19 q25 -23 67 -22q17 1 36 7t36 14t33.5 17.5t30 17t24.5 12t17.5 2.5t8.5 -11q0 -2 -1 -4.5t-4 -5t-6 -4.5t-8.5 -5t-9 -4.5t-10 -5t-9.5 -4.5q-28 -14 -67.5 -44t-66.5 -43t-49 -1q-21 11 -63 73q-22 31 -25 22q-1 -3 -1 -10q0 -25 -15 -56.5t-29.5 -55.5t-21 -58t11.5 -63 q-23 -6 -62.5 -90t-47.5 -141q-2 -18 -1.5 -69t-5.5 -59q-8 -24 -29 -3q-32 31 -36 94q-2 28 4 56q4 19 -1 18l-4 -5q-36 -65 10 -166q5 -12 25 -28t24 -20q20 -23 104 -90.5t93 -76.5q16 -15 17.5 -38t-14 -43t-45.5 -23q8 -15 29 -44.5t28 -54t7 -70.5q46 24 7 92 q-4 8 -10.5 16t-9.5 12t-2 6q3 5 13 9.5t20 -2.5q46 -52 166 -36q133 15 177 87q23 38 34 30q12 -6 10 -52q-1 -25 -23 -92q-9 -23 -6 -37.5t24 -15.5q3 19 14.5 77t13.5 90q2 21 -6.5 73.5t-7.5 97t23 70.5q15 18 51 18q1 37 34.5 53t72.5 10.5t60 -22.5zM626 1152 q3 17 -2.5 30t-11.5 15q-9 2 -9 -7q2 -5 5 -6q10 0 7 -15q-3 -20 8 -20q3 0 3 3zM1045 955q-2 8 -6.5 11.5t-13 5t-14.5 5.5q-5 3 -9.5 8t-7 8t-5.5 6.5t-4 4t-4 -1.5q-14 -16 7 -43.5t39 -31.5q9 -1 14.5 8t3.5 20zM867 1168q0 11 -5 19.5t-11 12.5t-9 3q-14 -1 -7 -7l4 -2 q14 -4 18 -31q0 -3 8 2zM921 1401q0 2 -2.5 5t-9 7t-9.5 6q-15 15 -24 15q-9 -1 -11.5 -7.5t-1 -13t-0.5 -12.5q-1 -4 -6 -10.5t-6 -9t3 -8.5q4 -3 8 0t11 9t15 9q1 1 9 1t15 2t9 7zM1486 60q20 -12 31 -24.5t12 -24t-2.5 -22.5t-15.5 -22t-23.5 -19.5t-30 -18.5 t-31.5 -16.5t-32 -15.5t-27 -13q-38 -19 -85.5 -56t-75.5 -64q-17 -16 -68 -19.5t-89 14.5q-18 9 -29.5 23.5t-16.5 25.5t-22 19.5t-47 9.5q-44 1 -130 1q-19 0 -57 -1.5t-58 -2.5q-44 -1 -79.5 -15t-53.5 -30t-43.5 -28.5t-53.5 -11.5q-29 1 -111 31t-146 43q-19 4 -51 9.5 t-50 9t-39.5 9.5t-33.5 14.5t-17 19.5q-10 23 7 66.5t18 54.5q1 16 -4 40t-10 42.5t-4.5 36.5t10.5 27q14 12 57 14t60 12q30 18 42 35t12 51q21 -73 -32 -106q-32 -20 -83 -15q-34 3 -43 -10q-13 -15 5 -57q2 -6 8 -18t8.5 -18t4.5 -17t1 -22q0 -15 -17 -49t-14 -48 q3 -17 37 -26q20 -6 84.5 -18.5t99.5 -20.5q24 -6 74 -22t82.5 -23t55.5 -4q43 6 64.5 28t23 48t-7.5 58.5t-19 52t-20 36.5q-121 190 -169 242q-68 74 -113 40q-11 -9 -15 15q-3 16 -2 38q1 29 10 52t24 47t22 42q8 21 26.5 72t29.5 78t30 61t39 54q110 143 124 195 q-12 112 -16 310q-2 90 24 151.5t106 104.5q39 21 104 21q53 1 106 -13.5t89 -41.5q57 -42 91.5 -121.5t29.5 -147.5q-5 -95 30 -214q34 -113 133 -218q55 -59 99.5 -163t59.5 -191q8 -49 5 -84.5t-12 -55.5t-20 -22q-10 -2 -23.5 -19t-27 -35.5t-40.5 -33.5t-61 -14 q-18 1 -31.5 5t-22.5 13.5t-13.5 15.5t-11.5 20.5t-9 19.5q-22 37 -41 30t-28 -49t7 -97q20 -70 1 -195q-10 -65 18 -100.5t73 -33t85 35.5q59 49 89.5 66.5t103.5 42.5q53 18 77 36.5t18.5 34.5t-25 28.5t-51.5 23.5q-33 11 -49.5 48t-15 72.5t15.5 47.5q1 -31 8 -56.5 t14.5 -40.5t20.5 -28.5t21 -19t21.5 -13t16.5 -9.5z" />
-<glyph unicode="&#xf17d;" d="M1024 36q-42 241 -140 498h-2l-2 -1q-16 -6 -43 -16.5t-101 -49t-137 -82t-131 -114.5t-103 -148l-15 11q184 -150 418 -150q132 0 256 52zM839 643q-21 49 -53 111q-311 -93 -673 -93q-1 -7 -1 -21q0 -124 44 -236.5t124 -201.5q50 89 123.5 166.5t142.5 124.5t130.5 81 t99.5 48l37 13q4 1 13 3.5t13 4.5zM732 855q-120 213 -244 378q-138 -65 -234 -186t-128 -272q302 0 606 80zM1416 536q-210 60 -409 29q87 -239 128 -469q111 75 185 189.5t96 250.5zM611 1277q-1 0 -2 -1q1 1 2 1zM1201 1132q-185 164 -433 164q-76 0 -155 -19 q131 -170 246 -382q69 26 130 60.5t96.5 61.5t65.5 57t37.5 40.5zM1424 647q-3 232 -149 410l-1 -1q-9 -12 -19 -24.5t-43.5 -44.5t-71 -60.5t-100 -65t-131.5 -64.5q25 -53 44 -95q2 -6 6.5 -17.5t7.5 -16.5q36 5 74.5 7t73.5 2t69 -1.5t64 -4t56.5 -5.5t48 -6.5t36.5 -6 t25 -4.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf17e;" d="M1173 473q0 50 -19.5 91.5t-48.5 68.5t-73 49t-82.5 34t-87.5 23l-104 24q-30 7 -44 10.5t-35 11.5t-30 16t-16.5 21t-7.5 30q0 77 144 77q43 0 77 -12t54 -28.5t38 -33.5t40 -29t48 -12q47 0 75.5 32t28.5 77q0 55 -56 99.5t-142 67.5t-182 23q-68 0 -132 -15.5 t-119.5 -47t-89 -87t-33.5 -128.5q0 -61 19 -106.5t56 -75.5t80 -48.5t103 -32.5l146 -36q90 -22 112 -36q32 -20 32 -60q0 -39 -40 -64.5t-105 -25.5q-51 0 -91.5 16t-65 38.5t-45.5 45t-46 38.5t-54 16q-50 0 -75.5 -30t-25.5 -75q0 -92 122 -157.5t291 -65.5 q73 0 140 18.5t122.5 53.5t88.5 93.5t33 131.5zM1536 256q0 -159 -112.5 -271.5t-271.5 -112.5q-130 0 -234 80q-77 -16 -150 -16q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5q0 73 16 150q-80 104 -80 234q0 159 112.5 271.5t271.5 112.5q130 0 234 -80 q77 16 150 16q143 0 273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -73 -16 -150q80 -104 80 -234z" />
-<glyph unicode="&#xf180;" horiz-adv-x="1664" d="M1483 512l-587 -587q-52 -53 -127.5 -53t-128.5 53l-587 587q-53 53 -53 128t53 128l587 587q53 53 128 53t128 -53l265 -265l-398 -399l-188 188q-42 42 -99 42q-59 0 -100 -41l-120 -121q-42 -40 -42 -99q0 -58 42 -100l406 -408q30 -28 67 -37l6 -4h28q60 0 99 41 l619 619l2 -3q53 -53 53 -128t-53 -128zM1406 1138l120 -120q14 -15 14 -36t-14 -36l-730 -730q-17 -15 -37 -15v0q-4 0 -6 1q-18 2 -30 14l-407 408q-14 15 -14 36t14 35l121 120q13 15 35 15t36 -15l252 -252l574 575q15 15 36 15t36 -15z" />
-<glyph unicode="&#xf181;" d="M704 192v1024q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-1024q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1376 576v640q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-640q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408 q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf182;" horiz-adv-x="1280" d="M1280 480q0 -40 -28 -68t-68 -28q-51 0 -80 43l-227 341h-45v-132l247 -411q9 -15 9 -33q0 -26 -19 -45t-45 -19h-192v-272q0 -46 -33 -79t-79 -33h-160q-46 0 -79 33t-33 79v272h-192q-26 0 -45 19t-19 45q0 18 9 33l247 411v132h-45l-227 -341q-29 -43 -80 -43 q-40 0 -68 28t-28 68q0 29 16 53l256 384q73 107 176 107h384q103 0 176 -107l256 -384q16 -24 16 -53zM864 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
-<glyph unicode="&#xf183;" horiz-adv-x="1024" d="M1024 832v-416q0 -40 -28 -68t-68 -28t-68 28t-28 68v352h-64v-912q0 -46 -33 -79t-79 -33t-79 33t-33 79v464h-64v-464q0 -46 -33 -79t-79 -33t-79 33t-33 79v912h-64v-352q0 -40 -28 -68t-68 -28t-68 28t-28 68v416q0 80 56 136t136 56h640q80 0 136 -56t56 -136z M736 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
-<glyph unicode="&#xf184;" d="M773 234l350 473q16 22 24.5 59t-6 85t-61.5 79q-40 26 -83 25.5t-73.5 -17.5t-54.5 -45q-36 -40 -96 -40q-59 0 -95 40q-24 28 -54.5 45t-73.5 17.5t-84 -25.5q-46 -31 -60.5 -79t-6 -85t24.5 -59zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
-<glyph unicode="&#xf185;" horiz-adv-x="1792" d="M1472 640q0 117 -45.5 223.5t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5t45.5 -223.5t123 -184t184 -123t223.5 -45.5t223.5 45.5t184 123t123 184t45.5 223.5zM1748 363q-4 -15 -20 -20l-292 -96v-306q0 -16 -13 -26q-15 -10 -29 -4 l-292 94l-180 -248q-10 -13 -26 -13t-26 13l-180 248l-292 -94q-14 -6 -29 4q-13 10 -13 26v306l-292 96q-16 5 -20 20q-5 17 4 29l180 248l-180 248q-9 13 -4 29q4 15 20 20l292 96v306q0 16 13 26q15 10 29 4l292 -94l180 248q9 12 26 12t26 -12l180 -248l292 94 q14 6 29 -4q13 -10 13 -26v-306l292 -96q16 -5 20 -20q5 -16 -4 -29l-180 -248l180 -248q9 -12 4 -29z" />
-<glyph unicode="&#xf186;" d="M1262 233q-54 -9 -110 -9q-182 0 -337 90t-245 245t-90 337q0 192 104 357q-201 -60 -328.5 -229t-127.5 -384q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51q144 0 273.5 61.5t220.5 171.5zM1465 318q-94 -203 -283.5 -324.5t-413.5 -121.5q-156 0 -298 61 t-245 164t-164 245t-61 298q0 153 57.5 292.5t156 241.5t235.5 164.5t290 68.5q44 2 61 -39q18 -41 -15 -72q-86 -78 -131.5 -181.5t-45.5 -218.5q0 -148 73 -273t198 -198t273 -73q118 0 228 51q41 18 72 -13q14 -14 17.5 -34t-4.5 -38z" />
-<glyph unicode="&#xf187;" horiz-adv-x="1792" d="M1088 704q0 26 -19 45t-45 19h-256q-26 0 -45 -19t-19 -45t19 -45t45 -19h256q26 0 45 19t19 45zM1664 896v-960q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v960q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1728 1344v-256q0 -26 -19 -45t-45 -19h-1536 q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1536q26 0 45 -19t19 -45z" />
-<glyph unicode="&#xf188;" horiz-adv-x="1664" d="M1632 576q0 -26 -19 -45t-45 -19h-224q0 -171 -67 -290l208 -209q19 -19 19 -45t-19 -45q-18 -19 -45 -19t-45 19l-198 197q-5 -5 -15 -13t-42 -28.5t-65 -36.5t-82 -29t-97 -13v896h-128v-896q-51 0 -101.5 13.5t-87 33t-66 39t-43.5 32.5l-15 14l-183 -207 q-20 -21 -48 -21q-24 0 -43 16q-19 18 -20.5 44.5t15.5 46.5l202 227q-58 114 -58 274h-224q-26 0 -45 19t-19 45t19 45t45 19h224v294l-173 173q-19 19 -19 45t19 45t45 19t45 -19l173 -173h844l173 173q19 19 45 19t45 -19t19 -45t-19 -45l-173 -173v-294h224q26 0 45 -19 t19 -45zM1152 1152h-640q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5z" />
-<glyph unicode="&#xf189;" horiz-adv-x="1920" d="M1917 1016q23 -64 -150 -294q-24 -32 -65 -85q-78 -100 -90 -131q-17 -41 14 -81q17 -21 81 -82h1l1 -1l1 -1l2 -2q141 -131 191 -221q3 -5 6.5 -12.5t7 -26.5t-0.5 -34t-25 -27.5t-59 -12.5l-256 -4q-24 -5 -56 5t-52 22l-20 12q-30 21 -70 64t-68.5 77.5t-61 58 t-56.5 15.5q-3 -1 -8 -3.5t-17 -14.5t-21.5 -29.5t-17 -52t-6.5 -77.5q0 -15 -3.5 -27.5t-7.5 -18.5l-4 -5q-18 -19 -53 -22h-115q-71 -4 -146 16.5t-131.5 53t-103 66t-70.5 57.5l-25 24q-10 10 -27.5 30t-71.5 91t-106 151t-122.5 211t-130.5 272q-6 16 -6 27t3 16l4 6 q15 19 57 19l274 2q12 -2 23 -6.5t16 -8.5l5 -3q16 -11 24 -32q20 -50 46 -103.5t41 -81.5l16 -29q29 -60 56 -104t48.5 -68.5t41.5 -38.5t34 -14t27 5q2 1 5 5t12 22t13.5 47t9.5 81t0 125q-2 40 -9 73t-14 46l-6 12q-25 34 -85 43q-13 2 5 24q17 19 38 30q53 26 239 24 q82 -1 135 -13q20 -5 33.5 -13.5t20.5 -24t10.5 -32t3.5 -45.5t-1 -55t-2.5 -70.5t-1.5 -82.5q0 -11 -1 -42t-0.5 -48t3.5 -40.5t11.5 -39t22.5 -24.5q8 -2 17 -4t26 11t38 34.5t52 67t68 107.5q60 104 107 225q4 10 10 17.5t11 10.5l4 3l5 2.5t13 3t20 0.5l288 2 q39 5 64 -2.5t31 -16.5z" />
-<glyph unicode="&#xf18a;" horiz-adv-x="1792" d="M675 252q21 34 11 69t-45 50q-34 14 -73 1t-60 -46q-22 -34 -13 -68.5t43 -50.5t74.5 -2.5t62.5 47.5zM769 373q8 13 3.5 26.5t-17.5 18.5q-14 5 -28.5 -0.5t-21.5 -18.5q-17 -31 13 -45q14 -5 29 0.5t22 18.5zM943 266q-45 -102 -158 -150t-224 -12 q-107 34 -147.5 126.5t6.5 187.5q47 93 151.5 139t210.5 19q111 -29 158.5 -119.5t2.5 -190.5zM1255 426q-9 96 -89 170t-208.5 109t-274.5 21q-223 -23 -369.5 -141.5t-132.5 -264.5q9 -96 89 -170t208.5 -109t274.5 -21q223 23 369.5 141.5t132.5 264.5zM1563 422 q0 -68 -37 -139.5t-109 -137t-168.5 -117.5t-226 -83t-270.5 -31t-275 33.5t-240.5 93t-171.5 151t-65 199.5q0 115 69.5 245t197.5 258q169 169 341.5 236t246.5 -7q65 -64 20 -209q-4 -14 -1 -20t10 -7t14.5 0.5t13.5 3.5l6 2q139 59 246 59t153 -61q45 -63 0 -178 q-2 -13 -4.5 -20t4.5 -12.5t12 -7.5t17 -6q57 -18 103 -47t80 -81.5t34 -116.5zM1489 1046q42 -47 54.5 -108.5t-6.5 -117.5q-8 -23 -29.5 -34t-44.5 -4q-23 8 -34 29.5t-4 44.5q20 63 -24 111t-107 35q-24 -5 -45 8t-25 37q-5 24 8 44.5t37 25.5q60 13 119 -5.5t101 -65.5z M1670 1209q87 -96 112.5 -222.5t-13.5 -241.5q-9 -27 -34 -40t-52 -4t-40 34t-5 52q28 82 10 172t-80 158q-62 69 -148 95.5t-173 8.5q-28 -6 -52 9.5t-30 43.5t9.5 51.5t43.5 29.5q123 26 244 -11.5t208 -134.5z" />
-<glyph unicode="&#xf18b;" horiz-adv-x="1920" d="M805 163q-122 -67 -261 -67q-141 0 -261 67q98 61 167 149t94 191q25 -103 94 -191t167 -149zM453 1176v-344q0 -179 -89.5 -326t-234.5 -217q-129 152 -129 351q0 200 129.5 352t323.5 184zM958 991q-128 -152 -128 -351q0 -201 128 -351q-145 70 -234.5 218t-89.5 328 v341q196 -33 324 -185zM1638 163q-122 -67 -261 -67q-141 0 -261 67q98 61 167 149t94 191q25 -103 94 -191t167 -149zM1286 1176v-344q0 -179 -91 -326t-237 -217v0q133 154 133 351q0 195 -133 351q129 151 328 185zM1920 640q0 -201 -129 -351q-145 70 -234.5 218 t-89.5 328v341q194 -32 323.5 -184t129.5 -352z" />
-<glyph unicode="&#xf18c;" horiz-adv-x="1792" />
-<glyph unicode="&#xf18d;" horiz-adv-x="1792" />
-<glyph unicode="&#xf18e;" horiz-adv-x="1792" />
-<glyph unicode="&#xf500;" horiz-adv-x="1792" />
-</font>
-</defs></svg> \ No newline at end of file
diff --git a/share/www/fauxton/img/fontawesome-webfont.ttf b/share/www/fauxton/img/fontawesome-webfont.ttf
deleted file mode 100644
index d36592469..000000000
--- a/share/www/fauxton/img/fontawesome-webfont.ttf
+++ /dev/null
Binary files differ
diff --git a/share/www/fauxton/img/fontawesome-webfont.woff b/share/www/fauxton/img/fontawesome-webfont.woff
deleted file mode 100644
index b9bd17e15..000000000
--- a/share/www/fauxton/img/fontawesome-webfont.woff
+++ /dev/null
Binary files differ
diff --git a/share/www/fauxton/img/fontcustom_fauxton.eot b/share/www/fauxton/img/fontcustom_fauxton.eot
deleted file mode 100644
index 48ed90d6a..000000000
--- a/share/www/fauxton/img/fontcustom_fauxton.eot
+++ /dev/null
Binary files differ
diff --git a/share/www/fauxton/img/fontcustom_fauxton.svg b/share/www/fauxton/img/fontcustom_fauxton.svg
deleted file mode 100644
index 79459f3d7..000000000
--- a/share/www/fauxton/img/fontcustom_fauxton.svg
+++ /dev/null
@@ -1,200 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
-<!--
-2013-7-2: Created.
--->
-<svg xmlns="http://www.w3.org/2000/svg">
-<metadata>
-Created by FontForge 20120731 at Tue Jul 2 15:07:12 2013
- By Sue Lockwood
-Created by Sue Lockwood with FontForge 2.0 (http://fontforge.sf.net)
-</metadata>
-<defs>
-<font id="fontcustom_fauxton" horiz-adv-x="512" >
- <font-face
- font-family="fontcustom_fauxton"
- font-weight="500"
- font-stretch="normal"
- units-per-em="512"
- panose-1="2 0 6 9 0 0 0 0 0 0"
- ascent="448"
- descent="-64"
- bbox="0 -63.7441 512.201 448"
- underline-thickness="25.6"
- underline-position="-51.2"
- unicode-range="U+F100-F125"
- />
- <missing-glyph />
- <glyph glyph-name="uniF100" unicode="&#xf100;"
-d="M2.43164 128.608v142.632h507.137v-142.632h-507.137zM2.43164 81.0635h507.137v-142.632h-507.137v142.632zM493.72 -45.7197v110.936h-95.0879v-110.936h95.0879zM2.43164 445.568h507.137v-110.937h-507.137v110.937zM493.72 350.479v79.2402h-253.567v-79.2402
-h253.567z" />
- <glyph glyph-name="uniF101" unicode="&#xf101;"
-d="M478.972 2.39355c-48.708 -2.12891 -141.553 -10.46 -191.938 -36.6318c-2.37891 -15.2148 -14.9824 -27.0264 -30.8662 -27.0264c-15.8828 0 -28.4561 11.8115 -30.8652 27.0264c-50.3545 26.1719 -143.23 34.5029 -191.938 36.6318
-c-17.5615 0 -31.8291 14.2354 -31.8291 31.8281v381.949c0 17.5625 14.2676 31.8291 31.8291 31.8291c1.11914 0 2.03613 -0.543945 3.1543 -0.637695c218.887 -5.6416 219.648 -63.0205 219.648 -63.0205s0.761719 57.3789 219.648 63.0205
-c1.11914 0.09375 2.03613 0.637695 3.15527 0.637695c17.5928 0 31.8291 -14.2666 31.8291 -31.8291v-381.949c0 -17.5928 -14.2363 -31.8281 -31.8291 -31.8281zM224.34 348.254c-41.0615 20.8721 -108.978 29.5605 -159.146 33.2598v-317.202
-c85.4316 -4.32129 133.237 -17.127 159.146 -30.0898v314.032zM447.143 381.514c-50.1689 -3.69922 -118.085 -12.3877 -159.146 -33.2598v-314.032c25.9082 12.9316 73.7139 25.7539 159.146 30.0898v317.202zM415.312 320.684v-63.6582s-95.4863 0 -95.4863 -31.8291
-v63.6592s0 31.8281 95.4863 31.8281zM415.312 193.367v-63.6582s-95.4863 0 -95.4863 -31.8291v63.6582s0 31.8291 95.4863 31.8291zM192.511 288.855v-63.6592c0 31.8291 -95.4873 31.8291 -95.4873 31.8291v63.6582c95.4873 0 95.4873 -31.8281 95.4873 -31.8281z
-M192.511 161.538v-63.6582c0 31.8291 -95.4873 31.8291 -95.4873 31.8291v63.6582c95.4873 0 95.4873 -31.8291 95.4873 -31.8291z" />
- <glyph glyph-name="uniF102" unicode="&#xf102;"
-d="M167.89 -63.2324l-79.3857 79.7764l175.472 175.456l-175.472 175.472l79.8535 79.7607l255.139 -255.232z" />
- <glyph glyph-name="uniF103" unicode="&#xf103;"
-d="M255.092 446.464c140.025 0 253.556 -113.531 253.556 -253.556c0 -140.025 -113.546 -253.556 -253.556 -253.556c-140.024 0 -253.556 113.53 -253.556 253.556c0 140.024 113.546 253.556 253.556 253.556zM215.807 75.9111l197.201 197.215l-44.8184 44.8184
-l-152.397 -152.396l-71.8398 71.8604l-44.8096 -44.8174z" />
- <glyph glyph-name="uniF104" unicode="&#xf104;"
-d="M256.512 447.488c140.81 0 254.977 -114.166 254.977 -254.977c0 -140.81 -114.167 -254.976 -254.977 -254.976s-254.976 114.166 -254.976 254.976c0 140.811 114.166 254.977 254.976 254.977zM384 160.64v63.7441h-254.976v-63.7441h254.976z" />
- <glyph glyph-name="uniF105" unicode="&#xf105;"
-d="M256.195 446.464c140.635 0 254.659 -114.024 254.659 -254.659c0 -140.634 -114.024 -254.659 -254.659 -254.659s-254.659 114.025 -254.659 254.659c0 140.635 114.024 254.659 254.659 254.659zM383.524 159.973v63.6641h-95.498v95.498h-63.6641v-95.498h-95.4971
-v-63.6641h95.4971v-95.4961h63.665v95.4961h95.4971z" />
- <glyph glyph-name="uniF106" unicode="&#xf106;"
-d="M256.423 446.808c140.62 0 254.632 -114.012 254.632 -254.631c0 -140.618 -114.013 -254.631 -254.632 -254.631s-254.631 114.013 -254.631 254.631c0 140.619 114.012 254.631 254.631 254.631zM382.371 111.237l-80.9395 80.9395l80.9395 80.9404l-45.0078 45.0078
-l-80.9404 -80.9404l-80.9395 80.9404l-45.0088 -45.0078l80.9404 -80.9404l-80.9404 -80.9395l45.0088 -45.0078l80.9395 80.9395l80.9404 -80.9395z" />
- <glyph glyph-name="uniF107" unicode="&#xf107;"
-d="M511.744 160.645l-76.5098 -32.6094c-2.1084 -5.93457 -4.29395 -11.7754 -7.01172 -17.4912l31.5156 -76.3369l-45.2275 -45.2275l-76.7109 30.7344c-5.71582 -2.74805 -11.7129 -5.12207 -17.8037 -7.37109l-31.6406 -76.0869h-63.9678l-32.3594 75.7119
-c-6.37109 2.18652 -12.5557 4.49805 -18.6152 7.37109l-75.5244 -31.1094l-45.2275 45.2275l30.4219 75.8369c-2.99805 6.18457 -5.49609 12.4941 -7.80859 18.9912l-75.2744 31.3584v63.9688l75.2119 32.1709c2.31152 6.49609 4.74805 12.8066 7.74609 18.9902
-l-30.9844 75.3369l45.2275 45.2285l76.0244 -30.5469c6.05957 2.87305 12.1816 5.24707 18.5537 7.49609l31.6084 75.7119h63.9678l32.4219 -75.9619c6.12207 -2.18652 12.0566 -4.56055 17.8662 -7.37109l76.1494 31.3584l45.2588 -45.2266l-30.8906 -76.8369
-c2.74805 -5.7002 4.99707 -11.4941 7.12109 -17.4912l76.4619 -31.8584v-63.9678zM255.372 96.1758c52.9736 0 95.9521 42.9785 95.9521 95.9521c0 52.9746 -42.9785 95.9521 -95.9521 95.9521c-52.957 0 -95.9512 -42.9775 -95.9512 -95.9521
-c0 -52.9736 42.9932 -95.9521 95.9512 -95.9521z" />
- <glyph glyph-name="uniF108" unicode="&#xf108;"
-d="M256 235.195l228.377 -228.377l-68.6074 -68.6074l-159.77 159.769l-159.769 -159.769l-68.6074 68.6074zM256 445.44l228.377 -228.377l-68.6074 -68.6064l-159.77 159.768l-159.769 -159.768l-68.6074 68.6064z" />
- <glyph glyph-name="uniF109" unicode="&#xf109;"
-d="M512.201 -7.39062c0 -30.1455 -24.4502 -54.5957 -54.5977 -54.5957h-400.792c-30.1465 0 -54.5967 24.4502 -54.5967 54.5957v400.794c0 30.1455 24.4502 54.5967 54.5967 54.5967h400.792c30.1475 0 54.5977 -24.4512 54.5977 -54.5967v-400.794zM464.39 398.437
-c0 0.972656 -0.77832 1.75098 -1.74316 1.75098h-410.886c-0.956055 0 -1.73438 -0.77832 -1.73438 -1.75098v-410.869c0 -0.949219 0.77832 -1.74219 1.73438 -1.74219h410.886c0.96582 0 1.74316 0.792969 1.74316 1.74219v410.869zM100.945 76.1318l-38.9082 27.7959
-l96.0889 134.525l61.5615 -61.5635l65.6777 114.922l64.667 -80.8213l61.7871 98.8906l40.5586 -25.3213l-97.583 -156.103l-62.8301 78.5498l-61.8027 -108.199l-65.9346 65.9277z" />
- <glyph glyph-name="uniF10A" unicode="&#xf10a;"
-d="M250.592 -61.5244c-105.291 0 -190.688 42.6758 -190.688 95.3447v0v53.6611c0 -52.7305 85.4121 -85.4424 190.688 -85.4424c105.291 0 190.688 32.7119 190.688 85.4424v-53.6621v0c0 -52.668 -85.3818 -95.3438 -190.688 -95.3438zM250.592 33.8203
-c-105.291 0 -190.688 42.6748 -190.688 95.3438v53.6465c0 -52.6846 85.4121 -85.4287 190.688 -85.4287c105.291 0 190.688 32.7441 190.688 85.4287v-53.6465c0 -52.6689 -85.3818 -95.3438 -190.688 -95.3438zM250.592 129.164
-c-105.291 0 -190.688 42.6738 -190.688 95.3428v53.6475c0 -52.6846 85.4121 -85.4287 190.688 -85.4287c105.291 0 190.688 32.7432 190.688 85.4287v-53.6475c0 -52.6689 -85.3818 -95.3428 -190.688 -95.3428zM250.592 224.507
-c-105.275 0 -190.688 42.6748 -190.688 95.3438v31.7812c0 52.6689 85.3965 95.3438 190.688 95.3438s190.688 -42.6748 190.688 -95.3438v-31.7812c0 -52.6689 -85.3818 -95.3438 -190.688 -95.3438z" />
- <glyph glyph-name="uniF10B" unicode="&#xf10b;"
-d="M287.851 446.805l159.253 -159.222v-350.389h-382.207v509.61h222.954zM128.598 0.895508h254.805v254.806h-127.402v127.402h-127.402v-382.208z" />
- <glyph glyph-name="uniF10C" unicode="&#xf10c;"
-d="M335.36 446.976l158.72 -158.688v-253.983h-95.2324v-95.2314h-380.928v412.672h95.2324v95.2314h222.208zM335.36 2.55957v31.7441h-222.208v253.952h-31.7441v-285.696h253.952zM430.592 97.792v158.72h-126.976v126.977h-126.977v-285.696h253.952z" />
- <glyph glyph-name="uniF10D" unicode="&#xf10d;"
-d="M256 148.513l-228.994 228.995l68.793 68.793l160.201 -160.185l160.201 160.185l68.793 -68.793zM256 -62.3008l-228.994 228.993l68.793 68.7949l160.201 -160.201l160.201 160.201l68.793 -68.7949z" />
- <glyph glyph-name="uniF10E" unicode="&#xf10e;"
-d="M256.342 382.728c140.621 0 254.634 -188.489 254.634 -188.489s-114.013 -193.463 -254.634 -193.463s-254.635 193.463 -254.635 193.463s114.014 188.489 254.635 188.489zM256.342 64.4346c70.3105 0 127.317 57.0068 127.317 127.317
-s-57.0068 127.317 -127.317 127.317s-127.317 -57.0068 -127.317 -127.317s57.0068 -127.317 127.317 -127.317zM256.342 255.161c35.1553 0 63.6582 -28.5029 63.6582 -63.6582s-28.5029 -63.6582 -63.6582 -63.6582s-63.6592 28.5029 -63.6592 63.6582
-s28.5039 63.6582 63.6592 63.6582z" />
- <glyph glyph-name="uniF10F" unicode="&#xf10f;"
-d="M351.439 381.472c-52.2754 0 -94.7998 -42.5244 -94.7988 -94.8008c0 -4.9375 0.586914 -10.3701 1.85156 -17.1582l6.04785 -32.7119l-23.5146 -23.5137l-173.985 -173.985v-37.0312h63.2002v63.2002h63.1992v63.2002h63.2002v26.1689l18.5156 18.5156l2.90039 2.90137
-l23.5146 23.5146l32.7109 -6.04785c6.79004 -1.23438 12.2207 -1.85254 17.1582 -1.85254c52.2764 0 94.7998 42.5254 94.7998 94.8008s-42.5234 94.7998 -94.7998 94.7998zM351.439 444.672v0c87.2705 0 158.001 -70.7305 158.001 -158s-70.7305 -158 -158 -158
-c-9.875 0 -19.3799 1.17285 -28.6992 2.90039l-2.90137 -2.90039v-63.2002h-63.2002v-63.1992h-63.2002v-63.2002h-189.6v126.399l192.5 192.501c-1.72754 9.31934 -2.90039 18.8242 -2.90039 28.6992c0 87.2705 70.7305 158 158 158zM351.563 318.272
-c17.4658 0 31.6006 -14.1494 31.6006 -31.6006s-14.1338 -31.6006 -31.6006 -31.6006c-17.4512 0 -31.6006 14.1494 -31.6006 31.6006s14.1494 31.6006 31.6006 31.6006z" />
- <glyph glyph-name="uniF110" unicode="&#xf110;"
-d="M481.194 238.603l-46.6826 -46.6377c-29.1152 -29.0996 -72.3096 -34.9346 -107.445 -18.2158l107.445 107.499c12.3496 12.3418 12.3496 32.3262 0 44.6377l-44.6152 44.6914c-12.3193 12.3506 -32.2637 12.3506 -44.6143 0l-107.482 -107.507
-c-16.7266 35.1504 -10.8916 78.376 18.208 107.507l46.6055 46.6377c36.9883 36.957 96.9482 36.957 133.874 0l44.707 -44.6465c36.9268 -37.0039 36.9268 -96.9785 0 -133.966zM166.726 102.736c-12.3271 12.3496 -12.3271 32.2959 0 44.6299l133.912 133.913
-c12.3496 12.3496 32.2959 12.3496 44.6455 0c12.3496 -12.3428 12.3496 -32.2803 0 -44.6221l-133.913 -133.921c-12.3193 -12.3506 -32.3184 -12.3506 -44.6445 0zM77.4424 58.0596l44.6377 -44.6143c12.3496 -12.3496 32.3027 -12.3496 44.6289 0l107.53 107.508
-c16.75 -35.168 10.8682 -78.377 -18.2158 -107.508l-42.6768 -46.6367c-36.9961 -36.9883 -96.9395 -36.9883 -133.943 0l-48.6133 48.582c-36.957 36.9883 -36.957 96.9473 0 133.937l46.6211 42.6689c29.1621 29.0996 72.3555 34.9346 107.553 18.209l-107.521 -107.469
-c-12.3115 -12.3506 -12.3115 -32.3574 0 -44.6768z" />
- <glyph glyph-name="uniF111" unicode="&#xf111;"
-d="M510.208 382.88h-508.672v63.584h508.672v-63.584zM319.456 255.712h-317.92v63.584h317.92v-63.584zM510.208 64.96h-508.672v63.584h508.672v-63.584zM383.04 -62.208h-381.504v63.584h381.504v-63.584zM510.208 -30.416c0 -17.5723 -14.2812 -31.792 -31.792 -31.792
-c-17.6348 0 -31.8545 14.2188 -31.8545 31.792s14.2197 31.792 31.8545 31.792c17.5107 0 31.792 -14.2188 31.792 -31.792z" />
- <glyph glyph-name="uniF112" unicode="&#xf112;"
-d="M2.30371 128.576v126.848h507.393v-126.848h-507.393z" />
- <glyph glyph-name="uniF113" unicode="&#xf113;"
-d="M415.106 -61.2578h-317.007c-52.5352 0 -95.1025 42.5967 -95.1025 95.1016v317.006c0 52.5361 42.5664 95.1025 95.1025 95.1025h317.007c52.5039 0 95.1016 -42.5664 95.1016 -95.1025v-317.006c0 -52.5039 -42.5977 -95.1016 -95.1016 -95.1016zM446.807 350.85
-c0 17.4922 -14.1787 31.7012 -31.7002 31.7012h-317.007c-17.5225 0 -31.7012 -14.209 -31.7012 -31.7012v-317.006c0 -17.5225 14.1787 -31.7002 31.7012 -31.7002h317.007c17.5215 0 31.7002 14.1777 31.7002 31.7002v317.006zM351.704 97.2451v-47.5508
-c0 -8.74512 -7.08887 -15.8506 -15.8496 -15.8506c-8.76172 0 -15.8506 7.10547 -15.8506 15.8506v47.5508c-17.5225 0 -31.7012 14.1787 -31.7012 31.7012v31.7002c0 17.4912 14.1787 31.7002 31.7012 31.7002v142.653c0 8.74512 7.08887 15.8496 15.8506 15.8496
-c8.76074 0 15.8496 -7.10449 15.8496 -15.8496v-142.653c17.5225 0 31.7012 -14.209 31.7012 -31.7002v-31.7002c0 -17.5225 -14.1787 -31.7012 -31.7012 -31.7012zM193.201 192.347v-142.652c0 -8.74512 -7.10449 -15.8506 -15.8506 -15.8506
-s-15.8506 7.10547 -15.8506 15.8506v142.652c-17.5225 0 -31.7012 14.21 -31.7012 31.7012v31.7002c0 17.4912 14.1787 31.7012 31.7012 31.7012v47.5508c0 8.74512 7.10449 15.8496 15.8506 15.8496s15.8506 -7.10449 15.8506 -15.8496v-47.5508
-c17.5225 0 31.7012 -14.21 31.7012 -31.7012v-31.7002c-0.000976562 -17.4912 -14.1787 -31.7012 -31.7012 -31.7012z" />
- <glyph glyph-name="uniF114" unicode="&#xf114;"
-d="M25.3525 319.254v31.8145c0 52.7217 85.4834 95.4395 190.881 95.4395s190.882 -42.7178 190.882 -95.4395v-31.8145c0 -35.9141 -39.7363 -67.1689 -98.3926 -83.4639c-1.98828 -0.450195 -3.94531 -1.00977 -5.93359 -1.52246
-c-25.9736 -6.63281 -55.3633 -10.4541 -86.5557 -10.4541c-105.397 0.000976562 -190.881 42.7188 -190.881 95.4404zM384.062 234.299c14.6953 12.1943 23.0537 26.7178 23.0527 43.2002v-51.1074c-7.39453 3.24707 -15.1143 5.81055 -23.0527 7.90723zM205.748 1.33594
-c14.6016 -25.3037 35.8369 -46.2598 61.499 -60.2705c-16.249 -2.26855 -33.3359 -3.57324 -51.0137 -3.57324c-105.397 0 -190.881 42.749 -190.881 95.4395v53.7012c0 -50.9824 79.9062 -83.1836 180.396 -85.2969zM191.44 33.833
-c-93.6377 6.08984 -166.088 46.043 -166.089 94.54v53.7012c0 -47.4561 69.3125 -78.6484 160 -84.458c-0.589844 -5.57715 -0.931641 -11.2471 -0.931641 -16.9639c0 -16.2793 2.4541 -32.0303 7.02051 -46.8193zM192.032 129.243
-c-93.9502 5.93359 -166.68 45.9492 -166.68 94.5703v53.7012c0 -52.7373 85.4834 -85.5146 190.881 -85.5146c4.72266 0 9.35156 0.140625 13.9961 0.280273c-17.2734 -17.5381 -30.4932 -39.0527 -38.1973 -63.0371zM486.647 80.6523
-c0 -79.0674 -64.0928 -143.16 -143.16 -143.16c-79.0684 0 -143.161 64.0928 -143.161 143.16c0 79.0684 64.0938 143.161 143.161 143.161c79.0674 0.000976562 143.16 -64.0928 143.16 -143.161zM438.928 96.5605h-79.5342v79.5322h-31.8125v-79.5322h-79.5342v-31.8145
-h79.5342v-79.5342h31.8125v79.5342h79.5342v31.8145z" />
- <glyph glyph-name="uniF115" unicode="&#xf115;"
-d="M208.766 -59.6162c-46.3301 0 -89.874 18.0889 -122.595 50.8799c-32.7598 32.7432 -50.8096 76.2324 -50.8096 122.586c0.0302734 46.3223 18.0498 89.8584 50.8096 122.58l175.544 171.749c47.1777 47.2002 130.493 47.3848 178.093 -0.253906
-c49.1084 -49.1934 49.1084 -129.184 0 -178.322l-157.979 -154.101c-30.4199 -30.4355 -80.4199 -30.4961 -111.148 0.276367c-30.7285 30.79 -30.7285 80.7598 0 111.479l61.1465 61.1553l44.583 -44.582l-61.1465 -61.1475
-c-4.04199 -4.06348 -4.61914 -8.74414 -4.61914 -11.1465c0 -2.43066 0.577148 -7.11133 4.61914 -11.1758c8.06641 -8.03613 14.2168 -8.03613 22.291 0l157.888 154.123c24.3232 24.292 24.3232 64.2871 -0.24707 88.8965c-23.8301 23.8311 -65.334 23.8311 -89.165 0
-l-175.529 -171.766c-20.5908 -20.6211 -32.082 -48.3018 -32.082 -77.7656c0 -29.4971 11.4912 -57.2051 32.3281 -78.0195c41.6963 -41.7354 114.359 -41.7354 156.039 0l78.8203 78.8203l44.5527 -44.5674l-78.8213 -78.8193
-c-32.7275 -32.7617 -76.2568 -50.8799 -122.571 -50.8799z" />
- <glyph glyph-name="uniF116" unicode="&#xf116;"
-d="M192.16 1.76074l-190.368 -63.457l63.4561 190.368l317.28 317.28l126.912 -126.912zM65.248 1.76074l95.1836 31.7275l-63.4561 63.4561zM128.704 128.672l63.4561 -63.4561l190.368 190.367l-63.4561 63.457z" />
- <glyph glyph-name="uniF117" unicode="&#xf117;"
-d="M62.9756 448l383.425 -255.616l-383.425 -255.616v511.232z" />
- <glyph glyph-name="uniF118" unicode="&#xf118;"
-d="M511.232 256.288v-127.808h-191.713v-191.713h-127.808v191.713h-191.712v127.808h191.712v191.712h127.808v-191.712h191.713z" />
- <glyph glyph-name="uniF119" unicode="&#xf119;"
-d="M492.673 -62.7197h-474.753c0 61.3486 71.7646 112.591 169.562 129.326v25.1006c-40.3604 23.5342 -67.8223 66.7656 -67.8223 116.86v3.43066c-19.6826 7.0625 -33.918 25.3652 -33.918 47.4551c0 22.0742 14.2354 40.3916 33.9033 47.4248v3.42969
-c0.0146484 74.917 60.7275 135.645 135.644 135.645s135.644 -60.7275 135.644 -135.645v-3.42969c19.668 -7.0332 33.9033 -25.3506 33.9033 -47.4248c0 -22.0898 -14.2354 -40.3926 -33.9033 -47.4551v-3.43066c0 -50.0947 -27.4609 -93.3262 -67.8213 -116.813v-25.1016
-c97.8438 -16.7812 169.562 -68.0234 169.562 -129.372z" />
- <glyph glyph-name="uniF11A" unicode="&#xf11a;"
-d="M74.7285 233.082l-63.5254 63.5254c-6.20312 6.18945 -9.30469 14.3311 -9.30469 22.458c0 8.1416 3.10156 16.2686 9.30469 22.457l63.5254 63.5244c9.08887 9.04199 22.7373 11.7871 34.6172 6.90234c11.8486 -4.90137 19.6035 -16.5332 19.6035 -29.3594v-31.7939
-h31.7627v-63.5254h-31.7627v-31.7314c0 -12.8262 -7.75488 -24.459 -19.6035 -29.3594c-11.8799 -4.86914 -25.5283 -2.16992 -34.6172 6.90234zM437.271 150.931l63.5254 -63.5264c6.20312 -6.17188 9.30469 -14.2988 9.30469 -22.457
-c0 -8.12695 -3.10156 -16.2529 -9.30469 -22.4561l-63.5254 -63.5264c-9.08887 -9.05762 -22.7676 -11.7568 -34.6172 -6.88672c-11.8799 4.90137 -19.6035 16.5332 -19.6035 29.3438v31.7627h-31.7627v63.5264h31.7627v31.7627c0 12.8408 7.72363 24.4727 19.6035 29.374
-c11.8496 4.87012 25.5283 2.13965 34.6172 -6.91699zM224.237 96.7109h31.7627v-63.5264h-31.7627v63.5264zM192.475 350.796h31.7627v-63.5244h-31.7627v63.5244zM160.712 160.235c17.5254 0 31.7627 -14.2373 31.7627 -31.7617v-127.051
-c0 -17.5879 -14.2373 -31.7627 -31.7627 -31.7627h-127.052c-17.5254 0 -31.7617 14.1748 -31.7617 31.7627v127.051c0 17.5244 14.2363 31.7617 31.7617 31.7617h127.052zM128.949 33.1846v0v63.5264h-63.5254v-63.5264h63.5254zM256 350.796h31.7627v-63.5244h-31.7627
-v63.5244zM478.339 414.322c17.5566 0 31.7627 -14.2217 31.7627 -31.7627v-127.051c0 -17.541 -14.2061 -31.7637 -31.7627 -31.7637h-127.051c-17.5566 0 -31.7627 14.2227 -31.7627 31.7637v127.051c0 17.541 14.2061 31.7627 31.7627 31.7627h127.051zM446.576 287.271
-v63.5244h-63.5254v-63.5244h63.5254zM287.763 96.7109h31.7627v-63.5264h-31.7627v63.5264z" />
- <glyph glyph-name="uniF11B" unicode="&#xf11b;"
-d="M494.778 -2.67969c-29.6025 83.5303 -109.144 143.562 -202.873 143.562v-71.8408c0 -13.2529 -7.31543 -25.3379 -18.9727 -31.5967c-11.6572 -6.25781 -25.8516 -5.61426 -36.833 1.74902l-215.372 143.606c-10.0078 6.70898 -16.0205 17.876 -16.0205 29.8545
-c0 12.0332 6.0127 23.2129 15.9893 29.8926l215.357 143.615c11.0273 7.31641 25.1924 8.03613 36.8486 1.75586c11.6875 -6.21973 19.0029 -18.4199 19.0029 -31.6641v-71.7734c118.944 0 215.388 -96.4668 215.388 -215.44c0 -25.123 -4.58594 -49.2646 -12.5146 -71.7197
-z" />
- <glyph glyph-name="uniF11C" unicode="&#xf11c;"
-d="M107.919 318.031c-11.6172 0 -19.7217 8.78223 -19.7217 20.3984v86.7764c0 11.6172 8.10449 19.7217 19.7217 19.7217h148.576c11.6328 0 21.0312 -8.10449 21.0303 -19.7217v-86.0986c0 -11.6162 -8.78125 -21.0762 -20.3838 -21.0762h-149.223zM445.777 444.928
-c42.1543 0 42.1543 -42.0938 42.1553 -42.0938v-421.982c0 -39.4434 -41.416 -40.1836 -41.416 -40.1836v271.543c0 21.0166 -21.6934 22.3721 -21.6934 22.3721h-336.626c-21.0156 0 -21.0156 -21.7246 -21.0156 -21.7246v-272.807
-c-40.7988 0 -42.0938 42.0322 -42.0938 42.0322v420.75s0 42.0938 42.0938 42.0938l-0.677734 -126.882s1.07812 -20.3691 22.1562 -20.3691l335.469 -0.569336s20.2305 -0.308594 21.5859 21.3857zM404.361 212.858c0 0 20.4619 0 20.4619 -21.709v-229.404
-s0.615234 -21.6934 -21.0781 -21.6934h-295.147s-19.7217 0.615234 -19.7217 21.6934l-0.678711 230.112s-0.677734 21.001 21.6943 21.001h294.47zM330.405 45.1934c5.70117 0 10.2305 4.65234 10.2295 10.2305c0 5.5625 -4.52832 10.2148 -10.2295 10.2148h-168.929
-c-5.63867 0 -10.1689 -4.65234 -10.1689 -10.2148c0 -5.57715 4.54492 -10.2305 10.1689 -10.2305h168.929zM330.158 87.3486c5.70117 0 10.4775 4.02148 10.4775 9.86035c0 5.7168 -4.77637 10.4775 -10.4775 10.4775h-168.99
-c-5.83984 0 -10.5391 -4.76074 -10.5391 -10.4775c0 -5.83887 4.69922 -9.86035 10.5391 -9.86035h168.99zM330.405 129.38c5.70117 0 10.2305 4.53027 10.2295 10.2305c0 5.57715 -4.52832 10.1074 -10.2295 10.1074h-168.929
-c-5.63867 0 -10.1689 -4.53027 -10.1689 -10.1074c0 -5.7002 4.54492 -10.2305 10.1689 -10.2305h168.929zM381.435 318.031c-11.6475 0 -19.7217 9.45996 -19.7217 21.0762v86.0986c0 11.6172 8.07422 19.7217 19.7217 19.7217h23.666
-c11.5566 0 19.7227 -8.10547 19.7227 -19.7217v-86.0986c0 -11.6162 -8.16602 -21.0762 -19.7227 -21.0762h-23.666z" />
- <glyph glyph-name="uniF11D" unicode="&#xf11d;"
-d="M495.659 19.2988c18.6387 -18.6387 18.6387 -48.8457 -0.000976562 -67.4697c-18.6543 -18.6387 -48.8311 -18.6387 -67.4697 0l-111.865 111.804c-31.4941 -19.4453 -68.2607 -31.1992 -108.021 -31.1992c-114.191 0 -206.767 92.5752 -206.767 206.751
-c0 114.192 92.5752 206.768 206.767 206.768c114.192 0 206.768 -92.5752 206.768 -206.768c0 -39.7588 -11.7539 -76.541 -31.2305 -108.065zM208.303 96.0273c79.0537 0 143.159 64.1045 143.159 143.157c0 79.0537 -64.1055 143.159 -143.159 143.159
-c-79.0527 0 -143.158 -64.1055 -143.158 -143.159c0 -79.0527 64.1055 -143.157 143.158 -143.157z" />
- <glyph glyph-name="uniF11E" unicode="&#xf11e;"
-d="M228.974 393.2c0 -60.4707 -0.255859 -227.632 -0.255859 -227.632s170.018 -0.0644531 227.937 -0.0644531c0 -125.756 -101.94 -227.696 -227.681 -227.696c-125.756 0 -227.695 101.94 -227.695 227.696c0 125.307 101.25 226.989 226.38 227.696h1.31543z
-M510.722 201.067l-245.445 -0.353516s-0.641602 245.478 0.352539 245.478c135.386 0 245.093 -109.739 245.093 -245.124z" />
- <glyph glyph-name="uniF11F" unicode="&#xf11f;"
-d="M509.952 192.512c0 -10.7109 -0.868164 -21.2646 -2.16992 -31.6504c-0.326172 -2.51074 -0.744141 -5.05273 -1.14746 -7.56348c-1.37793 -8.68066 -3.13086 -17.2979 -5.34668 -25.6992c-0.417969 -1.48828 -0.744141 -3.00684 -1.13184 -4.47949
-c-6.04492 -21.002 -14.6631 -40.9824 -25.5752 -59.4111c-21.8232 -37.0293 -52.7305 -67.9209 -89.7598 -89.7764c-18.4297 -10.9121 -38.3936 -19.499 -59.4111 -25.5596c-1.48828 -0.387695 -2.97656 -0.712891 -4.47949 -1.13184
-c-8.41699 -2.21582 -16.9727 -3.96777 -25.6836 -5.34766c-2.51074 -0.387695 -5.05273 -0.836914 -7.58008 -1.13184c-10.4014 -1.33203 -20.9414 -2.20117 -31.667 -2.20117v0v0c-10.7256 0 -21.2656 0.869141 -31.6504 2.16992
-c-2.57324 0.326172 -5.05371 0.744141 -7.5957 1.14746c-8.71094 1.37891 -17.2979 3.13086 -25.7148 5.34668c-1.44043 0.418945 -2.99121 0.744141 -4.44824 1.13184c-21.0488 6.04492 -40.9814 14.6631 -59.4268 25.5752
-c-37.0137 21.8242 -67.9209 52.7305 -89.8066 89.7598c-10.8965 18.4307 -19.4834 38.3936 -25.5127 59.4121c-0.40332 1.47168 -0.744141 2.97559 -1.14746 4.47949c-2.23145 8.41602 -3.96777 16.9717 -5.31641 25.6836
-c-0.387695 2.50977 -0.836914 5.03613 -1.19336 7.5791c-1.27148 10.4023 -2.13965 20.9561 -2.13965 31.667v0v0c0 10.7109 0.868164 21.2666 2.16992 31.6504c0.30957 2.57324 0.744141 5.05273 1.17773 7.59473c1.34863 8.71191 3.10059 17.2988 5.34766 25.7148
-c0.387695 1.44238 0.728516 2.99219 1.14746 4.44922c6.0293 20.9863 14.6318 40.9668 25.5283 59.4121c21.8555 37.0137 52.793 67.9355 89.8066 89.791c18.3994 10.8652 38.3779 19.4678 59.3809 25.4971c1.47266 0.418945 2.99219 0.758789 4.44824 1.14746
-c8.40137 2.24707 17.0186 3.96777 25.6992 5.34668c2.54199 0.37207 5.02148 0.837891 7.61035 1.19336c10.3701 1.28711 20.9102 2.15527 31.6357 2.15527v0v0c10.7256 0 21.2656 -0.868164 31.6504 -2.15527c2.51172 -0.324219 5.05371 -0.758789 7.56445 -1.19238
-c8.67969 -1.34863 17.2969 -3.09961 25.6982 -5.34668c1.48828 -0.388672 3.00684 -0.729492 4.47949 -1.14746c21.0029 -6.03027 40.9834 -14.6328 59.4121 -25.498c37.0293 -21.8857 67.9209 -52.8242 89.7764 -89.8066
-c10.9121 -18.4443 19.499 -38.3779 25.5596 -59.4268c0.386719 -1.45703 0.712891 -2.97559 1.13184 -4.44824c2.21582 -8.41699 3.96777 -17.0039 5.34766 -25.7148c0.387695 -2.54199 0.835938 -5.00586 1.13086 -7.5791
-c1.33301 -10.3701 2.20117 -20.9258 2.20117 -31.6367v0v0zM108.486 250.219l-47.1973 47.2285c-16.957 -31.3887 -27.4971 -66.7432 -27.4971 -104.936c0 -38.1914 10.54 -73.5625 27.4971 -104.936l47.1973 47.1836c-7.02148 17.9482 -11.2061 37.3076 -11.2061 57.752
-c0 20.4297 4.18457 39.7744 11.2061 57.707zM256 -29.6963c38.1924 0 73.5635 10.5088 104.935 27.4668l-47.1816 47.2119c-17.9492 -6.97363 -37.3086 -11.1904 -57.7529 -11.1904c-20.4131 0 -39.7734 4.2168 -57.7217 11.2373l-47.2441 -47.2285
-c31.4189 -16.9883 66.7734 -27.4971 104.966 -27.4971zM256 414.72c-38.1924 0 -73.5469 -10.54 -104.935 -27.4971l47.2432 -47.1973c17.918 7.02246 37.2783 11.207 57.6914 11.207c20.4443 0 39.8037 -4.18457 57.7217 -11.207l47.1816 47.1973
-c-31.3398 16.957 -66.7109 27.4971 -104.903 27.4971zM378.28 224.984v0c-11.6416 43.8799 -45.8965 78.1191 -89.792 89.8076v0v0c-4.21582 1.09961 -8.43262 2.03027 -12.834 2.72852c-6.41699 1.14648 -12.8965 1.96777 -19.6543 1.96777
-s-13.2373 -0.821289 -19.6846 -1.96875c-4.34082 -0.697266 -8.60254 -1.62793 -12.7881 -2.72852v0v0c-43.8799 -11.6875 -78.1201 -45.957 -89.8066 -89.8066v0v0c-1.10059 -4.18457 -2.03027 -8.44824 -2.72852 -12.8037
-c-1.14648 -6.44727 -1.96777 -12.9258 -1.96777 -19.6689s0.821289 -13.2207 1.96777 -19.6543c0.666992 -4.40234 1.62793 -8.58594 2.72852 -12.833v0v0c11.6406 -43.8652 45.957 -78.1045 89.8066 -89.7607v0v0c4.18555 -1.10059 8.44727 -2.01562 12.7881 -2.72754
-c6.44727 -1.17871 12.9268 -2 19.6846 -2s13.2373 0.821289 19.6543 1.96777c4.40234 0.666992 8.58691 1.62891 12.834 2.72852v0v0c43.8643 11.6572 78.1045 45.8965 89.7598 89.792v0v0c1.10059 4.21582 2.01562 8.43164 2.72852 12.8184
-c1.17773 6.44824 1.99902 12.9258 1.99902 19.6689s-0.821289 13.2217 -1.96777 19.6689c-0.712891 4.35547 -1.62793 8.61914 -2.72754 12.8037v0zM450.742 297.447l-47.2129 -47.2441c6.97461 -17.917 11.1904 -37.2617 11.1904 -57.6914
-c0 -20.4443 -4.21582 -39.8037 -11.2373 -57.7217l47.2285 -47.1816c16.9883 31.3408 27.4971 66.7119 27.4971 104.903c0 38.1924 -10.5088 73.5469 -27.4658 104.936z" />
- <glyph glyph-name="uniF120" unicode="&#xf120;"
-d="M3.49219 294.4l101 102.399h25.0312v-78.7695h378.093v-47.2607h-378.093v-78.7695h-25.0312zM508.508 89.5996l-101.016 -102.399h-25.9082v78.7686h-378.092v47.2607h378.092v78.7705h25.9082z" />
- <glyph glyph-name="uniF121" unicode="&#xf121;"
-d="M443.778 287.818v-254.668c0 -52.7051 -42.7891 -95.4941 -95.4951 -95.4941h-191.005c-52.7529 0 -95.4951 42.7881 -95.4951 95.4941v254.668c-17.5625 0 -31.8311 14.2686 -31.8311 31.8311c0 17.5635 14.2686 31.832 31.8311 31.832h95.4951
-c0 52.7529 42.7422 95.4941 95.4941 95.4941c52.7217 0 95.4951 -42.7725 95.4951 -95.4941h95.4951c17.5947 0 31.832 -14.2686 31.832 -31.832c0.0146484 -17.5938 -14.207 -31.8311 -31.8164 -31.8311zM252.772 383.312c-17.5625 0 -31.8311 -14.2676 -31.8311 -31.8311
-h63.6631c0.015625 17.5635 -14.2686 31.8311 -31.832 31.8311zM380.115 287.818h-254.669v-254.668c0 -17.5781 14.2686 -31.8311 31.832 -31.8311h191.005c17.6104 0 31.832 14.2529 31.832 31.8311v254.668zM316.452 255.971h31.8311v-222.836h-31.8311v222.836z
-M220.941 255.971h63.6631v-222.836h-63.6631v222.836zM157.278 255.971h31.8311v-222.836h-31.8311v222.836z" />
- <glyph glyph-name="uniF122" unicode="&#xf122;"
-d="M331.522 -63.0078h-191.148c-52.7959 0 -95.5742 42.8086 -95.5742 95.5742v0c9.84668 58.4268 49.1562 107.521 99.1523 135.21c-21.8398 22.8672 -35.4355 53.667 -35.4355 87.7959v63.7158c-0.000976562 70.374 57.0576 127.432 127.432 127.432
-s127.432 -57.0576 127.432 -127.432v-63.7158c0 -34.1289 -13.5957 -64.9287 -35.4043 -87.7969c49.9648 -27.6885 89.2734 -76.7832 99.1211 -135.21v0c-0.000976562 -52.7646 -42.8096 -95.5732 -95.5742 -95.5732zM299.664 255.572v63.7158
-c0 35.1709 -28.5449 63.7158 -63.7158 63.7158c-35.1719 0 -63.7158 -28.5449 -63.7158 -63.7158v-63.7158c0 -35.1709 28.5439 -63.7158 63.7158 -63.7158c35.1709 0 63.7158 28.5449 63.7158 63.7158zM363.38 32.5654c-14.2178 54.8809 -68.1338 95.5742 -127.432 95.5742
-v0v0c-59.3291 0 -113.214 -40.6934 -127.433 -95.5742v0c0 -17.6084 14.2803 -31.8574 31.8584 -31.8574h191.148c17.6084 0 31.8574 14.249 31.8574 31.8574v0z" />
- <glyph glyph-name="uniF123" unicode="&#xf123;"
-d="M410.583 169.941c49.8057 -27.6006 88.9912 -76.5381 98.8057 -134.779c0 -52.5977 -42.6729 -95.2705 -95.2705 -95.2705h-43.9131c18.9473 16.5449 32.8418 38.4248 39.3848 63.5137h4.52832c17.5527 0 31.7568 14.2031 31.7568 31.7568
-c-8.1875 31.6318 -29.8184 58.1787 -57.8691 75.2666c-14.793 25.6484 -34.7344 48.7832 -58.9551 67.4834c3.64453 6.24902 6.85449 12.7773 9.59863 19.4922c25.3379 8.38867 43.7129 31.957 43.7129 60.0547v63.5137c0 28.1279 -18.375 51.6982 -43.7285 60.0557
-c-10.3574 25.1816 -27.3213 46.7197 -48.2871 63.4824c9.18066 2.12402 18.6699 3.48926 28.501 3.48926c70.1514 0 127.027 -56.877 127.027 -127.027v-63.5137c0 -34.0205 -13.5518 -64.7227 -35.292 -87.5176zM287.091 -60.1084h-190.54
-c-52.6279 0 -95.2705 42.6719 -95.2705 95.2705v0c9.81543 58.2412 49 107.179 98.8369 134.779c-21.7705 22.7949 -35.3232 53.4971 -35.3232 87.5176v63.5137c0 70.1504 56.877 127.027 127.026 127.027c70.1504 0 127.027 -56.877 127.027 -127.027v-63.5137
-c0 -34.0205 -13.5527 -64.7227 -35.292 -87.5176c49.8057 -27.6006 88.9902 -76.5381 98.8057 -134.779v0c0.000976562 -52.5986 -42.6729 -95.2705 -95.2705 -95.2705zM255.334 257.459v63.5137c0 35.0596 -28.4541 63.5137 -63.5137 63.5137
-s-63.5127 -28.4541 -63.5127 -63.5137v-63.5137c0 -35.0596 28.4531 -63.5127 63.5127 -63.5127s63.5137 28.4531 63.5137 63.5127zM318.848 35.1621c-14.1729 54.7061 -67.917 95.2695 -127.027 95.2695v0v0c-59.1396 0 -112.854 -40.5635 -127.026 -95.2695v0
-c0 -17.5537 14.2344 -31.7568 31.7568 -31.7568h190.54c17.5537 0 31.7568 14.2031 31.7568 31.7568v0z" />
- <glyph glyph-name="uniF124" unicode="&#xf124;"
-d="M502.882 356.449c3.70898 -11.8682 6.24414 -24.2305 6.24414 -37.3037c0 -69.8789 -56.6826 -126.592 -126.593 -126.592c-19.4707 0 -37.7676 4.79102 -54.209 12.6406l-253.556 -253.463c-7.54102 -7.66406 -18.1113 -12.3623 -29.793 -12.3623
-c-23.3652 0 -42.2188 18.915 -42.2188 42.1572c0 11.7441 4.75977 22.252 12.3633 29.917l253.493 253.431c-7.91211 16.5352 -12.6719 34.7695 -12.6719 54.2705c0 69.8789 56.6826 126.593 126.592 126.593c12.6719 0 24.7256 -2.44141 36.2842 -5.93457l-78.502 -78.4707
-v-84.374h83.0762z" />
- <glyph glyph-name="uniF125" unicode="&#xf125;"
-d="M511.488 39.5137l-102.029 -102.03l-152.973 153.044l-153.044 -153.044l-101.959 102.03l152.974 152.973l-152.974 152.973l101.959 102.029l153.044 -153.043l152.973 153.043l102.029 -102.029l-153.115 -152.973z" />
- </font>
-</defs></svg>
diff --git a/share/www/fauxton/img/fontcustom_fauxton.ttf b/share/www/fauxton/img/fontcustom_fauxton.ttf
deleted file mode 100644
index 4df286cb9..000000000
--- a/share/www/fauxton/img/fontcustom_fauxton.ttf
+++ /dev/null
Binary files differ
diff --git a/share/www/fauxton/img/fontcustom_fauxton.woff b/share/www/fauxton/img/fontcustom_fauxton.woff
deleted file mode 100644
index a6a3fb23f..000000000
--- a/share/www/fauxton/img/fontcustom_fauxton.woff
+++ /dev/null
Binary files differ
diff --git a/share/www/fauxton/img/glyphicons-halflings-white.png b/share/www/fauxton/img/glyphicons-halflings-white.png
deleted file mode 100644
index 3bf6484a2..000000000
--- a/share/www/fauxton/img/glyphicons-halflings-white.png
+++ /dev/null
Binary files differ
diff --git a/share/www/fauxton/img/glyphicons-halflings.png b/share/www/fauxton/img/glyphicons-halflings.png
deleted file mode 100644
index 79bc568c2..000000000
--- a/share/www/fauxton/img/glyphicons-halflings.png
+++ /dev/null
Binary files differ
diff --git a/share/www/fauxton/img/linen.png b/share/www/fauxton/img/linen.png
deleted file mode 100644
index 365c61af1..000000000
--- a/share/www/fauxton/img/linen.png
+++ /dev/null
Binary files differ
diff --git a/share/www/fauxton/img/loader.gif b/share/www/fauxton/img/loader.gif
deleted file mode 100644
index 96ff18821..000000000
--- a/share/www/fauxton/img/loader.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/fauxton/img/minilogo.png b/share/www/fauxton/img/minilogo.png
deleted file mode 100644
index 63e005cc8..000000000
--- a/share/www/fauxton/img/minilogo.png
+++ /dev/null
Binary files differ
diff --git a/share/www/fauxton/index.html b/share/www/fauxton/index.html
deleted file mode 100644
index 666c56063..000000000
--- a/share/www/fauxton/index.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!doctype html>
-
-<!--
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
--->
-
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <meta http-equiv="Content-Language" content="en" />
-
- <title>Project Fauxton</title>
-
- <!-- Application styles. -->
- <link rel="stylesheet" href="./css/index.css">
-
-</head>
-
-<body id="home">
- <!-- Main container. -->
- <div role="main" id="main">
- <div id="global-notifications" class="container errors-container"></div>
- <div id="app-container"></div>
-
- <footer>
- <div id="footer-content"></div>
- </footer>
- </div>
-
- <!-- Application source. -->
- <script data-main="/config" src="./js/require.js"></script>
-</body>
-</html>
diff --git a/share/www/fauxton/js/ace/mode-javascript.js b/share/www/fauxton/js/ace/mode-javascript.js
deleted file mode 100644
index c9e6f5044..000000000
--- a/share/www/fauxton/js/ace/mode-javascript.js
+++ /dev/null
@@ -1,886 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.HighlightRules = JavaScriptHighlightRules;
-
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
- var keywordMapper = this.createKeywordMapper({
- "variable.language":
- "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
- "Namespace|QName|XML|XMLList|" + // E4X
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
- "SyntaxError|TypeError|URIError|" +
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
- "isNaN|parseFloat|parseInt|" +
- "JSON|Math|" + // Other
- "this|arguments|prototype|window|document" , // Pseudo
- "keyword":
- "const|yield|import|get|set|" +
- "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
- "__parent__|__count__|escape|unescape|with|__proto__|" +
- "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
- "storage.type":
- "const|let|var|function",
- "constant.language":
- "null|Infinity|NaN|undefined",
- "support.function":
- "alert",
- "constant.language.boolean": "true|false"
- }, "identifier");
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
- var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
-
- var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
- "u[0-9a-fA-F]{4}|" + // unicode
- "[0-2][0-7]{0,2}|" + // oct
- "3[0-6][0-7]?|" + // oct
- "37[0-7]?|" + // oct
- "[4-7][0-7]?|" + //oct
- ".)";
-
- this.$rules = {
- "no_regex" : [
- {
- token : "comment",
- regex : "\\/\\/",
- next : "line_comment"
- },
- DocCommentHighlightRules.getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- regex : /\/\*/,
- next : "comment"
- }, {
- token : "string",
- regex : "'(?=.)",
- next : "qstring"
- }, {
- token : "string",
- regex : '"(?=.)',
- next : "qqstring"
- }, {
- token : "constant.numeric", // hex
- regex : /0[xX][0-9a-fA-F]+\b/
- }, {
- token : "constant.numeric", // float
- regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
- }, {
- token : [
- "storage.type", "punctuation.operator", "support.function",
- "punctuation.operator", "entity.name.function", "text","keyword.operator"
- ],
- regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
- next: "function_arguments"
- }, {
- token : [
- "storage.type", "punctuation.operator", "entity.name.function", "text",
- "keyword.operator", "text", "storage.type", "text", "paren.lparen"
- ],
- regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
- next: "function_arguments"
- }, {
- token : [
- "entity.name.function", "text", "keyword.operator", "text", "storage.type",
- "text", "paren.lparen"
- ],
- regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
- next: "function_arguments"
- }, {
- token : [
- "storage.type", "punctuation.operator", "entity.name.function", "text",
- "keyword.operator", "text",
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
- ],
- regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
- next: "function_arguments"
- }, {
- token : [
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
- ],
- regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
- next: "function_arguments"
- }, {
- token : [
- "entity.name.function", "text", "punctuation.operator",
- "text", "storage.type", "text", "paren.lparen"
- ],
- regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
- next: "function_arguments"
- }, {
- token : [
- "text", "text", "storage.type", "text", "paren.lparen"
- ],
- regex : "(:)(\\s*)(function)(\\s*)(\\()",
- next: "function_arguments"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "start"
- }, {
- token : ["punctuation.operator", "support.function"],
- regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
- }, {
- token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
- }, {
- token : ["punctuation.operator", "support.constant"],
- regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
- }, {
- token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
- }, {
- token : keywordMapper,
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
- next : "start"
- }, {
- token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
- next : "start"
- }, {
- token : "paren.lparen",
- regex : /[\[({]/,
- next : "start"
- }, {
- token : "paren.rparen",
- regex : /[\])}]/
- }, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
- token: "comment",
- regex: /^#!.*$/
- }
- ],
- "start": [
- DocCommentHighlightRules.getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/",
- next : "line_comment_regex_allowed"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex"
- }, {
- token : "text",
- regex : "\\s+|^$",
- next : "start"
- }, {
- token: "empty",
- regex: "",
- next: "no_regex"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
- }, {
- token: "string.regexp",
- regex: "/\\w*",
- next: "no_regex"
- }, {
- token : "invalid",
- regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
- }, {
- token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
- }, {
- token : "constant.language.delimiter",
- regex: /\|/
- }, {
- token: "constant.language.escape",
- regex: /\[\^?/,
- next: "regex_character_class"
- }, {
- token: "empty",
- regex: "$",
- next: "no_regex"
- }, {
- defaultToken: "string.regexp"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
- }, {
- token: "constant.language.escape",
- regex: "]",
- next: "regex"
- }, {
- token: "constant.language.escape",
- regex: "-"
- }, {
- token: "empty",
- regex: "$",
- next: "no_regex"
- }, {
- defaultToken: "string.regexp.charachterclass"
- }
- ],
- "function_arguments": [
- {
- token: "variable.parameter",
- regex: identifierRe
- }, {
- token: "punctuation.operator",
- regex: "[, ]+"
- }, {
- token: "punctuation.operator",
- regex: "$"
- }, {
- token: "empty",
- regex: "",
- next: "no_regex"
- }
- ],
- "comment_regex_allowed" : [
- {token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
- ],
- "comment" : [
- {token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
- ],
- "line_comment_regex_allowed" : [
- {token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
- ],
- "line_comment" : [
- {token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
- ],
- "qqstring" : [
- {
- token : "constant.language.escape",
- regex : escapedRe
- }, {
- token : "string",
- regex : "\\\\$",
- next : "qqstring"
- }, {
- token : "string",
- regex : '"|$',
- next : "no_regex"
- }, {
- defaultToken: "string"
- }
- ],
- "qstring" : [
- {
- token : "constant.language.escape",
- regex : escapedRe
- }, {
- token : "string",
- regex : "\\\\$",
- next : "qstring"
- }, {
- token : "string",
- regex : "'|$",
- next : "no_regex"
- }, {
- defaultToken: "string"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ DocCommentHighlightRules.getEndRule("no_regex") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-
-define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- return line.match(/^\s*/)[0];
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-var lang = require("../../lib/lang");
-
-var SAFE_INSERT_IN_TOKENS =
- ["text", "paren.rparen", "punctuation.operator"];
-var SAFE_INSERT_BEFORE_TOKENS =
- ["text", "paren.rparen", "punctuation.operator", "comment"];
-
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
- };
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
- };
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
- CstyleBehaviour.recordAutoInsert(editor, session, "}");
- return {
- text: '{}',
- selection: [1, 1]
- };
- } else {
- CstyleBehaviour.recordMaybeInsert(editor, session, "{");
- return {
- text: '{',
- selection: [1, 1]
- };
- }
- }
- } else if (text == '}') {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- } else if (text == "\n" || text == "\r\n") {
- var closing = "";
- if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
- CstyleBehaviour.clearMaybeInsertedClosing();
- }
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
- var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- } else {
- maybeInsertedBrackets--;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- CstyleBehaviour.recordAutoInsert(editor, session, ")");
- return {
- text: '()',
- selection: [1, 1]
- };
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '[') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- CstyleBehaviour.recordAutoInsert(editor, session, "]");
- return {
- text: '[]',
- selection: [1, 1]
- };
- }
- } else if (text == ']') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ']') {
- var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- }
- });
-
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '[') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ']') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"' || text == "'") {
- var quote = text;
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
- return null;
- }
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == selected) {
- range.end.column++;
- return range;
- }
- }
- });
-
-};
-
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function(commentRegex) {
- if (commentRegex) {
- this.foldingStartMarker = new RegExp(
- this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
- );
- this.foldingStopMarker = new RegExp(
- this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
- );
- }
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[1])
- return this.closingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i, -1);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});
diff --git a/share/www/fauxton/js/ace/mode-json.js b/share/www/fauxton/js/ace/mode-json.js
deleted file mode 100644
index d1b3d472d..000000000
--- a/share/www/fauxton/js/ace/mode-json.js
+++ /dev/null
@@ -1,578 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/json', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/json_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle', 'ace/worker/worker_client'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HighlightRules = require("./json_highlight_rules").JsonHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-
-var Mode = function() {
- this.HighlightRules = HighlightRules;
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/json_worker", "JsonWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("error", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("ok", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-define('ace/mode/json_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JsonHighlightRules = function() {
- this.$rules = {
- "start" : [
- {
- token : "variable", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'
- }, {
- token : "string", // single line
- regex : '"',
- next : "string"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : "invalid.illegal", // single quoted strings are not allowed
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "invalid.illegal", // comments are not allowed
- regex : "\\/\\/.*$"
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "string" : [
- {
- token : "constant.language.escape",
- regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/
- }, {
- token : "string",
- regex : '[^"\\\\]+'
- }, {
- token : "string",
- regex : '"',
- next : "start"
- }, {
- token : "string",
- regex : "",
- next : "start"
- }
- ]
- };
-
-};
-
-oop.inherits(JsonHighlightRules, TextHighlightRules);
-
-exports.JsonHighlightRules = JsonHighlightRules;
-});
-
-define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- return line.match(/^\s*/)[0];
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-
-define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-var lang = require("../../lib/lang");
-
-var SAFE_INSERT_IN_TOKENS =
- ["text", "paren.rparen", "punctuation.operator"];
-var SAFE_INSERT_BEFORE_TOKENS =
- ["text", "paren.rparen", "punctuation.operator", "comment"];
-
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
- };
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
- };
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
- CstyleBehaviour.recordAutoInsert(editor, session, "}");
- return {
- text: '{}',
- selection: [1, 1]
- };
- } else {
- CstyleBehaviour.recordMaybeInsert(editor, session, "{");
- return {
- text: '{',
- selection: [1, 1]
- };
- }
- }
- } else if (text == '}') {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- } else if (text == "\n" || text == "\r\n") {
- var closing = "";
- if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
- CstyleBehaviour.clearMaybeInsertedClosing();
- }
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
- var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- } else {
- maybeInsertedBrackets--;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- CstyleBehaviour.recordAutoInsert(editor, session, ")");
- return {
- text: '()',
- selection: [1, 1]
- };
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '[') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- CstyleBehaviour.recordAutoInsert(editor, session, "]");
- return {
- text: '[]',
- selection: [1, 1]
- };
- }
- } else if (text == ']') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ']') {
- var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- }
- });
-
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '[') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ']') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"' || text == "'") {
- var quote = text;
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
- return null;
- }
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == selected) {
- range.end.column++;
- return range;
- }
- }
- });
-
-};
-
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});
-
-define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function(commentRegex) {
- if (commentRegex) {
- this.foldingStartMarker = new RegExp(
- this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
- );
- this.foldingStopMarker = new RegExp(
- this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
- );
- }
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
- }
-
- if (foldStyle !== "markbeginend")
- return;
-
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
-
- if (match[1])
- return this.closingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i, -1);
- }
- };
-
-}).call(FoldMode.prototype);
-
-});
diff --git a/share/www/fauxton/js/ace/theme-crimson_editor.js b/share/www/fauxton/js/ace/theme-crimson_editor.js
deleted file mode 100644
index 51925799e..000000000
--- a/share/www/fauxton/js/ace/theme-crimson_editor.js
+++ /dev/null
@@ -1,148 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/theme/crimson_editor', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
-exports.isDark = false;
-exports.cssText = ".ace-crimson-editor .ace_gutter {\
-background: #ebebeb;\
-color: #333;\
-overflow : hidden;\
-}\
-.ace-crimson-editor .ace_gutter-layer {\
-width: 100%;\
-text-align: right;\
-}\
-.ace-crimson-editor .ace_print-margin {\
-width: 1px;\
-background: #e8e8e8;\
-}\
-.ace-crimson-editor {\
-background-color: #FFFFFF;\
-color: rgb(64, 64, 64);\
-}\
-.ace-crimson-editor .ace_cursor {\
-color: black;\
-}\
-.ace-crimson-editor .ace_invisible {\
-color: rgb(191, 191, 191);\
-}\
-.ace-crimson-editor .ace_identifier {\
-color: black;\
-}\
-.ace-crimson-editor .ace_keyword {\
-color: blue;\
-}\
-.ace-crimson-editor .ace_constant.ace_buildin {\
-color: rgb(88, 72, 246);\
-}\
-.ace-crimson-editor .ace_constant.ace_language {\
-color: rgb(255, 156, 0);\
-}\
-.ace-crimson-editor .ace_constant.ace_library {\
-color: rgb(6, 150, 14);\
-}\
-.ace-crimson-editor .ace_invalid {\
-text-decoration: line-through;\
-color: rgb(224, 0, 0);\
-}\
-.ace-crimson-editor .ace_fold {\
-}\
-.ace-crimson-editor .ace_support.ace_function {\
-color: rgb(192, 0, 0);\
-}\
-.ace-crimson-editor .ace_support.ace_constant {\
-color: rgb(6, 150, 14);\
-}\
-.ace-crimson-editor .ace_support.ace_type,\
-.ace-crimson-editor .ace_support.ace_class {\
-color: rgb(109, 121, 222);\
-}\
-.ace-crimson-editor .ace_keyword.ace_operator {\
-color: rgb(49, 132, 149);\
-}\
-.ace-crimson-editor .ace_string {\
-color: rgb(128, 0, 128);\
-}\
-.ace-crimson-editor .ace_comment {\
-color: rgb(76, 136, 107);\
-}\
-.ace-crimson-editor .ace_comment.ace_doc {\
-color: rgb(0, 102, 255);\
-}\
-.ace-crimson-editor .ace_comment.ace_doc.ace_tag {\
-color: rgb(128, 159, 191);\
-}\
-.ace-crimson-editor .ace_constant.ace_numeric {\
-color: rgb(0, 0, 64);\
-}\
-.ace-crimson-editor .ace_variable {\
-color: rgb(0, 64, 128);\
-}\
-.ace-crimson-editor .ace_xml-pe {\
-color: rgb(104, 104, 91);\
-}\
-.ace-crimson-editor .ace_marker-layer .ace_selection {\
-background: rgb(181, 213, 255);\
-}\
-.ace-crimson-editor .ace_marker-layer .ace_step {\
-background: rgb(252, 255, 0);\
-}\
-.ace-crimson-editor .ace_marker-layer .ace_stack {\
-background: rgb(164, 229, 101);\
-}\
-.ace-crimson-editor .ace_marker-layer .ace_bracket {\
-margin: -1px 0 0 -1px;\
-border: 1px solid rgb(192, 192, 192);\
-}\
-.ace-crimson-editor .ace_marker-layer .ace_active-line {\
-background: rgb(232, 242, 254);\
-}\
-.ace-crimson-editor .ace_gutter-active-line {\
-background-color : #dcdcdc;\
-}\
-.ace-crimson-editor .ace_meta.ace_tag {\
-color:rgb(28, 2, 255);\
-}\
-.ace-crimson-editor .ace_marker-layer .ace_selected-word {\
-background: rgb(250, 250, 255);\
-border: 1px solid rgb(200, 200, 250);\
-}\
-.ace-crimson-editor .ace_string.ace_regex {\
-color: rgb(192, 0, 192);\
-}\
-.ace-crimson-editor .ace_indent-guide {\
-background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
-}";
-
-exports.cssClass = "ace-crimson-editor";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});
diff --git a/share/www/fauxton/js/ace/worker-javascript.js b/share/www/fauxton/js/ace/worker-javascript.js
deleted file mode 100644
index 5481bed37..000000000
--- a/share/www/fauxton/js/ace/worker-javascript.js
+++ /dev/null
@@ -1,10088 +0,0 @@
-"no use strict";
-;(function(window) {
-if (typeof window.window != "undefined" && window.document) {
- return;
-}
-
-window.console = function() {
- var msgs = Array.prototype.slice.call(arguments, 0);
- postMessage({type: "log", data: msgs});
-};
-window.console.error =
-window.console.warn =
-window.console.log =
-window.console.trace = window.console;
-
-window.window = window;
-window.ace = window;
-
-window.normalizeModule = function(parentId, moduleName) {
- if (moduleName.indexOf("!") !== -1) {
- var chunks = moduleName.split("!");
- return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
- }
- if (moduleName.charAt(0) == ".") {
- var base = parentId.split("/").slice(0, -1).join("/");
- moduleName = (base ? base + "/" : "") + moduleName;
-
- while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
- var previous = moduleName;
- moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
- }
- }
-
- return moduleName;
-};
-
-window.require = function(parentId, id) {
- if (!id) {
- id = parentId
- parentId = null;
- }
- if (!id.charAt)
- throw new Error("worker.js require() accepts only (parentId, id) as arguments");
-
- id = window.normalizeModule(parentId, id);
-
- var module = window.require.modules[id];
- if (module) {
- if (!module.initialized) {
- module.initialized = true;
- module.exports = module.factory().exports;
- }
- return module.exports;
- }
-
- var chunks = id.split("/");
- if (!window.require.tlns)
- return console.log("unable to load " + id);
- chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
- var path = chunks.join("/") + ".js";
-
- window.require.id = id;
- importScripts(path);
- return window.require(parentId, id);
-};
-window.require.modules = {};
-window.require.tlns = {};
-
-window.define = function(id, deps, factory) {
- if (arguments.length == 2) {
- factory = deps;
- if (typeof id != "string") {
- deps = id;
- id = window.require.id;
- }
- } else if (arguments.length == 1) {
- factory = id;
- deps = []
- id = window.require.id;
- }
-
- if (!deps.length)
- deps = ['require', 'exports', 'module']
-
- if (id.indexOf("text!") === 0)
- return;
-
- var req = function(childId) {
- return window.require(id, childId);
- };
-
- window.require.modules[id] = {
- exports: {},
- factory: function() {
- var module = this;
- var returnExports = factory.apply(this, deps.map(function(dep) {
- switch(dep) {
- case 'require': return req
- case 'exports': return module.exports
- case 'module': return module
- default: return req(dep)
- }
- }));
- if (returnExports)
- module.exports = returnExports;
- return module;
- }
- };
-};
-window.define.amd = {}
-
-window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
- require.tlns = topLevelNamespaces;
-}
-
-window.initSender = function initSender() {
-
- var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
- var oop = window.require("ace/lib/oop");
-
- var Sender = function() {};
-
- (function() {
-
- oop.implement(this, EventEmitter);
-
- this.callback = function(data, callbackId) {
- postMessage({
- type: "call",
- id: callbackId,
- data: data
- });
- };
-
- this.emit = function(name, data) {
- postMessage({
- type: "event",
- name: name,
- data: data
- });
- };
-
- }).call(Sender.prototype);
-
- return new Sender();
-}
-
-window.main = null;
-window.sender = null;
-
-window.onmessage = function(e) {
- var msg = e.data;
- if (msg.command) {
- if (main[msg.command])
- main[msg.command].apply(main, msg.args);
- else
- throw new Error("Unknown command:" + msg.command);
- }
- else if (msg.init) {
- initBaseUrls(msg.tlns);
- require("ace/lib/es5-shim");
- sender = initSender();
- var clazz = require(msg.module)[msg.classname];
- main = new clazz(sender);
- }
- else if (msg.event && sender) {
- sender._emit(msg.event, msg.data);
- }
-};
-})(this);// https://github.com/kriskowal/es5-shim
-
-define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-function Empty() {}
-
-if (!Function.prototype.bind) {
- Function.prototype.bind = function bind(that) { // .length is 1
- var target = this;
- if (typeof target != "function") {
- throw new TypeError("Function.prototype.bind called on incompatible " + target);
- }
- var args = slice.call(arguments, 1); // for normal call
- var bound = function () {
-
- if (this instanceof bound) {
-
- var result = target.apply(
- this,
- args.concat(slice.call(arguments))
- );
- if (Object(result) === result) {
- return result;
- }
- return this;
-
- } else {
- return target.apply(
- that,
- args.concat(slice.call(arguments))
- );
-
- }
-
- };
- if(target.prototype) {
- Empty.prototype = target.prototype;
- bound.prototype = new Empty();
- Empty.prototype = null;
- }
- return bound;
- };
-}
-var call = Function.prototype.call;
-var prototypeOfArray = Array.prototype;
-var prototypeOfObject = Object.prototype;
-var slice = prototypeOfArray.slice;
-var _toString = call.bind(prototypeOfObject.toString);
-var owns = call.bind(prototypeOfObject.hasOwnProperty);
-var defineGetter;
-var defineSetter;
-var lookupGetter;
-var lookupSetter;
-var supportsAccessors;
-if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
- defineGetter = call.bind(prototypeOfObject.__defineGetter__);
- defineSetter = call.bind(prototypeOfObject.__defineSetter__);
- lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
- lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
-}
-if ([1,2].splice(0).length != 2) {
- if(function() { // test IE < 9 to splice bug - see issue #138
- function makeArray(l) {
- var a = new Array(l+2);
- a[0] = a[1] = 0;
- return a;
- }
- var array = [], lengthBefore;
-
- array.splice.apply(array, makeArray(20));
- array.splice.apply(array, makeArray(26));
-
- lengthBefore = array.length; //46
- array.splice(5, 0, "XXX"); // add one element
-
- lengthBefore + 1 == array.length
-
- if (lengthBefore + 1 == array.length) {
- return true;// has right splice implementation without bugs
- }
- }()) {//IE 6/7
- var array_splice = Array.prototype.splice;
- Array.prototype.splice = function(start, deleteCount) {
- if (!arguments.length) {
- return [];
- } else {
- return array_splice.apply(this, [
- start === void 0 ? 0 : start,
- deleteCount === void 0 ? (this.length - start) : deleteCount
- ].concat(slice.call(arguments, 2)))
- }
- };
- } else {//IE8
- Array.prototype.splice = function(pos, removeCount){
- var length = this.length;
- if (pos > 0) {
- if (pos > length)
- pos = length;
- } else if (pos == void 0) {
- pos = 0;
- } else if (pos < 0) {
- pos = Math.max(length + pos, 0);
- }
-
- if (!(pos+removeCount < length))
- removeCount = length - pos;
-
- var removed = this.slice(pos, pos+removeCount);
- var insert = slice.call(arguments, 2);
- var add = insert.length;
- if (pos === length) {
- if (add) {
- this.push.apply(this, insert);
- }
- } else {
- var remove = Math.min(removeCount, length - pos);
- var tailOldPos = pos + remove;
- var tailNewPos = tailOldPos + add - remove;
- var tailCount = length - tailOldPos;
- var lengthAfterRemove = length - remove;
-
- if (tailNewPos < tailOldPos) { // case A
- for (var i = 0; i < tailCount; ++i) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } else if (tailNewPos > tailOldPos) { // case B
- for (i = tailCount; i--; ) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } // else, add == remove (nothing to do)
-
- if (add && pos === lengthAfterRemove) {
- this.length = lengthAfterRemove; // truncate array
- this.push.apply(this, insert);
- } else {
- this.length = lengthAfterRemove + add; // reserves space
- for (i = 0; i < add; ++i) {
- this[pos+i] = insert[i];
- }
- }
- }
- return removed;
- };
- }
-}
-if (!Array.isArray) {
- Array.isArray = function isArray(obj) {
- return _toString(obj) == "[object Array]";
- };
-}
-var boxedString = Object("a"),
- splitString = boxedString[0] != "a" || !(0 in boxedString);
-
-if (!Array.prototype.forEach) {
- Array.prototype.forEach = function forEach(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- thisp = arguments[1],
- i = -1,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- while (++i < length) {
- if (i in self) {
- fun.call(thisp, self[i], i, object);
- }
- }
- };
-}
-if (!Array.prototype.map) {
- Array.prototype.map = function map(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = Array(length),
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self)
- result[i] = fun.call(thisp, self[i], i, object);
- }
- return result;
- };
-}
-if (!Array.prototype.filter) {
- Array.prototype.filter = function filter(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = [],
- value,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self) {
- value = self[i];
- if (fun.call(thisp, value, i, object)) {
- result.push(value);
- }
- }
- }
- return result;
- };
-}
-if (!Array.prototype.every) {
- Array.prototype.every = function every(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && !fun.call(thisp, self[i], i, object)) {
- return false;
- }
- }
- return true;
- };
-}
-if (!Array.prototype.some) {
- Array.prototype.some = function some(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && fun.call(thisp, self[i], i, object)) {
- return true;
- }
- }
- return false;
- };
-}
-if (!Array.prototype.reduce) {
- Array.prototype.reduce = function reduce(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduce of empty array with no initial value");
- }
-
- var i = 0;
- var result;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i++];
- break;
- }
- if (++i >= length) {
- throw new TypeError("reduce of empty array with no initial value");
- }
- } while (true);
- }
-
- for (; i < length; i++) {
- if (i in self) {
- result = fun.call(void 0, result, self[i], i, object);
- }
- }
-
- return result;
- };
-}
-if (!Array.prototype.reduceRight) {
- Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduceRight of empty array with no initial value");
- }
-
- var result, i = length - 1;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i--];
- break;
- }
- if (--i < 0) {
- throw new TypeError("reduceRight of empty array with no initial value");
- }
- } while (true);
- }
-
- do {
- if (i in this) {
- result = fun.call(void 0, result, self[i], i, object);
- }
- } while (i--);
-
- return result;
- };
-}
-if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
- Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
-
- if (!length) {
- return -1;
- }
-
- var i = 0;
- if (arguments.length > 1) {
- i = toInteger(arguments[1]);
- }
- i = i >= 0 ? i : Math.max(0, length + i);
- for (; i < length; i++) {
- if (i in self && self[i] === sought) {
- return i;
- }
- }
- return -1;
- };
-}
-if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
- Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
-
- if (!length) {
- return -1;
- }
- var i = length - 1;
- if (arguments.length > 1) {
- i = Math.min(i, toInteger(arguments[1]));
- }
- i = i >= 0 ? i : length - Math.abs(i);
- for (; i >= 0; i--) {
- if (i in self && sought === self[i]) {
- return i;
- }
- }
- return -1;
- };
-}
-if (!Object.getPrototypeOf) {
- Object.getPrototypeOf = function getPrototypeOf(object) {
- return object.__proto__ || (
- object.constructor ?
- object.constructor.prototype :
- prototypeOfObject
- );
- };
-}
-if (!Object.getOwnPropertyDescriptor) {
- var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
- "non-object: ";
- Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT + object);
- if (!owns(object, property))
- return;
-
- var descriptor, getter, setter;
- descriptor = { enumerable: true, configurable: true };
- if (supportsAccessors) {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
-
- var getter = lookupGetter(object, property);
- var setter = lookupSetter(object, property);
- object.__proto__ = prototype;
-
- if (getter || setter) {
- if (getter) descriptor.get = getter;
- if (setter) descriptor.set = setter;
- return descriptor;
- }
- }
- descriptor.value = object[property];
- return descriptor;
- };
-}
-if (!Object.getOwnPropertyNames) {
- Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
- return Object.keys(object);
- };
-}
-if (!Object.create) {
- var createEmpty;
- if (Object.prototype.__proto__ === null) {
- createEmpty = function () {
- return { "__proto__": null };
- };
- } else {
- createEmpty = function () {
- var empty = {};
- for (var i in empty)
- empty[i] = null;
- empty.constructor =
- empty.hasOwnProperty =
- empty.propertyIsEnumerable =
- empty.isPrototypeOf =
- empty.toLocaleString =
- empty.toString =
- empty.valueOf =
- empty.__proto__ = null;
- return empty;
- }
- }
-
- Object.create = function create(prototype, properties) {
- var object;
- if (prototype === null) {
- object = createEmpty();
- } else {
- if (typeof prototype != "object")
- throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
- var Type = function () {};
- Type.prototype = prototype;
- object = new Type();
- object.__proto__ = prototype;
- }
- if (properties !== void 0)
- Object.defineProperties(object, properties);
- return object;
- };
-}
-
-function doesDefinePropertyWork(object) {
- try {
- Object.defineProperty(object, "sentinel", {});
- return "sentinel" in object;
- } catch (exception) {
- }
-}
-if (Object.defineProperty) {
- var definePropertyWorksOnObject = doesDefinePropertyWork({});
- var definePropertyWorksOnDom = typeof document == "undefined" ||
- doesDefinePropertyWork(document.createElement("div"));
- if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
- var definePropertyFallback = Object.defineProperty;
- }
-}
-
-if (!Object.defineProperty || definePropertyFallback) {
- var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
- var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
- var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
- "on this javascript engine";
-
- Object.defineProperty = function defineProperty(object, property, descriptor) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT_TARGET + object);
- if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
- throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
- if (definePropertyFallback) {
- try {
- return definePropertyFallback.call(Object, object, property, descriptor);
- } catch (exception) {
- }
- }
- if (owns(descriptor, "value")) {
-
- if (supportsAccessors && (lookupGetter(object, property) ||
- lookupSetter(object, property)))
- {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
- delete object[property];
- object[property] = descriptor.value;
- object.__proto__ = prototype;
- } else {
- object[property] = descriptor.value;
- }
- } else {
- if (!supportsAccessors)
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
- if (owns(descriptor, "get"))
- defineGetter(object, property, descriptor.get);
- if (owns(descriptor, "set"))
- defineSetter(object, property, descriptor.set);
- }
-
- return object;
- };
-}
-if (!Object.defineProperties) {
- Object.defineProperties = function defineProperties(object, properties) {
- for (var property in properties) {
- if (owns(properties, property))
- Object.defineProperty(object, property, properties[property]);
- }
- return object;
- };
-}
-if (!Object.seal) {
- Object.seal = function seal(object) {
- return object;
- };
-}
-if (!Object.freeze) {
- Object.freeze = function freeze(object) {
- return object;
- };
-}
-try {
- Object.freeze(function () {});
-} catch (exception) {
- Object.freeze = (function freeze(freezeObject) {
- return function freeze(object) {
- if (typeof object == "function") {
- return object;
- } else {
- return freezeObject(object);
- }
- };
- })(Object.freeze);
-}
-if (!Object.preventExtensions) {
- Object.preventExtensions = function preventExtensions(object) {
- return object;
- };
-}
-if (!Object.isSealed) {
- Object.isSealed = function isSealed(object) {
- return false;
- };
-}
-if (!Object.isFrozen) {
- Object.isFrozen = function isFrozen(object) {
- return false;
- };
-}
-if (!Object.isExtensible) {
- Object.isExtensible = function isExtensible(object) {
- if (Object(object) === object) {
- throw new TypeError(); // TODO message
- }
- var name = '';
- while (owns(object, name)) {
- name += '?';
- }
- object[name] = true;
- var returnValue = owns(object, name);
- delete object[name];
- return returnValue;
- };
-}
-if (!Object.keys) {
- var hasDontEnumBug = true,
- dontEnums = [
- "toString",
- "toLocaleString",
- "valueOf",
- "hasOwnProperty",
- "isPrototypeOf",
- "propertyIsEnumerable",
- "constructor"
- ],
- dontEnumsLength = dontEnums.length;
-
- for (var key in {"toString": null}) {
- hasDontEnumBug = false;
- }
-
- Object.keys = function keys(object) {
-
- if (
- (typeof object != "object" && typeof object != "function") ||
- object === null
- ) {
- throw new TypeError("Object.keys called on a non-object");
- }
-
- var keys = [];
- for (var name in object) {
- if (owns(object, name)) {
- keys.push(name);
- }
- }
-
- if (hasDontEnumBug) {
- for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
- var dontEnum = dontEnums[i];
- if (owns(object, dontEnum)) {
- keys.push(dontEnum);
- }
- }
- }
- return keys;
- };
-
-}
-if (!Date.now) {
- Date.now = function now() {
- return new Date().getTime();
- };
-}
-var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
- "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
- "\u2029\uFEFF";
-if (!String.prototype.trim || ws.trim()) {
- ws = "[" + ws + "]";
- var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
- trimEndRegexp = new RegExp(ws + ws + "*$");
- String.prototype.trim = function trim() {
- return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
- };
-}
-
-function toInteger(n) {
- n = +n;
- if (n !== n) { // isNaN
- n = 0;
- } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
- n = (n > 0 || -1) * Math.floor(Math.abs(n));
- }
- return n;
-}
-
-function isPrimitive(input) {
- var type = typeof input;
- return (
- input === null ||
- type === "undefined" ||
- type === "boolean" ||
- type === "number" ||
- type === "string"
- );
-}
-
-function toPrimitive(input) {
- var val, valueOf, toString;
- if (isPrimitive(input)) {
- return input;
- }
- valueOf = input.valueOf;
- if (typeof valueOf === "function") {
- val = valueOf.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- toString = input.toString;
- if (typeof toString === "function") {
- val = toString.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- throw new TypeError();
-}
-var toObject = function (o) {
- if (o == null) { // this matches both null and undefined
- throw new TypeError("can't convert "+o+" to object");
- }
- return Object(o);
-};
-
-});
-
-define('ace/mode/javascript_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/javascript/jshint'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var Mirror = require("../worker/mirror").Mirror;
-var lint = require("./javascript/jshint").JSHINT;
-
-function startRegex(arr) {
- return RegExp("^(" + arr.join("|") + ")");
-}
-
-var disabledWarningsRe = startRegex([
- "Bad for in variable '(.+)'.",
- 'Missing "use strict"'
-]);
-var errorsRe = startRegex([
- "Unexpected",
- "Expected ",
- "Confusing (plus|minus)",
- "\\{a\\} unterminated regular expression",
- "Unclosed ",
- "Unmatched ",
- "Unbegun comment",
- "Bad invocation",
- "Missing space after",
- "Missing operator at"
-]);
-var infoRe = startRegex([
- "Expected an assignment",
- "Bad escapement of EOL",
- "Unexpected comma",
- "Unexpected space",
- "Missing radix parameter.",
- "A leading decimal point can",
- "\\['{a}'\\] is better written in dot notation.",
- "'{a}' used out of scope"
-]);
-
-var JavaScriptWorker = exports.JavaScriptWorker = function(sender) {
- Mirror.call(this, sender);
- this.setTimeout(500);
- this.setOptions();
-};
-
-oop.inherits(JavaScriptWorker, Mirror);
-
-(function() {
- this.setOptions = function(options) {
- this.options = options || {
- esnext: true,
- moz: true,
- devel: true,
- browser: true,
- node: true,
- laxcomma: true,
- laxbreak: true,
- lastsemic: true,
- onevar: false,
- passfail: false,
- maxerr: 100,
- expr: true,
- multistr: true,
- globalstrict: true
- };
- this.doc.getValue() && this.deferredUpdate.schedule(100);
- };
-
- this.changeOptions = function(newOptions) {
- oop.mixin(this.options, newOptions);
- this.doc.getValue() && this.deferredUpdate.schedule(100);
- };
-
- this.isValidJS = function(str) {
- try {
- eval("throw 0;" + str);
- } catch(e) {
- if (e === 0)
- return true;
- }
- return false
- };
-
- this.onUpdate = function() {
- var value = this.doc.getValue();
- value = value.replace(/^#!.*\n/, "\n");
- if (!value) {
- this.sender.emit("jslint", []);
- return;
- }
- var errors = [];
- var maxErrorLevel = this.isValidJS(value) ? "warning" : "error";
- lint(value, this.options);
- var results = lint.errors;
-
- var errorAdded = false
- for (var i = 0; i < results.length; i++) {
- var error = results[i];
- if (!error)
- continue;
- var raw = error.raw;
- var type = "warning";
-
- if (raw == "Missing semicolon.") {
- var str = error.evidence.substr(error.character);
- str = str.charAt(str.search(/\S/));
- if (maxErrorLevel == "error" && str && /[\w\d{(['"]/.test(str)) {
- error.reason = 'Missing ";" before statement';
- type = "error";
- } else {
- type = "info";
- }
- }
- else if (disabledWarningsRe.test(raw)) {
- continue;
- }
- else if (infoRe.test(raw)) {
- type = "info"
- }
- else if (errorsRe.test(raw)) {
- errorAdded = true;
- type = maxErrorLevel;
- }
- else if (raw == "'{a}' is not defined.") {
- type = "warning";
- }
- else if (raw == "'{a}' is defined but never used.") {
- type = "info";
- }
-
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: type,
- raw: raw
- });
-
- if (errorAdded) {
- }
- }
-
- this.sender.emit("jslint", errors);
- };
-
-}).call(JavaScriptWorker.prototype);
-
-});
-
-define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-exports.inherits = (function() {
- var tempCtor = function() {};
- return function(ctor, superCtor) {
- tempCtor.prototype = superCtor.prototype;
- ctor.super_ = superCtor.prototype;
- ctor.prototype = new tempCtor();
- ctor.prototype.constructor = ctor;
- };
-}());
-
-exports.mixin = function(obj, mixin) {
- for (var key in mixin) {
- obj[key] = mixin[key];
- }
- return obj;
-};
-
-exports.implement = function(proto, mixin) {
- exports.mixin(proto, mixin);
-};
-
-});
-define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
-
-
-var Document = require("../document").Document;
-var lang = require("../lib/lang");
-
-var Mirror = exports.Mirror = function(sender) {
- this.sender = sender;
- var doc = this.doc = new Document("");
-
- var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
-
- var _self = this;
- sender.on("change", function(e) {
- doc.applyDeltas(e.data);
- deferredUpdate.schedule(_self.$timeout);
- });
-};
-
-(function() {
-
- this.$timeout = 500;
-
- this.setTimeout = function(timeout) {
- this.$timeout = timeout;
- };
-
- this.setValue = function(value) {
- this.doc.setValue(value);
- this.deferredUpdate.schedule(this.$timeout);
- };
-
- this.getValue = function(callbackId) {
- this.sender.callback(this.doc.getValue(), callbackId);
- };
-
- this.onUpdate = function() {
- };
-
-}).call(Mirror.prototype);
-
-});
-
-define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
-
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Range = require("./range").Range;
-var Anchor = require("./anchor").Anchor;
-
-var Document = function(text) {
- this.$lines = [];
- if (text.length == 0) {
- this.$lines = [""];
- } else if (Array.isArray(text)) {
- this._insertLines(0, text);
- } else {
- this.insert({row: 0, column:0}, text);
- }
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
- this.setValue = function(text) {
- var len = this.getLength();
- this.remove(new Range(0, 0, len, this.getLine(len-1).length));
- this.insert({row: 0, column:0}, text);
- };
- this.getValue = function() {
- return this.getAllLines().join(this.getNewLineCharacter());
- };
- this.createAnchor = function(row, column) {
- return new Anchor(this, row, column);
- };
- if ("aaa".split(/a/).length == 0)
- this.$split = function(text) {
- return text.replace(/\r\n|\r/g, "\n").split("\n");
- }
- else
- this.$split = function(text) {
- return text.split(/\r\n|\r|\n/);
- };
-
-
- this.$detectNewLine = function(text) {
- var match = text.match(/^.*?(\r\n|\r|\n)/m);
- this.$autoNewLine = match ? match[1] : "\n";
- };
- this.getNewLineCharacter = function() {
- switch (this.$newLineMode) {
- case "windows":
- return "\r\n";
- case "unix":
- return "\n";
- default:
- return this.$autoNewLine;
- }
- };
-
- this.$autoNewLine = "\n";
- this.$newLineMode = "auto";
- this.setNewLineMode = function(newLineMode) {
- if (this.$newLineMode === newLineMode)
- return;
-
- this.$newLineMode = newLineMode;
- };
- this.getNewLineMode = function() {
- return this.$newLineMode;
- };
- this.isNewLine = function(text) {
- return (text == "\r\n" || text == "\r" || text == "\n");
- };
- this.getLine = function(row) {
- return this.$lines[row] || "";
- };
- this.getLines = function(firstRow, lastRow) {
- return this.$lines.slice(firstRow, lastRow + 1);
- };
- this.getAllLines = function() {
- return this.getLines(0, this.getLength());
- };
- this.getLength = function() {
- return this.$lines.length;
- };
- this.getTextRange = function(range) {
- if (range.start.row == range.end.row) {
- return this.getLine(range.start.row)
- .substring(range.start.column, range.end.column);
- }
- var lines = this.getLines(range.start.row, range.end.row);
- lines[0] = (lines[0] || "").substring(range.start.column);
- var l = lines.length - 1;
- if (range.end.row - range.start.row == l)
- lines[l] = lines[l].substring(0, range.end.column);
- return lines.join(this.getNewLineCharacter());
- };
-
- this.$clipPosition = function(position) {
- var length = this.getLength();
- if (position.row >= length) {
- position.row = Math.max(0, length - 1);
- position.column = this.getLine(length-1).length;
- } else if (position.row < 0)
- position.row = 0;
- return position;
- };
- this.insert = function(position, text) {
- if (!text || text.length === 0)
- return position;
-
- position = this.$clipPosition(position);
- if (this.getLength() <= 1)
- this.$detectNewLine(text);
-
- var lines = this.$split(text);
- var firstLine = lines.splice(0, 1)[0];
- var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
-
- position = this.insertInLine(position, firstLine);
- if (lastLine !== null) {
- position = this.insertNewLine(position); // terminate first line
- position = this._insertLines(position.row, lines);
- position = this.insertInLine(position, lastLine || "");
- }
- return position;
- };
- this.insertLines = function(row, lines) {
- if (row >= this.getLength())
- return this.insert({row: row, column: 0}, "\n" + lines.join("\n"));
- return this._insertLines(Math.max(row, 0), lines);
- };
- this._insertLines = function(row, lines) {
- if (lines.length == 0)
- return {row: row, column: 0};
- if (lines.length > 0xFFFF) {
- var end = this._insertLines(row, lines.slice(0xFFFF));
- lines = lines.slice(0, 0xFFFF);
- }
-
- var args = [row, 0];
- args.push.apply(args, lines);
- this.$lines.splice.apply(this.$lines, args);
-
- var range = new Range(row, 0, row + lines.length, 0);
- var delta = {
- action: "insertLines",
- range: range,
- lines: lines
- };
- this._emit("change", { data: delta });
- return end || range.end;
- };
- this.insertNewLine = function(position) {
- position = this.$clipPosition(position);
- var line = this.$lines[position.row] || "";
-
- this.$lines[position.row] = line.substring(0, position.column);
- this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
-
- var end = {
- row : position.row + 1,
- column : 0
- };
-
- var delta = {
- action: "insertText",
- range: Range.fromPoints(position, end),
- text: this.getNewLineCharacter()
- };
- this._emit("change", { data: delta });
-
- return end;
- };
- this.insertInLine = function(position, text) {
- if (text.length == 0)
- return position;
-
- var line = this.$lines[position.row] || "";
-
- this.$lines[position.row] = line.substring(0, position.column) + text
- + line.substring(position.column);
-
- var end = {
- row : position.row,
- column : position.column + text.length
- };
-
- var delta = {
- action: "insertText",
- range: Range.fromPoints(position, end),
- text: text
- };
- this._emit("change", { data: delta });
-
- return end;
- };
- this.remove = function(range) {
- if (!range instanceof Range)
- range = Range.fromPoints(range.start, range.end);
- range.start = this.$clipPosition(range.start);
- range.end = this.$clipPosition(range.end);
-
- if (range.isEmpty())
- return range.start;
-
- var firstRow = range.start.row;
- var lastRow = range.end.row;
-
- if (range.isMultiLine()) {
- var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
- var lastFullRow = lastRow - 1;
-
- if (range.end.column > 0)
- this.removeInLine(lastRow, 0, range.end.column);
-
- if (lastFullRow >= firstFullRow)
- this._removeLines(firstFullRow, lastFullRow);
-
- if (firstFullRow != firstRow) {
- this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
- this.removeNewLine(range.start.row);
- }
- }
- else {
- this.removeInLine(firstRow, range.start.column, range.end.column);
- }
- return range.start;
- };
- this.removeInLine = function(row, startColumn, endColumn) {
- if (startColumn == endColumn)
- return;
-
- var range = new Range(row, startColumn, row, endColumn);
- var line = this.getLine(row);
- var removed = line.substring(startColumn, endColumn);
- var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
- this.$lines.splice(row, 1, newLine);
-
- var delta = {
- action: "removeText",
- range: range,
- text: removed
- };
- this._emit("change", { data: delta });
- return range.start;
- };
- this.removeLines = function(firstRow, lastRow) {
- if (firstRow < 0 || lastRow >= this.getLength())
- return this.remove(new Range(firstRow, 0, lastRow + 1, 0));
- return this._removeLines(firstRow, lastRow);
- };
-
- this._removeLines = function(firstRow, lastRow) {
- var range = new Range(firstRow, 0, lastRow + 1, 0);
- var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
-
- var delta = {
- action: "removeLines",
- range: range,
- nl: this.getNewLineCharacter(),
- lines: removed
- };
- this._emit("change", { data: delta });
- return removed;
- };
- this.removeNewLine = function(row) {
- var firstLine = this.getLine(row);
- var secondLine = this.getLine(row+1);
-
- var range = new Range(row, firstLine.length, row+1, 0);
- var line = firstLine + secondLine;
-
- this.$lines.splice(row, 2, line);
-
- var delta = {
- action: "removeText",
- range: range,
- text: this.getNewLineCharacter()
- };
- this._emit("change", { data: delta });
- };
- this.replace = function(range, text) {
- if (!range instanceof Range)
- range = Range.fromPoints(range.start, range.end);
- if (text.length == 0 && range.isEmpty())
- return range.start;
- if (text == this.getTextRange(range))
- return range.end;
-
- this.remove(range);
- if (text) {
- var end = this.insert(range.start, text);
- }
- else {
- end = range.start;
- }
-
- return end;
- };
- this.applyDeltas = function(deltas) {
- for (var i=0; i<deltas.length; i++) {
- var delta = deltas[i];
- var range = Range.fromPoints(delta.range.start, delta.range.end);
-
- if (delta.action == "insertLines")
- this.insertLines(range.start.row, delta.lines);
- else if (delta.action == "insertText")
- this.insert(range.start, delta.text);
- else if (delta.action == "removeLines")
- this._removeLines(range.start.row, range.end.row - 1);
- else if (delta.action == "removeText")
- this.remove(range);
- }
- };
- this.revertDeltas = function(deltas) {
- for (var i=deltas.length-1; i>=0; i--) {
- var delta = deltas[i];
-
- var range = Range.fromPoints(delta.range.start, delta.range.end);
-
- if (delta.action == "insertLines")
- this._removeLines(range.start.row, range.end.row - 1);
- else if (delta.action == "insertText")
- this.remove(range);
- else if (delta.action == "removeLines")
- this._insertLines(range.start.row, delta.lines);
- else if (delta.action == "removeText")
- this.insert(range.start, delta.text);
- }
- };
- this.indexToPosition = function(index, startRow) {
- var lines = this.$lines || this.getAllLines();
- var newlineLength = this.getNewLineCharacter().length;
- for (var i = startRow || 0, l = lines.length; i < l; i++) {
- index -= lines[i].length + newlineLength;
- if (index < 0)
- return {row: i, column: index + lines[i].length + newlineLength};
- }
- return {row: l-1, column: lines[l-1].length};
- };
- this.positionToIndex = function(pos, startRow) {
- var lines = this.$lines || this.getAllLines();
- var newlineLength = this.getNewLineCharacter().length;
- var index = 0;
- var row = Math.min(pos.row, lines.length);
- for (var i = startRow || 0; i < row; ++i)
- index += lines[i].length + newlineLength;
-
- return index + pos.column;
- };
-
-}).call(Document.prototype);
-
-exports.Document = Document;
-});
-
-define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-var EventEmitter = {};
-var stopPropagation = function() { this.propagationStopped = true; };
-var preventDefault = function() { this.defaultPrevented = true; };
-
-EventEmitter._emit =
-EventEmitter._dispatchEvent = function(eventName, e) {
- this._eventRegistry || (this._eventRegistry = {});
- this._defaultHandlers || (this._defaultHandlers = {});
-
- var listeners = this._eventRegistry[eventName] || [];
- var defaultHandler = this._defaultHandlers[eventName];
- if (!listeners.length && !defaultHandler)
- return;
-
- if (typeof e != "object" || !e)
- e = {};
-
- if (!e.type)
- e.type = eventName;
- if (!e.stopPropagation)
- e.stopPropagation = stopPropagation;
- if (!e.preventDefault)
- e.preventDefault = preventDefault;
-
- listeners = listeners.slice();
- for (var i=0; i<listeners.length; i++) {
- listeners[i](e, this);
- if (e.propagationStopped)
- break;
- }
-
- if (defaultHandler && !e.defaultPrevented)
- return defaultHandler(e, this);
-};
-
-
-EventEmitter._signal = function(eventName, e) {
- var listeners = (this._eventRegistry || {})[eventName];
- if (!listeners)
- return;
- listeners = listeners.slice();
- for (var i=0; i<listeners.length; i++)
- listeners[i](e, this);
-};
-
-EventEmitter.once = function(eventName, callback) {
- var _self = this;
- callback && this.addEventListener(eventName, function newCallback() {
- _self.removeEventListener(eventName, newCallback);
- callback.apply(null, arguments);
- });
-};
-
-
-EventEmitter.setDefaultHandler = function(eventName, callback) {
- var handlers = this._defaultHandlers
- if (!handlers)
- handlers = this._defaultHandlers = {_disabled_: {}};
-
- if (handlers[eventName]) {
- var old = handlers[eventName];
- var disabled = handlers._disabled_[eventName];
- if (!disabled)
- handlers._disabled_[eventName] = disabled = [];
- disabled.push(old);
- var i = disabled.indexOf(callback);
- if (i != -1)
- disabled.splice(i, 1);
- }
- handlers[eventName] = callback;
-};
-EventEmitter.removeDefaultHandler = function(eventName, callback) {
- var handlers = this._defaultHandlers
- if (!handlers)
- return;
- var disabled = handlers._disabled_[eventName];
-
- if (handlers[eventName] == callback) {
- var old = handlers[eventName];
- if (disabled)
- this.setDefaultHandler(eventName, disabled.pop());
- } else if (disabled) {
- var i = disabled.indexOf(callback);
- if (i != -1)
- disabled.splice(i, 1);
- }
-};
-
-EventEmitter.on =
-EventEmitter.addEventListener = function(eventName, callback, capturing) {
- this._eventRegistry = this._eventRegistry || {};
-
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- listeners = this._eventRegistry[eventName] = [];
-
- if (listeners.indexOf(callback) == -1)
- listeners[capturing ? "unshift" : "push"](callback);
- return callback;
-};
-
-EventEmitter.off =
-EventEmitter.removeListener =
-EventEmitter.removeEventListener = function(eventName, callback) {
- this._eventRegistry = this._eventRegistry || {};
-
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- return;
-
- var index = listeners.indexOf(callback);
- if (index !== -1)
- listeners.splice(index, 1);
-};
-
-EventEmitter.removeAllListeners = function(eventName) {
- if (this._eventRegistry) this._eventRegistry[eventName] = [];
-};
-
-exports.EventEmitter = EventEmitter;
-
-});
-
-define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-var comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-var Range = function(startRow, startColumn, endRow, endColumn) {
- this.start = {
- row: startRow,
- column: startColumn
- };
-
- this.end = {
- row: endRow,
- column: endColumn
- };
-};
-
-(function() {
- this.isEqual = function(range) {
- return this.start.row === range.start.row &&
- this.end.row === range.end.row &&
- this.start.column === range.start.column &&
- this.end.column === range.end.column;
- };
- this.toString = function() {
- return ("Range: [" + this.start.row + "/" + this.start.column +
- "] -> [" + this.end.row + "/" + this.end.column + "]");
- };
-
- this.contains = function(row, column) {
- return this.compare(row, column) == 0;
- };
- this.compareRange = function(range) {
- var cmp,
- end = range.end,
- start = range.start;
-
- cmp = this.compare(end.row, end.column);
- if (cmp == 1) {
- cmp = this.compare(start.row, start.column);
- if (cmp == 1) {
- return 2;
- } else if (cmp == 0) {
- return 1;
- } else {
- return 0;
- }
- } else if (cmp == -1) {
- return -2;
- } else {
- cmp = this.compare(start.row, start.column);
- if (cmp == -1) {
- return -1;
- } else if (cmp == 1) {
- return 42;
- } else {
- return 0;
- }
- }
- };
- this.comparePoint = function(p) {
- return this.compare(p.row, p.column);
- };
- this.containsRange = function(range) {
- return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- };
- this.intersects = function(range) {
- var cmp = this.compareRange(range);
- return (cmp == -1 || cmp == 0 || cmp == 1);
- };
- this.isEnd = function(row, column) {
- return this.end.row == row && this.end.column == column;
- };
- this.isStart = function(row, column) {
- return this.start.row == row && this.start.column == column;
- };
- this.setStart = function(row, column) {
- if (typeof row == "object") {
- this.start.column = row.column;
- this.start.row = row.row;
- } else {
- this.start.row = row;
- this.start.column = column;
- }
- };
- this.setEnd = function(row, column) {
- if (typeof row == "object") {
- this.end.column = row.column;
- this.end.row = row.row;
- } else {
- this.end.row = row;
- this.end.column = column;
- }
- };
- this.inside = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column) || this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideStart = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideEnd = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.compare = function(row, column) {
- if (!this.isMultiLine()) {
- if (row === this.start.row) {
- return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
- };
- }
-
- if (row < this.start.row)
- return -1;
-
- if (row > this.end.row)
- return 1;
-
- if (this.start.row === row)
- return column >= this.start.column ? 0 : -1;
-
- if (this.end.row === row)
- return column <= this.end.column ? 0 : 1;
-
- return 0;
- };
- this.compareStart = function(row, column) {
- if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareEnd = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareInside = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.clipRows = function(firstRow, lastRow) {
- if (this.end.row > lastRow)
- var end = {row: lastRow + 1, column: 0};
- else if (this.end.row < firstRow)
- var end = {row: firstRow, column: 0};
-
- if (this.start.row > lastRow)
- var start = {row: lastRow + 1, column: 0};
- else if (this.start.row < firstRow)
- var start = {row: firstRow, column: 0};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
- this.extend = function(row, column) {
- var cmp = this.compare(row, column);
-
- if (cmp == 0)
- return this;
- else if (cmp == -1)
- var start = {row: row, column: column};
- else
- var end = {row: row, column: column};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
-
- this.isEmpty = function() {
- return (this.start.row === this.end.row && this.start.column === this.end.column);
- };
- this.isMultiLine = function() {
- return (this.start.row !== this.end.row);
- };
- this.clone = function() {
- return Range.fromPoints(this.start, this.end);
- };
- this.collapseRows = function() {
- if (this.end.column == 0)
- return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
- else
- return new Range(this.start.row, 0, this.end.row, 0)
- };
- this.toScreenRange = function(session) {
- var screenPosStart = session.documentToScreenPosition(this.start);
- var screenPosEnd = session.documentToScreenPosition(this.end);
-
- return new Range(
- screenPosStart.row, screenPosStart.column,
- screenPosEnd.row, screenPosEnd.column
- );
- };
- this.moveBy = function(row, column) {
- this.start.row += row;
- this.start.column += column;
- this.end.row += row;
- this.end.column += column;
- };
-
-}).call(Range.prototype);
-Range.fromPoints = function(start, end) {
- return new Range(start.row, start.column, end.row, end.column);
-};
-Range.comparePoints = comparePoints;
-
-Range.comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-
-
-exports.Range = Range;
-});
-
-define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-
-var Anchor = exports.Anchor = function(doc, row, column) {
- this.$onChange = this.onChange.bind(this);
- this.attach(doc);
-
- if (typeof column == "undefined")
- this.setPosition(row.row, row.column);
- else
- this.setPosition(row, column);
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
- this.getPosition = function() {
- return this.$clipPositionToDocument(this.row, this.column);
- };
- this.getDocument = function() {
- return this.document;
- };
- this.$insertRight = false;
- this.onChange = function(e) {
- var delta = e.data;
- var range = delta.range;
-
- if (range.start.row == range.end.row && range.start.row != this.row)
- return;
-
- if (range.start.row > this.row)
- return;
-
- if (range.start.row == this.row && range.start.column > this.column)
- return;
-
- var row = this.row;
- var column = this.column;
- var start = range.start;
- var end = range.end;
-
- if (delta.action === "insertText") {
- if (start.row === row && start.column <= column) {
- if (start.column === column && this.$insertRight) {
- } else if (start.row === end.row) {
- column += end.column - start.column;
- } else {
- column -= start.column;
- row += end.row - start.row;
- }
- } else if (start.row !== end.row && start.row < row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "insertLines") {
- if (start.row <= row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "removeText") {
- if (start.row === row && start.column < column) {
- if (end.column >= column)
- column = start.column;
- else
- column = Math.max(0, column - (end.column - start.column));
-
- } else if (start.row !== end.row && start.row < row) {
- if (end.row === row)
- column = Math.max(0, column - end.column) + start.column;
- row -= (end.row - start.row);
- } else if (end.row === row) {
- row -= end.row - start.row;
- column = Math.max(0, column - end.column) + start.column;
- }
- } else if (delta.action == "removeLines") {
- if (start.row <= row) {
- if (end.row <= row)
- row -= end.row - start.row;
- else {
- row = start.row;
- column = 0;
- }
- }
- }
-
- this.setPosition(row, column, true);
- };
- this.setPosition = function(row, column, noClip) {
- var pos;
- if (noClip) {
- pos = {
- row: row,
- column: column
- };
- } else {
- pos = this.$clipPositionToDocument(row, column);
- }
-
- if (this.row == pos.row && this.column == pos.column)
- return;
-
- var old = {
- row: this.row,
- column: this.column
- };
-
- this.row = pos.row;
- this.column = pos.column;
- this._emit("change", {
- old: old,
- value: pos
- });
- };
- this.detach = function() {
- this.document.removeEventListener("change", this.$onChange);
- };
- this.attach = function(doc) {
- this.document = doc || this.document;
- this.document.on("change", this.$onChange);
- };
- this.$clipPositionToDocument = function(row, column) {
- var pos = {};
-
- if (row >= this.document.getLength()) {
- pos.row = Math.max(0, this.document.getLength() - 1);
- pos.column = this.document.getLine(pos.row).length;
- }
- else if (row < 0) {
- pos.row = 0;
- pos.column = 0;
- }
- else {
- pos.row = row;
- pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
- }
-
- if (column < 0)
- pos.column = 0;
-
- return pos;
- };
-
-}).call(Anchor.prototype);
-
-});
-
-define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-exports.stringReverse = function(string) {
- return string.split("").reverse().join("");
-};
-
-exports.stringRepeat = function (string, count) {
- var result = '';
- while (count > 0) {
- if (count & 1)
- result += string;
-
- if (count >>= 1)
- string += string;
- }
- return result;
-};
-
-var trimBeginRegexp = /^\s\s*/;
-var trimEndRegexp = /\s\s*$/;
-
-exports.stringTrimLeft = function (string) {
- return string.replace(trimBeginRegexp, '');
-};
-
-exports.stringTrimRight = function (string) {
- return string.replace(trimEndRegexp, '');
-};
-
-exports.copyObject = function(obj) {
- var copy = {};
- for (var key in obj) {
- copy[key] = obj[key];
- }
- return copy;
-};
-
-exports.copyArray = function(array){
- var copy = [];
- for (var i=0, l=array.length; i<l; i++) {
- if (array[i] && typeof array[i] == "object")
- copy[i] = this.copyObject( array[i] );
- else
- copy[i] = array[i];
- }
- return copy;
-};
-
-exports.deepCopy = function (obj) {
- if (typeof obj != "object") {
- return obj;
- }
-
- var copy = obj.constructor();
- for (var key in obj) {
- if (typeof obj[key] == "object") {
- copy[key] = this.deepCopy(obj[key]);
- } else {
- copy[key] = obj[key];
- }
- }
- return copy;
-};
-
-exports.arrayToMap = function(arr) {
- var map = {};
- for (var i=0; i<arr.length; i++) {
- map[arr[i]] = 1;
- }
- return map;
-
-};
-
-exports.createMap = function(props) {
- var map = Object.create(null);
- for (var i in props) {
- map[i] = props[i];
- }
- return map;
-};
-exports.arrayRemove = function(array, value) {
- for (var i = 0; i <= array.length; i++) {
- if (value === array[i]) {
- array.splice(i, 1);
- }
- }
-};
-
-exports.escapeRegExp = function(str) {
- return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
-};
-
-exports.escapeHTML = function(str) {
- return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
-};
-
-exports.getMatchOffsets = function(string, regExp) {
- var matches = [];
-
- string.replace(regExp, function(str) {
- matches.push({
- offset: arguments[arguments.length-2],
- length: str.length
- });
- });
-
- return matches;
-};
-exports.deferredCall = function(fcn) {
-
- var timer = null;
- var callback = function() {
- timer = null;
- fcn();
- };
-
- var deferred = function(timeout) {
- deferred.cancel();
- timer = setTimeout(callback, timeout || 0);
- return deferred;
- };
-
- deferred.schedule = deferred;
-
- deferred.call = function() {
- this.cancel();
- fcn();
- return deferred;
- };
-
- deferred.cancel = function() {
- clearTimeout(timer);
- timer = null;
- return deferred;
- };
-
- return deferred;
-};
-
-
-exports.delayedCall = function(fcn, defaultTimeout) {
- var timer = null;
- var callback = function() {
- timer = null;
- fcn();
- };
-
- var _self = function(timeout) {
- timer && clearTimeout(timer);
- timer = setTimeout(callback, timeout || defaultTimeout);
- };
-
- _self.delay = _self;
- _self.schedule = function(timeout) {
- if (timer == null)
- timer = setTimeout(callback, timeout || 0);
- };
-
- _self.call = function() {
- this.cancel();
- fcn();
- };
-
- _self.cancel = function() {
- timer && clearTimeout(timer);
- timer = null;
- };
-
- _self.isPending = function() {
- return timer;
- };
-
- return _self;
-};
-});
-define('ace/mode/javascript/jshint', ['require', 'exports', 'module' ], function(require, exports, module) {
-require = null;
-require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({
-9:[function (req,module,exports){
- ["log", "info", "warn", "error",
- "time","timeEnd", "trace", "dir", "assert"
- ].forEach(function(x) {exports[x] = nop;});
- function nop() {}
- },{}],
-1:[function(req,module,exports){
-
-(function() {
- var root = this;
- var previousUnderscore = root._;
- var breaker = {};
- var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
- var push = ArrayProto.push,
- slice = ArrayProto.slice,
- concat = ArrayProto.concat,
- toString = ObjProto.toString,
- hasOwnProperty = ObjProto.hasOwnProperty;
- var
- nativeForEach = ArrayProto.forEach,
- nativeMap = ArrayProto.map,
- nativeReduce = ArrayProto.reduce,
- nativeReduceRight = ArrayProto.reduceRight,
- nativeFilter = ArrayProto.filter,
- nativeEvery = ArrayProto.every,
- nativeSome = ArrayProto.some,
- nativeIndexOf = ArrayProto.indexOf,
- nativeLastIndexOf = ArrayProto.lastIndexOf,
- nativeIsArray = Array.isArray,
- nativeKeys = Object.keys,
- nativeBind = FuncProto.bind;
- var _ = function(obj) {
- if (obj instanceof _) return obj;
- if (!(this instanceof _)) return new _(obj);
- this._wrapped = obj;
- };
- if (typeof exports !== 'undefined') {
- if (typeof module !== 'undefined' && module.exports) {
- exports = module.exports = _;
- }
- exports._ = _;
- } else {
- root._ = _;
- }
- _.VERSION = '1.4.4';
- var each = _.each = _.forEach = function(obj, iterator, context) {
- if (obj == null) return;
- if (nativeForEach && obj.forEach === nativeForEach) {
- obj.forEach(iterator, context);
- } else if (obj.length === +obj.length) {
- for (var i = 0, l = obj.length; i < l; i++) {
- if (iterator.call(context, obj[i], i, obj) === breaker) return;
- }
- } else {
- for (var key in obj) {
- if (_.has(obj, key)) {
- if (iterator.call(context, obj[key], key, obj) === breaker) return;
- }
- }
- }
- };
- _.map = _.collect = function(obj, iterator, context) {
- var results = [];
- if (obj == null) return results;
- if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
- each(obj, function(value, index, list) {
- results[results.length] = iterator.call(context, value, index, list);
- });
- return results;
- };
-
- var reduceError = 'Reduce of empty array with no initial value';
- _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
- var initial = arguments.length > 2;
- if (obj == null) obj = [];
- if (nativeReduce && obj.reduce === nativeReduce) {
- if (context) iterator = _.bind(iterator, context);
- return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
- }
- each(obj, function(value, index, list) {
- if (!initial) {
- memo = value;
- initial = true;
- } else {
- memo = iterator.call(context, memo, value, index, list);
- }
- });
- if (!initial) throw new TypeError(reduceError);
- return memo;
- };
- _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
- var initial = arguments.length > 2;
- if (obj == null) obj = [];
- if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
- if (context) iterator = _.bind(iterator, context);
- return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
- }
- var length = obj.length;
- if (length !== +length) {
- var keys = _.keys(obj);
- length = keys.length;
- }
- each(obj, function(value, index, list) {
- index = keys ? keys[--length] : --length;
- if (!initial) {
- memo = obj[index];
- initial = true;
- } else {
- memo = iterator.call(context, memo, obj[index], index, list);
- }
- });
- if (!initial) throw new TypeError(reduceError);
- return memo;
- };
- _.find = _.detect = function(obj, iterator, context) {
- var result;
- any(obj, function(value, index, list) {
- if (iterator.call(context, value, index, list)) {
- result = value;
- return true;
- }
- });
- return result;
- };
- _.filter = _.select = function(obj, iterator, context) {
- var results = [];
- if (obj == null) return results;
- if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
- each(obj, function(value, index, list) {
- if (iterator.call(context, value, index, list)) results[results.length] = value;
- });
- return results;
- };
- _.reject = function(obj, iterator, context) {
- return _.filter(obj, function(value, index, list) {
- return !iterator.call(context, value, index, list);
- }, context);
- };
- _.every = _.all = function(obj, iterator, context) {
- iterator || (iterator = _.identity);
- var result = true;
- if (obj == null) return result;
- if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
- each(obj, function(value, index, list) {
- if (!(result = result && iterator.call(context, value, index, list))) return breaker;
- });
- return !!result;
- };
- var any = _.some = _.any = function(obj, iterator, context) {
- iterator || (iterator = _.identity);
- var result = false;
- if (obj == null) return result;
- if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
- each(obj, function(value, index, list) {
- if (result || (result = iterator.call(context, value, index, list))) return breaker;
- });
- return !!result;
- };
- _.contains = _.include = function(obj, target) {
- if (obj == null) return false;
- if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
- return any(obj, function(value) {
- return value === target;
- });
- };
- _.invoke = function(obj, method) {
- var args = slice.call(arguments, 2);
- var isFunc = _.isFunction(method);
- return _.map(obj, function(value) {
- return (isFunc ? method : value[method]).apply(value, args);
- });
- };
- _.pluck = function(obj, key) {
- return _.map(obj, function(value){ return value[key]; });
- };
- _.where = function(obj, attrs, first) {
- if (_.isEmpty(attrs)) return first ? null : [];
- return _[first ? 'find' : 'filter'](obj, function(value) {
- for (var key in attrs) {
- if (attrs[key] !== value[key]) return false;
- }
- return true;
- });
- };
- _.findWhere = function(obj, attrs) {
- return _.where(obj, attrs, true);
- };
- _.max = function(obj, iterator, context) {
- if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
- return Math.max.apply(Math, obj);
- }
- if (!iterator && _.isEmpty(obj)) return -Infinity;
- var result = {computed : -Infinity, value: -Infinity};
- each(obj, function(value, index, list) {
- var computed = iterator ? iterator.call(context, value, index, list) : value;
- computed >= result.computed && (result = {value : value, computed : computed});
- });
- return result.value;
- };
- _.min = function(obj, iterator, context) {
- if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
- return Math.min.apply(Math, obj);
- }
- if (!iterator && _.isEmpty(obj)) return Infinity;
- var result = {computed : Infinity, value: Infinity};
- each(obj, function(value, index, list) {
- var computed = iterator ? iterator.call(context, value, index, list) : value;
- computed < result.computed && (result = {value : value, computed : computed});
- });
- return result.value;
- };
- _.shuffle = function(obj) {
- var rand;
- var index = 0;
- var shuffled = [];
- each(obj, function(value) {
- rand = _.random(index++);
- shuffled[index - 1] = shuffled[rand];
- shuffled[rand] = value;
- });
- return shuffled;
- };
- var lookupIterator = function(value) {
- return _.isFunction(value) ? value : function(obj){ return obj[value]; };
- };
- _.sortBy = function(obj, value, context) {
- var iterator = lookupIterator(value);
- return _.pluck(_.map(obj, function(value, index, list) {
- return {
- value : value,
- index : index,
- criteria : iterator.call(context, value, index, list)
- };
- }).sort(function(left, right) {
- var a = left.criteria;
- var b = right.criteria;
- if (a !== b) {
- if (a > b || a === void 0) return 1;
- if (a < b || b === void 0) return -1;
- }
- return left.index < right.index ? -1 : 1;
- }), 'value');
- };
- var group = function(obj, value, context, behavior) {
- var result = {};
- var iterator = lookupIterator(value || _.identity);
- each(obj, function(value, index) {
- var key = iterator.call(context, value, index, obj);
- behavior(result, key, value);
- });
- return result;
- };
- _.groupBy = function(obj, value, context) {
- return group(obj, value, context, function(result, key, value) {
- (_.has(result, key) ? result[key] : (result[key] = [])).push(value);
- });
- };
- _.countBy = function(obj, value, context) {
- return group(obj, value, context, function(result, key) {
- if (!_.has(result, key)) result[key] = 0;
- result[key]++;
- });
- };
- _.sortedIndex = function(array, obj, iterator, context) {
- iterator = iterator == null ? _.identity : lookupIterator(iterator);
- var value = iterator.call(context, obj);
- var low = 0, high = array.length;
- while (low < high) {
- var mid = (low + high) >>> 1;
- iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;
- }
- return low;
- };
- _.toArray = function(obj) {
- if (!obj) return [];
- if (_.isArray(obj)) return slice.call(obj);
- if (obj.length === +obj.length) return _.map(obj, _.identity);
- return _.values(obj);
- };
- _.size = function(obj) {
- if (obj == null) return 0;
- return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;
- };
- _.first = _.head = _.take = function(array, n, guard) {
- if (array == null) return void 0;
- return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
- };
- _.initial = function(array, n, guard) {
- return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
- };
- _.last = function(array, n, guard) {
- if (array == null) return void 0;
- if ((n != null) && !guard) {
- return slice.call(array, Math.max(array.length - n, 0));
- } else {
- return array[array.length - 1];
- }
- };
- _.rest = _.tail = _.drop = function(array, n, guard) {
- return slice.call(array, (n == null) || guard ? 1 : n);
- };
- _.compact = function(array) {
- return _.filter(array, _.identity);
- };
- var flatten = function(input, shallow, output) {
- each(input, function(value) {
- if (_.isArray(value)) {
- shallow ? push.apply(output, value) : flatten(value, shallow, output);
- } else {
- output.push(value);
- }
- });
- return output;
- };
- _.flatten = function(array, shallow) {
- return flatten(array, shallow, []);
- };
- _.without = function(array) {
- return _.difference(array, slice.call(arguments, 1));
- };
- _.uniq = _.unique = function(array, isSorted, iterator, context) {
- if (_.isFunction(isSorted)) {
- context = iterator;
- iterator = isSorted;
- isSorted = false;
- }
- var initial = iterator ? _.map(array, iterator, context) : array;
- var results = [];
- var seen = [];
- each(initial, function(value, index) {
- if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {
- seen.push(value);
- results.push(array[index]);
- }
- });
- return results;
- };
- _.union = function() {
- return _.uniq(concat.apply(ArrayProto, arguments));
- };
- _.intersection = function(array) {
- var rest = slice.call(arguments, 1);
- return _.filter(_.uniq(array), function(item) {
- return _.every(rest, function(other) {
- return _.indexOf(other, item) >= 0;
- });
- });
- };
- _.difference = function(array) {
- var rest = concat.apply(ArrayProto, slice.call(arguments, 1));
- return _.filter(array, function(value){ return !_.contains(rest, value); });
- };
- _.zip = function() {
- var args = slice.call(arguments);
- var length = _.max(_.pluck(args, 'length'));
- var results = new Array(length);
- for (var i = 0; i < length; i++) {
- results[i] = _.pluck(args, "" + i);
- }
- return results;
- };
- _.object = function(list, values) {
- if (list == null) return {};
- var result = {};
- for (var i = 0, l = list.length; i < l; i++) {
- if (values) {
- result[list[i]] = values[i];
- } else {
- result[list[i][0]] = list[i][1];
- }
- }
- return result;
- };
- _.indexOf = function(array, item, isSorted) {
- if (array == null) return -1;
- var i = 0, l = array.length;
- if (isSorted) {
- if (typeof isSorted == 'number') {
- i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted);
- } else {
- i = _.sortedIndex(array, item);
- return array[i] === item ? i : -1;
- }
- }
- if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);
- for (; i < l; i++) if (array[i] === item) return i;
- return -1;
- };
- _.lastIndexOf = function(array, item, from) {
- if (array == null) return -1;
- var hasIndex = from != null;
- if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {
- return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);
- }
- var i = (hasIndex ? from : array.length);
- while (i--) if (array[i] === item) return i;
- return -1;
- };
- _.range = function(start, stop, step) {
- if (arguments.length <= 1) {
- stop = start || 0;
- start = 0;
- }
- step = arguments[2] || 1;
-
- var len = Math.max(Math.ceil((stop - start) / step), 0);
- var idx = 0;
- var range = new Array(len);
-
- while(idx < len) {
- range[idx++] = start;
- start += step;
- }
-
- return range;
- };
- _.bind = function(func, context) {
- if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
- var args = slice.call(arguments, 2);
- return function() {
- return func.apply(context, args.concat(slice.call(arguments)));
- };
- };
- _.partial = function(func) {
- var args = slice.call(arguments, 1);
- return function() {
- return func.apply(this, args.concat(slice.call(arguments)));
- };
- };
- _.bindAll = function(obj) {
- var funcs = slice.call(arguments, 1);
- if (funcs.length === 0) funcs = _.functions(obj);
- each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
- return obj;
- };
- _.memoize = function(func, hasher) {
- var memo = {};
- hasher || (hasher = _.identity);
- return function() {
- var key = hasher.apply(this, arguments);
- return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
- };
- };
- _.delay = function(func, wait) {
- var args = slice.call(arguments, 2);
- return setTimeout(function(){ return func.apply(null, args); }, wait);
- };
- _.defer = function(func) {
- return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
- };
- _.throttle = function(func, wait) {
- var context, args, timeout, result;
- var previous = 0;
- var later = function() {
- previous = new Date;
- timeout = null;
- result = func.apply(context, args);
- };
- return function() {
- var now = new Date;
- var remaining = wait - (now - previous);
- context = this;
- args = arguments;
- if (remaining <= 0) {
- clearTimeout(timeout);
- timeout = null;
- previous = now;
- result = func.apply(context, args);
- } else if (!timeout) {
- timeout = setTimeout(later, remaining);
- }
- return result;
- };
- };
- _.debounce = function(func, wait, immediate) {
- var timeout, result;
- return function() {
- var context = this, args = arguments;
- var later = function() {
- timeout = null;
- if (!immediate) result = func.apply(context, args);
- };
- var callNow = immediate && !timeout;
- clearTimeout(timeout);
- timeout = setTimeout(later, wait);
- if (callNow) result = func.apply(context, args);
- return result;
- };
- };
- _.once = function(func) {
- var ran = false, memo;
- return function() {
- if (ran) return memo;
- ran = true;
- memo = func.apply(this, arguments);
- func = null;
- return memo;
- };
- };
- _.wrap = function(func, wrapper) {
- return function() {
- var args = [func];
- push.apply(args, arguments);
- return wrapper.apply(this, args);
- };
- };
- _.compose = function() {
- var funcs = arguments;
- return function() {
- var args = arguments;
- for (var i = funcs.length - 1; i >= 0; i--) {
- args = [funcs[i].apply(this, args)];
- }
- return args[0];
- };
- };
- _.after = function(times, func) {
- if (times <= 0) return func();
- return function() {
- if (--times < 1) {
- return func.apply(this, arguments);
- }
- };
- };
- _.keys = nativeKeys || function(obj) {
- if (obj !== Object(obj)) throw new TypeError('Invalid object');
- var keys = [];
- for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
- return keys;
- };
- _.values = function(obj) {
- var values = [];
- for (var key in obj) if (_.has(obj, key)) values.push(obj[key]);
- return values;
- };
- _.pairs = function(obj) {
- var pairs = [];
- for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]);
- return pairs;
- };
- _.invert = function(obj) {
- var result = {};
- for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key;
- return result;
- };
- _.functions = _.methods = function(obj) {
- var names = [];
- for (var key in obj) {
- if (_.isFunction(obj[key])) names.push(key);
- }
- return names.sort();
- };
- _.extend = function(obj) {
- each(slice.call(arguments, 1), function(source) {
- if (source) {
- for (var prop in source) {
- obj[prop] = source[prop];
- }
- }
- });
- return obj;
- };
- _.pick = function(obj) {
- var copy = {};
- var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
- each(keys, function(key) {
- if (key in obj) copy[key] = obj[key];
- });
- return copy;
- };
- _.omit = function(obj) {
- var copy = {};
- var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
- for (var key in obj) {
- if (!_.contains(keys, key)) copy[key] = obj[key];
- }
- return copy;
- };
- _.defaults = function(obj) {
- each(slice.call(arguments, 1), function(source) {
- if (source) {
- for (var prop in source) {
- if (obj[prop] == null) obj[prop] = source[prop];
- }
- }
- });
- return obj;
- };
- _.clone = function(obj) {
- if (!_.isObject(obj)) return obj;
- return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
- };
- _.tap = function(obj, interceptor) {
- interceptor(obj);
- return obj;
- };
- var eq = function(a, b, aStack, bStack) {
- if (a === b) return a !== 0 || 1 / a == 1 / b;
- if (a == null || b == null) return a === b;
- if (a instanceof _) a = a._wrapped;
- if (b instanceof _) b = b._wrapped;
- var className = toString.call(a);
- if (className != toString.call(b)) return false;
- switch (className) {
- case '[object String]':
- return a == String(b);
- case '[object Number]':
- return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
- case '[object Date]':
- case '[object Boolean]':
- return +a == +b;
- case '[object RegExp]':
- return a.source == b.source &&
- a.global == b.global &&
- a.multiline == b.multiline &&
- a.ignoreCase == b.ignoreCase;
- }
- if (typeof a != 'object' || typeof b != 'object') return false;
- var length = aStack.length;
- while (length--) {
- if (aStack[length] == a) return bStack[length] == b;
- }
- aStack.push(a);
- bStack.push(b);
- var size = 0, result = true;
- if (className == '[object Array]') {
- size = a.length;
- result = size == b.length;
- if (result) {
- while (size--) {
- if (!(result = eq(a[size], b[size], aStack, bStack))) break;
- }
- }
- } else {
- var aCtor = a.constructor, bCtor = b.constructor;
- if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&
- _.isFunction(bCtor) && (bCtor instanceof bCtor))) {
- return false;
- }
- for (var key in a) {
- if (_.has(a, key)) {
- size++;
- if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;
- }
- }
- if (result) {
- for (key in b) {
- if (_.has(b, key) && !(size--)) break;
- }
- result = !size;
- }
- }
- aStack.pop();
- bStack.pop();
- return result;
- };
- _.isEqual = function(a, b) {
- return eq(a, b, [], []);
- };
- _.isEmpty = function(obj) {
- if (obj == null) return true;
- if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
- for (var key in obj) if (_.has(obj, key)) return false;
- return true;
- };
- _.isElement = function(obj) {
- return !!(obj && obj.nodeType === 1);
- };
- _.isArray = nativeIsArray || function(obj) {
- return toString.call(obj) == '[object Array]';
- };
- _.isObject = function(obj) {
- return obj === Object(obj);
- };
- each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {
- _['is' + name] = function(obj) {
- return toString.call(obj) == '[object ' + name + ']';
- };
- });
- if (!_.isArguments(arguments)) {
- _.isArguments = function(obj) {
- return !!(obj && _.has(obj, 'callee'));
- };
- }
- if (typeof (/./) !== 'function') {
- _.isFunction = function(obj) {
- return typeof obj === 'function';
- };
- }
- _.isFinite = function(obj) {
- return isFinite(obj) && !isNaN(parseFloat(obj));
- };
- _.isNaN = function(obj) {
- return _.isNumber(obj) && obj != +obj;
- };
- _.isBoolean = function(obj) {
- return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
- };
- _.isNull = function(obj) {
- return obj === null;
- };
- _.isUndefined = function(obj) {
- return obj === void 0;
- };
- _.has = function(obj, key) {
- return hasOwnProperty.call(obj, key);
- };
- _.noConflict = function() {
- root._ = previousUnderscore;
- return this;
- };
- _.identity = function(value) {
- return value;
- };
- _.times = function(n, iterator, context) {
- var accum = Array(n);
- for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);
- return accum;
- };
- _.random = function(min, max) {
- if (max == null) {
- max = min;
- min = 0;
- }
- return min + Math.floor(Math.random() * (max - min + 1));
- };
- var entityMap = {
- escape: {
- '&': '&amp;',
- '<': '&lt;',
- '>': '&gt;',
- '"': '&quot;',
- "'": '&#x27;',
- '/': '&#x2F;'
- }
- };
- entityMap.unescape = _.invert(entityMap.escape);
- var entityRegexes = {
- escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),
- unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')
- };
- _.each(['escape', 'unescape'], function(method) {
- _[method] = function(string) {
- if (string == null) return '';
- return ('' + string).replace(entityRegexes[method], function(match) {
- return entityMap[method][match];
- });
- };
- });
- _.result = function(object, property) {
- if (object == null) return null;
- var value = object[property];
- return _.isFunction(value) ? value.call(object) : value;
- };
- _.mixin = function(obj) {
- each(_.functions(obj), function(name){
- var func = _[name] = obj[name];
- _.prototype[name] = function() {
- var args = [this._wrapped];
- push.apply(args, arguments);
- return result.call(this, func.apply(_, args));
- };
- });
- };
- var idCounter = 0;
- _.uniqueId = function(prefix) {
- var id = ++idCounter + '';
- return prefix ? prefix + id : id;
- };
- _.templateSettings = {
- evaluate : /<%([\s\S]+?)%>/g,
- interpolate : /<%=([\s\S]+?)%>/g,
- escape : /<%-([\s\S]+?)%>/g
- };
- var noMatch = /(.)^/;
- var escapes = {
- "'": "'",
- '\\': '\\',
- '\r': 'r',
- '\n': 'n',
- '\t': 't',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
- };
-
- var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
- _.template = function(text, data, settings) {
- var render;
- settings = _.defaults({}, settings, _.templateSettings);
- var matcher = new RegExp([
- (settings.escape || noMatch).source,
- (settings.interpolate || noMatch).source,
- (settings.evaluate || noMatch).source
- ].join('|') + '|$', 'g');
- var index = 0;
- var source = "__p+='";
- text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
- source += text.slice(index, offset)
- .replace(escaper, function(match) { return '\\' + escapes[match]; });
-
- if (escape) {
- source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
- }
- if (interpolate) {
- source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
- }
- if (evaluate) {
- source += "';\n" + evaluate + "\n__p+='";
- }
- index = offset + match.length;
- return match;
- });
- source += "';\n";
- if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
-
- source = "var __t,__p='',__j=Array.prototype.join," +
- "print=function(){__p+=__j.call(arguments,'');};\n" +
- source + "return __p;\n";
-
- try {
- render = new Function(settings.variable || 'obj', '_', source);
- } catch (e) {
- e.source = source;
- throw e;
- }
-
- if (data) return render(data, _);
- var template = function(data) {
- return render.call(this, data, _);
- };
- template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}';
-
- return template;
- };
- _.chain = function(obj) {
- return _(obj).chain();
- };
- var result = function(obj) {
- return this._chain ? _(obj).chain() : obj;
- };
- _.mixin(_);
- each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
- var method = ArrayProto[name];
- _.prototype[name] = function() {
- var obj = this._wrapped;
- method.apply(obj, arguments);
- if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];
- return result.call(this, obj);
- };
- });
- each(['concat', 'join', 'slice'], function(name) {
- var method = ArrayProto[name];
- _.prototype[name] = function() {
- return result.call(this, method.apply(this._wrapped, arguments));
- };
- });
-
- _.extend(_.prototype, {
- chain: function() {
- this._chain = true;
- return this;
- },
- value: function() {
- return this._wrapped;
- }
-
- });
-
-}).call(this);
-
-},
-{}],
-2:[function(req,module,exports){
-
-
-var _ = req("underscore");
-
-var errors = {
- E001: "Bad option: '{a}'.",
- E002: "Bad option value.",
- E003: "Expected a JSON value.",
- E004: "Input is neither a string nor an array of strings.",
- E005: "Input is empty.",
- E006: "Unexpected early end of program.",
- E007: "Missing \"use strict\" statement.",
- E008: "Strict violation.",
- E009: "Option 'validthis' can't be used in a global scope.",
- E010: "'with' is not allowed in strict mode.",
- E011: "const '{a}' has already been declared.",
- E012: "const '{a}' is initialized to 'undefined'.",
- E013: "Attempting to override '{a}' which is a constant.",
- E014: "A regular expression literal can be confused with '/='.",
- E015: "Unclosed regular expression.",
- E016: "Invalid regular expression.",
- E017: "Unclosed comment.",
- E018: "Unbegun comment.",
- E019: "Unmatched '{a}'.",
- E020: "Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",
- E021: "Expected '{a}' and instead saw '{b}'.",
- E022: "Line breaking error '{a}'.",
- E023: "Missing '{a}'.",
- E024: "Unexpected '{a}'.",
- E025: "Missing ':' on a case clause.",
- E026: "Missing '}' to match '{' from line {a}.",
- E027: "Missing ']' to match '[' form line {a}.",
- E028: "Illegal comma.",
- E029: "Unclosed string.",
- E030: "Expected an identifier and instead saw '{a}'.",
- E031: "Bad assignment.", // FIXME: Rephrase
- E032: "Expected a small integer or 'false' and instead saw '{a}'.",
- E033: "Expected an operator and instead saw '{a}'.",
- E034: "get/set are ES5 features.",
- E035: "Missing property name.",
- E036: "Expected to see a statement and instead saw a block.",
- E037: null, // Vacant
- E038: null, // Vacant
- E039: "Function declarations are not invocable. Wrap the whole function invocation in parens.",
- E040: "Each value should have its own case label.",
- E041: "Unrecoverable syntax error.",
- E042: "Stopping.",
- E043: "Too many errors.",
- E044: "'{a}' is already defined and can't be redefined.",
- E045: "Invalid for each loop.",
- E046: "A yield statement shall be within a generator function (with syntax: `function*`)",
- E047: "A generator function shall contain a yield statement.",
- E048: "Let declaration not directly within block.",
- E049: "A {a} cannot be named '{b}'.",
- E050: "Mozilla requires the yield expression to be parenthesized here.",
- E051: "Regular parameters cannot come after default parameters."
-};
-
-var warnings = {
- W001: "'hasOwnProperty' is a really bad name.",
- W002: "Value of '{a}' may be overwritten in IE 8 and earlier.",
- W003: "'{a}' was used before it was defined.",
- W004: "'{a}' is already defined.",
- W005: "A dot following a number can be confused with a decimal point.",
- W006: "Confusing minuses.",
- W007: "Confusing pluses.",
- W008: "A leading decimal point can be confused with a dot: '{a}'.",
- W009: "The array literal notation [] is preferrable.",
- W010: "The object literal notation {} is preferrable.",
- W011: "Unexpected space after '{a}'.",
- W012: "Unexpected space before '{a}'.",
- W013: "Missing space after '{a}'.",
- W014: "Bad line breaking before '{a}'.",
- W015: "Expected '{a}' to have an indentation at {b} instead at {c}.",
- W016: "Unexpected use of '{a}'.",
- W017: "Bad operand.",
- W018: "Confusing use of '{a}'.",
- W019: "Use the isNaN function to compare with NaN.",
- W020: "Read only.",
- W021: "'{a}' is a function.",
- W022: "Do not assign to the exception parameter.",
- W023: "Expected an identifier in an assignment and instead saw a function invocation.",
- W024: "Expected an identifier and instead saw '{a}' (a reserved word).",
- W025: "Missing name in function declaration.",
- W026: "Inner functions should be listed at the top of the outer function.",
- W027: "Unreachable '{a}' after '{b}'.",
- W028: "Label '{a}' on {b} statement.",
- W030: "Expected an assignment or function call and instead saw an expression.",
- W031: "Do not use 'new' for side effects.",
- W032: "Unnecessary semicolon.",
- W033: "Missing semicolon.",
- W034: "Unnecessary directive \"{a}\".",
- W035: "Empty block.",
- W036: "Unexpected /*member '{a}'.",
- W037: "'{a}' is a statement label.",
- W038: "'{a}' used out of scope.",
- W039: "'{a}' is not allowed.",
- W040: "Possible strict violation.",
- W041: "Use '{a}' to compare with '{b}'.",
- W042: "Avoid EOL escaping.",
- W043: "Bad escaping of EOL. Use option multistr if needed.",
- W044: "Bad or unnecessary escaping.",
- W045: "Bad number '{a}'.",
- W046: "Don't use extra leading zeros '{a}'.",
- W047: "A trailing decimal point can be confused with a dot: '{a}'.",
- W048: "Unexpected control character in regular expression.",
- W049: "Unexpected escaped character '{a}' in regular expression.",
- W050: "JavaScript URL.",
- W051: "Variables should not be deleted.",
- W052: "Unexpected '{a}'.",
- W053: "Do not use {a} as a constructor.",
- W054: "The Function constructor is a form of eval.",
- W055: "A constructor name should start with an uppercase letter.",
- W056: "Bad constructor.",
- W057: "Weird construction. Is 'new' unnecessary?",
- W058: "Missing '()' invoking a constructor.",
- W059: "Avoid arguments.{a}.",
- W060: "document.write can be a form of eval.",
- W061: "eval can be harmful.",
- W062: "Wrap an immediate function invocation in parens " +
- "to assist the reader in understanding that the expression " +
- "is the result of a function, and not the function itself.",
- W063: "Math is not a function.",
- W064: "Missing 'new' prefix when invoking a constructor.",
- W065: "Missing radix parameter.",
- W066: "Implied eval. Consider passing a function instead of a string.",
- W067: "Bad invocation.",
- W068: "Wrapping non-IIFE function literals in parens is unnecessary.",
- W069: "['{a}'] is better written in dot notation.",
- W070: "Extra comma. (it breaks older versions of IE)",
- W071: "This function has too many statements. ({a})",
- W072: "This function has too many parameters. ({a})",
- W073: "Blocks are nested too deeply. ({a})",
- W074: "This function's cyclomatic complexity is too high. ({a})",
- W075: "Duplicate key '{a}'.",
- W076: "Unexpected parameter '{a}' in get {b} function.",
- W077: "Expected a single parameter in set {a} function.",
- W078: "Setter is defined without getter.",
- W079: "Redefinition of '{a}'.",
- W080: "It's not necessary to initialize '{a}' to 'undefined'.",
- W081: "Too many var statements.",
- W082: "Function declarations should not be placed in blocks. " +
- "Use a function expression or move the statement to the top of " +
- "the outer function.",
- W083: "Don't make functions within a loop.",
- W084: "Assignment in conditional expression",
- W085: "Don't use 'with'.",
- W086: "Expected a 'break' statement before '{a}'.",
- W087: "Forgotten 'debugger' statement?",
- W088: "Creating global 'for' variable. Should be 'for (var {a} ...'.",
- W089: "The body of a for in should be wrapped in an if statement to filter " +
- "unwanted properties from the prototype.",
- W090: "'{a}' is not a statement label.",
- W091: "'{a}' is out of scope.",
- W092: "Wrap the /regexp/ literal in parens to disambiguate the slash operator.",
- W093: "Did you mean to return a conditional instead of an assignment?",
- W094: "Unexpected comma.",
- W095: "Expected a string and instead saw {a}.",
- W096: "The '{a}' key may produce unexpected results.",
- W097: "Use the function form of \"use strict\".",
- W098: "'{a}' is defined but never used.",
- W099: "Mixed spaces and tabs.",
- W100: "This character may get silently deleted by one or more browsers.",
- W101: "Line is too long.",
- W102: "Trailing whitespace.",
- W103: "The '{a}' property is deprecated.",
- W104: "'{a}' is only available in JavaScript 1.7.",
- W105: "Unexpected {a} in '{b}'.",
- W106: "Identifier '{a}' is not in camel case.",
- W107: "Script URL.",
- W108: "Strings must use doublequote.",
- W109: "Strings must use singlequote.",
- W110: "Mixed double and single quotes.",
- W112: "Unclosed string.",
- W113: "Control character in string: {a}.",
- W114: "Avoid {a}.",
- W115: "Octal literals are not allowed in strict mode.",
- W116: "Expected '{a}' and instead saw '{b}'.",
- W117: "'{a}' is not defined.",
- W118: "'{a}' is only available in Mozilla JavaScript extensions (use moz option).",
- W119: "'{a}' is only available in ES6 (use esnext option).",
- W120: "You might be leaking a variable ({a}) here."
-};
-
-var info = {
- I001: "Comma warnings can be turned off with 'laxcomma'.",
- I002: "Reserved words as properties can be used under the 'es5' option.",
- I003: "ES5 option is now set per default"
-};
-
-exports.errors = {};
-exports.warnings = {};
-exports.info = {};
-
-_.each(errors, function (desc, code) {
- exports.errors[code] = { code: code, desc: desc };
-});
-
-_.each(warnings, function (desc, code) {
- exports.warnings[code] = { code: code, desc: desc };
-});
-
-_.each(info, function (desc, code) {
- exports.info[code] = { code: code, desc: desc };
-});
-
-},
-{"underscore":1}],
-3:[function(req,module,exports){
-
-exports.reservedVars = {
- arguments : false,
- NaN : false
-};
-
-exports.ecmaIdentifiers = {
- Array : false,
- Boolean : false,
- Date : false,
- decodeURI : false,
- decodeURIComponent : false,
- encodeURI : false,
- encodeURIComponent : false,
- Error : false,
- "eval" : false,
- EvalError : false,
- Function : false,
- hasOwnProperty : false,
- isFinite : false,
- isNaN : false,
- JSON : false,
- Math : false,
- Map : false,
- Number : false,
- Object : false,
- parseInt : false,
- parseFloat : false,
- RangeError : false,
- ReferenceError : false,
- RegExp : false,
- Set : false,
- String : false,
- SyntaxError : false,
- TypeError : false,
- URIError : false,
- WeakMap : false
-};
-
-exports.browser = {
- ArrayBuffer : false,
- ArrayBufferView : false,
- Audio : false,
- Blob : false,
- addEventListener : false,
- applicationCache : false,
- atob : false,
- blur : false,
- btoa : false,
- clearInterval : false,
- clearTimeout : false,
- close : false,
- closed : false,
- CustomEvent : false,
- DataView : false,
- DOMParser : false,
- defaultStatus : false,
- document : false,
- Element : false,
- ElementTimeControl : false,
- event : false,
- FileReader : false,
- Float32Array : false,
- Float64Array : false,
- FormData : false,
- focus : false,
- frames : false,
- getComputedStyle : false,
- HTMLElement : false,
- HTMLAnchorElement : false,
- HTMLBaseElement : false,
- HTMLBlockquoteElement: false,
- HTMLBodyElement : false,
- HTMLBRElement : false,
- HTMLButtonElement : false,
- HTMLCanvasElement : false,
- HTMLDirectoryElement : false,
- HTMLDivElement : false,
- HTMLDListElement : false,
- HTMLFieldSetElement : false,
- HTMLFontElement : false,
- HTMLFormElement : false,
- HTMLFrameElement : false,
- HTMLFrameSetElement : false,
- HTMLHeadElement : false,
- HTMLHeadingElement : false,
- HTMLHRElement : false,
- HTMLHtmlElement : false,
- HTMLIFrameElement : false,
- HTMLImageElement : false,
- HTMLInputElement : false,
- HTMLIsIndexElement : false,
- HTMLLabelElement : false,
- HTMLLayerElement : false,
- HTMLLegendElement : false,
- HTMLLIElement : false,
- HTMLLinkElement : false,
- HTMLMapElement : false,
- HTMLMenuElement : false,
- HTMLMetaElement : false,
- HTMLModElement : false,
- HTMLObjectElement : false,
- HTMLOListElement : false,
- HTMLOptGroupElement : false,
- HTMLOptionElement : false,
- HTMLParagraphElement : false,
- HTMLParamElement : false,
- HTMLPreElement : false,
- HTMLQuoteElement : false,
- HTMLScriptElement : false,
- HTMLSelectElement : false,
- HTMLStyleElement : false,
- HTMLTableCaptionElement: false,
- HTMLTableCellElement : false,
- HTMLTableColElement : false,
- HTMLTableElement : false,
- HTMLTableRowElement : false,
- HTMLTableSectionElement: false,
- HTMLTextAreaElement : false,
- HTMLTitleElement : false,
- HTMLUListElement : false,
- HTMLVideoElement : false,
- history : false,
- Int16Array : false,
- Int32Array : false,
- Int8Array : false,
- Image : false,
- length : false,
- localStorage : false,
- location : false,
- MessageChannel : false,
- MessageEvent : false,
- MessagePort : false,
- MouseEvent : false,
- moveBy : false,
- moveTo : false,
- MutationObserver : false,
- name : false,
- Node : false,
- NodeFilter : false,
- navigator : false,
- onbeforeunload : true,
- onblur : true,
- onerror : true,
- onfocus : true,
- onload : true,
- onresize : true,
- onunload : true,
- open : false,
- openDatabase : false,
- opener : false,
- Option : false,
- parent : false,
- print : false,
- removeEventListener : false,
- resizeBy : false,
- resizeTo : false,
- screen : false,
- scroll : false,
- scrollBy : false,
- scrollTo : false,
- sessionStorage : false,
- setInterval : false,
- setTimeout : false,
- SharedWorker : false,
- status : false,
- SVGAElement : false,
- SVGAltGlyphDefElement: false,
- SVGAltGlyphElement : false,
- SVGAltGlyphItemElement: false,
- SVGAngle : false,
- SVGAnimateColorElement: false,
- SVGAnimateElement : false,
- SVGAnimateMotionElement: false,
- SVGAnimateTransformElement: false,
- SVGAnimatedAngle : false,
- SVGAnimatedBoolean : false,
- SVGAnimatedEnumeration: false,
- SVGAnimatedInteger : false,
- SVGAnimatedLength : false,
- SVGAnimatedLengthList: false,
- SVGAnimatedNumber : false,
- SVGAnimatedNumberList: false,
- SVGAnimatedPathData : false,
- SVGAnimatedPoints : false,
- SVGAnimatedPreserveAspectRatio: false,
- SVGAnimatedRect : false,
- SVGAnimatedString : false,
- SVGAnimatedTransformList: false,
- SVGAnimationElement : false,
- SVGCSSRule : false,
- SVGCircleElement : false,
- SVGClipPathElement : false,
- SVGColor : false,
- SVGColorProfileElement: false,
- SVGColorProfileRule : false,
- SVGComponentTransferFunctionElement: false,
- SVGCursorElement : false,
- SVGDefsElement : false,
- SVGDescElement : false,
- SVGDocument : false,
- SVGElement : false,
- SVGElementInstance : false,
- SVGElementInstanceList: false,
- SVGEllipseElement : false,
- SVGExternalResourcesRequired: false,
- SVGFEBlendElement : false,
- SVGFEColorMatrixElement: false,
- SVGFEComponentTransferElement: false,
- SVGFECompositeElement: false,
- SVGFEConvolveMatrixElement: false,
- SVGFEDiffuseLightingElement: false,
- SVGFEDisplacementMapElement: false,
- SVGFEDistantLightElement: false,
- SVGFEFloodElement : false,
- SVGFEFuncAElement : false,
- SVGFEFuncBElement : false,
- SVGFEFuncGElement : false,
- SVGFEFuncRElement : false,
- SVGFEGaussianBlurElement: false,
- SVGFEImageElement : false,
- SVGFEMergeElement : false,
- SVGFEMergeNodeElement: false,
- SVGFEMorphologyElement: false,
- SVGFEOffsetElement : false,
- SVGFEPointLightElement: false,
- SVGFESpecularLightingElement: false,
- SVGFESpotLightElement: false,
- SVGFETileElement : false,
- SVGFETurbulenceElement: false,
- SVGFilterElement : false,
- SVGFilterPrimitiveStandardAttributes: false,
- SVGFitToViewBox : false,
- SVGFontElement : false,
- SVGFontFaceElement : false,
- SVGFontFaceFormatElement: false,
- SVGFontFaceNameElement: false,
- SVGFontFaceSrcElement: false,
- SVGFontFaceUriElement: false,
- SVGForeignObjectElement: false,
- SVGGElement : false,
- SVGGlyphElement : false,
- SVGGlyphRefElement : false,
- SVGGradientElement : false,
- SVGHKernElement : false,
- SVGICCColor : false,
- SVGImageElement : false,
- SVGLangSpace : false,
- SVGLength : false,
- SVGLengthList : false,
- SVGLineElement : false,
- SVGLinearGradientElement: false,
- SVGLocatable : false,
- SVGMPathElement : false,
- SVGMarkerElement : false,
- SVGMaskElement : false,
- SVGMatrix : false,
- SVGMetadataElement : false,
- SVGMissingGlyphElement: false,
- SVGNumber : false,
- SVGNumberList : false,
- SVGPaint : false,
- SVGPathElement : false,
- SVGPathSeg : false,
- SVGPathSegArcAbs : false,
- SVGPathSegArcRel : false,
- SVGPathSegClosePath : false,
- SVGPathSegCurvetoCubicAbs: false,
- SVGPathSegCurvetoCubicRel: false,
- SVGPathSegCurvetoCubicSmoothAbs: false,
- SVGPathSegCurvetoCubicSmoothRel: false,
- SVGPathSegCurvetoQuadraticAbs: false,
- SVGPathSegCurvetoQuadraticRel: false,
- SVGPathSegCurvetoQuadraticSmoothAbs: false,
- SVGPathSegCurvetoQuadraticSmoothRel: false,
- SVGPathSegLinetoAbs : false,
- SVGPathSegLinetoHorizontalAbs: false,
- SVGPathSegLinetoHorizontalRel: false,
- SVGPathSegLinetoRel : false,
- SVGPathSegLinetoVerticalAbs: false,
- SVGPathSegLinetoVerticalRel: false,
- SVGPathSegList : false,
- SVGPathSegMovetoAbs : false,
- SVGPathSegMovetoRel : false,
- SVGPatternElement : false,
- SVGPoint : false,
- SVGPointList : false,
- SVGPolygonElement : false,
- SVGPolylineElement : false,
- SVGPreserveAspectRatio: false,
- SVGRadialGradientElement: false,
- SVGRect : false,
- SVGRectElement : false,
- SVGRenderingIntent : false,
- SVGSVGElement : false,
- SVGScriptElement : false,
- SVGSetElement : false,
- SVGStopElement : false,
- SVGStringList : false,
- SVGStylable : false,
- SVGStyleElement : false,
- SVGSwitchElement : false,
- SVGSymbolElement : false,
- SVGTRefElement : false,
- SVGTSpanElement : false,
- SVGTests : false,
- SVGTextContentElement: false,
- SVGTextElement : false,
- SVGTextPathElement : false,
- SVGTextPositioningElement: false,
- SVGTitleElement : false,
- SVGTransform : false,
- SVGTransformList : false,
- SVGTransformable : false,
- SVGURIReference : false,
- SVGUnitTypes : false,
- SVGUseElement : false,
- SVGVKernElement : false,
- SVGViewElement : false,
- SVGViewSpec : false,
- SVGZoomAndPan : false,
- TimeEvent : false,
- top : false,
- Uint16Array : false,
- Uint32Array : false,
- Uint8Array : false,
- Uint8ClampedArray : false,
- WebSocket : false,
- window : false,
- Worker : false,
- XMLHttpRequest : false,
- XMLSerializer : false,
- XPathEvaluator : false,
- XPathException : false,
- XPathExpression : false,
- XPathNamespace : false,
- XPathNSResolver : false,
- XPathResult : false
-};
-
-exports.devel = {
- alert : false,
- confirm: false,
- console: false,
- Debug : false,
- opera : false,
- prompt : false
-};
-
-exports.worker = {
- importScripts: true,
- postMessage : true,
- self : true
-};
-exports.nonstandard = {
- escape : false,
- unescape: false
-};
-
-exports.couch = {
- "require" : false,
- respond : false,
- getRow : false,
- emit : false,
- send : false,
- start : false,
- sum : false,
- log : false,
- exports : false,
- module : false,
- provides : false
-};
-
-exports.node = {
- __filename : false,
- __dirname : false,
- Buffer : false,
- DataView : false,
- console : false,
- exports : true, // In Node it is ok to exports = module.exports = foo();
- GLOBAL : false,
- global : false,
- module : false,
- process : false,
- require : false,
- setTimeout : false,
- clearTimeout : false,
- setInterval : false,
- clearInterval : false,
- setImmediate : false, // v0.9.1+
- clearImmediate: false // v0.9.1+
-};
-
-exports.phantom = {
- phantom : true,
- require : true,
- WebPage : true
-};
-
-exports.rhino = {
- defineClass : false,
- deserialize : false,
- gc : false,
- help : false,
- importPackage: false,
- "java" : false,
- load : false,
- loadClass : false,
- print : false,
- quit : false,
- readFile : false,
- readUrl : false,
- runCommand : false,
- seal : false,
- serialize : false,
- spawn : false,
- sync : false,
- toint32 : false,
- version : false
-};
-
-exports.shelljs = {
- target : false,
- echo : false,
- exit : false,
- cd : false,
- pwd : false,
- ls : false,
- find : false,
- cp : false,
- rm : false,
- mv : false,
- mkdir : false,
- test : false,
- cat : false,
- sed : false,
- grep : false,
- which : false,
- dirs : false,
- pushd : false,
- popd : false,
- env : false,
- exec : false,
- chmod : false,
- config : false,
- error : false,
- tempdir : false
-};
-
-exports.wsh = {
- ActiveXObject : true,
- Enumerator : true,
- GetObject : true,
- ScriptEngine : true,
- ScriptEngineBuildVersion : true,
- ScriptEngineMajorVersion : true,
- ScriptEngineMinorVersion : true,
- VBArray : true,
- WSH : true,
- WScript : true,
- XDomainRequest : true
-};
-
-exports.dojo = {
- dojo : false,
- dijit : false,
- dojox : false,
- define : false,
- "require": false
-};
-
-exports.jquery = {
- "$" : false,
- jQuery : false
-};
-
-exports.mootools = {
- "$" : false,
- "$$" : false,
- Asset : false,
- Browser : false,
- Chain : false,
- Class : false,
- Color : false,
- Cookie : false,
- Core : false,
- Document : false,
- DomReady : false,
- DOMEvent : false,
- DOMReady : false,
- Drag : false,
- Element : false,
- Elements : false,
- Event : false,
- Events : false,
- Fx : false,
- Group : false,
- Hash : false,
- HtmlTable : false,
- Iframe : false,
- IframeShim : false,
- InputValidator: false,
- instanceOf : false,
- Keyboard : false,
- Locale : false,
- Mask : false,
- MooTools : false,
- Native : false,
- Options : false,
- OverText : false,
- Request : false,
- Scroller : false,
- Slick : false,
- Slider : false,
- Sortables : false,
- Spinner : false,
- Swiff : false,
- Tips : false,
- Type : false,
- typeOf : false,
- URI : false,
- Window : false
-};
-
-exports.prototypejs = {
- "$" : false,
- "$$" : false,
- "$A" : false,
- "$F" : false,
- "$H" : false,
- "$R" : false,
- "$break" : false,
- "$continue" : false,
- "$w" : false,
- Abstract : false,
- Ajax : false,
- Class : false,
- Enumerable : false,
- Element : false,
- Event : false,
- Field : false,
- Form : false,
- Hash : false,
- Insertion : false,
- ObjectRange : false,
- PeriodicalExecuter: false,
- Position : false,
- Prototype : false,
- Selector : false,
- Template : false,
- Toggle : false,
- Try : false,
- Autocompleter : false,
- Builder : false,
- Control : false,
- Draggable : false,
- Draggables : false,
- Droppables : false,
- Effect : false,
- Sortable : false,
- SortableObserver : false,
- Sound : false,
- Scriptaculous : false
-};
-
-exports.yui = {
- YUI : false,
- Y : false,
- YUI_config: false
-};
-
-
-},
-{}],
-"n4bKNg":[function(req,module,exports){
-
-var _ = req("underscore");
-var events = req("events");
-var vars = req("../shared/vars.js");
-var messages = req("../shared/messages.js");
-var Lexer = req("./lex.js").Lexer;
-var reg = req("./reg.js");
-var state = req("./state.js").state;
-var style = req("./style.js");
-var console = req("console-browserify");
-
-var JSHINT = (function () {
-
-
- var anonname, // The guessed name for anonymous functions.
- api, // Extension API
- bang = {
- "<" : true,
- "<=" : true,
- "==" : true,
- "===": true,
- "!==": true,
- "!=" : true,
- ">" : true,
- ">=" : true,
- "+" : true,
- "-" : true,
- "*" : true,
- "/" : true,
- "%" : true
- },
- boolOptions = {
- asi : true, // if automatic semicolon insertion should be tolerated
- bitwise : true, // if bitwise operators should not be allowed
- boss : true, // if advanced usage of assignments should be allowed
- browser : true, // if the standard browser globals should be predefined
- camelcase : true, // if identifiers should be required in camel case
- couch : true, // if CouchDB globals should be predefined
- curly : true, // if curly braces around all blocks should be required
- debug : true, // if debugger statements should be allowed
- devel : true, // if logging globals should be predefined (console, alert, etc.)
- dojo : true, // if Dojo Toolkit globals should be predefined
- eqeqeq : true, // if === should be required
- eqnull : true, // if == null comparisons should be tolerated
- es3 : true, // if ES3 syntax should be allowed
- es5 : true, // if ES5 syntax should be allowed (is now set per default)
- esnext : true, // if es.next specific syntax should be allowed
- moz : true, // if mozilla specific syntax should be allowed
- evil : true, // if eval should be allowed
- expr : true, // if ExpressionStatement should be allowed as Programs
- forin : true, // if for in statements must filter
- funcscope : true, // if only function scope should be used for scope tests
- gcl : true, // if JSHint should be compatible with Google Closure Linter
- globalstrict: true, // if global should be allowed (also enables 'strict')
- immed : true, // if immediate invocations must be wrapped in parens
- iterator : true, // if the `__iterator__` property should be allowed
- jquery : true, // if jQuery globals should be predefined
- lastsemic : true, // if semicolons may be ommitted for the trailing
- laxbreak : true, // if line breaks should not be checked
- laxcomma : true, // if line breaks should not be checked around commas
- loopfunc : true, // if functions should be allowed to be defined within
- mootools : true, // if MooTools globals should be predefined
- multistr : true, // allow multiline strings
- newcap : true, // if constructor names must be capitalized
- noarg : true, // if arguments.caller and arguments.callee should be
- node : true, // if the Node.js environment globals should be
- noempty : true, // if empty blocks should be disallowed
- nonew : true, // if using `new` for side-effects should be disallowed
- nonstandard : true, // if non-standard (but widely adopted) globals should
- nomen : true, // if names should be checked
- onevar : true, // if only one var statement per function should be
- passfail : true, // if the scan should stop on first error
- phantom : true, // if PhantomJS symbols should be allowed
- plusplus : true, // if increment/decrement should not be allowed
- proto : true, // if the `__proto__` property should be allowed
- prototypejs : true, // if Prototype and Scriptaculous globals should be
- rhino : true, // if the Rhino environment globals should be predefined
- shelljs : true, // if ShellJS globals should be predefined
- undef : true, // if variables should be declared before used
- scripturl : true, // if script-targeted URLs should be tolerated
- shadow : true, // if variable shadowing should be tolerated
- smarttabs : true, // if smarttabs should be tolerated
- strict : true, // require the pragma
- sub : true, // if all forms of subscript notation are tolerated
- supernew : true, // if `new function () { ... };` and `new Object;`
- trailing : true, // if trailing whitespace rules apply
- validthis : true, // if 'this' inside a non-constructor function is valid.
- withstmt : true, // if with statements should be allowed
- white : true, // if strict whitespace rules apply
- worker : true, // if Web Worker script symbols should be allowed
- wsh : true, // if the Windows Scripting Host environment globals
- yui : true, // YUI variables should be predefined
- onecase : true, // if one case switch statements should be allowed
- regexp : true, // if the . should not be allowed in regexp literals
- regexdash : true // if unescaped first/last dash (-) inside brackets
- },
- valOptions = {
- maxlen : false,
- indent : false,
- maxerr : false,
- predef : false,
- quotmark : false, //'single'|'double'|true
- scope : false,
- maxstatements: false, // {int} max statements per function
- maxdepth : false, // {int} max nested block depth per function
- maxparams : false, // {int} max params per function
- maxcomplexity: false, // {int} max cyclomatic complexity per function
- unused : true, // warn if variables are unused. Available options:
- latedef : false // warn if the variable is used before its definition
- },
- invertedOptions = {
- bitwise : true,
- forin : true,
- newcap : true,
- nomen : true,
- plusplus: true,
- regexp : true,
- undef : true,
- white : true,
- eqeqeq : true,
- onevar : true,
- strict : true
- },
- renamedOptions = {
- eqeq : "eqeqeq",
- vars : "onevar",
- windows: "wsh",
- sloppy : "strict"
- },
-
- declared, // Globals that were declared using /*global ... */ syntax.
- exported, // Variables that are used outside of the current file.
-
- functionicity = [
- "closure", "exception", "global", "label",
- "outer", "unused", "var"
- ],
-
- funct, // The current function
- functions, // All of the functions
-
- global, // The global scope
- implied, // Implied globals
- inblock,
- indent,
- lookahead,
- lex,
- member,
- membersOnly,
- noreach,
- predefined, // Global variables defined by option
-
- scope, // The current scope
- stack,
- unuseds,
- urls,
- warnings,
-
- extraModules = [],
- emitter = new events.EventEmitter();
-
- function checkOption(name, t) {
- name = name.trim();
-
- if (/^[+-]W\d{3}$/g.test(name)) {
- return true;
- }
-
- if (valOptions[name] === undefined && boolOptions[name] === undefined) {
- if (t.type !== "jslint") {
- error("E001", t, name);
- return false;
- }
- }
-
- return true;
- }
-
- function isString(obj) {
- return Object.prototype.toString.call(obj) === "[object String]";
- }
-
- function isIdentifier(tkn, value) {
- if (!tkn)
- return false;
-
- if (!tkn.identifier || tkn.value !== value)
- return false;
-
- return true;
- }
-
- function isReserved(token) {
- if (!token.reserved) {
- return false;
- }
- var meta = token.meta;
-
- if (meta && meta.isFutureReservedWord && state.option.inES5()) {
- if (!meta.es5) {
- return false;
- }
- if (meta.strictOnly) {
- if (!state.option.strict && !state.directive["use strict"]) {
- return false;
- }
- }
-
- if (token.isProperty) {
- return false;
- }
- }
-
- return true;
- }
-
- function supplant(str, data) {
- return str.replace(/\{([^{}]*)\}/g, function (a, b) {
- var r = data[b];
- return typeof r === "string" || typeof r === "number" ? r : a;
- });
- }
-
- function combine(t, o) {
- var n;
- for (n in o) {
- if (_.has(o, n) && !_.has(JSHINT.blacklist, n)) {
- t[n] = o[n];
- }
- }
- }
-
- function updatePredefined() {
- Object.keys(JSHINT.blacklist).forEach(function (key) {
- delete predefined[key];
- });
- }
-
- function assume() {
- if (state.option.couch) {
- combine(predefined, vars.couch);
- }
-
- if (state.option.rhino) {
- combine(predefined, vars.rhino);
- }
-
- if (state.option.shelljs) {
- combine(predefined, vars.shelljs);
- combine(predefined, vars.node);
- }
-
- if (state.option.phantom) {
- combine(predefined, vars.phantom);
- }
-
- if (state.option.prototypejs) {
- combine(predefined, vars.prototypejs);
- }
-
- if (state.option.node) {
- combine(predefined, vars.node);
- }
-
- if (state.option.devel) {
- combine(predefined, vars.devel);
- }
-
- if (state.option.dojo) {
- combine(predefined, vars.dojo);
- }
-
- if (state.option.browser) {
- combine(predefined, vars.browser);
- }
-
- if (state.option.nonstandard) {
- combine(predefined, vars.nonstandard);
- }
-
- if (state.option.jquery) {
- combine(predefined, vars.jquery);
- }
-
- if (state.option.mootools) {
- combine(predefined, vars.mootools);
- }
-
- if (state.option.worker) {
- combine(predefined, vars.worker);
- }
-
- if (state.option.wsh) {
- combine(predefined, vars.wsh);
- }
-
- if (state.option.globalstrict && state.option.strict !== false) {
- state.option.strict = true;
- }
-
- if (state.option.yui) {
- combine(predefined, vars.yui);
- }
-
- state.option.inMoz = function (strict) {
- return state.option.moz;
- };
-
- state.option.inESNext = function (strict) {
- return state.option.moz || state.option.esnext;
- };
-
- state.option.inES5 = function (/* strict */) {
- return !state.option.es3;
- };
-
- state.option.inES3 = function (strict) {
- if (strict) {
- return !state.option.moz && !state.option.esnext && state.option.es3;
- }
- return state.option.es3;
- };
- }
- function quit(code, line, chr) {
- var percentage = Math.floor((line / state.lines.length) * 100);
- var message = messages.errors[code].desc;
-
- throw {
- name: "JSHintError",
- line: line,
- character: chr,
- message: message + " (" + percentage + "% scanned).",
- raw: message,
- code: code
- };
- }
-
- function isundef(scope, code, token, a) {
- return JSHINT.undefs.push([scope, code, token, a]);
- }
-
- function warning(code, t, a, b, c, d) {
- var ch, l, w, msg;
-
- if (/^W\d{3}$/.test(code)) {
- if (state.ignored[code])
- return;
-
- msg = messages.warnings[code];
- } else if (/E\d{3}/.test(code)) {
- msg = messages.errors[code];
- } else if (/I\d{3}/.test(code)) {
- msg = messages.info[code];
- }
-
- t = t || state.tokens.next;
- if (t.id === "(end)") { // `~
- t = state.tokens.curr;
- }
-
- l = t.line || 0;
- ch = t.from || 0;
-
- w = {
- id: "(error)",
- raw: msg.desc,
- code: msg.code,
- evidence: state.lines[l - 1] || "",
- line: l,
- character: ch,
- scope: JSHINT.scope,
- a: a,
- b: b,
- c: c,
- d: d
- };
-
- w.reason = supplant(msg.desc, w);
- JSHINT.errors.push(w);
-
- if (state.option.passfail) {
- quit("E042", l, ch);
- }
-
- warnings += 1;
- if (warnings >= state.option.maxerr) {
- quit("E043", l, ch);
- }
-
- return w;
- }
-
- function warningAt(m, l, ch, a, b, c, d) {
- return warning(m, {
- line: l,
- from: ch
- }, a, b, c, d);
- }
-
- function error(m, t, a, b, c, d) {
- warning(m, t, a, b, c, d);
- }
-
- function errorAt(m, l, ch, a, b, c, d) {
- return error(m, {
- line: l,
- from: ch
- }, a, b, c, d);
- }
- function addInternalSrc(elem, src) {
- var i;
- i = {
- id: "(internal)",
- elem: elem,
- value: src
- };
- JSHINT.internals.push(i);
- return i;
- }
-
- function addlabel(t, type, tkn, islet) {
- if (type === "exception") {
- if (_.has(funct["(context)"], t)) {
- if (funct[t] !== true && !state.option.node) {
- warning("W002", state.tokens.next, t);
- }
- }
- }
-
- if (_.has(funct, t) && !funct["(global)"]) {
- if (funct[t] === true) {
- if (state.option.latedef) {
- if ((state.option.latedef === true && _.contains([funct[t], type], "unction")) ||
- !_.contains([funct[t], type], "unction")) {
- warning("W003", state.tokens.next, t);
- }
- }
- } else {
- if (!state.option.shadow && type !== "exception" ||
- (funct["(blockscope)"].getlabel(t))) {
- warning("W004", state.tokens.next, t);
- }
- }
- }
- if (funct["(blockscope)"] && funct["(blockscope)"].current.has(t)) {
- error("E044", state.tokens.next, t);
- }
- if (islet) {
- funct["(blockscope)"].current.add(t, type, state.tokens.curr);
- } else {
-
- funct[t] = type;
-
- if (tkn) {
- funct["(tokens)"][t] = tkn;
- }
-
- if (funct["(global)"]) {
- global[t] = funct;
- if (_.has(implied, t)) {
- if (state.option.latedef) {
- if ((state.option.latedef === true && _.contains([funct[t], type], "unction")) ||
- !_.contains([funct[t], type], "unction")) {
- warning("W003", state.tokens.next, t);
- }
- }
-
- delete implied[t];
- }
- } else {
- scope[t] = funct;
- }
- }
- }
-
- function doOption() {
- var nt = state.tokens.next;
- var body = nt.body.match(/(-\s+)?[^\s,]+(?:\s*:\s*(-\s+)?[^\s,]+)?/g);
- var predef = {};
-
- if (nt.type === "globals") {
- body.forEach(function (g) {
- g = g.split(":");
- var key = (g[0] || "").trim();
- var val = (g[1] || "").trim();
-
- if (key.charAt(0) === "-") {
- key = key.slice(1);
- val = false;
-
- JSHINT.blacklist[key] = key;
- updatePredefined();
- } else {
- predef[key] = (val === "true");
- }
- });
-
- combine(predefined, predef);
-
- for (var key in predef) {
- if (_.has(predef, key)) {
- declared[key] = nt;
- }
- }
- }
-
- if (nt.type === "exported") {
- body.forEach(function (e) {
- exported[e] = true;
- });
- }
-
- if (nt.type === "members") {
- membersOnly = membersOnly || {};
-
- body.forEach(function (m) {
- var ch1 = m.charAt(0);
- var ch2 = m.charAt(m.length - 1);
-
- if (ch1 === ch2 && (ch1 === "\"" || ch1 === "'")) {
- m = m
- .substr(1, m.length - 2)
- .replace("\\b", "\b")
- .replace("\\t", "\t")
- .replace("\\n", "\n")
- .replace("\\v", "\v")
- .replace("\\f", "\f")
- .replace("\\r", "\r")
- .replace("\\\\", "\\")
- .replace("\\\"", "\"");
- }
-
- membersOnly[m] = false;
- });
- }
-
- var numvals = [
- "maxstatements",
- "maxparams",
- "maxdepth",
- "maxcomplexity",
- "maxerr",
- "maxlen",
- "indent"
- ];
-
- if (nt.type === "jshint" || nt.type === "jslint") {
- body.forEach(function (g) {
- g = g.split(":");
- var key = (g[0] || "").trim();
- var val = (g[1] || "").trim();
-
- if (!checkOption(key, nt)) {
- return;
- }
-
- if (numvals.indexOf(key) >= 0) {
- if (val !== "false") {
- val = +val;
-
- if (typeof val !== "number" || !isFinite(val) || val <= 0 || Math.floor(val) !== val) {
- error("E032", nt, g[1].trim());
- return;
- }
-
- if (key === "indent") {
- state.option["(explicitIndent)"] = true;
- }
- state.option[key] = val;
- } else {
- if (key === "indent") {
- state.option["(explicitIndent)"] = false;
- } else {
- state.option[key] = false;
- }
- }
-
- return;
- }
-
- if (key === "validthis") {
- if (funct["(global)"]) {
- error("E009");
- } else {
- if (val === "true" || val === "false") {
- state.option.validthis = (val === "true");
- } else {
- error("E002", nt);
- }
- }
- return;
- }
-
- if (key === "quotmark") {
- switch (val) {
- case "true":
- case "false":
- state.option.quotmark = (val === "true");
- break;
- case "double":
- case "single":
- state.option.quotmark = val;
- break;
- default:
- error("E002", nt);
- }
- return;
- }
-
- if (key === "unused") {
- switch (val) {
- case "true":
- state.option.unused = true;
- break;
- case "false":
- state.option.unused = false;
- break;
- case "vars":
- case "strict":
- state.option.unused = val;
- break;
- default:
- error("E002", nt);
- }
- return;
- }
-
- if (key === "latedef") {
- switch (val) {
- case "true":
- state.option.latedef = true;
- break;
- case "false":
- state.option.latedef = false;
- break;
- case "nofunc":
- state.option.latedef = "nofunc";
- break;
- default:
- error("E002", nt);
- }
- return;
- }
-
- var match = /^([+-])(W\d{3})$/g.exec(key);
- if (match) {
- state.ignored[match[2]] = (match[1] === "-");
- return;
- }
-
- var tn;
- if (val === "true" || val === "false") {
- if (nt.type === "jslint") {
- tn = renamedOptions[key] || key;
- state.option[tn] = (val === "true");
-
- if (invertedOptions[tn] !== undefined) {
- state.option[tn] = !state.option[tn];
- }
- } else {
- state.option[key] = (val === "true");
- }
-
- if (key === "newcap") {
- state.option["(explicitNewcap)"] = true;
- }
- return;
- }
-
- error("E002", nt);
- });
-
- assume();
- }
- }
-
- function peek(p) {
- var i = p || 0, j = 0, t;
-
- while (j <= i) {
- t = lookahead[j];
- if (!t) {
- t = lookahead[j] = lex.token();
- }
- j += 1;
- }
- return t;
- }
-
- function advance(id, t) {
- switch (state.tokens.curr.id) {
- case "(number)":
- if (state.tokens.next.id === ".") {
- warning("W005", state.tokens.curr);
- }
- break;
- case "-":
- if (state.tokens.next.id === "-" || state.tokens.next.id === "--") {
- warning("W006");
- }
- break;
- case "+":
- if (state.tokens.next.id === "+" || state.tokens.next.id === "++") {
- warning("W007");
- }
- break;
- }
-
- if (state.tokens.curr.type === "(string)" || state.tokens.curr.identifier) {
- anonname = state.tokens.curr.value;
- }
-
- if (id && state.tokens.next.id !== id) {
- if (t) {
- if (state.tokens.next.id === "(end)") {
- error("E019", t, t.id);
- } else {
- error("E020", state.tokens.next, id, t.id, t.line, state.tokens.next.value);
- }
- } else if (state.tokens.next.type !== "(identifier)" || state.tokens.next.value !== id) {
- warning("W116", state.tokens.next, id, state.tokens.next.value);
- }
- }
-
- state.tokens.prev = state.tokens.curr;
- state.tokens.curr = state.tokens.next;
- for (;;) {
- state.tokens.next = lookahead.shift() || lex.token();
-
- if (!state.tokens.next) { // No more tokens left, give up
- quit("E041", state.tokens.curr.line);
- }
-
- if (state.tokens.next.id === "(end)" || state.tokens.next.id === "(error)") {
- return;
- }
-
- if (state.tokens.next.check) {
- state.tokens.next.check();
- }
-
- if (state.tokens.next.isSpecial) {
- doOption();
- } else {
- if (state.tokens.next.id !== "(endline)") {
- break;
- }
- }
- }
- }
-
- function isInfix(token) {
- return token.infix || (!token.identifier && !!token.led);
- }
-
- function isEndOfExpr() {
- var curr = state.tokens.curr;
- var next = state.tokens.next;
- if (next.id === ";" || next.id === "}" || next.id === ":") {
- return true;
- }
- if (isInfix(next) === isInfix(curr) || (curr.id === "yield" && state.option.inMoz(true))) {
- return curr.line !== next.line;
- }
- return false;
- }
-
- function expression(rbp, initial) {
- var left, isArray = false, isObject = false, isLetExpr = false;
- if (!initial && state.tokens.next.value === "let" && peek(0).value === "(") {
- if (!state.option.inMoz(true)) {
- warning("W118", state.tokens.next, "let expressions");
- }
- isLetExpr = true;
- funct["(blockscope)"].stack();
- advance("let");
- advance("(");
- state.syntax["let"].fud.call(state.syntax["let"].fud, false);
- advance(")");
- }
-
- if (state.tokens.next.id === "(end)")
- error("E006", state.tokens.curr);
-
- advance();
-
- if (initial) {
- anonname = "anonymous";
- funct["(verb)"] = state.tokens.curr.value;
- }
-
- if (initial === true && state.tokens.curr.fud) {
- left = state.tokens.curr.fud();
- } else {
- if (state.tokens.curr.nud) {
- left = state.tokens.curr.nud();
- } else {
- error("E030", state.tokens.curr, state.tokens.curr.id);
- }
-
- while (rbp < state.tokens.next.lbp && !isEndOfExpr()) {
- isArray = state.tokens.curr.value === "Array";
- isObject = state.tokens.curr.value === "Object";
- if (left && (left.value || (left.first && left.first.value))) {
- if (left.value !== "new" ||
- (left.first && left.first.value && left.first.value === ".")) {
- isArray = false;
- if (left.value !== state.tokens.curr.value) {
- isObject = false;
- }
- }
- }
-
- advance();
-
- if (isArray && state.tokens.curr.id === "(" && state.tokens.next.id === ")") {
- warning("W009", state.tokens.curr);
- }
-
- if (isObject && state.tokens.curr.id === "(" && state.tokens.next.id === ")") {
- warning("W010", state.tokens.curr);
- }
-
- if (left && state.tokens.curr.led) {
- left = state.tokens.curr.led(left);
- } else {
- error("E033", state.tokens.curr, state.tokens.curr.id);
- }
- }
- }
- if (isLetExpr) {
- funct["(blockscope)"].unstack();
- }
- return left;
- }
-
- function adjacent(left, right) {
- left = left || state.tokens.curr;
- right = right || state.tokens.next;
- if (state.option.white) {
- if (left.character !== right.from && left.line === right.line) {
- left.from += (left.character - left.from);
- warning("W011", left, left.value);
- }
- }
- }
-
- function nobreak(left, right) {
- left = left || state.tokens.curr;
- right = right || state.tokens.next;
- if (state.option.white && (left.character !== right.from || left.line !== right.line)) {
- warning("W012", right, right.value);
- }
- }
-
- function nospace(left, right) {
- left = left || state.tokens.curr;
- right = right || state.tokens.next;
- if (state.option.white && !left.comment) {
- if (left.line === right.line) {
- adjacent(left, right);
- }
- }
- }
-
- function nonadjacent(left, right) {
- if (state.option.white) {
- left = left || state.tokens.curr;
- right = right || state.tokens.next;
-
- if (left.value === ";" && right.value === ";") {
- return;
- }
-
- if (left.line === right.line && left.character === right.from) {
- left.from += (left.character - left.from);
- warning("W013", left, left.value);
- }
- }
- }
-
- function nobreaknonadjacent(left, right) {
- left = left || state.tokens.curr;
- right = right || state.tokens.next;
- if (!state.option.laxbreak && left.line !== right.line) {
- warning("W014", right, right.value);
- } else if (state.option.white) {
- left = left || state.tokens.curr;
- right = right || state.tokens.next;
- if (left.character === right.from) {
- left.from += (left.character - left.from);
- warning("W013", left, left.value);
- }
- }
- }
-
- function indentation(bias) {
- if (!state.option.white && !state.option["(explicitIndent)"]) {
- return;
- }
-
- if (state.tokens.next.id === "(end)") {
- return;
- }
-
- var i = indent + (bias || 0);
- if (state.tokens.next.from !== i) {
- warning("W015", state.tokens.next, state.tokens.next.value, i, state.tokens.next.from);
- }
- }
-
- function nolinebreak(t) {
- t = t || state.tokens.curr;
- if (t.line !== state.tokens.next.line) {
- warning("E022", t, t.value);
- }
- }
-
- function nobreakcomma(left, right) {
- if (left.line !== right.line) {
- if (!state.option.laxcomma) {
- if (comma.first) {
- warning("I001");
- comma.first = false;
- }
- warning("W014", left, right.value);
- }
- } else if (!left.comment && left.character !== right.from && state.option.white) {
- left.from += (left.character - left.from);
- warning("W011", left, left.value);
- }
- }
-
- function comma(opts) {
- opts = opts || {};
-
- if (!opts.peek) {
- nobreakcomma(state.tokens.curr, state.tokens.next);
- advance(",");
- } else {
- nobreakcomma(state.tokens.prev, state.tokens.curr);
- }
-
- if (state.tokens.next.value !== "]" && state.tokens.next.value !== "}") {
- nonadjacent(state.tokens.curr, state.tokens.next);
- }
-
- if (state.tokens.next.identifier && !(opts.property && state.option.inES5())) {
- switch (state.tokens.next.value) {
- case "break":
- case "case":
- case "catch":
- case "continue":
- case "default":
- case "do":
- case "else":
- case "finally":
- case "for":
- case "if":
- case "in":
- case "instanceof":
- case "return":
- case "switch":
- case "throw":
- case "try":
- case "var":
- case "let":
- case "while":
- case "with":
- error("E024", state.tokens.next, state.tokens.next.value);
- return false;
- }
- }
-
- if (state.tokens.next.type === "(punctuator)") {
- switch (state.tokens.next.value) {
- case "}":
- case "]":
- case ",":
- if (opts.allowTrailing) {
- return true;
- }
- case ")":
- error("E024", state.tokens.next, state.tokens.next.value);
- return false;
- }
- }
- return true;
- }
-
- function symbol(s, p) {
- var x = state.syntax[s];
- if (!x || typeof x !== "object") {
- state.syntax[s] = x = {
- id: s,
- lbp: p,
- value: s
- };
- }
- return x;
- }
-
- function delim(s) {
- return symbol(s, 0);
- }
-
- function stmt(s, f) {
- var x = delim(s);
- x.identifier = x.reserved = true;
- x.fud = f;
- return x;
- }
-
- function blockstmt(s, f) {
- var x = stmt(s, f);
- x.block = true;
- return x;
- }
-
- function reserveName(x) {
- var c = x.id.charAt(0);
- if ((c >= "a" && c <= "z") || (c >= "A" && c <= "Z")) {
- x.identifier = x.reserved = true;
- }
- return x;
- }
-
- function prefix(s, f) {
- var x = symbol(s, 150);
- reserveName(x);
- x.nud = (typeof f === "function") ? f : function () {
- this.right = expression(150);
- this.arity = "unary";
- if (this.id === "++" || this.id === "--") {
- if (state.option.plusplus) {
- warning("W016", this, this.id);
- } else if ((!this.right.identifier || isReserved(this.right)) &&
- this.right.id !== "." && this.right.id !== "[") {
- warning("W017", this);
- }
- }
- return this;
- };
- return x;
- }
-
- function type(s, f) {
- var x = delim(s);
- x.type = s;
- x.nud = f;
- return x;
- }
-
- function reserve(name, func) {
- var x = type(name, func);
- x.identifier = true;
- x.reserved = true;
- return x;
- }
-
- function FutureReservedWord(name, meta) {
- var x = type(name, (meta && meta.nud) || function () {
- return this;
- });
-
- meta = meta || {};
- meta.isFutureReservedWord = true;
-
- x.value = name;
- x.identifier = true;
- x.reserved = true;
- x.meta = meta;
-
- return x;
- }
-
- function reservevar(s, v) {
- return reserve(s, function () {
- if (typeof v === "function") {
- v(this);
- }
- return this;
- });
- }
-
- function infix(s, f, p, w) {
- var x = symbol(s, p);
- reserveName(x);
- x.infix = true;
- x.led = function (left) {
- if (!w) {
- nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
- nonadjacent(state.tokens.curr, state.tokens.next);
- }
- if (s === "in" && left.id === "!") {
- warning("W018", left, "!");
- }
- if (typeof f === "function") {
- return f(left, this);
- } else {
- this.left = left;
- this.right = expression(p);
- return this;
- }
- };
- return x;
- }
-
-
- function application(s) {
- var x = symbol(s, 42);
-
- x.led = function (left) {
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "arrow function syntax (=>)");
- }
-
- nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
- nonadjacent(state.tokens.curr, state.tokens.next);
-
- this.left = left;
- this.right = doFunction(undefined, undefined, false, left);
- return this;
- };
- return x;
- }
-
- function relation(s, f) {
- var x = symbol(s, 100);
-
- x.led = function (left) {
- nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
- nonadjacent(state.tokens.curr, state.tokens.next);
- var right = expression(100);
-
- if (isIdentifier(left, "NaN") || isIdentifier(right, "NaN")) {
- warning("W019", this);
- } else if (f) {
- f.apply(this, [left, right]);
- }
-
- if (!left || !right) {
- quit("E041", state.tokens.curr.line);
- }
-
- if (left.id === "!") {
- warning("W018", left, "!");
- }
-
- if (right.id === "!") {
- warning("W018", right, "!");
- }
-
- this.left = left;
- this.right = right;
- return this;
- };
- return x;
- }
-
- function isPoorRelation(node) {
- return node &&
- ((node.type === "(number)" && +node.value === 0) ||
- (node.type === "(string)" && node.value === "") ||
- (node.type === "null" && !state.option.eqnull) ||
- node.type === "true" ||
- node.type === "false" ||
- node.type === "undefined");
- }
-
- function assignop(s, f, p) {
- var x = infix(s, typeof f === "function" ? f : function (left, that) {
- that.left = left;
-
- if (left) {
- if (predefined[left.value] === false &&
- scope[left.value]["(global)"] === true) {
- warning("W020", left);
- } else if (left["function"]) {
- warning("W021", left, left.value);
- }
-
- if (funct[left.value] === "const") {
- error("E013", left, left.value);
- }
-
- if (left.id === ".") {
- if (!left.left) {
- warning("E031", that);
- } else if (left.left.value === "arguments" && !state.directive["use strict"]) {
- warning("E031", that);
- }
-
- that.right = expression(10);
- return that;
- } else if (left.id === "[") {
- if (state.tokens.curr.left.first) {
- state.tokens.curr.left.first.forEach(function (t) {
- if (funct[t.value] === "const") {
- error("E013", t, t.value);
- }
- });
- } else if (!left.left) {
- warning("E031", that);
- } else if (left.left.value === "arguments" && !state.directive["use strict"]) {
- warning("E031", that);
- }
- that.right = expression(10);
- return that;
- } else if (left.identifier && !isReserved(left)) {
- if (funct[left.value] === "exception") {
- warning("W022", left);
- }
- that.right = expression(10);
- return that;
- }
-
- if (left === state.syntax["function"]) {
- warning("W023", state.tokens.curr);
- }
- }
-
- error("E031", that);
- }, p);
-
- x.exps = true;
- x.assign = true;
- return x;
- }
-
-
- function bitwise(s, f, p) {
- var x = symbol(s, p);
- reserveName(x);
- x.led = (typeof f === "function") ? f : function (left) {
- if (state.option.bitwise) {
- warning("W016", this, this.id);
- }
- this.left = left;
- this.right = expression(p);
- return this;
- };
- return x;
- }
-
-
- function bitwiseassignop(s) {
- return assignop(s, function (left, that) {
- if (state.option.bitwise) {
- warning("W016", that, that.id);
- }
- nonadjacent(state.tokens.prev, state.tokens.curr);
- nonadjacent(state.tokens.curr, state.tokens.next);
- if (left) {
- if (left.id === "." || left.id === "[" ||
- (left.identifier && !isReserved(left))) {
- expression(10);
- return that;
- }
- if (left === state.syntax["function"]) {
- warning("W023", state.tokens.curr);
- }
- return that;
- }
- error("E031", that);
- }, 20);
- }
-
-
- function suffix(s) {
- var x = symbol(s, 150);
-
- x.led = function (left) {
- if (state.option.plusplus) {
- warning("W016", this, this.id);
- } else if ((!left.identifier || isReserved(left)) && left.id !== "." && left.id !== "[") {
- warning("W017", this);
- }
-
- this.left = left;
- return this;
- };
- return x;
- }
-
- function optionalidentifier(fnparam, prop) {
- if (!state.tokens.next.identifier) {
- return;
- }
-
- advance();
-
- var curr = state.tokens.curr;
- var val = state.tokens.curr.value;
-
- if (!isReserved(curr)) {
- return val;
- }
-
- if (prop) {
- if (state.option.inES5()) {
- return val;
- }
- }
-
- if (fnparam && val === "undefined") {
- return val;
- }
- if (prop && !api.getCache("displayed:I002")) {
- api.setCache("displayed:I002", true);
- warning("I002");
- }
-
- warning("W024", state.tokens.curr, state.tokens.curr.id);
- return val;
- }
- function identifier(fnparam, prop) {
- var i = optionalidentifier(fnparam, prop);
- if (i) {
- return i;
- }
- if (state.tokens.curr.id === "function" && state.tokens.next.id === "(") {
- warning("W025");
- } else {
- error("E030", state.tokens.next, state.tokens.next.value);
- }
- }
-
-
- function reachable(s) {
- var i = 0, t;
- if (state.tokens.next.id !== ";" || noreach) {
- return;
- }
- for (;;) {
- t = peek(i);
- if (t.reach) {
- return;
- }
- if (t.id !== "(endline)") {
- if (t.id === "function") {
- if (!state.option.latedef) {
- break;
- }
-
- warning("W026", t);
- break;
- }
-
- warning("W027", t, t.value, s);
- break;
- }
- i += 1;
- }
- }
-
-
- function statement(noindent) {
- var values;
- var i = indent, r, s = scope, t = state.tokens.next;
-
- if (t.id === ";") {
- advance(";");
- return;
- }
- var res = isReserved(t);
-
- if (res && t.meta && t.meta.isFutureReservedWord && peek().id === ":") {
- warning("W024", t, t.id);
- res = false;
- }
- if (_.has(["[", "{"], t.value)) {
- if (lookupBlockType().isDestAssign) {
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "destructuring expression");
- }
- values = destructuringExpression();
- values.forEach(function (tok) {
- isundef(funct, "W117", tok.token, tok.id);
- });
- advance("=");
- destructuringExpressionMatch(values, expression(10, true));
- advance(";");
- return;
- }
- }
- if (t.identifier && !res && peek().id === ":") {
- advance();
- advance(":");
- scope = Object.create(s);
- addlabel(t.value, "label");
-
- if (!state.tokens.next.labelled && state.tokens.next.value !== "{") {
- warning("W028", state.tokens.next, t.value, state.tokens.next.value);
- }
-
- state.tokens.next.label = t.value;
- t = state.tokens.next;
- }
-
- if (t.id === "{") {
- block(true, true);
- return;
- }
-
- if (!noindent) {
- indentation();
- }
- r = expression(0, true);
-
- if (!t.block) {
- if (!state.option.expr && (!r || !r.exps)) {
- warning("W030", state.tokens.curr);
- } else if (state.option.nonew && r && r.left && r.id === "(" && r.left.id === "new") {
- warning("W031", t);
- }
-
- if (state.tokens.next.id !== ";") {
- if (!state.option.asi) {
- if (!state.option.lastsemic || state.tokens.next.id !== "}" ||
- state.tokens.next.line !== state.tokens.curr.line) {
- warningAt("W033", state.tokens.curr.line, state.tokens.curr.character);
- }
- }
- } else {
- adjacent(state.tokens.curr, state.tokens.next);
- advance(";");
- nonadjacent(state.tokens.curr, state.tokens.next);
- }
- }
-
- indent = i;
- scope = s;
- return r;
- }
-
-
- function statements(startLine) {
- var a = [], p;
-
- while (!state.tokens.next.reach && state.tokens.next.id !== "(end)") {
- if (state.tokens.next.id === ";") {
- p = peek();
-
- if (!p || (p.id !== "(" && p.id !== "[")) {
- warning("W032");
- }
-
- advance(";");
- } else {
- a.push(statement(startLine === state.tokens.next.line));
- }
- }
- return a;
- }
- function directives() {
- var i, p, pn;
-
- for (;;) {
- if (state.tokens.next.id === "(string)") {
- p = peek(0);
- if (p.id === "(endline)") {
- i = 1;
- do {
- pn = peek(i);
- i = i + 1;
- } while (pn.id === "(endline)");
-
- if (pn.id !== ";") {
- if (pn.id !== "(string)" && pn.id !== "(number)" &&
- pn.id !== "(regexp)" && pn.identifier !== true &&
- pn.id !== "}") {
- break;
- }
- warning("W033", state.tokens.next);
- } else {
- p = pn;
- }
- } else if (p.id === "}") {
- warning("W033", p);
- } else if (p.id !== ";") {
- break;
- }
-
- indentation();
- advance();
- if (state.directive[state.tokens.curr.value]) {
- warning("W034", state.tokens.curr, state.tokens.curr.value);
- }
-
- if (state.tokens.curr.value === "use strict") {
- if (!state.option["(explicitNewcap)"])
- state.option.newcap = true;
- state.option.undef = true;
- }
- state.directive[state.tokens.curr.value] = true;
-
- if (p.id === ";") {
- advance(";");
- }
- continue;
- }
- break;
- }
- }
- function block(ordinary, stmt, isfunc, isfatarrow) {
- var a,
- b = inblock,
- old_indent = indent,
- m,
- s = scope,
- t,
- line,
- d;
-
- inblock = ordinary;
-
- if (!ordinary || !state.option.funcscope)
- scope = Object.create(scope);
-
- nonadjacent(state.tokens.curr, state.tokens.next);
- t = state.tokens.next;
-
- var metrics = funct["(metrics)"];
- metrics.nestedBlockDepth += 1;
- metrics.verifyMaxNestedBlockDepthPerFunction();
-
- if (state.tokens.next.id === "{") {
- advance("{");
- funct["(blockscope)"].stack();
-
- line = state.tokens.curr.line;
- if (state.tokens.next.id !== "}") {
- indent += state.option.indent;
- while (!ordinary && state.tokens.next.from > indent) {
- indent += state.option.indent;
- }
-
- if (isfunc) {
- m = {};
- for (d in state.directive) {
- if (_.has(state.directive, d)) {
- m[d] = state.directive[d];
- }
- }
- directives();
-
- if (state.option.strict && funct["(context)"]["(global)"]) {
- if (!m["use strict"] && !state.directive["use strict"]) {
- warning("E007");
- }
- }
- }
-
- a = statements(line);
-
- metrics.statementCount += a.length;
-
- if (isfunc) {
- state.directive = m;
- }
-
- indent -= state.option.indent;
- if (line !== state.tokens.next.line) {
- indentation();
- }
- } else if (line !== state.tokens.next.line) {
- indentation();
- }
- advance("}", t);
-
- funct["(blockscope)"].unstack();
-
- indent = old_indent;
- } else if (!ordinary) {
- if (isfunc) {
- m = {};
- if (stmt && !isfatarrow && !state.option.inMoz(true)) {
- error("W118", state.tokens.curr, "function closure expressions");
- }
-
- if (!stmt) {
- for (d in state.directive) {
- if (_.has(state.directive, d)) {
- m[d] = state.directive[d];
- }
- }
- }
- expression(10);
-
- if (state.option.strict && funct["(context)"]["(global)"]) {
- if (!m["use strict"] && !state.directive["use strict"]) {
- warning("E007");
- }
- }
- } else {
- error("E021", state.tokens.next, "{", state.tokens.next.value);
- }
- } else {
- funct["(nolet)"] = true;
-
- if (!stmt || state.option.curly) {
- warning("W116", state.tokens.next, "{", state.tokens.next.value);
- }
-
- noreach = true;
- indent += state.option.indent;
- a = [statement(state.tokens.next.line === state.tokens.curr.line)];
- indent -= state.option.indent;
- noreach = false;
-
- delete funct["(nolet)"];
- }
- funct["(verb)"] = null;
- if (!ordinary || !state.option.funcscope) scope = s;
- inblock = b;
- if (ordinary && state.option.noempty && (!a || a.length === 0)) {
- warning("W035");
- }
- metrics.nestedBlockDepth -= 1;
- return a;
- }
-
-
- function countMember(m) {
- if (membersOnly && typeof membersOnly[m] !== "boolean") {
- warning("W036", state.tokens.curr, m);
- }
- if (typeof member[m] === "number") {
- member[m] += 1;
- } else {
- member[m] = 1;
- }
- }
-
-
- function note_implied(tkn) {
- var name = tkn.value, line = tkn.line, a = implied[name];
- if (typeof a === "function") {
- a = false;
- }
-
- if (!a) {
- a = [line];
- implied[name] = a;
- } else if (a[a.length - 1] !== line) {
- a.push(line);
- }
- }
-
- type("(number)", function () {
- return this;
- });
-
- type("(string)", function () {
- return this;
- });
-
- state.syntax["(identifier)"] = {
- type: "(identifier)",
- lbp: 0,
- identifier: true,
- nud: function () {
- var v = this.value,
- s = scope[v],
- f;
-
- if (typeof s === "function") {
- s = undefined;
- } else if (typeof s === "boolean") {
- f = funct;
- funct = functions[0];
- addlabel(v, "var");
- s = funct;
- funct = f;
- }
- var block;
- if (_.has(funct, "(blockscope)")) {
- block = funct["(blockscope)"].getlabel(v);
- }
- if (funct === s || block) {
- switch (block ? block[v]["(type)"] : funct[v]) {
- case "unused":
- if (block) block[v]["(type)"] = "var";
- else funct[v] = "var";
- break;
- case "unction":
- if (block) block[v]["(type)"] = "function";
- else funct[v] = "function";
- this["function"] = true;
- break;
- case "function":
- this["function"] = true;
- break;
- case "label":
- warning("W037", state.tokens.curr, v);
- break;
- }
- } else if (funct["(global)"]) {
-
- if (typeof predefined[v] !== "boolean") {
- if (!(anonname === "typeof" || anonname === "delete") ||
- (state.tokens.next && (state.tokens.next.value === "." ||
- state.tokens.next.value === "["))) {
-
- if (!funct["(comparray)"].check(v)) {
- isundef(funct, "W117", state.tokens.curr, v);
- }
- }
- }
-
- note_implied(state.tokens.curr);
- } else {
-
- switch (funct[v]) {
- case "closure":
- case "function":
- case "var":
- case "unused":
- warning("W038", state.tokens.curr, v);
- break;
- case "label":
- warning("W037", state.tokens.curr, v);
- break;
- case "outer":
- case "global":
- break;
- default:
- if (s === true) {
- funct[v] = true;
- } else if (s === null) {
- warning("W039", state.tokens.curr, v);
- note_implied(state.tokens.curr);
- } else if (typeof s !== "object") {
- if (!(anonname === "typeof" || anonname === "delete") ||
- (state.tokens.next &&
- (state.tokens.next.value === "." || state.tokens.next.value === "["))) {
-
- isundef(funct, "W117", state.tokens.curr, v);
- }
- funct[v] = true;
- note_implied(state.tokens.curr);
- } else {
- switch (s[v]) {
- case "function":
- case "unction":
- this["function"] = true;
- s[v] = "closure";
- funct[v] = s["(global)"] ? "global" : "outer";
- break;
- case "var":
- case "unused":
- s[v] = "closure";
- funct[v] = s["(global)"] ? "global" : "outer";
- break;
- case "closure":
- funct[v] = s["(global)"] ? "global" : "outer";
- break;
- case "label":
- warning("W037", state.tokens.curr, v);
- }
- }
- }
- }
- return this;
- },
- led: function () {
- error("E033", state.tokens.next, state.tokens.next.value);
- }
- };
-
- type("(regexp)", function () {
- return this;
- });
-
- delim("(endline)");
- delim("(begin)");
- delim("(end)").reach = true;
- delim("(error)").reach = true;
- delim("}").reach = true;
- delim(")");
- delim("]");
- delim("\"").reach = true;
- delim("'").reach = true;
- delim(";");
- delim(":").reach = true;
- delim("#");
-
- reserve("else");
- reserve("case").reach = true;
- reserve("catch");
- reserve("default").reach = true;
- reserve("finally");
- reservevar("arguments", function (x) {
- if (state.directive["use strict"] && funct["(global)"]) {
- warning("E008", x);
- }
- });
- reservevar("eval");
- reservevar("false");
- reservevar("Infinity");
- reservevar("null");
- reservevar("this", function (x) {
- if (state.directive["use strict"] && !state.option.validthis && ((funct["(statement)"] &&
- funct["(name)"].charAt(0) > "Z") || funct["(global)"])) {
- warning("W040", x);
- }
- });
- reservevar("true");
- reservevar("undefined");
-
- assignop("=", "assign", 20);
- assignop("+=", "assignadd", 20);
- assignop("-=", "assignsub", 20);
- assignop("*=", "assignmult", 20);
- assignop("/=", "assigndiv", 20).nud = function () {
- error("E014");
- };
- assignop("%=", "assignmod", 20);
-
- bitwiseassignop("&=", "assignbitand", 20);
- bitwiseassignop("|=", "assignbitor", 20);
- bitwiseassignop("^=", "assignbitxor", 20);
- bitwiseassignop("<<=", "assignshiftleft", 20);
- bitwiseassignop(">>=", "assignshiftright", 20);
- bitwiseassignop(">>>=", "assignshiftrightunsigned", 20);
- infix(",", function (left, that) {
- var expr;
- that.exprs = [left];
- if (!comma({peek: true})) {
- return that;
- }
- while (true) {
- if (!(expr = expression(10))) {
- break;
- }
- that.exprs.push(expr);
- if (state.tokens.next.value !== "," || !comma()) {
- break;
- }
- }
- return that;
- }, 10, true);
-
- infix("?", function (left, that) {
- increaseComplexityCount();
- that.left = left;
- that.right = expression(10);
- advance(":");
- that["else"] = expression(10);
- return that;
- }, 30);
-
- var orPrecendence = 40;
- infix("||", function (left, that) {
- increaseComplexityCount();
- that.left = left;
- that.right = expression(orPrecendence);
- return that;
- }, orPrecendence);
- infix("&&", "and", 50);
- bitwise("|", "bitor", 70);
- bitwise("^", "bitxor", 80);
- bitwise("&", "bitand", 90);
- relation("==", function (left, right) {
- var eqnull = state.option.eqnull && (left.value === "null" || right.value === "null");
-
- if (!eqnull && state.option.eqeqeq)
- warning("W116", this, "===", "==");
- else if (isPoorRelation(left))
- warning("W041", this, "===", left.value);
- else if (isPoorRelation(right))
- warning("W041", this, "===", right.value);
-
- return this;
- });
- relation("===");
- relation("!=", function (left, right) {
- var eqnull = state.option.eqnull &&
- (left.value === "null" || right.value === "null");
-
- if (!eqnull && state.option.eqeqeq) {
- warning("W116", this, "!==", "!=");
- } else if (isPoorRelation(left)) {
- warning("W041", this, "!==", left.value);
- } else if (isPoorRelation(right)) {
- warning("W041", this, "!==", right.value);
- }
- return this;
- });
- relation("!==");
- relation("<");
- relation(">");
- relation("<=");
- relation(">=");
- bitwise("<<", "shiftleft", 120);
- bitwise(">>", "shiftright", 120);
- bitwise(">>>", "shiftrightunsigned", 120);
- infix("in", "in", 120);
- infix("instanceof", "instanceof", 120);
- infix("+", function (left, that) {
- var right = expression(130);
- if (left && right && left.id === "(string)" && right.id === "(string)") {
- left.value += right.value;
- left.character = right.character;
- if (!state.option.scripturl && reg.javascriptURL.test(left.value)) {
- warning("W050", left);
- }
- return left;
- }
- that.left = left;
- that.right = right;
- return that;
- }, 130);
- prefix("+", "num");
- prefix("+++", function () {
- warning("W007");
- this.right = expression(150);
- this.arity = "unary";
- return this;
- });
- infix("+++", function (left) {
- warning("W007");
- this.left = left;
- this.right = expression(130);
- return this;
- }, 130);
- infix("-", "sub", 130);
- prefix("-", "neg");
- prefix("---", function () {
- warning("W006");
- this.right = expression(150);
- this.arity = "unary";
- return this;
- });
- infix("---", function (left) {
- warning("W006");
- this.left = left;
- this.right = expression(130);
- return this;
- }, 130);
- infix("*", "mult", 140);
- infix("/", "div", 140);
- infix("%", "mod", 140);
-
- suffix("++", "postinc");
- prefix("++", "preinc");
- state.syntax["++"].exps = true;
-
- suffix("--", "postdec");
- prefix("--", "predec");
- state.syntax["--"].exps = true;
- prefix("delete", function () {
- var p = expression(10);
- if (!p || (p.id !== "." && p.id !== "[")) {
- warning("W051");
- }
- this.first = p;
- return this;
- }).exps = true;
-
- prefix("~", function () {
- if (state.option.bitwise) {
- warning("W052", this, "~");
- }
- expression(150);
- return this;
- });
-
- prefix("...", function () {
- if (!state.option.inESNext()) {
- warning("W104", this, "spread/rest operator");
- }
- if (!state.tokens.next.identifier) {
- error("E030", state.tokens.next, state.tokens.next.value);
- }
- expression(150);
- return this;
- });
-
- prefix("!", function () {
- this.right = expression(150);
- this.arity = "unary";
-
- if (!this.right) { // '!' followed by nothing? Give up.
- quit("E041", this.line || 0);
- }
-
- if (bang[this.right.id] === true) {
- warning("W018", this, "!");
- }
- return this;
- });
-
- prefix("typeof", "typeof");
- prefix("new", function () {
- var c = expression(155), i;
- if (c && c.id !== "function") {
- if (c.identifier) {
- c["new"] = true;
- switch (c.value) {
- case "Number":
- case "String":
- case "Boolean":
- case "Math":
- case "JSON":
- warning("W053", state.tokens.prev, c.value);
- break;
- case "Function":
- if (!state.option.evil) {
- warning("W054");
- }
- break;
- case "Date":
- case "RegExp":
- break;
- default:
- if (c.id !== "function") {
- i = c.value.substr(0, 1);
- if (state.option.newcap && (i < "A" || i > "Z") && !_.has(global, c.value)) {
- warning("W055", state.tokens.curr);
- }
- }
- }
- } else {
- if (c.id !== "." && c.id !== "[" && c.id !== "(") {
- warning("W056", state.tokens.curr);
- }
- }
- } else {
- if (!state.option.supernew)
- warning("W057", this);
- }
- adjacent(state.tokens.curr, state.tokens.next);
- if (state.tokens.next.id !== "(" && !state.option.supernew) {
- warning("W058", state.tokens.curr, state.tokens.curr.value);
- }
- this.first = c;
- return this;
- });
- state.syntax["new"].exps = true;
-
- prefix("void").exps = true;
-
- infix(".", function (left, that) {
- adjacent(state.tokens.prev, state.tokens.curr);
- nobreak();
- var m = identifier(false, true);
-
- if (typeof m === "string") {
- countMember(m);
- }
-
- that.left = left;
- that.right = m;
-
- if (m && m === "hasOwnProperty" && state.tokens.next.value === "=") {
- warning("W001");
- }
-
- if (left && left.value === "arguments" && (m === "callee" || m === "caller")) {
- if (state.option.noarg)
- warning("W059", left, m);
- else if (state.directive["use strict"])
- error("E008");
- } else if (!state.option.evil && left && left.value === "document" &&
- (m === "write" || m === "writeln")) {
- warning("W060", left);
- }
-
- if (!state.option.evil && (m === "eval" || m === "execScript")) {
- warning("W061");
- }
-
- return that;
- }, 160, true);
-
- infix("(", function (left, that) {
- if (state.tokens.prev.id !== "}" && state.tokens.prev.id !== ")") {
- nobreak(state.tokens.prev, state.tokens.curr);
- }
-
- nospace();
- if (state.option.immed && left && !left.immed && left.id === "function") {
- warning("W062");
- }
-
- var n = 0;
- var p = [];
-
- if (left) {
- if (left.type === "(identifier)") {
- if (left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)) {
- if ("Number String Boolean Date Object".indexOf(left.value) === -1) {
- if (left.value === "Math") {
- warning("W063", left);
- } else if (state.option.newcap) {
- warning("W064", left);
- }
- }
- }
- }
- }
-
- if (state.tokens.next.id !== ")") {
- for (;;) {
- p[p.length] = expression(10);
- n += 1;
- if (state.tokens.next.id !== ",") {
- break;
- }
- comma();
- }
- }
-
- advance(")");
- nospace(state.tokens.prev, state.tokens.curr);
-
- if (typeof left === "object") {
- if (left.value === "parseInt" && n === 1) {
- warning("W065", state.tokens.curr);
- }
- if (!state.option.evil) {
- if (left.value === "eval" || left.value === "Function" ||
- left.value === "execScript") {
- warning("W061", left);
-
- if (p[0] && [0].id === "(string)") {
- addInternalSrc(left, p[0].value);
- }
- } else if (p[0] && p[0].id === "(string)" &&
- (left.value === "setTimeout" ||
- left.value === "setInterval")) {
- warning("W066", left);
- addInternalSrc(left, p[0].value);
- } else if (p[0] && p[0].id === "(string)" &&
- left.value === "." &&
- left.left.value === "window" &&
- (left.right === "setTimeout" ||
- left.right === "setInterval")) {
- warning("W066", left);
- addInternalSrc(left, p[0].value);
- }
- }
- if (!left.identifier && left.id !== "." && left.id !== "[" &&
- left.id !== "(" && left.id !== "&&" && left.id !== "||" &&
- left.id !== "?") {
- warning("W067", left);
- }
- }
-
- that.left = left;
- return that;
- }, 155, true).exps = true;
-
- prefix("(", function () {
- nospace();
- var bracket, brackets = [];
- var pn, pn1, i = 0;
- var ret;
-
- do {
- pn = peek(i);
- i += 1;
- pn1 = peek(i);
- i += 1;
- } while (pn.value !== ")" && pn1.value !== "=>" && pn1.value !== ";" && pn1.type !== "(end)");
-
- if (state.tokens.next.id === "function") {
- state.tokens.next.immed = true;
- }
-
- var exprs = [];
-
- if (state.tokens.next.id !== ")") {
- for (;;) {
- if (pn1.value === "=>" && state.tokens.next.value === "{") {
- bracket = state.tokens.next;
- bracket.left = destructuringExpression();
- brackets.push(bracket);
- for (var t in bracket.left) {
- exprs.push(bracket.left[t].token);
- }
- } else {
- exprs.push(expression(10));
- }
- if (state.tokens.next.id !== ",") {
- break;
- }
- comma();
- }
- }
-
- advance(")", this);
- nospace(state.tokens.prev, state.tokens.curr);
- if (state.option.immed && exprs[0] && exprs[0].id === "function") {
- if (state.tokens.next.id !== "(" &&
- (state.tokens.next.id !== "." || (peek().value !== "call" && peek().value !== "apply"))) {
- warning("W068", this);
- }
- }
-
- if (state.tokens.next.value === "=>") {
- return exprs;
- }
- if (!exprs.length) {
- return;
- }
- if (exprs.length > 1) {
- ret = Object.create(state.syntax[","]);
- ret.exprs = exprs;
- } else {
- ret = exprs[0];
- }
- if (ret) {
- ret.paren = true;
- }
- return ret;
- });
-
- application("=>");
-
- infix("[", function (left, that) {
- nobreak(state.tokens.prev, state.tokens.curr);
- nospace();
- var e = expression(10), s;
- if (e && e.type === "(string)") {
- if (!state.option.evil && (e.value === "eval" || e.value === "execScript")) {
- warning("W061", that);
- }
-
- countMember(e.value);
- if (!state.option.sub && reg.identifier.test(e.value)) {
- s = state.syntax[e.value];
- if (!s || !isReserved(s)) {
- warning("W069", state.tokens.prev, e.value);
- }
- }
- }
- advance("]", that);
-
- if (e && e.value === "hasOwnProperty" && state.tokens.next.value === "=") {
- warning("W001");
- }
-
- nospace(state.tokens.prev, state.tokens.curr);
- that.left = left;
- that.right = e;
- return that;
- }, 160, true);
-
- function comprehensiveArrayExpression() {
- var res = {};
- res.exps = true;
- funct["(comparray)"].stack();
-
- res.right = expression(10);
- advance("for");
- if (state.tokens.next.value === "each") {
- advance("each");
- if (!state.option.inMoz(true)) {
- warning("W118", state.tokens.curr, "for each");
- }
- }
- advance("(");
- funct["(comparray)"].setState("define");
- res.left = expression(10);
- advance(")");
- if (state.tokens.next.value === "if") {
- advance("if");
- advance("(");
- funct["(comparray)"].setState("filter");
- res.filter = expression(10);
- advance(")");
- }
- advance("]");
- funct["(comparray)"].unstack();
- return res;
- }
-
- prefix("[", function () {
- var blocktype = lookupBlockType(true);
- if (blocktype.isCompArray) {
- if (!state.option.inMoz(true)) {
- warning("W118", state.tokens.curr, "array comprehension");
- }
- return comprehensiveArrayExpression();
- } else if (blocktype.isDestAssign && !state.option.inESNext()) {
- warning("W104", state.tokens.curr, "destructuring assignment");
- }
- var b = state.tokens.curr.line !== state.tokens.next.line;
- this.first = [];
- if (b) {
- indent += state.option.indent;
- if (state.tokens.next.from === indent + state.option.indent) {
- indent += state.option.indent;
- }
- }
- while (state.tokens.next.id !== "(end)") {
- while (state.tokens.next.id === ",") {
- if (!state.option.inES5())
- warning("W070");
- advance(",");
- }
- if (state.tokens.next.id === "]") {
- break;
- }
- if (b && state.tokens.curr.line !== state.tokens.next.line) {
- indentation();
- }
- this.first.push(expression(10));
- if (state.tokens.next.id === ",") {
- comma({ allowTrailing: true });
- if (state.tokens.next.id === "]" && !state.option.inES5(true)) {
- warning("W070", state.tokens.curr);
- break;
- }
- } else {
- break;
- }
- }
- if (b) {
- indent -= state.option.indent;
- indentation();
- }
- advance("]", this);
- return this;
- }, 160);
-
-
- function property_name() {
- var id = optionalidentifier(false, true);
-
- if (!id) {
- if (state.tokens.next.id === "(string)") {
- id = state.tokens.next.value;
- advance();
- } else if (state.tokens.next.id === "(number)") {
- id = state.tokens.next.value.toString();
- advance();
- }
- }
-
- if (id === "hasOwnProperty") {
- warning("W001");
- }
-
- return id;
- }
-
-
- function functionparams(parsed) {
- var curr, next;
- var params = [];
- var ident;
- var tokens = [];
- var t;
- var pastDefault = false;
-
- if (parsed) {
- if (parsed instanceof Array) {
- for (var i in parsed) {
- curr = parsed[i];
- if (_.contains(["{", "["], curr.id)) {
- for (t in curr.left) {
- t = tokens[t];
- if (t.id) {
- params.push(t.id);
- addlabel(t.id, "unused", t.token);
- }
- }
- } else if (curr.value === "...") {
- if (!state.option.inESNext()) {
- warning("W104", curr, "spread/rest operator");
- }
- continue;
- } else {
- addlabel(curr.value, "unused", curr);
- }
- }
- return params;
- } else {
- if (parsed.identifier === true) {
- addlabel(parsed.value, "unused", parsed);
- return [parsed];
- }
- }
- }
-
- next = state.tokens.next;
-
- advance("(");
- nospace();
-
- if (state.tokens.next.id === ")") {
- advance(")");
- return;
- }
-
- for (;;) {
- if (_.contains(["{", "["], state.tokens.next.id)) {
- tokens = destructuringExpression();
- for (t in tokens) {
- t = tokens[t];
- if (t.id) {
- params.push(t.id);
- addlabel(t.id, "unused", t.token);
- }
- }
- } else if (state.tokens.next.value === "...") {
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.next, "spread/rest operator");
- }
- advance("...");
- nospace();
- ident = identifier(true);
- params.push(ident);
- addlabel(ident, "unused", state.tokens.curr);
- } else {
- ident = identifier(true);
- params.push(ident);
- addlabel(ident, "unused", state.tokens.curr);
- }
- if (pastDefault) {
- if (state.tokens.next.id !== "=") {
- error("E051", state.tokens.current);
- }
- }
- if (state.tokens.next.id === "=") {
- if (!state.option.inESNext()) {
- warning("W119", state.tokens.next, "default parameters");
- }
- advance("=");
- pastDefault = true;
- expression(10);
- }
- if (state.tokens.next.id === ",") {
- comma();
- } else {
- advance(")", next);
- nospace(state.tokens.prev, state.tokens.curr);
- return params;
- }
- }
- }
-
-
- function doFunction(name, statement, generator, fatarrowparams) {
- var f;
- var oldOption = state.option;
- var oldIgnored = state.ignored;
- var oldScope = scope;
-
- state.option = Object.create(state.option);
- state.ignored = Object.create(state.ignored);
- scope = Object.create(scope);
-
- funct = {
- "(name)" : name || "\"" + anonname + "\"",
- "(line)" : state.tokens.next.line,
- "(character)" : state.tokens.next.character,
- "(context)" : funct,
- "(breakage)" : 0,
- "(loopage)" : 0,
- "(metrics)" : createMetrics(state.tokens.next),
- "(scope)" : scope,
- "(statement)" : statement,
- "(tokens)" : {},
- "(blockscope)": funct["(blockscope)"],
- "(comparray)" : funct["(comparray)"]
- };
-
- if (generator) {
- funct["(generator)"] = true;
- }
-
- f = funct;
- state.tokens.curr.funct = funct;
-
- functions.push(funct);
-
- if (name) {
- addlabel(name, "function");
- }
-
- funct["(params)"] = functionparams(fatarrowparams);
-
- funct["(metrics)"].verifyMaxParametersPerFunction(funct["(params)"]);
-
- block(false, true, true, fatarrowparams ? true:false);
-
- if (generator && funct["(generator)"] !== "yielded") {
- error("E047", state.tokens.curr);
- }
-
- funct["(metrics)"].verifyMaxStatementsPerFunction();
- funct["(metrics)"].verifyMaxComplexityPerFunction();
- funct["(unusedOption)"] = state.option.unused;
-
- scope = oldScope;
- state.option = oldOption;
- state.ignored = oldIgnored;
- funct["(last)"] = state.tokens.curr.line;
- funct["(lastcharacter)"] = state.tokens.curr.character;
- funct = funct["(context)"];
-
- return f;
- }
-
- function createMetrics(functionStartToken) {
- return {
- statementCount: 0,
- nestedBlockDepth: -1,
- ComplexityCount: 1,
- verifyMaxStatementsPerFunction: function () {
- if (state.option.maxstatements &&
- this.statementCount > state.option.maxstatements) {
- warning("W071", functionStartToken, this.statementCount);
- }
- },
-
- verifyMaxParametersPerFunction: function (params) {
- params = params || [];
-
- if (state.option.maxparams && params.length > state.option.maxparams) {
- warning("W072", functionStartToken, params.length);
- }
- },
-
- verifyMaxNestedBlockDepthPerFunction: function () {
- if (state.option.maxdepth &&
- this.nestedBlockDepth > 0 &&
- this.nestedBlockDepth === state.option.maxdepth + 1) {
- warning("W073", null, this.nestedBlockDepth);
- }
- },
-
- verifyMaxComplexityPerFunction: function () {
- var max = state.option.maxcomplexity;
- var cc = this.ComplexityCount;
- if (max && cc > max) {
- warning("W074", functionStartToken, cc);
- }
- }
- };
- }
-
- function increaseComplexityCount() {
- funct["(metrics)"].ComplexityCount += 1;
- }
-
- function checkCondAssignment(expr) {
- var id, paren;
- if (expr) {
- id = expr.id;
- paren = expr.paren;
- if (id === "," && (expr = expr.exprs[expr.exprs.length - 1])) {
- id = expr.id;
- paren = paren || expr.paren;
- }
- }
- switch (id) {
- case "=":
- case "+=":
- case "-=":
- case "*=":
- case "%=":
- case "&=":
- case "|=":
- case "^=":
- case "/=":
- if (!paren && !state.option.boss) {
- warning("W084");
- }
- }
- }
-
-
- (function (x) {
- x.nud = function (isclassdef) {
- var b, f, i, p, t, g;
- var props = {}; // All properties, including accessors
- var tag = "";
-
- function saveProperty(name, tkn) {
- if (props[name] && _.has(props, name))
- warning("W075", state.tokens.next, i);
- else
- props[name] = {};
-
- props[name].basic = true;
- props[name].basictkn = tkn;
- }
-
- function saveSetter(name, tkn) {
- if (props[name] && _.has(props, name)) {
- if (props[name].basic || props[name].setter)
- warning("W075", state.tokens.next, i);
- } else {
- props[name] = {};
- }
-
- props[name].setter = true;
- props[name].setterToken = tkn;
- }
-
- function saveGetter(name) {
- if (props[name] && _.has(props, name)) {
- if (props[name].basic || props[name].getter)
- warning("W075", state.tokens.next, i);
- } else {
- props[name] = {};
- }
-
- props[name].getter = true;
- props[name].getterToken = state.tokens.curr;
- }
-
- b = state.tokens.curr.line !== state.tokens.next.line;
- if (b) {
- indent += state.option.indent;
- if (state.tokens.next.from === indent + state.option.indent) {
- indent += state.option.indent;
- }
- }
-
- for (;;) {
- if (state.tokens.next.id === "}") {
- break;
- }
-
- if (b) {
- indentation();
- }
-
- if (isclassdef && state.tokens.next.value === "static") {
- advance("static");
- tag = "static ";
- }
-
- if (state.tokens.next.value === "get" && peek().id !== ":") {
- advance("get");
-
- if (!state.option.inES5(!isclassdef)) {
- error("E034");
- }
-
- i = property_name();
- if (!i) {
- error("E035");
- }
- if (isclassdef && i === "constructor") {
- error("E049", state.tokens.next, "class getter method", i);
- }
-
- saveGetter(tag + i);
- t = state.tokens.next;
- adjacent(state.tokens.curr, state.tokens.next);
- f = doFunction();
- p = f["(params)"];
-
- if (p) {
- warning("W076", t, p[0], i);
- }
-
- adjacent(state.tokens.curr, state.tokens.next);
- } else if (state.tokens.next.value === "set" && peek().id !== ":") {
- advance("set");
-
- if (!state.option.inES5(!isclassdef)) {
- error("E034");
- }
-
- i = property_name();
- if (!i) {
- error("E035");
- }
- if (isclassdef && i === "constructor") {
- error("E049", state.tokens.next, "class setter method", i);
- }
-
- saveSetter(tag + i, state.tokens.next);
- t = state.tokens.next;
- adjacent(state.tokens.curr, state.tokens.next);
- f = doFunction();
- p = f["(params)"];
-
- if (!p || p.length !== 1) {
- warning("W077", t, i);
- }
- } else {
- g = false;
- if (state.tokens.next.value === "*" && state.tokens.next.type === "(punctuator)") {
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.next, "generator functions");
- }
- advance("*");
- g = true;
- }
- i = property_name();
- saveProperty(tag + i, state.tokens.next);
-
- if (typeof i !== "string") {
- break;
- }
-
- if (state.tokens.next.value === "(") {
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "concise methods");
- }
- doFunction(i, undefined, g);
- } else if (!isclassdef) {
- advance(":");
- nonadjacent(state.tokens.curr, state.tokens.next);
- expression(10);
- }
- }
- if (isclassdef && i === "prototype") {
- error("E049", state.tokens.next, "class method", i);
- }
-
- countMember(i);
- if (isclassdef) {
- tag = "";
- continue;
- }
- if (state.tokens.next.id === ",") {
- comma({ allowTrailing: true, property: true });
- if (state.tokens.next.id === ",") {
- warning("W070", state.tokens.curr);
- } else if (state.tokens.next.id === "}" && !state.option.inES5(true)) {
- warning("W070", state.tokens.curr);
- }
- } else {
- break;
- }
- }
- if (b) {
- indent -= state.option.indent;
- indentation();
- }
- advance("}", this);
- if (state.option.inES5()) {
- for (var name in props) {
- if (_.has(props, name) && props[name].setter && !props[name].getter) {
- warning("W078", props[name].setterToken);
- }
- }
- }
- return this;
- };
- x.fud = function () {
- error("E036", state.tokens.curr);
- };
- }(delim("{")));
-
- function destructuringExpression() {
- var id, ids;
- var identifiers = [];
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "destructuring expression");
- }
- var nextInnerDE = function () {
- var ident;
- if (_.contains(["[", "{"], state.tokens.next.value)) {
- ids = destructuringExpression();
- for (var id in ids) {
- id = ids[id];
- identifiers.push({ id: id.id, token: id.token });
- }
- } else if (state.tokens.next.value === ",") {
- identifiers.push({ id: null, token: state.tokens.curr });
- } else {
- ident = identifier();
- if (ident)
- identifiers.push({ id: ident, token: state.tokens.curr });
- }
- };
- if (state.tokens.next.value === "[") {
- advance("[");
- nextInnerDE();
- while (state.tokens.next.value !== "]") {
- advance(",");
- nextInnerDE();
- }
- advance("]");
- } else if (state.tokens.next.value === "{") {
- advance("{");
- id = identifier();
- if (state.tokens.next.value === ":") {
- advance(":");
- nextInnerDE();
- } else {
- identifiers.push({ id: id, token: state.tokens.curr });
- }
- while (state.tokens.next.value !== "}") {
- advance(",");
- id = identifier();
- if (state.tokens.next.value === ":") {
- advance(":");
- nextInnerDE();
- } else {
- identifiers.push({ id: id, token: state.tokens.curr });
- }
- }
- advance("}");
- }
- return identifiers;
- }
- function destructuringExpressionMatch(tokens, value) {
- if (value.first) {
- _.zip(tokens, value.first).forEach(function (val) {
- var token = val[0];
- var value = val[1];
- if (token && value) {
- token.first = value;
- } else if (token && token.first && !value) {
- warning("W080", token.first, token.first.value);
- } /* else {
- XXX value is discarded: wouldn't it need a warning ?
- } */
- });
- }
- }
-
- var conststatement = stmt("const", function (prefix) {
- var tokens, value;
- var lone;
-
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "const");
- }
-
- this.first = [];
- for (;;) {
- var names = [];
- nonadjacent(state.tokens.curr, state.tokens.next);
- if (_.contains(["{", "["], state.tokens.next.value)) {
- tokens = destructuringExpression();
- lone = false;
- } else {
- tokens = [ { id: identifier(), token: state.tokens.curr } ];
- lone = true;
- }
- for (var t in tokens) {
- t = tokens[t];
- if (funct[t.id] === "const") {
- warning("E011", null, t.id);
- }
- if (funct["(global)"] && predefined[t.id] === false) {
- warning("W079", t.token, t.id);
- }
- if (t.id) {
- addlabel(t.id, "const");
- names.push(t.token);
- }
- }
- if (prefix) {
- break;
- }
-
- this.first = this.first.concat(names);
-
- if (state.tokens.next.id !== "=") {
- warning("E012", state.tokens.curr, state.tokens.curr.value);
- }
-
- if (state.tokens.next.id === "=") {
- nonadjacent(state.tokens.curr, state.tokens.next);
- advance("=");
- nonadjacent(state.tokens.curr, state.tokens.next);
- if (state.tokens.next.id === "undefined") {
- warning("W080", state.tokens.prev, state.tokens.prev.value);
- }
- if (peek(0).id === "=" && state.tokens.next.identifier) {
- warning("W120", state.tokens.next, state.tokens.next.value);
- }
- value = expression(10);
- if (lone) {
- tokens[0].first = value;
- } else {
- destructuringExpressionMatch(names, value);
- }
- }
-
- if (state.tokens.next.id !== ",") {
- break;
- }
- comma();
- }
- return this;
- });
- conststatement.exps = true;
- var varstatement = stmt("var", function (prefix) {
- var tokens, lone, value;
-
- if (funct["(onevar)"] && state.option.onevar) {
- warning("W081");
- } else if (!funct["(global)"]) {
- funct["(onevar)"] = true;
- }
-
- this.first = [];
- for (;;) {
- var names = [];
- nonadjacent(state.tokens.curr, state.tokens.next);
- if (_.contains(["{", "["], state.tokens.next.value)) {
- tokens = destructuringExpression();
- lone = false;
- } else {
- tokens = [ { id: identifier(), token: state.tokens.curr } ];
- lone = true;
- }
- for (var t in tokens) {
- t = tokens[t];
- if (state.option.inESNext() && funct[t.id] === "const") {
- warning("E011", null, t.id);
- }
- if (funct["(global)"] && predefined[t.id] === false) {
- warning("W079", t.token, t.id);
- }
- if (t.id) {
- addlabel(t.id, "unused", t.token);
- names.push(t.token);
- }
- }
- if (prefix) {
- break;
- }
-
- this.first = this.first.concat(names);
-
- if (state.tokens.next.id === "=") {
- nonadjacent(state.tokens.curr, state.tokens.next);
- advance("=");
- nonadjacent(state.tokens.curr, state.tokens.next);
- if (state.tokens.next.id === "undefined") {
- warning("W080", state.tokens.prev, state.tokens.prev.value);
- }
- if (peek(0).id === "=" && state.tokens.next.identifier) {
- warning("W120", state.tokens.next, state.tokens.next.value);
- }
- value = expression(10);
- if (lone) {
- tokens[0].first = value;
- } else {
- destructuringExpressionMatch(names, value);
- }
- }
-
- if (state.tokens.next.id !== ",") {
- break;
- }
- comma();
- }
- return this;
- });
- varstatement.exps = true;
- var letstatement = stmt("let", function (prefix) {
- var tokens, lone, value, letblock;
-
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "let");
- }
-
- if (state.tokens.next.value === "(") {
- if (!state.option.inMoz(true)) {
- warning("W118", state.tokens.next, "let block");
- }
- advance("(");
- funct["(blockscope)"].stack();
- letblock = true;
- } else if (funct["(nolet)"]) {
- error("E048", state.tokens.curr);
- }
-
- if (funct["(onevar)"] && state.option.onevar) {
- warning("W081");
- } else if (!funct["(global)"]) {
- funct["(onevar)"] = true;
- }
-
- this.first = [];
- for (;;) {
- var names = [];
- nonadjacent(state.tokens.curr, state.tokens.next);
- if (_.contains(["{", "["], state.tokens.next.value)) {
- tokens = destructuringExpression();
- lone = false;
- } else {
- tokens = [ { id: identifier(), token: state.tokens.curr.value } ];
- lone = true;
- }
- for (var t in tokens) {
- t = tokens[t];
- if (state.option.inESNext() && funct[t.id] === "const") {
- warning("E011", null, t.id);
- }
- if (funct["(global)"] && predefined[t.id] === false) {
- warning("W079", t.token, t.id);
- }
- if (t.id && !funct["(nolet)"]) {
- addlabel(t.id, "unused", t.token, true);
- names.push(t.token);
- }
- }
- if (prefix) {
- break;
- }
-
- this.first = this.first.concat(names);
-
- if (state.tokens.next.id === "=") {
- nonadjacent(state.tokens.curr, state.tokens.next);
- advance("=");
- nonadjacent(state.tokens.curr, state.tokens.next);
- if (state.tokens.next.id === "undefined") {
- warning("W080", state.tokens.prev, state.tokens.prev.value);
- }
- if (peek(0).id === "=" && state.tokens.next.identifier) {
- warning("W120", state.tokens.next, state.tokens.next.value);
- }
- value = expression(10);
- if (lone) {
- tokens[0].first = value;
- } else {
- destructuringExpressionMatch(names, value);
- }
- }
-
- if (state.tokens.next.id !== ",") {
- break;
- }
- comma();
- }
- if (letblock) {
- advance(")");
- block(true, true);
- this.block = true;
- funct["(blockscope)"].unstack();
- }
-
- return this;
- });
- letstatement.exps = true;
-
- blockstmt("class", function () {
- return classdef.call(this, true);
- });
-
- function classdef(stmt) {
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "class");
- }
- if (stmt) {
- this.name = identifier();
- addlabel(this.name, "unused", state.tokens.curr);
- } else if (state.tokens.next.identifier && state.tokens.next.value !== "extends") {
- this.name = identifier();
- }
- classtail(this);
- return this;
- }
-
- function classtail(c) {
- var strictness = state.directive["use strict"];
- if (state.tokens.next.value === "extends") {
- advance("extends");
- c.heritage = expression(10);
- }
- state.directive["use strict"] = true;
- advance("{");
- c.body = state.syntax["{"].nud(true);
- state.directive["use strict"] = strictness;
- }
-
- blockstmt("function", function () {
- var generator = false;
- if (state.tokens.next.value === "*") {
- advance("*");
- if (state.option.inESNext(true)) {
- generator = true;
- } else {
- warning("W119", state.tokens.curr, "function*");
- }
- }
- if (inblock) {
- warning("W082", state.tokens.curr);
-
- }
- var i = identifier();
- if (funct[i] === "const") {
- warning("E011", null, i);
- }
- adjacent(state.tokens.curr, state.tokens.next);
- addlabel(i, "unction", state.tokens.curr);
-
- doFunction(i, { statement: true }, generator);
- if (state.tokens.next.id === "(" && state.tokens.next.line === state.tokens.curr.line) {
- error("E039");
- }
- return this;
- });
-
- prefix("function", function () {
- var generator = false;
- if (state.tokens.next.value === "*") {
- if (!state.option.inESNext()) {
- warning("W119", state.tokens.curr, "function*");
- }
- advance("*");
- generator = true;
- }
- var i = optionalidentifier();
- if (i || state.option.gcl) {
- adjacent(state.tokens.curr, state.tokens.next);
- } else {
- nonadjacent(state.tokens.curr, state.tokens.next);
- }
- doFunction(i, undefined, generator);
- if (!state.option.loopfunc && funct["(loopage)"]) {
- warning("W083");
- }
- return this;
- });
-
- blockstmt("if", function () {
- var t = state.tokens.next;
- increaseComplexityCount();
- state.condition = true;
- advance("(");
- nonadjacent(this, t);
- nospace();
- checkCondAssignment(expression(0));
- advance(")", t);
- state.condition = false;
- nospace(state.tokens.prev, state.tokens.curr);
- block(true, true);
- if (state.tokens.next.id === "else") {
- nonadjacent(state.tokens.curr, state.tokens.next);
- advance("else");
- if (state.tokens.next.id === "if" || state.tokens.next.id === "switch") {
- statement(true);
- } else {
- block(true, true);
- }
- }
- return this;
- });
-
- blockstmt("try", function () {
- var b;
-
- function doCatch() {
- var oldScope = scope;
- var e;
-
- advance("catch");
- nonadjacent(state.tokens.curr, state.tokens.next);
- advance("(");
-
- scope = Object.create(oldScope);
-
- e = state.tokens.next.value;
- if (state.tokens.next.type !== "(identifier)") {
- e = null;
- warning("E030", state.tokens.next, e);
- }
-
- advance();
-
- funct = {
- "(name)" : "(catch)",
- "(line)" : state.tokens.next.line,
- "(character)": state.tokens.next.character,
- "(context)" : funct,
- "(breakage)" : funct["(breakage)"],
- "(loopage)" : funct["(loopage)"],
- "(scope)" : scope,
- "(statement)": false,
- "(metrics)" : createMetrics(state.tokens.next),
- "(catch)" : true,
- "(tokens)" : {},
- "(blockscope)": funct["(blockscope)"],
- "(comparray)": funct["(comparray)"]
- };
-
- if (e) {
- addlabel(e, "exception");
- }
-
- if (state.tokens.next.value === "if") {
- if (!state.option.inMoz(true)) {
- warning("W118", state.tokens.curr, "catch filter");
- }
- advance("if");
- expression(0);
- }
-
- advance(")");
-
- state.tokens.curr.funct = funct;
- functions.push(funct);
-
- block(false);
-
- scope = oldScope;
-
- funct["(last)"] = state.tokens.curr.line;
- funct["(lastcharacter)"] = state.tokens.curr.character;
- funct = funct["(context)"];
- }
-
- block(false);
-
- while (state.tokens.next.id === "catch") {
- increaseComplexityCount();
- if (b && (!state.option.inMoz(true))) {
- warning("W118", state.tokens.next, "multiple catch blocks");
- }
- doCatch();
- b = true;
- }
-
- if (state.tokens.next.id === "finally") {
- advance("finally");
- block(false);
- return;
- }
-
- if (!b) {
- error("E021", state.tokens.next, "catch", state.tokens.next.value);
- }
-
- return this;
- });
-
- blockstmt("while", function () {
- var t = state.tokens.next;
- funct["(breakage)"] += 1;
- funct["(loopage)"] += 1;
- increaseComplexityCount();
- advance("(");
- nonadjacent(this, t);
- nospace();
- checkCondAssignment(expression(0));
- advance(")", t);
- nospace(state.tokens.prev, state.tokens.curr);
- block(true, true);
- funct["(breakage)"] -= 1;
- funct["(loopage)"] -= 1;
- return this;
- }).labelled = true;
-
- blockstmt("with", function () {
- var t = state.tokens.next;
- if (state.directive["use strict"]) {
- error("E010", state.tokens.curr);
- } else if (!state.option.withstmt) {
- warning("W085", state.tokens.curr);
- }
-
- advance("(");
- nonadjacent(this, t);
- nospace();
- expression(0);
- advance(")", t);
- nospace(state.tokens.prev, state.tokens.curr);
- block(true, true);
-
- return this;
- });
-
- blockstmt("switch", function () {
- var t = state.tokens.next,
- g = false;
- funct["(breakage)"] += 1;
- advance("(");
- nonadjacent(this, t);
- nospace();
- checkCondAssignment(expression(0));
- advance(")", t);
- nospace(state.tokens.prev, state.tokens.curr);
- nonadjacent(state.tokens.curr, state.tokens.next);
- t = state.tokens.next;
- advance("{");
- nonadjacent(state.tokens.curr, state.tokens.next);
- indent += state.option.indent;
- this.cases = [];
-
- for (;;) {
- switch (state.tokens.next.id) {
- case "case":
- switch (funct["(verb)"]) {
- case "yield":
- case "break":
- case "case":
- case "continue":
- case "return":
- case "switch":
- case "throw":
- break;
- default:
- if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) {
- warning("W086", state.tokens.curr, "case");
- }
- }
- indentation(-state.option.indent);
- advance("case");
- this.cases.push(expression(20));
- increaseComplexityCount();
- g = true;
- advance(":");
- funct["(verb)"] = "case";
- break;
- case "default":
- switch (funct["(verb)"]) {
- case "yield":
- case "break":
- case "continue":
- case "return":
- case "throw":
- break;
- default:
- if (this.cases.length) {
- if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) {
- warning("W086", state.tokens.curr, "default");
- }
- }
- }
- indentation(-state.option.indent);
- advance("default");
- g = true;
- advance(":");
- break;
- case "}":
- indent -= state.option.indent;
- indentation();
- advance("}", t);
- funct["(breakage)"] -= 1;
- funct["(verb)"] = undefined;
- return;
- case "(end)":
- error("E023", state.tokens.next, "}");
- return;
- default:
- if (g) {
- switch (state.tokens.curr.id) {
- case ",":
- error("E040");
- return;
- case ":":
- g = false;
- statements();
- break;
- default:
- error("E025", state.tokens.curr);
- return;
- }
- } else {
- if (state.tokens.curr.id === ":") {
- advance(":");
- error("E024", state.tokens.curr, ":");
- statements();
- } else {
- error("E021", state.tokens.next, "case", state.tokens.next.value);
- return;
- }
- }
- }
- }
- }).labelled = true;
-
- stmt("debugger", function () {
- if (!state.option.debug) {
- warning("W087");
- }
- return this;
- }).exps = true;
-
- (function () {
- var x = stmt("do", function () {
- funct["(breakage)"] += 1;
- funct["(loopage)"] += 1;
- increaseComplexityCount();
-
- this.first = block(true, true);
- advance("while");
- var t = state.tokens.next;
- nonadjacent(state.tokens.curr, t);
- advance("(");
- nospace();
- checkCondAssignment(expression(0));
- advance(")", t);
- nospace(state.tokens.prev, state.tokens.curr);
- funct["(breakage)"] -= 1;
- funct["(loopage)"] -= 1;
- return this;
- });
- x.labelled = true;
- x.exps = true;
- }());
-
- blockstmt("for", function () {
- var s, t = state.tokens.next;
- var letscope = false;
- var foreachtok = null;
-
- if (t.value === "each") {
- foreachtok = t;
- advance("each");
- if (!state.option.inMoz(true)) {
- warning("W118", state.tokens.curr, "for each");
- }
- }
-
- funct["(breakage)"] += 1;
- funct["(loopage)"] += 1;
- increaseComplexityCount();
- advance("(");
- nonadjacent(this, t);
- nospace();
- var nextop; // contains the token of the "in" or "of" operator
- var i = 0;
- var inof = ["in", "of"];
- do {
- nextop = peek(i);
- ++i;
- } while (!_.contains(inof, nextop.value) && nextop.value !== ";" &&
- nextop.type !== "(end)");
- if (_.contains(inof, nextop.value)) {
- if (!state.option.inESNext() && nextop.value === "of") {
- error("W104", nextop, "for of");
- }
- if (state.tokens.next.id === "var") {
- advance("var");
- state.syntax["var"].fud.call(state.syntax["var"].fud, true);
- } else if (state.tokens.next.id === "let") {
- advance("let");
- letscope = true;
- funct["(blockscope)"].stack();
- state.syntax["let"].fud.call(state.syntax["let"].fud, true);
- } else {
- switch (funct[state.tokens.next.value]) {
- case "unused":
- funct[state.tokens.next.value] = "var";
- break;
- case "var":
- break;
- default:
- if (!funct["(blockscope)"].getlabel(state.tokens.next.value))
- warning("W088", state.tokens.next, state.tokens.next.value);
- }
- advance();
- }
- advance(nextop.value);
- expression(20);
- advance(")", t);
- s = block(true, true);
- if (state.option.forin && s && (s.length > 1 || typeof s[0] !== "object" ||
- s[0].value !== "if")) {
- warning("W089", this);
- }
- funct["(breakage)"] -= 1;
- funct["(loopage)"] -= 1;
- } else {
- if (foreachtok) {
- error("E045", foreachtok);
- }
- if (state.tokens.next.id !== ";") {
- if (state.tokens.next.id === "var") {
- advance("var");
- state.syntax["var"].fud.call(state.syntax["var"].fud);
- } else if (state.tokens.next.id === "let") {
- advance("let");
- letscope = true;
- funct["(blockscope)"].stack();
- state.syntax["let"].fud.call(state.syntax["let"].fud);
- } else {
- for (;;) {
- expression(0, "for");
- if (state.tokens.next.id !== ",") {
- break;
- }
- comma();
- }
- }
- }
- nolinebreak(state.tokens.curr);
- advance(";");
- if (state.tokens.next.id !== ";") {
- checkCondAssignment(expression(0));
- }
- nolinebreak(state.tokens.curr);
- advance(";");
- if (state.tokens.next.id === ";") {
- error("E021", state.tokens.next, ")", ";");
- }
- if (state.tokens.next.id !== ")") {
- for (;;) {
- expression(0, "for");
- if (state.tokens.next.id !== ",") {
- break;
- }
- comma();
- }
- }
- advance(")", t);
- nospace(state.tokens.prev, state.tokens.curr);
- block(true, true);
- funct["(breakage)"] -= 1;
- funct["(loopage)"] -= 1;
-
- }
- if (letscope) {
- funct["(blockscope)"].unstack();
- }
- return this;
- }).labelled = true;
-
-
- stmt("break", function () {
- var v = state.tokens.next.value;
-
- if (funct["(breakage)"] === 0)
- warning("W052", state.tokens.next, this.value);
-
- if (!state.option.asi)
- nolinebreak(this);
-
- if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
- if (state.tokens.curr.line === state.tokens.next.line) {
- if (funct[v] !== "label") {
- warning("W090", state.tokens.next, v);
- } else if (scope[v] !== funct) {
- warning("W091", state.tokens.next, v);
- }
- this.first = state.tokens.next;
- advance();
- }
- }
- reachable("break");
- return this;
- }).exps = true;
-
-
- stmt("continue", function () {
- var v = state.tokens.next.value;
-
- if (funct["(breakage)"] === 0)
- warning("W052", state.tokens.next, this.value);
-
- if (!state.option.asi)
- nolinebreak(this);
-
- if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
- if (state.tokens.curr.line === state.tokens.next.line) {
- if (funct[v] !== "label") {
- warning("W090", state.tokens.next, v);
- } else if (scope[v] !== funct) {
- warning("W091", state.tokens.next, v);
- }
- this.first = state.tokens.next;
- advance();
- }
- } else if (!funct["(loopage)"]) {
- warning("W052", state.tokens.next, this.value);
- }
- reachable("continue");
- return this;
- }).exps = true;
-
-
- stmt("return", function () {
- if (this.line === state.tokens.next.line) {
- if (state.tokens.next.id === "(regexp)")
- warning("W092");
-
- if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
- nonadjacent(state.tokens.curr, state.tokens.next);
- this.first = expression(0);
-
- if (this.first &&
- this.first.type === "(punctuator)" && this.first.value === "=" && !state.option.boss) {
- warningAt("W093", this.first.line, this.first.character);
- }
- }
- } else {
- if (state.tokens.next.type === "(punctuator)" &&
- ["[", "{", "+", "-"].indexOf(state.tokens.next.value) > -1) {
- nolinebreak(this); // always warn (Line breaking error)
- }
- }
- reachable("return");
- return this;
- }).exps = true;
-
- (function (x) {
- x.exps = true;
- x.lbp = 25;
- }(prefix("yield", function () {
- var prev = state.tokens.prev;
- if (state.option.inESNext(true) && !funct["(generator)"]) {
- error("E046", state.tokens.curr, "yield");
- } else if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "yield");
- }
- funct["(generator)"] = "yielded";
- if (this.line === state.tokens.next.line || !state.option.inMoz(true)) {
- if (state.tokens.next.id === "(regexp)")
- warning("W092");
-
- if (state.tokens.next.id !== ";" && !state.tokens.next.reach && state.tokens.next.nud) {
- nobreaknonadjacent(state.tokens.curr, state.tokens.next);
- this.first = expression(10);
-
- if (this.first.type === "(punctuator)" && this.first.value === "=" && !state.option.boss) {
- warningAt("W093", this.first.line, this.first.character);
- }
- }
-
- if (state.option.inMoz(true) && state.tokens.next.id !== ")" &&
- (prev.lbp > 30 || (!prev.assign && !isEndOfExpr()) || prev.id === "yield")) {
- error("E050", this);
- }
- } else if (!state.option.asi) {
- nolinebreak(this); // always warn (Line breaking error)
- }
- return this;
- })));
-
-
- stmt("throw", function () {
- nolinebreak(this);
- nonadjacent(state.tokens.curr, state.tokens.next);
- this.first = expression(20);
- reachable("throw");
- return this;
- }).exps = true;
-
- stmt("import", function () {
- if (!state.option.inESNext()) {
- warning("W119", state.tokens.curr, "import");
- }
-
- if (state.tokens.next.identifier) {
- this.name = identifier();
- addlabel(this.name, "unused", state.tokens.curr);
- } else {
- advance("{");
- for (;;) {
- var importName;
- if (state.tokens.next.type === "default") {
- importName = "default";
- advance("default");
- } else {
- importName = identifier();
- }
- if (state.tokens.next.value === "as") {
- advance("as");
- importName = identifier();
- }
- addlabel(importName, "unused", state.tokens.curr);
-
- if (state.tokens.next.value === ",") {
- advance(",");
- } else if (state.tokens.next.value === "}") {
- advance("}");
- break;
- } else {
- error("E024", state.tokens.next, state.tokens.next.value);
- break;
- }
- }
- }
-
- advance("from");
- advance("(string)");
- return this;
- }).exps = true;
-
- stmt("export", function () {
- if (!state.option.inESNext()) {
- warning("W119", state.tokens.curr, "export");
- }
-
- if (state.tokens.next.type === "default") {
- advance("default");
- if (state.tokens.next.id === "function" || state.tokens.next.id === "class") {
- this.block = true;
- }
- this.exportee = expression(10);
-
- return this;
- }
-
- if (state.tokens.next.value === "{") {
- advance("{");
- for (;;) {
- identifier();
-
- if (state.tokens.next.value === ",") {
- advance(",");
- } else if (state.tokens.next.value === "}") {
- advance("}");
- break;
- } else {
- error("E024", state.tokens.next, state.tokens.next.value);
- break;
- }
- }
- return this;
- }
-
- if (state.tokens.next.id === "var") {
- advance("var");
- state.syntax["var"].fud.call(state.syntax["var"].fud);
- } else if (state.tokens.next.id === "let") {
- advance("let");
- state.syntax["let"].fud.call(state.syntax["let"].fud);
- } else if (state.tokens.next.id === "const") {
- advance("const");
- state.syntax["const"].fud.call(state.syntax["const"].fud);
- } else if (state.tokens.next.id === "function") {
- this.block = true;
- advance("function");
- state.syntax["function"].fud();
- } else if (state.tokens.next.id === "class") {
- this.block = true;
- advance("class");
- state.syntax["class"].fud();
- } else {
- error("E024", state.tokens.next, state.tokens.next.value);
- }
-
- return this;
- }).exps = true;
-
- FutureReservedWord("abstract");
- FutureReservedWord("boolean");
- FutureReservedWord("byte");
- FutureReservedWord("char");
- FutureReservedWord("class", { es5: true, nud: classdef });
- FutureReservedWord("double");
- FutureReservedWord("enum", { es5: true });
- FutureReservedWord("export", { es5: true });
- FutureReservedWord("extends", { es5: true });
- FutureReservedWord("final");
- FutureReservedWord("float");
- FutureReservedWord("goto");
- FutureReservedWord("implements", { es5: true, strictOnly: true });
- FutureReservedWord("import", { es5: true });
- FutureReservedWord("int");
- FutureReservedWord("interface", { es5: true, strictOnly: true });
- FutureReservedWord("long");
- FutureReservedWord("native");
- FutureReservedWord("package", { es5: true, strictOnly: true });
- FutureReservedWord("private", { es5: true, strictOnly: true });
- FutureReservedWord("protected", { es5: true, strictOnly: true });
- FutureReservedWord("public", { es5: true, strictOnly: true });
- FutureReservedWord("short");
- FutureReservedWord("static", { es5: true, strictOnly: true });
- FutureReservedWord("super", { es5: true });
- FutureReservedWord("synchronized");
- FutureReservedWord("throws");
- FutureReservedWord("transient");
- FutureReservedWord("volatile");
-
- var lookupBlockType = function () {
- var pn, pn1;
- var i = 0;
- var bracketStack = 0;
- var ret = {};
- if (_.contains(["[", "{"], state.tokens.curr.value))
- bracketStack += 1;
- if (_.contains(["[", "{"], state.tokens.next.value))
- bracketStack += 1;
- if (_.contains(["]", "}"], state.tokens.next.value))
- bracketStack -= 1;
- do {
- pn = peek(i);
- pn1 = peek(i + 1);
- i = i + 1;
- if (_.contains(["[", "{"], pn.value)) {
- bracketStack += 1;
- } else if (_.contains(["]", "}"], pn.value)) {
- bracketStack -= 1;
- }
- if (pn.identifier && pn.value === "for" && bracketStack === 1) {
- ret.isCompArray = true;
- ret.notJson = true;
- break;
- }
- if (_.contains(["}", "]"], pn.value) && pn1.value === "=") {
- ret.isDestAssign = true;
- ret.notJson = true;
- break;
- }
- if (pn.value === ";") {
- ret.isBlock = true;
- ret.notJson = true;
- }
- } while (bracketStack > 0 && pn.id !== "(end)" && i < 15);
- return ret;
- };
- function destructuringAssignOrJsonValue() {
-
- var block = lookupBlockType();
- if (block.notJson) {
- if (!state.option.inESNext() && block.isDestAssign) {
- warning("W104", state.tokens.curr, "destructuring assignment");
- }
- statements();
- } else {
- state.option.laxbreak = true;
- state.jsonMode = true;
- jsonValue();
- }
- }
-
- var arrayComprehension = function () {
- var CompArray = function () {
- this.mode = "use";
- this.variables = [];
- };
- var _carrays = [];
- var _current;
- function declare(v) {
- var l = _current.variables.filter(function (elt) {
- if (elt.value === v) {
- elt.undef = false;
- return v;
- }
- }).length;
- return l !== 0;
- }
- function use(v) {
- var l = _current.variables.filter(function (elt) {
- if (elt.value === v && !elt.undef) {
- if (elt.unused === true) {
- elt.unused = false;
- }
- return v;
- }
- }).length;
- return (l === 0);
- }
- return {stack: function () {
- _current = new CompArray();
- _carrays.push(_current);
- },
- unstack: function () {
- _current.variables.filter(function (v) {
- if (v.unused)
- warning("W098", v.token, v.value);
- if (v.undef)
- isundef(v.funct, "W117", v.token, v.value);
- });
- _carrays.splice(_carrays[_carrays.length - 1], 1);
- _current = _carrays[_carrays.length - 1];
- },
- setState: function (s) {
- if (_.contains(["use", "define", "filter"], s))
- _current.mode = s;
- },
- check: function (v) {
- if (_current && _current.mode === "use") {
- _current.variables.push({funct: funct,
- token: state.tokens.curr,
- value: v,
- undef: true,
- unused: false});
- return true;
- } else if (_current && _current.mode === "define") {
- if (!declare(v)) {
- _current.variables.push({funct: funct,
- token: state.tokens.curr,
- value: v,
- undef: false,
- unused: true});
- }
- return true;
- } else if (_current && _current.mode === "filter") {
- if (use(v)) {
- isundef(funct, "W117", state.tokens.curr, v);
- }
- return true;
- }
- return false;
- }
- };
- };
-
- function jsonValue() {
-
- function jsonObject() {
- var o = {}, t = state.tokens.next;
- advance("{");
- if (state.tokens.next.id !== "}") {
- for (;;) {
- if (state.tokens.next.id === "(end)") {
- error("E026", state.tokens.next, t.line);
- } else if (state.tokens.next.id === "}") {
- warning("W094", state.tokens.curr);
- break;
- } else if (state.tokens.next.id === ",") {
- error("E028", state.tokens.next);
- } else if (state.tokens.next.id !== "(string)") {
- warning("W095", state.tokens.next, state.tokens.next.value);
- }
- if (o[state.tokens.next.value] === true) {
- warning("W075", state.tokens.next, state.tokens.next.value);
- } else if ((state.tokens.next.value === "__proto__" &&
- !state.option.proto) || (state.tokens.next.value === "__iterator__" &&
- !state.option.iterator)) {
- warning("W096", state.tokens.next, state.tokens.next.value);
- } else {
- o[state.tokens.next.value] = true;
- }
- advance();
- advance(":");
- jsonValue();
- if (state.tokens.next.id !== ",") {
- break;
- }
- advance(",");
- }
- }
- advance("}");
- }
-
- function jsonArray() {
- var t = state.tokens.next;
- advance("[");
- if (state.tokens.next.id !== "]") {
- for (;;) {
- if (state.tokens.next.id === "(end)") {
- error("E027", state.tokens.next, t.line);
- } else if (state.tokens.next.id === "]") {
- warning("W094", state.tokens.curr);
- break;
- } else if (state.tokens.next.id === ",") {
- error("E028", state.tokens.next);
- }
- jsonValue();
- if (state.tokens.next.id !== ",") {
- break;
- }
- advance(",");
- }
- }
- advance("]");
- }
-
- switch (state.tokens.next.id) {
- case "{":
- jsonObject();
- break;
- case "[":
- jsonArray();
- break;
- case "true":
- case "false":
- case "null":
- case "(number)":
- case "(string)":
- advance();
- break;
- case "-":
- advance("-");
- if (state.tokens.curr.character !== state.tokens.next.from) {
- warning("W011", state.tokens.curr);
- }
- adjacent(state.tokens.curr, state.tokens.next);
- advance("(number)");
- break;
- default:
- error("E003", state.tokens.next);
- }
- }
-
- var blockScope = function () {
- var _current = {};
- var _variables = [_current];
-
- function _checkBlockLabels() {
- for (var t in _current) {
- if (_current[t]["(type)"] === "unused") {
- if (state.option.unused) {
- var tkn = _current[t]["(token)"];
- var line = tkn.line;
- var chr = tkn.character;
- warningAt("W098", line, chr, t);
- }
- }
- }
- }
-
- return {
- stack: function () {
- _current = {};
- _variables.push(_current);
- },
-
- unstack: function () {
- _checkBlockLabels();
- _variables.splice(_variables.length - 1, 1);
- _current = _.last(_variables);
- },
-
- getlabel: function (l) {
- for (var i = _variables.length - 1 ; i >= 0; --i) {
- if (_.has(_variables[i], l)) {
- return _variables[i];
- }
- }
- },
-
- current: {
- has: function (t) {
- return _.has(_current, t);
- },
- add: function (t, type, tok) {
- _current[t] = { "(type)" : type,
- "(token)": tok };
- }
- }
- };
- };
- var itself = function (s, o, g) {
- var i, k, x;
- var optionKeys;
- var newOptionObj = {};
- var newIgnoredObj = {};
-
- state.reset();
-
- if (o && o.scope) {
- JSHINT.scope = o.scope;
- } else {
- JSHINT.errors = [];
- JSHINT.undefs = [];
- JSHINT.internals = [];
- JSHINT.blacklist = {};
- JSHINT.scope = "(main)";
- }
-
- predefined = Object.create(null);
- combine(predefined, vars.ecmaIdentifiers);
- combine(predefined, vars.reservedVars);
-
- combine(predefined, g || {});
-
- declared = Object.create(null);
- exported = Object.create(null);
-
- function each(obj, cb) {
- if (!obj)
- return;
-
- if (!Array.isArray(obj) && typeof obj === "object")
- obj = Object.keys(obj);
-
- obj.forEach(cb);
- }
-
- if (o) {
- each(o.predef || null, function (item) {
- var slice, prop;
-
- if (item[0] === "-") {
- slice = item.slice(1);
- JSHINT.blacklist[slice] = slice;
- } else {
- prop = Object.getOwnPropertyDescriptor(o.predef, item);
- predefined[item] = prop ? prop.value : false;
- }
- });
-
- each(o.exported || null, function (item) {
- exported[item] = true;
- });
-
- delete o.predef;
- delete o.exported;
-
- optionKeys = Object.keys(o);
- for (x = 0; x < optionKeys.length; x++) {
- if (/^-W\d{3}$/g.test(optionKeys[x])) {
- newIgnoredObj[optionKeys[x].slice(1)] = true;
- } else {
- newOptionObj[optionKeys[x]] = o[optionKeys[x]];
-
- if (optionKeys[x] === "newcap" && o[optionKeys[x]] === false)
- newOptionObj["(explicitNewcap)"] = true;
-
- if (optionKeys[x] === "indent")
- newOptionObj["(explicitIndent)"] = o[optionKeys[x]] === false ? false : true;
- }
- }
- }
-
- state.option = newOptionObj;
- state.ignored = newIgnoredObj;
-
- state.option.indent = state.option.indent || 4;
- state.option.maxerr = state.option.maxerr || 50;
-
- indent = 1;
- global = Object.create(predefined);
- scope = global;
- funct = {
- "(global)": true,
- "(name)": "(global)",
- "(scope)": scope,
- "(breakage)": 0,
- "(loopage)": 0,
- "(tokens)": {},
- "(metrics)": createMetrics(state.tokens.next),
- "(blockscope)": blockScope(),
- "(comparray)": arrayComprehension()
- };
- functions = [funct];
- urls = [];
- stack = null;
- member = {};
- membersOnly = null;
- implied = {};
- inblock = false;
- lookahead = [];
- warnings = 0;
- unuseds = [];
-
- if (!isString(s) && !Array.isArray(s)) {
- errorAt("E004", 0);
- return false;
- }
-
- api = {
- get isJSON() {
- return state.jsonMode;
- },
-
- getOption: function (name) {
- return state.option[name] || null;
- },
-
- getCache: function (name) {
- return state.cache[name];
- },
-
- setCache: function (name, value) {
- state.cache[name] = value;
- },
-
- warn: function (code, data) {
- warningAt.apply(null, [ code, data.line, data.char ].concat(data.data));
- },
-
- on: function (names, listener) {
- names.split(" ").forEach(function (name) {
- emitter.on(name, listener);
- }.bind(this));
- }
- };
-
- emitter.removeAllListeners();
- (extraModules || []).forEach(function (func) {
- func(api);
- });
-
- state.tokens.prev = state.tokens.curr = state.tokens.next = state.syntax["(begin)"];
-
- lex = new Lexer(s);
-
- lex.on("warning", function (ev) {
- warningAt.apply(null, [ ev.code, ev.line, ev.character].concat(ev.data));
- });
-
- lex.on("error", function (ev) {
- errorAt.apply(null, [ ev.code, ev.line, ev.character ].concat(ev.data));
- });
-
- lex.on("fatal", function (ev) {
- quit("E041", ev.line, ev.from);
- });
-
- lex.on("Identifier", function (ev) {
- emitter.emit("Identifier", ev);
- });
-
- lex.on("String", function (ev) {
- emitter.emit("String", ev);
- });
-
- lex.on("Number", function (ev) {
- emitter.emit("Number", ev);
- });
-
- lex.start();
- for (var name in o) {
- if (_.has(o, name)) {
- checkOption(name, state.tokens.curr);
- }
- }
-
- assume();
- combine(predefined, g || {});
- comma.first = true;
-
- try {
- advance();
- switch (state.tokens.next.id) {
- case "{":
- case "[":
- destructuringAssignOrJsonValue();
- break;
- default:
- directives();
-
- if (state.directive["use strict"]) {
- if (!state.option.globalstrict && !state.option.node) {
- warning("W097", state.tokens.prev);
- }
- }
-
- statements();
- }
- advance((state.tokens.next && state.tokens.next.value !== ".") ? "(end)" : undefined);
- funct["(blockscope)"].unstack();
-
- var markDefined = function (name, context) {
- do {
- if (typeof context[name] === "string") {
-
- if (context[name] === "unused")
- context[name] = "var";
- else if (context[name] === "unction")
- context[name] = "closure";
-
- return true;
- }
-
- context = context["(context)"];
- } while (context);
-
- return false;
- };
-
- var clearImplied = function (name, line) {
- if (!implied[name])
- return;
-
- var newImplied = [];
- for (var i = 0; i < implied[name].length; i += 1) {
- if (implied[name][i] !== line)
- newImplied.push(implied[name][i]);
- }
-
- if (newImplied.length === 0)
- delete implied[name];
- else
- implied[name] = newImplied;
- };
-
- var warnUnused = function (name, tkn, type, unused_opt) {
- var line = tkn.line;
- var chr = tkn.character;
-
- if (unused_opt === undefined) {
- unused_opt = state.option.unused;
- }
-
- if (unused_opt === true) {
- unused_opt = "last-param";
- }
-
- var warnable_types = {
- "vars": ["var"],
- "last-param": ["var", "param"],
- "strict": ["var", "param", "last-param"]
- };
-
- if (unused_opt) {
- if (warnable_types[unused_opt] && warnable_types[unused_opt].indexOf(type) !== -1) {
- warningAt("W098", line, chr, name);
- }
- }
-
- unuseds.push({
- name: name,
- line: line,
- character: chr
- });
- };
-
- var checkUnused = function (func, key) {
- var type = func[key];
- var tkn = func["(tokens)"][key];
-
- if (key.charAt(0) === "(")
- return;
-
- if (type !== "unused" && type !== "unction")
- return;
- if (func["(params)"] && func["(params)"].indexOf(key) !== -1)
- return;
- if (func["(global)"] && _.has(exported, key)) {
- return;
- }
-
- warnUnused(key, tkn, "var");
- };
- for (i = 0; i < JSHINT.undefs.length; i += 1) {
- k = JSHINT.undefs[i].slice(0);
-
- if (markDefined(k[2].value, k[0])) {
- clearImplied(k[2].value, k[2].line);
- } else if (state.option.undef) {
- warning.apply(warning, k.slice(1));
- }
- }
-
- functions.forEach(function (func) {
- if (func["(unusedOption)"] === false) {
- return;
- }
-
- for (var key in func) {
- if (_.has(func, key)) {
- checkUnused(func, key);
- }
- }
-
- if (!func["(params)"])
- return;
-
- var params = func["(params)"].slice();
- var param = params.pop();
- var type, unused_opt;
-
- while (param) {
- type = func[param];
- unused_opt = func["(unusedOption)"] || state.option.unused;
- unused_opt = unused_opt === true ? "last-param" : unused_opt;
-
- if (param === "undefined")
- return;
-
- if (type === "unused" || type === "unction") {
- warnUnused(param, func["(tokens)"][param], "param", func["(unusedOption)"]);
- } else if (unused_opt === "last-param") {
- return;
- }
-
- param = params.pop();
- }
- });
-
- for (var key in declared) {
- if (_.has(declared, key) && !_.has(global, key)) {
- warnUnused(key, declared[key], "var");
- }
- }
-
- } catch (err) {
- if (err && err.name === "JSHintError") {
- var nt = state.tokens.next || {};
- JSHINT.errors.push({
- scope : "(main)",
- raw : err.raw,
- code : err.code,
- reason : err.message,
- line : err.line || nt.line,
- character : err.character || nt.from
- }, null);
- } else {
- throw err;
- }
- }
-
- if (JSHINT.scope === "(main)") {
- o = o || {};
-
- for (i = 0; i < JSHINT.internals.length; i += 1) {
- k = JSHINT.internals[i];
- o.scope = k.elem;
- itself(k.value, o, g);
- }
- }
-
- return JSHINT.errors.length === 0;
- };
- itself.addModule = function (func) {
- extraModules.push(func);
- };
-
- itself.addModule(style.register);
- itself.data = function () {
- var data = {
- functions: [],
- options: state.option
- };
- var implieds = [];
- var members = [];
- var fu, f, i, j, n, globals;
-
- if (itself.errors.length) {
- data.errors = itself.errors;
- }
-
- if (state.jsonMode) {
- data.json = true;
- }
-
- for (n in implied) {
- if (_.has(implied, n)) {
- implieds.push({
- name: n,
- line: implied[n]
- });
- }
- }
-
- if (implieds.length > 0) {
- data.implieds = implieds;
- }
-
- if (urls.length > 0) {
- data.urls = urls;
- }
-
- globals = Object.keys(scope);
- if (globals.length > 0) {
- data.globals = globals;
- }
-
- for (i = 1; i < functions.length; i += 1) {
- f = functions[i];
- fu = {};
-
- for (j = 0; j < functionicity.length; j += 1) {
- fu[functionicity[j]] = [];
- }
-
- for (j = 0; j < functionicity.length; j += 1) {
- if (fu[functionicity[j]].length === 0) {
- delete fu[functionicity[j]];
- }
- }
-
- fu.name = f["(name)"];
- fu.param = f["(params)"];
- fu.line = f["(line)"];
- fu.character = f["(character)"];
- fu.last = f["(last)"];
- fu.lastcharacter = f["(lastcharacter)"];
- data.functions.push(fu);
- }
-
- if (unuseds.length > 0) {
- data.unused = unuseds;
- }
-
- members = [];
- for (n in member) {
- if (typeof member[n] === "number") {
- data.member = member;
- break;
- }
- }
-
- return data;
- };
-
- itself.jshint = itself;
-
- return itself;
-}());
-if (typeof exports === "object" && exports) {
- exports.JSHINT = JSHINT;
-}
-
-},
-{"../shared/messages.js":2,"../shared/vars.js":3,"./lex.js":5,"./reg.js":6,"./state.js":7,"./style.js":8,"console-browserify":9,"events":10,"underscore":1}],
-5:[function(req,module,exports){
-
-
-
-var _ = req("underscore");
-var events = req("events");
-var reg = req("./reg.js");
-var state = req("./state.js").state;
-
-var Token = {
- Identifier: 1,
- Punctuator: 2,
- NumericLiteral: 3,
- StringLiteral: 4,
- Comment: 5,
- Keyword: 6,
- NullLiteral: 7,
- BooleanLiteral: 8,
- RegExp: 9
-};
-
-var unicodeLetterTable = [
- 170, 170, 181, 181, 186, 186, 192, 214,
- 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750,
- 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908,
- 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366,
- 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610,
- 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775,
- 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957,
- 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069,
- 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2308, 2361,
- 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431,
- 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482,
- 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529,
- 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608,
- 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654,
- 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736,
- 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785,
- 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867,
- 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929,
- 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970,
- 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001,
- 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123,
- 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212,
- 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261,
- 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344,
- 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455,
- 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526,
- 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716,
- 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743,
- 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760,
- 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805,
- 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138,
- 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198,
- 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4304, 4346,
- 4348, 4348, 4352, 4680, 4682, 4685, 4688, 4694, 4696, 4696,
- 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789,
- 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880,
- 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740,
- 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900,
- 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000,
- 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312,
- 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516,
- 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823,
- 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7104, 7141,
- 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409,
- 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013,
- 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061,
- 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140,
- 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188,
- 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455,
- 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486,
- 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521,
- 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358,
- 11360, 11492, 11499, 11502, 11520, 11557, 11568, 11621,
- 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694,
- 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726,
- 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295,
- 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438,
- 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589,
- 12593, 12686, 12704, 12730, 12784, 12799, 13312, 13312,
- 19893, 19893, 19968, 19968, 40907, 40907, 40960, 42124,
- 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539,
- 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783,
- 42786, 42888, 42891, 42894, 42896, 42897, 42912, 42921,
- 43002, 43009, 43011, 43013, 43015, 43018, 43020, 43042,
- 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259,
- 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442,
- 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595,
- 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697,
- 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714,
- 43739, 43741, 43777, 43782, 43785, 43790, 43793, 43798,
- 43808, 43814, 43816, 43822, 43968, 44002, 44032, 44032,
- 55203, 55203, 55216, 55238, 55243, 55291, 63744, 64045,
- 64048, 64109, 64112, 64217, 64256, 64262, 64275, 64279,
- 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316,
- 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433,
- 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019,
- 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370,
- 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495,
- 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594,
- 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786,
- 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66334,
- 66352, 66378, 66432, 66461, 66464, 66499, 66504, 66511,
- 66513, 66517, 66560, 66717, 67584, 67589, 67592, 67592,
- 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669,
- 67840, 67861, 67872, 67897, 68096, 68096, 68112, 68115,
- 68117, 68119, 68121, 68147, 68192, 68220, 68352, 68405,
- 68416, 68437, 68448, 68466, 68608, 68680, 69635, 69687,
- 69763, 69807, 73728, 74606, 74752, 74850, 77824, 78894,
- 92160, 92728, 110592, 110593, 119808, 119892, 119894, 119964,
- 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980,
- 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069,
- 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121,
- 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144,
- 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570,
- 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686,
- 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779,
- 131072, 131072, 173782, 173782, 173824, 173824, 177972, 177972,
- 177984, 177984, 178205, 178205, 194560, 195101
-];
-
-var identifierStartTable = [];
-
-for (var i = 0; i < 128; i++) {
- identifierStartTable[i] =
- i === 36 || // $
- i >= 65 && i <= 90 || // A-Z
- i === 95 || // _
- i >= 97 && i <= 122; // a-z
-}
-
-var identifierPartTable = [];
-
-for (var i = 0; i < 128; i++) {
- identifierPartTable[i] =
- identifierStartTable[i] || // $, _, A-Z, a-z
- i >= 48 && i <= 57; // 0-9
-}
-
-function asyncTrigger() {
- var _checks = [];
-
- return {
- push: function (fn) {
- _checks.push(fn);
- },
-
- check: function () {
- for (var check = 0; check < _checks.length; ++check) {
- _checks[check]();
- }
-
- _checks.splice(0, _checks.length);
- }
- };
-}
-function Lexer(source) {
- var lines = source;
-
- if (typeof lines === "string") {
- lines = lines
- .replace(/\r\n/g, "\n")
- .replace(/\r/g, "\n")
- .split("\n");
- }
-
- if (lines[0] && lines[0].substr(0, 2) === "#!") {
- lines[0] = "";
- }
-
- this.emitter = new events.EventEmitter();
- this.source = source;
- this.setLines(lines);
- this.prereg = true;
-
- this.line = 0;
- this.char = 1;
- this.from = 1;
- this.input = "";
-
- for (var i = 0; i < state.option.indent; i += 1) {
- state.tab += " ";
- }
-}
-
-Lexer.prototype = {
- _lines: [],
-
- getLines: function () {
- this._lines = state.lines;
- return this._lines;
- },
-
- setLines: function (val) {
- this._lines = val;
- state.lines = this._lines;
- },
- peek: function (i) {
- return this.input.charAt(i || 0);
- },
- skip: function (i) {
- i = i || 1;
- this.char += i;
- this.input = this.input.slice(i);
- },
- on: function (names, listener) {
- names.split(" ").forEach(function (name) {
- this.emitter.on(name, listener);
- }.bind(this));
- },
- trigger: function () {
- this.emitter.emit.apply(this.emitter, Array.prototype.slice.call(arguments));
- },
- triggerAsync: function (type, args, checks, fn) {
- checks.push(function () {
- if (fn()) {
- this.trigger(type, args);
- }
- }.bind(this));
- },
- scanPunctuator: function () {
- var ch1 = this.peek();
- var ch2, ch3, ch4;
-
- switch (ch1) {
- case ".":
- if ((/^[0-9]$/).test(this.peek(1))) {
- return null;
- }
- if (this.peek(1) === "." && this.peek(2) === ".") {
- return {
- type: Token.Punctuator,
- value: "..."
- };
- }
- case "(":
- case ")":
- case ";":
- case ",":
- case "{":
- case "}":
- case "[":
- case "]":
- case ":":
- case "~":
- case "?":
- return {
- type: Token.Punctuator,
- value: ch1
- };
- case "#":
- return {
- type: Token.Punctuator,
- value: ch1
- };
- case "":
- return null;
- }
-
- ch2 = this.peek(1);
- ch3 = this.peek(2);
- ch4 = this.peek(3);
-
- if (ch1 === ">" && ch2 === ">" && ch3 === ">" && ch4 === "=") {
- return {
- type: Token.Punctuator,
- value: ">>>="
- };
- }
-
- if (ch1 === "=" && ch2 === "=" && ch3 === "=") {
- return {
- type: Token.Punctuator,
- value: "==="
- };
- }
-
- if (ch1 === "!" && ch2 === "=" && ch3 === "=") {
- return {
- type: Token.Punctuator,
- value: "!=="
- };
- }
-
- if (ch1 === ">" && ch2 === ">" && ch3 === ">") {
- return {
- type: Token.Punctuator,
- value: ">>>"
- };
- }
-
- if (ch1 === "<" && ch2 === "<" && ch3 === "=") {
- return {
- type: Token.Punctuator,
- value: "<<="
- };
- }
-
- if (ch1 === ">" && ch2 === ">" && ch3 === "=") {
- return {
- type: Token.Punctuator,
- value: ">>="
- };
- }
- if (ch1 === "=" && ch2 === ">") {
- return {
- type: Token.Punctuator,
- value: ch1 + ch2
- };
- }
- if (ch1 === ch2 && ("+-<>&|".indexOf(ch1) >= 0)) {
- return {
- type: Token.Punctuator,
- value: ch1 + ch2
- };
- }
-
- if ("<>=!+-*%&|^".indexOf(ch1) >= 0) {
- if (ch2 === "=") {
- return {
- type: Token.Punctuator,
- value: ch1 + ch2
- };
- }
-
- return {
- type: Token.Punctuator,
- value: ch1
- };
- }
-
- if (ch1 === "/") {
- if (ch2 === "=" && /\/=(?!(\S*\/[gim]?))/.test(this.input)) {
- return {
- type: Token.Punctuator,
- value: "/="
- };
- }
-
- return {
- type: Token.Punctuator,
- value: "/"
- };
- }
-
- return null;
- },
- scanComments: function () {
- var ch1 = this.peek();
- var ch2 = this.peek(1);
- var rest = this.input.substr(2);
- var startLine = this.line;
- var startChar = this.char;
-
- function commentToken(label, body, opt) {
- var special = ["jshint", "jslint", "members", "member", "globals", "global", "exported"];
- var isSpecial = false;
- var value = label + body;
- var commentType = "plain";
- opt = opt || {};
-
- if (opt.isMultiline) {
- value += "*/";
- }
-
- special.forEach(function (str) {
- if (isSpecial) {
- return;
- }
- if (label === "//" && str !== "jshint") {
- return;
- }
-
- if (body.substr(0, str.length) === str) {
- isSpecial = true;
- label = label + str;
- body = body.substr(str.length);
- }
-
- if (!isSpecial && body.charAt(0) === " " && body.substr(1, str.length) === str) {
- isSpecial = true;
- label = label + " " + str;
- body = body.substr(str.length + 1);
- }
-
- if (!isSpecial) {
- return;
- }
-
- switch (str) {
- case "member":
- commentType = "members";
- break;
- case "global":
- commentType = "globals";
- break;
- default:
- commentType = str;
- }
- });
-
- return {
- type: Token.Comment,
- commentType: commentType,
- value: value,
- body: body,
- isSpecial: isSpecial,
- isMultiline: opt.isMultiline || false,
- isMalformed: opt.isMalformed || false
- };
- }
- if (ch1 === "*" && ch2 === "/") {
- this.trigger("error", {
- code: "E018",
- line: startLine,
- character: startChar
- });
-
- this.skip(2);
- return null;
- }
- if (ch1 !== "/" || (ch2 !== "*" && ch2 !== "/")) {
- return null;
- }
- if (ch2 === "/") {
- this.skip(this.input.length); // Skip to the EOL.
- return commentToken("//", rest);
- }
-
- var body = "";
- if (ch2 === "*") {
- this.skip(2);
-
- while (this.peek() !== "*" || this.peek(1) !== "/") {
- if (this.peek() === "") { // End of Line
- body += "\n";
- if (!this.nextLine()) {
- this.trigger("error", {
- code: "E017",
- line: startLine,
- character: startChar
- });
-
- return commentToken("/*", body, {
- isMultiline: true,
- isMalformed: true
- });
- }
- } else {
- body += this.peek();
- this.skip();
- }
- }
-
- this.skip(2);
- return commentToken("/*", body, { isMultiline: true });
- }
- },
- scanKeyword: function () {
- var result = /^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input);
- var keywords = [
- "if", "in", "do", "var", "for", "new",
- "try", "let", "this", "else", "case",
- "void", "with", "enum", "while", "break",
- "catch", "throw", "const", "yield", "class",
- "super", "return", "typeof", "delete",
- "switch", "export", "import", "default",
- "finally", "extends", "function", "continue",
- "debugger", "instanceof"
- ];
-
- if (result && keywords.indexOf(result[0]) >= 0) {
- return {
- type: Token.Keyword,
- value: result[0]
- };
- }
-
- return null;
- },
- scanIdentifier: function () {
- var id = "";
- var index = 0;
- var type, char;
-
- function isUnicodeLetter(code) {
- for (var i = 0; i < unicodeLetterTable.length;) {
- if (code < unicodeLetterTable[i++]) {
- return false;
- }
-
- if (code <= unicodeLetterTable[i++]) {
- return true;
- }
- }
-
- return false;
- }
-
- function isHexDigit(str) {
- return (/^[0-9a-fA-F]$/).test(str);
- }
-
- var readUnicodeEscapeSequence = function () {
- index += 1;
-
- if (this.peek(index) !== "u") {
- return null;
- }
-
- var ch1 = this.peek(index + 1);
- var ch2 = this.peek(index + 2);
- var ch3 = this.peek(index + 3);
- var ch4 = this.peek(index + 4);
- var code;
-
- if (isHexDigit(ch1) && isHexDigit(ch2) && isHexDigit(ch3) && isHexDigit(ch4)) {
- code = parseInt(ch1 + ch2 + ch3 + ch4, 16);
-
- if (isUnicodeLetter(code)) {
- index += 5;
- return "\\u" + ch1 + ch2 + ch3 + ch4;
- }
-
- return null;
- }
-
- return null;
- }.bind(this);
-
- var getIdentifierStart = function () {
- var chr = this.peek(index);
- var code = chr.charCodeAt(0);
-
- if (code === 92) {
- return readUnicodeEscapeSequence();
- }
-
- if (code < 128) {
- if (identifierStartTable[code]) {
- index += 1;
- return chr;
- }
-
- return null;
- }
-
- if (isUnicodeLetter(code)) {
- index += 1;
- return chr;
- }
-
- return null;
- }.bind(this);
-
- var getIdentifierPart = function () {
- var chr = this.peek(index);
- var code = chr.charCodeAt(0);
-
- if (code === 92) {
- return readUnicodeEscapeSequence();
- }
-
- if (code < 128) {
- if (identifierPartTable[code]) {
- index += 1;
- return chr;
- }
-
- return null;
- }
-
- if (isUnicodeLetter(code)) {
- index += 1;
- return chr;
- }
-
- return null;
- }.bind(this);
-
- char = getIdentifierStart();
- if (char === null) {
- return null;
- }
-
- id = char;
- for (;;) {
- char = getIdentifierPart();
-
- if (char === null) {
- break;
- }
-
- id += char;
- }
-
- switch (id) {
- case "true":
- case "false":
- type = Token.BooleanLiteral;
- break;
- case "null":
- type = Token.NullLiteral;
- break;
- default:
- type = Token.Identifier;
- }
-
- return {
- type: type,
- value: id
- };
- },
- scanNumericLiteral: function () {
- var index = 0;
- var value = "";
- var length = this.input.length;
- var char = this.peek(index);
- var bad;
-
- function isDecimalDigit(str) {
- return (/^[0-9]$/).test(str);
- }
-
- function isOctalDigit(str) {
- return (/^[0-7]$/).test(str);
- }
-
- function isHexDigit(str) {
- return (/^[0-9a-fA-F]$/).test(str);
- }
-
- function isIdentifierStart(ch) {
- return (ch === "$") || (ch === "_") || (ch === "\\") ||
- (ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z");
- }
-
- if (char !== "." && !isDecimalDigit(char)) {
- return null;
- }
-
- if (char !== ".") {
- value = this.peek(index);
- index += 1;
- char = this.peek(index);
-
- if (value === "0") {
- if (char === "x" || char === "X") {
- index += 1;
- value += char;
-
- while (index < length) {
- char = this.peek(index);
- if (!isHexDigit(char)) {
- break;
- }
- value += char;
- index += 1;
- }
-
- if (value.length <= 2) { // 0x
- return {
- type: Token.NumericLiteral,
- value: value,
- isMalformed: true
- };
- }
-
- if (index < length) {
- char = this.peek(index);
- if (isIdentifierStart(char)) {
- return null;
- }
- }
-
- return {
- type: Token.NumericLiteral,
- value: value,
- base: 16,
- isMalformed: false
- };
- }
- if (isOctalDigit(char)) {
- index += 1;
- value += char;
- bad = false;
-
- while (index < length) {
- char = this.peek(index);
-
- if (isDecimalDigit(char)) {
- bad = true;
- } else if (!isOctalDigit(char)) {
- break;
- }
- value += char;
- index += 1;
- }
-
- if (index < length) {
- char = this.peek(index);
- if (isIdentifierStart(char)) {
- return null;
- }
- }
-
- return {
- type: Token.NumericLiteral,
- value: value,
- base: 8,
- isMalformed: false
- };
- }
-
- if (isDecimalDigit(char)) {
- index += 1;
- value += char;
- }
- }
-
- while (index < length) {
- char = this.peek(index);
- if (!isDecimalDigit(char)) {
- break;
- }
- value += char;
- index += 1;
- }
- }
-
- if (char === ".") {
- value += char;
- index += 1;
-
- while (index < length) {
- char = this.peek(index);
- if (!isDecimalDigit(char)) {
- break;
- }
- value += char;
- index += 1;
- }
- }
-
- if (char === "e" || char === "E") {
- value += char;
- index += 1;
- char = this.peek(index);
-
- if (char === "+" || char === "-") {
- value += this.peek(index);
- index += 1;
- }
-
- char = this.peek(index);
- if (isDecimalDigit(char)) {
- value += char;
- index += 1;
-
- while (index < length) {
- char = this.peek(index);
- if (!isDecimalDigit(char)) {
- break;
- }
- value += char;
- index += 1;
- }
- } else {
- return null;
- }
- }
-
- if (index < length) {
- char = this.peek(index);
- if (isIdentifierStart(char)) {
- return null;
- }
- }
-
- return {
- type: Token.NumericLiteral,
- value: value,
- base: 10,
- isMalformed: !isFinite(value)
- };
- },
- scanStringLiteral: function (checks) {
- var quote = this.peek();
- if (quote !== "\"" && quote !== "'") {
- return null;
- }
- this.triggerAsync("warning", {
- code: "W108",
- line: this.line,
- character: this.char // +1?
- }, checks, function () { return state.jsonMode && quote !== "\""; });
-
- var value = "";
- var startLine = this.line;
- var startChar = this.char;
- var allowNewLine = false;
-
- this.skip();
-
- while (this.peek() !== quote) {
- while (this.peek() === "") { // End Of Line
-
- if (!allowNewLine) {
- this.trigger("warning", {
- code: "W112",
- line: this.line,
- character: this.char
- });
- } else {
- allowNewLine = false;
-
- this.triggerAsync("warning", {
- code: "W043",
- line: this.line,
- character: this.char
- }, checks, function () { return !state.option.multistr; });
-
- this.triggerAsync("warning", {
- code: "W042",
- line: this.line,
- character: this.char
- }, checks, function () { return state.jsonMode && state.option.multistr; });
- }
-
- if (!this.nextLine()) {
- this.trigger("error", {
- code: "E029",
- line: startLine,
- character: startChar
- });
-
- return {
- type: Token.StringLiteral,
- value: value,
- isUnclosed: true,
- quote: quote
- };
- }
- }
-
- allowNewLine = false;
- var char = this.peek();
- var jump = 1; // A length of a jump, after we're done
-
- if (char < " ") {
- this.trigger("warning", {
- code: "W113",
- line: this.line,
- character: this.char,
- data: [ "<non-printable>" ]
- });
- }
-
- if (char === "\\") {
- this.skip();
- char = this.peek();
-
- switch (char) {
- case "'":
- this.triggerAsync("warning", {
- code: "W114",
- line: this.line,
- character: this.char,
- data: [ "\\'" ]
- }, checks, function () {return state.jsonMode; });
- break;
- case "b":
- char = "\b";
- break;
- case "f":
- char = "\f";
- break;
- case "n":
- char = "\n";
- break;
- case "r":
- char = "\r";
- break;
- case "t":
- char = "\t";
- break;
- case "0":
- char = "\0";
- var n = parseInt(this.peek(1), 10);
- this.triggerAsync("warning", {
- code: "W115",
- line: this.line,
- character: this.char
- }, checks,
- function () { return n >= 0 && n <= 7 && state.directive["use strict"]; });
- break;
- case "u":
- char = String.fromCharCode(parseInt(this.input.substr(1, 4), 16));
- jump = 5;
- break;
- case "v":
- this.triggerAsync("warning", {
- code: "W114",
- line: this.line,
- character: this.char,
- data: [ "\\v" ]
- }, checks, function () { return state.jsonMode; });
-
- char = "\v";
- break;
- case "x":
- var x = parseInt(this.input.substr(1, 2), 16);
-
- this.triggerAsync("warning", {
- code: "W114",
- line: this.line,
- character: this.char,
- data: [ "\\x-" ]
- }, checks, function () { return state.jsonMode; });
-
- char = String.fromCharCode(x);
- jump = 3;
- break;
- case "\\":
- case "\"":
- case "/":
- break;
- case "":
- allowNewLine = true;
- char = "";
- break;
- case "!":
- if (value.slice(value.length - 2) === "<") {
- break;
- }
- default:
- this.trigger("warning", {
- code: "W044",
- line: this.line,
- character: this.char
- });
- }
- }
-
- value += char;
- this.skip(jump);
- }
-
- this.skip();
- return {
- type: Token.StringLiteral,
- value: value,
- isUnclosed: false,
- quote: quote
- };
- },
- scanRegExp: function () {
- var index = 0;
- var length = this.input.length;
- var char = this.peek();
- var value = char;
- var body = "";
- var flags = [];
- var malformed = false;
- var isCharSet = false;
- var terminated;
-
- var scanUnexpectedChars = function () {
- if (char < " ") {
- malformed = true;
- this.trigger("warning", {
- code: "W048",
- line: this.line,
- character: this.char
- });
- }
- if (char === "<") {
- malformed = true;
- this.trigger("warning", {
- code: "W049",
- line: this.line,
- character: this.char,
- data: [ char ]
- });
- }
- }.bind(this);
- if (!this.prereg || char !== "/") {
- return null;
- }
-
- index += 1;
- terminated = false;
-
- while (index < length) {
- char = this.peek(index);
- value += char;
- body += char;
-
- if (isCharSet) {
- if (char === "]") {
- if (this.peek(index - 1) !== "\\" || this.peek(index - 2) === "\\") {
- isCharSet = false;
- }
- }
-
- if (char === "\\") {
- index += 1;
- char = this.peek(index);
- body += char;
- value += char;
-
- scanUnexpectedChars();
- }
-
- index += 1;
- continue;
- }
-
- if (char === "\\") {
- index += 1;
- char = this.peek(index);
- body += char;
- value += char;
-
- scanUnexpectedChars();
-
- if (char === "/") {
- index += 1;
- continue;
- }
-
- if (char === "[") {
- index += 1;
- continue;
- }
- }
-
- if (char === "[") {
- isCharSet = true;
- index += 1;
- continue;
- }
-
- if (char === "/") {
- body = body.substr(0, body.length - 1);
- terminated = true;
- index += 1;
- break;
- }
-
- index += 1;
- }
-
- if (!terminated) {
- this.trigger("error", {
- code: "E015",
- line: this.line,
- character: this.from
- });
-
- return void this.trigger("fatal", {
- line: this.line,
- from: this.from
- });
- }
-
- while (index < length) {
- char = this.peek(index);
- if (!/[gim]/.test(char)) {
- break;
- }
- flags.push(char);
- value += char;
- index += 1;
- }
-
- try {
- new RegExp(body, flags.join(""));
- } catch (err) {
- malformed = true;
- this.trigger("error", {
- code: "E016",
- line: this.line,
- character: this.char,
- data: [ err.message ] // Platform dependent!
- });
- }
-
- return {
- type: Token.RegExp,
- value: value,
- flags: flags,
- isMalformed: malformed
- };
- },
- scanMixedSpacesAndTabs: function () {
- var at, match;
-
- if (state.option.smarttabs) {
- match = this.input.match(/(\/\/|^\s?\*)? \t/);
- at = match && !match[1] ? 0 : -1;
- } else {
- at = this.input.search(/ \t|\t [^\*]/);
- }
-
- return at;
- },
- scanUnsafeChars: function () {
- return this.input.search(reg.unsafeChars);
- },
- next: function (checks) {
- this.from = this.char;
- var start;
- if (/\s/.test(this.peek())) {
- start = this.char;
-
- while (/\s/.test(this.peek())) {
- this.from += 1;
- this.skip();
- }
-
- if (this.peek() === "") { // EOL
- if (!/^\s*$/.test(this.getLines()[this.line - 1]) && state.option.trailing) {
- this.trigger("warning", { code: "W102", line: this.line, character: start });
- }
- }
- }
-
- var match = this.scanComments() ||
- this.scanStringLiteral(checks);
-
- if (match) {
- return match;
- }
-
- match =
- this.scanRegExp() ||
- this.scanPunctuator() ||
- this.scanKeyword() ||
- this.scanIdentifier() ||
- this.scanNumericLiteral();
-
- if (match) {
- this.skip(match.value.length);
- return match;
- }
-
- return null;
- },
- nextLine: function () {
- var char;
-
- if (this.line >= this.getLines().length) {
- return false;
- }
-
- this.input = this.getLines()[this.line];
- this.line += 1;
- this.char = 1;
- this.from = 1;
-
- char = this.scanMixedSpacesAndTabs();
- if (char >= 0) {
- this.trigger("warning", { code: "W099", line: this.line, character: char + 1 });
- }
-
- this.input = this.input.replace(/\t/g, state.tab);
- char = this.scanUnsafeChars();
-
- if (char >= 0) {
- this.trigger("warning", { code: "W100", line: this.line, character: char });
- }
-
- if (state.option.maxlen && state.option.maxlen < this.input.length) {
- this.trigger("warning", { code: "W101", line: this.line, character: this.input.length });
- }
-
- return true;
- },
- start: function () {
- this.nextLine();
- },
- token: function () {
- var checks = asyncTrigger();
- var token;
-
-
- function isReserved(token, isProperty) {
- if (!token.reserved) {
- return false;
- }
- var meta = token.meta;
-
- if (meta && meta.isFutureReservedWord && state.option.inES5()) {
- if (!meta.es5) {
- return false;
- }
- if (meta.strictOnly) {
- if (!state.option.strict && !state.directive["use strict"]) {
- return false;
- }
- }
-
- if (isProperty) {
- return false;
- }
- }
-
- return true;
- }
- var create = function (type, value, isProperty) {
- var obj;
-
- if (type !== "(endline)" && type !== "(end)") {
- this.prereg = false;
- }
-
- if (type === "(punctuator)") {
- switch (value) {
- case ".":
- case ")":
- case "~":
- case "#":
- case "]":
- this.prereg = false;
- break;
- default:
- this.prereg = true;
- }
-
- obj = Object.create(state.syntax[value] || state.syntax["(error)"]);
- }
-
- if (type === "(identifier)") {
- if (value === "return" || value === "case" || value === "typeof") {
- this.prereg = true;
- }
-
- if (_.has(state.syntax, value)) {
- obj = Object.create(state.syntax[value] || state.syntax["(error)"]);
- if (!isReserved(obj, isProperty && type === "(identifier)")) {
- obj = null;
- }
- }
- }
-
- if (!obj) {
- obj = Object.create(state.syntax[type]);
- }
-
- obj.identifier = (type === "(identifier)");
- obj.type = obj.type || type;
- obj.value = value;
- obj.line = this.line;
- obj.character = this.char;
- obj.from = this.from;
-
- if (isProperty && obj.identifier) {
- obj.isProperty = isProperty;
- }
-
- obj.check = checks.check;
-
- return obj;
- }.bind(this);
-
- for (;;) {
- if (!this.input.length) {
- return create(this.nextLine() ? "(endline)" : "(end)", "");
- }
-
- token = this.next(checks);
-
- if (!token) {
- if (this.input.length) {
- this.trigger("error", {
- code: "E024",
- line: this.line,
- character: this.char,
- data: [ this.peek() ]
- });
-
- this.input = "";
- }
-
- continue;
- }
-
- switch (token.type) {
- case Token.StringLiteral:
- this.triggerAsync("String", {
- line: this.line,
- char: this.char,
- from: this.from,
- value: token.value,
- quote: token.quote
- }, checks, function () { return true; });
-
- return create("(string)", token.value);
- case Token.Identifier:
- this.trigger("Identifier", {
- line: this.line,
- char: this.char,
- from: this.form,
- name: token.value,
- isProperty: state.tokens.curr.id === "."
- });
- case Token.Keyword:
- case Token.NullLiteral:
- case Token.BooleanLiteral:
- return create("(identifier)", token.value, state.tokens.curr.id === ".");
-
- case Token.NumericLiteral:
- if (token.isMalformed) {
- this.trigger("warning", {
- code: "W045",
- line: this.line,
- character: this.char,
- data: [ token.value ]
- });
- }
-
- this.triggerAsync("warning", {
- code: "W114",
- line: this.line,
- character: this.char,
- data: [ "0x-" ]
- }, checks, function () { return token.base === 16 && state.jsonMode; });
-
- this.triggerAsync("warning", {
- code: "W115",
- line: this.line,
- character: this.char
- }, checks, function () {
- return state.directive["use strict"] && token.base === 8;
- });
-
- this.trigger("Number", {
- line: this.line,
- char: this.char,
- from: this.from,
- value: token.value,
- base: token.base,
- isMalformed: token.malformed
- });
-
- return create("(number)", token.value);
-
- case Token.RegExp:
- return create("(regexp)", token.value);
-
- case Token.Comment:
- state.tokens.curr.comment = true;
-
- if (token.isSpecial) {
- return {
- value: token.value,
- body: token.body,
- type: token.commentType,
- isSpecial: token.isSpecial,
- line: this.line,
- character: this.char,
- from: this.from
- };
- }
-
- break;
-
- case "":
- break;
-
- default:
- return create("(punctuator)", token.value);
- }
- }
- }
-};
-
-exports.Lexer = Lexer;
-
-},
-{"./reg.js":6,"./state.js":7,"events":10,"underscore":1}],
-6:[function(req,module,exports){
-
-"use string";
-exports.unsafeString =
- /@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i;
-exports.unsafeChars =
- /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
-exports.needEsc =
- /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
-
-exports.needEscGlobal =
- /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
-exports.starSlash = /\*\//;
-exports.identifier = /^([a-zA-Z_$][a-zA-Z0-9_$]*)$/;
-exports.javascriptURL = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i;
-exports.fallsThrough = /^\s*\/\*\s*falls?\sthrough\s*\*\/\s*$/;
-
-},
-{}],
-7:[function(req,module,exports){
-
-
-var state = {
- syntax: {},
-
- reset: function () {
- this.tokens = {
- prev: null,
- next: null,
- curr: null
- };
-
- this.option = {};
- this.ignored = {};
- this.directive = {};
- this.jsonMode = false;
- this.jsonWarnings = [];
- this.lines = [];
- this.tab = "";
- this.cache = {}; // Node.JS doesn't have Map. Sniff.
- }
-};
-
-exports.state = state;
-
-},
-{}],
-8:[function(req,module,exports){
-
-
-exports.register = function (linter) {
-
- linter.on("Identifier", function style_scanProto(data) {
- if (linter.getOption("proto")) {
- return;
- }
-
- if (data.name === "__proto__") {
- linter.warn("W103", {
- line: data.line,
- char: data.char,
- data: [ data.name ]
- });
- }
- });
-
- linter.on("Identifier", function style_scanIterator(data) {
- if (linter.getOption("iterator")) {
- return;
- }
-
- if (data.name === "__iterator__") {
- linter.warn("W104", {
- line: data.line,
- char: data.char,
- data: [ data.name ]
- });
- }
- });
-
- linter.on("Identifier", function style_scanDangling(data) {
- if (!linter.getOption("nomen")) {
- return;
- }
- if (data.name === "_") {
- return;
- }
- if (linter.getOption("node")) {
- if (/^(__dirname|__filename)$/.test(data.name) && !data.isProperty) {
- return;
- }
- }
-
- if (/^(_+.*|.*_+)$/.test(data.name)) {
- linter.warn("W105", {
- line: data.line,
- char: data.from,
- data: [ "dangling '_'", data.name ]
- });
- }
- });
-
- linter.on("Identifier", function style_scanCamelCase(data) {
- if (!linter.getOption("camelcase")) {
- return;
- }
-
- if (data.name.replace(/^_+/, "").indexOf("_") > -1 && !data.name.match(/^[A-Z0-9_]*$/)) {
- linter.warn("W106", {
- line: data.line,
- char: data.from,
- data: [ data.name ]
- });
- }
- });
-
- linter.on("String", function style_scanQuotes(data) {
- var quotmark = linter.getOption("quotmark");
- var code;
-
- if (!quotmark) {
- return;
- }
-
- if (quotmark === "single" && data.quote !== "'") {
- code = "W109";
- }
-
- if (quotmark === "double" && data.quote !== "\"") {
- code = "W108";
- }
-
- if (quotmark === true) {
- if (!linter.getCache("quotmark")) {
- linter.setCache("quotmark", data.quote);
- }
-
- if (linter.getCache("quotmark") !== data.quote) {
- code = "W110";
- }
- }
-
- if (code) {
- linter.warn(code, {
- line: data.line,
- char: data.char,
- });
- }
- });
-
- linter.on("Number", function style_scanNumbers(data) {
- if (data.value.charAt(0) === ".") {
- linter.warn("W008", {
- line: data.line,
- char: data.char,
- data: [ data.value ]
- });
- }
-
- if (data.value.substr(data.value.length - 1) === ".") {
- linter.warn("W047", {
- line: data.line,
- char: data.char,
- data: [ data.value ]
- });
- }
-
- if (/^00+/.test(data.value)) {
- linter.warn("W046", {
- line: data.line,
- char: data.char,
- data: [ data.value ]
- });
- }
- });
-
- linter.on("String", function style_scanJavaScriptURLs(data) {
- var re = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i;
-
- if (linter.getOption("scripturl")) {
- return;
- }
-
- if (re.test(data.value)) {
- linter.warn("W107", {
- line: data.line,
- char: data.char
- });
- }
- });
-};
-},
-{}],
-9:[function(req,module,exports){
-
-},
-{}],
-10:[function(req,module,exports){
-var process=req("__browserify_process");if (!process.EventEmitter) process.EventEmitter = function () {};
-
-var EventEmitter = exports.EventEmitter = process.EventEmitter;
-var isArray = typeof Array.isArray === 'function'
- ? Array.isArray
- : function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]'
- }
-;
-function indexOf (xs, x) {
- if (xs.indexOf) return xs.indexOf(x);
- for (var i = 0; i < xs.length; i++) {
- if (x === xs[i]) return i;
- }
- return -1;
-}
-var defaultMaxListeners = 200;
-EventEmitter.prototype.setMaxListeners = function(n) {
- if (!this._events) this._events = {};
- this._events.maxListeners = n;
-};
-
-
-EventEmitter.prototype.emit = function(type) {
- if (type === 'error') {
- if (!this._events || !this._events.error ||
- (isArray(this._events.error) && !this._events.error.length))
- {
- if (arguments[1] instanceof Error) {
- throw arguments[1]; // Unhandled 'error' event
- } else {
- throw new Error("Uncaught, unspecified 'error' event.");
- }
- return false;
- }
- }
-
- if (!this._events) return false;
- var handler = this._events[type];
- if (!handler) return false;
-
- if (typeof handler == 'function') {
- switch (arguments.length) {
- case 1:
- handler.call(this);
- break;
- case 2:
- handler.call(this, arguments[1]);
- break;
- case 3:
- handler.call(this, arguments[1], arguments[2]);
- break;
- default:
- var args = Array.prototype.slice.call(arguments, 1);
- handler.apply(this, args);
- }
- return true;
-
- } else if (isArray(handler)) {
- var args = Array.prototype.slice.call(arguments, 1);
-
- var listeners = handler.slice();
- for (var i = 0, l = listeners.length; i < l; i++) {
- listeners[i].apply(this, args);
- }
- return true;
-
- } else {
- return false;
- }
-};
-EventEmitter.prototype.addListener = function(type, listener) {
- if ('function' !== typeof listener) {
- throw new Error('addListener only takes instances of Function');
- }
-
- if (!this._events) this._events = {};
- this.emit('newListener', type, listener);
-
- if (!this._events[type]) {
- this._events[type] = listener;
- } else if (isArray(this._events[type])) {
- if (!this._events[type].warned) {
- var m;
- if (this._events.maxListeners !== undefined) {
- m = this._events.maxListeners;
- } else {
- m = defaultMaxListeners;
- }
-
- if (m && m > 0 && this._events[type].length > m) {
- this._events[type].warned = true;
- console.error('(node) warning: possible EventEmitter memory ' +
- 'leak detected. %d listeners added. ' +
- 'Use emitter.setMaxListeners() to increase limit.',
- this._events[type].length);
- console.trace();
- }
- }
- this._events[type].push(listener);
- } else {
- this._events[type] = [this._events[type], listener];
- }
-
- return this;
-};
-
-EventEmitter.prototype.on = EventEmitter.prototype.addListener;
-
-EventEmitter.prototype.once = function(type, listener) {
- var self = this;
- self.on(type, function g() {
- self.removeListener(type, g);
- listener.apply(this, arguments);
- });
-
- return this;
-};
-
-EventEmitter.prototype.removeListener = function(type, listener) {
- if ('function' !== typeof listener) {
- throw new Error('removeListener only takes instances of Function');
- }
- if (!this._events || !this._events[type]) return this;
-
- var list = this._events[type];
-
- if (isArray(list)) {
- var i = indexOf(list, listener);
- if (i < 0) return this;
- list.splice(i, 1);
- if (list.length == 0)
- delete this._events[type];
- } else if (this._events[type] === listener) {
- delete this._events[type];
- }
-
- return this;
-};
-
-EventEmitter.prototype.removeAllListeners = function(type) {
- if (arguments.length === 0) {
- this._events = {};
- return this;
- }
- if (type && this._events && this._events[type]) this._events[type] = null;
- return this;
-};
-
-EventEmitter.prototype.listeners = function(type) {
- if (!this._events) this._events = {};
- if (!this._events[type]) this._events[type] = [];
- if (!isArray(this._events[type])) {
- this._events[type] = [this._events[type]];
- }
- return this._events[type];
-};
-
-EventEmitter.listenerCount = function(emitter, type) {
- var ret;
- if (!emitter._events || !emitter._events[type])
- ret = 0;
- else if (typeof emitter._events[type] === 'function')
- ret = 1;
- else
- ret = emitter._events[type].length;
- return ret;
-};
-
-},
-{"__browserify_process":11}],
-11:[function(req,module,exports){
-
-var process = module.exports = {};
-
-process.nextTick = (function () {
- var canSetImmediate = typeof window !== 'undefined'
- && window.setImmediate;
- var canPost = typeof window !== 'undefined'
- && window.postMessage && window.addEventListener
- ;
-
- if (canSetImmediate) {
- return function (f) { return window.setImmediate(f) };
- }
-
- if (canPost) {
- var queue = [];
- window.addEventListener('message', function (ev) {
- if (ev.source === window && ev.data === 'process-tick') {
- ev.stopPropagation();
- if (queue.length > 0) {
- var fn = queue.shift();
- fn();
- }
- }
- }, true);
-
- return function nextTick(fn) {
- queue.push(fn);
- window.postMessage('process-tick', '*');
- };
- }
-
- return function nextTick(fn) {
- setTimeout(fn, 0);
- };
-})();
-
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-}
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-
-},
-{}],
-"jshint":[function(req,module,exports){
-module.exports=req('n4bKNg');
-},
-{}]},{},["n4bKNg"])
-;
-
-function req() {return require.apply(this, arguments)}
-module.exports = req("jshint");
-
-}); \ No newline at end of file
diff --git a/share/www/fauxton/js/ace/worker-json.js b/share/www/fauxton/js/ace/worker-json.js
deleted file mode 100644
index 607221f4d..000000000
--- a/share/www/fauxton/js/ace/worker-json.js
+++ /dev/null
@@ -1,2271 +0,0 @@
-"no use strict";
-;(function(window) {
-if (typeof window.window != "undefined" && window.document) {
- return;
-}
-
-window.console = function() {
- var msgs = Array.prototype.slice.call(arguments, 0);
- postMessage({type: "log", data: msgs});
-};
-window.console.error =
-window.console.warn =
-window.console.log =
-window.console.trace = window.console;
-
-window.window = window;
-window.ace = window;
-
-window.normalizeModule = function(parentId, moduleName) {
- if (moduleName.indexOf("!") !== -1) {
- var chunks = moduleName.split("!");
- return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
- }
- if (moduleName.charAt(0) == ".") {
- var base = parentId.split("/").slice(0, -1).join("/");
- moduleName = (base ? base + "/" : "") + moduleName;
-
- while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
- var previous = moduleName;
- moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
- }
- }
-
- return moduleName;
-};
-
-window.require = function(parentId, id) {
- if (!id) {
- id = parentId
- parentId = null;
- }
- if (!id.charAt)
- throw new Error("worker.js require() accepts only (parentId, id) as arguments");
-
- id = window.normalizeModule(parentId, id);
-
- var module = window.require.modules[id];
- if (module) {
- if (!module.initialized) {
- module.initialized = true;
- module.exports = module.factory().exports;
- }
- return module.exports;
- }
-
- var chunks = id.split("/");
- if (!window.require.tlns)
- return console.log("unable to load " + id);
- chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
- var path = chunks.join("/") + ".js";
-
- window.require.id = id;
- importScripts(path);
- return window.require(parentId, id);
-};
-window.require.modules = {};
-window.require.tlns = {};
-
-window.define = function(id, deps, factory) {
- if (arguments.length == 2) {
- factory = deps;
- if (typeof id != "string") {
- deps = id;
- id = window.require.id;
- }
- } else if (arguments.length == 1) {
- factory = id;
- deps = []
- id = window.require.id;
- }
-
- if (!deps.length)
- deps = ['require', 'exports', 'module']
-
- if (id.indexOf("text!") === 0)
- return;
-
- var req = function(childId) {
- return window.require(id, childId);
- };
-
- window.require.modules[id] = {
- exports: {},
- factory: function() {
- var module = this;
- var returnExports = factory.apply(this, deps.map(function(dep) {
- switch(dep) {
- case 'require': return req
- case 'exports': return module.exports
- case 'module': return module
- default: return req(dep)
- }
- }));
- if (returnExports)
- module.exports = returnExports;
- return module;
- }
- };
-};
-window.define.amd = {}
-
-window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
- require.tlns = topLevelNamespaces;
-}
-
-window.initSender = function initSender() {
-
- var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
- var oop = window.require("ace/lib/oop");
-
- var Sender = function() {};
-
- (function() {
-
- oop.implement(this, EventEmitter);
-
- this.callback = function(data, callbackId) {
- postMessage({
- type: "call",
- id: callbackId,
- data: data
- });
- };
-
- this.emit = function(name, data) {
- postMessage({
- type: "event",
- name: name,
- data: data
- });
- };
-
- }).call(Sender.prototype);
-
- return new Sender();
-}
-
-window.main = null;
-window.sender = null;
-
-window.onmessage = function(e) {
- var msg = e.data;
- if (msg.command) {
- if (main[msg.command])
- main[msg.command].apply(main, msg.args);
- else
- throw new Error("Unknown command:" + msg.command);
- }
- else if (msg.init) {
- initBaseUrls(msg.tlns);
- require("ace/lib/es5-shim");
- sender = initSender();
- var clazz = require(msg.module)[msg.classname];
- main = new clazz(sender);
- }
- else if (msg.event && sender) {
- sender._emit(msg.event, msg.data);
- }
-};
-})(this);// https://github.com/kriskowal/es5-shim
-
-define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-function Empty() {}
-
-if (!Function.prototype.bind) {
- Function.prototype.bind = function bind(that) { // .length is 1
- var target = this;
- if (typeof target != "function") {
- throw new TypeError("Function.prototype.bind called on incompatible " + target);
- }
- var args = slice.call(arguments, 1); // for normal call
- var bound = function () {
-
- if (this instanceof bound) {
-
- var result = target.apply(
- this,
- args.concat(slice.call(arguments))
- );
- if (Object(result) === result) {
- return result;
- }
- return this;
-
- } else {
- return target.apply(
- that,
- args.concat(slice.call(arguments))
- );
-
- }
-
- };
- if(target.prototype) {
- Empty.prototype = target.prototype;
- bound.prototype = new Empty();
- Empty.prototype = null;
- }
- return bound;
- };
-}
-var call = Function.prototype.call;
-var prototypeOfArray = Array.prototype;
-var prototypeOfObject = Object.prototype;
-var slice = prototypeOfArray.slice;
-var _toString = call.bind(prototypeOfObject.toString);
-var owns = call.bind(prototypeOfObject.hasOwnProperty);
-var defineGetter;
-var defineSetter;
-var lookupGetter;
-var lookupSetter;
-var supportsAccessors;
-if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
- defineGetter = call.bind(prototypeOfObject.__defineGetter__);
- defineSetter = call.bind(prototypeOfObject.__defineSetter__);
- lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
- lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
-}
-if ([1,2].splice(0).length != 2) {
- if(function() { // test IE < 9 to splice bug - see issue #138
- function makeArray(l) {
- var a = new Array(l+2);
- a[0] = a[1] = 0;
- return a;
- }
- var array = [], lengthBefore;
-
- array.splice.apply(array, makeArray(20));
- array.splice.apply(array, makeArray(26));
-
- lengthBefore = array.length; //46
- array.splice(5, 0, "XXX"); // add one element
-
- lengthBefore + 1 == array.length
-
- if (lengthBefore + 1 == array.length) {
- return true;// has right splice implementation without bugs
- }
- }()) {//IE 6/7
- var array_splice = Array.prototype.splice;
- Array.prototype.splice = function(start, deleteCount) {
- if (!arguments.length) {
- return [];
- } else {
- return array_splice.apply(this, [
- start === void 0 ? 0 : start,
- deleteCount === void 0 ? (this.length - start) : deleteCount
- ].concat(slice.call(arguments, 2)))
- }
- };
- } else {//IE8
- Array.prototype.splice = function(pos, removeCount){
- var length = this.length;
- if (pos > 0) {
- if (pos > length)
- pos = length;
- } else if (pos == void 0) {
- pos = 0;
- } else if (pos < 0) {
- pos = Math.max(length + pos, 0);
- }
-
- if (!(pos+removeCount < length))
- removeCount = length - pos;
-
- var removed = this.slice(pos, pos+removeCount);
- var insert = slice.call(arguments, 2);
- var add = insert.length;
- if (pos === length) {
- if (add) {
- this.push.apply(this, insert);
- }
- } else {
- var remove = Math.min(removeCount, length - pos);
- var tailOldPos = pos + remove;
- var tailNewPos = tailOldPos + add - remove;
- var tailCount = length - tailOldPos;
- var lengthAfterRemove = length - remove;
-
- if (tailNewPos < tailOldPos) { // case A
- for (var i = 0; i < tailCount; ++i) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } else if (tailNewPos > tailOldPos) { // case B
- for (i = tailCount; i--; ) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } // else, add == remove (nothing to do)
-
- if (add && pos === lengthAfterRemove) {
- this.length = lengthAfterRemove; // truncate array
- this.push.apply(this, insert);
- } else {
- this.length = lengthAfterRemove + add; // reserves space
- for (i = 0; i < add; ++i) {
- this[pos+i] = insert[i];
- }
- }
- }
- return removed;
- };
- }
-}
-if (!Array.isArray) {
- Array.isArray = function isArray(obj) {
- return _toString(obj) == "[object Array]";
- };
-}
-var boxedString = Object("a"),
- splitString = boxedString[0] != "a" || !(0 in boxedString);
-
-if (!Array.prototype.forEach) {
- Array.prototype.forEach = function forEach(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- thisp = arguments[1],
- i = -1,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- while (++i < length) {
- if (i in self) {
- fun.call(thisp, self[i], i, object);
- }
- }
- };
-}
-if (!Array.prototype.map) {
- Array.prototype.map = function map(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = Array(length),
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self)
- result[i] = fun.call(thisp, self[i], i, object);
- }
- return result;
- };
-}
-if (!Array.prototype.filter) {
- Array.prototype.filter = function filter(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = [],
- value,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self) {
- value = self[i];
- if (fun.call(thisp, value, i, object)) {
- result.push(value);
- }
- }
- }
- return result;
- };
-}
-if (!Array.prototype.every) {
- Array.prototype.every = function every(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && !fun.call(thisp, self[i], i, object)) {
- return false;
- }
- }
- return true;
- };
-}
-if (!Array.prototype.some) {
- Array.prototype.some = function some(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && fun.call(thisp, self[i], i, object)) {
- return true;
- }
- }
- return false;
- };
-}
-if (!Array.prototype.reduce) {
- Array.prototype.reduce = function reduce(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduce of empty array with no initial value");
- }
-
- var i = 0;
- var result;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i++];
- break;
- }
- if (++i >= length) {
- throw new TypeError("reduce of empty array with no initial value");
- }
- } while (true);
- }
-
- for (; i < length; i++) {
- if (i in self) {
- result = fun.call(void 0, result, self[i], i, object);
- }
- }
-
- return result;
- };
-}
-if (!Array.prototype.reduceRight) {
- Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduceRight of empty array with no initial value");
- }
-
- var result, i = length - 1;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i--];
- break;
- }
- if (--i < 0) {
- throw new TypeError("reduceRight of empty array with no initial value");
- }
- } while (true);
- }
-
- do {
- if (i in this) {
- result = fun.call(void 0, result, self[i], i, object);
- }
- } while (i--);
-
- return result;
- };
-}
-if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
- Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
-
- if (!length) {
- return -1;
- }
-
- var i = 0;
- if (arguments.length > 1) {
- i = toInteger(arguments[1]);
- }
- i = i >= 0 ? i : Math.max(0, length + i);
- for (; i < length; i++) {
- if (i in self && self[i] === sought) {
- return i;
- }
- }
- return -1;
- };
-}
-if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
- Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
-
- if (!length) {
- return -1;
- }
- var i = length - 1;
- if (arguments.length > 1) {
- i = Math.min(i, toInteger(arguments[1]));
- }
- i = i >= 0 ? i : length - Math.abs(i);
- for (; i >= 0; i--) {
- if (i in self && sought === self[i]) {
- return i;
- }
- }
- return -1;
- };
-}
-if (!Object.getPrototypeOf) {
- Object.getPrototypeOf = function getPrototypeOf(object) {
- return object.__proto__ || (
- object.constructor ?
- object.constructor.prototype :
- prototypeOfObject
- );
- };
-}
-if (!Object.getOwnPropertyDescriptor) {
- var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
- "non-object: ";
- Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT + object);
- if (!owns(object, property))
- return;
-
- var descriptor, getter, setter;
- descriptor = { enumerable: true, configurable: true };
- if (supportsAccessors) {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
-
- var getter = lookupGetter(object, property);
- var setter = lookupSetter(object, property);
- object.__proto__ = prototype;
-
- if (getter || setter) {
- if (getter) descriptor.get = getter;
- if (setter) descriptor.set = setter;
- return descriptor;
- }
- }
- descriptor.value = object[property];
- return descriptor;
- };
-}
-if (!Object.getOwnPropertyNames) {
- Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
- return Object.keys(object);
- };
-}
-if (!Object.create) {
- var createEmpty;
- if (Object.prototype.__proto__ === null) {
- createEmpty = function () {
- return { "__proto__": null };
- };
- } else {
- createEmpty = function () {
- var empty = {};
- for (var i in empty)
- empty[i] = null;
- empty.constructor =
- empty.hasOwnProperty =
- empty.propertyIsEnumerable =
- empty.isPrototypeOf =
- empty.toLocaleString =
- empty.toString =
- empty.valueOf =
- empty.__proto__ = null;
- return empty;
- }
- }
-
- Object.create = function create(prototype, properties) {
- var object;
- if (prototype === null) {
- object = createEmpty();
- } else {
- if (typeof prototype != "object")
- throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
- var Type = function () {};
- Type.prototype = prototype;
- object = new Type();
- object.__proto__ = prototype;
- }
- if (properties !== void 0)
- Object.defineProperties(object, properties);
- return object;
- };
-}
-
-function doesDefinePropertyWork(object) {
- try {
- Object.defineProperty(object, "sentinel", {});
- return "sentinel" in object;
- } catch (exception) {
- }
-}
-if (Object.defineProperty) {
- var definePropertyWorksOnObject = doesDefinePropertyWork({});
- var definePropertyWorksOnDom = typeof document == "undefined" ||
- doesDefinePropertyWork(document.createElement("div"));
- if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
- var definePropertyFallback = Object.defineProperty;
- }
-}
-
-if (!Object.defineProperty || definePropertyFallback) {
- var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
- var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
- var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
- "on this javascript engine";
-
- Object.defineProperty = function defineProperty(object, property, descriptor) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT_TARGET + object);
- if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
- throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
- if (definePropertyFallback) {
- try {
- return definePropertyFallback.call(Object, object, property, descriptor);
- } catch (exception) {
- }
- }
- if (owns(descriptor, "value")) {
-
- if (supportsAccessors && (lookupGetter(object, property) ||
- lookupSetter(object, property)))
- {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
- delete object[property];
- object[property] = descriptor.value;
- object.__proto__ = prototype;
- } else {
- object[property] = descriptor.value;
- }
- } else {
- if (!supportsAccessors)
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
- if (owns(descriptor, "get"))
- defineGetter(object, property, descriptor.get);
- if (owns(descriptor, "set"))
- defineSetter(object, property, descriptor.set);
- }
-
- return object;
- };
-}
-if (!Object.defineProperties) {
- Object.defineProperties = function defineProperties(object, properties) {
- for (var property in properties) {
- if (owns(properties, property))
- Object.defineProperty(object, property, properties[property]);
- }
- return object;
- };
-}
-if (!Object.seal) {
- Object.seal = function seal(object) {
- return object;
- };
-}
-if (!Object.freeze) {
- Object.freeze = function freeze(object) {
- return object;
- };
-}
-try {
- Object.freeze(function () {});
-} catch (exception) {
- Object.freeze = (function freeze(freezeObject) {
- return function freeze(object) {
- if (typeof object == "function") {
- return object;
- } else {
- return freezeObject(object);
- }
- };
- })(Object.freeze);
-}
-if (!Object.preventExtensions) {
- Object.preventExtensions = function preventExtensions(object) {
- return object;
- };
-}
-if (!Object.isSealed) {
- Object.isSealed = function isSealed(object) {
- return false;
- };
-}
-if (!Object.isFrozen) {
- Object.isFrozen = function isFrozen(object) {
- return false;
- };
-}
-if (!Object.isExtensible) {
- Object.isExtensible = function isExtensible(object) {
- if (Object(object) === object) {
- throw new TypeError(); // TODO message
- }
- var name = '';
- while (owns(object, name)) {
- name += '?';
- }
- object[name] = true;
- var returnValue = owns(object, name);
- delete object[name];
- return returnValue;
- };
-}
-if (!Object.keys) {
- var hasDontEnumBug = true,
- dontEnums = [
- "toString",
- "toLocaleString",
- "valueOf",
- "hasOwnProperty",
- "isPrototypeOf",
- "propertyIsEnumerable",
- "constructor"
- ],
- dontEnumsLength = dontEnums.length;
-
- for (var key in {"toString": null}) {
- hasDontEnumBug = false;
- }
-
- Object.keys = function keys(object) {
-
- if (
- (typeof object != "object" && typeof object != "function") ||
- object === null
- ) {
- throw new TypeError("Object.keys called on a non-object");
- }
-
- var keys = [];
- for (var name in object) {
- if (owns(object, name)) {
- keys.push(name);
- }
- }
-
- if (hasDontEnumBug) {
- for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
- var dontEnum = dontEnums[i];
- if (owns(object, dontEnum)) {
- keys.push(dontEnum);
- }
- }
- }
- return keys;
- };
-
-}
-if (!Date.now) {
- Date.now = function now() {
- return new Date().getTime();
- };
-}
-var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
- "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
- "\u2029\uFEFF";
-if (!String.prototype.trim || ws.trim()) {
- ws = "[" + ws + "]";
- var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
- trimEndRegexp = new RegExp(ws + ws + "*$");
- String.prototype.trim = function trim() {
- return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
- };
-}
-
-function toInteger(n) {
- n = +n;
- if (n !== n) { // isNaN
- n = 0;
- } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
- n = (n > 0 || -1) * Math.floor(Math.abs(n));
- }
- return n;
-}
-
-function isPrimitive(input) {
- var type = typeof input;
- return (
- input === null ||
- type === "undefined" ||
- type === "boolean" ||
- type === "number" ||
- type === "string"
- );
-}
-
-function toPrimitive(input) {
- var val, valueOf, toString;
- if (isPrimitive(input)) {
- return input;
- }
- valueOf = input.valueOf;
- if (typeof valueOf === "function") {
- val = valueOf.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- toString = input.toString;
- if (typeof toString === "function") {
- val = toString.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- throw new TypeError();
-}
-var toObject = function (o) {
- if (o == null) { // this matches both null and undefined
- throw new TypeError("can't convert "+o+" to object");
- }
- return Object(o);
-};
-
-});
-
-define('ace/mode/json_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/json/json_parse'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var Mirror = require("../worker/mirror").Mirror;
-var parse = require("./json/json_parse");
-
-var JsonWorker = exports.JsonWorker = function(sender) {
- Mirror.call(this, sender);
- this.setTimeout(200);
-};
-
-oop.inherits(JsonWorker, Mirror);
-
-(function() {
-
- this.onUpdate = function() {
- var value = this.doc.getValue();
-
- try {
- var result = parse(value);
- } catch (e) {
- var pos = this.doc.indexToPosition(e.at-1);
- this.sender.emit("error", {
- row: pos.row,
- column: pos.column,
- text: e.message,
- type: "error"
- });
- return;
- }
- this.sender.emit("ok");
- };
-
-}).call(JsonWorker.prototype);
-
-});
-
-define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-exports.inherits = (function() {
- var tempCtor = function() {};
- return function(ctor, superCtor) {
- tempCtor.prototype = superCtor.prototype;
- ctor.super_ = superCtor.prototype;
- ctor.prototype = new tempCtor();
- ctor.prototype.constructor = ctor;
- };
-}());
-
-exports.mixin = function(obj, mixin) {
- for (var key in mixin) {
- obj[key] = mixin[key];
- }
- return obj;
-};
-
-exports.implement = function(proto, mixin) {
- exports.mixin(proto, mixin);
-};
-
-});
-define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
-
-
-var Document = require("../document").Document;
-var lang = require("../lib/lang");
-
-var Mirror = exports.Mirror = function(sender) {
- this.sender = sender;
- var doc = this.doc = new Document("");
-
- var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
-
- var _self = this;
- sender.on("change", function(e) {
- doc.applyDeltas(e.data);
- deferredUpdate.schedule(_self.$timeout);
- });
-};
-
-(function() {
-
- this.$timeout = 500;
-
- this.setTimeout = function(timeout) {
- this.$timeout = timeout;
- };
-
- this.setValue = function(value) {
- this.doc.setValue(value);
- this.deferredUpdate.schedule(this.$timeout);
- };
-
- this.getValue = function(callbackId) {
- this.sender.callback(this.doc.getValue(), callbackId);
- };
-
- this.onUpdate = function() {
- };
-
-}).call(Mirror.prototype);
-
-});
-
-define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
-
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Range = require("./range").Range;
-var Anchor = require("./anchor").Anchor;
-
-var Document = function(text) {
- this.$lines = [];
- if (text.length == 0) {
- this.$lines = [""];
- } else if (Array.isArray(text)) {
- this._insertLines(0, text);
- } else {
- this.insert({row: 0, column:0}, text);
- }
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
- this.setValue = function(text) {
- var len = this.getLength();
- this.remove(new Range(0, 0, len, this.getLine(len-1).length));
- this.insert({row: 0, column:0}, text);
- };
- this.getValue = function() {
- return this.getAllLines().join(this.getNewLineCharacter());
- };
- this.createAnchor = function(row, column) {
- return new Anchor(this, row, column);
- };
- if ("aaa".split(/a/).length == 0)
- this.$split = function(text) {
- return text.replace(/\r\n|\r/g, "\n").split("\n");
- }
- else
- this.$split = function(text) {
- return text.split(/\r\n|\r|\n/);
- };
-
-
- this.$detectNewLine = function(text) {
- var match = text.match(/^.*?(\r\n|\r|\n)/m);
- this.$autoNewLine = match ? match[1] : "\n";
- };
- this.getNewLineCharacter = function() {
- switch (this.$newLineMode) {
- case "windows":
- return "\r\n";
- case "unix":
- return "\n";
- default:
- return this.$autoNewLine;
- }
- };
-
- this.$autoNewLine = "\n";
- this.$newLineMode = "auto";
- this.setNewLineMode = function(newLineMode) {
- if (this.$newLineMode === newLineMode)
- return;
-
- this.$newLineMode = newLineMode;
- };
- this.getNewLineMode = function() {
- return this.$newLineMode;
- };
- this.isNewLine = function(text) {
- return (text == "\r\n" || text == "\r" || text == "\n");
- };
- this.getLine = function(row) {
- return this.$lines[row] || "";
- };
- this.getLines = function(firstRow, lastRow) {
- return this.$lines.slice(firstRow, lastRow + 1);
- };
- this.getAllLines = function() {
- return this.getLines(0, this.getLength());
- };
- this.getLength = function() {
- return this.$lines.length;
- };
- this.getTextRange = function(range) {
- if (range.start.row == range.end.row) {
- return this.getLine(range.start.row)
- .substring(range.start.column, range.end.column);
- }
- var lines = this.getLines(range.start.row, range.end.row);
- lines[0] = (lines[0] || "").substring(range.start.column);
- var l = lines.length - 1;
- if (range.end.row - range.start.row == l)
- lines[l] = lines[l].substring(0, range.end.column);
- return lines.join(this.getNewLineCharacter());
- };
-
- this.$clipPosition = function(position) {
- var length = this.getLength();
- if (position.row >= length) {
- position.row = Math.max(0, length - 1);
- position.column = this.getLine(length-1).length;
- } else if (position.row < 0)
- position.row = 0;
- return position;
- };
- this.insert = function(position, text) {
- if (!text || text.length === 0)
- return position;
-
- position = this.$clipPosition(position);
- if (this.getLength() <= 1)
- this.$detectNewLine(text);
-
- var lines = this.$split(text);
- var firstLine = lines.splice(0, 1)[0];
- var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
-
- position = this.insertInLine(position, firstLine);
- if (lastLine !== null) {
- position = this.insertNewLine(position); // terminate first line
- position = this._insertLines(position.row, lines);
- position = this.insertInLine(position, lastLine || "");
- }
- return position;
- };
- this.insertLines = function(row, lines) {
- if (row >= this.getLength())
- return this.insert({row: row, column: 0}, "\n" + lines.join("\n"));
- return this._insertLines(Math.max(row, 0), lines);
- };
- this._insertLines = function(row, lines) {
- if (lines.length == 0)
- return {row: row, column: 0};
- if (lines.length > 0xFFFF) {
- var end = this._insertLines(row, lines.slice(0xFFFF));
- lines = lines.slice(0, 0xFFFF);
- }
-
- var args = [row, 0];
- args.push.apply(args, lines);
- this.$lines.splice.apply(this.$lines, args);
-
- var range = new Range(row, 0, row + lines.length, 0);
- var delta = {
- action: "insertLines",
- range: range,
- lines: lines
- };
- this._emit("change", { data: delta });
- return end || range.end;
- };
- this.insertNewLine = function(position) {
- position = this.$clipPosition(position);
- var line = this.$lines[position.row] || "";
-
- this.$lines[position.row] = line.substring(0, position.column);
- this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
-
- var end = {
- row : position.row + 1,
- column : 0
- };
-
- var delta = {
- action: "insertText",
- range: Range.fromPoints(position, end),
- text: this.getNewLineCharacter()
- };
- this._emit("change", { data: delta });
-
- return end;
- };
- this.insertInLine = function(position, text) {
- if (text.length == 0)
- return position;
-
- var line = this.$lines[position.row] || "";
-
- this.$lines[position.row] = line.substring(0, position.column) + text
- + line.substring(position.column);
-
- var end = {
- row : position.row,
- column : position.column + text.length
- };
-
- var delta = {
- action: "insertText",
- range: Range.fromPoints(position, end),
- text: text
- };
- this._emit("change", { data: delta });
-
- return end;
- };
- this.remove = function(range) {
- if (!range instanceof Range)
- range = Range.fromPoints(range.start, range.end);
- range.start = this.$clipPosition(range.start);
- range.end = this.$clipPosition(range.end);
-
- if (range.isEmpty())
- return range.start;
-
- var firstRow = range.start.row;
- var lastRow = range.end.row;
-
- if (range.isMultiLine()) {
- var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
- var lastFullRow = lastRow - 1;
-
- if (range.end.column > 0)
- this.removeInLine(lastRow, 0, range.end.column);
-
- if (lastFullRow >= firstFullRow)
- this._removeLines(firstFullRow, lastFullRow);
-
- if (firstFullRow != firstRow) {
- this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
- this.removeNewLine(range.start.row);
- }
- }
- else {
- this.removeInLine(firstRow, range.start.column, range.end.column);
- }
- return range.start;
- };
- this.removeInLine = function(row, startColumn, endColumn) {
- if (startColumn == endColumn)
- return;
-
- var range = new Range(row, startColumn, row, endColumn);
- var line = this.getLine(row);
- var removed = line.substring(startColumn, endColumn);
- var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
- this.$lines.splice(row, 1, newLine);
-
- var delta = {
- action: "removeText",
- range: range,
- text: removed
- };
- this._emit("change", { data: delta });
- return range.start;
- };
- this.removeLines = function(firstRow, lastRow) {
- if (firstRow < 0 || lastRow >= this.getLength())
- return this.remove(new Range(firstRow, 0, lastRow + 1, 0));
- return this._removeLines(firstRow, lastRow);
- };
-
- this._removeLines = function(firstRow, lastRow) {
- var range = new Range(firstRow, 0, lastRow + 1, 0);
- var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
-
- var delta = {
- action: "removeLines",
- range: range,
- nl: this.getNewLineCharacter(),
- lines: removed
- };
- this._emit("change", { data: delta });
- return removed;
- };
- this.removeNewLine = function(row) {
- var firstLine = this.getLine(row);
- var secondLine = this.getLine(row+1);
-
- var range = new Range(row, firstLine.length, row+1, 0);
- var line = firstLine + secondLine;
-
- this.$lines.splice(row, 2, line);
-
- var delta = {
- action: "removeText",
- range: range,
- text: this.getNewLineCharacter()
- };
- this._emit("change", { data: delta });
- };
- this.replace = function(range, text) {
- if (!range instanceof Range)
- range = Range.fromPoints(range.start, range.end);
- if (text.length == 0 && range.isEmpty())
- return range.start;
- if (text == this.getTextRange(range))
- return range.end;
-
- this.remove(range);
- if (text) {
- var end = this.insert(range.start, text);
- }
- else {
- end = range.start;
- }
-
- return end;
- };
- this.applyDeltas = function(deltas) {
- for (var i=0; i<deltas.length; i++) {
- var delta = deltas[i];
- var range = Range.fromPoints(delta.range.start, delta.range.end);
-
- if (delta.action == "insertLines")
- this.insertLines(range.start.row, delta.lines);
- else if (delta.action == "insertText")
- this.insert(range.start, delta.text);
- else if (delta.action == "removeLines")
- this._removeLines(range.start.row, range.end.row - 1);
- else if (delta.action == "removeText")
- this.remove(range);
- }
- };
- this.revertDeltas = function(deltas) {
- for (var i=deltas.length-1; i>=0; i--) {
- var delta = deltas[i];
-
- var range = Range.fromPoints(delta.range.start, delta.range.end);
-
- if (delta.action == "insertLines")
- this._removeLines(range.start.row, range.end.row - 1);
- else if (delta.action == "insertText")
- this.remove(range);
- else if (delta.action == "removeLines")
- this._insertLines(range.start.row, delta.lines);
- else if (delta.action == "removeText")
- this.insert(range.start, delta.text);
- }
- };
- this.indexToPosition = function(index, startRow) {
- var lines = this.$lines || this.getAllLines();
- var newlineLength = this.getNewLineCharacter().length;
- for (var i = startRow || 0, l = lines.length; i < l; i++) {
- index -= lines[i].length + newlineLength;
- if (index < 0)
- return {row: i, column: index + lines[i].length + newlineLength};
- }
- return {row: l-1, column: lines[l-1].length};
- };
- this.positionToIndex = function(pos, startRow) {
- var lines = this.$lines || this.getAllLines();
- var newlineLength = this.getNewLineCharacter().length;
- var index = 0;
- var row = Math.min(pos.row, lines.length);
- for (var i = startRow || 0; i < row; ++i)
- index += lines[i].length + newlineLength;
-
- return index + pos.column;
- };
-
-}).call(Document.prototype);
-
-exports.Document = Document;
-});
-
-define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-var EventEmitter = {};
-var stopPropagation = function() { this.propagationStopped = true; };
-var preventDefault = function() { this.defaultPrevented = true; };
-
-EventEmitter._emit =
-EventEmitter._dispatchEvent = function(eventName, e) {
- this._eventRegistry || (this._eventRegistry = {});
- this._defaultHandlers || (this._defaultHandlers = {});
-
- var listeners = this._eventRegistry[eventName] || [];
- var defaultHandler = this._defaultHandlers[eventName];
- if (!listeners.length && !defaultHandler)
- return;
-
- if (typeof e != "object" || !e)
- e = {};
-
- if (!e.type)
- e.type = eventName;
- if (!e.stopPropagation)
- e.stopPropagation = stopPropagation;
- if (!e.preventDefault)
- e.preventDefault = preventDefault;
-
- listeners = listeners.slice();
- for (var i=0; i<listeners.length; i++) {
- listeners[i](e, this);
- if (e.propagationStopped)
- break;
- }
-
- if (defaultHandler && !e.defaultPrevented)
- return defaultHandler(e, this);
-};
-
-
-EventEmitter._signal = function(eventName, e) {
- var listeners = (this._eventRegistry || {})[eventName];
- if (!listeners)
- return;
- listeners = listeners.slice();
- for (var i=0; i<listeners.length; i++)
- listeners[i](e, this);
-};
-
-EventEmitter.once = function(eventName, callback) {
- var _self = this;
- callback && this.addEventListener(eventName, function newCallback() {
- _self.removeEventListener(eventName, newCallback);
- callback.apply(null, arguments);
- });
-};
-
-
-EventEmitter.setDefaultHandler = function(eventName, callback) {
- var handlers = this._defaultHandlers
- if (!handlers)
- handlers = this._defaultHandlers = {_disabled_: {}};
-
- if (handlers[eventName]) {
- var old = handlers[eventName];
- var disabled = handlers._disabled_[eventName];
- if (!disabled)
- handlers._disabled_[eventName] = disabled = [];
- disabled.push(old);
- var i = disabled.indexOf(callback);
- if (i != -1)
- disabled.splice(i, 1);
- }
- handlers[eventName] = callback;
-};
-EventEmitter.removeDefaultHandler = function(eventName, callback) {
- var handlers = this._defaultHandlers
- if (!handlers)
- return;
- var disabled = handlers._disabled_[eventName];
-
- if (handlers[eventName] == callback) {
- var old = handlers[eventName];
- if (disabled)
- this.setDefaultHandler(eventName, disabled.pop());
- } else if (disabled) {
- var i = disabled.indexOf(callback);
- if (i != -1)
- disabled.splice(i, 1);
- }
-};
-
-EventEmitter.on =
-EventEmitter.addEventListener = function(eventName, callback, capturing) {
- this._eventRegistry = this._eventRegistry || {};
-
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- listeners = this._eventRegistry[eventName] = [];
-
- if (listeners.indexOf(callback) == -1)
- listeners[capturing ? "unshift" : "push"](callback);
- return callback;
-};
-
-EventEmitter.off =
-EventEmitter.removeListener =
-EventEmitter.removeEventListener = function(eventName, callback) {
- this._eventRegistry = this._eventRegistry || {};
-
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- return;
-
- var index = listeners.indexOf(callback);
- if (index !== -1)
- listeners.splice(index, 1);
-};
-
-EventEmitter.removeAllListeners = function(eventName) {
- if (this._eventRegistry) this._eventRegistry[eventName] = [];
-};
-
-exports.EventEmitter = EventEmitter;
-
-});
-
-define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-var comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-var Range = function(startRow, startColumn, endRow, endColumn) {
- this.start = {
- row: startRow,
- column: startColumn
- };
-
- this.end = {
- row: endRow,
- column: endColumn
- };
-};
-
-(function() {
- this.isEqual = function(range) {
- return this.start.row === range.start.row &&
- this.end.row === range.end.row &&
- this.start.column === range.start.column &&
- this.end.column === range.end.column;
- };
- this.toString = function() {
- return ("Range: [" + this.start.row + "/" + this.start.column +
- "] -> [" + this.end.row + "/" + this.end.column + "]");
- };
-
- this.contains = function(row, column) {
- return this.compare(row, column) == 0;
- };
- this.compareRange = function(range) {
- var cmp,
- end = range.end,
- start = range.start;
-
- cmp = this.compare(end.row, end.column);
- if (cmp == 1) {
- cmp = this.compare(start.row, start.column);
- if (cmp == 1) {
- return 2;
- } else if (cmp == 0) {
- return 1;
- } else {
- return 0;
- }
- } else if (cmp == -1) {
- return -2;
- } else {
- cmp = this.compare(start.row, start.column);
- if (cmp == -1) {
- return -1;
- } else if (cmp == 1) {
- return 42;
- } else {
- return 0;
- }
- }
- };
- this.comparePoint = function(p) {
- return this.compare(p.row, p.column);
- };
- this.containsRange = function(range) {
- return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- };
- this.intersects = function(range) {
- var cmp = this.compareRange(range);
- return (cmp == -1 || cmp == 0 || cmp == 1);
- };
- this.isEnd = function(row, column) {
- return this.end.row == row && this.end.column == column;
- };
- this.isStart = function(row, column) {
- return this.start.row == row && this.start.column == column;
- };
- this.setStart = function(row, column) {
- if (typeof row == "object") {
- this.start.column = row.column;
- this.start.row = row.row;
- } else {
- this.start.row = row;
- this.start.column = column;
- }
- };
- this.setEnd = function(row, column) {
- if (typeof row == "object") {
- this.end.column = row.column;
- this.end.row = row.row;
- } else {
- this.end.row = row;
- this.end.column = column;
- }
- };
- this.inside = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column) || this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideStart = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideEnd = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.compare = function(row, column) {
- if (!this.isMultiLine()) {
- if (row === this.start.row) {
- return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
- };
- }
-
- if (row < this.start.row)
- return -1;
-
- if (row > this.end.row)
- return 1;
-
- if (this.start.row === row)
- return column >= this.start.column ? 0 : -1;
-
- if (this.end.row === row)
- return column <= this.end.column ? 0 : 1;
-
- return 0;
- };
- this.compareStart = function(row, column) {
- if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareEnd = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareInside = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.clipRows = function(firstRow, lastRow) {
- if (this.end.row > lastRow)
- var end = {row: lastRow + 1, column: 0};
- else if (this.end.row < firstRow)
- var end = {row: firstRow, column: 0};
-
- if (this.start.row > lastRow)
- var start = {row: lastRow + 1, column: 0};
- else if (this.start.row < firstRow)
- var start = {row: firstRow, column: 0};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
- this.extend = function(row, column) {
- var cmp = this.compare(row, column);
-
- if (cmp == 0)
- return this;
- else if (cmp == -1)
- var start = {row: row, column: column};
- else
- var end = {row: row, column: column};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
-
- this.isEmpty = function() {
- return (this.start.row === this.end.row && this.start.column === this.end.column);
- };
- this.isMultiLine = function() {
- return (this.start.row !== this.end.row);
- };
- this.clone = function() {
- return Range.fromPoints(this.start, this.end);
- };
- this.collapseRows = function() {
- if (this.end.column == 0)
- return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
- else
- return new Range(this.start.row, 0, this.end.row, 0)
- };
- this.toScreenRange = function(session) {
- var screenPosStart = session.documentToScreenPosition(this.start);
- var screenPosEnd = session.documentToScreenPosition(this.end);
-
- return new Range(
- screenPosStart.row, screenPosStart.column,
- screenPosEnd.row, screenPosEnd.column
- );
- };
- this.moveBy = function(row, column) {
- this.start.row += row;
- this.start.column += column;
- this.end.row += row;
- this.end.column += column;
- };
-
-}).call(Range.prototype);
-Range.fromPoints = function(start, end) {
- return new Range(start.row, start.column, end.row, end.column);
-};
-Range.comparePoints = comparePoints;
-
-Range.comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-
-
-exports.Range = Range;
-});
-
-define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-
-var Anchor = exports.Anchor = function(doc, row, column) {
- this.$onChange = this.onChange.bind(this);
- this.attach(doc);
-
- if (typeof column == "undefined")
- this.setPosition(row.row, row.column);
- else
- this.setPosition(row, column);
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
- this.getPosition = function() {
- return this.$clipPositionToDocument(this.row, this.column);
- };
- this.getDocument = function() {
- return this.document;
- };
- this.$insertRight = false;
- this.onChange = function(e) {
- var delta = e.data;
- var range = delta.range;
-
- if (range.start.row == range.end.row && range.start.row != this.row)
- return;
-
- if (range.start.row > this.row)
- return;
-
- if (range.start.row == this.row && range.start.column > this.column)
- return;
-
- var row = this.row;
- var column = this.column;
- var start = range.start;
- var end = range.end;
-
- if (delta.action === "insertText") {
- if (start.row === row && start.column <= column) {
- if (start.column === column && this.$insertRight) {
- } else if (start.row === end.row) {
- column += end.column - start.column;
- } else {
- column -= start.column;
- row += end.row - start.row;
- }
- } else if (start.row !== end.row && start.row < row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "insertLines") {
- if (start.row <= row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "removeText") {
- if (start.row === row && start.column < column) {
- if (end.column >= column)
- column = start.column;
- else
- column = Math.max(0, column - (end.column - start.column));
-
- } else if (start.row !== end.row && start.row < row) {
- if (end.row === row)
- column = Math.max(0, column - end.column) + start.column;
- row -= (end.row - start.row);
- } else if (end.row === row) {
- row -= end.row - start.row;
- column = Math.max(0, column - end.column) + start.column;
- }
- } else if (delta.action == "removeLines") {
- if (start.row <= row) {
- if (end.row <= row)
- row -= end.row - start.row;
- else {
- row = start.row;
- column = 0;
- }
- }
- }
-
- this.setPosition(row, column, true);
- };
- this.setPosition = function(row, column, noClip) {
- var pos;
- if (noClip) {
- pos = {
- row: row,
- column: column
- };
- } else {
- pos = this.$clipPositionToDocument(row, column);
- }
-
- if (this.row == pos.row && this.column == pos.column)
- return;
-
- var old = {
- row: this.row,
- column: this.column
- };
-
- this.row = pos.row;
- this.column = pos.column;
- this._emit("change", {
- old: old,
- value: pos
- });
- };
- this.detach = function() {
- this.document.removeEventListener("change", this.$onChange);
- };
- this.attach = function(doc) {
- this.document = doc || this.document;
- this.document.on("change", this.$onChange);
- };
- this.$clipPositionToDocument = function(row, column) {
- var pos = {};
-
- if (row >= this.document.getLength()) {
- pos.row = Math.max(0, this.document.getLength() - 1);
- pos.column = this.document.getLine(pos.row).length;
- }
- else if (row < 0) {
- pos.row = 0;
- pos.column = 0;
- }
- else {
- pos.row = row;
- pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
- }
-
- if (column < 0)
- pos.column = 0;
-
- return pos;
- };
-
-}).call(Anchor.prototype);
-
-});
-
-define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-exports.stringReverse = function(string) {
- return string.split("").reverse().join("");
-};
-
-exports.stringRepeat = function (string, count) {
- var result = '';
- while (count > 0) {
- if (count & 1)
- result += string;
-
- if (count >>= 1)
- string += string;
- }
- return result;
-};
-
-var trimBeginRegexp = /^\s\s*/;
-var trimEndRegexp = /\s\s*$/;
-
-exports.stringTrimLeft = function (string) {
- return string.replace(trimBeginRegexp, '');
-};
-
-exports.stringTrimRight = function (string) {
- return string.replace(trimEndRegexp, '');
-};
-
-exports.copyObject = function(obj) {
- var copy = {};
- for (var key in obj) {
- copy[key] = obj[key];
- }
- return copy;
-};
-
-exports.copyArray = function(array){
- var copy = [];
- for (var i=0, l=array.length; i<l; i++) {
- if (array[i] && typeof array[i] == "object")
- copy[i] = this.copyObject( array[i] );
- else
- copy[i] = array[i];
- }
- return copy;
-};
-
-exports.deepCopy = function (obj) {
- if (typeof obj != "object") {
- return obj;
- }
-
- var copy = obj.constructor();
- for (var key in obj) {
- if (typeof obj[key] == "object") {
- copy[key] = this.deepCopy(obj[key]);
- } else {
- copy[key] = obj[key];
- }
- }
- return copy;
-};
-
-exports.arrayToMap = function(arr) {
- var map = {};
- for (var i=0; i<arr.length; i++) {
- map[arr[i]] = 1;
- }
- return map;
-
-};
-
-exports.createMap = function(props) {
- var map = Object.create(null);
- for (var i in props) {
- map[i] = props[i];
- }
- return map;
-};
-exports.arrayRemove = function(array, value) {
- for (var i = 0; i <= array.length; i++) {
- if (value === array[i]) {
- array.splice(i, 1);
- }
- }
-};
-
-exports.escapeRegExp = function(str) {
- return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
-};
-
-exports.escapeHTML = function(str) {
- return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
-};
-
-exports.getMatchOffsets = function(string, regExp) {
- var matches = [];
-
- string.replace(regExp, function(str) {
- matches.push({
- offset: arguments[arguments.length-2],
- length: str.length
- });
- });
-
- return matches;
-};
-exports.deferredCall = function(fcn) {
-
- var timer = null;
- var callback = function() {
- timer = null;
- fcn();
- };
-
- var deferred = function(timeout) {
- deferred.cancel();
- timer = setTimeout(callback, timeout || 0);
- return deferred;
- };
-
- deferred.schedule = deferred;
-
- deferred.call = function() {
- this.cancel();
- fcn();
- return deferred;
- };
-
- deferred.cancel = function() {
- clearTimeout(timer);
- timer = null;
- return deferred;
- };
-
- return deferred;
-};
-
-
-exports.delayedCall = function(fcn, defaultTimeout) {
- var timer = null;
- var callback = function() {
- timer = null;
- fcn();
- };
-
- var _self = function(timeout) {
- timer && clearTimeout(timer);
- timer = setTimeout(callback, timeout || defaultTimeout);
- };
-
- _self.delay = _self;
- _self.schedule = function(timeout) {
- if (timer == null)
- timer = setTimeout(callback, timeout || 0);
- };
-
- _self.call = function() {
- this.cancel();
- fcn();
- };
-
- _self.cancel = function() {
- timer && clearTimeout(timer);
- timer = null;
- };
-
- _self.isPending = function() {
- return timer;
- };
-
- return _self;
-};
-});
-
-define('ace/mode/json/json_parse', ['require', 'exports', 'module' ], function(require, exports, module) {
-
- var at, // The index of the current character
- ch, // The current character
- escapee = {
- '"': '"',
- '\\': '\\',
- '/': '/',
- b: '\b',
- f: '\f',
- n: '\n',
- r: '\r',
- t: '\t'
- },
- text,
-
- error = function (m) {
-
- throw {
- name: 'SyntaxError',
- message: m,
- at: at,
- text: text
- };
- },
-
- next = function (c) {
-
- if (c && c !== ch) {
- error("Expected '" + c + "' instead of '" + ch + "'");
- }
-
- ch = text.charAt(at);
- at += 1;
- return ch;
- },
-
- number = function () {
-
- var number,
- string = '';
-
- if (ch === '-') {
- string = '-';
- next('-');
- }
- while (ch >= '0' && ch <= '9') {
- string += ch;
- next();
- }
- if (ch === '.') {
- string += '.';
- while (next() && ch >= '0' && ch <= '9') {
- string += ch;
- }
- }
- if (ch === 'e' || ch === 'E') {
- string += ch;
- next();
- if (ch === '-' || ch === '+') {
- string += ch;
- next();
- }
- while (ch >= '0' && ch <= '9') {
- string += ch;
- next();
- }
- }
- number = +string;
- if (isNaN(number)) {
- error("Bad number");
- } else {
- return number;
- }
- },
-
- string = function () {
-
- var hex,
- i,
- string = '',
- uffff;
-
- if (ch === '"') {
- while (next()) {
- if (ch === '"') {
- next();
- return string;
- } else if (ch === '\\') {
- next();
- if (ch === 'u') {
- uffff = 0;
- for (i = 0; i < 4; i += 1) {
- hex = parseInt(next(), 16);
- if (!isFinite(hex)) {
- break;
- }
- uffff = uffff * 16 + hex;
- }
- string += String.fromCharCode(uffff);
- } else if (typeof escapee[ch] === 'string') {
- string += escapee[ch];
- } else {
- break;
- }
- } else {
- string += ch;
- }
- }
- }
- error("Bad string");
- },
-
- white = function () {
-
- while (ch && ch <= ' ') {
- next();
- }
- },
-
- word = function () {
-
- switch (ch) {
- case 't':
- next('t');
- next('r');
- next('u');
- next('e');
- return true;
- case 'f':
- next('f');
- next('a');
- next('l');
- next('s');
- next('e');
- return false;
- case 'n':
- next('n');
- next('u');
- next('l');
- next('l');
- return null;
- }
- error("Unexpected '" + ch + "'");
- },
-
- value, // Place holder for the value function.
-
- array = function () {
-
- var array = [];
-
- if (ch === '[') {
- next('[');
- white();
- if (ch === ']') {
- next(']');
- return array; // empty array
- }
- while (ch) {
- array.push(value());
- white();
- if (ch === ']') {
- next(']');
- return array;
- }
- next(',');
- white();
- }
- }
- error("Bad array");
- },
-
- object = function () {
-
- var key,
- object = {};
-
- if (ch === '{') {
- next('{');
- white();
- if (ch === '}') {
- next('}');
- return object; // empty object
- }
- while (ch) {
- key = string();
- white();
- next(':');
- if (Object.hasOwnProperty.call(object, key)) {
- error('Duplicate key "' + key + '"');
- }
- object[key] = value();
- white();
- if (ch === '}') {
- next('}');
- return object;
- }
- next(',');
- white();
- }
- }
- error("Bad object");
- };
-
- value = function () {
-
- white();
- switch (ch) {
- case '{':
- return object();
- case '[':
- return array();
- case '"':
- return string();
- case '-':
- return number();
- default:
- return ch >= '0' && ch <= '9' ? number() : word();
- }
- };
-
- return function (source, reviver) {
- var result;
-
- text = source;
- at = 0;
- ch = ' ';
- result = value();
- white();
- if (ch) {
- error("Syntax error");
- }
-
- return typeof reviver === 'function' ? function walk(holder, key) {
- var k, v, value = holder[key];
- if (value && typeof value === 'object') {
- for (k in value) {
- if (Object.hasOwnProperty.call(value, k)) {
- v = walk(value, k);
- if (v !== undefined) {
- value[k] = v;
- } else {
- delete value[k];
- }
- }
- }
- }
- return reviver.call(holder, key, value);
- }({'': result}, '') : result;
- };
-});
diff --git a/share/www/fauxton/js/require.js b/share/www/fauxton/js/require.js
deleted file mode 100644
index b3552a8a9..000000000
--- a/share/www/fauxton/js/require.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var requirejs,require,define;!function(global){function isFunction(a){return"[object Function]"===ostring.call(a)}function isArray(a){return"[object Array]"===ostring.call(a)}function each(a,b){if(a){var c;for(c=0;c<a.length&&(!a[c]||!b(a[c],c,a));c+=1);}}function eachReverse(a,b){if(a){var c;for(c=a.length-1;c>-1&&(!a[c]||!b(a[c],c,a));c-=1);}}function hasProp(a,b){return hasOwn.call(a,b)}function getOwn(a,b){return hasProp(a,b)&&a[b]}function eachProp(a,b){var c;for(c in a)if(hasProp(a,c)&&b(a[c],c))break}function mixin(a,b,c,d){return b&&eachProp(b,function(b,e){(c||!hasProp(a,e))&&(d&&"string"!=typeof b?(a[e]||(a[e]={}),mixin(a[e],b,c,d)):a[e]=b)}),a}function bind(a,b){return function(){return b.apply(a,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(a){throw a}function getGlobal(a){if(!a)return a;var b=global;return each(a.split("."),function(a){b=b[a]}),b}function makeError(a,b,c,d){var e=new Error(b+"\nhttp://requirejs.org/docs/errors.html#"+a);return e.requireType=a,e.requireModules=d,c&&(e.originalError=c),e}function newContext(a){function b(a){var b,c;for(b=0;a[b];b+=1)if(c=a[b],"."===c)a.splice(b,1),b-=1;else if(".."===c){if(1===b&&(".."===a[2]||".."===a[0]))break;b>0&&(a.splice(b-1,2),b-=2)}}function c(a,c,d){var e,f,g,h,i,j,k,l,m,n,o,p=c&&c.split("/"),q=p,r=x.map,s=r&&r["*"];if(a&&"."===a.charAt(0)&&(c?(q=getOwn(x.pkgs,c)?p=[c]:p.slice(0,p.length-1),a=q.concat(a.split("/")),b(a),f=getOwn(x.pkgs,e=a[0]),a=a.join("/"),f&&a===e+"/"+f.main&&(a=e)):0===a.indexOf("./")&&(a=a.substring(2))),d&&r&&(p||s)){for(h=a.split("/"),i=h.length;i>0;i-=1){if(k=h.slice(0,i).join("/"),p)for(j=p.length;j>0;j-=1)if(g=getOwn(r,p.slice(0,j).join("/")),g&&(g=getOwn(g,k))){l=g,m=i;break}if(l)break;!n&&s&&getOwn(s,k)&&(n=getOwn(s,k),o=i)}!l&&n&&(l=n,m=o),l&&(h.splice(0,m,l),a=h.join("/"))}return a}function d(a){isBrowser&&each(scripts(),function(b){return b.getAttribute("data-requiremodule")===a&&b.getAttribute("data-requirecontext")===u.contextName?(b.parentNode.removeChild(b),!0):void 0})}function e(a){var b=getOwn(x.paths,a);return b&&isArray(b)&&b.length>1?(d(a),b.shift(),u.require.undef(a),u.require([a]),!0):void 0}function f(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function g(a,b,d,e){var g,h,i,j,k=null,l=b?b.name:null,m=a,n=!0,o="";return a||(n=!1,a="_@r"+(E+=1)),j=f(a),k=j[0],a=j[1],k&&(k=c(k,l,e),h=getOwn(C,k)),a&&(k?o=h&&h.normalize?h.normalize(a,function(a){return c(a,l,e)}):c(a,l,e):(o=c(a,l,e),j=f(o),k=j[0],o=j[1],d=!0,g=u.nameToUrl(o))),i=!k||h||d?"":"_unnormalized"+(F+=1),{prefix:k,name:o,parentMap:b,unnormalized:!!i,url:g,originalName:m,isDefine:n,id:(k?k+"!"+o:o)+i}}function h(a){var b=a.id,c=getOwn(y,b);return c||(c=y[b]=new u.Module(a)),c}function i(a,b,c){var d=a.id,e=getOwn(y,d);!hasProp(C,d)||e&&!e.defineEmitComplete?(e=h(a),e.error&&"error"===b?c(e.error):e.on(b,c)):"defined"===b&&c(C[d])}function j(a,b){var c=a.requireModules,d=!1;b?b(a):(each(c,function(b){var c=getOwn(y,b);c&&(c.error=a,c.events.error&&(d=!0,c.emit("error",a)))}),d||req.onError(a))}function k(){globalDefQueue.length&&(apsp.apply(B,[B.length-1,0].concat(globalDefQueue)),globalDefQueue=[])}function l(a){delete y[a],delete z[a]}function m(a,b,c){var d=a.map.id;a.error?a.emit("error",a.error):(b[d]=!0,each(a.depMaps,function(d,e){var f=d.id,g=getOwn(y,f);!g||a.depMatched[e]||c[f]||(getOwn(b,f)?(a.defineDep(e,C[f]),a.check()):m(g,b,c))}),c[d]=!0)}function n(){var a,b,c,f,g=1e3*x.waitSeconds,h=g&&u.startTime+g<(new Date).getTime(),i=[],k=[],l=!1,o=!0;if(!s){if(s=!0,eachProp(z,function(c){if(a=c.map,b=a.id,c.enabled&&(a.isDefine||k.push(c),!c.error))if(!c.inited&&h)e(b)?(f=!0,l=!0):(i.push(b),d(b));else if(!c.inited&&c.fetched&&a.isDefine&&(l=!0,!a.prefix))return o=!1}),h&&i.length)return c=makeError("timeout","Load timeout for modules: "+i,null,i),c.contextName=u.contextName,j(c);o&&each(k,function(a){m(a,{},{})}),h&&!f||!l||!isBrowser&&!isWebWorker||w||(w=setTimeout(function(){w=0,n()},50)),s=!1}}function o(a){hasProp(C,a[0])||h(g(a[0],null,!0)).init(a[1],a[2])}function p(a,b,c,d){a.detachEvent&&!isOpera?d&&a.detachEvent(d,b):a.removeEventListener(c,b,!1)}function q(a){var b=a.currentTarget||a.srcElement;return p(b,u.onScriptLoad,"load","onreadystatechange"),p(b,u.onScriptError,"error"),{node:b,id:b&&b.getAttribute("data-requiremodule")}}function r(){var a;for(k();B.length;){if(a=B.shift(),null===a[0])return j(makeError("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));o(a)}}var s,t,u,v,w,x={waitSeconds:7,baseUrl:"./",paths:{},pkgs:{},shim:{},config:{}},y={},z={},A={},B=[],C={},D={},E=1,F=1;return v={require:function(a){return a.require?a.require:a.require=u.makeRequire(a.map)},exports:function(a){return a.usingExports=!0,a.map.isDefine?a.exports?a.exports:a.exports=C[a.map.id]={}:void 0},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){var b,c=getOwn(x.pkgs,a.map.id);return b=c?getOwn(x.config,a.map.id+"/"+c.main):getOwn(x.config,a.map.id),b||{}},exports:C[a.map.id]}}},t=function(a){this.events=getOwn(A,a.id)||{},this.map=a,this.shim=getOwn(x.shim,a.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},t.prototype={init:function(a,b,c,d){d=d||{},this.inited||(this.factory=b,c?this.on("error",c):this.events.error&&(c=bind(this,function(a){this.emit("error",a)})),this.depMaps=a&&a.slice(0),this.errback=c,this.inited=!0,this.ignore=d.ignore,d.enabled||this.enabled?this.enable():this.check())},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0,u.startTime=(new Date).getTime();var a=this.map;return this.shim?(u.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return a.prefix?this.callPlugin():this.load()})),void 0):a.prefix?this.callPlugin():this.load()}},load:function(){var a=this.map.url;D[a]||(D[a]=!0,u.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id,d=this.depExports,e=this.exports,f=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(f)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{e=u.execCb(c,f,d,e)}catch(g){a=g}else e=u.execCb(c,f,d,e);if(this.map.isDefine&&(b=this.module,b&&void 0!==b.exports&&b.exports!==this.exports?e=b.exports:void 0===e&&this.usingExports&&(e=this.exports)),a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",j(this.error=a)}else e=f;this.exports=e,this.map.isDefine&&!this.ignore&&(C[c]=e,req.onResourceLoad&&req.onResourceLoad(u,this.map,this.depMaps)),l(c),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=this.map,b=a.id,d=g(a.prefix);this.depMaps.push(d),i(d,"defined",bind(this,function(d){var e,f,k,m=this.map.name,n=this.map.parentMap?this.map.parentMap.name:null,o=u.makeRequire(a.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(d.normalize&&(m=d.normalize(m,function(a){return c(a,n,!0)})||""),f=g(a.prefix+"!"+m,this.map.parentMap),i(f,"defined",bind(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),k=getOwn(y,f.id),k&&(this.depMaps.push(f),this.events.error&&k.on("error",bind(this,function(a){this.emit("error",a)})),k.enable()),void 0):(e=bind(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),e.error=bind(this,function(a){this.inited=!0,this.error=a,a.requireModules=[b],eachProp(y,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&l(a.map.id)}),j(a)}),e.fromText=bind(this,function(c,d){var f=a.name,i=g(f),k=useInteractive;d&&(c=d),k&&(useInteractive=!1),h(i),hasProp(x.config,b)&&(x.config[f]=x.config[b]);try{req.exec(c)}catch(l){return j(makeError("fromtexteval","fromText eval for "+b+" failed: "+l,l,[b]))}k&&(useInteractive=!0),this.depMaps.push(i),u.completeLoad(f),o([f],e)}),d.load(a.name,o,e,x),void 0)})),u.enable(d,this),this.pluginMaps[d.id]=d},enable:function(){z[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(a,b){var c,d,e;if("string"==typeof a){if(a=g(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[b]=a,e=getOwn(v,a.id))return this.depExports[b]=e(this),void 0;this.depCount+=1,i(a,"defined",bind(this,function(a){this.defineDep(b,a),this.check()})),this.errback&&i(a,"error",bind(this,this.errback))}c=a.id,d=y[c],hasProp(v,c)||!d||d.enabled||u.enable(a,this)})),eachProp(this.pluginMaps,bind(this,function(a){var b=getOwn(y,a.id);b&&!b.enabled&&u.enable(a,this)})),this.enabling=!1,this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]),c.push(b)},emit:function(a,b){each(this.events[a],function(a){a(b)}),"error"===a&&delete this.events[a]}},u={config:x,contextName:a,registry:y,defined:C,urlFetched:D,defQueue:B,Module:t,makeModuleMap:g,nextTick:req.nextTick,onError:j,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=x.pkgs,c=x.shim,d={paths:!0,config:!0,map:!0};eachProp(a,function(a,b){d[b]?"map"===b?(x.map||(x.map={}),mixin(x[b],a,!0,!0)):mixin(x[b],a,!0):x[b]=a}),a.shim&&(eachProp(a.shim,function(a,b){isArray(a)&&(a={deps:a}),!a.exports&&!a.init||a.exportsFn||(a.exportsFn=u.makeShimExports(a)),c[b]=a}),x.shim=c),a.packages&&(each(a.packages,function(a){var c;a="string"==typeof a?{name:a}:a,c=a.location,b[a.name]={name:a.name,location:c||a.name,main:(a.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}}),x.pkgs=b),eachProp(y,function(a,b){a.inited||a.map.unnormalized||(a.map=g(b))}),(a.deps||a.callback)&&u.require(a.deps||[],a.callback)},makeShimExports:function(a){function b(){var b;return a.init&&(b=a.init.apply(global,arguments)),b||a.exports&&getGlobal(a.exports)}return b},makeRequire:function(b,d){function e(c,f,i){var k,l,m;return d.enableBuildCallback&&f&&isFunction(f)&&(f.__requireJsBuild=!0),"string"==typeof c?isFunction(f)?j(makeError("requireargs","Invalid require call"),i):b&&hasProp(v,c)?v[c](y[b.id]):req.get?req.get(u,c,b,e):(l=g(c,b,!1,!0),k=l.id,hasProp(C,k)?C[k]:j(makeError("notloaded",'Module name "'+k+'" has not been loaded yet for context: '+a+(b?"":". Use require([])")))):(r(),u.nextTick(function(){r(),m=h(g(null,b)),m.skipMap=d.skipMap,m.init(c,f,i,{enabled:!0}),n()}),e)}return d=d||{},mixin(e,{isBrowser:isBrowser,toUrl:function(a){var d,e=a.lastIndexOf("."),f=a.split("/")[0],g="."===f||".."===f;return-1!==e&&(!g||e>1)&&(d=a.substring(e,a.length),a=a.substring(0,e)),u.nameToUrl(c(a,b&&b.id,!0),d,!0)},defined:function(a){return hasProp(C,g(a,b,!1,!0).id)},specified:function(a){return a=g(a,b,!1,!0).id,hasProp(C,a)||hasProp(y,a)}}),b||(e.undef=function(a){k();var c=g(a,b,!0),d=getOwn(y,a);delete C[a],delete D[c.url],delete A[a],d&&(d.events.defined&&(A[a]=d.events),l(a))}),e},enable:function(a){var b=getOwn(y,a.id);b&&h(a).enable()},completeLoad:function(a){var b,c,d,f=getOwn(x.shim,a)||{},g=f.exports;for(k();B.length;){if(c=B.shift(),null===c[0]){if(c[0]=a,b)break;b=!0}else c[0]===a&&(b=!0);o(c)}if(d=getOwn(y,a),!b&&!hasProp(C,a)&&d&&!d.inited){if(!(!x.enforceDefine||g&&getGlobal(g)))return e(a)?void 0:j(makeError("nodefine","No define call for "+a,null,[a]));o([a,f.deps||[],f.exportsFn])}n()},nameToUrl:function(a,b,c){var d,e,f,g,h,i,j,k,l;if(req.jsExtRegExp.test(a))k=a+(b||"");else{for(d=x.paths,e=x.pkgs,h=a.split("/"),i=h.length;i>0;i-=1){if(j=h.slice(0,i).join("/"),f=getOwn(e,j),l=getOwn(d,j)){isArray(l)&&(l=l[0]),h.splice(0,i,l);break}if(f){g=a===f.name?f.location+"/"+f.main:f.location,h.splice(0,i,g);break}}k=h.join("/"),k+=b||(/\?/.test(k)||c?"":".js"),k=("/"===k.charAt(0)||k.match(/^[\w\+\.\-]+:/)?"":x.baseUrl)+k}return x.urlArgs?k+((-1===k.indexOf("?")?"?":"&")+x.urlArgs):k},load:function(a,b){req.load(u,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||readyRegExp.test((a.currentTarget||a.srcElement).readyState)){interactiveScript=null;var b=q(a);u.completeLoad(b.id)}},onScriptError:function(a){var b=q(a);return e(b.id)?void 0:j(makeError("scripterror","Script error for: "+b.id,a,[b.id]))}},u.require=u.makeRequire(),u}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(a){return"interactive"===a.readyState?interactiveScript=a:void 0}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.6",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,apsp=ap.splice,isBrowser=!("undefined"==typeof window||!navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if("undefined"==typeof define){if("undefined"!=typeof requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}"undefined"==typeof require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(a,b,c,d){var e,f,g=defContextName;return isArray(a)||"string"==typeof a||(f=a,isArray(b)?(a=b,b=c,c=d):a=[]),f&&f.context&&(g=f.context),e=getOwn(contexts,g),e||(e=contexts[g]=req.s.newContext(g)),f&&e.configure(f),e.require(a,b,c)},req.config=function(a){return req(a)},req.nextTick="undefined"!=typeof setTimeout?function(a){setTimeout(a,4)}:function(a){a()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(a){req[a]=function(){var b=contexts[defContextName];return b.require[a].apply(b,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.load=function(a,b,c){var d,e=a&&a.config||{};if(isBrowser)return d=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script"),d.type=e.scriptType||"text/javascript",d.charset="utf-8",d.async=!0,d.setAttribute("data-requirecontext",a.contextName),d.setAttribute("data-requiremodule",b),!d.attachEvent||d.attachEvent.toString&&d.attachEvent.toString().indexOf("[native code")<0||isOpera?(d.addEventListener("load",a.onScriptLoad,!1),d.addEventListener("error",a.onScriptError,!1)):(useInteractive=!0,d.attachEvent("onreadystatechange",a.onScriptLoad)),d.src=c,currentlyAddingScript=d,baseElement?head.insertBefore(d,baseElement):head.appendChild(d),currentlyAddingScript=null,d;if(isWebWorker)try{importScripts(c),a.completeLoad(b)}catch(f){a.onError(makeError("importscripts","importScripts failed for "+b+" at "+c,f,[b]))}},isBrowser&&eachReverse(scripts(),function(a){return head||(head=a.parentNode),dataMain=a.getAttribute("data-main"),dataMain?(mainScript=dataMain,cfg.baseUrl||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0):void 0}),define=function(a,b,c){var d,e;"string"!=typeof a&&(c=b,b=a,a=null),isArray(b)||(c=b,b=null),!b&&isFunction(c)&&(b=[],c.length&&(c.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(a,c){b.push(c)}),b=(1===c.length?["require"]:["require","exports","module"]).concat(b))),useInteractive&&(d=currentlyAddingScript||getInteractiveScript(),d&&(a||(a=d.getAttribute("data-requiremodule")),e=contexts[d.getAttribute("data-requirecontext")])),(e?e.defQueue:globalDefQueue).push([a,b,c])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this),this.JST=this.JST||{},this.JST["app/templates/databases/item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<td>\n <a href="#/database/'+(null==(__t=encoded)?"":__t)+"/_all_docs?limit="+(null==(__t=docLimit)?"":__t)+'">'+(null==(__t=database.get("name"))?"":__t)+"</a>\n</td>\n<td>"+(null==(__t=database.status.humanSize())?"":__t)+"</td>\n<td>"+(null==(__t=database.status.numDocs())?"":__t)+"</td>\n<td>"+(null==(__t=database.status.updateSeq())?"":__t)+'</td>\n<td>\n <a class="db-actions btn fonticon-replicate set-replication-start" title="Replicate '+(null==(__t=database.get("name"))?"":__t)+'" href="#/replication/new/'+(null==(__t=encoded)?"":__t)+'"></a>\n <a class="db-actions btn icon-lock set-permissions" title="Set permissions for '+(null==(__t=database.get("name"))?"":__t)+'" href="#/database/'+(null==(__t=encoded)?"":__t)+'/permissions"></a>\n</td>\n';return __p},this.JST["app/templates/databases/list.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="result-tools" style="">\n <div id="newButton" class="pull-left"></div>\n <form id="jump-to-db" class="navbar-form pull-right input-append database-search">\n <input type="text" class="search-autocomplete" name="search-query" placeholder="Database name"></input>\n <button class="fonticon-search btn button red " type="submit"></button>\n </form>\n\n\n</div>\n<table class="databases table table-striped">\n <thead>\n <th>Name</th>\n <th>Size</th>\n <th># of Docs</th>\n <th>Update Seq</th>\n <th>Actions</th>\n </thead>\n <tbody>\n </tbody>\n</table>\n<div id="database-pagination"></div>\n';return __p},this.JST["app/templates/databases/newdatabase.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<a class="button new" id="new"><i class="icon fonticon-new-database"></i>Add New Database</a>\n\n\n';return __p},this.JST["app/templates/databases/sidebar.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="row-fluid">\n <a href="http://couchdb.org" target="_blank"><img src="img/couchdblogo.png"/></a>\n <br/>\n</div>\n<hr>\n<ul class="nav nav-list">\n <!-- <li class="nav-header">Database types</li> -->\n <li class="active"><a class="toggle-view" id="owned">Your databases</a></li>\n <li><a class="btn new" id="new"><i class="icon-plus"></i> New database</a></li>\n</ul>\n<hr>\n\n<div>\n <a class="twitter-timeline" data-dnt="true" href="https://twitter.com/CouchDB" data-widget-id="314360971646869505">Tweets by @CouchDB</a>\n<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>\n\n</div>\n';return __p},this.JST["app/templates/documents/advanced_options.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div class="errors-container"></div>\n<form class="view-query-update custom-inputs">\n <div class="controls-group">\n <div class="row-fluid">\n <div class="controls controls-row">\n <input name="key" class="span6" type="text" placeholder="Key">\n <input name="keys" class="span6" type="text" placeholder="Keys">\n </div>\n </div>\n <div class="row-fluid">\n <div class="controls controls-row">\n <input name="startkey" class="span6" type="text" placeholder="Start Key">\n <input name="endkey" class="span6" type="text" placeholder="End Key">\n </div>\n </div>\n </div>\n <div class="controls-group">\n <div class="row-fluid">\n <div class="controls controls-row">\n <div class="checkbox inline"> \n <input id="check1" type="checkbox" name="include_docs" value="true"> \n <label name="include_docs" for="check1">Include Docs</label> \n ',__p+=hasReduce?'\n <input id="check2" name="reduce" type="checkbox" value="true">\n <label for="check2">Reduce</label> \n </div> \n <label id="select1" class="drop-down inline">\n Group Level:\n <select id="select1" disabled name="group_level" class="input-small">\n <option value="0">None</option>\n <option value="1">1</option>\n <option value="2">2</option>\n <option value="3">3</option>\n <option value="4">4</option>\n <option value="5">5</option>\n <option value="6">6</option>\n <option value="7">7</option>\n <option value="8">8</option>\n <option value="9">9</option>\n <option value="999" selected="selected">exact</option>\n </select>\n </label>\n ':"\n </div>\n ",__p+='\n\n <div class="checkbox inline"> \n <input id="check3" name="stale" type="checkbox" value="ok">\n <label for="check3">Stale</label>\n <input id="check4" name="descending" type="checkbox" value="true"> \n <label for="check4">Descending</label> \n </div> \n <label class="drop-down inline">\n Limit:\n <select name="limit" class="input-small">\n <option>5</option>\n <option selected="selected">10</option>\n <option>25</option>\n <option>50</option>\n <option>100</option>\n </select>\n </label>\n <div class="checkbox inline"> \n <input id="check5" name="inclusive_end" type="checkbox" value="false">\n <label for="check5">Disable Inclusive End</label>\n <input id="check6" name="update_seq" type="checkbox" value="true"> \n <label for="check6">Update Sequence</label> \n </div>\n </div>\n </div>\n </div>\n <div class="controls-group">\n <div class="row-fluid">\n <div id="button-options" class="controls controls-row">\n <button type="submit" class="button green">Query</button>\n ',showPreview&&(__p+='\n <button class="button btn-info preview">Browser Preview</button>\n '),__p+="\n </div>\n </div>\n </div>\n</form>\n</div>\n\n";return __p},this.JST["app/templates/documents/all_docs_item.html"]=function(obj){obj||(obj={});{var __t,__p="",__e=_.escape;Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<td class="select"><input type="checkbox" class="row-select"></td>\n<td>\n <div>\n <pre class="prettyprint">'+__e(doc.prettyJSON())+"</pre>\n ",doc.isEditable()&&(__p+='\n <div class="btn-group">\n <a href="#'+(null==(__t=doc.url("web-index"))?"":__t)+'" class="btn btn-small edits">Edit '+(null==(__t=doc.docType())?"":__t)+'</a>\n <button href="#" class="btn btn-small btn-danger delete" title="Delete this document."><i class="icon icon-trash"></i></button>\n </div>\n '),__p+="\n </div>\n</td>\n";return __p},this.JST["app/templates/documents/all_docs_layout.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">\n <li><a id="toggle-query" class="fonticon-plus fonticon" href="#query" data-toggle="tab">Query Options</a></li>\n</ul>\n<div class="tab-content">\n <div class="tab-pane" id="query">\n </div>\n</div>\n';return __p},this.JST["app/templates/documents/all_docs_list.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="view show">\n ',viewList||(__p+='\n <div class="row">\n <div class="btn-toolbar span6">\n <button type="button" class="btn all" data-toggle="button">✓ All</button>\n <button class="btn btn-small disabled bulk-delete"><i class="icon-trash"></i></button>\n ',__p+=expandDocs?'\n <button id="collapse" class="btn"><i class="icon-minus"></i> Collapse</button>\n ':'\n <button id="collapse" class="btn"><i class="icon-plus"></i> Expand</button>\n ',__p+="\n </div>\n </div>\n "),__p+='\n <p>\n\n <div id="item-numbers"> </div>\n\n ',requestDuration&&(__p+='\n <span class="view-request-duration">\n View request duration: <strong> '+(null==(__t=requestDuration)?"":__t)+" </strong> \n </span>\n "),__p+='\n </p>\n <table class="all-docs table table-striped table-condensed">\n <tbody></tbody>\n </table>\n <div id="documents-pagination"></div>\n</div>\n';return __p},this.JST["app/templates/documents/all_docs_number.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n',__p+="unknown"===totalRows?'\n Showing 0 documents. <a href="#/database/'+(null==(__t=database)?"":__t)+'/new"> Create your first document.</a>\n':"\n Showing "+(null==(__t=offset)?"":__t)+" - "+(null==(__t=numModels)?"":__t)+" of "+(null==(__t=totalRows)?"":__t)+" rows\n",__p+="\n",updateSeq&&(__p+="\n -- Update Sequence: "+(null==(__t=updateSeq)?"":__t)+"\n"),__p+="\n";return __p},this.JST["app/templates/documents/changes.html"]=function(obj){obj||(obj={});{var __t,__p="",__e=_.escape;Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<table id="changes-table" class="table">\n <thead>\n <th id="seq"> seq </th>\n <th> id </th>\n <th id="changes"> changes </th>\n <th id="deleted"> deleted? </th>\n </thead>\n <tbody>\n ',_.each(changes,function(a){__p+="\n <tr>\n <td> "+(null==(__t=a.seq)?"":__t)+" </td>\n ",__p+=a.deleted?"\n <td> "+(null==(__t=a.id)?"":__t)+" </td>\n ":'\n <td> <a href="#'+(null==(__t=database.url("app"))?"":__t)+"/"+(null==(__t=a.id)?"":__t)+'">'+(null==(__t=a.id)?"":__t)+"</a> </td>\n ",__p+='\n <td> \n <pre class="prettyprint"> '+__e(JSON.stringify({changes:a.changes,doc:a.doc},null," "))+" </pre>\n </td>\n <td>"+(null==(__t=a.deleted?"true":"false")?"":__t)+"</td>\n </tr>\n "}),__p+="\n </tbody>\n</table>\n";return __p},this.JST["app/templates/documents/ddoc_info.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join
-}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div>\n <h2> Design Doc MetaData </h2>\n <div class="row-fluid">\n ',i=0,_.map(view_index,function(a,b){__p+="\n ",i%2==0&&(__p+='\n <div class="row-fluid">\n '),__p+='\n <div class="span6 well-item"><strong> '+(null==(__t=b)?"":__t)+"</strong> : "+(null==(__t=a)?"":__t)+" </div>\n ",i%2==1&&(__p+="\n </div>\n "),__p+="\n ",++i}),__p+="\n </div>\n</div>\n";return __p},this.JST["app/templates/documents/design_doc_selector.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div class="span3">\n <label for="ddoc">Save to Design Document <a href="'+(null==(__t=getDocUrl("design_doc"))?"":__t)+'" target="_blank"><i class="icon-question-sign"></i></a></label>\n <select id="ddoc">\n <optgroup label="Select a document">\n <option value="new-doc">New document</option>\n ',ddocs.each(function(a){__p+="\n ",__p+=a.id===ddocName?'\n <option selected="selected" value="'+(null==(__t=a.id)?"":__t)+'">'+(null==(__t=a.id)?"":__t)+"</option>\n ":'\n <option value="'+(null==(__t=a.id)?"":__t)+'">'+(null==(__t=a.id)?"":__t)+"</option>\n ",__p+="\n "}),__p+='\n </optgroup>\n </select>\n</div>\n\n<div id="new-ddoc-section" class="span5" style="display:none">\n <label class="control-label" for="new-ddoc"> _design/ </label>\n <div class="controls">\n <input type="text" id="new-ddoc" placeholder="newDesignDoc">\n </div>\n</div>\n';return __p},this.JST["app/templates/documents/doc.html"]=function(obj){obj||(obj={});{var __t,__p="",__e=_.escape;Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="doc">\n <div class="errors-container"></div>\n \n<div class="row doc-editor-buttons"> \n <div class="span3">\n <button class="save-doc button green btn-medium save fonticon-circle-check" type="button">Save</button>\n <button class="button cancel-button gray btn-medium">Back to _all_docs</button>\n </div>\n\n <div class="span7">\n ',attachments&&(__p+='\n <div class="btn-group">\n <a class="button gray btn-medium dropdown-toggle btn" data-bypass="true" data-toggle="dropdown" href="#">\n View Attachments\n <span class="caret"></span>\n </a>\n <ul class="dropdown-menu">\n ',_.each(attachments,function(a){__p+='\n <li>\n <a href="'+(null==(__t=a.url)?"":__t)+'" target="_blank"> <strong> '+(null==(__t=a.fileName)?"":__t)+" </strong> -\n <span> "+(null==(__t=a.contentType)?"":__t)+", "+(null==(__t=formatSize(a.size))?"":__t)+" </span>\n </a>\n </li>\n "}),__p+="\n </ul>\n </div>\n "),__p+=' \n <button class="button gray btn-medium upload"><i class="icon-circle-arrow-up"></i> Upload Attachment</button>\n <button class="button gray btn-medium duplicate"><i class="icon-repeat"></i> Duplicate document</button>\n </div>\n\n <button class="button red btn-medium delete"><i class="icon-trash"></i></button>\n </ul>\n\n<div id="upload-modal"> </div>\n<div id="duplicate-modal"> </div> \n</div>\n\n <div id="editor-container" class="doc-code">'+__e(JSON.stringify(doc.attributes,null," "))+"</div>\n\n</div>\n";return __p},this.JST["app/templates/documents/doc_field_editor.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="doc-field-editor">\n <div class="tools">\n\n <div class="btn-toolbar pull-left">\n <button class="btn btn-small all">&#x2713; All</button>\n <button class="btn btn-small disabled delete"><i class="icon-trash"></i> Delete field</button>\n <button class="btn btn-small new" style="margin-left: 64px"><i class="icon-plus"></i> New field</button>\n </div>\n <div class="btn-toolbar pull-right">\n <button class="btn btn-small cancel button cancel-button outlineGray fonticon-circle-x">Cancel</button>\n <button class="btn btn-small save button green fonticon-circle-check">Save</button>\n </div>\n </div>\n\n <div class="clearfix"></div>\n <!-- <hr style="margin-top: 0"/> -->\n\n <table class="table table-striped table-condensed">\n <thead>\n <tr>\n <th class="select">\n </th>\n <th>Key</th>\n <th>Value</th>\n </tr>\n </thead>\n <tbody>\n <tr style="display:none">\n <td class="select"><input type="checkbox" /></td>\n <td class="key"><input type="text" class="input-large" value=\'\' /></td>\n <td class="value"><input type="text" class="input-xxlarge" value=\'\' /></td>\n </tr>\n ',_.each(doc,function(a,b){__p+='\n <tr>\n <td class="select"><input type="checkbox" /></td>\n <td class="key">\n <input type="text" class="input-large" name="doc['+(null==(__t=b)?"":__t)+']" value="'+(null==(__t=b)?"":__t)+'" />\n </td>\n <td class="value"><input type="text" class="input-xxlarge" value=\''+(null==(__t=JSON.stringify(a))?"":__t)+"' /></td>\n </tr>\n "}),__p+='\n <tr>\n <th colspan="3">\n Attachments\n </th>\n </tr>\n ',_.each(attachments,function(a){__p+='\n <tr>\n <td class="select"><input type="checkbox" /></td>\n <td colspan="2">\n <a href="'+(null==(__t=a.url)?"":__t)+'" target="_blank"> '+(null==(__t=a.fileName)?"":__t)+" </a>\n <span> "+(null==(__t=a.contentType)?"":__t)+", "+(null==(__t=formatSize(a.size))?"":__t)+" </span>\n </td>\n </tr>\n "}),__p+='\n </tbody>\n </table>\n <a class="btn btn-small new" style="margin-left: 64px"><i class="icon-plus"></i> New field</a>\n\n</div>\n';return __p},this.JST["app/templates/documents/doc_field_editor_tabs.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<!--<ul class="nav nav-tabs">\n <li id="field_editor" class="'+(null==(__t=isSelectedClass("field_editor"))?"":__t)+'"><a href="#'+(null==(__t=doc.url("app"))?"":__t)+'/field_editor">Doc fields</a></li>\n <li id="code_editor" class="'+(null==(__t=isSelectedClass("code_editor"))?"":__t)+'"><a href="#'+(null==(__t=doc.url("app"))?"":__t)+'/code_editor"><i class="icon-pencil"> </i> Code editor</a>\n </li>\n</ul>-->\n';return __p},this.JST["app/templates/documents/duplicate_doc_modal.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="modal hide fade">\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\n <h3>Duplicate Document</h3>\n </div>\n <div class="modal-body">\n <div id="modal-error" class="hide alert alert-error"/>\n <form id="file-upload" class="form" method="post">\n <p class="help-block">\n Set new documents ID:\n </p>\n <input id="dup-id" type="text" class="input-xlarge">\n </form>\n\n </div>\n <div class="modal-footer">\n <a href="#" data-dismiss="modal" class="btn button cancel-button outlineGray fonticon-circle-x">Cancel</a>\n <a href="#" id="duplicate-btn" class="btn btn-primary button green save fonticon-circle-check">Duplicate</a>\n </div>\n</div>\n\n\n';return __p},this.JST["app/templates/documents/edit_tools.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="view show">\n <p>\n Showing 1-'+(null==(__t=numModels)?"":__t)+" of "+(null==(__t=totalRows)?"":__t)+" rows\n ",updateSeq&&(__p+="\n -- Update Sequence: "+(null==(__t=updateSeq)?"":__t)+"\n "),__p+="\n ",requestDuration&&(__p+='\n <span class="view-request-duration">\n View request duration: <strong> '+(null==(__t=requestDuration)?"":__t)+" </strong> \n </span>\n "),__p+='\n </p>\n <table class="all-docs table table-striped table-condensed">\n <tbody></tbody>\n </table>\n <!--\n <div class="pagination pagination-centered">\n <ul>\n <li class="disabled"><a href="#">&laquo;</a></li>\n <li class="active"><a href="#">1</a></li>\n <li><a href="#">2</a></li>\n <li><a href="#">3</a></li>\n <li><a href="#">4</a></li>\n <li><a href="#">5</a></li>\n <li><a href="#">&raquo;</a></li>\n </ul>\n </div>\n -->\n\n</div>\n';return __p},this.JST["app/templates/documents/index_menu_item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<a id="'+(null==(__t=ddoc_clean)?"":__t)+"_"+(null==(__t=index_clean)?"":__t)+'" href="#database/'+(null==(__t=database_encoded)?"":__t)+"/_design/"+(null==(__t=ddoc_encoded)?"":__t)+"/_view/"+(null==(__t=index_encoded)?"":__t)+'" class="toggle-view">\n '+(null==(__t=ddoc)?"":__t)+'<span class="divider">/</span>'+(null==(__t=index)?"":__t)+"\n</a>\n";return __p},this.JST["app/templates/documents/index_row_docular.html"]=function(obj){obj||(obj={});{var __t,__p="",__e=_.escape;Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<td class="select"><input type="checkbox"></td>\n<td>\n <div>\n <pre class="prettyprint">'+__e(doc.prettyJSON())+"</pre>\n ",doc.isEditable()&&(__p+='\n <div class="btn-group">\n <a href="#'+(null==(__t=doc.url("app"))?"":__t)+'" class="btn btn-small edits">Edit '+(null==(__t=doc.docType())?"":__t)+'</a>\n <button href="#" class="btn btn-small btn-danger delete" title="Delete this document."><i class="icon icon-trash"></i></button>\n </div>\n '),__p+="\n </div>\n</td>\n";return __p},this.JST["app/templates/documents/index_row_tabular.html"]=function(obj){obj||(obj={});var __p="",__e=_.escape;with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<td class="select"><input type="checkbox"></td>\n<td>\n <div>\n <pre class="prettyprint">'+__e(JSON.stringify(doc.get("key")))+'</pre>\n </div>\n</td>\n<td>\n <div>\n <pre class="prettyprint">'+__e(JSON.stringify(doc.get("value")))+"</pre>\n </div>\n</td>\n";return __p},this.JST["app/templates/documents/jumpdoc.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<form id="jump-to-doc" class="form-inline input-append" >\n <input type="text" id="jump-to-doc-id" class="input-large" placeholder="Document ID"></input>\n\n <button class="fonticon-search btn button red " type="submit"></button>\n</form>\n';return __p},this.JST["app/templates/documents/search.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<input id="searchbox" type="text" class="span12" placeholder="Search by doc id, view key or search index">';return __p},this.JST["app/templates/documents/sidebar.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="sidenav">\n <header class="row-fluid">\n <div class="span12">\n <div class="btn-group">\n <button class="btn dropdown-toggle dropdown-toggle-btn" data-toggle="dropdown">\n Docs\n <span class="caret"></span>\n </button>\n <ul class="dropdown-menu">\n <!-- dropdown menu links -->\n <li><a class="icon-file" href="'+(null==(__t=db_url)?"":__t)+'">Docs</a></li>\n <li><a class="icon-lock" href="'+(null==(__t=permissions_url)?"":__t)+'">Permissions</a></li>\n <li><a class="icon-forward" href="'+(null==(__t=changes_url)?"":__t)+'">Changes</a></li>\n ',_.each(docLinks,function(a){__p+='\n <li><a class="'+(null==(__t=a.icon)?"":__t)+'" href="'+(null==(__t=database_url+"/"+a.url)?"":__t)+'">'+(null==(__t=a.title)?"":__t)+"</a></li>\n "}),__p+='\n </ul>\n </div>\n\n <div class="btn-group">\n <button class="btn dropdown-toggle dropdown-toggle-btn" data-toggle="dropdown">\n New\n <span class="caret"></span>\n </button>\n <ul class="dropdown-menu">\n <!-- dropdown menu links -->\n <li>\n <a id="doc" href="#'+(null==(__t=database.url("app"))?"":__t)+'/new">Document</a>\n </li>\n <li>\n <a href="#'+(null==(__t=database.url("app"))?"":__t)+'/new_view">Secondary Index</a>\n ',_.each(newLinks,function(a){__p+='\n <a href="#'+(null==(__t=database.url("app"))?"":__t)+"/"+(null==(__t=a.url)?"":__t)+'"> '+(null==(__t=a.name)?"":__t)+"</a>\n "}),__p+='\n </li>\n </ul>\n </div>\n <button id="delete-database" class="btn"><i class="icon-trash"></i> Database</button>\n </div>\n </header>\n\n <nav>\n <ul class="nav nav-list">\n <li class="active"><a id="all-docs" href="#'+(null==(__t=database.url("index"))?"":__t)+"?limit="+(null==(__t=docLimit)?"":__t)+'" class="toggle-view"> All documents</a></li>\n <li><a id="design-docs" href=\'#'+(null==(__t=database.url("index"))?"":__t)+"?limit="+(null==(__t=docLimit)?"":__t)+'&startkey="_design"&endkey="_e"\' class="toggle-view"> All design docs</a></li>\n </ul>\n <ul class="nav nav-list views">\n <li class="nav-header">Secondary Indexes</li>\n <li><a id="new-view" href="#'+(null==(__t=database.url("app"))?"":__t)+'/new_view" class="new"><i class="icon-plus"></i> New</a></li>\n </ul>\n <div id="extension-navs"></div>\n </nav>\n</div>\n';return __p},this.JST["app/templates/documents/tabs.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<ul class="nav nav-tabs">\n <li class="active"><a href="'+(null==(__t=db_url)?"":__t)+'">Docs</a></li>\n <li id="changes"><a href="'+(null==(__t=changes_url)?"":__t)+'">Changes</a></li>\n</ul>\n';return __p},this.JST["app/templates/documents/upload_modal.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="modal hide fade">\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\n <h3>Upload an Attachment</h3>\n </div>\n <div class="modal-body">\n <div id="modal-error" class="alert alert-error hide" style="font-size: 16px;"> </div>\n <form id="file-upload" class="form" method="post">\n <p class="help-block">\n Please select the file you want to upload as an attachment to this document. \n Please note that this will result in the immediate creation of a new revision of the document, \n so it\'s not necessary to save the document after the upload.\n </p>\n <input id="_attachments" type="file" name="_attachments">\n <input id="_rev" type="hidden" name="_rev" value="" >\n <br/>\n </form>\n\n <div class="progress progress-info">\n <div class="bar" style="width: 0%"></div>\n </div>\n </div>\n <div class="modal-footer">\n <a href="#" data-dismiss="modal" data-bypass="true" class="btn button cancel-button outlineGray fonticon-circle-x">Cancel</a>\n <a href="#" id="upload-btn" data-bypass="true" class="btn btn-primary button green save fonticon-circle-check">Upload</a>\n </div>\n</div>\n\n';return __p},this.JST["app/templates/documents/view_editor.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div class="row">\n <ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">\n <li class="active"> <a data-bypass="true" id="index-nav" class="fonticon-wrench fonticon" data-toggle="tab" href="#index">',__p+=newView?"Create Index ":"Edit Index ",__p+="</a></li>\n ",newView||(__p+='\n <li><a data-bypass="true" id="query-nav" class="fonticon-plus fonticon" href="#query" data-toggle="tab">Query Options</a></li>\n <li><a data-bypass="true" id="meta-nav" href="#metadata" data-toggle="tab">Design Doc Metadata</a></li>\n '),__p+='\n </ul>\n <div class="all-docs-list errors-container"></div>\n <div class="tab-content">\n <div class="tab-pane active" id="index">\n <div id="define-view" class="ddoc-alert well">\n <div class="errors-container"></div>\n <form class="form-horizontal view-query-save">\n\n <div class="control-group design-doc-group">\n </div>\n\n <div class="control-group">\n <label for="index-name">Index name <a href="'+(null==(__t=getDocUrl("view_functions"))?"":__t)+'" target="_blank"><i class="icon-question-sign"></i></a></label>\n <input type="text" id="index-name" value="'+(null==(__t=viewName)?"":__t)+'" placeholder="Index name" />\n </div>\n\n\n <div class="control-group">\n <label for="map-function">Map function <a href="'+(null==(__t=getDocUrl("map_functions"))?"":__t)+'" target="_blank"><i class="icon-question-sign"></i></a></label>\n ',__p+=newView?'\n <div class="js-editor" id="map-function">'+(null==(__t=langTemplates.map)?"":__t)+"</div>\n ":'\n <div class="js-editor" id="map-function">'+(null==(__t=ddoc.get("views")[viewName].map)?"":__t)+"</div>\n ",__p+='\n </div>\n\n\n <div class="control-group">\n <label for="reduce-function-selector">Reduce (optional) <a href="'+(null==(__t=getDocUrl("reduce_functions"))?"":__t)+'" target="_blank"><i class="icon-question-sign"></i></a></label>\n\n <select id="reduce-function-selector">\n <option value="" '+(null==(__t=reduceFunStr?"":'selected="selected"')?"":__t)+">None</option>\n ",_.each(["_sum","_count","_stats"],function(a){__p+='\n <option value="'+(null==(__t=a)?"":__t)+'" ',a==reduceFunStr&&(__p+="selected"),__p+=">"+(null==(__t=a)?"":__t)+"</option>\n "}),__p+='\n <option value="CUSTOM" ',isCustomReduce&&(__p+="selected"),__p+='>Custom Reduce function</option>\n </select>\n </div>\n\n <div class="control-group reduce-function">\n <label for="reduce-function">Custom Reduce function</label>\n ',__p+=newView?'\n <div class="js-editor" id="reduce-function">'+(null==(__t=langTemplates.reduce)?"":__t)+"</div>\n ":'\n <div class="js-editor" id="reduce-function">'+(null==(__t=ddoc.get("views")[viewName].reduce)?"":__t)+"</div>\n ",__p+='\n </div>\n\n <div class="control-group">\n <button class="button green save fonticon-circle-check">Save &amp; Build Index</button>\n <button class="button btn-info preview">Preview</button>\n ',newView||(__p+='\n <button class="button delete outlineGray fonticon-circle-x">Delete</button>\n '),__p+='\n </div>\n <div class="clearfix"></div>\n </form>\n </div>\n </div>\n <div class="tab-pane" id="metadata">\n <div id="ddoc-info" class="well"> </div>\n </div>\n <div class="tab-pane" id="query">\n </div>\n </div>\n</div>\n\n';return __p},this.JST["app/templates/fauxton/api_bar.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<button class="button api-url-btn">\n API URL \n <span class="fonticon-plus icon"></span>\n</button>\n<div class="api-navbar" style="display: none">\n <div class="input-prepend input-append">\n <span class="add-on">\n API reference\n <a href="'+(null==(__t=getDocUrl(documentation))?"":__t)+'" target="_blank">\n <i class="icon-question-sign"></i>\n </a>\n </span>\n <input type="text" class="input-xxlarge" value="'+(null==(__t=endpoint)?"":__t)+'">\n <a href="'+(null==(__t=endpoint)?"":__t)+'" target="_blank" class="btn">Show me</a>\n </div>\n</div>\n';return __p},this.JST["app/templates/fauxton/breadcrumbs.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj){__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<ul class="breadcrumb">\n ',_.each(_.initial(crumbs),function(a){__p+='\n <li>\n <a href="#'+(null==(__t=a.link)?"":__t)+'">'+(null==(__t=a.name)?"":__t)+'</a>\n <span class="divider fonticon fonticon-carrot"> </span>\n </li>\n '}),__p+="\n ";var last=_.last(crumbs)||{name:""};__p+='\n <li class="active">'+(null==(__t=last.name)?"":__t)+"</li>\n</ul>\n"}return __p},this.JST["app/templates/fauxton/footer.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<p>Fauxton on <a href="http://couchdb.apache.org/">Apache CouchDB</a> '+(null==(__t=version)?"":__t)+"</p>\n";return __p},this.JST["app/templates/fauxton/index_pagination.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="pagination pagination-centered">\n <ul>\n <li ',canShowPreviousfn()||(__p+=' class="disabled" '),__p+='>\n <a id="previous" href="#"> Previous </a>\n </li>\n <li ',canShowNextfn()||(__p+=' class="disabled" '),__p+='>\n <a id="next" href="#"> Next </a></li>\n </ul>\n</div>\n\n';return __p},this.JST["app/templates/fauxton/nav_bar.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="brand">\n <div class="burger">\n <div><!-- * --></div>\n <div><!-- * --></div>\n <div><!-- * --></div>\n </div>\n <div class="icon">Apache Fauxton</div>\n</div>\n\n<nav id="main_navigation">\n <ul id="nav-links" class="nav pull-right">\n ',_.each(navLinks,function(a){__p+="\n ",a.view||(__p+='\n <li data-nav-name= "'+(null==(__t=a.title)?"":__t)+'" >\n <a href="'+(null==(__t=a.href)?"":__t)+'">\n <span class="'+(null==(__t=a.icon)?"":__t)+' fonticon"></span>\n '+(null==(__t=a.title)?"":__t)+"\n </a>\n </li>\n ")
-}),__p+='\n </ul>\n\n <div id="footer-links">\n\n <ul id="bottom-nav-links" class="nav">\n <li data-nav-name= "Documentation">\n <a href="'+(null==(__t=getDocUrl("docs"))?"":__t)+'" target="_blank">\n <span class="fonticon-bookmark fonticon"></span>\n Documentation\n </a>\n </li>\n\n\n ',_.each(bottomNavLinks,function(a){__p+="\n ",a.view||(__p+='\n <li data-nav-name= "'+(null==(__t=a.title)?"":__t)+'">\n <a href="'+(null==(__t=a.href)?"":__t)+'">\n <span class="'+(null==(__t=a.icon)?"":__t)+' fonticon"></span>\n '+(null==(__t=a.title)?"":__t)+"\n </a>\n </li>\n ")}),__p+='\n </ul>\n\n <ul id="footer-nav-links" class="nav">\n ',_.each(footerNavLinks,function(a){__p+="\n ",a.view||(__p+='\n <li data-nav-name= "'+(null==(__t=a.title)?"":__t)+'">\n <a href="'+(null==(__t=a.href)?"":__t)+'">\n <span class="'+(null==(__t=a.icon)?"":__t)+' fonticon"></span>\n '+(null==(__t=a.title)?"":__t)+"\n </a>\n </li>\n ")}),__p+="\n </ul>\n\n </div>\n</nav>\n\n\n\n";return __p},this.JST["app/templates/fauxton/notification.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="alert alert-'+(null==(__t=type)?"":__t)+'">\n <button type="button" class="close" data-dismiss="alert">×</button>\n '+(null==(__t=msg)?"":__t)+"\n</div>\n";return __p},this.JST["app/templates/fauxton/pagination.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="pagination pagination-centered">\n <ul>\n ',__p+=page>1?'\n <li> <a href="'+(null==(__t=urlFun(page-1))?"":__t)+'">&laquo;</a></li>\n ':'\n <li class="disabled"> <a href="'+(null==(__t=urlFun(page))?"":__t)+'">&laquo;</a></li>\n ',__p+="\n ",_.each(_.range(1,totalPages+1),function(a){__p+="\n <li ",page==a&&(__p+='class="active"'),__p+='> <a href="'+(null==(__t=urlFun(a))?"":__t)+'">'+(null==(__t=a)?"":__t)+"</a></li>\n "}),__p+="\n ",__p+=totalPages>page?'\n <li><a href="'+(null==(__t=urlFun(page+1))?"":__t)+'">&raquo;</a></li>\n ':'\n <li class="disabled"> <a href="'+(null==(__t=urlFun(page))?"":__t)+'">&raquo;</a></li>\n ',__p+="\n </ul>\n</div>\n";return __p},this.JST["app/templates/layouts/one_pane.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid one-pane">\n <div class="fixed-header">\n <div id="breadcrumbs"></div>\n <div id="api-navbar"></div>\n </div>\n\n\n <div class="row-fluid content-area">\n <div id="tabs" class="row"></div>\n <div id="dashboard-content" class="window-resizeable"></div>\n </div>\n</div>\n\n';return __p},this.JST["app/templates/layouts/one_pane_notabs.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid one-pane">\n <div class="fixed-header">\n <div id="breadcrumbs"></div>\n <div id="api-navbar"></div>\n </div>\n\n\n <div class="row-fluid content-area">\n <div id="dashboard-content" class="window-resizeable"></div>\n </div>\n</div>\n\n';return __p},this.JST["app/templates/layouts/two_pane.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid">\n <div class="fixed-header">\n <div id="breadcrumbs"></div>\n <div id="api-navbar"></div>\n </div>\n\n\n <div class="row-fluid content-area">\n <div id="tabs" class="row"></div>\n <div id="left-content" class="span6"></div>\n <div id="right-content" class="span6"></div>\n </div>\n</div>\n\n';return __p},this.JST["app/templates/layouts/with_right_sidebar.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid">\n <div class="fixed-header">\n <div id="breadcrumbs"></div>\n <div id="api-navbar"></div>\n </div>\n <div class="with-sidebar-right content-area">\n <div id="dashboard-content" class="list"></div>\n <div id="sidebar-content" class="sidebar pull-right window-resizeable"></div>\n </div>\n</div>\n\n';return __p},this.JST["app/templates/layouts/with_sidebar.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid">\n<header class="fixed-header">\n <div id="breadcrumbs"></div>\n <div id="api-navbar"></div>\n</header>\n <div class="with-sidebar content-area">\n <div id="sidebar-content" class="sidebar"></div>\n <div id="dashboard-content" class="list window-resizeable"></div>\n </div>\n</div>\n\n';return __p},this.JST["app/templates/layouts/with_tabs.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid">\n\n<div class="fixed-header">\n <div id="breadcrumbs"></div>\n <div id="api-navbar"></div>\n</div>\n\n <div class="row-fluid content-area">\n <div id="tabs" class="row-fluid"></div>\n <div id="dashboard-content" class="list span12 window-resizeable"></div>\n </div>\n\n\n';return __p},this.JST["app/templates/layouts/with_tabs_sidebar.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid">\n\n<header class="fixed-header">\n <div id="breadcrumbs"></div>\n <div id="api-navbar"></div>\n</header>\n\n\n <div class="with-sidebar content-area">\n\n <div id="tabs" class="row-fluid"></div>\n\n <aside id="sidebar-content" class="sidebar"></aside>\n\n <section id="dashboard-content" class="list pull-right window-resizeable">\n <div class="inner">\n <div id="dashboard-upper-menu" class="window-resizeable"></div>\n <div id="dashboard-upper-content"></div>\n\n <div id="dashboard-lower-content"></div>\n </div>\n </section>\n\n </div>\n\n\n';return __p},this.JST["app/addons/account/templates/accountactivity.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+="<header>\n ",user.noHistory()?__p+="\n <h2>Here's your usage so far this month.</h2>\n ":(__p+='\n <p class="lead usage-links ',past&&(__p+=" past-active "),__p+='">Your usage: \n <!-- <a class="current-month" href="#">So far this month</a> | <a class="last-month" href="#/history/2013/'+(null==(__t=month)?"":__t)+'">Last month</a> -->\n <div class="btn-group usage-links-toggle" data-toggle="buttons-radio">\n <button type="button" class="button active" value="current-month" data-url="#/account/usage" >So far this month</button>\n <button type="button" class="button" value"last-month" data-url="#/account/usage/'+(null==(__t=year)?"":__t)+"/"+(null==(__t=month)?"":__t)+'">Last month</button>\n </div>\n </p>\n '),__p+='\n <div id="messaging"></div>\n</header>\n\n<section id="summary" class="row activity-pane">\n <div id="tabs-container">\n <div id="bill" class="row-fluid"></div>\n <div id="usage" class=""></div>\n </div>\n</section>\n';return __p},this.JST["app/addons/account/templates/accountdashboard.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid accountDash">\n <div class="with-sidebar content-area">\n <div id="sidebar-content" class="sidebar"></div>\n <div id="dashboard-content" class="list window-resizeable"></div>\n </div>\n</div>\n';return __p},this.JST["app/addons/account/templates/accountinfo.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<header>\n <h2>Account information</h2>\n</header>\n<form id="accountinfoForm">\n <div class="controls controls-row">\n <label for="firstname">First name</label>\n <input type="text" id="firstname" name="first_name" tabindex="1" placeholder="name here" value="'+(null==(__t=first)?"":__t)+'">\n </div>\n\n <div class="controls controls-row">\n <label for="lastname">Last Name</label>\n <input type="text" id="lastname" name="last_name" tabindex="2" placeholder="Last name" value="'+(null==(__t=last)?"":__t)+'">\n </div>\n\n <div class="controls controls-row">\n <label for="company">Company</label>\n <input type="text" id="company" name="company" tabindex="3" placeholder="your company" value="'+(null==(__t=company)?"":__t)+'">\n </div>\n\n <div class="controls controls-row">\n <label for="email">Email</label>\n <input type="text" id="email" name="email" tabindex="4" placeholder="info@cloudant.com" value="'+(null==(__t=email)?"":__t)+'">\n </div>\n\n <div class="form-actions">\n <input class="button green" type="submit" tabindex="5" value="Save Changes"/>\n </div>\n</form>\n\n';return __p},this.JST["app/addons/account/templates/activitytabs.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div id="bill" class="row-fluid"></div>\n<div id="usage" class=""></div>\n';return __p},this.JST["app/addons/account/templates/announcements.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='\n<header>\n <h2>Welcome to the new Cloudant Dashboard</h2>\n <p>December 18, 2013</p>\n <p>\n Before we get to what’s new, a little business: if for some reason you need to use it, the <a href="https://cloudant.com/dashboard" target="_blank">old Cloudant dashboard</a> will remain online until March 2014. (For security reasons, you\'ll need to sign in again.)\n </p>\n</header>\n <div class="activity-pane">\n <h4>\n Behold!\n </h4>\n <p>\n Now, on to the new features we’re thrilled to share with you...\n </p>\n\n <hr />\n\n <h4>\n Support\n </h4>\n <p>\n New to the Cloudant customer experience is <a href="#/support">a bona fide support portal</a>, where you can create and reply to support cases.\n </p>\n <p>\n <img src="/dashboard.assets/img/Screenshot-support.png"; alt="Active and closed cases in the Cloudant support portal." style="border: 1px solid #ccc" />\n </p>\n\n <hr />\n\n <h4>\n Replication\n </h4>\n <p>\n <a href="#/replication">Replication</a> has never been this easy. Just pick source and target databases with the handy autocomplete fields, click Replicate, and authenticate with your Cloudant password. That’s it.\n </p>\n <p>\n <img src="/dashboard.assets/img/Screenshot-replication.png"; alt="Autocomplete fields for source and target databases make replication easy at Cloudant." style="border: 1px solid #ccc" />\n </p>\n\n <hr />\n\n <h4>\n Code Editors\n </h4>\n <p>\n The fields for editing JavaScript are now feature-rich code editors with syntax checking. This measure, along with the tooling in secondary indexes, help prevent MapReduce mistakes and JSON formatting no-nos.\n </p>\n <p>\n <img src="/dashboard.assets/img/Screenshot-code-editors.png"; alt="JavaScript code editors in the Databases section of the Cloudant dashboard." style="border: 1px solid #ccc" />\n </p>\n\n <hr />\n\n <h4>\n Secondary Indexes\n </h4>\n <p>\n The secondary indexes inside your Cloudant databases are now preview-able. Just click “Preview” to view a temporary result in your browser. When what you see is what you want, kick off the indexing job on the server with the “Save &amp; Build Index” button.\n </p>\n <p>\n <img src="/dashboard.assets/img/Screenshot-preview.png"; alt="Preview secondary indexes before saving them to save time." style="border: 1px solid #ccc" />\n </p>\n\n <hr />\n\n <h4>\n Search Indexes\n </h4>\n <p>\n The new search index interface brings the power of Lucene full-text search to the dashboard. \n </p>\n <p>\n <img src="/dashboard.assets/img/Screenshot-search.png"; alt="Query your Cloudant search indexes right from the dashboard." style="border: 1px solid #ccc" />\n </p>\n <p>\n If you haven’t tried Cloudant Search yet, run through the <a href="https://cloudant.com/for-developers/search/"; target="_blank">Search API demo</a> in For Developers first, and come back here to check it out.\n </p>\n <hr />\n <p>\n We hope you enjoy the new dashboard, and all of the new features. When you have feedback, please share it. <a href="#/support">The Support portal</a> is the perfect place for that.\n </p>\n\n <p>\n Happy dashboarding!\n </p>\n </div>\n';return __p},this.JST["app/addons/account/templates/bill.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n <li class="span3 active" style="margin-left: 0" data-tab="#heavy-tab">\n <div class="indicator-wrapper"> \n <div class="indicator"> \n </div>\n <div class="content">\n <p>Heavy HTTP</p>\n <span class="cost"><span class="super">$</span>'+(null==(__t=writes.cost)?"":__t)+'</span>\n <div class="operator">+</div>\n </div> \n </div>\n </li>\n <li class="span3" data-tab="#light-tab">\n <div class="indicator-wrapper"> \n <div class="indicator"> \n </div>\n <div class="content">\n <p>Light HTTP</p>\n <span class="cost"><span class="super">$</span>'+(null==(__t=reads.cost)?"":__t)+'</span>\n <div class="operator">+</div>\n </div> \n </div>\n </li>\n <li class="span3" data-tab="#data-tab">\n <div class="indicator-wrapper"> \n <div class="indicator"> \n </div>\n <div class="content">\n <p>Data Volume</p>\n <span class="cost"><span class="super">$</span>'+(null==(__t=data_vol.cost)?"":__t)+'</span>\n <div class="operator">=</div>\n </div> \n </div>\n </li>\n <!-- TOTAL -->\n <div class="span3 total">\n <div id="bill-summary"></div>\n <div id="bill-message"></div>\n <div class="learn-more">\n <a href="https://cloudant.com/pricing/">Learn about Cloudant pricing</a>\n </div>\n </div>\n \n';return __p},this.JST["app/addons/account/templates/billbreakdown.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+="<p>\n "+(null==(__t=count)?"":__t)+" "+(null==(__t=label)?"":__t)+" so far this month @\n "+(null==(__t=costString)?"":__t)+" = $"+(null==(__t=cost)?"":__t)+"\n</p>\n";return __p},this.JST["app/addons/account/templates/billmessage.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)user.underThirty()?__p+='\n<div class="alert alert-info">\n <p>Lucky you! Your first 30 days are free. We won\'t start charging you for usage until '+(null==(__t=endDate)?"":__t)+'. <a href="#account/payment">Add a credit card.</a></p> \n</div>\n':freeUsage?__p+='\n<div class="alert alert-info">\n We\'ll not charge you for this month if your usage remains below\n $'+(null==(__t=chargingThreshold)?"":__t)+".\n</div>\n":(__p+='\n <div class="alert">\n Your usage this month has exceeded $5. At the end of this billing period (end of the month), we will charge you for your usage. ',onFile||(__p+='<a href="#account/payment">Add a credit card.</a>'),__p+=" \n </div>\n"),__p+="\n";return __p},this.JST["app/addons/account/templates/billsummary.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+="<div>\nFor period ending <strong>"+(null==(__t=bill_date)?"":__t)+'</strong>\n <span class="cost green"><span class="super">$</span>'+(null==(__t=total)?"":__t)+"</span>\n</div>\n";return __p},this.JST["app/addons/account/templates/forgotpassword.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<header>\n <h2>Forgot Password</h2>\n</header>\n<form class="form-horizontal" id="passwordForm">\n <div class="control-group">\n <label for="username" class="control-label">Username</label>\n <div class="controls">\n <input type="username" id="username" tabindex="1" name="username">\n </div>\n </div>\n <div class="form-actions">\n <button class="button green">Send me my password</button>\n </div>\n</form>\n\n\n';return __p},this.JST["app/addons/account/templates/locationinfo.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<header>\n <h2>Choose a location of your data</h2>\n <p>Select a new location for your data, and click submit. Note that data moves are asynchronous—you won\'t experience any downtime, but it may take some time for changes to propagate. We will email you when the operation is complete.</p>\n</header>\n<form class="form-horizontal" id="locationForm">\n <div class="control-group">\n <h4>US East</h4>\n ',_.each(east,function(a){__p+='\n <label class="radio">\n <input type="radio" name="cluster" value="'+(null==(__t=a.get("id"))?"":__t)+'" ',location===a.get("id")&&(__p+=' checked="" '),__p+=" >\n <strong>"+(null==(__t=a.get("cluster"))?"":__t)+"</strong>—"+(null==(__t=a.get("host"))?"":__t)+"\n </label> \n "}),__p+="\n\n <h4>US Midwest</h4>\n ",_.each(midwest,function(a){__p+='\n <label class="radio">\n <input type="radio" name="cluster" value="'+(null==(__t=a.get("id"))?"":__t)+'" ',location===a.get("id")&&(__p+=' checked="" '),__p+=" >\n <strong>"+(null==(__t=a.get("cluster"))?"":__t)+"</strong>—"+(null==(__t=a.get("host"))?"":__t)+"\n </label> \n "}),__p+="\n\n <h4>US West</h4>\n ",_.each(west,function(a){__p+='\n <label class="radio">\n <input type="radio" name="cluster" value="'+(null==(__t=a.get("id"))?"":__t)+'" ',location===a.get("id")&&(__p+=' checked="" '),__p+=" >\n <strong>"+(null==(__t=a.get("cluster"))?"":__t)+"</strong>—"+(null==(__t=a.get("host"))?"":__t)+"\n </label> \n "}),__p+="\n\n <h4>Europe</h4>\n ",_.each(europe,function(a){__p+='\n <label class="radio">\n <input type="radio" name="cluster" value="'+(null==(__t=a.get("id"))?"":__t)+'" ',location===a.get("id")&&(__p+=' checked="" '),__p+=" >\n <strong>"+(null==(__t=a.get("cluster"))?"":__t)+"</strong>—"+(null==(__t=a.get("host"))?"":__t)+"\n </label> \n "}),__p+="\n\n <h4>Southeast Asia</h4>\n ",_.each(asia,function(a){__p+='\n <label class="radio">\n <input type="radio" name="cluster" value="'+(null==(__t=a.get("id"))?"":__t)+'" ',location===a.get("id")&&(__p+=' checked="" '),__p+=" >\n <strong>"+(null==(__t=a.get("cluster"))?"":__t)+"</strong>—"+(null==(__t=a.get("host"))?"":__t)+"\n </label> \n "}),__p+='\n </div>\n <div class="form-actions">\n <button class="button green">Save changes</button>\n </div>\n</form>\n';return __p},this.JST["app/addons/account/templates/newuser.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n<div class="alert alert-block">\n<p class="new-user">Hi '+(null==(__t=user.get("username"))?"":__t)+", we haven't yet taken a snapshot of your usage, so we don't yet have usage to report to you. We'll be able to show you your usage within the hour.</p>\n<p>Learn about <a href=\"https://cloudant.com/pricing\">Cloudant pricing</a>.</p>\n</div>\n";return __p},this.JST["app/addons/account/templates/passwordinfo.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<header>\n <h2>Password</h2>\n <p>Change your password.</p>\n</header>\n<form id="passwordForm">\n <div class="controls controls-row">\n <label for="password">Current password</label>\n <input type="password" id="password" tabindex="1" name="old_password">\n </div>\n <hr>\n <div class="controls controls-row">\n <label for="new-password">New password</label>\n <input type="password" id="new-password" name="password" tabindex="2" >\n <span class="help-block"></span>\n </div>\n <div class="controls controls-row">\n <label for="new-password-confirm">Confirm new password</label>\n <input type="password" id="new-password-confirm" name="new_password-confirm" tabindex="3">\n <span class="help-block"></span>\n </div>\n <div class="form-actions">\n <button class="button green" type="submit" disabled tabindex="4">Save changes</button>\n </div>\n</form>\n\n\n';return __p},this.JST["app/addons/account/templates/paymentinfo.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+="<header>\n <h2>Credit Card</h2>\n ",__p+=onFile?"\n <p>Here's the credit card we have on file:</p>\n \n <p class='card-type'>Payment Type: <span >"+(null==(__t=type)?"":__t)+" •••• •••• •••• "+(null==(__t=last4)?"":__t)+'</span>\n </p>\n\n <button href="#" class="button blue toggleForm icon-credit-card">Update your credit card</button>\n ':'\n <p>Cloudant accepts American Express, Discover, MasterCard and Visa. <a href="https://cloudant.com/pricing/">Billing FAQs</a></p> \n ',__p+='\n</header>\n\n\n<form id="billing-form" class="',onFile&&(__p+="hide"),__p+='">\n <span class="cards"></span>\n <div class="controls controls-row">\n <label for="creditname">Name on card</label>\n <input type="text" name="creditname" id="creditname" class="span6" tabindex="1"/>\n </div>\n <div class="controls controls-row">\n <label for="credit">Card number</label>\n <input type="text" placeholder="Credit card number" name="credit" id="credit" class="span4" tabindex="2"/>\n </div>\n <div class="controls controls-row">\n <div class="span3 expiresRow">\n <label for="month">Expires</label>\n <input type="text" placeholder="MM" name="month" id="month" class="span1" tabindex="3"/>\n <input type="text" placeholder="YYYY" name="year" id="year" class="span2" tabindex="4"/>\n </div>\n <div class="span2 cvcRow">\n <label for="cvc">Card code</label>\n <input type="text" placeholder="CVC" name="cvc" id="cvc" class="span1" tabindex="5"/>\n </div>\n\n </div>\n\n\n <div class="form-actions">\n <button class="button green" type="submit" disabled="true" tabindex="6">Save</button>\n <button type="button" class="button cancel-button outlineGray" tabindex="7">Cancel</button>\n </div>\n</form>\n';return __p},this.JST["app/addons/account/templates/plot.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+="<svg style='width:500px; height:270px;' />\n";return __p},this.JST["app/addons/account/templates/sidebartabs.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+="<header>\n <h4>Account Name</h4> \n <h1>"+(null==(__t=username)?"":__t)+'</h1>\n</header>\n\n<ul class="nav nav-tabs nav-stacked">\n <li class="active">\n <a data-type-select="announcements" href="#account/announcements">\n <span class="icon-bullhorn"></span>\n Announcements\n </a>\n </li>\n <li>\n <a data-type-select="usage" href="#account/usage">\n <span class="cloudant-dashboard"></span>\n Usage\n </a>\n </li>\n <li>\n <a data-type-select="info" href="#account/info">\n <span class="cloudant-profile"></span>\n Profile\n </a>\n </li>\n <li>\n <a data-type-select="password" href="#account/password">\n <span class="icon-lock"></span>\n Password\n </a>\n </li>\n <li>\n <a data-type-select="payment" href="#account/payment">\n <span class="icon-credit-card"></span>\n Credit Card\n </a>\n </li>\n <li>\n <a data-type-select="data-location" href="#account/data-location">\n <span class="icon-map-marker"></span>\n Location for your data\n </a>\n </li>\n <li>\n <a data-type-select="virtual-hosts" href="#account/virtual-hosts">\n <span class="icon-sitemap"></span>\n Virtual Hosts\n </a>\n </li>\n</ul>\n';return __p},this.JST["app/addons/account/templates/supportinfo.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<header>\n <h2>Support level</h2>\n <p>Select the support level that best meets your needs. Changes to your support level must be confirmed via email. <a href="https://cloudant.com/for-developers/faq/account/" target="_blank">Learn more about support and billing</a>.</p>\n</header>\n<form class="form-horizontal " id="supportForm">\n <div class="control-group">\n <label class="control-label">I\'d like my support level to be...</label>\n <div class="controls">\n <label class="radio">\n <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked="checked">\n <strong>Silver</strong>—this is great and you get it by default at no additional cost.\n </label>\n <label class="radio">\n <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">\n <strong>Gold</strong>—this is for customers who want x, y and z and it\'s an additional <strong>$N/mo</strong>.\n </label>\n </div>\n </div>\n <div class="form-actions">\n <button class="button green">Save changes</button>\n </div>\n</form>\n';return __p},this.JST["app/addons/account/templates/usage.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+=error?'\n<div id="heavy-tab" class="tab-pane active">\n Sorry, something has gone wrong. :(\n</div>\n<div id="light-tab" class="tab-pane">\n Sorry, something has gone wrong. :(\n</div>\n<div id="data-tab" class="tab-pane">\n Sorry, something has gone wrong. :(\n</div>\n':'\n\n <div id="heavy-tab" class="tab-pane active">\n <p>Heavy HTTP requests are more processing-intensive than light HTTP requests.</p>\n <div id="heavy" class="graph"></div>\n <div id="heavy-breakdown"></div>\n </div>\n <div id="light-tab" class="tab-pane">\n <p>Light HTTP requests require less processing than heavy HTTP requests.</p>\n <div id="light" class="graph"></div>\n <div id="light-breakdown"></div>\n </div>\n <div id="data-tab" class="tab-pane">\n <p>The data volume of your DB, search and view indexes so far this month.</p>\n <div id="data" class="graph"></div>\n <div id="data-breakdown"></div>\n <p>Storing 1GB for a month costs $1. Your data cost is calculated pro rata, based on hourly snapshots of the data in your account.</p>\n </div>\n\n',__p+="\n\n";return __p},this.JST["app/addons/account/templates/virtualhostitem.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n<a class="span3 hostname" href="'+(null==(__t=hostname)?"":__t)+'"> '+(null==(__t=hostname)?"":__t)+' </a> <span class="span5 path">→ '+(null==(__t=userurl)?"":__t)+' </span> \n\n<button class="button delete-vhost red" tabindex="3" value="Create">Delete</button>\n\n\n';return __p},this.JST["app/addons/account/templates/virtualhosts.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+="<header>\n <h2>Add Virtual Hosts</h2>\n <p>Virtual hosts allow you to map your own domain to a Cloudant server, or to a specific path within it. Once you’ve added a hostname here, update your DNS record to point to <strong>"+(null==(__t=userurl)?"":__t)+'</strong> using CNAME.</p>\n</header>\n<form class="form-horizontal" id="virtualhostsForm">\n <div class="control-group">\n <input type="text" id="hostname" class="input-large" tabindex="1" name="vhostname" placeholder="Hostname">\n →\n <div class="input-prepend">\n <span class="add-on"> '+(null==(__t=userurl)?"":__t)+'/ </span>\n <input type="text" id="path" class="input-medium" tabindex="2" placeholder="Path (optional)">\n </div>\n <button class="button green" type="submit" tabindex="3" value="Create">Add</button>\n </div>\n</form>\n\n<section id="yourVirtualHosts">\n\n</section>\n\n';
-return __p},this.JST["app/addons/activetasks/templates/detail.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="progress progress-striped active">\n <div class="bar" style="width: '+(null==(__t=model.get("progress"))?"":__t)+'%;">'+(null==(__t=model.get("progress"))?"":__t)+"%</div>\n</div>\n<p>\n "+(null==(__t=model.get("type").replace("_"," "))?"":__t)+" on\n "+(null==(__t=model.get("node"))?"":__t)+"\n</p>\n";return __p},this.JST["app/addons/activetasks/templates/table.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n',__p+=0===collection.length?"\n <tr> \n <td>\n <p>No tasks.</p>\n </td>\n </tr>\n":'\n\n <thead>\n <tr>\n <th data-type="type">Type</th>\n <th data-type="node">Object</th>\n <th data-type="started_on">Started on</th>\n <th data-type="updated_on">Last updated on</th>\n <th data-type="pid">PID</th>\n <th data-type="progress" width="200">Status</th>\n </tr>\n </thead>\n\n <tbody id="tasks_go_here">\n\n </tbody>\n\n',__p+="\n";return __p},this.JST["app/addons/activetasks/templates/tabledetail.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<td>\n '+(null==(__t=model.get("type"))?"":__t)+"\n</td>\n<td>\n "+(null==(__t=objectField)?"":__t)+"\n</td>\n<td>\n "+(null==(__t=formatDate(model.get("started_on")))?"":__t)+"\n</td>\n<td>\n "+(null==(__t=formatDate(model.get("updated_on")))?"":__t)+"\n</td>\n<td>\n "+(null==(__t=model.get("pid"))?"":__t)+'\n</td>\n<td>\n <div class="progress progress-striped active">\n <div class="bar" style="width: '+(null==(__t=model.get("progress"))?"":__t)+'%;">'+(null==(__t=model.get("progress"))?"":__t)+"%</div>\n\n </div>\n <p>"+(null==(__t=progress)?"":__t)+" </p>\n</td>\n";return __p},this.JST["app/addons/activetasks/templates/tabs.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj){__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n\n\n\n\n<div id="sidenav">\n <header class="row-fluid">\n <h3>Filter by: </h3>\n </header>\n\n <nav>\n <ul class="task-tabs nav nav-list">\n ';for(var filter in filters)__p+='\n <li data-type="'+(null==(__t=filter)?"":__t)+'">\n <a>\n '+(null==(__t=filters[filter])?"":__t)+"\n </a>\n </li>\n ";__p+='\n </ul>\n <ul class="nav nav-list views">\n <li class="nav-header">Polling interval</li>\n <li>\n <input id="pollingRange" type="range"\n min="1"\n max="30"\n step="1"\n value="5"/>\n <label for="pollingRange"><span>5</span> second(s)</label>\n </li>\n </ul>\n </nav>\n</div>\n'}return __p},this.JST["app/addons/auth/templates/change_password.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="span12">\n <h2> Change Password </h2>\n <form id="change-password">\n <p class="help-block">\n Enter your new password.\n </p>\n <input id="password" type="password" name="password" placeholder= "New Password:" size="24">\n <br/>\n <input id="password-confirm" type="password" name="password_confirm" placeholder= "Verify New Password" size="24">\n <button type="submit" class="btn btn-primary">Change</button>\n </form>\n</div>\n';return __p},this.JST["app/addons/auth/templates/create_admin.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="span12">\n <h2> Add Admin </h2>\n <form id="create-admin-form">\n <input id="username" type="text" name="name" placeholder= "Username:" size="24">\n <br/>\n <input id="password" type="password" name="password" placeholder= "Password" size="24">\n <p class="help-block">\n Before a server admin is configured, all clients have admin privileges.\n This is fine when HTTP access is restricted \n to trusted users. <strong>If end-users will be accessing this CouchDB, you must\n create an admin account to prevent accidental (or malicious) data loss.</strong>\n </p>\n <p class="help-block">Server admins can create and destroy databases, install \n and update _design documents, run the test suite, and edit all aspects of CouchDB \n configuration.\n </p>\n <p class="help-block">Non-admin users have read and write access to all databases, which\n are controlled by validation functions. CouchDB can be configured to block all\n access to anonymous users.\n </p>\n <button type="submit" href="#" id="create-admin" class="btn btn-primary">Create Admin</button>\n </form>\n</div>\n';return __p},this.JST["app/addons/auth/templates/login.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div class="span12">\n <form id="login">\n <p class="help-block">\n Login to CouchDB with your name and password.\n </p>\n <input id="username" type="text" name="name" placeholder= "Username:" size="24">\n <br/>\n <input id="password" type="password" name="password" placeholder= "Password" size="24">\n <br/>\n <button id="submit" class="btn" type="submit"> Login </button>\n </form>\n</div>\n\n';return __p},this.JST["app/addons/auth/templates/nav_dropdown.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="sidenav">\n<header class="row-fluid">\n <h3> '+(null==(__t=user.name)?"":__t)+' </h3>\n</header>\n<nav>\n<ul class="nav nav-list">\n <li class="active" ><a data-select="change-password" id="user-change-password" href="#changePassword"> Change Password </a></li>\n <li ><a data-select="add-admin" href="#addAdmin"> Create Admins </a></li>\n</ul>\n</nav>\n</div>\n\n';return __p},this.JST["app/addons/auth/templates/nav_link_title.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n',__p+=admin_party?'\n <a id="user-create-admin" href="#createAdmin"> \n <span class="fonticon-user fonticon"></span>\n Admin Party! \n </a>\n':user?'\n <a href="#changePassword" >\n <span class="fonticon-user fonticon"></span> \n '+(null==(__t=user.name)?"":__t)+" \n </a>\n":'\n <a href="#login" > \n <span class="fonticon-user fonticon"></span> \n Login \n </a>\n',__p+="\n\n\n";return __p},this.JST["app/addons/auth/templates/noAccess.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n\n<div class="span12">\n <h2> Access Denied </h2>\n <p> You do not have permission to view this page. <br/> You might need to <a href="#login"> login </a> to view this page/ </p>\n \n</div>\n';return __p},this.JST["app/addons/cloudantauth/templates/forgot_password.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div class="brand">\n <svg width="347" height="80">\n <image xlink:href="/dashboard.assets/img/logo-blue.svg" src="/dashboard.assets/img/logo-blue.png" width="347" height="80"/>\n </svg>\n</div>\n\n<form id="forgot">\n <p>\n <label for="user_login">Forgot your Password?<br></label>\n <input id="username" type="text" name="name" placeholder="Enter your username" size="24">\n </p>\n <button id="submit" class="button btn-large blue" type="submit">Reset your password</button>\n</form>\n';return __p},this.JST["app/addons/cloudantauth/templates/login.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<div class="brand">\n <svg width="347" height="80">\n <image xlink:href="/dashboard.assets/img/logo-blue.svg" src="/dashboard.assets/img/logo-blue.png" width="347" height="80"/>\n </svg>\n</div>\n\n<form id="login">\n <p>\n <label for="user_login">Username<br></label>\n <input id="username" type="text" name="name" value="'+(null==(__t=username)?"":__t)+'" disabled size="24">\n </p>\n <p>\n <label for="user_pass">Password<br></label>\n <input id="password" type="password" name="password" placeholder= "Password" size="24">\n </p>\n <button id="submit" class="button btn-large blue" type="submit"> Sign in </button>\n <a href="#forgot">Forgot Password?</a>\n</form>\n';return __p},this.JST["app/addons/cloudantauth/templates/login_pane.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='\n<div id="login">\n <div id="login-wrapper"></div>\n</div>\n';return __p},this.JST["app/addons/cloudantauth/templates/nav_dropdown.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+="<!-- dropdown menu links -->\n ",__p+=user?'\n <li> <a id="user-change-password" href="#"> Change Password </a> </li>\n <li> <a id="user-logout" href="#"> Logout </a> </li> \n ':'\n <li> <a id="user-login" href="#"> Login </a> </li> \n ',__p+="\n\n";return __p},this.JST["app/addons/cloudantauth/templates/reset_password.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+='<div class="brand">\n <svg width="347" height="80">\n <image xlink:href="/dashboard.assets/img/logo-blue.svg" src="/dashboard.assets/img/logo-blue.png" width="347" height="80"/>\n </svg>\n</div>\n',""!==token?(__p+='\n<form id="reset">\n <p>\n <label for="user_login">Choose a new password: <br></label>\n <input id="username" type="text" name="username" placeholder="Enter your username" size="24">\n <input id="password" type="password" name="password" placeholder="Enter a new password" size="24">\n <input id="password_confirm" type="password" name="password_confirm" placeholder="Confirm password" size="24">\n <input id="token" type="hidden" name="token" value="',__p+='">\n </p>\n <button id="submit" class="button btn-large blue" type="submit">Reset your password</button>\n</form>\n'):__p+='\n <div class="alert alert-warning">\n <Strong>Missing token!</strong> Check your email, or try to <a href="#forgot">reset</a> again.\n </div>\n',__p+="\n";return __p},this.JST["app/addons/cloudantdatabases/templates/item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<td>\n <a href="'+(null==(__t=database.url("web-index"))?"":__t)+'">'+(null==(__t=database.get("name"))?"":__t)+" </a>\n</td>\n<td>"+(null==(__t=database.status.humanSize())?"":__t)+"</td>\n<td>"+(null==(__t=database.status.numDocs())?"":__t)+"</td>\n<td>"+(null==(__t=database.status.updateSeq())?"":__t)+'</td>\n<td>\n <a class="db-actions btn fonticon-replicate set-replication-start" title="Replicate '+(null==(__t=database.get("name"))?"":__t)+'" href="#/replication/new/'+(null==(__t=database.get("name"))?"":__t)+'"></a>\n <a class="db-actions btn icon-lock set-permissions" title="Set permissions for '+(null==(__t=database.get("name"))?"":__t)+'" href="#/database/'+(null==(__t=database.get("name"))?"":__t)+'/permissions"></a>\n</td>\n';return __p},this.JST["app/addons/cloudantdatabases/templates/layout.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n<ul class="nav nav-tabs shared-tabs">\n <li class="'+(null==(__t=isActive("your-database"))?"":__t)+'"><a href="#your-database" data-toggle="tab" class="fonticon-user">Your Databases</a></li>\n <li class="'+(null==(__t=isActive("shared-database"))?"":__t)+'"><a href="#shared-database" data-toggle="tab" class="fonticon-users">Shared Databases</a></li>\n</ul>\n<div class="tab-content dashboard-tab-content">\n <div class="tab-pane '+(null==(__t=isActive("your-database"))?"":__t)+'" id="your-database"></div>\n <div class="tab-pane '+(null==(__t=isActive("shared-database"))?"":__t)+'" id="shared-database"></div>\n</div>\n';return __p},this.JST["app/addons/cloudantdatabases/templates/list.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div class="result-tools">\n <div id="newButton" class="pull-left"></div>\n <form id="jump-to-db" class="navbar-form pull-right input-append database-search">\n <input type="text" class="search-autocomplete" name="search-query" placeholder="Database name"></input>\n <button class="fonticon-search btn button red " type="submit"></button>\n </form>\n</div>\n<table class="databases table table-striped">\n <thead>\n <th>Name</th>\n <th>Size</th>\n <th># of Docs</th>\n <th>Update Seq</th>\n <th>Actions</th>\n </thead>\n <tbody>\n </tbody>\n</table>\n<div id="database-pagination"></div>\n';return __p},this.JST["app/addons/cloudantdatabases/templates/shared_dbs.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<p class="alert alert-info">\n<strong>Coming soon.</strong> \nTo access your shared databases, <a href="https://cloudant.com/dashboard">visit the old dashboard</a>. (If you\'re signed out there, you will have to sign in again.)</p>\n';return __p},this.JST["app/addons/cloudantdatabases/templates/shared_item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<td>\n <a href="'+(null==(__t=database.url("web-index"))?"":__t)+'" target="_blank">'+(null==(__t=database.get("name"))?"":__t)+" </a>\n</td>\n<td>"+(null==(__t=database.status.humanSize())?"":__t)+"</td>\n<td>"+(null==(__t=database.status.numDocs())?"":__t)+"</td>\n<td>"+(null==(__t=database.status.updateSeq())?"":__t)+'</td>\n<td>\n <a class="db-actions btn fonticon-replicate set-replication-start" title="Replicate '+(null==(__t=database.get("name"))?"":__t)+'" href="#/replication/'+(null==(__t=database.get("name"))?"":__t)+'"></a>\n <a class="db-actions btn icon-lock set-permissions" title="Set permissions for '+(null==(__t=database.get("name"))?"":__t)+'" href="#/database/'+(null==(__t=database.get("name"))?"":__t)+'/permissions"></a>\n</td>\n';return __p},this.JST["app/addons/cloudantdatabases/templates/sidebar.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='\n<div class="row-fluid">\n<a class="btn new" id="new"><i class="icon-plus"></i> New database</a>\n</div>\n<hr>\n<ul class="nav nav-list">\n <!-- <li class="nav-header">Database types</li> -->\n <li class="active"><a class="toggle-view" id="owned">Your databases</a></li>\n</ul>\n<hr>';return __p},this.JST["app/addons/cloudantdocuments/templates/api_generation.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<h2> API Keys </h2>\n<p> API keys are credentials for programmatic access to databases you choose. \nYou can manage permissions and share databases just like you would with regular Cloudant users.\n</p>\n<a id="generate-api" class="button green"> Generate API key </a>\n<div id="result">\n <div id="alert-api" style="display:none" class="alert alert-block">\n <h4>Generating API key!</h4>\n Cloudant is currently generating your api key.\n </div>\n <div id="key-info" style="display:none">\n <dl>\n <dt>Key</dt>\n <dd id="key"></dd>\n <dt>Password</dt>\n <dd id="password"></dd>\n </dl>\n \n <div id="alert-api" class="alert alert-block">\n Please make a note of the password now. For security reasons, we will not store it for you to retrieve in the future.\n </div>\n\n </div>\n \n\n</div>\n';return __p},this.JST["app/addons/cloudantdocuments/templates/permission_item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)_.each(roles,function(a){__p+="\n<td>\n <input ","_admin"===a&&(__p+=' class="admin" '),__p+=' data-role="'+(null==(__t=a)?"":__t)+'" type="checkbox" ',user[a]&&(__p+=' checked="checked" '),__p+=" > </input> \n</td>\n"}),__p+='\n<td data-name="'+(null==(__t=user.name)?"":__t)+'"> '+(null==(__t=username)?"":__t)+'\n </td>\n <td class="td-hover-show">\n ',"nobody"!==user.name&&(__p+='\n <span class="delete-user hover-show cloudant-x fonticon"></span>\n '),__p+="\n </td>\n";return __p},this.JST["app/addons/cloudantdocuments/templates/permissions.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<p> Cloudant users and API keys with permissions on this database. </p>\n<table class="permissions-table table">\n <thead>\n <tr>\n ',_.each(roles,function(a){__p+="\n <th> "+(null==(__t=_.values(a)[0])?"":__t)+" </th>\n "}),__p+='\n <th class="names"> </th>\n <th></th>\n </tr>\n </thead>\n <tbody id="userRoles">\n <tr>\n ',_.each(roles,function(a){__p+='\n <td><input data-role="'+(null==(__t=_.keys(a)[0])?"":__t)+'" type="checkbox" disabled checked="checked"> </input> </td>\n '}),__p+='\n <td data-name="'+(null==(__t=username)?"":__t)+'" > '+(null==(__t=username)?"":__t)+" </td>\n </tr>\n </tbody>\n</table>\n\n",showNonLoggedInUsers&&(__p+='\n<h3> Virtual Hosts </h3>\n<p> Permissions for this database when accessing it from another domain. </p>\n<table class="permissions-table table">\n <thead>\n <tr>\n ',_.each(roles,function(a){__p+="\n <th> "+(null==(__t=_.values(a)[0])?"":__t)+" </th>\n "}),__p+='\n <th class="names"> </th>\n <th></th>\n </tr>\n </thead>\n <tbody id="nonLoggedInuserRoles">\n </tbody>\n</table>\n'),__p+="\n";return __p},this.JST["app/addons/cloudantdocuments/templates/permissions_layout.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div class="span8">\n <div id="permissions"></div>\n <h3> Share Database </h3>\n <form id="form-grant-rights" class="form form-inline form-search">\n <input type="text" class="input-medium" placeholder=\'Username or API key\'>\n <button class="button blue btn-small" type="submit"> Grant rights </button>\n </form>\n</div>\n<div id="api" class="span3 offset1">\n</div>\n';return __p},this.JST["app/addons/cloudantreplication/templates/active.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<td>\n <a href="#database/_replicator/'+(null==(__t=docid)?"":__t)+'">\n '+(null==(__t=docid)?"":__t)+"\n </a>\n</td>\n\n<td>\n "+(null==(__t=source)?"":__t)+"\n</td> \n\n<td>\n "+(null==(__t=target)?"":__t)+"\n</td>\n\n<td>\n <span class='",continuous&&(__p+="icon-refresh "),__p+="'>\n "+(null==(__t=continuous)?"":__t)+'\n </span>\n</td>\n\n\n<td>\n <div class="progress progress-striped active">\n <div class="bar" style="width: '+(null==(__t=progress||0)?"":__t)+'%;">'+(null==(__t=progress||"0")?"":__t)+'%</div>\n </div>\n</td>\n\n<td>\n <button class="cancel button red fonticon-circle-x delete" data-source="'+(null==(__t=source)?"":__t)+'" data-doc-id="'+(null==(__t=docid)?"":__t)+'" data-rep-id="'+(null==(__t=repid)?"":__t)+'" data-continuous="'+(null==(__t=continuous)?"":__t)+'" data-target="'+(null==(__t=target)?"":__t)+'">Cancel</a>\n</td>\n';return __p},this.JST["app/addons/cloudantreplication/templates/complete.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<td>\n <a href="#database/_replicator/'+(null==(__t=docid)?"":__t)+'">\n '+(null==(__t=docid)?"":__t)+"\n </a>\n</td>\n\n<td>\n "+(null==(__t=source)?"":__t)+"\n</td> \n\n<td>\n "+(null==(__t=target)?"":__t)+"\n</td>\n\n<td>\n <span class='",continuous&&(__p+="icon-refresh "),__p+="'>\n "+(null==(__t=continuous)?"":__t)+'\n </span>\n</td>\n\n\n<td>\n <span class="green fonticon-check">\n '+(null==(__t=status)?"":__t)+'\n </span>\n</td>\n\n<td>\n <button class="retry button green fonticon-replicate " data-source="'+(null==(__t=source)?"":__t)+'" data-doc-id="'+(null==(__t=docid)?"":__t)+'" data-rep-id="'+(null==(__t=repid)?"":__t)+'" data-continuous="'+(null==(__t=continuous)?"":__t)+'" data-target="'+(null==(__t=target)?"":__t)+'">Again?</a>\n</td>\n';return __p},this.JST["app/addons/cloudantreplication/templates/error.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<td>\n <a href="#database/_replicator/'+(null==(__t=docid)?"":__t)+'">\n '+(null==(__t=docid)?"":__t)+"\n </a>\n</td>\n\n<td>\n "+(null==(__t=source)?"":__t)+"\n</td> \n\n<td>\n "+(null==(__t=target)?"":__t)+"\n</td>\n\n<td>\n <span class='",continuous&&(__p+="icon-refresh "),__p+="'>\n "+(null==(__t=continuous)?"":__t)+'\n </span>\n</td>\n\n\n<td>\n <button class="validate button red fonticon-x " data-source="'+(null==(__t=source)?"":__t)+'" data-doc-id="'+(null==(__t=docid)?"":__t)+'" data-rep-id="'+(null==(__t=repid)?"":__t)+'" data-continuous="'+(null==(__t=continuous)?"":__t)+'" data-target="'+(null==(__t=target)?"":__t)+'">Find Errors</a>\n</td>\n\n<td>\n <button class=" button green fonticon-replicate retry" data-source="'+(null==(__t=source)?"":__t)+'" data-doc-id="'+(null==(__t=docid)?"":__t)+'" data-rep-id="'+(null==(__t=repid)?"":__t)+'" data-continuous="'+(null==(__t=continuous)?"":__t)+'" data-target="'+(null==(__t=target)?"":__t)+'">Retry</a>\n</td>\n';return __p},this.JST["app/addons/cloudantreplication/templates/form.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<form id="replication" class="form-horizontal">\n <div class="control-group" id="step4">\n <label class="control-label">_id <br>\n <small>(optional)</small>\n </label>\n <div class="source controls">\n <input type="text" id="repID" name="_id" size="30" value="" data-validation="optional" placeholder="e.g. my_rep">\n </div>\n </div>\n <!-- SOURCE -->\n <div class="control-group" >\n <label class="control-label">SOURCE DATABASE:</label>\n <div class="source controls">\n <div id="source_form"></div>\n </div>\n\n </div>\n\n <div class="control-group">\n <label class="control-label">TARGET DATABASE:</label>\n <div class="target controls">\n <div class="btn-group toggle-btns" id="create_target">\n\n <label for="existing-target" class="btn active">\n Existing Database \n </label>\n \n <label for="new-target" class="btn">\n New Database\n </label>\n\n <input type="radio" id="existing-target" name="create_target" class="next" checked="checked" value="false">\n <input type="radio" id="new-target" name="create_target" class="next" value="true">\n \n </div>\n </div>\n </div>\n\n <!--TARGET-->\n <div class="control-group">\n <div class="target controls">\n <div id="target_form"></div>\n <label for="continuous">\n <input type="checkbox" name="continuous" value="true" id="continuous">\n Make this replication continuous.\n </label>\n </div>\n </div>\n\n <div class="control-group">\n <div class="actions target controls">\n <button class="button green save btn-large fonticon-replicate" type="submit" >Replicate</button>\n </div>\n </div>\n\n</form>\n\n<div class="password_modal"></div>\n';return __p},this.JST["app/addons/cloudantreplication/templates/localremotetabs.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='\n<ul class="nav nav-tabs" id="'+(null==(__t=type)?"":__t)+'Tabs">\n <li class="active">\n <a href="#" class="btn local-btn" data-bypass="true" data-tab="'+(null==(__t=type)?"":__t)+'_local">\n ',__p+=newDB?"Create a new database locally ":" My Databases ",__p+='\n </a>\n </li>\n <li>\n <a href="#" class="btn remote-btn" data-bypass="true" data-tab="'+(null==(__t=type)?"":__t)+'_remote">\n ',__p+=newDB?"Create a new remote database ":" Remote Database ",__p+='\n </a>\n </li>\n</ul>\n\n<div class="tab-content small-tabs">\n <div class="tab-pane active" id="'+(null==(__t=type)?"":__t)+'_local">\n <input type="text" id="to_name" name="'+(null==(__t=type)?"":__t)+'" autofocus size="30" placeholder="',__p+=newDB?"Name your database":"Start typing to select a "+(null==(__t=type)?"":__t)+" database",__p+='" class="',newDB||(__p+="auto"),__p+='">\n </div>\n\n <div class="tab-pane" id="'+(null==(__t=type)?"":__t)+'_remote">\n <input type="text" id="'+(null==(__t=type)?"":__t)+'_url" name="'+(null==(__t=type)?"":__t)+'" size="30" class="next" placeholder="http://" >\n <small>e.g. http://username:password@cloudant.com/database</small>\n </div>\n</div>\n\n<div id="options-here"></div>\n';return __p},this.JST["app/addons/cloudantreplication/templates/nope.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<td colspan="5">\nYou have no '+(null==(__t=type)?"":__t)+" replications\n</td>\n\n";return __p},this.JST["app/addons/cloudantreplication/templates/options.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='\n<span class="options off">Advanced Options</span>\n<div class="advancedOptions hide">\n <h4>Apply filters</h4>\n <p>Sometimes you don\'t want to transfer all documents from source to target. You can include one or more filter functions in a design document on the source and then tell the replicator to use them.</p>\n <label for="filter">Enter the design doc and filter name</label>\n <input type="text" placeholder="myddoc/myfilter" name="filter" id="filter"/>\n <label for="query">Add query parameters (optional)</label>\n <input type="text" placeholder=\'{"key":"value"}\' name="query_params" id="query"/>\n\n <hr>\n <h4>Named Document Replication</h4>\n <p>Sometimes you only want to replicate some documents. For this simple case you do not need to write a filter function. Simply add the list of keys, separated by commas.</p>\n <input type="text" placeholder="foo, bar, baz" name="doc_ids" id="doc_ids"/>\n\n <hr>\n <h4>Replicate through a proxy</h4>\n <p>Pass a "proxy" argument in the replication data to have replication go through an HTTP proxy</p>\n <input type="text" placeholder="http://localhost:8888" name="proxy" id="proxy"/>\n\n</div>\n\n';return __p},this.JST["app/addons/cloudantreplication/templates/password_modal.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div class="modal-header">\n <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\n <h3>Password: </h3>\n</div>\n<div class="modal-body">\n <p>Replication requires authentication.</p>\n\n <input name="password" type="password" placeholder="Enter your Cloudant password"/>\n\n</div>\n<div class="modal-footer">\n <a class="button green continue-button" data-bypass="true">Continue Replication</a>\n <a data-dismiss="modal" class="button cancel-button outlineGray" data-bypass="true"> Cancel</a>\n</div>\n';return __p},this.JST["app/addons/cloudantreplication/templates/sidebar_no_header.html"]=function(obj){obj||(obj={});
-{var __p="";_.escape}with(obj)__p+='<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid supportDash">\n <div class="with-sidebar content-area">\n <div id="sidebar-content" class="sidebar"></div>\n <div id="dashboard-content" class="list window-resizeable"></div>\n </div>\n</div>\n';return __p},this.JST["app/addons/cloudantreplication/templates/sidebartabs.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<header class="support-sidebar replication-sidebar">\n <a data-type-select="new" href="#replication/new" id="case-button" class="button blue round-btn cloudant-circle-plus"> \n New Replication\n </a>\n</header>\n\n\n <ul class="nav nav-tabs nav-stacked replication-nav-stacked">\n <li>\n <a data-type-select="active" href="#replication/active">Active Replications</a>\n </li>\n <li>\n <a data-type-select="errors" href="#replication/errors">Errors</a>\n </li>\n <li>\n <a data-type-select="complete" href="#replication/complete">Completed Replications</a>\n </li>\n</ul>\n';return __p},this.JST["app/addons/cloudantreplication/templates/statustable.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+=' <thead>\n <th>Doc ID</th>\n <th>Source</th>\n <th>Target</th>\n <th>Continuous?</th>\n <th>Status</th>\n <th>Actions</th>\n </thead>\n <tbody id="replication-status">\n </tbody>\n';return __p},this.JST["app/addons/cloudantreplication/templates/validator.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+='<td colspan="6">\n <button class="close">&times;</button>\n <p>Here are the basic issues that might have occurred. If your replication passes this test, look at it in the docs for other issues or contact us.</p>\n <dl class="dl-horizontal replication-validator">\n\n <dt>Does your replication have a Source?</dt> \n <dd class="validate-source">\n ',__p+=source?' \n <span class="fonticon-circle-check green">YES</span> \n ':' \n <span class="fonticon-x red">NO</span>\n ',__p+="\n </dd>\n\n ",model.isURL("source")||(__p+='\n <dt>Is your source a full url?</dt>\n <dd class="validate-target">\n <span class="fonticon-x red"></span>\n When passing in source and target the reference must be a full URL. e.g: <code>http://username.cloudant.com/dbname</code>\n </dd>\n '),__p+='\n\n <dt>Does your replication have a Target?</dt>\n <dd class="validate-target">\n ',__p+=target?' \n <span class="fonticon-circle-check green">YES</span> \n ':' \n <span class="fonticon-x red">NO</span>\n ',__p+="\n </dd>\n\n\n\n ",model.isURL("target")||(__p+='\n <dt>Is your target a full url?</dt>\n <dd class="validate-target">\n <span class="fonticon-x red"></span>\n When passing in source and target the reference must be a full URL. e.g: <code>http://username.cloudant.com/dbname</code>\n </dd>\n '),__p+="\n\n ",__p+="\n\n ",__p+='\n\n <dt>Does your replication have a user_ctx?</dt>\n <dd class="validate-user">\n ',__p+=user_ctx?' \n <span class="fonticon-circle-check green">YES</span> \n ':' \n <span class="fonticon-x red">NO</span>\n The user_ctx property is mandatory for cloudant. It is provided by default when submitting a replication in the client. \n Example: \n <pre>\n {\n "_id": "my_rep",\n "source": "http://bserver.com:5984/foo",\n "target": "bar",\n "continuous": true,\n "user_ctx": {\n "name": "joe",\n "roles": ["erlanger", "researcher"]\n }\n }\n </pre>\n ',__p+='\n </dd>\n\n </dl>\n\n <p>If everything passed, here are additional things to check: </p>\n <dl class="dl-horizontal replication-validator">\n <dt>Have you authenticated?</dt>\n <dd><p>In order to access target and source databases, you must authenticate with the proper username &amp; password. You can authenticate in the database url, e.g. <code>http://username:password@username.cloudant.com/foo</code></p>\n\n\n <p>Or when posting to _replicator, include headers if you wish to encrypt your passwords. </p>\n<pre>\n{\n //...\n source: {\n url: "http://username.cloudant.com/foo",\n headers: {\n "Authorization": "BASIC dXNlcm5hbWU6cGFzc3dvcmQ="\n }\n }\n}\n</pre>\n </dd>\n\n <dt>Make sure remote databases exist: </dt>\n <dd>Replicating from a database that isn\'t hosted under this account? Make sure that the database exists.</dd>\n\n\n\n </dl>\n\n\n\n</td>\n';return __p},this.JST["app/addons/compaction/templates/compact_view.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\nCompact View\n';return __p},this.JST["app/addons/compaction/templates/layout.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div class="row">\n <div class="span12 compaction-option">\n <h3> Compact Database </h3>\n <p>Compacting a database removes deleted documents and previous revisions. It is an irreversible operation and may take a while to complete for large databases.</p>\n <button id="compact-db" class="btn btn-large btn-primary"> Run </button>\n </div>\n</div>\n\n<div class="row">\n <div class="span12 compaction-option">\n <h3> Cleanup Views </h3>\n <p>Cleaning up views in a database removes old view files still stored on the filesystem. It is an irreversible operation.</p>\n <button id="cleanup-views" class="btn btn-large btn-primary"> Run </button>\n </div>\n</div>\n';return __p},this.JST["app/addons/config/templates/dashboard.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="row">\n <div class="span2 offset10">\n <button id="add-section" href="#" class="button button-margin">\n <i class="icon-plus icon-white"> </i>\n Add Section\n </button>\n </div>\n</div>\n<table class="config table table-striped table-bordered">\n <thead>\n <th id="config-section"> Section </th>\n <th id="config-option"> Option </th>\n <th id="config-value"> Value </th>\n <th id="config-trash"></th>\n </thead>\n <tbody>\n </tbody>\n</table>\n<div id="add-section-modal" class="modal hide fade">\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\n <h3>Create Config Option</h3>\n </div>\n <div class="modal-body">\n <form id="add-section-form" class="form well">\n <label>Section</label>\n <input type="text" name="section" placeholder="Section">\n <span class="help-block">Enter an existing section name to add to it.</span>\n <input type="text" name="name" placeholder="Name">\n <br/>\n <input type="text" name="value" placeholder="Value">\n <div class="modal-footer">\n <button type="button" class="btn" data-dismiss="modal">Cancel</button>\n <button type="submit" class="btn btn-primary"> Save </button>\n </div>\n </form>\n </div>\n</div>\n';return __p},this.JST["app/addons/config/templates/item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n',__p+=0===option.index?"\n<th> "+(null==(__t=option.section)?"":__t)+" </th>\n":"\n<td></td>\n",__p+="\n<td> "+(null==(__t=option.name)?"":__t)+' </td>\n<td>\n <div id="show-value">\n '+(null==(__t=option.value)?"":__t)+' <button class="edit-button"> Edit </button>\n </div>\n <div id="edit-value-form" style="display:none">\n <input class="value-input" type="text" value="'+(null==(__t=option.value)?"":__t)+'" />\n <button id="save-value" class="btn btn-success btn-small"> Save </button>\n <button id="cancel-value" class="btn btn-danger btn-small"> Cancel </button>\n </div>\n</td>\n<td id="delete-value"> <i class="icon-trash"> </i> </td>\n';return __p},this.JST["app/addons/dashboard/templates/accountactivity.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+="<header>\n ",user.noHistory()?__p+="\n <h2>Here's your usage so far this month.</h2>\n ":(__p+='\n <p class="lead usage-links ',past&&(__p+=" past-active "),__p+='">Your usage: \n <!-- <a class="current-month" href="#">So far this month</a> | <a class="last-month" href="#/history/2013/'+(null==(__t=month)?"":__t)+'">Last month</a> -->\n <div class="btn-group usage-links-toggle" data-toggle="buttons-radio">\n <button type="button" class="button active" value="current-month" data-url="#" >So far this month</button>\n <button type="button" class="button" value"last-month" data-url="#/history/2013/'+(null==(__t=month)?"":__t)+'">Last month</button>\n </div>\n </p>\n '),__p+='\n <div id="messaging"></div>\n</header>\n\n<section id="summary" class="row activity-pane">\n <div id="tabs-container">\n <div id="bill" class="row-fluid"></div>\n <div id="usage" class=""></div>\n </div>\n</section>\n';return __p},this.JST["app/addons/dashboard/templates/activitytabs.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div id="bill" class="row-fluid"></div>\n<div id="usage" class=""></div>\n';return __p},this.JST["app/addons/dashboard/templates/bill.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n <li class="span3 active" style="margin-left: 0" data-tab="#heavy-tab">\n <div class="indicator-wrapper"> \n <div class="indicator"> \n </div>\n <div class="content">\n <p>Heavy HTTP</p>\n <span class="cost"><span class="super">$</span>'+(null==(__t=writes.cost)?"":__t)+'</span>\n <div class="operator">+</div>\n </div> \n </div>\n </li>\n <li class="span3" data-tab="#light-tab">\n <div class="indicator-wrapper"> \n <div class="indicator"> \n </div>\n <div class="content">\n <p>Light HTTP</p>\n <span class="cost"><span class="super">$</span>'+(null==(__t=reads.cost)?"":__t)+'</span>\n <div class="operator">+</div>\n </div> \n </div>\n </li>\n <li class="span3" data-tab="#data-tab">\n <div class="indicator-wrapper"> \n <div class="indicator"> \n </div>\n <div class="content">\n <p>Data Volume</p>\n <span class="cost"><span class="super">$</span>'+(null==(__t=data_vol.cost)?"":__t)+'</span>\n <div class="operator">=</div>\n </div> \n </div>\n </li>\n <!-- TOTAL -->\n <div class="span3 total">\n <div id="bill-summary"></div>\n <div id="bill-message"></div>\n <div class="learn-more">\n <a href="https://cloudant.com/for-developers/faq/account/">Learn about Cloudant pricing</a>\n </div>\n </div>\n ';return __p},this.JST["app/addons/dashboard/templates/billbreakdown.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+="<p>\n "+(null==(__t=count)?"":__t)+" "+(null==(__t=label)?"":__t)+" so far this month @\n "+(null==(__t=costString)?"":__t)+" = $"+(null==(__t=cost)?"":__t)+"\n</p>\n";return __p},this.JST["app/addons/dashboard/templates/billmessage.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)user.underThirty()?__p+='\n<div class="alert alert-info">\n <p>Lucky you! Your first 30 days are free. We won\'t start charging you for usage until '+(null==(__t=endDate)?"":__t)+'. <a href="#account/payment">Add a credit card.</a></p> \n</div>\n':freeUsage?__p+='\n<div class="alert alert-info">\n We\'ll not charge you for this month if your usage remains below\n $'+(null==(__t=chargingThreshold)?"":__t)+".\n</div>\n":(__p+='\n <div class="alert">\n Your usage this month has exceeded $5. At the end of this billing period (end of the month), we will charge you for your usage. ',onFile||(__p+='<a href="#account/payment">Add a credit card.</a>'),__p+=" \n </div>\n"),__p+="\n";return __p},this.JST["app/addons/dashboard/templates/billsummary.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+="<div>\nFor period ending <strong>"+(null==(__t=bill_date)?"":__t)+'</strong>\n <span class="cost green"><span class="super">$</span>'+(null==(__t=total)?"":__t)+"</span>\n</div>\n";return __p},this.JST["app/addons/dashboard/templates/newuser.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n<div class="alert alert-block">\n<p class="new-user">Hi '+(null==(__t=user.get("username"))?"":__t)+", we haven't yet taken a snapshot of your usage, so we don't yet have usage to report to you. We'll be able to show you your usage within the hour.</p>\n<p>Learn about <a href=\"https://cloudant.com/pricing\">Cloudant pricing</a>.</p>\n</div>\n";return __p},this.JST["app/addons/dashboard/templates/plot.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+="<svg style='width:500px; height:270px;' />\n";return __p},this.JST["app/addons/dashboard/templates/usage.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+=error?'\n<div id="heavy-tab" class="tab-pane active">\n Sorry, something has gone wrong. :(\n</div>\n<div id="light-tab" class="tab-pane">\n Sorry, something has gone wrong. :(\n</div>\n<div id="data-tab" class="tab-pane">\n Sorry, something has gone wrong. :(\n</div>\n':'\n\n <div id="heavy-tab" class="tab-pane active">\n <p>Heavy HTTP requests are more processing-intensive than light HTTP requests.</p>\n <div id="heavy" class="graph"></div>\n <div id="heavy-breakdown"></div>\n </div>\n <div id="light-tab" class="tab-pane">\n <p>Light HTTP requests require less processing than heavy HTTP requests.</p>\n <div id="light" class="graph"></div>\n <div id="light-breakdown"></div>\n </div>\n <div id="data-tab" class="tab-pane">\n <p>The data volume of your DB, search and view indexes so far this month.</p>\n <div id="data" class="graph"></div>\n <div id="data-breakdown"></div>\n <p>Storing 1GB for a month costs $1. Your data cost is calculated pro rata, based on hourly snapshots of the data in your account.</p>\n </div>\n\n',__p+="\n\n";return __p},this.JST["app/addons/exampleAuth/templates/noAccess.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="row-fluid" >\n <div class="span6 offset4">\n <h3> You do not have permission to view this page </h3>\n</div>\n</div>\n';return __p},this.JST["app/addons/logs/templates/dashboard.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n <h2> CouchDB Logs </h2>\n <table class="table table-bordered" >\n <thead>\n <tr>\n <th class="Date">Date</th>\n <th class="Log Level">Log Value</th>\n <th class="Pid">Pid</th>\n <th class="Args">Url</th>\n </tr>\n </thead>\n\n <tbody>\n ',logs.each(function(a){__p+='\n <tr class="'+(null==(__t=a.logLevel())?"":__t)+'">\n <td>\n <!-- TODO: better format the date -->\n '+(null==(__t=a.date())?"":__t)+"\n </td>\n <td>\n "+(null==(__t=a.logLevel())?"":__t)+"\n </td>\n <td>\n "+(null==(__t=a.pid())?"":__t)+"\n </td>\n <td>\n <!-- TODO: split the line, maybe put method in it's own column -->\n "+(null==(__t=a.args())?"":__t)+"\n </td>\n </tr>\n "}),__p+="\n </tbody>\n</table>\n";return __p},this.JST["app/addons/logs/templates/filterItem.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<span class="label label-info"> '+(null==(__t=filter)?"":__t)+' </span>\n<a class="label label-info remove-filter" href="#">&times;</a>\n';return __p},this.JST["app/addons/logs/templates/sidebar.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="log-sidebar">\n <header>Log Filter</header>\n <form class="form-inline" id="log-filter-form">\n <fieldset>\n <input type="text" name="filter" placeholder="Type a filter to sort the logs by">\n <!-- TODO: filter by method -->\n <!-- TODO: correct removed filter behaviour -->\n <button type="submit" class="btn">Filter</button>\n <span class="help-block"> <h6> Eg. debug or <1.4.1> or any regex </h6> </span>\n </fieldset>\n </form>\n <ul id="filter-list"></ul>\n</div>\n';return __p},this.JST["app/addons/permissions/templates/item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<span> '+(null==(__t=item)?"":__t)+' </span>\n<button type="button" class="close">&times;</button>\n\n';return __p},this.JST["app/addons/permissions/templates/permissions.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="sections"> </div>\n';return __p},this.JST["app/addons/permissions/templates/section.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<header class="border-hdr">\n<h3> '+(null==(__t=section)?"":__t)+' </h3>\n<p id="help"> '+(null==(__t=help)?"":__t)+' <a href="'+(null==(__t=getDocUrl("database_permission"))?"":__t)+'" target="_blank"><i class="icon-question-sign"> </i> </a></p>\n</header>\n\n<div class="row">\n <div class="span6">\n <header>\n <h4> Users </h4>\n <p>Specify users who will have '+(null==(__t=section)?"":__t)+' access to this database.</p>\n </header>\n <form class="permission-item-form form-inline">\n <input data-section="'+(null==(__t=section)?"":__t)+'" data-type="names" type="text" class="item input-small" placeholder="Add Name">\n <button type="submit" class="button btn green fonticon-circle-plus">Add Name</button>\n </form>\n <ul class="clearfix unstyled permission-items span10" id="'+(null==(__t=section)?"":__t)+'-items-names">\n </ul>\n </div>\n <div class="span6">\n <header>\n <h4> Roles </h4>\n <p>All users under the following role(s) will have '+(null==(__t=section)?"":__t)+' access.</p>\n </header>\n\n\n <form class="permission-item-form form-inline">\n <input data-section="'+(null==(__t=section)?"":__t)+'" data-type="roles" type="text" class="item input-small" placeholder="Add Role">\n <button type="submit" class="button btn green fonticon-circle-plus">Add Role</button>\n </form>\n <ul class="unstyled permission-items span10" id="'+(null==(__t=section)?"":__t)+'-items-roles">\n </ul>\n </div>\n</div>\n';return __p},this.JST["app/addons/plugins/templates/plugins.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\n\nLicensed under the Apache License, Version 2.0 (the "License"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\n-->\n <div id="content">\n <div class="row">\n <h2>GeoCouch</h2>\n <p>Version: <strong>couchdb1.2.x_v0.3.0-11-g66e6219</strong></p>\n <p>Author: Volker Mische</p>\n <p>\n Available Erlang Versions:\n <ul>\n <li>CouchDB 1.4.0-XXX R15B01</li>\n </ul>\n </p>\n <p>\n <button href="#" class="install-plugin" data-url="http://people.apache.org/~jan" data-checksums=\'{"1.4.0": {"R15B03":"D5QPhrJTAifM42DXqAj4RxzfEtI="}}\' data-name="geocouch" data-version="couchdb1.2.x_v0.3.0-16-g66e6219">Install GeoCouch Now</button>\n </p>\n </div>\n <div class="row">\n <h2>CouchPerUser</h2>\n <p>Version: <strong>1.0.0</strong></p>\n <p>Author: Bob Ippolito</p>\n <p>\n Available Erlang Versions:\n <ul>\n <li>CouchDB 1.4.0-XXX R15B01</li>\n </ul>\n </p>\n <p>\n <button href="#" class="install-plugin" data-url="http://people.apache.org/~jan" data-checksums=\'{"1.4.0": {"R15B03":"Aj3mjC6M75NA62q5/xkP0tl8Hws="}}\' data-name="couchperuser" data-version="1.0.0">Install CouchPerUser Now</button>\n </p>\n </div>\n </div>\n </div></body>\n <script>\n $(\'.install-plugin\').each(function() {\n var button = $(this);\n var name = button.data(\'name\');\n var version = button.data(\'version\');\n $.get("/_config/plugins/" + name + "/", function(body, textStatus) {\n body = JSON.parse(body);\n if(body == version) {\n button.html(\'Already Installed. Click to Uninstall\');\n button.data(\'delete\', true);\n } else {\n button.html(\'Other Version Installed: \' + body);\n button.attr(\'disabled\', true);\n }\n });\n });\n\n $(\'.install-plugin\').click(function(event) {\n var button = $(this);\n var delete_plugin = button.data(\'delete\') || false;\n var plugin_spec = JSON.stringify({\n name: button.data(\'name\'),\n url: button.data(\'url\'),\n version: button.data(\'version\'),\n checksums: button.data(\'checksums\'),\n "delete": delete_plugin\n });\n var url = \'/_plugins\'\n $.ajax({\n url: url,\n type: \'POST\',\n data: plugin_spec,\n contentType: \'application/json\', // what we send to the server\n dataType: \'json\', // expected from the server\n processData: false, // keep our precious JSON\n success: function(data, textStatus, jqXhr) {\n if(textStatus == "success") {\n var action = delete_plugin ? \'Uninstalled\' : \'Installed\';\n button.html(\'Sucessfully \' + action);\n button.attr(\'disabled\', true);\n } else {\n button.html(textStatus);\n }\n },\n beforeSend: function(xhr) {\n xhr.setRequestHeader(\'Accept\', \'application/json\');\n },\n });\n });\n </script>\n <style type="text/css">\n .row {\n background-color: #FFF;\n padding:1em;\n margin-bottom:1em;\n }\n </style>';return __p},this.JST["app/addons/replication/templates/form.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<form id="replication" class="form-horizontal">\n <div class="from form_set local">\n <div class="btn-group">\n <button class="btn local-btn" type="button" value="local">Local</button>\n <button class="btn remote-btn" type="button" value="remote">Remote</button>\n </div>\n\n <div class="from_local local_option">\n <select id="from_name" name="source">\n ',_.each(databases,function(a){__p+='\n <option value="'+(null==(__t=a.name)?"":__t)+'" ',selectedDB==a.name&&(__p+="selected"),__p+=" >"+(null==(__t=a.name)?"":__t)+"</option>\n "}),__p+='\n </select>\n </div>\n <div class="from_to_remote remote_option">\n <input type="text" id="from_url" name="source" size="30" value="http://">\n </div>\n </div>\n\n <div class="form_set middle">\n <span class="circle "></span>\n <a href="#" title="Switch Target and Source" class="swap">\n <span class="fonticon-swap-arrows"></span>\n </a>\n </span>\n </div>\n\n <div class="to form_set local">\n <div class="btn-group">\n <button class="btn local-btn" type="button" value="local">Local</button>\n <button class="btn remote-btn" type="button" value="remote">Remote</button>\n </div>\n <div class="to_local local_option">\n <input type="text" id="to_name" name="target" size="30" placeholder="database name">\n </div>\n\n <div class="to_remote remote_option">\n <input type="text" id="to_url" name="target" size="30" value="http://">\n </div>\n </div>\n\n\n <div class="actions">\n <div class="control-group">\n <label for="continuous">\n <input type="checkbox" name="continuous" value="true" id="continuous">\n Continuous\n </label>\n\n <label for="createTarget">\n <input type="checkbox" name="create_target" value="true" id="createTarget">\n Create Target <a href="'+(null==(__t=getDocUrl("replication_doc"))?"":__t)+'" target="_blank"><i class="icon-question-sign" rel="tooltip" title="Create the target database"></i></a>\n </label>\n </div>\n\n <button class="btn btn-success btn-large save" type="submit">Replicate</button>\n </div>\n</form>\n\n<div id="replicationStatus"></div>\n';return __p},this.JST["app/addons/replication/templates/progress.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<p class="span6 break">Replicating <strong>'+(null==(__t=source)?"":__t)+"</strong> to <strong>"+(null==(__t=target)?"":__t)+'</strong></p>\n\n<div class="span4 progress progress-striped active">\n <div class="bar" style="width: '+(null==(__t=progress||0)?"":__t)+'%;">'+(null==(__t=progress||"0")?"":__t)+'%</div>\n</div>\n\n<span class="span1">\n <button class="cancel btn btn-danger btn-large delete" data-source="'+(null==(__t=source)?"":__t)+'" data-rep-id="'+(null==(__t=repid)?"":__t)+'" data-continuous="'+(null==(__t=continuous)?"":__t)+'" data-target="'+(null==(__t=target)?"":__t)+'">Cancel</a>\n</span>\n';
-return __p},this.JST["app/addons/search/templates/analyzer_multiple.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<input type="text" name="analyzer-name" id="analyzer-name" value="perfield"/>\n\n<label for="analyzer-default">\n Default\n</label>\n\n<select name="analyzer-default" id="analyzer-default">\n <option value="keyword">keyword </option> \n <option value="simple">simple </option> \n <option value="whitespace">whitespace </option> \n <option value="arabic">arabic </option> \n <option value="bulgarian">bulgarian </option> \n <option value="brazilian">brazilian </option> \n <option value="catalan">catalan </option> \n <option value="cjk">cjk </option> \n <option value="chinese">chinese </option> \n <option value="czech">czech </option> \n <option value="danish">danish </option> \n <option value="german">german </option> \n <option value="greek"> greek</option> \n <option value="english">english </option> \n <option value="spanish">spanish </option> \n <option value="basque">basque </option> \n <option value="persian">persian </option> \n <option value="finnish">finnish </option> \n <option value="french">french </option> \n <option value="irish"> irish</option> \n <option value="galician">galician </option> \n <option value="hindi">hindi </option> \n <option value="hungarian">hungarian </option> \n <option value="armenian" >armenian </option> \n <option value="indonesian">indonesian </option> \n <option value="italian" >italian </option> \n <option value="japanese" >japanese </option> \n <option value="latvian">latvian </option> \n <option value="dutch" >dutch </option> \n <option value="norwegian">norwegian </option> \n <option value="polish">polish </option> \n <option value="portuguese">portuguese </option> \n <option value="romanian">romanian </option> \n <option value="russian" >russian </option> \n <option value="classic">classic </option> \n <option value="standard">standard </option> \n <option value="email">email </option> \n <option value="swedish" >swedish </option> \n <option value="thai">thai </option> \n <option value="turkish">turkish </option> \n</select>\n\n<label for="analyzer-fields">\n Fields\n</label>\n<select multiple="multiple" name="analyzer-fields" id="analyzer-fields">\n<option value="keyword">keyword </option> \n <option value="simple">simple </option> \n <option value="whitespace">whitespace </option> \n <option value="arabic">arabic </option> \n <option value="bulgarian">bulgarian </option> \n <option value="brazilian">brazilian </option> \n <option value="catalan">catalan </option> \n <option value="cjk">cjk </option> \n <option value="chinese">chinese </option> \n <option value="czech">czech </option> \n <option value="danish">danish </option> \n <option value="german">german </option> \n <option value="greek"> greek</option> \n <option value="english">english </option> \n <option value="spanish">spanish </option> \n <option value="basque">basque </option> \n <option value="persian">persian </option> \n <option value="finnish">finnish </option> \n <option value="french">french </option> \n <option value="irish"> irish</option> \n <option value="galician">galician </option> \n <option value="hindi">hindi </option> \n <option value="hungarian">hungarian </option> \n <option value="armenian" >armenian </option> \n <option value="indonesian">indonesian </option> \n <option value="italian" >italian </option> \n <option value="japanese" >japanese </option> \n <option value="latvian">latvian </option> \n <option value="dutch" >dutch </option> \n <option value="norwegian">norwegian </option> \n <option value="polish">polish </option> \n <option value="portuguese">portuguese </option> \n <option value="romanian">romanian </option> \n <option value="russian" >russian </option> \n <option value="classic">classic </option> \n <option value="standard">standard </option> \n <option value="email">email </option> \n <option value="swedish" >swedish </option> \n <option value="thai">thai </option> \n <option value="turkish">turkish </option> \n</select>\n';return __p},this.JST["app/addons/search/templates/analyzer_single.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<label for="analyzer-default">\n Type\n</label>\n<select name="analyzer-default" id="analyzer-default">\n<option value="standard" selected="selected">Standard</option>\n<option value="keyword">Keyword </option>\n<option value="simple">Simple</option>\n<option value="whitespace">Whitespace </option>\n<option value="classic">Classic</option>\n<option value="email">Email</option>\n<optgroup label="Language-specific">\n<option value="arabic">Arabic</option>\n<option value="armenian">Armenian</option>\n<option value="basque">Basque</option>\n<option value="bulgarian">Bulgarian</option>\n<option value="brazilian">Brazilian</option>\n<option value="catalan">Catalan</option>\n<option value="cjk">Cjk</option>\n<option value="chinese">Chinese</option>\n<option value="czech">Czech</option>\n<option value="danish">Danish</option>\n<option value="dutch">Dutch</option>\n<option value="english">English</option>\n<option value="finnish">Finnish</option>\n<option value="french">French</option>\n<option value="galician">Galician</option>\n<option value="german">German</option>\n<option value="greek">Greek</option>\n<option value="hindi">Hindi</option>\n<option value="hungarian">Hungarian</option>\n<option value="indonesian">Indonesian</option>\n<option value="irish">Irish</option>\n<option value="italian">Italian</option>\n<option value="japanese">Japanese</option>\n<option value="latvian">Latvian</option>\n<option value="norwegian">Norwegian</option>\n<option value="persian">Persian</option>\n<option value="polish">Polish</option>\n<option value="portuguese">Portuguese</option>\n<option value="romanian">Romanian</option>\n<option value="russian">Russian</option>\n<option value="spanish">Spanish</option>\n<option value="swedish">Swedish</option>\n<option value="thai">Thai</option>\n<option value="turkish">Turkish</option>\n</optgroup>\n</select>\n';return __p},this.JST["app/addons/search/templates/index_menu_item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<a href="#database/'+(null==(__t=database)?"":__t)+"/_design/"+(null==(__t=ddoc)?"":__t)+"/_search/"+(null==(__t=index)?"":__t)+'" id="'+(null==(__t=ddoc)?"":__t)+"_"+(null==(__t=index)?"":__t)+'" class="toggle-view">\n <i class="icon-search"></i> '+(null==(__t=ddoc)?"":__t)+'<span class="divider">/</span>'+(null==(__t=index)?"":__t)+"\n</a>\n";return __p},this.JST["app/addons/search/templates/preview_form.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<form id="preview">\n <div class="input-append">\n <input class="span2" id="queryText" type="text" placeholder="Enter your search query term"/>\n <button class="btn green button" type="submit">Query</button>\n </div>\n</form>\n\n<table class="table" style="width:100%" id="preview-results">\n <tbody>\n </tbody>\n\n</table>\n';return __p},this.JST["app/addons/search/templates/preview_item.html"]=function(obj){obj||(obj={});var __p="",__e=_.escape;with(obj)__p+='<td>\n <div>\n <pre class="prettyprint">'+__e(result.prettyJSON())+"</pre>\n </div>\n</td>\n";return __p},this.JST["app/addons/search/templates/search_index_form.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+=' <ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">\n <li class=""> <a id="index-nav" data-bypass="true" class="fonticon-wrench fonticon" data-toggle="tab" href="',newSearch||(__p+="#search-index-form"),__p+='"> \n ',__p+=newSearch?"Create Search Index ":"Edit Search Index ",__p+='</a>\n </li>\n </ul>\n\n\n <div class="all-docs-list errors-container"></div>\n <div class="tab-content">\n <div class="tab-pane active" id="search-index-form">\n <div class="ddoc-alert well">\n <div class="errors-container"></div>\n\n <form class="form-horizontal search-query-save" id="search-index">\n\n <div class="control-group design-doc-group"> </div>\n <div class="control-group">\n <label for="search-name">Index name</label>\n <input type="text" id="search-name" value="'+(null==(__t=indexName)?"":__t)+'"/>\n </div>\n\n <div class="control-group search-function">\n <label for="search-function">Search index function</label>\n <div class="js-editor" id="search-function"></div>\n </div>\n \n <div class="well well-small">\n <div class="control-group">\n <label for="search-analyzer">Analyzer</label>\n </div>\n <!--insert analyzer-->\n <div id="analyzer-type" class="control-group"></div>\n </div>\n\n\n <div class="control-group">\n <button class="button green save fonticon-circle-check">Save &amp; Build Index</button>\n ',newSearch||(__p+='\n <button class="button delete outlineGray fonticon-circle-x">Delete</button>\n '),__p+='\n </div>\n <div class="clearfix"></div>\n </form>\n\n </div>\n </div>\n </div>\n\n';return __p},this.JST["app/addons/search/templates/search_menu.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<li class="nav-header">Search Indexes\n</li>\n<li>\n <a id="new-search" href="#database/'+(null==(__t=database)?"":__t)+'/new_search" class="new">\n <i class="icon-plus"></i> New\n </a>\n</li>\n';return __p},this.JST["app/addons/stats/templates/by_method.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<h2>By Method <small>GET, POST, PUT, DELETE</small></h2>\n<div id="httpd_request_methods"></div>\n';return __p},this.JST["app/addons/stats/templates/pie_table.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="row-fluid">\n <h2> '+(null==(__t=datatype)?"":__t)+' </h2>\n</div>\n\n<div class="row-fluid">\n <div>\n <table class="table table-condensed table-striped">\n <thead>\n <tr>\n <th> Description </th>\n <th> current </th>\n <th> sum </th>\n <th> mean </th>\n <th> stddev </th>\n <th> min </th>\n <th> max </th>\n </tr>\n </thead>\n ',_.each(statistics,function(a){a.get("sum")&&(__p+="\n <tr>\n <td>"+(null==(__t=a.get("description"))?"":__t)+"</td>\n <td>"+(null==(__t=a.get("current"))?"":__t)+"</td>\n <td>"+(null==(__t=a.get("sum"))?"":__t)+"</td>\n <td>"+(null==(__t=a.get("mean"))?"":__t)+"</td>\n <td>"+(null==(__t=a.get("stddev"))?"":__t)+"</td>\n <td>"+(null==(__t=a.get("min"))?"":__t)+"</td>\n <td>"+(null==(__t=a.get("max"))?"":__t)+"</td>\n </tr>\n ")}),__p+='\n </table>\n </div>\n\n <div class="span5" style="height:430px;min-width: 430px">\n <center>\n <svg id="'+(null==(__t=datatype)?"":__t)+'_graph"></svg>\n </center>\n </div>\n</div>\n';return __p},this.JST["app/addons/stats/templates/stats.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="datatypes">\n</div>\n';return __p},this.JST["app/addons/stats/templates/statselect.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n',_.each(datatypes,function(a){__p+='\n<li> \n<a href="#stats" class="datatype-select" data-type-select="'+(null==(__t=a)?"":__t)+'"> \n '+(null==(__t=a)?"":__t)+'\n <i class="icon-chevron-right" style="float:right"></i>\n</a>\n</li>\n'}),__p+="\n";return __p},this.JST["app/addons/style/templates/footer.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<div class="row-fluid">\n <div>\n <div class="row-fluid company-resources">\n\n <div class="span2">\n <h3>Company</h3>\n <ul class="unstyled">\n <li>\n <a href="http://cloudant.com/about-us/">About Us</a>\n </li>\n <li>\n <a href="http://cloudant.com/about-us/team/">Team</a> / <a href="http://cloudant.com/about-us/jobs/"><strong>Jobs</strong></a>\n </li>\n <li>\n <a href="http://cloudant.com/customers/">Customers</a>\n </li>\n <li>\n <a href="http://cloudant.com/about-us/partners/">Partners</a>\n </li>\n <li>\n <a href="http://cloudant.com/about-us/news-room/">News</a> / <a href="http://cloudant.com/about-us/events/">Events</a>\n </li>\n </ul>\n </div>\n\n <div class="span2">\n <h3>&nbsp;</h3>\n <ul class="unstyled">\n <li>\n <a href="http://cloudant.com/#home-why-cloudant">Why Cloudant?</a>\n </li>\n <li>\n <a href="http://cloudant.com/#home-product">Product</a>\n </li>\n <li>\n <a href="http://cloudant.com/#home-service">Service</a>\n </li>\n <li>\n <a href="http://cloudant.com/#home-pricing">Pricing</a>\n </li>\n <li>\n <a href="http://bigcouch.cloudant.com" target="_blank">BigCouch</a>\n </li>\n </ul>\n </div>\n\n <div class="span2">\n <h3>Resources</h3>\n <ul class="unstyled">\n <li>\n <a href="http://cloudant.com/resources/case-studies/">Case Studies</a>\n </li>\n <li>\n <a href="http://cloudant.com/resources/white-papers/">White Papers</a>\n </li>\n <li>\n <a href="http://cloudant.com/resources/webinars/">Webinars</a>\n </li>\n <li>\n <a href="http://cloudant.com/resources/videos/">Videos</a>\n </li>\n </ul>\n </div>\n\n <div class="span2">\n <h3>For Developers</h3>\n <ul class="unstyled">\n <li>\n <a href="http://cloudant.com/for-developers/views/">MapReduce</a>\n </li>\n <li>\n <a href="http://cloudant.com/for-developers/search/">Lucene Search</a>\n </li>\n <li>\n <a href="http://cloudant.com/for-developers/examples/">Example Apps</a>\n </li>\n <li>\n <a href="http://cloudant.com/for-developers/faq/">FAQs</a>\n </li>\n </ul>\n </div>\n\n <div class="span2">\n <h3>Connect</h3>\n <ul class="unstyled">\n <li>\n <a href="http://cloudant.com/blog/">Blog</a> / <a href="http://feeds.feedburner.com/cloudantnews">RSS</a>\n </li>\n <li>\n <a href="http://webchat.freenode.net?channels=cloudant&amp;uio=MTE9MTk117">#cloudant on IRC</a>\n </li>\n <li>\n <a href="http://twitter.com/cloudant">Twitter</a>\n </li>\n <li>\n <a href="http://github.com/cloudant">Github</a>\n </li>\n </ul>\n </div>\n\n <div class="span2">\n <h3>&nbsp;</h3>\n <a href="http://cloudant.com/about-us/contact-us/">Contact Us</a>\n </div>\n\n </div>\n </div>\n\n</div>\n<div class="row-fluid copyright">\n <div class="span4">\n <p>\n Cloudant Dashboard '+(null==(__t=version)?"":__t)+'\n </p>\n </div>\n <div class="span2">\n <a href="http://cloudant.com/terms/">Terms Of Service</a>\n </div>\n <div class="span2">\n <a href="http://cloudant.com/privacy/">Privacy</a>\n </div>\n</div>\n';return __p},this.JST["app/addons/style/templates/nav-bar.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<a class="brand" href="#">\n <div class="icon"><!-- * --></div>\n</a>\n<nav id="main_navigation">\n <ul id="nav-links" class="nav">\n ',_.each(navLinks,function(a){__p+="\n ",a.view||(__p+='\n <li data-nav-name= "'+(null==(__t=a.title)?"":__t)+'">\n <a href="'+(null==(__t=a.href)?"":__t)+'">\n <span class="'+(null==(__t=a.icon)?"":__t)+' fonticon"></span>\n '+(null==(__t=a.title)?"":__t)+"\n </a>\n </li>\n "),__p+="\n "}),__p+='\n <li data-nav-name=\'documentation\'>\n <a href="https://docs.cloudant.com/" target="_blank">\n <span class="fonticon-bookmark fonticon"></span>\n Documentation\n </a>\n </ul>\n\n <div id="footer-links">\n\n <ul id="bottom-nav-links" class="nav">\n ',_.each(bottomNavLinks,function(a){__p+='\n <li data-nav-name= "'+(null==(__t=a.title)?"":__t)+'">\n <a href="'+(null==(__t=a.href)?"":__t)+'">\n <span class="'+(null==(__t=a.icon)?"":__t)+' fonticon"></span>\n '+(null==(__t=a.title)?"":__t)+"\n </a>\n </li>\n "}),__p+='\n </ul>\n\n <ul id="footer-nav-links" class="nav">\n<!-- <li>\n <a href="#logout" class="logout">Logout</a>\n </li> -->\n<!-- <li>\n <a class="see-footer">More...</a>\n </li> -->\n </ul>\n \n <ul id="toggle-nav">\n <li>\n <span class="cloudant-arrow_left fonticon"></span>\n </li> \n </ul>\n\n </div>\n</nav>\n\n';return __p},this.JST["app/addons/style/templates/nav_link_title.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<a href="#logout">\n Logout\n <span class="username"> '+(null==(__t=username)?"":__t)+' \n <span class="cluster">\n </span>\n </span>\n</a>\n';return __p},this.JST["app/addons/style/templates/new_portal_modal.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\n <h3>Hi, '+(null==(__t=username)?"":__t)+'. Welcome to your new dashboard.</h3>\n </div>\n <div class="modal-body">\n <p>There\'s a lot that\'s new around here, including improved <a href="#support">Support</a> and <a href="#replication">Replication</a> functionality, and an updated UI for your <a href="#_all_dbs">Databases</a>, too.</p>\n <p>If you prefer the old dash for certain things? No problem. We\'ll keep <a href="https://cloudant.com/dashboard">the old dashboard</a> online until Feb 28th</p>\n <div class="actions">\n <a href="#account/announcements" class="button blue cancel-button">Take a look at what\'s new</a>\n <a href="#" data-dismiss="modal" class="button cancel-button outlineGray">Close</a>\n </div>\n </div>\n\n';return __p},this.JST["app/addons/support/templates/closedtickets.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+="\n",0===tickets.length?__p+="\n <div>\n <p>You have no closed tickets.</p>\n </div>\n":(__p+="\n ",_.each(tickets,function(a){__p+="\n <div>\n <h3> \n CLOSED: \n "+(null==(__t=a.get("title"))?"":__t)+" \n <span>- Case "+(null==(__t=a.get("caseID"))?"":__t)+'</span> \n </h3>\n <p><a target="_blank" href="http://cloudant.fogbugz.com/default.asp?'+(null==(__t=a.id)?"":__t)+'">View the full ticket</a></p>\n </div>\n'}),__p+="\n"),__p+="\n";return __p},this.JST["app/addons/support/templates/detailedticket.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)model.get("responses")?(__p+='\n\n <div class="support-seperator newest">\n <h2>'+(null==(__t=model.get("title"))?"":__t)+'</h2>\n </div>\n\n <div id="discussion"></div>\n\n',showReply&&(__p+='\n <div class="editcase window-resizeable">\n <div class="edit-toggle">\n <button class="openEdit button blue cloudant-pencil" value="Reply">Reply</button>\n <button class="cancel-button button noOutlineLightblue cloudant-x" value="Close">Close</button>\n </div>\n <form id="edit" enctype="multipart/form-data">\n <header>From '+(null==(__t=username)?"":__t)+' \n <span class="date">'+(null==(__t=model.humanDate())?"":__t)+" "+(null==(__t=model.getTime())?"":__t)+' </span>\n </header>\n <textarea name="body" class="input-xxlarge input-xxtall" id="editBody" placeholder="Detailed comments here"></textarea>\n\n <span class="attachment-name"></span>\n <div class="form-buttons">\n <button type="submit" class="button green cloudant-circle-check" value="Submit">Submit</button>\n <a class="button cancel-button outlineGray cloudant-circle-x" value="Cancel">Cancel</a>\n <label class="fileContainer attach-file button attach-file noOutlineLightblue cloudant-paperclip"> Attach a file\n <input class="file" type="file" name="attachments" />\n </label>\n </div>\n\n </form>\n </div>\n'),__p+="\n\n"):__p+="\n <p>This case cannot be found.</p>\n",__p+="\n";return __p},this.JST["app/addons/support/templates/discussionvolley.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!-- HEADER -->\n<div class="row-fluid time-stamp">\n <div class="span3">\n <h4 class="meta">\n <div class="date">\n '+(null==(__t=model.humanDate())?"":__t)+'\n <div class="time">\n '+(null==(__t=model.getTime())?"":__t)+'\n </div>\n </div>\n </h4>\n </div>\n <div class="span8">\n <h4>\n <div class="person"><span class="edited">From</span> '+(null==(__t=user)?"":__t)+'\n </div>\n </h4>\n </div>\n</div>\n<!-- CONTENT -->\n<div class="row-fluid content">\n <div class="span8 offset3">\n <pre>'+(null==(__t=model.get("content"))?"":__t)+"</pre>\n ",model.get("attachments")&&(__p+='\n <ul class="unstyled">\n ',_.each(attachments,function(a){__p+='\n <li class="cloudant-paperclip">\n <a href="/_api/v2/support/tickets/'+(null==(__t=caseid)?"":__t)+"/files/"+(null==(__t=a.source)?"":__t)+'" target="_blank">'+(null==(__t=a.name)?"":__t)+"</a>\n </li>\n "}),__p+="\n </ul>\n "),__p+="\n \n ",first&&showReply&&(__p+='\n <button class="openEdit button outlineGray cloudant-pencil" value="Reply">Reply</button>\n '),__p+="\n </div>\n</div>\n";return __p},this.JST["app/addons/support/templates/form.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<header class="newticket"> \n <h3>New Case</h3>\n <div class="callout">\n <p>Submit a case, and our support staff will reply via email as soon as possible.</p>\n </div>\n</header>\n<form id="support-form" class="newticket" enctype="multipart/form-data">\n <label for="subject">Issue</label>\n <input id="subject" type="text" name="title" class="input-xxlarge" tabindex="1" />\n\n <label for="comments">Details</label>\n <textarea id="comments" name="body" class="input-xxlarge input-xxtall" tabindex="2" ></textarea>\n <input type="hidden" name="priority" value="3"/>\n <p>Please describe your issue in as much detail as possible.</p>\n <label class="fileContainer attach-file button attach-file noOutlineLightblue cloudant-paperclip"> Attach a file\n <input class="file" type="file" name="attachments" />\n </label>\n <span class="attachment-name"></span>\n <div class="form-buttons">\n <button type="submit" class="button green cloudant-circle-check" value="Submit" tabindex="3">Submit</button>\n </div>\n</form>\n';return __p},this.JST["app/addons/support/templates/sidebar.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+=' <div id="sidebar-menu">\n <ul id="nav-tickets" class="nav nav-tabs nav-stacked">\n </ul>\n </div>\n\n<header class="support-sidebar">\n <a href="#/support/new-ticket" id="case-button" class="button blue round-btn cloudant-circle-plus"> New Case</a>\n <ul id="nav-tickets-header" class="nav nav-tabs nav-stacked">\n <li class="header">\n <div class="ticket-case-id">Case</div>\n <div class="ticket-title">Title</div>\n <div class="ticket-status">Status</div>\n </li>\n </ul>\n</header>\n';return __p},this.JST["app/addons/support/templates/sidebaritem.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n<a href="#/support/'+(null==(__t=ticket.get("id"))?"":__t)+'" class="ticket">\n <div class="ticket-case-id">\n '+(null==(__t=ticket.get("caseID"))?"":__t)+'\n </div>\n <div class="ticket-title">\n '+(null==(__t=ticket.get("title"))?"":__t)+'\n </div>\n <div class="ticket-status '+(null==(__t=status)?"":__t)+'">\n '+(null==(__t=status)?"":__t)+"\n </div>\n</a>\n";return __p},this.JST["app/addons/support/templates/support.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid supportDash">\n <div class="with-sidebar content-area">\n <div id="sidebar-content" class="sidebar support-sidebar-hack"></div>\n <div id="dashboard-content" class="support-content-hack list window-resizeable"></div>\n </div>\n</div>\n';return __p},this.JST["app/addons/verifyinstall/templates/main.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<button id="start" class="btn btn-large btn-success"> Verify Installation </button>\n<div id="error"> </div>\n\n<table id="test-score" class="table table-striped table-bordered" >\n <thead>\n <tr>\n <th> Test </th>\n <th> Status </th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td> Create Database </td>\n <td id="create-database" class="status"> </td>\n </tr>\n <tr>\n <td> Create Document </td>\n <td id="create-document" class="status"> </td>\n </tr>\n <tr>\n <td> Update Document </td>\n <td id="update-document" class="status"> </td>\n </tr>\n <tr>\n <td> Delete Document </td>\n <td id="delete-document" class="status"> </td>\n </tr>\n <tr>\n <td> Create View </td>\n <td id="create-view" class="status"> </td>\n </tr>\n <tr>\n <td> Replication </td>\n <td id="replicate" class="status"> </td>\n </tr>\n </tbody>\n</table>\n';return __p},define("initialize",[],function(){var a={root:"/_utils/fauxton/",version:"1.0",host:"../.."};return a}),function(a,b){function c(a){var b=a.length,c=kb.type(a);return kb.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||"function"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)}function d(a){var b=zb[a]={};return kb.each(a.match(mb)||[],function(a,c){b[c]=!0}),b}function e(a,c,d,e){if(kb.acceptData(a)){var f,g,h=kb.expando,i=a.nodeType,j=i?kb.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||d!==b||"string"!=typeof c)return k||(k=i?a[h]=bb.pop()||kb.guid++:h),j[k]||(j[k]=i?{}:{toJSON:kb.noop}),("object"==typeof c||"function"==typeof c)&&(e?j[k]=kb.extend(j[k],c):j[k].data=kb.extend(j[k].data,c)),g=j[k],e||(g.data||(g.data={}),g=g.data),d!==b&&(g[kb.camelCase(c)]=d),"string"==typeof c?(f=g[c],null==f&&(f=g[kb.camelCase(c)])):f=g,f}}function f(a,b,c){if(kb.acceptData(a)){var d,e,f=a.nodeType,g=f?kb.cache:a,i=f?a[kb.expando]:kb.expando;if(g[i]){if(b&&(d=c?g[i]:g[i].data)){kb.isArray(b)?b=b.concat(kb.map(b,kb.camelCase)):b in d?b=[b]:(b=kb.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;for(;e--;)delete d[b[e]];if(c?!h(d):!kb.isEmptyObject(d))return}(c||(delete g[i].data,h(g[i])))&&(f?kb.cleanData([a],!0):kb.support.deleteExpando||g!=g.window?delete g[i]:g[i]=null)}}}function g(a,c,d){if(d===b&&1===a.nodeType){var e="data-"+c.replace(Bb,"-$1").toLowerCase();if(d=a.getAttribute(e),"string"==typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:+d+""===d?+d:Ab.test(d)?kb.parseJSON(d):d}catch(f){}kb.data(a,c,d)}else d=b}return d}function h(a){var b;for(b in a)if(("data"!==b||!kb.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function i(){return!0}function j(){return!1}function k(){try{return Y.activeElement}catch(a){}}function l(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function m(a,b,c){if(kb.isFunction(b))return kb.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return kb.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(Qb.test(b))return kb.filter(b,a,c);b=kb.filter(b,a)}return kb.grep(a,function(a){return kb.inArray(a,b)>=0!==c})}function n(a){var b=Ub.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function o(a,b){return kb.nodeName(a,"table")&&kb.nodeName(1===b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function p(a){return a.type=(null!==kb.find.attr(a,"type"))+"/"+a.type,a}function q(a){var b=ec.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function r(a,b){for(var c,d=0;null!=(c=a[d]);d++)kb._data(c,"globalEval",!b||kb._data(b[d],"globalEval"))}function s(a,b){if(1===b.nodeType&&kb.hasData(a)){var c,d,e,f=kb._data(a),g=kb._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)kb.event.add(b,c,h[c][d])}g.data&&(g.data=kb.extend({},g.data))}}function t(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!kb.support.noCloneEvent&&b[kb.expando]){e=kb._data(b);for(d in e.events)kb.removeEvent(b,d,e.handle);b.removeAttribute(kb.expando)}"script"===c&&b.text!==a.text?(p(b).text=a.text,q(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),kb.support.html5Clone&&a.innerHTML&&!kb.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&bc.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)
-}}function u(a,c){var d,e,f=0,g=typeof a.getElementsByTagName!==W?a.getElementsByTagName(c||"*"):typeof a.querySelectorAll!==W?a.querySelectorAll(c||"*"):b;if(!g)for(g=[],d=a.childNodes||a;null!=(e=d[f]);f++)!c||kb.nodeName(e,c)?g.push(e):kb.merge(g,u(e,c));return c===b||c&&kb.nodeName(a,c)?kb.merge([a],g):g}function v(a){bc.test(a.type)&&(a.defaultChecked=a.checked)}function w(a,b){if(b in a)return b;for(var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=yc.length;e--;)if(b=yc[e]+c,b in a)return b;return d}function x(a,b){return a=b||a,"none"===kb.css(a,"display")||!kb.contains(a.ownerDocument,a)}function y(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=kb._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&x(d)&&(f[g]=kb._data(d,"olddisplay",C(d.nodeName)))):f[g]||(e=x(d),(c&&"none"!==c||!e)&&kb._data(d,"olddisplay",e?c:kb.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}function z(a,b,c){var d=rc.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function A(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+=kb.css(a,c+xc[f],!0,e)),d?("content"===c&&(g-=kb.css(a,"padding"+xc[f],!0,e)),"margin"!==c&&(g-=kb.css(a,"border"+xc[f]+"Width",!0,e))):(g+=kb.css(a,"padding"+xc[f],!0,e),"padding"!==c&&(g+=kb.css(a,"border"+xc[f]+"Width",!0,e)));return g}function B(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=kc(a),g=kb.support.boxSizing&&"border-box"===kb.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=lc(a,b,f),(0>e||null==e)&&(e=a.style[b]),sc.test(e))return e;d=g&&(kb.support.boxSizingReliable||e===a.style[b]),e=parseFloat(e)||0}return e+A(a,b,c||(g?"border":"content"),d,f)+"px"}function C(a){var b=Y,c=uc[a];return c||(c=D(a,b),"none"!==c&&c||(jc=(jc||kb("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(b.documentElement),b=(jc[0].contentWindow||jc[0].contentDocument).document,b.write("<!doctype html><html><body>"),b.close(),c=D(a,b),jc.detach()),uc[a]=c),c}function D(a,b){var c=kb(b.createElement(a)).appendTo(b.body),d=kb.css(c[0],"display");return c.remove(),d}function E(a,b,c,d){var e;if(kb.isArray(b))kb.each(b,function(b,e){c||Ac.test(a)?d(a,e):E(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==kb.type(b))d(a,b);else for(e in b)E(a+"["+e+"]",b[e],c,d)}function F(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(mb)||[];if(kb.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function G(a,b,c,d){function e(h){var i;return f[h]=!0,kb.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Rc;return e(b.dataTypes[0])||!f["*"]&&e("*")}function H(a,c){var d,e,f=kb.ajaxSettings.flatOptions||{};for(e in c)c[e]!==b&&((f[e]?a:d||(d={}))[e]=c[e]);return d&&kb.extend(!0,a,d),a}function I(a,c,d){for(var e,f,g,h,i=a.contents,j=a.dataTypes;"*"===j[0];)j.shift(),f===b&&(f=a.mimeType||c.getResponseHeader("Content-Type"));if(f)for(h in i)if(i[h]&&i[h].test(f)){j.unshift(h);break}if(j[0]in d)g=j[0];else{for(h in d){if(!j[0]||a.converters[h+" "+j[0]]){g=h;break}e||(e=h)}g=g||e}return g?(g!==j[0]&&j.unshift(g),d[g]):void 0}function J(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];for(f=k.shift();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}}function K(){try{return new a.XMLHttpRequest}catch(b){}}function L(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function M(){return setTimeout(function(){$c=b}),$c=kb.now()}function N(a,b,c){for(var d,e=(ed[b]||[]).concat(ed["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function O(a,b,c){var d,e,f=0,g=dd.length,h=kb.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$c||M(),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:kb.extend({},b),opts:kb.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$c||M(),duration:c.duration,tweens:[],createTween:function(b,c){var d=kb.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(P(k,j.opts.specialEasing);g>f;f++)if(d=dd[f].call(j,a,k,j.opts))return d;return kb.map(k,N,j),kb.isFunction(j.opts.start)&&j.opts.start.call(a,j),kb.fx.timer(kb.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)}function P(a,b){var c,d,e,f,g;for(c in a)if(d=kb.camelCase(c),e=b[d],f=a[c],kb.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=kb.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 Q(a,b,c){var d,e,f,g,h,i,j=this,k={},l=a.style,m=a.nodeType&&x(a),n=kb._data(a,"fxshow");c.queue||(h=kb._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,j.always(function(){j.always(function(){h.unqueued--,kb.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[l.overflow,l.overflowX,l.overflowY],"inline"===kb.css(a,"display")&&"none"===kb.css(a,"float")&&(kb.support.inlineBlockNeedsLayout&&"inline"!==C(a.nodeName)?l.zoom=1:l.display="inline-block")),c.overflow&&(l.overflow="hidden",kb.support.shrinkWrapBlocks||j.always(function(){l.overflow=c.overflow[0],l.overflowX=c.overflow[1],l.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ad.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(m?"hide":"show"))continue;k[d]=n&&n[d]||kb.style(a,d)}if(!kb.isEmptyObject(k)){n?"hidden"in n&&(m=n.hidden):n=kb._data(a,"fxshow",{}),f&&(n.hidden=!m),m?kb(a).show():j.done(function(){kb(a).hide()}),j.done(function(){var b;kb._removeData(a,"fxshow");for(b in k)kb.style(a,b,k[b])});for(d in k)g=N(m?n[d]:0,d,j),d in n||(n[d]=g.start,m&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function R(a,b,c,d,e){return new R.prototype.init(a,b,c,d,e)}function S(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=xc[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function T(a){return kb.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}var U,V,W=typeof b,X=a.location,Y=a.document,Z=Y.documentElement,$=a.jQuery,_=a.$,ab={},bb=[],cb="1.10.2",db=bb.concat,eb=bb.push,fb=bb.slice,gb=bb.indexOf,hb=ab.toString,ib=ab.hasOwnProperty,jb=cb.trim,kb=function(a,b){return new kb.fn.init(a,b,V)},lb=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,mb=/\S+/g,nb=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ob=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,pb=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,qb=/^[\],:{}\s]*$/,rb=/(?:^|:|,)(?:\s*\[)+/g,sb=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,tb=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,ub=/^-ms-/,vb=/-([\da-z])/gi,wb=function(a,b){return b.toUpperCase()},xb=function(a){(Y.addEventListener||"load"===a.type||"complete"===Y.readyState)&&(yb(),kb.ready())},yb=function(){Y.addEventListener?(Y.removeEventListener("DOMContentLoaded",xb,!1),a.removeEventListener("load",xb,!1)):(Y.detachEvent("onreadystatechange",xb),a.detachEvent("onload",xb))};kb.fn=kb.prototype={jquery:cb,constructor:kb,init:function(a,c,d){var e,f;if(!a)return this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:ob.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1]){if(c=c instanceof kb?c[0]:c,kb.merge(this,kb.parseHTML(e[1],c&&c.nodeType?c.ownerDocument||c:Y,!0)),pb.test(e[1])&&kb.isPlainObject(c))for(e in c)kb.isFunction(this[e])?this[e](c[e]):this.attr(e,c[e]);return this}if(f=Y.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=Y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):kb.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),kb.makeArray(a,this))},selector:"",length:0,toArray:function(){return fb.call(this)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a){var b=kb.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return kb.each(this,a,b)},ready:function(a){return kb.ready.promise().done(a),this},slice:function(){return this.pushStack(fb.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]]:[])},map:function(a){return this.pushStack(kb.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:eb,sort:[].sort,splice:[].splice},kb.fn.init.prototype=kb.fn,kb.extend=kb.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[1]||{},i=2),"object"==typeof h||kb.isFunction(h)||(h={}),j===i&&(h=this,--i);j>i;i++)if(null!=(f=arguments[i]))for(e in f)a=h[e],d=f[e],h!==d&&(k&&d&&(kb.isPlainObject(d)||(c=kb.isArray(d)))?(c?(c=!1,g=a&&kb.isArray(a)?a:[]):g=a&&kb.isPlainObject(a)?a:{},h[e]=kb.extend(k,g,d)):d!==b&&(h[e]=d));return h},kb.extend({expando:"jQuery"+(cb+Math.random()).replace(/\D/g,""),noConflict:function(b){return a.$===kb&&(a.$=_),b&&a.jQuery===kb&&(a.jQuery=$),kb},isReady:!1,readyWait:1,holdReady:function(a){a?kb.readyWait++:kb.ready(!0)},ready:function(a){if(a===!0?!--kb.readyWait:!kb.isReady){if(!Y.body)return setTimeout(kb.ready);kb.isReady=!0,a!==!0&&--kb.readyWait>0||(U.resolveWith(Y,[kb]),kb.fn.trigger&&kb(Y).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===kb.type(a)},isArray:Array.isArray||function(a){return"array"===kb.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"==typeof a||"function"==typeof a?ab[hb.call(a)]||"object":typeof a},isPlainObject:function(a){var c;if(!a||"object"!==kb.type(a)||a.nodeType||kb.isWindow(a))return!1;try{if(a.constructor&&!ib.call(a,"constructor")&&!ib.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(d){return!1}if(kb.support.ownLast)for(c in a)return ib.call(a,c);for(c in a);return c===b||ib.call(a,c)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||Y;var d=pb.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=kb.buildFragment([a],b,e),e&&kb(e).remove(),kb.merge([],d.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=kb.trim(b),b&&qb.test(b.replace(sb,"@").replace(tb,"]").replace(rb,"")))?new Function("return "+b)():(kb.error("Invalid JSON: "+b),void 0)},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||kb.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&kb.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(ub,"ms-").replace(vb,wb)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;g>f&&(e=b.apply(a[f],d),e!==!1);f++);else for(f in a)if(e=b.apply(a[f],d),e===!1)break}else if(h)for(;g>f&&(e=b.call(a[f],f,a[f]),e!==!1);f++);else for(f in a)if(e=b.call(a[f],f,a[f]),e===!1)break;return a},trim:jb&&!jb.call(" ")?function(a){return null==a?"":jb.call(a)}:function(a){return null==a?"":(a+"").replace(nb,"")},makeArray:function(a,b){var d=b||[];return null!=a&&(c(Object(a))?kb.merge(d,"string"==typeof a?[a]:a):eb.call(d,a)),d},inArray:function(a,b,c){var d;if(b){if(gb)return gb.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if("number"==typeof d)for(;d>f;f++)a[e++]=c[f];else for(;c[f]!==b;)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;for(c=!!c;g>f;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,b,d){var e,f=0,g=a.length,h=c(a),i=[];if(h)for(;g>f;f++)e=b(a[f],f,d),null!=e&&(i[i.length]=e);else for(f in a)e=b(a[f],f,d),null!=e&&(i[i.length]=e);return db.apply([],i)},guid:1,proxy:function(a,c){var d,e,f;return"string"==typeof c&&(f=a[c],c=a,a=f),kb.isFunction(a)?(d=fb.call(arguments,2),e=function(){return a.apply(c||this,d.concat(fb.call(arguments)))},e.guid=a.guid=a.guid||kb.guid++,e):b},access:function(a,c,d,e,f,g,h){var i=0,j=a.length,k=null==d;if("object"===kb.type(d)){f=!0;for(i in d)kb.access(a,c,i,d[i],!0,g,h)}else if(e!==b&&(f=!0,kb.isFunction(e)||(h=!0),k&&(h?(c.call(a,e),c=null):(k=c,c=function(a,b,c){return k.call(kb(a),c)})),c))for(;j>i;i++)c(a[i],d,h?e:e.call(a[i],i,c(a[i],d)));return f?a:k?c.call(a):j?c(a[0],d):g},now:function(){return(new Date).getTime()},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}}),kb.ready.promise=function(b){if(!U)if(U=kb.Deferred(),"complete"===Y.readyState)setTimeout(kb.ready);else if(Y.addEventListener)Y.addEventListener("DOMContentLoaded",xb,!1),a.addEventListener("load",xb,!1);else{Y.attachEvent("onreadystatechange",xb),a.attachEvent("onload",xb);var c=!1;try{c=null==a.frameElement&&Y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!kb.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}yb(),kb.ready()}}()}return U.promise(b)},kb.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){ab["[object "+b+"]"]=b.toLowerCase()}),V=kb(Y),function(a,b){function c(a,b,c,d){var e,f,g,h,i,j,k,l,o,p;if((b?b.ownerDocument||b:O)!==G&&F(b),b=b||G,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(I&&!d){if(e=tb.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&M(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return ab.apply(c,b.getElementsByTagName(a)),c;if((g=e[3])&&x.getElementsByClassName&&b.getElementsByClassName)return ab.apply(c,b.getElementsByClassName(g)),c}if(x.qsa&&(!J||!J.test(a))){if(l=k=N,o=b,p=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=m(a),(k=b.getAttribute("id"))?l=k.replace(wb,"\\$&"):b.setAttribute("id",l),l="[id='"+l+"'] ",i=j.length;i--;)j[i]=l+n(j[i]);o=nb.test(a)&&b.parentNode||b,p=j.join(",")}if(p)try{return ab.apply(c,o.querySelectorAll(p)),c}catch(q){}finally{k||b.removeAttribute("id")}}}return v(a.replace(jb,"$1"),b,c,d)}function d(){function a(c,d){return b.push(c+=" ")>z.cacheLength&&delete a[b.shift()],a[c]=d}var b=[];return a}function e(a){return a[N]=!0,a}function f(a){var b=G.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function g(a,b){for(var c=a.split("|"),d=a.length;d--;)z.attrHandle[c[d]]=b}function h(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||X)-(~a.sourceIndex||X);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function i(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function j(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function k(a){return e(function(b){return b=+b,e(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(){}function m(a,b){var d,e,f,g,h,i,j,k=S[a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=z.preFilter;h;){(!d||(e=lb.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),d=!1,(e=mb.exec(h))&&(d=e.shift(),f.push({value:d,type:e[0].replace(jb," ")}),h=h.slice(d.length));for(g in z.filter)!(e=rb[g].exec(h))||j[g]&&!(e=j[g](e))||(d=e.shift(),f.push({value:d,type:g,matches:e}),h=h.slice(d.length));if(!d)break}return b?h.length:h?c.error(a):S(a,i).slice(0)}function n(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function o(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=Q++;return b.first?function(b,c,f){for(;b=b[d];)if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=P+" "+f;if(g){for(;b=b[d];)if((1===b.nodeType||e)&&a(b,c,g))return!0}else for(;b=b[d];)if(1===b.nodeType||e)if(j=b[N]||(b[N]={}),(i=j[d])&&i[0]===k){if((h=i[1])===!0||h===y)return h===!0}else if(i=j[d]=[k],i[1]=a(b,c,g)||y,i[1]===!0)return!0}}function p(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function q(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 r(a,b,c,d,f,g){return d&&!d[N]&&(d=r(d)),f&&!f[N]&&(f=r(f,g)),e(function(e,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=e||u(b||"*",h.nodeType?[h]:h,[]),r=!a||!e&&b?p:q(p,m,a,h,i),s=c?f||(e?a:o||d)?[]:g:r;if(c&&c(r,s,h,i),d)for(j=q(s,n),d(j,[],h,i),k=j.length;k--;)(l=j[k])&&(s[n[k]]=!(r[n[k]]=l));if(e){if(f||a){if(f){for(j=[],k=s.length;k--;)(l=s[k])&&j.push(r[k]=l);f(null,s=[],j,i)}for(k=s.length;k--;)(l=s[k])&&(j=f?cb.call(e,l):m[k])>-1&&(e[j]=!(g[j]=l))}}else s=q(s===g?s.splice(o,s.length):s),f?f(null,g,s,i):ab.apply(g,s)})}function s(a){for(var b,c,d,e=a.length,f=z.relative[a[0].type],g=f||z.relative[" "],h=f?1:0,i=o(function(a){return a===b},g,!0),j=o(function(a){return cb.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];e>h;h++)if(c=z.relative[a[h].type])k=[o(p(k),c)];else{if(c=z.filter[a[h].type].apply(null,a[h].matches),c[N]){for(d=++h;e>d&&!z.relative[a[d].type];d++);return r(h>1&&p(k),h>1&&n(a.slice(0,h-1).concat({value:" "===a[h-2].type?"*":""})).replace(jb,"$1"),c,d>h&&s(a.slice(h,d)),e>d&&s(a=a.slice(d)),e>d&&n(a))}k.push(c)}return p(k)}function t(a,b){var d=0,f=b.length>0,g=a.length>0,h=function(e,h,i,j,k){var l,m,n,o=[],p=0,r="0",s=e&&[],t=null!=k,u=D,v=e||g&&z.find.TAG("*",k&&h.parentNode||h),w=P+=null==u?1:Math.random()||.1;for(t&&(D=h!==G&&h,y=d);null!=(l=v[r]);r++){if(g&&l){for(m=0;n=a[m++];)if(n(l,h,i)){j.push(l);break}t&&(P=w,y=++d)}f&&((l=!n&&l)&&p--,e&&s.push(l))}if(p+=r,f&&r!==p){for(m=0;n=b[m++];)n(s,o,h,i);if(e){if(p>0)for(;r--;)s[r]||o[r]||(o[r]=$.call(j));o=q(o)}ab.apply(j,o),t&&!e&&o.length>0&&p+b.length>1&&c.uniqueSort(j)}return t&&(P=w,D=u),s};return f?e(h):h}function u(a,b,d){for(var e=0,f=b.length;f>e;e++)c(a,b[e],d);return d}function v(a,b,c,d){var e,f,g,h,i,j=m(a);if(!d&&1===j.length){if(f=j[0]=j[0].slice(0),f.length>2&&"ID"===(g=f[0]).type&&x.getById&&9===b.nodeType&&I&&z.relative[f[1].type]){if(b=(z.find.ID(g.matches[0].replace(xb,yb),b)||[])[0],!b)return c;a=a.slice(f.shift().value.length)}for(e=rb.needsContext.test(a)?0:f.length;e--&&(g=f[e],!z.relative[h=g.type]);)if((i=z.find[h])&&(d=i(g.matches[0].replace(xb,yb),nb.test(f[0].type)&&b.parentNode||b))){if(f.splice(e,1),a=d.length&&n(f),!a)return ab.apply(c,d),c;break}}return C(a,j)(d,b,!I,c,nb.test(a)),c}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+-new Date,O=a.document,P=0,Q=0,R=d(),S=d(),T=d(),U=!1,V=function(a,b){return a===b?(U=!0,0):0},W=typeof b,X=1<<31,Y={}.hasOwnProperty,Z=[],$=Z.pop,_=Z.push,ab=Z.push,bb=Z.slice,cb=Z.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},db="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",eb="[\\x20\\t\\r\\n\\f]",fb="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",gb=fb.replace("w","w#"),hb="\\["+eb+"*("+fb+")"+eb+"*(?:([*^$|!~]?=)"+eb+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+gb+")|)|)"+eb+"*\\]",ib=":("+fb+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+hb.replace(3,8)+")*)|.*)\\)|)",jb=new RegExp("^"+eb+"+|((?:^|[^\\\\])(?:\\\\.)*)"+eb+"+$","g"),lb=new RegExp("^"+eb+"*,"+eb+"*"),mb=new RegExp("^"+eb+"*([>+~]|"+eb+")"+eb+"*"),nb=new RegExp(eb+"*[+~]"),ob=new RegExp("="+eb+"*([^\\]'\"]*)"+eb+"*\\]","g"),pb=new RegExp(ib),qb=new RegExp("^"+gb+"$"),rb={ID:new RegExp("^#("+fb+")"),CLASS:new RegExp("^\\.("+fb+")"),TAG:new RegExp("^("+fb.replace("w","w*")+")"),ATTR:new RegExp("^"+hb),PSEUDO:new RegExp("^"+ib),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+eb+"*(even|odd|(([+-]|)(\\d*)n|)"+eb+"*(?:([+-]|)"+eb+"*(\\d+)|))"+eb+"*\\)|)","i"),bool:new RegExp("^(?:"+db+")$","i"),needsContext:new RegExp("^"+eb+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+eb+"*((?:-\\d)?\\d*)"+eb+"*\\)|)(?=[^-]|$)","i")},sb=/^[^{]+\{\s*\[native \w/,tb=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ub=/^(?:input|select|textarea|button)$/i,vb=/^h\d$/i,wb=/'|\\/g,xb=new RegExp("\\\\([\\da-f]{1,6}"+eb+"?|("+eb+")|.)","ig"),yb=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)};try{ab.apply(Z=bb.call(O.childNodes),O.childNodes),Z[O.childNodes.length].nodeType}catch(zb){ab={apply:Z.length?function(a,b){_.apply(a,bb.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}B=c.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},x=c.support={},F=c.setDocument=function(a){var b=a?a.ownerDocument||a:O,c=b.defaultView;return b!==G&&9===b.nodeType&&b.documentElement?(G=b,H=b.documentElement,I=!B(b),c&&c.attachEvent&&c!==c.top&&c.attachEvent("onbeforeunload",function(){F()}),x.attributes=f(function(a){return a.className="i",!a.getAttribute("className")}),x.getElementsByTagName=f(function(a){return a.appendChild(b.createComment("")),!a.getElementsByTagName("*").length}),x.getElementsByClassName=f(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),x.getById=f(function(a){return H.appendChild(a).id=N,!b.getElementsByName||!b.getElementsByName(N).length}),x.getById?(z.find.ID=function(a,b){if(typeof b.getElementById!==W&&I){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},z.filter.ID=function(a){var b=a.replace(xb,yb);return function(a){return a.getAttribute("id")===b}}):(delete z.find.ID,z.filter.ID=function(a){var b=a.replace(xb,yb);return function(a){var c=typeof a.getAttributeNode!==W&&a.getAttributeNode("id");return c&&c.value===b}}),z.find.TAG=x.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==W?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},z.find.CLASS=x.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==W&&I?b.getElementsByClassName(a):void 0},K=[],J=[],(x.qsa=sb.test(b.querySelectorAll))&&(f(function(a){a.innerHTML="<select><option selected=''></option></select>",a.querySelectorAll("[selected]").length||J.push("\\["+eb+"*(?:value|"+db+")"),a.querySelectorAll(":checked").length||J.push(":checked")}),f(function(a){var c=b.createElement("input");c.setAttribute("type","hidden"),a.appendChild(c).setAttribute("t",""),a.querySelectorAll("[t^='']").length&&J.push("[*^$]="+eb+"*(?:''|\"\")"),a.querySelectorAll(":enabled").length||J.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),J.push(",.*:")})),(x.matchesSelector=sb.test(L=H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&f(function(a){x.disconnectedMatch=L.call(a,"div"),L.call(a,"[s!='']:x"),K.push("!=",ib)}),J=J.length&&new RegExp(J.join("|")),K=K.length&&new RegExp(K.join("|")),M=sb.test(H.contains)||H.compareDocumentPosition?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)for(;b=b.parentNode;)if(b===a)return!0;return!1},V=H.compareDocumentPosition?function(a,c){if(a===c)return U=!0,0;var d=c.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(c);return d?1&d||!x.sortDetached&&c.compareDocumentPosition(a)===d?a===b||M(O,a)?-1:c===b||M(O,c)?1:E?cb.call(E,a)-cb.call(E,c):0:4&d?-1:1:a.compareDocumentPosition?-1:1}:function(a,c){var d,e=0,f=a.parentNode,g=c.parentNode,i=[a],j=[c];if(a===c)return U=!0,0;if(!f||!g)return a===b?-1:c===b?1:f?-1:g?1:E?cb.call(E,a)-cb.call(E,c):0;if(f===g)return h(a,c);for(d=a;d=d.parentNode;)i.unshift(d);for(d=c;d=d.parentNode;)j.unshift(d);for(;i[e]===j[e];)e++;return e?h(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},b):G},c.matches=function(a,b){return c(a,null,null,b)},c.matchesSelector=function(a,b){if((a.ownerDocument||a)!==G&&F(a),b=b.replace(ob,"='$1']"),!(!x.matchesSelector||!I||K&&K.test(b)||J&&J.test(b)))try{var d=L.call(a,b);if(d||x.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return c(b,G,null,[a]).length>0},c.contains=function(a,b){return(a.ownerDocument||a)!==G&&F(a),M(a,b)},c.attr=function(a,c){(a.ownerDocument||a)!==G&&F(a);var d=z.attrHandle[c.toLowerCase()],e=d&&Y.call(z.attrHandle,c.toLowerCase())?d(a,c,!I):b;return e===b?x.attributes||!I?a.getAttribute(c):(e=a.getAttributeNode(c))&&e.specified?e.value:null:e},c.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},c.uniqueSort=function(a){var b,c=[],d=0,e=0;if(U=!x.detectDuplicates,E=!x.sortStable&&a.slice(0),a.sort(V),U){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return a},A=c.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=A(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=A(b);return c},z=c.selectors={cacheLength:50,createPseudo:e,match:rb,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(xb,yb),a[3]=(a[4]||a[5]||"").replace(xb,yb),"~="===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]||c.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]&&c.error(a[0]),a},PSEUDO:function(a){var c,d=!a[5]&&a[2];return rb.CHILD.test(a[0])?null:(a[3]&&a[4]!==b?a[2]=a[4]:d&&pb.test(d)&&(c=m(d,!0))&&(c=d.indexOf(")",d.length-c)-d.length)&&(a[0]=a[0].slice(0,c),a[2]=d.slice(0,c)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(xb,yb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=R[a+" "];return b||(b=new RegExp("(^|"+eb+")"+a+"("+eb+"|$)"))&&R(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==W&&a.getAttribute("class")||"")})},ATTR:function(a,b,d){return function(e){var f=c.attr(e,a);return null==f?"!="===b:b?(f+="","="===b?f===d:"!="===b?f!==d:"^="===b?d&&0===f.indexOf(d):"*="===b?d&&f.indexOf(d)>-1:"$="===b?d&&f.slice(-d.length)===d:"~="===b?(" "+f+" ").indexOf(d)>-1:"|="===b?f===d||f.slice(0,d.length+1)===d+"-":!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){for(;p;){for(l=b;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){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===P&&j[1],m=j[0]===P&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[P,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===P)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[P,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var d,f=z.pseudos[a]||z.setFilters[a.toLowerCase()]||c.error("unsupported pseudo: "+a);return f[N]?f(b):f.length>1?(d=[a,a,"",b],z.setFilters.hasOwnProperty(a.toLowerCase())?e(function(a,c){for(var d,e=f(a,b),g=e.length;g--;)d=cb.call(a,e[g]),a[d]=!(c[d]=e[g])}):function(a){return f(a,0,d)}):f}},pseudos:{not:e(function(a){var b=[],c=[],d=C(a.replace(jb,"$1"));return d[N]?e(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:e(function(a){return function(b){return c(a,b).length>0}}),contains:e(function(a){return function(b){return(b.textContent||b.innerText||A(b)).indexOf(a)>-1}}),lang:e(function(a){return qb.test(a||"")||c.error("unsupported lang: "+a),a=a.replace(xb,yb).toLowerCase(),function(b){var c;do if(c=I?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===H},focus:function(a){return a===G.activeElement&&(!G.hasFocus||G.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.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!z.pseudos.empty(a)},header:function(a){return vb.test(a.nodeName)},input:function(a){return ub.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"))||b.toLowerCase()===a.type)},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){return[0>c?c+b:c]}),even:k(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:k(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:k(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:k(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},z.pseudos.nth=z.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})z.pseudos[w]=i(w);for(w in{submit:!0,reset:!0})z.pseudos[w]=j(w);l.prototype=z.filters=z.pseudos,z.setFilters=new l,C=c.compile=function(a,b){var c,d=[],e=[],f=T[a+" "];if(!f){for(b||(b=m(a)),c=b.length;c--;)f=s(b[c]),f[N]?d.push(f):e.push(f);
-f=T(a,t(e,d))}return f},x.sortStable=N.split("").sort(V).join("")===N,x.detectDuplicates=U,F(),x.sortDetached=f(function(a){return 1&a.compareDocumentPosition(G.createElement("div"))}),f(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||g("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),x.attributes&&f(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||g("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),f(function(a){return null==a.getAttribute("disabled")})||g(db,function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&d.specified?d.value:a[b]===!0?b.toLowerCase():null}),kb.find=c,kb.expr=c.selectors,kb.expr[":"]=kb.expr.pseudos,kb.unique=c.uniqueSort,kb.text=c.getText,kb.isXMLDoc=c.isXML,kb.contains=c.contains}(a);var zb={};kb.Callbacks=function(a){a="string"==typeof a?zb[a]||d(a):kb.extend({},a);var c,e,f,g,h,i,j=[],k=!a.once&&[],l=function(b){for(e=a.memory&&b,f=!0,h=i||0,i=0,g=j.length,c=!0;j&&g>h;h++)if(j[h].apply(b[0],b[1])===!1&&a.stopOnFalse){e=!1;break}c=!1,j&&(k?k.length&&l(k.shift()):e?j=[]:m.disable())},m={add:function(){if(j){var b=j.length;!function d(b){kb.each(b,function(b,c){var e=kb.type(c);"function"===e?a.unique&&m.has(c)||j.push(c):c&&c.length&&"string"!==e&&d(c)})}(arguments),c?g=j.length:e&&(i=b,l(e))}return this},remove:function(){return j&&kb.each(arguments,function(a,b){for(var d;(d=kb.inArray(b,j,d))>-1;)j.splice(d,1),c&&(g>=d&&g--,h>=d&&h--)}),this},has:function(a){return a?kb.inArray(a,j)>-1:!(!j||!j.length)},empty:function(){return j=[],g=0,this},disable:function(){return j=k=e=b,this},disabled:function(){return!j},lock:function(){return k=b,e||m.disable(),this},locked:function(){return!k},fireWith:function(a,b){return!j||f&&!k||(b=b||[],b=[a,b.slice?b.slice():b],c?k.push(b):l(b)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!f}};return m},kb.extend({Deferred:function(a){var b=[["resolve","done",kb.Callbacks("once memory"),"resolved"],["reject","fail",kb.Callbacks("once memory"),"rejected"],["notify","progress",kb.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return kb.Deferred(function(c){kb.each(b,function(b,f){var g=f[0],h=kb.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&kb.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?kb.extend(a,d):d}},e={};return d.pipe=d.then,kb.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,c,d,e=0,f=fb.call(arguments),g=f.length,h=1!==g||a&&kb.isFunction(a.promise)?g:0,i=1===h?a:kb.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?fb.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);g>e;e++)f[e]&&kb.isFunction(f[e].promise)?f[e].promise().done(j(e,d,f)).fail(i.reject).progress(j(e,c,b)):--h;return h||i.resolveWith(d,f),i.promise()}}),kb.support=function(b){var c,d,e,f,g,h,i,j,k,l=Y.createElement("div");if(l.setAttribute("className","t"),l.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=l.getElementsByTagName("*")||[],d=l.getElementsByTagName("a")[0],!d||!d.style||!c.length)return b;f=Y.createElement("select"),h=f.appendChild(Y.createElement("option")),e=l.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b.getSetAttribute="t"!==l.className,b.leadingWhitespace=3===l.firstChild.nodeType,b.tbody=!l.getElementsByTagName("tbody").length,b.htmlSerialize=!!l.getElementsByTagName("link").length,b.style=/top/.test(d.getAttribute("style")),b.hrefNormalized="/a"===d.getAttribute("href"),b.opacity=/^0.5/.test(d.style.opacity),b.cssFloat=!!d.style.cssFloat,b.checkOn=!!e.value,b.optSelected=h.selected,b.enctype=!!Y.createElement("form").enctype,b.html5Clone="<:nav></:nav>"!==Y.createElement("nav").cloneNode(!0).outerHTML,b.inlineBlockNeedsLayout=!1,b.shrinkWrapBlocks=!1,b.pixelPosition=!1,b.deleteExpando=!0,b.noCloneEvent=!0,b.reliableMarginRight=!0,b.boxSizingReliable=!0,e.checked=!0,b.noCloneChecked=e.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!h.disabled;try{delete l.test}catch(m){b.deleteExpando=!1}e=Y.createElement("input"),e.setAttribute("value",""),b.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),b.radioValue="t"===e.value,e.setAttribute("checked","t"),e.setAttribute("name","t"),g=Y.createDocumentFragment(),g.appendChild(e),b.appendChecked=e.checked,b.checkClone=g.cloneNode(!0).cloneNode(!0).lastChild.checked,l.attachEvent&&(l.attachEvent("onclick",function(){b.noCloneEvent=!1}),l.cloneNode(!0).click());for(k in{submit:!0,change:!0,focusin:!0})l.setAttribute(i="on"+k,"t"),b[k+"Bubbles"]=i in a||l.attributes[i].expando===!1;l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===l.style.backgroundClip;for(k in kb(b))break;return b.ownLast="0"!==k,kb(function(){var c,d,e,f="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",g=Y.getElementsByTagName("body")[0];g&&(c=Y.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(c).appendChild(l),l.innerHTML="<table><tr><td></td><td>t</td></tr></table>",e=l.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",b.reliableHiddenOffsets=j&&0===e[0].offsetHeight,l.innerHTML="",l.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",kb.swap(g,null!=g.style.zoom?{zoom:1}:{},function(){b.boxSizing=4===l.offsetWidth}),a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(l,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,d=l.appendChild(Y.createElement("div")),d.style.cssText=l.style.cssText=f,d.style.marginRight=d.style.width="0",l.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),typeof l.style.zoom!==W&&(l.innerHTML="",l.style.cssText=f+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="<div></div>",l.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==l.offsetWidth,b.inlineBlockNeedsLayout&&(g.style.zoom=1)),g.removeChild(c),c=l=e=d=null)}),c=f=g=h=d=e=null,b}({});var Ab=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Bb=/([A-Z])/g;kb.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?kb.cache[a[kb.expando]]:a[kb.expando],!!a&&!h(a)},data:function(a,b,c){return e(a,b,c)},removeData:function(a,b){return f(a,b)},_data:function(a,b,c){return e(a,b,c,!0)},_removeData:function(a,b){return f(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&kb.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),kb.fn.extend({data:function(a,c){var d,e,f=null,h=0,i=this[0];if(a===b){if(this.length&&(f=kb.data(i),1===i.nodeType&&!kb._data(i,"parsedAttrs"))){for(d=i.attributes;h<d.length;h++)e=d[h].name,0===e.indexOf("data-")&&(e=kb.camelCase(e.slice(5)),g(i,e,f[e]));kb._data(i,"parsedAttrs",!0)}return f}return"object"==typeof a?this.each(function(){kb.data(this,a)}):arguments.length>1?this.each(function(){kb.data(this,a,c)}):i?g(i,a,kb.data(i,a)):null},removeData:function(a){return this.each(function(){kb.removeData(this,a)})}}),kb.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=kb._data(a,b),c&&(!d||kb.isArray(c)?d=kb._data(a,b,kb.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=kb.queue(a,b),d=c.length,e=c.shift(),f=kb._queueHooks(a,b),g=function(){kb.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 kb._data(a,c)||kb._data(a,c,{empty:kb.Callbacks("once memory").add(function(){kb._removeData(a,b+"queue"),kb._removeData(a,c)})})}}),kb.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length<d?kb.queue(this[0],a):c===b?this:this.each(function(){var b=kb.queue(this,a,c);kb._queueHooks(this,a),"fx"===a&&"inprogress"!==b[0]&&kb.dequeue(this,a)})},dequeue:function(a){return this.each(function(){kb.dequeue(this,a)})},delay:function(a,b){return a=kb.fx?kb.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=kb.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};for("string"!=typeof a&&(c=a,a=b),a=a||"fx";h--;)d=kb._data(g[h],a+"queueHooks"),d&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var Cb,Db,Eb=/[\t\r\n\f]/g,Fb=/\r/g,Gb=/^(?:input|select|textarea|button|object)$/i,Hb=/^(?:a|area)$/i,Ib=/^(?:checked|selected)$/i,Jb=kb.support.getSetAttribute,Kb=kb.support.input;kb.fn.extend({attr:function(a,b){return kb.access(this,kb.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){kb.removeAttr(this,a)})},prop:function(a,b){return kb.access(this,kb.prop,a,b,arguments.length>1)},removeProp:function(a){return a=kb.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(kb.isFunction(a))return this.each(function(b){kb(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(mb)||[];h>g;g++)if(c=this[g],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Eb," "):" ")){for(f=0;e=b[f++];)d.indexOf(" "+e+" ")<0&&(d+=e+" ");c.className=kb.trim(d)}return this},removeClass:function(a){var b,c,d,e,f,g=0,h=this.length,i=0===arguments.length||"string"==typeof a&&a;if(kb.isFunction(a))return this.each(function(b){kb(this).removeClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(mb)||[];h>g;g++)if(c=this[g],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Eb," "):"")){for(f=0;e=b[f++];)for(;d.indexOf(" "+e+" ")>=0;)d=d.replace(" "+e+" "," ");c.className=a?kb.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):kb.isFunction(a)?this.each(function(c){kb(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var b,d=0,e=kb(this),f=a.match(mb)||[];b=f[d++];)e.hasClass(b)?e.removeClass(b):e.addClass(b);else(c===W||"boolean"===c)&&(this.className&&kb._data(this,"__className__",this.className),this.className=this.className||a===!1?"":kb._data(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(Eb," ").indexOf(b)>=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=kb.isFunction(a),this.each(function(c){var f;1===this.nodeType&&(f=e?a.call(this,c,kb(this).val()):a,null==f?f="":"number"==typeof f?f+="":kb.isArray(f)&&(f=kb.map(f,function(a){return null==a?"":a+""})),d=kb.valHooks[this.type]||kb.valHooks[this.nodeName.toLowerCase()],d&&"set"in d&&d.set(this,f,"value")!==b||(this.value=f))});if(f)return d=kb.valHooks[f.type]||kb.valHooks[f.nodeName.toLowerCase()],d&&"get"in d&&(c=d.get(f,"value"))!==b?c:(c=f.value,"string"==typeof c?c.replace(Fb,""):null==c?"":c)}}}),kb.extend({valHooks:{option:{get:function(a){var b=kb.find.attr(a,"value");return null!=b?b:a.text}},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||(kb.support.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&kb.nodeName(c.parentNode,"optgroup"))){if(b=kb(c).val(),f)return b;g.push(b)}return g},set:function(a,b){for(var c,d,e=a.options,f=kb.makeArray(b),g=e.length;g--;)d=e[g],(d.selected=kb.inArray(kb(d).val(),f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}},attr:function(a,c,d){var e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return typeof a.getAttribute===W?kb.prop(a,c,d):(1===g&&kb.isXMLDoc(a)||(c=c.toLowerCase(),e=kb.attrHooks[c]||(kb.expr.match.bool.test(c)?Db:Cb)),d===b?e&&"get"in e&&null!==(f=e.get(a,c))?f:(f=kb.find.attr(a,c),null==f?b:f):null!==d?e&&"set"in e&&(f=e.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d):(kb.removeAttr(a,c),void 0))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(mb);if(f&&1===a.nodeType)for(;c=f[e++];)d=kb.propFix[c]||c,kb.expr.match.bool.test(c)?Kb&&Jb||!Ib.test(c)?a[d]=!1:a[kb.camelCase("default-"+c)]=a[d]=!1:kb.attr(a,c,""),a.removeAttribute(Jb?c:d)},attrHooks:{type:{set:function(a,b){if(!kb.support.radioValue&&"radio"===b&&kb.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!kb.isXMLDoc(a),g&&(c=kb.propFix[c]||c,f=kb.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var b=kb.find.attr(a,"tabindex");return b?parseInt(b,10):Gb.test(a.nodeName)||Hb.test(a.nodeName)&&a.href?0:-1}}}}),Db={set:function(a,b,c){return b===!1?kb.removeAttr(a,c):Kb&&Jb||!Ib.test(c)?a.setAttribute(!Jb&&kb.propFix[c]||c,c):a[kb.camelCase("default-"+c)]=a[c]=!0,c}},kb.each(kb.expr.match.bool.source.match(/\w+/g),function(a,c){var d=kb.expr.attrHandle[c]||kb.find.attr;kb.expr.attrHandle[c]=Kb&&Jb||!Ib.test(c)?function(a,c,e){var f=kb.expr.attrHandle[c],g=e?b:(kb.expr.attrHandle[c]=b)!=d(a,c,e)?c.toLowerCase():null;return kb.expr.attrHandle[c]=f,g}:function(a,c,d){return d?b:a[kb.camelCase("default-"+c)]?c.toLowerCase():null}}),Kb&&Jb||(kb.attrHooks.value={set:function(a,b,c){return kb.nodeName(a,"input")?(a.defaultValue=b,void 0):Cb&&Cb.set(a,b,c)}}),Jb||(Cb={set:function(a,c,d){var e=a.getAttributeNode(d);return e||a.setAttributeNode(e=a.ownerDocument.createAttribute(d)),e.value=c+="","value"===d||c===a.getAttribute(d)?c:b}},kb.expr.attrHandle.id=kb.expr.attrHandle.name=kb.expr.attrHandle.coords=function(a,c,d){var e;return d?b:(e=a.getAttributeNode(c))&&""!==e.value?e.value:null},kb.valHooks.button={get:function(a,c){var d=a.getAttributeNode(c);return d&&d.specified?d.value:b},set:Cb.set},kb.attrHooks.contenteditable={set:function(a,b,c){Cb.set(a,""===b?!1:b,c)}},kb.each(["width","height"],function(a,b){kb.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),kb.support.hrefNormalized||kb.each(["href","src"],function(a,b){kb.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),kb.support.style||(kb.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}}),kb.support.optSelected||(kb.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),kb.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){kb.propFix[this.toLowerCase()]=this}),kb.support.enctype||(kb.propFix.enctype="encoding"),kb.each(["radio","checkbox"],function(){kb.valHooks[this]={set:function(a,b){return kb.isArray(b)?a.checked=kb.inArray(kb(a).val(),b)>=0:void 0}},kb.support.checkOn||(kb.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var Lb=/^(?:input|select|textarea)$/i,Mb=/^key/,Nb=/^(?:mouse|contextmenu)|click/,Ob=/^(?:focusinfocus|focusoutblur)$/,Pb=/^([^.]*)(?:\.(.+)|)$/;kb.event={global:{},add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r=kb._data(a);if(r){for(d.handler&&(j=d,d=j.handler,f=j.selector),d.guid||(d.guid=kb.guid++),(h=r.events)||(h=r.events={}),(l=r.handle)||(l=r.handle=function(a){return typeof kb===W||a&&kb.event.triggered===a.type?b:kb.event.dispatch.apply(l.elem,arguments)},l.elem=a),c=(c||"").match(mb)||[""],i=c.length;i--;)g=Pb.exec(c[i])||[],o=q=g[1],p=(g[2]||"").split(".").sort(),o&&(k=kb.event.special[o]||{},o=(f?k.delegateType:k.bindType)||o,k=kb.event.special[o]||{},m=kb.extend({type:o,origType:q,data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&kb.expr.match.needsContext.test(f),namespace:p.join(".")},j),(n=h[o])||(n=h[o]=[],n.delegateCount=0,k.setup&&k.setup.call(a,e,p,l)!==!1||(a.addEventListener?a.addEventListener(o,l,!1):a.attachEvent&&a.attachEvent("on"+o,l))),k.add&&(k.add.call(a,m),m.handler.guid||(m.handler.guid=d.guid)),f?n.splice(n.delegateCount++,0,m):n.push(m),kb.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=kb.hasData(a)&&kb._data(a);if(q&&(k=q.events)){for(b=(b||"").match(mb)||[""],j=b.length;j--;)if(h=Pb.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=kb.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||kb.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)kb.event.remove(a,n+b[j],c,d,!0);kb.isEmptyObject(k)&&(delete q.handle,kb._removeData(a,"events"))}},trigger:function(c,d,e,f){var g,h,i,j,k,l,m,n=[e||Y],o=ib.call(c,"type")?c.type:c,p=ib.call(c,"namespace")?c.namespace.split("."):[];if(i=l=e=e||Y,3!==e.nodeType&&8!==e.nodeType&&!Ob.test(o+kb.event.triggered)&&(o.indexOf(".")>=0&&(p=o.split("."),o=p.shift(),p.sort()),h=o.indexOf(":")<0&&"on"+o,c=c[kb.expando]?c:new kb.Event(o,"object"==typeof c&&c),c.isTrigger=f?2:3,c.namespace=p.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=b,c.target||(c.target=e),d=null==d?[c]:kb.makeArray(d,[c]),k=kb.event.special[o]||{},f||!k.trigger||k.trigger.apply(e,d)!==!1)){if(!f&&!k.noBubble&&!kb.isWindow(e)){for(j=k.delegateType||o,Ob.test(j+o)||(i=i.parentNode);i;i=i.parentNode)n.push(i),l=i;l===(e.ownerDocument||Y)&&n.push(l.defaultView||l.parentWindow||a)}for(m=0;(i=n[m++])&&!c.isPropagationStopped();)c.type=m>1?j:k.bindType||o,g=(kb._data(i,"events")||{})[c.type]&&kb._data(i,"handle"),g&&g.apply(i,d),g=h&&i[h],g&&kb.acceptData(i)&&g.apply&&g.apply(i,d)===!1&&c.preventDefault();if(c.type=o,!f&&!c.isDefaultPrevented()&&(!k._default||k._default.apply(n.pop(),d)===!1)&&kb.acceptData(e)&&h&&e[o]&&!kb.isWindow(e)){l=e[h],l&&(e[h]=null),kb.event.triggered=o;try{e[o]()}catch(q){}kb.event.triggered=b,l&&(e[h]=l)}return c.result}},dispatch:function(a){a=kb.event.fix(a);var c,d,e,f,g,h=[],i=fb.call(arguments),j=(kb._data(this,"events")||{})[a.type]||[],k=kb.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){for(h=kb.event.handlers.call(this,a,j),c=0;(f=h[c++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,g=0;(e=f.handlers[g++])&&!a.isImmediatePropagationStopped();)(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,d=((kb.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),d!==b&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()));return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,c){var d,e,f,g,h=[],i=c.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||"click"!==a.type))for(;j!=this;j=j.parentNode||this)if(1===j.nodeType&&(j.disabled!==!0||"click"!==a.type)){for(f=[],g=0;i>g;g++)e=c[g],d=e.selector+" ",f[d]===b&&(f[d]=e.needsContext?kb(d,this).index(j)>=0:kb.find(d,this,null,[j]).length),f[d]&&f.push(e);f.length&&h.push({elem:j,handlers:f})}return i<c.length&&h.push({elem:this,handlers:c.slice(i)}),h},fix:function(a){if(a[kb.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];for(g||(this.fixHooks[e]=g=Nb.test(e)?this.mouseHooks:Mb.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new kb.Event(f),b=d.length;b--;)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||Y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},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 fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,e,f,g=c.button,h=c.fromElement;return null==a.pageX&&null!=c.clientX&&(e=a.target.ownerDocument||Y,f=e.documentElement,d=e.body,a.pageX=c.clientX+(f&&f.scrollLeft||d&&d.scrollLeft||0)-(f&&f.clientLeft||d&&d.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||d&&d.scrollTop||0)-(f&&f.clientTop||d&&d.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?c.toElement:h),a.which||g===b||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==k()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===k()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return kb.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return kb.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){a.result!==b&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=kb.extend(new kb.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?kb.event.trigger(e,null,b):kb.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},kb.removeEvent=Y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===W&&(a[d]=null),a.detachEvent(d,c))},kb.Event=function(a,b){return this instanceof kb.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?i:j):this.type=a,b&&kb.extend(this,b),this.timeStamp=a&&a.timeStamp||kb.now(),this[kb.expando]=!0,void 0):new kb.Event(a,b)},kb.Event.prototype={isDefaultPrevented:j,isPropagationStopped:j,isImmediatePropagationStopped:j,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=i,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=i,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i,this.stopPropagation()}},kb.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){kb.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!kb.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),kb.support.submitBubbles||(kb.event.special.submit={setup:function(){return kb.nodeName(this,"form")?!1:(kb.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=kb.nodeName(c,"input")||kb.nodeName(c,"button")?c.form:b;d&&!kb._data(d,"submitBubbles")&&(kb.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),kb._data(d,"submitBubbles",!0))}),void 0)},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&kb.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return kb.nodeName(this,"form")?!1:(kb.event.remove(this,"._submit"),void 0)}}),kb.support.changeBubbles||(kb.event.special.change={setup:function(){return Lb.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(kb.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),kb.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),kb.event.simulate("change",this,a,!0)})),!1):(kb.event.add(this,"beforeactivate._change",function(a){var b=a.target;Lb.test(b.nodeName)&&!kb._data(b,"changeBubbles")&&(kb.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||kb.event.simulate("change",this.parentNode,a,!0)}),kb._data(b,"changeBubbles",!0))}),void 0)},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return kb.event.remove(this,"._change"),!Lb.test(this.nodeName)}}),kb.support.focusinBubbles||kb.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){kb.event.simulate(b,a.target,kb.event.fix(a),!0)};kb.event.special[b]={setup:function(){0===c++&&Y.addEventListener(a,d,!0)},teardown:function(){0===--c&&Y.removeEventListener(a,d,!0)}}}),kb.fn.extend({on:function(a,c,d,e,f){var g,h;if("object"==typeof a){"string"!=typeof c&&(d=d||c,c=b);for(g in a)this.on(g,c,d,a[g],f);return this}if(null==d&&null==e?(e=c,d=c=b):null==e&&("string"==typeof c?(e=d,d=b):(e=d,d=c,c=b)),e===!1)e=j;else if(!e)return this;return 1===f&&(h=e,e=function(a){return kb().off(a),h.apply(this,arguments)},e.guid=h.guid||(h.guid=kb.guid++)),this.each(function(){kb.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,kb(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if("object"==typeof a){for(f in a)this.off(f,c,a[f]);return this}return(c===!1||"function"==typeof c)&&(d=c,c=b),d===!1&&(d=j),this.each(function(){kb.event.remove(this,a,d,c)})},trigger:function(a,b){return this.each(function(){kb.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?kb.event.trigger(a,b,c,!0):void 0}});var Qb=/^.[^:#\[\.,]*$/,Rb=/^(?:parents|prev(?:Until|All))/,Sb=kb.expr.match.needsContext,Tb={children:!0,contents:!0,next:!0,prev:!0};kb.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(kb(a).filter(function(){for(b=0;e>b;b++)if(kb.contains(d[b],this))return!0}));for(b=0;e>b;b++)kb.find(a,d[b],c);return c=this.pushStack(e>1?kb.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},has:function(a){var b,c=kb(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(kb.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(m(this,a||[],!0))},filter:function(a){return this.pushStack(m(this,a||[],!1))},is:function(a){return!!m(this,"string"==typeof a&&Sb.test(a)?kb(a):a||[],!1).length},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Sb.test(a)||"string"!=typeof a?kb(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&&kb.find.matchesSelector(c,a))){c=f.push(c);break}return this.pushStack(f.length>1?kb.unique(f):f)},index:function(a){return a?"string"==typeof a?kb.inArray(this[0],kb(a)):kb.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?kb(a,b):kb.makeArray(a&&a.nodeType?[a]:a),d=kb.merge(this.get(),c);return this.pushStack(kb.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),kb.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return kb.dir(a,"parentNode")},parentsUntil:function(a,b,c){return kb.dir(a,"parentNode",c)},next:function(a){return l(a,"nextSibling")},prev:function(a){return l(a,"previousSibling")},nextAll:function(a){return kb.dir(a,"nextSibling")},prevAll:function(a){return kb.dir(a,"previousSibling")},nextUntil:function(a,b,c){return kb.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return kb.dir(a,"previousSibling",c)},siblings:function(a){return kb.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return kb.sibling(a.firstChild)},contents:function(a){return kb.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:kb.merge([],a.childNodes)}},function(a,b){kb.fn[a]=function(c,d){var e=kb.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=kb.filter(d,e)),this.length>1&&(Tb[a]||(e=kb.unique(e)),Rb.test(a)&&(e=e.reverse())),this.pushStack(e)}}),kb.extend({filter:function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?kb.find.matchesSelector(d,a)?[d]:[]:kb.find.matches(a,kb.grep(b,function(a){return 1===a.nodeType}))},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!kb(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Ub="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Vb=/ jQuery\d+="(?:null|\d+)"/g,Wb=new RegExp("<(?:"+Ub+")[\\s/>]","i"),Xb=/^\s+/,Yb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Zb=/<([\w:]+)/,$b=/<tbody/i,_b=/<|&#?\w+;/,ac=/<(?:script|style|link)/i,bc=/^(?:checkbox|radio)$/i,cc=/checked\s*(?:[^=]|=\s*.checked.)/i,dc=/^$|\/(?:java|ecma)script/i,ec=/^true\/(.*)/,fc=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,gc={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:kb.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},hc=n(Y),ic=hc.appendChild(Y.createElement("div"));gc.optgroup=gc.option,gc.tbody=gc.tfoot=gc.colgroup=gc.caption=gc.thead,gc.th=gc.td,kb.fn.extend({text:function(a){return kb.access(this,function(a){return a===b?kb.text(this):this.empty().append((this[0]&&this[0].ownerDocument||Y).createTextNode(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=o(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=o(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?kb.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||kb.cleanData(u(c)),c.parentNode&&(b&&kb.contains(c.ownerDocument,c)&&r(u(c,"script")),c.parentNode.removeChild(c));
-return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&kb.cleanData(u(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&kb.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return kb.clone(this,a,b)})},html:function(a){return kb.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Vb,""):b;if(!("string"!=typeof a||ac.test(a)||!kb.support.htmlSerialize&&Wb.test(a)||!kb.support.leadingWhitespace&&Xb.test(a)||gc[(Zb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(Yb,"<$1></$2>");try{for(;e>d;d++)c=this[d]||{},1===c.nodeType&&(kb.cleanData(u(c,!1)),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=kb.map(this,function(a){return[a.nextSibling,a.parentNode]}),b=0;return this.domManip(arguments,function(c){var d=a[b++],e=a[b++];e&&(d&&d.parentNode!==e&&(d=this.nextSibling),kb(this).remove(),e.insertBefore(c,d))},!0),b?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b,c){a=db.apply([],a);var d,e,f,g,h,i,j=0,k=this.length,l=this,m=k-1,n=a[0],o=kb.isFunction(n);if(o||!(1>=k||"string"!=typeof n||kb.support.checkClone)&&cc.test(n))return this.each(function(d){var e=l.eq(d);o&&(a[0]=n.call(this,d,e.html())),e.domManip(a,b,c)});if(k&&(i=kb.buildFragment(a,this[0].ownerDocument,!1,!c&&this),d=i.firstChild,1===i.childNodes.length&&(i=d),d)){for(g=kb.map(u(i,"script"),p),f=g.length;k>j;j++)e=i,j!==m&&(e=kb.clone(e,!0,!0),f&&kb.merge(g,u(e,"script"))),b.call(this[j],e,j);if(f)for(h=g[g.length-1].ownerDocument,kb.map(g,q),j=0;f>j;j++)e=g[j],dc.test(e.type||"")&&!kb._data(e,"globalEval")&&kb.contains(h,e)&&(e.src?kb._evalUrl(e.src):kb.globalEval((e.text||e.textContent||e.innerHTML||"").replace(fc,"")));i=d=null}return this}}),kb.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){kb.fn[a]=function(a){for(var c,d=0,e=[],f=kb(a),g=f.length-1;g>=d;d++)c=d===g?this:this.clone(!0),kb(f[d])[b](c),eb.apply(e,c.get());return this.pushStack(e)}}),kb.extend({clone:function(a,b,c){var d,e,f,g,h,i=kb.contains(a.ownerDocument,a);if(kb.support.html5Clone||kb.isXMLDoc(a)||!Wb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ic.innerHTML=a.outerHTML,ic.removeChild(f=ic.firstChild)),!(kb.support.noCloneEvent&&kb.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||kb.isXMLDoc(a)))for(d=u(f),h=u(a),g=0;null!=(e=h[g]);++g)d[g]&&t(e,d[g]);if(b)if(c)for(h=h||u(a),d=d||u(f),g=0;null!=(e=h[g]);g++)s(e,d[g]);else s(a,f);return d=u(f,"script"),d.length>0&&r(d,!i&&u(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,m=n(b),o=[],p=0;l>p;p++)if(f=a[p],f||0===f)if("object"===kb.type(f))kb.merge(o,f.nodeType?[f]:f);else if(_b.test(f)){for(h=h||m.appendChild(b.createElement("div")),i=(Zb.exec(f)||["",""])[1].toLowerCase(),k=gc[i]||gc._default,h.innerHTML=k[1]+f.replace(Yb,"<$1></$2>")+k[2],e=k[0];e--;)h=h.lastChild;if(!kb.support.leadingWhitespace&&Xb.test(f)&&o.push(b.createTextNode(Xb.exec(f)[0])),!kb.support.tbody)for(f="table"!==i||$b.test(f)?"<table>"!==k[1]||$b.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)kb.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(kb.merge(o,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=m.lastChild}else o.push(b.createTextNode(f));for(h&&m.removeChild(h),kb.support.appendChecked||kb.grep(u(o,"input"),v),p=0;f=o[p++];)if((!d||-1===kb.inArray(f,d))&&(g=kb.contains(f.ownerDocument,f),h=u(m.appendChild(f),"script"),g&&r(h),c))for(e=0;f=h[e++];)dc.test(f.type||"")&&c.push(f);return h=null,m},cleanData:function(a,b){for(var c,d,e,f,g=0,h=kb.expando,i=kb.cache,j=kb.support.deleteExpando,k=kb.event.special;null!=(c=a[g]);g++)if((b||kb.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?kb.event.remove(c,d):kb.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==W?c.removeAttribute(h):c[h]=null,bb.push(e))}},_evalUrl:function(a){return kb.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),kb.fn.extend({wrapAll:function(a){if(kb.isFunction(a))return this.each(function(b){kb(this).wrapAll(a.call(this,b))});if(this[0]){var b=kb(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return kb.isFunction(a)?this.each(function(b){kb(this).wrapInner(a.call(this,b))}):this.each(function(){var b=kb(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=kb.isFunction(a);return this.each(function(c){kb(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){kb.nodeName(this,"body")||kb(this).replaceWith(this.childNodes)}).end()}});var jc,kc,lc,mc=/alpha\([^)]*\)/i,nc=/opacity\s*=\s*([^)]*)/,oc=/^(top|right|bottom|left)$/,pc=/^(none|table(?!-c[ea]).+)/,qc=/^margin/,rc=new RegExp("^("+lb+")(.*)$","i"),sc=new RegExp("^("+lb+")(?!px)[a-z%]+$","i"),tc=new RegExp("^([+-])=("+lb+")","i"),uc={BODY:"block"},vc={position:"absolute",visibility:"hidden",display:"block"},wc={letterSpacing:0,fontWeight:400},xc=["Top","Right","Bottom","Left"],yc=["Webkit","O","Moz","ms"];kb.fn.extend({css:function(a,c){return kb.access(this,function(a,c,d){var e,f,g={},h=0;if(kb.isArray(c)){for(f=kc(a),e=c.length;e>h;h++)g[c[h]]=kb.css(a,c[h],!1,f);return g}return d!==b?kb.style(a,c,d):kb.css(a,c)},a,c,arguments.length>1)},show:function(){return y(this,!0)},hide:function(){return y(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){x(this)?kb(this).show():kb(this).hide()})}}),kb.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=lc(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":kb.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=kb.camelCase(c),j=a.style;if(c=kb.cssProps[i]||(kb.cssProps[i]=w(j,i)),h=kb.cssHooks[c]||kb.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=tc.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(kb.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||kb.cssNumber[i]||(d+="px"),kb.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=kb.camelCase(c);return c=kb.cssProps[i]||(kb.cssProps[i]=w(a.style,i)),h=kb.cssHooks[c]||kb.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=lc(a,c,e)),"normal"===g&&c in wc&&(g=wc[c]),""===d||d?(f=parseFloat(g),d===!0||kb.isNumeric(f)?f||0:g):g}}),a.getComputedStyle?(kc=function(b){return a.getComputedStyle(b,null)},lc=function(a,c,d){var e,f,g,h=d||kc(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||kb.contains(a.ownerDocument,a)||(i=kb.style(a,c)),sc.test(i)&&qc.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):Y.documentElement.currentStyle&&(kc=function(a){return a.currentStyle},lc=function(a,c,d){var e,f,g,h=d||kc(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),sc.test(i)&&!oc.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),kb.each(["height","width"],function(a,b){kb.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&pc.test(kb.css(a,"display"))?kb.swap(a,vc,function(){return B(a,b,d)}):B(a,b,d):void 0},set:function(a,c,d){var e=d&&kc(a);return z(a,c,d?A(a,b,d,kb.support.boxSizing&&"border-box"===kb.css(a,"boxSizing",!1,e),e):0)}}}),kb.support.opacity||(kb.cssHooks.opacity={get:function(a,b){return nc.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=kb.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===kb.trim(f.replace(mc,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=mc.test(f)?f.replace(mc,e):f+" "+e)}}),kb(function(){kb.support.reliableMarginRight||(kb.cssHooks.marginRight={get:function(a,b){return b?kb.swap(a,{display:"inline-block"},lc,[a,"marginRight"]):void 0}}),!kb.support.pixelPosition&&kb.fn.position&&kb.each(["top","left"],function(a,b){kb.cssHooks[b]={get:function(a,c){return c?(c=lc(a,b),sc.test(c)?kb(a).position()[b]+"px":c):void 0}}})}),kb.expr&&kb.expr.filters&&(kb.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!kb.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||kb.css(a,"display"))},kb.expr.filters.visible=function(a){return!kb.expr.filters.hidden(a)}),kb.each({margin:"",padding:"",border:"Width"},function(a,b){kb.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+xc[d]+b]=f[d]||f[d-2]||f[0];return e}},qc.test(a)||(kb.cssHooks[a+b].set=z)});var zc=/%20/g,Ac=/\[\]$/,Bc=/\r?\n/g,Cc=/^(?:submit|button|image|reset|file)$/i,Dc=/^(?:input|select|textarea|keygen)/i;kb.fn.extend({serialize:function(){return kb.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=kb.prop(this,"elements");return a?kb.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!kb(this).is(":disabled")&&Dc.test(this.nodeName)&&!Cc.test(a)&&(this.checked||!bc.test(a))}).map(function(a,b){var c=kb(this).val();return null==c?null:kb.isArray(c)?kb.map(c,function(a){return{name:b.name,value:a.replace(Bc,"\r\n")}}):{name:b.name,value:c.replace(Bc,"\r\n")}}).get()}}),kb.param=function(a,c){var d,e=[],f=function(a,b){b=kb.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=kb.ajaxSettings&&kb.ajaxSettings.traditional),kb.isArray(a)||a.jquery&&!kb.isPlainObject(a))kb.each(a,function(){f(this.name,this.value)});else for(d in a)E(d,a[d],c,f);return e.join("&").replace(zc,"+")},kb.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){kb.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),kb.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 Ec,Fc,Gc=kb.now(),Hc=/\?/,Ic=/#.*$/,Jc=/([?&])_=[^&]*/,Kc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mc=/^(?:GET|HEAD)$/,Nc=/^\/\//,Oc=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Pc=kb.fn.load,Qc={},Rc={},Sc="*/".concat("*");try{Fc=X.href}catch(Tc){Fc=Y.createElement("a"),Fc.href="",Fc=Fc.href}Ec=Oc.exec(Fc.toLowerCase())||[],kb.fn.load=function(a,c,d){if("string"!=typeof a&&Pc)return Pc.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),kb.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&kb.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?kb("<div>").append(kb.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},kb.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){kb.fn[b]=function(a){return this.on(b,a)}}),kb.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fc,type:"GET",isLocal:Lc.test(Ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sc,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":kb.parseJSON,"text xml":kb.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?H(H(a,kb.ajaxSettings),b):H(kb.ajaxSettings,a)},ajaxPrefilter:F(Qc),ajaxTransport:F(Rc),ajax:function(a,c){function d(a,c,d,e){var f,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),k=b,h=e||"",w.readyState=a>0?4:0,f=a>=200&&300>a||304===a,d&&(t=I(m,w,d)),t=J(m,t,w,f),f?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(kb.lastModified[g]=v),v=w.getResponseHeader("etag"),v&&(kb.etag[g]=v)),204===a||"HEAD"===m.type?x="nocontent":304===a?x="notmodified":(x=t.state,l=t.data,s=t.error,f=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),w.status=a,w.statusText=(c||x)+"",f?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,j&&o.trigger(f?"ajaxSuccess":"ajaxError",[w,m,f?l:s]),q.fireWith(n,[w,x]),j&&(o.trigger("ajaxComplete",[w,m]),--kb.active||kb.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=kb.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?kb(n):kb.event,p=kb.Deferred(),q=kb.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!l)for(l={};b=Kc.exec(h);)l[b[1].toLowerCase()]=b[2];b=l[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?h:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return k&&k.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((a||m.url||Fc)+"").replace(Ic,"").replace(Nc,Ec[1]+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=kb.trim(m.dataType||"*").toLowerCase().match(mb)||[""],null==m.crossDomain&&(e=Oc.exec(m.url.toLowerCase()),m.crossDomain=!(!e||e[1]===Ec[1]&&e[2]===Ec[2]&&(e[3]||("http:"===e[1]?"80":"443"))===(Ec[3]||("http:"===Ec[1]?"80":"443")))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=kb.param(m.data,m.traditional)),G(Qc,m,c,w),2===u)return w;j=m.global,j&&0===kb.active++&&kb.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Mc.test(m.type),g=m.url,m.hasContent||(m.data&&(g=m.url+=(Hc.test(g)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=Jc.test(g)?g.replace(Jc,"$1_="+Gc++):g+(Hc.test(g)?"&":"?")+"_="+Gc++)),m.ifModified&&(kb.lastModified[g]&&w.setRequestHeader("If-Modified-Since",kb.lastModified[g]),kb.etag[g]&&w.setRequestHeader("If-None-Match",kb.etag[g])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Sc+"; q=0.01":""):m.accepts["*"]);for(f in m.headers)w.setRequestHeader(f,m.headers[f]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(f in{success:1,error:1,complete:1})w[f](m[f]);if(k=G(Rc,m,c,w)){w.readyState=1,j&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,k.send(s,d)}catch(x){if(!(2>u))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getJSON:function(a,b,c){return kb.get(a,b,c,"json")},getScript:function(a,c){return kb.get(a,b,c,"script")}}),kb.each(["get","post"],function(a,c){kb[c]=function(a,d,e,f){return kb.isFunction(d)&&(f=f||e,e=d,d=b),kb.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),kb.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return kb.globalEval(a),a}}}),kb.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),kb.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=Y.head||kb("head")[0]||Y.documentElement;return{send:function(b,e){c=Y.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Uc=[],Vc=/(=)\?(?=&|$)|\?\?/;kb.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Uc.pop()||kb.expando+"_"+Gc++;return this[a]=!0,a}}),kb.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Vc.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vc.test(c.data)&&"data");return i||"jsonp"===c.dataTypes[0]?(f=c.jsonpCallback=kb.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Vc,"$1"+f):c.jsonp!==!1&&(c.url+=(Hc.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||kb.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Uc.push(f)),h&&kb.isFunction(g)&&g(h[0]),h=g=b}),"script"):void 0});var Wc,Xc,Yc=0,Zc=a.ActiveXObject&&function(){var a;for(a in Wc)Wc[a](b,!0)};kb.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&K()||L()}:K,Xc=kb.ajaxSettings.xhr(),kb.support.cors=!!Xc&&"withCredentials"in Xc,Xc=kb.support.ajax=!!Xc,Xc&&kb.ajaxTransport(function(c){if(!c.crossDomain||kb.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=kb.noop,Zc&&delete Wc[g]),e)4!==i.readyState&&i.abort();else{l={},h=i.status,j=i.getAllResponseHeaders(),"string"==typeof i.responseText&&(l.text=i.responseText);try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Yc,Zc&&(Wc||(Wc={},kb(a).unload(Zc)),Wc[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var $c,_c,ad=/^(?:toggle|show|hide)$/,bd=new RegExp("^(?:([+-])=|)("+lb+")([a-z%]*)$","i"),cd=/queueHooks$/,dd=[Q],ed={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bd.exec(b),f=e&&e[3]||(kb.cssNumber[a]?"":"px"),g=(kb.cssNumber[a]||"px"!==f&&+d)&&bd.exec(kb.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,kb.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}]};kb.Animation=kb.extend(O,{tweener:function(a,b){kb.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ed[c]=ed[c]||[],ed[c].unshift(b)},prefilter:function(a,b){b?dd.unshift(a):dd.push(a)}}),kb.Tween=R,R.prototype={constructor:R,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||(kb.cssNumber[c]?"":"px")},cur:function(){var a=R.propHooks[this.prop];return a&&a.get?a.get(this):R.propHooks._default.get(this)},run:function(a){var b,c=R.propHooks[this.prop];return this.pos=b=this.options.duration?kb.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):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):R.propHooks._default.set(this),this}},R.prototype.init.prototype=R.prototype,R.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=kb.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){kb.fx.step[a.prop]?kb.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[kb.cssProps[a.prop]]||kb.cssHooks[a.prop])?kb.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},R.propHooks.scrollTop=R.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},kb.each(["toggle","show","hide"],function(a,b){var c=kb.fn[b];kb.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(S(b,!0),a,d,e)}}),kb.fn.extend({fadeTo:function(a,b,c,d){return this.filter(x).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=kb.isEmptyObject(a),f=kb.speed(b,c,d),g=function(){var b=O(this,kb.extend({},a),f);(e||kb._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return"string"!=typeof a&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=null!=a&&a+"queueHooks",f=kb.timers,g=kb._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cd.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem!==this||null!=a&&f[c].queue!==a||(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&kb.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=kb._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=kb.timers,g=d?d.length:0;for(c.finish=!0,kb.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})}}),kb.each({slideDown:S("show"),slideUp:S("hide"),slideToggle:S("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){kb.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),kb.speed=function(a,b,c){var d=a&&"object"==typeof a?kb.extend({},a):{complete:c||!c&&b||kb.isFunction(a)&&a,duration:a,easing:c&&b||b&&!kb.isFunction(b)&&b};return d.duration=kb.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in kb.fx.speeds?kb.fx.speeds[d.duration]:kb.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){kb.isFunction(d.old)&&d.old.call(this),d.queue&&kb.dequeue(this,d.queue)},d},kb.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},kb.timers=[],kb.fx=R.prototype.init,kb.fx.tick=function(){var a,c=kb.timers,d=0;for($c=kb.now();d<c.length;d++)a=c[d],a()||c[d]!==a||c.splice(d--,1);c.length||kb.fx.stop(),$c=b},kb.fx.timer=function(a){a()&&kb.timers.push(a)&&kb.fx.start()},kb.fx.interval=13,kb.fx.start=function(){_c||(_c=setInterval(kb.fx.tick,kb.fx.interval))},kb.fx.stop=function(){clearInterval(_c),_c=null},kb.fx.speeds={slow:600,fast:200,_default:400},kb.fx.step={},kb.expr&&kb.expr.filters&&(kb.expr.filters.animated=function(a){return kb.grep(kb.timers,function(b){return a===b.elem}).length}),kb.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){kb.offset.setOffset(this,a,b)});var c,d,e={top:0,left:0},f=this[0],g=f&&f.ownerDocument;if(g)return c=g.documentElement,kb.contains(c,f)?(typeof f.getBoundingClientRect!==W&&(e=f.getBoundingClientRect()),d=T(g),{top:e.top+(d.pageYOffset||c.scrollTop)-(c.clientTop||0),left:e.left+(d.pageXOffset||c.scrollLeft)-(c.clientLeft||0)}):e},kb.offset={setOffset:function(a,b,c){var d=kb.css(a,"position");"static"===d&&(a.style.position="relative");var e,f,g=kb(a),h=g.offset(),i=kb.css(a,"top"),j=kb.css(a,"left"),k=("absolute"===d||"fixed"===d)&&kb.inArray("auto",[i,j])>-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),kb.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},kb.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===kb.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),kb.nodeName(a[0],"html")||(c=a.offset()),c.top+=kb.css(a[0],"borderTopWidth",!0),c.left+=kb.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-kb.css(d,"marginTop",!0),left:b.left-c.left-kb.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||Z;a&&!kb.nodeName(a,"html")&&"static"===kb.css(a,"position");)a=a.offsetParent;return a||Z})}}),kb.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);kb.fn[a]=function(e){return kb.access(this,function(a,e,f){var g=T(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:(g?g.scrollTo(d?kb(g).scrollLeft():f,d?f:kb(g).scrollTop()):a[e]=f,void 0)},a,e,arguments.length,null)}}),kb.each({Height:"height",Width:"width"},function(a,c){kb.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){kb.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return kb.access(this,function(c,d,e){var f;return kb.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?kb.css(c,d,h):kb.style(c,d,e,h)},c,g?e:b,g,null)}})}),kb.fn.size=function(){return this.length},kb.fn.andSelf=kb.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=kb:(a.jQuery=a.$=kb,"function"==typeof define&&define.amd&&define("jquery",[],function(){return kb}))}(window),function(a){function b(a,b,c){for(var d=(c||0)-1,e=a.length;++d<e;)if(a[d]===b)return d;return-1}function c(a,b){var c=a.index,d=b.index;if(a=a.criteria,b=b.criteria,a!==b){if(a>b||"undefined"==typeof a)return 1;if(b>a||"undefined"==typeof b)return-1}return d>c?-1:1}function d(a){return"\\"+oc[a]}function e(){}function f(a){return a instanceof f?a:new g(a)}function g(a){this.__wrapped__=a}function h(a,b,c,d){function e(){var d=arguments,k=g?this:b;if(f||(a=b[h]),c.length&&(d=d.length?(d=Nc.call(d),j?d.concat(c):c.concat(d)):c),this instanceof e){k=i(a.prototype);var l=a.apply(k,d);return A(l)?l:k}return a.apply(k,d)}var f=z(a),g=!c,h=b;if(g){var j=d;c=b}else if(!f){if(!d)throw new TypeError;b=a}return e}function i(a){return A(a)?Fc(a):{}}function j(a){return Uc[a]}function k(){var a=(a=f.indexOf)===jb?b:a;return a}function l(a){return Vc[a]}function m(a){return Dc.call(a)==ec}function n(a){if(!a)return a;for(var b=1,c=arguments.length;c>b;b++){var d=arguments[b];if(d)for(var e in d)a[e]=d[e]}return a}function o(a){return A(a)?Rc(a)?Nc.call(a):n({},a):a}function p(a){if(!a)return a;for(var b=1,c=arguments.length;c>b;b++){var d=arguments[b];if(d)for(var e in d)null==a[e]&&(a[e]=d[e])}return a}function q(a){var b=[];return Wc(a,function(a,c){z(a)&&b.push(c)}),b.sort()}function r(a,b){return a?Ac.call(a,b):!1}function s(a){for(var b=-1,c=Tc(a),d=c.length,e={};++b<d;){var f=c[b];e[a[f]]=f}return e}function t(a){return a===!0||a===!1||Dc.call(a)==gc}function u(a){return a?"object"==typeof a&&Dc.call(a)==hc:!1}function v(a){return a?1===a.nodeType:!1}function w(a){if(!a)return!0;if(Rc(a)||F(a))return!a.length;for(var b in a)if(Ac.call(a,b))return!1;return!0}function x(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,g=typeof b;if(a===a&&(!a||"function"!=e&&"object"!=e)&&(!b||"function"!=g&&"object"!=g))return!1;if(null==a||null==b)return a===b;var h=Dc.call(a),i=Dc.call(b);if(h!=i)return!1;switch(h){case gc:case hc:return+a==+b;case jc:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case lc:case mc:return a==String(b)}var j=h==fc;if(!j){if(a instanceof f||b instanceof f)return x(a.__wrapped__||a,b.__wrapped__||b,c,d);if(h!=kc)return!1;var k=a.constructor,l=b.constructor;if(k!=l&&!(z(k)&&k instanceof k&&z(l)&&l instanceof l))return!1}c||(c=[]),d||(d=[]);for(var m=c.length;m--;)if(c[m]==a)return d[m]==b;var n=!0,o=0;if(c.push(a),d.push(b),j){if(o=b.length,n=o==a.length)for(;o--&&(n=x(a[o],b[o],c,d)););return n}return Wc(b,function(b,e,f){return Ac.call(f,e)?(o++,!(n=Ac.call(a,e)&&x(a[e],b,c,d))&&Zb):void 0}),n&&Wc(a,function(a,b,c){return Ac.call(c,b)?!(n=--o>-1)&&Zb:void 0}),n}function y(a){return Hc(a)&&!Ic(parseFloat(a))}function z(a){return"function"==typeof a}function A(a){return!(!a||!nc[typeof a])}function B(a){return D(a)&&a!=+a}function C(a){return null===a}function D(a){return"number"==typeof a||Dc.call(a)==jc}function E(a){return!(!a||!nc[typeof a])&&Dc.call(a)==lc}function F(a){return"string"==typeof a||Dc.call(a)==mc}function G(a){return"undefined"==typeof a}function H(a){var b=k(),c=yc.apply(sc,Nc.call(arguments,1)),d={};return Wc(a,function(a,e){b(c,e)<0&&(d[e]=a)}),d}function I(a){for(var b=-1,c=Tc(a),d=c.length,e=Array(d);++b<d;){var f=c[b];e[b]=[f,a[f]]}return e}function J(a){for(var b=-1,c=yc.apply(sc,Nc.call(arguments,1)),d=c.length,e={};++b<d;){var f=c[b];f in a&&(e[f]=a[f])}return e}function K(a){for(var b=-1,c=Tc(a),d=c.length,e=Array(d);++b<d;)e[b]=a[c[b]];return e}function L(a,b){var c=k(),d=a?a.length:0,e=!1;return d&&"number"==typeof d?e=c(a,b)>-1:Xc(a,function(a){return(e=a===b)&&Zb}),e}function M(a,b,c){var d={};return b=Ab(b,c),R(a,function(a,c,e){c=String(b(a,c,e)),Ac.call(d,c)?d[c]++:d[c]=1}),d}function N(a,b,c){var d=!0;b=Ab(b,c);var e=-1,f=a?a.length:0;if("number"==typeof f)for(;++e<f&&(d=!!b(a[e],e,a)););else Xc(a,function(a,c,e){return!(d=!!b(a,c,e))&&Zb});return d}function O(a,b,c){var d=[];b=Ab(b,c);var e=-1,f=a?a.length:0;if("number"==typeof f)for(;++e<f;){var g=a[e];b(g,e,a)&&d.push(g)}else Xc(a,function(a,c,e){b(a,c,e)&&d.push(a)});return d}function P(a,b,c){b=Ab(b,c);var d=-1,e=a?a.length:0;if("number"!=typeof e){var f;return Xc(a,function(a,c,d){return b(a,c,d)?(f=a,Zb):void 0}),f}for(;++d<e;){var g=a[d];if(b(g,d,a))return g}}function Q(a,b){return eb(a,b,!0)}function R(a,b,c){var d=-1,e=a?a.length:0;if(b=b&&"undefined"==typeof c?b:Ab(b,c),"number"==typeof e)for(;++d<e&&b(a[d],d,a)!==Zb;);else Xc(a,b)}function S(a,b,c){var d={};return b=Ab(b,c),R(a,function(a,c,e){c=String(b(a,c,e)),(Ac.call(d,c)?d[c]:d[c]=[]).push(a)}),d}function T(a,b){var c=Nc.call(arguments,2),d=-1,e="function"==typeof b,f=a?a.length:0,g=Array("number"==typeof f?f:0);return R(a,function(a){g[++d]=(e?b:a[b]).apply(a,c)}),g}function U(a,b,c){var d=-1,e=a?a.length:0;if(b=Ab(b,c),"number"==typeof e)for(var f=Array(e);++d<e;)f[d]=b(a[d],d,a);else f=[],Xc(a,function(a,c,e){f[++d]=b(a,c,e)});return f}function V(a,b,c){var d=-1/0,e=d,f=-1,g=a?a.length:0;if(b||"number"!=typeof g)b=Ab(b,c),R(a,function(a,c,f){var g=b(a,c,f);g>d&&(d=g,e=a)});else for(;++f<g;){var h=a[f];h>e&&(e=h)}return e}function W(a,b,c){var d=1/0,e=d,f=-1,g=a?a.length:0;if(b||"number"!=typeof g)b=Ab(b,c),R(a,function(a,c,f){var g=b(a,c,f);d>g&&(d=g,e=a)});else for(;++f<g;){var h=a[f];e>h&&(e=h)}return e}function X(a,b){var c=-1,d=a?a.length:0;if("number"==typeof d)for(var e=Array(d);++c<d;)e[c]=a[c][b];return e||U(a,b)}function Y(a,b,c,d){if(!a)return c;var e=arguments.length<3;b=Ab(b,d,4);var f=-1,g=a.length;if("number"==typeof g)for(e&&(c=a[++f]);++f<g;)c=b(c,a[f],f,a);else Xc(a,function(a,d,f){c=e?(e=!1,a):b(c,a,d,f)});return c}function Z(a,b,c,d){var e=a,f=a?a.length:0,g=arguments.length<3;
-if("number"!=typeof f){var h=Tc(a);f=h.length}return b=Ab(b,d,4),R(a,function(a,d,i){d=h?h[--f]:--f,c=g?(g=!1,e[d]):b(c,e[d],d,i)}),c}function $(a,b,c){return b=Ab(b,c),O(a,function(a,c,d){return!b(a,c,d)})}function _(a){var b=-1,c=a?a.length:0,d=Array("number"==typeof c?c:0);return R(a,function(a){var c=zc(Mc()*(++b+1));d[b]=d[c],d[c]=a}),d}function ab(a){var b=a?a.length:0;return"number"==typeof b?b:Tc(a).length}function bb(a,b,c){var d;b=Ab(b,c);var e=-1,f=a?a.length:0;if("number"==typeof f)for(;++e<f&&!(d=b(a[e],e,a)););else Xc(a,function(a,c,e){return(d=b(a,c,e))&&Zb});return!!d}function cb(a,b,d){var e=-1,f=a?a.length:0,g=Array("number"==typeof f?f:0);for(b=Ab(b,d),R(a,function(a,c,d){g[++e]={criteria:b(a,c,d),index:e,value:a}}),f=g.length,g.sort(c);f--;)g[f]=g[f].value;return g}function db(a){return Rc(a)?Nc.call(a):a&&"number"==typeof a.length?U(a):K(a)}function eb(a,b,c){return c&&w(b)?null:(c?P:O)(a,b)}function fb(a){for(var b=-1,c=a?a.length:0,d=[];++b<c;){var e=a[b];e&&d.push(e)}return d}function gb(a){for(var b=-1,c=k(),d=a.length,e=yc.apply(sc,Nc.call(arguments,1)),f=[];++b<d;){var g=a[b];c(e,g)<0&&f.push(g)}return f}function hb(a,b,c){if(a){var d=0,e=a.length;if("number"!=typeof b&&null!=b){var f=-1;for(b=Ab(b,c);++f<e&&b(a[f],f,a);)d++}else if(d=b,null==d||c)return a[0];return Nc.call(a,0,Lc(Kc(0,d),e))}}function ib(a,b){for(var c=-1,d=a?a.length:0,e=[];++c<d;){var f=a[c];Rc(f)?Bc.apply(e,b?f:ib(f)):e.push(f)}return e}function jb(a,c,d){if("number"==typeof d){var e=a?a.length:0;d=0>d?Kc(0,e+d):d||0}else if(d){var f=qb(a,c);return a[f]===c?f:-1}return a?b(a,c,d):-1}function kb(a,b,c){if(!a)return[];var d=0,e=a.length;if("number"!=typeof b&&null!=b){var f=e;for(b=Ab(b,c);f--&&b(a[f],f,a);)d++}else d=null==b||c?1:b||d;return Nc.call(a,0,Lc(Kc(0,e-d),e))}function lb(a){var b=arguments,c=b.length,d=-1,e=k(),f=a?a.length:0,g=[];a:for(;++d<f;){var h=a[d];if(e(g,h)<0){for(var i=c;--i;)if(e(b[i],h)<0)continue a;g.push(h)}}return g}function mb(a,b,c){if(a){var d=0,e=a.length;if("number"!=typeof b&&null!=b){var f=e;for(b=Ab(b,c);f--&&b(a[f],f,a);)d++}else if(d=b,null==d||c)return a[e-1];return Nc.call(a,Kc(0,e-d))}}function nb(a,b,c){var d=a?a.length:0;for("number"==typeof c&&(d=(0>c?Kc(0,d+c):Lc(c,d-1))+1);d--;)if(a[d]===b)return d;return-1}function ob(a,b,c){a=+a||0,c=+c||1,null==b&&(b=a,a=0);for(var d=-1,e=Kc(0,wc((b-a)/c)),f=Array(e);++d<e;)f[d]=a,a+=c;return f}function pb(a,b,c){if("number"!=typeof b&&null!=b){var d=0,e=-1,f=a?a.length:0;for(b=Ab(b,c);++e<f&&b(a[e],e,a);)d++}else d=null==b||c?1:Kc(0,b);return Nc.call(a,d)}function qb(a,b,c,d){var e=0,f=a?a.length:e;for(c=c?Ab(c,d,1):Kb,b=c(b);f>e;){var g=e+f>>>1;c(a[g])<b?e=g+1:f=g}return e}function rb(a){return Rc(a)||(arguments[0]=a?Nc.call(a):sc),sb(yc.apply(sc,arguments))}function sb(a,b,c,d){var e=-1,f=k(),g=a?a.length:0,h=[],i=h;for("boolean"!=typeof b&&null!=b&&(d=c,c=b,b=!1),null!=c&&(i=[],c=Ab(c,d));++e<g;){var j=a[e],l=c?c(j,e,a):j;(b?!e||i[i.length-1]!==l:f(i,l)<0)&&(c&&i.push(l),h.push(j))}return h}function tb(a){return gb(a,Nc.call(arguments,1))}function ub(a){for(var b=-1,c=a?V(X(arguments,"length")):0,d=Array(0>c?0:c);++b<c;)d[b]=X(arguments,b);return d}function vb(a,b){for(var c=-1,d=a?a.length:0,e={};++c<d;){var f=a[c];b?e[f]=b[c]:e[f[0]]=f[1]}return e}function wb(a,b){return 1>a?b():function(){return--a<1?b.apply(this,arguments):void 0}}function xb(a,b){return Qc.fastBind||Ec&&arguments.length>2?Ec.call.apply(Ec,arguments):h(a,b,Nc.call(arguments,2))}function yb(a){for(var b=arguments.length>1?yc.apply(sc,Nc.call(arguments,1)):q(a),c=-1,d=b.length;++c<d;){var e=b[c];a[e]=xb(a[e],a)}return a}function zb(){var a=arguments;return function(){for(var b=arguments,c=a.length;c--;)b=[a[c].apply(this,b)];return b[0]}}function Ab(a,b,c){if(null==a)return Kb;var d=typeof a;if("function"!=d){if("object"!=d)return function(b){return b[a]};var e=Tc(a);return function(b){for(var c=e.length,d=!1;c--&&(d=b[e[c]]===a[e[c]]););return d}}return"undefined"==typeof b?a:1===c?function(c){return a.call(b,c)}:2===c?function(c,d){return a.call(b,c,d)}:4===c?function(c,d,e,f){return a.call(b,c,d,e,f)}:function(c,d,e){return a.call(b,c,d,e)}}function Bb(a,b,c){function d(){h=null,c||(f=a.apply(g,e))}var e,f,g,h=null;return function(){var i=c&&!h;return e=arguments,g=this,xc(h),h=Cc(d,b),i&&(f=a.apply(g,e)),f}}function Cb(a){var b=Nc.call(arguments,1);return Cc(function(){a.apply(Xb,b)},1)}function Db(a,b){var c=Nc.call(arguments,2);return Cc(function(){a.apply(Xb,c)},b)}function Eb(a,b){var c={};return function(){var d=$b+(b?b.apply(this,arguments):arguments[0]);return Ac.call(c,d)?c[d]:c[d]=a.apply(this,arguments)}}function Fb(a){var b,c;return function(){return b?c:(b=!0,c=a.apply(this,arguments),a=null,c)}}function Gb(a){return h(a,Nc.call(arguments,1))}function Hb(a,b){function c(){g=new Date,h=null,e=a.apply(f,d)}var d,e,f,g=0,h=null;return function(){var i=new Date,j=b-(i-g);return d=arguments,f=this,0>=j?(xc(h),h=null,g=i,e=a.apply(f,d)):h||(h=Cc(c,j)),e}}function Ib(a,b){return function(){var c=[a];return Bc.apply(c,arguments),b.apply(this,c)}}function Jb(a){return null==a?"":String(a).replace(cc,j)}function Kb(a){return a}function Lb(a){R(q(a),function(b){var c=f[b]=a[b];f.prototype[b]=function(){var a=[this.__wrapped__];Bc.apply(a,arguments);var b=c.apply(f,a);return this.__chain__&&(b=new g(b),b.__chain__=!0),b}})}function Mb(){return a._=uc,this}function Nb(a,b){null==a&&null==b&&(b=1),a=+a||0,null==b?(b=a,a=0):b=+b||0;var c=Mc();return a%1||b%1?a+Lc(c*(b-a+parseFloat("1e-"+((c+"").length-1))),b):a+zc(c*(b-a+1))}function Ob(a,b){var c=a?a[b]:null;return z(c)?a[b]():c}function Pb(a,b,c){var e=f.templateSettings;a||(a=""),c=p({},c,e);var g=0,h="__p += '",i=c.variable,j=RegExp((c.escape||bc).source+"|"+(c.interpolate||bc).source+"|"+(c.evaluate||bc).source+"|$","g");a.replace(j,function(b,c,e,f,i){return h+=a.slice(g,i).replace(dc,d),c&&(h+="' +\n_.escape("+c+") +\n'"),f&&(h+="';\n"+f+";\n__p += '"),e&&(h+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),g=i+b.length,b}),h+="';\n",i||(i="obj",h="with ("+i+" || {}) {\n"+h+"\n}\n"),h="function("+i+") {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n"+h+"return __p\n}";try{var k=Function("_","return "+h)(f)}catch(l){throw l.source=h,l}return b?k(b):(k.source=h,k)}function Qb(a,b,c){for(var d=-1,e=Array(a>-1?a:0);++d<a;)e[d]=b.call(c,d);return e}function Rb(a){return null==a?"":String(a).replace(_b,l)}function Sb(a){var b=++Yb+"";return a?a+b:b}function Tb(a){return a=new g(a),a.__chain__=!0,a}function Ub(a,b){return b(a),a}function Vb(){return this.__chain__=!0,this}function Wb(){return this.__wrapped__}var Xb,Yb=0,Zb={},$b=+new Date+"",_b=/&(?:amp|lt|gt|quot|#39);/g,ac=/<%=([\s\S]+?)%>/g,bc=/($^)/,cc=/[&<>"']/g,dc=/['\n\r\t\u2028\u2029\\]/g,ec="[object Arguments]",fc="[object Array]",gc="[object Boolean]",hc="[object Date]",ic="[object Function]",jc="[object Number]",kc="[object Object]",lc="[object RegExp]",mc="[object String]",nc={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},oc={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},pc=nc[typeof exports]&&exports,qc=nc[typeof module]&&module&&module.exports==pc&&module,rc=nc[typeof global]&&global;!rc||rc.global!==rc&&rc.window!==rc||(a=rc);var sc=[],tc=Object.prototype,uc=(String.prototype,a._),vc=RegExp("^"+String(tc.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),wc=Math.ceil,xc=a.clearTimeout,yc=sc.concat,zc=Math.floor,Ac=tc.hasOwnProperty,Bc=sc.push,Cc=(tc.propertyIsEnumerable,a.setTimeout),Dc=tc.toString,Ec=vc.test(Ec=Dc.bind)&&Ec,Fc=vc.test(Fc=Object.create)&&Fc,Gc=vc.test(Gc=Array.isArray)&&Gc,Hc=a.isFinite,Ic=a.isNaN,Jc=vc.test(Jc=Object.keys)&&Jc,Kc=Math.max,Lc=Math.min,Mc=Math.random,Nc=sc.slice,Oc=vc.test(a.attachEvent),Pc=Ec&&!/\n|true/.test(Ec+Oc);g.prototype=f.prototype;var Qc={};if(function(){var a={0:1,length:1};Qc.fastBind=Ec&&!Pc,Qc.spliceObjects=(sc.splice.call(a,0,1),!a[0])}(1),f.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:ac,variable:""},!Fc)var i=function(a){if(A(a)){e.prototype=a;var b=new e;e.prototype=null}return b||{}};m(arguments)||(m=function(a){return a?Ac.call(a,"callee"):!1});var Rc=Gc||function(a){return a?"object"==typeof a&&Dc.call(a)==fc:!1},Sc=function(a){var b,c=a,d=[];if(!c)return d;if(!nc[typeof a])return d;for(b in c)Ac.call(c,b)&&d.push(b);return d},Tc=Jc?function(a){return A(a)?Jc(a):[]}:Sc,Uc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Vc=s(Uc),Wc=function(a,b){var c,d=a,e=d;if(!d)return e;if(!nc[typeof d])return e;for(c in d)if(b(d[c],c,a)===Zb)return e;return e},Xc=function(a,b){var c,d=a,e=d;if(!d)return e;if(!nc[typeof d])return e;for(c in d)if(Ac.call(d,c)&&b(d[c],c,a)===Zb)return e;return e};z(/x/)&&(z=function(a){return"function"==typeof a&&Dc.call(a)==ic}),f.after=wb,f.bind=xb,f.bindAll=yb,f.compact=fb,f.compose=zb,f.countBy=M,f.debounce=Bb,f.defaults=p,f.defer=Cb,f.delay=Db,f.difference=gb,f.filter=O,f.flatten=ib,f.forEach=R,f.functions=q,f.groupBy=S,f.initial=kb,f.intersection=lb,f.invert=s,f.invoke=T,f.keys=Tc,f.map=U,f.max=V,f.memoize=Eb,f.min=W,f.omit=H,f.once=Fb,f.pairs=I,f.partial=Gb,f.pick=J,f.pluck=X,f.range=ob,f.reject=$,f.rest=pb,f.shuffle=_,f.sortBy=cb,f.tap=Ub,f.throttle=Hb,f.times=Qb,f.toArray=db,f.union=rb,f.uniq=sb,f.values=K,f.where=eb,f.without=tb,f.wrap=Ib,f.zip=ub,f.collect=U,f.drop=pb,f.each=R,f.extend=n,f.methods=q,f.object=vb,f.select=O,f.tail=pb,f.unique=sb,f.chain=Tb,f.clone=o,f.contains=L,f.escape=Jb,f.every=N,f.find=P,f.has=r,f.identity=Kb,f.indexOf=jb,f.isArguments=m,f.isArray=Rc,f.isBoolean=t,f.isDate=u,f.isElement=v,f.isEmpty=w,f.isEqual=x,f.isFinite=y,f.isFunction=z,f.isNaN=B,f.isNull=C,f.isNumber=D,f.isObject=A,f.isRegExp=E,f.isString=F,f.isUndefined=G,f.lastIndexOf=nb,f.mixin=Lb,f.noConflict=Mb,f.random=Nb,f.reduce=Y,f.reduceRight=Z,f.result=Ob,f.size=ab,f.some=bb,f.sortedIndex=qb,f.template=Pb,f.unescape=Rb,f.uniqueId=Sb,f.all=N,f.any=bb,f.detect=P,f.findWhere=Q,f.foldl=Y,f.foldr=Z,f.include=L,f.inject=Y,f.first=hb,f.last=mb,f.take=hb,f.head=hb,f.VERSION="1.3.1",Lb(f),f.prototype.chain=Vb,f.prototype.value=Wb,R(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=sc[a];f.prototype[a]=function(){var a=this.__wrapped__;return b.apply(a,arguments),Qc.spliceObjects||0!==a.length||delete a[0],this}}),R(["concat","join","slice"],function(a){var b=sc[a];f.prototype[a]=function(){var a=this.__wrapped__,c=b.apply(a,arguments);return this.__chain__&&(c=new g(c),c.__chain__=!0),c}}),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(a._=f,define("lodash",[],function(){return f})):pc&&!pc.nodeType?qc?(qc.exports=f)._=f:pc._=f:a._=f}(this),function(){var a,b=this,c=b.Backbone,d=[],e=d.push,f=d.slice,g=d.splice;a="undefined"!=typeof exports?exports:b.Backbone={},a.VERSION="1.0.0";var h=b._;h||"undefined"==typeof require||(h=require("underscore")),a.$=b.jQuery||b.Zepto||b.ender||b.$,a.noConflict=function(){return b.Backbone=c,this},a.emulateHTTP=!1,a.emulateJSON=!1;var i=a.Events={on:function(a,b,c){if(!k(this,"on",a,[b,c])||!b)return this;this._events||(this._events={});var d=this._events[a]||(this._events[a]=[]);return d.push({callback:b,context:c,ctx:c||this}),this},once:function(a,b,c){if(!k(this,"once",a,[b,c])||!b)return this;var d=this,e=h.once(function(){d.off(a,e),b.apply(this,arguments)});return e._callback=b,this.on(a,e,c)},off:function(a,b,c){var d,e,f,g,i,j,l,m;if(!this._events||!k(this,"off",a,[b,c]))return this;if(!a&&!b&&!c)return this._events={},this;for(g=a?[a]:h.keys(this._events),i=0,j=g.length;j>i;i++)if(a=g[i],f=this._events[a]){if(this._events[a]=d=[],b||c)for(l=0,m=f.length;m>l;l++)e=f[l],(b&&b!==e.callback&&b!==e.callback._callback||c&&c!==e.context)&&d.push(e);d.length||delete this._events[a]}return this},trigger:function(a){if(!this._events)return this;var b=f.call(arguments,1);if(!k(this,"trigger",a,b))return this;var c=this._events[a],d=this._events.all;return c&&l(c,b),d&&l(d,arguments),this},stopListening:function(a,b,c){var d=this._listeners;if(!d)return this;var e=!b&&!c;"object"==typeof b&&(c=this),a&&((d={})[a._listenerId]=a);for(var f in d)d[f].off(b,c,this),e&&delete this._listeners[f];return this}},j=/\s+/,k=function(a,b,c,d){if(!c)return!0;if("object"==typeof c){for(var e in c)a[b].apply(a,[e,c[e]].concat(d));return!1}if(j.test(c)){for(var f=c.split(j),g=0,h=f.length;h>g;g++)a[b].apply(a,[f[g]].concat(d));return!1}return!0},l=function(a,b){var c,d=-1,e=a.length,f=b[0],g=b[1],h=b[2];switch(b.length){case 0:for(;++d<e;)(c=a[d]).callback.call(c.ctx);return;case 1:for(;++d<e;)(c=a[d]).callback.call(c.ctx,f);return;case 2:for(;++d<e;)(c=a[d]).callback.call(c.ctx,f,g);return;case 3:for(;++d<e;)(c=a[d]).callback.call(c.ctx,f,g,h);return;default:for(;++d<e;)(c=a[d]).callback.apply(c.ctx,b)}},m={listenTo:"on",listenToOnce:"once"};h.each(m,function(a,b){i[b]=function(b,c,d){var e=this._listeners||(this._listeners={}),f=b._listenerId||(b._listenerId=h.uniqueId("l"));return e[f]=b,"object"==typeof c&&(d=this),b[a](c,d,this),this}}),i.bind=i.on,i.unbind=i.off,h.extend(a,i);var n=a.Model=function(a,b){var c,d=a||{};b||(b={}),this.cid=h.uniqueId("c"),this.attributes={},h.extend(this,h.pick(b,o)),b.parse&&(d=this.parse(d,b)||{}),(c=h.result(this,"defaults"))&&(d=h.defaults({},d,c)),this.set(d,b),this.changed={},this.initialize.apply(this,arguments)},o=["url","urlRoot","collection"];h.extend(n.prototype,i,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(){return h.clone(this.attributes)},sync:function(){return a.sync.apply(this,arguments)},get:function(a){return this.attributes[a]},escape:function(a){return h.escape(this.get(a))},has:function(a){return null!=this.get(a)},set:function(a,b,c){var d,e,f,g,i,j,k,l;if(null==a)return this;if("object"==typeof a?(e=a,c=b):(e={})[a]=b,c||(c={}),!this._validate(e,c))return!1;f=c.unset,i=c.silent,g=[],j=this._changing,this._changing=!0,j||(this._previousAttributes=h.clone(this.attributes),this.changed={}),l=this.attributes,k=this._previousAttributes,this.idAttribute in e&&(this.id=e[this.idAttribute]);for(d in e)b=e[d],h.isEqual(l[d],b)||g.push(d),h.isEqual(k[d],b)?delete this.changed[d]:this.changed[d]=b,f?delete l[d]:l[d]=b;if(!i){g.length&&(this._pending=!0);for(var m=0,n=g.length;n>m;m++)this.trigger("change:"+g[m],this,l[g[m]],c)}if(j)return this;if(!i)for(;this._pending;)this._pending=!1,this.trigger("change",this,c);return this._pending=!1,this._changing=!1,this},unset:function(a,b){return this.set(a,void 0,h.extend({},b,{unset:!0}))},clear:function(a){var b={};for(var c in this.attributes)b[c]=void 0;return this.set(b,h.extend({},a,{unset:!0}))},hasChanged:function(a){return null==a?!h.isEmpty(this.changed):h.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?h.clone(this.changed):!1;var b,c=!1,d=this._changing?this._previousAttributes:this.attributes;for(var e in a)h.isEqual(d[e],b=a[e])||((c||(c={}))[e]=b);return c},previous:function(a){return null!=a&&this._previousAttributes?this._previousAttributes[a]:null},previousAttributes:function(){return h.clone(this._previousAttributes)},fetch:function(a){a=a?h.clone(a):{},void 0===a.parse&&(a.parse=!0);var b=this,c=a.success;return a.success=function(d){return b.set(b.parse(d,a),a)?(c&&c(b,d,a),b.trigger("sync",b,d,a),void 0):!1},L(this,a),this.sync("read",this,a)},save:function(a,b,c){var d,e,f,g=this.attributes;if(null==a||"object"==typeof a?(d=a,c=b):(d={})[a]=b,!(!d||c&&c.wait||this.set(d,c)))return!1;if(c=h.extend({validate:!0},c),!this._validate(d,c))return!1;d&&c.wait&&(this.attributes=h.extend({},g,d)),void 0===c.parse&&(c.parse=!0);var i=this,j=c.success;return c.success=function(a){i.attributes=g;var b=i.parse(a,c);return c.wait&&(b=h.extend(d||{},b)),h.isObject(b)&&!i.set(b,c)?!1:(j&&j(i,a,c),i.trigger("sync",i,a,c),void 0)},L(this,c),e=this.isNew()?"create":c.patch?"patch":"update","patch"===e&&(c.attrs=d),f=this.sync(e,this,c),d&&c.wait&&(this.attributes=g),f},destroy:function(a){a=a?h.clone(a):{};var b=this,c=a.success,d=function(){b.trigger("destroy",b,b.collection,a)};if(a.success=function(e){(a.wait||b.isNew())&&d(),c&&c(b,e,a),b.isNew()||b.trigger("sync",b,e,a)},this.isNew())return a.success(),!1;L(this,a);var e=this.sync("delete",this,a);return a.wait||d(),e},url:function(){var a=h.result(this,"urlRoot")||h.result(this.collection,"url")||K();return this.isNew()?a:a+("/"===a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},isValid:function(a){return this._validate({},h.extend(a||{},{validate:!0}))},_validate:function(a,b){if(!b.validate||!this.validate)return!0;a=h.extend({},this.attributes,a);var c=this.validationError=this.validate(a,b)||null;return c?(this.trigger("invalid",this,c,h.extend(b||{},{validationError:c})),!1):!0}});var p=["keys","values","pairs","invert","pick","omit"];h.each(p,function(a){n.prototype[a]=function(){var b=f.call(arguments);return b.unshift(this.attributes),h[a].apply(h,b)}});var q=a.Collection=function(a,b){b||(b={}),b.url&&(this.url=b.url),b.model&&(this.model=b.model),void 0!==b.comparator&&(this.comparator=b.comparator),this._reset(),this.initialize.apply(this,arguments),a&&this.reset(a,h.extend({silent:!0},b))},r={add:!0,remove:!0,merge:!0},s={add:!0,merge:!1,remove:!1};h.extend(q.prototype,i,{model:n,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},sync:function(){return a.sync.apply(this,arguments)},add:function(a,b){return this.set(a,h.defaults(b||{},s))},remove:function(a,b){a=h.isArray(a)?a.slice():[a],b||(b={});var c,d,e,f;for(c=0,d=a.length;d>c;c++)f=this.get(a[c]),f&&(delete this._byId[f.id],delete this._byId[f.cid],e=this.indexOf(f),this.models.splice(e,1),this.length--,b.silent||(b.index=e,f.trigger("remove",f,this,b)),this._removeReference(f));return this},set:function(a,b){b=h.defaults(b||{},r),b.parse&&(a=this.parse(a,b)),h.isArray(a)||(a=a?[a]:[]);var c,d,f,i,j,k=b.at,l=this.comparator&&null==k&&b.sort!==!1,m=h.isString(this.comparator)?this.comparator:null,n=[],o=[],p={};for(c=0,d=a.length;d>c;c++)(f=this._prepareModel(a[c],b))&&((i=this.get(f))?(b.remove&&(p[i.cid]=!0),b.merge&&(i.set(f.attributes,b),l&&!j&&i.hasChanged(m)&&(j=!0))):b.add&&(n.push(f),f.on("all",this._onModelEvent,this),this._byId[f.cid]=f,null!=f.id&&(this._byId[f.id]=f)));if(b.remove){for(c=0,d=this.length;d>c;++c)p[(f=this.models[c]).cid]||o.push(f);o.length&&this.remove(o,b)}if(n.length&&(l&&(j=!0),this.length+=n.length,null!=k?g.apply(this.models,[k,0].concat(n)):e.apply(this.models,n)),j&&this.sort({silent:!0}),b.silent)return this;for(c=0,d=n.length;d>c;c++)(f=n[c]).trigger("add",f,this,b);return j&&this.trigger("sort",this,b),this},reset:function(a,b){b||(b={});for(var c=0,d=this.models.length;d>c;c++)this._removeReference(this.models[c]);return b.previousModels=this.models,this._reset(),this.add(a,h.extend({silent:!0},b)),b.silent||this.trigger("reset",this,b),this},push:function(a,b){return a=this._prepareModel(a,b),this.add(a,h.extend({at:this.length},b)),a},pop:function(a){var b=this.at(this.length-1);return this.remove(b,a),b},unshift:function(a,b){return a=this._prepareModel(a,b),this.add(a,h.extend({at:0},b)),a},shift:function(a){var b=this.at(0);return this.remove(b,a),b},slice:function(a,b){return this.models.slice(a,b)},get:function(a){return null==a?void 0:this._byId[null!=a.id?a.id:a.cid||a]},at:function(a){return this.models[a]},where:function(a,b){return h.isEmpty(a)?b?void 0:[]:this[b?"find":"filter"](function(b){for(var c in a)if(a[c]!==b.get(c))return!1;return!0})},findWhere:function(a){return this.where(a,!0)},sort:function(a){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return a||(a={}),h.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(h.bind(this.comparator,this)),a.silent||this.trigger("sort",this,a),this},sortedIndex:function(a,b,c){b||(b=this.comparator);var d=h.isFunction(b)?b:function(a){return a.get(b)};return h.sortedIndex(this.models,a,d,c)},pluck:function(a){return h.invoke(this.models,"get",a)},fetch:function(a){a=a?h.clone(a):{},void 0===a.parse&&(a.parse=!0);var b=a.success,c=this;return a.success=function(d){var e=a.reset?"reset":"set";c[e](d,a),b&&b(c,d,a),c.trigger("sync",c,d,a)},L(this,a),this.sync("read",this,a)},create:function(a,b){if(b=b?h.clone(b):{},!(a=this._prepareModel(a,b)))return!1;b.wait||this.add(a,b);var c=this,d=b.success;return b.success=function(e){b.wait&&c.add(a,b),d&&d(a,e,b)},a.save(null,b),a},parse:function(a){return a},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(a,b){if(a instanceof n)return a.collection||(a.collection=this),a;b||(b={}),b.collection=this;var c=new this.model(a,b);return c._validate(a,b)?c:(this.trigger("invalid",this,a,b),!1)},_removeReference:function(a){this===a.collection&&delete a.collection,a.off("all",this._onModelEvent,this)},_onModelEvent:function(a,b,c,d){("add"!==a&&"remove"!==a||c===this)&&("destroy"===a&&this.remove(b,d),b&&a==="change:"+b.idAttribute&&(delete this._byId[b.previous(b.idAttribute)],null!=b.id&&(this._byId[b.id]=b)),this.trigger.apply(this,arguments))}});var t=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","indexOf","shuffle","lastIndexOf","isEmpty","chain"];h.each(t,function(a){q.prototype[a]=function(){var b=f.call(arguments);return b.unshift(this.models),h[a].apply(h,b)}});var u=["groupBy","countBy","sortBy"];h.each(u,function(a){q.prototype[a]=function(b,c){var d=h.isFunction(b)?b:function(a){return a.get(b)};return h[a](this.models,d,c)}});var v=a.View=function(a){this.cid=h.uniqueId("view"),this._configure(a||{}),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},w=/^(\S+)\s*(.*)$/,x=["model","collection","el","id","attributes","className","tagName","events"];h.extend(v.prototype,i,{tagName:"div",$:function(a){return this.$el.find(a)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(b,c){return this.$el&&this.undelegateEvents(),this.$el=b instanceof a.$?b:a.$(b),this.el=this.$el[0],c!==!1&&this.delegateEvents(),this},delegateEvents:function(a){if(!a&&!(a=h.result(this,"events")))return this;this.undelegateEvents();for(var b in a){var c=a[b];if(h.isFunction(c)||(c=this[a[b]]),c){var d=b.match(w),e=d[1],f=d[2];c=h.bind(c,this),e+=".delegateEvents"+this.cid,""===f?this.$el.on(e,c):this.$el.on(e,f,c)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_configure:function(a){this.options&&(a=h.extend({},h.result(this,"options"),a)),h.extend(this,h.pick(a,x)),this.options=a},_ensureElement:function(){if(this.el)this.setElement(h.result(this,"el"),!1);else{var b=h.extend({},h.result(this,"attributes"));this.id&&(b.id=h.result(this,"id")),this.className&&(b["class"]=h.result(this,"className"));var c=a.$("<"+h.result(this,"tagName")+">").attr(b);this.setElement(c,!1)}}}),a.sync=function(b,c,d){var e=y[b];h.defaults(d||(d={}),{emulateHTTP:a.emulateHTTP,emulateJSON:a.emulateJSON});var f={type:e,dataType:"json"};if(d.url||(f.url=h.result(c,"url")||K()),null!=d.data||!c||"create"!==b&&"update"!==b&&"patch"!==b||(f.contentType="application/json",f.data=JSON.stringify(d.attrs||c.toJSON(d))),d.emulateJSON&&(f.contentType="application/x-www-form-urlencoded",f.data=f.data?{model:f.data}:{}),d.emulateHTTP&&("PUT"===e||"DELETE"===e||"PATCH"===e)){f.type="POST",d.emulateJSON&&(f.data._method=e);var g=d.beforeSend;d.beforeSend=function(a){return a.setRequestHeader("X-HTTP-Method-Override",e),g?g.apply(this,arguments):void 0}}"GET"===f.type||d.emulateJSON||(f.processData=!1),"PATCH"!==f.type||!window.ActiveXObject||window.external&&window.external.msActiveXFilteringEnabled||(f.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var i=d.xhr=a.ajax(h.extend(f,d));return c.trigger("request",c,i,d),i};var y={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};a.ajax=function(){return a.$.ajax.apply(a.$,arguments)};var z=a.Router=function(a){a||(a={}),a.routes&&(this.routes=a.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},A=/\((.*?)\)/g,B=/(\(\?)?:\w+/g,C=/\*\w+/g,D=/[\-{}\[\]+?.,\\\^$|#\s]/g;h.extend(z.prototype,i,{initialize:function(){},route:function(b,c,d){h.isRegExp(b)||(b=this._routeToRegExp(b)),h.isFunction(c)&&(d=c,c=""),d||(d=this[c]);var e=this;return a.history.route(b,function(f){var g=e._extractParameters(b,f);d&&d.apply(e,g),e.trigger.apply(e,["route:"+c].concat(g)),e.trigger("route",c,g),a.history.trigger("route",e,c,g)}),this},navigate:function(b,c){return a.history.navigate(b,c),this},_bindRoutes:function(){if(this.routes){this.routes=h.result(this,"routes");for(var a,b=h.keys(this.routes);null!=(a=b.pop());)this.route(a,this.routes[a])}},_routeToRegExp:function(a){return a=a.replace(D,"\\$&").replace(A,"(?:$1)?").replace(B,function(a,b){return b?a:"([^/]+)"}).replace(C,"(.*?)"),new RegExp("^"+a+"$")},_extractParameters:function(a,b){var c=a.exec(b).slice(1);return h.map(c,function(a){return a?decodeURIComponent(a):null})}});var E=a.History=function(){this.handlers=[],h.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},F=/^[#\/]|\s+$/g,G=/^\/+|\/+$/g,H=/msie [\w.]+/,I=/\/$/;E.started=!1,h.extend(E.prototype,i,{interval:50,getHash:function(a){var b=(a||this).location.href.match(/#(.*)$/);return b?b[1]:""},getFragment:function(a,b){if(null==a)if(this._hasPushState||!this._wantsHashChange||b){a=this.location.pathname;var c=this.root.replace(I,"");a.indexOf(c)||(a=a.substr(c.length))}else a=this.getHash();return a.replace(F,"")},start:function(b){if(E.started)throw new Error("Backbone.history has already been started");E.started=!0,this.options=h.extend({},{root:"/"},this.options,b),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var c=this.getFragment(),d=document.documentMode,e=H.exec(navigator.userAgent.toLowerCase())&&(!d||7>=d);this.root=("/"+this.root+"/").replace(G,"/"),e&&this._wantsHashChange&&(this.iframe=a.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(c)),this._hasPushState?a.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!e?a.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=c;var f=this.location,g=f.pathname.replace(/[^\/]$/,"$&/")===this.root;return this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!g?(this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0):(this._wantsPushState&&this._hasPushState&&g&&f.hash&&(this.fragment=this.getHash().replace(F,""),this.history.replaceState({},document.title,this.root+this.fragment+f.search)),this.options.silent?void 0:this.loadUrl())},stop:function(){a.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),E.started=!1},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(){var a=this.getFragment();return a===this.fragment&&this.iframe&&(a=this.getFragment(this.getHash(this.iframe))),a===this.fragment?!1:(this.iframe&&this.navigate(a),this.loadUrl()||this.loadUrl(this.getHash()),void 0)},loadUrl:function(a){var b=this.fragment=this.getFragment(a),c=h.any(this.handlers,function(a){return a.route.test(b)?(a.callback(b),!0):void 0});return c},navigate:function(a,b){if(!E.started)return!1;if(b&&b!==!0||(b={trigger:b}),a=this.getFragment(a||""),this.fragment!==a){this.fragment=a;var c=this.root+a;if(this._hasPushState)this.history[b.replace?"replaceState":"pushState"]({},document.title,c);else{if(!this._wantsHashChange)return this.location.assign(c);this._updateHash(this.location,a,b.replace),this.iframe&&a!==this.getFragment(this.getHash(this.iframe))&&(b.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,a,b.replace))}b.trigger&&this.loadUrl(a)}},_updateHash:function(a,b,c){if(c){var d=a.href.replace(/(javascript:|#).*$/,"");a.replace(d+"#"+b)}else a.hash="#"+b}}),a.history=new E;var J=function(a,b){var c,d=this;c=a&&h.has(a,"constructor")?a.constructor:function(){return d.apply(this,arguments)},h.extend(c,d,b);var e=function(){this.constructor=c};return e.prototype=d.prototype,c.prototype=new e,a&&h.extend(c.prototype,a),c.__super__=d.prototype,c};n.extend=q.extend=z.extend=v.extend=E.extend=J;var K=function(){throw new Error('A "url" property or function must be specified')},L=function(a,b){var c=b.error;b.error=function(d){c&&c(a,d,b),a.trigger("error",a,d,b)}}}.call(this),define("backbone",["lodash","jquery"],function(a){return function(){var b;return b||a.Backbone}}(this)),!function(a){a(function(){a.support.transition=function(){var a=function(){var a,b=document.createElement("bootstrap"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(a in c)if(void 0!==b.style[a])return c[a]}();return a&&{end:a}}()})}(window.jQuery),!function(a){var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this,c=a.Event("show");this.$element.trigger(c),this.isShown||c.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var c=a.support.transition&&b.$element.hasClass("fade");b.$element.parent().length||b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in").attr("aria-hidden",!1),b.enforceFocus(),c?b.$element.one(a.support.transition.end,function(){b.$element.focus().trigger("shown")}):b.$element.focus().trigger("shown")}))},hide:function(b){b&&b.preventDefault();b=a.Event("hide"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),a.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var b=this;a(document).on("focusin.modal",function(a){b.$element[0]===a.target||b.$element.has(a.target).length||b.$element.focus()})},escape:function(){var a=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(b){27==b.which&&a.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),b.hideModal()},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),b.hideModal()})},hideModal:function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;
-if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?a.proxy(this.$element[0].focus,this.$element[0]):a.proxy(this.hide,this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b):b()):b&&b()}};var c=a.fn.modal;a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=a.extend({},a.fn.modal.defaults,d.data(),"object"==typeof c&&c);e||d.data("modal",e=new b(this,f)),"string"==typeof c?e[c]():f.show&&e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f).one("hide",function(){c.focus()})})}(window.jQuery),!function(a){function b(){a(".dropdown-backdrop").remove(),a(d).each(function(){c(a(this)).removeClass("open")})}function c(b){var c,d=b.attr("data-target");return d||(d=b.attr("href"),d=d&&/#/.test(d)&&d.replace(/.*(?=#[^\s]*$)/,"")),c=d&&a(d),c&&c.length||(c=b.parent()),c}var d="[data-toggle=dropdown]",e=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};e.prototype={constructor:e,toggle:function(){var d,e,f=a(this);if(!f.is(".disabled, :disabled"))return d=c(f),e=d.hasClass("open"),b(),e||("ontouchstart"in document.documentElement&&a('<div class="dropdown-backdrop"/>').insertBefore(a(this)).on("click",b),d.toggleClass("open")),f.focus(),!1},keydown:function(b){var e,f,g,h,i;if(/(38|40|27)/.test(b.keyCode)&&(e=a(this),b.preventDefault(),b.stopPropagation(),!e.is(".disabled, :disabled"))){if(g=c(e),h=g.hasClass("open"),!h||h&&27==b.keyCode)return 27==b.which&&g.find(d).focus(),e.click();f=a("[role=menu] li:not(.divider):visible a",g),f.length&&(i=f.index(f.filter(":focus")),38==b.keyCode&&i>0&&i--,40==b.keyCode&&i<f.length-1&&i++,~i||(i=0),f.eq(i).focus())}}};var f=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("dropdown");d||c.data("dropdown",d=new e(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=e,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=f,this},a(document).on("click.dropdown.data-api",b).on("click.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.dropdown.data-api",d,e.prototype.toggle).on("keydown.dropdown.data-api",d+", [role=menu]",e.prototype.keydown)}(window.jQuery),!function(a){function b(b,c){var d,e=a.proxy(this.process,this),f=a(b).is("body")?a(window):a(b);this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=f.on("scroll.scroll-spy.data-api",e),this.selector=(this.options.target||(d=a(b).attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body"),this.refresh(),this.process()}b.prototype={constructor:b,refresh:function(){var b,c=this;this.offsets=a([]),this.targets=a([]),b=this.$body.find(this.selector).map(function(){var b=a(this),d=b.data("target")||b.attr("href"),e=/^#\w/.test(d)&&a(d);return e&&e.length&&[[e.position().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),d]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},process:function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},activate:function(b){var c,d;this.activeTarget=b,a(this.selector).parent(".active").removeClass("active"),d=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',c=a(d).parent("li").addClass("active"),c.parent(".dropdown-menu").length&&(c=c.closest("li.dropdown").addClass("active")),c.trigger("activate")}};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f="object"==typeof c&&c;e||d.data("scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b,c,d,e=this.element,f=e.closest("ul:not(.dropdown-menu)"),g=e.attr("data-target");g||(g=e.attr("href"),g=g&&g.replace(/.*(?=#[^\s]*$)/,"")),e.parent("li").hasClass("active")||(b=f.find(".active:last a")[0],d=a.Event("show",{relatedTarget:b}),e.trigger(d),d.isDefaultPrevented()||(c=a(g),this.activate(e.parent("li"),f),this.activate(c,c.parent(),function(){e.trigger({type:"shown",relatedTarget:b})})))},activate:function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e):e(),f.removeClass("in")}};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),!function(a){var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f,g,h,i;for(this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,g=this.options.trigger.split(" "),i=g.length;i--;)h=g[i],"click"==h?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):"manual"!=h&&(e="hover"==h?"mouseenter":"focus",f="hover"==h?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this)));this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c,d=a.fn[this.type].defaults,e={};return this._options&&a.each(this._options,function(a,b){d[a]!=b&&(e[a]=b)},this),c=a(b.currentTarget)[this.type](e).data(this.type),c.options.delay&&c.options.delay.show?(clearTimeout(this.timeout),c.hoverState="in",this.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show),void 0):c.show()},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),c.options.delay&&c.options.delay.hide?(c.hoverState="out",this.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide),void 0):c.hide()},show:function(){var b,c,d,e,f,g,h=a.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(h),h.isDefaultPrevented())return;switch(b=this.tip(),this.setContent(),this.options.animation&&b.addClass("fade"),f="function"==typeof this.options.placement?this.options.placement.call(this,b[0],this.$element[0]):this.options.placement,b.detach().css({top:0,left:0,display:"block"}),this.options.container?b.appendTo(this.options.container):b.insertAfter(this.$element),c=this.getPosition(),d=b[0].offsetWidth,e=b[0].offsetHeight,f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}this.applyPlacement(g,f),this.$element.trigger("shown")}},applyPlacement:function(a,b){var c,d,e,f,g=this.tip(),h=g[0].offsetWidth,i=g[0].offsetHeight;g.offset(a).addClass(b).addClass("in"),c=g[0].offsetWidth,d=g[0].offsetHeight,"top"==b&&d!=i&&(a.top=a.top+i-d,f=!0),"bottom"==b||"top"==b?(e=0,a.left<0&&(e=-2*a.left,a.left=0,g.offset(a),c=g[0].offsetWidth,d=g[0].offsetHeight),this.replaceArrow(e-h+c,c,"left")):this.replaceArrow(d-i,d,"top"),f&&g.offset(a)},replaceArrow:function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},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")},hide:function(){function b(){var b=setTimeout(function(){c.off(a.support.transition.end).detach()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.detach()})}var c=this.tip(),d=a.Event("hide");return this.$element.trigger(d),d.isDefaultPrevented()?void 0:(c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?b():c.detach(),this.$element.trigger("hidden"),this)},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","")},hasContent:function(){return this.getTitle()},getPosition:function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},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)},tip:function(){return this.$tip=this.$tip||a(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=b?a(b.currentTarget)[this.type](this._options).data(this.type):this;c.tip().hasClass("in")?c.hide():c.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f="object"==typeof c&&c;e||d.data("tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery),!function(a){var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,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")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=("function"==typeof c.content?c.content.call(b[0]):c.content)||b.attr("data-content")},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f="object"==typeof c&&c;e||d.data("popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),!function(a){var b=function(b,c){this.options=a.extend({},a.fn.affix.defaults,c),this.$window=a(window).on("scroll.affix.data-api",a.proxy(this.checkPosition,this)).on("click.affix.data-api",a.proxy(function(){setTimeout(a.proxy(this.checkPosition,this),1)},this)),this.$element=a(b),this.checkPosition()};b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b,c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.bottom,h=f.top,i="affix affix-top affix-bottom";"object"!=typeof f&&(g=h=f),"function"==typeof h&&(h=f.top()),"function"==typeof g&&(g=f.bottom()),b=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=g&&e.top+this.$element.height()>=c-g?"bottom":null!=h&&h>=d?"top":!1,this.affixed!==b&&(this.affixed=b,this.unpin="bottom"==b?e.top-d:null,this.$element.removeClass(i).addClass("affix"+(b?"-"+b:"")))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("affix"),f="object"==typeof c&&c;e||d.data("affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.defaults={offset:0},a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery),!function(a){var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){d.trigger("closed").remove()}var d,e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,"")),d=a(f),b&&b.preventDefault(),d.length||(d=e.hasClass("alert")?e:e.parent()),d.trigger(b=a.Event("close")),b.isDefaultPrevented()||(d.removeClass("in"),a.support.transition&&d.hasClass("fade")?d.on(a.support.transition.end,c):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.alert.data-api",b,c.prototype.close)}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f="object"==typeof c&&c;e||d.data("button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(!this.transitioning&&!this.$element.hasClass("in")){if(b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in"),d&&d.length){if(e=d.data("collapse"),e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),a.support.transition&&this.$element[b](this.$element[0][c])}},hide:function(){var b;!this.transitioning&&this.$element.hasClass("in")&&(b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0))},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[null!==a?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){"show"==c.type&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c),c.isDefaultPrevented()||(this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=a.extend({},a.fn.collapse.defaults,d.data(),"object"==typeof c&&c);e||d.data("collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":d.data();d[a(e).hasClass("in")?"addClass":"removeClass"]("collapsed"),a(e).collapse(f)})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.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},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(b){var c=this.getActiveIndex(),d=this;if(!(b>this.$items.length-1||0>b))return this.sliding?this.$element.one("slid",function(){d.to(b)}):c==b?this.pause().cycle():this.slide(b>c?"next":"prev",a(this.$items[b]))},pause:function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(b,c){var d,e=this.$element.find(".item.active"),f=c||e[b](),g=this.interval,h="next"==b?"left":"right",i="next"==b?"first":"last",j=this;if(this.sliding=!0,g&&this.pause(),f=f.length?f:this.$element.find(".item")[i](),d=a.Event("slide",{relatedTarget:f[0],direction:h}),!f.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(j.$indicators.children()[j.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(d),d.isDefaultPrevented())return;f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),this.$element.one(a.support.transition.end,function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),j.sliding=!1,setTimeout(function(){j.$element.trigger("slid")},0)})}else{if(this.$element.trigger(d),d.isDefaultPrevented())return;e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return g&&this.cycle(),this}}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=a.extend({},a.fn.carousel.defaults,"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d,e=a(this),f=a(e.attr("data-target")||(c=e.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),g=a.extend({},f.data(),e.data());f.carousel(g),(d=e.attr("data-slide-to"))&&f.data("carousel").pause().to(d).cycle(),b.preventDefault()})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=a(this.options.menu),this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(a)).change(),this.hide()},updater:function(a){return a},show:function(){var b=a.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:b.top+b.height,left:b.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var b;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(b=a.isFunction(this.source)?this.source(this.query,a.proxy(this.process,this)):this.source,b?this.process(b):this)},process:function(b){var c=this;return b=a.grep(b,function(a){return c.matcher(a)}),b=this.sorter(b),b.length?this.render(b.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){for(var b,c=[],d=[],e=[];b=a.shift();)b.toLowerCase().indexOf(this.query.toLowerCase())?~b.indexOf(this.query)?d.push(b):e.push(b):c.push(b);return c.concat(d,e)},highlighter:function(a){var b=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return a.replace(new RegExp("("+b+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(){var b=this.$menu.find(".active").removeClass("active"),c=b.next();c.length||(c=a(this.$menu.find("li")[0])),c.addClass("active")},prev:function(){var a=this.$menu.find(".active").removeClass("active"),b=a.prev();b.length||(b=this.$menu.find("li").last()),b.addClass("active")},listen:function(){this.$element.on("focus",a.proxy(this.focus,this)).on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",a.proxy(this.keydown,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this)).on("mouseleave","li",a.proxy(this.mouseleave,this))},eventSupported:function(a){var b=a in this.$element;return b||(this.$element.setAttribute(a,"return;"),b="function"==typeof this.$element[a]),b},move:function(a){if(this.shown){switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}a.stopPropagation()}},keydown:function(b){this.suppressKeyPressRepeat=~a.inArray(b.keyCode,[40,38,9,13,27]),this.move(b)},keypress:function(a){this.suppressKeyPressRepeat||this.move(a)},keyup:function(a){switch(a.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}a.stopPropagation(),a.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(a){a.stopPropagation(),a.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(b){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var c=a.fn.typeahead;a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f="object"==typeof c&&c;e||d.data("typeahead",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},a.fn.typeahead.Constructor=b,a.fn.typeahead.noConflict=function(){return a.fn.typeahead=c,this},a(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var b=a(this);b.data("typeahead")||b.typeahead(b.data())})}(window.jQuery),define("bootstrap",["jquery"],function(a){return function(){var b;return b||a.Bootstrap}}(this)),function(){function a(a,b){try{for(var c in b)Object.defineProperty(a.prototype,c,{value:b[c],enumerable:!1})}catch(d){a.prototype=b}}function b(a){for(var b=-1,c=a.length,d=[];++b<c;)d.push(a[b]);return d}function c(a){return Array.prototype.slice.call(a)}function d(){}function e(a){return a}function f(){return this}function g(){return!0}function h(a){return"function"==typeof a?a:function(){return a}}function i(a,b,c){return function(){var d=c.apply(b,arguments);return arguments.length?a:d}}function j(a){return null!=a&&!isNaN(a)}function k(a){return a.length}function l(a){return null==a}function m(a){return a.trim().replace(/\s+/g," ")}function n(a){for(var b=1;a*b%1;)b*=10;return b}function o(){}function p(a){function b(){for(var b,d=c,e=-1,f=d.length;++e<f;)(b=d[e].on)&&b.apply(this,arguments);return a}var c=[],e=new d;return b.on=function(b,d){var f,g=e.get(b);return arguments.length<2?g&&g.on:(g&&(g.on=null,c=c.slice(0,f=c.indexOf(g)).concat(c.slice(f+1)),e.remove(b)),d&&c.push(e.set(b,{on:d})),a)},b}function q(a,b){return b-(a?1+Math.floor(Math.log(a+Math.pow(10,1+Math.floor(Math.log(a)/Math.LN10)-b))/Math.LN10):1)}function r(a){return a+""}function s(a){for(var b=a.lastIndexOf("."),c=b>=0?a.substring(b):(b=a.length,""),d=[];b>0;)d.push(a.substring(b-=3,b+3));return d.reverse().join(",")+c}function t(a,b){var c=Math.pow(10,3*Math.abs(8-b));return{scale:b>8?function(a){return a/c}:function(a){return a*c},symbol:a}}function u(a){return function(b){return 0>=b?0:b>=1?1:a(b)}}function v(a){return function(b){return 1-a(1-b)}}function w(a){return function(b){return.5*(.5>b?a(2*b):2-a(2-2*b))}}function x(a){return a}function y(a){return function(b){return Math.pow(b,a)}}function z(a){return 1-Math.cos(a*Math.PI/2)}function A(a){return Math.pow(2,10*(a-1))}function B(a){return 1-Math.sqrt(1-a*a)}function C(a,b){var c;return arguments.length<2&&(b=.45),arguments.length<1?(a=1,c=b/4):c=b/(2*Math.PI)*Math.asin(1/a),function(d){return 1+a*Math.pow(2,10*-d)*Math.sin(2*(d-c)*Math.PI/b)}}function D(a){return a||(a=1.70158),function(b){return b*b*((a+1)*b-a)}}function E(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}function F(){d3.event.stopPropagation(),d3.event.preventDefault()}function G(){for(var a,b=d3.event;a=b.sourceEvent;)b=a;return b}function H(a){for(var b=new o,c=0,d=arguments.length;++c<d;)b[arguments[c]]=p(b);return b.of=function(c,d){return function(e){try{var f=e.sourceEvent=d3.event;e.target=a,d3.event=e,b[e.type].apply(c,d)}finally{d3.event=f}}},b}function I(a){var b=[a.a,a.b],c=[a.c,a.d],d=K(b),e=J(b,c),f=K(L(c,b,-e))||0;b[0]*c[1]<c[0]*b[1]&&(b[0]*=-1,b[1]*=-1,d*=-1,e*=-1),this.rotate=(d?Math.atan2(b[1],b[0]):Math.atan2(-c[0],c[1]))*gf,this.translate=[a.e,a.f],this.scale=[d,f],this.skew=f?Math.atan2(e,f)*gf:0}function J(a,b){return a[0]*b[0]+a[1]*b[1]}function K(a){var b=Math.sqrt(J(a,a));return b&&(a[0]/=b,a[1]/=b),b}function L(a,b,c){return a[0]+=c*b[0],a[1]+=c*b[1],a}function M(a){return"transform"==a?d3.interpolateTransform:d3.interpolate}function N(a,b){return b=b-(a=+a)?1/(b-a):0,function(c){return(c-a)*b}}function O(a,b){return b=b-(a=+a)?1/(b-a):0,function(c){return Math.max(0,Math.min(1,(c-a)*b))}}function P(){}function Q(a,b,c){return new R(a,b,c)}function R(a,b,c){this.r=a,this.g=b,this.b=c}function S(a){return 16>a?"0"+Math.max(0,a).toString(16):Math.min(255,a).toString(16)}function T(a,b,c){var d,e,f,g=0,h=0,i=0;if(d=/([a-z]+)\((.*)\)/i.exec(a))switch(e=d[2].split(","),d[1]){case"hsl":return c(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100);case"rgb":return b(X(e[0]),X(e[1]),X(e[2]))}return(f=lf.get(a))?b(f.r,f.g,f.b):(null!=a&&"#"===a.charAt(0)&&(4===a.length?(g=a.charAt(1),g+=g,h=a.charAt(2),h+=h,i=a.charAt(3),i+=i):7===a.length&&(g=a.substring(1,3),h=a.substring(3,5),i=a.substring(5,7)),g=parseInt(g,16),h=parseInt(h,16),i=parseInt(i,16)),b(g,h,i))}function U(a,b,c){var d,e,f=Math.min(a/=255,b/=255,c/=255),g=Math.max(a,b,c),h=g-f,i=(g+f)/2;return h?(e=.5>i?h/(g+f):h/(2-g-f),d=a==g?(b-c)/h+(c>b?6:0):b==g?(c-a)/h+2:(a-b)/h+4,d*=60):e=d=0,Y(d,e,i)}function V(a,b,c){a=W(a),b=W(b),c=W(c);var d=hb((.4124564*a+.3575761*b+.1804375*c)/pf),e=hb((.2126729*a+.7151522*b+.072175*c)/qf),f=hb((.0193339*a+.119192*b+.9503041*c)/rf);return cb(116*e-16,500*(d-e),200*(e-f))}function W(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function X(a){var b=parseFloat(a);return"%"===a.charAt(a.length-1)?Math.round(2.55*b):b}function Y(a,b,c){return new Z(a,b,c)}function Z(a,b,c){this.h=a,this.s=b,this.l=c}function $(a,b,c){function d(a){return a>360?a-=360:0>a&&(a+=360),60>a?f+(g-f)*a/60:180>a?g:240>a?f+(g-f)*(240-a)/60:f}function e(a){return Math.round(255*d(a))}var f,g;return a%=360,0>a&&(a+=360),b=0>b?0:b>1?1:b,c=0>c?0:c>1?1:c,g=.5>=c?c*(1+b):c+b-c*b,f=2*c-g,Q(e(a+120),e(a),e(a-120))}function _(a,b,c){return new ab(a,b,c)}function ab(a,b,c){this.h=a,this.c=b,this.l=c}function bb(a,b,c){return cb(c,Math.cos(a*=Math.PI/180)*b,Math.sin(a)*b)}function cb(a,b,c){return new db(a,b,c)}function db(a,b,c){this.l=a,this.a=b,this.b=c}function eb(a,b,c){var d=(a+16)/116,e=d+b/500,f=d-c/200;return e=gb(e)*pf,d=gb(d)*qf,f=gb(f)*rf,Q(ib(3.2404542*e-1.5371385*d-.4985314*f),ib(-.969266*e+1.8760108*d+.041556*f),ib(.0556434*e-.2040259*d+1.0572252*f))}function fb(a,b,c){return _(Math.atan2(c,b)/Math.PI*180,Math.sqrt(b*b+c*c),a)}function gb(a){return a>.206893034?a*a*a:(a-4/29)/7.787037}function hb(a){return a>.008856?Math.pow(a,1/3):7.787037*a+4/29}function ib(a){return Math.round(255*(.00304>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055))}function jb(a){return Ue(a,yf),a}function kb(a){return function(){return tf(a,this)}}function lb(a){return function(){return uf(a,this)}}function mb(a,b){function c(){this.removeAttribute(a)}function d(){this.removeAttributeNS(a.space,a.local)}function e(){this.setAttribute(a,b)}function f(){this.setAttributeNS(a.space,a.local,b)}function g(){var c=b.apply(this,arguments);null==c?this.removeAttribute(a):this.setAttribute(a,c)}function h(){var c=b.apply(this,arguments);null==c?this.removeAttributeNS(a.space,a.local):this.setAttributeNS(a.space,a.local,c)
-}return a=d3.ns.qualify(a),null==b?a.local?d:c:"function"==typeof b?a.local?h:g:a.local?f:e}function nb(a){return new RegExp("(?:^|\\s+)"+d3.requote(a)+"(?:\\s+|$)","g")}function ob(a,b){function c(){for(var c=-1;++c<e;)a[c](this,b)}function d(){for(var c=-1,d=b.apply(this,arguments);++c<e;)a[c](this,d)}a=a.trim().split(/\s+/).map(pb);var e=a.length;return"function"==typeof b?d:c}function pb(a){var b=nb(a);return function(c,d){if(e=c.classList)return d?e.add(a):e.remove(a);var e=c.className,f=null!=e.baseVal,g=f?e.baseVal:e;d?(b.lastIndex=0,b.test(g)||(g=m(g+" "+a),f?e.baseVal=g:c.className=g)):g&&(g=m(g.replace(b," ")),f?e.baseVal=g:c.className=g)}}function qb(a,b,c){function d(){this.style.removeProperty(a)}function e(){this.style.setProperty(a,b,c)}function f(){var d=b.apply(this,arguments);null==d?this.style.removeProperty(a):this.style.setProperty(a,d,c)}return null==b?d:"function"==typeof b?f:e}function rb(a,b){function c(){delete this[a]}function d(){this[a]=b}function e(){var c=b.apply(this,arguments);null==c?delete this[a]:this[a]=c}return null==b?c:"function"==typeof b?e:d}function sb(a){return{__data__:a}}function tb(a){return function(){return xf(this,a)}}function ub(a){return arguments.length||(a=d3.ascending),function(b,c){return a(b&&b.__data__,c&&c.__data__)}}function vb(a,b,c){function d(){var b=this[f];b&&(this.removeEventListener(a,b,b.$),delete this[f])}function e(){function e(a){var c=d3.event;d3.event=a,h[0]=g.__data__;try{b.apply(g,h)}finally{d3.event=c}}var g=this,h=arguments;d.call(this),this.addEventListener(a,this[f]=e,e.$=c),e._=b}var f="__on"+a,g=a.indexOf(".");return g>0&&(a=a.substring(0,g)),b?e:d}function wb(a,b){for(var c=0,d=a.length;d>c;c++)for(var e,f=a[c],g=0,h=f.length;h>g;g++)(e=f[g])&&b(e,g,c);return a}function xb(a){return Ue(a,Af),a}function yb(a,b,c){Ue(a,Bf);var e=new d,f=d3.dispatch("start","end"),g=Jf;return a.id=b,a.time=c,a.tween=function(b,c){return arguments.length<2?e.get(b):(null==c?e.remove(b):e.set(b,c),a)},a.ease=function(b){return arguments.length?(g="function"==typeof b?b:d3.ease.apply(d3,arguments),a):g},a.each=function(b,c){return arguments.length<2?zb.call(a,b):(f.on(b,c),a)},d3.timer(function(d){return wb(a,function(a,h){function i(d){return o.active>b?k():(o.active=b,e.forEach(function(b,c){(c=c.call(a,p,h))&&l.push(c)}),f.start.call(a,p,h),j(d)||d3.timer(j,0,c),1)}function j(c){if(o.active!==b)return k();for(var d=(c-m)/n,e=g(d),i=l.length;i>0;)l[--i].call(a,e);return d>=1?(k(),Df=b,f.end.call(a,p,h),Df=0,1):void 0}function k(){return--o.count||delete a.__transition__,1}var l=[],m=a.delay,n=a.duration,o=(a=a.node).__transition__||(a.__transition__={active:0,count:0}),p=a.__data__;++o.count,d>=m?i(d):d3.timer(i,m,c)})},0,c),a}function zb(a){var b=Df,c=Jf,d=Hf,e=If;return Df=this.id,Jf=this.ease(),wb(this,function(b,c,d){Hf=b.delay,If=b.duration,a.call(b=b.node,b.__data__,c,d)}),Df=b,Jf=c,Hf=d,If=e,this}function Ab(a,b,c){return""!=c&&Mf}function Bb(a,b){return d3.tween(a,M(b))}function Cb(){for(var a,b=Date.now(),c=Pf;c;)a=b-c.then,a>=c.delay&&(c.flush=c.callback(a)),c=c.next;var d=Db()-b;d>24?(isFinite(d)&&(clearTimeout(Lf),Lf=setTimeout(Cb,d)),Kf=0):(Kf=1,Qf(Cb))}function Db(){for(var a=null,b=Pf,c=1/0;b;)b.flush?(delete Of[b.callback.id],b=a?a.next=b.next:Pf=b.next):(c=Math.min(c,b.then+b.delay),b=(a=b).next);return c}function Eb(a,b){var c=a.ownerSVGElement||a;if(c.createSVGPoint){var d=c.createSVGPoint();if(0>Rf&&(window.scrollX||window.scrollY)){c=d3.select(document.body).append("svg").style("position","absolute").style("top",0).style("left",0);var e=c[0][0].getScreenCTM();Rf=!(e.f||e.e),c.remove()}return Rf?(d.x=b.pageX,d.y=b.pageY):(d.x=b.clientX,d.y=b.clientY),d=d.matrixTransform(a.getScreenCTM().inverse()),[d.x,d.y]}var f=a.getBoundingClientRect();return[b.clientX-f.left-a.clientLeft,b.clientY-f.top-a.clientTop]}function Fb(a){var b=a[0],c=a[a.length-1];return c>b?[b,c]:[c,b]}function Gb(a){return a.rangeExtent?a.rangeExtent():Fb(a.range())}function Hb(a,b){var c,d=0,e=a.length-1,f=a[d],g=a[e];return f>g&&(c=d,d=e,e=c,c=f,f=g,g=c),(b=b(g-f))&&(a[d]=b.floor(f),a[e]=b.ceil(g)),a}function Ib(){return Math}function Jb(a,b,c,d){function e(){var e=Math.min(a.length,b.length)>2?Qb:Pb,i=d?O:N;return g=e(a,b,i,c),h=e(b,a,i,d3.interpolate),f}function f(a){return g(a)}var g,h;return f.invert=function(a){return h(a)},f.domain=function(b){return arguments.length?(a=b.map(Number),e()):a},f.range=function(a){return arguments.length?(b=a,e()):b},f.rangeRound=function(a){return f.range(a).interpolate(d3.interpolateRound)},f.clamp=function(a){return arguments.length?(d=a,e()):d},f.interpolate=function(a){return arguments.length?(c=a,e()):c},f.ticks=function(b){return Nb(a,b)},f.tickFormat=function(b){return Ob(a,b)},f.nice=function(){return Hb(a,Lb),e()},f.copy=function(){return Jb(a,b,c,d)},e()}function Kb(a,b){return d3.rebind(a,b,"range","rangeRound","interpolate","clamp")}function Lb(a){return a=Math.pow(10,Math.round(Math.log(a)/Math.LN10)-1),a&&{floor:function(b){return Math.floor(b/a)*a},ceil:function(b){return Math.ceil(b/a)*a}}}function Mb(a,b){var c=Fb(a),d=c[1]-c[0],e=Math.pow(10,Math.floor(Math.log(d/b)/Math.LN10)),f=b/d*e;return.15>=f?e*=10:.35>=f?e*=5:.75>=f&&(e*=2),c[0]=Math.ceil(c[0]/e)*e,c[1]=Math.floor(c[1]/e)*e+.5*e,c[2]=e,c}function Nb(a,b){return d3.range.apply(d3,Mb(a,b))}function Ob(a,b){return d3.format(",."+Math.max(0,-Math.floor(Math.log(Mb(a,b)[2])/Math.LN10+.01))+"f")}function Pb(a,b,c,d){var e=c(a[0],a[1]),f=d(b[0],b[1]);return function(a){return f(e(a))}}function Qb(a,b,c,d){var e=[],f=[],g=0,h=Math.min(a.length,b.length)-1;for(a[h]<a[0]&&(a=a.slice().reverse(),b=b.slice().reverse());++g<=h;)e.push(c(a[g-1],a[g])),f.push(d(b[g-1],b[g]));return function(b){var c=d3.bisect(a,b,1,h)-1;return f[c](e[c](b))}}function Rb(a,b){function c(c){return a(b(c))}var d=b.pow;return c.invert=function(b){return d(a.invert(b))},c.domain=function(e){return arguments.length?(b=e[0]<0?Tb:Sb,d=b.pow,a.domain(e.map(b)),c):a.domain().map(d)},c.nice=function(){return a.domain(Hb(a.domain(),Ib)),c},c.ticks=function(){var c=Fb(a.domain()),e=[];if(c.every(isFinite)){var f=Math.floor(c[0]),g=Math.ceil(c[1]),h=d(c[0]),i=d(c[1]);if(b===Tb)for(e.push(d(f));f++<g;)for(var j=9;j>0;j--)e.push(d(f)*j);else{for(;g>f;f++)for(var j=1;10>j;j++)e.push(d(f)*j);e.push(d(f))}for(f=0;e[f]<h;f++);for(g=e.length;e[g-1]>i;g--);e=e.slice(f,g)}return e},c.tickFormat=function(a,e){if(arguments.length<2&&(e=Sf),arguments.length<1)return e;var f,g=Math.max(.1,a/c.ticks().length),h=b===Tb?(f=-1e-12,Math.floor):(f=1e-12,Math.ceil);return function(a){return a/d(h(b(a)+f))<=g?e(a):""}},c.copy=function(){return Rb(a.copy(),b)},Kb(c,a)}function Sb(a){return Math.log(0>a?0:a)/Math.LN10}function Tb(a){return-Math.log(a>0?0:-a)/Math.LN10}function Ub(a,b){function c(b){return a(d(b))}var d=Vb(b),e=Vb(1/b);return c.invert=function(b){return e(a.invert(b))},c.domain=function(b){return arguments.length?(a.domain(b.map(d)),c):a.domain().map(e)},c.ticks=function(a){return Nb(c.domain(),a)},c.tickFormat=function(a){return Ob(c.domain(),a)},c.nice=function(){return c.domain(Hb(c.domain(),Lb))},c.exponent=function(a){if(!arguments.length)return b;var f=c.domain();return d=Vb(b=a),e=Vb(1/b),c.domain(f)},c.copy=function(){return Ub(a.copy(),b)},Kb(c,a)}function Vb(a){return function(b){return 0>b?-Math.pow(-b,a):Math.pow(b,a)}}function Wb(a,b){function c(b){return g[((f.get(b)||f.set(b,a.push(b)))-1)%g.length]}function e(b,c){return d3.range(a.length).map(function(a){return b+c*a})}var f,g,h;return c.domain=function(e){if(!arguments.length)return a;a=[],f=new d;for(var g,h=-1,i=e.length;++h<i;)f.has(g=e[h])||f.set(g,a.push(g));return c[b.t].apply(c,b.a)},c.range=function(a){return arguments.length?(g=a,h=0,b={t:"range",a:arguments},c):g},c.rangePoints=function(d,f){arguments.length<2&&(f=0);var i=d[0],j=d[1],k=(j-i)/(Math.max(1,a.length-1)+f);return g=e(a.length<2?(i+j)/2:i+k*f/2,k),h=0,b={t:"rangePoints",a:arguments},c},c.rangeBands=function(d,f,i){arguments.length<2&&(f=0),arguments.length<3&&(i=f);var j=d[1]<d[0],k=d[j-0],l=d[1-j],m=(l-k)/(a.length-f+2*i);return g=e(k+m*i,m),j&&g.reverse(),h=m*(1-f),b={t:"rangeBands",a:arguments},c},c.rangeRoundBands=function(d,f,i){arguments.length<2&&(f=0),arguments.length<3&&(i=f);var j=d[1]<d[0],k=d[j-0],l=d[1-j],m=Math.floor((l-k)/(a.length-f+2*i)),n=l-k-(a.length-f)*m;return g=e(k+Math.round(n/2),m),j&&g.reverse(),h=Math.round(m*(1-f)),b={t:"rangeRoundBands",a:arguments},c},c.rangeBand=function(){return h},c.rangeExtent=function(){return Fb(b.a[0])},c.copy=function(){return Wb(a,b)},c.domain(a)}function Xb(a,b){function c(){var c=0,f=(a.length,b.length);for(e=[];++c<f;)e[c-1]=d3.quantile(a,c/f);return d}function d(a){return isNaN(a=+a)?0/0:b[d3.bisect(e,a)]}var e;return d.domain=function(b){return arguments.length?(a=b.filter(function(a){return!isNaN(a)}).sort(d3.ascending),c()):a},d.range=function(a){return arguments.length?(b=a,c()):b},d.quantiles=function(){return e},d.copy=function(){return Xb(a,b)},c()}function Yb(a,b,c){function d(b){return c[Math.max(0,Math.min(g,Math.floor(f*(b-a))))]}function e(){return f=c.length/(b-a),g=c.length-1,d}var f,g;return d.domain=function(c){return arguments.length?(a=+c[0],b=+c[c.length-1],e()):[a,b]},d.range=function(a){return arguments.length?(c=a,e()):c},d.copy=function(){return Yb(a,b,c)},e()}function Zb(a,b){function c(c){return b[d3.bisect(a,c)]}return c.domain=function(b){return arguments.length?(a=b,c):a},c.range=function(a){return arguments.length?(b=a,c):b},c.copy=function(){return Zb(a,b)},c}function $b(a){function b(a){return+a}return b.invert=b,b.domain=b.range=function(c){return arguments.length?(a=c.map(b),b):a},b.ticks=function(b){return Nb(a,b)},b.tickFormat=function(b){return Ob(a,b)},b.copy=function(){return $b(a)},b}function _b(a){return a.innerRadius}function ac(a){return a.outerRadius}function bc(a){return a.startAngle}function cc(a){return a.endAngle}function dc(a){function b(b){function g(){k.push("M",f(a(l),j))}for(var i,k=[],l=[],m=-1,n=b.length,o=h(c),p=h(d);++m<n;)e.call(this,i=b[m],m)?l.push([+o.call(this,i,m),+p.call(this,i,m)]):l.length&&(g(),l=[]);return l.length&&g(),k.length?k.join(""):null}var c=ec,d=fc,e=g,f=gc,i=f.key,j=.7;return b.x=function(a){return arguments.length?(c=a,b):c},b.y=function(a){return arguments.length?(d=a,b):d},b.defined=function(a){return arguments.length?(e=a,b):e},b.interpolate=function(a){return arguments.length?(i="function"==typeof a?f=a:(f=Zf.get(a)||gc).key,b):i},b.tension=function(a){return arguments.length?(j=a,b):j},b}function ec(a){return a[0]}function fc(a){return a[1]}function gc(a){return a.join("L")}function hc(a){return gc(a)+"Z"}function ic(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("V",(d=a[b])[1],"H",d[0]);return e.join("")}function jc(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("H",(d=a[b])[0],"V",d[1]);return e.join("")}function kc(a,b){return a.length<4?gc(a):a[1]+nc(a.slice(1,a.length-1),oc(a,b))}function lc(a,b){return a.length<3?gc(a):a[0]+nc((a.push(a[0]),a),oc([a[a.length-2]].concat(a,[a[1]]),b))}function mc(a,b){return a.length<3?gc(a):a[0]+nc(a,oc(a,b))}function nc(a,b){if(b.length<1||a.length!=b.length&&a.length!=b.length+2)return gc(a);var c=a.length!=b.length,d="",e=a[0],f=a[1],g=b[0],h=g,i=1;if(c&&(d+="Q"+(f[0]-2*g[0]/3)+","+(f[1]-2*g[1]/3)+","+f[0]+","+f[1],e=a[1],i=2),b.length>1){h=b[1],f=a[i],i++,d+="C"+(e[0]+g[0])+","+(e[1]+g[1])+","+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1];for(var j=2;j<b.length;j++,i++)f=a[i],h=b[j],d+="S"+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1]}if(c){var k=a[i];d+="Q"+(f[0]+2*h[0]/3)+","+(f[1]+2*h[1]/3)+","+k[0]+","+k[1]}return d}function oc(a,b){for(var c,d=[],e=(1-b)/2,f=a[0],g=a[1],h=1,i=a.length;++h<i;)c=f,f=g,g=a[h],d.push([e*(g[0]-c[0]),e*(g[1]-c[1])]);return d}function pc(a){if(a.length<3)return gc(a);var b=1,c=a.length,d=a[0],e=d[0],f=d[1],g=[e,e,e,(d=a[1])[0]],h=[f,f,f,d[1]],i=[e,",",f];for(uc(i,g,h);++b<c;)d=a[b],g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),uc(i,g,h);for(b=-1;++b<2;)g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),uc(i,g,h);return i.join("")}function qc(a){if(a.length<4)return gc(a);for(var b,c=[],d=-1,e=a.length,f=[0],g=[0];++d<3;)b=a[d],f.push(b[0]),g.push(b[1]);for(c.push(tc(ag,f)+","+tc(ag,g)),--d;++d<e;)b=a[d],f.shift(),f.push(b[0]),g.shift(),g.push(b[1]),uc(c,f,g);return c.join("")}function rc(a){for(var b,c,d=-1,e=a.length,f=e+4,g=[],h=[];++d<4;)c=a[d%e],g.push(c[0]),h.push(c[1]);for(b=[tc(ag,g),",",tc(ag,h)],--d;++d<f;)c=a[d%e],g.shift(),g.push(c[0]),h.shift(),h.push(c[1]),uc(b,g,h);return b.join("")}function sc(a,b){var c=a.length-1;if(c)for(var d,e,f=a[0][0],g=a[0][1],h=a[c][0]-f,i=a[c][1]-g,j=-1;++j<=c;)d=a[j],e=j/c,d[0]=b*d[0]+(1-b)*(f+e*h),d[1]=b*d[1]+(1-b)*(g+e*i);return pc(a)}function tc(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function uc(a,b,c){a.push("C",tc($f,b),",",tc($f,c),",",tc(_f,b),",",tc(_f,c),",",tc(ag,b),",",tc(ag,c))}function vc(a,b){return(b[1]-a[1])/(b[0]-a[0])}function wc(a){for(var b=0,c=a.length-1,d=[],e=a[0],f=a[1],g=d[0]=vc(e,f);++b<c;)d[b]=(g+(g=vc(e=f,f=a[b+1])))/2;return d[b]=g,d}function xc(a){for(var b,c,d,e,f=[],g=wc(a),h=-1,i=a.length-1;++h<i;)b=vc(a[h],a[h+1]),Math.abs(b)<1e-6?g[h]=g[h+1]=0:(c=g[h]/b,d=g[h+1]/b,e=c*c+d*d,e>9&&(e=3*b/Math.sqrt(e),g[h]=e*c,g[h+1]=e*d));for(h=-1;++h<=i;)e=(a[Math.min(i,h+1)][0]-a[Math.max(0,h-1)][0])/(6*(1+g[h]*g[h])),f.push([e||0,g[h]*e||0]);return f}function yc(a){return a.length<3?gc(a):a[0]+nc(a,xc(a))}function zc(a){for(var b,c,d,e=-1,f=a.length;++e<f;)b=a[e],c=b[0],d=b[1]+Xf,b[0]=c*Math.cos(d),b[1]=c*Math.sin(d);return a}function Ac(a){function b(b){function g(){q.push("M",j(a(s),n),m,l(a(r.reverse()),n),"Z")}for(var k,o,p,q=[],r=[],s=[],t=-1,u=b.length,v=h(c),w=h(e),x=c===d?function(){return o}:h(d),y=e===f?function(){return p}:h(f);++t<u;)i.call(this,k=b[t],t)?(r.push([o=+v.call(this,k,t),p=+w.call(this,k,t)]),s.push([+x.call(this,k,t),+y.call(this,k,t)])):r.length&&(g(),r=[],s=[]);return r.length&&g(),q.length?q.join(""):null}var c=ec,d=ec,e=0,f=fc,i=g,j=gc,k=j.key,l=j,m="L",n=.7;return b.x=function(a){return arguments.length?(c=d=a,b):d},b.x0=function(a){return arguments.length?(c=a,b):c},b.x1=function(a){return arguments.length?(d=a,b):d},b.y=function(a){return arguments.length?(e=f=a,b):f},b.y0=function(a){return arguments.length?(e=a,b):e},b.y1=function(a){return arguments.length?(f=a,b):f},b.defined=function(a){return arguments.length?(i=a,b):i},b.interpolate=function(a){return arguments.length?(k="function"==typeof a?j=a:(j=Zf.get(a)||gc).key,l=j.reverse||j,m=j.closed?"M":"L",b):k},b.tension=function(a){return arguments.length?(n=a,b):n},b}function Bc(a){return a.source}function Cc(a){return a.target}function Dc(a){return a.radius}function Ec(a){return[a.x,a.y]}function Fc(a){return function(){var b=a.apply(this,arguments),c=b[0],d=b[1]+Xf;return[c*Math.cos(d),c*Math.sin(d)]}}function Gc(){return 64}function Hc(){return"circle"}function Ic(a){var b=Math.sqrt(a/Math.PI);return"M0,"+b+"A"+b+","+b+" 0 1,1 0,"+-b+"A"+b+","+b+" 0 1,1 0,"+b+"Z"}function Jc(a,b){a.attr("transform",function(a){return"translate("+b(a)+",0)"})}function Kc(a,b){a.attr("transform",function(a){return"translate(0,"+b(a)+")"})}function Lc(a,b,c){if(d=[],c&&b.length>1){for(var d,e,f,g=Fb(a.domain()),h=-1,i=b.length,j=(b[1]-b[0])/++c;++h<i;)for(e=c;--e>0;)(f=+b[h]-e*j)>=g[0]&&d.push(f);for(--h,e=0;++e<c&&(f=+b[h]+e*j)<g[1];)d.push(f)}return d}function Mc(){gg||(gg=d3.select("body").append("div").style("visibility","hidden").style("top",0).style("height",0).style("width",0).style("overflow-y","scroll").append("div").style("height","2000px").node().parentNode);var a,b=d3.event;try{gg.scrollTop=1e3,gg.dispatchEvent(b),a=1e3-gg.scrollTop}catch(c){a=b.wheelDelta||5*-b.detail}return a}function Nc(a){for(var b=a.source,c=a.target,d=Pc(b,c),e=[b];b!==d;)b=b.parent,e.push(b);for(var f=e.length;c!==d;)e.splice(f,0,c),c=c.parent;return e}function Oc(a){for(var b=[],c=a.parent;null!=c;)b.push(a),a=c,c=c.parent;return b.push(a),b}function Pc(a,b){if(a===b)return a;for(var c=Oc(a),d=Oc(b),e=c.pop(),f=d.pop(),g=null;e===f;)g=e,e=c.pop(),f=d.pop();return g}function Qc(a){a.fixed|=2}function Rc(a){a.fixed&=1}function Sc(a){a.fixed|=4}function Tc(a){a.fixed&=3}function Uc(a,b,c){var d=0,e=0;if(a.charge=0,!a.leaf)for(var f,g=a.nodes,h=g.length,i=-1;++i<h;)f=g[i],null!=f&&(Uc(f,b,c),a.charge+=f.charge,d+=f.charge*f.cx,e+=f.charge*f.cy);if(a.point){a.leaf||(a.point.x+=Math.random()-.5,a.point.y+=Math.random()-.5);var j=b*c[a.point.index];a.charge+=a.pointCharge=j,d+=j*a.point.x,e+=j*a.point.y}a.cx=d/a.charge,a.cy=e/a.charge}function Vc(){return 20}function Wc(){return 1}function Xc(a){return a.x}function Yc(a){return a.y}function Zc(a,b,c){a.y0=b,a.y=c}function $c(a){return d3.range(a.length)}function _c(a){for(var b=-1,c=a[0].length,d=[];++b<c;)d[b]=0;return d}function ad(a){for(var b,c=1,d=0,e=a[0][1],f=a.length;f>c;++c)(b=a[c][1])>e&&(d=c,e=b);return d}function bd(a){return a.reduce(cd,0)}function cd(a,b){return a+b[1]}function dd(a,b){return ed(a,Math.ceil(Math.log(b.length)/Math.LN2+1))}function ed(a,b){for(var c=-1,d=+a[0],e=(a[1]-d)/b,f=[];++c<=b;)f[c]=e*c+d;return f}function fd(a){return[d3.min(a),d3.max(a)]}function gd(a,b){return d3.rebind(a,b,"sort","children","value"),a.links=kd,a.nodes=function(b){return lg=!0,(a.nodes=a)(b)},a}function hd(a){return a.children}function id(a){return a.value}function jd(a,b){return b.value-a.value}function kd(a){return d3.merge(a.map(function(a){return(a.children||[]).map(function(b){return{source:a,target:b}})}))}function ld(a,b){return a.value-b.value}function md(a,b){var c=a._pack_next;a._pack_next=b,b._pack_prev=a,b._pack_next=c,c._pack_prev=b}function nd(a,b){a._pack_next=b,b._pack_prev=a}function od(a,b){var c=b.x-a.x,d=b.y-a.y,e=a.r+b.r;return e*e-c*c-d*d>.001}function pd(a){function b(a){k=Math.min(a.x-a.r,k),l=Math.max(a.x+a.r,l),m=Math.min(a.y-a.r,m),n=Math.max(a.y+a.r,n)}if((c=a.children)&&(j=c.length)){var c,d,e,f,g,h,i,j,k=1/0,l=-1/0,m=1/0,n=-1/0;if(c.forEach(qd),d=c[0],d.x=-d.r,d.y=0,b(d),j>1&&(e=c[1],e.x=e.r,e.y=0,b(e),j>2))for(f=c[2],td(d,e,f),b(f),md(d,f),d._pack_prev=f,md(f,e),e=d._pack_next,g=3;j>g;g++){td(d,e,f=c[g]);var o=0,p=1,q=1;for(h=e._pack_next;h!==e;h=h._pack_next,p++)if(od(h,f)){o=1;break}if(1==o)for(i=d._pack_prev;i!==h._pack_prev&&!od(i,f);i=i._pack_prev,q++);o?(q>p||p==q&&e.r<d.r?nd(d,e=h):nd(d=i,e),g--):(md(d,f),e=f,b(f))}var r=(k+l)/2,s=(m+n)/2,t=0;for(g=0;j>g;g++)f=c[g],f.x-=r,f.y-=s,t=Math.max(t,f.r+Math.sqrt(f.x*f.x+f.y*f.y));a.r=t,c.forEach(rd)}}function qd(a){a._pack_next=a._pack_prev=a}function rd(a){delete a._pack_next,delete a._pack_prev}function sd(a,b,c,d){var e=a.children;if(a.x=b+=d*a.x,a.y=c+=d*a.y,a.r*=d,e)for(var f=-1,g=e.length;++f<g;)sd(e[f],b,c,d)}function td(a,b,c){var d=a.r+c.r,e=b.x-a.x,f=b.y-a.y;if(d&&(e||f)){var g=b.r+c.r,h=e*e+f*f;g*=g,d*=d;var i=.5+(d-g)/(2*h),j=Math.sqrt(Math.max(0,2*g*(d+h)-(d-=h)*d-g*g))/(2*h);c.x=a.x+i*e+j*f,c.y=a.y+i*f-j*e}else c.x=a.x+d,c.y=a.y}function ud(a){return 1+d3.max(a,function(a){return a.y})}function vd(a){return a.reduce(function(a,b){return a+b.x},0)/a.length}function wd(a){var b=a.children;return b&&b.length?wd(b[0]):a}function xd(a){var b,c=a.children;return c&&(b=c.length)?xd(c[b-1]):a}function yd(a,b){return a.parent==b.parent?1:2}function zd(a){var b=a.children;return b&&b.length?b[0]:a._tree.thread}function Ad(a){var b,c=a.children;return c&&(b=c.length)?c[b-1]:a._tree.thread}function Bd(a,b){var c=a.children;if(c&&(e=c.length))for(var d,e,f=-1;++f<e;)b(d=Bd(c[f],b),a)>0&&(a=d);return a}function Cd(a,b){return a.x-b.x}function Dd(a,b){return b.x-a.x}function Ed(a,b){return a.depth-b.depth}function Fd(a,b){function c(a,d){var e=a.children;if(e&&(g=e.length))for(var f,g,h=null,i=-1;++i<g;)f=e[i],c(f,h),h=f;b(a,d)}c(a,null)}function Gd(a){for(var b,c=0,d=0,e=a.children,f=e.length;--f>=0;)b=e[f]._tree,b.prelim+=c,b.mod+=c,c+=b.shift+(d+=b.change)}function Hd(a,b,c){a=a._tree,b=b._tree;var d=c/(b.number-a.number);a.change+=d,b.change-=d,b.shift+=c,b.prelim+=c,b.mod+=c}function Id(a,b,c){return a._tree.ancestor.parent==b.parent?a._tree.ancestor:c}function Jd(a){return{x:a.x,y:a.y,dx:a.dx,dy:a.dy}}function Kd(a,b){var c=a.x+b[3],d=a.y+b[0],e=a.dx-b[1]-b[3],f=a.dy-b[0]-b[2];return 0>e&&(c+=e/2,e=0),0>f&&(d+=f/2,f=0),{x:c,y:d,dx:e,dy:f}}function Ld(a,b){function c(a,d){d3.text(a,b,function(a){d(a&&c.parse(a))})}function d(b){return b.map(e).join(a)}function e(a){return g.test(a)?'"'+a.replace(/\"/g,'""')+'"':a}var f=new RegExp("\r\n|["+a+"\r\n]","g"),g=new RegExp('["'+a+"\n]"),h=a.charCodeAt(0);return c.parse=function(a){var b;return c.parseRows(a,function(a,c){if(c){for(var d={},e=-1,f=b.length;++e<f;)d[b[e]]=a[e];return d}return b=a,null})},c.parseRows=function(a,b){function c(){if(f.lastIndex>=a.length)return i;if(e)return e=!1,g;var b=f.lastIndex;if(34===a.charCodeAt(b)){for(var c=b;c++<a.length;)if(34===a.charCodeAt(c)){if(34!==a.charCodeAt(c+1))break;c++}f.lastIndex=c+2;var d=a.charCodeAt(c+1);return 13===d?(e=!0,10===a.charCodeAt(c+2)&&f.lastIndex++):10===d&&(e=!0),a.substring(b+1,c).replace(/""/g,'"')}var j=f.exec(a);return j?(e=j[0].charCodeAt(0)!==h,a.substring(b,j.index)):(f.lastIndex=a.length,a.substring(b))}var d,e,g={},i={},j=[],k=0;for(f.lastIndex=0;(d=c())!==i;){for(var l=[];d!==g&&d!==i;)l.push(d),d=c();(!b||(l=b(l,k++)))&&j.push(l)}return j},c.format=function(a){return a.map(d).join("\n")},c}function Md(a,b){return function(c){return c&&a.hasOwnProperty(c.type)?a[c.type](c):b}}function Nd(a){return"m0,"+a+"a"+a+","+a+" 0 1,1 0,"+-2*a+"a"+a+","+a+" 0 1,1 0,"+2*a+"z"}function Od(a,b){ng.hasOwnProperty(a.type)&&ng[a.type](a,b)}function Pd(a,b){Od(a.geometry,b)}function Qd(a,b){for(var c=a.features,d=0,e=c.length;e>d;d++)Od(c[d].geometry,b)}function Rd(a,b){for(var c=a.geometries,d=0,e=c.length;e>d;d++)Od(c[d],b)}function Sd(a,b){for(var c=a.coordinates,d=0,e=c.length;e>d;d++)b.apply(null,c[d])}function Td(a,b){for(var c=a.coordinates,d=0,e=c.length;e>d;d++)for(var f=c[d],g=0,h=f.length;h>g;g++)b.apply(null,f[g])}function Ud(a,b){for(var c=a.coordinates,d=0,e=c.length;e>d;d++)for(var f=c[d][0],g=0,h=f.length;h>g;g++)b.apply(null,f[g])}function Vd(a,b){b.apply(null,a.coordinates)}function Wd(a,b){for(var c=a.coordinates[0],d=0,e=c.length;e>d;d++)b.apply(null,c[d])}function Xd(a){return a.source}function Yd(a){return a.target}function Zd(){function a(a){var b=Math.sin(a*=n)*o,c=Math.sin(n-a)*o,d=c*f+b*l,h=c*g+b*m,i=c*e+b*k;return[Math.atan2(h,d)/mg,Math.atan2(i,Math.sqrt(d*d+h*h))/mg]}var b,c,d,e,f,g,h,i,j,k,l,m,n,o;return a.distance=function(){return null==n&&(o=1/Math.sin(n=Math.acos(Math.max(-1,Math.min(1,e*k+d*j*Math.cos(h-b)))))),n},a.source=function(h){var i=Math.cos(b=h[0]*mg),j=Math.sin(b);return d=Math.cos(c=h[1]*mg),e=Math.sin(c),f=d*i,g=d*j,n=null,a},a.target=function(b){var c=Math.cos(h=b[0]*mg),d=Math.sin(h);return j=Math.cos(i=b[1]*mg),k=Math.sin(i),l=j*c,m=j*d,n=null,a},a}function $d(a,b){var c=Zd().source(a).target(b);return c.distance(),c}function _d(a){for(var b=0,c=0;;){if(a(b,c))return[b,c];0===b?(b=c+1,c=0):(b-=1,c+=1)}}function ae(a,b,c,d){var e,f,g,h,i,j,k;return e=d[a],f=e[0],g=e[1],e=d[b],h=e[0],i=e[1],e=d[c],j=e[0],k=e[1],(k-g)*(h-f)-(i-g)*(j-f)>0}function be(a,b,c){return(c[0]-b[0])*(a[1]-b[1])<(c[1]-b[1])*(a[0]-b[0])}function ce(a,b,c,d){var e=a[0],f=b[0],g=c[0],h=d[0],i=a[1],j=b[1],k=c[1],l=d[1],m=e-g,n=f-e,o=h-g,p=i-k,q=j-i,r=l-k,s=(o*p-r*m)/(r*n-o*q);return[e+s*n,i+s*q]}function de(a,b){var c={list:a.map(function(a,b){return{index:b,x:a[0],y:a[1]}}).sort(function(a,b){return a.y<b.y?-1:a.y>b.y?1:a.x<b.x?-1:a.x>b.x?1:0}),bottomSite:null},d={list:[],leftEnd:null,rightEnd:null,init:function(){d.leftEnd=d.createHalfEdge(null,"l"),d.rightEnd=d.createHalfEdge(null,"l"),d.leftEnd.r=d.rightEnd,d.rightEnd.l=d.leftEnd,d.list.unshift(d.leftEnd,d.rightEnd)},createHalfEdge:function(a,b){return{edge:a,side:b,vertex:null,l:null,r:null}},insert:function(a,b){b.l=a,b.r=a.r,a.r.l=b,a.r=b},leftBound:function(a){var b=d.leftEnd;do b=b.r;while(b!=d.rightEnd&&e.rightOf(b,a));return b=b.l},del:function(a){a.l.r=a.r,a.r.l=a.l,a.edge=null},right:function(a){return a.r},left:function(a){return a.l},leftRegion:function(a){return null==a.edge?c.bottomSite:a.edge.region[a.side]},rightRegion:function(a){return null==a.edge?c.bottomSite:a.edge.region[qg[a.side]]}},e={bisect:function(a,b){var c={region:{l:a,r:b},ep:{l:null,r:null}},d=b.x-a.x,e=b.y-a.y,f=d>0?d:-d,g=e>0?e:-e;return c.c=a.x*d+a.y*e+.5*(d*d+e*e),f>g?(c.a=1,c.b=e/d,c.c/=d):(c.b=1,c.a=d/e,c.c/=e),c},intersect:function(a,b){var c=a.edge,d=b.edge;if(!c||!d||c.region.r==d.region.r)return null;var e=c.a*d.b-c.b*d.a;if(Math.abs(e)<1e-10)return null;var f,g,h=(c.c*d.b-d.c*c.b)/e,i=(d.c*c.a-c.c*d.a)/e,j=c.region.r,k=d.region.r;j.y<k.y||j.y==k.y&&j.x<k.x?(f=a,g=c):(f=b,g=d);var l=h>=g.region.r.x;return l&&"l"===f.side||!l&&"r"===f.side?null:{x:h,y:i}},rightOf:function(a,b){var c=a.edge,d=c.region.r,e=b.x>d.x;if(e&&"l"===a.side)return 1;if(!e&&"r"===a.side)return 0;if(1===c.a){var f=b.y-d.y,g=b.x-d.x,h=0,i=0;if(!e&&c.b<0||e&&c.b>=0?i=h=f>=c.b*g:(i=b.x+b.y*c.b>c.c,c.b<0&&(i=!i),i||(h=1)),!h){var j=d.x-c.region.l.x;i=c.b*(g*g-f*f)<j*f*(1+2*g/j+c.b*c.b),c.b<0&&(i=!i)}}else{var k=c.c-c.a*b.x,l=b.y-k,m=b.x-d.x,n=k-d.y;i=l*l>m*m+n*n}return"l"===a.side?i:!i},endPoint:function(a,c,d){a.ep[c]=d,a.ep[qg[c]]&&b(a)},distance:function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}},f={list:[],insert:function(a,b,c){a.vertex=b,a.ystar=b.y+c;for(var d=0,e=f.list,g=e.length;g>d;d++){var h=e[d];if(!(a.ystar>h.ystar||a.ystar==h.ystar&&b.x>h.vertex.x))break}e.splice(d,0,a)},del:function(a){for(var b=0,c=f.list,d=c.length;d>b&&c[b]!=a;++b);c.splice(b,1)},empty:function(){return 0===f.list.length},nextEvent:function(a){for(var b=0,c=f.list,d=c.length;d>b;++b)if(c[b]==a)return c[b+1];return null},min:function(){var a=f.list[0];return{x:a.vertex.x,y:a.ystar}},extractMin:function(){return f.list.shift()}};d.init(),c.bottomSite=c.list.shift();for(var g,h,i,j,k,l,m,n,o,p,q,r,s,t=c.list.shift();;)if(f.empty()||(g=f.min()),t&&(f.empty()||t.y<g.y||t.y==g.y&&t.x<g.x))h=d.leftBound(t),i=d.right(h),m=d.rightRegion(h),r=e.bisect(m,t),l=d.createHalfEdge(r,"l"),d.insert(h,l),p=e.intersect(h,l),p&&(f.del(h),f.insert(h,p,e.distance(p,t))),h=l,l=d.createHalfEdge(r,"r"),d.insert(h,l),p=e.intersect(l,i),p&&f.insert(l,p,e.distance(p,t)),t=c.list.shift();else{if(f.empty())break;h=f.extractMin(),j=d.left(h),i=d.right(h),k=d.right(i),m=d.leftRegion(h),n=d.rightRegion(i),q=h.vertex,e.endPoint(h.edge,h.side,q),e.endPoint(i.edge,i.side,q),d.del(h),f.del(i),d.del(i),s="l",m.y>n.y&&(o=m,m=n,n=o,s="r"),r=e.bisect(m,n),l=d.createHalfEdge(r,s),d.insert(j,l),e.endPoint(r,qg[s],q),p=e.intersect(j,l),p&&(f.del(j),f.insert(j,p,e.distance(p,m))),p=e.intersect(l,k),p&&f.insert(l,p,e.distance(p,m))}for(h=d.right(d.leftEnd);h!=d.rightEnd;h=d.right(h))b(h.edge)}function ee(){return{leaf:!0,nodes:[],point:null}}function fe(a,b,c,d,e,f){if(!a(b,c,d,e,f)){var g=.5*(c+e),h=.5*(d+f),i=b.nodes;i[0]&&fe(a,i[0],c,d,g,h),i[1]&&fe(a,i[1],g,d,e,h),i[2]&&fe(a,i[2],c,h,g,f),i[3]&&fe(a,i[3],g,h,e,f)}}function ge(a){return{x:a[0],y:a[1]}}function he(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function ie(a){return a.substring(0,3)}function je(a,b,c,d){for(var e,f,g=0,h=b.length,i=c.length;h>g;){if(d>=i)return-1;if(e=b.charCodeAt(g++),37==e){if(f=Mg[b.charAt(g++)],!f||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}function ke(a){return new RegExp("^(?:"+a.map(d3.requote).join("|")+")","i")}function le(a){for(var b=new d,c=-1,e=a.length;++c<e;)b.set(a[c].toLowerCase(),c);return b}function me(a,b,c){Gg.lastIndex=0;var d=Gg.exec(b.substring(c));return d?c+=d[0].length:-1}function ne(a,b,c){Fg.lastIndex=0;var d=Fg.exec(b.substring(c));return d?c+=d[0].length:-1}function oe(a,b,c){Jg.lastIndex=0;var d=Jg.exec(b.substring(c));return d?(a.m=Kg.get(d[0].toLowerCase()),c+=d[0].length):-1}function pe(a,b,c){Hg.lastIndex=0;var d=Hg.exec(b.substring(c));return d?(a.m=Ig.get(d[0].toLowerCase()),c+=d[0].length):-1}function qe(a,b,c){return je(a,Lg.c.toString(),b,c)}function re(a,b,c){return je(a,Lg.x.toString(),b,c)}function se(a,b,c){return je(a,Lg.X.toString(),b,c)}function te(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+4));return d?(a.y=+d[0],c+=d[0].length):-1}function ue(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.y=ve(+d[0]),c+=d[0].length):-1}function ve(a){return a+(a>68?1900:2e3)}function we(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.m=d[0]-1,c+=d[0].length):-1}function xe(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.d=+d[0],c+=d[0].length):-1}function ye(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.H=+d[0],c+=d[0].length):-1}function ze(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.M=+d[0],c+=d[0].length):-1}function Ae(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.S=+d[0],c+=d[0].length):-1}function Be(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+3));return d?(a.L=+d[0],c+=d[0].length):-1}function Ce(a,b,c){var d=Og.get(b.substring(c,c+=2).toLowerCase());return null==d?-1:(a.p=d,c)}function De(a){var b=a.getTimezoneOffset(),c=b>0?"-":"+",d=~~(Math.abs(b)/60),e=Math.abs(b)%60;return c+Bg(d)+Bg(e)}function Ee(a){return a.toISOString()}function Fe(a,b,c){function d(b){var c=a(b),d=f(c,1);return d-b>b-c?c:d}function e(c){return b(c=a(new rg(c-1)),1),c}function f(a,c){return b(a=new rg(+a),c),a}function g(a,d,f){var g=e(a),h=[];if(f>1)for(;d>g;)c(g)%f||h.push(new Date(+g)),b(g,1);else for(;d>g;)h.push(new Date(+g)),b(g,1);return h}function h(a,b,c){try{rg=he;var d=new he;return d._=a,g(d,b,c)}finally{rg=Date}}a.floor=a,a.round=d,a.ceil=e,a.offset=f,a.range=g;var i=a.utc=Ge(a);return i.floor=i,i.round=Ge(d),i.ceil=Ge(e),i.offset=Ge(f),i.range=h,a}function Ge(a){return function(b,c){try{rg=he;var d=new he;return d._=b,a(d,c)._}finally{rg=Date}}}function He(a,b,c){function d(b){return a(b)}return d.invert=function(b){return Je(a.invert(b))},d.domain=function(b){return arguments.length?(a.domain(b),d):a.domain().map(Je)},d.nice=function(a){return d.domain(Hb(d.domain(),function(){return a}))},d.ticks=function(c,e){var f=Ie(d.domain());if("function"!=typeof c){var g=f[1]-f[0],h=g/c,i=d3.bisect(Qg,h);if(i==Qg.length)return b.year(f,c);if(!i)return a.ticks(c).map(Je);Math.log(h/Qg[i-1])<Math.log(Qg[i]/h)&&--i,c=b[i],e=c[1],c=c[0].range}return c(f[0],new Date(+f[1]+1),e)},d.tickFormat=function(){return c},d.copy=function(){return He(a.copy(),b,c)},d3.rebind(d,a,"range","rangeRound","interpolate","clamp")}function Ie(a){var b=a[0],c=a[a.length-1];return c>b?[b,c]:[c,b]}function Je(a){return new Date(a)}function Ke(a){return function(b){for(var c=a.length-1,d=a[c];!d[1](b);)d=a[--c];return d[0](b)}}function Le(a){var b=new Date(a,0,1);return b.setFullYear(a),b}function Me(a){var b=a.getFullYear(),c=Le(b),d=Le(b+1);return b+(a-c)/(d-c)}function Ne(a){var b=new Date(Date.UTC(a,0,1));return b.setUTCFullYear(a),b}function Oe(a){var b=a.getUTCFullYear(),c=Ne(b),d=Ne(b+1);return b+(a-c)/(d-c)}Date.now||(Date.now=function(){return+new Date});try{document.createElement("div").style.setProperty("opacity",0,"")}catch(Pe){var Qe=CSSStyleDeclaration.prototype,Re=Qe.setProperty;Qe.setProperty=function(a,b,c){Re.call(this,a,b+"",c)}}d3={version:"2.10.3"};var Se=c;try{Se(document.documentElement.childNodes)[0].nodeType}catch(Te){Se=b}var Ue=[].__proto__?function(a,b){a.__proto__=b}:function(a,b){for(var c in b)a[c]=b[c]};d3.map=function(a){var b=new d;for(var c in a)b.set(c,a[c]);return b},a(d,{has:function(a){return Ve+a in this},get:function(a){return this[Ve+a]},set:function(a,b){return this[Ve+a]=b},remove:function(a){return a=Ve+a,a in this&&delete this[a]},keys:function(){var a=[];return this.forEach(function(b){a.push(b)}),a},values:function(){var a=[];
-return this.forEach(function(b,c){a.push(c)}),a},entries:function(){var a=[];return this.forEach(function(b,c){a.push({key:b,value:c})}),a},forEach:function(a){for(var b in this)b.charCodeAt(0)===We&&a.call(this,b.substring(1),this[b])}});var Ve="\x00",We=Ve.charCodeAt(0);d3.functor=h,d3.rebind=function(a,b){for(var c,d=1,e=arguments.length;++d<e;)a[c=arguments[d]]=i(a,b,b[c]);return a},d3.ascending=function(a,b){return b>a?-1:a>b?1:a>=b?0:0/0},d3.descending=function(a,b){return a>b?-1:b>a?1:b>=a?0:0/0},d3.mean=function(a,b){var c,d=a.length,e=0,f=-1,g=0;if(1===arguments.length)for(;++f<d;)j(c=a[f])&&(e+=(c-e)/++g);else for(;++f<d;)j(c=b.call(a,a[f],f))&&(e+=(c-e)/++g);return g?e:void 0},d3.median=function(a,b){return arguments.length>1&&(a=a.map(b)),a=a.filter(j),a.length?d3.quantile(a.sort(d3.ascending),.5):void 0},d3.min=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e<f&&(null==(c=a[e])||c!=c);)c=void 0;for(;++e<f;)null!=(d=a[e])&&c>d&&(c=d)}else{for(;++e<f&&(null==(c=b.call(a,a[e],e))||c!=c);)c=void 0;for(;++e<f;)null!=(d=b.call(a,a[e],e))&&c>d&&(c=d)}return c},d3.max=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e<f&&(null==(c=a[e])||c!=c);)c=void 0;for(;++e<f;)null!=(d=a[e])&&d>c&&(c=d)}else{for(;++e<f&&(null==(c=b.call(a,a[e],e))||c!=c);)c=void 0;for(;++e<f;)null!=(d=b.call(a,a[e],e))&&d>c&&(c=d)}return c},d3.extent=function(a,b){var c,d,e,f=-1,g=a.length;if(1===arguments.length){for(;++f<g&&(null==(c=e=a[f])||c!=c);)c=e=void 0;for(;++f<g;)null!=(d=a[f])&&(c>d&&(c=d),d>e&&(e=d))}else{for(;++f<g&&(null==(c=e=b.call(a,a[f],f))||c!=c);)c=void 0;for(;++f<g;)null!=(d=b.call(a,a[f],f))&&(c>d&&(c=d),d>e&&(e=d))}return[c,e]},d3.random={normal:function(a,b){var c=arguments.length;return 2>c&&(b=1),1>c&&(a=0),function(){var c,d,e;do c=2*Math.random()-1,d=2*Math.random()-1,e=c*c+d*d;while(!e||e>1);return a+b*c*Math.sqrt(-2*Math.log(e)/e)}},logNormal:function(a,b){var c=arguments.length;2>c&&(b=1),1>c&&(a=0);var d=d3.random.normal();return function(){return Math.exp(a+b*d())}},irwinHall:function(a){return function(){for(var b=0,c=0;a>c;c++)b+=Math.random();return b/a}}},d3.sum=function(a,b){var c,d=0,e=a.length,f=-1;if(1===arguments.length)for(;++f<e;)isNaN(c=+a[f])||(d+=c);else for(;++f<e;)isNaN(c=+b.call(a,a[f],f))||(d+=c);return d},d3.quantile=function(a,b){var c=(a.length-1)*b+1,d=Math.floor(c),e=a[d-1],f=c-d;return f?e+f*(a[d]-e):e},d3.transpose=function(a){return d3.zip.apply(d3,a)},d3.zip=function(){if(!(d=arguments.length))return[];for(var a=-1,b=d3.min(arguments,k),c=new Array(b);++a<b;)for(var d,e=-1,f=c[a]=new Array(d);++e<d;)f[e]=arguments[e][a];return c},d3.bisector=function(a){return{left:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);e>d;){var f=d+e>>>1;a.call(b,b[f],f)<c?d=f+1:e=f}return d},right:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);e>d;){var f=d+e>>>1;c<a.call(b,b[f],f)?e=f:d=f+1}return d}}};var Xe=d3.bisector(function(a){return a});d3.bisectLeft=Xe.left,d3.bisect=d3.bisectRight=Xe.right,d3.first=function(a,b){var c,d=0,e=a.length,f=a[0];for(1===arguments.length&&(b=d3.ascending);++d<e;)b.call(a,f,c=a[d])>0&&(f=c);return f},d3.last=function(a,b){var c,d=0,e=a.length,f=a[0];for(1===arguments.length&&(b=d3.ascending);++d<e;)b.call(a,f,c=a[d])<=0&&(f=c);return f},d3.nest=function(){function a(b,h){if(h>=g.length)return e?e.call(f,b):c?b.sort(c):b;for(var i,j,k,l=-1,m=b.length,n=g[h++],o=new d,p={};++l<m;)(k=o.get(i=n(j=b[l])))?k.push(j):o.set(i,[j]);return o.forEach(function(b,c){p[b]=a(c,h)}),p}function b(a,c){if(c>=g.length)return a;var d,e=[],f=h[c++];for(d in a)e.push({key:d,values:b(a[d],c)});return f&&e.sort(function(a,b){return f(a.key,b.key)}),e}var c,e,f={},g=[],h=[];return f.map=function(b){return a(b,0)},f.entries=function(c){return b(a(c,0),0)},f.key=function(a){return g.push(a),f},f.sortKeys=function(a){return h[g.length-1]=a,f},f.sortValues=function(a){return c=a,f},f.rollup=function(a){return e=a,f},f},d3.keys=function(a){var b=[];for(var c in a)b.push(c);return b},d3.values=function(a){var b=[];for(var c in a)b.push(a[c]);return b},d3.entries=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b},d3.permute=function(a,b){for(var c=[],d=-1,e=b.length;++d<e;)c[d]=a[b[d]];return c},d3.merge=function(a){return Array.prototype.concat.apply([],a)},d3.split=function(a,b){var c,d=[],e=[],f=-1,g=a.length;for(arguments.length<2&&(b=l);++f<g;)b.call(e,c=a[f],f)?e=[]:(e.length||d.push(e),e.push(c));return d},d3.range=function(a,b,c){if(arguments.length<3&&(c=1,arguments.length<2&&(b=a,a=0)),(b-a)/c===1/0)throw new Error("infinite range");var d,e=[],f=n(Math.abs(c)),g=-1;if(a*=f,b*=f,c*=f,0>c)for(;(d=a+c*++g)>b;)e.push(d/f);else for(;(d=a+c*++g)<b;)e.push(d/f);return e},d3.requote=function(a){return a.replace(Ye,"\\$&")};var Ye=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;d3.round=function(a,b){return b?Math.round(a*(b=Math.pow(10,b)))/b:Math.round(a)},d3.xhr=function(a,b,c){var d=new XMLHttpRequest;arguments.length<3?(c=b,b=null):b&&d.overrideMimeType&&d.overrideMimeType(b),d.open("GET",a,!0),b&&d.setRequestHeader("Accept",b),d.onreadystatechange=function(){if(4===d.readyState){var a=d.status;c(!a&&d.response||a>=200&&300>a||304===a?d:null)}},d.send(null)},d3.text=function(a,b,c){function d(a){c(a&&a.responseText)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)},d3.json=function(a,b){d3.text(a,"application/json",function(a){b(a?JSON.parse(a):null)})},d3.html=function(a,b){d3.text(a,"text/html",function(a){if(null!=a){var c=document.createRange();c.selectNode(document.body),a=c.createContextualFragment(a)}b(a)})},d3.xml=function(a,b,c){function d(a){c(a&&a.responseXML)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)};var Ze={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};d3.ns={prefix:Ze,qualify:function(a){var b=a.indexOf(":"),c=a;return b>=0&&(c=a.substring(0,b),a=a.substring(b+1)),Ze.hasOwnProperty(c)?{space:Ze[c],local:a}:a}},d3.dispatch=function(){for(var a=new o,b=-1,c=arguments.length;++b<c;)a[arguments[b]]=p(a);return a},o.prototype.on=function(a,b){var c=a.indexOf("."),d="";return c>0&&(d=a.substring(c+1),a=a.substring(0,c)),arguments.length<2?this[a].on(d):this[a].on(d,b)},d3.format=function(a){var b=$e.exec(a),c=b[1]||" ",d=b[3]||"",e=b[5],f=+b[6],g=b[7],h=b[8],i=b[9],j=1,k="",l=!1;switch(h&&(h=+h.substring(1)),e&&(c="0",g&&(f-=Math.floor((f-1)/4))),i){case"n":g=!0,i="g";break;case"%":j=100,k="%",i="f";break;case"p":j=100,k="%",i="r";break;case"d":l=!0,h=0;break;case"s":j=-1,i="r"}return"r"!=i||h||(i="g"),i=_e.get(i)||r,function(a){if(l&&a%1)return"";var b=0>a&&(a=-a)?"-":d;if(0>j){var m=d3.formatPrefix(a,h);a=m.scale(a),k=m.symbol}else a*=j;if(a=i(a,h),e){var n=a.length+b.length;f>n&&(a=new Array(f-n+1).join(c)+a),g&&(a=s(a)),a=b+a}else{g&&(a=s(a)),a=b+a;var n=a.length;f>n&&(a=new Array(f-n+1).join(c)+a)}return a+k}};var $e=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,_e=d3.map({g:function(a,b){return a.toPrecision(b)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},r:function(a,b){return d3.round(a,b=q(a,b)).toFixed(Math.max(0,Math.min(20,b)))}}),af=["y","z","a","f","p","n","μ","m","","k","M","G","T","P","E","Z","Y"].map(t);d3.formatPrefix=function(a,b){var c=0;return a&&(0>a&&(a*=-1),b&&(a=d3.round(a,q(a,b))),c=1+Math.floor(1e-12+Math.log(a)/Math.LN10),c=Math.max(-24,Math.min(24,3*Math.floor((0>=c?c+1:c-1)/3)))),af[8+c/3]};var bf=y(2),cf=y(3),df=function(){return x},ef=d3.map({linear:df,poly:y,quad:function(){return bf},cubic:function(){return cf},sin:function(){return z},exp:function(){return A},circle:function(){return B},elastic:C,back:D,bounce:function(){return E}}),ff=d3.map({"in":x,out:v,"in-out":w,"out-in":function(a){return w(v(a))}});d3.ease=function(a){var b=a.indexOf("-"),c=b>=0?a.substring(0,b):a,d=b>=0?a.substring(b+1):"in";return c=ef.get(c)||df,d=ff.get(d)||x,u(d(c.apply(null,Array.prototype.slice.call(arguments,1))))},d3.event=null,d3.transform=function(a){var b=document.createElementNS(d3.ns.prefix.svg,"g");return(d3.transform=function(a){b.setAttribute("transform",a);var c=b.transform.baseVal.consolidate();return new I(c?c.matrix:hf)})(a)},I.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var gf=180/Math.PI,hf={a:1,b:0,c:0,d:1,e:0,f:0};d3.interpolate=function(a,b){for(var c,d=d3.interpolators.length;--d>=0&&!(c=d3.interpolators[d](a,b)););return c},d3.interpolateNumber=function(a,b){return b-=a,function(c){return a+b*c}},d3.interpolateRound=function(a,b){return b-=a,function(c){return Math.round(a+b*c)}},d3.interpolateString=function(a,b){var c,d,e,f,g,h=0,i=0,j=[],k=[];for(jf.lastIndex=0,d=0;c=jf.exec(b);++d)c.index&&j.push(b.substring(h,i=c.index)),k.push({i:j.length,x:c[0]}),j.push(null),h=jf.lastIndex;for(h<b.length&&j.push(b.substring(h)),d=0,f=k.length;(c=jf.exec(a))&&f>d;++d)if(g=k[d],g.x==c[0]){if(g.i)if(null==j[g.i+1])for(j[g.i-1]+=g.x,j.splice(g.i,1),e=d+1;f>e;++e)k[e].i--;else for(j[g.i-1]+=g.x+j[g.i+1],j.splice(g.i,2),e=d+1;f>e;++e)k[e].i-=2;else if(null==j[g.i+1])j[g.i]=g.x;else for(j[g.i]=g.x+j[g.i+1],j.splice(g.i+1,1),e=d+1;f>e;++e)k[e].i--;k.splice(d,1),f--,d--}else g.x=d3.interpolateNumber(parseFloat(c[0]),parseFloat(g.x));for(;f>d;)g=k.pop(),null==j[g.i+1]?j[g.i]=g.x:(j[g.i]=g.x+j[g.i+1],j.splice(g.i+1,1)),f--;return 1===j.length?null==j[0]?k[0].x:function(){return b}:function(a){for(d=0;f>d;++d)j[(g=k[d]).i]=g.x(a);return j.join("")}},d3.interpolateTransform=function(a,b){var c,d=[],e=[],f=d3.transform(a),g=d3.transform(b),h=f.translate,i=g.translate,j=f.rotate,k=g.rotate,l=f.skew,m=g.skew,n=f.scale,o=g.scale;return h[0]!=i[0]||h[1]!=i[1]?(d.push("translate(",null,",",null,")"),e.push({i:1,x:d3.interpolateNumber(h[0],i[0])},{i:3,x:d3.interpolateNumber(h[1],i[1])})):i[0]||i[1]?d.push("translate("+i+")"):d.push(""),j!=k?(j-k>180?k+=360:k-j>180&&(j+=360),e.push({i:d.push(d.pop()+"rotate(",null,")")-2,x:d3.interpolateNumber(j,k)})):k&&d.push(d.pop()+"rotate("+k+")"),l!=m?e.push({i:d.push(d.pop()+"skewX(",null,")")-2,x:d3.interpolateNumber(l,m)}):m&&d.push(d.pop()+"skewX("+m+")"),n[0]!=o[0]||n[1]!=o[1]?(c=d.push(d.pop()+"scale(",null,",",null,")"),e.push({i:c-4,x:d3.interpolateNumber(n[0],o[0])},{i:c-2,x:d3.interpolateNumber(n[1],o[1])})):(1!=o[0]||1!=o[1])&&d.push(d.pop()+"scale("+o+")"),c=e.length,function(a){for(var b,f=-1;++f<c;)d[(b=e[f]).i]=b.x(a);return d.join("")}},d3.interpolateRgb=function(a,b){a=d3.rgb(a),b=d3.rgb(b);var c=a.r,d=a.g,e=a.b,f=b.r-c,g=b.g-d,h=b.b-e;return function(a){return"#"+S(Math.round(c+f*a))+S(Math.round(d+g*a))+S(Math.round(e+h*a))}},d3.interpolateHsl=function(a,b){a=d3.hsl(a),b=d3.hsl(b);var c=a.h,d=a.s,e=a.l,f=b.h-c,g=b.s-d,h=b.l-e;return f>180?f-=360:-180>f&&(f+=360),function(a){return $(c+f*a,d+g*a,e+h*a)+""}},d3.interpolateLab=function(a,b){a=d3.lab(a),b=d3.lab(b);var c=a.l,d=a.a,e=a.b,f=b.l-c,g=b.a-d,h=b.b-e;return function(a){return eb(c+f*a,d+g*a,e+h*a)+""}},d3.interpolateHcl=function(a,b){a=d3.hcl(a),b=d3.hcl(b);var c=a.h,d=a.c,e=a.l,f=b.h-c,g=b.c-d,h=b.l-e;return f>180?f-=360:-180>f&&(f+=360),function(a){return bb(c+f*a,d+g*a,e+h*a)+""}},d3.interpolateArray=function(a,b){var c,d=[],e=[],f=a.length,g=b.length,h=Math.min(a.length,b.length);for(c=0;h>c;++c)d.push(d3.interpolate(a[c],b[c]));for(;f>c;++c)e[c]=a[c];for(;g>c;++c)e[c]=b[c];return function(a){for(c=0;h>c;++c)e[c]=d[c](a);return e}},d3.interpolateObject=function(a,b){var c,d={},e={};for(c in a)c in b?d[c]=M(c)(a[c],b[c]):e[c]=a[c];for(c in b)c in a||(e[c]=b[c]);return function(a){for(c in d)e[c]=d[c](a);return e}};var jf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;d3.interpolators=[d3.interpolateObject,function(a,b){return b instanceof Array&&d3.interpolateArray(a,b)},function(a,b){return("string"==typeof a||"string"==typeof b)&&d3.interpolateString(a+"",b+"")},function(a,b){return("string"==typeof b?lf.has(b)||/^(#|rgb\(|hsl\()/.test(b):b instanceof P)&&d3.interpolateRgb(a,b)},function(a,b){return!isNaN(a=+a)&&!isNaN(b=+b)&&d3.interpolateNumber(a,b)}],P.prototype.toString=function(){return this.rgb()+""},d3.rgb=function(a,b,c){return 1===arguments.length?a instanceof R?Q(a.r,a.g,a.b):T(""+a,Q,$):Q(~~a,~~b,~~c)};var kf=R.prototype=new P;kf.brighter=function(a){a=Math.pow(.7,arguments.length?a:1);var b=this.r,c=this.g,d=this.b,e=30;return b||c||d?(b&&e>b&&(b=e),c&&e>c&&(c=e),d&&e>d&&(d=e),Q(Math.min(255,Math.floor(b/a)),Math.min(255,Math.floor(c/a)),Math.min(255,Math.floor(d/a)))):Q(e,e,e)},kf.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),Q(Math.floor(a*this.r),Math.floor(a*this.g),Math.floor(a*this.b))},kf.hsl=function(){return U(this.r,this.g,this.b)},kf.toString=function(){return"#"+S(this.r)+S(this.g)+S(this.b)};var lf=d3.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});lf.forEach(function(a,b){lf.set(a,T(b,Q,$))}),d3.hsl=function(a,b,c){return 1===arguments.length?a instanceof Z?Y(a.h,a.s,a.l):T(""+a,U,Y):Y(+a,+b,+c)};var mf=Z.prototype=new P;mf.brighter=function(a){return a=Math.pow(.7,arguments.length?a:1),Y(this.h,this.s,this.l/a)},mf.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),Y(this.h,this.s,a*this.l)},mf.rgb=function(){return $(this.h,this.s,this.l)},d3.hcl=function(a,b,c){return 1===arguments.length?a instanceof ab?_(a.h,a.c,a.l):a instanceof db?fb(a.l,a.a,a.b):fb((a=V((a=d3.rgb(a)).r,a.g,a.b)).l,a.a,a.b):_(+a,+b,+c)};var nf=ab.prototype=new P;nf.brighter=function(a){return _(this.h,this.c,Math.min(100,this.l+of*(arguments.length?a:1)))},nf.darker=function(a){return _(this.h,this.c,Math.max(0,this.l-of*(arguments.length?a:1)))},nf.rgb=function(){return bb(this.h,this.c,this.l).rgb()},d3.lab=function(a,b,c){return 1===arguments.length?a instanceof db?cb(a.l,a.a,a.b):a instanceof ab?bb(a.l,a.c,a.h):V((a=d3.rgb(a)).r,a.g,a.b):cb(+a,+b,+c)};var of=18,pf=.95047,qf=1,rf=1.08883,sf=db.prototype=new P;sf.brighter=function(a){return cb(Math.min(100,this.l+of*(arguments.length?a:1)),this.a,this.b)},sf.darker=function(a){return cb(Math.max(0,this.l-of*(arguments.length?a:1)),this.a,this.b)},sf.rgb=function(){return eb(this.l,this.a,this.b)};var tf=function(a,b){return b.querySelector(a)},uf=function(a,b){return b.querySelectorAll(a)},vf=document.documentElement,wf=vf.matchesSelector||vf.webkitMatchesSelector||vf.mozMatchesSelector||vf.msMatchesSelector||vf.oMatchesSelector,xf=function(a,b){return wf.call(a,b)};"function"==typeof Sizzle&&(tf=function(a,b){return Sizzle(a,b)[0]||null},uf=function(a,b){return Sizzle.uniqueSort(Sizzle(a,b))},xf=Sizzle.matchesSelector);var yf=[];d3.selection=function(){return zf},d3.selection.prototype=yf,yf.select=function(a){var b,c,d,e,f=[];"function"!=typeof a&&(a=kb(a));for(var g=-1,h=this.length;++g<h;){f.push(b=[]),b.parentNode=(d=this[g]).parentNode;for(var i=-1,j=d.length;++i<j;)(e=d[i])?(b.push(c=a.call(e,e.__data__,i)),c&&"__data__"in e&&(c.__data__=e.__data__)):b.push(null)}return jb(f)},yf.selectAll=function(a){var b,c,d=[];"function"!=typeof a&&(a=lb(a));for(var e=-1,f=this.length;++e<f;)for(var g=this[e],h=-1,i=g.length;++h<i;)(c=g[h])&&(d.push(b=Se(a.call(c,c.__data__,h))),b.parentNode=c);return jb(d)},yf.attr=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node();return a=d3.ns.qualify(a),a.local?c.getAttributeNS(a.space,a.local):c.getAttribute(a)}for(b in a)this.each(mb(b,a[b]));return this}return this.each(mb(a,b))},yf.classed=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node(),d=(a=a.trim().split(/^|\s+/g)).length,e=-1;if(b=c.classList){for(;++e<d;)if(!b.contains(a[e]))return!1}else for(b=c.className,null!=b.baseVal&&(b=b.baseVal);++e<d;)if(!nb(a[e]).test(b))return!1;return!0}for(b in a)this.each(ob(b,a[b]));return this}return this.each(ob(a,b))},yf.style=function(a,b,c){var d=arguments.length;if(3>d){if("string"!=typeof a){2>d&&(b="");for(c in a)this.each(qb(c,a[c],b));return this}if(2>d)return window.getComputedStyle(this.node(),null).getPropertyValue(a);c=""}return this.each(qb(a,b,c))},yf.property=function(a,b){if(arguments.length<2){if("string"==typeof a)return this.node()[a];for(b in a)this.each(rb(b,a[b]));return this}return this.each(rb(a,b))},yf.text=function(a){return arguments.length<1?this.node().textContent:this.each("function"==typeof a?function(){var b=a.apply(this,arguments);this.textContent=null==b?"":b}:null==a?function(){this.textContent=""}:function(){this.textContent=a})},yf.html=function(a){return arguments.length<1?this.node().innerHTML:this.each("function"==typeof a?function(){var b=a.apply(this,arguments);this.innerHTML=null==b?"":b}:null==a?function(){this.innerHTML=""}:function(){this.innerHTML=a})},yf.append=function(a){function b(){return this.appendChild(document.createElementNS(this.namespaceURI,a))}function c(){return this.appendChild(document.createElementNS(a.space,a.local))}return a=d3.ns.qualify(a),this.select(a.local?c:b)},yf.insert=function(a,b){function c(){return this.insertBefore(document.createElementNS(this.namespaceURI,a),tf(b,this))}function d(){return this.insertBefore(document.createElementNS(a.space,a.local),tf(b,this))}return a=d3.ns.qualify(a),this.select(a.local?d:c)},yf.remove=function(){return this.each(function(){var a=this.parentNode;a&&a.removeChild(this)})},yf.data=function(a,b){function c(a,c){var e,f,g,h=a.length,l=c.length,m=Math.min(h,l),n=Math.max(h,l),o=[],p=[],q=[];if(b){var r,s=new d,t=[],u=c.length;for(e=-1;++e<h;)r=b.call(f=a[e],f.__data__,e),s.has(r)?q[u++]=f:s.set(r,f),t.push(r);for(e=-1;++e<l;)r=b.call(c,g=c[e],e),s.has(r)?(o[e]=f=s.get(r),f.__data__=g,p[e]=q[e]=null):(p[e]=sb(g),o[e]=q[e]=null),s.remove(r);for(e=-1;++e<h;)s.has(t[e])&&(q[e]=a[e])}else{for(e=-1;++e<m;)f=a[e],g=c[e],f?(f.__data__=g,o[e]=f,p[e]=q[e]=null):(p[e]=sb(g),o[e]=q[e]=null);for(;l>e;++e)p[e]=sb(c[e]),o[e]=q[e]=null;for(;n>e;++e)q[e]=a[e],p[e]=o[e]=null}p.update=o,p.parentNode=o.parentNode=q.parentNode=a.parentNode,i.push(p),j.push(o),k.push(q)}var e,f,g=-1,h=this.length;if(!arguments.length){for(a=new Array(h=(e=this[0]).length);++g<h;)(f=e[g])&&(a[g]=f.__data__);return a}var i=xb([]),j=jb([]),k=jb([]);if("function"==typeof a)for(;++g<h;)c(e=this[g],a.call(e,e.parentNode.__data__,g));else for(;++g<h;)c(e=this[g],a);return j.enter=function(){return i},j.exit=function(){return k},j},yf.datum=yf.map=function(a){return arguments.length<1?this.property("__data__"):this.property("__data__",a)},yf.filter=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=tb(a));for(var f=0,g=this.length;g>f;f++){e.push(b=[]),b.parentNode=(c=this[f]).parentNode;for(var h=0,i=c.length;i>h;h++)(d=c[h])&&a.call(d,d.__data__,h)&&b.push(d)}return jb(e)},yf.order=function(){for(var a=-1,b=this.length;++a<b;)for(var c,d=this[a],e=d.length-1,f=d[e];--e>=0;)(c=d[e])&&(f&&f!==c.nextSibling&&f.parentNode.insertBefore(c,f),f=c);return this},yf.sort=function(a){a=ub.apply(this,arguments);for(var b=-1,c=this.length;++b<c;)this[b].sort(a);return this.order()},yf.on=function(a,b,c){var d=arguments.length;if(3>d){if("string"!=typeof a){2>d&&(b=!1);for(c in a)this.each(vb(c,a[c],b));return this}if(2>d)return(d=this.node()["__on"+a])&&d._;c=!1}return this.each(vb(a,b,c))},yf.each=function(a){return wb(this,function(b,c,d){a.call(b,b.__data__,c,d)})},yf.call=function(a){return a.apply(this,(arguments[0]=this,arguments)),this},yf.empty=function(){return!this.node()},yf.node=function(){for(var a=0,b=this.length;b>a;a++)for(var c=this[a],d=0,e=c.length;e>d;d++){var f=c[d];if(f)return f}return null},yf.transition=function(){for(var a,b,c=[],d=-1,e=this.length;++d<e;){c.push(a=[]);for(var f=this[d],g=-1,h=f.length;++g<h;)a.push((b=f[g])?{node:b,delay:Hf,duration:If}:null)}return yb(c,Df||++Cf,Date.now())};var zf=jb([[document]]);zf[0].parentNode=vf,d3.select=function(a){return"string"==typeof a?zf.select(a):jb([[a]])},d3.selectAll=function(a){return"string"==typeof a?zf.selectAll(a):jb([Se(a)])};var Af=[];d3.selection.enter=xb,d3.selection.enter.prototype=Af,Af.append=yf.append,Af.insert=yf.insert,Af.empty=yf.empty,Af.node=yf.node,Af.select=function(a){for(var b,c,d,e,f,g=[],h=-1,i=this.length;++h<i;){d=(e=this[h]).update,g.push(b=[]),b.parentNode=e.parentNode;for(var j=-1,k=e.length;++j<k;)(f=e[j])?(b.push(d[j]=c=a.call(e.parentNode,f.__data__,j)),c.__data__=f.__data__):b.push(null)}return jb(g)};var Bf=[],Cf=0,Df=0,Ef=0,Ff=250,Gf=d3.ease("cubic-in-out"),Hf=Ef,If=Ff,Jf=Gf;Bf.call=yf.call,d3.transition=function(a){return arguments.length?Df?a.transition():a:zf.transition()},d3.transition.prototype=Bf,Bf.select=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=kb(a));for(var f=-1,g=this.length;++f<g;){e.push(b=[]);for(var h=this[f],i=-1,j=h.length;++i<j;)(d=h[i])&&(c=a.call(d.node,d.node.__data__,i))?("__data__"in d.node&&(c.__data__=d.node.__data__),b.push({node:c,delay:d.delay,duration:d.duration})):b.push(null)}return yb(e,this.id,this.time).ease(this.ease())},Bf.selectAll=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=lb(a));for(var f=-1,g=this.length;++f<g;)for(var h=this[f],i=-1,j=h.length;++i<j;)if(d=h[i]){c=a.call(d.node,d.node.__data__,i),e.push(b=[]);for(var k=-1,l=c.length;++k<l;)b.push({node:c[k],delay:d.delay,duration:d.duration})}return yb(e,this.id,this.time).ease(this.ease())},Bf.filter=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=tb(a));for(var f=0,g=this.length;g>f;f++){e.push(b=[]);for(var c=this[f],h=0,i=c.length;i>h;h++)(d=c[h])&&a.call(d.node,d.node.__data__,h)&&b.push(d)}return yb(e,this.id,this.time).ease(this.ease())},Bf.attr=function(a,b){if(arguments.length<2){for(b in a)this.attrTween(b,Bb(a[b],b));return this}return this.attrTween(a,Bb(b,a))},Bf.attrTween=function(a,b){function c(a,c){var d=b.call(this,a,c,this.getAttribute(e));return d===Mf?(this.removeAttribute(e),null):d&&function(a){this.setAttribute(e,d(a))}}function d(a,c){var d=b.call(this,a,c,this.getAttributeNS(e.space,e.local));return d===Mf?(this.removeAttributeNS(e.space,e.local),null):d&&function(a){this.setAttributeNS(e.space,e.local,d(a))}}var e=d3.ns.qualify(a);return this.tween("attr."+a,e.local?d:c)},Bf.style=function(a,b,c){var d=arguments.length;if(3>d){if("string"!=typeof a){2>d&&(b="");for(c in a)this.styleTween(c,Bb(a[c],c),b);return this}c=""}return this.styleTween(a,Bb(b,a),c)},Bf.styleTween=function(a,b,c){return arguments.length<3&&(c=""),this.tween("style."+a,function(d,e){var f=b.call(this,d,e,window.getComputedStyle(this,null).getPropertyValue(a));return f===Mf?(this.style.removeProperty(a),null):f&&function(b){this.style.setProperty(a,f(b),c)}})},Bf.text=function(a){return this.tween("text",function(b,c){this.textContent="function"==typeof a?a.call(this,b,c):a})},Bf.remove=function(){return this.each("end.transition",function(){var a;!this.__transition__&&(a=this.parentNode)&&a.removeChild(this)})},Bf.delay=function(a){return wb(this,"function"==typeof a?function(b,c,d){b.delay=0|a.call(b=b.node,b.__data__,c,d)}:(a=0|a,function(b){b.delay=a}))},Bf.duration=function(a){return wb(this,"function"==typeof a?function(b,c,d){b.duration=Math.max(1,0|a.call(b=b.node,b.__data__,c,d))}:(a=Math.max(1,0|a),function(b){b.duration=a}))},Bf.transition=function(){return this.select(f)},d3.tween=function(a,b){function c(c,d,e){var f=a.call(this,c,d);return null==f?""!=e&&Mf:e!=f&&b(e,f+"")}function d(c,d,e){return e!=a&&b(e,a)}return"function"==typeof a?c:null==a?Ab:(a+="",d)};var Kf,Lf,Mf={},Nf=0,Of={},Pf=null;d3.timer=function(a,b,c){if(arguments.length<3){if(arguments.length<2)b=0;else if(!isFinite(b))return;c=Date.now()}var d=Of[a.id];d&&d.callback===a?(d.then=c,d.delay=b):Of[a.id=++Nf]=Pf={callback:a,then:c,delay:b,next:Pf},Kf||(Lf=clearTimeout(Lf),Kf=1,Qf(Cb))},d3.timer.flush=function(){for(var a,b=Date.now(),c=Pf;c;)a=b-c.then,c.delay||(c.flush=c.callback(a)),c=c.next;Db()};var Qf=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,17)};d3.mouse=function(a){return Eb(a,G())};var Rf=/WebKit/.test(navigator.userAgent)?-1:0;d3.touches=function(a,b){return arguments.length<2&&(b=G().touches),b?Se(b).map(function(b){var c=Eb(a,b);return c.identifier=b.identifier,c}):[]},d3.scale={},d3.scale.linear=function(){return Jb([0,1],[0,1],d3.interpolate,!1)},d3.scale.log=function(){return Rb(d3.scale.linear(),Sb)};var Sf=d3.format(".0e");Sb.pow=function(a){return Math.pow(10,a)},Tb.pow=function(a){return-Math.pow(10,-a)},d3.scale.pow=function(){return Ub(d3.scale.linear(),1)},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){return Wb([],{t:"range",a:[[]]})},d3.scale.category10=function(){return d3.scale.ordinal().range(Tf)},d3.scale.category20=function(){return d3.scale.ordinal().range(Uf)},d3.scale.category20b=function(){return d3.scale.ordinal().range(Vf)},d3.scale.category20c=function(){return d3.scale.ordinal().range(Wf)};var Tf=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Uf=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],Vf=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],Wf=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){return Xb([],[])},d3.scale.quantize=function(){return Yb(0,1,[0,1])},d3.scale.threshold=function(){return Zb([.5],[0,1])},d3.scale.identity=function(){return $b([0,1])},d3.svg={},d3.svg.arc=function(){function a(){var a=b.apply(this,arguments),f=c.apply(this,arguments),g=d.apply(this,arguments)+Xf,h=e.apply(this,arguments)+Xf,i=(g>h&&(i=g,g=h,h=i),h-g),j=i<Math.PI?"0":"1",k=Math.cos(g),l=Math.sin(g),m=Math.cos(h),n=Math.sin(h);return i>=Yf?a?"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+-f+"A"+f+","+f+" 0 1,1 0,"+f+"M0,"+a+"A"+a+","+a+" 0 1,0 0,"+-a+"A"+a+","+a+" 0 1,0 0,"+a+"Z":"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+-f+"A"+f+","+f+" 0 1,1 0,"+f+"Z":a?"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L"+a*m+","+a*n+"A"+a+","+a+" 0 "+j+",0 "+a*k+","+a*l+"Z":"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L0,0Z"}var b=_b,c=ac,d=bc,e=cc;return a.innerRadius=function(c){return arguments.length?(b=h(c),a):b},a.outerRadius=function(b){return arguments.length?(c=h(b),a):c},a.startAngle=function(b){return arguments.length?(d=h(b),a):d},a.endAngle=function(b){return arguments.length?(e=h(b),a):e},a.centroid=function(){var a=(b.apply(this,arguments)+c.apply(this,arguments))/2,f=(d.apply(this,arguments)+e.apply(this,arguments))/2+Xf;return[Math.cos(f)*a,Math.sin(f)*a]},a};var Xf=-Math.PI/2,Yf=2*Math.PI-1e-6;d3.svg.line=function(){return dc(e)};var Zf=d3.map({linear:gc,"linear-closed":hc,"step-before":ic,"step-after":jc,basis:pc,"basis-open":qc,"basis-closed":rc,bundle:sc,cardinal:mc,"cardinal-open":kc,"cardinal-closed":lc,monotone:yc});Zf.forEach(function(a,b){b.key=a,b.closed=/-closed$/.test(a)});var $f=[0,2/3,1/3,0],_f=[0,1/3,2/3,0],ag=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var a=dc(zc);return a.radius=a.x,delete a.x,a.angle=a.y,delete a.y,a},ic.reverse=jc,jc.reverse=ic,d3.svg.area=function(){return Ac(e)},d3.svg.area.radial=function(){var a=Ac(zc);return a.radius=a.x,delete a.x,a.innerRadius=a.x0,delete a.x0,a.outerRadius=a.x1,delete a.x1,a.angle=a.y,delete a.y,a.startAngle=a.y0,delete a.y0,a.endAngle=a.y1,delete a.y1,a},d3.svg.chord=function(){function a(a,h){var i=b(this,f,a,h),j=b(this,g,a,h);return"M"+i.p0+d(i.r,i.p1,i.a1-i.a0)+(c(i,j)?e(i.r,i.p1,i.r,i.p0):e(i.r,i.p1,j.r,j.p0)+d(j.r,j.p1,j.a1-j.a0)+e(j.r,j.p1,i.r,i.p0))+"Z"}function b(a,b,c,d){var e=b.call(a,c,d),f=i.call(a,e,d),g=j.call(a,e,d)+Xf,h=k.call(a,e,d)+Xf;return{r:f,a0:g,a1:h,p0:[f*Math.cos(g),f*Math.sin(g)],p1:[f*Math.cos(h),f*Math.sin(h)]}}function c(a,b){return a.a0==b.a0&&a.a1==b.a1}function d(a,b,c){return"A"+a+","+a+" 0 "+ +(c>Math.PI)+",1 "+b}function e(a,b,c,d){return"Q 0,0 "+d}var f=Bc,g=Cc,i=Dc,j=bc,k=cc;return a.radius=function(b){return arguments.length?(i=h(b),a):i},a.source=function(b){return arguments.length?(f=h(b),a):f},a.target=function(b){return arguments.length?(g=h(b),a):g},a.startAngle=function(b){return arguments.length?(j=h(b),a):j},a.endAngle=function(b){return arguments.length?(k=h(b),a):k},a},d3.svg.diagonal=function(){function a(a,e){var f=b.call(this,a,e),g=c.call(this,a,e),h=(f.y+g.y)/2,i=[f,{x:f.x,y:h},{x:g.x,y:h},g];return i=i.map(d),"M"+i[0]+"C"+i[1]+" "+i[2]+" "+i[3]}var b=Bc,c=Cc,d=Ec;return a.source=function(c){return arguments.length?(b=h(c),a):b},a.target=function(b){return arguments.length?(c=h(b),a):c},a.projection=function(b){return arguments.length?(d=b,a):d
-},a},d3.svg.diagonal.radial=function(){var a=d3.svg.diagonal(),b=Ec,c=a.projection;return a.projection=function(a){return arguments.length?c(Fc(b=a)):b},a},d3.svg.mouse=d3.mouse,d3.svg.touches=d3.touches,d3.svg.symbol=function(){function a(a,d){return(bg.get(b.call(this,a,d))||Ic)(c.call(this,a,d))}var b=Hc,c=Gc;return a.type=function(c){return arguments.length?(b=h(c),a):b},a.size=function(b){return arguments.length?(c=h(b),a):c},a};var bg=d3.map({circle:Ic,cross:function(a){var b=Math.sqrt(a/5)/2;return"M"+-3*b+","+-b+"H"+-b+"V"+-3*b+"H"+b+"V"+-b+"H"+3*b+"V"+b+"H"+b+"V"+3*b+"H"+-b+"V"+b+"H"+-3*b+"Z"},diamond:function(a){var b=Math.sqrt(a/(2*dg)),c=b*dg;return"M0,"+-b+"L"+c+",0 0,"+b+" "+-c+",0Z"},square:function(a){var b=Math.sqrt(a)/2;return"M"+-b+","+-b+"L"+b+","+-b+" "+b+","+b+" "+-b+","+b+"Z"},"triangle-down":function(a){var b=Math.sqrt(a/cg),c=b*cg/2;return"M0,"+c+"L"+b+","+-c+" "+-b+","+-c+"Z"},"triangle-up":function(a){var b=Math.sqrt(a/cg),c=b*cg/2;return"M0,"+-c+"L"+b+","+c+" "+-b+","+c+"Z"}});d3.svg.symbolTypes=bg.keys();var cg=Math.sqrt(3),dg=Math.tan(30*Math.PI/180);d3.svg.axis=function(){function a(a){a.each(function(){var a,l=d3.select(this),m=null==j?c.ticks?c.ticks.apply(c,i):c.domain():j,n=null==b?c.tickFormat?c.tickFormat.apply(c,i):String:b,o=Lc(c,m,k),p=l.selectAll(".minor").data(o,String),q=p.enter().insert("line","g").attr("class","tick minor").style("opacity",1e-6),r=d3.transition(p.exit()).style("opacity",1e-6).remove(),s=d3.transition(p).style("opacity",1),t=l.selectAll("g").data(m,String),u=t.enter().insert("g","path").style("opacity",1e-6),v=d3.transition(t.exit()).style("opacity",1e-6).remove(),w=d3.transition(t).style("opacity",1),x=Gb(c),y=l.selectAll(".domain").data([0]),z=(y.enter().append("path").attr("class","domain"),d3.transition(y)),A=c.copy(),B=this.__chart__||A;this.__chart__=A,u.append("line").attr("class","tick"),u.append("text");var C=u.select("line"),D=w.select("line"),E=t.select("text").text(n),F=u.select("text"),G=w.select("text");switch(d){case"bottom":a=Jc,q.attr("y2",f),s.attr("x2",0).attr("y2",f),C.attr("y2",e),F.attr("y",Math.max(e,0)+h),D.attr("x2",0).attr("y2",e),G.attr("x",0).attr("y",Math.max(e,0)+h),E.attr("dy",".71em").attr("text-anchor","middle"),z.attr("d","M"+x[0]+","+g+"V0H"+x[1]+"V"+g);break;case"top":a=Jc,q.attr("y2",-f),s.attr("x2",0).attr("y2",-f),C.attr("y2",-e),F.attr("y",-(Math.max(e,0)+h)),D.attr("x2",0).attr("y2",-e),G.attr("x",0).attr("y",-(Math.max(e,0)+h)),E.attr("dy","0em").attr("text-anchor","middle"),z.attr("d","M"+x[0]+","+-g+"V0H"+x[1]+"V"+-g);break;case"left":a=Kc,q.attr("x2",-f),s.attr("x2",-f).attr("y2",0),C.attr("x2",-e),F.attr("x",-(Math.max(e,0)+h)),D.attr("x2",-e).attr("y2",0),G.attr("x",-(Math.max(e,0)+h)).attr("y",0),E.attr("dy",".32em").attr("text-anchor","end"),z.attr("d","M"+-g+","+x[0]+"H0V"+x[1]+"H"+-g);break;case"right":a=Kc,q.attr("x2",f),s.attr("x2",f).attr("y2",0),C.attr("x2",e),F.attr("x",Math.max(e,0)+h),D.attr("x2",e).attr("y2",0),G.attr("x",Math.max(e,0)+h).attr("y",0),E.attr("dy",".32em").attr("text-anchor","start"),z.attr("d","M"+g+","+x[0]+"H0V"+x[1]+"H"+g)}if(c.ticks)u.call(a,B),w.call(a,A),v.call(a,A),q.call(a,B),s.call(a,A),r.call(a,A);else{var H=A.rangeBand()/2,I=function(a){return A(a)+H};u.call(a,I),w.call(a,I)}})}var b,c=d3.scale.linear(),d="bottom",e=6,f=6,g=6,h=3,i=[10],j=null,k=0;return a.scale=function(b){return arguments.length?(c=b,a):c},a.orient=function(b){return arguments.length?(d=b,a):d},a.ticks=function(){return arguments.length?(i=arguments,a):i},a.tickValues=function(b){return arguments.length?(j=b,a):j},a.tickFormat=function(c){return arguments.length?(b=c,a):b},a.tickSize=function(b,c){if(!arguments.length)return e;var d=arguments.length-1;return e=+b,f=d>1?+c:e,g=d>0?+arguments[d]:e,a},a.tickPadding=function(b){return arguments.length?(h=+b,a):h},a.tickSubdivide=function(b){return arguments.length?(k=+b,a):k},a},d3.svg.brush=function(){function a(f){f.each(function(){var f,g=d3.select(this),k=g.selectAll(".background").data([0]),l=g.selectAll(".extent").data([0]),m=g.selectAll(".resize").data(j,String);g.style("pointer-events","all").on("mousedown.brush",e).on("touchstart.brush",e),k.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),l.enter().append("rect").attr("class","extent").style("cursor","move"),m.enter().append("g").attr("class",function(a){return"resize "+a}).style("cursor",function(a){return eg[a]}).append("rect").attr("x",function(a){return/[ew]$/.test(a)?-3:null}).attr("y",function(a){return/^[ns]/.test(a)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),m.style("display",a.empty()?"none":null),m.exit().remove(),h&&(f=Gb(h),k.attr("x",f[0]).attr("width",f[1]-f[0]),c(g)),i&&(f=Gb(i),k.attr("y",f[0]).attr("height",f[1]-f[0]),d(g)),b(g)})}function b(a){a.selectAll(".resize").attr("transform",function(a){return"translate("+k[+/e$/.test(a)][0]+","+k[+/^s/.test(a)][1]+")"})}function c(a){a.select(".extent").attr("x",k[0][0]),a.selectAll(".extent,.n>rect,.s>rect").attr("width",k[1][0]-k[0][0])}function d(a){a.select(".extent").attr("y",k[0][1]),a.selectAll(".extent,.e>rect,.w>rect").attr("height",k[1][1]-k[0][1])}function e(){function e(){var a=d3.event.changedTouches;return a?d3.touches(r,a)[0]:d3.mouse(r)}function j(){32==d3.event.keyCode&&(y||(p=null,z[0]-=k[1][0],z[1]-=k[1][1],y=2),F())}function l(){32==d3.event.keyCode&&2==y&&(z[0]+=k[1][0],z[1]+=k[1][1],y=0,F())}function m(){var a=e(),f=!1;q&&(a[0]+=q[0],a[1]+=q[1]),y||(d3.event.altKey?(p||(p=[(k[0][0]+k[1][0])/2,(k[0][1]+k[1][1])/2]),z[0]=k[+(a[0]<p[0])][0],z[1]=k[+(a[1]<p[1])][1]):p=null),w&&n(a,h,0)&&(c(u),f=!0),x&&n(a,i,1)&&(d(u),f=!0),f&&(b(u),t({type:"brush",mode:y?"move":"resize"}))}function n(a,b,c){var d,e,g=Gb(b),h=g[0],i=g[1],j=z[c],l=k[1][c]-k[0][c];return y&&(h-=j,i-=l+j),d=Math.max(h,Math.min(i,a[c])),y?e=(d+=j)+l:(p&&(j=Math.max(h,Math.min(i,2*p[c]-d))),d>j?(e=d,d=j):e=j),k[0][c]!==d||k[1][c]!==e?(f=null,k[0][c]=d,k[1][c]=e,!0):void 0}function o(){m(),u.style("pointer-events","all").selectAll(".resize").style("display",a.empty()?"none":null),d3.select("body").style("cursor",null),A.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),t({type:"brushend"}),F()}var p,q,r=this,s=d3.select(d3.event.target),t=g.of(r,arguments),u=d3.select(r),v=s.datum(),w=!/^(n|s)$/.test(v)&&h,x=!/^(e|w)$/.test(v)&&i,y=s.classed("extent"),z=e(),A=d3.select(window).on("mousemove.brush",m).on("mouseup.brush",o).on("touchmove.brush",m).on("touchend.brush",o).on("keydown.brush",j).on("keyup.brush",l);if(y)z[0]=k[0][0]-z[0],z[1]=k[0][1]-z[1];else if(v){var B=+/w$/.test(v),C=+/^n/.test(v);q=[k[1-B][0]-z[0],k[1-C][1]-z[1]],z[0]=k[B][0],z[1]=k[C][1]}else d3.event.altKey&&(p=z.slice());u.style("pointer-events","none").selectAll(".resize").style("display",null),d3.select("body").style("cursor",s.style("cursor")),t({type:"brushstart"}),m(),F()}var f,g=H(a,"brushstart","brush","brushend"),h=null,i=null,j=fg[0],k=[[0,0],[0,0]];return a.x=function(b){return arguments.length?(h=b,j=fg[!h<<1|!i],a):h},a.y=function(b){return arguments.length?(i=b,j=fg[!h<<1|!i],a):i},a.extent=function(b){var c,d,e,g,j;return arguments.length?(f=[[0,0],[0,0]],h&&(c=b[0],d=b[1],i&&(c=c[0],d=d[0]),f[0][0]=c,f[1][0]=d,h.invert&&(c=h(c),d=h(d)),c>d&&(j=c,c=d,d=j),k[0][0]=0|c,k[1][0]=0|d),i&&(e=b[0],g=b[1],h&&(e=e[1],g=g[1]),f[0][1]=e,f[1][1]=g,i.invert&&(e=i(e),g=i(g)),e>g&&(j=e,e=g,g=j),k[0][1]=0|e,k[1][1]=0|g),a):(b=f||k,h&&(c=b[0][0],d=b[1][0],f||(c=k[0][0],d=k[1][0],h.invert&&(c=h.invert(c),d=h.invert(d)),c>d&&(j=c,c=d,d=j))),i&&(e=b[0][1],g=b[1][1],f||(e=k[0][1],g=k[1][1],i.invert&&(e=i.invert(e),g=i.invert(g)),e>g&&(j=e,e=g,g=j))),h&&i?[[c,e],[d,g]]:h?[c,d]:i&&[e,g])},a.clear=function(){return f=null,k[0][0]=k[0][1]=k[1][0]=k[1][1]=0,a},a.empty=function(){return h&&k[0][0]===k[1][0]||i&&k[0][1]===k[1][1]},d3.rebind(a,g,"on")};var eg={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},fg=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];d3.behavior={},d3.behavior.drag=function(){function a(){this.on("mousedown.drag",b).on("touchstart.drag",b)}function b(){function a(){var a=h.parentNode;return k?d3.touches(a).filter(function(a){return a.identifier===k})[0]:d3.mouse(a)}function b(){if(!h.parentNode)return e();var b=a(),c=b[0]-l[0],d=b[1]-l[1];m|=c|d,l=b,F(),i({type:"drag",x:b[0]+g[0],y:b[1]+g[1],dx:c,dy:d})}function e(){i({type:"dragend"}),m&&(F(),d3.event.target===j&&n.on("click.drag",f,!0)),n.on(k?"touchmove.drag-"+k:"mousemove.drag",null).on(k?"touchend.drag-"+k:"mouseup.drag",null)}function f(){F(),n.on("click.drag",null)}var g,h=this,i=c.of(h,arguments),j=d3.event.target,k=d3.event.touches&&d3.event.changedTouches[0].identifier,l=a(),m=0,n=d3.select(window).on(k?"touchmove.drag-"+k:"mousemove.drag",b).on(k?"touchend.drag-"+k:"mouseup.drag",e,!0);d?(g=d.apply(h,arguments),g=[g.x-l[0],g.y-l[1]]):g=[0,0],k||F(),i({type:"dragstart"})}var c=H(a,"drag","dragstart","dragend"),d=null;return a.origin=function(b){return arguments.length?(d=b,a):d},d3.rebind(a,c,"on")},d3.behavior.zoom=function(){function a(){this.on("mousedown.zoom",g).on("mousewheel.zoom",h).on("mousemove.zoom",i).on("DOMMouseScroll.zoom",h).on("dblclick.zoom",j).on("touchstart.zoom",k).on("touchmove.zoom",l).on("touchend.zoom",k)}function b(a){return[(a[0]-t[0])/u,(a[1]-t[1])/u]}function c(a){return[a[0]*u+t[0],a[1]*u+t[1]]}function d(a){u=Math.max(v[0],Math.min(v[1],a))}function e(a,b){b=c(b),t[0]+=a[0]-b[0],t[1]+=a[1]-b[1]}function f(a){p&&p.domain(o.range().map(function(a){return(a-t[0])/u}).map(o.invert)),r&&r.domain(q.range().map(function(a){return(a-t[1])/u}).map(q.invert)),d3.event.preventDefault(),a({type:"zoom",scale:u,translate:t})}function g(){function a(){j=1,e(d3.mouse(g),l),f(h)}function c(){j&&F(),k.on("mousemove.zoom",null).on("mouseup.zoom",null),j&&d3.event.target===i&&k.on("click.zoom",d,!0)}function d(){F(),k.on("click.zoom",null)}var g=this,h=w.of(g,arguments),i=d3.event.target,j=0,k=d3.select(window).on("mousemove.zoom",a).on("mouseup.zoom",c),l=b(d3.mouse(g));window.focus(),F()}function h(){m||(m=b(d3.mouse(this))),d(Math.pow(2,.002*Mc())*u),e(d3.mouse(this),m),f(w.of(this,arguments))}function i(){m=null}function j(){var a=d3.mouse(this),c=b(a);d(d3.event.shiftKey?u/2:2*u),e(a,c),f(w.of(this,arguments))}function k(){var a=d3.touches(this),c=Date.now();if(n=u,m={},a.forEach(function(a){m[a.identifier]=b(a)}),F(),1===a.length){if(500>c-s){var g=a[0],h=b(a[0]);d(2*u),e(g,h),f(w.of(this,arguments))}s=c}}function l(){var a=d3.touches(this),b=a[0],c=m[b.identifier];if(g=a[1]){var g,h=m[g.identifier];b=[(b[0]+g[0])/2,(b[1]+g[1])/2],c=[(c[0]+h[0])/2,(c[1]+h[1])/2],d(d3.event.scale*n)}e(b,c),s=null,f(w.of(this,arguments))}var m,n,o,p,q,r,s,t=[0,0],u=1,v=hg,w=H(a,"zoom");return a.translate=function(b){return arguments.length?(t=b.map(Number),a):t},a.scale=function(b){return arguments.length?(u=+b,a):u},a.scaleExtent=function(b){return arguments.length?(v=null==b?hg:b.map(Number),a):v},a.x=function(b){return arguments.length?(p=b,o=b.copy(),a):p},a.y=function(b){return arguments.length?(r=b,q=b.copy(),a):r},d3.rebind(a,w,"on")};var gg,hg=[0,1/0];d3.layout={},d3.layout.bundle=function(){return function(a){for(var b=[],c=-1,d=a.length;++c<d;)b.push(Nc(a[c]));return b}},d3.layout.chord=function(){function a(){var a,j,l,m,n,o={},p=[],q=d3.range(f),r=[];for(c=[],d=[],a=0,m=-1;++m<f;){for(j=0,n=-1;++n<f;)j+=e[m][n];p.push(j),r.push(d3.range(f)),a+=j}for(g&&q.sort(function(a,b){return g(p[a],p[b])}),h&&r.forEach(function(a,b){a.sort(function(a,c){return h(e[b][a],e[b][c])})}),a=(2*Math.PI-k*f)/a,j=0,m=-1;++m<f;){for(l=j,n=-1;++n<f;){var s=q[m],t=r[s][n],u=e[s][t],v=j,w=j+=u*a;o[s+"-"+t]={index:s,subindex:t,startAngle:v,endAngle:w,value:u}}d[s]={index:s,startAngle:l,endAngle:j,value:(j-l)/a},j+=k}for(m=-1;++m<f;)for(n=m-1;++n<f;){var x=o[m+"-"+n],y=o[n+"-"+m];(x.value||y.value)&&c.push(x.value<y.value?{source:y,target:x}:{source:x,target:y})}i&&b()}function b(){c.sort(function(a,b){return i((a.source.value+a.target.value)/2,(b.source.value+b.target.value)/2)})}var c,d,e,f,g,h,i,j={},k=0;return j.matrix=function(a){return arguments.length?(f=(e=a)&&e.length,c=d=null,j):e},j.padding=function(a){return arguments.length?(k=a,c=d=null,j):k},j.sortGroups=function(a){return arguments.length?(g=a,c=d=null,j):g},j.sortSubgroups=function(a){return arguments.length?(h=a,c=null,j):h},j.sortChords=function(a){return arguments.length?(i=a,c&&b(),j):i},j.chords=function(){return c||a(),c},j.groups=function(){return d||a(),d},j},d3.layout.force=function(){function a(a){return function(b,c,d,e){if(b.point!==a){var f=b.cx-a.x,g=b.cy-a.y,h=1/Math.sqrt(f*f+g*g);if(r>(e-c)*h){var i=b.charge*h*h;return a.px-=f*i,a.py-=g*i,!0}if(b.point&&isFinite(h)){var i=b.pointCharge*h*h;a.px-=f*i,a.py-=g*i}}return!b.charge}}function b(a){a.px=d3.event.x,a.py=d3.event.y,j.resume()}var c,d,f,g,i,j={},k=d3.dispatch("start","tick","end"),l=[1,1],m=.9,n=Vc,o=Wc,p=-30,q=.1,r=.8,s=[],t=[];return j.tick=function(){if((d*=.99)<.005)return k.end({type:"end",alpha:d=0}),!0;var b,c,e,h,j,n,o,r,u,v=s.length,w=t.length;for(c=0;w>c;++c)e=t[c],h=e.source,j=e.target,r=j.x-h.x,u=j.y-h.y,(n=r*r+u*u)&&(n=d*g[c]*((n=Math.sqrt(n))-f[c])/n,r*=n,u*=n,j.x-=r*(o=h.weight/(j.weight+h.weight)),j.y-=u*o,h.x+=r*(o=1-o),h.y+=u*o);if((o=d*q)&&(r=l[0]/2,u=l[1]/2,c=-1,o))for(;++c<v;)e=s[c],e.x+=(r-e.x)*o,e.y+=(u-e.y)*o;if(p)for(Uc(b=d3.geom.quadtree(s),d,i),c=-1;++c<v;)(e=s[c]).fixed||b.visit(a(e));for(c=-1;++c<v;)e=s[c],e.fixed?(e.x=e.px,e.y=e.py):(e.x-=(e.px-(e.px=e.x))*m,e.y-=(e.py-(e.py=e.y))*m);k.tick({type:"tick",alpha:d})},j.nodes=function(a){return arguments.length?(s=a,j):s},j.links=function(a){return arguments.length?(t=a,j):t},j.size=function(a){return arguments.length?(l=a,j):l},j.linkDistance=function(a){return arguments.length?(n=h(a),j):n},j.distance=j.linkDistance,j.linkStrength=function(a){return arguments.length?(o=h(a),j):o},j.friction=function(a){return arguments.length?(m=a,j):m},j.charge=function(a){return arguments.length?(p="function"==typeof a?a:+a,j):p},j.gravity=function(a){return arguments.length?(q=a,j):q},j.theta=function(a){return arguments.length?(r=a,j):r},j.alpha=function(a){return arguments.length?(d?d=a>0?a:0:a>0&&(k.start({type:"start",alpha:d=a}),d3.timer(j.tick)),j):d},j.start=function(){function a(a,d){for(var e,f=b(c),g=-1,h=f.length;++g<h;)if(!isNaN(e=f[g][a]))return e;return Math.random()*d}function b(){if(!e){for(e=[],d=0;k>d;++d)e[d]=[];for(d=0;m>d;++d){var a=t[d];e[a.source.index].push(a.target),e[a.target.index].push(a.source)}}return e[c]}var c,d,e,h,k=s.length,m=t.length,q=l[0],r=l[1];for(c=0;k>c;++c)(h=s[c]).index=c,h.weight=0;for(f=[],g=[],c=0;m>c;++c)h=t[c],"number"==typeof h.source&&(h.source=s[h.source]),"number"==typeof h.target&&(h.target=s[h.target]),f[c]=n.call(this,h,c),g[c]=o.call(this,h,c),++h.source.weight,++h.target.weight;for(c=0;k>c;++c)h=s[c],isNaN(h.x)&&(h.x=a("x",q)),isNaN(h.y)&&(h.y=a("y",r)),isNaN(h.px)&&(h.px=h.x),isNaN(h.py)&&(h.py=h.y);if(i=[],"function"==typeof p)for(c=0;k>c;++c)i[c]=+p.call(this,s[c],c);else for(c=0;k>c;++c)i[c]=p;return j.resume()},j.resume=function(){return j.alpha(.1)},j.stop=function(){return j.alpha(0)},j.drag=function(){c||(c=d3.behavior.drag().origin(e).on("dragstart",Qc).on("drag",b).on("dragend",Rc)),this.on("mouseover.force",Sc).on("mouseout.force",Tc).call(c)},d3.rebind(j,k,"on")},d3.layout.partition=function(){function a(b,c,d,e){var f=b.children;if(b.x=c,b.y=b.depth*e,b.dx=d,b.dy=e,f&&(g=f.length)){var g,h,i,j=-1;for(d=b.value?d/b.value:0;++j<g;)a(h=f[j],c,i=h.value*d,e),c+=i}}function b(a){var c=a.children,d=0;if(c&&(e=c.length))for(var e,f=-1;++f<e;)d=Math.max(d,b(c[f]));return 1+d}function c(c,f){var g=d.call(this,c,f);return a(g[0],0,e[0],e[1]/b(g[0])),g}var d=d3.layout.hierarchy(),e=[1,1];return c.size=function(a){return arguments.length?(e=a,c):e},gd(c,d)},d3.layout.pie=function(){function a(f){var g=f.map(function(c,d){return+b.call(a,c,d)}),h=+("function"==typeof d?d.apply(this,arguments):d),i=(("function"==typeof e?e.apply(this,arguments):e)-d)/d3.sum(g),j=d3.range(f.length);null!=c&&j.sort(c===ig?function(a,b){return g[b]-g[a]}:function(a,b){return c(f[a],f[b])});var k=[];return j.forEach(function(a){var b;k[a]={data:f[a],value:b=g[a],startAngle:h,endAngle:h+=b*i}}),k}var b=Number,c=ig,d=0,e=2*Math.PI;return a.value=function(c){return arguments.length?(b=c,a):b},a.sort=function(b){return arguments.length?(c=b,a):c},a.startAngle=function(b){return arguments.length?(d=b,a):d},a.endAngle=function(b){return arguments.length?(e=b,a):e},a};var ig={};d3.layout.stack=function(){function a(e,i){var j=e.map(function(c,d){return b.call(a,c,d)}),k=j.map(function(b){return b.map(function(b,c){return[g.call(a,b,c),h.call(a,b,c)]})}),l=c.call(a,k,i);j=d3.permute(j,l),k=d3.permute(k,l);var m,n,o,p=d.call(a,k,i),q=j.length,r=j[0].length;for(n=0;r>n;++n)for(f.call(a,j[0][n],o=p[n],k[0][n][1]),m=1;q>m;++m)f.call(a,j[m][n],o+=k[m-1][n][1],k[m][n][1]);return e}var b=e,c=$c,d=_c,f=Zc,g=Xc,h=Yc;return a.values=function(c){return arguments.length?(b=c,a):b},a.order=function(b){return arguments.length?(c="function"==typeof b?b:jg.get(b)||$c,a):c},a.offset=function(b){return arguments.length?(d="function"==typeof b?b:kg.get(b)||_c,a):d},a.x=function(b){return arguments.length?(g=b,a):g},a.y=function(b){return arguments.length?(h=b,a):h},a.out=function(b){return arguments.length?(f=b,a):f},a};var jg=d3.map({"inside-out":function(a){var b,c,d=a.length,e=a.map(ad),f=a.map(bd),g=d3.range(d).sort(function(a,b){return e[a]-e[b]}),h=0,i=0,j=[],k=[];for(b=0;d>b;++b)c=g[b],i>h?(h+=f[c],j.push(c)):(i+=f[c],k.push(c));return k.reverse().concat(j)},reverse:function(a){return d3.range(a.length).reverse()},"default":$c}),kg=d3.map({silhouette:function(a){var b,c,d,e=a.length,f=a[0].length,g=[],h=0,i=[];for(c=0;f>c;++c){for(b=0,d=0;e>b;b++)d+=a[b][c][1];d>h&&(h=d),g.push(d)}for(c=0;f>c;++c)i[c]=(h-g[c])/2;return i},wiggle:function(a){var b,c,d,e,f,g,h,i,j,k=a.length,l=a[0],m=l.length,n=[];for(n[0]=i=j=0,c=1;m>c;++c){for(b=0,e=0;k>b;++b)e+=a[b][c][1];for(b=0,f=0,h=l[c][0]-l[c-1][0];k>b;++b){for(d=0,g=(a[b][c][1]-a[b][c-1][1])/(2*h);b>d;++d)g+=(a[d][c][1]-a[d][c-1][1])/h;f+=g*a[b][c][1]}n[c]=i-=e?f/e*h:0,j>i&&(j=i)}for(c=0;m>c;++c)n[c]-=j;return n},expand:function(a){var b,c,d,e=a.length,f=a[0].length,g=1/e,h=[];for(c=0;f>c;++c){for(b=0,d=0;e>b;b++)d+=a[b][c][1];if(d)for(b=0;e>b;b++)a[b][c][1]/=d;else for(b=0;e>b;b++)a[b][c][1]=g}for(c=0;f>c;++c)h[c]=0;return h},zero:_c});d3.layout.histogram=function(){function a(a,f){for(var g,h,i=[],j=a.map(c,this),k=d.call(this,j,f),l=e.call(this,k,j,f),f=-1,m=j.length,n=l.length-1,o=b?1:1/m;++f<n;)g=i[f]=[],g.dx=l[f+1]-(g.x=l[f]),g.y=0;if(n>0)for(f=-1;++f<m;)h=j[f],h>=k[0]&&h<=k[1]&&(g=i[d3.bisect(l,h,1,n)-1],g.y+=o,g.push(a[f]));return i}var b=!0,c=Number,d=fd,e=dd;return a.value=function(b){return arguments.length?(c=b,a):c},a.range=function(b){return arguments.length?(d=h(b),a):d},a.bins=function(b){return arguments.length?(e="number"==typeof b?function(a){return ed(a,b)}:h(b),a):e},a.frequency=function(c){return arguments.length?(b=!!c,a):b},a},d3.layout.hierarchy=function(){function a(b,g,h){var i=e.call(c,b,g),j=lg?b:{data:b};if(j.depth=g,h.push(j),i&&(k=i.length)){for(var k,l,m=-1,n=j.children=[],o=0,p=g+1;++m<k;)l=a(i[m],p,h),l.parent=j,n.push(l),o+=l.value;d&&n.sort(d),f&&(j.value=o)}else f&&(j.value=+f.call(c,b,g)||0);return j}function b(a,d){var e=a.children,g=0;if(e&&(h=e.length))for(var h,i=-1,j=d+1;++i<h;)g+=b(e[i],j);else f&&(g=+f.call(c,lg?a:a.data,d)||0);return f&&(a.value=g),g}function c(b){var c=[];return a(b,0,c),c}var d=jd,e=hd,f=id;return c.sort=function(a){return arguments.length?(d=a,c):d},c.children=function(a){return arguments.length?(e=a,c):e},c.value=function(a){return arguments.length?(f=a,c):f},c.revalue=function(a){return b(a,0),a},c};var lg=!1;d3.layout.pack=function(){function a(a,e){var f=b.call(this,a,e),g=f[0];g.x=0,g.y=0,Fd(g,function(a){a.r=Math.sqrt(a.value)}),Fd(g,pd);var h=d[0],i=d[1],j=Math.max(2*g.r/h,2*g.r/i);if(c>0){var k=c*j/2;Fd(g,function(a){a.r+=k}),Fd(g,pd),Fd(g,function(a){a.r-=k}),j=Math.max(2*g.r/h,2*g.r/i)}return sd(g,h/2,i/2,1/j),f}var b=d3.layout.hierarchy().sort(ld),c=0,d=[1,1];return a.size=function(b){return arguments.length?(d=b,a):d},a.padding=function(b){return arguments.length?(c=+b,a):c},gd(a,b)},d3.layout.cluster=function(){function a(a,e){var f,g=b.call(this,a,e),h=g[0],i=0;Fd(h,function(a){var b=a.children;b&&b.length?(a.x=vd(b),a.y=ud(b)):(a.x=f?i+=c(a,f):0,a.y=0,f=a)});var j=wd(h),k=xd(h),l=j.x-c(j,k)/2,m=k.x+c(k,j)/2;return Fd(h,function(a){a.x=(a.x-l)/(m-l)*d[0],a.y=(1-(h.y?a.y/h.y:1))*d[1]}),g}var b=d3.layout.hierarchy().sort(null).value(null),c=yd,d=[1,1];return a.separation=function(b){return arguments.length?(c=b,a):c},a.size=function(b){return arguments.length?(d=b,a):d},gd(a,b)},d3.layout.tree=function(){function a(a,e){function f(a,b){var d=a.children,e=a._tree;if(d&&(g=d.length)){for(var g,i,j,k=d[0],l=k,m=-1;++m<g;)j=d[m],f(j,i),l=h(j,i,l),i=j;Gd(a);var n=.5*(k._tree.prelim+j._tree.prelim);b?(e.prelim=b._tree.prelim+c(a,b),e.mod=e.prelim-n):e.prelim=n}else b&&(e.prelim=b._tree.prelim+c(a,b))}function g(a,b){a.x=a._tree.prelim+b;var c=a.children;if(c&&(d=c.length)){var d,e=-1;for(b+=a._tree.mod;++e<d;)g(c[e],b)}}function h(a,b,d){if(b){for(var e,f=a,g=a,h=b,i=a.parent.children[0],j=f._tree.mod,k=g._tree.mod,l=h._tree.mod,m=i._tree.mod;h=Ad(h),f=zd(f),h&&f;)i=zd(i),g=Ad(g),g._tree.ancestor=a,e=h._tree.prelim+l-f._tree.prelim-j+c(h,f),e>0&&(Hd(Id(h,a,d),a,e),j+=e,k+=e),l+=h._tree.mod,j+=f._tree.mod,m+=i._tree.mod,k+=g._tree.mod;h&&!Ad(g)&&(g._tree.thread=h,g._tree.mod+=l-k),f&&!zd(i)&&(i._tree.thread=f,i._tree.mod+=j-m,d=a)}return d}var i=b.call(this,a,e),j=i[0];Fd(j,function(a,b){a._tree={ancestor:a,prelim:0,mod:0,change:0,shift:0,number:b?b._tree.number+1:0}}),f(j),g(j,-j._tree.prelim);var k=Bd(j,Dd),l=Bd(j,Cd),m=Bd(j,Ed),n=k.x-c(k,l)/2,o=l.x+c(l,k)/2,p=m.depth||1;return Fd(j,function(a){a.x=(a.x-n)/(o-n)*d[0],a.y=a.depth/p*d[1],delete a._tree}),i}var b=d3.layout.hierarchy().sort(null).value(null),c=yd,d=[1,1];return a.separation=function(b){return arguments.length?(c=b,a):c},a.size=function(b){return arguments.length?(d=b,a):d},gd(a,b)},d3.layout.treemap=function(){function a(a,b){for(var c,d,e=-1,f=a.length;++e<f;)d=(c=a[e]).value*(0>b?0:b),c.area=isNaN(d)||0>=d?0:d}function b(c){var f=c.children;if(f&&f.length){var g,h,i,j=l(c),k=[],m=f.slice(),n=1/0,o=Math.min(j.dx,j.dy);for(a(m,j.dx*j.dy/c.value),k.area=0;(i=m.length)>0;)k.push(g=m[i-1]),k.area+=g.area,(h=d(k,o))<=n?(m.pop(),n=h):(k.area-=k.pop().area,e(k,o,j,!1),o=Math.min(j.dx,j.dy),k.length=k.area=0,n=1/0);k.length&&(e(k,o,j,!0),k.length=k.area=0),f.forEach(b)}}function c(b){var d=b.children;if(d&&d.length){var f,g=l(b),h=d.slice(),i=[];for(a(h,g.dx*g.dy/b.value),i.area=0;f=h.pop();)i.push(f),i.area+=f.area,null!=f.z&&(e(i,f.z?g.dx:g.dy,g,!h.length),i.length=i.area=0);d.forEach(c)}}function d(a,b){for(var c,d=a.area,e=0,f=1/0,g=-1,h=a.length;++g<h;)(c=a[g].area)&&(f>c&&(f=c),c>e&&(e=c));return d*=d,b*=b,d?Math.max(b*e*n/d,d/(b*f*n)):1/0}function e(a,b,c,d){var e,f=-1,g=a.length,h=c.x,j=c.y,k=b?i(a.area/b):0;if(b==c.dx){for((d||k>c.dy)&&(k=c.dy);++f<g;)e=a[f],e.x=h,e.y=j,e.dy=k,h+=e.dx=Math.min(c.x+c.dx-h,k?i(e.area/k):0);e.z=!0,e.dx+=c.x+c.dx-h,c.y+=k,c.dy-=k}else{for((d||k>c.dx)&&(k=c.dx);++f<g;)e=a[f],e.x=h,e.y=j,e.dx=k,j+=e.dy=Math.min(c.y+c.dy-j,k?i(e.area/k):0);e.z=!1,e.dy+=c.y+c.dy-j,c.x+=k,c.dx-=k}}function f(d){var e=g||h(d),f=e[0];return f.x=0,f.y=0,f.dx=j[0],f.dy=j[1],g&&h.revalue(f),a([f],f.dx*f.dy/f.value),(g?c:b)(f),m&&(g=e),e}var g,h=d3.layout.hierarchy(),i=Math.round,j=[1,1],k=null,l=Jd,m=!1,n=.5*(1+Math.sqrt(5));return f.size=function(a){return arguments.length?(j=a,f):j},f.padding=function(a){function b(b){var c=a.call(f,b,b.depth);return null==c?Jd(b):Kd(b,"number"==typeof c?[c,c,c,c]:c)}function c(b){return Kd(b,a)}if(!arguments.length)return k;var d;return l=null==(k=a)?Jd:"function"==(d=typeof a)?b:"number"===d?(a=[a,a,a,a],c):c,f},f.round=function(a){return arguments.length?(i=a?Math.round:Number,f):i!=Number},f.sticky=function(a){return arguments.length?(m=a,g=null,f):m},f.ratio=function(a){return arguments.length?(n=a,f):n},gd(f,h)},d3.csv=Ld(",","text/csv"),d3.tsv=Ld(" ","text/tab-separated-values"),d3.geo={};var mg=Math.PI/180;d3.geo.azimuthal=function(){function a(a){var b,d=a[0]*mg-c,j=a[1]*mg,k=Math.cos(d),l=Math.sin(d),m=Math.cos(j),n=Math.sin(j),o="orthographic"!==g?f*n+e*m*k:null,p="stereographic"===g?1/(1+o):"gnomonic"===g?1/o:"equidistant"===g?(b=Math.acos(o),b?b/Math.sin(b):0):"equalarea"===g?Math.sqrt(2/(1+o)):1,q=p*m*l,r=p*(f*m*k-e*n);return[h*q+i[0],h*r+i[1]]}var b,c,d,e,f,g="orthographic",h=200,i=[480,250];return a.invert=function(a){var b=(a[0]-i[0])/h,d=(a[1]-i[1])/h,j=Math.sqrt(b*b+d*d),k="stereographic"===g?2*Math.atan(j):"gnomonic"===g?Math.atan(j):"equidistant"===g?j:"equalarea"===g?2*Math.asin(.5*j):Math.asin(j),l=Math.sin(k),m=Math.cos(k);return[(c+Math.atan2(b*l,j*e*m+d*f*l))/mg,Math.asin(m*f-(j?d*l*e/j:0))/mg]},a.mode=function(b){return arguments.length?(g=b+"",a):g},a.origin=function(g){return arguments.length?(b=g,c=b[0]*mg,d=b[1]*mg,e=Math.cos(d),f=Math.sin(d),a):b},a.scale=function(b){return arguments.length?(h=+b,a):h},a.translate=function(b){return arguments.length?(i=[+b[0],+b[1]],a):i},a.origin([0,0])},d3.geo.albers=function(){function a(a){var b=d*(mg*a[0]-c),g=Math.sqrt(e-2*d*Math.sin(mg*a[1]))/d;return[i*g*Math.sin(b)+j[0],i*(g*Math.cos(b)-f)+j[1]]}function b(){var b=mg*h[0],i=mg*h[1],j=mg*g[1],k=Math.sin(b),l=Math.cos(b);return c=mg*g[0],d=.5*(k+Math.sin(i)),e=l*l+2*d*k,f=Math.sqrt(e-2*d*Math.sin(j))/d,a}var c,d,e,f,g=[-98,38],h=[29.5,45.5],i=1e3,j=[480,250];return a.invert=function(a){var b=(a[0]-j[0])/i,g=(a[1]-j[1])/i,h=f+g,k=Math.atan2(b,h),l=Math.sqrt(b*b+h*h);return[(c+k/d)/mg,Math.asin((e-l*l*d*d)/(2*d))/mg]},a.origin=function(a){return arguments.length?(g=[+a[0],+a[1]],b()):g},a.parallels=function(a){return arguments.length?(h=[+a[0],+a[1]],b()):h},a.scale=function(b){return arguments.length?(i=+b,a):i},a.translate=function(b){return arguments.length?(j=[+b[0],+b[1]],a):j},b()},d3.geo.albersUsa=function(){function a(a){var f=a[0],g=a[1];return(g>50?c:-140>f?d:21>g?e:b)(a)}var b=d3.geo.albers(),c=d3.geo.albers().origin([-160,60]).parallels([55,65]),d=d3.geo.albers().origin([-160,20]).parallels([8,18]),e=d3.geo.albers().origin([-60,10]).parallels([8,18]);return a.scale=function(f){return arguments.length?(b.scale(f),c.scale(.6*f),d.scale(f),e.scale(1.5*f),a.translate(b.translate())):b.scale()},a.translate=function(f){if(!arguments.length)return b.translate();var g=b.scale()/1e3,h=f[0],i=f[1];return b.translate(f),c.translate([h-400*g,i+170*g]),d.translate([h-190*g,i+200*g]),e.translate([h+580*g,i+430*g]),a},a.scale(b.scale())},d3.geo.bonne=function(){function a(a){var h=a[0]*mg-b,i=a[1]*mg-c;if(d){var j=e+d-i,k=h*Math.cos(i)/j;h=j*Math.sin(k),i=j*Math.cos(k)-e}else h*=Math.cos(i),i*=-1;return[f*h+g[0],f*i+g[1]]}var b,c,d,e,f=200,g=[480,250];return a.invert=function(a){var c=(a[0]-g[0])/f,h=(a[1]-g[1])/f;if(d){var i=e+h,j=Math.sqrt(c*c+i*i);h=e+d-j,c=b+j*Math.atan2(c,i)/Math.cos(h)}else h*=-1,c/=Math.cos(h);return[c/mg,h/mg]},a.parallel=function(b){return arguments.length?(e=1/Math.tan(d=b*mg),a):d/mg},a.origin=function(d){return arguments.length?(b=d[0]*mg,c=d[1]*mg,a):[b/mg,c/mg]},a.scale=function(b){return arguments.length?(f=+b,a):f},a.translate=function(b){return arguments.length?(g=[+b[0],+b[1]],a):g},a.origin([0,0]).parallel(45)},d3.geo.equirectangular=function(){function a(a){var d=a[0]/360,e=-a[1]/360;return[b*d+c[0],b*e+c[1]]}var b=500,c=[480,250];return a.invert=function(a){var d=(a[0]-c[0])/b,e=(a[1]-c[1])/b;return[360*d,-360*e]},a.scale=function(c){return arguments.length?(b=+c,a):b},a.translate=function(b){return arguments.length?(c=[+b[0],+b[1]],a):c},a},d3.geo.mercator=function(){function a(a){var d=a[0]/360,e=-(Math.log(Math.tan(Math.PI/4+a[1]*mg/2))/mg)/360;return[b*d+c[0],b*Math.max(-.5,Math.min(.5,e))+c[1]]}var b=500,c=[480,250];return a.invert=function(a){var d=(a[0]-c[0])/b,e=(a[1]-c[1])/b;return[360*d,2*Math.atan(Math.exp(-360*e*mg))/mg-90]},a.scale=function(c){return arguments.length?(b=+c,a):b},a.translate=function(b){return arguments.length?(c=[+b[0],+b[1]],a):c},a},d3.geo.path=function(){function a(a){"function"==typeof f&&(g=Nd(f.apply(this,arguments))),j(a);var b=i.length?i.join(""):null;return i=[],b}function b(a){return h(a).join(",")}function c(a){for(var b=e(a[0]),c=0,d=a.length;++c<d;)b-=e(a[c]);return b}function d(a){for(var b=d3.geom.polygon(a[0].map(h)),c=b.area(),d=b.centroid(0>c?(c*=-1,1):-1),e=d[0],f=d[1],g=c,i=0,j=a.length;++i<j;)b=d3.geom.polygon(a[i].map(h)),c=b.area(),d=b.centroid(0>c?(c*=-1,1):-1),e-=d[0],f-=d[1],g-=c;return[e,f,6*g]}function e(a){return Math.abs(d3.geom.polygon(a.map(h)).area())}var f=4.5,g=Nd(f),h=d3.geo.albersUsa(),i=[],j=Md({FeatureCollection:function(a){for(var b=a.features,c=-1,d=b.length;++c<d;)i.push(j(b[c].geometry))},Feature:function(a){j(a.geometry)},Point:function(a){i.push("M",b(a.coordinates),g)},MultiPoint:function(a){for(var c=a.coordinates,d=-1,e=c.length;++d<e;)i.push("M",b(c[d]),g)},LineString:function(a){var c=a.coordinates,d=-1,e=c.length;for(i.push("M");++d<e;)i.push(b(c[d]),"L");i.pop()},MultiLineString:function(a){for(var c,d,e,f=a.coordinates,g=-1,h=f.length;++g<h;){for(c=f[g],d=-1,e=c.length,i.push("M");++d<e;)i.push(b(c[d]),"L");i.pop()}},Polygon:function(a){for(var c,d,e,f=a.coordinates,g=-1,h=f.length;++g<h;)if(c=f[g],d=-1,(e=c.length-1)>0){for(i.push("M");++d<e;)i.push(b(c[d]),"L");i[i.length-1]="Z"}},MultiPolygon:function(a){for(var c,d,e,f,g,h,j=a.coordinates,k=-1,l=j.length;++k<l;)for(c=j[k],d=-1,e=c.length;++d<e;)if(f=c[d],g=-1,(h=f.length-1)>0){for(i.push("M");++g<h;)i.push(b(f[g]),"L");i[i.length-1]="Z"}},GeometryCollection:function(a){for(var b=a.geometries,c=-1,d=b.length;++c<d;)i.push(j(b[c]))}}),k=a.area=Md({FeatureCollection:function(a){for(var b=0,c=a.features,d=-1,e=c.length;++d<e;)b+=k(c[d]);return b},Feature:function(a){return k(a.geometry)},Polygon:function(a){return c(a.coordinates)},MultiPolygon:function(a){for(var b=0,d=a.coordinates,e=-1,f=d.length;++e<f;)b+=c(d[e]);return b},GeometryCollection:function(a){for(var b=0,c=a.geometries,d=-1,e=c.length;++d<e;)b+=k(c[d]);return b}},0),l=a.centroid=Md({Feature:function(a){return l(a.geometry)},Polygon:function(a){var b=d(a.coordinates);return[b[0]/b[2],b[1]/b[2]]},MultiPolygon:function(a){for(var b,c=a.coordinates,e=0,f=0,g=0,h=-1,i=c.length;++h<i;)b=d(c[h]),e+=b[0],f+=b[1],g+=b[2];return[e/g,f/g]}});return a.projection=function(b){return h=b,a},a.pointRadius=function(b){return"function"==typeof b?f=b:(f=+b,g=Nd(f)),a},a},d3.geo.bounds=function(a){var b=1/0,c=1/0,d=-1/0,e=-1/0;return Od(a,function(a,f){b>a&&(b=a),a>d&&(d=a),c>f&&(c=f),f>e&&(e=f)}),[[b,c],[d,e]]};var ng={Feature:Pd,FeatureCollection:Qd,GeometryCollection:Rd,LineString:Sd,MultiLineString:Td,MultiPoint:Sd,MultiPolygon:Ud,Point:Vd,Polygon:Wd};d3.geo.circle=function(){function a(){}function b(a){return i.distance(a)<h}function c(a){for(var b,c,e,f,g,j=-1,k=a.length,l=[];++j<k;)g=i.distance(e=a[j]),h>g?(c&&l.push($d(c,e)((f-h)/(f-g))),l.push(e),b=c=null):(c=e,!b&&l.length&&(l.push($d(l[l.length-1],c)((h-f)/(g-f))),b=c)),f=g;return b=a[0],c=l[0],!c||e[0]!==b[0]||e[1]!==b[1]||e[0]===c[0]&&e[1]===c[1]||l.push(c),d(l)}function d(a){for(var b,c,d,e=0,f=a.length,g=f?[a[0]]:a,h=i.source();++e<f;)for(d=i.source(a[e-1])(a[e]).coordinates,b=0,c=d.length;++b<c;)g.push(d[b]);return i.source(h),g}var f=[0,0],g=89.99,h=g*mg,i=d3.geo.greatArc().source(f).target(e);a.clip=function(a){return"function"==typeof f&&i.source(f.apply(this,arguments)),j(a)||null};var j=Md({FeatureCollection:function(a){var b=a.features.map(j).filter(e);
-return b&&(a=Object.create(a),a.features=b,a)},Feature:function(a){var b=j(a.geometry);return b&&(a=Object.create(a),a.geometry=b,a)},Point:function(a){return b(a.coordinates)&&a},MultiPoint:function(a){var c=a.coordinates.filter(b);return c.length&&{type:a.type,coordinates:c}},LineString:function(a){var b=c(a.coordinates);return b.length&&(a=Object.create(a),a.coordinates=b,a)},MultiLineString:function(a){var b=a.coordinates.map(c).filter(function(a){return a.length});return b.length&&(a=Object.create(a),a.coordinates=b,a)},Polygon:function(a){var b=a.coordinates.map(c);return b[0].length&&(a=Object.create(a),a.coordinates=b,a)},MultiPolygon:function(a){var b=a.coordinates.map(function(a){return a.map(c)}).filter(function(a){return a[0].length});return b.length&&(a=Object.create(a),a.coordinates=b,a)},GeometryCollection:function(a){var b=a.geometries.map(j).filter(e);return b.length&&(a=Object.create(a),a.geometries=b,a)}});return a.origin=function(b){return arguments.length?(f=b,"function"!=typeof f&&i.source(f),a):f},a.angle=function(b){return arguments.length?(h=(g=+b)*mg,a):g},d3.rebind(a,i,"precision")},d3.geo.greatArc=function(){function a(){for(var d=a.distance.apply(this,arguments),e=0,h=f/d,i=[b];(e+=h)<1;)i.push(g(e));return i.push(c),{type:"LineString",coordinates:i}}var b,c,d=Xd,e=Yd,f=6*mg,g=Zd();return a.distance=function(){return"function"==typeof d&&g.source(b=d.apply(this,arguments)),"function"==typeof e&&g.target(c=e.apply(this,arguments)),g.distance()},a.source=function(c){return arguments.length?(d=c,"function"!=typeof d&&g.source(b=d),a):d},a.target=function(b){return arguments.length?(e=b,"function"!=typeof e&&g.target(c=e),a):e},a.precision=function(b){return arguments.length?(f=b*mg,a):f/mg},a},d3.geo.greatCircle=d3.geo.circle,d3.geom={},d3.geom.contour=function(a,b){var c=b||_d(a),d=[],e=c[0],f=c[1],g=0,h=0,i=0/0,j=0/0,k=0;do k=0,a(e-1,f-1)&&(k+=1),a(e,f-1)&&(k+=2),a(e-1,f)&&(k+=4),a(e,f)&&(k+=8),6===k?(g=-1===j?-1:1,h=0):9===k?(g=0,h=1===i?-1:1):(g=og[k],h=pg[k]),g!=i&&h!=j&&(d.push([e,f]),i=g,j=h),e+=g,f+=h;while(c[0]!=e||c[1]!=f);return d};var og=[1,0,1,1,-1,0,-1,1,0,0,0,0,-1,0,-1,0/0],pg=[0,-1,0,0,0,-1,0,0,1,-1,1,1,0,-1,0,0/0];d3.geom.hull=function(a){if(a.length<3)return[];var b,c,d,e,f,g,h,i,j,k,l=a.length,m=l-1,n=[],o=[],p=0;for(b=1;l>b;++b)a[b][1]<a[p][1]?p=b:a[b][1]==a[p][1]&&(p=a[b][0]<a[p][0]?b:p);for(b=0;l>b;++b)b!==p&&(e=a[b][1]-a[p][1],d=a[b][0]-a[p][0],n.push({angle:Math.atan2(e,d),index:b}));for(n.sort(function(a,b){return a.angle-b.angle}),j=n[0].angle,i=n[0].index,h=0,b=1;m>b;++b)c=n[b].index,j==n[b].angle?(d=a[i][0]-a[p][0],e=a[i][1]-a[p][1],f=a[c][0]-a[p][0],g=a[c][1]-a[p][1],d*d+e*e>=f*f+g*g?n[b].index=-1:(n[h].index=-1,j=n[b].angle,h=b,i=c)):(j=n[b].angle,h=b,i=c);for(o.push(p),b=0,c=0;2>b;++c)-1!==n[c].index&&(o.push(n[c].index),b++);for(k=o.length;m>c;++c)if(-1!==n[c].index){for(;!ae(o[k-2],o[k-1],n[c].index,a);)--k;o[k++]=n[c].index}var q=[];for(b=0;k>b;++b)q.push(a[o[b]]);return q},d3.geom.polygon=function(a){return a.area=function(){for(var b=0,c=a.length,d=a[c-1][0]*a[0][1],e=a[c-1][1]*a[0][0];++b<c;)d+=a[b-1][0]*a[b][1],e+=a[b-1][1]*a[b][0];return.5*(e-d)},a.centroid=function(b){var c,d,e=-1,f=a.length,g=0,h=0,i=a[f-1];for(arguments.length||(b=-1/(6*a.area()));++e<f;)c=i,i=a[e],d=c[0]*i[1]-i[0]*c[1],g+=(c[0]+i[0])*d,h+=(c[1]+i[1])*d;return[g*b,h*b]},a.clip=function(b){for(var c,d,e,f,g,h,i=-1,j=a.length,k=a[j-1];++i<j;){for(c=b.slice(),b.length=0,f=a[i],g=c[(e=c.length)-1],d=-1;++d<e;)h=c[d],be(h,k,f)?(be(g,k,f)||b.push(ce(g,h,k,f)),b.push(h)):be(g,k,f)&&b.push(ce(g,h,k,f)),g=h;k=f}return b},a},d3.geom.voronoi=function(a){var b=a.map(function(){return[]});return de(a,function(a){var c,d,e,f,g,h;1===a.a&&a.b>=0?(c=a.ep.r,d=a.ep.l):(c=a.ep.l,d=a.ep.r),1===a.a?(g=c?c.y:-1e6,e=a.c-a.b*g,h=d?d.y:1e6,f=a.c-a.b*h):(e=c?c.x:-1e6,g=a.c-a.a*e,f=d?d.x:1e6,h=a.c-a.a*f);var i=[e,g],j=[f,h];b[a.region.l.index].push(i,j),b[a.region.r.index].push(i,j)}),b.map(function(b,c){var d=a[c][0],e=a[c][1];return b.forEach(function(a){a.angle=Math.atan2(a[0]-d,a[1]-e)}),b.sort(function(a,b){return a.angle-b.angle}).filter(function(a,c){return!c||a.angle-b[c-1].angle>1e-10})})};var qg={l:"r",r:"l"};d3.geom.delaunay=function(a){var b=a.map(function(){return[]}),c=[];return de(a,function(c){b[c.region.l.index].push(a[c.region.r.index])}),b.forEach(function(b,d){var e=a[d],f=e[0],g=e[1];b.forEach(function(a){a.angle=Math.atan2(a[0]-f,a[1]-g)}),b.sort(function(a,b){return a.angle-b.angle});for(var h=0,i=b.length-1;i>h;h++)c.push([e,b[h],b[h+1]])}),c},d3.geom.quadtree=function(a,b,c,d,e){function f(a,b,c,d,e,f){if(!isNaN(b.x)&&!isNaN(b.y))if(a.leaf){var h=a.point;h?Math.abs(h.x-b.x)+Math.abs(h.y-b.y)<.01?g(a,b,c,d,e,f):(a.point=null,g(a,h,c,d,e,f),g(a,b,c,d,e,f)):a.point=b}else g(a,b,c,d,e,f)}function g(a,b,c,d,e,g){var h=.5*(c+e),i=.5*(d+g),j=b.x>=h,k=b.y>=i,l=(k<<1)+j;a.leaf=!1,a=a.nodes[l]||(a.nodes[l]=ee()),j?c=h:e=h,k?d=i:g=i,f(a,b,c,d,e,g)}var h,i=-1,j=a.length;if(j&&isNaN(a[0].x)&&(a=a.map(ge)),arguments.length<5)if(3===arguments.length)e=d=c,c=b;else{for(b=c=1/0,d=e=-1/0;++i<j;)h=a[i],h.x<b&&(b=h.x),h.y<c&&(c=h.y),h.x>d&&(d=h.x),h.y>e&&(e=h.y);var k=d-b,l=e-c;k>l?e=c+k:d=b+l}var m=ee();return m.add=function(a){f(m,a,b,c,d,e)},m.visit=function(a){fe(a,m,b,c,d,e)},a.forEach(m.add),m},d3.time={};var rg=Date,sg=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];he.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){tg.setUTCDate.apply(this._,arguments)},setDay:function(){tg.setUTCDay.apply(this._,arguments)},setFullYear:function(){tg.setUTCFullYear.apply(this._,arguments)},setHours:function(){tg.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){tg.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){tg.setUTCMinutes.apply(this._,arguments)},setMonth:function(){tg.setUTCMonth.apply(this._,arguments)},setSeconds:function(){tg.setUTCSeconds.apply(this._,arguments)},setTime:function(){tg.setTime.apply(this._,arguments)}};var tg=Date.prototype,ug="%a %b %e %H:%M:%S %Y",vg="%m/%d/%y",wg="%H:%M:%S",xg=sg,yg=xg.map(ie),zg=["January","February","March","April","May","June","July","August","September","October","November","December"],Ag=zg.map(ie);d3.time.format=function(a){function b(b){for(var d,e,f=[],g=-1,h=0;++g<c;)37==a.charCodeAt(g)&&(f.push(a.substring(h,g),(e=Lg[d=a.charAt(++g)])?e(b):d),h=g+1);return f.push(a.substring(h,g)),f.join("")}var c=a.length;return b.parse=function(b){var c={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},d=je(c,a,b,0);if(d!=b.length)return null;"p"in c&&(c.H=c.H%12+12*c.p);var e=new rg;return e.setFullYear(c.y,c.m,c.d),e.setHours(c.H,c.M,c.S,c.L),e},b.toString=function(){return a},b};var Bg=d3.format("02d"),Cg=d3.format("03d"),Dg=d3.format("04d"),Eg=d3.format("2d"),Fg=ke(xg),Gg=ke(yg),Hg=ke(zg),Ig=le(zg),Jg=ke(Ag),Kg=le(Ag),Lg={a:function(a){return yg[a.getDay()]},A:function(a){return xg[a.getDay()]},b:function(a){return Ag[a.getMonth()]},B:function(a){return zg[a.getMonth()]},c:d3.time.format(ug),d:function(a){return Bg(a.getDate())},e:function(a){return Eg(a.getDate())},H:function(a){return Bg(a.getHours())},I:function(a){return Bg(a.getHours()%12||12)},j:function(a){return Cg(1+d3.time.dayOfYear(a))},L:function(a){return Cg(a.getMilliseconds())},m:function(a){return Bg(a.getMonth()+1)},M:function(a){return Bg(a.getMinutes())},p:function(a){return a.getHours()>=12?"PM":"AM"},S:function(a){return Bg(a.getSeconds())},U:function(a){return Bg(d3.time.sundayOfYear(a))},w:function(a){return a.getDay()},W:function(a){return Bg(d3.time.mondayOfYear(a))},x:d3.time.format(vg),X:d3.time.format(wg),y:function(a){return Bg(a.getFullYear()%100)},Y:function(a){return Dg(a.getFullYear()%1e4)},Z:De,"%":function(){return"%"}},Mg={a:me,A:ne,b:oe,B:pe,c:qe,d:xe,e:xe,H:ye,I:ye,L:Be,m:we,M:ze,p:Ce,S:Ae,x:re,X:se,y:ue,Y:te},Ng=/^\s*\d+/,Og=d3.map({am:0,pm:1});d3.time.format.utc=function(a){function b(a){try{rg=he;var b=new rg;return b._=a,c(b)}finally{rg=Date}}var c=d3.time.format(a);return b.parse=function(a){try{rg=he;var b=c.parse(a);return b&&b._}finally{rg=Date}},b.toString=c.toString,b};var Pg=d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");d3.time.format.iso=Date.prototype.toISOString?Ee:Pg,Ee.parse=function(a){var b=new Date(a);return isNaN(b)?null:b},Ee.toString=Pg.toString,d3.time.second=Fe(function(a){return new rg(1e3*Math.floor(a/1e3))},function(a,b){a.setTime(a.getTime()+1e3*Math.floor(b))},function(a){return a.getSeconds()}),d3.time.seconds=d3.time.second.range,d3.time.seconds.utc=d3.time.second.utc.range,d3.time.minute=Fe(function(a){return new rg(6e4*Math.floor(a/6e4))},function(a,b){a.setTime(a.getTime()+6e4*Math.floor(b))},function(a){return a.getMinutes()}),d3.time.minutes=d3.time.minute.range,d3.time.minutes.utc=d3.time.minute.utc.range,d3.time.hour=Fe(function(a){var b=a.getTimezoneOffset()/60;return new rg(36e5*(Math.floor(a/36e5-b)+b))},function(a,b){a.setTime(a.getTime()+36e5*Math.floor(b))},function(a){return a.getHours()}),d3.time.hours=d3.time.hour.range,d3.time.hours.utc=d3.time.hour.utc.range,d3.time.day=Fe(function(a){var b=new rg(1970,0);return b.setFullYear(a.getFullYear(),a.getMonth(),a.getDate()),b},function(a,b){a.setDate(a.getDate()+b)},function(a){return a.getDate()-1}),d3.time.days=d3.time.day.range,d3.time.days.utc=d3.time.day.utc.range,d3.time.dayOfYear=function(a){var b=d3.time.year(a);return Math.floor((a-b-6e4*(a.getTimezoneOffset()-b.getTimezoneOffset()))/864e5)},sg.forEach(function(a,b){a=a.toLowerCase(),b=7-b;var c=d3.time[a]=Fe(function(a){return(a=d3.time.day(a)).setDate(a.getDate()-(a.getDay()+b)%7),a},function(a,b){a.setDate(a.getDate()+7*Math.floor(b))},function(a){var c=d3.time.year(a).getDay();return Math.floor((d3.time.dayOfYear(a)+(c+b)%7)/7)-(c!==b)});d3.time[a+"s"]=c.range,d3.time[a+"s"].utc=c.utc.range,d3.time[a+"OfYear"]=function(a){var c=d3.time.year(a).getDay();return Math.floor((d3.time.dayOfYear(a)+(c+b)%7)/7)}}),d3.time.week=d3.time.sunday,d3.time.weeks=d3.time.sunday.range,d3.time.weeks.utc=d3.time.sunday.utc.range,d3.time.weekOfYear=d3.time.sundayOfYear,d3.time.month=Fe(function(a){return a=d3.time.day(a),a.setDate(1),a},function(a,b){a.setMonth(a.getMonth()+b)},function(a){return a.getMonth()}),d3.time.months=d3.time.month.range,d3.time.months.utc=d3.time.month.utc.range,d3.time.year=Fe(function(a){return a=d3.time.day(a),a.setMonth(0,1),a},function(a,b){a.setFullYear(a.getFullYear()+b)},function(a){return a.getFullYear()}),d3.time.years=d3.time.year.range,d3.time.years.utc=d3.time.year.utc.range;var Qg=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Rg=[[d3.time.second,1],[d3.time.second,5],[d3.time.second,15],[d3.time.second,30],[d3.time.minute,1],[d3.time.minute,5],[d3.time.minute,15],[d3.time.minute,30],[d3.time.hour,1],[d3.time.hour,3],[d3.time.hour,6],[d3.time.hour,12],[d3.time.day,1],[d3.time.day,2],[d3.time.week,1],[d3.time.month,1],[d3.time.month,3],[d3.time.year,1]],Sg=[[d3.time.format("%Y"),function(){return!0}],[d3.time.format("%B"),function(a){return a.getMonth()}],[d3.time.format("%b %d"),function(a){return 1!=a.getDate()}],[d3.time.format("%a %d"),function(a){return a.getDay()&&1!=a.getDate()}],[d3.time.format("%I %p"),function(a){return a.getHours()}],[d3.time.format("%I:%M"),function(a){return a.getMinutes()}],[d3.time.format(":%S"),function(a){return a.getSeconds()}],[d3.time.format(".%L"),function(a){return a.getMilliseconds()}]],Tg=d3.scale.linear(),Ug=Ke(Sg);Rg.year=function(a,b){return Tg.domain(a.map(Me)).ticks(b).map(Le)},d3.time.scale=function(){return He(d3.scale.linear(),Rg,Ug)};var Vg=Rg.map(function(a){return[a[0].utc,a[1]]}),Wg=[[d3.time.format.utc("%Y"),function(){return!0}],[d3.time.format.utc("%B"),function(a){return a.getUTCMonth()}],[d3.time.format.utc("%b %d"),function(a){return 1!=a.getUTCDate()}],[d3.time.format.utc("%a %d"),function(a){return a.getUTCDay()&&1!=a.getUTCDate()}],[d3.time.format.utc("%I %p"),function(a){return a.getUTCHours()}],[d3.time.format.utc("%I:%M"),function(a){return a.getUTCMinutes()}],[d3.time.format.utc(":%S"),function(a){return a.getUTCSeconds()}],[d3.time.format.utc(".%L"),function(a){return a.getUTCMilliseconds()}]],Xg=Ke(Wg);Vg.year=function(a,b){return Tg.domain(a.map(Oe)).ticks(b).map(Ne)},d3.time.scale.utc=function(){return He(d3.scale.linear(),Vg,Xg)}}(),define("d3",function(){}),define("helpers",["d3"],function(){var a={};return a.imageUrl=function(a){return a},a.docs={docs:"http://docs.couchdb.org/en/latest/intro/api.html#documents",all_dbs:"http://docs.couchdb.org/en/latest/api/server/common.html?highlight=all_dbs#get--_all_dbs",replication_doc:"http://docs.couchdb.org/en/latest/replication/replicator.html#basics",design_doc:"http://docs.couchdb.org/en/latest/couchapp/ddocs.html#design-docs",view_functions:"http://docs.couchdb.org/en/latest/couchapp/ddocs.html#view-functions",map_functions:"http://docs.couchdb.org/en/latest/couchapp/ddocs.html#map-functions",reduce_functions:"http://docs.couchdb.org/en/latest/couchapp/ddocs.html#reduce-and-rereduce-functions",api_reference:"http://docs.couchdb.org/en/latest/http-api.html",database_permission:"http://docs.couchdb.org/en/latest/api/database/security.html#db-security",stats:"http://docs.couchdb.org/en/latest/api/server/common.html?highlight=stats#get--_stats",_active_tasks:"http://docs.couchdb.org/en/latest/api/server/common.html?highlight=stats#active-tasks",log:"http://docs.couchdb.org/en/latest/api/server/common.html?highlight=stats#log",config:"http://docs.couchdb.org/en/latest/config/index.html",views:"http://docs.couchdb.org/en/latest/intro/overview.html#views"},a.getDocUrl=function(b){return a.docs[b]||"#"},a.formatSize=function(a){var b=512;if(b>a)return a+" bytes";for(var c=["KB","MB","GB","TB","PB","EB","ZB","YB"],d=0;a>=b&&d<c.length;)d+=1,a/=1024;return a.toFixed(1)+" "+c[d-1]},a.formatDate=function(a){return format=d3.time.format("%b. %e at %H:%M%p"),format(new Date(1e3*a))},a}),define("mixins",["jquery","lodash"],function(a,b){var c={},d={};return c.addWindowResize=function(a,b){d[b]=a},c.removeWindowResize=function(a){delete d[a],c.initWindowResize()},c.initWindowResize=function(){window.onresize=function(){b.each(d,function(a){a()})}},c.removeSpecialCharacters=function(a){return a.replace(/[^\w\s]/gi,"")},c.safeURLName=function(a){var b=a.match(/[\$\-/_,+-]/g);return null!==b?encodeURIComponent(a):a},c}),function(a,b){var c=a.Backbone;return"function"==typeof define&&define.amd?define("plugins/backbone.layoutmanager",["backbone","underscore","jquery"],function(){return b.apply(a,arguments)}):(c.Layout=b.call(a,c,a._,c.$),void 0)}("object"==typeof global?global:this,function(a,b,c){var d,e=this,f=a.View.prototype._configure,g=Array.prototype.push,h=Array.prototype.concat,i=Array.prototype.splice,j=a.View.extend({_render:function(a,b){var c=this,d=c.__manager__,e=b.beforeRender,f=b.deferred();return c.hasRendered&&c._removeViews(),d.callback=function(){delete d.isAsync,delete d.callback,c.trigger("beforeRender",c),a(c,b).render().then(function(){f.resolve()})},e&&e.call(c,c),d.isAsync||d.callback(),f.promise()},constructor:function(b){b=b||{},j.setupView(this,b),a.View.call(this,b)},async:function(){var a=this.__manager__;return a.isAsync=!0,a.callback},promise:function(){return this.__manager__.renderDeferred.promise()},renderViews:function(){var a=this,b=a.__manager__,c=a.getAllOptions(),d=c.deferred(),e=a.getViews().map(function(a){return a.render().__manager__.renderDeferred}).value();return b.renderDeferred=d.promise(),c.when(e).then(function(){d.resolveWith(a,[a])}),a},insertView:function(a,b){return b?this.setView(a,b,!0):this.setView(a,!0)},insertViews:function(a){return b.isArray(a)?this.setViews({"":a}):(b.each(a,function(c,d){a[d]=b.isArray(c)?c:[c]}),this.setViews(a))},getView:function(a){return null==a&&(a=arguments[1]),this.getViews(a).first().value()},getViews:function(a){var c;return"string"==typeof a?(a=this.sections[a]||a,c=this.views[a]||[],b.chain([].concat(c))):(c=b.chain(this.views).map(function(a){return b.isArray(a)?a:[a]},this).flatten(),"object"==typeof a?c.where(a):"function"==typeof a?c.filter(a):c)},removeView:function(a){return this.getViews(a).each(function(a){a.remove()})},setView:function(a,c,d){var e,f,g,i=this;if("string"!=typeof a&&(d=c,c=a,a=""),e=c.__manager__,!e)throw new Error("The argument associated with selector '"+a+"' is defined and a View. Set `manage` property to true for Backbone.View instances.");return f=c.getAllOptions(),e.parent=i,g=e.selector=i.sections[a]||a,b.result(c,"setup"),d?(i.views[g]=h.call([],i.views[a]||[],c),i.__manager__.insert=!0,c):(c.hasRendered&&f.partial(i.$el,c.$el,i.__manager__,e),i.removeView(a),i.views[g]=c)},setViews:function(a){return b.each(a,function(a,c){return b.isArray(a)?b.each(a,function(a){this.insertView(c,a)},this):(this.setView(c,a),void 0)},this),this},render:function(){function a(){function a(){var a=e.console,c=f.afterRender;c&&c.call(d,d),d.trigger("afterRender",d),h.noel&&d.$el.length>1&&b.isFunction(a.warn)&&!f.suppressWarnings&&(a.warn("`el: false` with multiple top level elements is not supported."),b.isFunction(a.trace)&&a.trace())}var c;return b.each(d.views,function(a,c){b.isArray(a)&&f.htmlBatch(d,a,c)}),i&&!h.insertedViaFragment&&(f.contains(i.el,d.el)||i.getAllOptions().partial(i.$el,d.$el,k,h)),d.delegateEvents(),d.hasRendered=!0,(c=h.queue.shift())?c():delete h.queue,k&&k.queue?i.once("afterRender",a):a(),l.resolveWith(d,[d])}function c(){var c=d.getAllOptions();d._render(j._viewRender,c).done(function(){if(!b.keys(d.views).length)return a();var e=b.map(d.views,function(a){var d=b.isArray(a);return d&&a.length?c.when(b.map(a,function(a){return a.__manager__.insertedViaFragment=!0,a.render().__manager__.renderDeferred})):d?a:a.render().__manager__.renderDeferred});c.when(e).done(a)})}var d=this,f=d.getAllOptions(),h=d.__manager__,i=h.parent,k=i&&i.__manager__,l=f.deferred();return h.queue?g.call(h.queue,c):(h.queue=[],c(d,l)),d.__manager__.renderDeferred=l,d},remove:function(){return j._removeView(this,!0),this._remove.apply(this,arguments)},getAllOptions:function(){return b.extend({},this,j.prototype.options,this.options)}},{_cache:{},_viewRender:function(a,d){function e(e){b.isString(e)&&(l.noel?(e=c.trim(e),k=c(e),a.$el.slice(1).remove(),a.$el.replaceWith(k),a.setElement(k,!1)):d.html(a.$el,e)),i.resolveWith(a,[a])}function f(b,c){var f;l.callback=function(a){delete l.isAsync,delete l.callback,e(a)},j.cache(g,c),c&&(f=d.renderTemplate.call(a,c,b)),l.isAsync||e(f)}var g,h,i,k,l=a.__manager__;return{render:function(){var c=a.serialize||d.serialize,e=a.template||d.template;return i=d.deferred(),b.isFunction(c)&&(c=c.call(a)),l.callback=function(a){delete l.isAsync,delete l.callback,f(c,a)},"string"==typeof e&&(g=d.prefix+e),(h=j.cache(g))?(f(c,h,g),i):("string"==typeof e?h=d.fetchTemplate.call(a,d.prefix+e):"function"==typeof e?h=e:null!=e&&(h=d.fetchTemplate.call(a,e)),l.isAsync||f(c,h),i)}}},_removeViews:function(a,b){"boolean"==typeof a&&(b=a,a=this),a=a||this,a.getViews().each(function(a){(a.hasRendered||b)&&j._removeView(a,b)})},_removeView:function(a,c){var d,e=a.__manager__,f=e.parent&&e.parent.__manager__,g="boolean"==typeof a.keep?a.keep:a.options.keep;if(!g&&f&&f.insert===!0||c){if(j.cleanViews(a),a._removeViews(!0),a.$el.remove(),!e.parent)return;if(d=e.parent.views[e.selector],b.isArray(d))return b.each(b.clone(d),function(a,b){a&&a.__manager__===e&&i.call(d,b,1)});delete e.parent.views[e.selector]}},cache:function(a,b){return a in this._cache&&null==b?this._cache[a]:null!=a&&null!=b?this._cache[a]=b:void 0},cleanViews:function(c){b.each(h.call([],c),function(c){var d;c.unbind(),c.model instanceof a.Model&&c.model.off(null,null,c),c.collection instanceof a.Collection&&c.collection.off(null,null,c),c.stopListening(),d=c.getAllOptions().cleanup,b.isFunction(d)&&d.call(c)})},configure:function(c){b.extend(j.prototype.options,c),c.manage&&(a.View.prototype.manage=!0),c.el===!1&&(a.View.prototype.el=!1),c.suppressWarnings===!0&&(a.View.prototype.suppressWarnings=!0)},setupView:function(c,e){b.each(h.call([],c),function(c){if(!c.__manager__){var f,g,i,k=j.prototype,l=b.pick(c,d);b.defaults(c,{views:{},sections:{},__manager__:{},_removeViews:j._removeViews,_removeView:j._removeView},j.prototype),e=c.options=b.defaults(e||{},c.options,k.options),i=b.pick(e,h.call(["events","sections"],b.values(e.events))),b.extend(c,i),b.extend(e,l),c._remove=a.View.prototype.remove,c.render=j.prototype.render,c.remove!==k.remove&&(c._remove=c.remove,c.remove=k.remove),f=e.views||c.views,b.keys(f).length&&(g=f,c.views={},c.setViews(g)),c.options.template?c.options.template=e.template:c.template&&(e.template=c.template)}})}});return j.VERSION="0.9.1",a.Layout=j,a.View.prototype._configure=function(a){var b,c;return("el"in a?a.el===!1:this.el===!1)&&(b=!0),c=f.apply(this,arguments),(a.manage||this.manage)&&j.setupView(this),this.__manager__&&(this.__manager__.noel=b,this.__manager__.suppressWarnings=a.suppressWarnings),c},j.prototype.options={prefix:"",deferred:function(){return c.Deferred()},fetchTemplate:function(a){return b.template(c(a).html())},renderTemplate:function(a,b){return a(b)},partial:function(a,b,c,d){var e;d.selector&&(c.noel?(e=a.filter(d.selector),a=e.length?e:a.find(d.selector)):a=a.find(d.selector)),c.insert?this.insert(a,b):this.html(a,b)},html:function(a,b){a.html(b)},htmlBatch:function(a,d,e){var f=a.__manager__,g={selector:e},h=b.reduce(d,function(b,d){var e="boolean"==typeof d.keep?d.keep:d.options.keep,f=e&&c.contains(a.el,d.el);return d.el&&!f&&b.push(d.el),b},[]);return this.partial(a.$el,c(h),f,g)},insert:function(a,b){a.append(b)},when:function(a){return c.when.apply(null,a)},contains:function(a,b){return c.contains(a,b)}},d=b.keys(j.prototype.options),j}),function(a){function b(b){var c=b.data;b.isDefaultPrevented()||(b.preventDefault(),a(this).ajaxSubmit(c))}function c(b){var c=b.target,d=a(c);if(!d.is("[type=submit],[type=image]")){var e=d.closest("[type=submit]");if(0===e.length)return;c=e[0]}var f=this;if(f.clk=c,"image"==c.type)if(void 0!==b.offsetX)f.clk_x=b.offsetX,f.clk_y=b.offsetY;else if("function"==typeof a.fn.offset){var g=d.offset();f.clk_x=b.pageX-g.left,f.clk_y=b.pageY-g.top}else f.clk_x=b.pageX-c.offsetLeft,f.clk_y=b.pageY-c.offsetTop;setTimeout(function(){f.clk=f.clk_x=f.clk_y=null},100)}function d(){if(a.fn.ajaxSubmit.debug){var b="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(b):window.opera&&window.opera.postError&&window.opera.postError(b)}}var e={};e.fileapi=void 0!==a("<input type='file'/>").get(0).files,e.formdata=void 0!==window.FormData;var f=!!a.fn.prop;a.fn.attr2=function(){if(!f)return this.attr.apply(this,arguments);var a=this.prop.apply(this,arguments);return a&&a.jquery||"string"==typeof a?a:this.attr.apply(this,arguments)},a.fn.ajaxSubmit=function(b){function c(c){var d,e,f=a.param(c,b.traditional).split("&"),g=f.length,h=[];for(d=0;g>d;d++)f[d]=f[d].replace(/\+/g," "),e=f[d].split("="),h.push([decodeURIComponent(e[0]),decodeURIComponent(e[1])]);return h}function g(d){for(var e=new FormData,f=0;f<d.length;f++)e.append(d[f].name,d[f].value);if(b.extraData){var g=c(b.extraData);for(f=0;f<g.length;f++)g[f]&&e.append(g[f][0],g[f][1])}b.data=null;var h=a.extend(!0,{},a.ajaxSettings,b,{contentType:!1,processData:!1,cache:!1,type:i||"POST"});b.uploadProgress&&(h.xhr=function(){var a=jQuery.ajaxSettings.xhr();return a.upload&&a.upload.addEventListener("progress",function(a){var c=0,d=a.loaded||a.position,e=a.total;a.lengthComputable&&(c=Math.ceil(d/e*100)),b.uploadProgress(a,d,e,c)},!1),a}),h.data=null;var j=h.beforeSend;return h.beforeSend=function(a,b){b.data=e,j&&j.call(this,a,b)},a.ajax(h)}function h(c){function e(a){var b=null;try{a.contentWindow&&(b=a.contentWindow.document)}catch(c){d("cannot get iframe.contentWindow document: "+c)}if(b)return b;try{b=a.contentDocument?a.contentDocument:a.document}catch(c){d("cannot get iframe.contentDocument: "+c),b=a.document}return b}function g(){function b(){try{var a=e(r).readyState;d("state = "+a),a&&"uninitialized"==a.toLowerCase()&&setTimeout(b,50)}catch(c){d("Server abort: ",c," (",c.name,")"),h(A),w&&clearTimeout(w),w=void 0}}var c=l.attr2("target"),f=l.attr2("action");x.setAttribute("target",o),i||x.setAttribute("method","POST"),f!=m.url&&x.setAttribute("action",m.url),m.skipEncodingOverride||i&&!/post/i.test(i)||l.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),m.timeout&&(w=setTimeout(function(){v=!0,h(z)},m.timeout));var g=[];try{if(m.extraData)for(var j in m.extraData)m.extraData.hasOwnProperty(j)&&(a.isPlainObject(m.extraData[j])&&m.extraData[j].hasOwnProperty("name")&&m.extraData[j].hasOwnProperty("value")?g.push(a('<input type="hidden" name="'+m.extraData[j].name+'">').val(m.extraData[j].value).appendTo(x)[0]):g.push(a('<input type="hidden" name="'+j+'">').val(m.extraData[j]).appendTo(x)[0]));m.iframeTarget||(q.appendTo("body"),r.attachEvent?r.attachEvent("onload",h):r.addEventListener("load",h,!1)),setTimeout(b,15);try{x.submit()}catch(k){var n=document.createElement("form").submit;n.apply(x)}}finally{x.setAttribute("action",f),c?x.setAttribute("target",c):l.removeAttr("target"),a(g).remove()}}function h(b){if(!s.aborted&&!F){if(E=e(r),E||(d("cannot access response document"),b=A),b===z&&s)return s.abort("timeout"),y.reject(s,"timeout"),void 0;if(b==A&&s)return s.abort("server abort"),y.reject(s,"error","server abort"),void 0;if(E&&E.location.href!=m.iframeSrc||v){r.detachEvent?r.detachEvent("onload",h):r.removeEventListener("load",h,!1);var c,f="success";try{if(v)throw"timeout";var g="xml"==m.dataType||E.XMLDocument||a.isXMLDoc(E);if(d("isXml="+g),!g&&window.opera&&(null===E.body||!E.body.innerHTML)&&--G)return d("requeing onLoad callback, DOM not available"),setTimeout(h,250),void 0;var i=E.body?E.body:E.documentElement;s.responseText=i?i.innerHTML:null,s.responseXML=E.XMLDocument?E.XMLDocument:E,g&&(m.dataType="xml"),s.getResponseHeader=function(a){var b={"content-type":m.dataType};return b[a]},i&&(s.status=Number(i.getAttribute("status"))||s.status,s.statusText=i.getAttribute("statusText")||s.statusText);var j=(m.dataType||"").toLowerCase(),k=/(json|script|text)/.test(j);if(k||m.textarea){var l=E.getElementsByTagName("textarea")[0];if(l)s.responseText=l.value,s.status=Number(l.getAttribute("status"))||s.status,s.statusText=l.getAttribute("statusText")||s.statusText;else if(k){var o=E.getElementsByTagName("pre")[0],p=E.getElementsByTagName("body")[0];o?s.responseText=o.textContent?o.textContent:o.innerText:p&&(s.responseText=p.textContent?p.textContent:p.innerText)}}else"xml"==j&&!s.responseXML&&s.responseText&&(s.responseXML=H(s.responseText));try{D=J(s,j,m)}catch(t){f="parsererror",s.error=c=t||f}}catch(t){d("error caught: ",t),f="error",s.error=c=t||f}s.aborted&&(d("upload aborted"),f=null),s.status&&(f=s.status>=200&&s.status<300||304===s.status?"success":"error"),"success"===f?(m.success&&m.success.call(m.context,D,"success",s),y.resolve(s.responseText,"success",s),n&&a.event.trigger("ajaxSuccess",[s,m])):f&&(void 0===c&&(c=s.statusText),m.error&&m.error.call(m.context,s,f,c),y.reject(s,"error",c),n&&a.event.trigger("ajaxError",[s,m,c])),n&&a.event.trigger("ajaxComplete",[s,m]),n&&!--a.active&&a.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,s,f),F=!0,m.timeout&&clearTimeout(w),setTimeout(function(){m.iframeTarget||q.remove(),s.responseXML=null},100)}}}var j,k,m,n,o,q,r,s,t,u,v,w,x=l[0],y=a.Deferred();if(c)for(k=0;k<p.length;k++)j=a(p[k]),f?j.prop("disabled",!1):j.removeAttr("disabled");if(m=a.extend(!0,{},a.ajaxSettings,b),m.context=m.context||m,o="jqFormIO"+(new Date).getTime(),m.iframeTarget?(q=a(m.iframeTarget),u=q.attr2("name"),u?o=u:q.attr2("name",o)):(q=a('<iframe name="'+o+'" src="'+m.iframeSrc+'" />'),q.css({position:"absolute",top:"-1000px",left:"-1000px"})),r=q[0],s={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(b){var c="timeout"===b?"timeout":"aborted";d("aborting upload... "+c),this.aborted=1;try{r.contentWindow.document.execCommand&&r.contentWindow.document.execCommand("Stop")}catch(e){}q.attr("src",m.iframeSrc),s.error=c,m.error&&m.error.call(m.context,s,c,b),n&&a.event.trigger("ajaxError",[s,m,c]),m.complete&&m.complete.call(m.context,s,c)}},n=m.global,n&&0===a.active++&&a.event.trigger("ajaxStart"),n&&a.event.trigger("ajaxSend",[s,m]),m.beforeSend&&m.beforeSend.call(m.context,s,m)===!1)return m.global&&a.active--,y.reject(),y;if(s.aborted)return y.reject(),y;t=x.clk,t&&(u=t.name,u&&!t.disabled&&(m.extraData=m.extraData||{},m.extraData[u]=t.value,"image"==t.type&&(m.extraData[u+".x"]=x.clk_x,m.extraData[u+".y"]=x.clk_y)));var z=1,A=2,B=a("meta[name=csrf-token]").attr("content"),C=a("meta[name=csrf-param]").attr("content");C&&B&&(m.extraData=m.extraData||{},m.extraData[C]=B),m.forceSync?g():setTimeout(g,10);var D,E,F,G=50,H=a.parseXML||function(a,b){return window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml"),b&&b.documentElement&&"parsererror"!=b.documentElement.nodeName?b:null},I=a.parseJSON||function(a){return window.eval("("+a+")")},J=function(b,c,d){var e=b.getResponseHeader("content-type")||"",f="xml"===c||!c&&e.indexOf("xml")>=0,g=f?b.responseXML:b.responseText;return f&&"parsererror"===g.documentElement.nodeName&&a.error&&a.error("parsererror"),d&&d.dataFilter&&(g=d.dataFilter(g,c)),"string"==typeof g&&("json"===c||!c&&e.indexOf("json")>=0?g=I(g):("script"===c||!c&&e.indexOf("javascript")>=0)&&a.globalEval(g)),g};return y}if(!this.length)return d("ajaxSubmit: skipping submit process - no element selected"),this;var i,j,k,l=this;"function"==typeof b&&(b={success:b}),i=b.type||this.attr2("method"),j=b.url||this.attr2("action"),k="string"==typeof j?a.trim(j):"",k=k||window.location.href||"",k&&(k=(k.match(/^([^#]+)/)||[])[1]),b=a.extend(!0,{url:k,success:a.ajaxSettings.success,type:i||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},b);var m={};if(this.trigger("form-pre-serialize",[this,b,m]),m.veto)return d("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(b.beforeSerialize&&b.beforeSerialize(this,b)===!1)return d("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var n=b.traditional;void 0===n&&(n=a.ajaxSettings.traditional);var o,p=[],q=this.formToArray(b.semantic,p);if(b.data&&(b.extraData=b.data,o=a.param(b.data,n)),b.beforeSubmit&&b.beforeSubmit(q,this,b)===!1)return d("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[q,this,b,m]),m.veto)return d("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var r=a.param(q,n);o&&(r=r?r+"&"+o:o),"GET"==b.type.toUpperCase()?(b.url+=(b.url.indexOf("?")>=0?"&":"?")+r,b.data=null):b.data=r;var s=[];if(b.resetForm&&s.push(function(){l.resetForm()}),b.clearForm&&s.push(function(){l.clearForm(b.includeHidden)}),!b.dataType&&b.target){var t=b.success||function(){};s.push(function(c){var d=b.replaceTarget?"replaceWith":"html";a(b.target)[d](c).each(t,arguments)})}else b.success&&s.push(b.success);if(b.success=function(a,c,d){for(var e=b.context||this,f=0,g=s.length;g>f;f++)s[f].apply(e,[a,c,d||l,l])},b.error){var u=b.error;b.error=function(a,c,d){var e=b.context||this;
-u.apply(e,[a,c,d,l])}}if(b.complete){var v=b.complete;b.complete=function(a,c){var d=b.context||this;v.apply(d,[a,c,l])}}var w=a('input[type=file]:enabled[value!=""]',this),x=w.length>0,y="multipart/form-data",z=l.attr("enctype")==y||l.attr("encoding")==y,A=e.fileapi&&e.formdata;d("fileAPI :"+A);var B,C=(x||z)&&!A;b.iframe!==!1&&(b.iframe||C)?b.closeKeepAlive?a.get(b.closeKeepAlive,function(){B=h(q)}):B=h(q):B=(x||z)&&A?g(q):a.ajax(b),l.removeData("jqxhr").data("jqxhr",B);for(var D=0;D<p.length;D++)p[D]=null;return this.trigger("form-submit-notify",[this,b]),this},a.fn.ajaxForm=function(e){if(e=e||{},e.delegation=e.delegation&&a.isFunction(a.fn.on),!e.delegation&&0===this.length){var f={s:this.selector,c:this.context};return!a.isReady&&f.s?(d("DOM not ready, queuing ajaxForm"),a(function(){a(f.s,f.c).ajaxForm(e)}),this):(d("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)")),this)}return e.delegation?(a(document).off("submit.form-plugin",this.selector,b).off("click.form-plugin",this.selector,c).on("submit.form-plugin",this.selector,e,b).on("click.form-plugin",this.selector,e,c),this):this.ajaxFormUnbind().bind("submit.form-plugin",e,b).bind("click.form-plugin",e,c)},a.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},a.fn.formToArray=function(b,c){var d=[];if(0===this.length)return d;var f=this[0],g=b?f.getElementsByTagName("*"):f.elements;if(!g)return d;var h,i,j,k,l,m,n;for(h=0,m=g.length;m>h;h++)if(l=g[h],j=l.name,j&&!l.disabled)if(b&&f.clk&&"image"==l.type)f.clk==l&&(d.push({name:j,value:a(l).val(),type:l.type}),d.push({name:j+".x",value:f.clk_x},{name:j+".y",value:f.clk_y}));else if(k=a.fieldValue(l,!0),k&&k.constructor==Array)for(c&&c.push(l),i=0,n=k.length;n>i;i++)d.push({name:j,value:k[i]});else if(e.fileapi&&"file"==l.type){c&&c.push(l);var o=l.files;if(o.length)for(i=0;i<o.length;i++)d.push({name:j,value:o[i],type:l.type});else d.push({name:j,value:"",type:l.type})}else null!==k&&"undefined"!=typeof k&&(c&&c.push(l),d.push({name:j,value:k,type:l.type,required:l.required}));if(!b&&f.clk){var p=a(f.clk),q=p[0];j=q.name,j&&!q.disabled&&"image"==q.type&&(d.push({name:j,value:p.val()}),d.push({name:j+".x",value:f.clk_x},{name:j+".y",value:f.clk_y}))}return d},a.fn.formSerialize=function(b){return a.param(this.formToArray(b))},a.fn.fieldSerialize=function(b){var c=[];return this.each(function(){var d=this.name;if(d){var e=a.fieldValue(this,b);if(e&&e.constructor==Array)for(var f=0,g=e.length;g>f;f++)c.push({name:d,value:e[f]});else null!==e&&"undefined"!=typeof e&&c.push({name:this.name,value:e})}}),a.param(c)},a.fn.fieldValue=function(b){for(var c=[],d=0,e=this.length;e>d;d++){var f=this[d],g=a.fieldValue(f,b);null===g||"undefined"==typeof g||g.constructor==Array&&!g.length||(g.constructor==Array?a.merge(c,g):c.push(g))}return c},a.fieldValue=function(b,c){var d=b.name,e=b.type,f=b.tagName.toLowerCase();if(void 0===c&&(c=!0),c&&(!d||b.disabled||"reset"==e||"button"==e||("checkbox"==e||"radio"==e)&&!b.checked||("submit"==e||"image"==e)&&b.form&&b.form.clk!=b||"select"==f&&-1==b.selectedIndex))return null;if("select"==f){var g=b.selectedIndex;if(0>g)return null;for(var h=[],i=b.options,j="select-one"==e,k=j?g+1:i.length,l=j?g:0;k>l;l++){var m=i[l];if(m.selected){var n=m.value;if(n||(n=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),j)return n;h.push(n)}}return h}return a(b).val()},a.fn.clearForm=function(b){return this.each(function(){a("input,select,textarea",this).clearFields(b)})},a.fn.clearFields=a.fn.clearInputs=function(b){var c=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var d=this.type,e=this.tagName.toLowerCase();c.test(d)||"textarea"==e?this.value="":"checkbox"==d||"radio"==d?this.checked=!1:"select"==e?this.selectedIndex=-1:"file"==d?/MSIE/.test(navigator.userAgent)?a(this).replaceWith(a(this).clone(!0)):a(this).val(""):b&&(b===!0&&/hidden/.test(d)||"string"==typeof b&&a(this).is(b))&&(this.value="")})},a.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},a.fn.enable=function(a){return void 0===a&&(a=!0),this.each(function(){this.disabled=!a})},a.fn.selected=function(b){return void 0===b&&(b=!0),this.each(function(){var c=this.type;if("checkbox"==c||"radio"==c)this.checked=b;else if("option"==this.tagName.toLowerCase()){var d=a(this).parent("select");b&&d[0]&&"select-one"==d[0].type&&d.find("option").selected(!1),this.selected=b}})},a.fn.ajaxSubmit.debug=!1}(jQuery),define("plugins/jquery.form",function(){}),define("app",["initialize","jquery","lodash","backbone","bootstrap","helpers","mixins","plugins/backbone.layoutmanager","plugins/jquery.form"],function(a,b,c,d,e,f,g){"undefined"==typeof console&&(console={log:function(){}}),c.extend(a,d.Events,{mixins:g,renderView:function(a,b,c,d,e){a.setView(b,new c(d)).render().then(e)},module:function(a){return c.extend({Views:{}},a)},getParams:function(a){a&&("?"===a.substring(0,1)?a=a.substring(1):a.indexOf("?")>-1&&(a=a.split("?")[1]));var b=window.location.hash.split("?")[1];a=a||b||window.location.search.substring(1);var c,d={},e=/\+/g,f=/([^&=]+)=?([^&]*)/g,g=function(a){return decodeURIComponent(a.replace(e," "))},h=a;if(a)for(;c=f.exec(h);)d[g(c[1])]=g(c[2]);return d}});var h=window.JST=window.JST||{};return d.Layout.configure({manage:!0,prefix:"app/",renderTemplate:function(a,b){return a(c.extend(f,b))},fetchTemplate:function(d){var e;return d+=".html",h[d]?h[d]:(e=this.async(),b.ajax({url:a.root+d}).then(function(a){e(h[d]=c.template(a))}))}}),a}),define("resizeColumns",["mixins"],function(a){var b=function(a){this.options=a,this.options.selectorElements=a.selectorElements||".window-resizeable"};return b.prototype={getPrimaryNavWidth:function(){var a=$("body").hasClass("closeMenu")?64:224;return a},getPanelWidth:function(){var a=$("#sidebar-content").length>0?$("#sidebar-content").width():0;return this.getPrimaryNavWidth()+a},initialize:function(){var b=this;this.lazyLayout=_.debounce(b.onResizeHandler,300).bind(this),a.addWindowResize(this.lazyLayout,"animation"),a.initWindowResize(),this.onResizeHandler()},updateOptions:function(a){this.options={},this.options=a,this.options.selectorElements=a.selectorElements||".window-resizeable"},turnOff:function(){a.removeWindowResize("animation")},cleanupCallback:function(){this.callback=null},onResizeHandler:function(){if(this.options.onResizeHandler)this.options.onResizeHandler();else{var a,b=window.innerWidth-this.getPanelWidth(),c=$("#sidebar-content").length>0?470:800;b>c&&1400>b?a=window.innerWidth-this.getPanelWidth():c>b?a=c:b>1400&&(a=1400),$(this.options.selectorElements).innerWidth(a)}this.options.callback&&this.options.callback()}},b}),define("modules/fauxton/base",["app","backbone","resizeColumns"],function(a,b,c){a.resizeColumns=new c({}),a.resizeColumns.onResizeHandler();var d=a.module();return d.Breadcrumbs=b.View.extend({template:"templates/fauxton/breadcrumbs",serialize:function(){var a=_.clone(this.crumbs);return{crumbs:a}},initialize:function(a){this.crumbs=a.crumbs}}),d.VersionInfo=b.Model.extend({url:a.host}),d.Footer=b.View.extend({template:"templates/fauxton/footer",initialize:function(){this.versionInfo=new d.VersionInfo},establish:function(){return[this.versionInfo.fetch()]},serialize:function(){return{version:this.versionInfo.get("version")}}}),d.NavBar=b.View.extend({className:"navbar",template:"templates/fauxton/nav_bar",navLinks:[{href:"#/_all_dbs",title:"Databases",icon:"fonticon-database",className:"databases"}],bottomNavLinks:[],footerNavLinks:[],serialize:function(){return{navLinks:this.navLinks,bottomNavLinks:this.bottomNavLinks,footerNavLinks:this.footerNavLinks}},addLink:function(a){a.top&&!a.bottomNav?this.navLinks.unshift(a):a.top&&a.bottomNav?this.bottomNavLinks.unshift(a):a.bottomNav?this.bottomNavLinks.push(a):a.footerNav?this.footerNavLinks.push(a):this.navLinks.push(a)},removeLink:function(a){var b=this.navlinks;a.bottomNav?b=this.bottomNavLinks:a.footerNav&&(b=this.footerNavLinks);var c=-1;_.each(b,function(b,d){b.title===a.title&&(c=d)}),-1!==c&&(b.splice(c,1),this.render())},afterRender:function(){function b(){d.toggleClass("closeMenu"),c=d.hasClass("closeMenu"),a.resizeColumns.onResizeHandler()}$('#primary-navbar li[data-nav-name="'+a.selectedHeader+'"]').addClass("active");var c=!0,d=$("body");$(".brand").off(),$(".brand").on({click:function(a){$(a.target).is("a")||b()}}),$("#primary-navbar").on("click",".nav a",function(){d.hasClass("closeMenu")||setTimeout(function(){d.addClass("closeMenu"),a.resizeColumns.onResizeHandler()},3e3)}),a.resizeColumns.initialize()},beforeRender:function(){this.addLinkViews()},addLinkViews:function(){var a=this;_.each(_.union(this.navLinks,this.bottomNavLinks),function(b){if(b.view){var c=b.establish||[];$.when.apply(null,c).then(function(){var c=b.bottomNav?"#bottom-nav-links":"#nav-links";a.insertView(c,b.view).render()})}},this)}}),d.ApiBar=b.View.extend({template:"templates/fauxton/api_bar",endpoint:"_all_docs",documentation:"docs",events:{"click .api-url-btn":"toggleAPIbar"},toggleAPIbar:function(a){var b=$(a.currentTarget).find("span");b.hasClass("fonticon-plus")?b.removeClass("fonticon-plus").addClass("fonticon-minus"):b.removeClass("fonticon-minus").addClass("fonticon-plus"),$(".api-navbar").toggle()},serialize:function(){return{endpoint:this.endpoint,documentation:this.documentation}},hide:function(){this.$el.addClass("hide")},show:function(){this.$el.removeClass("hide")},update:function(a){this.show(),this.endpoint=a[0],this.documentation=a[1],this.render()}}),d.Notification=b.View.extend({fadeTimer:5e3,initialize:function(a){this.msg=a.msg,this.type=a.type||"info",this.selector=a.selector,this.fade=void 0===a.fade?!0:a.fade,this.clear=a.clear,this.data=a.data||"",this.template=a.template||"templates/fauxton/notification"},serialize:function(){return{data:this.data,msg:this.msg,type:this.type}},delayedFade:function(){var a=this;this.fade&&setTimeout(function(){a.$el.fadeOut()},this.fadeTimer)},renderNotification:function(a){return a=a||this.selector,this.clear&&$(a).html(""),this.render().$el.appendTo(a),this.delayedFade(),this}}),d}),function(a,b,c){function d(a){return j(arguments,function(b,d){a[b]===c&&(a[b]=d)}),a}function e(a){return j(arguments,function(b,c){a[u][f(a,b)||b]=c}),a}function f(a,b){var d,e,f=a[u];if(f[b]!==c)return b;for(b=b.charAt(0).toUpperCase()+b.slice(1),e=0;e<M[m];e++)if(d=M[e]+b,f[d]!==c)return d}function g(a,b){var c,d=[r,b,~~(100*a)].join("-"),e="{"+r+":"+a+"}";if(!N[d]){for(c=0;c<M[m];c++)try{O.insertRule("@"+(M[c]&&"-"+M[c].toLowerCase()+"-"||"")+"keyframes "+d+"{0%{"+r+":1}"+b+"%"+e+"to"+e+"}",O.cssRules[m])}catch(f){}N[d]=1}return d}function h(a,b,c){return c&&!c[B]&&h(a,c),a.insertBefore(b,c||null),a}function i(a){var c=b.createElement(a||"div");return j(arguments,function(a,b){c[a]=b}),c}function j(a,b){for(var c=~~((a[m]-1)/2),d=1;c>=d;d++)b(a[2*d-1],a[2*d])}var k,l="width",m="length",n="radius",o="lines",p="trail",q="color",r="opacity",s="speed",t="shadow",u="style",v="height",w="left",x="top",y="px",z="childNodes",A="firstChild",B="parentNode",C="position",D="relative",E="absolute",F="animation",G="transform",H="Origin",I="Timeout",J="coord",K="#000",L=u+"Sheets",M="webkit0Moz0ms0O".split(0),N={};h(b.getElementsByTagName("head")[0],i(u));var O=b[L][b[L][m]-1],P=function(a){this.opts=d(a||{},o,12,p,100,m,7,l,5,n,10,q,K,r,.25,s,1)},Q=P.prototype={spin:function(b){var c=this,d=c.el=c[o](c.opts);if(b&&h(b,e(d,w,~~(b.offsetWidth/2)+y,x,~~(b.offsetHeight/2)+y),b[A]),!k){var f=c.opts,g=0,i=20/f[s],j=(1-f[r])/(i*f[p]/100),l=i/f[o];!function m(){g++;for(var b=f[o];b;b--){var e=Math.max(1-(g+b*l)%i*j,f[r]);c[r](d,f[o]-b,e,f)}c[I]=c.el&&a["set"+I](m,50)}()}return c},stop:function(){var b=this,d=b.el;return a["clear"+I](b[I]),d&&d[B]&&d[B].removeChild(d),b.el=c,b}};Q[o]=function(a){function b(b,c){return e(i(),C,E,l,a[m]+a[l]+y,v,a[l]+y,"background",b,"boxShadow",c,G+H,w,G,"rotate("+~~(360/a[o]*j)+"deg) translate("+a[n]+y+",0)","borderRadius","100em")}for(var c,d=e(i(),C,D),f=g(a[r],a[p]),j=0;j<a[o];j++)c=e(i(),C,E,x,1+~(a[l]/2)+y,G,"translate3d(0,0,0)",F,f+" "+1/a[s]+"s linear infinite "+(1/a[o]/a[s]*j-1/a[s])+"s"),a[t]&&h(c,e(b(K,"0 0 4px "+K),x,2+y)),h(d,h(c,b(a[q],"0 0 1px rgba(0,0,0,.1)")));return d},Q[r]=function(a,b,c){a[z][b][u][r]=c};var R="behavior",S="url(#default#VML)",T="group0roundrect0fill0stroke".split(0);!function(){var a,b=e(i(T[0]),R,S);if(!f(b,G)&&b.adj){for(a=0;a<T[m];a++)O.addRule(T[a],R+":"+S);Q[o]=function(){function a(a,c,g){h(j,h(e(b(),"rotation",360/d[o]*a+"deg",w,~~c),h(e(i(T[1],"arcsize",1),l,f,v,d[l],w,d[n],x,-d[l]/2,"filter",g),i(T[2],q,d[q],r,d[r]),i(T[3],r,0))))}function b(){return e(i(T[0],J+"size",g+" "+g,J+H,-f+" "+-f),l,g,v,g)}var c,d=this.opts,f=d[m]+d[l],g=2*f,j=b(),k=~(d[m]+d[n]+d[l])+y;if(d[t])for(c=1;c<=d[o];c++)a(c,-2,"progid:DXImage"+G+".Microsoft.Blur(pixel"+n+"=2,make"+t+"=1,"+t+r+"=.3)");for(c=1;c<=d[o];c++)a(c);return h(e(i(),"margin",k+" 0 0 "+k,C,D),j)},Q[r]=function(a,b,c,d){d=d[t]&&d[o]||0,a[A][z][b+d][A][A][r]=c}}else k=f(b,F)}(),a.Spinner=P}(window,document),define("spin",function(){}),define("api",["app","modules/fauxton/base","spin"],function(a,b){var c=a.module();c.moduleExtensions={Routes:{}},c.addonExtensions={initialize:function(){}},c.excludedViewErrors=["Missing name in function declaration.","['{a}'] is better written in dot notation."],c.isIgnorableError=function(a){return _.contains(c.excludedViewErrors,a)},c.View=Backbone.View.extend({establish:function(){return null},loaderClassname:"loader",disableLoader:!1,forceRender:function(){this.hasRendered=!1}}),c.navigate=function(b,c){var d=_.extend({trigger:!0},c);a.router.navigate(b,d)},c.beforeUnload=function(){a.router.beforeUnload.apply(a.router,arguments)},c.removeBeforeUnload=function(){a.router.removeBeforeUnload.apply(a.router,arguments)},c.addHeaderLink=function(b){a.masterLayout.navBar.addLink(b)},c.removeHeaderLink=function(b){a.masterLayout.navBar.removeLink(b)},c.Deferred=function(){return $.Deferred()},c.when=function(a){return a instanceof Array?$.when.apply(null,a):$.when(a)},c.addRoute=function(b){a.router.route(b.route,b.name,b.callback)},c.triggerRouteEvent=function(b,c){a.router.triggerRouteEvent("route:"+b,c)},c.module=function(b){return a.module(_.extend(c.moduleExtensions,b))},c.addon=function(a){return c.module(c.addonExtensions,a)},c.addNotification=function(a){a=_.extend({msg:"Notification Event Triggered!",type:"info",selector:"#global-notifications"},a);var c=new b.Notification(a);return c.renderNotification()},c.UUID=Backbone.Model.extend({initialize:function(a){a=_.extend({count:1},a),this.count=a.count},url:function(){return a.host+"/_uuids?count="+this.count},next:function(){return this.get("uuids").pop()}}),c.Session=Backbone.Model.extend({url:"/_session",user:function(){var a=this.get("userCtx");return a&&a.name?{name:a.name,roles:a.roles}:null},fetchOnce:function(a){var b=_.extend({},a);return(!this._deferred||"rejected"===this._deferred.state()||b.forceFetch)&&(this._deferred=this.fetch()),this._deferred},fetchUser:function(a){var b=this,c=this.user();return this.fetchOnce(a).then(function(){var a=b.user();return c!==a?b.trigger("session:userChanged"):b.trigger("session:userFetched"),a})}}),c.setSession=function(b){return a.session=c.session=b,c.session.fetchUser()},c.setSession(new c.Session);var d=function(a){this._options=a,this.initialize.apply(this,arguments)};d.extend=Backbone.Model.extend,_.extend(d.prototype,Backbone.Events,{authDeniedCb:function(){},initialize:function(){},authHandlerCb:function(){var a=$.Deferred();return a.resolve(),a},registerAuth:function(a){this.authHandlerCb=a},registerAuthDenied:function(a){this.authDeniedCb=a},checkAccess:function(a){var b=a||[],d=this;return c.session.fetchUser().then(function(){return c.when(d.authHandlerCb(c.session,b))})}}),c.auth=new d,c.RouteObject=function(a){this._options=a,this._configure(a||{}),this.initialize.apply(this,arguments),this.addEvents()};var e={};_.extend(e,Backbone.Events),c.RouteObject.on=function(a,b){e.on(a,b)},c.RouteObject.extend=Backbone.Model.extend;var f=["views","routes","events","roles","crumbs","layout","apiUrl","establish"];_.extend(c.RouteObject.prototype,Backbone.Events,{views:{},routes:{},events:{},crumbs:[],layout:"with_sidebar",apiUrl:null,disableLoader:!1,loaderClassname:"loader",renderedState:!1,establish:function(){},route:function(){},roles:[],initialize:function(){}},{renderWith:function(d,e){var f=this,g=_.bind(this.triggerBroadcast,this);this.renderedState||(e.setTemplate(this.layout),g("beforeFullRender"),$("#primary-navbar li").removeClass("active"),this.selectedHeader&&(a.selectedHeader=this.selectedHeader,$('#primary-navbar li[data-nav-name="'+this.selectedHeader+'"]').addClass("active"))),e.clearBreadcrumbs();var h=this.get("crumbs");h.length&&e.setBreadcrumbs(new b.Breadcrumbs({crumbs:h})),g("beforeEstablish"),c.when(this.establish()).then(function(){g("afterEstablish"),_.each(f.getViews(),function(a,b){return a.hasRendered?(g("viewHasRendered",a,b),void 0):(g("beforeRender",a,b),c.when(a.establish()).then(function(){e.setView(b,a),e.renderView(b),g("afterRender",a,b)},function(d){if(a.establishError={error:!0,reason:d},d){var f=JSON.parse(d.responseText).reason;c.addNotification({msg:"An Error occurred: "+f,type:"error"})}e.renderView(b)}),void 0)})}.bind(this),function(a){a&&c.addNotification({msg:"An Error occurred"+JSON.parse(a.responseText).reason,type:"error"})}),this.get("apiUrl")?e.apiBar.update(this.get("apiUrl")):e.apiBar.hide(),this.renderedState=!0,g("renderComplete")},triggerBroadcast:function(a){var b=Array.prototype.slice.call(arguments);this.trigger.apply(this,b),b.splice(0,1,a,this),e.trigger.apply(e,b)},get:function(a){return _.isFunction(this[a])?this[a]():this[a]},addEvents:function(a){a=a||this.get("events"),_.each(a,function(a,b){if(!_.isFunction(a)&&!_.isFunction(this[a]))throw new Error("Invalid method: "+a);a=_.isFunction(a)?a:this[a],this.on(b,a)},this)},_configure:function(a){_.each(_.intersection(_.keys(a),f),function(b){this[b]=a[b]},this)},getView:function(a){return this.views[a]},setView:function(a,b){return this.views[a]=b,b},getViews:function(){return this.views},removeViews:function(){_.each(this.views,function(a,b){a.remove(),delete this.views[b]},this)},getRouteUrls:function(){return _.keys(this.get("routes"))},hasRoute:function(a){return this.get("routes")[a]?!0:!1},routeCallback:function(a,b){var c,d=this.get("routes"),e=d[a];c="object"==typeof e?this[e.route]:this[e],c.apply(this,b)},getRouteRoles:function(a){var b=this.get("routes")[a];return"object"==typeof b&&b.roles?b.roles:this.roles}});var g;c.RouteObject.on("beforeEstablish",function(a){if(!a.disableLoader){var b={lines:16,length:8,width:4,radius:12,color:"#333",speed:1,trail:10,shadow:!1};$(".spinner").length||$('<div class="spinner"></div>').appendTo("#app-container"),g=new Spinner(b).spin(),$(".spinner").append(g.el)}});var h,i=function(){g&&(g.stop(),$(".spinner").remove())},j=function(){h&&(h.stop(),$(".spinner").remove())};c.RouteObject.on("beforeRender",function(a,b,c){if(i(),!b.disableLoader){var d={lines:16,length:8,width:4,radius:12,color:"#333",speed:1,trail:10,shadow:!1};h=new Spinner(d).spin(),$('<div class="spinner"></div>').appendTo(c).append(h.el)}}),c.RouteObject.on("afterRender",function(){j()}),c.RouteObject.on("viewHasRendered",function(){j(),i()});var k=_.extend({},Backbone.Events);return c.registerExtension=function(a,b){k[a]||(k[a]=[]),k.trigger("add:"+a,b),k[a].push(b)},c.getExtensions=function(a){var b=k[a];return b||(b=[]),b},c.extensions=k,a.fauxtonAPI=c,a.fauxtonAPI}),define("modules/fauxton/layout",["backbone"],function(a){var b=function(b,c){this.navBar=b,this.apiBar=c,this.layout=new a.Layout({template:"templates/layouts/with_sidebar",views:{"#primary-navbar":this.navBar,"#api-navbar":this.apiBar},afterRender:function(){}}),this.layoutViews={},this.el=this.layout.el};return _.extend(b.prototype,{render:function(){return this.layout.render()},setTemplate:function(a){this.layout.template=a.prefix?a.prefix+a.name:"templates/layouts/"+a,_.each(this.layoutViews,function(a){a.remove()}),this.layoutViews={},this.render()},setTabs:function(a){this.tabs=this.layout.setView("#tabs",a),this.tabs.render()},setBreadcrumbs:function(a){this.breadcrumbs=this.layout.setView("#breadcrumbs",a),this.breadcrumbs.render()},clearBreadcrumbs:function(){this.breadcrumbs&&this.breadcrumbs.remove()},setView:function(a,b){this.layoutViews[a]=this.layout.setView(a,b,!1)},renderView:function(a){var b=this.layoutViews[a];return b?b.render():!1}}),b}),define("modules/documents/resources",["app","api"],function(a,b){var c=a.module();return c.Doc=Backbone.Model.extend({idAttribute:"_id",documentation:function(){return"docs"},url:function(b){return"app"===b?this.getDatabase().url("app")+"/"+this.safeID():"web-index"===b?this.getDatabase().url("app")+"/"+a.mixins.safeURLName(this.id):"apiurl"===b?window.location.origin+"/"+this.getDatabase().safeID()+"/"+this.safeID():a.host+"/"+this.getDatabase().safeID()+"/"+this.safeID()},initialize:function(a,b){this.collection&&this.collection.database?this.database=this.collection.database:b.database&&(this.database=b.database)},getDatabase:function(){return this.database?this.database:this.collection.database},validate:function(a){return this.id&&this.id!==a._id&&this.get("_rev")?"Cannot change a documents id.":void 0},docType:function(){return this.id.match(/^_design/)?"design doc":"doc"},isEditable:function(){return"reduction"!=this.docType()},isDdoc:function(){return"design doc"===this.docType()},hasViews:function(){if(!this.isDdoc())return!1;var a=this.get("doc");if(a)return a&&a.views&&_.keys(a.views).length>0;var b=this.get("views");return b&&_.keys(b).length>0},hasAttachments:function(){return!!this.get("_attachments")},getDdocView:function(a){if(!this.isDdoc()||!this.hasViews())return!1;var b=this.get("doc");return b?b.views[a]:this.get("views")[a]},setDdocView:function(a,b,c){if(!this.isDdoc())return!1;var d=this.get("views");return d[a]=c?{map:b,reduce:c}:{map:b},this.set({views:d}),!0},removeDdocView:function(a){if(!this.isDdoc())return!1;var b=this.get("views");delete b[a],this.set({views:b})},dDocModel:function(){if(!this.isDdoc())return!1;var a=this.get("doc");return a?new c.Doc(a,{database:this.database}):this},viewHasReduce:function(a){var b=this.getDdocView(a);return b&&b.reduce},safeID:function(){if(this.isDdoc()){var b=this.id.replace(/^_design\//,"");return"_design/"+a.mixins.safeURLName(b)}return a.mixins.safeURLName(this.id)},destroy:function(){var a=this.url()+"?rev="+this.get("_rev");return $.ajax({url:a,dataType:"json",type:"DELETE"})},parse:function(a){return a.rev&&(a._rev=a.rev,delete a.rev),a.id&&("undefined"==typeof this.id&&(a._id=a.id),delete a.id),a.ok&&delete a.ok,a},prettyJSON:function(){var a=this.get("doc")?this.get("doc"):this;return JSON.stringify(a,null," ")},copy:function(a){return $.ajax({type:"COPY",url:"/"+this.database.safeID()+"/"+this.safeID(),headers:{Destination:a}})},isNewDoc:function(){return this.get("_rev")?!1:!0}}),c.DdocInfo=Backbone.Model.extend({idAttribute:"_id",documentation:function(){return"docs"},initialize:function(a,b){this.database=b.database},url:function(b){return"app"===b?this.database.url("app")+"/"+this.safeID()+"/_info":"apiurl"===b?window.location.origin+"/"+this.database.safeID()+"/"+this.safeID()+"/_info":a.host+"/"+this.database.safeID()+"/"+this.safeID()+"/_info"},safeID:function(){var b=this.id.replace(/^_design\//,"");return"_design/"+a.mixins.safeURLName(b)}}),c.ViewRow=Backbone.Model.extend({docType:function(){return this.id?this.id.match(/^_design/)?"design doc":"doc":"reduction"},documentation:function(){return"docs"},url:function(a){return this.isEditable()?this.collection.database.url(a)+"/"+this.safeID():!1},isEditable:function(){return"reduction"!=this.docType()},safeID:function(){return a.mixins.safeURLName(this.id)},prettyJSON:function(){return JSON.stringify(this,null," ")}}),c.NewDoc=c.Doc.extend({fetch:function(){var a=new b.UUID,c=this.deferred=$.Deferred(),d=this;return a.fetch().done(function(){d.set("_id",a.next()),c.resolve()}),c.promise()}}),c.AllDocs=Backbone.Collection.extend({model:c.Doc,documentation:function(){return"docs"},initialize:function(a,b){this.database=b.database,this.params=b.params,this.skipFirstItem=!1,this.on("remove",this.decrementTotalRows,this)},url:function(b){var c="";return this.params&&(c="?"+$.param(this.params)),"app"===b?"database/"+this.database.safeID()+"/_all_docs"+c:"apiurl"===b?window.location.origin+"/"+this.database.safeID()+"/_all_docs"+c:a.host+"/"+this.database.safeID()+"/_all_docs"+c},simple:function(){var a=this.map(function(a){return{_id:a.id,_rev:a.get("_rev")}});return new c.AllDocs(a,{database:this.database,params:this.params})},urlNextPage:function(a,b){if(!b){var c=this.last();b=c?c.id:""}return this.params.startkey_docid='"'+b+'"',this.params.startkey='"'+b+'"',this.params.limit=a+1,this.url("app")},urlPreviousPage:function(a,b){return this.params.limit=a,b?(this.params.startkey_docid='"'+b+'"',this.params.startkey='"'+b+'"'):(delete this.params.startkey,delete this.params.startkey_docid),this.url("app")},totalRows:function(){return this.viewMeta.total_rows||"unknown"},decrementTotalRows:function(){this.viewMeta.total_rows&&(this.viewMeta.total_rows=this.viewMeta.total_rows-1,this.trigger("totalRows:decrement"))},updateSeq:function(){return this.viewMeta.update_seq||!1},recordStart:function(){return 0===this.viewMeta.offset?1:this.skipFirstItem?this.viewMeta.offset+2:this.viewMeta.offset+1},parse:function(a){var b=a.rows;return this.viewMeta={total_rows:a.total_rows,offset:a.offset,update_seq:a.update_seq},this.skipFirstItem&&(b=b.splice(1)),_.map(b,function(a){return{_id:a.id,_rev:a.value.rev,value:a.value,key:a.key,doc:a.doc||void 0}})}}),c.IndexCollection=Backbone.Collection.extend({model:c.ViewRow,documentation:function(){return"docs"},initialize:function(a,b){this.database=b.database,this.params=_.extend({limit:20,reduce:!1},b.params),this.idxType="_view",this.view=b.view,this.design=b.design.replace("_design/",""),this.skipFirstItem=!1},url:function(b){var c="";this.params&&(c="?"+$.param(this.params));var d=a.host;"app"===b?d="database":"apiurl"===b&&(d=window.location.origin);var e=a.mixins.safeURLName(this.design),f=a.mixins.safeURLName(this.view),g=[d,this.database.safeID(),"_design",e,this.idxType,f];return g.join("/")+c},urlNextPage:function(a,b){return b||(b=this.last().id),this.params.startkey_docid='"'+b+'"',this.params.startkey='"'+b+'"',this.params.limit=a,this.url("app")},urlPreviousPage:function(a,b){return this.params.limit=a,b?(this.params.startkey_docid='"'+b+'"',this.params.startkey='"'+b+'"'):(delete this.params.startkey,delete this.params.startkey_docid),this.url("app")},recordStart:function(){return 0===this.viewMeta.offset?1:this.skipFirstItem?this.viewMeta.offset+2:this.viewMeta.offset+1},totalRows:function(){return this.viewMeta.total_rows||"unknown"},updateSeq:function(){return this.viewMeta.update_seq||!1},simple:function(){var a=this.map(function(a){return{_id:a.id,key:a.get("key"),value:a.get("value")}});return new c.IndexCollection(a,{database:this.database,params:this.params,view:this.view,design:this.design})},parse:function(a){var b=a.rows;return this.endTime=(new Date).getTime(),this.requestDuration=this.endTime-this.startTime,this.skipFirstItem&&(b=b.splice(1)),this.viewMeta={total_rows:a.total_rows,offset:a.offset,update_seq:a.update_seq},_.map(b,function(a){return{value:a.value,key:a.key,doc:a.doc,id:a.id}})},buildAllDocs:function(){this.fetch()},fetch:function(){return this.startTime=(new Date).getTime(),Backbone.Collection.prototype.fetch.call(this)},allDocs:function(){return this.models},requestDurationInString:function(){var a,b,c,d,e,f=this.requestDuration;for(b=Math.floor(f/1e3),c=Math.floor(b/60),b=(b%60).toString(),b.length<2&&(b="0"+b),d=Math.floor(c/60).toString(),d.length<2&&(d="0"+d),c=(c%60).toString(),c.length<2&&(c="0"+c),e=d+":"+c+":"+b,a=(f%1e3).toString();a.length<3;)a="0"+a;return e+="."+a}}),c.PouchIndexCollection=Backbone.Collection.extend({model:c.ViewRow,documentation:function(){return"docs"},initialize:function(a,b){this.database=b.database,this.rows=b.rows,this.view=b.view,this.design=b.design.replace("_design/",""),this.params=_.extend({limit:20,reduce:!1},b.params),this.idxType="_view"},url:function(){return""},simple:function(){var a=this.map(function(a){return{_id:a.id,key:a.get("key"),value:a.get("value")}});return new c.PouchIndexCollection(a,{database:this.database,params:this.params,view:this.view,design:this.design,rows:this.rows})},fetch:function(){var a=b.Deferred();return this.reset(this.rows,{silent:!0}),this.viewMeta={total_rows:this.rows.length,offset:0,update_seq:!1},a.resolve(),a},recordStart:function(){return 1},totalRows:function(){return this.viewMeta.total_rows||"unknown"},updateSeq:function(){return this.viewMeta.update_seq||!1},buildAllDocs:function(){this.fetch()},allDocs:function(){return this.models}}),c}),define("modules/databases/resources",["app","api","modules/documents/resources"],function(a,b,c){var d=b.module();return d.DocLimit=20,d.Model=Backbone.Model.extend({initialize:function(){this.status=new d.Status({database:this})},documentation:function(){return"all_dbs"},buildAllDocs:function(a){return this.allDocs=new c.AllDocs(null,{database:this,params:a}),this.allDocs},isNew:function(){return!1},url:function(b){return"index"===b?"/database/"+this.safeID()+"/_all_docs":"web-index"===b?"#/database/"+this.safeID()+"/_all_docs?limit="+d.DocLimit:"apiurl"===b?window.location.origin+"/database/"+this.safeID()+"/_all_docs":"changes"===b?"/database/"+this.safeID()+"/_changes?descending=true&limit=100&include_docs=true":"changes-apiurl"===b?window.location.origin+"/database/"+this.safeID()+"/_changes?descending=true&limit=100&include_docs=true":"app"===b?"/database/"+this.safeID():a.host+"/"+this.safeID()},safeName:function(){return a.mixins.safeURLName(this.get("name"))},safeID:function(){return a.mixins.safeURLName(this.id)},buildChanges:function(a){return this.changes=new d.Changes({database:this,params:a}),this.changes}}),d.Changes=Backbone.Collection.extend({initialize:function(a){this.database=a.database,this.params=a.params},documentation:function(){return"changes"},url:function(b){var c="";return this.params&&(c="?"+$.param(this.params)),"apiurl"===b?window.location.origin+"/"+this.database.safeID()+"/_changes"+c:a.host+"/"+this.database.safeID()+"/_changes"+c},parse:function(a){return this.last_seq=a.last_seq,a.results}}),d.Status=Backbone.Model.extend({url:function(){return a.host+"/"+this.database.safeID()},initialize:function(a){this.database=a.database},numDocs:function(){return this.get("doc_count")},updateSeq:function(a){var b=this.get("update_seq");return a||"number"==typeof b?b:b?b.split("-")[0]:0},humanSize:function(){var a=-1,b=[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"],c=this.dataSize();if(!c)return 0;do c/=1024,a++;while(c>1024);return Math.max(c,.1).toFixed(1)+b[a]},diskSize:function(){return this.get("disk_size")},dataSize:function(){return this.get("other")?this.get("other").data_size:0}}),d.List=Backbone.Collection.extend({model:d.Model,documentation:function(){return"all_dbs"},url:function(b){return"apiurl"===b?window.location.origin+"/_all_dbs":a.host+"/_all_dbs"},parse:function(b){return _.map(b,function(b){return{id:a.mixins.safeURLName(b),name:b}})}}),d}),function(){function a(a){var b=function(a,b){return e("",a,b)},f=c;a&&(c[a]||(c[a]={}),f=c[a]),f.define&&f.define.packaged||(d.original=f.define,f.define=d,f.define.packaged=!0),f.require&&f.require.packaged||(e.original=f.require,f.require=b,f.require.packaged=!0)}var b="",c=function(){return this
-}();if(b||"undefined"==typeof requirejs){var d=function(a,b,c){return"string"!=typeof a?(d.original?d.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace()),void 0):(2==arguments.length&&(c=b),d.modules||(d.modules={},d.payloads={}),d.payloads[a]=c,d.modules[a]=null,void 0)},e=function(a,b,c){if("[object Array]"===Object.prototype.toString.call(b)){for(var d=[],f=0,h=b.length;h>f;++f){var i=g(a,b[f]);if(!i&&e.original)return e.original.apply(window,arguments);d.push(i)}c&&c.apply(null,d)}else{if("string"==typeof b){var j=g(a,b);return!j&&e.original?e.original.apply(window,arguments):(c&&c(),j)}if(e.original)return e.original.apply(window,arguments)}},f=function(a,b){if(-1!==b.indexOf("!")){var c=b.split("!");return f(a,c[0])+"!"+f(a,c[1])}if("."==b.charAt(0)){var d=a.split("/").slice(0,-1).join("/");for(b=d+"/"+b;-1!==b.indexOf(".")&&e!=b;){var e=b;b=b.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return b},g=function(a,b){b=f(a,b);var c=d.modules[b];if(!c){if(c=d.payloads[b],"function"==typeof c){var g={},h={id:b,uri:"",exports:g,packaged:!0},i=function(a,c){return e(b,a,c)},j=c(i,g,h);g=j||h.exports,d.modules[b]=g,delete d.payloads[b]}c=d.modules[b]=g||c}return c};a(b)}}(),define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(a){a("./regexp"),a("./es5-shim")}),define("ace/lib/regexp",["require","exports","module"],function(){function a(a){return(a.global?"g":"")+(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.extended?"x":"")+(a.sticky?"y":"")}function b(a,b,c){if(Array.prototype.indexOf)return a.indexOf(b,c);for(var d=c||0;d<a.length;d++)if(a[d]===b)return d;return-1}var c={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},d=void 0===c.exec.call(/()??/,"")[1],e=function(){var a=/^/g;return c.test.call(a,""),!a.lastIndex}();e&&d||(RegExp.prototype.exec=function(f){var g,h,i=c.exec.apply(this,arguments);if("string"==typeof f&&i){if(!d&&i.length>1&&b(i,"")>-1&&(h=RegExp(this.source,c.replace.call(a(this),"g","")),c.replace.call(f.slice(i.index),h,function(){for(var a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var j=1;j<i.length;j++)g=this._xregexp.captureNames[j-1],g&&(i[g]=i[j]);!e&&this.global&&!i[0].length&&this.lastIndex>i.index&&this.lastIndex--}return i},e||(RegExp.prototype.test=function(a){var b=c.exec.call(this,a);return b&&this.global&&!b[0].length&&this.lastIndex>b.index&&this.lastIndex--,!!b}))}),define("ace/lib/es5-shim",["require","exports","module"],function(){function a(){}function b(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}function c(a){return a=+a,a!==a?a=0:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(a>0||-1)*Math.floor(Math.abs(a))),a}Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if("function"!=typeof c)throw new TypeError("Function.prototype.bind called on incompatible "+c);var d=l.call(arguments,1),e=function(){if(this instanceof e){var a=c.apply(this,d.concat(l.call(arguments)));return Object(a)===a?a:this}return c.apply(b,d.concat(l.call(arguments)))};return c.prototype&&(a.prototype=c.prototype,e.prototype=new a,a.prototype=null),e});var d,e,f,g,h,i=Function.prototype.call,j=Array.prototype,k=Object.prototype,l=j.slice,m=i.bind(k.toString),n=i.bind(k.hasOwnProperty);if((h=n(k,"__defineGetter__"))&&(d=i.bind(k.__defineGetter__),e=i.bind(k.__defineSetter__),f=i.bind(k.__lookupGetter__),g=i.bind(k.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function a(a){var b=new Array(a+2);return b[0]=b[1]=0,b}var b,c=[];return c.splice.apply(c,a(20)),c.splice.apply(c,a(26)),b=c.length,c.splice(5,0,"XXX"),b+1==c.length,b+1==c.length?!0:void 0}()){var o=Array.prototype.splice;Array.prototype.splice=function(a,b){return arguments.length?o.apply(this,[void 0===a?0:a,void 0===b?this.length-a:b].concat(l.call(arguments,2))):[]}}else Array.prototype.splice=function(a,b){var c=this.length;a>0?a>c&&(a=c):void 0==a?a=0:0>a&&(a=Math.max(c+a,0)),c>a+b||(b=c-a);var d=this.slice(a,a+b),e=l.call(arguments,2),f=e.length;if(a===c)f&&this.push.apply(this,e);else{var g=Math.min(b,c-a),h=a+g,i=h+f-g,j=c-h,k=c-g;if(h>i)for(var m=0;j>m;++m)this[i+m]=this[h+m];else if(i>h)for(m=j;m--;)this[i+m]=this[h+m];if(f&&a===k)this.length=k,this.push.apply(this,e);else for(this.length=k+f,m=0;f>m;++m)this[a+m]=e[m]}return d};Array.isArray||(Array.isArray=function(a){return"[object Array]"==m(a)});var p=Object("a"),q="a"!=p[0]||!(0 in p);if(Array.prototype.forEach||(Array.prototype.forEach=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=arguments[1],e=-1,f=c.length>>>0;if("[object Function]"!=m(a))throw new TypeError;for(;++e<f;)e in c&&a.call(d,c[e],e,b)}),Array.prototype.map||(Array.prototype.map=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){var b,c=H(this),d=q&&"[object String]"==m(this)?this.split(""):c,e=d.length>>>0,f=[],g=arguments[1];if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");for(var h=0;e>h;h++)h in d&&(b=d[h],a.call(g,b,h,c)&&f.push(b));return f}),Array.prototype.every||(Array.prototype.every=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&a.call(e,c[f],f,b))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=c.length>>>0;if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");if(!d&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var e,f=0;if(arguments.length>=2)e=arguments[1];else for(;;){if(f in c){e=c[f++];break}if(++f>=d)throw new TypeError("reduce of empty array with no initial value")}for(;d>f;f++)f in c&&(e=a.call(void 0,e,c[f],f,b));return e}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=c.length>>>0;if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");if(!d&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var e,f=d-1;if(arguments.length>=2)e=arguments[1];else for(;;){if(f in c){e=c[f--];break}if(--f<0)throw new TypeError("reduceRight of empty array with no initial value")}do f in this&&(e=a.call(void 0,e,c[f],f,b));while(f--);return e}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(a){var b=q&&"[object String]"==m(this)?this.split(""):H(this),d=b.length>>>0;if(!d)return-1;var e=0;for(arguments.length>1&&(e=c(arguments[1])),e=e>=0?e:Math.max(0,d+e);d>e;e++)if(e in b&&b[e]===a)return e;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(a){var b=q&&"[object String]"==m(this)?this.split(""):H(this),d=b.length>>>0;if(!d)return-1;var e=d-1;for(arguments.length>1&&(e=Math.min(e,c(arguments[1]))),e=e>=0?e:d-Math.abs(e);e>=0;e--)if(e in b&&a===b[e])return e;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:k)}),!Object.getOwnPropertyDescriptor){var r="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(a,b){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError(r+a);if(n(a,b)){var c,d,e;if(c={enumerable:!0,configurable:!0},h){var i=a.__proto__;a.__proto__=k;var d=f(a,b),e=g(a,b);if(a.__proto__=i,d||e)return d&&(c.get=d),e&&(c.set=e),c}return c.value=a[b],c}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)}),!Object.create){var s;s=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var a={};for(var b in a)a[b]=null;return a.constructor=a.hasOwnProperty=a.propertyIsEnumerable=a.isPrototypeOf=a.toLocaleString=a.toString=a.valueOf=a.__proto__=null,a},Object.create=function(a,b){var c;if(null===a)c=s();else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}return void 0!==b&&Object.defineProperties(c,b),c}}if(Object.defineProperty){var t=b({}),u="undefined"==typeof document||b(document.createElement("div"));if(!t||!u)var v=Object.defineProperty}if(!Object.defineProperty||v){var w="Property description must be an object: ",x="Object.defineProperty called on non-object: ",y="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(a,b,c){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError(x+a);if("object"!=typeof c&&"function"!=typeof c||null===c)throw new TypeError(w+c);if(v)try{return v.call(Object,a,b,c)}catch(i){}if(n(c,"value"))if(h&&(f(a,b)||g(a,b))){var j=a.__proto__;a.__proto__=k,delete a[b],a[b]=c.value,a.__proto__=j}else a[b]=c.value;else{if(!h)throw new TypeError(y);n(c,"get")&&d(a,b,c.get),n(c,"set")&&e(a,b,c.set)}return a}}Object.defineProperties||(Object.defineProperties=function(a,b){for(var c in b)n(b,c)&&Object.defineProperty(a,c,b[c]);return a}),Object.seal||(Object.seal=function(a){return a}),Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(z){Object.freeze=function(a){return function(b){return"function"==typeof b?b:a(b)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(a){return a}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(a){if(Object(a)===a)throw new TypeError;for(var b="";n(a,b);)b+="?";a[b]=!0;var c=n(a,b);return delete a[b],c}),!Object.keys){var A=!0,B=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],C=B.length;for(var D in{toString:null})A=!1;Object.keys=function I(a){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError("Object.keys called on a non-object");var I=[];for(var b in a)n(a,b)&&I.push(b);if(A)for(var c=0,d=C;d>c;c++){var e=B[c];n(a,e)&&I.push(e)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var E=" \n \f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||E.trim()){E="["+E+"]";var F=new RegExp("^"+E+E+"*"),G=new RegExp(E+E+"*$");String.prototype.trim=function(){return String(this).replace(F,"").replace(G,"")}}var H=function(a){if(null==a)throw new TypeError("can't convert "+a+" to object");return Object(a)}}),define("ace/lib/dom",["require","exports","module"],function(a,b){if("undefined"!=typeof document){var c="http://www.w3.org/1999/xhtml";b.getDocumentHead=function(a){return a||(a=document),a.head||a.getElementsByTagName("head")[0]||a.documentElement},b.createElement=function(a,b){return document.createElementNS?document.createElementNS(b||c,a):document.createElement(a)},b.hasCssClass=function(a,b){var c=a.className.split(/\s+/g);return-1!==c.indexOf(b)},b.addCssClass=function(a,c){b.hasCssClass(a,c)||(a.className+=" "+c)},b.removeCssClass=function(a,b){for(var c=a.className.split(/\s+/g);;){var d=c.indexOf(b);if(-1==d)break;c.splice(d,1)}a.className=c.join(" ")},b.toggleCssClass=function(a,b){for(var c=a.className.split(/\s+/g),d=!0;;){var e=c.indexOf(b);if(-1==e)break;d=!1,c.splice(e,1)}return d&&c.push(b),a.className=c.join(" "),d},b.setCssClass=function(a,c,d){d?b.addCssClass(a,c):b.removeCssClass(a,c)},b.hasCssString=function(a,b){var c,d=0;if(b=b||document,b.createStyleSheet&&(c=b.styleSheets)){for(;d<c.length;)if(c[d++].owningElement.id===a)return!0}else if(c=b.getElementsByTagName("style"))for(;d<c.length;)if(c[d++].id===a)return!0;return!1},b.importCssString=function(a,d,e){if(e=e||document,d&&b.hasCssString(d,e))return null;var f;e.createStyleSheet?(f=e.createStyleSheet(),f.cssText=a,d&&(f.owningElement.id=d)):(f=e.createElementNS?e.createElementNS(c,"style"):e.createElement("style"),f.appendChild(e.createTextNode(a)),d&&(f.id=d),b.getDocumentHead(e).appendChild(f))},b.importCssStylsheet=function(a,c){if(c.createStyleSheet)c.createStyleSheet(a);else{var d=b.createElement("link");d.rel="stylesheet",d.href=a,b.getDocumentHead(c).appendChild(d)}},b.getInnerWidth=function(a){return parseInt(b.computedStyle(a,"paddingLeft"),10)+parseInt(b.computedStyle(a,"paddingRight"),10)+a.clientWidth},b.getInnerHeight=function(a){return parseInt(b.computedStyle(a,"paddingTop"),10)+parseInt(b.computedStyle(a,"paddingBottom"),10)+a.clientHeight},void 0!==window.pageYOffset?(b.getPageScrollTop=function(){return window.pageYOffset},b.getPageScrollLeft=function(){return window.pageXOffset}):(b.getPageScrollTop=function(){return document.body.scrollTop},b.getPageScrollLeft=function(){return document.body.scrollLeft}),b.computedStyle=window.getComputedStyle?function(a,b){return b?(window.getComputedStyle(a,"")||{})[b]||"":window.getComputedStyle(a,"")||{}}:function(a,b){return b?a.currentStyle[b]:a.currentStyle},b.scrollbarWidth=function(a){var c=b.createElement("ace_inner");c.style.width="100%",c.style.minWidth="0px",c.style.height="200px",c.style.display="block";var d=b.createElement("ace_outer"),e=d.style;e.position="absolute",e.left="-10000px",e.overflow="hidden",e.width="200px",e.minWidth="0px",e.height="150px",e.display="block",d.appendChild(c);var f=a.documentElement;f.appendChild(d);var g=c.offsetWidth;e.overflow="scroll";var h=c.offsetWidth;return g==h&&(h=d.clientWidth),f.removeChild(d),g-h},b.setInnerHtml=function(a,b){var c=a.cloneNode(!1);return c.innerHTML=b,a.parentNode.replaceChild(c,a),c},"textContent"in document.documentElement?(b.setInnerText=function(a,b){a.textContent=b},b.getInnerText=function(a){return a.textContent}):(b.setInnerText=function(a,b){a.innerText=b},b.getInnerText=function(a){return a.innerText}),b.getParentWindow=function(a){return a.defaultView||a.parentWindow}}}),define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent","ace/lib/dom"],function(a,b){function c(a,b,c){var h=0;if(h=!e.isOpera||"KeyboardEvent"in window||!e.isMac?0|(b.ctrlKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.metaKey?8:0):0|(b.metaKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.ctrlKey?8:0),!e.isMac&&f){if((f[91]||f[92])&&(h|=8),f.altGr){if(3==(3&h))return;f.altGr=0}if(18===c||17===c){var i=b.location||b.keyLocation;if(17===c&&1===i)g=b.timeStamp;else if(18===c&&3===h&&2===i){var j=-g;g=b.timeStamp,j+=g,3>j&&(f.altGr=!0)}}}if(c in d.MODIFIER_KEYS){switch(d.MODIFIER_KEYS[c]){case"Alt":h=2;break;case"Shift":h=4;break;case"Ctrl":h=1;break;default:h=8}c=0}return 8&h&&(91===c||93===c)&&(c=0),h||13!==c||!b.location&&3!==b.keyLocation||(a(b,h,-c),!b.defaultPrevented)?h||c in d.FUNCTION_KEYS||c in d.PRINTABLE_KEYS?a(b,h,c):!1:void 0}{var d=a("./keys"),e=a("./useragent");a("./dom")}b.addListener=function(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1);if(a.attachEvent){var d=function(){c.call(a,window.event)};c._wrapper=d,a.attachEvent("on"+b,d)}},b.removeListener=function(a,b,c){return a.removeEventListener?a.removeEventListener(b,c,!1):(a.detachEvent&&a.detachEvent("on"+b,c._wrapper||c),void 0)},b.stopEvent=function(a){return b.stopPropagation(a),b.preventDefault(a),!1},b.stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},b.preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},b.getButton=function(a){return"dblclick"==a.type?0:"contextmenu"==a.type||a.ctrlKey&&e.isMac?2:a.preventDefault?a.button:{1:0,2:2,4:1}[a.button]},b.capture=function(a,c,d){function e(a){c&&c(a),d&&d(a),b.removeListener(document,"mousemove",c,!0),b.removeListener(document,"mouseup",e,!0),b.removeListener(document,"dragstart",e,!0)}b.addListener(document,"mousemove",c,!0),b.addListener(document,"mouseup",e,!0),b.addListener(document,"dragstart",e,!0)},b.addMouseWheelListener=function(a,c){if("onmousewheel"in a){var d=8;b.addListener(a,"mousewheel",function(a){void 0!==a.wheelDeltaX?(a.wheelX=-a.wheelDeltaX/d,a.wheelY=-a.wheelDeltaY/d):(a.wheelX=0,a.wheelY=-a.wheelDelta/d),c(a)})}else"onwheel"in a?b.addListener(a,"wheel",function(a){a.wheelX=5*(a.deltaX||0),a.wheelY=5*(a.deltaY||0),c(a)}):b.addListener(a,"DOMMouseScroll",function(a){a.axis&&a.axis==a.HORIZONTAL_AXIS?(a.wheelX=5*(a.detail||0),a.wheelY=0):(a.wheelX=0,a.wheelY=5*(a.detail||0)),c(a)})},b.addMultiMouseDownListener=function(a,c,d,f){var g,h,i,j=0,k={2:"dblclick",3:"tripleclick",4:"quadclick"};b.addListener(a,"mousedown",function(a){if(0!=b.getButton(a)?j=0:a.detail>1?(j++,j>4&&(j=1)):j=1,e.isIE){var c=Math.abs(a.clientX-g)>5||Math.abs(a.clientY-h)>5;c&&(j=1),1==j&&(g=a.clientX,h=a.clientY)}if(d[f]("mousedown",a),j>4)j=0;else if(j>1)return d[f](k[j],a)}),e.isOldIE&&b.addListener(a,"dblclick",function(a){j=2,i&&clearTimeout(i),i=setTimeout(function(){i=null},c[j-1]||600),d[f]("mousedown",a),d[f](k[j],a)})};var f=null,g=0;if(b.addCommandKeyListener=function(a,d){var g=b.addListener;if(e.isOldGecko||e.isOpera&&!("KeyboardEvent"in window)){var h=null;g(a,"keydown",function(a){h=a.keyCode}),g(a,"keypress",function(a){return c(d,a,h)})}else{var i=null;g(a,"keydown",function(a){f[a.keyCode]=!0;var b=c(d,a,a.keyCode);return i=a.defaultPrevented,b}),g(a,"keypress",function(a){i&&(a.ctrlKey||a.altKey||a.shiftKey||a.metaKey)&&(b.stopEvent(a),i=null)}),g(a,"keyup",function(a){f[a.keyCode]=null}),f||(f=Object.create(null),g(window,"focus",function(){f=Object.create(null)}))}},window.postMessage&&!e.isOldIE){var h=1;b.nextTick=function(a,c){c=c||window;var d="zero-timeout-message-"+h;b.addListener(c,"message",function e(f){f.data==d&&(b.stopPropagation(f),b.removeListener(c,"message",e),a())}),c.postMessage(d,"*")}}b.nextFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,b.nextFrame=b.nextFrame?b.nextFrame.bind(window):function(a){setTimeout(a,17)}}),define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(a,b){var c=a("./oop"),d=function(){var a={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",188:",",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}};for(var b in a.FUNCTION_KEYS){var d=a.FUNCTION_KEYS[b].toLowerCase();a[d]=parseInt(b,10)}return c.mixin(a,a.MODIFIER_KEYS),c.mixin(a,a.PRINTABLE_KEYS),c.mixin(a,a.FUNCTION_KEYS),a.enter=a["return"],a.escape=a.esc,a.del=a["delete"],a[173]="-",a}();c.mixin(b,d),b.keyCodeToString=function(a){return(d[a]||String.fromCharCode(a)).toLowerCase()}}),define("ace/lib/oop",["require","exports","module"],function(a,b){b.inherits=function(){var a=function(){};return function(b,c){a.prototype=c.prototype,b.super_=c.prototype,b.prototype=new a,b.prototype.constructor=b}}(),b.mixin=function(a,b){for(var c in b)a[c]=b[c];return a},b.implement=function(a,c){b.mixin(a,c)}}),define("ace/lib/useragent",["require","exports","module"],function(a,b){if(b.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},b.getOS=function(){return b.isMac?b.OS.MAC:b.isLinux?b.OS.LINUX:b.OS.WINDOWS},"object"==typeof navigator){var c=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),d=navigator.userAgent;b.isWin="win"==c,b.isMac="mac"==c,b.isLinux="linux"==c,b.isIE=("Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0)&&parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]),b.isOldIE=b.isIE&&b.isIE<9,b.isGecko=b.isMozilla=window.controllers&&"Gecko"===window.navigator.product,b.isOldGecko=b.isGecko&&parseInt((navigator.userAgent.match(/rv\:(\d+)/)||[])[1],10)<4,b.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),b.isWebKit=parseFloat(d.split("WebKit/")[1])||void 0,b.isChrome=parseFloat(d.split(" Chrome/")[1])||void 0,b.isAIR=d.indexOf("AdobeAIR")>=0,b.isIPad=d.indexOf("iPad")>=0,b.isTouchPad=d.indexOf("TouchPad")>=0}}),define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config"],function(a,b){a("./lib/fixoldbrowsers");var c=a("./lib/oop"),d=a("./lib/dom"),e=a("./lib/lang"),f=a("./lib/useragent"),g=a("./keyboard/textinput").TextInput,h=a("./mouse/mouse_handler").MouseHandler,i=a("./mouse/fold_handler").FoldHandler,j=a("./keyboard/keybinding").KeyBinding,k=a("./edit_session").EditSession,l=a("./search").Search,m=a("./range").Range,n=a("./lib/event_emitter").EventEmitter,o=a("./commands/command_manager").CommandManager,p=a("./commands/default_commands").commands,q=a("./config"),r=function(a,b){var c=a.getContainerElement();this.container=c,this.renderer=a,this.commands=new o(f.isMac?"mac":"win",p),this.textInput=new g(a.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new j(this),this.$mouseHandler=new h(this),new i(this),this.$blockScrolling=0,this.$search=(new l).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=e.delayedCall(function(){this._signal("input",{}),this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(a,b){b._$emitInputEvent.schedule(31)}),this.setSession(b||new k("")),q.resetOptions(this),q._emit("editor",this)};(function(){c.implement(this,n),this.$initOperationListeners=function(){function a(a){return a[a.length-1]}this.selections=[],this.commands.on("exec",function(b){this.startOperation(b);var c=b.command;if("fileJump"==c.group){var d=this.prevOp;d&&"fileJump"==d.command.group||(this.lastFileJumpPos=a(this.selections))}else this.lastFileJumpPos=null}.bind(this),!0),this.commands.on("afterExec",function(a){var b=a.command;return"fileJump"==b.group&&this.lastFileJumpPos&&!this.curOp.selectionChanged?(this.selection.fromJSON(this.lastFileJumpPos),void 0):(this.endOperation(a),void 0)}.bind(this),!0),this.$opResetTimer=e.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(a){if(this.curOp){if(!a||this.curOp.command)return;this.prevOp=this.curOp}a||(this.previousCommand=null,a={}),this.$opResetTimer.schedule(),this.curOp={command:a.command||{},args:a.args},this.selections.push(this.selection.toJSON())},this.endOperation=function(){this.curOp&&(this.prevOp=this.curOp,this.curOp=null)},this.$historyTracker=function(a){if(this.$mergeUndoDeltas){var b=this.prevOp,c=["backspace","del","insertstring"],d=b.command&&a.command.name==b.command.name;if("insertstring"==a.command.name){var e=a.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),d=d&&this.mergeNextCommand&&(!/\s/.test(e)||/\s/.test(b.args)),this.mergeNextCommand=!0}else d=d&&-1!==c.indexOf(a.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(d=!1),d?this.session.mergeUndoDeltas=!0:-1!==c.indexOf(a.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(a){if(a)if("string"==typeof a){this.$keybindingId=a;var b=this;q.loadModule(["keybinding",a],function(c){b.$keybindingId==a&&b.keyBinding.setKeyboardHandler(c&&c.handler)})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(a);else this.keyBinding.setKeyboardHandler(null)},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(a){if(this.session!=a){if(this.session){var b=this.session;this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var c=this.session.getSelection();c.removeEventListener("changeCursor",this.$onCursorChange),c.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=a,this.$onDocumentChange=this.onDocumentChange.bind(this),a.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(a),this.$onChangeMode=this.onChangeMode.bind(this),a.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),a.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),a.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),a.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),a.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),a.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=a.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull(),this._emit("changeSession",{session:a,oldSession:b})}},this.getSession=function(){return this.session},this.setValue=function(a,b){return this.session.doc.setValue(a),b?1==b?this.navigateFileEnd():-1==b&&this.navigateFileStart():this.selectAll(),a},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(a){this.renderer.onResize(a)},this.setTheme=function(a){this.renderer.setTheme(a)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(a){this.renderer.setStyle(a)},this.unsetStyle=function(a){this.renderer.unsetStyle(a)},this.getFontSize=function(){return this.getOption("fontSize")||d.computedStyle(this.container,"fontSize")},this.setFontSize=function(a){this.setOption("fontSize",a)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var a=this;this.$highlightPending=!0,setTimeout(function(){a.$highlightPending=!1;var b=a.session.findMatchingBracket(a.getCursorPosition());if(b)var c=new m(b.row,b.column,b.row,b.column+1);else if(a.session.$mode.getMatching)var c=a.session.$mode.getMatching(a.session);c&&(a.session.$bracketHighlight=a.session.addMarker(c,"ace_bracket","text"))},50)}},this.focus=function(){var a=this;setTimeout(function(){a.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus"))},this.onBlur=function(){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur"))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(a){var b,c=a.data,d=c.range;b=d.start.row==d.end.row&&"insertLines"!=c.action&&"removeLines"!=c.action?d.end.row:1/0,this.renderer.updateLines(d.start.row,b),this._emit("change",a),this.$cursorChange()},this.onTokenizerUpdate=function(a){var b=a.data;this.renderer.updateLines(b.first,b.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.$highlightBrackets(),this.$updateHighlightActiveLine(),this._emit("changeSelection")},this.$updateHighlightActiveLine=function(){var a,b=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(a=this.getCursorPosition()),this.renderer.$maxLines&&1===this.session.getLength()&&(a=!1)),b.$highlightLineMarker&&!a)b.removeMarker(b.$highlightLineMarker.id),b.$highlightLineMarker=null;
-else if(!b.$highlightLineMarker&&a){var c=new m(a.row,a.column,a.row,1/0);c.id=b.addMarker(c,"ace_active-line","screenLine"),b.$highlightLineMarker=c}else a&&(b.$highlightLineMarker.start.row=a.row,b.$highlightLineMarker.end.row=a.row,b.$highlightLineMarker.start.column=a.column,b._emit("changeBackMarker"))},this.onSelectionChange=function(){var a=this.session;if(a.$selectionMarker&&a.removeMarker(a.$selectionMarker),a.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var b=this.selection.getRange(),c=this.getSelectionStyle();a.$selectionMarker=a.addMarker(b,"ace_selection",c)}var d=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(d),this._emit("changeSelection")},this.$getSelectionHighLightRegexp=function(){var a=this.session,b=this.getSelectionRange();if(!b.isEmpty()&&!b.isMultiLine()){var c=b.start.column-1,d=b.end.column+1,e=a.getLine(b.start.row),f=e.length,g=e.substring(Math.max(c,0),Math.min(d,f));if(!(c>=0&&/^[\w\d]/.test(g)||f>=d&&/[\w\d]$/.test(g))&&(g=e.substring(b.start.column,b.end.column),/^[\w\d]+$/.test(g))){var h=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:g});return h}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(a){this.renderer.updateText(),this._emit("changeMode",a)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var a=this.getSelectedText();return this._signal("copy",a),a},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(a){this.$readOnly||(this._emit("paste",a),this.insert(a))},this.execCommand=function(a,b){this.commands.exec(a,this,b)},this.insert=function(a){var b=this.session,c=b.getMode(),d=this.getCursorPosition();if(this.getBehavioursEnabled()){var e=c.transformAction(b.getState(d.row),"insertion",this,b,a);e&&(a!==e.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),a=e.text)}if(" "==a&&(a=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var f=new m.fromPoints(d,d);f.end.column+=a.length,this.session.remove(f)}}else{var f=this.getSelectionRange();d=this.session.remove(f),this.clearSelection()}if("\n"==a||"\r\n"==a){var g=b.getLine(d.row);if(d.column>g.search(/\S|$/)){var h=g.substr(d.column).search(/\S|$/);b.doc.removeInLine(d.row,d.column,d.column+h)}}this.clearSelection();{var i=d.column,j=b.getState(d.row),g=b.getLine(d.row),k=c.checkOutdent(j,g,a);b.insert(d,a)}if(e&&e.selection&&(2==e.selection.length?this.selection.setSelectionRange(new m(d.row,i+e.selection[0],d.row,i+e.selection[1])):this.selection.setSelectionRange(new m(d.row+e.selection[0],e.selection[1],d.row+e.selection[2],e.selection[3]))),b.getDocument().isNewLine(a)){var l=c.getNextLineIndent(j,g.slice(0,d.column),b.getTabString());b.insert({row:d.row+1,column:0},l)}k&&c.autoOutdent(j,b,d.row)},this.onTextInput=function(a){this.keyBinding.onTextInput(a)},this.onCommandKey=function(a,b,c){this.keyBinding.onCommandKey(a,b,c)},this.setOverwrite=function(a){this.session.setOverwrite(a)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(a){this.setOption("scrollSpeed",a)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(a){this.setOption("dragDelay",a)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(a){this.setOption("selectionStyle",a)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(a){this.setOption("highlightActiveLine",a)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(a){this.setOption("highlightGutterLine",a)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(a){this.setOption("highlightSelectedWord",a)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(a){this.renderer.setAnimatedScroll(a)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(a){this.renderer.setShowInvisibles(a)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(a){this.renderer.setDisplayIndentGuides(a)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(a){this.renderer.setShowPrintMargin(a)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(a){this.renderer.setPrintMarginColumn(a)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(a){this.setOption("readOnly",a)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(a){this.setOption("behavioursEnabled",a)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(a){this.setOption("wrapBehavioursEnabled",a)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(a){this.setOption("showFoldWidgets",a)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(a){this.setOption("fadeFoldWidgets",a)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(a){this.selection.isEmpty()&&("left"==a?this.selection.selectLeft():this.selection.selectRight());var b=this.getSelectionRange();if(this.getBehavioursEnabled()){var c=this.session,d=c.getState(b.start.row),e=c.getMode().transformAction(d,"deletion",this,c,b);if(0==b.end.column){var f=c.getTextRange(b);if("\n"==f[f.length-1]){var g=c.getLine(b.end.row);/^\s+$/.test(g)&&(b.end.column=g.length)}}e&&(b=e)}this.session.remove(b),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var a=this.getSelectionRange();a.start.column==a.end.column&&a.start.row==a.end.row&&(a.end.column=0,a.end.row++),this.session.remove(a),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var a=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(a)},this.transposeLetters=function(){if(this.selection.isEmpty()){var a=this.getCursorPosition(),b=a.column;if(0!==b){var c,d,e=this.session.getLine(a.row);b<e.length?(c=e.charAt(b)+e.charAt(b-1),d=new m(a.row,b-1,a.row,b+1)):(c=e.charAt(b-1)+e.charAt(b-2),d=new m(a.row,b-2,a.row,b)),this.session.replace(d,c)}}},this.toLowerCase=function(){var a=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),c=this.session.getTextRange(b);this.session.replace(b,c.toLowerCase()),this.selection.setSelectionRange(a)},this.toUpperCase=function(){var a=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),c=this.session.getTextRange(b);this.session.replace(b,c.toUpperCase()),this.selection.setSelectionRange(a)},this.indent=function(){var a=this.session,b=this.getSelectionRange();if(b.start.row<b.end.row){var c=this.$getSelectedRows();return a.indentRows(c.first,c.last," "),void 0}if(b.start.column<b.end.column){var d=a.getTextRange(b);if(!/^\s+$/.test(d)){var c=this.$getSelectedRows();return a.indentRows(c.first,c.last," "),void 0}}var f=a.getLine(b.start.row),g=b.start,h=a.getTabSize(),i=a.documentToScreenColumn(g.row,g.column);if(this.session.getUseSoftTabs())var j=h-i%h,k=e.stringRepeat(" ",j);else{for(var j=i%h;" "==f[b.start.column]&&j;)b.start.column--,j--;this.selection.setSelectionRange(b),k=" "}return this.insert(k)},this.blockIndent=function(){var a=this.$getSelectedRows();this.session.indentRows(a.first,a.last," ")},this.blockOutdent=function(){var a=this.session.getSelection();this.session.outdentRows(a.getRange())},this.sortLines=function(){var a=this.$getSelectedRows(),b=this.session,c=[];for(e=a.first;e<=a.last;e++)c.push(b.getLine(e));c.sort(function(a,b){return a.toLowerCase()<b.toLowerCase()?-1:a.toLowerCase()>b.toLowerCase()?1:0});for(var d=new m(0,0,0,0),e=a.first;e<=a.last;e++){var f=b.getLine(e);d.start.row=e,d.end.row=e,d.end.column=f.length,b.replace(d,c[e-a.first])}},this.toggleCommentLines=function(){var a=this.session.getState(this.getCursorPosition().row),b=this.$getSelectedRows();this.session.getMode().toggleCommentLines(a,this.session,b.first,b.last)},this.toggleBlockComment=function(){var a=this.getCursorPosition(),b=this.session.getState(a.row),c=this.getSelectionRange();this.session.getMode().toggleBlockComment(b,this.session,c,a)},this.getNumberAt=function(a,b){var c=/[\-]?[0-9]+(?:\.[0-9]+)?/g;c.lastIndex=0;for(var d=this.session.getLine(a);c.lastIndex<b;){var e=c.exec(d);if(e.index<=b&&e.index+e[0].length>=b){var f={value:e[0],start:e.index,end:e.index+e[0].length};return f}}return null},this.modifyNumber=function(a){var b=this.selection.getCursor().row,c=this.selection.getCursor().column,d=new m(b,c-1,b,c),e=this.session.getTextRange(d);if(!isNaN(parseFloat(e))&&isFinite(e)){var f=this.getNumberAt(b,c);if(f){var g=f.value.indexOf(".")>=0?f.start+f.value.indexOf(".")+1:f.end,h=f.start+f.value.length-g,i=parseFloat(f.value);i*=Math.pow(10,h),a*=g!==f.end&&g>c?Math.pow(10,f.end-c-1):Math.pow(10,f.end-c),i+=a,i/=Math.pow(10,h);var j=i.toFixed(h),k=new m(b,f.start,b,f.end);this.session.replace(k,j),this.moveCursorTo(b,Math.max(f.start+1,c+j.length-f.value.length))}}},this.removeLines=function(){var a,b=this.$getSelectedRows();a=0===b.first||b.last+1<this.session.getLength()?new m(b.first,0,b.last+1,0):new m(b.first-1,this.session.getLine(b.first-1).length,b.last,this.session.getLine(b.last).length),this.session.remove(a),this.clearSelection()},this.duplicateSelection=function(){var a=this.selection,b=this.session,c=a.getRange(),d=a.isBackwards();if(c.isEmpty()){var e=c.start.row;b.duplicateLines(e,e)}else{var f=d?c.start:c.end,g=b.insert(f,b.getTextRange(c),!1);c.start=f,c.end=g,a.setSelectionRange(c,d)}},this.moveLinesDown=function(){this.$moveLines(function(a,b){return this.session.moveLinesDown(a,b)})},this.moveLinesUp=function(){this.$moveLines(function(a,b){return this.session.moveLinesUp(a,b)})},this.moveText=function(a,b,c){return this.session.moveText(a,b,c)},this.copyLinesUp=function(){this.$moveLines(function(a,b){return this.session.duplicateLines(a,b),0})},this.copyLinesDown=function(){this.$moveLines(function(a,b){return this.session.duplicateLines(a,b)})},this.$moveLines=function(a){var b=this.selection;if(!b.inMultiSelectMode||this.inVirtualSelectionMode){var c=b.toOrientedRange(),d=this.$getSelectedRows(c),e=a.call(this,d.first,d.last);c.moveBy(e,0),b.fromOrientedRange(c)}else{var f=b.rangeList.ranges;b.rangeList.detach(this.session);for(var g=f.length;g--;){for(var h=g,d=f[g].collapseRows(),i=d.end.row,j=d.start.row;g--;){var d=f[g].collapseRows();if(!(j-d.end.row<=1))break;j=d.end.row}g++;for(var e=a.call(this,j,i);h>=g;)f[h].moveBy(e,0),h--}b.fromOrientedRange(b.ranges[0]),b.rangeList.attach(this.session)}},this.$getSelectedRows=function(){var a=this.getSelectionRange().collapseRows();return{first:a.start.row,last:a.end.row}},this.onCompositionStart=function(){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(a){this.renderer.setCompositionText(a)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(a){return a>=this.getFirstVisibleRow()&&a<=this.getLastVisibleRow()},this.isRowFullyVisible=function(a){return a>=this.renderer.getFirstFullyVisibleRow()&&a<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(a,b){var c=this.renderer,d=this.renderer.layerConfig,e=a*Math.floor(d.height/d.lineHeight);this.$blockScrolling++,1==b?this.selection.$moveSelection(function(){this.moveCursorBy(e,0)}):0==b&&(this.selection.moveCursorBy(e,0),this.selection.clearSelection()),this.$blockScrolling--;var f=c.scrollTop;c.scrollBy(0,e*d.lineHeight),null!=b&&c.scrollCursorIntoView(null,.5),c.animateScrolling(f)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(a){this.renderer.scrollToRow(a)},this.scrollToLine=function(a,b,c,d){this.renderer.scrollToLine(a,b,c,d)},this.centerSelection=function(){var a=this.getSelectionRange(),b={row:Math.floor(a.start.row+(a.end.row-a.start.row)/2),column:Math.floor(a.start.column+(a.end.column-a.start.column)/2)};this.renderer.alignCursor(b,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(a,b){this.selection.moveCursorTo(a,b)},this.moveCursorToPosition=function(a){this.selection.moveCursorToPosition(a)},this.jumpToMatching=function(a){var b=this.getCursorPosition(),c=this.session.getBracketRange(b);if(!c){if(c=this.find({needle:/[{}()\[\]]/g,preventScroll:!0,start:{row:b.row,column:b.column-1}}),!c)return;var d=c.start;d.row==b.row&&Math.abs(d.column-b.column)<2&&(c=this.session.getBracketRange(d))}d=c&&c.cursor||d,d&&(a?c&&c.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(d.row,d.column):(this.clearSelection(),this.moveCursorTo(d.row,d.column)))},this.gotoLine=function(a,b,c){this.selection.clearSelection(),this.session.unfold({row:a-1,column:b||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(a-1,b||0),this.$blockScrolling-=1,this.isRowFullyVisible(a-1)||this.scrollToLine(a-1,!0,c)},this.navigateTo=function(a,b){this.clearSelection(),this.moveCursorTo(a,b)},this.navigateUp=function(a){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var b=this.selection.anchor.getPosition();return this.moveCursorToPosition(b)}this.selection.clearSelection(),a=a||1,this.selection.moveCursorBy(-a,0)},this.navigateDown=function(a){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var b=this.selection.anchor.getPosition();return this.moveCursorToPosition(b)}this.selection.clearSelection(),a=a||1,this.selection.moveCursorBy(a,0)},this.navigateLeft=function(a){if(this.selection.isEmpty())for(a=a||1;a--;)this.selection.moveCursorLeft();else{var b=this.getSelectionRange().start;this.moveCursorToPosition(b)}this.clearSelection()},this.navigateRight=function(a){if(this.selection.isEmpty())for(a=a||1;a--;)this.selection.moveCursorRight();else{var b=this.getSelectionRange().end;this.moveCursorToPosition(b)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){var a=this.renderer.scrollTop;this.selection.moveCursorFileEnd(),this.clearSelection(),this.renderer.animateScrolling(a)},this.navigateFileStart=function(){var a=this.renderer.scrollTop;this.selection.moveCursorFileStart(),this.clearSelection(),this.renderer.animateScrolling(a)},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(a,b){b&&this.$search.set(b);var c=this.$search.find(this.session),d=0;return c?(this.$tryReplace(c,a)&&(d=1),null!==c&&(this.selection.setSelectionRange(c),this.renderer.scrollSelectionIntoView(c.start,c.end)),d):d},this.replaceAll=function(a,b){b&&this.$search.set(b);var c=this.$search.findAll(this.session),d=0;if(!c.length)return d;this.$blockScrolling+=1;var e=this.getSelectionRange();this.clearSelection(),this.selection.moveCursorTo(0,0);for(var f=c.length-1;f>=0;--f)this.$tryReplace(c[f],a)&&d++;return this.selection.setSelectionRange(e),this.$blockScrolling-=1,d},this.$tryReplace=function(a,b){var c=this.session.getTextRange(a);return b=this.$search.replace(c,b),null!==b?(a.end=this.session.replace(a,b),a):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(a,b,d){b||(b={}),"string"==typeof a||a instanceof RegExp?b.needle=a:"object"==typeof a&&c.mixin(b,a);var e=this.selection.getRange();null==b.needle&&(a=this.session.getTextRange(e)||this.$search.$options.needle,a||(e=this.session.getWordRange(e.start.row,e.start.column),a=this.session.getTextRange(e)),this.$search.set({needle:a})),this.$search.set(b),b.start||this.$search.set({start:e});var f=this.$search.find(this.session);return b.preventScroll?f:f?(this.revealRange(f,d),f):(b.backwards?e.start=e.end:e.end=e.start,this.selection.setRange(e),void 0)},this.findNext=function(a,b){this.find({skipCurrent:!0,backwards:!1},a,b)},this.findPrevious=function(a,b){this.find(a,{skipCurrent:!0,backwards:!0},b)},this.revealRange=function(a,b){this.$blockScrolling+=1,this.session.unfold(a),this.selection.setSelectionRange(a),this.$blockScrolling-=1;var c=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(a.start,a.end,.5),0!=b&&this.renderer.animateScrolling(c)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._emit("destroy",this)},this.setAutoScrollEditorIntoView=function(a){if(a!==!1){var b,c=this,d=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var e=this.$scrollAnchor;e.style.cssText="position:absolute",this.container.insertBefore(e,this.container.firstChild);var f=this.on("changeSelection",function(){d=!0}),g=this.renderer.on("beforeRender",function(){d&&(b=c.renderer.container.getBoundingClientRect())}),h=this.renderer.on("afterRender",function(){if(d&&b&&c.isFocused()){var a=c.renderer,f=a.$cursorLayer.$pixelPos,g=a.layerConfig,h=f.top-g.offset;d=f.top>=0&&h+b.top<0?!0:f.top<g.height&&f.top+b.top+g.lineHeight>window.innerHeight?!1:null,null!=d&&(e.style.top=h+"px",e.style.left=f.left+"px",e.style.height=g.lineHeight+"px",e.scrollIntoView(d)),d=b=null}});this.setAutoScrollEditorIntoView=function(a){a!==!0&&(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",f),this.renderer.removeEventListener("afterRender",h),this.renderer.removeEventListener("beforeRender",g))}}},this.$resetCursorStyle=function(){var a=this.$cursorStyle||"ace",b=this.renderer.$cursorLayer;b&&(b.setSmoothBlinking("smooth"==a),b.isBlinking=!this.$readOnly&&"wide"!=a)}}).call(r.prototype),q.defineOptions(r.prototype,"editor",{selectionStyle:{set:function(a){this.onSelectionChange(),this._emit("changeSelectionStyle",{data:a})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(a){this.textInput.setReadOnly(a),this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",foldStyle:"session"}),b.Editor=r}),define("ace/lib/lang",["require","exports","module"],function(a,b){b.stringReverse=function(a){return a.split("").reverse().join("")},b.stringRepeat=function(a,b){for(var c="";b>0;)1&b&&(c+=a),(b>>=1)&&(a+=a);return c};var c=/^\s\s*/,d=/\s\s*$/;b.stringTrimLeft=function(a){return a.replace(c,"")},b.stringTrimRight=function(a){return a.replace(d,"")},b.copyObject=function(a){var b={};for(var c in a)b[c]=a[c];return b},b.copyArray=function(a){for(var b=[],c=0,d=a.length;d>c;c++)b[c]=a[c]&&"object"==typeof a[c]?this.copyObject(a[c]):a[c];return b},b.deepCopy=function(a){if("object"!=typeof a)return a;var b=a.constructor();for(var c in a)b[c]="object"==typeof a[c]?this.deepCopy(a[c]):a[c];return b},b.arrayToMap=function(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=1;return b},b.createMap=function(a){var b=Object.create(null);for(var c in a)b[c]=a[c];return b},b.arrayRemove=function(a,b){for(var c=0;c<=a.length;c++)b===a[c]&&a.splice(c,1)},b.escapeRegExp=function(a){return a.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},b.escapeHTML=function(a){return a.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},b.getMatchOffsets=function(a,b){var c=[];return a.replace(b,function(a){c.push({offset:arguments[arguments.length-2],length:a.length})}),c},b.deferredCall=function(a){var b=null,c=function(){b=null,a()},d=function(a){return d.cancel(),b=setTimeout(c,a||0),d};return d.schedule=d,d.call=function(){return this.cancel(),a(),d},d.cancel=function(){return clearTimeout(b),b=null,d},d},b.delayedCall=function(a,b){var c=null,d=function(){c=null,a()},e=function(a){c&&clearTimeout(c),c=setTimeout(d,a||b)};return e.delay=e,e.schedule=function(a){null==c&&(c=setTimeout(d,a||0))},e.call=function(){this.cancel(),a()},e.cancel=function(){c&&clearTimeout(c),c=null},e.isPending=function(){return c},e}}),define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(a,b){var c=a("../lib/event"),d=a("../lib/useragent"),e=a("../lib/dom"),f=a("../lib/lang"),g=d.isChrome<18,h=function(a,b){function h(a){if(!p){if(C)b=0,c=a?0:k.value.length-1;else var b=a?2:1,c=2;try{k.setSelectionRange(b,c)}catch(d){}}}function i(){p||(k.value=l,d.isWebKit&&v.schedule())}function j(){setTimeout(function(){q&&(k.style.cssText=q,q=""),null==b.renderer.$keepTextAreaAtCursor&&(b.renderer.$keepTextAreaAtCursor=!0,b.renderer.$moveTextAreaToCursor())},0)}var k=e.createElement("textarea");k.className="ace_text-input",d.isTouchPad&&k.setAttribute("x-palm-disable-auto-cap",!0),k.wrap="off",k.autocorrect="off",k.autocapitalize="off",k.spellcheck=!1,k.style.opacity="0",a.insertBefore(k,a.firstChild);var l="",m=!1,n=!1,o=!1,p=!1,q="",r=!0;try{var s=document.activeElement===k}catch(t){}c.addListener(k,"blur",function(){b.onBlur(),s=!1}),c.addListener(k,"focus",function(){s=!0,b.onFocus(),h()}),this.focus=function(){k.focus()},this.blur=function(){k.blur()},this.isFocused=function(){return s};var u=f.delayedCall(function(){s&&h(r)}),v=f.delayedCall(function(){p||(k.value=l,s&&h())});d.isWebKit||b.addEventListener("changeSelection",function(){b.selection.isEmpty()!=r&&(r=!r,u.schedule())}),i(),s&&b.onFocus();var w=function(a){return 0===a.selectionStart&&a.selectionEnd===a.value.length};if(!k.setSelectionRange&&k.createTextRange&&(k.setSelectionRange=function(a,b){var c=this.createTextRange();c.collapse(!0),c.moveStart("character",a),c.moveEnd("character",b),c.select()},w=function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return b&&b.parentElement()==a?b.text==a.value:!1}),d.isOldIE){var x=!1,y=function(a){if(!x){var b=k.value;if(!p&&b&&b!=l){if(a&&b==l[0])return z.schedule();E(b),x=!0,i(),x=!1}}},z=f.delayedCall(y);c.addListener(k,"propertychange",y);var A={13:1,27:1};c.addListener(k,"keyup",function(a){return!p||k.value&&!A[a.keyCode]||setTimeout(L,0),(k.value.charCodeAt(0)||0)<129?z.call():(p?K():J(),void 0)}),c.addListener(k,"keydown",function(){z.schedule(50)})}var B=function(){m?m=!1:n?n=!1:w(k)?(b.selectAll(),h()):C&&h(b.selection.isEmpty())},C=null;this.setInputHandler=function(a){C=a},this.getInputHandler=function(){return C};var D=!1,E=function(a){C&&(a=C(a),C=null),o?(h(),a&&b.onPaste(a),o=!1):a==l.charAt(0)?D&&b.execCommand("del",{source:"ace"}):(a.substring(0,2)==l?a=a.substr(2):a.charAt(0)==l.charAt(0)?a=a.substr(1):a.charAt(a.length-1)==l.charAt(0)&&(a=a.slice(0,-1)),a.charAt(a.length-1)==l.charAt(0)&&(a=a.slice(0,-1)),a&&b.onTextInput(a)),D&&(D=!1)},F=function(){if(!p){var a=k.value;E(a),i()}},G=function(a){var d=b.getCopyText();if(!d)return c.preventDefault(a),void 0;var e=a.clipboardData||window.clipboardData;if(e&&!g){var f=e.setData("Text",d);f&&(b.onCut(),c.preventDefault(a))}f||(m=!0,k.value=d,k.select(),setTimeout(function(){m=!1,i(),h(),b.onCut()}))},H=function(a){var d=b.getCopyText();if(!d)return c.preventDefault(a),void 0;var e=a.clipboardData||window.clipboardData;if(e&&!g){var f=e.setData("Text",d);f&&(b.onCopy(),c.preventDefault(a))}f||(n=!0,k.value=d,k.select(),setTimeout(function(){n=!1,i(),h(),b.onCopy()}))},I=function(a){var e=a.clipboardData||window.clipboardData;if(e){var f=e.getData("Text");f&&b.onPaste(f),d.isIE&&setTimeout(h),c.preventDefault(a)}else k.value="",o=!0};c.addCommandKeyListener(k,b.onCommandKey.bind(b)),c.addListener(k,"select",B),c.addListener(k,"input",F),c.addListener(k,"cut",G),c.addListener(k,"copy",H),c.addListener(k,"paste",I),"oncut"in k&&"oncopy"in k&&"onpaste"in k||c.addListener(a,"keydown",function(a){if((!d.isMac||a.metaKey)&&a.ctrlKey)switch(a.keyCode){case 67:H(a);break;case 86:I(a);break;case 88:G(a)}});var J=function(){p||(p={},b.onCompositionStart(),setTimeout(K,0),b.on("mousedown",L),b.selection.isEmpty()||(b.insert(""),b.session.markUndoGroup(),b.selection.clearSelection()),b.session.markUndoGroup())},K=function(){if(p){var a=k.value.replace(/\x01/g,"");if(p.lastValue!==a&&(b.onCompositionUpdate(a),p.lastValue&&b.undo(),p.lastValue=a,p.lastValue)){var c=b.selection.getRange();b.insert(p.lastValue),b.session.markUndoGroup(),p.range=b.selection.getRange(),b.selection.setRange(c),b.selection.clearSelection()}}},L=function(a){var c=p;p=!1;var d=setTimeout(function(){d=null;var a=k.value.replace(/\x01/g,"");p||(a==c.lastValue?i():!c.lastValue&&a&&(i(),E(a)))});C=function(a){return d&&clearTimeout(d),a=a.replace(/\x01/g,""),a==c.lastValue?"":(c.lastValue&&d&&b.undo(),a)},b.onCompositionEnd(),b.removeListener("mousedown",L),"compositionend"==a.type&&c.range&&b.selection.setRange(c.range)},M=f.delayedCall(K,50);if(c.addListener(k,"compositionstart",J),d.isGecko?c.addListener(k,"text",function(){M.schedule()}):(c.addListener(k,"keyup",function(){M.schedule()}),c.addListener(k,"keydown",function(){M.schedule()})),c.addListener(k,"compositionend",L),this.getElement=function(){return k},this.setReadOnly=function(a){k.readOnly=a},this.onContextMenu=function(a){D=!0,q||(q=k.style.cssText),k.style.cssText="z-index:100000;"+(d.isIE?"opacity:0.1;":""),h(b.selection.isEmpty()),b._emit("nativecontextmenu",{target:b,domEvent:a});var f=b.container.getBoundingClientRect(),g=e.computedStyle(b.container),i=f.top+(parseInt(g.borderTopWidth)||0),l=f.left+(parseInt(f.borderLeftWidth)||0),m=f.bottom-i-k.clientHeight,n=function(a){k.style.left=a.clientX-l-2+"px",k.style.top=Math.min(a.clientY-i-2,m)+"px"};n(a),"mousedown"==a.type&&(b.renderer.$keepTextAreaAtCursor&&(b.renderer.$keepTextAreaAtCursor=null),d.isWin&&c.capture(b.container,n,j))},this.onContextMenuClose=j,!d.isGecko||d.isMac){var N=function(a){b.textInput.onContextMenu(a),j()};c.addListener(b.renderer.scroller,"contextmenu",N),c.addListener(k,"contextmenu",N)}};b.TextInput=h}),define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(a,b){var c=a("../lib/event"),d=a("../lib/useragent"),e=a("./default_handlers").DefaultHandlers,f=a("./default_gutter_handler").GutterHandler,g=a("./mouse_event").MouseEvent,h=a("./dragdrop_handler").DragdropHandler,i=a("../config"),j=function(a){this.editor=a,new e(this),new f(this),new h(this);var b=a.renderer.getMouseEventTarget();c.addListener(b,"click",this.onMouseEvent.bind(this,"click")),c.addListener(b,"mousemove",this.onMouseMove.bind(this,"mousemove")),c.addMultiMouseDownListener(b,[300,300,250],this,"onMouseEvent"),a.renderer.scrollBarV&&(c.addMultiMouseDownListener(a.renderer.scrollBarV.inner,[300,300,250],this,"onMouseEvent"),c.addMultiMouseDownListener(a.renderer.scrollBarH.inner,[300,300,250],this,"onMouseEvent")),c.addMouseWheelListener(a.container,this.onMouseWheel.bind(this,"mousewheel"));var d=a.renderer.$gutter;c.addListener(d,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),c.addListener(d,"click",this.onMouseEvent.bind(this,"gutterclick")),c.addListener(d,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),c.addListener(d,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),c.addListener(b,"mousedown",function(){a.focus()}),c.addListener(d,"mousedown",function(b){return a.focus(),c.preventDefault(b)})};(function(){this.onMouseEvent=function(a,b){this.editor._emit(a,new g(b,this.editor))},this.onMouseMove=function(a,b){var c=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;c&&c.length&&this.editor._emit(a,new g(b,this.editor))},this.onMouseWheel=function(a,b){var c=new g(b,this.editor);c.speed=2*this.$scrollSpeed,c.wheelX=b.wheelX,c.wheelY=b.wheelY,this.editor._emit(a,c)},this.setState=function(a){this.state=a},this.captureMouse=function(a,b){this.x=a.x,this.y=a.y,this.isMousePressed=!0;var e=this.editor.renderer;e.$keepTextAreaAtCursor&&(e.$keepTextAreaAtCursor=null);var f=this,g=function(a){f.x=a.clientX,f.y=a.clientY,b&&b(a)
-},h=function(a){clearInterval(j),i(),f[f.state+"End"]&&f[f.state+"End"](a),f.$clickSelection=null,null==e.$keepTextAreaAtCursor&&(e.$keepTextAreaAtCursor=!0,e.$moveTextAreaToCursor()),f.isMousePressed=!1,f.onMouseEvent("mouseup",a)},i=function(){f[f.state]&&f[f.state]()};if(d.isOldIE&&"dblclick"==a.domEvent.type)return setTimeout(function(){h(a)});c.capture(this.editor.container,g,h);var j=setInterval(i,20)}}).call(j.prototype),i.defineOptions(j.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:150},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0}}),b.MouseHandler=j}),define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(a,b){function c(a){a.$clickSelection=null;var b=a.editor;b.setDefaultHandler("mousedown",this.onMouseDown.bind(a)),b.setDefaultHandler("dblclick",this.onDoubleClick.bind(a)),b.setDefaultHandler("tripleclick",this.onTripleClick.bind(a)),b.setDefaultHandler("quadclick",this.onQuadClick.bind(a)),b.setDefaultHandler("mousewheel",this.onMouseWheel.bind(a));var c=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];c.forEach(function(b){a[b]=this[b]},this),a.selectByLines=this.extendSelectionBy.bind(a,"getLineRange"),a.selectByWords=this.extendSelectionBy.bind(a,"getWordRange")}function d(a,b,c,d){return Math.sqrt(Math.pow(c-a,2)+Math.pow(d-b,2))}function e(a,b){if(a.start.row==a.end.row)var c=2*b.column-a.start.column-a.end.column;else if(a.start.row!=a.end.row-1||a.start.column||a.end.column)var c=2*b.row-a.start.row-a.end.row;else var c=b.column-4;return 0>c?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}var f=(a("../lib/dom"),a("../lib/event"),a("../lib/useragent"),0);(function(){this.onMouseDown=function(a){var b=a.inSelection(),c=a.getDocumentPosition();this.mousedownEvent=a;var d=this.editor,e=a.getButton();if(0!==e){var f=d.getSelectionRange(),g=f.isEmpty();return g&&(d.moveCursorToPosition(c),d.selection.clearSelection()),d.textInput.onContextMenu(a.domEvent),void 0}return!b||d.isFocused()||(d.focus(),!this.$focusTimout||this.$clickSelection||d.inMultiSelectMode)?(!b||this.$clickSelection||a.getShiftKey()||d.inMultiSelectMode?this.startSelect(c):b&&(this.mousedownEvent.time=(new Date).getTime(),this.startSelect(c)),this.captureMouse(a),a.preventDefault()):(this.mousedownEvent.time=(new Date).getTime(),this.setState("focusWait"),this.captureMouse(a),void 0)},this.startSelect=function(a){a=a||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var b=this.editor;setTimeout(function(){this.mousedownEvent.getShiftKey()?b.selection.selectToPosition(a):this.$clickSelection||(b.moveCursorToPosition(a),b.selection.clearSelection())}.bind(this),0),b.renderer.scroller.setCapture&&b.renderer.scroller.setCapture(),b.setStyle("ace_selecting"),this.setState("select")},this.select=function(){var a,b=this.editor,c=b.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(c);if(-1==d)a=this.$clickSelection.end;else if(1==d)a=this.$clickSelection.start;else{var f=e(this.$clickSelection,c);c=f.cursor,a=f.anchor}b.selection.setSelectionAnchor(a.row,a.column)}b.selection.selectToPosition(c),b.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(a){var b,c=this.editor,d=c.renderer.screenToTextCoordinates(this.x,this.y),f=c.selection[a](d.row,d.column);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(f.start),h=this.$clickSelection.comparePoint(f.end);if(-1==g&&0>=h)b=this.$clickSelection.end,(f.end.row!=d.row||f.end.column!=d.column)&&(d=f.start);else if(1==h&&g>=0)b=this.$clickSelection.start,(f.start.row!=d.row||f.start.column!=d.column)&&(d=f.end);else if(-1==g&&1==h)d=f.end,b=f.start;else{var i=e(this.$clickSelection,d);d=i.cursor,b=i.anchor}c.selection.setSelectionAnchor(b.row,b.column)}c.selection.selectToPosition(d),c.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var a=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),b=(new Date).getTime();(a>f||b-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(a){var b=a.getDocumentPosition(),c=this.editor,d=c.session,e=d.getBracketRange(b);return e?(e.isEmpty()&&(e.start.column--,e.end.column++),this.$clickSelection=e,this.setState("select"),void 0):(this.$clickSelection=c.selection.getWordRange(b.row,b.column),this.setState("selectByWords"),void 0)},this.onTripleClick=function(a){var b=a.getDocumentPosition(),c=this.editor;this.setState("selectByLines"),this.$clickSelection=c.selection.getLineRange(b.row)},this.onQuadClick=function(){var a=this.editor;a.selectAll(),this.$clickSelection=a.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(a){if(!a.getShiftKey()&&!a.getAccelKey()){var b=a.domEvent.timeStamp,c=b-(this.$lastScrollTime||0),d=this.editor,e=d.renderer.isScrollableBy(a.wheelX*a.speed,a.wheelY*a.speed);return e||200>c?(this.$lastScrollTime=b,d.renderer.scrollBy(a.wheelX*a.speed,a.wheelY*a.speed),a.stop()):void 0}}}).call(c.prototype),b.DefaultHandlers=c}),define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event"],function(a,b){function c(a){function b(){l=d.createElement("div"),l.className="ace_gutter-tooltip",l.style.display="none",h.container.appendChild(l)}function c(){l||b();var a=k.getDocumentPosition().row,c=i.$annotations[a];if(!c)return f();var d=h.session.getLength();if(a==d){var e=h.renderer.pixelToScreenCoordinates(0,k.y).row,j=k.$pos;if(e>h.session.documentToScreenRow(j.row,j.column))return f()}m!=c&&(m=c.text.join("<br/>"),l.style.display="block",l.innerHTML=m,h.on("mousewheel",f),g(k))}function f(){j&&(j=clearTimeout(j)),m&&(l.style.display="none",m=null,h.removeEventListener("mousewheel",f))}function g(a){var b=h.renderer.$gutter.getBoundingClientRect();if(l.style.left=a.x+15+"px",a.y+3*h.renderer.lineHeight+15<b.bottom)l.style.bottom="",l.style.top=a.y+15+"px";else{l.style.top="";var c=window.innerHeight||document.documentElement.clientHeight;l.style.bottom=c-a.y+5+"px"}}var h=a.editor,i=h.renderer.$gutterLayer;a.editor.setDefaultHandler("guttermousedown",function(b){if(h.isFocused()&&0==b.getButton()){var c=i.getRegion(b);if("foldWidgets"!=c){var d=b.getDocumentPosition().row,e=h.session.selection;if(b.getShiftKey())e.selectTo(d,0);else{if(2==b.domEvent.detail)return h.selectAll(),b.preventDefault();a.$clickSelection=h.selection.getLineRange(d)}return a.setState("selectByLines"),a.captureMouse(b),b.preventDefault()}}});var j,k,l,m;a.editor.setDefaultHandler("guttermousemove",function(b){var e=b.domEvent.target||b.domEvent.srcElement;return d.hasCssClass(e,"ace_fold-widget")?f():(m&&g(b),k=b,j||(j=setTimeout(function(){j=null,k&&!a.isMousePressed?c():f()},50)),void 0)}),e.addListener(h.renderer.$gutter,"mouseout",function(){k=null,m&&!j&&(j=setTimeout(function(){j=null,f()},50))}),h.on("changeSession",f)}var d=a("../lib/dom"),e=a("../lib/event");b.GutterHandler=c}),define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(a,b){var c=a("../lib/event"),d=a("../lib/useragent"),e=b.MouseEvent=function(a,b){this.domEvent=a,this.editor=b,this.x=this.clientX=a.clientX,this.y=this.clientY=a.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){c.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){c.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var a=this.editor,b=a.getSelectionRange();if(b.isEmpty())this.$inSelection=!1;else{var c=this.getDocumentPosition();this.$inSelection=b.contains(c.row,c.column)}return this.$inSelection},this.getButton=function(){return c.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=d.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(e.prototype)}),define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(a,b){function c(a){function b(a,b){var c=(new Date).getTime(),e=!b||a.row!=b.row,f=!b||a.column!=b.column;if(!C||e||f)q.$blockScrolling+=1,q.moveCursorToPosition(a),q.$blockScrolling-=1,C=c,D={x:u,y:v};else{var g=d(D.x,D.y,u,v);g>j?C=null:c-C>=i&&(q.renderer.scrollCursorIntoView(),C=null)}}function c(a,b){var c=(new Date).getTime(),d=q.renderer.layerConfig.lineHeight,e=q.renderer.layerConfig.characterWidth,f=q.renderer.scroller.getBoundingClientRect(),g={x:{left:u-f.left,right:f.right-u},y:{top:v-f.top,bottom:f.bottom-v}},i=Math.min(g.x.left,g.x.right),j=Math.min(g.y.top,g.y.bottom),k={row:a.row,column:a.column};2>=i/e&&(k.column+=g.x.left<g.x.right?-3:2),1>=j/d&&(k.row+=g.y.top<g.y.bottom?-1:1);var l=a.row!=k.row,m=a.column!=k.column,n=!b||a.row!=b.row;l||m&&!n?B?c-B>=h&&q.renderer.scrollCursorIntoView(k):B=c:B=null}function k(){var a=y;y=q.renderer.screenToTextCoordinates(u,v),b(y,a),c(y,a)}function l(){x=q.selection.toOrientedRange(),t=q.session.addMarker(x,"ace_selection",q.getSelectionStyle()),q.clearSelection(),q.isFocused()&&q.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),w=setInterval(k,20),F=0,f.addListener(document,"mousemove",n)}function m(){clearInterval(w),q.session.removeMarker(t),t=null,q.$blockScrolling+=1,q.selection.fromOrientedRange(x),q.$blockScrolling-=1,q.isFocused()&&!A&&q.renderer.$cursorLayer.setBlinking(!q.getReadOnly()),x=null,F=0,B=null,C=null,f.removeListener(document,"mousemove",n)}function n(){null==G&&(G=setTimeout(function(){null!=G&&t&&m()},20))}function o(a){var b=a.types;return!b||Array.prototype.some.call(b,function(a){return"text/plain"==a||"Text"==a})}function p(a){var b=["copy","copymove","all","uninitialized"],c=["move","copymove","linkmove","all","uninitialized"],d=g.isMac?a.altKey:a.ctrlKey,e="uninitialized";try{e=a.dataTransfer.effectAllowed.toLowerCase()}catch(a){}var f="none";return d&&b.indexOf(e)>=0?f="copy":c.indexOf(e)>=0?f="move":b.indexOf(e)>=0&&(f="copy"),f}var q=a.editor,r=e.createElement("img");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g.isOpera&&(r.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var s=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];s.forEach(function(b){a[b]=this[b]},this),q.addEventListener("mousedown",this.onMouseDown.bind(a));var t,u,v,w,x,y,z,A,B,C,D,E=q.container,F=0;this.onDragStart=function(a){if(this.cancelDrag||!E.draggable){var b=this;return setTimeout(function(){b.startSelect(),b.captureMouse(a)},0),a.preventDefault()}x=q.getSelectionRange();var c=a.dataTransfer;c.effectAllowed=q.getReadOnly()?"copy":"copyMove",g.isOpera&&(q.container.appendChild(r),r._top=r.offsetTop),c.setDragImage&&c.setDragImage(r,0,0),g.isOpera&&q.container.removeChild(r),c.clearData(),c.setData("Text",q.session.getTextRange()),A=!0,this.setState("drag")},this.onDragEnd=function(a){if(E.draggable=!1,A=!1,this.setState(null),!q.getReadOnly()){var b=a.dataTransfer.dropEffect;z||"move"!=b||q.session.remove(q.getSelectionRange()),q.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging")},this.onDragEnter=function(a){return!q.getReadOnly()&&o(a.dataTransfer)?(t||l(),F++,a.dataTransfer.dropEffect=z=p(a),f.preventDefault(a)):void 0},this.onDragOver=function(a){return!q.getReadOnly()&&o(a.dataTransfer)?(t||(l(),F++),null!==G&&(G=null),u=a.clientX,v=a.clientY,a.dataTransfer.dropEffect=z=p(a),f.preventDefault(a)):void 0},this.onDragLeave=function(a){return F--,0>=F&&t?(m(),z=null,f.preventDefault(a)):void 0},this.onDrop=function(a){if(t){var b=a.dataTransfer;if(A)switch(z){case"move":x=x.contains(y.row,y.column)?{start:y,end:y}:q.moveText(x,y);break;case"copy":x=q.moveText(x,y,!0)}else{var c=b.getData("Text");x={start:y,end:q.session.insert(y,c)},q.focus(),z=null}return m(),f.preventDefault(a)}},f.addListener(E,"dragstart",this.onDragStart.bind(a)),f.addListener(E,"dragend",this.onDragEnd.bind(a)),f.addListener(E,"dragenter",this.onDragEnter.bind(a)),f.addListener(E,"dragover",this.onDragOver.bind(a)),f.addListener(E,"dragleave",this.onDragLeave.bind(a)),f.addListener(E,"drop",this.onDrop.bind(a));var G=null}function d(a,b,c,d){return Math.sqrt(Math.pow(c-a,2)+Math.pow(d-b,2))}var e=a("../lib/dom"),f=a("../lib/event"),g=a("../lib/useragent"),h=200,i=200,j=5;(function(){this.dragWait=function(){var a=(new Date).getTime()-this.mousedownEvent.time;a>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var a=this.editor.container;a.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var a=this.editor.container;a.draggable=!0,this.editor.renderer.$cursorLayer.setBlinking(!1),this.editor.setStyle("ace_dragging"),this.setState("dragReady")},this.onMouseDrag=function(){var a=this.editor.container;if(g.isIE&&"dragReady"==this.state){var b=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);b>3&&a.dragDrop()}if("dragWait"===this.state){var b=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);b>0&&(a.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(a){if(this.$dragEnabled){this.mousedownEvent=a;var b=this.editor,c=a.inSelection(),d=a.getButton(),e=a.domEvent.detail||1;if(1===e&&0===d&&c){this.mousedownEvent.time=(new Date).getTime();var f=a.domEvent.target||a.domEvent.srcElement;if("unselectable"in f&&(f.unselectable="on"),b.getDragDelay()){if(g.isWebKit){self.cancelDrag=!0;var h=b.container;h.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(a,this.onMouseDrag.bind(this)),a.defaultPrevented=!0}}}}).call(c.prototype),b.DragdropHandler=c}),define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/event_emitter"],function(a,b,c){"no use strict";function d(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}var e=a("./lib/lang"),f=a("./lib/oop"),g=a("./lib/net"),h=a("./lib/event_emitter").EventEmitter,i=function(){return this}(),j={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};b.get=function(a){if(!j.hasOwnProperty(a))throw new Error("Unknown config key: "+a);return j[a]},b.set=function(a,b){if(!j.hasOwnProperty(a))throw new Error("Unknown config key: "+a);j[a]=b},b.all=function(){return e.copyObject(j)},f.implement(b,h),b.moduleUrl=function(a,b){if(j.$moduleUrls[a])return j.$moduleUrls[a];var c=a.split("/");b=b||c[c.length-2]||"";var d="snippets"==b?"/":"-",e=c[c.length-1];if("-"==d){var f=new RegExp("^"+b+"[\\-_]|[\\-_]"+b+"$","g");e=e.replace(f,"")}(!e||e==b)&&c.length>1&&(e=c[c.length-2]);var g=j[b+"Path"];return null==g?g=j.basePath:"/"==d&&(b=d=""),g&&"/"!=g.slice(-1)&&(g+="/"),g+b+d+e+this.get("suffix")},b.setModuleUrl=function(a,b){return j.$moduleUrls[a]=b},b.$loading={},b.loadModule=function(c,d){var e,f;Array.isArray(c)&&(f=c[0],c=c[1]);try{e=a(c)}catch(h){}if(e&&!b.$loading[c])return d&&d(e);if(b.$loading[c]||(b.$loading[c]=[]),b.$loading[c].push(d),!(b.$loading[c].length>1)){var i=function(){a([c],function(a){b._emit("load.module",{name:c,module:a});var d=b.$loading[c];b.$loading[c]=null,d.forEach(function(b){b&&b(a)})})};return b.get("packaged")?(g.loadScript(b.moduleUrl(c,f),i),void 0):i()}},b.init=function(){if(j.packaged=a.packaged||c.packaged||i.define&&define.packaged,!i.document)return"";for(var e={},f="",g=document.getElementsByTagName("script"),h=0;h<g.length;h++){var k=g[h],l=k.src||k.getAttribute("src");if(l){for(var m=k.attributes,n=0,o=m.length;o>n;n++){var p=m[n];0===p.name.indexOf("data-ace-")&&(e[d(p.name.replace(/^data-ace-/,""))]=p.value)}var q=l.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);q&&(f=q[1])}}f&&(e.base=e.base||f,e.packaged=!0),e.basePath=e.base,e.workerPath=e.workerPath||e.base,e.modePath=e.modePath||e.base,e.themePath=e.themePath||e.base,delete e.base;for(var r in e)"undefined"!=typeof e[r]&&b.set(r,e[r])};var k={setOptions:function(a){Object.keys(a).forEach(function(b){this.setOption(b,a[b])},this)},getOptions:function(a){var b={};return a?Array.isArray(a)||(b=a,a=Object.keys(b)):a=Object.keys(this.$options),a.forEach(function(a){b[a]=this.getOption(a)},this),b},setOption:function(a,b){if(this["$"+a]!==b){var c=this.$options[a];if(!c)return"undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+a+'"'),void 0;if(c.forwardTo)return this[c.forwardTo]&&this[c.forwardTo].setOption(a,b);c.handlesSet||(this["$"+a]=b),c&&c.set&&c.set.call(this,b)}},getOption:function(a){var b=this.$options[a];return b?b.forwardTo?this[b.forwardTo]&&this[b.forwardTo].getOption(a):b&&b.get?b.get.call(this):this["$"+a]:("undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+a+'"'),void 0)}},l={};b.defineOptions=function(a,b,c){return a.$options||(l[b]=a.$options={}),Object.keys(c).forEach(function(b){var d=c[b];"string"==typeof d&&(d={forwardTo:d}),d.name||(d.name=b),a.$options[d.name]=d,"initialValue"in d&&(a["$"+d.name]=d.initialValue)}),f.implement(a,k),this},b.resetOptions=function(a){Object.keys(a.$options).forEach(function(b){var c=a.$options[b];"value"in c&&a.setOption(b,c.value)})},b.setDefaultValue=function(a,c,d){var e=l[a]||(l[a]={});e[c]&&(e.forwardTo?b.setDefaultValue(e.forwardTo,c,d):e[c].value=d)},b.setDefaultValues=function(a,c){Object.keys(c).forEach(function(d){b.setDefaultValue(a,d,c[d])})}}),define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(a,b){var c=a("./dom");b.get=function(a,b){var c=new XMLHttpRequest;c.open("GET",a,!0),c.onreadystatechange=function(){4===c.readyState&&b(c.responseText)},c.send(null)},b.loadScript=function(a,b){var d=c.getDocumentHead(),e=document.createElement("script");e.src=a,d.appendChild(e),e.onload=e.onreadystatechange=function(a,c){(c||!e.readyState||"loaded"==e.readyState||"complete"==e.readyState)&&(e=e.onload=e.onreadystatechange=null,c||b())}}}),define("ace/lib/event_emitter",["require","exports","module"],function(a,b){var c={},d=function(){this.propagationStopped=!0},e=function(){this.defaultPrevented=!0};c._emit=c._dispatchEvent=function(a,b){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var c=this._eventRegistry[a]||[],f=this._defaultHandlers[a];if(c.length||f){"object"==typeof b&&b||(b={}),b.type||(b.type=a),b.stopPropagation||(b.stopPropagation=d),b.preventDefault||(b.preventDefault=e),c=c.slice();for(var g=0;g<c.length&&(c[g](b,this),!b.propagationStopped);g++);return f&&!b.defaultPrevented?f(b,this):void 0}},c._signal=function(a,b){var c=(this._eventRegistry||{})[a];if(c){c=c.slice();for(var d=0;d<c.length;d++)c[d](b,this)}},c.once=function(a,b){var c=this;b&&this.addEventListener(a,function d(){c.removeEventListener(a,d),b.apply(null,arguments)})},c.setDefaultHandler=function(a,b){var c=this._defaultHandlers;if(c||(c=this._defaultHandlers={_disabled_:{}}),c[a]){var d=c[a],e=c._disabled_[a];e||(c._disabled_[a]=e=[]),e.push(d);var f=e.indexOf(b);-1!=f&&e.splice(f,1)}c[a]=b},c.removeDefaultHandler=function(a,b){var c=this._defaultHandlers;if(c){var d=c._disabled_[a];if(c[a]==b){{c[a]}d&&this.setDefaultHandler(a,d.pop())}else if(d){var e=d.indexOf(b);-1!=e&&d.splice(e,1)}}},c.on=c.addEventListener=function(a,b,c){this._eventRegistry=this._eventRegistry||{};var d=this._eventRegistry[a];return d||(d=this._eventRegistry[a]=[]),-1==d.indexOf(b)&&d[c?"unshift":"push"](b),b},c.off=c.removeListener=c.removeEventListener=function(a,b){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[a];if(c){var d=c.indexOf(b);-1!==d&&c.splice(d,1)}},c.removeAllListeners=function(a){this._eventRegistry&&(this._eventRegistry[a]=[])},b.EventEmitter=c}),define("ace/mouse/fold_handler",["require","exports","module"],function(a,b){function c(a){a.on("click",function(b){var c=b.getDocumentPosition(),d=a.session,e=d.getFoldAt(c.row,c.column,1);e&&(b.getAccelKey()?d.removeFold(e):d.expandFold(e),b.stop())}),a.on("gutterclick",function(b){var c=a.renderer.$gutterLayer.getRegion(b);if("foldWidgets"==c){var d=b.getDocumentPosition().row,e=a.session;e.foldWidgets&&e.foldWidgets[d]&&a.session.onFoldWidgetClick(d,b),a.isFocused()||a.focus(),b.stop()}}),a.on("gutterdblclick",function(b){var c=a.renderer.$gutterLayer.getRegion(b);if("foldWidgets"==c){var d=b.getDocumentPosition().row,e=a.session,f=e.getParentFoldRangeData(d,!0),g=f.range||f.firstRange;if(g){var d=g.start.row,h=e.getFoldAt(d,e.getLine(d).length,1);h?e.removeFold(h):(e.addFold("...",g),a.renderer.scrollCursorIntoView({row:g.start.row,column:0}))}b.stop()}})}b.FoldHandler=c}),define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(a,b){var c=a("../lib/keys"),d=a("../lib/event"),e=function(a){this.$editor=a,this.$data={},this.$handlers=[],this.setDefaultHandler(a.commands)};(function(){this.setDefaultHandler=function(a){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=a,this.addKeyboardHandler(a,0),this.$data={editor:this.$editor}},this.setKeyboardHandler=function(a){var b=this.$handlers;if(b[b.length-1]!=a){for(;b[b.length-1]&&b[b.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(b[b.length-1]);this.addKeyboardHandler(a,1)}},this.addKeyboardHandler=function(a,b){if(a){var c=this.$handlers.indexOf(a);-1!=c&&this.$handlers.splice(c,1),void 0==b?this.$handlers.push(a):this.$handlers.splice(b,0,a),-1==c&&a.attach&&a.attach(this.$editor)}},this.removeKeyboardHandler=function(a){var b=this.$handlers.indexOf(a);return-1==b?!1:(this.$handlers.splice(b,1),a.detach&&a.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.$callKeyboardHandlers=function(a,b,c,e){for(var f,g=!1,h=this.$editor.commands,i=this.$handlers.length;i--&&(f=this.$handlers[i].handleKeyboard(this.$data,a,b,c,e),!(f&&f.command&&(g="null"==f.command?!0:h.exec(f.command,this.$editor,f.args,e),g&&e&&-1!=a&&1!=f.passEvent&&1!=f.command.passEvent&&d.stopEvent(e),g))););return g},this.onCommandKey=function(a,b,d){var e=c.keyCodeToString(d);this.$callKeyboardHandlers(b,e,d,a)},this.onTextInput=function(a){var b=this.$callKeyboardHandlers(-1,a);b||this.$editor.commands.exec("insertstring",this.$editor,a)}}).call(e.prototype),b.KeyBinding=e}),define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(a,b){var c=a("./lib/oop"),d=a("./lib/lang"),e=a("./config"),f=a("./lib/event_emitter").EventEmitter,g=a("./selection").Selection,h=a("./mode/text").Mode,i=a("./range").Range,j=a("./document").Document,k=a("./background_tokenizer").BackgroundTokenizer,l=a("./search_highlight").SearchHighlight,m=function(a,b){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof a&&a.getLine||(a=new j(a)),this.setDocument(a),this.selection=new g(this),e.resetOptions(this),this.setMode(b),e._emit("session",this)};(function(){function b(a){return 4352>a?!1:a>=4352&&4447>=a||a>=4515&&4519>=a||a>=4602&&4607>=a||a>=9001&&9002>=a||a>=11904&&11929>=a||a>=11931&&12019>=a||a>=12032&&12245>=a||a>=12272&&12283>=a||a>=12288&&12350>=a||a>=12353&&12438>=a||a>=12441&&12543>=a||a>=12549&&12589>=a||a>=12593&&12686>=a||a>=12688&&12730>=a||a>=12736&&12771>=a||a>=12784&&12830>=a||a>=12832&&12871>=a||a>=12880&&13054>=a||a>=13056&&19903>=a||a>=19968&&42124>=a||a>=42128&&42182>=a||a>=43360&&43388>=a||a>=44032&&55203>=a||a>=55216&&55238>=a||a>=55243&&55291>=a||a>=63744&&64255>=a||a>=65040&&65049>=a||a>=65072&&65106>=a||a>=65108&&65126>=a||a>=65128&&65131>=a||a>=65281&&65376>=a||a>=65504&&65510>=a}c.implement(this,f),this.setDocument=function(a){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=a,a.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(a){if(!a)return this.$docRowCache=[],this.$screenRowCache=[],void 0;var b=this.$docRowCache.length,c=this.$getRowCacheIndex(this.$docRowCache,a)+1;b>c&&(this.$docRowCache.splice(c,b),this.$screenRowCache.splice(c,b))},this.$getRowCacheIndex=function(a,b){for(var c=0,d=a.length-1;d>=c;){var e=c+d>>1,f=a[e];if(b>f)c=e+1;else{if(!(f>b))return e;d=e-1}}return c-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(a){var b=a.data;this.$resetRowCache(b.start.row)},this.onChange=function(a){var b=a.data;this.$modified=!0,this.$resetRowCache(b.range.start.row);var c=this.$updateInternalDataOnChange(a);this.$fromUndo||!this.$undoManager||b.ignore||(this.$deltasDoc.push(b),c&&0!=c.length&&this.$deltasFold.push({action:"removeFolds",folds:c}),this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(b),this._emit("change",a)},this.setValue=function(a){this.doc.setValue(a),this.selection.moveCursorTo(0,0),this.selection.clearSelection(),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(a){return this.bgTokenizer.getState(a)},this.getTokens=function(a){return this.bgTokenizer.getTokens(a)},this.getTokenAt=function(a,b){var c,d=this.bgTokenizer.getTokens(a),e=0;if(null==b)f=d.length-1,e=this.getLine(a).length;else for(var f=0;f<d.length&&(e+=d[f].value.length,!(e>=b));f++);return(c=d[f])?(c.index=f,c.start=e-c.value.length,c):null},this.setUndoManager=function(a){if(this.$undoManager=a,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),a){var b=this;this.$syncInformUndoManager=function(){b.$informUndoManager.cancel(),b.$deltasFold.length&&(b.$deltas.push({group:"fold",deltas:b.$deltasFold}),b.$deltasFold=[]),b.$deltasDoc.length&&(b.$deltas.push({group:"doc",deltas:b.$deltasDoc}),b.$deltasDoc=[]),b.$deltas.length>0&&a.execute({action:"aceupdate",args:[b.$deltas,b],merge:b.mergeUndoDeltas}),b.mergeUndoDeltas=!1,b.$deltas=[]},this.$informUndoManager=d.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?d.stringRepeat(" ",this.getTabSize()):" "},this.setUseSoftTabs=function(a){this.setOption("useSoftTabs",a)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(a){this.setOption("tabSize",a)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(a){return this.$useSoftTabs&&a.column%this.$tabSize==0},this.$overwrite=!1,this.setOverwrite=function(a){this.setOption("overwrite",a)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(a,b){this.$decorations[a]||(this.$decorations[a]=""),this.$decorations[a]+=" "+b,this._emit("changeBreakpoint",{})},this.removeGutterDecoration=function(a,b){this.$decorations[a]=(this.$decorations[a]||"").replace(" "+b,""),this._emit("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(a){this.$breakpoints=[];for(var b=0;b<a.length;b++)this.$breakpoints[a[b]]="ace_breakpoint";this._emit("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._emit("changeBreakpoint",{})},this.setBreakpoint=function(a,b){void 0===b&&(b="ace_breakpoint"),b?this.$breakpoints[a]=b:delete this.$breakpoints[a],this._emit("changeBreakpoint",{})},this.clearBreakpoint=function(a){delete this.$breakpoints[a],this._emit("changeBreakpoint",{})},this.addMarker=function(a,b,c,d){var e=this.$markerId++,f={range:a,type:c||"line",renderer:"function"==typeof c?c:null,clazz:b,inFront:!!d,id:e};return d?(this.$frontMarkers[e]=f,this._emit("changeFrontMarker")):(this.$backMarkers[e]=f,this._emit("changeBackMarker")),e},this.addDynamicMarker=function(a,b){if(a.update){var c=this.$markerId++;return a.id=c,a.inFront=!!b,b?(this.$frontMarkers[c]=a,this._emit("changeFrontMarker")):(this.$backMarkers[c]=a,this._emit("changeBackMarker")),a}},this.removeMarker=function(a){var b=this.$frontMarkers[a]||this.$backMarkers[a];if(b){var c=b.inFront?this.$frontMarkers:this.$backMarkers;b&&(delete c[a],this._emit(b.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(a){return a?this.$frontMarkers:this.$backMarkers},this.highlight=function(a){if(!this.$searchHighlight){var b=new l(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(b)}this.$searchHighlight.setRegexp(a)},this.highlightLines=function(a,b,c,d){"number"!=typeof b&&(c=b,b=a),c||(c="ace_step");var e=new i(a,0,b,1/0);return e.id=this.addMarker(e,c,"fullLine",d),e},this.setAnnotations=function(a){this.$annotations=a,this._emit("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(a){var b=a.match(/^.*?(\r?\n)/m);this.$autoNewLine=b?b[1]:"\n"},this.getWordRange=function(a,b){var c=this.getLine(a),d=!1;if(b>0&&(d=!!c.charAt(b-1).match(this.tokenRe)),d||(d=!!c.charAt(b).match(this.tokenRe)),d)var e=this.tokenRe;else if(/^\s+$/.test(c.slice(b-1,b+1)))var e=/\s/;else var e=this.nonTokenRe;var f=b;if(f>0){do f--;while(f>=0&&c.charAt(f).match(e));f++}for(var g=b;g<c.length&&c.charAt(g).match(e);)g++;return new i(a,f,a,g)},this.getAWordRange=function(a,b){for(var c=this.getWordRange(a,b),d=this.getLine(c.end.row);d.charAt(c.end.column).match(/[ \t]/);)c.end.column+=1;return c},this.setNewLineMode=function(a){this.doc.setNewLineMode(a)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(a){this.setOption("useWorker",a)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(a){var b=a.data;this.bgTokenizer.start(b.first),this._emit("tokenizerUpdate",a)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(a,b){if(a&&"object"==typeof a){if(a.getTokenizer)return this.$onChangeMode(a);var c=a,d=c.path}else d=a||"ace/mode/text";return this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new h),this.$modes[d]&&!c?(this.$onChangeMode(this.$modes[d]),b&&b(),void 0):(this.$modeId=d,e.loadModule(["mode",d],function(a){return this.$modeId!==d?b&&b():this.$modes[d]&&!c?this.$onChangeMode(this.$modes[d]):(a&&a.Mode&&(a=new a.Mode(c),c||(this.$modes[d]=a,a.$id=d),this.$onChangeMode(a),b&&b()),void 0)
-}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0),void 0)},this.$onChangeMode=function(a,b){if(b||(this.$modeId=a.$id),this.$mode!==a){this.$mode=a,this.$stopWorker(),this.$useWorker&&this.$startWorker();var c=a.getTokenizer();if(void 0!==c.addEventListener){var d=this.onReloadTokenizer.bind(this);c.addEventListener("update",d)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(c);else{this.bgTokenizer=new k(c);var e=this;this.bgTokenizer.addEventListener("update",function(a){e._emit("tokenizerUpdate",a)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=a.tokenRe,this.nonTokenRe=a.nonTokenRe,this.$options.wrapMethod.set.call(this,this.$wrapMethod),b||(this.$setFolding(a.foldingRules),this._emit("changeMode"),this.bgTokenizer.start(0))}},this.$stopWorker=function(){this.$worker&&this.$worker.terminate(),this.$worker=null},this.$startWorker=function(){if("undefined"==typeof Worker||a.noWorker)this.$worker=null;else try{this.$worker=this.$mode.createWorker(this)}catch(b){console.log("Could not load worker"),console.log(b),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(a){this.$scrollTop===a||isNaN(a)||(this.$scrollTop=a,this._signal("changeScrollTop",a))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(a){this.$scrollLeft===a||isNaN(a)||(this.$scrollLeft=a,this._signal("changeScrollLeft",a))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.screenWidth},this.$computeWidth=function(a){if(this.$modified||a){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var b=this.doc.getAllLines(),c=this.$rowLengthCache,d=0,e=0,f=this.$foldData[e],g=f?f.start.row:1/0,h=b.length,i=0;h>i;i++){if(i>g){if(i=f.end.row+1,i>=h)break;f=this.$foldData[e++],g=f?f.start.row:1/0}null==c[i]&&(c[i]=this.$getStringScreenWidth(b[i])[0]),c[i]>d&&(d=c[i])}this.screenWidth=d}},this.getLine=function(a){return this.doc.getLine(a)},this.getLines=function(a,b){return this.doc.getLines(a,b)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(a){return this.doc.getTextRange(a||this.selection.getRange())},this.insert=function(a,b){return this.doc.insert(a,b)},this.remove=function(a){return this.doc.remove(a)},this.undoChanges=function(a,b){if(a.length){this.$fromUndo=!0;for(var c=null,d=a.length-1;-1!=d;d--){var e=a[d];"doc"==e.group?(this.doc.revertDeltas(e.deltas),c=this.$getUndoSelection(e.deltas,!0,c)):e.deltas.forEach(function(a){this.addFolds(a.folds)},this)}return this.$fromUndo=!1,c&&this.$undoSelect&&!b&&this.selection.setSelectionRange(c),c}},this.redoChanges=function(a,b){if(a.length){this.$fromUndo=!0;for(var c=null,d=0;d<a.length;d++){var e=a[d];"doc"==e.group&&(this.doc.applyDeltas(e.deltas),c=this.$getUndoSelection(e.deltas,!1,c))}return this.$fromUndo=!1,c&&this.$undoSelect&&!b&&this.selection.setSelectionRange(c),c}},this.setUndoSelect=function(a){this.$undoSelect=a},this.$getUndoSelection=function(a,b,c){function d(a){var c="insertText"===a.action||"insertLines"===a.action;return b?!c:c}var e,f,g=a[0],h=!1;d(g)?(e=i.fromPoints(g.range.start,g.range.end),h=!0):(e=i.fromPoints(g.range.start,g.range.start),h=!1);for(var j=1;j<a.length;j++)g=a[j],d(g)?(f=g.range.start,-1==e.compare(f.row,f.column)&&e.setStart(g.range.start),f=g.range.end,1==e.compare(f.row,f.column)&&e.setEnd(g.range.end),h=!0):(f=g.range.start,-1==e.compare(f.row,f.column)&&(e=i.fromPoints(g.range.start,g.range.start)),h=!1);if(null!=c){0==i.comparePoints(c.start,e.start)&&(c.start.column+=e.end.column-e.start.column,c.end.column+=e.end.column-e.start.column);var k=c.compareRange(e);1==k?e.setStart(c.start):-1==k&&e.setEnd(c.end)}return e},this.replace=function(a,b){return this.doc.replace(a,b)},this.moveText=function(a,b,c){var d=this.getTextRange(a),e=this.getFoldsInRange(a),f=i.fromPoints(b,b);if(!c){this.remove(a);var g=a.start.row-a.end.row,h=g?-a.end.column:a.start.column-a.end.column;h&&(f.start.row==a.end.row&&f.start.column>a.end.column&&(f.start.column+=h),f.end.row==a.end.row&&f.end.column>a.end.column&&(f.end.column+=h)),g&&f.start.row>=a.end.row&&(f.start.row+=g,f.end.row+=g)}if(f.end=this.insert(f.start,d),e.length){var j=a.start,k=f.start,g=k.row-j.row,h=k.column-j.column;this.addFolds(e.map(function(a){return a=a.clone(),a.start.row==j.row&&(a.start.column+=h),a.end.row==j.row&&(a.end.column+=h),a.start.row+=g,a.end.row+=g,a}))}return f},this.indentRows=function(a,b,c){c=c.replace(/\t/g,this.getTabString());for(var d=a;b>=d;d++)this.insert({row:d,column:0},c)},this.outdentRows=function(a){for(var b=a.collapseRows(),c=new i(0,0,0,0),d=this.getTabSize(),e=b.start.row;e<=b.end.row;++e){var f=this.getLine(e);c.start.row=e,c.end.row=e;for(var g=0;d>g&&" "==f.charAt(g);++g);d>g&&" "==f.charAt(g)?(c.start.column=g,c.end.column=g+1):(c.start.column=0,c.end.column=g),this.remove(c)}},this.$moveLines=function(a,b,c){if(a=this.getRowFoldStart(a),b=this.getRowFoldEnd(b),0>c){var d=this.getRowFoldStart(a+c);if(0>d)return 0;var e=d-a}else if(c>0){var d=this.getRowFoldEnd(b+c);if(d>this.doc.getLength()-1)return 0;var e=d-b}else{a=this.$clipRowToDocument(a),b=this.$clipRowToDocument(b);var e=b-a+1}var f=new i(a,0,b,Number.MAX_VALUE),g=this.getFoldsInRange(f).map(function(a){return a=a.clone(),a.start.row+=e,a.end.row+=e,a}),h=0==c?this.doc.getLines(a,b):this.doc.removeLines(a,b);return this.doc.insertLines(a+e,h),g.length&&this.addFolds(g),e},this.moveLinesUp=function(a,b){return this.$moveLines(a,b,-1)},this.moveLinesDown=function(a,b){return this.$moveLines(a,b,1)},this.duplicateLines=function(a,b){return this.$moveLines(a,b,0)},this.$clipRowToDocument=function(a){return Math.max(0,Math.min(a,this.doc.getLength()-1))},this.$clipColumnToRow=function(a,b){return 0>b?0:Math.min(this.doc.getLine(a).length,b)},this.$clipPositionToDocument=function(a,b){if(b=Math.max(0,b),0>a)a=0,b=0;else{var c=this.doc.getLength();a>=c?(a=c-1,b=this.doc.getLine(c-1).length):b=Math.min(this.doc.getLine(a).length,b)}return{row:a,column:b}},this.$clipRangeToDocument=function(a){a.start.row<0?(a.start.row=0,a.start.column=0):a.start.column=this.$clipColumnToRow(a.start.row,a.start.column);var b=this.doc.getLength()-1;return a.end.row>b?(a.end.row=b,a.end.column=this.doc.getLine(b).length):a.end.column=this.$clipColumnToRow(a.end.row,a.end.column),a},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(a){if(a!=this.$useWrapMode){if(this.$useWrapMode=a,this.$modified=!0,this.$resetRowCache(0),a){var b=this.getLength();this.$wrapData=[];for(var c=0;b>c;c++)this.$wrapData.push([]);this.$updateWrapData(0,b-1)}this._emit("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(a,b){(this.$wrapLimitRange.min!==a||this.$wrapLimitRange.max!==b)&&(this.$wrapLimitRange={min:a,max:b},this.$modified=!0,this._emit("changeWrapMode"))},this.adjustWrapLimit=function(a,b){var c=this.$wrapLimitRange;c.max<0&&(c={min:b,max:b});var d=this.$constrainWrapLimit(a,c.min,c.max);return d!=this.$wrapLimit&&d>1?(this.$wrapLimit=d,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._emit("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(a,b,c){return b&&(a=Math.max(b,a)),c&&(a=Math.min(c,a)),a},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(a){this.setWrapLimitRange(a,a)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(a){var b,c=this.$useWrapMode,d=a.data.action,e=a.data.range.start.row,f=a.data.range.end.row,g=a.data.range.start,h=a.data.range.end,i=null;if(-1!=d.indexOf("Lines")?(f="insertLines"==d?e+a.data.lines.length:e,b=a.data.lines?a.data.lines.length:f-e):b=f-e,this.$updating=!0,0!=b)if(-1!=d.indexOf("remove")){this[c?"$wrapData":"$rowLengthCache"].splice(e,b);var j=this.$foldData;i=this.getFoldsInRange(a.data.range),this.removeFolds(i);var k=this.getFoldLine(h.row),l=0;if(k){k.addRemoveChars(h.row,h.column,g.column-h.column),k.shiftRow(-b);var m=this.getFoldLine(e);m&&m!==k&&(m.merge(k),k=m),l=j.indexOf(k)+1}for(l;l<j.length;l++){var k=j[l];k.start.row>=h.row&&k.shiftRow(-b)}f=e}else{var n;if(c){n=[e,0];for(var o=0;b>o;o++)n.push([]);this.$wrapData.splice.apply(this.$wrapData,n)}else n=Array(b),n.unshift(e,0),this.$rowLengthCache.splice.apply(this.$rowLengthCache,n);var j=this.$foldData,k=this.getFoldLine(e),l=0;if(k){var p=k.range.compareInside(g.row,g.column);0==p?(k=k.split(g.row,g.column),k.shiftRow(b),k.addRemoveChars(f,0,h.column-g.column)):-1==p&&(k.addRemoveChars(e,0,h.column-g.column),k.shiftRow(b)),l=j.indexOf(k)+1}for(l;l<j.length;l++){var k=j[l];k.start.row>=e&&k.shiftRow(b)}}else{b=Math.abs(a.data.range.start.column-a.data.range.end.column),-1!=d.indexOf("remove")&&(i=this.getFoldsInRange(a.data.range),this.removeFolds(i),b=-b);var k=this.getFoldLine(e);k&&k.addRemoveChars(e,g.column,b)}return c&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,c?this.$updateWrapData(e,f):this.$updateRowLengthCache(e,f),i},this.$updateRowLengthCache=function(a,b){this.$rowLengthCache[a]=null,this.$rowLengthCache[b]=null},this.$updateWrapData=function(a,b){var c,d,e=this.doc.getAllLines(),f=this.getTabSize(),g=this.$wrapData,h=this.$wrapLimit,i=a;for(b=Math.min(b,e.length-1);b>=i;)d=this.getFoldLine(i,d),d?(c=[],d.walk(function(a,b,d,f){var g;if(null!=a){g=this.$getDisplayTokens(a,c.length),g[0]=m;for(var h=1;h<g.length;h++)g[h]=n}else g=this.$getDisplayTokens(e[b].substring(f,d),c.length);c=c.concat(g)}.bind(this),d.end.row,e[d.end.row].length+1),g[d.start.row]=this.$computeWrapSplits(c,h,f),i=d.end.row+1):(c=this.$getDisplayTokens(e[i]),g[i]=this.$computeWrapSplits(c,h,f),i++)};var g=1,j=2,m=3,n=4,o=9,p=10,q=11,r=12;this.$computeWrapSplits=function(a,b){function c(b){var c=a.slice(f,b),e=c.length;c.join("").replace(/12/g,function(){e-=1}).replace(/2/g,function(){e-=1}),g+=e,d.push(g),f=b}if(0==a.length)return[];for(var d=[],e=a.length,f=0,g=0,h=this.$wrapAsCode;e-f>b;){var i=f+b;if(a[i-1]>=p&&a[i]>=p)c(i);else if(a[i]!=m&&a[i]!=n){for(var j=Math.max(i-(h?10:b-(b>>2)),f-1);i>j&&a[i]<m;)i--;if(h){for(;i>j&&a[i]<m;)i--;for(;i>j&&a[i]==o;)i--}else for(;i>j&&a[i]<p;)i--;i>j?c(++i):(i=f+b,c(i))}else{for(i;i!=f-1&&a[i]!=m;i--);if(i>f){c(i);continue}for(i=f+b;i<a.length&&a[i]==n;i++);if(i==a.length)break;c(i)}}return d},this.$getDisplayTokens=function(a,c){var d,e=[];c=c||0;for(var f=0;f<a.length;f++){var h=a.charCodeAt(f);if(9==h){d=this.getScreenTabSize(e.length+c),e.push(q);for(var i=1;d>i;i++)e.push(r)}else 32==h?e.push(p):h>39&&48>h||h>57&&64>h?e.push(o):h>=4352&&b(h)?e.push(g,j):e.push(g)}return e},this.$getStringScreenWidth=function(a,c,d){if(0==c)return[0,0];null==c&&(c=1/0),d=d||0;var e,f;for(f=0;f<a.length&&(e=a.charCodeAt(f),d+=9==e?this.getScreenTabSize(d):e>=4352&&b(e)?2:1,!(d>c));f++);return[d,f]},this.getRowLength=function(a){return this.$useWrapMode&&this.$wrapData[a]?this.$wrapData[a].length+1:1},this.getScreenLastRowColumn=function(a){var b=this.screenToDocumentPosition(a,Number.MAX_VALUE);return this.documentToScreenColumn(b.row,b.column)},this.getDocumentLastRowColumn=function(a,b){var c=this.documentToScreenRow(a,b);return this.getScreenLastRowColumn(c)},this.getDocumentLastRowColumnPosition=function(a,b){var c=this.documentToScreenRow(a,b);return this.screenToDocumentPosition(c,Number.MAX_VALUE/10)},this.getRowSplitData=function(a){return this.$useWrapMode?this.$wrapData[a]:void 0},this.getScreenTabSize=function(a){return this.$tabSize-a%this.$tabSize},this.screenToDocumentRow=function(a,b){return this.screenToDocumentPosition(a,b).row},this.screenToDocumentColumn=function(a,b){return this.screenToDocumentPosition(a,b).column},this.screenToDocumentPosition=function(a,b){if(0>a)return{row:0,column:0};var c,d,e=0,f=0,g=0,h=0,i=this.$screenRowCache,j=this.$getRowCacheIndex(i,a),k=i.length;if(k&&j>=0)var g=i[j],e=this.$docRowCache[j],l=a>i[k-1];else var l=!k;for(var m=this.getLength()-1,n=this.getNextFoldLine(e),o=n?n.start.row:1/0;a>=g&&(h=this.getRowLength(e),!(g+h-1>=a||e>=m));)g+=h,e++,e>o&&(e=n.end.row+1,n=this.getNextFoldLine(e,n),o=n?n.start.row:1/0),l&&(this.$docRowCache.push(e),this.$screenRowCache.push(g));if(n&&n.start.row<=e)c=this.getFoldDisplayLine(n),e=n.start.row;else{if(a>=g+h||e>m)return{row:m,column:this.getLine(m).length};c=this.getLine(e),n=null}if(this.$useWrapMode){var p=this.$wrapData[e];p&&(d=p[a-g],a>g&&p.length&&(f=p[a-g-1]||p[p.length-1],c=c.substring(f)))}return f+=this.$getStringScreenWidth(c,b)[1],this.$useWrapMode&&f>=d&&(f=d-1),n?n.idxToPosition(f):{row:e,column:f}},this.documentToScreenPosition=function(a,b){if("undefined"==typeof b)var c=this.$clipPositionToDocument(a.row,a.column);else c=this.$clipPositionToDocument(a,b);a=c.row,b=c.column;var d=0,e=null,f=null;f=this.getFoldAt(a,b,1),f&&(a=f.start.row,b=f.start.column);var g,h=0,i=this.$docRowCache,j=this.$getRowCacheIndex(i,a),k=i.length;if(k&&j>=0)var h=i[j],d=this.$screenRowCache[j],l=a>i[k-1];else var l=!k;for(var m=this.getNextFoldLine(h),n=m?m.start.row:1/0;a>h;){if(h>=n){if(g=m.end.row+1,g>a)break;m=this.getNextFoldLine(g,m),n=m?m.start.row:1/0}else g=h+1;d+=this.getRowLength(h),h=g,l&&(this.$docRowCache.push(h),this.$screenRowCache.push(d))}var o="";if(m&&h>=n?(o=this.getFoldDisplayLine(m,a,b),e=m.start.row):(o=this.getLine(a).substring(0,b),e=a),this.$useWrapMode){for(var p=this.$wrapData[e],q=0;o.length>=p[q];)d++,q++;o=o.substring(p[q-1]||0,o.length)}return{row:d,column:this.$getStringScreenWidth(o)[0]}},this.documentToScreenColumn=function(a,b){return this.documentToScreenPosition(a,b).column},this.documentToScreenRow=function(a,b){return this.documentToScreenPosition(a,b).row},this.getScreenLength=function(){var a=0,b=null;if(this.$useWrapMode)for(var c=this.$wrapData.length,d=0,e=0,b=this.$foldData[e++],f=b?b.start.row:1/0;c>d;)a+=this.$wrapData[d].length+1,d++,d>f&&(d=b.end.row+1,b=this.$foldData[e++],f=b?b.start.row:1/0);else{a=this.getLength();for(var g=this.$foldData,e=0;e<g.length;e++)b=g[e],a-=b.end.row-b.start.row}return a}}).call(m.prototype),a("./edit_session/folding").Folding.call(m.prototype),a("./edit_session/bracket_match").BracketMatch.call(m.prototype),e.defineOptions(m.prototype,"session",{wrap:{set:function(a){if(a&&"off"!=a?"free"==a?a=!0:"printMargin"==a?a=-1:"string"==typeof a&&(a=parseInt(a,10)||!1):a=!1,this.$wrap!=a){if(a){var b="number"==typeof a?a:null;this.setWrapLimitRange(b,b),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1);this.$wrap=a}},get:function(){return this.getUseWrapMode()?this.getWrapLimitRange().min||"free":"off"},handlesSet:!0},wrapMethod:{set:function(a){this.$wrapAsCode="auto"==a?"text"!=this.$mode.type:"text"!=a},initialValue:"auto"},firstLineNumber:{set:function(){this._emit("changeBreakpoint")},initialValue:1},useWorker:{set:function(a){this.$useWorker=a,this.$stopWorker(),a&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(a){isNaN(a)||this.$tabSize===a||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=a,this._emit("changeTabSize"))},initialValue:4,handlesSet:!0},overwrite:{set:function(){this._emit("changeOverwrite")},initialValue:!1},newLineMode:{set:function(a){this.doc.setNewLineMode(a)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0}}),b.EditSession=m}),define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(a,b){var c=a("./lib/oop"),d=a("./lib/lang"),e=a("./lib/event_emitter").EventEmitter,f=a("./range").Range,g=function(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var b=this;this.lead.on("change",function(a){b._emit("changeCursor"),b.$isEmpty||b._emit("changeSelection"),b.$keepDesiredColumnOnChange||a.old.column==a.value.column||(b.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){b.$isEmpty||b._emit("changeSelection")})};(function(){c.implement(this,e),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(a,b){this.anchor.setPosition(a,b),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(a){if(this.$isEmpty)return this.moveCursorTo(this.lead.row,this.lead.column+a),void 0;var b=this.getSelectionAnchor(),c=this.getSelectionLead(),d=this.isBackwards();d&&0===b.column||this.setSelectionAnchor(b.row,b.column+a),(d||0!==c.column)&&this.$moveSelection(function(){this.moveCursorTo(c.row,c.column+a)})},this.isBackwards=function(){var a=this.anchor,b=this.lead;return a.row>b.row||a.row==b.row&&a.column>b.column},this.getRange=function(){var a=this.anchor,b=this.lead;return this.isEmpty()?f.fromPoints(b,b):this.isBackwards()?f.fromPoints(b,a):f.fromPoints(a,b)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var a=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(a,this.doc.getLine(a).length)},this.setRange=this.setSelectionRange=function(a,b){b?(this.setSelectionAnchor(a.end.row,a.end.column),this.selectTo(a.start.row,a.start.column)):(this.setSelectionAnchor(a.start.row,a.start.column),this.selectTo(a.end.row,a.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(a){var b=this.lead;this.$isEmpty&&this.setSelectionAnchor(b.row,b.column),a.call(this)},this.selectTo=function(a,b){this.$moveSelection(function(){this.moveCursorTo(a,b)})},this.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(a,b){if("undefined"==typeof b){var c=a||this.lead;a=c.row,b=c.column}return this.session.getWordRange(a,b)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var a=this.getCursor(),b=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(b)},this.getLineRange=function(a,b){var c,d="number"==typeof a?a:this.lead.row,e=this.session.getFoldLine(d);return e?(d=e.start.row,c=e.end.row):c=d,b===!0?new f(d,0,c,this.session.getLine(c).length):new f(d,0,c+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var a,b=this.lead.getPosition();if(a=this.session.getFoldAt(b.row,b.column,-1))this.moveCursorTo(a.start.row,a.start.column);else if(0==b.column)b.row>0&&this.moveCursorTo(b.row-1,this.doc.getLine(b.row-1).length);else{var c=this.session.getTabSize();this.session.isTabStop(b)&&this.doc.getLine(b.row).slice(b.column-c,b.column).split(" ").length-1==c?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var a,b=this.lead.getPosition();if(a=this.session.getFoldAt(b.row,b.column,1))this.moveCursorTo(a.end.row,a.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var c=this.session.getTabSize(),b=this.lead;this.session.isTabStop(b)&&this.doc.getLine(b.row).slice(b.column,b.column+c).split(" ").length-1==c?this.moveCursorBy(0,c):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var a=this.lead.row,b=this.lead.column,c=this.session.documentToScreenRow(a,b),d=this.session.screenToDocumentPosition(c,0),e=this.session.getDisplayLine(a,null,d.row,d.column),f=e.match(/^\s*/);f[0].length==b||this.session.$useEmacsStyleLineStart||(d.column+=f[0].length),this.moveCursorToPosition(d)},this.moveCursorLineEnd=function(){var a=this.lead,b=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==b.column){var c=this.session.getLine(b.row);if(b.column==c.length){var d=c.search(/\s+$/);d>0&&(b.column=d)}}this.moveCursorTo(b.row,b.column)},this.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,b=this.doc.getLine(a).length;this.moveCursorTo(a,b)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var a,b=this.lead.row,c=this.lead.column,d=this.doc.getLine(b),e=d.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var f=this.session.getFoldAt(b,c,1);return f?(this.moveCursorTo(f.end.row,f.end.column),void 0):((a=this.session.nonTokenRe.exec(e))&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=d.substring(c)),c>=d.length?(this.moveCursorTo(b,d.length),this.moveCursorRight(),b<this.doc.getLength()-1&&this.moveCursorWordRight(),void 0):((a=this.session.tokenRe.exec(e))&&(c+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(b,c),void 0))},this.moveCursorLongWordLeft=function(){var a,b=this.lead.row,c=this.lead.column;if(a=this.session.getFoldAt(b,c,-1))return this.moveCursorTo(a.start.row,a.start.column),void 0;var e=this.session.getFoldStringAt(b,c,-1);null==e&&(e=this.doc.getLine(b).substring(0,c));var f,g=d.stringReverse(e);return this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,(f=this.session.nonTokenRe.exec(g))&&(c-=this.session.nonTokenRe.lastIndex,g=g.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),0>=c?(this.moveCursorTo(b,0),this.moveCursorLeft(),b>0&&this.moveCursorWordLeft(),void 0):((f=this.session.tokenRe.exec(g))&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(b,c),void 0)},this.$shortWordEndIndex=function(a){var b,c,d=0,e=/\s/,f=this.session.tokenRe;if(f.lastIndex=0,b=this.session.tokenRe.exec(a))d=this.session.tokenRe.lastIndex;else{for(;(c=a[d])&&e.test(c);)d++;if(1>d)for(f.lastIndex=0;(c=a[d])&&!f.test(c);)if(f.lastIndex=0,d++,e.test(c)){if(d>2){d--;break}for(;(c=a[d])&&e.test(c);)d++;if(d>2)break}}return f.lastIndex=0,d},this.moveCursorShortWordRight=function(){var a=this.lead.row,b=this.lead.column,c=this.doc.getLine(a),d=c.substring(b),e=this.session.getFoldAt(a,b,1);if(e)return this.moveCursorTo(e.end.row,e.end.column);if(b==c.length){var f=this.doc.getLength();do a++,d=this.doc.getLine(a);while(f>a&&/^\s*$/.test(d));/^\s+/.test(d)||(d=""),b=0}var g=this.$shortWordEndIndex(d);this.moveCursorTo(a,b+g)},this.moveCursorShortWordLeft=function(){var a,b=this.lead.row,c=this.lead.column;if(a=this.session.getFoldAt(b,c,-1))return this.moveCursorTo(a.start.row,a.start.column);var e=this.session.getLine(b).substring(0,c);if(0==c){do b--,e=this.doc.getLine(b);while(b>0&&/^\s*$/.test(e));c=e.length,/\s+$/.test(e)||(e="")}var f=d.stringReverse(e),g=this.$shortWordEndIndex(f);return this.moveCursorTo(b,c-g)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(a,b){var c=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===b&&(this.$desiredColumn?c.column=this.$desiredColumn:this.$desiredColumn=c.column);var d=this.session.screenToDocumentPosition(c.row+a,c.column);this.moveCursorTo(d.row,d.column+b,0===b)},this.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},this.moveCursorTo=function(a,b,c){var d=this.session.getFoldAt(a,b,1);d&&(a=d.start.row,b=d.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(a,b),this.$keepDesiredColumnOnChange=!1,c||(this.$desiredColumn=null)},this.moveCursorToScreen=function(a,b,c){var d=this.session.screenToDocumentPosition(a,b);this.moveCursorTo(d.row,d.column,c)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(a){var b=this.getRange();return a?(a.start.column=b.start.column,a.start.row=b.start.row,a.end.column=b.end.column,a.end.row=b.end.row):a=b,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},this.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(a){var b=a.clone();return b.isBackwards=a.cursor==a.start,b});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},this.fromJSON=function(a){if(void 0==a.start){if(this.rangeList){this.toSingleRange(a[0]);for(var b=a.length;b--;){var c=f.fromPoints(a[b].start,a[b].end);a.isBackwards&&(c.cursor=c.start),this.addRange(c,!0)}return}a=a[0]}this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},this.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var b=this.ranges.length;b--;)if(!this.ranges[b].isEqual(a[b]))return!1;return!0}}).call(g.prototype),b.Selection=g}),define("ace/range",["require","exports","module"],function(a,b){var c=function(a,b){return a.row-b.row||a.column-b.column},d=function(a,b,c,d){this.start={row:a,column:b},this.end={row:c,column:d}};(function(){this.isEqual=function(a){return this.start.row===a.start.row&&this.end.row===a.end.row&&this.start.column===a.start.column&&this.end.column===a.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(a,b){return 0==this.compare(a,b)},this.compareRange=function(a){var b,c=a.end,d=a.start;return b=this.compare(c.row,c.column),1==b?(b=this.compare(d.row,d.column),1==b?2:0==b?1:0):-1==b?-2:(b=this.compare(d.row,d.column),-1==b?-1:1==b?42:0)},this.comparePoint=function(a){return this.compare(a.row,a.column)},this.containsRange=function(a){return 0==this.comparePoint(a.start)&&0==this.comparePoint(a.end)},this.intersects=function(a){var b=this.compareRange(a);return-1==b||0==b||1==b},this.isEnd=function(a,b){return this.end.row==a&&this.end.column==b},this.isStart=function(a,b){return this.start.row==a&&this.start.column==b},this.setStart=function(a,b){"object"==typeof a?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=b)},this.setEnd=function(a,b){"object"==typeof a?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=b)},this.inside=function(a,b){return 0==this.compare(a,b)?this.isEnd(a,b)||this.isStart(a,b)?!1:!0:!1},this.insideStart=function(a,b){return 0==this.compare(a,b)?this.isEnd(a,b)?!1:!0:!1},this.insideEnd=function(a,b){return 0==this.compare(a,b)?this.isStart(a,b)?!1:!0:!1},this.compare=function(a,b){return this.isMultiLine()||a!==this.start.row?a<this.start.row?-1:a>this.end.row?1:this.start.row===a?b>=this.start.column?0:-1:this.end.row===a?b<=this.end.column?0:1:0:b<this.start.column?-1:b>this.end.column?1:0},this.compareStart=function(a,b){return this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.compareEnd=function(a,b){return this.end.row==a&&this.end.column==b?1:this.compare(a,b)},this.compareInside=function(a,b){return this.end.row==a&&this.end.column==b?1:this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.clipRows=function(a,b){if(this.end.row>b)var c={row:b+1,column:0};else if(this.end.row<a)var c={row:a,column:0};if(this.start.row>b)var e={row:b+1,column:0};else if(this.start.row<a)var e={row:a,column:0};return d.fromPoints(e||this.start,c||this.end)},this.extend=function(a,b){var c=this.compare(a,b);if(0==c)return this;if(-1==c)var e={row:a,column:b};else var f={row:a,column:b};return d.fromPoints(e||this.start,f||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return d.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new d(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new d(this.start.row,0,this.end.row,0)},this.toScreenRange=function(a){var b=a.documentToScreenPosition(this.start),c=a.documentToScreenPosition(this.end);return new d(b.row,b.column,c.row,c.column)},this.moveBy=function(a,b){this.start.row+=a,this.start.column+=b,this.end.row+=a,this.end.column+=b}}).call(d.prototype),d.fromPoints=function(a,b){return new d(a.row,a.column,b.row,b.column)},d.comparePoints=c,d.comparePoints=function(a,b){return a.row-b.row||a.column-b.column},b.Range=d}),define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(a,b){var c=a("../tokenizer").Tokenizer,d=a("./text_highlight_rules").TextHighlightRules,e=a("./behaviour").Behaviour,f=a("../unicode"),g=a("../lib/lang"),h=a("../token_iterator").TokenIterator,i=a("../range").Range,j=function(){this.HighlightRules=d,this.$behaviour=new e};(function(){this.tokenRe=new RegExp("^["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]|s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=new this.HighlightRules,this.$tokenizer=new c(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(a,b,c,d){function e(a){for(var b=c;d>=b;b++)a(f.getLine(b),b)}var f=b.doc,h=!0,i=!0,j=1/0,k=b.getTabSize(),l=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var m=this.lineCommentStart.map(g.escapeRegExp).join("|"),n=this.lineCommentStart[0];else var m=g.escapeRegExp(this.lineCommentStart),n=this.lineCommentStart;m=new RegExp("^(\\s*)(?:"+m+") ?"),l=b.getUseSoftTabs();var o=function(a,b){var c=a.match(m);if(c){var d=c[1].length,e=c[0].length;s(a,d,e)||" "!=c[0][e-1]||e--,f.removeInLine(b,d,e)}},p=n+" ",q=function(a,b){(!h||/\S/.test(a))&&(s(a,j,j)?f.insertInLine({row:b,column:j},p):f.insertInLine({row:b,column:j},n))},r=function(a){return m.test(a)},s=function(a,b,c){for(var d=0;b--&&" "==a.charAt(b);)d++;if(d%k!=0)return!1;for(var d=0;" "==a.charAt(c++);)d++;return k>2?d%k!=k-1:d%k==0}}else{if(!this.blockComment)return!1;var n=this.blockComment.start,t=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+g.escapeRegExp(n)+")"),u=new RegExp("(?:"+g.escapeRegExp(t)+")\\s*$"),q=function(a,b){r(a,b)||(!h||/\S/.test(a))&&(f.insertInLine({row:b,column:a.length},t),f.insertInLine({row:b,column:j},n))
-},o=function(a,b){var c;(c=a.match(u))&&f.removeInLine(b,a.length-c[0].length,a.length),(c=a.match(m))&&f.removeInLine(b,c[1].length,c[0].length)},r=function(a,c){if(m.test(a))return!0;for(var d=b.getTokens(c),e=0;e<d.length;e++)if("comment"===d[e].type)return!0}}var v=1/0;e(function(a,b){var c=a.search(/\S/);-1!==c?(j>c&&(j=c),i&&!r(a,b)&&(i=!1)):v>a.length&&(v=a.length)}),1/0==j&&(j=v,h=!1,i=!1),l&&j%k!=0&&(j=Math.floor(j/k)*k),e(i?o:q)},this.toggleBlockComment=function(a,b,c,d){var e=this.blockComment;if(e){!e.start&&e[0]&&(e=e[0]);var f,g,j=new h(b,d.row,d.column),k=j.getCurrentToken(),l=(b.selection,b.selection.toOrientedRange());if(k&&/comment/.test(k.type)){for(var m,n;k&&/comment/.test(k.type);){var o=k.value.indexOf(e.start);if(-1!=o){var p=j.getCurrentTokenRow(),q=j.getCurrentTokenColumn()+o;m=new i(p,q,p,q+e.start.length);break}k=j.stepBackward()}for(var j=new h(b,d.row,d.column),k=j.getCurrentToken();k&&/comment/.test(k.type);){var o=k.value.indexOf(e.end);if(-1!=o){var p=j.getCurrentTokenRow(),q=j.getCurrentTokenColumn()+o;n=new i(p,q,p,q+e.end.length);break}k=j.stepForward()}n&&b.remove(n),m&&(b.remove(m),f=m.start.row,g=-e.start.length)}else g=e.start.length,f=c.start.row,b.insert(c.end,e.end),b.insert(c.start,e.start);l.start.row==f&&(l.start.column+=g),l.end.row==f&&(l.end.column+=g),b.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(a,b){return this.$getIndent(b)},this.checkOutdent=function(){return!1},this.autoOutdent=function(){},this.$getIndent=function(a){return a.match(/^\s*/)[0]},this.createWorker=function(){return null},this.createModeDelegates=function(a){this.$embeds=[],this.$modes={};for(var b in a)a[b]&&(this.$embeds.push(b),this.$modes[b]=new a[b]);for(var c=["toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],b=0;b<c.length;b++)!function(a){var d=c[b],e=a[d];a[c[b]]=function(){return this.$delegator(d,arguments,e)}}(this)},this.$delegator=function(a,b,c){var d=b[0];"string"!=typeof d&&(d=d[0]);for(var e=0;e<this.$embeds.length;e++)if(this.$modes[this.$embeds[e]]){var f=d.split(this.$embeds[e]);if(!f[0]&&f[1]){b[0]=f[1];var g=this.$modes[this.$embeds[e]];return g[a].apply(g,b)}}var h=c.apply(this,b);return c?h:void 0},this.transformAction=function(a,b){if(this.$behaviour){var c=this.$behaviour.getBehaviours();for(var d in c)if(c[d][b]){var e=c[d][b].apply(this,arguments);if(e)return e}}},this.getKeywords=function(a){if(!this.completionKeywords){var b=this.$tokenizer.rules,c=[];for(var d in b)for(var e=b[d],f=0,g=e.length;g>f;f++)if("string"==typeof e[f].token)/keyword|support|storage/.test(e[f].token)&&c.push(e[f].regex);else if("object"==typeof e[f].token)for(var h=0,i=e[f].token.length;i>h;h++)if(/keyword|support|storage/.test(e[f].token[h])){var d=e[f].regex.match(/\(.+?\)/g)[h];c.push(d.substr(1,d.length-2))}this.completionKeywords=c}return a?c.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(){var a=this.$keywordList||this.$createKeywordList();return a.map(function(a){return{name:a,value:a,score:0,meta:"keyword"}})}}).call(j.prototype),b.Mode=j}),define("ace/tokenizer",["require","exports","module"],function(a,b){var c=1e3,d=function(a){this.states=a,this.regExps={},this.matchMappings={};for(var b in this.states){for(var c=this.states[b],d=[],e=0,f=this.matchMappings[b]={defaultToken:"text"},g="g",h=[],i=0;i<c.length;i++){var j=c[i];if(j.defaultToken&&(f.defaultToken=j.defaultToken),j.caseInsensitive&&(g="gi"),null!=j.regex){j.regex instanceof RegExp&&(j.regex=j.regex.toString().slice(1,-1));var k=j.regex,l=new RegExp("(?:("+k+")|(.))").exec("a").length-2;if(Array.isArray(j.token))if(1==j.token.length||1==l)j.token=j.token[0];else{if(l-1!=j.token.length)throw new Error("number of classes and regexp groups in '"+j.token+"'\n'"+j.regex+"' doesn't match\n"+(l-1)+"!="+j.token.length);j.tokenArray=j.token,j.token=null,j.onMatch=this.$arrayTokens}else"function"!=typeof j.token||j.onMatch||(j.onMatch=l>1?this.$applyToken:j.token);l>1&&(/\\\d/.test(j.regex)?k=j.regex.replace(/\\([0-9]+)/g,function(a,b){return"\\"+(parseInt(b,10)+e+1)}):(l=1,k=this.removeCapturingGroups(j.regex)),j.splitRegex||"string"==typeof j.token||h.push(j)),f[e]=i,e+=l,d.push(k),j.onMatch||(j.onMatch=null),j.__proto__=null}}h.forEach(function(a){a.splitRegex=this.createSplitterRegexp(a.regex,g)},this),this.regExps[b]=new RegExp("("+d.join(")|(")+")|($)",g)}};(function(){this.$setMaxTokenCount=function(a){c=0|a},this.$applyToken=function(a){var b=this.splitRegex.exec(a).slice(1),c=this.token.apply(this,b);if("string"==typeof c)return[{type:c,value:a}];for(var d=[],e=0,f=c.length;f>e;e++)b[e]&&(d[d.length]={type:c[e],value:b[e]});return d},this.$arrayTokens=function(a){if(!a)return[];var b=this.splitRegex.exec(a);if(!b)return"text";for(var c=[],d=this.tokenArray,e=0,f=d.length;f>e;e++)b[e+1]&&(c[c.length]={type:d[e],value:b[e+1]});return c},this.removeCapturingGroups=function(a){var b=a.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(a,b){return b?"(?:":a});return b},this.createSplitterRegexp=function(a,b){if(-1!=a.indexOf("(?=")){var c=0,d=!1,e={};a.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(a,b,f,g,h,i){return d?d="]"!=h:h?d=!0:g?(c==e.stack&&(e.end=i+1,e.stack=-1),c--):f&&(c++,1!=f.length&&(e.stack=c,e.start=i)),a}),null!=e.end&&/^\)*$/.test(a.substr(e.end))&&(a=a.substring(0,e.start)+a.substr(e.end))}return new RegExp(a,(b||"").replace("g",""))},this.getLineTokens=function(a,b){if(b&&"string"!=typeof b){var d=b.slice(0);b=d[0]}else var d=[];var e=b||"start",f=this.states[e],g=this.matchMappings[e],h=this.regExps[e];h.lastIndex=0;for(var i,j=[],k=0,l={type:null,value:""};i=h.exec(a);){var m=g.defaultToken,n=null,o=i[0],p=h.lastIndex;if(p-o.length>k){var q=a.substring(k,p-o.length);l.type==m?l.value+=q:(l.type&&j.push(l),l={type:m,value:q})}for(var r=0;r<i.length-2;r++)if(void 0!==i[r+1]){n=f[g[r]],m=n.onMatch?n.onMatch(o,e,d):n.token,n.next&&(e="string"==typeof n.next?n.next:n.next(e,d),f=this.states[e],f||(window.console&&console.error&&console.error(e,"doesn't exist"),e="start",f=this.states[e]),g=this.matchMappings[e],k=p,h=this.regExps[e],h.lastIndex=p);break}if(o)if("string"==typeof m)n&&n.merge===!1||l.type!==m?(l.type&&j.push(l),l={type:m,value:o}):l.value+=o;else if(m){l.type&&j.push(l),l={type:null,value:""};for(var r=0;r<m.length;r++)j.push(m[r])}if(k==a.length)break;if(k=p,j.length>c){for(;k<a.length;)l.type&&j.push(l),l={value:a.substring(k,k+=2e3),type:"overflow"};e="start",d=[];break}}return l.type&&j.push(l),{tokens:j,state:d.length?d:e}}}).call(d.prototype),b.Tokenizer=d}),define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(a,b){var c=a("../lib/lang"),d=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(a,b){if(b)for(var c in a){for(var d=a[c],e=0;e<d.length;e++){var f=d[e];f.next&&("string"!=typeof f.next?f.nextState&&0!==f.nextState.indexOf(b)&&(f.nextState=b+f.nextState):0!==f.next.indexOf(b)&&(f.next=b+f.next))}this.$rules[b+c]=d}else for(var c in a)this.$rules[c]=a[c]},this.getRules=function(){return this.$rules},this.embedRules=function(a,b,d,e,f){var g=(new a).getRules();if(e)for(var h=0;h<e.length;h++)e[h]=b+e[h];else{e=[];for(var i in g)e.push(b+i)}if(this.addRules(g,b),d)for(var j=Array.prototype[f?"push":"unshift"],h=0;h<e.length;h++)j.apply(this.$rules[e[h]],c.deepCopy(d));this.$embeds||(this.$embeds=[]),this.$embeds.push(b)},this.getEmbeds=function(){return this.$embeds};var a=function(a,b){return"start"!=a&&b.unshift(this.nextState,a),this.nextState},b=function(a,b){return b[0]!==a?"start":(b.shift(),b.shift())};this.normalizeRules=function(){function c(f){var g=e[f];g.processed=!0;for(var h=0;h<g.length;h++){var i=g[h];!i.regex&&i.start&&(i.regex=i.start,i.next||(i.next=[]),i.next.push({defaultToken:i.token},{token:i.token+".end",regex:i.end||i.start,next:"pop"}),i.token=i.token+".start",i.push=!0);var j=i.next||i.push;if(j&&Array.isArray(j)){var k=i.stateName;k||(k=i.token,"string"!=typeof k&&(k=k[0]||""),e[k]&&(k+=d++)),e[k]=j,i.next=k,c(k)}else"pop"==j&&(i.next=b);if(i.push&&(i.nextState=i.next||i.push,i.next=a,delete i.push),i.rules)for(var l in i.rules)e[l]?e[l].push&&e[l].push.apply(e[l],i.rules[l]):e[l]=i.rules[l];if(i.include||"string"==typeof i)var m=i.include||i,n=e[m];else Array.isArray(i)&&(n=i);if(n){var o=[h,1].concat(n);i.noEscape&&(o=o.filter(function(a){return!a.next})),g.splice.apply(g,o),h--,n=null}i.keywordMap&&(i.token=this.createKeywordMapper(i.keywordMap,i.defaultToken||"text",i.caseInsensitive),delete i.defaultToken)}}var d=0,e=this.$rules;Object.keys(e).forEach(c,this)},this.createKeywordMapper=function(a,b,c,d){var e=Object.create(null);return Object.keys(a).forEach(function(b){var f=a[b];c&&(f=f.toLowerCase());for(var g=f.split(d||"|"),h=g.length;h--;)e[g[h]]=b}),Object.getPrototypeOf(e)&&(e.__proto__=null),this.$keywordList=Object.keys(e),a=null,c?function(a){return e[a.toLowerCase()]||b}:function(a){return e[a]||b}},this.getKeywords=function(){return this.$keywords}}).call(d.prototype),b.TextHighlightRules=d}),define("ace/mode/behaviour",["require","exports","module"],function(a,b){var c=function(){this.$behaviours={}};(function(){this.add=function(a,b,c){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[a]:this.$behaviours[a]={}}this.$behaviours[a][b]=c},this.addBehaviours=function(a){for(var b in a)for(var c in a[b])this.add(b,c,a[b][c])},this.remove=function(a){this.$behaviours&&this.$behaviours[a]&&delete this.$behaviours[a]},this.inherit=function(a,b){if("function"==typeof a)var c=(new a).getBehaviours(b);else var c=a.getBehaviours(b);this.addBehaviours(c)},this.getBehaviours=function(a){if(a){for(var b={},c=0;c<a.length;c++)this.$behaviours[a[c]]&&(b[a[c]]=this.$behaviours[a[c]]);return b}return this.$behaviours}}).call(c.prototype),b.Behaviour=c}),define("ace/unicode",["require","exports","module"],function(a,b){function c(a){var c=/\w{4}/g;for(var d in a)b.packages[d]=a[d].replace(c,"\\u$&")}b.packages={},c({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})
-}),define("ace/token_iterator",["require","exports","module"],function(a,b){var c=function(a,b,c){this.$session=a,this.$row=b,this.$rowTokens=a.getTokens(b);var d=a.getTokenAt(b,c);this.$tokenIndex=d?d.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var a=this.$rowTokens,b=this.$tokenIndex,c=a[b].start;if(void 0!==c)return c;for(c=0;b>0;)b-=1,c+=a[b].value.length;return c}}).call(c.prototype),b.TokenIterator=c}),define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(a,b){var c=a("./lib/oop"),d=a("./lib/event_emitter").EventEmitter,e=a("./range").Range,f=a("./anchor").Anchor,g=function(a){this.$lines=[],0==a.length?this.$lines=[""]:Array.isArray(a)?this._insertLines(0,a):this.insert({row:0,column:0},a)};(function(){c.implement(this,d),this.setValue=function(a){var b=this.getLength();this.remove(new e(0,0,b,this.getLine(b-1).length)),this.insert({row:0,column:0},a)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(a,b){return new f(this,a,b)},this.$split=0=="aaa".split(/a/).length?function(a){return a.replace(/\r\n|\r/g,"\n").split("\n")}:function(a){return a.split(/\r\n|\r|\n/)},this.$detectNewLine=function(a){var b=a.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=b?b[1]:"\n"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine}},this.$autoNewLine="\n",this.$newLineMode="auto",this.setNewLineMode=function(a){this.$newLineMode!==a&&(this.$newLineMode=a)},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(a){return"\r\n"==a||"\r"==a||"\n"==a},this.getLine=function(a){return this.$lines[a]||""},this.getLines=function(a,b){return this.$lines.slice(a,b+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(a){if(a.start.row==a.end.row)return this.getLine(a.start.row).substring(a.start.column,a.end.column);var b=this.getLines(a.start.row,a.end.row);b[0]=(b[0]||"").substring(a.start.column);var c=b.length-1;return a.end.row-a.start.row==c&&(b[c]=b[c].substring(0,a.end.column)),b.join(this.getNewLineCharacter())},this.$clipPosition=function(a){var b=this.getLength();return a.row>=b?(a.row=Math.max(0,b-1),a.column=this.getLine(b-1).length):a.row<0&&(a.row=0),a},this.insert=function(a,b){if(!b||0===b.length)return a;a=this.$clipPosition(a),this.getLength()<=1&&this.$detectNewLine(b);var c=this.$split(b),d=c.splice(0,1)[0],e=0==c.length?null:c.splice(c.length-1,1)[0];return a=this.insertInLine(a,d),null!==e&&(a=this.insertNewLine(a),a=this._insertLines(a.row,c),a=this.insertInLine(a,e||"")),a},this.insertLines=function(a,b){return a>=this.getLength()?this.insert({row:a,column:0},"\n"+b.join("\n")):this._insertLines(Math.max(a,0),b)},this._insertLines=function(a,b){if(0==b.length)return{row:a,column:0};if(b.length>65535){var c=this._insertLines(a,b.slice(65535));b=b.slice(0,65535)}var d=[a,0];d.push.apply(d,b),this.$lines.splice.apply(this.$lines,d);var f=new e(a,0,a+b.length,0),g={action:"insertLines",range:f,lines:b};return this._emit("change",{data:g}),c||f.end},this.insertNewLine=function(a){a=this.$clipPosition(a);var b=this.$lines[a.row]||"";this.$lines[a.row]=b.substring(0,a.column),this.$lines.splice(a.row+1,0,b.substring(a.column,b.length));var c={row:a.row+1,column:0},d={action:"insertText",range:e.fromPoints(a,c),text:this.getNewLineCharacter()};return this._emit("change",{data:d}),c},this.insertInLine=function(a,b){if(0==b.length)return a;var c=this.$lines[a.row]||"";this.$lines[a.row]=c.substring(0,a.column)+b+c.substring(a.column);var d={row:a.row,column:a.column+b.length},f={action:"insertText",range:e.fromPoints(a,d),text:b};return this._emit("change",{data:f}),d},this.remove=function(a){if(!a instanceof e&&(a=e.fromPoints(a.start,a.end)),a.start=this.$clipPosition(a.start),a.end=this.$clipPosition(a.end),a.isEmpty())return a.start;var b=a.start.row,c=a.end.row;if(a.isMultiLine()){var d=0==a.start.column?b:b+1,f=c-1;a.end.column>0&&this.removeInLine(c,0,a.end.column),f>=d&&this._removeLines(d,f),d!=b&&(this.removeInLine(b,a.start.column,this.getLine(b).length),this.removeNewLine(a.start.row))}else this.removeInLine(b,a.start.column,a.end.column);return a.start},this.removeInLine=function(a,b,c){if(b!=c){var d=new e(a,b,a,c),f=this.getLine(a),g=f.substring(b,c),h=f.substring(0,b)+f.substring(c,f.length);this.$lines.splice(a,1,h);var i={action:"removeText",range:d,text:g};return this._emit("change",{data:i}),d.start}},this.removeLines=function(a,b){return 0>a||b>=this.getLength()?this.remove(new e(a,0,b+1,0)):this._removeLines(a,b)},this._removeLines=function(a,b){var c=new e(a,0,b+1,0),d=this.$lines.splice(a,b-a+1),f={action:"removeLines",range:c,nl:this.getNewLineCharacter(),lines:d};return this._emit("change",{data:f}),d},this.removeNewLine=function(a){var b=this.getLine(a),c=this.getLine(a+1),d=new e(a,b.length,a+1,0),f=b+c;this.$lines.splice(a,2,f);var g={action:"removeText",range:d,text:this.getNewLineCharacter()};this._emit("change",{data:g})},this.replace=function(a,b){if(!a instanceof e&&(a=e.fromPoints(a.start,a.end)),0==b.length&&a.isEmpty())return a.start;if(b==this.getTextRange(a))return a.end;if(this.remove(a),b)var c=this.insert(a.start,b);else c=a.start;return c},this.applyDeltas=function(a){for(var b=0;b<a.length;b++){var c=a[b],d=e.fromPoints(c.range.start,c.range.end);"insertLines"==c.action?this.insertLines(d.start.row,c.lines):"insertText"==c.action?this.insert(d.start,c.text):"removeLines"==c.action?this._removeLines(d.start.row,d.end.row-1):"removeText"==c.action&&this.remove(d)}},this.revertDeltas=function(a){for(var b=a.length-1;b>=0;b--){var c=a[b],d=e.fromPoints(c.range.start,c.range.end);"insertLines"==c.action?this._removeLines(d.start.row,d.end.row-1):"insertText"==c.action?this.remove(d):"removeLines"==c.action?this._insertLines(d.start.row,c.lines):"removeText"==c.action&&this.insert(d.start,c.text)}},this.indexToPosition=function(a,b){for(var c=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,e=b||0,f=c.length;f>e;e++)if(a-=c[e].length+d,0>a)return{row:e,column:a+c[e].length+d};return{row:f-1,column:c[f-1].length}},this.positionToIndex=function(a,b){for(var c=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,e=0,f=Math.min(a.row,c.length),g=b||0;f>g;++g)e+=c[g].length+d;return e+a.column}}).call(g.prototype),b.Document=g}),define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b){var c=a("./lib/oop"),d=a("./lib/event_emitter").EventEmitter,e=b.Anchor=function(a,b,c){this.$onChange=this.onChange.bind(this),this.attach(a),"undefined"==typeof c?this.setPosition(b.row,b.column):this.setPosition(b,c)};(function(){c.implement(this,d),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(a){var b=a.data,c=b.range;if((c.start.row!=c.end.row||c.start.row==this.row)&&!(c.start.row>this.row||c.start.row==this.row&&c.start.column>this.column)){var d=this.row,e=this.column,f=c.start,g=c.end;"insertText"===b.action?f.row===d&&f.column<=e?f.column===e&&this.$insertRight||(f.row===g.row?e+=g.column-f.column:(e-=f.column,d+=g.row-f.row)):f.row!==g.row&&f.row<d&&(d+=g.row-f.row):"insertLines"===b.action?f.row<=d&&(d+=g.row-f.row):"removeText"===b.action?f.row===d&&f.column<e?e=g.column>=e?f.column:Math.max(0,e-(g.column-f.column)):f.row!==g.row&&f.row<d?(g.row===d&&(e=Math.max(0,e-g.column)+f.column),d-=g.row-f.row):g.row===d&&(d-=g.row-f.row,e=Math.max(0,e-g.column)+f.column):"removeLines"==b.action&&f.row<=d&&(g.row<=d?d-=g.row-f.row:(d=f.row,e=0)),this.setPosition(d,e,!0)}},this.setPosition=function(a,b,c){var d;if(d=c?{row:a,column:b}:this.$clipPositionToDocument(a,b),this.row!=d.row||this.column!=d.column){var e={row:this.row,column:this.column};this.row=d.row,this.column=d.column,this._emit("change",{old:e,value:d})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(a,b){var c={};return a>=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):0>a?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,b))),0>b&&(c.column=0),c}}).call(e.prototype)}),define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b){var c=a("./lib/oop"),d=a("./lib/event_emitter").EventEmitter,e=function(a){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=a;var b=this;this.$worker=function(){if(b.running){for(var a=new Date,c=b.currentLine,d=-1,e=b.doc;b.lines[c];)c++;var f=c,g=e.getLength(),h=0;for(b.running=!1;g>c;){b.$tokenizeRow(c),d=c;do c++;while(b.lines[c]);if(h++,h%5==0&&new Date-a>20)return b.running=setTimeout(b.$worker,20),b.currentLine=c,void 0}b.currentLine=c,d>=f&&b.fireUpdateEvent(f,d)}}};(function(){c.implement(this,d),this.setTokenizer=function(a){this.tokenizer=a,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(a){this.doc=a,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(a,b){var c={first:a,last:b};this._emit("update",{data:c})},this.start=function(a){this.currentLine=Math.min(a||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(a){var b=a.range,c=b.start.row,d=b.end.row-c;if(0===d)this.lines[c]=null;else if("removeText"==a.action||"removeLines"==a.action)this.lines.splice(c,d+1,null),this.states.splice(c,d+1,null);else{var e=Array(d+1);e.unshift(c,1),this.lines.splice.apply(this.lines,e),this.states.splice.apply(this.states,e)}this.currentLine=Math.min(c,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(a){return this.lines[a]||this.$tokenizeRow(a)},this.getState=function(a){return this.currentLine==a&&this.$tokenizeRow(a),this.states[a]||"start"},this.$tokenizeRow=function(a){var b=this.doc.getLine(a),c=this.states[a-1],d=this.tokenizer.getLineTokens(b,c,a);return this.states[a]+""!=d.state+""?(this.states[a]=d.state,this.lines[a+1]=null,this.currentLine>a+1&&(this.currentLine=a+1)):this.currentLine==a&&(this.currentLine=a+1),this.lines[a]=d.tokens}}).call(e.prototype),b.BackgroundTokenizer=e}),define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(a,b){var c=a("./lib/lang"),d=(a("./lib/oop"),a("./range").Range),e=function(a,b,c){this.setRegexp(a),this.clazz=b,this.type=c||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(a){this.regExp+""!=a+""&&(this.regExp=a,this.cache=[])},this.update=function(a,b,e,f){if(this.regExp)for(var g=f.firstRow,h=f.lastRow,i=g;h>=i;i++){var j=this.cache[i];null==j&&(j=c.getMatchOffsets(e.getLine(i),this.regExp),j.length>this.MAX_RANGES&&(j=j.slice(0,this.MAX_RANGES)),j=j.map(function(a){return new d(i,a.offset,i,a.offset+a.length)}),this.cache[i]=j.length?j:"");for(var k=j.length;k--;)b.drawSingleLineMarker(a,j[k].toScreenRange(e),this.clazz,f)}}}).call(e.prototype),b.SearchHighlight=e}),define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(a,b){function c(){this.getFoldAt=function(a,b,c){var d=this.getFoldLine(a);if(!d)return null;for(var e=d.folds,f=0;f<e.length;f++){var g=e[f];if(g.range.contains(a,b)){if(1==c&&g.range.isEnd(a,b))continue;if(-1==c&&g.range.isStart(a,b))continue;return g}}},this.getFoldsInRange=function(a){var b=a.start,c=a.end,d=this.$foldData,e=[];b.column+=1,c.column-=1;for(var f=0;f<d.length;f++){var g=d[f].range.compareRange(a);if(2!=g){if(-2==g)break;for(var h=d[f].folds,i=0;i<h.length;i++){var j=h[i];if(g=j.range.compareRange(a),-2==g)break;if(2!=g){if(42==g)break;e.push(j)}}}}return b.column-=1,c.column+=1,e},this.getAllFolds=function(){function a(a){b.push(a)}for(var b=[],c=this.$foldData,d=0;d<c.length;d++)for(var e=0;e<c[d].folds.length;e++)a(c[d].folds[e]);return b},this.getFoldStringAt=function(a,b,c,d){if(d=d||this.getFoldLine(a),!d)return null;for(var e,f,g={end:{column:0}},h=0;h<d.folds.length;h++){f=d.folds[h];var i=f.range.compareEnd(a,b);if(-1==i){e=this.getLine(f.start.row).substring(g.end.column,f.start.column);break}if(0===i)return null;g=f}return e||(e=this.getLine(f.start.row).substring(g.end.column)),-1==c?e.substring(0,b-g.end.column):1==c?e.substring(b-g.end.column):e},this.getFoldLine=function(a,b){var c=this.$foldData,d=0;for(b&&(d=c.indexOf(b)),-1==d&&(d=0),d;d<c.length;d++){var e=c[d];if(e.start.row<=a&&e.end.row>=a)return e;if(e.end.row>a)return null}return null},this.getNextFoldLine=function(a,b){var c=this.$foldData,d=0;for(b&&(d=c.indexOf(b)),-1==d&&(d=0),d;d<c.length;d++){var e=c[d];if(e.end.row>=a)return e}return null},this.getFoldedRowCount=function(a,b){for(var c=this.$foldData,d=b-a+1,e=0;e<c.length;e++){var f=c[e],g=f.end.row,h=f.start.row;if(g>=b){b>h&&(h>=a?d-=b-h:d=0);break}g>=a&&(d-=h>=a?g-h:g-a+1)}return d},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(a,b){return a.start.row-b.start.row}),a},this.addFold=function(a,b){var c,d=this.$foldData,g=!1;a instanceof f?c=a:(c=new f(b,a),c.collapseChildren=b.collapseChildren),this.$clipRangeToDocument(c.range);var h=c.start.row,i=c.start.column,j=c.end.row,k=c.end.column;if(!(j>h||h==j&&k-2>=i))throw new Error("The range has to be at least 2 characters width");var l=this.getFoldAt(h,i,1),m=this.getFoldAt(j,k,-1);if(l&&m==l)return l.addSubFold(c);if(l&&!l.range.isStart(h,i)||m&&!m.range.isEnd(j,k))throw new Error("A fold can't intersect already existing fold"+c.range+l.range);var n=this.getFoldsInRange(c.range);n.length>0&&(this.removeFolds(n),n.forEach(function(a){c.addSubFold(a)}));for(var o=0;o<d.length;o++){var p=d[o];if(j==p.start.row){p.addFold(c),g=!0;break}if(h==p.end.row){if(p.addFold(c),g=!0,!c.sameRow){var q=d[o+1];if(q&&q.start.row==j){p.merge(q);break}}break}if(j<=p.start.row)break}return g||(p=this.$addFoldLine(new e(this.$foldData,c))),this.$useWrapMode?this.$updateWrapData(p.start.row,p.start.row):this.$updateRowLengthCache(p.start.row,p.start.row),this.$modified=!0,this._emit("changeFold",{data:c,action:"add"}),c},this.addFolds=function(a){a.forEach(function(a){this.addFold(a)},this)},this.removeFold=function(a){var b=a.foldLine,c=b.start.row,d=b.end.row,e=this.$foldData,f=b.folds;if(1==f.length)e.splice(e.indexOf(b),1);else if(b.range.isEnd(a.end.row,a.end.column))f.pop(),b.end.row=f[f.length-1].end.row,b.end.column=f[f.length-1].end.column;else if(b.range.isStart(a.start.row,a.start.column))f.shift(),b.start.row=f[0].start.row,b.start.column=f[0].start.column;else if(a.sameRow)f.splice(f.indexOf(a),1);else{var g=b.split(a.start.row,a.start.column);f=g.folds,f.shift(),g.start.row=f[0].start.row,g.start.column=f[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(c,d):this.$updateRowLengthCache(c,d)),this.$modified=!0,this._emit("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c]);b.forEach(function(a){this.removeFold(a)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(b){a.restoreRange(b),this.addFold(b)},this),a.collapseChildren>0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(a){this.expandFold(a)},this)},this.unfold=function(a,b){var c,e;if(null==a?(c=new d(0,0,this.getLength(),0),b=!0):c="number"==typeof a?new d(a,0,a,this.getLine(a).length):"row"in a?d.fromPoints(a,a):a,e=this.getFoldsInRange(c),b)this.removeFolds(e);else for(;e.length;)this.expandFolds(e),e=this.getFoldsInRange(c)},this.isRowFolded=function(a,b){return!!this.getFoldLine(a,b)},this.getRowFoldEnd=function(a,b){var c=this.getFoldLine(a,b);return c?c.end.row:a},this.getRowFoldStart=function(a,b){var c=this.getFoldLine(a,b);return c?c.start.row:a},this.getFoldDisplayLine=function(a,b,c,d,e){null==d&&(d=a.start.row,e=0),null==b&&(b=a.end.row,c=this.getLine(b).length);var f=this.doc,g="";return a.walk(function(a,b,c,h){if(!(d>b)){if(b==d){if(e>c)return;h=Math.max(e,h)}g+=null!=a?a:f.getLine(b).substring(h,c)}},b,c),g},this.getDisplayLine=function(a,b,c,d){var e=this.getFoldLine(a);if(e)return this.getFoldDisplayLine(e,a,b,c,d);var f;return f=this.doc.getLine(a),f.substring(d||0,b||f.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(b){var c=b.folds.map(function(a){return a.clone()});return new e(a,c)})},this.toggleFold=function(a){var b,c,d=this.selection,e=d.getRange();if(e.isEmpty()){var f=e.start;if(b=this.getFoldAt(f.row,f.column))return this.expandFold(b),void 0;(c=this.findMatchingBracket(f))?1==e.comparePoint(c)?e.end=c:(e.start=c,e.start.column++,e.end.column--):(c=this.findMatchingBracket({row:f.row,column:f.column+1}))?(1==e.comparePoint(c)?e.end=c:e.start=c,e.start.column++):e=this.getCommentFoldRange(f.row,f.column)||e}else{var g=this.getFoldsInRange(e);if(a&&g.length)return this.expandFolds(g),void 0;1==g.length&&(b=g[0])}if(b||(b=this.getFoldAt(e.start.row,e.start.column)),b&&b.range.toString()==e.toString())return this.expandFold(b),void 0;var h="...";if(!e.isMultiLine()){if(h=this.getTextRange(e),h.length<4)return;h=h.trim().substring(0,2)+".."}this.addFold(h,e)},this.getCommentFoldRange=function(a,b,c){var e=new g(this,a,b),f=e.getCurrentToken();if(f&&/^comment|string/.test(f.type)){var h=new d,i=new RegExp(f.type.replace(/\..*/,"\\."));if(1!=c){do f=e.stepBackward();while(f&&i.test(f.type));e.stepForward()}if(h.start.row=e.getCurrentTokenRow(),h.start.column=e.getCurrentTokenColumn()+2,e=new g(this,a,b),-1!=c){do f=e.stepForward();while(f&&i.test(f.type));f=e.stepBackward()}else f=e.getCurrentToken();return h.end.row=e.getCurrentTokenRow(),h.end.column=e.getCurrentTokenColumn()+f.value.length-2,h}},this.foldAll=function(a,b,c){void 0==c&&(c=1e5);var d=this.foldWidgets;b=b||this.getLength(),a=a||0;for(var e=a;b>e;e++)if(null==d[e]&&(d[e]=this.getFoldWidget(e)),"start"==d[e]){var f=this.getFoldWidgetRange(e),g=f.end.row;if(f&&f.isMultiLine()&&b>=g&&f.start.row>=a)try{var h=this.addFold("...",f);h.collapseChildren=c,e=g}catch(i){}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,"manual"==a&&this.unfold();var b=this.$foldMode;this.$setFolding(null),this.$setFolding(b)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.removeListener("change",this.$updateFoldWidgets),this._emit("changeAnnotation"),!a||"manual"==this.$foldStyle)return this.foldWidgets=null,void 0;this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets)}},this.getParentFoldRangeData=function(a,b){var c=this.foldWidgets;if(!c||b&&c[a])return{};for(var d,e=a-1;e>=0;){var f=c[e];if(null==f&&(f=c[e]=this.getFoldWidget(e)),"start"==f){var g=this.getFoldWidgetRange(e);if(d||(d=g),g&&g.end.row>=a)break}e--}return{range:-1!==e&&g,firstRange:d}},this.onFoldWidgetClick=function(a,b){var c=this.getFoldWidget(a),d=this.getLine(a);b=b.domEvent;var e=b.shiftKey,f=b.ctrlKey||b.metaKey,g=b.altKey,h="end"===c?-1:1,i=this.getFoldAt(a,-1===h?0:d.length,h);if(i)return e||f?this.removeFold(i):this.expandFold(i),void 0;var j=this.getFoldWidgetRange(a);if(j&&!j.isMultiLine()&&(i=this.getFoldAt(j.start.row,j.start.column,1),i&&j.isEqual(i.range)))return this.removeFold(i),void 0;if(g){var k=this.getParentFoldRangeData(a);if(k.range)var l=k.range.start.row+1,m=k.range.end.row;this.foldAll(l,m,f?1e4:0)}else if(e){var m=j?j.end.row:this.getLength();this.foldAll(a+1,j.end.row,f?1e4:0)}else j&&(f&&(j.collapseChildren=1e4),this.addFold("...",j));j||((b.target||b.srcElement).className+=" ace_invalid")},this.updateFoldWidgets=function(a){var b=a.data,c=b.range,d=c.start.row,e=c.end.row-d;if(0===e)this.foldWidgets[d]=null;else if("removeText"==b.action||"removeLines"==b.action)this.foldWidgets.splice(d,e+1,null);else{var f=Array(e+1);f.unshift(d,1),this.foldWidgets.splice.apply(this.foldWidgets,f)}}}var d=a("../range").Range,e=a("./fold_line").FoldLine,f=a("./fold").Fold,g=a("../token_iterator").TokenIterator;b.Folding=c}),define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(a,b){function c(a,b){this.foldData=a,Array.isArray(b)?this.folds=b:b=this.folds=[b];var c=b[b.length-1];this.range=new d(b[0].start.row,b[0].start.column,c.end.row,c.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}var d=a("../range").Range;(function(){this.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(b){b.start.row+=a,b.end.row+=a})},this.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(a,b){return-a.range.compareEnd(b.start.row,b.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else{if(a.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column}a.foldLine=this},this.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},this.walk=function(a,b,c){var d,e,f,g=0,h=this.folds,i=!0;null==b&&(b=this.end.row,c=this.end.column);for(var j=0;j<h.length;j++){if(d=h[j],e=d.range.compareStart(b,c),-1==e)return a(null,b,c,g,i),void 0;if(f=a(null,d.start.row,d.start.column,g,i),f=!f&&a(d.placeholder,d.start.row,d.start.column,g),f||0==e)return;i=!d.sameRow,g=d.end.column}a(null,b,c,g,i)},this.getNextFoldTo=function(a,b){for(var c,d,e=0;e<this.folds.length;e++){if(c=this.folds[e],d=c.range.compareEnd(a,b),-1==d)return{fold:c,kind:"after"};if(0==d)return{fold:c,kind:"inside"}}return null},this.addRemoveChars=function(a,b,c){var d,e,f=this.getNextFoldTo(a,b);if(f)if(d=f.fold,"inside"==f.kind&&d.start.column!=b&&d.start.row!=a)window.console&&window.console.log(a,b,d);else if(d.start.row==a){e=this.folds;var g=e.indexOf(d);for(0==g&&(this.start.column+=c),g;g<e.length;g++){if(d=e[g],d.start.column+=c,!d.sameRow)return;d.end.column+=c}this.end.column+=c}},this.split=function(a,b){var d=this.getNextFoldTo(a,b).fold,e=this.folds,f=this.foldData;if(!d)return null;var g=e.indexOf(d),h=e[g-1];this.end.row=h.end.row,this.end.column=h.end.column,e=e.splice(g,e.length-g);var i=new c(f,e);return f.splice(f.indexOf(this)+1,0,i),i},this.merge=function(a){for(var b=a.folds,c=0;c<b.length;c++)this.addFold(b[c]);var d=this.foldData;d.splice(d.indexOf(a),1)},this.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(b){a.push(" "+b.toString())}),a.push("]"),a.join("\n")},this.idxToPosition=function(a){for(var b,c=0,d=0;d<this.folds.length;d++){var b=this.folds[d];if(a-=b.start.column-c,0>a)return{row:b.start.row,column:b.start.column+a};if(a-=b.placeholder.length,0>a)return b.start;c=b.end.column}return{row:this.end.row,column:this.end.column+a}}}).call(c.prototype),b.FoldLine=c}),define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(a,b){function c(a,b){a.row-=b.row,0==a.row&&(a.column-=b.column)}function d(a,b){c(a.start,b),c(a.end,b)}function e(a,b){0==a.row&&(a.column+=b.column),a.row+=b.row}function f(a,b){e(a.start,b),e(a.end,b)}var g=(a("../range").Range,a("../range_list").RangeList),h=a("../lib/oop"),i=b.Fold=function(a,b){this.foldLine=null,this.placeholder=b,this.range=a,this.start=a.start,this.end=a.end,this.sameRow=a.start.row==a.end.row,this.subFolds=this.ranges=[]};h.inherits(i,g),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(a){this.foldLine=a,this.subFolds.forEach(function(b){b.setFoldLine(a)})},this.clone=function(){var a=this.range.clone(),b=new i(a,this.placeholder);return this.subFolds.forEach(function(a){b.subFolds.push(a.clone())}),b.collapseChildren=this.collapseChildren,b},this.addSubFold=function(a){if(!this.range.isEqual(a)){if(!this.range.containsRange(a))throw new Error("A fold can't intersect already existing fold"+a.range+this.range);d(a,this.start);for(var b=a.start.row,c=a.start.column,e=0,f=-1;e<this.subFolds.length&&(f=this.subFolds[e].range.compare(b,c),1==f);e++);var g=this.subFolds[e];if(0==f)return g.addSubFold(a);for(var b=a.range.end.row,c=a.range.end.column,h=e,f=-1;h<this.subFolds.length&&(f=this.subFolds[h].range.compare(b,c),1==f);h++);{this.subFolds[h]}if(0==f)throw new Error("A fold can't intersect already existing fold"+a.range+this.range);{this.subFolds.splice(e,h-e,a)}return a.setFoldLine(this.foldLine),a}},this.restoreRange=function(a){return f(a,this.start)}}.call(i.prototype)}),define("ace/range_list",["require","exports","module","ace/range"],function(a,b){var c=a("./range").Range,d=c.comparePoints,e=function(){this.ranges=[]};(function(){this.comparePoints=d,this.pointIndex=function(a,b,c){for(var e=this.ranges,f=c||0;f<e.length;f++){var g=e[f],h=d(a,g.end);if(!(h>0)){var i=d(a,g.start);return 0===h?b&&0!==i?-f-2:f:i>0||0===i&&!b?f:-f-1}}return-f-1},this.add=function(a){var b=!a.isEmpty(),c=this.pointIndex(a.start,b);0>c&&(c=-c-1);var d=this.pointIndex(a.end,b,c);return 0>d?d=-d-1:d++,this.ranges.splice(c,d-c,a)},this.addList=function(a){for(var b=[],c=a.length;c--;)b.push.call(b,this.add(a[c]));return b},this.substractPoint=function(a){var b=this.pointIndex(a);return b>=0?this.ranges.splice(b,1):void 0},this.merge=function(){var a=[],b=this.ranges;b=b.sort(function(a,b){return d(a.start,b.start)});for(var c,e=b[0],f=1;f<b.length;f++){c=e,e=b[f];var g=d(c.end,e.start);0>g||(0!=g||c.isEmpty()||e.isEmpty())&&(d(c.end,e.end)<0&&(c.end.row=e.end.row,c.end.column=e.end.column),b.splice(f,1),a.push(e),e=c,f--)}return this.ranges=b,a},this.contains=function(a,b){return this.pointIndex({row:a,column:b})>=0},this.containsPoint=function(a){return this.pointIndex(a)>=0},this.rangeAtPoint=function(a){var b=this.pointIndex(a);return b>=0?this.ranges[b]:void 0},this.clipRows=function(a,b){var c=this.ranges;if(c[0].start.row>b||c[c.length-1].start.row<a)return[];var d=this.pointIndex({row:a,column:0});0>d&&(d=-d-1);var e=this.pointIndex({row:b,column:0},d);0>e&&(e=-e-1);for(var f=[],g=d;e>g;g++)f.push(c[g]);return f},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(a){this.session&&this.detach(),this.session=a,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(a){var b=a.data.range;if("i"==a.data.action[0])var c=b.start,d=b.end;else var d=b.start,c=b.end;for(var e=c.row,f=d.row,g=f-e,h=-c.column+d.column,i=this.ranges,j=0,k=i.length;k>j;j++){var l=i[j];if(!(l.end.row<e)){if(l.start.row>e)break;if(l.start.row==e&&l.start.column>=c.column&&(l.start.column==c.column&&this.$insertRight||(l.start.column+=h,l.start.row+=g)),l.end.row==e&&l.end.column>=c.column){if(l.end.column==c.column&&this.$insertRight)continue;l.end.column==c.column&&h>0&&k-1>j&&l.end.column>l.start.column&&l.end.column==i[j+1].start.column&&(l.end.column-=h),l.end.column+=h,l.end.row+=g}}}if(0!=g&&k>j)for(;k>j;j++){var l=i[j];l.start.row+=g,l.end.row+=g}}}).call(e.prototype),b.RangeList=e}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(a,b){function c(){this.findMatchingBracket=function(a,b){if(0==a.column)return null;var c=b||this.getLine(a.row).charAt(a.column-1);if(""==c)return null;var d=c.match(/([\(\[\{])|([\)\]\}])/);return d?d[1]?this.$findClosingBracket(d[1],a):this.$findOpeningBracket(d[2],a):null},this.getBracketRange=function(a){var b,c=this.getLine(a.row),d=!0,f=c.charAt(a.column-1),g=f&&f.match(/([\(\[\{])|([\)\]\}])/);if(g||(f=c.charAt(a.column),a={row:a.row,column:a.column+1},g=f&&f.match(/([\(\[\{])|([\)\]\}])/),d=!1),!g)return null;if(g[1]){var h=this.$findClosingBracket(g[1],a);if(!h)return null;b=e.fromPoints(a,h),d||(b.end.column++,b.start.column--),b.cursor=b.end}else{var h=this.$findOpeningBracket(g[2],a);if(!h)return null;b=e.fromPoints(h,a),d||(b.start.column++,b.end.column--),b.cursor=b.start}return b},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(a,b,c){var e=this.$brackets[a],f=1,g=new d(this,b.row,b.column),h=g.getCurrentToken();if(h||(h=g.stepForward()),h){c||(c=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("rparen",".paren")+")+"));for(var i=b.column-g.getCurrentTokenColumn()-2,j=h.value;;){for(;i>=0;){var k=j.charAt(i);if(k==e){if(f-=1,0==f)return{row:g.getCurrentTokenRow(),column:i+g.getCurrentTokenColumn()}}else k==a&&(f+=1);i-=1}do h=g.stepBackward();while(h&&!c.test(h.type));if(null==h)break;j=h.value,i=j.length-1}return null}},this.$findClosingBracket=function(a,b,c){var e=this.$brackets[a],f=1,g=new d(this,b.row,b.column),h=g.getCurrentToken();if(h||(h=g.stepForward()),h){c||(c=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("lparen",".paren")+")+"));for(var i=b.column-g.getCurrentTokenColumn();;){for(var j=h.value,k=j.length;k>i;){var l=j.charAt(i);if(l==e){if(f-=1,0==f)return{row:g.getCurrentTokenRow(),column:i+g.getCurrentTokenColumn()}}else l==a&&(f+=1);i+=1}do h=g.stepForward();while(h&&!c.test(h.type));if(null==h)break;i=0}return null}}}var d=a("../token_iterator").TokenIterator,e=a("../range").Range;b.BracketMatch=c}),define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(a,b){var c=a("./lib/lang"),d=a("./lib/oop"),e=a("./range").Range,f=function(){this.$options={}};(function(){this.set=function(a){return d.mixin(this.$options,a),this},this.getOptions=function(){return c.copyObject(this.$options)},this.setOptions=function(a){this.$options=a
-},this.find=function(a){var b=this.$matchIterator(a,this.$options);if(!b)return!1;var c=null;return b.forEach(function(a,b,d){if(a.start)c=a;else{var f=a.offset+(d||0);c=new e(b,f,b,f+a.length)}return!0}),c},this.findAll=function(a){var b=this.$options;if(!b.needle)return[];this.$assembleRegExp(b);var d=b.range,f=d?a.getLines(d.start.row,d.end.row):a.doc.getAllLines(),g=[],h=b.re;if(b.$isMultiLine)for(var i=h.length,j=f.length-i,k=h.offset||0;j>=k;k++){for(var l=0;i>l&&-1!=f[k+l].search(h[l]);l++);var m=f[k],n=f[k+i-1],o=m.match(h[0])[0].length,p=n.match(h[i-1])[0].length;g.push(new e(k,m.length-o,k+i-1,p))}else for(var q=0;q<f.length;q++)for(var r=c.getMatchOffsets(f[q],h),l=0;l<r.length;l++){var s=r[l];g.push(new e(q,s.offset,q,s.offset+s.length))}if(d){for(var t=d.start.column,u=d.start.column,q=0,l=g.length-1;l>q&&g[q].start.column<t&&g[q].start.row==d.start.row;)q++;for(;l>q&&g[l].end.column>u&&g[l].end.row==d.end.row;)l--;for(g=g.slice(q,l+1),q=0,l=g.length;l>q;q++)g[q].start.row+=d.start.row,g[q].end.row+=d.start.row}return g},this.replace=function(a,b){var c=this.$options,d=this.$assembleRegExp(c);if(c.$isMultiLine)return b;if(d){var e=d.exec(a);if(!e||e[0].length!=a.length)return null;if(b=a.replace(d,b),c.preserveCase){b=b.split("");for(var f=Math.min(a.length,a.length);f--;){var g=a[f];b[f]=g&&g.toLowerCase()!=g?b[f].toUpperCase():b[f].toLowerCase()}b=b.join("")}return b}},this.$matchIterator=function(a,b){var d=this.$assembleRegExp(b);if(!d)return!1;var f,g=this,h=b.backwards;if(b.$isMultiLine)var i=d.length,j=function(b,c,g){var h=b.search(d[0]);if(-1!=h){for(var j=1;i>j;j++)if(b=a.getLine(c+j),-1==b.search(d[j]))return;var k=b.match(d[i-1])[0].length,l=new e(c,h,c+i-1,k);return 1==d.offset?(l.start.row--,l.start.column=Number.MAX_VALUE):g&&(l.start.column+=g),f(l)?!0:void 0}};else if(h)var j=function(a,b,e){for(var g=c.getMatchOffsets(a,d),h=g.length-1;h>=0;h--)if(f(g[h],b,e))return!0};else var j=function(a,b,e){for(var g=c.getMatchOffsets(a,d),h=0;h<g.length;h++)if(f(g[h],b,e))return!0};return{forEach:function(c){f=c,g.$lineIterator(a,b).forEach(j)}}},this.$assembleRegExp=function(a,b){if(a.needle instanceof RegExp)return a.re=a.needle;var d=a.needle;if(!a.needle)return a.re=!1;a.regExp||(d=c.escapeRegExp(d)),a.wholeWord&&(d="\\b"+d+"\\b");var e=a.caseSensitive?"g":"gi";if(a.$isMultiLine=!b&&/[\n\r]/.test(d),a.$isMultiLine)return a.re=this.$assembleMultilineRegExp(d,e);try{var f=new RegExp(d,e)}catch(g){f=!1}return a.re=f},this.$assembleMultilineRegExp=function(a,b){for(var c=a.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),d=[],e=0;e<c.length;e++)try{d.push(new RegExp(c[e],b))}catch(f){return!1}return""==c[0]?(d.shift(),d.offset=1):d.offset=0,d},this.$lineIterator=function(a,b){var c=1==b.backwards,d=0!=b.skipCurrent,e=b.range,f=b.start;f||(f=e?e[c?"end":"start"]:a.selection.getRange()),f.start&&(f=f[d!=c?"end":"start"]);var g=e?e.start.row:0,h=e?e.end.row:a.getLength()-1,i=c?function(c){var d=f.row,e=a.getLine(d).substring(0,f.column);if(!c(e,d)){for(d--;d>=g;d--)if(c(a.getLine(d),d))return;if(0!=b.wrap)for(d=h,g=f.row;d>=g;d--)if(c(a.getLine(d),d))return}}:function(c){var d=f.row,e=a.getLine(d).substr(f.column);if(!c(e,d,f.column)){for(d+=1;h>=d;d++)if(c(a.getLine(d),d))return;if(0!=b.wrap)for(d=g,h=f.row;h>=d;d++)if(c(a.getLine(d),d))return}};return{forEach:i}}}).call(f.prototype),b.Search=f}),define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(a,b){var c=a("../lib/oop"),d=a("../keyboard/hash_handler").HashHandler,e=a("../lib/event_emitter").EventEmitter,f=function(a,b){d.call(this,b,a),this.byName=this.commands,this.setDefaultHandler("exec",function(a){return a.command.exec(a.editor,a.args||{})})};c.inherits(f,d),function(){c.implement(this,e),this.exec=function(a,b,c){if("string"==typeof a&&(a=this.commands[a]),!a)return!1;if(b&&b.$readOnly&&!a.readOnly)return!1;var d={editor:b,command:a,args:c},e=this._emit("exec",d);return this._signal("afterExec",d),e===!1?!1:!0},this.toggleRecording=function(a){return this.$inReplay?void 0:(a&&a._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(a){this.macro.push([a.command,a.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0))},this.replay=function(a){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(a);try{this.$inReplay=!0,this.macro.forEach(function(b){"string"==typeof b?this.exec(b,a):this.exec(b[0],a,b[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(a){return a.map(function(a){return"string"!=typeof a[0]&&(a[0]=a[0].name),a[1]||(a=a[0]),a})}}.call(f.prototype),b.CommandManager=f}),define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(a,b){function c(a,b){if(this.platform=b||(e.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.__defineGetter__&&this.__defineSetter__&&"undefined"!=typeof console&&console.error){var c=!1,d=function(){c||(c=!0,console.error("commmandKeyBinding has too many m's. use commandKeyBinding"))};this.__defineGetter__("commmandKeyBinding",function(){return d(),this.commandKeyBinding}),this.__defineSetter__("commmandKeyBinding",function(a){return d(),this.commandKeyBinding=a})}else this.commmandKeyBinding=this.commandKeyBinding;this.addCommands(a)}var d=a("../lib/keys"),e=a("../lib/useragent");(function(){this.addCommand=function(a){this.commands[a.name]&&this.removeCommand(a),this.commands[a.name]=a,a.bindKey&&this._buildKeyHash(a)},this.removeCommand=function(a){var b="string"==typeof a?a:a.name;a=this.commands[b],delete this.commands[b];var c=this.commandKeyBinding;for(var d in c)for(var e in c[d])c[d][e]==a&&delete c[d][e]},this.bindKey=function(a,b){if(a){if("function"==typeof b)return this.addCommand({exec:b,bindKey:a,name:b.name||a}),void 0;var c=this.commandKeyBinding;a.split("|").forEach(function(a){var d=this.parseKeys(a,b),e=d.hashId;(c[e]||(c[e]={}))[d.key]=b},this)}},this.addCommands=function(a){a&&Object.keys(a).forEach(function(b){var c=a[b];if(c){if("string"==typeof c)return this.bindKey(c,b);"function"==typeof c&&(c={exec:c}),c.name||(c.name=b),this.addCommand(c)}},this)},this.removeCommands=function(a){Object.keys(a).forEach(function(b){this.removeCommand(a[b])},this)},this.bindKeys=function(a){Object.keys(a).forEach(function(b){this.bindKey(b,a[b])},this)},this._buildKeyHash=function(a){var b=a.bindKey;if(b){var c="string"==typeof b?b:b[this.platform];this.bindKey(c,a)}},this.parseKeys=function(a){-1!=a.indexOf(" ")&&(a=a.split(/\s+/).pop());var b=a.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(a){return a}),c=b.pop(),e=d[c];if(d.FUNCTION_KEYS[e])c=d.FUNCTION_KEYS[e].toLowerCase();else{if(!b.length)return{key:c,hashId:-1};if(1==b.length&&"shift"==b[0])return{key:c.toUpperCase(),hashId:-1}}for(var f=0,g=b.length;g--;){var h=d.KEY_MODS[b[g]];if(null==h)return"undefined"!=typeof console&&console.error("invalid modifier "+b[g]+" in "+a),!1;f|=h}return{key:c,hashId:f}},this.findKeyCommand=function(a,b){var c=this.commandKeyBinding;return c[a]&&c[a][b]},this.handleKeyboard=function(a,b,c){return{command:this.findKeyCommand(b,c)}}}).call(c.prototype),b.HashHandler=c}),define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config"],function(a,b){function c(a,b){return{win:a,mac:b}}var d=a("../lib/lang"),e=a("../config");b.commands=[{name:"showSettingsMenu",bindKey:c("Ctrl-,","Command-,"),exec:function(a){e.loadModule("ace/ext/settings_menu",function(b){b.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"selectall",bindKey:c("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",bindKey:c(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:c("Ctrl-L","Command-L"),exec:function(a){var b=parseInt(prompt("Enter line number:"),10);isNaN(b)||a.gotoLine(b)},readOnly:!0},{name:"fold",bindKey:c("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(a){a.session.toggleFold(!1)},readOnly:!0},{name:"unfold",bindKey:c("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(a){a.session.toggleFold(!0)},readOnly:!0},{name:"foldall",bindKey:c("Alt-0","Command-Option-0"),exec:function(a){a.session.foldAll()},readOnly:!0},{name:"unfoldall",bindKey:c("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},readOnly:!0},{name:"findnext",bindKey:c("Ctrl-K","Command-G"),exec:function(a){a.findNext()},readOnly:!0},{name:"findprevious",bindKey:c("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},readOnly:!0},{name:"find",bindKey:c("Ctrl-F","Command-F"),exec:function(a){e.loadModule("ace/ext/searchbox",function(b){b.Search(a)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:c("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(a){a.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"gotostart",bindKey:c("Ctrl-Home","Command-Home|Command-Up"),exec:function(a){a.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"selectup",bindKey:c("Shift-Up","Shift-Up"),exec:function(a){a.getSelection().selectUp()},multiSelectAction:"forEach",readOnly:!0},{name:"golineup",bindKey:c("Up","Up|Ctrl-P"),exec:function(a,b){a.navigateUp(b.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selecttoend",bindKey:c("Ctrl-Shift-End","Command-Shift-Down"),exec:function(a){a.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"gotoend",bindKey:c("Ctrl-End","Command-End|Command-Down"),exec:function(a){a.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"selectdown",bindKey:c("Shift-Down","Shift-Down"),exec:function(a){a.getSelection().selectDown()},multiSelectAction:"forEach",readOnly:!0},{name:"golinedown",bindKey:c("Down","Down|Ctrl-N"),exec:function(a,b){a.navigateDown(b.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectwordleft",bindKey:c("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"gotowordleft",bindKey:c("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttolinestart",bindKey:c("Alt-Shift-Left","Command-Shift-Left"),exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"gotolinestart",bindKey:c("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a){a.navigateLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"selectleft",bindKey:c("Shift-Left","Shift-Left"),exec:function(a){a.getSelection().selectLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"gotoleft",bindKey:c("Left","Left|Ctrl-B"),exec:function(a,b){a.navigateLeft(b.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectwordright",bindKey:c("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},multiSelectAction:"forEach",readOnly:!0},{name:"gotowordright",bindKey:c("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttolineend",bindKey:c("Alt-Shift-Right","Command-Shift-Right"),exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"gotolineend",bindKey:c("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a){a.navigateLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"selectright",bindKey:c("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",readOnly:!0},{name:"gotoright",bindKey:c("Right","Right|Ctrl-F"),exec:function(a,b){a.navigateRight(b.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:c(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:c("PageDown","PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:c(null,"Option-PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:c("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:c("Ctrl-Down",null),exec:function(a){a.renderer.scrollBy(0,2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"togglerecording",bindKey:c("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",bindKey:c("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",bindKey:c("Ctrl-P","Ctrl-Shift-P"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttomatching",bindKey:c("Ctrl-Shift-P",null),exec:function(a){a.jumpToMatching(!0)},multiSelectAction:"forEach",readOnly:!0},{name:"cut",exec:function(a){var b=a.getSelectionRange();a._emit("cut",b),a.selection.isEmpty()||(a.session.remove(b),a.clearSelection())},multiSelectAction:"forEach"},{name:"removeline",bindKey:c("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:c("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},multiSelectAction:"forEach"},{name:"sortlines",bindKey:c("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:c("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine"},{name:"toggleBlockComment",bindKey:c("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach"},{name:"modifyNumberUp",bindKey:c("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:c("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},multiSelectAction:"forEach"},{name:"replace",bindKey:c("Ctrl-H","Command-Option-F"),exec:function(a){e.loadModule("ace/ext/searchbox",function(b){b.Search(a,!0)})}},{name:"undo",bindKey:c("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",bindKey:c("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",bindKey:c("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()}},{name:"movelinesup",bindKey:c("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()}},{name:"copylinesdown",bindKey:c("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()}},{name:"movelinesdown",bindKey:c("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()}},{name:"del",bindKey:c("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach"},{name:"backspace",bindKey:c("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")},multiSelectAction:"forEach"},{name:"cut_or_delete",bindKey:c("Shift-Delete",null),exec:function(a){return a.selection.isEmpty()?(a.remove("left"),void 0):!1},multiSelectAction:"forEach"},{name:"removetolinestart",bindKey:c("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach"},{name:"removetolineend",bindKey:c("Alt-Delete","Ctrl-K"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach"},{name:"removewordleft",bindKey:c("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach"},{name:"removewordright",bindKey:c("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach"},{name:"outdent",bindKey:c("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach"},{name:"indent",bindKey:c("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach"},{name:"blockoutdent",bindKey:c("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine"},{name:"blockindent",bindKey:c("Ctrl-]","Ctrl-]"),exec:function(a){a.blockIndent()},multiSelectAction:"forEachLine"},{name:"insertstring",exec:function(a,b){a.insert(b)},multiSelectAction:"forEach"},{name:"inserttext",exec:function(a,b){a.insert(d.stringRepeat(b.text||"",b.times||1))},multiSelectAction:"forEach"},{name:"splitline",bindKey:c(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach"},{name:"transposeletters",bindKey:c("Ctrl-T","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)}},{name:"touppercase",bindKey:c("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach"},{name:"tolowercase",bindKey:c("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach"}]}),define("ace/undomanager",["require","exports","module"],function(a,b){var c=function(){this.reset()};(function(){this.execute=function(a){var b=a.args[0];this.$doc=a.args[1],a.merge&&this.hasUndo()&&(b=this.$undoStack.pop().concat(b)),this.$undoStack.push(b),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=0/0),this.dirtyCounter++},this.undo=function(a){var b=this.$undoStack.pop(),c=null;return b&&(c=this.$doc.undoChanges(b,a),this.$redoStack.push(b),this.dirtyCounter--),c},this.redo=function(a){var b=this.$redoStack.pop(),c=null;return b&&(c=this.$doc.redoChanges(b,a),this.$undoStack.push(b),this.dirtyCounter++),c},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter}}).call(c.prototype),b.UndoManager=c}),define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/useragent","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/renderloop","ace/lib/event_emitter"],function(a,b){var c=a("./lib/oop"),d=a("./lib/dom"),e=(a("./lib/useragent"),a("./config")),f=a("./layer/gutter").Gutter,g=a("./layer/marker").Marker,h=a("./layer/text").Text,i=a("./layer/cursor").Cursor,j=a("./scrollbar").ScrollBarH,k=a("./scrollbar").ScrollBarV,l=a("./renderloop").RenderLoop,m=a("./lib/event_emitter").EventEmitter,n=".ace_editor {position: relative;overflow: hidden;font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;font-size: 12px;line-height: normal;color: black;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: text;}.ace_dragging, .ace_dragging * {cursor: move !important;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: '';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTQ4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTU4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBMjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBMzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkgXxbAAAAJbSURBVHjapFNNaBNBFH4zs5vdZLP5sQmNpT82QY209heh1ioWisaDRcSKF0WKJ0GQnrzrxasHsR6EnlrwD0TagxJabaVEpFYxLWlLSS822tr87m66ccfd2GKyVhA6MMybgfe97/vmPUQphd0sZjto9XIn9OOsvlu2nkqRzVU+6vvlzPf8W6bk8dxQ0NPbxAALgCgg2JkaQuhzQau/El0zbmUA7U0Es8v2CiYmKQJHGO1QICCLoqilMhkmurDAyapKgqItezi/USRdJqEYY4D5jCy03ht2yMkkvL91jTTX10qzyyu2hruPRN7jgbH+EOsXcMLgYiThEgAMhABW85oqy1DXdRIdvP1AHJ2acQXvDIrVHcdQNrEKNYSVMSZGMjEzIIAwDXIo+6G/FxcGnzkC3T2oMhLjre49sBB+RRcHLqdafK6sYdE/GGBwU1VpFNj0aN8pJbe+BkZyevUrvLl6Xmm0W9IuTc0DxrDNAJd5oEvI/KRsNC3bQyNjPO9yQ1YHcfj2QvfQc/5TUhJTBc2iM0U7AWDQtc1nJHvD/cfO2s7jaGkiTEfa/Ep8coLu7zmNmh8+dc5lZDuUeFAGUNA/OY6JVaypQ0vjr7XYjUvJM37vt+j1vuTK5DgVfVUoTjVe+y3/LxMxY2GgU+CSLy4cpfsYorRXuXIOi0Vt40h67uZFTdIo6nLaZcwUJWAzwNS0tBnqqKzQDnjdG/iPyZxo46HaKUpbvYkj8qYRTZsBhge+JHhZyh0x9b95JqjVJkT084kZIPwu/mPWqPgfQ5jXh2+92Ay7HedfAgwA6KDWafb4w3cAAAAASUVORK5CYII=\");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTg4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTk4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBNjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBNzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pgd7PfIAAAGmSURBVHjaYvr//z8DJZiJgUIANoCRkREb9gLiSVAaQx4OQM7AAkwd7XU2/v++/rOttdYGEB9dASEvOMydGKfH8Gv/p4XTkvRBfLxeQAP+1cUhXopyvzhP7P/IoSj7g7Mw09cNKO6J1QQ0L4gICPIv/veg/8W+JdFvQNLHVsW9/nmn9zk7B+cCkDwhL7gt6knSZnx9/LuCEOcvkIAMP+cvto9nfqyZmmUAksfnBUtbM60gX/3/kgyv3/xSFOL5DZT+L8vP+Yfh5cvfPvp/xUHyQHXGyAYwgpwBjZYFT3Y1OEl/OfCH4ffv3wzc4iwMvNIsDJ+f/mH4+vIPAxsb631WW0Yln6ZpQLXdMK/DXGDflh+sIv37EivD5x//Gb7+YWT4y86sl7BCCkSD+Z++/1dkvsFRl+HnD1Rvje4F8whjMXmGj58YGf5zsDMwcnAwfPvKcml62DsQDeaDxN+/Y0qwlpEHqrdB94IRNIDUgfgfKJChGK4OikEW3gTiXUB950ASLFAF54AC94A0G9QAfOnmF9DCDzABFqS08IHYDIScdijOjQABBgC+/9awBH96jwAAAABJRU5ErkJggg==\");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url(\"data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7\");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGRTk5MTVGREIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGRTk5MTVGRUIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZFOTkxNUZCQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFOTkxNUZDQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+SIDkjAAAAJ1JREFUeNpi/P//PwMlgImBQkB7A6qrq/+DMC55FkIGKCoq4pVnpFkgTp069f/+/fv/r1u37r+tre1/kg0A+ptn9uzZYLaRkRHpLvjw4cNXWVlZhufPnzOcO3eOdAO0tbVPAjHDmzdvGA4fPsxIsgGSkpJmv379Ynj37h2DjIyMCMkG3LhxQ/T27dsMampqDHZ2dq/pH41DxwCAAAMAFdc68dUsFZgAAAAASUVORK5CYII=\");}.ace_scrollbar {position: absolute;overflow-x: hidden;overflow-y: auto;right: 0;top: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-h {position: absolute;overflow-x: auto;overflow-y: hidden;right: 0;left: 0;bottom: 0;z-index: 6;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;}.ace_text-input.ace_composition {background: #f8f8f8;color: #111;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;white-space: nowrap;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;/* setting pointer-events: auto; on node under the mouse, which changesduring scroll, will break mouse wheel scrolling in Safari */pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0px;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-moz-transition: opacity 0.18s;-webkit-transition: opacity 0.18s;-o-transition: opacity 0.18s;-ms-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_cursor[style*=\"opacity: 0\"]{-ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_line {white-space: nowrap;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;-moz-border-radius: 2px;-webkit-border-radius: 2px;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;}.ace_gutter-tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;display: inline-block;max-width: 500px;padding: 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre-line;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82\");}.ace_fold-widget.ace_closed {background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82\");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}/*** Dark version for fold widgets*/.ace_dark .ace_fold-widget {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");}.ace_dark .ace_fold-widget.ace_end {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");}.ace_dark .ace_fold-widget.ace_closed {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-moz-transition: opacity 0.4s ease 0.05s;-webkit-transition: opacity 0.4s ease 0.05s;-o-transition: opacity 0.4s ease 0.05s;-ms-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-moz-transition: opacity 0.05s ease 0.05s;-webkit-transition: opacity 0.05s ease 0.05s;-o-transition: opacity 0.05s ease 0.05s;-ms-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}";
-d.importCssString(n,"ace_editor");var o=function(a,b){var c=this;this.container=a||d.createElement("div"),this.$keepTextAreaAtCursor=!0,d.addCssClass(this.container,"ace_editor"),this.setTheme(b),this.$gutter=d.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=d.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=d.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new f(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new g(this.content);var m=this.$textLayer=new h(this.content);this.canvas=m.element,this.$markerFront=new g(this.content),this.$cursorLayer=new i(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new k(this.container,this),this.scrollBarH=new j(this.container,this),this.scrollBarV.addEventListener("scroll",function(a){c.$scrollAnimation||c.session.setScrollTop(a.data-c.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(a){c.$scrollAnimation||c.session.setScrollLeft(a.data-c.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$textLayer.addEventListener("changeCharacterSize",function(){c.updateCharacterSize(),c.onResize(!0),c._signal("changeCharacterSize")}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new l(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),e.resetOptions(this),e._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,c.implement(this,m),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(a){this.session=a,this.scroller.className="ace_scroller",this.$cursorLayer.setSession(a),this.$markerBack.setSession(a),this.$markerFront.setSession(a),this.$gutterLayer.setSession(a),this.$textLayer.setSession(a),this.$loop.schedule(this.CHANGE_FULL)},this.updateLines=function(a,b){void 0===b&&(b=1/0),this.$changedLines?(this.$changedLines.firstRow>a&&(this.$changedLines.firstRow=a),this.$changedLines.lastRow<b&&(this.$changedLines.lastRow=b)):this.$changedLines={firstRow:a,lastRow:b},this.$changedLines.firstRow>this.layerConfig.lastRow||this.$changedLines.lastRow<this.layerConfig.firstRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(a){a?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.onResize=function(a,b,c,d){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=a?1:0;var e=this.container;d||(d=e.clientHeight||e.scrollHeight),c||(c=e.clientWidth||e.scrollWidth);var f=this.$updateCachedSize(a,b,c,d);if(!this.$size.scrollerHeight||!c&&!d)return this.resizing=0;a&&(this.$gutterLayer.$padding=null),a?this.$renderChanges(f,!0):this.$loop.schedule(f|this.$changes),this.resizing&&(this.resizing=0)}},this.$updateCachedSize=function(a,b,c,d){var e=0,f=this.$size,g={width:f.width,height:f.height,scrollerHeight:f.scrollerHeight,scrollerWidth:f.scrollerWidth};return d&&(a||f.height!=d)&&(f.height=d,e=this.CHANGE_SIZE,f.scrollerHeight=f.height,this.$horizScroll&&(f.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",this.session&&(this.session.setScrollTop(this.getScrollTop()),e|=this.CHANGE_SCROLL)),c&&(a||f.width!=c)&&(e=this.CHANGE_SIZE,f.width=c,null==b&&(b=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=b,this.scrollBarH.element.style.left=this.scroller.style.left=b+"px",f.scrollerWidth=Math.max(0,c-b-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||a)&&(e|=this.CHANGE_FULL)),e&&this._signal("resize",g),e},this.onGutterResize=function(){var a=this.$showGutter?this.$gutter.offsetWidth:0;a!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,a,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var a=this.$size.scrollerWidth-2*this.$padding,b=Math.floor(a/this.characterWidth);return this.session.adjustWrapLimit(b,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(a){this.setOption("animatedScroll",a)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(a){this.setOption("showInvisibles",a)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(a){this.setOption("displayIndentGuides",a)},this.setShowPrintMargin=function(a){this.setOption("showPrintMargin",a)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(a){this.setOption("printMarginColumn",a)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(a){return this.setOption("showGutter",a)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(a){this.setOption("fadeFoldWidgets",a)},this.setHighlightGutterLine=function(a){this.setOption("highlightGutterLine",a)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var a=this.$cursorLayer.$pixelPos,b=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var c=this.session.selection.getCursor();c.column=0,a=this.$cursorLayer.getPixelPosition(c,!0),b*=this.session.getRowLength(c.row)}this.$gutterLineHighlight.style.top=a.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=b+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var a=d.createElement("div");a.className="ace_layer ace_print-margin-layer",this.$printMarginEl=d.createElement("div"),this.$printMarginEl.className="ace_print-margin",a.appendChild(this.$printMarginEl),this.content.insertBefore(a,this.content.firstChild)}var b=this.$printMarginEl.style;b.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",b.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var a=this.layerConfig,b=this.$cursorLayer.$pixelPos.top,c=this.$cursorLayer.$pixelPos.left;b-=a.offset;var d=this.lineHeight;if(!(0>b||b>a.height-d)){var e=this.characterWidth;if(this.$composition){var f=this.textarea.value.replace(/^\x01+/,"");e*=this.session.$getStringScreenWidth(f)[0]+2,d+=2,b-=1}c-=this.scrollLeft,c>this.$size.scrollerWidth-e&&(c=this.$size.scrollerWidth-e),c-=this.scrollBar.width,this.textarea.style.height=d+"px",this.textarea.style.width=e+"px",this.textarea.style.right=Math.max(0,this.$size.scrollerWidth-c-e)+"px",this.textarea.style.bottom=Math.max(0,this.$size.height-b-d)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var a=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+a},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(a){this.$padding=a,this.$textLayer.setPadding(a),this.$cursorLayer.setPadding(a),this.$markerFront.setPadding(a),this.$markerBack.setPadding(a),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(a,b,c,d){var e=this.scrollMargin;e.top=0|a,e.bottom=0|b,e.right=0|d,e.left=0|c,e.v=e.top+e.bottom,e.h=e.left+e.right,this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(a){this.setOption("hScrollBarAlwaysVisible",a)},this.getVScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(a){this.setOption("vScrollBarAlwaysVisible",a)},this.$updateScrollBarV=function(){this.scrollBarV.setInnerHeight(this.layerConfig.maxHeight+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setInnerWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$renderChanges=function(a,b){return this.$changes&&(a|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&(a||b)?this.$size.width?(this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender"),(a&this.CHANGE_FULL||a&this.CHANGE_SIZE||a&this.CHANGE_TEXT||a&this.CHANGE_LINES||a&this.CHANGE_SCROLL||a&this.CHANGE_H_SCROLL)&&(a|=this.$computeLayerConfig()),a&this.CHANGE_H_SCROLL&&(this.$updateScrollBarH(),this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),a&this.CHANGE_FULL?(this.$updateScrollBarV(),this.$updateScrollBarH(),this.$textLayer.update(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this._signal("afterRender"),void 0):a&this.CHANGE_SCROLL?(this.$updateScrollBarV(),a&this.CHANGE_TEXT||a&this.CHANGE_LINES?this.$textLayer.update(this.layerConfig):this.$textLayer.scrollLines(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),this._signal("afterRender"),void 0):(a&this.CHANGE_TEXT?(this.$textLayer.update(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig)):a&this.CHANGE_LINES?(this.$updateLines()||a&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(this.layerConfig):(a&this.CHANGE_TEXT||a&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(this.layerConfig),a&this.CHANGE_CURSOR&&(this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(this.layerConfig),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(this.layerConfig),(a&this.CHANGE_SIZE||a&this.CHANGE_LINES)&&(this.$updateScrollBarV(),this.$updateScrollBarH()),this._signal("afterRender"),void 0)):(this.$changes|=a,this.onResize(!0)):(this.$changes|=a,void 0)},this.$autosize=function(a){var a=this.session.getScreenLength()*this.lineHeight,b=this.$maxLines*this.lineHeight,c=Math.max((this.$minLines||1)*this.lineHeight,Math.min(b,a)),d=a>b;if(c!=this.desiredHeight||this.$size.height!=this.desiredHeight||d!=this.$vScroll){d!=this.$vScroll&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var e=this.container.clientWidth;this.container.style.height=c+"px",this.$updateCachedSize(!0,this.$gutterWidth,e,c),this.desiredHeight=c}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var a=this.session,b=this.$size.height<=2*this.lineHeight,c=this.session.getScreenLength(),d=c*this.lineHeight,e=this.scrollTop%this.lineHeight,f=this.$size.scrollerHeight+this.lineHeight,g=this.$getLongestLine(),h=!b&&(this.$hScrollBarAlwaysVisible||this.$size.scrollerWidth-g-2*this.$padding<0),i=this.$horizScroll!==h;i&&(this.$horizScroll=h,this.scrollBarH.setVisible(h)),!this.$maxLines&&this.$scrollPastEnd&&this.scrollTop>d-this.$size.scrollerHeight&&(d+=Math.min((this.$size.scrollerHeight-this.lineHeight)*this.$scrollPastEnd,this.scrollTop-d+this.$size.scrollerHeight));var j=!b&&(this.$vScrollBarAlwaysVisible||this.$size.scrollerHeight-d<0),k=this.$vScroll!==j;k&&(this.$vScroll=j,this.scrollBarV.setVisible(j)),this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,d-this.$size.scrollerHeight+this.scrollMargin.v))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,g+2*this.$padding-this.$size.scrollerWidth+this.scrollMargin.h)));var l,m,n=Math.ceil(f/this.lineHeight)-1,o=Math.max(0,Math.round((this.scrollTop-e)/this.lineHeight)),p=o+n,q=this.lineHeight;o=a.screenToDocumentRow(o,0);var r=a.getFoldLine(o);r&&(o=r.start.row),l=a.documentToScreenRow(o,0),m=a.getRowLength(o)*q,p=Math.min(a.screenToDocumentRow(p,0),a.getLength()-1),f=this.$size.scrollerHeight+a.getRowLength(p)*q+m,e=this.scrollTop-l*q;var s=0;return(i||k)&&(s=this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this._signal("scrollbarVisibilityChanged"),k&&(g=this.$getLongestLine())),this.layerConfig={width:g,padding:this.$padding,firstRow:o,firstRowScreen:l,lastRow:p,lineHeight:q,characterWidth:this.characterWidth,minHeight:f,maxHeight:d,offset:e,height:this.$size.scrollerHeight},this.$gutterLayer.element.style.marginTop=-e+"px",this.content.style.marginTop=-e+"px",this.content.style.width=g+2*this.$padding+"px",this.content.style.height=f+"px",s},this.$updateLines=function(){var a=this.$changedLines.firstRow,b=this.$changedLines.lastRow;this.$changedLines=null;var c=this.layerConfig;return a>c.lastRow+1||b<c.firstRow?void 0:1/0===b?(this.$showGutter&&this.$gutterLayer.update(c),this.$textLayer.update(c),void 0):(this.$textLayer.updateLines(c,a,b),!0)},this.$getLongestLine=function(){var a=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(a+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(a*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(a,b){this.$gutterLayer.addGutterDecoration(a,b)},this.removeGutterDecoration=function(a,b){this.$gutterLayer.removeGutterDecoration(a,b)},this.updateBreakpoints=function(){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(a){this.$gutterLayer.setAnnotations(a),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(a,b,c){this.scrollCursorIntoView(a,c),this.scrollCursorIntoView(b,c)},this.scrollCursorIntoView=function(a,b){if(0!==this.$size.scrollerHeight){var c=this.$cursorLayer.getPixelPosition(a),d=c.left,e=c.top,f=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;f>e?(b&&(e-=b*this.$size.scrollerHeight),0==e?e=-this.scrollMargin.top:0==e&&(e=+this.scrollMargin.bottom),this.session.setScrollTop(e)):f+this.$size.scrollerHeight<e+this.lineHeight&&(b&&(e+=b*this.$size.scrollerHeight),this.session.setScrollTop(e+this.lineHeight-this.$size.scrollerHeight));var g=this.scrollLeft;g>d?(d<this.$padding+2*this.layerConfig.characterWidth&&(d=-this.scrollMargin.left),this.session.setScrollLeft(d)):g+this.$size.scrollerWidth<d+this.characterWidth?this.session.setScrollLeft(Math.round(d+this.characterWidth-this.$size.scrollerWidth)):g<=this.$padding&&d-g<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(a){this.session.setScrollTop(a*this.lineHeight)},this.alignCursor=function(a,b){"number"==typeof a&&(a={row:a,column:0});var c=this.$cursorLayer.getPixelPosition(a),d=this.$size.scrollerHeight-this.lineHeight,e=c.top-d*(b||0);return this.session.setScrollTop(e),e},this.STEPS=8,this.$calcSteps=function(a,b){var c=0,d=this.STEPS,e=[],f=function(a,b,c){return c*(Math.pow(a-1,3)+1)+b};for(c=0;d>c;++c)e.push(f(c/this.STEPS,a,b-a));return e},this.scrollToLine=function(a,b,c,d){var e=this.$cursorLayer.getPixelPosition({row:a,column:0}),f=e.top;b&&(f-=this.$size.scrollerHeight/2);var g=this.scrollTop;this.session.setScrollTop(f),c!==!1&&this.animateScrolling(g,d)},this.animateScrolling=function(a,b){var c=this.scrollTop;if(this.$animatedScroll){var d=this;if(a!=c){if(this.$scrollAnimation){var e=this.$scrollAnimation.steps;if(e.length&&(a=e[0],a==c))return}var f=d.$calcSteps(a,c);this.$scrollAnimation={from:a,to:c,steps:f},clearInterval(this.$timer),d.session.setScrollTop(f.shift()),this.$timer=setInterval(function(){f.length?(d.session.setScrollTop(f.shift()),d.session.$scrollTop=c):null!=c?(d.session.$scrollTop=-1,d.session.setScrollTop(c),c=null):(d.$timer=clearInterval(d.$timer),d.$scrollAnimation=null,b&&b())},10)}}},this.scrollToY=function(a){this.scrollTop!==a&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=a)},this.scrollToX=function(a){this.scrollLeft!==a&&(this.scrollLeft=a),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(a,b){this.session.setScrollTop(b),this.session.setScrollLeft(b)},this.scrollBy=function(a,b){b&&this.session.setScrollTop(this.session.getScrollTop()+b),a&&this.session.setScrollLeft(this.session.getScrollLeft()+a)},this.isScrollableBy=function(a,b){return 0>b&&this.session.getScrollTop()>=1-this.scrollMargin.top?!0:b>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight-(this.$size.scrollerHeight-this.lineHeight)*this.$scrollPastEnd<-1+this.scrollMargin.bottom?!0:0>a&&this.session.getScrollLeft()>=1-this.scrollMargin.left?!0:a>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right?!0:void 0},this.pixelToScreenCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=(a+this.scrollLeft-c.left-this.$padding)/this.characterWidth,e=Math.floor((b+this.scrollTop-c.top)/this.lineHeight),f=Math.round(d);return{row:e,column:f,side:d-f>0?1:-1}},this.screenToTextCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=Math.round((a+this.scrollLeft-c.left-this.$padding)/this.characterWidth),e=Math.floor((b+this.scrollTop-c.top)/this.lineHeight);return this.session.screenToDocumentPosition(e,Math.max(d,0))},this.textToScreenCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=this.session.documentToScreenPosition(a,b),e=this.$padding+Math.round(d.column*this.characterWidth),f=d.row*this.lineHeight;return{pageX:c.left+e-this.scrollLeft,pageY:c.top+f-this.scrollTop}},this.visualizeFocus=function(){d.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){d.removeCssClass(this.container,"ace_focus")},this.showComposition=function(){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,d.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(d.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(a,b){function c(c){if(f.$themeValue!=a)return b&&b();if(c.cssClass){d.importCssString(c.cssText,c.cssClass,f.container.ownerDocument),f.theme&&d.removeCssClass(f.container,f.theme.cssClass),f.$theme=c.cssClass,f.theme=c,d.addCssClass(f.container,c.cssClass),d.setCssClass(f.container,"ace_dark",c.isDark);var e="padding"in c?c.padding:4;f.$padding&&e!=f.$padding&&f.setPadding(e),f.$size&&(f.$size.width=0,f.onResize()),f._dispatchEvent("themeLoaded",{theme:c}),b&&b()}}var f=this;if(this.$themeValue=a,f._dispatchEvent("themeChange",{theme:a}),a&&"string"!=typeof a)c(a);else{var g=a||"ace/theme/textmate";e.loadModule(["theme",g],c)}},this.getTheme=function(){return this.$themeValue},this.setStyle=function(a,b){d.setCssClass(this.container,a,0!=b)},this.unsetStyle=function(a){d.removeCssClass(this.container,a)},this.setMouseCursor=function(a){this.content.style.cursor=a},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(o.prototype),e.defineOptions(o.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(a){this.$textLayer.setShowInvisibles(a)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(a){"number"==typeof a&&(this.$printMarginColumn=a),this.$showPrintMargin=!!a,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(a){this.$gutter.style.display=a?"block":"none",this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(a){d.setCssClass(this.$gutter,"ace_fade-fold-widgets",a)},initialValue:!1},showFoldWidgets:{set:function(a){this.$gutterLayer.setShowFoldWidgets(a)},initialValue:!0},displayIndentGuides:{set:function(a){this.$textLayer.setDisplayIndentGuides(a)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(a){return this.$gutterLineHighlight?(this.$gutterLineHighlight.style.display=a?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight(),void 0):(this.$gutterLineHighlight=d.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",this.$gutter.appendChild(this.$gutterLineHighlight),void 0)},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(a){"number"==typeof a&&(a+="px"),this.container.style.fontSize=a,this.updateFontSize()},initialValue:12},fontFamily:{set:function(a){this.container.style.fontFamily=a,this.updateFontSize()}},maxLines:{set:function(){this.updateFull()}},minLines:{set:function(){this.updateFull()}},scrollPastEnd:{set:function(a){a=+a||0,this.$scrollPastEnd!=a&&(this.$scrollPastEnd=a,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(a){this.$gutterLayer.$fixedWidth=!!a,this.$loop.schedule(this.CHANGE_GUTTER)}}}),b.VirtualRenderer=o}),define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(a,b){var c=a("../lib/dom"),d=a("../lib/oop"),e=a("../lib/lang"),f=a("../lib/event_emitter").EventEmitter,g=function(a){this.element=c.createElement("div"),this.element.className="ace_layer ace_gutter-layer",a.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){d.implement(this,f),this.setSession=function(a){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=a,a.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(a,b){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(a,b)},this.removeGutterDecoration=function(a,b){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(a,b)},this.setAnnotations=function(a){this.$annotations=[];for(var b,c,d=0;d<a.length;d++){var f=a[d],c=f.row,b=this.$annotations[c];b||(b=this.$annotations[c]={text:[]});var g=f.text;g=g?e.escapeHTML(g):f.html||"",-1===b.text.indexOf(g)&&b.text.push(g);var h=f.type;"error"==h?b.className=" ace_error":"warning"==h&&" ace_error"!=b.className?b.className=" ace_warning":"info"!=h||b.className||(b.className=" ace_info")}},this.$updateAnnotations=function(a){if(this.$annotations.length){var b=a.data,c=b.range,d=c.start.row,e=c.end.row-d;if(0===e);else if("removeText"==b.action||"removeLines"==b.action)this.$annotations.splice(d,e+1,null);else{var f=Array(e+1);f.unshift(d,1),this.$annotations.splice.apply(this.$annotations,f)}}},this.update=function(a){for(var b=a.firstRow,d=a.lastRow,e=this.session.getNextFoldLine(b),f=e?e.start.row:1/0,g=this.$showFoldWidgets&&this.session.foldWidgets,h=this.session.$breakpoints,i=this.session.$decorations,j=this.session.$firstLineNumber,k=0,l=null,m=-1,n=b;;){if(n>f&&(n=e.end.row+1,e=this.session.getNextFoldLine(n,e),f=e?e.start.row:1/0),n>d){for(;this.$cells.length>m+1;)l=this.$cells.pop(),this.element.removeChild(l.element);break}l=this.$cells[++m],l||(l={element:null,textNode:null,foldWidget:null},l.element=c.createElement("div"),l.textNode=document.createTextNode(""),l.element.appendChild(l.textNode),this.element.appendChild(l.element),this.$cells[m]=l);var o="ace_gutter-cell ";h[n]&&(o+=h[n]),i[n]&&(o+=i[n]),this.$annotations[n]&&(o+=this.$annotations[n].className),l.element.className!=o&&(l.element.className=o);var p=this.session.getRowLength(n)*a.lineHeight+"px";p!=l.element.style.height&&(l.element.style.height=p);var q=k=n+j;if(q!=l.textNode.data&&(l.textNode.data=q),g){var r=g[n];null==r&&(r=g[n]=this.session.getFoldWidget(n))}if(r){l.foldWidget||(l.foldWidget=c.createElement("span"),l.element.appendChild(l.foldWidget));var o="ace_fold-widget ace_"+r;o+="start"==r&&n==f&&n<e.end.row?" ace_closed":" ace_open",l.foldWidget.className!=o&&(l.foldWidget.className=o);var p=a.lineHeight+"px";l.foldWidget.style.height!=p&&(l.foldWidget.style.height=p)}else null!=l.foldWidget&&(l.element.removeChild(l.foldWidget),l.foldWidget=null);n++}this.element.style.height=a.minHeight+"px",(this.$fixedWidth||this.session.$useWrapMode)&&(k=this.session.getLength());var s=k.toString().length*a.characterWidth,t=this.$padding||this.$computePadding();s+=t.left+t.right,s===this.gutterWidth||isNaN(s)||(this.gutterWidth=s,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",s))},this.$fixedWidth=!1,this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(a){a?c.addCssClass(this.element,"ace_folding-enabled"):c.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=a,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var a=c.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(a.paddingLeft)+1||0,this.$padding.right=parseInt(a.paddingRight)||0,this.$padding},this.getRegion=function(a){var b=this.$padding||this.$computePadding(),c=this.element.getBoundingClientRect();return a.x<b.left+c.left?"markers":this.$showFoldWidgets&&a.x>c.right-b.right?"foldWidgets":void 0}}).call(g.prototype),b.Gutter=g}),define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(a,b){var c=a("../range").Range,d=a("../lib/dom"),e=function(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setMarkers=function(a){this.markers=a},this.update=function(a){var a=a||this.config;if(a){this.config=a;var b=[];for(var c in this.markers){var e=this.markers[c];if(e.range){var f=e.range.clipRows(a.firstRow,a.lastRow);if(!f.isEmpty())if(f=f.toScreenRange(this.session),e.renderer){var g=this.$getTop(f.start.row,a),h=this.$padding+f.start.column*a.characterWidth;e.renderer(b,f,h,g,a)}else"fullLine"==e.type?this.drawFullLineMarker(b,f,e.clazz,a):"screenLine"==e.type?this.drawScreenLineMarker(b,f,e.clazz,a):f.isMultiLine()?"text"==e.type?this.drawTextMarker(b,f,e.clazz,a):this.drawMultiLineMarker(b,f,e.clazz,a):this.drawSingleLineMarker(b,f,e.clazz+" ace_start",a)}else e.update(b,this,this.session,a)}this.element=d.setInnerHtml(this.element,b.join(""))}},this.$getTop=function(a,b){return(a-b.firstRowScreen)*b.lineHeight},this.drawTextMarker=function(a,b,d,e,f){var g=b.start.row,h=new c(g,b.start.column,g,this.session.getScreenLastRowColumn(g));for(this.drawSingleLineMarker(a,h,d+" ace_start",e,1,f),g=b.end.row,h=new c(g,0,g,b.end.column),this.drawSingleLineMarker(a,h,d,e,0,f),g=b.start.row+1;g<b.end.row;g++)h.start.row=g,h.end.row=g,h.end.column=this.session.getScreenLastRowColumn(g),this.drawSingleLineMarker(a,h,d,e,1,f)},this.drawMultiLineMarker=function(a,b,c,d,e){var f=this.$padding,g=d.lineHeight,h=this.$getTop(b.start.row,d),i=f+b.start.column*d.characterWidth;e=e||"",a.push("<div class='",c," ace_start' style='","height:",g,"px;","right:0;","top:",h,"px;","left:",i,"px;",e,"'></div>"),h=this.$getTop(b.end.row,d);var j=b.end.column*d.characterWidth;a.push("<div class='",c,"' style='","height:",g,"px;","width:",j,"px;","top:",h,"px;","left:",f,"px;",e,"'></div>"),g=(b.end.row-b.start.row-1)*d.lineHeight,0>g||(h=this.$getTop(b.start.row+1,d),a.push("<div class='",c,"' style='","height:",g,"px;","right:0;","top:",h,"px;","left:",f,"px;",e,"'></div>"))},this.drawSingleLineMarker=function(a,b,c,d,e,f){var g=d.lineHeight,h=(b.end.column+(e||0)-b.start.column)*d.characterWidth,i=this.$getTop(b.start.row,d),j=this.$padding+b.start.column*d.characterWidth;a.push("<div class='",c,"' style='","height:",g,"px;","width:",h,"px;","top:",i,"px;","left:",j,"px;",f||"","'></div>")},this.drawFullLineMarker=function(a,b,c,d,e){var f=this.$getTop(b.start.row,d),g=d.lineHeight;b.start.row!=b.end.row&&(g+=this.$getTop(b.end.row,d)-f),a.push("<div class='",c,"' style='","height:",g,"px;","top:",f,"px;","left:0;right:0;",e||"","'></div>")
-},this.drawScreenLineMarker=function(a,b,c,d,e){var f=this.$getTop(b.start.row,d),g=d.lineHeight;a.push("<div class='",c,"' style='","height:",g,"px;","top:",f,"px;","left:0;right:0;",e||"","'></div>")}}).call(e.prototype),b.Marker=e}),define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(a,b){var c=a("../lib/oop"),d=a("../lib/dom"),e=a("../lib/lang"),f=a("../lib/useragent"),g=a("../lib/event_emitter").EventEmitter,h=function(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_text-layer",a.appendChild(this.element),this.$characterSize={width:0,height:0},this.checkForSizeChanges(),this.$pollSizeChanges()};(function(){c.implement(this,g),this.EOF_CHAR="¶",this.EOL_CHAR="¬",this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.setPadding=function(a){this.$padding=a,this.element.style.padding="0 "+a+"px"},this.getLineHeight=function(){return this.$characterSize.height||0},this.getCharacterWidth=function(){return this.$characterSize.width||0},this.checkForSizeChanges=function(){var a=this.$measureSizes();if(a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=a,this.allowBoldFonts=b&&b.width===a.width&&b.height===a.height,this._emit("changeCharacterSize",{data:a})}},this.$pollSizeChanges=function(){var a=this;this.$pollSizeChangesTimer=setInterval(function(){a.checkForSizeChanges()},500)},this.$fontStyles={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1},this.$measureSizes=f.isIE||f.isOldGecko?function(){var a=1e3;if(!this.$measureNode){var b=this.$measureNode=d.createElement("div"),c=b.style;if(c.width=c.height="auto",c.left=c.top=40*-a+"px",c.visibility="hidden",c.position="fixed",c.overflow="visible",c.whiteSpace="nowrap",b.innerHTML=e.stringRepeat("Xy",a),this.element.ownerDocument.body)this.element.ownerDocument.body.appendChild(b);else{for(var f=this.element.parentNode;!d.hasCssClass(f,"ace_editor");)f=f.parentNode;f.appendChild(b)}}if(!this.element.offsetWidth)return null;var c=this.$measureNode.style,g=d.computedStyle(this.element);for(var h in this.$fontStyles)c[h]=g[h];var i={height:this.$measureNode.offsetHeight,width:this.$measureNode.offsetWidth/(2*a)};return 0==i.width||0==i.height?null:i}:function(){if(!this.$measureNode){var a=this.$measureNode=d.createElement("div"),b=a.style;b.width=b.height="auto",b.left=b.top="-100px",b.visibility="hidden",b.position="fixed",b.overflow="visible",b.whiteSpace="nowrap",a.innerHTML=e.stringRepeat("X",100);for(var c=this.element.parentNode;c&&!d.hasCssClass(c,"ace_editor");)c=c.parentNode;if(!c)return this.$measureNode=null;c.appendChild(a)}var f=this.$measureNode.getBoundingClientRect(),g={height:f.height,width:f.width/100};return 0==g.width||0==g.height?null:g},this.setSession=function(a){this.session=a,this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(a){return this.showInvisibles==a?!1:(this.showInvisibles=a,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(a){return this.displayIndentGuides==a?!1:(this.displayIndentGuides=a,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var a=this.session.getTabSize();this.tabSize=a;for(var b=this.$tabStrings=[0],c=1;a+1>c;c++)this.showInvisibles?b.push("<span class='ace_invisible'>"+this.TAB_CHAR+e.stringRepeat(" ",c-1)+"</span>"):b.push(e.stringRepeat(" ",c));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var d="ace_indent-guide";if(this.showInvisibles){d+=" ace_invisible";var f=e.stringRepeat(this.SPACE_CHAR,this.tabSize),g=this.TAB_CHAR+e.stringRepeat(" ",this.tabSize-1)}else var f=e.stringRepeat(" ",this.tabSize),g=f;this.$tabStrings[" "]="<span class='"+d+"'>"+f+"</span>",this.$tabStrings[" "]="<span class='"+d+"'>"+g+"</span>"}},this.updateLines=function(a,b,c){(this.config.lastRow!=a.lastRow||this.config.firstRow!=a.firstRow)&&this.scrollLines(a),this.config=a;for(var e=Math.max(b,a.firstRow),f=Math.min(c,a.lastRow),g=this.element.childNodes,h=0,i=a.firstRow;e>i;i++){var j=this.session.getFoldLine(i);if(j){if(j.containsRow(e)){e=j.start.row;break}i=j.end.row}h++}for(var i=e,j=this.session.getNextFoldLine(i),k=j?j.start.row:1/0;;){if(i>k&&(i=j.end.row+1,j=this.session.getNextFoldLine(i,j),k=j?j.start.row:1/0),i>f)break;var l=g[h++];if(l){var m=[];this.$renderLine(m,i,!this.$useLineGroups(),i==k?j:!1),d.setInnerHtml(l,m.join(""))}i++}},this.scrollLines=function(a){var b=this.config;if(this.config=a,!b||b.lastRow<a.firstRow)return this.update(a);if(a.lastRow<b.firstRow)return this.update(a);var c=this.element;if(b.firstRow<a.firstRow)for(var d=this.session.getFoldedRowCount(b.firstRow,a.firstRow-1);d>0;d--)c.removeChild(c.firstChild);if(b.lastRow>a.lastRow)for(var d=this.session.getFoldedRowCount(a.lastRow+1,b.lastRow);d>0;d--)c.removeChild(c.lastChild);if(a.firstRow<b.firstRow){var e=this.$renderLinesFragment(a,a.firstRow,b.firstRow-1);c.firstChild?c.insertBefore(e,c.firstChild):c.appendChild(e)}if(a.lastRow>b.lastRow){var e=this.$renderLinesFragment(a,b.lastRow+1,a.lastRow);c.appendChild(e)}},this.$renderLinesFragment=function(a,b,c){for(var e=this.element.ownerDocument.createDocumentFragment(),f=b,g=this.session.getNextFoldLine(f),h=g?g.start.row:1/0;;){if(f>h&&(f=g.end.row+1,g=this.session.getNextFoldLine(f,g),h=g?g.start.row:1/0),f>c)break;var i=d.createElement("div"),j=[];if(this.$renderLine(j,f,!1,f==h?g:!1),i.innerHTML=j.join(""),this.$useLineGroups())i.className="ace_line_group",e.appendChild(i);else for(var k=i.childNodes;k.length;)e.appendChild(k[0]);f++}return e},this.update=function(a){this.config=a;for(var b=[],c=a.firstRow,e=a.lastRow,f=c,g=this.session.getNextFoldLine(f),h=g?g.start.row:1/0;;){if(f>h&&(f=g.end.row+1,g=this.session.getNextFoldLine(f,g),h=g?g.start.row:1/0),f>e)break;this.$useLineGroups()&&b.push("<div class='ace_line_group'>"),this.$renderLine(b,f,!1,f==h?g:!1),this.$useLineGroups()&&b.push("</div>"),f++}this.element=d.setInnerHtml(this.element,b.join(""))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(a,b,c,d){var f=this,g=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,h=function(a,c,d,g){if(c)return f.showInvisibles?"<span class='ace_invisible'>"+e.stringRepeat(f.SPACE_CHAR,a.length)+"</span>":e.stringRepeat(" ",a.length);if("&"==a)return"&#38;";if("<"==a)return"&#60;";if(" "==a){var h=f.session.getScreenTabSize(b+g);return b+=h-1,f.$tabStrings[h]}if(" "==a){var i=f.showInvisibles?"ace_cjk ace_invisible":"ace_cjk",j=f.showInvisibles?f.SPACE_CHAR:"";return b+=1,"<span class='"+i+"' style='width:"+2*f.config.characterWidth+"px'>"+j+"</span>"}return d?"<span class='ace_invisible ace_invalid'>"+f.SPACE_CHAR+"</span>":(b+=1,"<span class='ace_cjk' style='width:"+2*f.config.characterWidth+"px'>"+a+"</span>")},i=d.replace(g,h);if(this.$textToken[c.type])a.push(i);else{var j="ace_"+c.type.replace(/\./g," ace_"),k="";"fold"==c.type&&(k=" style='width:"+c.value.length*this.config.characterWidth+"px;' "),a.push("<span class='",j,"'",k,">",i,"</span>")}return b+d.length},this.renderIndentGuide=function(a,b,c){var d=b.search(this.$indentGuideRe);return 0>=d||d>=c?b:" "==b[0]?(d-=d%this.tabSize,a.push(e.stringRepeat(this.$tabStrings[" "],d/this.tabSize)),b.substr(d)):" "==b[0]?(a.push(e.stringRepeat(this.$tabStrings[" "],d)),b.substr(d)):b},this.$renderWrappedLine=function(a,b,c,d){for(var e=0,f=0,g=c[0],h=0,i=0;i<b.length;i++){var j=b[i],k=j.value;if(0==i&&this.displayIndentGuides){if(e=k.length,k=this.renderIndentGuide(a,k,g),!k)continue;e-=k.length}if(e+k.length<g)h=this.$renderToken(a,h,j,k),e+=k.length;else{for(;e+k.length>=g;)h=this.$renderToken(a,h,j,k.substring(0,g-e)),k=k.substring(g-e),e=g,d||a.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),f++,h=0,g=c[f]||Number.MAX_VALUE;0!=k.length&&(e+=k.length,h=this.$renderToken(a,h,j,k))}}},this.$renderSimpleLine=function(a,b){var c=0,d=b[0],e=d.value;this.displayIndentGuides&&(e=this.renderIndentGuide(a,e)),e&&(c=this.$renderToken(a,c,d,e));for(var f=1;f<b.length;f++)d=b[f],e=d.value,c=this.$renderToken(a,c,d,e)},this.$renderLine=function(a,b,c,d){if(d||0==d||(d=this.session.getFoldLine(b)),d)var e=this.$getFoldLineTokens(b,d);else var e=this.session.getTokens(b);if(c||a.push("<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),e.length){var f=this.session.getRowSplitData(b);f&&f.length?this.$renderWrappedLine(a,e,f,c):this.$renderSimpleLine(a,e)}this.showInvisibles&&(d&&(b=d.end.row),a.push("<span class='ace_invisible'>",b==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),c||a.push("</div>")},this.$getFoldLineTokens=function(a,b){function c(a,b,c){for(var d=0,f=0;f+a[d].value.length<b;)if(f+=a[d].value.length,d++,d==a.length)return;if(f!=b){var g=a[d].value.substring(b-f);g.length>c-b&&(g=g.substring(0,c-b)),e.push({type:a[d].type,value:g}),f=b+g.length,d+=1}for(;c>f&&d<a.length;){var g=a[d].value;g.length+f>c?e.push({type:a[d].type,value:g.substring(0,c-f)}):e.push(a[d]),f+=g.length,d+=1}}var d=this.session,e=[],f=d.getTokens(a);return b.walk(function(a,b,g,h,i){null!=a?e.push({type:"fold",value:a}):(i&&(f=d.getTokens(b)),f.length&&c(f,h,g))},b.end.row,this.session.getLine(b.end.row).length),e},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(h.prototype),b.Text=h}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(a,b){var c=a("../lib/dom"),d=function(a){this.element=c.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),c.addCssClass(this.element,"ace_hidden-cursors")};(function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},this.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},this.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,a?c.addCssClass(this.element,"ace_smooth-blinking"):c.removeCssClass(this.element,"ace_smooth-blinking"),this.restartTimer())},this.addCursor=function(){var a=c.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},this.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},this.hideCursor=function(){this.isVisible=!1,c.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,c.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&c.removeCssClass(this.element,"ace_smooth-blinking");for(var a=this.cursors.length;a--;)this.cursors[a].style.opacity="";if(this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){c.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var b=function(){this.timeoutId=setTimeout(function(){for(var a=this.cursors.length;a--;)this.cursors[a].style.opacity=0}.bind(this),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){for(var a=this.cursors.length;a--;)this.cursors[a].style.opacity="";b()}.bind(this),this.blinkInterval),b()}},this.getPixelPosition=function(a,b){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(a),d=this.$padding+c.column*this.config.characterWidth,e=(c.row-(b?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:d,top:e}},this.update=function(a){this.config=a;var b=this.session.$selectionMarkers,c=0,d=0;(void 0===b||0===b.length)&&(b=[{cursor:null}]);for(var c=0,e=b.length;e>c;c++){var f=this.getPixelPosition(b[c].cursor,!0);if(!((f.top>a.height+a.offset||f.top<-a.offset)&&c>1)){var g=(this.cursors[d++]||this.addCursor()).style;g.left=f.left+"px",g.top=f.top+"px",g.width=a.characterWidth+"px",g.height=a.lineHeight+"px"}}for(;this.cursors.length>d;)this.removeCursor();var h=this.session.getOverwrite();this.$setOverwrite(h),this.$pixelPos=f,this.restartTimer()},this.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?c.addCssClass(this.element,"ace_overwrite-cursors"):c.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(d.prototype),b.Cursor=d}),define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(a,b){var c=a("./lib/oop"),d=a("./lib/dom"),e=a("./lib/event"),f=a("./lib/event_emitter").EventEmitter,g=function(a,b){this.element=d.createElement("div"),this.element.className="ace_scrollbar",this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),a.appendChild(this.element),b.$scrollbarWidth=this.width=d.scrollbarWidth(a.ownerDocument),b.$scrollbarWidth=this.width=d.scrollbarWidth(a.ownerDocument),this.fullWidth=this.width,this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.setVisible(!1),this.element.style.overflowY="scroll",e.addListener(this.element,"scroll",this.onScrollV.bind(this)),e.addListener(this.element,"mousedown",e.preventDefault)},h=function(a,b){this.element=d.createElement("div"),this.element.className="ace_scrollbar-h",this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),a.appendChild(this.element),this.height=b.$scrollbarWidth,this.fullHeight=this.height,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px",this.setVisible(!1),this.element.style.overflowX="scroll",e.addListener(this.element,"scroll",this.onScrollH.bind(this)),e.addListener(this.element,"mousedown",e.preventDefault)};(function(){c.implement(this,f),this.setVisible=function(a){a?(this.element.style.display="",this.fullWidth&&(this.width=this.fullWidth),this.fullHeight&&(this.height=this.fullHeight)):(this.element.style.display="none",this.height=this.width=0)},this.onScrollV=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.onScrollH=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getWidth=function(){return this.width},this.getHeight=function(){return this.height},this.setHeight=function(a){this.element.style.height=a+"px"},this.setWidth=function(a){this.element.style.width=a+"px"},this.setInnerHeight=function(a){this.inner.style.height=a+"px"},this.setInnerWidth=function(a){this.inner.style.width=a+"px"},this.setScrollTop=function(a){this.scrollTop!=a&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=a)},this.setScrollLeft=function(a){this.scrollLeft!=a&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=a)}}).call(g.prototype),h.prototype=g.prototype,b.ScrollBar=g,b.ScrollBarV=g,b.ScrollBarH=h}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(a,b){var c=a("./lib/event"),d=function(a,b){this.onRender=a,this.pending=!1,this.changes=0,this.window=b||window};(function(){this.schedule=function(a){if(this.changes=this.changes|a,!this.pending){this.pending=!0;var b=this;c.nextFrame(function(){b.pending=!1;for(var a;a=b.changes;)b.changes=0,b.onRender(a)},this.window)}}}).call(d.prototype),b.RenderLoop=d}),define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(a,b){function c(a,b,c){return o.$options.wrap=!0,o.$options.needle=b,o.$options.backwards=-1==c,o.find(a)}function d(a,b){return a.row==b.row&&a.column==b.column}function e(a){a.$multiselectOnSessionChange||(a.$onAddRange=a.$onAddRange.bind(a),a.$onRemoveRange=a.$onRemoveRange.bind(a),a.$onMultiSelect=a.$onMultiSelect.bind(a),a.$onSingleSelect=a.$onSingleSelect.bind(a),a.$multiselectOnSessionChange=b.onSessionChange.bind(a),a.$multiselectOnSessionChange(a),a.on("changeSession",a.$multiselectOnSessionChange),a.on("mousedown",j),a.commands.addCommands(m.defaultCommands),f(a))}function f(a){function b(){d&&(a.renderer.setMouseCursor(""),d=!1)}var c=a.textInput.getElement(),d=!1;k.addListener(c,"keydown",function(c){18!=c.keyCode||c.ctrlKey||c.shiftKey||c.metaKey?d&&b():d||(a.renderer.setMouseCursor("crosshair"),d=!0)}),k.addListener(c,"keyup",b),k.addListener(c,"blur",b)}var g=a("./range_list").RangeList,h=a("./range").Range,i=a("./selection").Selection,j=a("./mouse/multi_select_handler").onMouseDown,k=a("./lib/event"),l=a("./lib/lang"),m=a("./commands/multi_select_commands");b.commands=m.defaultCommands.concat(m.multiSelectCommands);var n=a("./search").Search,o=new n,p=a("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(a,b){if(a){if(!this.inMultiSelectMode&&0==this.rangeCount){var c=this.toOrientedRange();if(this.rangeList.add(c),this.rangeList.add(a),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),b||this.fromOrientedRange(a);this.rangeList.removeAll(),this.rangeList.add(c),this.$onAddRange(c)}a.cursor||(a.cursor=a.end);var d=this.rangeList.add(a);return this.$onAddRange(a),d.length&&this.$onRemoveRange(d),this.rangeCount>1&&!this.inMultiSelectMode&&(this._emit("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),b||this.fromOrientedRange(a)}},this.toSingleRange=function(a){a=a||this.ranges[0];var b=this.rangeList.removeAll();b.length&&this.$onRemoveRange(b),a&&this.fromOrientedRange(a)},this.substractPoint=function(a){var b=this.rangeList.substractPoint(a);return b?(this.$onRemoveRange(b),b[0]):void 0},this.mergeOverlappingRanges=function(){var a=this.rangeList.merge();a.length?this.$onRemoveRange(a):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(a){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(a),this._emit("addRange",{range:a})},this.$onRemoveRange=function(a){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var b=this.rangeList.ranges.pop();a.push(b),this.rangeCount=0}for(var c=a.length;c--;){var d=this.ranges.indexOf(a[c]);this.ranges.splice(d,1)}this._emit("removeRange",{ranges:a}),0==this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._emit("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),b=b||this.ranges[0],b&&!b.isEqual(this.getRange())&&this.fromOrientedRange(b)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new g,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var a=this.rangeList.ranges,b=a[a.length-1],c=h.fromPoints(a[0].start,b.end);this.toSingleRange(),this.setSelectionRange(c,b.cursor==b.start)}else{var c=this.getRange(),d=this.isBackwards(),e=c.start.row,f=c.end.row;if(e==f){if(d)var g=c.end,i=c.start;else var g=c.start,i=c.end;return this.addRange(h.fromPoints(i,i)),this.addRange(h.fromPoints(g,g)),void 0}var j=[],k=this.getLineRange(e,!0);k.start.column=c.start.column,j.push(k);for(var l=e+1;f>l;l++)j.push(this.getLineRange(l,!0));k=this.getLineRange(f,!0),k.end.column=c.end.column,j.push(k),j.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var a=this.rangeList.ranges,b=a[a.length-1],c=h.fromPoints(a[0].start,b.end);this.toSingleRange(),this.setSelectionRange(c,b.cursor==b.start)}else{var d=this.session.documentToScreenPosition(this.selectionLead),e=this.session.documentToScreenPosition(this.selectionAnchor),f=this.rectangularRangeBlock(d,e);f.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(a,b,c){var e=[],f=a.column<b.column;if(f)var g=a.column,i=b.column;else var g=b.column,i=a.column;var j=a.row<b.row;if(j)var k=a.row,l=b.row;else var k=b.row,l=a.row;0>g&&(g=0),0>k&&(k=0),k==l&&(c=!0);for(var m=k;l>=m;m++){var n=h.fromPoints(this.session.screenToDocumentPosition(m,g),this.session.screenToDocumentPosition(m,i));if(n.isEmpty()){if(o&&d(n.end,o))break;var o=n.end}n.cursor=f?n.start:n.end,e.push(n)}if(j&&e.reverse(),!c){for(var p=e.length-1;e[p].isEmpty()&&p>0;)p--;if(p>0)for(var q=0;e[q].isEmpty();)q++;for(var r=p;r>=q;r--)e[r].isEmpty()&&e.splice(r,1)}return e}}.call(i.prototype);var q=a("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(a){a.cursor||(a.cursor=a.end);var b=this.getSelectionStyle();return a.marker=this.session.addMarker(a,"ace_selection",b),this.session.$selectionMarkers.push(a),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,a},this.removeSelectionMarker=function(a){if(a.marker){this.session.removeMarker(a.marker);var b=this.session.$selectionMarkers.indexOf(a);-1!=b&&this.session.$selectionMarkers.splice(b,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(a){for(var b=this.session.$selectionMarkers,c=a.length;c--;){var d=a[c];if(d.marker){this.session.removeMarker(d.marker);var e=b.indexOf(d);-1!=e&&b.splice(e,1)}}this.session.selectionMarkerCount=b.length},this.$onAddRange=function(a){this.addSelectionMarker(a.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(a){this.removeSelectionMarkers(a.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(m.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(m.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onMultiSelectExec=function(a){var b=a.command,c=a.editor;if(c.multiSelect){if(b.multiSelectAction)"forEach"==b.multiSelectAction?d=c.forEachSelection(b,a.args):"forEachLine"==b.multiSelectAction?d=c.forEachSelection(b,a.args,!0):"single"==b.multiSelectAction?(c.exitMultiSelectMode(),d=b.exec(c,a.args||{})):d=b.multiSelectAction(c,a.args||{});else{var d=b.exec(c,a.args||{});c.multiSelect.addRange(c.multiSelect.toOrientedRange()),c.multiSelect.mergeOverlappingRanges()}return d}},this.forEachSelection=function(a,b,c){if(!this.inVirtualSelectionMode){var d,e=this.session,f=this.selection,g=f.rangeList,h=f._eventRegistry;f._eventRegistry={};var j=new i(e);this.inVirtualSelectionMode=!0;for(var k=g.ranges.length;k--;){if(c)for(;k>0&&g.ranges[k].start.row==g.ranges[k-1].end.row;)k--;j.fromOrientedRange(g.ranges[k]),this.selection=e.selection=j;var l=a.exec(this,b||{});void 0==!d&&(d=l),j.toOrientedRange(g.ranges[k])}j.detach(),this.selection=e.selection=f,this.inVirtualSelectionMode=!1,f._eventRegistry=h,f.mergeOverlappingRanges();var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),d}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var a="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var b=this.multiSelect.rangeList.ranges,c=[],d=0;d<b.length;d++)c.push(this.session.getTextRange(b[d]));var e=this.session.getDocument().getNewLineCharacter();a=c.join(e),a.length==(c.length-1)*e.length&&(a="")}else this.selection.isEmpty()||(a=this.session.getTextRange(this.getSelectionRange()));return a},this.onPaste=function(a){if(!this.$readOnly){if(this._signal("paste",a),!this.inMultiSelectMode||this.inVirtualSelectionMode)return this.insert(a);var b=a.split(/\r\n|\r|\n/),c=this.selection.rangeList.ranges;if(b.length>c.length||b.length<2||!b[1])return this.commands.exec("insertstring",this,a);for(var d=c.length;d--;){var e=c[d];e.isEmpty()||this.session.remove(e),this.session.insert(e.start,b[d])}}},this.findAll=function(a,b,c){b=b||{},b.needle=a||b.needle,this.$search.set(b);var d=this.$search.findAll(this.session);if(!d.length)return 0;this.$blockScrolling+=1;var e=this.multiSelect;c||e.toSingleRange(d[0]);for(var f=d.length;f--;)e.addRange(d[f],!0);return this.$blockScrolling-=1,d.length},this.selectMoreLines=function(a,b){var c=this.selection.toOrientedRange(),d=c.cursor==c.end,e=this.session.documentToScreenPosition(c.cursor);this.selection.$desiredColumn&&(e.column=this.selection.$desiredColumn);var f=this.session.screenToDocumentPosition(e.row+a,e.column);if(c.isEmpty())var g=f;else var i=this.session.documentToScreenPosition(d?c.end:c.start),g=this.session.screenToDocumentPosition(i.row+a,i.column);if(d){var j=h.fromPoints(f,g);j.cursor=j.start}else{var j=h.fromPoints(g,f);j.cursor=j.end}if(j.desiredColumn=e.column,this.selection.inMultiSelectMode){if(b)var k=c.cursor}else this.selection.addRange(c);this.selection.addRange(j),k&&this.selection.substractPoint(k)},this.transposeSelections=function(a){for(var b=this.session,c=b.multiSelect,d=c.ranges,e=d.length;e--;){var f=d[e];if(f.isEmpty()){var g=b.getWordRange(f.start.row,f.start.column);f.start.row=g.start.row,f.start.column=g.start.column,f.end.row=g.end.row,f.end.column=g.end.column}}c.mergeOverlappingRanges();for(var h=[],e=d.length;e--;){var f=d[e];h.unshift(b.getTextRange(f))}0>a?h.unshift(h.pop()):h.push(h.shift());for(var e=d.length;e--;){var f=d[e],g=f.clone();b.replace(f,h[e]),f.start.row=g.start.row,f.start.column=g.start.column}},this.selectMore=function(a,b){var d=this.session,e=d.multiSelect,f=e.toOrientedRange();if(f.isEmpty()){var f=d.getWordRange(f.start.row,f.start.column);return f.cursor=-1==a?f.start:f.end,this.multiSelect.addRange(f),void 0}var g=d.getTextRange(f),h=c(d,g,a);h&&(h.cursor=-1==a?h.start:h.end,this.multiSelect.addRange(h)),b&&this.multiSelect.substractPoint(f.cursor)},this.alignCursors=function(){var a=this.session,b=a.multiSelect,c=b.ranges;if(c.length){var d=-1,e=c.filter(function(a){return a.cursor.row==d?!0:(d=a.cursor.row,void 0)});b.$onRemoveRange(e);var f=0,g=1/0,i=c.map(function(b){var c=b.cursor,d=a.getLine(c.row),e=d.substr(c.column).search(/\S/g);return-1==e&&(e=0),c.column>f&&(f=c.column),g>e&&(g=e),e});c.forEach(function(b,c){var d=b.cursor,e=f-d.column,j=i[c]-g;e>j?a.insert(d,l.stringRepeat(" ",e-j)):a.remove(new h(d.row,d.column,d.row,d.column-e+j)),b.start.column=b.end.column=f,b.start.row=b.end.row=d.row,b.cursor=b.end}),b.fromOrientedRange(c[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var j=this.selection.getRange(),k=j.start.row,m=j.end.row,n=this.session.doc.removeLines(k,m);n=this.$reAlignText(n),this.session.doc.insertLines(k,n),j.start.column=0,j.end.column=n[n.length-1].length,this.selection.setRange(j)}},this.$reAlignText=function(a){function b(a){return l.stringRepeat(" ",a)}function c(a){return a[2]?b(f)+a[2]+b(g-a[2].length+h)+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}function d(a){return a[2]?b(f+g-a[2].length)+a[2]+b(h," ")+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}function e(a){return a[2]?b(f)+a[2]+b(h)+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}var f,g,h,i=!0,j=!0;return a.map(function(a){var b=a.match(/(\s*)(.*?)(\s*)([=:].*)/);return b?null==f?(f=b[1].length,g=b[2].length,h=b[3].length,b):(f+g+h!=b[1].length+b[2].length+b[3].length&&(j=!1),f!=b[1].length&&(i=!1),f>b[1].length&&(f=b[1].length),g<b[2].length&&(g=b[2].length),h>b[3].length&&(h=b[3].length),b):[a]}).map(i?j?d:c:e)}}).call(q.prototype),b.onSessionChange=function(a){var b=a.session;b.multiSelect||(b.$selectionMarkers=[],b.selection.$initRangeList(),b.multiSelect=b.selection),this.multiSelect=b.multiSelect;var c=a.oldSession;c&&(c.multiSelect.removeEventListener("addRange",this.$onAddRange),c.multiSelect.removeEventListener("removeRange",this.$onRemoveRange),c.multiSelect.removeEventListener("multiSelect",this.$onMultiSelect),c.multiSelect.removeEventListener("singleSelect",this.$onSingleSelect)),b.multiSelect.on("addRange",this.$onAddRange),b.multiSelect.on("removeRange",this.$onRemoveRange),b.multiSelect.on("multiSelect",this.$onMultiSelect),b.multiSelect.on("singleSelect",this.$onSingleSelect),this.inMultiSelectMode!=b.selection.inMultiSelectMode&&(b.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},b.MultiSelect=e,a("./config").defineOptions(q.prototype,"editor",{enableMultiselect:{set:function(a){e(this),a?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",j)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",j))},value:!0}})}),define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event"],function(a,b){function c(a,b){return a.row==b.row&&a.column==b.column}function d(a){var b=a.domEvent,d=b.altKey,f=b.shiftKey,g=a.getAccelKey(),h=a.getButton();if(a.editor.inMultiSelectMode&&2==h)return a.editor.textInput.onContextMenu(a.domEvent),void 0;if(!g&&!d)return 0==h&&a.editor.inMultiSelectMode&&a.editor.exitMultiSelectMode(),void 0;var i=a.editor,j=i.selection,k=i.inMultiSelectMode,l=a.getDocumentPosition(),m=j.getCursor(),n=a.inSelection()||j.isEmpty()&&c(l,m),o=a.x,p=a.y,q=function(a){o=a.clientX,p=a.clientY},r=function(){var a=i.renderer.pixelToScreenCoordinates(o,p),b=s.screenToDocumentPosition(a.row,a.column);c(u,a)&&c(b,j.selectionLead)||(u=a,i.selection.moveCursorToPosition(b),i.selection.clearSelection(),i.renderer.scrollCursorIntoView(),i.removeSelectionMarkers(v),v=j.rectangularRangeBlock(u,t),v.forEach(i.addSelectionMarker,i),i.updateSelectionMarkers())},s=i.session,t=i.renderer.pixelToScreenCoordinates(o,p),u=t;if(!g||f||d||0!=h){if(d&&0==h){a.stop(),k&&!g?j.toSingleRange():!k&&g&&j.addRange();var v=[];f?(t=s.documentToScreenPosition(j.lead),r()):(j.moveCursorToPosition(l),j.clearSelection());var w=function(){clearInterval(y),i.removeSelectionMarkers(v);for(var a=0;a<v.length;a++)j.addRange(v[a])},x=r;e.capture(i.container,q,w);var y=setInterval(function(){x()},20);return a.preventDefault()}}else{if(!k&&n)return;if(!k){var z=j.toOrientedRange();i.addSelectionMarker(z)}var A=j.rangeList.rangeAtPoint(l);i.once("mouseup",function(){var a=j.toOrientedRange();A&&a.isEmpty()&&c(A.cursor,a.cursor)?j.substractPoint(a.cursor):(z&&(i.removeSelectionMarker(z),j.addRange(z)),j.addRange(a))
-})}}var e=a("../lib/event");b.onMouseDown=d}),define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(a,b){b.defaultCommands=[{name:"addCursorAbove",exec:function(a){a.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},readonly:!0},{name:"addCursorBelow",exec:function(a){a.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},readonly:!0},{name:"addCursorAboveSkipCurrent",exec:function(a){a.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},readonly:!0},{name:"addCursorBelowSkipCurrent",exec:function(a){a.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},readonly:!0},{name:"selectMoreBefore",exec:function(a){a.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},readonly:!0},{name:"selectMoreAfter",exec:function(a){a.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},readonly:!0},{name:"selectNextBefore",exec:function(a){a.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},readonly:!0},{name:"selectNextAfter",exec:function(a){a.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},readonly:!0},{name:"splitIntoLines",exec:function(a){a.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readonly:!0},{name:"alignCursors",exec:function(a){a.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"}}],b.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(a){a.exitMultiSelectMode()},readonly:!0,isAvailable:function(a){return a&&a.inMultiSelectMode}}];var c=a("../keyboard/hash_handler").HashHandler;b.keyboardHandler=new c(b.multiSelectCommands)}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/config"],function(a,b){var c=a("../lib/oop"),d=a("../lib/event_emitter").EventEmitter,e=a("../config"),f=function(b,c,d){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.onError=this.onError.bind(this),a.nameToUrl&&!a.toUrl&&(a.toUrl=a.nameToUrl);var f;if(e.get("packaged")||!a.toUrl)f=e.moduleUrl(c,"worker");else{var g=this.$normalizePath;f=g(a.toUrl("ace/worker/worker.js",null,"_"));var h={};b.forEach(function(b){h[b]=g(a.toUrl(b,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}this.$worker=new Worker(f),this.$worker.postMessage({init:!0,tlns:h,module:c,classname:d}),this.callbackId=1,this.callbacks={},this.$worker.onerror=this.onError,this.$worker.onmessage=this.onMessage};(function(){c.implement(this,d),this.onError=function(a){throw window.console&&console.log&&console.log(a),a},this.onMessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log.apply(console,b.data);break;case"event":this._emit(b.name,{data:b.data});break;case"call":var c=this.callbacks[b.id];c&&(c(b.data),delete this.callbacks[b.id])}},this.$normalizePath=function(a){return location.host?(a=a.replace(/^[a-z]+:\/\/[^\/]+/,""),a=location.protocol+"//"+location.host+("/"==a.charAt(0)?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,"")):a},this.terminate=function(){this._emit("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){this.deltaQueue?this.deltaQueue.push(a.data):(this.deltaQueue=[a.data],setTimeout(this.$sendDeltaQueue,1))},this.$sendDeltaQueue=function(){var a=this.deltaQueue;a&&(this.deltaQueue=null,a.length>20&&a.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:a}))}}).call(f.prototype);var g=function(a,b,c){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var f=null,g=Object.create(d),h=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(a){h.messageBuffer.push(a),f&&setTimeout(i)};var i=function(){var a=h.messageBuffer.shift();a.command?f[a.command].apply(f,a.args):a.event&&g._emit(a.event,a.data)};g.postMessage=function(a){h.onMessage({data:a})},g.callback=function(a,b){this.postMessage({type:"call",id:b,data:a})},g.emit=function(a,b){this.postMessage({type:"event",name:a,data:b})},e.loadModule(["worker",b],function(a){for(f=new a[c](g);h.messageBuffer.length;)i()})};g.prototype=f.prototype,b.UIWorkerClient=g,b.WorkerClient=f}),define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(a,b){var c=a("./range").Range,d=a("./lib/event_emitter").EventEmitter,e=a("./lib/oop"),f=function(a,b,c,d,e,f){var g=this;this.length=b,this.session=a,this.doc=a.getDocument(),this.mainClass=e,this.othersClass=f,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=d,this.$onCursorChange=function(){setTimeout(function(){g.onCursorChange()})},this.$pos=c;var h=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=h.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)};(function(){e.implement(this,d),this.setup=function(){var a=this,b=this.doc,d=this.session,e=this.$pos;this.pos=b.createAnchor(e.row,e.column),this.markerId=d.addMarker(new c(e.row,e.column,e.row,e.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(b){d.removeMarker(a.markerId),a.markerId=d.addMarker(new c(b.value.row,b.value.column,b.value.row,b.value.column+a.length),a.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(c){var d=b.createAnchor(c.row,c.column);a.others.push(d)}),d.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,b=this;this.othersActive=!0,this.others.forEach(function(d){d.markerId=a.addMarker(new c(d.row,d.column,d.row,d.column+b.length),b.othersClass,null,!1),d.on("change",function(e){a.removeMarker(d.markerId),d.markerId=a.addMarker(new c(e.value.row,e.value.column,e.value.row,e.value.column+b.length),b.othersClass,null,!1)})})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var a=0;a<this.others.length;a++)this.session.removeMarker(this.others[a].markerId)}},this.onUpdate=function(a){var b=a.data,d=b.range;if(d.start.row===d.end.row&&d.start.row===this.pos.row&&!this.$updating){this.$updating=!0;var e="insertText"===b.action?d.end.column-d.start.column:d.start.column-d.end.column;if(d.start.column>=this.pos.column&&d.start.column<=this.pos.column+this.length+1){var f=d.start.column-this.pos.column;if(this.length+=e,!this.session.$fromUndo){if("insertText"===b.action)for(var g=this.others.length-1;g>=0;g--){var h=this.others[g],i={row:h.row,column:h.column+f};h.row===d.start.row&&d.start.column<h.column&&(i.column+=e),this.doc.insert(i,b.text)}else if("removeText"===b.action)for(var g=this.others.length-1;g>=0;g--){var h=this.others[g],i={row:h.row,column:h.column+f};h.row===d.start.row&&d.start.column<h.column&&(i.column+=e),this.doc.remove(new c(i.row,i.column,i.row,i.column-e))}d.start.column===this.pos.column&&"insertText"===b.action?setTimeout(function(){this.pos.setPosition(this.pos.row,this.pos.column-e);for(var a=0;a<this.others.length;a++){var b=this.others[a],c={row:b.row,column:b.column-e};b.row===d.start.row&&d.start.column<b.column&&(c.column+=e),b.setPosition(c.row,c.column)}}.bind(this),0):d.start.column===this.pos.column&&"removeText"===b.action&&setTimeout(function(){for(var a=0;a<this.others.length;a++){var b=this.others[a];b.row===d.start.row&&d.start.column<b.column&&b.setPosition(b.row,b.column-e)}}.bind(this),0)}this.pos._emit("change",{value:this.pos});for(var g=0;g<this.others.length;g++)this.others[g]._emit("change",{value:this.others[g]})}this.$updating=!1}},this.onCursorChange=function(a){if(!this.$updating){var b=this.session.selection.getCursor();b.row===this.pos.row&&b.column>=this.pos.column&&b.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var a=0;a<this.others.length;a++)this.others[a].detach();this.session.setUndoSelect(!0)},this.cancel=function(){if(-1===this.$undoStackDepth)throw Error("Canceling placeholders only supported with undo manager attached to session.");for(var a=this.session.getUndoManager(),b=(a.$undoStack||a.$undostack).length-this.$undoStackDepth,c=0;b>c;c++)a.undo(!0)}}).call(f.prototype),b.PlaceHolder=f}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b){var c=a("../../range").Range,d=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":"markbeginend"==b&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(){return null},this.indentationBlock=function(a,b,d){var e=/\S/,f=a.getLine(b),g=f.search(e);if(-1!=g){for(var h=d||f.length,i=a.getLength(),j=b,k=b;++b<i;){var l=a.getLine(b).search(e);if(-1!=l){if(g>=l)break;k=b}}if(k>j){var m=a.getLine(k).length;return new c(j,h,k,m)}}},this.openingBracketBlock=function(a,b,d,e,f){var g={row:d,column:e+1},h=a.$findClosingBracket(b,g,f);if(h){var i=a.foldWidgets[h.row];return null==i&&(i=this.getFoldWidget(a,h.row)),"start"==i&&h.row>g.row&&(h.row--,h.column=a.getLine(h.row).length),c.fromPoints(g,h)}},this.closingBracketBlock=function(a,b,d,e){var f={row:d,column:e},g=a.$findOpeningBracket(b,f);return g?(g.column++,f.column--,c.fromPoints(g,f)):void 0}}).call(d.prototype)}),define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(a,b){b.isDark=!1,b.cssClass="ace-tm",b.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var c=a("../lib/dom");c.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){a&&a.config.init(),window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}(),define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/multi_select","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/mode/folding/fold_mode","ace/theme/textmate","ace/config"],function(a,b){a("./lib/fixoldbrowsers");var c=a("./lib/dom"),d=a("./lib/event"),e=a("./editor").Editor,f=a("./edit_session").EditSession,g=a("./undomanager").UndoManager,h=a("./virtual_renderer").VirtualRenderer,i=a("./multi_select").MultiSelect;a("./worker/worker_client"),a("./keyboard/hash_handler"),a("./placeholder"),a("./mode/folding/fold_mode"),a("./theme/textmate"),b.config=a("./config"),b.require=a,b.edit=function(a){if("string"==typeof a){var f=a,a=document.getElementById(f);if(!a)throw new Error("ace.edit can't find div #"+f)}if(a.env&&a.env.editor instanceof e)return a.env.editor;var g=b.createEditSession(c.getInnerText(a));a.innerHTML="";var j=new e(new h(a));new i(j),j.setSession(g);var k={document:g,editor:j,onResize:j.resize.bind(j,null)};return d.addListener(window,"resize",k.onResize),j.on("destroy",function(){d.removeListener(window,"resize",k.onResize)}),a.env=j.env=k,j},b.createEditSession=function(a,b){var c=new f(a,b);return c.setUndoManager(new g),c},b.EditSession=f,b.UndoManager=g}),define("ace_configuration",["app","ace/ace"],function(a,b){var c=a.host+a.root+"js/ace",d=require("ace/config");return d.set("packaged",!0),d.set("workerPath",c),d.set("modePath",c),d.set("themePath",c),b}),define("modules/fauxton/components",["app","api","ace_configuration"],function(a,b,c){var d=a.module();return d.Pagination=b.View.extend({template:"templates/fauxton/pagination",initialize:function(a){this.page=parseInt(a.page,10),this.perPage=a.perPage,this.total=a.total,this.totalPages=Math.ceil(this.total/this.perPage),this.urlFun=a.urlFun},serialize:function(){return{page:this.page,perPage:this.perPage,total:this.total,totalPages:this.totalPages,urlFun:this.urlFun}}}),d.IndexPagination=b.View.extend({template:"templates/fauxton/index_pagination",events:{"click a":"scrollTo","click a#next":"nextClicked","click a#previous":"previousClicked"},previousIds:[],scrollTo:function(){this.scrollToSelector&&$(this.scrollToSelector).animate({scrollTop:0},"slow")},initialize:function(a){this.previousUrlfn=a.previousUrlfn,this.nextUrlfn=a.nextUrlfn,this.canShowPreviousfn=a.canShowPreviousfn,this.canShowNextfn=a.canShowNextfn,this.scrollToSelector=a.scrollToSelector,_.bindAll(this)},previousClicked:function(a){a.preventDefault(),a.stopPropagation(),this.canShowPreviousfn()&&(b.navigate(this.previousUrlfn(),{trigger:!1}),b.triggerRouteEvent("paginate","previous"))},nextClicked:function(a){if(a.preventDefault(),a.stopPropagation(),this.canShowNextfn()){var c=this.collection.first();c&&this.previousIds.push(c.id),b.navigate(this.nextUrlfn(),{trigger:!1}),b.triggerRouteEvent("paginate","next")}},serialize:function(){return{canShowNextfn:this.canShowNextfn,canShowPreviousfn:this.canShowPreviousfn}}}),d.Typeahead=b.View.extend({initialize:function(a){this.source=a.source,_.bindAll(this)},afterRender:function(){var a=this.onUpdate;this.$el.typeahead({source:this.source,updater:function(b){return a&&a(b),b}})}}),d.DbSearchTypeahead=d.Typeahead.extend({initialize:function(a){this.dbLimit=a.dbLimit||30,this.onUpdate=a.onUpdate,_.bindAll(this)},source:function(b,c){var d=[a.host,"/_all_dbs?startkey=%22",b,"%22&endkey=%22",b,"香","%22&limit=",this.dbLimit].join("");this.ajaxReq&&this.ajaxReq.abort(),this.ajaxReq=$.ajax({cache:!1,url:d,dataType:"json",success:function(a){c(a)}})}}),d.DocSearchTypeahead=d.Typeahead.extend({initialize:function(a){this.docLimit=a.docLimit||30,this.database=a.database,_.bindAll(this)},source:function(b,c){var d=[a.host,"/",this.database.id,"/_all_docs?startkey=%22",b,"%22&endkey=%22",b,"香","%22&limit=",this.docLimit].join("");this.ajaxReq&&this.ajaxReq.abort(),this.ajaxReq=$.ajax({cache:!1,url:d,dataType:"json",success:function(a){var b=_.map(a.rows,function(a){return a.id});c(b)}})}}),d.Editor=b.View.extend({initialize:function(a){this.editorId=a.editorId,this.mode=a.mode||"json",this.commands=a.commands,this.theme=a.theme||"crimson_editor",this.couchJSHINT=a.couchJSHINT,this.edited=!1},afterRender:function(){this.editor=c.edit(this.editorId),this.setHeightToLineCount(),this.editor.setTheme("ace/theme/"+this.theme),this.editor.getSession().setMode("ace/mode/"+this.mode),this.editor.getSession().setUseWrapMode(!0),this.editor.setShowPrintMargin(!1),this.editor.gotoLine(2),this.addCommands(),this.couchJSHINT&&this.removeIncorrectAnnotations();var a=this;this.editor.getSession().on("change",function(){a.setHeightToLineCount(),a.edited=!0}),$(window).on("beforeunload.editor",function(){return a.edited?"Your changes have not been saved. Click cancel to return to the document.":void 0}),b.beforeUnload("editor",function(){return a.edited?"Your changes have not been saved. Click cancel to return to the document.":void 0})},cleanup:function(){$(window).off("beforeunload.editor"),b.removeBeforeUnload("editor")},setHeightToLineCount:function(){var a=this.editor.getSession().getDocument().getLength();this.editor.setOptions({maxLines:a}),this.editor.resize()},addCommands:function(){_.each(this.commands,function(a){this.editor.commands.addCommand(a)},this)},removeIncorrectAnnotations:function(){var a=this.editor;this.editor.getSession().on("changeAnnotation",function(){var c=a.getSession().getAnnotations(),d=_.reduce(c,function(a,c){return b.isIgnorableError(c.raw)||a.push(c),a},[]);c.length!==d.length&&a.getSession().setAnnotations(d)})},editSaved:function(){this.edited=!1},setValue:function(a,b){b=b?b:-1,this.editor.setValue(a,b)},getValue:function(){return this.editor.getValue()},getAnnotations:function(){return this.editor.getSession().getAnnotations()},hadValidCode:function(){var a=this.getAnnotations();return _.every(a,function(a){return b.isIgnorableError(a.raw)},this)}}),d}),define("modules/databases/views",["app","modules/fauxton/components","api","modules/databases/resources"],function(a,b,c,d){var e={};return e.Item=c.View.extend({template:"templates/databases/item",tagName:"tr",establish:function(){return[this.model.fetch()]},serialize:function(){return{encoded:a.mixins.safeURLName(this.model.get("name")),database:this.model,docLimit:d.DocLimit}}}),e.List=c.View.extend({dbLimit:20,perPage:20,template:"templates/databases/list",events:{"click button.all":"selectAll","submit form#jump-to-db":"switchDatabase"},initialize:function(){var b=a.getParams();this.page=b.page?parseInt(b.page,10):1},serialize:function(){return{databases:this.collection}},establish:function(){var a=this.paginated(),b=c.Deferred();return c.when(a.map(function(a){return a.status.fetch()})).always(function(){b.resolve()}),[b]},switchDatabase:function(b,e){b&&b.preventDefault();var f=this.$el.find("[name='search-query']").val().trim();if(e&&(f=e),f&&this.collection.where({id:a.mixins.safeURLName(f)}).length>0){var g=["/database/",a.mixins.safeURLName(f),"/_all_docs?limit="+d.DocLimit].join("");c.navigate(g)}else c.addNotification({msg:"Database does not exist.",type:"error"})},paginated:function(){var a=(this.page-1)*this.perPage,b=this.page*this.perPage;return this.collection.slice(a,b)},beforeRender:function(){this.insertView("#newButton",new e.NewDatabaseButton({collection:this.collection})),_.each(this.paginated(),function(a){this.insertView("table.databases tbody",new e.Item({model:a}))},this),this.insertView("#database-pagination",new b.Pagination({page:this.page,perPage:this.perPage,total:this.collection.length,urlFun:function(a){return"#/_all_dbs?page="+a}}))},setPage:function(a){this.page=a||1},afterRender:function(){var a=this;this.dbSearchTypeahead=new b.DbSearchTypeahead({dbLimit:this.dbLimit,el:"input.search-autocomplete",onUpdate:function(b){a.switchDatabase(null,b)}}),this.dbSearchTypeahead.render()},selectAll:function(a){$("input:checkbox").attr("checked",!$(a.target).hasClass("active"))}}),e.NewDatabaseButton=c.View.extend({template:"templates/databases/newdatabase",events:{"click a#new":"newDatabase"},newDatabase:function(){var b,e,f=prompt("Name of database","newdatabase");if(null!==f){if(0===f.length)return b=c.addNotification({msg:"Please enter a valid database name",type:"error",clear:!0}),void 0;e=new this.collection.model({id:f,name:f}),b=c.addNotification({msg:"Creating database."}),e.save().done(function(){b=c.addNotification({msg:"Database created successfully",type:"success",clear:!0});var e="#/database/"+a.mixins.safeURLName(f)+"/_all_docs?limit="+d.DocLimit;a.router.navigate(e,{trigger:!0})}).error(function(a){var d=JSON.parse(a.responseText).reason;b=c.addNotification({msg:"Create database failed: "+d,type:"error",clear:!0})})}}}),e.Sidebar=c.View.extend({template:"templates/databases/sidebar",events:{"click a#new":"newDatabase","click a#owned":"showMine","click a#shared":"showShared"},newDatabase:function(){var b,e,f=prompt("Name of database","newdatabase");if(null!==f){if(0===f.length)return b=c.addNotification({msg:"Please enter a valid database name",type:"error",clear:!0}),void 0;e=new this.collection.model({id:encodeURIComponent(f),name:f}),b=c.addNotification({msg:"Creating database."}),e.save().done(function(){b=c.addNotification({msg:"Database created successfully",type:"success",clear:!0});var e="#/database/"+f+"/_all_docs?limit="+d.DocLimit;a.router.navigate(e,{trigger:!0})}).error(function(a){var d=JSON.parse(a.responseText).reason;b=c.addNotification({msg:"Create database failed: "+d,type:"error",clear:!0})})}},showMine:function(){$.contribute("Show unshared databases","app/addons/databases/views.js")},showShared:function(){$.contribute("Show shared databases (e.g. continuous replications to/from the database)","app/addons/databases/views.js")}}),e}),define("modules/databases/routes",["app","api","modules/databases/resources","modules/databases/views"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"one_pane",crumbs:[{name:"Databases",link:"/_all_dbs"}],routes:{"":"allDatabases","index.html":"allDatabases","_all_dbs(:params)":"allDatabases"},apiUrl:function(){return[this.databases.url("apiurl"),this.databases.documentation()]},selectedHeader:"Databases",initialize:function(){this.databases=new c.List,this.deferred=b.Deferred()},allDatabases:function(){var b=a.getParams(),c=b.page;this.databasesView=this.setView("#dashboard-content",new d.List({collection:this.databases})),this.databasesView.setPage(c)},establish:function(){return[this.databases.fetch()]}});return c.RouteObjects=[e],c}),define("modules/databases/base",["app","api","modules/databases/routes","modules/databases/views"],function(a,b,c,d){return c.Views=d,c.databaseUrl=function(b){var d=_.isObject(b)?b.id:b,e=a.mixins.safeURLName(d);return["/database/",e,"/_all_docs?limit="+c.DocLimit].join("")},c}),define("modules/pouchdb/pouch.collate.js",["app","api","modules/pouchdb/pouch.collate.js"],function(){var a={};a.collate=function(a,f){var g=e(a),h=e(f);return g-h!==0?g-h:null===a?0:"number"==typeof a?a-f:"boolean"==typeof a?f>a?-1:1:"string"==typeof a?b(a,f):Array.isArray(a)?d(a,f):"object"==typeof a?c(a,f):void 0};var b=function(a,b){return a===b?0:a>b?1:-1},c=function(b,c){for(var d=Object.keys(b),e=Object.keys(c),f=Math.min(d.length,e.length),g=0;f>g;g++){var h=a.collate(d[g],e[g]);if(0!==h)return h;if(h=a.collate(b[d[g]],c[e[g]]),0!==h)return h}return d.length===e.length?0:d.length>e.length?1:-1},d=function(b,c){for(var d=Math.min(b.length,c.length),e=0;d>e;e++){var f=a.collate(b[e],c[e]);if(0!==f)return f}return b.length===c.length?0:b.length>c.length?1:-1},e=function(a){var b=["boolean","number","string","object"];return-1!==b.indexOf(typeof a)?null===a?1:b.indexOf(typeof a)+2:Array.isArray(a)?4.5:void 0};return a}),define("modules/pouchdb/pouchdb.mapreduce.js",["app","api","modules/pouchdb/pouch.collate.js"],function(app,FauxtonAPI,Collate){var Pouch={};Pouch.collate=Collate.collate;var MapReduce=function(){function viewQuery(fun,options){function sum(a){return a.reduce(function(a,b){return a+b},0)}if(console.log("IN VIEW QUERY"),options.complete){var results=[],current=null,num_started=0,completed=!1,emit=function(a,b){var c={id:current.doc._id,key:a,value:b};if(!(options.startkey&&Pouch.collate(a,options.startkey)<0||options.endkey&&Pouch.collate(a,options.endkey)>0||options.key&&0!==Pouch.collate(a,options.key))){if(num_started++,options.include_docs)throw{error:"Include Docs not supported"};console.log("EMITTING: ",c),results.push(c)}};eval("fun.map = "+fun.map.toString()+";"),fun.reduce&&options.reduce&&(builtInReduce[fun.reduce]&&(console.log("built in reduce"),fun.reduce=builtInReduce[fun.reduce]),eval("fun.reduce = "+fun.reduce.toString()+";"));var conflicts="conflicts"in options?options.conflicts:!1,checkComplete=function(){if(console.log("check"),completed&&results.length==num_started){if(results.sort(function(a,b){return Pouch.collate(a.key,b.key)}),options.descending&&results.reverse(),options.reduce===!1)return options.complete(null,{rows:results});console.log("reducing",options);var a=[];results.forEach(function(b){var c=a[a.length-1]||null;return c&&0===Pouch.collate(c.key[0][0],b.key)?(c.key.push([b.key,b.id]),c.value.push(b.value),void 0):(a.push({key:[[b.key,b.id]],value:[b.value]}),void 0)}),a.forEach(function(a){a.value=fun.reduce(a.key,a.value)||null,a.key=a.key[0][0]}),console.log("GROUPs",a),options.complete(null,{rows:a})}};return options.docs?(_.each(options.docs,function(a){current={doc:a},fun.map.call(this,a)},this),completed=!0,checkComplete()):!1}}function query(a,b,c){if("function"==typeof b&&(c=b,b={}),c&&(b.complete=c),"object"==typeof a)return console.log("RUNNING VIEW QUERY",a,b,arguments),viewQuery(a,b);throw{error:"Shouldn't have gotten here"}}var builtInReduce={_sum:function(a,b){return sum(b)},_count:function(a,b,c){return c?sum(b):b.length},_stats:function(a,b){return{sum:sum(b),min:Math.min.apply(null,b),max:Math.max.apply(null,b),count:b.length,sumsqr:function(){_sumsqr=0;for(var a in b)_sumsqr+=b[a]*b[a];return _sumsqr}()}}};return{query:query}};return MapReduce._delete=function(){},MapReduce()}),define("modules/pouchdb/base",["app","api","modules/pouchdb/pouchdb.mapreduce.js"],function(a,b,c){var d={};return d.MapReduce=c,d.runViewQuery=function(a,c){var e=b.Deferred(),f=function(a,b){e.resolve(b)},g=_.extend(c,{complete:f});return d.MapReduce.query(a,g),e},d});var q=null;window.PR_SHOULD_USE_CONTINUATION=!0,function(){function a(a){function b(a){var b=a.charCodeAt(0);if(92!==b)return b;var c=a.charAt(1);return(b=l[c])?b:c>="0"&&"7">=c?parseInt(a.substring(1),8):"u"===c||"x"===c?parseInt(a.substring(2),16):a.charCodeAt(1)}function c(a){return 32>a?(16>a?"\\x0":"\\x")+a.toString(16):(a=String.fromCharCode(a),("\\"===a||"-"===a||"["===a||"]"===a)&&(a="\\"+a),a)}function d(a){for(var d=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=[],e=[],f="^"===d[0],g=f?1:0,h=d.length;h>g;++g){var i=d[g];if(/\\[bdsw]/i.test(i))a.push(i);else{var j,i=b(i);h>g+2&&"-"===d[g+1]?(j=b(d[g+2]),g+=2):j=i,e.push([i,j]),65>j||i>122||(65>j||i>90||e.push([32|Math.max(65,i),32|Math.min(j,90)]),97>j||i>122||e.push([-33&Math.max(97,i),-33&Math.min(j,122)]))}}for(e.sort(function(a,b){return a[0]-b[0]||b[1]-a[1]}),d=[],i=[0/0,0/0],g=0;g<e.length;++g)h=e[g],h[0]<=i[1]+1?i[1]=Math.max(i[1],h[1]):d.push(i=h);for(e=["["],f&&e.push("^"),e.push.apply(e,a),g=0;g<d.length;++g)h=d[g],e.push(c(h[0])),h[1]>h[0]&&(h[1]+1>h[0]&&e.push("-"),e.push(c(h[1])));return e.push("]"),e.join("")}function e(a){for(var b=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=b.length,e=[],h=0,i=0;c>h;++h){var j=b[h];"("===j?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&i>=j&&(e[j]=-1)}for(h=1;h<e.length;++h)-1===e[h]&&(e[h]=++f);for(i=h=0;c>h;++h)j=b[h],"("===j?(++i,void 0===e[i]&&(b[h]="(?:")):"\\"===j.charAt(0)&&(j=+j.substring(1))&&i>=j&&(b[h]="\\"+e[i]);for(i=h=0;c>h;++h)"^"===b[h]&&"^"!==b[h+1]&&(b[h]="");if(a.ignoreCase&&g)for(h=0;c>h;++h)j=b[h],a=j.charAt(0),j.length>=2&&"["===a?b[h]=d(j):"\\"!==a&&(b[h]=j.replace(/[A-Za-z]/g,function(a){return a=a.charCodeAt(0),"["+String.fromCharCode(-33&a,32|a)+"]"}));return b.join("")}for(var f=0,g=!1,h=!1,i=0,j=a.length;j>i;++i){var k=a[i];if(k.ignoreCase)h=!0;else if(/[a-z]/i.test(k.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){g=!0,h=!1;break}}for(var l={b:8,t:9,n:10,v:11,f:12,r:13},m=[],i=0,j=a.length;j>i;++i){if(k=a[i],k.global||k.multiline)throw Error(""+k);m.push("(?:"+e(k)+")")}return RegExp(m.join("|"),h?"gi":"g")}function b(a){function b(a){switch(a.nodeType){case 1:if(d.test(a.className))break;for(var c=a.firstChild;c;c=c.nextSibling)b(c);c=a.nodeName,("BR"===c||"LI"===c)&&(e[h]="\n",g[h<<1]=f++,g[h++<<1|1]=a);break;case 3:case 4:c=a.nodeValue,c.length&&(c=i?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),e[h]=c,g[h<<1]=f,f+=c.length,g[h++<<1|1]=a)}}var c,d=/(?:^|\s)nocode(?:\s|$)/,e=[],f=0,g=[],h=0;a.currentStyle?c=a.currentStyle.whiteSpace:window.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var i=c&&"pre"===c.substring(0,3);return b(a),{a:e.join("").replace(/\n$/,""),c:g}}function c(a,b,c,d){b&&(a={a:b,d:a},c(a),d.push.apply(d,a.e))}function d(b,d){function e(a){for(var b=a.d,j=[b,"pln"],k=0,l=a.a.match(f)||[],m={},n=0,o=l.length;o>n;++n){var p,q=l[n],r=m[q],s=void 0;if("string"==typeof r)p=!1;else{var t=g[q.charAt(0)];if(t)s=q.match(t[1]),r=t[0];else{for(p=0;i>p;++p)if(t=d[p],s=q.match(t[1])){r=t[0];break}s||(r="pln")}!(p=r.length>=5&&"lang-"===r.substring(0,5))||s&&"string"==typeof s[1]||(p=!1,r="src"),p||(m[q]=r)}if(t=k,k+=q.length,p){p=s[1];var u=q.indexOf(p),v=u+p.length;s[2]&&(v=q.length-s[2].length,u=v-p.length),r=r.substring(5),c(b+t,q.substring(0,u),e,j),c(b+t+u,p,h(r,p),j),c(b+t+v,q.substring(v),e,j)}else j.push(b+t,r)}a.e=j}var f,g={};!function(){for(var c=b.concat(d),e=[],h={},i=0,j=c.length;j>i;++i){var k=c[i],l=k[3];if(l)for(var m=l.length;--m>=0;)g[l.charAt(m)]=k;k=k[1],l=""+k,h.hasOwnProperty(l)||(e.push(k),h[l]=q)}e.push(/[\S\s]/),f=a(e)}();var i=d.length;return e}function e(a){var b=[],c=[];a.tripleQuotedStrings?b.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?b.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,q,"'\"`"]):b.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]),a.verbatimStrings&&c.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var e=a.hashComments;
-return e&&(a.cStyleComments?(e>1?b.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):b.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),c.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):b.push(["com",/^#[^\n\r]*/,q,"#"])),a.cStyleComments&&(c.push(["com",/^\/\/[^\n\r]*/,q]),c.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q])),a.regexLiterals&&c.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]),(e=a.types)&&c.push(["typ",e]),a=(""+a.keywords).replace(/^ | $/g,""),a.length&&c.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]),b.push(["pln",/^\s+/,q," \r\n  "]),c.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]),d(b,c)}function f(a,b){function c(a){switch(a.nodeType){case 1:if(f.test(a.className))break;if("BR"===a.nodeName)d(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)c(a);break;case 3:case 4:if(i){var b=a.nodeValue,e=b.match(g);if(e){var j=b.substring(0,e.index);a.nodeValue=j,(b=b.substring(e.index+e[0].length))&&a.parentNode.insertBefore(h.createTextNode(b),a.nextSibling),d(a),j||a.parentNode.removeChild(a)}}}}function d(a){function b(a,c){var d=c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),f=a.nextSibling;e.appendChild(d);for(var g=f;g;g=f)f=g.nextSibling,e.appendChild(g)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var c,a=b(a.nextSibling,0);(c=a.parentNode)&&1===c.nodeType;)a=c;j.push(a)}var e,f=/(?:^|\s)nocode(?:\s|$)/,g=/\r\n?|\n/,h=a.ownerDocument;a.currentStyle?e=a.currentStyle.whiteSpace:window.getComputedStyle&&(e=h.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var i=e&&"pre"===e.substring(0,3);for(e=h.createElement("LI");a.firstChild;)e.appendChild(a.firstChild);for(var j=[e],k=0;k<j.length;++k)c(j[k]);b===(0|b)&&j[0].setAttribute("value",b);var l=h.createElement("OL");l.className="linenums";for(var m=Math.max(0,b-1|0)||0,k=0,n=j.length;n>k;++k)e=j[k],e.className="L"+(k+m)%10,e.firstChild||e.appendChild(h.createTextNode(" ")),l.appendChild(e);a.appendChild(l)}function g(a,b){for(var c=b.length;--c>=0;){var d=b[c];u.hasOwnProperty(d)?window.console&&console.warn("cannot override language handler %s",d):u[d]=a}}function h(a,b){return a&&u.hasOwnProperty(a)||(a=/^\s*</.test(b)?"default-markup":"default-code"),u[a]}function i(a){var c=a.g;try{var d=b(a.h),e=d.a;a.a=e,a.c=d.c,a.d=0,h(c,e)(a);var f=/\bMSIE\b/.test(navigator.userAgent),c=/\n/g,g=a.a,i=g.length,d=0,j=a.c,k=j.length,e=0,l=a.e,m=l.length,a=0;l[m]=i;var n,o;for(o=n=0;m>o;)l[o]!==l[o+2]?(l[n++]=l[o++],l[n++]=l[o++]):o+=2;for(m=n,o=n=0;m>o;){for(var p=l[o],q=l[o+1],r=o+2;m>=r+2&&l[r+1]===q;)r+=2;l[n++]=p,l[n++]=q,o=r}for(l.length=n;k>e;){var s,t=j[e+2]||i,u=l[a+2]||i,r=Math.min(t,u),v=j[e+1];if(1!==v.nodeType&&(s=g.substring(d,r))){f&&(s=s.replace(c,"\r")),v.nodeValue=s;var w=v.ownerDocument,x=w.createElement("SPAN");x.className=l[a+1];var y=v.parentNode;y.replaceChild(x,v),x.appendChild(v),t>d&&(j[e+1]=v=w.createTextNode(g.substring(r,t)),y.insertBefore(v,x.nextSibling))}d=r,d>=t&&(e+=2),d>=u&&(a+=2)}}catch(z){"console"in window&&console.log(z&&z.stack?z.stack:z)}}var j=["break,continue,do,else,for,if,return,while"],k=[[j,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],l=[k,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],m=[k,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],n=[m,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],k=[k,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],o=[j,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],p=[j,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],j=[j,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],r=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,s=/\S/,t=e({keywords:[l,n,k,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+o,p,j],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),u={};g(t,["default-code"]),g(d([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),g(d([["pln",/^\s+/,q," \r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]),g(d([],[["atv",/^[\S\s]+/]]),["uq.val"]),g(e({keywords:l,hashComments:!0,cStyleComments:!0,types:r}),["c","cc","cpp","cxx","cyc","m"]),g(e({keywords:"null,true,false"}),["json"]),g(e({keywords:n,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:r}),["cs"]),g(e({keywords:m,cStyleComments:!0}),["java"]),g(e({keywords:j,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]),g(e({keywords:o,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py"]),g(e({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]),g(e({keywords:p,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]),g(e({keywords:k,cStyleComments:!0,regexLiterals:!0}),["js"]),g(e({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),g(d([],[["str",/^[\S\s]+/]]),["regex"]),window.prettyPrintOne=function(a,b,c){var d=document.createElement("PRE");return d.innerHTML=a,c&&f(d,c),i({g:b,i:c,h:d}),d.innerHTML},window.prettyPrint=function(a){function b(){for(var c=window.PR_SHOULD_USE_CONTINUATION?j.now()+250:1/0;l<d.length&&j.now()<c;l++){var e=d[l],g=e.className;if(g.indexOf("prettyprint")>=0){var h,n,g=g.match(m);if(n=!g){n=e;for(var o=void 0,p=n.firstChild;p;p=p.nextSibling)var q=p.nodeType,o=1===q?o?n:p:3===q?s.test(p.nodeValue)?n:o:o;n=(h=o===n?void 0:o)&&"CODE"===h.tagName}for(n&&(g=h.className.match(m)),g&&(g=g[1]),n=!1,o=e.parentNode;o;o=o.parentNode)if(("pre"===o.tagName||"code"===o.tagName||"xmp"===o.tagName)&&o.className&&o.className.indexOf("prettyprint")>=0){n=!0;break}n||((n=(n=e.className.match(/\blinenums\b(?::(\d+))?/))?n[1]&&n[1].length?+n[1]:!0:!1)&&f(e,n),k={g:g,h:e,i:n},i(k))}}l<d.length?setTimeout(b,250):a&&a()}for(var c=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],d=[],e=0;e<c.length;++e)for(var g=0,h=c[e].length;h>g;++g)d.push(c[e][g]);var c=q,j=Date;j.now||(j={now:function(){return+new Date}});var k,l=0,m=/\blang(?:uage)?-([\w.]+)(?!\S)/;b()},window.PR={createSimpleLexer:d,registerLangHandler:g,sourceDecorator:e,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}}(),define("plugins/prettify",function(){}),define("modules/documents/views",["app","api","modules/fauxton/components","modules/documents/resources","modules/databases/resources","modules/pouchdb/base","resizeColumns","plugins/prettify"],function(a,b,c,d,e,f){var g={};return g.SearchBox=b.View.extend({template:"templates/documents/search",tagName:"form",initialize:function(a){this.collection=a.collection,this.database=a.database},afterRender:function(){var a=this.collection,c=this.$el,d=c.find("input#searchbox"),e=this.database;c.submit(function(a){a.preventDefault();var f=c.find("input#view").val().split("/"),g="#database/"+e+"/_design/";g+=f[0]+"/_view/"+f[1],""!==d.val()&&(g+='?startkey="'+d.val()+'"'),b.navigate(g)}),d.typeahead({source:function(){var b=_.map(a.pluck("doc"),function(a){return _.map(_.keys(a.views),function(b){return a._id.split("/")[1]+"/"+b})});return _.flatten(b)},minLength:3,updater:function(a){this.$element.removeClass("span12"),this.$element.addClass("span6"),this.$element.attr("placeholder","Search by view key"),$('<span class="add-on span6">'+a+"</span>").insertBefore(this.$element),$('<input type="hidden" id="view" value="'+a+'"/>').insertBefore(this.$element),$(".typehead").unbind()}})}}),g.UploadModal=b.View.extend({template:"templates/documents/upload_modal",disableLoader:!0,initialize:function(){_.bindAll(this)},events:{"click a#upload-btn":"uploadFile"},uploadFile:function(a){a.preventDefault();var b=this.model.get("_rev"),c=this,d=this.$("#file-upload");return b?0===$('input[type="file"]')[0].files.length?this.set_error_msg("Selected a file to be uploaded."):(this.$("#_rev").val(b),d.ajaxSubmit({url:this.model.url(),type:"POST",beforeSend:this.beforeSend,uploadProgress:this.uploadProgress,success:this.success,error:function(a){return console.log("ERR on upload",a),c.set_error_msg("Could not upload document: "+JSON.parse(a.responseText).reason)}}),void 0):this.set_error_msg("The document needs to be saved before adding an attachment.")},success:function(){var a=this.hideModal,c=this.$("#file-upload");b.triggerRouteEvent("reRenderDoc"),setTimeout(function(){c.clearForm(),a(),$(".modal-backdrop").remove()},1e3)},uploadProgress:function(a,b,c,d){this.$(".bar").css({width:d+"%"})},beforeSend:function(){this.$(".progress").removeClass("hide")},showModal:function(){this.$(".bar").css({width:"0%"}),this.$(".progress").addClass("hide"),this.clear_error_msg(),this.$(".modal").modal(),$(".modal-backdrop").css("z-index",1025)},hideModal:function(){this.$(".modal").modal("hide")},set_error_msg:function(a){var b;b="string"==typeof a?a:JSON.parse(a.responseText).reason,this.$("#modal-error").text(b).removeClass("hide")},clear_error_msg:function(){this.$("#modal-error").text(" ").addClass("hide")},serialize:function(){return this.model.toJSON()}}),g.DuplicateDocModal=b.View.extend({template:"templates/documents/duplicate_doc_modal",initialize:function(){_.bindAll(this)},events:{"click #duplicate-btn":"duplicate"},duplicate:function(c){c.preventDefault();var d=this.$("#dup-id").val(),e=a.mixins.safeURLName(d);this.hideModal(),b.triggerRouteEvent("duplicateDoc",e)},_showModal:function(){this.$(".bar").css({width:"0%"}),this.$(".progress").addClass("hide"),this.clear_error_msg(),this.$(".modal").modal(),$(".modal-backdrop").css("z-index",1025)},showModal:function(){var a=this._showModal,c=this.setDefaultIdValue,d=new b.UUID;d.fetch().then(function(){c(d.next()),a()})},setDefaultIdValue:function(a){this.$("#dup-id").val(a)},hideModal:function(){this.$(".modal").modal("hide")},set_error_msg:function(a){var b;b="string"==typeof a?a:JSON.parse(a.responseText).reason,this.$("#modal-error").text(b).removeClass("hide")},clear_error_msg:function(){this.$("#modal-error").text(" ").addClass("hide")},serialize:function(){return this.model.toJSON()}}),g.FieldEditorTabs=b.View.extend({template:"templates/documents/doc_field_editor_tabs",disableLoader:!0,initialize:function(a){this.selected=a.selected},events:{},updateSelected:function(a){this.selected=a,this.$(".active").removeClass("active"),this.$("#"+this.selected).addClass("active")},serialize:function(){var a=this.selected;return{doc:this.model,isNewDoc:this.model.isNewDoc(),isSelectedClass:function(b){return b&&b===a?"active":""}}},establish:function(){return[this.model.fetch()]}}),g.Document=b.View.extend({template:"templates/documents/all_docs_item",tagName:"tr",className:"all-docs-item",events:{"click button.delete":"destroy","dblclick pre.prettyprint":"edit"},attributes:function(){return{"data-id":this.model.id}},serialize:function(){return{doc:this.model}},establish:function(){return[this.model.fetch()]},edit:function(a){a.preventDefault(),b.navigate("#"+this.model.url("app"))},destroy:function(a){a.preventDefault();var c=this;return window.confirm("Are you sure you want to delete this doc?")?(this.model.destroy().then(function(){b.addNotification({msg:"Succesfully destroyed your doc"}),c.$el.fadeOut(function(){c.remove()}),c.model.collection.remove(c.model.id),c.model.id.match("_design")&&b.triggerRouteEvent("reloadDesignDocs")},function(){b.addNotification({msg:"Failed to destroy your doc!",type:"error"})}),void 0):!1}}),g.Row=b.View.extend({template:"templates/documents/index_row_docular",tagName:"tr",events:{"click button.delete":"destroy"},destroy:function(a){a.preventDefault(),window.alert("Cannot delete a document generated from a view.")},serialize:function(){return{doc:this.model}}}),g.IndexItem=b.View.extend({template:"templates/documents/index_menu_item",tagName:"li",initialize:function(a){this.index=a.index,this.ddoc=a.ddoc,this.database=a.database,this.selected=!!a.selected},serialize:function(){return{index:this.index,ddoc:this.ddoc,database:this.database,index_clean:a.mixins.removeSpecialCharacters(this.index),ddoc_clean:a.mixins.removeSpecialCharacters(this.ddoc),index_encoded:a.mixins.safeURLName(this.index),ddoc_encoded:a.mixins.safeURLName(this.ddoc),database_encoded:a.mixins.safeURLName(this.database),selected:this.selected}},afterRender:function(){this.selected&&($("#sidenav ul.nav-list li").removeClass("active"),this.$el.addClass("active"))}}),g.AllDocsNumber=b.View.extend({template:"templates/documents/all_docs_number",initialize:function(a){this.newView=a.newView||!1,this.listenTo(this.collection,"totalRows:decrement",this.render)},serialize:function(){var b=0,c=0,d=!1;return this.newView||(b=this.collection.totalRows(),d=this.collection.updateSeq()),c=this.collection.recordStart(),{database:a.mixins.safeURLName(this.collection.database.id),updateSeq:d,offset:c,totalRows:b,numModels:this.collection.models.length+c-1}}}),g.AllDocsLayout=b.View.extend({template:"templates/documents/all_docs_layout",className:"row",initialize:function(a){this.database=a.database,this.params=a.params},events:{"click #toggle-query":"toggleQuery"},toggleQuery:function(){this.$("#query").toggle("fast")},beforeRender:function(){this.advancedOptions=this.insertView("#query",new g.AdvancedOptions({updateViewFn:this.updateView,previewFn:this.previewView,hasReduce:!1,showPreview:!1,database:this.database})),this.$("#query").hide()},afterRender:function(){this.params&&this.advancedOptions.updateFromParams(this.params)},updateView:function(a,c){a.preventDefault();var d=c.errorParams,e=c.params;if(_.any(d))return _.map(d,function(a){return b.addNotification({msg:"JSON Parse Error on field: "+a.name,type:"error",selector:".advanced-options .errors-container"})}),b.addNotification({msg:"Make sure that strings are properly quoted and any other values are valid JSON structures",type:"warning",selector:".advanced-options .errors-container"}),!1;var f=window.location.hash.replace(/\?.*$/,"");f=f+"?"+$.param(e),b.navigate(f,{trigger:!1}),b.triggerRouteEvent("updateAllDocs",{allDocs:!0})},previewView:function(a){a.preventDefault()}}),g.AllDocsList=b.View.extend({template:"templates/documents/all_docs_list",events:{"click button.all":"selectAll","click button.bulk-delete":"bulkDelete","click #collapse":"collapse","change .row-select":"toggleTrash"},toggleTrash:function(){this.$(".row-select:checked").length>0?this.$(".bulk-delete").removeClass("disabled"):this.$(".bulk-delete").addClass("disabled")},initialize:function(a){this.nestedView=a.nestedView||g.Document,this.rows={},this.viewList=!!a.viewList,this.database=a.database,a.ddocInfo&&(this.designDocs=a.ddocInfo.designDocs,this.ddocID=a.ddocInfo.id),this.newView=a.newView||!1,this.expandDocs=!0,this.addPagination()},establish:function(){return this.newView?null:this.collection.fetch({reset:!0}).fail(function(){console.log("ERROR: ",arguments)})},selectAll:function(a){$("input:checkbox").prop("checked",!$(a.target).hasClass("active")).trigger("change")},serialize:function(){var a=!1;return this.collection.requestDurationInString&&(a=this.collection.requestDurationInString()),{viewList:this.viewList,requestDuration:a,expandDocs:this.expandDocs}},collapse:function(a){a.preventDefault(),this.expandDocs=this.expandDocs?!1:!0,this.render()},bulkDelete:function(){var a=this,c=this.$el.find("input.row-select:checked").parents("tr.all-docs-item").map(function(){return $(this).attr("data-id")}).get();return 0!==c.length&&window.confirm("Are you sure you want to delete these "+c.length+" docs?")?(_.each(c,function(c){var d=this.collection.get(c);d.destroy().then(function(){a.rows[c].$el.fadeOut(function(){$(this).remove()}),d.collection.remove(d.id),console.log(d.id.match("_design"),!!d.id.match("_design")),d.id.match("_design")&&b.triggerRouteEvent("reloadDesignDocs"),a.$(".bulk-delete").addClass("disabled")},function(){b.addNotification({msg:"Failed to destroy your doc!",type:"error"})})},this),void 0):!1},addPagination:function(){var a=this.collection;this.pagination=new c.IndexPagination({collection:this.collection,scrollToSelector:"#dashboard-content",previousUrlfn:function(){return a.urlPreviousPage(20,this.previousIds.pop())},canShowPreviousfn:function(){return 0===a.viewMeta.offset?!1:!0},canShowNextfn:function(){return 0===a.length||a.viewMeta.offset+a.length+2>=a.viewMeta.total_rows?!1:!0},nextUrlfn:function(){return a.urlNextPage(20)}})},beforeRender:function(){this.allDocsNumber=this.setView("#item-numbers",new g.AllDocsNumber({collection:this.collection,newView:this.newView})),this.insertView("#documents-pagination",this.pagination);var a=this.expandDocs?this.collection:this.collection.simple();a.each(function(a){this.rows[a.id]=this.insertView("table.all-docs tbody",new this.nestedView({model:a}))},this)},afterRender:function(){prettyPrint()}}),g.Doc=b.View.extend({template:"templates/documents/doc",events:{"click button.save-doc":"saveDoc","click button.delete":"destroy","click button.duplicate":"duplicate","click button.upload":"upload","click button.cancel-button":"goback"},disableLoader:!0,initialize:function(a){this.database=a.database,_.bindAll(this)},goback:function(){b.navigate(this.database.url("index")+"?limit=100")},destroy:function(){if(this.model.isNewDoc())return b.addNotification({msg:"This document has not been saved yet.",type:"warning"}),void 0;if(!window.confirm("Are you sure you want to delete this doc?"))return!1;var a=this.model.database;this.model.destroy().then(function(){b.addNotification({msg:"Succesfully destroyed your doc"}),b.navigate(a.url("index"))},function(){b.addNotification({msg:"Failed to destroy your doc!",type:"error"})})},beforeRender:function(){this.uploadModal=this.setView("#upload-modal",new g.UploadModal({model:this.model})),this.uploadModal.render(),this.duplicateModal=this.setView("#duplicate-modal",new g.DuplicateDocModal({model:this.model})),this.duplicateModal.render()},upload:function(a){return a.preventDefault(),this.model.isNewDoc()?(b.addNotification({msg:"Please save the document before uploading an attachment.",type:"warning"}),void 0):(this.uploadModal.showModal(),void 0)},duplicate:function(a){return this.model.isNewDoc()?(b.addNotification({msg:"Please save the document before duplicating it.",type:"warning"}),void 0):(a.preventDefault(),this.duplicateModal.showModal(),void 0)},updateValues:function(){var a;this.model.changedAttributes()&&(a=b.addNotification({msg:"Document saved successfully.",type:"success",clear:!0}),this.editor.setValue(this.model.prettyJSON()))},establish:function(){var a=this.model.fetch(),c=this.database.safeID(),d=$.Deferred();return a.then(function(){d.resolve()},function(a){404===a.status&&(b.addNotification({msg:"The document does not exist",type:"error",clear:!0}),b.navigate("/database/"+c+"/_all_docs?limit="+e.DocLimit)),d.reject()}),d},saveDoc:function(){var a,c=this,d=this.editor,e=this.getDocFromEditor();e?(this.getDocFromEditor(),a=b.addNotification({msg:"Saving document."}),this.model.save().then(function(){d.editSaved(),b.navigate("/database/"+c.database.safeID()+"/"+c.model.id)}).fail(function(c){var d=JSON.parse(c.responseText).reason;a=b.addNotification({msg:"Save failed: "+d,type:"error",clear:!0,selector:"#doc .errors-container"})})):this.model.validationError&&"Cannot change a documents id."===this.model.validationError?(a=b.addNotification({msg:"Cannot save: Cannot change a documents _id, try Duplicate doc instead!",type:"error",selector:"#doc .errors-container"}),delete this.model.validationError):a=b.addNotification({msg:"Please fix the JSON errors and try again.",type:"error",selector:"#doc .errors-container"})},getDocFromEditor:function(){return this.hasValidCode()?(json=JSON.parse(this.editor.getValue()),this.model.set(json,{validate:!0}),this.model.validationError?!1:this.model):!1},hasValidCode:function(){var a=this.editor.getAnnotations();return 0===a.length},serialize:function(){return{doc:this.model,attachments:this.getAttachments()}},getAttachments:function(){var a=this.model.get("_attachments");return a?_.map(a,function(a,b){return{fileName:b,size:a.length,contentType:a.content_type,url:this.model.url()+"/"+b}},this):!1},afterRender:function(){var a=this.saveDoc;this.editor=new c.Editor({editorId:"editor-container",commands:[{name:"save",bindKey:{win:"Ctrl-S",mac:"Ctrl-S"},exec:function(){a()},readOnly:!0}]}),this.editor.render(),this.model.on("sync",this.updateValues,this)},cleanup:function(){this.editor.remove()}}),g.DocFieldEditor=b.View.extend({template:"templates/documents/doc_field_editor",disableLoader:!0,events:{"click button.save":"saveDoc"},saveDoc:function(){b.addNotification({type:"warning",msg:"Save functionality coming soon."})},serialize:function(){return{doc:this.getModelWithoutAttachments(),attachments:this.getAttachments()}},getModelWithoutAttachments:function(){var a=this.model.toJSON();return delete a._attachments,a},getAttachments:function(){var a=this.model.get("_attachments");return a?_.map(a,function(a,b){return{fileName:b,size:a.length,contentType:a.content_type,url:this.model.url()+"/"+b}},this):[]},establish:function(){return[this.model.fetch()]}}),g.AdvancedOptions=b.View.extend({template:"templates/documents/advanced_options",className:"advanced-options well",initialize:function(a){this.database=a.database,this.ddocName=a.ddocName,this.viewName=a.viewName,this.updateViewFn=a.updateViewFn,this.previewFn=a.previewFn,this.hasReduce="undefined"==typeof a.hasReduce?!0:a.hasReduce,this.showPreview="undefined"==typeof a.showPreview?!0:a.showPreview},events:{"change form.view-query-update input":"updateFilters","change form.view-query-update select":"updateFilters","submit form.view-query-update":"updateView","click button.preview":"previewView"},beforeRender:function(){if(this.viewName&&this.ddocName){var a=b.getExtensions("advancedOptions:ViewButton");_.each(a,function(a){this.insertView("#button-options",a),a.update(this.database,this.ddocName,this.viewName)},this)}},renderOnUpdatehasReduce:function(a){this.hasReduce=a,this.render()},queryParams:function(){var a=this.$(".view-query-update"),b=_.filter(a.serializeArray(),function(a){return a.value}),c=["key","keys","startkey","endkey"],d=_.filter(b,function(a){if(!_.contains(c,a.name))return!1;try{return JSON.parse(a.value),!1}catch(b){return!0}});return{params:b,errorParams:d}},updateFilters:function(a){a.preventDefault();var b=$(a.currentTarget),c=b.attr("name");this.updateFiltersFor(c,b)},updateFiltersFor:function(a,c){var d=c.parents("form.view-query-update:first");switch(a){case"reduce":if(c.prop("checked")===!0){if(d.find("input[name=include_docs]").prop("checked")===!0){d.find("input[name=include_docs]").prop("checked",!1);{b.addNotification({msg:"include_docs has been disabled as you cannot include docs on a reduced view",type:"warn",selector:".view.show .all-docs-list.errors-container"})}}d.find("input[name=include_docs]").prop("disabled",!0),d.find("select[name=group_level]").prop("disabled",!1)}else d.find("select[name=group_level]").prop("disabled",!0),d.find("input[name=include_docs]").prop("disabled",!1);break;case"include_docs":}},updateFromParams:function(a){var b=this.$el.find("form.view-query-update");_.each(a,function(a,c){var d;switch(c){case"limit":case"group_level":b.find("select[name='"+c+"']").val(a);break;case"include_docs":case"stale":case"descending":case"inclusive_end":b.find("input[name='"+c+"']").prop("checked",!0);break;case"reduce":d=b.find("input[name='"+c+"']"),"true"==a&&d.prop("checked",!0),this.updateFiltersFor(c,d);break;default:b.find("input[name='"+c+"']").val(a)}},this)},updateView:function(a){this.updateViewFn(a,this.queryParams())},previewView:function(a){this.previewFn(a,this.queryParams())},serialize:function(){return{hasReduce:this.hasReduce,showPreview:this.showPreview}}}),g.DesignDocSelector=b.View.extend({template:"templates/documents/design_doc_selector",events:{"change select#ddoc":"updateDesignDoc"},initialize:function(a){this.ddocName=a.ddocName,this.database=a.database,this.listenTo(this.collection,"add",this.ddocAdded),this.DocModel=a.DocModel||d.Doc},ddocAdded:function(a){this.ddocName=a.id,this.render()},serialize:function(){return{ddocName:this.ddocName,ddocs:this.collection}},updateDesignDoc:function(){this.newDesignDoc()?this.$("#new-ddoc-section").show():this.$("#new-ddoc-section").hide()},newDesignDoc:function(){return"new-doc"===this.$("#ddoc").val()},newDocValidation:function(){return this.newDesignDoc()&&""===this.$("#new-ddoc").val()},getCurrentDesignDoc:function(){if(this.newDesignDoc()){var a={_id:"_design/"+this.$("#new-ddoc").val(),views:{},language:"javascript"},b=new this.DocModel(a,{database:this.database});return b}if(!this.newDesignDoc()){var c=this.$("#ddoc").val();return this.collection.find(function(a){return a.id===c}).dDocModel()}}}),g.ViewEditor=b.View.extend({template:"templates/documents/view_editor",builtinReduces:["_sum","_count","_stats"],events:{"click button.save":"saveView","click button.delete":"deleteView","change select#reduce-function-selector":"updateReduce","click button.preview":"previewView","click #db-views-tabs-nav":"toggleIndexNav"},langTemplates:{javascript:{map:"function(doc) {\n emit(doc._id, 1);\n}",reduce:"function(keys, values, rereduce){\n if (rereduce){\n return sum(values);\n } else {\n return values.length;\n }\n}"}},defaultLang:"javascript",initialize:function(a){this.newView=a.newView||!1,this.ddocs=a.ddocs,this.params=a.params,this.database=a.database,this.newView?this.viewName="newView":(this.ddocID=a.ddocInfo.id,this.viewName=a.viewName,this.ddocInfo=new d.DdocInfo({_id:this.ddocID},{database:this.database})),this.showIndex=!1,_.bindAll(this)},establish:function(){return this.ddocInfo?this.ddocInfo.fetch():void 0},updateValues:function(){var a;this.model.changedAttributes()&&(a=b.addNotification({msg:"Document saved successfully.",type:"success",clear:!0}),this.editor.setValue(this.model.prettyJSON()))},updateReduce:function(){var a=$("#reduce-function-selector"),b=$(".control-group.reduce-function");"CUSTOM"==a.val()?(this.createReduceEditor(),this.reduceEditor.setValue(this.langTemplates.javascript.reduce),b.show()):b.hide()},deleteView:function(a){if(a.preventDefault(),this.newView)return alert("Cannot delete a new view.");if(confirm("Are you sure you want to delete this view?")){var c,d=this,f=this.$("#index-name").val(),g=(this.$("#ddoc :selected").val(),this.getCurrentDesignDoc());g.removeDdocView(f),c=g.hasViews()?g.save():g.destroy(),c.then(function(){b.navigate("/database/"+d.database.safeID()+"/_all_docs?limit="+e.DocLimit),b.triggerRouteEvent("reloadDesignDocs")})}},saveView:function(c){var d,e=this;if(c&&c.preventDefault(),this.hasValidCode()&&""!==this.$("#new-ddoc:visible").val()){var f=this.mapEditor.getValue(),g=this.reduceVal(),h=this.$("#index-name").val(),i=this.getCurrentDesignDoc(),j=i.id;this.viewName=h,d=b.addNotification({msg:"Saving document.",selector:"#define-view .errors-container"}),i.setDdocView(h,f,g),i.save().then(function(){if(e.ddocs.add(i),e.mapEditor.editSaved(),e.reduceEditor&&e.reduceEditor.editSaved(),b.addNotification({msg:"View has been saved.",type:"success",selector:"#define-view .errors-container"}),e.newView){var c="/database/"+e.database.safeID()+"/"+i.safeID()+"/_view/"+a.mixins.safeURLName(h);b.navigate(c,{trigger:!1}),e.newView=!1,e.ddocID=i.safeID(),e.viewName=h,e.ddocInfo=i,e.showIndex=!0,e.render(),b.triggerRouteEvent("reloadDesignDocs",{selectedTab:a.mixins.removeSpecialCharacters(j.replace(/_design\//,""))+"_"+a.mixins.removeSpecialCharacters(h)})}e.reduceFunStr!==g&&(e.reduceFunStr=g,e.advancedOptions.renderOnUpdatehasReduce(e.hasReduce())),b.triggerRouteEvent("updateAllDocs",{ddoc:j,view:h})},function(a){var c=JSON.parse(a.responseText).reason;d=b.addNotification({msg:"Save failed: "+c,type:"error",clear:!0})})}else{var k=""===this.$("#new-ddoc:visible").val()?"Enter a design doc name":"Please fix the Javascript errors and try again.";d=b.addNotification({msg:k,type:"error",selector:"#define-view .errors-container"})}},updateView:function(a,c){if(a.preventDefault(),this.newView)return alert("Please save this new view before querying it.");var d=c.errorParams,e=c.params;if(_.any(d))return _.map(d,function(a){return b.addNotification({msg:"JSON Parse Error on field: "+a.name,type:"error",selector:".advanced-options .errors-container"})}),b.addNotification({msg:"Make sure that strings are properly quoted and any other values are valid JSON structures",type:"warning",selector:".advanced-options .errors-container"}),!1;var f=window.location.hash.replace(/\?.*$/,"");f=f+"?"+$.param(e),b.navigate(f,{trigger:!1}),b.triggerRouteEvent("updateAllDocs",{ddoc:this.ddocID,view:this.viewName})},previewView:function(a,c){a.preventDefault();var d=this,g=this.mapVal(),h=this.reduceVal(),i=[];c&&c.params&&(i=c.params);var j=_.reduce(i,function(a,b){return a[b.name]=b.value,a},{reduce:!1});a.preventDefault(),b.addNotification({msg:"<strong>Warning!</strong> Preview executes the Map/Reduce functions in your browser, and may behave differently from CouchDB.",type:"warning",selector:".advanced-options .errors-container",fade:!0});
-var k=b.Deferred();this.database.allDocs?k.resolve():(this.database.buildAllDocs({limit:e.DocLimit.toString(),include_docs:!0}),k=this.database.allDocs.fetch()),k.then(function(){j.docs=d.database.allDocs.map(function(a){return a.get("doc")});var a=f.runViewQuery({map:g,reduce:h},j);a.then(function(a){b.triggerRouteEvent("updatePreviewDocs",{rows:a.rows,ddoc:d.getCurrentDesignDoc().id,view:d.viewName})})})},getCurrentDesignDoc:function(){return this.designDocSelector.getCurrentDesignDoc()},isCustomReduceEnabled:function(){return"CUSTOM"==$("#reduce-function-selector").val()},mapVal:function(){return this.mapEditor?this.mapEditor.getValue():this.$("#map-function").text()},reduceVal:function(){var a=this.$("#reduce-function-selector :selected").val(),b="";return"CUSTOM"===a?b=this.reduceEditor.getValue():"NONE"!==a&&(b=a),b},hasValidCode:function(){return _.every(["mapEditor","reduceEditor"],function(a){var b=this[a];return"reduceEditor"!==a||this.isCustomReduceEnabled()?b.hadValidCode():!0},this)},toggleIndexNav:function(a){var b=this.$(a.target).attr("id"),c=this.$(this.$("li.active a").attr("href")),d=this.$(this.$(a.target).attr("href"));if(d.attr("id")!==c.attr("id")&&c.removeAttr("style"),"index-nav"===b){if(this.newView)return;var e=this;d.toggle("slow",function(){e.showEditors()})}else d.toggle("slow")},serialize:function(){return{ddocs:this.ddocs,ddoc:this.model,ddocName:this.model.id,viewName:this.viewName,reduceFunStr:this.reduceFunStr,isCustomReduce:this.hasCustomReduce(),newView:this.newView,langTemplates:this.langTemplates.javascript}},hasCustomReduce:function(){return this.reduceFunStr&&!_.contains(this.builtinReduces,this.reduceFunStr)},hasReduce:function(){return this.reduceFunStr||!1},createReduceEditor:function(){this.reduceEditor&&this.reduceEditor.remove(),this.reduceEditor=new c.Editor({editorId:"reduce-function",mode:"javascript",couchJSHINT:!0}),this.reduceEditor.render()},beforeRender:function(){this.newView?(this.reduceFunStr="_sum",this.model=0===this.ddocs.length?new d.Doc(null,{database:this.database}):this.ddocs.first().dDocModel(),this.ddocID=this.model.id):(this.model=this.ddocs.get(this.ddocID).dDocModel(),this.reduceFunStr=this.model.viewHasReduce(this.viewName),this.setView("#ddoc-info",new g.DdocInfo({model:this.ddocInfo}))),this.designDocSelector=this.setView(".design-doc-group",new g.DesignDocSelector({collection:this.ddocs,ddocName:this.model.id,database:this.database})),this.advancedOptions=this.insertView("#query",new g.AdvancedOptions({updateViewFn:this.updateView,previewFn:this.previewView,database:this.database,viewName:this.viewName,ddocName:this.model.id,hasReduce:this.hasReduce()}))},afterRender:function(){this.params&&this.advancedOptions.updateFromParams(this.params),this.designDocSelector.updateDesignDoc(),this.newView||this.showIndex?(this.showEditors(),this.showIndex=!1):(this.$("#index").hide(),this.$("#index-nav").parent().removeClass("active"))},showEditors:function(){this.mapEditor=new c.Editor({editorId:"map-function",mode:"javascript",couchJSHINT:!0}),this.mapEditor.render(),this.hasCustomReduce()?this.createReduceEditor():$(".control-group.reduce-function").hide(),this.newView&&this.mapEditor.setValue(this.langTemplates[this.defaultLang].map),this.mapEditor.editSaved(),this.reduceEditor&&this.reduceEditor.editSaved()},cleanup:function(){this.mapEditor&&this.mapEditor.remove(),this.reduceEditor&&this.reduceEditor.remove()}}),g.JumpToDoc=b.View.extend({template:"templates/documents/jumpdoc",initialize:function(a){this.database=a.database},events:{"submit #jump-to-doc":"jumpToDoc"},jumpToDoc:function(c){c.preventDefault();var d=this.$("#jump-to-doc-id").val().trim();this.database.allDocs.where({_id:d}).length>0?b.navigate("/database/"+a.mixins.safeURLName(this.database.id)+"/"+a.mixins.safeURLName(d),{trigger:!0}):b.addNotification({msg:"Document ID does not exist.",type:"error"})},afterRender:function(){this.typeAhead=new c.DocSearchTypeahead({el:"#jump-to-doc-id",database:this.database}),this.typeAhead.render()}}),g.Sidebar=b.View.extend({template:"templates/documents/sidebar",events:{"click button#delete-database":"deleteDatabase"},initialize:function(a){this.database=a.database,a.ddocInfo&&(this.ddocID=a.ddocInfo.id,this.currView=a.ddocInfo.currView)},deleteDatabase:function(a){a.preventDefault();var c=confirm("Are you sure you want to delete this database?");if(c){var d=this.database.id;b.addNotification({msg:"Deleting your database...",type:"error",clear:!0}),this.database.destroy().then(function(){b.navigate("#/_all_dbs"),b.addNotification({msg:"The database "+d+" has been deleted.",clear:!0})}).fail(function(a,c,d){b.addNotification({msg:"Could not delete the database, reason "+d+".",type:"error",clear:!0})})}},serialize:function(){var a=b.getExtensions("docLinks"),c=b.getExtensions("sidebar:newLinks"),d=b.getExtensions("sidebar:links"),f=b.getExtensions("sidebar:list");return{changes_url:"#"+this.database.url("changes"),permissions_url:"#"+this.database.url("app")+"/permissions",db_url:"#"+this.database.url("index")+"?limit="+e.DocLimit,database:this.collection.database,database_url:"#"+this.database.url("app"),docLinks:a,docLimit:e.DocLimit,addLinks:d,newLinks:c,extensionList:f>0}},buildIndexList:function(a,b,c){_.each(_.keys(a),function(a){var d=this.ddocID=="_design/"+c;this.insertView("ul.nav."+b,new g.IndexItem({ddoc:c,index:a,database:this.collection.database.id,selected:d&&a==this.currView}))},this)},beforeRender:function(){var a=b.getExtensions("sidebar:list");_.each(a,function(a){var b=this.insertView("#extension-navs",a);b.update(this.database,this.collection,this.viewName),b.render()},this),this.collection.each(function(a){if(a.has("doc")){var b=a.id.replace(/^_design\//,"");a.get("doc").views&&this.buildIndexList(a.get("doc").views,"views",b)}},this)},afterRender:function(){this.selectedTab&&this.setSelectedTab(this.selectedTab)},setSelectedTab:function(a){this.selectedTab=a,this.$("li").removeClass("active"),this.$("#"+a).parent().addClass("active")}}),g.Indexed=b.View.extend({}),g.Changes=b.View.extend({template:"templates/documents/changes",establish:function(){return[this.model.changes.fetch()]},serialize:function(){return{changes:this.model.changes.toJSON(),database:this.model}},afterRender:function(){prettyPrint()}}),g.DdocInfo=b.View.extend({template:"templates/documents/ddoc_info",initialize:function(a){this.refreshTime=a.refreshTime||5e3,this.listenTo(this.model,"change",this.render)},serialize:function(){return{view_index:this.model.get("view_index")}},afterRender:function(){this.startRefreshInterval()},startRefreshInterval:function(){var a=this.model;this.intervalId||(this.intervalId=setInterval(function(){a.fetch()},this.refreshTime))},stopRefreshInterval:function(){clearInterval(this.intervalId)},cleanup:function(){this.stopRefreshInterval()}}),d.Views=g,d}),define("modules/documents/routes",["app","api","modules/documents/views","modules/databases/base"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"one_pane",disableLoader:!0,selectedHeader:"Databases",initialize:function(a,b,e){var f=e[0];this.docID=e[1]||"new",this.database=this.database||new d.Model({id:f}),this.doc=new c.Doc({_id:this.docID},{database:this.database}),this.tabsView=this.setView("#tabs",new c.Views.FieldEditorTabs({disableLoader:!0,selected:"code_editor",model:this.doc}))},routes:{"database/:database/:doc/code_editor":"code_editor","database/:database/:doc":"code_editor"},events:{"route:reRenderDoc":"reRenderDoc","route:duplicateDoc":"duplicateDoc"},crumbs:function(){return[{name:this.database.id,link:d.databaseUrl(this.database)},{name:this.docID,link:"#"}]},code_editor:function(){this.tabsView.updateSelected("code_editor"),this.docView=this.setView("#dashboard-content",new c.Views.Doc({model:this.doc,database:this.database}))},reRenderDoc:function(){this.docView.forceRender()},field_editor:function(){this.tabsView.updateSelected("field_editor"),this.docView=this.setView("#dashboard-content",new c.Views.DocFieldEditor({model:this.doc}))},duplicateDoc:function(c){var d=this.doc,e=this.docView,f=this.database;d.copy(c).then(function(){d.set({_id:c}),e.forceRender(),b.navigate("/database/"+f.safeID()+"/"+a.mixins.safeURLName(c),{trigger:!0}),b.addNotification({msg:"Document has been duplicated."})},function(a){var c="Could not duplicate document, reason: "+a.responseText+".";b.addNotification({msg:c,type:"error"})})},apiUrl:function(){return[this.doc.url("apiurl"),this.doc.documentation()]}}),f=e.extend({initialize:function(a,b,e){var f=e[0];this.database=this.database||new d.Model({id:f}),this.doc=new c.NewDoc(null,{database:this.database}),this.tabsView=this.setView("#tabs",new c.Views.FieldEditorTabs({selected:"code_editor",model:this.doc}))},crumbs:function(){return[{name:this.database.id,link:d.databaseUrl(this.database)},{name:"New",link:"#"}]},routes:{"database/:database/new":"code_editor"},selectedHeader:"Databases"}),g=b.RouteObject.extend({layout:"with_tabs_sidebar",selectedHeader:"Databases",routes:{"database/:database/_all_docs(:extra)":"allDocs","database/:database/_design/:ddoc/_view/:view":{route:"viewFn",roles:["_admin"]},"database/:database/new_view":"newViewEditor"},events:{"route:updateAllDocs":"updateAllDocsFromView","route:updatePreviewDocs":"updateAllDocsFromPreview","route:reloadDesignDocs":"reloadDesignDocs","route:paginate":"paginate"},initialize:function(b,e,f){var g=a.getParams();g.include_docs=!0,this.databaseName=f[0],this.data={database:new d.Model({id:this.databaseName})},this.data.designDocs=new c.AllDocs(null,{database:this.data.database,params:{startkey:'"_design"',endkey:'"_design1"',include_docs:!0}}),this.sidebar=this.setView("#sidebar-content",new c.Views.Sidebar({collection:this.data.designDocs,database:this.data.database}))},establish:function(){return this.data.designDocs.fetch()},allDocs:function(b,e){var f=a.getParams(e);f.include_docs=!0,this.data.database.buildAllDocs(f),f.startkey&&f.startkey.indexOf("_design")>-1?this.sidebar.setSelectedTab("design-docs"):this.sidebar.setSelectedTab("all-docs"),this.viewEditor&&this.viewEditor.remove(),this.toolsView=this.setView("#dashboard-upper-menu",new c.Views.JumpToDoc({database:this.data.database,collection:this.data.database.allDocs})),this.setView("#dashboard-upper-content",new c.Views.AllDocsLayout({database:this.data.database,collection:this.data.database.allDocs,params:f})),this.documentsView=this.setView("#dashboard-lower-content",new c.Views.AllDocsList({collection:this.data.database.allDocs})),this.crumbs=[{name:this.data.database.id,link:d.databaseUrl(this.data.database)}],this.apiUrl=[this.data.database.allDocs.url("apiurl"),this.data.database.allDocs.documentation()]},viewFn:function(b,e,f){var g=a.getParams(),h=decodeURIComponent(e);f=f.replace(/\?.*$/,""),this.data.indexedDocs=new c.IndexCollection(null,{database:this.data.database,design:h,view:f,params:g});var i={id:"_design/"+h,currView:f,designDocs:this.data.designDocs};this.viewEditor=this.setView("#dashboard-upper-content",new c.Views.ViewEditor({model:this.data.database,ddocs:this.data.designDocs,viewName:f,params:g,newView:!1,database:this.data.database,ddocInfo:i})),this.toolsView&&this.toolsView.remove(),this.documentsView=this.setView("#dashboard-lower-content",new c.Views.AllDocsList({database:this.data.database,collection:this.data.indexedDocs,nestedView:c.Views.Row,viewList:!0,ddocInfo:i})),this.sidebar.setSelectedTab(a.mixins.removeSpecialCharacters(e)+"_"+a.mixins.removeSpecialCharacters(f)),this.crumbs=function(){return[{name:this.data.database.id,link:d.databaseUrl(this.data.database)}]},this.apiUrl=[this.data.indexedDocs.url("apiurl"),"docs"]},newViewEditor:function(){var b=a.getParams();this.toolsView&&this.toolsView.remove(),this.viewEditor=this.setView("#dashboard-upper-content",new c.Views.ViewEditor({ddocs:this.data.designDocs,params:b,database:this.data.database,newView:!0})),this.sidebar.setSelectedTab("new-view"),this.crumbs=function(){return[{name:this.data.database.id,link:d.databaseUrl(this.data.database)}]}},updateAllDocsFromView:function(b){var d=b.view,e=a.getParams(),f=b.ddoc;return b.allDocs?(e.include_docs=!0,this.data.database.buildAllDocs(e),void 0):(this.data.indexedDocs=new c.IndexCollection(null,{database:this.data.database,design:f,view:d,params:a.getParams()}),this.documentsView=this.setView("#dashboard-lower-content",new c.Views.AllDocsList({database:this.data.database,collection:this.data.indexedDocs,nestedView:c.Views.Row,viewList:!0})),void 0)},updateAllDocsFromPreview:function(a){var b=a.view,d=a.rows,e=a.ddoc;this.data.indexedDocs=new c.PouchIndexCollection(null,{database:this.data.database,design:e,view:b,rows:d}),this.documentsView=this.setView("#dashboard-lower-content",new c.Views.AllDocsList({database:this.data.database,collection:this.data.indexedDocs,nestedView:c.Views.Row,viewList:!0}))},paginate:function(b){_.extend(this.documentsView.collection.params,a.getParams()),this.documentsView.forceRender(),this.documentsView.collection.skipFirstItem="next"===b?!0:!1},reloadDesignDocs:function(a){this.sidebar.forceRender(),a&&a.selectedTab&&this.sidebar.setSelectedTab(a.selectedTab)}}),h=b.RouteObject.extend({layout:"with_tabs",selectedHeader:"Databases",crumbs:function(){return[{name:this.database.id,link:d.databaseUrl(this.database)},{name:"_changes",link:"/_changes"}]},routes:{"database/:database/_changes(:params)":"changes"},initialize:function(b,e,f){this.databaseName=f[0],this.database=new d.Model({id:this.databaseName});var g=a.getParams();this.database.buildChanges(g),this.setView("#tabs",new c.Views.Tabs({collection:this.designDocs,database:this.database,active_id:"changes"}))},changes:function(){this.setView("#dashboard-content",new c.Views.Changes({model:this.database}))},apiUrl:function(){return[this.database.url("apiurl"),this.database.documentation()]}});return c.RouteObjects=[e,f,g,h],c}),define("modules/documents/base",["app","api","modules/documents/routes"],function(a,b,c){return c}),define("addons/activetasks/resources",["app","backbone","modules/fauxton/base","d3"],function(a){{var b={};a.versionAPI}return a.taskSortBy="type",b.Task=Backbone.Model.extend({initialize:function(){this.set({id:this.get("pid")})}}),b.Tasks=Backbone.Model.extend({alltypes:{all:"All tasks",replication:"Replication",database_compaction:" Database Compaction",indexer:"Indexer",view_compaction:"View Compaction"},documentation:"_active_tasks",url:function(b){return"apiurl"===b?window.location.origin+"/_active_tasks":a.host+"/_active_tasks"},fetch:function(a){var b=a||{};return b.cache=!1,Backbone.Model.prototype.fetch.call(this,b)},parse:function(a){var c=this.getUniqueTypes(a),d=this,e=_.reduce(c,function(c,e,f){return c[f]=new b.AllTasks(d.sortThis(a,f)),c},{});e.all=new b.AllTasks(a),this.set(e)},getUniqueTypes:function(a){var b=this.alltypes;return _.each(a,function(a){"undefined"==typeof b[a.type]&&(b[a.type]=a.type.replace(/_/g," "))},this),this.alltypes=b,b},sortThis:function(a,b){return _.filter(a,function(a){return a.type===b})},changeView:function(a){this.set({currentView:a})},getCurrentViewData:function(){var a=this.get("currentView");return this.get(a)},getDatabaseCompactions:function(){return this.get("databaseCompactions")},getIndexes:function(){return this.get("indexes")},getViewCompactions:function(){return this.get("viewCompactions")}}),b.AllTasks=Backbone.Collection.extend({model:b.Task,sortByColumn:function(b){a.taskSortBy=b,this.sort()},comparator:function(b){return b.get(a.taskSortBy)}}),b}),define("addons/activetasks/views",["app","api","addons/activetasks/resources"],function(a,b){var c={},d={},e={rate:"5",intervalId:null};return c.Events=_.extend(d,Backbone.Events),c.TabMenu=b.View.extend({template:"addons/activetasks/templates/tabs",events:{"click .task-tabs li":"requestByType","change #pollingRange":"changePollInterval"},establish:function(){return[this.model.fetch({reset:!0})]},serialize:function(){return{filters:this.model.alltypes}},afterRender:function(){this.$(".task-tabs").find("li").eq(0).addClass("active")},changePollInterval:function(a){var b=this.$(a.currentTarget).val();this.$('label[for="pollingRange"] span').text(b),e.rate=b,clearInterval(e.intervalId),d.trigger("update:poll")},cleanup:function(){clearInterval(e.intervalId)},requestByType:function(a){var b=a.currentTarget;datatype=this.$(b).attr("data-type"),this.$(".task-tabs").find("li").removeClass("active"),this.$(b).addClass("active"),this.model.changeView(datatype)}}),c.DataSection=b.View.extend({showData:function(){var a=this.model.getCurrentViewData();this.dataView?this.dataView.update(a,this.model.get("currentView").replace("_"," ")):this.dataView=this.insertView(new c.TableData({collection:a,currentView:this.model.get("currentView").replace("_"," ")}))},showDataAndRender:function(){this.showData(),this.dataView.render()},beforeRender:function(){this.showData()},establish:function(){return[this.model.fetch()]},setPolling:function(){var a=this;clearInterval(e.intervalId),e.intervalId=setInterval(function(){a.establish()},1e3*e.rate)},cleanup:function(){clearInterval(e.intervalId)},afterRender:function(){this.listenTo(this.model,"change",this.showDataAndRender),d.bind("update:poll",this.setPolling,this),this.setPolling()}}),c.TableData=b.View.extend({tagName:"table",className:"table table-bordered table-striped active-tasks",template:"addons/activetasks/templates/table",events:{"click th":"sortByType"},initialize:function(){currentView=this.options.currentView},sortByType:function(a){var b=a.currentTarget;datatype=$(b).attr("data-type"),this.collection.sortByColumn(datatype),this.render()},serialize:function(){return{currentView:currentView,collection:this.collection}},update:function(a,b){this.collection=a,this.currentView=b},beforeRender:function(){this.collection.forEach(function(a){this.insertView("#tasks_go_here",new c.TableDetail({model:a}))},this)}}),c.TableDetail=b.View.extend({tagName:"tr",template:"addons/activetasks/templates/tabledetail",initialize:function(){this.type=this.model.get("type")},getObject:function(){var a=this.model.get("database");return"replication"===this.type&&(a=this.model.get("source")+" to "+this.model.get("target")),a},getProgress:function(){var a="";return"indexer"===this.type&&(a="Processed "+this.model.get("changes_done")+" of "+this.model.get("total_changes")+" changes"),a},serialize:function(){return{model:this.model,objectField:this.getObject(),progress:this.getProgress()}}}),c}),define("addons/activetasks/routes",["app","api","addons/activetasks/resources","addons/activetasks/views"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"with_sidebar",routes:{"activetasks/:id":"defaultView",activetasks:"defaultView"},selectedHeader:"Active Tasks",crumbs:[{name:"Active tasks",link:"activetasks"}],apiUrl:function(){return[this.newtasks.url("apiurl"),this.newtasks.documentation]},roles:["_admin"],defaultView:function(){this.newtasks=new c.Tasks({currentView:"all",id:"activeTasks"}),this.setView("#sidebar-content",new d.TabMenu({currentView:"all",model:this.newtasks})),this.setView("#dashboard-content",new d.DataSection({model:this.newtasks,currentView:"all"}))}});return c.RouteObjects=[e],c}),define("addons/activetasks/base",["app","api","addons/activetasks/routes"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Active Tasks",icon:"fonticon-activetasks",href:"#/activetasks"})},c}),define("addons/config/resources",["app","api"],function(a,b){var c=b.addon();return c.Model=Backbone.Model.extend({}),c.OptionModel=Backbone.Model.extend({documentation:"config",url:function(){return a.host+"/_config/"+this.get("section")+"/"+this.get("name")},isNew:function(){return!1},sync:function(a,b){var c={url:b.url(),contentType:"application/json",dataType:"json",data:JSON.stringify(b.get("value"))};return c.type="delete"===a?"DELETE":"PUT",$.ajax(c)}}),c.Collection=Backbone.Collection.extend({model:c.Model,documentation:"config",url:function(){return a.host+"/_config"},parse:function(a){return _.map(a,function(a,b){return{section:b,options:_.map(a,function(a,b){return{name:b,value:a}})}})}}),c.ViewItem=b.View.extend({tagName:"tr",className:"config-item",template:"addons/config/templates/item",events:{"click .edit-button":"editValue","click #delete-value":"deleteValue","click #cancel-value":"cancelEdit","click #save-value":"saveValue"},deleteValue:function(){var a=confirm("Are you sure you want to delete this configuration value?");a&&(this.model.destroy(),this.remove())},editValue:function(){this.$("#show-value").hide(),this.$("#edit-value-form").show()},saveValue:function(){this.model.save({value:this.$(".value-input").val()}),this.render()},cancelEdit:function(){this.$("#edit-value-form").hide(),this.$("#show-value").show()},serialize:function(){return{option:this.model.toJSON()}}}),c.View=b.View.extend({template:"addons/config/templates/dashboard",events:{"click #add-section":"addSection","submit #add-section-form":"submitForm"},submitForm:function(a){a.preventDefault();var b=new c.OptionModel({section:this.$('input[name="section"]').val(),name:this.$('input[name="name"]').val(),value:this.$('input[name="value"]').val()});b.save();var d=this.collection.find(function(a){return a.get("section")===b.get("section")});d?d.get("options").push(b.attributes):this.collection.add({section:b.get("section"),options:[b.attributes]}),this.$("#add-section-modal").modal("hide"),this.render()},addSection:function(a){a.preventDefault(),this.$("#add-section-modal").modal({show:!0})},beforeRender:function(){this.collection.each(function(a){_.each(a.get("options"),function(b,d){this.insertView("table.config tbody",new c.ViewItem({model:new c.OptionModel({section:a.get("section"),name:b.name,value:b.value,index:d})}))},this)},this)},establish:function(){return[this.collection.fetch()]}}),c}),define("addons/config/routes",["app","api","addons/config/resources"],function(a,b,c){var d=b.RouteObject.extend({layout:"one_pane",initialize:function(){this.configs=new c.Collection},roles:["_admin"],selectedHeader:"Config",crumbs:[{name:"Config",link:"_config"}],apiUrl:function(){return[this.configs.url(),this.configs.documentation]},routes:{_config:"config"},config:function(){this.setView("#dashboard-content",new c.View({collection:this.configs}))},establish:function(){return[this.configs.fetch()]}});return c.RouteObjects=[d],c}),define("addons/config/base",["app","api","addons/config/routes"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Config",href:"#_config",icon:"fonticon-cog",className:"config"})},c}),define("addons/logs/resources",["app","api","backbone"],function(a,b,c){var d=b.addon();return d.Model=c.Model.extend({date:function(){var a=new Date(this.get("date")),b=a.getHours()+":"+a.getMinutes()+":"+a.getSeconds(),c=a.toDateString().slice(4,10);return c+" "+b},logLevel:function(){return this.get("log_level").replace(/ /g,"")},pid:function(){return _.escape(this.get("pid"))},args:function(){return _.escape(this.get("args"))}}),d.Collection=c.Collection.extend({model:d.Model,initialize:function(){this.params={bytes:5e3}},documentation:"log",url:function(){return query="?"+$.param(this.params),a.host+"/_log"+query},fetch:function(a){return a=a?a:{},c.Collection.prototype.fetch.call(this,_.extend(a,{dataType:"html"}))},parse:function(a){var b=a.split(/\n/);return _.foldr(b,function(a,b){var c=b.match(/^\[(.*?)\]\s\[(.*?)\]\s\[(.*?)\]\s(.*)/);return c?(a.push({date:c[1],log_level:c[2],pid:c[3],args:c[4]}),a):a},[])}}),d.events={},_.extend(d.events,c.Events),d.Views.View=b.View.extend({template:"addons/logs/templates/dashboard",initialize:function(a){this.refreshTime=a.refreshTime||5e3,d.events.on("log:filter",this.filterLogs,this),d.events.on("log:remove",this.removeFilterLogs,this),this.filters=[],this.collection.on("add",function(){this.render()},this)},establish:function(){return[this.collection.fetch()]},serialize:function(){return{logs:new d.Collection(this.createFilteredCollection())}},afterRender:function(){this.startRefreshInterval()},cleanup:function(){this.stopRefreshInterval()},filterLogs:function(a){this.filters.push(a),this.render()},createFilteredCollection:function(){return _.reduce(this.filters,function(a,b){return _.filter(a,function(a){var c=!1;return _.each(a,function(a){a.toString().match(new RegExp(b))&&(c=!0)}),c})},this.collection.toJSON(),this)},removeFilterLogs:function(a){this.filters.splice(this.filters.indexOf(a),1),this.render()},startRefreshInterval:function(){var a=this.collection;this.intervalId||(this.intervalId=setInterval(function(){a.fetch()},this.refreshTime))},stopRefreshInterval:function(){clearInterval(this.intervalId)}}),d.Views.FilterView=b.View.extend({template:"addons/logs/templates/sidebar",events:{"submit #log-filter-form":"filterLogs"},filterLogs:function(a){a.preventDefault();var b=this.$('input[name="filter"]'),c=b.val();d.events.trigger("log:filter",c),this.insertView("#filter-list",new d.Views.FilterItemView({filter:c})).render(),b.val("")}}),d.Views.FilterItemView=b.View.extend({template:"addons/logs/templates/filterItem",tagName:"li",initialize:function(a){this.filter=a.filter},events:{"click .remove-filter":"removeFilter"},serialize:function(){return{filter:this.filter}},removeFilter:function(a){a.preventDefault(),d.events.trigger("log:remove",this.filter),this.remove()}}),d}),define("addons/logs/routes",["app","api","addons/logs/resources"],function(a,b,c){var d=b.RouteObject.extend({layout:"with_sidebar",crumbs:[{name:"Logs",link:"_log"}],routes:{_log:"showLog"},selectedHeader:"Log",roles:["_admin"],apiUrl:function(){return[this.logs.url(),this.logs.documentation]},initialize:function(){this.logs=new c.Collection,this.setView("#sidebar-content",new c.Views.FilterView({}))},showLog:function(){this.setView("#dashboard-content",new c.Views.View({collection:this.logs}))}});return c.RouteObjects=[d],c}),define("addons/logs/base",["app","api","addons/logs/routes"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Log",href:"#_log",icon:"fonticon-log",className:"logs"})},c}),define("addons/stats/resources",["app","api","backbone","lodash","modules/fauxton/base"],function(a,b,c,d){var e=new b.addon;return e.Collection=Backbone.Collection.extend({model:Backbone.Model,documentation:"stats",url:a.host+"/_stats",parse:function(a){return d.flatten(d.map(a,function(a,b){return d.map(a,function(a,c){return d.extend({id:c,type:b},a)})}),!0)}}),e}),function(){function a(a,b){return new Date(b,a+1,0).getDate()}function b(a,b,c){return function(d,e,f){var g=a(d),h=[];if(d>g&&b(g),f>1)for(;e>g;){var i=new Date(+g);c(i)%f===0&&h.push(i),b(g)}else for(;e>g;)h.push(new Date(+g)),b(g);return h}}var c=window.nv||{};c.version="0.0.1a",c.dev=!0,window.nv=c,c.tooltip={},c.utils={},c.models={},c.charts={},c.graphs=[],c.logs={},c.dispatch=d3.dispatch("render_start","render_end"),c.dev&&(c.dispatch.on("render_start",function(){c.logs.startTime=+new Date}),c.dispatch.on("render_end",function(){c.logs.endTime=+new Date,c.logs.totalTime=c.logs.endTime-c.logs.startTime,c.log("total",c.logs.totalTime)})),c.log=function(){if(c.dev&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(c.dev&&console.log&&Function.prototype.bind){var a=Function.prototype.bind.call(console.log,console);a.apply(console,arguments)}return arguments[arguments.length-1]},c.render=function(a){a=a||1,c.render.active=!0,c.dispatch.render_start(),setTimeout(function(){for(var b,d,e=0;a>e&&(d=c.render.queue[e]);e++)b=d.generate(),typeof d.callback==typeof Function&&d.callback(b),c.graphs.push(b);c.render.queue.splice(0,e),c.render.queue.length?setTimeout(arguments.callee,0):(c.render.active=!1,c.dispatch.render_end())},0)},c.render.active=!1,c.render.queue=[],c.addGraph=function(a){typeof arguments[0]==typeof Function&&(a={generate:arguments[0],callback:arguments[1]}),c.render.queue.push(a),c.render.active||c.render()},c.identity=function(a){return a},c.strip=function(a){return a.replace(/(\s|&)/g,"")},d3.time.monthEnd=function(a){return new Date(a.getFullYear(),a.getMonth(),0)},d3.time.monthEnds=b(d3.time.monthEnd,function(b){b.setUTCDate(b.getUTCDate()+1),b.setDate(a(b.getMonth()+1,b.getFullYear()))},function(a){return a.getMonth()}),function(){var a=window.nv.tooltip={};a.show=function(a,b,d,e,f,g){var h=document.createElement("div");h.className="nvtooltip "+(g?g:"xy-tooltip"),d=d||"s",e=e||20;var i=f;(!f||f.tagName.match(/g|svg/i))&&(i=document.getElementsByTagName("body")[0]),h.innerHTML=b,h.style.left=0,h.style.top=0,h.style.opacity=0,i.appendChild(h);var j,k,l=parseInt(h.offsetHeight),m=parseInt(h.offsetWidth),n=c.utils.windowSize().width,o=c.utils.windowSize().height,p=window.scrollY,q=window.scrollX;o=window.innerWidth>=document.body.scrollWidth?o:o-16,n=window.innerHeight>=document.body.scrollHeight?n:n-16;var r=function(a){var b=k;do isNaN(a.offsetTop)||(b+=a.offsetTop);while(a=a.offsetParent);return b},s=function(a){var b=j;do isNaN(a.offsetLeft)||(b+=a.offsetLeft);while(a=a.offsetParent);return b};switch(d){case"e":j=a[0]-m-e,k=a[1]-l/2;var t=s(h),u=r(h);q>t&&(j=a[0]+e>q?a[0]+e:q-t+j),p>u&&(k=p-u+k),u+l>p+o&&(k=p+o-u+k-l);break;case"w":j=a[0]+e,k=a[1]-l/2,t+m>n&&(j=a[0]-m-e),p>u&&(k=p+5),u+l>p+o&&(k=p-l-5);break;case"n":j=a[0]-m/2-5,k=a[1]+e;var t=s(h),u=r(h);q>t&&(j=q+5),t+m>n&&(j=j-m/2+5),u+l>p+o&&(k=p+o-u+k-l);break;case"s":j=a[0]-m/2,k=a[1]-l-e;var t=s(h),u=r(h);q>t&&(j=q+5),t+m>n&&(j=j-m/2+5),p>u&&(k=p)}return h.style.left=j+"px",h.style.top=k+"px",h.style.opacity=1,h.style.position="absolute",h.style.pointerEvents="none",h},a.cleanup=function(){for(var a=document.getElementsByClassName("nvtooltip"),b=[];a.length;)b.push(a[0]),a[0].style.transitionDelay="0 !important",a[0].style.opacity=0,a[0].className="nvtooltip-pending-removal";setTimeout(function(){for(;b.length;){var a=b.pop();a.parentNode.removeChild(a)}},500)}}(),c.utils.windowSize=function(){var a={width:640,height:480};return document.body&&document.body.offsetWidth&&(a.width=document.body.offsetWidth,a.height=document.body.offsetHeight),"CSS1Compat"==document.compatMode&&document.documentElement&&document.documentElement.offsetWidth&&(a.width=document.documentElement.offsetWidth,a.height=document.documentElement.offsetHeight),window.innerWidth&&window.innerHeight&&(a.width=window.innerWidth,a.height=window.innerHeight),a},c.utils.windowResize=function(a){var b=window.onresize;window.onresize=function(c){"function"==typeof b&&b(c),a(c)}},c.utils.getColor=function(a){return arguments.length?"[object Array]"===Object.prototype.toString.call(a)?function(b,c){return b.color||a[c%a.length]}:a:c.utils.defaultColor()},c.utils.defaultColor=function(){var a=d3.scale.category20().range();return function(b,c){return b.color||a[c%a.length]}},c.utils.customTheme=function(a,b,c){b=b||function(a){return a.key},c=c||d3.scale.category20().range();var d=c.length;return function(e){var f=b(e);return d||(d=c.length),"undefined"!=typeof a[f]?"function"==typeof a[f]?a[f]():a[f]:c[--d]}},c.utils.pjax=function(a,b){function d(d){d3.html(d,function(d){var e=d3.select(b).node();e.parentNode.replaceChild(d3.select(d).select(b).node(),e),c.utils.pjax(a,b)})}d3.selectAll(a).on("click",function(){history.pushState(this.href,this.textContent,this.href),d(this.href),d3.event.preventDefault()}),d3.select(window).on("popstate",function(){d3.event.state&&d(d3.event.state)})},c.utils.calcApproxTextWidth=function(a){if(a instanceof d3.selection){var b=parseInt(a.style("font-size").replace("px","")),c=a.text().length;return c*b*.5}return 0},c.models.axis=function(){function a(e){return e.each(function(a){var e=d3.select(this),p=e.selectAll("g.nv-wrap.nv-axis").data([a]),q=p.enter().append("g").attr("class","nvd3 nv-wrap nv-axis"),r=(q.append("g"),p.select("g"));null!==n?b.ticks(n):("top"==b.orient()||"bottom"==b.orient())&&b.ticks(Math.abs(f.range()[1]-f.range()[0])/100),d3.transition(r).call(b),o=o||b.scale();var s=b.tickFormat();
-null==s&&(s=o.tickFormat());var t=r.selectAll("text.nv-axislabel").data([g||null]);switch(t.exit().remove(),b.orient()){case"top":t.enter().append("text").attr("class","nv-axislabel");var u=2==f.range().length?f.range()[1]:f.range()[f.range().length-1]+(f.range()[1]-f.range()[0]);if(t.attr("text-anchor","middle").attr("y",0).attr("x",u/2),h){var v=p.selectAll("g.nv-axisMaxMin").data(f.domain());v.enter().append("g").attr("class","nv-axisMaxMin").append("text"),v.exit().remove(),v.attr("transform",function(a){return"translate("+f(a)+",0)"}).select("text").attr("dy","0em").attr("y",-b.tickPadding()).attr("text-anchor","middle").text(function(a){var b=s(a);return(""+b).match("NaN")?"":b}),d3.transition(v).attr("transform",function(a,b){return"translate("+f.range()[b]+",0)"})}break;case"bottom":var w=36,x=30,y=r.selectAll("g").select("text");if(j%360){y.each(function(){var a=this.getBBox().width;a>x&&(x=a)});var z=Math.abs(Math.sin(j*Math.PI/180)),w=(z?z*x:x)+30;y.attr("transform",function(){return"rotate("+j+" 0,0)"}).attr("text-anchor",j%360>0?"start":"end")}t.enter().append("text").attr("class","nv-axislabel");var u=2==f.range().length?f.range()[1]:f.range()[f.range().length-1]+(f.range()[1]-f.range()[0]);if(t.attr("text-anchor","middle").attr("y",w).attr("x",u/2),h){var v=p.selectAll("g.nv-axisMaxMin").data([f.domain()[0],f.domain()[f.domain().length-1]]);v.enter().append("g").attr("class","nv-axisMaxMin").append("text"),v.exit().remove(),v.attr("transform",function(a){return"translate("+(f(a)+(m?f.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",b.tickPadding()).attr("transform",function(){return"rotate("+j+" 0,0)"}).attr("text-anchor",j?j%360>0?"start":"end":"middle").text(function(a){var b=s(a);return(""+b).match("NaN")?"":b}),d3.transition(v).attr("transform",function(a){return"translate("+(f(a)+(m?f.rangeBand()/2:0))+",0)"})}l&&y.attr("transform",function(a,b){return"translate(0,"+(b%2==0?"0":"12")+")"});break;case"right":if(t.enter().append("text").attr("class","nv-axislabel"),t.attr("text-anchor",k?"middle":"begin").attr("transform",k?"rotate(90)":"").attr("y",k?-Math.max(c.right,d)+12:-10).attr("x",k?f.range()[0]/2:b.tickPadding()),h){var v=p.selectAll("g.nv-axisMaxMin").data(f.domain());v.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),v.exit().remove(),v.attr("transform",function(a){return"translate(0,"+f(a)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",b.tickPadding()).attr("text-anchor","start").text(function(a){var b=s(a);return(""+b).match("NaN")?"":b}),d3.transition(v).attr("transform",function(a,b){return"translate(0,"+f.range()[b]+")"}).select("text").style("opacity",1)}break;case"left":if(t.enter().append("text").attr("class","nv-axislabel"),t.attr("text-anchor",k?"middle":"end").attr("transform",k?"rotate(-90)":"").attr("y",k?-Math.max(c.left,d)+12:-10).attr("x",k?-f.range()[0]/2:-b.tickPadding()),h){var v=p.selectAll("g.nv-axisMaxMin").data(f.domain());v.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),v.exit().remove(),v.attr("transform",function(a){return"translate(0,"+o(a)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-b.tickPadding()).attr("text-anchor","end").text(function(a){var b=s(a);return(""+b).match("NaN")?"":b}),d3.transition(v).attr("transform",function(a,b){return"translate(0,"+f.range()[b]+")"}).select("text").style("opacity",1)}}if(t.text(function(a){return a}),!h||"left"!==b.orient()&&"right"!==b.orient()||(r.selectAll("g").each(function(a){d3.select(this).select("text").attr("opacity",1),(f(a)<f.range()[1]+10||f(a)>f.range()[0]-10)&&((a>1e-10||-1e-10>a)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0))}),f.domain()[0]==f.domain()[1]&&0==f.domain()[0]&&p.selectAll("g.nv-axisMaxMin").style("opacity",function(a,b){return b?0:1})),h&&("top"===b.orient()||"bottom"===b.orient())){var A=[];p.selectAll("g.nv-axisMaxMin").each(function(a,b){try{b?A.push(f(a)-this.getBBox().width-4):A.push(f(a)+this.getBBox().width+4)}catch(c){b?A.push(f(a)-4):A.push(f(a)+4)}}),r.selectAll("g").each(function(a){(f(a)<A[0]||f(a)>A[1])&&(a>1e-10||-1e-10>a?d3.select(this).remove():d3.select(this).select("text").remove())})}i&&r.selectAll(".tick").filter(function(a){return!parseFloat(Math.round(1e5*a.__data__)/1e6)&&void 0!==a.__data__}).classed("zero",!0),o=f.copy()}),a}var b=d3.svg.axis(),c={top:0,right:0,bottom:0,left:0},d=75,e=60,f=d3.scale.linear(),g=null,h=!0,i=!0,j=0,k=!0,l=!1,m=!1,n=null;b.scale(f).orient("bottom").tickFormat(function(a){return a});var o;return a.axis=b,d3.rebind(a,b,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"),d3.rebind(a,f,"domain","range","rangeBand","rangeBands"),a.margin=function(b){return arguments.length?(c.top="undefined"!=typeof b.top?b.top:c.top,c.right="undefined"!=typeof b.right?b.right:c.right,c.bottom="undefined"!=typeof b.bottom?b.bottom:c.bottom,c.left="undefined"!=typeof b.left?b.left:c.left,a):c},a.width=function(b){return arguments.length?(d=b,a):d},a.ticks=function(b){return arguments.length?(n=b,a):n},a.height=function(b){return arguments.length?(e=b,a):e},a.axisLabel=function(b){return arguments.length?(g=b,a):g},a.showMaxMin=function(b){return arguments.length?(h=b,a):h},a.highlightZero=function(b){return arguments.length?(i=b,a):i},a.scale=function(c){return arguments.length?(f=c,b.scale(f),m="function"==typeof f.rangeBands,d3.rebind(a,f,"domain","range","rangeBand","rangeBands"),a):f},a.rotateYLabel=function(b){return arguments.length?(k=b,a):k},a.rotateLabels=function(b){return arguments.length?(j=b,a):j},a.staggerLabels=function(b){return arguments.length?(l=b,a):l},a},c.models.bullet=function(){function a(c){return c.each(function(a,c){{var d=j-b.left-b.right,l=k-b.top-b.bottom,o=d3.select(this),p=f.call(this,a,c).slice().sort(d3.descending),q=g.call(this,a,c).slice().sort(d3.descending),r=h.call(this,a,c).slice().sort(d3.descending),s=d3.scale.linear().domain(d3.extent(d3.merge([i,p]))).range(e?[d,0]:[0,d]);this.__chart__||d3.scale.linear().domain([0,1/0]).range(s.range())}this.__chart__=s;var t=d3.min(p),u=d3.max(p),v=p[1],w=o.selectAll("g.nv-wrap.nv-bullet").data([a]),x=w.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet"),y=x.append("g"),z=w.select("g");y.append("rect").attr("class","nv-range nv-rangeMax"),y.append("rect").attr("class","nv-range nv-rangeAvg"),y.append("rect").attr("class","nv-range nv-rangeMin"),y.append("rect").attr("class","nv-measure"),y.append("path").attr("class","nv-markerTriangle"),w.attr("transform","translate("+b.left+","+b.top+")");var A=function(a){return Math.abs(s(a)-s(0))},B=function(a){return 0>a?s(a):s(0)};z.select("rect.nv-rangeMax").attr("height",l).attr("width",A(u>0?u:t)).attr("x",B(u>0?u:t)).datum(u>0?u:t),z.select("rect.nv-rangeAvg").attr("height",l).attr("width",A(v)).attr("x",B(v)).datum(v),z.select("rect.nv-rangeMin").attr("height",l).attr("width",A(u)).attr("x",B(u)).attr("width",A(u>0?t:u)).attr("x",B(u>0?t:u)).datum(u>0?t:u),z.select("rect.nv-measure").style("fill",m).attr("height",l/3).attr("y",l/3).attr("width",0>r?s(0)-s(r[0]):s(r[0])-s(0)).attr("x",B(r)).on("mouseover",function(){n.elementMouseover({value:r[0],label:"Current",pos:[s(r[0]),l/2]})}).on("mouseout",function(){n.elementMouseout({value:r[0],label:"Current"})});var C=l/6;q[0]?z.selectAll("path.nv-markerTriangle").attr("transform",function(){return"translate("+s(q[0])+","+l/2+")"}).attr("d","M0,"+C+"L"+C+","+-C+" "+-C+","+-C+"Z").on("mouseover",function(){n.elementMouseover({value:q[0],label:"Previous",pos:[s(q[0]),l/2]})}).on("mouseout",function(){n.elementMouseout({value:q[0],label:"Previous"})}):z.selectAll("path.nv-markerTriangle").remove(),w.selectAll(".nv-range").on("mouseover",function(a,b){var c=b?1==b?"Mean":"Minimum":"Maximum";n.elementMouseover({value:a,label:c,pos:[s(a),l/2]})}).on("mouseout",function(a,b){var c=b?1==b?"Mean":"Minimum":"Maximum";n.elementMouseout({value:a,label:c})})}),a}var b={top:0,right:0,bottom:0,left:0},d="left",e=!1,f=function(a){return a.ranges},g=function(a){return a.markers},h=function(a){return a.measures},i=[0],j=380,k=30,l=null,m=c.utils.getColor(["#1f77b4"]),n=d3.dispatch("elementMouseover","elementMouseout");return a.dispatch=n,a.orient=function(b){return arguments.length?(d=b,e="right"==d||"bottom"==d,a):d},a.ranges=function(b){return arguments.length?(f=b,a):f},a.markers=function(b){return arguments.length?(g=b,a):g},a.measures=function(b){return arguments.length?(h=b,a):h},a.forceX=function(b){return arguments.length?(i=b,a):i},a.width=function(b){return arguments.length?(j=b,a):j},a.height=function(b){return arguments.length?(k=b,a):k},a.margin=function(c){return arguments.length?(b.top="undefined"!=typeof c.top?c.top:b.top,b.right="undefined"!=typeof c.right?c.right:b.right,b.bottom="undefined"!=typeof c.bottom?c.bottom:b.bottom,b.left="undefined"!=typeof c.left?c.left:b.left,a):b},a.tickFormat=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),a):m},a},c.models.bulletChart=function(){function a(c){return c.each(function(d,n){var r=d3.select(this),s=(j||parseInt(r.style("width"))||960)-f.left-f.right,t=k-f.top-f.bottom,u=this;if(a.update=function(){a(c)},a.container=this,!d||!g.call(this,d,n)){var v=r.selectAll(".nv-noData").data([o]);return v.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),v.attr("x",f.left+s/2).attr("y",18+f.top+t/2).text(function(a){return a}),a}r.selectAll(".nv-noData").remove();var w=g.call(this,d,n).slice().sort(d3.descending),x=h.call(this,d,n).slice().sort(d3.descending),y=i.call(this,d,n).slice().sort(d3.descending),z=r.selectAll("g.nv-wrap.nv-bulletChart").data([d]),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart"),B=A.append("g"),C=z.select("g");B.append("g").attr("class","nv-bulletWrap"),B.append("g").attr("class","nv-titles"),z.attr("transform","translate("+f.left+","+f.top+")");var D=d3.scale.linear().domain([0,Math.max(w[0],x[0],y[0])]).range(e?[s,0]:[0,s]),E=this.__chart__||d3.scale.linear().domain([0,1/0]).range(D.range());this.__chart__=D;var F=B.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(k-f.top-f.bottom)/2+")");F.append("text").attr("class","nv-title").text(function(a){return a.title}),F.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(a){return a.subtitle}),b.width(s).height(t);var G=C.select(".nv-bulletWrap");d3.transition(G).call(b);var H=l||D.tickFormat(s/100),I=C.selectAll("g.nv-tick").data(D.ticks(s/50),function(a){return this.textContent||H(a)}),J=I.enter().append("g").attr("class","nv-tick").attr("transform",function(a){return"translate("+E(a)+",0)"}).style("opacity",1e-6);J.append("line").attr("y1",t).attr("y2",7*t/6),J.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",7*t/6).text(H);var K=d3.transition(I).attr("transform",function(a){return"translate("+D(a)+",0)"}).style("opacity",1);K.select("line").attr("y1",t).attr("y2",7*t/6),K.select("text").attr("y",7*t/6),d3.transition(I.exit()).attr("transform",function(a){return"translate("+D(a)+",0)"}).style("opacity",1e-6).remove(),p.on("tooltipShow",function(a){a.key=d.title,m&&q(a,u.parentNode)})}),d3.timer.flush(),a}var b=c.models.bullet(),d="left",e=!1,f={top:5,right:40,bottom:20,left:120},g=function(a){return a.ranges},h=function(a){return a.markers},i=function(a){return a.measures},j=null,k=55,l=null,m=!0,n=function(a,b,c){return"<h3>"+b+"</h3><p>"+c+"</p>"},o="No Data Available.",p=d3.dispatch("tooltipShow","tooltipHide"),q=function(b,d){var e=b.pos[0]+(d.offsetLeft||0)+f.left,g=b.pos[1]+(d.offsetTop||0)+f.top,h=n(b.key,b.label,b.value,b,a);c.tooltip.show([e,g],h,b.value<0?"e":"w",null,d)};return b.dispatch.on("elementMouseover.tooltip",function(a){p.tooltipShow(a)}),b.dispatch.on("elementMouseout.tooltip",function(a){p.tooltipHide(a)}),p.on("tooltipHide",function(){m&&c.tooltip.cleanup()}),a.dispatch=p,a.bullet=b,d3.rebind(a,b,"color"),a.orient=function(b){return arguments.length?(d=b,e="right"==d||"bottom"==d,a):d},a.ranges=function(b){return arguments.length?(g=b,a):g},a.markers=function(b){return arguments.length?(h=b,a):h},a.measures=function(b){return arguments.length?(i=b,a):i},a.width=function(b){return arguments.length?(j=b,a):j},a.height=function(b){return arguments.length?(k=b,a):k},a.margin=function(b){return arguments.length?(f.top="undefined"!=typeof b.top?b.top:f.top,f.right="undefined"!=typeof b.right?b.right:f.right,f.bottom="undefined"!=typeof b.bottom?b.bottom:f.bottom,f.left="undefined"!=typeof b.left?b.left:f.left,a):f},a.tickFormat=function(b){return arguments.length?(l=b,a):l},a.tooltips=function(b){return arguments.length?(m=b,a):m},a.tooltipContent=function(b){return arguments.length?(n=b,a):n},a.noData=function(b){return arguments.length?(o=b,a):o},a},c.models.cumulativeLineChart=function(){function a(c){return c.each(function(c){function s(){d3.select(a.container).style("cursor","ew-resize")}function C(){A.x=d3.event.x,A.i=Math.round(z.invert(A.x)),E()}function D(){d3.select(a.container).style("cursor","auto"),u.index=A.i,y.stateChange(u)}function E(){W.data([A]),F.call(a)}var F=d3.select(this).classed("nv-chart-"+t,!0),G=this,H=(m||parseInt(F.style("width"))||960)-k.left-k.right,I=(n||parseInt(F.style("height"))||400)-k.top-k.bottom;if(a.update=function(){F.transition().call(a)},a.container=this,u.disabled=c.map(function(a){return!!a.disabled}),!v){var J;v={};for(J in u)v[J]=u[J]instanceof Array?u[J].slice(0):u[J]}var K=d3.behavior.drag().on("dragstart",s).on("drag",C).on("dragend",D);if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var L=F.selectAll(".nv-noData").data([w]);return L.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),L.attr("x",k.left+H/2).attr("y",k.top+I/2).text(function(a){return a}),a}if(F.selectAll(".nv-noData").remove(),d=f.xScale(),e=f.yScale(),r)f.yDomain(null);else{var M=c.filter(function(a){return!a.disabled}).map(function(a){var b=d3.extent(a.values,f.y());return b[0]<-.95&&(b[0]=-.95),[(b[0]-b[1])/(1+b[1]),(b[1]-b[0])/(1+b[0])]}),N=[d3.min(M,function(a){return a[0]}),d3.max(M,function(a){return a[1]})];f.yDomain(N)}z.domain([0,c[0].values.length-1]).range([0,H]).clamp(!0);var c=b(A.i,c),O=F.selectAll("g.nv-wrap.nv-cumulativeLine").data([c]),P=O.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g"),Q=O.select("g");if(P.append("g").attr("class","nv-x nv-axis"),P.append("g").attr("class","nv-y nv-axis"),P.append("g").attr("class","nv-background"),P.append("g").attr("class","nv-linesWrap"),P.append("g").attr("class","nv-avgLinesWrap"),P.append("g").attr("class","nv-legendWrap"),P.append("g").attr("class","nv-controlsWrap"),o&&(i.width(H),Q.select(".nv-legendWrap").datum(c).call(i),k.top!=i.height()&&(k.top=i.height()+i.legendBelowPadding(),I=(n||parseInt(F.style("height"))||400)-k.top-k.bottom),Q.select(".nv-legendWrap").attr("transform","translate(0,"+-k.top+")")),q){var R=[{key:"Re-scale y-axis",disabled:!r}];j.width(140).color(["#444","#444","#444"]),Q.select(".nv-controlsWrap").datum(R).attr("transform","translate(0,"+-k.top+")").call(j)}O.attr("transform","translate("+k.left+","+k.top+")");var S=c.filter(function(a){return a.tempDisabled});O.select(".tempDisabled").remove(),S.length&&O.append("text").attr("class","tempDisabled").attr("x",H/2).attr("y","-.71em").style("text-anchor","end").text(S.map(function(a){return a.key}).join(", ")+" values cannot be calculated for this time period."),P.select(".nv-background").append("rect"),Q.select(".nv-background rect").attr("width",H).attr("height",I),f.y(function(a){return a.display.y}).width(H).height(I).color(c.map(function(a,b){return a.color||l(a,b)}).filter(function(a,b){return!c[b].disabled&&!c[b].tempDisabled}));var T=Q.select(".nv-linesWrap").datum(c.filter(function(a){return!a.disabled&&!a.tempDisabled}));T.call(f),c.forEach(function(a,b){a.seriesIndex=b});var U=c.filter(function(a){return!a.disabled&&!!x(a)}),V=Q.select(".nv-avgLinesWrap").selectAll("line").data(U,function(a){return a.key});V.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(a){return f.color()(a,a.seriesIndex)}).attr("x1",0).attr("x2",H).attr("y1",function(a){return e(x(a))}).attr("y2",function(a){return e(x(a))}),V.attr("x1",0).attr("x2",H).attr("y1",function(a){return e(x(a))}).attr("y2",function(a){return e(x(a))}),V.exit().remove();var W=T.selectAll(".nv-indexLine").data([A]);W.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).call(K),W.attr("transform",function(a){return"translate("+z(a.i)+",0)"}).attr("height",I),g.scale(d).ticks(Math.min(c[0].values.length,H/70)).tickSize(-I,0),Q.select(".nv-x.nv-axis").attr("transform","translate(0,"+e.range()[0]+")"),d3.transition(Q.select(".nv-x.nv-axis")).call(g),h.scale(e).ticks(I/36).tickSize(-H,0),d3.transition(Q.select(".nv-y.nv-axis")).call(h),Q.select(".nv-background rect").on("click",function(){A.x=d3.mouse(this)[0],A.i=Math.round(z.invert(A.x)),u.index=A.i,y.stateChange(u),E()}),f.dispatch.on("elementClick",function(a){A.i=a.pointIndex,A.x=z(A.i),u.index=A.i,y.stateChange(u),E()}),j.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,r=!b.disabled,u.rescaleY=r,y.stateChange(u),a.update()}),i.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,O.selectAll(".nv-series").classed("disabled",!1),a}),u.disabled=c.map(function(a){return!!a.disabled}),y.stateChange(u),a.update()}),i.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,u.disabled=c.map(function(a){return!!a.disabled}),y.stateChange(u),a.update()}),y.on("tooltipShow",function(a){p&&B(a,G.parentNode)}),y.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),u.disabled=b.disabled),"undefined"!=typeof b.index&&(A.i=b.index,A.x=z(A.i),u.index=b.index,W.data([A])),"undefined"!=typeof b.rescaleY&&(r=b.rescaleY),a.update()})}),a}function b(a,b){return b.map(function(b){if(!b.values)return b;var c=f.y()(b.values[a],a);return-.95>c?(b.tempDisabled=!0,b):(b.tempDisabled=!1,b.values=b.values.map(function(a,b){return a.display={y:(f.y()(a,b)-c)/(1+c)},a}),b)})}var d,e,f=c.models.line(),g=c.models.axis(),h=c.models.axis(),i=c.models.legend(),j=c.models.legend(),k={top:30,right:30,bottom:50,left:60},l=c.utils.defaultColor(),m=null,n=null,o=!0,p=!0,q=!0,r=!0,s=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" at "+b+"</p>"},t=f.id(),u={index:0,rescaleY:r},v=null,w="No Data Available.",x=function(a){return a.average},y=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");g.orient("bottom").tickPadding(7),h.orient("left");var z=d3.scale.linear(),A={i:0,x:0},B=function(b,d){var e=b.pos[0]+(d.offsetLeft||0),i=b.pos[1]+(d.offsetTop||0),j=g.tickFormat()(f.x()(b.point,b.pointIndex)),k=h.tickFormat()(f.y()(b.point,b.pointIndex)),l=s(b.series.key,j,k,b,a);c.tooltip.show([e,i],l,null,null,d)};return f.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+k.left,a.pos[1]+k.top],y.tooltipShow(a)}),f.dispatch.on("elementMouseout.tooltip",function(a){y.tooltipHide(a)}),y.on("tooltipHide",function(){p&&c.tooltip.cleanup()}),a.dispatch=y,a.lines=f,a.legend=i,a.xAxis=g,a.yAxis=h,d3.rebind(a,f,"defined","isArea","x","y","size","xDomain","yDomain","forceX","forceY","interactive","clipEdge","clipVoronoi","id"),a.margin=function(b){return arguments.length?(k.top="undefined"!=typeof b.top?b.top:k.top,k.right="undefined"!=typeof b.right?b.right:k.right,k.bottom="undefined"!=typeof b.bottom?b.bottom:k.bottom,k.left="undefined"!=typeof b.left?b.left:k.left,a):k},a.width=function(b){return arguments.length?(m=b,a):m},a.height=function(b){return arguments.length?(n=b,a):n},a.color=function(b){return arguments.length?(l=c.utils.getColor(b),i.color(l),a):l},a.rescaleY=function(a){return arguments.length?r=a:r},a.showControls=function(b){return arguments.length?(q=b,a):q},a.showLegend=function(b){return arguments.length?(o=b,a):o},a.tooltips=function(b){return arguments.length?(p=b,a):p},a.tooltipContent=function(b){return arguments.length?(s=b,a):s},a.state=function(b){return arguments.length?(u=b,a):u},a.defaultState=function(b){return arguments.length?(v=b,a):v},a.noData=function(b){return arguments.length?(w=b,a):w},a.average=function(b){return arguments.length?(x=b,a):x},a},c.models.discreteBar=function(){function a(c){return c.each(function(a){var c=h-g.left-g.right,j=i-g.top-g.bottom,u=d3.select(this);a=a.map(function(a,b){return a.values=a.values.map(function(a){return a.series=b,a}),a});var v=b&&d?[]:a.map(function(a){return a.values.map(function(a,b){return{x:m(a,b),y:n(a,b),y0:a.y0}})});k.domain(b||d3.merge(v).map(function(a){return a.x})).rangeBands([0,c],.1),l.domain(d||d3.extent(d3.merge(v).map(function(a){return a.y}).concat(o))),q?l.range([j-(l.domain()[0]<0?12:0),l.domain()[1]>0?12:0]):l.range([j,0]),e=e||k,f=f||l.copy().range([l(0),l(0)]);{var w=u.selectAll("g.nv-wrap.nv-discretebar").data([a]),x=w.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar"),y=x.append("g");w.select("g")}y.append("g").attr("class","nv-groups"),w.attr("transform","translate("+g.left+","+g.top+")");var z=w.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});z.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),d3.transition(z.exit()).style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),z.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}),d3.transition(z).style("stroke-opacity",1).style("fill-opacity",.75);var A=z.selectAll("g.nv-bar").data(function(a){return a.values});A.exit().remove();var B=A.enter().append("g").attr("transform",function(a,b){return"translate("+(k(m(a,b))+.05*k.rangeBand())+", "+l(0)+")"}).on("mouseover",function(b,c){d3.select(this).classed("hover",!0),s.elementMouseover({value:n(b,c),point:b,series:a[b.series],pos:[k(m(b,c))+k.rangeBand()*(b.series+.5)/a.length,l(n(b,c))],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),s.elementMouseout({value:n(b,c),point:b,series:a[b.series],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("click",function(b,c){s.elementClick({value:n(b,c),point:b,series:a[b.series],pos:[k(m(b,c))+k.rangeBand()*(b.series+.5)/a.length,l(n(b,c))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(b,c){s.elementDblClick({value:n(b,c),point:b,series:a[b.series],pos:[k(m(b,c))+k.rangeBand()*(b.series+.5)/a.length,l(n(b,c))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()});B.append("rect").attr("height",0).attr("width",.9*k.rangeBand()/a.length),q?(B.append("text").attr("text-anchor","middle"),A.select("text").attr("x",.9*k.rangeBand()/2).attr("y",function(a,b){return n(a,b)<0?l(n(a,b))-l(0)+12:-4}).text(function(a,b){return r(n(a,b))})):A.selectAll("text").remove(),A.attr("class",function(a,b){return n(a,b)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(a,b){return a.color||p(a,b)}).style("stroke",function(a,b){return a.color||p(a,b)}).select("rect").attr("class",t).attr("width",.9*k.rangeBand()/a.length),d3.transition(A).attr("transform",function(a,b){var c=k(m(a,b))+.05*k.rangeBand(),d=n(a,b)<0?l(0):l(0)-l(n(a,b))<1?l(0)-1:l(n(a,b));return"translate("+c+", "+d+")"}).select("rect").attr("height",function(a,b){return Math.max(Math.abs(l(n(a,b))-l(0))||1)}),e=k.copy(),f=l.copy()}),a}var b,d,e,f,g={top:0,right:0,bottom:0,left:0},h=960,i=500,j=Math.floor(1e4*Math.random()),k=d3.scale.ordinal(),l=d3.scale.linear(),m=function(a){return a.x},n=function(a){return a.y},o=[0],p=c.utils.defaultColor(),q=!1,r=d3.format(",.2f"),s=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),t="discreteBar";return a.dispatch=s,a.x=function(b){return arguments.length?(m=b,a):m},a.y=function(b){return arguments.length?(n=b,a):n},a.margin=function(b){return arguments.length?(g.top="undefined"!=typeof b.top?b.top:g.top,g.right="undefined"!=typeof b.right?b.right:g.right,g.bottom="undefined"!=typeof b.bottom?b.bottom:g.bottom,g.left="undefined"!=typeof b.left?b.left:g.left,a):g},a.width=function(b){return arguments.length?(h=b,a):h},a.height=function(b){return arguments.length?(i=b,a):i},a.xScale=function(b){return arguments.length?(k=b,a):k},a.yScale=function(b){return arguments.length?(l=b,a):l},a.xDomain=function(c){return arguments.length?(b=c,a):b},a.yDomain=function(b){return arguments.length?(d=b,a):d},a.forceY=function(b){return arguments.length?(o=b,a):o},a.color=function(b){return arguments.length?(p=c.utils.getColor(b),a):p},a.id=function(b){return arguments.length?(j=b,a):j},a.showValues=function(b){return arguments.length?(q=b,a):q},a.valueFormat=function(b){return arguments.length?(r=b,a):r},a.rectClass=function(b){return arguments.length?(t=b,a):t},a},c.models.discreteBarChart=function(){function a(c){return c.each(function(c){var k=d3.select(this),n=this,r=(i||parseInt(k.style("width"))||960)-h.left-h.right,s=(j||parseInt(k.style("height"))||400)-h.top-h.bottom;if(a.update=function(){p.beforeUpdate(),k.transition().call(a)},a.container=this,!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var t=k.selectAll(".nv-noData").data([o]);return t.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),t.attr("x",h.left+r/2).attr("y",h.top+s/2).text(function(a){return a}),a}k.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var u=k.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([c]),v=u.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g"),w=v.append("defs"),x=u.select("g");v.append("g").attr("class","nv-x nv-axis"),v.append("g").attr("class","nv-y nv-axis"),v.append("g").attr("class","nv-barsWrap"),x.attr("transform","translate("+h.left+","+h.top+")"),e.width(r).height(s);var y=x.select(".nv-barsWrap").datum(c.filter(function(a){return!a.disabled}));d3.transition(y).call(e),w.append("clipPath").attr("id","nv-x-label-clip-"+e.id()).append("rect"),x.select("#nv-x-label-clip-"+e.id()+" rect").attr("width",b.rangeBand()*(l?2:1)).attr("height",16).attr("x",-b.rangeBand()/(l?1:2)),f.scale(b).ticks(r/100).tickSize(-s,0),x.select(".nv-x.nv-axis").attr("transform","translate(0,"+(d.range()[0]+(e.showValues()&&d.domain()[0]<0?16:0))+")"),x.select(".nv-x.nv-axis").transition().duration(0).call(f);var z=x.select(".nv-x.nv-axis").selectAll("g");l&&z.selectAll("text").attr("transform",function(a,b,c){return"translate(0,"+(c%2==0?"5":"17")+")"}),g.scale(d).ticks(s/36).tickSize(-r,0),d3.transition(x.select(".nv-y.nv-axis")).call(g),p.on("tooltipShow",function(a){m&&q(a,n.parentNode)})}),a}var b,d,e=c.models.discreteBar(),f=c.models.axis(),g=c.models.axis(),h={top:15,right:10,bottom:50,left:60},i=null,j=null,k=c.utils.getColor(),l=!1,m=!0,n=function(a,b,c){return"<h3>"+b+"</h3><p>"+c+"</p>"},o="No Data Available.",p=d3.dispatch("tooltipShow","tooltipHide","beforeUpdate");f.orient("bottom").highlightZero(!1).showMaxMin(!1).tickFormat(function(a){return a}),g.orient("left").tickFormat(d3.format(",.1f"));var q=function(b,d){var h=b.pos[0]+(d.offsetLeft||0),i=b.pos[1]+(d.offsetTop||0),j=f.tickFormat()(e.x()(b.point,b.pointIndex)),k=g.tickFormat()(e.y()(b.point,b.pointIndex)),l=n(b.series.key,j,k,b,a);c.tooltip.show([h,i],l,b.value<0?"n":"s",null,d)};return e.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+h.left,a.pos[1]+h.top],p.tooltipShow(a)}),e.dispatch.on("elementMouseout.tooltip",function(a){p.tooltipHide(a)}),p.on("tooltipHide",function(){m&&c.tooltip.cleanup()}),a.dispatch=p,a.discretebar=e,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"x","y","xDomain","yDomain","forceX","forceY","id","showValues","valueFormat"),a.margin=function(b){return arguments.length?(h.top="undefined"!=typeof b.top?b.top:h.top,h.right="undefined"!=typeof b.right?b.right:h.right,h.bottom="undefined"!=typeof b.bottom?b.bottom:h.bottom,h.left="undefined"!=typeof b.left?b.left:h.left,a):h},a.width=function(b){return arguments.length?(i=b,a):i},a.height=function(b){return arguments.length?(j=b,a):j},a.color=function(b){return arguments.length?(k=c.utils.getColor(b),e.color(k),a):k},a.staggerLabels=function(b){return arguments.length?(l=b,a):l},a.tooltips=function(b){return arguments.length?(m=b,a):m},a.tooltipContent=function(b){return arguments.length?(n=b,a):n},a.noData=function(b){return arguments.length?(o=b,a):o},a},c.models.distribution=function(){function a(c){return c.each(function(a){var c=(e-("x"===g?d.left+d.right:d.top+d.bottom),"x"==g?"y":"x"),k=d3.select(this);b=b||j;var l=k.selectAll("g.nv-distribution").data([a]),m=l.enter().append("g").attr("class","nvd3 nv-distribution"),n=(m.append("g"),l.select("g"));l.attr("transform","translate("+d.left+","+d.top+")");var o=n.selectAll("g.nv-dist").data(function(a){return a},function(a){return a.key});o.enter().append("g"),o.attr("class",function(a,b){return"nv-dist nv-series-"+b}).style("stroke",function(a,b){return i(a,b)});var p=o.selectAll("line.nv-dist"+g).data(function(a){return a.values});p.enter().append("line").attr(g+"1",function(a,c){return b(h(a,c))}).attr(g+"2",function(a,c){return b(h(a,c))}),d3.transition(o.exit().selectAll("line.nv-dist"+g)).attr(g+"1",function(a,b){return j(h(a,b))}).attr(g+"2",function(a,b){return j(h(a,b))}).style("stroke-opacity",0).remove(),p.attr("class",function(a,b){return"nv-dist"+g+" nv-dist"+g+"-"+b}).attr(c+"1",0).attr(c+"2",f),d3.transition(p).attr(g+"1",function(a,b){return j(h(a,b))}).attr(g+"2",function(a,b){return j(h(a,b))}),b=j.copy()}),a}var b,d={top:0,right:0,bottom:0,left:0},e=400,f=8,g="x",h=function(a){return a[g]},i=c.utils.defaultColor(),j=d3.scale.linear();return a.margin=function(b){return arguments.length?(d.top="undefined"!=typeof b.top?b.top:d.top,d.right="undefined"!=typeof b.right?b.right:d.right,d.bottom="undefined"!=typeof b.bottom?b.bottom:d.bottom,d.left="undefined"!=typeof b.left?b.left:d.left,a):d},a.width=function(b){return arguments.length?(e=b,a):e},a.axis=function(b){return arguments.length?(g=b,a):g},a.size=function(b){return arguments.length?(f=b,a):f},a.getData=function(b){return arguments.length?(h=d3.functor(b),a):h},a.scale=function(b){return arguments.length?(j=b,a):j},a.color=function(b){return arguments.length?(i=c.utils.getColor(b),a):i},a},c.models.historicalBar=function(){function a(c){return c.each(function(a){var c=f-e.left-e.right,s=g-e.top-e.bottom,t=d3.select(this);i.domain(b||d3.extent(a[0].values.map(k).concat(m))),o?i.range([.5*c/a[0].values.length,c*(a[0].values.length-.5)/a[0].values.length]):i.range([0,c]),j.domain(d||d3.extent(a[0].values.map(l).concat(n))).range([s,0]),(i.domain()[0]===i.domain()[1]||j.domain()[0]===j.domain()[1])&&(singlePoint=!0),i.domain()[0]===i.domain()[1]&&(i.domain()[0]?i.domain([i.domain()[0]-.01*i.domain()[0],i.domain()[1]+.01*i.domain()[1]]):i.domain([-1,1])),j.domain()[0]===j.domain()[1]&&(j.domain()[0]?j.domain([j.domain()[0]+.01*j.domain()[0],j.domain()[1]-.01*j.domain()[1]]):j.domain([-1,1]));var u=t.selectAll("g.nv-wrap.nv-bar").data([a[0].values]),v=u.enter().append("g").attr("class","nvd3 nv-wrap nv-bar"),w=v.append("defs"),x=v.append("g"),y=u.select("g");x.append("g").attr("class","nv-bars"),u.attr("transform","translate("+e.left+","+e.top+")"),t.on("click",function(a,b){r.chartClick({data:a,index:b,pos:d3.event,id:h})}),w.append("clipPath").attr("id","nv-chart-clip-path-"+h).append("rect"),u.select("#nv-chart-clip-path-"+h+" rect").attr("width",c).attr("height",s),y.attr("clip-path",p?"url(#nv-chart-clip-path-"+h+")":"");
-var z=u.select(".nv-bars").selectAll(".nv-bar").data(function(a){return a});z.exit().remove();z.enter().append("rect").attr("x",0).attr("y",function(a,b){return j(Math.max(0,l(a,b)))}).attr("height",function(a,b){return Math.abs(j(l(a,b))-j(0))}).on("mouseover",function(b,c){d3.select(this).classed("hover",!0),r.elementMouseover({point:b,series:a[0],pos:[i(k(b,c)),j(l(b,c))],pointIndex:c,seriesIndex:0,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),r.elementMouseout({point:b,series:a[0],pointIndex:c,seriesIndex:0,e:d3.event})}).on("click",function(a,b){r.elementClick({value:l(a,b),data:a,index:b,pos:[i(k(a,b)),j(l(a,b))],e:d3.event,id:h}),d3.event.stopPropagation()}).on("dblclick",function(a,b){r.elementDblClick({value:l(a,b),data:a,index:b,pos:[i(k(a,b)),j(l(a,b))],e:d3.event,id:h}),d3.event.stopPropagation()});z.attr("fill",function(a,b){return q(a,b)}).attr("class",function(a,b,c){return(l(a,b)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+c+"-"+b}).attr("transform",function(b,d){return"translate("+(i(k(b,d))-c/a[0].values.length*.45)+",0)"}).attr("width",c/a[0].values.length*.9),d3.transition(z).attr("y",function(a,b){return l(a,b)<0?j(0):j(0)-j(l(a,b))<1?j(0)-1:j(l(a,b))}).attr("height",function(a,b){return Math.max(Math.abs(j(l(a,b))-j(0)),1)})}),a}var b,d,e={top:0,right:0,bottom:0,left:0},f=960,g=500,h=Math.floor(1e4*Math.random()),i=d3.scale.linear(),j=d3.scale.linear(),k=function(a){return a.x},l=function(a){return a.y},m=[],n=[0],o=!1,p=!0,q=c.utils.defaultColor(),r=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return a.dispatch=r,a.x=function(b){return arguments.length?(k=b,a):k},a.y=function(b){return arguments.length?(l=b,a):l},a.margin=function(b){return arguments.length?(e.top="undefined"!=typeof b.top?b.top:e.top,e.right="undefined"!=typeof b.right?b.right:e.right,e.bottom="undefined"!=typeof b.bottom?b.bottom:e.bottom,e.left="undefined"!=typeof b.left?b.left:e.left,a):e},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.xScale=function(b){return arguments.length?(i=b,a):i},a.yScale=function(b){return arguments.length?(j=b,a):j},a.xDomain=function(c){return arguments.length?(b=c,a):b},a.yDomain=function(b){return arguments.length?(d=b,a):d},a.forceX=function(b){return arguments.length?(m=b,a):m},a.forceY=function(b){return arguments.length?(n=b,a):n},a.padData=function(b){return arguments.length?(o=b,a):o},a.clipEdge=function(b){return arguments.length?(p=b,a):p},a.color=function(b){return arguments.length?(q=c.utils.getColor(b),a):q},a.id=function(b){return arguments.length?(h=b,a):h},a},c.models.historicalBarChart=function(){function a(c){return c.each(function(r){var x=d3.select(this),y=this,z=(k||parseInt(x.style("width"))||960)-i.left-i.right,A=(l||parseInt(x.style("height"))||400)-i.top-i.bottom;if(a.update=function(){a(c)},a.container=this,s.disabled=r.map(function(a){return!!a.disabled}),!t){var B;t={};for(B in s)t[B]=s[B]instanceof Array?s[B].slice(0):s[B]}if(!(r&&r.length&&r.filter(function(a){return a.values.length}).length)){var C=x.selectAll(".nv-noData").data([u]);return C.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),C.attr("x",i.left+z/2).attr("y",i.top+A/2).text(function(a){return a}),a}x.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var D=x.selectAll("g.nv-wrap.nv-lineChart").data([r]),E=D.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),F=D.select("g");E.append("g").attr("class","nv-x nv-axis"),E.append("g").attr("class","nv-y nv-axis"),E.append("g").attr("class","nv-barsWrap"),E.append("g").attr("class","nv-legendWrap"),m&&(h.width(z),F.select(".nv-legendWrap").datum(r).call(h),i.top!=h.height()&&(i.top=h.height()+h.legendBelowPadding(),A=(l||parseInt(x.style("height"))||400)-i.top-i.bottom),D.select(".nv-legendWrap").attr("transform","translate(0,"+-i.top+")")),D.attr("transform","translate("+i.left+","+i.top+")"),p&&F.select(".nv-y.nv-axis").attr("transform","translate("+z+",0)"),e.width(z).height(A).color(r.map(function(a,b){return a.color||j(a,b)}).filter(function(a,b){return!r[b].disabled}));var G=F.select(".nv-barsWrap").datum(r.filter(function(a){return!a.disabled}));d3.transition(G).call(e),n&&(f.scale(b).tickSize(-A,0),F.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),F.select(".nv-x.nv-axis").transition().call(f)),o&&(g.scale(d).ticks(A/36).tickSize(-z,0),F.select(".nv-y.nv-axis").transition().duration(0).call(g)),h.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,r.filter(function(a){return!a.disabled}).length||r.map(function(a){return a.disabled=!1,D.selectAll(".nv-series").classed("disabled",!1),a}),s.disabled=r.map(function(a){return!!a.disabled}),v.stateChange(s),c.transition().call(a)}),h.dispatch.on("legendDblclick",function(b){r.forEach(function(a){a.disabled=!0}),b.disabled=!1,s.disabled=r.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),v.on("tooltipShow",function(a){q&&w(a,y.parentNode)}),v.on("changeState",function(b){"undefined"!=typeof b.disabled&&(r.forEach(function(a,c){a.disabled=b.disabled[c]}),s.disabled=b.disabled),c.call(a)})}),a}var b,d,e=c.models.historicalBar(),f=c.models.axis(),g=c.models.axis(),h=c.models.legend(),i={top:30,right:90,bottom:50,left:90},j=c.utils.defaultColor(),k=null,l=null,m=!1,n=!0,o=!0,p=!1,q=!0,r=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" at "+b+"</p>"},s={},t=null,u="No Data Available.",v=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");f.orient("bottom").tickPadding(7),g.orient(p?"right":"left");var w=function(b,d){if(d){var h=d3.select(d).select("svg"),i=h.node()?h.attr("viewBox"):null;if(i){i=i.split(" ");var j=parseInt(h.style("width"))/i[2];b.pos[0]=b.pos[0]*j,b.pos[1]=b.pos[1]*j}}var k=b.pos[0]+(d.offsetLeft||0),l=b.pos[1]+(d.offsetTop||0),m=f.tickFormat()(e.x()(b.point,b.pointIndex)),n=g.tickFormat()(e.y()(b.point,b.pointIndex)),o=r(b.series.key,m,n,b,a);c.tooltip.show([k,l],o,null,null,d)};return e.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+i.left,a.pos[1]+i.top],v.tooltipShow(a)}),e.dispatch.on("elementMouseout.tooltip",function(a){v.tooltipHide(a)}),v.on("tooltipHide",function(){q&&c.tooltip.cleanup()}),a.dispatch=v,a.bars=e,a.legend=h,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","forceX","forceY","interactive","clipEdge","clipVoronoi","id","interpolate"),a.margin=function(b){return arguments.length?(i.top="undefined"!=typeof b.top?b.top:i.top,i.right="undefined"!=typeof b.right?b.right:i.right,i.bottom="undefined"!=typeof b.bottom?b.bottom:i.bottom,i.left="undefined"!=typeof b.left?b.left:i.left,a):i},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(j=c.utils.getColor(b),h.color(j),a):j},a.showLegend=function(b){return arguments.length?(m=b,a):m},a.showXAxis=function(b){return arguments.length?(n=b,a):n},a.showYAxis=function(b){return arguments.length?(o=b,a):o},a.rightAlignYAxis=function(b){return arguments.length?(p=b,g.orient(b?"right":"left"),a):p},a.tooltips=function(b){return arguments.length?(q=b,a):q},a.tooltipContent=function(b){return arguments.length?(r=b,a):r},a.state=function(b){return arguments.length?(s=b,a):s},a.defaultState=function(b){return arguments.length?(t=b,a):t},a.noData=function(b){return arguments.length?(u=b,a):u},a},c.models.indentedTree=function(){function a(b){return b.each(function(b){function c(b,d,e){return d3.event.stopPropagation(),d3.event.shiftKey&&!e?(d3.event.shiftKey=!1,b.values&&b.values.forEach(function(a){(a.values||a._values)&&c(a,0,!0)}),!0):g(b)?(b.values?(b._values=b.values,b.values=null):(b.values=b._values,b._values=null),a.update(),void 0):!0}function d(a){return a._values&&a._values.length?n:a.values&&a.values.length?o:""}function f(a){return a._values&&a._values.length}function g(a){var b=a.values||a._values;return b&&b.length}var r=1,s=d3.select(this),t=d3.layout.tree().children(function(a){return a.values}).size([e,k]);a.update=function(){s.transition().duration(600).call(a)},b[0]||(b[0]={key:j});var u=t.nodes(b[0]),v=d3.select(this).selectAll("div").data([[u]]),w=v.enter().append("div").attr("class","nvd3 nv-wrap nv-indentedtree"),x=w.append("table"),y=v.select("table").attr("width","100%").attr("class",m);if(h){var z=x.append("thead"),A=z.append("tr");l.forEach(function(a){A.append("th").attr("width",a.width?a.width:"10%").style("text-align","numeric"==a.type?"right":"left").append("span").text(a.label)})}var B=y.selectAll("tbody").data(function(a){return a});B.enter().append("tbody"),r=d3.max(u,function(a){return a.depth}),t.size([e,r*k]);var C=B.selectAll("tr").data(function(a){return a.filter(function(a){return i&&!a.children?i(a):!0})},function(a){return a.id||a.id||++q});C.exit().remove(),C.select("img.nv-treeicon").attr("src",d).classed("folded",f);var D=C.enter().append("tr");l.forEach(function(a,b){var e=D.append("td").style("padding-left",function(a){return(b?0:a.depth*k+12+(d(a)?0:16))+"px"},"important").style("text-align","numeric"==a.type?"right":"left");0==b&&e.append("img").classed("nv-treeicon",!0).classed("nv-folded",f).attr("src",d).style("width","14px").style("height","14px").style("padding","0 1px").style("display",function(a){return d(a)?"inline-block":"none"}).on("click",c),e.append("span").attr("class",d3.functor(a.classes)).text(function(b){return a.format?a.format(b):b[a.key]||"-"}),a.showCount&&(e.append("span").attr("class","nv-childrenCount"),C.selectAll("span.nv-childrenCount").text(function(a){return a.values&&a.values.length||a._values&&a._values.length?"("+(a.values&&a.values.filter(function(a){return i?i(a):!0}).length||a._values&&a._values.filter(function(a){return i?i(a):!0}).length||0)+")":""})),a.click&&e.select("span").on("click",a.click)}),C.order().on("click",function(a){p.elementClick({row:this,data:a,pos:[a.x,a.y]})}).on("dblclick",function(a){p.elementDblclick({row:this,data:a,pos:[a.x,a.y]})}).on("mouseover",function(a){p.elementMouseover({row:this,data:a,pos:[a.x,a.y]})}).on("mouseout",function(a){p.elementMouseout({row:this,data:a,pos:[a.x,a.y]})})}),a}var b={top:0,right:0,bottom:0,left:0},d=960,e=500,f=c.utils.defaultColor(),g=Math.floor(1e4*Math.random()),h=!0,i=!1,j="No Data Available.",k=20,l=[{key:"key",label:"Name",type:"text"}],m=null,n="images/grey-plus.png",o="images/grey-minus.png",p=d3.dispatch("elementClick","elementDblclick","elementMouseover","elementMouseout"),q=0;return a.margin=function(c){return arguments.length?(b.top="undefined"!=typeof c.top?c.top:b.top,b.right="undefined"!=typeof c.right?c.right:b.right,b.bottom="undefined"!=typeof c.bottom?c.bottom:b.bottom,b.left="undefined"!=typeof c.left?c.left:b.left,a):b},a.width=function(b){return arguments.length?(d=b,a):d},a.height=function(b){return arguments.length?(e=b,a):e},a.color=function(b){return arguments.length?(f=c.utils.getColor(b),scatter.color(f),a):f},a.id=function(b){return arguments.length?(g=b,a):g},a.header=function(b){return arguments.length?(h=b,a):h},a.noData=function(b){return arguments.length?(j=b,a):j},a.filterZero=function(b){return arguments.length?(i=b,a):i},a.columns=function(b){return arguments.length?(l=b,a):l},a.tableClass=function(b){return arguments.length?(m=b,a):m},a.iconOpen=function(b){return arguments.length?(n=b,a):n},a.iconClose=function(b){return arguments.length?(o=b,a):o},a},c.models.legend=function(){function a(a,b,c,d,e,f,g,h,i){var j;return j="M"+(a+e)+","+b,j+="h"+(c-2*e),g?j+="a"+e+","+e+" 0 0 1 "+e+","+e:(j+="h"+e,j+="v"+e),j+="v"+(d-2*e),i?j+="a"+e+","+e+" 0 0 1 "+-e+","+e:(j+="v"+e,j+="h"+-e),j+="h"+(2*e-c),h?j+="a"+e+","+e+" 0 0 1 "+-e+","+-e:(j+="h"+-e,j+="v"+-e),j+="v"+(2*e-d),f?j+="a"+e+","+e+" 0 0 1 "+e+","+-e:(j+="v"+-e,j+="h"+e),j+="z"}function b(n){return n.each(function(b){var n=e-d.left-d.right,o=d3.select(this),p=o.selectAll("g.nv-legend").data([b]),q=(p.enter().append("g").attr("class","nvd3 nv-legend").append("g"),p.select("g"));p.attr("transform","translate("+d.left+","+d.top+")");var r=q.selectAll(".nv-series").data(function(a){return a}),s=r.enter().append("g").attr("class","nv-series").on("mouseover",function(a,b){j.legendMouseover(a,b)}).on("mouseout",function(a,b){j.legendMouseout(a,b)}).on("click",function(a,b){j.legendClick(a,b)}).on("dblclick",function(a,b){j.legendDblclick(a,b)});if(s.append("path"),s.append("circle").style("stroke-width",2).attr("r",5),s.append("text").attr("text-anchor","start").attr("dy",".33em").attr("dx","12"),r.classed("disabled",function(a){return a.disabled}),r.exit().remove(),r.select("circle").style("fill",function(a,b){return a.color||h(a,b)}).style("stroke",function(a,b){return a.color||h(a,b)}),r.select("text").text(g),i){var t=[];r.each(function(){var a=d3.select(this).select("text"),b=a.node().getComputedTextLength()||c.utils.calcApproxTextWidth(a);t.push(b+l)});for(var u=0,v=0,w=[];n>v&&u<t.length;)w[u]=t[u],v+=t[u++];for(;v>n&&u>1;){for(w=[],u--,k=0;k<t.length;k++)t[k]>(w[k%u]||0)&&(w[k%u]=t[k]);v=w.reduce(function(a,b){return a+b})}for(var x=[],y=0,z=0;u>y;y++)x[y]=z,z+=w[y];r.attr("transform",function(a,b){return"translate("+x[b%u]+","+(5+20*Math.floor(b/u))+")"}).select("path").attr("d",function(b,c){var d=!1,e=!1;return 0==c?d=!0:c==t.length-1&&(e=!0),a(-14,-14,t[c],28,m,d,e,d,e)}),q.attr("transform","translate("+(e-d.right-v)+","+d.top+")"),f=d.top+d.bottom+20*Math.ceil(t.length/u)}else{var A,B=5,C=5,D=0;r.attr("transform",function(){var a=d3.select(this).select("text").node().getComputedTextLength()+28;return A=C,e<d.left+d.right+A+a&&(C=A=5,B+=20),C+=a,C>D&&(D=C),"translate("+A+","+B+")"}),q.attr("transform","translate("+(e-d.right-D)+","+d.top+")"),f=d.top+d.bottom+B+15}}),b}var d={top:5,right:0,bottom:5,left:0},e=400,f=20,g=function(a){return a.key},h=c.utils.defaultColor(),i=!0,j=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout"),l=28,m=0,n=20;return b.dispatch=j,b.svgComputedTextPadding=function(a){return arguments.length?(l=a,b):l},b.roundedRecRadius=function(a){return arguments.length?(m=a,b):m},b.legendBelowPadding=function(a){return arguments.length?(n=a,b):n},b.margin=function(a){return arguments.length?(d.top="undefined"!=typeof a.top?a.top:d.top,d.right="undefined"!=typeof a.right?a.right:d.right,d.bottom="undefined"!=typeof a.bottom?a.bottom:d.bottom,d.left="undefined"!=typeof a.left?a.left:d.left,b):d},b.width=function(a){return arguments.length?(e=a,b):e},b.height=function(a){return arguments.length?(f=a,b):f},b.key=function(a){return arguments.length?(g=a,b):g},b.color=function(a){return arguments.length?(h=c.utils.getColor(a),b):h},b.align=function(a){return arguments.length?(i=a,b):i},b},c.models.line=function(){function a(c){return c.each(function(a){var c=g-f.left-f.right,r=h-f.top-f.bottom,s=d3.select(this);b=e.xScale(),d=e.yScale(),p=p||b,q=q||d;var t=s.selectAll("g.nv-wrap.nv-line").data([a]),u=t.enter().append("g").attr("class","nvd3 nv-wrap nv-line"),v=u.append("defs"),w=u.append("g"),x=t.select("g");w.append("g").attr("class","nv-groups"),w.append("g").attr("class","nv-scatterWrap"),t.attr("transform","translate("+f.left+","+f.top+")"),e.width(c).height(r);var y=t.select(".nv-scatterWrap");d3.transition(y).call(e),v.append("clipPath").attr("id","nv-edge-clip-"+e.id()).append("rect"),t.select("#nv-edge-clip-"+e.id()+" rect").attr("width",c).attr("height",r),x.attr("clip-path",n?"url(#nv-edge-clip-"+e.id()+")":""),y.attr("clip-path",n?"url(#nv-edge-clip-"+e.id()+")":"");var z=t.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});z.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),d3.transition(z.exit()).style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),z.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return i(a,b)}).style("stroke",function(a,b){return i(a,b)}),d3.transition(z).style("stroke-opacity",1).style("fill-opacity",.5);var A=z.selectAll("path.nv-area").data(function(a){return m(a)?[a]:[]});A.enter().append("path").attr("class","nv-area").attr("d",function(a){return d3.svg.area().interpolate(o).defined(l).x(function(a,b){return p(j(a,b))}).y0(function(a,b){return q(k(a,b))}).y1(function(){return q(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[a.values])}),d3.transition(z.exit().selectAll("path.nv-area")).attr("d",function(a){return d3.svg.area().interpolate(o).defined(l).x(function(a,c){return b(j(a,c))}).y0(function(a,b){return d(k(a,b))}).y1(function(){return d(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[a.values])}),d3.transition(A).attr("d",function(a){return d3.svg.area().interpolate(o).defined(l).x(function(a,c){return b(j(a,c))}).y0(function(a,b){return d(k(a,b))}).y1(function(){return d(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[a.values])});var B=z.selectAll("path.nv-line").data(function(a){return[a.values]});B.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(o).defined(l).x(function(a,b){return p(j(a,b))}).y(function(a,b){return q(k(a,b))})),d3.transition(z.exit().selectAll("path.nv-line")).attr("d",d3.svg.line().interpolate(o).defined(l).x(function(a,c){return b(j(a,c))}).y(function(a,b){return d(k(a,b))})),d3.transition(B).attr("d",d3.svg.line().interpolate(o).defined(l).x(function(a,c){return b(j(a,c))}).y(function(a,b){return d(k(a,b))})),p=b.copy(),q=d.copy()}),a}var b,d,e=c.models.scatter(),f={top:0,right:0,bottom:0,left:0},g=960,h=500,i=c.utils.defaultColor(),j=function(a){return a.x},k=function(a){return a.y},l=function(a,b){return!isNaN(k(a,b))&&null!==k(a,b)},m=function(a){return a.area},n=!1,o="linear";e.size(16).sizeDomain([16,256]);var p,q;return a.dispatch=e.dispatch,a.scatter=e,d3.rebind(a,e,"id","interactive","size","xScale","yScale","zScale","xDomain","yDomain","sizeDomain","forceX","forceY","forceSize","clipVoronoi","clipRadius","padData"),a.margin=function(b){return arguments.length?(f.top="undefined"!=typeof b.top?b.top:f.top,f.right="undefined"!=typeof b.right?b.right:f.right,f.bottom="undefined"!=typeof b.bottom?b.bottom:f.bottom,f.left="undefined"!=typeof b.left?b.left:f.left,a):f},a.width=function(b){return arguments.length?(g=b,a):g},a.height=function(b){return arguments.length?(h=b,a):h},a.x=function(b){return arguments.length?(j=b,e.x(b),a):j},a.y=function(b){return arguments.length?(k=b,e.y(b),a):k},a.clipEdge=function(b){return arguments.length?(n=b,a):n},a.color=function(b){return arguments.length?(i=c.utils.getColor(b),e.color(i),a):i},a.interpolate=function(b){return arguments.length?(o=b,a):o},a.defined=function(b){return arguments.length?(l=b,a):l},a.isArea=function(b){return arguments.length?(m=d3.functor(b),a):m},a},c.models.lineChart=function(){function a(c){return c.each(function(c){var r=d3.select(this),x=this,y=(k||parseInt(r.style("width"))||960)-i.left-i.right,z=(l||parseInt(r.style("height"))||400)-i.top-i.bottom;if(a.update=function(){r.transition().call(a)},a.container=this,s.disabled=c.map(function(a){return!!a.disabled}),!t){var A;t={};for(A in s)t[A]=s[A]instanceof Array?s[A].slice(0):s[A]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var B=r.selectAll(".nv-noData").data([u]);return B.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),B.attr("x",i.left+y/2).attr("y",i.top+z/2).text(function(a){return a}),a}r.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var C=r.selectAll("g.nv-wrap.nv-lineChart").data([c]),D=C.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),E=C.select("g");D.append("g").attr("class","nv-x nv-axis"),D.append("g").attr("class","nv-y nv-axis"),D.append("g").attr("class","nv-linesWrap"),D.append("g").attr("class","nv-legendWrap"),m&&(h.width(y),E.select(".nv-legendWrap").datum(c).call(h),i.top!=h.height()&&(i.top=h.height()+h.legendBelowPadding(),z=(l||parseInt(r.style("height"))||400)-i.top-i.bottom),C.select(".nv-legendWrap").attr("transform","translate(0,"+-i.top+")")),C.attr("transform","translate("+i.left+","+i.top+")"),p&&E.select(".nv-y.nv-axis").attr("transform","translate("+y+",0)"),e.width(y).height(z).color(c.map(function(a,b){return a.color||j(a,b)}).filter(function(a,b){return!c[b].disabled}));var F=E.select(".nv-linesWrap").datum(c.filter(function(a){return!a.disabled}));d3.transition(F).call(e),n&&(f.scale(b).ticks(y/100).tickSize(-z,0),E.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),d3.transition(E.select(".nv-x.nv-axis")).call(f)),o&&(g.scale(d).ticks(z/36).tickSize(-y,0),d3.transition(E.select(".nv-y.nv-axis")).call(g)),h.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,C.selectAll(".nv-series").classed("disabled",!1),a}),s.disabled=c.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),h.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,s.disabled=c.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),v.on("tooltipShow",function(a){q&&w(a,x.parentNode)}),v.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),s.disabled=b.disabled),a.update()})}),a}var b,d,e=c.models.line(),f=c.models.axis(),g=c.models.axis(),h=c.models.legend(),i={top:30,right:20,bottom:50,left:60},j=c.utils.defaultColor(),k=null,l=null,m=!0,n=!0,o=!0,p=!1,q=!0,r=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" at "+b+"</p>"},s={},t=null,u="No Data Available.",v=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");f.orient("bottom").tickPadding(7),g.orient(p?"right":"left");var w=function(b,d){if(d){var h=d3.select(d).select("svg"),i=h.node()?h.attr("viewBox"):null;if(i){i=i.split(" ");var j=parseInt(h.style("width"))/i[2];b.pos[0]=b.pos[0]*j,b.pos[1]=b.pos[1]*j}}var k=b.pos[0]+(d.offsetLeft||0),l=b.pos[1]+(d.offsetTop||0),m=f.tickFormat()(e.x()(b.point,b.pointIndex)),n=g.tickFormat()(e.y()(b.point,b.pointIndex)),o=r(b.series.key,m,n,b,a);c.tooltip.show([k,l],o,null,null,d)};return e.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+i.left,a.pos[1]+i.top],v.tooltipShow(a)}),e.dispatch.on("elementMouseout.tooltip",function(a){v.tooltipHide(a)}),v.on("tooltipHide",function(){q&&c.tooltip.cleanup()}),a.dispatch=v,a.lines=e,a.legend=h,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","forceX","forceY","interactive","clipEdge","clipVoronoi","id","interpolate"),a.margin=function(b){return arguments.length?(i.top="undefined"!=typeof b.top?b.top:i.top,i.right="undefined"!=typeof b.right?b.right:i.right,i.bottom="undefined"!=typeof b.bottom?b.bottom:i.bottom,i.left="undefined"!=typeof b.left?b.left:i.left,a):i},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(j=c.utils.getColor(b),h.color(j),a):j},a.showLegend=function(b){return arguments.length?(m=b,a):m},a.showXAxis=function(b){return arguments.length?(n=b,a):n},a.showYAxis=function(b){return arguments.length?(o=b,a):o},a.rightAlignYAxis=function(b){return arguments.length?(p=b,g.orient(b?"right":"left"),a):p},a.tooltips=function(b){return arguments.length?(q=b,a):q},a.tooltipContent=function(b){return arguments.length?(r=b,a):r},a.state=function(b){return arguments.length?(s=b,a):s},a.defaultState=function(b){return arguments.length?(t=b,a):t},a.noData=function(b){return arguments.length?(u=b,a):u},a},c.models.linePlusBarChart=function(){function a(c){return c.each(function(c){var o=d3.select(this),p=this,t=(m||parseInt(o.style("width"))||960)-l.left-l.right,z=(n||parseInt(o.style("height"))||400)-l.top-l.bottom;if(a.update=function(){o.transition().call(a)},u.disabled=c.map(function(a){return!!a.disabled}),!v){var A;v={};for(A in u)v[A]=u[A]instanceof Array?u[A].slice(0):u[A]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var B=o.selectAll(".nv-noData").data([w]);return B.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),B.attr("x",l.left+t/2).attr("y",l.top+z/2).text(function(a){return a}),a}o.selectAll(".nv-noData").remove();var C=c.filter(function(a){return!a.disabled&&a.bar}),D=c.filter(function(a){return!a.bar});b=D.filter(function(a){return!a.disabled}).length&&D.filter(function(a){return!a.disabled})[0].values.length?f.xScale():g.xScale(),d=g.yScale(),e=f.yScale();var E=d3.select(this).selectAll("g.nv-wrap.nv-linePlusBar").data([c]),F=E.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),G=E.select("g");F.append("g").attr("class","nv-x nv-axis"),F.append("g").attr("class","nv-y1 nv-axis"),F.append("g").attr("class","nv-y2 nv-axis"),F.append("g").attr("class","nv-barsWrap"),F.append("g").attr("class","nv-linesWrap"),F.append("g").attr("class","nv-legendWrap"),r&&(k.width(t/2),G.select(".nv-legendWrap").datum(c.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(a.bar?" (left axis)":" (right axis)"),a})).call(k),l.top!=k.height()&&(l.top=k.height()+k.legendBelowPadding(),z=(n||parseInt(o.style("height"))||400)-l.top-l.bottom),G.select(".nv-legendWrap").attr("transform","translate("+t/2+","+-l.top+")")),E.attr("transform","translate("+l.left+","+l.top+")"),f.width(t).height(z).color(c.map(function(a,b){return a.color||q(a,b)}).filter(function(a,b){return!c[b].disabled&&!c[b].bar})),g.width(t).height(z).color(c.map(function(a,b){return a.color||q(a,b)}).filter(function(a,b){return!c[b].disabled&&c[b].bar}));var H=G.select(".nv-barsWrap").datum(C.length?C:[{values:[]}]),I=G.select(".nv-linesWrap").datum(D[0]&&!D[0].disabled?D:[{values:[]}]);d3.transition(H).call(g),d3.transition(I).call(f),h.scale(b).ticks(t/100).tickSize(-z,0),G.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),d3.transition(G.select(".nv-x.nv-axis")).call(h),i.scale(d).ticks(z/36).tickSize(-t,0),d3.transition(G.select(".nv-y1.nv-axis")).style("opacity",C.length?1:0).call(i),j.scale(e).ticks(z/36).tickSize(C.length?0:-t,0),G.select(".nv-y2.nv-axis").style("opacity",D.length?1:0).attr("transform","translate("+t+",0)"),d3.transition(G.select(".nv-y2.nv-axis")).call(j),k.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,E.selectAll(".nv-series").classed("disabled",!1),a}),u.disabled=c.map(function(a){return!!a.disabled}),x.stateChange(u),a.update()}),k.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,u.disabled=c.map(function(a){return!!a.disabled}),x.stateChange(u),a.update()}),x.on("tooltipShow",function(a){s&&y(a,p.parentNode)}),x.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),u.disabled=b.disabled),a.update()})}),a}var b,d,e,f=c.models.line(),g=c.models.historicalBar(),h=c.models.axis(),i=c.models.axis(),j=c.models.axis(),k=c.models.legend(),l={top:30,right:60,bottom:50,left:60},m=null,n=null,o=function(a){return a.x},p=function(a){return a.y},q=c.utils.defaultColor(),r=!0,s=!0,t=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" at "+b+"</p>"},u={},v=null,w="No Data Available.",x=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");g.padData(!0),f.clipEdge(!1).padData(!0),h.orient("bottom").tickPadding(7).highlightZero(!1),i.orient("left"),j.orient("right");var y=function(b,d){var e=b.pos[0]+(d.offsetLeft||0),g=b.pos[1]+(d.offsetTop||0),k=h.tickFormat()(f.x()(b.point,b.pointIndex)),l=(b.series.bar?i:j).tickFormat()(f.y()(b.point,b.pointIndex)),m=t(b.series.key,k,l,b,a);c.tooltip.show([e,g],m,b.value<0?"n":"s",null,d)};return f.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+l.left,a.pos[1]+l.top],x.tooltipShow(a)}),f.dispatch.on("elementMouseout.tooltip",function(a){x.tooltipHide(a)}),g.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+l.left,a.pos[1]+l.top],x.tooltipShow(a)}),g.dispatch.on("elementMouseout.tooltip",function(a){x.tooltipHide(a)}),x.on("tooltipHide",function(){s&&c.tooltip.cleanup()}),a.dispatch=x,a.legend=k,a.lines=f,a.bars=g,a.xAxis=h,a.y1Axis=i,a.y2Axis=j,d3.rebind(a,f,"defined","size","clipVoronoi","interpolate"),a.x=function(b){return arguments.length?(o=b,f.x(b),g.x(b),a):o},a.y=function(b){return arguments.length?(p=b,f.y(b),g.y(b),a):p},a.margin=function(b){return arguments.length?(l.top="undefined"!=typeof b.top?b.top:l.top,l.right="undefined"!=typeof b.right?b.right:l.right,l.bottom="undefined"!=typeof b.bottom?b.bottom:l.bottom,l.left="undefined"!=typeof b.left?b.left:l.left,a):l},a.width=function(b){return arguments.length?(m=b,a):m},a.height=function(b){return arguments.length?(n=b,a):n},a.color=function(b){return arguments.length?(q=c.utils.getColor(b),k.color(q),a):q},a.showLegend=function(b){return arguments.length?(r=b,a):r},a.tooltips=function(b){return arguments.length?(s=b,a):s},a.tooltipContent=function(b){return arguments.length?(t=b,a):t},a.state=function(b){return arguments.length?(u=b,a):u},a.defaultState=function(b){return arguments.length?(v=b,a):v},a.noData=function(b){return arguments.length?(w=b,a):w},a},c.models.lineWithFocusChart=function(){function a(c){return c.each(function(c){function x(a){var b=+("e"==a),c=b?1:-1,d=H/3;return"M"+.5*c+","+d+"A6,6 0 0 "+b+" "+6.5*c+","+(d+6)+"V"+(2*d-6)+"A6,6 0 0 "+b+" "+.5*c+","+2*d+"ZM"+2.5*c+","+(d+8)+"V"+(2*d-8)+"M"+4.5*c+","+(d+8)+"V"+(2*d-8)}function B(){n.empty()||n.extent(v),P.data([n.empty()?e.domain():v]).each(function(a){var c=e(a[0])-b.range()[0],d=b.range()[1]-e(a[1]);d3.select(this).select(".left").attr("width",0>c?0:c),d3.select(this).select(".right").attr("x",e(a[1])).attr("width",0>d?0:d)})}function C(){v=n.empty()?null:n.extent(),extent=n.empty()?e.domain():n.extent(),z.brush({extent:extent,brush:n}),B();var a=L.select(".nv-focus .nv-linesWrap").datum(c.filter(function(a){return!a.disabled}).map(function(a){return{key:a.key,values:a.values.filter(function(a,b){return g.x()(a,b)>=extent[0]&&g.x()(a,b)<=extent[1]})}}));d3.transition(a).call(g),d3.transition(L.select(".nv-focus .nv-x.nv-axis")).call(i),d3.transition(L.select(".nv-focus .nv-y.nv-axis")).call(j)}var D=d3.select(this),E=this,F=(r||parseInt(D.style("width"))||960)-o.left-o.right,G=(s||parseInt(D.style("height"))||400)-o.top-o.bottom-t,H=t-p.top-p.bottom;if(a.update=function(){D.transition().call(a)},a.container=this,!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var I=D.selectAll(".nv-noData").data([y]);return I.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),I.attr("x",o.left+F/2).attr("y",o.top+G/2).text(function(a){return a}),a}D.selectAll(".nv-noData").remove(),b=g.xScale(),d=g.yScale(),e=h.xScale(),f=h.yScale();var J=D.selectAll("g.nv-wrap.nv-lineWithFocusChart").data([c]),K=J.enter().append("g").attr("class","nvd3 nv-wrap nv-lineWithFocusChart").append("g"),L=J.select("g");K.append("g").attr("class","nv-legendWrap");var M=K.append("g").attr("class","nv-focus");M.append("g").attr("class","nv-x nv-axis"),M.append("g").attr("class","nv-y nv-axis"),M.append("g").attr("class","nv-linesWrap");var N=K.append("g").attr("class","nv-context");N.append("g").attr("class","nv-x nv-axis"),N.append("g").attr("class","nv-y nv-axis"),N.append("g").attr("class","nv-linesWrap"),N.append("g").attr("class","nv-brushBackground"),N.append("g").attr("class","nv-x nv-brush"),u&&(m.width(F),L.select(".nv-legendWrap").datum(c).call(m),o.top!=m.height()&&(o.top=m.height()+m.legendBelowPadding(),G=(s||parseInt(D.style("height"))||400)-o.top-o.bottom-t),L.select(".nv-legendWrap").attr("transform","translate(0,"+-o.top+")")),J.attr("transform","translate("+o.left+","+o.top+")"),g.width(F).height(G).color(c.map(function(a,b){return a.color||q(a,b)
-}).filter(function(a,b){return!c[b].disabled})),h.defined(g.defined()).width(F).height(H).color(c.map(function(a,b){return a.color||q(a,b)}).filter(function(a,b){return!c[b].disabled})),L.select(".nv-context").attr("transform","translate(0,"+(G+o.bottom+p.top)+")");var O=L.select(".nv-context .nv-linesWrap").datum(c.filter(function(a){return!a.disabled}));d3.transition(O).call(h),i.scale(b).ticks(F/100).tickSize(-G,0),j.scale(d).ticks(G/36).tickSize(-F,0),L.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+G+")"),n.x(e).on("brush",C),v&&n.extent(v);var P=L.select(".nv-brushBackground").selectAll("g").data([v||n.extent()]),Q=P.enter().append("g");Q.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",H),Q.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",H),gBrush=L.select(".nv-x.nv-brush").call(n),gBrush.selectAll("rect").attr("height",H),gBrush.selectAll(".resize").append("path").attr("d",x),C(),k.scale(e).ticks(F/100).tickSize(-H,0),L.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),d3.transition(L.select(".nv-context .nv-x.nv-axis")).call(k),l.scale(f).ticks(H/36).tickSize(-F,0),d3.transition(L.select(".nv-context .nv-y.nv-axis")).call(l),L.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),m.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,J.selectAll(".nv-series").classed("disabled",!1),a}),D.transition().call(a)}),z.on("tooltipShow",function(a){w&&A(a,E.parentNode)})}),a}var b,d,e,f,g=c.models.line(),h=c.models.line(),i=c.models.axis(),j=c.models.axis(),k=c.models.axis(),l=c.models.axis(),m=c.models.legend(),n=d3.svg.brush(),o={top:30,right:30,bottom:30,left:60},p={top:0,right:30,bottom:20,left:60},q=c.utils.defaultColor(),r=null,s=null,t=100,u=!0,v=null,w=!0,x=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" at "+b+"</p>"},y="No Data Available.",z=d3.dispatch("tooltipShow","tooltipHide","brush");g.clipEdge(!0),h.interactive(!1),i.orient("bottom").tickPadding(5),j.orient("left"),k.orient("bottom").tickPadding(5),l.orient("left");var A=function(b,d){var e=b.pos[0]+(d.offsetLeft||0),f=b.pos[1]+(d.offsetTop||0),h=i.tickFormat()(g.x()(b.point,b.pointIndex)),k=j.tickFormat()(g.y()(b.point,b.pointIndex)),l=x(b.series.key,h,k,b,a);c.tooltip.show([e,f],l,null,null,d)};return g.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+o.left,a.pos[1]+o.top],z.tooltipShow(a)}),g.dispatch.on("elementMouseout.tooltip",function(a){z.tooltipHide(a)}),z.on("tooltipHide",function(){w&&c.tooltip.cleanup()}),a.dispatch=z,a.legend=m,a.lines=g,a.lines2=h,a.xAxis=i,a.yAxis=j,a.x2Axis=k,a.y2Axis=l,d3.rebind(a,g,"defined","isArea","size","xDomain","yDomain","forceX","forceY","interactive","clipEdge","clipVoronoi","id"),a.x=function(b){return arguments.length?(g.x(b),h.x(b),a):g.x},a.y=function(b){return arguments.length?(g.y(b),h.y(b),a):g.y},a.margin=function(b){return arguments.length?(o.top="undefined"!=typeof b.top?b.top:o.top,o.right="undefined"!=typeof b.right?b.right:o.right,o.bottom="undefined"!=typeof b.bottom?b.bottom:o.bottom,o.left="undefined"!=typeof b.left?b.left:o.left,a):o},a.margin2=function(b){return arguments.length?(p=b,a):p},a.width=function(b){return arguments.length?(r=b,a):r},a.height=function(b){return arguments.length?(s=b,a):s},a.height2=function(b){return arguments.length?(t=b,a):t},a.color=function(b){return arguments.length?(q=c.utils.getColor(b),m.color(q),a):q},a.showLegend=function(b){return arguments.length?(u=b,a):u},a.tooltips=function(b){return arguments.length?(w=b,a):w},a.tooltipContent=function(b){return arguments.length?(x=b,a):x},a.interpolate=function(b){return arguments.length?(g.interpolate(b),h.interpolate(b),a):g.interpolate()},a.noData=function(b){return arguments.length?(y=b,a):y},a.xTickFormat=function(b){return arguments.length?(i.tickFormat(b),k.tickFormat(b),a):i.tickFormat()},a.yTickFormat=function(b){return arguments.length?(j.tickFormat(b),l.tickFormat(b),a):j.tickFormat()},a},c.models.linePlusBarWithFocusChart=function(){function a(c){return c.each(function(c){function G(a){var b=+("e"==a),c=b?1:-1,d=Q/3;return"M"+.5*c+","+d+"A6,6 0 0 "+b+" "+6.5*c+","+(d+6)+"V"+(2*d-6)+"A6,6 0 0 "+b+" "+.5*c+","+2*d+"ZM"+2.5*c+","+(d+8)+"V"+(2*d-8)+"M"+4.5*c+","+(d+8)+"V"+(2*d-8)}function K(){u.empty()||u.extent(E),bb.data([u.empty()?e.domain():E]).each(function(a){var b=e(a[0])-e.range()[0],c=e.range()[1]-e(a[1]);d3.select(this).select(".left").attr("width",0>b?0:b),d3.select(this).select(".right").attr("x",e(a[1])).attr("width",0>c?0:c)})}function L(){E=u.empty()?null:u.extent(),b=u.empty()?e.domain():u.extent(),I.brush({extent:b,brush:u}),K(),l.width(O).height(P).color(c.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!c[b].disabled&&c[b].bar})),j.width(O).height(P).color(c.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!c[b].disabled&&!c[b].bar}));var a=Y.select(".nv-focus .nv-barsWrap").datum(S.length?S.map(function(a){return{key:a.key,values:a.values.filter(function(a,c){return l.x()(a,c)>=b[0]&&l.x()(a,c)<=b[1]})}}):[{values:[]}]),h=Y.select(".nv-focus .nv-linesWrap").datum(T[0].disabled?[{values:[]}]:T.map(function(a){return{key:a.key,values:a.values.filter(function(a,c){return j.x()(a,c)>=b[0]&&j.x()(a,c)<=b[1]})}}));d=S.length?l.xScale():j.xScale(),n.scale(d).ticks(O/100).tickSize(-P,0),n.domain([Math.ceil(b[0]),Math.floor(b[1])]),d3.transition(Y.select(".nv-x.nv-axis")).call(n),d3.transition(a).call(l),d3.transition(h).call(j),Y.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),p.scale(f).ticks(P/36).tickSize(-O,0),Y.select(".nv-focus .nv-y1.nv-axis").style("opacity",S.length?1:0),q.scale(g).ticks(P/36).tickSize(S.length?0:-O,0),Y.select(".nv-focus .nv-y2.nv-axis").style("opacity",T.length?1:0).attr("transform","translate("+d.range()[1]+",0)"),d3.transition(Y.select(".nv-focus .nv-y1.nv-axis")).call(p),d3.transition(Y.select(".nv-focus .nv-y2.nv-axis")).call(q)}var M=d3.select(this),N=this,O=(x||parseInt(M.style("width"))||960)-v.left-v.right,P=(y||parseInt(M.style("height"))||400)-v.top-v.bottom-z,Q=z-w.top-w.bottom;if(a.update=function(){M.transition().call(a)},a.container=this,!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var R=M.selectAll(".nv-noData").data([H]);return R.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),R.attr("x",v.left+O/2).attr("y",v.top+P/2).text(function(a){return a}),a}M.selectAll(".nv-noData").remove();var S=c.filter(function(a){return!a.disabled&&a.bar}),T=c.filter(function(a){return!a.bar});d=l.xScale(),e=o.scale(),f=l.yScale(),g=j.yScale(),h=m.yScale(),i=k.yScale();var U=c.filter(function(a){return!a.disabled&&a.bar}).map(function(a){return a.values.map(function(a,b){return{x:A(a,b),y:B(a,b)}})}),V=c.filter(function(a){return!a.disabled&&!a.bar}).map(function(a){return a.values.map(function(a,b){return{x:A(a,b),y:B(a,b)}})});d.range([0,O]),e.domain(d3.extent(d3.merge(U.concat(V)),function(a){return a.x})).range([0,O]);var W=M.selectAll("g.nv-wrap.nv-linePlusBar").data([c]),X=W.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),Y=W.select("g");X.append("g").attr("class","nv-legendWrap");var Z=X.append("g").attr("class","nv-focus");Z.append("g").attr("class","nv-x nv-axis"),Z.append("g").attr("class","nv-y1 nv-axis"),Z.append("g").attr("class","nv-y2 nv-axis"),Z.append("g").attr("class","nv-barsWrap"),Z.append("g").attr("class","nv-linesWrap");var $=X.append("g").attr("class","nv-context");$.append("g").attr("class","nv-x nv-axis"),$.append("g").attr("class","nv-y1 nv-axis"),$.append("g").attr("class","nv-y2 nv-axis"),$.append("g").attr("class","nv-barsWrap"),$.append("g").attr("class","nv-linesWrap"),$.append("g").attr("class","nv-brushBackground"),$.append("g").attr("class","nv-x nv-brush"),D&&(t.width(O/2),Y.select(".nv-legendWrap").datum(c.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(a.bar?" (left axis)":" (right axis)"),a})).call(t),v.top!=t.height()&&(v.top=t.height()+t.legendBelowPadding(),P=(y||parseInt(M.style("height"))||400)-v.top-v.bottom-z),Y.select(".nv-legendWrap").attr("transform","translate("+O/2+","+-v.top+")")),W.attr("transform","translate("+v.left+","+v.top+")"),m.width(O).height(Q).color(c.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!c[b].disabled&&c[b].bar})),k.width(O).height(Q).color(c.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!c[b].disabled&&!c[b].bar}));var _=Y.select(".nv-context .nv-barsWrap").datum(S.length?S:[{values:[]}]),ab=Y.select(".nv-context .nv-linesWrap").datum(T[0].disabled?[{values:[]}]:T);Y.select(".nv-context").attr("transform","translate(0,"+(P+v.bottom+w.top)+")"),d3.transition(_).call(m),d3.transition(ab).call(k),u.x(e).on("brush",L),E&&u.extent(E);var bb=Y.select(".nv-brushBackground").selectAll("g").data([E||u.extent()]),cb=bb.enter().append("g");cb.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",Q),cb.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",Q);var db=Y.select(".nv-x.nv-brush").call(u);db.selectAll("rect").attr("height",Q),db.selectAll(".resize").append("path").attr("d",G),o.ticks(O/100).tickSize(-Q,0),Y.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+h.range()[0]+")"),d3.transition(Y.select(".nv-context .nv-x.nv-axis")).call(o),r.scale(h).ticks(Q/36).tickSize(-O,0),Y.select(".nv-context .nv-y1.nv-axis").style("opacity",S.length?1:0).attr("transform","translate(0,"+e.range()[0]+")"),d3.transition(Y.select(".nv-context .nv-y1.nv-axis")).call(r),s.scale(i).ticks(Q/36).tickSize(S.length?0:-O,0),Y.select(".nv-context .nv-y2.nv-axis").style("opacity",T.length?1:0).attr("transform","translate("+e.range()[1]+",0)"),d3.transition(Y.select(".nv-context .nv-y2.nv-axis")).call(s),t.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,W.selectAll(".nv-series").classed("disabled",!1),a}),a.update()}),I.on("tooltipShow",function(a){F&&J(a,N.parentNode)}),L()}),a}var b,d,e,f,g,h,i,j=c.models.line(),k=c.models.line(),l=c.models.historicalBar(),m=c.models.historicalBar(),n=c.models.axis(),o=c.models.axis(),p=c.models.axis(),q=c.models.axis(),r=c.models.axis(),s=c.models.axis(),t=c.models.legend(),u=d3.svg.brush(),v={top:30,right:30,bottom:30,left:60},w={top:0,right:30,bottom:20,left:60},x=null,y=null,z=100,A=function(a){return a.x},B=function(a){return a.y},C=c.utils.defaultColor(),D=!0,E=null,F=!0,G=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" at "+b+"</p>"},H="No Data Available.",I=d3.dispatch("tooltipShow","tooltipHide","brush");j.clipEdge(!0),k.interactive(!1),n.orient("bottom").tickPadding(5),p.orient("left"),q.orient("right"),o.orient("bottom").tickPadding(5),r.orient("left"),s.orient("right");var J=function(d,e){b&&(d.pointIndex+=Math.ceil(b[0]));var f=d.pos[0]+(e.offsetLeft||0),g=d.pos[1]+(e.offsetTop||0),h=n.tickFormat()(j.x()(d.point,d.pointIndex)),i=(d.series.bar?p:q).tickFormat()(j.y()(d.point,d.pointIndex)),k=G(d.series.key,h,i,d,a);c.tooltip.show([f,g],k,d.value<0?"n":"s",null,e)};return j.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+v.left,a.pos[1]+v.top],I.tooltipShow(a)}),j.dispatch.on("elementMouseout.tooltip",function(a){I.tooltipHide(a)}),l.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+v.left,a.pos[1]+v.top],I.tooltipShow(a)}),l.dispatch.on("elementMouseout.tooltip",function(a){I.tooltipHide(a)}),I.on("tooltipHide",function(){F&&c.tooltip.cleanup()}),a.dispatch=I,a.legend=t,a.lines=j,a.lines2=k,a.bars=l,a.bars2=m,a.xAxis=n,a.x2Axis=o,a.y1Axis=p,a.y2Axis=q,a.y3Axis=r,a.y4Axis=s,d3.rebind(a,j,"defined","size","clipVoronoi","interpolate"),a.x=function(b){return arguments.length?(A=b,j.x(b),l.x(b),a):A},a.y=function(b){return arguments.length?(B=b,j.y(b),l.y(b),a):B},a.margin=function(b){return arguments.length?(v.top="undefined"!=typeof b.top?b.top:v.top,v.right="undefined"!=typeof b.right?b.right:v.right,v.bottom="undefined"!=typeof b.bottom?b.bottom:v.bottom,v.left="undefined"!=typeof b.left?b.left:v.left,a):v},a.width=function(b){return arguments.length?(x=b,a):x},a.height=function(b){return arguments.length?(y=b,a):y},a.color=function(b){return arguments.length?(C=c.utils.getColor(b),t.color(C),a):C},a.showLegend=function(b){return arguments.length?(D=b,a):D},a.tooltips=function(b){return arguments.length?(F=b,a):F},a.tooltipContent=function(b){return arguments.length?(G=b,a):G},a.noData=function(b){return arguments.length?(H=b,a):H},a.brushExtent=function(b){return arguments.length?(E=b,a):E},a},c.models.multiBar=function(){function a(c){return c.each(function(a){var c=i-h.left-h.right,y=j-h.top-h.bottom,z=d3.select(this);t&&a.length&&(t=[{values:a[0].values.map(function(a){return{x:a.x,y:0,series:a.series,size:.01}})}]),r&&(a=d3.layout.stack().offset("zero").values(function(a){return a.values}).y(o)(!a.length&&t?t:a)),a=a.map(function(a,b){return a.values=a.values.map(function(a){return a.series=b,a}),a}),r&&a[0].values.map(function(b,c){var d=0,e=0;a.map(function(a){var b=a.values[c];b.size=Math.abs(b.y),b.y<0?(b.y1=e,e-=b.size):(b.y1=b.size+d,d+=b.size)})});var A=d&&e?[]:a.map(function(a){return a.values.map(function(a,b){return{x:n(a,b),y:o(a,b),y0:a.y0,y1:a.y1}})});k.domain(d3.merge(A).map(function(a){return a.x})).rangeBands([0,c],.1),l.domain(e||d3.extent(d3.merge(A).map(function(a){return r?a.y>0?a.y1:a.y1+a.y:a.y}).concat(p))).range([y,0]),(k.domain()[0]===k.domain()[1]||l.domain()[0]===l.domain()[1])&&(singlePoint=!0),k.domain()[0]===k.domain()[1]&&(k.domain()[0]?k.domain([k.domain()[0]-.01*k.domain()[0],k.domain()[1]+.01*k.domain()[1]]):k.domain([-1,1])),l.domain()[0]===l.domain()[1]&&(l.domain()[0]?l.domain([l.domain()[0]+.01*l.domain()[0],l.domain()[1]-.01*l.domain()[1]]):l.domain([-1,1])),f=f||k,g=g||l;var B=z.selectAll("g.nv-wrap.nv-multibar").data([a]),C=B.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar"),D=C.append("defs"),E=C.append("g"),F=B.select("g");E.append("g").attr("class","nv-groups"),B.attr("transform","translate("+h.left+","+h.top+")"),D.append("clipPath").attr("id","nv-edge-clip-"+m).append("rect"),B.select("#nv-edge-clip-"+m+" rect").attr("width",c).attr("height",y),F.attr("clip-path",q?"url(#nv-edge-clip-"+m+")":"");var G=B.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});G.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),G.exit().selectAll("rect.nv-bar").transition().delay(function(b,c){return c*v/a[0].values.length}).attr("y",function(a){return r?g(a.y0):g(0)}).attr("height",0).remove(),G.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return s(a,b)}).style("stroke",function(a,b){return s(a,b)}),d3.transition(G).style("stroke-opacity",1).style("fill-opacity",.75);var H=G.selectAll("rect.nv-bar").data(function(b){return t&&!a.length?t.values:b.values});H.exit().remove();H.enter().append("rect").attr("class",function(a,b){return o(a,b)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(b,c,d){return r?0:d*k.rangeBand()/a.length}).attr("y",function(a){return g(r?a.y0:0)}).attr("height",0).attr("width",k.rangeBand()/(r?1:a.length));H.style("fill",function(a,b,c){return s(a,c,b)}).style("stroke",function(a,b,c){return s(a,c,b)}).on("mouseover",function(b,c){d3.select(this).classed("hover",!0),x.elementMouseover({value:o(b,c),point:b,series:a[b.series],pos:[k(n(b,c))+k.rangeBand()*(r?a.length/2:b.series+.5)/a.length,l(o(b,c)+(r?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),x.elementMouseout({value:o(b,c),point:b,series:a[b.series],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("click",function(b,c){x.elementClick({value:o(b,c),point:b,series:a[b.series],pos:[k(n(b,c))+k.rangeBand()*(r?a.length/2:b.series+.5)/a.length,l(o(b,c)+(r?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(b,c){x.elementDblClick({value:o(b,c),point:b,series:a[b.series],pos:[k(n(b,c))+k.rangeBand()*(r?a.length/2:b.series+.5)/a.length,l(o(b,c)+(r?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}),H.attr("class",function(a,b){return o(a,b)<0?"nv-bar negative":"nv-bar positive"}).attr("transform",function(a,b){return"translate("+k(n(a,b))+",0)"}),u&&(b||(b=a.map(function(){return!0})),H.style("fill",function(a,c,d){return d3.rgb(u(a,c)).darker(b.map(function(a,b){return b}).filter(function(a,c){return!b[c]})[d]).toString()}).style("stroke",function(a,c,d){return d3.rgb(u(a,c)).darker(b.map(function(a,b){return b}).filter(function(a,c){return!b[c]})[d]).toString()})),r?H.transition().delay(function(b,c){return c*v/a[0].values.length}).attr("y",function(a){return l(r?a.y1:0)}).attr("height",function(a){return Math.max(Math.abs(l(a.y+(r?a.y0:0))-l(r?a.y0:0)),1)}).each("end",function(){d3.select(this).transition().duration(w).attr("x",function(b){return r?0:b.series*k.rangeBand()/a.length}).attr("width",k.rangeBand()/(r?1:a.length))}):d3.transition(H).duration(w).delay(function(b,c){return c*v/a[0].values.length}).attr("x",function(b){return b.series*k.rangeBand()/a.length}).attr("width",k.rangeBand()/a.length).each("end",function(){d3.select(this).transition().duration(w).attr("y",function(a,b){return o(a,b)<0?l(0):l(0)-l(o(a,b))<1?l(0)-1:l(o(a,b))||0}).attr("height",function(a,b){return Math.max(Math.abs(l(o(a,b))-l(0)),1)||0})}),f=k.copy(),g=l.copy()}),a}var b,d,e,f,g,h={top:0,right:0,bottom:0,left:0},i=960,j=500,k=d3.scale.ordinal(),l=d3.scale.linear(),m=Math.floor(1e4*Math.random()),n=function(a){return a.x},o=function(a){return a.y},p=[0],q=!0,r=!1,s=c.utils.defaultColor(),t=!1,u=null,v=1200,w=500,x=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return a.dispatch=x,a.x=function(b){return arguments.length?(n=b,a):n},a.y=function(b){return arguments.length?(o=b,a):o},a.margin=function(b){return arguments.length?(h.top="undefined"!=typeof b.top?b.top:h.top,h.right="undefined"!=typeof b.right?b.right:h.right,h.bottom="undefined"!=typeof b.bottom?b.bottom:h.bottom,h.left="undefined"!=typeof b.left?b.left:h.left,a):h},a.width=function(b){return arguments.length?(i=b,a):i},a.height=function(b){return arguments.length?(j=b,a):j},a.xScale=function(b){return arguments.length?(k=b,a):k},a.yScale=function(b){return arguments.length?(l=b,a):l},a.xDomain=function(b){return arguments.length?(d=b,a):d},a.yDomain=function(b){return arguments.length?(e=b,a):e},a.forceY=function(b){return arguments.length?(p=b,a):p},a.stacked=function(b){return arguments.length?(r=b,a):r},a.clipEdge=function(b){return arguments.length?(q=b,a):q},a.color=function(b){return arguments.length?(s=c.utils.getColor(b),a):s},a.barColor=function(b){return arguments.length?(u=c.utils.getColor(b),a):u},a.disabled=function(c){return arguments.length?(b=c,a):b},a.id=function(b){return arguments.length?(m=b,a):m},a.hideable=function(b){return arguments.length?(t=b,a):t},a.delay=function(b){return arguments.length?(v=b,a):v},a.drawTime=function(b){return arguments.length?(w=b,a):w},a},c.models.multiBarChart=function(){function a(c){return c.each(function(c){var t=d3.select(this),A=this,B=(k||parseInt(t.style("width"))||960)-j.left-j.right,C=(l||parseInt(t.style("height"))||400)-j.top-j.bottom;if(a.update=function(){t.transition().call(a)},a.container=this,u.disabled=c.map(function(a){return!!a.disabled}),!v){var D;v={};for(D in u)v[D]=u[D]instanceof Array?u[D].slice(0):u[D]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var E=t.selectAll(".nv-noData").data([w]);return E.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),E.attr("x",j.left+B/2).attr("y",j.top+C/2).text(function(a){return a}),a}t.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var F=t.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([c]),G=F.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g"),H=F.select("g");if(G.append("g").attr("class","nv-x nv-axis"),G.append("g").attr("class","nv-y nv-axis"),G.append("g").attr("class","nv-barsWrap"),G.append("g").attr("class","nv-legendWrap"),G.append("g").attr("class","nv-controlsWrap"),o&&(h.width(B-y()),e.barColor()&&c.forEach(function(a,b){a.color=d3.rgb("#ccc").darker(1.5*b).toString()}),H.select(".nv-legendWrap").datum(c).call(h),j.top!=h.height()&&(j.top=h.height()+h.legendBelowPadding(),C=(l||parseInt(t.style("height"))||400)-j.top-j.bottom),H.select(".nv-legendWrap").attr("transform","translate("+y()+","+-j.top+")")),n){var I=[{key:"Grouped",disabled:e.stacked()},{key:"Stacked",disabled:!e.stacked()}];i.width(y()).color(["#444","#444","#444"]),H.select(".nv-controlsWrap").datum(I).attr("transform","translate(0,"+-j.top+")").call(i)}F.attr("transform","translate("+j.left+","+j.top+")"),e.disabled(c.map(function(a){return a.disabled})).width(B).height(C).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled}));var J=H.select(".nv-barsWrap").datum(c.filter(function(a){return!a.disabled}));d3.transition(J).call(e),f.scale(b).ticks(B/100).tickSize(-C,0),H.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),d3.transition(H.select(".nv-x.nv-axis")).call(f);var K=H.select(".nv-x.nv-axis > g").selectAll("g");if(K.selectAll("line, text").style("opacity",1),q){var L=function(a,b){return"translate("+a+","+b+")"},M=5,N=17;K.selectAll("text").attr("transform",function(a,b,c){return L(0,c%2==0?M:N)});var O=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;H.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(a,b){return L(0,0===b||O%2!==0?N:M)})}p&&K.filter(function(a,b){return b%Math.ceil(c[0].values.length/(B/100))!==0}).selectAll("text, line").style("opacity",0),r&&K.selectAll("text").attr("transform","rotate("+r+" 0,0)").attr("text-anchor",r>0?"start":"end"),H.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1),g.scale(d).ticks(C/36).tickSize(-B,0),d3.transition(H.select(".nv-y.nv-axis")).call(g),h.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,F.selectAll(".nv-series").classed("disabled",!1),a}),u.disabled=c.map(function(a){return!!a.disabled}),x.stateChange(u),a.update()}),h.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,u.disabled=c.map(function(a){return!!a.disabled}),x.stateChange(u),a.update()}),i.dispatch.on("legendClick",function(b){if(b.disabled){switch(I=I.map(function(a){return a.disabled=!0,a}),b.disabled=!1,b.key){case"Grouped":e.stacked(!1);break;case"Stacked":e.stacked(!0)}u.stacked=e.stacked(),x.stateChange(u),a.update()}}),x.on("tooltipShow",function(a){s&&z(a,A.parentNode)}),x.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),u.disabled=b.disabled),"undefined"!=typeof b.stacked&&(e.stacked(b.stacked),u.stacked=b.stacked),a.update()})}),a}var b,d,e=c.models.multiBar(),f=c.models.axis(),g=c.models.axis(),h=c.models.legend(),i=c.models.legend(),j={top:30,right:20,bottom:50,left:60},k=null,l=null,m=c.utils.defaultColor(),n=!0,o=!0,p=!0,q=!1,r=0,s=!0,t=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" on "+b+"</p>"},u={stacked:!1},v=null,w="No Data Available.",x=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),y=function(){return n?180:0};e.stacked(!1),f.orient("bottom").tickPadding(7).highlightZero(!0).showMaxMin(!1).tickFormat(function(a){return a}),g.orient("left").tickFormat(d3.format(",.1f"));var z=function(b,d){var h=b.pos[0]+(d.offsetLeft||0),i=b.pos[1]+(d.offsetTop||0),j=f.tickFormat()(e.x()(b.point,b.pointIndex)),k=g.tickFormat()(e.y()(b.point,b.pointIndex)),l=t(b.series.key,j,k,b,a);c.tooltip.show([h,i],l,b.value<0?"n":"s",null,d)};return e.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],x.tooltipShow(a)}),e.dispatch.on("elementMouseout.tooltip",function(a){x.tooltipHide(a)}),x.on("tooltipHide",function(){s&&c.tooltip.cleanup()}),a.dispatch=x,a.multibar=e,a.legend=h,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"x","y","xDomain","yDomain","forceX","forceY","clipEdge","id","stacked","delay","barColor"),a.margin=function(b){return arguments.length?(j.top="undefined"!=typeof b.top?b.top:j.top,j.right="undefined"!=typeof b.right?b.right:j.right,j.bottom="undefined"!=typeof b.bottom?b.bottom:j.bottom,j.left="undefined"!=typeof b.left?b.left:j.left,a):j},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),h.color(m),a):m},a.showControls=function(b){return arguments.length?(n=b,a):n},a.showLegend=function(b){return arguments.length?(o=b,a):o},a.reduceXTicks=function(b){return arguments.length?(p=b,a):p},a.rotateLabels=function(b){return arguments.length?(r=b,a):r},a.staggerLabels=function(b){return arguments.length?(q=b,a):q},a.tooltip=function(b){return arguments.length?(t=b,a):t},a.tooltips=function(b){return arguments.length?(s=b,a):s},a.tooltipContent=function(b){return arguments.length?(t=b,a):t},a.state=function(b){return arguments.length?(u=b,a):u},a.defaultState=function(b){return arguments.length?(v=b,a):v},a.noData=function(b){return arguments.length?(w=b,a):w},a},c.models.multiBarHorizontal=function(){function a(c){return c.each(function(a){{var c=i-h.left-h.right,k=j-h.top-h.bottom;d3.select(this)}s&&(a=d3.layout.stack().offset("zero").values(function(a){return a.values}).y(o)(a)),a=a.map(function(a,b){return a.values=a.values.map(function(a){return a.series=b,a}),a}),s&&a[0].values.map(function(b,c){var d=0,e=0;a.map(function(a){var b=a.values[c];b.size=Math.abs(b.y),b.y<0?(b.y1=e-b.size,e-=b.size):(b.y1=d,d+=b.size)})});var w=d&&e?[]:a.map(function(a){return a.values.map(function(a,b){return{x:n(a,b),y:o(a,b),y0:a.y0,y1:a.y1}})});l.domain(d||d3.merge(w).map(function(a){return a.x})).rangeBands([0,k],.1),m.domain(e||d3.extent(d3.merge(w).map(function(a){return s?a.y>0?a.y1+a.y:a.y1:a.y}).concat(p))),t&&!s?m.range([m.domain()[0]<0?u:0,c-(m.domain()[1]>0?u:0)]):m.range([0,c]),f=f||l,g=g||d3.scale.linear().domain(m.domain()).range([m(0),m(0)]);{var y=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([a]),z=y.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal"),A=(z.append("defs"),z.append("g"));y.select("g")}A.append("g").attr("class","nv-groups"),y.attr("transform","translate("+h.left+","+h.top+")");var B=y.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});B.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),d3.transition(B.exit()).style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),B.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return q(a,b)}).style("stroke",function(a,b){return q(a,b)}),d3.transition(B).style("stroke-opacity",1).style("fill-opacity",.75);var C=B.selectAll("g.nv-bar").data(function(a){return a.values});C.exit().remove();var D=C.enter().append("g").attr("transform",function(b,c,d){return"translate("+g(s?b.y0:0)+","+(s?0:d*l.rangeBand()/a.length+l(n(b,c)))+")"});D.append("rect").attr("width",0).attr("height",l.rangeBand()/(s?1:a.length)),C.on("mouseover",function(b,c){d3.select(this).classed("hover",!0),x.elementMouseover({value:o(b,c),point:b,series:a[b.series],pos:[m(o(b,c)+(s?b.y0:0)),l(n(b,c))+l.rangeBand()*(s?a.length/2:b.series+.5)/a.length],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),x.elementMouseout({value:o(b,c),point:b,series:a[b.series],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("click",function(b,c){x.elementClick({value:o(b,c),point:b,series:a[b.series],pos:[l(n(b,c))+l.rangeBand()*(s?a.length/2:b.series+.5)/a.length,m(o(b,c)+(s?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(b,c){x.elementDblClick({value:o(b,c),point:b,series:a[b.series],pos:[l(n(b,c))+l.rangeBand()*(s?a.length/2:b.series+.5)/a.length,m(o(b,c)+(s?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}),D.append("text"),t&&!s?(C.select("text").attr("text-anchor",function(a,b){return o(a,b)<0?"end":"start"}).attr("y",l.rangeBand()/(2*a.length)).attr("dy",".32em").text(function(a,b){return v(o(a,b))}),d3.transition(C).select("text").attr("x",function(a,b){return o(a,b)<0?-4:m(o(a,b))-m(0)+4})):C.selectAll("text").text(""),C.attr("class",function(a,b){return o(a,b)<0?"nv-bar negative":"nv-bar positive"}),r&&(b||(b=a.map(function(){return!0})),C.style("fill",function(a,c,d){return d3.rgb(r(a,c)).darker(b.map(function(a,b){return b}).filter(function(a,c){return!b[c]})[d]).toString()}).style("stroke",function(a,c,d){return d3.rgb(r(a,c)).darker(b.map(function(a,b){return b}).filter(function(a,c){return!b[c]})[d]).toString()})),s?d3.transition(C).attr("transform",function(a,b){return"translate("+m(a.y1)+","+l(n(a,b))+")"}).select("rect").attr("width",function(a,b){return Math.abs(m(o(a,b)+a.y0)-m(a.y0))}).attr("height",l.rangeBand()):d3.transition(C).attr("transform",function(b,c){return"translate("+(o(b,c)<0?m(o(b,c)):m(0))+","+(b.series*l.rangeBand()/a.length+l(n(b,c)))+")"}).select("rect").attr("height",l.rangeBand()/a.length).attr("width",function(a,b){return Math.max(Math.abs(m(o(a,b))-m(0)),1)}),f=l.copy(),g=m.copy()}),a}var b,d,e,f,g,h={top:0,right:0,bottom:0,left:0},i=960,j=500,k=Math.floor(1e4*Math.random()),l=d3.scale.ordinal(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=[0],q=c.utils.defaultColor(),r=null,s=!1,t=!1,u=60,v=d3.format(",.2f"),w=1200,x=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return a.dispatch=x,a.x=function(b){return arguments.length?(n=b,a):n},a.y=function(b){return arguments.length?(o=b,a):o},a.margin=function(b){return arguments.length?(h.top="undefined"!=typeof b.top?b.top:h.top,h.right="undefined"!=typeof b.right?b.right:h.right,h.bottom="undefined"!=typeof b.bottom?b.bottom:h.bottom,h.left="undefined"!=typeof b.left?b.left:h.left,a):h},a.width=function(b){return arguments.length?(i=b,a):i},a.height=function(b){return arguments.length?(j=b,a):j},a.xScale=function(b){return arguments.length?(l=b,a):l},a.yScale=function(b){return arguments.length?(m=b,a):m},a.xDomain=function(b){return arguments.length?(d=b,a):d},a.yDomain=function(b){return arguments.length?(e=b,a):e},a.forceY=function(b){return arguments.length?(p=b,a):p},a.stacked=function(b){return arguments.length?(s=b,a):s},a.color=function(b){return arguments.length?(q=c.utils.getColor(b),a):q},a.barColor=function(b){return arguments.length?(r=c.utils.getColor(b),a):r},a.disabled=function(c){return arguments.length?(b=c,a):b},a.id=function(b){return arguments.length?(k=b,a):k},a.delay=function(b){return arguments.length?(w=b,a):w},a.showValues=function(b){return arguments.length?(t=b,a):t},a.valueFormat=function(b){return arguments.length?(v=b,a):v},a.valuePadding=function(b){return arguments.length?(u=b,a):u},a},c.models.multiBarHorizontalChart=function(){function a(c){return c.each(function(p){var r=d3.select(this),y=this,z=(k||parseInt(r.style("width"))||960)-j.left-j.right,A=(l||parseInt(r.style("height"))||400)-j.top-j.bottom;
-if(a.update=function(){r.transition().call(a)},a.container=this,s.disabled=p.map(function(a){return!!a.disabled}),!t){var B;t={};for(B in s)t[B]=s[B]instanceof Array?s[B].slice(0):s[B]}if(!(p&&p.length&&p.filter(function(a){return a.values.length}).length)){var C=r.selectAll(".nv-noData").data([u]);return C.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),C.attr("x",j.left+z/2).attr("y",j.top+A/2).text(function(a){return a}),a}r.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var D=r.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([p]),E=D.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g"),F=D.select("g");if(E.append("g").attr("class","nv-x nv-axis"),E.append("g").attr("class","nv-y nv-axis"),E.append("g").attr("class","nv-barsWrap"),E.append("g").attr("class","nv-legendWrap"),E.append("g").attr("class","nv-controlsWrap"),o&&(h.width(z-w()),e.barColor()&&p.forEach(function(a,b){a.color=d3.rgb("#ccc").darker(1.5*b).toString()}),F.select(".nv-legendWrap").datum(p).call(h),j.top!=h.height()&&(j.top=h.height()+h.legendBelowPadding(),A=(l||parseInt(r.style("height"))||400)-j.top-j.bottom),F.select(".nv-legendWrap").attr("transform","translate("+w()+","+-j.top+")")),n){var G=[{key:"Grouped",disabled:e.stacked()},{key:"Stacked",disabled:!e.stacked()}];i.width(w()).color(["#444","#444","#444"]),F.select(".nv-controlsWrap").datum(G).attr("transform","translate(0,"+-j.top+")").call(i)}D.attr("transform","translate("+j.left+","+j.top+")"),e.disabled(p.map(function(a){return a.disabled})).width(z).height(A).color(p.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!p[b].disabled}));var H=F.select(".nv-barsWrap").datum(p.filter(function(a){return!a.disabled}));d3.transition(H).call(e),f.scale(b).ticks(A/24).tickSize(-z,0),d3.transition(F.select(".nv-x.nv-axis")).call(f);var I=F.select(".nv-x.nv-axis").selectAll("g");I.selectAll("line, text").style("opacity",1),g.scale(d).ticks(z/100).tickSize(-A,0),F.select(".nv-y.nv-axis").attr("transform","translate(0,"+A+")"),d3.transition(F.select(".nv-y.nv-axis")).call(g),h.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,p.filter(function(a){return!a.disabled}).length||p.map(function(a){return a.disabled=!1,D.selectAll(".nv-series").classed("disabled",!1),a}),s.disabled=p.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),h.dispatch.on("legendDblclick",function(b){p.forEach(function(a){a.disabled=!0}),b.disabled=!1,s.disabled=p.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),i.dispatch.on("legendClick",function(b){if(b.disabled){switch(G=G.map(function(a){return a.disabled=!0,a}),b.disabled=!1,b.key){case"Grouped":e.stacked(!1);break;case"Stacked":e.stacked(!0)}s.stacked=e.stacked(),v.stateChange(s),a.update()}}),v.on("tooltipShow",function(a){q&&x(a,y.parentNode)}),v.on("changeState",function(b){"undefined"!=typeof b.disabled&&(p.forEach(function(a,c){a.disabled=b.disabled[c]}),s.disabled=b.disabled),"undefined"!=typeof b.stacked&&(e.stacked(b.stacked),s.stacked=b.stacked),c.call(a)})}),a}var b,d,e=c.models.multiBarHorizontal(),f=c.models.axis(),g=c.models.axis(),h=c.models.legend().height(30),i=c.models.legend().height(30),j={top:30,right:20,bottom:50,left:60},k=null,l=null,m=c.utils.defaultColor(),n=!0,o=!0,p=!1,q=!0,r=function(a,b,c){return"<h3>"+a+" - "+b+"</h3><p>"+c+"</p>"},s={stacked:p},t=null,u="No Data Available.",v=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),w=function(){return n?180:0};e.stacked(p),f.orient("left").tickPadding(5).highlightZero(!1).showMaxMin(!1).tickFormat(function(a){return a}),g.orient("bottom").tickFormat(d3.format(",.1f"));var x=function(b,d){var h=b.pos[0]+(d.offsetLeft||0),i=b.pos[1]+(d.offsetTop||0),j=f.tickFormat()(e.x()(b.point,b.pointIndex)),k=g.tickFormat()(e.y()(b.point,b.pointIndex)),l=r(b.series.key,j,k,b,a);c.tooltip.show([h,i],l,b.value<0?"e":"w",null,d)};return e.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],v.tooltipShow(a)}),e.dispatch.on("elementMouseout.tooltip",function(a){v.tooltipHide(a)}),v.on("tooltipHide",function(){q&&c.tooltip.cleanup()}),a.dispatch=v,a.multibar=e,a.legend=h,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"x","y","xDomain","yDomain","forceX","forceY","clipEdge","id","delay","showValues","valueFormat","stacked","barColor"),a.margin=function(b){return arguments.length?(j.top="undefined"!=typeof b.top?b.top:j.top,j.right="undefined"!=typeof b.right?b.right:j.right,j.bottom="undefined"!=typeof b.bottom?b.bottom:j.bottom,j.left="undefined"!=typeof b.left?b.left:j.left,a):j},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),h.color(m),a):m},a.showControls=function(b){return arguments.length?(n=b,a):n},a.showLegend=function(b){return arguments.length?(o=b,a):o},a.tooltip=function(b){return arguments.length?(r=b,a):r},a.tooltips=function(b){return arguments.length?(q=b,a):q},a.tooltipContent=function(b){return arguments.length?(r=b,a):r},a.state=function(b){return arguments.length?(s=b,a):s},a.defaultState=function(b){return arguments.length?(t=b,a):t},a.noData=function(b){return arguments.length?(u=b,a):u},a},c.models.multiChart=function(){function a(c){return c.each(function(c){var j=d3.select(this),y=this;a.update=function(){j.transition().call(a)},a.container=this;var z=(f||parseInt(j.style("width"))||960)-d.left-d.right,A=(g||parseInt(j.style("height"))||400)-d.top-d.bottom,B=c.filter(function(a){return!a.disabled&&"line"==a.type&&1==a.yAxis}),C=c.filter(function(a){return!a.disabled&&"line"==a.type&&2==a.yAxis}),D=c.filter(function(a){return!a.disabled&&"bar"==a.type&&1==a.yAxis}),E=c.filter(function(a){return!a.disabled&&"bar"==a.type&&2==a.yAxis}),F=c.filter(function(a){return!a.disabled&&"area"==a.type&&1==a.yAxis}),G=c.filter(function(a){return!a.disabled&&"area"==a.type&&2==a.yAxis}),H=c.filter(function(a){return!a.disabled&&1==a.yAxis}).map(function(a){return a.values.map(function(a){return{x:a.x,y:a.y}})}),I=c.filter(function(a){return!a.disabled&&2==a.yAxis}).map(function(a){return a.values.map(function(a){return{x:a.x,y:a.y}})});b.domain(d3.extent(d3.merge(H.concat(I)),function(a){return a.x})).range([0,z]);var J=j.selectAll("g.wrap.multiChart").data([c]),K=J.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");K.append("g").attr("class","x axis"),K.append("g").attr("class","y1 axis"),K.append("g").attr("class","y2 axis"),K.append("g").attr("class","lines1Wrap"),K.append("g").attr("class","lines2Wrap"),K.append("g").attr("class","bars1Wrap"),K.append("g").attr("class","bars2Wrap"),K.append("g").attr("class","stack1Wrap"),K.append("g").attr("class","stack2Wrap"),K.append("g").attr("class","legendWrap");var L=J.select("g");h&&(v.width(z/2),L.select(".legendWrap").datum(c.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(1==a.yAxis?"":" (right axis)"),a})).call(v),d.top!=v.height()&&(d.top=v.height()+v.legendBelowPadding(),A=(g||parseInt(j.style("height"))||400)-d.top-d.bottom),L.select(".legendWrap").attr("transform","translate("+z/2+","+-d.top+")")),m.width(z).height(A).interpolate("monotone").color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&1==c[b].yAxis&&"line"==c[b].type})),n.width(z).height(A).interpolate("monotone").color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&2==c[b].yAxis&&"line"==c[b].type})),o.width(z).height(A).color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&1==c[b].yAxis&&"bar"==c[b].type})),p.width(z).height(A).color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&2==c[b].yAxis&&"bar"==c[b].type})),q.width(z).height(A).color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&1==c[b].yAxis&&"area"==c[b].type})),r.width(z).height(A).color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&2==c[b].yAxis&&"area"==c[b].type})),L.attr("transform","translate("+d.left+","+d.top+")");var M=L.select(".lines1Wrap").datum(B),N=L.select(".bars1Wrap").datum(D),O=L.select(".stack1Wrap").datum(F),P=L.select(".lines2Wrap").datum(C),Q=L.select(".bars2Wrap").datum(E),R=L.select(".stack2Wrap").datum(G),S=F.length?F.map(function(a){return a.values}).reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}).concat([{x:0,y:0}]):[],T=G.length?G.map(function(a){return a.values}).reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}).concat([{x:0,y:0}]):[];k.domain(d3.extent(d3.merge(H).concat(S),function(a){return a.y})).range([0,A]),l.domain(d3.extent(d3.merge(I).concat(T),function(a){return a.y})).range([0,A]),m.yDomain(k.domain()),o.yDomain(k.domain()),q.yDomain(k.domain()),n.yDomain(l.domain()),p.yDomain(l.domain()),r.yDomain(l.domain()),F.length&&d3.transition(O).call(q),G.length&&d3.transition(R).call(r),D.length&&d3.transition(N).call(o),E.length&&d3.transition(Q).call(p),B.length&&d3.transition(M).call(m),C.length&&d3.transition(P).call(n),s.ticks(z/100).tickSize(-A,0),L.select(".x.axis").attr("transform","translate(0,"+A+")"),d3.transition(L.select(".x.axis")).call(s),t.ticks(A/36).tickSize(-z,0),d3.transition(L.select(".y1.axis")).call(t),u.ticks(A/36).tickSize(-z,0),d3.transition(L.select(".y2.axis")).call(u),L.select(".y2.axis").style("opacity",I.length?1:0).attr("transform","translate("+b.range()[1]+",0)"),v.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,J.selectAll(".series").classed("disabled",!1),a}),a.update()}),w.on("tooltipShow",function(a){i&&x(a,y.parentNode)})}),a}var b,d={top:30,right:20,bottom:50,left:60},e=d3.scale.category20().range(),f=null,g=null,h=!0,i=!0,j=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" at "+b+"</p>"},b=d3.scale.linear(),k=d3.scale.linear(),l=d3.scale.linear(),m=c.models.line().yScale(k),n=c.models.line().yScale(l),o=c.models.multiBar().stacked(!1).yScale(k),p=c.models.multiBar().stacked(!1).yScale(l),q=c.models.stackedArea().yScale(k),r=c.models.stackedArea().yScale(l),s=c.models.axis().scale(b).orient("bottom").tickPadding(5),t=c.models.axis().scale(k).orient("left"),u=c.models.axis().scale(l).orient("right"),v=c.models.legend().height(30),w=d3.dispatch("tooltipShow","tooltipHide"),x=function(b,d){var e=b.pos[0]+(d.offsetLeft||0),f=b.pos[1]+(d.offsetTop||0),g=s.tickFormat()(m.x()(b.point,b.pointIndex)),h=(2==b.series.yAxis?u:t).tickFormat()(m.y()(b.point,b.pointIndex)),i=j(b.series.key,g,h,b,a);c.tooltip.show([e,f],i,void 0,void 0,d.offsetParent)};return m.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),m.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),n.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),n.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),o.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),o.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),p.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),p.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),q.dispatch.on("tooltipShow",function(a){return Math.round(100*q.y()(a.point))?(a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a),void 0):(setTimeout(function(){d3.selectAll(".point.hover").classed("hover",!1)},0),!1)}),q.dispatch.on("tooltipHide",function(a){w.tooltipHide(a)}),r.dispatch.on("tooltipShow",function(a){return Math.round(100*r.y()(a.point))?(a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a),void 0):(setTimeout(function(){d3.selectAll(".point.hover").classed("hover",!1)},0),!1)}),r.dispatch.on("tooltipHide",function(a){w.tooltipHide(a)}),m.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),m.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),n.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),n.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),w.on("tooltipHide",function(){i&&c.tooltip.cleanup()}),a.dispatch=w,a.lines1=m,a.lines2=n,a.bars1=o,a.bars2=p,a.stack1=q,a.stack2=r,a.xAxis=s,a.yAxis1=t,a.yAxis2=u,a.x=function(b){return arguments.length?(getX=b,m.x(b),o.x(b),a):getX},a.y=function(b){return arguments.length?(getY=b,m.y(b),o.y(b),a):getY},a.margin=function(b){return arguments.length?(d=b,a):d},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.color=function(b){return arguments.length?(e=b,v.color(b),a):e},a.showLegend=function(b){return arguments.length?(h=b,a):h},a.tooltips=function(b){return arguments.length?(i=b,a):i},a.tooltipContent=function(b){return arguments.length?(j=b,a):j},a},c.models.ohlcBar=function(){function a(c){return c.each(function(a){var c=f-e.left-e.right,u=g-e.top-e.bottom,w=d3.select(this);i.domain(b||d3.extent(a[0].values.map(k).concat(q))),s?i.range([.5*c/a[0].values.length,c*(a[0].values.length-.5)/a[0].values.length]):i.range([0,c]),j.domain(d||[d3.min(a[0].values.map(p).concat(r)),d3.max(a[0].values.map(o).concat(r))]).range([u,0]),(i.domain()[0]===i.domain()[1]||j.domain()[0]===j.domain()[1])&&(singlePoint=!0),i.domain()[0]===i.domain()[1]&&(i.domain()[0]?i.domain([i.domain()[0]-.01*i.domain()[0],i.domain()[1]+.01*i.domain()[1]]):i.domain([-1,1])),j.domain()[0]===j.domain()[1]&&(j.domain()[0]?j.domain([j.domain()[0]+.01*j.domain()[0],j.domain()[1]-.01*j.domain()[1]]):j.domain([-1,1]));var x=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([a[0].values]),y=x.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar"),z=y.append("defs"),A=y.append("g"),B=x.select("g");A.append("g").attr("class","nv-ticks"),x.attr("transform","translate("+e.left+","+e.top+")"),w.on("click",function(a,b){v.chartClick({data:a,index:b,pos:d3.event,id:h})}),z.append("clipPath").attr("id","nv-chart-clip-path-"+h).append("rect"),x.select("#nv-chart-clip-path-"+h+" rect").attr("width",c).attr("height",u),B.attr("clip-path",t?"url(#nv-chart-clip-path-"+h+")":"");var C=x.select(".nv-ticks").selectAll(".nv-tick").data(function(a){return a});C.exit().remove();C.enter().append("path").attr("class",function(a,b,c){return(m(a,b)>n(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b}).attr("d",function(b,d){var e=c/a[0].values.length*.9;return"m0,0l0,"+(j(m(b,d))-j(o(b,d)))+"l"+-e/2+",0l"+e/2+",0l0,"+(j(p(b,d))-j(m(b,d)))+"l0,"+(j(n(b,d))-j(p(b,d)))+"l"+e/2+",0l"+-e/2+",0z"}).attr("transform",function(a,b){return"translate("+i(k(a,b))+","+j(o(a,b))+")"}).on("mouseover",function(b,c){d3.select(this).classed("hover",!0),v.elementMouseover({point:b,series:a[0],pos:[i(k(b,c)),j(l(b,c))],pointIndex:c,seriesIndex:0,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),v.elementMouseout({point:b,series:a[0],pointIndex:c,seriesIndex:0,e:d3.event})}).on("click",function(a,b){v.elementClick({value:l(a,b),data:a,index:b,pos:[i(k(a,b)),j(l(a,b))],e:d3.event,id:h}),d3.event.stopPropagation()}).on("dblclick",function(a,b){v.elementDblClick({value:l(a,b),data:a,index:b,pos:[i(k(a,b)),j(l(a,b))],e:d3.event,id:h}),d3.event.stopPropagation()});C.attr("class",function(a,b,c){return(m(a,b)>n(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b}),d3.transition(C).attr("transform",function(a,b){return"translate("+i(k(a,b))+","+j(o(a,b))+")"}).attr("d",function(b,d){var e=c/a[0].values.length*.9;return"m0,0l0,"+(j(m(b,d))-j(o(b,d)))+"l"+-e/2+",0l"+e/2+",0l0,"+(j(p(b,d))-j(m(b,d)))+"l0,"+(j(n(b,d))-j(p(b,d)))+"l"+e/2+",0l"+-e/2+",0z"})}),a}var b,d,e={top:0,right:0,bottom:0,left:0},f=960,g=500,h=Math.floor(1e4*Math.random()),i=d3.scale.linear(),j=d3.scale.linear(),k=function(a){return a.x},l=function(a){return a.y},m=function(a){return a.open},n=function(a){return a.close},o=function(a){return a.high},p=function(a){return a.low},q=[],r=[],s=!1,t=!0,u=c.utils.defaultColor(),v=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return a.dispatch=v,a.x=function(b){return arguments.length?(k=b,a):k},a.y=function(b){return arguments.length?(l=b,a):l},a.open=function(b){return arguments.length?(m=b,a):m},a.close=function(b){return arguments.length?(n=b,a):n},a.high=function(b){return arguments.length?(o=b,a):o},a.low=function(b){return arguments.length?(p=b,a):p},a.margin=function(b){return arguments.length?(e.top="undefined"!=typeof b.top?b.top:e.top,e.right="undefined"!=typeof b.right?b.right:e.right,e.bottom="undefined"!=typeof b.bottom?b.bottom:e.bottom,e.left="undefined"!=typeof b.left?b.left:e.left,a):e},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.xScale=function(b){return arguments.length?(i=b,a):i},a.yScale=function(b){return arguments.length?(j=b,a):j},a.xDomain=function(c){return arguments.length?(b=c,a):b},a.yDomain=function(b){return arguments.length?(d=b,a):d},a.forceX=function(b){return arguments.length?(q=b,a):q},a.forceY=function(b){return arguments.length?(r=b,a):r},a.padData=function(b){return arguments.length?(s=b,a):s},a.clipEdge=function(b){return arguments.length?(t=b,a):t},a.color=function(b){return arguments.length?(u=c.utils.getColor(b),a):u},a.id=function(b){return arguments.length?(h=b,a):h},a},c.models.pie=function(){function a(c){return c.each(function(a){function c(a){a.endAngle=isNaN(a.endAngle)?0:a.endAngle,a.startAngle=isNaN(a.startAngle)?0:a.startAngle,q||(a.innerRadius=0);var b=d3.interpolate(this._current,a);return this._current=b(0),function(a){return D(b(a))}}var i=d-b.left-b.right,l=e-b.top-b.bottom,w=Math.min(i,l)/2,x=w-w/5,y=d3.select(this),z=y.selectAll(".nv-wrap.nv-pie").data([f(a[0])]),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-pie nv-chart-"+j),B=A.append("g"),C=z.select("g");B.append("g").attr("class","nv-pie"),z.attr("transform","translate("+b.left+","+b.top+")"),C.select(".nv-pie").attr("transform","translate("+i/2+","+l/2+")"),y.on("click",function(a,b){v.chartClick({data:a,index:b,pos:d3.event,id:j})});var D=d3.svg.arc().outerRadius(x);s&&D.startAngle(s),t&&D.endAngle(t),q&&D.innerRadius(w*u);var E=d3.layout.pie().sort(null).value(function(a){return a.disabled?0:h(a)}),F=z.select(".nv-pie").selectAll(".nv-slice").data(E);F.exit().remove();var G=F.enter().append("g").attr("class","nv-slice").on("mouseover",function(a,b){d3.select(this).classed("hover",!0),v.elementMouseover({label:g(a.data),value:h(a.data),point:a.data,pointIndex:b,pos:[d3.event.pageX,d3.event.pageY],id:j})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),v.elementMouseout({label:g(a.data),value:h(a.data),point:a.data,index:b,id:j})}).on("click",function(a,b){v.elementClick({label:g(a.data),value:h(a.data),point:a.data,index:b,pos:d3.event,id:j}),d3.event.stopPropagation()}).on("dblclick",function(a,b){v.elementDblClick({label:g(a.data),value:h(a.data),point:a.data,index:b,pos:d3.event,id:j}),d3.event.stopPropagation()});F.attr("fill",function(a,b){return k(a,b)}).attr("stroke",function(a,b){return k(a,b)});G.append("path").each(function(a){this._current=a});if(d3.transition(F.select("path")).attr("d",D).attrTween("d",c),m){var H=d3.svg.arc().innerRadius(0);n&&(H=D),o&&(H=d3.svg.arc().outerRadius(D.outerRadius())),G.append("g").classed("nv-label",!0).each(function(a){var b=d3.select(this);b.attr("transform",function(a){if(r){a.outerRadius=x+10,a.innerRadius=x+15;var b=(a.startAngle+a.endAngle)/2*(180/Math.PI);return(a.startAngle+a.endAngle)/2<Math.PI?b-=90:b+=90,"translate("+H.centroid(a)+") rotate("+b+")"}return a.outerRadius=w+10,a.innerRadius=w+15,"translate("+H.centroid(a)+")"}),b.append("rect").style("stroke","#fff").style("fill","#fff").attr("rx",3).attr("ry",3),b.append("text").style("text-anchor",r?(a.startAngle+a.endAngle)/2<Math.PI?"start":"end":"middle").style("fill","#000")}),F.select(".nv-label").transition().attr("transform",function(a){if(r){a.outerRadius=x+10,a.innerRadius=x+15;var b=(a.startAngle+a.endAngle)/2*(180/Math.PI);return(a.startAngle+a.endAngle)/2<Math.PI?b-=90:b+=90,"translate("+H.centroid(a)+") rotate("+b+")"}return a.outerRadius=w+10,a.innerRadius=w+15,"translate("+H.centroid(a)+")"}),F.each(function(a){var b=d3.select(this);b.select(".nv-label text").style("text-anchor",r?(a.startAngle+a.endAngle)/2<Math.PI?"start":"end":"middle").text(function(a){var b=(a.endAngle-a.startAngle)/(2*Math.PI);return a.value&&b>p?g(a.data):""});var c=b.select("text").node().getBBox();b.select(".nv-label rect").attr("width",c.width+10).attr("height",c.height+10).attr("transform",function(){return"translate("+[c.x-5,c.y-5]+")"})})}}),a}var b={top:0,right:0,bottom:0,left:0},d=500,e=500,f=function(a){return a.values},g=function(a){return a.x},h=function(a){return a.y},i=function(a){return a.description},j=Math.floor(1e4*Math.random()),k=c.utils.defaultColor(),l=d3.format(",.2f"),m=!0,n=!0,o=!1,p=.02,q=!1,r=!1,s=!1,t=!1,u=.5,v=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return a.dispatch=v,a.margin=function(c){return arguments.length?(b.top="undefined"!=typeof c.top?c.top:b.top,b.right="undefined"!=typeof c.right?c.right:b.right,b.bottom="undefined"!=typeof c.bottom?c.bottom:b.bottom,b.left="undefined"!=typeof c.left?c.left:b.left,a):b},a.width=function(b){return arguments.length?(d=b,a):d},a.height=function(b){return arguments.length?(e=b,a):e},a.values=function(b){return arguments.length?(f=b,a):f},a.x=function(b){return arguments.length?(g=b,a):g},a.y=function(b){return arguments.length?(h=d3.functor(b),a):h},a.description=function(b){return arguments.length?(i=b,a):i},a.showLabels=function(b){return arguments.length?(m=b,a):m},a.labelSunbeamLayout=function(b){return arguments.length?(r=b,a):r},a.donutLabelsOutside=function(b){return arguments.length?(o=b,a):o},a.pieLabelsOutside=function(b){return arguments.length?(n=b,a):n},a.donut=function(b){return arguments.length?(q=b,a):q},a.donutRatio=function(b){return arguments.length?(u=b,a):u},a.startAngle=function(b){return arguments.length?(s=b,a):s},a.endAngle=function(b){return arguments.length?(t=b,a):t},a.id=function(b){return arguments.length?(j=b,a):j},a.color=function(b){return arguments.length?(k=c.utils.getColor(b),a):k},a.valueFormat=function(b){return arguments.length?(l=b,a):l},a.labelThreshold=function(b){return arguments.length?(p=b,a):p},a},c.models.pieChart=function(){function a(c){return c.each(function(c){var i=d3.select(this),j=(f||parseInt(i.style("width"))||960)-e.left-e.right,k=(g||parseInt(i.style("height"))||400)-e.top-e.bottom;if(a.update=function(){i.transition().call(a)},a.container=this,l.disabled=c[0].map(function(a){return!!a.disabled}),!m){var p;m={};for(p in l)m[p]=l[p]instanceof Array?l[p].slice(0):l[p]}if(!c[0]||!c[0].length){var q=i.selectAll(".nv-noData").data([n]);return q.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),q.attr("x",e.left+j/2).attr("y",e.top+k/2).text(function(a){return a}),a}i.selectAll(".nv-noData").remove();var r=i.selectAll("g.nv-wrap.nv-pieChart").data([c]),s=r.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g"),t=r.select("g");s.append("g").attr("class","nv-pieWrap"),s.append("g").attr("class","nv-legendWrap"),h&&(d.width(j).key(b.x()),r.select(".nv-legendWrap").datum(b.values()(c[0])).call(d),e.top!=d.height()&&(e.top=d.height()+d.legendBelowPadding(),k=(g||parseInt(i.style("height"))||400)-e.top-e.bottom),r.select(".nv-legendWrap").attr("transform","translate(0,"+-e.top+")")),r.attr("transform","translate("+e.left+","+e.top+")"),b.width(j).height(k);var u=t.select(".nv-pieWrap").datum(c);d3.transition(u).call(b),d.dispatch.on("legendClick",function(d){d.disabled=!d.disabled,b.values()(c[0]).filter(function(a){return!a.disabled}).length||b.values()(c[0]).map(function(a){return a.disabled=!1,r.selectAll(".nv-series").classed("disabled",!1),a}),l.disabled=c[0].map(function(a){return!!a.disabled}),o.stateChange(l),a.update()}),b.dispatch.on("elementMouseout.tooltip",function(a){o.tooltipHide(a)}),o.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c[0].forEach(function(a,c){a.disabled=b.disabled[c]}),l.disabled=b.disabled),a.update()})}),a}var b=c.models.pie(),d=c.models.legend(),e={top:30,right:20,bottom:20,left:20},f=null,g=null,h=!0,i=c.utils.defaultColor(),j=!0,k=function(a,b){return"<h3>"+a+"</h3><p>"+b+"</p>"},l={},m=null,n="No Data Available.",o=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),p=function(d,e){var f=b.description()(d.point)||b.x()(d.point),g=d.pos[0]+(e&&e.offsetLeft||0),h=d.pos[1]+(e&&e.offsetTop||0),i=b.valueFormat()(b.y()(d.point)),j=k(f,i,d,a);c.tooltip.show([g,h],j,d.value<0?"n":"s",null,e)};return b.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+e.left,a.pos[1]+e.top],o.tooltipShow(a)}),o.on("tooltipShow",function(a){j&&p(a)}),o.on("tooltipHide",function(){j&&c.tooltip.cleanup()}),a.legend=d,a.dispatch=o,a.pie=b,d3.rebind(a,b,"valueFormat","values","x","y","description","id","showLabels","donutLabelsOutside","pieLabelsOutside","donut","donutRatio","labelThreshold"),a.margin=function(b){return arguments.length?(e.top="undefined"!=typeof b.top?b.top:e.top,e.right="undefined"!=typeof b.right?b.right:e.right,e.bottom="undefined"!=typeof b.bottom?b.bottom:e.bottom,e.left="undefined"!=typeof b.left?b.left:e.left,a):e},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.color=function(e){return arguments.length?(i=c.utils.getColor(e),d.color(i),b.color(i),a):i},a.showLegend=function(b){return arguments.length?(h=b,a):h},a.tooltips=function(b){return arguments.length?(j=b,a):j},a.tooltipContent=function(b){return arguments.length?(k=b,a):k},a.state=function(b){return arguments.length?(l=b,a):l},a.defaultState=function(b){return arguments.length?(m=b,a):m},a.noData=function(b){return arguments.length?(n=b,a):n},a},c.models.scatter=function(){function a(c){return c.each(function(a){function c(){if(!w)return!1;var b=d3.merge(a.map(function(a,b){return a.values.map(function(a,c){var d=o(a,c)+1e-7*Math.random(),e=p(a,c)+1e-7*Math.random();return[l(d),m(e),b,c,a]}).filter(function(a,b){return y(a[4],b)})}));if(K===!0){if(C){var c=Q.select("defs").selectAll(".nv-point-clips").data([k]).enter();c.append("clipPath").attr("class","nv-point-clips").attr("id","nv-points-clip-"+k);var d=Q.select("#nv-points-clip-"+k).selectAll("circle").data(b);d.enter().append("circle").attr("r",D),d.exit().remove(),d.attr("cx",function(a){return a[0]}).attr("cy",function(a){return a[1]}),Q.select(".nv-point-paths").attr("clip-path","url(#nv-points-clip-"+k+")")}b.length&&(b.push([l.range()[0]-20,m.range()[0]-20,null,null]),b.push([l.range()[1]+20,m.range()[1]+20,null,null]),b.push([l.range()[0]-20,m.range()[0]+20,null,null]),b.push([l.range()[1]+20,m.range()[1]-20,null,null]));var e=d3.geom.polygon([[-10,-10],[-10,i+10],[h+10,i+10],[h+10,-10]]),f=d3.geom.voronoi(b).map(function(a,c){return{data:e.clip(a),series:b[c][2],point:b[c][3]}}),j=Q.select(".nv-point-paths").selectAll("path").data(f);j.enter().append("path").attr("class",function(a,b){return"nv-path-"+b}),j.exit().remove(),j.attr("d",function(a){return 0===a.data.length?"M 0 0":"M"+a.data.join("L")+"Z"}),j.on("click",function(b){if(L)return 0;var c=a[b.series],d=c.values[b.point];J.elementClick({point:d,series:c,pos:[l(o(d,b.point))+g.left,m(p(d,b.point))+g.top],seriesIndex:b.series,pointIndex:b.point})}).on("mouseover",function(b){if(L)return 0;var c=a[b.series],d=c.values[b.point];J.elementMouseover({point:d,series:c,pos:[l(o(d,b.point))+g.left,m(p(d,b.point))+g.top],seriesIndex:b.series,pointIndex:b.point})}).on("mouseout",function(b){if(L)return 0;var c=a[b.series],d=c.values[b.point];J.elementMouseout({point:d,series:c,seriesIndex:b.series,pointIndex:b.point})})}else Q.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",function(b,c){if(L||!a[b.series])return 0;var d=a[b.series],e=d.values[c];J.elementClick({point:e,series:d,pos:[l(o(e,c))+g.left,m(p(e,c))+g.top],seriesIndex:b.series,pointIndex:c})}).on("mouseover",function(b,c){if(L||!a[b.series])return 0;var d=a[b.series],e=d.values[c];J.elementMouseover({point:e,series:d,pos:[l(o(e,c))+g.left,m(p(e,c))+g.top],seriesIndex:b.series,pointIndex:c})}).on("mouseout",function(b,c){if(L||!a[b.series])return 0;var d=a[b.series],e=d.values[c];J.elementMouseout({point:e,series:d,seriesIndex:b.series,pointIndex:c})});L=!1}var M=h-g.left-g.right,N=i-g.top-g.bottom,O=d3.select(this);a=a.map(function(a,b){return a.values=a.values.map(function(a){return a.series=b,a}),a});var P=E&&F&&G?[]:d3.merge(a.map(function(a){return a.values.map(function(a,b){return{x:o(a,b),y:p(a,b),size:q(a,b)}})}));l.domain(E||d3.extent(P.map(function(a){return a.x}).concat(t))),z&&a[0]?l.range([(M*A+M)/(2*a[0].values.length),M-M*(1+A)/(2*a[0].values.length)]):l.range([0,M]),m.domain(F||d3.extent(P.map(function(a){return a.y}).concat(u))).range([N,0]),n.domain(G||d3.extent(P.map(function(a){return a.size}).concat(v))).range(H||[16,256]),(l.domain()[0]===l.domain()[1]||m.domain()[0]===m.domain()[1])&&(I=!0),l.domain()[0]===l.domain()[1]&&(l.domain()[0]?l.domain([l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]):l.domain([-1,1])),m.domain()[0]===m.domain()[1]&&(m.domain()[0]?m.domain([m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]):m.domain([-1,1])),isNaN(l.domain()[0])&&l.domain([-1,1]),isNaN(m.domain()[0])&&m.domain([-1,1]),b=b||l,d=d||m,e=e||n;var Q=O.selectAll("g.nv-wrap.nv-scatter").data([a]),R=Q.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+k+(I?" nv-single-point":"")),S=R.append("defs"),T=R.append("g"),U=Q.select("g");T.append("g").attr("class","nv-groups"),T.append("g").attr("class","nv-point-paths"),Q.attr("transform","translate("+g.left+","+g.top+")"),S.append("clipPath").attr("id","nv-edge-clip-"+k).append("rect"),Q.select("#nv-edge-clip-"+k+" rect").attr("width",M).attr("height",N),U.attr("clip-path",B?"url(#nv-edge-clip-"+k+")":""),L=!0;var V=Q.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});if(V.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),d3.transition(V.exit()).style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),V.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}),d3.transition(V).style("fill",function(a,b){return j(a,b)}).style("stroke",function(a,b){return j(a,b)}).style("stroke-opacity",1).style("fill-opacity",.5),s){var W=V.selectAll("circle.nv-point").data(function(a){return a.values},x);W.enter().append("circle").attr("cx",function(a,c){return b(o(a,c))}).attr("cy",function(a,b){return d(p(a,b))}).attr("r",function(a,b){return Math.sqrt(n(q(a,b))/Math.PI)}),W.exit().remove(),V.exit().selectAll("path.nv-point").transition().attr("cx",function(a,b){return l(o(a,b))}).attr("cy",function(a,b){return m(p(a,b))}).remove(),W.each(function(a,b){d3.select(this).classed("nv-point",!0).classed("nv-point-"+b,!0)}),W.transition().attr("cx",function(a,b){return l(o(a,b))}).attr("cy",function(a,b){return m(p(a,b))}).attr("r",function(a,b){return Math.sqrt(n(q(a,b))/Math.PI)})}else{var W=V.selectAll("path.nv-point").data(function(a){return a.values});W.enter().append("path").attr("transform",function(a,c){return"translate("+b(o(a,c))+","+d(p(a,c))+")"
-}).attr("d",d3.svg.symbol().type(r).size(function(a,b){return n(q(a,b))})),W.exit().remove(),d3.transition(V.exit().selectAll("path.nv-point")).attr("transform",function(a,b){return"translate("+l(o(a,b))+","+m(p(a,b))+")"}).remove(),W.each(function(a,b){d3.select(this).classed("nv-point",!0).classed("nv-point-"+b,!0)}),W.transition().attr("transform",function(a,b){return"translate("+l(o(a,b))+","+m(p(a,b))+")"}).attr("d",d3.svg.symbol().type(r).size(function(a,b){return n(q(a,b))}))}clearTimeout(f),f=setTimeout(c,300),b=l.copy(),d=m.copy(),e=n.copy()}),a}var b,d,e,f,g={top:0,right:0,bottom:0,left:0},h=960,i=500,j=c.utils.defaultColor(),k=Math.floor(1e5*Math.random()),l=d3.scale.linear(),m=d3.scale.linear(),n=d3.scale.linear(),o=function(a){return a.x},p=function(a){return a.y},q=function(a){return a.size||1},r=function(a){return a.shape||"circle"},s=!0,t=[],u=[],v=[],w=!0,x=null,y=function(a){return!a.notActive},z=!1,A=.1,B=!1,C=!0,D=function(){return 25},E=null,F=null,G=null,H=null,I=!1,J=d3.dispatch("elementClick","elementMouseover","elementMouseout"),K=!0,L=!1;return J.on("elementMouseover.point",function(a){w&&d3.select(".nv-chart-"+k+" .nv-series-"+a.seriesIndex+" .nv-point-"+a.pointIndex).classed("hover",!0)}),J.on("elementMouseout.point",function(a){w&&d3.select(".nv-chart-"+k+" .nv-series-"+a.seriesIndex+" .nv-point-"+a.pointIndex).classed("hover",!1)}),a.dispatch=J,a.x=function(b){return arguments.length?(o=d3.functor(b),a):o},a.y=function(b){return arguments.length?(p=d3.functor(b),a):p},a.size=function(b){return arguments.length?(q=d3.functor(b),a):q},a.margin=function(b){return arguments.length?(g.top="undefined"!=typeof b.top?b.top:g.top,g.right="undefined"!=typeof b.right?b.right:g.right,g.bottom="undefined"!=typeof b.bottom?b.bottom:g.bottom,g.left="undefined"!=typeof b.left?b.left:g.left,a):g},a.width=function(b){return arguments.length?(h=b,a):h},a.height=function(b){return arguments.length?(i=b,a):i},a.xScale=function(b){return arguments.length?(l=b,a):l},a.yScale=function(b){return arguments.length?(m=b,a):m},a.zScale=function(b){return arguments.length?(n=b,a):n},a.xDomain=function(b){return arguments.length?(E=b,a):E},a.yDomain=function(b){return arguments.length?(F=b,a):F},a.sizeDomain=function(b){return arguments.length?(G=b,a):G},a.sizeRange=function(b){return arguments.length?(H=b,a):H},a.forceX=function(b){return arguments.length?(t=b,a):t},a.forceY=function(b){return arguments.length?(u=b,a):u},a.forceSize=function(b){return arguments.length?(v=b,a):v},a.interactive=function(b){return arguments.length?(w=b,a):w},a.pointKey=function(b){return arguments.length?(x=b,a):x},a.pointActive=function(b){return arguments.length?(y=b,a):y},a.padData=function(b){return arguments.length?(z=b,a):z},a.padDataOuter=function(b){return arguments.length?(A=b,a):A},a.clipEdge=function(b){return arguments.length?(B=b,a):B},a.clipVoronoi=function(b){return arguments.length?(C=b,a):C},a.useVoronoi=function(b){return arguments.length?(K=b,K===!1&&(C=!1),a):K},a.clipRadius=function(b){return arguments.length?(D=b,a):D},a.color=function(b){return arguments.length?(j=c.utils.getColor(b),a):j},a.shape=function(b){return arguments.length?(r=b,a):r},a.onlyCircles=function(b){return arguments.length?(s=b,a):s},a.id=function(b){return arguments.length?(k=b,a):k},a.singlePoint=function(b){return arguments.length?(I=b,a):I},a},c.models.scatterChart=function(){function a(c){return c.each(function(c){function y(){if(w)return Q.select(".nv-point-paths").style("pointer-events","all"),!1;Q.select(".nv-point-paths").style("pointer-events","none");var a=d3.mouse(this);n.distortion(v).focus(a[0]),o.distortion(v).focus(a[1]),Q.select(".nv-scatterWrap").call(b),Q.select(".nv-x.nv-axis").call(d),Q.select(".nv-y.nv-axis").call(e),Q.select(".nv-distributionX").datum(c.filter(function(a){return!a.disabled})).call(h),Q.select(".nv-distributionY").datum(c.filter(function(a){return!a.disabled})).call(i)}var z=d3.select(this),A=this,J=(k||parseInt(z.style("width"))||960)-j.left-j.right,K=(l||parseInt(z.style("height"))||400)-j.top-j.bottom;if(a.update=function(){z.transition().call(a)},B.disabled=c.map(function(a){return!!a.disabled}),!C){var L;C={};for(L in B)C[L]=B[L]instanceof Array?B[L].slice(0):B[L]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var M=z.selectAll(".nv-noData").data([E]);return M.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),M.attr("x",j.left+J/2).attr("y",j.top+K/2).text(function(a){return a}),a}z.selectAll(".nv-noData").remove(),F=F||n,G=G||o;var N=z.selectAll("g.nv-wrap.nv-scatterChart").data([c]),O=N.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+b.id()),P=O.append("g"),Q=N.select("g");if(P.append("rect").attr("class","nvd3 nv-background"),P.append("g").attr("class","nv-x nv-axis"),P.append("g").attr("class","nv-y nv-axis"),P.append("g").attr("class","nv-scatterWrap"),P.append("g").attr("class","nv-distWrap"),P.append("g").attr("class","nv-legendWrap"),P.append("g").attr("class","nv-controlsWrap"),t&&(f.width(J/2),N.select(".nv-legendWrap").datum(c).call(f),j.top!=f.height()&&(j.top=f.height()+f.legendBelowPadding(),K=(l||parseInt(z.style("height"))||400)-j.top-j.bottom),N.select(".nv-legendWrap").attr("transform","translate("+J/2+","+-j.top+")")),u&&(g.width(180).color(["#444"]),Q.select(".nv-controlsWrap").datum(I).attr("transform","translate(0,"+-j.top+")").call(g)),N.attr("transform","translate("+j.left+","+j.top+")"),b.width(J).height(K).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})).xDomain(null).yDomain(null),N.select(".nv-scatterWrap").datum(c.filter(function(a){return!a.disabled})).call(b),p){var R=n.domain()[1]-n.domain()[0];b.xDomain([n.domain()[0]-p*R,n.domain()[1]+p*R])}if(q){var S=o.domain()[1]-o.domain()[0];b.yDomain([o.domain()[0]-q*S,o.domain()[1]+q*S])}N.select(".nv-scatterWrap").datum(c.filter(function(a){return!a.disabled})).call(b),d.scale(n).ticks(d.ticks()&&d.ticks().length?d.ticks():J/100).tickSize(-K,0),Q.select(".nv-x.nv-axis").attr("transform","translate(0,"+o.range()[0]+")").call(d),e.scale(o).ticks(e.ticks()&&e.ticks().length?e.ticks():K/36).tickSize(-J,0),Q.select(".nv-y.nv-axis").call(e),r&&(h.getData(b.x()).scale(n).width(J).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})),P.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),Q.select(".nv-distributionX").attr("transform","translate(0,"+o.range()[0]+")").datum(c.filter(function(a){return!a.disabled})).call(h)),s&&(i.getData(b.y()).scale(o).width(K).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})),P.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),Q.select(".nv-distributionY").attr("transform","translate(-"+i.size()+",0)").datum(c.filter(function(a){return!a.disabled})).call(i)),d3.fisheye&&(Q.select(".nv-background").attr("width",J).attr("height",K),Q.select(".nv-background").on("mousemove",y),Q.select(".nv-background").on("click",function(){w=!w}),b.dispatch.on("elementClick.freezeFisheye",function(){w=!w})),g.dispatch.on("legendClick",function(c){c.disabled=!c.disabled,v=c.disabled?0:2.5,Q.select(".nv-background").style("pointer-events",c.disabled?"none":"all"),Q.select(".nv-point-paths").style("pointer-events",c.disabled?"all":"none"),c.disabled?(n.distortion(v).focus(0),o.distortion(v).focus(0),Q.select(".nv-scatterWrap").call(b),Q.select(".nv-x.nv-axis").call(d),Q.select(".nv-y.nv-axis").call(e)):w=!1,a.update()}),f.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,N.selectAll(".nv-series").classed("disabled",!1),a}),B.disabled=c.map(function(a){return!!a.disabled}),D.stateChange(B),a.update()}),f.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,B.disabled=c.map(function(a){return!!a.disabled}),D.stateChange(B),a.update()}),b.dispatch.on("elementMouseover.tooltip",function(a){d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",function(){return a.pos[1]-K}),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",a.pos[0]+h.size()),a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],D.tooltipShow(a)}),D.on("tooltipShow",function(a){x&&H(a,A.parentNode)}),D.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),B.disabled=b.disabled),a.update()}),F=n.copy(),G=o.copy()}),a}var b=c.models.scatter(),d=c.models.axis(),e=c.models.axis(),f=c.models.legend(),g=c.models.legend(),h=c.models.distribution(),i=c.models.distribution(),j={top:30,right:20,bottom:50,left:75},k=null,l=null,m=c.utils.defaultColor(),n=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):b.xScale(),o=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):b.yScale(),p=0,q=0,r=!1,s=!1,t=!0,u=!!d3.fisheye,v=0,w=!1,x=!0,y=function(a,b){return"<strong>"+b+"</strong>"},z=function(a,b,c){return"<strong>"+c+"</strong>"},A=null,B={},C=null,D=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),E="No Data Available.";b.xScale(n).yScale(o),d.orient("bottom").tickPadding(10),e.orient("left").tickPadding(10),h.axis("x"),i.axis("y");var F,G,H=function(f,g){var h=f.pos[0]+(g.offsetLeft||0),i=f.pos[1]+(g.offsetTop||0),k=f.pos[0]+(g.offsetLeft||0),l=o.range()[0]+j.top+(g.offsetTop||0),m=n.range()[0]+j.left+(g.offsetLeft||0),p=f.pos[1]+(g.offsetTop||0),q=d.tickFormat()(b.x()(f.point,f.pointIndex)),r=e.tickFormat()(b.y()(f.point,f.pointIndex));null!=y&&c.tooltip.show([k,l],y(f.series.key,q,r,f,a),"n",1,g,"x-nvtooltip"),null!=z&&c.tooltip.show([m,p],z(f.series.key,q,r,f,a),"e",1,g,"y-nvtooltip"),null!=A&&c.tooltip.show([h,i],A(f.series.key,q,r,f,a),f.value<0?"n":"s",null,g)},I=[{key:"Magnify",disabled:!0}];return b.dispatch.on("elementMouseout.tooltip",function(a){D.tooltipHide(a),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",0),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",i.size())}),D.on("tooltipHide",function(){x&&c.tooltip.cleanup()}),a.dispatch=D,a.scatter=b,a.legend=f,a.controls=g,a.xAxis=d,a.yAxis=e,a.distX=h,a.distY=i,d3.rebind(a,b,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi"),a.margin=function(b){return arguments.length?(j.top="undefined"!=typeof b.top?b.top:j.top,j.right="undefined"!=typeof b.right?b.right:j.right,j.bottom="undefined"!=typeof b.bottom?b.bottom:j.bottom,j.left="undefined"!=typeof b.left?b.left:j.left,a):j},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),f.color(m),h.color(m),i.color(m),a):m},a.showDistX=function(b){return arguments.length?(r=b,a):r},a.showDistY=function(b){return arguments.length?(s=b,a):s},a.showControls=function(b){return arguments.length?(u=b,a):u},a.showLegend=function(b){return arguments.length?(t=b,a):t},a.fisheye=function(b){return arguments.length?(v=b,a):v},a.xPadding=function(b){return arguments.length?(p=b,a):p},a.yPadding=function(b){return arguments.length?(q=b,a):q},a.tooltips=function(b){return arguments.length?(x=b,a):x},a.tooltipContent=function(b){return arguments.length?(A=b,a):A},a.tooltipXContent=function(b){return arguments.length?(y=b,a):y},a.tooltipYContent=function(b){return arguments.length?(z=b,a):z},a.state=function(b){return arguments.length?(B=b,a):B},a.defaultState=function(b){return arguments.length?(C=b,a):C},a.noData=function(b){return arguments.length?(E=b,a):E},a},c.models.scatterPlusLineChart=function(){function a(c){return c.each(function(c){function w(){if(u)return O.select(".nv-point-paths").style("pointer-events","all"),!1;O.select(".nv-point-paths").style("pointer-events","none");var a=d3.mouse(this);n.distortion(t).focus(a[0]),o.distortion(t).focus(a[1]),O.select(".nv-scatterWrap").datum(c.filter(function(a){return!a.disabled})).call(b),O.select(".nv-x.nv-axis").call(d),O.select(".nv-y.nv-axis").call(e),O.select(".nv-distributionX").datum(c.filter(function(a){return!a.disabled})).call(h),O.select(".nv-distributionY").datum(c.filter(function(a){return!a.disabled})).call(i)}var x=d3.select(this),y=this,H=(k||parseInt(x.style("width"))||960)-j.left-j.right,I=(l||parseInt(x.style("height"))||400)-j.top-j.bottom;if(a.update=function(){x.transition().call(a)},a.container=this,z.disabled=c.map(function(a){return!!a.disabled}),!A){var J;A={};for(J in z)A[J]=z[J]instanceof Array?z[J].slice(0):z[J]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var K=x.selectAll(".nv-noData").data([C]);return K.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),K.attr("x",j.left+H/2).attr("y",j.top+I/2).text(function(a){return a}),a}x.selectAll(".nv-noData").remove(),n=b.xScale(),o=b.yScale(),D=D||n,E=E||o;var L=x.selectAll("g.nv-wrap.nv-scatterChart").data([c]),M=L.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+b.id()),N=M.append("g"),O=L.select("g");N.append("rect").attr("class","nvd3 nv-background"),N.append("g").attr("class","nv-x nv-axis"),N.append("g").attr("class","nv-y nv-axis"),N.append("g").attr("class","nv-scatterWrap"),N.append("g").attr("class","nv-regressionLinesWrap"),N.append("g").attr("class","nv-distWrap"),N.append("g").attr("class","nv-legendWrap"),N.append("g").attr("class","nv-controlsWrap"),L.attr("transform","translate("+j.left+","+j.top+")"),r&&(f.width(H/2),L.select(".nv-legendWrap").datum(c).call(f),j.top!=f.height()&&(j.top=f.height()+f.legendBelowPadding(),I=(l||parseInt(x.style("height"))||400)-j.top-j.bottom),L.select(".nv-legendWrap").attr("transform","translate("+H/2+","+-j.top+")")),s&&(g.width(180).color(["#444"]),O.select(".nv-controlsWrap").datum(G).attr("transform","translate(0,"+-j.top+")").call(g)),b.width(H).height(I).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})),L.select(".nv-scatterWrap").datum(c.filter(function(a){return!a.disabled})).call(b),L.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+b.id()+")");{var P=L.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(a){return a});P.enter().append("g").attr("class","nv-regLines").append("line").attr("class","nv-regLine").style("stroke-opacity",0)}P.selectAll(".nv-regLines line").attr("x1",n.range()[0]).attr("x2",n.range()[1]).attr("y1",function(a){return o(n.domain()[0]*a.slope+a.intercept)}).attr("y2",function(a){return o(n.domain()[1]*a.slope+a.intercept)}).style("stroke",function(a,b,c){return m(a,c)}).style("stroke-opacity",function(a){return a.disabled||"undefined"==typeof a.slope||"undefined"==typeof a.intercept?0:1}),d.scale(n).ticks(d.ticks()?d.ticks():H/100).tickSize(-I,0),O.select(".nv-x.nv-axis").attr("transform","translate(0,"+o.range()[0]+")").call(d),e.scale(o).ticks(e.ticks()?e.ticks():I/36).tickSize(-H,0),O.select(".nv-y.nv-axis").call(e),p&&(h.getData(b.x()).scale(n).width(H).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})),N.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),O.select(".nv-distributionX").attr("transform","translate(0,"+o.range()[0]+")").datum(c.filter(function(a){return!a.disabled})).call(h)),q&&(i.getData(b.y()).scale(o).width(I).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})),N.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),O.select(".nv-distributionY").attr("transform","translate(-"+i.size()+",0)").datum(c.filter(function(a){return!a.disabled})).call(i)),d3.fisheye&&(O.select(".nv-background").attr("width",H).attr("height",I),O.select(".nv-background").on("mousemove",w),O.select(".nv-background").on("click",function(){u=!u}),b.dispatch.on("elementClick.freezeFisheye",function(){u=!u})),g.dispatch.on("legendClick",function(c){c.disabled=!c.disabled,t=c.disabled?0:2.5,O.select(".nv-background").style("pointer-events",c.disabled?"none":"all"),O.select(".nv-point-paths").style("pointer-events",c.disabled?"all":"none"),c.disabled?(n.distortion(t).focus(0),o.distortion(t).focus(0),O.select(".nv-scatterWrap").call(b),O.select(".nv-x.nv-axis").call(d),O.select(".nv-y.nv-axis").call(e)):u=!1,a.update()}),f.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,L.selectAll(".nv-series").classed("disabled",!1),a}),z.disabled=c.map(function(a){return!!a.disabled}),B.stateChange(z),a.update()}),f.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,z.disabled=c.map(function(a){return!!a.disabled}),B.stateChange(z),a.update()}),b.dispatch.on("elementMouseover.tooltip",function(a){d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",a.pos[1]-I),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",a.pos[0]+h.size()),a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],B.tooltipShow(a)}),B.on("tooltipShow",function(a){v&&F(a,y.parentNode)}),B.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),z.disabled=b.disabled),a.update()}),D=n.copy(),E=o.copy()}),a}var b=c.models.scatter(),d=c.models.axis(),e=c.models.axis(),f=c.models.legend(),g=c.models.legend(),h=c.models.distribution(),i=c.models.distribution(),j={top:30,right:20,bottom:50,left:75},k=null,l=null,m=c.utils.defaultColor(),n=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):b.xScale(),o=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):b.yScale(),p=!1,q=!1,r=!0,s=!!d3.fisheye,t=0,u=!1,v=!0,w=function(a,b){return"<strong>"+b+"</strong>"},x=function(a,b,c){return"<strong>"+c+"</strong>"},y=function(a,b,c,d){return"<h3>"+a+"</h3><p>"+d+"</p>"},z={},A=null,B=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),C="No Data Available.";b.xScale(n).yScale(o),d.orient("bottom").tickPadding(10),e.orient("left").tickPadding(10),h.axis("x"),i.axis("y");var D,E,F=function(f,g){var h=f.pos[0]+(g.offsetLeft||0),i=f.pos[1]+(g.offsetTop||0),k=f.pos[0]+(g.offsetLeft||0),l=o.range()[0]+j.top+(g.offsetTop||0),m=n.range()[0]+j.left+(g.offsetLeft||0),p=f.pos[1]+(g.offsetTop||0),q=d.tickFormat()(b.x()(f.point,f.pointIndex)),r=e.tickFormat()(b.y()(f.point,f.pointIndex));null!=w&&c.tooltip.show([k,l],w(f.series.key,q,r,f,a),"n",1,g,"x-nvtooltip"),null!=x&&c.tooltip.show([m,p],x(f.series.key,q,r,f,a),"e",1,g,"y-nvtooltip"),null!=y&&c.tooltip.show([h,i],y(f.series.key,q,r,f.point.tooltip,f,a),f.value<0?"n":"s",null,g)},G=[{key:"Magnify",disabled:!0}];return b.dispatch.on("elementMouseout.tooltip",function(a){B.tooltipHide(a),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",0),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",i.size())}),B.on("tooltipHide",function(){v&&c.tooltip.cleanup()}),a.dispatch=B,a.scatter=b,a.legend=f,a.controls=g,a.xAxis=d,a.yAxis=e,a.distX=h,a.distY=i,d3.rebind(a,b,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi"),a.margin=function(b){return arguments.length?(j.top="undefined"!=typeof b.top?b.top:j.top,j.right="undefined"!=typeof b.right?b.right:j.right,j.bottom="undefined"!=typeof b.bottom?b.bottom:j.bottom,j.left="undefined"!=typeof b.left?b.left:j.left,a):j},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),f.color(m),h.color(m),i.color(m),a):m},a.showDistX=function(b){return arguments.length?(p=b,a):p},a.showDistY=function(b){return arguments.length?(q=b,a):q},a.showControls=function(b){return arguments.length?(s=b,a):s},a.showLegend=function(b){return arguments.length?(r=b,a):r},a.fisheye=function(b){return arguments.length?(t=b,a):t},a.tooltips=function(b){return arguments.length?(v=b,a):v},a.tooltipContent=function(b){return arguments.length?(y=b,a):y},a.tooltipXContent=function(b){return arguments.length?(w=b,a):w},a.tooltipYContent=function(b){return arguments.length?(x=b,a):x},a.state=function(b){return arguments.length?(z=b,a):z},a.defaultState=function(b){return arguments.length?(A=b,a):A},a.noData=function(b){return arguments.length?(C=b,a):C},a},c.models.sparkline=function(){function a(c){return c.each(function(a){var c=f-e.left-e.right,h=g-e.top-e.bottom,n=d3.select(this);i.domain(b||d3.extent(a,k)).range([0,c]),j.domain(d||d3.extent(a,l)).range([h,0]);{var o=n.selectAll("g.nv-wrap.nv-sparkline").data([a]),p=o.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline");p.append("g"),o.select("g")}o.attr("transform","translate("+e.left+","+e.top+")");var q=o.selectAll("path").data(function(a){return[a]});q.enter().append("path"),q.exit().remove(),q.style("stroke",function(a,b){return a.color||m(a,b)}).attr("d",d3.svg.line().x(function(a,b){return i(k(a,b))}).y(function(a,b){return j(l(a,b))}));var r=o.selectAll("circle.nv-point").data(function(a){function b(b){if(-1!=b){var c=a[b];return c.pointIndex=b,c}return null}var c=a.map(function(a,b){return l(a,b)}),d=b(c.lastIndexOf(j.domain()[1])),e=b(c.indexOf(j.domain()[0])),f=b(c.length-1);return[e,d,f].filter(function(a){return null!=a})});r.enter().append("circle"),r.exit().remove(),r.attr("cx",function(a){return i(k(a,a.pointIndex))}).attr("cy",function(a){return j(l(a,a.pointIndex))}).attr("r",2).attr("class",function(a){return k(a,a.pointIndex)==i.domain()[1]?"nv-point nv-currentValue":l(a,a.pointIndex)==j.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})}),a}var b,d,e={top:2,right:0,bottom:2,left:0},f=400,g=32,h=!0,i=d3.scale.linear(),j=d3.scale.linear(),k=function(a){return a.x},l=function(a){return a.y},m=c.utils.getColor(["#000"]);return a.margin=function(b){return arguments.length?(e.top="undefined"!=typeof b.top?b.top:e.top,e.right="undefined"!=typeof b.right?b.right:e.right,e.bottom="undefined"!=typeof b.bottom?b.bottom:e.bottom,e.left="undefined"!=typeof b.left?b.left:e.left,a):e},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.x=function(b){return arguments.length?(k=d3.functor(b),a):k},a.y=function(b){return arguments.length?(l=d3.functor(b),a):l},a.xScale=function(b){return arguments.length?(i=b,a):i},a.yScale=function(b){return arguments.length?(j=b,a):j},a.xDomain=function(c){return arguments.length?(b=c,a):b},a.yDomain=function(b){return arguments.length?(d=b,a):d},a.animate=function(b){return arguments.length?(h=b,a):h},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),a):m},a},c.models.sparklinePlus=function(){function a(c){return c.each(function(m){function q(){if(!j){var a=A.selectAll(".nv-hoverValue").data(i),c=a.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);a.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove(),a.attr("transform",function(a){return"translate("+b(e.x()(m[a],a))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1),i.length&&(c.append("line").attr("x1",0).attr("y1",-f.top).attr("x2",0).attr("y2",u),c.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-f.top).attr("text-anchor","end").attr("dy",".9em"),A.select(".nv-hoverValue .nv-xValue").text(k(e.x()(m[i[0]],i[0]))),c.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-f.top).attr("text-anchor","start").attr("dy",".9em"),A.select(".nv-hoverValue .nv-yValue").text(l(e.y()(m[i[0]],i[0]))))}}function r(){function a(a,b){for(var c=Math.abs(e.x()(a[0],0)-b),d=0,f=0;f<a.length;f++)Math.abs(e.x()(a[f],f)-b)<c&&(c=Math.abs(e.x()(a[f],f)-b),d=f);return d}if(!j){var c=d3.mouse(this)[0]-f.left;i=[a(m,Math.round(b.invert(c)))],q()}}var s=d3.select(this),t=(g||parseInt(s.style("width"))||960)-f.left-f.right,u=(h||parseInt(s.style("height"))||400)-f.top-f.bottom;if(a.update=function(){a(c)},a.container=this,!m||!m.length){var v=s.selectAll(".nv-noData").data([p]);return v.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),v.attr("x",f.left+t/2).attr("y",f.top+u/2).text(function(a){return a}),a}s.selectAll(".nv-noData").remove();var w=e.y()(m[m.length-1],m.length-1);b=e.xScale(),d=e.yScale();var x=s.selectAll("g.nv-wrap.nv-sparklineplus").data([m]),y=x.enter().append("g").attr("class","nvd3 nv-wrap nv-sparklineplus"),z=y.append("g"),A=x.select("g");z.append("g").attr("class","nv-sparklineWrap"),z.append("g").attr("class","nv-valueWrap"),z.append("g").attr("class","nv-hoverArea"),x.attr("transform","translate("+f.left+","+f.top+")");var B=A.select(".nv-sparklineWrap");e.width(t).height(u),B.call(e);var C=A.select(".nv-valueWrap"),D=C.selectAll(".nv-currentValue").data([w]);D.enter().append("text").attr("class","nv-currentValue").attr("dx",o?-8:8).attr("dy",".9em").style("text-anchor",o?"end":"start"),D.attr("x",t+(o?f.right:0)).attr("y",n?function(a){return d(a)}:0).style("fill",e.color()(m[m.length-1],m.length-1)).text(l(w)),z.select(".nv-hoverArea").append("rect").on("mousemove",r).on("click",function(){j=!j}).on("mouseout",function(){i=[],q()}),A.select(".nv-hoverArea rect").attr("transform",function(){return"translate("+-f.left+","+-f.top+")"}).attr("width",t+f.left+f.right).attr("height",u+f.top)}),a}var b,d,e=c.models.sparkline(),f={top:15,right:100,bottom:10,left:50},g=null,h=null,i=[],j=!1,k=d3.format(",r"),l=d3.format(",.2f"),m=!0,n=!0,o=!1,p="No Data Available.";return a.sparkline=e,d3.rebind(a,e,"x","y","xScale","yScale","color"),a.margin=function(b){return arguments.length?(f.top="undefined"!=typeof b.top?b.top:f.top,f.right="undefined"!=typeof b.right?b.right:f.right,f.bottom="undefined"!=typeof b.bottom?b.bottom:f.bottom,f.left="undefined"!=typeof b.left?b.left:f.left,a):f},a.width=function(b){return arguments.length?(g=b,a):g},a.height=function(b){return arguments.length?(h=b,a):h},a.xTickFormat=function(b){return arguments.length?(k=b,a):k},a.yTickFormat=function(b){return arguments.length?(l=b,a):l},a.showValue=function(b){return arguments.length?(m=b,a):m},a.alignValue=function(b){return arguments.length?(n=b,a):n},a.rightAlignValue=function(b){return arguments.length?(o=b,a):o},a.noData=function(b){return arguments.length?(p=b,a):p},a},c.models.stackedArea=function(){function a(c){return c.each(function(a){var c=f-e.left-e.right,l=g-e.top-e.bottom,s=d3.select(this);b=q.xScale(),d=q.yScale(),a=a.map(function(a){return a.values=a.values.map(function(b,c){return b.index=c,b.stackedY=a.disabled?0:k(b,c),b}),a}),a=d3.layout.stack().order(n).offset(m).values(function(a){return a.values}).x(j).y(function(a){return a.stackedY}).out(function(a,b,c){a.display={y:c,y0:b}})(a);var t=s.selectAll("g.nv-wrap.nv-stackedarea").data([a]),u=t.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedarea"),v=u.append("defs"),w=u.append("g"),x=t.select("g");w.append("g").attr("class","nv-areaWrap"),w.append("g").attr("class","nv-scatterWrap"),t.attr("transform","translate("+e.left+","+e.top+")"),q.width(c).height(l).x(j).y(function(a){return a.display.y+a.display.y0}).forceY([0]).color(a.map(function(a,b){return a.color||h(a,b)}).filter(function(b,c){return!a[c].disabled}));var y=x.select(".nv-scatterWrap").datum(a.filter(function(a){return!a.disabled}));y.call(q),v.append("clipPath").attr("id","nv-edge-clip-"+i).append("rect"),t.select("#nv-edge-clip-"+i+" rect").attr("width",c).attr("height",l),x.attr("clip-path",p?"url(#nv-edge-clip-"+i+")":"");var z=d3.svg.area().x(function(a,c){return b(j(a,c))}).y0(function(a){return d(a.display.y0)}).y1(function(a){return d(a.display.y+a.display.y0)}).interpolate(o),A=d3.svg.area().x(function(a,c){return b(j(a,c))}).y0(function(a){return d(a.display.y0)}).y1(function(a){return d(a.display.y0)}),B=x.select(".nv-areaWrap").selectAll("path.nv-area").data(function(a){return a});B.enter().append("path").attr("class",function(a,b){return"nv-area nv-area-"+b}).on("mouseover",function(a,b){d3.select(this).classed("hover",!0),r.areaMouseover({point:a,series:a.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:b})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),r.areaMouseout({point:a,series:a.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:b})}).on("click",function(a,b){d3.select(this).classed("hover",!1),r.areaClick({point:a,series:a.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:b})}),B.exit().attr("d",function(a,b){return A(a.values,b)}).remove(),B.style("fill",function(a,b){return a.color||h(a,b)}).style("stroke",function(a,b){return a.color||h(a,b)}),B.attr("d",function(a,b){return z(a.values,b)}),q.dispatch.on("elementMouseover.area",function(a){x.select(".nv-chart-"+i+" .nv-area-"+a.seriesIndex).classed("hover",!0)}),q.dispatch.on("elementMouseout.area",function(a){x.select(".nv-chart-"+i+" .nv-area-"+a.seriesIndex).classed("hover",!1)})}),a}var b,d,e={top:0,right:0,bottom:0,left:0},f=960,g=500,h=c.utils.defaultColor(),i=Math.floor(1e5*Math.random()),j=function(a){return a.x},k=function(a){return a.y},l="stack",m="zero",n="default",o="linear",p=!1,q=c.models.scatter(),r=d3.dispatch("tooltipShow","tooltipHide","areaClick","areaMouseover","areaMouseout");return q.size(2.2).sizeDomain([2.2,2.2]),q.dispatch.on("elementClick.area",function(a){r.areaClick(a)}),q.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+e.left,a.pos[1]+e.top],r.tooltipShow(a)}),q.dispatch.on("elementMouseout.tooltip",function(a){r.tooltipHide(a)}),a.dispatch=r,a.scatter=q,d3.rebind(a,q,"interactive","size","xScale","yScale","zScale","xDomain","yDomain","sizeDomain","forceX","forceY","forceSize","clipVoronoi","clipRadius"),a.x=function(b){return arguments.length?(j=d3.functor(b),a):j},a.y=function(b){return arguments.length?(k=d3.functor(b),a):k},a.margin=function(b){return arguments.length?(e.top="undefined"!=typeof b.top?b.top:e.top,e.right="undefined"!=typeof b.right?b.right:e.right,e.bottom="undefined"!=typeof b.bottom?b.bottom:e.bottom,e.left="undefined"!=typeof b.left?b.left:e.left,a):e},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.clipEdge=function(b){return arguments.length?(p=b,a):p},a.color=function(b){return arguments.length?(h=c.utils.getColor(b),a):h},a.offset=function(b){return arguments.length?(m=b,a):m},a.order=function(b){return arguments.length?(n=b,a):n},a.style=function(b){if(!arguments.length)return l;switch(l=b){case"stack":a.offset("zero"),a.order("default");break;case"stream":a.offset("wiggle"),a.order("inside-out");break;case"stream-center":a.offset("silhouette"),a.order("inside-out");break;case"expand":a.offset("expand"),a.order("default")}return a},a.interpolate=function(a){return arguments.length?o=a:o},a},c.models.stackedAreaChart=function(){function a(c){return c.each(function(c){var m=d3.select(this),q=this,y=(k||parseInt(m.style("width"))||960)-j.left-j.right,z=(l||parseInt(m.style("height"))||400)-j.top-j.bottom;if(a.update=function(){m.transition().call(a)},a.container=this,s.disabled=c.map(function(a){return!!a.disabled}),!t){var A;t={};for(A in s)t[A]=s[A]instanceof Array?s[A].slice(0):s[A]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var B=m.selectAll(".nv-noData").data([u]);return B.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),B.attr("x",j.left+y/2).attr("y",j.top+z/2).text(function(a){return a
-}),a}m.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var C=m.selectAll("g.nv-wrap.nv-stackedAreaChart").data([c]),D=C.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g"),E=C.select("g");if(D.append("g").attr("class","nv-x nv-axis"),D.append("g").attr("class","nv-y nv-axis"),D.append("g").attr("class","nv-stackedWrap"),D.append("g").attr("class","nv-legendWrap"),D.append("g").attr("class","nv-controlsWrap"),o&&(h.width(y-w),E.select(".nv-legendWrap").datum(c).call(h),j.top!=h.height()&&(j.top=h.height()+h.legendBelowPadding(),z=(l||parseInt(m.style("height"))||400)-j.top-j.bottom),E.select(".nv-legendWrap").attr("transform","translate("+w+","+-j.top+")")),n){var F=[{key:"Stacked",disabled:"zero"!=e.offset()},{key:"Stream",disabled:"wiggle"!=e.offset()},{key:"Expanded",disabled:"expand"!=e.offset()}];i.width(w).color(["#444","#444","#444"]),E.select(".nv-controlsWrap").datum(F).call(i),j.top!=Math.max(i.height(),h.height())&&(j.top=Math.max(i.height(),h.height()),z=(l||parseInt(m.style("height"))||400)-j.top-j.bottom),E.select(".nv-controlsWrap").attr("transform","translate(0,"+-j.top+")")}C.attr("transform","translate("+j.left+","+j.top+")"),e.width(y).height(z);var G=E.select(".nv-stackedWrap").datum(c);G.call(e),f.scale(b).ticks(y/100).tickSize(-z,0),E.select(".nv-x.nv-axis").attr("transform","translate(0,"+z+")"),E.select(".nv-x.nv-axis").transition().duration(0).call(f),g.scale(d).ticks("wiggle"==e.offset()?0:z/36).tickSize(-y,0).setTickFormat("expand"==e.offset()?d3.format("%"):r),E.select(".nv-y.nv-axis").transition().duration(0).call(g),e.dispatch.on("areaClick.toggle",function(b){c=1===c.filter(function(a){return!a.disabled}).length?c.map(function(a){return a.disabled=!1,a}):c.map(function(a,c){return a.disabled=c!=b.seriesIndex,a}),s.disabled=c.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),h.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,a}),s.disabled=c.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),h.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,s.disabled=c.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),i.dispatch.on("legendClick",function(b){if(b.disabled){switch(F=F.map(function(a){return a.disabled=!0,a}),b.disabled=!1,b.key){case"Stacked":e.style("stack");break;case"Stream":e.style("stream");break;case"Expanded":e.style("expand")}s.style=e.style(),v.stateChange(s),a.update()}}),v.on("tooltipShow",function(a){p&&x(a,q.parentNode)}),v.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),s.disabled=b.disabled),"undefined"!=typeof b.style&&e.style(b.style),a.update()})}),a}var b,d,e=c.models.stackedArea(),f=c.models.axis(),g=c.models.axis(),h=c.models.legend(),i=c.models.legend(),j={top:30,right:25,bottom:50,left:60},k=null,l=null,m=c.utils.defaultColor(),n=!0,o=!0,p=!0,q=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" on "+b+"</p>"},r=d3.format(",.2f"),s={style:e.style()},t=null,u="No Data Available.",v=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),w=250;f.orient("bottom").tickPadding(7),g.orient("left"),e.scatter.pointActive(function(a){return!!Math.round(100*e.y()(a))});var x=function(b,d){var h=b.pos[0]+(d.offsetLeft||0),i=b.pos[1]+(d.offsetTop||0),j=f.tickFormat()(e.x()(b.point,b.pointIndex)),k=g.tickFormat()(e.y()(b.point,b.pointIndex)),l=q(b.series.key,j,k,b,a);c.tooltip.show([h,i],l,b.value<0?"n":"s",null,d)};return e.dispatch.on("tooltipShow",function(a){a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],v.tooltipShow(a)}),e.dispatch.on("tooltipHide",function(a){v.tooltipHide(a)}),v.on("tooltipHide",function(){p&&c.tooltip.cleanup()}),a.dispatch=v,a.stacked=e,a.legend=h,a.controls=i,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"x","y","size","xScale","yScale","xDomain","yDomain","sizeDomain","interactive","offset","order","style","clipEdge","forceX","forceY","forceSize","interpolate"),a.margin=function(b){return arguments.length?(j.top="undefined"!=typeof b.top?b.top:j.top,j.right="undefined"!=typeof b.right?b.right:j.right,j.bottom="undefined"!=typeof b.bottom?b.bottom:j.bottom,j.left="undefined"!=typeof b.left?b.left:j.left,a):j},a.width=function(b){return arguments.length?(k=b,a):getWidth},a.height=function(b){return arguments.length?(l=b,a):getHeight},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),h.color(m),e.color(m),a):m},a.showControls=function(b){return arguments.length?(n=b,a):n},a.showLegend=function(b){return arguments.length?(o=b,a):o},a.tooltip=function(b){return arguments.length?(q=b,a):q},a.tooltips=function(b){return arguments.length?(p=b,a):p},a.tooltipContent=function(b){return arguments.length?(q=b,a):q},a.state=function(b){return arguments.length?(s=b,a):s},a.defaultState=function(b){return arguments.length?(t=b,a):t},a.noData=function(b){return arguments.length?(u=b,a):u},g.setTickFormat=g.tickFormat,g.tickFormat=function(a){return arguments.length?(r=a,g):r},a}}(),define("nv.d3",function(){}),define("addons/stats/views",["app","api","addons/stats/resources","d3","nv.d3"],function(a,b,c){return Views={},datatypeEventer={},_.extend(datatypeEventer,Backbone.Events),Views.Legend=b.View.extend({tagName:"ul",template:"addons/stats/templates/legend",serialize:function(){return{legend_items:this.collection.toJSON()}}}),Views.Pie=b.View.extend({className:"datatype-section",template:"addons/stats/templates/pie_table",initialize:function(a){this.datatype=a.datatype},serialize:function(){return{statistics:this.collection.where({type:this.datatype}),datatype:this.datatype}},afterRender:function(){var a=(this.collection,"#"+this.datatype+"_graph"),b=_.map(this.collection.where({type:this.datatype}),function(a){var b={y:a.get("sum")||0,key:a.id};return b});b=_.filter(b,function(a){return a.y>0}),b=_.sortBy(b,function(a){return-a.y}),nv.addGraph(function(){var c=550,d=400,e=nv.models.pieChart().x(function(a){return a.key}).y(function(a){return a.y}).showLabels(!0).showLegend(!1).values(function(a){return a}).color(d3.scale.category10().range()).width(c).height(d);return d3.select(a).datum([b]).transition().duration(300).attr("width",c).attr("height",d).call(e),e}),this.$el.addClass(this.datatype+"_section")}}),Views.StatSelect=b.View.extend({className:"nav nav-tabs nav-stacked",tagName:"ul",template:"addons/stats/templates/statselect",initialize:function(){this.rows=[]},events:{"click .datatype-select":"datatype_selected"},serialize:function(){return{datatypes:_.uniq(this.collection.pluck("type"))}},afterRender:function(){this.$(".datatype-select").first().addClass("active")},datatype_selected:function(a){var b=$(a.currentTarget);a.preventDefault(),a.stopPropagation(),this.$(".datatype-select").removeClass("active"),b.addClass("active"),datatypeEventer.trigger("datatype-select",b.attr("data-type-select"))}}),Views.Statistics=b.View.extend({template:"addons/stats/templates/stats",initialize:function(){this.rows=[],datatypeEventer.on("datatype-select",this.display_datatype,this)},serialize:function(){return{datatypes:_.uniq(this.collection.pluck("type"))}},beforeRender:function(){_.each(_.uniq(this.collection.pluck("type")),function(a){this.rows[a]=this.insertView(".datatypes",new Views.Pie({collection:this.collection,datatype:a}))},this)},afterRender:function(){this.$(".datatype-section").hide().first().toggle()},display_datatype:function(a){this.$(".datatype-section").hide(),this.$("."+a+"_section").show()}}),c.Views=Views,c}),define("addons/stats/routes",["app","api","addons/stats/views"],function(a,b,c){var d=b.RouteObject.extend({layout:"with_sidebar",routes:{stats:"showStats",_stats:"showStats"},crumbs:[{name:"Statistics",link:"_stats"}],selectedHeader:"Statistics",initialize:function(){this.stats=new c.Collection,this.setView("#sidebar-content",new Views.StatSelect({collection:this.stats}))},showStats:function(){this.setView("#dashboard-content",new Views.Statistics({collection:this.stats}))},establish:function(){return[this.stats.fetch()]},apiUrl:function(){return[this.stats.url,this.stats.documentation]}});return c.RouteObjects=[d],c}),define("addons/stats/base",["app","api","addons/stats/routes"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Statistics",href:"#stats",icon:"fonticon-stats",className:"stats"})},c}),define("addons/replication/resources",["app","api","addons/activetasks/resources"],function(a){var b={};return b.DBModel=Backbone.Model.extend({label:function(){return this.get("name")}}),b.DBList=Backbone.Collection.extend({model:b.DBModel,url:function(){return a.host+"/_all_dbs"},parse:function(a){return _.map(a,function(a){return{id:a,name:a}})}}),b.Task=Backbone.Model.extend({}),b.Tasks=Backbone.Collection.extend({model:b.Task,url:function(){return a.host+"/_active_tasks"},parse:function(a){return _.filter(a,function(a){return"replication"===a.type})}}),b.Replicate=Backbone.Model.extend({documentation:"replication_doc",url:function(){return a.host+"/_replicate"}}),b}),define("addons/replication/views",["app","api","modules/fauxton/components","addons/replication/resources"],function(a,b,c,d){var e={},f={},g={rate:5,intervalId:null};return _.extend(f,Backbone.Events),e.ReplicationForm=b.View.extend({template:"addons/replication/templates/form",events:{"submit #replication":"validate","click .btn-group .btn":"showFields","click .swap":"swapFields","click .options":"toggleAdvancedOptions"},initialize:function(a){this.status=a.status,this.selectedDB=a.selectedDB,this.newRepModel=new d.Replicate({})},afterRender:function(){this.dbSearchTypeahead=new c.DbSearchTypeahead({dbLimit:30,el:"input#to_name"}),this.dbSearchTypeahead.render()},beforeRender:function(){this.insertView("#replicationStatus",new e.ReplicationList({collection:this.status}))},cleanup:function(){clearInterval(g.intervalId)},enableFields:function(){this.$el.find("input","select").attr("disabled",!1)},disableFields:function(){this.$el.find("input:hidden","select:hidden").attr("disabled",!0)},showFields:function(a){var b=this.$(a.currentTarget),c=b.val();"local"===c?b.parents(".form_set").addClass("local"):b.parents(".form_set").removeClass("local")},establish:function(){return[this.collection.fetch(),this.status.fetch()]},validate:function(a){a.preventDefault();var c;if(this.formValidation())c=b.addNotification({msg:"Please enter every field.",type:"error",clear:!0});else if(this.$("input#to_name").is(":visible")&&!this.$("input[name=create_target]").is(":checked")){var d=this.collection.where({name:this.$("input#to_name").val()});0===d.length&&(c=b.addNotification({msg:"This database doesn't exist. Check create target if you want to create it.",type:"error",clear:!0}))}else this.submit(a)},formValidation:function(){for(var a=this.$el.find("input:visible"),b=!1,c=0;c<a.length;c++)("http://"==a[c].value||""===a[c].value)&&(b=!0);return b},serialize:function(){return{databases:this.collection.toJSON(),selectedDB:this.selectedDB}},startReplication:function(a){var c=this;this.newRepModel.save(a,{success:function(a){b.addNotification({msg:"Replication from "+a.get("source")+" to "+a.get("target")+" has begun.",type:"success",clear:!0});c.updateButtonText(!1),f.trigger("update:tasks")},error:function(a,d){{var e=JSON.parse(d.responseText);b.addNotification({msg:e.reason,type:"error",clear:!0})}c.updateButtonText(!1)}}),this.enableFields()},updateButtonText:function(a){var b=this.$("#replication button[type=submit]");a?b.text("Starting replication...").attr("disabled",!0):b.text("Replication").attr("disabled",!1)},submit:function(a){this.disableFields();var b={};_.map(this.$(a.currentTarget).serializeArray(),function(a){""!==a.value&&(b[a.name]="true"===a.value?!0:a.value.replace(/\s/g,"").toLowerCase())}),this.updateButtonText(!0),this.startReplication(b)},swapFields:function(a){a.preventDefault();var b=this.$("#from_name"),c=this.$("#to_name"),d=this.$("#to_url"),e=this.$("#from_url"),f=b.val(),g=e.val(),h=c.val(),i=d.val();b.val(h),c.val(f),e.val(i),d.val(g)}}),e.ReplicationList=b.View.extend({tagName:"ul",initialize:function(){f.bind("update:tasks",this.establish,this),this.listenTo(this.collection,"reset",this.render),this.$el.prepend("<li class='header'><h4>Active Replication Tasks</h4></li>")},establish:function(){return[this.collection.fetch({reset:!0})]},setPolling:function(){var a=this;this.cleanup(),g.intervalId=setInterval(function(){a.establish()},1e3*g.rate)},cleanup:function(){clearInterval(g.intervalId)},beforeRender:function(){this.collection.forEach(function(a){this.insertView(new e.replicationItem({model:a}))},this)},showHeader:function(){this.collection.length>0?this.$el.parent().addClass("showHeader"):this.$el.parent().removeClass("showHeader")},afterRender:function(){this.showHeader(),this.setPolling()}}),e.replicationItem=b.View.extend({tagName:"li",className:"row",template:"addons/replication/templates/progress",events:{"click .cancel":"cancelReplication"},initialize:function(){this.newRepModel=new d.Replicate({})},establish:function(){return[this.model.fetch()]},cancelReplication:function(a){var c=this.$(a.currentTarget),d=c.attr("data-rep-id");this.newRepModel.save({replication_id:d,cancel:!0},{success:function(){b.addNotification({msg:"Replication stopped.",type:"success",clear:!0})},error:function(a,c){{var d=JSON.parse(c.responseText);b.addNotification({msg:d.reason,type:"error",clear:!0})}}})},afterRender:function(){this.model.get("continuous")&&this.$el.addClass("continuous")},serialize:function(){return{progress:this.model.get("progress"),target:this.model.get("target"),source:this.model.get("source"),continuous:this.model.get("continuous"),repid:this.model.get("replication_id")}}}),e}),define("addons/replication/route",["app","api","addons/replication/resources","addons/replication/views"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"one_pane",roles:["_admin"],routes:{replication:"defaultView","replication/:dbname":"defaultView"},selectedHeader:"Replication",apiUrl:function(){return[this.replication.url(),this.replication.documentation]},crumbs:[{name:"Replicate changes from: ",link:"replication"}],defaultView:function(a){this.databases=new c.DBList({}),this.tasks=new c.Tasks({id:"ReplicationTasks"}),this.replication=new c.Replicate({}),this.setView("#dashboard-content",new d.ReplicationForm({selectedDB:a||"",collection:this.databases,status:this.tasks}))}});return c.RouteObjects=[e],c}),define("addons/replication/base",["app","api","addons/replication/route"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Replication",href:"#/replication",icon:"fonticon-replicate"})},c}),define("addons/plugins/resources",["app","api"],function(a,b){var c=b.addon();return c.Hello=b.View.extend({template:"addons/plugins/templates/plugins"}),c}),define("addons/plugins/routes",["app","api","addons/plugins/resources"],function(a,b,c){var d=b.RouteObject.extend({layout:"one_pane",crumbs:[{name:"Plugins",link:"_plugins"}],routes:{_plugins:"pluginsRoute"},selectedHeader:"Plugins",roles:["_admin"],apiUrl:"plugins",initialize:function(){},pluginsRoute:function(){this.setView("#dashboard-content",new c.Hello({}))}});return c.RouteObjects=[d],c}),define("addons/plugins/base",["app","api","addons/plugins/routes"],function(a,b,c){return c.initialize=function(){},c}),define("addons/contribute/base",["jquery","lodash"],function(a){a.contribute=function(){console.log("contribute!contribute!monorail!contribute!")}}),define("addons/permissions/resources",["app","api"],function(a,b){var c=b.addon();return c.Security=Backbone.Model.extend({defaults:{admins:{names:[],roles:[]},members:{names:[],roles:[]}},isNew:function(){return!1},initialize:function(a,b){this.database=b.database},url:function(){return this.database.id+"/_security"},addItem:function(a,b,c){var d=this.get(c);return d&&d[b]?d[b].indexOf(a)>-1?{error:!0,msg:"Role/Name has already been added"}:(d[b].push(a),this.set(c,d)):{error:!0,msg:"Section "+c+"does not exist"}}}),c}),define("addons/permissions/views",["app","api","addons/permissions/resources"],function(a,b,c){var d={};return c.events=_.extend(d,Backbone.Events),c.Permissions=b.View.extend({template:"addons/permissions/templates/permissions",initialize:function(a){this.database=a.database,this.listenTo(c.events,"itemRemoved",this.itemRemoved)},itemRemoved:function(){this.model.set({admins:this.adminsView.items(),members:this.membersView.items()}),this.model.save().then(function(){b.addNotification({msg:"Database permissions has been updated."})},function(a){b.addNotification({msg:"Could not update permissions - reason: "+a.responseText,type:"error"})})},beforeRender:function(){this.adminsView=this.insertView("#sections",new c.PermissionSection({model:this.model,section:"admins",help:"Database admins can update design documents and edit the admin and member lists."})),this.membersView=this.insertView("#sections",new c.PermissionSection({model:this.model,section:"members",help:"Database members can access the database. If no members are defined, the database is public."}))},serialize:function(){return{databaseName:this.database.id}}}),c.PermissionSection=b.View.extend({template:"addons/permissions/templates/section",initialize:function(a){this.section=a.section,this.help=a.help},events:{"submit .permission-item-form":"addItem","click button.close":"removeItem"},beforeRender:function(){var a=this.model.get(this.section);this.nameViews=[],this.roleViews=[],_.each(a.names,function(a){var b=this.insertView("#"+this.section+"-items-names",new c.PermissionItem({item:a}));this.nameViews.push(b)},this),_.each(a.roles,function(a){var b=this.insertView("#"+this.section+"-items-roles",new c.PermissionItem({item:a}));this.roleViews.push(b)},this)},getItemFromView:function(a){return _.map(a,function(a){return a.item})},discardRemovedViews:function(){this.nameViews=_.filter(this.nameViews,function(a){return!a.removed}),this.roleViews=_.filter(this.roleViews,function(a){return!a.removed})},items:function(){return this.discardRemovedViews(),{names:this.getItemFromView(this.nameViews),roles:this.getItemFromView(this.roleViews)}},addItem:function(a){a.preventDefault();var c=this.$(a.currentTarget).find(".item"),d=c.val(),e=c.data("section"),f=c.data("type"),g=this,h=this.model.addItem(d,f,e);return h&&h.error?b.addNotification({msg:h.msg,type:"error"}):(this.model.save().then(function(){g.render(),b.addNotification({msg:"Database permissions has been updated."})},function(a){b.addNotification({msg:"Could not update permissions - reason: "+a.responseText,type:"error"})}),void 0)},serialize:function(){return{section:this.section,help:this.help}}}),c.PermissionItem=b.View.extend({tagName:"li",template:"addons/permissions/templates/item",initialize:function(a){this.item=a.item,this.viewsList=a.viewsList},events:{"click .close":"removeItem"},removeItem:function(a){var b=this;a.preventDefault(),this.removed=!0,c.events.trigger("itemRemoved"),this.$el.hide("fast",function(){b.remove()})},serialize:function(){return{item:this.item}}}),c}),define("addons/permissions/routes",["app","api","modules/databases/base","addons/permissions/views"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"one_pane",selectedHeader:"Databases",routes:{"database/:database/permissions":"permissions"},initialize:function(b,e,f){var g=a.getParams();g.include_docs=!0,this.databaseName=f[0],this.database=new c.Model({id:this.databaseName}),this.security=new d.Security(null,{database:this.database})},establish:function(){return[this.database.fetch(),this.security.fetch()]},permissions:function(){this.setView("#dashboard-content",new d.Permissions({database:this.database,model:this.security}))},crumbs:function(){return[{name:this.database.id,link:c.databaseUrl(this.database)},{name:"Permissions",link:"/permissions"}]}});return d.RouteObjects=[e],d}),define("addons/permissions/base",["app","api","addons/permissions/routes"],function(a,b,c){return c.initialize=function(){},c}),define("addons/compaction/resources",["app","api"],function(a,b){var c=b.addon();return c.compactDB=function(a){return $.ajax({url:a.url()+"/_compact",contentType:"application/json",type:"POST"})},c.cleanupViews=function(a){return $.ajax({url:a.url()+"/_view_cleanup",contentType:"application/json",type:"POST"})},c.compactView=function(a,b){return $.ajax({url:a.url()+"/_compact/"+b.replace("_design/",""),contentType:"application/json",type:"POST"})},c}),define("addons/compaction/views",["app","api","addons/compaction/resources"],function(a,b,c){return c.Layout=b.View.extend({template:"addons/compaction/templates/layout",initialize:function(){_.bindAll(this)},events:{"click #compact-db":"compactDB","click #compact-view":"compactDB","click #cleanup-views":"cleanupViews"},disableButton:function(a,b){this.$(a).attr("disabled","disabled").text(b)},enableButton:function(a,b){this.$(a).removeAttr("disabled").text(b)},compactDB:function(a){var d=this.enableButton;a.preventDefault(),this.disableButton("#compact-db","Compacting..."),c.compactDB(this.model).then(function(){b.addNotification({type:"success",msg:'Database compaction has started. Visit <a href="#activetasks">Active Tasks</a> to view the compaction progress.'})},function(a){console.log(arguments),b.addNotification({type:"error",msg:"Error: "+JSON.parse(a.responseText).reason})}).always(function(){d("#compact-db","Run")})},cleanupViews:function(a){var d=this.enableButton;a.preventDefault(),this.disableButton("#cleanup-view","Cleaning..."),c.cleanupViews(this.model).then(function(){b.addNotification({type:"success",msg:'View cleanup has started. Visit <a href="#activetasks">Active Tasks</a> to view progress.'})},function(a){b.addNotification({type:"error",msg:"Error: "+JSON.parse(a.responseText).reason})}).always(function(){d("#cleanup-views","Run")})}}),c.CompactView=b.View.extend({template:"addons/compaction/templates/compact_view",className:"btn btn-info btn-large pull-right",tagName:"button",initialize:function(){_.bindAll(this)},events:{click:"compact"},disableButton:function(){this.$el.attr("disabled","disabled").text("Compacting...")},enableButton:function(){this.$el.removeAttr("disabled").text("Compact View")},update:function(a,b,c){this.database=a,this.designDoc=b,this.viewName=c},compact:function(a){a.preventDefault();var d=this.enableButton;this.disableButton(),c.compactView(this.database,this.designDoc).then(function(){b.addNotification({type:"success",msg:'View compaction has started. Visit <a href="#activetasks">Active Tasks</a> to view progress.'})},function(a){b.addNotification({type:"error",msg:"Error: "+JSON.parse(a.responseText).reason})}).always(function(){d()})}}),c}),define("addons/compaction/routes",["app","api","addons/compaction/views","modules/databases/resources"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"one_pane",crumbs:function(){return[{name:this.database.id,link:d.databaseUrl(this.database)},{name:"Compact & Clean",link:"compact"}]},routes:{"database/:database/compact":"compaction"},initialize:function(a,b,c){var e=c[0];this.database=this.database||new d.Model({id:e})},compaction:function(){this.setView("#dashboard-content",new c.Layout({model:this.database}))},establish:function(){return this.database.fetch()}});return c.RouteObjects=[e],c}),define("addons/compaction/base",["app","api","addons/compaction/routes"],function(a,b,c){return c.initialize=function(){b.registerExtension("docLinks",{title:"Compact & Clean",url:"compact",icon:"icon-cogs"}),b.registerExtension("advancedOptions:ViewButton",new c.CompactView({}))},c}),define("addons/auth/resources",["app","api"],function(a,b){var c=new b.addon,d=Backbone.Model.extend({url:function(){return a.host+"/_config/admins/"+this.get("name")},isNew:function(){return!1},sync:function(a,b){var c={url:b.url(),contentType:"application/json",dataType:"json",data:JSON.stringify(b.get("value"))};return c.type="delete"===a?"DELETE":"PUT",$.ajax(c)}});return c.Session=b.Session.extend({url:"/_session",initialize:function(a){a||(a={}),this.messages=_.extend({},{missingCredentials:"Username or password cannot be blank.",passwordsNotMatch:"Passwords do not match.",incorrectCredentials:"Incorrect username or password.",loggedIn:"You have been logged in.",adminCreated:"Couchdb admin created",changePassword:"Your password has been updated."},a.messages)},isAdminParty:function(){var a=this.get("userCtx");return!a.name&&a.roles.indexOf("_admin")>-1?!0:!1},isLoggedIn:function(){var a=this.get("userCtx");return a.name?!0:!1},userRoles:function(){var a=this.user();return a&&a.roles?a.roles:[]},matchesRoles:function(a){if(0===a.length)return!0;var b=_.intersection(this.userRoles(),a).length;return b>0?!0:!1},validateUser:function(a,c,d){if(_.isEmpty(a)||_.isEmpty(c)){var e=b.Deferred();return e.rejectWith(this,[d]),e}},validatePasswords:function(a,c,d){if(_.isEmpty(a)||_.isEmpty(c)||a!==c){var e=b.Deferred();return e.rejectWith(this,[d]),e}},createAdmin:function(a,b,c){var e=this,f=this.validateUser(a,b,this.messages.missingCredentials);if(f)return f;var g=new d({name:a,value:b});return g.save().then(function(){return c?e.login(a,b):e.fetchUser({forceFetch:!0})})},login:function(a,b){var c=this.validateUser(a,b,this.messages.missingCredentials);if(c)return c;var d=this;return $.ajax({cache:!1,type:"POST",url:"/_session",dataType:"json",data:{name:a,password:b}}).then(function(){return d.fetchUser({forceFetch:!0})})},logout:function(){var a=this;return $.ajax({type:"DELETE",url:"/_session",dataType:"json",username:"_",password:"_"}).then(function(){return a.fetchUser({forceFetch:!0})})},changePassword:function(a,b){var c=this.validatePasswords(a,b,this.messages.passwordsNotMatch);if(c)return c;var e=this,f=(this.get("info"),this.get("userCtx")),g=new d({name:f.name,value:a});return g.save().then(function(){return e.login(f.name,a)})}}),c.CreateAdminView=b.View.extend({template:"addons/auth/templates/create_admin",initialize:function(a){a=a||{},this.login_after=a.login_after===!1?!1:!0},events:{"submit #create-admin-form":"createAdmin"},createAdmin:function(a){a.preventDefault();var c=this,d=this.$("#username").val(),e=this.$("#password").val(),f=this.model.createAdmin(d,e,this.login_after);f.then(function(){b.addNotification({msg:b.session.messages.adminCreated}),c.login_after?b.navigate("/"):(c.$("#username").val(""),c.$("#password").val(""))}),f.fail(function(a){b.addNotification({msg:"Could not create admin. Reason"+a+".",type:"error"})})}}),c.LoginView=b.View.extend({template:"addons/auth/templates/login",events:{"submit #login":"login"},login:function(a){a.preventDefault();var c=this.$("#username").val(),d=this.$("#password").val(),e=this.model.login(c,d);e.then(function(){b.addNotification({msg:b.session.messages.loggedIn}),b.navigate("/")}),e.fail(function(a,c,d){d=3===arguments.length?b.session.messages.incorrectCredentials:a,b.addNotification({msg:d,type:"error"})})}}),c.ChangePassword=b.View.extend({template:"addons/auth/templates/change_password",events:{"submit #change-password":"changePassword"},changePassword:function(){event.preventDefault();var a=this,c=this.$("#password").val(),d=this.$("#password-confirm").val(),e=this.model.changePassword(c,d);e.done(function(){b.addNotification({msg:b.session.messages.changePassword}),a.$("#password").val(""),a.$("#password-confirm").val("")}),e.fail(function(a,c,d){arguments.length<3&&(d=a),b.addNotification({msg:a,type:"error"})})}}),c.NavLink=b.View.extend({template:"addons/auth/templates/nav_link_title",tagName:"li",beforeRender:function(){this.listenTo(this.model,"change",this.render)},serialize:function(){return{admin_party:this.model.isAdminParty(),user:this.model.user()}}}),c.NavDropDown=b.View.extend({template:"addons/auth/templates/nav_dropdown",beforeRender:function(){this.listenTo(this.model,"change",this.render)},setTab:function(a){this.selectedTab=a,this.$(".active").removeClass("active");var b=this.$('a[data-select="'+a+'"]');b.parent().addClass("active")},afterRender:function(){this.selectedTab&&this.setTab(this.selectedTab)},serialize:function(){return{admin_party:this.model.isAdminParty(),user:this.model.user()}}}),c.NoAccessView=b.View.extend({template:"addons/auth/templates/noAccess"}),c}),define("addons/auth/routes",["app","api","addons/auth/resources"],function(a,b,c){var d=b.RouteObject.extend({layout:"one_pane",routes:{login:"login",logout:"logout",createAdmin:"createAdmin",noAccess:"noAccess"},login:function(){this.crumbs=[{name:"Login",link:"#"}],this.setView("#dashboard-content",new c.LoginView({model:b.session}))},logout:function(){b.addNotification({msg:"You have been logged out."}),b.session.logout().then(function(){b.navigate("/")})},changePassword:function(){this.crumbs=[{name:"Change Password",link:"#"}],this.setView("#dashboard-content",new c.ChangePassword({model:b.session}))},createAdmin:function(){this.crumbs=[{name:"Create Admin",link:"#"}],this.setView("#dashboard-content",new c.CreateAdminView({model:b.session}))},noAccess:function(){this.crumbs=[{name:"Access Denied",link:"#"}],this.setView("#dashboard-content",new c.NoAccessView),this.apiUrl="noAccess"}}),e=b.RouteObject.extend({layout:"with_sidebar",routes:{changePassword:{route:"changePassword",roles:["_admin","_reader","_replicator"]},addAdmin:{roles:["_admin"],route:"addAdmin"}},initialize:function(){this.navDrop=this.setView("#sidebar-content",new c.NavDropDown({model:b.session}))},changePassword:function(){this.navDrop.setTab("change-password"),this.setView("#dashboard-content",new c.ChangePassword({model:b.session}))},addAdmin:function(){this.navDrop.setTab("add-admin"),this.setView("#dashboard-content",new c.CreateAdminView({login_after:!1,model:b.session}))},crumbs:[{name:"User Management",link:"#"}]});return c.RouteObjects=[d,e],c}),define("addons/auth/base",["app","api","addons/auth/routes"],function(a,b,c){return c.session=new c.Session,b.setSession(c.session),c.initialize=function(){c.navLink=new c.NavLink({model:c.session}),b.addHeaderLink({title:"Auth",href:"#_auth",view:c.navLink,icon:"fonticon-user",bottomNav:!0,establish:[b.session.fetchUser()]});var a=function(a,b){var c=$.Deferred();return a.isAdminParty()?c.resolve():a.matchesRoles(b)?c.resolve():c.reject(),[c]},d=function(){b.navigate("/noAccess")};b.auth.registerAuth(a),b.auth.registerAuthDenied(d),b.session.on("change",function(){b.session.isLoggedIn()?b.addHeaderLink({footerNav:!0,href:"#logout",title:"Logout",icon:"",className:"logout"}):b.removeHeaderLink({title:"Logout",footerNav:!0})})},c}),define("addons/verifyinstall/resources",["app","api","modules/databases/resources","modules/documents/resources"],function(a,b,c,d){var e,f,g=b.addon(),h=new c.Model({id:"verifytestdb",name:"verifytestdb"}),i=new c.Model({id:"verifytestdb_replicate",name:"verifytestdb_replicate"});return g.testProcess={saveDoc:function(){return e=new d.Doc({_id:"test_doc_1",a:1},{database:h}),e.save()},destroyDoc:function(){return e.destroy()},updateDoc:function(){return e.set({b:"hello"}),e.save()},saveDB:function(){return h.save()},setupDB:function(a){var c=b.Deferred();return a.fetch().then(function(){return a.destroy()},function(){c.resolve()}).then(function(){c.resolve()},function(a,b,d){"Unauthorized"===d&&c.reject(a,b,d)}),c},setup:function(){return b.when([this.setupDB(h),this.setupDB(i)])},testView:function(){var a=b.Deferred(),c=$.get(f.url()+"/_view/testview");return c.then(function(b){var c=JSON.parse(b).rows[0];if(6===c.value)return a.resolve();var d={reason:"Values expect 6, got "+c.value};a.reject({responseText:JSON.stringify(d)})},a.reject),a},setupView:function(){var a=new d.Doc({_id:"test_doc10",a:1},{database:h}),c=new d.Doc({_id:"test_doc_20",a:2},{database:h}),e=new d.Doc({_id:"test_doc_30",a:3},{database:h});return f=new d.Doc({_id:"_design/view_check",views:{testview:{map:"function (doc) { emit(doc._id, doc.a); }",reduce:"_sum"}}},{database:h}),b.when([a.save(),c.save(),e.save(),f.save()])
-},setupReplicate:function(){return $.ajax({url:"/_replicate",contentType:"application/json",type:"POST",dataType:"json",processData:!1,data:JSON.stringify({create_target:!0,source:"verifytestdb",target:"verifytestdb_replicate"})})},testReplicate:function(){var a=b.Deferred(),c=i.fetch();return c.then(function(){var b=i.get("doc_count");if(4===b)return a.resolve(),void 0;var c={reason:"Replication Failed, expected 4 docs got "+b};a.reject({responseText:JSON.stringify(c)})},a.reject),a},removeDBs:function(){i.destroy(),h.destroy()}},g}),define("addons/verifyinstall/views",["app","api","addons/verifyinstall/resources"],function(a,b,c){return c.Main=b.View.extend({template:"addons/verifyinstall/templates/main",events:{"click #start":"startTest"},initialize:function(){_.bindAll(this)},setPass:function(a){this.$("#"+a).html("&#10003;")},setError:function(a,c){this.$("#"+a).html("&#x2717;"),b.addNotification({msg:"Error: "+c,type:"error",selector:"#error"})},complete:function(){b.addNotification({msg:"Success! You Couchdb install is working. Time to Relax",type:"success",selector:"#error"})},enableButton:function(){this.$("#start").removeAttr("disabled").text("Verify Installation")},disableButton:function(){this.$("#start").attr("disabled","disabled").text("Verifying")},formatError:function(a){var b=this.enableButton,c=this.setError;return function(d){b(),d&&c(a,JSON.parse(d.responseText).reason)}},startTest:function(){this.disableButton(),this.$(".status").text("");var a=c.testProcess,b=this.setPass,d=this.complete,e=(this.setError,this.formatError);a.setup().then(function(){return a.saveDB()},e("create-database")).then(function(){return b("create-database"),a.saveDoc()},e("create-document")).then(function(){return b("create-document"),a.updateDoc()},e("update-document")).then(function(){return b("update-document"),a.destroyDoc()},e("delete-document")).then(function(){return b("delete-document"),a.setupView()},e("create-view")).then(function(){return a.testView()},e("create-view")).then(function(){return b("create-view"),a.setupReplicate()},e("create-view")).then(function(){return a.testReplicate()},e("replicate")).then(function(){b("replicate"),d(),a.removeDBs()},e("replicate")),this.enableButton()}}),c}),define("addons/verifyinstall/routes",["app","api","addons/verifyinstall/views"],function(a,b,c){var d=b.RouteObject.extend({layout:"one_pane",routes:{verifyinstall:"verifyInstall"},selectedHeader:"Verify",verifyInstall:function(){this.setView("#dashboard-content",new c.Main({}))},crumbs:[{name:"Verify Couchdb Installation",link:"#"}]});return c.RouteObjects=[d],c}),define("addons/verifyinstall/base",["app","api","addons/verifyinstall/routes"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Verify",href:"#verifyinstall",icon:"fonticon-circle-check",bottomNav:!0})},c}),define("load_addons",["addons/activetasks/base","addons/config/base","addons/logs/base","addons/stats/base","addons/replication/base","addons/plugins/base","addons/contribute/base","addons/permissions/base","addons/compaction/base","addons/auth/base","addons/verifyinstall/base"],function(){var a={addons:arguments};return a}),define("router",["require","app","initialize","api","modules/fauxton/base","modules/fauxton/layout","modules/databases/base","modules/documents/base","modules/pouchdb/base","load_addons"],function(a,b,c,d,e,f,g,h,i,j){var k=[g,h],l={},m=b.router=Backbone.Router.extend({routes:{},beforeUnload:function(a,b){l[a]=b},removeBeforeUnload:function(a){delete l[a]},navigate:function(a,b){var c=!0,d=_.find(_.map(l,function(a){return a()}),function(a){return a?!0:void 0});d&&(c=window.confirm(d)),c&&Backbone.Router.prototype.navigate(a,b)},addModuleRouteObject:function(a){var c=this,e=this.masterLayout,f=a.prototype.getRouteUrls();_.each(f,function(f){this.route(f,f.toString(),function(){var g=Array.prototype.slice.call(arguments),h=a.prototype.getRouteRoles(f),i=b.auth.checkAccess(h);i.then(function(){c.activeRouteObject&&c.activeRouteObject.hasRoute(f)||(c.activeRouteObject&&c.activeRouteObject.removeViews(),c.activeRouteObject=new a(f,e,g));var b=c.activeRouteObject;b.routeCallback(f,g),b.renderWith(f,e,g)},function(){d.auth.authDeniedCb()})})},this)},setModuleRoutes:function(){_.each(k,function(a){a&&_.each(a.RouteObjects,this.addModuleRouteObject,this)},this),_.each(j.addons,function(a){a&&(a.initialize(),a.RouteObjects&&_.each(a.RouteObjects,this.addModuleRouteObject,this))},this)},initialize:function(){this.navBar=b.navBar=new e.NavBar,this.apiBar=b.apiBar=new e.ApiBar,this.auth=b.auth=d.auth,b.session=d.session,b.masterLayout=this.masterLayout=new f(this.navBar,this.apiBar),b.footer=new e.Footer({el:"#footer-content"}),this.setModuleRoutes(),$("#app-container").html(this.masterLayout.el),this.masterLayout.render(),$.when.apply(null,b.footer.establish()).done(function(){b.footer.render()})},triggerRouteEvent:function(a,b){if(this.activeRouteObject){var c=[a].concat(b);this.activeRouteObject.trigger.apply(this.activeRouteObject,c),this.activeRouteObject.renderWith(c,this.masterLayout,b)}}});return m}),require(["app","router"],function(a,b){a.router=new b,Backbone.history.start({pushState:!1,root:a.root}),$(document).on("click","a:not([data-bypass])",function(b){var c={prop:$(this).prop("href"),attr:$(this).attr("href")},d=location.protocol+"//"+location.host+a.root;c.prop&&c.prop.slice(0,d.length)===d&&(b.preventDefault(),a.router.navigate(c.attr,!0))})}),define("main",function(){}),require.config({deps:["main"],paths:{libs:"../assets/js/libs",plugins:"../assets/js/plugins",jquery:"../assets/js/libs/jquery",lodash:"../assets/js/libs/lodash",backbone:"../assets/js/libs/backbone","backbone.layoutmanger":"../assets/js/plugins/backbone.layoutmanager",bootstrap:"../assets/js/libs/bootstrap",spin:"../assets/js/libs/spin.min",d3:"../assets/js/libs/d3","nv.d3":"../assets/js/libs/nv.d3",ace:"../assets/js/libs/ace"},baseUrl:"/",map:{"*":{underscore:"lodash"}},shim:{backbone:{deps:["lodash","jquery"],exports:"Backbone"},bootstrap:{deps:["jquery"],exports:"Bootstrap"},"plugins/prettify":[],"plugins/jquery.form":["jquery"]}}),define("config",function(){}); \ No newline at end of file
diff --git a/share/www/favicon.ico b/share/www/favicon.ico
deleted file mode 100644
index ed3f7aa7c..000000000
--- a/share/www/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/share/www/image/add.png b/share/www/image/add.png
deleted file mode 100644
index 34e8c7d76..000000000
--- a/share/www/image/add.png
+++ /dev/null
Binary files differ
diff --git a/share/www/image/apply.gif b/share/www/image/apply.gif
deleted file mode 100644
index 63de0d538..000000000
--- a/share/www/image/apply.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/bg.png b/share/www/image/bg.png
deleted file mode 100644
index ec8152448..000000000
--- a/share/www/image/bg.png
+++ /dev/null
Binary files differ
diff --git a/share/www/image/cancel.gif b/share/www/image/cancel.gif
deleted file mode 100644
index 4329076e0..000000000
--- a/share/www/image/cancel.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/compact.png b/share/www/image/compact.png
deleted file mode 100644
index ea8985dcd..000000000
--- a/share/www/image/compact.png
+++ /dev/null
Binary files differ
diff --git a/share/www/image/delete-mini.png b/share/www/image/delete-mini.png
deleted file mode 100644
index ad5588d99..000000000
--- a/share/www/image/delete-mini.png
+++ /dev/null
Binary files differ
diff --git a/share/www/image/delete.png b/share/www/image/delete.png
deleted file mode 100644
index e83840176..000000000
--- a/share/www/image/delete.png
+++ /dev/null
Binary files differ
diff --git a/share/www/image/grippie.gif b/share/www/image/grippie.gif
deleted file mode 100644
index a8807896d..000000000
--- a/share/www/image/grippie.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/hgrad.gif b/share/www/image/hgrad.gif
deleted file mode 100644
index 08aa80ca8..000000000
--- a/share/www/image/hgrad.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/key.png b/share/www/image/key.png
deleted file mode 100644
index e04ed108b..000000000
--- a/share/www/image/key.png
+++ /dev/null
Binary files differ
diff --git a/share/www/image/load.png b/share/www/image/load.png
deleted file mode 100644
index 07b4f7915..000000000
--- a/share/www/image/load.png
+++ /dev/null
Binary files differ
diff --git a/share/www/image/logo.png b/share/www/image/logo.png
deleted file mode 100644
index d21ac025b..000000000
--- a/share/www/image/logo.png
+++ /dev/null
Binary files differ
diff --git a/share/www/image/order-asc.gif b/share/www/image/order-asc.gif
deleted file mode 100644
index d2a237aec..000000000
--- a/share/www/image/order-asc.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/order-desc.gif b/share/www/image/order-desc.gif
deleted file mode 100644
index 1043b499a..000000000
--- a/share/www/image/order-desc.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/path.gif b/share/www/image/path.gif
deleted file mode 100644
index 01ec717e3..000000000
--- a/share/www/image/path.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/progress.gif b/share/www/image/progress.gif
deleted file mode 100644
index d84f65378..000000000
--- a/share/www/image/progress.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/rarrow.png b/share/www/image/rarrow.png
deleted file mode 100644
index 507e87e7a..000000000
--- a/share/www/image/rarrow.png
+++ /dev/null
Binary files differ
diff --git a/share/www/image/run-mini.png b/share/www/image/run-mini.png
deleted file mode 100644
index b2fcbd820..000000000
--- a/share/www/image/run-mini.png
+++ /dev/null
Binary files differ
diff --git a/share/www/image/run.png b/share/www/image/run.png
deleted file mode 100644
index a1d79f651..000000000
--- a/share/www/image/run.png
+++ /dev/null
Binary files differ
diff --git a/share/www/image/running.png b/share/www/image/running.png
deleted file mode 100644
index 9b50cd673..000000000
--- a/share/www/image/running.png
+++ /dev/null
Binary files differ
diff --git a/share/www/image/save.png b/share/www/image/save.png
deleted file mode 100644
index a04e4bcc9..000000000
--- a/share/www/image/save.png
+++ /dev/null
Binary files differ
diff --git a/share/www/image/sidebar-toggle.png b/share/www/image/sidebar-toggle.png
deleted file mode 100644
index 3ea32ffee..000000000
--- a/share/www/image/sidebar-toggle.png
+++ /dev/null
Binary files differ
diff --git a/share/www/image/spinner.gif b/share/www/image/spinner.gif
deleted file mode 100644
index 6239655e8..000000000
--- a/share/www/image/spinner.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/spinner_33.gif b/share/www/image/spinner_33.gif
deleted file mode 100644
index 5ad519273..000000000
--- a/share/www/image/spinner_33.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/spinner_6b.gif b/share/www/image/spinner_6b.gif
deleted file mode 100644
index 4e3d97255..000000000
--- a/share/www/image/spinner_6b.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/test_failure.gif b/share/www/image/test_failure.gif
deleted file mode 100644
index 2a873b244..000000000
--- a/share/www/image/test_failure.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/test_success.gif b/share/www/image/test_success.gif
deleted file mode 100644
index 6df8bae29..000000000
--- a/share/www/image/test_success.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/thead-key.gif b/share/www/image/thead-key.gif
deleted file mode 100644
index 42a43b583..000000000
--- a/share/www/image/thead-key.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/thead.gif b/share/www/image/thead.gif
deleted file mode 100644
index 1587b1f2f..000000000
--- a/share/www/image/thead.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/toggle-collapse.gif b/share/www/image/toggle-collapse.gif
deleted file mode 100644
index f0979304a..000000000
--- a/share/www/image/toggle-collapse.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/toggle-expand.gif b/share/www/image/toggle-expand.gif
deleted file mode 100644
index 03fa8360d..000000000
--- a/share/www/image/toggle-expand.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/image/twisty.gif b/share/www/image/twisty.gif
deleted file mode 100644
index 5ba57a1ad..000000000
--- a/share/www/image/twisty.gif
+++ /dev/null
Binary files differ
diff --git a/share/www/index.html b/share/www/index.html
deleted file mode 100644
index ecbe8ddc2..000000000
--- a/share/www/index.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<!DOCTYPE html>
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<html lang="en">
- <head>
- <title>Overview</title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <link rel="stylesheet" href="style/layout.css?0.11.0" type="text/css">
- <script src="script/json2.js"></script>
- <script src="script/sha1.js"></script>
- <script src="script/jquery.js"></script>
- <script src="script/jquery.couch.js"></script>
- <script src="script/jquery.dialog.js"></script>
- <script src="script/futon.js"></script>
- <script src="script/futon.browse.js"></script>
- <script src="script/futon.format.js"></script>
- <script>
- var page = new $.futon.CouchIndexPage();
- $(document).ready(function() {
- if (!/index\.html$/.test(location.pathname)) {
- $.futon.navigation.ready(function() {
- this.updateSelection(location.pathname + "index.html");
- });
- }
- var dbsPerPage = parseInt($.futon.storage.get("per_page"));
- if (dbsPerPage) $("#perpage").val(dbsPerPage);
- $("#perpage").change(function() {
- page.updateDatabaseListing();
- $.futon.storage.set("per_page", this.value);
- });
-
- page.updateDatabaseListing();
-
- $("#toolbar button.add").click(function() {
- page.addDatabase();
- });
- });
- </script>
- </head>
- <body>
- <div id="wrap">
- <h1><strong>Overview</strong></h1>
- <div id="content">
- <ul id="toolbar">
- <li><button class="add">Create Database …</button></li>
- </ul>
-
- <table class="listing" id="databases" cellspacing="0">
- <caption>Databases</caption>
- <thead>
- <tr>
- <th>Name</th>
- <th class="size">Size</th>
- <th class="count">Number of Documents</th>
- <th class="seq">Update Seq</th>
- </tr>
- </thead>
- <tbody class="content">
- </tbody>
- <tbody class="footer">
- <tr>
- <td colspan="5">
- <div id="paging">
- <a class="prev">← Previous Page</a> |
- <label>Rows per page: <select id="perpage">
- <option selected>10</option>
- <option>25</option>
- <option>50</option>
- <option>100</option>
- </select></label> |
- <a class="next">Next Page →</a>
- </div>
- <span></span>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
-
- </div>
- </body>
-</html>
diff --git a/share/www/plugins.html b/share/www/plugins.html
deleted file mode 100644
index 7f8da53c2..000000000
--- a/share/www/plugins.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<!DOCTYPE html>
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<html lang="en">
- <head>
- <title>Plugins</title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <link rel="stylesheet" href="style/layout.css?0.11.0" type="text/css">
- <script src="script/json2.js"></script>
- <script src="script/sha1.js"></script>
- <script src="script/jquery.js"></script>
- <script src="script/jquery.couch.js"></script>
- <script src="script/jquery.dialog.js"></script>
- <script src="script/futon.js"></script>
- </head>
- <body><div id="wrap">
- <h1>
- <a href="index.html">Overview</a>
- <strong>Plugins</strong>
- </h1>
- <div id="content">
- <div class="row">
- <h2>GeoCouch</h2>
- <p>Version: <strong>couchdb1.2.x_v0.3.0-11-g66e6219</strong></p>
- <p>Author: Volker Mische</p>
- <p>
- Available Erlang Versions:
- <ul>
- <li>CouchDB 1.4.0-XXX R15B01</li>
- </ul>
- </p>
- <p>
- <button href="#" class="install-plugin" data-url="http://people.apache.org/~jan" data-checksums='{"1.4.0": {"R15B03":"D5QPhrJTAifM42DXqAj4RxzfEtI="}}' data-name="geocouch" data-version="couchdb1.2.x_v0.3.0-16-g66e6219">Install GeoCouch Now</button>
- </p>
- </div>
- <div class="row">
- <h2>CouchPerUser</h2>
- <p>Version: <strong>1.0.0</strong></p>
- <p>Author: Bob Ippolito</p>
- <p>
- Available Erlang Versions:
- <ul>
- <li>CouchDB 1.4.0-XXX R15B01</li>
- </ul>
- </p>
- <p>
- <button href="#" class="install-plugin" data-url="http://people.apache.org/~jan" data-checksums='{"1.4.0": {"R15B03":"Aj3mjC6M75NA62q5/xkP0tl8Hws="}}' data-name="couchperuser" data-version="1.0.0">Install CouchPerUser Now</button>
- </p>
- </div>
- </div>
- </div></body>
- <script>
- $('.install-plugin').each(function() {
- var button = $(this);
- var name = button.data('name');
- var version = button.data('version');
- $.get("/_config/plugins/" + name + "/", function(body, textStatus) {
- body = JSON.parse(body);
- if(body == version) {
- button.html('Already Installed. Click to Uninstall');
- button.data('delete', true);
- } else {
- button.html('Other Version Installed: ' + body);
- button.attr('disabled', true);
- }
- });
- });
-
- $('.install-plugin').click(function(event) {
- var button = $(this);
- var delete_plugin = button.data('delete') || false;
- var plugin_spec = JSON.stringify({
- name: button.data('name'),
- url: button.data('url'),
- version: button.data('version'),
- checksums: button.data('checksums'),
- "delete": delete_plugin
- });
- var url = '/_plugins'
- $.ajax({
- url: url,
- type: 'POST',
- data: plugin_spec,
- contentType: 'application/json', // what we send to the server
- dataType: 'json', // expected from the server
- processData: false, // keep our precious JSON
- success: function(data, textStatus, jqXhr) {
- if(textStatus == "success") {
- var action = delete_plugin ? 'Uninstalled' : 'Installed';
- button.html('Sucessfully ' + action);
- button.attr('disabled', true);
- } else {
- button.html(textStatus);
- }
- },
- beforeSend: function(xhr) {
- xhr.setRequestHeader('Accept', 'application/json');
- },
- });
- });
- </script>
- <style type="text/css">
- .row {
- background-color: #EEE;
- padding:1em;
- margin-bottom:1em;
- }
- </style>
-</html>
diff --git a/share/www/replicator.html b/share/www/replicator.html
deleted file mode 100644
index eb6ecc076..000000000
--- a/share/www/replicator.html
+++ /dev/null
@@ -1,184 +0,0 @@
-<!DOCTYPE html>
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<html lang="en">
- <head>
- <title>Replicator</title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <link rel="stylesheet" href="style/layout.css?0.11.0" type="text/css">
- <link rel="stylesheet" href="style/jquery-ui-1.8.11.custom.css" type="text/css">
- <script src="script/json2.js"></script>
- <script src="script/sha1.js"></script>
- <script src="script/jquery.js"></script>
- <script src="script/jquery.couch.js"></script>
- <script src="script/jquery.dialog.js"></script>
- <script src="script/futon.js"></script>
- <script src="script/jquery-ui-1.8.11.custom.min.js"></script>
- <script>
- $(document).ready(function() {
- var allDatabases;
-
- $("fieldset input[type=radio]").click(function() {
- var radio = this;
- var fieldset = $(this).parents("fieldset").get(0);
- $("input[type=text]", fieldset).each(function() {
- this.disabled = radio.value == "local";
- if (!this.disabled) this.focus();
- });
- $('.local', fieldset).each(function() {
- this.disabled = radio.value == "remote";
- if (!this.disabled) this.focus();
- });
- });
-
- var getDatabases = function() {
- $.couch.allDbs({
- success: function(dbs) {
- allDatabases = dbs.sort();
-
- $("fieldset select").each(function() {
- var select = this;
- $.each(dbs, function(idx, dbName) {
- $("<option></option>").text(dbName).appendTo(select);
- });
- select.selectedIndex = 0;
- });
-
- $('#to_name').autocomplete({ source: dbs });
- }
- });
- };
- getDatabases();
-
- $("button#swap").click(function() {
- var fromName = $("#source select").val();
- $("#source select").val($("#target select").val());
- $("#target select").val(fromName);
-
- var fromUrl = $("#source input[type=text]").val();
- $("#source input[type=text]").val($("#target input[type=text]").val());
- $("#target input[type=text]").val(fromUrl);
-
- var fromType = $("#source input[type=radio]").filter(function() {
- return this.checked;
- }).val();
- var toType = $("#target input[type=radio]").filter(function() {
- return this.checked;
- }).val();
- $("#source input[value=" + toType + "]").click();
- $("#target input[value=" + fromType + "]").click();
-
- $("#replicate").get(0).focus();
- return false;
- });
-
- $("button#replicate").click(function() {
- $("#records tbody.content").empty();
- var targetIsLocal = $('#to_local:checked').length > 0;
- var source = $("#from_local")[0].checked ? $("#from_name").val() : $("#from_url").val();
- var target = targetIsLocal ? $("#to_name").val() : $("#to_url").val();
- var repOpts = {};
-
- if (targetIsLocal && $.inArray(target, allDatabases) < 0) {
- if(!confirm('This will create a database named '+target+'. Ok?')) {
- return;
- }
- else {
- repOpts.create_target = true;
- }
- }
-
- if ($("#continuous")[0].checked) {
- repOpts.continuous = true;
- }
- $.couch.replicate(source, target, {
- success: function(resp) {
- if (resp._local_id) {
- $("<tr><th></th></tr>")
- .find("th").text(JSON.stringify(resp)).end()
- .appendTo("#records tbody.content");
- $("#records tbody tr").removeClass("odd").filter(":odd").addClass("odd");
- } else {
- $.each(resp.history, function(idx, record) {
- $("<tr><th></th></tr>")
- .find("th").text(JSON.stringify(record)).end()
- .appendTo("#records tbody.content");
- });
- $("#records tbody tr").removeClass("odd").filter(":odd").addClass("odd");
- $("#records tbody.footer td").text("Replication session " + resp.session_id);
-
- if (repOpts.create_target) {
- getDatabases();
- }
- }
- }
- }, repOpts);
- });
- });
- </script>
- </head>
- <body><div id="wrap">
- <h1>
- <a href="index.html">Overview</a>
- <strong>Replicator</strong>
- </h1>
- <div id="content">
-
- <form id="replicator">
- <fieldset id="source">
- <legend>Replicate changes from:</legend>
- <p>
- <input type="radio" id="from_local" name="from_type" value="local" checked>
- <label for="from_local">Local Database: </label>
- <select id="from_name" name="from_name" class="local"></select>
- </p><p>
- <input type="radio" id="from_to_remote" name="from_type" value="remote">
- <label for="from_to_remote">Remote database: </label>
- <input type="text" id="from_url" name="from_url" size="30" value="http://" disabled>
- </p>
- </fieldset>
- <p class="swap"><button id="swap" tabindex="99">⇄</button></p>
- <fieldset id="target">
- <legend>to:</legend>
- <p>
- <input type="radio" id="to_local" name="to_type" value="local" checked>
- <label for="to_local">Local database: </label>
- <input type="text" id="to_name" name="to_name" class="local"></select>
- </p><p>
- <input type="radio" id="to_remote" name="to_type" value="remote">
- <label for="to_remote">Remote database: </label>
- <input type="text" id="to_url" name="to_url" size="30" value="http://" disabled>
- </p>
- </fieldset>
- <p class="actions">
- <label><input type="checkbox" name="continuous" value="continuous" id="continuous"> Continuous</label>
- <button id="replicate" type="button">Replicate</button>
- </p>
- </form>
-
- <table id="records" class="listing" cellspacing="0">
- <caption>Replication History</caption>
- <thead><tr>
- <th>Event</th>
- </tr></thead>
- <tbody class="content"></tbody>
- <tbody class="footer"><tr>
- <td colspan="4">No replication</td>
- </tr></tbody>
- </table>
-
- </div>
- </div></body>
-</html>
diff --git a/share/www/script/base64.js b/share/www/script/base64.js
deleted file mode 100644
index e0aab3039..000000000
--- a/share/www/script/base64.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/* Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp>
- * Version: 1.0
- * LastModified: Dec 25 1999
- * This library is free. You can redistribute it and/or modify it.
- */
- /* Modified by Chris Anderson to not use CommonJS */
- /* Modified by Dan Webb not to require Narwhal's binary library */
-
-var Base64 = {};
-(function(exports) {
-
- var encodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
- var decodeChars = [
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
- -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
- -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1
- ];
-
- exports.encode = function (str) {
- var out, i, length;
- var c1, c2, c3;
-
- length = len(str);
- i = 0;
- out = [];
- while(i < length) {
- c1 = str.charCodeAt(i++) & 0xff;
- if(i == length)
- {
- out.push(encodeChars.charCodeAt(c1 >> 2));
- out.push(encodeChars.charCodeAt((c1 & 0x3) << 4));
- out.push("=".charCodeAt(0));
- out.push("=".charCodeAt(0));
- break;
- }
- c2 = str.charCodeAt(i++);
- if(i == length)
- {
- out.push(encodeChars.charCodeAt(c1 >> 2));
- out.push(encodeChars.charCodeAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4)));
- out.push(encodeChars.charCodeAt((c2 & 0xF) << 2));
- out.push("=".charCodeAt(0));
- break;
- }
- c3 = str.charCodeAt(i++);
- out.push(encodeChars.charCodeAt(c1 >> 2));
- out.push(encodeChars.charCodeAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4)));
- out.push(encodeChars.charCodeAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6)));
- out.push(encodeChars.charCodeAt(c3 & 0x3F));
- }
-
- var str = "";
- out.forEach(function(chr) { str += String.fromCharCode(chr) });
- return str;
- };
-
- exports.decode = function (str) {
- var c1, c2, c3, c4;
- var i, length, out;
-
- length = len(str);
- i = 0;
- out = [];
- while(i < length) {
- /* c1 */
- do {
- c1 = decodeChars[str.charCodeAt(i++) & 0xff];
- } while(i < length && c1 == -1);
- if(c1 == -1)
- break;
-
- /* c2 */
- do {
- c2 = decodeChars[str.charCodeAt(i++) & 0xff];
- } while(i < length && c2 == -1);
- if(c2 == -1)
- break;
-
- out.push(String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4)));
-
- /* c3 */
- do {
- c3 = str.charCodeAt(i++) & 0xff;
- if(c3 == 61)
- return out.join('');
- c3 = decodeChars[c3];
- } while(i < length && c3 == -1);
- if(c3 == -1)
- break;
-
- out.push(String.fromCharCode(((c2 & 0xF) << 4) | ((c3 & 0x3C) >> 2)));
-
- /* c4 */
- do {
- c4 = str.charCodeAt(i++) & 0xff;
- if(c4 == 61)
- return out.join('');
- c4 = decodeChars[c4];
- } while(i < length && c4 == -1);
-
- if(c4 == -1)
- break;
-
- out.push(String.fromCharCode(((c3 & 0x03) << 6) | c4));
- }
-
- return out.join('');
- };
-
- var len = function (object) {
- if (object.length !== undefined) {
- return object.length;
- } else if (object.getLength !== undefined) {
- return object.getLength();
- } else {
- return undefined;
- }
- };
-})(Base64);
diff --git a/share/www/script/couch.js b/share/www/script/couch.js
deleted file mode 100644
index 7e4eeed73..000000000
--- a/share/www/script/couch.js
+++ /dev/null
@@ -1,520 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// A simple class to represent a database. Uses XMLHttpRequest to interface with
-// the CouchDB server.
-
-function CouchDB(name, httpHeaders) {
- this.name = name;
- this.uri = "/" + encodeURIComponent(name) + "/";
-
- // The XMLHttpRequest object from the most recent request. Callers can
- // use this to check result http status and headers.
- this.last_req = null;
-
- this.request = function(method, uri, requestOptions) {
- requestOptions = requestOptions || {};
- requestOptions.headers = combine(requestOptions.headers, httpHeaders);
- return CouchDB.request(method, uri, requestOptions);
- };
-
- // Creates the database on the server
- this.createDb = function() {
- this.last_req = this.request("PUT", this.uri);
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- // Deletes the database on the server
- this.deleteDb = function() {
- this.last_req = this.request("DELETE", this.uri + "?sync=true");
- if (this.last_req.status == 404) {
- return false;
- }
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- // Save a document to the database
- this.save = function(doc, options, http_headers) {
- if (doc._id == undefined) {
- doc._id = CouchDB.newUuids(1)[0];
- }
- http_headers = http_headers || {};
- this.last_req = this.request("PUT", this.uri +
- encodeURIComponent(doc._id) + encodeOptions(options),
- {body: JSON.stringify(doc), headers: http_headers});
- CouchDB.maybeThrowError(this.last_req);
- var result = JSON.parse(this.last_req.responseText);
- doc._rev = result.rev;
- return result;
- };
-
- // Open a document from the database
- this.open = function(docId, url_params, http_headers) {
- this.last_req = this.request("GET", this.uri + encodeURIComponent(docId)
- + encodeOptions(url_params), {headers:http_headers});
- if (this.last_req.status == 404) {
- return null;
- }
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- // Deletes a document from the database
- this.deleteDoc = function(doc) {
- this.last_req = this.request("DELETE", this.uri + encodeURIComponent(doc._id)
- + "?rev=" + doc._rev);
- CouchDB.maybeThrowError(this.last_req);
- var result = JSON.parse(this.last_req.responseText);
- doc._rev = result.rev; //record rev in input document
- doc._deleted = true;
- return result;
- };
-
- // Deletes an attachment from a document
- this.deleteDocAttachment = function(doc, attachment_name) {
- this.last_req = this.request("DELETE", this.uri + encodeURIComponent(doc._id)
- + "/" + attachment_name + "?rev=" + doc._rev);
- CouchDB.maybeThrowError(this.last_req);
- var result = JSON.parse(this.last_req.responseText);
- doc._rev = result.rev; //record rev in input document
- return result;
- };
-
- this.bulkSave = function(docs, options) {
- // first prepoulate the UUIDs for new documents
- var newCount = 0;
- for (var i=0; i<docs.length; i++) {
- if (docs[i]._id == undefined) {
- newCount++;
- }
- }
- var newUuids = CouchDB.newUuids(newCount);
- var newCount = 0;
- for (var i=0; i<docs.length; i++) {
- if (docs[i]._id == undefined) {
- docs[i]._id = newUuids.pop();
- }
- }
- var json = {"docs": docs};
- // put any options in the json
- for (var option in options) {
- json[option] = options[option];
- }
- this.last_req = this.request("POST", this.uri + "_bulk_docs", {
- body: JSON.stringify(json)
- });
- if (this.last_req.status == 417) {
- return {errors: JSON.parse(this.last_req.responseText)};
- }
- else {
- CouchDB.maybeThrowError(this.last_req);
- var results = JSON.parse(this.last_req.responseText);
- for (var i = 0; i < docs.length; i++) {
- if(results[i] && results[i].rev && results[i].ok) {
- docs[i]._rev = results[i].rev;
- }
- }
- return results;
- }
- };
-
- this.ensureFullCommit = function() {
- this.last_req = this.request("POST", this.uri + "_ensure_full_commit");
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- // Applies the map function to the contents of database and returns the results.
- this.query = function(mapFun, reduceFun, options, keys, language) {
- var body = {language: language || "javascript"};
- if(keys) {
- body.keys = keys ;
- }
- if (typeof(mapFun) != "string") {
- mapFun = mapFun.toSource ? mapFun.toSource() : "(" + mapFun.toString() + ")";
- }
- body.map = mapFun;
- if (reduceFun != null) {
- if (typeof(reduceFun) != "string") {
- reduceFun = reduceFun.toSource ?
- reduceFun.toSource() : "(" + reduceFun.toString() + ")";
- }
- body.reduce = reduceFun;
- }
- if (options && options.options != undefined) {
- body.options = options.options;
- delete options.options;
- }
- this.last_req = this.request("POST", this.uri + "_temp_view"
- + encodeOptions(options), {
- headers: {"Content-Type": "application/json"},
- body: JSON.stringify(body)
- });
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- this.view = function(viewname, options, keys) {
- var viewParts = viewname.split('/');
- var viewPath = this.uri + "_design/" + viewParts[0] + "/_view/"
- + viewParts[1] + encodeOptions(options);
- if(!keys) {
- this.last_req = this.request("GET", viewPath);
- } else {
- this.last_req = this.request("POST", viewPath, {
- headers: {"Content-Type": "application/json"},
- body: JSON.stringify({keys:keys})
- });
- }
- if (this.last_req.status == 404) {
- return null;
- }
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- // gets information about the database
- this.info = function() {
- this.last_req = this.request("GET", this.uri);
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- // gets information about a design doc
- this.designInfo = function(docid) {
- this.last_req = this.request("GET", this.uri + docid + "/_info");
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- this.allDocs = function(options,keys) {
- if(!keys) {
- this.last_req = this.request("GET", this.uri + "_all_docs"
- + encodeOptions(options));
- } else {
- this.last_req = this.request("POST", this.uri + "_all_docs"
- + encodeOptions(options), {
- headers: {"Content-Type": "application/json"},
- body: JSON.stringify({keys:keys})
- });
- }
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- this.designDocs = function() {
- return this.allDocs({startkey:"_design", endkey:"_design0"});
- };
-
- this.changes = function(options) {
- this.last_req = this.request("GET", this.uri + "_changes"
- + encodeOptions(options));
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- this.compact = function() {
- this.last_req = this.request("POST", this.uri + "_compact");
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- this.viewCleanup = function() {
- this.last_req = this.request("POST", this.uri + "_view_cleanup");
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- this.setDbProperty = function(propId, propValue) {
- this.last_req = this.request("PUT", this.uri + propId,{
- body:JSON.stringify(propValue)
- });
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- this.getDbProperty = function(propId) {
- this.last_req = this.request("GET", this.uri + propId);
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- this.setSecObj = function(secObj) {
- this.last_req = this.request("PUT", this.uri + "_security",{
- body:JSON.stringify(secObj)
- });
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- this.getSecObj = function() {
- this.last_req = this.request("GET", this.uri + "_security");
- CouchDB.maybeThrowError(this.last_req);
- return JSON.parse(this.last_req.responseText);
- };
-
- // Convert a options object to an url query string.
- // ex: {key:'value',key2:'value2'} becomes '?key="value"&key2="value2"'
- function encodeOptions(options) {
- var buf = [];
- if (typeof(options) == "object" && options !== null) {
- for (var name in options) {
- if (!options.hasOwnProperty(name)) { continue; };
- var value = options[name];
- if (name == "key" || name == "keys" || name == "startkey" || name == "endkey" || (name == "open_revs" && value !== "all")) {
- value = toJSON(value);
- }
- buf.push(encodeURIComponent(name) + "=" + encodeURIComponent(value));
- }
- }
- if (!buf.length) {
- return "";
- }
- return "?" + buf.join("&");
- }
-
- function toJSON(obj) {
- return obj !== null ? JSON.stringify(obj) : null;
- }
-
- function combine(object1, object2) {
- if (!object2) {
- return object1;
- }
- if (!object1) {
- return object2;
- }
-
- for (var name in object2) {
- object1[name] = object2[name];
- }
- return object1;
- }
-
-}
-
-// this is the XMLHttpRequest object from last request made by the following
-// CouchDB.* functions (except for calls to request itself).
-// Use this from callers to check HTTP status or header values of requests.
-CouchDB.last_req = null;
-CouchDB.urlPrefix = '';
-
-CouchDB.login = function(name, password) {
- CouchDB.last_req = CouchDB.request("POST", "/_session", {
- headers: {"Content-Type": "application/x-www-form-urlencoded",
- "X-CouchDB-WWW-Authenticate": "Cookie"},
- body: "name=" + encodeURIComponent(name) + "&password="
- + encodeURIComponent(password)
- });
- return JSON.parse(CouchDB.last_req.responseText);
-}
-
-CouchDB.logout = function() {
- CouchDB.last_req = CouchDB.request("DELETE", "/_session", {
- headers: {"Content-Type": "application/x-www-form-urlencoded",
- "X-CouchDB-WWW-Authenticate": "Cookie"}
- });
- return JSON.parse(CouchDB.last_req.responseText);
-};
-
-CouchDB.session = function(options) {
- options = options || {};
- CouchDB.last_req = CouchDB.request("GET", "/_session", options);
- CouchDB.maybeThrowError(CouchDB.last_req);
- return JSON.parse(CouchDB.last_req.responseText);
-};
-
-CouchDB.allDbs = function() {
- CouchDB.last_req = CouchDB.request("GET", "/_all_dbs");
- CouchDB.maybeThrowError(CouchDB.last_req);
- return JSON.parse(CouchDB.last_req.responseText);
-};
-
-CouchDB.allDesignDocs = function() {
- var ddocs = {}, dbs = CouchDB.allDbs();
- for (var i=0; i < dbs.length; i++) {
- var db = new CouchDB(dbs[i]);
- ddocs[dbs[i]] = db.designDocs();
- };
- return ddocs;
-};
-
-CouchDB.getVersion = function() {
- CouchDB.last_req = CouchDB.request("GET", "/");
- CouchDB.maybeThrowError(CouchDB.last_req);
- return JSON.parse(CouchDB.last_req.responseText).version;
-};
-
-CouchDB.reloadConfig = function() {
- CouchDB.last_req = CouchDB.request("POST", "/_config/_reload");
- CouchDB.maybeThrowError(CouchDB.last_req);
- return JSON.parse(CouchDB.last_req.responseText);
-};
-
-CouchDB.replicate = function(source, target, rep_options) {
- rep_options = rep_options || {};
- var headers = rep_options.headers || {};
- var body = rep_options.body || {};
- body.source = source;
- body.target = target;
- CouchDB.last_req = CouchDB.request("POST", "/_replicate", {
- headers: headers,
- body: JSON.stringify(body)
- });
- CouchDB.maybeThrowError(CouchDB.last_req);
- return JSON.parse(CouchDB.last_req.responseText);
-};
-
-CouchDB.newXhr = function() {
- if (typeof(XMLHttpRequest) != "undefined") {
- return new XMLHttpRequest();
- } else if (typeof(ActiveXObject) != "undefined") {
- return new ActiveXObject("Microsoft.XMLHTTP");
- } else {
- throw new Error("No XMLHTTPRequest support detected");
- }
-};
-
-CouchDB.xhrbody = function(xhr) {
- if (xhr.responseText) {
- return xhr.responseText;
- } else if (xhr.body) {
- return xhr.body
- } else {
- throw new Error("No XMLHTTPRequest support detected");
- }
-}
-
-CouchDB.xhrheader = function(xhr, header) {
- if(xhr.getResponseHeader) {
- return xhr.getResponseHeader(header);
- } else if(xhr.headers) {
- return xhr.headers[header] || null;
- } else {
- throw new Error("No XMLHTTPRequest support detected");
- }
-}
-
-CouchDB.proxyUrl = function(uri) {
- if(uri.substr(0, CouchDB.protocol.length) != CouchDB.protocol) {
- uri = CouchDB.urlPrefix + uri;
- }
- return uri;
-}
-
-CouchDB.request = function(method, uri, options) {
- options = typeof(options) == 'object' ? options : {};
- options.headers = typeof(options.headers) == 'object' ? options.headers : {};
- options.headers["Content-Type"] = options.headers["Content-Type"] || options.headers["content-type"] || "application/json";
- options.headers["Accept"] = options.headers["Accept"] || options.headers["accept"] || "application/json";
- var req = CouchDB.newXhr();
- uri = CouchDB.proxyUrl(uri);
- req.open(method, uri, false);
- if (options.headers) {
- var headers = options.headers;
- for (var headerName in headers) {
- if (!headers.hasOwnProperty(headerName)) { continue; }
- req.setRequestHeader(headerName, headers[headerName]);
- }
- }
- req.send(options.body || "");
- return req;
-};
-
-CouchDB.requestStats = function(path, test) {
- var query_arg = "";
- if(test !== null) {
- query_arg = "?flush=true";
- }
-
- var url = "/_stats/" + path.join("/") + query_arg;
- var stat = CouchDB.request("GET", url).responseText;
- return JSON.parse(stat);
-};
-
-CouchDB.uuids_cache = [];
-
-CouchDB.newUuids = function(n, buf) {
- buf = buf || 100;
- if (CouchDB.uuids_cache.length >= n) {
- var uuids = CouchDB.uuids_cache.slice(CouchDB.uuids_cache.length - n);
- if(CouchDB.uuids_cache.length - n == 0) {
- CouchDB.uuids_cache = [];
- } else {
- CouchDB.uuids_cache =
- CouchDB.uuids_cache.slice(0, CouchDB.uuids_cache.length - n);
- }
- return uuids;
- } else {
- CouchDB.last_req = CouchDB.request("GET", "/_uuids?count=" + (buf + n));
- CouchDB.maybeThrowError(CouchDB.last_req);
- var result = JSON.parse(CouchDB.last_req.responseText);
- CouchDB.uuids_cache =
- CouchDB.uuids_cache.concat(result.uuids.slice(0, buf));
- return result.uuids.slice(buf);
- }
-};
-
-CouchDB.maybeThrowError = function(req) {
- if (req.status >= 400) {
- try {
- var result = JSON.parse(req.responseText);
- } catch (ParseError) {
- var result = {error:"unknown", reason:req.responseText};
- }
-
- throw (new CouchError(result));
- }
-}
-
-CouchDB.params = function(options) {
- options = options || {};
- var returnArray = [];
- for(var key in options) {
- var value = options[key];
- returnArray.push(key + "=" + value);
- }
- return returnArray.join("&");
-};
-// Used by replication test
-if (typeof window == 'undefined' || !window) {
- var hostRE = RegExp("https?://([^\/]+)");
- var getter = function () {
- return (new CouchHTTP).base_url.match(hostRE)[1];
- };
- if(Object.defineProperty) {
- Object.defineProperty(CouchDB, "host", {
- get : getter,
- enumerable : true
- });
- } else {
- CouchDB.__defineGetter__("host", getter);
- }
- CouchDB.protocol = "http://";
- CouchDB.inBrowser = false;
-} else {
- CouchDB.host = window.location.host;
- CouchDB.inBrowser = true;
- CouchDB.protocol = window.location.protocol + "//";
-}
-
-// Turns an {error: ..., reason: ...} response into an Error instance
-function CouchError(error) {
- var inst = new Error(error.reason);
- inst.name = 'CouchError';
- inst.error = error.error;
- inst.reason = error.reason;
- return inst;
-}
-CouchError.prototype.constructor = CouchError;
diff --git a/share/www/script/couch_test_runner.js b/share/www/script/couch_test_runner.js
deleted file mode 100644
index efc4dc242..000000000
--- a/share/www/script/couch_test_runner.js
+++ /dev/null
@@ -1,465 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// *********************** Test Framework of Sorts ************************* //
-
-
-function loadScript(url) {
- // disallow loading remote URLs
- var re = /^[a-z0-9_]+(\/[a-z0-9_]+)*\.js#?$/;
- if (!re.test(url)) {
- throw "Not loading remote test scripts";
- }
- if (typeof document != "undefined") document.write('<script src="'+url+'"></script>');
-};
-
-function patchTest(fun) {
- var source = fun.toString();
- var output = "";
- var i = 0;
- var testMarker = "T(";
- while (i < source.length) {
- var testStart = source.indexOf(testMarker, i);
- if (testStart == -1) {
- output = output + source.substring(i, source.length);
- break;
- }
- var testEnd = source.indexOf(");", testStart);
- var testCode = source.substring(testStart + testMarker.length, testEnd);
- output += source.substring(i, testStart) + "T(" + testCode + "," + JSON.stringify(testCode);
- i = testEnd;
- }
- try {
- return eval("(" + output + ")");
- } catch (e) {
- return null;
- }
-}
-
-function runAllTests() {
- var rows = $("#tests tbody.content tr");
- $("td", rows).text("");
- $("td.status", rows).removeClass("error").removeClass("failure").removeClass("success").text("not run");
- var offset = 0;
- function runNext() {
- if (offset < rows.length) {
- var row = rows.get(offset);
- runTest($("th button", row).get(0), function() {
- offset += 1;
- setTimeout(runNext, 100);
- }, false, true);
- } else {
- saveTestReport();
- }
- }
- runNext();
-}
-
-var numFailures = 0;
-var currentRow = null;
-
-function runTest(button, callback, debug, noSave) {
-
- // offer to save admins
- if (currentRow != null) {
- alert("Can not run multiple tests simultaneously.");
- return;
- }
- var row = currentRow = $(button).parents("tr").get(0);
- $("td.status", row).removeClass("error").removeClass("failure").removeClass("success");
- $("td", row).text("");
- $("#toolbar li.current").text("Running: "+row.id);
- var testFun = couchTests[row.id];
- function run() {
- numFailures = 0;
- var start = new Date().getTime();
- try {
- if (debug == undefined || !debug) {
- testFun = patchTest(testFun) || testFun;
- }
- testFun(debug);
- var status = numFailures > 0 ? "failure" : "success";
- } catch (e) {
- var status = "error";
- if ($("td.details ol", row).length == 0) {
- $("<ol></ol>").appendTo($("td.details", row));
- }
- $("<li><b>Exception raised:</b> <code class='error'></code></li>")
- .find("code").text(JSON.stringify(e)).end()
- .appendTo($("td.details ol", row));
- if (debug) {
- currentRow = null;
- throw e;
- }
- }
- if ($("td.details ol", row).length) {
- $("<a href='#'>Run with debugger</a>").click(function() {
- runTest(this, undefined, true);
- }).prependTo($("td.details ol", row));
- }
- var duration = new Date().getTime() - start;
- $("td.status", row).removeClass("running").addClass(status).text(status);
- $("td.duration", row).text(duration + "ms");
- $("#toolbar li.current").text("Finished: "+row.id);
- updateTestsFooter();
- currentRow = null;
- if (callback) callback();
- if (!noSave) saveTestReport();
- }
- $("td.status", row).addClass("running").text("running…");
- setTimeout(run, 100);
-}
-
-function showSource(cell) {
- var name = $(cell).text();
- var win = window.open("", name, "width=700,height=500,resizable=yes,scrollbars=yes");
- win.document.location = "script/test/" + name + ".js";
-}
-
-var readyToRun;
-function setupAdminParty(fun) {
- if (readyToRun) {
- fun();
- } else {
- function removeAdmins(confs, doneFun) {
- // iterate through the config and remove current user last
- // current user is at front of list
- var remove = confs.pop();
- if (remove) {
- $.couch.config({
- success : function() {
- removeAdmins(confs, doneFun);
- }
- }, "admins", remove[0], null);
- } else {
- doneFun();
- }
- };
- $.couch.session({
- success : function(resp) {
- var userCtx = resp.userCtx;
- if (userCtx.name && userCtx.roles.indexOf("_admin") != -1) {
- // admin but not admin party. dialog offering to make admin party
- $.showDialog("dialog/_admin_party.html", {
- submit: function(data, callback) {
- $.couch.config({
- success : function(conf) {
- var meAdmin, adminConfs = [];
- for (var name in conf) {
- if (name == userCtx.name) {
- meAdmin = [name, conf[name]];
- } else {
- adminConfs.push([name, conf[name]]);
- }
- }
- adminConfs.unshift(meAdmin);
- removeAdmins(adminConfs, function() {
- callback();
- $.futon.session.sidebar();
- readyToRun = true;
- setTimeout(fun, 500);
- });
- }
- }, "admins");
- }
- });
- } else if (userCtx.roles.indexOf("_admin") != -1) {
- // admin party!
- readyToRun = true;
- fun();
- } else {
- // not an admin
- alert("Error: You need to be an admin to run the tests.");
- };
- }
- });
- }
-};
-
-function updateTestsListing() {
- for (var name in couchTests) {
- var testFunction = couchTests[name];
- var row = $("<tr><th></th><td></td><td></td><td></td></tr>")
- .find("th").text(name).attr("title", "Show source").click(function() {
- showSource(this);
- }).end()
- .find("td:nth(0)").addClass("status").text("not run").end()
- .find("td:nth(1)").addClass("duration").end()
- .find("td:nth(2)").addClass("details").end();
- $("<button type='button' class='run' title='Run test'></button>").click(function() {
- this.blur();
- var self = this;
- // check for admin party
- setupAdminParty(function() {
- runTest(self);
- });
- return false;
- }).prependTo(row.find("th"));
- row.attr("id", name).appendTo("#tests tbody.content");
- }
- $("#tests tr").removeClass("odd").filter(":odd").addClass("odd");
- updateTestsFooter();
-}
-
-function updateTestsFooter() {
- var tests = $("#tests tbody.content tr td.status");
- var testsRun = tests.filter(".success, .error, .failure");
- var testsFailed = testsRun.not(".success");
- var totalDuration = 0;
- $("#tests tbody.content tr td.duration:contains('ms')").each(function() {
- var text = $(this).text();
- totalDuration += parseInt(text.substr(0, text.length - 2), 10);
- });
- $("#tests tbody.footer td").html("<span>"+testsRun.length + " of " + tests.length +
- " test(s) run, " + testsFailed.length + " failures (" +
- totalDuration + " ms)</span> ");
-}
-
-// make report and save to local db
-// display how many reports need replicating to the mothership
-// have button to replicate them
-
-function saveTestReport(report) {
- var report = makeTestReport();
- if (report) {
- var db = $.couch.db("test_suite_reports");
- var saveReport = function(db_info) {
- report.db = db_info;
- $.couch.info({success : function(node_info) {
- report.node = node_info;
- db.saveDoc(report);
- }});
- };
- var createDb = function() {
- db.create({success: function() {
- db.info({success:saveReport});
- }});
- };
- db.info({error: createDb, success:saveReport});
- }
-};
-
-function makeTestReport() {
- var report = {};
- report.summary = $("#tests tbody.footer td").text();
- report.platform = testPlatform();
- var date = new Date();
- report.timestamp = date.getTime();
- report.timezone = date.getTimezoneOffset();
- report.tests = [];
- $("#tests tbody.content tr").each(function() {
- var status = $("td.status", this).text();
- if (status != "not run") {
- var test = {};
- test.name = this.id;
- test.status = status;
- test.duration = parseInt($("td.duration", this).text());
- test.details = [];
- $("td.details li", this).each(function() {
- test.details.push($(this).text());
- });
- if (test.details.length == 0) {
- delete test.details;
- }
- report.tests.push(test);
- }
- });
- if (report.tests.length > 0) return report;
-};
-
-function testPlatform() {
- var b = $.browser;
- var bs = ["mozilla", "msie", "opera", "safari"];
- for (var i=0; i < bs.length; i++) {
- if (b[bs[i]]) {
- return {"browser" : bs[i], "version" : b.version};
- }
- };
- return {"browser" : "undetected"};
-}
-
-
-function reportTests() {
- // replicate the database to couchdb.couchdb.org
-}
-
-// Use T to perform a test that returns false on failure and if the test fails,
-// display the line that failed.
-// Example:
-// T(MyValue==1);
-function T(arg1, arg2, testName) {
- if (!arg1) {
- if (currentRow) {
- if ($("td.details ol", currentRow).length == 0) {
- $("<ol></ol>").appendTo($("td.details", currentRow));
- }
- var message = (arg2 != null ? arg2 : arg1).toString();
- $("<li><b>Assertion " + (testName ? "'" + testName + "'" : "") + " failed:</b> <code class='failure'></code></li>")
- .find("code").text(message).end()
- .appendTo($("td.details ol", currentRow));
- }
- numFailures += 1;
- }
-}
-
-function TIsnull(actual, testName) {
- T(actual === null, "expected 'null', got '"
- + repr(actual) + "'", testName);
-}
-
-function TEquals(expected, actual, testName) {
- T(equals(expected, actual), "expected '" + repr(expected) +
- "', got '" + repr(actual) + "'", testName);
-}
-
-function TEqualsIgnoreCase(expected, actual, testName) {
- T(equals(expected.toUpperCase(), actual.toUpperCase()), "expected '" + repr(expected) +
- "', got '" + repr(actual) + "'", testName);
-}
-
-function equals(a,b) {
- if (a === b) return true;
- try {
- return repr(a) === repr(b);
- } catch (e) {
- return false;
- }
-}
-
-function repr(val) {
- if (val === undefined) {
- return null;
- } else if (val === null) {
- return "null";
- } else {
- return JSON.stringify(val);
- }
-}
-
-function makeDocs(start, end, templateDoc) {
- var templateDocSrc = templateDoc ? JSON.stringify(templateDoc) : "{}";
- if (end === undefined) {
- end = start;
- start = 0;
- }
- var docs = [];
- for (var i = start; i < end; i++) {
- var newDoc = eval("(" + templateDocSrc + ")");
- newDoc._id = (i).toString();
- newDoc.integer = i;
- newDoc.string = (i).toString();
- docs.push(newDoc);
- }
- return docs;
-}
-
-function run_on_modified_server(settings, fun) {
- try {
- // set the settings
- for(var i=0; i < settings.length; i++) {
- var s = settings[i];
- var xhr = CouchDB.request("PUT", "/_config/" + s.section + "/" + s.key, {
- body: JSON.stringify(s.value),
- headers: {"X-Couch-Persist": "false"}
- });
- CouchDB.maybeThrowError(xhr);
- s.oldValue = xhr.responseText;
- }
- // run the thing
- fun();
- } finally {
- // unset the settings
- for(var j=0; j < i; j++) {
- var s = settings[j];
- if(s.oldValue == "\"\"\n") { // unset value
- CouchDB.request("DELETE", "/_config/" + s.section + "/" + s.key, {
- headers: {"X-Couch-Persist": "false"}
- });
- } else {
- CouchDB.request("PUT", "/_config/" + s.section + "/" + s.key, {
- body: s.oldValue,
- headers: {"X-Couch-Persist": "false"}
- });
- }
- }
- }
-}
-
-function stringFun(fun) {
- var string = fun.toSource ? fun.toSource() : "(" + fun.toString() + ")";
- return string;
-}
-
-function waitForSuccess(fun, tag) {
- var start = new Date();
- while(true) {
- if (new Date() - start > 5000) {
- throw("timeout: "+tag);
- } else {
- try {
- fun();
- break;
- } catch (e) {}
- // sync http req allow async req to happen
- try {
- CouchDB.request("GET", "/test_suite_db/?tag="+encodeURIComponent(tag));
- } catch (e) {}
- }
- }
-}
-
-function getCurrentToken() {
- var xhr = CouchDB.request("GET", "/_restart/token");
- return JSON.parse(xhr.responseText).token;
-};
-
-
-function restartServer() {
- var token = getCurrentToken();
- var token_changed = false;
- var tDelta = 5000;
- var t0 = new Date();
- var t1;
-
- CouchDB.request("POST", "/_restart");
-
- do {
- try {
- if(token != getCurrentToken()) {
- token_changed = true;
- }
- } catch (e) {
- // Ignore errors while the server restarts
- }
- t1 = new Date();
- } while(((t1 - t0) <= tDelta) && !token_changed);
-
- if(!token_changed) {
- throw("Server restart failed");
- }
-}
-
-// legacy functions for CouchDB < 1.2.0
-// we keep them to make sure we keep BC
-CouchDB.user_prefix = "org.couchdb.user:";
-
-CouchDB.prepareUserDoc = function(user_doc, new_password) {
- user_doc._id = user_doc._id || CouchDB.user_prefix + user_doc.name;
- if (new_password) {
- user_doc.password = new_password;
- }
- user_doc.type = "user";
- if (!user_doc.roles) {
- user_doc.roles = [];
- }
- return user_doc;
-};
diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js
deleted file mode 100644
index 62443f7b0..000000000
--- a/share/www/script/couch_tests.js
+++ /dev/null
@@ -1,114 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-
-CouchDB.urlPrefix = "..";
-var couchTests = {};
-
-function loadTest(file) {
- loadScript("script/test/"+file);
-};
-// keep first
-loadTest("basics.js");
-
-// keep sorted
-loadTest("all_docs.js");
-loadTest("attachments.js");
-loadTest("attachments_multipart.js");
-loadTest("attachment_names.js");
-loadTest("attachment_paths.js");
-loadTest("attachment_ranges.js");
-loadTest("attachment_views.js");
-loadTest("auth_cache.js");
-loadTest("batch_save.js");
-loadTest("bulk_docs.js");
-loadTest("changes.js");
-loadTest("coffee.js");
-loadTest("compact.js");
-loadTest("config.js");
-loadTest("conflicts.js");
-loadTest("content_negotiation.js");
-loadTest("cookie_auth.js");
-loadTest("copy_doc.js");
-loadTest("delayed_commits.js");
-loadTest("design_docs.js");
-loadTest("design_options.js");
-loadTest("design_paths.js");
-loadTest("erlang_views.js");
-loadTest("etags_head.js");
-loadTest("etags_views.js");
-loadTest("form_submit.js");
-loadTest("http.js");
-loadTest("invalid_docids.js");
-loadTest("jsonp.js");
-loadTest("large_docs.js");
-loadTest("list_views.js");
-loadTest("lots_of_docs.js");
-loadTest("method_override.js");
-loadTest("multiple_rows.js");
-loadScript("script/oauth.js");
-loadScript("script/sha1.js");
-loadTest("oauth.js");
-loadTest("oauth_users_db.js");
-loadTest("proxyauth.js");
-loadTest("purge.js");
-loadTest("reader_acl.js");
-loadTest("recreate_doc.js");
-loadTest("reduce.js");
-loadTest("reduce_builtin.js");
-loadTest("reduce_false.js");
-loadTest("reduce_false_temp.js");
-loadTest("replication.js");
-loadScript("script/replicator_db_inc.js");
-loadTest("replicator_db_bad_rep_id.js");
-loadTest("replicator_db_by_doc_id.js");
-loadTest("replicator_db_compact_rep_db.js");
-loadTest("replicator_db_continuous.js");
-loadTest("replicator_db_credential_delegation.js");
-loadTest("replicator_db_field_validation.js");
-loadTest("replicator_db_filtered.js");
-loadTest("replicator_db_identical.js");
-loadTest("replicator_db_identical_continuous.js");
-loadTest("replicator_db_invalid_filter.js");
-loadTest("replicator_db_simple.js");
-loadTest("replicator_db_successive.js");
-loadTest("replicator_db_survives.js");
-loadTest("replicator_db_swap_rep_db.js");
-loadTest("replicator_db_update_security.js");
-loadTest("replicator_db_user_ctx.js");
-loadTest("replicator_db_write_auth.js");
-loadTest("replicator_db_security.js");
-loadTest("rev_stemming.js");
-loadTest("rewrite.js");
-loadTest("security_validation.js");
-loadTest("show_documents.js");
-loadTest("stats.js");
-loadTest("update_documents.js");
-loadTest("users_db.js");
-loadTest("users_db_security.js");
-loadTest("utf8.js");
-loadTest("uuids.js");
-loadTest("view_collation.js");
-loadTest("view_collation_raw.js");
-loadTest("view_conflicts.js");
-loadTest("view_compaction.js");
-loadTest("view_errors.js");
-loadTest("view_include_docs.js");
-loadTest("view_multi_key_all_docs.js");
-loadTest("view_multi_key_design.js");
-loadTest("view_multi_key_temp.js");
-loadTest("view_offsets.js");
-loadTest("view_pagination.js");
-loadTest("view_sandboxing.js");
-loadTest("view_update_seq.js");
-// keep sorted
-
diff --git a/share/www/script/futon.browse.js b/share/www/script/futon.browse.js
deleted file mode 100644
index df4e3d874..000000000
--- a/share/www/script/futon.browse.js
+++ /dev/null
@@ -1,1344 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-(function($) {
-
- $.toTimeString = function(milliseconds) {
- var ms, sec, min, h, timeString;
-
- sec = Math.floor(milliseconds / 1000.0);
- min = Math.floor(sec / 60.0);
- sec = (sec % 60.0).toString();
- if (sec.length < 2) {
- sec = "0" + sec;
- }
-
- h = (Math.floor(min / 60.0)).toString();
- if (h.length < 2) {
- h = "0" + h;
- }
-
- min = (min % 60.0).toString();
- if (min.length < 2) {
- min = "0" + min;
- }
-
- timeString = h + ":" + min + ":" + sec;
-
- ms = (milliseconds % 1000.0).toString();
- while (ms.length < 3) {
- ms = "0" + ms;
- }
- timeString += "." + ms;
-
- return timeString;
- };
-
- $.futon = $.futon || {};
- $.extend($.futon, {
-
- // Page class for browse/index.html
- CouchIndexPage: function() {
- page = this;
-
- $.futon.storage.declare("per_page", {defaultValue: 10});
-
- this.addDatabase = function() {
- $.showDialog("dialog/_create_database.html", {
- submit: function(data, callback) {
- if (!data.name || data.name.length == 0) {
- callback({name: "Please enter a name."});
- return;
- }
- $.couch.db(data.name).create({
- error: function(status, id, reason) { callback({name: reason}) },
- success: function(resp) {
- location.href = "database.html?" + encodeURIComponent(data.name);
- callback();
- }
- });
- }
- });
- return false;
- }
-
- this.updateDatabaseListing = function(offset) {
- offset |= 0;
- var maxPerPage = parseInt($("#perpage").val(), 10);
-
- $.couch.allDbs({
- success: function(dbs) {
- $("#paging a").unbind();
- $("#databases tbody.content").empty();
-
- var dbsOnPage = dbs.slice(offset, offset + maxPerPage);
-
- $.each(dbsOnPage, function(idx, dbName) {
- $("#databases tbody.content").append("<tr>" +
- "<th><a href='database.html?" + encodeURIComponent(dbName) + "'>" +
- dbName + "</a></th>" +
- "<td class='size'></td><td class='count'></td>" +
- "<td class='seq'></td></tr>");
- $.couch.db(dbName).info({
- success: function(info) {
- $("#databases tbody.content tr:eq(" + idx + ")")
- .find("td.size").text($.futon.formatSize(info.disk_size)).end()
- .find("td.count").text(info.doc_count).end()
- .find("td.seq").text(info.update_seq.split("-")[0]);
- },
- error : function() {}
- });
- });
- $("#databases tbody tr:odd").addClass("odd");
-
- if (offset > 0) {
- $("#paging a.prev").attr("href", "#" + (offset - maxPerPage)).click(function() {
- page.updateDatabaseListing(offset - maxPerPage);
- });
- } else {
- $("#paging a.prev").removeAttr("href");
- }
- if (offset + maxPerPage < dbs.length) {
- $("#paging a.next").attr("href", "#" + (offset + maxPerPage)).click(function() {
- page.updateDatabaseListing(offset + maxPerPage);
- });
- } else {
- $("#paging a.next").removeAttr("href");
- }
-
- var firstNum = offset + 1;
- var lastNum = firstNum + dbsOnPage.length - 1;
- $("#databases tbody.footer tr td span").text(
- "Showing " + firstNum + "-" + lastNum + " of " + dbs.length +
- " databases");
- }
- });
- }
-
- },
-
- // Page class for browse/database.html
- CouchDatabasePage: function() {
- var urlParts = location.search.substr(1).split("/");
- var dbName = decodeURIComponent(urlParts.shift())
-
- var dbNameRegExp = new RegExp("[^a-z0-9.\_\$\(\)\+\/\-]", "g");
- dbName = dbName.replace(dbNameRegExp, "");
-
- $.futon.storage.declareWithPrefix(dbName + ".", {
- desc: {},
- language: {defaultValue: "javascript"},
- map_fun: {defaultValue: ""},
- reduce_fun: {defaultValue: ""},
- reduce: {},
- group_level: {defaultValue: 100},
- per_page: {defaultValue: 10},
- view: {defaultValue: ""},
- stale: {defaultValue: false}
- });
-
- var viewName = (urlParts.length > 0) ? urlParts.join("/") : null;
- if (viewName) {
- $.futon.storage.set("view", decodeURIComponent(viewName));
- } else {
- viewName = $.futon.storage.get("view");
- if (viewName) {
- this.redirecting = true;
- location.href = "database.html?" + encodeURIComponent(dbName) +
- "/" + encodeURIComponent(viewName);
- }
- }
- var db = $.couch.db(dbName);
-
- this.dbName = dbName;
- viewName = decodeURIComponent(viewName);
- this.viewName = viewName;
- this.viewLanguage = "javascript";
- this.db = db;
- this.isDirty = false;
- this.isTempView = viewName == "_temp_view";
- page = this;
-
- var templates = {
- javascript: "function(doc) {\n emit(null, doc);\n}",
- python: "def fun(doc):\n yield None, doc",
- ruby: "lambda {|doc|\n emit(nil, doc);\n}"
- }
-
- this.newDocument = function() {
- location.href = "document.html?" + encodeURIComponent(db.name);
- }
-
- this.compactAndCleanup = function() {
- $.showDialog("dialog/_compact_cleanup.html", {
- submit: function(data, callback) {
- switch (data.action) {
- case "compact_database":
- db.compact({success: function(resp) { callback() }});
- break;
- case "compact_views":
- var idx = page.viewName.indexOf("/_view");
- if (idx == -1) {
- alert("Compact Views requires focus on a view!");
- } else {
- var groupname = page.viewName.substring(8, idx);
- db.compactView(groupname, {success: function(resp) { callback() }});
- }
- break;
- case "view_cleanup":
- db.viewCleanup({success: function(resp) { callback() }});
- break;
- }
- }
- });
- }
-
- this.deleteDatabase = function() {
- $.showDialog("dialog/_delete_database.html", {
- submit: function(data, callback) {
- db.drop({
- success: function(resp) {
- callback();
- location.href = "index.html";
- if (window !== null) {
- $("#dbs li").filter(function(index) {
- return $("a", this).text() == dbName;
- }).remove();
- $.futon.navigation.removeDatabase(dbName);
- }
- }
- });
- }
- });
- }
-
- this.databaseSecurity = function() {
- function namesAndRoles(r, key) {
- var names = [];
- var roles = [];
- if (r && typeof r[key + "s"] === "object") {
- if ($.isArray(r[key + "s"]["names"])) {
- names = r[key + "s"]["names"];
- }
- if ($.isArray(r[key + "s"]["roles"])) {
- roles = r[key + "s"]["roles"];
- }
- }
- return {names : names, roles: roles};
- };
-
- $.showDialog("dialog/_database_security.html", {
- load : function(d) {
- db.getDbProperty("_security", {
- success: function(r) {
- var admins = namesAndRoles(r, "admin")
- , members = namesAndRoles(r, "member");
- if (members.names.length + members.roles.length == 0) {
- // backwards compatibility with readers for 1.x
- members = namesAndRoles(r, "reader");
- }
- $("input[name=admin_names]", d).val(JSON.stringify(admins.names));
- $("input[name=admin_roles]", d).val(JSON.stringify(admins.roles));
- $("input[name=member_names]", d).val(JSON.stringify(members.names));
- $("input[name=member_roles]", d).val(JSON.stringify(members.roles));
- }
- });
- },
- // maybe this should be 2 forms
- submit: function(data, callback) {
- var errors = {};
- var secObj = {
- admins: {
- names: [],
- roles: []
- },
- members: {
- names: [],
- roles: []
- }
- };
-
- ["admin", "member"].forEach(function(key) {
- var names, roles;
-
- try {
- names = JSON.parse(data[key + "_names"]);
- } catch(e) { }
- try {
- roles = JSON.parse(data[key + "_roles"]);
- } catch(e) { }
-
- if ($.isArray(names)) {
- secObj[key + "s"]["names"] = names;
- } else {
- errors[key + "_names"] = "The " + key +
- " names must be an array of strings";
- }
- if ($.isArray(roles)) {
- secObj[key + "s"]["roles"] = roles;
- } else {
- errors[key + "_roles"] = "The " + key +
- " roles must be an array of strings";
- }
- });
-
- if ($.isEmptyObject(errors)) {
- db.setDbProperty("_security", secObj);
- }
- callback(errors);
- }
- });
- }
-
- this.populateViewEditor = function() {
- if (viewName.match(/^_design\//)) {
- page.revertViewChanges(function() {
- var dirtyTimeout = null;
- function updateDirtyState() {
- clearTimeout(dirtyTimeout);
- dirtyTimeout = setTimeout(function() {
- var buttons = $("#viewcode button.save, #viewcode button.revert");
- var viewCode = {
- map: $("#viewcode_map").val(),
- reduce: $("#viewcode_reduce").val()
- };
- $("#reduce, #grouplevel").toggle(!!viewCode.reduce);
- page.isDirty = (viewCode.map != page.storedViewCode.map)
- || (viewCode.reduce != (page.storedViewCode.reduce || ""))
- || page.viewLanguage != page.storedViewLanguage;
- if (page.isDirty) {
- buttons.removeAttr("disabled");
- } else {
- buttons.attr("disabled", "disabled");
- }
- }, 100);
- }
- $("#viewcode textarea").enableTabInsertion()
- .bind("input", updateDirtyState);
- if ($.browser.msie || $.browser.safari) {
- $("#viewcode textarea").bind("paste", updateDirtyState)
- .bind("change", updateDirtyState)
- .bind("keydown", updateDirtyState)
- .bind("keypress", updateDirtyState)
- .bind("keyup", updateDirtyState)
- .bind("textInput", updateDirtyState);
- }
- $("#language").change(updateDirtyState);
- page.updateDocumentListing();
- });
- } else if (viewName == "_temp_view") {
- $("#viewcode textarea").enableTabInsertion();
- page.viewLanguage = $.futon.storage.get("language");
- page.updateViewEditor(
- $.futon.storage.get("map_fun", templates[page.viewLanguage]),
- $.futon.storage.get("reduce_fun")
- );
- } else {
- $("#grouplevel, #reduce").hide();
- page.updateDocumentListing();
- }
- page.populateLanguagesMenu();
- if (this.isTempView) {
- $("#tempwarn").show();
- }
- }
-
- // Populate the languages dropdown, and listen to selection changes
- this.populateLanguagesMenu = function() {
- var all_langs = {};
- fill_language = function() {
- var select = $("#language");
- for (var language in all_langs) {
- var option = $(document.createElement("option"))
- .attr("value", language).text(language)
- .appendTo(select);
- }
- if (select[0].options.length == 1) {
- select[0].disabled = true;
- } else {
- select[0].disabled = false;
- select.val(page.viewLanguage);
- select.change(function() {
- var language = $("#language").val();
- if (language != page.viewLanguage) {
- var mapFun = $("#viewcode_map").val();
- if (mapFun == "" || mapFun == templates[page.viewLanguage]) {
- // no edits made, so change to the new default
- $("#viewcode_map").val(templates[language]);
- }
- page.viewLanguage = language;
- $("#viewcode_map")[0].focus();
- }
- return false;
- });
- }
- }
- $.couch.config({
- success: function(resp) {
- for (var language in resp) {
- all_langs[language] = resp[language];
- }
-
- $.couch.config({
- success: function(resp) {
- for (var language in resp) {
- all_langs[language] = resp[language];
- }
- fill_language();
- }
- }, "native_query_servers");
- },
- error : function() {}
- }, "query_servers");
- }
-
- this.populateViewsMenu = function() {
- var select = $("#switch select");
- db.allDocs({startkey: "_design/", endkey: "_design0",
- include_docs: true,
- success: function(resp) {
- select[0].options.length = 3;
- for (var i = 0; i < resp.rows.length; i++) {
- var doc = resp.rows[i].doc;
- var optGroup = $(document.createElement("optgroup"))
- .attr("label", doc._id.substr(8)).appendTo(select);
- var viewNames = [];
- for (var name in doc.views) {
- viewNames.push(name);
- }
- viewNames.sort();
- for (var j = 0; j < viewNames.length; j++) {
- var path = $.couch.encodeDocId(doc._id) + "/_view/" +
- encodeURIComponent(viewNames[j]);
- var option = $(document.createElement("option"))
- .attr("value", path).text(encodeURIComponent(viewNames[j]))
- .appendTo(optGroup);
- if (path == viewName) {
- option[0].selected = true;
- }
- }
- }
- }
- });
- if (!viewName.match(/^_design\//)) {
- $.each(["_all_docs", "_design_docs", "_temp_view"], function(idx, name) {
- if (viewName == name) {
- select[0].options[idx].selected = true;
- }
- });
- }
- }
-
- this.revertViewChanges = function(callback) {
- if (!page.storedViewCode) {
- var viewNameParts = viewName.split("/");
- var designDocId = decodeURIComponent(viewNameParts[1]);
- var localViewName = decodeURIComponent(viewNameParts[3]);
- db.openDoc("_design/" + designDocId, {
- error: function(status, error, reason) {
- if (status == 404) {
- $.futon.storage.del("view");
- location.href = "database.html?" + encodeURIComponent(db.name);
- }
- },
- success: function(resp) {
- if(!resp.views || !resp.views[localViewName]) {
- $.futon.storage.del("view");
- location.href = "database.html?" + encodeURIComponent(db.name);
- }
- var viewCode = resp.views[localViewName];
- page.viewLanguage = resp.language || "javascript";
- $("#language").val(encodeURIComponent(page.viewLanguage));
- page.updateViewEditor(viewCode.map, viewCode.reduce || "");
- $("#viewcode button.revert, #viewcode button.save").attr("disabled", "disabled");
- page.storedViewCode = viewCode;
- page.storedViewLanguage = page.viewLanguage;
- if (callback) callback();
- }
- }, {async: false});
- } else {
- page.updateViewEditor(page.storedViewCode.map,
- page.storedViewCode.reduce || "");
- page.viewLanguage = page.storedViewLanguage;
- $("#language").val(encodeURIComponent(page.viewLanguage));
- $("#viewcode button.revert, #viewcode button.save").attr("disabled", "disabled");
- page.isDirty = false;
- if (callback) callback();
- }
- }
-
- this.updateViewEditor = function(mapFun, reduceFun) {
- if (!mapFun) return;
- $("#viewcode_map").val(mapFun);
- $("#viewcode_reduce").val(reduceFun);
- var lines = Math.max(
- mapFun.split("\n").length,
- reduceFun.split("\n").length
- );
- $("#reduce, #grouplevel").toggle(!!reduceFun);
- $("#viewcode textarea").attr("rows", Math.min(15, Math.max(3, lines)));
- }
-
- this.saveViewAs = function() {
- if (viewName && /^_design/.test(viewName)) {
- var viewNameParts = viewName.split("/");
- var designDocId = decodeURIComponent(viewNameParts[1]);
- var localViewName = decodeURIComponent(viewNameParts[3]);
- } else {
- var designDocId = "", localViewName = "";
- }
- $.showDialog("dialog/_save_view_as.html", {
- load: function(elem) {
- $("#input_docid", elem).val(designDocId).suggest(function(text, callback) {
- db.allDocs({
- limit: 10, startkey: "_design/" + text, endkey: "_design0",
- success: function(docs) {
- var matches = [];
- for (var i = 0; i < docs.rows.length; i++) {
- var docName = docs.rows[i].id.substr(8);
- if (docName.indexOf(text) == 0) {
- matches[i] = docName;
- }
- }
- callback(matches);
- }
- });
- });
- $("#input_name", elem).val(localViewName).suggest(function(text, callback) {
- db.openDoc("_design/" + $("#input_docid").val(), {
- error: function() {}, // ignore
- success: function(doc) {
- var matches = [];
- if (!doc.views) return;
- for (var viewName in doc.views) {
- if (viewName.indexOf(text) == 0) {
- matches.push(viewName);
- }
- }
- callback(matches);
- }
- });
- });
- },
- submit: function(data, callback) {
- if (!data.docid || !data.name) {
- var errors = {};
- if (!data.docid) errors.docid = "Please enter a document ID";
- if (!data.name) errors.name = "Please enter a view name";
- callback(errors);
- } else {
- var viewCode = {
- map: $("#viewcode_map").val(),
- reduce: $("#viewcode_reduce").val() || undefined
- };
- var docId = ["_design", data.docid].join("/");
- function save(doc) {
- if (!doc) {
- doc = {_id: docId, language: page.viewLanguage};
- } else {
- var numViews = 0;
- for (var viewName in (doc.views || {})) {
- if (viewName != data.name) numViews++;
- }
- if (numViews > 0 && page.viewLanguage != doc.language) {
- callback({
- docid: "Cannot save to " + data.docid +
- " because its language is \"" + doc.language +
- "\", not \"" +
- encodeURIComponent(page.viewLanguage) + "\"."
- });
- return;
- }
- doc.language = page.viewLanguage;
- }
- if (doc.views === undefined) doc.views = {};
- doc.views[data.name] = viewCode;
- db.saveDoc(doc, {
- success: function(resp) {
- callback();
- page.isDirty = false;
- location.href = "database.html?" + encodeURIComponent(dbName) +
- "/" + $.couch.encodeDocId(doc._id) +
- "/_view/" + encodeURIComponent(data.name);
- },
- error: function(status, error, reason) {
- alert("Error: " + error + "\n\n" + reason);
- }
- });
- }
- db.openDoc(docId, {
- error: function(status, error, reason) {
- if (status == 404) save(null);
- else alert("Error: " + error + "\n\n" + reason);
- },
- success: function(doc) {
- save(doc);
- }
- });
- }
- }
- });
- }
-
- this.saveViewChanges = function() {
- var viewNameParts = viewName.split("/");
- var designDocId = decodeURIComponent(viewNameParts[1]);
- var localViewName = decodeURIComponent(viewNameParts[3]);
- db.openDoc("_design/" + designDocId, {
- success: function(doc) {
- var numViews = 0;
- for (var viewName in (doc.views || {})) {
- if (viewName != localViewName) numViews++;
- }
- if (numViews > 0 && page.viewLanguage != doc.language) {
- alert("Cannot save view because the design document language " +
- "is \"" + doc.language + "\", not \"" +
- page.viewLanguage + "\".");
- return;
- }
- doc.language = page.viewLanguage;
- var viewDef = doc.views[localViewName];
- viewDef.map = $("#viewcode_map").val();
- viewDef.reduce = $("#viewcode_reduce").val() || undefined;
- db.saveDoc(doc, {
- success: function(resp) {
- page.isDirty = false;
- page.storedViewCode = viewDef;
- $("#viewcode button.revert, #viewcode button.save")
- .attr("disabled", "disabled");
- },
- error: function(status, error, reason) {
- alert("Error: " + error + "\n\n" + reason);
- }
- });
- }
- });
- }
-
- this.updateDesignDocLink = function() {
- if (viewName && /^_design/.test(viewName)) {
- var docId = "_design/" + encodeURIComponent(decodeURIComponent(viewName).split("/")[1]);
- $("#designdoc-link").attr("href", "document.html?" +
- encodeURIComponent(dbName) + "/" + $.couch.encodeDocId(docId)).text(docId);
- } else {
- $("#designdoc-link").removeAttr("href").text("");
- }
- }
-
- this.jumpToDocument = function(docId) {
- if (docId != "") {
- location.href = 'document.html?' + encodeURIComponent(db.name)
- + "/" + $.couch.encodeDocId(docId);
- }
- }
-
- this.updateDocumentListing = function(options) {
- if (options === undefined) options = {};
- if (options.limit === undefined) {
- var perPage = parseInt($("#perpage").val(), 10)
- // Fetch an extra row so we know when we're on the last page for
- // reduce views
- options.limit = perPage + 1;
- } else {
- perPage = options.limit - 1;
- }
- if ($("#documents thead th.key").is(".desc")) {
- if (typeof options.descending == 'undefined') options.descending = true;
- var descend = true;
- $.futon.storage.set("desc", "1");
- } else {
- var descend = false;
- $.futon.storage.del("desc");
- }
- $("#paging a").unbind();
- $("#documents").find("tbody.content").empty().end().show();
- page.updateDesignDocLink();
-
- options.success = function(resp, requestDuration) {
- if (resp.offset === undefined) {
- resp.offset = 0;
- }
- var descending_reverse = ((options.descending && !descend) || (descend && (options.descending === false)));
- var has_reduce_prev = resp.total_rows === undefined && (descending_reverse ? resp.rows.length > perPage : options.startkey !== undefined);
- if (descending_reverse && resp.rows) {
- resp.rows = resp.rows.reverse();
- if (resp.rows.length > perPage) {
- resp.rows.push(resp.rows.shift());
- }
- }
- if (resp.rows !== null && (has_reduce_prev || (descending_reverse ?
- (resp.total_rows - resp.offset > perPage) :
- (resp.offset > 0)))) {
- $("#paging a.prev").attr("href", "#" + (resp.offset - perPage)).click(function() {
- var opt = {
- descending: !descend,
- limit: options.limit
- };
- if (resp.rows.length > 0) {
- var firstDoc = resp.rows[0];
- opt.startkey = firstDoc.key !== undefined ? firstDoc.key : null;
- if (firstDoc.id !== undefined) {
- opt.startkey_docid = firstDoc.id;
- }
- opt.skip = 1;
- }
- page.updateDocumentListing(opt);
- return false;
- });
- } else {
- $("#paging a.prev").removeAttr("href");
- }
- var has_reduce_next = resp.total_rows === undefined && (descending_reverse ? options.startkey !== undefined : resp.rows.length > perPage);
- if (resp.rows !== null && (has_reduce_next || (descending_reverse ?
- (resp.offset - resp.total_rows < perPage) :
- (resp.total_rows - resp.offset > perPage)))) {
- $("#paging a.next").attr("href", "#" + (resp.offset + perPage)).click(function() {
- var opt = {
- descending: descend,
- limit: options.limit
- };
- if (resp.rows.length > 0) {
- var lastDoc = resp.rows[Math.min(perPage, resp.rows.length) - 1];
- opt.startkey = lastDoc.key !== undefined ? lastDoc.key : null;
- if (lastDoc.id !== undefined) {
- opt.startkey_docid = lastDoc.id;
- }
- opt.skip = 1;
- }
- page.updateDocumentListing(opt);
- return false;
- });
- } else {
- $("#paging a.next").removeAttr("href");
- }
-
- for (var i = 0; i < Math.min(perPage, resp.rows.length); i++) {
- var row = resp.rows[i];
- var tr = $("<tr></tr>");
- var key = "null";
- if (row.key !== null) {
- key = $.futon.formatJSON(row.key, {indent: 0, linesep: ""});
- }
- if (row.id) {
- key = key.replace(/\\"/, '"');
- var rowlink = encodeURIComponent(db.name) +
- "/" + $.couch.encodeDocId(row.id);
- $("<td class='key'><a href=\"document.html?" + rowlink + "\"><strong>"
- + $.futon.escape(key) + "</strong><br>"
- + "<span class='docid'>ID:&nbsp;" + $.futon.escape(row.id) + "</span></a></td>")
- .appendTo(tr);
- } else {
- $("<td class='key'><strong></strong></td>")
- .find("strong").text(key).end()
- .appendTo(tr);
- }
- var value = "null";
- if (row.value !== null) {
- value = $.futon.formatJSON(row.value, {
- html: true, indent: 0, linesep: "", quoteKeys: false
- });
- }
- $("<td class='value'><div></div></td>").find("div").html(value).end()
- .appendTo(tr).dblclick(function() {
- location.href = this.previousSibling.firstChild.href;
- });
- tr.appendTo("#documents tbody.content");
- }
- var firstNum = 1;
- var lastNum = totalNum = Math.min(perPage, resp.rows.length);
- if (resp.total_rows != null) {
- if (descending_reverse) {
- lastNum = Math.min(resp.total_rows, resp.total_rows - resp.offset);
- firstNum = lastNum - totalNum + 1;
- } else {
- firstNum = Math.min(resp.total_rows, resp.offset + 1);
- lastNum = firstNum + totalNum - 1;
- }
- totalNum = resp.total_rows;
- } else {
- totalNum = "unknown";
- }
- $("#paging").show();
-
- $("#documents tbody.footer td span").text(
- "Showing " + firstNum + "-" + lastNum + " of " + totalNum +
- " row" + (firstNum != lastNum || totalNum == "unknown" ? "s" : ""));
- $("#documents tbody tr:odd").addClass("odd");
-
- if (viewName && viewName !== "_all_docs" && viewName !== "_design_docs") {
- $("#viewrequestduration").show();
- $("#viewrequestduration .timestamp").text($.toTimeString(requestDuration));
- }
- }
- options.error = function(status, error, reason) {
- alert("Error: " + error + "\n\n" + reason);
- }
-
- if (!viewName || viewName == "_all_docs") {
- $("#switch select")[0].selectedIndex = 0;
- db.allDocs(options);
- } else {
- if (viewName == "_temp_view") {
- $("#viewcode").show().removeClass("collapsed");
- var mapFun = $("#viewcode_map").val();
- $.futon.storage.set("map_fun", mapFun);
- var reduceFun = $.trim($("#viewcode_reduce").val()) || null;
- if (reduceFun) {
- $.futon.storage.set("reduce_fun", reduceFun);
- if ($("#reduce :checked").length) {
- var level = parseInt($("#grouplevel select").val(), 10);
- options.group = level > 0;
- if (options.group && level < 100) {
- options.group_level = level;
- }
- } else {
- options.reduce = false;
- }
- }
- $.futon.storage.set("language", page.viewLanguage);
- db.query(mapFun, reduceFun, page.viewLanguage, options);
- } else if (viewName == "_design_docs") {
- options.startkey = options.descending ? "_design0" : "_design";
- options.endkey = options.descending ? "_design" : "_design0";
- db.allDocs(options);
- } else {
- $("button.compactview").show();
- $("#viewcode").show();
- var currentMapCode = $("#viewcode_map").val();
- var currentReduceCode = $.trim($("#viewcode_reduce").val()) || null;
- if (currentReduceCode) {
- if ($("#reduce :checked").length) {
- var level = parseInt($("#grouplevel select").val(), 10);
- options.group = level > 0;
- if (options.group && level < 100) {
- options.group_level = level;
- }
- } else {
- options.reduce = false;
- }
- }
- if (page.isDirty) {
- db.query(currentMapCode, currentReduceCode, page.viewLanguage, options);
- } else {
- var viewParts = decodeURIComponent(viewName).split('/');
- if ($.futon.storage.get("stale")) {
- options.stale = "ok";
- }
-
- db.view(viewParts[1] + "/" + viewParts[3], options);
- }
- }
- }
- }
-
- window.onbeforeunload = function() {
- $("#switch select").val(viewName);
- if (page.isDirty) {
- return "You've made changes to the view code that have not been " +
- "saved yet.";
- }
- }
-
- },
-
- // Page class for browse/document.html
- CouchDocumentPage: function() {
- var urlParts = location.search.substr(1).split("/");
- var dbName = decodeURIComponent(urlParts.shift());
- if (urlParts.length) {
- var idParts = urlParts.join("/").split("@", 2);
- var docId = decodeURIComponent(idParts[0]);
- var docRev = (idParts.length > 1) ? idParts[1] : null;
- this.isNew = false;
- } else {
- var docId = $.couch.newUUID();
- var docRev = null;
- this.isNew = true;
- }
- var db = $.couch.db(dbName);
-
- $.futon.storage.declare("tab", {defaultValue: "tabular", scope: "cookie"});
-
- this.dbName = dbName;
- this.db = db;
- this.docId = docId;
- this.doc = null;
- this.isDirty = this.isNew;
- page = this;
-
- this.activateTabularView = function() {
- if ($("#fields tbody.source textarea").length > 0)
- return;
-
- $.futon.storage.set("tab", "tabular");
- $("#tabs li").removeClass("active").filter(".tabular").addClass("active");
- $("#fields thead th:first").text("Field").attr("colspan", 1).next().show();
- $("#fields tbody.content").show();
- $("#fields tbody.source").hide();
- return false;
- }
-
- this.activateSourceView = function() {
- $.futon.storage.set("tab", "source");
- $("#tabs li").removeClass("active").filter(".source").addClass("active");
- $("#fields thead th:first").text("Source").attr("colspan", 2).next().hide();
- $("#fields tbody.content").hide();
- $("#fields tbody.source").find("td").each(function() {
- $(this).html($("<pre></pre>").html($.futon.formatJSON(page.doc, {html: true})))
- .makeEditable({allowEmpty: false,
- createInput: function(value) {
- var rows = value.split("\n").length;
- return $("<textarea rows='" + rows + "' cols='80' spellcheck='false'></textarea>").enableTabInsertion();
- },
- prepareInput: function(input) {
- $(input).makeResizable({vertical: true});
- },
- end: function() {
- $(this).html($("<pre></pre>").html($.futon.formatJSON(page.doc, {html: true})));
- },
- accept: function(newValue) {
- page.doc = JSON.parse(newValue);
- page.isDirty = true;
- page.updateFieldListing(true);
- },
- populate: function(value) {
- return $.futon.formatJSON(page.doc);
- },
- validate: function(value) {
- try {
- var doc = JSON.parse(value);
- if (typeof doc != "object")
- throw new SyntaxError("Please enter a valid JSON document (for example, {}).");
- return true;
- } catch (err) {
- var msg = err.message;
- if (msg == "parseJSON" || msg == "JSON.parse") {
- msg = "There is a syntax error in the document.";
- }
- $("<div class='error'></div>").text(msg).appendTo(this);
- return false;
- }
- }
- });
- }).end().show();
- return false;
- }
-
- this.addField = function() {
- if (!$("#fields tbody.content:visible").length) {
- location.hash = "#tabular";
- page.activateTabularView();
- }
- var fieldName = "unnamed";
- var fieldIdx = 1;
- while (page.doc.hasOwnProperty(fieldName)) {
- fieldName = "unnamed " + fieldIdx++;
- }
- page.doc[fieldName] = null;
- var row = _addRowForField(page.doc, fieldName);
- page.isDirty = true;
- row.find("th b").dblclick();
- }
-
- var _sortFields = function(a, b) {
- var a0 = a.charAt(0), b0 = b.charAt(0);
- if (a0 == "_" && b0 != "_") {
- return -1;
- } else if (a0 != "_" && b0 == "_") {
- return 1;
- } else if (a == "_attachments" || b == "_attachments") {
- return a0 == "_attachments" ? 1 : -1;
- } else {
- return a < b ? -1 : a != b ? 1 : 0;
- }
- }
-
- this.updateFieldListing = function(noReload) {
- $("#fields tbody.content").empty();
-
- function handleResult(doc, revs) {
- page.doc = doc;
- var propNames = [];
- for (var prop in doc) {
- propNames.push(prop);
- }
- // Order properties alphabetically, but put internal fields first
- propNames.sort(_sortFields);
- for (var pi = 0; pi < propNames.length; pi++) {
- _addRowForField(doc, propNames[pi]);
- }
- if (revs.length > 1) {
- var currentIndex = 0;
- for (var i = 0; i < revs.length; i++) {
- if (revs[i].rev == doc._rev) {
- currentIndex = i;
- break;
- }
- }
- if (currentIndex < revs.length - 1) {
- var prevRev = revs[currentIndex + 1].rev;
- $("#paging a.prev").attr("href", "?" + encodeURIComponent(dbName) +
- "/" + $.couch.encodeDocId(docId) + "@" + prevRev);
- }
- if (currentIndex > 0) {
- var nextRev = revs[currentIndex - 1].rev;
- $("#paging a.next").attr("href", "?" + encodeURIComponent(dbName) +
- "/" + $.couch.encodeDocId(docId) + "@" + nextRev);
- }
- $("#fields tbody.footer td span").text("Showing revision " +
- (revs.length - currentIndex) + " of " + revs.length);
- }
- if ($.futon.storage.get("tab") == "source") {
- page.activateSourceView();
- }
- }
-
- if (noReload) {
- handleResult(page.doc, []);
- return;
- }
-
- if (!page.isNew) {
- db.openDoc(docId, {revs_info: true,
- error: function(status, error, reason) {
- alert("Error: " + error + "\n\n" + reason);
- },
- success: function(doc) {
- var revs = doc._revs_info || [];
- delete doc._revs_info;
- if (docRev != null) {
- db.openDoc(docId, {rev: docRev,
- error: function(status, error, reason) {
- alert("The requested revision was not found. You will " +
- "be redirected back to the latest revision.");
- location.href = "?" + encodeURIComponent(dbName) +
- "/" + $.couch.encodeDocId(docId);
- },
- success: function(doc) {
- handleResult(doc, revs);
- }
- });
- } else {
- handleResult(doc, revs);
- }
- }
- });
- } else {
- handleResult({_id: docId}, []);
- $("#fields tbody td").dblclick();
- }
- }
-
- this.deleteDocument = function() {
- $.showDialog("dialog/_delete_document.html", {
- submit: function(data, callback) {
- db.removeDoc(page.doc, {
- success: function(resp) {
- callback();
- location.href = "database.html?" + encodeURIComponent(dbName);
- }
- });
- }
- });
- }
-
- this.saveDocument = function() {
- db.saveDoc(page.doc, {
- error: function(status, error, reason) {
- alert("Error: " + error + "\n\n" + reason);
- },
- success: function(resp) {
- page.isDirty = false;
- location.href = "?" + encodeURIComponent(dbName) +
- "/" + $.couch.encodeDocId(resp.id);
- }
- });
- }
-
- this.uploadAttachment = function() {
- if (page.isDirty) {
- alert("You need to save or revert any changes you have made to the " +
- "document before you can attach a new file.");
- return false;
- }
- $.showDialog("dialog/_upload_attachment.html", {
- load: function(elem) {
- $("input[name='_rev']", elem).val(page.doc._rev);
- },
- submit: function(data, callback) {
- if (!data._attachments || data._attachments.length == 0) {
- callback({_attachments: "Please select a file to upload."});
- return;
- }
- var form = $("#upload-form");
- form.find("#progress").css("visibility", "visible");
- form.ajaxSubmit({
- url: db.uri + $.couch.encodeDocId(page.docId),
- success: function(resp) {
- form.find("#progress").css("visibility", "hidden");
- page.isDirty = false;
- location.href = "?" + encodeURIComponent(dbName) +
- "/" + $.couch.encodeDocId(page.docId);
- }
- });
- }
- });
- }
-
- window.onbeforeunload = function() {
- if (page.isDirty) {
- return "You've made changes to this document that have not been " +
- "saved yet.";
- }
- }
-
- function _addRowForField(doc, fieldName) {
- var row = $("<tr><th></th><td></td></tr>")
- .find("th").append($("<b></b>").text(fieldName)).end()
- .appendTo("#fields tbody.content");
- if (fieldName == "_attachments") {
- row.find("td").append(_renderAttachmentList(doc[fieldName]));
- } else {
- row.find("td").append(_renderValue(doc[fieldName]));
- _initKey(doc, row, fieldName);
- _initValue(doc, row, fieldName);
- }
- $("#fields tbody.content tr").removeClass("odd").filter(":odd").addClass("odd");
- row.data("name", fieldName);
- return row;
- }
-
- function _initKey(doc, row, fieldName) {
- if (fieldName == "_id" || fieldName == "_rev") {
- return;
- }
-
- var cell = row.find("th");
-
- $("<button type='button' class='delete' title='Delete field'></button>").click(function() {
- delete doc[fieldName];
- row.remove();
- page.isDirty = true;
- $("#fields tbody.content tr").removeClass("odd").filter(":odd").addClass("odd");
- }).prependTo(cell);
-
- cell.find("b").makeEditable({allowEmpty: false,
- accept: function(newName, oldName) {
- doc[newName] = doc[oldName];
- delete doc[oldName];
- row.data("name", newName);
- $(this).text(newName);
- page.isDirty = true;
- },
- begin: function() {
- row.find("th button.delete").hide();
- return true;
- },
- end: function(keyCode) {
- row.find("th button.delete").show();
- if (keyCode == 9) { // tab, move to editing the value
- row.find("td").dblclick();
- }
- },
- validate: function(newName, oldName) {
- $("div.error", this).remove();
- if (newName != oldName && doc[newName] !== undefined) {
- $("<div class='error'>Already have field with that name.</div>")
- .appendTo(this);
- return false;
- }
- return true;
- }
- });
- }
-
- function _initValue(doc, row, fieldName) {
- if ((fieldName == "_id" && !page.isNew) || fieldName == "_rev") {
- return;
- }
-
- row.find("td").makeEditable({acceptOnBlur: false, allowEmpty: true,
- createInput: function(value) {
- value = doc[row.data("name")];
- var elem = $(this);
- if (elem.find("dl").length > 0 ||
- elem.find("code").is(".array, .object") ||
- typeof(value) == "string" && (value.length > 60 || value.match(/\n/))) {
- return $("<textarea rows='1' cols='40' spellcheck='false'></textarea>");
- }
- return $("<input type='text' spellcheck='false'>");
- },
- end: function() {
- $(this).children().remove();
- $(this).append(_renderValue(doc[row.data("name")]));
- },
- prepareInput: function(input) {
- if ($(input).is("textarea")) {
- var height = Math.min(input.scrollHeight, document.body.clientHeight - 100);
- $(input).height(height).makeResizable({vertical: true}).enableTabInsertion();
- }
- },
- accept: function(newValue) {
- var fieldName = row.data("name");
- try {
- doc[fieldName] = JSON.parse(newValue);
- } catch (err) {
- doc[fieldName] = newValue;
- }
- page.isDirty = true;
- if (fieldName == "_id") {
- page.docId = page.doc._id = doc[fieldName];
- $("h1 strong").text(page.docId);
- }
- },
- populate: function(value) {
- value = doc[row.data("name")];
- if (typeof(value) == "string") {
- return value;
- }
- return $.futon.formatJSON(value);
- },
- validate: function(value) {
- $("div.error", this).remove();
- try {
- var parsed = JSON.parse(value);
- if (row.data("name") == "_id" && typeof(parsed) != "string") {
- $("<div class='error'>The document ID must be a string.</div>")
- .appendTo(this);
- return false;
- }
- return true;
- } catch (err) {
- return true;
- }
- }
- });
- }
-
- function _renderValue(value) {
- function isNullOrEmpty(val) {
- if (val == null) return true;
- for (var i in val) return false;
- return true;
- }
- function render(val) {
- var type = typeof(val);
- if (type == "object" && !isNullOrEmpty(val)) {
- var list = $("<dl></dl>");
- for (var i in val) {
- $("<dt></dt>").text(i).appendTo(list);
- $("<dd></dd>").append(render(val[i])).appendTo(list);
- }
- return list;
- } else {
- var html = $.futon.formatJSON(val, {
- html: true,
- escapeStrings: false
- });
- var n = $(html);
- if (n.text().length > 140) {
- // This code reduces a long string in to a summarized string with a link to expand it.
- // Someone, somewhere, is doing something nasty with the event after it leaves these handlers.
- // At this time I can't track down the offender, it might actually be a jQuery propogation issue.
- var fulltext = n.text();
- var mintext = n.text().slice(0, 140);
- var e = $('<a href="#expand">...</a>');
- var m = $('<a href="#min">X</a>');
- var expand = function (evt) {
- n.empty();
- n.text(fulltext);
- n.append(m);
- evt.stopPropagation();
- evt.stopImmediatePropagation();
- evt.preventDefault();
- }
- var minimize = function (evt) {
- n.empty();
- n.text(mintext);
- // For some reason the old element's handler won't fire after removed and added again.
- e = $('<a href="#expand">...</a>');
- e.click(expand);
- n.append(e);
- evt.stopPropagation();
- evt.stopImmediatePropagation();
- evt.preventDefault();
- }
- e.click(expand);
- n.click(minimize);
- n.text(mintext);
- n.append(e)
- }
- return n;
- }
- }
- var elem = render(value);
-
- elem.find("dd:has(dl)").hide().prev("dt").addClass("collapsed");
- elem.find("dd:not(:has(dl))").addClass("inline").prev().addClass("inline");
- elem.find("dt.collapsed").click(function() {
- $(this).toggleClass("collapsed").next().toggle();
- });
-
- return elem;
- }
-
- function _renderAttachmentList(attachments) {
- var ul = $("<ul></ul>").addClass("attachments");
- $.each(attachments, function(idx, attachment) {
- _renderAttachmentItem(idx, attachment).appendTo(ul);
- });
- return ul;
- }
-
- function _renderAttachmentItem(name, attachment) {
- var attachmentHref = db.uri + $.couch.encodeDocId(page.docId)
- + "/" + encodeAttachment(name);
- var li = $("<li></li>");
- $("<a href='' title='Download file' target='_top'></a>").text(name)
- .attr("href", attachmentHref)
- .wrapInner("<tt></tt>").appendTo(li);
- $("<span>()</span>").text("" + $.futon.formatSize(attachment.length) +
- ", " + attachment.content_type).addClass("info").appendTo(li);
- if (name == "tests.js") {
- li.find('span.info').append(', <a href="/_utils/couch_tests.html?'
- + attachmentHref + '">open in test runner</a>');
- }
- _initAttachmentItem(name, attachment, li);
- return li;
- }
-
- function _initAttachmentItem(name, attachment, li) {
- $("<button type='button' class='delete' title='Delete attachment'></button>").click(function() {
- if (!li.siblings("li").length) {
- delete page.doc._attachments;
- li.parents("tr").remove();
- $("#fields tbody.content tr").removeClass("odd").filter(":odd").addClass("odd");
- } else {
- delete page.doc._attachments[name];
- li.remove();
- }
- page.isDirty = true;
- return false;
- }).prependTo($("a", li));
- }
- }
- });
-
- function encodeAttachment(name) {
- var encoded = [], parts = name.split('/');
- for (var i=0; i < parts.length; i++) {
- encoded.push(encodeURIComponent(parts[i]));
- };
- return encoded.join('%2f');
- }
-
-})(jQuery);
diff --git a/share/www/script/futon.format.js b/share/www/script/futon.format.js
deleted file mode 100644
index 0eb9b1047..000000000
--- a/share/www/script/futon.format.js
+++ /dev/null
@@ -1,146 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-(function($) {
- $.futon = $.futon || {};
- $.extend($.futon, {
- escape: function(string) {
- return string.replace(/&/g, "&amp;")
- .replace(/</g, "&lt;")
- .replace(/>/g, "&gt;")
- .replace(/"/g, "&quot;")
- .replace(/'/g, "&#39;")
- ;
- },
-
- // JSON pretty printing
- formatJSON: function(val, options) {
- options = $.extend({
- escapeStrings: true,
- indent: 4,
- linesep: "\n",
- quoteKeys: true
- }, options || {});
- var itemsep = options.linesep.length ? "," + options.linesep : ", ";
-
- function format(val, depth) {
- var tab = [];
- for (var i = 0; i < options.indent * depth; i++) tab.push("");
- tab = tab.join(" ");
-
- var type = typeof val;
- switch (type) {
- case "boolean":
- case "number":
- case "string":
- var retval = val;
- if (type == "string" && !options.escapeStrings) {
- retval = indentLines(retval.replace(/\r\n/g, "\n"), tab.substr(options.indent));
- } else {
- if (options.html) {
- retval = $.futon.escape(JSON.stringify(val));
- } else {
- retval = JSON.stringify(val);
- }
- }
- if (options.html) {
- retval = "<code class='" + type + "'>" + retval + "</code>";
- }
- return retval;
-
- case "object": {
- if (val === null) {
- if (options.html) {
- return "<code class='null'>null</code>";
- }
- return "null";
- }
- if (val.constructor == Date) {
- return JSON.stringify(val);
- }
-
- var buf = [];
-
- if (val.constructor == Array) {
- buf.push("[");
- for (var index = 0; index < val.length; index++) {
- buf.push(index > 0 ? itemsep : options.linesep);
- buf.push(tab, format(val[index], depth + 1));
- }
- if (index >= 0) {
- buf.push(options.linesep, tab.substr(options.indent));
- }
- buf.push("]");
- if (options.html) {
- return "<code class='array'>" + buf.join("") + "</code>";
- }
-
- } else {
- buf.push("{");
- var index = 0;
- for (var key in val) {
- buf.push(index > 0 ? itemsep : options.linesep);
- var keyDisplay = options.quoteKeys ? JSON.stringify(key) : key;
- if (options.html) {
- if (options.quoteKeys) {
- keyDisplay = keyDisplay.substr(1, keyDisplay.length - 2);
- }
- keyDisplay = "<code class='key'>" + $.futon.escape(keyDisplay) + "</code>";
- if (options.quoteKeys) {
- keyDisplay = '"' + keyDisplay + '"';
- }
- }
- buf.push(tab, keyDisplay,
- ": ", format(val[key], depth + 1));
- index++;
- }
- if (index >= 0) {
- buf.push(options.linesep, tab.substr(options.indent));
- }
- buf.push("}");
- if (options.html) {
- return "<code class='object'>" + buf.join("") + "</code>";
- }
- }
-
- return buf.join("");
- }
- }
- }
-
- function indentLines(text, tab) {
- var lines = text.split("\n");
- for (var i in lines) {
- lines[i] = (i > 0 ? tab : "") + $.futon.escape(lines[i]);
- }
- return lines.join("<br>");
- }
-
- return format(val, 1);
- },
-
- // File size pretty printing
- formatSize: function(size) {
- var jump = 512;
- if (size < jump) return size + " bytes";
- var units = ["KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
- var i = 0;
- while (size >= jump && i < units.length) {
- i += 1;
- size /= 1024
- }
- return size.toFixed(1) + ' ' + units[i - 1];
- }
-
- });
-
-})(jQuery);
diff --git a/share/www/script/futon.js b/share/www/script/futon.js
deleted file mode 100644
index 409becc50..000000000
--- a/share/www/script/futon.js
+++ /dev/null
@@ -1,597 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// $$ inspired by @wycats: http://yehudakatz.com/2009/04/20/evented-programming-with-jquery/
-function $$(node) {
- var data = $(node).data("$$");
- if (data) {
- return data;
- } else {
- data = {};
- $(node).data("$$", data);
- return data;
- }
-};
-
-(function($) {
-
- function Session() {
-
- function doLogin(name, password, callback) {
- $.couch.login({
- name : name,
- password : password,
- success : function() {
- $.futon.session.sidebar();
- callback();
- },
- error : function(code, error, reason) {
- $.futon.session.sidebar();
- callback({name : "Error logging in: "+reason});
- }
- });
- };
-
- function doSignup(name, password, callback, runLogin) {
- $.couch.signup({
- name : name
- }, password, {
- success : function() {
- if (runLogin) {
- doLogin(name, password, callback);
- } else {
- callback();
- }
- },
- error : function(status, error, reason) {
- $.futon.session.sidebar();
- if (error == "conflict") {
- callback({name : "Name '"+name+"' is taken"});
- } else {
- callback({name : "Signup error: "+reason});
- }
- }
- });
- };
-
- function validateUsernameAndPassword(data, callback) {
- if (!data.name || data.name.length == 0) {
- callback({name: "Please enter a name."});
- return false;
- };
- return validatePassword(data, callback);
- };
-
- function validatePassword(data, callback) {
- if (!data.password || data.password.length == 0) {
- callback({password: "Please enter a password."});
- return false;
- };
- return true;
- };
-
- function createAdmin() {
- $.showDialog("dialog/_create_admin.html", {
- submit: function(data, callback) {
- if (!validateUsernameAndPassword(data, callback)) return;
- $.couch.config({
- success : function() {
- setTimeout(function() {
- doLogin(data.name, data.password, function(errors) {
- if(!$.isEmptyObject(errors)) {
- callback(errors);
- return;
- }
- doSignup(data.name, null, function(errors) {
- if (errors && errors.name && errors.name.indexOf && errors.name.indexOf("taken") == -1) {
- callback(errors);
- } else {
- callback();
- }
- }, false);
- });
- }, 200);
- }
- }, "admins", data.name, data.password);
- }
- });
- return false;
- };
-
- function login() {
- $.showDialog("dialog/_login.html", {
- submit: function(data, callback) {
- if (!validateUsernameAndPassword(data, callback)) return;
- doLogin(data.name, data.password, callback);
- }
- });
- return false;
- };
-
- function logout() {
- $.couch.logout({
- success : function(resp) {
- $.futon.session.sidebar();
- },
- error: function(status, e, reason) {
- alert('An error occurred logging out: ' + reason);
- }
- })
- };
-
- function signup() {
- $.showDialog("dialog/_signup.html", {
- submit: function(data, callback) {
- if (!validateUsernameAndPassword(data, callback)) return;
- doSignup(data.name, data.password, callback, true);
- }
- });
- return false;
- };
-
- function changePassword () {
- var updateUserDoc = function(resp, data) {
- // regular users get their _users doc updated
- $.couch.db(resp.info.authentication_db).openDoc("org.couchdb.user:"+resp.userCtx.name, {
- error: function () {
- // ignore 404
- location.reload();
- },
- success: function (user) {
- user.password = data.password;
- $.couch.db(resp.info.authentication_db).saveDoc(user, {
- success: function() {
- doLogin(user.name, user.password, function(errors) {
- if(!$.isEmptyObject(errors)) {
- callback(errors);
- return;
- } else {
- location.reload();
- }
- });
- }
- });
- }
- });
- }
-
- $.showDialog("dialog/_change_password.html", {
- submit: function(data, callback) {
- if (validatePassword(data, callback)) {
- if (data.password != data.verify_password) {
- callback({verify_password: "Passwords don't match."});
- return false;
- }
- } else {
- return false;
- }
- $.couch.session({
- error: function(status, e, reason) {
- alert('Could not get your session info: ' + reason);
- },
- success: function (resp) {
- // admin users may have a config entry, change the password
- // there first. Update their user doc later, if it exists
- if (resp.userCtx.roles.indexOf("_admin") > -1) { // user is admin
- // check whether we have a config entry
- $.couch.config({
- success : function (response) { // er do have a config entry
- $.couch.config({
- success : function () {
- window.setTimeout(function() {
- doLogin(resp.userCtx.name, data.password, function(errors) {
- if(!$.isEmptyObject(errors)) {
- callback(errors);
- return;
- } else {
- location.reload();
- }
- });
- }, 1000);
- },
- error: function(status, e, reason) {
- callback('Could not persist the new password: ' + reason);
- }
- }, "admins", resp.userCtx.name, data.password);
- }
- }, "admins", resp.userCtx.name);
- } else { // non-admin users, update their user doc
- updateUserDoc(resp, data);
- }
- }
- });
- }
- });
- return false;
- };
-
- this.setupSidebar = function() {
- $("#userCtx .login").click(login);
- $("#userCtx .logout").click(logout);
- $("#userCtx .signup").click(signup);
- $("#userCtx .createadmin").click(createAdmin);
- $("#userCtx .changepass").click(changePassword);
- };
-
- this.sidebar = function() {
- // get users db info?
- $("#userCtx span").hide();
- $(".serverAdmin").attr('disabled', 'disabled');
-
- $.couch.session({
- success : function(r) {
- var userCtx = r.userCtx;
-
- var urlParts = location.search.substr(1).split("/");
- var dbName = decodeURIComponent(urlParts.shift());
- var dbNameRegExp = new RegExp("[^a-z0-9\_\$\(\)\+\/\-]", "g");
- dbName = dbName.replace(dbNameRegExp, "");
-
- $$("#userCtx").userCtx = userCtx;
- if (userCtx.name) {
- $("#userCtx .name").text(userCtx.name).attr({href : $.couch.urlPrefix + "/_utils/document.html?"+encodeURIComponent(r.info.authentication_db)+"/org.couchdb.user%3A"+encodeURIComponent(userCtx.name)});
-
- if ($.inArray("_admin", userCtx.roles) != -1) {
- $("#userCtx .loggedin").show();
- $("#userCtx .loggedinadmin").show();
- $(".serverAdmin").removeAttr('disabled'); // user is a server admin
- } else {
- $("#userCtx .loggedin").show();
-
- if (dbName != "") {
- $.couch.db(dbName).getDbProperty("_security", { // check security roles for user admins
- success: function(resp) {
- var adminRoles = resp.admins.roles;
-
- if ($.inArray(userCtx.name, resp.admins.names)>=0) { // user is admin
- $(".userAdmin").removeAttr('disabled');
- }
- else {
- for (var i=0; i<userCtx.roles.length; i++) {
- if ($.inArray(userCtx.roles[i], resp.admins.roles)>=0) { // user has role that is an admin
- $(".userAdmin").removeAttr('disabled');
- }
- }
- }
- }
- });
- }
- }
- } else if ($.inArray("_admin", userCtx.roles) != -1) {
- $("#userCtx .adminparty").show();
- $(".serverAdmin").removeAttr('disabled');
- } else {
- $("#userCtx .loggedout").show();
- };
- }
- })
- };
- };
-
- function Navigation() {
- var nav = this;
- this.loaded = false;
- this.eventHandlers = {
- load: []
- };
-
- this.ready = function(callback) {
- if (callback) {
- if (this.loaded) {
- callback.apply(this);
- }
- this.eventHandlers["load"].push(callback);
- } else {
- this.loaded = true;
- callbacks = this.eventHandlers["load"];
- for (var i = 0; i < callbacks.length; i++) {
- callbacks[i].apply(this);
- }
- }
- }
-
- this.addDatabase = function(name) {
- var current = $.futon.storage.get("recent", "");
- var recentDbs = current ? current.split(",") : [];
- if ($.inArray(name, recentDbs) == -1) {
- recentDbs.unshift(name);
- if (recentDbs.length > 10) recentDbs.length = 10;
- $.futon.storage.set("recent", recentDbs.join(","));
- this.updateDatabases();
- }
- }
-
- this.removeDatabase = function(name) {
- // remove database from recent databases list
- var current = $.futon.storage.get("recent", "");
- var recentDbs = current ? current.split(",") : [];
- var recentIdx = $.inArray(name, recentDbs);
- if (recentIdx >= 0) {
- recentDbs.splice(recentIdx, 1);
- $.futon.storage.set("recent", recentDbs.join(","));
- this.updateDatabases();
- }
- }
-
- this.updateDatabases = function() {
- var selection = null;
- $("#dbs .selected a").each(function() {
- selection = [this.pathname, this.search];
- });
- $("#dbs").empty();
- var recentDbs = $.futon.storage.get("recent").split(",");
- recentDbs.sort();
- $.each(recentDbs, function(idx, name) {
- if (name) {
- name = encodeURIComponent(name);
- $("#dbs").append("<li>" +
- "<button class='remove' title='Remove from list' value='" + name + "'></button>" +
- "<a href='database.html?" + name + "' title='" + name + "'>" + name +
- "</a></li>");
- }
- });
- if (selection) {
- this.updateSelection(selection[0], selection[1]);
- }
- $("#dbs button.remove").click(function() {
- nav.removeDatabase(this.value);
- return false;
- });
- }
-
- this.updateSelection = function(path, queryString) {
- function fixupPath(path) { // hack for IE/Win
- return (path.charAt(0) != "/") ? ("/" + path) : path;
- }
- if (!path) {
- path = location.pathname;
- if (!queryString) {
- queryString = location.search;
- }
- } else if (!queryString) {
- queryString = "";
- }
- var href = fixupPath(path + queryString);
- $("#nav li").removeClass("selected");
- $("#nav li a").each(function() {
- if (fixupPath(this.pathname) + this.search != href) return;
- $(this).parent("li").addClass("selected").parents("li").addClass("selected");
- });
- }
-
- this.toggle = function(speed) {
- if (speed === undefined) {
- speed = 500;
- }
- var sidebar = $("#sidebar").stop(true, true);
- var hidden = !$(sidebar).is(".hidden");
-
- $("#wrap").animate({
- marginRight: hidden ? 0 : 210
- }, speed, function() {
- $(document.body).toggleClass("fullwidth", hidden);
- });
- sidebar.toggleClass("hidden").animate({
- width: hidden ? 26 : 210,
- height: hidden ? $("h1").outerHeight() - 1 : "100%",
- right: hidden ? 0 : -210
- }, speed).children(":not(#sidebar-toggle)").animate({
- opacity: "toggle"
- }, speed);
- $("h1").animate({marginRight: hidden ? 26 : 0}, speed);
-
- $("#sidebar-toggle")
- .attr("title", hidden ? "Show Sidebar" : "Hide Sidebar");
- $.futon.storage.set("sidebar", hidden ? "hidden" : "show");
- };
- }
-
- function Storage() {
- var storage = this;
- this.decls = {};
-
- this.declare = function(name, options) {
- this.decls[name] = $.extend({}, {
- scope: "window",
- defaultValue: null,
- prefix: ""
- }, options || {});
- }
-
- this.declareWithPrefix = function(prefix, decls) {
- for (var name in decls) {
- var options = decls[name];
- options.prefix = prefix;
- storage.declare(name, options);
- }
- }
-
- this.del = function(name) {
- lookup(name, function(decl) {
- handlers[decl.scope].del(decl.prefix + name);
- });
- }
-
- this.get = function(name, defaultValue) {
- return lookup(name, function(decl) {
- var value = handlers[decl.scope].get(decl.prefix + name);
- if (value !== undefined) {
- return value;
- }
- if (defaultValue !== undefined) {
- return defaultValue;
- }
- return decl.defaultValue;
- });
- }
-
- this.set = function(name, value) {
- lookup(name, function(decl) {
- if (value == decl.defaultValue) {
- handlers[decl.scope].del(decl.prefix + name);
- } else {
- handlers[decl.scope].set(decl.prefix + name, value);
- }
- });
- }
-
- function lookup(name, callback) {
- var decl = storage.decls[name];
- if (decl === undefined) {
- return decl;
- }
- return callback(decl);
- }
-
- function windowName() {
- try {
- return JSON.parse(window.name || "{}");
- } catch (e) {
- return {};
- }
- }
-
- // add suffix to cookie names to be able to separate between ports
- var cookiePrefix = location.port + "_";
-
- var handlers = {
-
- "cookie": {
- get: function(name) {
- var nameEq = cookiePrefix + name + "=";
- var parts = document.cookie.split(';');
- for (var i = 0; i < parts.length; i++) {
- var part = parts[i].replace(/^\s+/, "");
- if (part.indexOf(nameEq) == 0) {
- return unescape(part.substring(nameEq.length, part.length));
- }
- }
- },
- set: function(name, value) {
- var date = new Date();
- date.setTime(date.getTime() + 14*24*60*60*1000); // two weeks
- document.cookie = cookiePrefix + name + "=" + escape(value) +
- "; expires=" + date.toGMTString();
- },
- del: function(name) {
- var date = new Date();
- date.setTime(date.getTime() - 24*60*60*1000); // yesterday
- document.cookie = cookiePrefix + name + "=" +
- "; expires=" + date.toGMTString();
- }
- },
-
- "window": {
- get: function(name) {
- return windowName()[name];
- },
- set: function(name, value) {
- var obj = windowName();
- obj[name] = value || null;
- window.name = JSON.stringify(obj);
- },
- del: function(name) {
- var obj = windowName();
- delete obj[name];
- window.name = JSON.stringify(obj);
- }
- }
-
- };
-
- }
-
- $.couch.urlPrefix = "..";
- $.futon = $.futon || {};
- $.extend($.futon, {
- navigation: new Navigation(),
- session : new Session(),
- storage: new Storage()
- });
-
- $.fn.addPlaceholder = function() {
- if (this[0] && "placeholder" in document.createElement("input")) {
- return; // found native placeholder support
- }
- return this.live('focusin', function() {
- var input = $(this);
- if (input.val() === input.attr("placeholder")) {
- input.removeClass("placeholder").val("");
- }
- }).live("focusout", function() {
- var input = $(this);
- if (input.val() === "") {
- input.val(input.attr("placeholder")).addClass("placeholder");
- }
- }).trigger("focusout");
- }
-
- $.fn.enableTabInsertion = function(chars) {
- chars = chars || "\t";
- var width = chars.length;
- return this.keydown(function(evt) {
- if (evt.keyCode == 9) {
- var v = this.value;
- var start = this.selectionStart;
- var scrollTop = this.scrollTop;
- if (start !== undefined) {
- this.value = v.slice(0, start) + chars + v.slice(start);
- this.selectionStart = this.selectionEnd = start + width;
- } else {
- document.selection.createRange().text = chars;
- this.caretPos += width;
- }
- return false;
- }
- });
- }
-
- $(document)
- .ajaxStart(function() { $(this.body).addClass("loading"); })
- .ajaxStop(function() { $(this.body).removeClass("loading"); });
-
- $.futon.storage.declare("sidebar", {scope: "cookie", defaultValue: "show"});
- $.futon.storage.declare("recent", {scope: "cookie", defaultValue: ""});
-
- $(function() {
- document.title = "Apache CouchDB - Futon: " + document.title;
- if ($.futon.storage.get("sidebar") == "hidden") {
- // doing this as early as possible prevents flickering
- $(document.body).addClass("fullwidth");
- }
- $("input[placeholder]").addPlaceholder();
-
- $.get("_sidebar.html", function(resp) {
- $("#wrap").append(resp)
- .find("#sidebar-toggle").click(function(e) {
- $.futon.navigation.toggle(e.shiftKey ? 2500 : 500);
- return false;
- });
- if ($.futon.storage.get("sidebar") == "hidden") {
- $.futon.navigation.toggle(0);
- }
-
- $.futon.navigation.updateDatabases();
- $.futon.navigation.updateSelection();
- $.futon.navigation.ready();
- $.futon.session.setupSidebar();
- $.futon.session.sidebar();
-
- $.couch.info({
- success: function(info, status) {
- $("#version").text(info.version);
- }
- });
- });
- });
-
-})(jQuery);
diff --git a/share/www/script/jquery-ui-1.8.11.custom.min.js b/share/www/script/jquery-ui-1.8.11.custom.min.js
deleted file mode 100644
index 45b927e03..000000000
--- a/share/www/script/jquery-ui-1.8.11.custom.min.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/*!
- * jQuery UI 1.8.11
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI
- */
-(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.11",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,
-NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,
-"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");
-if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,
-"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,
-d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}});
-c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&
-b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);
-;/*!
- * jQuery UI Widget 1.8.11
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Widget
- */
-(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
-a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;
-e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,
-this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
-widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},
-enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
-;/*
- * jQuery UI Position 1.8.11
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Position
- */
-(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY,
-left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+=
-k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-=
-m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left=
-d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+=
-a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b),
-g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery);
-;/*
- * jQuery UI Autocomplete 1.8.11
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Autocomplete
- *
- * Depends:
- * jquery.ui.core.js
- * jquery.ui.widget.js
- * jquery.ui.position.js
- */
-(function(d){var e=0;d.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,b=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.attr("readonly"))){g=
-false;var f=d.ui.keyCode;switch(c.keyCode){case f.PAGE_UP:a._move("previousPage",c);break;case f.PAGE_DOWN:a._move("nextPage",c);break;case f.UP:a._move("previous",c);c.preventDefault();break;case f.DOWN:a._move("next",c);c.preventDefault();break;case f.ENTER:case f.NUMPAD_ENTER:if(a.menu.active){g=true;c.preventDefault()}case f.TAB:if(!a.menu.active)return;a.menu.select(c);break;case f.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!=
-a.element.val()){a.selectedItem=null;a.search(null,c)}},a.options.delay);break}}}).bind("keypress.autocomplete",function(c){if(g){g=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)};
-this.menu=d("<ul></ul>").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&&
-a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.autocomplete"),i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");
-d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&&
-b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source==="string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",autocompleteRequest:++e,success:function(h){this.autocompleteRequest===e&&f(h)},error:function(){this.autocompleteRequest===e&&f([])}})}}else this.source=
-this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)!==false)return this._search(a)},_search:function(a){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:a},this.response)},_response:function(a){if(!this.options.disabled&&a&&a.length){a=this._normalize(a);this._suggest(a);this._trigger("open")}else this.close();
-this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(a){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",a)}},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(a){if(a.length&&a[0].label&&a[0].value)return a;return d.map(a,function(b){if(typeof b==="string")return{label:b,value:b};return d.extend({label:b.label||
-b.value,value:b.value||b.label},b)})},_suggest:function(a){var b=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(b,a);this.menu.deactivate();this.menu.refresh();b.show();this._resizeMenu();b.position(d.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next(new d.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(a,b){var g=this;
-d.each(b,function(c,f){g._renderItem(a,f)})},_renderItem:function(a,b){return d("<li></li>").data("item.autocomplete",b).append(d("<a></a>").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,
-"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery);
-(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
--1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.attr("scrollTop"),c=this.element.height();if(b<0)this.element.attr("scrollTop",g+b);else b>=c&&this.element.attr("scrollTop",g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})},
-deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);
-e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b,this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e,
-g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first"));
-this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(e){this._trigger("selected",e,{item:this.active})}})})(jQuery);
-; \ No newline at end of file
diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js
deleted file mode 100644
index ffbad3430..000000000
--- a/share/www/script/jquery.couch.js
+++ /dev/null
@@ -1,1079 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-/**
- * @namespace
- * $.couch is used to communicate with a CouchDB server, the server methods can
- * be called directly without creating an instance. Typically all methods are
- * passed an <code>options</code> object which defines a success callback which
- * is called with the data returned from the http request to CouchDB, you can
- * find the other settings that can be used in the <code>options</code> object
- * from <a href="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings">
- * jQuery.ajax settings</a>
- * <pre><code>$.couch.activeTasks({
- * success: function (data) {
- * console.log(data);
- * }
- * });</code></pre>
- * Outputs (for example):
- * <pre><code>[
- * {
- * "pid" : "<0.11599.0>",
- * "status" : "Copied 0 of 18369 changes (0%)",
- * "task" : "recipes",
- * "type" : "Database Compaction"
- * }
- *]</code></pre>
- */
-(function($) {
-
- $.couch = $.couch || {};
- /** @lends $.couch */
-
- /**
- * @private
- */
- function encodeDocId(docID) {
- var parts = docID.split("/");
- if (parts[0] == "_design") {
- parts.shift();
- return "_design/" + encodeURIComponent(parts.join('/'));
- }
- return encodeURIComponent(docID);
- }
-
- /**
- * @private
- */
-
- var uuidCache = [];
-
- $.extend($.couch, {
- urlPrefix: '',
-
- /**
- * You can obtain a list of active tasks by using the /_active_tasks URL.
- * The result is a JSON array of the currently running tasks, with each task
- * being described with a single object.
- * @see <a href="http://docs.couchdb.org/en/latest/api/server/common.html#
- * active-tasks">docs for /_active_tasks</a>
- * @param {ajaxSettings} options <a href="http://api.jquery.com/jQuery.ajax
- * /#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- activeTasks: function(options) {
- return ajax(
- {url: this.urlPrefix + "/_active_tasks"},
- options,
- "Active task status could not be retrieved"
- );
- },
-
- /**
- * Returns a list of all the databases in the CouchDB instance
- * @see <a href="http://docs.couchdb.org/en/latest/api/server/common.html
- * #all-dbs">docs for /_all_dbs</a>
- * @param {ajaxSettings} options <a href="http://api.jquery.com/jQuery.ajax
- * /#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- allDbs: function(options) {
- return ajax(
- {url: this.urlPrefix + "/_all_dbs"},
- options,
- "An error occurred retrieving the list of all databases"
- );
- },
-
- /**
- * View and edit the CouchDB configuration, called with just the options
- * parameter the entire config is returned, you can be more specific by
- * passing the section and option parameters, if you specify a value that
- * value will be stored in the configuration.
- * @see <a href="http://docs.couchdb.org/en/latest/api/server
- * /configuration.html#config-section-key">docs for /_config</a>
- * @param {ajaxSettings} options
- * <a href="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings">
- * jQuery ajax settings</a>
- * @param {String} [section] the section of the config
- * @param {String} [option] the particular config option
- * @param {String} [value] value to be set
- */
- config: function(options, section, option, value) {
- var req = {url: this.urlPrefix + "/_config/"};
- if (section) {
- req.url += encodeURIComponent(section) + "/";
- if (option) {
- req.url += encodeURIComponent(option);
- }
- }
- if (value === null) {
- req.type = "DELETE";
- } else if (value !== undefined) {
- req.type = "PUT";
- req.data = toJSON(value);
- req.contentType = "application/json";
- req.processData = false
- }
-
- return ajax(req, options,
- "An error occurred retrieving/updating the server configuration"
- );
- },
-
- /**
- * Returns the session information for the currently logged in user.
- * @see <a href="http://docs.couchdb.org/en/latest/api/server/authn.html
- * #get--_session">docs for GET /_session</a>
- * @param {ajaxSettings} options
- * <a href="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings">
- * jQuery ajax settings</a>
- */
- session: function(options) {
- options = options || {};
- return ajax({
- type: "GET", url: this.urlPrefix + "/_session",
- beforeSend: function(xhr) {
- xhr.setRequestHeader('Accept', 'application/json');
- },
- complete: function(req) {
- var resp = $.parseJSON(req.responseText);
- if (req.status == 200) {
- if (options.success) options.success(resp);
- } else if (options.error) {
- options.error(req.status, resp.error, resp.reason);
- } else {
- throw "An error occurred getting session info: " + resp.reason;
- }
- }
- });
- },
-
- /**
- * @private
- */
- userDb : function(callback) {
- return $.couch.session({
- success : function(resp) {
- var userDb = $.couch.db(resp.info.authentication_db);
- callback(userDb);
- }
- });
- },
-
- /**
- * Create a new user on the CouchDB server, <code>user_doc</code> is an
- * object with a <code>name</code> field and other information you want
- * to store relating to that user, for example
- * <code>{"name": "daleharvey"}</code>
- * @param {Object} user_doc Users details
- * @param {String} password Users password
- * @param {ajaxSettings} options
- * <a href="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings">
- * jQuery ajax settings</a>
- */
- signup: function(user_doc, password, options) {
- options = options || {};
- user_doc.password = password;
- user_doc.roles = user_doc.roles || [];
- user_doc.type = "user";
- var user_prefix = "org.couchdb.user:";
- user_doc._id = user_doc._id || user_prefix + user_doc.name;
-
- return $.couch.userDb(function(db) {
- db.saveDoc(user_doc, options);
- });
- },
-
- /**
- * Authenticate against CouchDB, the <code>options</code> parameter is
- *expected to have <code>name</code> and <code>password</code> fields.
- * @see <a href="http://docs.couchdb.org/en/latest/api/server/authn.html
- * #post--_session">docs for POST /_session</a>
- * @param {ajaxSettings} options
- * <a href="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings">
- * jQuery ajax settings</a>
- */
- login: function(options) {
- options = options || {};
- return $.ajax({
- type: "POST", url: this.urlPrefix + "/_session", dataType: "json",
- data: {name: options.name, password: options.password},
- beforeSend: function(xhr) {
- xhr.setRequestHeader('Accept', 'application/json');
- },
- complete: function(req) {
- var resp = $.parseJSON(req.responseText);
- if (req.status == 200) {
- if (options.success) options.success(resp);
- } else if (options.error) {
- options.error(req.status, resp.error, resp.reason);
- } else {
- throw 'An error occurred logging in: ' + resp.reason;
- }
- }
- });
- },
-
-
- /**
- * Delete your current CouchDB user session
- * @see <a href="http://docs.couchdb.org/en/latest/api/server/authn.html
- * #delete--_session">docs for DELETE /_session</a>
- * @param {ajaxSettings} options
- * <a href="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings">
- * jQuery ajax settings</a>
- */
- logout: function(options) {
- options = options || {};
- return $.ajax({
- type: "DELETE", url: this.urlPrefix + "/_session", dataType: "json",
- username : "_", password : "_",
- beforeSend: function(xhr) {
- xhr.setRequestHeader('Accept', 'application/json');
- },
- complete: function(req) {
- var resp = $.parseJSON(req.responseText);
- if (req.status == 200) {
- if (options.success) options.success(resp);
- } else if (options.error) {
- options.error(req.status, resp.error, resp.reason);
- } else {
- throw 'An error occurred logging out: ' + resp.reason;
- }
- }
- });
- },
-
- /**
- * @namespace
- * $.couch.db is used to communicate with a specific CouchDB database
- * <pre><code>var $db = $.couch.db("mydatabase");
- *$db.allApps({
- * success: function (data) {
- * ... process data ...
- * }
- *});
- * </code></pre>
- */
- db: function(name, db_opts) {
- db_opts = db_opts || {};
- var rawDocs = {};
- function maybeApplyVersion(doc) {
- if (doc._id && doc._rev && rawDocs[doc._id] &&
- rawDocs[doc._id].rev == doc._rev) {
- // todo: can we use commonjs require here?
- if (typeof Base64 == "undefined") {
- throw 'Base64 support not found.';
- } else {
- doc._attachments = doc._attachments || {};
- doc._attachments["rev-"+doc._rev.split("-")[0]] = {
- content_type :"application/json",
- data : Base64.encode(rawDocs[doc._id].raw)
- };
- return true;
- }
- }
- }
- return /** @lends $.couch.db */{
- name: name,
- uri: this.urlPrefix + "/" + encodeURIComponent(name) + "/",
-
- /**
- * Request compaction of the specified database.
- * @see <a href="http://docs.couchdb.org/en/latest/api/database
- * /compact.html#db-compact">docs for /db/_compact</a>
- * @param {ajaxSettings} options
- * <a href="http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings">
- * jQuery ajax settings</a>
- */
- compact: function(options) {
- $.extend(options, {successStatus: 202});
- return ajax({
- type: "POST", url: this.uri + "_compact",
- data: "", processData: false
- },
- options,
- "The database could not be compacted"
- );
- },
-
- /**
- * Cleans up the cached view output on disk for a given view.
- * @see <a href="http://docs.couchdb.org/en/latest/api/database
- * /compact.html#db-view-cleanup">docs for /db/_view_cleanup</a>
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- viewCleanup: function(options) {
- $.extend(options, {successStatus: 202});
- return ajax({
- type: "POST", url: this.uri + "_view_cleanup",
- data: "", processData: false
- },
- options,
- "The views could not be cleaned up"
- );
- },
-
- /**
- * Compacts the view indexes associated with the specified design
- * document. You can use this in place of the full database compaction
- * if you know a specific set of view indexes have been affected by a
- * recent database change.
- * @see <a href="http://docs.couchdb.org/en/latest/api/database
- * /compact.html#db-compact-design-doc">
- * docs for /db/_compact/design-doc</a>
- * @param {String} groupname Name of design-doc to compact
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- compactView: function(groupname, options) {
- $.extend(options, {successStatus: 202});
- return ajax({
- type: "POST", url: this.uri + "_compact/" + groupname,
- data: "", processData: false
- },
- options,
- "The view could not be compacted"
- );
- },
-
- /**
- * Create a new database
- * @see <a href="http://docs.couchdb.org/en/latest/api/database
- * /common.html#put--db">docs for PUT /db/</a>
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- create: function(options) {
- $.extend(options, {successStatus: 201});
- return ajax({
- type: "PUT", url: this.uri, contentType: "application/json",
- data: "", processData: false
- },
- options,
- "The database could not be created"
- );
- },
-
- /**
- * Deletes the specified database, and all the documents and
- * attachments contained within it.
- * @see <a href="http://docs.couchdb.org/en/latest/api/database
- * /common.html#delete--db">docs for DELETE /db/</a>
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- drop: function(options) {
- return ajax(
- {type: "DELETE", url: this.uri},
- options,
- "The database could not be deleted"
- );
- },
-
- /**
- * Gets information about the specified database.
- * @see <a href="http://docs.couchdb.org/en/latest/api/database
- * /common.html#get--db">docs for GET /db/</a>
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- info: function(options) {
- return ajax(
- {url: this.uri},
- options,
- "Database information could not be retrieved"
- );
- },
-
- /**
- * @namespace
- * $.couch.db.changes provides an API for subscribing to the changes
- * feed
- * <pre><code>var $changes = $.couch.db("mydatabase").changes();
- *$changes.onChange = function (data) {
- * ... process data ...
- * }
- * $changes.stop();
- * </code></pre>
- */
- changes: function(since, options) {
-
- options = options || {};
- // set up the promise object within a closure for this handler
- var timeout = 100, db = this, active = true,
- listeners = [],
- xhr = null,
- promise = /** @lends $.couch.db.changes */ {
- /**
- * Add a listener callback
- * @see <a href="http://docs.couchdb.org/en/latest/api/database
- * /changes.html#db-changes">docs for /db/_changes</a>
- * @param {Function} fun Callback function to run when
- * notified of changes.
- */
- onChange : function(fun) {
- listeners.push(fun);
- },
- /**
- * Stop subscribing to the changes feed
- */
- stop : function() {
- active = false;
- if (xhr){
- xhr.abort();
- }
- }
- };
- // call each listener when there is a change
- function triggerListeners(resp) {
- $.each(listeners, function() {
- this(resp);
- });
- }
- // when there is a change, call any listeners, then check for
- // another change
- options.success = function(resp) {
- timeout = 100;
- if (active) {
- since = resp.last_seq;
- triggerListeners(resp);
- getChangesSince();
- }
- };
- options.error = function() {
- if (active) {
- setTimeout(getChangesSince, timeout);
- timeout = timeout * 2;
- }
- };
- // actually make the changes request
- function getChangesSince() {
- var opts = $.extend({heartbeat : 10 * 1000}, options, {
- feed : "longpoll",
- since : since
- });
- xhr = ajax(
- {url: db.uri + "_changes"+encodeOptions(opts)},
- options,
- "Error connecting to "+db.uri+"/_changes."
- );
- }
- // start the first request
- if (since) {
- getChangesSince();
- } else {
- db.info({
- success : function(info) {
- since = info.update_seq;
- getChangesSince();
- }
- });
- }
- return promise;
- },
-
- /**
- * Fetch all the docs in this db, you can specify an array of keys to
- * fetch by passing the <code>keys</code> field in the
- * <code>options</code>
- * parameter.
- * @see <a href="http://docs.couchdb.org/en/latest/api/database
- * /bulk-api.html#db-all-docs">docs for /db/all_docs/</a>
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- allDocs: function(options) {
- var type = "GET";
- var data = null;
- if (options["keys"]) {
- type = "POST";
- var keys = options["keys"];
- delete options["keys"];
- data = toJSON({ "keys": keys });
- }
- return ajax({
- type: type,
- data: data,
- url: this.uri + "_all_docs" + encodeOptions(options)
- },
- options,
- "An error occurred retrieving a list of all documents"
- );
- },
-
- /**
- * Fetch all the design docs in this db
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- allDesignDocs: function(options) {
- return this.allDocs($.extend(
- {startkey:"_design", endkey:"_design0"}, options));
- },
-
- /**
- * Fetch all the design docs with an index.html, <code>options</code>
- * parameter expects an <code>eachApp</code> field which is a callback
- * called on each app found.
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- allApps: function(options) {
- options = options || {};
- var self = this;
- if (options.eachApp) {
- return this.allDesignDocs({
- success: function(resp) {
- $.each(resp.rows, function() {
- self.openDoc(this.id, {
- success: function(ddoc) {
- var index, appPath, appName = ddoc._id.split('/');
- appName.shift();
- appName = appName.join('/');
- index = ddoc.couchapp && ddoc.couchapp.index;
- if (index) {
- appPath = ['', name, ddoc._id, index].join('/');
- } else if (ddoc._attachments &&
- ddoc._attachments["index.html"]) {
- appPath = ['', name, ddoc._id, "index.html"].join('/');
- }
- if (appPath) options.eachApp(appName, appPath, ddoc);
- }
- });
- });
- }
- });
- } else {
- throw 'Please provide an eachApp function for allApps()';
- }
- },
-
- /**
- * Returns the specified doc from the specified db.
- * @see <a href="http://docs.couchdb.org/en/latest/api/document
- * /common.html#get--db-docid">docs for GET /db/doc</a>
- * @param {String} docId id of document to fetch
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- * @param {ajaxSettings} ajaxOptions <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- openDoc: function(docId, options, ajaxOptions) {
- options = options || {};
- if (db_opts.attachPrevRev || options.attachPrevRev) {
- $.extend(options, {
- beforeSuccess : function(req, doc) {
- rawDocs[doc._id] = {
- rev : doc._rev,
- raw : req.responseText
- };
- }
- });
- } else {
- $.extend(options, {
- beforeSuccess : function(req, doc) {
- if (doc["jquery.couch.attachPrevRev"]) {
- rawDocs[doc._id] = {
- rev : doc._rev,
- raw : req.responseText
- };
- }
- }
- });
- }
- return ajax(
- {url: this.uri + encodeDocId(docId) + encodeOptions(options)},
- options,
- "The document could not be retrieved",
- ajaxOptions
- );
- },
-
- /**
- * Create a new document in the specified database, using the supplied
- * JSON document structure. If the JSON structure includes the _id
- * field, then the document will be created with the specified document
- * ID. If the _id field is not specified, a new unique ID will be
- * generated.
- * @see <a href="http://docs.couchdb.org/en/latest/api/document
- * /common.html#put--db-docid">docs for PUT /db/doc</a>
- * @param {String} doc document to save
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- saveDoc: function(doc, options) {
- options = options || {};
- var db = this;
- var beforeSend = fullCommit(options);
- if (doc._id === undefined) {
- var method = "POST";
- var uri = this.uri;
- } else {
- var method = "PUT";
- var uri = this.uri + encodeDocId(doc._id);
- }
- var versioned = maybeApplyVersion(doc);
- return $.ajax({
- type: method, url: uri + encodeOptions(options),
- contentType: "application/json",
- dataType: "json", data: toJSON(doc),
- beforeSend : beforeSend,
- complete: function(req) {
- var resp = $.parseJSON(req.responseText);
- if (req.status == 200 || req.status == 201 || req.status == 202) {
- doc._id = resp.id;
- doc._rev = resp.rev;
- if (versioned) {
- db.openDoc(doc._id, {
- attachPrevRev : true,
- success : function(d) {
- doc._attachments = d._attachments;
- if (options.success) options.success(resp);
- }
- });
- } else {
- if (options.success) options.success(resp);
- }
- } else if (options.error) {
- options.error(req.status, resp.error, resp.reason);
- } else {
- throw "The document could not be saved: " + resp.reason;
- }
- }
- });
- },
-
- /**
- * Save a list of documents
- * @see <a href="http://docs.couchdb.org/en/latest/api/database
- * /bulk-api.html#db-bulk-docs">docs for /db/_bulk_docs</a>
- * @param {Object[]} docs List of documents to save
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- bulkSave: function(docs, options) {
- var beforeSend = fullCommit(options);
- $.extend(options, {successStatus: 201, beforeSend : beforeSend});
- return ajax({
- type: "POST",
- url: this.uri + "_bulk_docs" + encodeOptions(options),
- contentType: "application/json", data: toJSON(docs)
- },
- options,
- "The documents could not be saved"
- );
- },
-
- /**
- * Deletes the specified document from the database. You must supply
- * the current (latest) revision and <code>id</code> of the document
- * to delete eg <code>removeDoc({_id:"mydoc", _rev: "1-2345"})</code>
- * @see <a href="http://docs.couchdb.org/en/latest/api/document
- * /common.html#delete--db-docid">docs for DELETE /db/doc</a>
- * @param {Object} doc Document to delete
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- removeDoc: function(doc, options) {
- return ajax({
- type: "DELETE",
- url: this.uri +
- encodeDocId(doc._id) +
- encodeOptions({rev: doc._rev})
- },
- options,
- "The document could not be deleted"
- );
- },
-
- /**
- * Remove a set of documents
- * @see <a href="http://docs.couchdb.org/en/latest/api/database
- * /bulk-api.html#db-bulk-docs">docs for /db/_bulk_docs</a>
- * @param {String[]} docs List of document id's to remove
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- bulkRemove: function(docs, options){
- docs.docs = $.each(
- docs.docs, function(i, doc){
- doc._deleted = true;
- }
- );
- $.extend(options, {successStatus: 201});
- return ajax({
- type: "POST",
- url: this.uri + "_bulk_docs" + encodeOptions(options),
- data: toJSON(docs)
- },
- options,
- "The documents could not be deleted"
- );
- },
-
- /**
- * The COPY command (which is non-standard HTTP) copies an existing
- * document to a new or existing document.
- * @see <a href="http://docs.couchdb.org/en/latest/api/document
- * /common.html#copy--db-docid">docs for COPY /db/doc</a>
- * @param {String[]} docId document id to copy
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- * @param {ajaxSettings} ajaxOptions <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- copyDoc: function(docId, options, ajaxOptions) {
- ajaxOptions = $.extend(ajaxOptions, {
- complete: function(req) {
- var resp = $.parseJSON(req.responseText);
- if (req.status == 201) {
- if (options.success) options.success(resp);
- } else if (options.error) {
- options.error(req.status, resp.error, resp.reason);
- } else {
- throw "The document could not be copied: " + resp.reason;
- }
- }
- });
- return ajax({
- type: "COPY",
- url: this.uri + encodeDocId(docId)
- },
- options,
- "The document could not be copied",
- ajaxOptions
- );
- },
-
- /**
- * Creates (and executes) a temporary view based on the view function
- * supplied in the JSON request.
- * @see <a href="http://docs.couchdb.org/en/latest/api/database
- * /temp-views.html#db-temp-view">docs for /db/_temp_view</a>
- * @param {Function} mapFun Map function
- * @param {Function} reduceFun Reduce function
- * @param {String} language Language the map / reduce funs are
- * implemented in
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- query: function(mapFun, reduceFun, language, options) {
- language = language || "javascript";
- if (typeof(mapFun) !== "string") {
- mapFun = mapFun.toSource ? mapFun.toSource()
- : "(" + mapFun.toString() + ")";
- }
- var body = {language: language, map: mapFun};
- if (reduceFun != null) {
- if (typeof(reduceFun) !== "string")
- reduceFun = reduceFun.toSource ? reduceFun.toSource()
- : "(" + reduceFun.toString() + ")";
- body.reduce = reduceFun;
- }
- return ajax({
- type: "POST",
- url: this.uri + "_temp_view" + encodeOptions(options),
- contentType: "application/json", data: toJSON(body)
- },
- options,
- "An error occurred querying the database"
- );
- },
-
- /**
- * Fetch a _list view output, you can specify a list of
- * <code>keys</code> in the options object to receive only those keys.
- * @see <a href="http://docs.couchdb.org/en/latest/api/ddoc/render.html
- * #db-design-design-doc-list-list-name-view-name">
- * docs for /db/_design/design-doc/_list/list/view</a>
- * @param {String} list Listname in the form of ddoc/listname
- * @param {String} view View to run list against
- * @param {Object} options CouchDB <a href="http://docs.couchdb.org/en
- * /latest/api/ddoc/views.html#get--db-_design-ddoc-_view-view">
- * View Options</a>
- * @param {ajaxSettings} ajaxOptions <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- list: function(list, view, options, ajaxOptions) {
- var list = list.split('/');
- var options = options || {};
- var type = 'GET';
- var data = null;
- if (options['keys']) {
- type = 'POST';
- var keys = options['keys'];
- delete options['keys'];
- data = toJSON({'keys': keys });
- }
- return ajax({
- type: type,
- data: data,
- url: this.uri + '_design/' + list[0] +
- '/_list/' + list[1] + '/' + view + encodeOptions(options)
- },
- ajaxOptions, 'An error occurred accessing the list'
- );
- },
-
- /**
- * Executes the specified view-name from the specified design-doc
- * design document, you can specify a list of <code>keys</code>
- * in the options object to receive only those keys.
- * @see <a href="http://docs.couchdb.org/en/latest/api/ddoc/views.html
- * #db-design-design-doc-view-view-name">docs for /db/
- * _design/design-doc/_view/name</a>
- * @param {String} name View to run list against (string should have
- * the design-doc name followed by a slash and the view name)
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- view: function(name, options) {
- var name = name.split('/');
- var options = options || {};
- var type = "GET";
- var data= null;
- if (options["keys"]) {
- type = "POST";
- var keys = options["keys"];
- delete options["keys"];
- data = toJSON({ "keys": keys });
- }
- return ajax({
- type: type,
- data: data,
- url: this.uri + "_design/" + name[0] +
- "/_view/" + name[1] + encodeOptions(options)
- },
- options, "An error occurred accessing the view"
- );
- },
-
- /**
- * Fetch an arbitrary CouchDB database property
- * @param {String} propName Property name to fetch
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- * @param {ajaxSettings} ajaxOptions <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- getDbProperty: function(propName, options, ajaxOptions) {
- return ajax({url: this.uri + propName + encodeOptions(options)},
- options,
- "The property could not be retrieved",
- ajaxOptions
- );
- },
-
- /**
- * Set an arbitrary CouchDB database property
- * @param {String} propName Property name to fetch
- * @param {String} propValue Property value to set
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- * @param {ajaxSettings} ajaxOptions <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- setDbProperty: function(propName, propValue, options, ajaxOptions) {
- return ajax({
- type: "PUT",
- url: this.uri + propName + encodeOptions(options),
- data : JSON.stringify(propValue)
- },
- options,
- "The property could not be updated",
- ajaxOptions
- );
- }
- };
- },
-
- encodeDocId: encodeDocId,
-
- /**
- * Accessing the root of a CouchDB instance returns meta information about
- * the instance. The response is a JSON structure containing information
- * about the server, including a welcome message and the version of the
- * server.
- * @see <a href="http://docs.couchdb.org/en/latest/api/server/common.html
- * #api-server-root">
- * docs for GET /</a>
- * @param {ajaxSettings} options <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- */
- info: function(options) {
- return ajax(
- {url: this.urlPrefix + "/"},
- options,
- "Server information could not be retrieved"
- );
- },
-
- /**
- * Request, configure, or stop, a replication operation.
- * @see <a href="http://docs.couchdb.org/en/latest/api/server/common.html
- * #replicate">docs for POST /_replicate</a>
- * @param {String} source Path or url to source database
- * @param {String} target Path or url to target database
- * @param {ajaxSettings} ajaxOptions <a href="http://api.jquery.com/
- * jQuery.ajax/#jQuery-ajax-settings">jQuery ajax settings</a>
- * @param {Object} repOpts Additional replication options
- */
- replicate: function(source, target, ajaxOptions, repOpts) {
- repOpts = $.extend({source: source, target: target}, repOpts);
- if (repOpts.continuous && !repOpts.cancel) {
- ajaxOptions.successStatus = 202;
- }
- return ajax({
- type: "POST", url: this.urlPrefix + "/_replicate",
- data: JSON.stringify(repOpts),
- contentType: "application/json"
- },
- ajaxOptions,
- "Replication failed"
- );
- },
-
- /**
- * Fetch a new UUID
- * @see <a href="http://docs.couchdb.org/en/latest/api/server/common.html
- * #uuids">docs for /_uuids</a>
- * @param {Integer} cacheNum Number of uuids to keep cached for future use
- */
- newUUID: function(cacheNum) {
- if (cacheNum === undefined) {
- cacheNum = 1;
- }
- if (!uuidCache.length) {
- ajax({url: this.urlPrefix + "/_uuids", data: {count: cacheNum}, async:
- false}, {
- success: function(resp) {
- uuidCache = resp.uuids;
- }
- },
- "Failed to retrieve UUID batch."
- );
- }
- return uuidCache.shift();
- }
- });
-
- /**
- * @private
- */
- function ajax(obj, options, errorMessage, ajaxOptions) {
- var timeStart;
- var defaultAjaxOpts = {
- contentType: "application/json",
- headers:{"Accept": "application/json"}
- };
-
- options = $.extend({successStatus: 200}, options);
- ajaxOptions = $.extend(defaultAjaxOpts, ajaxOptions);
- errorMessage = errorMessage || "Unknown error";
- timeStart = (new Date()).getTime();
- return $.ajax($.extend($.extend({
- type: "GET", dataType: "json", cache : maybeUseCache(),
- beforeSend: function(xhr){
- if(ajaxOptions && ajaxOptions.headers){
- for (var header in ajaxOptions.headers){
- xhr.setRequestHeader(header, ajaxOptions.headers[header]);
- }
- }
- },
- complete: function(req) {
- var reqDuration = (new Date()).getTime() - timeStart;
- try {
- var resp = $.parseJSON(req.responseText);
- } catch(e) {
- if (options.error) {
- options.error(req.status, req, e);
- } else {
- throw errorMessage + ': ' + e;
- }
- return;
- }
- if (options.ajaxStart) {
- options.ajaxStart(resp);
- }
- if (req.status == options.successStatus) {
- if (options.beforeSuccess) options.beforeSuccess(req, resp, reqDuration);
- if (options.success) options.success(resp, reqDuration);
- } else if (options.error) {
- options.error(req.status, resp && resp.error ||
- errorMessage, resp && resp.reason || "no response",
- reqDuration);
- } else {
- throw errorMessage + ": " + resp.reason;
- }
- }
- }, obj), ajaxOptions));
- }
-
- /**
- * @private
- */
- function fullCommit(options) {
- var options = options || {};
- if (typeof options.ensure_full_commit !== "undefined") {
- var commit = options.ensure_full_commit;
- delete options.ensure_full_commit;
- return function(xhr) {
- xhr.setRequestHeader('Accept', 'application/json');
- xhr.setRequestHeader("X-Couch-Full-Commit", commit.toString());
- };
- }
- }
-
- /**
- * @private
- */
- // Convert a options object to an url query string.
- // ex: {key:'value',key2:'value2'} becomes '?key="value"&key2="value2"'
- function encodeOptions(options) {
- var buf = [];
- if (typeof(options) === "object" && options !== null) {
- for (var name in options) {
- if ($.inArray(name,
- ["error", "success", "beforeSuccess", "ajaxStart"]) >= 0)
- continue;
- var value = options[name];
- if ($.inArray(name, ["key", "startkey", "endkey"]) >= 0) {
- value = toJSON(value);
- }
- buf.push(encodeURIComponent(name) + "=" + encodeURIComponent(value));
- }
- }
- return buf.length ? "?" + buf.join("&") : "";
- }
-
- /**
- * @private
- */
- function toJSON(obj) {
- return obj !== null ? JSON.stringify(obj) : null;
- }
-
- /**
- * @private
- */
- function maybeUseCache() {
- if (!navigator){
- return true;
- }
- else if (/(MSIE|Trident)/.test(navigator.userAgent)){
- return false;
- }
- return true;
- }
-
-})(jQuery);
diff --git a/share/www/script/jquery.dialog.js b/share/www/script/jquery.dialog.js
deleted file mode 100644
index 02c0c4970..000000000
--- a/share/www/script/jquery.dialog.js
+++ /dev/null
@@ -1,96 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-(function($) {
-
- $.fn.centerBox = function() {
- return this.each(function() {
- var s = this.style;
- s.left = (($(window).width() - $(this).width()) / 2) + "px";
- s.top = (($(window).height() - $(this).height()) / 2) + "px";
- });
- }
-
- $.showDialog = function(url, options) {
- options = options || {};
- options.load = options.load || function() {};
- options.cancel = options.cancel || function() {};
- options.validate = options.validate || function() { return true };
- options.submit = options.submit || function() {};
-
- var overlay = $('<div id="overlay" style="z-index:1001"></div>')
- .css("opacity", "0");
- var dialog = $('<div id="dialog" style="z-index:1002;position:fixed;display:none;"></div>');
- if ($.browser.msie) {
- var frame = $('<iframe id="overlay-frame" style="z-index:1000;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="javascript:false"></iframe>')
- .css("opacity", "0").appendTo(document.body);
- if (parseInt($.browser.version)<7) {
- dialog.css("position", "absolute");
- overlay.css("position", "absolute");
- $("html,body").css({width: "100%", height: "100%"});
- }
- }
- overlay.appendTo(document.body).fadeTo(100, 0.6);
- dialog.appendTo(document.body).addClass("loading").centerBox().fadeIn(400);
-
- $(document).keydown(function(e) {
- if (e.keyCode == 27) dismiss(); // dismiss on escape key
- });
- function dismiss() {
- dialog.fadeOut("fast", function() {
- $("#dialog, #overlay, #overlay-frame").remove();
- });
- $(document).unbind("keydown");
- }
- overlay.click(function() { dismiss(); });
-
- function showError(name, message) {
- var input = dialog.find(":input[name=" + name + "]");
- input.addClass("error").next("div.error").remove();
- $('<div class="error"></div>').text(message).insertAfter(input);
- }
-
- $.get(url, function(html) {
- $(html).appendTo(dialog);
- dialog.removeClass("loading").addClass("loaded").centerBox().each(function() {
- options.load(dialog.children()[0]);
- $(":input:first", dialog).each(function() { this.focus() });
- $("button.cancel", dialog).click(function() { // dismiss on cancel
- dismiss();
- options.cancel();
- });
- $("form", dialog).submit(function(e) { // invoke callback on submit
- e.preventDefault();
- dialog.find("div.error").remove().end().find(".error").removeClass("error");
- var data = {};
- $.each($("form :input", dialog).serializeArray(), function(i, field) {
- data[field.name] = field.value;
- });
- $("form :file", dialog).each(function() {
- data[this.name] = this.value; // file inputs need special handling
- });
- options.submit(data, function callback(errors) {
- if ($.isEmptyObject(errors)) {
- dismiss();
- } else {
- for (var name in errors) {
- showError(name, errors[name]);
- }
- }
- });
- return false;
- });
- });
- });
- }
-
-})(jQuery);
diff --git a/share/www/script/jquery.editinline.js b/share/www/script/jquery.editinline.js
deleted file mode 100644
index b48607d4d..000000000
--- a/share/www/script/jquery.editinline.js
+++ /dev/null
@@ -1,114 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-(function($) {
-
- function startEditing(elem, options) {
- var editable = $(elem);
- var origHtml = editable.html();
- var origText = options.populate($.trim(editable.text()));
-
- if (!options.begin.apply(elem, [origText])) {
- return;
- }
-
- var input = options.createInput.apply(elem, [origText])
- .addClass("editinline").val(origText)
- .dblclick(function() { return false; })
- .keydown(function(evt) {
- switch (evt.keyCode) {
- case 13: { // return
- if (!input.is("textarea")) applyChange(evt.keyCode);
- break;
- }
- case 27: { // escape
- cancelChange(evt.keyCode);
- break;
- }
- case 9: { // tab
- if (!input.is("textarea")) {
- applyChange(evt.keyCode);
- return false;
- }
- }
- }
- });
- if (options.acceptOnBlur) {
- input.blur(function() {
- return applyChange();
- });
- }
-
- function applyChange(keyCode) {
- var newText = input.val();
- if (newText == origText) {
- cancelChange(keyCode);
- return true;
- }
- if ((!options.allowEmpty && !newText.length) ||
- !options.validate.apply(elem, [newText, origText])) {
- input.addClass("invalid");
- return false;
- }
- input.remove();
- tools.remove();
- options.accept.apply(elem, [newText, origText]);
- editable.removeClass("editinline-container");
- options.end.apply(elem, [keyCode]);
- return true;
- }
-
- function cancelChange(keyCode) {
- options.cancel.apply(elem, [origText]);
- editable.html(origHtml).removeClass("editinline-container");
- options.end.apply(elem, [keyCode]);
- }
-
- var tools = $("<span class='editinline-tools'></span>");
- $("<button type='button' class='apply'></button>")
- .text(options.acceptLabel).click(applyChange).appendTo(tools);
- $("<button type='button' class='cancel'></button>")
- .text(options.cancelLabel).click(cancelChange).appendTo(tools)
-
- editable.html("").append(tools).append(input)
- .addClass("editinline-container");
- options.prepareInput.apply(elem, [input[0]]);
- input.each(function() { this.focus(); this.select(); });
- }
-
- $.fn.makeEditable = function(options) {
- options = $.extend({
- allowEmpty: true,
- acceptLabel: "",
- cancelLabel: "",
- toolTip: "Double click to edit",
- acceptOnBlur: true,
-
- // callbacks
- begin: function() { return true },
- accept: function(newValue, oldValue) {},
- cancel: function(oldValue) {},
- createInput: function(value) { return $("<input type='text'>") },
- prepareInput: function(input) {},
- end: function(keyCode) {},
- populate: function(value) { return value },
- validate: function() { return true }
- }, options || {});
-
- return this.each(function() {
- $(this).attr("title", options.toolTip).dblclick(function() {
- startEditing(this, options);
- });
- });
- }
-
-})(jQuery);
diff --git a/share/www/script/jquery.form.js b/share/www/script/jquery.form.js
deleted file mode 100644
index 14e14572a..000000000
--- a/share/www/script/jquery.form.js
+++ /dev/null
@@ -1,803 +0,0 @@
-/*!
- * jQuery Form Plugin
- * version: 2.63 (29-JAN-2011)
- * @requires jQuery v1.3.2 or later
- *
- * Examples and documentation at: http://malsup.com/jquery/form/
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- */
-;(function($) {
-
-/*
- Usage Note:
- -----------
- Do not use both ajaxSubmit and ajaxForm on the same form. These
- functions are intended to be exclusive. Use ajaxSubmit if you want
- to bind your own submit handler to the form. For example,
-
- $(document).ready(function() {
- $('#myForm').bind('submit', function(e) {
- e.preventDefault(); // <-- important
- $(this).ajaxSubmit({
- target: '#output'
- });
- });
- });
-
- Use ajaxForm when you want the plugin to manage all the event binding
- for you. For example,
-
- $(document).ready(function() {
- $('#myForm').ajaxForm({
- target: '#output'
- });
- });
-
- When using ajaxForm, the ajaxSubmit function will be invoked for you
- at the appropriate time.
-*/
-
-/**
- * ajaxSubmit() provides a mechanism for immediately submitting
- * an HTML form using AJAX.
- */
-$.fn.ajaxSubmit = function(options) {
- // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
- if (!this.length) {
- log('ajaxSubmit: skipping submit process - no element selected');
- return this;
- }
-
- if (typeof options == 'function') {
- options = { success: options };
- }
-
- var action = this.attr('action');
- var url = (typeof action === 'string') ? $.trim(action) : '';
- if (url) {
- // clean url (don't include hash vaue)
- url = (url.match(/^([^#]+)/)||[])[1];
- }
- url = url || window.location.href || '';
-
- options = $.extend(true, {
- url: url,
- type: this[0].getAttribute('method') || 'GET', // IE7 massage (see issue 57)
- iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank'
- }, options);
-
- // hook for manipulating the form data before it is extracted;
- // convenient for use with rich editors like tinyMCE or FCKEditor
- var veto = {};
- this.trigger('form-pre-serialize', [this, options, veto]);
- if (veto.veto) {
- log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
- return this;
- }
-
- // provide opportunity to alter form data before it is serialized
- if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
- log('ajaxSubmit: submit aborted via beforeSerialize callback');
- return this;
- }
-
- var n,v,a = this.formToArray(options.semantic);
- if (options.data) {
- options.extraData = options.data;
- for (n in options.data) {
- if(options.data[n] instanceof Array) {
- for (var k in options.data[n]) {
- a.push( { name: n, value: options.data[n][k] } );
- }
- }
- else {
- v = options.data[n];
- v = $.isFunction(v) ? v() : v; // if value is fn, invoke it
- a.push( { name: n, value: v } );
- }
- }
- }
-
- // give pre-submit callback an opportunity to abort the submit
- if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
- log('ajaxSubmit: submit aborted via beforeSubmit callback');
- return this;
- }
-
- // fire vetoable 'validate' event
- this.trigger('form-submit-validate', [a, this, options, veto]);
- if (veto.veto) {
- log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
- return this;
- }
-
- var q = $.param(a);
-
- if (options.type.toUpperCase() == 'GET') {
- options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
- options.data = null; // data is null for 'get'
- }
- else {
- options.data = q; // data is the query string for 'post'
- }
-
- var $form = this, callbacks = [];
- if (options.resetForm) {
- callbacks.push(function() { $form.resetForm(); });
- }
- if (options.clearForm) {
- callbacks.push(function() { $form.clearForm(); });
- }
-
- // perform a load on the target only if dataType is not provided
- if (!options.dataType && options.target) {
- var oldSuccess = options.success || function(){};
- callbacks.push(function(data) {
- var fn = options.replaceTarget ? 'replaceWith' : 'html';
- $(options.target)[fn](data).each(oldSuccess, arguments);
- });
- }
- else if (options.success) {
- callbacks.push(options.success);
- }
-
- options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
- var context = options.context || options; // jQuery 1.4+ supports scope context
- for (var i=0, max=callbacks.length; i < max; i++) {
- callbacks[i].apply(context, [data, status, xhr || $form, $form]);
- }
- };
-
- // are there files to upload?
- var fileInputs = $('input:file', this).length > 0;
- var mp = 'multipart/form-data';
- var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
-
- // options.iframe allows user to force iframe mode
- // 06-NOV-09: now defaulting to iframe mode if file input is detected
- if (options.iframe !== false && (fileInputs || options.iframe || multipart)) {
- // hack to fix Safari hang (thanks to Tim Molendijk for this)
- // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
- if (options.closeKeepAlive) {
- $.get(options.closeKeepAlive, fileUpload);
- }
- else {
- fileUpload();
- }
- }
- else {
- $.ajax(options);
- }
-
- // fire 'notify' event
- this.trigger('form-submit-notify', [this, options]);
- return this;
-
-
- // private function for handling file uploads (hat tip to YAHOO!)
- function fileUpload() {
- var form = $form[0];
-
- if ($(':input[name=submit],:input[id=submit]', form).length) {
- // if there is an input with a name or id of 'submit' then we won't be
- // able to invoke the submit fn on the form (at least not x-browser)
- alert('Error: Form elements must not have name or id of "submit".');
- return;
- }
-
- var s = $.extend(true, {}, $.ajaxSettings, options);
- s.context = s.context || s;
- var id = 'jqFormIO' + (new Date().getTime()), fn = '_'+id;
- var $io = $('<iframe id="' + id + '" name="' + id + '" src="'+ s.iframeSrc +'" />');
- var io = $io[0];
-
- $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
-
- var xhr = { // mock object
- aborted: 0,
- responseText: null,
- responseXML: null,
- status: 0,
- statusText: 'n/a',
- getAllResponseHeaders: function() {},
- getResponseHeader: function() {},
- setRequestHeader: function() {},
- abort: function() {
- this.aborted = 1;
- $io.attr('src', s.iframeSrc); // abort op in progress
- }
- };
-
- var g = s.global;
- // trigger ajax global events so that activity/block indicators work like normal
- if (g && ! $.active++) {
- $.event.trigger("ajaxStart");
- }
- if (g) {
- $.event.trigger("ajaxSend", [xhr, s]);
- }
-
- if (s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false) {
- if (s.global) {
- $.active--;
- }
- return;
- }
- if (xhr.aborted) {
- return;
- }
-
- var timedOut = 0;
-
- // add submitting element to data if we know it
- var sub = form.clk;
- if (sub) {
- var n = sub.name;
- if (n && !sub.disabled) {
- s.extraData = s.extraData || {};
- s.extraData[n] = sub.value;
- if (sub.type == "image") {
- s.extraData[n+'.x'] = form.clk_x;
- s.extraData[n+'.y'] = form.clk_y;
- }
- }
- }
-
- // take a breath so that pending repaints get some cpu time before the upload starts
- function doSubmit() {
- // make sure form attrs are set
- var t = $form.attr('target'), a = $form.attr('action');
-
- // update form attrs in IE friendly way
- form.setAttribute('target',id);
- if (form.getAttribute('method') != 'POST') {
- form.setAttribute('method', 'POST');
- }
- if (form.getAttribute('action') != s.url) {
- form.setAttribute('action', s.url);
- }
-
- // ie borks in some cases when setting encoding
- if (! s.skipEncodingOverride) {
- $form.attr({
- encoding: 'multipart/form-data',
- enctype: 'multipart/form-data'
- });
- }
-
- // support timout
- if (s.timeout) {
- setTimeout(function() { timedOut = true; cb(); }, s.timeout);
- }
-
- // add "extra" data to form if provided in options
- var extraInputs = [];
- try {
- if (s.extraData) {
- for (var n in s.extraData) {
- extraInputs.push(
- $('<input type="hidden" name="'+n+'" value="'+s.extraData[n]+'" />')
- .appendTo(form)[0]);
- }
- }
-
- // add iframe to doc and submit the form
- $io.appendTo('body');
- io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
- form.submit();
- }
- finally {
- // reset attrs and remove "extra" input elements
- form.setAttribute('action',a);
- if(t) {
- form.setAttribute('target', t);
- } else {
- $form.removeAttr('target');
- }
- $(extraInputs).remove();
- }
- }
-
- if (s.forceSync) {
- doSubmit();
- }
- else {
- setTimeout(doSubmit, 10); // this lets dom updates render
- }
-
- var data, doc, domCheckCount = 50;
-
- function cb() {
- doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
- if (!doc || doc.location.href == s.iframeSrc) {
- // response not received yet
- return;
- }
- io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
-
- var ok = true;
- try {
- if (timedOut) {
- throw 'timeout';
- }
-
- var isXml = s.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc);
- log('isXml='+isXml);
- if (!isXml && window.opera && (doc.body == null || doc.body.innerHTML == '')) {
- if (--domCheckCount) {
- // in some browsers (Opera) the iframe DOM is not always traversable when
- // the onload callback fires, so we loop a bit to accommodate
- log('requeing onLoad callback, DOM not available');
- setTimeout(cb, 250);
- return;
- }
- // let this fall through because server response could be an empty document
- //log('Could not access iframe DOM after mutiple tries.');
- //throw 'DOMException: not available';
- }
-
- //log('response detected');
- xhr.responseText = doc.body ? doc.body.innerHTML : doc.documentElement ? doc.documentElement.innerHTML : null;
- xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
- xhr.getResponseHeader = function(header){
- var headers = {'content-type': s.dataType};
- return headers[header];
- };
-
- var scr = /(json|script)/.test(s.dataType);
- if (scr || s.textarea) {
- // see if user embedded response in textarea
- var ta = doc.getElementsByTagName('textarea')[0];
- if (ta) {
- xhr.responseText = ta.value;
- }
- else if (scr) {
- // account for browsers injecting pre around json response
- var pre = doc.getElementsByTagName('pre')[0];
- var b = doc.getElementsByTagName('body')[0];
- if (pre) {
- xhr.responseText = pre.textContent;
- }
- else if (b) {
- xhr.responseText = b.innerHTML;
- }
- }
- }
- else if (s.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) {
- xhr.responseXML = toXml(xhr.responseText);
- }
-
- data = httpData(xhr, s.dataType, s);
- }
- catch(e){
- log('error caught:',e);
- ok = false;
- xhr.error = e;
- s.error.call(s.context, xhr, 'error', e);
- g && $.event.trigger("ajaxError", [xhr, s, e]);
- }
-
- if (xhr.aborted) {
- log('upload aborted');
- ok = false;
- }
-
- // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
- if (ok) {
- s.success.call(s.context, data, 'success', xhr);
- g && $.event.trigger("ajaxSuccess", [xhr, s]);
- }
-
- g && $.event.trigger("ajaxComplete", [xhr, s]);
-
- if (g && ! --$.active) {
- $.event.trigger("ajaxStop");
- }
-
- s.complete && s.complete.call(s.context, xhr, ok ? 'success' : 'error');
-
- // clean up
- setTimeout(function() {
- $io.removeData('form-plugin-onload');
- $io.remove();
- xhr.responseXML = null;
- }, 100);
- }
-
- var toXml = $.parseXML || function(s, doc) { // use parseXML if available (jQuery 1.5+)
- if (window.ActiveXObject) {
- doc = new ActiveXObject('Microsoft.XMLDOM');
- doc.async = 'false';
- doc.loadXML(s);
- }
- else {
- doc = (new DOMParser()).parseFromString(s, 'text/xml');
- }
- return (doc && doc.documentElement && doc.documentElement.nodeName != 'parsererror') ? doc : null;
- };
- var parseJSON = $.parseJSON || function(s) {
- return window['eval']('(' + s + ')');
- };
-
- var httpData = function( xhr, type, s ) { // mostly lifted from jq1.4.4
- var ct = xhr.getResponseHeader('content-type') || '',
- xml = type === 'xml' || !type && ct.indexOf('xml') >= 0,
- data = xml ? xhr.responseXML : xhr.responseText;
-
- if (xml && data.documentElement.nodeName === 'parsererror') {
- $.error && $.error('parsererror');
- }
- if (s && s.dataFilter) {
- data = s.dataFilter(data, type);
- }
- if (typeof data === 'string') {
- if (type === 'json' || !type && ct.indexOf('json') >= 0) {
- data = parseJSON(data);
- } else if (type === "script" || !type && ct.indexOf("javascript") >= 0) {
- $.globalEval(data);
- }
- }
- return data;
- };
- }
-};
-
-/**
- * ajaxForm() provides a mechanism for fully automating form submission.
- *
- * The advantages of using this method instead of ajaxSubmit() are:
- *
- * 1: This method will include coordinates for <input type="image" /> elements (if the element
- * is used to submit the form).
- * 2. This method will include the submit element's name/value data (for the element that was
- * used to submit the form).
- * 3. This method binds the submit() method to the form for you.
- *
- * The options argument for ajaxForm works exactly as it does for ajaxSubmit. ajaxForm merely
- * passes the options argument along after properly binding events for submit elements and
- * the form itself.
- */
-$.fn.ajaxForm = function(options) {
- // in jQuery 1.3+ we can fix mistakes with the ready state
- if (this.length === 0) {
- var o = { s: this.selector, c: this.context };
- if (!$.isReady && o.s) {
- log('DOM not ready, queuing ajaxForm');
- $(function() {
- $(o.s,o.c).ajaxForm(options);
- });
- return this;
- }
- // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
- log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
- return this;
- }
-
- return this.ajaxFormUnbind().bind('submit.form-plugin', function(e) {
- if (!e.isDefaultPrevented()) { // if event has been canceled, don't proceed
- e.preventDefault();
- $(this).ajaxSubmit(options);
- }
- }).bind('click.form-plugin', function(e) {
- var target = e.target;
- var $el = $(target);
- if (!($el.is(":submit,input:image"))) {
- // is this a child element of the submit el? (ex: a span within a button)
- var t = $el.closest(':submit');
- if (t.length == 0) {
- return;
- }
- target = t[0];
- }
- var form = this;
- form.clk = target;
- if (target.type == 'image') {
- if (e.offsetX != undefined) {
- form.clk_x = e.offsetX;
- form.clk_y = e.offsetY;
- } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
- var offset = $el.offset();
- form.clk_x = e.pageX - offset.left;
- form.clk_y = e.pageY - offset.top;
- } else {
- form.clk_x = e.pageX - target.offsetLeft;
- form.clk_y = e.pageY - target.offsetTop;
- }
- }
- // clear form vars
- setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 100);
- });
-};
-
-// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
-$.fn.ajaxFormUnbind = function() {
- return this.unbind('submit.form-plugin click.form-plugin');
-};
-
-/**
- * formToArray() gathers form element data into an array of objects that can
- * be passed to any of the following ajax functions: $.get, $.post, or load.
- * Each object in the array has both a 'name' and 'value' property. An example of
- * an array for a simple login form might be:
- *
- * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
- *
- * It is this array that is passed to pre-submit callback functions provided to the
- * ajaxSubmit() and ajaxForm() methods.
- */
-$.fn.formToArray = function(semantic) {
- var a = [];
- if (this.length === 0) {
- return a;
- }
-
- var form = this[0];
- var els = semantic ? form.getElementsByTagName('*') : form.elements;
- if (!els) {
- return a;
- }
-
- var i,j,n,v,el,max,jmax;
- for(i=0, max=els.length; i < max; i++) {
- el = els[i];
- n = el.name;
- if (!n) {
- continue;
- }
-
- if (semantic && form.clk && el.type == "image") {
- // handle image inputs on the fly when semantic == true
- if(!el.disabled && form.clk == el) {
- a.push({name: n, value: $(el).val()});
- a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
- }
- continue;
- }
-
- v = $.fieldValue(el, true);
- if (v && v.constructor == Array) {
- for(j=0, jmax=v.length; j < jmax; j++) {
- a.push({name: n, value: v[j]});
- }
- }
- else if (v !== null && typeof v != 'undefined') {
- a.push({name: n, value: v});
- }
- }
-
- if (!semantic && form.clk) {
- // input type=='image' are not found in elements array! handle it here
- var $input = $(form.clk), input = $input[0];
- n = input.name;
- if (n && !input.disabled && input.type == 'image') {
- a.push({name: n, value: $input.val()});
- a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
- }
- }
- return a;
-};
-
-/**
- * Serializes form data into a 'submittable' string. This method will return a string
- * in the format: name1=value1&amp;name2=value2
- */
-$.fn.formSerialize = function(semantic) {
- //hand off to jQuery.param for proper encoding
- return $.param(this.formToArray(semantic));
-};
-
-/**
- * Serializes all field elements in the jQuery object into a query string.
- * This method will return a string in the format: name1=value1&amp;name2=value2
- */
-$.fn.fieldSerialize = function(successful) {
- var a = [];
- this.each(function() {
- var n = this.name;
- if (!n) {
- return;
- }
- var v = $.fieldValue(this, successful);
- if (v && v.constructor == Array) {
- for (var i=0,max=v.length; i < max; i++) {
- a.push({name: n, value: v[i]});
- }
- }
- else if (v !== null && typeof v != 'undefined') {
- a.push({name: this.name, value: v});
- }
- });
- //hand off to jQuery.param for proper encoding
- return $.param(a);
-};
-
-/**
- * Returns the value(s) of the element in the matched set. For example, consider the following form:
- *
- * <form><fieldset>
- * <input name="A" type="text" />
- * <input name="A" type="text" />
- * <input name="B" type="checkbox" value="B1" />
- * <input name="B" type="checkbox" value="B2"/>
- * <input name="C" type="radio" value="C1" />
- * <input name="C" type="radio" value="C2" />
- * </fieldset></form>
- *
- * var v = $(':text').fieldValue();
- * // if no values are entered into the text inputs
- * v == ['','']
- * // if values entered into the text inputs are 'foo' and 'bar'
- * v == ['foo','bar']
- *
- * var v = $(':checkbox').fieldValue();
- * // if neither checkbox is checked
- * v === undefined
- * // if both checkboxes are checked
- * v == ['B1', 'B2']
- *
- * var v = $(':radio').fieldValue();
- * // if neither radio is checked
- * v === undefined
- * // if first radio is checked
- * v == ['C1']
- *
- * The successful argument controls whether or not the field element must be 'successful'
- * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
- * The default value of the successful argument is true. If this value is false the value(s)
- * for each element is returned.
- *
- * Note: This method *always* returns an array. If no valid value can be determined the
- * array will be empty, otherwise it will contain one or more values.
- */
-$.fn.fieldValue = function(successful) {
- for (var val=[], i=0, max=this.length; i < max; i++) {
- var el = this[i];
- var v = $.fieldValue(el, successful);
- if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) {
- continue;
- }
- v.constructor == Array ? $.merge(val, v) : val.push(v);
- }
- return val;
-};
-
-/**
- * Returns the value of the field element.
- */
-$.fieldValue = function(el, successful) {
- var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
- if (successful === undefined) {
- successful = true;
- }
-
- if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
- (t == 'checkbox' || t == 'radio') && !el.checked ||
- (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
- tag == 'select' && el.selectedIndex == -1)) {
- return null;
- }
-
- if (tag == 'select') {
- var index = el.selectedIndex;
- if (index < 0) {
- return null;
- }
- var a = [], ops = el.options;
- var one = (t == 'select-one');
- var max = (one ? index+1 : ops.length);
- for(var i=(one ? index : 0); i < max; i++) {
- var op = ops[i];
- if (op.selected) {
- var v = op.value;
- if (!v) { // extra pain for IE...
- v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value;
- }
- if (one) {
- return v;
- }
- a.push(v);
- }
- }
- return a;
- }
- return $(el).val();
-};
-
-/**
- * Clears the form data. Takes the following actions on the form's input fields:
- * - input text fields will have their 'value' property set to the empty string
- * - select elements will have their 'selectedIndex' property set to -1
- * - checkbox and radio inputs will have their 'checked' property set to false
- * - inputs of type submit, button, reset, and hidden will *not* be effected
- * - button elements will *not* be effected
- */
-$.fn.clearForm = function() {
- return this.each(function() {
- $('input,select,textarea', this).clearFields();
- });
-};
-
-/**
- * Clears the selected form elements.
- */
-$.fn.clearFields = $.fn.clearInputs = function() {
- return this.each(function() {
- var t = this.type, tag = this.tagName.toLowerCase();
- if (t == 'text' || t == 'password' || tag == 'textarea') {
- this.value = '';
- }
- else if (t == 'checkbox' || t == 'radio') {
- this.checked = false;
- }
- else if (tag == 'select') {
- this.selectedIndex = -1;
- }
- });
-};
-
-/**
- * Resets the form data. Causes all form elements to be reset to their original value.
- */
-$.fn.resetForm = function() {
- return this.each(function() {
- // guard against an input with the name of 'reset'
- // note that IE reports the reset function as an 'object'
- if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) {
- this.reset();
- }
- });
-};
-
-/**
- * Enables or disables any matching elements.
- */
-$.fn.enable = function(b) {
- if (b === undefined) {
- b = true;
- }
- return this.each(function() {
- this.disabled = !b;
- });
-};
-
-/**
- * Checks/unchecks any matching checkboxes or radio buttons and
- * selects/deselects and matching option elements.
- */
-$.fn.selected = function(select) {
- if (select === undefined) {
- select = true;
- }
- return this.each(function() {
- var t = this.type;
- if (t == 'checkbox' || t == 'radio') {
- this.checked = select;
- }
- else if (this.tagName.toLowerCase() == 'option') {
- var $sel = $(this).parent('select');
- if (select && $sel[0] && $sel[0].type == 'select-one') {
- // deselect all other options
- $sel.find('option').selected(false);
- }
- this.selected = select;
- }
- });
-};
-
-// helper fn for console logging
-// set $.fn.ajaxSubmit.debug to true to enable debug logging
-function log() {
- if ($.fn.ajaxSubmit.debug) {
- var msg = '[jquery.form] ' + Array.prototype.join.call(arguments,'');
- if (window.console && window.console.log) {
- window.console.log(msg);
- }
- else if (window.opera && window.opera.postError) {
- window.opera.postError(msg);
- }
- }
-};
-
-})(jQuery);
diff --git a/share/www/script/jquery.js b/share/www/script/jquery.js
deleted file mode 100644
index a86bf797a..000000000
--- a/share/www/script/jquery.js
+++ /dev/null
@@ -1,9472 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.8.3
- * http://jquery.com/
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- *
- * Copyright 2012 jQuery Foundation and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time)
- */
-(function( window, undefined ) {
-var
- // A central reference to the root jQuery(document)
- rootjQuery,
-
- // The deferred used on DOM ready
- readyList,
-
- // Use the correct document accordingly with window argument (sandbox)
- document = window.document,
- location = window.location,
- navigator = window.navigator,
-
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$,
-
- // Save a reference to some core methods
- core_push = Array.prototype.push,
- core_slice = Array.prototype.slice,
- core_indexOf = Array.prototype.indexOf,
- core_toString = Object.prototype.toString,
- core_hasOwn = Object.prototype.hasOwnProperty,
- core_trim = String.prototype.trim,
-
- // Define a local copy of jQuery
- jQuery = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context, rootjQuery );
- },
-
- // Used for matching numbers
- core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
-
- // Used for detecting and trimming whitespace
- core_rnotwhite = /\S/,
- core_rspace = /\s+/,
-
- // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
- // A simple way to check for HTML strings
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
- rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
-
- // Match a standalone tag
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
-
- // JSON RegExp
- rvalidchars = /^[\],:{}\s]*$/,
- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
- rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
- rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,
-
- // Matches dashed string for camelizing
- rmsPrefix = /^-ms-/,
- rdashAlpha = /-([\da-z])/gi,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return ( letter + "" ).toUpperCase();
- },
-
- // The ready event handler and self cleanup method
- DOMContentLoaded = function() {
- if ( document.addEventListener ) {
- document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
- jQuery.ready();
- } else if ( document.readyState === "complete" ) {
- // we're here because readyState === "complete" in oldIE
- // which is good enough for us to call the dom ready!
- document.detachEvent( "onreadystatechange", DOMContentLoaded );
- jQuery.ready();
- }
- },
-
- // [[Class]] -> type pairs
- class2type = {};
-
-jQuery.fn = jQuery.prototype = {
- constructor: jQuery,
- init: function( selector, context, rootjQuery ) {
- var match, elem, ret, doc;
-
- // Handle $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Handle $(DOMElement)
- if ( selector.nodeType ) {
- this.context = this[0] = selector;
- this.length = 1;
- return this;
- }
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] ) {
- context = context instanceof jQuery ? context[0] : context;
- doc = ( context && context.nodeType ? context.ownerDocument || context : document );
-
- // scripts is true for back-compat
- selector = jQuery.parseHTML( match[1], doc, true );
- if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
- this.attr.call( selector, context, true );
- }
-
- return jQuery.merge( this, selector );
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[2] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id !== match[2] ) {
- return rootjQuery.find( selector );
- }
-
- // Otherwise, we inject the element directly into the jQuery object
- this.length = 1;
- this[0] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || rootjQuery ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return rootjQuery.ready( selector );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- },
-
- // Start with an empty selector
- selector: "",
-
- // The current version of jQuery being used
- jquery: "1.8.3",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- // The number of elements contained in the matched element set
- size: function() {
- return this.length;
- },
-
- toArray: function() {
- return core_slice.call( this );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num == null ?
-
- // Return a 'clean' array
- this.toArray() :
-
- // Return just the object
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems, name, selector ) {
-
- // Build a new jQuery matched element set
- var ret = jQuery.merge( this.constructor(), elems );
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
-
- ret.context = this.context;
-
- if ( name === "find" ) {
- ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
- } else if ( name ) {
- ret.selector = this.selector + "." + name + "(" + selector + ")";
- }
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- ready: function( fn ) {
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
- },
-
- eq: function( i ) {
- i = +i;
- return i === -1 ?
- this.slice( i ) :
- this.slice( i, i + 1 );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- slice: function() {
- return this.pushStack( core_slice.apply( this, arguments ),
- "slice", core_slice.call(arguments).join(",") );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function( elem, i ) {
- return callback.call( elem, i, elem );
- }));
- },
-
- end: function() {
- return this.prevObject || this.constructor(null);
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: core_push,
- sort: [].sort,
- splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( length === i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend({
- noConflict: function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
- },
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( !document.body ) {
- return setTimeout( jQuery.ready, 1 );
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger("ready").off("ready");
- }
- },
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return jQuery.type(obj) === "function";
- },
-
- isArray: Array.isArray || function( obj ) {
- return jQuery.type(obj) === "array";
- },
-
- isWindow: function( obj ) {
- return obj != null && obj == obj.window;
- },
-
- isNumeric: function( obj ) {
- return !isNaN( parseFloat(obj) ) && isFinite( obj );
- },
-
- type: function( obj ) {
- return obj == null ?
- String( obj ) :
- class2type[ core_toString.call(obj) ] || "object";
- },
-
- isPlainObject: function( obj ) {
- // Must be an Object.
- // Because of IE, we also have to check the presence of the constructor property.
- // Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- try {
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !core_hasOwn.call(obj, "constructor") &&
- !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
- return false;
- }
- } catch ( e ) {
- // IE8,9 Will throw exceptions on certain host objects #9897
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
-
- var key;
- for ( key in obj ) {}
-
- return key === undefined || core_hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- // data: string of html
- // context (optional): If specified, the fragment will be created in this context, defaults to document
- // scripts (optional): If true, will include scripts passed in the html string
- parseHTML: function( data, context, scripts ) {
- var parsed;
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- if ( typeof context === "boolean" ) {
- scripts = context;
- context = 0;
- }
- context = context || document;
-
- // Single tag
- if ( (parsed = rsingleTag.exec( data )) ) {
- return [ context.createElement( parsed[1] ) ];
- }
-
- parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] );
- return jQuery.merge( [],
- (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes );
- },
-
- parseJSON: function( data ) {
- if ( !data || typeof data !== "string") {
- return null;
- }
-
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
- data = jQuery.trim( data );
-
- // Attempt to parse using the native JSON parser first
- if ( window.JSON && window.JSON.parse ) {
- return window.JSON.parse( data );
- }
-
- // Make sure the incoming data is actual JSON
- // Logic borrowed from http://json.org/json2.js
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
- .replace( rvalidtokens, "]" )
- .replace( rvalidbraces, "")) ) {
-
- return ( new Function( "return " + data ) )();
-
- }
- jQuery.error( "Invalid JSON: " + data );
- },
-
- // Cross-browser xml parsing
- parseXML: function( data ) {
- var xml, tmp;
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- try {
- if ( window.DOMParser ) { // Standard
- tmp = new DOMParser();
- xml = tmp.parseFromString( data , "text/xml" );
- } else { // IE
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
- xml.async = "false";
- xml.loadXML( data );
- }
- } catch( e ) {
- xml = undefined;
- }
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
- },
-
- noop: function() {},
-
- // Evaluates a script in a global context
- // Workarounds based on findings by Jim Driscoll
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
- globalEval: function( data ) {
- if ( data && core_rnotwhite.test( data ) ) {
- // We use execScript on Internet Explorer
- // We use an anonymous function so that context is window
- // rather than jQuery in Firefox
- ( window.execScript || function( data ) {
- window[ "eval" ].call( window, data );
- } )( data );
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- // args is for internal usage only
- each: function( obj, callback, args ) {
- var name,
- i = 0,
- length = obj.length,
- isObj = length === undefined || jQuery.isFunction( obj );
-
- if ( args ) {
- if ( isObj ) {
- for ( name in obj ) {
- if ( callback.apply( obj[ name ], args ) === false ) {
- break;
- }
- }
- } else {
- for ( ; i < length; ) {
- if ( callback.apply( obj[ i++ ], args ) === false ) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if ( isObj ) {
- for ( name in obj ) {
- if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) {
- break;
- }
- }
- } else {
- for ( ; i < length; ) {
- if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) {
- break;
- }
- }
- }
- }
-
- return obj;
- },
-
- // Use native String.trim function wherever possible
- trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
- function( text ) {
- return text == null ?
- "" :
- core_trim.call( text );
- } :
-
- // Otherwise use our own trimming functionality
- function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var type,
- ret = results || [];
-
- if ( arr != null ) {
- // The window, strings (and functions) also have 'length'
- // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
- type = jQuery.type( arr );
-
- if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) {
- core_push.call( ret, arr );
- } else {
- jQuery.merge( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- var len;
-
- if ( arr ) {
- if ( core_indexOf ) {
- return core_indexOf.call( arr, elem, i );
- }
-
- len = arr.length;
- i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
- for ( ; i < len; i++ ) {
- // Skip accessing in sparse arrays
- if ( i in arr && arr[ i ] === elem ) {
- return i;
- }
- }
- }
-
- return -1;
- },
-
- merge: function( first, second ) {
- var l = second.length,
- i = first.length,
- j = 0;
-
- if ( typeof l === "number" ) {
- for ( ; j < l; j++ ) {
- first[ i++ ] = second[ j ];
- }
-
- } else {
- while ( second[j] !== undefined ) {
- first[ i++ ] = second[ j++ ];
- }
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, inv ) {
- var retVal,
- ret = [],
- i = 0,
- length = elems.length;
- inv = !!inv;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- retVal = !!callback( elems[ i ], i );
- if ( inv !== retVal ) {
- ret.push( elems[ i ] );
- }
- }
-
- return ret;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var value, key,
- ret = [],
- i = 0,
- length = elems.length,
- // jquery objects are treated as arrays
- isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
-
- // Go through the array, translating each of the items to their
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( key in elems ) {
- value = callback( elems[ key ], key, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
- }
-
- // Flatten any nested arrays
- return ret.concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var tmp, args, proxy;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = core_slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context, args.concat( core_slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- // Multifunctional method to get and set values of a collection
- // The value/s can optionally be executed if it's a function
- access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
- var exec,
- bulk = key == null,
- i = 0,
- length = elems.length;
-
- // Sets many values
- if ( key && typeof key === "object" ) {
- for ( i in key ) {
- jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
- }
- chainable = 1;
-
- // Sets one value
- } else if ( value !== undefined ) {
- // Optionally, function values get executed if exec is true
- exec = pass === undefined && jQuery.isFunction( value );
-
- if ( bulk ) {
- // Bulk operations only iterate when executing function values
- if ( exec ) {
- exec = fn;
- fn = function( elem, key, value ) {
- return exec.call( jQuery( elem ), value );
- };
-
- // Otherwise they run against the entire set
- } else {
- fn.call( elems, value );
- fn = null;
- }
- }
-
- if ( fn ) {
- for (; i < length; i++ ) {
- fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
- }
- }
-
- chainable = 1;
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- length ? fn( elems[0], key ) : emptyGet;
- },
-
- now: function() {
- return ( new Date() ).getTime();
- }
-});
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called after the browser event has already occurred.
- // we once tried to use readyState "interactive" here, but it caused issues like the one
- // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
- if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- setTimeout( jQuery.ready, 1 );
-
- // Standards-based browsers support DOMContentLoaded
- } else if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", jQuery.ready, false );
-
- // If IE event model is used
- } else {
- // Ensure firing before onload, maybe late but safe also for iframes
- document.attachEvent( "onreadystatechange", DOMContentLoaded );
-
- // A fallback to window.onload, that will always work
- window.attachEvent( "onload", jQuery.ready );
-
- // If IE and not a frame
- // continually check to see if the document is ready
- var top = false;
-
- try {
- top = window.frameElement == null && document.documentElement;
- } catch(e) {}
-
- if ( top && top.doScroll ) {
- (function doScrollCheck() {
- if ( !jQuery.isReady ) {
-
- try {
- // Use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- top.doScroll("left");
- } catch(e) {
- return setTimeout( doScrollCheck, 50 );
- }
-
- // and execute any waiting functions
- jQuery.ready();
- }
- })();
- }
- }
- }
- return readyList.promise( obj );
-};
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-// String to Object options format cache
-var optionsCache = {};
-
-// Convert String-formatted options into Object-formatted ones and store in cache
-function createOptions( options ) {
- var object = optionsCache[ options ] = {};
- jQuery.each( options.split( core_rspace ), function( _, flag ) {
- object[ flag ] = true;
- });
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- ( optionsCache[ options ] || createOptions( options ) ) :
- jQuery.extend( {}, options );
-
- var // Last fire value (for non-forgettable lists)
- memory,
- // Flag to know if list was already fired
- fired,
- // Flag to know if list is currently firing
- firing,
- // First callback to fire (used internally by add and fireWith)
- firingStart,
- // End of the loop when firing
- firingLength,
- // Index of currently firing callback (modified by remove if needed)
- firingIndex,
- // Actual callback list
- list = [],
- // Stack of fire calls for repeatable lists
- stack = !options.once && [],
- // Fire callbacks
- fire = function( data ) {
- memory = options.memory && data;
- fired = true;
- firingIndex = firingStart || 0;
- firingStart = 0;
- firingLength = list.length;
- firing = true;
- for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
- memory = false; // To prevent further calls using add
- break;
- }
- }
- firing = false;
- if ( list ) {
- if ( stack ) {
- if ( stack.length ) {
- fire( stack.shift() );
- }
- } else if ( memory ) {
- list = [];
- } else {
- self.disable();
- }
- }
- },
- // Actual Callbacks object
- self = {
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
- // First, we save the current length
- var start = list.length;
- (function add( args ) {
- jQuery.each( args, function( _, arg ) {
- var type = jQuery.type( arg );
- if ( type === "function" ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && type !== "string" ) {
- // Inspect recursively
- add( arg );
- }
- });
- })( arguments );
- // Do we need to add the callbacks to the
- // current firing batch?
- if ( firing ) {
- firingLength = list.length;
- // With memory, if we're not firing then
- // we should call right away
- } else if ( memory ) {
- firingStart = start;
- fire( memory );
- }
- }
- return this;
- },
- // Remove a callback from the list
- remove: function() {
- if ( list ) {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
- list.splice( index, 1 );
- // Handle firing indexes
- if ( firing ) {
- if ( index <= firingLength ) {
- firingLength--;
- }
- if ( index <= firingIndex ) {
- firingIndex--;
- }
- }
- }
- });
- }
- return this;
- },
- // Control if a given callback is in the list
- has: function( fn ) {
- return jQuery.inArray( fn, list ) > -1;
- },
- // Remove all callbacks from the list
- empty: function() {
- list = [];
- return this;
- },
- // Have the list do nothing anymore
- disable: function() {
- list = stack = memory = undefined;
- return this;
- },
- // Is it disabled?
- disabled: function() {
- return !list;
- },
- // Lock the list in its current state
- lock: function() {
- stack = undefined;
- if ( !memory ) {
- self.disable();
- }
- return this;
- },
- // Is it locked?
- locked: function() {
- return !stack;
- },
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
- if ( list && ( !fired || stack ) ) {
- if ( firing ) {
- stack.push( args );
- } else {
- fire( args );
- }
- }
- return this;
- },
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-jQuery.extend({
-
- Deferred: function( func ) {
- var tuples = [
- // action, add listener, listener list, final state
- [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
- [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
- [ "notify", "progress", jQuery.Callbacks("memory") ]
- ],
- state = "pending",
- promise = {
- state: function() {
- return state;
- },
- always: function() {
- deferred.done( arguments ).fail( arguments );
- return this;
- },
- then: function( /* fnDone, fnFail, fnProgress */ ) {
- var fns = arguments;
- return jQuery.Deferred(function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
- var action = tuple[ 0 ],
- fn = fns[ i ];
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
- deferred[ tuple[1] ]( jQuery.isFunction( fn ) ?
- function() {
- var returned = fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise()
- .done( newDefer.resolve )
- .fail( newDefer.reject )
- .progress( newDefer.notify );
- } else {
- newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
- }
- } :
- newDefer[ action ]
- );
- });
- fns = null;
- }).promise();
- },
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- return obj != null ? jQuery.extend( obj, promise ) : promise;
- }
- },
- deferred = {};
-
- // Keep pipe for back-compat
- promise.pipe = promise.then;
-
- // Add list-specific methods
- jQuery.each( tuples, function( i, tuple ) {
- var list = tuple[ 2 ],
- stateString = tuple[ 3 ];
-
- // promise[ done | fail | progress ] = list.add
- promise[ tuple[1] ] = list.add;
-
- // Handle state
- if ( stateString ) {
- list.add(function() {
- // state = [ resolved | rejected ]
- state = stateString;
-
- // [ reject_list | resolve_list ].disable; progress_list.lock
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
- }
-
- // deferred[ resolve | reject | notify ] = list.fire
- deferred[ tuple[0] ] = list.fire;
- deferred[ tuple[0] + "With" ] = list.fireWith;
- });
-
- // Make the deferred a promise
- promise.promise( deferred );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( subordinate /* , ..., subordinateN */ ) {
- var i = 0,
- resolveValues = core_slice.call( arguments ),
- length = resolveValues.length,
-
- // the count of uncompleted subordinates
- remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
- // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
- // Update function for both resolve and progress values
- updateFunc = function( i, contexts, values ) {
- return function( value ) {
- contexts[ i ] = this;
- values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
- if( values === progressValues ) {
- deferred.notifyWith( contexts, values );
- } else if ( !( --remaining ) ) {
- deferred.resolveWith( contexts, values );
- }
- };
- },
-
- progressValues, progressContexts, resolveContexts;
-
- // add listeners to Deferred subordinates; treat others as resolved
- if ( length > 1 ) {
- progressValues = new Array( length );
- progressContexts = new Array( length );
- resolveContexts = new Array( length );
- for ( ; i < length; i++ ) {
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
- resolveValues[ i ].promise()
- .done( updateFunc( i, resolveContexts, resolveValues ) )
- .fail( deferred.reject )
- .progress( updateFunc( i, progressContexts, progressValues ) );
- } else {
- --remaining;
- }
- }
- }
-
- // if we're not waiting on anything, resolve the master
- if ( !remaining ) {
- deferred.resolveWith( resolveContexts, resolveValues );
- }
-
- return deferred.promise();
- }
-});
-jQuery.support = (function() {
-
- var support,
- all,
- a,
- select,
- opt,
- input,
- fragment,
- eventName,
- i,
- isSupported,
- clickFn,
- div = document.createElement("div");
-
- // Setup
- div.setAttribute( "className", "t" );
- div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
-
- // Support tests won't run in some limited or non-browser environments
- all = div.getElementsByTagName("*");
- a = div.getElementsByTagName("a")[ 0 ];
- if ( !all || !a || !all.length ) {
- return {};
- }
-
- // First batch of tests
- select = document.createElement("select");
- opt = select.appendChild( document.createElement("option") );
- input = div.getElementsByTagName("input")[ 0 ];
-
- a.style.cssText = "top:1px;float:left;opacity:.5";
- support = {
- // IE strips leading whitespace when .innerHTML is used
- leadingWhitespace: ( div.firstChild.nodeType === 3 ),
-
- // Make sure that tbody elements aren't automatically inserted
- // IE will insert them into empty tables
- tbody: !div.getElementsByTagName("tbody").length,
-
- // Make sure that link elements get serialized correctly by innerHTML
- // This requires a wrapper element in IE
- htmlSerialize: !!div.getElementsByTagName("link").length,
-
- // Get the style information from getAttribute
- // (IE uses .cssText instead)
- style: /top/.test( a.getAttribute("style") ),
-
- // Make sure that URLs aren't manipulated
- // (IE normalizes it by default)
- hrefNormalized: ( a.getAttribute("href") === "/a" ),
-
- // Make sure that element opacity exists
- // (IE uses filter instead)
- // Use a regex to work around a WebKit issue. See #5145
- opacity: /^0.5/.test( a.style.opacity ),
-
- // Verify style float existence
- // (IE uses styleFloat instead of cssFloat)
- cssFloat: !!a.style.cssFloat,
-
- // Make sure that if no value is specified for a checkbox
- // that it defaults to "on".
- // (WebKit defaults to "" instead)
- checkOn: ( input.value === "on" ),
-
- // Make sure that a selected-by-default option has a working selected property.
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- optSelected: opt.selected,
-
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
- getSetAttribute: div.className !== "t",
-
- // Tests for enctype support on a form (#6743)
- enctype: !!document.createElement("form").enctype,
-
- // Makes sure cloning an html5 element does not cause problems
- // Where outerHTML is undefined, this still works
- html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
-
- // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
- boxModel: ( document.compatMode === "CSS1Compat" ),
-
- // Will be defined later
- submitBubbles: true,
- changeBubbles: true,
- focusinBubbles: false,
- deleteExpando: true,
- noCloneEvent: true,
- inlineBlockNeedsLayout: false,
- shrinkWrapBlocks: false,
- reliableMarginRight: true,
- boxSizingReliable: true,
- pixelPosition: false
- };
-
- // Make sure checked status is properly cloned
- input.checked = true;
- support.noCloneChecked = input.cloneNode( true ).checked;
-
- // Make sure that the options inside disabled selects aren't marked as disabled
- // (WebKit marks them as disabled)
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Test to see if it's possible to delete an expando from an element
- // Fails in Internet Explorer
- try {
- delete div.test;
- } catch( e ) {
- support.deleteExpando = false;
- }
-
- if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
- div.attachEvent( "onclick", clickFn = function() {
- // Cloning a node shouldn't copy over any
- // bound event handlers (IE does this)
- support.noCloneEvent = false;
- });
- div.cloneNode( true ).fireEvent("onclick");
- div.detachEvent( "onclick", clickFn );
- }
-
- // Check if a radio maintains its value
- // after being appended to the DOM
- input = document.createElement("input");
- input.value = "t";
- input.setAttribute( "type", "radio" );
- support.radioValue = input.value === "t";
-
- input.setAttribute( "checked", "checked" );
-
- // #11217 - WebKit loses check when the name is after the checked attribute
- input.setAttribute( "name", "t" );
-
- div.appendChild( input );
- fragment = document.createDocumentFragment();
- fragment.appendChild( div.lastChild );
-
- // WebKit doesn't clone checked state correctly in fragments
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Check if a disconnected checkbox will retain its checked
- // value of true after appended to the DOM (IE6/7)
- support.appendChecked = input.checked;
-
- fragment.removeChild( input );
- fragment.appendChild( div );
-
- // Technique from Juriy Zaytsev
- // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
- // We only care about the case where non-standard event systems
- // are used, namely in IE. Short-circuiting here helps us to
- // avoid an eval call (in setAttribute) which can cause CSP
- // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
- if ( div.attachEvent ) {
- for ( i in {
- submit: true,
- change: true,
- focusin: true
- }) {
- eventName = "on" + i;
- isSupported = ( eventName in div );
- if ( !isSupported ) {
- div.setAttribute( eventName, "return;" );
- isSupported = ( typeof div[ eventName ] === "function" );
- }
- support[ i + "Bubbles" ] = isSupported;
- }
- }
-
- // Run tests that need a body at doc ready
- jQuery(function() {
- var container, div, tds, marginDiv,
- divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
- body = document.getElementsByTagName("body")[0];
-
- if ( !body ) {
- // Return for frameset docs that don't have a body
- return;
- }
-
- container = document.createElement("div");
- container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";
- body.insertBefore( container, body.firstChild );
-
- // Construct the test element
- div = document.createElement("div");
- container.appendChild( div );
-
- // Check if table cells still have offsetWidth/Height when they are set
- // to display:none and there are still other visible table cells in a
- // table row; if so, offsetWidth/Height are not reliable for use when
- // determining if an element has been hidden directly using
- // display:none (it is still safe to use offsets if a parent element is
- // hidden; don safety goggles and see bug #4512 for more information).
- // (only IE 8 fails this test)
- div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
- tds = div.getElementsByTagName("td");
- tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
-
- tds[ 0 ].style.display = "";
- tds[ 1 ].style.display = "none";
-
- // Check if empty table cells still have offsetWidth/Height
- // (IE <= 8 fail this test)
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
-
- // Check box-sizing and margin behavior
- div.innerHTML = "";
- div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
- support.boxSizing = ( div.offsetWidth === 4 );
- support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
-
- // NOTE: To any future maintainer, we've window.getComputedStyle
- // because jsdom on node.js will break without it.
- if ( window.getComputedStyle ) {
- support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
- support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
-
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. For more
- // info see bug #3333
- // Fails in WebKit before Feb 2011 nightlies
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- marginDiv = document.createElement("div");
- marginDiv.style.cssText = div.style.cssText = divReset;
- marginDiv.style.marginRight = marginDiv.style.width = "0";
- div.style.width = "1px";
- div.appendChild( marginDiv );
- support.reliableMarginRight =
- !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
- }
-
- if ( typeof div.style.zoom !== "undefined" ) {
- // Check if natively block-level elements act like inline-block
- // elements when setting their display to 'inline' and giving
- // them layout
- // (IE < 8 does this)
- div.innerHTML = "";
- div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
-
- // Check if elements with layout shrink-wrap their children
- // (IE 6 does this)
- div.style.display = "block";
- div.style.overflow = "visible";
- div.innerHTML = "<div></div>";
- div.firstChild.style.width = "5px";
- support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
-
- container.style.zoom = 1;
- }
-
- // Null elements to avoid leaks in IE
- body.removeChild( container );
- container = div = tds = marginDiv = null;
- });
-
- // Null elements to avoid leaks in IE
- fragment.removeChild( div );
- all = a = select = opt = input = fragment = div = null;
-
- return support;
-})();
-var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
- rmultiDash = /([A-Z])/g;
-
-jQuery.extend({
- cache: {},
-
- deletedIds: [],
-
- // Remove at next major release (1.9/2.0)
- uuid: 0,
-
- // Unique for each copy of jQuery on the page
- // Non-digits removed to match rinlinejQuery
- expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
-
- // The following elements throw uncatchable exceptions if you
- // attempt to add expando properties to them.
- noData: {
- "embed": true,
- // Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
- "applet": true
- },
-
- hasData: function( elem ) {
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
- return !!elem && !isEmptyDataObject( elem );
- },
-
- data: function( elem, name, data, pvt /* Internal Use Only */ ) {
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, ret,
- internalKey = jQuery.expando,
- getByName = typeof name === "string",
-
- // We have to handle DOM nodes and JS objects differently because IE6-7
- // can't GC object references properly across the DOM-JS boundary
- isNode = elem.nodeType,
-
- // Only DOM nodes need the global jQuery cache; JS object data is
- // attached directly to the object so GC can occur automatically
- cache = isNode ? jQuery.cache : elem,
-
- // Only defining an ID for JS objects if its cache already exists allows
- // the code to shortcut on the same path as a DOM node with no cache
- id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
-
- // Avoid doing any more work than we need to when trying to get data on an
- // object that has no data at all
- if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
- return;
- }
-
- if ( !id ) {
- // Only DOM nodes need a new unique ID for each element since their data
- // ends up in the global cache
- if ( isNode ) {
- elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++;
- } else {
- id = internalKey;
- }
- }
-
- if ( !cache[ id ] ) {
- cache[ id ] = {};
-
- // Avoids exposing jQuery metadata on plain JS objects when the object
- // is serialized using JSON.stringify
- if ( !isNode ) {
- cache[ id ].toJSON = jQuery.noop;
- }
- }
-
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
- // shallow copied over onto the existing cache
- if ( typeof name === "object" || typeof name === "function" ) {
- if ( pvt ) {
- cache[ id ] = jQuery.extend( cache[ id ], name );
- } else {
- cache[ id ].data = jQuery.extend( cache[ id ].data, name );
- }
- }
-
- thisCache = cache[ id ];
-
- // jQuery data() is stored in a separate object inside the object's internal data
- // cache in order to avoid key collisions between internal data and user-defined
- // data.
- if ( !pvt ) {
- if ( !thisCache.data ) {
- thisCache.data = {};
- }
-
- thisCache = thisCache.data;
- }
-
- if ( data !== undefined ) {
- thisCache[ jQuery.camelCase( name ) ] = data;
- }
-
- // Check for both converted-to-camel and non-converted data property names
- // If a data property was specified
- if ( getByName ) {
-
- // First Try to find as-is property data
- ret = thisCache[ name ];
-
- // Test for null|undefined property data
- if ( ret == null ) {
-
- // Try to find the camelCased property
- ret = thisCache[ jQuery.camelCase( name ) ];
- }
- } else {
- ret = thisCache;
- }
-
- return ret;
- },
-
- removeData: function( elem, name, pvt /* Internal Use Only */ ) {
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, i, l,
-
- isNode = elem.nodeType,
-
- // See jQuery.data for more information
- cache = isNode ? jQuery.cache : elem,
- id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
-
- // If there is already no cache entry for this object, there is no
- // purpose in continuing
- if ( !cache[ id ] ) {
- return;
- }
-
- if ( name ) {
-
- thisCache = pvt ? cache[ id ] : cache[ id ].data;
-
- if ( thisCache ) {
-
- // Support array or space separated string names for data keys
- if ( !jQuery.isArray( name ) ) {
-
- // try the string as a key before any manipulation
- if ( name in thisCache ) {
- name = [ name ];
- } else {
-
- // split the camel cased version by spaces unless a key with the spaces exists
- name = jQuery.camelCase( name );
- if ( name in thisCache ) {
- name = [ name ];
- } else {
- name = name.split(" ");
- }
- }
- }
-
- for ( i = 0, l = name.length; i < l; i++ ) {
- delete thisCache[ name[i] ];
- }
-
- // If there is no data left in the cache, we want to continue
- // and let the cache object itself get destroyed
- if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
- return;
- }
- }
- }
-
- // See jQuery.data for more information
- if ( !pvt ) {
- delete cache[ id ].data;
-
- // Don't destroy the parent cache unless the internal data object
- // had been the only thing left in it
- if ( !isEmptyDataObject( cache[ id ] ) ) {
- return;
- }
- }
-
- // Destroy the cache
- if ( isNode ) {
- jQuery.cleanData( [ elem ], true );
-
- // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
- } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
- delete cache[ id ];
-
- // When all else fails, null
- } else {
- cache[ id ] = null;
- }
- },
-
- // For internal use only.
- _data: function( elem, name, data ) {
- return jQuery.data( elem, name, data, true );
- },
-
- // A method for determining if a DOM node can handle the data expando
- acceptData: function( elem ) {
- var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
-
- // nodes accept data unless otherwise specified; rejection can be conditional
- return !noData || noData !== true && elem.getAttribute("classid") === noData;
- }
-});
-
-jQuery.fn.extend({
- data: function( key, value ) {
- var parts, part, attr, name, l,
- elem = this[0],
- i = 0,
- data = null;
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = jQuery.data( elem );
-
- if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
- attr = elem.attributes;
- for ( l = attr.length; i < l; i++ ) {
- name = attr[i].name;
-
- if ( !name.indexOf( "data-" ) ) {
- name = jQuery.camelCase( name.substring(5) );
-
- dataAttr( elem, name, data[ name ] );
- }
- }
- jQuery._data( elem, "parsedAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each(function() {
- jQuery.data( this, key );
- });
- }
-
- parts = key.split( ".", 2 );
- parts[1] = parts[1] ? "." + parts[1] : "";
- part = parts[1] + "!";
-
- return jQuery.access( this, function( value ) {
-
- if ( value === undefined ) {
- data = this.triggerHandler( "getData" + part, [ parts[0] ] );
-
- // Try to fetch any internally stored data first
- if ( data === undefined && elem ) {
- data = jQuery.data( elem, key );
- data = dataAttr( elem, key, data );
- }
-
- return data === undefined && parts[1] ?
- this.data( parts[0] ) :
- data;
- }
-
- parts[1] = value;
- this.each(function() {
- var self = jQuery( this );
-
- self.triggerHandler( "setData" + part, parts );
- jQuery.data( this, key, value );
- self.triggerHandler( "changeData" + part, parts );
- });
- }, null, value, arguments.length > 1, null, false );
- },
-
- removeData: function( key ) {
- return this.each(function() {
- jQuery.removeData( this, key );
- });
- }
-});
-
-function dataAttr( elem, key, data ) {
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
-
- var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
-
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
- // Only convert to a number if it doesn't change the string
- +data + "" === data ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch( e ) {}
-
- // Make sure we set the data so it isn't changed later
- jQuery.data( elem, key, data );
-
- } else {
- data = undefined;
- }
- }
-
- return data;
-}
-
-// checks a cache object for emptiness
-function isEmptyDataObject( obj ) {
- var name;
- for ( name in obj ) {
-
- // if the public data object is empty, the private is still empty
- if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
- continue;
- }
- if ( name !== "toJSON" ) {
- return false;
- }
- }
-
- return true;
-}
-jQuery.extend({
- queue: function( elem, type, data ) {
- var queue;
-
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- queue = jQuery._data( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !queue || jQuery.isArray(data) ) {
- queue = jQuery._data( elem, type, jQuery.makeArray(data) );
- } else {
- queue.push( data );
- }
- }
- return queue || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- startLength = queue.length,
- fn = queue.shift(),
- hooks = jQuery._queueHooks( elem, type ),
- next = function() {
- jQuery.dequeue( elem, type );
- };
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- startLength--;
- }
-
- if ( fn ) {
-
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- // clear up the last queue stop function
- delete hooks.stop;
- fn.call( elem, next, hooks );
- }
-
- if ( !startLength && hooks ) {
- hooks.empty.fire();
- }
- },
-
- // not intended for public consumption - generates a queueHooks object, or returns the current one
- _queueHooks: function( elem, type ) {
- var key = type + "queueHooks";
- return jQuery._data( elem, key ) || jQuery._data( elem, key, {
- empty: jQuery.Callbacks("once memory").add(function() {
- jQuery.removeData( elem, type + "queue", true );
- jQuery.removeData( elem, key, true );
- })
- });
- }
-});
-
-jQuery.fn.extend({
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[0], type );
- }
-
- return data === undefined ?
- this :
- this.each(function() {
- var queue = jQuery.queue( this, type, data );
-
- // ensure a hooks for this queue
- jQuery._queueHooks( this, type );
-
- if ( type === "fx" && queue[0] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- dequeue: function( type ) {
- return this.each(function() {
- jQuery.dequeue( this, type );
- });
- },
- // Based off of the plugin by Clint Helfers, with permission.
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
- delay: function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = setTimeout( next, time );
- hooks.stop = function() {
- clearTimeout( timeout );
- };
- });
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, obj ) {
- var tmp,
- count = 1,
- defer = jQuery.Deferred(),
- elements = this,
- i = this.length,
- resolve = function() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- };
-
- if ( typeof type !== "string" ) {
- obj = type;
- type = undefined;
- }
- type = type || "fx";
-
- while( i-- ) {
- tmp = jQuery._data( elements[ i ], type + "queueHooks" );
- if ( tmp && tmp.empty ) {
- count++;
- tmp.empty.add( resolve );
- }
- }
- resolve();
- return defer.promise( obj );
- }
-});
-var nodeHook, boolHook, fixSpecified,
- rclass = /[\t\r\n]/g,
- rreturn = /\r/g,
- rtype = /^(?:button|input)$/i,
- rfocusable = /^(?:button|input|object|select|textarea)$/i,
- rclickable = /^a(?:rea|)$/i,
- rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
- getSetAttribute = jQuery.support.getSetAttribute;
-
-jQuery.fn.extend({
- attr: function( name, value ) {
- return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
- },
-
- removeAttr: function( name ) {
- return this.each(function() {
- jQuery.removeAttr( this, name );
- });
- },
-
- prop: function( name, value ) {
- return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
- },
-
- removeProp: function( name ) {
- name = jQuery.propFix[ name ] || name;
- return this.each(function() {
- // try/catch handles cases where IE balks (such as removing a property on window)
- try {
- this[ name ] = undefined;
- delete this[ name ];
- } catch( e ) {}
- });
- },
-
- addClass: function( value ) {
- var classNames, i, l, elem,
- setClass, c, cl;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).addClass( value.call(this, j, this.className) );
- });
- }
-
- if ( value && typeof value === "string" ) {
- classNames = value.split( core_rspace );
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- elem = this[ i ];
-
- if ( elem.nodeType === 1 ) {
- if ( !elem.className && classNames.length === 1 ) {
- elem.className = value;
-
- } else {
- setClass = " " + elem.className + " ";
-
- for ( c = 0, cl = classNames.length; c < cl; c++ ) {
- if ( setClass.indexOf( " " + classNames[ c ] + " " ) < 0 ) {
- setClass += classNames[ c ] + " ";
- }
- }
- elem.className = jQuery.trim( setClass );
- }
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var removes, className, elem, c, cl, i, l;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).removeClass( value.call(this, j, this.className) );
- });
- }
- if ( (value && typeof value === "string") || value === undefined ) {
- removes = ( value || "" ).split( core_rspace );
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- elem = this[ i ];
- if ( elem.nodeType === 1 && elem.className ) {
-
- className = (" " + elem.className + " ").replace( rclass, " " );
-
- // loop over each item in the removal list
- for ( c = 0, cl = removes.length; c < cl; c++ ) {
- // Remove until there is nothing to remove,
- while ( className.indexOf(" " + removes[ c ] + " ") >= 0 ) {
- className = className.replace( " " + removes[ c ] + " " , " " );
- }
- }
- elem.className = value ? jQuery.trim( className ) : "";
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value,
- isBool = typeof stateVal === "boolean";
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( i ) {
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
- });
- }
-
- return this.each(function() {
- if ( type === "string" ) {
- // toggle individual class names
- var className,
- i = 0,
- self = jQuery( this ),
- state = stateVal,
- classNames = value.split( core_rspace );
-
- while ( (className = classNames[ i++ ]) ) {
- // check each className given, space separated list
- state = isBool ? state : !self.hasClass( className );
- self[ state ? "addClass" : "removeClass" ]( className );
- }
-
- } else if ( type === "undefined" || type === "boolean" ) {
- if ( this.className ) {
- // store className if set
- jQuery._data( this, "__className__", this.className );
- }
-
- // toggle whole className
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
- }
- });
- },
-
- hasClass: function( selector ) {
- var className = " " + selector + " ",
- i = 0,
- l = this.length;
- for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
- return true;
- }
- }
-
- return false;
- },
-
- val: function( value ) {
- var hooks, ret, isFunction,
- elem = this[0];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
- // handle most common string cases
- ret.replace(rreturn, "") :
- // handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each(function( i ) {
- var val,
- self = jQuery(this);
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, self.val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
- } else if ( typeof val === "number" ) {
- val += "";
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map(val, function ( value ) {
- return value == null ? "" : value + "";
- });
- }
-
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- });
- }
-});
-
-jQuery.extend({
- valHooks: {
- option: {
- get: function( elem ) {
- // attributes.value is undefined in Blackberry 4.7 but
- // uses .value. See #6932
- var val = elem.attributes.value;
- return !val || val.specified ? elem.value : elem.text;
- }
- },
- select: {
- get: function( elem ) {
- var value, option,
- options = elem.options,
- index = elem.selectedIndex,
- one = elem.type === "select-one" || index < 0,
- values = one ? null : [],
- max = one ? index + 1 : options.length,
- i = index < 0 ?
- max :
- one ? index : 0;
-
- // Loop through all the selected options
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // oldIE doesn't update selected after form reset (#2551)
- if ( ( option.selected || i === index ) &&
- // Don't return options that are disabled or in a disabled optgroup
- ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
- ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var values = jQuery.makeArray( value );
-
- jQuery(elem).find("option").each(function() {
- this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
- });
-
- if ( !values.length ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- },
-
- // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9
- attrFn: {},
-
- attr: function( elem, name, value, pass ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set attributes on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) {
- return jQuery( elem )[ name ]( value );
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === "undefined" ) {
- return jQuery.prop( elem, name, value );
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( notxml ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
- }
-
- if ( value !== undefined ) {
-
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
- return;
-
- } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- elem.setAttribute( name, value + "" );
- return value;
- }
-
- } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
-
- ret = elem.getAttribute( name );
-
- // Non-existent attributes return null, we normalize to undefined
- return ret === null ?
- undefined :
- ret;
- }
- },
-
- removeAttr: function( elem, value ) {
- var propName, attrNames, name, isBool,
- i = 0;
-
- if ( value && elem.nodeType === 1 ) {
-
- attrNames = value.split( core_rspace );
-
- for ( ; i < attrNames.length; i++ ) {
- name = attrNames[ i ];
-
- if ( name ) {
- propName = jQuery.propFix[ name ] || name;
- isBool = rboolean.test( name );
-
- // See #9699 for explanation of this approach (setting first, then removal)
- // Do not do this for boolean attributes (see #10870)
- if ( !isBool ) {
- jQuery.attr( elem, name, "" );
- }
- elem.removeAttribute( getSetAttribute ? name : propName );
-
- // Set corresponding property to false for boolean attributes
- if ( isBool && propName in elem ) {
- elem[ propName ] = false;
- }
- }
- }
- }
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- // We can't allow the type property to be changed (since it causes problems in IE)
- if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
- jQuery.error( "type property can't be changed" );
- } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
- // Setting the type on a radio button after the value resets the value in IE6-9
- // Reset value to it's default in case type is set after value
- // This is for element creation
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- },
- // Use the value property for back compat
- // Use the nodeHook for button elements in IE6/7 (#1954)
- value: {
- get: function( elem, name ) {
- if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
- return nodeHook.get( elem, name );
- }
- return name in elem ?
- elem.value :
- null;
- },
- set: function( elem, value, name ) {
- if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
- return nodeHook.set( elem, value, name );
- }
- // Does not return so that setAttribute is also used
- elem.value = value;
- }
- }
- },
-
- propFix: {
- tabindex: "tabIndex",
- readonly: "readOnly",
- "for": "htmlFor",
- "class": "className",
- maxlength: "maxLength",
- cellspacing: "cellSpacing",
- cellpadding: "cellPadding",
- rowspan: "rowSpan",
- colspan: "colSpan",
- usemap: "useMap",
- frameborder: "frameBorder",
- contenteditable: "contentEditable"
- },
-
- prop: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set properties on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- if ( notxml ) {
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- return ( elem[ name ] = value );
- }
-
- } else {
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
- return elem[ name ];
- }
- }
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- var attributeNode = elem.getAttributeNode("tabindex");
-
- return attributeNode && attributeNode.specified ?
- parseInt( attributeNode.value, 10 ) :
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- undefined;
- }
- }
- }
-});
-
-// Hook for boolean attributes
-boolHook = {
- get: function( elem, name ) {
- // Align boolean attributes with corresponding properties
- // Fall back to attribute presence where some booleans are not supported
- var attrNode,
- property = jQuery.prop( elem, name );
- return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
- name.toLowerCase() :
- undefined;
- },
- set: function( elem, value, name ) {
- var propName;
- if ( value === false ) {
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else {
- // value is true since we know at this point it's type boolean and not false
- // Set boolean attributes to the same name and set the DOM property
- propName = jQuery.propFix[ name ] || name;
- if ( propName in elem ) {
- // Only set the IDL specifically if it already exists on the element
- elem[ propName ] = true;
- }
-
- elem.setAttribute( name, name.toLowerCase() );
- }
- return name;
- }
-};
-
-// IE6/7 do not support getting/setting some attributes with get/setAttribute
-if ( !getSetAttribute ) {
-
- fixSpecified = {
- name: true,
- id: true,
- coords: true
- };
-
- // Use this for any attribute in IE6/7
- // This fixes almost every IE6/7 issue
- nodeHook = jQuery.valHooks.button = {
- get: function( elem, name ) {
- var ret;
- ret = elem.getAttributeNode( name );
- return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ?
- ret.value :
- undefined;
- },
- set: function( elem, value, name ) {
- // Set the existing or create a new attribute node
- var ret = elem.getAttributeNode( name );
- if ( !ret ) {
- ret = document.createAttribute( name );
- elem.setAttributeNode( ret );
- }
- return ( ret.value = value + "" );
- }
- };
-
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
- // This is for removals
- jQuery.each([ "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- set: function( elem, value ) {
- if ( value === "" ) {
- elem.setAttribute( name, "auto" );
- return value;
- }
- }
- });
- });
-
- // Set contenteditable to false on removals(#10429)
- // Setting to empty string throws an error as an invalid value
- jQuery.attrHooks.contenteditable = {
- get: nodeHook.get,
- set: function( elem, value, name ) {
- if ( value === "" ) {
- value = "false";
- }
- nodeHook.set( elem, value, name );
- }
- };
-}
-
-
-// Some attributes require a special call on IE
-if ( !jQuery.support.hrefNormalized ) {
- jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- get: function( elem ) {
- var ret = elem.getAttribute( name, 2 );
- return ret === null ? undefined : ret;
- }
- });
- });
-}
-
-if ( !jQuery.support.style ) {
- jQuery.attrHooks.style = {
- get: function( elem ) {
- // Return undefined in the case of empty string
- // Normalize to lowercase since IE uppercases css property names
- return elem.style.cssText.toLowerCase() || undefined;
- },
- set: function( elem, value ) {
- return ( elem.style.cssText = value + "" );
- }
- };
-}
-
-// Safari mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
-if ( !jQuery.support.optSelected ) {
- jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
- get: function( elem ) {
- var parent = elem.parentNode;
-
- if ( parent ) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- return null;
- }
- });
-}
-
-// IE6/7 call enctype encoding
-if ( !jQuery.support.enctype ) {
- jQuery.propFix.enctype = "encoding";
-}
-
-// Radios and checkboxes getter/setter
-if ( !jQuery.support.checkOn ) {
- jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- get: function( elem ) {
- // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
- return elem.getAttribute("value") === null ? "on" : elem.value;
- }
- };
- });
-}
-jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
- }
- }
- });
-});
-var rformElems = /^(?:textarea|input|select)$/i,
- rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/,
- rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|contextmenu)|click/,
- rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
- hoverHack = function( events ) {
- return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
- };
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- add: function( elem, types, handler, data, selector ) {
-
- var elemData, eventHandle, events,
- t, tns, type, namespaces, handleObj,
- handleObjIn, handlers, special;
-
- // Don't attach events to noData or text/comment nodes (allow plain objects tho)
- if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- events = elemData.events;
- if ( !events ) {
- elemData.events = events = {};
- }
- eventHandle = elemData.handle;
- if ( !eventHandle ) {
- elemData.handle = eventHandle = function( e ) {
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
- jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
- undefined;
- };
- // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
- eventHandle.elem = elem;
- }
-
- // Handle multiple events separated by a space
- // jQuery(...).bind("mouseover mouseout", fn);
- types = jQuery.trim( hoverHack(types) ).split( " " );
- for ( t = 0; t < types.length; t++ ) {
-
- tns = rtypenamespace.exec( types[t] ) || [];
- type = tns[1];
- namespaces = ( tns[2] || "" ).split( "." ).sort();
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend({
- type: type,
- origType: tns[1],
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
- namespace: namespaces.join(".")
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- handlers = events[ type ];
- if ( !handlers ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener/attachEvent if the special events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
- // Bind the global event handler to the element
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle, false );
-
- } else if ( elem.attachEvent ) {
- elem.attachEvent( "on" + type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- // Nullify elem to prevent memory leaks in IE
- elem = null;
- },
-
- global: {},
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
-
- var t, tns, type, origType, namespaces, origCount,
- j, events, special, eventType, handleObj,
- elemData = jQuery.hasData( elem ) && jQuery._data( elem );
-
- if ( !elemData || !(events = elemData.events) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
- for ( t = 0; t < types.length; t++ ) {
- tns = rtypenamespace.exec( types[t] ) || [];
- type = origType = tns[1];
- namespaces = tns[2];
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector? special.delegateType : special.bindType ) || type;
- eventType = events[ type ] || [];
- origCount = eventType.length;
- namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
-
- // Remove matching events
- for ( j = 0; j < eventType.length; j++ ) {
- handleObj = eventType[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
- eventType.splice( j--, 1 );
-
- if ( handleObj.selector ) {
- eventType.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( eventType.length === 0 && origCount !== eventType.length ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- delete elemData.handle;
-
- // removeData also checks for emptiness and clears the expando if empty
- // so use it instead of delete
- jQuery.removeData( elem, "events", true );
- }
- },
-
- // Events that are safe to short-circuit if no handlers are attached.
- // Native DOM events should not be added, they may have inline handlers.
- customEvent: {
- "getData": true,
- "setData": true,
- "changeData": true
- },
-
- trigger: function( event, data, elem, onlyHandlers ) {
- // Don't do events on text and comment nodes
- if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
- return;
- }
-
- // Event object or event type
- var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType,
- type = event.type || event,
- namespaces = [];
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf( "!" ) >= 0 ) {
- // Exclusive events trigger only for the exact event (no namespaces)
- type = type.slice(0, -1);
- exclusive = true;
- }
-
- if ( type.indexOf( "." ) >= 0 ) {
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split(".");
- type = namespaces.shift();
- namespaces.sort();
- }
-
- if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
- // No jQuery handlers for this event type, and it can't have inline handlers
- return;
- }
-
- // Caller can pass in an Event, Object, or just an event type string
- event = typeof event === "object" ?
- // jQuery.Event object
- event[ jQuery.expando ] ? event :
- // Object literal
- new jQuery.Event( type, event ) :
- // Just the event type (string)
- new jQuery.Event( type );
-
- event.type = type;
- event.isTrigger = true;
- event.exclusive = exclusive;
- event.namespace = namespaces.join( "." );
- event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
- ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
-
- // Handle a global trigger
- if ( !elem ) {
-
- // TODO: Stop taunting the data cache; remove global events and always attach to document
- cache = jQuery.cache;
- for ( i in cache ) {
- if ( cache[ i ].events && cache[ i ].events[ type ] ) {
- jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
- }
- }
- return;
- }
-
- // Clean up the event in case it is being reused
- event.result = undefined;
- if ( !event.target ) {
- event.target = elem;
- }
-
- // Clone any incoming data and prepend the event, creating the handler arg list
- data = data != null ? jQuery.makeArray( data ) : [];
- data.unshift( event );
-
- // Allow special events to draw outside the lines
- special = jQuery.event.special[ type ] || {};
- if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
- return;
- }
-
- // Determine event propagation path in advance, per W3C events spec (#9951)
- // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
- eventPath = [[ elem, special.bindType || type ]];
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
- bubbleType = special.delegateType || type;
- cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
- for ( old = elem; cur; cur = cur.parentNode ) {
- eventPath.push([ cur, bubbleType ]);
- old = cur;
- }
-
- // Only add window if we got to document (e.g., not plain obj or detached DOM)
- if ( old === (elem.ownerDocument || document) ) {
- eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
- }
- }
-
- // Fire handlers on the event path
- for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
-
- cur = eventPath[i][0];
- event.type = eventPath[i][1];
-
- handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
- if ( handle ) {
- handle.apply( cur, data );
- }
- // Note that this is a bare JS function and not a jQuery handler
- handle = ontype && cur[ ontype ];
- if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
- event.preventDefault();
- }
- }
- event.type = type;
-
- // If nobody prevented the default action, do it now
- if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
- if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
- !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
-
- // Call a native DOM method on the target with the same name name as the event.
- // Can't use an .isFunction() check here because IE6/7 fails that test.
- // Don't do default actions on window, that's where global variables be (#6170)
- // IE<9 dies on focus/blur to hidden element (#1486)
- if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
-
- // Don't re-trigger an onFOO event when we call its FOO() method
- old = elem[ ontype ];
-
- if ( old ) {
- elem[ ontype ] = null;
- }
-
- // Prevent re-triggering of the same event, since we already bubbled it above
- jQuery.event.triggered = type;
- elem[ type ]();
- jQuery.event.triggered = undefined;
-
- if ( old ) {
- elem[ ontype ] = old;
- }
- }
- }
- }
-
- return event.result;
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event || window.event );
-
- var i, j, cur, ret, selMatch, matched, matches, handleObj, sel, related,
- handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
- delegateCount = handlers.delegateCount,
- args = core_slice.call( arguments ),
- run_all = !event.exclusive && !event.namespace,
- special = jQuery.event.special[ event.type ] || {},
- handlerQueue = [];
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[0] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers that should run if there are delegated events
- // Avoid non-left-click bubbling in Firefox (#3861)
- if ( delegateCount && !(event.button && event.type === "click") ) {
-
- for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
-
- // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #11382, #11764)
- if ( cur.disabled !== true || event.type !== "click" ) {
- selMatch = {};
- matches = [];
- for ( i = 0; i < delegateCount; i++ ) {
- handleObj = handlers[ i ];
- sel = handleObj.selector;
-
- if ( selMatch[ sel ] === undefined ) {
- selMatch[ sel ] = handleObj.needsContext ?
- jQuery( sel, this ).index( cur ) >= 0 :
- jQuery.find( sel, this, null, [ cur ] ).length;
- }
- if ( selMatch[ sel ] ) {
- matches.push( handleObj );
- }
- }
- if ( matches.length ) {
- handlerQueue.push({ elem: cur, matches: matches });
- }
- }
- }
- }
-
- // Add the remaining (directly-bound) handlers
- if ( handlers.length > delegateCount ) {
- handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
- }
-
- // Run delegates first; they may want to stop propagation beneath us
- for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
- matched = handlerQueue[ i ];
- event.currentTarget = matched.elem;
-
- for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
- handleObj = matched.matches[ j ];
-
- // Triggered event must either 1) be non-exclusive and have no namespace, or
- // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
- if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
-
- event.data = handleObj.data;
- event.handleObj = handleObj;
-
- ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
- .apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- event.result = ret;
- if ( ret === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- // Includes some event props shared by KeyEvent and MouseEvent
- // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
- props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
-
- fixHooks: {},
-
- keyHooks: {
- props: "char charCode key keyCode".split(" "),
- filter: function( event, original ) {
-
- // Add which for key events
- if ( event.which == null ) {
- event.which = original.charCode != null ? original.charCode : original.keyCode;
- }
-
- return event;
- }
- },
-
- mouseHooks: {
- props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
- filter: function( event, original ) {
- var eventDoc, doc, body,
- button = original.button,
- fromElement = original.fromElement;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && original.clientX != null ) {
- eventDoc = event.target.ownerDocument || document;
- doc = eventDoc.documentElement;
- body = eventDoc.body;
-
- event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
- event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
- }
-
- // Add relatedTarget, if necessary
- if ( !event.relatedTarget && fromElement ) {
- event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
- }
-
- // Add which for click: 1 === left; 2 === middle; 3 === right
- // Note: button is not normalized, so don't use it
- if ( !event.which && button !== undefined ) {
- event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
- }
-
- return event;
- }
- },
-
- fix: function( event ) {
- if ( event[ jQuery.expando ] ) {
- return event;
- }
-
- // Create a writable copy of the event object and normalize some properties
- var i, prop,
- originalEvent = event,
- fixHook = jQuery.event.fixHooks[ event.type ] || {},
- copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
- event = jQuery.Event( originalEvent );
-
- for ( i = copy.length; i; ) {
- prop = copy[ --i ];
- event[ prop ] = originalEvent[ prop ];
- }
-
- // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
- if ( !event.target ) {
- event.target = originalEvent.srcElement || document;
- }
-
- // Target should not be a text node (#504, Safari)
- if ( event.target.nodeType === 3 ) {
- event.target = event.target.parentNode;
- }
-
- // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8)
- event.metaKey = !!event.metaKey;
-
- return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
- },
-
- special: {
- load: {
- // Prevent triggered image.load events from bubbling to window.load
- noBubble: true
- },
-
- focus: {
- delegateType: "focusin"
- },
- blur: {
- delegateType: "focusout"
- },
-
- beforeunload: {
- setup: function( data, namespaces, eventHandle ) {
- // We only want to do this special case on windows
- if ( jQuery.isWindow( this ) ) {
- this.onbeforeunload = eventHandle;
- }
- },
-
- teardown: function( namespaces, eventHandle ) {
- if ( this.onbeforeunload === eventHandle ) {
- this.onbeforeunload = null;
- }
- }
- }
- },
-
- simulate: function( type, elem, event, bubble ) {
- // Piggyback on a donor event to simulate a different one.
- // Fake originalEvent to avoid donor's stopPropagation, but if the
- // simulated event prevents default then we do the same on the donor.
- var e = jQuery.extend(
- new jQuery.Event(),
- event,
- { type: type,
- isSimulated: true,
- originalEvent: {}
- }
- );
- if ( bubble ) {
- jQuery.event.trigger( e, null, elem );
- } else {
- jQuery.event.dispatch.call( elem, e );
- }
- if ( e.isDefaultPrevented() ) {
- event.preventDefault();
- }
- }
-};
-
-// Some plugins are using, but it's undocumented/deprecated and will be removed.
-// The 1.7 special event interface should provide all the hooks needed now.
-jQuery.event.handle = jQuery.event.dispatch;
-
-jQuery.removeEvent = document.removeEventListener ?
- function( elem, type, handle ) {
- if ( elem.removeEventListener ) {
- elem.removeEventListener( type, handle, false );
- }
- } :
- function( elem, type, handle ) {
- var name = "on" + type;
-
- if ( elem.detachEvent ) {
-
- // #8545, #7054, preventing memory leaks for custom events in IE6-8
- // detachEvent needed property on element, by name of that event, to properly expose it to GC
- if ( typeof elem[ name ] === "undefined" ) {
- elem[ name ] = null;
- }
-
- elem.detachEvent( name, handle );
- }
- };
-
-jQuery.Event = function( src, props ) {
- // Allow instantiation without the 'new' keyword
- if ( !(this instanceof jQuery.Event) ) {
- return new jQuery.Event( src, props );
- }
-
- // Event object
- if ( src && src.type ) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
- src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // Put explicitly provided properties onto the event object
- if ( props ) {
- jQuery.extend( this, props );
- }
-
- // Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || jQuery.now();
-
- // Mark it as fixed
- this[ jQuery.expando ] = true;
-};
-
-function returnFalse() {
- return false;
-}
-function returnTrue() {
- return true;
-}
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
- preventDefault: function() {
- this.isDefaultPrevented = returnTrue;
-
- var e = this.originalEvent;
- if ( !e ) {
- return;
- }
-
- // if preventDefault exists run it on the original event
- if ( e.preventDefault ) {
- e.preventDefault();
-
- // otherwise set the returnValue property of the original event to false (IE)
- } else {
- e.returnValue = false;
- }
- },
- stopPropagation: function() {
- this.isPropagationStopped = returnTrue;
-
- var e = this.originalEvent;
- if ( !e ) {
- return;
- }
- // if stopPropagation exists run it on the original event
- if ( e.stopPropagation ) {
- e.stopPropagation();
- }
- // otherwise set the cancelBubble property of the original event to true (IE)
- e.cancelBubble = true;
- },
- stopImmediatePropagation: function() {
- this.isImmediatePropagationStopped = returnTrue;
- this.stopPropagation();
- },
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse
-};
-
-// Create mouseenter/leave events using mouseover/out and event-time checks
-jQuery.each({
- mouseenter: "mouseover",
- mouseleave: "mouseout"
-}, function( orig, fix ) {
- jQuery.event.special[ orig ] = {
- delegateType: fix,
- bindType: fix,
-
- handle: function( event ) {
- var ret,
- target = this,
- related = event.relatedTarget,
- handleObj = event.handleObj,
- selector = handleObj.selector;
-
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
- event.type = handleObj.origType;
- ret = handleObj.handler.apply( this, arguments );
- event.type = fix;
- }
- return ret;
- }
- };
-});
-
-// IE submit delegation
-if ( !jQuery.support.submitBubbles ) {
-
- jQuery.event.special.submit = {
- setup: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Lazy-add a submit handler when a descendant form may potentially be submitted
- jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
- // Node name check avoids a VML-related crash in IE (#9807)
- var elem = e.target,
- form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
- if ( form && !jQuery._data( form, "_submit_attached" ) ) {
- jQuery.event.add( form, "submit._submit", function( event ) {
- event._submit_bubble = true;
- });
- jQuery._data( form, "_submit_attached", true );
- }
- });
- // return undefined since we don't need an event listener
- },
-
- postDispatch: function( event ) {
- // If form was submitted by the user, bubble the event up the tree
- if ( event._submit_bubble ) {
- delete event._submit_bubble;
- if ( this.parentNode && !event.isTrigger ) {
- jQuery.event.simulate( "submit", this.parentNode, event, true );
- }
- }
- },
-
- teardown: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
- jQuery.event.remove( this, "._submit" );
- }
- };
-}
-
-// IE change delegation and checkbox/radio fix
-if ( !jQuery.support.changeBubbles ) {
-
- jQuery.event.special.change = {
-
- setup: function() {
-
- if ( rformElems.test( this.nodeName ) ) {
- // IE doesn't fire change on a check/radio until blur; trigger it on click
- // after a propertychange. Eat the blur-change in special.change.handle.
- // This still fires onchange a second time for check/radio after blur.
- if ( this.type === "checkbox" || this.type === "radio" ) {
- jQuery.event.add( this, "propertychange._change", function( event ) {
- if ( event.originalEvent.propertyName === "checked" ) {
- this._just_changed = true;
- }
- });
- jQuery.event.add( this, "click._change", function( event ) {
- if ( this._just_changed && !event.isTrigger ) {
- this._just_changed = false;
- }
- // Allow triggered, simulated change events (#11500)
- jQuery.event.simulate( "change", this, event, true );
- });
- }
- return false;
- }
- // Delegated event; lazy-add a change handler on descendant inputs
- jQuery.event.add( this, "beforeactivate._change", function( e ) {
- var elem = e.target;
-
- if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) {
- jQuery.event.add( elem, "change._change", function( event ) {
- if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
- jQuery.event.simulate( "change", this.parentNode, event, true );
- }
- });
- jQuery._data( elem, "_change_attached", true );
- }
- });
- },
-
- handle: function( event ) {
- var elem = event.target;
-
- // Swallow native change events from checkbox/radio, we already triggered them above
- if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
- return event.handleObj.handler.apply( this, arguments );
- }
- },
-
- teardown: function() {
- jQuery.event.remove( this, "._change" );
-
- return !rformElems.test( this.nodeName );
- }
- };
-}
-
-// Create "bubbling" focus and blur events
-if ( !jQuery.support.focusinBubbles ) {
- jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
- // Attach a single capturing handler while someone wants focusin/focusout
- var attaches = 0,
- handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
- };
-
- jQuery.event.special[ fix ] = {
- setup: function() {
- if ( attaches++ === 0 ) {
- document.addEventListener( orig, handler, true );
- }
- },
- teardown: function() {
- if ( --attaches === 0 ) {
- document.removeEventListener( orig, handler, true );
- }
- }
- };
- });
-}
-
-jQuery.fn.extend({
-
- on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
- var origFn, type;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) { // && selector != null
- // ( types-Object, data )
- data = data || selector;
- selector = undefined;
- }
- for ( type in types ) {
- this.on( type, selector, data, types[ type ], one );
- }
- return this;
- }
-
- if ( data == null && fn == null ) {
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return this;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return this.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- });
- },
- one: function( types, selector, data, fn ) {
- return this.on( types, selector, data, fn, 1 );
- },
- off: function( types, selector, fn ) {
- var handleObj, type;
- if ( types && types.preventDefault && types.handleObj ) {
- // ( event ) dispatched jQuery.Event
- handleObj = types.handleObj;
- jQuery( types.delegateTarget ).off(
- handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
- handleObj.selector,
- handleObj.handler
- );
- return this;
- }
- if ( typeof types === "object" ) {
- // ( types-object [, selector] )
- for ( type in types ) {
- this.off( type, selector, types[ type ] );
- }
- return this;
- }
- if ( selector === false || typeof selector === "function" ) {
- // ( types [, fn] )
- fn = selector;
- selector = undefined;
- }
- if ( fn === false ) {
- fn = returnFalse;
- }
- return this.each(function() {
- jQuery.event.remove( this, types, fn, selector );
- });
- },
-
- bind: function( types, data, fn ) {
- return this.on( types, null, data, fn );
- },
- unbind: function( types, fn ) {
- return this.off( types, null, fn );
- },
-
- live: function( types, data, fn ) {
- jQuery( this.context ).on( types, this.selector, data, fn );
- return this;
- },
- die: function( types, fn ) {
- jQuery( this.context ).off( types, this.selector || "**", fn );
- return this;
- },
-
- delegate: function( selector, types, data, fn ) {
- return this.on( types, selector, data, fn );
- },
- undelegate: function( selector, types, fn ) {
- // ( namespace ) or ( selector, types [, fn] )
- return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
- },
-
- trigger: function( type, data ) {
- return this.each(function() {
- jQuery.event.trigger( type, data, this );
- });
- },
- triggerHandler: function( type, data ) {
- if ( this[0] ) {
- return jQuery.event.trigger( type, data, this[0], true );
- }
- },
-
- toggle: function( fn ) {
- // Save reference to arguments for access in closure
- var args = arguments,
- guid = fn.guid || jQuery.guid++,
- i = 0,
- toggler = function( event ) {
- // Figure out which function to execute
- var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
- jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
-
- // Make sure that clicks stop
- event.preventDefault();
-
- // and execute the function
- return args[ lastToggle ].apply( this, arguments ) || false;
- };
-
- // link all the functions, so any of them can unbind this click handler
- toggler.guid = guid;
- while ( i < args.length ) {
- args[ i++ ].guid = guid;
- }
-
- return this.click( toggler );
- },
-
- hover: function( fnOver, fnOut ) {
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
- }
-});
-
-jQuery.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( i, name ) {
-
- // Handle event binding
- jQuery.fn[ name ] = function( data, fn ) {
- if ( fn == null ) {
- fn = data;
- data = null;
- }
-
- return arguments.length > 0 ?
- this.on( name, null, data, fn ) :
- this.trigger( name );
- };
-
- if ( rkeyEvent.test( name ) ) {
- jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
- }
-
- if ( rmouseEvent.test( name ) ) {
- jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
- }
-});
-/*!
- * Sizzle CSS Selector Engine
- * Copyright 2012 jQuery Foundation and other contributors
- * Released under the MIT license
- * http://sizzlejs.com/
- */
-(function( window, undefined ) {
-
-var cachedruns,
- assertGetIdNotName,
- Expr,
- getText,
- isXML,
- contains,
- compile,
- sortOrder,
- hasDuplicate,
- outermostContext,
-
- baseHasDuplicate = true,
- strundefined = "undefined",
-
- expando = ( "sizcache" + Math.random() ).replace( ".", "" ),
-
- Token = String,
- document = window.document,
- docElem = document.documentElement,
- dirruns = 0,
- done = 0,
- pop = [].pop,
- push = [].push,
- slice = [].slice,
- // Use a stripped-down indexOf if a native one is unavailable
- indexOf = [].indexOf || function( elem ) {
- var i = 0,
- len = this.length;
- for ( ; i < len; i++ ) {
- if ( this[i] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
- // Augment a function for special use by Sizzle
- markFunction = function( fn, value ) {
- fn[ expando ] = value == null || value;
- return fn;
- },
-
- createCache = function() {
- var cache = {},
- keys = [];
-
- return markFunction(function( key, value ) {
- // Only keep the most recent entries
- if ( keys.push( key ) > Expr.cacheLength ) {
- delete cache[ keys.shift() ];
- }
-
- // Retrieve with (key + " ") to avoid collision with native Object.prototype properties (see Issue #157)
- return (cache[ key + " " ] = value);
- }, cache );
- },
-
- classCache = createCache(),
- tokenCache = createCache(),
- compilerCache = createCache(),
-
- // Regex
-
- // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
- // http://www.w3.org/TR/css3-syntax/#characters
- characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",
-
- // Loosely modeled on CSS identifier characters
- // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors)
- // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = characterEncoding.replace( "w", "w#" ),
-
- // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
- operators = "([*^$|!~]?=)",
- attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
- "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
-
- // Prefer arguments not in parens/brackets,
- // then attribute selectors and non-pseudos (denoted by :),
- // then anything else
- // These preferences are here to reduce the number of selectors
- // needing tokenize in the PSEUDO preFilter
- pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:" + attributes + ")|[^:]|\\\\.)*|.*))\\)|)",
-
- // For matchExpr.POS and matchExpr.needsContext
- pos = ":(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
- "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)",
-
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ),
- rpseudo = new RegExp( pseudos ),
-
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
- rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,
-
- rnot = /^:not/,
- rsibling = /[\x20\t\r\n\f]*[+~]/,
- rendsWithNot = /:not\($/,
-
- rheader = /h\d/i,
- rinputs = /input|select|textarea|button/i,
-
- rbackslash = /\\(?!\\)/g,
-
- matchExpr = {
- "ID": new RegExp( "^#(" + characterEncoding + ")" ),
- "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
- "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
- "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
- "ATTR": new RegExp( "^" + attributes ),
- "PSEUDO": new RegExp( "^" + pseudos ),
- "POS": new RegExp( pos, "i" ),
- "CHILD": new RegExp( "^:(only|nth|first|last)-child(?:\\(" + whitespace +
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- // For use in libraries implementing .is()
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" )
- },
-
- // Support
-
- // Used for testing something on an element
- assert = function( fn ) {
- var div = document.createElement("div");
-
- try {
- return fn( div );
- } catch (e) {
- return false;
- } finally {
- // release memory in IE
- div = null;
- }
- },
-
- // Check if getElementsByTagName("*") returns only elements
- assertTagNameNoComments = assert(function( div ) {
- div.appendChild( document.createComment("") );
- return !div.getElementsByTagName("*").length;
- }),
-
- // Check if getAttribute returns normalized href attributes
- assertHrefNotNormalized = assert(function( div ) {
- div.innerHTML = "<a href='#'></a>";
- return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&
- div.firstChild.getAttribute("href") === "#";
- }),
-
- // Check if attributes should be retrieved by attribute nodes
- assertAttributes = assert(function( div ) {
- div.innerHTML = "<select></select>";
- var type = typeof div.lastChild.getAttribute("multiple");
- // IE8 returns a string for some attributes even when not present
- return type !== "boolean" && type !== "string";
- }),
-
- // Check if getElementsByClassName can be trusted
- assertUsableClassName = assert(function( div ) {
- // Opera can't find a second classname (in 9.6)
- div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>";
- if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) {
- return false;
- }
-
- // Safari 3.2 caches class attributes and doesn't catch changes
- div.lastChild.className = "e";
- return div.getElementsByClassName("e").length === 2;
- }),
-
- // Check if getElementById returns elements by name
- // Check if getElementsByName privileges form controls or returns elements by ID
- assertUsableName = assert(function( div ) {
- // Inject content
- div.id = expando + 0;
- div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>";
- docElem.insertBefore( div, docElem.firstChild );
-
- // Test
- var pass = document.getElementsByName &&
- // buggy browsers will return fewer than the correct 2
- document.getElementsByName( expando ).length === 2 +
- // buggy browsers will return more than the correct 0
- document.getElementsByName( expando + 0 ).length;
- assertGetIdNotName = !document.getElementById( expando );
-
- // Cleanup
- docElem.removeChild( div );
-
- return pass;
- });
-
-// If slice is not available, provide a backup
-try {
- slice.call( docElem.childNodes, 0 )[0].nodeType;
-} catch ( e ) {
- slice = function( i ) {
- var elem,
- results = [];
- for ( ; (elem = this[i]); i++ ) {
- results.push( elem );
- }
- return results;
- };
-}
-
-function Sizzle( selector, context, results, seed ) {
- results = results || [];
- context = context || document;
- var match, elem, xml, m,
- nodeType = context.nodeType;
-
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
-
- if ( nodeType !== 1 && nodeType !== 9 ) {
- return [];
- }
-
- xml = isXML( context );
-
- if ( !xml && !seed ) {
- if ( (match = rquickExpr.exec( selector )) ) {
- // Speed-up: Sizzle("#ID")
- if ( (m = match[1]) ) {
- if ( nodeType === 9 ) {
- elem = context.getElementById( m );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE, Opera, and Webkit return items
- // by name instead of ID
- if ( elem.id === m ) {
- results.push( elem );
- return results;
- }
- } else {
- return results;
- }
- } else {
- // Context is not a document
- if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
- contains( context, elem ) && elem.id === m ) {
- results.push( elem );
- return results;
- }
- }
-
- // Speed-up: Sizzle("TAG")
- } else if ( match[2] ) {
- push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );
- return results;
-
- // Speed-up: Sizzle(".CLASS")
- } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) {
- push.apply( results, slice.call(context.getElementsByClassName( m ), 0) );
- return results;
- }
- }
- }
-
- // All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed, xml );
-}
-
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
- return Sizzle( expr, null, null, [ elem ] ).length > 0;
-};
-
-// Returns a function to use in pseudos for input types
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-// Returns a function to use in pseudos for buttons
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-// Returns a function to use in pseudos for positionals
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( nodeType ) {
- if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (see #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- // Do not include comment or processing instruction nodes
- } else {
-
- // If no nodeType, this is expected to be an array
- for ( ; (node = elem[i]); i++ ) {
- // Do not traverse comment nodes
- ret += getText( node );
- }
- }
- return ret;
-};
-
-isXML = Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-// Element contains another
-contains = Sizzle.contains = docElem.contains ?
- function( a, b ) {
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) );
- } :
- docElem.compareDocumentPosition ?
- function( a, b ) {
- return b && !!( a.compareDocumentPosition( b ) & 16 );
- } :
- function( a, b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- return false;
- };
-
-Sizzle.attr = function( elem, name ) {
- var val,
- xml = isXML( elem );
-
- if ( !xml ) {
- name = name.toLowerCase();
- }
- if ( (val = Expr.attrHandle[ name ]) ) {
- return val( elem );
- }
- if ( xml || assertAttributes ) {
- return elem.getAttribute( name );
- }
- val = elem.getAttributeNode( name );
- return val ?
- typeof elem[ name ] === "boolean" ?
- elem[ name ] ? name : null :
- val.specified ? val.value : null :
- null;
-};
-
-Expr = Sizzle.selectors = {
-
- // Can be adjusted by the user
- cacheLength: 50,
-
- createPseudo: markFunction,
-
- match: matchExpr,
-
- // IE6/7 return a modified href
- attrHandle: assertHrefNotNormalized ?
- {} :
- {
- "href": function( elem ) {
- return elem.getAttribute( "href", 2 );
- },
- "type": function( elem ) {
- return elem.getAttribute("type");
- }
- },
-
- find: {
- "ID": assertGetIdNotName ?
- function( id, context, xml ) {
- if ( typeof context.getElementById !== strundefined && !xml ) {
- var m = context.getElementById( id );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- return m && m.parentNode ? [m] : [];
- }
- } :
- function( id, context, xml ) {
- if ( typeof context.getElementById !== strundefined && !xml ) {
- var m = context.getElementById( id );
-
- return m ?
- m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
- [m] :
- undefined :
- [];
- }
- },
-
- "TAG": assertTagNameNoComments ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== strundefined ) {
- return context.getElementsByTagName( tag );
- }
- } :
- function( tag, context ) {
- var results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- var elem,
- tmp = [],
- i = 0;
-
- for ( ; (elem = results[i]); i++ ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
-
- return tmp;
- }
- return results;
- },
-
- "NAME": assertUsableName && function( tag, context ) {
- if ( typeof context.getElementsByName !== strundefined ) {
- return context.getElementsByName( name );
- }
- },
-
- "CLASS": assertUsableClassName && function( className, context, xml ) {
- if ( typeof context.getElementsByClassName !== strundefined && !xml ) {
- return context.getElementsByClassName( className );
- }
- }
- },
-
- relative: {
- ">": { dir: "parentNode", first: true },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: true },
- "~": { dir: "previousSibling" }
- },
-
- preFilter: {
- "ATTR": function( match ) {
- match[1] = match[1].replace( rbackslash, "" );
-
- // Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" );
-
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
- }
-
- return match.slice( 0, 4 );
- },
-
- "CHILD": function( match ) {
- /* matches from matchExpr["CHILD"]
- 1 type (only|nth|...)
- 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
- 3 xn-component of xn+y argument ([+-]?\d*n|)
- 4 sign of xn-component
- 5 x of xn-component
- 6 sign of y-component
- 7 y of y-component
- */
- match[1] = match[1].toLowerCase();
-
- if ( match[1] === "nth" ) {
- // nth-child requires argument
- if ( !match[2] ) {
- Sizzle.error( match[0] );
- }
-
- // numeric x and y parameters for Expr.filter.CHILD
- // remember that false/true cast respectively to 0/1
- match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) );
- match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" );
-
- // other types prohibit arguments
- } else if ( match[2] ) {
- Sizzle.error( match[0] );
- }
-
- return match;
- },
-
- "PSEUDO": function( match ) {
- var unquoted, excess;
- if ( matchExpr["CHILD"].test( match[0] ) ) {
- return null;
- }
-
- if ( match[3] ) {
- match[2] = match[3];
- } else if ( (unquoted = match[4]) ) {
- // Only check arguments that contain a pseudo
- if ( rpseudo.test(unquoted) &&
- // Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
- // advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
- // excess is a negative index
- unquoted = unquoted.slice( 0, excess );
- match[0] = match[0].slice( 0, excess );
- }
- match[2] = unquoted;
- }
-
- // Return only captures needed by the pseudo filter method (type and argument)
- return match.slice( 0, 3 );
- }
- },
-
- filter: {
- "ID": assertGetIdNotName ?
- function( id ) {
- id = id.replace( rbackslash, "" );
- return function( elem ) {
- return elem.getAttribute("id") === id;
- };
- } :
- function( id ) {
- id = id.replace( rbackslash, "" );
- return function( elem ) {
- var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
- return node && node.value === id;
- };
- },
-
- "TAG": function( nodeName ) {
- if ( nodeName === "*" ) {
- return function() { return true; };
- }
- nodeName = nodeName.replace( rbackslash, "" ).toLowerCase();
-
- return function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
-
- "CLASS": function( className ) {
- var pattern = classCache[ expando ][ className + " " ];
-
- return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
- });
- },
-
- "ATTR": function( name, operator, check ) {
- return function( elem, context ) {
- var result = Sizzle.attr( elem, name );
-
- if ( result == null ) {
- return operator === "!=";
- }
- if ( !operator ) {
- return true;
- }
-
- result += "";
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.substr( result.length - check.length ) === check :
- operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" :
- false;
- };
- },
-
- "CHILD": function( type, argument, first, last ) {
-
- if ( type === "nth" ) {
- return function( elem ) {
- var node, diff,
- parent = elem.parentNode;
-
- if ( first === 1 && last === 0 ) {
- return true;
- }
-
- if ( parent ) {
- diff = 0;
- for ( node = parent.firstChild; node; node = node.nextSibling ) {
- if ( node.nodeType === 1 ) {
- diff++;
- if ( elem === node ) {
- break;
- }
- }
- }
- }
-
- // Incorporate the offset (or cast to NaN), then check against cycle size
- diff -= last;
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
- };
- }
-
- return function( elem ) {
- var node = elem;
-
- switch ( type ) {
- case "only":
- case "first":
- while ( (node = node.previousSibling) ) {
- if ( node.nodeType === 1 ) {
- return false;
- }
- }
-
- if ( type === "first" ) {
- return true;
- }
-
- node = elem;
-
- /* falls through */
- case "last":
- while ( (node = node.nextSibling) ) {
- if ( node.nodeType === 1 ) {
- return false;
- }
- }
-
- return true;
- }
- };
- },
-
- "PSEUDO": function( pseudo, argument ) {
- // pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
- // Remember that setFilters inherits from pseudos
- var args,
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
-
- // The user may use createPseudo to indicate that
- // arguments are needed to create the filter function
- // just as Sizzle does
- if ( fn[ expando ] ) {
- return fn( argument );
- }
-
- // But maintain support for old signatures
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
- var idx,
- matched = fn( seed, argument ),
- i = matched.length;
- while ( i-- ) {
- idx = indexOf.call( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
- }
- }) :
- function( elem ) {
- return fn( elem, 0, args );
- };
- }
-
- return fn;
- }
- },
-
- pseudos: {
- "not": markFunction(function( selector ) {
- // Trim the selector passed to compile
- // to avoid treating leading and trailing
- // spaces as combinators
- var input = [],
- results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
-
- return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
- var elem,
- unmatched = matcher( seed, null, xml, [] ),
- i = seed.length;
-
- // Match elements unmatched by `matcher`
- while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
- }
- }
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
- matcher( input, null, xml, results );
- return !results.pop();
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
- "contains": markFunction(function( text ) {
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- "enabled": function( elem ) {
- return elem.disabled === false;
- },
-
- "disabled": function( elem ) {
- return elem.disabled === true;
- },
-
- "checked": function( elem ) {
- // In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
- },
-
- "selected": function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- "parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
- },
-
- "empty": function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
- // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
- // not comment, processing instructions, or others
- // Thanks to Diego Perini for the nodeName shortcut
- // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
- var nodeType;
- elem = elem.firstChild;
- while ( elem ) {
- if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) {
- return false;
- }
- elem = elem.nextSibling;
- }
- return true;
- },
-
- "header": function( elem ) {
- return rheader.test( elem.nodeName );
- },
-
- "text": function( elem ) {
- var type, attr;
- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
- // use getAttribute instead to test this case
- return elem.nodeName.toLowerCase() === "input" &&
- (type = elem.type) === "text" &&
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type );
- },
-
- // Input types
- "radio": createInputPseudo("radio"),
- "checkbox": createInputPseudo("checkbox"),
- "file": createInputPseudo("file"),
- "password": createInputPseudo("password"),
- "image": createInputPseudo("image"),
-
- "submit": createButtonPseudo("submit"),
- "reset": createButtonPseudo("reset"),
-
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
- },
-
- "input": function( elem ) {
- return rinputs.test( elem.nodeName );
- },
-
- "focus": function( elem ) {
- var doc = elem.ownerDocument;
- return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
-
- "active": function( elem ) {
- return elem === elem.ownerDocument.activeElement;
- },
-
- // Positional types
- "first": createPositionalPseudo(function() {
- return [ 0 ];
- }),
-
- "last": createPositionalPseudo(function( matchIndexes, length ) {
- return [ length - 1 ];
- }),
-
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
- return [ argument < 0 ? argument + length : argument ];
- }),
-
- "even": createPositionalPseudo(function( matchIndexes, length ) {
- for ( var i = 0; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
- for ( var i = 1; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- for ( var i = argument < 0 ? argument + length : argument; --i >= 0; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- for ( var i = argument < 0 ? argument + length : argument; ++i < length; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- })
- }
-};
-
-function siblingCheck( a, b, ret ) {
- if ( a === b ) {
- return ret;
- }
-
- var cur = a.nextSibling;
-
- while ( cur ) {
- if ( cur === b ) {
- return -1;
- }
-
- cur = cur.nextSibling;
- }
-
- return 1;
-}
-
-sortOrder = docElem.compareDocumentPosition ?
- function( a, b ) {
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- return ( !a.compareDocumentPosition || !b.compareDocumentPosition ?
- a.compareDocumentPosition :
- a.compareDocumentPosition(b) & 4
- ) ? -1 : 1;
- } :
- function( a, b ) {
- // The nodes are identical, we can exit early
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
-
- // Fallback to using sourceIndex (in IE) if it's available on both nodes
- } else if ( a.sourceIndex && b.sourceIndex ) {
- return a.sourceIndex - b.sourceIndex;
- }
-
- var al, bl,
- ap = [],
- bp = [],
- aup = a.parentNode,
- bup = b.parentNode,
- cur = aup;
-
- // If the nodes are siblings (or identical) we can do a quick check
- if ( aup === bup ) {
- return siblingCheck( a, b );
-
- // If no parents were found then the nodes are disconnected
- } else if ( !aup ) {
- return -1;
-
- } else if ( !bup ) {
- return 1;
- }
-
- // Otherwise they're somewhere else in the tree so we need
- // to build up a full list of the parentNodes for comparison
- while ( cur ) {
- ap.unshift( cur );
- cur = cur.parentNode;
- }
-
- cur = bup;
-
- while ( cur ) {
- bp.unshift( cur );
- cur = cur.parentNode;
- }
-
- al = ap.length;
- bl = bp.length;
-
- // Start walking down the tree looking for a discrepancy
- for ( var i = 0; i < al && i < bl; i++ ) {
- if ( ap[i] !== bp[i] ) {
- return siblingCheck( ap[i], bp[i] );
- }
- }
-
- // We ended someplace up the tree so do a sibling check
- return i === al ?
- siblingCheck( a, bp[i], -1 ) :
- siblingCheck( ap[i], b, 1 );
- };
-
-// Always assume the presence of duplicates if sort doesn't
-// pass them to our comparison function (as in Google Chrome).
-[0, 0].sort( sortOrder );
-baseHasDuplicate = !hasDuplicate;
-
-// Document sorting and removing duplicates
-Sizzle.uniqueSort = function( results ) {
- var elem,
- duplicates = [],
- i = 1,
- j = 0;
-
- hasDuplicate = baseHasDuplicate;
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- for ( ; (elem = results[i]); i++ ) {
- if ( elem === results[ i - 1 ] ) {
- j = duplicates.push( i );
- }
- }
- while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
- }
- }
-
- return results;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-function tokenize( selector, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, preFilters,
- cached = tokenCache[ expando ][ selector + " " ];
-
- if ( cached ) {
- return parseOnly ? 0 : cached.slice( 0 );
- }
-
- soFar = selector;
- groups = [];
- preFilters = Expr.preFilter;
-
- while ( soFar ) {
-
- // Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
- if ( match ) {
- // Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
- }
- groups.push( tokens = [] );
- }
-
- matched = false;
-
- // Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
- tokens.push( matched = new Token( match.shift() ) );
- soFar = soFar.slice( matched.length );
-
- // Cast descendant combinators to space
- matched.type = match[0].replace( rtrim, " " );
- }
-
- // Filters
- for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
-
- tokens.push( matched = new Token( match.shift() ) );
- soFar = soFar.slice( matched.length );
- matched.type = type;
- matched.matches = match;
- }
- }
-
- if ( !matched ) {
- break;
- }
- }
-
- // Return the length of the invalid excess
- // if we're just parsing
- // Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-}
-
-function addCombinator( matcher, combinator, base ) {
- var dir = combinator.dir,
- checkNonElements = base && combinator.dir === "parentNode",
- doneName = done++;
-
- return combinator.first ?
- // Check against closest ancestor/preceding element
- function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( checkNonElements || elem.nodeType === 1 ) {
- return matcher( elem, context, xml );
- }
- }
- } :
-
- // Check against all ancestor/preceding elements
- function( elem, context, xml ) {
- // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
- if ( !xml ) {
- var cache,
- dirkey = dirruns + " " + doneName + " ",
- cachedkey = dirkey + cachedruns;
- while ( (elem = elem[ dir ]) ) {
- if ( checkNonElements || elem.nodeType === 1 ) {
- if ( (cache = elem[ expando ]) === cachedkey ) {
- return elem.sizset;
- } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) {
- if ( elem.sizset ) {
- return elem;
- }
- } else {
- elem[ expando ] = cachedkey;
- if ( matcher( elem, context, xml ) ) {
- elem.sizset = true;
- return elem;
- }
- elem.sizset = false;
- }
- }
- }
- } else {
- while ( (elem = elem[ dir ]) ) {
- if ( checkNonElements || elem.nodeType === 1 ) {
- if ( matcher( elem, context, xml ) ) {
- return elem;
- }
- }
- }
- }
- };
-}
-
-function elementMatcher( matchers ) {
- return matchers.length > 1 ?
- function( elem, context, xml ) {
- var i = matchers.length;
- while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
- return false;
- }
- }
- return true;
- } :
- matchers[0];
-}
-
-function condense( unmatched, map, filter, context, xml ) {
- var elem,
- newUnmatched = [],
- i = 0,
- len = unmatched.length,
- mapped = map != null;
-
- for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
- if ( !filter || filter( elem, context, xml ) ) {
- newUnmatched.push( elem );
- if ( mapped ) {
- map.push( i );
- }
- }
- }
- }
-
- return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
- if ( postFilter && !postFilter[ expando ] ) {
- postFilter = setMatcher( postFilter );
- }
- if ( postFinder && !postFinder[ expando ] ) {
- postFinder = setMatcher( postFinder, postSelector );
- }
- return markFunction(function( seed, results, context, xml ) {
- var temp, i, elem,
- preMap = [],
- postMap = [],
- preexisting = results.length,
-
- // Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
- matcherIn = preFilter && ( seed || !selector ) ?
- condense( elems, preMap, preFilter, context, xml ) :
- elems,
-
- matcherOut = matcher ?
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
- // ...intermediate processing is necessary
- [] :
-
- // ...otherwise use results directly
- results :
- matcherIn;
-
- // Find primary matches
- if ( matcher ) {
- matcher( matcherIn, matcherOut, context, xml );
- }
-
- // Apply postFilter
- if ( postFilter ) {
- temp = condense( matcherOut, postMap );
- postFilter( temp, [], context, xml );
-
- // Un-match failing elements by moving them back to matcherIn
- i = temp.length;
- while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
- }
- }
- }
-
- if ( seed ) {
- if ( postFinder || preFilter ) {
- if ( postFinder ) {
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
- temp = [];
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- // Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
- }
- }
- postFinder( null, (matcherOut = []), temp, xml );
- }
-
- // Move matched elements from seed to results to keep them synchronized
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
-
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
-
- // Add elements to results, through postFinder if defined
- } else {
- matcherOut = condense(
- matcherOut === results ?
- matcherOut.splice( preexisting, matcherOut.length ) :
- matcherOut
- );
- if ( postFinder ) {
- postFinder( null, results, matcherOut, xml );
- } else {
- push.apply( results, matcherOut );
- }
- }
- });
-}
-
-function matcherFromTokens( tokens ) {
- var checkContext, matcher, j,
- len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
- i = leadingRelative ? 1 : 0,
-
- // The foundational matcher ensures that elements are reachable from top-level context(s)
- matchContext = addCombinator( function( elem ) {
- return elem === checkContext;
- }, implicitRelative, true ),
- matchAnyContext = addCombinator( function( elem ) {
- return indexOf.call( checkContext, elem ) > -1;
- }, implicitRelative, true ),
- matchers = [ function( elem, context, xml ) {
- return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
- matchContext( elem, context, xml ) :
- matchAnyContext( elem, context, xml ) );
- } ];
-
- for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
- } else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
- // Return special upon seeing a positional matcher
- if ( matcher[ expando ] ) {
- // Find the next relative operator (if any) for proper handling
- j = ++i;
- for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
- break;
- }
- }
- return setMatcher(
- i > 1 && elementMatcher( matchers ),
- i > 1 && tokens.slice( 0, i - 1 ).join("").replace( rtrim, "$1" ),
- matcher,
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
- j < len && tokens.join("")
- );
- }
- matchers.push( matcher );
- }
- }
-
- return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
- var bySet = setMatchers.length > 0,
- byElement = elementMatchers.length > 0,
- superMatcher = function( seed, context, xml, results, expandContext ) {
- var elem, j, matcher,
- setMatched = [],
- matchedCount = 0,
- i = "0",
- unmatched = seed && [],
- outermost = expandContext != null,
- contextBackup = outermostContext,
- // We must always have either seed elements or context
- elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
- // Nested matchers should use non-integer dirruns
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E);
-
- if ( outermost ) {
- outermostContext = context !== document && context;
- cachedruns = superMatcher.el;
- }
-
- // Add elements passing elementMatchers directly to results
- for ( ; (elem = elems[i]) != null; i++ ) {
- if ( byElement && elem ) {
- for ( j = 0; (matcher = elementMatchers[j]); j++ ) {
- if ( matcher( elem, context, xml ) ) {
- results.push( elem );
- break;
- }
- }
- if ( outermost ) {
- dirruns = dirrunsUnique;
- cachedruns = ++superMatcher.el;
- }
- }
-
- // Track unmatched elements for set filters
- if ( bySet ) {
- // They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
- matchedCount--;
- }
-
- // Lengthen the array for every element, matched or not
- if ( seed ) {
- unmatched.push( elem );
- }
- }
- }
-
- // Apply set filters to unmatched elements
- matchedCount += i;
- if ( bySet && i !== matchedCount ) {
- for ( j = 0; (matcher = setMatchers[j]); j++ ) {
- matcher( unmatched, setMatched, context, xml );
- }
-
- if ( seed ) {
- // Reintegrate element matches to eliminate the need for sorting
- if ( matchedCount > 0 ) {
- while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
- }
- }
- }
-
- // Discard index placeholder values to get only actual matches
- setMatched = condense( setMatched );
- }
-
- // Add matches to results
- push.apply( results, setMatched );
-
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
- if ( outermost && !seed && setMatched.length > 0 &&
- ( matchedCount + setMatchers.length ) > 1 ) {
-
- Sizzle.uniqueSort( results );
- }
- }
-
- // Override manipulation of globals by nested matchers
- if ( outermost ) {
- dirruns = dirrunsUnique;
- outermostContext = contextBackup;
- }
-
- return unmatched;
- };
-
- superMatcher.el = 0;
- return bySet ?
- markFunction( superMatcher ) :
- superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
- var i,
- setMatchers = [],
- elementMatchers = [],
- cached = compilerCache[ expando ][ selector + " " ];
-
- if ( !cached ) {
- // Generate a function of recursive functions that can be used to check each element
- if ( !group ) {
- group = tokenize( selector );
- }
- i = group.length;
- while ( i-- ) {
- cached = matcherFromTokens( group[i] );
- if ( cached[ expando ] ) {
- setMatchers.push( cached );
- } else {
- elementMatchers.push( cached );
- }
- }
-
- // Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
- }
- return cached;
-};
-
-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function select( selector, context, results, seed, xml ) {
- var i, tokens, token, type, find,
- match = tokenize( selector ),
- j = match.length;
-
- if ( !seed ) {
- // Try to minimize operations if there is only one group
- if ( match.length === 1 ) {
-
- // Take a shortcut and set the context if the root selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- context.nodeType === 9 && !xml &&
- Expr.relative[ tokens[1].type ] ) {
-
- context = Expr.find["ID"]( token.matches[0].replace( rbackslash, "" ), context, xml )[0];
- if ( !context ) {
- return results;
- }
-
- selector = selector.slice( tokens.shift().length );
- }
-
- // Fetch a seed set for right-to-left matching
- for ( i = matchExpr["POS"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) {
- token = tokens[i];
-
- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( rbackslash, "" ),
- rsibling.test( tokens[0].type ) && context.parentNode || context,
- xml
- )) ) {
-
- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && tokens.join("");
- if ( !selector ) {
- push.apply( results, slice.call( seed, 0 ) );
- return results;
- }
-
- break;
- }
- }
- }
- }
- }
-
- // Compile and execute a filtering function
- // Provide `match` to avoid retokenization if we modified the selector above
- compile( selector, match )(
- seed,
- context,
- xml,
- results,
- rsibling.test( selector )
- );
- return results;
-}
-
-if ( document.querySelectorAll ) {
- (function() {
- var disconnectedMatch,
- oldSelect = select,
- rescape = /'|\\/g,
- rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
-
- // qSa(:focus) reports false when true (Chrome 21), no need to also add to buggyMatches since matches checks buggyQSA
- // A support test would require too much code (would include document ready)
- rbuggyQSA = [ ":focus" ],
-
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- // A support test would require too much code (would include document ready)
- // just skip matchesSelector for :active
- rbuggyMatches = [ ":active" ],
- matches = docElem.matchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.webkitMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector;
-
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert(function( div ) {
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explictly
- // setting a boolean content attribute,
- // since its presence should be enough
- // http://bugs.jquery.com/ticket/12359
- div.innerHTML = "<select><option selected=''></option></select>";
-
- // IE8 - Some boolean attributes are not treated correctly
- if ( !div.querySelectorAll("[selected]").length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );
- }
-
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here (do not put tests after this one)
- if ( !div.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
- }
- });
-
- assert(function( div ) {
-
- // Opera 10-12/IE9 - ^= $= *= and empty values
- // Should not select anything
- div.innerHTML = "<p test=''></p>";
- if ( div.querySelectorAll("[test^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here (do not put tests after this one)
- div.innerHTML = "<input type='hidden'/>";
- if ( !div.querySelectorAll(":enabled").length ) {
- rbuggyQSA.push(":enabled", ":disabled");
- }
- });
-
- // rbuggyQSA always contains :focus, so no need for a length check
- rbuggyQSA = /* rbuggyQSA.length && */ new RegExp( rbuggyQSA.join("|") );
-
- select = function( selector, context, results, seed, xml ) {
- // Only use querySelectorAll when not filtering,
- // when this is not xml,
- // and when no QSA bugs apply
- if ( !seed && !xml && !rbuggyQSA.test( selector ) ) {
- var groups, i,
- old = true,
- nid = expando,
- newContext = context,
- newSelector = context.nodeType === 9 && selector;
-
- // qSA works strangely on Element-rooted queries
- // We can work around this by specifying an extra ID on the root
- // and working up from there (Thanks to Andrew Dupont for the technique)
- // IE 8 doesn't work on object elements
- if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
- groups = tokenize( selector );
-
- if ( (old = context.getAttribute("id")) ) {
- nid = old.replace( rescape, "\\$&" );
- } else {
- context.setAttribute( "id", nid );
- }
- nid = "[id='" + nid + "'] ";
-
- i = groups.length;
- while ( i-- ) {
- groups[i] = nid + groups[i].join("");
- }
- newContext = rsibling.test( selector ) && context.parentNode || context;
- newSelector = groups.join(",");
- }
-
- if ( newSelector ) {
- try {
- push.apply( results, slice.call( newContext.querySelectorAll(
- newSelector
- ), 0 ) );
- return results;
- } catch(qsaError) {
- } finally {
- if ( !old ) {
- context.removeAttribute("id");
- }
- }
- }
- }
-
- return oldSelect( selector, context, results, seed, xml );
- };
-
- if ( matches ) {
- assert(function( div ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- disconnectedMatch = matches.call( div, "div" );
-
- // This should fail with an exception
- // Gecko does not error, returns false instead
- try {
- matches.call( div, "[test!='']:sizzle" );
- rbuggyMatches.push( "!=", pseudos );
- } catch ( e ) {}
- });
-
- // rbuggyMatches always contains :active and :focus, so no need for a length check
- rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") );
-
- Sizzle.matchesSelector = function( elem, expr ) {
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
-
- // rbuggyMatches always contains :active, so no need for an existence check
- if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && !rbuggyQSA.test( expr ) ) {
- try {
- var ret = matches.call( elem, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
- return ret;
- }
- } catch(e) {}
- }
-
- return Sizzle( expr, null, null, [ elem ] ).length > 0;
- };
- }
- })();
-}
-
-// Deprecated
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Back-compat
-function setFilters() {}
-Expr.filters = setFilters.prototype = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-// Override sizzle attribute retrieval
-Sizzle.attr = jQuery.attr;
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.pseudos;
-jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-})( window );
-var runtil = /Until$/,
- rparentsprev = /^(?:parents|prev(?:Until|All))/,
- isSimple = /^.[^:#\[\.,]*$/,
- rneedsContext = jQuery.expr.match.needsContext,
- // methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.fn.extend({
- find: function( selector ) {
- var i, l, length, n, r, ret,
- self = this;
-
- if ( typeof selector !== "string" ) {
- return jQuery( selector ).filter(function() {
- for ( i = 0, l = self.length; i < l; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- });
- }
-
- ret = this.pushStack( "", "find", selector );
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- length = ret.length;
- jQuery.find( selector, this[i], ret );
-
- if ( i > 0 ) {
- // Make sure that the results are unique
- for ( n = length; n < ret.length; n++ ) {
- for ( r = 0; r < length; r++ ) {
- if ( ret[r] === ret[n] ) {
- ret.splice(n--, 1);
- break;
- }
- }
- }
- }
- }
-
- return ret;
- },
-
- has: function( target ) {
- var i,
- targets = jQuery( target, this ),
- len = targets.length;
-
- return this.filter(function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( this, targets[i] ) ) {
- return true;
- }
- }
- });
- },
-
- not: function( selector ) {
- return this.pushStack( winnow(this, selector, false), "not", selector);
- },
-
- filter: function( selector ) {
- return this.pushStack( winnow(this, selector, true), "filter", selector );
- },
-
- is: function( selector ) {
- return !!selector && (
- typeof selector === "string" ?
- // If this is a positional/relative selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- rneedsContext.test( selector ) ?
- jQuery( selector, this.context ).index( this[0] ) >= 0 :
- jQuery.filter( selector, this ).length > 0 :
- this.filter( selector ).length > 0 );
- },
-
- closest: function( selectors, context ) {
- var cur,
- i = 0,
- l = this.length,
- ret = [],
- pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( ; i < l; i++ ) {
- cur = this[i];
-
- while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) {
- if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
- ret.push( cur );
- break;
- }
- cur = cur.parentNode;
- }
- }
-
- ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
-
- return this.pushStack( ret, "closest", selectors );
- },
-
- // Determine the position of an element within
- // the matched set of elements
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
- }
-
- // index in selector
- if ( typeof elem === "string" ) {
- return jQuery.inArray( this[0], jQuery( elem ) );
- }
-
- // Locate the position of the desired element
- return jQuery.inArray(
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[0] : elem, this );
- },
-
- add: function( selector, context ) {
- var set = typeof selector === "string" ?
- jQuery( selector, context ) :
- jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
- all = jQuery.merge( this.get(), set );
-
- return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
- all :
- jQuery.unique( all ) );
- },
-
- addBack: function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter(selector)
- );
- }
-});
-
-jQuery.fn.andSelf = jQuery.fn.addBack;
-
-// A painfully simple check to see if an element is disconnected
-// from a document (should be improved, where feasible).
-function isDisconnected( node ) {
- return !node || !node.parentNode || node.parentNode.nodeType === 11;
-}
-
-function sibling( cur, dir ) {
- do {
- cur = cur[ dir ];
- } while ( cur && cur.nodeType !== 1 );
-
- return cur;
-}
-
-jQuery.each({
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return jQuery.dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return sibling( elem, "nextSibling" );
- },
- prev: function( elem ) {
- return sibling( elem, "previousSibling" );
- },
- nextAll: function( elem ) {
- return jQuery.dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return jQuery.dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
- },
- children: function( elem ) {
- return jQuery.sibling( elem.firstChild );
- },
- contents: function( elem ) {
- return jQuery.nodeName( elem, "iframe" ) ?
- elem.contentDocument || elem.contentWindow.document :
- jQuery.merge( [], elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var ret = jQuery.map( this, fn, until );
-
- if ( !runtil.test( name ) ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- ret = jQuery.filter( selector, ret );
- }
-
- ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
-
- if ( this.length > 1 && rparentsprev.test( name ) ) {
- ret = ret.reverse();
- }
-
- return this.pushStack( ret, name, core_slice.call( arguments ).join(",") );
- };
-});
-
-jQuery.extend({
- filter: function( expr, elems, not ) {
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 ?
- jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
- jQuery.find.matches(expr, elems);
- },
-
- dir: function( elem, dir, until ) {
- var matched = [],
- cur = elem[ dir ];
-
- while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
- if ( cur.nodeType === 1 ) {
- matched.push( cur );
- }
- cur = cur[dir];
- }
- return matched;
- },
-
- sibling: function( n, elem ) {
- var r = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- r.push( n );
- }
- }
-
- return r;
- }
-});
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, keep ) {
-
- // Can't pass null or undefined to indexOf in Firefox 4
- // Set to 0 to skip string check
- qualifier = qualifier || 0;
-
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep(elements, function( elem, i ) {
- var retVal = !!qualifier.call( elem, i, elem );
- return retVal === keep;
- });
-
- } else if ( qualifier.nodeType ) {
- return jQuery.grep(elements, function( elem, i ) {
- return ( elem === qualifier ) === keep;
- });
-
- } else if ( typeof qualifier === "string" ) {
- var filtered = jQuery.grep(elements, function( elem ) {
- return elem.nodeType === 1;
- });
-
- if ( isSimple.test( qualifier ) ) {
- return jQuery.filter(qualifier, filtered, !keep);
- } else {
- qualifier = jQuery.filter( qualifier, filtered );
- }
- }
-
- return jQuery.grep(elements, function( elem, i ) {
- return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
- });
-}
-function createSafeFragment( document ) {
- var list = nodeNames.split( "|" ),
- safeFrag = document.createDocumentFragment();
-
- if ( safeFrag.createElement ) {
- while ( list.length ) {
- safeFrag.createElement(
- list.pop()
- );
- }
- }
- return safeFrag;
-}
-
-var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
- "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
- rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
- rleadingWhitespace = /^\s+/,
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
- rtagName = /<([\w:]+)/,
- rtbody = /<tbody/i,
- rhtml = /<|&#?\w+;/,
- rnoInnerhtml = /<(?:script|style|link)/i,
- rnocache = /<(?:script|object|embed|option|style)/i,
- rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
- rcheckableType = /^(?:checkbox|radio)$/,
- // checked="checked" or checked
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
- rscriptType = /\/(java|ecma)script/i,
- rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,
- wrapMap = {
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
- legend: [ 1, "<fieldset>", "</fieldset>" ],
- thead: [ 1, "<table>", "</table>" ],
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
- col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
- area: [ 1, "<map>", "</map>" ],
- _default: [ 0, "", "" ]
- },
- safeFragment = createSafeFragment( document ),
- fragmentDiv = safeFragment.appendChild( document.createElement("div") );
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
-// unless wrapped in a div with non-breaking characters in front of it.
-if ( !jQuery.support.htmlSerialize ) {
- wrapMap._default = [ 1, "X<div>", "</div>" ];
-}
-
-jQuery.fn.extend({
- text: function( value ) {
- return jQuery.access( this, function( value ) {
- return value === undefined ?
- jQuery.text( this ) :
- this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
- }, null, value, arguments.length );
- },
-
- wrapAll: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapAll( html.call(this, i) );
- });
- }
-
- if ( this[0] ) {
- // The elements to wrap the target around
- var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
-
- if ( this[0].parentNode ) {
- wrap.insertBefore( this[0] );
- }
-
- wrap.map(function() {
- var elem = this;
-
- while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
- elem = elem.firstChild;
- }
-
- return elem;
- }).append( this );
- }
-
- return this;
- },
-
- wrapInner: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapInner( html.call(this, i) );
- });
- }
-
- return this.each(function() {
- var self = jQuery( this ),
- contents = self.contents();
-
- if ( contents.length ) {
- contents.wrapAll( html );
-
- } else {
- self.append( html );
- }
- });
- },
-
- wrap: function( html ) {
- var isFunction = jQuery.isFunction( html );
-
- return this.each(function(i) {
- jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
- });
- },
-
- unwrap: function() {
- return this.parent().each(function() {
- if ( !jQuery.nodeName( this, "body" ) ) {
- jQuery( this ).replaceWith( this.childNodes );
- }
- }).end();
- },
-
- append: function() {
- return this.domManip(arguments, true, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 ) {
- this.appendChild( elem );
- }
- });
- },
-
- prepend: function() {
- return this.domManip(arguments, true, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 ) {
- this.insertBefore( elem, this.firstChild );
- }
- });
- },
-
- before: function() {
- if ( !isDisconnected( this[0] ) ) {
- return this.domManip(arguments, false, function( elem ) {
- this.parentNode.insertBefore( elem, this );
- });
- }
-
- if ( arguments.length ) {
- var set = jQuery.clean( arguments );
- return this.pushStack( jQuery.merge( set, this ), "before", this.selector );
- }
- },
-
- after: function() {
- if ( !isDisconnected( this[0] ) ) {
- return this.domManip(arguments, false, function( elem ) {
- this.parentNode.insertBefore( elem, this.nextSibling );
- });
- }
-
- if ( arguments.length ) {
- var set = jQuery.clean( arguments );
- return this.pushStack( jQuery.merge( this, set ), "after", this.selector );
- }
- },
-
- // keepData is for internal use only--do not document
- remove: function( selector, keepData ) {
- var elem,
- i = 0;
-
- for ( ; (elem = this[i]) != null; i++ ) {
- if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
- if ( !keepData && elem.nodeType === 1 ) {
- jQuery.cleanData( elem.getElementsByTagName("*") );
- jQuery.cleanData( [ elem ] );
- }
-
- if ( elem.parentNode ) {
- elem.parentNode.removeChild( elem );
- }
- }
- }
-
- return this;
- },
-
- empty: function() {
- var elem,
- i = 0;
-
- for ( ; (elem = this[i]) != null; i++ ) {
- // Remove element nodes and prevent memory leaks
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( elem.getElementsByTagName("*") );
- }
-
- // Remove any remaining nodes
- while ( elem.firstChild ) {
- elem.removeChild( elem.firstChild );
- }
- }
-
- return this;
- },
-
- clone: function( dataAndEvents, deepDataAndEvents ) {
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
-
- return this.map( function () {
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
- });
- },
-
- html: function( value ) {
- return jQuery.access( this, function( value ) {
- var elem = this[0] || {},
- i = 0,
- l = this.length;
-
- if ( value === undefined ) {
- return elem.nodeType === 1 ?
- elem.innerHTML.replace( rinlinejQuery, "" ) :
- undefined;
- }
-
- // See if we can take a shortcut and just use innerHTML
- if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
- ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
- ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
- !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
-
- value = value.replace( rxhtmlTag, "<$1></$2>" );
-
- try {
- for (; i < l; i++ ) {
- // Remove element nodes and prevent memory leaks
- elem = this[i] || {};
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( elem.getElementsByTagName( "*" ) );
- elem.innerHTML = value;
- }
- }
-
- elem = 0;
-
- // If using innerHTML throws an exception, use the fallback method
- } catch(e) {}
- }
-
- if ( elem ) {
- this.empty().append( value );
- }
- }, null, value, arguments.length );
- },
-
- replaceWith: function( value ) {
- if ( !isDisconnected( this[0] ) ) {
- // Make sure that the elements are removed from the DOM before they are inserted
- // this can help fix replacing a parent with child elements
- if ( jQuery.isFunction( value ) ) {
- return this.each(function(i) {
- var self = jQuery(this), old = self.html();
- self.replaceWith( value.call( this, i, old ) );
- });
- }
-
- if ( typeof value !== "string" ) {
- value = jQuery( value ).detach();
- }
-
- return this.each(function() {
- var next = this.nextSibling,
- parent = this.parentNode;
-
- jQuery( this ).remove();
-
- if ( next ) {
- jQuery(next).before( value );
- } else {
- jQuery(parent).append( value );
- }
- });
- }
-
- return this.length ?
- this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
- this;
- },
-
- detach: function( selector ) {
- return this.remove( selector, true );
- },
-
- domManip: function( args, table, callback ) {
-
- // Flatten any nested arrays
- args = [].concat.apply( [], args );
-
- var results, first, fragment, iNoClone,
- i = 0,
- value = args[0],
- scripts = [],
- l = this.length;
-
- // We can't cloneNode fragments that contain checked, in WebKit
- if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) {
- return this.each(function() {
- jQuery(this).domManip( args, table, callback );
- });
- }
-
- if ( jQuery.isFunction(value) ) {
- return this.each(function(i) {
- var self = jQuery(this);
- args[0] = value.call( this, i, table ? self.html() : undefined );
- self.domManip( args, table, callback );
- });
- }
-
- if ( this[0] ) {
- results = jQuery.buildFragment( args, this, scripts );
- fragment = results.fragment;
- first = fragment.firstChild;
-
- if ( fragment.childNodes.length === 1 ) {
- fragment = first;
- }
-
- if ( first ) {
- table = table && jQuery.nodeName( first, "tr" );
-
- // Use the original fragment for the last item instead of the first because it can end up
- // being emptied incorrectly in certain situations (#8070).
- // Fragments from the fragment cache must always be cloned and never used in place.
- for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) {
- callback.call(
- table && jQuery.nodeName( this[i], "table" ) ?
- findOrAppend( this[i], "tbody" ) :
- this[i],
- i === iNoClone ?
- fragment :
- jQuery.clone( fragment, true, true )
- );
- }
- }
-
- // Fix #11809: Avoid leaking memory
- fragment = first = null;
-
- if ( scripts.length ) {
- jQuery.each( scripts, function( i, elem ) {
- if ( elem.src ) {
- if ( jQuery.ajax ) {
- jQuery.ajax({
- url: elem.src,
- type: "GET",
- dataType: "script",
- async: false,
- global: false,
- "throws": true
- });
- } else {
- jQuery.error("no ajax");
- }
- } else {
- jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) );
- }
-
- if ( elem.parentNode ) {
- elem.parentNode.removeChild( elem );
- }
- });
- }
- }
-
- return this;
- }
-});
-
-function findOrAppend( elem, tag ) {
- return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
-}
-
-function cloneCopyEvent( src, dest ) {
-
- if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
- return;
- }
-
- var type, i, l,
- oldData = jQuery._data( src ),
- curData = jQuery._data( dest, oldData ),
- events = oldData.events;
-
- if ( events ) {
- delete curData.handle;
- curData.events = {};
-
- for ( type in events ) {
- for ( i = 0, l = events[ type ].length; i < l; i++ ) {
- jQuery.event.add( dest, type, events[ type ][ i ] );
- }
- }
- }
-
- // make the cloned public data object a copy from the original
- if ( curData.data ) {
- curData.data = jQuery.extend( {}, curData.data );
- }
-}
-
-function cloneFixAttributes( src, dest ) {
- var nodeName;
-
- // We do not need to do anything for non-Elements
- if ( dest.nodeType !== 1 ) {
- return;
- }
-
- // clearAttributes removes the attributes, which we don't want,
- // but also removes the attachEvent events, which we *do* want
- if ( dest.clearAttributes ) {
- dest.clearAttributes();
- }
-
- // mergeAttributes, in contrast, only merges back on the
- // original attributes, not the events
- if ( dest.mergeAttributes ) {
- dest.mergeAttributes( src );
- }
-
- nodeName = dest.nodeName.toLowerCase();
-
- if ( nodeName === "object" ) {
- // IE6-10 improperly clones children of object elements using classid.
- // IE10 throws NoModificationAllowedError if parent is null, #12132.
- if ( dest.parentNode ) {
- dest.outerHTML = src.outerHTML;
- }
-
- // This path appears unavoidable for IE9. When cloning an object
- // element in IE9, the outerHTML strategy above is not sufficient.
- // If the src has innerHTML and the destination does not,
- // copy the src.innerHTML into the dest.innerHTML. #10324
- if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) {
- dest.innerHTML = src.innerHTML;
- }
-
- } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
- // IE6-8 fails to persist the checked state of a cloned checkbox
- // or radio button. Worse, IE6-7 fail to give the cloned element
- // a checked appearance if the defaultChecked value isn't also set
-
- dest.defaultChecked = dest.checked = src.checked;
-
- // IE6-7 get confused and end up setting the value of a cloned
- // checkbox/radio button to an empty string instead of "on"
- if ( dest.value !== src.value ) {
- dest.value = src.value;
- }
-
- // IE6-8 fails to return the selected option to the default selected
- // state when cloning options
- } else if ( nodeName === "option" ) {
- dest.selected = src.defaultSelected;
-
- // IE6-8 fails to set the defaultValue to the correct value when
- // cloning other types of input fields
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
- dest.defaultValue = src.defaultValue;
-
- // IE blanks contents when cloning scripts
- } else if ( nodeName === "script" && dest.text !== src.text ) {
- dest.text = src.text;
- }
-
- // Event data gets referenced instead of copied if the expando
- // gets copied too
- dest.removeAttribute( jQuery.expando );
-}
-
-jQuery.buildFragment = function( args, context, scripts ) {
- var fragment, cacheable, cachehit,
- first = args[ 0 ];
-
- // Set context from what may come in as undefined or a jQuery collection or a node
- // Updated to fix #12266 where accessing context[0] could throw an exception in IE9/10 &
- // also doubles as fix for #8950 where plain objects caused createDocumentFragment exception
- context = context || document;
- context = !context.nodeType && context[0] || context;
- context = context.ownerDocument || context;
-
- // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
- // Cloning options loses the selected state, so don't cache them
- // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
- // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
- // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
- if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document &&
- first.charAt(0) === "<" && !rnocache.test( first ) &&
- (jQuery.support.checkClone || !rchecked.test( first )) &&
- (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
-
- // Mark cacheable and look for a hit
- cacheable = true;
- fragment = jQuery.fragments[ first ];
- cachehit = fragment !== undefined;
- }
-
- if ( !fragment ) {
- fragment = context.createDocumentFragment();
- jQuery.clean( args, context, fragment, scripts );
-
- // Update the cache, but only store false
- // unless this is a second parsing of the same content
- if ( cacheable ) {
- jQuery.fragments[ first ] = cachehit && fragment;
- }
- }
-
- return { fragment: fragment, cacheable: cacheable };
-};
-
-jQuery.fragments = {};
-
-jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function( name, original ) {
- jQuery.fn[ name ] = function( selector ) {
- var elems,
- i = 0,
- ret = [],
- insert = jQuery( selector ),
- l = insert.length,
- parent = this.length === 1 && this[0].parentNode;
-
- if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) {
- insert[ original ]( this[0] );
- return this;
- } else {
- for ( ; i < l; i++ ) {
- elems = ( i > 0 ? this.clone(true) : this ).get();
- jQuery( insert[i] )[ original ]( elems );
- ret = ret.concat( elems );
- }
-
- return this.pushStack( ret, name, insert.selector );
- }
- };
-});
-
-function getAll( elem ) {
- if ( typeof elem.getElementsByTagName !== "undefined" ) {
- return elem.getElementsByTagName( "*" );
-
- } else if ( typeof elem.querySelectorAll !== "undefined" ) {
- return elem.querySelectorAll( "*" );
-
- } else {
- return [];
- }
-}
-
-// Used in clean, fixes the defaultChecked property
-function fixDefaultChecked( elem ) {
- if ( rcheckableType.test( elem.type ) ) {
- elem.defaultChecked = elem.checked;
- }
-}
-
-jQuery.extend({
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
- var srcElements,
- destElements,
- i,
- clone;
-
- if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
- clone = elem.cloneNode( true );
-
- // IE<=8 does not properly clone detached, unknown element nodes
- } else {
- fragmentDiv.innerHTML = elem.outerHTML;
- fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
- }
-
- if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
- (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
- // IE copies events bound via attachEvent when using cloneNode.
- // Calling detachEvent on the clone will also remove the events
- // from the original. In order to get around this, we use some
- // proprietary methods to clear the events. Thanks to MooTools
- // guys for this hotness.
-
- cloneFixAttributes( elem, clone );
-
- // Using Sizzle here is crazy slow, so we use getElementsByTagName instead
- srcElements = getAll( elem );
- destElements = getAll( clone );
-
- // Weird iteration because IE will replace the length property
- // with an element if you are cloning the body and one of the
- // elements on the page has a name or id of "length"
- for ( i = 0; srcElements[i]; ++i ) {
- // Ensure that the destination node is not null; Fixes #9587
- if ( destElements[i] ) {
- cloneFixAttributes( srcElements[i], destElements[i] );
- }
- }
- }
-
- // Copy the events from the original to the clone
- if ( dataAndEvents ) {
- cloneCopyEvent( elem, clone );
-
- if ( deepDataAndEvents ) {
- srcElements = getAll( elem );
- destElements = getAll( clone );
-
- for ( i = 0; srcElements[i]; ++i ) {
- cloneCopyEvent( srcElements[i], destElements[i] );
- }
- }
- }
-
- srcElements = destElements = null;
-
- // Return the cloned set
- return clone;
- },
-
- clean: function( elems, context, fragment, scripts ) {
- var i, j, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags,
- safe = context === document && safeFragment,
- ret = [];
-
- // Ensure that context is a document
- if ( !context || typeof context.createDocumentFragment === "undefined" ) {
- context = document;
- }
-
- // Use the already-created safe fragment if context permits
- for ( i = 0; (elem = elems[i]) != null; i++ ) {
- if ( typeof elem === "number" ) {
- elem += "";
- }
-
- if ( !elem ) {
- continue;
- }
-
- // Convert html string into DOM nodes
- if ( typeof elem === "string" ) {
- if ( !rhtml.test( elem ) ) {
- elem = context.createTextNode( elem );
- } else {
- // Ensure a safe container in which to render the html
- safe = safe || createSafeFragment( context );
- div = context.createElement("div");
- safe.appendChild( div );
-
- // Fix "XHTML"-style tags in all browsers
- elem = elem.replace(rxhtmlTag, "<$1></$2>");
-
- // Go to html and back, then peel off extra wrappers
- tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
- wrap = wrapMap[ tag ] || wrapMap._default;
- depth = wrap[0];
- div.innerHTML = wrap[1] + elem + wrap[2];
-
- // Move to the right depth
- while ( depth-- ) {
- div = div.lastChild;
- }
-
- // Remove IE's autoinserted <tbody> from table fragments
- if ( !jQuery.support.tbody ) {
-
- // String was a <table>, *may* have spurious <tbody>
- hasBody = rtbody.test(elem);
- tbody = tag === "table" && !hasBody ?
- div.firstChild && div.firstChild.childNodes :
-
- // String was a bare <thead> or <tfoot>
- wrap[1] === "<table>" && !hasBody ?
- div.childNodes :
- [];
-
- for ( j = tbody.length - 1; j >= 0 ; --j ) {
- if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
- tbody[ j ].parentNode.removeChild( tbody[ j ] );
- }
- }
- }
-
- // IE completely kills leading whitespace when innerHTML is used
- if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
- div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
- }
-
- elem = div.childNodes;
-
- // Take out of fragment container (we need a fresh div each time)
- div.parentNode.removeChild( div );
- }
- }
-
- if ( elem.nodeType ) {
- ret.push( elem );
- } else {
- jQuery.merge( ret, elem );
- }
- }
-
- // Fix #11356: Clear elements from safeFragment
- if ( div ) {
- elem = div = safe = null;
- }
-
- // Reset defaultChecked for any radios and checkboxes
- // about to be appended to the DOM in IE 6/7 (#8060)
- if ( !jQuery.support.appendChecked ) {
- for ( i = 0; (elem = ret[i]) != null; i++ ) {
- if ( jQuery.nodeName( elem, "input" ) ) {
- fixDefaultChecked( elem );
- } else if ( typeof elem.getElementsByTagName !== "undefined" ) {
- jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
- }
- }
- }
-
- // Append elements to a provided document fragment
- if ( fragment ) {
- // Special handling of each script element
- handleScript = function( elem ) {
- // Check if we consider it executable
- if ( !elem.type || rscriptType.test( elem.type ) ) {
- // Detach the script and store it in the scripts array (if provided) or the fragment
- // Return truthy to indicate that it has been handled
- return scripts ?
- scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
- fragment.appendChild( elem );
- }
- };
-
- for ( i = 0; (elem = ret[i]) != null; i++ ) {
- // Check if we're done after handling an executable script
- if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
- // Append to fragment and handle embedded scripts
- fragment.appendChild( elem );
- if ( typeof elem.getElementsByTagName !== "undefined" ) {
- // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
- jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
-
- // Splice the scripts into ret after their former ancestor and advance our index beyond them
- ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
- i += jsTags.length;
- }
- }
- }
- }
-
- return ret;
- },
-
- cleanData: function( elems, /* internal */ acceptData ) {
- var data, id, elem, type,
- i = 0,
- internalKey = jQuery.expando,
- cache = jQuery.cache,
- deleteExpando = jQuery.support.deleteExpando,
- special = jQuery.event.special;
-
- for ( ; (elem = elems[i]) != null; i++ ) {
-
- if ( acceptData || jQuery.acceptData( elem ) ) {
-
- id = elem[ internalKey ];
- data = id && cache[ id ];
-
- if ( data ) {
- if ( data.events ) {
- for ( type in data.events ) {
- if ( special[ type ] ) {
- jQuery.event.remove( elem, type );
-
- // This is a shortcut to avoid jQuery.event.remove's overhead
- } else {
- jQuery.removeEvent( elem, type, data.handle );
- }
- }
- }
-
- // Remove cache only if it was not already removed by jQuery.event.remove
- if ( cache[ id ] ) {
-
- delete cache[ id ];
-
- // IE does not allow us to delete expando properties from nodes,
- // nor does it have a removeAttribute function on Document nodes;
- // we must handle all of these cases
- if ( deleteExpando ) {
- delete elem[ internalKey ];
-
- } else if ( elem.removeAttribute ) {
- elem.removeAttribute( internalKey );
-
- } else {
- elem[ internalKey ] = null;
- }
-
- jQuery.deletedIds.push( id );
- }
- }
- }
- }
- }
-});
-// Limit scope pollution from any deprecated API
-(function() {
-
-var matched, browser;
-
-// Use of jQuery.browser is frowned upon.
-// More details: http://api.jquery.com/jQuery.browser
-// jQuery.uaMatch maintained for back-compat
-jQuery.uaMatch = function( ua ) {
- ua = ua.toLowerCase();
-
- var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
- /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
- /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
- /(msie) ([\w.]+)/.exec( ua ) ||
- ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
- [];
-
- return {
- browser: match[ 1 ] || "",
- version: match[ 2 ] || "0"
- };
-};
-
-matched = jQuery.uaMatch( navigator.userAgent );
-browser = {};
-
-if ( matched.browser ) {
- browser[ matched.browser ] = true;
- browser.version = matched.version;
-}
-
-// Chrome is Webkit, but Webkit is also Safari.
-if ( browser.chrome ) {
- browser.webkit = true;
-} else if ( browser.webkit ) {
- browser.safari = true;
-}
-
-jQuery.browser = browser;
-
-jQuery.sub = function() {
- function jQuerySub( selector, context ) {
- return new jQuerySub.fn.init( selector, context );
- }
- jQuery.extend( true, jQuerySub, this );
- jQuerySub.superclass = this;
- jQuerySub.fn = jQuerySub.prototype = this();
- jQuerySub.fn.constructor = jQuerySub;
- jQuerySub.sub = this.sub;
- jQuerySub.fn.init = function init( selector, context ) {
- if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
- context = jQuerySub( context );
- }
-
- return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
- };
- jQuerySub.fn.init.prototype = jQuerySub.fn;
- var rootjQuerySub = jQuerySub(document);
- return jQuerySub;
-};
-
-})();
-var curCSS, iframe, iframeDoc,
- ralpha = /alpha\([^)]*\)/i,
- ropacity = /opacity=([^)]*)/,
- rposition = /^(top|right|bottom|left)$/,
- // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
- // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
- rdisplayswap = /^(none|table(?!-c[ea]).+)/,
- rmargin = /^margin/,
- rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
- rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
- rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ),
- elemdisplay = { BODY: "block" },
-
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
- cssNormalTransform = {
- letterSpacing: 0,
- fontWeight: 400
- },
-
- cssExpand = [ "Top", "Right", "Bottom", "Left" ],
- cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
-
- eventsToggle = jQuery.fn.toggle;
-
-// return a css property mapped to a potentially vendor prefixed property
-function vendorPropName( style, name ) {
-
- // shortcut for names that are not vendor prefixed
- if ( name in style ) {
- return name;
- }
-
- // check for vendor prefixed names
- var capName = name.charAt(0).toUpperCase() + name.slice(1),
- origName = name,
- i = cssPrefixes.length;
-
- while ( i-- ) {
- name = cssPrefixes[ i ] + capName;
- if ( name in style ) {
- return name;
- }
- }
-
- return origName;
-}
-
-function isHidden( elem, el ) {
- elem = el || elem;
- return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
-}
-
-function showHide( elements, show ) {
- var elem, display,
- values = [],
- index = 0,
- length = elements.length;
-
- for ( ; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
- values[ index ] = jQuery._data( elem, "olddisplay" );
- if ( show ) {
- // Reset the inline display of this element to learn if it is
- // being hidden by cascaded rules or not
- if ( !values[ index ] && elem.style.display === "none" ) {
- elem.style.display = "";
- }
-
- // Set elements which have been overridden with display: none
- // in a stylesheet to whatever the default browser style is
- // for such an element
- if ( elem.style.display === "" && isHidden( elem ) ) {
- values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
- }
- } else {
- display = curCSS( elem, "display" );
-
- if ( !values[ index ] && display !== "none" ) {
- jQuery._data( elem, "olddisplay", display );
- }
- }
- }
-
- // Set the display of most of the elements in a second loop
- // to avoid the constant reflow
- for ( index = 0; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
- if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
- elem.style.display = show ? values[ index ] || "" : "none";
- }
- }
-
- return elements;
-}
-
-jQuery.fn.extend({
- css: function( name, value ) {
- return jQuery.access( this, function( elem, name, value ) {
- return value !== undefined ?
- jQuery.style( elem, name, value ) :
- jQuery.css( elem, name );
- }, name, value, arguments.length > 1 );
- },
- show: function() {
- return showHide( this, true );
- },
- hide: function() {
- return showHide( this );
- },
- toggle: function( state, fn2 ) {
- var bool = typeof state === "boolean";
-
- if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) {
- return eventsToggle.apply( this, arguments );
- }
-
- return this.each(function() {
- if ( bool ? state : isHidden( this ) ) {
- jQuery( this ).show();
- } else {
- jQuery( this ).hide();
- }
- });
- }
-});
-
-jQuery.extend({
- // Add in style property hooks for overriding the default
- // behavior of getting and setting a style property
- cssHooks: {
- opacity: {
- get: function( elem, computed ) {
- if ( computed ) {
- // We should always get a number back from opacity
- var ret = curCSS( elem, "opacity" );
- return ret === "" ? "1" : ret;
-
- }
- }
- }
- },
-
- // Exclude the following css properties to add px
- cssNumber: {
- "fillOpacity": true,
- "fontWeight": true,
- "lineHeight": true,
- "opacity": true,
- "orphans": true,
- "widows": true,
- "zIndex": true,
- "zoom": true
- },
-
- // Add in properties whose names you wish to fix before
- // setting or getting the value
- cssProps: {
- // normalize float css property
- "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
- },
-
- // Get and set the style property on a DOM Node
- style: function( elem, name, value, extra ) {
- // Don't set styles on text and comment nodes
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
- return;
- }
-
- // Make sure that we're working with the right name
- var ret, type, hooks,
- origName = jQuery.camelCase( name ),
- style = elem.style;
-
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // Check if we're setting a value
- if ( value !== undefined ) {
- type = typeof value;
-
- // convert relative number strings (+= or -=) to relative numbers. #7345
- if ( type === "string" && (ret = rrelNum.exec( value )) ) {
- value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
- // Fixes bug #9237
- type = "number";
- }
-
- // Make sure that NaN and null values aren't set. See: #7116
- if ( value == null || type === "number" && isNaN( value ) ) {
- return;
- }
-
- // If a number was passed in, add 'px' to the (except for certain CSS properties)
- if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
- value += "px";
- }
-
- // If a hook was provided, use that value, otherwise just set the specified value
- if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
- // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
- // Fixes bug #5509
- try {
- style[ name ] = value;
- } catch(e) {}
- }
-
- } else {
- // If a hook was provided get the non-computed value from there
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
- return ret;
- }
-
- // Otherwise just get the value from the style object
- return style[ name ];
- }
- },
-
- css: function( elem, name, numeric, extra ) {
- var val, num, hooks,
- origName = jQuery.camelCase( name );
-
- // Make sure that we're working with the right name
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // If a hook was provided get the computed value from there
- if ( hooks && "get" in hooks ) {
- val = hooks.get( elem, true, extra );
- }
-
- // Otherwise, if a way to get the computed value exists, use that
- if ( val === undefined ) {
- val = curCSS( elem, name );
- }
-
- //convert "normal" to computed value
- if ( val === "normal" && name in cssNormalTransform ) {
- val = cssNormalTransform[ name ];
- }
-
- // Return, converting to number if forced or a qualifier was provided and val looks numeric
- if ( numeric || extra !== undefined ) {
- num = parseFloat( val );
- return numeric || jQuery.isNumeric( num ) ? num || 0 : val;
- }
- return val;
- },
-
- // A method for quickly swapping in/out CSS properties to get correct calculations
- swap: function( elem, options, callback ) {
- var ret, name,
- old = {};
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.call( elem );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
- }
-});
-
-// NOTE: To any future maintainer, we've window.getComputedStyle
-// because jsdom on node.js will break without it.
-if ( window.getComputedStyle ) {
- curCSS = function( elem, name ) {
- var ret, width, minWidth, maxWidth,
- computed = window.getComputedStyle( elem, null ),
- style = elem.style;
-
- if ( computed ) {
-
- // getPropertyValue is only needed for .css('filter') in IE9, see #12537
- ret = computed.getPropertyValue( name ) || computed[ name ];
-
- if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
- ret = jQuery.style( elem, name );
- }
-
- // A tribute to the "awesome hack by Dean Edwards"
- // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
- // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
- // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
- if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
- width = style.width;
- minWidth = style.minWidth;
- maxWidth = style.maxWidth;
-
- style.minWidth = style.maxWidth = style.width = ret;
- ret = computed.width;
-
- style.width = width;
- style.minWidth = minWidth;
- style.maxWidth = maxWidth;
- }
- }
-
- return ret;
- };
-} else if ( document.documentElement.currentStyle ) {
- curCSS = function( elem, name ) {
- var left, rsLeft,
- ret = elem.currentStyle && elem.currentStyle[ name ],
- style = elem.style;
-
- // Avoid setting ret to empty string here
- // so we don't default to auto
- if ( ret == null && style && style[ name ] ) {
- ret = style[ name ];
- }
-
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- // but not position css attributes, as those are proportional to the parent element instead
- // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
- if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
-
- // Remember the original values
- left = style.left;
- rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
-
- // Put in the new values to get a computed value out
- if ( rsLeft ) {
- elem.runtimeStyle.left = elem.currentStyle.left;
- }
- style.left = name === "fontSize" ? "1em" : ret;
- ret = style.pixelLeft + "px";
-
- // Revert the changed values
- style.left = left;
- if ( rsLeft ) {
- elem.runtimeStyle.left = rsLeft;
- }
- }
-
- return ret === "" ? "auto" : ret;
- };
-}
-
-function setPositiveNumber( elem, value, subtract ) {
- var matches = rnumsplit.exec( value );
- return matches ?
- Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
- value;
-}
-
-function augmentWidthOrHeight( elem, name, extra, isBorderBox ) {
- var i = extra === ( isBorderBox ? "border" : "content" ) ?
- // If we already have the right measurement, avoid augmentation
- 4 :
- // Otherwise initialize for horizontal or vertical properties
- name === "width" ? 1 : 0,
-
- val = 0;
-
- for ( ; i < 4; i += 2 ) {
- // both box models exclude margin, so add it if we want it
- if ( extra === "margin" ) {
- // we use jQuery.css instead of curCSS here
- // because of the reliableMarginRight CSS hook!
- val += jQuery.css( elem, extra + cssExpand[ i ], true );
- }
-
- // From this point on we use curCSS for maximum performance (relevant in animations)
- if ( isBorderBox ) {
- // border-box includes padding, so remove it if we want content
- if ( extra === "content" ) {
- val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;
- }
-
- // at this point, extra isn't border nor margin, so remove border
- if ( extra !== "margin" ) {
- val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
- }
- } else {
- // at this point, extra isn't content, so add padding
- val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;
-
- // at this point, extra isn't content nor padding, so add border
- if ( extra !== "padding" ) {
- val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
- }
- }
- }
-
- return val;
-}
-
-function getWidthOrHeight( elem, name, extra ) {
-
- // Start with offset property, which is equivalent to the border-box value
- var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
- valueIsBorderBox = true,
- isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box";
-
- // some non-html elements return undefined for offsetWidth, so check for null/undefined
- // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
- // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
- if ( val <= 0 || val == null ) {
- // Fall back to computed then uncomputed css if necessary
- val = curCSS( elem, name );
- if ( val < 0 || val == null ) {
- val = elem.style[ name ];
- }
-
- // Computed unit is not pixels. Stop here and return.
- if ( rnumnonpx.test(val) ) {
- return val;
- }
-
- // we need the check for style in case a browser which returns unreliable values
- // for getComputedStyle silently falls back to the reliable elem.style
- valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
-
- // Normalize "", auto, and prepare for extra
- val = parseFloat( val ) || 0;
- }
-
- // use the active box-sizing model to add/subtract irrelevant styles
- return ( val +
- augmentWidthOrHeight(
- elem,
- name,
- extra || ( isBorderBox ? "border" : "content" ),
- valueIsBorderBox
- )
- ) + "px";
-}
-
-
-// Try to determine the default display value of an element
-function css_defaultDisplay( nodeName ) {
- if ( elemdisplay[ nodeName ] ) {
- return elemdisplay[ nodeName ];
- }
-
- var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ),
- display = elem.css("display");
- elem.remove();
-
- // If the simple way fails,
- // get element's real default display by attaching it to a temp iframe
- if ( display === "none" || display === "" ) {
- // Use the already-created iframe if possible
- iframe = document.body.appendChild(
- iframe || jQuery.extend( document.createElement("iframe"), {
- frameBorder: 0,
- width: 0,
- height: 0
- })
- );
-
- // Create a cacheable copy of the iframe document on first call.
- // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
- // document to it; WebKit & Firefox won't allow reusing the iframe document.
- if ( !iframeDoc || !iframe.createElement ) {
- iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
- iframeDoc.write("<!doctype html><html><body>");
- iframeDoc.close();
- }
-
- elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) );
-
- display = curCSS( elem, "display" );
- document.body.removeChild( iframe );
- }
-
- // Store the correct default display
- elemdisplay[ nodeName ] = display;
-
- return display;
-}
-
-jQuery.each([ "height", "width" ], function( i, name ) {
- jQuery.cssHooks[ name ] = {
- get: function( elem, computed, extra ) {
- if ( computed ) {
- // certain elements can have dimension info if we invisibly show them
- // however, it must have a current display style that would benefit from this
- if ( elem.offsetWidth === 0 && rdisplayswap.test( curCSS( elem, "display" ) ) ) {
- return jQuery.swap( elem, cssShow, function() {
- return getWidthOrHeight( elem, name, extra );
- });
- } else {
- return getWidthOrHeight( elem, name, extra );
- }
- }
- },
-
- set: function( elem, value, extra ) {
- return setPositiveNumber( elem, value, extra ?
- augmentWidthOrHeight(
- elem,
- name,
- extra,
- jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"
- ) : 0
- );
- }
- };
-});
-
-if ( !jQuery.support.opacity ) {
- jQuery.cssHooks.opacity = {
- get: function( elem, computed ) {
- // IE uses filters for opacity
- return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
- ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
- computed ? "1" : "";
- },
-
- set: function( elem, value ) {
- var style = elem.style,
- currentStyle = elem.currentStyle,
- opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
- filter = currentStyle && currentStyle.filter || style.filter || "";
-
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- style.zoom = 1;
-
- // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
- if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
- style.removeAttribute ) {
-
- // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
- // if "filter:" is present at all, clearType is disabled, we want to avoid this
- // style.removeAttribute is IE Only, but so apparently is this code path...
- style.removeAttribute( "filter" );
-
- // if there there is no filter style applied in a css rule, we are done
- if ( currentStyle && !currentStyle.filter ) {
- return;
- }
- }
-
- // otherwise, set new filter values
- style.filter = ralpha.test( filter ) ?
- filter.replace( ralpha, opacity ) :
- filter + " " + opacity;
- }
- };
-}
-
-// These hooks cannot be added until DOM ready because the support test
-// for it is not run until after DOM ready
-jQuery(function() {
- if ( !jQuery.support.reliableMarginRight ) {
- jQuery.cssHooks.marginRight = {
- get: function( elem, computed ) {
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- // Work around by temporarily setting element display to inline-block
- return jQuery.swap( elem, { "display": "inline-block" }, function() {
- if ( computed ) {
- return curCSS( elem, "marginRight" );
- }
- });
- }
- };
- }
-
- // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
- // getComputedStyle returns percent when specified for top/left/bottom/right
- // rather than make the css module depend on the offset module, we just check for it here
- if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
- jQuery.each( [ "top", "left" ], function( i, prop ) {
- jQuery.cssHooks[ prop ] = {
- get: function( elem, computed ) {
- if ( computed ) {
- var ret = curCSS( elem, prop );
- // if curCSS returns percentage, fallback to offset
- return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret;
- }
- }
- };
- });
- }
-
-});
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.hidden = function( elem ) {
- return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none");
- };
-
- jQuery.expr.filters.visible = function( elem ) {
- return !jQuery.expr.filters.hidden( elem );
- };
-}
-
-// These hooks are used by animate to expand properties
-jQuery.each({
- margin: "",
- padding: "",
- border: "Width"
-}, function( prefix, suffix ) {
- jQuery.cssHooks[ prefix + suffix ] = {
- expand: function( value ) {
- var i,
-
- // assumes a single number if not a string
- parts = typeof value === "string" ? value.split(" ") : [ value ],
- expanded = {};
-
- for ( i = 0; i < 4; i++ ) {
- expanded[ prefix + cssExpand[ i ] + suffix ] =
- parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
- }
-
- return expanded;
- }
- };
-
- if ( !rmargin.test( prefix ) ) {
- jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
- }
-});
-var r20 = /%20/g,
- rbracket = /\[\]$/,
- rCRLF = /\r?\n/g,
- rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
- rselectTextarea = /^(?:select|textarea)/i;
-
-jQuery.fn.extend({
- serialize: function() {
- return jQuery.param( this.serializeArray() );
- },
- serializeArray: function() {
- return this.map(function(){
- return this.elements ? jQuery.makeArray( this.elements ) : this;
- })
- .filter(function(){
- return this.name && !this.disabled &&
- ( this.checked || rselectTextarea.test( this.nodeName ) ||
- rinput.test( this.type ) );
- })
- .map(function( i, elem ){
- var val = jQuery( this ).val();
-
- return val == null ?
- null :
- jQuery.isArray( val ) ?
- jQuery.map( val, function( val, i ){
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }) :
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }).get();
- }
-});
-
-//Serialize an array of form elements or a set of
-//key/values into a query string
-jQuery.param = function( a, traditional ) {
- var prefix,
- s = [],
- add = function( key, value ) {
- // If value is a function, invoke it and return its value
- value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
- };
-
- // Set traditional to true for jQuery <= 1.3.2 behavior.
- if ( traditional === undefined ) {
- traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
- }
-
- // If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
- // Serialize the form elements
- jQuery.each( a, function() {
- add( this.name, this.value );
- });
-
- } else {
- // If traditional, encode the "old" way (the way 1.3.2 or older
- // did it), otherwise encode params recursively.
- for ( prefix in a ) {
- buildParams( prefix, a[ prefix ], traditional, add );
- }
- }
-
- // Return the resulting serialization
- return s.join( "&" ).replace( r20, "+" );
-};
-
-function buildParams( prefix, obj, traditional, add ) {
- var name;
-
- if ( jQuery.isArray( obj ) ) {
- // Serialize array item.
- jQuery.each( obj, function( i, v ) {
- if ( traditional || rbracket.test( prefix ) ) {
- // Treat each array item as a scalar.
- add( prefix, v );
-
- } else {
- // If array item is non-scalar (array or object), encode its
- // numeric index to resolve deserialization ambiguity issues.
- // Note that rack (as of 1.0.0) can't currently deserialize
- // nested arrays properly, and attempting to do so may cause
- // a server error. Possible fixes are to modify rack's
- // deserialization algorithm or to provide an option or flag
- // to force array serialization to be shallow.
- buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
- }
- });
-
- } else if ( !traditional && jQuery.type( obj ) === "object" ) {
- // Serialize object item.
- for ( name in obj ) {
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
- }
-
- } else {
- // Serialize scalar item.
- add( prefix, obj );
- }
-}
-var
- // Document location
- ajaxLocParts,
- ajaxLocation,
-
- rhash = /#.*$/,
- rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
- // #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
- rnoContent = /^(?:GET|HEAD)$/,
- rprotocol = /^\/\//,
- rquery = /\?/,
- rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
- rts = /([?&])_=[^&]*/,
- rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
-
- // Keep a copy of the old load method
- _load = jQuery.fn.load,
-
- /* Prefilters
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
- * 2) These are called:
- * - BEFORE asking for a transport
- * - AFTER param serialization (s.data is a string if s.processData is true)
- * 3) key is the dataType
- * 4) the catchall symbol "*" can be used
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
- */
- prefilters = {},
-
- /* Transports bindings
- * 1) key is the dataType
- * 2) the catchall symbol "*" can be used
- * 3) selection will start with transport dataType and THEN go to "*" if needed
- */
- transports = {},
-
- // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
- allTypes = ["*/"] + ["*"];
-
-// #8138, IE may throw an exception when accessing
-// a field from window.location if document.domain has been set
-try {
- ajaxLocation = location.href;
-} catch( e ) {
- // Use the href attribute of an A element
- // since IE will modify it given document.location
- ajaxLocation = document.createElement( "a" );
- ajaxLocation.href = "";
- ajaxLocation = ajaxLocation.href;
-}
-
-// Segment location into parts
-ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
-
-// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
-function addToPrefiltersOrTransports( structure ) {
-
- // dataTypeExpression is optional and defaults to "*"
- return function( dataTypeExpression, func ) {
-
- if ( typeof dataTypeExpression !== "string" ) {
- func = dataTypeExpression;
- dataTypeExpression = "*";
- }
-
- var dataType, list, placeBefore,
- dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ),
- i = 0,
- length = dataTypes.length;
-
- if ( jQuery.isFunction( func ) ) {
- // For each dataType in the dataTypeExpression
- for ( ; i < length; i++ ) {
- dataType = dataTypes[ i ];
- // We control if we're asked to add before
- // any existing element
- placeBefore = /^\+/.test( dataType );
- if ( placeBefore ) {
- dataType = dataType.substr( 1 ) || "*";
- }
- list = structure[ dataType ] = structure[ dataType ] || [];
- // then we add to the structure accordingly
- list[ placeBefore ? "unshift" : "push" ]( func );
- }
- }
- };
-}
-
-// Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
- dataType /* internal */, inspected /* internal */ ) {
-
- dataType = dataType || options.dataTypes[ 0 ];
- inspected = inspected || {};
-
- inspected[ dataType ] = true;
-
- var selection,
- list = structure[ dataType ],
- i = 0,
- length = list ? list.length : 0,
- executeOnly = ( structure === prefilters );
-
- for ( ; i < length && ( executeOnly || !selection ); i++ ) {
- selection = list[ i ]( options, originalOptions, jqXHR );
- // If we got redirected to another dataType
- // we try there if executing only and not done already
- if ( typeof selection === "string" ) {
- if ( !executeOnly || inspected[ selection ] ) {
- selection = undefined;
- } else {
- options.dataTypes.unshift( selection );
- selection = inspectPrefiltersOrTransports(
- structure, options, originalOptions, jqXHR, selection, inspected );
- }
- }
- }
- // If we're only executing or nothing was selected
- // we try the catchall dataType if not done already
- if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
- selection = inspectPrefiltersOrTransports(
- structure, options, originalOptions, jqXHR, "*", inspected );
- }
- // unnecessary when only executing (prefilters)
- // but it'll be ignored by the caller in that case
- return selection;
-}
-
-// A special extend for ajax options
-// that takes "flat" options (not to be deep extended)
-// Fixes #9887
-function ajaxExtend( target, src ) {
- var key, deep,
- flatOptions = jQuery.ajaxSettings.flatOptions || {};
- for ( key in src ) {
- if ( src[ key ] !== undefined ) {
- ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
- }
- }
- if ( deep ) {
- jQuery.extend( true, target, deep );
- }
-}
-
-jQuery.fn.load = function( url, params, callback ) {
- if ( typeof url !== "string" && _load ) {
- return _load.apply( this, arguments );
- }
-
- // Don't do a request if no elements are being requested
- if ( !this.length ) {
- return this;
- }
-
- var selector, type, response,
- self = this,
- off = url.indexOf(" ");
-
- if ( off >= 0 ) {
- selector = url.slice( off, url.length );
- url = url.slice( 0, off );
- }
-
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
-
- // We assume that it's the callback
- callback = params;
- params = undefined;
-
- // Otherwise, build a param string
- } else if ( params && typeof params === "object" ) {
- type = "POST";
- }
-
- // Request the remote document
- jQuery.ajax({
- url: url,
-
- // if "type" variable is undefined, then "GET" method will be used
- type: type,
- dataType: "html",
- data: params,
- complete: function( jqXHR, status ) {
- if ( callback ) {
- self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
- }
- }
- }).done(function( responseText ) {
-
- // Save response for use in complete callback
- response = arguments;
-
- // See if a selector was specified
- self.html( selector ?
-
- // Create a dummy div to hold the results
- jQuery("<div>")
-
- // inject the contents of the document in, removing the scripts
- // to avoid any 'Permission Denied' errors in IE
- .append( responseText.replace( rscript, "" ) )
-
- // Locate the specified elements
- .find( selector ) :
-
- // If not, just inject the full result
- responseText );
-
- });
-
- return this;
-};
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
- jQuery.fn[ o ] = function( f ){
- return this.on( o, f );
- };
-});
-
-jQuery.each( [ "get", "post" ], function( i, method ) {
- jQuery[ method ] = function( url, data, callback, type ) {
- // shift arguments if data argument was omitted
- if ( jQuery.isFunction( data ) ) {
- type = type || callback;
- callback = data;
- data = undefined;
- }
-
- return jQuery.ajax({
- type: method,
- url: url,
- data: data,
- success: callback,
- dataType: type
- });
- };
-});
-
-jQuery.extend({
-
- getScript: function( url, callback ) {
- return jQuery.get( url, undefined, callback, "script" );
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get( url, data, callback, "json" );
- },
-
- // Creates a full fledged settings object into target
- // with both ajaxSettings and settings fields.
- // If target is omitted, writes into ajaxSettings.
- ajaxSetup: function( target, settings ) {
- if ( settings ) {
- // Building a settings object
- ajaxExtend( target, jQuery.ajaxSettings );
- } else {
- // Extending ajaxSettings
- settings = target;
- target = jQuery.ajaxSettings;
- }
- ajaxExtend( target, settings );
- return target;
- },
-
- ajaxSettings: {
- url: ajaxLocation,
- isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
- global: true,
- type: "GET",
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- processData: true,
- async: true,
- /*
- timeout: 0,
- data: null,
- dataType: null,
- username: null,
- password: null,
- cache: null,
- throws: false,
- traditional: false,
- headers: {},
- */
-
- accepts: {
- xml: "application/xml, text/xml",
- html: "text/html",
- text: "text/plain",
- json: "application/json, text/javascript",
- "*": allTypes
- },
-
- contents: {
- xml: /xml/,
- html: /html/,
- json: /json/
- },
-
- responseFields: {
- xml: "responseXML",
- text: "responseText"
- },
-
- // List of data converters
- // 1) key format is "source_type destination_type" (a single space in-between)
- // 2) the catchall symbol "*" can be used for source_type
- converters: {
-
- // Convert anything to text
- "* text": window.String,
-
- // Text to html (true = no transformation)
- "text html": true,
-
- // Evaluate text as a json expression
- "text json": jQuery.parseJSON,
-
- // Parse text as xml
- "text xml": jQuery.parseXML
- },
-
- // For options that shouldn't be deep extended:
- // you can add your own custom options here if
- // and when you create one that shouldn't be
- // deep extended (see ajaxExtend)
- flatOptions: {
- context: true,
- url: true
- }
- },
-
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
- ajaxTransport: addToPrefiltersOrTransports( transports ),
-
- // Main method
- ajax: function( url, options ) {
-
- // If url is an object, simulate pre-1.5 signature
- if ( typeof url === "object" ) {
- options = url;
- url = undefined;
- }
-
- // Force options to be an object
- options = options || {};
-
- var // ifModified key
- ifModifiedKey,
- // Response headers
- responseHeadersString,
- responseHeaders,
- // transport
- transport,
- // timeout handle
- timeoutTimer,
- // Cross-domain detection vars
- parts,
- // To know if global events are to be dispatched
- fireGlobals,
- // Loop variable
- i,
- // Create the final options object
- s = jQuery.ajaxSetup( {}, options ),
- // Callbacks context
- callbackContext = s.context || s,
- // Context for global events
- // It's the callbackContext if one was provided in the options
- // and if it's a DOM node or a jQuery collection
- globalEventContext = callbackContext !== s &&
- ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
- jQuery( callbackContext ) : jQuery.event,
- // Deferreds
- deferred = jQuery.Deferred(),
- completeDeferred = jQuery.Callbacks( "once memory" ),
- // Status-dependent callbacks
- statusCode = s.statusCode || {},
- // Headers (they are sent all at once)
- requestHeaders = {},
- requestHeadersNames = {},
- // The jqXHR state
- state = 0,
- // Default abort message
- strAbort = "canceled",
- // Fake xhr
- jqXHR = {
-
- readyState: 0,
-
- // Caches the header
- setRequestHeader: function( name, value ) {
- if ( !state ) {
- var lname = name.toLowerCase();
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
- requestHeaders[ name ] = value;
- }
- return this;
- },
-
- // Raw string
- getAllResponseHeaders: function() {
- return state === 2 ? responseHeadersString : null;
- },
-
- // Builds headers hashtable if needed
- getResponseHeader: function( key ) {
- var match;
- if ( state === 2 ) {
- if ( !responseHeaders ) {
- responseHeaders = {};
- while( ( match = rheaders.exec( responseHeadersString ) ) ) {
- responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
- }
- }
- match = responseHeaders[ key.toLowerCase() ];
- }
- return match === undefined ? null : match;
- },
-
- // Overrides response content-type header
- overrideMimeType: function( type ) {
- if ( !state ) {
- s.mimeType = type;
- }
- return this;
- },
-
- // Cancel the request
- abort: function( statusText ) {
- statusText = statusText || strAbort;
- if ( transport ) {
- transport.abort( statusText );
- }
- done( 0, statusText );
- return this;
- }
- };
-
- // Callback for when everything is done
- // It is defined here because jslint complains if it is declared
- // at the end of the function (which would be more logical and readable)
- function done( status, nativeStatusText, responses, headers ) {
- var isSuccess, success, error, response, modified,
- statusText = nativeStatusText;
-
- // Called once
- if ( state === 2 ) {
- return;
- }
-
- // State is "done" now
- state = 2;
-
- // Clear timeout if it exists
- if ( timeoutTimer ) {
- clearTimeout( timeoutTimer );
- }
-
- // Dereference transport for early garbage collection
- // (no matter how long the jqXHR object will be used)
- transport = undefined;
-
- // Cache response headers
- responseHeadersString = headers || "";
-
- // Set readyState
- jqXHR.readyState = status > 0 ? 4 : 0;
-
- // Get response data
- if ( responses ) {
- response = ajaxHandleResponses( s, jqXHR, responses );
- }
-
- // If successful, handle type chaining
- if ( status >= 200 && status < 300 || status === 304 ) {
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
-
- modified = jqXHR.getResponseHeader("Last-Modified");
- if ( modified ) {
- jQuery.lastModified[ ifModifiedKey ] = modified;
- }
- modified = jqXHR.getResponseHeader("Etag");
- if ( modified ) {
- jQuery.etag[ ifModifiedKey ] = modified;
- }
- }
-
- // If not modified
- if ( status === 304 ) {
-
- statusText = "notmodified";
- isSuccess = true;
-
- // If we have data
- } else {
-
- isSuccess = ajaxConvert( s, response );
- statusText = isSuccess.state;
- success = isSuccess.data;
- error = isSuccess.error;
- isSuccess = !error;
- }
- } else {
- // We extract error from statusText
- // then normalize statusText and status for non-aborts
- error = statusText;
- if ( !statusText || status ) {
- statusText = "error";
- if ( status < 0 ) {
- status = 0;
- }
- }
- }
-
- // Set data for the fake xhr object
- jqXHR.status = status;
- jqXHR.statusText = ( nativeStatusText || statusText ) + "";
-
- // Success/Error
- if ( isSuccess ) {
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
- } else {
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
- }
-
- // Status-dependent callbacks
- jqXHR.statusCode( statusCode );
- statusCode = undefined;
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
- [ jqXHR, s, isSuccess ? success : error ] );
- }
-
- // Complete
- completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
- // Handle the global AJAX counter
- if ( !( --jQuery.active ) ) {
- jQuery.event.trigger( "ajaxStop" );
- }
- }
- }
-
- // Attach deferreds
- deferred.promise( jqXHR );
- jqXHR.success = jqXHR.done;
- jqXHR.error = jqXHR.fail;
- jqXHR.complete = completeDeferred.add;
-
- // Status-dependent callbacks
- jqXHR.statusCode = function( map ) {
- if ( map ) {
- var tmp;
- if ( state < 2 ) {
- for ( tmp in map ) {
- statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
- }
- } else {
- tmp = map[ jqXHR.status ];
- jqXHR.always( tmp );
- }
- }
- return this;
- };
-
- // Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
- // We also use the url parameter if available
- s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
-
- // Extract dataTypes list
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace );
-
- // A cross-domain request is in order when we have a protocol:host:port mismatch
- if ( s.crossDomain == null ) {
- parts = rurl.exec( s.url.toLowerCase() );
- s.crossDomain = !!( parts &&
- ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
- ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
- ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
- );
- }
-
- // Convert data if not already a string
- if ( s.data && s.processData && typeof s.data !== "string" ) {
- s.data = jQuery.param( s.data, s.traditional );
- }
-
- // Apply prefilters
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
-
- // If request was aborted inside a prefilter, stop there
- if ( state === 2 ) {
- return jqXHR;
- }
-
- // We can fire global events as of now if asked to
- fireGlobals = s.global;
-
- // Uppercase the type
- s.type = s.type.toUpperCase();
-
- // Determine if request has content
- s.hasContent = !rnoContent.test( s.type );
-
- // Watch for a new set of requests
- if ( fireGlobals && jQuery.active++ === 0 ) {
- jQuery.event.trigger( "ajaxStart" );
- }
-
- // More options handling for requests with no content
- if ( !s.hasContent ) {
-
- // If data is available, append data to url
- if ( s.data ) {
- s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
- // #9682: remove data so that it's not used in an eventual retry
- delete s.data;
- }
-
- // Get ifModifiedKey before adding the anti-cache parameter
- ifModifiedKey = s.url;
-
- // Add anti-cache in url if needed
- if ( s.cache === false ) {
-
- var ts = jQuery.now(),
- // try replacing _= if it is there
- ret = s.url.replace( rts, "$1_=" + ts );
-
- // if nothing was replaced, add timestamp to the end
- s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
- }
- }
-
- // Set the correct header, if data is being sent
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
- }
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- ifModifiedKey = ifModifiedKey || s.url;
- if ( jQuery.lastModified[ ifModifiedKey ] ) {
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
- }
- if ( jQuery.etag[ ifModifiedKey ] ) {
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
- }
- }
-
- // Set the Accepts header for the server, depending on the dataType
- jqXHR.setRequestHeader(
- "Accept",
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
- s.accepts[ "*" ]
- );
-
- // Check for headers option
- for ( i in s.headers ) {
- jqXHR.setRequestHeader( i, s.headers[ i ] );
- }
-
- // Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
- // Abort if not done already and return
- return jqXHR.abort();
-
- }
-
- // aborting is no longer a cancellation
- strAbort = "abort";
-
- // Install callbacks on deferreds
- for ( i in { success: 1, error: 1, complete: 1 } ) {
- jqXHR[ i ]( s[ i ] );
- }
-
- // Get transport
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
-
- // If no transport, we auto-abort
- if ( !transport ) {
- done( -1, "No Transport" );
- } else {
- jqXHR.readyState = 1;
- // Send global event
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
- }
- // Timeout
- if ( s.async && s.timeout > 0 ) {
- timeoutTimer = setTimeout( function(){
- jqXHR.abort( "timeout" );
- }, s.timeout );
- }
-
- try {
- state = 1;
- transport.send( requestHeaders, done );
- } catch (e) {
- // Propagate exception as error if not done
- if ( state < 2 ) {
- done( -1, e );
- // Simply rethrow otherwise
- } else {
- throw e;
- }
- }
- }
-
- return jqXHR;
- },
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Last-Modified header cache for next request
- lastModified: {},
- etag: {}
-
-});
-
-/* Handles responses to an ajax request:
- * - sets all responseXXX fields accordingly
- * - finds the right dataType (mediates between content-type and expected dataType)
- * - returns the corresponding response
- */
-function ajaxHandleResponses( s, jqXHR, responses ) {
-
- var ct, type, finalDataType, firstDataType,
- contents = s.contents,
- dataTypes = s.dataTypes,
- responseFields = s.responseFields;
-
- // Fill responseXXX fields
- for ( type in responseFields ) {
- if ( type in responses ) {
- jqXHR[ responseFields[type] ] = responses[ type ];
- }
- }
-
- // Remove auto dataType and get content-type in the process
- while( dataTypes[ 0 ] === "*" ) {
- dataTypes.shift();
- if ( ct === undefined ) {
- ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
- }
- }
-
- // Check if we're dealing with a known content-type
- if ( ct ) {
- for ( type in contents ) {
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
- dataTypes.unshift( type );
- break;
- }
- }
- }
-
- // Check to see if we have a response for the expected dataType
- if ( dataTypes[ 0 ] in responses ) {
- finalDataType = dataTypes[ 0 ];
- } else {
- // Try convertible dataTypes
- for ( type in responses ) {
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
- finalDataType = type;
- break;
- }
- if ( !firstDataType ) {
- firstDataType = type;
- }
- }
- // Or just use first one
- finalDataType = finalDataType || firstDataType;
- }
-
- // If we found a dataType
- // We add the dataType to the list if needed
- // and return the corresponding response
- if ( finalDataType ) {
- if ( finalDataType !== dataTypes[ 0 ] ) {
- dataTypes.unshift( finalDataType );
- }
- return responses[ finalDataType ];
- }
-}
-
-// Chain conversions given the request and the original response
-function ajaxConvert( s, response ) {
-
- var conv, conv2, current, tmp,
- // Work with a copy of dataTypes in case we need to modify it for conversion
- dataTypes = s.dataTypes.slice(),
- prev = dataTypes[ 0 ],
- converters = {},
- i = 0;
-
- // Apply the dataFilter if provided
- if ( s.dataFilter ) {
- response = s.dataFilter( response, s.dataType );
- }
-
- // Create converters map with lowercased keys
- if ( dataTypes[ 1 ] ) {
- for ( conv in s.converters ) {
- converters[ conv.toLowerCase() ] = s.converters[ conv ];
- }
- }
-
- // Convert to each sequential dataType, tolerating list modification
- for ( ; (current = dataTypes[++i]); ) {
-
- // There's only work to do if current dataType is non-auto
- if ( current !== "*" ) {
-
- // Convert response if prev dataType is non-auto and differs from current
- if ( prev !== "*" && prev !== current ) {
-
- // Seek a direct converter
- conv = converters[ prev + " " + current ] || converters[ "* " + current ];
-
- // If none found, seek a pair
- if ( !conv ) {
- for ( conv2 in converters ) {
-
- // If conv2 outputs current
- tmp = conv2.split(" ");
- if ( tmp[ 1 ] === current ) {
-
- // If prev can be converted to accepted input
- conv = converters[ prev + " " + tmp[ 0 ] ] ||
- converters[ "* " + tmp[ 0 ] ];
- if ( conv ) {
- // Condense equivalence converters
- if ( conv === true ) {
- conv = converters[ conv2 ];
-
- // Otherwise, insert the intermediate dataType
- } else if ( converters[ conv2 ] !== true ) {
- current = tmp[ 0 ];
- dataTypes.splice( i--, 0, current );
- }
-
- break;
- }
- }
- }
- }
-
- // Apply converter (if not an equivalence)
- if ( conv !== true ) {
-
- // Unless errors are allowed to bubble, catch and return them
- if ( conv && s["throws"] ) {
- response = conv( response );
- } else {
- try {
- response = conv( response );
- } catch ( e ) {
- return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
- }
- }
- }
- }
-
- // Update prev for next iteration
- prev = current;
- }
- }
-
- return { state: "success", data: response };
-}
-var oldCallbacks = [],
- rquestion = /\?/,
- rjsonp = /(=)\?(?=&|$)|\?\?/,
- nonce = jQuery.now();
-
-// Default jsonp settings
-jQuery.ajaxSetup({
- jsonp: "callback",
- jsonpCallback: function() {
- var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
- this[ callback ] = true;
- return callback;
- }
-});
-
-// Detect, normalize options and install callbacks for jsonp requests
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
-
- var callbackName, overwritten, responseContainer,
- data = s.data,
- url = s.url,
- hasCallback = s.jsonp !== false,
- replaceInUrl = hasCallback && rjsonp.test( url ),
- replaceInData = hasCallback && !replaceInUrl && typeof data === "string" &&
- !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") &&
- rjsonp.test( data );
-
- // Handle iff the expected data type is "jsonp" or we have a parameter to set
- if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) {
-
- // Get callback name, remembering preexisting value associated with it
- callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
- s.jsonpCallback() :
- s.jsonpCallback;
- overwritten = window[ callbackName ];
-
- // Insert callback into url or form data
- if ( replaceInUrl ) {
- s.url = url.replace( rjsonp, "$1" + callbackName );
- } else if ( replaceInData ) {
- s.data = data.replace( rjsonp, "$1" + callbackName );
- } else if ( hasCallback ) {
- s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
- }
-
- // Use data converter to retrieve json after script execution
- s.converters["script json"] = function() {
- if ( !responseContainer ) {
- jQuery.error( callbackName + " was not called" );
- }
- return responseContainer[ 0 ];
- };
-
- // force json dataType
- s.dataTypes[ 0 ] = "json";
-
- // Install callback
- window[ callbackName ] = function() {
- responseContainer = arguments;
- };
-
- // Clean-up function (fires after converters)
- jqXHR.always(function() {
- // Restore preexisting value
- window[ callbackName ] = overwritten;
-
- // Save back as free
- if ( s[ callbackName ] ) {
- // make sure that re-using the options doesn't screw things around
- s.jsonpCallback = originalSettings.jsonpCallback;
-
- // save the callback name for future use
- oldCallbacks.push( callbackName );
- }
-
- // Call if it was a function and we have a response
- if ( responseContainer && jQuery.isFunction( overwritten ) ) {
- overwritten( responseContainer[ 0 ] );
- }
-
- responseContainer = overwritten = undefined;
- });
-
- // Delegate to script
- return "script";
- }
-});
-// Install script dataType
-jQuery.ajaxSetup({
- accepts: {
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /javascript|ecmascript/
- },
- converters: {
- "text script": function( text ) {
- jQuery.globalEval( text );
- return text;
- }
- }
-});
-
-// Handle cache's special case and global
-jQuery.ajaxPrefilter( "script", function( s ) {
- if ( s.cache === undefined ) {
- s.cache = false;
- }
- if ( s.crossDomain ) {
- s.type = "GET";
- s.global = false;
- }
-});
-
-// Bind script tag hack transport
-jQuery.ajaxTransport( "script", function(s) {
-
- // This transport only deals with cross domain requests
- if ( s.crossDomain ) {
-
- var script,
- head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
-
- return {
-
- send: function( _, callback ) {
-
- script = document.createElement( "script" );
-
- script.async = "async";
-
- if ( s.scriptCharset ) {
- script.charset = s.scriptCharset;
- }
-
- script.src = s.url;
-
- // Attach handlers for all browsers
- script.onload = script.onreadystatechange = function( _, isAbort ) {
-
- if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
-
- // Handle memory leak in IE
- script.onload = script.onreadystatechange = null;
-
- // Remove the script
- if ( head && script.parentNode ) {
- head.removeChild( script );
- }
-
- // Dereference the script
- script = undefined;
-
- // Callback if not abort
- if ( !isAbort ) {
- callback( 200, "success" );
- }
- }
- };
- // Use insertBefore instead of appendChild to circumvent an IE6 bug.
- // This arises when a base node is used (#2709 and #4378).
- head.insertBefore( script, head.firstChild );
- },
-
- abort: function() {
- if ( script ) {
- script.onload( 0, 1 );
- }
- }
- };
- }
-});
-var xhrCallbacks,
- // #5280: Internet Explorer will keep connections alive if we don't abort on unload
- xhrOnUnloadAbort = window.ActiveXObject ? function() {
- // Abort all pending requests
- for ( var key in xhrCallbacks ) {
- xhrCallbacks[ key ]( 0, 1 );
- }
- } : false,
- xhrId = 0;
-
-// Functions to create xhrs
-function createStandardXHR() {
- try {
- return new window.XMLHttpRequest();
- } catch( e ) {}
-}
-
-function createActiveXHR() {
- try {
- return new window.ActiveXObject( "Microsoft.XMLHTTP" );
- } catch( e ) {}
-}
-
-// Create the request object
-// (This is still attached to ajaxSettings for backward compatibility)
-jQuery.ajaxSettings.xhr = window.ActiveXObject ?
- /* Microsoft failed to properly
- * implement the XMLHttpRequest in IE7 (can't request local files),
- * so we use the ActiveXObject when it is available
- * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
- * we need a fallback.
- */
- function() {
- return !this.isLocal && createStandardXHR() || createActiveXHR();
- } :
- // For all other browsers, use the standard XMLHttpRequest object
- createStandardXHR;
-
-// Determine support properties
-(function( xhr ) {
- jQuery.extend( jQuery.support, {
- ajax: !!xhr,
- cors: !!xhr && ( "withCredentials" in xhr )
- });
-})( jQuery.ajaxSettings.xhr() );
-
-// Create transport if the browser can provide an xhr
-if ( jQuery.support.ajax ) {
-
- jQuery.ajaxTransport(function( s ) {
- // Cross domain only allowed if supported through XMLHttpRequest
- if ( !s.crossDomain || jQuery.support.cors ) {
-
- var callback;
-
- return {
- send: function( headers, complete ) {
-
- // Get a new xhr
- var handle, i,
- xhr = s.xhr();
-
- // Open the socket
- // Passing null username, generates a login popup on Opera (#2865)
- if ( s.username ) {
- xhr.open( s.type, s.url, s.async, s.username, s.password );
- } else {
- xhr.open( s.type, s.url, s.async );
- }
-
- // Apply custom fields if provided
- if ( s.xhrFields ) {
- for ( i in s.xhrFields ) {
- xhr[ i ] = s.xhrFields[ i ];
- }
- }
-
- // Override mime type if needed
- if ( s.mimeType && xhr.overrideMimeType ) {
- xhr.overrideMimeType( s.mimeType );
- }
-
- // X-Requested-With header
- // For cross-domain requests, seeing as conditions for a preflight are
- // akin to a jigsaw puzzle, we simply never set it to be sure.
- // (it can always be set on a per-request basis or even using ajaxSetup)
- // For same-domain requests, won't change header if already provided.
- if ( !s.crossDomain && !headers["X-Requested-With"] ) {
- headers[ "X-Requested-With" ] = "XMLHttpRequest";
- }
-
- // Need an extra try/catch for cross domain requests in Firefox 3
- try {
- for ( i in headers ) {
- xhr.setRequestHeader( i, headers[ i ] );
- }
- } catch( _ ) {}
-
- // Do send the request
- // This may raise an exception which is actually
- // handled in jQuery.ajax (so no try/catch here)
- xhr.send( ( s.hasContent && s.data ) || null );
-
- // Listener
- callback = function( _, isAbort ) {
-
- var status,
- statusText,
- responseHeaders,
- responses,
- xml;
-
- // Firefox throws exceptions when accessing properties
- // of an xhr when a network error occurred
- // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
- try {
-
- // Was never called and is aborted or complete
- if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
-
- // Only called once
- callback = undefined;
-
- // Do not keep as active anymore
- if ( handle ) {
- xhr.onreadystatechange = jQuery.noop;
- if ( xhrOnUnloadAbort ) {
- delete xhrCallbacks[ handle ];
- }
- }
-
- // If it's an abort
- if ( isAbort ) {
- // Abort it manually if needed
- if ( xhr.readyState !== 4 ) {
- xhr.abort();
- }
- } else {
- status = xhr.status;
- responseHeaders = xhr.getAllResponseHeaders();
- responses = {};
- xml = xhr.responseXML;
-
- // Construct response list
- if ( xml && xml.documentElement /* #4958 */ ) {
- responses.xml = xml;
- }
-
- // When requesting binary data, IE6-9 will throw an exception
- // on any attempt to access responseText (#11426)
- try {
- responses.text = xhr.responseText;
- } catch( e ) {
- }
-
- // Firefox throws an exception when accessing
- // statusText for faulty cross-domain requests
- try {
- statusText = xhr.statusText;
- } catch( e ) {
- // We normalize with Webkit giving an empty statusText
- statusText = "";
- }
-
- // Filter status for non standard behaviors
-
- // If the request is local and we have data: assume a success
- // (success with no data won't get notified, that's the best we
- // can do given current implementations)
- if ( !status && s.isLocal && !s.crossDomain ) {
- status = responses.text ? 200 : 404;
- // IE - #1450: sometimes returns 1223 when it should be 204
- } else if ( status === 1223 ) {
- status = 204;
- }
- }
- }
- } catch( firefoxAccessException ) {
- if ( !isAbort ) {
- complete( -1, firefoxAccessException );
- }
- }
-
- // Call complete if needed
- if ( responses ) {
- complete( status, statusText, responses, responseHeaders );
- }
- };
-
- if ( !s.async ) {
- // if we're in sync mode we fire the callback
- callback();
- } else if ( xhr.readyState === 4 ) {
- // (IE6 & IE7) if it's in cache and has been
- // retrieved directly we need to fire the callback
- setTimeout( callback, 0 );
- } else {
- handle = ++xhrId;
- if ( xhrOnUnloadAbort ) {
- // Create the active xhrs callbacks list if needed
- // and attach the unload handler
- if ( !xhrCallbacks ) {
- xhrCallbacks = {};
- jQuery( window ).unload( xhrOnUnloadAbort );
- }
- // Add to list of active xhrs callbacks
- xhrCallbacks[ handle ] = callback;
- }
- xhr.onreadystatechange = callback;
- }
- },
-
- abort: function() {
- if ( callback ) {
- callback(0,1);
- }
- }
- };
- }
- });
-}
-var fxNow, timerId,
- rfxtypes = /^(?:toggle|show|hide)$/,
- rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
- rrun = /queueHooks$/,
- animationPrefilters = [ defaultPrefilter ],
- tweeners = {
- "*": [function( prop, value ) {
- var end, unit,
- tween = this.createTween( prop, value ),
- parts = rfxnum.exec( value ),
- target = tween.cur(),
- start = +target || 0,
- scale = 1,
- maxIterations = 20;
-
- if ( parts ) {
- end = +parts[2];
- unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" );
-
- // We need to compute starting value
- if ( unit !== "px" && start ) {
- // Iteratively approximate from a nonzero starting point
- // Prefer the current property, because this process will be trivial if it uses the same units
- // Fallback to end or a simple constant
- start = jQuery.css( tween.elem, prop, true ) || end || 1;
-
- do {
- // If previous iteration zeroed out, double until we get *something*
- // Use a string for doubling factor so we don't accidentally see scale as unchanged below
- scale = scale || ".5";
-
- // Adjust and apply
- start = start / scale;
- jQuery.style( tween.elem, prop, start + unit );
-
- // Update scale, tolerating zero or NaN from tween.cur()
- // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
- } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
- }
-
- tween.unit = unit;
- tween.start = start;
- // If a +=/-= token was provided, we're doing a relative animation
- tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end;
- }
- return tween;
- }]
- };
-
-// Animations created synchronously will run synchronously
-function createFxNow() {
- setTimeout(function() {
- fxNow = undefined;
- }, 0 );
- return ( fxNow = jQuery.now() );
-}
-
-function createTweens( animation, props ) {
- jQuery.each( props, function( prop, value ) {
- var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
- index = 0,
- length = collection.length;
- for ( ; index < length; index++ ) {
- if ( collection[ index ].call( animation, prop, value ) ) {
-
- // we're done with this property
- return;
- }
- }
- });
-}
-
-function Animation( elem, properties, options ) {
- var result,
- index = 0,
- tweenerIndex = 0,
- length = animationPrefilters.length,
- deferred = jQuery.Deferred().always( function() {
- // don't match elem in the :animated selector
- delete tick.elem;
- }),
- tick = function() {
- var currentTime = fxNow || createFxNow(),
- remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
- // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
- temp = remaining / animation.duration || 0,
- percent = 1 - temp,
- index = 0,
- length = animation.tweens.length;
-
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( percent );
- }
-
- deferred.notifyWith( elem, [ animation, percent, remaining ]);
-
- if ( percent < 1 && length ) {
- return remaining;
- } else {
- deferred.resolveWith( elem, [ animation ] );
- return false;
- }
- },
- animation = deferred.promise({
- elem: elem,
- props: jQuery.extend( {}, properties ),
- opts: jQuery.extend( true, { specialEasing: {} }, options ),
- originalProperties: properties,
- originalOptions: options,
- startTime: fxNow || createFxNow(),
- duration: options.duration,
- tweens: [],
- createTween: function( prop, end, easing ) {
- var tween = jQuery.Tween( elem, animation.opts, prop, end,
- animation.opts.specialEasing[ prop ] || animation.opts.easing );
- animation.tweens.push( tween );
- return tween;
- },
- stop: function( gotoEnd ) {
- var index = 0,
- // if we are going to the end, we want to run all the tweens
- // otherwise we skip this part
- length = gotoEnd ? animation.tweens.length : 0;
-
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( 1 );
- }
-
- // resolve when we played the last frame
- // otherwise, reject
- if ( gotoEnd ) {
- deferred.resolveWith( elem, [ animation, gotoEnd ] );
- } else {
- deferred.rejectWith( elem, [ animation, gotoEnd ] );
- }
- return this;
- }
- }),
- props = animation.props;
-
- propFilter( props, animation.opts.specialEasing );
-
- for ( ; index < length ; index++ ) {
- result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
- if ( result ) {
- return result;
- }
- }
-
- createTweens( animation, props );
-
- if ( jQuery.isFunction( animation.opts.start ) ) {
- animation.opts.start.call( elem, animation );
- }
-
- jQuery.fx.timer(
- jQuery.extend( tick, {
- anim: animation,
- queue: animation.opts.queue,
- elem: elem
- })
- );
-
- // attach callbacks from options
- return animation.progress( animation.opts.progress )
- .done( animation.opts.done, animation.opts.complete )
- .fail( animation.opts.fail )
- .always( animation.opts.always );
-}
-
-function propFilter( props, specialEasing ) {
- var index, name, easing, value, hooks;
-
- // camelCase, specialEasing and expand cssHook pass
- for ( index in props ) {
- name = jQuery.camelCase( index );
- easing = specialEasing[ name ];
- value = props[ index ];
- if ( jQuery.isArray( value ) ) {
- easing = value[ 1 ];
- value = props[ index ] = value[ 0 ];
- }
-
- if ( index !== name ) {
- props[ name ] = value;
- delete props[ index ];
- }
-
- hooks = jQuery.cssHooks[ name ];
- if ( hooks && "expand" in hooks ) {
- value = hooks.expand( value );
- delete props[ name ];
-
- // not quite $.extend, this wont overwrite keys already present.
- // also - reusing 'index' from above because we have the correct "name"
- for ( index in value ) {
- if ( !( index in props ) ) {
- props[ index ] = value[ index ];
- specialEasing[ index ] = easing;
- }
- }
- } else {
- specialEasing[ name ] = easing;
- }
- }
-}
-
-jQuery.Animation = jQuery.extend( Animation, {
-
- tweener: function( props, callback ) {
- if ( jQuery.isFunction( props ) ) {
- callback = props;
- props = [ "*" ];
- } else {
- props = props.split(" ");
- }
-
- var prop,
- index = 0,
- length = props.length;
-
- for ( ; index < length ; index++ ) {
- prop = props[ index ];
- tweeners[ prop ] = tweeners[ prop ] || [];
- tweeners[ prop ].unshift( callback );
- }
- },
-
- prefilter: function( callback, prepend ) {
- if ( prepend ) {
- animationPrefilters.unshift( callback );
- } else {
- animationPrefilters.push( callback );
- }
- }
-});
-
-function defaultPrefilter( elem, props, opts ) {
- var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire,
- anim = this,
- style = elem.style,
- orig = {},
- handled = [],
- hidden = elem.nodeType && isHidden( elem );
-
- // handle queue: false promises
- if ( !opts.queue ) {
- hooks = jQuery._queueHooks( elem, "fx" );
- if ( hooks.unqueued == null ) {
- hooks.unqueued = 0;
- oldfire = hooks.empty.fire;
- hooks.empty.fire = function() {
- if ( !hooks.unqueued ) {
- oldfire();
- }
- };
- }
- hooks.unqueued++;
-
- anim.always(function() {
- // doing this makes sure that the complete handler will be called
- // before this completes
- anim.always(function() {
- hooks.unqueued--;
- if ( !jQuery.queue( elem, "fx" ).length ) {
- hooks.empty.fire();
- }
- });
- });
- }
-
- // height/width overflow pass
- if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
- // Make sure that nothing sneaks out
- // Record all 3 overflow attributes because IE does not
- // change the overflow attribute when overflowX and
- // overflowY are set to the same value
- opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
-
- // Set display property to inline-block for height/width
- // animations on inline elements that are having width/height animated
- if ( jQuery.css( elem, "display" ) === "inline" &&
- jQuery.css( elem, "float" ) === "none" ) {
-
- // inline-level elements accept inline-block;
- // block-level elements need to be inline with layout
- if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
- style.display = "inline-block";
-
- } else {
- style.zoom = 1;
- }
- }
- }
-
- if ( opts.overflow ) {
- style.overflow = "hidden";
- if ( !jQuery.support.shrinkWrapBlocks ) {
- anim.done(function() {
- style.overflow = opts.overflow[ 0 ];
- style.overflowX = opts.overflow[ 1 ];
- style.overflowY = opts.overflow[ 2 ];
- });
- }
- }
-
-
- // show/hide pass
- for ( index in props ) {
- value = props[ index ];
- if ( rfxtypes.exec( value ) ) {
- delete props[ index ];
- toggle = toggle || value === "toggle";
- if ( value === ( hidden ? "hide" : "show" ) ) {
- continue;
- }
- handled.push( index );
- }
- }
-
- length = handled.length;
- if ( length ) {
- dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} );
- if ( "hidden" in dataShow ) {
- hidden = dataShow.hidden;
- }
-
- // store state if its toggle - enables .stop().toggle() to "reverse"
- if ( toggle ) {
- dataShow.hidden = !hidden;
- }
- if ( hidden ) {
- jQuery( elem ).show();
- } else {
- anim.done(function() {
- jQuery( elem ).hide();
- });
- }
- anim.done(function() {
- var prop;
- jQuery.removeData( elem, "fxshow", true );
- for ( prop in orig ) {
- jQuery.style( elem, prop, orig[ prop ] );
- }
- });
- for ( index = 0 ; index < length ; index++ ) {
- prop = handled[ index ];
- tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 );
- orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop );
-
- if ( !( prop in dataShow ) ) {
- dataShow[ prop ] = tween.start;
- if ( hidden ) {
- tween.end = tween.start;
- tween.start = prop === "width" || prop === "height" ? 1 : 0;
- }
- }
- }
- }
-}
-
-function Tween( elem, options, prop, end, easing ) {
- return new Tween.prototype.init( elem, options, prop, end, easing );
-}
-jQuery.Tween = Tween;
-
-Tween.prototype = {
- constructor: Tween,
- init: function( elem, options, prop, end, easing, unit ) {
- this.elem = elem;
- this.prop = prop;
- this.easing = easing || "swing";
- this.options = options;
- this.start = this.now = this.cur();
- this.end = end;
- this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
- },
- cur: function() {
- var hooks = Tween.propHooks[ this.prop ];
-
- return hooks && hooks.get ?
- hooks.get( this ) :
- Tween.propHooks._default.get( this );
- },
- run: function( percent ) {
- var eased,
- hooks = Tween.propHooks[ this.prop ];
-
- if ( this.options.duration ) {
- this.pos = eased = jQuery.easing[ this.easing ](
- percent, this.options.duration * percent, 0, 1, this.options.duration
- );
- } else {
- this.pos = eased = percent;
- }
- this.now = ( this.end - this.start ) * eased + this.start;
-
- if ( this.options.step ) {
- this.options.step.call( this.elem, this.now, this );
- }
-
- if ( hooks && hooks.set ) {
- hooks.set( this );
- } else {
- Tween.propHooks._default.set( this );
- }
- return this;
- }
-};
-
-Tween.prototype.init.prototype = Tween.prototype;
-
-Tween.propHooks = {
- _default: {
- get: function( tween ) {
- var result;
-
- if ( tween.elem[ tween.prop ] != null &&
- (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
- return tween.elem[ tween.prop ];
- }
-
- // passing any value as a 4th parameter to .css will automatically
- // attempt a parseFloat and fallback to a string if the parse fails
- // so, simple values such as "10px" are parsed to Float.
- // complex values such as "rotate(1rad)" are returned as is.
- result = jQuery.css( tween.elem, tween.prop, false, "" );
- // Empty strings, null, undefined and "auto" are converted to 0.
- return !result || result === "auto" ? 0 : result;
- },
- set: function( tween ) {
- // use step hook for back compat - use cssHook if its there - use .style if its
- // available and use plain properties where available
- if ( jQuery.fx.step[ tween.prop ] ) {
- jQuery.fx.step[ tween.prop ]( tween );
- } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
- jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
- } else {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
- }
-};
-
-// Remove in 2.0 - this supports IE8's panic based approach
-// to setting things on disconnected nodes
-
-Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
- set: function( tween ) {
- if ( tween.elem.nodeType && tween.elem.parentNode ) {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
-};
-
-jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
- var cssFn = jQuery.fn[ name ];
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return speed == null || typeof speed === "boolean" ||
- // special check for .toggle( handler, handler, ... )
- ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ?
- cssFn.apply( this, arguments ) :
- this.animate( genFx( name, true ), speed, easing, callback );
- };
-});
-
-jQuery.fn.extend({
- fadeTo: function( speed, to, easing, callback ) {
-
- // show any hidden elements after setting opacity to 0
- return this.filter( isHidden ).css( "opacity", 0 ).show()
-
- // animate to the value specified
- .end().animate({ opacity: to }, speed, easing, callback );
- },
- animate: function( prop, speed, easing, callback ) {
- var empty = jQuery.isEmptyObject( prop ),
- optall = jQuery.speed( speed, easing, callback ),
- doAnimation = function() {
- // Operate on a copy of prop so per-property easing won't be lost
- var anim = Animation( this, jQuery.extend( {}, prop ), optall );
-
- // Empty animations resolve immediately
- if ( empty ) {
- anim.stop( true );
- }
- };
-
- return empty || optall.queue === false ?
- this.each( doAnimation ) :
- this.queue( optall.queue, doAnimation );
- },
- stop: function( type, clearQueue, gotoEnd ) {
- var stopQueue = function( hooks ) {
- var stop = hooks.stop;
- delete hooks.stop;
- stop( gotoEnd );
- };
-
- if ( typeof type !== "string" ) {
- gotoEnd = clearQueue;
- clearQueue = type;
- type = undefined;
- }
- if ( clearQueue && type !== false ) {
- this.queue( type || "fx", [] );
- }
-
- return this.each(function() {
- var dequeue = true,
- index = type != null && type + "queueHooks",
- timers = jQuery.timers,
- data = jQuery._data( this );
-
- if ( index ) {
- if ( data[ index ] && data[ index ].stop ) {
- stopQueue( data[ index ] );
- }
- } else {
- for ( index in data ) {
- if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
- stopQueue( data[ index ] );
- }
- }
- }
-
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
- timers[ index ].anim.stop( gotoEnd );
- dequeue = false;
- timers.splice( index, 1 );
- }
- }
-
- // start the next in the queue if the last step wasn't forced
- // timers currently will call their complete callbacks, which will dequeue
- // but only if they were gotoEnd
- if ( dequeue || !gotoEnd ) {
- jQuery.dequeue( this, type );
- }
- });
- }
-});
-
-// Generate parameters to create a standard animation
-function genFx( type, includeWidth ) {
- var which,
- attrs = { height: type },
- i = 0;
-
- // if we include width, step value is 1 to do all cssExpand values,
- // if we don't include width, step value is 2 to skip over Left and Right
- includeWidth = includeWidth? 1 : 0;
- for( ; i < 4 ; i += 2 - includeWidth ) {
- which = cssExpand[ i ];
- attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
- }
-
- if ( includeWidth ) {
- attrs.opacity = attrs.width = type;
- }
-
- return attrs;
-}
-
-// Generate shortcuts for custom animations
-jQuery.each({
- slideDown: genFx("show"),
- slideUp: genFx("hide"),
- slideToggle: genFx("toggle"),
- fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" },
- fadeToggle: { opacity: "toggle" }
-}, function( name, props ) {
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return this.animate( props, speed, easing, callback );
- };
-});
-
-jQuery.speed = function( speed, easing, fn ) {
- var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
- };
-
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
- opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
-
- // normalize opt.queue - true/undefined/null -> "fx"
- if ( opt.queue == null || opt.queue === true ) {
- opt.queue = "fx";
- }
-
- // Queueing
- opt.old = opt.complete;
-
- opt.complete = function() {
- if ( jQuery.isFunction( opt.old ) ) {
- opt.old.call( this );
- }
-
- if ( opt.queue ) {
- jQuery.dequeue( this, opt.queue );
- }
- };
-
- return opt;
-};
-
-jQuery.easing = {
- linear: function( p ) {
- return p;
- },
- swing: function( p ) {
- return 0.5 - Math.cos( p*Math.PI ) / 2;
- }
-};
-
-jQuery.timers = [];
-jQuery.fx = Tween.prototype.init;
-jQuery.fx.tick = function() {
- var timer,
- timers = jQuery.timers,
- i = 0;
-
- fxNow = jQuery.now();
-
- for ( ; i < timers.length; i++ ) {
- timer = timers[ i ];
- // Checks the timer has not already been removed
- if ( !timer() && timers[ i ] === timer ) {
- timers.splice( i--, 1 );
- }
- }
-
- if ( !timers.length ) {
- jQuery.fx.stop();
- }
- fxNow = undefined;
-};
-
-jQuery.fx.timer = function( timer ) {
- if ( timer() && jQuery.timers.push( timer ) && !timerId ) {
- timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
- }
-};
-
-jQuery.fx.interval = 13;
-
-jQuery.fx.stop = function() {
- clearInterval( timerId );
- timerId = null;
-};
-
-jQuery.fx.speeds = {
- slow: 600,
- fast: 200,
- // Default speed
- _default: 400
-};
-
-// Back Compat <1.8 extension point
-jQuery.fx.step = {};
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.animated = function( elem ) {
- return jQuery.grep(jQuery.timers, function( fn ) {
- return elem === fn.elem;
- }).length;
- };
-}
-var rroot = /^(?:body|html)$/i;
-
-jQuery.fn.offset = function( options ) {
- if ( arguments.length ) {
- return options === undefined ?
- this :
- this.each(function( i ) {
- jQuery.offset.setOffset( this, options, i );
- });
- }
-
- var docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft,
- box = { top: 0, left: 0 },
- elem = this[ 0 ],
- doc = elem && elem.ownerDocument;
-
- if ( !doc ) {
- return;
- }
-
- if ( (body = doc.body) === elem ) {
- return jQuery.offset.bodyOffset( elem );
- }
-
- docElem = doc.documentElement;
-
- // Make sure it's not a disconnected DOM node
- if ( !jQuery.contains( docElem, elem ) ) {
- return box;
- }
-
- // If we don't have gBCR, just use 0,0 rather than error
- // BlackBerry 5, iOS 3 (original iPhone)
- if ( typeof elem.getBoundingClientRect !== "undefined" ) {
- box = elem.getBoundingClientRect();
- }
- win = getWindow( doc );
- clientTop = docElem.clientTop || body.clientTop || 0;
- clientLeft = docElem.clientLeft || body.clientLeft || 0;
- scrollTop = win.pageYOffset || docElem.scrollTop;
- scrollLeft = win.pageXOffset || docElem.scrollLeft;
- return {
- top: box.top + scrollTop - clientTop,
- left: box.left + scrollLeft - clientLeft
- };
-};
-
-jQuery.offset = {
-
- bodyOffset: function( body ) {
- var top = body.offsetTop,
- left = body.offsetLeft;
-
- if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
- top += parseFloat( jQuery.css(body, "marginTop") ) || 0;
- left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
- }
-
- return { top: top, left: left };
- },
-
- setOffset: function( elem, options, i ) {
- var position = jQuery.css( elem, "position" );
-
- // set position first, in-case top/left are set even on static elem
- if ( position === "static" ) {
- elem.style.position = "relative";
- }
-
- var curElem = jQuery( elem ),
- curOffset = curElem.offset(),
- curCSSTop = jQuery.css( elem, "top" ),
- curCSSLeft = jQuery.css( elem, "left" ),
- calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
- props = {}, curPosition = {}, curTop, curLeft;
-
- // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
- if ( calculatePosition ) {
- curPosition = curElem.position();
- curTop = curPosition.top;
- curLeft = curPosition.left;
- } else {
- curTop = parseFloat( curCSSTop ) || 0;
- curLeft = parseFloat( curCSSLeft ) || 0;
- }
-
- if ( jQuery.isFunction( options ) ) {
- options = options.call( elem, i, curOffset );
- }
-
- if ( options.top != null ) {
- props.top = ( options.top - curOffset.top ) + curTop;
- }
- if ( options.left != null ) {
- props.left = ( options.left - curOffset.left ) + curLeft;
- }
-
- if ( "using" in options ) {
- options.using.call( elem, props );
- } else {
- curElem.css( props );
- }
- }
-};
-
-
-jQuery.fn.extend({
-
- position: function() {
- if ( !this[0] ) {
- return;
- }
-
- var elem = this[0],
-
- // Get *real* offsetParent
- offsetParent = this.offsetParent(),
-
- // Get correct offsets
- offset = this.offset(),
- parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
-
- // Subtract element margins
- // note: when an element has margin: auto the offsetLeft and marginLeft
- // are the same in Safari causing offset.left to incorrectly be 0
- offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
- offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
-
- // Add offsetParent borders
- parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
- parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
-
- // Subtract the two offsets
- return {
- top: offset.top - parentOffset.top,
- left: offset.left - parentOffset.left
- };
- },
-
- offsetParent: function() {
- return this.map(function() {
- var offsetParent = this.offsetParent || document.body;
- while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
- offsetParent = offsetParent.offsetParent;
- }
- return offsetParent || document.body;
- });
- }
-});
-
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
- var top = /Y/.test( prop );
-
- jQuery.fn[ method ] = function( val ) {
- return jQuery.access( this, function( elem, method, val ) {
- var win = getWindow( elem );
-
- if ( val === undefined ) {
- return win ? (prop in win) ? win[ prop ] :
- win.document.documentElement[ method ] :
- elem[ method ];
- }
-
- if ( win ) {
- win.scrollTo(
- !top ? val : jQuery( win ).scrollLeft(),
- top ? val : jQuery( win ).scrollTop()
- );
-
- } else {
- elem[ method ] = val;
- }
- }, method, val, arguments.length, null );
- };
-});
-
-function getWindow( elem ) {
- return jQuery.isWindow( elem ) ?
- elem :
- elem.nodeType === 9 ?
- elem.defaultView || elem.parentWindow :
- false;
-}
-// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
-jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
- jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
- // margin is only for outerHeight, outerWidth
- jQuery.fn[ funcName ] = function( margin, value ) {
- var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
- extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
-
- return jQuery.access( this, function( elem, type, value ) {
- var doc;
-
- if ( jQuery.isWindow( elem ) ) {
- // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
- // isn't a whole lot we can do. See pull request at this URL for discussion:
- // https://github.com/jquery/jquery/pull/764
- return elem.document.documentElement[ "client" + name ];
- }
-
- // Get document width or height
- if ( elem.nodeType === 9 ) {
- doc = elem.documentElement;
-
- // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
- // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
- return Math.max(
- elem.body[ "scroll" + name ], doc[ "scroll" + name ],
- elem.body[ "offset" + name ], doc[ "offset" + name ],
- doc[ "client" + name ]
- );
- }
-
- return value === undefined ?
- // Get width or height on the element, requesting but not forcing parseFloat
- jQuery.css( elem, type, value, extra ) :
-
- // Set width or height on the element
- jQuery.style( elem, type, value, extra );
- }, type, chainable ? margin : undefined, chainable, null );
- };
- });
-});
-// Expose jQuery to the global object
-window.jQuery = window.$ = jQuery;
-
-// Expose jQuery as an AMD module, but only for AMD loaders that
-// understand the issues with loading multiple versions of jQuery
-// in a page that all might call define(). The loader will indicate
-// they have special allowances for multiple jQuery versions by
-// specifying define.amd.jQuery = true. Register as a named module,
-// since jQuery can be concatenated with other files that may use define,
-// but not use a proper concatenation script that understands anonymous
-// AMD modules. A named AMD is safest and most robust way to register.
-// Lowercase jquery is used because AMD module names are derived from
-// file names, and jQuery is normally delivered in a lowercase file name.
-// Do this after creating the global so that if an AMD module wants to call
-// noConflict to hide this version of jQuery, it will work.
-if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
- define( "jquery", [], function () { return jQuery; } );
-}
-
-})( window );
diff --git a/share/www/script/jquery.resizer.js b/share/www/script/jquery.resizer.js
deleted file mode 100644
index 42f0cc770..000000000
--- a/share/www/script/jquery.resizer.js
+++ /dev/null
@@ -1,84 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-(function($) {
-
- $.fn.makeResizable = function(options) {
- options = options || {};
- options.always = options.always || false;
- options.grippie = options.grippie || null;
- options.horizontal = options.horizontal || false;
- options.minWidth = options.minWidth || 100;
- options.maxWidth = options.maxWidth || null;
- options.vertical = options.vertical || false;
- options.minHeight = options.minHeight || 32;
- options.maxHeight = options.maxHeight || null;
-
- return this.each(function() {
- if ($(this).is("textarea") && !options.always &&
- $.browser.safari && parseInt($.browser.version) >= 522)
- return this; // safari3 and later provides textarea resizing natively
-
- var grippie = options.grippie;
- if (!grippie) grippie = $("<div></div>").appendTo(this.parentNode);
- grippie.addClass("grippie");
- if (options.horizontal && options.vertical) {
- grippie.css("cursor", "nwse-resize");
- } else if (options.horizontal) {
- grippie.css("cursor", "col-resize");
- } else if (options.vertical) {
- grippie.css("cursor", "row-resize");
- }
-
- var elem = $(this);
- grippie.mousedown(function(e) {
- var pos = {x: e.screenX, y: e.screenY};
- var dimensions = {width: elem.width(), height: elem.height()};
- $(document)
- .mousemove(function(e) {
- if (options.horizontal) {
- var offset = e.screenX - pos.x;
- if (offset) {
- var newWidth = dimensions.width + offset;
- if (newWidth >= options.minWidth &&
- (!options.maxWidth || newWidth <= options.maxWidth)) {
- elem.width(newWidth);
- dimensions.width = newWidth;
- }
- pos.x = e.screenX;
- }
- }
- if (options.vertical) {
- var offset = e.screenY - pos.y;
- if (offset) {
- var newHeight = dimensions.height + offset;
- if (newHeight >= options.minHeight &&
- (!options.maxHeight || newHeight <= options.maxHeight)) {
- elem.height(newHeight);
- dimensions.height = newHeight;
- }
- pos.y = e.screenY;
- }
- }
- document.onselectstart = function() { return false }; // for IE
- return false;
- })
- .one("mouseup", function() {
- $(document).unbind("mousemove");
- document.onselectstart = null; // for IE
- });
- return true;
- });
- });
- }
-
-})(jQuery);
diff --git a/share/www/script/jquery.suggest.js b/share/www/script/jquery.suggest.js
deleted file mode 100644
index cad020d62..000000000
--- a/share/www/script/jquery.suggest.js
+++ /dev/null
@@ -1,161 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-(function($) {
-
- function suggest(elem, options) {
- var timer = null;
- var prevVal = null;
- var cache = {};
- var cacheKeys = [];
-
- var input = $(elem).attr("autocomplete", "off");
- var dropdown = $('<ul style="display: none; position: absolute; z-index: 10000"></ul>')
- .addClass(options.dropdownClass).appendTo(document.body);
-
- input
- .blur(function() {
- if (timer) clearTimeout(timer);
- setTimeout(function() { dropdown.hide() }, 200);
- })
- .keydown(function(e) {
- if ($.inArray(e.keyCode, [16, 17, 18, 20, 144, 91, 93, 224]) != -1) {
- return; // ignore modifier keys
- }
- if (timer) clearTimeout(timer);
- if ($.inArray(e.keyCode, [38, 40]) != -1 ||
- (dropdown.is(":visible") && (e.keyCode == 27 ||
- ($.inArray(e.keyCode, [9, 13]) != -1 && getSelection())))) {
- switch(e.keyCode) {
- case 38: // up
- moveUp();
- break;
- case 40: // down
- moveDown();
- break;
- case 9: // tab
- case 13: // return
- commit();
- if (e.keyCode == 9) return true;
- break;
- case 27: // escape
- dropdown.hide();
- break;
- }
- e.preventDefault(); e.stopPropagation();
- return false;
- } else {
- timer = setTimeout(function() { suggest() }, options.delay);
- }
- });
-
- function suggest(force) {
- var newVal = $.trim(input.val());
- if (force || newVal != prevVal) {
- if (force || newVal.length >= options.minChars) {
- if (options.cache && cache.hasOwnProperty(newVal)) {
- show(cache[newVal].items, cache[newVal].render);
- } else {
- options.callback.apply(elem, [newVal, function(items, render) {
- if (options.cache) {
- if (cacheKeys.length >= options.cacheLimit) {
- delete cache[cacheKeys.shift()];
- }
- cache[newVal] = {items: items, render: render};
- cacheKeys.push(newVal);
- }
- show(items, render);
- }]);
- }
- } else {
- dropdown.hide();
- }
- prevVal = newVal;
- }
- }
-
- function show(items, render) {
- if (!items) return;
- if (!items.length) { dropdown.hide(); return; }
- var offset = input.offset();
- dropdown.empty().css({
- top: (offset.top + input.outerHeight()) + "px", left: offset.left + "px",
- minWidth: input.css("width")
- });
- render = render || function(idx, value) { return value; }
- for (var i = 0; i < items.length; i++) {
- var item = $("<li></li>").data("value", items[i]);
- var rendered = render(i, items[i]);
- if (typeof(rendered) == "string") {
- item.text(rendered);
- } else {
- item.append(rendered);
- }
- item.appendTo(dropdown);
- }
- dropdown.slideDown("fast");
- dropdown.children("li").click(function(e) {
- $(this).addClass("selected");
- commit();
- });
- }
-
- function commit() {
- var sel = getSelection();
- if (sel) {
- prevVal = sel.data("value");
- input.val(prevVal);
- if (options.select) {
- options.select.apply(elem, [prevVal]);
- }
- dropdown.hide();
- }
- if (timer) clearTimeout(timer)
- }
-
- function getSelection() {
- if (!dropdown.is(":visible")) return null;
- var sel = dropdown.children("li.selected");
- return sel.length ? sel : null;
- }
-
- function moveDown() {
- if (!dropdown.is(":visible")) suggest(true);
- var sel = getSelection();
- if (sel) sel.removeClass("selected").next().addClass("selected");
- else dropdown.children("li:first-child").addClass("selected");
- }
-
- function moveUp() {
- if (!dropdown.is(":visible")) suggest(true);
- var sel = getSelection();
- if (sel) sel.removeClass("selected").prev().addClass("selected");
- else dropdown.children("li:last-child").addClass("selected");
- }
- }
-
- $.fn.suggest = function(callback, options) {
- options = $.extend({
- cache: true,
- cacheLimit: 10,
- callback: callback,
- delay: 250,
- dropdownClass: "suggest-dropdown",
- minChars: 1,
- select: null
- }, options || {});
- return this.each(function() {
- suggest(this, options);
- });
- };
-
-})(jQuery);
diff --git a/share/www/script/json2.js b/share/www/script/json2.js
deleted file mode 100644
index a1a3b170c..000000000
--- a/share/www/script/json2.js
+++ /dev/null
@@ -1,482 +0,0 @@
-/*
- http://www.JSON.org/json2.js
- 2010-03-20
-
- Public Domain.
-
- NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
-
- See http://www.JSON.org/js.html
-
-
- This code should be minified before deployment.
- See http://javascript.crockford.com/jsmin.html
-
- USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
- NOT CONTROL.
-
-
- This file creates a global JSON object containing two methods: stringify
- and parse.
-
- JSON.stringify(value, replacer, space)
- value any JavaScript value, usually an object or array.
-
- replacer an optional parameter that determines how object
- values are stringified for objects. It can be a
- function or an array of strings.
-
- space an optional parameter that specifies the indentation
- of nested structures. If it is omitted, the text will
- be packed without extra whitespace. If it is a number,
- it will specify the number of spaces to indent at each
- level. If it is a string (such as '\t' or '&nbsp;'),
- it contains the characters used to indent at each level.
-
- This method produces a JSON text from a JavaScript value.
-
- When an object value is found, if the object contains a toJSON
- method, its toJSON method will be called and the result will be
- stringified. A toJSON method does not serialize: it returns the
- value represented by the name/value pair that should be serialized,
- or undefined if nothing should be serialized. The toJSON method
- will be passed the key associated with the value, and this will be
- bound to the value
-
- For example, this would serialize Dates as ISO strings.
-
- Date.prototype.toJSON = function (key) {
- function f(n) {
- // Format integers to have at least two digits.
- return n < 10 ? '0' + n : n;
- }
-
- return this.getUTCFullYear() + '-' +
- f(this.getUTCMonth() + 1) + '-' +
- f(this.getUTCDate()) + 'T' +
- f(this.getUTCHours()) + ':' +
- f(this.getUTCMinutes()) + ':' +
- f(this.getUTCSeconds()) + 'Z';
- };
-
- You can provide an optional replacer method. It will be passed the
- key and value of each member, with this bound to the containing
- object. The value that is returned from your method will be
- serialized. If your method returns undefined, then the member will
- be excluded from the serialization.
-
- If the replacer parameter is an array of strings, then it will be
- used to select the members to be serialized. It filters the results
- such that only members with keys listed in the replacer array are
- stringified.
-
- Values that do not have JSON representations, such as undefined or
- functions, will not be serialized. Such values in objects will be
- dropped; in arrays they will be replaced with null. You can use
- a replacer function to replace those with JSON values.
- JSON.stringify(undefined) returns undefined.
-
- The optional space parameter produces a stringification of the
- value that is filled with line breaks and indentation to make it
- easier to read.
-
- If the space parameter is a non-empty string, then that string will
- be used for indentation. If the space parameter is a number, then
- the indentation will be that many spaces.
-
- Example:
-
- text = JSON.stringify(['e', {pluribus: 'unum'}]);
- // text is '["e",{"pluribus":"unum"}]'
-
-
- text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
- // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
-
- text = JSON.stringify([new Date()], function (key, value) {
- return this[key] instanceof Date ?
- 'Date(' + this[key] + ')' : value;
- });
- // text is '["Date(---current time---)"]'
-
-
- JSON.parse(text, reviver)
- This method parses a JSON text to produce an object or array.
- It can throw a SyntaxError exception.
-
- The optional reviver parameter is a function that can filter and
- transform the results. It receives each of the keys and values,
- and its return value is used instead of the original value.
- If it returns what it received, then the structure is not modified.
- If it returns undefined then the member is deleted.
-
- Example:
-
- // Parse the text. Values that look like ISO date strings will
- // be converted to Date objects.
-
- myData = JSON.parse(text, function (key, value) {
- var a;
- if (typeof value === 'string') {
- a =
-/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
- if (a) {
- return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
- +a[5], +a[6]));
- }
- }
- return value;
- });
-
- myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
- var d;
- if (typeof value === 'string' &&
- value.slice(0, 5) === 'Date(' &&
- value.slice(-1) === ')') {
- d = new Date(value.slice(5, -1));
- if (d) {
- return d;
- }
- }
- return value;
- });
-
-
- This is a reference implementation. You are free to copy, modify, or
- redistribute.
-*/
-
-/*jslint evil: true, strict: false */
-
-/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
- call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
- getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
- lastIndex, length, parse, prototype, push, replace, slice, stringify,
- test, toJSON, toString, valueOf
-*/
-
-
-// Create a JSON object only if one does not already exist. We create the
-// methods in a closure to avoid creating global variables.
-
-if (!this.JSON) {
- this.JSON = {};
-}
-
-(function () {
-
- function f(n) {
- // Format integers to have at least two digits.
- return n < 10 ? '0' + n : n;
- }
-
- if (typeof Date.prototype.toJSON !== 'function') {
-
- Date.prototype.toJSON = function (key) {
-
- return isFinite(this.valueOf()) ?
- this.getUTCFullYear() + '-' +
- f(this.getUTCMonth() + 1) + '-' +
- f(this.getUTCDate()) + 'T' +
- f(this.getUTCHours()) + ':' +
- f(this.getUTCMinutes()) + ':' +
- f(this.getUTCSeconds()) + 'Z' : null;
- };
-
- String.prototype.toJSON =
- Number.prototype.toJSON =
- Boolean.prototype.toJSON = function (key) {
- return this.valueOf();
- };
- }
-
- var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- gap,
- indent,
- meta = { // table of character substitutions
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '"' : '\\"',
- '\\': '\\\\'
- },
- rep;
-
-
- function quote(string) {
-
-// If the string contains no control characters, no quote characters, and no
-// backslash characters, then we can safely slap some quotes around it.
-// Otherwise we must also replace the offending characters with safe escape
-// sequences.
-
- escapable.lastIndex = 0;
- return escapable.test(string) ?
- '"' + string.replace(escapable, function (a) {
- var c = meta[a];
- return typeof c === 'string' ? c :
- '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
- }) + '"' :
- '"' + string + '"';
- }
-
-
- function str(key, holder) {
-
-// Produce a string from holder[key].
-
- var i, // The loop counter.
- k, // The member key.
- v, // The member value.
- length,
- mind = gap,
- partial,
- value = holder[key];
-
-// If the value has a toJSON method, call it to obtain a replacement value.
-
- if (value && typeof value === 'object' &&
- typeof value.toJSON === 'function') {
- value = value.toJSON(key);
- }
-
-// If we were called with a replacer function, then call the replacer to
-// obtain a replacement value.
-
- if (typeof rep === 'function') {
- value = rep.call(holder, key, value);
- }
-
-// What happens next depends on the value's type.
-
- switch (typeof value) {
- case 'string':
- return quote(value);
-
- case 'number':
-
-// JSON numbers must be finite. Encode non-finite numbers as null.
-
- return isFinite(value) ? String(value) : 'null';
-
- case 'boolean':
- case 'null':
-
-// If the value is a boolean or null, convert it to a string. Note:
-// typeof null does not produce 'null'. The case is included here in
-// the remote chance that this gets fixed someday.
-
- return String(value);
-
-// If the type is 'object', we might be dealing with an object or an array or
-// null.
-
- case 'object':
-
-// Due to a specification blunder in ECMAScript, typeof null is 'object',
-// so watch out for that case.
-
- if (!value) {
- return 'null';
- }
-
-// Make an array to hold the partial results of stringifying this object value.
-
- gap += indent;
- partial = [];
-
-// Is the value an array?
-
- if (Object.prototype.toString.apply(value) === '[object Array]') {
-
-// The value is an array. Stringify every element. Use null as a placeholder
-// for non-JSON values.
-
- length = value.length;
- for (i = 0; i < length; i += 1) {
- partial[i] = str(i, value) || 'null';
- }
-
-// Join all of the elements together, separated with commas, and wrap them in
-// brackets.
-
- v = partial.length === 0 ? '[]' :
- gap ? '[\n' + gap +
- partial.join(',\n' + gap) + '\n' +
- mind + ']' :
- '[' + partial.join(',') + ']';
- gap = mind;
- return v;
- }
-
-// If the replacer is an array, use it to select the members to be stringified.
-
- if (rep && typeof rep === 'object') {
- length = rep.length;
- for (i = 0; i < length; i += 1) {
- k = rep[i];
- if (typeof k === 'string') {
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- } else {
-
-// Otherwise, iterate through all of the keys in the object.
-
- for (k in value) {
- if (Object.hasOwnProperty.call(value, k)) {
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- }
-
-// Join all of the member texts together, separated with commas,
-// and wrap them in braces.
-
- v = partial.length === 0 ? '{}' :
- gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
- mind + '}' : '{' + partial.join(',') + '}';
- gap = mind;
- return v;
- }
- }
-
-// If the JSON object does not yet have a stringify method, give it one.
-
- if (typeof JSON.stringify !== 'function') {
- JSON.stringify = function (value, replacer, space) {
-
-// The stringify method takes a value and an optional replacer, and an optional
-// space parameter, and returns a JSON text. The replacer can be a function
-// that can replace values, or an array of strings that will select the keys.
-// A default replacer method can be provided. Use of the space parameter can
-// produce text that is more easily readable.
-
- var i;
- gap = '';
- indent = '';
-
-// If the space parameter is a number, make an indent string containing that
-// many spaces.
-
- if (typeof space === 'number') {
- for (i = 0; i < space; i += 1) {
- indent += ' ';
- }
-
-// If the space parameter is a string, it will be used as the indent string.
-
- } else if (typeof space === 'string') {
- indent = space;
- }
-
-// If there is a replacer, it must be a function or an array.
-// Otherwise, throw an error.
-
- rep = replacer;
- if (replacer && typeof replacer !== 'function' &&
- (typeof replacer !== 'object' ||
- typeof replacer.length !== 'number')) {
- throw new Error('JSON.stringify');
- }
-
-// Make a fake root object containing our value under the key of ''.
-// Return the result of stringifying the value.
-
- return str('', {'': value});
- };
- }
-
-
-// If the JSON object does not yet have a parse method, give it one.
-
- if (typeof JSON.parse !== 'function') {
- JSON.parse = function (text, reviver) {
-
-// The parse method takes a text and an optional reviver function, and returns
-// a JavaScript value if the text is a valid JSON text.
-
- var j;
-
- function walk(holder, key) {
-
-// The walk method is used to recursively walk the resulting structure so
-// that modifications can be made.
-
- var k, v, value = holder[key];
- if (value && typeof value === 'object') {
- for (k in value) {
- if (Object.hasOwnProperty.call(value, k)) {
- v = walk(value, k);
- if (v !== undefined) {
- value[k] = v;
- } else {
- delete value[k];
- }
- }
- }
- }
- return reviver.call(holder, key, value);
- }
-
-
-// Parsing happens in four stages. In the first stage, we replace certain
-// Unicode characters with escape sequences. JavaScript handles many characters
-// incorrectly, either silently deleting them, or treating them as line endings.
-
- text = String(text);
- cx.lastIndex = 0;
- if (cx.test(text)) {
- text = text.replace(cx, function (a) {
- return '\\u' +
- ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
- });
- }
-
-// In the second stage, we run the text against regular expressions that look
-// for non-JSON patterns. We are especially concerned with '()' and 'new'
-// because they can cause invocation, and '=' because it can cause mutation.
-// But just to be safe, we want to reject all unexpected forms.
-
-// We split the second stage into 4 regexp operations in order to work around
-// crippling inefficiencies in IE's and Safari's regexp engines. First we
-// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
-// replace all simple value tokens with ']' characters. Third, we delete all
-// open brackets that follow a colon or comma or that begin the text. Finally,
-// we look to see that the remaining characters are only whitespace or ']' or
-// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
-
- if (/^[\],:{}\s]*$/.
-test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
-replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
-replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
-
-// In the third stage we use the eval function to compile the text into a
-// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
-// in JavaScript: it can begin a block or an object literal. We wrap the text
-// in parens to eliminate the ambiguity.
-
- j = eval('(' + text + ')');
-
-// In the optional fourth stage, we recursively walk the new structure, passing
-// each name/value pair to a reviver function for possible transformation.
-
- return typeof reviver === 'function' ?
- walk({'': j}, '') : j;
- }
-
-// If the text is not JSON parseable, then a SyntaxError is thrown.
-
- throw new SyntaxError('JSON.parse');
- };
- }
-}());
diff --git a/share/www/script/jspec/jspec.css b/share/www/script/jspec/jspec.css
deleted file mode 100644
index 629d41c52..000000000
--- a/share/www/script/jspec/jspec.css
+++ /dev/null
@@ -1,149 +0,0 @@
-body.jspec {
- margin: 45px 0;
- font: 12px "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif;
- background: #efefef url(images/bg.png) top left repeat-x;
- text-align: center;
-}
-#jspec {
- margin: 0 auto;
- padding-top: 30px;
- width: 1008px;
- background: url(images/vr.png) top left repeat-y;
- text-align: left;
-}
-#jspec-top {
- position: relative;
- margin: 0 auto;
- width: 1008px;
- height: 40px;
- background: url(images/sprites.bg.png) top left no-repeat;
-}
-#jspec-bottom {
- margin: 0 auto;
- width: 1008px;
- height: 15px;
- background: url(images/sprites.bg.png) bottom left no-repeat;
-}
-#jspec .loading {
- margin-top: -45px;
- width: 1008px;
- height: 80px;
- background: url(images/loading.gif) 50% 50% no-repeat;
-}
-#jspec-title {
- position: absolute;
- top: 15px;
- left: 20px;
- width: 160px;
- font-size: 22px;
- font-weight: normal;
- background: url(images/sprites.png) 0 -126px no-repeat;
- text-align: center;
-}
-#jspec-title em {
- font-size: 10px;
- font-style: normal;
- color: #BCC8D1;
-}
-#jspec-report * {
- margin: 0;
- padding: 0;
- background: none;
- border: none;
-}
-#jspec-report {
- padding: 15px 40px;
- font: 11px "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif;
- color: #7B8D9B;
-}
-#jspec-report.has-failures {
- padding-bottom: 30px;
-}
-#jspec-report .hidden {
- display: none;
-}
-#jspec-report .heading {
- margin-bottom: 15px;
-}
-#jspec-report .heading span {
- padding-right: 10px;
-}
-#jspec-report .heading .passes em {
- color: #0ea0eb;
-}
-#jspec-report .heading .failures em {
- color: #FA1616;
-}
-#jspec-report table {
- font-size: 11px;
- border-collapse: collapse;
-}
-#jspec-report td {
- padding: 8px;
- text-indent: 30px;
- color: #7B8D9B;
-}
-#jspec-report tr.body {
- display: none;
-}
-#jspec-report tr.body pre {
- margin: 0;
- padding: 0 0 5px 25px;
-}
-#jspec-report tr.even:hover + tr.body,
-#jspec-report tr.odd:hover + tr.body {
- display: block;
-}
-#jspec-report tr td:first-child em {
- display: block;
- clear: both;
- font-style: normal;
- font-weight: normal;
- color: #7B8D9B;
-}
-#jspec-report tr.even:hover,
-#jspec-report tr.odd:hover {
- text-shadow: 1px 1px 1px #fff;
- background: #F2F5F7;
-}
-#jspec-report td + td {
- padding-right: 0;
- width: 15px;
-}
-#jspec-report td.pass {
- background: url(images/sprites.png) 3px -7px no-repeat;
-}
-#jspec-report td.fail {
- background: url(images/sprites.png) 3px -158px no-repeat;
- font-weight: bold;
- color: #FC0D0D;
-}
-#jspec-report td.requires-implementation {
- background: url(images/sprites.png) 3px -333px no-repeat;
-}
-#jspec-report tr.description td {
- margin-top: 25px;
- padding-top: 25px;
- font-size: 12px;
- font-weight: bold;
- text-indent: 0;
- color: #1a1a1a;
-}
-#jspec-report tr.description:first-child td {
- border-top: none;
-}
-#jspec-report .assertion {
- display: block;
- float: left;
- margin: 0 0 0 1px;
- padding: 0;
- width: 1px;
- height: 5px;
- background: #7B8D9B;
-}
-#jspec-report .assertion.failed {
- background: red;
-}
-.jspec-sandbox {
- display: none;
-} \ No newline at end of file
diff --git a/share/www/script/jspec/jspec.jquery.js b/share/www/script/jspec/jspec.jquery.js
deleted file mode 100644
index fcad7ab96..000000000
--- a/share/www/script/jspec/jspec.jquery.js
+++ /dev/null
@@ -1,72 +0,0 @@
-
-// JSpec - jQuery - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)
-
-JSpec
-.requires('jQuery', 'when using jspec.jquery.js')
-.include({
- name: 'jQuery',
-
- // --- Initialize
-
- init : function() {
- jQuery.ajaxSetup({ async: false })
- },
-
- // --- Utilities
-
- utilities : {
- element: jQuery,
- elements: jQuery,
- sandbox : function() {
- return jQuery('<div class="sandbox"></div>')
- }
- },
-
- // --- Matchers
-
- matchers : {
- have_tag : "jQuery(expected, actual).length === 1",
- have_one : "alias have_tag",
- have_tags : "jQuery(expected, actual).length > 1",
- have_many : "alias have_tags",
- have_any : "alias have_tags",
- have_child : "jQuery(actual).children(expected).length === 1",
- have_children : "jQuery(actual).children(expected).length > 1",
- have_text : "jQuery(actual).text() === expected",
- have_value : "jQuery(actual).val() === expected",
- be_enabled : "!jQuery(actual).attr('disabled')",
- have_class : "jQuery(actual).hasClass(expected)",
-
- be_visible : function(actual) {
- return jQuery(actual).css('display') != 'none' &&
- jQuery(actual).css('visibility') != 'hidden' &&
- jQuery(actual).attr('type') != 'hidden'
- },
-
- be_hidden : function(actual) {
- return !JSpec.does(actual, 'be_visible')
- },
-
- have_classes : function(actual) {
- return !JSpec.any(JSpec.toArray(arguments, 1), function(arg){
- return !JSpec.does(actual, 'have_class', arg)
- })
- },
-
- have_attr : function(actual, attr, value) {
- return value ? jQuery(actual).attr(attr) == value:
- jQuery(actual).attr(attr)
- },
-
- 'be disabled selected checked' : function(attr) {
- return 'jQuery(actual).attr("' + attr + '")'
- },
-
- 'have type id title alt href src sel rev name target' : function(attr) {
- return function(actual, value) {
- return JSpec.does(actual, 'have_attr', attr, value)
- }
- }
- }
-})
-
diff --git a/share/www/script/jspec/jspec.js b/share/www/script/jspec/jspec.js
deleted file mode 100644
index b2ea47680..000000000
--- a/share/www/script/jspec/jspec.js
+++ /dev/null
@@ -1,1756 +0,0 @@
-
-// JSpec - Core - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)
-
-;(function(){
-
- JSpec = {
- version : '3.3.2',
- assert : true,
- cache : {},
- suites : [],
- modules : [],
- allSuites : [],
- matchers : {},
- stubbed : [],
- options : {},
- request : 'XMLHttpRequest' in this ? XMLHttpRequest : null,
- stats : { specs: 0, assertions: 0, failures: 0, passes: 0, specsFinished: 0, suitesFinished: 0 },
-
- /**
- * Default context in which bodies are evaluated.
- *
- * Replace context simply by setting JSpec.context
- * to your own like below:
- *
- * JSpec.context = { foo : 'bar' }
- *
- * Contexts can be changed within any body, this can be useful
- * in order to provide specific helper methods to specific suites.
- *
- * To reset (usually in after hook) simply set to null like below:
- *
- * JSpec.context = null
- *
- */
-
- defaultContext : {
-
- /**
- * Return an object used for proxy assertions.
- * This object is used to indicate that an object
- * should be an instance of _object_, not the constructor
- * itself.
- *
- * @param {function} constructor
- * @return {hash}
- * @api public
- */
-
- an_instance_of : function(constructor) {
- return { an_instance_of : constructor }
- },
-
- /**
- * Load fixture at _path_.
- *
- * Fixtures are resolved as:
- *
- * - <path>
- * - <path>.html
- *
- * @param {string} path
- * @return {string}
- * @api public
- */
-
- fixture : function(path) {
- if (JSpec.cache[path]) return JSpec.cache[path]
- return JSpec.cache[path] =
- JSpec.tryLoading(JSpec.options.fixturePath + '/' + path) ||
- JSpec.tryLoading(JSpec.options.fixturePath + '/' + path + '.html')
- }
- },
-
- // --- Objects
-
- reporters : {
-
- /**
- * Report to server.
- *
- * Options:
- * - uri specific uri to report to.
- * - verbose weither or not to output messages
- * - failuresOnly output failure messages only
- *
- * @api public
- */
-
- Server : function(results, options) {
- var uri = options.uri || window.location.protocol + "//" + window.location.host + '/results'
- JSpec.post(uri, {
- stats: JSpec.stats,
- options: options,
- results: map(results.allSuites, function(suite) {
- if (suite.hasSpecs())
- return {
- description: suite.description,
- specs: map(suite.specs, function(spec) {
- return {
- description: spec.description,
- message: !spec.passed() ? spec.failure().message : null,
- status: spec.requiresImplementation() ? 'pending' :
- spec.passed() ? 'pass' :
- 'fail',
- assertions: map(spec.assertions, function(assertion){
- return {
- passed: assertion.passed
- }
- })
- }
- })
- }
- })
- })
- if ('close' in main) main.close()
- },
-
- /**
- * Default reporter, outputting to the DOM.
- *
- * Options:
- * - reportToId id of element to output reports to, defaults to 'jspec'
- * - failuresOnly displays only suites with failing specs
- *
- * @api public
- */
-
- DOM : function(results, options) {
- var id = option('reportToId') || 'jspec',
- report = document.getElementById(id),
- failuresOnly = option('failuresOnly'),
- classes = results.stats.failures ? 'has-failures' : ''
- if (!report) throw 'JSpec requires the element #' + id + ' to output its reports'
-
- function bodyContents(body) {
- return JSpec.
- escape(JSpec.contentsOf(body)).
- replace(/^ */gm, function(a){ return (new Array(Math.round(a.length / 3))).join(' ') }).
- replace(/\r\n|\r|\n/gm, '<br/>')
- }
-
- report.innerHTML = '<div id="jspec-report" class="' + classes + '"><div class="heading"> \
- <span class="passes">Passes: <em>' + results.stats.passes + '</em></span> \
- <span class="failures">Failures: <em>' + results.stats.failures + '</em></span> \
- <span class="passes">Duration: <em>' + results.duration + '</em> ms</span> \
- </div><table class="suites">' + map(results.allSuites, function(suite) {
- var displaySuite = failuresOnly ? suite.ran && !suite.passed() : suite.ran
- if (displaySuite && suite.hasSpecs())
- return '<tr class="description"><td colspan="2">' + escape(suite.description) + '</td></tr>' +
- map(suite.specs, function(i, spec) {
- return '<tr class="' + (i % 2 ? 'odd' : 'even') + '">' +
- (spec.requiresImplementation() ?
- '<td class="requires-implementation" colspan="2">' + escape(spec.description) + '</td>' :
- (spec.passed() && !failuresOnly) ?
- '<td class="pass">' + escape(spec.description)+ '</td><td>' + spec.assertionsGraph() + '</td>' :
- !spec.passed() ?
- '<td class="fail">' + escape(spec.description) +
- map(spec.failures(), function(a){ return '<em>' + escape(a.message) + '</em>' }).join('') +
- '</td><td>' + spec.assertionsGraph() + '</td>' :
- '') +
- '<tr class="body"><td colspan="2"><pre>' + bodyContents(spec.body) + '</pre></td></tr>'
- }).join('') + '</tr>'
- }).join('') + '</table></div>'
- },
-
- /**
- * Terminal reporter.
- *
- * @api public
- */
-
- Terminal : function(results, options) {
- var failuresOnly = option('failuresOnly')
- print(color("\n Passes: ", 'bold') + color(results.stats.passes, 'green') +
- color(" Failures: ", 'bold') + color(results.stats.failures, 'red') +
- color(" Duration: ", 'bold') + color(results.duration, 'green') + " ms \n")
-
- function indent(string) {
- return string.replace(/^(.)/gm, ' $1')
- }
-
- each(results.allSuites, function(suite) {
- var displaySuite = failuresOnly ? suite.ran && !suite.passed() : suite.ran
- if (displaySuite && suite.hasSpecs()) {
- print(color(' ' + suite.description, 'bold'))
- each(suite.specs, function(spec){
- var assertionsGraph = inject(spec.assertions, '', function(graph, assertion){
- return graph + color('.', assertion.passed ? 'green' : 'red')
- })
- if (spec.requiresImplementation())
- print(color(' ' + spec.description, 'blue') + assertionsGraph)
- else if (spec.passed() && !failuresOnly)
- print(color(' ' + spec.description, 'green') + assertionsGraph)
- else if (!spec.passed())
- print(color(' ' + spec.description, 'red') + assertionsGraph +
- "\n" + indent(map(spec.failures(), function(a){ return a.message }).join("\n")) + "\n")
- })
- print("")
- }
- })
-
- quit(results.stats.failures)
- }
- },
-
- Assertion : function(matcher, actual, expected, negate) {
- extend(this, {
- message: '',
- passed: false,
- actual: actual,
- negate: negate,
- matcher: matcher,
- expected: expected,
-
- // Report assertion results
-
- report : function() {
- if (JSpec.assert)
- this.passed ? JSpec.stats.passes++ : JSpec.stats.failures++
- return this
- },
-
- // Run the assertion
-
- run : function() {
- // TODO: remove unshifting
- expected.unshift(actual)
- this.result = matcher.match.apply(this, expected)
- this.passed = negate ? !this.result : this.result
- if (!this.passed) this.message = matcher.message.call(this, actual, expected, negate, matcher.name)
- return this
- }
- })
- },
-
- ProxyAssertion : function(object, method, times, negate) {
- var self = this
- var old = object[method]
-
- // Proxy
-
- object[method] = function(){
- args = toArray(arguments)
- result = old.apply(object, args)
- self.calls.push({ args : args, result : result })
- return result
- }
-
- // Times
-
- this.times = {
- once : 1,
- twice : 2
- }[times] || times || 1
-
- extend(this, {
- calls: [],
- message: '',
- defer: true,
- passed: false,
- negate: negate,
- object: object,
- method: method,
-
- // Proxy return value
-
- and_return : function(result) {
- this.expectedResult = result
- return this
- },
-
- // Proxy arguments passed
-
- with_args : function() {
- this.expectedArgs = toArray(arguments)
- return this
- },
-
- // Check if any calls have failing results
-
- anyResultsFail : function() {
- return any(this.calls, function(call){
- return self.expectedResult.an_instance_of ?
- call.result.constructor != self.expectedResult.an_instance_of:
- !equal(self.expectedResult, call.result)
- })
- },
-
- // Check if any calls have passing results
-
- anyResultsPass : function() {
- return any(this.calls, function(call){
- return self.expectedResult.an_instance_of ?
- call.result.constructor == self.expectedResult.an_instance_of:
- equal(self.expectedResult, call.result)
- })
- },
-
- // Return the passing result
-
- passingResult : function() {
- return this.anyResultsPass().result
- },
-
- // Return the failing result
-
- failingResult : function() {
- return this.anyResultsFail().result
- },
-
- // Check if any arguments fail
-
- anyArgsFail : function() {
- return any(this.calls, function(call){
- return any(self.expectedArgs, function(i, arg){
- if (arg == null) return call.args[i] == null
- return arg.an_instance_of ?
- call.args[i].constructor != arg.an_instance_of:
- !equal(arg, call.args[i])
-
- })
- })
- },
-
- // Check if any arguments pass
-
- anyArgsPass : function() {
- return any(this.calls, function(call){
- return any(self.expectedArgs, function(i, arg){
- return arg.an_instance_of ?
- call.args[i].constructor == arg.an_instance_of:
- equal(arg, call.args[i])
-
- })
- })
- },
-
- // Return the passing args
-
- passingArgs : function() {
- return this.anyArgsPass().args
- },
-
- // Return the failing args
-
- failingArgs : function() {
- return this.anyArgsFail().args
- },
-
- // Report assertion results
-
- report : function() {
- if (JSpec.assert)
- this.passed ? ++JSpec.stats.passes : ++JSpec.stats.failures
- return this
- },
-
- // Run the assertion
-
- run : function() {
- var methodString = 'expected ' + object.toString() + '.' + method + '()' + (negate ? ' not' : '' )
-
- function times(n) {
- return n > 2 ? n + ' times' : { 1: 'once', 2: 'twice' }[n]
- }
-
- if (this.expectedResult != null && (negate ? this.anyResultsPass() : this.anyResultsFail()))
- this.message = methodString + ' to return ' + puts(this.expectedResult) +
- ' but ' + (negate ? 'it did' : 'got ' + puts(this.failingResult()))
-
- if (this.expectedArgs && (negate ? !this.expectedResult && this.anyArgsPass() : this.anyArgsFail()))
- this.message = methodString + ' to be called with ' + puts.apply(this, this.expectedArgs) +
- ' but was' + (negate ? '' : ' called with ' + puts.apply(this, this.failingArgs()))
-
- if (negate ? !this.expectedResult && !this.expectedArgs && this.calls.length >= this.times : this.calls.length != this.times)
- this.message = methodString + ' to be called ' + times(this.times) +
- ', but ' + (this.calls.length == 0 ? ' was not called' : ' was called ' + times(this.calls.length))
-
- if (!this.message.length)
- this.passed = true
-
- return this
- }
- })
- },
-
- /**
- * Specification Suite block object.
- *
- * @param {string} description
- * @param {function} body
- * @api private
- */
-
- Suite : function(description, body) {
- var self = this
- extend(this, {
- body: body,
- description: description,
- suites: [],
- specs: [],
- ran: false,
- hooks: { 'before' : [], 'after' : [], 'before_each' : [], 'after_each' : [] },
-
- // Add a spec to the suite
-
- addSpec : function(description, body) {
- var spec = new JSpec.Spec(description, body)
- this.specs.push(spec)
- JSpec.stats.specs++ // TODO: abstract
- spec.suite = this
- },
-
- // Add a hook to the suite
-
- addHook : function(hook, body) {
- this.hooks[hook].push(body)
- },
-
- // Add a nested suite
-
- addSuite : function(description, body) {
- var suite = new JSpec.Suite(description, body)
- JSpec.allSuites.push(suite)
- suite.name = suite.description
- suite.description = this.description + ' ' + suite.description
- this.suites.push(suite)
- suite.suite = this
- },
-
- // Invoke a hook in context to this suite
-
- hook : function(hook) {
- if (this.suite) this.suite.hook(hook)
- each(this.hooks[hook], function(body) {
- JSpec.evalBody(body, "Error in hook '" + hook + "', suite '" + self.description + "': ")
- })
- },
-
- // Check if nested suites are present
-
- hasSuites : function() {
- return this.suites.length
- },
-
- // Check if this suite has specs
-
- hasSpecs : function() {
- return this.specs.length
- },
-
- // Check if the entire suite passed
-
- passed : function() {
- return !any(this.specs, function(spec){
- return !spec.passed()
- })
- }
- })
- },
-
- /**
- * Specification block object.
- *
- * @param {string} description
- * @param {function} body
- * @api private
- */
-
- Spec : function(description, body) {
- extend(this, {
- body: body,
- description: description,
- assertions: [],
-
- // Add passing assertion
-
- pass : function(message) {
- this.assertions.push({ passed: true, message: message })
- if (JSpec.assert) ++JSpec.stats.passes
- },
-
- // Add failing assertion
-
- fail : function(message) {
- this.assertions.push({ passed: false, message: message })
- if (JSpec.assert) ++JSpec.stats.failures
- },
-
- // Run deferred assertions
-
- runDeferredAssertions : function() {
- each(this.assertions, function(assertion){
- if (assertion.defer) assertion.run().report(), hook('afterAssertion', assertion)
- })
- },
-
- // Find first failing assertion
-
- failure : function() {
- return find(this.assertions, function(assertion){
- return !assertion.passed
- })
- },
-
- // Find all failing assertions
-
- failures : function() {
- return select(this.assertions, function(assertion){
- return !assertion.passed
- })
- },
-
- // Weither or not the spec passed
-
- passed : function() {
- return !this.failure()
- },
-
- // Weither or not the spec requires implementation (no assertions)
-
- requiresImplementation : function() {
- return this.assertions.length == 0
- },
-
- // Sprite based assertions graph
-
- assertionsGraph : function() {
- return map(this.assertions, function(assertion){
- return '<span class="assertion ' + (assertion.passed ? 'passed' : 'failed') + '"></span>'
- }).join('')
- }
- })
- },
-
- Module : function(methods) {
- extend(this, methods)
- },
-
- JSON : {
-
- /**
- * Generic sequences.
- */
-
- meta : {
- '\b' : '\\b',
- '\t' : '\\t',
- '\n' : '\\n',
- '\f' : '\\f',
- '\r' : '\\r',
- '"' : '\\"',
- '\\' : '\\\\'
- },
-
- /**
- * Escapable sequences.
- */
-
- escapable : /[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
-
- /**
- * JSON encode _object_.
- *
- * @param {mixed} object
- * @return {string}
- * @api private
- */
-
- encode : function(object) {
- var self = this
- if (object == undefined || object == null) return 'null'
- if (object === true) return 'true'
- if (object === false) return 'false'
- switch (typeof object) {
- case 'number': return object
- case 'string': return this.escapable.test(object) ?
- '"' + object.replace(this.escapable, function (a) {
- return typeof self.meta[a] === 'string' ? self.meta[a] :
- '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4)
- }) + '"' :
- '"' + object + '"'
- case 'object':
- if (object.constructor == Array)
- return '[' + map(object, function(val){
- return self.encode(val)
- }).join(', ') + ']'
- else if (object)
- return '{' + map(object, function(key, val){
- return self.encode(key) + ':' + self.encode(val)
- }).join(', ') + '}'
- }
- return 'null'
- }
- },
-
- // --- DSLs
-
- DSLs : {
- snake : {
- expect : function(actual){
- return JSpec.expect(actual)
- },
-
- describe : function(description, body) {
- return JSpec.currentSuite.addSuite(description, body)
- },
-
- it : function(description, body) {
- return JSpec.currentSuite.addSpec(description, body)
- },
-
- before : function(body) {
- return JSpec.currentSuite.addHook('before', body)
- },
-
- after : function(body) {
- return JSpec.currentSuite.addHook('after', body)
- },
-
- before_each : function(body) {
- return JSpec.currentSuite.addHook('before_each', body)
- },
-
- after_each : function(body) {
- return JSpec.currentSuite.addHook('after_each', body)
- },
-
- should_behave_like : function(description) {
- return JSpec.shareBehaviorsOf(description)
- }
- }
- },
-
- // --- Methods
-
- /**
- * Check if _value_ is 'stop'. For use as a
- * utility callback function.
- *
- * @param {mixed} value
- * @return {bool}
- * @api public
- */
-
- haveStopped : function(value) {
- return value === 'stop'
- },
-
- /**
- * Include _object_ which may be a hash or Module instance.
- *
- * @param {hash, Module} object
- * @return {JSpec}
- * @api public
- */
-
- include : function(object) {
- var module = object.constructor == JSpec.Module ? object : new JSpec.Module(object)
- this.modules.push(module)
- if ('init' in module) module.init()
- if ('utilities' in module) extend(this.defaultContext, module.utilities)
- if ('matchers' in module) this.addMatchers(module.matchers)
- if ('reporters' in module) extend(this.reporters, module.reporters)
- if ('DSLs' in module)
- each(module.DSLs, function(name, methods){
- JSpec.DSLs[name] = JSpec.DSLs[name] || {}
- extend(JSpec.DSLs[name], methods)
- })
- return this
- },
-
- /**
- * Add a module hook _name_, which is immediately
- * called per module with the _args_ given. An array of
- * hook return values is returned.
- *
- * @param {name} string
- * @param {...} args
- * @return {array}
- * @api private
- */
-
- hook : function(name, args) {
- args = toArray(arguments, 1)
- return inject(JSpec.modules, [], function(results, module){
- if (typeof module[name] == 'function')
- results.push(JSpec.evalHook(module, name, args))
- })
- },
-
- /**
- * Eval _module_ hook _name_ with _args_. Evaluates in context
- * to the module itself, JSpec, and JSpec.context.
- *
- * @param {Module} module
- * @param {string} name
- * @param {array} args
- * @return {mixed}
- * @api private
- */
-
- evalHook : function(module, name, args) {
- hook('evaluatingHookBody', module, name)
- try { return module[name].apply(module, args) }
- catch(e) { error('Error in hook ' + module.name + '.' + name + ': ', e) }
- },
-
- /**
- * Same as hook() however accepts only one _arg_ which is
- * considered immutable. This function passes the arg
- * to the first module, then passes the return value of the last
- * module called, to the following module.
- *
- * @param {string} name
- * @param {mixed} arg
- * @return {mixed}
- * @api private
- */
-
- hookImmutable : function(name, arg) {
- return inject(JSpec.modules, arg, function(result, module){
- if (typeof module[name] == 'function')
- return JSpec.evalHook(module, name, [result])
- })
- },
-
- /**
- * Find a suite by its description or name.
- *
- * @param {string} description
- * @return {Suite}
- * @api private
- */
-
- findSuite : function(description) {
- return find(this.allSuites, function(suite){
- return suite.name == description || suite.description == description
- })
- },
-
- /**
- * Share behaviors (specs) of the given suite with
- * the current suite.
- *
- * @param {string} description
- * @api public
- */
-
- shareBehaviorsOf : function(description) {
- if (suite = this.findSuite(description)) this.copySpecs(suite, this.currentSuite)
- else throw 'failed to share behaviors. ' + puts(description) + ' is not a valid Suite name'
- },
-
- /**
- * Copy specs from one suite to another.
- *
- * @param {Suite} fromSuite
- * @param {Suite} toSuite
- * @api public
- */
-
- copySpecs : function(fromSuite, toSuite) {
- each(fromSuite.specs, function(spec){
- var newSpec = new Object();
- extend(newSpec, spec);
- newSpec.assertions = [];
- toSuite.specs.push(newSpec);
- })
- },
-
- /**
- * Convert arguments to an array.
- *
- * @param {object} arguments
- * @param {int} offset
- * @return {array}
- * @api public
- */
-
- toArray : function(arguments, offset) {
- return Array.prototype.slice.call(arguments, offset || 0)
- },
-
- /**
- * Return ANSI-escaped colored string.
- *
- * @param {string} string
- * @param {string} color
- * @return {string}
- * @api public
- */
-
- color : function(string, color) {
- return "\u001B[" + {
- bold : 1,
- black : 30,
- red : 31,
- green : 32,
- yellow : 33,
- blue : 34,
- magenta : 35,
- cyan : 36,
- white : 37
- }[color] + 'm' + string + "\u001B[0m"
- },
-
- /**
- * Default matcher message callback.
- *
- * @api private
- */
-
- defaultMatcherMessage : function(actual, expected, negate, name) {
- return 'expected ' + puts(actual) + ' to ' +
- (negate ? 'not ' : '') +
- name.replace(/_/g, ' ') +
- ' ' + (expected.length > 1 ?
- puts.apply(this, expected.slice(1)) :
- '')
- },
-
- /**
- * Normalize a matcher message.
- *
- * When no messge callback is present the defaultMatcherMessage
- * will be assigned, will suffice for most matchers.
- *
- * @param {hash} matcher
- * @return {hash}
- * @api public
- */
-
- normalizeMatcherMessage : function(matcher) {
- if (typeof matcher.message != 'function')
- matcher.message = this.defaultMatcherMessage
- return matcher
- },
-
- /**
- * Normalize a matcher body
- *
- * This process allows the following conversions until
- * the matcher is in its final normalized hash state.
- *
- * - '==' becomes 'actual == expected'
- * - 'actual == expected' becomes 'return actual == expected'
- * - function(actual, expected) { return actual == expected } becomes
- * { match : function(actual, expected) { return actual == expected }}
- *
- * @param {mixed} body
- * @return {hash}
- * @api public
- */
-
- normalizeMatcherBody : function(body) {
- switch (body.constructor) {
- case String:
- if (captures = body.match(/^alias (\w+)/)) return JSpec.matchers[last(captures)]
- if (body.length < 4) body = 'actual ' + body + ' expected'
- return { match: function(actual, expected) { return eval(body) }}
-
- case Function:
- return { match: body }
-
- default:
- return body
- }
- },
-
- /**
- * Get option value. This method first checks if
- * the option key has been set via the query string,
- * otherwise returning the options hash value.
- *
- * @param {string} key
- * @return {mixed}
- * @api public
- */
-
- option : function(key) {
- return (value = query(key)) !== null ? value :
- JSpec.options[key] || null
- },
-
- /**
- * Check if object _a_, is equal to object _b_.
- *
- * @param {object} a
- * @param {object} b
- * @return {bool}
- * @api private
- */
-
- equal: function(a, b) {
- if (typeof a != typeof b) return
- if (a === b) return true
- if (a instanceof RegExp)
- return a.toString() === b.toString()
- if (a instanceof Date)
- return Number(a) === Number(b)
- if (typeof a != 'object') return
- if (a.length !== undefined)
- if (a.length !== b.length) return
- else
- for (var i = 0, len = a.length; i < len; ++i)
- if (!equal(a[i], b[i]))
- return
- for (var key in a)
- if (!equal(a[key], b[key]))
- return
- return true
- },
-
- /**
- * Return last element of an array.
- *
- * @param {array} array
- * @return {object}
- * @api public
- */
-
- last : function(array) {
- return array[array.length - 1]
- },
-
- /**
- * Convert object(s) to a print-friend string.
- *
- * @param {...} object
- * @return {string}
- * @api public
- */
-
- puts : function(object) {
- if (arguments.length > 1)
- return map(toArray(arguments), function(arg){
- return puts(arg)
- }).join(', ')
- if (object === undefined) return 'undefined'
- if (object === null) return 'null'
- if (object === true) return 'true'
- if (object === false) return 'false'
- if (object.an_instance_of) return 'an instance of ' + object.an_instance_of.name
- if (object.jquery && object.selector.length > 0) return 'selector ' + puts(object.selector)
- if (object.jquery) return object.get(0).outerHTML
- if (object.nodeName) return object.outerHTML
- switch (object.constructor) {
- case Function: return object.name || object
- case String:
- return '"' + object
- .replace(/"/g, '\\"')
- .replace(/\n/g, '\\n')
- .replace(/\t/g, '\\t')
- + '"'
- case Array:
- return inject(object, '[', function(b, v){
- return b + ', ' + puts(v)
- }).replace('[,', '[') + ' ]'
- case Object:
- object.__hit__ = true
- return inject(object, '{', function(b, k, v) {
- if (k == '__hit__') return b
- return b + ', ' + k + ': ' + (v && v.__hit__ ? '<circular reference>' : puts(v))
- }).replace('{,', '{') + ' }'
- default:
- return object.toString()
- }
- },
-
- /**
- * Escape HTML.
- *
- * @param {string} html
- * @return {string}
- * @api public
- */
-
- escape : function(html) {
- return html.toString()
- .replace(/&/gmi, '&amp;')
- .replace(/"/gmi, '&quot;')
- .replace(/>/gmi, '&gt;')
- .replace(/</gmi, '&lt;')
- },
-
- /**
- * Perform an assertion without reporting.
- *
- * This method is primarily used for internal
- * matchers in order retain DRYness. May be invoked
- * like below:
- *
- * does('foo', 'eql', 'foo')
- * does([1,2], 'include', 1, 2)
- *
- * External hooks are not run for internal assertions
- * performed by does().
- *
- * @param {mixed} actual
- * @param {string} matcher
- * @param {...} expected
- * @return {mixed}
- * @api private
- */
-
- does : function(actual, matcher, expected) {
- var assertion = new JSpec.Assertion(JSpec.matchers[matcher], actual, toArray(arguments, 2))
- return assertion.run().result
- },
-
- /**
- * Perform an assertion.
- *
- * expect(true).to('be', true)
- * expect('foo').not_to('include', 'bar')
- * expect([1, [2]]).to('include', 1, [2])
- *
- * @param {mixed} actual
- * @return {hash}
- * @api public
- */
-
- expect : function(actual) {
- function assert(matcher, args, negate) {
- var expected = toArray(args, 1)
- matcher.negate = negate
- assertion = new JSpec.Assertion(matcher, actual, expected, negate)
- hook('beforeAssertion', assertion)
- if (matcher.defer) assertion.run()
- else JSpec.currentSpec.assertions.push(assertion.run().report()), hook('afterAssertion', assertion)
- return assertion.result
- }
-
- function to(matcher) {
- return assert(matcher, arguments, false)
- }
-
- function not_to(matcher) {
- return assert(matcher, arguments, true)
- }
-
- return {
- to : to,
- should : to,
- not_to: not_to,
- should_not : not_to
- }
- },
-
- /**
- * Strim whitespace or chars.
- *
- * @param {string} string
- * @param {string} chars
- * @return {string}
- * @api public
- */
-
- strip : function(string, chars) {
- return string.
- replace(new RegExp('[' + (chars || '\\s') + ']*$'), '').
- replace(new RegExp('^[' + (chars || '\\s') + ']*'), '')
- },
-
- /**
- * Call an iterator callback with arguments a, or b
- * depending on the arity of the callback.
- *
- * @param {function} callback
- * @param {mixed} a
- * @param {mixed} b
- * @return {mixed}
- * @api private
- */
-
- callIterator : function(callback, a, b) {
- return callback.length == 1 ? callback(b) : callback(a, b)
- },
-
- /**
- * Extend an object with another.
- *
- * @param {object} object
- * @param {object} other
- * @api public
- */
-
- extend : function(object, other) {
- each(other, function(property, value){
- object[property] = value
- })
- },
-
- /**
- * Iterate an object, invoking the given callback.
- *
- * @param {hash, array} object
- * @param {function} callback
- * @return {JSpec}
- * @api public
- */
-
- each : function(object, callback) {
- if (object.constructor == Array)
- for (var i = 0, len = object.length; i < len; ++i)
- callIterator(callback, i, object[i])
- else
- for (var key in object)
- if (object.hasOwnProperty(key))
- callIterator(callback, key, object[key])
- },
-
- /**
- * Iterate with memo.
- *
- * @param {hash, array} object
- * @param {object} memo
- * @param {function} callback
- * @return {object}
- * @api public
- */
-
- inject : function(object, memo, callback) {
- each(object, function(key, value){
- memo = (callback.length == 2 ?
- callback(memo, value):
- callback(memo, key, value)) ||
- memo
- })
- return memo
- },
-
- /**
- * Destub _object_'s _method_. When no _method_ is passed
- * all stubbed methods are destubbed. When no arguments
- * are passed every object found in JSpec.stubbed will be
- * destubbed.
- *
- * @param {mixed} object
- * @param {string} method
- * @api public
- */
-
- destub : function(object, method) {
- if (method) {
- if (object['__prototype__' + method])
- delete object[method]
- else
- object[method] = object['__original__' + method]
- delete object['__prototype__' + method]
- delete object['__original____' + method]
- }
- else if (object) {
- for (var key in object)
- if (captures = key.match(/^(?:__prototype__|__original__)(.*)/))
- destub(object, captures[1])
- }
- else
- while (JSpec.stubbed.length)
- destub(JSpec.stubbed.shift())
- },
-
- /**
- * Stub _object_'s _method_.
- *
- * stub(foo, 'toString').and_return('bar')
- *
- * @param {mixed} object
- * @param {string} method
- * @return {hash}
- * @api public
- */
-
- stub : function(object, method) {
- hook('stubbing', object, method)
- JSpec.stubbed.push(object)
- var type = object.hasOwnProperty(method) ? '__original__' : '__prototype__'
- object[type + method] = object[method]
- object[method] = function(){}
- return {
- and_return : function(value) {
- if (typeof value == 'function') object[method] = value
- else object[method] = function(){ return value }
- }
- }
- },
-
- /**
- * Map callback return values.
- *
- * @param {hash, array} object
- * @param {function} callback
- * @return {array}
- * @api public
- */
-
- map : function(object, callback) {
- return inject(object, [], function(memo, key, value){
- memo.push(callIterator(callback, key, value))
- })
- },
-
- /**
- * Returns the first matching expression or null.
- *
- * @param {hash, array} object
- * @param {function} callback
- * @return {mixed}
- * @api public
- */
-
- any : function(object, callback) {
- return inject(object, null, function(state, key, value){
- if (state == undefined)
- return callIterator(callback, key, value) ? value : state
- })
- },
-
- /**
- * Returns an array of values collected when the callback
- * given evaluates to true.
- *
- * @param {hash, array} object
- * @return {function} callback
- * @return {array}
- * @api public
- */
-
- select : function(object, callback) {
- return inject(object, [], function(selected, key, value){
- if (callIterator(callback, key, value))
- selected.push(value)
- })
- },
-
- /**
- * Define matchers.
- *
- * @param {hash} matchers
- * @api public
- */
-
- addMatchers : function(matchers) {
- each(matchers, function(name, body){
- JSpec.addMatcher(name, body)
- })
- },
-
- /**
- * Define a matcher.
- *
- * @param {string} name
- * @param {hash, function, string} body
- * @api public
- */
-
- addMatcher : function(name, body) {
- hook('addingMatcher', name, body)
- if (name.indexOf(' ') != -1) {
- var matchers = name.split(/\s+/)
- var prefix = matchers.shift()
- each(matchers, function(name) {
- JSpec.addMatcher(prefix + '_' + name, body(name))
- })
- }
- this.matchers[name] = this.normalizeMatcherMessage(this.normalizeMatcherBody(body))
- this.matchers[name].name = name
- },
-
- /**
- * Add a root suite to JSpec.
- *
- * @param {string} description
- * @param {body} function
- * @api public
- */
-
- describe : function(description, body) {
- var suite = new JSpec.Suite(description, body)
- hook('addingSuite', suite)
- this.allSuites.push(suite)
- this.suites.push(suite)
- },
-
- /**
- * Return the contents of a function body.
- *
- * @param {function} body
- * @return {string}
- * @api public
- */
-
- contentsOf : function(body) {
- return body.toString().match(/^[^\{]*{((.*\n*)*)}/m)[1]
- },
-
- /**
- * Evaluate a JSpec capture body.
- *
- * @param {function} body
- * @param {string} errorMessage (optional)
- * @return {Type}
- * @api private
- */
-
- evalBody : function(body, errorMessage) {
- var dsl = this.DSL || this.DSLs.snake
- var matchers = this.matchers
- var context = this.context || this.defaultContext
- var contents = this.contentsOf(body)
- hook('evaluatingBody', dsl, matchers, context, contents)
- try { with (dsl){ with (context) { with (matchers) { eval(contents) }}} }
- catch(e) { error(errorMessage, e) }
- },
-
- /**
- * Pre-process a string of JSpec.
- *
- * @param {string} input
- * @return {string}
- * @api private
- */
-
- preprocess : function(input) {
- if (typeof input != 'string') return
- input = hookImmutable('preprocessing', input)
- return input.
- replace(/\t/g, ' ').
- replace(/\r\n|\n|\r/g, '\n').
- split('__END__')[0].
- replace(/([\w\.]+)\.(stub|destub)\((.*?)\)$/gm, '$2($1, $3)').
- replace(/describe\s+(.*?)$/gm, 'describe($1, function(){').
- replace(/^\s+it\s+(.*?)$/gm, ' it($1, function(){').
- replace(/^ *(before_each|after_each|before|after)(?= |\n|$)/gm, 'JSpec.currentSuite.addHook("$1", function(){').
- replace(/^\s*end(?=\s|$)/gm, '});').
- replace(/-\{/g, 'function(){').
- replace(/(\d+)\.\.(\d+)/g, function(_, a, b){ return range(a, b) }).
- replace(/\.should([_\.]not)?[_\.](\w+)(?: |;|$)(.*)$/gm, '.should$1_$2($3)').
- replace(/([\/\s]*)(.+?)\.(should(?:[_\.]not)?)[_\.](\w+)\((.*)\)\s*;?$/gm, '$1 expect($2).$3($4, $5)').
- replace(/, \)/g, ')').
- replace(/should\.not/g, 'should_not')
- },
-
- /**
- * Create a range string which can be evaluated to a native array.
- *
- * @param {int} start
- * @param {int} end
- * @return {string}
- * @api public
- */
-
- range : function(start, end) {
- var current = parseInt(start), end = parseInt(end), values = [current]
- if (end > current) while (++current <= end) values.push(current)
- else while (--current >= end) values.push(current)
- return '[' + values + ']'
- },
-
- /**
- * Report on the results.
- *
- * @api public
- */
-
- report : function() {
- this.duration = Number(new Date) - this.start
- hook('reporting', JSpec.options)
- new (JSpec.options.reporter || JSpec.reporters.DOM)(JSpec, JSpec.options)
- },
-
- /**
- * Run the spec suites. Options are merged
- * with JSpec options when present.
- *
- * @param {hash} options
- * @return {JSpec}
- * @api public
- */
-
- run : function(options) {
- if (any(hook('running'), haveStopped)) return this
- if (options) extend(this.options, options)
- this.start = Number(new Date)
- each(this.suites, function(suite) { JSpec.runSuite(suite) })
- return this
- },
-
- /**
- * Run a suite.
- *
- * @param {Suite} suite
- * @api public
- */
-
- runSuite : function(suite) {
- this.currentSuite = suite
- this.evalBody(suite.body)
- suite.ran = true
- hook('beforeSuite', suite), suite.hook('before')
- each(suite.specs, function(spec) {
- hook('beforeSpec', spec)
- suite.hook('before_each')
- JSpec.runSpec(spec)
- hook('afterSpec', spec)
- suite.hook('after_each')
- })
- if (suite.hasSuites()) {
- each(suite.suites, function(suite) {
- JSpec.runSuite(suite)
- })
- }
- hook('afterSuite', suite), suite.hook('after')
- this.stats.suitesFinished++
- },
-
- /**
- * Report a failure for the current spec.
- *
- * @param {string} message
- * @api public
- */
-
- fail : function(message) {
- JSpec.currentSpec.fail(message)
- },
-
- /**
- * Report a passing assertion for the current spec.
- *
- * @param {string} message
- * @api public
- */
-
- pass : function(message) {
- JSpec.currentSpec.pass(message)
- },
-
- /**
- * Run a spec.
- *
- * @param {Spec} spec
- * @api public
- */
-
- runSpec : function(spec) {
- this.currentSpec = spec
- try { this.evalBody(spec.body) }
- catch (e) { fail(e) }
- spec.runDeferredAssertions()
- destub()
- this.stats.specsFinished++
- this.stats.assertions += spec.assertions.length
- },
-
- /**
- * Require a dependency, with optional message.
- *
- * @param {string} dependency
- * @param {string} message (optional)
- * @return {JSpec}
- * @api public
- */
-
- requires : function(dependency, message) {
- hook('requiring', dependency, message)
- try { eval(dependency) }
- catch (e) { throw 'JSpec depends on ' + dependency + ' ' + message }
- return this
- },
-
- /**
- * Query against the current query strings keys
- * or the queryString specified.
- *
- * @param {string} key
- * @param {string} queryString
- * @return {string, null}
- * @api private
- */
-
- query : function(key, queryString) {
- var queryString = (queryString || (main.location ? main.location.search : null) || '').substring(1)
- return inject(queryString.split('&'), null, function(value, pair){
- parts = pair.split('=')
- return parts[0] == key ? parts[1].replace(/%20|\+/gmi, ' ') : value
- })
- },
-
- /**
- * Throw a JSpec related error.
- *
- * @param {string} message
- * @param {Exception} e
- * @api public
- */
-
- error : function(message, e) {
- throw (message ? message : '') + e.toString() +
- (e.line ? ' near line ' + e.line : '')
- },
-
- /**
- * Ad-hoc POST request for JSpec server usage.
- *
- * @param {string} uri
- * @param {string} data
- * @api private
- */
-
- post : function(uri, data) {
- if (any(hook('posting', uri, data), haveStopped)) return
- var request = this.xhr()
- request.open('POST', uri, false)
- request.setRequestHeader('Content-Type', 'application/json')
- request.send(JSpec.JSON.encode(data))
- },
-
- /**
- * Instantiate an XMLHttpRequest.
- *
- * Here we utilize IE's lame ActiveXObjects first which
- * allow IE access serve files via the file: protocol, otherwise
- * we then default to XMLHttpRequest.
- *
- * @return {XMLHttpRequest, ActiveXObject}
- * @api private
- */
-
- xhr : function() {
- return this.ieXhr() || new JSpec.request
- },
-
- /**
- * Return Microsoft piece of crap ActiveXObject.
- *
- * @return {ActiveXObject}
- * @api public
- */
-
- ieXhr : function() {
- function object(str) {
- try { return new ActiveXObject(str) } catch(e) {}
- }
- return object('Msxml2.XMLHTTP.6.0') ||
- object('Msxml2.XMLHTTP.3.0') ||
- object('Msxml2.XMLHTTP') ||
- object('Microsoft.XMLHTTP')
- },
-
- /**
- * Check for HTTP request support.
- *
- * @return {bool}
- * @api private
- */
-
- hasXhr : function() {
- return JSpec.request || 'ActiveXObject' in main
- },
-
- /**
- * Try loading _file_ returning the contents
- * string or null. Chain to locate / read a file.
- *
- * @param {string} file
- * @return {string}
- * @api public
- */
-
- tryLoading : function(file) {
- try { return JSpec.load(file) } catch (e) {}
- },
-
- /**
- * Load a _file_'s contents.
- *
- * @param {string} file
- * @param {function} callback
- * @return {string}
- * @api public
- */
-
- load : function(file, callback) {
- if (any(hook('loading', file), haveStopped)) return
- if ('readFile' in main)
- return readFile(file)
- else if (this.hasXhr()) {
- var request = this.xhr()
- request.open('GET', file, false)
- request.send(null)
- if (request.readyState == 4 &&
- (request.status == 0 ||
- request.status.toString().charAt(0) == 2))
- return request.responseText
- }
- else
- error("failed to load `" + file + "'")
- },
-
- /**
- * Load, pre-process, and evaluate a file.
- *
- * @param {string} file
- * @param {JSpec}
- * @api public
- */
-
- exec : function(file) {
- if (any(hook('executing', file), haveStopped)) return this
- eval('with (JSpec){' + this.preprocess(this.load(file)) + '}')
- return this
- }
- }
-
- // --- Node.js support
-
- if (typeof GLOBAL === 'object' && typeof exports === 'object')
- quit = process.exit,
- print = require('sys').puts,
- readFile = require('fs').readFileSync
-
- // --- Utility functions
-
- var main = this,
- find = JSpec.any,
- utils = 'haveStopped stub hookImmutable hook destub map any last pass fail range each option inject select \
- error escape extend puts query strip color does addMatchers callIterator toArray equal'.split(/\s+/)
- while (utils.length) eval('var ' + utils[0] + ' = JSpec.' + utils.shift())
- if (!main.setTimeout) main.setTimeout = function(callback){ callback() }
-
- // --- Matchers
-
- addMatchers({
- equal : "===",
- eql : "equal(actual, expected)",
- be : "alias equal",
- be_greater_than : ">",
- be_less_than : "<",
- be_at_least : ">=",
- be_at_most : "<=",
- be_a : "actual.constructor == expected",
- be_an : "alias be_a",
- be_an_instance_of : "actual instanceof expected",
- be_null : "actual == null",
- be_true : "actual == true",
- be_false : "actual == false",
- be_undefined : "typeof actual == 'undefined'",
- be_type : "typeof actual == expected",
- match : "typeof actual == 'string' ? actual.match(expected) : false",
- respond_to : "typeof actual[expected] == 'function'",
- have_length : "actual.length == expected",
- be_within : "actual >= expected[0] && actual <= last(expected)",
- have_length_within : "actual.length >= expected[0] && actual.length <= last(expected)",
-
- receive : { defer : true, match : function(actual, method, times) {
- proxy = new JSpec.ProxyAssertion(actual, method, times, this.negate)
- JSpec.currentSpec.assertions.push(proxy)
- return proxy
- }},
-
- be_empty : function(actual) {
- if (actual.constructor == Object && actual.length == undefined)
- for (var key in actual)
- return false;
- return !actual.length
- },
-
- include : function(actual) {
- for (state = true, i = 1; i < arguments.length; i++) {
- arg = arguments[i]
- switch (actual.constructor) {
- case String:
- case Number:
- case RegExp:
- case Function:
- state = actual.toString().indexOf(arg) !== -1
- break
-
- case Object:
- state = arg in actual
- break
-
- case Array:
- state = any(actual, function(value){ return equal(value, arg) })
- break
- }
- if (!state) return false
- }
- return true
- },
-
- throw_error : { match : function(actual, expected, message) {
- try { actual() }
- catch (e) {
- this.e = e
- var assert = function(arg) {
- switch (arg.constructor) {
- case RegExp : return arg.test(e.message || e.toString())
- case String : return arg == (e.message || e.toString())
- case Function : return e instanceof arg || e.name == arg.name
- }
- }
- return message ? assert(expected) && assert(message) :
- expected ? assert(expected) :
- true
- }
- }, message : function(actual, expected, negate) {
- // TODO: refactor when actual is not in expected [0]
- var message_for = function(i) {
- if (expected[i] == undefined) return 'exception'
- switch (expected[i].constructor) {
- case RegExp : return 'exception matching ' + puts(expected[i])
- case String : return 'exception of ' + puts(expected[i])
- case Function : return expected[i].name || 'Error'
- }
- }
- exception = message_for(1) + (expected[2] ? ' and ' + message_for(2) : '')
- return 'expected ' + exception + (negate ? ' not ' : '' ) +
- ' to be thrown, but ' + (this.e ? 'got ' + puts(this.e) : 'nothing was')
- }},
-
- have : function(actual, length, property) {
- return actual[property].length == length
- },
-
- have_at_least : function(actual, length, property) {
- return actual[property].length >= length
- },
-
- have_at_most :function(actual, length, property) {
- return actual[property].length <= length
- },
-
- have_within : function(actual, range, property) {
- length = actual[property].length
- return length >= range.shift() && length <= range.pop()
- },
-
- have_prop : function(actual, property, value) {
- return actual[property] == null ||
- actual[property] instanceof Function ? false:
- value == null ? true:
- does(actual[property], 'eql', value)
- },
-
- have_property : function(actual, property, value) {
- return actual[property] == null ||
- actual[property] instanceof Function ? false:
- value == null ? true:
- value === actual[property]
- }
- })
-
-})()
diff --git a/share/www/script/jspec/jspec.xhr.js b/share/www/script/jspec/jspec.xhr.js
deleted file mode 100644
index 616487953..000000000
--- a/share/www/script/jspec/jspec.xhr.js
+++ /dev/null
@@ -1,195 +0,0 @@
-
-// JSpec - XHR - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)
-
-(function(){
-
- var lastRequest
-
- // --- Original XMLHttpRequest
-
- var OriginalXMLHttpRequest = 'XMLHttpRequest' in this ?
- XMLHttpRequest :
- function(){}
- var OriginalActiveXObject = 'ActiveXObject' in this ?
- ActiveXObject :
- undefined
-
- // --- MockXMLHttpRequest
-
- var MockXMLHttpRequest = function() {
- this.requestHeaders = {}
- }
-
- MockXMLHttpRequest.prototype = {
- status: 0,
- async: true,
- readyState: 0,
- responseText: '',
- abort: function(){},
- onreadystatechange: function(){},
-
- /**
- * Return response headers hash.
- */
-
- getAllResponseHeaders : function(){
- return this.responseHeaders
- },
-
- /**
- * Return case-insensitive value for header _name_.
- */
-
- getResponseHeader : function(name) {
- return this.responseHeaders[name.toLowerCase()]
- },
-
- /**
- * Set case-insensitive _value_ for header _name_.
- */
-
- setRequestHeader : function(name, value) {
- this.requestHeaders[name.toLowerCase()] = value
- },
-
- /**
- * Open mock request.
- */
-
- open : function(method, url, async, user, password) {
- this.user = user
- this.password = password
- this.url = url
- this.readyState = 1
- this.method = method.toUpperCase()
- if (async != undefined) this.async = async
- if (this.async) this.onreadystatechange()
- },
-
- /**
- * Send request _data_.
- */
-
- send : function(data) {
- var self = this
- this.data = data
- this.readyState = 4
- if (this.method == 'HEAD') this.responseText = null
- this.responseHeaders['content-length'] = (this.responseText || '').length
- if(this.async) this.onreadystatechange()
- lastRequest = function(){
- return self
- }
- }
- }
-
- // --- Response status codes
-
- JSpec.statusCodes = {
- 100: 'Continue',
- 101: 'Switching Protocols',
- 200: 'OK',
- 201: 'Created',
- 202: 'Accepted',
- 203: 'Non-Authoritative Information',
- 204: 'No Content',
- 205: 'Reset Content',
- 206: 'Partial Content',
- 300: 'Multiple Choice',
- 301: 'Moved Permanently',
- 302: 'Found',
- 303: 'See Other',
- 304: 'Not Modified',
- 305: 'Use Proxy',
- 307: 'Temporary Redirect',
- 400: 'Bad Request',
- 401: 'Unauthorized',
- 402: 'Payment Required',
- 403: 'Forbidden',
- 404: 'Not Found',
- 405: 'Method Not Allowed',
- 406: 'Not Acceptable',
- 407: 'Proxy Authentication Required',
- 408: 'Request Timeout',
- 409: 'Conflict',
- 410: 'Gone',
- 411: 'Length Required',
- 412: 'Precondition Failed',
- 413: 'Request Entity Too Large',
- 414: 'Request-URI Too Long',
- 415: 'Unsupported Media Type',
- 416: 'Requested Range Not Satisfiable',
- 417: 'Expectation Failed',
- 422: 'Unprocessable Entity',
- 500: 'Internal Server Error',
- 501: 'Not Implemented',
- 502: 'Bad Gateway',
- 503: 'Service Unavailable',
- 504: 'Gateway Timeout',
- 505: 'HTTP Version Not Supported'
- }
-
- /**
- * Mock XMLHttpRequest requests.
- *
- * mockRequest().and_return('some data', 'text/plain', 200, { 'X-SomeHeader' : 'somevalue' })
- *
- * @return {hash}
- * @api public
- */
-
- function mockRequest() {
- return { and_return : function(body, type, status, headers) {
- XMLHttpRequest = MockXMLHttpRequest
- ActiveXObject = false
- status = status || 200
- headers = headers || {}
- headers['content-type'] = type
- JSpec.extend(XMLHttpRequest.prototype, {
- responseText: body,
- responseHeaders: headers,
- status: status,
- statusText: JSpec.statusCodes[status]
- })
- }}
- }
-
- /**
- * Unmock XMLHttpRequest requests.
- *
- * @api public
- */
-
- function unmockRequest() {
- XMLHttpRequest = OriginalXMLHttpRequest
- ActiveXObject = OriginalActiveXObject
- }
-
- JSpec.include({
- name: 'Mock XHR',
-
- // --- Utilities
-
- utilities : {
- mockRequest: mockRequest,
- unmockRequest: unmockRequest
- },
-
- // --- Hooks
-
- afterSpec : function() {
- unmockRequest()
- },
-
- // --- DSLs
-
- DSLs : {
- snake : {
- mock_request: mockRequest,
- unmock_request: unmockRequest,
- last_request: function(){ return lastRequest() }
- }
- }
-
- })
-})() \ No newline at end of file
diff --git a/share/www/script/oauth.js b/share/www/script/oauth.js
deleted file mode 100644
index ada00a275..000000000
--- a/share/www/script/oauth.js
+++ /dev/null
@@ -1,511 +0,0 @@
-/*
- * Copyright 2008 Netflix, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* Here's some JavaScript software for implementing OAuth.
-
- This isn't as useful as you might hope. OAuth is based around
- allowing tools and websites to talk to each other. However,
- JavaScript running in web browsers is hampered by security
- restrictions that prevent code running on one website from
- accessing data stored or served on another.
-
- Before you start hacking, make sure you understand the limitations
- posed by cross-domain XMLHttpRequest.
-
- On the bright side, some platforms use JavaScript as their
- language, but enable the programmer to access other web sites.
- Examples include Google Gadgets, and Microsoft Vista Sidebar.
- For those platforms, this library should come in handy.
-*/
-
-// The HMAC-SHA1 signature method calls b64_hmac_sha1, defined by
-// http://pajhome.org.uk/crypt/md5/sha1.js
-
-/* An OAuth message is represented as an object like this:
- {method: "GET", action: "http://server.com/path", parameters: ...}
-
- The parameters may be either a map {name: value, name2: value2}
- or an Array of name-value pairs [[name, value], [name2, value2]].
- The latter representation is more powerful: it supports parameters
- in a specific sequence, or several parameters with the same name;
- for example [["a", 1], ["b", 2], ["a", 3]].
-
- Parameter names and values are NOT percent-encoded in an object.
- They must be encoded before transmission and decoded after reception.
- For example, this message object:
- {method: "GET", action: "http://server/path", parameters: {p: "x y"}}
- ... can be transmitted as an HTTP request that begins:
- GET /path?p=x%20y HTTP/1.0
- (This isn't a valid OAuth request, since it lacks a signature etc.)
- Note that the object "x y" is transmitted as x%20y. To encode
- parameters, you can call OAuth.addToURL, OAuth.formEncode or
- OAuth.getAuthorization.
-
- This message object model harmonizes with the browser object model for
- input elements of an form, whose value property isn't percent encoded.
- The browser encodes each value before transmitting it. For example,
- see consumer.setInputs in example/consumer.js.
- */
-var OAuth; if (OAuth == null) OAuth = {};
-
-OAuth.setProperties = function setProperties(into, from) {
- if (into != null && from != null) {
- for (var key in from) {
- into[key] = from[key];
- }
- }
- return into;
-}
-
-OAuth.setProperties(OAuth, // utility functions
-{
- percentEncode: function percentEncode(s) {
- if (s == null) {
- return "";
- }
- if (s instanceof Array) {
- var e = "";
- for (var i = 0; i < s.length; ++i) {
- if (e != "") e += '&';
- e += percentEncode(s[i]);
- }
- return e;
- }
- s = encodeURIComponent(s);
- // Now replace the values which encodeURIComponent doesn't do
- // encodeURIComponent ignores: - _ . ! ~ * ' ( )
- // OAuth dictates the only ones you can ignore are: - _ . ~
- // Source: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Functions:encodeURIComponent
- s = s.replace(/\!/g, "%21");
- s = s.replace(/\*/g, "%2A");
- s = s.replace(/\'/g, "%27");
- s = s.replace(/\(/g, "%28");
- s = s.replace(/\)/g, "%29");
- return s;
- }
-,
- decodePercent: function decodePercent(s) {
- if (s != null) {
- // Handle application/x-www-form-urlencoded, which is defined by
- // http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1
- s = s.replace(/\+/g, " ");
- }
- return decodeURIComponent(s);
- }
-,
- /** Convert the given parameters to an Array of name-value pairs. */
- getParameterList: function getParameterList(parameters) {
- if (parameters == null) {
- return [];
- }
- if (typeof parameters != "object") {
- return decodeForm(parameters + "");
- }
- if (parameters instanceof Array) {
- return parameters;
- }
- var list = [];
- for (var p in parameters) {
- list.push([p, parameters[p]]);
- }
- return list;
- }
-,
- /** Convert the given parameters to a map from name to value. */
- getParameterMap: function getParameterMap(parameters) {
- if (parameters == null) {
- return {};
- }
- if (typeof parameters != "object") {
- return getParameterMap(decodeForm(parameters + ""));
- }
- if (parameters instanceof Array) {
- var map = {};
- for (var p = 0; p < parameters.length; ++p) {
- var key = parameters[p][0];
- if (map[key] === undefined) { // first value wins
- map[key] = parameters[p][1];
- }
- }
- return map;
- }
- return parameters;
- }
-,
- getParameter: function getParameter(parameters, name) {
- if (parameters instanceof Array) {
- for (var p = 0; p < parameters.length; ++p) {
- if (parameters[p][0] == name) {
- return parameters[p][1]; // first value wins
- }
- }
- } else {
- return OAuth.getParameterMap(parameters)[name];
- }
- return null;
- }
-,
- formEncode: function formEncode(parameters) {
- var form = "";
- var list = OAuth.getParameterList(parameters);
- for (var p = 0; p < list.length; ++p) {
- var value = list[p][1];
- if (value == null) value = "";
- if (form != "") form += '&';
- form += OAuth.percentEncode(list[p][0])
- +'='+ OAuth.percentEncode(value);
- }
- return form;
- }
-,
- decodeForm: function decodeForm(form) {
- var list = [];
- var nvps = form.split('&');
- for (var n = 0; n < nvps.length; ++n) {
- var nvp = nvps[n];
- if (nvp == "") {
- continue;
- }
- var equals = nvp.indexOf('=');
- var name;
- var value;
- if (equals < 0) {
- name = OAuth.decodePercent(nvp);
- value = null;
- } else {
- name = OAuth.decodePercent(nvp.substring(0, equals));
- value = OAuth.decodePercent(nvp.substring(equals + 1));
- }
- list.push([name, value]);
- }
- return list;
- }
-,
- setParameter: function setParameter(message, name, value) {
- var parameters = message.parameters;
- if (parameters instanceof Array) {
- for (var p = 0; p < parameters.length; ++p) {
- if (parameters[p][0] == name) {
- if (value === undefined) {
- parameters.splice(p, 1);
- } else {
- parameters[p][1] = value;
- value = undefined;
- }
- }
- }
- if (value !== undefined) {
- parameters.push([name, value]);
- }
- } else {
- parameters = OAuth.getParameterMap(parameters);
- parameters[name] = value;
- message.parameters = parameters;
- }
- }
-,
- setParameters: function setParameters(message, parameters) {
- var list = OAuth.getParameterList(parameters);
- for (var i = 0; i < list.length; ++i) {
- OAuth.setParameter(message, list[i][0], list[i][1]);
- }
- }
-,
- /** Fill in parameters to help construct a request message.
- This function doesn't fill in every parameter.
- The accessor object should be like:
- {consumerKey:'foo', consumerSecret:'bar', accessorSecret:'nurn', token:'krelm', tokenSecret:'blah'}
- The accessorSecret property is optional.
- */
- completeRequest: function completeRequest(message, accessor) {
- if (message.method == null) {
- message.method = "GET";
- }
- var map = OAuth.getParameterMap(message.parameters);
- if (map.oauth_consumer_key == null) {
- OAuth.setParameter(message, "oauth_consumer_key", accessor.consumerKey || "");
- }
- if (map.oauth_token == null && accessor.token != null) {
- OAuth.setParameter(message, "oauth_token", accessor.token);
- }
- if (map.oauth_version == null) {
- OAuth.setParameter(message, "oauth_version", "1.0");
- }
- if (map.oauth_timestamp == null) {
- OAuth.setParameter(message, "oauth_timestamp", OAuth.timestamp());
- }
- if (map.oauth_nonce == null) {
- OAuth.setParameter(message, "oauth_nonce", OAuth.nonce(6));
- }
- OAuth.SignatureMethod.sign(message, accessor);
- }
-,
- setTimestampAndNonce: function setTimestampAndNonce(message) {
- OAuth.setParameter(message, "oauth_timestamp", OAuth.timestamp());
- OAuth.setParameter(message, "oauth_nonce", OAuth.nonce(6));
- }
-,
- addToURL: function addToURL(url, parameters) {
- newURL = url;
- if (parameters != null) {
- var toAdd = OAuth.formEncode(parameters);
- if (toAdd.length > 0) {
- var q = url.indexOf('?');
- if (q < 0) newURL += '?';
- else newURL += '&';
- newURL += toAdd;
- }
- }
- return newURL;
- }
-,
- /** Construct the value of the Authorization header for an HTTP request. */
- getAuthorizationHeader: function getAuthorizationHeader(realm, parameters) {
- var header = 'OAuth realm="' + OAuth.percentEncode(realm) + '"';
- var list = OAuth.getParameterList(parameters);
- for (var p = 0; p < list.length; ++p) {
- var parameter = list[p];
- var name = parameter[0];
- if (name.indexOf("oauth_") == 0) {
- header += ',' + OAuth.percentEncode(name) + '="' + OAuth.percentEncode(parameter[1]) + '"';
- }
- }
- return header;
- }
-,
- timestamp: function timestamp() {
- var d = new Date();
- return Math.floor(d.getTime()/1000);
- }
-,
- nonce: function nonce(length) {
- var chars = OAuth.nonce.CHARS;
- var result = "";
- for (var i = 0; i < length; ++i) {
- var rnum = Math.floor(Math.random() * chars.length);
- result += chars.substring(rnum, rnum+1);
- }
- return result;
- }
-});
-
-OAuth.nonce.CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
-
-/** Define a constructor function,
- without causing trouble to anyone who was using it as a namespace.
- That is, if parent[name] already existed and had properties,
- copy those properties into the new constructor.
- */
-OAuth.declareClass = function declareClass(parent, name, newConstructor) {
- var previous = parent[name];
- parent[name] = newConstructor;
- if (newConstructor != null && previous != null) {
- for (var key in previous) {
- if (key != "prototype") {
- newConstructor[key] = previous[key];
- }
- }
- }
- return newConstructor;
-}
-
-/** An abstract algorithm for signing messages. */
-OAuth.declareClass(OAuth, "SignatureMethod", function OAuthSignatureMethod(){});
-
-OAuth.setProperties(OAuth.SignatureMethod.prototype, // instance members
-{
- /** Add a signature to the message. */
- sign: function sign(message) {
- var baseString = OAuth.SignatureMethod.getBaseString(message);
- var signature = this.getSignature(baseString);
- OAuth.setParameter(message, "oauth_signature", signature);
- return signature; // just in case someone's interested
- }
-,
- /** Set the key string for signing. */
- initialize: function initialize(name, accessor) {
- var consumerSecret;
- if (accessor.accessorSecret != null
- && name.length > 9
- && name.substring(name.length-9) == "-Accessor")
- {
- consumerSecret = accessor.accessorSecret;
- } else {
- consumerSecret = accessor.consumerSecret;
- }
- this.key = OAuth.percentEncode(consumerSecret)
- +"&"+ OAuth.percentEncode(accessor.tokenSecret);
- }
-});
-
-/* SignatureMethod expects an accessor object to be like this:
- {tokenSecret: "lakjsdflkj...", consumerSecret: "QOUEWRI..", accessorSecret: "xcmvzc..."}
- The accessorSecret property is optional.
- */
-// Class members:
-OAuth.setProperties(OAuth.SignatureMethod, // class members
-{
- sign: function sign(message, accessor) {
- var name = OAuth.getParameterMap(message.parameters).oauth_signature_method;
- if (name == null || name == "") {
- name = "HMAC-SHA1";
- OAuth.setParameter(message, "oauth_signature_method", name);
- }
- OAuth.SignatureMethod.newMethod(name, accessor).sign(message);
- }
-,
- /** Instantiate a SignatureMethod for the given method name. */
- newMethod: function newMethod(name, accessor) {
- var impl = OAuth.SignatureMethod.REGISTERED[name];
- if (impl != null) {
- var method = new impl();
- method.initialize(name, accessor);
- return method;
- }
- var err = new Error("signature_method_rejected");
- var acceptable = "";
- for (var r in OAuth.SignatureMethod.REGISTERED) {
- if (acceptable != "") acceptable += '&';
- acceptable += OAuth.percentEncode(r);
- }
- err.oauth_acceptable_signature_methods = acceptable;
- throw err;
- }
-,
- /** A map from signature method name to constructor. */
- REGISTERED : {}
-,
- /** Subsequently, the given constructor will be used for the named methods.
- The constructor will be called with no parameters.
- The resulting object should usually implement getSignature(baseString).
- You can easily define such a constructor by calling makeSubclass, below.
- */
- registerMethodClass: function registerMethodClass(names, classConstructor) {
- for (var n = 0; n < names.length; ++n) {
- OAuth.SignatureMethod.REGISTERED[names[n]] = classConstructor;
- }
- }
-,
- /** Create a subclass of OAuth.SignatureMethod, with the given getSignature function. */
- makeSubclass: function makeSubclass(getSignatureFunction) {
- var superClass = OAuth.SignatureMethod;
- var subClass = function() {
- superClass.call(this);
- };
- subClass.prototype = new superClass();
- // Delete instance variables from prototype:
- // delete subclass.prototype... There aren't any.
- subClass.prototype.getSignature = getSignatureFunction;
- subClass.prototype.constructor = subClass;
- return subClass;
- }
-,
- getBaseString: function getBaseString(message) {
- var URL = message.action;
- var q = URL.indexOf('?');
- var parameters;
- if (q < 0) {
- parameters = message.parameters;
- } else {
- // Combine the URL query string with the other parameters:
- parameters = OAuth.decodeForm(URL.substring(q + 1));
- var toAdd = OAuth.getParameterList(message.parameters);
- for (var a = 0; a < toAdd.length; ++a) {
- parameters.push(toAdd[a]);
- }
- }
- return OAuth.percentEncode(message.method.toUpperCase())
- +'&'+ OAuth.percentEncode(OAuth.SignatureMethod.normalizeUrl(URL))
- +'&'+ OAuth.percentEncode(OAuth.SignatureMethod.normalizeParameters(parameters));
- }
-,
- normalizeUrl: function normalizeUrl(url) {
- var uri = OAuth.SignatureMethod.parseUri(url);
- var scheme = uri.protocol.toLowerCase();
- var authority = uri.authority.toLowerCase();
- var dropPort = (scheme == "http" && uri.port == 80)
- || (scheme == "https" && uri.port == 443);
- if (dropPort) {
- // find the last : in the authority
- var index = authority.lastIndexOf(":");
- if (index >= 0) {
- authority = authority.substring(0, index);
- }
- }
- var path = uri.path;
- if (!path) {
- path = "/"; // conforms to RFC 2616 section 3.2.2
- }
- // we know that there is no query and no fragment here.
- return scheme + "://" + authority + path;
- }
-,
- parseUri: function parseUri (str) {
- /* This function was adapted from parseUri 1.2.1
- http://stevenlevithan.com/demo/parseuri/js/assets/parseuri.js
- */
- var o = {key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
- parser: {strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/ }};
- var m = o.parser.strict.exec(str);
- var uri = {};
- var i = 14;
- while (i--) uri[o.key[i]] = m[i] || "";
- return uri;
- }
-,
- normalizeParameters: function normalizeParameters(parameters) {
- if (parameters == null) {
- return "";
- }
- var list = OAuth.getParameterList(parameters);
- var sortable = [];
- for (var p = 0; p < list.length; ++p) {
- var nvp = list[p];
- if (nvp[0] != "oauth_signature") {
- sortable.push([ OAuth.percentEncode(nvp[0])
- + " " // because it comes before any character that can appear in a percentEncoded string.
- + OAuth.percentEncode(nvp[1])
- , nvp]);
- }
- }
- sortable.sort(function(a,b) {
- if (a[0] < b[0]) return -1;
- if (a[0] > b[0]) return 1;
- return 0;
- });
- var sorted = [];
- for (var s = 0; s < sortable.length; ++s) {
- sorted.push(sortable[s][1]);
- }
- return OAuth.formEncode(sorted);
- }
-});
-
-OAuth.SignatureMethod.registerMethodClass(["PLAINTEXT", "PLAINTEXT-Accessor"],
- OAuth.SignatureMethod.makeSubclass(
- function getSignature(baseString) {
- return this.key;
- }
- ));
-
-OAuth.SignatureMethod.registerMethodClass(["HMAC-SHA1", "HMAC-SHA1-Accessor"],
- OAuth.SignatureMethod.makeSubclass(
- function getSignature(baseString) {
- b64pad = '=';
- var signature = b64_hmac_sha1(this.key, baseString);
- return signature;
- }
- ));
diff --git a/share/www/script/replicator_db_inc.js b/share/www/script/replicator_db_inc.js
deleted file mode 100644
index 23f858768..000000000
--- a/share/www/script/replicator_db_inc.js
+++ /dev/null
@@ -1,96 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-var replicator_db = {};
-replicator_db.wait_rep_doc = 500; // number of millisecs to wait after saving a Rep Doc
-replicator_db.dbA = new CouchDB("test_suite_rep_db_a", {"X-Couch-Full-Commit":"false"});
-replicator_db.dbB = new CouchDB("test_suite_rep_db_b", {"X-Couch-Full-Commit":"false"});
-replicator_db.repDb = new CouchDB("test_suite_rep_db", {"X-Couch-Full-Commit":"false"});
-replicator_db.usersDb = new CouchDB("test_suite_auth", {"X-Couch-Full-Commit":"false"});
-
-replicator_db.docs1 = [
- {
- _id: "foo1",
- value: 11
- },
- {
- _id: "foo2",
- value: 22
- },
- {
- _id: "foo3",
- value: 33
- }
-];
-
-replicator_db.waitForRep = function waitForSeq(repDb, repDoc, state) {
- var newRep,
- t0 = new Date(),
- t1,
- ms = 3000;
-
- do {
- newRep = repDb.open(repDoc._id);
- t1 = new Date();
- } while (((t1 - t0) <= ms) && newRep._replication_state !== state);
-}
-
-replicator_db.waitForSeq = function waitForSeq(sourceDb, targetDb) {
- var targetSeq,
- sourceSeq = sourceDb.info().update_seq,
- t0 = new Date(),
- t1,
- ms = 3000;
-
- do {
- targetSeq = targetDb.info().update_seq;
- t1 = new Date();
- } while (((t1 - t0) <= ms) && targetSeq < sourceSeq);
-}
-
-replicator_db.waitForDocPos = function waitForDocPos(db, docId, pos) {
- var doc, curPos, t0, t1,
- maxWait = 3000;
-
- doc = db.open(docId);
- curPos = Number(doc._rev.split("-", 1));
- t0 = t1 = new Date();
-
- while ((curPos < pos) && ((t1 - t0) <= maxWait)) {
- doc = db.open(docId);
- curPos = Number(doc._rev.split("-", 1));
- t1 = new Date();
- }
-
- return doc;
-}
-
-replicator_db.wait = function wait(ms) {
- var t0 = new Date(), t1;
- do {
- CouchDB.request("GET", "/");
- t1 = new Date();
- } while ((t1 - t0) <= ms);
-}
-
-
-replicator_db.populate_db = function populate_db(db, docs) {
- if (db.name !== replicator_db.usersDb.name) {
- db.deleteDb();
- db.createDb();
- }
- for (var i = 0; i < docs.length; i++) {
- var d = docs[i];
- delete d._rev;
- T(db.save(d).ok);
- }
-} \ No newline at end of file
diff --git a/share/www/script/sha1.js b/share/www/script/sha1.js
deleted file mode 100644
index ee73a6341..000000000
--- a/share/www/script/sha1.js
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
- * in FIPS PUB 180-1
- * Version 2.1a Copyright Paul Johnston 2000 - 2002.
- * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
- * Distributed under the BSD License
- * See http://pajhome.org.uk/crypt/md5 for details.
- */
-
-/*
- * Configurable variables. You may need to tweak these to be compatible with
- * the server-side, but the defaults work in most cases.
- */
-var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
-var b64pad = "="; /* base-64 pad character. "=" for strict RFC compliance */
-var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */
-
-/*
- * These are the functions you'll usually want to call
- * They take string arguments and return either hex or base-64 encoded strings
- */
-function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));}
-function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length * chrsz));}
-function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length * chrsz));}
-function hex_hmac_sha1(key, data){ return binb2hex(core_hmac_sha1(key, data));}
-function b64_hmac_sha1(key, data){ return binb2b64(core_hmac_sha1(key, data));}
-function str_hmac_sha1(key, data){ return binb2str(core_hmac_sha1(key, data));}
-
-/*
- * Perform a simple self-test to see if the VM is working
- */
-function sha1_vm_test()
-{
- return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d";
-}
-
-/*
- * Calculate the SHA-1 of an array of big-endian words, and a bit length
- */
-function core_sha1(x, len)
-{
- /* append padding */
- x[len >> 5] |= 0x80 << (24 - len % 32);
- x[((len + 64 >> 9) << 4) + 15] = len;
-
- var w = Array(80);
- var a = 1732584193;
- var b = -271733879;
- var c = -1732584194;
- var d = 271733878;
- var e = -1009589776;
-
- for(var i = 0; i < x.length; i += 16)
- {
- var olda = a;
- var oldb = b;
- var oldc = c;
- var oldd = d;
- var olde = e;
-
- for(var j = 0; j < 80; j++)
- {
- if(j < 16) w[j] = x[i + j];
- else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);
- var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)),
- safe_add(safe_add(e, w[j]), sha1_kt(j)));
- e = d;
- d = c;
- c = rol(b, 30);
- b = a;
- a = t;
- }
-
- a = safe_add(a, olda);
- b = safe_add(b, oldb);
- c = safe_add(c, oldc);
- d = safe_add(d, oldd);
- e = safe_add(e, olde);
- }
- return Array(a, b, c, d, e);
-
-}
-
-/*
- * Perform the appropriate triplet combination function for the current
- * iteration
- */
-function sha1_ft(t, b, c, d)
-{
- if(t < 20) return (b & c) | ((~b) & d);
- if(t < 40) return b ^ c ^ d;
- if(t < 60) return (b & c) | (b & d) | (c & d);
- return b ^ c ^ d;
-}
-
-/*
- * Determine the appropriate additive constant for the current iteration
- */
-function sha1_kt(t)
-{
- return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 :
- (t < 60) ? -1894007588 : -899497514;
-}
-
-/*
- * Calculate the HMAC-SHA1 of a key and some data
- */
-function core_hmac_sha1(key, data)
-{
- var bkey = str2binb(key);
- if(bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz);
-
- var ipad = Array(16), opad = Array(16);
- for(var i = 0; i < 16; i++)
- {
- ipad[i] = bkey[i] ^ 0x36363636;
- opad[i] = bkey[i] ^ 0x5C5C5C5C;
- }
-
- var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz);
- return core_sha1(opad.concat(hash), 512 + 160);
-}
-
-/*
- * Add integers, wrapping at 2^32. This uses 16-bit operations internally
- * to work around bugs in some JS interpreters.
- */
-function safe_add(x, y)
-{
- var lsw = (x & 0xFFFF) + (y & 0xFFFF);
- var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
- return (msw << 16) | (lsw & 0xFFFF);
-}
-
-/*
- * Bitwise rotate a 32-bit number to the left.
- */
-function rol(num, cnt)
-{
- return (num << cnt) | (num >>> (32 - cnt));
-}
-
-/*
- * Convert an 8-bit or 16-bit string to an array of big-endian words
- * In 8-bit function, characters >255 have their hi-byte silently ignored.
- */
-function str2binb(str)
-{
- var bin = Array();
- var mask = (1 << chrsz) - 1;
- for(var i = 0; i < str.length * chrsz; i += chrsz)
- bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - i%32);
- return bin;
-}
-
-/*
- * Convert an array of big-endian words to a string
- */
-function binb2str(bin)
-{
- var str = "";
- var mask = (1 << chrsz) - 1;
- for(var i = 0; i < bin.length * 32; i += chrsz)
- str += String.fromCharCode((bin[i>>5] >>> (32 - chrsz - i%32)) & mask);
- return str;
-}
-
-/*
- * Convert an array of big-endian words to a hex string.
- */
-function binb2hex(binarray)
-{
- var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
- var str = "";
- for(var i = 0; i < binarray.length * 4; i++)
- {
- str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) +
- hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF);
- }
- return str;
-}
-
-/*
- * Convert an array of big-endian words to a base-64 string
- */
-function binb2b64(binarray)
-{
- var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
- var str = "";
- for(var i = 0; i < binarray.length * 4; i += 3)
- {
- var triplet = (((binarray[i >> 2] >> 8 * (3 - i %4)) & 0xFF) << 16)
- | (((binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 )
- | ((binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF);
- for(var j = 0; j < 4; j++)
- {
- if(i * 8 + j * 6 > binarray.length * 32) str += b64pad;
- else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
- }
- }
- return str;
-}
diff --git a/share/www/session.html b/share/www/session.html
deleted file mode 100644
index 922f738b8..000000000
--- a/share/www/session.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!DOCTYPE html>
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<html lang="en">
- <head>
- <title>Session</title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <link rel="stylesheet" href="style/layout.css?0.11.0" type="text/css">
- <script src="script/json2.js"></script>
- <script src="script/sha1.js"></script>
- <script src="script/jquery.js"></script>
- <script src="script/jquery.couch.js"></script>
- <script src="script/jquery.dialog.js"></script>
- <script src="script/futon.js"></script>
- <script src="script/futon.browse.js"></script>
- <script src="script/futon.format.js"></script>
- <script>
- $(function() {
- var ret, reason, q = window.location.search, qps = q.split("&");
- $.map(qps, function(qp) {
- var m = qp.match(/return=(.*)/);
- if (m) {
- ret = decodeURIComponent(m[1]);
- }
- m = qp.match(/reason=(.*)/);
- if (m) {
- reason = $.futon.escape(decodeURIComponent(m[1]));
- }
- });
- if (reason) {
- $("#aboutSession").append('<p>The application says: <em>'+reason+'</em></p>');
- }
- if (ret) {
- $("#aboutSession").append($('<p>Once you are logged in, click this link to return to your application: </p>').append($("<a></a>").attr("href", ret).text(ret)));
- // todo this needs to look different if you are already logged in
- // a note about you are logged in but you can't access this
- }
- // do the sidebar but in the middle without the sidebar
- $.futon.storage.set("sidebar", "hidden");
- setTimeout(function() {
- var ctx = $$("#userCtx").userCtx;
- $.futon.storage.set("sidebar", "show");
- if (ctx && ctx.name) {
- $("#aboutSession").append("<p>It looks like you are logged in, maybe you don't have access to that url.</p>");
- }
- },100);
- });
- </script>
- </head>
- <body>
- <div id="wrap">
- <h1><a href="index.html">Overview</a>
- <strong>Session</strong></h1>
- <div id="content">
- <h2>Establish or Modify Your Session</h2>
- <div id="loginSignup">
- <div id="aboutSession"></div>
- <span id="userCtx">
- <span class="loggedout">
- <a href="#" class="signup">Signup</a> or <a href="#" class="login">Login</a>
- </span>
- <span class="loggedin">
- Welcome <a class="name">?</a>!
- <br/>
- <a href="#" class="logout">Logout</a>
- </span>
- <span class="loggedinadmin">
- Welcome <a class="name">?</a>!
- <br/>
- <a href="#" class="createadmin">Setup more admins</a> or
- <a href="#" class="logout">Logout</a>
- </span>
- <span class="adminparty">
- Welcome to Admin Party!
- <br/>
- Everyone is admin. <a href="#" class="createadmin">Fix this</a>
- </span>
- </span>
- </div>
- </div>
-
- </div>
- </body>
-</html>
diff --git a/share/www/spec/couch_js_class_methods_spec.js b/share/www/spec/couch_js_class_methods_spec.js
deleted file mode 100644
index fc8db36fd..000000000
--- a/share/www/spec/couch_js_class_methods_spec.js
+++ /dev/null
@@ -1,401 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Specs for couch.js lines 313-470
-
-describe 'CouchDB class'
- describe 'session stuff'
- before
- useTestUserDb();
- end
-
- after
- useOldUserDb();
- end
-
- before_each
- userDoc = users_db.save(CouchDB.prepareUserDoc({name: "Gaius Baltar", roles: ["president"]}, "secretpass"));
- end
-
- after_each
- users_db.deleteDoc({_id : userDoc.id, _rev : userDoc.rev})
- end
-
- describe '.login'
- it 'should return ok true'
- CouchDB.login("Gaius Baltar", "secretpass").ok.should.be_true
- end
-
- it 'should return the name of the logged in user'
- CouchDB.login("Gaius Baltar", "secretpass").name.should.eql "Gaius Baltar"
- end
-
- it 'should return the roles of the logged in user'
- CouchDB.login("Gaius Baltar", "secretpass").roles.should.eql ["president"]
- end
-
- it 'should post _session'
- CouchDB.should.receive("request", "once").with_args("POST", "/_session")
- CouchDB.login("Gaius Baltar", "secretpass");
- end
-
- it 'should create a session'
- CouchDB.login("Gaius Baltar", "secretpass");
- CouchDB.session().userCtx.name.should.eql "Gaius Baltar"
- end
- end
-
- describe '.logout'
- before_each
- CouchDB.login("Gaius Baltar", "secretpass");
- end
-
- it 'should return ok true'
- CouchDB.logout().ok.should.be_true
- end
-
- it 'should delete _session'
- CouchDB.should.receive("request", "once").with_args("DELETE", "/_session")
- CouchDB.logout();
- end
-
- it 'should result in an invalid session'
- CouchDB.logout();
- CouchDB.session().name.should.be_null
- end
- end
-
- describe '.session'
- before_each
- CouchDB.login("Gaius Baltar", "secretpass");
- end
-
- it 'should return ok true'
- CouchDB.session().ok.should.be_true
- end
-
- it 'should return the users name'
- CouchDB.session().userCtx.name.should.eql "Gaius Baltar"
- end
-
- it 'should return the users roles'
- CouchDB.session().userCtx.roles.should.eql ["president"]
- end
-
- it 'should return the name of the authentication db'
- CouchDB.session().info.authentication_db.should.eql "spec_users_db"
- end
-
- it 'should return the active authentication handler'
- CouchDB.session().info.authenticated.should.eql "cookie"
- end
- end
- end
-
- describe 'db stuff'
- before_each
- db = new CouchDB("spec_db", {"X-Couch-Full-Commit":"false"});
- db.createDb();
- end
-
- after_each
- db.deleteDb();
- end
-
- describe '.prepareUserDoc'
- before_each
- userDoc = CouchDB.prepareUserDoc({name: "Laura Roslin"}, "secretpass");
- end
-
- it 'should return the users name'
- userDoc.name.should.eql "Laura Roslin"
- end
-
- it 'should prefix the id with the CouchDB user_prefix'
- userDoc._id.should.eql "org.couchdb.user:Laura Roslin"
- end
-
- it 'should return the users roles'
- var userDocWithRoles = CouchDB.prepareUserDoc({name: "William Adama", roles: ["admiral", "commander"]}, "secretpass")
- userDocWithRoles.roles.should.eql ["admiral", "commander"]
- end
-
- it 'should return the hashed password'
- userDoc.password_sha.length.should.be_at_least 30
- userDoc.password_sha.should.be_a String
- end
- end
-
- describe '.allDbs'
- it 'should get _all_dbs'
- CouchDB.should.receive("request", "once").with_args("GET", "/_all_dbs");
- CouchDB.allDbs();
- end
-
- it 'should return an array that includes a created database'
- temp_db = new CouchDB("temp_spec_db", {"X-Couch-Full-Commit":"false"});
- temp_db.createDb();
- CouchDB.allDbs().should.include("temp_spec_db");
- temp_db.deleteDb();
- end
-
- it 'should return an array that does not include a database that does not exist'
- CouchDB.allDbs().should.not.include("not_existing_temp_spec_db");
- end
- end
-
- describe '.allDesignDocs'
- it 'should return the total number of documents'
- CouchDB.allDesignDocs().spec_db.total_rows.should.eql 0
- db.save({'type':'battlestar', 'name':'galactica'});
- CouchDB.allDesignDocs().spec_db.total_rows.should.eql 1
- end
-
- it 'should return undefined when the db does not exist'
- CouchDB.allDesignDocs().non_existing_db.should.be_undefined
- end
-
- it 'should return no documents when there are no design documents'
- CouchDB.allDesignDocs().spec_db.rows.should.eql []
- end
-
- it 'should return all design documents'
- var designDoc = {
- "views" : {
- "people" : {
- "map" : "function(doc) { emit(doc._id, doc); }"
- }
- },
- "_id" : "_design/spec_db"
- };
- db.save(designDoc);
-
- var allDesignDocs = CouchDB.allDesignDocs();
- allDesignDocs.spec_db.rows[0].id.should.eql "_design/spec_db"
- allDesignDocs.spec_db.rows[0].key.should.eql "_design/spec_db"
- allDesignDocs.spec_db.rows[0].value.rev.length.should.be_at_least 30
- end
- end
-
- describe '.getVersion'
- it 'should get the CouchDB version'
- CouchDB.should.receive("request", "once").with_args("GET", "/")
- CouchDB.getVersion();
- end
-
- it 'should return the CouchDB version'
- CouchDB.getVersion().should_match /^\d\d?\.\d\d?\.\d\d?.*/
- end
- end
-
- describe '.replicate'
- before_each
- db2 = new CouchDB("spec_db_2", {"X-Couch-Full-Commit":"false"});
- db2.createDb();
- host = window.location.protocol + "//" + window.location.host ;
- end
-
- after_each
- db2.deleteDb();
- end
-
- it 'should return no_changes true when there are no changes between the dbs'
- CouchDB.replicate(host + db.uri, host + db2.uri).no_changes.should.be_true
- end
-
- it 'should return the session ID'
- db.save({'type':'battlestar', 'name':'galactica'});
- CouchDB.replicate(host + db.uri, host + db2.uri).session_id.length.should.be_at_least 30
- end
-
- it 'should return source_last_seq'
- db.save({'type':'battlestar', 'name':'galactica'});
- db.save({'type':'battlestar', 'name':'pegasus'});
-
- CouchDB.replicate(host + db.uri, host + db2.uri).source_last_seq.should.eql 2
- end
-
- it 'should return the replication history'
- db.save({'type':'battlestar', 'name':'galactica'});
- db.save({'type':'battlestar', 'name':'pegasus'});
-
- var result = CouchDB.replicate(host + db.uri, host + db2.uri);
- result.history[0].docs_written.should.eql 2
- result.history[0].start_last_seq.should.eql 0
- end
-
- it 'should pass through replication options'
- db.save({'type':'battlestar', 'name':'galactica'});
- db2.deleteDb();
- -{CouchDB.replicate(host + db.uri, host + db2.uri)}.should.throw_error
- var result = CouchDB.replicate(host + db.uri, host + db2.uri, {"body" : {"create_target":true}});
-
- result.ok.should.eql true
- result.history[0].docs_written.should.eql 1
- db2.info().db_name.should.eql "spec_db_2"
- end
- end
-
- describe '.newXhr'
- it 'should return a XMLHTTPRequest'
- CouchDB.newXhr().should.have_prop 'readyState'
- CouchDB.newXhr().should.have_prop 'responseText'
- CouchDB.newXhr().should.have_prop 'status'
- end
- end
-
- describe '.request'
- it 'should return a XMLHttpRequest'
- var req = CouchDB.request("GET", '/');
- req.should.include "readyState"
- req.should.include "responseText"
- req.should.include "statusText"
- end
-
- it 'should pass through the options headers'
- var xhr = CouchDB.newXhr();
- stub(CouchDB, 'newXhr').and_return(xhr);
-
- xhr.should.receive("setRequestHeader", "once").with_args("X-Couch-Full-Commit", "true")
- CouchDB.request("GET", "/", {'headers': {"X-Couch-Full-Commit":"true"}});
- end
-
- it 'should pass through the options body'
- var xhr = CouchDB.newXhr();
- stub(CouchDB, 'newXhr').and_return(xhr);
-
- xhr.should.receive("send", "once").with_args({"body_key":"body_value"})
- CouchDB.request("GET", "/", {'body': {"body_key":"body_value"}});
- end
-
- it 'should prepend the urlPrefix to the uri'
- var oldPrefix = CouchDB.urlPrefix;
- CouchDB.urlPrefix = "/_utils";
-
- var xhr = CouchDB.newXhr();
- stub(CouchDB, 'newXhr').and_return(xhr);
-
- xhr.should.receive("open", "once").with_args("GET", "/_utils/", false)
- CouchDB.request("GET", "/", {'headers': {"X-Couch-Full-Commit":"true"}});
-
- CouchDB.urlPrefix = oldPrefix;
- end
- end
-
- describe '.requestStats'
- it 'should get the stats for specified path'
- var stats = CouchDB.requestStats(['couchdb', 'open_databases'], null);
- stats.description.should.eql 'number of open databases'
- stats.current.should.be_a Number
- end
-
- it 'should add flush true to the request when there is a test argument'
- CouchDB.should.receive("request", "once").with_args("GET", "/_stats/httpd/requests?flush=true")
- CouchDB.requestStats(['couchdb', 'httpd', 'requests'], 'test');
- end
-
- it 'should still work when there is a test argument'
- var stats = CouchDB.requestStats(['couchdb', 'httpd_status_codes', 200], 'test');
- stats.description.should.eql 'number of HTTP 200 OK responses'
- stats.sum.should.be_a Number
- end
- end
-
- describe '.newUuids'
- after_each
- CouchDB.uuids_cache = [];
- end
-
- it 'should return the specified amount of uuids'
- var uuids = CouchDB.newUuids(45);
- uuids.should.have_length 45
- end
-
- it 'should return an array with uuids'
- var uuids = CouchDB.newUuids(1);
- uuids[0].should.be_a String
- uuids[0].should.have_length 32
- end
-
- it 'should leave the uuids_cache with 100 uuids when theres no buffer size specified'
- CouchDB.newUuids(23);
- CouchDB.uuids_cache.should.have_length 100
- end
-
- it 'should leave the uuids_cache with the specified buffer size'
- CouchDB.newUuids(23, 150);
- CouchDB.uuids_cache.should.have_length 150
- end
-
- it 'should get the uuids from the uuids_cache when there are enough uuids in there'
- CouchDB.newUuids(10);
- CouchDB.newUuids(25);
- CouchDB.uuids_cache.should.have_length 75
- end
-
- it 'should create new uuids and add as many as specified to the uuids_cache when there are not enough uuids in the cache'
- CouchDB.newUuids(10);
- CouchDB.newUuids(125, 60);
- CouchDB.uuids_cache.should.have_length 160
- end
- end
-
- describe '.maybeThrowError'
- it 'should throw an error when the request has status 404'
- var req = CouchDB.request("GET", "/nonexisting_db");
- -{CouchDB.maybeThrowError(req)}.should.throw_error
- end
-
- it 'should throw an error when the request has status 412'
- var req = CouchDB.request("PUT", "/spec_db");
- -{CouchDB.maybeThrowError(req)}.should.throw_error
- end
-
- it 'should throw an error when the request has status 405'
- var req = CouchDB.request("DELETE", "/_utils");
- -{CouchDB.maybeThrowError(req)}.should.throw_error
- end
-
- it 'should throw the responseText of the request'
- var req = CouchDB.request("GET", "/nonexisting_db");
- try {
- CouchDB.maybeThrowError(req)
- } catch(e) {
- e.error.should.eql JSON.parse(req.responseText).error
- e.reason.should.eql JSON.parse(req.responseText).reason
- }
- end
-
- it 'should throw an unknown error when the responseText is invalid json'
- mock_request().and_return("invalid json...", "application/json", 404, {})
- try {
- CouchDB.maybeThrowError(CouchDB.newXhr())
- } catch(e) {
- e.error.should.eql "unknown"
- e.reason.should.eql "invalid json..."
- }
- end
- end
-
- describe '.params'
- it 'should turn a json object into a http params string'
- var params = CouchDB.params({"president":"laura", "cag":"lee"})
- params.should.eql "president=laura&cag=lee"
- end
-
- it 'should return a blank string when the object is empty'
- var params = CouchDB.params({})
- params.should.eql ""
- end
- end
- end
-end
diff --git a/share/www/spec/couch_js_instance_methods_1_spec.js b/share/www/spec/couch_js_instance_methods_1_spec.js
deleted file mode 100644
index 7f23bd2c9..000000000
--- a/share/www/spec/couch_js_instance_methods_1_spec.js
+++ /dev/null
@@ -1,311 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Specs for couch.js lines 1-130
-
-describe 'CouchDB instance'
- before_each
- db = new CouchDB("spec_db", {"X-Couch-Full-Commit":"false"});
- end
-
- describe '.request'
- before_each
- db.createDb();
- end
-
- after_each
- db.deleteDb();
- end
-
- it 'should return a XMLHttpRequest'
- var req = db.request("GET", "/spec_db");
- req.should.include "readyState"
- req.should.include "responseText"
- req.should.include "statusText"
- // in Safari a XMLHttpRequest is actually a XMLHttpRequestConstructor,
- // otherwise we could just do:
- // req.should.be_a XMLHttpRequest
- end
-
- it 'should set the options the CouchDB instance has got as httpHeaders'
- CouchDB.should.receive("request", "once").with_args("GET", "/spec_db", {headers: {"X-Couch-Full-Commit": "false"}})
- db.request("GET", "/spec_db");
- end
-
- it 'should pass through the options'
- CouchDB.should.receive("request", "once").with_args("GET", "/spec_db", {"X-Couch-Persist": "true", headers: {"X-Couch-Full-Commit": "false"}})
- db.request("GET", "/spec_db", {"X-Couch-Persist":"true"});
- end
- end
-
- describe '.createDb'
- after_each
- db.deleteDb();
- end
-
- it 'should create the db'
- db.createDb();
- db.last_req.status.should.eql 201
- end
-
- it 'should return the ok true'
- db.createDb().should.eql {"ok" : true}
- end
-
- it 'should result in a created db'
- db.createDb();
- try{
- db.createDb();
- } catch(e) {
- e.error.should.eql "file_exists"
- }
- end
-
- it 'should have create a db with update sequence 0'
- db.createDb();
- db.info().update_seq.should.eql 0
- end
- end
-
- describe '.deleteDb'
- before_each
- db.createDb();
- end
-
- it 'should delete the db'
- db.deleteDb();
- db.last_req.status.should.eql 200
- end
-
- it 'should return the responseText of the request'
- db.deleteDb().should.eql {"ok" : true}
- end
-
- it 'should result in a deleted db'
- db.deleteDb();
- db.deleteDb();
- db.last_req.status.should.eql 404
- end
- end
-
- describe 'document methods'
- before_each
- doc = {"Name" : "Kara Thrace", "Callsign" : "Starbuck"};
- db.createDb();
- end
-
- after_each
- db.deleteDb();
- end
-
- describe '.save'
- it 'should save the document'
- db.save(doc);
- db.last_req.status.should.eql 201
- end
-
- it 'should return ok true'
- db.save(doc).ok.should.be_true
- end
-
- it 'should return ID and revision of the document'
- var response = db.save(doc);
- response.id.should.be_a String
- response.id.should.have_length 32
- response.rev.should.be_a String
- response.rev.length.should.be_at_least 30
- end
-
- it 'should result in a saved document with generated ID'
- var response = db.save(doc);
- var saved_doc = db.open(response.id);
- saved_doc.Name.should.eql "Kara Thrace"
- saved_doc.Callsign.should.eql "Starbuck"
- end
-
- it 'should save the document with the specified ID'
- doc._id = "123";
- var response = db.save(doc);
- response.id.should.eql "123"
- end
-
- it 'should pass through the options'
- doc._id = "123";
- CouchDB.should.receive("request", "once").with_args("PUT", "/spec_db/123?batch=ok")
- db.save(doc, {"batch" : "ok"});
- end
- end
-
- describe '.open'
- before_each
- doc._id = "123";
- db.save(doc);
- end
-
- it 'should open the document'
- db.open("123").should.eql doc
- end
-
- it 'should return null when there is no document with the given ID'
- db.open("non_existing").should.be_null
- end
-
- it 'should pass through the options'
- CouchDB.should.receive("request", "once").with_args("GET", "/spec_db/123?revs=true")
- db.open("123", {"revs" : "true"});
- end
- end
-
- describe '.deleteDoc'
- before_each
- doc._id = "123";
- saved_doc = db.save(doc);
- delete_response = db.deleteDoc({_id : "123", _rev : saved_doc.rev});
- delete_last_req = db.last_req;
- db.open("123");
- end
-
- it 'should send a successful request'
- delete_last_req.status.should.eql 200
- end
-
- it 'should result in a deleted document'
- db.open("123").should.be_null
- end
-
- it 'should return ok true, the ID and the revision of the deleted document'
- delete_response.ok.should.be_true
- delete_response.id.should.eql "123"
- delete_response.rev.should.be_a String
- delete_response.rev.length.should.be_at_least 30
- end
-
- it 'should mark the document as deleted'
- var responseText = db.request("GET", "/spec_db/123").responseText;
- JSON.parse(responseText).should.eql {"error":"not_found","reason":"deleted"}
- end
-
- it 'should record the revision in the deleted document'
- var responseText = db.request("GET", "/spec_db/123?rev=" + delete_response.rev).responseText;
- var deleted_doc = JSON.parse(responseText);
- deleted_doc._rev.should.eql delete_response.rev
- deleted_doc._id.should.eql delete_response.id
- deleted_doc._deleted.should.be_true
- end
- end
-
- describe '.deleteDocAttachment'
- before_each
- doc._id = "123";
- doc._attachments = {
- "friend.txt" : {
- "content_type": "text\/plain",
- // base64 encoded
- "data": "TGVlIEFkYW1hIGlzIGEgZm9ybWVyIENvbG9uaWFsIEZsZWV0IFJlc2VydmUgb2ZmaWNlci4="
- }
- };
- saved_doc = db.save(doc);
- end
-
- it 'should be executed on a document with attachment'
- db.open("123")._attachments.should.include "friend.txt"
- db.open("123")._attachments["friend.txt"].stub.should.be_true
- end
-
- describe 'after delete'
- before_each
- delete_response = db.deleteDocAttachment({_id : "123", _rev : saved_doc.rev}, "friend.txt");
- db.open("123");
- end
-
- it 'should send a successful request'
- db.last_req.status.should.eql 200
- end
-
- it 'should leave the document untouched'
- db.open("123").Callsign.should.eql "Starbuck"
- end
-
- it 'should result in a deleted document attachment'
- db.open("123").should.not.include "_attachments"
- end
-
- it 'should record the revision in the document whose attachment has been deleted'
- var responseText = db.request("GET", "/spec_db/123?rev=" + delete_response.rev).responseText;
- var deleted_doc = JSON.parse(responseText);
- deleted_doc._rev.should.eql delete_response.rev
- deleted_doc._id.should.eql delete_response.id
- end
-
- it 'should return ok true, the ID and the revision of the document whose attachment has been deleted'
- delete_response.ok.should.be_true
- delete_response.id.should.eql "123"
- delete_response.should.have_property 'rev'
- end
- end
- end
-
- describe '.bulkSave'
- before_each
- doc = {"Name" : "Kara Thrace", "Callsign" : "Starbuck"};
- doc2 = {"Name" : "Karl C. Agathon", "Callsign" : "Helo"};
- doc3 = {"Name" : "Sharon Valerii", "Callsign" : "Boomer"};
- docs = [doc, doc2, doc3];
- end
-
- it 'should save the documents'
- db.bulkSave(docs);
- db.last_req.status.should.eql 201
- end
-
- it 'should return ID and revision of the documents'
- var response = db.bulkSave(docs);
- response[0].id.should.be_a String
- response[0].id.should.have_length 32
- response[0].rev.should.be_a String
- response[0].rev.length.should.be_at_least 30
- response[1].id.should.be_a String
- response[1].id.should.have_length 32
- response[1].rev.should.be_a String
- response[1].rev.length.should.be_at_least 30
- response[2].id.should.be_a String
- response[2].id.should.have_length 32
- response[2].rev.should.be_a String
- response[2].rev.length.should.be_at_least 30
- end
-
- it 'should result in saved documents'
- var response = db.bulkSave(docs);
- db.open(response[0].id).Name.should.eql "Kara Thrace"
- db.open(response[1].id).Name.should.eql "Karl C. Agathon"
- db.open(response[2].id).Name.should.eql "Sharon Valerii"
- end
-
- it 'should save the document with specified IDs'
- doc._id = "123";
- doc2._id = "456";
- docs = [doc, doc2, doc3];
- var response = db.bulkSave(docs);
- response[0].id.should.eql "123"
- response[1].id.should.eql "456"
- response[2].id.should.have_length 32
- end
-
- it 'should pass through the options'
- doc._id = "123";
- docs = [doc];
- CouchDB.should.receive("request", "once").with_args("POST", "/spec_db/_bulk_docs", {body: '{"docs":[{"Name":"Kara Thrace","Callsign":"Starbuck","_id":"123"}],"batch":"ok"}'})
- db.bulkSave(docs, {"batch" : "ok"});
- end
- end
- end
-end \ No newline at end of file
diff --git a/share/www/spec/couch_js_instance_methods_2_spec.js b/share/www/spec/couch_js_instance_methods_2_spec.js
deleted file mode 100644
index 76df6368f..000000000
--- a/share/www/spec/couch_js_instance_methods_2_spec.js
+++ /dev/null
@@ -1,246 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Specs for couch.js lines 132-199
-
-describe 'CouchDB instance'
- before_each
- db = new CouchDB("spec_db", {"X-Couch-Full-Commit":"false"});
- db.createDb();
- end
-
- after_each
- db.deleteDb();
- end
-
- describe '.ensureFullCommit'
- it 'should return ok true'
- db.ensureFullCommit().ok.should.be_true
- end
-
- it 'should return the instance start time'
- db.ensureFullCommit().instance_start_time.should.have_length 16
- end
-
- it 'should post _ensure_full_commit to the db'
- db.should.receive("request", "once").with_args("POST", "/spec_db/_ensure_full_commit")
- db.ensureFullCommit();
- end
- end
-
- describe '.query'
- before_each
- db.save({"Name" : "Cally Tyrol", "job" : "deckhand", "_id" : "789"});
- db.save({"Name" : "Felix Gaeta", "job" : "officer", "_id" : "123"});
- db.save({"Name" : "Samuel T. Anders", "job" : "pilot", "_id" : "456"});
- map_function = "function(doc) { emit(doc._id, 1); }";
- reduce_function = "function(key, values, rereduce) { return sum(values); }";
- end
-
- it 'should apply the map function'
- var result = db.query(map_function);
-
- result.rows.should.have_length 3
- result.rows[0].id.should.eql "123"
- result.rows[0].key.should.eql "123"
- result.rows[0].value.should.eql 1
- result.rows[1].id.should.eql "456"
- result.rows[1].key.should.eql "456"
- result.rows[1].value.should.eql 1
- result.rows[2].id.should.eql "789"
- result.rows[2].key.should.eql "789"
- result.rows[2].value.should.eql 1
- end
-
- it 'should apply the reduce function'
- var result = db.query(map_function, reduce_function);
-
- result.rows.should.have_length 1
- result.rows[0].key.should.be_null
- result.rows[0].value.should_eql 3
- end
-
- it 'should pass through the options'
- var result = db.query(map_function, null, {"startkey":"456"});
-
- result.rows.should.have_length 2
- result.rows[0].id.should.eql "456"
- result.rows[0].key.should.eql "456"
- result.rows[0].value.should.eql 1
- result.rows[1].id.should.eql "789"
- result.rows[1].key.should.eql "789"
- result.rows[1].value.should.eql 1
- end
-
- it 'should pass through the keys'
- var result = db.query(map_function, null, {}, ["456", "123"]);
-
- result.rows.should.have_length 2
- result.rows[0].id.should.eql "456"
- result.rows[0].key.should.eql "456"
- result.rows[0].value.should.eql 1
- result.rows[1].id.should.eql "123"
- result.rows[1].key.should.eql "123"
- result.rows[1].value.should.eql 1
- end
-
- it 'should pass through the options and the keys'
- var result = db.query(map_function, null, {"include_docs":"true"}, ["456"]);
-
- result.rows.should.have_length 1
- result.rows[0].id.should.eql "456"
- result.rows[0].key.should.eql "456"
- result.rows[0].value.should.eql 1
- result.rows[0].doc["job"].should.eql "pilot"
- result.rows[0].doc["_rev"].length.should.be_at_least 30
- end
-
- it 'should apply a view in erlang also'
- // when this test fails, read this: http://wiki.apache.org/couchdb/EnableErlangViews
- var erlang_map = 'fun({Doc}) -> ' +
- 'ID = proplists:get_value(<<"_id">>, Doc, null), ' +
- 'Emit(ID, 1) ' +
- 'end.';
- var result = db.query(erlang_map, null, null, null, "erlang");
-
- result.rows.should.have_length 3
- result.rows[0].id.should.eql "123"
- result.rows[0].key.should.eql "123"
- result.rows[0].value.should.eql 1
- result.rows[1].id.should.eql "456"
- result.rows[1].key.should.eql "456"
- result.rows[1].value.should.eql 1
- result.rows[2].id.should.eql "789"
- result.rows[2].key.should.eql "789"
- result.rows[2].value.should.eql 1
- end
- end
-
- describe '.view'
- before_each
- db.save({"Name" : "Cally Tyrol", "job" : "deckhand", "_id" : "789"});
- db.save({"Name" : "Felix Gaeta", "job" : "officer", "_id" : "123"});
- db.save({"Name" : "Samuel T. Anders", "job" : "pilot", "_id" : "456"});
- view = {
- "views" : {
- "people" : {
- "map" : "function(doc) { emit(doc._id, doc.Name); }"
- }
- },
- "_id" : "_design/spec_db"
- };
- db.save(view);
- end
-
- it 'should apply the view'
- var result = db.view('spec_db/people');
-
- result.rows.should.have_length 3
- result.rows[0].id.should.eql "123"
- result.rows[0].key.should.eql "123"
- result.rows[0].value.should.eql "Felix Gaeta"
- result.rows[1].id.should.eql "456"
- result.rows[1].key.should.eql "456"
- result.rows[1].value.should.eql "Samuel T. Anders"
- result.rows[2].id.should.eql "789"
- result.rows[2].key.should.eql "789"
- result.rows[2].value.should.eql "Cally Tyrol"
- end
-
- it 'should pass through the options'
- var result = db.view('spec_db/people', {"skip":"2"});
-
- result.rows.should.have_length 1
- result.rows[0].id.should.eql "789"
- result.rows[0].key.should.eql "789"
- result.rows[0].value.should.eql "Cally Tyrol"
- end
-
- it 'should pass through the keys'
- var result = db.view('spec_db/people', {}, ["456", "123"]);
-
- result.rows.should.have_length 2
- result.rows[0].id.should.eql "456"
- result.rows[0].key.should.eql "456"
- result.rows[0].value.should.eql "Samuel T. Anders"
- result.rows[1].id.should.eql "123"
- result.rows[1].key.should.eql "123"
- result.rows[1].value.should.eql "Felix Gaeta"
- end
-
- it 'should pass through the options and the keys'
- var result = db.view('spec_db/people', {"include_docs":"true"}, ["456"]);
-
- result.rows.should.have_length 1
- result.rows[0].id.should.eql "456"
- result.rows[0].key.should.eql "456"
- result.rows[0].value.should.eql "Samuel T. Anders"
- result.rows[0].doc["job"].should.eql "pilot"
- result.rows[0].doc["_rev"].length.should.be_at_least 30
- end
-
- it 'should return null when the view doesnt exist'
- var result = db.view('spec_db/non_existing_view');
-
- result.should.be_null
- end
- end
-
- describe '.info'
- before_each
- result = db.info();
- end
-
- it 'should return the name of the database'
- result.db_name.should.eql "spec_db"
- end
-
- it 'should return the number of documents'
- result.doc_count.should.eql 0
- end
-
- it 'should return the start time of the db instance'
- result.instance_start_time.should.have_length 16
- end
- end
-
- describe '.designInfo'
- before_each
- designDoc = {
- "views" : {
- "people" : {
- "map" : "function(doc) { emit(doc._id, doc); }"
- }
- },
- "_id" : "_design/spec_db"
- };
- db.save(designDoc);
- result = db.designInfo("_design/spec_db");
- end
-
- it 'should return the database name'
- result.name.should.eql "spec_db"
- end
-
- it 'should return a views language'
- result.view_index.language.should.eql "javascript"
- end
-
- it 'should return a views update sequence'
- result.view_index.update_seq.should.eql 0
- end
-
- it 'should return a views signature'
- result.view_index.signature.should.have_length 32
- end
- end
-end \ No newline at end of file
diff --git a/share/www/spec/couch_js_instance_methods_3_spec.js b/share/www/spec/couch_js_instance_methods_3_spec.js
deleted file mode 100644
index 4e5c99f36..000000000
--- a/share/www/spec/couch_js_instance_methods_3_spec.js
+++ /dev/null
@@ -1,215 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Specs for couch.js lines 201-265
-
-describe 'CouchDB instance'
- before_each
- db = new CouchDB("spec_db", {"X-Couch-Full-Commit":"false"});
- db.createDb();
- end
-
- after_each
- db.deleteDb();
- end
-
- describe '.allDocs'
- it 'should return no docs when there arent any'
- db.allDocs().total_rows.should.eql 0
- db.allDocs().rows.should.eql []
- end
-
- describe 'with docs'
- before_each
- db.save({"Name" : "Felix Gaeta", "_id" : "123"});
- db.save({"Name" : "Samuel T. Anders", "_id" : "456"});
- end
-
- it 'should return all docs'
- var result = db.allDocs();
-
- result.total_rows.should.eql 2
- result.rows.should.have_length 2
- result.rows[0].id.should.eql "123"
- result.rows[0].key.should.eql "123"
- result.rows[0].value.rev.length.should.be_at_least 30
- result.rows[1].id.should.eql "456"
- end
-
- it 'should pass through the options'
- var result = db.allDocs({"startkey": "123", "limit": "1"});
-
- result.rows.should.have_length 1
- result.rows[0].id.should.eql "123"
- end
-
- it 'should pass through the keys'
- var result = db.allDocs({}, ["456"]);
-
- result.rows.should.have_length 1
- result.rows[0].id.should.eql "456"
- result.rows[0].key.should.eql "456"
- result.rows[0].value.rev.length.should.be_at_least 30
- end
-
- it 'should pass through the options and the keys'
- var result = db.allDocs({"include_docs":"true"}, ["456"]);
-
- result.rows.should.have_length 1
- result.rows[0].id.should.eql "456"
- result.rows[0].key.should.eql "456"
- result.rows[0].value.rev.length.should.be_at_least 30
- result.rows[0].doc["Name"].should.eql "Samuel T. Anders"
- result.rows[0].doc["_rev"].length.should.be_at_least 30
- end
-
- end
- end
-
- describe '.designDocs'
- it 'should return nothing when there arent any design docs'
- db.save({"Name" : "Felix Gaeta", "_id" : "123"});
- db.designDocs().rows.should.eql []
- end
-
- it 'should return all design docs'
- var designDoc = {
- "views" : {
- "people" : {
- "map" : "function(doc) { emit(doc._id, doc); }"
- }
- },
- "_id" : "_design/spec_db"
- };
- db.save(designDoc);
- db.save({"Name" : "Felix Gaeta", "_id" : "123"});
-
- var result = db.designDocs();
-
- result.total_rows.should.eql 2
- result.rows.should.have_length 1
- result.rows[0].id.should.eql "_design/spec_db"
- result.rows[0].key.should.eql "_design/spec_db"
- result.rows[0].value.rev.length.should.be_at_least 30
- end
- end
-
- describe '.changes'
- it 'should return no changes when there arent any'
- db.changes().last_seq.should.eql 0
- db.changes().results.should.eql []
- end
-
- describe 'with changes'
- before_each
- db.save({"Name" : "Felix Gaeta", "_id" : "123"});
- db.save({"Name" : "Samuel T. Anders", "_id" : "456"});
- end
-
- it 'should return changes'
- var result = db.changes();
-
- result.last_seq.should.eql 2
- result.results[0].id.should.eql "123"
- result.results[0].seq.should.eql 1
- result.results[0].changes[0].rev.length.should.be_at_least 30
- result.results[1].id.should.eql "456"
- result.results[1].seq.should.eql 2
- result.results[1].changes[0].rev.length.should.be_at_least 30
- end
-
- it 'should pass through the options'
- var result = db.changes({"since":"1"});
-
- result.last_seq.should.eql 2
- result.results[0].id.should.eql "456"
- end
- end
- end
-
- describe '.compact'
- it 'should return ok true'
- db.compact().ok.should.be_true
- end
-
- it 'should post _compact to the db'
- db.should.receive("request", "once").with_args("POST", "/spec_db/_compact")
- db.compact();
- end
- end
-
- describe '.viewCleanup'
- it 'should return ok true'
- db.viewCleanup().ok.should.be_true
- end
-
- it 'should post _view_cleanup to the db'
- db.should.receive("request", "once").with_args("POST", "/spec_db/_view_cleanup")
- db.viewCleanup();
- end
- end
-
- describe '.setDbProperty'
- it 'should return ok true'
- db.setDbProperty("_revs_limit", 1500).ok.should.be_true
- end
-
- it 'should set a db property'
- db.setDbProperty("_revs_limit", 1500);
- db.getDbProperty("_revs_limit").should.eql 1500
- db.setDbProperty("_revs_limit", 1200);
- db.getDbProperty("_revs_limit").should.eql 1200
- end
- end
-
- describe '.getDbProperty'
- it 'should get a db property'
- db.setDbProperty("_revs_limit", 1200);
- db.getDbProperty("_revs_limit").should.eql 1200
- end
-
- it 'should throw an error when the property doesnt exist'
- function(){ db.getDbProperty("_doesnt_exist")}.should.throw_error
- end
- end
-
- describe '.setSecObj'
- it 'should return ok true'
- db.setSecObj({"members":{"names":["laura"],"roles":["president"]}}).ok.should.be_true
- end
-
- it 'should save a well formed object into the _security object '
- db.should.receive("request", "once").with_args("PUT", "/spec_db/_security", {body: '{"members":{"names":["laura"],"roles":["president"]}}'})
- db.setSecObj({"members": {"names" : ["laura"], "roles" : ["president"]}})
- end
-
- it 'should throw an error when the members or admins object is malformed'
- -{ db.setSecObj({"admins":["cylon"]}) }.should.throw_error
- end
-
- it 'should save any other object into the _security object'
- db.setSecObj({"something" : "anything"})
- db.getSecObj().should.eql {"something" : "anything"}
- end
- end
-
- describe '.getSecObj'
- it 'should get the security object'
- db.setSecObj({"admins" : {"names" : ["bill"], "roles" : ["admiral"]}})
- db.getSecObj().should.eql {"admins" : {"names": ["bill"], "roles": ["admiral"]}}
- end
-
- it 'should return an empty object when there is no security object'
- db.getSecObj().should.eql {}
- end
- end
-end \ No newline at end of file
diff --git a/share/www/spec/custom_helpers.js b/share/www/spec/custom_helpers.js
deleted file mode 100644
index d29ee87b6..000000000
--- a/share/www/spec/custom_helpers.js
+++ /dev/null
@@ -1,51 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-function stubAlert(){
- if(typeof(old_alert) == 'undefined'){
- old_alert = alert;
- }
- alert = function(msg){
- alert_msg = msg;
- };
-}
-
-function destubAlert(){
- alert = old_alert;
-}
-
-function errorCallback(status, error, reason){
- console.log("Unexpected " + status + " error: " + error + " - " + reason)
- throw("Unexpected " + status + " error: " + error + " - " + reason);
-}
-
-function successCallback(resp){
- console.log("No error message here unexpectedly, successful response instead.")
- throw("No error message here unexpectedly, successful response instead.");
-}
-
-function useTestUserDb(){
- users_db = new CouchDB("spec_users_db");
- var xhr = CouchDB.request("PUT", "/_config/couch_httpd_auth/authentication_db", {
- body: JSON.stringify("spec_users_db")
- });
- if(typeof(old_auth_db) == 'undefined'){
- old_auth_db = xhr.responseText.replace(/\n/,'').replace(/"/g,'');
- }
-}
-
-function useOldUserDb(){
- CouchDB.request("PUT", "/_config/couch_httpd_auth/authentication_db", {
- body: JSON.stringify(old_auth_db)
- });
- users_db.deleteDb();
-} \ No newline at end of file
diff --git a/share/www/spec/jquery_couch_js_class_methods_spec.js b/share/www/spec/jquery_couch_js_class_methods_spec.js
deleted file mode 100644
index f2df81b3e..000000000
--- a/share/www/spec/jquery_couch_js_class_methods_spec.js
+++ /dev/null
@@ -1,523 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Specs for jquery_couch.js lines 48-156 and 415-448
-
-describe 'jQuery couchdb'
- before
- stubAlert();
- end
-
- after
- destubAlert();
- end
-
- describe 'activeTasks'
- before_each
- db = $.couch.db("spec_db");
- db.create();
- end
-
- after_each
- db.drop();
- end
-
- it 'should return an empty array when there are no active tasks'
- $.couch.activeTasks({
- success: function(resp){
- resp.should.eql []
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should return an active task'
- // doing a bit of stuff here so compaction has something to do and takes a while
- var battlestar, civillian;
- db.saveDoc({"type":"Battlestar", "name":"Galactica"}, {
- success: function(resp){
- db.openDoc(resp.id, {
- success: function(resp2){
- battlestar = resp2;
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- battlestar.name = "Pegasus";
- db.saveDoc(battlestar);
-
- db.saveDoc({"type":"Civillian", "name":"Cloud 9"}, {
- success: function(resp){
- db.openDoc(resp.id, {
- success: function(resp2){
- civillian = resp2;
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- civillian.name = "Olympic Carrier";
- db.saveDoc(civillian);
- db.removeDoc(civillian);
-
- db.compact({
- ajaxStart: function(resp){
- $.couch.activeTasks({
- success: function(resp2){
- resp2[0].type.should.eql "Database Compaction"
- resp2[0].task.should.eql "spec_db"
- resp2[0].should.have_prop "status"
- resp2[0].should.include "pid"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- }
- });
- end
- end
-
- describe 'allDbs'
- it 'should return an array that includes a created database'
- temp_db = new CouchDB("temp_spec_db", {"X-Couch-Full-Commit":"false"});
- temp_db.createDb();
- $.couch.allDbs({
- success: function(resp){
- resp.should.include "temp_spec_db"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- temp_db.deleteDb();
- end
-
- it 'should return an array that does not include a database that does not exist'
- $.couch.allDbs({
- success: function(resp){
- resp.should.not.include("not_existing_temp_spec_db");
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
- end
-
- describe 'config'
- it 'should get the config settings'
- $.couch.config({
- success: function(resp){
- resp.httpd.port.should.eql window.location.port
- resp.stats.samples.should.match /\[.*\]/
- resp.native_query_servers.should.have_prop "erlang"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should get a specific config setting'
- $.couch.config({
- success: function(resp){
- parseInt(resp.max_document_size).should.be_a Number
- resp.delayed_commits.should.be_a String
- resp.database_dir.should.be_a String
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- }, "couchdb");
- end
-
- it 'should update a config setting'
- $.couch.config({
- success: function(resp){
- resp.should.eql ""
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- }, "test", "colony", "Caprica");
-
- $.couch.config({
- success: function(resp){
- resp.colony.should.eql "Caprica"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- }, "test");
-
- $.couch.config({}, "test", "colony", null);
- end
-
- it 'should delete a config setting'
- $.couch.config({}, "test", "colony", "Caprica");
-
- $.couch.config({
- success: function(resp){
- resp.should.eql "Caprica"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- }, "test", "colony", null);
-
- $.couch.config({
- success: function(resp){
- resp.should.eql {}
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- }, "test");
- end
-
- it 'should alert with an error message prefix'
- $.couch.config("asdf", "asdf", "asdf");
- alert_msg.should.match /An error occurred retrieving\/updating the server configuration/
- end
- end
-
- describe 'session'
- it 'should return information about the session'
- $.couch.session({
- success: function(resp){
- resp.info.should.have_prop 'authentication_db'
- resp.userCtx.should.include 'name'
- resp.userCtx.roles.should.be_an Array
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
- end
-
- describe 'userDb'
- it 'should return the userDb'
- var authentication_db;
- $.couch.session({
- success: function(resp){
- authentication_db = resp.info.authentication_db;
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
-
- $.couch.userDb(function(resp){
- resp.name.should.eql authentication_db
- });
- end
-
- it 'should return a db instance'
- $.couch.userDb(function(resp){
- resp.should.respond_to 'allDocs'
- resp.should.respond_to 'bulkSave'
- });
- end
- end
-
- describe 'user_db stuff'
- before
- useTestUserDb();
- end
-
- after
- useOldUserDb();
- end
-
- describe 'signup'
- it 'should return a saved user'
- $.couch.signup(
- {name: "Tom Zarek"}, "secretpass", {
- success: function(resp){
- resp.id.should.eql "org.couchdb.user:Tom Zarek"
- resp.rev.length.should.be_at_least 30
- resp.ok.should.be_true
- users_db.deleteDoc({_id : resp.id, _rev : resp.rev})
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should create a userDoc in the user db'
- $.couch.signup(
- {name: "Tom Zarek"}, "secretpass", {
- success: function(resp){
- var user = users_db.open(resp.id);
- user.name.should.eql "Tom Zarek"
- user._id.should.eql "org.couchdb.user:Tom Zarek"
- user.roles.should.eql []
- user.password_sha.length.should.be_at_least 30
- user.password_sha.should.be_a String
- users_db.deleteDoc({_id : resp.id, _rev : resp.rev})
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should create a userDoc with roles when specified'
- $.couch.signup(
- {name: "Tom Zarek", roles: ["vice_president", "activist"]}, "secretpass", {
- success: function(resp){
- var user = users_db.open(resp.id);
- user.roles.should.eql ["vice_president", "activist"]
- users_db.deleteDoc({_id : resp.id, _rev : resp.rev})
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
- end
-
- describe 'login'
- before_each
- user = {};
- $.couch.signup({name: "Tom Zarek", roles: ["vice_president", "activist"]}, "secretpass", {
- success: function(resp){
- user.id = resp.id;
- user.rev = resp.rev;
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- after_each
- users_db.deleteDoc({_id : user.id, _rev : user.rev})
- end
-
- it 'should return the logged in user'
- $.couch.login({
- name: "Tom Zarek",
- password: "secretpass",
- success: function(resp){
- resp.name.should.eql "Tom Zarek"
- resp.ok.should.be_true
- resp.roles.should.eql ["vice_president", "activist"]
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should result in a session for the logged in user'
- $.couch.login({
- name: "Tom Zarek",
- password: "secretpass"
- });
- $.couch.session({
- success: function(resp){
- resp.info.authentication_db.should.eql "spec_users_db"
- resp.userCtx.name.should.eql "Tom Zarek"
- resp.userCtx.roles.should.eql ["vice_president", "activist"]
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should return a 404 when password is wrong'
- $.couch.login({
- name: "Tom Zarek",
- password: "wrongpass",
- error: function(status, error, reason){
- status.should.eql 401
- error.should.eql "unauthorized"
- reason.should.eql "Name or password is incorrect."
- },
- success: function(resp){successCallback(resp)}
- });
- end
-
- it 'should return a 404 when the user doesnt exist in the users db'
- $.couch.login({
- name: "Number Three",
- password: "secretpass",
- error: function(status, error, reason){
- status.should.eql 401
- error.should.eql "unauthorized"
- reason.should.eql "Name or password is incorrect."
- },
- success: function(resp){successCallback(resp)}
- });
- end
-
- it 'should alert with an error message prefix'
- $.couch.login("asdf");
- alert_msg.should.match /An error occurred logging in/
- end
- end
-
- describe 'logout'
- before_each
- user = {};
- $.couch.signup({name: "Tom Zarek", roles: ["vice_president", "activist"]}, "secretpass", {
- success: function(resp){
- user.id = resp.id;
- user.rev = resp.rev;
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- $.couch.login({name: "Tom Zarek", password: "secretpass"});
- end
-
- after_each
- users_db.deleteDoc({_id : user.id, _rev : user.rev})
- end
-
- it 'should return ok true'
- $.couch.logout({
- success: function(resp){
- resp.ok.should.be_true
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should result in an empty session'
- $.couch.logout();
- $.couch.session({
- success: function(resp){
- resp.userCtx.name.should.be_null
- resp.userCtx.roles.should.not.include ["vice_president"]
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
- end
- end
-
- describe 'encodeDocId'
- it 'should return the encoded docID when it is not a design document'
- $.couch.encodeDocId("viper").should.eql(encodeURIComponent("viper"))
- end
-
- it 'should encode only the name of the design document'
- $.couch.encodeDocId("_design/raptor").should.eql("_design/" + encodeURIComponent("raptor"))
- end
-
- it 'should also work when the name of the des'
- $.couch.encodeDocId("_design/battlestar/_view/crew").should.eql("_design/" + encodeURIComponent("battlestar/_view/crew"))
- end
- end
-
- describe 'info'
- it 'should return the CouchDB version'
- $.couch.info({
- success: function(resp){
- resp.couchdb.should.eql "Welcome"
- resp.version.should_match /^\d\d?\.\d\d?\.\d\d?.*/
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
- end
-
- describe 'replicate'
- before_each
- db = $.couch.db("spec_db");
- db.create();
- db2 = $.couch.db("spec_db_2");
- db2.create();
- host = window.location.protocol + "//" + window.location.host ;
- end
-
- after_each
- db.drop();
- db2.drop();
- end
-
- it 'should return no_changes true when there are no changes between the dbs'
- $.couch.replicate(host + db.uri, host + db2.uri, {
- success: function(resp){
- resp.ok.should.be_true
- resp.no_changes.should.be_true
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should return the session ID'
- db.saveDoc({'type':'battlestar', 'name':'galactica'});
- $.couch.replicate(host + db.uri, host + db2.uri, {
- success: function(resp){
- resp.session_id.length.should.be_at_least 30
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should return source_last_seq'
- db.saveDoc({'type':'battlestar', 'name':'galactica'});
- db.saveDoc({'type':'battlestar', 'name':'pegasus'});
-
- $.couch.replicate(host + db.uri, host + db2.uri, {
- success: function(resp){
- resp.source_last_seq.should.eql 2
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should return the replication history'
- db.saveDoc({'type':'battlestar', 'name':'galactica'});
- db.saveDoc({'type':'battlestar', 'name':'pegasus'});
-
- $.couch.replicate(host + db.uri, host + db2.uri, {
- success: function(resp){
- resp.history[0].docs_written.should.eql 2
- resp.history[0].start_last_seq.should.eql 0
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should pass through replication options'
- db.saveDoc({'type':'battlestar', 'name':'galactica'});
- db2.drop();
- $.couch.replicate(host + db.uri, host + db2.uri, {
- error: function(status, error, reason){
- status.should.eql 500
- reason.should.match /db_not_found/
- },
- success: function(resp){successCallback(resp)}
- });
-
- $.couch.replicate(host + db.uri, host + db2.uri, {
- success: function(resp){
- resp.ok.should.eql true
- resp.history[0].docs_written.should.eql 1
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- }, {
- "create_target":true
- });
-
- db2.info({
- success: function(resp){
- resp.db_name.should.eql "spec_db_2"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should alert with an error message prefix'
- $.couch.replicate("asdf");
- alert_msg.should.match /Replication failed/
- end
- end
-
- describe 'newUUID'
- it 'should return a new UUID'
- var new_uuid = $.couch.newUUID(1);
- new_uuid.should.be_a String
- new_uuid.should.have_length 32
- end
-
- it 'should fill the uuidCache with the specified number minus 1'
- // we can't reach the uuidCache from here, so we mock the next request
- // to test that the next uuid is not coming from the request, but from the cache.
- $.couch.newUUID(2);
- mock_request().and_return({'uuids':['a_sample_uuid']})
- $.couch.newUUID(1).should.not.eql 'a_sample_uuid'
- $.couch.newUUID(1).should.eql 'a_sample_uuid'
- end
-
- it 'should alert with an error message prefix'
- $.couch.newUUID("asdf");
- alert_msg.should.match /Failed to retrieve UUID batch/
- end
- end
-end \ No newline at end of file
diff --git a/share/www/spec/jquery_couch_js_instance_methods_1_spec.js b/share/www/spec/jquery_couch_js_instance_methods_1_spec.js
deleted file mode 100644
index 8538c8567..000000000
--- a/share/www/spec/jquery_couch_js_instance_methods_1_spec.js
+++ /dev/null
@@ -1,202 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Specs for jquery_couch.js lines 163-209
-
-describe 'jQuery couchdb db'
- before
- stubAlert();
- end
-
- after
- destubAlert();
- end
-
- before_each
- db = $.couch.db('spec_db');
- end
-
- describe 'constructor'
- it 'should set the name'
- db.name.should.eql 'spec_db'
- end
-
- it 'should set the uri'
- db.uri.should.eql '/spec_db/'
- end
- end
-
- describe 'triggering db functions'
- before_each
- db.create();
- end
-
- after_each
- db.drop();
- end
-
- describe 'compact'
- it 'should return ok true'
- db.compact({
- success: function(resp) {
- resp.ok.should.be_true
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should trigger _compact'
- db.compact({
- success: function(resp, obj) {
- obj.url.should.eql "/spec_db/_compact"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
- end
-
- describe 'viewCleanup'
- it 'should return ok true'
- db.viewCleanup({
- success: function(resp) {
- resp.ok.should.be_true
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should trigger _view_cleanup'
- db.viewCleanup({
- success: function(resp, obj) {
- obj.url.should.eql "/spec_db/_view_cleanup"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
- end
-
- describe 'compactView'
- before_each
- var designDoc = {
- "views" : {
- "people" : {
- "map" : "function(doc) { emit(doc._id, doc); }"
- }
- },
- "_id" : "_design/myview"
- };
- db.saveDoc(designDoc);
- db.saveDoc({"Name" : "Felix Gaeta", "_id" : "123"});
- end
-
- it 'should return ok true'
- db.compactView("myview", {
- success: function(resp) {
- resp.ok.should.be_true
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should trigger _compact_view with the groupname'
- db.compactView("myview", {
- success: function(resp, obj) {
- obj.url.should.eql "/spec_db/_compact/myview"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should return raise a 404 error when the design name doesnt exist'
- db.compactView("non_existing_design_name", {
- error: function(status, error, reason){
- status.should.eql 404
- error.should.eql "not_found"
- reason.should.eql "missing"
- },
- success: function(resp){successCallback(resp)}
- });
- end
-
- it 'should alert with an error message prefix'
- db.compactView("asdf");
- alert_msg.should.match /The view could not be compacted/
- end
- end
- end
-
- describe 'create'
- after_each
- db.drop();
- end
-
- it 'should return ok true'
- db.create({
- success: function(resp) {
- resp.ok.should.be_true
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should result in a created db'
- db.create();
- db.create({
- error: function(status, error, reason){
- status.should.eql 412
- error.should.eql "file_exists"
- reason.should.eql "The database could not be created, the file already exists."
- },
- success: function(resp){successCallback(resp)}
- });
- end
-
- it 'should alert with an error message prefix'
- db.create();
- db.create();
- alert_msg.should.match /The database could not be created/
- end
- end
-
- describe 'drop'
- before_each
- db.create();
- end
-
- it 'should return ok true'
- db.drop({
- success: function(resp) {
- resp.ok.should.be_true
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should result in a deleted db'
- db.drop();
- db.drop({
- error: function(status, error, reason){
- status.should.eql 404
- error.should.eql "not_found"
- reason.should.eql "missing"
- },
- success: function(resp){successCallback(resp)}
- });
- end
-
- it 'should alert with an error message prefix'
- db.drop();
- db.drop();
- alert_msg.should.match /The database could not be deleted/
- end
- end
-end \ No newline at end of file
diff --git a/share/www/spec/jquery_couch_js_instance_methods_2_spec.js b/share/www/spec/jquery_couch_js_instance_methods_2_spec.js
deleted file mode 100644
index 8f35affa1..000000000
--- a/share/www/spec/jquery_couch_js_instance_methods_2_spec.js
+++ /dev/null
@@ -1,433 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Specs for jquery_couch.js lines 210-299
-
-describe 'jQuery couchdb db'
- before
- stubAlert();
- end
-
- after
- destubAlert();
- end
-
- before_each
- db = $.couch.db('spec_db');
- db.create();
- end
-
- after_each
- db.drop();
- end
-
- describe 'info'
- before_each
- result = {};
- db.info({
- success: function(resp) { result = resp; },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should return the name of the database'
- result.db_name.should.eql "spec_db"
- end
-
- it 'should return the number of documents'
- result.doc_count.should.eql 0
- end
-
- it 'should return the start time of the db instance'
- result.instance_start_time.should.have_length 16
- end
- end
-
- describe 'allDocs'
- it 'should return no docs when there arent any'
- db.allDocs({
- success: function(resp) {
- resp.total_rows.should.eql 0
- resp.rows.should.eql []
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- describe 'with docs'
- before_each
- db.saveDoc({"Name" : "Felix Gaeta", "_id" : "123"});
- db.saveDoc({"Name" : "Samuel T. Anders", "_id" : "456"});
- end
-
- it 'should return all docs'
- db.allDocs({
- success: function(resp) {
- resp.total_rows.should.eql 2
- resp.rows.should.have_length 2
- resp.rows[0].id.should.eql "123"
- resp.rows[0].key.should.eql "123"
- resp.rows[0].value.rev.length.should.be_at_least 30
- resp.rows[1].id.should.eql "456"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should pass through the options'
- db.allDocs({
- "startkey": "123",
- "limit": "1",
- success: function(resp) {
- resp.rows.should.have_length 1
- resp.rows[0].id.should.eql "123"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
- end
- end
-
- describe 'allDesignDocs'
- it 'should return nothing when there arent any design docs'
- db.saveDoc({"Name" : "Felix Gaeta", "_id" : "123"});
- db.allDesignDocs({
- success: function(resp) {
- resp.rows.should.eql []
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should return all design docs'
- var designDoc = {
- "views" : {
- "people" : {
- "map" : "function(doc) { emit(doc._id, doc); }"
- }
- },
- "_id" : "_design/spec_db"
- };
- db.saveDoc(designDoc);
- db.saveDoc({"Name" : "Felix Gaeta", "_id" : "123"});
-
- db.allDesignDocs({
- success: function(resp) {
- resp.total_rows.should.eql 2
- resp.rows.should.have_length 1
- resp.rows[0].id.should.eql "_design/spec_db"
- resp.rows[0].key.should.eql "_design/spec_db"
- resp.rows[0].value.rev.length.should.be_at_least 30
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
- end
-
- describe 'allApps'
- it 'should provide a custom function with appName, appPath and design document when there is an attachment with index.html'
- var designDoc = {"_id" : "_design/with_attachments"};
-
- designDoc._attachments = {
- "index.html" : {
- "content_type": "text\/html",
- // this is "<html><p>Hi, here is index!</p></html>", base64 encoded
- "data": "PGh0bWw+PHA+SGksIGhlcmUgaXMgaW5kZXghPC9wPjwvaHRtbD4="
- }
- };
- db.saveDoc(designDoc);
-
- db.allApps({
- eachApp: function(appName, appPath, ddoc) {
- appName.should.eql "with_attachments"
- appPath.should.eql "/spec_db/_design/with_attachments/index.html"
- ddoc._id.should.eql "_design/with_attachments"
- ddoc._attachments["index.html"].content_type.should.eql "text/html"
- ddoc._attachments["index.html"].length.should.eql "<html><p>Hi, here is index!</p></html>".length
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should provide a custom function with appName, appPath and design document when there is a couchapp with index file'
- var designDoc = {"_id" : "_design/with_index"};
- designDoc.couchapp = {
- "index" : "cylon"
- };
- db.saveDoc(designDoc);
-
- db.allApps({
- eachApp: function(appName, appPath, ddoc) {
- appName.should.eql "with_index"
- appPath.should.eql "/spec_db/_design/with_index/cylon"
- ddoc._id.should.eql "_design/with_index"
- ddoc.couchapp.index.should.eql "cylon"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should not call the eachApp function when there is neither index.html in _attachments nor a couchapp index file'
- var designDoc = {"_id" : "_design/nothing"};
- db.saveDoc(designDoc);
-
- var eachApp_called = false;
- db.allApps({
- eachApp: function(appName, appPath, ddoc) {
- eachApp_called = true;
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
-
- eachApp_called.should.be_false
- end
-
- it 'should alert with an error message prefix'
- db.allApps();
- alert_msg.should.match /Please provide an eachApp function for allApps()/
- end
- end
-
- describe 'openDoc'
- before_each
- doc = {"Name" : "Louanne Katraine", "Callsign" : "Kat", "_id" : "123"};
- db.saveDoc(doc);
- end
-
- it 'should open the document'
- db.openDoc("123", {
- success: function(resp){
- resp.should.eql doc
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should raise a 404 error when there is no document with the given ID'
- db.openDoc("non_existing", {
- error: function(status, error, reason){
- status.should.eql 404
- error.should.eql "not_found"
- reason.should.eql "missing"
- },
- success: function(resp){successCallback(resp)}
- });
- end
-
- it 'should pass through the options'
- doc.Name = "Sasha";
- db.saveDoc(doc);
- db.openDoc("123", {
- revs: true,
- success: function(resp){
- resp._revisions.start.should.eql 2
- resp._revisions.ids.should.have_length 2
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should alert with an error message prefix'
- db.openDoc("asdf");
- alert_msg.should.match /The document could not be retrieved/
- end
- end
-
- describe 'saveDoc'
- before_each
- doc = {"Name" : "Kara Thrace", "Callsign" : "Starbuck"};
- end
-
- it 'should save the document'
- db.saveDoc(doc, {
- success: function(resp, status){
- status.should.eql 201
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should return ok true'
- db.saveDoc(doc, {
- success: function(resp, status){
- resp.ok.should.be_true
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should return ID and revision of the document'
- db.saveDoc(doc, {
- success: function(resp, status){
- resp.id.should.be_a String
- resp.id.should.have_length 32
- resp.rev.should.be_a String
- resp.rev.length.should.be_at_least 30
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should result in a saved document with generated ID'
- db.saveDoc(doc, {
- success: function(resp, status){
- db.openDoc(resp.id, {
- success: function(resp2){
- resp2.Name.should.eql "Kara Thrace"
- resp2.Callsign.should.eql "Starbuck"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should save the document with the specified ID'
- doc._id = "123";
- db.saveDoc(doc, {
- success: function(resp, status){
- resp.id.should.eql "123"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should pass through the options'
- db.saveDoc(doc, {
- "batch" : "ok",
- success: function(resp, status){
- // when using batch ok, couch sends a 202 status immediately
- status.should.eql 202
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should alert with an error message prefix'
- db.saveDoc("asdf");
- alert_msg.should.match /The document could not be saved/
- end
- end
-
- describe 'bulkSave'
- before_each
- doc = {"Name" : "Kara Thrace", "Callsign" : "Starbuck"};
- doc2 = {"Name" : "Karl C. Agathon", "Callsign" : "Helo"};
- doc3 = {"Name" : "Sharon Valerii", "Callsign" : "Boomer"};
- docs = [doc, doc2, doc3];
- end
-
- it 'should save all documents'
- db.bulkSave({"docs": docs});
- db.allDocs({
- success: function(resp) {
- resp.total_rows.should.eql 3
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should result in saved documents'
- doc3._id = "789";
- db.bulkSave({"docs": [doc3]});
-
- db.openDoc("789", {
- success: function(resp){
- resp.Name.should.eql "Sharon Valerii"
- resp.Callsign.should.eql "Boomer"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should return ID and revision of the documents'
- db.bulkSave({"docs": docs},{
- success: function(resp){
- resp[0].id.should.be_a String
- resp[0].id.should.have_length 32
- resp[0].rev.should.be_a String
- resp[0].rev.length.should.be_at_least 30
- resp[1].id.should.be_a String
- resp[1].id.should.have_length 32
- resp[1].rev.should.be_a String
- resp[1].rev.length.should.be_at_least 30
- resp[2].id.should.be_a String
- resp[2].id.should.have_length 32
- resp[2].rev.should.be_a String
- resp[2].rev.length.should.be_at_least 30
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should save the document with specified IDs'
- doc._id = "123";
- doc2._id = "456";
- docs = [doc, doc2, doc3];
-
- db.bulkSave({"docs": docs},{
- success: function(resp){
- resp[0].id.should.eql "123"
- resp[1].id.should.eql "456"
- resp[2].id.should.have_length 32
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should pass through the options'
- // a lengthy way to test that a conflict can't be created with the
- // all_or_nothing option set to false, but can be when it's true.
-
- var old_doc = {"Name" : "Louanne Katraine", "Callsign" : "Kat", "_id" : "123"};
- db.saveDoc(old_doc, {
- success: function(resp){
- old_doc._rev = resp.rev;
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
-
- var new_doc = {"Name" : "Sasha", "Callsign" : "Kat", "_id" : "123"};
-
- db.bulkSave({"docs": [new_doc], "all_or_nothing": false}, {
- success: function(resp){
- resp[0].id.should.eql "123"
- resp[0].error.should.eql "conflict"
- resp[0].reason.should.eql "Document update conflict."
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
-
- db.bulkSave({"docs": [new_doc], "all_or_nothing": true}, {
- success: function(resp){
- resp[0].id.should.eql "123"
- resp[0].rev.should.not.eql old_doc._rev
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
-
- db.openDoc("123", {
- "conflicts": true,
- success: function(resp){
- resp._conflicts[0].should.eql old_doc._rev
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should alert with an error message prefix'
- db.bulkSave("asdf");
- alert_msg.should.match /The documents could not be saved/
- end
- end
-end \ No newline at end of file
diff --git a/share/www/spec/jquery_couch_js_instance_methods_3_spec.js b/share/www/spec/jquery_couch_js_instance_methods_3_spec.js
deleted file mode 100644
index 5d27d8173..000000000
--- a/share/www/spec/jquery_couch_js_instance_methods_3_spec.js
+++ /dev/null
@@ -1,540 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// Specs for jquery_couch.js lines 300-411
-
-describe 'jQuery couchdb db'
- before
- stubAlert();
- end
-
- after
- destubAlert();
- end
-
- before_each
- db = $.couch.db('spec_db');
- db.create();
- end
-
- after_each
- db.drop();
- end
-
- describe 'removeDoc'
- before_each
- doc = {"Name" : "Louanne Katraine", "Callsign" : "Kat", "_id" : "345"};
- saved_doc = {};
- db.saveDoc(doc, {
- success: function(resp){
- saved_doc = resp;
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should result in a deleted document'
- db.removeDoc({_id : "345", _rev : saved_doc.rev}, {
- success: function(resp){
- db.openDoc("345", {
- error: function(status, error, reason){
- status.should.eql 404
- error.should.eql "not_found"
- reason.should.eql "deleted"
- },
- success: function(resp){successCallback(resp)}
- });
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should return ok true, the ID and the revision of the deleted document'
- db.removeDoc({_id : "345", _rev : saved_doc.rev}, {
- success: function(resp){
- resp.ok.should.be_true
- resp.id.should.eql "345"
- resp.rev.should.be_a String
- resp.rev.length.should.be_at_least 30
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should record the revision in the deleted document'
- db.removeDoc({_id : "345", _rev : saved_doc.rev}, {
- success: function(resp){
- db.openDoc("345", {
- rev: resp.rev,
- success: function(resp2){
- resp2._rev.should.eql resp.rev
- resp2._id.should.eql resp.id
- resp2._deleted.should.be_true
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should alert with an error message prefix'
- db.removeDoc({_id: "asdf"});
- alert_msg.should.match /The document could not be deleted/
- end
- end
-
- describe 'bulkRemove'
- before_each
- doc = {"Name" : "Kara Thrace", "Callsign" : "Starbuck", "_id" : "123"};
- doc2 = {"Name" : "Karl C. Agathon", "Callsign" : "Helo", "_id" : "456"};
- doc3 = {"Name" : "Sharon Valerii", "Callsign" : "Boomer", "_id" : "789"};
- docs = [doc, doc2, doc3];
-
- db.bulkSave({"docs": docs}, {
- success: function(resp){
- for (var i = 0; i < docs.length; i++) {
- docs[i]._rev = resp[i].rev;
- }
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should remove all documents specified'
- db.bulkRemove({"docs": docs});
- db.allDocs({
- success: function(resp) {
- resp.total_rows.should.eql 0
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should not remove documents that should not have been deleted'
- db.bulkRemove({"docs": [doc3]});
- db.allDocs({
- success: function(resp) {
- resp.total_rows.should.eql 2
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should result in deleted documents'
- db.bulkRemove({"docs": docs}, {
- success: function(resp){
- db.openDoc("123", {
- error: function(status, error, reason){
- status.should.eql 404
- error.should.eql "not_found"
- reason.should.eql "deleted"
- },
- success: function(resp){successCallback(resp)}
- });
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should return the ID and the revision of the deleted documents'
- db.bulkRemove({"docs": docs}, {
- success: function(resp){
- resp[0].id.should.eql "123"
- resp[0].rev.should.be_a String
- resp[0].rev.length.should.be_at_least 30
- resp[1].id.should.eql "456"
- resp[1].rev.should.be_a String
- resp[1].rev.length.should.be_at_least 30
- resp[2].id.should.eql "789"
- resp[2].rev.should.be_a String
- resp[2].rev.length.should.be_at_least 30
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should record the revision in the deleted documents'
- db.bulkRemove({"docs": docs}, {
- success: function(resp){
- db.openDoc("123", {
- rev: resp[0].rev,
- success: function(resp2){
- resp2._rev.should.eql resp[0].rev
- resp2._id.should.eql resp[0].id
- resp2._deleted.should.be_true
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should alert with an error message prefix'
- db.bulkRemove({docs: ["asdf"]});
- alert_msg.should.match /The documents could not be deleted/
- end
- end
-
- describe 'copyDoc'
- before_each
- doc = {"Name" : "Sharon Agathon", "Callsign" : "Athena", "_id" : "123"};
- db.saveDoc(doc);
- end
-
- it 'should result in another document with same data and new id'
- db.copyDoc("123", {
- success: function(resp){
- resp.id.should.eql "456"
- resp.rev.length.should.be_at_least 30
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- }, {
- headers: {"Destination":"456"}
- });
-
- db.openDoc("456", {
- success: function(resp){
- resp.Name.should.eql "Sharon Agathon"
- resp.Callsign.should.eql "Athena"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should throw an error when trying to overwrite a document without providing a revision'
- doc2 = {"Name" : "Louanne Katraine", "Callsign" : "Kat", "_id" : "456"};
- db.saveDoc(doc2);
-
- db.copyDoc("123", {
- error: function(status, error, reason){
- status.should.eql 409
- error.should.eql "conflict"
- reason.should.eql "Document update conflict."
- },
- success: function(resp){successCallback(resp)}
- }, {
- headers: {"Destination":"456"}
- });
- end
-
- it 'should overwrite a document with the correct revision'
- doc2 = {"Name" : "Louanne Katraine", "Callsign" : "Kat", "_id" : "456"};
- var doc2_rev;
- db.saveDoc(doc2, {
- success: function(resp){
- doc2_rev = resp.rev;
- }
- });
-
- db.copyDoc("123", {
- success: function(resp){
- resp.id.should.eql "456"
- resp.rev.length.should.be_at_least 30
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- }, {
- headers: {"Destination":"456?rev=" + doc2_rev}
- });
-
- db.openDoc("456", {
- success: function(resp){
- resp.Name.should.eql "Sharon Agathon"
- resp.Callsign.should.eql "Athena"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should alert with an error message prefix'
- db.copyDoc("asdf", {}, {});
- alert_msg.should.match /The document could not be copied/
- end
- end
-
- describe 'query'
- before_each
- db.saveDoc({"Name" : "Cally Tyrol", "job" : "deckhand", "_id" : "789"});
- db.saveDoc({"Name" : "Felix Gaeta", "job" : "officer", "_id" : "123"});
- db.saveDoc({"Name" : "Samuel T. Anders", "job" : "pilot", "_id" : "456"});
- map_function = "function(doc) { emit(doc._id, 1); }";
- reduce_function = "function(key, values, rereduce) { return sum(values); }";
- end
-
- it 'should apply the map function'
- db.query(map_function, null, null, {
- success: function(resp){
- resp.rows.should.have_length 3
- resp.rows[0].id.should.eql "123"
- resp.rows[0].key.should.eql "123"
- resp.rows[0].value.should.eql 1
- resp.rows[1].id.should.eql "456"
- resp.rows[1].key.should.eql "456"
- resp.rows[1].value.should.eql 1
- resp.rows[2].id.should.eql "789"
- resp.rows[2].key.should.eql "789"
- resp.rows[2].value.should.eql 1
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should apply the reduce function'
- db.query(map_function, reduce_function, null, {
- success: function(resp){
- resp.rows.should.have_length 1
- resp.rows[0].key.should.be_null
- resp.rows[0].value.should_eql 3
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should pass through the options'
- db.query(map_function, null, null, {
- "startkey": "456",
- success: function(resp){
- resp.rows.should.have_length 2
- resp.rows[0].id.should.eql "456"
- resp.rows[0].key.should.eql "456"
- resp.rows[0].value.should.eql 1
- resp.rows[1].id.should.eql "789"
- resp.rows[1].key.should.eql "789"
- resp.rows[1].value.should.eql 1
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should pass through the keys'
- //shouldn't this better work? TODO: implement in jquery.couch.js
- console.log("shouldn't this better work? TODO: implement in jquery.couch.js")
- db.query(map_function, null, null, {
- "keys": ["456", "123"],
- success: function(resp){
- resp.rows.should.have_length 2
- resp.rows[0].id.should.eql "456"
- resp.rows[0].key.should.eql "456"
- resp.rows[0].value.should.eql 1
- resp.rows[1].id.should.eql "123"
- resp.rows[1].key.should.eql "123"
- resp.rows[1].value.should.eql 1
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should pass through the options and the keys'
- //shouldn't this better work? TODO: implement in jquery.couch.js
- console.log("shouldn't this better work? TODO: implement in jquery.couch.js")
- db.query(map_function, null, null, {
- "include_docs":"true",
- "keys": ["456"],
- success: function(resp){
- resp.rows.should.have_length 1
- resp.rows[0].id.should.eql "456"
- resp.rows[0].key.should.eql "456"
- resp.rows[0].value.should.eql 1
- resp.rows[0].doc["job"].should.eql "pilot"
- resp.rows[0].doc["_rev"].length.should.be_at_least 30
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should apply a query in erlang also'
- // when this test fails, read this: http://wiki.apache.org/couchdb/EnableErlangViews
- var erlang_map = 'fun({Doc}) -> ' +
- 'ID = proplists:get_value(<<"_id">>, Doc, null), ' +
- 'Emit(ID, 1) ' +
- 'end.';
- db.query(erlang_map, null, "erlang", {
- success: function(resp){
- resp.rows.should.have_length 3
- resp.rows[0].id.should.eql "123"
- resp.rows[0].key.should.eql "123"
- resp.rows[0].value.should.eql 1
- resp.rows[1].id.should.eql "456"
- resp.rows[1].key.should.eql "456"
- resp.rows[1].value.should.eql 1
- resp.rows[2].id.should.eql "789"
- resp.rows[2].key.should.eql "789"
- resp.rows[2].value.should.eql 1
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should alert with an error message prefix'
- db.query("asdf");
- alert_msg.should.match /An error occurred querying the database/
- end
- end
-
- describe 'view'
- before_each
- db.saveDoc({"Name" : "Cally Tyrol", "job" : "deckhand", "_id" : "789"});
- db.saveDoc({"Name" : "Felix Gaeta", "job" : "officer", "_id" : "123"});
- db.saveDoc({"Name" : "Samuel T. Anders", "job" : "pilot", "_id" : "456"});
- view = {
- "views" : {
- "people" : {
- "map" : "function(doc) { emit(doc._id, doc.Name); }"
- }
- },
- "_id" : "_design/spec_db"
- };
- db.saveDoc(view);
- end
-
- it 'should apply the view'
- db.view('spec_db/people', {
- success: function(resp){
- resp.rows.should.have_length 3
- resp.rows[0].id.should.eql "123"
- resp.rows[0].key.should.eql "123"
- resp.rows[0].value.should.eql "Felix Gaeta"
- resp.rows[1].id.should.eql "456"
- resp.rows[1].key.should.eql "456"
- resp.rows[1].value.should.eql "Samuel T. Anders"
- resp.rows[2].id.should.eql "789"
- resp.rows[2].key.should.eql "789"
- resp.rows[2].value.should.eql "Cally Tyrol"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should pass through the options'
- db.view('spec_db/people', {
- "skip":"2",
- success: function(resp){
- resp.rows.should.have_length 1
- resp.rows[0].id.should.eql "789"
- resp.rows[0].key.should.eql "789"
- resp.rows[0].value.should.eql "Cally Tyrol"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should pass through the keys'
- db.view('spec_db/people', {
- "keys":["456", "123"],
- success: function(resp){
- resp.rows.should.have_length 2
- resp.rows[0].id.should.eql "456"
- resp.rows[0].key.should.eql "456"
- resp.rows[0].value.should.eql "Samuel T. Anders"
- resp.rows[1].id.should.eql "123"
- resp.rows[1].key.should.eql "123"
- resp.rows[1].value.should.eql "Felix Gaeta"
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should pass through the options and the keys'
- db.view('spec_db/people', {
- "include_docs":"true",
- "keys":["456"],
- success: function(resp){
- resp.rows.should.have_length 1
- resp.rows[0].id.should.eql "456"
- resp.rows[0].key.should.eql "456"
- resp.rows[0].value.should.eql "Samuel T. Anders"
- resp.rows[0].doc["job"].should.eql "pilot"
- resp.rows[0].doc["_rev"].length.should.be_at_least 30
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should throw a 404 when the view doesnt exist'
- db.view('spec_db/non_existing_view', {
- error: function(status, error, reason){
- status.should.eql 404
- error.should.eql "not_found"
- reason.should.eql "missing_named_view"
- },
- success: function(resp){successCallback(resp)}
- });
- end
-
- it 'should alert with an error message prefix'
- db.view("asdf");
- alert_msg.should.match /An error occurred accessing the view/
- end
- end
-
- describe 'setDbProperty'
- it 'should return ok true'
- db.setDbProperty("_revs_limit", 1500, {
- success: function(resp){
- resp.ok.should.be_true
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should set a db property'
- db.setDbProperty("_revs_limit", 1500);
- db.getDbProperty("_revs_limit", {
- success: function(resp){
- resp.should.eql 1500
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- db.setDbProperty("_revs_limit", 1200);
- db.getDbProperty("_revs_limit", {
- success: function(resp){
- resp.should.eql 1200
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should alert with an error message prefix'
- db.setDbProperty("asdf");
- alert_msg.should.match /The property could not be updated/
- end
- end
-
- describe 'getDbProperty'
- it 'should get a db property'
- db.setDbProperty("_revs_limit", 1200);
- db.getDbProperty("_revs_limit", {
- success: function(resp){
- resp.should.eql 1200
- },
- error: function(status, error, reason){errorCallback(status, error, reason)}
- });
- end
-
- it 'should throw a 404 when the property doesnt exist'
- db.getDbProperty("_doesnt_exist", {
- error: function(status, error, reason){
- status.should.eql 404
- error.should.eql "not_found"
- reason.should.eql "missing"
- },
- success: function(resp){successCallback(resp)}
- });
- end
-
- it 'should alert with an error message prefix'
- db.getDbProperty("asdf");
- alert_msg.should.match /The property could not be retrieved/
- end
- end
-end \ No newline at end of file
diff --git a/share/www/spec/run.html b/share/www/spec/run.html
deleted file mode 100644
index 9a248cb3c..000000000
--- a/share/www/spec/run.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!--
-Licensed under the Apache License, Version 2.0 (the "License"); you may not
-use this file except in compliance with the License. You may obtain a copy of
-the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-License for the specific language governing permissions and limitations under
-the License.
--->
-<html>
- <head>
- <link type="text/css" rel="stylesheet" href="../script/jspec/jspec.css" />
- <script src="../script/jquery.js"></script>
- <script src="../script/sha1.js"></script>
- <script src="../script/jspec/jspec.js"></script>
- <script src="../script/jspec/jspec.jquery.js"></script>
- <script src="../script/jspec/jspec.xhr.js"></script>
- <script src="./custom_helpers.js"></script>
- <script src="../script/couch.js"></script>
- <script src="../script/jquery.couch.js"></script>
- <script src="../script/couch_test_runner.js"></script>
- <script>
- function runSuites() {
- JSpec
- .exec('couch_js_class_methods_spec.js')
- .exec('couch_js_instance_methods_1_spec.js')
- .exec('couch_js_instance_methods_2_spec.js')
- .exec('couch_js_instance_methods_3_spec.js')
- .exec('jquery_couch_js_class_methods_spec.js')
- .exec('jquery_couch_js_instance_methods_1_spec.js')
- .exec('jquery_couch_js_instance_methods_2_spec.js')
- .exec('jquery_couch_js_instance_methods_3_spec.js')
- .run({failuresOnly: true})
- .report()
- }
- </script>
- </head>
- <body class="jspec" onLoad="runSuites();">
- <div id="jspec-top"><h2 id="jspec-title">JSpec <em><script>document.write(JSpec.version)</script></em></h2></div>
- <div id="jspec"></div>
- <div id="jspec-bottom"></div>
- </body>
-</html>
diff --git a/share/www/status.html b/share/www/status.html
deleted file mode 100644
index df35b61f9..000000000
--- a/share/www/status.html
+++ /dev/null
@@ -1,152 +0,0 @@
-<!DOCTYPE html>
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<html lang="en">
- <head>
- <title>Status</title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <link rel="stylesheet" href="style/layout.css?0.11.0" type="text/css">
- <script src="script/json2.js"></script>
- <script src="script/sha1.js"></script>
- <script src="script/jquery.js"></script>
- <script src="script/jquery.couch.js"></script>
- <script src="script/jquery.dialog.js"></script>
- <script src="script/futon.js"></script>
- </head>
- <body><div id="wrap">
- <h1>
- <a href="index.html">Overview</a>
- <strong>Status</strong>
- </h1>
- <div id="content">
- <div id="interval">
- <label>Poll interval:
- <input type="range" min="1" max="30" value="5" size="3">
- <span class="secs">5</span> second(s)
- </label>
- </div>
- <table id="status" class="listing" cellspacing="0">
- <caption>Active Tasks</caption>
- <thead><tr>
- <th>Type</th>
- <th>Object</th>
- <th>Started on</th>
- <th>Last updated on</th>
- <th>PID</th>
- <th>Status</th>
- </tr></thead>
- <tbody class="content"></tbody>
- </table>
-
- </div>
- </div></body>
- <script>
- function toTaskDate(timestamp) {
- var d = new Date(timestamp * 1000);
- var hours = d.getHours(), min = d.getMinutes(), secs = d.getSeconds();
- var year = d.getFullYear(), month = d.getMonth() + 1, day = d.getDate();
-
- return String(year) + "-" + (month < 10 ? "0" + month : month) + "-" +
- day + " " + (hours < 10 ? "0" + hours : hours) + ":" +
- (min < 10 ? "0" + min : min) + ":" + (secs < 10 ? "0" + secs : secs);
- }
- var refreshTimeout = null;
-
- $.futon.storage.declare("poll_interval", {defaultValue: 5});
-
- function refresh() {
- $.couch.activeTasks({
- success: function(tasks) {
- clearTimeout(refreshTimeout);
- $("#status tbody.content").empty();
- if (!tasks.length) {
- $("<tr class='none'><th colspan='6'>No tasks running</th></tr>")
- .appendTo("#status tbody.content");
- } else {
- $.each(tasks, function(idx, task) {
- var status, type, object;
-
- switch (task.type) {
- case "database_compaction":
- type = "Database compaction";
- object = task.database + (task.retry ? " retry" : "");
- status = "Copied " + task.changes_done + " of " +
- task.total_changes + " changes (" + task.progress + "%)";
- break;
- case "view_compaction":
- type = "View compaction";
- object = task.database + ", " + task.design_document;
- status = "Progress " + task.progress + "%";
- break;
- case "indexer":
- type = "Indexer";
- object = task.database + ", " + task.design_document;
- status = "Processed " + task.changes_done + " of " +
- task.total_changes + " changes (" + task.progress + "%)";
- break;
- case "replication":
- type = "Replication";
- object = task.source + " to " + task.target;
- status = "Checkpointed source sequence " +
- task.checkpointed_source_seq + ", current source sequence " +
- task.source_seq + ", progress " + task.progress + "%";
- }
-
- $("<tr><th></th><td class='object'></td><td class='started'>" +
- "</td><td class='updated'></td><td class='pid'></td>" +
- "<td class='status'></td></tr>")
- .find("th").text(type).end()
- .find("td.object").text(object).end()
- .find("td.started").text(toTaskDate(task.started_on)).end()
- .find("td.updated").text(toTaskDate(task.updated_on)).end()
- .find("td.pid").text(task.pid).end()
- .find("td.status").text(status).end()
- .appendTo("#status tbody.content");
- });
- }
- refreshTimeout = setTimeout(refresh,
- parseInt($("#interval input").val(), 10) * 1000);
- }
- });
- }
-
- function updateInterval(value) {
- if (isNaN(value)) {
- value = 5;
- $("#interval input").val(value);
- }
- $("#interval .secs").text(value);
- refresh();
- $.futon.storage.set("poll_interval", value);
- }
-
- $(function() {
- var slider = $("#interval input");
- slider.val(parseInt($.futon.storage.get("poll_interval")));
- if (slider[0].type == "range") {
- slider.bind("input", function() {
- updateInterval(this.value);
- });
- $("#interval .secs").text($("#interval input").val());
- } else {
- slider.bind("change", function() {
- updateInterval(this.value);
- });
- $("#interval .secs").hide();
- }
- refresh();
- });
- </script>
-</html>
diff --git a/share/www/style/jquery-ui-1.8.11.custom.css b/share/www/style/jquery-ui-1.8.11.custom.css
deleted file mode 100644
index a6b2f7440..000000000
--- a/share/www/style/jquery-ui-1.8.11.custom.css
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * jQuery UI CSS Framework 1.8.11
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- */
-
-/* Layout helpers
-----------------------------------*/
-.ui-helper-hidden { display: none; }
-.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
-.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
-.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-.ui-helper-clearfix { display: inline-block; }
-/* required comment for clearfix to work in Opera \*/
-* html .ui-helper-clearfix { height:1%; }
-.ui-helper-clearfix { display:block; }
-/* end clearfix */
-.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
-
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-disabled { cursor: default !important; }
-
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Overlays */
-.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
-
-
-/*
- * jQuery UI CSS Framework 1.8.11
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- *
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
- */
-
-
-/* Component containers
-----------------------------------*/
-.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; }
-.ui-widget .ui-widget { font-size: 1em; }
-.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; }
-.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee 50% top repeat-x; color: #333333; }
-.ui-widget-content a { color: #333333; }
-.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
-.ui-widget-header a { color: #ffffff; }
-
-/* Interaction states
-----------------------------------*/
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 50% 50% repeat-x; font-weight: bold; color: #1c94c4; }
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
-.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce 50% 50% repeat-x; font-weight: bold; color: #c77405; }
-.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; }
-.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff 50% 50% repeat-x; font-weight: bold; color: #eb8f00; }
-.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; }
-.ui-widget :active { outline: none; }
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c 50% top repeat-x; color: #363636; }
-.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
-.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 50% 50% repeat; color: #ffffff; }
-.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
-.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
-.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
-.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
-.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
-.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
-.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
-.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); }
-.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
-.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
-.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); }
-.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); }
-
-/* positioning */
-.ui-icon-carat-1-n { background-position: 0 0; }
-.ui-icon-carat-1-ne { background-position: -16px 0; }
-.ui-icon-carat-1-e { background-position: -32px 0; }
-.ui-icon-carat-1-se { background-position: -48px 0; }
-.ui-icon-carat-1-s { background-position: -64px 0; }
-.ui-icon-carat-1-sw { background-position: -80px 0; }
-.ui-icon-carat-1-w { background-position: -96px 0; }
-.ui-icon-carat-1-nw { background-position: -112px 0; }
-.ui-icon-carat-2-n-s { background-position: -128px 0; }
-.ui-icon-carat-2-e-w { background-position: -144px 0; }
-.ui-icon-triangle-1-n { background-position: 0 -16px; }
-.ui-icon-triangle-1-ne { background-position: -16px -16px; }
-.ui-icon-triangle-1-e { background-position: -32px -16px; }
-.ui-icon-triangle-1-se { background-position: -48px -16px; }
-.ui-icon-triangle-1-s { background-position: -64px -16px; }
-.ui-icon-triangle-1-sw { background-position: -80px -16px; }
-.ui-icon-triangle-1-w { background-position: -96px -16px; }
-.ui-icon-triangle-1-nw { background-position: -112px -16px; }
-.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
-.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
-.ui-icon-arrow-1-n { background-position: 0 -32px; }
-.ui-icon-arrow-1-ne { background-position: -16px -32px; }
-.ui-icon-arrow-1-e { background-position: -32px -32px; }
-.ui-icon-arrow-1-se { background-position: -48px -32px; }
-.ui-icon-arrow-1-s { background-position: -64px -32px; }
-.ui-icon-arrow-1-sw { background-position: -80px -32px; }
-.ui-icon-arrow-1-w { background-position: -96px -32px; }
-.ui-icon-arrow-1-nw { background-position: -112px -32px; }
-.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
-.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
-.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
-.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
-.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
-.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
-.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
-.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
-.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
-.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
-.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
-.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
-.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
-.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
-.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
-.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
-.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
-.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
-.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
-.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
-.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
-.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
-.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
-.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
-.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
-.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
-.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
-.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
-.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
-.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
-.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
-.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
-.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
-.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
-.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
-.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
-.ui-icon-arrow-4 { background-position: 0 -80px; }
-.ui-icon-arrow-4-diag { background-position: -16px -80px; }
-.ui-icon-extlink { background-position: -32px -80px; }
-.ui-icon-newwin { background-position: -48px -80px; }
-.ui-icon-refresh { background-position: -64px -80px; }
-.ui-icon-shuffle { background-position: -80px -80px; }
-.ui-icon-transfer-e-w { background-position: -96px -80px; }
-.ui-icon-transferthick-e-w { background-position: -112px -80px; }
-.ui-icon-folder-collapsed { background-position: 0 -96px; }
-.ui-icon-folder-open { background-position: -16px -96px; }
-.ui-icon-document { background-position: -32px -96px; }
-.ui-icon-document-b { background-position: -48px -96px; }
-.ui-icon-note { background-position: -64px -96px; }
-.ui-icon-mail-closed { background-position: -80px -96px; }
-.ui-icon-mail-open { background-position: -96px -96px; }
-.ui-icon-suitcase { background-position: -112px -96px; }
-.ui-icon-comment { background-position: -128px -96px; }
-.ui-icon-person { background-position: -144px -96px; }
-.ui-icon-print { background-position: -160px -96px; }
-.ui-icon-trash { background-position: -176px -96px; }
-.ui-icon-locked { background-position: -192px -96px; }
-.ui-icon-unlocked { background-position: -208px -96px; }
-.ui-icon-bookmark { background-position: -224px -96px; }
-.ui-icon-tag { background-position: -240px -96px; }
-.ui-icon-home { background-position: 0 -112px; }
-.ui-icon-flag { background-position: -16px -112px; }
-.ui-icon-calendar { background-position: -32px -112px; }
-.ui-icon-cart { background-position: -48px -112px; }
-.ui-icon-pencil { background-position: -64px -112px; }
-.ui-icon-clock { background-position: -80px -112px; }
-.ui-icon-disk { background-position: -96px -112px; }
-.ui-icon-calculator { background-position: -112px -112px; }
-.ui-icon-zoomin { background-position: -128px -112px; }
-.ui-icon-zoomout { background-position: -144px -112px; }
-.ui-icon-search { background-position: -160px -112px; }
-.ui-icon-wrench { background-position: -176px -112px; }
-.ui-icon-gear { background-position: -192px -112px; }
-.ui-icon-heart { background-position: -208px -112px; }
-.ui-icon-star { background-position: -224px -112px; }
-.ui-icon-link { background-position: -240px -112px; }
-.ui-icon-cancel { background-position: 0 -128px; }
-.ui-icon-plus { background-position: -16px -128px; }
-.ui-icon-plusthick { background-position: -32px -128px; }
-.ui-icon-minus { background-position: -48px -128px; }
-.ui-icon-minusthick { background-position: -64px -128px; }
-.ui-icon-close { background-position: -80px -128px; }
-.ui-icon-closethick { background-position: -96px -128px; }
-.ui-icon-key { background-position: -112px -128px; }
-.ui-icon-lightbulb { background-position: -128px -128px; }
-.ui-icon-scissors { background-position: -144px -128px; }
-.ui-icon-clipboard { background-position: -160px -128px; }
-.ui-icon-copy { background-position: -176px -128px; }
-.ui-icon-contact { background-position: -192px -128px; }
-.ui-icon-image { background-position: -208px -128px; }
-.ui-icon-video { background-position: -224px -128px; }
-.ui-icon-script { background-position: -240px -128px; }
-.ui-icon-alert { background-position: 0 -144px; }
-.ui-icon-info { background-position: -16px -144px; }
-.ui-icon-notice { background-position: -32px -144px; }
-.ui-icon-help { background-position: -48px -144px; }
-.ui-icon-check { background-position: -64px -144px; }
-.ui-icon-bullet { background-position: -80px -144px; }
-.ui-icon-radio-off { background-position: -96px -144px; }
-.ui-icon-radio-on { background-position: -112px -144px; }
-.ui-icon-pin-w { background-position: -128px -144px; }
-.ui-icon-pin-s { background-position: -144px -144px; }
-.ui-icon-play { background-position: 0 -160px; }
-.ui-icon-pause { background-position: -16px -160px; }
-.ui-icon-seek-next { background-position: -32px -160px; }
-.ui-icon-seek-prev { background-position: -48px -160px; }
-.ui-icon-seek-end { background-position: -64px -160px; }
-.ui-icon-seek-start { background-position: -80px -160px; }
-/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
-.ui-icon-seek-first { background-position: -80px -160px; }
-.ui-icon-stop { background-position: -96px -160px; }
-.ui-icon-eject { background-position: -112px -160px; }
-.ui-icon-volume-off { background-position: -128px -160px; }
-.ui-icon-volume-on { background-position: -144px -160px; }
-.ui-icon-power { background-position: 0 -176px; }
-.ui-icon-signal-diag { background-position: -16px -176px; }
-.ui-icon-signal { background-position: -32px -176px; }
-.ui-icon-battery-0 { background-position: -48px -176px; }
-.ui-icon-battery-1 { background-position: -64px -176px; }
-.ui-icon-battery-2 { background-position: -80px -176px; }
-.ui-icon-battery-3 { background-position: -96px -176px; }
-.ui-icon-circle-plus { background-position: 0 -192px; }
-.ui-icon-circle-minus { background-position: -16px -192px; }
-.ui-icon-circle-close { background-position: -32px -192px; }
-.ui-icon-circle-triangle-e { background-position: -48px -192px; }
-.ui-icon-circle-triangle-s { background-position: -64px -192px; }
-.ui-icon-circle-triangle-w { background-position: -80px -192px; }
-.ui-icon-circle-triangle-n { background-position: -96px -192px; }
-.ui-icon-circle-arrow-e { background-position: -112px -192px; }
-.ui-icon-circle-arrow-s { background-position: -128px -192px; }
-.ui-icon-circle-arrow-w { background-position: -144px -192px; }
-.ui-icon-circle-arrow-n { background-position: -160px -192px; }
-.ui-icon-circle-zoomin { background-position: -176px -192px; }
-.ui-icon-circle-zoomout { background-position: -192px -192px; }
-.ui-icon-circle-check { background-position: -208px -192px; }
-.ui-icon-circlesmall-plus { background-position: 0 -208px; }
-.ui-icon-circlesmall-minus { background-position: -16px -208px; }
-.ui-icon-circlesmall-close { background-position: -32px -208px; }
-.ui-icon-squaresmall-plus { background-position: -48px -208px; }
-.ui-icon-squaresmall-minus { background-position: -64px -208px; }
-.ui-icon-squaresmall-close { background-position: -80px -208px; }
-.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
-.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
-.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
-.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
-.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
-.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Corner radius */
-.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
-.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
-.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
-.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
-.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
-.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
-.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
-.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
-.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
-
-/* Overlays */
-.ui-widget-overlay { background: #666666 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); }
-.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/*
- * jQuery UI Autocomplete 1.8.11
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Autocomplete#theming
- */
-.ui-autocomplete { position: absolute; cursor: default; }
-
-/* workarounds */
-* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
-
-/*
- * jQuery UI Menu 1.8.11
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Menu#theming
- */
-.ui-menu {
- list-style:none;
- padding: 2px;
- margin: 0;
- display:block;
- float: left;
-}
-.ui-menu .ui-menu {
- margin-top: -3px;
-}
-.ui-menu .ui-menu-item {
- margin:0;
- padding: 0;
- zoom: 1;
- float: left;
- clear: left;
- width: 100%;
-}
-.ui-menu .ui-menu-item a {
- text-decoration:none;
- display:block;
- padding:.2em .4em;
- line-height:1.5;
- zoom:1;
-}
-.ui-menu .ui-menu-item a.ui-state-hover,
-.ui-menu .ui-menu-item a.ui-state-active {
- font-weight: normal;
- margin: -1px;
-}
diff --git a/share/www/style/layout.css b/share/www/style/layout.css
deleted file mode 100644
index 54a183ac2..000000000
--- a/share/www/style/layout.css
+++ /dev/null
@@ -1,626 +0,0 @@
-/*
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
-*/
-
-/* General styles */
-
-html, body { color: #000; font: normal 90% Arial,Helvetica,sans-serif;
- height: 100%; margin: 0; padding: 0; overflow: hidden;
-}
-:link, :visited { color: #ba1e16; text-decoration: none; }
-:link img, :visited img { border: none; }
-
-h1 { background: #333; border-right: 2px solid #111;
- border-bottom: 1px solid #333; color: #999;
- font: normal 125% Arial,Helvetica,sans-serif; height: 32px;
- line-height: 32px; margin: 0; padding: 0 0 0 .5em; position: relative;
-}
-h1 :link, h1 :visited, h1 strong { padding: .4em .5em; }
-h1 :link, h1 :visited {
- background: url(../image/path.gif) 100% 50% no-repeat;
- color: #bbb; cursor: pointer; padding-right: 2.2em;
- text-shadow: #333 2px 2px 1px;
-}
-h1 strong { color: #fff; font-weight: normal; padding-right: 25px; }
-h1 strong a {color:#fff !important;background:none !important;}
-h1 :link.raw, h1 :visited.raw {
- background: url(../image/rarrow.png) 100% 50% no-repeat; position: absolute;
- right: 20px; width: 35px; height: 100%; padding: 0; margin: 0;
-}
-body.loading h1 strong {
- background: url(../image/spinner_33.gif) right center no-repeat;
-}
-
-hr { border: 1px solid #999; border-width: 1px 0 0; }
-dl dt { font-weight: bold; }
-code, tt, pre {
- font-family: "DejaVu Sans Mono",Menlo,Courier,monospace;
-}
-code.key { color: #333; font-weight: bold; }
-code.string { color: #393; }
-code.number, code.boolean { color: #339; }
-code.null { color: #666; }
-
-button { font-size: 100%; -webkit-appearance: square-button; }
-button[disabled] { color: #999; }
-input, select, textarea { background: #fff; border: 1px solid;
- border-color: #999 #ddd #ddd #999; color: #000; margin: 0; padding: 1px;
-}
-input.placeholder { color: #999; }
-textarea {
- font-family: "DejaVu Sans Mono",Menlo,Courier,monospace;
- font-size: 100%;
-}
-fieldset { border: none; font-size: 95%; margin: 0; padding: .2em 0 0; }
-fieldset legend { color: #666; font-weight: bold; padding: 0; }
-fieldset input, fieldset select { font-size: 95%; }
-fieldset p { margin: .4em; }
-
-p.help { color: #999; font-size: 90%; margin: 0 2em 1em; }
-
-/* Tabular listings */
-
-table.listing { border-collapse: separate; border-spacing: 0;
- border: 1px solid #a7a7a7; clear: both; width: 100%;
-}
-table.listing caption { display: none; }
-table.listing th, table.listing td { padding: .2em .5em; }
-table.listing thead th { background: #dadada url(../image/thead.gif) repeat-x;
- border: 1px solid #a7a7a7; border-width: 0 0 1px 1px; color: #333;
- font-size: 95%; font-weight: normal; text-align: left;
- text-shadow: #999 2px 1px 2px; white-space: nowrap;
-}
-table.listing thead th:first-child { border-left: none; }
-table.listing thead th.key {
- background: #a7afb6 url(../image/thead-key.gif) 0 0 repeat-x;
- padding-top: 2px;
-}
-table.listing thead th.key span {
- background: url(../image/order-asc.gif) 100% 3px no-repeat; cursor: pointer;
- padding-right: 20px;
-}
-table.listing thead th.desc span {
- background-image: url(../image/order-desc.gif);
-}
-table.listing tbody tr th, table.listing tbody tr td { background: #feffea; }
-table.listing tbody tr.odd th, table.listing tbody tr.odd td,
-table.listing tbody.odd tr th, table.listing tbody.odd tr td {
- background: #fff;
-}
-table.listing tbody th, table.listing tbody td {
- border-left: 1px solid #d9d9d9; padding: .4em .5em; vertical-align: top;
-}
-table.listing tbody th:first-child, table.listing tbody td:first-child {
- border-left: none;
-}
-table.listing tbody th { text-align: left; }
-table.listing tbody th :link, table.listing tbody th :visited {
- display: block;
-}
-table.listing tbody.footer tr td { background: #e9e9e9;
- border-top: 1px solid #a7a7a7; color: #999; font-size: 90%;
- line-height: 1.8em;
-}
-table.listing tbody.footer #paging { float: right; }
-table.listing tbody.footer #paging a,
-table.listing tbody.footer #paging label {
- padding: 0 .5em;
-}
-table.listing tbody.footer #paging label { color: #666; }
-table.listing tbody.footer #paging select { font-size: 90%; padding: 0; }
-
-/* Inline editing */
-
-span.editinline-tools { margin: 2px 2px 0; float: right; margin-right: -45px; }
-span.editinline-tools button { background: transparent 0 0 no-repeat;
- border: none; cursor: pointer; display: block; float: left; margin: 0 .2em;
- width: 11px; height: 11px;
-}
-span.editinline-tools button:hover { background-position: 0 -22px; }
-span.editinline-tools button:active { background-position: 0 -44px; }
-span.editinline-tools button.apply {
- background-image: url(../image/apply.gif);
-}
-span.editinline-tools button.cancel {
- background-image: url(../image/cancel.gif);
-}
-
-/* Resizer grippies */
-
-div.grippie { background: #e9e9e9 url(../image/grippie.gif) 50% 50% no-repeat;
- border: 1px solid #aaa; border-top: none; min-height: 10px;
-}
-
-/* Suggest results */
-
-ul.suggest-dropdown { border: 1px solid #999; background-color: #eee;
- padding: 0; margin: 0; list-style: none; opacity: .85;
- -moz-box-shadow: 2px 2px 10px #333; -webkit-box-shadow: 2px 2px 10px #333;
-}
-ul.suggest-dropdown li { padding: 2px 5px; white-space: nowrap; color: #101010;
- text-align: left;
-}
-ul.suggest-dropdown li.selected { cursor: pointer; background: Highlight;
- color: HighlightText;
-}
-
-/* Logo & Navigation */
-
-#sidebar { background: #fff; position: absolute; top: 0; right: -210px;
- width: 210px; height: 100%;
-}
-body.fullwidth #sidebar { border-bottom: 1px solid #333; right: 0;
- width: 26px;
-}
-#sidebar-toggle { background: url(../image/sidebar-toggle.png) 0 0 no-repeat;
- color: #999; cursor: pointer; display: block; position: absolute; right: 0;
- top: 0; font-size: 110%; width: 26px; height: 32px; text-indent: -9999px;
-}
-#sidebar-toggle:hover { background-position: -26px 0; }
-#sidebar-toggle:focus { outline: none; }
-#sidebar.hidden #sidebar-toggle { background-position: 0 -32px; }
-#sidebar.hidden #sidebar-toggle:hover { background-position: -26px -32px; }
-
-#logo { margin: 30px 0 0; padding: 0 18px 10px; }
-
-#nav { color: #333; font-size: 110%; font-weight: bold; list-style: none;
- margin: 0; overflow: auto; overflow-x: hidden; padding: 0; width: 210px;
-}
-#nav ul { list-style: none; margin: 0; padding: 0; }
-#nav li { color: #999; margin: 5px 0 0; padding: 3px 0; }
-#nav li span { padding: 0 20px; }
-#nav li.selected { background: #e9e9e9; }
-#nav li li { font-size: 90%; font-weight: normal; margin: 0;
- padding: 2px 20px 2px 40px;
-}
-#nav li li:hover { background: #e4e4e4; }
-#nav li.selected li:hover { background: #d7d7d7; }
-#nav li li :link, #nav li li :visited { color: #333; display: block;
- overflow: hidden; text-decoration: none; text-overflow: ellipsis;
-}
-#nav li li :link:hover, #nav li li :visited:hover { color: #000; }
-#nav li li :link:focus, #nav li li :visited:focus { outline: none; }
-#nav li li.selected { background: #aaa !important; border-top: 1px solid #999;
- color: #fff; padding-top: 1px;
-}
-#nav li li.selected :link, #nav li li.selected :visited { color: #fff; }
-#nav li li.selected :link:hover, #nav li li.selected :visited:hover {
- color: #fff;
-}
-#nav li button { background: transparent 0 0 no-repeat; border: none;
- cursor: pointer; width: 15px; height: 15px; margin-left: -20px;
- position: absolute; vertical-align: top;
-}
-#nav li li:hover button.remove {
- background-image: url(../image/delete-mini.png);
-}
-#nav li button.remove:hover { background-position: -15px 0; }
-
-#footer { background: #ddd; border-top: 1px solid #bbb; color: #000;
- font-size: 80%; opacity: .7; padding: 5px 10px; position: absolute; right: 0;
- bottom: 0; min-height: 1.3em; width: 190px; text-align: right;
-}
-#footer .couch :link, #footer .couch :visited { color: #000; }
-
-#userCtx span { display:none; }
-
-#wrap { background: #fff url(../image/bg.png) 100% 0 repeat-y;
- height: 100%; margin-right: 210px; position: relative;
-}
-body.fullwidth #wrap { margin-right: 0; }
-#content { padding: 1em 16px 3em 10px; overflow: auto; overflow-y: scroll;
- position: absolute; top: 33px; bottom: 0; left: 0; right: 0;
-}
-
-/* Toolbar */
-
-#toolbar { font-size: 90%; line-height: 16px; list-style: none;
- margin: 0 0 .5em; padding: 5px 5px 5px 3px;
-}
-#toolbar li { display: inline; }
-#toolbar li.current {float:right;}
-#toolbar button { background: transparent 2px 2px no-repeat; border: none;
- color: #666; margin: 0; padding: 2px 1em 2px 22px; cursor: pointer;
- font-size: 95%; line-height: 16px;
-}
-#toolbar button[disabled] { opacity: .50; }
-#toolbar button[disabled]:hover { background-position: 2px 2px; cursor: default; color: #666 }
-#toolbar button:hover { background-position: 2px -30px; color: #000; }
-#toolbar button:active { background-position: 2px -62px; color: #000; }
-#toolbar button.add { background-image: url(../image/add.png); }
-#toolbar button.security { background-image: url(../image/key.png); }
-#toolbar button.compact { background-image: url(../image/compact.png); }
-#toolbar button.delete { background-image: url(../image/delete.png); }
-#toolbar button.load { background-image: url(../image/load.png); }
-#toolbar button.run { background-image: url(../image/run.png); }
-#toolbar button.save { background-image: url(../image/save.png); }
-#toolbar button.share { background-image: url(../image/compact.png); }
-
-/* Dialogs */
-
-#overlay { background: #bbb; cursor: wait; position: fixed; width: 100%;
- height: 100%; top: 0; left: 0;
-}
-*html #overlay { position: absolute;
- width: expression(document.body.clientWidth + 'px');
- height: expression(document.body.clientHeight + 'px');
-}
-#dialog { background: #333 url(../image/progress.gif) 50% 50% no-repeat;
- color: #f4f4f4; overflow: hidden; opacity: .95; max-width: 33em;
- padding: 1em 1em 0; -moz-border-radius: 7px;
- -moz-box-shadow: 4px 4px 6px #333; -webkit-border-radius: 7px;
- -webkit-box-shadow: 4px 4px 6px #333;
-}
-*html #dialog { width: 33em; }
-#dialog.loading { width: 220px; height: 80px; }
-#dialog.loaded { background-image: none; }
-#dialog h2 { background: #666 98% 50% no-repeat;
- border-top: 1px solid #555; border-bottom: 1px solid #777; color: #ccc;
- font-size: 110%; font-weight: bold; margin: 0 -1em; padding: .35em 1em;
-}
-body.loading #dialog h2 {
- background-image: url(../image/spinner_6b.gif);
-}
-#dialog h3 { color: #ccc; font-size: 100%; font-weight: bold; margin: 0 -2em;
- padding: .35em 2em 0;
-}
-#dialog fieldset { background: #222; border-top: 1px solid #111;
- margin: 0 0 1em; padding: .5em 1em 1em;
- -moz-border-radius-bottomleft: 7px; -moz-border-radius-bottomright: 7px;
- -webkit-border-bottom-left-radius: 7px;
- -webkit-border-bottom-right-radius: 7px;
-}
-#dialog p.help { color: #bbb; font-size: 95%; margin: 0 0 1em; }
-#dialog fieldset table { margin-top: 1em; }
-#dialog fieldset th, #dialog fieldset td { padding: .5em;
- vertical-align: top;
-}
-#dialog fieldset th { color: #999; font-weight: bold;
- text-align: right;
-}
-#dialog fieldset input { background-color: #e9e9e9; vertical-align: middle; }
-#dialog fieldset input.error { background-color: #f9e4e4; }
-#dialog fieldset div.error { padding-top: .3em; color: #b33; }
-#dialog fieldset.radiogroup { padding-top: 1em; }
-#dialog fieldset.radiogroup label { position: relative; padding-left: 25px; }
-#dialog fieldset.radiogroup input { position: absolute; left: 5px; top: 2px; }
-#dialog fieldset.radiogroup p.help { margin-top: .5em; margin-left: 25px; }
-#dialog fieldset.radiogroup hr { border-color: #333; margin-left: 25px; }
-#dialog .buttons { padding: 0 .5em .5em; text-align: right; }
-#dialog .buttons button { background: #444; border: 1px solid #aaa;
- color: #ddd; cursor: pointer; font-size: 90%; font-weight: normal;
- margin: 0 0 0 5px; padding: .2em 2em; -moz-border-radius: 10px;
- -webkit-border-radius: 10px;
-}
-#dialog .buttons button[type=submit] { font-weight: bold; }
-#dialog .buttons button:hover { background: #555; }
-#dialog .buttons button:active { background: #333; color: #fff; }
-
-#dialog fieldset td#progress {
- background: url(../image/progress.gif) 50% 50% no-repeat;
- visibility: hidden;
-}
-
-/* Document quick jump */
-
-#jumpto { float: right; padding: 5px 10px 5px 5px; line-height: 16px;
- font-weight: bold; color: #666; font-size: 90%; }
-
-#jumpto input { font-size: 90%; }
-
-/* View selector */
-
-#switch { color: #666; float: right; font-size: 90%; font-weight: bold;
- line-height: 16px; padding: 5px;
-}
-#switch select { font-size: 90%; }
-
-/* Stale views checkbox */
-
-#staleviews {
- color: #666; float: right; font-size: 90%;
- font-weight: bold; line-height: 16px; padding: 5px;
-}
-
-/* View function editing */
-
-#viewcode { background: #fff; border: 1px solid;
- border-color: #999 #ddd #ddd #999; margin: 0 0 1em; overflow: hidden;
-}
-#viewcode .top, #viewcode .bottom { background-color: #e9e9e9;
- border: 1px solid; border-color: #ddd #ddd #e9e9e9 #ddd; color: #333;
- padding: 0 .5em 2px;
-}
-#viewcode .top { border-bottom: 1px solid #ddd; color: #aaa; font-size: 95%; }
-#viewcode .top span { border: none; color: #666; cursor: pointer;
- display: block; font-size: 90%; margin: 0; padding: 2px 0 0;
-}
-#viewcode .top span#view-toggle {
- background: url(../image/twisty.gif) 0 -96px no-repeat; padding-left: 15px;
-}
-#viewcode.collapsed .top span#view-toggle { background-position: 0 4px; }
-#viewcode .top a { float: right; font-size: 90%; line-height: 1.4em;
- padding: 2px 2px 0 0;
-}
-#viewcode .top a:link, #viewcode .top a:visited { color: #999; }
-#viewcode table { border: none; border-collapse: separate; border-spacing: 0;
- margin: 0; table-layout: fixed; width: 100%; max-width: 100%;
-}
-#viewcode table td { border: none; padding: 0; }
-#viewcode table td.splitter { background: #e9e9e9; width: 4px; }
-#viewcode table td.map { border-right: 1px solid #ccc; }
-#viewcode table td.reduce { border-left: 1px solid #ccc; }
-#viewcode .code label { font-size: 90%; color: #999; padding: 0 .5em;
- white-space: nowrap;
-}
-#viewcode .code textarea { border: none; border-top: 1px solid #ccc;
- color: #333; font-size: 11px; margin: 0; min-height: 50px; overflow: auto;
- padding: .4em 0 0; resize: none; width: 100%;
-}
-#viewcode .code textarea:focus { background: #e9f4ff; }
-#viewcode .bottom { border-bottom: none; clear: left; padding: 1px 3px; }
-#viewcode .bottom button { font-size: 90%; margin: 0 1em 0 0;
- padding-left: 2em; padding-right: 2em;
-}
-*html #viewcode .bottom button { padding: 0 .5em; }
-*+html #viewcode .bottom button { padding: 0 .5em; }
-#viewcode .bottom button.revert, #viewcode .bottom button.save,
-#viewcode .bottom button.saveas {
- float: right; margin: 0 0 0 1em;
-}
-#viewcode .bottom button.save { font-weight: bold; }
-#viewcode .bottom label { color: #666; font-size: 90%; }
-#viewcode .grippie { background-position: 50% 50%; }
-#viewcode.collapsed { background: #e9e9e9; }
-#viewcode.collapsed .top { border-bottom: none; }
-#viewcode.collapsed .top span { background-position: 0 3px; }
-#viewcode.collapsed table, #viewcode.collapsed .bottom { display: none; }
-
-#tempwarn { display: none; font-size: 90%; margin: 0 2em 1.5em; }
-#grouptruenotice { display: none; font-size: 90%; margin: 1ex 2em 1.5em; }
-#viewrequestduration { display: none; font-size: 90%; margin: 1ex 2em 1.5em; }
-#viewrequestduration .timestamp { margin-left: 0.25em; }
-
-/* Database table */
-
-#databases thead th.size, #databases thead th.count, #databases thead th.seq,
-#databases tbody td.size, #databases tbody td.count, #databases tbody td.seq {
- text-align: right;
-}
-
-/* Documents table */
-
-#documents thead th { line-height: 150%; width: 50%; }
-#documents thead th label { color: #333; float: right; font-size: 90%;
- text-shadow: none;
-}
-#documents thead th label.disabled { color: #777; }
-#documents thead th label input { vertical-align: middle; }
-#documents thead th label input[type=range] { width: 7em; }
-#documents thead th label output { width: 4em; display: inline-block; }
-#documents tbody.content td { color: #999;
- font: normal 11px "DejaVu Sans Mono",Menlo,Courier,monospace;
-}
-#documents tbody.content td.key { color: #333; }
-#documents tbody.content td.key a { display: block; }
-#documents tbody.content td.key a strong { font-weight: normal; }
-#documents tbody.content td.key span.docid { color: #999;
- font: normal 10px Arial,Helvetica,sans-serif;
-}
-#documents tbody.content td.value { font-size: 10px; }
-
-/* Document display tabs */
-
-#tabs { float: right; list-style: none; margin: -1.4em 0 0; }
-#tabs li { display: inline; font-size: 95%; padding: 0; }
-#tabs li.active { font-weight: bold; }
-#tabs :link, #tabs :visited { background: #dadada; color: #666;
- border: 1px solid #a7a7a7; float: left; margin: 0 0 0 .5em;
- padding: .5em 2em .3em; position: relative; top: 1px;
-}
-#tabs .active :link, #tabs .active :visited { background: #e9e9e9;
- border-bottom-color: #e9e9e9; color: #333;
-}
-#tabs :link:focus, #tabs :visited:focus { outline: none; }
-
-/* Document fields table */
-
-#fields { clear: right; table-layout: fixed; }
-#fields col.field { width: 33%; }
-#fields tbody.content th { padding-left: 25px; padding-right: 48px; }
-#fields tbody.content th button.delete {
- background: url(../image/delete-mini.png) no-repeat; border: none;
- cursor: pointer; float: left; margin: .2em 5px 0 -20px; padding: 0;
- width: 15px; height: 15px;
-}
-#fields tbody.content th button.delete:hover { background-position: -15px 0; }
-#fields tbody.content th b { display: block; padding: 2px 2px 2px 3px; }
-#fields tbody.content th b.editinline-container { padding: 0; }
-#fields tbody.content td { color: #999; padding-left: 14px;
- padding-right: 48px;
-}
-#fields tbody.content td code { display: block; font-size: 11px;
- padding: 2px 2px 2px 3px; position: relative;
-}
-#fields tbody.content td code.string { white-space: pre-wrap; }
-#fields tbody.content td code.string:before { color: #ccc; content: "“";
- position: absolute; left: -4px;
-}
-#fields tbody.content td code.string:after { color: #ccc; content: "”"; }
-
-#fields tbody.content td dl { margin: 0; padding: 0; }
-#fields tbody.content td dt {
- background: transparent url(../image/toggle-collapse.gif) 0 3px no-repeat;
- clear: left; color: #333; cursor: pointer; line-height: 1em;
- margin-left: -12px; padding-left: 14px;
-}
-#fields tbody.content td dd { line-height: 1em; margin: 0;
- padding: 0 0 0 1em;
-}
-#fields tbody.content td dt.collapsed {
- background-image: url(../image/toggle-expand.gif);
-}
-#fields tbody.content td dt.inline { background-image: none; cursor: default;
- float: left; margin-left: 0; padding-left: 2px; padding-right: .5em;
- padding-top: 2px;
-}
-#fields tbody.content td dd code.string { left: 4px; text-indent: -6px; }
-#fields tbody.content td dd code.string:before { position: static; }
-#fields tbody.content input, #fields tbody.content textarea,
-#fields tbody.source textarea {
- background: #fff; border: 1px solid; border-color: #999 #ddd #ddd #999;
- margin: 0; padding: 1px; width: 100%;
-}
-#fields tbody.content th input { font-family: inherit; font-size: inherit;
- font-weight: bold;
-}
-#fields tbody.content td input, #fields tbody.content td textarea,
-#fields tbody.source textarea {
- font: normal 11px "DejaVu Sans Mono",Menlo,Courier,monospace;
-}
-#fields tbody.content input.invalid,
-#fields tbody.content textarea.invalid,
-#fields tbody.source textarea.invalid {
- background: #f9f4f4; border-color: #b66 #ebb #ebb #b66;
-}
-#fields tbody.content div.grippie, #fields tbody.source div.grippie {
- padding: 0 1px; width: 100%;
-}
-#fields tbody.content div.error, #fields tbody.source div.error {
- color: #d33;
-}
-
-#fields tbody.content td ul.attachments { list-style: none; margin: 0;
- padding: 0;
-}
-#fields tbody.content td ul.attachments li {
- margin-bottom: .3em; min-height: 20px; padding-left: 20px;
-}
-#fields tbody.content td ul.attachments tt { font-size: 11px; }
-#fields tbody.content td ul.attachments li span.info { color: #666;
- display: block; font-size: 95%;
-}
-#fields tbody.content td ul.attachments li button {
- background: transparent no-repeat; border: none; cursor: pointer;
- float: left; margin: 0 2px 0 -20px; padding: 0; width: 15px; height: 15px;
- vertical-align: middle;
-}
-#fields tbody.content td ul.attachments li button:hover {
- background-position: -15px 0;
-}
-#fields tbody.content td ul.attachments li button.delete {
- background-image: url(../image/delete-mini.png);
-}
-#fields tbody.source td pre { color: #999; font-size: 11px; line-height: 1.6em;
- margin: 0; overflow: auto; white-space: pre-wrap; width: 100%;
-}
-#fields tbody.source td.editinline-container { padding-left: 14px; padding-right: 48px; }
-
-/* Test suite */
-
-#tests { table-layout: fixed; }
-#tests thead th.name { width: 20%; }
-#tests thead th.status { padding-left: 20px; width: 10em; }
-#tests thead th.duration { text-align: right; width: 7em; }
-#tests tbody.content th { cursor: help; padding-left: 25px;
- white-space: nowrap;
-}
-#tests tbody.content th button.run {
- background: url(../image/run-mini.png) no-repeat; border: none;
- cursor: pointer; float: left; margin: .2em 5px 0 -20px; padding: 0;
- width: 15px; height: 15px;
-}
-#tests tbody.content th button.run:hover { background-position: -15px 0; }
-#tests tbody.content td.duration { text-align: right; width: 6em; }
-#tests tbody.content td.status { background-position: 5px 8px;
- background-repeat: no-repeat; color: #999; padding-left: 20px;
-}
-#tests tbody.content td.details { width: 50%; }
-#tests tbody.content td.details a { border-bottom: 1px dashed #ccc;
- color: #999; float: right; font-size: 85%;
-}
-#tests tbody.content td.details ol { color: #999; margin: 0;
- padding: 0 0 0 1.5em;
-}
-#tests tbody.content td.details ol b { color: #333; font-weight: normal; }
-#tests tbody.content td.details ol code { color: #c00; font-size: 100%; }
-#tests tbody.content td.details ol code.error { white-space: pre; }
-#tests tbody.content td.running {
- background-image: url(../image/running.png); color: #333;
-}
-#tests tbody.content td.success, span.success {
- background-image: url(../image/test_success.gif) no-repeat; color: #060;
-}
-#tests tbody.content td.error, #tests tbody.content td.failure, span.failure {
- background-image: url(../image/test_failure.gif) no-repeat; color: #c00;
-}
-
-#result {
- color: #060;
-}
-
-/* Configuration */
-
-#config tbody th { background: #e6e6e6; border-right: none;
- border-top: 1px solid #d9d9d9;
-}
-#config tbody td.name { border-left: 1px solid #d9d9d9; color: #333;
- font-weight: bold;
-}
-#config tbody td.value { padding: 1px 48px 1px 1px; }
-#config tbody td.value code { display: block; font-size: 11px;
- padding: 2px 2px 2px 3px;
-}
-#config tbody td.value code.editinline-container { padding: 0; }
-#config tbody td input {
- background: #fff; border: 1px solid; border-color: #999 #ddd #ddd #999;
- font: normal 11px "DejaVu Sans Mono",Menlo,Courier,monospace;
- margin: 0; padding: 1px; width: 100%;
-}
-
-/* Replication */
-
-form#replicator { background: #f4f4f4; border: 1px solid;
- border-color: #999 #ccc #ccc #999; margin: .5em 1em 1.5em; padding: .5em;
- -moz-border-radius: 7px; -webkit-border-radius: 7px;
-}
-form#replicator fieldset { float: left; padding: 1px; }
-form#replicator p.swap { float: left; margin: 2em 0 0; padding: 1px 1em; }
-form#replicator p.swap button { background: transparent; border: none;
- color: #666; cursor: pointer; font-size: 150%;
-}
-form#replicator p.swap button:hover { color: #000; }
-form#replicator p.actions { padding: 1px; clear: left; margin: 0;
- text-align: right;
-}
-
-/* Active tasks */
-
-#interval { color: #666; float: right; font-size: 90%; font-weight: bold;
- line-height: 16px; padding: 5px;
-}
-#interval input { vertical-align: top; }
-#interval .secs { display: inline-block; width: 2em; text-align: right; }
-
-#status tr.none th { color: #666; font-weight: normal; }
-#status td.object, #status td.pid {
- font-family: "DejaVu Sans Mono",Menlo,Courier,monospace;
- font-size: 11px;
-}
-
-
-/* Session */
-#loginSignup {
- font-size:200%;
-}
diff --git a/share/www/verify_install.html b/share/www/verify_install.html
deleted file mode 100644
index 7e3a7a73d..000000000
--- a/share/www/verify_install.html
+++ /dev/null
@@ -1,119 +0,0 @@
-<!DOCTYPE html>
-<!--
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software distributed
-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-CONDITIONS OF ANY KIND, either express or implied. See the License for the
-specific language governing permissions and limitations under the License.
-
--->
-<html lang="en">
- <head>
- <title>Test Suite</title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <link rel="stylesheet" href="style/layout.css?0.11.0" type="text/css">
- <script src="script/json2.js"></script>
- <script src="script/sha1.js"></script>
- <script src="script/jquery.js"></script>
- <script src="script/jquery.couch.js"></script>
- <script src="script/jquery.dialog.js"></script>
- <script src="script/futon.js"></script>
- <script src="script/couch.js"></script>
- <script src="script/couch_test_runner.js"></script>
- <script>
- $(function($) {
- $("#result").html("");
- $("#run").click(verify_install);
- });
-
- function T(arg, desc) {
- if(!arg) {
- mesg = "Assertion failed" + (desc ? ": " + desc : "");
- throw new Error(mesg);
- }
- }
-
- function TEquals(expect, found, descr) {
- var mesg = "expected '" + expect + "', got '" + found + "' " + descr;
- T(expect === found, mesg);
- }
-
- function tests() {
- CouchDB.urlPrefix = "..";
- var db = new CouchDB("test_suite_db", {"X-Couch-Full-Commit":"false"});
-
- // cleanup, ignore the 404
- try {db.deleteDb();} catch(e) {};
- // create db
- db.createDb();
-
- // create document
- var doc = {a:1};
- var resp = db.save(doc);
- TEquals(true, resp.ok, "save document");
- // update document
- doc.b = 2;
- resp = db.save(doc);
- TEquals(true, resp.ok, "update document");
- TEquals(2, doc.b, "update document verified");
- // delete document
- resp = db.deleteDoc(doc);
- TEquals(true, resp.ok, "delete document");
- var doc2 = db.open(doc.id);
- TEquals(doc2, null, "delete document verified");
-
- // excercise query server
- db.save({a:1});
- db.save({a:2});
- db.save({a:3});
-
- // temporary view
- var resp = db.query(function(doc) {
- if(doc.a) {
- emit(doc.a, doc.a);
- }
- });
- TEquals(3, resp.total_rows, "temp view query");
-
- // replication
- // create second db
- var db2 = new CouchDB("test_suite_db2", {"X-Couch-Full-Commit":"false"});
- try {db2.deleteDb();} catch (e) {};
- db2.createDb();
- // do replicate
- CouchDB.replicate("test_suite_db", "test_suite_db2");
- // compare results
- TEquals(db.info().doc_count, db2.info().doc_count, "databases are equal");
- }
-
- function verify_install() {
- try {
- var result = $("#result");
- result.html("Running…");
- tests();
- result.html("Your installation looks fine. Time to Relax.");
- } catch(e) {
- console.log(e);
- result.html("X: " + e);
- }
- }
- </script>
- </head>
- <body><div id="wrap">
- <h1>
- <a href="index.html">Overview</a>
- <strong>Verify Install</strong>
- </h1>
- <div id="content">
- <ul id="toolbar">
- <li><button class="run" id="run">Verify Your Installation.</button><span id="result"></span></li>
- </ul>
- </div>
- </div></body>
-</html>