From c7f56df0a6a6bf8ddb750c765369ba98c9823027 Mon Sep 17 00:00:00 2001 From: Ghalid <24234921+Ghalid@users.noreply.github.com> Date: Thu, 19 Dec 2019 23:18:04 -0500 Subject: [PATCH 001/298] Disable spellcheck for some text fields, changed some input field types Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com> --- custom_dns.php | 2 +- list.php | 2 +- queryads.php | 2 +- settings.php | 30 +++++++++++++++--------------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/custom_dns.php b/custom_dns.php index 5e594d7c7..d52763291 100644 --- a/custom_dns.php +++ b/custom_dns.php @@ -17,7 +17,7 @@
- +
diff --git a/list.php b/list.php index 3f24c07cf..f58cb7736 100644 --- a/list.php +++ b/list.php @@ -37,7 +37,7 @@
- +
diff --git a/queryads.php b/queryads.php index 3c14765bd..62ea890b5 100644 --- a/queryads.php +++ b/queryads.php @@ -13,7 +13,7 @@
- + diff --git a/settings.php b/settings.php index 1861eb36f..2f1885260 100644 --- a/settings.php +++ b/settings.php @@ -297,7 +297,7 @@
- +
@@ -418,7 +418,7 @@
From
- disabled>
@@ -428,7 +428,7 @@
To
- disabled>
@@ -441,7 +441,7 @@
Router
- disabled>
@@ -477,7 +477,7 @@
Lease time in hours
- disabled> @@ -642,9 +642,9 @@ function convertseconds($argument) - - - + + +
- value="">
@@ -757,7 +757,7 @@ function convertseconds($argument) checked>
- value="">
@@ -770,7 +770,7 @@ function convertseconds($argument) checked>
- value="">
@@ -779,7 +779,7 @@ function convertseconds($argument) checked>
- value="">
@@ -895,10 +895,10 @@ function convertseconds($argument)
- value=""> - value="">
@@ -1033,7 +1033,7 @@ function convertseconds($argument)

Administrator Email Address

-
From c720cce6755de432bcbc699163c18c452a6c160f Mon Sep 17 00:00:00 2001 From: Ghalid <24234921+Ghalid@users.noreply.github.com> Date: Fri, 20 Dec 2019 16:13:59 -0500 Subject: [PATCH 002/298] Disable autocorrect on top list exclusion `textarea`s Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com> --- settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings.php b/settings.php index 2f1885260..7105b5ffe 100644 --- a/settings.php +++ b/settings.php @@ -952,7 +952,7 @@ function convertseconds($argument)
- @@ -961,7 +961,7 @@ function convertseconds($argument)
- From 40d7e1498e08742f422d3a7a7e0728e561a255b1 Mon Sep 17 00:00:00 2001 From: Ghalid <24234921+Ghalid@users.noreply.github.com> Date: Sat, 21 Dec 2019 12:06:48 -0500 Subject: [PATCH 003/298] Disable autocorrect in search boxes Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com> --- scripts/pi-hole/js/customdns.js | 8 ++++++++ scripts/pi-hole/js/network.js | 8 ++++++++ scripts/pi-hole/js/queries.js | 9 +++++++++ scripts/pi-hole/js/settings.js | 8 ++++++++ 4 files changed, 33 insertions(+) diff --git a/scripts/pi-hole/js/customdns.js b/scripts/pi-hole/js/customdns.js index 834211a67..6b1595f12 100644 --- a/scripts/pi-hole/js/customdns.js +++ b/scripts/pi-hole/js/customdns.js @@ -46,6 +46,14 @@ $(document).ready(function() { $('.deleteCustomDNS').on('click', deleteCustomDNS); } }); + // Disable autocorrect in the search box + const inputs = document.querySelectorAll('input[type=search]'); + inputs.forEach(input => { + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) + }) }); function addCustomDNS() diff --git a/scripts/pi-hole/js/network.js b/scripts/pi-hole/js/network.js index 3d82fa118..441532dce 100644 --- a/scripts/pi-hole/js/network.js +++ b/scripts/pi-hole/js/network.js @@ -170,4 +170,12 @@ $(document).ready(function() { "defaultContent": "" } ] }); + // Disable autocorrect in the search box + const inputs = document.querySelectorAll('input[type=search]'); + inputs.forEach(input => { + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) + }) } ); diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 1618cdc94..418986a57 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -395,4 +395,13 @@ $(document).ready(function() { } ); $("#resetButton").click( function () { tableApi.search("").draw(); $("#resetButton").hide(); } ); + + // Disable autocorrect in the search box + const inputs = document.querySelectorAll('input[type=search]'); + inputs.forEach(input => { + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) + }) } ); diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index 364184e97..46a47b0a5 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -251,4 +251,12 @@ $(document).ready(function(){ { alInfo.delay(3000).fadeOut(2000, function() { alInfo.hide(); }); } + // Disable autocorrect in the search box + const inputs = document.querySelectorAll('input[type=search]'); + inputs.forEach(input => { + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) + }) }); From 1df9c4049b7d8428390c1aacdc7953d1899c2e0b Mon Sep 17 00:00:00 2001 From: Ghalid <24234921+Ghalid@users.noreply.github.com> Date: Sat, 21 Dec 2019 14:32:02 -0500 Subject: [PATCH 004/298] There should only be one search input on each page so there doesn't need to be an array anyway, remove arrow functions as per https://github.com/pi-hole/AdminLTE/pull/1100\#pullrequestreview-335618314 Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com> Remove const Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com> --- scripts/pi-hole/js/customdns.js | 12 +++++------- scripts/pi-hole/js/network.js | 12 +++++------- scripts/pi-hole/js/queries.js | 12 +++++------- scripts/pi-hole/js/settings.js | 12 +++++------- 4 files changed, 20 insertions(+), 28 deletions(-) diff --git a/scripts/pi-hole/js/customdns.js b/scripts/pi-hole/js/customdns.js index 6b1595f12..22450c705 100644 --- a/scripts/pi-hole/js/customdns.js +++ b/scripts/pi-hole/js/customdns.js @@ -47,13 +47,11 @@ $(document).ready(function() { } }); // Disable autocorrect in the search box - const inputs = document.querySelectorAll('input[type=search]'); - inputs.forEach(input => { - input.setAttribute('autocomplete', 'off') - input.setAttribute('autocorrect', 'off') - input.setAttribute('autocapitalize', 'off') - input.setAttribute('spellcheck', false) - }) + input = document.querySelector('input[type=search]'); + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) }); function addCustomDNS() diff --git a/scripts/pi-hole/js/network.js b/scripts/pi-hole/js/network.js index 441532dce..5f50d7f79 100644 --- a/scripts/pi-hole/js/network.js +++ b/scripts/pi-hole/js/network.js @@ -171,11 +171,9 @@ $(document).ready(function() { } ] }); // Disable autocorrect in the search box - const inputs = document.querySelectorAll('input[type=search]'); - inputs.forEach(input => { - input.setAttribute('autocomplete', 'off') - input.setAttribute('autocorrect', 'off') - input.setAttribute('autocapitalize', 'off') - input.setAttribute('spellcheck', false) - }) + input = document.querySelector('input[type=search]'); + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) } ); diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 418986a57..8ed60c59a 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -397,11 +397,9 @@ $(document).ready(function() { $("#resetButton").click( function () { tableApi.search("").draw(); $("#resetButton").hide(); } ); // Disable autocorrect in the search box - const inputs = document.querySelectorAll('input[type=search]'); - inputs.forEach(input => { - input.setAttribute('autocomplete', 'off') - input.setAttribute('autocorrect', 'off') - input.setAttribute('autocapitalize', 'off') - input.setAttribute('spellcheck', false) - }) + input = document.querySelector('input[type=search]'); + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) } ); diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index 46a47b0a5..eeb6ccfa5 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -252,11 +252,9 @@ $(document).ready(function(){ alInfo.delay(3000).fadeOut(2000, function() { alInfo.hide(); }); } // Disable autocorrect in the search box - const inputs = document.querySelectorAll('input[type=search]'); - inputs.forEach(input => { - input.setAttribute('autocomplete', 'off') - input.setAttribute('autocorrect', 'off') - input.setAttribute('autocapitalize', 'off') - input.setAttribute('spellcheck', false) - }) + input = document.querySelector('input[type=search]'); + input.setAttribute('autocomplete', 'off') + input.setAttribute('autocorrect', 'off') + input.setAttribute('autocapitalize', 'off') + input.setAttribute('spellcheck', false) }); From 0f0820dae47e661677a2a2ff29d38674ae537495 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 19 Jan 2020 13:49:46 +0200 Subject: [PATCH 005/298] Use `text()` for token. Signed-off-by: XhmikosR --- scripts/pi-hole/js/groups-adlists.js | 2 +- scripts/pi-hole/js/groups-clients.js | 2 +- scripts/pi-hole/js/groups-domains.js | 2 +- scripts/pi-hole/js/groups.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/pi-hole/js/groups-adlists.js b/scripts/pi-hole/js/groups-adlists.js index 53a137ba7..f4c3ced7a 100644 --- a/scripts/pi-hole/js/groups-adlists.js +++ b/scripts/pi-hole/js/groups-adlists.js @@ -9,7 +9,7 @@ var table; var groups = []; -var token = $("#token").html(); +var token = $("#token").text(); var info = null; function showAlert(type, icon, title, message) { diff --git a/scripts/pi-hole/js/groups-clients.js b/scripts/pi-hole/js/groups-clients.js index 68fbed9eb..2de8d1d5b 100644 --- a/scripts/pi-hole/js/groups-clients.js +++ b/scripts/pi-hole/js/groups-clients.js @@ -7,7 +7,7 @@ var table; var groups = []; -var token = $("#token").html(); +var token = $("#token").text(); var info = null; function showAlert(type, icon, title, message) { diff --git a/scripts/pi-hole/js/groups-domains.js b/scripts/pi-hole/js/groups-domains.js index b83c52967..e09d30628 100644 --- a/scripts/pi-hole/js/groups-domains.js +++ b/scripts/pi-hole/js/groups-domains.js @@ -9,7 +9,7 @@ var table; var groups = []; -var token = $("#token").html(); +var token = $("#token").text(); var info = null; function showAlert(type, icon, title, message) { diff --git a/scripts/pi-hole/js/groups.js b/scripts/pi-hole/js/groups.js index b7ec372c2..b3af908c9 100644 --- a/scripts/pi-hole/js/groups.js +++ b/scripts/pi-hole/js/groups.js @@ -8,7 +8,7 @@ /* global moment:false */ var table; -var token = $("#token").html(); +var token = $("#token").text(); var info = null; function showAlert(type, icon, title, message) { From dee16f6c7ae45867f25da99fbed3499f3bbeadee Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 3 Jan 2020 12:44:12 +0200 Subject: [PATCH 006/298] Switch to using Font Awesome This should be more consistent. Signed-off-by: XhmikosR --- scripts/pi-hole/js/customdns.js | 2 +- scripts/pi-hole/js/groups-adlists.js | 19 +++++++------------ scripts/pi-hole/js/groups-clients.js | 19 +++++++------------ scripts/pi-hole/js/groups-domains.js | 19 +++++++------------ scripts/pi-hole/js/groups.js | 14 +++++++------- scripts/pi-hole/js/list.js | 2 +- scripts/pi-hole/php/loginpage.php | 2 +- settings.php | 8 ++++---- 8 files changed, 35 insertions(+), 50 deletions(-) diff --git a/scripts/pi-hole/js/customdns.js b/scripts/pi-hole/js/customdns.js index 8d9b7f3cf..149fada99 100644 --- a/scripts/pi-hole/js/customdns.js +++ b/scripts/pi-hole/js/customdns.js @@ -52,7 +52,7 @@ $(document).ready(function() { "' data-ip='" + row[1] + "'>" + - '' + + '' + "" ); } diff --git a/scripts/pi-hole/js/groups-adlists.js b/scripts/pi-hole/js/groups-adlists.js index 53a137ba7..f282ebe00 100644 --- a/scripts/pi-hole/js/groups-adlists.js +++ b/scripts/pi-hole/js/groups-adlists.js @@ -19,7 +19,7 @@ function showAlert(type, icon, title, message) { case "info": opts = { type: "info", - icon: "glyphicon glyphicon-time", + icon: "far fa-clock", title: title, message: message }; @@ -42,7 +42,7 @@ function showAlert(type, icon, title, message) { case "warning": opts = { type: "warning", - icon: "glyphicon glyphicon-warning-sign", + icon: "fas fa-exclamation-triangle", title: title, message: message }; @@ -56,7 +56,7 @@ function showAlert(type, icon, title, message) { case "error": opts = { type: "danger", - icon: "glyphicon glyphicon-remove", + icon: "fas fa-times", title: " Error, something went wrong!
", message: message }; @@ -179,7 +179,7 @@ function initTable() { '"; $("td:eq(4)", row).html(button); }, @@ -249,7 +249,7 @@ function addAdlist() { }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-plus", "Successfully added adlist", address); + showAlert("success", "fas fa-plus", "Successfully added adlist", address); $("#new_address").val(""); $("#new_comment").val(""); table.ajax.reload(); @@ -305,12 +305,7 @@ function editAdlist() { }, success: function(response) { if (response.success) { - showAlert( - "success", - "glyphicon glyphicon-pencil", - "Successfully " + done + " adlist ", - address - ); + showAlert("success", "fas fa-pencil-alt", "Successfully " + done + " adlist ", address); } else { showAlert( "error", @@ -345,7 +340,7 @@ function deleteAdlist() { data: { action: "delete_adlist", id: id, token: token }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-trash", "Successfully deleted adlist ", address); + showAlert("success", "far fa-trash-alt", "Successfully deleted adlist ", address); table .row(tr) .remove() diff --git a/scripts/pi-hole/js/groups-clients.js b/scripts/pi-hole/js/groups-clients.js index 68fbed9eb..3148a5b21 100644 --- a/scripts/pi-hole/js/groups-clients.js +++ b/scripts/pi-hole/js/groups-clients.js @@ -17,7 +17,7 @@ function showAlert(type, icon, title, message) { case "info": opts = { type: "info", - icon: "glyphicon glyphicon-time", + icon: "far fa-clock", title: title, message: message }; @@ -40,7 +40,7 @@ function showAlert(type, icon, title, message) { case "warning": opts = { type: "warning", - icon: "glyphicon glyphicon-warning-sign", + icon: "fas fa-exclamation-triangle", title: title, message: message }; @@ -54,7 +54,7 @@ function showAlert(type, icon, title, message) { case "error": opts = { type: "danger", - icon: "glyphicon glyphicon-remove", + icon: "fas fa-times", title: " Error, something went wrong!
", message: message }; @@ -185,7 +185,7 @@ function initTable() { '"; $("td:eq(2)", row).html(button); }, @@ -252,7 +252,7 @@ function addClient() { data: { action: "add_client", ip: ip, token: token }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-plus", "Successfully added client", ip); + showAlert("success", "fas fa-plus", "Successfully added client", ip); reload_client_suggestions(); table.ajax.reload(); } else { @@ -294,12 +294,7 @@ function editClient() { data: { action: "edit_client", id: id, groups: groups, token: token }, success: function(response) { if (response.success) { - showAlert( - "success", - "glyphicon glyphicon-plus", - "Successfully " + done + " client", - ip_name - ); + showAlert("success", "fas fa-plus", "Successfully " + done + " client", ip_name); } else { showAlert("error", "Error while " + not_done + " client with ID " + id, response.message); } @@ -335,7 +330,7 @@ function deleteClient() { data: { action: "delete_client", id: id, token: token }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-trash", "Successfully deleted client ", ip_name); + showAlert("success", "far fa-trash-alt", "Successfully deleted client ", ip_name); table .row(tr) .remove() diff --git a/scripts/pi-hole/js/groups-domains.js b/scripts/pi-hole/js/groups-domains.js index b83c52967..a298531bc 100644 --- a/scripts/pi-hole/js/groups-domains.js +++ b/scripts/pi-hole/js/groups-domains.js @@ -19,7 +19,7 @@ function showAlert(type, icon, title, message) { case "info": opts = { type: "info", - icon: "glyphicon glyphicon-time", + icon: "far fa-clock", title: title, message: message }; @@ -42,7 +42,7 @@ function showAlert(type, icon, title, message) { case "warning": opts = { type: "warning", - icon: "glyphicon glyphicon-warning-sign", + icon: "fas fa-exclamation-triangle", title: title, message: message }; @@ -56,7 +56,7 @@ function showAlert(type, icon, title, message) { case "error": opts = { type: "danger", - icon: "glyphicon glyphicon-remove", + icon: "fas fa-times", title: " Error, something went wrong!
", message: message }; @@ -196,7 +196,7 @@ function initTable() { '"; $("td:eq(5)", row).html(button); }, @@ -268,7 +268,7 @@ function addDomain() { }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-plus", "Successfully added domain", domain); + showAlert("success", "fas fa-plus", "Successfully added domain", domain); $("#new_domain").val(""); $("#new_comment").val(""); table.ajax.reload(); @@ -329,12 +329,7 @@ function editDomain() { }, success: function(response) { if (response.success) { - showAlert( - "success", - "glyphicon glyphicon-pencil", - "Successfully " + done + " domain", - domain - ); + showAlert("success", "fas fa-pencil-alt", "Successfully " + done + " domain", domain); } else showAlert( "error", @@ -368,7 +363,7 @@ function deleteDomain() { data: { action: "delete_domain", id: id, token: token }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-trash", "Successfully deleted domain", domain); + showAlert("success", "far fa-trash-alt", "Successfully deleted domain", domain); table .row(tr) .remove() diff --git a/scripts/pi-hole/js/groups.js b/scripts/pi-hole/js/groups.js index b7ec372c2..338595151 100644 --- a/scripts/pi-hole/js/groups.js +++ b/scripts/pi-hole/js/groups.js @@ -18,7 +18,7 @@ function showAlert(type, icon, title, message) { case "info": opts = { type: "info", - icon: "glyphicon glyphicon-time", + icon: "far fa-clock", title: title, message: message }; @@ -41,7 +41,7 @@ function showAlert(type, icon, title, message) { case "warning": opts = { type: "warning", - icon: "glyphicon glyphicon-warning-sign", + icon: "fas fa-exclamation-triangle", title: title, message: message }; @@ -55,7 +55,7 @@ function showAlert(type, icon, title, message) { case "error": opts = { type: "danger", - icon: "glyphicon glyphicon-remove", + icon: "fas fa-times", title: " Error, something went wrong!
", message: message }; @@ -139,7 +139,7 @@ $(document).ready(function() { '"; $("td:eq(3)", row).html(button); } @@ -205,7 +205,7 @@ function addGroup() { data: { action: "add_group", name: name, desc: desc, token: token }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-plus", "Successfully added group", name); + showAlert("success", "fas fa-plus", "Successfully added group", name); $("#new_name").val(""); $("#new_desc").val(""); table.ajax.reload(); @@ -259,7 +259,7 @@ function editGroup() { }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-pencil", "Successfully " + done + " group", name); + showAlert("success", "fas fa-pencil-alt", "Successfully " + done + " group", name); } else { showAlert( "error", @@ -294,7 +294,7 @@ function deleteGroup() { data: { action: "delete_group", id: id, token: token }, success: function(response) { if (response.success) { - showAlert("success", "glyphicon glyphicon-trash", "Successfully deleted group ", name); + showAlert("success", "far fa-trash-alt", "Successfully deleted group ", name); table .row(tr) .remove() diff --git a/scripts/pi-hole/js/list.js b/scripts/pi-hole/js/list.js index 8a369c342..5765e2c7c 100644 --- a/scripts/pi-hole/js/list.js +++ b/scripts/pi-hole/js/list.js @@ -42,7 +42,7 @@ function addListEntry(entry, index, list, button, type) { disabled_message + "" + '' + '' ); // Handle button $(button + " #" + index).on("click", "button", function() { diff --git a/scripts/pi-hole/php/loginpage.php b/scripts/pi-hole/php/loginpage.php index fcd225dcd..9c32f7130 100644 --- a/scripts/pi-hole/php/loginpage.php +++ b/scripts/pi-hole/php/loginpage.php @@ -41,7 +41,7 @@
- +

diff --git a/settings.php b/settings.php index 1861eb36f..33033f24f 100644 --- a/settings.php +++ b/settings.php @@ -285,7 +285,7 @@ @@ -603,7 +603,7 @@ function convertseconds($argument) @@ -633,7 +633,7 @@ function convertseconds($argument) 0) { ?> @@ -647,7 +647,7 @@ function convertseconds($argument) From ab046070876593974a1d6965eabf2700bc44a079 Mon Sep 17 00:00:00 2001 From: Samu Voutilainen Date: Sun, 19 Jan 2020 11:55:40 +0200 Subject: [PATCH 007/298] FTL.php: parse port path from pihole-FTL.conf Signed-off-by: Samu Voutilainen --- scripts/pi-hole/php/FTL.php | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/scripts/pi-hole/php/FTL.php b/scripts/pi-hole/php/FTL.php index c33e061a1..397be1cb5 100644 --- a/scripts/pi-hole/php/FTL.php +++ b/scripts/pi-hole/php/FTL.php @@ -6,12 +6,37 @@ * This file is copyright under the latest version of the EUPL. * Please see LICENSE file for your rights under this license. */ +$piholeFTLConfFile = "/etc/pihole/pihole-FTL.conf"; + +function piholeFTLConfig() +{ + static $piholeFTLConfig; + global $piholeFTLConfFile; + + if(isset($piholeFTLConfig)) + { + return $piholeFTLConfig; + } + + if(is_readable($piholeFTLConfFile)) + { + $piholeFTLConfig = parse_ini_file($piholeFTLConfFile); + } + else + { + $piholeFTLConfig = array(); + } + + return $piholeFTLConfig; +} + function connectFTL($address, $port=4711) { if($address == "127.0.0.1") { + $config = piholeFTLConfig(); // Read port - $portfile = file_get_contents("/var/run/pihole-FTL.port"); + $portfile = file_get_contents($config["PORTFILE"]); if(is_numeric($portfile)) $port = intval($portfile); } From e70b9305bb2b609aab1378411c441063bd4d091a Mon Sep 17 00:00:00 2001 From: Samu Voutilainen Date: Sun, 19 Jan 2020 13:29:15 +0200 Subject: [PATCH 008/298] Whitespace cleanup Signed-off-by: Samu Voutilainen --- settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings.php b/settings.php index 1861eb36f..3ed690db3 100644 --- a/settings.php +++ b/settings.php @@ -302,8 +302,8 @@
-
-
+
+ From b7e9bd492c8abe5c9abfa817809b7e995ec46b06 Mon Sep 17 00:00:00 2001 From: Samu Voutilainen Date: Sun, 19 Jan 2020 13:29:39 +0200 Subject: [PATCH 009/298] Use piholeFTLConfig() to resolve pihole-FTL.conf contents Signed-off-by: Samu Voutilainen --- scripts/pi-hole/php/header.php | 12 ++---------- settings.php | 10 ++-------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index 49b503616..971f961e5 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -8,6 +8,7 @@ require "scripts/pi-hole/php/auth.php"; require "scripts/pi-hole/php/password.php"; + require_once "scripts/pi-hole/php/FTL.php"; $scriptname = basename($_SERVER['SCRIPT_FILENAME']); check_cors(); @@ -162,16 +163,7 @@ function pidofFTL() $FTLpid = intval(pidofFTL()); $FTL = ($FTLpid !== 0 ? true : false); - $piholeFTLConfFile = "/etc/pihole/pihole-FTL.conf"; - if(is_readable($piholeFTLConfFile)) - { - $piholeFTLConf = parse_ini_file($piholeFTLConfFile); - } - else - { - $piholeFTLConf = array(); - } - + $piholeFTLConf = piholeFTLConfig(); ?> From 5676ca6e3d6aeb2b20ac6cc93f84ac9dd2501ad5 Mon Sep 17 00:00:00 2001 From: 8633brown Date: Wed, 12 Feb 2020 13:40:44 -0700 Subject: [PATCH 012/298] resolve change request Signed-off-by: 8633brown --- scripts/pi-hole/php/header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index 47e44b608..72cc8b2e8 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -176,7 +176,7 @@ function pidofFTL() - <?php echo gethostname() ?: "Pi-hole Admin Console" ?> + Pi-hole <?php echo gethostname() ?> From 908c24c6c5b98fadda9029abaa28148af535367d Mon Sep 17 00:00:00 2001 From: 8633brown <31827535+8633brown@users.noreply.github.com> Date: Wed, 12 Feb 2020 21:55:37 -0700 Subject: [PATCH 013/298] Add "-" separator between title and hostname Co-Authored-By: Dan Schaper Signed-off-by: 8633brown --- scripts/pi-hole/php/header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index 72cc8b2e8..140796a25 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -176,7 +176,7 @@ function pidofFTL() - Pi-hole <?php echo gethostname() ?> + Pi-hole - <?php echo gethostname() ?> From 8d60ef30f56abbb38ed3c98b5cdb8cba0cb3afd8 Mon Sep 17 00:00:00 2001 From: 8633brown Date: Wed, 12 Feb 2020 22:16:05 -0700 Subject: [PATCH 014/298] only print hostname in title if gethostname function returns a valid hostname Signed-off-by: 8633brown --- scripts/pi-hole/php/header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index 140796a25..bbdc13f41 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -176,7 +176,7 @@ function pidofFTL() - Pi-hole - <?php echo gethostname() ?> + Pi-hole<?php if (gethostname()) {echo " - ", gethostname();} ?> From b2bc0cb211f869c4970c1a74f768e44990dd09bc Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 6 Mar 2020 17:41:50 +0200 Subject: [PATCH 015/298] Streamline button classes and display. Signed-off-by: XhmikosR --- custom_dns.php | 2 +- groups-adlists.php | 2 +- groups-clients.php | 2 +- groups-domains.php | 2 +- groups.php | 2 +- queries.php | 2 +- scripts/pi-hole/php/footer.php | 2 +- style/pi-hole.css | 1 - 8 files changed, 7 insertions(+), 8 deletions(-) diff --git a/custom_dns.php b/custom_dns.php index f1506dabe..8bf96ef88 100644 --- a/custom_dns.php +++ b/custom_dns.php @@ -81,7 +81,7 @@ - + diff --git a/groups-adlists.php b/groups-adlists.php index 9b806967f..718131523 100644 --- a/groups-adlists.php +++ b/groups-adlists.php @@ -64,7 +64,7 @@ - + diff --git a/groups-clients.php b/groups-clients.php index 2fb91834b..c152b991f 100644 --- a/groups-clients.php +++ b/groups-clients.php @@ -64,7 +64,7 @@ - + diff --git a/groups-domains.php b/groups-domains.php index c6a1836d4..35852a9f2 100644 --- a/groups-domains.php +++ b/groups-domains.php @@ -74,7 +74,7 @@ - + diff --git a/groups.php b/groups.php index 56b2c44d7..baec94cda 100644 --- a/groups.php +++ b/groups.php @@ -63,7 +63,7 @@ - + diff --git a/queries.php b/queries.php index 51c543e6a..23ccdb3fb 100644 --- a/queries.php +++ b/queries.php @@ -156,7 +156,7 @@
- + diff --git a/scripts/pi-hole/php/footer.php b/scripts/pi-hole/php/footer.php index 834b82733..1908933db 100644 --- a/scripts/pi-hole/php/footer.php +++ b/scripts/pi-hole/php/footer.php @@ -32,7 +32,7 @@ diff --git a/style/pi-hole.css b/style/pi-hole.css index 419db78fe..ac6055525 100644 --- a/style/pi-hole.css +++ b/style/pi-hole.css @@ -116,7 +116,6 @@ } #resetButton { - color: #f00; font-weight: 700; } From 91b7b09067a6d36723caa17596e987b36e863bf6 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 10 Mar 2020 13:32:45 +0200 Subject: [PATCH 016/298] Update xo to 0.27.2 Signed-off-by: XhmikosR --- package-lock.json | 1785 +++++++++++++++++++++++---------------------- package.json | 2 +- 2 files changed, 898 insertions(+), 889 deletions(-) diff --git a/package-lock.json b/package-lock.json index e88b1cc17..942ac3ab9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,18 +5,18 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "requires": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.8.3" } }, "@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", "dev": true, "requires": { "chalk": "^2.0.0", @@ -24,6 +24,15 @@ "js-tokens": "^4.0.0" } }, + "@babel/runtime": { + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.7.tgz", + "integrity": "sha512-+AATMUFppJDw6aiR5NVPHqIQBlV/Pj8wY/EZH+lmvRdUo9xBaz/rF3alAwFJQavvKfeOlPE7oaaDHVbcySbCsg==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, "@mrmlnc/readdir-enhanced": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", @@ -55,6 +64,18 @@ "defer-to-connect": "^1.0.1" } }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, + "@types/eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", + "dev": true + }, "@types/events": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", @@ -72,6 +93,12 @@ "@types/node": "*" } }, + "@types/json-schema": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", + "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==", + "dev": true + }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -79,9 +106,9 @@ "dev": true }, "@types/node": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.2.tgz", - "integrity": "sha512-B8emQA1qeKerqd1dmIsQYnXi+mmAzTB7flExjmy5X1aVAKFNNNDubkavwR13kR6JnpeLp3aLoJhwn9trWPAyFQ==", + "version": "13.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.0.tgz", + "integrity": "sha512-0ARSQootUG1RljH2HncpsY2TJBfGQIKOOi7kxzUY6z54ePu/ZD+wJA8zI2Q6v8rol2qpG/rvqsReco8zNMPvhQ==", "dev": true }, "@types/normalize-package-data": { @@ -90,25 +117,90 @@ "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", "dev": true }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, + "@typescript-eslint/eslint-plugin": { + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.23.0.tgz", + "integrity": "sha512-8iA4FvRsz8qTjR0L/nK9RcRUN3QtIHQiOm69FzV7WS3SE+7P7DyGGwh3k4UNR2JBbk+Ej2Io+jLAaqKibNhmtw==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "2.23.0", + "eslint-utils": "^1.4.3", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^3.0.0", + "tsutils": "^3.17.1" + } + }, + "@typescript-eslint/experimental-utils": { + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.23.0.tgz", + "integrity": "sha512-OswxY59RcXH3NNPmq+4Kis2CYZPurRU6mG5xPcn24CjFyfdVli5mySwZz/g/xDbJXgDsYqNGq7enV0IziWGXVQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "2.23.0", + "eslint-scope": "^5.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.23.0.tgz", + "integrity": "sha512-k61pn/Nepk43qa1oLMiyqApC6x5eP5ddPz6VUYXCAuXxbmRLqkPYzkFRKl42ltxzB2luvejlVncrEpflgQoSUg==", + "dev": true, + "requires": { + "@types/eslint-visitor-keys": "^1.0.0", + "@typescript-eslint/experimental-utils": "2.23.0", + "@typescript-eslint/typescript-estree": "2.23.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.23.0.tgz", + "integrity": "sha512-pmf7IlmvXdlEXvE/JWNNJpEvwBV59wtJqA8MLAxMKLXNKVRC3HZBXR/SlZLPWTCcwOSg9IM7GeRSV3SIerGVqw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "eslint-visitor-keys": "^1.1.0", + "glob": "^7.1.6", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^6.3.0", + "tsutils": "^3.17.1" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "acorn": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", - "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", "dev": true }, "acorn-jsx": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", - "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", "dev": true }, "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", + "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" @@ -149,12 +241,20 @@ } }, "ansi-escapes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", - "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } } }, "ansi-regex": { @@ -199,12 +299,6 @@ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, - "array-differ": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", - "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", - "dev": true - }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -339,55 +433,70 @@ } }, "boxen": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-3.2.0.tgz", - "integrity": "sha512-cU4J/+NodM3IHdSL2yN8bqYqnmlBTidDR4RC7nJs61ZmtGz8VZzM3HLQX0zY5mrSmPtR3xWwsq2jOUQqFZN8+A==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", + "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", "dev": true, "requires": { "ansi-align": "^3.0.0", "camelcase": "^5.3.1", - "chalk": "^2.4.2", + "chalk": "^3.0.0", "cli-boxes": "^2.2.0", - "string-width": "^3.0.0", - "term-size": "^1.2.0", - "type-fest": "^0.3.0", - "widest-line": "^2.0.0" + "string-width": "^4.1.0", + "term-size": "^2.1.0", + "type-fest": "^0.8.1", + "widest-line": "^3.1.0" }, "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "color-name": "~1.1.4" } }, - "type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, @@ -643,36 +752,25 @@ "dev": true }, "configstore": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-4.0.0.tgz", - "integrity": "sha512-CmquAXFBocrzaSM8mtGPMM/HiWmyIpr4CcJl/rgY2uCObZ/S7cKU0silxslqJejl+t/T9HS8E0PUNQD81JGUEQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", "dev": true, "requires": { - "dot-prop": "^4.1.0", + "dot-prop": "^5.2.0", "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" - }, - "dependencies": { - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" } }, + "confusing-browser-globals": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz", + "integrity": "sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw==", + "dev": true + }, "contains-path": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", @@ -695,6 +793,19 @@ "is-error": "^2.2.0" } }, + "cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "dev": true, + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -717,9 +828,9 @@ } }, "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", "dev": true }, "currently-unhandled": { @@ -801,9 +912,9 @@ } }, "defer-to-connect": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.1.tgz", - "integrity": "sha512-J7thop4u3mRTkYRQ+Vpfwy2G5Ehoy82I14+14W4YMDLKdWloI9gSzRbV30s/NckQGVJtPkWNcW4oMAUigTdqiQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", "dev": true }, "define-properties": { @@ -856,12 +967,6 @@ } } }, - "detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", - "dev": true - }, "dir-glob": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", @@ -898,12 +1003,12 @@ } }, "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", + "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==", "dev": true, "requires": { - "is-obj": "^1.0.0" + "is-obj": "^2.0.0" } }, "duplexer3": { @@ -952,9 +1057,9 @@ } }, "es-abstract": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0.tgz", - "integrity": "sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz", + "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", @@ -981,6 +1086,12 @@ "is-symbol": "^1.0.2" } }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -1030,6 +1141,20 @@ "table": "^5.2.3", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "eslint-ast-utils": { @@ -1043,9 +1168,9 @@ } }, "eslint-config-prettier": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.9.0.tgz", - "integrity": "sha512-k4E14HBtcLv0uqThaI6I/n1LEqROp8XaPu6SO9Z32u5NlGRC07Enu1Bh2KEFw4FNHbekH8yzbIU9kUGxbiGmCA==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.0.tgz", + "integrity": "sha512-AtndijGte1rPILInUdHjvKEGbIV06NuvPrqlIEaEaWtbtvJh464mDeyGMdZEQMsGvC0ZVkiex1fSNcC4HAbRGg==", "dev": true, "requires": { "get-stdin": "^6.0.0" @@ -1060,73 +1185,89 @@ } }, "eslint-config-xo": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.27.2.tgz", - "integrity": "sha512-qEuZP0zNQkWpOdNZvWnfY2GNp1AZ33uXgeOXl4DN5YVLHFvekHbeSM2FFZ8A489fp1rCCColVRlJsYMf28o4DA==", + "version": "0.29.1", + "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.29.1.tgz", + "integrity": "sha512-RDjeKh8CV0/EH4utW/6uOkwJJOOU+rX3uE5eUBOamcLNe4lNjyo8kSt3B6DzAm1L/1tWGikI7LFNVY9gG7PDQw==", + "dev": true, + "requires": { + "confusing-browser-globals": "1.0.9" + } + }, + "eslint-config-xo-typescript": { + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/eslint-config-xo-typescript/-/eslint-config-xo-typescript-0.26.0.tgz", + "integrity": "sha512-0bBfXLQX5F7JgJx5HIrSx3bGZk2D8W0uhYXB0jv6L0ztmWl4yqfCn6J4zgjUqMCsahHIjyaafBWrnc6eVaETWg==", "dev": true }, "eslint-formatter-pretty": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/eslint-formatter-pretty/-/eslint-formatter-pretty-2.1.1.tgz", - "integrity": "sha512-gWfagucSWBn82WxzwFloBTLAcwYDgnpAfiV5pQfyAV5YpZikuLflRU8nc3Ts9wnNvLhwk4blzb42/C495Yw7BA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-formatter-pretty/-/eslint-formatter-pretty-3.0.1.tgz", + "integrity": "sha512-hhQ/ASD4i6BAEalcEfUxesFtJFftT8xFsimCzUpPbTzygJ4J17yCGcJ3XKCB2g7XTJTv0pi7rVTadfHVmtfSRA==", "dev": true, "requires": { - "ansi-escapes": "^3.1.0", - "chalk": "^2.1.0", + "ansi-escapes": "^4.2.1", + "chalk": "^3.0.0", "eslint-rule-docs": "^1.1.5", - "log-symbols": "^2.0.0", + "log-symbols": "^3.0.0", "plur": "^3.0.1", - "string-width": "^2.0.0", - "supports-hyperlinks": "^1.0.1" + "string-width": "^4.2.0", + "supports-hyperlinks": "^2.0.0" }, "dependencies": { - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } }, - "ansi-regex": { + "chalk": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "color-name": "~1.1.4" } }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "has-flag": "^4.0.0" } } } }, "eslint-import-resolver-node": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", - "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz", + "integrity": "sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg==", "dev": true, "requires": { "debug": "^2.6.9", - "resolve": "^1.5.0" + "resolve": "^1.13.1" }, "dependencies": { "debug": { @@ -1147,9 +1288,9 @@ } }, "eslint-module-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.0.tgz", - "integrity": "sha512-kCo8pZaNz2dsAW7nCUjuVoI11EBXXpIzfNxmaoLhXoRDOnqXLC4iSGVRdZPhOitfbdEfMEfKOiENaK6wDPZEGw==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.2.tgz", + "integrity": "sha512-LGScZ/JSlqGKiT8OC+cYRxseMjyqt6QO54nl281CK93unD89ijSeRV6An8Ci/2nvWVKe8K/Tqdm75RQoIOCr+Q==", "dev": true, "requires": { "debug": "^2.6.9", @@ -1232,35 +1373,38 @@ } }, "eslint-plugin-ava": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-ava/-/eslint-plugin-ava-9.0.0.tgz", - "integrity": "sha512-mJqQ1wQ9pxBi5Pu+grrqjfuSLxiSSgnpa5p5vMdEpBqA9n9cUzSCv0xMZ/NkTMAj5ieOB3TWF8j+7C30Yiv4RA==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-ava/-/eslint-plugin-ava-10.2.0.tgz", + "integrity": "sha512-1EP9Mn/pau+ZxwRPDspiioRD6GHCSz7RywTmqW01JTxXvX0vKEV0odfWe+QL+jXfmqd83SHHvDJfOvYcyzoxYA==", "dev": true, "requires": { "deep-strict-equal": "^0.2.0", "enhance-visitors": "^1.0.0", - "espree": "^6.0.0", - "espurify": "^2.0.0", - "import-modules": "^1.1.0", + "espree": "^6.1.2", + "espurify": "^2.0.1", + "import-modules": "^2.0.0", "pkg-dir": "^4.2.0", "resolve-from": "^5.0.0" } }, "eslint-plugin-es": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-2.0.0.tgz", - "integrity": "sha512-f6fceVtg27BR02EYnBhgWLFQfK6bN4Ll0nQFrBHOlCsAyxeZkn0NHns5O0YZOPrV1B3ramd6cgFwaoFLcSkwEQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.0.tgz", + "integrity": "sha512-6/Jb/J/ZvSebydwbBJO1R9E5ky7YeElfK56Veh7e4QGFHCXoIXGH9HhVz+ibJLM3XJ1XjP+T7rKBLUa/Y7eIng==", "dev": true, "requires": { - "eslint-utils": "^1.4.2", + "eslint-utils": "^2.0.0", "regexpp": "^3.0.0" }, "dependencies": { - "regexpp": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", - "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", - "dev": true + "eslint-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", + "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } } } }, @@ -1283,9 +1427,9 @@ } }, "eslint-plugin-import": { - "version": "2.19.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.19.1.tgz", - "integrity": "sha512-x68131aKoCZlCae7rDXKSAQmbT5DQuManyXo2sK6fJJ0aK5CWAkv6A6HJZGgqC8IhjQxYPgo6/IY4Oz8AFsbBw==", + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz", + "integrity": "sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw==", "dev": true, "requires": { "array-includes": "^3.0.3", @@ -1342,24 +1486,39 @@ } }, "eslint-plugin-node": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz", - "integrity": "sha512-1CSyM/QCjs6PXaT18+zuAXsjXGIGo5Rw630rSKwokSs2jrYURQc4R5JZpoanNCqwNmepg+0eZ9L7YiRUJb8jiQ==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.0.0.tgz", + "integrity": "sha512-chUs/NVID+sknFiJzxoN9lM7uKSOEta8GC8365hw1nDfwIPIjjpRSwwPvQanWv8dt/pDe9EV4anmVSwdiSndNg==", "dev": true, "requires": { - "eslint-plugin-es": "^2.0.0", - "eslint-utils": "^1.4.2", + "eslint-plugin-es": "^3.0.0", + "eslint-utils": "^2.0.0", "ignore": "^5.1.1", "minimatch": "^3.0.4", "resolve": "^1.10.1", "semver": "^6.1.0" }, "dependencies": { + "eslint-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", + "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, "ignore": { "version": "5.1.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, @@ -1379,47 +1538,29 @@ "dev": true }, "eslint-plugin-unicorn": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-12.1.0.tgz", - "integrity": "sha512-DkPRrjaZaKa8GDjEyWGms/sqp2DcmVCcbwVi9WQXwN6+Sn0/joTC14SfA+BsCuxTaGPRm/7wa8NC8o5mNDyZpQ==", + "version": "16.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-16.1.1.tgz", + "integrity": "sha512-IMxCsntb0T8s660Irc40gtzXtxuXHcOn36G9G8OYKfiseBD/kNrA1cNJhsJ0xQteDASGrFwqdzBsYEkUvczhOA==", "dev": true, "requires": { "ci-info": "^2.0.0", "clean-regexp": "^1.0.0", "eslint-ast-utils": "^1.1.0", - "eslint-template-visitor": "^1.0.0", + "eslint-template-visitor": "^1.1.0", "import-modules": "^2.0.0", "lodash.camelcase": "^4.3.0", "lodash.defaultsdeep": "^4.6.1", "lodash.kebabcase": "^4.1.1", "lodash.snakecase": "^4.1.1", - "lodash.topairs": "^4.3.0", "lodash.upperfirst": "^4.3.1", - "read-pkg-up": "^7.0.0", + "read-pkg-up": "^7.0.1", + "regexp-tree": "^0.1.17", "regexpp": "^3.0.0", "reserved-words": "^0.1.2", - "safe-regex": "^2.0.2", - "semver": "^6.3.0" + "safe-regex": "^2.1.1", + "semver": "^7.1.2" }, "dependencies": { - "import-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-modules/-/import-modules-2.0.0.tgz", - "integrity": "sha512-iczM/v9drffdNnABOKwj0f9G3cFDon99VcG1mxeBsdqnbd+vnQ5c2uAiCHNQITqFTOPaEvwg3VjoWCur0uHLEw==", - "dev": true - }, - "parse-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", - "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1", - "lines-and-columns": "^1.1.6" - } - }, "read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -1450,19 +1591,13 @@ "read-pkg": "^5.2.0", "type-fest": "^0.8.1" } - }, - "regexpp": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", - "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", - "dev": true } } }, "eslint-rule-docs": { - "version": "1.1.172", - "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.172.tgz", - "integrity": "sha512-WgrhDcKxp8MdC9RRviS3BxXN4h20jHfSlXoOpTWJWxsWBHZ2nsTXhBXmRwMZJBj5elnZPPPMFN+z4yJMBsVwYA==", + "version": "1.1.181", + "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.181.tgz", + "integrity": "sha512-V8rGxWaMeW/AVWRbLLF6xVKq2BcZv+7D9OTBjAy/yfVnaGuxx3xmK5QYBzTM5nhaNWtfYcqJQkkkMMQQde99FQ==", "dev": true }, "eslint-scope": { @@ -1502,13 +1637,13 @@ "dev": true }, "espree": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", - "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.0.tgz", + "integrity": "sha512-Xs8airJ7RQolnDIbLtRutmfvSsAe0xqMMAantCN/GMoqf81TFbeI1T7Jpd56qYu1uuh32dOG5W/X9uO+ghPXzA==", "dev": true, "requires": { "acorn": "^7.1.0", - "acorn-jsx": "^5.1.0", + "acorn-jsx": "^5.2.0", "eslint-visitor-keys": "^1.1.0" } }, @@ -1525,9 +1660,9 @@ "dev": true }, "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz", + "integrity": "sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==", "dev": true, "requires": { "estraverse": "^4.0.0" @@ -1554,34 +1689,6 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -1730,9 +1837,9 @@ } }, "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", "dev": true }, "fast-diff": { @@ -1775,6 +1882,27 @@ } } } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } } } }, @@ -1791,9 +1919,9 @@ "dev": true }, "figures": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", - "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" @@ -1832,13 +1960,13 @@ } }, "find-cache-dir": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.2.0.tgz", - "integrity": "sha512-1JKclkYYsf1q9WIJKLZa9S9muC+08RIjzAlLrK4QcYLJMS6mk9yombQ9qf+zJ7H9LS800k0s44L4sDq9VYzqyg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", "dev": true, "requires": { "commondir": "^1.0.1", - "make-dir": "^3.0.0", + "make-dir": "^3.0.2", "pkg-dir": "^4.1.0" } }, @@ -1884,6 +2012,17 @@ "map-cache": "^0.2.2" } }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1915,10 +2054,13 @@ "dev": true }, "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } }, "get-value": { "version": "2.0.6", @@ -1956,18 +2098,18 @@ "dev": true }, "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz", + "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==", "dev": true, "requires": { - "ini": "^1.3.4" + "ini": "^1.3.5" } }, "globals": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", - "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", "dev": true, "requires": { "type-fest": "^0.8.1" @@ -2020,17 +2162,6 @@ "p-cancelable": "^1.0.0", "to-readable-stream": "^1.0.0", "url-parse-lax": "^3.0.0" - }, - "dependencies": { - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - } } }, "graceful-fs": { @@ -2099,15 +2230,15 @@ "dev": true }, "hosted-git-info": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", - "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, "http-cache-semantics": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz", - "integrity": "sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", "dev": true }, "iconv-lite": { @@ -2150,9 +2281,9 @@ "dev": true }, "import-modules": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/import-modules/-/import-modules-1.1.0.tgz", - "integrity": "sha1-dI23nFzEK7lwHvq0JPiU5yYA6dw=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-modules/-/import-modules-2.0.0.tgz", + "integrity": "sha512-iczM/v9drffdNnABOKwj0f9G3cFDon99VcG1mxeBsdqnbd+vnQ5c2uAiCHNQITqFTOPaEvwg3VjoWCur0uHLEw==", "dev": true }, "imurmurhash": { @@ -2190,32 +2321,97 @@ "dev": true }, "inquirer": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.1.tgz", - "integrity": "sha512-V1FFQ3TIO15det8PijPLFR9M9baSlnRs9nL7zWu1MNVA2T9YVl9ZbrHJhYs7e9X8jeMZ3lr2JH/rdHFgNCBdYw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", + "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", "dev": true, "requires": { "ansi-escapes": "^4.2.1", - "chalk": "^2.4.2", + "chalk": "^3.0.0", "cli-cursor": "^3.1.0", "cli-width": "^2.0.0", "external-editor": "^3.0.3", "figures": "^3.0.0", "lodash": "^4.17.15", "mute-stream": "0.0.8", - "run-async": "^2.2.0", + "run-async": "^2.4.0", "rxjs": "^6.5.3", "string-width": "^4.1.0", - "strip-ansi": "^5.1.0", + "strip-ansi": "^6.0.0", "through": "^2.3.6" - } - }, - "irregular-plurals": { + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "irregular-plurals": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-2.0.0.tgz", "integrity": "sha512-Y75zBYLkh0lJ9qxeHlMjQ7bSbyiSqNW/UOPWDmzC7cXskL1hekSITh1Oc6JV0XCWWZ9DE8VYSB71xocLk3gmGw==", "dev": true }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -2352,13 +2548,13 @@ } }, "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.1.tgz", + "integrity": "sha512-oiEcGoQbGc+3/iijAijrK2qFpkNoNjsHOm/5V5iaeydyrS/hnwaRCEgH5cpW0P3T1lSjV5piB7S5b5lEugNLhg==", "dev": true, "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" } }, "is-js-type": { @@ -2370,10 +2566,16 @@ "js-types": "^1.0.0" } }, + "is-negated-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", + "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", + "dev": true + }, "is-npm": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-3.0.0.tgz", - "integrity": "sha512-wsigDr1Kkschp2opC4G3yA6r9EgVA6NjRpWzIi9axXqeIaAATPRJc4uLujXe3Nd9uO8KoDyA4MD6aZSeXTADhA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", + "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", "dev": true }, "is-number": { @@ -2397,9 +2599,9 @@ } }, "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", "dev": true }, "is-obj-prop": { @@ -2413,13 +2615,10 @@ } }, "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", + "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", + "dev": true }, "is-plain-obj": { "version": "1.1.0", @@ -2461,11 +2660,14 @@ "has": "^1.0.3" } }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "requires": { + "is-unc-path": "^1.0.0" + } }, "is-string": { "version": "1.0.5", @@ -2482,6 +2684,21 @@ "has-symbols": "^1.0.1" } }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -2564,6 +2781,32 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "json5": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", + "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, "keyv": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", @@ -2574,9 +2817,9 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "latest-version": { @@ -2631,6 +2874,17 @@ "parse-json": "^2.2.0", "pify": "^2.0.0", "strip-bom": "^3.0.0" + }, + "dependencies": { + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + } } }, "locate-path": { @@ -2666,36 +2920,18 @@ "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true - }, "lodash.kebabcase": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", "dev": true }, - "lodash.mergewith": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", - "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", - "dev": true - }, "lodash.snakecase": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", "dev": true }, - "lodash.topairs": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.topairs/-/lodash.topairs-4.3.0.tgz", - "integrity": "sha1-O23qo31g+xFnE8RsXxfqGQ7EjWQ=", - "dev": true - }, "lodash.upperfirst": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", @@ -2709,12 +2945,12 @@ "dev": true }, "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", "dev": true, "requires": { - "chalk": "^2.0.1" + "chalk": "^2.4.2" } }, "loud-rejection": { @@ -2733,23 +2969,21 @@ "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", "dev": true }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, "make-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz", - "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", + "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", "dev": true, "requires": { "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "map-cache": { @@ -2906,24 +3140,48 @@ "dev": true }, "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "braces": "^3.0.1", + "picomatch": "^2.0.5" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } } }, "mimic-fn": { @@ -3013,27 +3271,6 @@ "integrity": "sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw==", "dev": true }, - "multimatch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", - "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", - "dev": true, - "requires": { - "@types/minimatch": "^3.0.3", - "array-differ": "^3.0.0", - "array-union": "^2.1.0", - "arrify": "^2.0.1", - "minimatch": "^3.0.4" - }, - "dependencies": { - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - } - } - }, "mute-stream": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", @@ -3097,19 +3334,10 @@ "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", "dev": true }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, "obj-props": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/obj-props/-/obj-props-1.2.0.tgz", - "integrity": "sha512-ZYpJyCe7O4rhNxB/2SZy8ADJww8RSRBdG36a4MWWq7JwILGJ1m61B90QJtxwDDNA0KzyR8V12Wikpjuux7Gl9Q==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/obj-props/-/obj-props-1.3.0.tgz", + "integrity": "sha512-k2Xkjx5wn6eC3537SWAXHzB6lkI81kS+icMKMkh4nG3w7shWG6MaWOBrNvhWVOszrtL5uxdfymQQfPUxwY+2eg==", "dev": true }, "object-copy": { @@ -3261,12 +3489,6 @@ "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", "dev": true }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, "p-limit": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", @@ -3285,6 +3507,12 @@ "p-limit": "^2.2.0" } }, + "p-reduce": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-2.1.0.tgz", + "integrity": "sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw==", + "dev": true + }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -3301,6 +3529,14 @@ "registry-auth-token": "^4.0.0", "registry-url": "^5.0.0", "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "parent-module": { @@ -3313,12 +3549,15 @@ } }, "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", + "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", "dev": true, "requires": { - "error-ex": "^1.2.0" + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1", + "lines-and-columns": "^1.1.6" } }, "pascalcase": { @@ -3345,12 +3584,6 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", @@ -3364,13 +3597,16 @@ "dev": true }, "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "picomatch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz", + "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==", + "dev": true }, "pify": { "version": "2.3.0", @@ -3378,87 +3614,6 @@ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, - "pkg-conf": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", - "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", - "dev": true, - "requires": { - "find-up": "^3.0.0", - "load-json-file": "^5.2.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "load-json-file": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", - "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "parse-json": "^4.0.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0", - "type-fest": "^0.3.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", - "dev": true - } - } - }, "pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -3522,12 +3677,6 @@ "integrity": "sha512-2yma2tog9VaRZY2mn3Wq51uiSW4NcPYT1cQdBagwyrznrilKSZwIZ0UG3ZPL/mx+axEns0hE35T5ufOYZXEnBQ==", "dev": true }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -3544,6 +3693,15 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "pupa": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz", + "integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==", + "dev": true, + "requires": { + "escape-goat": "^2.0.0" + } + }, "quick-lru": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", @@ -3585,13 +3743,24 @@ "load-json-file": "^2.0.0", "normalize-package-data": "^2.3.2", "path-type": "^2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, + }, + "dependencies": { + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + } + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, "requires": { "find-up": "^2.0.0", "read-pkg": "^2.0.0" @@ -3658,6 +3827,12 @@ "strip-indent": "^2.0.0" } }, + "regenerator-runtime": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.4.tgz", + "integrity": "sha512-plpwicqEzfEyTQohIKktWigcLzmNStMGwbOUbykx51/29Z3JOGYldaaNGK7ngNXV+UcoqvIMmloZ48Sr74sd+g==", + "dev": true + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -3680,25 +3855,24 @@ } }, "regexp-tree": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.17.tgz", - "integrity": "sha512-UnOJjFS/EPZmfISmYx+0PcDtPzyFKTe+cZTS5sM5hifnRUDRxoB1j4DAmGwqzxjwBGlwOkGfb2cDGHtjuEwqoA==", + "version": "0.1.20", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.20.tgz", + "integrity": "sha512-gSiH74kc00oTbQkN7tZogZe0ttKwyxyDVLAnU20aWoarbLE9AypbJHRlZ567h4Zi19q3cPVRWDYbfECElrHgsQ==", "dev": true }, "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", + "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", "dev": true }, "registry-auth-token": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.0.0.tgz", - "integrity": "sha512-lpQkHxd9UL6tb3k/aHAVfnVtn+Bcs9ob5InuFLLEDqSqeq+AljB8GZW9xY0x7F+xYwEcjKe07nyoxzEYz6yvkw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.1.1.tgz", + "integrity": "sha512-9bKS7nTl9+/A1s7tnPeGrUpRcVY+LUh7bfFgzpndALdPfXQBfQV77rQVtqgUV3ti4vc/Ik81Ex8UJDWDQ12zQA==", "dev": true, "requires": { - "rc": "^1.2.8", - "safe-buffer": "^5.0.1" + "rc": "^1.2.8" } }, "registry-url": { @@ -3729,9 +3903,9 @@ "dev": true }, "resolve": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.1.tgz", - "integrity": "sha512-fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg==", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -3793,9 +3967,9 @@ } }, "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", + "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", "dev": true, "requires": { "is-promise": "^2.1.0" @@ -3810,12 +3984,6 @@ "tslib": "^1.9.0" } }, - "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", - "dev": true - }, "safe-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", @@ -3832,24 +4000,24 @@ "dev": true }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.1.3.tgz", + "integrity": "sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA==", "dev": true }, "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", "dev": true, "requires": { - "semver": "^5.0.3" + "semver": "^6.3.0" }, "dependencies": { "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } @@ -4045,15 +4213,6 @@ } } }, - "sort-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", - "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", - "dev": true, - "requires": { - "is-plain-obj": "^1.0.0" - } - }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -4212,12 +4371,6 @@ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, "strip-indent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", @@ -4248,20 +4401,23 @@ } }, "supports-hyperlinks": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz", - "integrity": "sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz", + "integrity": "sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==", "dev": true, "requires": { - "has-flag": "^2.0.0", - "supports-color": "^5.0.0" + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" }, "dependencies": { - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, @@ -4303,13 +4459,10 @@ } }, "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", - "dev": true, - "requires": { - "execa": "^0.7.0" - } + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz", + "integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==", + "dev": true }, "text-table": { "version": "0.2.0", @@ -4317,12 +4470,6 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, - "the-argv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/the-argv/-/the-argv-1.0.0.tgz", - "integrity": "sha1-AIRwUAVzDdhNt1UlPJMa45jblSI=", - "dev": true - }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -4338,6 +4485,16 @@ "os-tmpdir": "~1.0.2" } }, + "to-absolute-glob": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", + "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" + } + }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -4404,11 +4561,20 @@ "dev": true }, "tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", "dev": true }, + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -4424,6 +4590,27 @@ "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "typescript": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", + "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", + "dev": true + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -4437,14 +4624,20 @@ } }, "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", "dev": true, "requires": { - "crypto-random-string": "^1.0.0" + "crypto-random-string": "^2.0.0" } }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -4486,23 +4679,70 @@ } }, "update-notifier": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-3.0.1.tgz", - "integrity": "sha512-grrmrB6Zb8DUiyDIaeRTBCkgISYUgETNe7NglEbVsrLWXeESnlCSP50WfRSj/GmzMPl6Uchj24S/p80nP/ZQrQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz", + "integrity": "sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==", "dev": true, "requires": { - "boxen": "^3.0.0", - "chalk": "^2.0.1", - "configstore": "^4.0.0", + "boxen": "^4.2.0", + "chalk": "^3.0.0", + "configstore": "^5.0.1", "has-yarn": "^2.1.0", "import-lazy": "^2.1.0", "is-ci": "^2.0.0", - "is-installed-globally": "^0.1.0", - "is-npm": "^3.0.0", + "is-installed-globally": "^0.3.1", + "is-npm": "^4.0.0", "is-yarn-global": "^0.3.0", "latest-version": "^5.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" + "pupa": "^2.0.1", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "uri-js": { @@ -4561,45 +4801,12 @@ } }, "widest-line": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", - "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "dev": true, "requires": { - "string-width": "^2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } + "string-width": "^4.0.0" } }, "word-wrap": { @@ -4624,278 +4831,80 @@ } }, "write-file-atomic": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" - } - }, - "write-json-file": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-2.3.0.tgz", - "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", - "dev": true, - "requires": { - "detect-indent": "^5.0.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "pify": "^3.0.0", - "sort-keys": "^2.0.0", - "write-file-atomic": "^2.0.0" - }, - "dependencies": { - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "write-pkg": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.2.0.tgz", - "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", - "dev": true, - "requires": { - "sort-keys": "^2.0.0", - "write-json-file": "^2.2.0" + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" } }, "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true }, "xo": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/xo/-/xo-0.25.3.tgz", - "integrity": "sha512-125on+kPp6oi+EfoAajJ58cGLxIurZqWrehhdqoApWXpano9GL5D0ElcSlbG7UeYAfmNSwKJGTxHoLsHLhrZqg==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/xo/-/xo-0.27.2.tgz", + "integrity": "sha512-vCkyHH/2tyQh1eplDDRMCAPfKA6fXnXiFkChOGLF/5FnOEe9e2qCydDZZrrKA+3Vd8xPsRdoAv/HTnmqa+Z71w==", "dev": true, "requires": { + "@typescript-eslint/eslint-plugin": "^2.21.0", + "@typescript-eslint/parser": "^2.21.0", "arrify": "^2.0.1", + "cosmiconfig": "^6.0.0", "debug": "^4.1.0", - "eslint": "^6.4.0", - "eslint-config-prettier": "^6.3.0", - "eslint-config-xo": "^0.27.1", - "eslint-formatter-pretty": "^2.0.0", - "eslint-plugin-ava": "^9.0.0", - "eslint-plugin-eslint-comments": "^3.0.1", - "eslint-plugin-import": "^2.18.2", - "eslint-plugin-no-use-extend-native": "^0.4.0", - "eslint-plugin-node": "^10.0.0", - "eslint-plugin-prettier": "^3.1.1", - "eslint-plugin-promise": "^4.0.0", - "eslint-plugin-unicorn": "^12.0.0", + "eslint": "^6.8.0", + "eslint-config-prettier": "^6.10.0", + "eslint-config-xo": "^0.29.0", + "eslint-config-xo-typescript": "^0.26.0", + "eslint-formatter-pretty": "^3.0.1", + "eslint-plugin-ava": "^10.0.1", + "eslint-plugin-eslint-comments": "^3.1.2", + "eslint-plugin-import": "^2.20.1", + "eslint-plugin-no-use-extend-native": "^0.4.1", + "eslint-plugin-node": "^11.0.0", + "eslint-plugin-prettier": "^3.1.2", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-unicorn": "^16.1.1", "find-cache-dir": "^3.0.0", + "fs-extra": "^8.1.0", "get-stdin": "^7.0.0", "globby": "^9.0.0", "has-flag": "^4.0.0", - "lodash.isequal": "^4.5.0", - "lodash.mergewith": "^4.6.2", + "imurmurhash": "^0.1.4", + "json-stable-stringify-without-jsonify": "^1.0.1", + "json5": "^2.1.1", + "lodash": "^4.17.15", "meow": "^5.0.0", - "multimatch": "^4.0.0", + "micromatch": "^4.0.2", "open-editor": "^2.0.1", + "p-reduce": "^2.1.0", "path-exists": "^4.0.0", - "pkg-conf": "^3.1.0", "prettier": "^1.15.2", "resolve-cwd": "^3.0.0", "resolve-from": "^5.0.0", - "semver": "^6.3.0", + "semver": "^7.1.3", "slash": "^3.0.0", - "update-notifier": "^3.0.1", - "xo-init": "^0.7.0" + "to-absolute-glob": "^2.0.2", + "typescript": "^3.0.0", + "update-notifier": "^4.0.0" } }, - "xo-init": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/xo-init/-/xo-init-0.7.0.tgz", - "integrity": "sha512-mrrCKMu52vz0u2tiOl8DoG709pBtnSp58bb4/j58a4jeXjrb1gV7dxfOBjOlXitYtfW2QnlxxxfAojoFcpynDg==", + "yaml": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.8.0.tgz", + "integrity": "sha512-6qI/tTx7OVtA4qNqD0OyutbM6Z9EKu4rxWm/2Y3FDEBQ4/2X2XAnyuRXMzAE2+1BPyqzksJZtrIwblOHg0IEzA==", "dev": true, "requires": { - "arrify": "^1.0.0", - "execa": "^0.9.0", - "has-yarn": "^1.0.0", - "minimist": "^1.1.3", - "path-exists": "^3.0.0", - "read-pkg-up": "^3.0.0", - "the-argv": "^1.0.0", - "write-pkg": "^3.1.0" - }, - "dependencies": { - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.9.0.tgz", - "integrity": "sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA==", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "has-yarn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-1.0.0.tgz", - "integrity": "sha1-ieJdtgS3Jcj1l2//Ct3JIbgopac=", - "dev": true - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - } - } + "@babel/runtime": "^7.8.7" } }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, "yargs-parser": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", diff --git a/package.json b/package.json index 39e04aede..8d2bcc5a4 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "test": "npm run xo" }, "devDependencies": { - "xo": "^0.25.3" + "xo": "^0.27.2" }, "prettier": { "bracketSpacing": true, From 5924937e73c359c84ac9354f4b75582ffcef1b1c Mon Sep 17 00:00:00 2001 From: Ghalid <24234921+Ghalid@users.noreply.github.com> Date: Thu, 12 Mar 2020 20:53:28 -0400 Subject: [PATCH 017/298] Readd autocorrect to groups search The main groups page does not have IPs/domains - since groups typically contain words having autocorrect here makes sense Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com> --- scripts/pi-hole/js/groups.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/pi-hole/js/groups.js b/scripts/pi-hole/js/groups.js index f6904d1ef..b3af908c9 100644 --- a/scripts/pi-hole/js/groups.js +++ b/scripts/pi-hole/js/groups.js @@ -185,13 +185,6 @@ $(document).ready(function() { table.order([[0, "asc"]]).draw(); $("#resetButton").hide(); }); - - // Disable autocorrect in the search box - var input = document.querySelector("input[type=search]"); - input.setAttribute("autocomplete", "off"); - input.setAttribute("autocorrect", "off"); - input.setAttribute("autocapitalize", "off"); - input.setAttribute("spellcheck", false); }); function addGroup() { From 6f17d7c4ea1bf3ee9a25e9986fdc76fb71182313 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 15 Mar 2020 11:55:47 +0200 Subject: [PATCH 018/298] Teleporter: reword export text Signed-off-by: XhmikosR --- settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.php b/settings.php index 4c37053de..27ce26b1c 100644 --- a/settings.php +++ b/settings.php @@ -1126,7 +1126,7 @@ function convertseconds($argument)
-

Export your Pi-hole lists as downloadable archive

+

Export your Pi-hole configuration (settings & lists) as a downloadable archive

From 4af6a0785a6c9543720d971c52298753e383ea2d Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 20 Mar 2020 10:31:32 +0200 Subject: [PATCH 019/298] Update xo to v0.28.0 Signed-off-by: XhmikosR --- package-lock.json | 935 +++++++++++++++++++++++++++++---- package.json | 6 +- scripts/pi-hole/js/settings.js | 2 +- 3 files changed, 833 insertions(+), 110 deletions(-) diff --git a/package-lock.json b/package-lock.json index 942ac3ab9..044bcf8a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -106,9 +106,9 @@ "dev": true }, "@types/node": { - "version": "13.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.0.tgz", - "integrity": "sha512-0ARSQootUG1RljH2HncpsY2TJBfGQIKOOi7kxzUY6z54ePu/ZD+wJA8zI2Q6v8rol2qpG/rvqsReco8zNMPvhQ==", + "version": "13.9.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.2.tgz", + "integrity": "sha512-bnoqK579sAYrQbp73wwglccjJ4sfRdKU7WNEZ5FW4K2U6Kc0/eZ5kvXG0JKsEKFB50zrFmfFt52/cvBbZa7eXg==", "dev": true }, "@types/normalize-package-data": { @@ -124,12 +124,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.23.0.tgz", - "integrity": "sha512-8iA4FvRsz8qTjR0L/nK9RcRUN3QtIHQiOm69FzV7WS3SE+7P7DyGGwh3k4UNR2JBbk+Ej2Io+jLAaqKibNhmtw==", + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.24.0.tgz", + "integrity": "sha512-wJRBeaMeT7RLQ27UQkDFOu25MqFOBus8PtOa9KaT5ZuxC1kAsd7JEHqWt4YXuY9eancX0GK9C68i5OROnlIzBA==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.23.0", + "@typescript-eslint/experimental-utils": "2.24.0", "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -137,32 +137,32 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.23.0.tgz", - "integrity": "sha512-OswxY59RcXH3NNPmq+4Kis2CYZPurRU6mG5xPcn24CjFyfdVli5mySwZz/g/xDbJXgDsYqNGq7enV0IziWGXVQ==", + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.24.0.tgz", + "integrity": "sha512-DXrwuXTdVh3ycNCMYmWhUzn/gfqu9N0VzNnahjiDJvcyhfBy4gb59ncVZVxdp5XzBC77dCncu0daQgOkbvPwBw==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.23.0", + "@typescript-eslint/typescript-estree": "2.24.0", "eslint-scope": "^5.0.0" } }, "@typescript-eslint/parser": { - "version": "2.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.23.0.tgz", - "integrity": "sha512-k61pn/Nepk43qa1oLMiyqApC6x5eP5ddPz6VUYXCAuXxbmRLqkPYzkFRKl42ltxzB2luvejlVncrEpflgQoSUg==", + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.24.0.tgz", + "integrity": "sha512-H2Y7uacwSSg8IbVxdYExSI3T7uM1DzmOn2COGtCahCC3g8YtM1xYAPi2MAHyfPs61VKxP/J/UiSctcRgw4G8aw==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.23.0", - "@typescript-eslint/typescript-estree": "2.23.0", + "@typescript-eslint/experimental-utils": "2.24.0", + "@typescript-eslint/typescript-estree": "2.24.0", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.23.0.tgz", - "integrity": "sha512-pmf7IlmvXdlEXvE/JWNNJpEvwBV59wtJqA8MLAxMKLXNKVRC3HZBXR/SlZLPWTCcwOSg9IM7GeRSV3SIerGVqw==", + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.24.0.tgz", + "integrity": "sha512-RJ0yMe5owMSix55qX7Mi9V6z2FDuuDpN6eR5fzRJrp+8in9UF41IGNQHbg5aMK4/PjVaEQksLvz0IA8n+Mr/FA==", "dev": true, "requires": { "debug": "^4.1.1", @@ -299,6 +299,12 @@ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, + "array-find": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-find/-/array-find-1.0.0.tgz", + "integrity": "sha1-bI4obRHtdoMn+OYuzuhzU8o+eLg=", + "dev": true + }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -353,6 +359,44 @@ "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", "dev": true }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", @@ -432,6 +476,18 @@ } } }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, "boxen": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", @@ -539,12 +595,112 @@ } } }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, "buf-compare": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buf-compare/-/buf-compare-1.0.1.tgz", "integrity": "sha1-/vKNqLgROgoNtEMLC2Rntpcws0o=", "dev": true }, + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -646,6 +802,16 @@ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -771,6 +937,18 @@ "integrity": "sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw==", "dev": true }, + "console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, "contains-path": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", @@ -793,6 +971,12 @@ "is-error": "^2.2.0" } }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, "cosmiconfig": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", @@ -806,6 +990,43 @@ "yaml": "^1.7.2" } }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -827,6 +1048,25 @@ } } }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, "crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -967,6 +1207,27 @@ } } }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, "dir-glob": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", @@ -1002,6 +1263,12 @@ "esutils": "^2.0.2" } }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, "dot-prop": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", @@ -1017,6 +1284,21 @@ "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", "dev": true }, + "elliptic": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", + "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -1041,6 +1323,17 @@ "lodash": "^4.13.1" } }, + "enhanced-resolve": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", + "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.2.0", + "tapable": "^0.1.8" + } + }, "env-editor": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/env-editor/-/env-editor-0.4.1.tgz", @@ -1287,6 +1580,47 @@ } } }, + "eslint-import-resolver-webpack": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.12.1.tgz", + "integrity": "sha512-O/sUAXk6GWrICiN8JUkkjdt9uZpqZHP+FVnTxtEILL6EZMaPSrnP4lGPSFwcKsv7O211maqq4Nz60+dh236hVg==", + "dev": true, + "requires": { + "array-find": "^1.0.0", + "debug": "^2.6.9", + "enhanced-resolve": "^0.9.1", + "find-root": "^1.1.0", + "has": "^1.0.3", + "interpret": "^1.2.0", + "lodash": "^4.17.15", + "node-libs-browser": "^1.0.0 || ^2.0.0", + "resolve": "^1.13.1", + "semver": "^5.7.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, "eslint-module-utils": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.2.tgz", @@ -1538,9 +1872,9 @@ "dev": true }, "eslint-plugin-unicorn": { - "version": "16.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-16.1.1.tgz", - "integrity": "sha512-IMxCsntb0T8s660Irc40gtzXtxuXHcOn36G9G8OYKfiseBD/kNrA1cNJhsJ0xQteDASGrFwqdzBsYEkUvczhOA==", + "version": "17.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-17.2.0.tgz", + "integrity": "sha512-0kYjrywf0kQxevFz571KrDfYMIRZ5Kq6dDgPU1EEBFeC181r+fAaPatBScWX+/hisKJ4+eCRFebxTeVylsSYmw==", "dev": true, "requires": { "ci-info": "^2.0.0", @@ -1548,14 +1882,9 @@ "eslint-ast-utils": "^1.1.0", "eslint-template-visitor": "^1.1.0", "import-modules": "^2.0.0", - "lodash.camelcase": "^4.3.0", - "lodash.defaultsdeep": "^4.6.1", - "lodash.kebabcase": "^4.1.1", - "lodash.snakecase": "^4.1.1", - "lodash.upperfirst": "^4.3.1", + "lodash": "^4.17.15", "read-pkg-up": "^7.0.1", - "regexp-tree": "^0.1.17", - "regexpp": "^3.0.0", + "regexp-tree": "^0.1.20", "reserved-words": "^0.1.2", "safe-regex": "^2.1.1", "semver": "^7.1.2" @@ -1595,9 +1924,9 @@ } }, "eslint-rule-docs": { - "version": "1.1.181", - "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.181.tgz", - "integrity": "sha512-V8rGxWaMeW/AVWRbLLF6xVKq2BcZv+7D9OTBjAy/yfVnaGuxx3xmK5QYBzTM5nhaNWtfYcqJQkkkMMQQde99FQ==", + "version": "1.1.182", + "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.182.tgz", + "integrity": "sha512-J+6vR2t1Z9+3uFS6rnrw9nN1V2XtoyIs5bGd52WOYN3glc1bJPa6TUxgj/ZjZ0z5rbZyqKT42RwzBMdAMxL+mg==", "dev": true }, "eslint-scope": { @@ -1637,12 +1966,12 @@ "dev": true }, "espree": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.0.tgz", - "integrity": "sha512-Xs8airJ7RQolnDIbLtRutmfvSsAe0xqMMAantCN/GMoqf81TFbeI1T7Jpd56qYu1uuh32dOG5W/X9uO+ghPXzA==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", "dev": true, "requires": { - "acorn": "^7.1.0", + "acorn": "^7.1.1", "acorn-jsx": "^5.2.0", "eslint-visitor-keys": "^1.1.0" } @@ -1689,6 +2018,22 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "events": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz", + "integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg==", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -1970,6 +2315,12 @@ "pkg-dir": "^4.1.0" } }, + "find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "dev": true + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -2229,6 +2580,37 @@ "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", "dev": true }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "hosted-git-info": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", @@ -2241,6 +2623,12 @@ "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", "dev": true }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -2250,6 +2638,12 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "dev": true + }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -2396,6 +2790,12 @@ } } }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, "irregular-plurals": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-2.0.0.tgz", @@ -2782,20 +3182,12 @@ "dev": true }, "json5": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", - "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.2.tgz", + "integrity": "sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ==", "dev": true, "requires": { - "minimist": "^1.2.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } + "minimist": "^1.2.5" } }, "jsonfile": { @@ -2902,42 +3294,12 @@ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", - "dev": true - }, - "lodash.defaultsdeep": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz", - "integrity": "sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA==", - "dev": true - }, "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, - "lodash.kebabcase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", - "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", - "dev": true - }, - "lodash.snakecase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", - "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", - "dev": true - }, - "lodash.upperfirst": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", - "integrity": "sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984=", - "dev": true - }, "lodash.zip": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz", @@ -3007,6 +3369,23 @@ "object-visit": "^1.0.0" } }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "memory-fs": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", + "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=", + "dev": true + }, "meow": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", @@ -3184,6 +3563,16 @@ } } }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -3196,6 +3585,18 @@ "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "dev": true }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -3206,9 +3607,9 @@ } }, "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "minimist-options": { @@ -3251,12 +3652,12 @@ } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", + "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", "dev": true, "requires": { - "minimist": "0.0.8" + "minimist": "^1.2.5" } }, "ms": { @@ -3308,6 +3709,45 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "node-libs-browser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.1", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "^1.0.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -3340,6 +3780,12 @@ "integrity": "sha512-k2Xkjx5wn6eC3537SWAXHzB6lkI81kS+icMKMkh4nG3w7shWG6MaWOBrNvhWVOszrtL5uxdfymQQfPUxwY+2eg==", "dev": true }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, "object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", @@ -3477,6 +3923,12 @@ "word-wrap": "~1.2.3" } }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -3539,6 +3991,12 @@ } } }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -3548,6 +4006,20 @@ "callsites": "^3.0.0" } }, + "parse-asn1": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", + "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, "parse-json": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", @@ -3566,6 +4038,12 @@ "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", "dev": true }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, "path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", @@ -3602,6 +4080,19 @@ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, + "pbkdf2": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "picomatch": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz", @@ -3665,6 +4156,18 @@ "fast-diff": "^1.1.2" } }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -3677,6 +4180,20 @@ "integrity": "sha512-2yma2tog9VaRZY2mn3Wq51uiSW4NcPYT1cQdBagwyrznrilKSZwIZ0UG3ZPL/mx+axEns0hE35T5ufOYZXEnBQ==", "dev": true }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -3702,12 +4219,43 @@ "escape-goat": "^2.0.0" } }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, "quick-lru": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", "dev": true }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, "rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", @@ -3720,12 +4268,6 @@ "strip-json-comments": "~2.0.1" }, "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -3817,6 +4359,38 @@ } } }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "redent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", @@ -3828,9 +4402,9 @@ } }, "regenerator-runtime": { - "version": "0.13.4", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.4.tgz", - "integrity": "sha512-plpwicqEzfEyTQohIKktWigcLzmNStMGwbOUbykx51/29Z3JOGYldaaNGK7ngNXV+UcoqvIMmloZ48Sr74sd+g==", + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", + "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", "dev": true }, "regex-not": { @@ -3855,9 +4429,9 @@ } }, "regexp-tree": { - "version": "0.1.20", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.20.tgz", - "integrity": "sha512-gSiH74kc00oTbQkN7tZogZe0ttKwyxyDVLAnU20aWoarbLE9AypbJHRlZ567h4Zi19q3cPVRWDYbfECElrHgsQ==", + "version": "0.1.21", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.21.tgz", + "integrity": "sha512-kUUXjX4AnqnR8KRTCrayAo9PzYMRKmVoGgaz2tBuz0MF3g1ZbGebmtW0yFHfFK9CmBjQKeYIgoL22pFLBJY7sw==", "dev": true }, "regexpp": { @@ -3966,6 +4540,16 @@ "glob": "^7.1.3" } }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, "run-async": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", @@ -3984,6 +4568,12 @@ "tslib": "^1.9.0" } }, + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", + "dev": true + }, "safe-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", @@ -4045,6 +4635,22 @@ } } }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -4306,6 +4912,29 @@ } } }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, "string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", @@ -4348,6 +4977,15 @@ "function-bind": "^1.1.1" } }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", @@ -4458,6 +5096,12 @@ } } }, + "tapable": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", + "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=", + "dev": true + }, "term-size": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz", @@ -4476,6 +5120,15 @@ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, + "timers-browserify": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", + "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -4495,6 +5148,12 @@ "is-negated-glob": "^1.0.0" } }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -4575,6 +5234,12 @@ "tslib": "^1.8.1" } }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -4760,6 +5425,24 @@ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, "url-parse-lax": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", @@ -4775,6 +5458,29 @@ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "dev": true, + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, "v8-compile-cache": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", @@ -4791,6 +5497,12 @@ "spdx-expression-parse": "^3.0.0" } }, + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -4849,13 +5561,13 @@ "dev": true }, "xo": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/xo/-/xo-0.27.2.tgz", - "integrity": "sha512-vCkyHH/2tyQh1eplDDRMCAPfKA6fXnXiFkChOGLF/5FnOEe9e2qCydDZZrrKA+3Vd8xPsRdoAv/HTnmqa+Z71w==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/xo/-/xo-0.28.0.tgz", + "integrity": "sha512-Ilen8cwO6KyCUmCIwBDnMRHArIm6jOfJViz6mwD5t63AsQC+xsmb2Vvvp0mkKCEzeY6J+tKVK+4mYGpqSYYKPA==", "dev": true, "requires": { - "@typescript-eslint/eslint-plugin": "^2.21.0", - "@typescript-eslint/parser": "^2.21.0", + "@typescript-eslint/eslint-plugin": "^2.23.0", + "@typescript-eslint/parser": "^2.23.0", "arrify": "^2.0.1", "cosmiconfig": "^6.0.0", "debug": "^4.1.0", @@ -4864,6 +5576,7 @@ "eslint-config-xo": "^0.29.0", "eslint-config-xo-typescript": "^0.26.0", "eslint-formatter-pretty": "^3.0.1", + "eslint-import-resolver-webpack": "^0.12.1", "eslint-plugin-ava": "^10.0.1", "eslint-plugin-eslint-comments": "^3.1.2", "eslint-plugin-import": "^2.20.1", @@ -4871,13 +5584,15 @@ "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-unicorn": "^16.1.1", - "find-cache-dir": "^3.0.0", + "eslint-plugin-unicorn": "^17.2.0", + "find-cache-dir": "^3.3.1", + "find-up": "^4.1.0", "fs-extra": "^8.1.0", "get-stdin": "^7.0.0", "globby": "^9.0.0", "has-flag": "^4.0.0", "imurmurhash": "^0.1.4", + "is-path-inside": "^3.0.2", "json-stable-stringify-without-jsonify": "^1.0.1", "json5": "^2.1.1", "lodash": "^4.17.15", @@ -4896,10 +5611,16 @@ "update-notifier": "^4.0.0" } }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, "yaml": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.8.0.tgz", - "integrity": "sha512-6qI/tTx7OVtA4qNqD0OyutbM6Z9EKu4rxWm/2Y3FDEBQ4/2X2XAnyuRXMzAE2+1BPyqzksJZtrIwblOHg0IEzA==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.8.2.tgz", + "integrity": "sha512-omakb0d7FjMo3R1D2EbTKVIk6dAVLRxFXdLZMEUToeAvuqgG/YuHMuQOZ5fgk+vQ8cx+cnGKwyg+8g8PNT0xQg==", "dev": true, "requires": { "@babel/runtime": "^7.8.7" diff --git a/package.json b/package.json index 8d2bcc5a4..cb42506fb 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "test": "npm run xo" }, "devDependencies": { - "xo": "^0.27.2" + "xo": "^0.28.0" }, "prettier": { "bracketSpacing": true, @@ -56,10 +56,12 @@ "unicorn/filename-case": "off", "unicorn/no-for-loop": "off", "unicorn/no-zero-fractions": "off", + "unicorn/prevent-abbreviations": "off", "unicorn/prefer-includes": "off", "unicorn/prefer-node-append": "off", "unicorn/prefer-query-selector": "off", - "unicorn/prefer-string-slice": "off" + "unicorn/prefer-string-slice": "off", + "unicorn/string-content": "off" } } } diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index b4fb0479c..d914588af 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -219,7 +219,7 @@ $(document).ready(function() { // Handle list deletion $("button[id^='adlist-btn-']").on("click", function(e) { - var id = parseInt($(this).context.id.replace(/[^0-9.]/g, ""), 10); + var id = parseInt($(this).context.id.replace(/[^\d.]/g, ""), 10); e.preventDefault(); var status = $('input[name="adlist-del-' + id + '"]').is(":checked"); From 8a4eb31886c6bf50fd2a886aad0f42b1973da058 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 26 Mar 2020 18:53:09 +0200 Subject: [PATCH 020/298] Update xo to v0.28.1 (#1194) Signed-off-by: XhmikosR --- package-lock.json | 161 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 83 insertions(+), 80 deletions(-) diff --git a/package-lock.json b/package-lock.json index 044bcf8a6..880a604a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,21 +13,27 @@ "@babel/highlight": "^7.8.3" } }, + "@babel/helper-validator-identifier": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz", + "integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==", + "dev": true + }, "@babel/highlight": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", - "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", "dev": true, "requires": { + "@babel/helper-validator-identifier": "^7.9.0", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" } }, "@babel/runtime": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.7.tgz", - "integrity": "sha512-+AATMUFppJDw6aiR5NVPHqIQBlV/Pj8wY/EZH+lmvRdUo9xBaz/rF3alAwFJQavvKfeOlPE7oaaDHVbcySbCsg==", + "version": "7.9.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz", + "integrity": "sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==", "dev": true, "requires": { "regenerator-runtime": "^0.13.4" @@ -106,9 +112,9 @@ "dev": true }, "@types/node": { - "version": "13.9.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.2.tgz", - "integrity": "sha512-bnoqK579sAYrQbp73wwglccjJ4sfRdKU7WNEZ5FW4K2U6Kc0/eZ5kvXG0JKsEKFB50zrFmfFt52/cvBbZa7eXg==", + "version": "12.12.31", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.31.tgz", + "integrity": "sha512-T+wnJno8uh27G9c+1T+a1/WYCHzLeDqtsGJkoEdSp2X8RTh3oOCZQcUnjAx90CS8cmmADX51O0FI/tu9s0yssg==", "dev": true }, "@types/normalize-package-data": { @@ -124,45 +130,45 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.24.0.tgz", - "integrity": "sha512-wJRBeaMeT7RLQ27UQkDFOu25MqFOBus8PtOa9KaT5ZuxC1kAsd7JEHqWt4YXuY9eancX0GK9C68i5OROnlIzBA==", + "version": "2.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.25.0.tgz", + "integrity": "sha512-W2YyMtjmlrOjtXc+FtTelVs9OhuR6OlYc4XKIslJ8PUJOqgYYAPRJhAqkYRQo3G4sjvG8jSodsNycEn4W2gHUw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.24.0", - "eslint-utils": "^1.4.3", + "@typescript-eslint/experimental-utils": "2.25.0", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", "tsutils": "^3.17.1" } }, "@typescript-eslint/experimental-utils": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.24.0.tgz", - "integrity": "sha512-DXrwuXTdVh3ycNCMYmWhUzn/gfqu9N0VzNnahjiDJvcyhfBy4gb59ncVZVxdp5XzBC77dCncu0daQgOkbvPwBw==", + "version": "2.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.25.0.tgz", + "integrity": "sha512-0IZ4ZR5QkFYbaJk+8eJ2kYeA+1tzOE1sBjbwwtSV85oNWYUBep+EyhlZ7DLUCyhMUGuJpcCCFL0fDtYAP1zMZw==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.24.0", - "eslint-scope": "^5.0.0" + "@typescript-eslint/typescript-estree": "2.25.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.24.0.tgz", - "integrity": "sha512-H2Y7uacwSSg8IbVxdYExSI3T7uM1DzmOn2COGtCahCC3g8YtM1xYAPi2MAHyfPs61VKxP/J/UiSctcRgw4G8aw==", + "version": "2.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.25.0.tgz", + "integrity": "sha512-mccBLaBSpNVgp191CP5W+8U1crTyXsRziWliCqzj02kpxdjKMvFHGJbK33NroquH3zB/gZ8H511HEsJBa2fNEg==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.24.0", - "@typescript-eslint/typescript-estree": "2.24.0", + "@typescript-eslint/experimental-utils": "2.25.0", + "@typescript-eslint/typescript-estree": "2.25.0", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.24.0.tgz", - "integrity": "sha512-RJ0yMe5owMSix55qX7Mi9V6z2FDuuDpN6eR5fzRJrp+8in9UF41IGNQHbg5aMK4/PjVaEQksLvz0IA8n+Mr/FA==", + "version": "2.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.25.0.tgz", + "integrity": "sha512-VUksmx5lDxSi6GfmwSK7SSoIKSw9anukWWNitQPqt58LuYrKalzsgeuignbqnB+rK/xxGlSsCy8lYnwFfB6YJg==", "dev": true, "requires": { "debug": "^4.1.1", @@ -1350,9 +1356,9 @@ } }, "es-abstract": { - "version": "1.17.4", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz", - "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==", + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", @@ -1436,6 +1442,15 @@ "v8-compile-cache": "^2.0.3" }, "dependencies": { + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", @@ -1461,9 +1476,9 @@ } }, "eslint-config-prettier": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.0.tgz", - "integrity": "sha512-AtndijGte1rPILInUdHjvKEGbIV06NuvPrqlIEaEaWtbtvJh464mDeyGMdZEQMsGvC0ZVkiex1fSNcC4HAbRGg==", + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz", + "integrity": "sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ==", "dev": true, "requires": { "get-stdin": "^6.0.0" @@ -1729,17 +1744,6 @@ "requires": { "eslint-utils": "^2.0.0", "regexpp": "^3.0.0" - }, - "dependencies": { - "eslint-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", - "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - } } }, "eslint-plugin-eslint-comments": { @@ -1833,15 +1837,6 @@ "semver": "^6.1.0" }, "dependencies": { - "eslint-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", - "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, "ignore": { "version": "5.1.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", @@ -1924,9 +1919,9 @@ } }, "eslint-rule-docs": { - "version": "1.1.182", - "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.182.tgz", - "integrity": "sha512-J+6vR2t1Z9+3uFS6rnrw9nN1V2XtoyIs5bGd52WOYN3glc1bJPa6TUxgj/ZjZ0z5rbZyqKT42RwzBMdAMxL+mg==", + "version": "1.1.183", + "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.183.tgz", + "integrity": "sha512-vjZaWoX9PXllvxqfCdahTpZAL1439e5eH6ljbENS8o62Sw3tvZIolt/zn9upLjzQihqiJAa9MS4DS1/Zna4o6A==", "dev": true }, "eslint-scope": { @@ -1951,9 +1946,9 @@ } }, "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", + "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" @@ -1989,12 +1984,20 @@ "dev": true }, "esquery": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz", - "integrity": "sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.2.0.tgz", + "integrity": "sha512-weltsSqdeWIX9G2qQZz7KlTRJdkkOCTPgLYJUz1Hacf48R4YOwGPHO3+ORfWedqJKbq5WQmsgK90n+pFLIKt/Q==", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "^5.0.0" + }, + "dependencies": { + "estraverse": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.0.0.tgz", + "integrity": "sha512-j3acdrMzqrxmJTNj5dbr1YbjacrYgAxVMeF0gK16E3j494mOe7xygM/ZLIguEQ0ETwAg2hlJCtHRGav+y0Ny5A==", + "dev": true + } } }, "esrecurse": { @@ -2434,9 +2437,9 @@ } }, "glob-parent": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", - "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -3652,9 +3655,9 @@ } }, "mkdirp": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", - "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", + "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", "dev": true, "requires": { "minimist": "^1.2.5" @@ -4094,9 +4097,9 @@ } }, "picomatch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz", - "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", "dev": true }, "pify": { @@ -5561,9 +5564,9 @@ "dev": true }, "xo": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/xo/-/xo-0.28.0.tgz", - "integrity": "sha512-Ilen8cwO6KyCUmCIwBDnMRHArIm6jOfJViz6mwD5t63AsQC+xsmb2Vvvp0mkKCEzeY6J+tKVK+4mYGpqSYYKPA==", + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/xo/-/xo-0.28.1.tgz", + "integrity": "sha512-MEbLch4PUwBZw9G+JU0xn6/Udl39LirSF1RfR+TN5Ql+HcwmLCEHFMcV0jL71FD1XopWIWkCDZ8d8QQWFvsdnw==", "dev": true, "requires": { "@typescript-eslint/eslint-plugin": "^2.23.0", @@ -5618,9 +5621,9 @@ "dev": true }, "yaml": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.8.2.tgz", - "integrity": "sha512-omakb0d7FjMo3R1D2EbTKVIk6dAVLRxFXdLZMEUToeAvuqgG/YuHMuQOZ5fgk+vQ8cx+cnGKwyg+8g8PNT0xQg==", + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.8.3.tgz", + "integrity": "sha512-X/v7VDnK+sxbQ2Imq4Jt2PRUsRsP7UcpSl3Llg6+NRRqWLIvxkMFYtH1FmvwNGYRKKPa+EPA4qDBlI9WVG1UKw==", "dev": true, "requires": { "@babel/runtime": "^7.8.7" diff --git a/package.json b/package.json index cb42506fb..483899656 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "test": "npm run xo" }, "devDependencies": { - "xo": "^0.28.0" + "xo": "^0.28.1" }, "prettier": { "bracketSpacing": true, From 0c29a09a4505b17a01361bac90b76113223433cf Mon Sep 17 00:00:00 2001 From: Rick van Hattem Date: Sun, 29 Mar 2020 23:33:47 +0200 Subject: [PATCH 021/298] Add correct IP sorting for the Custom DNS table Signed-off-by: Rick van Hattem --- custom_dns.php | 1 + scripts/pi-hole/js/customdns.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_dns.php b/custom_dns.php index f1506dabe..90e2a005e 100644 --- a/custom_dns.php +++ b/custom_dns.php @@ -89,6 +89,7 @@
+ Date: Sat, 4 Apr 2020 09:55:01 +0300 Subject: [PATCH 022/298] Bump xo from 0.28.1 to 0.28.2 (#1201) Bumps [xo](https://github.com/xojs/xo) from 0.28.1 to 0.28.2. - [Release notes](https://github.com/xojs/xo/releases) - [Commits](https://github.com/xojs/xo/compare/v0.28.1...v0.28.2) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- package-lock.json | 118 +++++++++++++++++++++++++++------------------- package.json | 2 +- 2 files changed, 71 insertions(+), 49 deletions(-) diff --git a/package-lock.json b/package-lock.json index 880a604a7..54d111724 100644 --- a/package-lock.json +++ b/package-lock.json @@ -112,9 +112,9 @@ "dev": true }, "@types/node": { - "version": "12.12.31", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.31.tgz", - "integrity": "sha512-T+wnJno8uh27G9c+1T+a1/WYCHzLeDqtsGJkoEdSp2X8RTh3oOCZQcUnjAx90CS8cmmADX51O0FI/tu9s0yssg==", + "version": "13.9.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.8.tgz", + "integrity": "sha512-1WgO8hsyHynlx7nhP1kr0OFzsgKz5XDQL+Lfc3b1Q3qIln/n8cKD4m09NJ0+P1Rq7Zgnc7N0+SsMnoD1rEb0kA==", "dev": true }, "@types/normalize-package-data": { @@ -130,45 +130,45 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.25.0.tgz", - "integrity": "sha512-W2YyMtjmlrOjtXc+FtTelVs9OhuR6OlYc4XKIslJ8PUJOqgYYAPRJhAqkYRQo3G4sjvG8jSodsNycEn4W2gHUw==", + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.26.0.tgz", + "integrity": "sha512-4yUnLv40bzfzsXcTAtZyTjbiGUXMrcIJcIMioI22tSOyAxpdXiZ4r7YQUU8Jj6XXrLz9d5aMHPQf5JFR7h27Nw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.25.0", + "@typescript-eslint/experimental-utils": "2.26.0", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", "tsutils": "^3.17.1" } }, "@typescript-eslint/experimental-utils": { - "version": "2.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.25.0.tgz", - "integrity": "sha512-0IZ4ZR5QkFYbaJk+8eJ2kYeA+1tzOE1sBjbwwtSV85oNWYUBep+EyhlZ7DLUCyhMUGuJpcCCFL0fDtYAP1zMZw==", + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.26.0.tgz", + "integrity": "sha512-RELVoH5EYd+JlGprEyojUv9HeKcZqF7nZUGSblyAw1FwOGNnmQIU8kxJ69fttQvEwCsX5D6ECJT8GTozxrDKVQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.25.0", + "@typescript-eslint/typescript-estree": "2.26.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "2.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.25.0.tgz", - "integrity": "sha512-mccBLaBSpNVgp191CP5W+8U1crTyXsRziWliCqzj02kpxdjKMvFHGJbK33NroquH3zB/gZ8H511HEsJBa2fNEg==", + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.26.0.tgz", + "integrity": "sha512-+Xj5fucDtdKEVGSh9353wcnseMRkPpEAOY96EEenN7kJVrLqy/EVwtIh3mxcUz8lsFXW1mT5nN5vvEam/a5HiQ==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.25.0", - "@typescript-eslint/typescript-estree": "2.25.0", + "@typescript-eslint/experimental-utils": "2.26.0", + "@typescript-eslint/typescript-estree": "2.26.0", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.25.0.tgz", - "integrity": "sha512-VUksmx5lDxSi6GfmwSK7SSoIKSw9anukWWNitQPqt58LuYrKalzsgeuignbqnB+rK/xxGlSsCy8lYnwFfB6YJg==", + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.26.0.tgz", + "integrity": "sha512-3x4SyZCLB4zsKsjuhxDLeVJN6W29VwBnYpCsZ7vIdPel9ZqLfIZJgJXO47MNUkurGpQuIBALdPQKtsSnWpE1Yg==", "dev": true, "requires": { "debug": "^4.1.1", @@ -1637,9 +1637,9 @@ } }, "eslint-module-utils": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.2.tgz", - "integrity": "sha512-LGScZ/JSlqGKiT8OC+cYRxseMjyqt6QO54nl281CK93unD89ijSeRV6An8Ci/2nvWVKe8K/Tqdm75RQoIOCr+Q==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", + "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", "dev": true, "requires": { "debug": "^2.6.9", @@ -1765,9 +1765,9 @@ } }, "eslint-plugin-import": { - "version": "2.20.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz", - "integrity": "sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw==", + "version": "2.20.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz", + "integrity": "sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg==", "dev": true, "requires": { "array-includes": "^3.0.3", @@ -1824,9 +1824,9 @@ } }, "eslint-plugin-node": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.0.0.tgz", - "integrity": "sha512-chUs/NVID+sknFiJzxoN9lM7uKSOEta8GC8365hw1nDfwIPIjjpRSwwPvQanWv8dt/pDe9EV4anmVSwdiSndNg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", + "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", "dev": true, "requires": { "eslint-plugin-es": "^3.0.0", @@ -1919,9 +1919,9 @@ } }, "eslint-rule-docs": { - "version": "1.1.183", - "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.183.tgz", - "integrity": "sha512-vjZaWoX9PXllvxqfCdahTpZAL1439e5eH6ljbENS8o62Sw3tvZIolt/zn9upLjzQihqiJAa9MS4DS1/Zna4o6A==", + "version": "1.1.184", + "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.184.tgz", + "integrity": "sha512-/BdfhXEVx+GwwaJfyyEC/j5fZ5WkGIMXpX3WwI/KNhVgrRYRk5dSMCmMzCrOcIr2P5jqgGnlfeY9A8eFnElEBA==", "dev": true }, "eslint-scope": { @@ -2346,9 +2346,9 @@ } }, "flatted": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", - "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", "dev": true }, "for-in": { @@ -4670,9 +4670,9 @@ "dev": true }, "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, "slash": { @@ -4960,24 +4960,46 @@ } } }, + "string.prototype.trimend": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.0.tgz", + "integrity": "sha512-EEJnGqa/xNfIg05SxiPSqRS7S9qwDhYts1TSLR1BQfYUfPe1stofgGKvwERK9+9yf+PpfBMlpBaCHucXGPQfUA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, "string.prototype.trimleft": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", - "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", "dev": true, "requires": { "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" } }, "string.prototype.trimright": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", - "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", "dev": true, "requires": { "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.0.tgz", + "integrity": "sha512-iCP8g01NFYiiBOnwG1Xc3WZLyoo+RuBymwIlWncShXDDJYWN6DbnM3odslBJdgCdRlq94B5s63NWAZlcn2CS4w==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" } }, "string_decoder": { @@ -5564,9 +5586,9 @@ "dev": true }, "xo": { - "version": "0.28.1", - "resolved": "https://registry.npmjs.org/xo/-/xo-0.28.1.tgz", - "integrity": "sha512-MEbLch4PUwBZw9G+JU0xn6/Udl39LirSF1RfR+TN5Ql+HcwmLCEHFMcV0jL71FD1XopWIWkCDZ8d8QQWFvsdnw==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/xo/-/xo-0.28.2.tgz", + "integrity": "sha512-7xOuOQHVcqZ07+Za8eemzJA0PfFdfqE9vCAJaJL0Jc1iBT1lVrNnc/tccGPmwN2rN4iRtHVCFxDLT5ILJ4UyUA==", "dev": true, "requires": { "@typescript-eslint/eslint-plugin": "^2.23.0", diff --git a/package.json b/package.json index 483899656..4cdd23d2b 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "test": "npm run xo" }, "devDependencies": { - "xo": "^0.28.1" + "xo": "^0.28.2" }, "prettier": { "bracketSpacing": true, From e27a1afff6c222fc7129378f8dc34e2b7376e2c3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2020 10:52:02 +0000 Subject: [PATCH 023/298] Bump xo from 0.28.2 to 0.28.3 Bumps [xo](https://github.com/xojs/xo) from 0.28.2 to 0.28.3. - [Release notes](https://github.com/xojs/xo/releases) - [Commits](https://github.com/xojs/xo/compare/v0.28.2...v0.28.3) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 60 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/package-lock.json b/package-lock.json index 54d111724..01ff069b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -112,9 +112,9 @@ "dev": true }, "@types/node": { - "version": "13.9.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.8.tgz", - "integrity": "sha512-1WgO8hsyHynlx7nhP1kr0OFzsgKz5XDQL+Lfc3b1Q3qIln/n8cKD4m09NJ0+P1Rq7Zgnc7N0+SsMnoD1rEb0kA==", + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.11.0.tgz", + "integrity": "sha512-uM4mnmsIIPK/yeO+42F2RQhGUIs39K2RFmugcJANppXe6J1nvH87PvzPZYpza7Xhhs8Yn9yIAVdLZ84z61+0xQ==", "dev": true }, "@types/normalize-package-data": { @@ -1919,9 +1919,9 @@ } }, "eslint-rule-docs": { - "version": "1.1.184", - "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.184.tgz", - "integrity": "sha512-/BdfhXEVx+GwwaJfyyEC/j5fZ5WkGIMXpX3WwI/KNhVgrRYRk5dSMCmMzCrOcIr2P5jqgGnlfeY9A8eFnElEBA==", + "version": "1.1.185", + "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.185.tgz", + "integrity": "sha512-1sea+uWAA76814hpwKb6IIXAx3catuivoYOlwgf96RFOhNfuE+LWsG7asIHUkAQ1Vx4SN/kfpU+lTXXnu1gg/w==", "dev": true }, "eslint-scope": { @@ -2951,9 +2951,9 @@ } }, "is-installed-globally": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.1.tgz", - "integrity": "sha512-oiEcGoQbGc+3/iijAijrK2qFpkNoNjsHOm/5V5iaeydyrS/hnwaRCEgH5cpW0P3T1lSjV5piB7S5b5lEugNLhg==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", + "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", "dev": true, "requires": { "global-dirs": "^2.0.1", @@ -3185,9 +3185,9 @@ "dev": true }, "json5": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.2.tgz", - "integrity": "sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", "dev": true, "requires": { "minimist": "^1.2.5" @@ -3655,9 +3655,9 @@ } }, "mkdirp": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", - "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "dev": true, "requires": { "minimist": "^1.2.5" @@ -3945,9 +3945,9 @@ "dev": true }, "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -4438,9 +4438,9 @@ "dev": true }, "regexpp": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", - "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", "dev": true }, "registry-auth-token": { @@ -4563,9 +4563,9 @@ } }, "rxjs": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", - "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz", + "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -5041,9 +5041,9 @@ "dev": true }, "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", + "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", "dev": true }, "supports-color": { @@ -5586,9 +5586,9 @@ "dev": true }, "xo": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/xo/-/xo-0.28.2.tgz", - "integrity": "sha512-7xOuOQHVcqZ07+Za8eemzJA0PfFdfqE9vCAJaJL0Jc1iBT1lVrNnc/tccGPmwN2rN4iRtHVCFxDLT5ILJ4UyUA==", + "version": "0.28.3", + "resolved": "https://registry.npmjs.org/xo/-/xo-0.28.3.tgz", + "integrity": "sha512-HA1wqG9NI9CTHVZeNyLVVs2HGwdcCtxSKPwlIVpwuZTGzVkv5rCzqBhTGKpLX6aYZu6YkuCL2pvRVyZqYMtlCw==", "dev": true, "requires": { "@typescript-eslint/eslint-plugin": "^2.23.0", diff --git a/package.json b/package.json index 4cdd23d2b..258af1935 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "test": "npm run xo" }, "devDependencies": { - "xo": "^0.28.2" + "xo": "^0.28.3" }, "prettier": { "bracketSpacing": true, From 373d59f7512badcecf3d80f787e4c8b39264e806 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 9 Apr 2020 09:03:50 +0200 Subject: [PATCH 024/298] Improve conditional forwarding settings so users can specify the subnet according to their needs. Signed-off-by: DL6ER --- scripts/pi-hole/js/settings.js | 34 +++++++++------- scripts/pi-hole/php/savesettings.php | 53 +++++++++++++++++++----- settings.php | 61 ++++++++++++++++++---------- 3 files changed, 102 insertions(+), 46 deletions(-) diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index 93974e5e4..b4a1a10e9 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -215,21 +215,8 @@ $(function() { // DHCP leases tooltips $(document).ready(function() { $('[data-toggle="tooltip"]').tooltip({ html: true, container: "body" }); -}); -// Change "?tab=" parameter in URL for save and reload -$(".nav-tabs a").on("shown.bs.tab", function(e) { - var tab = e.target.hash.substring(1); - window.history.pushState("", "", "?tab=" + tab); - if (tab === "piholedhcp") { - window.location.reload(); - } - - window.scrollTo(0, 0); -}); - -// Auto dismissal for info notifications -$(document).ready(function() { + // Auto dismissal for info notifications var alInfo = $("#alInfo"); if (alInfo.length) { alInfo.delay(3000).fadeOut(2000, function() { @@ -243,4 +230,23 @@ $(document).ready(function() { input.setAttribute("autocorrect", "off"); input.setAttribute("autocapitalize", "off"); input.setAttribute("spellcheck", false); + + // En-/disable conditional forwarding input fields based + // on the checkbox state + $('input[name="rev_server"]').click(function() { + $('input[name="rev_server_cidr"]').prop("disabled", !this.checked); + $('input[name="rev_server_target"]').prop("disabled", !this.checked); + $('input[name="rev_server_domain"]').prop("disabled", !this.checked); + }); +}); + +// Change "?tab=" parameter in URL for save and reload +$(".nav-tabs a").on("shown.bs.tab", function(e) { + var tab = e.target.hash.substring(1); + window.history.pushState("", "", "?tab=" + tab); + if (tab === "piholedhcp") { + window.location.reload(); + } + + window.scrollTo(0, 0); }); diff --git a/scripts/pi-hole/php/savesettings.php b/scripts/pi-hole/php/savesettings.php index 6c8b1e893..ecad2bcfc 100644 --- a/scripts/pi-hole/php/savesettings.php +++ b/scripts/pi-hole/php/savesettings.php @@ -19,6 +19,30 @@ function validIP($address){ return !filter_var($address, FILTER_VALIDATE_IP) === false; } +function validCIDRIP($address){ + // This validation strategy has been taken from ../js/groups-common.js + $isIPv6 = strpos($address, ":") !== false; + if($isIPv6) { + // One IPv6 element is 16bit: 0000 - FFFF + $v6elem = "[0-9A-Fa-f]{1,4}"; + // CIDR for IPv6 is any multiple of 4 from 4 up to 128 bit + $v6cidr = "(4"; + for ($i=8; $i <= 128; $i+=4) { + $v6cidr .= "|$i"; + } + $v6cidr .= ")"; + $validator = "/^(((?:$v6elem))((?::$v6elem))*::((?:$v6elem))((?::$v6elem))*|((?:$v6elem))((?::$v6elem)){7})\/$v6cidr$/"; + return preg_match($validator, $address); + } else { + // One IPv4 element is 8bit: 0 - 256 + $v4elem = "(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)"; + // Note that rev-server accepts only /8, /16, /24, and /32 + $allowedv4cidr = "(8|16|24|32)"; + $validator = "/^$v4elem\.$v4elem\.$v4elem\.$v4elem\/$allowedv4cidr$/"; + return preg_match($validator, $address); + } +} + // Check for existance of variable // and test it only if it exists function istrue(&$argument) { @@ -329,25 +353,32 @@ function addStaticDHCPLease($mac, $ip, $hostname) { $extra .= "no-dnssec"; } - // Check if Conditional Forwarding is requested - if(isset($_POST["conditionalForwarding"])) + // Check if rev-server is requested + if(isset($_POST["rev_server"])) { - // Validate conditional forwarding IP - if (!validIP($_POST["conditionalForwardingIP"])) + // Validate CIDR IP + if (!validCIDRIP($_POST["rev_server_cidr"])) { - $error .= "Conditional forwarding IP (".htmlspecialchars($_POST["conditionalForwardingIP"]).") is invalid!
"; + $error .= "Conditional forwarding subnet (\"".htmlspecialchars($_POST["rev_server_cidr"])."\") is invalid!
". + "This field requires CIDR notation for local subnets (e.g., 192.168.0.0/16).
". + "Please use only subnets /8, /16, /24, and /32.
"; } - // Validate conditional forwarding domain name - if(!validDomain($_POST["conditionalForwardingDomain"])) + // Validate target IP + if (!validIP($_POST["rev_server_target"])) { - $error .= "Conditional forwarding domain name (".htmlspecialchars($_POST["conditionalForwardingDomain"]).") is invalid!
"; + $error .= "Conditional forwarding target IP (\"".htmlspecialchars($_POST["rev_server_target"])."\") is invalid!
"; } + + // Validate conditional forwarding domain name (empty is okay) + if(strlen($_POST["rev_server_domain"]) > 0 && !validDomain($_POST["rev_server_domain"])) + { + $error .= "Conditional forwarding domain name (\"".htmlspecialchars($_POST["rev_server_domain"])."\") is invalid!
"; + } + if(!$error) { - $addressArray = explode(".", $_POST["conditionalForwardingIP"]); - $reverseAddress = $addressArray[2].".".$addressArray[1].".".$addressArray[0].".in-addr.arpa"; - $extra .= " conditional_forwarding ".$_POST["conditionalForwardingIP"]." ".$_POST["conditionalForwardingDomain"]." $reverseAddress"; + $extra .= " rev-server ".$_POST["rev_server_cidr"]." ".$_POST["rev_server_target"]." ".$_POST["rev_server_domain"]; } } diff --git a/settings.php b/settings.php index 18826b591..f797dc27d 100644 --- a/settings.php +++ b/settings.php @@ -164,12 +164,13 @@ } else { $DNSinterface = "single"; } -if (isset($setupVars["CONDITIONAL_FORWARDING"]) && ($setupVars["CONDITIONAL_FORWARDING"] == 1)) { - $conditionalForwarding = true; - $conditionalForwardingDomain = $setupVars["CONDITIONAL_FORWARDING_DOMAIN"]; - $conditionalForwardingIP = $setupVars["CONDITIONAL_FORWARDING_IP"]; +if (isset($setupVars["REV_SERVER"]) && ($setupVars["REV_SERVER"] == 1)) { + $rev_server = true; + $rev_server_cidr = $setupVars["REV_SERVER_CIDR"]; + $rev_server_target = $setupVars["REV_SERVER_TARGET"]; + $rev_server_domain = $setupVars["REV_SERVER_DOMAIN"]; } else { - $conditionalForwarding = false; + $rev_server = false; } ?> @@ -807,36 +808,54 @@ function convertseconds($argument) the size of your log might increase significantly when enabling DNSSEC. A DNSSEC resolver test can be found here.

- -

If not configured as your DHCP server, Pi-hole won't be able to + +

If not configured as your DHCP server, Pi-hole typically won't be able to determine the names of devices on your local network. As a result, tables such as Top Clients will only show IP addresses.

One solution for this is to configure Pi-hole to forward these - requests to your DHCP server (most likely your router), but only for devices on your - home network. To configure this we will need to know the IP - address of your DHCP server and the name of your local network.

-

Note: The local domain name must match the domain name specified - in your DHCP server, likely found within the DHCP settings.

+ requests to your DHCP server (most likely your router), but only for devices on your + home network. To configure this we will need to know the IP + address of your DHCP server and which addresses belong to your local network. + Exemplary inout is given below as placeholder in the text boxes (if empty).

+

If your local network spans 192.168.0.1 - 192.168.0.255, then you will have to input + 192.168.0.0/24. If your local network is 192.168.47.1 - 192.168.47.255, it will + be 192.168.47.0/24 and similar. If your network is larger, the CIDR has to be + different, for instance a range of 10.8.0.1 - 10.8.255.255 results in 10.8.0.0/16, + whereas an even wider network of 10.0.0.1 - 10.255.255.255 results in 10.0.0.0/8. + Feel free to reach out to us on our + Discourse forum + in case you need any assistance setting up local host name resolution for your particular system.

+

You can also specify a local domain name (like fritz.box) to ensure queries to + devices ending in your local domain name will not leave your network, however, this is optional. + The local domain name must match the domain name specified + in your DHCP server for this to work. You can likely find it within the DHCP settings.

- +
- - + + +
- + From 256887b78ebfb69e39571677b3adb9aa060b7db7 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2020 10:45:38 +0000 Subject: [PATCH 025/298] Bump xo from 0.28.3 to 0.29.0 Bumps [xo](https://github.com/xojs/xo) from 0.28.3 to 0.29.0. - [Release notes](https://github.com/xojs/xo/releases) - [Commits](https://github.com/xojs/xo/compare/v0.28.3...v0.29.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 124 ++++++++++++++++++++++++---------------------- package.json | 2 +- 2 files changed, 67 insertions(+), 59 deletions(-) diff --git a/package-lock.json b/package-lock.json index 01ff069b2..32a0538d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,9 +14,9 @@ } }, "@babel/helper-validator-identifier": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz", - "integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", "dev": true }, "@babel/highlight": { @@ -112,9 +112,9 @@ "dev": true }, "@types/node": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.11.0.tgz", - "integrity": "sha512-uM4mnmsIIPK/yeO+42F2RQhGUIs39K2RFmugcJANppXe6J1nvH87PvzPZYpza7Xhhs8Yn9yIAVdLZ84z61+0xQ==", + "version": "13.11.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.11.1.tgz", + "integrity": "sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g==", "dev": true }, "@types/normalize-package-data": { @@ -130,45 +130,45 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.26.0.tgz", - "integrity": "sha512-4yUnLv40bzfzsXcTAtZyTjbiGUXMrcIJcIMioI22tSOyAxpdXiZ4r7YQUU8Jj6XXrLz9d5aMHPQf5JFR7h27Nw==", + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.27.0.tgz", + "integrity": "sha512-/my+vVHRN7zYgcp0n4z5A6HAK7bvKGBiswaM5zIlOQczsxj/aiD7RcgD+dvVFuwFaGh5+kM7XA6Q6PN0bvb1tw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.26.0", + "@typescript-eslint/experimental-utils": "2.27.0", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", "tsutils": "^3.17.1" } }, "@typescript-eslint/experimental-utils": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.26.0.tgz", - "integrity": "sha512-RELVoH5EYd+JlGprEyojUv9HeKcZqF7nZUGSblyAw1FwOGNnmQIU8kxJ69fttQvEwCsX5D6ECJT8GTozxrDKVQ==", + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.27.0.tgz", + "integrity": "sha512-vOsYzjwJlY6E0NJRXPTeCGqjv5OHgRU1kzxHKWJVPjDYGbPgLudBXjIlc+OD1hDBZ4l1DLbOc5VjofKahsu9Jw==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.26.0", + "@typescript-eslint/typescript-estree": "2.27.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.26.0.tgz", - "integrity": "sha512-+Xj5fucDtdKEVGSh9353wcnseMRkPpEAOY96EEenN7kJVrLqy/EVwtIh3mxcUz8lsFXW1mT5nN5vvEam/a5HiQ==", + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.27.0.tgz", + "integrity": "sha512-HFUXZY+EdwrJXZo31DW4IS1ujQW3krzlRjBrFRrJcMDh0zCu107/nRfhk/uBasO8m0NVDbBF5WZKcIUMRO7vPg==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.26.0", - "@typescript-eslint/typescript-estree": "2.26.0", + "@typescript-eslint/experimental-utils": "2.27.0", + "@typescript-eslint/typescript-estree": "2.27.0", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.26.0.tgz", - "integrity": "sha512-3x4SyZCLB4zsKsjuhxDLeVJN6W29VwBnYpCsZ7vIdPel9ZqLfIZJgJXO47MNUkurGpQuIBALdPQKtsSnWpE1Yg==", + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.27.0.tgz", + "integrity": "sha512-t2miCCJIb/FU8yArjAvxllxbTiyNqaXJag7UOpB5DVoM3+xnjeOngtqlJkLRnMtzaRcJhe3CIR9RmL40omubhg==", "dev": true, "requires": { "debug": "^4.1.1", @@ -415,6 +415,12 @@ "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "dev": true }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", @@ -1502,9 +1508,9 @@ } }, "eslint-config-xo-typescript": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/eslint-config-xo-typescript/-/eslint-config-xo-typescript-0.26.0.tgz", - "integrity": "sha512-0bBfXLQX5F7JgJx5HIrSx3bGZk2D8W0uhYXB0jv6L0ztmWl4yqfCn6J4zgjUqMCsahHIjyaafBWrnc6eVaETWg==", + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/eslint-config-xo-typescript/-/eslint-config-xo-typescript-0.27.0.tgz", + "integrity": "sha512-aBRN8Nb6sc5oFIIuJoqr9uGCPGkVAVU2sRKN/RQ3iDt0AdrI/jgbgRQXpsAf3V8oK2013satUokRbHG6e7mrkQ==", "dev": true }, "eslint-formatter-pretty": { @@ -1867,9 +1873,9 @@ "dev": true }, "eslint-plugin-unicorn": { - "version": "17.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-17.2.0.tgz", - "integrity": "sha512-0kYjrywf0kQxevFz571KrDfYMIRZ5Kq6dDgPU1EEBFeC181r+fAaPatBScWX+/hisKJ4+eCRFebxTeVylsSYmw==", + "version": "18.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-18.0.1.tgz", + "integrity": "sha512-Y4bgygek4x4ogeMcSHr6MZi3frBPZ80eIpMOsxew7jAblb53OYflpRh0an62Z6jv/fw7D3TkXauqLOBWbT9adg==", "dev": true, "requires": { "ci-info": "^2.0.0", @@ -1879,10 +1885,10 @@ "import-modules": "^2.0.0", "lodash": "^4.17.15", "read-pkg-up": "^7.0.1", - "regexp-tree": "^0.1.20", + "regexp-tree": "^0.1.21", "reserved-words": "^0.1.2", "safe-regex": "^2.1.1", - "semver": "^7.1.2" + "semver": "^7.1.3" }, "dependencies": { "read-pkg": { @@ -2367,14 +2373,15 @@ } }, "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.0.tgz", + "integrity": "sha512-pmEYSk3vYsG/bF651KPUXZ+hvjpgWYw/Gc7W9NFUe3ZVLczKKWIij3IKpOrQcdw4TILtibFslZ0UmR8Vvzig4g==", "dev": true, "requires": { + "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "jsonfile": "^6.0.1", + "universalify": "^1.0.0" } }, "fs.realpath": { @@ -3194,12 +3201,13 @@ } }, "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", + "integrity": "sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==", "dev": true, "requires": { - "graceful-fs": "^4.1.6" + "graceful-fs": "^4.1.6", + "universalify": "^1.0.0" } }, "keyv": { @@ -4145,9 +4153,9 @@ "dev": true }, "prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.4.tgz", + "integrity": "sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w==", "dev": true }, "prettier-linter-helpers": { @@ -4593,9 +4601,9 @@ "dev": true }, "semver": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.1.3.tgz", - "integrity": "sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.2.1.tgz", + "integrity": "sha512-aHhm1pD02jXXkyIpq25qBZjr3CQgg8KST8uX0OWXch3xE6jw+1bfbWnCjzMwojsTquroUmKFHNzU6x26mEiRxw==", "dev": true }, "semver-diff": { @@ -5323,9 +5331,9 @@ } }, "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", + "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", "dev": true }, "unset-value": { @@ -5586,20 +5594,20 @@ "dev": true }, "xo": { - "version": "0.28.3", - "resolved": "https://registry.npmjs.org/xo/-/xo-0.28.3.tgz", - "integrity": "sha512-HA1wqG9NI9CTHVZeNyLVVs2HGwdcCtxSKPwlIVpwuZTGzVkv5rCzqBhTGKpLX6aYZu6YkuCL2pvRVyZqYMtlCw==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/xo/-/xo-0.29.0.tgz", + "integrity": "sha512-PpNFFRiAVwEeYqxxZxbLwo4FXu0/gZvQzDUgyKmFNkNG7NBEtoo+Csa4t9XAUjxd0gKC7sOakt320ovxeRPQPQ==", "dev": true, "requires": { - "@typescript-eslint/eslint-plugin": "^2.23.0", - "@typescript-eslint/parser": "^2.23.0", + "@typescript-eslint/eslint-plugin": "^2.27.0", + "@typescript-eslint/parser": "^2.27.0", "arrify": "^2.0.1", "cosmiconfig": "^6.0.0", "debug": "^4.1.0", "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.0", "eslint-config-xo": "^0.29.0", - "eslint-config-xo-typescript": "^0.26.0", + "eslint-config-xo-typescript": "^0.27.0", "eslint-formatter-pretty": "^3.0.1", "eslint-import-resolver-webpack": "^0.12.1", "eslint-plugin-ava": "^10.0.1", @@ -5609,10 +5617,10 @@ "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-unicorn": "^17.2.0", + "eslint-plugin-unicorn": "^18.0.1", "find-cache-dir": "^3.3.1", "find-up": "^4.1.0", - "fs-extra": "^8.1.0", + "fs-extra": "^9.0.0", "get-stdin": "^7.0.0", "globby": "^9.0.0", "has-flag": "^4.0.0", @@ -5626,10 +5634,10 @@ "open-editor": "^2.0.1", "p-reduce": "^2.1.0", "path-exists": "^4.0.0", - "prettier": "^1.15.2", + "prettier": "^2.0.4", "resolve-cwd": "^3.0.0", "resolve-from": "^5.0.0", - "semver": "^7.1.3", + "semver": "^7.2.1", "slash": "^3.0.0", "to-absolute-glob": "^2.0.2", "typescript": "^3.0.0", diff --git a/package.json b/package.json index 258af1935..c9d337913 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "test": "npm run xo" }, "devDependencies": { - "xo": "^0.28.3" + "xo": "^0.29.0" }, "prettier": { "bracketSpacing": true, From ae1301456582e2fc415edc46a6b1ebfbd5d17401 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 10 Apr 2020 21:28:54 +0300 Subject: [PATCH 026/298] Adapt to the new rules. Signed-off-by: XhmikosR --- package.json | 7 +- scripts/pi-hole/js/auditlog.js | 30 ++---- scripts/pi-hole/js/customdns.js | 14 +-- scripts/pi-hole/js/db_graph.js | 54 ++++------ scripts/pi-hole/js/db_lists.js | 62 ++++-------- scripts/pi-hole/js/db_queries.js | 78 +++++---------- scripts/pi-hole/js/debug.js | 8 +- scripts/pi-hole/js/footer.js | 24 ++--- scripts/pi-hole/js/gravity.js | 12 +-- scripts/pi-hole/js/groups-adlists.js | 37 ++++--- scripts/pi-hole/js/groups-clients.js | 53 ++++------ scripts/pi-hole/js/groups-common.js | 2 +- scripts/pi-hole/js/groups-domains.js | 52 ++++------ scripts/pi-hole/js/groups.js | 31 +++--- scripts/pi-hole/js/index.js | 122 ++++++++++------------- scripts/pi-hole/js/ip-address-sorting.js | 6 +- scripts/pi-hole/js/network.js | 16 +-- scripts/pi-hole/js/queries.js | 70 ++++++------- scripts/pi-hole/js/queryads.js | 28 ++---- scripts/pi-hole/js/settings.js | 64 ++++++------ scripts/pi-hole/js/taillog-FTL.js | 10 +- scripts/pi-hole/js/taillog.js | 10 +- 22 files changed, 327 insertions(+), 463 deletions(-) diff --git a/package.json b/package.json index c9d337913..b77b828a3 100644 --- a/package.json +++ b/package.json @@ -23,13 +23,14 @@ "xo": "^0.29.0" }, "prettier": { + "arrowParens": "avoid", "bracketSpacing": true, + "endOfLine": "auto", "printWidth": 100, "singleQuote": false, "trailingComma": "none" }, "xo": { - "space": 2, "envs": [ "browser", "jquery" @@ -40,6 +41,7 @@ }, "esnext": false, "prettier": true, + "space": 2, "ignores": [ "**/vendor/**" ], @@ -56,11 +58,12 @@ "unicorn/filename-case": "off", "unicorn/no-for-loop": "off", "unicorn/no-zero-fractions": "off", - "unicorn/prevent-abbreviations": "off", "unicorn/prefer-includes": "off", "unicorn/prefer-node-append": "off", + "unicorn/prefer-number-properties": "off", "unicorn/prefer-query-selector": "off", "unicorn/prefer-string-slice": "off", + "unicorn/prevent-abbreviations": "off", "unicorn/string-content": "off" } } diff --git a/scripts/pi-hole/js/auditlog.js b/scripts/pi-hole/js/auditlog.js index 3850b5deb..05189d6b8 100644 --- a/scripts/pi-hole/js/auditlog.js +++ b/scripts/pi-hole/js/auditlog.js @@ -18,24 +18,20 @@ function escapeHtml(text) { "'": "'" }; - return text.replace(/[&<>"']/g, function(m) { + return text.replace(/[&<>"']/g, function (m) { return map[m]; }); } function updateTopLists() { - $.getJSON("api.php?topItems=audit", function(data) { + $.getJSON("api.php?topItems=audit", function (data) { if ("FTLnotrunning" in data) { return; } // Clear tables before filling them with data - $("#domain-frequency td") - .parent() - .remove(); - $("#ad-frequency td") - .parent() - .remove(); + $("#domain-frequency td").parent().remove(); + $("#ad-frequency td").parent().remove(); var domaintable = $("#domain-frequency").find("tbody:last"); var adtable = $("#ad-frequency").find("tbody:last"); var url, domain; @@ -105,10 +101,10 @@ function add(domain, list) { url: "scripts/pi-hole/php/add.php", method: "post", data: { domain: domain, list: list, token: token }, - success: function() { + success: function () { updateTopLists(); }, - error: function(jqXHR, exception) { + error: function (jqXHR, exception) { console.log(exception); } }); @@ -130,14 +126,12 @@ function auditUrl(url) { add(url, "audit"); } -$(document).ready(function() { +$(document).ready(function () { // Pull in data via AJAX updateTopLists(); - $("#domain-frequency tbody").on("click", "button", function() { - var url = $(this) - .parents("tr")[0] - .textContent.split(" ")[0]; + $("#domain-frequency tbody").on("click", "button", function () { + var url = $(this).parents("tr")[0].textContent.split(" ")[0]; if ($(this).context.textContent === " Blacklist") { blacklistUrl(url); } else { @@ -145,10 +139,8 @@ $(document).ready(function() { } }); - $("#ad-frequency tbody").on("click", "button", function() { - var url = $(this) - .parents("tr")[0] - .textContent.split(" ")[0]; + $("#ad-frequency tbody").on("click", "button", function () { + var url = $(this).parents("tr")[0].textContent.split(" ")[0]; if ($(this).context.textContent === " Whitelist") { whitelistUrl(url); } else { diff --git a/scripts/pi-hole/js/customdns.js b/scripts/pi-hole/js/customdns.js index 248eaa587..7f7d23432 100644 --- a/scripts/pi-hole/js/customdns.js +++ b/scripts/pi-hole/js/customdns.js @@ -36,7 +36,7 @@ function showAlert(type, message) { alertElement.delay(8000).fadeOut(2000); } -$(document).ready(function() { +$(document).ready(function () { $("#btnAdd").on("click", addCustomDNS); table = $("#customDNSTable").DataTable({ @@ -45,7 +45,7 @@ $(document).ready(function() { columnDefs: [ { targets: 2, - render: function(data, type, row) { + render: function (data, type, row) { return ( '
IP of your routerLocal domain nameLocal network in CIDR notationIP address of your DHCP server (router)Local domain name (optional)
- value=""> + value="" + disabled> value=""> + + value="" + disabled> + value="" + disabled>
"; - titleLines.forEach(function(title) { + titleLines.forEach(function (title) { innerHtml += ""; }); innerHtml += ""; var printed = 0; - bodyLines.forEach(function(body, i) { + bodyLines.forEach(function (body, i) { var colors = tooltip.labelColors[i]; var style = "background:" + colors.backgroundColor; style += "; border-color:" + colors.borderColor; @@ -129,7 +129,7 @@ var customTooltips = function(tooltip) { var failures = 0; function updateQueriesOverTime() { - $.getJSON("api.php?overTimeData10mins", function(data) { + $.getJSON("api.php?overTimeData10mins", function (data) { if ("FTLnotrunning" in data) { return; } @@ -168,12 +168,12 @@ function updateQueriesOverTime() { $("#queries-over-time .overlay").hide(); timeLineChart.update(); }) - .done(function() { + .done(function () { // Reload graph after 10 minutes failures = 0; setTimeout(updateQueriesOverTime, 600000); }) - .fail(function() { + .fail(function () { failures++; if (failures < 5) { // Try again after 1 minute only if this has not failed more @@ -184,14 +184,14 @@ function updateQueriesOverTime() { } function updateQueryTypesPie() { - $.getJSON("api.php?getQueryTypes", function(data) { + $.getJSON("api.php?getQueryTypes", function (data) { if ("FTLnotrunning" in data) { return; } var colors = []; // Get colors from AdminLTE - $.each($.AdminLTE.options.colors, function(key, value) { + $.each($.AdminLTE.options.colors, function (key, value) { colors.push(value); }); var v = [], @@ -205,7 +205,7 @@ function updateQueryTypesPie() { iter = data; } - $.each(iter, function(key, value) { + $.each(iter, function (key, value) { v.push(value); c.push(colors.shift()); k.push(key); @@ -223,7 +223,7 @@ function updateQueryTypesPie() { queryTypePieChart.options.animation.duration = 0; // Generate legend in separate div $("#query-types-legend").html(queryTypePieChart.generateLegend()); - $("#query-types-legend > ul > li").on("mousedown", function(e) { + $("#query-types-legend > ul > li").on("mousedown", function (e) { if (e.which === 2) { // which == 2 is middle mouse button $(this).toggleClass("strike"); @@ -243,23 +243,21 @@ function updateQueryTypesPie() { window.open("queries.php?querytype=" + ($(this).index() + 1), "_self"); } }); - }).done(function() { + }).done(function () { // Reload graph after minute setTimeout(updateQueryTypesPie, 60000); }); } function updateClientsOverTime() { - $.getJSON("api.php?overTimeDataClients&getClientNames", function(data) { + $.getJSON("api.php?overTimeDataClients&getClientNames", function (data) { if ("FTLnotrunning" in data) { return; } // Remove graph if there are no results (e.g. privacy mode enabled) if (jQuery.isEmptyObject(data.over_time)) { - $("#clients") - .parent() - .remove(); + $("#clients").parent().remove(); return; } @@ -289,7 +287,7 @@ function updateClientsOverTime() { // Get colors from AdminLTE var colors = []; - $.each($.AdminLTE.options.colors, function(key, value) { + $.each($.AdminLTE.options.colors, function (key, value) { colors.push(value); }); @@ -344,12 +342,12 @@ function updateClientsOverTime() { $("#clients .overlay").hide(); clientsChart.update(); }) - .done(function() { + .done(function () { // Reload graph after 10 minutes failures = 0; setTimeout(updateClientsOverTime, 600000); }) - .fail(function() { + .fail(function () { failures++; if (failures < 5) { // Try again after 1 minute only if this has not failed more @@ -360,14 +358,14 @@ function updateClientsOverTime() { } function updateForwardDestinationsPie() { - $.getJSON("api.php?getForwardDestinations", function(data) { + $.getJSON("api.php?getForwardDestinations", function (data) { if ("FTLnotrunning" in data) { return; } var colors = []; // Get colors from AdminLTE - $.each($.AdminLTE.options.colors, function(key, value) { + $.each($.AdminLTE.options.colors, function (key, value) { colors.push(value); }); var v = [], @@ -376,7 +374,7 @@ function updateForwardDestinationsPie() { values = []; // Collect values and colors - $.each(data.forward_destinations, function(key, value) { + $.each(data.forward_destinations, function (key, value) { if (key.indexOf("|") > -1) { key = key.substr(0, key.indexOf("|")); } @@ -385,7 +383,7 @@ function updateForwardDestinationsPie() { }); // Split data into individual arrays for the graphs - $.each(values, function(key, value) { + $.each(values, function (key, value) { k.push(value[0]); v.push(value[1]); c.push(value[2]); @@ -405,7 +403,7 @@ function updateForwardDestinationsPie() { forwardDestinationPieChart.options.animation.duration = 0; // Generate legend in separate div $("#forward-destinations-legend").html(forwardDestinationPieChart.generateLegend()); - $("#forward-destinations-legend > ul > li").on("mousedown", function(e) { + $("#forward-destinations-legend > ul > li").on("mousedown", function (e) { if (e.which === 2) { // which == 2 is middle mouse button $(this).toggleClass("strike"); @@ -426,7 +424,7 @@ function updateForwardDestinationsPie() { window.open("queries.php?forwarddest=" + obj, "_self"); } }); - }).done(function() { + }).done(function () { // Reload graph after one minute setTimeout(updateForwardDestinationsPie, 60000); }); @@ -442,21 +440,19 @@ function escapeHtml(text) { "'": "'" }; - return text.replace(/[&<>"']/g, function(m) { + return text.replace(/[&<>"']/g, function (m) { return map[m]; }); } function updateTopClientsChart() { - $.getJSON("api.php?summaryRaw&getQuerySources&topClientsBlocked", function(data) { + $.getJSON("api.php?summaryRaw&getQuerySources&topClientsBlocked", function (data) { if ("FTLnotrunning" in data) { return; } // Clear tables before filling them with data - $("#client-frequency td") - .parent() - .remove(); + $("#client-frequency td").parent().remove(); var clienttable = $("#client-frequency").find("tbody:last"); var client, percentage, clientname, clientip, idx, url; for (client in data.top_sources) { @@ -503,9 +499,7 @@ function updateTopClientsChart() { } // Clear tables before filling them with data - $("#client-frequency-blocked td") - .parent() - .remove(); + $("#client-frequency-blocked td").parent().remove(); var clientblockedtable = $("#client-frequency-blocked").find("tbody:last"); for (client in data.top_sources_blocked) { if (Object.prototype.hasOwnProperty.call(data.top_sources_blocked, client)) { @@ -552,16 +546,12 @@ function updateTopClientsChart() { // Remove table if there are no results (e.g. privacy mode enabled) if (jQuery.isEmptyObject(data.top_sources)) { - $("#client-frequency") - .parent() - .remove(); + $("#client-frequency").parent().remove(); } // Remove table if there are no results (e.g. privacy mode enabled) if (jQuery.isEmptyObject(data.top_sources_blocked)) { - $("#client-frequency-blocked") - .parent() - .remove(); + $("#client-frequency-blocked").parent().remove(); } $("#client-frequency .overlay").hide(); @@ -572,18 +562,14 @@ function updateTopClientsChart() { } function updateTopLists() { - $.getJSON("api.php?summaryRaw&topItems", function(data) { + $.getJSON("api.php?summaryRaw&topItems", function (data) { if ("FTLnotrunning" in data) { return; } // Clear tables before filling them with data - $("#domain-frequency td") - .parent() - .remove(); - $("#ad-frequency td") - .parent() - .remove(); + $("#domain-frequency td").parent().remove(); + $("#ad-frequency td").parent().remove(); var domaintable = $("#domain-frequency").find("tbody:last"); var adtable = $("#ad-frequency").find("tbody:last"); var url, domain, percentage; @@ -616,9 +602,7 @@ function updateTopLists() { // Remove table if there are no results (e.g. privacy mode enabled) if (jQuery.isEmptyObject(data.top_queries)) { - $("#domain-frequency") - .parent() - .remove(); + $("#domain-frequency").parent().remove(); } for (domain in data.top_ads) { @@ -650,9 +634,7 @@ function updateTopLists() { // Remove table if there are no results (e.g. privacy mode enabled) if (jQuery.isEmptyObject(data.top_ads)) { - $("#ad-frequency") - .parent() - .remove(); + $("#ad-frequency").parent().remove(); } $("#domain-frequency .overlay").hide(); @@ -664,13 +646,13 @@ function updateTopLists() { var FTLoffline = false; function updateSummaryData(runOnce) { - var setTimer = function(timeInSeconds) { + var setTimer = function (timeInSeconds) { if (!runOnce) { setTimeout(updateSummaryData, timeInSeconds * 1000); } }; - $.getJSON("api.php?summary", function(data) { + $.getJSON("api.php?summary", function (data) { updateSessionTimer(); if ("FTLnotrunning" in data) { @@ -699,7 +681,7 @@ function updateSummaryData(runOnce) { } ["ads_blocked_today", "dns_queries_today", "ads_percentage_today", "unique_clients"].forEach( - function(today) { + function (today) { var $todayElement = $("span#" + today); if ($todayElement.text() !== data[today] && $todayElement.text() !== data[today] + "%") { @@ -715,33 +697,33 @@ function updateSummaryData(runOnce) { ); } - window.setTimeout(function() { + window.setTimeout(function () { [ "ads_blocked_today", "dns_queries_today", "domains_being_blocked", "ads_percentage_today", "unique_clients" - ].forEach(function(header, idx) { + ].forEach(function (header, idx) { var textData = idx === 3 && data[header] !== "to" ? data[header] + "%" : data[header]; $("span#" + header).text(textData); }); $("span.glow").removeClass("glow"); }, 500); }) - .done(function() { + .done(function () { if (!FTLoffline) { setTimer(1); } else { setTimer(10); } }) - .fail(function() { + .fail(function () { setTimer(300); }); } -$(document).ready(function() { +$(document).ready(function () { // Pull in data via AJAX updateSummaryData(); @@ -780,7 +762,7 @@ $(document).ready(function() { enabled: true, mode: "x-axis", callbacks: { - title: function(tooltipItem) { + title: function (tooltipItem) { var label = tooltipItem[0].xLabel; var time = label.match(/(\d?\d):?(\d?\d?)/); var h = parseInt(time[1], 10); @@ -789,7 +771,7 @@ $(document).ready(function() { var to = padNumber(h) + ":" + padNumber(m + 4) + ":59"; return "Upstreams from " + from + " to " + to; }, - label: function(tooltipItems, data) { + label: function (tooltipItems, data) { if (tooltipItems.datasetIndex === 1) { var percentage = 0.0; var permitted = parseInt(data.datasets[0].data[tooltipItems.index]); @@ -862,11 +844,11 @@ $(document).ready(function() { enabled: false, mode: "x-axis", custom: customTooltips, - itemSort: function(a, b) { + itemSort: function (a, b) { return b.yLabel - a.yLabel; }, callbacks: { - title: function(tooltipItem) { + title: function (tooltipItem) { var label = tooltipItem[0].xLabel; var time = label.match(/(\d?\d):?(\d?\d?)/); var h = parseInt(time[1], 10); @@ -875,7 +857,7 @@ $(document).ready(function() { var to = padNumber(h) + ":" + padNumber(m + 4) + ":59"; return "Client activity from " + from + " to " + to; }, - label: function(tooltipItems, data) { + label: function (tooltipItems, data) { return data.datasets[tooltipItems.datasetIndex].label + ": " + tooltipItems.yLabel; } } @@ -924,7 +906,7 @@ $(document).ready(function() { updateTopClientsChart(); } - $("#queryOverTimeChart").click(function(evt) { + $("#queryOverTimeChart").click(function (evt) { var activePoints = timeLineChart.getElementAtEvent(evt); if (activePoints.length > 0) { //get the internal index of slice in pie chart @@ -958,10 +940,10 @@ $(document).ready(function() { enabled: false, custom: customTooltips, callbacks: { - title: function() { + title: function () { return "Query types"; }, - label: function(tooltipItems, data) { + label: function (tooltipItems, data) { var dataset = data.datasets[tooltipItems.datasetIndex]; var label = data.labels[tooltipItems.index]; return label + ": " + dataset.data[tooltipItems.index].toFixed(1) + "%"; @@ -995,10 +977,10 @@ $(document).ready(function() { enabled: false, custom: customTooltips, callbacks: { - title: function() { + title: function () { return "Forward destinations"; }, - label: function(tooltipItems, data) { + label: function (tooltipItems, data) { var dataset = data.datasets[tooltipItems.datasetIndex]; var label = data.labels[tooltipItems.index]; return label + ": " + dataset.data[tooltipItems.index].toFixed(1) + "%"; diff --git a/scripts/pi-hole/js/ip-address-sorting.js b/scripts/pi-hole/js/ip-address-sorting.js index 21343fa26..d636ecf9d 100644 --- a/scripts/pi-hole/js/ip-address-sorting.js +++ b/scripts/pi-hole/js/ip-address-sorting.js @@ -8,7 +8,7 @@ // This code has been taken from // https://datatables.net/plug-ins/sorting/ip-address jQuery.extend(jQuery.fn.dataTableExt.oSort, { - "ip-address-pre": function(a) { + "ip-address-pre": function (a) { if (!a) { return 0; } @@ -84,11 +84,11 @@ jQuery.extend(jQuery.fn.dataTableExt.oSort, { return x; }, - "ip-address-asc": function(a, b) { + "ip-address-asc": function (a, b) { return a < b ? -1 : a > b ? 1 : 0; }, - "ip-address-desc": function(a, b) { + "ip-address-desc": function (a, b) { return a < b ? 1 : a > b ? -1 : 0; } }); diff --git a/scripts/pi-hole/js/network.js b/scripts/pi-hole/js/network.js index 8d3d32eda..206fa3276 100644 --- a/scripts/pi-hole/js/network.js +++ b/scripts/pi-hole/js/network.js @@ -30,7 +30,7 @@ function handleAjaxError(xhr, textStatus) { function getTimestamp() { if (!Date.now) { - Date.now = function() { + Date.now = function () { return new Date().getTime(); }; } @@ -55,9 +55,9 @@ function mixColors(ratio, rgb1, rgb2) { ]; } -$(document).ready(function() { +$(document).ready(function () { tableApi = $("#network-entries").DataTable({ - rowCallback: function(row, data) { + rowCallback: function (row, data) { var color, mark, lastQuery = parseInt(data.lastQuery); @@ -115,7 +115,7 @@ $(document).ready(function() { } $("td:eq(0)", row).html(ips.join("
")); - $("td:eq(0)", row).hover(function() { + $("td:eq(0)", row).hover(function () { this.title = data.ip.join("\n"); }); @@ -146,7 +146,7 @@ $(document).ready(function() { { data: "firstSeen", width: "8%", - render: function(data, type) { + render: function (data, type) { if (type === "display") { return moment.unix(data).format("Y-MM-DD []HH:mm:ss z"); } @@ -157,7 +157,7 @@ $(document).ready(function() { { data: "lastQuery", width: "8%", - render: function(data, type) { + render: function (data, type) { if (type === "display") { return moment.unix(data).format("Y-MM-DD []HH:mm:ss z"); } @@ -173,11 +173,11 @@ $(document).ready(function() { [10, 25, 50, 100, "All"] ], stateSave: true, - stateSaveCallback: function(settings, data) { + stateSaveCallback: function (settings, data) { // Store current state in client's local storage area localStorage.setItem("network_table", JSON.stringify(data)); }, - stateLoadCallback: function() { + stateLoadCallback: function () { // Receive previous state from client's local storage area var data = localStorage.getItem("network_table"); // Return if not available diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index a8596b8fa..6d03183b4 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -37,12 +37,12 @@ function add(domain, list) { alertModal.modal("show"); // add Domain to List after Modal has faded in - alertModal.one("shown.bs.modal", function() { + alertModal.one("shown.bs.modal", function () { $.ajax({ url: "scripts/pi-hole/php/add.php", method: "post", data: { domain: domain, list: list, token: token }, - success: function(response) { + success: function (response) { alProcessing.hide(); if ( response.indexOf("not a valid argument") >= 0 || @@ -53,7 +53,7 @@ function add(domain, list) { alNetworkErr.hide(); alCustomErr.html(response.replace("[✗]", "")); alFailure.fadeIn(1000); - setTimeout(function() { + setTimeout(function () { alertModal.modal("hide"); }, 3000); } else { @@ -61,17 +61,17 @@ function add(domain, list) { alSuccess.children(alDomain).html(domain); alSuccess.children(alList).html(listtype); alSuccess.fadeIn(1000); - setTimeout(function() { + setTimeout(function () { alertModal.modal("hide"); }, 2000); } }, - error: function() { + error: function () { // Network Error alProcessing.hide(); alNetworkErr.show(); alFailure.fadeIn(1000); - setTimeout(function() { + setTimeout(function () { alertModal.modal("hide"); }, 3000); } @@ -79,16 +79,10 @@ function add(domain, list) { }); // Reset Modal after it has faded out - alertModal.one("hidden.bs.modal", function() { + alertModal.one("hidden.bs.modal", function () { alProcessing.show(); alSuccess.add(alFailure).hide(); - alProcessing - .add(alSuccess) - .children(alDomain) - .html("") - .end() - .children(alList) - .html(""); + alProcessing.add(alSuccess).children(alDomain).html("").end().children(alList).html(""); alCustomErr.html(""); }); } @@ -111,13 +105,13 @@ function autofilter() { return $("#autofilter").prop("checked"); } -$(document).ready(function() { +$(document).ready(function () { // Do we want to filter queries? var GETDict = {}; window.location.search .substr(1) .split("&") - .forEach(function(item) { + .forEach(function (item) { GETDict[item.split("=")[0]] = item.split("=")[1]; }); @@ -141,7 +135,7 @@ $(document).ready(function() { } tableApi = $("#all-queries").DataTable({ - rowCallback: function(row, data) { + rowCallback: function (row, data) { // DNSSEC status var dnssec_status; switch (data[5]) { @@ -274,15 +268,15 @@ $(document).ready(function() { if (regexLink) { $("td:eq(4)", row).hover( - function() { + function () { this.title = "Click to show matching regex filter"; this.style.color = "#72afd2"; }, - function() { + function () { this.style.color = ""; } ); - $("td:eq(4)", row).click(function() { + $("td:eq(4)", row).click(function () { var new_tab = window.open("groups-domains.php?domainid=" + data[9], "_blank"); if (new_tab) { new_tab.focus(); @@ -359,9 +353,9 @@ $(document).ready(function() { ajax: { url: APIstring, error: handleAjaxError, - dataSrc: function(data) { + dataSrc: function (data) { var dataIndex = 0; - return data.data.map(function(x) { + return data.data.map(function (x) { x[0] = x[0] * 1e6 + dataIndex++; return x; }); @@ -373,7 +367,7 @@ $(document).ready(function() { columns: [ { width: "15%", - render: function(data, type) { + render: function (data, type) { if (type === "display") { return moment .unix(Math.floor(data / 1e6)) @@ -395,11 +389,11 @@ $(document).ready(function() { [10, 25, 50, 100, "All"] ], stateSave: true, - stateSaveCallback: function(settings, data) { + stateSaveCallback: function (settings, data) { // Store current state in client's local storage area localStorage.setItem("query_log_table", JSON.stringify(data)); }, - stateLoadCallback: function() { + stateLoadCallback: function () { // Receive previous state from client's local storage area var data = localStorage.getItem("query_log_table"); // Return if not available @@ -422,17 +416,17 @@ $(document).ready(function() { defaultContent: "" } ], - initComplete: function() { + initComplete: function () { var api = this.api(); // Query type IPv4 / IPv6 - api.$("td:eq(1)").click(function() { + api.$("td:eq(1)").click(function () { if (autofilter()) { api.search(this.textContent).draw(); $("#resetButton").show(); } }); api.$("td:eq(1)").hover( - function() { + function () { if (autofilter()) { this.title = "Click to show only " + this.textContent + " queries"; this.style.color = "#72afd2"; @@ -441,13 +435,13 @@ $(document).ready(function() { this.style.color = ""; } }, - function() { + function () { this.style.color = ""; } ); api.$("td:eq(1)").css("cursor", "pointer"); // Domain - api.$("td:eq(2)").click(function() { + api.$("td:eq(2)").click(function () { if (autofilter()) { var domain = this.textContent.split("\n")[0]; api.search(domain).draw(); @@ -455,7 +449,7 @@ $(document).ready(function() { } }); api.$("td:eq(2)").hover( - function() { + function () { if (autofilter()) { var domain = this.textContent.split("\n")[0]; this.title = "Click to show only queries with domain " + domain; @@ -465,20 +459,20 @@ $(document).ready(function() { this.style.color = ""; } }, - function() { + function () { this.style.color = ""; } ); api.$("td:eq(2)").css("cursor", "pointer"); // Client - api.$("td:eq(3)").click(function() { + api.$("td:eq(3)").click(function () { if (autofilter()) { api.search(this.textContent).draw(); $("#resetButton").show(); } }); api.$("td:eq(3)").hover( - function() { + function () { if (autofilter()) { this.title = "Click to show only queries made by " + this.textContent; this.style.color = "#72afd2"; @@ -487,7 +481,7 @@ $(document).ready(function() { this.style.color = ""; } }, - function() { + function () { this.style.color = ""; } ); @@ -495,7 +489,7 @@ $(document).ready(function() { } }); - $("#all-queries tbody").on("click", "button", function() { + $("#all-queries tbody").on("click", "button", function () { var data = tableApi.row($(this).parents("tr")).data(); if (data[4] === "2" || data[4] === "3") { add(data[2], "black"); @@ -504,7 +498,7 @@ $(document).ready(function() { } }); - $("#resetButton").click(function() { + $("#resetButton").click(function () { tableApi.search("").draw(); $("#resetButton").hide(); }); @@ -526,7 +520,7 @@ $(document).ready(function() { localStorage.setItem("query_log_filter_chkbox", true); } - $("#autofilter").click(function() { + $("#autofilter").click(function () { localStorage.setItem("query_log_filter_chkbox", $("#autofilter").prop("checked")); }); }); diff --git a/scripts/pi-hole/js/queryads.js b/scripts/pi-hole/js/queryads.js index 44865ebda..285560230 100644 --- a/scripts/pi-hole/js/queryads.js +++ b/scripts/pi-hole/js/queryads.js @@ -32,7 +32,7 @@ function httpGet(ta, quiet, theUrl) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } - xmlhttp.onreadystatechange = function() { + xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState === 4 && xmlhttp.status === 200) { ta.show(); ta.empty(); @@ -50,9 +50,7 @@ function httpGet(ta, quiet, theUrl) { function eventsource() { var ta = $("#output"); - var domain = $("#domain") - .val() - .trim(); + var domain = $("#domain").val().trim(); var q = $("#quiet"); if (domain.length === 0) { @@ -85,7 +83,7 @@ function eventsource() { source.addEventListener( "message", - function(e) { + function (e) { if (!quiet) { ta.append(e.data); } else { @@ -98,7 +96,7 @@ function eventsource() { // Will be called when script has finished source.addEventListener( "error", - function() { + function () { source.close(); }, false @@ -109,7 +107,7 @@ function eventsource() { } // Handle enter button -$(document).keypress(function(e) { +$(document).keypress(function (e) { if (e.which === 13 && $("#domain").is(":focus")) { // Enter was pressed, and the input has focus exact = ""; @@ -117,36 +115,32 @@ $(document).keypress(function(e) { } }); // Handle button -$("#btnSearch").on("click", function() { +$("#btnSearch").on("click", function () { exact = ""; eventsource(); }); // Handle exact button -$("#btnSearchExact").on("click", function() { +$("#btnSearchExact").on("click", function () { exact = "exact"; eventsource(); }); // Wrap form-group's buttons to next line when viewed on a small screen -$(window).on("resize", function() { +$(window).on("resize", function () { if ($(window).width() < 991) { - $(".form-group.input-group") - .removeClass("input-group") - .addClass("input-group-block"); + $(".form-group.input-group").removeClass("input-group").addClass("input-group-block"); $(".form-group.input-group-block > input").css("margin-bottom", "5px"); $(".form-group.input-group-block > .input-group-btn") .removeClass("input-group-btn") .addClass("btn-block text-center"); } else { - $(".form-group.input-group-block") - .removeClass("input-group-block") - .addClass("input-group"); + $(".form-group.input-group-block").removeClass("input-group-block").addClass("input-group"); $(".form-group.input-group > input").css("margin-bottom", ""); $(".form-group.input-group > .btn-block.text-center") .removeClass("btn-block text-center") .addClass("input-group-btn"); } }); -$(document).ready(function() { +$(document).ready(function () { $(window).trigger("resize"); }); diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index 93974e5e4..17a7ebfdb 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -5,8 +5,8 @@ * This file is copyright under the latest version of the EUPL. * Please see LICENSE file for your rights under this license. */ -$(function() { - $("[data-static]").on("click", function() { +$(function () { + $("[data-static]").on("click", function () { var row = $(this).closest("tr"); var mac = row.find("#MAC").text(); var ip = row.find("#IP").text(); @@ -19,10 +19,10 @@ $(function() { $(".confirm-poweroff").confirm({ text: "Are you sure you want to send a poweroff command to your Pi-Hole?", title: "Confirmation required", - confirm: function() { + confirm: function () { $("#poweroffform").submit(); }, - cancel: function() { + cancel: function () { // nothing to do }, confirmButton: "Yes, poweroff", @@ -35,10 +35,10 @@ $(".confirm-poweroff").confirm({ $(".confirm-reboot").confirm({ text: "Are you sure you want to send a reboot command to your Pi-Hole?", title: "Confirmation required", - confirm: function() { + confirm: function () { $("#rebootform").submit(); }, - cancel: function() { + cancel: function () { // nothing to do }, confirmButton: "Yes, reboot", @@ -52,10 +52,10 @@ $(".confirm-reboot").confirm({ $(".confirm-restartdns").confirm({ text: "Are you sure you want to send a restart command to your DNS server?", title: "Confirmation required", - confirm: function() { + confirm: function () { $("#restartdnsform").submit(); }, - cancel: function() { + cancel: function () { // nothing to do }, confirmButton: "Yes, restart DNS", @@ -69,10 +69,10 @@ $(".confirm-restartdns").confirm({ $(".confirm-flushlogs").confirm({ text: "Are you sure you want to flush your logs?", title: "Confirmation required", - confirm: function() { + confirm: function () { $("#flushlogsform").submit(); }, - cancel: function() { + cancel: function () { // nothing to do }, confirmButton: "Yes, flush logs", @@ -86,10 +86,10 @@ $(".confirm-flushlogs").confirm({ $(".confirm-flusharp").confirm({ text: "Are you sure you want to flush your network table?", title: "Confirmation required", - confirm: function() { + confirm: function () { $("#flusharpform").submit(); }, - cancel: function() { + cancel: function () { // nothing to do }, confirmButton: "Yes, flush my network table", @@ -103,10 +103,10 @@ $(".confirm-flusharp").confirm({ $(".confirm-disablelogging-noflush").confirm({ text: "Are you sure you want to disable logging?", title: "Confirmation required", - confirm: function() { + confirm: function () { $("#disablelogsform-noflush").submit(); }, - cancel: function() { + cancel: function () { // nothing to do }, confirmButton: "Yes, disable logs", @@ -121,10 +121,10 @@ $(".api-token").confirm({ text: "Make sure that nobody else can scan this code around you. They will have full access to the API without having to know the password. Note that the generation of the QR code will take some time.", title: "Confirmation required", - confirm: function() { + confirm: function () { window.open("scripts/pi-hole/php/api_token.php"); }, - cancel: function() { + cancel: function () { // nothing to do }, confirmButton: "Yes, show API token", @@ -135,15 +135,13 @@ $(".api-token").confirm({ dialogClass: "modal-dialog modal-mg" }); -$("#DHCPchk").click(function() { +$("#DHCPchk").click(function () { $("input.DHCPgroup").prop("disabled", !this.checked); - $("#dhcpnotice") - .prop("hidden", !this.checked) - .addClass("lookatme"); + $("#dhcpnotice").prop("hidden", !this.checked).addClass("lookatme"); }); function loadCacheInfo() { - $.getJSON("api.php?getCacheInfo", function(data) { + $.getJSON("api.php?getCacheInfo", function (data) { if ("FTLnotrunning" in data) { return; } @@ -156,13 +154,9 @@ function loadCacheInfo() { var cachelivefreed = parseInt(data.cacheinfo["cache-live-freed"]); $("#cache-live-freed").text(cachelivefreed); if (cachelivefreed > 0) { - $("#cache-live-freed") - .parent("tr") - .addClass("lookatme"); + $("#cache-live-freed").parent("tr").addClass("lookatme"); } else { - $("#cache-live-freed") - .parent("tr") - .removeClass("lookatme"); + $("#cache-live-freed").parent("tr").removeClass("lookatme"); } // Update cache info every 10 seconds @@ -171,7 +165,7 @@ function loadCacheInfo() { } var leasetable, staticleasetable; -$(document).ready(function() { +$(document).ready(function () { if (document.getElementById("DHCPLeasesTable")) { leasetable = $("#DHCPLeasesTable").DataTable({ dom: "<'row'<'col-sm-12'tr>><'row'<'col-sm-6'i><'col-sm-6'f>>", @@ -195,7 +189,7 @@ $(document).ready(function() { } //call draw() on each table... they don't render properly with scrollX and scrollY set... ¯\_(ツ)_/¯ - $('a[data-toggle="tab"]').on("shown.bs.tab", function() { + $('a[data-toggle="tab"]').on("shown.bs.tab", function () { leasetable.draw(); staticleasetable.draw(); }); @@ -204,8 +198,8 @@ $(document).ready(function() { }); // Handle hiding of alerts -$(function() { - $("[data-hide]").on("click", function() { +$(function () { + $("[data-hide]").on("click", function () { $(this) .closest("." + $(this).attr("data-hide")) .hide(); @@ -213,12 +207,12 @@ $(function() { }); // DHCP leases tooltips -$(document).ready(function() { +$(document).ready(function () { $('[data-toggle="tooltip"]').tooltip({ html: true, container: "body" }); }); // Change "?tab=" parameter in URL for save and reload -$(".nav-tabs a").on("shown.bs.tab", function(e) { +$(".nav-tabs a").on("shown.bs.tab", function (e) { var tab = e.target.hash.substring(1); window.history.pushState("", "", "?tab=" + tab); if (tab === "piholedhcp") { @@ -229,10 +223,10 @@ $(".nav-tabs a").on("shown.bs.tab", function(e) { }); // Auto dismissal for info notifications -$(document).ready(function() { +$(document).ready(function () { var alInfo = $("#alInfo"); if (alInfo.length) { - alInfo.delay(3000).fadeOut(2000, function() { + alInfo.delay(3000).fadeOut(2000, function () { alInfo.hide(); }); } diff --git a/scripts/pi-hole/js/taillog-FTL.js b/scripts/pi-hole/js/taillog-FTL.js index e843e8c84..dd1a97b1b 100644 --- a/scripts/pi-hole/js/taillog-FTL.js +++ b/scripts/pi-hole/js/taillog-FTL.js @@ -16,7 +16,7 @@ var interval = 200; // Function that asks the API for new data function reloadData() { clearTimeout(timer); - $.getJSON("scripts/pi-hole/php/tailLog.php?FTL&offset=" + offset, function(data) { + $.getJSON("scripts/pi-hole/php/tailLog.php?FTL&offset=" + offset, function (data) { pre.append(data.lines); if (scrolling && offset !== data.offset) { @@ -29,9 +29,9 @@ function reloadData() { timer = setTimeout(reloadData, interval); } -$(function() { +$(function () { // Get offset at first loading of page - $.getJSON("scripts/pi-hole/php/tailLog.php?FTL", function(data) { + $.getJSON("scripts/pi-hole/php/tailLog.php?FTL", function (data) { offset = data.offset; }); pre = $("#output"); @@ -39,11 +39,11 @@ $(function() { reloadData(); }); -$("#chk1").click(function() { +$("#chk1").click(function () { $("#chk2").prop("checked", this.checked); scrolling = this.checked; }); -$("#chk2").click(function() { +$("#chk2").click(function () { $("#chk1").prop("checked", this.checked); scrolling = this.checked; }); diff --git a/scripts/pi-hole/js/taillog.js b/scripts/pi-hole/js/taillog.js index c719b13a4..5262ae65e 100644 --- a/scripts/pi-hole/js/taillog.js +++ b/scripts/pi-hole/js/taillog.js @@ -16,7 +16,7 @@ var interval = 200; // Function that asks the API for new data function reloadData() { clearTimeout(timer); - $.getJSON("scripts/pi-hole/php/tailLog.php?offset=" + offset, function(data) { + $.getJSON("scripts/pi-hole/php/tailLog.php?offset=" + offset, function (data) { pre.append(data.lines); if (scrolling && offset !== data.offset) { @@ -29,9 +29,9 @@ function reloadData() { timer = setTimeout(reloadData, interval); } -$(function() { +$(function () { // Get offset at first loading of page - $.getJSON("scripts/pi-hole/php/tailLog.php", function(data) { + $.getJSON("scripts/pi-hole/php/tailLog.php", function (data) { offset = data.offset; }); pre = $("#output"); @@ -39,11 +39,11 @@ $(function() { reloadData(); }); -$("#chk1").click(function() { +$("#chk1").click(function () { $("#chk2").prop("checked", this.checked); scrolling = this.checked; }); -$("#chk2").click(function() { +$("#chk2").click(function () { $("#chk1").prop("checked", this.checked); scrolling = this.checked; }); From 39ec67829b2aa54f81ba141f138dda05c28ae3f5 Mon Sep 17 00:00:00 2001 From: Samu Voutilainen Date: Sat, 25 Jan 2020 11:19:23 +0200 Subject: [PATCH 027/298] Execute pihole through wrapper All different exec() calls basically just calls sudo pihole, with various different syntaxes. Using a wrapper function allows sanitization of arguments for better safety. Signed-off-by: Samu Voutilainen --- api.php | 18 +++++-- scripts/pi-hole/php/add.php | 3 +- scripts/pi-hole/php/customdns.php | 4 +- scripts/pi-hole/php/func.php | 29 +++++++++++ scripts/pi-hole/php/groups.php | 3 +- scripts/pi-hole/php/header.php | 13 +++-- scripts/pi-hole/php/savesettings.php | 74 +++++++++++++++------------- scripts/pi-hole/php/teleporter.php | 2 +- 8 files changed, 99 insertions(+), 47 deletions(-) diff --git a/api.php b/api.php index dff1ae297..e06a43a79 100644 --- a/api.php +++ b/api.php @@ -20,8 +20,16 @@ // Common API functions if (isset($_GET['status'])) { - $pistatus = exec('sudo pihole status web'); - if ($pistatus == "1") + $pistatus = pihole_execute('status web'); + if(isset($pistatus[0])) + { + $pistatus = $pistatus[0]; + } + else + { + $pistatus = null; + } + if ($pistatus === "1") { $data = array_merge($data, array("status" => "enabled")); } @@ -42,7 +50,7 @@ // Skip token validation if explicit auth string is given check_csrf($_GET['token']); } - exec('sudo pihole enable'); + pihole_execute('enable'); $data = array_merge($data, array("status" => "enabled")); unlink("../custom_disable_timer"); } @@ -63,12 +71,12 @@ if($disable > 0) { $timestamp = time(); - exec("sudo pihole disable ".$disable."s"); + pihole_execute("disable ".$disable."s"); file_put_contents("../custom_disable_timer",($timestamp+$disable)*1000); } else { - exec('sudo pihole disable'); + pihole_execute('disable'); unlink("../custom_disable_timer"); } $data = array_merge($data, array("status" => "disabled")); diff --git a/scripts/pi-hole/php/add.php b/scripts/pi-hole/php/add.php index 878b28ffa..a04fe189c 100644 --- a/scripts/pi-hole/php/add.php +++ b/scripts/pi-hole/php/add.php @@ -86,7 +86,8 @@ // Reload lists in pihole-FTL after having added something if ($reload) { - echo shell_exec("sudo pihole restartdns reload-lists"); + $output = pihole_execute("restartdns reload-lists"); + echo implode("\n", $output); } ?> diff --git a/scripts/pi-hole/php/customdns.php b/scripts/pi-hole/php/customdns.php index 982981e2c..10748f2a7 100644 --- a/scripts/pi-hole/php/customdns.php +++ b/scripts/pi-hole/php/customdns.php @@ -81,7 +81,7 @@ function addCustomDNSEntry() if (get_ip_type($entry->ip) == $ipType) return errorJsonResponse("This domain already has a custom DNS entry for an IPv" . $ipType); - exec("sudo pihole -a addcustomdns ".$ip." ".$domain); + pihole_execute("-a addcustomdns ".$ip." ".$domain); return successJsonResponse(); } @@ -117,7 +117,7 @@ function deleteCustomDNSEntry() if (!$found) return errorJsonResponse("This domain/ip association does not exist"); - exec("sudo pihole -a removecustomdns ".$ip." ".$domain); + pihole_execute("-a removecustomdns ".$ip." ".$domain); return successJsonResponse(); } diff --git a/scripts/pi-hole/php/func.php b/scripts/pi-hole/php/func.php index 269fce7fa..3d539a522 100644 --- a/scripts/pi-hole/php/func.php +++ b/scripts/pi-hole/php/func.php @@ -52,4 +52,33 @@ function hash_equals($known_string, $user_string) { } } +/** + * More safely execute a command with pihole shell script. + * + * For example, + * + * pihole_execute("-h"); + * + * would execute command + * + * sudo pihole -h + * + * and returns output of that command as a string. + * + * @param $argument_string String of arguments to run pihole with. + * @param $error_on_failure If true, a warning is raised if command execution fails. Defaults to true. + */ +function pihole_execute($argument_string, $error_on_failure = true) { + $escaped = escapeshellcmd($argument_string); + $output = null; + $return_status = -1; + $command = "sudo pihole " . $escaped; + exec($command, $output, $return_status); + if($return_status !== 0) + { + trigger_error("Executing {$command} failed.", E_USER_WARNING); + } + return $output; +} + ?> diff --git a/scripts/pi-hole/php/groups.php b/scripts/pi-hole/php/groups.php index 2167295ee..c8711b82c 100644 --- a/scripts/pi-hole/php/groups.php +++ b/scripts/pi-hole/php/groups.php @@ -746,5 +746,6 @@ function JSON_error($message = null) } // Reload lists in pihole-FTL after having added something if ($reload) { - echo shell_exec('sudo pihole restartdns reload-lists'); + $output = pihole_execute('restartdns reload-lists'); + echo implode("\n", $output); } diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index 81622eb20..7b60109fd 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -341,12 +341,17 @@ function pidofFTL()

Status

Active'; - } elseif ($pistatus == "0") { + } elseif ($pistatus === "0") { echo ' Offline'; - } elseif ($pistatus == "-1") { + } elseif ($pistatus === "-1") { echo ' DNS service not running'; } else { echo ' Unknown'; diff --git a/scripts/pi-hole/php/savesettings.php b/scripts/pi-hole/php/savesettings.php index 6c8b1e893..e4202838a 100644 --- a/scripts/pi-hole/php/savesettings.php +++ b/scripts/pi-hole/php/savesettings.php @@ -208,7 +208,7 @@ function addStaticDHCPLease($mac, $ip, $hostname) { // Test if this lease is already included readStaticLeasesFile(); - + foreach($dhcp_static_leases as $lease) { if($lease["hwaddr"] === $mac) { @@ -224,7 +224,7 @@ function addStaticDHCPLease($mac, $ip, $hostname) { } } - exec("sudo pihole -a addstaticdhcp ".$mac." ".$ip." ".$hostname); + pihole_execute("-a addstaticdhcp ".$mac." ".$ip." ".$hostname); $success .= "A new static address has been added"; return true; } catch(Exception $exception) { @@ -372,15 +372,23 @@ function addStaticDHCPLease($mac, $ip, $hostname) { // Fallback $DNSinterface = "local"; } - exec("sudo pihole -a -i ".$DNSinterface." -web"); + pihole_execute("-a -i ".$DNSinterface." -web"); // If there has been no error we can save the new DNS server IPs if(!strlen($error)) { $IPs = implode (",", $DNSservers); - $return = exec("sudo pihole -a setdns \"".$IPs."\" ".$extra); - $success .= htmlspecialchars($return)."
"; - $success .= "The DNS settings have been updated (using ".$DNSservercount." DNS servers)"; + $return = pihole_execute("-a setdns \"".$IPs."\" ".$extra); + if(!empty($return)) + { + $success .= htmlspecialchars(end($return))."
"; + $success .= "The DNS settings have been updated (using ".$DNSservercount." DNS servers)"; + } + else + { + $success .= "Updating DNS settings failed. Result:"; + $success .= implode($return); + } } else { @@ -394,17 +402,17 @@ function addStaticDHCPLease($mac, $ip, $hostname) { if($_POST["action"] === "Disable") { - exec("sudo pihole -l off"); + pihole_execute("-l off"); $success .= "Logging has been disabled and logs have been flushed"; } elseif($_POST["action"] === "Disable-noflush") { - exec("sudo pihole -l off noflush"); + pihole_execute("-l off noflush"); $success .= "Logging has been disabled, your logs have not been flushed"; } else { - exec("sudo pihole -l on"); + pihole_execute("-l on"); $success .= "Logging has been enabled"; } @@ -461,8 +469,8 @@ function addStaticDHCPLease($mac, $ip, $hostname) { if(!strlen($error)) { // All entries are okay - exec("sudo pihole -a setexcludedomains ".$domainlist); - exec("sudo pihole -a setexcludeclients ".$clientlist); + pihole_execute("-a setexcludedomains ".$domainlist); + pihole_execute("-a setexcludeclients ".$clientlist); $success .= "The API settings have been updated
"; } else @@ -473,7 +481,7 @@ function addStaticDHCPLease($mac, $ip, $hostname) { // Set query log options if(isset($_POST["querylog-permitted"]) && isset($_POST["querylog-blocked"])) { - exec("sudo pihole -a setquerylog all"); + pihole_execute("-a setquerylog all"); if(!isset($_POST["privacyMode"])) { $success .= "All entries will be shown in Query Log"; @@ -485,7 +493,7 @@ function addStaticDHCPLease($mac, $ip, $hostname) { } elseif(isset($_POST["querylog-permitted"])) { - exec("sudo pihole -a setquerylog permittedonly"); + pihole_execute("-a setquerylog permittedonly"); if(!isset($_POST["privacyMode"])) { $success .= "Only permitted will be shown in Query Log"; @@ -497,24 +505,24 @@ function addStaticDHCPLease($mac, $ip, $hostname) { } elseif(isset($_POST["querylog-blocked"])) { - exec("sudo pihole -a setquerylog blockedonly"); + pihole_execute("-a setquerylog blockedonly"); $success .= "Only blocked entries will be shown in Query Log"; } else { - exec("sudo pihole -a setquerylog nothing"); + pihole_execute("-a setquerylog nothing"); $success .= "No entries will be shown in Query Log"; } if(isset($_POST["privacyMode"])) { - exec("sudo pihole -a privacymode true"); + pihole_execute("-a privacymode true"); $success .= " (privacy mode enabled)"; } else { - exec("sudo pihole -a privacymode false"); + pihole_execute("-a privacymode false"); } break; @@ -522,15 +530,15 @@ function addStaticDHCPLease($mac, $ip, $hostname) { case "webUI": if($_POST["tempunit"] == "F") { - exec('sudo pihole -a -f'); + pihole_execute('-a -f'); } elseif($_POST["tempunit"] == "K") { - exec('sudo pihole -a -k'); + pihole_execute('-a -k'); } else { - exec('sudo pihole -a -c'); + pihole_execute('-a -c'); } $adminemail = trim($_POST["adminemail"]); if(strlen($adminemail) == 0 || !isset($adminemail)) @@ -543,36 +551,36 @@ function addStaticDHCPLease($mac, $ip, $hostname) { } else { - exec('sudo pihole -a -e \''.$adminemail.'\''); + pihole_execute('-a -e \''.$adminemail.'\''); } if(isset($_POST["boxedlayout"])) { - exec('sudo pihole -a layout boxed'); + pihole_execute('-a layout boxed'); } else { - exec('sudo pihole -a layout traditional'); + pihole_execute('-a layout traditional'); } $success .= "The webUI settings have been updated"; break; case "poweroff": - exec("sudo pihole -a poweroff"); + pihole_execute("-a poweroff"); $success = "The system will poweroff in 5 seconds..."; break; case "reboot": - exec("sudo pihole -a reboot"); + pihole_execute("-a reboot"); $success = "The system will reboot in 5 seconds..."; break; case "restartdns": - exec("sudo pihole -a restartdns"); + pihole_execute("-a restartdns"); $success = "The DNS server has been restarted"; break; case "flushlogs": - exec("sudo pihole -f"); + pihole_execute("-f"); $success = "The Pi-hole log file has been flushed"; break; @@ -599,7 +607,7 @@ function addStaticDHCPLease($mac, $ip, $hostname) { if(!strlen($error)) { - exec("sudo pihole -a removestaticdhcp ".$mac); + pihole_execute("-a removestaticdhcp ".$mac); $success .= "The static address with MAC address ".htmlspecialchars($mac)." has been removed"; } break; @@ -666,13 +674,13 @@ function addStaticDHCPLease($mac, $ip, $hostname) { if(!strlen($error)) { - exec("sudo pihole -a enabledhcp ".$from." ".$to." ".$router." ".$leasetime." ".$domain." ".$ipv6." ".$rapidcommit); + pihole_execute("-a enabledhcp ".$from." ".$to." ".$router." ".$leasetime." ".$domain." ".$ipv6." ".$rapidcommit); $success .= "The DHCP server has been activated ".htmlspecialchars($type); } } else { - exec("sudo pihole -a disabledhcp"); + pihole_execute("-a disabledhcp"); $success = "The DHCP server has been deactivated"; } @@ -690,11 +698,11 @@ function addStaticDHCPLease($mac, $ip, $hostname) { } // Store privacy level - exec("sudo pihole -a privacylevel ".$level); + pihole_execute("-a privacylevel ".$level); if($privacylevel > $level) { - exec("sudo pihole -a restartdns"); + pihole_execute("-a restartdns"); $success .= "The privacy level has been decreased and the DNS resolver has been restarted"; } elseif($privacylevel < $level) @@ -713,7 +721,7 @@ function addStaticDHCPLease($mac, $ip, $hostname) { break; // Flush network table case "flusharp": - exec("sudo pihole arpflush quiet", $output); + pihole_execute("arpflush quiet", $output); $error = implode("
", $output); if(strlen($error) == 0) { diff --git a/scripts/pi-hole/php/teleporter.php b/scripts/pi-hole/php/teleporter.php index 84f96bc86..e746e6c0b 100644 --- a/scripts/pi-hole/php/teleporter.php +++ b/scripts/pi-hole/php/teleporter.php @@ -439,7 +439,7 @@ function process_file($contents) if($importedsomething) { - exec("sudo pihole restartdns reload"); + pihole_execute("restartdns reload"); } unlink($fullfilename); From ad01f75573ea75eb87a3182fc00dae7b84e8d974 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2020 09:57:40 +0300 Subject: [PATCH 028/298] Bump xo from 0.29.0 to 0.29.1 (#1219) Bumps [xo](https://github.com/xojs/xo) from 0.29.0 to 0.29.1. - [Release notes](https://github.com/xojs/xo/releases) - [Commits](https://github.com/xojs/xo/compare/v0.29.0...v0.29.1) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- package-lock.json | 108 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/package-lock.json b/package-lock.json index 32a0538d8..4b2521c37 100644 --- a/package-lock.json +++ b/package-lock.json @@ -112,9 +112,9 @@ "dev": true }, "@types/node": { - "version": "13.11.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.11.1.tgz", - "integrity": "sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.0.tgz", + "integrity": "sha512-WE4IOAC6r/yBZss1oQGM5zs2D7RuKR6Q+w+X2SouPofnWn+LbCqClRyhO3ZE7Ix8nmFgo/oVuuE01cJT2XB13A==", "dev": true }, "@types/normalize-package-data": { @@ -130,45 +130,45 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.27.0.tgz", - "integrity": "sha512-/my+vVHRN7zYgcp0n4z5A6HAK7bvKGBiswaM5zIlOQczsxj/aiD7RcgD+dvVFuwFaGh5+kM7XA6Q6PN0bvb1tw==", + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.28.0.tgz", + "integrity": "sha512-w0Ugcq2iatloEabQP56BRWJowliXUP5Wv6f9fKzjJmDW81hOTBxRoJ4LoEOxRpz9gcY51Libytd2ba3yLmSOfg==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.27.0", + "@typescript-eslint/experimental-utils": "2.28.0", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", "tsutils": "^3.17.1" } }, "@typescript-eslint/experimental-utils": { - "version": "2.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.27.0.tgz", - "integrity": "sha512-vOsYzjwJlY6E0NJRXPTeCGqjv5OHgRU1kzxHKWJVPjDYGbPgLudBXjIlc+OD1hDBZ4l1DLbOc5VjofKahsu9Jw==", + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.28.0.tgz", + "integrity": "sha512-4SL9OWjvFbHumM/Zh/ZeEjUFxrYKtdCi7At4GyKTbQlrj1HcphIDXlje4Uu4cY+qzszR5NdVin4CCm6AXCjd6w==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.27.0", + "@typescript-eslint/typescript-estree": "2.28.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "2.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.27.0.tgz", - "integrity": "sha512-HFUXZY+EdwrJXZo31DW4IS1ujQW3krzlRjBrFRrJcMDh0zCu107/nRfhk/uBasO8m0NVDbBF5WZKcIUMRO7vPg==", + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.28.0.tgz", + "integrity": "sha512-RqPybRDquui9d+K86lL7iPqH6Dfp9461oyqvlXMNtap+PyqYbkY5dB7LawQjDzot99fqzvS0ZLZdfe+1Bt3Jgw==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.27.0", - "@typescript-eslint/typescript-estree": "2.27.0", + "@typescript-eslint/experimental-utils": "2.28.0", + "@typescript-eslint/typescript-estree": "2.28.0", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.27.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.27.0.tgz", - "integrity": "sha512-t2miCCJIb/FU8yArjAvxllxbTiyNqaXJag7UOpB5DVoM3+xnjeOngtqlJkLRnMtzaRcJhe3CIR9RmL40omubhg==", + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.28.0.tgz", + "integrity": "sha512-HDr8MP9wfwkiuqzRVkuM3BeDrOC4cKbO5a6BymZBHUt5y/2pL0BXD6I/C/ceq2IZoHWhcASk+5/zo+dwgu9V8Q==", "dev": true, "requires": { "debug": "^4.1.1", @@ -872,9 +872,9 @@ } }, "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", "dev": true }, "clone-response": { @@ -1858,9 +1858,9 @@ } }, "eslint-plugin-prettier": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz", - "integrity": "sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz", + "integrity": "sha512-+HG5jmu/dN3ZV3T6eCD7a4BlAySdN7mLIbJYo0z1cFQuI+r2DiTJEFeF68ots93PsnrMxbzIZ2S/ieX+mkrBeQ==", "dev": true, "requires": { "prettier-linter-helpers": "^1.0.0" @@ -1925,9 +1925,9 @@ } }, "eslint-rule-docs": { - "version": "1.1.185", - "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.185.tgz", - "integrity": "sha512-1sea+uWAA76814hpwKb6IIXAx3catuivoYOlwgf96RFOhNfuE+LWsG7asIHUkAQ1Vx4SN/kfpU+lTXXnu1gg/w==", + "version": "1.1.186", + "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.186.tgz", + "integrity": "sha512-EwnjyJ0Go9V5e7fbq3JGnfUy1Is3p79oyBQANFPx72mK9t9jv8W2ox3wHc7RS2DPJneLak5n/4zRWYHFiB1HsA==", "dev": true }, "eslint-scope": { @@ -1990,18 +1990,18 @@ "dev": true }, "esquery": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.2.0.tgz", - "integrity": "sha512-weltsSqdeWIX9G2qQZz7KlTRJdkkOCTPgLYJUz1Hacf48R4YOwGPHO3+ORfWedqJKbq5WQmsgK90n+pFLIKt/Q==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", "dev": true, "requires": { - "estraverse": "^5.0.0" + "estraverse": "^5.1.0" }, "dependencies": { "estraverse": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.0.0.tgz", - "integrity": "sha512-j3acdrMzqrxmJTNj5dbr1YbjacrYgAxVMeF0gK16E3j494mOe7xygM/ZLIguEQ0ETwAg2hlJCtHRGav+y0Ny5A==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", + "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", "dev": true } } @@ -4488,9 +4488,9 @@ "dev": true }, "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.1.tgz", + "integrity": "sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -4601,9 +4601,9 @@ "dev": true }, "semver": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.2.1.tgz", - "integrity": "sha512-aHhm1pD02jXXkyIpq25qBZjr3CQgg8KST8uX0OWXch3xE6jw+1bfbWnCjzMwojsTquroUmKFHNzU6x26mEiRxw==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", "dev": true }, "semver-diff": { @@ -4969,9 +4969,9 @@ } }, "string.prototype.trimend": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.0.tgz", - "integrity": "sha512-EEJnGqa/xNfIg05SxiPSqRS7S9qwDhYts1TSLR1BQfYUfPe1stofgGKvwERK9+9yf+PpfBMlpBaCHucXGPQfUA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", "dev": true, "requires": { "define-properties": "^1.1.3", @@ -5001,9 +5001,9 @@ } }, "string.prototype.trimstart": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.0.tgz", - "integrity": "sha512-iCP8g01NFYiiBOnwG1Xc3WZLyoo+RuBymwIlWncShXDDJYWN6DbnM3odslBJdgCdRlq94B5s63NWAZlcn2CS4w==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", "dev": true, "requires": { "define-properties": "^1.1.3", @@ -5594,9 +5594,9 @@ "dev": true }, "xo": { - "version": "0.29.0", - "resolved": "https://registry.npmjs.org/xo/-/xo-0.29.0.tgz", - "integrity": "sha512-PpNFFRiAVwEeYqxxZxbLwo4FXu0/gZvQzDUgyKmFNkNG7NBEtoo+Csa4t9XAUjxd0gKC7sOakt320ovxeRPQPQ==", + "version": "0.29.1", + "resolved": "https://registry.npmjs.org/xo/-/xo-0.29.1.tgz", + "integrity": "sha512-ohlXtUatjHi4f7dRF+c/nv08zyB3+iROxwfX3xEIw2J5Tk5j4I/bPqx4tUzESVHFCh5tQbu528ZEPJmM5P3c/g==", "dev": true, "requires": { "@typescript-eslint/eslint-plugin": "^2.27.0", @@ -5651,12 +5651,12 @@ "dev": true }, "yaml": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.8.3.tgz", - "integrity": "sha512-X/v7VDnK+sxbQ2Imq4Jt2PRUsRsP7UcpSl3Llg6+NRRqWLIvxkMFYtH1FmvwNGYRKKPa+EPA4qDBlI9WVG1UKw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.9.0.tgz", + "integrity": "sha512-3GLZOj8A9Gsp0Fw3kOyj0zqk4xMq+YvhbHSDYALd2NMOfIpyZeBhz32ZiNU7AtX1MtXX/9JJgxSElGRwvv9enA==", "dev": true, "requires": { - "@babel/runtime": "^7.8.7" + "@babel/runtime": "^7.9.0" } }, "yargs-parser": { diff --git a/package.json b/package.json index b77b828a3..e9d7606fa 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "test": "npm run xo" }, "devDependencies": { - "xo": "^0.29.0" + "xo": "^0.29.1" }, "prettier": { "arrowParens": "avoid", From 7d0882723c8d1d536f7b4b18612d810bbbc0fa4d Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 21 Apr 2020 10:33:37 +0200 Subject: [PATCH 029/298] Add exact searching using modified regex for query type, domain, and client. Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 6d6ec97d3..3640e48a4 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -427,7 +427,7 @@ $(document).ready(function() { // Query type IPv4 / IPv6 api.$("td:eq(1)").click(function() { if (autofilter()) { - api.search(this.textContent).draw(); + api.search("\\s"+this.textContent+"\\s", true, true).draw(); $("#resetButton").show(); } }); @@ -450,7 +450,7 @@ $(document).ready(function() { api.$("td:eq(2)").click(function() { if (autofilter()) { var domain = this.textContent.split("\n")[0]; - api.search(domain).draw(); + api.search("\\s"+domain+"\\s", true, true).draw(); $("#resetButton").show(); } }); @@ -473,7 +473,8 @@ $(document).ready(function() { // Client api.$("td:eq(3)").click(function() { if (autofilter()) { - api.search(this.textContent).draw(); + api.search("\\s"+this.textContent+"\\s", true, true).draw(); + $("#resetButton").show(); } }); @@ -495,6 +496,7 @@ $(document).ready(function() { } }); + $("#all-queries tbody").on("click", "button", function() { var data = tableApi.row($(this).parents("tr")).data(); if (data[4] === "2" || data[4] === "3") { @@ -505,7 +507,7 @@ $(document).ready(function() { }); $("#resetButton").click(function() { - tableApi.search("").draw(); + tableApi.search("", true, true).draw(); $("#resetButton").hide(); }); From 6fa9d036b4d9e546127df33e7439ac1c377aaa5a Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 21 Apr 2020 10:39:40 +0200 Subject: [PATCH 030/298] Initialize regex filter mode and clear search field (if set previously) Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 3640e48a4..82e08a72b 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -496,6 +496,8 @@ $(document).ready(function() { } }); + // Initialize regex filter mode and clear search field (if set previously) + tableApi.search("", true, true).draw(); $("#all-queries tbody").on("click", "button", function() { var data = tableApi.row($(this).parents("tr")).data(); From e9ba5e440a79768c86fa5958749d083e8b5f409c Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 21 Apr 2020 10:53:49 +0200 Subject: [PATCH 031/298] Add [Ctrl] key action to combine filters. Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 82e08a72b..ca0854e5c 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -425,9 +425,13 @@ $(document).ready(function() { initComplete: function() { var api = this.api(); // Query type IPv4 / IPv6 - api.$("td:eq(1)").click(function() { + api.$("td:eq(1)").click(function(event) { if (autofilter()) { - api.search("\\s"+this.textContent+"\\s", true, true).draw(); + if(!event.ctrlKey) { + resetColumnsFilters(); + } + console.log(event.ctrlKey); + api.column(1).search("^"+this.textContent+"$", true, true).draw(); $("#resetButton").show(); } }); @@ -447,10 +451,13 @@ $(document).ready(function() { ); api.$("td:eq(1)").css("cursor", "pointer"); // Domain - api.$("td:eq(2)").click(function() { + api.$("td:eq(2)").click(function(event) { if (autofilter()) { + if(!event.ctrlKey) { + resetColumnsFilters(); + } var domain = this.textContent.split("\n")[0]; - api.search("\\s"+domain+"\\s", true, true).draw(); + api.column(2).search("^"+domain+"$", true, true).draw(); $("#resetButton").show(); } }); @@ -471,10 +478,12 @@ $(document).ready(function() { ); api.$("td:eq(2)").css("cursor", "pointer"); // Client - api.$("td:eq(3)").click(function() { + api.$("td:eq(3)").click(function(event) { if (autofilter()) { - api.search("\\s"+this.textContent+"\\s", true, true).draw(); - + if(!event.ctrlKey) { + resetColumnsFilters(); + } + api.column(3).search("^"+this.textContent+"$", true, true).draw(); $("#resetButton").show(); } }); @@ -497,6 +506,7 @@ $(document).ready(function() { }); // Initialize regex filter mode and clear search field (if set previously) + resetColumnsFilters(); tableApi.search("", true, true).draw(); $("#all-queries tbody").on("click", "button", function() { @@ -509,7 +519,8 @@ $(document).ready(function() { }); $("#resetButton").click(function() { - tableApi.search("", true, true).draw(); + resetColumnsFilters(); + tableApi.draw(); $("#resetButton").hide(); }); @@ -527,3 +538,10 @@ $(document).ready(function() { localStorage.setItem("query_log_filter_chkbox", $("#autofilter").prop("checked")); }); }); + +function resetColumnsFilters(add_filters) { + tableApi.columns()[0].forEach(index => { + tableApi.column(index).search("", true, true); + }); + tableApi.draw(); +} From 8c1503cac585f88cc4c65ed75193d2696dcad052 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 21 Apr 2020 11:20:17 +0200 Subject: [PATCH 032/298] Show filtering details on clear button. Signed-off-by: DL6ER --- queries.php | 2 +- scripts/pi-hole/js/queries.js | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/queries.php b/queries.php index 20c653058..2a601e023 100644 --- a/queries.php +++ b/queries.php @@ -156,7 +156,7 @@
" + title + "

- +
diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index ca0854e5c..87450a7a1 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -432,7 +432,7 @@ $(document).ready(function() { } console.log(event.ctrlKey); api.column(1).search("^"+this.textContent+"$", true, true).draw(); - $("#resetButton").show(); + showResetButton("query type", this.textContent); } }); api.$("td:eq(1)").hover( @@ -458,7 +458,7 @@ $(document).ready(function() { } var domain = this.textContent.split("\n")[0]; api.column(2).search("^"+domain+"$", true, true).draw(); - $("#resetButton").show(); + showResetButton("domain", domain); } }); api.$("td:eq(2)").hover( @@ -484,7 +484,7 @@ $(document).ready(function() { resetColumnsFilters(); } api.column(3).search("^"+this.textContent+"$", true, true).draw(); - $("#resetButton").show(); + showResetButton("client", this.textContent); } }); api.$("td:eq(3)").hover( @@ -521,6 +521,7 @@ $(document).ready(function() { $("#resetButton").click(function() { resetColumnsFilters(); tableApi.draw(); + $("#resetButton").text(""); $("#resetButton").hide(); }); @@ -543,5 +544,16 @@ function resetColumnsFilters(add_filters) { tableApi.columns()[0].forEach(index => { tableApi.column(index).search("", true, true); }); - tableApi.draw(); + $("#resetButton").text(""); + tableApi.draw(); +} + +function showResetButton(type, param) { + let button = $("#resetButton"); + if(button.text().length === 0) { + button.text("Clear filtering on "+type+" \""+param+"\""); + } else { + button.text(button.text() + "and "+type+" \""+param+"\""); + } + button.show(); } From 8c82872f4a5fd2f32b2eafb35785412ae4a4cc94 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 21 Apr 2020 11:24:56 +0200 Subject: [PATCH 033/298] Add missing space in front of and on the dynamically generated button text. Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 87450a7a1..b62e28113 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -430,7 +430,6 @@ $(document).ready(function() { if(!event.ctrlKey) { resetColumnsFilters(); } - console.log(event.ctrlKey); api.column(1).search("^"+this.textContent+"$", true, true).draw(); showResetButton("query type", this.textContent); } @@ -540,8 +539,8 @@ $(document).ready(function() { }); }); -function resetColumnsFilters(add_filters) { - tableApi.columns()[0].forEach(index => { +function resetColumnsFilters() { + tableApi.columns()[0].forEach(function(index) { tableApi.column(index).search("", true, true); }); $("#resetButton").text(""); @@ -553,7 +552,7 @@ function showResetButton(type, param) { if(button.text().length === 0) { button.text("Clear filtering on "+type+" \""+param+"\""); } else { - button.text(button.text() + "and "+type+" \""+param+"\""); + button.text(button.text() + " and "+type+" \""+param+"\""); } button.show(); } From 0aecefcbc8697e4da30c328bbb45029f7417ea03 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 21 Apr 2020 11:41:16 +0200 Subject: [PATCH 034/298] Add comments and simplify code Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index b62e28113..ef0d9209a 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -519,9 +519,9 @@ $(document).ready(function() { $("#resetButton").click(function() { resetColumnsFilters(); + hideResetButton(); + // Trigger table update tableApi.draw(); - $("#resetButton").text(""); - $("#resetButton").hide(); }); var chkbox_data = localStorage.getItem("query_log_filter_chkbox"); @@ -543,7 +543,9 @@ function resetColumnsFilters() { tableApi.columns()[0].forEach(function(index) { tableApi.column(index).search("", true, true); }); - $("#resetButton").text(""); + // Clear filter reset button + hideResetButton(); + // Trigger table update tableApi.draw(); } @@ -556,3 +558,9 @@ function showResetButton(type, param) { } button.show(); } + +function hideResetButton() { + let button = $("#resetButton"); + button.text(""); + button.hide(); +} From 2439c3c76a02235ca3fd88c56d784a8acf0eff38 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 21 Apr 2020 11:45:18 +0200 Subject: [PATCH 035/298] Add comment that holding down [Ctrl] can do something magical Signed-off-by: DL6ER --- queries.php | 2 +- scripts/pi-hole/js/queries.js | 39 +++++++++++++++++++++++------------ 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/queries.php b/queries.php index 2a601e023..73185051d 100644 --- a/queries.php +++ b/queries.php @@ -155,7 +155,7 @@ -
+
diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index ef0d9209a..c4b728ca1 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -427,10 +427,14 @@ $(document).ready(function() { // Query type IPv4 / IPv6 api.$("td:eq(1)").click(function(event) { if (autofilter()) { - if(!event.ctrlKey) { + if (!event.ctrlKey) { resetColumnsFilters(); } - api.column(1).search("^"+this.textContent+"$", true, true).draw(); + + api + .column(1) + .search("^" + this.textContent + "$", true, true) + .draw(); showResetButton("query type", this.textContent); } }); @@ -452,11 +456,15 @@ $(document).ready(function() { // Domain api.$("td:eq(2)").click(function(event) { if (autofilter()) { - if(!event.ctrlKey) { + if (!event.ctrlKey) { resetColumnsFilters(); } + var domain = this.textContent.split("\n")[0]; - api.column(2).search("^"+domain+"$", true, true).draw(); + api + .column(2) + .search("^" + domain + "$", true, true) + .draw(); showResetButton("domain", domain); } }); @@ -479,10 +487,14 @@ $(document).ready(function() { // Client api.$("td:eq(3)").click(function(event) { if (autofilter()) { - if(!event.ctrlKey) { + if (!event.ctrlKey) { resetColumnsFilters(); } - api.column(3).search("^"+this.textContent+"$", true, true).draw(); + + api + .column(3) + .search("^" + this.textContent + "$", true, true) + .draw(); showResetButton("client", this.textContent); } }); @@ -541,8 +553,8 @@ $(document).ready(function() { function resetColumnsFilters() { tableApi.columns()[0].forEach(function(index) { - tableApi.column(index).search("", true, true); - }); + tableApi.column(index).search("", true, true); + }); // Clear filter reset button hideResetButton(); // Trigger table update @@ -550,17 +562,18 @@ function resetColumnsFilters() { } function showResetButton(type, param) { - let button = $("#resetButton"); - if(button.text().length === 0) { - button.text("Clear filtering on "+type+" \""+param+"\""); + var button = $("#resetButton"); + if (button.text().length === 0) { + button.text("Clear filtering on " + type + ' "' + param + '"'); } else { - button.text(button.text() + " and "+type+" \""+param+"\""); + button.text(button.text() + " and " + type + ' "' + param + '"'); } + button.show(); } function hideResetButton() { - let button = $("#resetButton"); + var button = $("#resetButton"); button.text(""); button.hide(); } From b74816d8f6b2b18c48669d4e21d13681ce8839b4 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 23 Apr 2020 08:41:37 +0200 Subject: [PATCH 036/298] Improve wording Signed-off-by: DL6ER --- queries.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/queries.php b/queries.php index 73185051d..6b25d7031 100644 --- a/queries.php +++ b/queries.php @@ -155,7 +155,7 @@ -
+
From 728d9077803676bde31ddb4019d6dbc86b1b0843 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 23 Apr 2020 09:17:10 +0200 Subject: [PATCH 037/298] Add meta key modifier and highlight filtering columns Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 69 +++++++++++++++-------------------- 1 file changed, 30 insertions(+), 39 deletions(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index c4b728ca1..2b91d8105 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -8,6 +8,7 @@ /* global moment:false */ var tableApi; +var colHighlightColor = "#ffefad"; function add(domain, list) { var token = $("#token").text(); @@ -426,17 +427,7 @@ $(document).ready(function() { var api = this.api(); // Query type IPv4 / IPv6 api.$("td:eq(1)").click(function(event) { - if (autofilter()) { - if (!event.ctrlKey) { - resetColumnsFilters(); - } - - api - .column(1) - .search("^" + this.textContent + "$", true, true) - .draw(); - showResetButton("query type", this.textContent); - } + addColumnFilter(event, 1, "query type", this.textContent); }); api.$("td:eq(1)").hover( function() { @@ -455,18 +446,7 @@ $(document).ready(function() { api.$("td:eq(1)").css("cursor", "pointer"); // Domain api.$("td:eq(2)").click(function(event) { - if (autofilter()) { - if (!event.ctrlKey) { - resetColumnsFilters(); - } - - var domain = this.textContent.split("\n")[0]; - api - .column(2) - .search("^" + domain + "$", true, true) - .draw(); - showResetButton("domain", domain); - } + addColumnFilter(event, 2, "domain", this.textContent.split("\n")[0]); }); api.$("td:eq(2)").hover( function() { @@ -486,17 +466,7 @@ $(document).ready(function() { api.$("td:eq(2)").css("cursor", "pointer"); // Client api.$("td:eq(3)").click(function(event) { - if (autofilter()) { - if (!event.ctrlKey) { - resetColumnsFilters(); - } - - api - .column(3) - .search("^" + this.textContent + "$", true, true) - .draw(); - showResetButton("client", this.textContent); - } + addColumnFilter(event, 3, "client", this.textContent); }); api.$("td:eq(3)").hover( function() { @@ -516,9 +486,7 @@ $(document).ready(function() { } }); - // Initialize regex filter mode and clear search field (if set previously) resetColumnsFilters(); - tableApi.search("", true, true).draw(); $("#all-queries tbody").on("click", "button", function() { var data = tableApi.row($(this).parents("tr")).data(); @@ -531,9 +499,6 @@ $(document).ready(function() { $("#resetButton").click(function() { resetColumnsFilters(); - hideResetButton(); - // Trigger table update - tableApi.draw(); }); var chkbox_data = localStorage.getItem("query_log_filter_chkbox"); @@ -551,10 +516,36 @@ $(document).ready(function() { }); }); +function addColumnFilter(event, colID, colType, filterstring) { + if (!autofilter()) { + return; + } + // Do nothing in case of a requested multi-selection + if (!event.ctrlKey && !event.metaKey) { + resetColumnsFilters(); + } + + // Apply filtering + tableApi + .column(colID) + .search("^" + filterstring + "$", true, true) + .draw(); + + // Apply background color + tableApi + .$("td:eq(" + colID + ")") + .css("background-color", colHighlightColor); + showResetButton(colType, filterstring); +} + function resetColumnsFilters() { tableApi.columns()[0].forEach(function(index) { tableApi.column(index).search("", true, true); + tableApi + .$("td:eq(" + index + ")") + .css("background-color", "#fff"); }); + // Clear filter reset button hideResetButton(); // Trigger table update From c24900ddffa9e7b627ac9191d3b98e9f410944f5 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 23 Apr 2020 09:30:18 +0200 Subject: [PATCH 038/298] Reduce code duplication Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 47 ++++++++++++++++------------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 2b91d8105..97717785d 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -425,58 +425,42 @@ $(document).ready(function() { ], initComplete: function() { var api = this.api(); + // Query type IPv4 / IPv6 api.$("td:eq(1)").click(function(event) { addColumnFilter(event, 1, "query type", this.textContent); }); api.$("td:eq(1)").hover( function() { - if (autofilter()) { - this.title = "Click to show only " + this.textContent + " queries"; - this.style.color = "#72afd2"; - } else { - this.title = ""; - this.style.color = ""; - } + addFilteringHint(this, "with query type " + this.textContent); }, function() { this.style.color = ""; } ); api.$("td:eq(1)").css("cursor", "pointer"); + // Domain api.$("td:eq(2)").click(function(event) { addColumnFilter(event, 2, "domain", this.textContent.split("\n")[0]); }); api.$("td:eq(2)").hover( function() { - if (autofilter()) { - var domain = this.textContent.split("\n")[0]; - this.title = "Click to show only queries with domain " + domain; - this.style.color = "#72afd2"; - } else { - this.title = ""; - this.style.color = ""; - } + addFilteringHint(this, "with domain " + this.textContent); }, function() { this.style.color = ""; } ); api.$("td:eq(2)").css("cursor", "pointer"); + // Client api.$("td:eq(3)").click(function(event) { addColumnFilter(event, 3, "client", this.textContent); }); api.$("td:eq(3)").hover( function() { - if (autofilter()) { - this.title = "Click to show only queries made by " + this.textContent; - this.style.color = "#72afd2"; - } else { - this.title = ""; - this.style.color = ""; - } + addFilteringHint(this, "made by client " + this.textContent); }, function() { this.style.color = ""; @@ -516,10 +500,23 @@ $(document).ready(function() { }); }); +function addFilteringHint(obj, text) +{ + if (autofilter()) { + obj.title = "Click to show only queries " + text; + obj.style.color = "#72afd2"; + } else { + obj.title = ""; + obj.style.color = ""; + } +} + function addColumnFilter(event, colID, colType, filterstring) { + // Do not filter anything when the checkbox is unticked if (!autofilter()) { return; } + // Do nothing in case of a requested multi-selection if (!event.ctrlKey && !event.metaKey) { resetColumnsFilters(); @@ -532,8 +529,7 @@ function addColumnFilter(event, colID, colType, filterstring) { .draw(); // Apply background color - tableApi - .$("td:eq(" + colID + ")") + tableApi.$("td:eq(" + colID + ")") .css("background-color", colHighlightColor); showResetButton(colType, filterstring); } @@ -541,8 +537,7 @@ function addColumnFilter(event, colID, colType, filterstring) { function resetColumnsFilters() { tableApi.columns()[0].forEach(function(index) { tableApi.column(index).search("", true, true); - tableApi - .$("td:eq(" + index + ")") + tableApi.$("td:eq(" + index + ")") .css("background-color", "#fff"); }); From 51064df4fd228392a494990260e8d66194e4b183 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 23 Apr 2020 09:34:06 +0200 Subject: [PATCH 039/298] Remove pointer cursor when auto-filtering is disabled. Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 97717785d..644656d5b 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -436,9 +436,9 @@ $(document).ready(function() { }, function() { this.style.color = ""; + this.style.cursor = ""; } ); - api.$("td:eq(1)").css("cursor", "pointer"); // Domain api.$("td:eq(2)").click(function(event) { @@ -450,9 +450,9 @@ $(document).ready(function() { }, function() { this.style.color = ""; + this.style.cursor = ""; } ); - api.$("td:eq(2)").css("cursor", "pointer"); // Client api.$("td:eq(3)").click(function(event) { @@ -464,9 +464,9 @@ $(document).ready(function() { }, function() { this.style.color = ""; + this.style.cursor = ""; } ); - api.$("td:eq(3)").css("cursor", "pointer"); } }); @@ -505,9 +505,11 @@ function addFilteringHint(obj, text) if (autofilter()) { obj.title = "Click to show only queries " + text; obj.style.color = "#72afd2"; + obj.style.cursor = "pointer"; } else { obj.title = ""; obj.style.color = ""; + obj.style.cursor = ""; } } From f8ca9d4173c6b35fc4fa0b2d19710d0973ded1d4 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 23 Apr 2020 16:21:04 +0200 Subject: [PATCH 040/298] Replace / by "or". Signed-off-by: DL6ER --- queries.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/queries.php b/queries.php index 6b25d7031..d7ea8cca1 100644 --- a/queries.php +++ b/queries.php @@ -155,7 +155,7 @@ -
+
From 6f2a878371d3154bad417d8dc808feb89df1f962 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Fri, 24 Apr 2020 11:50:55 +0200 Subject: [PATCH 041/298] Store filtering columns in array instead of in a string. This makes adding a column multiple times impossible. Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 51 ++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 644656d5b..d4328708c 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -9,6 +9,7 @@ var tableApi; var colHighlightColor = "#ffefad"; +var tableFilters = []; function add(domain, list) { var token = $("#token").text(); @@ -397,6 +398,17 @@ $(document).ready(function() { ], stateSave: true, stateSaveCallback: function(settings, data) { + // Clear possible filtering settings + data.columns.forEach(function(value, index) { + data.columns[index].search.search = ""; + }); + + // Always start on the first page to show most recent queries + data.start = 0; + + // Always start with empty search field + data.search.search = ""; + // Store current state in client's local storage area localStorage.setItem("query_log_table", JSON.stringify(data)); }, @@ -409,10 +421,6 @@ $(document).ready(function() { } data = JSON.parse(data); - // Always start on the first page to show most recent queries - data.start = 0; - // Always start with empty search field - data.search.search = ""; // Apply loaded state to table return data; }, @@ -428,7 +436,7 @@ $(document).ready(function() { // Query type IPv4 / IPv6 api.$("td:eq(1)").click(function(event) { - addColumnFilter(event, 1, "query type", this.textContent); + addColumnFilter(event, 1, this.textContent); }); api.$("td:eq(1)").hover( function() { @@ -442,7 +450,7 @@ $(document).ready(function() { // Domain api.$("td:eq(2)").click(function(event) { - addColumnFilter(event, 2, "domain", this.textContent.split("\n")[0]); + addColumnFilter(event, 2, this.textContent.split("\n")[0]); }); api.$("td:eq(2)").hover( function() { @@ -456,7 +464,7 @@ $(document).ready(function() { // Client api.$("td:eq(3)").click(function(event) { - addColumnFilter(event, 3, "client", this.textContent); + addColumnFilter(event, 3, this.textContent); }); api.$("td:eq(3)").hover( function() { @@ -513,7 +521,7 @@ function addFilteringHint(obj, text) } } -function addColumnFilter(event, colID, colType, filterstring) { +function addColumnFilter(event, colID, filterstring) { // Do not filter anything when the checkbox is unticked if (!autofilter()) { return; @@ -524,6 +532,8 @@ function addColumnFilter(event, colID, colType, filterstring) { resetColumnsFilters(); } + tableFilters[colID] = filterstring; + // Apply filtering tableApi .column(colID) @@ -533,11 +543,12 @@ function addColumnFilter(event, colID, colType, filterstring) { // Apply background color tableApi.$("td:eq(" + colID + ")") .css("background-color", colHighlightColor); - showResetButton(colType, filterstring); + showResetButton(); } function resetColumnsFilters() { - tableApi.columns()[0].forEach(function(index) { + tableFilters.forEach(function(value, index) { + tableFilters[index] = ""; tableApi.column(index).search("", true, true); tableApi.$("td:eq(" + index + ")") .css("background-color", "#fff"); @@ -549,14 +560,22 @@ function resetColumnsFilters() { tableApi.draw(); } -function showResetButton(type, param) { +var colTypes = ["time", "query type", "domain", "client", "status", "reply type"]; + +function showResetButton() { var button = $("#resetButton"); - if (button.text().length === 0) { - button.text("Clear filtering on " + type + ' "' + param + '"'); - } else { - button.text(button.text() + " and " + type + ' "' + param + '"'); - } + var text = ""; + tableFilters.forEach(function(value, index) { + if (value.length > 0) { + if (text.length === 0) { + text = 'Clear filtering on ' + colTypes[index] + ' "' + value + '"'; + } else { + text += ' and ' + colTypes[index] + ' "' + value + '"'; + } + } + }); + button.text(text); button.show(); } From fcd4751cb7ee29fdc2892f22b03a083e4b0247b3 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Fri, 24 Apr 2020 12:01:56 +0200 Subject: [PATCH 042/298] Implement selective undoing using the Shift key. Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 67 ++++++++++++++++++++++------------- 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index d4328708c..9bf65f94e 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -508,8 +508,7 @@ $(document).ready(function() { }); }); -function addFilteringHint(obj, text) -{ +function addFilteringHint(obj, text) { if (autofilter()) { obj.title = "Click to show only queries " + text; obj.style.color = "#72afd2"; @@ -527,35 +526,57 @@ function addColumnFilter(event, colID, filterstring) { return; } - // Do nothing in case of a requested multi-selection - if (!event.ctrlKey && !event.metaKey) { + // Reset other columns when NOT requesting multi-selection functions + if (!event.ctrlKey && !event.metaKey && !event.shiftKey) { resetColumnsFilters(); } - tableFilters[colID] = filterstring; + if (event.shiftKey) { + filterstring = ""; + } - // Apply filtering - tableApi - .column(colID) - .search("^" + filterstring + "$", true, true) - .draw(); + tableFilters[colID] = filterstring; - // Apply background color - tableApi.$("td:eq(" + colID + ")") - .css("background-color", colHighlightColor); - showResetButton(); + applyColumnFiltering(); } function resetColumnsFilters() { tableFilters.forEach(function(value, index) { tableFilters[index] = ""; - tableApi.column(index).search("", true, true); - tableApi.$("td:eq(" + index + ")") - .css("background-color", "#fff"); }); // Clear filter reset button - hideResetButton(); + applyColumnFiltering(); +} + +function applyColumnFiltering() { + var showReset = false; + tableFilters.forEach(function(value, index) { + // Prepare regex filter string + var regex = ""; + if (value.length > 0) { + regex = "^" + value + "$"; + + // Add background color + tableApi.$("td:eq(" + index + ")").css("background-color", colHighlightColor); + + // Remember to show reset button + showReset = true; + } else { + // Clear background color + tableApi.$("td:eq(" + index + ")").css("background-color", "#fff"); + } + + // Apply filtering on this column (regex may be empty -> no filtering) + tableApi.column(index).search(regex, true, true); + }); + + if (showReset) { + showResetButton(); + } else { + hideResetButton(); + } + // Trigger table update tableApi.draw(); } @@ -566,12 +587,10 @@ function showResetButton() { var button = $("#resetButton"); var text = ""; tableFilters.forEach(function(value, index) { - if (value.length > 0) { - if (text.length === 0) { - text = 'Clear filtering on ' + colTypes[index] + ' "' + value + '"'; - } else { - text += ' and ' + colTypes[index] + ' "' + value + '"'; - } + if (value.length > 0 && text.length === 0) { + text = "Clear filtering on " + colTypes[index] + ' "' + value + '"'; + } else if (value.length > 0) { + text += " and " + colTypes[index] + ' "' + value + '"'; } }); From 82f4549219cd0686e8bf660dd62d9fedd3426a88 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 25 Apr 2020 06:22:17 +0200 Subject: [PATCH 043/298] Add filtering on status column. Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 59 +++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 9bf65f94e..e96da742e 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -270,6 +270,8 @@ $(document).ready(function() { buttontext = ""; } + fieldtext += ''; + $(row).addClass(colorClass); $("td:eq(4)", row).html(fieldtext); $("td:eq(6)", row).html(buttontext); @@ -302,7 +304,8 @@ $(document).ready(function() { } // Check for existence of sixth column and display only if not Pi-holed - var replytext; + var replytext, + replyid = -1; if (data.length > 6 && !blocked) { switch (data[6]) { case "0": @@ -341,10 +344,14 @@ $(document).ready(function() { default: replytext = "? (" + parseInt(data[6]) + ")"; } + + replyid = parseInt(data[6]); } else { replytext = "-"; } + replytext += ''; + $("td:eq(5)", row).addClass("text-black"); $("td:eq(5)", row).html(replytext); @@ -475,6 +482,39 @@ $(document).ready(function() { this.style.cursor = ""; } ); + + // Status + api.$("td:eq(4)").click(function(event) { + var id = this.children.id.value; + var text = this.textContent; + addColumnFilter(event, 4, id + "#" + text); + }); + api.$("td:eq(4)").hover( + function() { + addFilteringHint(this, "with status " + this.textContent); + }, + function() { + this.style.color = ""; + this.style.cursor = ""; + } + ); + /* + // Reply type + api.$("td:eq(5)").click(function(event) { + var id = this.children.id.value; + var text = this.textContent.split(" ")[0]; + // Column 5 is DNSSEC status data + addColumnFilter(event, 6, id + "#" + text); + }); + api.$("td:eq(5)").hover( + function() { + addFilteringHint(this, "with reply type " + this.textContent); + }, + function() { + this.style.color = ""; + this.style.cursor = ""; + } + );*/ } }); @@ -554,7 +594,15 @@ function applyColumnFiltering() { tableFilters.forEach(function(value, index) { // Prepare regex filter string var regex = ""; + + // Split filter string if we received a combined ID#Name column + var valArr = value.split("#"); + if (valArr.length > 0) { + value = valArr[0]; + } + if (value.length > 0) { + // Exact matching regex = "^" + value + "$"; // Add background color @@ -581,12 +629,19 @@ function applyColumnFiltering() { tableApi.draw(); } -var colTypes = ["time", "query type", "domain", "client", "status", "reply type"]; +var colTypes = ["time", "query type", "domain", "client", "status", "DNSSEC reply", "reply type"]; function showResetButton() { var button = $("#resetButton"); var text = ""; tableFilters.forEach(function(value, index) { + // Split filter string if we received a combined ID#Name column + var valArr = value.split("#"); + if (valArr.length > 1) { + value = valArr[1]; + } + + // Create or add to button text if (value.length > 0 && text.length === 0) { text = "Clear filtering on " + colTypes[index] + ' "' + value + '"'; } else if (value.length > 0) { From 1466ecd486c18afe32a4a4329906151676f4c89f Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 25 Apr 2020 15:04:09 +0200 Subject: [PATCH 044/298] Add reply type filtering. Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index e96da742e..d646f5d81 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -146,7 +146,7 @@ $(document).ready(function() { rowCallback: function(row, data) { // DNSSEC status var dnssec_status; - switch (data[5]) { + switch (data[6]) { case "1": dnssec_status = '
SECURE'; break; @@ -306,8 +306,8 @@ $(document).ready(function() { // Check for existence of sixth column and display only if not Pi-holed var replytext, replyid = -1; - if (data.length > 6 && !blocked) { - switch (data[6]) { + if (!blocked) { + switch (data[5]) { case "0": replytext = "N/A"; break; @@ -345,7 +345,7 @@ $(document).ready(function() { replytext = "? (" + parseInt(data[6]) + ")"; } - replyid = parseInt(data[6]); + replyid = parseInt(data[5]); } else { replytext = "-"; } @@ -372,6 +372,10 @@ $(document).ready(function() { var dataIndex = 0; return data.data.map(function(x) { x[0] = x[0] * 1e6 + dataIndex++; + var dnssec = x[5]; + var reply = x[6]; + x[5] = reply; + x[6] = dnssec; return x; }); } @@ -498,13 +502,12 @@ $(document).ready(function() { this.style.cursor = ""; } ); - /* + // Reply type api.$("td:eq(5)").click(function(event) { var id = this.children.id.value; var text = this.textContent.split(" ")[0]; - // Column 5 is DNSSEC status data - addColumnFilter(event, 6, id + "#" + text); + addColumnFilter(event, 5, id + "#" + text); }); api.$("td:eq(5)").hover( function() { @@ -514,7 +517,7 @@ $(document).ready(function() { this.style.color = ""; this.style.cursor = ""; } - );*/ + ); } }); From 4d9409e7082bb50f69254ea98b9101bc5c828974 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 25 Apr 2020 15:05:47 +0200 Subject: [PATCH 045/298] Apply filtering events only on Ctrl/Command/Shift + Click. Signed-off-by: DL6ER --- queries.php | 2 +- scripts/pi-hole/js/queries.js | 166 ++++++++-------------------------- 2 files changed, 41 insertions(+), 127 deletions(-) diff --git a/queries.php b/queries.php index d7ea8cca1..c123fb5b7 100644 --- a/queries.php +++ b/queries.php @@ -155,7 +155,7 @@ -
+
diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index d646f5d81..93e7344be 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -109,10 +109,6 @@ function handleAjaxError(xhr, textStatus) { tableApi.draw(); } -function autofilter() { - return $("#autofilter").prop("checked"); -} - $(document).ready(function() { // Do we want to filter queries? var GETDict = {}; @@ -305,49 +301,43 @@ $(document).ready(function() { // Check for existence of sixth column and display only if not Pi-holed var replytext, - replyid = -1; - if (!blocked) { - switch (data[5]) { - case "0": - replytext = "N/A"; - break; - case "1": - replytext = "NODATA"; - break; - case "2": - replytext = "NXDOMAIN"; - break; - case "3": - replytext = "CNAME"; - break; - case "4": - replytext = "IP"; - break; - case "5": - replytext = "DOMAIN"; - break; - case "6": - replytext = "RRNAME"; - break; - case "7": - replytext = "SERVFAIL"; - break; - case "8": - replytext = "REFUSED"; - break; - case "9": - replytext = "NOTIMP"; - break; - case "10": - replytext = "upstream error"; - break; - default: - replytext = "? (" + parseInt(data[6]) + ")"; - } - - replyid = parseInt(data[5]); - } else { - replytext = "-"; + replyid = parseInt(data[5]);; + switch (replyid) { + case 0: + replytext = "N/A"; + break; + case 1: + replytext = "NODATA"; + break; + case 2: + replytext = "NXDOMAIN"; + break; + case 3: + replytext = "CNAME"; + break; + case 4: + replytext = "IP"; + break; + case 5: + replytext = "DOMAIN"; + break; + case 6: + replytext = "RRNAME"; + break; + case 7: + replytext = "SERVFAIL"; + break; + case 8: + replytext = "REFUSED"; + break; + case 9: + replytext = "NOTIMP"; + break; + case 10: + replytext = "upstream error"; + break; + default: + replytext = "? (" +data[5] + ")"; } replytext += ''; @@ -449,43 +439,16 @@ $(document).ready(function() { api.$("td:eq(1)").click(function(event) { addColumnFilter(event, 1, this.textContent); }); - api.$("td:eq(1)").hover( - function() { - addFilteringHint(this, "with query type " + this.textContent); - }, - function() { - this.style.color = ""; - this.style.cursor = ""; - } - ); // Domain api.$("td:eq(2)").click(function(event) { addColumnFilter(event, 2, this.textContent.split("\n")[0]); }); - api.$("td:eq(2)").hover( - function() { - addFilteringHint(this, "with domain " + this.textContent); - }, - function() { - this.style.color = ""; - this.style.cursor = ""; - } - ); // Client api.$("td:eq(3)").click(function(event) { addColumnFilter(event, 3, this.textContent); }); - api.$("td:eq(3)").hover( - function() { - addFilteringHint(this, "made by client " + this.textContent); - }, - function() { - this.style.color = ""; - this.style.cursor = ""; - } - ); // Status api.$("td:eq(4)").click(function(event) { @@ -493,15 +456,6 @@ $(document).ready(function() { var text = this.textContent; addColumnFilter(event, 4, id + "#" + text); }); - api.$("td:eq(4)").hover( - function() { - addFilteringHint(this, "with status " + this.textContent); - }, - function() { - this.style.color = ""; - this.style.cursor = ""; - } - ); // Reply type api.$("td:eq(5)").click(function(event) { @@ -509,15 +463,6 @@ $(document).ready(function() { var text = this.textContent.split(" ")[0]; addColumnFilter(event, 5, id + "#" + text); }); - api.$("td:eq(5)").hover( - function() { - addFilteringHint(this, "with reply type " + this.textContent); - }, - function() { - this.style.color = ""; - this.style.cursor = ""; - } - ); } }); @@ -535,43 +480,12 @@ $(document).ready(function() { $("#resetButton").click(function() { resetColumnsFilters(); }); - - var chkbox_data = localStorage.getItem("query_log_filter_chkbox"); - if (chkbox_data !== null) { - // Restore checkbox state - $("#autofilter").prop("checked", chkbox_data === "true"); - } else { - // Initialize checkbox - $("#autofilter").prop("checked", true); - localStorage.setItem("query_log_filter_chkbox", true); - } - - $("#autofilter").click(function() { - localStorage.setItem("query_log_filter_chkbox", $("#autofilter").prop("checked")); - }); }); -function addFilteringHint(obj, text) { - if (autofilter()) { - obj.title = "Click to show only queries " + text; - obj.style.color = "#72afd2"; - obj.style.cursor = "pointer"; - } else { - obj.title = ""; - obj.style.color = ""; - obj.style.cursor = ""; - } -} - function addColumnFilter(event, colID, filterstring) { - // Do not filter anything when the checkbox is unticked - if (!autofilter()) { - return; - } - - // Reset other columns when NOT requesting multi-selection functions + // Don't do anything when NOT explicitly requesting multi-selection functions if (!event.ctrlKey && !event.metaKey && !event.shiftKey) { - resetColumnsFilters(); + return; } if (event.shiftKey) { @@ -632,7 +546,7 @@ function applyColumnFiltering() { tableApi.draw(); } -var colTypes = ["time", "query type", "domain", "client", "status", "DNSSEC reply", "reply type"]; +var colTypes = ["time", "query type", "domain", "client", "status", "reply type"]; function showResetButton() { var button = $("#resetButton"); From cb3be64a23a993f5286a505e045f7161bcb044a7 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 26 Apr 2020 09:50:56 +0200 Subject: [PATCH 046/298] Simply reply type code. Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 75 ++++++++++------------------------- 1 file changed, 22 insertions(+), 53 deletions(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 93e7344be..bfdea4e85 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -11,6 +11,21 @@ var tableApi; var colHighlightColor = "#ffefad"; var tableFilters = []; +var replyTypes = [ + "N/A", + "NODATA", + "NXDOMAIN", + "CNAME", + "IP", + "DOMAIN", + "RRNAME", + "SERVFAIL", + "REFUSED", + "NOTIMP", + "upstream error" +]; +var colTypes = ["time", "query type", "domain", "client", "status", "reply type"]; + function add(domain, list) { var token = $("#token").text(); var alertModal = $("#alertModal"); @@ -164,8 +179,7 @@ $(document).ready(function() { } // Query status - var blocked, - fieldtext, + var fieldtext, buttontext, colorClass, isCNAME = false, @@ -173,28 +187,24 @@ $(document).ready(function() { switch (data[4]) { case "1": - blocked = true; colorClass = "text-red"; fieldtext = "Blocked (gravity)"; buttontext = ''; break; case "2": - blocked = false; colorClass = "text-green"; fieldtext = "OK (forwarded)" + dnssec_status; buttontext = ''; break; case "3": - blocked = false; colorClass = "text-green"; fieldtext = "OK (cached)" + dnssec_status; buttontext = ''; break; case "4": - blocked = true; colorClass = "text-red"; fieldtext = "Blocked (regex blacklist)"; @@ -206,32 +216,27 @@ $(document).ready(function() { ''; break; case "5": - blocked = true; colorClass = "text-red"; fieldtext = "Blocked (exact blacklist)"; buttontext = ''; break; case "6": - blocked = true; colorClass = "text-red"; fieldtext = "Blocked (external, IP)"; buttontext = ""; break; case "7": - blocked = true; colorClass = "text-red"; fieldtext = "Blocked (external, NULL)"; buttontext = ""; break; case "8": - blocked = true; colorClass = "text-red"; fieldtext = "Blocked (external, NXRA)"; buttontext = ""; break; case "9": - blocked = true; colorClass = "text-red"; fieldtext = "Blocked (gravity, CNAME)"; buttontext = @@ -239,7 +244,6 @@ $(document).ready(function() { isCNAME = true; break; case "10": - blocked = true; colorClass = "text-red"; fieldtext = "Blocked (regex blacklist, CNAME)"; @@ -252,7 +256,6 @@ $(document).ready(function() { isCNAME = true; break; case "11": - blocked = true; colorClass = "text-red"; fieldtext = "Blocked (exact blacklist, CNAME)"; buttontext = @@ -260,7 +263,6 @@ $(document).ready(function() { isCNAME = true; break; default: - blocked = false; colorClass = "text-black"; fieldtext = "Unknown (" + parseInt(data[4]) + ")"; buttontext = ""; @@ -301,43 +303,12 @@ $(document).ready(function() { // Check for existence of sixth column and display only if not Pi-holed var replytext, - replyid = parseInt(data[5]);; - switch (replyid) { - case 0: - replytext = "N/A"; - break; - case 1: - replytext = "NODATA"; - break; - case 2: - replytext = "NXDOMAIN"; - break; - case 3: - replytext = "CNAME"; - break; - case 4: - replytext = "IP"; - break; - case 5: - replytext = "DOMAIN"; - break; - case 6: - replytext = "RRNAME"; - break; - case 7: - replytext = "SERVFAIL"; - break; - case 8: - replytext = "REFUSED"; - break; - case 9: - replytext = "NOTIMP"; - break; - case 10: - replytext = "upstream error"; - break; - default: - replytext = "? (" +data[5] + ")"; + replyid = parseInt(data[5]); + + if (replyid >= 0 && replyid < replyTypes.length) { + replytext = replyTypes[replyid]; + } else { + replytext = "? (" + replyid + ")"; } replytext += ''; @@ -546,8 +517,6 @@ function applyColumnFiltering() { tableApi.draw(); } -var colTypes = ["time", "query type", "domain", "client", "status", "reply type"]; - function showResetButton() { var button = $("#resetButton"); var text = ""; From 6c2685229564b01fb598ff6da35f49889e171d6e Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 26 Apr 2020 21:37:51 +0000 Subject: [PATCH 047/298] Use classes for highlighting to ensure the alternate row colors are not lost when removing a column from the selection. Signed-off-by: DL6ER --- queries.php | 7 +++++-- scripts/pi-hole/js/queries.js | 5 ++--- style/pi-hole.css | 6 +++++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/queries.php b/queries.php index c123fb5b7..e73daf4e9 100644 --- a/queries.php +++ b/queries.php @@ -155,8 +155,11 @@ -
- + +
    +
  • Use Ctrl or + to add columns to the current filter
  • +
  • Use Shift + to remove columns to the current filter
  • +

diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index bfdea4e85..e48eeee3c 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -8,7 +8,6 @@ /* global moment:false */ var tableApi; -var colHighlightColor = "#ffefad"; var tableFilters = []; var replyTypes = [ @@ -494,13 +493,13 @@ function applyColumnFiltering() { regex = "^" + value + "$"; // Add background color - tableApi.$("td:eq(" + index + ")").css("background-color", colHighlightColor); + tableApi.$("td:eq(" + index + ")").addClass("filter-highlight"); // Remember to show reset button showReset = true; } else { // Clear background color - tableApi.$("td:eq(" + index + ")").css("background-color", "#fff"); + tableApi.$("td:eq(" + index + ")").removeClass("filter-highlight"); } // Apply filtering on this column (regex may be empty -> no filtering) diff --git a/style/pi-hole.css b/style/pi-hole.css index 08ee7abb0..67de6bcd3 100644 --- a/style/pi-hole.css +++ b/style/pi-hole.css @@ -265,4 +265,8 @@ code.breakall .bootstrap-select.bs-container.align-right { left: unset !important; right: 10px; -} \ No newline at end of file +} + +.filter-highlight { + background-color: #ffcc0050; +} From f7277b28b8b3648fbabef3862eecaf68b98983f3 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 28 Apr 2020 17:38:55 +0300 Subject: [PATCH 048/298] CI: remove no longer needed steps The latest `actions/setup-node` prints this info by default Signed-off-by: XhmikosR --- .github/workflows/test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a66b13307..b0cca47c9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,9 +22,6 @@ jobs: with: node-version: ${{ matrix.node }} - - run: node --version - - run: npm --version - - name: Install npm dependencies run: npm ci From c463e15ba6d72b24e2b6da3b65674580564d63c9 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 28 Apr 2020 17:55:41 +0000 Subject: [PATCH 049/298] Fix wording Signed-off-by: DL6ER --- queries.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/queries.php b/queries.php index e73daf4e9..6623c1fc0 100644 --- a/queries.php +++ b/queries.php @@ -158,7 +158,7 @@
  • Use Ctrl or + to add columns to the current filter
  • -
  • Use Shift + to remove columns to the current filter
  • +
  • Use Shift + to remove columns from the current filter

From acba118a42f45a791192f9ff652a966060a8c520 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 2 May 2020 14:55:16 +0300 Subject: [PATCH 050/298] Bump xo from 0.29.1 to 0.30.0 (#1233) * Bump xo from 0.29.1 to 0.30.0 Bumps [xo](https://github.com/xojs/xo) from 0.29.1 to 0.30.0. - [Release notes](https://github.com/xojs/xo/releases) - [Commits](https://github.com/xojs/xo/compare/v0.29.1...v0.30.0) Signed-off-by: dependabot-preview[bot] * Ignore `unicorn/no-fn-reference-in-iterator` rule Signed-off-by: XhmikosR Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: XhmikosR --- package-lock.json | 191 +++++++++++++++++++++++++--------------------- package.json | 3 +- 2 files changed, 104 insertions(+), 90 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4b2521c37..ec638ed0a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,9 +31,9 @@ } }, "@babel/runtime": { - "version": "7.9.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz", - "integrity": "sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==", + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.6.tgz", + "integrity": "sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ==", "dev": true, "requires": { "regenerator-runtime": "^0.13.4" @@ -112,9 +112,9 @@ "dev": true }, "@types/node": { - "version": "13.13.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.0.tgz", - "integrity": "sha512-WE4IOAC6r/yBZss1oQGM5zs2D7RuKR6Q+w+X2SouPofnWn+LbCqClRyhO3ZE7Ix8nmFgo/oVuuE01cJT2XB13A==", + "version": "13.13.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.4.tgz", + "integrity": "sha512-x26ur3dSXgv5AwKS0lNfbjpCakGIduWU1DU91Zz58ONRWrIKGunmZBNv4P7N+e27sJkiGDsw/3fT4AtsqQBrBA==", "dev": true }, "@types/normalize-package-data": { @@ -130,45 +130,45 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.28.0.tgz", - "integrity": "sha512-w0Ugcq2iatloEabQP56BRWJowliXUP5Wv6f9fKzjJmDW81hOTBxRoJ4LoEOxRpz9gcY51Libytd2ba3yLmSOfg==", + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.30.0.tgz", + "integrity": "sha512-PGejii0qIZ9Q40RB2jIHyUpRWs1GJuHP1pkoCiaeicfwO9z7Fx03NQzupuyzAmv+q9/gFNHu7lo1ByMXe8PNyg==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.28.0", + "@typescript-eslint/experimental-utils": "2.30.0", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", "tsutils": "^3.17.1" } }, "@typescript-eslint/experimental-utils": { - "version": "2.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.28.0.tgz", - "integrity": "sha512-4SL9OWjvFbHumM/Zh/ZeEjUFxrYKtdCi7At4GyKTbQlrj1HcphIDXlje4Uu4cY+qzszR5NdVin4CCm6AXCjd6w==", + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.30.0.tgz", + "integrity": "sha512-L3/tS9t+hAHksy8xuorhOzhdefN0ERPDWmR9CclsIGOUqGKy6tqc/P+SoXeJRye5gazkuPO0cK9MQRnolykzkA==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.28.0", + "@typescript-eslint/typescript-estree": "2.30.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "2.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.28.0.tgz", - "integrity": "sha512-RqPybRDquui9d+K86lL7iPqH6Dfp9461oyqvlXMNtap+PyqYbkY5dB7LawQjDzot99fqzvS0ZLZdfe+1Bt3Jgw==", + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.30.0.tgz", + "integrity": "sha512-9kDOxzp0K85UnpmPJqUzdWaCNorYYgk1yZmf4IKzpeTlSAclnFsrLjfwD9mQExctLoLoGAUXq1co+fbr+3HeFw==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.28.0", - "@typescript-eslint/typescript-estree": "2.28.0", + "@typescript-eslint/experimental-utils": "2.30.0", + "@typescript-eslint/typescript-estree": "2.30.0", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.28.0.tgz", - "integrity": "sha512-HDr8MP9wfwkiuqzRVkuM3BeDrOC4cKbO5a6BymZBHUt5y/2pL0BXD6I/C/ceq2IZoHWhcASk+5/zo+dwgu9V8Q==", + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.30.0.tgz", + "integrity": "sha512-nI5WOechrA0qAhnr+DzqwmqHsx7Ulr/+0H7bWCcClDhhWkSyZR5BmTvnBEyONwJCTWHfc5PAQExX24VD26IAVw==", "dev": true, "requires": { "debug": "^4.1.1", @@ -201,9 +201,9 @@ "dev": true }, "ajv": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", - "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", + "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -1482,9 +1482,9 @@ } }, "eslint-config-prettier": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz", - "integrity": "sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz", + "integrity": "sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA==", "dev": true, "requires": { "get-stdin": "^6.0.0" @@ -1508,9 +1508,9 @@ } }, "eslint-config-xo-typescript": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/eslint-config-xo-typescript/-/eslint-config-xo-typescript-0.27.0.tgz", - "integrity": "sha512-aBRN8Nb6sc5oFIIuJoqr9uGCPGkVAVU2sRKN/RQ3iDt0AdrI/jgbgRQXpsAf3V8oK2013satUokRbHG6e7mrkQ==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/eslint-config-xo-typescript/-/eslint-config-xo-typescript-0.28.0.tgz", + "integrity": "sha512-q+mBhTikLjrPOszx6gezd6ZxrbrSHeBp/Z8gGgPowBYvBYG78llfQZxOcsbKN6aM8+S/OFAJP9bk5w/roLDFTA==", "dev": true }, "eslint-formatter-pretty": { @@ -1728,9 +1728,9 @@ } }, "eslint-plugin-ava": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-ava/-/eslint-plugin-ava-10.2.0.tgz", - "integrity": "sha512-1EP9Mn/pau+ZxwRPDspiioRD6GHCSz7RywTmqW01JTxXvX0vKEV0odfWe+QL+jXfmqd83SHHvDJfOvYcyzoxYA==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-ava/-/eslint-plugin-ava-10.3.0.tgz", + "integrity": "sha512-rNijYwBo+28ahXvifTx3IYzsNjtArAeyowBJ1Rd5dCtW7f0y5aSTBU7sXBpU5o5Eh5/FZvz3lSLVLac8ExYTtA==", "dev": true, "requires": { "deep-strict-equal": "^0.2.0", @@ -1738,6 +1738,7 @@ "espree": "^6.1.2", "espurify": "^2.0.1", "import-modules": "^2.0.0", + "micro-spelling-correcter": "^1.1.1", "pkg-dir": "^4.2.0", "resolve-from": "^5.0.0" } @@ -1818,9 +1819,9 @@ } }, "eslint-plugin-no-use-extend-native": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-no-use-extend-native/-/eslint-plugin-no-use-extend-native-0.4.1.tgz", - "integrity": "sha512-tDkHM0kvxU0M2TpLRKGfFrpWXctFdTDY7VkiDTLYDaX90hMSJKkr/FiWThEXvKV0Dvffut2Z0B9Y7+h/k6suiA==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-use-extend-native/-/eslint-plugin-no-use-extend-native-0.5.0.tgz", + "integrity": "sha512-dBNjs8hor8rJgeXLH4HTut5eD3RGWf9JUsadIfuL7UosVQ/dnvOKwxEcRrXrFxrMZ8llUVWT+hOimxJABsAUzQ==", "dev": true, "requires": { "is-get-set-prop": "^1.0.0", @@ -1873,15 +1874,16 @@ "dev": true }, "eslint-plugin-unicorn": { - "version": "18.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-18.0.1.tgz", - "integrity": "sha512-Y4bgygek4x4ogeMcSHr6MZi3frBPZ80eIpMOsxew7jAblb53OYflpRh0an62Z6jv/fw7D3TkXauqLOBWbT9adg==", + "version": "19.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-19.0.1.tgz", + "integrity": "sha512-fu0/h5mHXfBC6EkA3i2vCjsfC8j53+T9txGhNL4fpxJ+1JKsUKfv+tmXDgy0XnLHhFjnOZp4tRWJWbcykeIP2Q==", "dev": true, "requires": { "ci-info": "^2.0.0", "clean-regexp": "^1.0.0", "eslint-ast-utils": "^1.1.0", "eslint-template-visitor": "^1.1.0", + "eslint-utils": "^2.0.0", "import-modules": "^2.0.0", "lodash": "^4.17.15", "read-pkg-up": "^7.0.1", @@ -1925,9 +1927,9 @@ } }, "eslint-rule-docs": { - "version": "1.1.186", - "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.186.tgz", - "integrity": "sha512-EwnjyJ0Go9V5e7fbq3JGnfUy1Is3p79oyBQANFPx72mK9t9jv8W2ox3wHc7RS2DPJneLak5n/4zRWYHFiB1HsA==", + "version": "1.1.188", + "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.188.tgz", + "integrity": "sha512-fNlK5bAgbRlR3ddetZ9wfLrVtFkAawg/mVIv6+CekwEGxaKDF7myWDFpxGhumkQmrl+TpSOMAhUPw+/TNT6A+Q==", "dev": true }, "eslint-scope": { @@ -2526,9 +2528,9 @@ } }, "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", "dev": true }, "has": { @@ -2591,13 +2593,27 @@ "dev": true }, "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } } }, "hash.js": { @@ -3045,12 +3061,6 @@ "isobject": "^3.0.1" } }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, "is-proto-prop": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-proto-prop/-/is-proto-prop-2.0.0.tgz", @@ -3343,9 +3353,9 @@ "dev": true }, "make-dir": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", - "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "requires": { "semver": "^6.0.0" @@ -3529,6 +3539,12 @@ "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==", "dev": true }, + "micro-spelling-correcter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/micro-spelling-correcter/-/micro-spelling-correcter-1.1.1.tgz", + "integrity": "sha512-lkJ3Rj/mtjlRcHk6YyCbvZhyWTOzdBvTHsxMmZSk5jxN1YyVSQ+JETAom55mdzfcyDrY/49Z7UCW760BK30crg==", + "dev": true + }, "micromatch": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", @@ -4488,9 +4504,9 @@ "dev": true }, "resolve": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.1.tgz", - "integrity": "sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -4562,13 +4578,10 @@ } }, "run-async": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", - "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true }, "rxjs": { "version": "6.5.5", @@ -4866,9 +4879,9 @@ } }, "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, "spdx-expression-parse": { @@ -5594,30 +5607,30 @@ "dev": true }, "xo": { - "version": "0.29.1", - "resolved": "https://registry.npmjs.org/xo/-/xo-0.29.1.tgz", - "integrity": "sha512-ohlXtUatjHi4f7dRF+c/nv08zyB3+iROxwfX3xEIw2J5Tk5j4I/bPqx4tUzESVHFCh5tQbu528ZEPJmM5P3c/g==", + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/xo/-/xo-0.30.0.tgz", + "integrity": "sha512-755dmXTIj8uHv0lUZmDrtQb98wdu6ryqgcy8jvXBZgABz+kHm12IlzRQP+bO+w1u6NqkQB0Nn0Bh6Uv+KhdYiA==", "dev": true, "requires": { - "@typescript-eslint/eslint-plugin": "^2.27.0", - "@typescript-eslint/parser": "^2.27.0", + "@typescript-eslint/eslint-plugin": "^2.29.0", + "@typescript-eslint/parser": "^2.29.0", "arrify": "^2.0.1", "cosmiconfig": "^6.0.0", "debug": "^4.1.0", "eslint": "^6.8.0", - "eslint-config-prettier": "^6.10.0", + "eslint-config-prettier": "^6.11.0", "eslint-config-xo": "^0.29.0", - "eslint-config-xo-typescript": "^0.27.0", + "eslint-config-xo-typescript": "^0.28.0", "eslint-formatter-pretty": "^3.0.1", "eslint-import-resolver-webpack": "^0.12.1", "eslint-plugin-ava": "^10.0.1", "eslint-plugin-eslint-comments": "^3.1.2", "eslint-plugin-import": "^2.20.1", - "eslint-plugin-no-use-extend-native": "^0.4.1", + "eslint-plugin-no-use-extend-native": "^0.5.0", "eslint-plugin-node": "^11.0.0", - "eslint-plugin-prettier": "^3.1.2", + "eslint-plugin-prettier": "^3.1.3", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-unicorn": "^18.0.1", + "eslint-plugin-unicorn": "^19.0.0", "find-cache-dir": "^3.3.1", "find-up": "^4.1.0", "fs-extra": "^9.0.0", @@ -5634,10 +5647,10 @@ "open-editor": "^2.0.1", "p-reduce": "^2.1.0", "path-exists": "^4.0.0", - "prettier": "^2.0.4", + "prettier": "2.0.4", "resolve-cwd": "^3.0.0", "resolve-from": "^5.0.0", - "semver": "^7.2.1", + "semver": "^7.3.2", "slash": "^3.0.0", "to-absolute-glob": "^2.0.2", "typescript": "^3.0.0", @@ -5651,12 +5664,12 @@ "dev": true }, "yaml": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.9.0.tgz", - "integrity": "sha512-3GLZOj8A9Gsp0Fw3kOyj0zqk4xMq+YvhbHSDYALd2NMOfIpyZeBhz32ZiNU7AtX1MtXX/9JJgxSElGRwvv9enA==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.9.2.tgz", + "integrity": "sha512-HPT7cGGI0DuRcsO51qC1j9O16Dh1mZ2bnXwsi0jrSpsLz0WxOLSLXfkABVl6bZO629py3CU+OMJtpNHDLB97kg==", "dev": true, "requires": { - "@babel/runtime": "^7.9.0" + "@babel/runtime": "^7.9.2" } }, "yargs-parser": { diff --git a/package.json b/package.json index e9d7606fa..1c1f8067c 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "test": "npm run xo" }, "devDependencies": { - "xo": "^0.29.1" + "xo": "^0.30.0" }, "prettier": { "arrowParens": "avoid", @@ -56,6 +56,7 @@ "spaced-comment": "off", "unicorn/explicit-length-check": "off", "unicorn/filename-case": "off", + "unicorn/no-fn-reference-in-iterator": "off", "unicorn/no-for-loop": "off", "unicorn/no-zero-fractions": "off", "unicorn/prefer-includes": "off", From 0e35b415ea547a903b05793b0ed51a4a2df42496 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 4 May 2020 10:50:13 +0300 Subject: [PATCH 051/298] JS: test for length explicitly. (#1240) Signed-off-by: XhmikosR --- package.json | 7 ++++++- scripts/pi-hole/js/footer.js | 2 +- scripts/pi-hole/js/settings.js | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 1c1f8067c..92227e633 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,12 @@ "one-var": "off", "radix": "off", "spaced-comment": "off", - "unicorn/explicit-length-check": "off", + "unicorn/explicit-length-check": [ + "error", + { + "non-zero": "greater-than" + } + ], "unicorn/filename-case": "off", "unicorn/no-fn-reference-in-iterator": "off", "unicorn/no-for-loop": "off", diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js index a557c6ffd..d8c987201 100644 --- a/scripts/pi-hole/js/footer.js +++ b/scripts/pi-hole/js/footer.js @@ -192,7 +192,7 @@ function testCookies() { } $(function () { - if (!testCookies() && $("#cookieInfo").length) { + if (!testCookies() && $("#cookieInfo").length > 0) { $("#cookieInfo").show(); } }); diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index 17a7ebfdb..981c57da6 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -225,7 +225,7 @@ $(".nav-tabs a").on("shown.bs.tab", function (e) { // Auto dismissal for info notifications $(document).ready(function () { var alInfo = $("#alInfo"); - if (alInfo.length) { + if (alInfo.length > 0) { alInfo.delay(3000).fadeOut(2000, function () { alInfo.hide(); }); From 416d35dc470e68844f4fdcd323be51ca62f2813d Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 4 May 2020 10:50:27 +0300 Subject: [PATCH 052/298] Bump `ecmaVersion` to 5 (#1239) This is the ESLint default and I doubt we care about older versions nowadays Signed-off-by: XhmikosR --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 92227e633..dd3422b3e 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "jquery" ], "parserOptions": { - "ecmaVersion": 3, + "ecmaVersion": 5, "sourceType": "script" }, "esnext": false, From bdde1e66678f4261843f88f0778f45080b966d7a Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 4 May 2020 10:52:00 +0300 Subject: [PATCH 053/298] Use `text()` when retrieving the token. (#1237) Signed-off-by: XhmikosR --- scripts/pi-hole/js/groups-adlists.js | 2 +- scripts/pi-hole/js/groups-clients.js | 2 +- scripts/pi-hole/js/groups-domains.js | 2 +- scripts/pi-hole/js/groups.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/pi-hole/js/groups-adlists.js b/scripts/pi-hole/js/groups-adlists.js index f53bf72d2..692416e98 100644 --- a/scripts/pi-hole/js/groups-adlists.js +++ b/scripts/pi-hole/js/groups-adlists.js @@ -9,7 +9,7 @@ var table; var groups = []; -var token = $("#token").html(); +var token = $("#token").text(); function get_groups() { $.post( diff --git a/scripts/pi-hole/js/groups-clients.js b/scripts/pi-hole/js/groups-clients.js index b1bf453ee..39b878cfb 100644 --- a/scripts/pi-hole/js/groups-clients.js +++ b/scripts/pi-hole/js/groups-clients.js @@ -9,7 +9,7 @@ var table; var groups = []; -var token = $("#token").html(); +var token = $("#token").text(); function reload_client_suggestions() { $.post( diff --git a/scripts/pi-hole/js/groups-domains.js b/scripts/pi-hole/js/groups-domains.js index 4090bfc36..462d729eb 100644 --- a/scripts/pi-hole/js/groups-domains.js +++ b/scripts/pi-hole/js/groups-domains.js @@ -9,7 +9,7 @@ var table; var groups = []; -var token = $("#token").html(); +var token = $("#token").text(); var GETDict = {}; var showtype = "all"; diff --git a/scripts/pi-hole/js/groups.js b/scripts/pi-hole/js/groups.js index e282c3fc8..7031cbd35 100644 --- a/scripts/pi-hole/js/groups.js +++ b/scripts/pi-hole/js/groups.js @@ -8,7 +8,7 @@ /* global utils:false */ var table; -var token = $("#token").html(); +var token = $("#token").text(); $(document).ready(function () { $("#btnAdd").on("click", addGroup); From 9b70e6dc53f687a6412597a0de82bdef7c56301e Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 9 May 2020 09:04:50 +0300 Subject: [PATCH 054/298] Remove unneeded xo suppression. (#1238) Signed-off-by: XhmikosR --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index dd3422b3e..aa2d0c43e 100644 --- a/package.json +++ b/package.json @@ -69,8 +69,7 @@ "unicorn/prefer-number-properties": "off", "unicorn/prefer-query-selector": "off", "unicorn/prefer-string-slice": "off", - "unicorn/prevent-abbreviations": "off", - "unicorn/string-content": "off" + "unicorn/prevent-abbreviations": "off" } } } From 5971707263c91c229b4caf32c89f3c0e2982b193 Mon Sep 17 00:00:00 2001 From: Willem Stuursma-Ruwen Date: Sun, 10 May 2020 21:15:48 +0200 Subject: [PATCH 055/298] Fixes #1227 Fix possible warning when unlinking files Signed-off-by: Willem Stuursma-Ruwen --- api.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api.php b/api.php index e06a43a79..15023dbff 100644 --- a/api.php +++ b/api.php @@ -52,7 +52,8 @@ } pihole_execute('enable'); $data = array_merge($data, array("status" => "enabled")); - unlink("../custom_disable_timer"); + // Silence errors if there is a race condition with the timer + @unlink("../custom_disable_timer"); } elseif (isset($_GET['disable']) && $auth) { @@ -77,7 +78,8 @@ else { pihole_execute('disable'); - unlink("../custom_disable_timer"); + // Silence errors if there is a race condition with the timer + @unlink("../custom_disable_timer"); } $data = array_merge($data, array("status" => "disabled")); } From ba31df26028cd040e37f9e95cb393f666c43a1c3 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 11 May 2020 08:23:24 +0300 Subject: [PATCH 056/298] Update groups-common.js Remove unused assignment Signed-off-by: XhmikosR --- scripts/pi-hole/js/groups-common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/js/groups-common.js b/scripts/pi-hole/js/groups-common.js index 974685e55..452437160 100644 --- a/scripts/pi-hole/js/groups-common.js +++ b/scripts/pi-hole/js/groups-common.js @@ -87,7 +87,7 @@ function enableAll() { // Enable custom input field only if applicable var ip = $("#select") ? $("#select").val() : null; if (ip !== null && ip !== "custom") { - ip = $("#ip-custom").attr("disabled", true); + $("#ip-custom").attr("disabled", true); } } From e02df5467ad7d81e58b6b56b8e594db398246557 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 11 May 2020 09:20:07 +0300 Subject: [PATCH 057/298] Fix lint errors. Signed-off-by: XhmikosR --- scripts/pi-hole/js/db_graph.js | 4 ++-- scripts/pi-hole/js/groups-adlists.js | 23 +++++++---------------- scripts/pi-hole/js/groups-clients.js | 23 +++++++---------------- scripts/pi-hole/js/groups-common.js | 4 ++-- scripts/pi-hole/js/groups-domains.js | 23 +++++++---------------- scripts/pi-hole/js/index.js | 14 +++++++------- scripts/pi-hole/js/queries.js | 2 +- 7 files changed, 33 insertions(+), 60 deletions(-) diff --git a/scripts/pi-hole/js/db_graph.js b/scripts/pi-hole/js/db_graph.js index a72a95a89..ac80360fd 100644 --- a/scripts/pi-hole/js/db_graph.js +++ b/scripts/pi-hole/js/db_graph.js @@ -204,7 +204,7 @@ $(document).ready(function () { options: { tooltips: { enabled: true, - itemSort: function(a, b) { + itemSort: function (a, b) { return b.datasetIndex - a.datasetIndex; }, mode: "x-axis", @@ -267,7 +267,7 @@ $(document).ready(function () { until_time ).split("\n "); }, - label: function(tooltipItems, data) { + label: function (tooltipItems, data) { if (tooltipItems.datasetIndex === 0) { var percentage = 0.0; var permitted = parseInt(data.datasets[1].data[tooltipItems.index]); diff --git a/scripts/pi-hole/js/groups-adlists.js b/scripts/pi-hole/js/groups-adlists.js index 55596ef43..87c17a111 100644 --- a/scripts/pi-hole/js/groups-adlists.js +++ b/scripts/pi-hole/js/groups-adlists.js @@ -113,7 +113,7 @@ function initTable() { // Initialize bootstrap-select selectEl // fix dropdown if it would stick out right of the viewport - .on("show.bs.select", function() { + .on("show.bs.select", function () { var winWidth = $(window).width(); var dropdownEl = $("body > .bootstrap-select.dropdown"); if (dropdownEl.length > 0) { @@ -125,27 +125,22 @@ function initTable() { } } }) - .on("changed.bs.select", function() { + .on("changed.bs.select", function () { // enable Apply button if ($(ApplyBtn).prop("disabled")) { $(ApplyBtn) .addClass("btn-success") .prop("disabled", false) - .on("click", function() { + .on("click", function () { editAdlist.call(selectEl); }); } }) - .on("hide.bs.select", function() { + .on("hide.bs.select", function () { // Restore values if drop-down menu is closed without clicking the Apply button if (!$(ApplyBtn).prop("disabled")) { - $(this) - .val(data.groups) - .selectpicker("refresh"); - $(ApplyBtn) - .removeClass("btn-success") - .prop("disabled", true) - .off("click"); + $(this).val(data.groups).selectpicker("refresh"); + $(ApplyBtn).removeClass("btn-success").prop("disabled", true).off("click"); } }) .selectpicker() @@ -371,11 +366,7 @@ function deleteAdlist() { "Successfully deleted adlist ", address ); - table - .row(tr) - .remove() - .draw(false) - .ajax.reload(null, false); + table.row(tr).remove().draw(false).ajax.reload(null, false); } else { utils.showAlert("error", "", "Error while deleting adlist with ID " + id, response.message); } diff --git a/scripts/pi-hole/js/groups-clients.js b/scripts/pi-hole/js/groups-clients.js index e0941a30d..4fa4c6815 100644 --- a/scripts/pi-hole/js/groups-clients.js +++ b/scripts/pi-hole/js/groups-clients.js @@ -149,7 +149,7 @@ function initTable() { // Initialize bootstrap-select selectEl // fix dropdown if it would stick out right of the viewport - .on("show.bs.select", function() { + .on("show.bs.select", function () { var winWidth = $(window).width(); var dropdownEl = $("body > .bootstrap-select.dropdown"); if (dropdownEl.length > 0) { @@ -161,27 +161,22 @@ function initTable() { } } }) - .on("changed.bs.select", function() { + .on("changed.bs.select", function () { // enable Apply button if ($(ApplyBtn).prop("disabled")) { $(ApplyBtn) .addClass("btn-success") .prop("disabled", false) - .on("click", function() { + .on("click", function () { editClient.call(selectEl); }); } }) - .on("hide.bs.select", function() { + .on("hide.bs.select", function () { // Restore values if drop-down menu is closed without clicking the Apply button if (!$(ApplyBtn).prop("disabled")) { - $(this) - .val(data.groups) - .selectpicker("refresh"); - $(ApplyBtn) - .removeClass("btn-success") - .prop("disabled", true) - .off("click"); + $(this).val(data.groups).selectpicker("refresh"); + $(ApplyBtn).removeClass("btn-success").prop("disabled", true).off("click"); } }) .selectpicker() @@ -405,11 +400,7 @@ function deleteClient() { "Successfully deleted client ", ip_name ); - table - .row(tr) - .remove() - .draw(false) - .ajax.reload(null, false); + table.row(tr).remove().draw(false).ajax.reload(null, false); reload_client_suggestions(); } else { utils.showAlert("error", "", "Error while deleting client with ID " + id, response.message); diff --git a/scripts/pi-hole/js/groups-common.js b/scripts/pi-hole/js/groups-common.js index 005ce7d83..ec9dfe98e 100644 --- a/scripts/pi-hole/js/groups-common.js +++ b/scripts/pi-hole/js/groups-common.js @@ -140,7 +140,7 @@ function bsSelect_defaults() { pickerDEFAULTS.dropdownAlignRight = "auto"; pickerDEFAULTS.selectAllText = "All"; pickerDEFAULTS.deselectAllText = "None"; - pickerDEFAULTS.countSelectedText = function(num, total) { + pickerDEFAULTS.countSelectedText = function (num, total) { if (num === total) { return "All selected (" + num + ")"; } @@ -149,7 +149,7 @@ function bsSelect_defaults() { }; } -window.utils = (function() { +window.utils = (function () { return { showAlert: showAlert, datetime: datetime, diff --git a/scripts/pi-hole/js/groups-domains.js b/scripts/pi-hole/js/groups-domains.js index efd0c87f4..fc7f836b6 100644 --- a/scripts/pi-hole/js/groups-domains.js +++ b/scripts/pi-hole/js/groups-domains.js @@ -184,7 +184,7 @@ function initTable() { // Initialize bootstrap-select selectEl // fix dropdown if it would stick out right of the viewport - .on("show.bs.select", function() { + .on("show.bs.select", function () { var winWidth = $(window).width(); var dropdownEl = $("body > .bootstrap-select.dropdown"); if (dropdownEl.length > 0) { @@ -196,27 +196,22 @@ function initTable() { } } }) - .on("changed.bs.select", function() { + .on("changed.bs.select", function () { // enable Apply button if ($(ApplyBtn).prop("disabled")) { $(ApplyBtn) .addClass("btn-success") .prop("disabled", false) - .on("click", function() { + .on("click", function () { editDomain.call(selectEl); }); } }) - .on("hide.bs.select", function() { + .on("hide.bs.select", function () { // Restore values if drop-down menu is closed without clicking the Apply button if (!$(ApplyBtn).prop("disabled")) { - $(this) - .val(data.groups) - .selectpicker("refresh"); - $(ApplyBtn) - .removeClass("btn-success") - .prop("disabled", true) - .off("click"); + $(this).val(data.groups).selectpicker("refresh"); + $(ApplyBtn).removeClass("btn-success").prop("disabled", true).off("click"); } }) .selectpicker() @@ -518,11 +513,7 @@ function deleteDomain() { "Successfully deleted " + domain_regex, domain ); - table - .row(tr) - .remove() - .draw(false) - .ajax.reload(null, false); + table.row(tr).remove().draw(false).ajax.reload(null, false); } else { utils.showAlert( "error", diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index fba02b7c4..13e27fb48 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -32,7 +32,7 @@ function objectToArray(p) { return [idx, arr]; } -var customTooltips = function(tooltip) { +var customTooltips = function (tooltip) { var tooltipEl = document.getElementById(this._chart.canvas.id + "-customTooltip"); if (!tooltipEl) { // Create Tooltip Element once per chart @@ -74,14 +74,14 @@ var customTooltips = function(tooltip) { var bodyLines = tooltip.body.map(getBody); var innerHtml = ""; - titleLines.forEach(function(title) { + titleLines.forEach(function (title) { innerHtml += "" + title + ""; }); innerHtml += ""; var printed = 0; var devicePixel = (1 / window.devicePixelRatio).toFixed(1); - bodyLines.forEach(function(body, i) { + bodyLines.forEach(function (body, i) { var colors = tooltip.labelColors[i]; var style = "background: " + colors.backgroundColor; style += "; outline: 1px solid " + colors.backgroundColor; @@ -856,7 +856,7 @@ $(document).ready(function () { tooltips: { enabled: true, mode: "x-axis", - itemSort: function(a, b) { + itemSort: function (a, b) { return b.datasetIndex - a.datasetIndex; }, callbacks: { @@ -869,7 +869,7 @@ $(document).ready(function () { var to = padNumber(h) + ":" + padNumber(m + 4) + ":59"; return "Queries from " + from + " to " + to; }, - label: function(tooltipItems, data) { + label: function (tooltipItems, data) { if (tooltipItems.datasetIndex === 0) { var percentage = 0.0; var permitted = parseInt(data.datasets[1].data[tooltipItems.index]); @@ -943,7 +943,7 @@ $(document).ready(function () { mode: "x-axis", custom: customTooltips, yAlign: "top", - itemSort: function(a, b) { + itemSort: function (a, b) { return b.yLabel - a.yLabel; }, callbacks: { @@ -1102,6 +1102,6 @@ $(document).ready(function () { }); //destroy all chartjs customTooltips on window resize -window.addEventListener("resize", function() { +window.addEventListener("resize", function () { $(".chartjs-tooltip").remove(); }); diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 658c4d575..d000e6f1f 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -277,7 +277,7 @@ $(document).ready(function () { } ); $("td:eq(4)", row).off(); // Release any possible previous onClick event handlers - $("td:eq(4)", row).click(function() { + $("td:eq(4)", row).click(function () { var new_tab = window.open("groups-domains.php?domainid=" + data[9], "_blank"); if (new_tab) { new_tab.focus(); From ed528c00e6e280b2bcafc5ba15d232f4501b84a1 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 11 May 2020 16:59:55 +0300 Subject: [PATCH 058/298] groups-common.js: use FontAwesome for consistency Signed-off-by: XhmikosR --- scripts/pi-hole/js/groups-common.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/pi-hole/js/groups-common.js b/scripts/pi-hole/js/groups-common.js index 974685e55..a9589e042 100644 --- a/scripts/pi-hole/js/groups-common.js +++ b/scripts/pi-hole/js/groups-common.js @@ -15,7 +15,7 @@ function showAlert(type, icon, title, message) { case "info": opts = { type: "info", - icon: "glyphicon glyphicon-time", + icon: "far fa-clock", title: title, message: message }; @@ -38,7 +38,7 @@ function showAlert(type, icon, title, message) { case "warning": opts = { type: "warning", - icon: "glyphicon glyphicon-warning-sign", + icon: "fas fa-exclamation-triangle", title: title, message: message }; @@ -52,7 +52,7 @@ function showAlert(type, icon, title, message) { case "error": opts = { type: "danger", - icon: "glyphicon glyphicon-remove", + icon: "fas fa-times", title: " Error, something went wrong!
", message: message }; From 43151d3c438762d8abd9ca04f6d413e1b02a98b7 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 11 May 2020 16:57:20 +0300 Subject: [PATCH 059/298] Add `type="button"` to all buttons. The default is `type="submit"`. Signed-off-by: XhmikosR --- debug.php | 2 +- dns_records.php | 2 +- gravity.php | 2 +- groups-adlists.php | 2 +- groups-clients.php | 2 +- groups.php | 2 +- queries.php | 9 --------- queryads.php | 4 ++-- scripts/pi-hole/js/auditlog.js | 14 +++++++++++--- scripts/pi-hole/js/customdns.js | 2 +- scripts/pi-hole/js/groups-adlists.js | 2 +- scripts/pi-hole/js/groups-clients.js | 2 +- scripts/pi-hole/js/groups-domains.js | 2 +- scripts/pi-hole/js/groups.js | 2 +- scripts/pi-hole/php/footer.php | 2 +- settings.php | 6 +++--- 16 files changed, 28 insertions(+), 29 deletions(-) diff --git a/debug.php b/debug.php index ccb139c7e..db721cad9 100644 --- a/debug.php +++ b/debug.php @@ -14,7 +14,7 @@

Upload debug log and provide token once finished

Once you click this button a debug log will be generated and can automatically be uploaded if we detect a working internet connection.

- + diff --git a/dns_records.php b/dns_records.php index 0ff0e2f4a..d95e77390 100644 --- a/dns_records.php +++ b/dns_records.php @@ -39,7 +39,7 @@ diff --git a/gravity.php b/gravity.php index b73cf514c..4ae73ebb6 100644 --- a/gravity.php +++ b/gravity.php @@ -22,7 +22,7 @@ Success! - + diff --git a/groups-adlists.php b/groups-adlists.php index aef8f884a..d6f93238c 100644 --- a/groups-adlists.php +++ b/groups-adlists.php @@ -38,7 +38,7 @@ diff --git a/groups-clients.php b/groups-clients.php index d16445af0..6888ccc9a 100644 --- a/groups-clients.php +++ b/groups-clients.php @@ -40,7 +40,7 @@ diff --git a/groups.php b/groups.php index aeddf3361..6367a2cca 100644 --- a/groups.php +++ b/groups.php @@ -37,7 +37,7 @@ diff --git a/queries.php b/queries.php index 20c653058..6779be741 100644 --- a/queries.php +++ b/queries.php @@ -83,15 +83,6 @@ - - - diff --git a/settings.php b/settings.php index 280008f18..2ed877638 100644 --- a/settings.php +++ b/settings.php @@ -539,7 +539,7 @@ function convertseconds($argument) "> - @@ -568,7 +568,7 @@ function convertseconds($argument) "> 0) { ?> - @@ -583,7 +583,7 @@ function convertseconds($argument) - From 8db0957a284caaec65b8d85f4e847a9768367047 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 11 May 2020 16:08:09 +0300 Subject: [PATCH 060/298] Minor tweaks * use the background-color property instead of the background shorthand * add multiple classes with one `addClass` call * rename `underline` to `text-underline` * use the CSS class `pointer` instead of adding CSS via JS * change `border-color: transparent` to `border: 0` in the navbar right dropdown image * add image dimensions in the dropdown donate image * remove the obsolete and unneeded `center` element from network.php * remove commented out PHP code from header.php * fix wrong `form-control` class used in buttons Signed-off-by: XhmikosR --- network.php | 10 +++++----- scripts/pi-hole/js/queries.js | 9 ++++----- scripts/pi-hole/php/header.php | 24 ++++-------------------- scripts/pi-hole/php/loginpage.php | 4 ++-- settings.php | 14 +++++++------- style/pi-hole.css | 15 +++++++-------- 6 files changed, 29 insertions(+), 47 deletions(-) diff --git a/network.php b/network.php index 7c1f9b026..7a96eceb9 100644 --- a/network.php +++ b/network.php @@ -53,11 +53,11 @@ - - - - - + + + + +
just now
... to ...
24 hours ago> 24 hours agoDevice does not use Pi-holejust now... to ...24 hours ago> 24 hours agoDevice does not use Pi-hole
diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index d000e6f1f..14c46de73 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -283,8 +283,7 @@ $(document).ready(function () { new_tab.focus(); } }); - $("td:eq(4)", row).addClass("underline"); - $("td:eq(4)", row).addClass("pointer"); + $("td:eq(4)", row).addClass("text-underline pointer"); } // Substitute domain by "." if empty @@ -447,7 +446,7 @@ $(document).ready(function () { this.style.color = ""; } ); - api.$("td:eq(1)").css("cursor", "pointer"); + api.$("td:eq(1)").addClass("pointer"); // Domain api.$("td:eq(2)").click(function () { if (autofilter()) { @@ -471,7 +470,7 @@ $(document).ready(function () { this.style.color = ""; } ); - api.$("td:eq(2)").css("cursor", "pointer"); + api.$("td:eq(2)").addClass("pointer"); // Client api.$("td:eq(3)").click(function () { if (autofilter()) { @@ -493,7 +492,7 @@ $(document).ready(function () { this.style.color = ""; } ); - api.$("td:eq(3)").css("cursor", "pointer"); + api.$("td:eq(3)").addClass("pointer"); } }); diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index 7b5832ee6..fcf942745 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -271,13 +271,13 @@ function pidofFTL() ");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var a=t.getDatasetMeta(0),r=e.datasets[0],l=a.data[i],s=l&&l.custom||{},u=o.valueAtIndexOrDefault,d=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:u(r.backgroundColor,i,d.backgroundColor),strokeStyle:s.borderColor?s.borderColor:u(r.borderColor,i,d.borderColor),lineWidth:s.borderWidth?s.borderWidth:u(r.borderWidth,i,d.borderWidth),hidden:isNaN(r.data[i])||a.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var n,i,a,o=e.index,r=this.chart;for(n=0,i=(r.data.datasets||[]).length;n=Math.PI?-1:g<-Math.PI?1:0))+f,v={x:Math.cos(g),y:Math.sin(g)},m={x:Math.cos(p),y:Math.sin(p)},b=g<=0&&p>=0||g<=2*Math.PI&&2*Math.PI<=p,x=g<=.5*Math.PI&&.5*Math.PI<=p||g<=2.5*Math.PI&&2.5*Math.PI<=p,y=g<=-Math.PI&&-Math.PI<=p||g<=Math.PI&&Math.PI<=p,k=g<=.5*-Math.PI&&.5*-Math.PI<=p||g<=1.5*Math.PI&&1.5*Math.PI<=p,w=h/100,M={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},C={width:.5*(S.x-M.x),height:.5*(S.y-M.y)};u=Math.min(l/C.width,s/C.height),d={x:-.5*(S.x+M.x),y:-.5*(S.y+M.y)}}n.borderWidth=e.getMaxBorderWidth(c.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=d.x*n.outerRadius,n.offsetY=d.y*n.outerRadius,c.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),o.each(c.data,function(n,i){e.updateElement(n,i,t)})},updateElement:function(t,e,n){var i=this,a=i.chart,r=a.chartArea,l=a.options,s=l.animation,u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,c=l.rotation,h=l.rotation,f=i.getDataset(),g=n&&s.animateRotate?0:t.hidden?0:i.calculateCircumference(f.data[e])*(l.circumference/(2*Math.PI)),p=n&&s.animateScale?0:i.innerRadius,v=n&&s.animateScale?0:i.outerRadius,m=o.valueAtIndexOrDefault;o.extend(t,{_datasetIndex:i.index,_index:e,_model:{x:u+a.offsetX,y:d+a.offsetY,startAngle:c,endAngle:h,circumference:g,outerRadius:v,innerRadius:p,label:m(f.label,e,a.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&s.animateRotate||(b.startAngle=0===e?l.rotation:i.getMeta().data[e-1]._model.endAngle,b.endAngle=b.startAngle+b.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),i=0;return o.each(n.data,function(n,a){t=e.data[a],isNaN(t)||n.hidden||(i+=Math.abs(t))}),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,i=0,a=this.index,o=t.length,r=0;r(i=e>i?e:i)?n:i;return i}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var i=t(25),a=t(40),o=t(45);i._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}}),e.exports=function(t){function e(t,e){return o.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,update:function(t){var n,i,a,r=this,l=r.getMeta(),s=l.dataset,u=l.data||[],d=r.chart.options,c=d.elements.line,h=r.getScaleForId(l.yAxisID),f=r.getDataset(),g=e(f,d);for(g&&(a=s.custom||{},void 0!==f.tension&&void 0===f.lineTension&&(f.lineTension=f.tension),s._scale=h,s._datasetIndex=r.index,s._children=u,s._model={spanGaps:f.spanGaps?f.spanGaps:d.spanGaps,tension:a.tension?a.tension:o.valueOrDefault(f.lineTension,c.tension),backgroundColor:a.backgroundColor?a.backgroundColor:f.backgroundColor||c.backgroundColor,borderWidth:a.borderWidth?a.borderWidth:f.borderWidth||c.borderWidth,borderColor:a.borderColor?a.borderColor:f.borderColor||c.borderColor,borderCapStyle:a.borderCapStyle?a.borderCapStyle:f.borderCapStyle||c.borderCapStyle,borderDash:a.borderDash?a.borderDash:f.borderDash||c.borderDash,borderDashOffset:a.borderDashOffset?a.borderDashOffset:f.borderDashOffset||c.borderDashOffset,borderJoinStyle:a.borderJoinStyle?a.borderJoinStyle:f.borderJoinStyle||c.borderJoinStyle,fill:a.fill?a.fill:void 0!==f.fill?f.fill:c.fill,steppedLine:a.steppedLine?a.steppedLine:o.valueOrDefault(f.steppedLine,c.stepped),cubicInterpolationMode:a.cubicInterpolationMode?a.cubicInterpolationMode:o.valueOrDefault(f.cubicInterpolationMode,c.cubicInterpolationMode)},s.pivot()),n=0,i=u.length;n');var n=t.data,i=n.datasets,a=n.labels;if(i.length)for(var o=0;o'),a[o]&&e.push(a[o]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var a=t.getDatasetMeta(0),r=e.datasets[0],l=a.data[i].custom||{},s=o.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:s(r.backgroundColor,i,u.backgroundColor),strokeStyle:l.borderColor?l.borderColor:s(r.borderColor,i,u.borderColor),lineWidth:l.borderWidth?l.borderWidth:s(r.borderWidth,i,u.borderWidth),hidden:isNaN(r.data[i])||a.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var n,i,a,o=e.index,r=this.chart;for(n=0,i=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var i=t(25),a=t(40),o=t(45);i._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,linkScales:o.noop,update:function(t){var e=this,n=e.getMeta(),i=n.dataset,a=n.data,r=i.custom||{},l=e.getDataset(),s=e.chart.options.elements.line,u=e.chart.scale;void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:a,_loop:!0,_model:{tension:r.tension?r.tension:o.valueOrDefault(l.lineTension,s.tension),backgroundColor:r.backgroundColor?r.backgroundColor:l.backgroundColor||s.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:l.borderWidth||s.borderWidth,borderColor:r.borderColor?r.borderColor:l.borderColor||s.borderColor,fill:r.fill?r.fill:void 0!==l.fill?l.fill:s.fill,borderCapStyle:r.borderCapStyle?r.borderCapStyle:l.borderCapStyle||s.borderCapStyle,borderDash:r.borderDash?r.borderDash:l.borderDash||s.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:l.borderDashOffset||s.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:l.borderJoinStyle||s.borderJoinStyle}}),n.dataset.pivot(),o.each(a,function(n,i){e.updateElement(n,i,t)},e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var i=this,a=t.custom||{},r=i.getDataset(),l=i.chart.scale,s=i.chart.options.elements.point,u=l.getPointPositionForValue(e,r.data[e]);void 0!==r.radius&&void 0===r.pointRadius&&(r.pointRadius=r.radius),void 0!==r.hitRadius&&void 0===r.pointHitRadius&&(r.pointHitRadius=r.hitRadius),o.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{x:n?l.xCenter:u.x,y:n?l.yCenter:u.y,tension:a.tension?a.tension:o.valueOrDefault(r.lineTension,i.chart.options.elements.line.tension),radius:a.radius?a.radius:o.valueAtIndexOrDefault(r.pointRadius,e,s.radius),backgroundColor:a.backgroundColor?a.backgroundColor:o.valueAtIndexOrDefault(r.pointBackgroundColor,e,s.backgroundColor),borderColor:a.borderColor?a.borderColor:o.valueAtIndexOrDefault(r.pointBorderColor,e,s.borderColor),borderWidth:a.borderWidth?a.borderWidth:o.valueAtIndexOrDefault(r.pointBorderWidth,e,s.borderWidth),pointStyle:a.pointStyle?a.pointStyle:o.valueAtIndexOrDefault(r.pointStyle,e,s.pointStyle),hitRadius:a.hitRadius?a.hitRadius:o.valueAtIndexOrDefault(r.pointHitRadius,e,s.hitRadius)}}),t._model.skip=a.skip?a.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();o.each(e.data,function(n,i){var a=n._model,r=o.splineCurve(o.previousItem(e.data,i,!0)._model,a,o.nextItem(e.data,i,!0)._model,a.tension);a.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),a.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),a.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),a.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()})},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},i=t._index,a=t._model;a.radius=n.hoverRadius?n.hoverRadius:o.valueAtIndexOrDefault(e.pointHoverRadius,i,this.chart.options.elements.point.hoverRadius),a.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:o.valueAtIndexOrDefault(e.pointHoverBackgroundColor,i,o.getHoverColor(a.backgroundColor)),a.borderColor=n.hoverBorderColor?n.hoverBorderColor:o.valueAtIndexOrDefault(e.pointHoverBorderColor,i,o.getHoverColor(a.borderColor)),a.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:o.valueAtIndexOrDefault(e.pointHoverBorderWidth,i,a.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},i=t._index,a=t._model,r=this.chart.options.elements.point;a.radius=n.radius?n.radius:o.valueAtIndexOrDefault(e.pointRadius,i,r.radius),a.backgroundColor=n.backgroundColor?n.backgroundColor:o.valueAtIndexOrDefault(e.pointBackgroundColor,i,r.backgroundColor),a.borderColor=n.borderColor?n.borderColor:o.valueAtIndexOrDefault(e.pointBorderColor,i,r.borderColor),a.borderWidth=n.borderWidth?n.borderWidth:o.valueAtIndexOrDefault(e.pointBorderWidth,i,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"use strict";t(25)._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),e.exports=function(t){t.controllers.scatter=t.controllers.line}},{25:25}],22:[function(t,e,n){"use strict";var i=t(25),a=t(26),o=t(45);i._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:o.noop,onComplete:o.noop}}),e.exports=function(t){t.Animation=a.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,n,i){var a,o,r=this.animations;for(e.chart=t,i||(t.animating=!0),a=0,o=r.length;a1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var i=Date.now();t.dropFrames+=(i-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,i=this.animations,a=0;a=e.numSteps?(o.callback(e.onAnimationComplete,[e],n),n.animating=!1,i.splice(a,1)):++a}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,n){"use strict";var i=t(25),a=t(45),o=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=a.configMerge(i.global,i[t.type],t.options||{}),t}function n(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach(function(e){t.scales[e.id].options=e}),t.tooltip._options=e.tooltips}function l(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},a.extend(t.prototype,{construct:function(n,i){var o=this;i=e(i);var l=r.acquireContext(n,i),s=l&&l.canvas,u=s&&s.height,d=s&&s.width;o.id=a.uid(),o.ctx=l,o.canvas=s,o.config=i,o.width=d,o.height=u,o.aspectRatio=u?d/u:null,o.options=i.options,o._bufferedRender=!1,o.chart=o,o.controller=o,t.instances[o.id]=o,Object.defineProperty(o,"data",{get:function(){return o.config.data},set:function(t){o.config.data=t}}),l&&s?(o.initialize(),o.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),a.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return a.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,o=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(a.getMaximumWidth(i))),l=Math.max(0,Math.floor(o?r/o:a.getMaximumHeight(i)));if((e.width!==r||e.height!==l)&&(i.width=e.width=r,i.height=e.height=l,i.style.width=r+"px",i.style.height=l+"px",a.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.notify(e,"resize",[u]),e.options.onResize&&e.options.onResize(e,u),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;a.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),a.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,n=e.options,i=e.scales={},o=[];n.scales&&(o=o.concat((n.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(n.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),n.scale&&o.push({options:n.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),a.each(o,function(n){var o=n.options,r=a.valueOrDefault(o.type,n.dtype),s=t.scaleService.getScaleConstructor(r);if(s){l(o.position)!==l(n.dposition)&&(o.position=n.dposition);var u=new s({id:o.id,options:o,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),n.isDefault&&(e.scale=u)}}),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],i=[];return a.each(e.data.datasets,function(a,o){var r=e.getDatasetMeta(o),l=a.type||e.config.type;if(r.type&&r.type!==l&&(e.destroyDatasetMeta(o),r=e.getDatasetMeta(o)),r.type=l,n.push(r.type),r.controller)r.controller.updateIndex(o);else{var s=t.controllers[r.type];if(void 0===s)throw new Error('"'+r.type+'" is not a chart type.');r.controller=new s(e,o),i.push(r.controller)}},e),i},resetElements:function(){var t=this;a.each(t.data.datasets,function(e,n){t.getDatasetMeta(n).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),n(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var i=e.buildOrUpdateControllers();a.each(e.data.datasets,function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()},e),e.updateLayout(),a.each(i,function(t){t.reset()}),e.updateDatasets(),e.tooltip.initialize(),e.lastActive=[],s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,i=n.getDatasetMeta(t),a={meta:i,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[a])&&(i.controller.draw(e),s.notify(n,"afterDatasetDraw",[a]))},_drawTooltip:function(t){var e=this,n=e.tooltip,i={tooltip:n,easingValue:t};!1!==s.notify(e,"beforeTooltipDraw",[i])&&(n.draw(),s.notify(e,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return o.modes.single(this,t)},getElementsAtEvent:function(t){return o.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return o.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=o.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return o.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var i=n._meta[e.id];return i||(i=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(a.forEach(function(e){delete t[e]}),delete t._chartjs)}}var a=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},i.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(e.yAxisID=n.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},reset:function(){this.update(!0)},destroy:function(){this._data&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,i=n.getMeta(),a=n.getDataset().data||[],o=i.data;for(t=0,e=a.length;ti&&t.insertElements(i,a-i)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][r].type||s.type&&s.type!==n[e][r].type?o.merge(n[e][r],[t.scaleService.getScaleDefaults(l),s]):o.merge(n[e][r],s)}else o._merger(e,n,i,a)}})},o.where=function(t,e){if(o.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return o.each(t,function(t){e(t)&&n.push(t)}),n},o.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i=0;i--){var a=t[i];if(e(a))return a}},o.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},o.almostEquals=function(t,e,n){return Math.abs(t-e)t},o.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},o.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},o.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},o.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},o.toRadians=function(t){return t*(Math.PI/180)},o.toDegrees=function(t){return t*(180/Math.PI)},o.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),o=Math.atan2(i,n);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:a}},o.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},o.aliasPixel=function(t){return t%2==0?0:.5},o.splineCurve=function(t,e,n,i){var a=t.skip?e:t,o=e,r=n.skip?e:n,l=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),s=Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),u=l/(l+s),d=s/(l+s),c=i*(u=isNaN(u)?0:u),h=i*(d=isNaN(d)?0:d);return{previous:{x:o.x-c*(r.x-a.x),y:o.y-c*(r.y-a.y)},next:{x:o.x+h*(r.x-a.x),y:o.y+h*(r.y-a.y)}}},o.EPSILON=Number.EPSILON||1e-14,o.splineCurveMonotone=function(t){var e,n,i,a,r=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),l=r.length;for(e=0;e0?r[e-1]:null,(a=e0?r[e-1]:null,a=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},o.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},o.niceNum=function(t,e){var n=Math.floor(o.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},o.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},o.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.currentTarget||t.srcElement,l=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var u=parseFloat(o.getStyle(r,"padding-left")),d=parseFloat(o.getStyle(r,"padding-top")),c=parseFloat(o.getStyle(r,"padding-right")),h=parseFloat(o.getStyle(r,"padding-bottom")),f=l.right-l.left-u-c,g=l.bottom-l.top-d-h;return n=Math.round((n-l.left-u)/f*r.width/e.currentDevicePixelRatio),i=Math.round((i-l.top-d)/g*r.height/e.currentDevicePixelRatio),{x:n,y:i}},o.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},o.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},o.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(o.getStyle(e,"padding-left"),10),i=parseInt(o.getStyle(e,"padding-right"),10),a=e.clientWidth-n-i,r=o.getConstraintWidth(t);return isNaN(r)?a:Math.min(a,r)},o.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(o.getStyle(e,"padding-top"),10),i=parseInt(o.getStyle(e,"padding-bottom"),10),a=e.clientHeight-n-i,r=o.getConstraintHeight(t);return isNaN(r)?a:Math.min(a,r)},o.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},o.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,o=t.width;i.height=a*n,i.width=o*n,t.ctx.scale(n,n),i.style.height=a+"px",i.style.width=o+"px"}},o.fontString=function(t,e,n){return e+" "+t+"px "+n},o.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var l=0;o.each(n,function(e){void 0!==e&&null!==e&&!0!==o.isArray(e)?l=o.measureText(t,a,r,l,e):o.isArray(e)&&o.each(e,function(e){void 0===e||null===e||o.isArray(e)||(l=o.measureText(t,a,r,l,e))})});var s=r.length/2;if(s>n.length){for(var u=0;ui&&(i=o),i},o.numberOfLabelLines=function(t){var e=1;return o.each(t,function(t){o.isArray(t)&&t.length>e&&(e=t.length)}),e},o.color=i?function(t){return t instanceof CanvasGradient&&(t=a.global.defaultColor),i(t)}:function(t){return console.error("Color.js not found!"),t},o.getHoverColor=function(t){return t instanceof CanvasPattern?t:o.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function i(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function a(t,e){var n,i,a,o,r;for(i=0,o=t.data.datasets.length;i0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return s(t,e,{intersect:!1})},point:function(t,e){return o(t,i(e,t))},nearest:function(t,e,n){var a=i(e,t);n.axis=n.axis||"xy";var o=l(n.axis),s=r(t,a,n.intersect,o);return s.length>1&&s.sort(function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n}),s.slice(0,1)},x:function(t,e,n){var o=i(e,t),r=[],l=!1;return a(t,function(t){t.inXRange(o.x)&&r.push(t),t.inRange(o.x,o.y)&&(l=!0)}),n.intersect&&!l&&(r=[]),r},y:function(t,e,n){var o=i(e,t),r=[],l=!1;return a(t,function(t){t.inYRange(o.y)&&r.push(t),t.inRange(o.x,o.y)&&(l=!0)}),n.intersect&&!l&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"use strict";t(25)._set("global",{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},layout:{padding:{top:0,right:0,bottom:0,left:0}}}),e.exports=function(){var t=function(t,e){return this.construct(t,e),this};return t.Chart=t,t}},{25:25}],30:[function(t,e,n){"use strict";var i=t(45);e.exports=function(t){function e(t,e){return i.where(t,function(t){return t.position===e})}function n(t,e){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i._tmpIndex_-a._tmpIndex_:i.weight-a.weight}),t.forEach(function(t){delete t._tmpIndex_})}t.layoutService={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,a=["fullWidth","position","weight"],o=a.length,r=0;rh&&st.maxHeight){s--;break}s++,c=u*d}t.labelRotation=s},afterCalculateTickRotation:function(){l.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){l.callback(this.options.beforeFit,[this])},fit:function(){var t=this,a=t.minSize={width:0,height:0},o=i(t._ticks),r=t.options,u=r.ticks,d=r.scaleLabel,c=r.gridLines,h=r.display,f=t.isHorizontal(),g=n(u),p=r.gridLines.tickMarkLength;if(a.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&c.drawTicks?p:0,a.height=f?h&&c.drawTicks?p:0:t.maxHeight,d.display&&h){var v=s(d)+l.options.toPadding(d.padding).height;f?a.height+=v:a.width+=v}if(u.display&&h){var m=l.longestText(t.ctx,g.font,o,t.longestTextCache),b=l.numberOfLabelLines(o),x=.5*g.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=l.toRadians(t.labelRotation),w=Math.cos(k),M=Math.sin(k)*m+g.size*b+x*(b-1)+x;a.height=Math.min(t.maxHeight,a.height+M+y),t.ctx.font=g.font;var S=e(t.ctx,o[0],g.font),C=e(t.ctx,o[o.length-1],g.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*C+3):(t.paddingLeft=S/2+3,t.paddingRight=C/2+3)}else u.mirror?m=0:m+=y+x,a.width=Math.min(t.maxWidth,a.width+m),t.paddingTop=g.size/2,t.paddingBottom=g.size/2}t.handleMargins(),t.width=a.width,t.height=a.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){l.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(l.isNullOrUndef(t))return NaN;if("number"==typeof t&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:l.noop,getPixelForValue:l.noop,getValueForPixel:l.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),a=i*t+e.paddingLeft;n&&(a+=i/2);var o=e.left+Math.round(a);return o+=e.isFullWidth()?e.margins.left:0}var r=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(r/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,i=e.left+Math.round(n);return i+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,i,a,o=this,r=o.isHorizontal(),s=o.options.ticks.minor,u=t.length,d=l.toRadians(o.labelRotation),c=Math.cos(d),h=o.longestLabelWidth*c,f=[];for(s.maxTicksLimit&&(a=s.maxTicksLimit),r&&(e=!1,(h+s.autoSkipPadding)*u>o.width-(o.paddingLeft+o.paddingRight)&&(e=1+Math.floor((h+s.autoSkipPadding)*u/(o.width-(o.paddingLeft+o.paddingRight)))),a&&u>a&&(e=Math.max(e,Math.floor(u/a)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1&&delete i.label,f.push(i);return f},draw:function(t){var e=this,i=e.options;if(i.display){var r=e.ctx,u=o.global,d=i.ticks.minor,c=i.ticks.major||d,h=i.gridLines,f=i.scaleLabel,g=0!==e.labelRotation,p=e.isHorizontal(),v=d.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=l.valueOrDefault(d.fontColor,u.defaultFontColor),b=n(d),x=l.valueOrDefault(c.fontColor,u.defaultFontColor),y=n(c),k=h.drawTicks?h.tickMarkLength:0,w=l.valueOrDefault(f.fontColor,u.defaultFontColor),M=n(f),S=l.options.toPadding(f.padding),C=l.toRadians(e.labelRotation),_=[],D="right"===i.position?e.left:e.right-k,I="right"===i.position?e.left+k:e.right,P="bottom"===i.position?e.top:e.bottom-k,A="bottom"===i.position?e.top+k:e.bottom;if(l.each(v,function(n,o){if(!l.isNullOrUndef(n.label)){var r,s,c,f,m=n.label;o===e.zeroLineIndex&&i.offset===h.offsetGridLines?(r=h.zeroLineWidth,s=h.zeroLineColor,c=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=l.valueAtIndexOrDefault(h.lineWidth,o),s=l.valueAtIndexOrDefault(h.color,o),c=l.valueOrDefault(h.borderDash,u.borderDash),f=l.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,M,S,T,F,O,R,L="middle",z="middle",B=d.padding;if(p){var W=k+B;"bottom"===i.position?(z=g?"middle":"top",L=g?"right":"center",R=e.top+W):(z=g?"middle":"bottom",L=g?"left":"center",R=e.bottom-W);var N=a(e,o,h.offsetGridLines&&v.length>1);N1);H0)n=t.stepSize;else{var o=i.niceNum(e.max-e.min,!1);n=i.niceNum(o/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,l=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&i.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,l=t.max);var s=(l-r)/n;s=i.almostEquals(s,Math.round(s),n/1e3)?Math.round(s):Math.ceil(s),a.push(void 0!==t.min?t.min:r);for(var u=1;u3?n[2]-n[1]:n[1]-n[0];Math.abs(a)>1&&t!==Math.floor(t)&&(a=t-Math.floor(t));var o=i.log10(Math.abs(a)),r="";if(0!==t){var l=-1*Math.floor(o);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,e,n){var a=t/Math.pow(10,Math.floor(i.log10(t)));return 0===t?"0":1===a||2===a||5===a||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var i=t(25),a=t(26),o=t(45);i._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:o.noop,title:function(t,e){var n="",i=e.labels,a=i?i.length:0;if(t.length>0){var o=t[0];o.xLabel?n=o.xLabel:a>0&&o.indexi.height-e.height&&(r="bottom");var l,s,u,d,c,h=(a.left+a.right)/2,f=(a.top+a.bottom)/2;"center"===r?(l=function(t){return t<=h},s=function(t){return t>h}):(l=function(t){return t<=e.width/2},s=function(t){return t>=i.width-e.width/2}),u=function(t){return t+e.width>i.width},d=function(t){return t-e.width<0},c=function(t){return t<=f?"top":"bottom"},l(n.x)?(o="left",u(n.x)&&(o="center",r=c(n.y))):s(n.x)&&(o="right",d(n.x)&&(o="center",r=c(n.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:o,yAlign:g.yAlign?g.yAlign:r}}function d(t,e,n){var i=t.x,a=t.y,o=t.caretSize,r=t.caretPadding,l=t.cornerRadius,s=n.xAlign,u=n.yAlign,d=o+r,c=l+r;return"right"===s?i-=e.width:"center"===s&&(i-=e.width/2),"top"===u?a+=d:a-="bottom"===u?e.height+d:e.height/2,"center"===u?"left"===s?i+=d:"right"===s&&(i-=d):"left"===s?i-=c:"right"===s&&(i+=c),{x:i,y:a}}t.Tooltip=a.extend({initialize:function(){this._model=l(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options.callbacks,i=e.beforeTitle.apply(t,arguments),a=e.title.apply(t,arguments),o=e.afterTitle.apply(t,arguments),r=[];return r=n(r,i),r=n(r,a),r=n(r,o)},getBeforeBody:function(){var t=this._options.callbacks.beforeBody.apply(this,arguments);return o.isArray(t)?t:void 0!==t?[t]:[]},getBody:function(t,e){var i=this,a=i._options.callbacks,r=[];return o.each(t,function(t){var o={before:[],lines:[],after:[]};n(o.before,a.beforeLabel.call(i,t,e)),n(o.lines,a.label.call(i,t,e)),n(o.after,a.afterLabel.call(i,t,e)),r.push(o)}),r},getAfterBody:function(){var t=this._options.callbacks.afterBody.apply(this,arguments);return o.isArray(t)?t:void 0!==t?[t]:[]},getFooter:function(){var t=this,e=t._options.callbacks,i=e.beforeFooter.apply(t,arguments),a=e.footer.apply(t,arguments),o=e.afterFooter.apply(t,arguments),r=[];return r=n(r,i),r=n(r,a),r=n(r,o)},update:function(e){var n,i,a=this,c=a._options,h=a._model,f=a._model=l(c),g=a._active,p=a._data,v={xAlign:h.xAlign,yAlign:h.yAlign},m={x:h.x,y:h.y},b={width:h.width,height:h.height},x={x:h.caretX,y:h.caretY};if(g.length){f.opacity=1;var y=[],k=[];x=t.Tooltip.positioners[c.position].call(a,g,a._eventPosition);var w=[];for(n=0,i=g.length;n0&&i.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(this.drawBackground(i,e,t,n,a),i.x+=e.xPadding,i.y+=e.yPadding,this.drawTitle(i,e,t,a),this.drawBody(i,e,t,a),this.drawFooter(i,e,t,a))}},handleEvent:function(t){var e=this,n=e._options,i=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(i=!o.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var a=e._model;e.update(!0),e.pivot(),i|=a.x!==e._model.x||a.y!==e._model.y}return i}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,i=0,a=0,o=0;for(e=0,n=t.length;es;)a-=2*Math.PI;for(;a=l&&a<=s,d=r>=n.innerRadius&&r<=n.outerRadius;return u&&d}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t=this._chart.ctx,e=this._view,n=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,i),t.arc(e.x,e.y,e.innerRadius,i,n,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var i=t(25),a=t(26),o=t(45),r=i.global;i._set("global",{elements:{line:{tension:.4,backgroundColor:r.defaultColor,borderWidth:3,borderColor:r.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=a.extend({draw:function(){var t,e,n,i,a=this,l=a._view,s=a._chart.ctx,u=l.spanGaps,d=a._children.slice(),c=r.elements.line,h=-1;for(a._loop&&d.length&&d.push(d[0]),s.save(),s.lineCap=l.borderCapStyle||c.borderCapStyle,s.setLineDash&&s.setLineDash(l.borderDash||c.borderDash),s.lineDashOffset=l.borderDashOffset||c.borderDashOffset,s.lineJoin=l.borderJoinStyle||c.borderJoinStyle,s.lineWidth=l.borderWidth||c.borderWidth,s.strokeStyle=l.borderColor||r.defaultColor,s.beginPath(),h=-1,t=0;te?1:-1,r=1,l=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,i=u.y,o=1,r=(a=u.base)>i?1:-1,l=u.borderSkipped||"bottom"),d){var c=Math.min(Math.abs(e-n),Math.abs(i-a)),h=(d=d>c?c:d)/2,f=e+("left"!==l?h*o:0),g=n+("right"!==l?-h*o:0),p=i+("top"!==l?h*r:0),v=a+("bottom"!==l?-h*r:0);f!==g&&(i=p,a=v),p!==v&&(e=f,n=g)}s.beginPath(),s.fillStyle=u.backgroundColor,s.strokeStyle=u.borderColor,s.lineWidth=d;var m=[[e,a],[e,i],[n,i],[n,a]],b=["bottom","left","top","right"].indexOf(l,0);-1===b&&(b=0);var x=t(0);s.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),s.lineTo(x[0],x[1]);s.fill(),d&&s.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var i=a(this);n=t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var o=a(n);return i(n)?t>=o.left&&t<=o.right:e>=o.top&&e<=o.bottom},inXRange:function(t){var e=a(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=a(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,n=this._view;return i(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,n){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,n){"use strict";var i=t(42),n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,o){if(o){var r=Math.min(o,i/2),l=Math.min(o,a/2);t.moveTo(e+r,n),t.lineTo(e+i-r,n),t.quadraticCurveTo(e+i,n,e+i,n+l),t.lineTo(e+i,n+a-l),t.quadraticCurveTo(e+i,n+a,e+i-r,n+a),t.lineTo(e+r,n+a),t.quadraticCurveTo(e,n+a,e,n+a-l),t.lineTo(e,n+l),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a){var o,r,l,s,u,d;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(o=e.toString())&&"[object HTMLCanvasElement]"!==o){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(i,a,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),u=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(i-r/2,a+u/3),t.lineTo(i+r/2,a+u/3),t.lineTo(i,a-2*u/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(i-d,a-d,2*d,2*d),t.strokeRect(i-d,a-d,2*d,2*d);break;case"rectRounded":var c=n/Math.SQRT2,h=i-c,f=a-c,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,h,f,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(i-d,a),t.lineTo(i,a+d),t.lineTo(i+d,a),t.lineTo(i,a-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"crossRot":t.beginPath(),l=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,t.moveTo(i-l,a-s),t.lineTo(i+l,a+s),t.moveTo(i-l,a+s),t.lineTo(i+l,a-s),t.closePath();break;case"star":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),l=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,t.moveTo(i-l,a-s),t.lineTo(i+l,a+s),t.moveTo(i-l,a+s),t.lineTo(i+l,a-s),t.closePath();break;case"line":t.beginPath(),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"dash":t.beginPath(),t.moveTo(i,a),t.lineTo(i+n,a),t.closePath()}t.stroke()}}else t.drawImage(e,i-e.width/2,a-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){if(n.steppedLine)return"after"===n.steppedLine&&!i||"after"!==n.steppedLine&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}};i.clear=n.clear,i.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var i={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),isNullOrUndef:function(t){return null===t||void 0===t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return i.valueOrDefault(i.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,a){var o,r,l;if(i.isArray(t))if(r=t.length,a)for(o=r-1;o>=0;o--)e.call(n,t[o],o);else for(o=0;o=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-a.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*a.easeInBounce(2*t):.5*a.easeOutBounce(2*t-1)+.5}};e.exports={effects:a},i.easingEffects=a},{42:42}],44:[function(t,e,n){"use strict";var i=t(42);e.exports={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,a,o;return i.isObject(t)?(e=+t.top||0,n=+t.right||0,a=+t.bottom||0,o=+t.left||0):e=n=a=o=+t||0,{top:e,right:n,bottom:a,left:o,height:e+a,width:o+n}},resolve:function(t,e,n){var a,o,r;for(a=0,o=t.length;a
';var a=e.childNodes[0],r=e.childNodes[1];e._reset=function(){a.scrollLeft=1e6,a.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var l=function(){e._reset(),t()};return o(a,"scroll",l.bind(a,"expand")),o(r,"scroll",l.bind(r,"shrink")),e}function c(t,e){var n=t[m]||(t[m]={}),i=n.renderProxy=function(t){t.animationName===y&&e()};v.each(k,function(e){o(t,e,i)}),n.reflow=!!t.offsetParent,t.classList.add(x)}function h(t){var e=t[m]||{},n=e.renderProxy;n&&(v.each(k,function(e){r(t,e,n)}),delete e.renderProxy),t.classList.remove(x)}function f(t,e,n){var i=t[m]||(t[m]={}),a=i.resizer=d(u(function(){if(i.resizer)return e(l("resize",n))}));c(t,function(){if(i.resizer){var e=t.parentNode;e&&e!==a.parentNode&&e.insertBefore(a,e.firstChild),a._reset()}})}function g(t){var e=t[m]||{},n=e.resizer;delete e.resizer,h(t),n&&n.parentNode&&n.parentNode.removeChild(n)}function p(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}var v=t(45),m="$chartjs",b="chartjs-",x=b+"render-monitor",y=b+"render-animation",k=["animationstart","webkitAnimationStart"],w={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},M=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";p(this,"@-webkit-keyframes "+y+"{"+t+"}@keyframes "+y+"{"+t+"}."+x+"{-webkit-animation:"+y+" 0.001s;animation:"+y+" 0.001s;}")},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(a(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[m]){var n=e[m].initial;["height","width"].forEach(function(t){var i=n[t];v.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)}),v.each(n.style||{},function(t,n){e.style[n]=t}),e.width=e.width,delete e[m]}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=n[m]||(n[m]={});o(i,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(s(e,t))})}else f(i,n,t)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=((n[m]||{}).proxies||{})[t.id+"_"+e];a&&r(i,e,a)}else g(i)}},v.addEvent=o,v.removeEvent=r},{45:45}],48:[function(t,e,n){"use strict";var i=t(45),a=t(46),o=t(47),r=o._enabled?o:a;e.exports=i.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var i=t(25),a=t(40),o=t(45);i._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var i,a=t._model||{},o=a.fill;if(void 0===o&&(o=!!a.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(i=parseFloat(o,10),isFinite(i)&&Math.floor(i)===i)return"-"!==o[0]&&"+"!==o[0]||(i=e+i),!(i===e||i<0||i>=n)&&i;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function e(t){var e,n=t.el._model||{},i=t.el._scale||{},a=t.fill,o=null;if(isFinite(a))return null;if("start"===a?o=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===a?o=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?o=n.scaleZero:i.getBasePosition?o=i.getBasePosition():i.getBasePixel&&(o=i.getBasePixel()),void 0!==o&&null!==o){if(void 0!==o.x&&void 0!==o.y)return o;if("number"==typeof o&&isFinite(o))return e=i.isHorizontal(),{x:e?o:null,y:e?null:o}}return null}function n(t,e,n){var i,a=t[e].fill,o=[e];if(!n)return a;for(;!1!==a&&-1===o.indexOf(a);){if(!isFinite(a))return a;if(!(i=t[a]))return!1;if(i.visible)return a;o.push(a),a=i.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),d[n](t))}function l(t){return t&&!t.skip}function s(t,e,n,i,a){var r;if(i&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)o.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,i,a,o){var r,u,d,c,h,f,g,p=e.length,v=i.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=p+!!o;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var i=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,i,n),r.addBox(e,i),e.legend=i}var r=t.layoutService,l=o.noop;return t.Legend=a.extend({initialize:function(t){o.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:l,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:l,beforeSetDimensions:l,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:l,beforeBuildLabels:l,buildLabels:function(){var t=this,e=t.options.labels||{},n=o.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter(function(n){return e.filter(n,t.chart.data)})),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:l,beforeFit:l,fit:function(){var t=this,n=t.options,a=n.labels,r=n.display,l=t.ctx,s=i.global,u=o.valueOrDefault,d=u(a.fontSize,s.defaultFontSize),c=u(a.fontStyle,s.defaultFontStyle),h=u(a.fontFamily,s.defaultFontFamily),f=o.fontString(d,c,h),g=t.legendHitBoxes=[],p=t.minSize,v=t.isHorizontal();if(v?(p.width=t.maxWidth,p.height=r?10:0):(p.width=r?10:0,p.height=t.maxHeight),r)if(l.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?d+a.padding:0;l.textAlign="left",l.textBaseline="top",o.each(t.legendItems,function(n,i){var o=e(a,d)+d/2+l.measureText(n.text).width;m[m.length-1]+o+a.padding>=t.width&&(b+=d+a.padding,m[m.length]=t.left),g[i]={left:0,top:0,width:o,height:d},m[m.length-1]+=o+a.padding}),p.height+=b}else{var x=a.padding,y=t.columnWidths=[],k=a.padding,w=0,M=0,S=d+x;o.each(t.legendItems,function(t,n){var i=e(a,d)+d/2+l.measureText(t.text).width;M+S>p.height&&(k+=w+a.padding,y.push(w),w=0,M=0),w=Math.max(w,i),M+=S,g[n]={left:0,top:0,width:i,height:d}}),k+=w,y.push(w),p.width+=k}t.width=p.width,t.height=p.height},afterFit:l,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,a=n.labels,r=i.global,l=r.elements.line,s=t.width,u=t.lineWidths;if(n.display){var d,c=t.ctx,h=o.valueOrDefault,f=h(a.fontColor,r.defaultFontColor),g=h(a.fontSize,r.defaultFontSize),p=h(a.fontStyle,r.defaultFontStyle),v=h(a.fontFamily,r.defaultFontFamily),m=o.fontString(g,p,v);c.textAlign="left",c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=m;var b=e(a,g),x=t.legendHitBoxes,y=function(t,e,i){if(!(isNaN(b)||b<=0)){c.save(),c.fillStyle=h(i.fillStyle,r.defaultColor),c.lineCap=h(i.lineCap,l.borderCapStyle),c.lineDashOffset=h(i.lineDashOffset,l.borderDashOffset),c.lineJoin=h(i.lineJoin,l.borderJoinStyle),c.lineWidth=h(i.lineWidth,l.borderWidth),c.strokeStyle=h(i.strokeStyle,r.defaultColor);var a=0===h(i.lineWidth,l.borderWidth);if(c.setLineDash&&c.setLineDash(h(i.lineDash,l.borderDash)),n.labels&&n.labels.usePointStyle){var s=g*Math.SQRT2/2,u=s/Math.SQRT2,d=t+u,f=e+u;o.canvas.drawPoint(c,i.pointStyle,s,d,f)}else a||c.strokeRect(t,e,b,g),c.fillRect(t,e,b,g);c.restore()}},k=function(t,e,n,i){var a=g/2,o=b+a+t,r=e+a;c.fillText(n.text,o,r),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(o,r),c.lineTo(o+i,r),c.stroke())},w=t.isHorizontal();d=w?{x:t.left+(s-u[0])/2,y:t.top+a.padding,line:0}:{x:t.left+a.padding,y:t.top+a.padding,line:0};var M=g+a.padding;o.each(t.legendItems,function(e,n){var i=c.measureText(e.text).width,o=b+g/2+i,r=d.x,l=d.y;w?r+o>=s&&(l=d.y+=M,d.line++,r=d.x=t.left+(s-u[d.line])/2):l+M>t.bottom&&(r=d.x=r+t.columnWidths[d.line]+a.padding,l=d.y=t.top+a.padding,d.line++),y(r,l,e),x[n].left=r,x[n].top=l,k(r,l,e,i),w?d.x+=o+a.padding:d.y+=M})}},handleEvent:function(t){var e=this,n=e.options,i="mouseup"===t.type?"click":t.type,a=!1;if("mousemove"===i){if(!n.onHover)return}else{if("click"!==i)return;if(!n.onClick)return}var o=t.x,r=t.y;if(o>=e.left&&o<=e.right&&r>=e.top&&r<=e.bottom)for(var l=e.legendHitBoxes,s=0;s=u.left&&o<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===i){n.onClick.call(e,t.native,e.legendItems[s]),a=!0;break}if("mousemove"===i){n.onHover.call(e,t.native,e.legendItems[s]),a=!0;break}}}return a}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,a=t.legend;e?(o.mergeIf(e,i.global.legend),a?(r.configure(t,a,e),a.options=e):n(t,e)):a&&(r.removeBox(t,a),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var i=t(25),a=t(26),o=t(45);i._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,i){var a=new t.Title({ctx:e.ctx,options:i,chart:e});n.configure(e,a,i),n.addBox(e,a),e.titleBlock=a}var n=t.layoutService,r=o.noop;return t.Title=a.extend({initialize:function(t){var e=this;o.extend(e,t),e.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:r,beforeSetDimensions:r,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:r,beforeBuildLabels:r,buildLabels:r,afterBuildLabels:r,beforeFit:r,fit:function(){var t=this,e=o.valueOrDefault,n=t.options,a=n.display,r=e(n.fontSize,i.global.defaultFontSize),l=t.minSize,s=o.isArray(n.text)?n.text.length:1,u=o.options.toLineHeight(n.lineHeight,r),d=a?s*u+2*n.padding:0;t.isHorizontal()?(l.width=t.maxWidth,l.height=d):(l.width=d,l.height=t.maxHeight),t.width=l.width,t.height=l.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=o.valueOrDefault,a=t.options,r=i.global;if(a.display){var l,s,u,d=n(a.fontSize,r.defaultFontSize),c=n(a.fontStyle,r.defaultFontStyle),h=n(a.fontFamily,r.defaultFontFamily),f=o.fontString(d,c,h),g=o.options.toLineHeight(a.lineHeight,d),p=g/2+a.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(a.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(s=b+(y-b)/2,u=m+p,l=y-b):(s="left"===a.position?b+p:y-p,u=m+(x-m)/2,l=x-m,v=Math.PI*("left"===a.position?-.5:.5)),e.save(),e.translate(s,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=a.text;if(o.isArray(k))for(var w=0,M=0;Me.max&&(e.max=i))})});e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var o=a.valueOrDefault(n.fontSize,i.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.height/(2*o)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e,n=this,i=n.start,a=+n.getRightValue(t),o=n.end-i;return n.isHorizontal()?(e=n.left+n.width/o*(a-i),Math.round(e)):(e=n.bottom-n.height/o*(a-i),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),i=n?e.width:e.height,a=(n?t-e.left:e.bottom-t)/i;return e.start+(e.end-e.start)*a},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var i=t(45),a=t(34);e.exports=function(t){var e=i.noop;t.LinearScaleBase=t.Scale.extend({getRightValue:function(e){return"string"==typeof e?+e:t.Scale.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=i.sign(t.min),a=i.sign(t.max);n<0&&a<0?t.max=0:n>0&&a>0&&(t.min=0)}var o=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),o!==r&&t.min>=t.max&&(o?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:e,handleDirectionalChanges:e,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),o={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,stepSize:i.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=a.generators.linear(o,t);t.handleDirectionalChanges(),t.max=i.max(r),t.min=i.min(r),e.reverse?(r.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var i=t(45),a=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:a.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return s?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,a=n.ticks,o=e.chart,r=o.data.datasets,l=i.valueOrDefault,s=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&i.each(r,function(e,n){if(!u){var i=o.getDatasetMeta(n);o.isDatasetVisible(n)&&t(i)&&void 0!==i.stack&&(u=!0)}}),n.stacked||u){var d={};i.each(r,function(a,r){var l=o.getDatasetMeta(r),s=[l.type,void 0===n.stacked&&void 0===l.stack?r:"",l.stack].join(".");o.isDatasetVisible(r)&&t(l)&&(void 0===d[s]&&(d[s]=[]),i.each(a.data,function(t,i){var a=d[s],o=+e.getRightValue(t);isNaN(o)||l.data[i].hidden||(a[i]=a[i]||0,n.relativePoints?a[i]=100:a[i]+=o)}))}),i.each(d,function(t){var n=i.min(t),a=i.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?a:Math.max(e.max,a)})}else i.each(r,function(n,a){var r=o.getDatasetMeta(a);o.isDatasetVisible(a)&&t(r)&&i.each(n.data,function(t,n){var i=+e.getRightValue(t);isNaN(i)||r.data[n].hidden||(null===e.min?e.min=i:ie.max&&(e.max=i),0!==i&&(null===e.minNotZero||ia?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function s(t){var i,o,s,u=n(t),d=Math.min(t.height/2,t.width/2),c={r:t.width,l:0,t:t.height,b:0},h={};t.ctx.font=u.font,t._pointLabelSizes=[];var f=e(t);for(i=0;ic.r&&(c.r=v.end,h.r=g),m.startc.b&&(c.b=m.end,h.b=g)}t.setReductions(d,c,h)}function u(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}function d(t){return 0===t||180===t?"center":t<180?"left":"right"}function c(t,e,n,i){if(a.isArray(e))for(var o=n.y,r=1.5*i,l=0;l270||t<90)&&(n.y-=e.h)}function f(t){var i=t.ctx,o=a.valueOrDefault,r=t.options,l=r.angleLines,s=r.pointLabels;i.lineWidth=l.lineWidth,i.strokeStyle=l.color;var u=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);i.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(l.display){var p=t.getPointPosition(g,u);i.beginPath(),i.moveTo(t.xCenter,t.yCenter),i.lineTo(p.x,p.y),i.stroke(),i.closePath()}if(s.display){var m=t.getPointPosition(g,u+5),b=o(s.fontColor,v.defaultFontColor);i.font=f.font,i.fillStyle=b;var x=t.getIndexAngle(g),y=a.toDegrees(x);i.textAlign=d(y),h(y,t._pointLabelSizes[g],m),c(i,t.pointLabels[g]||"",m,f.size)}}}function g(t,n,i,o){var r=t.ctx;if(r.strokeStyle=a.valueAtIndexOrDefault(n.color,o-1),r.lineWidth=a.valueAtIndexOrDefault(n.lineWidth,o-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,i,0,2*Math.PI),r.closePath(),r.stroke();else{var l=e(t);if(0===l)return;r.beginPath();var s=t.getPointPosition(0,i);r.moveTo(s.x,s.y);for(var u=1;u0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,i=e.ticks,o=a.valueOrDefault;if(e.display){var r=t.ctx,l=this.getIndexAngle(0),s=o(i.fontSize,v.defaultFontSize),u=o(i.fontStyle,v.defaultFontStyle),d=o(i.fontFamily,v.defaultFontFamily),c=a.fontString(s,u,d);a.each(t.ticks,function(e,a){if(a>0||i.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[a]);if(n.display&&0!==a&&g(t,n,u,a),i.display){var d=o(i.fontColor,v.defaultFontColor);if(r.font=c,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(l),i.showLabelBackdrop){var h=r.measureText(e).width;r.fillStyle=i.backdropColor,r.fillRect(-h/2-i.backdropPaddingX,-u-s/2-i.backdropPaddingY,h+2*i.backdropPaddingX,s+2*i.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.fillText(e,0,-u),r.restore()}}}),(e.angleLines.display||e.pointLabels.display)&&f(t)}}});t.scaleService.registerScaleType("radialLinear",b,m)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function i(t,e){return t-e}function a(t){var e,n,i,a={},o=[];for(e=0,n=t.length;ee&&l=0&&r<=l;){if(i=r+l>>1,a=t[i-1]||null,o=t[i],!a)return{lo:null,hi:o};if(o[e]n))return{lo:a,hi:o};l=i-1}}return{lo:o,hi:null}}function l(t,e,n,i){var a=r(t,e,n),o=a.lo?a.hi?a.lo:t[t.length-2]:t[0],l=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=l[e]-o[e],u=s?(n-o[e])/s:0,d=(l[i]-o[i])*u;return o[i]+d}function s(t,e){var n=e.parser,i=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof i?m(t,i):(t instanceof m||(t=m(t)),t.isValid()?t:"function"==typeof i?i(t):t)}function u(t,e){if(x.isNullOrUndef(t))return null;var n=e.options.time,i=s(e.getRightValue(t),n);return i.isValid()?(n.round&&i.startOf(n.round),i.valueOf()):null}function d(t,e,n,i){var a,o,r,l=e-t,s=w[n],u=s.size,d=s.steps;if(!d)return Math.ceil(l/((i||1)*u));for(a=0,o=d.length;a=M.indexOf(e);a--)if(o=M[a],w[o].common&&r.as(o)>=t.length)return o;return M[e?M.indexOf(e):0]}function f(t){for(var e=M.indexOf(t)+1,n=M.length;e1?e[1]:i,r=e[0],s=(l(t,"time",o,"pos")-l(t,"time",r,"pos"))/2),a.time.max||(o=e[e.length-1],r=e.length>1?e[e.length-2]:n,u=(l(t,"time",o,"pos")-l(t,"time",r,"pos"))/2)),{left:s,right:u}}function v(t,e){var n,i,a,o,r=[];for(n=0,i=t.length;n=a&&n<=r&&c.push(n);return i.min=a,i.max=r,i._unit=s.unit||h(c,s.minUnit,i.min,i.max),i._majorUnit=f(i._unit),i._table=o(i._timestamps.data,a,r,l.distribution),i._offsets=p(i._table,c,a,r,l),v(c,i._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n.chart.data,a=n.options.time,o=i.labels&&t=0&&t0)for(c in rd)d=rd[c],e=b[d],p(e)||(a[d]=e);return a} -// Moment prototype object -function r(b){q(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)), -// Prevent infinite loop in case updateOffset creates new moment -// objects. -sd===!1&&(sd=!0,a.updateOffset(this),sd=!1)}function s(a){return a instanceof r||null!=a&&null!=a._isAMomentObject}function t(a){return a<0?Math.ceil(a)||0:Math.floor(a)}function u(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=t(b)),c} -// compare two arrays, return the number of differences -function v(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;d0?"future":"past"];return z(c)?c(b):c.replace(/%s/i,b)}function J(a,b){var c=a.toLowerCase();Dd[c]=Dd[c+"s"]=Dd[b]=a}function K(a){return"string"==typeof a?Dd[a]||Dd[a.toLowerCase()]:void 0}function L(a){var b,c,d={};for(c in a)i(a,c)&&(b=K(c),b&&(d[b]=a[c]));return d}function M(a,b){Ed[a]=b}function N(a){var b=[];for(var c in a)b.push({unit:c,priority:Ed[c]});return b.sort(function(a,b){return a.priority-b.priority}),b}function O(b,c){return function(d){return null!=d?(Q(this,b,d),a.updateOffset(this,c),this):P(this,b)}}function P(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function Q(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)} -// MOMENTS -function R(a){return a=K(a),z(this[a])?this[a]():this}function S(a,b){if("object"==typeof a){a=L(a);for(var c=N(a),d=0;d=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d} -// token: 'M' -// padded: ['MM', 2] -// ordinal: 'Mo' -// callback: function () { this.month() + 1 } -function U(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(Id[a]=e),b&&(Id[b[0]]=function(){return T(e.apply(this,arguments),b[1],b[2])}),c&&(Id[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function V(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function W(a){var b,c,d=a.match(Fd);for(b=0,c=d.length;b=0&&Gd.test(a);)a=a.replace(Gd,c),Gd.lastIndex=0,d-=1;return a}function Z(a,b,c){$d[a]=z(b)?b:function(a,d){return a&&c?c:b}}function $(a,b){return i($d,a)?$d[a](b._strict,b._locale):new RegExp(_(a))} -// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript -function _(a){return aa(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function aa(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ba(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),f(b)&&(d=function(a,c){c[b]=u(a)}),c=0;c=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function ta(a){var b=new Date(Date.UTC.apply(null,arguments)); -//the Date.UTC function remaps years 0-99 to 1900-1999 -return a<100&&a>=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b} -// start-of-first-week - start-of-year -function ua(a,b,c){var// first-week day -- which january is always in the first week (4 for iso, 1 for other) -d=7+b-c, -// first-week day local weekday -- which local weekday is fwd -e=(7+ta(a,0,d).getUTCDay()-b)%7;return-e+d-1} -//http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday -function va(a,b,c,d,e){var f,g,h=(7+c-d)%7,i=ua(a,d,e),j=1+7*(b-1)+h+i;return j<=0?(f=a-1,g=pa(f)+j):j>pa(a)?(f=a+1,g=j-pa(a)):(f=a,g=j),{year:f,dayOfYear:g}}function wa(a,b,c){var d,e,f=ua(a.year(),b,c),g=Math.floor((a.dayOfYear()-f-1)/7)+1;return g<1?(e=a.year()-1,d=g+xa(e,b,c)):g>xa(a.year(),b,c)?(d=g-xa(a.year(),b,c),e=a.year()+1):(e=a.year(),d=g),{week:d,year:e}}function xa(a,b,c){var d=ua(a,b,c),e=ua(a+1,b,c);return(pa(a)-d+e)/7} -// HELPERS -// LOCALES -function ya(a){return wa(a,this._week.dow,this._week.doy).week}function za(){return this._week.dow}function Aa(){return this._week.doy} -// MOMENTS -function Ba(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function Ca(a){var b=wa(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")} -// HELPERS -function Da(a,b){return"string"!=typeof a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof a?a:null):parseInt(a,10)}function Ea(a,b){return"string"==typeof a?b.weekdaysParse(a)%7||7:isNaN(a)?null:a}function Fa(a,b){return a?c(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]:this._weekdays}function Ga(a){return a?this._weekdaysShort[a.day()]:this._weekdaysShort}function Ha(a){return a?this._weekdaysMin[a.day()]:this._weekdaysMin}function Ia(a,b,c){var d,e,f,g=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;d<7;++d)f=k([2e3,1]).day(d),this._minWeekdaysParse[d]=this.weekdaysMin(f,"").toLocaleLowerCase(),this._shortWeekdaysParse[d]=this.weekdaysShort(f,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(f,"").toLocaleLowerCase();return c?"dddd"===b?(e=je.call(this._weekdaysParse,g),e!==-1?e:null):"ddd"===b?(e=je.call(this._shortWeekdaysParse,g),e!==-1?e:null):(e=je.call(this._minWeekdaysParse,g),e!==-1?e:null):"dddd"===b?(e=je.call(this._weekdaysParse,g),e!==-1?e:(e=je.call(this._shortWeekdaysParse,g),e!==-1?e:(e=je.call(this._minWeekdaysParse,g),e!==-1?e:null))):"ddd"===b?(e=je.call(this._shortWeekdaysParse,g),e!==-1?e:(e=je.call(this._weekdaysParse,g),e!==-1?e:(e=je.call(this._minWeekdaysParse,g),e!==-1?e:null))):(e=je.call(this._minWeekdaysParse,g),e!==-1?e:(e=je.call(this._weekdaysParse,g),e!==-1?e:(e=je.call(this._shortWeekdaysParse,g),e!==-1?e:null)))}function Ja(a,b,c){var d,e,f;if(this._weekdaysParseExact)return Ia.call(this,a,b,c);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;d<7;d++){ -// test the regex -if( -// make the regex if we don't have it already -e=k([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(f="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(f.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a))return d;if(c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a))return d;if(c&&"dd"===b&&this._minWeekdaysParse[d].test(a))return d;if(!c&&this._weekdaysParse[d].test(a))return d}} -// MOMENTS -function Ka(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Da(a,this.localeData()),this.add(a-b,"d")):b}function La(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function Ma(a){if(!this.isValid())return null!=a?this:NaN; -// behaves the same as moment#day except -// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) -// as a setter, sunday should belong to the previous week. -if(null!=a){var b=Ea(a,this.localeData());return this.day(this.day()%7?b:b-7)}return this.day()||7}function Na(a){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||Qa.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex):(i(this,"_weekdaysRegex")||(this._weekdaysRegex=ue),this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex)}function Oa(a){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||Qa.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(i(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ve),this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Pa(a){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||Qa.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(i(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=we),this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qa(){function a(a,b){return b.length-a.length}var b,c,d,e,f,g=[],h=[],i=[],j=[];for(b=0;b<7;b++) -// make the regex if we don't have it already -c=k([2e3,1]).day(b),d=this.weekdaysMin(c,""),e=this.weekdaysShort(c,""),f=this.weekdays(c,""),g.push(d),h.push(e),i.push(f),j.push(d),j.push(e),j.push(f);for( -// Sorting makes sure if one weekday (or abbr) is a prefix of another it -// will match the longer piece. -g.sort(a),h.sort(a),i.sort(a),j.sort(a),b=0;b<7;b++)h[b]=aa(h[b]),i[b]=aa(i[b]),j[b]=aa(j[b]);this._weekdaysRegex=new RegExp("^("+j.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+g.join("|")+")","i")} -// FORMATTING -function Ra(){return this.hours()%12||12}function Sa(){return this.hours()||24}function Ta(a,b){U(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})} -// PARSING -function Ua(a,b){return b._meridiemParse} -// LOCALES -function Va(a){ -// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays -// Using charAt should be more compatible. -return"p"===(a+"").toLowerCase().charAt(0)}function Wa(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function Xa(a){return a?a.toLowerCase().replace("_","-"):a} -// pick the locale from the array -// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each -// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root -function Ya(a){for(var b,c,d,e,f=0;f0;){if(d=Za(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1) -//the next array item is better than a shallower substring of this one -break;b--}f++}return null}function Za(a){var b=null; -// TODO: Find a better way to register and load all the locales in Node -if(!Be[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=xe._abbr,require("./locale/"+a), -// because defineLocale currently also sets the global locale, we -// want to undo that for lazy loaded locales -$a(b)}catch(a){}return Be[a]} -// This function will load locale and then set the global locale. If -// no arguments are passed in, it will simply return the current global -// locale key. -function $a(a,b){var c; -// moment.duration._locale = moment._locale = data; -return a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}function _a(a,b){if(null!==b){var c=Ae;if(b.abbr=a,null!=Be[a])y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),c=Be[a]._config;else if(null!=b.parentLocale){if(null==Be[b.parentLocale])return Ce[b.parentLocale]||(Ce[b.parentLocale]=[]),Ce[b.parentLocale].push({name:a,config:b}),null;c=Be[b.parentLocale]._config} -// backwards compat for now: also set the locale -// make sure we set the locale AFTER all child locales have been -// created, so we won't end up with the child locale set. -return Be[a]=new C(B(c,b)),Ce[a]&&Ce[a].forEach(function(a){_a(a.name,a.config)}),$a(a),Be[a]} -// useful for testing -return delete Be[a],null}function ab(a,b){if(null!=b){var c,d=Ae; -// MERGE -null!=Be[a]&&(d=Be[a]._config),b=B(d,b),c=new C(b),c.parentLocale=Be[a],Be[a]=c, -// backwards compat for now: also set the locale -$a(a)}else -// pass null for config to unupdate, useful for tests -null!=Be[a]&&(null!=Be[a].parentLocale?Be[a]=Be[a].parentLocale:null!=Be[a]&&delete Be[a]);return Be[a]} -// returns locale data -function bb(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return xe;if(!c(a)){if( -//short-circuit everything else -b=Za(a))return b;a=[a]}return Ya(a)}function cb(){return wd(Be)}function db(a){var b,c=a._a;return c&&m(a).overflow===-2&&(b=c[be]<0||c[be]>11?be:c[ce]<1||c[ce]>ea(c[ae],c[be])?ce:c[de]<0||c[de]>24||24===c[de]&&(0!==c[ee]||0!==c[fe]||0!==c[ge])?de:c[ee]<0||c[ee]>59?ee:c[fe]<0||c[fe]>59?fe:c[ge]<0||c[ge]>999?ge:-1,m(a)._overflowDayOfYear&&(bce)&&(b=ce),m(a)._overflowWeeks&&b===-1&&(b=he),m(a)._overflowWeekday&&b===-1&&(b=ie),m(a).overflow=b),a} -// date from iso format -function eb(a){var b,c,d,e,f,g,h=a._i,i=De.exec(h)||Ee.exec(h);if(i){for(m(a).iso=!0,b=0,c=Ge.length;bpa(e)&&(m(a)._overflowDayOfYear=!0),c=ta(e,0,a._dayOfYear),a._a[be]=c.getUTCMonth(),a._a[ce]=c.getUTCDate()),b=0;b<3&&null==a._a[b];++b)a._a[b]=f[b]=d[b]; -// Zero out whatever was not defaulted, including time -for(;b<7;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b]; -// Check for 24:00:00.000 -24===a._a[de]&&0===a._a[ee]&&0===a._a[fe]&&0===a._a[ge]&&(a._nextDay=!0,a._a[de]=0),a._d=(a._useUTC?ta:sa).apply(null,f), -// Apply timezone offset from input. The actual utcOffset can be changed -// with parseZone. -null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[de]=24)}}function jb(a){var b,c,d,e,f,g,h,i;if(b=a._w,null!=b.GG||null!=b.W||null!=b.E)f=1,g=4, -// TODO: We need to take the current isoWeekYear, but that depends on -// how we interpret now (local, utc, fixed offset). So create -// a now version of current config (take local/utc/offset flags, and -// create now). -c=gb(b.GG,a._a[ae],wa(sb(),1,4).year),d=gb(b.W,1),e=gb(b.E,1),(e<1||e>7)&&(i=!0);else{f=a._locale._week.dow,g=a._locale._week.doy;var j=wa(sb(),f,g);c=gb(b.gg,a._a[ae],j.year), -// Default to current week. -d=gb(b.w,j.week),null!=b.d?( -// weekday -- low day numbers are considered next week -e=b.d,(e<0||e>6)&&(i=!0)):null!=b.e?( -// local weekday -- counting starts from begining of week -e=b.e+f,(b.e<0||b.e>6)&&(i=!0)): -// default to begining of week -e=f}d<1||d>xa(c,f,g)?m(a)._overflowWeeks=!0:null!=i?m(a)._overflowWeekday=!0:(h=va(c,d,e,f,g),a._a[ae]=h.year,a._dayOfYear=h.dayOfYear)} -// date from string and format string -function kb(b){ -// TODO: Move this to another part of the creation flow to prevent circular deps -if(b._f===a.ISO_8601)return void eb(b);b._a=[],m(b).empty=!0; -// This array is used to make a Date, either with `new Date` or `Date.UTC` -var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=Y(b._f,b._locale).match(Fd)||[],c=0;c0&&m(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length), -// don't parse if it's not a known token -Id[f]?(d?m(b).empty=!1:m(b).unusedTokens.push(f),da(f,d,b)):b._strict&&!d&&m(b).unusedTokens.push(f); -// add remaining unparsed input length to the string -m(b).charsLeftOver=i-j,h.length>0&&m(b).unusedInput.push(h), -// clear _12h flag if hour is <= 12 -b._a[de]<=12&&m(b).bigHour===!0&&b._a[de]>0&&(m(b).bigHour=void 0),m(b).parsedDateParts=b._a.slice(0),m(b).meridiem=b._meridiem, -// handle meridiem -b._a[de]=lb(b._locale,b._a[de],b._meridiem),ib(b),db(b)}function lb(a,b,c){var d; -// Fallback -return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&b<12&&(b+=12),d||12!==b||(b=0),b):b} -// date from string and array of format strings -function mb(a){var b,c,d,e,f;if(0===a._f.length)return m(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;e -// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset -// +0200, so we adjust the time as needed, to be valid. -// -// Keeping the time actually adds/subtracts (one hour) -// from the actual represented time. That is why we call updateOffset -// a second time. In case it wants us to change the offset again -// _changeInProgress == true case, then we have to adjust, because -// there is no such time in the given timezone. -function Db(b,c){var d,e=this._offset||0;if(!this.isValid())return null!=b?this:NaN;if(null!=b){if("string"==typeof b){if(b=Ab(Xd,b),null===b)return this}else Math.abs(b)<16&&(b=60*b);return!this._isUTC&&c&&(d=Cb(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?Tb(this,Ob(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?e:Cb(this)}function Eb(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Fb(a){return this.utcOffset(0,a)}function Gb(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Cb(this),"m")),this}function Hb(){if(null!=this._tzm)this.utcOffset(this._tzm);else if("string"==typeof this._i){var a=Ab(Wd,this._i);null!=a?this.utcOffset(a):this.utcOffset(0,!0)}return this}function Ib(a){return!!this.isValid()&&(a=a?sb(a).utcOffset():0,(this.utcOffset()-a)%60===0)}function Jb(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Kb(){if(!p(this._isDSTShifted))return this._isDSTShifted;var a={};if(q(a,this),a=pb(a),a._a){var b=a._isUTC?k(a._a):sb(a._a);this._isDSTShifted=this.isValid()&&v(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Lb(){return!!this.isValid()&&!this._isUTC}function Mb(){return!!this.isValid()&&this._isUTC}function Nb(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Ob(a,b){var c,d,e,g=a, -// matching against regexp is expensive, do it on demand -h=null;// checks for null or undefined -return xb(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:f(a)?(g={},b?g[b]=a:g.milliseconds=a):(h=Ne.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:u(h[ce])*c,h:u(h[de])*c,m:u(h[ee])*c,s:u(h[fe])*c,ms:u(yb(1e3*h[ge]))*c}):(h=Oe.exec(a))?(c="-"===h[1]?-1:1,g={y:Pb(h[2],c),M:Pb(h[3],c),w:Pb(h[4],c),d:Pb(h[5],c),h:Pb(h[6],c),m:Pb(h[7],c),s:Pb(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=Rb(sb(g.from),sb(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new wb(g),xb(a)&&i(a,"_locale")&&(d._locale=a._locale),d}function Pb(a,b){ -// We'd normally use ~~inp for this, but unfortunately it also -// converts floats to ints. -// inp may be undefined, so careful calling replace on it. -var c=a&&parseFloat(a.replace(",",".")); -// apply sign while we're at it -return(isNaN(c)?0:c)*b}function Qb(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function Rb(a,b){var c;return a.isValid()&&b.isValid()?(b=Bb(b,a),a.isBefore(b)?c=Qb(a,b):(c=Qb(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}} -// TODO: remove 'name' arg after deprecation is removed -function Sb(a,b){return function(c,d){var e,f; -//invert the arguments, but complain about it -return null===d||isNaN(+d)||(y(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}function Tb(b,c,d,e){var f=c._milliseconds,g=yb(c._days),h=yb(c._months);b.isValid()&&(e=null==e||e,f&&b._d.setTime(b._d.valueOf()+f*d),g&&Q(b,"Date",P(b,"Date")+g*d),h&&ja(b,P(b,"Month")+h*d),e&&a.updateOffset(b,g||h))}function Ub(a,b){var c=a.diff(b,"days",!0);return c<-6?"sameElse":c<-1?"lastWeek":c<0?"lastDay":c<1?"sameDay":c<2?"nextDay":c<7?"nextWeek":"sameElse"}function Vb(b,c){ -// We want to compare the start of today, vs this. -// Getting start-of-today depends on whether we're local/utc/offset or not. -var d=b||sb(),e=Bb(d,this).startOf("day"),f=a.calendarFormat(this,e)||"sameElse",g=c&&(z(c[f])?c[f].call(this,d):c[f]);return this.format(g||this.localeData().calendar(f,this,sb(d)))}function Wb(){return new r(this)}function Xb(a,b){var c=s(a)?a:sb(a);return!(!this.isValid()||!c.isValid())&&(b=K(p(b)?"millisecond":b),"millisecond"===b?this.valueOf()>c.valueOf():c.valueOf()f&&(b=f),Fc.call(this,a,b,c,d,e))}function Fc(a,b,c,d,e){var f=va(a,b,c,d,e),g=ta(f.year,0,f.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this} -// MOMENTS -function Gc(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)} -// HELPERS -// MOMENTS -function Hc(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function Ic(a,b){b[ge]=u(1e3*("0."+a))} -// MOMENTS -function Jc(){return this._isUTC?"UTC":""}function Kc(){return this._isUTC?"Coordinated Universal Time":""}function Lc(a){return sb(1e3*a)}function Mc(){return sb.apply(null,arguments).parseZone()}function Nc(a){return a}function Oc(a,b,c,d){var e=bb(),f=k().set(d,b);return e[c](f,a)}function Pc(a,b,c){if(f(a)&&(b=a,a=void 0),a=a||"",null!=b)return Oc(a,b,c,"month");var d,e=[];for(d=0;d<12;d++)e[d]=Oc(a,d,c,"month");return e} -// () -// (5) -// (fmt, 5) -// (fmt) -// (true) -// (true, 5) -// (true, fmt, 5) -// (true, fmt) -function Qc(a,b,c,d){"boolean"==typeof a?(f(b)&&(c=b,b=void 0),b=b||""):(b=a,c=b,a=!1,f(b)&&(c=b,b=void 0),b=b||"");var e=bb(),g=a?e._week.dow:0;if(null!=c)return Oc(b,(c+g)%7,d,"day");var h,i=[];for(h=0;h<7;h++)i[h]=Oc(b,(h+g)%7,d,"day");return i}function Rc(a,b){return Pc(a,b,"months")}function Sc(a,b){return Pc(a,b,"monthsShort")}function Tc(a,b,c){return Qc(a,b,c,"weekdays")}function Uc(a,b,c){return Qc(a,b,c,"weekdaysShort")}function Vc(a,b,c){return Qc(a,b,c,"weekdaysMin")}function Wc(){var a=this._data;return this._milliseconds=Ze(this._milliseconds),this._days=Ze(this._days),this._months=Ze(this._months),a.milliseconds=Ze(a.milliseconds),a.seconds=Ze(a.seconds),a.minutes=Ze(a.minutes),a.hours=Ze(a.hours),a.months=Ze(a.months),a.years=Ze(a.years),this}function Xc(a,b,c,d){var e=Ob(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()} -// supports only 2.0-style add(1, 's') or add(duration) -function Yc(a,b){return Xc(this,a,b,1)} -// supports only 2.0-style subtract(1, 's') or subtract(duration) -function Zc(a,b){return Xc(this,a,b,-1)}function $c(a){return a<0?Math.floor(a):Math.ceil(a)}function _c(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data; -// if we have a mix of positive and negative values, bubble down first -// check: https://github.com/moment/moment/issues/2166 -// The following code bubbles up values, see the tests for -// examples of what that means. -// convert days to months -// 12 months -> 1 year -return f>=0&&g>=0&&h>=0||f<=0&&g<=0&&h<=0||(f+=864e5*$c(bd(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=t(f/1e3),i.seconds=a%60,b=t(a/60),i.minutes=b%60,c=t(b/60),i.hours=c%24,g+=t(c/24),e=t(ad(g)),h+=e,g-=$c(bd(e)),d=t(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function ad(a){ -// 400 years have 146097 days (taking into account leap year rules) -// 400 years have 12 months === 4800 -return 4800*a/146097}function bd(a){ -// the reverse of daysToMonths -return 146097*a/4800}function cd(a){var b,c,d=this._milliseconds;if(a=K(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+ad(b),"month"===a?c:c/12;switch( -// handle milliseconds separately because of floating point math errors (issue #1867) -b=this._days+Math.round(bd(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3; -// Math.floor prevents floating point math errors here -case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}} -// TODO: Use this.as('ms')? -function dd(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*u(this._months/12)}function ed(a){return function(){return this.as(a)}}function fd(a){return a=K(a),this[a+"s"]()}function gd(a){return function(){return this._data[a]}}function hd(){return t(this.days()/7)} -// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize -function id(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function jd(a,b,c){var d=Ob(a).abs(),e=of(d.as("s")),f=of(d.as("m")),g=of(d.as("h")),h=of(d.as("d")),i=of(d.as("M")),j=of(d.as("y")),k=e0,k[4]=c,id.apply(null,k)} -// This function allows you to set the rounding function for relative time strings -function kd(a){return void 0===a?of:"function"==typeof a&&(of=a,!0)} -// This function allows you to set a threshold for relative time strings -function ld(a,b){return void 0!==pf[a]&&(void 0===b?pf[a]:(pf[a]=b,!0))}function md(a){var b=this.localeData(),c=jd(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function nd(){ -// for ISO strings we do not use the normal bubbling rules: -// * milliseconds bubble up until they become hours -// * days do not bubble at all -// * months bubble up until they become years -// This is because there is no context-free conversion between hours and days -// (think of clock changes) -// and also not between days and months (28-31 days per month) -var a,b,c,d=qf(this._milliseconds)/1e3,e=qf(this._days),f=qf(this._months); -// 3600 seconds -> 60 minutes -> 1 hour -a=t(d/60),b=t(a/60),d%=60,a%=60, -// 12 months -> 1 year -c=t(f/12),f%=12; -// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js -var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(m<0?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var od,pd;pd=Array.prototype.some?Array.prototype.some:function(a){for(var b=Object(this),c=b.length>>>0,d=0;d68?1900:2e3)}; -// MOMENTS -var pe=O("FullYear",!0); -// FORMATTING -U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"), -// ALIASES -J("week","w"),J("isoWeek","W"), -// PRIORITIES -M("week",5),M("isoWeek",5), -// PARSING -Z("w",Od),Z("ww",Od,Kd),Z("W",Od),Z("WW",Od,Kd),ca(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=u(a)});var qe={dow:0,// Sunday is the first day of the week. -doy:6}; -// FORMATTING -U("d",0,"do","day"),U("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),U("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),U("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"), -// ALIASES -J("day","d"),J("weekday","e"),J("isoWeekday","E"), -// PRIORITY -M("day",11),M("weekday",11),M("isoWeekday",11), -// PARSING -Z("d",Od),Z("e",Od),Z("E",Od),Z("dd",function(a,b){return b.weekdaysMinRegex(a)}),Z("ddd",function(a,b){return b.weekdaysShortRegex(a)}),Z("dddd",function(a,b){return b.weekdaysRegex(a)}),ca(["dd","ddd","dddd"],function(a,b,c,d){var e=c._locale.weekdaysParse(a,d,c._strict); -// if we didn't get a weekday name, mark the date as invalid -null!=e?b.d=e:m(c).invalidWeekday=a}),ca(["d","e","E"],function(a,b,c,d){b[d]=u(a)}); -// LOCALES -var re="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),se="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),te="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ue=Zd,ve=Zd,we=Zd;U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Ra),U("k",["kk",2],0,Sa),U("hmm",0,0,function(){return""+Ra.apply(this)+T(this.minutes(),2)}),U("hmmss",0,0,function(){return""+Ra.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)}),U("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)}),U("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)}),Ta("a",!0),Ta("A",!1), -// ALIASES -J("hour","h"), -// PRIORITY -M("hour",13),Z("a",Ua),Z("A",Ua),Z("H",Od),Z("h",Od),Z("HH",Od,Kd),Z("hh",Od,Kd),Z("hmm",Pd),Z("hmmss",Qd),Z("Hmm",Pd),Z("Hmmss",Qd),ba(["H","HH"],de),ba(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),ba(["h","hh"],function(a,b,c){b[de]=u(a),m(c).bigHour=!0}),ba("hmm",function(a,b,c){var d=a.length-2;b[de]=u(a.substr(0,d)),b[ee]=u(a.substr(d)),m(c).bigHour=!0}),ba("hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[de]=u(a.substr(0,d)),b[ee]=u(a.substr(d,2)),b[fe]=u(a.substr(e)),m(c).bigHour=!0}),ba("Hmm",function(a,b,c){var d=a.length-2;b[de]=u(a.substr(0,d)),b[ee]=u(a.substr(d))}),ba("Hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[de]=u(a.substr(0,d)),b[ee]=u(a.substr(d,2)),b[fe]=u(a.substr(e))});var xe,ye=/[ap]\.?m?\.?/i,ze=O("Hours",!0),Ae={calendar:xd,longDateFormat:yd,invalidDate:zd,ordinal:Ad,ordinalParse:Bd,relativeTime:Cd,months:le,monthsShort:me,week:qe,weekdays:re,weekdaysMin:te,weekdaysShort:se,meridiemParse:ye},Be={},Ce={},De=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ee=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Fe=/Z|[+-]\d\d(?::?\d\d)?/,Ge=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/], -// YYYYMM is NOT allowed by the standard -["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],He=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ie=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=x("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}), -// constant that refers to the ISO standard -a.ISO_8601=function(){};var Je=x("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=sb.apply(null,arguments);return this.isValid()&&a.isValid()?athis?this:a:o()}),Le=function(){return Date.now?Date.now():+new Date};zb("Z",":"),zb("ZZ",""), -// PARSING -Z("Z",Xd),Z("ZZ",Xd),ba(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Ab(Xd,a)}); -// HELPERS -// timezone chunker -// '+10:00' > ['10', '00'] -// '-1530' > ['-15', '30'] -var Me=/([\+\-]|\d\d)/gi; -// HOOKS -// This function will be called whenever a moment is mutated. -// It is intended to keep the offset in sync with the timezone. -a.updateOffset=function(){}; -// ASP.NET json date format regex -var Ne=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Oe=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Ob.fn=wb.prototype;var Pe=Sb(1,"add"),Qe=Sb(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Re=x("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)}); -// FORMATTING -U(0,["gg",2],0,function(){return this.weekYear()%100}),U(0,["GG",2],0,function(){return this.isoWeekYear()%100}),zc("gggg","weekYear"),zc("ggggg","weekYear"),zc("GGGG","isoWeekYear"),zc("GGGGG","isoWeekYear"), -// ALIASES -J("weekYear","gg"),J("isoWeekYear","GG"), -// PRIORITY -M("weekYear",1),M("isoWeekYear",1), -// PARSING -Z("G",Vd),Z("g",Vd),Z("GG",Od,Kd),Z("gg",Od,Kd),Z("GGGG",Sd,Md),Z("gggg",Sd,Md),Z("GGGGG",Td,Nd),Z("ggggg",Td,Nd),ca(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=u(a)}),ca(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}), -// FORMATTING -U("Q",0,"Qo","quarter"), -// ALIASES -J("quarter","Q"), -// PRIORITY -M("quarter",7), -// PARSING -Z("Q",Jd),ba("Q",function(a,b){b[be]=3*(u(a)-1)}), -// FORMATTING -U("D",["DD",2],"Do","date"), -// ALIASES -J("date","D"), -// PRIOROITY -M("date",9), -// PARSING -Z("D",Od),Z("DD",Od,Kd),Z("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),ba(["D","DD"],ce),ba("Do",function(a,b){b[ce]=u(a.match(Od)[0],10)}); -// MOMENTS -var Se=O("Date",!0); -// FORMATTING -U("DDD",["DDDD",3],"DDDo","dayOfYear"), -// ALIASES -J("dayOfYear","DDD"), -// PRIORITY -M("dayOfYear",4), -// PARSING -Z("DDD",Rd),Z("DDDD",Ld),ba(["DDD","DDDD"],function(a,b,c){c._dayOfYear=u(a)}), -// FORMATTING -U("m",["mm",2],0,"minute"), -// ALIASES -J("minute","m"), -// PRIORITY -M("minute",14), -// PARSING -Z("m",Od),Z("mm",Od,Kd),ba(["m","mm"],ee); -// MOMENTS -var Te=O("Minutes",!1); -// FORMATTING -U("s",["ss",2],0,"second"), -// ALIASES -J("second","s"), -// PRIORITY -M("second",15), -// PARSING -Z("s",Od),Z("ss",Od,Kd),ba(["s","ss"],fe); -// MOMENTS -var Ue=O("Seconds",!1); -// FORMATTING -U("S",0,0,function(){return~~(this.millisecond()/100)}),U(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,function(){return 10*this.millisecond()}),U(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),U(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),U(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),U(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),U(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}), -// ALIASES -J("millisecond","ms"), -// PRIORITY -M("millisecond",16), -// PARSING -Z("S",Rd,Jd),Z("SS",Rd,Kd),Z("SSS",Rd,Ld);var Ve;for(Ve="SSSS";Ve.length<=9;Ve+="S")Z(Ve,Ud);for(Ve="S";Ve.length<=9;Ve+="S")ba(Ve,Ic); -// MOMENTS -var We=O("Milliseconds",!1); -// FORMATTING -U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var Xe=r.prototype;Xe.add=Pe,Xe.calendar=Vb,Xe.clone=Wb,Xe.diff=bc,Xe.endOf=oc,Xe.format=gc,Xe.from=hc,Xe.fromNow=ic,Xe.to=jc,Xe.toNow=kc,Xe.get=R,Xe.invalidAt=xc,Xe.isAfter=Xb,Xe.isBefore=Yb,Xe.isBetween=Zb,Xe.isSame=$b,Xe.isSameOrAfter=_b,Xe.isSameOrBefore=ac,Xe.isValid=vc,Xe.lang=Re,Xe.locale=lc,Xe.localeData=mc,Xe.max=Ke,Xe.min=Je,Xe.parsingFlags=wc,Xe.set=S,Xe.startOf=nc,Xe.subtract=Qe,Xe.toArray=sc,Xe.toObject=tc,Xe.toDate=rc,Xe.toISOString=ec,Xe.inspect=fc,Xe.toJSON=uc,Xe.toString=dc,Xe.unix=qc,Xe.valueOf=pc,Xe.creationData=yc, -// Year -Xe.year=pe,Xe.isLeapYear=ra, -// Week Year -Xe.weekYear=Ac,Xe.isoWeekYear=Bc, -// Quarter -Xe.quarter=Xe.quarters=Gc, -// Month -Xe.month=ka,Xe.daysInMonth=la, -// Week -Xe.week=Xe.weeks=Ba,Xe.isoWeek=Xe.isoWeeks=Ca,Xe.weeksInYear=Dc,Xe.isoWeeksInYear=Cc, -// Day -Xe.date=Se,Xe.day=Xe.days=Ka,Xe.weekday=La,Xe.isoWeekday=Ma,Xe.dayOfYear=Hc, -// Hour -Xe.hour=Xe.hours=ze, -// Minute -Xe.minute=Xe.minutes=Te, -// Second -Xe.second=Xe.seconds=Ue, -// Millisecond -Xe.millisecond=Xe.milliseconds=We, -// Offset -Xe.utcOffset=Db,Xe.utc=Fb,Xe.local=Gb,Xe.parseZone=Hb,Xe.hasAlignedHourOffset=Ib,Xe.isDST=Jb,Xe.isLocal=Lb,Xe.isUtcOffset=Mb,Xe.isUtc=Nb,Xe.isUTC=Nb, -// Timezone -Xe.zoneAbbr=Jc,Xe.zoneName=Kc, -// Deprecations -Xe.dates=x("dates accessor is deprecated. Use date instead.",Se),Xe.months=x("months accessor is deprecated. Use month instead",ka),Xe.years=x("years accessor is deprecated. Use year instead",pe),Xe.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Eb),Xe.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Kb);var Ye=C.prototype;Ye.calendar=D,Ye.longDateFormat=E,Ye.invalidDate=F,Ye.ordinal=G,Ye.preparse=Nc,Ye.postformat=Nc,Ye.relativeTime=H,Ye.pastFuture=I,Ye.set=A, -// Month -Ye.months=fa,Ye.monthsShort=ga,Ye.monthsParse=ia,Ye.monthsRegex=na,Ye.monthsShortRegex=ma, -// Week -Ye.week=ya,Ye.firstDayOfYear=Aa,Ye.firstDayOfWeek=za, -// Day of Week -Ye.weekdays=Fa,Ye.weekdaysMin=Ha,Ye.weekdaysShort=Ga,Ye.weekdaysParse=Ja,Ye.weekdaysRegex=Na,Ye.weekdaysShortRegex=Oa,Ye.weekdaysMinRegex=Pa, -// Hours -Ye.isPM=Va,Ye.meridiem=Wa,$a("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===u(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}), -// Side effect imports -a.lang=x("moment.lang is deprecated. Use moment.locale instead.",$a),a.langData=x("moment.langData is deprecated. Use moment.localeData instead.",bb);var Ze=Math.abs,$e=ed("ms"),_e=ed("s"),af=ed("m"),bf=ed("h"),cf=ed("d"),df=ed("w"),ef=ed("M"),ff=ed("y"),gf=gd("milliseconds"),hf=gd("seconds"),jf=gd("minutes"),kf=gd("hours"),lf=gd("days"),mf=gd("months"),nf=gd("years"),of=Math.round,pf={s:45,// seconds to minute -m:45,// minutes to hour -h:22,// hours to day -d:26,// days to month -M:11},qf=Math.abs,rf=wb.prototype; -// Deprecations -// Side effect imports -// FORMATTING -// PARSING -// Side effect imports -return rf.abs=Wc,rf.add=Yc,rf.subtract=Zc,rf.as=cd,rf.asMilliseconds=$e,rf.asSeconds=_e,rf.asMinutes=af,rf.asHours=bf,rf.asDays=cf,rf.asWeeks=df,rf.asMonths=ef,rf.asYears=ff,rf.valueOf=dd,rf._bubble=_c,rf.get=fd,rf.milliseconds=gf,rf.seconds=hf,rf.minutes=jf,rf.hours=kf,rf.days=lf,rf.weeks=hd,rf.months=mf,rf.years=nf,rf.humanize=md,rf.toISOString=nd,rf.toString=nd,rf.toJSON=nd,rf.locale=lc,rf.localeData=mc,rf.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",nd),rf.lang=Re,U("X",0,0,"unix"),U("x",0,0,"valueOf"),Z("x",Vd),Z("X",Yd),ba("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),ba("x",function(a,b,c){c._d=new Date(u(a))}),a.version="2.17.1",b(sb),a.fn=Xe,a.min=ub,a.max=vb,a.now=Le,a.utc=k,a.unix=Lc,a.months=Rc,a.isDate=g,a.locale=$a,a.invalid=o,a.duration=Ob,a.isMoment=s,a.weekdays=Tc,a.parseZone=Mc,a.localeData=bb,a.isDuration=xb,a.monthsShort=Sc,a.weekdaysMin=Vc,a.defineLocale=_a,a.updateLocale=ab,a.locales=cb,a.weekdaysShort=Uc,a.normalizeUnits=K,a.relativeTimeRounding=kd,a.relativeTimeThreshold=ld,a.calendarFormat=Ub,a.prototype=Xe,a}); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n>>0,s=0;sSe(e)?(r=e+1,o-Se(e)):(r=e,o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(Se(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),C("week","w"),C("isoWeek","W"),F("week",5),F("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=D(e)});function je(e,t){return e.slice(t,7).concat(e.slice(0,t))}I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),C("day","d"),C("weekday","e"),C("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=D(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var $e="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var qe=ae;var Je=ae;var Be=ae;function Qe(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=he(o[t]),u[t]=he(u[t]),l[t]=he(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Xe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Xe.apply(this)+L(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Xe.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+L(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),C("hour","h"),F("hour",13),ue("a",et),ue("A",et),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=D(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=D(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i))});var tt,nt=Te("Hours",!0),st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ce,monthsShort:He,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){var t=null;if(!it[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=tt._abbr,require("./locale/"+e),ut(t)}catch(e){}return it[e]}function ut(e,t){var n;return e&&((n=l(t)?ht(e):lt(e,t))?tt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),tt._abbr}function lt(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ot(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new P(x(s,t)),rt[e]&&rt[e].forEach(function(e){lt(e.name,e.config)}),ut(e),it[e]}function ht(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return tt;if(!o(e)){if(t=ot(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r=t&&a(i,n,!0)>=t-1)break;t--}r++}return tt}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11Pe(n[me],n[_e])?ye:n[ge]<0||24Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ct(e._a[me],s[me]),(e._dayOfYear>Se(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[ve]&&0===e._a[pe]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var mt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yt=/Z|[+-]\d\d(?::?\d\d)?/,gt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],vt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function wt(e){var t,n,s,i,r,a,o=e._i,u=mt.exec(o)||_t.exec(o);if(u){for(g(e).iso=!0,t=0,n=gt.length;tn.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},mn.isLocal=function(){return!!this.isValid()&&!this._isUTC},mn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},mn.isUtc=Et,mn.isUTC=Et,mn.zoneAbbr=function(){return this._isUTC?"UTC":""},mn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},mn.dates=n("dates accessor is deprecated. Use date instead.",un),mn.months=n("months accessor is deprecated. Use month instead",Ue),mn.years=n("years accessor is deprecated. Use year instead",Oe),mn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),mn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Ot(e))._a){var t=e._isUTC?y(e._a):bt(e._a);this._isDSTShifted=this.isValid()&&0 Date: Wed, 29 Apr 2020 01:43:07 +0200 Subject: [PATCH 079/298] Initial (incomplete) support for themes. Currently, the default is the new Pi-hole dark theme. Signed-off-by: DL6ER --- img/boxed-bg-dark.jpg | Bin 0 -> 19918 bytes index.php | 4 + scripts/pi-hole/js/index.js | 46 +++- scripts/pi-hole/php/header.php | 10 +- style/pi-hole.css | 17 +- style/themes/default-dark.css | 380 +++++++++++++++++++++++++++++++++ style/themes/default-light.css | 173 +++++++++++++++ style/vendor/skin-blue.min.css | 1 - 8 files changed, 605 insertions(+), 26 deletions(-) create mode 100644 img/boxed-bg-dark.jpg create mode 100644 style/themes/default-dark.css create mode 100644 style/themes/default-light.css delete mode 100644 style/vendor/skin-blue.min.css diff --git a/img/boxed-bg-dark.jpg b/img/boxed-bg-dark.jpg new file mode 100644 index 0000000000000000000000000000000000000000..30b3d9e10633a8d62ca14d843423277fbf74dd3f GIT binary patch literal 19918 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 JrFvoT{{gL@Advt7 literal 0 HcmV?d00001 diff --git a/index.php b/index.php index 78c1a4648..cb57225e3 100644 --- a/index.php +++ b/index.php @@ -82,6 +82,10 @@ function getinterval()
+ + + +

Total queries over last hours

diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 8eb6dc85c..a9748161a 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -689,7 +689,7 @@ function updateTopLists() { percentage.toFixed(1) + "% of " + data.dns_queries_today + - '">
' ); @@ -722,7 +722,7 @@ function updateTopLists() { percentage.toFixed(1) + "% of " + data.ads_blocked_today + - '">
' ); @@ -824,8 +824,10 @@ $(document).ready(function () { // Pull in data via AJAX updateSummaryData(); - var blockedColor = "#999"; - var permittedColor = "#00a65a"; + var blockedColor = $(".queries-blocked").css("background-color"); + var permittedColor = $(".queries-permitted").css("background-color"); + var gridColor = $(".graphs-grid").css("background-color"); + var ticksColor = $(".graphs-ticks").css("color"); var ctx = document.getElementById("queryOverTimeChart").getContext("2d"); timeLineChart = new Chart(ctx, { @@ -912,6 +914,12 @@ $(document).ready(function () { hour: "HH:mm" }, tooltipFormat: "HH:mm" + }, + gridLines: { + color: gridColor + }, + ticks: { + fontColor: ticksColor } } ], @@ -920,6 +928,12 @@ $(document).ready(function () { stacked: true, ticks: { beginAtZero: true + }, + gridLines: { + color: gridColor + }, + ticks: { + fontColor: ticksColor } } ] @@ -980,6 +994,12 @@ $(document).ready(function () { hour: "HH:mm" }, tooltipFormat: "HH:mm" + }, + gridLines: { + color: gridColor + }, + ticks: { + fontColor: ticksColor } } ], @@ -988,7 +1008,13 @@ $(document).ready(function () { ticks: { beginAtZero: true }, - stacked: true + stacked: true, + gridLines: { + color: gridColor + }, + ticks: { + fontColor: ticksColor + } } ] }, @@ -1040,6 +1066,11 @@ $(document).ready(function () { datasets: [{ data: [] }] }, options: { + elements: { + arc: { + borderColor: $(".box").css("background-color") + } + }, legend: { display: false }, @@ -1077,6 +1108,11 @@ $(document).ready(function () { datasets: [{ data: [] }] }, options: { + elements: { + arc: { + borderColor: $(".box").css("background-color") + } + }, legend: { display: false }, diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index e54f99d0f..0b5fead51 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -11,6 +11,9 @@ require_once "scripts/pi-hole/php/FTL.php"; $scriptname = basename($_SERVER['SCRIPT_FILENAME']); + //$theme = "default-light"; + $theme = "default-dark"; + check_cors(); // Generate CSRF token @@ -202,12 +205,11 @@ function pidofFTL() - - - + + @@ -226,7 +228,7 @@ function pidofFTL() - +
diff --git a/queries.php b/queries.php index 5eb4e8f6c..6152e1350 100644 --- a/queries.php +++ b/queries.php @@ -122,7 +122,7 @@
- +
diff --git a/settings.php b/settings.php index 6c9f98d61..6d76f02a8 100644 --- a/settings.php +++ b/settings.php @@ -699,7 +699,7 @@ function convertseconds($argument)
-
Time
+
@@ -728,14 +728,14 @@ function convertseconds($argument)
-
MAC address
+
- - - - - - + + + + + + From 30776108ee0979457a0f8bbf5d96f35823667371 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 24 May 2020 21:12:15 +0300 Subject: [PATCH 174/298] Use `fa5` class on the sidebar toggle This was added in AdminLTE v2.4.13. Also, remove unneeded related custom CSS while at it. Signed-off-by: XhmikosR --- scripts/pi-hole/php/header.php | 2 +- style/pi-hole.css | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index f73706b25..a76602ddc 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -265,7 +265,7 @@ function pidofFTL() ",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",t.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(e,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(s.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),s.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var i,s,n,a,o,r,h,l,u,d,c=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(c&&e.contains(this.containers[i].element[0],c.element[0]))continue;c=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,a=null,u=c.floating||this._isFloating(this.currentItem),o=u?"left":"top",r=u?"width":"height",d=u?"clientX":"clientY",s=this.items.length-1;s>=0;s--)e.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[o],l=!1,t[d]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(t[d]-h)&&(n=Math.abs(t[d]-h),a=this.items[s],this.direction=l?"up":"down"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;a?this._rearrange(t,a,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(t=e(n.containment)[0],i=e(n.containment).offset(),s="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(t){var i,s,n=this.options,a=t.pageX,o=t.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.leftthis.containment[2]&&(a=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(e,t,i,s){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(e,t){function i(e,t,i){return function(s){i._trigger(e,s,t._uiHash(t))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&n.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||n.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(n.push(function(e){this._trigger("remove",e,this._uiHash())}),n.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)t||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(s=0;n.length>s;s++)n[s].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}}),e.widget("ui.spinner",{version:"1.11.3",defaultElement:"",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each(["min","max","step"],function(e,s){var n=i.attr(s);void 0!==n&&n.length&&(t[s]=n)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e),void 0)},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){return e(t.currentTarget).hasClass("ui-state-active")?this._start(t)===!1?!1:(this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var i=this.options,s=e.ui.keyCode;switch(t.keyCode){case s.UP:return this._repeat(null,1,t),!0;case s.DOWN:return this._repeat(null,-1,t),!0;case s.PAGE_UP:return this._repeat(null,i.page,t),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return""},_buttonHtml:function(){return""+""+""+""+""},_start:function(e){return this.spinning||this._trigger("start",e)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(e){var t,i,s=this.options;return t=null!==s.min?s.min:0,i=e-t,i=Math.round(i/s.step)*s.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==s.max&&e>s.max?s.max:null!==s.min&&s.min>e?s.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var i=this._parse(this.element.val());return this.options[e]=t,this.element.val(this._format(i)),void 0}("max"===e||"min"===e||"step"===e)&&"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),"disabled"===e&&(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable"))},_setOptions:h(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null===e?!1:e===this._adjustValue(e)},_value:function(e,t){var i;""!==e&&(i=this._parse(e),null!==i&&(t||(i=this._adjustValue(i)),e=this._format(i))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:h(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:h(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:h(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:h(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?(h(this._value).call(this,e),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),e.widget("ui.tabs",{version:"1.11.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var i,s;t=t.cloneNode(!1),i=t.href.replace(e,""),s=location.href.replace(e,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return t.hash.length>1&&i===s}}(),_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===t&&(s&&this.tabs.each(function(i,n){return e(n).attr("aria-controls")===s?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:s++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:n=!1,s--;break;case e.ui.keyCode.END:s=this.anchors.length-1;break;case e.ui.keyCode.HOME:s=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}t.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),t.ctrlKey||t.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function s(){return t>n&&(t=0),0>t&&(t=n),t}for(var n=this.tabs.length-1;-1!==e.inArray(s(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):"disabled"===e?(this._setupDisabled(t),void 0):(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t),void 0)},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault() -}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,s){var n,a,o,r=e(s).uniqueId().attr("id"),h=e(s).closest("li"),l=h.attr("aria-controls");t._isLocal(s)?(n=s.hash,o=n.substring(1),a=t.element.find(t._sanitizeSelector(n))):(o=h.attr("aria-controls")||e({}).uniqueId()[0].id,n="#"+o,a=t.element.find(n),a.length||(a=t._createPanel(o),a.insertAfter(t.panels[i-1]||t.tablist)),a.attr("aria-live","polite")),a.length&&(t.panels=t.panels.add(a)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":o,"aria-labelledby":r}),a.attr("aria-labelledby",r)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("
").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,s=0;i=this.tabs[s];s++)t===!0||-1!==e.inArray(s,t)?e(i).addClass("ui-state-disabled").attr("aria-disabled","true"):e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,s=this.element.parent();"fill"===t?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),s=t.css("position");"absolute"!==s&&"fixed"!==s&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?e():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):e(),u={oldTab:s,oldPanel:l,newTab:r?e():a,newPanel:h};t.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",t,u)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?e():a,this.xhr&&this.xhr.abort(),l.length||h.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),t),this._toggle(t,u))},_toggle:function(t,i){function s(){a.running=!1,a._trigger("activate",t,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var i,s=this._findActive(t);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var i=this.options.disabled;i!==!1&&(void 0===t?i=!1:(t=this._getIndex(t),i=e.isArray(i)?e.map(i,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,i){return i!==t?i:null})),this._setupDisabled(i))},disable:function(t){var i=this.options.disabled;if(i!==!0){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,i))return;i=e.isArray(i)?e.merge([t],i).sort():[t]}this._setupDisabled(i)}},load:function(t,i){t=this._getIndex(t);var s=this,n=this.tabs.eq(t),a=n.find(".ui-tabs-anchor"),o=this._getPanelForTab(n),r={tab:n,panel:o};this._isLocal(a[0])||(this.xhr=e.ajax(this._ajaxSettings(a,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(n.addClass("ui-tabs-loading"),o.attr("aria-busy","true"),this.xhr.success(function(e){setTimeout(function(){o.html(e),s._trigger("load",i,r)},1)}).complete(function(e,t){setTimeout(function(){"abort"===t&&s.panels.stop(!1,!0),n.removeClass("ui-tabs-loading"),o.removeAttr("aria-busy"),e===s.xhr&&delete s.xhr},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href"),beforeSend:function(t,a){return n._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:a},s))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),e.widget("ui.tooltip",{version:"1.11.3",options:{content:function(){var t=e(this).attr("title")||"";return e("").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(t,i){var s=(t.attr("aria-describedby")||"").split(/\s+/);s.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",e.trim(s.join(" ")))},_removeDescribedBy:function(t){var i=t.data("ui-tooltip-id"),s=(t.attr("aria-describedby")||"").split(/\s+/),n=e.inArray(i,s);-1!==n&&s.splice(n,1),t.removeData("ui-tooltip-id"),s=e.trim(s.join(" ")),s?t.attr("aria-describedby",s):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=e("
").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(t,i){var s=this;return"disabled"===t?(this[i?"_disable":"_enable"](),this.options[t]=i,void 0):(this._super(t,i),"content"===t&&e.each(this.tooltips,function(e,t){s._updateContent(t.element)}),void 0)},_disable:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur");n.target=n.currentTarget=s.element[0],t.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var i=this,s=e(t?t.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&s.parents().each(function(){var t,s=e(this);s.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,i.close(t,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,t))},_updateContent:function(e,t){var i,s=this.options.content,n=this,a=t?t.type:null;return"string"==typeof s?this._open(t,e,s):(i=s.call(e[0],function(i){e.data("ui-tooltip-open")&&n._delay(function(){t&&(t.type=a),this._open(t,e,i)})}),i&&this._open(t,e,i),void 0)},_open:function(t,i,s){function n(e){u.of=e,o.is(":hidden")||o.position(u)}var a,o,r,h,l,u=e.extend({},this.options.position);if(s){if(a=this._find(i))return a.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title")),a=this._tooltip(i),o=a.tooltip,this._addDescribedBy(i,o.attr("id")),o.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),s.clone?(l=s.clone(),l.removeAttr("id").find("[id]").removeAttr("id")):l=s,e("
").html(l).appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:n}),n(t)):o.position(e.extend({of:i},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){o.is(":visible")&&(n(u.of),clearInterval(h))},e.fx.interval)),this._trigger("open",t,{tooltip:o}),r={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var s=e.Event(t);s.currentTarget=i[0],this.close(s,!0)}}},i[0]!==this.element[0]&&(r.remove=function(){this._removeTooltip(o)}),t&&"mouseover"!==t.type||(r.mouseleave="close"),t&&"focusin"!==t.type||(r.focusout="close"),this._on(!0,i,r)}},close:function(t){var i,s=this,n=e(t?t.currentTarget:this.element),a=this._find(n);a&&(i=a.tooltip,a.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),a.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(e(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,i){e(i.element).attr("title",i.title),delete s.parents[t]}),a.closing=!0,this._trigger("close",t,{tooltip:i}),a.hiding||(a.closing=!1)))},_tooltip:function(t){var i=e("
").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),s=i.uniqueId().attr("id");return e("
").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[s]={element:t,tooltip:i}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur"),a=s.element;n.target=n.currentTarget=a[0],t.close(n,!0),e("#"+i).remove(),a.data("ui-tooltip-title")&&(a.attr("title")||a.attr("title",a.data("ui-tooltip-title")),a.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})}); \ No newline at end of file From d92c4ef160d6cbc25aef940a817da1f8fea286d1 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 29 May 2020 09:11:59 +0300 Subject: [PATCH 204/298] index.php: remove duplicate `class` attribute Signed-off-by: XhmikosR --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 8748ee798..64bffc136 100644 --- a/index.php +++ b/index.php @@ -157,7 +157,7 @@ function getinterval()
-
+
From f1eb744ff59d12ebb4a19fab38c3b3879336d9f5 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 29 May 2020 09:19:18 +0300 Subject: [PATCH 205/298] Guard `gethostname()` calls Signed-off-by: XhmikosR --- scripts/pi-hole/php/header.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index a76602ddc..2bee688aa 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -183,7 +183,7 @@ function pidofFTL() - Pi-hole<?php if (gethostname()) {echo " - ", gethostname();} ?> + Pi-hole<?php echo gethostname() ? " - " . gethostname() : "" ?> @@ -276,10 +276,10 @@ function pidofFTL() -
  • +
  • -
    + " + title + "
    "; @@ -188,6 +206,7 @@ function stateLoadCallback(itemName) { window.utils = (function () { return { escapeHtml: escapeHtml, + objectToArray: objectToArray, showAlert: showAlert, datetime: datetime, disableAll: disableAll, From 61c29cafc495989632961ec8badf5dc72701e627 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 25 May 2020 12:38:36 +0300 Subject: [PATCH 211/298] Move `padNumber()` to utils. Signed-off-by: XhmikosR --- scripts/pi-hole/js/db_graph.js | 24 ++++++++++-------------- scripts/pi-hole/js/index.js | 12 ++++-------- scripts/pi-hole/js/utils.js | 5 +++++ 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/scripts/pi-hole/js/db_graph.js b/scripts/pi-hole/js/db_graph.js index 924ad7458..124fc6f77 100644 --- a/scripts/pi-hole/js/db_graph.js +++ b/scripts/pi-hole/js/db_graph.js @@ -50,10 +50,6 @@ $(function () { ); }); -function padNumber(num) { - return ("00" + num).substr(-2, 2); -} - var timeLineChart; function compareNumbers(a, b) { @@ -197,28 +193,28 @@ $(document).ready(function () { var fromDate = time.getFullYear() + "-" + - padNumber(time.getMonth() + 1) + + utils.padNumber(time.getMonth() + 1) + "-" + - padNumber(time.getDate()); + utils.padNumber(time.getDate()); var fromTime = - padNumber(time.getHours()) + + utils.padNumber(time.getHours()) + ":" + - padNumber(time.getMinutes()) + + utils.padNumber(time.getMinutes()) + ":" + - padNumber(time.getSeconds()); + utils.padNumber(time.getSeconds()); time = new Date(time.valueOf() + 1000 * interval); var untilDate = time.getFullYear() + "-" + - padNumber(time.getMonth() + 1) + + utils.padNumber(time.getMonth() + 1) + "-" + - padNumber(time.getDate()); + utils.padNumber(time.getDate()); var untilTime = - padNumber(time.getHours()) + + utils.padNumber(time.getHours()) + ":" + - padNumber(time.getMinutes()) + + utils.padNumber(time.getMinutes()) + ":" + - padNumber(time.getSeconds()); + utils.padNumber(time.getSeconds()); if (fromDate === untilDate) { // Abbreviated form for intervals on the same day diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 718e038c6..607e9679b 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -30,10 +30,6 @@ var colors = [ "#d2d6de" ]; -function padNumber(num) { - return ("00" + num).substr(-2, 2); -} - var customTooltips = function (tooltip) { var tooltipEl = document.getElementById(this._chart.canvas.id + "-customTooltip"); if (!tooltipEl) { @@ -844,8 +840,8 @@ $(document).ready(function () { var time = label.match(/(\d?\d):?(\d?\d?)/); var h = parseInt(time[1], 10); var m = parseInt(time[2], 10) || 0; - var from = padNumber(h) + ":" + padNumber(m - 5) + ":00"; - var to = padNumber(h) + ":" + padNumber(m + 4) + ":59"; + var from = utils.padNumber(h) + ":" + utils.padNumber(m - 5) + ":00"; + var to = utils.padNumber(h) + ":" + utils.padNumber(m + 4) + ":59"; return "Queries from " + from + " to " + to; }, label: function (tooltipItems, data) { @@ -941,8 +937,8 @@ $(document).ready(function () { var time = label.match(/(\d?\d):?(\d?\d?)/); var h = parseInt(time[1], 10); var m = parseInt(time[2], 10) || 0; - var from = padNumber(h) + ":" + padNumber(m - 5) + ":00"; - var to = padNumber(h) + ":" + padNumber(m + 4) + ":59"; + var from = utils.padNumber(h) + ":" + utils.padNumber(m - 5) + ":00"; + var to = utils.padNumber(h) + ":" + utils.padNumber(m + 4) + ":59"; return "Client activity from " + from + " to " + to; }, label: function (tooltipItems, data) { diff --git a/scripts/pi-hole/js/utils.js b/scripts/pi-hole/js/utils.js index 3870e6164..fd03d70c1 100644 --- a/scripts/pi-hole/js/utils.js +++ b/scripts/pi-hole/js/utils.js @@ -40,6 +40,10 @@ function objectToArray(obj) { return [idx, arr]; } +function padNumber(num) { + return ("00" + num).substr(-2, 2); +} + var info = null; // TODO clear this up; there shouldn't be a global var here function showAlert(type, icon, title, message) { var opts = {}; @@ -207,6 +211,7 @@ window.utils = (function () { return { escapeHtml: escapeHtml, objectToArray: objectToArray, + padNumber: padNumber, showAlert: showAlert, datetime: datetime, disableAll: disableAll, From 7caabf7d2ade5d63476488e1e3f4764c0b3f0077 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 29 May 2020 11:01:16 +0300 Subject: [PATCH 212/298] index.js: assorted simplifications Signed-off-by: XhmikosR * rename `colors` variable to avoid shadowing and be more clear * remove function used only once * simplify a couple of for loops --- scripts/pi-hole/js/index.js | 49 ++++++++++++++----------------------- 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 607e9679b..e778c3380 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -11,7 +11,7 @@ var timeLineChart, clientsChart; var queryTypePieChart, forwardDestinationPieChart; -var colors = [ +var THEME_COLORS = [ "#3c8dbc", "#f56954", "#00a65a", @@ -62,14 +62,12 @@ var customTooltips = function (tooltip) { tooltipEl.classList.remove("left", "right", "center", "top", "bottom"); tooltipEl.classList.add(tooltip.xAlign, tooltip.yAlign); - function getBody(bodyItem) { - return bodyItem.lines; - } - // Set Text if (tooltip.body) { var titleLines = tooltip.title || []; - var bodyLines = tooltip.body.map(getBody); + var bodyLines = tooltip.body.map(function (bodyItem) { + return bodyItem.lines; + }); var innerHtml = "
    "; titleLines.forEach(function (title) { @@ -80,9 +78,9 @@ var customTooltips = function (tooltip) { var devicePixel = (1 / window.devicePixelRatio).toFixed(1); bodyLines.forEach(function (body, i) { - var colors = tooltip.labelColors[i]; - var style = "background: " + colors.backgroundColor; - style += "; outline: 1px solid " + colors.backgroundColor; + var labelColors = tooltip.labelColors[i]; + var style = "background-color: " + labelColors.backgroundColor; + style += "; outline: 1px solid " + labelColors.backgroundColor; style += "; border: " + devicePixel + "px solid #fff"; var span = ""; @@ -291,7 +289,7 @@ function updateQueryTypesPie() { Object.keys(iter).forEach(function (key) { v.push(iter[key]); - c.push(colors[i++ % colors.length]); + c.push(THEME_COLORS[i++ % THEME_COLORS.length]); k.push(key); }); @@ -355,19 +353,12 @@ function updateClientsOverTime() { var plotdata = data.over_time[1]; var labels = []; var key, i, j; - for (key in data.clients) { - if (!Object.prototype.hasOwnProperty.call(data.clients, key)) { - continue; - } - var clientname; - if (data.clients[key].name.length > 0) { - clientname = data.clients[key].name; - } else { - clientname = data.clients[key].ip; + for (key in data.clients) { + if (Object.prototype.hasOwnProperty.call(data.clients, key)) { + var client = data.clients[key]; + labels.push(client.name.length > 0 ? client.name : client.ip); } - - labels.push(clientname); } // Remove possibly already existing data @@ -378,7 +369,7 @@ function updateClientsOverTime() { } // Collect values and colors, and labels - clientsChart.data.datasets[0].backgroundColor = colors[0]; + clientsChart.data.datasets[0].backgroundColor = THEME_COLORS[0]; clientsChart.data.datasets[0].pointRadius = 0; clientsChart.data.datasets[0].pointHitRadius = 5; clientsChart.data.datasets[0].pointHoverRadius = 5; @@ -389,8 +380,8 @@ function updateClientsOverTime() { data: [], // If we ran out of colors, make a random one backgroundColor: - i < colors.length - ? colors[i] + i < THEME_COLORS.length + ? THEME_COLORS[i] : "#" + (0x1000000 + Math.random() * 0xffffff).toString(16).substr(1, 6), pointRadius: 0, pointHitRadius: 5, @@ -407,11 +398,9 @@ function updateClientsOverTime() { } for (key in plotdata[j]) { - if (!Object.prototype.hasOwnProperty.call(plotdata[j], key)) { - continue; + if (Object.prototype.hasOwnProperty.call(plotdata[j], key)) { + clientsChart.data.datasets[key].data.push(plotdata[j][key]); } - - clientsChart.data.datasets[key].data.push(plotdata[j][key]); } var d = new Date(1000 * parseInt(timestamps[j])); @@ -456,7 +445,7 @@ function updateForwardDestinationsPie() { key = key.substr(0, key.indexOf("|")); } - values.push([key, value, colors[i++ % colors.length]]); + values.push([key, value, THEME_COLORS[i++ % THEME_COLORS.length]]); }); // Split data into individual arrays for the graphs @@ -770,7 +759,7 @@ function updateSummaryData(runOnce) { ); } - window.setTimeout(function () { + setTimeout(function () { $("span.glow").removeClass("glow"); }, 500); }) From 37d75b9c460b4a3a933419faf326529bc067dde1 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 29 May 2020 11:23:14 +0300 Subject: [PATCH 213/298] Update CI config * only run the workflows for pushes to master and develop branches and for all PRs * remove moot `strategy` since we use one Node.js version Signed-off-by: XhmikosR --- .github/workflows/test.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b0cca47c9..2aea7823e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,14 @@ name: Tests -on: [push, pull_request] + +on: + push: + branches: + - devel + - master + pull_request: + branches: + - "**" + env: CI: true @@ -8,11 +17,6 @@ jobs: name: Node ${{ matrix.node }} runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - node: [12] - steps: - name: Clone repository uses: actions/checkout@v2 @@ -20,7 +24,7 @@ jobs: - name: Set Node.js version uses: actions/setup-node@v1 with: - node-version: ${{ matrix.node }} + node-version: "12.x" - name: Install npm dependencies run: npm ci From 7304acc0b9c84314cf0baf51db94a6879d7e35f1 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 29 May 2020 16:51:42 +0300 Subject: [PATCH 214/298] Add `eslint-plugin-compat` Signed-off-by: XhmikosR --- package-lock.json | 54 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 4 ++++ 2 files changed, 58 insertions(+) diff --git a/package-lock.json b/package-lock.json index 00869301e..f9d214db2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -438,6 +438,12 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, + "ast-metadata-inferer": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ast-metadata-inferer/-/ast-metadata-inferer-0.2.0.tgz", + "integrity": "sha512-6yPph2NeCHNxoI/ZmjklYaLOSZDAx+0L0+wsXnF56FxmjxvUlYZSWcj1KXtXO8IufruQTzVFOjg1+IzdDazSPg==", + "dev": true + }, "astral-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", @@ -902,6 +908,12 @@ "quick-lru": "^1.0.0" } }, + "caniuse-db": { + "version": "1.0.30001069", + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30001069.tgz", + "integrity": "sha512-eW2e5Tar+M5lG2eV5+cvlOOm/ayktZV/rdU+rECFqXv5hnfcrHr1ilwiH2ZxDOtnW72qH/XMHFeIg0e3AhhWyA==", + "dev": true + }, "caniuse-lite": { "version": "1.0.30001065", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001065.tgz", @@ -1173,6 +1185,12 @@ "is-error": "^2.2.0" } }, + "core-js": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", + "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==", + "dev": true + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -1969,6 +1987,21 @@ "resolve-from": "^5.0.0" } }, + "eslint-plugin-compat": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-compat/-/eslint-plugin-compat-3.7.0.tgz", + "integrity": "sha512-A3uzSYqUjNj6rMyaBuU3l8wSCadZjeZRZ7WF3eU9vUT0JItiqRysjmYELkHHCpH8l7wRprUu4MZPr37lFCw7iA==", + "dev": true, + "requires": { + "ast-metadata-inferer": "^0.2.0-0", + "browserslist": "^4.12.0", + "caniuse-db": "^1.0.30001059", + "core-js": "^3.6.5", + "lodash.memoize": "4.1.2", + "mdn-browser-compat-data": "^1.0.21", + "semver": "7.3.2" + } + }, "eslint-plugin-es": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", @@ -2321,6 +2354,12 @@ } } }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, "extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", @@ -3610,6 +3649,12 @@ "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, "lodash.zip": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz", @@ -3690,6 +3735,15 @@ "safe-buffer": "^5.1.2" } }, + "mdn-browser-compat-data": { + "version": "1.0.23", + "resolved": "https://registry.npmjs.org/mdn-browser-compat-data/-/mdn-browser-compat-data-1.0.23.tgz", + "integrity": "sha512-qzabBf9lN1UG6Ju6am5j4bsy8PJSxlE8zQEyDXzKqD+nAQsAnA8apvbkgTSIA/ZpKgz/7qOtpJgtgGN00MEsIg==", + "dev": true, + "requires": { + "extend": "3.0.2" + } + }, "memory-fs": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", diff --git a/package.json b/package.json index 176ff63a3..3d79c83fe 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ }, "devDependencies": { "autoprefixer": "^9.8.0", + "eslint-plugin-compat": "^3.7.0", "postcss-cli": "^7.1.1", "prettier": "2.0.4", "xo": "^0.30.0" @@ -47,6 +48,9 @@ "browser", "jquery" ], + "extends": [ + "plugin:compat/recommended" + ], "parserOptions": { "ecmaVersion": 5, "sourceType": "script" From e7eb4bef9dff09d7a8d2ebf492ab8fbc798ddcd4 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 29 May 2020 16:54:01 +0300 Subject: [PATCH 215/298] Ignore the `EventSource()` errors We have code checking for the presence of this, so it's OK to ignore these errors. Signed-off-by: XhmikosR --- scripts/pi-hole/js/debug.js | 1 + scripts/pi-hole/js/gravity.js | 1 + scripts/pi-hole/js/queryads.js | 1 + 3 files changed, 3 insertions(+) diff --git a/scripts/pi-hole/js/debug.js b/scripts/pi-hole/js/debug.js index 501aad138..bf5609d1e 100644 --- a/scripts/pi-hole/js/debug.js +++ b/scripts/pi-hole/js/debug.js @@ -29,6 +29,7 @@ function eventsource() { return; } + // eslint-disable-next-line compat/compat var source = new EventSource("scripts/pi-hole/php/debug.php?&token=" + token + "&" + checked); // Reset and show field diff --git a/scripts/pi-hole/js/gravity.js b/scripts/pi-hole/js/gravity.js index 3c9dbbcca..04d08619a 100644 --- a/scripts/pi-hole/js/gravity.js +++ b/scripts/pi-hole/js/gravity.js @@ -17,6 +17,7 @@ function eventsource() { return; } + // eslint-disable-next-line compat/compat var source = new EventSource("scripts/pi-hole/php/gravity.sh.php"); ta.html(""); diff --git a/scripts/pi-hole/js/queryads.js b/scripts/pi-hole/js/queryads.js index 2c2db3135..6fb340c72 100644 --- a/scripts/pi-hole/js/queryads.js +++ b/scripts/pi-hole/js/queryads.js @@ -52,6 +52,7 @@ function eventsource() { return; } + // eslint-disable-next-line compat/compat var source = new EventSource( "scripts/pi-hole/php/queryads.php?domain=" + domain.toLowerCase() + "&" + exact ); From d55f0ce8bfe78e80672c7475b3a536e8e6cae4bb Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 29 May 2020 16:56:56 +0300 Subject: [PATCH 216/298] Make IE 11 the minimum supported version Signed-off-by: XhmikosR --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3d79c83fe..6848e520d 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "browserslist": [ "defaults", - "Explorer >= 10", + "Explorer >= 11", "not ExplorerMobile <= 11", "not Safari 5.1" ], From 1390a6dd5a65a6e39b7c41f817b2e7c522e8a780 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 29 May 2020 21:41:11 +0100 Subject: [PATCH 217/298] remove outdated local help page, link to docs instead Signed-off-by: Adam Warner --- help.php | 156 --------------------------------- scripts/pi-hole/php/header.php | 10 +-- 2 files changed, 4 insertions(+), 162 deletions(-) delete mode 100644 help.php diff --git a/help.php b/help.php deleted file mode 100644 index 1c9434865..000000000 --- a/help.php +++ /dev/null @@ -1,156 +0,0 @@ - 0) - { - $authenticationsystem = true; - } - else - { - $authenticationsystem = false; - } -?> - -
    -
    -

    Help center

    -

    Header

    -

    Top left: Status display

    -

    Shows different status messages:

    -
      -
    • Status: Current status of the Pi-hole - Active (), Offline (), or Starting ()
    • -
    • Temp: Current CPU temperature
    • -
    • Load: load averages for the last minute, 5 minutes and 15 minutes, respectively. A load average of 1 reflects the full workload of a single processor on the system. We show a red icon if the current load exceeds the number of available processors on this machine (which is )
    • -
    • Memory usage: Shows the percentage of memory actually blocked by applications. We show a red icon if the memory usage exceeds 75%
    • -
    -

    Top right: About

    -
      -
    • GitHub: Link to the Pi-hole repository
    • -
    • Details: Link to Jacob Salmela's blog with some more details, describing also the concept of the Pi-hole
    • -
    • Updates: Link to list of releases
    • -
    • Update notifications: If updates are available, a link will be shown here.
    • - -
    • Session timer: Shows the time remaining until the current login session expires.
    • - -
    -
    -
    -
    -
    -

    Dashboard

    -

    On the dashboard, you can see various Pi-hole statistics:

    -
      -
    • Summary: A summary of statistics showing how many total DNS queries have been blocked today, what percentage of DNS queries have been blocked, and how many domains are in the compiled ad list. This summary is updated every 10 seconds.
    • -
    • Queries over time: Graph showing DNS queries (total and blocked) over 10 minute time intervals. More information can be acquired by hovering over the lines. This graph is updated every 10 minutes.
    • -
    • Query Types: Identifies the types of processed queries
    • -
    • Forward Destinations: Shows to which upstream DNS the permitted requests have been forwarded to.
    • -
    • Top Domains: Ranking of requested sites by number of DNS lookups.
    • -
    • Top Advertisers: Ranking of requested advertisements by number of DNS lookups.
    • -
    • Top Clients: Ranking of how many DNS requests each client has made on the local network.
    • -
    -

    The Top Domains and Top Advertisers lists may be hidden depending on the privacy Settings on the settings page

    - -

    Note that the login session does not expire on the dashboard, as the summary is updated every 10 seconds which refreshes the session.

    - -
    -
    -
    -
    -

    Query Log

    -

    Shows the recent queries by parsing Pi-hole's log. It is possible to search through the whole list by using the "Search" input field. If the status is reported as "OK", then the DNS request has been permitted. Otherwise ("Pi-holed") it has been blocked. By clicking on the buttons under "Action" the corresponding domains can quickly be added to the white-/blacklist. The status of the action will be reported on this page. By default, only the recent 10 minutes are shown to enhance the loading speed of the query log page. All domains can be requested by clicking on the corresponding link in the header of the page. Note that the result heavily depends on your privacy settings (see Settings page).

    -
    -
    -
    -
    -

    White- / Blacklist

    -

    Add or remove domains (or subdomains) from the white-/blacklist. If a domain is added to e.g. the whitelist, any possible entry of the same domain will be automatically removed from the blacklist and vice versa.

    -

    Regex blacklisting is supported (entering ^example will block any domain starting with example, see also our Regex documentation). You can still whitelist specific domains even if they fall under a regex pattern.

    -

    You can white-/blacklist multiple entries at a time if you separate the domains by spaces.

    -
    -
    -
    -
    -

    Disable / Enable

    - Disables/enables Pi-hole blocking completely. You may have to wait a few minutes for the changes to reach all of your devices. The change will be reflected by a changed status (top left) -
    -
    -
    -
    -

    Tools → Update Gravity

    -

    Will download any updates from the third-party blocklists that we source. By default, this command runs once a week via cron (Sunday).

    -
    -
    -
    -
    -

    Tools → Query Lists

    - This function is useful to find out what list a domain appears on. Since we don't control what the third-parties put on the blocklists, you may find that a domain you normally visit stops working. If this is the case, you could run this command to scan for strings in the list of blocked domains and it will return the list the domain is found on. This proved useful a while back when the Mahakala list was adding apple.com and microsoft.com to their block list.

    -
    -
    -
    -
    -

    Tools → Tail pihole.log

    - Live tailing of the raw Pi-hole log.

    -
    -
    -
    -
    -

    Settings

    - Change settings for the Pi-hole -

    System

    - Displays network and other system information of Pi-hole. At the bottom there is a "Danger Zone" with actions such as disable query logging and reboot. -

    Blocklists

    - View and edit the blocklists sourced for blocked domains. -

    DNS

    - Customize used upstream DNS servers + advanced settings for DNS servers. Note that any number of DNS servers may be enabled at a time. -

    DHCP

    - Using this setting you can enable/disable the DHCP server of the Pi-hole. Note that you should disable any other DHCP server on your network to avoid IP addresses being used more than once. You have to give the range of IPs that DHCP will serve and the IP of the local router (gateway). If the DHCP server is active, the current leases are shown on the settings page. IPv4 DHCP will always be activated, IPv6 (stateless + statefull) can be enabled. -

    API / Web Interface

    - Change settings which apply to the API as well as the web interface -

    Privacy

    - Set the privacy level for queries. Note that decreasing the privacy level will not disclose previously hidden query data. -

    Teleporter

    - Import and export Pi-hole settings. -
    -
    -
    -
    -

    Authentication system (currently enableddisabled)

    -

    Using the command

    sudo pihole -a -p
    and entering a password to be set, one can enable the authentication system of this web interface. Thereafter, a login is required for most pages (the dashboard will show a limited amount of statistics). Note that the authentication system may be disabled again, by setting an empty password using the command shown above. The Help center will show more details concerning the authentication system only if it is enabled

    -
    -
    - -
    -
    -

    Login / Logout

    -

    Using the Login / Logout function, a user can initiate / terminate a login session. The login page will also always be shown if a user tries to access a protected page directly without having a valid login session

    -
    -
    - -
    -
    -

    Donate

    - Keep in mind that Pi-hole is free. If you like Pi-hole, please consider a small donation to help support its development -
    -
    -
    -
    -

    Help (this page)

    - Shows information about what is happening behind the scenes and what can be done with this web user interface (web UI). The Help center will show details concerning the authentication system only if it is enabled -
    -
    -
    -
    -

    Footer

    - Shows the currently installed Pi-hole and Web Interface version. If an update is available, this will be indicated here -
    -
    - - diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index 9c0ae0849..3ed7f9017 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -668,14 +668,12 @@ function pidofFTL() Donate - - - class="active"> - - Help + +
  • + + Donate
  • - From 69971225191868e9821253ed4f8279624ee26bef Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 25 May 2020 16:55:43 +0300 Subject: [PATCH 218/298] Update daterangepicker to v3.1.0. Signed-off-by: XhmikosR --- scripts/vendor/daterangepicker.js | 43 ++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/scripts/vendor/daterangepicker.js b/scripts/vendor/daterangepicker.js index 6aac9665b..4048310c9 100644 --- a/scripts/vendor/daterangepicker.js +++ b/scripts/vendor/daterangepicker.js @@ -1,5 +1,5 @@ /** -* @version: 3.0.5 +* @version: 3.1 * @author: Dan Grossman http://www.dangrossman.info/ * @copyright: Copyright (c) 2012-2019 Dan Grossman. All rights reserved. * @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php @@ -11,7 +11,7 @@ // AMD. Make globaly available as well define(['moment', 'jquery'], function (moment, jquery) { if (!jquery.fn) jquery.fn = {}; // webpack server rendering - if (typeof moment !== 'function' && moment.default) moment = moment.default + if (typeof moment !== 'function' && moment.hasOwnProperty('default')) moment = moment['default'] return factory(moment, jquery); }); } else if (typeof module === 'object' && module.exports) { @@ -386,7 +386,7 @@ this.container.find('.drp-calendar.left').addClass('single'); this.container.find('.drp-calendar.left').show(); this.container.find('.drp-calendar.right').hide(); - if (!this.timePicker) { + if (!this.timePicker && this.autoApply) { this.container.addClass('auto-apply'); } } @@ -417,14 +417,14 @@ .on('mouseenter.daterangepicker', 'td.available', $.proxy(this.hoverDate, this)) .on('change.daterangepicker', 'select.yearselect', $.proxy(this.monthOrYearChanged, this)) .on('change.daterangepicker', 'select.monthselect', $.proxy(this.monthOrYearChanged, this)) - .on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.secondselect,select.ampmselect', $.proxy(this.timeChanged, this)) + .on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.secondselect,select.ampmselect', $.proxy(this.timeChanged, this)); this.container.find('.ranges') - .on('click.daterangepicker', 'li', $.proxy(this.clickRange, this)) + .on('click.daterangepicker', 'li', $.proxy(this.clickRange, this)); this.container.find('.drp-buttons') .on('click.daterangepicker', 'button.applyBtn', $.proxy(this.clickApply, this)) - .on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this)) + .on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this)); if (this.element.is('input') || this.element.is('button')) { this.element.on({ @@ -526,9 +526,9 @@ this.renderTimePicker('left'); this.renderTimePicker('right'); if (!this.endDate) { - this.container.find('.right .calendar-time select').attr('disabled', 'disabled').addClass('disabled'); + this.container.find('.right .calendar-time select').prop('disabled', true).addClass('disabled'); } else { - this.container.find('.right .calendar-time select').removeAttr('disabled').removeClass('disabled'); + this.container.find('.right .calendar-time select').prop('disabled', false).removeClass('disabled'); } } if (this.endDate) @@ -1014,16 +1014,18 @@ updateFormInputs: function() { if (this.singleDatePicker || (this.endDate && (this.startDate.isBefore(this.endDate) || this.startDate.isSame(this.endDate)))) { - this.container.find('button.applyBtn').removeAttr('disabled'); + this.container.find('button.applyBtn').prop('disabled', false); } else { - this.container.find('button.applyBtn').attr('disabled', 'disabled'); + this.container.find('button.applyBtn').prop('disabled', true); } }, move: function() { var parentOffset = { top: 0, left: 0 }, - containerTop; + containerTop, + drops = this.drops; + var parentRightEdge = $(window).width(); if (!this.parentEl.is('body')) { parentOffset = { @@ -1033,10 +1035,21 @@ parentRightEdge = this.parentEl[0].clientWidth + this.parentEl.offset().left; } - if (this.drops == 'up') + switch (drops) { + case 'auto': + containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top; + if (containerTop + this.container.outerHeight() >= this.parentEl[0].scrollHeight) { + containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top; + drops = 'up'; + } + break; + case 'up': containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top; - else + break; + default: containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top; + break; + } // Force the container to it's actual width this.container.css({ @@ -1046,7 +1059,7 @@ }); var containerWidth = this.container.outerWidth(); - this.container[this.drops == 'up' ? 'addClass' : 'removeClass']('drop-up'); + this.container.toggleClass('drop-up', drops == 'up'); if (this.opens == 'left') { var containerRight = parentRightEdge - this.element.offset().left - this.element.outerWidth(); @@ -1341,7 +1354,7 @@ if (this.singleDatePicker) { this.setEndDate(this.startDate); - if (!this.timePicker) + if (!this.timePicker && this.autoApply) this.clickApply(); } From 876e7d8bd9be27536a9dea073c76da94ecf8eb7b Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 25 May 2020 17:06:31 +0300 Subject: [PATCH 219/298] Use minified daterangepicker builds. The official distribution doesn't include minified files, so just minify the files ourselves. It's in maintenance mode anyway. Commands for future reference: * cleancss --compatibility ie9 -O1 specialComments:0 -o daterangepicker.min.css daterangepicker.css * terser daterangepicker.js --compress typeofs=false --mangle --source-map url=daterangepicker.min.js.map -o daterangepicker.min.js Signed-off-by: XhmikosR --- db_graph.php | 2 +- db_lists.php | 2 +- db_queries.php | 2 +- scripts/pi-hole/php/header.php | 2 +- scripts/vendor/daterangepicker.js | 1578 --------------------- scripts/vendor/daterangepicker.min.js | 9 + scripts/vendor/daterangepicker.min.js.map | 1 + style/vendor/daterangepicker.css | 410 ------ style/vendor/daterangepicker.min.css | 1 + 9 files changed, 15 insertions(+), 1992 deletions(-) delete mode 100644 scripts/vendor/daterangepicker.js create mode 100644 scripts/vendor/daterangepicker.min.js create mode 100644 scripts/vendor/daterangepicker.min.js.map delete mode 100644 style/vendor/daterangepicker.css create mode 100644 style/vendor/daterangepicker.min.css diff --git a/db_graph.php b/db_graph.php index 7f088bbac..1c18a8341 100644 --- a/db_graph.php +++ b/db_graph.php @@ -67,7 +67,7 @@ - + diff --git a/db_lists.php b/db_lists.php index e63d5ef8d..8a3158773 100644 --- a/db_lists.php +++ b/db_lists.php @@ -139,7 +139,7 @@ - + diff --git a/db_queries.php b/db_queries.php index 5f4e1196b..affc38050 100644 --- a/db_queries.php +++ b/db_queries.php @@ -160,7 +160,7 @@ - + - + diff --git a/scripts/vendor/daterangepicker.js b/scripts/vendor/daterangepicker.js deleted file mode 100644 index 4048310c9..000000000 --- a/scripts/vendor/daterangepicker.js +++ /dev/null @@ -1,1578 +0,0 @@ -/** -* @version: 3.1 -* @author: Dan Grossman http://www.dangrossman.info/ -* @copyright: Copyright (c) 2012-2019 Dan Grossman. All rights reserved. -* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php -* @website: http://www.daterangepicker.com/ -*/ -// Following the UMD template https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js -(function (root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Make globaly available as well - define(['moment', 'jquery'], function (moment, jquery) { - if (!jquery.fn) jquery.fn = {}; // webpack server rendering - if (typeof moment !== 'function' && moment.hasOwnProperty('default')) moment = moment['default'] - return factory(moment, jquery); - }); - } else if (typeof module === 'object' && module.exports) { - // Node / Browserify - //isomorphic issue - var jQuery = (typeof window != 'undefined') ? window.jQuery : undefined; - if (!jQuery) { - jQuery = require('jquery'); - if (!jQuery.fn) jQuery.fn = {}; - } - var moment = (typeof window != 'undefined' && typeof window.moment != 'undefined') ? window.moment : require('moment'); - module.exports = factory(moment, jQuery); - } else { - // Browser globals - root.daterangepicker = factory(root.moment, root.jQuery); - } -}(this, function(moment, $) { - var DateRangePicker = function(element, options, cb) { - - //default settings for options - this.parentEl = 'body'; - this.element = $(element); - this.startDate = moment().startOf('day'); - this.endDate = moment().endOf('day'); - this.minDate = false; - this.maxDate = false; - this.maxSpan = false; - this.autoApply = false; - this.singleDatePicker = false; - this.showDropdowns = false; - this.minYear = moment().subtract(100, 'year').format('YYYY'); - this.maxYear = moment().add(100, 'year').format('YYYY'); - this.showWeekNumbers = false; - this.showISOWeekNumbers = false; - this.showCustomRangeLabel = true; - this.timePicker = false; - this.timePicker24Hour = false; - this.timePickerIncrement = 1; - this.timePickerSeconds = false; - this.linkedCalendars = true; - this.autoUpdateInput = true; - this.alwaysShowCalendars = false; - this.ranges = {}; - - this.opens = 'right'; - if (this.element.hasClass('pull-right')) - this.opens = 'left'; - - this.drops = 'down'; - if (this.element.hasClass('dropup')) - this.drops = 'up'; - - this.buttonClasses = 'btn btn-sm'; - this.applyButtonClasses = 'btn-primary'; - this.cancelButtonClasses = 'btn-default'; - - this.locale = { - direction: 'ltr', - format: moment.localeData().longDateFormat('L'), - separator: ' - ', - applyLabel: 'Apply', - cancelLabel: 'Cancel', - weekLabel: 'W', - customRangeLabel: 'Custom Range', - daysOfWeek: moment.weekdaysMin(), - monthNames: moment.monthsShort(), - firstDay: moment.localeData().firstDayOfWeek() - }; - - this.callback = function() { }; - - //some state information - this.isShowing = false; - this.leftCalendar = {}; - this.rightCalendar = {}; - - //custom options from user - if (typeof options !== 'object' || options === null) - options = {}; - - //allow setting options with data attributes - //data-api options will be overwritten with custom javascript options - options = $.extend(this.element.data(), options); - - //html template for the picker UI - if (typeof options.template !== 'string' && !(options.template instanceof $)) - options.template = - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '' + - '' + - ' ' + - '
    ' + - '
    '; - - this.parentEl = (options.parentEl && $(options.parentEl).length) ? $(options.parentEl) : $(this.parentEl); - this.container = $(options.template).appendTo(this.parentEl); - - // - // handle all the possible options overriding defaults - // - - if (typeof options.locale === 'object') { - - if (typeof options.locale.direction === 'string') - this.locale.direction = options.locale.direction; - - if (typeof options.locale.format === 'string') - this.locale.format = options.locale.format; - - if (typeof options.locale.separator === 'string') - this.locale.separator = options.locale.separator; - - if (typeof options.locale.daysOfWeek === 'object') - this.locale.daysOfWeek = options.locale.daysOfWeek.slice(); - - if (typeof options.locale.monthNames === 'object') - this.locale.monthNames = options.locale.monthNames.slice(); - - if (typeof options.locale.firstDay === 'number') - this.locale.firstDay = options.locale.firstDay; - - if (typeof options.locale.applyLabel === 'string') - this.locale.applyLabel = options.locale.applyLabel; - - if (typeof options.locale.cancelLabel === 'string') - this.locale.cancelLabel = options.locale.cancelLabel; - - if (typeof options.locale.weekLabel === 'string') - this.locale.weekLabel = options.locale.weekLabel; - - if (typeof options.locale.customRangeLabel === 'string'){ - //Support unicode chars in the custom range name. - var elem = document.createElement('textarea'); - elem.innerHTML = options.locale.customRangeLabel; - var rangeHtml = elem.value; - this.locale.customRangeLabel = rangeHtml; - } - } - this.container.addClass(this.locale.direction); - - if (typeof options.startDate === 'string') - this.startDate = moment(options.startDate, this.locale.format); - - if (typeof options.endDate === 'string') - this.endDate = moment(options.endDate, this.locale.format); - - if (typeof options.minDate === 'string') - this.minDate = moment(options.minDate, this.locale.format); - - if (typeof options.maxDate === 'string') - this.maxDate = moment(options.maxDate, this.locale.format); - - if (typeof options.startDate === 'object') - this.startDate = moment(options.startDate); - - if (typeof options.endDate === 'object') - this.endDate = moment(options.endDate); - - if (typeof options.minDate === 'object') - this.minDate = moment(options.minDate); - - if (typeof options.maxDate === 'object') - this.maxDate = moment(options.maxDate); - - // sanity check for bad options - if (this.minDate && this.startDate.isBefore(this.minDate)) - this.startDate = this.minDate.clone(); - - // sanity check for bad options - if (this.maxDate && this.endDate.isAfter(this.maxDate)) - this.endDate = this.maxDate.clone(); - - if (typeof options.applyButtonClasses === 'string') - this.applyButtonClasses = options.applyButtonClasses; - - if (typeof options.applyClass === 'string') //backwards compat - this.applyButtonClasses = options.applyClass; - - if (typeof options.cancelButtonClasses === 'string') - this.cancelButtonClasses = options.cancelButtonClasses; - - if (typeof options.cancelClass === 'string') //backwards compat - this.cancelButtonClasses = options.cancelClass; - - if (typeof options.maxSpan === 'object') - this.maxSpan = options.maxSpan; - - if (typeof options.dateLimit === 'object') //backwards compat - this.maxSpan = options.dateLimit; - - if (typeof options.opens === 'string') - this.opens = options.opens; - - if (typeof options.drops === 'string') - this.drops = options.drops; - - if (typeof options.showWeekNumbers === 'boolean') - this.showWeekNumbers = options.showWeekNumbers; - - if (typeof options.showISOWeekNumbers === 'boolean') - this.showISOWeekNumbers = options.showISOWeekNumbers; - - if (typeof options.buttonClasses === 'string') - this.buttonClasses = options.buttonClasses; - - if (typeof options.buttonClasses === 'object') - this.buttonClasses = options.buttonClasses.join(' '); - - if (typeof options.showDropdowns === 'boolean') - this.showDropdowns = options.showDropdowns; - - if (typeof options.minYear === 'number') - this.minYear = options.minYear; - - if (typeof options.maxYear === 'number') - this.maxYear = options.maxYear; - - if (typeof options.showCustomRangeLabel === 'boolean') - this.showCustomRangeLabel = options.showCustomRangeLabel; - - if (typeof options.singleDatePicker === 'boolean') { - this.singleDatePicker = options.singleDatePicker; - if (this.singleDatePicker) - this.endDate = this.startDate.clone(); - } - - if (typeof options.timePicker === 'boolean') - this.timePicker = options.timePicker; - - if (typeof options.timePickerSeconds === 'boolean') - this.timePickerSeconds = options.timePickerSeconds; - - if (typeof options.timePickerIncrement === 'number') - this.timePickerIncrement = options.timePickerIncrement; - - if (typeof options.timePicker24Hour === 'boolean') - this.timePicker24Hour = options.timePicker24Hour; - - if (typeof options.autoApply === 'boolean') - this.autoApply = options.autoApply; - - if (typeof options.autoUpdateInput === 'boolean') - this.autoUpdateInput = options.autoUpdateInput; - - if (typeof options.linkedCalendars === 'boolean') - this.linkedCalendars = options.linkedCalendars; - - if (typeof options.isInvalidDate === 'function') - this.isInvalidDate = options.isInvalidDate; - - if (typeof options.isCustomDate === 'function') - this.isCustomDate = options.isCustomDate; - - if (typeof options.alwaysShowCalendars === 'boolean') - this.alwaysShowCalendars = options.alwaysShowCalendars; - - // update day names order to firstDay - if (this.locale.firstDay != 0) { - var iterator = this.locale.firstDay; - while (iterator > 0) { - this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()); - iterator--; - } - } - - var start, end, range; - - //if no start/end dates set, check if an input element contains initial values - if (typeof options.startDate === 'undefined' && typeof options.endDate === 'undefined') { - if ($(this.element).is(':text')) { - var val = $(this.element).val(), - split = val.split(this.locale.separator); - - start = end = null; - - if (split.length == 2) { - start = moment(split[0], this.locale.format); - end = moment(split[1], this.locale.format); - } else if (this.singleDatePicker && val !== "") { - start = moment(val, this.locale.format); - end = moment(val, this.locale.format); - } - if (start !== null && end !== null) { - this.setStartDate(start); - this.setEndDate(end); - } - } - } - - if (typeof options.ranges === 'object') { - for (range in options.ranges) { - - if (typeof options.ranges[range][0] === 'string') - start = moment(options.ranges[range][0], this.locale.format); - else - start = moment(options.ranges[range][0]); - - if (typeof options.ranges[range][1] === 'string') - end = moment(options.ranges[range][1], this.locale.format); - else - end = moment(options.ranges[range][1]); - - // If the start or end date exceed those allowed by the minDate or maxSpan - // options, shorten the range to the allowable period. - if (this.minDate && start.isBefore(this.minDate)) - start = this.minDate.clone(); - - var maxDate = this.maxDate; - if (this.maxSpan && maxDate && start.clone().add(this.maxSpan).isAfter(maxDate)) - maxDate = start.clone().add(this.maxSpan); - if (maxDate && end.isAfter(maxDate)) - end = maxDate.clone(); - - // If the end of the range is before the minimum or the start of the range is - // after the maximum, don't display this range option at all. - if ((this.minDate && end.isBefore(this.minDate, this.timepicker ? 'minute' : 'day')) - || (maxDate && start.isAfter(maxDate, this.timepicker ? 'minute' : 'day'))) - continue; - - //Support unicode chars in the range names. - var elem = document.createElement('textarea'); - elem.innerHTML = range; - var rangeHtml = elem.value; - - this.ranges[rangeHtml] = [start, end]; - } - - var list = '
      '; - for (range in this.ranges) { - list += '
    • ' + range + '
    • '; - } - if (this.showCustomRangeLabel) { - list += '
    • ' + this.locale.customRangeLabel + '
    • '; - } - list += '
    '; - this.container.find('.ranges').prepend(list); - } - - if (typeof cb === 'function') { - this.callback = cb; - } - - if (!this.timePicker) { - this.startDate = this.startDate.startOf('day'); - this.endDate = this.endDate.endOf('day'); - this.container.find('.calendar-time').hide(); - } - - //can't be used together for now - if (this.timePicker && this.autoApply) - this.autoApply = false; - - if (this.autoApply) { - this.container.addClass('auto-apply'); - } - - if (typeof options.ranges === 'object') - this.container.addClass('show-ranges'); - - if (this.singleDatePicker) { - this.container.addClass('single'); - this.container.find('.drp-calendar.left').addClass('single'); - this.container.find('.drp-calendar.left').show(); - this.container.find('.drp-calendar.right').hide(); - if (!this.timePicker && this.autoApply) { - this.container.addClass('auto-apply'); - } - } - - if ((typeof options.ranges === 'undefined' && !this.singleDatePicker) || this.alwaysShowCalendars) { - this.container.addClass('show-calendar'); - } - - this.container.addClass('opens' + this.opens); - - //apply CSS classes and labels to buttons - this.container.find('.applyBtn, .cancelBtn').addClass(this.buttonClasses); - if (this.applyButtonClasses.length) - this.container.find('.applyBtn').addClass(this.applyButtonClasses); - if (this.cancelButtonClasses.length) - this.container.find('.cancelBtn').addClass(this.cancelButtonClasses); - this.container.find('.applyBtn').html(this.locale.applyLabel); - this.container.find('.cancelBtn').html(this.locale.cancelLabel); - - // - // event listeners - // - - this.container.find('.drp-calendar') - .on('click.daterangepicker', '.prev', $.proxy(this.clickPrev, this)) - .on('click.daterangepicker', '.next', $.proxy(this.clickNext, this)) - .on('mousedown.daterangepicker', 'td.available', $.proxy(this.clickDate, this)) - .on('mouseenter.daterangepicker', 'td.available', $.proxy(this.hoverDate, this)) - .on('change.daterangepicker', 'select.yearselect', $.proxy(this.monthOrYearChanged, this)) - .on('change.daterangepicker', 'select.monthselect', $.proxy(this.monthOrYearChanged, this)) - .on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.secondselect,select.ampmselect', $.proxy(this.timeChanged, this)); - - this.container.find('.ranges') - .on('click.daterangepicker', 'li', $.proxy(this.clickRange, this)); - - this.container.find('.drp-buttons') - .on('click.daterangepicker', 'button.applyBtn', $.proxy(this.clickApply, this)) - .on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this)); - - if (this.element.is('input') || this.element.is('button')) { - this.element.on({ - 'click.daterangepicker': $.proxy(this.show, this), - 'focus.daterangepicker': $.proxy(this.show, this), - 'keyup.daterangepicker': $.proxy(this.elementChanged, this), - 'keydown.daterangepicker': $.proxy(this.keydown, this) //IE 11 compatibility - }); - } else { - this.element.on('click.daterangepicker', $.proxy(this.toggle, this)); - this.element.on('keydown.daterangepicker', $.proxy(this.toggle, this)); - } - - // - // if attached to a text input, set the initial value - // - - this.updateElement(); - - }; - - DateRangePicker.prototype = { - - constructor: DateRangePicker, - - setStartDate: function(startDate) { - if (typeof startDate === 'string') - this.startDate = moment(startDate, this.locale.format); - - if (typeof startDate === 'object') - this.startDate = moment(startDate); - - if (!this.timePicker) - this.startDate = this.startDate.startOf('day'); - - if (this.timePicker && this.timePickerIncrement) - this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); - - if (this.minDate && this.startDate.isBefore(this.minDate)) { - this.startDate = this.minDate.clone(); - if (this.timePicker && this.timePickerIncrement) - this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); - } - - if (this.maxDate && this.startDate.isAfter(this.maxDate)) { - this.startDate = this.maxDate.clone(); - if (this.timePicker && this.timePickerIncrement) - this.startDate.minute(Math.floor(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); - } - - if (!this.isShowing) - this.updateElement(); - - this.updateMonthsInView(); - }, - - setEndDate: function(endDate) { - if (typeof endDate === 'string') - this.endDate = moment(endDate, this.locale.format); - - if (typeof endDate === 'object') - this.endDate = moment(endDate); - - if (!this.timePicker) - this.endDate = this.endDate.endOf('day'); - - if (this.timePicker && this.timePickerIncrement) - this.endDate.minute(Math.round(this.endDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); - - if (this.endDate.isBefore(this.startDate)) - this.endDate = this.startDate.clone(); - - if (this.maxDate && this.endDate.isAfter(this.maxDate)) - this.endDate = this.maxDate.clone(); - - if (this.maxSpan && this.startDate.clone().add(this.maxSpan).isBefore(this.endDate)) - this.endDate = this.startDate.clone().add(this.maxSpan); - - this.previousRightTime = this.endDate.clone(); - - this.container.find('.drp-selected').html(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format)); - - if (!this.isShowing) - this.updateElement(); - - this.updateMonthsInView(); - }, - - isInvalidDate: function() { - return false; - }, - - isCustomDate: function() { - return false; - }, - - updateView: function() { - if (this.timePicker) { - this.renderTimePicker('left'); - this.renderTimePicker('right'); - if (!this.endDate) { - this.container.find('.right .calendar-time select').prop('disabled', true).addClass('disabled'); - } else { - this.container.find('.right .calendar-time select').prop('disabled', false).removeClass('disabled'); - } - } - if (this.endDate) - this.container.find('.drp-selected').html(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format)); - this.updateMonthsInView(); - this.updateCalendars(); - this.updateFormInputs(); - }, - - updateMonthsInView: function() { - if (this.endDate) { - - //if both dates are visible already, do nothing - if (!this.singleDatePicker && this.leftCalendar.month && this.rightCalendar.month && - (this.startDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.startDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM')) - && - (this.endDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.endDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM')) - ) { - return; - } - - this.leftCalendar.month = this.startDate.clone().date(2); - if (!this.linkedCalendars && (this.endDate.month() != this.startDate.month() || this.endDate.year() != this.startDate.year())) { - this.rightCalendar.month = this.endDate.clone().date(2); - } else { - this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month'); - } - - } else { - if (this.leftCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM') && this.rightCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM')) { - this.leftCalendar.month = this.startDate.clone().date(2); - this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month'); - } - } - if (this.maxDate && this.linkedCalendars && !this.singleDatePicker && this.rightCalendar.month > this.maxDate) { - this.rightCalendar.month = this.maxDate.clone().date(2); - this.leftCalendar.month = this.maxDate.clone().date(2).subtract(1, 'month'); - } - }, - - updateCalendars: function() { - - if (this.timePicker) { - var hour, minute, second; - if (this.endDate) { - hour = parseInt(this.container.find('.left .hourselect').val(), 10); - minute = parseInt(this.container.find('.left .minuteselect').val(), 10); - if (isNaN(minute)) { - minute = parseInt(this.container.find('.left .minuteselect option:last').val(), 10); - } - second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0; - if (!this.timePicker24Hour) { - var ampm = this.container.find('.left .ampmselect').val(); - if (ampm === 'PM' && hour < 12) - hour += 12; - if (ampm === 'AM' && hour === 12) - hour = 0; - } - } else { - hour = parseInt(this.container.find('.right .hourselect').val(), 10); - minute = parseInt(this.container.find('.right .minuteselect').val(), 10); - if (isNaN(minute)) { - minute = parseInt(this.container.find('.right .minuteselect option:last').val(), 10); - } - second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0; - if (!this.timePicker24Hour) { - var ampm = this.container.find('.right .ampmselect').val(); - if (ampm === 'PM' && hour < 12) - hour += 12; - if (ampm === 'AM' && hour === 12) - hour = 0; - } - } - this.leftCalendar.month.hour(hour).minute(minute).second(second); - this.rightCalendar.month.hour(hour).minute(minute).second(second); - } - - this.renderCalendar('left'); - this.renderCalendar('right'); - - //highlight any predefined range matching the current start and end dates - this.container.find('.ranges li').removeClass('active'); - if (this.endDate == null) return; - - this.calculateChosenLabel(); - }, - - renderCalendar: function(side) { - - // - // Build the matrix of dates that will populate the calendar - // - - var calendar = side == 'left' ? this.leftCalendar : this.rightCalendar; - var month = calendar.month.month(); - var year = calendar.month.year(); - var hour = calendar.month.hour(); - var minute = calendar.month.minute(); - var second = calendar.month.second(); - var daysInMonth = moment([year, month]).daysInMonth(); - var firstDay = moment([year, month, 1]); - var lastDay = moment([year, month, daysInMonth]); - var lastMonth = moment(firstDay).subtract(1, 'month').month(); - var lastYear = moment(firstDay).subtract(1, 'month').year(); - var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth(); - var dayOfWeek = firstDay.day(); - - //initialize a 6 rows x 7 columns array for the calendar - var calendar = []; - calendar.firstDay = firstDay; - calendar.lastDay = lastDay; - - for (var i = 0; i < 6; i++) { - calendar[i] = []; - } - - //populate the calendar with date objects - var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1; - if (startDay > daysInLastMonth) - startDay -= 7; - - if (dayOfWeek == this.locale.firstDay) - startDay = daysInLastMonth - 6; - - var curDate = moment([lastYear, lastMonth, startDay, 12, minute, second]); - - var col, row; - for (var i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add(24, 'hour')) { - if (i > 0 && col % 7 === 0) { - col = 0; - row++; - } - calendar[row][col] = curDate.clone().hour(hour).minute(minute).second(second); - curDate.hour(12); - - if (this.minDate && calendar[row][col].format('YYYY-MM-DD') == this.minDate.format('YYYY-MM-DD') && calendar[row][col].isBefore(this.minDate) && side == 'left') { - calendar[row][col] = this.minDate.clone(); - } - - if (this.maxDate && calendar[row][col].format('YYYY-MM-DD') == this.maxDate.format('YYYY-MM-DD') && calendar[row][col].isAfter(this.maxDate) && side == 'right') { - calendar[row][col] = this.maxDate.clone(); - } - - } - - //make the calendar object available to hoverDate/clickDate - if (side == 'left') { - this.leftCalendar.calendar = calendar; - } else { - this.rightCalendar.calendar = calendar; - } - - // - // Display the calendar - // - - var minDate = side == 'left' ? this.minDate : this.startDate; - var maxDate = this.maxDate; - var selected = side == 'left' ? this.startDate : this.endDate; - var arrow = this.locale.direction == 'ltr' ? {left: 'chevron-left', right: 'chevron-right'} : {left: 'chevron-right', right: 'chevron-left'}; - - var html = '
    MAC addressIP addressHostname
    MAC addressIP addressHostname
    " + @@ -57,7 +44,7 @@ function updateTopLists() { if (Object.prototype.hasOwnProperty.call(data.top_ads, domain)) { var input = domain.split(" "); // Sanitize domain - var printdomain = escapeHtml(input[0]); + var printdomain = utils.escapeHtml(input[0]); if (input.length > 1) { url = '": ">", - '"': """, - "'": "'" - }; - - return text.replace(/[&<>"']/g, function (m) { - return map[m]; - }); -} - function updateTopClientsChart() { $("#client-frequency .overlay").show(); $.getJSON("api_db.php?topClients&from=" + from + "&until=" + until, function (data) { @@ -84,10 +69,10 @@ function updateTopClientsChart() { for (client in data.top_sources) { if (Object.prototype.hasOwnProperty.call(data.top_sources, client)) { // Sanitize client - client = escapeHtml(client); - if (escapeHtml(client) !== client) { + client = utils.escapeHtml(client); + if (utils.escapeHtml(client) !== client) { // Make a copy with the escaped index if necessary - data.top_sources[escapeHtml(client)] = data.top_sources[client]; + data.top_sources[utils.escapeHtml(client)] = data.top_sources[client]; } if (client.indexOf("|") !== -1) { @@ -138,10 +123,10 @@ function updateTopDomainsChart() { for (domain in data.top_domains) { if (Object.prototype.hasOwnProperty.call(data.top_domains, domain)) { // Sanitize domain - domain = escapeHtml(domain); - if (escapeHtml(domain) !== domain) { + domain = utils.escapeHtml(domain); + if (utils.escapeHtml(domain) !== domain) { // Make a copy with the escaped index if necessary - data.top_domains[escapeHtml(domain)] = data.top_domains[domain]; + data.top_domains[utils.escapeHtml(domain)] = data.top_domains[domain]; } percentage = (data.top_domains[domain] / sum) * 100; @@ -185,10 +170,10 @@ function updateTopAdsChart() { for (ad in data.top_ads) { if (Object.prototype.hasOwnProperty.call(data.top_ads, ad)) { // Sanitize ad - ad = escapeHtml(ad); - if (escapeHtml(ad) !== ad) { + ad = utils.escapeHtml(ad); + if (utils.escapeHtml(ad) !== ad) { // Make a copy with the escaped index if necessary - data.top_ads[escapeHtml(ad)] = data.top_ads[ad]; + data.top_ads[utils.escapeHtml(ad)] = data.top_ads[ad]; } percentage = (data.top_ads[ad] / sum) * 100; diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index f2a51c833..75d01dc40 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -5,8 +5,9 @@ * This file is copyright under the latest version of the EUPL. * Please see LICENSE file for your rights under this license. */ +/* global utils:false, Chart:false, updateSessionTimer:false */ + // Define global variables -/* global Chart:false, updateSessionTimer:false */ var timeLineChart, clientsChart; var queryTypePieChart, forwardDestinationPieChart; @@ -528,21 +529,6 @@ function updateForwardDestinationsPie() { }); } -// Credit: http://stackoverflow.com/questions/1787322/htmlspecialchars-equivalent-in-javascript/4835406#4835406 -function escapeHtml(text) { - var map = { - "&": "&", - "<": "<", - ">": ">", - '"': """, - "'": "'" - }; - - return text.replace(/[&<>"']/g, function (m) { - return map[m]; - }); -} - function updateTopClientsChart() { $.getJSON("api.php?summaryRaw&getQuerySources&topClientsBlocked", function (data) { if ("FTLnotrunning" in data) { @@ -556,12 +542,12 @@ function updateTopClientsChart() { for (client in data.top_sources) { if (Object.prototype.hasOwnProperty.call(data.top_sources, client)) { // Sanitize client - if (escapeHtml(client) !== client) { + if (utils.escapeHtml(client) !== client) { // Make a copy with the escaped index if necessary - data.top_sources[escapeHtml(client)] = data.top_sources[client]; + data.top_sources[utils.escapeHtml(client)] = data.top_sources[client]; } - client = escapeHtml(client); + client = utils.escapeHtml(client); if (client.indexOf("|") !== -1) { idx = client.indexOf("|"); clientname = client.substr(0, idx); @@ -602,12 +588,12 @@ function updateTopClientsChart() { for (client in data.top_sources_blocked) { if (Object.prototype.hasOwnProperty.call(data.top_sources_blocked, client)) { // Sanitize client - if (escapeHtml(client) !== client) { + if (utils.escapeHtml(client) !== client) { // Make a copy with the escaped index if necessary - data.top_sources_blocked[escapeHtml(client)] = data.top_sources_blocked[client]; + data.top_sources_blocked[utils.escapeHtml(client)] = data.top_sources_blocked[client]; } - client = escapeHtml(client); + client = utils.escapeHtml(client); if (client.indexOf("|") !== -1) { idx = client.indexOf("|"); clientname = client.substr(0, idx); @@ -674,12 +660,12 @@ function updateTopLists() { for (domain in data.top_queries) { if (Object.prototype.hasOwnProperty.call(data.top_queries, domain)) { // Sanitize domain - if (escapeHtml(domain) !== domain) { + if (utils.escapeHtml(domain) !== domain) { // Make a copy with the escaped index if necessary - data.top_queries[escapeHtml(domain)] = data.top_queries[domain]; + data.top_queries[utils.escapeHtml(domain)] = data.top_queries[domain]; } - domain = escapeHtml(domain); + domain = utils.escapeHtml(domain); urlText = domain === "" ? "." : domain; url = '' + urlText + ""; percentage = (data.top_queries[domain] / data.dns_queries_today) * 100; @@ -707,12 +693,12 @@ function updateTopLists() { for (domain in data.top_ads) { if (Object.prototype.hasOwnProperty.call(data.top_ads, domain)) { // Sanitize domain - if (escapeHtml(domain) !== domain) { + if (utils.escapeHtml(domain) !== domain) { // Make a copy with the escaped index if necessary - data.top_ads[escapeHtml(domain)] = data.top_ads[domain]; + data.top_ads[utils.escapeHtml(domain)] = data.top_ads[domain]; } - domain = escapeHtml(domain); + domain = utils.escapeHtml(domain); urlText = domain === "" ? "." : domain; url = '' + urlText + ""; percentage = (data.top_ads[domain] / data.ads_blocked_today) * 100; diff --git a/scripts/pi-hole/js/utils.js b/scripts/pi-hole/js/utils.js index 5d09cee5d..810ab5df2 100644 --- a/scripts/pi-hole/js/utils.js +++ b/scripts/pi-hole/js/utils.js @@ -7,6 +7,21 @@ /* global moment:false */ +// Credit: https://stackoverflow.com/questions/1787322/htmlspecialchars-equivalent-in-javascript/4835406#4835406 +function escapeHtml(text) { + var map = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" + }; + + return text.replace(/[&<>"']/g, function (m) { + return map[m]; + }); +} + var info = null; function showAlert(type, icon, title, message) { var opts = {}; @@ -172,6 +187,7 @@ function stateLoadCallback(itemName) { window.utils = (function () { return { + escapeHtml: escapeHtml, showAlert: showAlert, datetime: datetime, disableAll: disableAll, From 469d4912606a995fb027bcf04bf42ce9b7d1b68e Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 26 May 2020 13:19:37 +0300 Subject: [PATCH 200/298] Move JS files where they are used. Signed-off-by: XhmikosR --- groups-adlists.php | 2 ++ groups-clients.php | 2 ++ groups-domains.php | 2 ++ groups.php | 2 ++ scripts/pi-hole/php/header.php | 12 +++--------- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/groups-adlists.php b/groups-adlists.php index ae5c98edd..e43f76a3c 100644 --- a/groups-adlists.php +++ b/groups-adlists.php @@ -73,6 +73,8 @@ + + diff --git a/groups-clients.php b/groups-clients.php index e982fea01..e7c6bea6b 100644 --- a/groups-clients.php +++ b/groups-clients.php @@ -74,6 +74,8 @@ + + diff --git a/groups-domains.php b/groups-domains.php index a1afd314b..3d23b7235 100644 --- a/groups-domains.php +++ b/groups-domains.php @@ -139,6 +139,8 @@ + + diff --git a/groups.php b/groups.php index e7680cfa4..3ced6a871 100644 --- a/groups.php +++ b/groups.php @@ -71,6 +71,8 @@ + + diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index a76602ddc..02f1ed45a 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -208,7 +208,7 @@ function pidofFTL() - + @@ -222,12 +222,6 @@ function pidofFTL() - - - - - - @@ -499,7 +493,7 @@ function pidofFTL() -
  • active"> +
  • active"> Group Management @@ -575,7 +569,7 @@ function pidofFTL()
  • -
  • active"> +
  • active"> Tools From 2464ffe71f197adb006072a1483d36b3983349de Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 27 May 2020 18:18:30 +0300 Subject: [PATCH 201/298] network.php: move the scripts above footer Signed-off-by: XhmikosR --- network.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/network.php b/network.php index 7ce7635fc..8eb4c6d15 100644 --- a/network.php +++ b/network.php @@ -73,10 +73,10 @@ - - + + From c108f7eef0bcbd74f6805e4483fa78ccd8748aa0 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 17 May 2020 10:50:28 +0300 Subject: [PATCH 202/298] Remove duplicate token `div` This is already added in header.php Signed-off-by: XhmikosR --- auditlog.php | 3 +-- db_graph.php | 9 --------- db_lists.php | 10 +--------- db_queries.php | 9 --------- network.php | 9 +-------- queries.php | 8 -------- 6 files changed, 3 insertions(+), 45 deletions(-) diff --git a/auditlog.php b/auditlog.php index 069c3ac5c..0cc746cc0 100644 --- a/auditlog.php +++ b/auditlog.php @@ -7,8 +7,7 @@ * Please see LICENSE file for your rights under this license. */ require "scripts/pi-hole/php/header.php"; ?> - - +
  •  
    '; - html += ''; - html += ''; - - // add empty cell for week number - if (this.showWeekNumbers || this.showISOWeekNumbers) - html += ''; - - if ((!minDate || minDate.isBefore(calendar.firstDay)) && (!this.linkedCalendars || side == 'left')) { - html += ''; - } else { - html += ''; - } - - var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(" YYYY"); - - if (this.showDropdowns) { - var currentMonth = calendar[1][1].month(); - var currentYear = calendar[1][1].year(); - var maxYear = (maxDate && maxDate.year()) || (this.maxYear); - var minYear = (minDate && minDate.year()) || (this.minYear); - var inMinYear = currentYear == minYear; - var inMaxYear = currentYear == maxYear; - - var monthHtml = '"; - - var yearHtml = ''; - - dateHtml = monthHtml + yearHtml; - } - - html += ''; - if ((!maxDate || maxDate.isAfter(calendar.lastDay)) && (!this.linkedCalendars || side == 'right' || this.singleDatePicker)) { - html += ''; - } else { - html += ''; - } - - html += ''; - html += ''; - - // add week number label - if (this.showWeekNumbers || this.showISOWeekNumbers) - html += ''; - - $.each(this.locale.daysOfWeek, function(index, dayOfWeek) { - html += ''; - }); - - html += ''; - html += ''; - html += ''; - - //adjust maxDate to reflect the maxSpan setting in order to - //grey out end dates beyond the maxSpan - if (this.endDate == null && this.maxSpan) { - var maxLimit = this.startDate.clone().add(this.maxSpan).endOf('day'); - if (!maxDate || maxLimit.isBefore(maxDate)) { - maxDate = maxLimit; - } - } - - for (var row = 0; row < 6; row++) { - html += ''; - - // add week number - if (this.showWeekNumbers) - html += ''; - else if (this.showISOWeekNumbers) - html += ''; - - for (var col = 0; col < 7; col++) { - - var classes = []; - - //highlight today's date - if (calendar[row][col].isSame(new Date(), "day")) - classes.push('today'); - - //highlight weekends - if (calendar[row][col].isoWeekday() > 5) - classes.push('weekend'); - - //grey out the dates in other months displayed at beginning and end of this calendar - if (calendar[row][col].month() != calendar[1][1].month()) - classes.push('off', 'ends'); - - //don't allow selection of dates before the minimum date - if (this.minDate && calendar[row][col].isBefore(this.minDate, 'day')) - classes.push('off', 'disabled'); - - //don't allow selection of dates after the maximum date - if (maxDate && calendar[row][col].isAfter(maxDate, 'day')) - classes.push('off', 'disabled'); - - //don't allow selection of date if a custom function decides it's invalid - if (this.isInvalidDate(calendar[row][col])) - classes.push('off', 'disabled'); - - //highlight the currently selected start date - if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD')) - classes.push('active', 'start-date'); - - //highlight the currently selected end date - if (this.endDate != null && calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD')) - classes.push('active', 'end-date'); - - //highlight dates in-between the selected dates - if (this.endDate != null && calendar[row][col] > this.startDate && calendar[row][col] < this.endDate) - classes.push('in-range'); - - //apply custom classes for this date - var isCustom = this.isCustomDate(calendar[row][col]); - if (isCustom !== false) { - if (typeof isCustom === 'string') - classes.push(isCustom); - else - Array.prototype.push.apply(classes, isCustom); - } - - var cname = '', disabled = false; - for (var i = 0; i < classes.length; i++) { - cname += classes[i] + ' '; - if (classes[i] == 'disabled') - disabled = true; - } - if (!disabled) - cname += 'available'; - - html += ''; - - } - html += ''; - } - - html += ''; - html += '
    ' + dateHtml + '
    ' + this.locale.weekLabel + '' + dayOfWeek + '
    ' + calendar[row][0].week() + '' + calendar[row][0].isoWeek() + '' + calendar[row][col].date() + '
    '; - - this.container.find('.drp-calendar.' + side + ' .calendar-table').html(html); - - }, - - renderTimePicker: function(side) { - - // Don't bother updating the time picker if it's currently disabled - // because an end date hasn't been clicked yet - if (side == 'right' && !this.endDate) return; - - var html, selected, minDate, maxDate = this.maxDate; - - if (this.maxSpan && (!this.maxDate || this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate))) - maxDate = this.startDate.clone().add(this.maxSpan); - - if (side == 'left') { - selected = this.startDate.clone(); - minDate = this.minDate; - } else if (side == 'right') { - selected = this.endDate.clone(); - minDate = this.startDate; - - //Preserve the time already selected - var timeSelector = this.container.find('.drp-calendar.right .calendar-time'); - if (timeSelector.html() != '') { - - selected.hour(!isNaN(selected.hour()) ? selected.hour() : timeSelector.find('.hourselect option:selected').val()); - selected.minute(!isNaN(selected.minute()) ? selected.minute() : timeSelector.find('.minuteselect option:selected').val()); - selected.second(!isNaN(selected.second()) ? selected.second() : timeSelector.find('.secondselect option:selected').val()); - - if (!this.timePicker24Hour) { - var ampm = timeSelector.find('.ampmselect option:selected').val(); - if (ampm === 'PM' && selected.hour() < 12) - selected.hour(selected.hour() + 12); - if (ampm === 'AM' && selected.hour() === 12) - selected.hour(0); - } - - } - - if (selected.isBefore(this.startDate)) - selected = this.startDate.clone(); - - if (maxDate && selected.isAfter(maxDate)) - selected = maxDate.clone(); - - } - - // - // hours - // - - html = ' '; - - // - // minutes - // - - html += ': '; - - // - // seconds - // - - if (this.timePickerSeconds) { - html += ': '; - } - - // - // AM/PM - // - - if (!this.timePicker24Hour) { - html += ''; - } - - this.container.find('.drp-calendar.' + side + ' .calendar-time').html(html); - - }, - - updateFormInputs: function() { - - if (this.singleDatePicker || (this.endDate && (this.startDate.isBefore(this.endDate) || this.startDate.isSame(this.endDate)))) { - this.container.find('button.applyBtn').prop('disabled', false); - } else { - this.container.find('button.applyBtn').prop('disabled', true); - } - - }, - - move: function() { - var parentOffset = { top: 0, left: 0 }, - containerTop, - drops = this.drops; - - var parentRightEdge = $(window).width(); - if (!this.parentEl.is('body')) { - parentOffset = { - top: this.parentEl.offset().top - this.parentEl.scrollTop(), - left: this.parentEl.offset().left - this.parentEl.scrollLeft() - }; - parentRightEdge = this.parentEl[0].clientWidth + this.parentEl.offset().left; - } - - switch (drops) { - case 'auto': - containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top; - if (containerTop + this.container.outerHeight() >= this.parentEl[0].scrollHeight) { - containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top; - drops = 'up'; - } - break; - case 'up': - containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top; - break; - default: - containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top; - break; - } - - // Force the container to it's actual width - this.container.css({ - top: 0, - left: 0, - right: 'auto' - }); - var containerWidth = this.container.outerWidth(); - - this.container.toggleClass('drop-up', drops == 'up'); - - if (this.opens == 'left') { - var containerRight = parentRightEdge - this.element.offset().left - this.element.outerWidth(); - if (containerWidth + containerRight > $(window).width()) { - this.container.css({ - top: containerTop, - right: 'auto', - left: 9 - }); - } else { - this.container.css({ - top: containerTop, - right: containerRight, - left: 'auto' - }); - } - } else if (this.opens == 'center') { - var containerLeft = this.element.offset().left - parentOffset.left + this.element.outerWidth() / 2 - - containerWidth / 2; - if (containerLeft < 0) { - this.container.css({ - top: containerTop, - right: 'auto', - left: 9 - }); - } else if (containerLeft + containerWidth > $(window).width()) { - this.container.css({ - top: containerTop, - left: 'auto', - right: 0 - }); - } else { - this.container.css({ - top: containerTop, - left: containerLeft, - right: 'auto' - }); - } - } else { - var containerLeft = this.element.offset().left - parentOffset.left; - if (containerLeft + containerWidth > $(window).width()) { - this.container.css({ - top: containerTop, - left: 'auto', - right: 0 - }); - } else { - this.container.css({ - top: containerTop, - left: containerLeft, - right: 'auto' - }); - } - } - }, - - show: function(e) { - if (this.isShowing) return; - - // Create a click proxy that is private to this instance of datepicker, for unbinding - this._outsideClickProxy = $.proxy(function(e) { this.outsideClick(e); }, this); - - // Bind global datepicker mousedown for hiding and - $(document) - .on('mousedown.daterangepicker', this._outsideClickProxy) - // also support mobile devices - .on('touchend.daterangepicker', this._outsideClickProxy) - // also explicitly play nice with Bootstrap dropdowns, which stopPropagation when clicking them - .on('click.daterangepicker', '[data-toggle=dropdown]', this._outsideClickProxy) - // and also close when focus changes to outside the picker (eg. tabbing between controls) - .on('focusin.daterangepicker', this._outsideClickProxy); - - // Reposition the picker if the window is resized while it's open - $(window).on('resize.daterangepicker', $.proxy(function(e) { this.move(e); }, this)); - - this.oldStartDate = this.startDate.clone(); - this.oldEndDate = this.endDate.clone(); - this.previousRightTime = this.endDate.clone(); - - this.updateView(); - this.container.show(); - this.move(); - this.element.trigger('show.daterangepicker', this); - this.isShowing = true; - }, - - hide: function(e) { - if (!this.isShowing) return; - - //incomplete date selection, revert to last values - if (!this.endDate) { - this.startDate = this.oldStartDate.clone(); - this.endDate = this.oldEndDate.clone(); - } - - //if a new date range was selected, invoke the user callback function - if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate)) - this.callback(this.startDate.clone(), this.endDate.clone(), this.chosenLabel); - - //if picker is attached to a text input, update it - this.updateElement(); - - $(document).off('.daterangepicker'); - $(window).off('.daterangepicker'); - this.container.hide(); - this.element.trigger('hide.daterangepicker', this); - this.isShowing = false; - }, - - toggle: function(e) { - if (this.isShowing) { - this.hide(); - } else { - this.show(); - } - }, - - outsideClick: function(e) { - var target = $(e.target); - // if the page is clicked anywhere except within the daterangerpicker/button - // itself then call this.hide() - if ( - // ie modal dialog fix - e.type == "focusin" || - target.closest(this.element).length || - target.closest(this.container).length || - target.closest('.calendar-table').length - ) return; - this.hide(); - this.element.trigger('outsideClick.daterangepicker', this); - }, - - showCalendars: function() { - this.container.addClass('show-calendar'); - this.move(); - this.element.trigger('showCalendar.daterangepicker', this); - }, - - hideCalendars: function() { - this.container.removeClass('show-calendar'); - this.element.trigger('hideCalendar.daterangepicker', this); - }, - - clickRange: function(e) { - var label = e.target.getAttribute('data-range-key'); - this.chosenLabel = label; - if (label == this.locale.customRangeLabel) { - this.showCalendars(); - } else { - var dates = this.ranges[label]; - this.startDate = dates[0]; - this.endDate = dates[1]; - - if (!this.timePicker) { - this.startDate.startOf('day'); - this.endDate.endOf('day'); - } - - if (!this.alwaysShowCalendars) - this.hideCalendars(); - this.clickApply(); - } - }, - - clickPrev: function(e) { - var cal = $(e.target).parents('.drp-calendar'); - if (cal.hasClass('left')) { - this.leftCalendar.month.subtract(1, 'month'); - if (this.linkedCalendars) - this.rightCalendar.month.subtract(1, 'month'); - } else { - this.rightCalendar.month.subtract(1, 'month'); - } - this.updateCalendars(); - }, - - clickNext: function(e) { - var cal = $(e.target).parents('.drp-calendar'); - if (cal.hasClass('left')) { - this.leftCalendar.month.add(1, 'month'); - } else { - this.rightCalendar.month.add(1, 'month'); - if (this.linkedCalendars) - this.leftCalendar.month.add(1, 'month'); - } - this.updateCalendars(); - }, - - hoverDate: function(e) { - - //ignore dates that can't be selected - if (!$(e.target).hasClass('available')) return; - - var title = $(e.target).attr('data-title'); - var row = title.substr(1, 1); - var col = title.substr(3, 1); - var cal = $(e.target).parents('.drp-calendar'); - var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col]; - - //highlight the dates between the start date and the date being hovered as a potential end date - var leftCalendar = this.leftCalendar; - var rightCalendar = this.rightCalendar; - var startDate = this.startDate; - if (!this.endDate) { - this.container.find('.drp-calendar tbody td').each(function(index, el) { - - //skip week numbers, only look at dates - if ($(el).hasClass('week')) return; - - var title = $(el).attr('data-title'); - var row = title.substr(1, 1); - var col = title.substr(3, 1); - var cal = $(el).parents('.drp-calendar'); - var dt = cal.hasClass('left') ? leftCalendar.calendar[row][col] : rightCalendar.calendar[row][col]; - - if ((dt.isAfter(startDate) && dt.isBefore(date)) || dt.isSame(date, 'day')) { - $(el).addClass('in-range'); - } else { - $(el).removeClass('in-range'); - } - - }); - } - - }, - - clickDate: function(e) { - - if (!$(e.target).hasClass('available')) return; - - var title = $(e.target).attr('data-title'); - var row = title.substr(1, 1); - var col = title.substr(3, 1); - var cal = $(e.target).parents('.drp-calendar'); - var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col]; - - // - // this function needs to do a few things: - // * alternate between selecting a start and end date for the range, - // * if the time picker is enabled, apply the hour/minute/second from the select boxes to the clicked date - // * if autoapply is enabled, and an end date was chosen, apply the selection - // * if single date picker mode, and time picker isn't enabled, apply the selection immediately - // * if one of the inputs above the calendars was focused, cancel that manual input - // - - if (this.endDate || date.isBefore(this.startDate, 'day')) { //picking start - if (this.timePicker) { - var hour = parseInt(this.container.find('.left .hourselect').val(), 10); - if (!this.timePicker24Hour) { - var ampm = this.container.find('.left .ampmselect').val(); - if (ampm === 'PM' && hour < 12) - hour += 12; - if (ampm === 'AM' && hour === 12) - hour = 0; - } - var minute = parseInt(this.container.find('.left .minuteselect').val(), 10); - if (isNaN(minute)) { - minute = parseInt(this.container.find('.left .minuteselect option:last').val(), 10); - } - var second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0; - date = date.clone().hour(hour).minute(minute).second(second); - } - this.endDate = null; - this.setStartDate(date.clone()); - } else if (!this.endDate && date.isBefore(this.startDate)) { - //special case: clicking the same date for start/end, - //but the time of the end date is before the start date - this.setEndDate(this.startDate.clone()); - } else { // picking end - if (this.timePicker) { - var hour = parseInt(this.container.find('.right .hourselect').val(), 10); - if (!this.timePicker24Hour) { - var ampm = this.container.find('.right .ampmselect').val(); - if (ampm === 'PM' && hour < 12) - hour += 12; - if (ampm === 'AM' && hour === 12) - hour = 0; - } - var minute = parseInt(this.container.find('.right .minuteselect').val(), 10); - if (isNaN(minute)) { - minute = parseInt(this.container.find('.right .minuteselect option:last').val(), 10); - } - var second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0; - date = date.clone().hour(hour).minute(minute).second(second); - } - this.setEndDate(date.clone()); - if (this.autoApply) { - this.calculateChosenLabel(); - this.clickApply(); - } - } - - if (this.singleDatePicker) { - this.setEndDate(this.startDate); - if (!this.timePicker && this.autoApply) - this.clickApply(); - } - - this.updateView(); - - //This is to cancel the blur event handler if the mouse was in one of the inputs - e.stopPropagation(); - - }, - - calculateChosenLabel: function () { - var customRange = true; - var i = 0; - for (var range in this.ranges) { - if (this.timePicker) { - var format = this.timePickerSeconds ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD HH:mm"; - //ignore times when comparing dates if time picker seconds is not enabled - if (this.startDate.format(format) == this.ranges[range][0].format(format) && this.endDate.format(format) == this.ranges[range][1].format(format)) { - customRange = false; - this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').attr('data-range-key'); - break; - } - } else { - //ignore times when comparing dates if time picker is not enabled - if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) { - customRange = false; - this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').attr('data-range-key'); - break; - } - } - i++; - } - if (customRange) { - if (this.showCustomRangeLabel) { - this.chosenLabel = this.container.find('.ranges li:last').addClass('active').attr('data-range-key'); - } else { - this.chosenLabel = null; - } - this.showCalendars(); - } - }, - - clickApply: function(e) { - this.hide(); - this.element.trigger('apply.daterangepicker', this); - }, - - clickCancel: function(e) { - this.startDate = this.oldStartDate; - this.endDate = this.oldEndDate; - this.hide(); - this.element.trigger('cancel.daterangepicker', this); - }, - - monthOrYearChanged: function(e) { - var isLeft = $(e.target).closest('.drp-calendar').hasClass('left'), - leftOrRight = isLeft ? 'left' : 'right', - cal = this.container.find('.drp-calendar.'+leftOrRight); - - // Month must be Number for new moment versions - var month = parseInt(cal.find('.monthselect').val(), 10); - var year = cal.find('.yearselect').val(); - - if (!isLeft) { - if (year < this.startDate.year() || (year == this.startDate.year() && month < this.startDate.month())) { - month = this.startDate.month(); - year = this.startDate.year(); - } - } - - if (this.minDate) { - if (year < this.minDate.year() || (year == this.minDate.year() && month < this.minDate.month())) { - month = this.minDate.month(); - year = this.minDate.year(); - } - } - - if (this.maxDate) { - if (year > this.maxDate.year() || (year == this.maxDate.year() && month > this.maxDate.month())) { - month = this.maxDate.month(); - year = this.maxDate.year(); - } - } - - if (isLeft) { - this.leftCalendar.month.month(month).year(year); - if (this.linkedCalendars) - this.rightCalendar.month = this.leftCalendar.month.clone().add(1, 'month'); - } else { - this.rightCalendar.month.month(month).year(year); - if (this.linkedCalendars) - this.leftCalendar.month = this.rightCalendar.month.clone().subtract(1, 'month'); - } - this.updateCalendars(); - }, - - timeChanged: function(e) { - - var cal = $(e.target).closest('.drp-calendar'), - isLeft = cal.hasClass('left'); - - var hour = parseInt(cal.find('.hourselect').val(), 10); - var minute = parseInt(cal.find('.minuteselect').val(), 10); - if (isNaN(minute)) { - minute = parseInt(cal.find('.minuteselect option:last').val(), 10); - } - var second = this.timePickerSeconds ? parseInt(cal.find('.secondselect').val(), 10) : 0; - - if (!this.timePicker24Hour) { - var ampm = cal.find('.ampmselect').val(); - if (ampm === 'PM' && hour < 12) - hour += 12; - if (ampm === 'AM' && hour === 12) - hour = 0; - } - - if (isLeft) { - var start = this.startDate.clone(); - start.hour(hour); - start.minute(minute); - start.second(second); - this.setStartDate(start); - if (this.singleDatePicker) { - this.endDate = this.startDate.clone(); - } else if (this.endDate && this.endDate.format('YYYY-MM-DD') == start.format('YYYY-MM-DD') && this.endDate.isBefore(start)) { - this.setEndDate(start.clone()); - } - } else if (this.endDate) { - var end = this.endDate.clone(); - end.hour(hour); - end.minute(minute); - end.second(second); - this.setEndDate(end); - } - - //update the calendars so all clickable dates reflect the new time component - this.updateCalendars(); - - //update the form inputs above the calendars with the new time - this.updateFormInputs(); - - //re-render the time pickers because changing one selection can affect what's enabled in another - this.renderTimePicker('left'); - this.renderTimePicker('right'); - - }, - - elementChanged: function() { - if (!this.element.is('input')) return; - if (!this.element.val().length) return; - - var dateString = this.element.val().split(this.locale.separator), - start = null, - end = null; - - if (dateString.length === 2) { - start = moment(dateString[0], this.locale.format); - end = moment(dateString[1], this.locale.format); - } - - if (this.singleDatePicker || start === null || end === null) { - start = moment(this.element.val(), this.locale.format); - end = start; - } - - if (!start.isValid() || !end.isValid()) return; - - this.setStartDate(start); - this.setEndDate(end); - this.updateView(); - }, - - keydown: function(e) { - //hide on tab or enter - if ((e.keyCode === 9) || (e.keyCode === 13)) { - this.hide(); - } - - //hide on esc and prevent propagation - if (e.keyCode === 27) { - e.preventDefault(); - e.stopPropagation(); - - this.hide(); - } - }, - - updateElement: function() { - if (this.element.is('input') && this.autoUpdateInput) { - var newValue = this.startDate.format(this.locale.format); - if (!this.singleDatePicker) { - newValue += this.locale.separator + this.endDate.format(this.locale.format); - } - if (newValue !== this.element.val()) { - this.element.val(newValue).trigger('change'); - } - } - }, - - remove: function() { - this.container.remove(); - this.element.off('.daterangepicker'); - this.element.removeData(); - } - - }; - - $.fn.daterangepicker = function(options, callback) { - var implementOptions = $.extend(true, {}, $.fn.daterangepicker.defaultOptions, options); - this.each(function() { - var el = $(this); - if (el.data('daterangepicker')) - el.data('daterangepicker').remove(); - el.data('daterangepicker', new DateRangePicker(el, implementOptions, callback)); - }); - return this; - }; - - return DateRangePicker; - -})); diff --git a/scripts/vendor/daterangepicker.min.js b/scripts/vendor/daterangepicker.min.js new file mode 100644 index 000000000..cae6866ca --- /dev/null +++ b/scripts/vendor/daterangepicker.min.js @@ -0,0 +1,9 @@ +/** +* @version: 3.1 +* @author: Dan Grossman http://www.dangrossman.info/ +* @copyright: Copyright (c) 2012-2019 Dan Grossman. All rights reserved. +* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php +* @website: http://www.daterangepicker.com/ +*/ +!function(t,e){if("function"==typeof define&&define.amd)define(["moment","jquery"],(function(t,a){return a.fn||(a.fn={}),"function"!=typeof t&&t.hasOwnProperty("default")&&(t=t.default),e(t,a)}));else if("object"==typeof module&&module.exports){var a="undefined"!=typeof window?window.jQuery:void 0;a||(a=require("jquery")).fn||(a.fn={});var i="undefined"!=typeof window&&"undefined"!=typeof window.moment?window.moment:require("moment");module.exports=e(i,a)}else t.daterangepicker=e(t.moment,t.jQuery)}(this,(function(t,e){var a=function(a,i,s){if(this.parentEl="body",this.element=e(a),this.startDate=t().startOf("day"),this.endDate=t().endOf("day"),this.minDate=!1,this.maxDate=!1,this.maxSpan=!1,this.autoApply=!1,this.singleDatePicker=!1,this.showDropdowns=!1,this.minYear=t().subtract(100,"year").format("YYYY"),this.maxYear=t().add(100,"year").format("YYYY"),this.showWeekNumbers=!1,this.showISOWeekNumbers=!1,this.showCustomRangeLabel=!0,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.linkedCalendars=!0,this.autoUpdateInput=!0,this.alwaysShowCalendars=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.drops="down",this.element.hasClass("dropup")&&(this.drops="up"),this.buttonClasses="btn btn-sm",this.applyButtonClasses="btn-primary",this.cancelButtonClasses="btn-default",this.locale={direction:"ltr",format:t.localeData().longDateFormat("L"),separator:" - ",applyLabel:"Apply",cancelLabel:"Cancel",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:t.weekdaysMin(),monthNames:t.monthsShort(),firstDay:t.localeData().firstDayOfWeek()},this.callback=function(){},this.isShowing=!1,this.leftCalendar={},this.rightCalendar={},"object"==typeof i&&null!==i||(i={}),"string"==typeof(i=e.extend(this.element.data(),i)).template||i.template instanceof e||(i.template='
    '),this.parentEl=i.parentEl&&e(i.parentEl).length?e(i.parentEl):e(this.parentEl),this.container=e(i.template).appendTo(this.parentEl),"object"==typeof i.locale&&("string"==typeof i.locale.direction&&(this.locale.direction=i.locale.direction),"string"==typeof i.locale.format&&(this.locale.format=i.locale.format),"string"==typeof i.locale.separator&&(this.locale.separator=i.locale.separator),"object"==typeof i.locale.daysOfWeek&&(this.locale.daysOfWeek=i.locale.daysOfWeek.slice()),"object"==typeof i.locale.monthNames&&(this.locale.monthNames=i.locale.monthNames.slice()),"number"==typeof i.locale.firstDay&&(this.locale.firstDay=i.locale.firstDay),"string"==typeof i.locale.applyLabel&&(this.locale.applyLabel=i.locale.applyLabel),"string"==typeof i.locale.cancelLabel&&(this.locale.cancelLabel=i.locale.cancelLabel),"string"==typeof i.locale.weekLabel&&(this.locale.weekLabel=i.locale.weekLabel),"string"==typeof i.locale.customRangeLabel)){(p=document.createElement("textarea")).innerHTML=i.locale.customRangeLabel;var n=p.value;this.locale.customRangeLabel=n}if(this.container.addClass(this.locale.direction),"string"==typeof i.startDate&&(this.startDate=t(i.startDate,this.locale.format)),"string"==typeof i.endDate&&(this.endDate=t(i.endDate,this.locale.format)),"string"==typeof i.minDate&&(this.minDate=t(i.minDate,this.locale.format)),"string"==typeof i.maxDate&&(this.maxDate=t(i.maxDate,this.locale.format)),"object"==typeof i.startDate&&(this.startDate=t(i.startDate)),"object"==typeof i.endDate&&(this.endDate=t(i.endDate)),"object"==typeof i.minDate&&(this.minDate=t(i.minDate)),"object"==typeof i.maxDate&&(this.maxDate=t(i.maxDate)),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),"string"==typeof i.applyButtonClasses&&(this.applyButtonClasses=i.applyButtonClasses),"string"==typeof i.applyClass&&(this.applyButtonClasses=i.applyClass),"string"==typeof i.cancelButtonClasses&&(this.cancelButtonClasses=i.cancelButtonClasses),"string"==typeof i.cancelClass&&(this.cancelButtonClasses=i.cancelClass),"object"==typeof i.maxSpan&&(this.maxSpan=i.maxSpan),"object"==typeof i.dateLimit&&(this.maxSpan=i.dateLimit),"string"==typeof i.opens&&(this.opens=i.opens),"string"==typeof i.drops&&(this.drops=i.drops),"boolean"==typeof i.showWeekNumbers&&(this.showWeekNumbers=i.showWeekNumbers),"boolean"==typeof i.showISOWeekNumbers&&(this.showISOWeekNumbers=i.showISOWeekNumbers),"string"==typeof i.buttonClasses&&(this.buttonClasses=i.buttonClasses),"object"==typeof i.buttonClasses&&(this.buttonClasses=i.buttonClasses.join(" ")),"boolean"==typeof i.showDropdowns&&(this.showDropdowns=i.showDropdowns),"number"==typeof i.minYear&&(this.minYear=i.minYear),"number"==typeof i.maxYear&&(this.maxYear=i.maxYear),"boolean"==typeof i.showCustomRangeLabel&&(this.showCustomRangeLabel=i.showCustomRangeLabel),"boolean"==typeof i.singleDatePicker&&(this.singleDatePicker=i.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),"boolean"==typeof i.timePicker&&(this.timePicker=i.timePicker),"boolean"==typeof i.timePickerSeconds&&(this.timePickerSeconds=i.timePickerSeconds),"number"==typeof i.timePickerIncrement&&(this.timePickerIncrement=i.timePickerIncrement),"boolean"==typeof i.timePicker24Hour&&(this.timePicker24Hour=i.timePicker24Hour),"boolean"==typeof i.autoApply&&(this.autoApply=i.autoApply),"boolean"==typeof i.autoUpdateInput&&(this.autoUpdateInput=i.autoUpdateInput),"boolean"==typeof i.linkedCalendars&&(this.linkedCalendars=i.linkedCalendars),"function"==typeof i.isInvalidDate&&(this.isInvalidDate=i.isInvalidDate),"function"==typeof i.isCustomDate&&(this.isCustomDate=i.isCustomDate),"boolean"==typeof i.alwaysShowCalendars&&(this.alwaysShowCalendars=i.alwaysShowCalendars),0!=this.locale.firstDay)for(var r=this.locale.firstDay;r>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),r--;var o,h,l;if("undefined"==typeof i.startDate&&"undefined"==typeof i.endDate&&e(this.element).is(":text")){var c=e(this.element).val(),d=c.split(this.locale.separator);o=h=null,2==d.length?(o=t(d[0],this.locale.format),h=t(d[1],this.locale.format)):this.singleDatePicker&&""!==c&&(o=t(c,this.locale.format),h=t(c,this.locale.format)),null!==o&&null!==h&&(this.setStartDate(o),this.setEndDate(h))}if("object"==typeof i.ranges){for(l in i.ranges){o="string"==typeof i.ranges[l][0]?t(i.ranges[l][0],this.locale.format):t(i.ranges[l][0]),h="string"==typeof i.ranges[l][1]?t(i.ranges[l][1],this.locale.format):t(i.ranges[l][1]),this.minDate&&o.isBefore(this.minDate)&&(o=this.minDate.clone());var m=this.maxDate;if(this.maxSpan&&m&&o.clone().add(this.maxSpan).isAfter(m)&&(m=o.clone().add(this.maxSpan)),m&&h.isAfter(m)&&(h=m.clone()),!(this.minDate&&h.isBefore(this.minDate,this.timepicker?"minute":"day")||m&&o.isAfter(m,this.timepicker?"minute":"day"))){var p;(p=document.createElement("textarea")).innerHTML=l;n=p.value;this.ranges[n]=[o,h]}}var f="
      ";for(l in this.ranges)f+='
    • '+l+"
    • ";this.showCustomRangeLabel&&(f+='
    • '+this.locale.customRangeLabel+"
    • "),f+="
    ",this.container.find(".ranges").prepend(f)}"function"==typeof s&&(this.callback=s),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"),this.container.find(".calendar-time").hide()),this.timePicker&&this.autoApply&&(this.autoApply=!1),this.autoApply&&this.container.addClass("auto-apply"),"object"==typeof i.ranges&&this.container.addClass("show-ranges"),this.singleDatePicker&&(this.container.addClass("single"),this.container.find(".drp-calendar.left").addClass("single"),this.container.find(".drp-calendar.left").show(),this.container.find(".drp-calendar.right").hide(),!this.timePicker&&this.autoApply&&this.container.addClass("auto-apply")),("undefined"==typeof i.ranges&&!this.singleDatePicker||this.alwaysShowCalendars)&&this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses),this.applyButtonClasses.length&&this.container.find(".applyBtn").addClass(this.applyButtonClasses),this.cancelButtonClasses.length&&this.container.find(".cancelBtn").addClass(this.cancelButtonClasses),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".drp-calendar").on("click.daterangepicker",".prev",e.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",e.proxy(this.clickNext,this)).on("mousedown.daterangepicker","td.available",e.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",e.proxy(this.hoverDate,this)).on("change.daterangepicker","select.yearselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.monthselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",e.proxy(this.timeChanged,this)),this.container.find(".ranges").on("click.daterangepicker","li",e.proxy(this.clickRange,this)),this.container.find(".drp-buttons").on("click.daterangepicker","button.applyBtn",e.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",e.proxy(this.clickCancel,this)),this.element.is("input")||this.element.is("button")?this.element.on({"click.daterangepicker":e.proxy(this.show,this),"focus.daterangepicker":e.proxy(this.show,this),"keyup.daterangepicker":e.proxy(this.elementChanged,this),"keydown.daterangepicker":e.proxy(this.keydown,this)}):(this.element.on("click.daterangepicker",e.proxy(this.toggle,this)),this.element.on("keydown.daterangepicker",e.proxy(this.toggle,this))),this.updateElement()};return a.prototype={constructor:a,setStartDate:function(e){"string"==typeof e&&(this.startDate=t(e,this.locale.format)),"object"==typeof e&&(this.startDate=t(e)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.isShowing||this.updateElement(),this.updateMonthsInView()},setEndDate:function(e){"string"==typeof e&&(this.endDate=t(e,this.locale.format)),"object"==typeof e&&(this.endDate=t(e)),this.timePicker||(this.endDate=this.endDate.endOf("day")),this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),this.maxSpan&&this.startDate.clone().add(this.maxSpan).isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.maxSpan)),this.previousRightTime=this.endDate.clone(),this.container.find(".drp-selected").html(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.isShowing||this.updateElement(),this.updateMonthsInView()},isInvalidDate:function(){return!1},isCustomDate:function(){return!1},updateView:function(){this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"),this.endDate?this.container.find(".right .calendar-time select").prop("disabled",!1).removeClass("disabled"):this.container.find(".right .calendar-time select").prop("disabled",!0).addClass("disabled")),this.endDate&&this.container.find(".drp-selected").html(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.updateMonthsInView(),this.updateCalendars(),this.updateFormInputs()},updateMonthsInView:function(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.startDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM")))return;this.leftCalendar.month=this.startDate.clone().date(2),this.linkedCalendars||this.endDate.month()==this.startDate.month()&&this.endDate.year()==this.startDate.year()?this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"):this.rightCalendar.month=this.endDate.clone().date(2)}else this.leftCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"));this.maxDate&&this.linkedCalendars&&!this.singleDatePicker&&this.rightCalendar.month>this.maxDate&&(this.rightCalendar.month=this.maxDate.clone().date(2),this.leftCalendar.month=this.maxDate.clone().date(2).subtract(1,"month"))},updateCalendars:function(){if(this.timePicker){var t,e,a,i;if(this.endDate){if(t=parseInt(this.container.find(".left .hourselect").val(),10),e=parseInt(this.container.find(".left .minuteselect").val(),10),isNaN(e)&&(e=parseInt(this.container.find(".left .minuteselect option:last").val(),10)),a=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,!this.timePicker24Hour)"PM"===(i=this.container.find(".left .ampmselect").val())&&t<12&&(t+=12),"AM"===i&&12===t&&(t=0)}else if(t=parseInt(this.container.find(".right .hourselect").val(),10),e=parseInt(this.container.find(".right .minuteselect").val(),10),isNaN(e)&&(e=parseInt(this.container.find(".right .minuteselect option:last").val(),10)),a=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,!this.timePicker24Hour)"PM"===(i=this.container.find(".right .ampmselect").val())&&t<12&&(t+=12),"AM"===i&&12===t&&(t=0);this.leftCalendar.month.hour(t).minute(e).second(a),this.rightCalendar.month.hour(t).minute(e).second(a)}this.renderCalendar("left"),this.renderCalendar("right"),this.container.find(".ranges li").removeClass("active"),null!=this.endDate&&this.calculateChosenLabel()},renderCalendar:function(a){var i,s=(i="left"==a?this.leftCalendar:this.rightCalendar).month.month(),n=i.month.year(),r=i.month.hour(),o=i.month.minute(),h=i.month.second(),l=t([n,s]).daysInMonth(),c=t([n,s,1]),d=t([n,s,l]),m=t(c).subtract(1,"month").month(),p=t(c).subtract(1,"month").year(),f=t([p,m]).daysInMonth(),u=c.day();(i=[]).firstDay=c,i.lastDay=d;for(var D=0;D<6;D++)i[D]=[];var g=f-u+this.locale.firstDay+1;g>f&&(g-=7),u==this.locale.firstDay&&(g=f-6);for(var y=t([p,m,g,12,o,h]),k=(D=0,0),b=0;D<42;D++,k++,y=t(y).add(24,"hour"))D>0&&k%7==0&&(k=0,b++),i[b][k]=y.clone().hour(r).minute(o).second(h),y.hour(12),this.minDate&&i[b][k].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&i[b][k].isBefore(this.minDate)&&"left"==a&&(i[b][k]=this.minDate.clone()),this.maxDate&&i[b][k].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&i[b][k].isAfter(this.maxDate)&&"right"==a&&(i[b][k]=this.maxDate.clone());"left"==a?this.leftCalendar.calendar=i:this.rightCalendar.calendar=i;var C="left"==a?this.minDate:this.startDate,v=this.maxDate,Y=("left"==a?this.startDate:this.endDate,this.locale.direction,'');Y+="",Y+="",(this.showWeekNumbers||this.showISOWeekNumbers)&&(Y+=""),C&&!C.isBefore(i.firstDay)||this.linkedCalendars&&"left"!=a?Y+="":Y+='';var w=this.locale.monthNames[i[1][1].month()]+i[1][1].format(" YYYY");if(this.showDropdowns){for(var P=i[1][1].month(),x=i[1][1].year(),M=v&&v.year()||this.maxYear,I=C&&C.year()||this.minYear,S=x==I,B=x==M,A='";for(var N='")}if(Y+='",v&&!v.isAfter(i.lastDay)||this.linkedCalendars&&"right"!=a&&!this.singleDatePicker?Y+="":Y+='',Y+="",Y+="",(this.showWeekNumbers||this.showISOWeekNumbers)&&(Y+='"),e.each(this.locale.daysOfWeek,(function(t,e){Y+=""})),Y+="",Y+="",Y+="",null==this.endDate&&this.maxSpan){var O=this.startDate.clone().add(this.maxSpan).endOf("day");v&&!O.isBefore(v)||(v=O)}for(b=0;b<6;b++){Y+="",this.showWeekNumbers?Y+='":this.showISOWeekNumbers&&(Y+='");for(k=0;k<7;k++){var W=[];i[b][k].isSame(new Date,"day")&&W.push("today"),i[b][k].isoWeekday()>5&&W.push("weekend"),i[b][k].month()!=i[1][1].month()&&W.push("off","ends"),this.minDate&&i[b][k].isBefore(this.minDate,"day")&&W.push("off","disabled"),v&&i[b][k].isAfter(v,"day")&&W.push("off","disabled"),this.isInvalidDate(i[b][k])&&W.push("off","disabled"),i[b][k].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&W.push("active","start-date"),null!=this.endDate&&i[b][k].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&W.push("active","end-date"),null!=this.endDate&&i[b][k]>this.startDate&&i[b][k]'+i[b][k].date()+""}Y+=""}Y+="",Y+="
    '+w+"
    '+this.locale.weekLabel+""+e+"
    '+i[b][0].week()+"'+i[b][0].isoWeek()+"
    ",this.container.find(".drp-calendar."+a+" .calendar-table").html(Y)},renderTimePicker:function(t){if("right"!=t||this.endDate){var e,a,i,s=this.maxDate;if(!this.maxSpan||this.maxDate&&!this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate)||(s=this.startDate.clone().add(this.maxSpan)),"left"==t)a=this.startDate.clone(),i=this.minDate;else if("right"==t){a=this.endDate.clone(),i=this.startDate;var n=this.container.find(".drp-calendar.right .calendar-time");if(""!=n.html()&&(a.hour(isNaN(a.hour())?n.find(".hourselect option:selected").val():a.hour()),a.minute(isNaN(a.minute())?n.find(".minuteselect option:selected").val():a.minute()),a.second(isNaN(a.second())?n.find(".secondselect option:selected").val():a.second()),!this.timePicker24Hour)){var r=n.find(".ampmselect option:selected").val();"PM"===r&&a.hour()<12&&a.hour(a.hour()+12),"AM"===r&&12===a.hour()&&a.hour(0)}a.isBefore(this.startDate)&&(a=this.startDate.clone()),s&&a.isAfter(s)&&(a=s.clone())}e=' ",e+=': ",this.timePickerSeconds){e+=': "}if(!this.timePicker24Hour){e+='"}this.container.find(".drp-calendar."+t+" .calendar-time").html(e)}},updateFormInputs:function(){this.singleDatePicker||this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate))?this.container.find("button.applyBtn").prop("disabled",!1):this.container.find("button.applyBtn").prop("disabled",!0)},move:function(){var t,a={top:0,left:0},i=this.drops,s=e(window).width();switch(this.parentEl.is("body")||(a={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},s=this.parentEl[0].clientWidth+this.parentEl.offset().left),i){case"auto":(t=this.element.offset().top+this.element.outerHeight()-a.top)+this.container.outerHeight()>=this.parentEl[0].scrollHeight&&(t=this.element.offset().top-this.container.outerHeight()-a.top,i="up");break;case"up":t=this.element.offset().top-this.container.outerHeight()-a.top;break;default:t=this.element.offset().top+this.element.outerHeight()-a.top}this.container.css({top:0,left:0,right:"auto"});var n=this.container.outerWidth();if(this.container.toggleClass("drop-up","up"==i),"left"==this.opens){var r=s-this.element.offset().left-this.element.outerWidth();n+r>e(window).width()?this.container.css({top:t,right:"auto",left:9}):this.container.css({top:t,right:r,left:"auto"})}else if("center"==this.opens){(o=this.element.offset().left-a.left+this.element.outerWidth()/2-n/2)<0?this.container.css({top:t,right:"auto",left:9}):o+n>e(window).width()?this.container.css({top:t,left:"auto",right:0}):this.container.css({top:t,left:o,right:"auto"})}else{var o;(o=this.element.offset().left-a.left)+n>e(window).width()?this.container.css({top:t,left:"auto",right:0}):this.container.css({top:t,left:o,right:"auto"})}},show:function(t){this.isShowing||(this._outsideClickProxy=e.proxy((function(t){this.outsideClick(t)}),this),e(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),e(window).on("resize.daterangepicker",e.proxy((function(t){this.move(t)}),this)),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.previousRightTime=this.endDate.clone(),this.updateView(),this.container.show(),this.move(),this.element.trigger("show.daterangepicker",this),this.isShowing=!0)},hide:function(t){this.isShowing&&(this.endDate||(this.startDate=this.oldStartDate.clone(),this.endDate=this.oldEndDate.clone()),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.callback(this.startDate.clone(),this.endDate.clone(),this.chosenLabel),this.updateElement(),e(document).off(".daterangepicker"),e(window).off(".daterangepicker"),this.container.hide(),this.element.trigger("hide.daterangepicker",this),this.isShowing=!1)},toggle:function(t){this.isShowing?this.hide():this.show()},outsideClick:function(t){var a=e(t.target);"focusin"==t.type||a.closest(this.element).length||a.closest(this.container).length||a.closest(".calendar-table").length||(this.hide(),this.element.trigger("outsideClick.daterangepicker",this))},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},clickRange:function(t){var e=t.target.getAttribute("data-range-key");if(this.chosenLabel=e,e==this.locale.customRangeLabel)this.showCalendars();else{var a=this.ranges[e];this.startDate=a[0],this.endDate=a[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.alwaysShowCalendars||this.hideCalendars(),this.clickApply()}},clickPrev:function(t){e(t.target).parents(".drp-calendar").hasClass("left")?(this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&this.rightCalendar.month.subtract(1,"month")):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(t){e(t.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&this.leftCalendar.month.add(1,"month")),this.updateCalendars()},hoverDate:function(t){if(e(t.target).hasClass("available")){var a=e(t.target).attr("data-title"),i=a.substr(1,1),s=a.substr(3,1),n=e(t.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.calendar[i][s]:this.rightCalendar.calendar[i][s],r=this.leftCalendar,o=this.rightCalendar,h=this.startDate;this.endDate||this.container.find(".drp-calendar tbody td").each((function(t,a){if(!e(a).hasClass("week")){var i=e(a).attr("data-title"),s=i.substr(1,1),l=i.substr(3,1),c=e(a).parents(".drp-calendar").hasClass("left")?r.calendar[s][l]:o.calendar[s][l];c.isAfter(h)&&c.isBefore(n)||c.isSame(n,"day")?e(a).addClass("in-range"):e(a).removeClass("in-range")}}))}},clickDate:function(t){if(e(t.target).hasClass("available")){var a=e(t.target).attr("data-title"),i=a.substr(1,1),s=a.substr(3,1),n=e(t.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.calendar[i][s]:this.rightCalendar.calendar[i][s];if(this.endDate||n.isBefore(this.startDate,"day")){if(this.timePicker){var r=parseInt(this.container.find(".left .hourselect").val(),10);if(!this.timePicker24Hour)"PM"===(l=this.container.find(".left .ampmselect").val())&&r<12&&(r+=12),"AM"===l&&12===r&&(r=0);var o=parseInt(this.container.find(".left .minuteselect").val(),10);isNaN(o)&&(o=parseInt(this.container.find(".left .minuteselect option:last").val(),10));var h=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0;n=n.clone().hour(r).minute(o).second(h)}this.endDate=null,this.setStartDate(n.clone())}else if(!this.endDate&&n.isBefore(this.startDate))this.setEndDate(this.startDate.clone());else{if(this.timePicker){var l;r=parseInt(this.container.find(".right .hourselect").val(),10);if(!this.timePicker24Hour)"PM"===(l=this.container.find(".right .ampmselect").val())&&r<12&&(r+=12),"AM"===l&&12===r&&(r=0);o=parseInt(this.container.find(".right .minuteselect").val(),10);isNaN(o)&&(o=parseInt(this.container.find(".right .minuteselect option:last").val(),10));h=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0;n=n.clone().hour(r).minute(o).second(h)}this.setEndDate(n.clone()),this.autoApply&&(this.calculateChosenLabel(),this.clickApply())}this.singleDatePicker&&(this.setEndDate(this.startDate),!this.timePicker&&this.autoApply&&this.clickApply()),this.updateView(),t.stopPropagation()}},calculateChosenLabel:function(){var t=!0,e=0;for(var a in this.ranges){if(this.timePicker){var i=this.timePickerSeconds?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD HH:mm";if(this.startDate.format(i)==this.ranges[a][0].format(i)&&this.endDate.format(i)==this.ranges[a][1].format(i)){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").attr("data-range-key");break}}else if(this.startDate.format("YYYY-MM-DD")==this.ranges[a][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[a][1].format("YYYY-MM-DD")){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").attr("data-range-key");break}e++}t&&(this.showCustomRangeLabel?this.chosenLabel=this.container.find(".ranges li:last").addClass("active").attr("data-range-key"):this.chosenLabel=null,this.showCalendars())},clickApply:function(t){this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(t){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.hide(),this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(t){var a=e(t.target).closest(".drp-calendar").hasClass("left"),i=a?"left":"right",s=this.container.find(".drp-calendar."+i),n=parseInt(s.find(".monthselect").val(),10),r=s.find(".yearselect").val();a||(rthis.maxDate.year()||r==this.maxDate.year()&&n>this.maxDate.month())&&(n=this.maxDate.month(),r=this.maxDate.year()),a?(this.leftCalendar.month.month(n).year(r),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month.month(n).year(r),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month"))),this.updateCalendars()},timeChanged:function(t){var a=e(t.target).closest(".drp-calendar"),i=a.hasClass("left"),s=parseInt(a.find(".hourselect").val(),10),n=parseInt(a.find(".minuteselect").val(),10);isNaN(n)&&(n=parseInt(a.find(".minuteselect option:last").val(),10));var r=this.timePickerSeconds?parseInt(a.find(".secondselect").val(),10):0;if(!this.timePicker24Hour){var o=a.find(".ampmselect").val();"PM"===o&&s<12&&(s+=12),"AM"===o&&12===s&&(s=0)}if(i){var h=this.startDate.clone();h.hour(s),h.minute(n),h.second(r),this.setStartDate(h),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")==h.format("YYYY-MM-DD")&&this.endDate.isBefore(h)&&this.setEndDate(h.clone())}else if(this.endDate){var l=this.endDate.clone();l.hour(s),l.minute(n),l.second(r),this.setEndDate(l)}this.updateCalendars(),this.updateFormInputs(),this.renderTimePicker("left"),this.renderTimePicker("right")},elementChanged:function(){if(this.element.is("input")&&this.element.val().length){var e=this.element.val().split(this.locale.separator),a=null,i=null;2===e.length&&(a=t(e[0],this.locale.format),i=t(e[1],this.locale.format)),(this.singleDatePicker||null===a||null===i)&&(i=a=t(this.element.val(),this.locale.format)),a.isValid()&&i.isValid()&&(this.setStartDate(a),this.setEndDate(i),this.updateView())}},keydown:function(t){9!==t.keyCode&&13!==t.keyCode||this.hide(),27===t.keyCode&&(t.preventDefault(),t.stopPropagation(),this.hide())},updateElement:function(){if(this.element.is("input")&&this.autoUpdateInput){var t=this.startDate.format(this.locale.format);this.singleDatePicker||(t+=this.locale.separator+this.endDate.format(this.locale.format)),t!==this.element.val()&&this.element.val(t).trigger("change")}},remove:function(){this.container.remove(),this.element.off(".daterangepicker"),this.element.removeData()}},e.fn.daterangepicker=function(t,i){var s=e.extend(!0,{},e.fn.daterangepicker.defaultOptions,t);return this.each((function(){var t=e(this);t.data("daterangepicker")&&t.data("daterangepicker").remove(),t.data("daterangepicker",new a(t,s,i))})),this},a})); +//# sourceMappingURL=daterangepicker.min.js.map \ No newline at end of file diff --git a/scripts/vendor/daterangepicker.min.js.map b/scripts/vendor/daterangepicker.min.js.map new file mode 100644 index 000000000..8cdbb4cfc --- /dev/null +++ b/scripts/vendor/daterangepicker.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["daterangepicker.js"],"names":["root","factory","define","amd","moment","jquery","fn","hasOwnProperty","module","exports","jQuery","window","undefined","require","daterangepicker","this","$","DateRangePicker","element","options","cb","parentEl","startDate","startOf","endDate","endOf","minDate","maxDate","maxSpan","autoApply","singleDatePicker","showDropdowns","minYear","subtract","format","maxYear","add","showWeekNumbers","showISOWeekNumbers","showCustomRangeLabel","timePicker","timePicker24Hour","timePickerIncrement","timePickerSeconds","linkedCalendars","autoUpdateInput","alwaysShowCalendars","ranges","opens","hasClass","drops","buttonClasses","applyButtonClasses","cancelButtonClasses","locale","direction","localeData","longDateFormat","separator","applyLabel","cancelLabel","weekLabel","customRangeLabel","daysOfWeek","weekdaysMin","monthNames","monthsShort","firstDay","firstDayOfWeek","callback","isShowing","leftCalendar","rightCalendar","extend","data","template","length","container","appendTo","slice","elem","document","createElement","innerHTML","rangeHtml","value","addClass","isBefore","clone","isAfter","applyClass","cancelClass","dateLimit","join","isInvalidDate","isCustomDate","iterator","push","shift","start","end","range","is","val","split","setStartDate","setEndDate","timepicker","list","find","prepend","hide","show","html","on","proxy","clickPrev","clickNext","clickDate","hoverDate","monthOrYearChanged","timeChanged","clickRange","clickApply","clickCancel","click.daterangepicker","focus.daterangepicker","keyup.daterangepicker","elementChanged","keydown.daterangepicker","keydown","toggle","updateElement","prototype","constructor","minute","Math","round","floor","updateMonthsInView","previousRightTime","updateView","renderTimePicker","prop","removeClass","updateCalendars","updateFormInputs","month","date","year","hour","second","ampm","parseInt","isNaN","renderCalendar","calculateChosenLabel","side","calendar","daysInMonth","lastDay","lastMonth","lastYear","daysInLastMonth","dayOfWeek","day","i","startDay","curDate","col","row","dateHtml","currentMonth","currentYear","inMinYear","inMaxYear","monthHtml","m","yearHtml","y","each","index","maxLimit","week","isoWeek","classes","isSame","Date","isoWeekday","isCustom","Array","apply","cname","disabled","replace","selected","timeSelector","i_in_24","time","padded","am_html","pm_html","move","containerTop","parentOffset","top","left","parentRightEdge","width","offset","scrollTop","scrollLeft","clientWidth","outerHeight","scrollHeight","css","right","containerWidth","outerWidth","toggleClass","containerRight","containerLeft","e","_outsideClickProxy","outsideClick","oldStartDate","oldEndDate","trigger","chosenLabel","off","target","type","closest","showCalendars","hideCalendars","label","getAttribute","dates","parents","title","attr","substr","el","dt","stopPropagation","customRange","isLeft","leftOrRight","cal","dateString","isValid","keyCode","preventDefault","newValue","remove","removeData","implementOptions","defaultOptions"],"mappings":"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"} \ No newline at end of file diff --git a/style/vendor/daterangepicker.css b/style/vendor/daterangepicker.css deleted file mode 100644 index a96380496..000000000 --- a/style/vendor/daterangepicker.css +++ /dev/null @@ -1,410 +0,0 @@ -.daterangepicker { - position: absolute; - color: inherit; - background-color: #fff; - border-radius: 4px; - border: 1px solid #ddd; - width: 278px; - max-width: none; - padding: 0; - margin-top: 7px; - top: 100px; - left: 20px; - z-index: 3001; - display: none; - font-family: arial; - font-size: 15px; - line-height: 1em; -} - -.daterangepicker:before, .daterangepicker:after { - position: absolute; - display: inline-block; - border-bottom-color: rgba(0, 0, 0, 0.2); - content: ''; -} - -.daterangepicker:before { - top: -7px; - border-right: 7px solid transparent; - border-left: 7px solid transparent; - border-bottom: 7px solid #ccc; -} - -.daterangepicker:after { - top: -6px; - border-right: 6px solid transparent; - border-bottom: 6px solid #fff; - border-left: 6px solid transparent; -} - -.daterangepicker.opensleft:before { - right: 9px; -} - -.daterangepicker.opensleft:after { - right: 10px; -} - -.daterangepicker.openscenter:before { - left: 0; - right: 0; - width: 0; - margin-left: auto; - margin-right: auto; -} - -.daterangepicker.openscenter:after { - left: 0; - right: 0; - width: 0; - margin-left: auto; - margin-right: auto; -} - -.daterangepicker.opensright:before { - left: 9px; -} - -.daterangepicker.opensright:after { - left: 10px; -} - -.daterangepicker.drop-up { - margin-top: -7px; -} - -.daterangepicker.drop-up:before { - top: initial; - bottom: -7px; - border-bottom: initial; - border-top: 7px solid #ccc; -} - -.daterangepicker.drop-up:after { - top: initial; - bottom: -6px; - border-bottom: initial; - border-top: 6px solid #fff; -} - -.daterangepicker.single .daterangepicker .ranges, .daterangepicker.single .drp-calendar { - float: none; -} - -.daterangepicker.single .drp-selected { - display: none; -} - -.daterangepicker.show-calendar .drp-calendar { - display: block; -} - -.daterangepicker.show-calendar .drp-buttons { - display: block; -} - -.daterangepicker.auto-apply .drp-buttons { - display: none; -} - -.daterangepicker .drp-calendar { - display: none; - max-width: 270px; -} - -.daterangepicker .drp-calendar.left { - padding: 8px 0 8px 8px; -} - -.daterangepicker .drp-calendar.right { - padding: 8px; -} - -.daterangepicker .drp-calendar.single .calendar-table { - border: none; -} - -.daterangepicker .calendar-table .next span, .daterangepicker .calendar-table .prev span { - color: #fff; - border: solid black; - border-width: 0 2px 2px 0; - border-radius: 0; - display: inline-block; - padding: 3px; -} - -.daterangepicker .calendar-table .next span { - transform: rotate(-45deg); - -webkit-transform: rotate(-45deg); -} - -.daterangepicker .calendar-table .prev span { - transform: rotate(135deg); - -webkit-transform: rotate(135deg); -} - -.daterangepicker .calendar-table th, .daterangepicker .calendar-table td { - white-space: nowrap; - text-align: center; - vertical-align: middle; - min-width: 32px; - width: 32px; - height: 24px; - line-height: 24px; - font-size: 12px; - border-radius: 4px; - border: 1px solid transparent; - white-space: nowrap; - cursor: pointer; -} - -.daterangepicker .calendar-table { - border: 1px solid #fff; - border-radius: 4px; - background-color: #fff; -} - -.daterangepicker .calendar-table table { - width: 100%; - margin: 0; - border-spacing: 0; - border-collapse: collapse; -} - -.daterangepicker td.available:hover, .daterangepicker th.available:hover { - background-color: #eee; - border-color: transparent; - color: inherit; -} - -.daterangepicker td.week, .daterangepicker th.week { - font-size: 80%; - color: #ccc; -} - -.daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date { - background-color: #fff; - border-color: transparent; - color: #999; -} - -.daterangepicker td.in-range { - background-color: #ebf4f8; - border-color: transparent; - color: #000; - border-radius: 0; -} - -.daterangepicker td.start-date { - border-radius: 4px 0 0 4px; -} - -.daterangepicker td.end-date { - border-radius: 0 4px 4px 0; -} - -.daterangepicker td.start-date.end-date { - border-radius: 4px; -} - -.daterangepicker td.active, .daterangepicker td.active:hover { - background-color: #357ebd; - border-color: transparent; - color: #fff; -} - -.daterangepicker th.month { - width: auto; -} - -.daterangepicker td.disabled, .daterangepicker option.disabled { - color: #999; - cursor: not-allowed; - text-decoration: line-through; -} - -.daterangepicker select.monthselect, .daterangepicker select.yearselect { - font-size: 12px; - padding: 1px; - height: auto; - margin: 0; - cursor: default; -} - -.daterangepicker select.monthselect { - margin-right: 2%; - width: 56%; -} - -.daterangepicker select.yearselect { - width: 40%; -} - -.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect { - width: 50px; - margin: 0 auto; - background: #eee; - border: 1px solid #eee; - padding: 2px; - outline: 0; - font-size: 12px; -} - -.daterangepicker .calendar-time { - text-align: center; - margin: 4px auto 0 auto; - line-height: 30px; - position: relative; -} - -.daterangepicker .calendar-time select.disabled { - color: #ccc; - cursor: not-allowed; -} - -.daterangepicker .drp-buttons { - clear: both; - text-align: right; - padding: 8px; - border-top: 1px solid #ddd; - display: none; - line-height: 12px; - vertical-align: middle; -} - -.daterangepicker .drp-selected { - display: inline-block; - font-size: 12px; - padding-right: 8px; -} - -.daterangepicker .drp-buttons .btn { - margin-left: 8px; - font-size: 12px; - font-weight: bold; - padding: 4px 8px; -} - -.daterangepicker.show-ranges.single.rtl .drp-calendar.left { - border-right: 1px solid #ddd; -} - -.daterangepicker.show-ranges.single.ltr .drp-calendar.left { - border-left: 1px solid #ddd; -} - -.daterangepicker.show-ranges.rtl .drp-calendar.right { - border-right: 1px solid #ddd; -} - -.daterangepicker.show-ranges.ltr .drp-calendar.left { - border-left: 1px solid #ddd; -} - -.daterangepicker .ranges { - float: none; - text-align: left; - margin: 0; -} - -.daterangepicker.show-calendar .ranges { - margin-top: 8px; -} - -.daterangepicker .ranges ul { - list-style: none; - margin: 0 auto; - padding: 0; - width: 100%; -} - -.daterangepicker .ranges li { - font-size: 12px; - padding: 8px 12px; - cursor: pointer; -} - -.daterangepicker .ranges li:hover { - background-color: #eee; -} - -.daterangepicker .ranges li.active { - background-color: #08c; - color: #fff; -} - -/* Larger Screen Styling */ -@media (min-width: 564px) { - .daterangepicker { - width: auto; - } - - .daterangepicker .ranges ul { - width: 140px; - } - - .daterangepicker.single .ranges ul { - width: 100%; - } - - .daterangepicker.single .drp-calendar.left { - clear: none; - } - - .daterangepicker.single .ranges, .daterangepicker.single .drp-calendar { - float: left; - } - - .daterangepicker { - direction: ltr; - text-align: left; - } - - .daterangepicker .drp-calendar.left { - clear: left; - margin-right: 0; - } - - .daterangepicker .drp-calendar.left .calendar-table { - border-right: none; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - } - - .daterangepicker .drp-calendar.right { - margin-left: 0; - } - - .daterangepicker .drp-calendar.right .calendar-table { - border-left: none; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - } - - .daterangepicker .drp-calendar.left .calendar-table { - padding-right: 8px; - } - - .daterangepicker .ranges, .daterangepicker .drp-calendar { - float: left; - } -} - -@media (min-width: 730px) { - .daterangepicker .ranges { - width: auto; - } - - .daterangepicker .ranges { - float: left; - } - - .daterangepicker.rtl .ranges { - float: right; - } - - .daterangepicker .drp-calendar.left { - clear: none !important; - } -} diff --git a/style/vendor/daterangepicker.min.css b/style/vendor/daterangepicker.min.css new file mode 100644 index 000000000..3d73bc86d --- /dev/null +++ b/style/vendor/daterangepicker.min.css @@ -0,0 +1 @@ +.daterangepicker{position:absolute;color:inherit;background-color:#fff;border-radius:4px;border:1px solid #ddd;width:278px;max-width:none;padding:0;margin-top:7px;top:100px;left:20px;z-index:3001;display:none;font-family:arial;font-size:15px;line-height:1em}.daterangepicker:after,.daterangepicker:before{position:absolute;display:inline-block;border-bottom-color:rgba(0,0,0,.2);content:''}.daterangepicker:before{top:-7px;border-right:7px solid transparent;border-left:7px solid transparent;border-bottom:7px solid #ccc}.daterangepicker:after{top:-6px;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent}.daterangepicker.opensleft:before{right:9px}.daterangepicker.opensleft:after{right:10px}.daterangepicker.openscenter:before{left:0;right:0;width:0;margin-left:auto;margin-right:auto}.daterangepicker.openscenter:after{left:0;right:0;width:0;margin-left:auto;margin-right:auto}.daterangepicker.opensright:before{left:9px}.daterangepicker.opensright:after{left:10px}.daterangepicker.drop-up{margin-top:-7px}.daterangepicker.drop-up:before{top:initial;bottom:-7px;border-bottom:initial;border-top:7px solid #ccc}.daterangepicker.drop-up:after{top:initial;bottom:-6px;border-bottom:initial;border-top:6px solid #fff}.daterangepicker.single .daterangepicker .ranges,.daterangepicker.single .drp-calendar{float:none}.daterangepicker.single .drp-selected{display:none}.daterangepicker.show-calendar .drp-calendar{display:block}.daterangepicker.show-calendar .drp-buttons{display:block}.daterangepicker.auto-apply .drp-buttons{display:none}.daterangepicker .drp-calendar{display:none;max-width:270px}.daterangepicker .drp-calendar.left{padding:8px 0 8px 8px}.daterangepicker .drp-calendar.right{padding:8px}.daterangepicker .drp-calendar.single .calendar-table{border:none}.daterangepicker .calendar-table .next span,.daterangepicker .calendar-table .prev span{color:#fff;border:solid #000;border-width:0 2px 2px 0;border-radius:0;display:inline-block;padding:3px}.daterangepicker .calendar-table .next span{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}.daterangepicker .calendar-table .prev span{transform:rotate(135deg);-webkit-transform:rotate(135deg)}.daterangepicker .calendar-table td,.daterangepicker .calendar-table th{white-space:nowrap;text-align:center;vertical-align:middle;min-width:32px;width:32px;height:24px;line-height:24px;font-size:12px;border-radius:4px;border:1px solid transparent;white-space:nowrap;cursor:pointer}.daterangepicker .calendar-table{border:1px solid #fff;border-radius:4px;background-color:#fff}.daterangepicker .calendar-table table{width:100%;margin:0;border-spacing:0;border-collapse:collapse}.daterangepicker td.available:hover,.daterangepicker th.available:hover{background-color:#eee;border-color:transparent;color:inherit}.daterangepicker td.week,.daterangepicker th.week{font-size:80%;color:#ccc}.daterangepicker td.off,.daterangepicker td.off.end-date,.daterangepicker td.off.in-range,.daterangepicker td.off.start-date{background-color:#fff;border-color:transparent;color:#999}.daterangepicker td.in-range{background-color:#ebf4f8;border-color:transparent;color:#000;border-radius:0}.daterangepicker td.start-date{border-radius:4px 0 0 4px}.daterangepicker td.end-date{border-radius:0 4px 4px 0}.daterangepicker td.start-date.end-date{border-radius:4px}.daterangepicker td.active,.daterangepicker td.active:hover{background-color:#357ebd;border-color:transparent;color:#fff}.daterangepicker th.month{width:auto}.daterangepicker option.disabled,.daterangepicker td.disabled{color:#999;cursor:not-allowed;text-decoration:line-through}.daterangepicker select.monthselect,.daterangepicker select.yearselect{font-size:12px;padding:1px;height:auto;margin:0;cursor:default}.daterangepicker select.monthselect{margin-right:2%;width:56%}.daterangepicker select.yearselect{width:40%}.daterangepicker select.ampmselect,.daterangepicker select.hourselect,.daterangepicker select.minuteselect,.daterangepicker select.secondselect{width:50px;margin:0 auto;background:#eee;border:1px solid #eee;padding:2px;outline:0;font-size:12px}.daterangepicker .calendar-time{text-align:center;margin:4px auto 0 auto;line-height:30px;position:relative}.daterangepicker .calendar-time select.disabled{color:#ccc;cursor:not-allowed}.daterangepicker .drp-buttons{clear:both;text-align:right;padding:8px;border-top:1px solid #ddd;display:none;line-height:12px;vertical-align:middle}.daterangepicker .drp-selected{display:inline-block;font-size:12px;padding-right:8px}.daterangepicker .drp-buttons .btn{margin-left:8px;font-size:12px;font-weight:700;padding:4px 8px}.daterangepicker.show-ranges.single.rtl .drp-calendar.left{border-right:1px solid #ddd}.daterangepicker.show-ranges.single.ltr .drp-calendar.left{border-left:1px solid #ddd}.daterangepicker.show-ranges.rtl .drp-calendar.right{border-right:1px solid #ddd}.daterangepicker.show-ranges.ltr .drp-calendar.left{border-left:1px solid #ddd}.daterangepicker .ranges{float:none;text-align:left;margin:0}.daterangepicker.show-calendar .ranges{margin-top:8px}.daterangepicker .ranges ul{list-style:none;margin:0 auto;padding:0;width:100%}.daterangepicker .ranges li{font-size:12px;padding:8px 12px;cursor:pointer}.daterangepicker .ranges li:hover{background-color:#eee}.daterangepicker .ranges li.active{background-color:#08c;color:#fff}@media (min-width:564px){.daterangepicker{width:auto}.daterangepicker .ranges ul{width:140px}.daterangepicker.single .ranges ul{width:100%}.daterangepicker.single .drp-calendar.left{clear:none}.daterangepicker.single .drp-calendar,.daterangepicker.single .ranges{float:left}.daterangepicker{direction:ltr;text-align:left}.daterangepicker .drp-calendar.left{clear:left;margin-right:0}.daterangepicker .drp-calendar.left .calendar-table{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.daterangepicker .drp-calendar.right{margin-left:0}.daterangepicker .drp-calendar.right .calendar-table{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.daterangepicker .drp-calendar.left .calendar-table{padding-right:8px}.daterangepicker .drp-calendar,.daterangepicker .ranges{float:left}}@media (min-width:730px){.daterangepicker .ranges{width:auto}.daterangepicker .ranges{float:left}.daterangepicker.rtl .ranges{float:right}.daterangepicker .drp-calendar.left{clear:none!important}} \ No newline at end of file From 11f621d574b93522d26fc35a142f06e49f4b2771 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 25 May 2020 17:11:52 +0300 Subject: [PATCH 220/298] Make daterangepicker use the same font as everywhere else. Signed-off-by: XhmikosR --- style/pi-hole.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/style/pi-hole.css b/style/pi-hole.css index 16791c5b6..fba8a0762 100644 --- a/style/pi-hole.css +++ b/style/pi-hole.css @@ -295,3 +295,7 @@ .version-info { margin-top: 10px; } + +.daterangepicker { + font-family: inherit; +} From 4e5cc31134ae4aac61d18eb083e882cba4a56c93 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 29 May 2020 13:02:03 +0300 Subject: [PATCH 221/298] Move animate.min.css style in the pages that use it Signed-off-by: XhmikosR --- scripts/pi-hole/php/header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index d0db70cca..29105340d 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -208,9 +208,9 @@ function pidofFTL() - + From ee40ea3d3682a901fb9f8b32b4b40e989e7a1fa0 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 30 May 2020 09:11:32 +0300 Subject: [PATCH 222/298] Fix sidebar docs link Also work around us using Font Awesome 5.x with AdminLTE 2.x. We should fix the FA classes later. Signed-off-by: XhmikosR --- scripts/pi-hole/php/header.php | 6 +++--- style/pi-hole.css | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index d0db70cca..0a85791d0 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -651,20 +651,20 @@ function pidofFTL() if(strlen($pwhash) > 0 && !$auth) { ?> class="active"> - Login + Login
  • - Donate + Donate
  • - Donate + Documentation
  • diff --git a/style/pi-hole.css b/style/pi-hole.css index 8bfdd8ca8..559ab8e1b 100644 --- a/style/pi-hole.css +++ b/style/pi-hole.css @@ -234,9 +234,11 @@ text-decoration: line-through !important; } -.fa-paypal-icon { - width: 18px; - margin-left: 2px; +/* These are needed because AdmintLTE 2.x doesn't support Font Awesome 5.x */ +.sidebar-menu > li > a > .fab, +.sidebar-menu > li > a > .far, +.sidebar-menu > li > a > .fas { + width: 20px; } /* Utilities */ From af47854a2d5a3027fafd50b77392a1ca343b4933 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 23 May 2020 16:59:09 +0300 Subject: [PATCH 223/298] Use `prop()` for the `disabled` attribute. Signed-off-by: XhmikosR --- scripts/pi-hole/js/debug.js | 4 ++-- scripts/pi-hole/js/gravity.js | 4 ++-- scripts/pi-hole/js/utils.js | 18 +++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/pi-hole/js/debug.js b/scripts/pi-hole/js/debug.js index bf5609d1e..dba012f4b 100644 --- a/scripts/pi-hole/js/debug.js +++ b/scripts/pi-hole/js/debug.js @@ -55,7 +55,7 @@ function eventsource() { } $("#debugBtn").on("click", function () { - $("#debugBtn").attr("disabled", true); - $("#upload").attr("disabled", true); + $("#debugBtn").prop("disabled", true); + $("#upload").prop("disabled", true); eventsource(); }); diff --git a/scripts/pi-hole/js/gravity.js b/scripts/pi-hole/js/gravity.js index 04d08619a..3d52390f8 100644 --- a/scripts/pi-hole/js/gravity.js +++ b/scripts/pi-hole/js/gravity.js @@ -60,7 +60,7 @@ function eventsource() { } $("#gravityBtn").on("click", function () { - $("#gravityBtn").attr("disabled", true); + $("#gravityBtn").prop("disabled", true); eventsource(); }); @@ -76,7 +76,7 @@ $(function () { // gravity.php?go var searchString = window.location.search.substring(1); if (searchString.indexOf("go") !== -1) { - $("#gravityBtn").attr("disabled", true); + $("#gravityBtn").prop("disabled", true); eventsource(); } }); diff --git a/scripts/pi-hole/js/utils.js b/scripts/pi-hole/js/utils.js index fd03d70c1..62deb504d 100644 --- a/scripts/pi-hole/js/utils.js +++ b/scripts/pi-hole/js/utils.js @@ -109,22 +109,22 @@ function datetime(date) { } function disableAll() { - $("input").attr("disabled", true); - $("select").attr("disabled", true); - $("button").attr("disabled", true); - $("textarea").attr("disabled", true); + $("input").prop("disabled", true); + $("select").prop("disabled", true); + $("button").prop("disabled", true); + $("textarea").prop("disabled", true); } function enableAll() { - $("input").attr("disabled", false); - $("select").attr("disabled", false); - $("button").attr("disabled", false); - $("textarea").attr("disabled", false); + $("input").prop("disabled", false); + $("select").prop("disabled", false); + $("button").prop("disabled", false); + $("textarea").prop("disabled", false); // Enable custom input field only if applicable var ip = $("#select") ? $("#select").val() : null; if (ip !== null && ip !== "custom") { - $("#ip-custom").attr("disabled", true); + $("#ip-custom").prop("disabled", true); } } From d3da7b43395aeb7ea75b6f003b2d1efd50d9eec1 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 23 May 2020 16:57:31 +0300 Subject: [PATCH 224/298] gravity.js: replace `removeAttr()` with `prop()` Signed-off-by: XhmikosR --- scripts/pi-hole/js/gravity.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/js/gravity.js b/scripts/pi-hole/js/gravity.js index 04d08619a..a39bec711 100644 --- a/scripts/pi-hole/js/gravity.js +++ b/scripts/pi-hole/js/gravity.js @@ -53,7 +53,7 @@ function eventsource() { alInfo.hide(); }); source.close(); - $("#gravityBtn").removeAttr("disabled"); + $("#gravityBtn").prop("disabled", false); }, false ); From cecb5aa88c611cceb36a16d801a4c1fdf7e7c340 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 23 May 2020 17:04:11 +0300 Subject: [PATCH 225/298] Use `$(fn)` This is the recommended way in jQuery 3.x. Signed-off-by: XhmikosR --- scripts/pi-hole/js/auditlog.js | 2 +- scripts/pi-hole/js/customdns.js | 2 +- scripts/pi-hole/js/db_graph.js | 2 +- scripts/pi-hole/js/db_queries.js | 2 +- scripts/pi-hole/js/footer.js | 2 +- scripts/pi-hole/js/groups-adlists.js | 2 +- scripts/pi-hole/js/groups-clients.js | 2 +- scripts/pi-hole/js/groups-domains.js | 2 +- scripts/pi-hole/js/groups.js | 2 +- scripts/pi-hole/js/index.js | 2 +- scripts/pi-hole/js/messages.js | 2 +- scripts/pi-hole/js/network.js | 2 +- scripts/pi-hole/js/queries.js | 2 +- scripts/pi-hole/js/queryads.js | 2 +- scripts/pi-hole/js/settings.js | 6 +++--- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/scripts/pi-hole/js/auditlog.js b/scripts/pi-hole/js/auditlog.js index 7f80312a3..1212eb736 100644 --- a/scripts/pi-hole/js/auditlog.js +++ b/scripts/pi-hole/js/auditlog.js @@ -127,7 +127,7 @@ function auditUrl(url) { add(url, "audit"); } -$(document).ready(function () { +$(function () { // Pull in data via AJAX updateTopLists(); diff --git a/scripts/pi-hole/js/customdns.js b/scripts/pi-hole/js/customdns.js index 8c2a4d22e..116ea602d 100644 --- a/scripts/pi-hole/js/customdns.js +++ b/scripts/pi-hole/js/customdns.js @@ -37,7 +37,7 @@ function showAlert(type, message) { alertElement.delay(8000).fadeOut(2000); } -$(document).ready(function () { +$(function () { $("#btnAdd").on("click", addCustomDNS); table = $("#customDNSTable").DataTable({ diff --git a/scripts/pi-hole/js/db_graph.js b/scripts/pi-hole/js/db_graph.js index 124fc6f77..6c2dbbe87 100644 --- a/scripts/pi-hole/js/db_graph.js +++ b/scripts/pi-hole/js/db_graph.js @@ -146,7 +146,7 @@ function updateQueriesOverTime() { ); } -$(document).ready(function () { +$(function () { var ctx = document.getElementById("queryOverTimeChart").getContext("2d"); var blockedColor = "#999"; var permittedColor = "#00a65a"; diff --git a/scripts/pi-hole/js/db_queries.js b/scripts/pi-hole/js/db_queries.js index 0b29da023..12a92273d 100644 --- a/scripts/pi-hole/js/db_queries.js +++ b/scripts/pi-hole/js/db_queries.js @@ -233,7 +233,7 @@ function refreshTableData() { tableApi.ajax.url(APIstring).load(reloadCallback); } -$(document).ready(function () { +$(function () { var APIstring; if (instantquery) { diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js index 3b706117e..63ba23de4 100644 --- a/scripts/pi-hole/js/footer.js +++ b/scripts/pi-hole/js/footer.js @@ -125,7 +125,7 @@ function testCookies() { return ret; } -$(document).ready(function () { +$(function () { var enaT = $("#enableTimer"); var target = new Date(parseInt(enaT.html())); var seconds = Math.round((target.getTime() - new Date().getTime()) / 1000); diff --git a/scripts/pi-hole/js/groups-adlists.js b/scripts/pi-hole/js/groups-adlists.js index 2c5bcbdac..4bcdde818 100644 --- a/scripts/pi-hole/js/groups-adlists.js +++ b/scripts/pi-hole/js/groups-adlists.js @@ -23,7 +23,7 @@ function getGroups() { ); } -$(document).ready(function () { +$(function () { $("#btnAdd").on("click", addAdlist); utils.setBsSelectDefaults(); diff --git a/scripts/pi-hole/js/groups-clients.js b/scripts/pi-hole/js/groups-clients.js index fbb6da709..609606ce4 100644 --- a/scripts/pi-hole/js/groups-clients.js +++ b/scripts/pi-hole/js/groups-clients.js @@ -57,7 +57,7 @@ function getGroups() { ); } -$(document).ready(function () { +$(function () { $("#btnAdd").on("click", addClient); reloadClientSuggestions(); diff --git a/scripts/pi-hole/js/groups-domains.js b/scripts/pi-hole/js/groups-domains.js index e707f6614..5a0ad2023 100644 --- a/scripts/pi-hole/js/groups-domains.js +++ b/scripts/pi-hole/js/groups-domains.js @@ -25,7 +25,7 @@ function getGroups() { ); } -$(document).ready(function () { +$(function () { window.location.search .substr(1) .split("&") diff --git a/scripts/pi-hole/js/groups.js b/scripts/pi-hole/js/groups.js index 9a0d9d76f..f7d16d533 100644 --- a/scripts/pi-hole/js/groups.js +++ b/scripts/pi-hole/js/groups.js @@ -10,7 +10,7 @@ var table; var token = $("#token").text(); -$(document).ready(function () { +$(function () { $("#btnAdd").on("click", addGroup); table = $("#groupsTable").DataTable({ diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index e778c3380..7ffdaeafc 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -775,7 +775,7 @@ function updateSummaryData(runOnce) { }); } -$(document).ready(function () { +$(function () { // Pull in data via AJAX updateSummaryData(); diff --git a/scripts/pi-hole/js/messages.js b/scripts/pi-hole/js/messages.js index e1bc20b39..3d27f36fa 100644 --- a/scripts/pi-hole/js/messages.js +++ b/scripts/pi-hole/js/messages.js @@ -62,7 +62,7 @@ function renderMessage(data, type, row) { } } -$(document).ready(function () { +$(function () { $("#messagesTable").DataTable({ ajax: { url: "api_db.php?messages", diff --git a/scripts/pi-hole/js/network.js b/scripts/pi-hole/js/network.js index 4ea3c20fc..88b94db34 100644 --- a/scripts/pi-hole/js/network.js +++ b/scripts/pi-hole/js/network.js @@ -63,7 +63,7 @@ function parseColor(input) { } } -$(document).ready(function () { +$(function () { tableApi = $("#network-entries").DataTable({ rowCallback: function (row, data) { var color, diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 7877d2912..0348504ed 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -107,7 +107,7 @@ function autofilter() { return $("#autofilter").prop("checked"); } -$(document).ready(function () { +$(function () { // Do we want to filter queries? var GETDict = {}; window.location.search diff --git a/scripts/pi-hole/js/queryads.js b/scripts/pi-hole/js/queryads.js index 6fb340c72..676531772 100644 --- a/scripts/pi-hole/js/queryads.js +++ b/scripts/pi-hole/js/queryads.js @@ -121,6 +121,6 @@ $(window).on("resize", function () { .addClass("input-group-btn"); } }); -$(document).ready(function () { +$(function () { $(window).trigger("resize"); }); diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index f6f106920..375980072 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -167,7 +167,7 @@ function loadCacheInfo() { } var leasetable, staticleasetable; -$(document).ready(function () { +$(function () { if (document.getElementById("DHCPLeasesTable")) { leasetable = $("#DHCPLeasesTable").DataTable({ dom: "<'row'<'col-sm-12'tr>><'row'<'col-sm-6'i><'col-sm-6'f>>", @@ -225,7 +225,7 @@ $(function () { }); // DHCP leases tooltips -$(document).ready(function () { +$(function () { $('[data-toggle="tooltip"]').tooltip({ html: true, container: "body" }); }); @@ -241,7 +241,7 @@ $(".nav-tabs a").on("shown.bs.tab", function (e) { }); // Auto dismissal for info notifications -$(document).ready(function () { +$(function () { var alInfo = $("#alInfo"); if (alInfo.length > 0) { alInfo.delay(3000).fadeOut(2000, function () { From 105d8804732ed1c3c737e380aec33da13b6cf340 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sat, 30 May 2020 15:52:34 +0100 Subject: [PATCH 226/298] final null check on stateLoadCallBack (#1411) Signed-off-by: Adam Warner --- scripts/pi-hole/js/messages.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/pi-hole/js/messages.js b/scripts/pi-hole/js/messages.js index 3d27f36fa..124a69e20 100644 --- a/scripts/pi-hole/js/messages.js +++ b/scripts/pi-hole/js/messages.js @@ -99,6 +99,11 @@ $(function () { }, stateLoadCallback: function () { var data = utils.stateLoadCallback("messages-table"); + // Return if not available + if (data === null) { + return null; + } + // Reset visibility of ID and blob columns var hiddenCols = [0, 4, 5, 6, 7, 8]; for (var key in hiddenCols) { From ff16f4889b7888eeab7d9263b2a5fda34d8b19a5 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 30 May 2020 18:20:18 +0300 Subject: [PATCH 227/298] network.js: minor consistency changes Signed-off-by: XhmikosR --- scripts/pi-hole/js/network.js | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/scripts/pi-hole/js/network.js b/scripts/pi-hole/js/network.js index 88b94db34..504cef21f 100644 --- a/scripts/pi-hole/js/network.js +++ b/scripts/pi-hole/js/network.js @@ -9,11 +9,13 @@ var tableApi; -var APIstring = "api_db.php?network"; +var API_STRING = "api_db.php?network"; // How many IPs do we show at most per device? var MAXIPDISPLAY = 3; +var DAY_IN_SECONDS = 24 * 60 * 60; + function handleAjaxError(xhr, textStatus) { if (textStatus === "timeout") { alert("The server took too long to send the data."); @@ -56,32 +58,31 @@ function mixColors(ratio, rgb1, rgb2) { } function parseColor(input) { - var m; - m = input.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i); - if (m) { - return [m[1], m[2], m[3]]; + var match = input.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i); + + if (match) { + return [match[1], match[2], match[3]]; } } $(function () { tableApi = $("#network-entries").DataTable({ rowCallback: function (row, data) { - var color, - iconClasses, - lastQuery = parseInt(data.lastQuery); + var color; + var iconClasses; + var lastQuery = parseInt(data.lastQuery); + var diff = getTimestamp() - lastQuery; var networkRecent = $(".network-recent").css("background-color"); var networkOld = $(".network-old").css("background-color"); var networkOlder = $(".network-older").css("background-color"); var networkNever = $(".network-never").css("background-color"); + if (lastQuery > 0) { - var diff = getTimestamp() - lastQuery; - if (diff <= 86400) { - // Last query came in within the last 24 hours (24*60*60 = 86400) + if (diff <= DAY_IN_SECONDS) { + // Last query came in within the last 24 hours // Color: light-green to light-yellow - var ratio = Number(diff) / 86400; - var lightgreen = parseColor(networkRecent); - var lightyellow = parseColor(networkOld); - color = rgbToHex(mixColors(ratio, lightgreen, lightyellow)); + var ratio = Number(diff) / DAY_IN_SECONDS; + color = rgbToHex(mixColors(ratio, parseColor(networkRecent), parseColor(networkOld))); iconClasses = "fas fa-check"; } else { // Last query was longer than 24 hours ago @@ -146,7 +147,7 @@ $(function () { "<'row'<'col-sm-4'l><'col-sm-8'p>>" + "<'row'<'col-sm-12'<'table-responsive'tr>>>" + "<'row'<'col-sm-5'i><'col-sm-7'p>>", - ajax: { url: APIstring, error: handleAjaxError, dataSrc: "network" }, + ajax: { url: API_STRING, error: handleAjaxError, dataSrc: "network" }, autoWidth: false, processing: true, order: [[5, "desc"]], From e9fc5a20ca4a866ee411e6f7b19de216b23ae961 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 31 May 2020 15:55:42 +0300 Subject: [PATCH 228/298] Revert "header: Move license header at the top" Signed-off-by: XhmikosR --- scripts/pi-hole/php/header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index ddf30924e..6cd289d5f 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -168,13 +168,13 @@ function pidofFTL() $piholeFTLConf = piholeFTLConfig(); ?> + - From 4cca206810109d72c871193fc1767f19524fa257 Mon Sep 17 00:00:00 2001 From: Chris Coffin <948066+magnolialogic@users.noreply.github.com> Date: Mon, 1 Jun 2020 14:47:33 -0400 Subject: [PATCH 229/298] Change "Permanently" toggle to "Indefinitely" (#1416) * Changing "Permanently" toggle to "Indefinitely" Signed-off-by: Chris Coffin * Updating ID name in footer.js Signed-off-by: Chris Coffin Co-authored-by: Adam Warner --- scripts/pi-hole/js/footer.js | 2 +- scripts/pi-hole/php/header.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js index 63ba23de4..b5b69460d 100644 --- a/scripts/pi-hole/js/footer.js +++ b/scripts/pi-hole/js/footer.js @@ -155,7 +155,7 @@ $("#pihole-enable").on("click", function (e) { localStorage.removeItem("countDownTarget"); piholeChange("enable", ""); }); -$("#pihole-disable-permanently").on("click", function (e) { +$("#pihole-disable-indefinitely").on("click", function (e) { e.preventDefault(); piholeChange("disable", "0"); }); diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index 6cd289d5f..65ed77fc0 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -534,8 +534,8 @@ function pidofFTL()
    • - - Permanently + + Indefinitely
    • From ee89ab313159484ee560dec2cadab319db90d874 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Mon, 1 Jun 2020 20:49:31 +0100 Subject: [PATCH 230/298] Include hostname in backup filename. Will add nothing if no hostname detected. Signed-off-by: Adam Warner --- scripts/pi-hole/php/teleporter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/pi-hole/php/teleporter.php b/scripts/pi-hole/php/teleporter.php index bbe17e68c..52951067c 100644 --- a/scripts/pi-hole/php/teleporter.php +++ b/scripts/pi-hole/php/teleporter.php @@ -540,7 +540,8 @@ function process_file($contents) } else { - $tarname = "pi-hole-teleporter_".date("Y-m-d_H-i-s").".tar"; + $hostname = gethostname() ? gethostname()."-" : ""; + $tarname = "pi-hole-".$hostname."teleporter_".date("Y-m-d_H-i-s").".tar"; $filename = $tarname.".gz"; $archive_file_name = sys_get_temp_dir() ."/". $tarname; $archive = new PharData($archive_file_name); From 02a4e83d8766146e78747de759134370dc5997ec Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Mon, 1 Jun 2020 21:10:14 +0100 Subject: [PATCH 231/298] create utils.getGraphType() function. also apply setting to long term graphs flip logic - only return "line" if the setting is explicitly set to "false" Signed-off-by: Adam Warner --- scripts/pi-hole/js/db_graph.js | 2 +- scripts/pi-hole/js/index.js | 7 ++----- scripts/pi-hole/js/utils.js | 8 +++++++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/scripts/pi-hole/js/db_graph.js b/scripts/pi-hole/js/db_graph.js index 6c2dbbe87..d1c2f2ac3 100644 --- a/scripts/pi-hole/js/db_graph.js +++ b/scripts/pi-hole/js/db_graph.js @@ -151,7 +151,7 @@ $(function () { var blockedColor = "#999"; var permittedColor = "#00a65a"; timeLineChart = new Chart(ctx, { - type: "bar", + type: utils.getGraphType(), data: { labels: [], datasets: [ diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 7ffdaeafc..d6b479e77 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -783,12 +783,9 @@ $(function () { var permittedColor = $(".queries-permitted").css("background-color"); var gridColor = $(".graphs-grid").css("background-color"); var ticksColor = $(".graphs-ticks").css("color"); - - var graphType = localStorage.getItem("barchart_chkbox") === "true" ? "bar" : "line"; - var ctx = document.getElementById("queryOverTimeChart").getContext("2d"); timeLineChart = new Chart(ctx, { - type: graphType, + type: utils.getGraphType(), data: { labels: [], datasets: [ @@ -906,7 +903,7 @@ $(function () { if (clientsChartEl) { ctx = clientsChartEl.getContext("2d"); clientsChart = new Chart(ctx, { - type: graphType, + type: utils.getGraphType(), data: { labels: [], datasets: [{ data: [] }] diff --git a/scripts/pi-hole/js/utils.js b/scripts/pi-hole/js/utils.js index 62deb504d..4e5a4af6c 100644 --- a/scripts/pi-hole/js/utils.js +++ b/scripts/pi-hole/js/utils.js @@ -207,6 +207,11 @@ function stateLoadCallback(itemName) { return data; } +function getGraphType() { + // Only return line if `barchart_chkbox` is explicitly set to false. Else return bar + return localStorage.getItem("barchart_chkbox") === "false" ? "line" : "bar"; +} + window.utils = (function () { return { escapeHtml: escapeHtml, @@ -220,6 +225,7 @@ window.utils = (function () { validateIPv6CIDR: validateIPv6CIDR, setBsSelectDefaults: setBsSelectDefaults, stateSaveCallback: stateSaveCallback, - stateLoadCallback: stateLoadCallback + stateLoadCallback: stateLoadCallback, + getGraphType: getGraphType }; })(); From e7eec95ba4f9efe6d8d865a8b57a5e5f13a24b5a Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 2 Jun 2020 10:03:32 +0200 Subject: [PATCH 232/298] Use all the new Pi-hole v5.0 blocking status code also in the long-term data where it was forgotten to add them. Signed-off-by: DL6ER --- api_db.php | 4 ++-- scripts/pi-hole/js/db_queries.js | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api_db.php b/api_db.php index ce5006a8e..6203d5d14 100644 --- a/api_db.php +++ b/api_db.php @@ -269,7 +269,7 @@ function resolveHostname($clientip, $printIP) { $limit = " AND timestamp <= :until"; } - $stmt = $db->prepare('SELECT domain,count(domain) FROM queries WHERE (STATUS == 1 OR STATUS == 4)'.$limit.' GROUP by domain order by count(domain) desc limit 10'); + $stmt = $db->prepare('SELECT domain,count(domain) FROM queries WHERE (STATUS == 1 OR STATUS > 3)'.$limit.' GROUP by domain order by count(domain) desc limit 10'); $stmt->bindValue(":from", intval($_GET['from']), SQLITE3_INTEGER); $stmt->bindValue(":until", intval($_GET['until']), SQLITE3_INTEGER); $results = $stmt->execute(); @@ -401,7 +401,7 @@ function parseDBData($results, $interval, $from, $until) { $data = array_merge($data, $result); // Count blocked queries in intervals - $stmt = $db->prepare('SELECT (timestamp/:interval)*:interval interval, COUNT(*) FROM queries WHERE (status == 1 OR status == 4 OR status == 5)'.$limit.' GROUP by interval ORDER by interval'); + $stmt = $db->prepare('SELECT (timestamp/:interval)*:interval interval, COUNT(*) FROM queries WHERE (status == 1 OR status > 3)'.$limit.' GROUP by interval ORDER by interval'); $stmt->bindValue(":from", $from, SQLITE3_INTEGER); $stmt->bindValue(":until", $until, SQLITE3_INTEGER); $stmt->bindValue(":interval", $interval, SQLITE3_INTEGER); diff --git a/scripts/pi-hole/js/db_queries.js b/scripts/pi-hole/js/db_queries.js index 12a92273d..7396f23ba 100644 --- a/scripts/pi-hole/js/db_queries.js +++ b/scripts/pi-hole/js/db_queries.js @@ -198,13 +198,13 @@ var reloadCallback = function () { statistics = [0, 0, 0, 0]; var data = tableApi.rows().data(); for (var i = 0; i < data.length; i++) { - statistics[0]++; - if (data[i][4] === 1) { - statistics[2]++; + statistics[0]++; // TOTAL query + if (data[i][4] === 1 || (data[i][4] > 4 && data[i][4] !== 10)) { + statistics[2]++; // EXACT blocked } else if (data[i][4] === 3) { - statistics[1]++; - } else if (data[i][4] === 4) { - statistics[3]++; + statistics[1]++; // CACHE query + } else if (data[i][4] === 4 || data[i][4] === 10) { + statistics[3]++; // REGEX blocked } } From 332cff1d362827e680ceb9f845c65b682fbd3156 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 2 Jun 2020 11:37:23 +0200 Subject: [PATCH 233/298] Improve warnings on the domain management pages. Signed-off-by: DL6ER --- scripts/pi-hole/js/groups-domains.js | 2 +- scripts/pi-hole/php/groups.php | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/pi-hole/js/groups-domains.js b/scripts/pi-hole/js/groups-domains.js index 5a0ad2023..f2b7f2d43 100644 --- a/scripts/pi-hole/js/groups-domains.js +++ b/scripts/pi-hole/js/groups-domains.js @@ -361,7 +361,7 @@ function addDomain() { success: function (response) { utils.enableAll(); if (response.success) { - utils.showAlert("success", "fas fa-plus", "Successfully added " + domainRegex, domain); + utils.showAlert("success", "fas fa-plus", "Success!", response.message); domainEl.val(""); commentEl.val(""); wildcardEl.prop("checked", false); diff --git a/scripts/pi-hole/php/groups.php b/scripts/pi-hole/php/groups.php index 83ab4969a..0d352a04c 100644 --- a/scripts/pi-hole/php/groups.php +++ b/scripts/pi-hole/php/groups.php @@ -449,6 +449,7 @@ function JSON_error($message = null) // Add new domain try { $domains = explode(' ', trim($_POST['domain'])); + $before = intval($db->querySingle("SELECT COUNT(*) FROM domainlist;")); $total = count($domains); $added = 0; $stmt = $db->prepare('REPLACE INTO domainlist (domain,type,comment) VALUES (:domain,:type,:comment)'); @@ -525,8 +526,23 @@ function JSON_error($message = null) $added++; } + $after = intval($db->querySingle("SELECT COUNT(*) FROM domainlist;")); + $difference = $after - $before; + if($total === 1) { + if($difference !== 1) { + $msg = "Not adding ". htmlentities(utf8_encode($domain)) . " as it is already on the list"; + } else { + $msg = "Added " . htmlentities(utf8_encode($domain)); + } + } else { + if($difference !== $total) { + $msg = "Added " . ($after-$before) . " out of ". $total . " domains (skipped duplicates)"; + } else { + $msg = "Added " . $total . " domains"; + } + } $reload = true; - JSON_success(); + JSON_success($msg); } catch (\Exception $ex) { JSON_error($ex->getMessage()); } @@ -865,5 +881,4 @@ function JSON_error($message = null) // Reload lists in pihole-FTL after having added something if ($reload) { $output = pihole_execute('restartdns reload-lists'); - echo implode("\n", $output); } From 578477148bccfbc4d436082fed53ec69b99e4370 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 2 Jun 2020 13:21:17 +0200 Subject: [PATCH 234/298] On fast machines, cache replies can be served within less than 100 nanoseconds. The query log should show "(0.0ms)" in this case instead of hiding the value altogether. Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 0348504ed..e6ee53477 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -351,7 +351,7 @@ $(function () { $("td:eq(5)", row).html(replytext); - if (data.length > 7 && data[7] > 0) { + if (data.length > 7) { var content = $("td:eq(5)", row).html(); $("td:eq(5)", row).html(content + " (" + (0.1 * data[7]).toFixed(1) + "ms)"); } From 0e4d1e4e7f3035686c9b6b567e4ea7f31b4bcbab Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 26 May 2020 00:58:44 +0200 Subject: [PATCH 235/298] Implement per-browser checkbox and radio button styling using icheck-material. Signed-off-by: DL6ER --- db_queries.php | 18 +- groups-domains.php | 2 +- queries.php | 5 +- scripts/pi-hole/js/footer.js | 17 +- scripts/pi-hole/js/settings.js | 13 + scripts/pi-hole/php/header.php | 3 +- scripts/pi-hole/php/theme.php | 13 +- settings.php | 371 ++++++---- style/vendor/iCheck/all.css | 61 -- style/vendor/iCheck/flat/_all.css | 530 -------------- style/vendor/iCheck/flat/aero.css | 53 -- style/vendor/iCheck/flat/aero.png | Bin 1520 -> 0 bytes style/vendor/iCheck/flat/aero@2x.png | Bin 3218 -> 0 bytes style/vendor/iCheck/flat/blue.css | 53 -- style/vendor/iCheck/flat/blue.png | Bin 1518 -> 0 bytes style/vendor/iCheck/flat/blue@2x.png | Bin 3217 -> 0 bytes style/vendor/iCheck/flat/flat.css | 53 -- style/vendor/iCheck/flat/flat.png | Bin 1515 -> 0 bytes style/vendor/iCheck/flat/flat@2x.png | Bin 3217 -> 0 bytes style/vendor/iCheck/flat/green.css | 53 -- style/vendor/iCheck/flat/green.png | Bin 1444 -> 0 bytes style/vendor/iCheck/flat/green@2x.png | Bin 3117 -> 0 bytes style/vendor/iCheck/flat/grey.css | 53 -- style/vendor/iCheck/flat/grey.png | Bin 1516 -> 0 bytes style/vendor/iCheck/flat/grey@2x.png | Bin 3217 -> 0 bytes style/vendor/iCheck/flat/orange.css | 53 -- style/vendor/iCheck/flat/orange.png | Bin 1518 -> 0 bytes style/vendor/iCheck/flat/orange@2x.png | Bin 3275 -> 0 bytes style/vendor/iCheck/flat/pink.css | 53 -- style/vendor/iCheck/flat/pink.png | Bin 1522 -> 0 bytes style/vendor/iCheck/flat/pink@2x.png | Bin 3218 -> 0 bytes style/vendor/iCheck/flat/purple.css | 53 -- style/vendor/iCheck/flat/purple.png | Bin 1519 -> 0 bytes style/vendor/iCheck/flat/purple@2x.png | Bin 3218 -> 0 bytes style/vendor/iCheck/flat/red.css | 53 -- style/vendor/iCheck/flat/red.png | Bin 1516 -> 0 bytes style/vendor/iCheck/flat/red@2x.png | Bin 3276 -> 0 bytes style/vendor/iCheck/flat/yellow.css | 53 -- style/vendor/iCheck/flat/yellow.png | Bin 1516 -> 0 bytes style/vendor/iCheck/flat/yellow@2x.png | Bin 3216 -> 0 bytes style/vendor/iCheck/futurico/futurico.css | 53 -- style/vendor/iCheck/futurico/futurico.png | Bin 1734 -> 0 bytes style/vendor/iCheck/futurico/futurico@2x.png | Bin 3446 -> 0 bytes style/vendor/iCheck/line/_all.css | 710 ------------------- style/vendor/iCheck/line/aero.css | 71 -- style/vendor/iCheck/line/blue.css | 71 -- style/vendor/iCheck/line/green.css | 71 -- style/vendor/iCheck/line/grey.css | 71 -- style/vendor/iCheck/line/line.css | 71 -- style/vendor/iCheck/line/line.png | Bin 588 -> 0 bytes style/vendor/iCheck/line/line@2x.png | Bin 1073 -> 0 bytes style/vendor/iCheck/line/orange.css | 71 -- style/vendor/iCheck/line/pink.css | 71 -- style/vendor/iCheck/line/purple.css | 71 -- style/vendor/iCheck/line/red.css | 71 -- style/vendor/iCheck/line/yellow.css | 71 -- style/vendor/iCheck/minimal/_all.css | 590 --------------- style/vendor/iCheck/minimal/aero.css | 59 -- style/vendor/iCheck/minimal/aero.png | Bin 1151 -> 0 bytes style/vendor/iCheck/minimal/aero@2x.png | Bin 1409 -> 0 bytes style/vendor/iCheck/minimal/blue.css | 59 -- style/vendor/iCheck/minimal/blue.png | Bin 1132 -> 0 bytes style/vendor/iCheck/minimal/blue@2x.png | Bin 1410 -> 0 bytes style/vendor/iCheck/minimal/green.css | 59 -- style/vendor/iCheck/minimal/green.png | Bin 1143 -> 0 bytes style/vendor/iCheck/minimal/green@2x.png | Bin 1408 -> 0 bytes style/vendor/iCheck/minimal/grey.css | 59 -- style/vendor/iCheck/minimal/grey.png | Bin 1142 -> 0 bytes style/vendor/iCheck/minimal/grey@2x.png | Bin 1407 -> 0 bytes style/vendor/iCheck/minimal/minimal.css | 59 -- style/vendor/iCheck/minimal/minimal.png | Bin 1114 -> 0 bytes style/vendor/iCheck/minimal/minimal@2x.png | Bin 1410 -> 0 bytes style/vendor/iCheck/minimal/orange.css | 59 -- style/vendor/iCheck/minimal/orange.png | Bin 1139 -> 0 bytes style/vendor/iCheck/minimal/orange@2x.png | Bin 1407 -> 0 bytes style/vendor/iCheck/minimal/pink.css | 59 -- style/vendor/iCheck/minimal/pink.png | Bin 1150 -> 0 bytes style/vendor/iCheck/minimal/pink@2x.png | Bin 1409 -> 0 bytes style/vendor/iCheck/minimal/purple.css | 59 -- style/vendor/iCheck/minimal/purple.png | Bin 1132 -> 0 bytes style/vendor/iCheck/minimal/purple@2x.png | Bin 1409 -> 0 bytes style/vendor/iCheck/minimal/red.css | 59 -- style/vendor/iCheck/minimal/red.png | Bin 1130 -> 0 bytes style/vendor/iCheck/minimal/red@2x.png | Bin 1410 -> 0 bytes style/vendor/iCheck/minimal/yellow.css | 59 -- style/vendor/iCheck/minimal/yellow.png | Bin 1135 -> 0 bytes style/vendor/iCheck/minimal/yellow@2x.png | Bin 1406 -> 0 bytes style/vendor/iCheck/polaris/polaris.css | 59 -- style/vendor/iCheck/polaris/polaris.png | Bin 6401 -> 0 bytes style/vendor/iCheck/polaris/polaris@2x.png | Bin 16760 -> 0 bytes style/vendor/iCheck/square/_all.css | 590 --------------- style/vendor/iCheck/square/aero.css | 59 -- style/vendor/iCheck/square/aero.png | Bin 2167 -> 0 bytes style/vendor/iCheck/square/aero@2x.png | Bin 4455 -> 0 bytes style/vendor/iCheck/square/blue.css | 59 -- style/vendor/iCheck/square/blue.png | Bin 2185 -> 0 bytes style/vendor/iCheck/square/blue@2x.png | Bin 4485 -> 0 bytes style/vendor/iCheck/square/green.css | 59 -- style/vendor/iCheck/square/green.png | Bin 2193 -> 0 bytes style/vendor/iCheck/square/green@2x.png | Bin 4498 -> 0 bytes style/vendor/iCheck/square/grey.css | 59 -- style/vendor/iCheck/square/grey.png | Bin 2186 -> 0 bytes style/vendor/iCheck/square/grey@2x.png | Bin 4483 -> 0 bytes style/vendor/iCheck/square/orange.css | 59 -- style/vendor/iCheck/square/orange.png | Bin 2181 -> 0 bytes style/vendor/iCheck/square/orange@2x.png | Bin 4474 -> 0 bytes style/vendor/iCheck/square/pink.css | 59 -- style/vendor/iCheck/square/pink.png | Bin 2189 -> 0 bytes style/vendor/iCheck/square/pink@2x.png | Bin 4479 -> 0 bytes style/vendor/iCheck/square/purple.css | 59 -- style/vendor/iCheck/square/purple.png | Bin 2188 -> 0 bytes style/vendor/iCheck/square/purple@2x.png | Bin 4501 -> 0 bytes style/vendor/iCheck/square/red.css | 59 -- style/vendor/iCheck/square/red.png | Bin 2190 -> 0 bytes style/vendor/iCheck/square/red@2x.png | Bin 4490 -> 0 bytes style/vendor/iCheck/square/square.css | 59 -- style/vendor/iCheck/square/square.png | Bin 2175 -> 0 bytes style/vendor/iCheck/square/square@2x.png | Bin 4478 -> 0 bytes style/vendor/iCheck/square/yellow.css | 59 -- style/vendor/iCheck/square/yellow.png | Bin 2131 -> 0 bytes style/vendor/iCheck/square/yellow@2x.png | Bin 4385 -> 0 bytes style/vendor/icheck-material.min.css | 6 + 122 files changed, 289 insertions(+), 5172 deletions(-) delete mode 100644 style/vendor/iCheck/all.css delete mode 100644 style/vendor/iCheck/flat/_all.css delete mode 100644 style/vendor/iCheck/flat/aero.css delete mode 100644 style/vendor/iCheck/flat/aero.png delete mode 100644 style/vendor/iCheck/flat/aero@2x.png delete mode 100644 style/vendor/iCheck/flat/blue.css delete mode 100644 style/vendor/iCheck/flat/blue.png delete mode 100644 style/vendor/iCheck/flat/blue@2x.png delete mode 100644 style/vendor/iCheck/flat/flat.css delete mode 100644 style/vendor/iCheck/flat/flat.png delete mode 100644 style/vendor/iCheck/flat/flat@2x.png delete mode 100644 style/vendor/iCheck/flat/green.css delete mode 100644 style/vendor/iCheck/flat/green.png delete mode 100644 style/vendor/iCheck/flat/green@2x.png delete mode 100644 style/vendor/iCheck/flat/grey.css delete mode 100644 style/vendor/iCheck/flat/grey.png delete mode 100644 style/vendor/iCheck/flat/grey@2x.png delete mode 100644 style/vendor/iCheck/flat/orange.css delete mode 100644 style/vendor/iCheck/flat/orange.png delete mode 100644 style/vendor/iCheck/flat/orange@2x.png delete mode 100644 style/vendor/iCheck/flat/pink.css delete mode 100644 style/vendor/iCheck/flat/pink.png delete mode 100644 style/vendor/iCheck/flat/pink@2x.png delete mode 100644 style/vendor/iCheck/flat/purple.css delete mode 100644 style/vendor/iCheck/flat/purple.png delete mode 100644 style/vendor/iCheck/flat/purple@2x.png delete mode 100644 style/vendor/iCheck/flat/red.css delete mode 100644 style/vendor/iCheck/flat/red.png delete mode 100644 style/vendor/iCheck/flat/red@2x.png delete mode 100644 style/vendor/iCheck/flat/yellow.css delete mode 100644 style/vendor/iCheck/flat/yellow.png delete mode 100644 style/vendor/iCheck/flat/yellow@2x.png delete mode 100644 style/vendor/iCheck/futurico/futurico.css delete mode 100644 style/vendor/iCheck/futurico/futurico.png delete mode 100644 style/vendor/iCheck/futurico/futurico@2x.png delete mode 100644 style/vendor/iCheck/line/_all.css delete mode 100644 style/vendor/iCheck/line/aero.css delete mode 100644 style/vendor/iCheck/line/blue.css delete mode 100644 style/vendor/iCheck/line/green.css delete mode 100644 style/vendor/iCheck/line/grey.css delete mode 100644 style/vendor/iCheck/line/line.css delete mode 100644 style/vendor/iCheck/line/line.png delete mode 100644 style/vendor/iCheck/line/line@2x.png delete mode 100644 style/vendor/iCheck/line/orange.css delete mode 100644 style/vendor/iCheck/line/pink.css delete mode 100644 style/vendor/iCheck/line/purple.css delete mode 100644 style/vendor/iCheck/line/red.css delete mode 100644 style/vendor/iCheck/line/yellow.css delete mode 100644 style/vendor/iCheck/minimal/_all.css delete mode 100644 style/vendor/iCheck/minimal/aero.css delete mode 100644 style/vendor/iCheck/minimal/aero.png delete mode 100644 style/vendor/iCheck/minimal/aero@2x.png delete mode 100644 style/vendor/iCheck/minimal/blue.css delete mode 100644 style/vendor/iCheck/minimal/blue.png delete mode 100644 style/vendor/iCheck/minimal/blue@2x.png delete mode 100644 style/vendor/iCheck/minimal/green.css delete mode 100644 style/vendor/iCheck/minimal/green.png delete mode 100644 style/vendor/iCheck/minimal/green@2x.png delete mode 100644 style/vendor/iCheck/minimal/grey.css delete mode 100644 style/vendor/iCheck/minimal/grey.png delete mode 100644 style/vendor/iCheck/minimal/grey@2x.png delete mode 100644 style/vendor/iCheck/minimal/minimal.css delete mode 100644 style/vendor/iCheck/minimal/minimal.png delete mode 100644 style/vendor/iCheck/minimal/minimal@2x.png delete mode 100644 style/vendor/iCheck/minimal/orange.css delete mode 100644 style/vendor/iCheck/minimal/orange.png delete mode 100644 style/vendor/iCheck/minimal/orange@2x.png delete mode 100644 style/vendor/iCheck/minimal/pink.css delete mode 100644 style/vendor/iCheck/minimal/pink.png delete mode 100644 style/vendor/iCheck/minimal/pink@2x.png delete mode 100644 style/vendor/iCheck/minimal/purple.css delete mode 100644 style/vendor/iCheck/minimal/purple.png delete mode 100644 style/vendor/iCheck/minimal/purple@2x.png delete mode 100644 style/vendor/iCheck/minimal/red.css delete mode 100644 style/vendor/iCheck/minimal/red.png delete mode 100644 style/vendor/iCheck/minimal/red@2x.png delete mode 100644 style/vendor/iCheck/minimal/yellow.css delete mode 100644 style/vendor/iCheck/minimal/yellow.png delete mode 100644 style/vendor/iCheck/minimal/yellow@2x.png delete mode 100644 style/vendor/iCheck/polaris/polaris.css delete mode 100644 style/vendor/iCheck/polaris/polaris.png delete mode 100644 style/vendor/iCheck/polaris/polaris@2x.png delete mode 100644 style/vendor/iCheck/square/_all.css delete mode 100644 style/vendor/iCheck/square/aero.css delete mode 100644 style/vendor/iCheck/square/aero.png delete mode 100644 style/vendor/iCheck/square/aero@2x.png delete mode 100644 style/vendor/iCheck/square/blue.css delete mode 100644 style/vendor/iCheck/square/blue.png delete mode 100644 style/vendor/iCheck/square/blue@2x.png delete mode 100644 style/vendor/iCheck/square/green.css delete mode 100644 style/vendor/iCheck/square/green.png delete mode 100644 style/vendor/iCheck/square/green@2x.png delete mode 100644 style/vendor/iCheck/square/grey.css delete mode 100644 style/vendor/iCheck/square/grey.png delete mode 100644 style/vendor/iCheck/square/grey@2x.png delete mode 100644 style/vendor/iCheck/square/orange.css delete mode 100644 style/vendor/iCheck/square/orange.png delete mode 100644 style/vendor/iCheck/square/orange@2x.png delete mode 100644 style/vendor/iCheck/square/pink.css delete mode 100644 style/vendor/iCheck/square/pink.png delete mode 100644 style/vendor/iCheck/square/pink@2x.png delete mode 100644 style/vendor/iCheck/square/purple.css delete mode 100644 style/vendor/iCheck/square/purple.png delete mode 100644 style/vendor/iCheck/square/purple@2x.png delete mode 100644 style/vendor/iCheck/square/red.css delete mode 100644 style/vendor/iCheck/square/red.png delete mode 100644 style/vendor/iCheck/square/red@2x.png delete mode 100644 style/vendor/iCheck/square/square.css delete mode 100644 style/vendor/iCheck/square/square.png delete mode 100644 style/vendor/iCheck/square/square@2x.png delete mode 100644 style/vendor/iCheck/square/yellow.css delete mode 100644 style/vendor/iCheck/square/yellow.png delete mode 100644 style/vendor/iCheck/square/yellow@2x.png create mode 100644 style/vendor/icheck-material.min.css diff --git a/db_queries.php b/db_queries.php index 18b729d98..fdb2f0553 100644 --- a/db_queries.php +++ b/db_queries.php @@ -43,21 +43,21 @@
    -
    - +

    +
    -
    - +

    +
    -
    - +

    +
    -
    -
    - +

    +

    +
    diff --git a/groups-domains.php b/groups-domains.php index 3d23b7235..45d9a0bd3 100644 --- a/groups-domains.php +++ b/groups-domains.php @@ -52,7 +52,7 @@ - + diff --git a/queries.php b/queries.php index a1e2695b6..3723ed17c 100644 --- a/queries.php +++ b/queries.php @@ -138,7 +138,10 @@ -
    +
    + + +
    diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js index b5b69460d..05fe10971 100644 --- a/scripts/pi-hole/js/footer.js +++ b/scripts/pi-hole/js/footer.js @@ -125,6 +125,15 @@ function testCookies() { return ret; } +function applyCheckboxRadioStyle() { + var chkboxStyle = localStorage.getItem("theme_icheck"); + if (chkboxStyle === null) { + chkboxStyle = "material-blue"; + } + $("input[type='radio'],input[type='checkbox']").parent().removeClass(); + $("input[type='radio'],input[type='checkbox']").parent().addClass("icheck-" + chkboxStyle); +} + $(function () { var enaT = $("#enableTimer"); var target = new Date(parseInt(enaT.html())); @@ -137,12 +146,8 @@ $(function () { $("#cookieInfo").show(); } - var checkboxTheme = $("#checkbox_theme").text(); - $("input").icheck({ - checkboxClass: "icheckbox_" + checkboxTheme, - radioClass: "iradio_" + checkboxTheme, - increaseArea: "20%" - }); + applyCheckboxRadioStyle(); + // Run check immediately after page loading ... checkMessages(); // ... and once again with five seconds delay diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index 375980072..de0d994da 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -274,4 +274,17 @@ $(function () { bargraphs.click(function () { localStorage.setItem("barchart_chkbox", bargraphs.prop("checked")); }); + + // iCheck style toggle + var iCheckSelect = $("#iCheckStyle"); + var iCheckStyle = localStorage.getItem("theme_icheck"); + if (iCheckStyle === null) { + iCheckStyle = "material-blue"; + } + iCheckSelect.val(iCheckStyle); + + iCheckSelect.change(function () { + localStorage.setItem("theme_icheck", iCheckSelect.val()); + applyCheckboxRadioStyle(); + }); }); diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index 65ed77fc0..564685461 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -214,7 +214,7 @@ function pidofFTL() - + @@ -226,7 +226,6 @@ function pidofFTL() -