Version Description
Release post: https://webberzone.com/blog/top-10-v3-0-0/
-
Features:
- New Top_Ten_Query class for fetching popular posts. Adds the function
get_tptn_posts()
which replacesget_tptn_pop_posts()
which will be deprecated in a future version - New option to exclude the Front page and Posts page if these are set in Settings > Reading or via Customizer
- New option in the Widget to include specific post IDs in the top lists. You can also use them in the shortcode using
include_post_ids
- New block for Gutenberg aka the block editor. The block is called Popular Posts [Top 10] and you can find it under the widgets category
- Top 10 now supports the WP REST API. The plugin adds a new tracker type called REST API based which you can find under Counter/Tracker settings. Additionally, you can now receive the popular posts via a REST Request to
top-10/v1/popular-posts
- New Top_Ten_Query class for fetching popular posts. Adds the function
-
Enhancements/Modifications:
- No popular posts feed will be added if the corresponding slug is set to blank
- Changed
sum_count
tovisits
-
Bug fixes:
- PHP notices when displaying Network Wide Popular Posts in WordPress Multisite
- Query based tracker gave an ajax error
For previous changelog entries, please refer to the separate changelog.txt file or Github Releases page
=
Download this release
Release Info
Developer | Ajay |
Plugin | Top 10 – Popular posts plugin for WordPress |
Version | 3.0.0 |
Comparing to | |
See all releases |
Code changes from version 2.9.5 to 3.0.0
- README.md +4 -3
- changelog.txt +71 -0
- css/{default-style.css → left-thumbs.css} +0 -0
- css/left-thumbs.min.css +1 -0
- includes/admin/admin-columns.php +4 -8
- includes/admin/admin-dashboard.php +7 -13
- includes/admin/admin-metabox.php +0 -4
- includes/admin/admin.php +9 -12
- includes/admin/class-top-ten-dashboard.php +529 -0
- includes/admin/class-top-ten-network-statistics-table.php +22 -27
- includes/admin/class-top-ten-network-statistics.php +0 -4
- includes/admin/class-top-ten-statistics-table.php +4 -14
- includes/admin/class-top-ten-statistics.php +0 -4
- includes/admin/default-settings.php +11 -3
- includes/admin/js/chart-data.js +115 -0
- includes/admin/js/chart-data.min.js +1 -0
- includes/admin/js/chart.min.js +13 -0
- includes/admin/js/chartjs-adapter-moment.min.js +8 -0
- includes/admin/js/chartjs-plugin-datalabels.min.js +7 -0
- includes/admin/js/moment.min.js +2 -0
- includes/admin/register-settings.php +5 -1
- includes/admin/save-settings.php +17 -0
- includes/admin/settings-page.php +55 -1
- includes/blocks/index.php +1 -0
- includes/blocks/popular-posts.php +157 -0
- includes/blocks/popular-posts/index.js +250 -0
- includes/blocks/popular-posts/index.min.js +1 -0
- includes/blocks/popular-posts/index.php +1 -0
- includes/class-top-ten-query.php +516 -0
- includes/cron.php +1 -1
- includes/helpers.php +4 -4
- includes/js/top-10-tracker.js +9 -0
- includes/js/top-10-tracker.min.js +1 -1
- includes/modules/class-top-ten-count-widget.php +0 -4
- includes/modules/class-top-ten-rest-api.php +334 -0
- includes/modules/class-top-ten-widget.php +47 -41
- includes/modules/exclusions.php +17 -4
- includes/modules/taxonomies.php +0 -50
- includes/public/display-posts.php +48 -25
- includes/public/feed-rss2-popular-posts.php +1 -1
- includes/public/output-generator.php +1 -1
- includes/public/styles.php +49 -15
- includes/tracker.php +23 -5
- languages/top-10-en_US.mo +0 -0
- languages/top-10-en_US.po +454 -232
- languages/top-10-en_US.pot +454 -232
- readme.txt +22 -100
- top-10.php +17 -2
- uninstall.php +0 -4
README.md
CHANGED
@@ -5,9 +5,9 @@
|
|
5 |
[![WordPress Tested](https://img.shields.io/wordpress/v/top-10.svg?style=flat-square)](https://wordpress.org/plugins/top-10/)
|
6 |
[![Build Status](https://travis-ci.org/WebberZone/top-10.svg?branch=master)](https://travis-ci.org/WebberZone/top-10)
|
7 |
|
8 |
-
__Requires:__
|
9 |
|
10 |
-
__Tested up to:__ 5.
|
11 |
|
12 |
__License:__ [GPL-2.0+](http://www.gnu.org/licenses/gpl-2.0.html)
|
13 |
|
@@ -43,6 +43,7 @@ Top 10 also has powerful API and is fully extendable with WordPress actions and
|
|
43 |
* **Extendable code**: Top 10 has tonnes of filters and actions that allow any developer to easily add features, edit outputs, etc.
|
44 |
|
45 |
### GDPR
|
|
|
46 |
Top 10 is GDPR compliant as it doesn't collect any personal data about your visitors when installed out of the box. You can see the data the plugin stores in the `wp_top_ten` and `wp_top_ten_daily` tables in the database. Note: the prefix `wp` might be different if you have changed it from the default.
|
47 |
|
48 |
YOU ARE RESPONSIBLE FOR ENSURING THAT ALL GDPR REQUIREMENTS ARE MET ON YOUR WEBSITE.
|
@@ -80,7 +81,7 @@ For more screenshots visit the [WordPress plugin page](http://wordpress.org/plug
|
|
80 |
|
81 |
3. Activate the Plugin in WP-Admin.
|
82 |
|
83 |
-
4. Go to **Top 10** to configure
|
84 |
|
85 |
5. Go to **Appearance » Widgets** to add the Popular Posts sidebar widget to your theme
|
86 |
|
5 |
[![WordPress Tested](https://img.shields.io/wordpress/v/top-10.svg?style=flat-square)](https://wordpress.org/plugins/top-10/)
|
6 |
[![Build Status](https://travis-ci.org/WebberZone/top-10.svg?branch=master)](https://travis-ci.org/WebberZone/top-10)
|
7 |
|
8 |
+
__Requires:__ 5.3
|
9 |
|
10 |
+
__Tested up to:__ 5.9
|
11 |
|
12 |
__License:__ [GPL-2.0+](http://www.gnu.org/licenses/gpl-2.0.html)
|
13 |
|
43 |
* **Extendable code**: Top 10 has tonnes of filters and actions that allow any developer to easily add features, edit outputs, etc.
|
44 |
|
45 |
### GDPR
|
46 |
+
|
47 |
Top 10 is GDPR compliant as it doesn't collect any personal data about your visitors when installed out of the box. You can see the data the plugin stores in the `wp_top_ten` and `wp_top_ten_daily` tables in the database. Note: the prefix `wp` might be different if you have changed it from the default.
|
48 |
|
49 |
YOU ARE RESPONSIBLE FOR ENSURING THAT ALL GDPR REQUIREMENTS ARE MET ON YOUR WEBSITE.
|
81 |
|
82 |
3. Activate the Plugin in WP-Admin.
|
83 |
|
84 |
+
4. Go to **Top 10 » Settings** to configure
|
85 |
|
86 |
5. Go to **Appearance » Widgets** to add the Popular Posts sidebar widget to your theme
|
87 |
|
changelog.txt
CHANGED
@@ -1,5 +1,76 @@
|
|
1 |
This file holds the archive of changelog entries
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 2.7.0 =
|
4 |
|
5 |
Release post: [https://webberzone.com/blog/top-10-v2-7-0/](https://webberzone.com/blog/top-10-v2-7-0/)
|
1 |
This file holds the archive of changelog entries
|
2 |
|
3 |
+
= 2.9.5 =
|
4 |
+
|
5 |
+
Release post: [https://webberzone.com/blog/top-10-v2-9-0/](https://webberzone.com/blog/top-10-v2-9-0/)
|
6 |
+
|
7 |
+
* Bug fixes:
|
8 |
+
* Security fix: Nonces were not always checked in import module
|
9 |
+
|
10 |
+
= 2.9.4 =
|
11 |
+
|
12 |
+
Release post: [https://webberzone.com/blog/top-10-v2-9-0/](https://webberzone.com/blog/top-10-v2-9-0/)
|
13 |
+
|
14 |
+
* Bug fixes:
|
15 |
+
* .json file error when trying to import tables in the Tools page
|
16 |
+
|
17 |
+
= 2.9.3 =
|
18 |
+
|
19 |
+
Release post: [https://webberzone.com/blog/top-10-v2-9-0/](https://webberzone.com/blog/top-10-v2-9-0/)
|
20 |
+
|
21 |
+
* Enhancements:
|
22 |
+
* Cache now uses MD5 generated keys based on the Top 10 parameters being passed. This means the cache should now work with shortcodes and manual implementations
|
23 |
+
* Database creation now uses the correct collation
|
24 |
+
|
25 |
+
* Bug fixes:
|
26 |
+
* `include_cat_ids` didn't work with the shortcode
|
27 |
+
* Password protected posts will no longer show the excerpt
|
28 |
+
|
29 |
+
= 2.9.2 =
|
30 |
+
|
31 |
+
Release post: [https://webberzone.com/blog/top-10-v2-9-0/](https://webberzone.com/blog/top-10-v2-9-0/)
|
32 |
+
|
33 |
+
* Bug fixes:
|
34 |
+
* Custom CSS box would not save
|
35 |
+
|
36 |
+
= 2.9.1 =
|
37 |
+
|
38 |
+
Release post: [https://webberzone.com/blog/top-10-v2-9-0/](https://webberzone.com/blog/top-10-v2-9-0/)
|
39 |
+
|
40 |
+
* Bug fixes:
|
41 |
+
* Published age of posts parameter was no longer working
|
42 |
+
* Importing settings should now work properly - previously checkboxes all ended up being enabled
|
43 |
+
* In rare cases, the tracker would throw PHP errors e.g. on search results page where no posts were loaded and tracker was enabled to load on all pages
|
44 |
+
|
45 |
+
= 2.9.0 =
|
46 |
+
|
47 |
+
Release post: [https://webberzone.com/blog/top-10-v2-9-0/](https://webberzone.com/blog/top-10-v2-9-0/)
|
48 |
+
|
49 |
+
* Features:
|
50 |
+
* Edit the total visits from the Top 10 > Popular Posts page
|
51 |
+
* New shortcode setting `include_cat_ids` to limit top posts to selected categories/taxonomies. Use a comma separated list of [term_taxonomy_id](https://codex.wordpress.org/WordPress_Taxonomy#wp_term_taxonomy)
|
52 |
+
* New setting in widget to only include certain categories. Doesn't work with custom taxonomies
|
53 |
+
|
54 |
+
* Enhancements:
|
55 |
+
* Implemented CodeMirror to format custom styles box
|
56 |
+
* Admin scripts are no longer loaded into the head - but using a separate JavaScript file
|
57 |
+
|
58 |
+
* Bug fixes:
|
59 |
+
* Fixed media lookup returning PHP errors/warnings in rare cases
|
60 |
+
* Use `current_time` and `gmdate` as per latest WordPress Coding Standards
|
61 |
+
* No more unnecessary form modified errors in the popular posts tables in Admin area
|
62 |
+
* Fixed notices in PHP 7.4 when viewing popular posts listings
|
63 |
+
* When editing posts, the count from the metabox will only be used if it is modified
|
64 |
+
|
65 |
+
= 2.8.0 =
|
66 |
+
|
67 |
+
Release post: [https://webberzone.com/blog/top-10-v2-8-0/](https://webberzone.com/blog/top-10-v2-8-0/)
|
68 |
+
|
69 |
+
* Features:
|
70 |
+
* Custom feed for popular posts: Find new options under a new tab called Feed in the settings page where you can set the URL for the overall and daily feeds
|
71 |
+
* New page in the network admin menu to view the popular posts across the network
|
72 |
+
* Also delete transients and other settings on uninstall
|
73 |
+
|
74 |
= 2.7.0 =
|
75 |
|
76 |
Release post: [https://webberzone.com/blog/top-10-v2-7-0/](https://webberzone.com/blog/top-10-v2-7-0/)
|
css/{default-style.css → left-thumbs.css}
RENAMED
File without changes
|
css/left-thumbs.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.tptn_posts ul,.tptn_posts_daily ul{margin:0!important;padding:0!important}.tptn_posts ul li,.tptn_posts_daily ul li{clear:both;list-style:none;margin-bottom:15px;display:block;background:0 0;padding:0!important}.tptn_posts ul li:after,.tptn_posts ul:after,.tptn_posts_daily ul li:after,.tptn_posts_daily ul:after{content:'';display:table;clear:both}.tptn_posts .tptn_title,.tptn_posts_daily .tptn_title{font-weight:700;display:block;padding-bottom:5px;text-decoration:none;line-height:1.1em}img.tptn_thumb{display:block;float:left;clear:left;margin-right:10px!important;padding:3px!important;border:1px #ccc solid;vertical-align:bottom;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.4);-moz-box-shadow:0 1px 2px rgba(0,0,0,.4);box-shadow:0 1px 2px rgba(0,0,0,.4);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}img.tptn_thumb:after{content:' ';width:100%;height:100%;position:absolute;top:-1px;left:-1px;border:solid 1px #222;-webkit-box-shadow:inset 0 0 1px rgba(255,255,255,.4),inset 0 1px 0 rgba(255,255,255,.4),0 1px 2px rgba(0,0,0,.3);-moz-box-shadow:inset 0 0 1px rgba(255,255,255,.4),inset 0 1px 0 rgba(255,255,255,.4),0 1px 2px rgba(0,0,0,.3);box-shadow:inset 0 0 1px rgba(255,255,255,.4),inset 0 1px 0 rgba(255,255,255,.4),0 1px 2px rgba(0,0,0,.3);-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.tptn_excerpt{display:block}
|
includes/admin/admin-columns.php
CHANGED
@@ -3,10 +3,6 @@
|
|
3 |
* Manage columns on All Posts and All pages screens.
|
4 |
*
|
5 |
* @package Top_Ten
|
6 |
-
* @author Ajay D'Souza <me@ajaydsouza.com>
|
7 |
-
* @license GPL-2.0+
|
8 |
-
* @link https://webberzone.com
|
9 |
-
* @copyright 2008-2020 Ajay D'Souza
|
10 |
*/
|
11 |
|
12 |
/**** If this file is called directly, abort. ****/
|
@@ -65,8 +61,8 @@ function tptn_value( $column_name, $id ) {
|
|
65 |
|
66 |
$from_date = tptn_get_from_date();
|
67 |
|
68 |
-
$resultscount = $wpdb->get_row( $wpdb->prepare( "SELECT postnumber, SUM(cntaccess) as
|
69 |
-
$cntaccess = tptn_number_format_i18n( ( ( $resultscount ) ? $resultscount->
|
70 |
echo esc_html( $cntaccess );
|
71 |
}
|
72 |
|
@@ -81,8 +77,8 @@ function tptn_value( $column_name, $id ) {
|
|
81 |
|
82 |
$from_date = tptn_get_from_date();
|
83 |
|
84 |
-
$resultscount = $wpdb->get_row( $wpdb->prepare( "SELECT postnumber, SUM(cntaccess) as
|
85 |
-
$cntaccess .= ' / ' . tptn_number_format_i18n( ( ( $resultscount ) ? $resultscount->
|
86 |
|
87 |
echo esc_html( $cntaccess );
|
88 |
}
|
3 |
* Manage columns on All Posts and All pages screens.
|
4 |
*
|
5 |
* @package Top_Ten
|
|
|
|
|
|
|
|
|
6 |
*/
|
7 |
|
8 |
/**** If this file is called directly, abort. ****/
|
61 |
|
62 |
$from_date = tptn_get_from_date();
|
63 |
|
64 |
+
$resultscount = $wpdb->get_row( $wpdb->prepare( "SELECT postnumber, SUM(cntaccess) as visits FROM {$table_name} WHERE postnumber = %d AND dp_date >= %s AND blog_id = %d GROUP BY postnumber ", $id, $from_date, $blog_id ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
65 |
+
$cntaccess = tptn_number_format_i18n( ( ( $resultscount ) ? $resultscount->visits : 0 ) );
|
66 |
echo esc_html( $cntaccess );
|
67 |
}
|
68 |
|
77 |
|
78 |
$from_date = tptn_get_from_date();
|
79 |
|
80 |
+
$resultscount = $wpdb->get_row( $wpdb->prepare( "SELECT postnumber, SUM(cntaccess) as visits FROM {$table_name} WHERE postnumber = %d AND dp_date >= %s AND blog_id = %d GROUP BY postnumber ", $id, $from_date, $blog_id ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
81 |
+
$cntaccess .= ' / ' . tptn_number_format_i18n( ( ( $resultscount ) ? $resultscount->visits : 0 ) );
|
82 |
|
83 |
echo esc_html( $cntaccess );
|
84 |
}
|
includes/admin/admin-dashboard.php
CHANGED
@@ -5,10 +5,6 @@
|
|
5 |
* Functions to add the popular lists to the WordPress Admin Dashboard
|
6 |
*
|
7 |
* @package Top_Ten
|
8 |
-
* @author Ajay D'Souza <me@ajaydsouza.com>
|
9 |
-
* @license GPL-2.0+
|
10 |
-
* @link https://webberzone.com
|
11 |
-
* @copyright 2008-2020 Ajay D'Souza
|
12 |
*/
|
13 |
|
14 |
/**** If this file is called directly, abort. ****/
|
@@ -39,14 +35,12 @@ function tptn_pop_display( $daily = false, $page = 0, $limit = false, $widget =
|
|
39 |
$limit = tptn_get_option( 'limit' );
|
40 |
}
|
41 |
|
42 |
-
$results =
|
43 |
array(
|
44 |
-
'
|
45 |
-
'
|
46 |
-
'
|
47 |
-
'
|
48 |
-
'limit' => $limit,
|
49 |
-
'post_types' => 'all',
|
50 |
)
|
51 |
);
|
52 |
|
@@ -55,8 +49,8 @@ function tptn_pop_display( $daily = false, $page = 0, $limit = false, $widget =
|
|
55 |
if ( $results ) {
|
56 |
$output .= '<ul>';
|
57 |
foreach ( $results as $result ) {
|
58 |
-
$output .= '<li><a href="' . get_permalink( $result
|
59 |
-
$output .= ' (' . tptn_number_format_i18n( $result
|
60 |
$output .= '</li>';
|
61 |
}
|
62 |
$output .= '</ul>';
|
5 |
* Functions to add the popular lists to the WordPress Admin Dashboard
|
6 |
*
|
7 |
* @package Top_Ten
|
|
|
|
|
|
|
|
|
8 |
*/
|
9 |
|
10 |
/**** If this file is called directly, abort. ****/
|
35 |
$limit = tptn_get_option( 'limit' );
|
36 |
}
|
37 |
|
38 |
+
$results = get_tptn_posts(
|
39 |
array(
|
40 |
+
'is_widget' => 1,
|
41 |
+
'daily' => $daily,
|
42 |
+
'limit' => $limit,
|
43 |
+
'post_types' => 'all',
|
|
|
|
|
44 |
)
|
45 |
);
|
46 |
|
49 |
if ( $results ) {
|
50 |
$output .= '<ul>';
|
51 |
foreach ( $results as $result ) {
|
52 |
+
$output .= '<li><a href="' . get_permalink( $result->ID ) . '">' . get_the_title( $result->ID ) . '</a>';
|
53 |
+
$output .= ' (' . tptn_number_format_i18n( $result->visits ) . ')';
|
54 |
$output .= '</li>';
|
55 |
}
|
56 |
$output .= '</ul>';
|
includes/admin/admin-metabox.php
CHANGED
@@ -5,10 +5,6 @@
|
|
5 |
* Accessible on Edit Posts, Pages and other custom post type screens
|
6 |
*
|
7 |
* @package Top_Ten
|
8 |
-
* @author Ajay D'Souza <me@ajaydsouza.com>
|
9 |
-
* @license GPL-2.0+
|
10 |
-
* @link https://webberzone.com
|
11 |
-
* @copyright 2008-2020 Ajay D'Souza
|
12 |
*/
|
13 |
|
14 |
/**** If this file is called directly, abort. ****/
|
5 |
* Accessible on Edit Posts, Pages and other custom post type screens
|
6 |
*
|
7 |
* @package Top_Ten
|
|
|
|
|
|
|
|
|
8 |
*/
|
9 |
|
10 |
/**** If this file is called directly, abort. ****/
|
includes/admin/admin.php
CHANGED
@@ -31,28 +31,26 @@ if ( ! defined( 'WPINC' ) ) {
|
|
31 |
function tptn_add_admin_pages_links() {
|
32 |
global $tptn_settings_page, $tptn_settings_tools_help, $tptn_settings_popular_posts, $tptn_settings_popular_posts_daily, $tptn_settings_exim_help;
|
33 |
|
34 |
-
$tptn_settings_page =
|
35 |
-
add_action( "load-$tptn_settings_page", 'tptn_settings_help' );
|
36 |
-
|
37 |
-
$plugin_page = add_submenu_page( 'tptn_options_page', esc_html__( 'Top 10 Settings', 'top-10' ), esc_html__( 'Settings', 'top-10' ), 'manage_options', 'tptn_options_page', 'tptn_options_page' );
|
38 |
|
39 |
// Initialise Top 10 Statistics pages.
|
40 |
$tptn_stats_screen = new Top_Ten_Statistics();
|
41 |
|
42 |
-
$tptn_settings_popular_posts = add_submenu_page( '
|
43 |
add_action( "load-$tptn_settings_popular_posts", array( $tptn_stats_screen, 'screen_option' ) );
|
44 |
|
45 |
-
$tptn_settings_popular_posts_daily = add_submenu_page( '
|
46 |
add_action( "load-$tptn_settings_popular_posts_daily", array( $tptn_stats_screen, 'screen_option' ) );
|
47 |
|
48 |
// Add links to Tools pages.
|
49 |
-
$tptn_settings_tools_help = add_submenu_page( '
|
50 |
add_action( "load-$tptn_settings_tools_help", 'tptn_settings_tools_help' );
|
51 |
|
52 |
-
$tptn_settings_exim_help = add_submenu_page( '
|
53 |
add_action( "load-$tptn_settings_exim_help", 'tptn_settings_exim_help' );
|
54 |
}
|
55 |
-
add_action( 'admin_menu', 'tptn_add_admin_pages_links' );
|
56 |
|
57 |
|
58 |
/**
|
@@ -106,7 +104,7 @@ add_filter( 'manage_tptn_tag_custom_column', 'tptn_tax_id', 10, 3 );
|
|
106 |
*/
|
107 |
function tptn_admin_footer( $footer_text ) {
|
108 |
|
109 |
-
if ( get_current_screen()->parent_base === '
|
110 |
|
111 |
$text = sprintf(
|
112 |
/* translators: 1: Top 10 website, 2: Plugin reviews link. */
|
@@ -156,7 +154,7 @@ function tptn_plugin_actions_links( $links ) {
|
|
156 |
|
157 |
return array_merge(
|
158 |
array(
|
159 |
-
'settings' => '<a href="' . admin_url( 'admin.php?page=
|
160 |
),
|
161 |
$links
|
162 |
);
|
@@ -217,7 +215,6 @@ function tptn_load_admin_scripts( $hook ) {
|
|
217 |
|
218 |
wp_register_script( 'top-ten-admin-js', TOP_TEN_PLUGIN_URL . 'includes/admin/js/admin-scripts.min.js', array( 'jquery', 'jquery-ui-tabs', 'jquery-ui-datepicker' ), '1.0', true );
|
219 |
wp_register_script( 'top-ten-suggest-js', TOP_TEN_PLUGIN_URL . 'includes/admin/js/top-10-suggest.min.js', array( 'jquery', 'jquery-ui-autocomplete' ), '1.0', true );
|
220 |
-
|
221 |
wp_register_style(
|
222 |
'tptn-admin-customizer-css',
|
223 |
TOP_TEN_PLUGIN_URL . 'includes/admin/css/top-10-customizer.min.css',
|
31 |
function tptn_add_admin_pages_links() {
|
32 |
global $tptn_settings_page, $tptn_settings_tools_help, $tptn_settings_popular_posts, $tptn_settings_popular_posts_daily, $tptn_settings_exim_help;
|
33 |
|
34 |
+
$tptn_settings_page = add_submenu_page( 'tptn_dashboard', esc_html__( 'Top 10 Settings', 'top-10' ), esc_html__( 'Settings', 'top-10' ), 'manage_options', 'tptn_options_page', 'tptn_options_page' );
|
35 |
+
add_action( "load-$tptn_settings_page", 'tptn_settings_help' );
|
|
|
|
|
36 |
|
37 |
// Initialise Top 10 Statistics pages.
|
38 |
$tptn_stats_screen = new Top_Ten_Statistics();
|
39 |
|
40 |
+
$tptn_settings_popular_posts = add_submenu_page( 'tptn_dashboard', __( 'Top 10 Popular Posts', 'top-10' ), __( 'Popular Posts', 'top-10' ), 'manage_options', 'tptn_popular_posts', array( $tptn_stats_screen, 'plugin_settings_page' ) );
|
41 |
add_action( "load-$tptn_settings_popular_posts", array( $tptn_stats_screen, 'screen_option' ) );
|
42 |
|
43 |
+
$tptn_settings_popular_posts_daily = add_submenu_page( 'tptn_dashboard', __( 'Top 10 Daily Popular Posts', 'top-10' ), __( 'Daily Popular Posts', 'top-10' ), 'manage_options', 'tptn_popular_posts&orderby=daily_count&order=desc', array( $tptn_stats_screen, 'plugin_settings_page' ) );
|
44 |
add_action( "load-$tptn_settings_popular_posts_daily", array( $tptn_stats_screen, 'screen_option' ) );
|
45 |
|
46 |
// Add links to Tools pages.
|
47 |
+
$tptn_settings_tools_help = add_submenu_page( 'tptn_dashboard', esc_html__( 'Top 10 Tools', 'top-10' ), esc_html__( 'Tools', 'top-10' ), 'manage_options', 'tptn_tools_page', 'tptn_tools_page' );
|
48 |
add_action( "load-$tptn_settings_tools_help", 'tptn_settings_tools_help' );
|
49 |
|
50 |
+
$tptn_settings_exim_help = add_submenu_page( 'tptn_dashboard', esc_html__( 'Top 10 Import Export Tables', 'top-10' ), esc_html__( 'Import/Export', 'top-10' ), 'manage_options', 'tptn_exim_page', 'tptn_exim_page' );
|
51 |
add_action( "load-$tptn_settings_exim_help", 'tptn_settings_exim_help' );
|
52 |
}
|
53 |
+
add_action( 'admin_menu', 'tptn_add_admin_pages_links', 11 );
|
54 |
|
55 |
|
56 |
/**
|
104 |
*/
|
105 |
function tptn_admin_footer( $footer_text ) {
|
106 |
|
107 |
+
if ( get_current_screen()->parent_base === 'tptn_dashboard' ) {
|
108 |
|
109 |
$text = sprintf(
|
110 |
/* translators: 1: Top 10 website, 2: Plugin reviews link. */
|
154 |
|
155 |
return array_merge(
|
156 |
array(
|
157 |
+
'settings' => '<a href="' . admin_url( 'admin.php?page=tptn_dashboard' ) . '">' . __( 'Settings', 'top-10' ) . '</a>',
|
158 |
),
|
159 |
$links
|
160 |
);
|
215 |
|
216 |
wp_register_script( 'top-ten-admin-js', TOP_TEN_PLUGIN_URL . 'includes/admin/js/admin-scripts.min.js', array( 'jquery', 'jquery-ui-tabs', 'jquery-ui-datepicker' ), '1.0', true );
|
217 |
wp_register_script( 'top-ten-suggest-js', TOP_TEN_PLUGIN_URL . 'includes/admin/js/top-10-suggest.min.js', array( 'jquery', 'jquery-ui-autocomplete' ), '1.0', true );
|
|
|
218 |
wp_register_style(
|
219 |
'tptn-admin-customizer-css',
|
220 |
TOP_TEN_PLUGIN_URL . 'includes/admin/css/top-10-customizer.min.css',
|
includes/admin/class-top-ten-dashboard.php
ADDED
@@ -0,0 +1,529 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Dashboard.
|
4 |
+
*
|
5 |
+
* @link https://webberzone.com
|
6 |
+
* @since 3.0.0
|
7 |
+
*
|
8 |
+
* @package Top 10
|
9 |
+
* @subpackage Admin/Dashboard
|
10 |
+
*/
|
11 |
+
|
12 |
+
// If this file is called directly, abort.
|
13 |
+
if ( ! defined( 'WPINC' ) ) {
|
14 |
+
die;
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Top_Ten_Dashboard class.
|
19 |
+
*
|
20 |
+
* @since 3.0.0
|
21 |
+
*/
|
22 |
+
class Top_Ten_Dashboard {
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Class instance.
|
26 |
+
*
|
27 |
+
* @since 3.0.0
|
28 |
+
*
|
29 |
+
* @var class Class instance.
|
30 |
+
*/
|
31 |
+
public static $instance;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Parent Menu ID.
|
35 |
+
*
|
36 |
+
* @since 3.0.0
|
37 |
+
*
|
38 |
+
* @var string Parent Menu ID.
|
39 |
+
*/
|
40 |
+
public $parent_id;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Singleton instance.
|
44 |
+
*
|
45 |
+
* @since 3.0.0
|
46 |
+
*/
|
47 |
+
public static function get_instance() {
|
48 |
+
if ( ! isset( self::$instance ) ) {
|
49 |
+
self::$instance = new self();
|
50 |
+
}
|
51 |
+
return self::$instance;
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Constructor class.
|
56 |
+
*
|
57 |
+
* @since 3.0.0
|
58 |
+
*/
|
59 |
+
public function __construct() {
|
60 |
+
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
61 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
62 |
+
add_action( 'wp_ajax_tptn_chart_data', array( $this, 'get_chart_data' ) );
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Render the settings page.
|
67 |
+
*
|
68 |
+
* @since 3.0.0
|
69 |
+
*/
|
70 |
+
public function plugin_settings_page() {
|
71 |
+
ob_start();
|
72 |
+
|
73 |
+
// Add date selector.
|
74 |
+
$chart_to_date = current_time( 'd M Y' );
|
75 |
+
$chart_from_date = gmdate( 'd M Y', strtotime( '-1 week' ) );
|
76 |
+
|
77 |
+
$post_date_from = ( isset( $_REQUEST['post-date-filter-from'] ) && check_admin_referer( 'tptn-dashboard' ) ) ? sanitize_text_field( wp_unslash( $_REQUEST['post-date-filter-from'] ) ) : $chart_from_date;
|
78 |
+
|
79 |
+
$post_date_to = ( isset( $_REQUEST['post-date-filter-to'] ) && check_admin_referer( 'tptn-dashboard' ) ) ? sanitize_text_field( wp_unslash( $_REQUEST['post-date-filter-to'] ) ) : $chart_to_date;
|
80 |
+
|
81 |
+
?>
|
82 |
+
<div class="wrap">
|
83 |
+
<h1><?php esc_html_e( 'Top 10 Dashboard', 'top-10' ); ?></h1>
|
84 |
+
|
85 |
+
<?php settings_errors(); ?>
|
86 |
+
|
87 |
+
<div id="poststuff">
|
88 |
+
<div id="post-body" class="metabox-holder columns-2">
|
89 |
+
<div id="post-body-content">
|
90 |
+
<form method="post" >
|
91 |
+
<?php wp_nonce_field( 'tptn-dashboard' ); ?>
|
92 |
+
|
93 |
+
<div>
|
94 |
+
<input type="text" id="datepicker-from" name="post-date-filter-from" value="<?php echo esc_attr( $post_date_from ); ?>" size="11" />
|
95 |
+
<input type="text" id="datepicker-to" name="post-date-filter-to" value="<?php echo esc_attr( $post_date_to ); ?>" size="11" />
|
96 |
+
<?php
|
97 |
+
submit_button(
|
98 |
+
__( 'Update', 'top-10' ),
|
99 |
+
'primary',
|
100 |
+
'filter_action',
|
101 |
+
false,
|
102 |
+
array(
|
103 |
+
'id' => 'top-10-chart-submit',
|
104 |
+
'onclick' => 'updateChart(); return false;',
|
105 |
+
)
|
106 |
+
);
|
107 |
+
?>
|
108 |
+
</div>
|
109 |
+
<div>
|
110 |
+
<canvas id="visits" width="400" height="150" aria-label="<?php esc_html_e( 'Top 10 Visits', 'top-10' ); ?>" role="img"></canvas>
|
111 |
+
</div>
|
112 |
+
|
113 |
+
</form>
|
114 |
+
|
115 |
+
<h2><?php esc_html_e( 'Historical visits', 'top-10' ); ?></h2>
|
116 |
+
<ul class="nav-tab-wrapper" style="padding:0; border-bottom: 1px solid #ccc;">
|
117 |
+
<?php
|
118 |
+
foreach ( $this->get_tabs() as $tab_id => $tab_name ) {
|
119 |
+
|
120 |
+
echo '<li style="padding:0; border:0; margin:0;"><a href="#' . esc_attr( $tab_id ) . '" title="' . esc_attr( $tab_name['title'] ) . '" class="nav-tab">';
|
121 |
+
echo esc_html( $tab_name['title'] );
|
122 |
+
echo '</a></li>';
|
123 |
+
|
124 |
+
}
|
125 |
+
?>
|
126 |
+
</ul>
|
127 |
+
|
128 |
+
<form method="post" action="options.php">
|
129 |
+
|
130 |
+
<?php foreach ( $this->get_tabs() as $tab_id => $tab_name ) : ?>
|
131 |
+
|
132 |
+
<div id="<?php echo esc_attr( $tab_id ); ?>">
|
133 |
+
<table class="form-table">
|
134 |
+
<?php
|
135 |
+
$output = $this->display_popular_posts( $tab_name );
|
136 |
+
echo $output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
137 |
+
?>
|
138 |
+
</table>
|
139 |
+
|
140 |
+
<div style="font-weight:bold;padding:5px;">
|
141 |
+
|
142 |
+
<?php
|
143 |
+
$query_args = array(
|
144 |
+
'order' => 'desc',
|
145 |
+
);
|
146 |
+
$daily = ( isset( $tab_name['daily'] ) ) ? $tab_name['daily'] : true;
|
147 |
+
|
148 |
+
if ( $daily ) {
|
149 |
+
$query_args['orderby'] = 'daily_count';
|
150 |
+
|
151 |
+
if ( ! empty( $tab_name['from_date'] ) ) {
|
152 |
+
$query_args['post-date-filter-from'] = gmdate( 'd+M+Y', strtotime( $tab_name['from_date'] ) );
|
153 |
+
}
|
154 |
+
if ( ! empty( $tab_name['to_date'] ) ) {
|
155 |
+
$query_args['post-date-filter-to'] = gmdate( 'd+M+Y', strtotime( $tab_name['to_date'] ) );
|
156 |
+
}
|
157 |
+
} else {
|
158 |
+
$query_args['orderby'] = 'total_count';
|
159 |
+
}
|
160 |
+
$url = add_query_arg( $query_args, admin_url( 'admin.php?page=tptn_popular_posts' ) );
|
161 |
+
|
162 |
+
?>
|
163 |
+
|
164 |
+
<a href="<?php echo esc_url( $url ); ?>"><?php esc_html_e( 'View all popular posts', 'top-10' ); ?> »</a>
|
165 |
+
|
166 |
+
</div>
|
167 |
+
|
168 |
+
</div><!-- /#tab_id-->
|
169 |
+
|
170 |
+
<?php endforeach; ?>
|
171 |
+
|
172 |
+
</form>
|
173 |
+
|
174 |
+
</div><!-- /#post-body-content -->
|
175 |
+
|
176 |
+
<div id="postbox-container-1" class="postbox-container">
|
177 |
+
|
178 |
+
<div id="side-sortables" class="meta-box-sortables ui-sortable">
|
179 |
+
<?php include_once 'sidebar.php'; ?>
|
180 |
+
</div><!-- /#side-sortables -->
|
181 |
+
|
182 |
+
</div><!-- /#postbox-container-1 -->
|
183 |
+
</div><!-- /#post-body -->
|
184 |
+
<br class="clear" />
|
185 |
+
</div><!-- /#poststuff -->
|
186 |
+
|
187 |
+
</div><!-- /.wrap -->
|
188 |
+
|
189 |
+
<?php
|
190 |
+
echo ob_get_clean(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Admin Menu.
|
195 |
+
*
|
196 |
+
* @since 3.0.0
|
197 |
+
*/
|
198 |
+
public function admin_menu() {
|
199 |
+
$this->parent_id = add_menu_page( esc_html__( 'Top 10 Dashboard', 'top-10' ), esc_html__( 'Top 10', 'top-10' ), 'manage_options', 'tptn_dashboard', array( $this, 'plugin_settings_page' ), 'dashicons-editor-ol' );
|
200 |
+
|
201 |
+
add_submenu_page( 'tptn_dashboard', esc_html__( 'Top 10 Dashboard', 'top-10' ), esc_html__( 'Dashboard', 'top-10' ), 'manage_options', 'tptn_dashboard', array( $this, 'plugin_settings_page' ) );
|
202 |
+
|
203 |
+
add_action( 'load-' . $this->parent_id, array( $this, 'help_tabs' ) );
|
204 |
+
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Enqueue scripts in admin area.
|
209 |
+
*
|
210 |
+
* @since 3.0.0
|
211 |
+
*
|
212 |
+
* @param string $hook The current admin page.
|
213 |
+
*/
|
214 |
+
public function admin_enqueue_scripts( $hook ) {
|
215 |
+
|
216 |
+
wp_register_script( 'top-ten-moment-js', TOP_TEN_PLUGIN_URL . 'includes/admin/js/moment.min.js', array(), '1.0', true );
|
217 |
+
wp_register_script( 'top-ten-chart-js', TOP_TEN_PLUGIN_URL . 'includes/admin/js/chart.min.js', array(), '1.0', true );
|
218 |
+
wp_register_script( 'top-ten-chart-datalabels-js', TOP_TEN_PLUGIN_URL . 'includes/admin/js/chartjs-plugin-datalabels.min.js', array( 'top-ten-chart-js' ), '1.0', true );
|
219 |
+
wp_register_script( 'top-ten-chartjs-adapter-moment-js', TOP_TEN_PLUGIN_URL . 'includes/admin/js/chartjs-adapter-moment.min.js', array( 'top-ten-moment-js', 'top-ten-chart-js' ), '1.0', true );
|
220 |
+
wp_register_script( 'top-ten-chart-data-js', TOP_TEN_PLUGIN_URL . 'includes/admin/js/chart-data.min.js', array( 'jquery', 'top-ten-chart-js', 'top-ten-chart-datalabels-js', 'top-ten-moment-js', 'top-ten-chartjs-adapter-moment-js' ), '1.0', true );
|
221 |
+
wp_register_script( 'top-ten-admin-js', TOP_TEN_PLUGIN_URL . 'includes/admin/js/admin-scripts.min.js', array( 'jquery', 'jquery-ui-tabs', 'jquery-ui-datepicker' ), '1.0', true );
|
222 |
+
|
223 |
+
if ( $hook === $this->parent_id ) {
|
224 |
+
wp_enqueue_script( 'top-ten-chart-js' );
|
225 |
+
wp_enqueue_script( 'top-ten-chart-datalabels-js' );
|
226 |
+
wp_enqueue_script( 'top-ten-moment-js' );
|
227 |
+
wp_enqueue_script( 'top-ten-chartjs-adapter-moment-js' );
|
228 |
+
wp_enqueue_script( 'top-ten-chart-data-js' );
|
229 |
+
wp_enqueue_script( 'top-ten-admin-js' );
|
230 |
+
wp_enqueue_style(
|
231 |
+
'tptn-admin-ui-css',
|
232 |
+
TOP_TEN_PLUGIN_URL . 'includes/admin/css/top-10-admin.min.css',
|
233 |
+
false,
|
234 |
+
'1.0',
|
235 |
+
false
|
236 |
+
);
|
237 |
+
wp_localize_script(
|
238 |
+
'top-ten-chart-data-js',
|
239 |
+
'tptn_chart_data',
|
240 |
+
array(
|
241 |
+
'security' => wp_create_nonce( 'tptn-dashboard' ),
|
242 |
+
'datasetlabel' => __( 'Visits', 'top-10' ),
|
243 |
+
'charttitle' => __( 'Daily Visits', 'top-10' ),
|
244 |
+
)
|
245 |
+
);
|
246 |
+
}
|
247 |
+
|
248 |
+
}
|
249 |
+
|
250 |
+
/**
|
251 |
+
* Function to add an action to search for tags using Ajax.
|
252 |
+
*
|
253 |
+
* @since 3.0.0
|
254 |
+
*/
|
255 |
+
public function get_chart_data() {
|
256 |
+
global $wpdb;
|
257 |
+
|
258 |
+
check_ajax_referer( 'tptn-dashboard', 'security' );
|
259 |
+
|
260 |
+
$blog_id = get_current_blog_id();
|
261 |
+
|
262 |
+
// Add date selector.
|
263 |
+
$to_date = isset( $_REQUEST['to_date'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['to_date'] ) ) : current_time( 'd M Y' );
|
264 |
+
$from_date = isset( $_REQUEST['from_date'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['from_date'] ) ) : gmdate( 'd M Y', strtotime( '-1 week' ) );
|
265 |
+
|
266 |
+
$post_date_from = gmdate( 'Y-m-d', strtotime( $from_date ) );
|
267 |
+
$post_date_to = gmdate( 'Y-m-d', strtotime( $to_date ) );
|
268 |
+
|
269 |
+
$sql = $wpdb->prepare(
|
270 |
+
" SELECT SUM(cntaccess) AS visits, DATE(dp_date) as date
|
271 |
+
FROM {$wpdb->base_prefix}top_ten_daily
|
272 |
+
WHERE DATE(dp_date) >= DATE(%s)
|
273 |
+
AND DATE(dp_date) <= DATE(%s)
|
274 |
+
AND blog_id = %d
|
275 |
+
GROUP BY date
|
276 |
+
ORDER BY date ASC
|
277 |
+
",
|
278 |
+
$post_date_from,
|
279 |
+
$post_date_to,
|
280 |
+
$blog_id
|
281 |
+
);
|
282 |
+
|
283 |
+
$result = $wpdb->get_results( $sql ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared
|
284 |
+
|
285 |
+
$data = array();
|
286 |
+
foreach ( $result as $row ) {
|
287 |
+
$data[] = $row;
|
288 |
+
}
|
289 |
+
|
290 |
+
echo wp_json_encode( $data );
|
291 |
+
wp_die();
|
292 |
+
}
|
293 |
+
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Array containing the settings' sections.
|
297 |
+
*
|
298 |
+
* @since 3.0.0
|
299 |
+
*
|
300 |
+
* @return array Settings array
|
301 |
+
*/
|
302 |
+
public function get_tabs() {
|
303 |
+
$tabs = array(
|
304 |
+
'today' => array(
|
305 |
+
'title' => __( 'Today', 'top-10' ),
|
306 |
+
'from_date' => current_time( 'd M Y' ),
|
307 |
+
'to_date' => current_time( 'd M Y' ),
|
308 |
+
),
|
309 |
+
'yesterday' => array(
|
310 |
+
'title' => __( 'Yesterday', 'top-10' ),
|
311 |
+
'from_date' => gmdate( 'd M Y', strtotime( '-1 day' ) ),
|
312 |
+
'to_date' => gmdate( 'd M Y', strtotime( '-1 day' ) ),
|
313 |
+
),
|
314 |
+
'lastweek' => array(
|
315 |
+
'title' => __( 'Last 7 days', 'top-10' ),
|
316 |
+
'from_date' => gmdate( 'd M Y', strtotime( '-1 week' ) ),
|
317 |
+
'to_date' => current_time( 'd M Y' ),
|
318 |
+
),
|
319 |
+
'lastmonth' => array(
|
320 |
+
'title' => __( 'Last 30 days', 'top-10' ),
|
321 |
+
'from_date' => gmdate( 'd M Y', strtotime( '-30 days' ) ),
|
322 |
+
'to_date' => current_time( 'd M Y' ),
|
323 |
+
),
|
324 |
+
'overall' => array(
|
325 |
+
'title' => __( 'All time', 'top-10' ),
|
326 |
+
'daily' => false,
|
327 |
+
),
|
328 |
+
);
|
329 |
+
|
330 |
+
return $tabs;
|
331 |
+
}
|
332 |
+
|
333 |
+
/**
|
334 |
+
* Get popular posts for a date range.
|
335 |
+
*
|
336 |
+
* @since 3.0.0
|
337 |
+
*
|
338 |
+
* @param string|array $args {
|
339 |
+
* Optional. Array or string of Query parameters.
|
340 |
+
*
|
341 |
+
* @type bool $daily Set to true to get the daily/custom period posts. False for overall.
|
342 |
+
* @type string $from_date From date. A date/time string.
|
343 |
+
* @type int $numberposts Number of posts to fetch.
|
344 |
+
* @type string $to_date To date. A date/time string.
|
345 |
+
* }
|
346 |
+
* @return string HTML table with popular posts.
|
347 |
+
*/
|
348 |
+
public function display_popular_posts( $args = array() ) {
|
349 |
+
$output = '';
|
350 |
+
|
351 |
+
$defaults = array(
|
352 |
+
'daily' => true,
|
353 |
+
'from_date' => null,
|
354 |
+
'numberposts' => 20,
|
355 |
+
'to_date' => null,
|
356 |
+
);
|
357 |
+
$args = wp_parse_args( $args, $defaults );
|
358 |
+
|
359 |
+
$results = $this->get_popular_posts( $args );
|
360 |
+
|
361 |
+
ob_start();
|
362 |
+
if ( $results ) :
|
363 |
+
?>
|
364 |
+
|
365 |
+
<table class="widefat striped">
|
366 |
+
<?php
|
367 |
+
foreach ( $results as $result ) :
|
368 |
+
$visits = tptn_number_format_i18n( $result->visits );
|
369 |
+
$result = get_post( $result->ID );
|
370 |
+
?>
|
371 |
+
<tr>
|
372 |
+
<td><a href="<?php echo esc_url( get_permalink( $result ) ); ?>" target="_blank"><?php echo esc_html( get_the_title( $result ) ); ?></td>
|
373 |
+
<td><?php echo esc_html( $visits ); ?></td>
|
374 |
+
</tr>
|
375 |
+
|
376 |
+
<?php endforeach; ?>
|
377 |
+
</table>
|
378 |
+
|
379 |
+
<?php else : ?>
|
380 |
+
|
381 |
+
<?php esc_html_e( 'Sorry, no popular posts found.', 'top-10' ); ?>
|
382 |
+
|
383 |
+
<?php endif; ?>
|
384 |
+
|
385 |
+
<?php
|
386 |
+
|
387 |
+
$output = ob_get_clean();
|
388 |
+
return $output;
|
389 |
+
}
|
390 |
+
|
391 |
+
/**
|
392 |
+
* Retrieve the popular posts.
|
393 |
+
*
|
394 |
+
* @since 3.0.0
|
395 |
+
*
|
396 |
+
* @param string|array $args {
|
397 |
+
* Optional. Array or string of Query parameters.
|
398 |
+
*
|
399 |
+
* @type array|string $blog_id An array or comma-separated string of blog IDs.
|
400 |
+
* @type bool $daily Set to true to get the daily/custom period posts. False for overall.
|
401 |
+
* @type string $from_date From date. A date/time string.
|
402 |
+
* @type int $numberposts Number of posts to fetch.
|
403 |
+
* @type int $offset Offset.
|
404 |
+
* @type string $to_date To date. A date/time string.
|
405 |
+
* }
|
406 |
+
* @return array Array of post objects.
|
407 |
+
*/
|
408 |
+
public function get_popular_posts( $args = array() ) {
|
409 |
+
global $wpdb;
|
410 |
+
|
411 |
+
// Initialise some variables.
|
412 |
+
$fields = array();
|
413 |
+
$where = '';
|
414 |
+
$join = '';
|
415 |
+
$groupby = '';
|
416 |
+
$orderby = '';
|
417 |
+
$limits = '';
|
418 |
+
|
419 |
+
$defaults = array(
|
420 |
+
'blog_id' => get_current_blog_id(),
|
421 |
+
'daily' => true,
|
422 |
+
'from_date' => null,
|
423 |
+
'numberposts' => 20,
|
424 |
+
'offset' => 0,
|
425 |
+
'to_date' => null,
|
426 |
+
);
|
427 |
+
$args = wp_parse_args( $args, $defaults );
|
428 |
+
|
429 |
+
if ( $args['daily'] ) {
|
430 |
+
$table_name = $wpdb->base_prefix . 'top_ten_daily';
|
431 |
+
} else {
|
432 |
+
$table_name = $wpdb->base_prefix . 'top_ten';
|
433 |
+
}
|
434 |
+
|
435 |
+
// Fields to return.
|
436 |
+
$fields[] = ( $args['daily'] ) ? "SUM({$table_name}.cntaccess) as visits" : "{$table_name}.cntaccess as visits";
|
437 |
+
$fields[] = "{$wpdb->posts}.ID";
|
438 |
+
|
439 |
+
$fields = implode( ', ', $fields );
|
440 |
+
|
441 |
+
// Create the JOIN clause.
|
442 |
+
$join = " INNER JOIN {$wpdb->posts} ON {$table_name}.postnumber={$wpdb->posts}.ID ";
|
443 |
+
|
444 |
+
// Create the base WHERE clause.
|
445 |
+
$where = $wpdb->prepare( " AND {$table_name}.blog_id = %d ", $args['blog_id'] ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
446 |
+
$where .= " AND ($wpdb->posts.post_status = 'publish' OR $wpdb->posts.post_status = 'inherit') "; // Show published posts and attachments.
|
447 |
+
$where .= " AND ($wpdb->posts.post_type <> 'revision' ) "; // No revisions.
|
448 |
+
|
449 |
+
if ( isset( $args['from_date'] ) ) {
|
450 |
+
$from_date = gmdate( 'Y-m-d', strtotime( $args['from_date'] ) );
|
451 |
+
$where .= $wpdb->prepare( " AND DATE({$table_name}.dp_date) >= DATE(%s) ", $from_date ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
452 |
+
}
|
453 |
+
|
454 |
+
if ( isset( $args['to_date'] ) ) {
|
455 |
+
$to_date = gmdate( 'Y-m-d', strtotime( $args['to_date'] ) );
|
456 |
+
$where .= $wpdb->prepare( " AND DATE({$table_name}.dp_date) <= DATE(%s) ", $to_date ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
457 |
+
}
|
458 |
+
|
459 |
+
// Create the base GROUP BY clause.
|
460 |
+
if ( $args['daily'] ) {
|
461 |
+
$groupby = " {$wpdb->posts}.ID";
|
462 |
+
}
|
463 |
+
|
464 |
+
// Create the base ORDER BY clause.
|
465 |
+
$orderby = ' visits DESC ';
|
466 |
+
|
467 |
+
// Create the base LIMITS clause.
|
468 |
+
$limits = $wpdb->prepare( ' LIMIT %d, %d ', $args['offset'], $args['numberposts'] );
|
469 |
+
|
470 |
+
if ( ! empty( $groupby ) ) {
|
471 |
+
$groupby = " GROUP BY {$groupby} ";
|
472 |
+
}
|
473 |
+
if ( ! empty( $orderby ) ) {
|
474 |
+
$orderby = " ORDER BY {$orderby} ";
|
475 |
+
}
|
476 |
+
|
477 |
+
$sql = "SELECT DISTINCT $fields FROM {$table_name} $join WHERE 1=1 $where $groupby $orderby $limits";
|
478 |
+
|
479 |
+
$result = $wpdb->get_results( $sql ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared
|
480 |
+
|
481 |
+
return $result;
|
482 |
+
}
|
483 |
+
|
484 |
+
/**
|
485 |
+
* Generates the help tabs.
|
486 |
+
*
|
487 |
+
* @since 3.0.0
|
488 |
+
*/
|
489 |
+
public function help_tabs() {
|
490 |
+
|
491 |
+
$screen = get_current_screen();
|
492 |
+
|
493 |
+
$screen->set_help_sidebar(
|
494 |
+
/* translators: 1: Support link. */
|
495 |
+
'<p>' . sprintf( __( 'For more information or how to get support visit the <a href="%1$s">WebberZone support site</a>.', 'top-10' ), esc_url( 'https://webberzone.com/support/' ) ) . '</p>' .
|
496 |
+
/* translators: 1: Forum link. */
|
497 |
+
'<p>' . sprintf( __( 'Support queries should be posted in the <a href="%1$s">WordPress.org support forums</a>.', 'top-10' ), esc_url( 'https://wordpress.org/support/plugin/top-10' ) ) . '</p>' .
|
498 |
+
'<p>' . sprintf(
|
499 |
+
/* translators: 1: Github Issues link, 2: Github page. */
|
500 |
+
__( '<a href="%1$s">Post an issue</a> on <a href="%2$s">GitHub</a> (bug reports only).', 'top-10' ),
|
501 |
+
esc_url( 'https://github.com/WebberZone/top-10/issues' ),
|
502 |
+
esc_url( 'https://github.com/WebberZone/top-10' )
|
503 |
+
) . '</p>'
|
504 |
+
);
|
505 |
+
|
506 |
+
$screen->add_help_tab(
|
507 |
+
array(
|
508 |
+
'id' => 'tptn-dashboard-general',
|
509 |
+
'title' => __( 'General', 'top-10' ),
|
510 |
+
'content' =>
|
511 |
+
'<p>' . __( 'This screen displays the historical traffic on your site.', 'top-10' ) . '</p>' .
|
512 |
+
/* translators: 1: Constant holding number of days data is stored. */
|
513 |
+
'<p>' . sprintf( __( 'The data is pulled from the daily tables in the database. If you have enabled maintenance then the amount of historical data that is available will be limited to %d days.', 'top-10' ), TOP_TEN_STORE_DATA ) . '</p>' .
|
514 |
+
'<p>' . __( 'You can change this by setting the constant TOP_TEN_STORE_DATA to the number of days of your choice in your wp-config.php.', 'top-10' ) . '</p>',
|
515 |
+
)
|
516 |
+
);
|
517 |
+
|
518 |
+
}
|
519 |
+
}
|
520 |
+
|
521 |
+
/**
|
522 |
+
* Function to initialise stats page.
|
523 |
+
*
|
524 |
+
* @since 3.0.0
|
525 |
+
*/
|
526 |
+
function tptn_load_dashboard() {
|
527 |
+
Top_Ten_Dashboard::get_instance();
|
528 |
+
}
|
529 |
+
add_action( 'plugins_loaded', 'tptn_load_dashboard' );
|
includes/admin/class-top-ten-network-statistics-table.php
CHANGED
@@ -4,10 +4,6 @@
|
|
4 |
*
|
5 |
* @package Top_Ten
|
6 |
* @subpackage Top_Ten_Network_Statistics_Table
|
7 |
-
* @author Ajay D'Souza <me@ajaydsouza.com>
|
8 |
-
* @license GPL-2.0+
|
9 |
-
* @link https://webberzone.com
|
10 |
-
* @copyright 2008-2020 Ajay D'Souza
|
11 |
*/
|
12 |
|
13 |
/**** If this file is called directly, abort. ****/
|
@@ -48,7 +44,7 @@ class Top_Ten_Network_Statistics_Table extends WP_List_Table {
|
|
48 |
*
|
49 |
* @return array Array of popular posts
|
50 |
*/
|
51 |
-
public function get_popular_posts( $per_page = 20, $page_number = 1, $args = null ) {
|
52 |
|
53 |
global $wpdb;
|
54 |
|
@@ -61,16 +57,10 @@ class Top_Ten_Network_Statistics_Table extends WP_List_Table {
|
|
61 |
$limits = '';
|
62 |
$sql = '';
|
63 |
|
64 |
-
$from_date =
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
);
|
69 |
-
$to_date = tptn_get_from_date(
|
70 |
-
isset( $args['post-date-filter-to'] ) ? $args['post-date-filter-to'] : null,
|
71 |
-
1,
|
72 |
-
0
|
73 |
-
);
|
74 |
|
75 |
/* Start creating the SQL */
|
76 |
$table_name_daily = $wpdb->base_prefix . 'top_ten_daily AS ttd';
|
@@ -169,7 +159,7 @@ class Top_Ten_Network_Statistics_Table extends WP_List_Table {
|
|
169 |
* @param string $args Array of arguments.
|
170 |
* @return null|string null|string
|
171 |
*/
|
172 |
-
public function record_count( $args = null ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
|
173 |
|
174 |
global $wpdb;
|
175 |
|
@@ -237,14 +227,17 @@ class Top_Ten_Network_Statistics_Table extends WP_List_Table {
|
|
237 |
|
238 |
$blog_post = get_blog_post( $item['blog_id'], $item['ID'] );
|
239 |
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
|
|
|
|
|
|
248 |
}
|
249 |
|
250 |
|
@@ -258,10 +251,12 @@ class Top_Ten_Network_Statistics_Table extends WP_List_Table {
|
|
258 |
|
259 |
$blog_post = get_blog_post( $item['blog_id'], $item['ID'] );
|
260 |
|
261 |
-
|
262 |
-
|
|
|
263 |
|
264 |
-
|
|
|
265 |
}
|
266 |
|
267 |
/**
|
4 |
*
|
5 |
* @package Top_Ten
|
6 |
* @subpackage Top_Ten_Network_Statistics_Table
|
|
|
|
|
|
|
|
|
7 |
*/
|
8 |
|
9 |
/**** If this file is called directly, abort. ****/
|
44 |
*
|
45 |
* @return array Array of popular posts
|
46 |
*/
|
47 |
+
public static function get_popular_posts( $per_page = 20, $page_number = 1, $args = null ) {
|
48 |
|
49 |
global $wpdb;
|
50 |
|
57 |
$limits = '';
|
58 |
$sql = '';
|
59 |
|
60 |
+
$from_date = isset( $args['post-date-filter-from'] ) ? $args['post-date-filter-from'] : current_time( 'd M Y' );
|
61 |
+
$from_date = gmdate( 'Y-m-d', strtotime( $from_date ) );
|
62 |
+
$to_date = isset( $args['post-date-filter-to'] ) ? $args['post-date-filter-to'] : current_time( 'd M Y' );
|
63 |
+
$to_date = gmdate( 'Y-m-d', strtotime( $to_date ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
/* Start creating the SQL */
|
66 |
$table_name_daily = $wpdb->base_prefix . 'top_ten_daily AS ttd';
|
159 |
* @param string $args Array of arguments.
|
160 |
* @return null|string null|string
|
161 |
*/
|
162 |
+
public static function record_count( $args = null ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
|
163 |
|
164 |
global $wpdb;
|
165 |
|
227 |
|
228 |
$blog_post = get_blog_post( $item['blog_id'], $item['ID'] );
|
229 |
|
230 |
+
if ( null === $blog_post ) {
|
231 |
+
return __( 'Invalid post ID. This post might have been deleted.', 'top-10' );
|
232 |
+
} else {
|
233 |
+
// Return the title contents.
|
234 |
+
return sprintf(
|
235 |
+
'<a href="%3$s" target="_blank">%1$s</a> <span style="color:silver">(id:%2$s)</span>',
|
236 |
+
$blog_post->post_title,
|
237 |
+
$item['ID'],
|
238 |
+
get_blog_permalink( $item['blog_id'], $item['ID'] )
|
239 |
+
);
|
240 |
+
}
|
241 |
}
|
242 |
|
243 |
|
251 |
|
252 |
$blog_post = get_blog_post( $item['blog_id'], $item['ID'] );
|
253 |
|
254 |
+
if ( $blog_post ) {
|
255 |
+
$m_time = $blog_post->post_date;
|
256 |
+
$h_time = mysql2date( __( 'Y/m/d' ), $m_time );
|
257 |
|
258 |
+
echo '<abbr title="' . esc_attr( $h_time ) . '">' . esc_attr( $h_time ) . '</abbr>';
|
259 |
+
}
|
260 |
}
|
261 |
|
262 |
/**
|
includes/admin/class-top-ten-network-statistics.php
CHANGED
@@ -4,10 +4,6 @@
|
|
4 |
*
|
5 |
* @package Top_Ten
|
6 |
* @subpackage Top_Ten_Network_Statistics
|
7 |
-
* @author Ajay D'Souza <me@ajaydsouza.com>
|
8 |
-
* @license GPL-2.0+
|
9 |
-
* @link https://webberzone.com
|
10 |
-
* @copyright 2008-2020 Ajay D'Souza
|
11 |
*/
|
12 |
|
13 |
/**** If this file is called directly, abort. ****/
|
4 |
*
|
5 |
* @package Top_Ten
|
6 |
* @subpackage Top_Ten_Network_Statistics
|
|
|
|
|
|
|
|
|
7 |
*/
|
8 |
|
9 |
/**** If this file is called directly, abort. ****/
|
includes/admin/class-top-ten-statistics-table.php
CHANGED
@@ -4,10 +4,6 @@
|
|
4 |
*
|
5 |
* @package Top_Ten
|
6 |
* @subpackage Top_Ten_Statistics_Table
|
7 |
-
* @author Ajay D'Souza <me@ajaydsouza.com>
|
8 |
-
* @license GPL-2.0+
|
9 |
-
* @link https://webberzone.com
|
10 |
-
* @copyright 2008-2020 Ajay D'Souza
|
11 |
*/
|
12 |
|
13 |
/**** If this file is called directly, abort. ****/
|
@@ -64,16 +60,10 @@ class Top_Ten_Statistics_Table extends WP_List_Table {
|
|
64 |
|
65 |
$blog_id = get_current_blog_id();
|
66 |
|
67 |
-
$from_date =
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
);
|
72 |
-
$to_date = tptn_get_from_date(
|
73 |
-
isset( $args['post-date-filter-to'] ) ? $args['post-date-filter-to'] : null,
|
74 |
-
1,
|
75 |
-
0
|
76 |
-
);
|
77 |
|
78 |
/* Start creating the SQL */
|
79 |
$table_name_daily = $wpdb->base_prefix . 'top_ten_daily AS ttd';
|
4 |
*
|
5 |
* @package Top_Ten
|
6 |
* @subpackage Top_Ten_Statistics_Table
|
|
|
|
|
|
|
|
|
7 |
*/
|
8 |
|
9 |
/**** If this file is called directly, abort. ****/
|
60 |
|
61 |
$blog_id = get_current_blog_id();
|
62 |
|
63 |
+
$from_date = isset( $args['post-date-filter-from'] ) ? $args['post-date-filter-from'] : current_time( 'd M Y' );
|
64 |
+
$from_date = gmdate( 'Y-m-d', strtotime( $from_date ) );
|
65 |
+
$to_date = isset( $args['post-date-filter-to'] ) ? $args['post-date-filter-to'] : current_time( 'd M Y' );
|
66 |
+
$to_date = gmdate( 'Y-m-d', strtotime( $to_date ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
/* Start creating the SQL */
|
69 |
$table_name_daily = $wpdb->base_prefix . 'top_ten_daily AS ttd';
|
includes/admin/class-top-ten-statistics.php
CHANGED
@@ -4,10 +4,6 @@
|
|
4 |
*
|
5 |
* @package Top_Ten
|
6 |
* @subpackage Top_Ten_Statistics
|
7 |
-
* @author Ajay D'Souza <me@ajaydsouza.com>
|
8 |
-
* @license GPL-2.0+
|
9 |
-
* @link https://webberzone.com
|
10 |
-
* @copyright 2008-2020 Ajay D'Souza
|
11 |
*/
|
12 |
|
13 |
/**** If this file is called directly, abort. ****/
|
4 |
*
|
5 |
* @package Top_Ten
|
6 |
* @subpackage Top_Ten_Statistics
|
|
|
|
|
|
|
|
|
7 |
*/
|
8 |
|
9 |
/**** If this file is called directly, abort. ****/
|
includes/admin/default-settings.php
CHANGED
@@ -337,6 +337,13 @@ function tptn_settings_list() {
|
|
337 |
'type' => 'posttypes',
|
338 |
'options' => 'post',
|
339 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
'exclude_post_ids' => array(
|
341 |
'id' => 'exclude_post_ids',
|
342 |
'name' => esc_html__( 'Post/page IDs to exclude', 'top-10' ),
|
@@ -681,7 +688,8 @@ function tptn_settings_maintenance() {
|
|
681 |
'cron_on' => array(
|
682 |
'id' => 'cron_on',
|
683 |
'name' => esc_html__( 'Enable scheduled maintenance', 'top-10' ),
|
684 |
-
|
|
|
685 |
'type' => 'checkbox',
|
686 |
'options' => false,
|
687 |
),
|
@@ -893,11 +901,11 @@ function tptn_get_styles() {
|
|
893 |
);
|
894 |
|
895 |
/**
|
896 |
-
* Filter the array containing the types of
|
897 |
*
|
898 |
* @since 2.5.0
|
899 |
*
|
900 |
-
* @param string $
|
901 |
*/
|
902 |
return apply_filters( 'tptn_get_styles', $styles );
|
903 |
}
|
337 |
'type' => 'posttypes',
|
338 |
'options' => 'post',
|
339 |
),
|
340 |
+
'exclude_front' => array(
|
341 |
+
'id' => 'exclude_front',
|
342 |
+
'name' => esc_html__( 'Exclude Front page and Posts page', 'top-10' ),
|
343 |
+
'desc' => esc_html__( 'If you have set your Front page and Posts page to be specific pages via Settings > Reading, then these will be tracked similar to other pages. Enable this option to exclude them from showing up in the popular posts lists. The tracking will not be disabled.', 'top-10' ),
|
344 |
+
'type' => 'checkbox',
|
345 |
+
'options' => false,
|
346 |
+
),
|
347 |
'exclude_post_ids' => array(
|
348 |
'id' => 'exclude_post_ids',
|
349 |
'name' => esc_html__( 'Post/page IDs to exclude', 'top-10' ),
|
688 |
'cron_on' => array(
|
689 |
'id' => 'cron_on',
|
690 |
'name' => esc_html__( 'Enable scheduled maintenance', 'top-10' ),
|
691 |
+
/* translators: 1: Constant holding number of days data is stored. */
|
692 |
+
'desc' => sprintf( esc_html__( 'Cleaning the database at regular intervals could improve performance, especially on high traffic blogs. Enabling maintenance will automatically delete entries older than %d days in the daily tables.', 'top-10' ), TOP_TEN_STORE_DATA ),
|
693 |
'type' => 'checkbox',
|
694 |
'options' => false,
|
695 |
),
|
901 |
);
|
902 |
|
903 |
/**
|
904 |
+
* Filter the array containing the types of styles to add your own.
|
905 |
*
|
906 |
* @since 2.5.0
|
907 |
*
|
908 |
+
* @param string $styles Different styles.
|
909 |
*/
|
910 |
return apply_filters( 'tptn_get_styles', $styles );
|
911 |
}
|
includes/admin/js/chart-data.js
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Function to clear the cache.
|
2 |
+
function updateChart() {
|
3 |
+
jQuery.post(ajaxurl, {
|
4 |
+
action: 'tptn_chart_data',
|
5 |
+
security: tptn_chart_data.security,
|
6 |
+
from_date: jQuery('#datepicker-from').val(),
|
7 |
+
to_date: jQuery('#datepicker-to').val()
|
8 |
+
}, function (data) {
|
9 |
+
var date = [];
|
10 |
+
var visits = [];
|
11 |
+
|
12 |
+
for(var i in data) {
|
13 |
+
date.push(data[i].date);
|
14 |
+
visits.push(data[i].visits);
|
15 |
+
}
|
16 |
+
console.log(date);
|
17 |
+
console.log(visits);
|
18 |
+
window.top10chart.data.labels = date;
|
19 |
+
window.top10chart.data.datasets.forEach((dataset) => {
|
20 |
+
dataset.data = visits;
|
21 |
+
});
|
22 |
+
window.top10chart.update();
|
23 |
+
}, 'json');
|
24 |
+
}
|
25 |
+
|
26 |
+
jQuery(document).ready(function($) {
|
27 |
+
|
28 |
+
$.ajax({
|
29 |
+
type: 'POST',
|
30 |
+
dataType: 'json',
|
31 |
+
url: ajaxurl,
|
32 |
+
data: {
|
33 |
+
action: 'tptn_chart_data',
|
34 |
+
security: tptn_chart_data.security,
|
35 |
+
from_date: $('#datepicker-from').val(),
|
36 |
+
to_date: $('#datepicker-to').val()
|
37 |
+
},
|
38 |
+
success: function(data) {
|
39 |
+
var date = [];
|
40 |
+
var visits = [];
|
41 |
+
|
42 |
+
for(var i in data) {
|
43 |
+
date.push(data[i].date);
|
44 |
+
visits.push(data[i].visits);
|
45 |
+
}
|
46 |
+
|
47 |
+
var ctx = $("#visits");
|
48 |
+
var config = {
|
49 |
+
type: 'bar',
|
50 |
+
data: {
|
51 |
+
labels: date,
|
52 |
+
datasets : [
|
53 |
+
{
|
54 |
+
label: tptn_chart_data.datasetlabel,
|
55 |
+
backgroundColor: '#70c4e1',
|
56 |
+
borderColor: '#70c4e1',
|
57 |
+
hoverBackgroundColor: '#ffbf00',
|
58 |
+
hoverBorderColor: '#ffbf00',
|
59 |
+
data: visits
|
60 |
+
}
|
61 |
+
]
|
62 |
+
},
|
63 |
+
plugins: [ChartDataLabels],
|
64 |
+
options: {
|
65 |
+
plugins: {
|
66 |
+
title: {
|
67 |
+
text: tptn_chart_data.charttitle,
|
68 |
+
display: true
|
69 |
+
},
|
70 |
+
legend: {
|
71 |
+
display: false,
|
72 |
+
position: 'bottom'
|
73 |
+
},
|
74 |
+
datalabels: {
|
75 |
+
color: '#000000',
|
76 |
+
anchor: 'end',
|
77 |
+
align: 'top'
|
78 |
+
}
|
79 |
+
},
|
80 |
+
scales: {
|
81 |
+
x: {
|
82 |
+
type: 'time',
|
83 |
+
time: {
|
84 |
+
tooltipFormat: 'll',
|
85 |
+
unit: 'day',
|
86 |
+
displayFormats: {
|
87 |
+
day: 'DD MMM YY'
|
88 |
+
}
|
89 |
+
},
|
90 |
+
scaleLabel: {
|
91 |
+
display: false,
|
92 |
+
labelString: 'Date'
|
93 |
+
}
|
94 |
+
},
|
95 |
+
y: {
|
96 |
+
grace: '5%',
|
97 |
+
suggestedMin: 0,
|
98 |
+
scaleLabel: {
|
99 |
+
display: true,
|
100 |
+
labelString: tptn_chart_data.datasetlabel
|
101 |
+
}
|
102 |
+
}
|
103 |
+
},
|
104 |
+
}
|
105 |
+
};
|
106 |
+
|
107 |
+
|
108 |
+
window.top10chart = new Chart(ctx, config);
|
109 |
+
},
|
110 |
+
error: function(data) {
|
111 |
+
console.log(data);
|
112 |
+
}
|
113 |
+
});
|
114 |
+
|
115 |
+
});
|
includes/admin/js/chart-data.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
function updateChart(){jQuery.post(ajaxurl,{action:"tptn_chart_data",security:tptn_chart_data.security,from_date:jQuery("#datepicker-from").val(),to_date:jQuery("#datepicker-to").val()},(function(data){var date=[],visits=[];for(var i in data)date.push(data[i].date),visits.push(data[i].visits);console.log(date),console.log(visits),window.top10chart.data.labels=date,window.top10chart.data.datasets.forEach(dataset=>{dataset.data=visits}),window.top10chart.update()}),"json")}jQuery(document).ready((function($){$.ajax({type:"POST",dataType:"json",url:ajaxurl,data:{action:"tptn_chart_data",security:tptn_chart_data.security,from_date:$("#datepicker-from").val(),to_date:$("#datepicker-to").val()},success:function(data){var date=[],visits=[];for(var i in data)date.push(data[i].date),visits.push(data[i].visits);var ctx=$("#visits"),config={type:"bar",data:{labels:date,datasets:[{label:tptn_chart_data.datasetlabel,backgroundColor:"#70c4e1",borderColor:"#70c4e1",hoverBackgroundColor:"#ffbf00",hoverBorderColor:"#ffbf00",data:visits}]},plugins:[ChartDataLabels],options:{plugins:{title:{text:tptn_chart_data.charttitle,display:!0},legend:{display:!1,position:"bottom"},datalabels:{color:"#000000",anchor:"end",align:"top"}},scales:{x:{type:"time",time:{tooltipFormat:"ll",unit:"day",displayFormats:{day:"DD MMM YY"}},scaleLabel:{display:!1,labelString:"Date"}},y:{grace:"5%",suggestedMin:0,scaleLabel:{display:!0,labelString:tptn_chart_data.datasetlabel}}}}};window.top10chart=new Chart(ctx,config)},error:function(data){console.log(data)}})}));
|
includes/admin/js/chart.min.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Chart.js v3.1.0
|
3 |
+
* https://www.chartjs.org
|
4 |
+
* (c) 2021 Chart.js Contributors
|
5 |
+
* Released under the MIT License
|
6 |
+
*/
|
7 |
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,(function(){"use strict";const t="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function e(e,i,n){const o=n||(t=>Array.prototype.slice.call(t));let s=!1,a=[];return function(...n){a=o(n),s||(s=!0,t.call(window,(()=>{s=!1,e.apply(i,a)})))}}function i(t,e){let i;return function(){return e?(clearTimeout(i),i=setTimeout(t,e)):t(),e}}const n=t=>"start"===t?"left":"end"===t?"right":"center",o=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,s=(t,e,i)=>"right"===t?i:"center"===t?(e+i)/2:e;var a=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const o=e.listeners[n],s=e.duration;o.forEach((n=>n({chart:t,numSteps:s,currentStep:Math.min(i-e.start,s)})))}_refresh(){const e=this;e._request||(e._running=!0,e._request=t.call(window,(()=>{e._update(),e._request=null,e._running&&e._refresh()})))}_update(t=Date.now()){const e=this;let i=0;e._charts.forEach(((n,o)=>{if(!n.running||!n.items.length)return;const s=n.items;let a,r=s.length-1,l=!1;for(;r>=0;--r)a=s[r],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(t),l=!0):(s[r]=s[s.length-1],s.pop());l&&(o.draw(),e._notify(o,n,t,"progress")),s.length||(n.running=!1,e._notify(o,n,t,"complete")),i+=s.length})),e._lastDate=t,0===i&&(e._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};
|
8 |
+
/*!
|
9 |
+
* @kurkle/color v0.1.9
|
10 |
+
* https://github.com/kurkle/color#readme
|
11 |
+
* (c) 2020 Jukka Kurkela
|
12 |
+
* Released under the MIT License
|
13 |
+
*/const r={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},l="0123456789ABCDEF",c=t=>l[15&t],h=t=>l[(240&t)>>4]+l[15&t],d=t=>(240&t)>>4==(15&t);function u(t){var e=function(t){return d(t.r)&&d(t.g)&&d(t.b)&&d(t.a)}(t)?c:h;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function f(t){return t+.5|0}const g=(t,e,i)=>Math.max(Math.min(t,i),e);function p(t){return g(f(2.55*t),0,255)}function m(t){return g(f(255*t),0,255)}function x(t){return g(f(t/2.55)/100,0,1)}function b(t){return g(f(100*t),0,100)}const _=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const y=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function v(t,e,i){const n=e*Math.min(i,1-i),o=(e,o=(e+t/30)%12)=>i-n*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function w(t,e,i){const n=(n,o=(n+t/60)%6)=>i-i*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function M(t,e,i){const n=v(t,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)n[o]*=1-e-i,n[o]+=e;return n}function k(t){const e=t.r/255,i=t.g/255,n=t.b/255,o=Math.max(e,i,n),s=Math.min(e,i,n),a=(o+s)/2;let r,l,c;return o!==s&&(c=o-s,l=a>.5?c/(2-o-s):c/(o+s),r=o===e?(i-n)/c+(i<n?6:0):o===i?(n-e)/c+2:(e-i)/c+4,r=60*r+.5),[0|r,l||0,a]}function S(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(m)}function P(t,e,i){return S(v,t,e,i)}function D(t){return(t%360+360)%360}function C(t){const e=y.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?p(+e[5]):m(+e[5]));const o=D(+e[2]),s=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return S(M,t,e,i)}(o,s,a):"hsv"===e[1]?function(t,e,i){return S(w,t,e,i)}(o,s,a):P(o,s,a),{r:i[0],g:i[1],b:i[2],a:n}}const O={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},A={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let T;function R(t){T||(T=function(){const t={},e=Object.keys(A),i=Object.keys(O);let n,o,s,a,r;for(n=0;n<e.length;n++){for(a=r=e[n],o=0;o<i.length;o++)s=i[o],r=r.replace(s,O[s]);s=parseInt(A[a],16),t[r]=[s>>16&255,s>>8&255,255&s]}return t}(),T.transparent=[0,0,0,0]);const e=T[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function L(t,e,i){if(t){let n=k(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=P(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function E(t,e){return t?Object.assign(e||{},t):t}function I(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=m(t[3]))):(e=E(t,{r:0,g:0,b:0,a:1})).a=m(e.a),e}function F(t){return"r"===t.charAt(0)?function(t){const e=_.exec(t);let i,n,o,s=255;if(e){if(e[7]!==i){const t=+e[7];s=255&(e[8]?p(t):255*t)}return i=+e[1],n=+e[3],o=+e[5],i=255&(e[2]?p(i):i),n=255&(e[4]?p(n):n),o=255&(e[6]?p(o):o),{r:i,g:n,b:o,a:s}}}(t):C(t)}class z{constructor(t){if(t instanceof z)return t;const e=typeof t;let i;var n,o,s;"object"===e?i=I(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?o={r:255&17*r[n[1]],g:255&17*r[n[2]],b:255&17*r[n[3]],a:5===s?17*r[n[4]]:255}:7!==s&&9!==s||(o={r:r[n[1]]<<4|r[n[2]],g:r[n[3]]<<4|r[n[4]],b:r[n[5]]<<4|r[n[6]],a:9===s?r[n[7]]<<4|r[n[8]]:255})),i=o||R(t)||F(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=E(this._rgb);return t&&(t.a=x(t.a)),t}set rgb(t){this._rgb=I(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${x(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?u(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=k(t),i=e[0],n=b(e[1]),o=b(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${o}%, ${x(t.a)})`:`hsl(${i}, ${n}%, ${o}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,o=t.rgb;let s;const a=e===s?.5:e,r=2*a-1,l=n.a-o.a,c=((r*l==-1?r:(r+l)/(1+r*l))+1)/2;s=1-c,n.r=255&c*n.r+s*o.r+.5,n.g=255&c*n.g+s*o.g+.5,n.b=255&c*n.b+s*o.b+.5,n.a=a*n.a+(1-a)*o.a,i.rgb=n}return i}clone(){return new z(this.rgb)}alpha(t){return this._rgb.a=m(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=f(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return L(this._rgb,2,t),this}darken(t){return L(this._rgb,2,-t),this}saturate(t){return L(this._rgb,1,t),this}desaturate(t){return L(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=k(t);i[0]=D(i[0]+e),i=P(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function V(t){return new z(t)}const B=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function W(t){return B(t)?t:V(t)}function N(t){return B(t)?t:V(t).saturate(.5).darken(.1).hexString()}function H(){}const j=function(){let t=0;return function(){return t++}}();function $(t){return null==t}function Y(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function U(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const X=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function q(t,e){return X(t)?t:e}function K(t,e){return void 0===t?e:t}const G=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,Z=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Q(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function J(t,e,i,n){let o,s,a;if(Y(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<s;o++)e.call(i,t[o],o);else if(U(t))for(a=Object.keys(t),s=a.length,o=0;o<s;o++)e.call(i,t[a[o]],a[o])}function tt(t,e){let i,n,o,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=t[i],s=e[i],o.datasetIndex!==s.datasetIndex||o.index!==s.index)return!1;return!0}function et(t){if(Y(t))return t.map(et);if(U(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let o=0;for(;o<n;++o)e[i[o]]=et(t[i[o]]);return e}return t}function it(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function nt(t,e,i,n){if(!it(t))return;const o=e[t],s=i[t];U(o)&&U(s)?ot(o,s,n):e[t]=et(s)}function ot(t,e,i){const n=Y(e)?e:[e],o=n.length;if(!U(t))return t;const s=(i=i||{}).merger||nt;for(let a=0;a<o;++a){if(!U(e=n[a]))continue;const o=Object.keys(e);for(let n=0,a=o.length;n<a;++n)s(o[n],t,e,i)}return t}function st(t,e){return ot(t,e,{merger:at})}function at(t,e,i){if(!it(t))return;const n=e[t],o=i[t];U(n)&&U(o)?st(n,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=et(o))}function rt(t,e){const i=t.indexOf(".",e);return-1===i?t.length:i}function lt(t,e){if(""===e)return t;let i=0,n=rt(e,i);for(;t&&n>i;)t=t[e.substr(i,n-i)],i=n+1,n=rt(e,i);return t}function ct(t){return t.charAt(0).toUpperCase()+t.slice(1)}const ht=t=>void 0!==t,dt=t=>"function"==typeof t,ut=Object.create(null),ft=Object.create(null);function gt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function pt(t,e,i){return"string"==typeof e?ot(gt(t,e),i):ot(gt(t,""),e)}var mt=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>N(e.backgroundColor),this.hoverBorderColor=(t,e)=>N(e.borderColor),this.hoverColor=(t,e)=>N(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return pt(this,t,e)}get(t){return gt(this,t)}describe(t,e){return pt(ft,t,e)}override(t,e){return pt(ut,t,e)}route(t,e,i,n){const o=gt(this,t),s=gt(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=s[n];return U(t)?Object.assign({},e,t):K(t,e)},set(t){this[a]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});const xt=Math.PI,bt=2*xt,_t=bt+xt,yt=Number.POSITIVE_INFINITY,vt=xt/180,wt=xt/2,Mt=xt/4,kt=2*xt/3,St=Math.log10,Pt=Math.sign;function Dt(t){const e=Math.pow(10,Math.floor(St(t))),i=t/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function Ct(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}function Ot(t){return!isNaN(parseFloat(t))&&isFinite(t)}function At(t,e,i){return Math.abs(t-e)<i}function Tt(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function Rt(t,e,i){let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n][i],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Lt(t){return t*(xt/180)}function Et(t){return t*(180/xt)}function It(t){if(!X(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Ft(t,e){const i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n);let s=Math.atan2(n,i);return s<-.5*xt&&(s+=bt),{angle:s,distance:o}}function zt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Vt(t,e){return(t-e+_t)%bt-xt}function Bt(t){return(t%bt+bt)%bt}function Wt(t,e,i){const n=Bt(t),o=Bt(e),s=Bt(i),a=Bt(o-n),r=Bt(s-n),l=Bt(n-o),c=Bt(n-s);return n===o||n===s||a>r&&l<c}function Nt(t,e,i){return Math.max(e,Math.min(i,t))}function Ht(t){return Nt(t,-32768,32767)}function jt(t){return!t||$(t.size)||$(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function $t(t,e,i,n,o){let s=e[o];return s||(s=e[o]=t.measureText(o).width,i.push(o)),s>n&&(n=s),n}function Yt(t,e,i,n){let o=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const r=i.length;let l,c,h,d,u;for(l=0;l<r;l++)if(d=i[l],null!=d&&!0!==Y(d))a=$t(t,o,s,a,d);else if(Y(d))for(c=0,h=d.length;c<h;c++)u=d[c],null==u||Y(u)||(a=$t(t,o,s,a,u));t.restore();const f=s.length/2;if(f>i.length){for(l=0;l<f;l++)delete o[s[l]];s.splice(0,f)}return a}function Ut(t,e,i){const n=t.currentDevicePixelRatio,o=0!==i?Math.max(i/2,.5):0;return Math.round((e-o)*n)/n+o}function Xt(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function qt(t,e,i,n){let o,s,a,r,l;const c=e.pointStyle,h=e.rotation,d=e.radius;let u=(h||0)*vt;if(c&&"object"==typeof c&&(o=c.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(u),t.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),void t.restore();if(!(isNaN(d)||d<=0)){switch(t.beginPath(),c){default:t.arc(i,n,d,0,bt),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=kt,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=kt,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),t.closePath();break;case"rectRounded":l=.516*d,r=d-l,s=Math.cos(u+Mt)*r,a=Math.sin(u+Mt)*r,t.arc(i-s,n-a,l,u-xt,u-wt),t.arc(i+a,n-s,l,u-wt,u),t.arc(i+s,n+a,l,u,u+wt),t.arc(i-a,n+s,l,u+wt,u+xt),t.closePath();break;case"rect":if(!h){r=Math.SQRT1_2*d,t.rect(i-r,n-r,2*r,2*r);break}u+=Mt;case"rectRot":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+a,n-s),t.lineTo(i+s,n+a),t.lineTo(i-a,n+s),t.closePath();break;case"crossRot":u+=Mt;case"cross":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"star":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s),u+=Mt,s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"line":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(u)*d,n+Math.sin(u)*d)}t.fill(),e.borderWidth>0&&t.stroke()}}function Kt(t,e,i){return i=i||.5,t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Gt(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Zt(t){t.restore()}function Qt(t,e,i,n,o){if(!e)return t.lineTo(i.x,i.y);if("middle"===o){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===o!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Jt(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function te(t,e,i,n,o,s={}){const a=Y(e)?e:[e],r=s.strokeWidth>0&&""!==s.strokeColor;let l,c;for(t.save(),s.translation&&t.translate(s.translation[0],s.translation[1]),$(s.rotation)||t.rotate(s.rotation),t.font=o.string,s.color&&(t.fillStyle=s.color),s.textAlign&&(t.textAlign=s.textAlign),s.textBaseline&&(t.textBaseline=s.textBaseline),l=0;l<a.length;++l){if(c=a[l],r&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),$(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,i,n,s.maxWidth)),t.fillText(c,i,n,s.maxWidth),s.strikethrough||s.underline){const e=t.measureText(c),o=i-e.actualBoundingBoxLeft,a=i+e.actualBoundingBoxRight,r=n-e.actualBoundingBoxAscent,l=n+e.actualBoundingBoxDescent,h=s.strikethrough?(r+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(o,h),t.lineTo(a,h),t.stroke()}n+=o.lineHeight}t.restore()}function ee(t,e){const{x:i,y:n,w:o,h:s,radius:a}=e;t.arc(i+a.topLeft,n+a.topLeft,a.topLeft,-wt,xt,!0),t.lineTo(i,n+s-a.bottomLeft),t.arc(i+a.bottomLeft,n+s-a.bottomLeft,a.bottomLeft,xt,wt,!0),t.lineTo(i+o-a.bottomRight,n+s),t.arc(i+o-a.bottomRight,n+s-a.bottomRight,a.bottomRight,wt,0,!0),t.lineTo(i+o,n+a.topRight),t.arc(i+o-a.topRight,n+a.topRight,a.topRight,0,-wt,!0),t.lineTo(i+a.topLeft,n)}function ie(t,e,i){i=i||(i=>t[i]<e);let n,o=t.length-1,s=0;for(;o-s>1;)n=s+o>>1,i(n)?s=n:o=n;return{lo:s,hi:o}}const ne=(t,e,i)=>ie(t,i,(n=>t[n][e]<i)),oe=(t,e,i)=>ie(t,i,(n=>t[n][e]>=i));function se(t,e,i){let n=0,o=t.length;for(;n<o&&t[n]<e;)n++;for(;o>n&&t[o-1]>i;)o--;return n>0||o<t.length?t.slice(n,o):t}const ae=["push","pop","shift","splice","unshift"];function re(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),ae.forEach((e=>{const i="_onData"+ct(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const o=n.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),o}})})))}function le(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(ae.forEach((e=>{delete t[e]})),delete t._chartjs)}function ce(t){const e=new Set;let i,n;for(i=0,n=t.length;i<n;++i)e.add(t[i]);if(e.size===n)return t;const o=[];return e.forEach((t=>{o.push(t)})),o}function he(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function de(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const ue=t=>window.getComputedStyle(t,null);function fe(t,e){return ue(t).getPropertyValue(e)}const ge=["top","right","bottom","left"];function pe(t,e,i){const n={};i=i?"-"+i:"";for(let o=0;o<4;o++){const s=ge[o];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function me(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,o=ue(i),s="border-box"===o.boxSizing,a=pe(o,"padding"),r=pe(o,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,o=n&&n.length?n[0]:i,{offsetX:s,offsetY:a}=o;let r,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,a,i.target))r=s,l=a;else{const t=e.getBoundingClientRect();r=o.clientX-t.left,l=o.clientY-t.top,c=!0}return{x:r,y:l,box:c}}(t,i),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:g}=e;return s&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/g*i.height/n)}}const xe=t=>Math.round(10*t)/10;function be(t,e,i,n){const o=ue(t),s=pe(o,"margin"),a=de(o.maxWidth,t,"clientWidth")||yt,r=de(o.maxHeight,t,"clientHeight")||yt,l=function(t,e,i){let n,o;if(void 0===e||void 0===i){const s=he(t);if(s){const t=s.getBoundingClientRect(),a=ue(s),r=pe(a,"border","width"),l=pe(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,n=de(a.maxWidth,s,"clientWidth"),o=de(a.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||yt,maxHeight:o||yt}}(t,e,i);let{width:c,height:h}=l;if("content-box"===o.boxSizing){const t=pe(o,"border","width"),e=pe(o,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-s.width),h=Math.max(0,n?Math.floor(c/n):h-s.height),c=xe(Math.min(c,a,l.maxWidth)),h=xe(Math.min(h,r,l.maxHeight)),c&&!h&&(h=xe(c/2)),{width:c,height:h}}function _e(t,e,i){const n=t.currentDevicePixelRatio=e||1,{canvas:o,width:s,height:a}=t;o.height=a*n,o.width=s*n,t.ctx.setTransform(n,0,0,n,0,0),o.style&&(i||!o.style.height&&!o.style.width)&&(o.style.height=a+"px",o.style.width=s+"px")}const ye=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ve(t,e){const i=fe(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function we(t,e){return"native"in t?{x:t.x,y:t.y}:me(t,e)}function Me(t,e,i,n){const{controller:o,data:s,_sorted:a}=t,r=o._cachedMeta.iScale;if(r&&e===r.axis&&a&&s.length){const t=r._reversePixels?oe:ne;if(!n)return t(s,e,i);if(o._sharedOptions){const n=s[0],o="function"==typeof n.getRange&&n.getRange(e);if(o){const n=t(s,e,i-o),a=t(s,e,i+o);return{lo:n.lo,hi:a.hi}}}}return{lo:0,hi:s.length-1}}function ke(t,e,i,n,o){const s=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=s.length;t<i;++t){const{index:i,data:r}=s[t],{lo:l,hi:c}=Me(s[t],e,a,o);for(let t=l;t<=c;++t){const e=r[t];e.skip||n(e,i,t)}}}function Se(t,e,i,n){const o=[];if(!Kt(e,t.chartArea,t._minPadding))return o;return ke(t,i,e,(function(t,i,s){t.inRange(e.x,e.y,n)&&o.push({element:t,datasetIndex:i,index:s})}),!0),o}function Pe(t,e,i,n,o){const s=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const o=e?Math.abs(t.x-n.x):0,s=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}(i);let a=Number.POSITIVE_INFINITY,r=[];if(!Kt(e,t.chartArea,t._minPadding))return r;return ke(t,i,e,(function(t,i,l){if(n&&!t.inRange(e.x,e.y,o))return;const c=t.getCenterPoint(o),h=s(e,c);h<a?(r=[{element:t,datasetIndex:i,index:l}],a=h):h===a&&r.push({element:t,datasetIndex:i,index:l})})),r}function De(t,e,i,n){const o=we(e,t),s=[],a=i.axis,r="x"===a?"inXRange":"inYRange";let l=!1;return function(t,e){const i=t.getSortedVisibleDatasetMetas();let n,o,s;for(let t=0,a=i.length;t<a;++t){({index:n,data:o}=i[t]);for(let t=0,i=o.length;t<i;++t)s=o[t],s.skip||e(s,n,t)}}(t,((t,e,i)=>{t[r](o[a],n)&&s.push({element:t,datasetIndex:e,index:i}),t.inRange(o.x,o.y,n)&&(l=!0)})),i.intersect&&!l?[]:s}var Ce={modes:{index(t,e,i,n){const o=we(e,t),s=i.axis||"x",a=i.intersect?Se(t,o,s,n):Pe(t,o,s,!1,n),r=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&r.push({element:i,datasetIndex:t.index,index:e})})),r):[]},dataset(t,e,i,n){const o=we(e,t),s=i.axis||"xy";let a=i.intersect?Se(t,o,s,n):Pe(t,o,s,!1,n);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,n)=>Se(t,we(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>Pe(t,we(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",De(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",De(t,e,i,n))}};const Oe=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Ae=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Te(t,e){const i=(""+t).match(Oe);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function Re(t,e){const i={},n=U(e),o=n?Object.keys(e):e,s=U(t)?n?i=>K(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of o)i[t]=+s(t)||0;return i}function Le(t){return Re(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Ee(t){return Re(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ie(t){const e=Le(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Fe(t,e){t=t||{},e=e||mt.font;let i=K(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=K(t.style,e.style);n&&!(""+n).match(Ae)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const o={family:K(t.family,e.family),lineHeight:Te(K(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:K(t.weight,e.weight),string:""};return o.string=jt(o),o}function ze(t,e,i,n){let o,s,a,r=!0;for(o=0,s=t.length;o<s;++o)if(a=t[o],void 0!==a&&(void 0!==e&&"function"==typeof a&&(a=a(e),r=!1),void 0!==i&&Y(a)&&(a=a[i%a.length],r=!1),void 0!==a))return n&&!r&&(n.cacheable=!1),a}function Ve(t,e){const{min:i,max:n}=t;return{min:i-Math.abs(Z(e,i)),max:n+Z(e,n)}}const Be=["left","top","right","bottom"];function We(t,e){return t.filter((t=>t.pos===e))}function Ne(t,e){return t.filter((t=>-1===Be.indexOf(t.pos)&&t.box.axis===e))}function He(t,e){return t.sort(((t,i)=>{const n=e?i:t,o=e?t:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight}))}function je(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function $e(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ye(t,e,i){const n=i.box,o=t.maxPadding;U(i.pos)||(i.size&&(t[i.pos]-=i.size),i.size=i.horizontal?n.height:n.width,t[i.pos]+=i.size),n.getPadding&&$e(o,n.getPadding());const s=Math.max(0,e.outerWidth-je(o,t,"left","right")),a=Math.max(0,e.outerHeight-je(o,t,"top","bottom")),r=s!==t.w,l=a!==t.h;return t.w=s,t.h=a,i.horizontal?{same:r,other:l}:{same:l,other:r}}function Ue(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Xe(t,e,i){const n=[];let o,s,a,r,l,c;for(o=0,s=t.length,l=0;o<s;++o){a=t[o],r=a.box,r.update(a.width||e.w,a.height||e.h,Ue(a.horizontal,e));const{same:s,other:h}=Ye(e,i,a);l|=s&&n.length,c=c||h,r.fullSize||n.push(a)}return l&&Xe(n,e,i)||c}function qe(t,e,i){const n=i.padding;let o,s,a,r,l=e.x,c=e.y;for(o=0,s=t.length;o<s;++o)a=t[o],r=a.box,a.horizontal?(r.left=r.fullSize?n.left:e.left,r.right=r.fullSize?i.outerWidth-n.right:e.left+e.w,r.top=c,r.bottom=c+r.height,r.width=r.right-r.left,c=r.bottom):(r.left=l,r.right=l+r.width,r.top=r.fullSize?n.top:e.top,r.bottom=r.fullSize?i.outerHeight-n.right:e.top+e.h,r.height=r.bottom-r.top,l=r.right);e.x=l,e.y=c}mt.set("layout",{padding:{top:0,right:0,bottom:0,left:0}});var Ke={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const o=Ie(t.options.layout.padding),s=e-o.width,a=i-o.height,r=function(t){const e=function(t){const e=[];let i,n,o;for(i=0,n=(t||[]).length;i<n;++i)o=t[i],e.push({index:i,box:o,pos:o.position,horizontal:o.isHorizontal(),weight:o.weight});return e}(t),i=He(e.filter((t=>t.box.fullSize)),!0),n=He(We(e,"left"),!0),o=He(We(e,"right")),s=He(We(e,"top"),!0),a=He(We(e,"bottom")),r=Ne(e,"x"),l=Ne(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:o.concat(l).concat(a).concat(r),chartArea:We(e,"chartArea"),vertical:n.concat(o).concat(l),horizontal:s.concat(a).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;J(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},o);$e(u,Ie(n));const f=Object.assign({maxPadding:u,w:s,h:a,x:o.left,y:o.top},o);!function(t,e){let i,n,o;for(i=0,n=t.length;i<n;++i)o=t[i],o.horizontal?(o.width=o.box.fullSize&&e.availableWidth,o.height=e.hBoxMaxHeight):(o.width=e.vBoxMaxWidth,o.height=o.box.fullSize&&e.availableHeight)}(l.concat(c),d),Xe(r.fullSize,f,d),Xe(l,f,d),Xe(c,f,d)&&Xe(l,f,d),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),qe(r.leftAndTop,f,d),f.x+=f.w,f.y+=f.h,qe(r.rightAndBottom,f,d),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},J(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)}))}};class Ge{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}}class Ze extends Ge{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}}const Qe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Je=t=>null===t||""===t;const ti=!!ye&&{passive:!0};function ei(t,e,i){t.canvas.removeEventListener(e,i,ti)}function ii(t,e,i){const n=t.canvas,o=n&&he(n)||n,s=new MutationObserver((t=>{const e=he(o);t.forEach((t=>{for(let n=0;n<t.addedNodes.length;n++){const s=t.addedNodes[n];s!==o&&s!==e||i(t.target)}}))}));return s.observe(document,{childList:!0,subtree:!0}),s}function ni(t,e,i){const n=t.canvas,o=n&&he(n);if(!o)return;const s=new MutationObserver((t=>{t.forEach((t=>{for(let e=0;e<t.removedNodes.length;e++)if(t.removedNodes[e]===n){i();break}}))}));return s.observe(o,{childList:!0}),s}const oi=new Map;let si=0;function ai(){const t=window.devicePixelRatio;t!==si&&(si=t,oi.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function ri(t,i,n){const o=t.canvas,s=o&&he(o);if(!s)return;const a=e(((t,e)=>{const i=s.clientWidth;n(t,e),i<s.clientWidth&&n()}),window),r=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||a(i,n)}));return r.observe(s),function(t,e){oi.size||window.addEventListener("resize",ai),oi.set(t,e)}(t,a),r}function li(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){oi.delete(t),oi.size||window.removeEventListener("resize",ai)}(t)}function ci(t,i,n){const o=t.canvas,s=e((e=>{null!==t.ctx&&n(function(t,e){const i=Qe[t.type]||t.type,{x:n,y:o}=me(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==o?o:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,ti)}(o,i,s),s}class hi extends Ge{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Je(o)){const e=ve(t,"width");void 0!==e&&(t.width=e)}if(Je(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ve(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];$(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),o={attach:ii,detach:ni,resize:ri}[e]||ci;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:li,detach:li,resize:li}[e]||ei)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return be(t,e,i,n)}isAttached(t){const e=he(t);return!(!e||!he(e))}}var di=Object.freeze({__proto__:null,BasePlatform:Ge,BasicPlatform:Ze,DomPlatform:hi});const ui=t=>0===t||1===t,fi=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*bt/i),gi=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*bt/i)+1,pi={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*wt),easeOutSine:t=>Math.sin(t*wt),easeInOutSine:t=>-.5*(Math.cos(xt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ui(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ui(t)?t:fi(t,.075,.3),easeOutElastic:t=>ui(t)?t:gi(t,.075,.3),easeInOutElastic(t){const e=.1125;return ui(t)?t:t<.5?.5*fi(2*t,e,.45):.5+.5*gi(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let 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:t=>1-pi.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*pi.easeInBounce(2*t):.5*pi.easeOutBounce(2*t-1)+.5},mi="transparent",xi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=W(t||mi),o=n.valid&&W(e||mi);return o&&o.valid?o.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class bi{constructor(t,e,i,n){const o=e[i];n=ze([t.to,n,o,t.from]);const s=ze([t.from,o,n]);this._active=!0,this._fn=t.fn||xi[t.type||typeof s],this._easing=pi[t.easing]||pi.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){const n=this;if(n._active){n._notify(!1);const o=n._target[n._prop],s=i-n._start,a=n._duration-s;n._start=i,n._duration=Math.floor(Math.max(a,t.duration)),n._total+=s,n._loop=!!t.loop,n._to=ze([t.to,e,o,t.from]),n._from=ze([t.from,o,e])}}cancel(){const t=this;t._active&&(t.tick(Date.now()),t._active=!1,t._notify(!1))}tick(t){const e=this,i=t-e._start,n=e._duration,o=e._prop,s=e._from,a=e._loop,r=e._to;let l;if(e._active=s!==r&&(a||i<n),!e._active)return e._target[o]=r,void e._notify(!0);i<0?e._target[o]=s:(l=i/n%2,l=a&&l>1?2-l:l,l=e._easing(Math.min(1,Math.max(0,l))),e._target[o]=e._fn(s,r,l))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}mt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const _i=Object.keys(mt.animation);mt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),mt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),mt.describe("animations",{_fallback:"animation"}),mt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class yi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!U(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!U(n))return;const o={};for(const t of _i)o[t]=n[t];(Y(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const o=t[n[e]];o&&o.active()&&i.push(o.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),a=Date.now();let r;for(r=s.length-1;r>=0;--r){const l=s[r];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=o[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,a);continue}h.cancel()}d&&d.duration?(o[l]=h=new bi(d,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(a.add(this._chart,i),!0):void 0}}function vi(t,e){const i=t&&t.options||{},n=i.reverse,o=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:o,end:n?o:s}}function wi(t,e){const i=[],n=t._getSortedDatasetMetas(e);let o,s;for(o=0,s=n.length;o<s;++o)i.push(n[o].index);return i}function Mi(t,e,i,n){const o=t.keys,s="single"===n.mode;let a,r,l,c;if(null!==e){for(a=0,r=o.length;a<r;++a){if(l=+o[a],l===i){if(n.all)continue;break}c=t.values[l],X(c)&&(s||0===e||Pt(e)===Pt(c))&&(e+=c)}return e}}function ki(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function Si(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function Pi(t,e){const{chart:i,_cachedMeta:n}=t,o=i._stacks||(i._stacks={}),{iScale:s,vScale:a,index:r}=n,l=s.axis,c=a.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,a,n),d=e.length;let u;for(let t=0;t<d;++t){const i=e[t],{[l]:n,[c]:s}=i;u=(i._stacks||(i._stacks={}))[c]=Si(o,h,n),u[r]=s}}function Di(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function Ci(t,e){e=e||t._parsed;for(const i of e){const e=i._stacks;if(!e||void 0===e[t.vScale.id]||void 0===e[t.vScale.id][t.index])return;delete e[t.vScale.id][t.index]}}const Oi=t=>"reset"===t||"none"===t,Ai=(t,e)=>e?t:Object.assign({},t);class Ti{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this.initialize()}initialize(){const t=this,e=t._cachedMeta;t.configure(),t.linkScales(),e._stacked=ki(e.vScale,e),t.addElements()}updateIndex(t){this.index=t}linkScales(){const t=this,e=t.chart,i=t._cachedMeta,n=t.getDataset(),o=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=i.xAxisID=K(n.xAxisID,Di(e,"x")),a=i.yAxisID=K(n.yAxisID,Di(e,"y")),r=i.rAxisID=K(n.rAxisID,Di(e,"r")),l=i.indexAxis,c=i.iAxisID=o(l,s,a,r),h=i.vAxisID=o(l,a,s,r);i.xScale=t.getScaleForId(s),i.yScale=t.getScaleForId(a),i.rScale=t.getScaleForId(r),i.iScale=t.getScaleForId(c),i.vScale=t.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&le(this._data,this),t._stacked&&Ci(t)}_dataCheck(){const t=this,e=t.getDataset(),i=e.data||(e.data=[]);U(i)?t._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n],i[n]={x:s,y:t[s]};return i}(i):t._data!==i&&(t._data&&(le(t._data,t),Ci(t._cachedMeta)),i&&Object.isExtensible(i)&&re(i,t),t._data=i)}addElements(){const t=this,e=t._cachedMeta;t._dataCheck(),t.datasetElementType&&(e.dataset=new t.datasetElementType)}buildOrUpdateElements(t){const e=this,i=e._cachedMeta,n=e.getDataset();let o=!1;e._dataCheck(),i._stacked=ki(i.vScale,i),i.stack!==n.stack&&(o=!0,Ci(i),i.stack=n.stack),e._resyncElements(t),o&&Pi(e,i._parsed)}configure(){const t=this,e=t.chart.config,i=e.datasetScopeKeys(t._type),n=e.getOptionScopes(t.getDataset(),i,!0);t.options=e.createResolver(n,t.getContext()),t._parsing=t.options.parsing}parse(t,e){const i=this,{_cachedMeta:n,_data:o}=i,{iScale:s,_stacked:a}=n,r=s.axis;let l,c,h,d=0===t&&e===o.length||n._sorted,u=t>0&&n._parsed[t-1];if(!1===i._parsing)n._parsed=o,n._sorted=!0;else{h=Y(o[t])?i.parseArrayData(n,o,t,e):U(o[t])?i.parseObjectData(n,o,t,e):i.parsePrimitiveData(n,o,t,e);const s=()=>null===c[r]||u&&c[r]<u[r];for(l=0;l<e;++l)n._parsed[l+t]=c=h[l],d&&(s()&&(d=!1),u=c);n._sorted=d}a&&Pi(i,h)}parsePrimitiveData(t,e,i,n){const{iScale:o,vScale:s}=t,a=o.axis,r=s.axis,l=o.getLabels(),c=o===s,h=new Array(n);let d,u,f;for(d=0,u=n;d<u;++d)f=d+i,h[d]={[a]:c||o.parse(l[f],f),[r]:s.parse(e[f],f)};return h}parseArrayData(t,e,i,n){const{xScale:o,yScale:s}=t,a=new Array(n);let r,l,c,h;for(r=0,l=n;r<l;++r)c=r+i,h=e[c],a[r]={x:o.parse(h[0],c),y:s.parse(h[1],c)};return a}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=new Array(n);let c,h,d,u;for(c=0,h=n;c<h;++c)d=c+i,u=e[d],l[c]={x:o.parse(lt(u,a),d),y:s.parse(lt(u,r),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,o=this._cachedMeta,s=e[t.axis];return Mi({keys:wi(n,!0),values:e._stacks[t.axis]},s,o.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const o=i[e.axis];let s=null===o?NaN:o;const a=n&&i._stacks[e.axis];n&&a&&(n.values=a,t.min=Math.min(t.min,s),t.max=Math.max(t.max,s),s=Mi(n,o,this._cachedMeta.index,{all:!0})),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this,n=i._cachedMeta,o=n._parsed,s=n._sorted&&t===n.iScale,a=o.length,r=i._getOtherScale(t),l=e&&n._stacked&&{keys:wi(i.chart,!0),values:null},c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=function(t){const{min:e,max:i,minDefined:n,maxDefined:o}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:o?i:Number.POSITIVE_INFINITY}}(r);let u,f,g,p;function m(){return g=o[u],f=g[t.axis],p=g[r.axis],!X(f)||h>p||d<p}for(u=0;u<a&&(m()||(i.updateRangeFromParsed(c,t,g,l),!s));++u);if(s)for(u=a-1;u>=0;--u)if(!m()){i.updateRangeFromParsed(c,t,g,l);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n][t.axis],X(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this,i=e._cachedMeta;e.configure(),e._cachedDataOpts={},e.update(t||"default"),i._clip=function(t){let e,i,n,o;return U(t)?(e=t.top,i=t.right,n=t.bottom,o=t.left):e=i=n=o=t,{top:e,right:i,bottom:n,left:o}}(K(e.options.clip,function(t,e,i){if(!1===i)return!1;const n=vi(t,i),o=vi(e,i);return{top:o.end,right:n.end,bottom:o.start,left:n.start}}(i.xScale,i.yScale,e.getMaxOverflow())))}update(t){}draw(){const t=this,e=t._ctx,i=t.chart,n=t._cachedMeta,o=n.data||[],s=i.chartArea,a=[],r=t._drawStart||0,l=t._drawCount||o.length-r;let c;for(n.dataset&&n.dataset.draw(e,s,r,l),c=r;c<r+l;++c){const t=o[c];t.active?a.push(t):t.draw(e,s)}for(c=0;c<a.length;++c)a[c].draw(e,s)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this,o=n.getDataset();let s;if(t>=0&&t<n._cachedMeta.data.length){const e=n._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,i){return Object.assign(Object.create(t),{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(n.getContext(),t,e)),s.parsed=n.getParsed(t),s.raw=o.data[t]}else s=n.$context||(n.$context=function(t,e){return Object.assign(Object.create(t),{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(n.chart.getContext(),n.index)),s.dataset=o;return s.active=!!e,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n=this,o="active"===e,s=n._cachedDataOpts,a=t+"-"+e,r=s[a],l=n.enableOptionSharing&&ht(i);if(r)return Ai(r,l);const c=n.chart.config,h=c.datasetElementScopeKeys(n._type,t),d=o?[t+"Hover","hover",t,""]:[t,""],u=c.getOptionScopes(n.getDataset(),h),f=Object.keys(mt.elements[t]),g=c.resolveNamedOptions(u,f,(()=>n.getContext(i,o)),d);return g.$shared&&(g.$shared=l,s[a]=Object.freeze(Ai(g,l))),g}_resolveAnimations(t,e,i){const n=this,o=n.chart,s=n._cachedDataOpts,a="animation-"+e,r=s[a];if(r)return r;let l;if(!1!==o.options.animation){const o=n.chart.config,s=o.datasetAnimationScopeKeys(n._type,e),a=o.getOptionScopes(n.getDataset(),s);l=o.createResolver(a,n.getContext(t,i,e))}const c=new yi(o,l&&l.animations);return l&&l._cacheable&&(s[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Oi(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){Oi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Oi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this,i=e._cachedMeta.data.length,n=e._data.length;n>i?e._insertElements(i,n-i,t):n<i&&e._removeElements(n,i-n);const o=Math.min(n,i);o&&e.parse(0,o)}_insertElements(t,e,i=!0){const n=this,o=n._cachedMeta,s=o.data,a=t+e;let r;const l=t=>{for(t.length+=e,r=t.length-1;r>=a;r--)t[r]=t[r-e]};for(l(s),r=t;r<a;++r)s[r]=new n.dataElementType;n._parsing&&l(o._parsed),n.parse(t,e),i&&n.updateElements(s,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&Ci(i,n)}i.data.splice(t,e)}_onDataPush(){const t=arguments.length;this._insertElements(this.getDataset().data.length-t,t)}_onDataPop(){this._removeElements(this._cachedMeta.data.length-1,1)}_onDataShift(){this._removeElements(0,1)}_onDataSplice(t,e){this._removeElements(t,e),this._insertElements(t,arguments.length-2)}_onDataUnshift(){this._insertElements(0,arguments.length)}}Ti.defaults={},Ti.prototype.datasetElementType=null,Ti.prototype.dataElementType=null;class Ri{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Ot(this.x)&&Ot(this.y)}getProps(t,e){const i=this,n=this.$animations;if(!e||!n)return i;const o={};return t.forEach((t=>{o[t]=n[t]&&n[t].active()?n[t]._to:i[t]})),o}}Ri.defaults={},Ri.defaultRoutes=void 0;const Li=new Map;function Ei(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Li.get(i);return n||(n=new Intl.NumberFormat(t,e),Li.set(i,n)),n}(e,i).format(t)}const Ii={values:t=>Y(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let o,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(o="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=St(Math.abs(s)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:o,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Ei(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(St(t)));return 1===n||2===n||5===n?Ii.numeric.call(this,t,e,i):""}};var Fi={formatters:Ii};function zi(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),o=t._maxLength/i;return Math.floor(Math.min(n,o))}(t),o=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],s=o.length,a=o[0],r=o[s-1],l=[];if(s>n)return function(t,e,i,n){let o,s=0,a=i[0];for(n=Math.ceil(n),o=0;o<t.length;o++)o===a&&(e.push(t[o]),s++,a=i[s*n])}(e,l,o,s/n),l;const c=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),o=e.length/i;if(!n)return Math.max(o,1);const s=Ct(n);for(let t=0,e=s.length-1;t<e;t++){const e=s[t];if(e>o)return e}return Math.max(o,1)}(o,e,n);if(s>0){let t,i;const n=s>1?Math.round((r-a)/(s-1)):null;for(Vi(e,l,c,$(n)?0:a-n,a),t=0,i=s-1;t<i;t++)Vi(e,l,c,o[t],o[t+1]);return Vi(e,l,c,r,$(n)?e.length:r+n),l}return Vi(e,l,c),l}function Vi(t,e,i,n,o){const s=K(n,0),a=Math.min(K(o,t.length),t.length);let r,l,c,h=0;for(i=Math.ceil(i),o&&(r=o-n,i=r/Math.floor(r/i)),c=s;c<0;)h++,c=Math.round(s+h*i);for(l=Math.max(s,0);l<a;l++)l===c&&(e.push(t[l]),h++,c=Math.round(s+h*i))}mt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Fi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near"}}),mt.route("scale.ticks","color","","color"),mt.route("scale.grid","color","","borderColor"),mt.route("scale.grid","borderColor","","borderColor"),mt.route("scale.title","color","","color"),mt.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),mt.describe("scales",{_fallback:"scale"});const Bi=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Wi(t,e){const i=[],n=t.length/e,o=t.length;let s=0;for(;s<o;s+=n)i.push(t[Math.floor(s)]);return i}function Ni(t,e,i){const n=t.ticks.length,o=Math.min(e,n-1),s=t._startPixel,a=t._endPixel,r=1e-6;let l,c=t.getPixelForTick(o);if(!(i&&(l=1===n?Math.max(c-s,a-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(o-1))/2,c+=o<e?l:-l,c<s-r||c>a+r)))return c}function Hi(t){return t.drawTicks?t.tickLength:0}function ji(t,e){if(!t.display)return 0;const i=Fe(t.font,e),n=Ie(t.padding);return(Y(t.text)?t.text.length:1)*i.lineHeight+n.height}function $i(t,e,i){let o=n(t);return(i&&"right"!==e||!i&&"right"===e)&&(o=(t=>"left"===t?"right":"right"===t?"left":t)(o)),o}class Yi extends Ri{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){const e=this;e.options=t.setContext(e.getContext()),e.axis=t.axis,e._userMin=e.parse(t.min),e._userMax=e.parse(t.max),e._suggestedMin=e.parse(t.suggestedMin),e._suggestedMax=e.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=q(t,Number.POSITIVE_INFINITY),e=q(e,Number.NEGATIVE_INFINITY),i=q(i,Number.POSITIVE_INFINITY),n=q(n,Number.NEGATIVE_INFINITY),{min:q(t,i),max:q(e,n),minDefined:X(t),maxDefined:X(e)}}getMinMax(t){const e=this;let i,{min:n,max:o,minDefined:s,maxDefined:a}=e.getUserBounds();if(s&&a)return{min:n,max:o};const r=e.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)i=r[l].controller.getMinMax(e,t),s||(n=Math.min(n,i.min)),a||(o=Math.max(o,i.max));return{min:q(n,q(o,n)),max:q(o,q(n,o))}}getPadding(){const t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Q(this.options.beforeUpdate,[this])}update(t,e,i){const n=this,o=n.options.ticks,s=o.sampleSize;n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),n.ticks=null,n._labelSizes=null,n._gridLineItems=null,n._labelItems=null,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n._maxLength=n.isHorizontal()?n.width+i.left+i.right:n.height+i.top+i.bottom,n._dataLimitsCached||(n.beforeDataLimits(),n.determineDataLimits(),n.afterDataLimits(),n._dataLimitsCached=!0),n.beforeBuildTicks(),n.ticks=n.buildTicks()||[],n.afterBuildTicks();const a=s<n.ticks.length;n._convertTicksToLabels(a?Wi(n.ticks,s):n.ticks),n.configure(),n.beforeCalculateLabelRotation(),n.calculateLabelRotation(),n.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(n.ticks=zi(n,n.ticks),n._labelSizes=null),a&&n._convertTicksToLabels(n.ticks),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate()}configure(){const t=this;let e,i,n=t.options.reverse;t.isHorizontal()?(e=t.left,i=t.right):(e=t.top,i=t.bottom,n=!n),t._startPixel=e,t._endPixel=i,t._reversePixels=n,t._length=i-e,t._alignToPixels=t.options.alignToPixels}afterUpdate(){Q(this.options.afterUpdate,[this])}beforeSetDimensions(){Q(this.options.beforeSetDimensions,[this])}setDimensions(){const 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}afterSetDimensions(){Q(this.options.afterSetDimensions,[this])}_callHooks(t){const e=this;e.chart.notifyPlugins(t,e.getContext()),Q(e.options[t],[e])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Q(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this,i=e.options.ticks;let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n],s.label=Q(i.callback,[s.value,n,t],e)}afterTickToLabelConversion(){Q(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Q(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this,e=t.options,i=e.ticks,n=t.ticks.length,o=i.minRotation||0,s=i.maxRotation;let a,r,l,c=o;if(!t._isVisible()||!i.display||o>=s||n<=1||!t.isHorizontal())return void(t.labelRotation=o);const h=t._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Nt(t.chart.width-d,0,t.maxWidth);a=e.offset?t.maxWidth/n:f/(n-1),d+6>a&&(a=f/(n-(e.offset?.5:1)),r=t.maxHeight-Hi(e.grid)-i.padding-ji(e.title,t.chart.options.font),l=Math.sqrt(d*d+u*u),c=Et(Math.min(Math.asin(Math.min((h.highest.height+6)/a,1)),Math.asin(Math.min(r/l,1))-Math.asin(u/l))),c=Math.max(o,Math.min(s,c))),t.labelRotation=c}afterCalculateLabelRotation(){Q(this.options.afterCalculateLabelRotation,[this])}beforeFit(){Q(this.options.beforeFit,[this])}fit(){const t=this,e={width:0,height:0},{chart:i,options:{ticks:n,title:o,grid:s}}=t,a=t._isVisible(),r=t.isHorizontal();if(a){const a=ji(o,i.options.font);if(r?(e.width=t.maxWidth,e.height=Hi(s)+a):(e.height=t.maxHeight,e.width=Hi(s)+a),n.display&&t.ticks.length){const{first:i,last:o,widest:s,highest:a}=t._getLabelSizes(),l=2*n.padding,c=Lt(t.labelRotation),h=Math.cos(c),d=Math.sin(c);if(r){const i=n.mirror?0:d*s.width+h*a.height;e.height=Math.min(t.maxHeight,e.height+i+l)}else{const i=n.mirror?0:h*s.width+d*a.height;e.width=Math.min(t.maxWidth,e.width+i+l)}t._calculatePadding(i,o,d,h)}}t._handleMargins(),r?(t.width=t._length=i.width-t._margins.left-t._margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=i.height-t._margins.top-t._margins.bottom)}_calculatePadding(t,e,i,n){const o=this,{ticks:{align:s,padding:a},position:r}=o.options,l=0!==o.labelRotation,c="top"!==r&&"x"===o.axis;if(o.isHorizontal()){const r=o.getPixelForTick(0)-o.left,h=o.right-o.getPixelForTick(o.ticks.length-1);let d=0,u=0;l?c?(d=n*t.width,u=i*e.height):(d=i*t.height,u=n*e.width):"start"===s?u=e.width:"end"===s?d=t.width:(d=t.width/2,u=e.width/2),o.paddingLeft=Math.max((d-r+a)*o.width/(o.width-r),0),o.paddingRight=Math.max((u-h+a)*o.width/(o.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),o.paddingTop=i+a,o.paddingBottom=n+a}}_handleMargins(){const t=this;t._margins&&(t._margins.left=Math.max(t.paddingLeft,t._margins.left),t._margins.top=Math.max(t.paddingTop,t._margins.top),t._margins.right=Math.max(t.paddingRight,t._margins.right),t._margins.bottom=Math.max(t.paddingBottom,t._margins.bottom))}afterFit(){Q(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){const e=this;e.beforeTickToLabelConversion(),e.generateTickLabels(t),e.afterTickToLabelConversion()}_getLabelSizes(){const t=this;let e=t._labelSizes;if(!e){const i=t.options.ticks.sampleSize;let n=t.ticks;i<n.length&&(n=Wi(n,i)),t._labelSizes=e=t._computeLabelSizes(n,n.length)}return e}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:n}=this,o=[],s=[];let a,r,l,c,h,d,u,f,g,p,m,x=0,b=0;for(a=0;a<e;++a){if(c=t[a].label,h=this._resolveTickFontOptions(a),i.font=d=h.string,u=n[d]=n[d]||{data:{},gc:[]},f=h.lineHeight,g=p=0,$(c)||Y(c)){if(Y(c))for(r=0,l=c.length;r<l;++r)m=c[r],$(m)||Y(m)||(g=$t(i,u.data,u.gc,g,m),p+=f)}else g=$t(i,u.data,u.gc,g,c),p=f;o.push(g),s.push(p),x=Math.max(g,x),b=Math.max(p,b)}!function(t,e){J(t,(t=>{const i=t.gc,n=i.length/2;let o;if(n>e){for(o=0;o<n;++o)delete t.data[i[o]];i.splice(0,n)}}))}(n,e);const _=o.indexOf(x),y=s.indexOf(b),v=t=>({width:o[t]||0,height:s[t]||0});return{first:v(0),last:v(e-1),widest:v(_),highest:v(y)}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){const e=this;e._reversePixels&&(t=1-t);const i=e._startPixel+t*e._length;return Ht(e._alignToPixels?Ut(e.chart,i,0):i)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this,i=e.ticks||[];if(t>=0&&t<i.length){const n=i[t];return n.$context||(n.$context=function(t,e,i){return Object.assign(Object.create(t),{tick:i,index:e,type:"tick"})}(e.getContext(),t,n))}return e.$context||(e.$context=(n=e.chart.getContext(),o=e,Object.assign(Object.create(n),{scale:o,type:"scale"})));var n,o}_tickSize(){const t=this,e=t.options.ticks,i=Lt(t.labelRotation),n=Math.abs(Math.cos(i)),o=Math.abs(Math.sin(i)),s=t._getLabelSizes(),a=e.autoSkipPadding||0,r=s?s.widest.width+a:0,l=s?s.highest.height+a:0;return t.isHorizontal()?l*n>r*o?r/n:l/o:l*o<r*n?l/n:r/o}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this,i=e.axis,n=e.chart,o=e.options,{grid:s,position:a}=o,r=s.offset,l=e.isHorizontal(),c=e.ticks.length+(r?1:0),h=Hi(s),d=[],u=s.setContext(e.getContext(0)),f=u.drawBorder?u.borderWidth:0,g=f/2,p=function(t){return Ut(n,t,f)};let m,x,b,_,y,v,w,M,k,S,P,D;if("top"===a)m=p(e.bottom),v=e.bottom-h,M=m-g,S=p(t.top)+g,D=t.bottom;else if("bottom"===a)m=p(e.top),S=t.top,D=p(t.bottom)-g,v=m+g,M=e.top+h;else if("left"===a)m=p(e.right),y=e.right-h,w=m-g,k=p(t.left)+g,P=t.right;else if("right"===a)m=p(e.left),k=t.left,P=p(t.right)-g,y=m+g,w=e.left+h;else if("x"===i){if("center"===a)m=p((t.top+t.bottom)/2+.5);else if(U(a)){const t=Object.keys(a)[0],i=a[t];m=p(e.chart.scales[t].getPixelForValue(i))}S=t.top,D=t.bottom,v=m+g,M=v+h}else if("y"===i){if("center"===a)m=p((t.left+t.right)/2);else if(U(a)){const t=Object.keys(a)[0],i=a[t];m=p(e.chart.scales[t].getPixelForValue(i))}y=m-g,w=y-h,k=t.left,P=t.right}for(x=0;x<c;++x){const t=s.setContext(e.getContext(x)),i=t.lineWidth,o=t.color,a=s.borderDash||[],c=t.borderDashOffset,h=t.tickWidth,u=t.tickColor,f=t.tickBorderDash||[],g=t.tickBorderDashOffset;b=Ni(e,x,r),void 0!==b&&(_=Ut(n,b,i),l?y=w=k=P=_:v=M=S=D=_,d.push({tx1:y,ty1:v,tx2:w,ty2:M,x1:k,y1:S,x2:P,y2:D,width:i,color:o,borderDash:a,borderDashOffset:c,tickWidth:h,tickColor:u,tickBorderDash:f,tickBorderDashOffset:g}))}return e._ticksLength=c,e._borderValue=m,d}_computeLabelItems(t){const e=this,i=e.axis,n=e.options,{position:o,ticks:s}=n,a=e.isHorizontal(),r=e.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=s,u=Hi(n.grid),f=u+h,g=d?-h:f,p=-Lt(e.labelRotation),m=[];let x,b,_,y,v,w,M,k,S,P,D,C,O="middle";if("top"===o)w=e.bottom-g,M=e._getXAxisLabelAlignment();else if("bottom"===o)w=e.top+g,M=e._getXAxisLabelAlignment();else if("left"===o){const t=e._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("right"===o){const t=e._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("x"===i){if("center"===o)w=(t.top+t.bottom)/2+f;else if(U(o)){const t=Object.keys(o)[0],i=o[t];w=e.chart.scales[t].getPixelForValue(i)+f}M=e._getXAxisLabelAlignment()}else if("y"===i){if("center"===o)v=(t.left+t.right)/2-f;else if(U(o)){const t=Object.keys(o)[0],i=o[t];v=e.chart.scales[t].getPixelForValue(i)}M=e._getYAxisLabelAlignment(u).textAlign}"y"===i&&("start"===l?O="top":"end"===l&&(O="bottom"));const A=e._getLabelSizes();for(x=0,b=r.length;x<b;++x){_=r[x],y=_.label;const t=s.setContext(e.getContext(x));k=e.getPixelForTick(x)+s.labelOffset,S=e._resolveTickFontOptions(x),P=S.lineHeight,D=Y(y)?y.length:1;const i=D/2,n=t.color,l=t.textStrokeColor,h=t.textStrokeWidth;a?(v=k,C="top"===o?"near"===c||0!==p?-D*P+P/2:"center"===c?-A.highest.height/2-i*P+P:-A.highest.height+P/2:"near"===c||0!==p?P/2:"center"===c?A.highest.height/2-i*P:A.highest.height-D*P,d&&(C*=-1)):(w=k,C=(1-D)*P/2),m.push({rotation:p,label:y,font:S,color:n,strokeColor:l,strokeWidth:h,textOffset:C,textAlign:M,textBaseline:O,translation:[v,w]})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Lt(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align&&(i="right"),i}_getYAxisLabelAlignment(t){const e=this,{position:i,ticks:{crossAlign:n,mirror:o,padding:s}}=e.options,a=t+s,r=e._getLabelSizes().widest.width;let l,c;return"left"===i?o?(l="left",c=e.right+s):(c=e.right-a,"near"===n?l="right":"center"===n?(l="center",c-=r/2):(l="left",c=e.left)):"right"===i?o?(l="right",c=e.left+s):(c=e.left+a,"near"===n?l="left":"center"===n?(l="center",c+=r/2):(l="right",c=e.right)):l="right",{textAlign:l,x:c}}_computeLabelArea(){const t=this;if(t.options.ticks.mirror)return;const e=t.chart,i=t.options.position;return"left"===i||"right"===i?{top:0,left:t.left,bottom:e.height,right:t.right}:"top"===i||"bottom"===i?{top:t.top,left:0,bottom:t.bottom,right:e.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:o,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,o,s),t.restore())}getLineWidthForValue(t){const e=this,i=e.options.grid;if(!e._isVisible()||!i.display)return 0;const n=e.ticks.findIndex((e=>e.value===t));if(n>=0){return i.setContext(e.getContext(n)).lineWidth}return 0}drawGrid(t){const e=this,i=e.options.grid,n=e.ctx,o=e.chart,s=i.setContext(e.getContext()),a=i.drawBorder?s.borderWidth:0,r=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));let l,c;const h=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(i.display)for(l=0,c=r.length;l<c;++l){const t=r[l];i.drawOnChartArea&&h({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),i.drawTicks&&h({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}if(a){const t=s.lineWidth,i=e._borderValue;let n,r,l,c;e.isHorizontal()?(n=Ut(o,e.left,a)-a/2,r=Ut(o,e.right,t)+t/2,l=c=i):(l=Ut(o,e.top,a)-a/2,c=Ut(o,e.bottom,t)+t/2,n=r=i),h({x:n,y:l},{x:r,y:c},{width:a,color:s.borderColor})}}drawLabels(t){const e=this;if(!e.options.ticks.display)return;const i=e.ctx,n=e._computeLabelArea();n&&Gt(i,n);const o=e._labelItems||(e._labelItems=e._computeLabelItems(t));let s,a;for(s=0,a=o.length;s<a;++s){const t=o[s],e=t.font;te(i,t.label,0,t.textOffset,e,t)}n&&Zt(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const s=Fe(i.font),a=Ie(i.padding),r=i.align;let l=s.lineHeight/2;"bottom"===e?(l+=a.bottom,Y(i.text)&&(l+=s.lineHeight*(i.text.length-1))):l+=a.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=function(t,e,i,n){const{top:s,left:a,bottom:r,right:l}=t;let c,h,d,u=0;return t.isHorizontal()?(h=o(n,a,l),d=Bi(t,i,e),c=l-a):(h=Bi(t,i,e),d=o(n,r,s),u="left"===i?-wt:wt),{titleX:h,titleY:d,maxWidth:c,rotation:u}}(this,l,e,r);te(t,i.text,0,0,s,{color:i.color,maxWidth:d,rotation:u,textAlign:$i(r,e,n),textBaseline:"middle",translation:[c,h]})}draw(t){const e=this;e._isVisible()&&(e.drawBackground(),e.drawGrid(t),e.drawTitle(),e.drawLabels(t))}_layers(){const t=this,e=t.options,i=e.ticks&&e.ticks.z||0,n=e.grid&&e.grid.z||0;return t._isVisible()&&i!==n&&t.draw===Yi.prototype.draw?[{z:n,draw(e){t.drawBackground(),t.drawGrid(e),t.drawTitle()}},{z:i,draw(e){t.drawLabels(e)}}]:[{z:i,draw(e){t.draw(e)}}]}getMatchingVisibleMetas(t){const e=this,i=e.chart.getSortedVisibleDatasetMetas(),n=e.axis+"AxisID",o=[];let s,a;for(s=0,a=i.length;s<a;++s){const a=i[s];a[n]!==e.id||t&&a.type!==t||o.push(a)}return o}_resolveTickFontOptions(t){return Fe(this.options.ticks.setContext(this.getContext(t)).font)}}function Ui(t,e=[""],i=t,n,o=(()=>t[0])){ht(n)||(n=on("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:o,override:o=>Ui([o,...t],e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Zi(i,n,(()=>function(t,e,i,n){let o;for(const s of e)if(o=on(Ki(s,t),i),ht(o))return Gi(t,o)?en(i,n,t,o):o}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>sn(t).includes(e),ownKeys:t=>sn(t),set:(t,e,i)=>((t._storage||(t._storage=o()))[e]=i,delete t[e],delete t._keys,!0)})}function Xi(t,e,i,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:qi(t,n),setContext:e=>Xi(t,e,i,n),override:o=>Xi(t.override(o),e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Zi(t,e,(()=>function(t,e,i){const{_proxy:n,_context:o,_subProxy:s,_descriptors:a}=t;let r=n[e];dt(r)&&a.isScriptable(e)&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+[...r].join("->")+"->"+t);r.add(t),e=e(s,a||n),r.delete(t),U(e)&&(e=en(o._scopes,o,t,e));return e}(e,r,t,i));Y(r)&&r.length&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_descriptors:r}=i;if(ht(s.index)&&n(t))e=e[s.index%e.length];else if(U(e[0])){const i=e,n=o._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=en(n,o,t,l);e.push(Xi(i,s,a&&a[t],r))}}return e}(e,r,t,a.isIndexable));Gi(e,r)&&(r=Xi(r,o,s&&s[e],a));return r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function qi(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:i,indexable:n,isScriptable:dt(i)?i:()=>i,isIndexable:dt(n)?n:()=>n}}const Ki=(t,e)=>t?t+ct(e):e,Gi=(t,e)=>U(e)&&"adapters"!==t;function Zi(t,e,i){let n=t[e];return ht(n)||(n=i(),ht(n)&&(t[e]=n)),n}function Qi(t,e,i){return dt(t)?t(e,i):t}const Ji=(t,e)=>!0===t?e:"string"==typeof t?lt(e,t):void 0;function tn(t,e,i,n){for(const o of e){const e=Ji(i,o);if(e){t.add(e);const o=Qi(e._fallback,i,e);if(ht(o)&&o!==i&&o!==n)return o}else if(!1===e&&ht(n)&&i!==n)return null}return!1}function en(t,e,i,n){const o=e._rootScopes,s=Qi(e._fallback,i,n),a=[...t,...o],r=new Set;r.add(n);let l=nn(r,a,i,s||i);return null!==l&&((!ht(s)||s===i||(l=nn(r,a,s,l),null!==l))&&Ui([...r],[""],o,s,(()=>{const t=e._getTarget();return i in t||(t[i]={}),t[i]})))}function nn(t,e,i,n){for(;i;)i=tn(t,e,i,n);return i}function on(t,e){for(const i of e){if(!i)continue;const e=i[t];if(ht(e))return e}}function sn(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return[...e]}(t._scopes)),e}const an=Number.EPSILON||1e-14,rn=(t,e)=>e<t.length&&!t[e].skip&&t[e];function ln(t,e,i,n){const o=t.skip?e:t,s=e,a=i.skip?e:i,r=zt(s,o),l=zt(a,s);let c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:s.x-d*(a.x-o.x),y:s.y-d*(a.y-o.y)},next:{x:s.x+u*(a.x-o.x),y:s.y+u*(a.y-o.y)}}}function cn(t){const e=t.length,i=Array(e).fill(0),n=Array(e);let o,s,a,r=rn(t,0);for(o=0;o<e;++o)if(s=a,a=r,r=rn(t,o+1),a){if(r){const t=r.x-a.x;i[o]=0!==t?(r.y-a.y)/t:0}n[o]=s?r?Pt(i[o-1])!==Pt(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}!function(t,e,i){const n=t.length;let o,s,a,r,l,c=rn(t,0);for(let h=0;h<n-1;++h)l=c,c=rn(t,h+1),l&&c&&(At(e[h],0,an)?i[h]=i[h+1]=0:(o=i[h]/e[h],s=i[h+1]/e[h],r=Math.pow(o,2)+Math.pow(s,2),r<=9||(a=3/Math.sqrt(r),i[h]=o*a*e[h],i[h+1]=s*a*e[h])))}(t,i,n),function(t,e){const i=t.length;let n,o,s,a=rn(t,0);for(let r=0;r<i;++r){if(o=s,s=a,a=rn(t,r+1),!s)continue;const{x:i,y:l}=s;o&&(n=(i-o.x)/3,s.cp1x=i-n,s.cp1y=l-n*e[r]),a&&(n=(a.x-i)/3,s.cp2x=i+n,s.cp2y=l+n*e[r])}}(t,n)}function hn(t,e,i){return Math.max(Math.min(t,i),e)}function dn(t,e,i,n){let o,s,a,r;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)cn(t);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;o<s;++o)a=t[o],r=ln(i,a,t[Math.min(o+1,s-(n?0:1))%s],e.tension),a.cp1x=r.previous.x,a.cp1y=r.previous.y,a.cp2x=r.next.x,a.cp2y=r.next.y,i=a}e.capBezierPoints&&function(t,e){let i,n,o,s,a,r=Kt(t[0],e);for(i=0,n=t.length;i<n;++i)a=s,s=r,r=i<n-1&&Kt(t[i+1],e),s&&(o=t[i],a&&(o.cp1x=hn(o.cp1x,e.left,e.right),o.cp1y=hn(o.cp1y,e.top,e.bottom)),r&&(o.cp2x=hn(o.cp2x,e.left,e.right),o.cp2y=hn(o.cp2y,e.top,e.bottom)))}(t,i)}function un(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function fn(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function gn(t,e,i,n){const o={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=un(t,o,i),r=un(o,s,i),l=un(s,e,i),c=un(a,r,i),h=un(r,l,i);return un(c,h,i)}function pn(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function mn(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function xn(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function bn(t){return"angle"===t?{between:Wt,compare:Vt,normalize:Bt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function _n({start:t,end:e,count:i,loop:n,style:o}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:o}}function yn(t,e,i){if(!i)return[t];const{property:n,start:o,end:s}=i,a=e.length,{compare:r,between:l,normalize:c}=bn(n),{start:h,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:o,end:s}=i,{between:a,normalize:r}=bn(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;c<h&&a(r(e[d%l][n]),o,s);++c)d--,u--;d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:f,style:t.style}}(t,e,i),g=[];let p,m,x,b=!1,_=null;const y=()=>b||l(o,x,p)&&0!==r(o,x),v=()=>!b||0===r(s,p)||l(s,x,p);for(let t=h,i=h;t<=d;++t)m=e[t%a],m.skip||(p=c(m[n]),b=l(p,o,s),null===_&&y()&&(_=0===r(p,o)?t:i),null!==_&&v()&&(g.push(_n({start:_,end:t,loop:u,count:a,style:f})),_=null),i=t,x=p);return null!==_&&g.push(_n({start:_,end:d,loop:u,count:a,style:f})),g}function vn(t,e){const i=[],n=t.segments;for(let o=0;o<n.length;o++){const s=yn(n[o],t.points,e);s.length&&i.push(...s)}return i}function wn(t,e){const i=t.points,n=t.options.spanGaps,o=i.length;if(!o)return[];const s=!!t._loop,{start:a,end:r}=function(t,e,i,n){let o=0,s=e-1;if(i&&!n)for(;o<e&&!t[o].skip;)o++;for(;o<e&&t[o].skip;)o++;for(o%=e,i&&(s+=o);s>o&&t[s%e].skip;)s--;return s%=e,{start:o,end:s}}(i,o,s,n);if(!0===n)return Mn([{start:a,end:r,loop:s}],i,e);return Mn(function(t,e,i,n){const o=t.length,s=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%o];i.skip||i.stop?l.skip||(n=!1,s.push({start:e%o,end:(a-1)%o,loop:n}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&s.push({start:e%o,end:r%o,loop:n}),s}(i,a,r<a?r+o:r,!!t._fullLoop&&0===a&&r===o-1),i,e)}function Mn(t,e,i){return i&&i.setContext&&e?function(t,e,i){const n=e.length,o=[];let s=t[0].start,a=s;for(const r of t){let t,l,c=e[s%n];for(a=s+1;a<=r.end;a++){const h=e[a%n];l=kn(i.setContext({type:"segment",p0:c,p1:h})),Sn(l,t)&&(o.push({start:s,end:a-1,loop:r.loop,style:t}),t=l,s=a-1),c=h,t=l}s<a-1&&(o.push({start:s,end:a-1,loop:r.loop,style:l}),s=a-1)}return o}(t,e,i):t}function kn(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Sn(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var Pn=Object.freeze({__proto__:null,easingEffects:pi,color:W,getHoverColor:N,noop:H,uid:j,isNullOrUndef:$,isArray:Y,isObject:U,isFinite:X,finiteOrDefault:q,valueOrDefault:K,toPercentage:G,toDimension:Z,callback:Q,each:J,_elementsEqual:tt,clone:et,_merger:nt,merge:ot,mergeIf:st,_mergerIf:at,_deprecated:function(t,e,i,n){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+n+'" instead')},resolveObjectKey:lt,_capitalize:ct,defined:ht,isFunction:dt,toFontString:jt,_measureText:$t,_longestText:Yt,_alignPixel:Ut,clearCanvas:Xt,drawPoint:qt,_isPointInArea:Kt,clipArea:Gt,unclipArea:Zt,_steppedLineTo:Qt,_bezierCurveTo:Jt,renderText:te,addRoundedRectPath:ee,_lookup:ie,_lookupByKey:ne,_rlookupByKey:oe,_filterBetween:se,listenArrayEvents:re,unlistenArrayEvents:le,_arrayUnique:ce,_createResolver:Ui,_attachContext:Xi,_descriptors:qi,splineCurve:ln,splineCurveMonotone:cn,_updateBezierControlPoints:dn,_getParentNode:he,getStyle:fe,getRelativePosition:me,getMaximumSize:be,retinaScale:_e,supportsEventListenerOptions:ye,readUsedSize:ve,fontString:function(t,e,i){return e+" "+t+"px "+i},requestAnimFrame:t,throttled:e,debounce:i,_toLeftRightCenter:n,_alignStartEnd:o,_textX:s,_pointInLine:un,_steppedInterpolation:fn,_bezierInterpolation:gn,formatNumber:Ei,toLineHeight:Te,_readValueToProps:Re,toTRBL:Le,toTRBLCorners:Ee,toPadding:Ie,toFont:Fe,resolve:ze,_addGrace:Ve,PI:xt,TAU:bt,PITAU:_t,INFINITY:yt,RAD_PER_DEG:vt,HALF_PI:wt,QUARTER_PI:Mt,TWO_THIRDS_PI:kt,log10:St,sign:Pt,niceNum:Dt,_factorize:Ct,isNumber:Ot,almostEquals:At,almostWhole:Tt,_setMinAndMaxByKey:Rt,toRadians:Lt,toDegrees:Et,_decimalPlaces:It,getAngleFromPoint:Ft,distanceBetweenPoints:zt,_angleDiff:Vt,_normalizeAngle:Bt,_angleBetween:Wt,_limitValue:Nt,_int16Range:Ht,getRtlAdapter:pn,overrideTextDirection:mn,restoreTextDirection:xn,_boundSegment:yn,_boundSegments:vn,_computeSegments:wn});class Dn{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=this,i=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(i)&&(n=e.register(i));const o=e.items,s=t.id,a=e.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in o||(o[s]=t,function(t,e,i){const n=ot(Object.create(null),[i?mt.get(i):{},mt.get(e),t.defaults]);mt.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const n=i.split("."),o=n.pop(),s=[t].concat(n).join("."),a=e[i].split("."),r=a.pop(),l=a.join(".");mt.route(s,o,l,r)}))}(e,t.defaultRoutes);t.descriptors&&mt.describe(e,t.descriptors)}(t,a,n),e.override&&mt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in mt[n]&&(delete mt[n][i],this.override&&delete ut[i])}}var Cn=new class{constructor(){this.controllers=new Dn(Ti,"datasets",!0),this.elements=new Dn(Ri,"elements"),this.plugins=new Dn(Object,"plugins"),this.scales=new Dn(Yi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){const n=this;[...e].forEach((e=>{const o=i||n._getRegistryForType(e);i||o.isForType(e)||o===n.plugins&&e.id?n._exec(t,o,e):J(e,(e=>{const o=i||n._getRegistryForType(e);n._exec(t,o,e)}))}))}_exec(t,e,i){const n=ct(t);Q(i["before"+n],[],i),e[t](i),Q(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}};class On{constructor(){this._init=[]}notify(t,e,i,n){const o=this;"beforeInit"===e&&(o._init=o._createDescriptors(t,!0),o._notify(o._init,t,"install"));const s=n?o._descriptors(t).filter(n):o._descriptors(t),a=o._notify(s,t,e,i);return"destroy"===e&&(o._notify(s,t,"stop"),o._notify(o._init,t,"uninstall")),a}_notify(t,e,i,n){n=n||{};for(const o of t){const t=o.plugin;if(!1===Q(t[i],[e,n,o.options],t)&&n.cancelable)return!1}return!0}invalidate(){$(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=K(i.options&&i.options.plugins,{}),o=function(t){const e=[],i=Object.keys(Cn.plugins.items);for(let t=0;t<i.length;t++)e.push(Cn.getPlugin(i[t]));const n=t.plugins||[];for(let t=0;t<n.length;t++){const i=n[t];-1===e.indexOf(i)&&e.push(i)}return e}(i);return!1!==n||e?function(t,e,i,n){const o=[],s=t.getContext();for(let a=0;a<e.length;a++){const r=e[a],l=An(i[r.id],n);null!==l&&o.push({plugin:r,options:Tn(t.config,r,l,s)})}return o}(t,o,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function An(t,e){return e||!1!==t?!0===t?{}:t:null}function Tn(t,e,i,n){const o=t.pluginScopeKeys(e),s=t.getOptionScopes(i,o);return t.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Rn(t,e){const i=mt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Ln(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function En(t){const e=t.options||(t.options={});e.plugins=K(e.plugins,{}),e.scales=function(t,e){const i=ut[t.type]||{scales:{}},n=e.scales||{},o=Rn(t.type,e),s=Object.create(null),a=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t],r=Ln(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(r,o),c=i.scales||{};s[r]=s[r]||t,a[t]=st(Object.create(null),[{axis:r},e,c[r],c[l]])})),t.data.datasets.forEach((i=>{const o=i.type||t.type,r=i.indexAxis||Rn(o,e),l=(ut[o]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),o=i[e+"AxisID"]||s[e]||e;a[o]=a[o]||Object.create(null),st(a[o],[{axis:e},n[o],l[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];st(e,[mt.scales[e.type],mt.scale])})),a}(t,e)}const In=new Map,Fn=new Set;function zn(t,e){let i=In.get(t);return i||(i=e(),In.set(t,i),Fn.add(i)),i}const Vn=(t,e,i)=>{const n=lt(e,i);void 0!==n&&t.add(n)};class Bn{constructor(t){this._config=function(t){const e=(t=t||{}).data=t.data||{datasets:[],labels:[]};return e.datasets=e.datasets||[],e.labels=e.labels||[],En(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=t}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),En(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return zn(t,(()=>[["datasets."+t,""]]))}datasetAnimationScopeKeys(t,e){return zn(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,"transitions."+e],["datasets."+t,""]]))}datasetElementScopeKeys(t,e){return zn(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,"datasets."+t,"elements."+e,""]]))}pluginScopeKeys(t){const e=t.id;return zn(`${this.type}-plugin-${e}`,(()=>[["plugins."+e,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:o}=this,s=this._cachedScopes(t,i),a=s.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>Vn(r,t,e)))),e.forEach((t=>Vn(r,n,t))),e.forEach((t=>Vn(r,ut[o]||{},t))),e.forEach((t=>Vn(r,mt,t))),e.forEach((t=>Vn(r,ft,t)))}));const l=[...r];return Fn.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,ut[e]||{},mt.datasets[e]||{},{type:e},mt,ft]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=Wn(this._resolverCache,t,n);let r=s;if(function(t,e){const{isScriptable:i,isIndexable:n}=qi(t);for(const o of e)if(i(o)&&dt(t[o])||n(o)&&Y(t[o]))return!0;return!1}(s,e)){o.$shared=!1;r=Xi(s,i=dt(i)?i():i,this.createResolver(t,i,a))}for(const t of e)o[t]=r[t];return o}createResolver(t,e,i=[""],n){const{resolver:o}=Wn(this._resolverCache,t,i);return U(e)?Xi(o,e,void 0,n):o}}function Wn(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const o=i.join();let s=n.get(o);if(!s){s={resolver:Ui(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(o,s)}return s}const Nn=["top","bottom","left","right","chartArea"];function Hn(t,e){return"top"===t||"bottom"===t||-1===Nn.indexOf(t)&&"x"===e}function jn(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function $n(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Q(i&&i.onComplete,[t],e)}function Yn(t){const e=t.chart,i=e.options.animation;Q(i&&i.onProgress,[t],e)}function Un(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Xn(t){return Un()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const qn={},Kn=t=>{const e=Xn(t);return Object.values(qn).filter((t=>t.canvas===e)).pop()};class Gn{constructor(t,e){const n=this;this.config=e=new Bn(e);const o=Xn(t),s=Kn(o);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas can be reused.");const r=e.createResolver(e.chartOptionScopes(),n.getContext());this.platform=n._initializePlatform(o,e);const l=n.platform.acquireContext(o,r.aspectRatio),c=l&&l.canvas,h=c&&c.height,d=c&&c.width;this.id=j(),this.ctx=l,this.canvas=c,this.width=d,this.height=h,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._sortedMetasets=[],this.scales={},this.scale=void 0,this._plugins=new On,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=i((()=>this.update("resize")),r.resizeDelay||0),qn[n.id]=n,l&&c?(a.listen(n,"complete",$n),a.listen(n,"progress",Yn),n._initialize(),n.attached&&n.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return $(t)?e&&o?o:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){const t=this;return t.notifyPlugins("beforeInit"),t.options.responsive?t.resize():_e(t,t.options.devicePixelRatio),t.bindEvents(),t.notifyPlugins("afterInit"),t}_initializePlatform(t,e){return e.platform?new e.platform:!Un()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?new Ze:new hi}clear(){return Xt(this.canvas,this.ctx),this}stop(){return a.stop(this),this}resize(t,e){a.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this,n=i.options,o=i.canvas,s=n.maintainAspectRatio&&i.aspectRatio,a=i.platform.getMaximumSize(o,t,e,s),r=i.currentDevicePixelRatio,l=n.devicePixelRatio||i.platform.getDevicePixelRatio();i.width===a.width&&i.height===a.height&&r===l||(i.width=a.width,i.height=a.height,i._aspectRatio=i.aspectRatio,_e(i,l,!0),i.notifyPlugins("resize",{size:a}),Q(n.onResize,[i,a],i),i.attached&&i._doResize()&&i.render())}ensureScalesHaveIDs(){J(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this,e=t.options,i=e.scales,n=t.scales,o=Object.keys(n).reduce(((t,e)=>(t[e]=!1,t)),{});let s=[];i&&(s=s.concat(Object.keys(i).map((t=>{const e=i[t],n=Ln(t,e),o="r"===n,s="x"===n;return{options:e,dposition:o?"chartArea":s?"bottom":"left",dtype:o?"radialLinear":s?"category":"linear"}})))),J(s,(i=>{const s=i.options,a=s.id,r=Ln(a,s),l=K(s.type,i.dtype);void 0!==s.position&&Hn(s.position,r)===Hn(i.dposition)||(s.position=i.dposition),o[a]=!0;let c=null;if(a in n&&n[a].type===l)c=n[a];else{c=new(Cn.getScale(l))({id:a,type:l,ctx:t.ctx,chart:t}),n[c.id]=c}c.init(s,e)})),J(o,((t,e)=>{t||delete n[e]})),J(n,(e=>{Ke.configure(t,e,e.options),Ke.addBox(t,e)}))}_updateMetasetIndex(t,e){const i=this._metasets,n=t.index;n!==e&&(i[n]=i[e],i[e]=t,t.index=e)}_updateMetasets(){const t=this,e=t._metasets,i=t.data.datasets.length,n=e.length;if(n>i){for(let e=i;e<n;++e)t._destroyDatasetMeta(e);e.splice(i,n-i)}t._sortedMetasets=e.slice(0).sort(jn("order","index"))}_removeUnreferencedMetasets(){const t=this,{_metasets:e,data:{datasets:i}}=t;e.length>i.length&&delete t._stacks,e.forEach(((e,n)=>{0===i.filter((t=>t===e._dataset)).length&&t._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const t=this,e=[],i=t.data.datasets;let n,o;for(t._removeUnreferencedMetasets(),n=0,o=i.length;n<o;n++){const o=i[n];let s=t.getDatasetMeta(n);const a=o.type||t.config.type;if(s.type&&s.type!==a&&(t._destroyDatasetMeta(n),s=t.getDatasetMeta(n)),s.type=a,s.indexAxis=o.indexAxis||Rn(a,t.options),s.order=o.order||0,t._updateMetasetIndex(s,n),s.label=""+o.label,s.visible=t.isDatasetVisible(n),s.controller)s.controller.updateIndex(n),s.controller.linkScales();else{const i=Cn.getController(a),{datasetElementType:o,dataElementType:r}=mt.datasets[a];Object.assign(i.prototype,{dataElementType:Cn.getElement(r),datasetElementType:o&&Cn.getElement(o)}),s.controller=new i(t,n),e.push(s.controller)}}return t._updateMetasets(),e}_resetElements(){const t=this;J(t.data.datasets,((e,i)=>{t.getDatasetMeta(i).controller.reset()}),t)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this,i=e.config;i.update(),e._options=i.createResolver(i.chartOptionScopes(),e.getContext()),J(e.scales,(t=>{Ke.removeBox(e,t)}));const n=e._animationsDisabled=!e.options.animation;if(e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e._plugins.invalidate(),!1===e.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=e.buildOrUpdateControllers();e.notifyPlugins("beforeElementsUpdate");let s=0;for(let t=0,i=e.data.datasets.length;t<i;t++){const{controller:i}=e.getDatasetMeta(t),a=!n&&-1===o.indexOf(i);i.buildOrUpdateElements(a),s=Math.max(+i.getMaxOverflow(),s)}e._minPadding=s,e._updateLayout(s),n||J(o,(t=>{t.reset()})),e._updateDatasets(t),e.notifyPlugins("afterUpdate",{mode:t}),e._layers.sort(jn("z","_idx")),e._lastEvent&&e._eventHandler(e._lastEvent,!0),e.render()}_updateLayout(t){const e=this;if(!1===e.notifyPlugins("beforeLayout",{cancelable:!0}))return;Ke.update(e,e.width,e.height,t);const i=e.chartArea,n=i.width<=0||i.height<=0;e._layers=[],J(e.boxes,(t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),e._layers.push(...t._layers()))}),e),e._layers.forEach(((t,e)=>{t._idx=e})),e.notifyPlugins("afterLayout")}_updateDatasets(t){const e=this,i="function"==typeof t;if(!1!==e.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let n=0,o=e.data.datasets.length;n<o;++n)e._updateDataset(n,i?t({datasetIndex:n}):t);e.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this,n=i.getDatasetMeta(t),o={meta:n,index:t,mode:e,cancelable:!0};!1!==i.notifyPlugins("beforeDatasetUpdate",o)&&(n.controller._update(e),o.cancelable=!1,i.notifyPlugins("afterDatasetUpdate",o))}render(){const t=this;!1!==t.notifyPlugins("beforeRender",{cancelable:!0})&&(a.has(t)?t.attached&&!a.running(t)&&a.start(t):(t.draw(),$n({chart:t})))}draw(){const t=this;let e;if(t._resizeBeforeDraw){const{width:e,height:i}=t._resizeBeforeDraw;t._resize(e,i),t._resizeBeforeDraw=null}if(t.clear(),t.width<=0||t.height<=0)return;if(!1===t.notifyPlugins("beforeDraw",{cancelable:!0}))return;const i=t._layers;for(e=0;e<i.length&&i[e].z<=0;++e)i[e].draw(t.chartArea);for(t._drawDatasets();e<i.length;++e)i[e].draw(t.chartArea);t.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];t&&!o.visible||i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){const t=this;if(!1===t.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=t.getSortedVisibleDatasetMetas();for(let i=e.length-1;i>=0;--i)t._drawDataset(e[i]);t.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this,i=e.ctx,n=t._clip,o=e.chartArea,s={meta:t,index:t.index,cancelable:!0};!1!==e.notifyPlugins("beforeDatasetDraw",s)&&(Gt(i,{left:!1===n.left?0:o.left-n.left,right:!1===n.right?e.width:o.right+n.right,top:!1===n.top?0:o.top-n.top,bottom:!1===n.bottom?e.height:o.bottom+n.bottom}),t.controller.draw(),Zt(i),s.cancelable=!1,e.notifyPlugins("afterDatasetDraw",s))}getElementsAtEventForMode(t,e,i,n){const o=Ce.modes[e];return"function"==typeof o?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n=i[t]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1}),n}getContext(){return this.$context||(this.$context={chart:this,type:"chart"})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateDatasetVisibility(t,e){const i=this,n=e?"show":"hide",o=i.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,n);i.setDatasetVisibility(t,e),s.update(o,{visible:e}),i.update((e=>e.datasetIndex===t?n:void 0))}hide(t){this._updateDatasetVisibility(t,!1)}show(t){this._updateDatasetVisibility(t,!0)}_destroyDatasetMeta(t){const e=this,i=e._metasets&&e._metasets[t];i&&i.controller&&(i.controller._destroy(),delete e._metasets[t])}destroy(){const t=this,{canvas:e,ctx:i}=t;let n,o;for(t.stop(),a.remove(t),n=0,o=t.data.datasets.length;n<o;++n)t._destroyDatasetMeta(n);t.config.clearCache(),e&&(t.unbindEvents(),Xt(e,i),t.platform.releaseContext(i),t.canvas=null,t.ctx=null),t.notifyPlugins("destroy"),delete qn[t.id]}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){const t=this,e=t._listeners,i=t.platform,n=(n,o)=>{i.addEventListener(t,n,o),e[n]=o},o=(n,o)=>{e[n]&&(i.removeEventListener(t,n,o),delete e[n])};let s=function(e,i,n){e.offsetX=i,e.offsetY=n,t._eventHandler(e)};if(J(t.options.events,(t=>n(t,s))),t.options.responsive){let e;s=(e,i)=>{t.canvas&&t.resize(e,i)};const a=()=>{o("attach",a),t.attached=!0,t.resize(),n("resize",s),n("detach",e)};e=()=>{t.attached=!1,o("resize",s),n("attach",a)},i.isAttached(t.canvas)?a():e()}else t.attached=!0}unbindEvents(){const t=this,e=t._listeners;e&&(delete t._listeners,J(e,((e,i)=>{t.platform.removeEventListener(t,i,e)})))}updateHoverStyle(t,e,i){const n=i?"set":"remove";let o,s,a,r;for("dataset"===e&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,r=t.length;a<r;++a){s=t[a];const e=s&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[n+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this,i=e._active||[],n=t.map((({datasetIndex:t,index:i})=>{const n=e.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[i],index:i}}));!tt(n,i)&&(e._active=n,e._updateHoverStyles(n,i))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this,o=n.options.hover,s=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),a=s(e,t),r=i?t:s(t,e);a.length&&n.updateHoverStyle(a,o.mode,!1),r.length&&o.mode&&n.updateHoverStyle(r,o.mode,!0)}_eventHandler(t,e){const i=this,n={event:t,replay:e,cancelable:!0},o=e=>(e.options.events||this.options.events).includes(t.type);if(!1===i.notifyPlugins("beforeEvent",n,o))return;const s=i._handleEvent(t,e);return n.cancelable=!1,i.notifyPlugins("afterEvent",n,o),(s||n.changed)&&i.render(),i}_handleEvent(t,e){const i=this,{_active:n=[],options:o}=i,s=o.hover,a=e;let r=[],l=!1,c=null;return"mouseout"!==t.type&&(r=i.getElementsAtEventForMode(t,s.mode,s,a),c="click"===t.type?i._lastEvent:t),i._lastEvent=null,Kt(t,i.chartArea,i._minPadding)&&(Q(o.onHover,[t,r,i],i),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||Q(o.onClick,[t,r,i],i)),l=!tt(r,n),(l||e)&&(i._active=r,i._updateHoverStyles(r,n,e)),i._lastEvent=c,l}}const Zn=()=>J(Gn.instances,(t=>t._plugins.invalidate())),Qn=!0;function Jn(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}Object.defineProperties(Gn,{defaults:{enumerable:Qn,value:mt},instances:{enumerable:Qn,value:qn},overrides:{enumerable:Qn,value:ut},registry:{enumerable:Qn,value:Cn},version:{enumerable:Qn,value:"3.1.0"},getChart:{enumerable:Qn,value:Kn},register:{enumerable:Qn,value:(...t)=>{Cn.add(...t),Zn()}},unregister:{enumerable:Qn,value:(...t)=>{Cn.remove(...t),Zn()}}});class to{constructor(t){this.options=t||{}}formats(){return Jn()}parse(t,e){return Jn()}format(t,e){return Jn()}add(t,e,i){return Jn()}diff(t,e,i){return Jn()}startOf(t,e,i){return Jn()}endOf(t,e){return Jn()}}to.override=function(t){Object.assign(to.prototype,t)};var eo={_date:to};function io(t){const e=function(t){if(!t._cache.$bar){const e=t.getMatchingVisibleMetas("bar");let i=[];for(let n=0,o=e.length;n<o;n++)i=i.concat(e[n].controller.getAllParsedValues(t));t._cache.$bar=ce(i.sort(((t,e)=>t-e)))}return t._cache.$bar}(t);let i,n,o,s,a=t._length;const r=()=>{a=Math.min(a,i&&Math.abs(o-s)||a),s=o};for(i=0,n=e.length;i<n;++i)o=t.getPixelForValue(e[i]),r();for(i=0,n=t.ticks.length;i<n;++i)o=t.getPixelForTick(i),r();return a}function no(t,e,i,n){return Y(t)?function(t,e,i,n){const o=i.parse(t[0],n),s=i.parse(t[1],n),a=Math.min(o,s),r=Math.max(o,s);let l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:o,end:s,min:a,max:r}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function oo(t,e,i,n){const o=t.iScale,s=t.vScale,a=o.getLabels(),r=o===s,l=[];let c,h,d,u;for(c=i,h=i+n;c<h;++c)u=e[c],d={},d[o.axis]=r||o.parse(a[c],c),l.push(no(u,d,s,c));return l}function so(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}class ao extends Ti{parsePrimitiveData(t,e,i,n){return oo(t,e,i,n)}parseArrayData(t,e,i,n){return oo(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l="x"===o.axis?a:r,c="x"===s.axis?a:r,h=[];let d,u,f,g;for(d=i,u=i+n;d<u;++d)g=e[d],f={},f[o.axis]=o.parse(lt(g,l),d),h.push(no(lt(g,c),f,s,d));return h}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,o=this.getParsed(t),s=o._custom,a=so(s)?"["+s.start+", "+s.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:a}}initialize(){const t=this;t.enableOptionSharing=!0,super.initialize();t._cachedMeta.stack=t.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o._cachedMeta.vScale,r=a.getBasePixel(),l=a.isHorizontal(),c=o._getRuler(),h=o.resolveDataElementOptions(e,n),d=o.getSharedOptions(h),u=o.includeOptions(n,d);o.updateSharedOptions(d,n,h);for(let h=e;h<e+i;h++){const e=o.getParsed(h),i=s||$(e[a.axis])?{base:r,head:r}:o._calculateBarValuePixels(h),f=o._calculateBarIndexPixels(h,c),g={horizontal:l,base:i.base,x:l?i.head:f.center,y:l?f.center:i.head,height:l?f.size:void 0,width:l?void 0:f.size};u&&(g.options=d||o.resolveDataElementOptions(h,n)),o.updateElement(t[h],h,g,n)}}_getStacks(t,e){const i=this._cachedMeta.iScale,n=i.getMatchingVisibleMetas(this._type),o=i.options.stacked,s=n.length,a=[];let r,l;for(r=0;r<s;++r){if(l=n[r],void 0!==e){const t=l.controller.getParsed(e)[l.controller._cachedMeta.vScale.axis];if($(t)||isNaN(t))continue}if((!1===o||-1===a.indexOf(l.stack)||void 0===o&&void 0===l.stack)&&a.push(l.stack),l.index===t)break}return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e){const i=this._getStacks(t),n=void 0!==e?i.indexOf(e):-1;return-1===n?i.length-1:n}_getRuler(){const t=this,e=t.options,i=t._cachedMeta,n=i.iScale,o=[];let s,a;for(s=0,a=i.data.length;s<a;++s)o.push(n.getPixelForValue(t.getParsed(s)[n.axis],s));const r=e.barThickness;return{min:r||io(n),pixels:o,start:n._startPixel,end:n._endPixel,stackCount:t._getStackCount(),scale:n,grouped:e.grouped,ratio:r?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(t){const e=this,{vScale:i,_stacked:n}=e._cachedMeta,{base:o,minBarLength:s}=e.options,a=e.getParsed(t),r=a._custom,l=so(r);let c,h,d=a[i.axis],u=0,f=n?e.applyStack(i,a,n):d;f!==d&&(u=f-d,f=d),l&&(d=r.barStart,f=r.barEnd-r.barStart,0!==d&&Pt(d)!==Pt(r.barEnd)&&(u=0),u+=d);const g=$(o)||l?u:o;let p=i.getPixelForValue(g);c=this.chart.getDataVisibility(t)?i.getPixelForValue(u+f):p,h=c-p,void 0!==s&&Math.abs(h)<s&&(h=h<0?-s:s,0===d&&(p-=h/2),c=p+h);const m=o||0;if(p===i.getPixelForValue(m)){const t=i.getLineWidthForValue(m)/2;h>0?(p+=t,h-=t):h<0&&(p-=t,h+=t)}return{size:h,base:p,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=this,n=e.scale,o=i.options,s=K(o.maxBarThickness,1/0);let a,r;if(e.grouped){const n=o.skipNull?i._getStackCount(t):e.stackCount,l="flex"===o.barThickness?function(t,e,i,n){const o=e.pixels,s=o[t];let a=t>0?o[t-1]:null,r=t<o.length-1?o[t+1]:null;const l=i.categoryPercentage;null===a&&(a=s-(null===r?e.end-e.start:r-s)),null===r&&(r=s+s-a);const c=s-(s-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/n,ratio:i.barPercentage,start:c}}(t,e,o,n):function(t,e,i,n){const o=i.barThickness;let s,a;return $(o)?(s=e.min*i.categoryPercentage,a=i.barPercentage):(s=o*n,a=1),{chunk:s/n,ratio:a,start:e.pixels[t]-s/2}}(t,e,o,n),c=i._getStackIndex(i.index,i._cachedMeta.stack);a=l.start+l.chunk*c+l.chunk/2,r=Math.min(s,l.chunk*l.ratio)}else a=n.getPixelForValue(i.getParsed(t)[n.axis],t),r=Math.min(s,e.min*e.ratio);return{base:a-r/2,head:a+r/2,center:a,size:r}}draw(){const t=this,e=t.chart,i=t._cachedMeta,n=i.vScale,o=i.data,s=o.length;let a=0;for(Gt(e.ctx,e.chartArea);a<s;++a)null!==t.getParsed(a)[n.axis]&&o[a].draw(t._ctx);Zt(e.ctx)}}ao.id="bar",ao.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},ao.overrides={interaction:{mode:"index"},scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class ro extends Ti{initialize(){this.enableOptionSharing=!0,super.initialize()}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=[];let c,h,d;for(c=i,h=i+n;c<h;++c)d=e[c],l.push({x:o.parse(lt(d,a),c),y:s.parse(lt(d,r),c),_custom:d&&d.r&&+d.r});return l}getMaxOverflow(){const{data:t,_parsed:e}=this._cachedMeta;let i=0;for(let n=t.length-1;n>=0;--n)i=Math.max(i,t[n].size()/2,e[n]._custom);return i>0&&i}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,o=this.getParsed(t),s=i.getLabelForValue(o.x),a=n.getLabelForValue(o.y),r=o._custom;return{label:e.label,value:"("+s+", "+a+(r?", "+r:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{xScale:a,yScale:r}=o._cachedMeta,l=o.resolveDataElementOptions(e,n),c=o.getSharedOptions(l),h=o.includeOptions(n,c);for(let l=e;l<e+i;l++){const e=t[l],i=!s&&o.getParsed(l),c=s?a.getPixelForDecimal(.5):a.getPixelForValue(i.x),d=s?r.getBasePixel():r.getPixelForValue(i.y),u={x:c,y:d,skip:isNaN(c)||isNaN(d)};h&&(u.options=o.resolveDataElementOptions(l,n),s&&(u.options.radius=0)),o.updateElement(e,l,u,n)}o.updateSharedOptions(c,n,l)}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const o=n.radius;return"active"!==e&&(n.radius=0),n.radius+=K(i&&i._custom,o),n}}ro.id="bubble",ro.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},ro.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class lo extends Ti{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;let o,s;for(o=t,s=t+e;o<s;++o)n._parsed[o]=+i[o]}_getRotation(){return Lt(this.options.rotation-90)}_getCircumference(){return Lt(this.options.circumference)}_getRotationExtents(){let t=bt,e=-bt;const i=this;for(let n=0;n<i.chart.data.datasets.length;++n)if(i.chart.isDatasetVisible(n)){const o=i.chart.getDatasetMeta(n).controller,s=o._getRotation(),a=o._getCircumference();t=Math.min(t,s),e=Math.max(e,s+a)}return{rotation:t,circumference:e-t}}update(t){const e=this,i=e.chart,{chartArea:n}=i,o=e._cachedMeta,s=o.data,a=e.getMaxBorderWidth()+e.getMaxOffset(s),r=Math.max((Math.min(n.width,n.height)-a)/2,0),l=Math.min(G(e.options.cutout,r),1),c=e._getRingWeight(e.index),{circumference:h,rotation:d}=e._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:g,offsetY:p}=function(t,e,i){let n=1,o=1,s=0,a=0;if(e<bt){const r=t,l=r+e,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(t,e,n)=>Wt(t,r,l)?1:Math.max(e,e*i,n,n*i),g=(t,e,n)=>Wt(t,r,l)?-1:Math.min(e,e*i,n,n*i),p=f(0,c,d),m=f(wt,h,u),x=g(xt,c,d),b=g(xt+wt,h,u);n=(p-x)/2,o=(m-b)/2,s=-(p+x)/2,a=-(m+b)/2}return{ratioX:n,ratioY:o,offsetX:s,offsetY:a}}(d,h,l),m=(n.width-a)/u,x=(n.height-a)/f,b=Math.max(Math.min(m,x)/2,0),_=Z(e.options.radius,b),y=(_-Math.max(_*l,0))/e._getVisibleDatasetWeightTotal();e.offsetX=g*_,e.offsetY=p*_,o.total=e.calculateTotal(),e.outerRadius=_-y*e._getRingWeightOffset(e.index),e.innerRadius=Math.max(e.outerRadius-y*c,0),e.updateElements(s,0,s.length,t)}_circumference(t,e){const i=this,n=i.options,o=i._cachedMeta,s=i._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===o._parsed[t]?0:i.calculateCircumference(o._parsed[t]*s/bt)}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=a.chartArea,l=a.options.animation,c=(r.left+r.right)/2,h=(r.top+r.bottom)/2,d=s&&l.animateScale,u=d?0:o.innerRadius,f=d?0:o.outerRadius,g=o.resolveDataElementOptions(e,n),p=o.getSharedOptions(g),m=o.includeOptions(n,p);let x,b=o._getRotation();for(x=0;x<e;++x)b+=o._circumference(x,s);for(x=e;x<e+i;++x){const e=o._circumference(x,s),i=t[x],a={x:c+o.offsetX,y:h+o.offsetY,startAngle:b,endAngle:b+e,circumference:e,outerRadius:f,innerRadius:u};m&&(a.options=p||o.resolveDataElementOptions(x,n)),b+=e,o.updateElement(i,x,a,n)}o.updateSharedOptions(p,n,g)}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const e=t._parsed[i];null!==e&&!isNaN(e)&&this.chart.getDataVisibility(i)&&(n+=Math.abs(e))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?bt*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=Ei(e._parsed[t],i.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){const e=this;let i=0;const n=e.chart;let o,s,a,r,l;if(!t)for(o=0,s=n.data.datasets.length;o<s;++o)if(n.isDatasetVisible(o)){a=n.getDatasetMeta(o),t=a.data,r=a.controller,r!==e&&r.configure();break}if(!t)return 0;for(o=0,s=t.length;o<s;++o)l=r.resolveDataElementOptions(o),"inner"!==l.borderAlign&&(i=Math.max(i,l.borderWidth||0,l.hoverBorderWidth||0));return i}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(K(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}lo.id="doughnut",lo.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",indexAxis:"r"},lo.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(((e,i)=>{const n=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,hidden:!t.getDataVisibility(i),index:i}})):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return Y(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class co extends Ti{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this,i=e._cachedMeta,{dataset:n,data:o=[],_dataset:s}=i,a=e.chart._animationsDisabled;let{start:r,count:l}=function(t,e,i){const n=e.length;let o=0,s=n;if(t._sorted){const{iScale:a,_parsed:r}=t,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(o=Nt(Math.min(ne(r,a.axis,c).lo,i?n:ne(e,l,a.getPixelForValue(c)).lo),0,n-1)),s=u?Nt(Math.max(ne(r,a.axis,h).hi+1,i?0:ne(e,l,a.getPixelForValue(h)).hi+1),o,n)-o:n-o}return{start:o,count:s}}(i,o,a);e._drawStart=r,e._drawCount=l,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,o={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=o,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,o),s}(i)&&(r=0,l=o.length),n._decimated=!!s._decimated,n.points=o;const c=e.resolveDatasetElementOptions(t);e.options.showLine||(c.borderWidth=0),c.segment=e.options.segment,e.updateElement(n,void 0,{animated:!a,options:c},t),e.updateElements(o,r,l,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{xScale:a,yScale:r,_stacked:l}=o._cachedMeta,c=o.resolveDataElementOptions(e,n),h=o.getSharedOptions(c),d=o.includeOptions(n,h),u=o.options.spanGaps,f=Ot(u)?u:Number.POSITIVE_INFINITY,g=o.chart._animationsDisabled||s||"none"===n;let p=e>0&&o.getParsed(e-1);for(let c=e;c<e+i;++c){const e=t[c],i=o.getParsed(c),u=g?e:{},m=$(i.y),x=u.x=a.getPixelForValue(i.x,c),b=u.y=s||m?r.getBasePixel():r.getPixelForValue(l?o.applyStack(r,i,l):i.y,c);u.skip=isNaN(x)||isNaN(b)||m,u.stop=c>0&&i.x-p.x>f,u.parsed=i,d&&(u.options=h||o.resolveDataElementOptions(c,n)),g||o.updateElement(e,c,u,n),p=i}o.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this,e=t._cachedMeta,i=e.dataset,n=i.options&&i.options.borderWidth||0,o=e.data||[];if(!o.length)return n;const s=o[0].size(t.resolveDataElementOptions(0)),a=o[o.length-1].size(t.resolveDataElementOptions(o.length-1));return Math.max(n,s,a)/2}draw(){this._cachedMeta.dataset.updateControlPoints(this.chart.chartArea),super.draw()}}co.id="line",co.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},co.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class ho extends Ti{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this,e=t.chart,i=e.chartArea,n=e.options,o=Math.min(i.right-i.left,i.bottom-i.top),s=Math.max(o/2,0),a=(s-Math.max(n.cutoutPercentage?s/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();t.outerRadius=s-a*t.index,t.innerRadius=t.outerRadius-a}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=o.getDataset(),l=a.options.animation,c=o._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*xt;let f,g=u;const p=360/o.countVisibleElements();for(f=0;f<e;++f)g+=o._computeAngle(f,n,p);for(f=e;f<e+i;f++){const e=t[f];let i=g,m=g+o._computeAngle(f,n,p),x=a.getDataVisibility(f)?c.getDistanceFromCenterForValue(r.data[f]):0;g=m,s&&(l.animateScale&&(x=0),l.animateRotate&&(i=m=u));const b={x:h,y:d,innerRadius:0,outerRadius:x,startAngle:i,endAngle:m,options:o.resolveDataElementOptions(f,n)};o.updateElement(e,f,b,n)}}countVisibleElements(){const t=this.getDataset(),e=this._cachedMeta;let i=0;return e.data.forEach(((e,n)=>{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Lt(this.resolveDataElementOptions(t,e).angle||i):0}}ho.id="polarArea",ho.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},ho.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(((e,i)=>{const n=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,hidden:!t.getDataVisibility(i),index:i}})):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class uo extends lo{}uo.id="pie",uo.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class fo extends Ti{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this,i=e._cachedMeta,n=i.dataset,o=i.data||[],s=i.iScale.getLabels();if(n.points=o,"resize"!==t){const i=e.resolveDatasetElementOptions(t);e.options.showLine||(i.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===o.length,options:i};e.updateElement(n,void 0,a,t)}e.updateElements(o,0,o.length,t)}updateElements(t,e,i,n){const o=this,s=o.getDataset(),a=o._cachedMeta.rScale,r="reset"===n;for(let l=e;l<e+i;l++){const e=t[l],i=o.resolveDataElementOptions(l,n),c=a.getPointPositionForValue(l,s.data[l]),h=r?a.xCenter:c.x,d=r?a.yCenter:c.y,u={x:h,y:d,angle:c.angle,skip:isNaN(h)||isNaN(d),options:i};o.updateElement(e,l,u,n)}}}fo.id="radar",fo.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},fo.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class go extends co{}go.id="scatter",go.defaults={showLine:!1,fill:!1},go.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var po=Object.freeze({__proto__:null,BarController:ao,BubbleController:ro,DoughnutController:lo,LineController:co,PolarAreaController:ho,PieController:uo,RadarController:fo,ScatterController:go});function mo(t,e){const{startAngle:i,endAngle:n,pixelMargin:o,x:s,y:a,outerRadius:r,innerRadius:l}=e;let c=o/r;t.beginPath(),t.arc(s,a,r,i-c,n+c),l>o?(c=o/l,t.arc(s,a,l,n+c,i-c,!0)):t.arc(s,a,o,n+wt,i-wt),t.closePath(),t.clip()}function xo(t,e,i,n){const o=Re(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const s=(i-e)/2,a=Math.min(s,n*e/2),r=t=>{const e=(i-Math.min(s,t))*n/2;return Nt(t,0,Math.min(s,e))};return{outerStart:r(o.outerStart),outerEnd:r(o.outerEnd),innerStart:Nt(o.innerStart,0,a),innerEnd:Nt(o.innerEnd,0,a)}}function bo(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function _o(t,e){const{x:i,y:n,startAngle:o,endAngle:s,pixelMargin:a}=e,r=Math.max(e.outerRadius-a,0),l=e.innerRadius+a,{outerStart:c,outerEnd:h,innerStart:d,innerEnd:u}=xo(e,l,r,s-o),f=r-c,g=r-h,p=o+c/f,m=s-h/g,x=l+d,b=l+u,_=o+d/x,y=s-u/b;if(t.beginPath(),t.arc(i,n,r,p,m),h>0){const e=bo(g,m,i,n);t.arc(e.x,e.y,h,m,s+wt)}const v=bo(b,s,i,n);if(t.lineTo(v.x,v.y),u>0){const e=bo(b,y,i,n);t.arc(e.x,e.y,u,s+wt,y+Math.PI)}if(t.arc(i,n,l,s-u/l,o+d/l,!0),d>0){const e=bo(x,_,i,n);t.arc(e.x,e.y,d,_+Math.PI,o-wt)}const w=bo(f,o,i,n);if(t.lineTo(w.x,w.y),c>0){const e=bo(f,p,i,n);t.arc(e.x,e.y,c,o-wt,p)}t.closePath()}function yo(t,e){const{options:i}=e,n="inner"===i.borderAlign;i.borderWidth&&(n?(t.lineWidth=2*i.borderWidth,t.lineJoin="round"):(t.lineWidth=i.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:o,startAngle:s,endAngle:a,pixelMargin:r}=e,l=Math.max(e.outerRadius-r,0),c=e.innerRadius+r;let h;for(i&&(e.endAngle=e.startAngle+bt,mo(t,e),e.endAngle=a,e.endAngle===e.startAngle&&(e.endAngle+=bt,e.fullCircles--)),t.beginPath(),t.arc(n,o,c,s+bt,s,!0),h=0;h<e.fullCircles;++h)t.stroke();for(t.beginPath(),t.arc(n,o,l,s,s+bt),h=0;h<e.fullCircles;++h)t.stroke()}(t,e,n),n&&mo(t,e),_o(t,e),t.stroke())}class vo extends Ri{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:o,distance:s}=Ft(n,{x:t,y:e}),{startAngle:a,endAngle:r,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i);return(h>=bt||Wt(o,a,r))&&(s>=l&&s<=c)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),r=(n+o)/2,l=(s+a)/2;return{x:e+Math.cos(r)*l,y:i+Math.sin(r)*l}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const e=this,i=e.options,n=i.offset||0;if(e.pixelMargin="inner"===i.borderAlign?.33:0,e.fullCircles=Math.floor(e.circumference/bt),!(0===e.circumference||e.innerRadius<0||e.outerRadius<0)){if(t.save(),n&&e.circumference<bt){const i=(e.startAngle+e.endAngle)/2;t.translate(Math.cos(i)*n,Math.sin(i)*n)}t.fillStyle=i.backgroundColor,t.strokeStyle=i.borderColor,function(t,e){if(e.fullCircles){e.endAngle=e.startAngle+bt,_o(t,e);for(let i=0;i<e.fullCircles;++i)t.fill()}isNaN(e.circumference)||(e.endAngle=e.startAngle+e.circumference%bt),_o(t,e),t.fill()}(t,e),yo(t,e),t.restore()}}}function wo(t,e,i=e){t.lineCap=K(i.borderCapStyle,e.borderCapStyle),t.setLineDash(K(i.borderDash,e.borderDash)),t.lineDashOffset=K(i.borderDashOffset,e.borderDashOffset),t.lineJoin=K(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=K(i.borderWidth,e.borderWidth),t.strokeStyle=K(i.borderColor,e.borderColor)}function Mo(t,e,i){t.lineTo(i.x,i.y)}function ko(t,e,i){i=i||{};const n=t.length,o=Math.max(i.start||0,e.start),s=Math.min(i.end||n-1,e.end);return{count:n,start:o,loop:e.loop,ilen:s<o?n+s-o:s-o}}function So(t,e,i,n){const{points:o,options:s}=e,{count:a,start:r,loop:l,ilen:c}=ko(o,i,n),h=function(t){return t.stepped?Qt:t.tension?Jt:Mo}(s);let d,u,f,{move:g=!0,reverse:p}=n||{};for(d=0;d<=c;++d)u=o[(r+(p?c-d:d))%a],u.skip||(g?(t.moveTo(u.x,u.y),g=!1):h(t,f,u,p,s.stepped),f=u);return l&&(u=o[(r+(p?c:0))%a],h(t,f,u,p,s.stepped)),!!l}function Po(t,e,i,n){const o=e.points,{count:s,start:a,ilen:r}=ko(o,i,n),{move:l=!0,reverse:c}=n||{};let h,d,u,f,g,p,m=0,x=0;const b=t=>(a+(c?r-t:t))%s,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=o[b(0)],t.moveTo(d.x,d.y)),h=0;h<=r;++h){if(d=o[b(h)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(i<f?f=i:i>g&&(g=i),m=(x*m+e)/++x):(_(),t.lineTo(e,i),u=n,x=0,f=g=i),p=i}_()}function Do(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||e.stepped||i)?Po:So}vo.id="arc",vo.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,angle:void 0},vo.defaultRoutes={backgroundColor:"backgroundColor"};const Co="function"==typeof Path2D;function Oo(t,e,i,n){Co&&1===e.segments.length?function(t,e,i,n){let o=e._path;o||(o=e._path=new Path2D,e.path(o,i,n)&&o.closePath()),wo(t,e.options),t.stroke(o)}(t,e,i,n):function(t,e,i,n){const{segments:o,options:s}=e,a=Do(e);for(const r of o)wo(t,s,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Ao extends Ri{constructor(t){super(),this.animated=!0,this.options=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,t&&Object.assign(this,t)}updateControlPoints(t){const e=this,i=e.options;if(i.tension&&!i.stepped&&!e._pointsUpdated){const n=i.spanGaps?e._loop:e._fullLoop;dn(e._points,i,t,n),e._pointsUpdated=!0}}set points(t){const e=this;e._points=t,delete e._segments,delete e._path,e._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=wn(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this,n=i.options,o=t[e],s=i.points,a=vn(i,{property:e,start:o,end:o});if(!a.length)return;const r=[],l=function(t){return t.stepped?fn:t.tension?gn:un}(n);let c,h;for(c=0,h=a.length;c<h;++c){const{start:i,end:h}=a[c],d=s[i],u=s[h];if(d===u){r.push(d);continue}const f=l(d,u,Math.abs((o-d[e])/(u[e]-d[e])),n.stepped);f[e]=t[e],r.push(f)}return 1===r.length?r[0]:r}pathSegment(t,e,i){return Do(this)(t,this,e,i)}path(t,e,i){const n=this,o=n.segments,s=Do(n);let a=n._loop;e=e||0,i=i||n.points.length-e;for(const r of o)a&=s(t,n,r,{start:e,end:e+i-1});return!!a}draw(t,e,i,n){const o=this,s=o.options||{};(o.points||[]).length&&s.borderWidth&&(t.save(),Oo(t,o,i,n),t.restore(),o.animated&&(o._pointsUpdated=!1,o._path=void 0))}}function To(t,e,i,n){const o=t.options,{[i]:s}=t.getProps([i],n);return Math.abs(e-s)<o.radius+o.hitRadius}Ao.id="line",Ao.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Ao.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Ao.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class Ro extends Ri{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:o,y:s}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(e-s,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return To(this,t,"x",e)}inYRange(t,e){return To(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t){const e=this,i=e.options;e.skip||i.radius<.1||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,qt(t,i,e.x,e.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Lo(t,e){const{x:i,y:n,base:o,width:s,height:a}=t.getProps(["x","y","base","width","height"],e);let r,l,c,h,d;return t.horizontal?(d=a/2,r=Math.min(i,o),l=Math.max(i,o),c=n-d,h=n+d):(d=s/2,r=i-d,l=i+d,c=Math.min(n,o),h=Math.max(n,o)),{left:r,top:c,right:l,bottom:h}}function Eo(t){let e=t.options.borderSkipped;const i={};return e?(e=t.horizontal?Io(e,"left","right",t.base>t.x):Io(e,"bottom","top",t.base<t.y),i[e]=!0,i):i}function Io(t,e,i,n){var o,s,a;return n?(a=i,t=Fo(t=(o=t)===(s=e)?a:o===a?s:o,i,e)):t=Fo(t,e,i),t}function Fo(t,e,i){return"start"===t?e:"end"===t?i:t}function zo(t,e,i,n){return t?0:Math.max(Math.min(e,n),i)}function Vo(t){const e=Lo(t),i=e.right-e.left,n=e.bottom-e.top,o=function(t,e,i){const n=t.options.borderWidth,o=Eo(t),s=Le(n);return{t:zo(o.top,s.top,0,i),r:zo(o.right,s.right,0,e),b:zo(o.bottom,s.bottom,0,i),l:zo(o.left,s.left,0,e)}}(t,i/2,n/2),s=function(t,e,i){const n=Ee(t.options.borderRadius),o=Math.min(e,i),s=Eo(t);return{topLeft:zo(s.top||s.left,n.topLeft,0,o),topRight:zo(s.top||s.right,n.topRight,0,o),bottomLeft:zo(s.bottom||s.left,n.bottomLeft,0,o),bottomRight:zo(s.bottom||s.right,n.bottomRight,0,o)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:s},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:n-o.t-o.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,s.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(o.b,o.r))}}}}function Bo(t,e,i,n){const o=null===e,s=null===i,a=t&&!(o&&s)&&Lo(t,n);return a&&(o||e>=a.left&&e<=a.right)&&(s||i>=a.top&&i<=a.bottom)}function Wo(t,e){t.rect(e.x,e.y,e.w,e.h)}Ro.id="point",Ro.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Ro.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class No extends Ri{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,t&&Object.assign(this,t)}draw(t){const e=this.options,{inner:i,outer:n}=Vo(this),o=(s=n.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?ee:Wo;var s;t.save(),n.w===i.w&&n.h===i.h||(t.beginPath(),o(t,n),t.clip(),o(t,i),t.fillStyle=e.borderColor,t.fill("evenodd")),t.beginPath(),o(t,i),t.fillStyle=e.backgroundColor,t.fill(),t.restore()}inRange(t,e,i){return Bo(this,t,e,i)}inXRange(t,e){return Bo(this,t,null,e)}inYRange(t,e){return Bo(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}No.id="bar",No.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,pointStyle:void 0},No.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Ho=Object.freeze({__proto__:null,ArcElement:vo,LineElement:Ao,PointElement:Ro,BarElement:No});function jo(t){t.data.datasets.forEach((t=>{if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}))}var $o={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void jo(t);const n=t.width;t.data.datasets.forEach(((e,o)=>{const{_data:s,indexAxis:a}=e,r=t.getDatasetMeta(o),l=s||e.data;if("y"===ze([a,t.options.indexAxis]))return;if("line"!==r.type)return;const c=t.scales[r.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let h,{start:d,count:u}=function(t,e){const i=e.length;let n,o=0;const{iScale:s}=t,{min:a,max:r,minDefined:l,maxDefined:c}=s.getUserBounds();return l&&(o=Nt(ne(e,s.axis,a).lo,0,i-1)),n=c?Nt(ne(e,s.axis,r).hi+1,o,i)-o:i-o,{start:o,count:n}}(r,l);if(!(u<=4*n)){switch($(s)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":h=function(t,e,i,n,o){const s=o.samples||n;if(s>=i)return t.slice(e,e+i);const a=[],r=(i-2)/(s-2);let l=0;const c=e+i-1;let h,d,u,f,g,p=e;for(a[l++]=t[p],h=0;h<s-2;h++){let n,o=0,s=0;const c=Math.floor((h+1)*r)+1+e,m=Math.min(Math.floor((h+2)*r)+1,i)+e,x=m-c;for(n=c;n<m;n++)o+=t[n].x,s+=t[n].y;o/=x,s/=x;const b=Math.floor(h*r)+1+e,_=Math.floor((h+1)*r)+1+e,{x:y,y:v}=t[p];for(u=f=-1,n=b;n<_;n++)f=.5*Math.abs((y-o)*(t[n].y-v)-(y-t[n].x)*(s-v)),f>u&&(u=f,d=t[n],g=n);a[l++]=d,p=g}return a[l++]=t[c],a}(l,d,u,n,i);break;case"min-max":h=function(t,e,i,n){let o,s,a,r,l,c,h,d,u,f,g=0,p=0;const m=[],x=e+i-1,b=t[e].x,_=t[x].x-b;for(o=e;o<e+i;++o){s=t[o],a=(s.x-b)/_*n,r=s.y;const e=0|a;if(e===l)r<u?(u=r,c=o):r>f&&(f=r,h=o),g=(p*g+s.x)/++p;else{const i=o-1;if(!$(c)&&!$(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==d&&e!==i&&m.push({...t[e],x:g}),n!==d&&n!==i&&m.push({...t[n],x:g})}o>0&&i!==d&&m.push(t[i]),m.push(s),l=e,p=0,u=f=r,c=h=d=o}}return m}(l,d,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=h}}))},destroy(t){jo(t)}};function Yo(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=K(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(U(n))return!isNaN(n.value)&&n;let o=parseFloat(n);return X(o)&&Math.floor(o)===o?("-"!==n[0]&&"+"!==n[0]||(o=e+o),!(o===e||o<0||o>=i)&&o):["origin","start","end","stack"].indexOf(n)>=0&&n}class Uo{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:o,radius:s}=this;return e=e||{start:0,end:bt},t.arc(n,o,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:i+Math.sin(o)*n,angle:o}}}function Xo(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,o=e.getLabels().length,s=[],a=n.reverse?e.max:e.min,r=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?a:"end"===i?r:U(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,a),new Uo({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;l<o;++l)s.push(e.getPointPositionForValue(l,h));return s}(t):function(t){const{scale:e={},fill:i}=t;let n,o=null;return"start"===i?o=e.bottom:"end"===i?o=e.top:U(i)?o=e.getPixelForValue(i.value):e.getBasePixel&&(o=e.getBasePixel()),X(o)?(n=e.isHorizontal(),{x:n?o:null,y:n?null:o}):null}(t)}function qo(t){const{chart:e,scale:i,index:n,line:o}=t,s=[],a=o.segments,r=o.points,l=function(t,e){const i=[],n=t.getSortedVisibleDatasetMetas();for(let t=0;t<n.length;t++){const o=n[t];if(o.index===e)break;Ko(o)&&i.unshift(o.dataset)}return i}(e,n);l.push(Qo({x:null,y:i.bottom},o));for(let t=0;t<a.length;t++){const e=a[t];for(let t=e.start;t<=e.end;t++)Go(s,r[t],l)}return new Ao({points:s,options:{}})}const Ko=t=>"line"===t.type&&!t.hidden;function Go(t,e,i){const n=[];for(let o=0;o<i.length;o++){const s=i[o],{first:a,last:r,point:l}=Zo(s,e,"x");if(!(!l||a&&r))if(a)n.unshift(l);else if(t.push(l),!r)break}t.push(...n)}function Zo(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const o=n[i],s=t.segments,a=t.points;let r=!1,l=!1;for(let t=0;t<s.length;t++){const e=s[t],n=a[e.start][i],c=a[e.end][i];if(o>=n&&o<=c){r=o===n,l=o===c;break}}return{first:r,last:l,point:n}}function Qo(t,e){let i=[],n=!1;return Y(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},o=e.points,s=[];return e.segments.forEach((t=>{const e=o[t.start],a=o[t.end];null!==n?(s.push({x:e.x,y:n}),s.push({x:a.x,y:n})):null!==i&&(s.push({x:i,y:e.y}),s.push({x:i,y:a.y}))})),s}(t,e),i.length?new Ao({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Jo(t,e,i){let n=t[e].fill;const o=[e];let s;if(!i)return n;for(;!1!==n&&-1===o.indexOf(n);){if(!X(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;o.push(n),n=s.fill}return!1}function ts(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function es(t,e,i,n){if(n)return;let o=e[t],s=i[t];return"angle"===t&&(o=Bt(o),s=Bt(s)),{property:t,start:o,end:s}}function is(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function ns(t,e,i){const{top:n,bottom:o}=e.chart.chartArea,{property:s,start:a,end:r}=i||{};"x"===s&&(t.beginPath(),t.rect(a,n,r-a,o-n),t.clip())}function os(t,e,i,n){const o=e.interpolate(i,n);o&&t.lineTo(o.x,o.y)}function ss(t,e){const{line:i,target:n,property:o,color:s,scale:a}=e,r=function(t,e,i){const n=t.segments,o=t.points,s=e.points,a=[];for(const t of n){const n=es(i,o[t.start],o[t.end],t.loop);if(!e.segments){a.push({source:t,target:n,start:o[t.start],end:o[t.end]});continue}const r=vn(e,n);for(const e of r){const r=es(i,s[e.start],s[e.end],e.loop),l=yn(t,o,r);for(const t of l)a.push({source:t,target:e,start:{[i]:is(n,r,"start",Math.max)},end:{[i]:is(n,r,"end",Math.min)}})}}return a}(i,n,o);for(const{source:e,target:l,start:c,end:h}of r){const{style:{backgroundColor:r=s}={}}=e;t.save(),t.fillStyle=r,ns(t,a,es(o,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);d?t.closePath():os(t,n,h,o);const u=!!n.pathSegment(t,l,{move:d,reverse:!0}),f=d&&u;f||os(t,n,c,o),t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function as(t,e,i){const n=function(t){const{chart:e,fill:i,line:n}=t;if(X(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return qo(t);const o=Xo(t);return o instanceof Uo?o:Qo(o,n)}(e),{line:o,scale:s}=e,a=o.options,r=a.fill,l=a.backgroundColor,{above:c=l,below:h=l}=r||{};n&&o.points.length&&(Gt(t,i),function(t,e){const{line:i,target:n,above:o,below:s,area:a,scale:r}=e,l=i._loop?"angle":"x";t.save(),"x"===l&&s!==o&&(ts(t,n,a.top),ss(t,{line:i,target:n,color:o,scale:r,property:l}),t.restore(),t.save(),ts(t,n,a.bottom)),ss(t,{line:i,target:n,color:s,scale:r,property:l}),t.restore()}(t,{line:o,target:n,above:c,below:h,area:i,scale:s}),Zt(t))}var rs={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,o=[];let s,a,r,l;for(a=0;a<n;++a)s=t.getDatasetMeta(a),r=s.dataset,l=null,r&&r.options&&r instanceof Ao&&(l={visible:t.isDatasetVisible(a),index:a,fill:Yo(r,a,n),chart:t,scale:s.vScale,line:r}),s.$filler=l,o.push(l);for(a=0;a<n;++a)l=o[a],l&&!1!==l.fill&&(l.fill=Jo(o,a,i.propagate))},beforeDatasetsDraw(t,e,i){const n=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let e=n.length-1;e>=0;--e){const s=n[e].$filler;s&&(s.line.updateControlPoints(o),"beforeDatasetsDraw"===i.drawTime&&as(t.ctx,s,o))}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&as(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ls=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class cs extends Ri{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){const n=this;n.maxWidth=t,n.maxHeight=e,n._margins=i,n.setDimensions(),n.buildLabels(),n.fit()}setDimensions(){const 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)}buildLabels(){const t=this,e=t.options.labels||{};let i=Q(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter((i=>e.filter(i,t.chart.data)))),e.sort&&(i=i.sort(((i,n)=>e.sort(i,n,t.chart.data)))),t.options.reverse&&i.reverse(),t.legendItems=i}fit(){const t=this,{options:e,ctx:i}=t;if(!e.display)return void(t.width=t.height=0);const n=e.labels,o=Fe(n.font),s=o.size,a=t._computeTitleHeight(),{boxWidth:r,itemHeight:l}=ls(n,s);let c,h;i.font=o.string,t.isHorizontal()?(c=t.maxWidth,h=t._fitRows(a,s,r,l)+10):(h=t.maxHeight,c=t._fitCols(a,s,r,l)+10),t.width=Math.min(c,e.maxWidth||t.maxWidth),t.height=Math.min(h,e.maxHeight||t.maxHeight)}_fitRows(t,e,i,n){const o=this,{ctx:s,maxWidth:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.lineWidths=[0],h=n+r;let d=t;s.textAlign="left",s.textBaseline="middle";let u=-1,f=-h;return o.legendItems.forEach(((t,o)=>{const g=i+e/2+s.measureText(t.text).width;(0===o||c[c.length-1]+g+2*r>a)&&(d+=h,c[c.length-(o>0?0:1)]=0,f+=h,u++),l[o]={left:0,top:f,row:u,width:g,height:n},c[c.length-1]+=g+r})),d}_fitCols(t,e,i,n){const o=this,{ctx:s,maxHeight:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.columnSizes=[],h=a-t;let d=r,u=0,f=0,g=0,p=0,m=0;return o.legendItems.forEach(((t,o)=>{const a=i+e/2+s.measureText(t.text).width;o>0&&f+e+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,m++,p=0,u=f=0),u=Math.max(u,a),f+=e+r,l[o]={left:g,top:p,col:m,width:a,height:n},p+=n+r})),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){const t=this;if(!t.options.display)return;const e=t._computeTitleHeight(),{legendHitBoxes:i,options:{align:n,labels:{padding:s}}}=t;if(this.isHorizontal()){let a=0,r=o(n,t.left+s,t.right-t.lineWidths[a]);for(const l of i)a!==l.row&&(a=l.row,r=o(n,t.left+s,t.right-t.lineWidths[a])),l.top+=t.top+e+s,l.left=r,r+=l.width+s}else{let a=0,r=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height);for(const l of i)l.col!==a&&(a=l.col,r=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height)),l.top=r,l.left+=t.left+s,r+=l.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){const t=this;if(t.options.display){const e=t.ctx;Gt(e,t),t._draw(),Zt(e)}}_draw(){const t=this,{options:e,columnSizes:i,lineWidths:n,ctx:a}=t,{align:r,labels:l}=e,c=mt.color,h=pn(e.rtl,t.left,t.width),d=Fe(l.font),{color:u,padding:f}=l,g=d.size,p=g/2;let m;t.drawTitle(),a.textAlign=h.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=d.string;const{boxWidth:x,boxHeight:b,itemHeight:_}=ls(l,g),y=t.isHorizontal(),v=this._computeTitleHeight();m=y?{x:o(r,t.left+f,t.right-n[0]),y:t.top+f+v,line:0}:{x:t.left+f,y:o(r,t.top+v+f,t.bottom-i[0].height),line:0},mn(t.ctx,e.textDirection);const w=_+f;t.legendItems.forEach(((e,M)=>{a.strokeStyle=e.fontColor||u,a.fillStyle=e.fontColor||u;const k=a.measureText(e.text).width,S=h.textAlign(e.textAlign||(e.textAlign=l.textAlign)),P=x+g/2+k;let D=m.x,C=m.y;h.setWidth(t.width),y?M>0&&D+P+f>t.right&&(C=m.y+=w,m.line++,D=m.x=o(r,t.left+f,t.right-n[m.line])):M>0&&C+w>t.bottom&&(D=m.x=D+i[m.line].width+f,m.line++,C=m.y=o(r,t.top+v+f,t.bottom-i[m.line].height));!function(t,e,i){if(isNaN(x)||x<=0||isNaN(b)||b<0)return;a.save();const n=K(i.lineWidth,1);if(a.fillStyle=K(i.fillStyle,c),a.lineCap=K(i.lineCap,"butt"),a.lineDashOffset=K(i.lineDashOffset,0),a.lineJoin=K(i.lineJoin,"miter"),a.lineWidth=n,a.strokeStyle=K(i.strokeStyle,c),a.setLineDash(K(i.lineDash,[])),l.usePointStyle){const o={radius:x*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},s=h.xPlus(t,x/2);qt(a,o,s,e+p)}else{const o=e+Math.max((g-b)/2,0),s=h.leftForLtr(t,x),r=Ee(i.borderRadius);a.beginPath(),Object.values(r).some((t=>0!==t))?ee(a,{x:s,y:o,w:x,h:b,radius:r}):a.rect(s,o,x,b),a.fill(),0!==n&&a.stroke()}a.restore()}(h.x(D),C,e),D=s(S,D+x+p,t.right),function(t,e,i){te(a,i.text,t,e+_/2,d,{strikethrough:i.hidden,textAlign:i.textAlign})}(h.x(D),C,e),y?m.x+=P+f:m.y+=w})),xn(t.ctx,e.textDirection)}drawTitle(){const t=this,e=t.options,i=e.title,s=Fe(i.font),a=Ie(i.padding);if(!i.display)return;const r=pn(e.rtl,t.left,t.width),l=t.ctx,c=i.position,h=s.size/2,d=a.top+h;let u,f=t.left,g=t.width;if(this.isHorizontal())g=Math.max(...t.lineWidths),u=t.top+d,f=o(e.align,f,t.right-g);else{const i=t.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);u=d+o(e.align,t.top,t.bottom-i-e.labels.padding-t._computeTitleHeight())}const p=o(c,f,f+g);l.textAlign=r.textAlign(n(c)),l.textBaseline="middle",l.strokeStyle=i.color,l.fillStyle=i.color,l.font=s.string,te(l,i.text,p,u,s)}_computeTitleHeight(){const t=this.options.title,e=Fe(t.font),i=Ie(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){const i=this;let n,o,s;if(t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom)for(s=i.legendHitBoxes,n=0;n<s.length;++n)if(o=s[n],t>=o.left&&t<=o.left+o.width&&e>=o.top&&e<=o.top+o.height)return i.legendItems[n];return null}handleEvent(t){const e=this,i=e.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,i))return;const n=e._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const a=e._hoveredItem,r=(s=n,null!==(o=a)&&null!==s&&o.datasetIndex===s.datasetIndex&&o.index===s.index);a&&!r&&Q(i.onLeave,[t,a,e],e),e._hoveredItem=n,n&&!r&&Q(i.onHover,[t,n,e],e)}else n&&Q(i.onClick,[t,n,e],e);var o,s}}var hs={id:"legend",_element:cs,start(t,e,i){const n=t.legend=new cs({ctx:t.ctx,options:i,chart:t});Ke.configure(t,n,i),Ke.addBox(t,n)},stop(t){Ke.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Ke.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,o=i.chart;o.isDatasetVisible(n)?(o.hide(n),e.hidden=!0):(o.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:o,color:s}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const a=t.controller.getStyle(i?0:void 0),r=Ie(a.borderWidth);return{text:e[t.index].label,fillStyle:a.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(r.width+r.height)/4,strokeStyle:a.borderColor,pointStyle:n||a.pointStyle,rotation:a.rotation,textAlign:o||a.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ds extends Ri{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this,n=i.options;if(i.left=0,i.top=0,!n.display)return void(i.width=i.height=i.right=i.bottom=0);i.width=i.right=t,i.height=i.bottom=e;const o=Y(n.text)?n.text.length:1;i._padding=Ie(n.padding);const s=o*Fe(n.font).lineHeight+i._padding.height;i.isHorizontal()?i.height=s:i.width=s}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:s,options:a}=this,r=a.align;let l,c,h,d=0;return this.isHorizontal()?(c=o(r,i,s),h=e+t,l=s-i):("left"===a.position?(c=i+t,h=o(r,n,e),d=-.5*xt):(c=s-t,h=o(r,e,n),d=.5*xt),l=n-e),{titleX:c,titleY:h,maxWidth:l,rotation:d}}draw(){const t=this,e=t.ctx,i=t.options;if(!i.display)return;const o=Fe(i.font),s=o.lineHeight/2+t._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=t._drawArgs(s);te(e,i.text,0,0,o,{color:i.color,maxWidth:l,rotation:c,textAlign:n(i.align),textBaseline:"middle",translation:[a,r]})}}var us={id:"title",_element:ds,start(t,e,i){!function(t,e){const i=new ds({ctx:t.ctx,options:e,chart:t});Ke.configure(t,i,e),Ke.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Ke.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;Ke.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const fs={average(t){if(!t.length)return!1;let e,i,n=0,o=0,s=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n+=t.x,o+=t.y,++s}}return{x:n/s,y:o/s}},nearest(t,e){let i,n,o,s=e.x,a=e.y,r=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=zt(e,n.getCenterPoint());t<r&&(r=t,o=n)}}if(o){const t=o.tooltipPosition();s=t.x,a=t.y}return{x:s,y:a}}};function gs(t,e){return e&&(Y(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ps(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function ms(t,e){const{element:i,datasetIndex:n,index:o}=e,s=t.getDatasetMeta(n).controller,{label:a,value:r}=s.getLabelAndValue(o);return{chart:t,label:a,parsed:s.getParsed(o),raw:t.data.datasets[n].data[o],formattedValue:r,dataset:s.getDataset(),dataIndex:o,datasetIndex:n,element:i}}function xs(t,e){const i=t._chart.ctx,{body:n,footer:o,title:s}=t,{boxWidth:a,boxHeight:r}=e,l=Fe(e.bodyFont),c=Fe(e.titleFont),h=Fe(e.footerFont),d=s.length,u=o.length,f=n.length,g=Ie(e.padding);let p=g.height,m=0,x=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(x+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x){p+=f*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(x-f)*l.lineHeight+(x-1)*e.bodySpacing}u&&(p+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let b=0;const _=function(t){m=Math.max(m,i.measureText(t).width+b)};return i.save(),i.font=c.string,J(t.title,_),i.font=l.string,J(t.beforeBody.concat(t.afterBody),_),b=e.displayColors?a+2:0,J(n,(t=>{J(t.before,_),J(t.lines,_),J(t.after,_)})),b=0,i.font=h.string,J(t.footer,_),i.restore(),m+=g.width,{width:m,height:p}}function bs(t,e,i,n){const{x:o,width:s}=i,{width:a,chartArea:{left:r,right:l}}=t;let c="center";return"center"===n?c=o<=(r+l)/2?"left":"right":o<=s/2?c="left":o>=a-s/2&&(c="right"),function(t,e,i,n){const{x:o,width:s}=n,a=i.caretSize+i.caretPadding;return"left"===t&&o+s+a>e.width||"right"===t&&o-s-a<0||void 0}(c,t,e,i)&&(c="center"),c}function _s(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||bs(t,e,i,n),yAlign:n}}function ys(t,e,i,n){const{caretSize:o,caretPadding:s,cornerRadius:a}=t,{xAlign:r,yAlign:l}=i,c=o+s,h=a+s;let d=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,r);const u=function(t,e,i){let{y:n,height:o}=t;return"top"===e?n+=i:n-="bottom"===e?o+i:o/2,n}(e,l,c);return"center"===l?"left"===r?d+=c:"right"===r&&(d-=c):"left"===r?d-=h:"right"===r&&(d+=h),{x:Nt(d,0,n.width-e.width),y:Nt(u,0,n.height-e.height)}}function vs(t,e,i){const n=Ie(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function ws(t){return gs([],ps(t))}function Ms(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class ks extends Ri{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this,e=t._cachedAnimations;if(e)return e;const i=t._chart,n=t.options.setContext(t.getContext()),o=n.enabled&&i.options.animation&&n.animations,s=new yi(t._chart,o);return o._cacheable&&(t._cachedAnimations=Object.freeze(s)),s}getContext(){const t=this;return t.$context||(t.$context=(e=t._chart.getContext(),i=t,n=t._tooltipItems,Object.assign(Object.create(e),{tooltip:i,tooltipItems:n,type:"tooltip"})));var e,i,n}getTitle(t,e){const i=this,{callbacks:n}=e,o=n.beforeTitle.apply(i,[t]),s=n.title.apply(i,[t]),a=n.afterTitle.apply(i,[t]);let r=[];return r=gs(r,ps(o)),r=gs(r,ps(s)),r=gs(r,ps(a)),r}getBeforeBody(t,e){return ws(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const i=this,{callbacks:n}=e,o=[];return J(t,(t=>{const e={before:[],lines:[],after:[]},s=Ms(n,t);gs(e.before,ps(s.beforeLabel.call(i,t))),gs(e.lines,s.label.call(i,t)),gs(e.after,ps(s.afterLabel.call(i,t))),o.push(e)})),o}getAfterBody(t,e){return ws(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const i=this,{callbacks:n}=e,o=n.beforeFooter.apply(i,[t]),s=n.footer.apply(i,[t]),a=n.afterFooter.apply(i,[t]);let r=[];return r=gs(r,ps(o)),r=gs(r,ps(s)),r=gs(r,ps(a)),r}_createItems(t){const e=this,i=e._active,n=e._chart.data,o=[],s=[],a=[];let r,l,c=[];for(r=0,l=i.length;r<l;++r)c.push(ms(e._chart,i[r]));return t.filter&&(c=c.filter(((e,i,o)=>t.filter(e,i,o,n)))),t.itemSort&&(c=c.sort(((e,i)=>t.itemSort(e,i,n)))),J(c,(i=>{const n=Ms(t.callbacks,i);o.push(n.labelColor.call(e,i)),s.push(n.labelPointStyle.call(e,i)),a.push(n.labelTextColor.call(e,i))})),e.labelColors=o,e.labelPointStyles=s,e.labelTextColors=a,e.dataPoints=c,c}update(t,e){const i=this,n=i.options.setContext(i.getContext()),o=i._active;let s,a=[];if(o.length){const t=fs[n.position].call(i,o,i._eventPosition);a=i._createItems(n),i.title=i.getTitle(a,n),i.beforeBody=i.getBeforeBody(a,n),i.body=i.getBody(a,n),i.afterBody=i.getAfterBody(a,n),i.footer=i.getFooter(a,n);const e=i._size=xs(i,n),r=Object.assign({},t,e),l=_s(i._chart,n,r),c=ys(n,r,l,i._chart);i.xAlign=l.xAlign,i.yAlign=l.yAlign,s={opacity:1,x:c.x,y:c.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==i.opacity&&(s={opacity:0});i._tooltipItems=a,i.$context=void 0,s&&i._resolveAnimations().update(i,s),t&&n.external&&n.external.call(i,{chart:i._chart,tooltip:i,replay:e})}drawCaret(t,e,i,n){const o=this.getCaretPosition(t,i,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{cornerRadius:s,caretSize:a}=i,{x:r,y:l}=t,{width:c,height:h}=e;let d,u,f,g,p,m;return"center"===o?(p=l+h/2,"left"===n?(d=r,u=d-a,g=p+a,m=p-a):(d=r+c,u=d+a,g=p-a,m=p+a),f=d):(u="left"===n?r+s+a:"right"===n?r+c-s-a:this.caretX,"top"===o?(g=l,p=g-a,d=u-a,f=u+a):(g=l+h,p=g+a,d=u+a,f=u-a),m=g),{x1:d,x2:u,x3:f,y1:g,y2:p,y3:m}}drawTitle(t,e,i){const n=this,o=n.title,s=o.length;let a,r,l;if(s){const c=pn(i.rtl,n.x,n.width);for(t.x=vs(n,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",a=Fe(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,l=0;l<s;++l)e.fillText(o[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===s&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,n,o){const s=this,a=s.labelColors[i],r=s.labelPointStyles[i],{boxHeight:l,boxWidth:c}=o,h=Fe(o.bodyFont),d=vs(s,"left",o),u=n.x(d),f=l<h.lineHeight?(h.lineHeight-l)/2:0,g=e.y+f;if(o.usePointStyle){const e={radius:Math.min(c,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=n.leftForLtr(u,c)+c/2,s=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,qt(t,e,i,s),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,qt(t,e,i,s)}else{t.lineWidth=a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const e=n.leftForLtr(u,c),i=n.leftForLtr(n.xPlus(u,1),c-2),s=Ee(a.borderRadius);Object.values(s).some((t=>0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ee(t,{x:e,y:g,w:c,h:l,radius:s}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ee(t,{x:i,y:g+1,w:c-2,h:l-2,radius:s}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,g,c,l),t.strokeRect(e,g,c,l),t.fillStyle=a.backgroundColor,t.fillRect(i,g+1,c-2,l-2))}t.fillStyle=s.labelTextColors[i]}drawBody(t,e,i){const n=this,{body:o}=n,{bodySpacing:s,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c}=i,h=Fe(i.bodyFont);let d=h.lineHeight,u=0;const f=pn(i.rtl,n.x,n.width),g=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+s},p=f.textAlign(a);let m,x,b,_,y,v,w;for(e.textAlign=a,e.textBaseline="middle",e.font=h.string,t.x=vs(n,p,i),e.fillStyle=i.bodyColor,J(n.beforeBody,g),u=r&&"right"!==p?"center"===a?c/2+1:c+2:0,_=0,v=o.length;_<v;++_){for(m=o[_],x=n.labelTextColors[_],e.fillStyle=x,J(m.before,g),b=m.lines,r&&b.length&&(n._drawColorBox(e,t,_,f,i),d=Math.max(h.lineHeight,l)),y=0,w=b.length;y<w;++y)g(b[y]),d=h.lineHeight;J(m.after,g)}u=0,d=h.lineHeight,J(n.afterBody,g),t.y-=s}drawFooter(t,e,i){const n=this,o=n.footer,s=o.length;let a,r;if(s){const l=pn(i.rtl,n.x,n.width);for(t.x=vs(n,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",a=Fe(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,r=0;r<s;++r)e.fillText(o[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:o,yAlign:s}=this,{x:a,y:r}=t,{width:l,height:c}=i,h=n.cornerRadius;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(a+h,r),"top"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+l-h,r),e.quadraticCurveTo(a+l,r,a+l,r+h),"center"===s&&"right"===o&&this.drawCaret(t,e,i,n),e.lineTo(a+l,r+c-h),e.quadraticCurveTo(a+l,r+c,a+l-h,r+c),"bottom"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+h,r+c),e.quadraticCurveTo(a,r+c,a,r+c-h),"center"===s&&"left"===o&&this.drawCaret(t,e,i,n),e.lineTo(a,r+h),e.quadraticCurveTo(a,r,a+h,r),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this,i=e._chart,n=e.$animations,o=n&&n.x,s=n&&n.y;if(o||s){const n=fs[t.position].call(e,e._active,e._eventPosition);if(!n)return;const a=e._size=xs(e,t),r=Object.assign({},n,e._size),l=_s(i,t,r),c=ys(t,r,l,i);o._to===c.x&&s._to===c.y||(e.xAlign=l.xAlign,e.yAlign=l.yAlign,e.width=a.width,e.height=a.height,e.caretX=n.x,e.caretY=n.y,e._resolveAnimations().update(e,c))}}draw(t){const e=this,i=e.options.setContext(e.getContext());let n=e.opacity;if(!n)return;e._updateAnimationTarget(i);const o={width:e.width,height:e.height},s={x:e.x,y:e.y};n=Math.abs(n)<.001?0:n;const a=Ie(i.padding),r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;i.enabled&&r&&(t.save(),t.globalAlpha=n,e.drawBackground(s,t,o,i),mn(t,i.textDirection),s.y+=a.top,e.drawTitle(s,t,i),e.drawBody(s,t,i),e.drawFooter(s,t,i),xn(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this,n=i._active,o=t.map((({datasetIndex:t,index:e})=>{const n=i._chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),s=!tt(n,o),a=i._positionChanged(o,e);(s||a)&&(i._active=o,i._eventPosition=e,i.update(!0))}handleEvent(t,e){const i=this,n=i.options,o=i._active||[];let s=!1,a=[];"mouseout"!==t.type&&(a=i._chart.getElementsAtEventForMode(t,n.mode,n,e),n.reverse&&a.reverse());const r=i._positionChanged(a,t);return s=e||!tt(a,o)||r,s&&(i._active=a,(n.enabled||n.external)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0,e))),s}_positionChanged(t,e){const i=this,n=fs[i.options.position].call(i,t,e);return i.caretX!==n.x||i.caretY!==n.y}}ks.positioners=fs;var Ss={id:"tooltip",_element:ks,positioners:fs,afterInit(t,e,i){i&&(t.tooltip=new ks({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:H,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:H,beforeBody:H,beforeLabel:H,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return $(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:H,afterBody:H,beforeFooter:H,footer:H,afterFooter:H}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Ps=Object.freeze({__proto__:null,Decimation:$o,Filler:rs,Legend:hs,Title:us,Tooltip:Ss});function Ds(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Cs extends Yi{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if($(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Nt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Ds(i,t,K(e,t)),i.length-1)}determineDataLimits(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let{min:n,max:o}=t.getMinMax(!0);"ticks"===t.options.bounds&&(e||(n=0),i||(o=t.getLabels().length-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.min,i=t.max,n=t.options.offset,o=[];let s=t.getLabels();s=0===e&&i===s.length-1?s:s.slice(e,i+1),t._valueRange=Math.max(s.length-(n?0:1),1),t._startValue=t.min-(n?.5:0);for(let t=e;t<=i;t++)o.push({value:t});return o}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){const t=this;super.configure(),t.isHorizontal()||(t._reversePixels=!t._reversePixels)}getPixelForValue(t){const e=this;return"number"!=typeof t&&(t=e.parse(t)),null===t?NaN:e.getPixelForDecimal((t-e._startValue)/e._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){const e=this;return Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange)}getBasePixel(){return this.bottom}}Cs.id="category",Cs.defaults={ticks:{callback:Cs.prototype.getLabelForValue}};class Os extends Yi{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return $(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const t=this,{beginAtZero:e,stacked:i}=t.options,{minDefined:n,maxDefined:o}=t.getUserBounds();let{min:s,max:a}=t;const r=t=>s=n?s:t,l=t=>a=o?a:t;if(e||i){const t=Pt(s),e=Pt(a);t<0&&e<0?l(0):t>0&&e>0&&r(0)}s===a&&(l(a+1),e||r(s-1)),t.min=s,t.max=a}getTickLimit(){const t=this,e=t.options.ticks;let i,{maxTicksLimit:n,stepSize:o}=e;return o?i=Math.ceil(t.max/o)-Math.floor(t.min/o)+1:(i=t.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this,e=t.options,i=e.ticks;let n=t.getTickLimit();n=Math.max(2,n);const o=function(t,e){const i=[],{step:n,min:o,max:s,precision:a,count:r,maxTicks:l}=t,c=n||1,h=l-1,{min:d,max:u}=e,f=!$(o),g=!$(s),p=!$(r);let m,x,b,_,y=Dt((u-d)/h/c)*c;if(y<1e-14&&!f&&!g)return[{value:d},{value:u}];_=Math.ceil(u/y)-Math.floor(d/y),_>h&&(y=Dt(_*y/h/c)*c),$(a)||(m=Math.pow(10,a),y=Math.ceil(y*m)/m),x=Math.floor(d/y)*y,b=Math.ceil(u/y)*y,f&&g&&n&&Tt((s-o)/n,y/1e3)?(_=Math.min((s-o)/y,l),y=(s-o)/_,x=o,b=s):p?(x=f?o:x,b=g?s:b,_=r-1,y=(b-x)/_):(_=(b-x)/y,_=At(_,Math.round(_),y/1e3)?Math.round(_):Math.ceil(_)),m=Math.pow(10,$(a)?It(y):a),x=Math.round(x*m)/m,b=Math.round(b*m)/m;let v=0;for(f&&(i.push({value:o}),x<=o&&v++,At(Math.round((x+v*y)*m)/m,o,y/10)&&v++);v<_;++v)i.push({value:Math.round((x+v*y)*m)/m});return g?At(i[i.length-1].value,s,y/10)?i[i.length-1].value=s:i.push({value:s}):i.push({value:b}),i}({maxTicks:n,min:e.min,max:e.max,precision:i.precision,step:i.stepSize,count:i.count},Ve(t,e.grace));return"ticks"===e.bounds&&Rt(o,t,"value"),e.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),o}configure(){const t=this,e=t.ticks;let i=t.min,n=t.max;if(super.configure(),t.options.offset&&e.length){const t=(n-i)/Math.max(e.length-1,1)/2;i-=t,n+=t}t._startValue=i,t._endValue=n,t._valueRange=n-i}getLabelForValue(t){return Ei(t,this.chart.options.locale)}}class As extends Os{determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=X(e)?e:0,t.max=X(i)?i:1,t.handleTickRangeOptions()}computeTickLimit(){const t=this;if(t.isHorizontal())return Math.ceil(t.width/40);const e=t._resolveTickFontOptions(0);return Math.ceil(t.height/e.lineHeight)}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Ts(t){return 1===t/Math.pow(10,Math.floor(St(t)))}As.id="linear",As.defaults={ticks:{callback:Fi.formatters.numeric}};class Rs extends Yi{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Os.prototype.parse.apply(this,[t,e]);if(0!==i)return X(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=X(e)?Math.max(0,e):null,t.max=X(i)?Math.max(0,i):null,t.options.beginAtZero&&(t._zero=!0),t.handleTickRangeOptions()}handleTickRangeOptions(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let n=t.min,o=t.max;const s=t=>n=e?n:t,a=t=>o=i?o:t,r=(t,e)=>Math.pow(10,Math.floor(St(t))+e);n===o&&(n<=0?(s(1),a(10)):(s(r(n,-1)),a(r(o,1)))),n<=0&&s(r(o,-1)),o<=0&&a(r(n,1)),t._zero&&t.min!==t._suggestedMin&&n===r(t.min,0)&&s(r(n,-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.options,i=function(t,e){const i=Math.floor(St(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),o=[];let s=q(t.min,Math.pow(10,Math.floor(St(e.min)))),a=Math.floor(St(s)),r=Math.floor(s/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do{o.push({value:s,major:Ts(s)}),++r,10===r&&(r=1,++a,l=a>=0?1:l),s=Math.round(r*Math.pow(10,a)*l)/l}while(a<i||a===i&&r<n);const c=q(t.max,s);return o.push({value:c,major:Ts(s)}),o}({min:t._userMin,max:t._userMax},t);return"ticks"===e.bounds&&Rt(i,t,"value"),e.reverse?(i.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i}getLabelForValue(t){return void 0===t?"0":Ei(t,this.chart.options.locale)}configure(){const t=this,e=t.min;super.configure(),t._startValue=St(e),t._valueRange=St(t.max)-St(e)}getPixelForValue(t){const e=this;return void 0!==t&&0!==t||(t=e.min),null===t||isNaN(t)?NaN:e.getPixelForDecimal(t===e.min?0:(St(t)-e._startValue)/e._valueRange)}getValueForPixel(t){const e=this,i=e.getDecimalForPixel(t);return Math.pow(10,e._startValue+i*e._valueRange)}}function Ls(t){const e=t.ticks;if(e.display&&t.display){const t=Ie(e.backdropPadding);return K(e.font&&e.font.size,mt.font.size)+t.height}return 0}function Es(t,e,i,n,o){return t===n||t===o?{start:e-i/2,end:e+i/2}:t<n||t>o?{start:e-i,end:e}:{start:e,end:e+i}}function Is(t){return 0===t||180===t?"center":t<180?"left":"right"}function Fs(t,e,i){90===t||270===t?i.y-=e.h/2:(t>270||t<90)&&(i.y-=e.h)}function zs(t,e,i,n){const{ctx:o}=t;if(i)o.arc(t.xCenter,t.yCenter,e,0,bt);else{let i=t.getPointPosition(0,e);o.moveTo(i.x,i.y);for(let s=1;s<n;s++)i=t.getPointPosition(s,e),o.lineTo(i.x,i.y)}}function Vs(t){return Ot(t)?t:0}Rs.id="logarithmic",Rs.defaults={ticks:{callback:Fi.formatters.logarithmic,major:{enabled:!0}}};class Bs extends Os{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Ls(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2}determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!1);t.min=X(e)&&!isNaN(e)?e:0,t.max=X(i)&&!isNaN(i)?i:0,t.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ls(this.options))}generateTickLabels(t){const e=this;Os.prototype.generateTickLabels.call(e,t),e._pointLabels=e.getLabels().map(((t,i)=>{const n=Q(e.options.pointLabels.callback,[t,i],e);return n||0===n?n:""}))}fit(){const t=this,e=t.options;e.display&&e.pointLabels.display?function(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={};let n,o,s;const a=[],r=[],l=t.getLabels().length;for(n=0;n<l;n++){const l=t.options.pointLabels.setContext(t.getContext(n));r[n]=l.padding,s=t.getPointPosition(n,t.drawingArea+r[n]);const u=Fe(l.font);t.ctx.font=u.string,c=t.ctx,h=u.lineHeight,o=Y(d=t._pointLabels[n])?{w:Yt(c,c.font,d),h:d.length*h}:{w:c.measureText(d).width,h:h},a[n]=o;const f=t.getIndexAngle(n),g=Et(f),p=Es(g,s.x,o.w,0,180),m=Es(g,s.y,o.h,90,270);p.start<e.l&&(e.l=p.start,i.l=f),p.end>e.r&&(e.r=p.end,i.r=f),m.start<e.t&&(e.t=m.start,i.t=f),m.end>e.b&&(e.b=m.end,i.b=f)}var c,h,d;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=[];const u=t.options,f=Ls(u),g=t.getDistanceFromCenterForValue(u.ticks.reverse?t.min:t.max);for(n=0;n<l;n++){const e=0===n?f/2:0,i=t.getPointPosition(n,g+e+r[n]),o=Et(t.getIndexAngle(n)),s=a[n];Fs(o,s,i);const l=Is(o);let c;c="left"===l?i.x:"center"===l?i.x-s.w/2:i.x-s.w;const h=c+s.w;t._pointLabelItems[n]={x:i.x,y:i.y,textAlign:l,left:c,top:i.y,right:h,bottom:i.y+s.h}}}(t):t.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){const n=this;let o=e.l/Math.sin(i.l),s=Math.max(e.r-n.width,0)/Math.sin(i.r),a=-e.t/Math.cos(i.t),r=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);o=Vs(o),s=Vs(s),a=Vs(a),r=Vs(r),n.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(o+s)/2),Math.floor(t-(a+r)/2))),n.setCenterPoint(o,s,a,r)}setCenterPoint(t,e,i,n){const o=this,s=o.width-e-o.drawingArea,a=t+o.drawingArea,r=i+o.drawingArea,l=o.height-o.paddingTop-n-o.drawingArea;o.xCenter=Math.floor((a+s)/2+o.left),o.yCenter=Math.floor((r+l)/2+o.top+o.paddingTop)}getIndexAngle(t){return Bt(t*(bt/this.getLabels().length)+Lt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){const e=this;if($(t))return NaN;const i=e.drawingArea/(e.max-e.min);return e.options.reverse?(e.max-t)*i:(t-e.min)*i}getValueForDistanceFromCenter(t){if($(t))return NaN;const e=this,i=t/(e.drawingArea/(e.max-e.min));return e.options.reverse?e.max-i:e.min+i}getPointPosition(t,e){const i=this,n=i.getIndexAngle(t)-wt;return{x:Math.cos(n)*e+i.xCenter,y:Math.sin(n)*e+i.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:o}}drawBackground(){const t=this,{backgroundColor:e,grid:{circular:i}}=t.options;if(e){const n=t.ctx;n.save(),n.beginPath(),zs(t,t.getDistanceFromCenterForValue(t._endValue),i,t.getLabels().length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){const t=this,e=t.ctx,i=t.options,{angleLines:n,grid:o}=i,s=t.getLabels().length;let a,r,l;if(i.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let o=e-1;o>=0;o--){const e=n.setContext(t.getContext(o)),s=Fe(e.font),{x:a,y:r,textAlign:l,left:c,top:h,right:d,bottom:u}=t._pointLabelItems[o],{backdropColor:f}=e;if(!$(f)){const t=Ie(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,d-c+t.width,u-h+t.height)}te(i,t._pointLabels[o],a,r+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(t,s),o.display&&t.ticks.forEach(((e,i)=>{if(0!==i){r=t.getDistanceFromCenterForValue(e.value);const n=o.setContext(t.getContext(i-1));!function(t,e,i,n){const o=t.ctx,s=e.circular,{color:a,lineWidth:r}=e;!s&&!n||!a||!r||i<0||(o.save(),o.strokeStyle=a,o.lineWidth=r,o.setLineDash(e.borderDash),o.lineDashOffset=e.borderDashOffset,o.beginPath(),zs(t,i,s,n),o.closePath(),o.stroke(),o.restore())}(t,n,r,s)}})),n.display){for(e.save(),a=t.getLabels().length-1;a>=0;a--){const o=n.setContext(t.getContext(a)),{color:s,lineWidth:c}=o;c&&s&&(e.lineWidth=c,e.strokeStyle=s,e.setLineDash(o.borderDash),e.lineDashOffset=o.borderDashOffset,r=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),l=t.getPointPosition(a,r),e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawLabels(){const t=this,e=t.ctx,i=t.options,n=i.ticks;if(!n.display)return;const o=t.getIndexAngle(0);let s,a;e.save(),e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",t.ticks.forEach(((o,r)=>{if(0===r&&!i.reverse)return;const l=n.setContext(t.getContext(r)),c=Fe(l.font);if(s=t.getDistanceFromCenterForValue(t.ticks[r].value),l.showLabelBackdrop){a=e.measureText(o.label).width,e.fillStyle=l.backdropColor;const t=Ie(l.backdropPadding);e.fillRect(-a/2-t.left,-s-c.size/2-t.top,a+t.width,c.size+t.height)}te(e,o.label,0,-s,c,{color:l.color})})),e.restore()}drawTitle(){}}Bs.id="radialLinear",Bs.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPadding:2,callback:Fi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},Bs.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Bs.descriptors={angleLines:{_fallback:"grid"}};const Ws={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ns=Object.keys(Ws);function Hs(t,e){return t-e}function js(t,e){if($(e))return null;const i=t._adapter,n=t.options.time,{parser:o,round:s,isoWeekday:a}=n;let r=e;return"function"==typeof o&&(r=o(r)),X(r)||(r="string"==typeof o?i.parse(r,o):i.parse(r)),null===r?null:(s&&(r="week"!==s||!Ot(a)&&!0!==a?i.startOf(r,s):i.startOf(r,"isoWeek",a)),+r)}function $s(t,e,i,n){const o=Ns.length;for(let s=Ns.indexOf(t);s<o-1;++s){const t=Ws[Ns[s]],o=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(o*t.size))<=n)return Ns[s]}return Ns[o-1]}function Ys(t,e,i){if(i){if(i.length){const{lo:n,hi:o}=ie(i,e);t[i[n]>=e?i[n]:i[o]]=!0}}else t[e]=!0}function Us(t,e,i){const n=[],o={},s=e.length;let a,r;for(a=0;a<s;++a)r=e[a],o[r]=a,n.push({value:r,major:!1});return 0!==s&&i?function(t,e,i,n){const o=t._adapter,s=+o.startOf(e[0].value,n),a=e[e.length-1].value;let r,l;for(r=s;r<=a;r=+o.add(r,1,n))l=i[r],l>=0&&(e[l].major=!0);return e}(t,n,o,i):n}class Xs extends Yi{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new eo._date(t.adapters.date);st(i.displayFormats,n.formats()),super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:js(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this,e=t.options,i=t._adapter,n=e.time.unit||"day";let{min:o,max:s,minDefined:a,maxDefined:r}=t.getUserBounds();function l(t){a||isNaN(t.min)||(o=Math.min(o,t.min)),r||isNaN(t.max)||(s=Math.max(s,t.max))}a&&r||(l(t._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||l(t.getMinMax(!1))),o=X(o)&&!isNaN(o)?o:+i.startOf(Date.now(),n),s=X(s)&&!isNaN(s)?s:+i.endOf(Date.now(),n)+1,t.min=Math.min(o,s-1),t.max=Math.max(o+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this,e=t.options,i=e.time,n=e.ticks,o="labels"===n.source?t.getLabelTimestamps():t._generate();"ticks"===e.bounds&&o.length&&(t.min=t._userMin||o[0],t.max=t._userMax||o[o.length-1]);const s=t.min,a=se(o,s,t.max);return t._unit=i.unit||(n.autoSkip?$s(i.minUnit,t.min,t.max,t._getLabelCapacity(s)):function(t,e,i,n,o){for(let s=Ns.length-1;s>=Ns.indexOf(i);s--){const i=Ns[s];if(Ws[i].common&&t._adapter.diff(o,n,i)>=e-1)return i}return Ns[i?Ns.indexOf(i):0]}(t,a.length,i.minUnit,t.min,t.max)),t._majorUnit=n.major.enabled&&"year"!==t._unit?function(t){for(let e=Ns.indexOf(t)+1,i=Ns.length;e<i;++e)if(Ws[Ns[e]].common)return Ns[e]}(t._unit):void 0,t.initOffsets(o),e.reverse&&a.reverse(),Us(t,a,t._majorUnit)}initOffsets(t){const e=this;let i,n,o=0,s=0;e.options.offset&&t.length&&(i=e.getDecimalForValue(t[0]),o=1===t.length?1-i:(e.getDecimalForValue(t[1])-i)/2,n=e.getDecimalForValue(t[t.length-1]),s=1===t.length?n:(n-e.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;o=Nt(o,0,a),s=Nt(s,0,a),e._offsets={start:o,end:s,factor:1/(o+1+s)}}_generate(){const t=this,e=t._adapter,i=t.min,n=t.max,o=t.options,s=o.time,a=s.unit||$s(s.minUnit,i,n,t._getLabelCapacity(i)),r=K(s.stepSize,1),l="week"===a&&s.isoWeekday,c=Ot(l)||!0===l,h={};let d,u,f=i;if(c&&(f=+e.startOf(f,"isoWeek",l)),f=+e.startOf(f,c?"day":a),e.diff(n,i,a)>1e5*r)throw new Error(i+" and "+n+" are too far apart with stepSize of "+r+" "+a);const g="data"===o.ticks.source&&t.getDataTimestamps();for(d=f,u=0;d<n;d=+e.add(d,r,a),u++)Ys(h,d,g);return d!==n&&"ticks"!==o.bounds&&1!==u||Ys(h,d,g),Object.keys(h).sort(((t,e)=>t-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const o=this,s=o.options,a=s.time.displayFormats,r=o._unit,l=o._majorUnit,c=r&&a[r],h=l&&a[l],d=i[e],u=l&&h&&d&&d.major,f=o._adapter.format(t,n||(u?h:c)),g=s.ticks.callback;return g?Q(g,[f,e,i],o):f}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){const e=this;return null===t?NaN:(t-e.min)/(e.max-e.min)}getPixelForValue(t){const e=this,i=e._offsets,n=e.getDecimalForValue(t);return e.getPixelForDecimal((i.start+n)*i.factor)}getValueForPixel(t){const e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return e.min+n*(e.max-e.min)}_getLabelSize(t){const e=this,i=e.options.ticks,n=e.ctx.measureText(t).width,o=Lt(e.isHorizontal()?i.maxRotation:i.minRotation),s=Math.cos(o),a=Math.sin(o),r=e._resolveTickFontOptions(0).size;return{w:n*s+r*a,h:n*a+r*s}}_getLabelCapacity(t){const e=this,i=e.options.time,n=i.displayFormats,o=n[i.unit]||n.millisecond,s=e._tickFormatFunction(t,0,Us(e,[t],e._majorUnit),o),a=e._getLabelSize(s),r=Math.floor(e.isHorizontal()?e.width/a.w:e.height/a.h)-1;return r>0?r:1}getDataTimestamps(){const t=this;let e,i,n=t._cache.data||[];if(n.length)return n;const o=t.getMatchingVisibleMetas();if(t._normalized&&o.length)return t._cache.data=o[0].controller.getAllParsedValues(t);for(e=0,i=o.length;e<i;++e)n=n.concat(o[e].controller.getAllParsedValues(t));return t._cache.data=t.normalize(n)}getLabelTimestamps(){const t=this,e=t._cache.labels||[];let i,n;if(e.length)return e;const o=t.getLabels();for(i=0,n=o.length;i<n;++i)e.push(js(t,o[i]));return t._cache.labels=t._normalized?e:t.normalize(e)}normalize(t){return ce(t.sort(Hs))}}function qs(t,e,i){let n,o,s,a;if(i)n=Math.floor(e),o=Math.ceil(e),s=t[n],a=t[o];else{const i=ie(t,e);s=i.lo,a=i.hi,n=t[s],o=t[a]}const r=o-n;return r?s+(a-s)*(e-n)/r:s}Xs.id="time",Xs.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Ks extends Xs{constructor(t){super(t),this._table=[],this._maxIndex=void 0}initOffsets(){const t=this,e=t._getTimestampsForTable();t._table=t.buildLookupTable(e),t._maxIndex=t._table.length-1,super.initOffsets(e)}buildLookupTable(t){const{min:e,max:i}=this;if(!t.length)return[{time:e,pos:0},{time:i,pos:1}];const n=[e];let o,s,a;for(o=0,s=t.length;o<s;++o)a=t[o],a>e&&a<i&&n.push(a);return n.push(i),n}_getTimestampsForTable(){const t=this;let e=t._cache.all||[];if(e.length)return e;const i=t.getDataTimestamps(),n=t.getLabelTimestamps();return e=i.length&&n.length?t.normalize(i.concat(n)):i.length?i:n,e=t._cache.all=e,e}getPixelForValue(t,e){const i=this,n=i._offsets,o=i._normalized&&i._maxIndex>0&&!$(e)?e/i._maxIndex:i.getDecimalForValue(t);return i.getPixelForDecimal((n.start+o)*n.factor)}getDecimalForValue(t){return qs(this._table,t)/this._maxIndex}getValueForPixel(t){const e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return qs(e._table,n*this._maxIndex,!0)}}Ks.id="timeseries",Ks.defaults=Xs.defaults;var Gs=Object.freeze({__proto__:null,CategoryScale:Cs,LinearScale:As,LogarithmicScale:Rs,RadialLinearScale:Bs,TimeScale:Xs,TimeSeriesScale:Ks});return Gn.register(po,Gs,Ho,Ps),Gn.helpers={...Pn},Gn._adapters=eo,Gn.Animation=bi,Gn.Animations=yi,Gn.animator=a,Gn.controllers=Cn.controllers.items,Gn.DatasetController=Ti,Gn.Element=Ri,Gn.elements=Ho,Gn.Interaction=Ce,Gn.layouts=Ke,Gn.platforms=di,Gn.Scale=Yi,Gn.Ticks=Fi,Object.assign(Gn,po,Gs,Ho,Ps,di),Gn.Chart=Gn,"undefined"!=typeof window&&(window.Chart=Gn),Gn}));
|
includes/admin/js/chartjs-adapter-moment.min.js
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* chartjs-adapter-moment v1.0.0
|
3 |
+
* https://www.chartjs.org
|
4 |
+
* (c) 2021 chartjs-adapter-moment Contributors
|
5 |
+
* Released under the MIT license
|
6 |
+
*/
|
7 |
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("moment"),require("chart.js")):"function"==typeof define&&define.amd?define(["moment","chart.js"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).moment,e.Chart)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=n(e);const a={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};t._adapters._date.override("function"==typeof f.default?{_id:"moment",formats:function(){return a},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=f.default(e,t):e instanceof f.default||(e=f.default(e)),e.isValid()?e.valueOf():null},format:function(e,t){return f.default(e).format(t)},add:function(e,t,n){return f.default(e).add(t,n).valueOf()},diff:function(e,t,n){return f.default(e).diff(f.default(t),n)},startOf:function(e,t,n){return e=f.default(e),"isoWeek"===t?(n=Math.trunc(Math.min(Math.max(0,n),6)),e.isoWeekday(n).startOf("day").valueOf()):e.startOf(t).valueOf()},endOf:function(e,t){return f.default(e).endOf(t).valueOf()}}:{})}));
|
8 |
+
//# sourceMappingURL=chartjs-adapter-moment.min.js.map
|
includes/admin/js/chartjs-plugin-datalabels.min.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* chartjs-plugin-datalabels v2.0.0-beta.1
|
3 |
+
* https://chartjs-plugin-datalabels.netlify.app
|
4 |
+
* (c) 2017-2021 chartjs-plugin-datalabels contributors
|
5 |
+
* Released under the MIT license
|
6 |
+
*/
|
7 |
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("chart.js/helpers"),require("chart.js")):"function"==typeof define&&define.amd?define(["chart.js/helpers","chart.js"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).ChartDataLabels=e(t.Chart.helpers,t.Chart)}(this,(function(t,e){"use strict";var r=function(){if("undefined"!=typeof window){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return(t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1}(),a=function(e){var r,a=[];for(e=[].concat(e);e.length;)"string"==typeof(r=e.pop())?a.unshift.apply(a,r.split("\n")):Array.isArray(r)?e.push.apply(e,r):t.isNullOrUndef(e)||a.unshift(""+r);return a},o=function(t,e,r){var a,o=[].concat(e),n=o.length,i=t.font,l=0;for(t.font=r.string,a=0;a<n;++a)l=Math.max(t.measureText(o[a]).width,l);return t.font=i,{height:n*r.lineHeight,width:l}},n=function(t,e,r){return Math.max(t,Math.min(e,r))},i=function(t,e){var r,a,o,n,i=t.slice(),l=[];for(r=0,o=e.length;r<o;++r)n=e[r],-1===(a=i.indexOf(n))?l.push([n,1]):i.splice(a,1);for(r=0,o=i.length;r<o;++r)l.push([i[r],-1]);return l};function l(t,e){var r=e.x,a=e.y;if(null===r)return{x:0,y:-1};if(null===a)return{x:1,y:0};var o=t.x-r,n=t.y-a,i=Math.sqrt(o*o+n*n);return{x:i?o/i:0,y:i?n/i:-1}}function s(t,e,r){var a=0;return t<r.left?a|=1:t>r.right&&(a|=2),e<r.top?a|=8:e>r.bottom&&(a|=4),a}function u(t,e){var r,a,o=e.anchor,n=t;return e.clamp&&(n=function(t,e){for(var r,a,o,n=t.x0,i=t.y0,l=t.x1,u=t.y1,d=s(n,i,e),c=s(l,u,e);d|c&&!(d&c);)8&(r=d||c)?(a=n+(l-n)*(e.top-i)/(u-i),o=e.top):4&r?(a=n+(l-n)*(e.bottom-i)/(u-i),o=e.bottom):2&r?(o=i+(u-i)*(e.right-n)/(l-n),a=e.right):1&r&&(o=i+(u-i)*(e.left-n)/(l-n),a=e.left),r===d?d=s(n=a,i=o,e):c=s(l=a,u=o,e);return{x0:n,x1:l,y0:i,y1:u}}(n,e.area)),"start"===o?(r=n.x0,a=n.y0):"end"===o?(r=n.x1,a=n.y1):(r=(n.x0+n.x1)/2,a=(n.y0+n.y1)/2),function(t,e,r,a,o){switch(o){case"center":r=a=0;break;case"bottom":r=0,a=1;break;case"right":r=1,a=0;break;case"left":r=-1,a=0;break;case"top":r=0,a=-1;break;case"start":r=-r,a=-a;break;case"end":break;default:o*=Math.PI/180,r=Math.cos(o),a=Math.sin(o)}return{x:t,y:e,vx:r,vy:a}}(r,a,t.vx,t.vy,e.align)}var d=function(t,e){var r=(t.startAngle+t.endAngle)/2,a=Math.cos(r),o=Math.sin(r),n=t.innerRadius,i=t.outerRadius;return u({x0:t.x+a*n,y0:t.y+o*n,x1:t.x+a*i,y1:t.y+o*i,vx:a,vy:o},e)},c=function(t,e){var r=l(t,e.origin),a=r.x*t.options.radius,o=r.y*t.options.radius;return u({x0:t.x-a,y0:t.y-o,x1:t.x+a,y1:t.y+o,vx:r.x,vy:r.y},e)},h=function(t,e){var r=l(t,e.origin),a=t.x,o=t.y,n=0,i=0;return t.horizontal?(a=Math.min(t.x,t.base),n=Math.abs(t.base-t.x)):(o=Math.min(t.y,t.base),i=Math.abs(t.base-t.y)),u({x0:a,y0:o+i,x1:a+n,y1:o,vx:r.x,vy:r.y},e)},f=function(t,e){var r=l(t,e.origin);return u({x0:t.x,y0:t.y,x1:t.x,y1:t.y,vx:r.x,vy:r.y},e)},x=function(t){return Math.round(t*r)/r};function v(t,e){var r=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!r)return null;if(void 0!==r.xCenter&&void 0!==r.yCenter)return{x:r.xCenter,y:r.yCenter};var a=r.getBasePixel();return t.horizontal?{x:a,y:null}:{x:null,y:a}}function y(t,e,r){var a=r.backgroundColor,o=r.borderColor,n=r.borderWidth;(a||o&&n)&&(t.beginPath(),function(t,e,r,a,o,n){var i=Math.PI/2;if(n){var l=Math.min(n,o/2,a/2),s=e+l,u=r+l,d=e+a-l,c=r+o-l;t.moveTo(e,u),s<d&&u<c?(t.arc(s,u,l,-Math.PI,-i),t.arc(d,u,l,-i,0),t.arc(d,c,l,0,i),t.arc(s,c,l,i,Math.PI)):s<d?(t.moveTo(s,r),t.arc(d,u,l,-i,i),t.arc(s,u,l,i,Math.PI+i)):u<c?(t.arc(s,u,l,-Math.PI,0),t.arc(s,c,l,0,Math.PI)):t.arc(s,u,l,-Math.PI,Math.PI),t.closePath(),t.moveTo(e,r)}else t.rect(e,r,a,o)}(t,x(e.x)+n/2,x(e.y)+n/2,x(e.w)-n,x(e.h)-n,r.borderRadius),t.closePath(),a&&(t.fillStyle=a,t.fill()),o&&n&&(t.strokeStyle=o,t.lineWidth=n,t.lineJoin="miter",t.stroke()))}function b(t,e,r){var a=t.shadowBlur,o=r.stroked,n=x(r.x),i=x(r.y),l=x(r.w);o&&t.strokeText(e,n,i,l),r.filled&&(a&&o&&(t.shadowBlur=0),t.fillText(e,n,i,l),a&&o&&(t.shadowBlur=a))}var _=function(t,e,r,a){var o=this;o._config=t,o._index=a,o._model=null,o._rects=null,o._ctx=e,o._el=r};t.merge(_.prototype,{_modelize:function(r,a,n,i){var l,s=this,u=s._index,x=t.toFont(t.resolve([n.font,{}],i,u)),y=t.resolve([n.color,e.defaults.color],i,u);return{align:t.resolve([n.align,"center"],i,u),anchor:t.resolve([n.anchor,"center"],i,u),area:i.chart.chartArea,backgroundColor:t.resolve([n.backgroundColor,null],i,u),borderColor:t.resolve([n.borderColor,null],i,u),borderRadius:t.resolve([n.borderRadius,0],i,u),borderWidth:t.resolve([n.borderWidth,0],i,u),clamp:t.resolve([n.clamp,!1],i,u),clip:t.resolve([n.clip,!1],i,u),color:y,display:r,font:x,lines:a,offset:t.resolve([n.offset,0],i,u),opacity:t.resolve([n.opacity,1],i,u),origin:v(s._el,i),padding:t.toPadding(t.resolve([n.padding,0],i,u)),positioner:(l=s._el,l instanceof e.ArcElement?d:l instanceof e.PointElement?c:l instanceof e.BarElement?h:f),rotation:t.resolve([n.rotation,0],i,u)*(Math.PI/180),size:o(s._ctx,a,x),textAlign:t.resolve([n.textAlign,"start"],i,u),textShadowBlur:t.resolve([n.textShadowBlur,0],i,u),textShadowColor:t.resolve([n.textShadowColor,y],i,u),textStrokeColor:t.resolve([n.textStrokeColor,y],i,u),textStrokeWidth:t.resolve([n.textStrokeWidth,0],i,u)}},update:function(e){var r,o,n,i=this,l=null,s=null,u=i._index,d=i._config,c=t.resolve([d.display,!0],e,u);c&&(r=e.dataset.data[u],o=t.valueOrDefault(t.callback(d.formatter,[r,e]),r),(n=t.isNullOrUndef(o)?[]:a(o)).length&&(s=function(t){var e=t.borderWidth||0,r=t.padding,a=t.size.height,o=t.size.width,n=-o/2,i=-a/2;return{frame:{x:n-r.left-e,y:i-r.top-e,w:o+r.width+2*e,h:a+r.height+2*e},text:{x:n,y:i,w:o,h:a}}}(l=i._modelize(c,n,d,e)))),i._model=l,i._rects=s},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(t,e){var r,a=t.ctx,o=this._model,i=this._rects;this.visible()&&(a.save(),o.clip&&(r=o.area,a.beginPath(),a.rect(r.left,r.top,r.right-r.left,r.bottom-r.top),a.clip()),a.globalAlpha=n(0,o.opacity,1),a.translate(x(e.x),x(e.y)),a.rotate(o.rotation),y(a,i.frame,o),function(t,e,r,a){var o,n=a.textAlign,i=a.color,l=!!i,s=a.font,u=e.length,d=a.textStrokeColor,c=a.textStrokeWidth,h=d&&c;if(u&&(l||h))for(r=function(t,e,r){var a=r.lineHeight,o=t.w,n=t.x;return"center"===e?n+=o/2:"end"!==e&&"right"!==e||(n+=o),{h:a,w:o,x:n,y:t.y+a/2}}(r,n,s),t.font=s.string,t.textAlign=n,t.textBaseline="middle",t.shadowBlur=a.textShadowBlur,t.shadowColor=a.textShadowColor,l&&(t.fillStyle=i),h&&(t.lineJoin="round",t.lineWidth=c,t.strokeStyle=d),o=0,u=e.length;o<u;++o)b(t,e[o],{stroked:h,filled:l,w:r.w,x:r.x,y:r.y+r.h*o})}(a,o.lines,i.text,o),a.restore())}});var p=Number.MIN_SAFE_INTEGER||-9007199254740991,g=Number.MAX_SAFE_INTEGER||9007199254740991;function m(t,e,r){var a=Math.cos(r),o=Math.sin(r),n=e.x,i=e.y;return{x:n+a*(t.x-n)-o*(t.y-i),y:i+o*(t.x-n)+a*(t.y-i)}}function w(t,e){var r,a,o,n,i,l=g,s=p,u=e.origin;for(r=0;r<t.length;++r)o=(a=t[r]).x-u.x,n=a.y-u.y,i=e.vx*o+e.vy*n,l=Math.min(l,i),s=Math.max(s,i);return{min:l,max:s}}function M(t,e){var r=e.x-t.x,a=e.y-t.y,o=Math.sqrt(r*r+a*a);return{vx:(e.x-t.x)/o,vy:(e.y-t.y)/o,origin:t,ln:o}}var k=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};function $(t,e,r){var a=e.positioner(t,e),o=a.vx,n=a.vy;if(!o&&!n)return{x:a.x,y:a.y};var i=r.w,l=r.h,s=e.rotation,u=Math.abs(i/2*Math.cos(s))+Math.abs(l/2*Math.sin(s)),d=Math.abs(i/2*Math.sin(s))+Math.abs(l/2*Math.cos(s)),c=1/Math.max(Math.abs(o),Math.abs(n));return u*=o*c,d*=n*c,u+=e.offset*o,d+=e.offset*n,{x:a.x+u,y:a.y+d}}t.merge(k.prototype,{center:function(){var t=this._rect;return{x:t.x+t.w/2,y:t.y+t.h/2}},update:function(t,e,r){this._rotation=r,this._rect={x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},contains:function(t){var e=this,r=e._rect;return!((t=m(t,e.center(),-e._rotation)).x<r.x-1||t.y<r.y-1||t.x>r.x+r.w+2||t.y>r.y+r.h+2)},intersects:function(t){var e,r,a,o=this._points(),n=t._points(),i=[M(o[0],o[1]),M(o[0],o[3])];for(this._rotation!==t._rotation&&i.push(M(n[0],n[1]),M(n[0],n[3])),e=0;e<i.length;++e)if(r=w(o,i[e]),a=w(n,i[e]),r.max<a.min||a.max<r.min)return!1;return!0},_points:function(){var t=this,e=t._rect,r=t._rotation,a=t.center();return[m({x:e.x,y:e.y},a,r),m({x:e.x+e.w,y:e.y},a,r),m({x:e.x+e.w,y:e.y+e.h},a,r),m({x:e.x,y:e.y+e.h},a,r)]}});var C={prepare:function(t){var e,r,a,o,n,i=[];for(e=0,a=t.length;e<a;++e)for(r=0,o=t[e].length;r<o;++r)n=t[e][r],i.push(n),n.$layout={_box:new k,_hidable:!1,_visible:!0,_set:e,_idx:r};return i.sort((function(t,e){var r=t.$layout,a=e.$layout;return r._idx===a._idx?a._set-r._set:a._idx-r._idx})),this.update(i),i},update:function(t){var e,r,a,o,n,i=!1;for(e=0,r=t.length;e<r;++e)o=(a=t[e]).model(),(n=a.$layout)._hidable=o&&"auto"===o.display,n._visible=a.visible(),i|=n._hidable;i&&function(t){var e,r,a,o,n,i;for(e=0,r=t.length;e<r;++e)(o=(a=t[e]).$layout)._visible&&(n=a.geometry(),i=$(a._el,a.model(),n),o._box.update(i,n,a.rotation()));(function(t,e){var r,a,o,n;for(r=t.length-1;r>=0;--r)for(o=t[r].$layout,a=r-1;a>=0&&o._visible;--a)(n=t[a].$layout)._visible&&o._box.intersects(n._box)&&e(o,n)})(t,(function(t,e){var r=t._hidable,a=e._hidable;r&&a||a?e._visible=!1:r&&(t._visible=!1)}))}(t)},lookup:function(t,e){var r,a;for(r=t.length-1;r>=0;--r)if((a=t[r].$layout)&&a._visible&&a._box.contains(e))return t[r];return null},draw:function(t,e){var r,a,o,n,i,l;for(r=0,a=e.length;r<a;++r)(n=(o=e[r]).$layout)._visible&&(i=o.geometry(),l=$(o._el,o.model(),i),n._box.update(l,i,o.rotation()),o.draw(t,l))}},S="$default";function P(e,r,a){if(r){var o,n=a.$context,i=a.$groups;r[i._set]&&(o=r[i._set][i._key])&&!0===t.callback(o,[n])&&(e.$datalabels._dirty=!0,a.update(n))}}function I(t,e){var r,a,o=t.$datalabels,n=o._listeners;if(n.enter||n.leave){if("mousemove"===e.type)a=C.lookup(o._labels,e);else if("mouseout"!==e.type)return;r=o._hovered,o._hovered=a,function(t,e,r,a){var o,n;(r||a)&&(r?a?r!==a&&(n=o=!0):n=!0:o=!0,n&&P(t,e.leave,r),o&&P(t,e.enter,a))}(t,n,r,a)}}return{id:"datalabels",defaults:{align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:function(e){if(t.isNullOrUndef(e))return null;var r,a,o,n=e;if(t.isObject(e))if(t.isNullOrUndef(e.label))if(t.isNullOrUndef(e.r))for(n="",o=0,a=(r=Object.keys(e)).length;o<a;++o)n+=(0!==o?", ":"")+r[o]+": "+e[r[o]];else n=e.r;else n=e.label;return""+n},labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},beforeInit:function(t){t.$datalabels={_actives:[]}},beforeUpdate:function(t){var e=t.$datalabels;e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(e,r,a){var o,n,i,l,s,u,d,c,h=r.index,f=e.$datalabels,x=f._datasets[h]=[],v=e.isDatasetVisible(h),y=e.data.datasets[h],b=function(e,r){var a,o,n,i=e.datalabels,l=[];return!1===i?null:(!0===i&&(i={}),r=t.merge({},[r,i]),o=r.labels||{},n=Object.keys(o),delete r.labels,n.length?n.forEach((function(e){o[e]&&l.push(t.merge({},[r,o[e],{_key:e}]))})):l.push(r),a=l.reduce((function(e,r){return t.each(r.listeners||{},(function(t,a){e[a]=e[a]||{},e[a][r._key||S]=t})),delete r.listeners,e}),{}),{labels:l,listeners:a})}(y,a),p=r.meta.data||[],g=e.ctx;for(g.save(),o=0,i=p.length;o<i;++o)if((d=p[o]).$datalabels=[],v&&d&&e.getDataVisibility(o)&&!d.skip)for(n=0,l=b.labels.length;n<l;++n)u=(s=b.labels[n])._key,(c=new _(s,g,d,o)).$groups={_set:h,_key:u||S},c.$context={active:!1,chart:e,dataIndex:o,dataset:y,datasetIndex:h},c.update(c.$context),d.$datalabels.push(c),x.push(c);g.restore(),t.merge(f._listeners,b.listeners,{merger:function(t,e,a){e[t]=e[t]||{},e[t][r.index]=a[t],f._listened=!0}})},afterUpdate:function(t,e){t.$datalabels._labels=C.prepare(t.$datalabels._datasets,e)},afterDatasetsDraw:function(t){C.draw(t,t.$datalabels._labels)},beforeEvent:function(t,e){if(t.$datalabels._listened){var r=e.event;switch(r.type){case"mousemove":case"mouseout":I(t,r);break;case"click":!function(t,e){var r=t.$datalabels,a=r._listeners.click,o=a&&C.lookup(r._labels,e);o&&P(t,a,o)}(t,r)}}},afterEvent:function(t){var e,r,a,o,n,l,s,u=t.$datalabels,d=u._actives,c=u._actives=t.getActiveElements(),h=i(d,c);for(e=0,r=h.length;e<r;++e)if((n=h[e])[1])for(a=0,o=(s=n[0].element.$datalabels||[]).length;a<o;++a)(l=s[a]).$context.active=1===n[1],l.update(l.$context);(u._dirty||h.length)&&(C.update(u._labels),t.render()),delete u._dirty}}}));
|
includes/admin/js/moment.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
!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 f(){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 m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(m(e,t))return;return 1}function r(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){for(var n=[],s=0;s<e.length;++s)n.push(t(e[s],s));return n}function c(e,t){for(var n in t)m(t,n)&&(e[n]=t[n]);return m(t,"toString")&&(e.toString=t.toString),m(t,"valueOf")&&(e.valueOf=t.valueOf),e}function _(e,t,n,s){return xt(e,t,n,s,!0).utc()}function y(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function g(e){if(null==e._isValid){var t=y(e),n=i.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function w(e){var t=_(NaN);return null!=e?c(y(t),e):y(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var p=f.momentProperties=[],t=!1;function v(e,t){var n,s,i;if(r(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),r(t._i)||(e._i=t._i),r(t._f)||(e._f=t._f),r(t._l)||(e._l=t._l),r(t._strict)||(e._strict=t._strict),r(t._tzm)||(e._tzm=t._tzm),r(t._isUTC)||(e._isUTC=t._isUTC),r(t._offset)||(e._offset=t._offset),r(t._pf)||(e._pf=y(t)),r(t._locale)||(e._locale=t._locale),0<p.length)for(n=0;n<p.length;n++)r(i=t[s=p[n]])||(e[s]=i);return e}function k(e){v(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===t&&(t=!0,f.updateOffset(this),t=!1)}function M(e){return e instanceof k||null!=e&&null!=e._isAMomentObject}function D(e){!1===f.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function n(i,r){var a=!0;return c(function(){if(null!=f.deprecationHandler&&f.deprecationHandler(null,i),a){for(var e,t,n=[],s=0;s<arguments.length;s++){if(e="","object"==typeof arguments[s]){for(t in e+="\n["+s+"] ",arguments[0])m(arguments[0],t)&&(e+=t+": "+arguments[0][t]+", ");e=e.slice(0,-2)}else e=arguments[s];n.push(e)}D(i+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var s,S={};function Y(e,t){null!=f.deprecationHandler&&f.deprecationHandler(e,t),S[e]||(D(t),S[e]=!0)}function O(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e,t){var n,s=c({},e);for(n in t)m(t,n)&&(u(e[n])&&u(t[n])?(s[n]={},c(s[n],e[n]),c(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)m(e,n)&&!m(t,n)&&u(e[n])&&(s[n]=c({},s[n]));return s}function x(e){null!=e&&this.set(e)}f.suppressDeprecationWarnings=!1,f.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)m(e,t)&&n.push(t);return n};function T(e,t,n){var s=""+Math.abs(e),i=t-s.length;return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,P=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,R={},W={};function C(e,t,n,s){var i="string"==typeof s?function(){return this[s]()}:s;e&&(W[e]=i),t&&(W[t[0]]=function(){return T(i.apply(this,arguments),t[1],t[2])}),n&&(W[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=H(t,e.localeData()),R[t]=R[t]||function(s){for(var e,i=s.match(N),t=0,r=i.length;t<r;t++)W[i[t]]?i[t]=W[i[t]]:i[t]=(e=i[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var t="",n=0;n<r;n++)t+=O(i[n])?i[n].call(e,s):i[n];return t}}(t),R[t](e)):e.localeData().invalidDate()}function H(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(P.lastIndex=0;0<=n&&P.test(e);)e=e.replace(P,s),P.lastIndex=0,--n;return e}var F={};function L(e,t){var n=e.toLowerCase();F[n]=F[n+"s"]=F[t]=e}function V(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function G(e){var t,n,s={};for(n in e)m(e,n)&&(t=V(n))&&(s[t]=e[n]);return s}var E={};function A(e,t){E[e]=t}function j(e){return e%4==0&&e%100!=0||e%400==0}function I(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Z(e){var t=+e,n=0;return 0!=t&&isFinite(t)&&(n=I(t)),n}function z(t,n){return function(e){return null!=e?(q(this,t,e),f.updateOffset(this,n),this):$(this,t)}}function $(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function q(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&j(e.year())&&1===e.month()&&29===e.date()?(n=Z(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),xe(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var B,J=/\d/,Q=/\d\d/,X=/\d{3}/,K=/\d{4}/,ee=/[+-]?\d{6}/,te=/\d\d?/,ne=/\d\d\d\d?/,se=/\d\d\d\d\d\d?/,ie=/\d{1,3}/,re=/\d{1,4}/,ae=/[+-]?\d{1,6}/,oe=/\d+/,ue=/[+-]?\d+/,le=/Z|[+-]\d\d:?\d\d/gi,he=/Z|[+-]\d\d(?::?\d\d)?/gi,de=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function ce(e,n,s){B[e]=O(n)?n:function(e,t){return e&&s?s:n}}function fe(e,t){return m(B,e)?B[e](t._strict,t._locale):new RegExp(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}B={};var _e={};function ye(e,n){var t,s=n;for("string"==typeof e&&(e=[e]),h(n)&&(s=function(e,t){t[n]=Z(e)}),t=0;t<e.length;t++)_e[e[t]]=s}function ge(e,i){ye(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var we,pe=0,ve=1,ke=2,Me=3,De=4,Se=5,Ye=6,Oe=7,be=8;function xe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1==s?j(e)?29:28:31-s%7%2}we=Array.prototype.indexOf?Array.prototype.indexOf:function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},C("M",["MM",2],"Mo",function(){return this.month()+1}),C("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),C("MMMM",0,0,function(e){return this.localeData().months(this,e)}),L("month","M"),A("month",8),ce("M",te),ce("MM",te,Q),ce("MMM",function(e,t){return t.monthsShortRegex(e)}),ce("MMMM",function(e,t){return t.monthsRegex(e)}),ye(["M","MM"],function(e,t){t[ve]=Z(e)-1}),ye(["MMM","MMMM"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[ve]=i:y(n).invalidMonth=e});var Te="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ne="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Pe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Re=de,We=de;function Ce(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=Z(t);else if(!h(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),xe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Ue(e){return null!=e?(Ce(this,e),f.updateOffset(this,!0),this):$(this,"Month")}function He(){function e(e,t){return t.length-e.length}for(var t,n=[],s=[],i=[],r=0;r<12;r++)t=_([2e3,r]),n.push(this.monthsShort(t,"")),s.push(this.months(t,"")),i.push(this.months(t,"")),i.push(this.monthsShort(t,""));for(n.sort(e),s.sort(e),i.sort(e),r=0;r<12;r++)n[r]=me(n[r]),s[r]=me(s[r]);for(r=0;r<24;r++)i[r]=me(i[r]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Fe(e){return j(e)?366:365}C("Y",0,0,function(){var e=this.year();return e<=9999?T(e,4):"+"+e}),C(0,["YY",2],0,function(){return this.year()%100}),C(0,["YYYY",4],0,"year"),C(0,["YYYYY",5],0,"year"),C(0,["YYYYYY",6,!0],0,"year"),L("year","y"),A("year",1),ce("Y",ue),ce("YY",te,Q),ce("YYYY",re,K),ce("YYYYY",ae,ee),ce("YYYYYY",ae,ee),ye(["YYYYY","YYYYYY"],pe),ye("YYYY",function(e,t){t[pe]=2===e.length?f.parseTwoDigitYear(e):Z(e)}),ye("YY",function(e,t){t[pe]=f.parseTwoDigitYear(e)}),ye("Y",function(e,t){t[pe]=parseInt(e,10)}),f.parseTwoDigitYear=function(e){return Z(e)+(68<Z(e)?1900:2e3)};var Le=z("FullYear",!0);function Ve(e){var t,n;return e<100&&0<=e?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ge(e,t,n){var s=7+t-n;return s-(7+Ve(e,0,s).getUTCDay()-t)%7-1}function Ee(e,t,n,s,i){var r,a=1+7*(t-1)+(7+n-s)%7+Ge(e,s,i),o=a<=0?Fe(r=e-1)+a:a>Fe(e)?(r=e+1,a-Fe(e)):(r=e,a);return{year:r,dayOfYear:o}}function Ae(e,t,n){var s,i,r=Ge(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+je(i=e.year()-1,t,n):a>je(e.year(),t,n)?(s=a-je(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function je(e,t,n){var s=Ge(e,t,n),i=Ge(e+1,t,n);return(Fe(e)-s+i)/7}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),A("week",5),A("isoWeek",5),ce("w",te),ce("ww",te,Q),ce("W",te),ce("WW",te,Q),ge(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=Z(e)});function Ie(e,t){return e.slice(t,7).concat(e.slice(0,t))}C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),ce("d",te),ce("e",te),ce("E",te),ce("dd",function(e,t){return t.weekdaysMinRegex(e)}),ce("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ce("dddd",function(e,t){return t.weekdaysRegex(e)}),ge(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:y(n).invalidWeekday=e}),ge(["d","e","E"],function(e,t,n,s){t[s]=Z(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),qe=de,Be=de,Je=de;function Qe(){function e(e,t){return t.length-e.length}for(var t,n,s,i,r=[],a=[],o=[],u=[],l=0;l<7;l++)t=_([2e3,1]).day(l),n=me(this.weekdaysMin(t,"")),s=me(this.weekdaysShort(t,"")),i=me(this.weekdays(t,"")),r.push(n),a.push(s),o.push(i),u.push(n),u.push(s),u.push(i);r.sort(e),a.sort(e),o.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,Xe),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)}),C("hmmss",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),L("hour","h"),A("hour",13),ce("a",et),ce("A",et),ce("H",te),ce("h",te),ce("k",te),ce("HH",te,Q),ce("hh",te,Q),ce("kk",te,Q),ce("hmm",ne),ce("hmmss",se),ce("Hmm",ne),ce("Hmmss",se),ye(["H","HH"],Me),ye(["k","kk"],function(e,t,n){var s=Z(e);t[Me]=24===s?0:s}),ye(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ye(["h","hh"],function(e,t,n){t[Me]=Z(e),y(n).bigHour=!0}),ye("hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s)),y(n).bigHour=!0}),ye("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i)),y(n).bigHour=!0}),ye("Hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s))}),ye("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i))});var tt=z("Hours",!0);var nt,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",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:Ne,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){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=at(e[r]).split("-")).length,n=(n=at(e[r+1]))?n.split("-"):null;0<t;){if(s=ut(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s<n;s+=1)if(e[s]!==t[s])return s;return n}(i,n)>=t-1)break;t--}r++}return nt}function ut(t){var e;if(void 0===it[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=nt._abbr,require("./locale/"+t),lt(e)}catch(e){it[t]=null}return it[t]}function lt(e,t){var n;return e&&((n=r(t)?dt(e):ht(e,t))?nt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nt._abbr}function ht(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])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."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ut(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 x(b(s,t)),rt[e]&&rt[e].forEach(function(e){ht(e.name,e.config)}),lt(e),it[e]}function dt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nt;if(!o(e)){if(t=ut(e))return t;e=[e]}return ot(e)}function ct(e){var t,n=e._a;return n&&-2===y(e).overflow&&(t=n[ve]<0||11<n[ve]?ve:n[ke]<1||n[ke]>xe(n[pe],n[ve])?ke:n[Me]<0||24<n[Me]||24===n[Me]&&(0!==n[De]||0!==n[Se]||0!==n[Ye])?Me:n[De]<0||59<n[De]?De:n[Se]<0||59<n[Se]?Se:n[Ye]<0||999<n[Ye]?Ye:-1,y(e)._overflowDayOfYear&&(t<pe||ke<t)&&(t=ke),y(e)._overflowWeeks&&-1===t&&(t=Oe),y(e)._overflowWeekday&&-1===t&&(t=be),y(e).overflow=t),e}var ft=/^\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)?)?$/,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=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["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}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],gt=[["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/]],wt=/^\/?Date\((-?\d+)/i,pt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,vt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function kt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(y(e).iso=!0,t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(u[1])){i=yt[t][0],s=!1!==yt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=gt.length;t<n;t++)if(gt[t][1].exec(u[3])){r=(u[2]||" ")+gt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!_t.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),Ot(e)}else e._isValid=!1}function Mt(e,t,n,s,i,r){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),Ne.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&a.push(parseInt(r,10)),a}function Dt(e){var t,n,s,i,r=pt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(r){if(t=Mt(r[4],r[3],r[2],r[5],r[6],r[7]),n=r[1],s=t,i=e,n&&ze.indexOf(n)!==new Date(s[0],s[1],s[2]).getDay()&&(y(i).weekdayMismatch=!0,!void(i._isValid=!1)))return;e._a=t,e._tzm=function(e,t,n){if(e)return vt[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return 60*((s-i)/100)+i}(r[8],r[9],r[10]),e._d=Ve.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),y(e).rfc2822=!0}else e._isValid=!1}function St(e,t,n){return null!=e?e:null!=t?t:n}function Yt(e){var t,n,s,i,r,a,o,u=[];if(!e._d){for(a=e,o=new Date(f.now()),s=a._useUTC?[o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()]:[o.getFullYear(),o.getMonth(),o.getDate()],e._w&&null==e._a[ke]&&null==e._a[ve]&&function(e){var t,n,s,i,r,a,o,u,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(r=1,a=4,n=St(t.GG,e._a[pe],Ae(Tt(),1,4).year),s=St(t.W,1),((i=St(t.E,1))<1||7<i)&&(u=!0)):(r=e._locale._week.dow,a=e._locale._week.doy,l=Ae(Tt(),r,a),n=St(t.gg,e._a[pe],l.year),s=St(t.w,l.week),null!=t.d?((i=t.d)<0||6<i)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(u=!0)):i=r);s<1||s>je(n,r,a)?y(e)._overflowWeeks=!0:null!=u?y(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[pe]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=St(e._a[pe],s[pe]),(e._dayOfYear>Fe(r)||0===e._dayOfYear)&&(y(e)._overflowDayOfYear=!0),n=Ve(r,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[ke]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=u[t]=s[t];for(;t<7;t++)e._a[t]=u[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Me]&&0===e._a[De]&&0===e._a[Se]&&0===e._a[Ye]&&(e._nextDay=!0,e._a[Me]=0),e._d=(e._useUTC?Ve: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,u),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Me]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(y(e).weekdayMismatch=!0)}}function Ot(e){if(e._f!==f.ISO_8601)if(e._f!==f.RFC_2822){e._a=[],y(e).empty=!0;for(var t,n,s,i,r,a,o,u=""+e._i,l=u.length,h=0,d=H(e._f,e._locale).match(N)||[],c=0;c<d.length;c++)n=d[c],(t=(u.match(fe(n,e))||[])[0])&&(0<(s=u.substr(0,u.indexOf(t))).length&&y(e).unusedInput.push(s),u=u.slice(u.indexOf(t)+t.length),h+=t.length),W[n]?(t?y(e).empty=!1:y(e).unusedTokens.push(n),r=n,o=e,null!=(a=t)&&m(_e,r)&&_e[r](a,o._a,o,r)):e._strict&&!t&&y(e).unusedTokens.push(n);y(e).charsLeftOver=l-h,0<u.length&&y(e).unusedInput.push(u),e._a[Me]<=12&&!0===y(e).bigHour&&0<e._a[Me]&&(y(e).bigHour=void 0),y(e).parsedDateParts=e._a.slice(0),y(e).meridiem=e._meridiem,e._a[Me]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0)),t)}(e._locale,e._a[Me],e._meridiem),null!==(i=y(e).era)&&(e._a[pe]=e._locale.erasConvertYear(i,e._a[pe])),Yt(e),ct(e)}else Dt(e);else kt(e)}function bt(e){var t,n,s=e._i,i=e._f;return e._locale=e._locale||dt(e._l),null===s||void 0===i&&""===s?w({nullInput:!0}):("string"==typeof s&&(e._i=s=e._locale.preparse(s)),M(s)?new k(ct(s)):(a(s)?e._d=s:o(i)?function(e){var t,n,s,i,r,a,o=!1;if(0===e._f.length)return y(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,a=!1,t=v({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Ot(t),g(t)&&(a=!0),r+=y(t).charsLeftOver,r+=10*y(t).unusedTokens.length,y(t).score=r,o?r<s&&(s=r,n=t):(null==s||r<s||a)&&(s=r,n=t,a&&(o=!0));c(e,n||t)}(e):i?Ot(e):r(n=(t=e)._i)?t._d=new Date(f.now()):a(n)?t._d=new Date(n.valueOf()):"string"==typeof n?function(e){var t=wt.exec(e._i);null===t?(kt(e),!1===e._isValid&&(delete e._isValid,Dt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:f.createFromInputFallback(e)))):e._d=new Date(+t[1])}(t):o(n)?(t._a=d(n.slice(0),function(e){return parseInt(e,10)}),Yt(t)):u(n)?function(e){var t,n;e._d||(n=void 0===(t=G(e._i)).day?t.date:t.day,e._a=d([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Yt(e))}(t):h(n)?t._d=new Date(n):f.createFromInputFallback(t),g(e)||(e._d=null),e))}function xt(e,t,n,s,i){var r,a={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(u(e)&&l(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=s,(r=new k(ct(bt(a))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function Tt(e,t,n,s){return xt(e,t,n,s,!1)}f.createFromInputFallback=n("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),f.ISO_8601=function(){},f.RFC_2822=function(){};var Nt=n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:w()}),Pt=n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:w()});function Rt(e,t){var n,s;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ct(e){var t=G(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,u=t.minute||0,l=t.second||0,h=t.millisecond||0;this._isValid=function(e){var t,n,s=!1;for(t in e)if(m(e,t)&&(-1===we.call(Wt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<Wt.length;++n)if(e[Wt[n]]){if(s)return!1;parseFloat(e[Wt[n]])!==Z(e[Wt[n]])&&(s=!0)}return!0}(t),this._milliseconds=+h+1e3*l+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=dt(),this._bubble()}function Ut(e){return e instanceof Ct}function Ht(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){C(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+T(~~(e/60),2)+n+T(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),ce("Z",he),ce("ZZ",he),ye(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Vt(he,e)});var Lt=/([\+\-]|\d\d)/gi;function Vt(e,t){var n,s,i=(t||"").match(e);return null===i?null:0===(s=60*(n=((i[i.length-1]||[])+"").match(Lt)||["-",0,0])[1]+Z(n[2]))?0:"+"===n[0]?s:-s}function Gt(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(M(e)||a(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),f.updateOffset(n,!1),n):Tt(e).local()}function Et(e){return-Math.round(e._d.getTimezoneOffset())}function At(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}f.updateOffset=function(){};var jt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,It=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Zt(e,t){var n,s,i,r=e,a=null;return Ut(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:h(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(a=jt.exec(e))?(n="-"===a[1]?-1:1,r={y:0,d:Z(a[ke])*n,h:Z(a[Me])*n,m:Z(a[De])*n,s:Z(a[Se])*n,ms:Z(Ht(1e3*a[Ye]))*n}):(a=It.exec(e))?(n="-"===a[1]?-1:1,r={y:zt(a[2],n),M:zt(a[3],n),w:zt(a[4],n),d:zt(a[5],n),h:zt(a[6],n),m:zt(a[7],n),s:zt(a[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Gt(t,e),e.isBefore(t)?n=$t(e,t):((n=$t(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Tt(r.from),Tt(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),s=new Ct(r),Ut(e)&&m(e,"_locale")&&(s._locale=e._locale),Ut(e)&&m(e,"_isValid")&&(s._isValid=e._isValid),s}function zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function $t(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=t-e.clone().add(n.months,"M"),n}function qt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Y(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),Bt(this,Zt(e,t),s),this}}function Bt(e,t,n,s){var i=t._milliseconds,r=Ht(t._days),a=Ht(t._months);e.isValid()&&(s=null==s||s,a&&Ce(e,$(e,"Month")+a*n),r&&q(e,"Date",$(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&f.updateOffset(e,r||a))}Zt.fn=Ct.prototype,Zt.invalid=function(){return Zt(NaN)};var Jt=qt(1,"add"),Qt=qt(-1,"subtract");function Xt(e){return"string"==typeof e||e instanceof String}function Kt(e){return M(e)||a(e)||Xt(e)||h(e)||function(t){var e=o(t),n=!1;e&&(n=0===t.filter(function(e){return!h(e)&&Xt(t)}).length);return e&&n}(e)||function(e){var t,n,s=u(e)&&!l(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<r.length;t+=1)n=r[t],i=i||m(e,n);return s&&i}(e)||null==e}function en(e,t){if(e.date()<t.date())return-en(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months"),i=t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(1+n,"months")-s);return-(n+i)||0}function tn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=dt(e))&&(this._locale=t),this)}f.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",f.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var nn=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function sn(){return this._locale}var rn=126227808e5;function an(e,t){return(e%t+t)%t}function on(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-rn:new Date(e,t,n).valueOf()}function un(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-rn:Date.UTC(e,t,n)}function ln(e,t){return t.erasAbbrRegex(e)}function hn(){for(var e=[],t=[],n=[],s=[],i=this.eras(),r=0,a=i.length;r<a;++r)t.push(me(i[r].name)),e.push(me(i[r].abbr)),n.push(me(i[r].narrow)),s.push(me(i[r].name)),s.push(me(i[r].abbr)),s.push(me(i[r].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}function dn(e,t){C(0,[e,e.length],0,t)}function cn(e,t,n,s,i){var r;return null==e?Ae(this,s,i).year:((r=je(e,s,i))<t&&(t=r),function(e,t,n,s,i){var r=Ee(e,t,n,s,i),a=Ve(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}C("N",0,0,"eraAbbr"),C("NN",0,0,"eraAbbr"),C("NNN",0,0,"eraAbbr"),C("NNNN",0,0,"eraName"),C("NNNNN",0,0,"eraNarrow"),C("y",["y",1],"yo","eraYear"),C("y",["yy",2],0,"eraYear"),C("y",["yyy",3],0,"eraYear"),C("y",["yyyy",4],0,"eraYear"),ce("N",ln),ce("NN",ln),ce("NNN",ln),ce("NNNN",function(e,t){return t.erasNameRegex(e)}),ce("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),ye(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){var i=n._locale.erasParse(e,s,n._strict);i?y(n).era=i:y(n).invalidEra=e}),ce("y",oe),ce("yy",oe),ce("yyy",oe),ce("yyyy",oe),ce("yo",function(e,t){return t._eraYearOrdinalRegex||oe}),ye(["y","yy","yyy","yyyy"],pe),ye(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[pe]=n._locale.eraYearOrdinalParse(e,i):t[pe]=parseInt(e,10)}),C(0,["gg",2],0,function(){return this.weekYear()%100}),C(0,["GG",2],0,function(){return this.isoWeekYear()%100}),dn("gggg","weekYear"),dn("ggggg","weekYear"),dn("GGGG","isoWeekYear"),dn("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),A("weekYear",1),A("isoWeekYear",1),ce("G",ue),ce("g",ue),ce("GG",te,Q),ce("gg",te,Q),ce("GGGG",re,K),ce("gggg",re,K),ce("GGGGG",ae,ee),ce("ggggg",ae,ee),ge(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=Z(e)}),ge(["gg","GG"],function(e,t,n,s){t[s]=f.parseTwoDigitYear(e)}),C("Q",0,"Qo","quarter"),L("quarter","Q"),A("quarter",7),ce("Q",J),ye("Q",function(e,t){t[ve]=3*(Z(e)-1)}),C("D",["DD",2],"Do","date"),L("date","D"),A("date",9),ce("D",te),ce("DD",te,Q),ce("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ye(["D","DD"],ke),ye("Do",function(e,t){t[ke]=Z(e.match(te)[0])});var fn=z("Date",!0);C("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),A("dayOfYear",4),ce("DDD",ie),ce("DDDD",X),ye(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Z(e)}),C("m",["mm",2],0,"minute"),L("minute","m"),A("minute",14),ce("m",te),ce("mm",te,Q),ye(["m","mm"],De);var mn=z("Minutes",!1);C("s",["ss",2],0,"second"),L("second","s"),A("second",15),ce("s",te),ce("ss",te,Q),ye(["s","ss"],Se);var _n,yn,gn=z("Seconds",!1);for(C("S",0,0,function(){return~~(this.millisecond()/100)}),C(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),C(0,["SSS",3],0,"millisecond"),C(0,["SSSS",4],0,function(){return 10*this.millisecond()}),C(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),C(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),C(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),C(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),C(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),A("millisecond",16),ce("S",ie,J),ce("SS",ie,Q),ce("SSS",ie,X),_n="SSSS";_n.length<=9;_n+="S")ce(_n,oe);function wn(e,t){t[Ye]=Z(1e3*("0."+e))}for(_n="S";_n.length<=9;_n+="S")ye(_n,wn);yn=z("Milliseconds",!1),C("z",0,0,"zoneAbbr"),C("zz",0,0,"zoneName");var pn=k.prototype;function vn(e){return e}pn.add=Jt,pn.calendar=function(e,t){1===arguments.length&&(arguments[0]?Kt(arguments[0])?(e=arguments[0],t=void 0):function(e){for(var t=u(e)&&!l(e),n=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i=0;i<s.length;i+=1)n=n||m(e,s[i]);return t&&n}(arguments[0])&&(t=arguments[0],e=void 0):t=e=void 0);var n=e||Tt(),s=Gt(n,this).startOf("day"),i=f.calendarFormat(this,s)||"sameElse",r=t&&(O(t[i])?t[i].call(this,n):t[i]);return this.format(r||this.localeData().calendar(i,this,Tt(n)))},pn.clone=function(){return new k(this)},pn.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Gt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=V(t)){case"year":r=en(this,s)/12;break;case"month":r=en(this,s);break;case"quarter":r=en(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:I(r)},pn.endOf=function(e){var t,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?un:on,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-an(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-an(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-an(t,1e3)-1;break}return this._d.setTime(t),f.updateOffset(this,!0),this},pn.format=function(e){e=e||(this.isUtc()?f.defaultFormatUtc:f.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},pn.from=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Tt(e).isValid())?Zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},pn.fromNow=function(e){return this.from(Tt(),e)},pn.to=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Tt(e).isValid())?Zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},pn.toNow=function(e){return this.to(Tt(),e)},pn.get=function(e){return O(this[e=V(e)])?this[e]():this},pn.invalidAt=function(){return y(this).overflow},pn.isAfter=function(e,t){var n=M(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},pn.isBefore=function(e,t){var n=M(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},pn.isBetween=function(e,t,n,s){var i=M(e)?e:Tt(e),r=M(t)?t:Tt(t);return!!(this.isValid()&&i.isValid()&&r.isValid())&&(("("===(s=s||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===s[1]?this.isBefore(r,n):!this.isAfter(r,n)))},pn.isSame=function(e,t){var n,s=M(e)?e:Tt(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},pn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},pn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},pn.isValid=function(){return g(this)},pn.lang=nn,pn.locale=tn,pn.localeData=sn,pn.max=Pt,pn.min=Nt,pn.parsingFlags=function(){return c({},y(this))},pn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t,n=[];for(t in e)m(e,t)&&n.push({unit:t,priority:E[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=G(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(O(this[e=V(e)]))return this[e](t);return this},pn.startOf=function(e){var t,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?un:on,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=an(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=an(t,6e4);break;case"second":t=this._d.valueOf(),t-=an(t,1e3);break}return this._d.setTime(t),f.updateOffset(this,!0),this},pn.subtract=Qt,pn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},pn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},pn.toDate=function(){return new Date(this.valueOf())},pn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||9999<n.year()?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(n,"Z")):U(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},pn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,s="moment",i="";return this.isLocal()||(s=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+s+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=i+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(pn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),pn.toJSON=function(){return this.isValid()?this.toISOString():null},pn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},pn.unix=function(){return Math.floor(this.valueOf()/1e3)},pn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},pn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},pn.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].name;if(t[n].until<=e&&e<=t[n].since)return t[n].name}return""},pn.eraNarrow=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].narrow;if(t[n].until<=e&&e<=t[n].since)return t[n].narrow}return""},pn.eraAbbr=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].abbr;if(t[n].until<=e&&e<=t[n].since)return t[n].abbr}return""},pn.eraYear=function(){for(var e,t,n=this.localeData().eras(),s=0,i=n.length;s<i;++s)if(e=n[s].since<=n[s].until?1:-1,t=this.clone().startOf("day").valueOf(),n[s].since<=t&&t<=n[s].until||n[s].until<=t&&t<=n[s].since)return(this.year()-f(n[s].since).year())*e+n[s].offset;return this.year()},pn.year=Le,pn.isLeapYear=function(){return j(this.year())},pn.weekYear=function(e){return cn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},pn.isoWeekYear=function(e){return cn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},pn.quarter=pn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},pn.month=Ue,pn.daysInMonth=function(){return xe(this.year(),this.month())},pn.week=pn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},pn.isoWeek=pn.isoWeeks=function(e){var t=Ae(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},pn.weeksInYear=function(){var e=this.localeData()._week;return je(this.year(),e.dow,e.doy)},pn.weeksInWeekYear=function(){var e=this.localeData()._week;return je(this.weekYear(),e.dow,e.doy)},pn.isoWeeksInYear=function(){return je(this.year(),1,4)},pn.isoWeeksInISOWeekYear=function(){return je(this.isoWeekYear(),1,4)},pn.date=fn,pn.day=pn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d")):s},pn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},pn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null==e)return this.day()||7;var t,n,s=(t=e,n=this.localeData(),"string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t);return this.day(this.day()%7?s:s-7)},pn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},pn.hour=pn.hours=tt,pn.minute=pn.minutes=mn,pn.second=pn.seconds=gn,pn.millisecond=pn.milliseconds=yn,pn.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:Et(this);if("string"==typeof e){if(null===(e=Vt(he,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Et(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?Bt(this,Zt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,f.updateOffset(this,!0),this._changeInProgress=null)),this},pn.utc=function(e){return this.utcOffset(0,e)},pn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Et(this),"m")),this},pn.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=Vt(le,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},pn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},pn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},pn.isLocal=function(){return!!this.isValid()&&!this._isUTC},pn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},pn.isUtc=At,pn.isUTC=At,pn.zoneAbbr=function(){return this._isUTC?"UTC":""},pn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},pn.dates=n("dates accessor is deprecated. Use date instead.",fn),pn.months=n("months accessor is deprecated. Use month instead",Ue),pn.years=n("years accessor is deprecated. Use year instead",Le),pn.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()}),pn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=bt(t))._a?(e=(t._isUTC?_:Tt)(t._a),this._isDSTShifted=this.isValid()&&0<function(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&Z(e[a])!==Z(t[a]))&&r++;return r+i}(t._a,e.toArray())):this._isDSTShifted=!1,this._isDSTShifted});var kn=x.prototype;function Mn(e,t,n,s){var i=dt(),r=_().set(s,t);return i[n](r,e)}function Dn(e,t,n){if(h(e)&&(t=e,e=void 0),e=e||"",null!=t)return Mn(e,t,n,"month");for(var s=[],i=0;i<12;i++)s[i]=Mn(e,i,n,"month");return s}function Sn(e,t,n,s){t=("boolean"==typeof e?h(t)&&(n=t,t=void 0):(t=e,e=!1,h(n=t)&&(n=t,t=void 0)),t||"");var i,r=dt(),a=e?r._week.dow:0,o=[];if(null!=n)return Mn(t,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=Mn(t,(i+a)%7,s,"day");return o}kn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return O(s)?s.call(t,n):s},kn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(N).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},kn.invalidDate=function(){return this._invalidDate},kn.ordinal=function(e){return this._ordinal.replace("%d",e)},kn.preparse=vn,kn.postformat=vn,kn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return O(i)?i(e,t,n,s):i.replace(/%d/i,e)},kn.pastFuture=function(e,t){var n=this._relativeTime[0<e?"future":"past"];return O(n)?n(t):n.replace(/%s/i,t)},kn.set=function(e){var t,n;for(n in e)m(e,n)&&(O(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},kn.eras=function(e,t){for(var n,s=this._eras||dt("en")._eras,i=0,r=s.length;i<r;++i){switch(typeof s[i].since){case"string":n=f(s[i].since).startOf("day"),s[i].since=n.valueOf();break}switch(typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":n=f(s[i].until).startOf("day").valueOf(),s[i].until=n.valueOf();break}}return s},kn.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s];break}else if(0<=[r,a,o].indexOf(e))return u[s]},kn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?f(e.since).year():f(e.since).year()+(t-e.offset)*n},kn.erasAbbrRegex=function(e){return m(this,"_erasAbbrRegex")||hn.call(this),e?this._erasAbbrRegex:this._erasRegex},kn.erasNameRegex=function(e){return m(this,"_erasNameRegex")||hn.call(this),e?this._erasNameRegex:this._erasRegex},kn.erasNarrowRegex=function(e){return m(this,"_erasNarrowRegex")||hn.call(this),e?this._erasNarrowRegex:this._erasRegex},kn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Pe).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},kn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Pe.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},kn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=_([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=we.call(this._shortMonthsParse,a))?i:null:-1!==(i=we.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=we.call(this._shortMonthsParse,a))||-1!==(i=we.call(this._longMonthsParse,a))?i:null:-1!==(i=we.call(this._longMonthsParse,a))||-1!==(i=we.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=_([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},kn.monthsRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||He.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,"_monthsRegex")||(this._monthsRegex=We),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},kn.monthsShortRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||He.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,"_monthsShortRegex")||(this._monthsShortRegex=Re),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},kn.week=function(e){return Ae(e,this._week.dow,this._week.doy).week},kn.firstDayOfYear=function(){return this._week.doy},kn.firstDayOfWeek=function(){return this._week.dow},kn.weekdays=function(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ie(n,this._week.dow):e?n[e.day()]:n},kn.weekdaysMin=function(e){return!0===e?Ie(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},kn.weekdaysShort=function(e){return!0===e?Ie(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},kn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=_([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=we.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=we.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=we.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=we.call(this._weekdaysParse,a))||-1!==(i=we.call(this._shortWeekdaysParse,a))||-1!==(i=we.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=we.call(this._shortWeekdaysParse,a))||-1!==(i=we.call(this._weekdaysParse,a))||-1!==(i=we.call(this._minWeekdaysParse,a))?i:null:-1!==(i=we.call(this._minWeekdaysParse,a))||-1!==(i=we.call(this._weekdaysParse,a))||-1!==(i=we.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=_([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},kn.weekdaysRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,"_weekdaysRegex")||(this._weekdaysRegex=qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},kn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Be),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},kn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},kn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},kn.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},lt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Z(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),f.lang=n("moment.lang is deprecated. Use moment.locale instead.",lt),f.langData=n("moment.langData is deprecated. Use moment.localeData instead.",dt);var Yn=Math.abs;function On(e,t,n,s){var i=Zt(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function bn(e){return e<0?Math.floor(e):Math.ceil(e)}function xn(e){return 4800*e/146097}function Tn(e){return 146097*e/4800}function Nn(e){return function(){return this.as(e)}}var Pn=Nn("ms"),Rn=Nn("s"),Wn=Nn("m"),Cn=Nn("h"),Un=Nn("d"),Hn=Nn("w"),Fn=Nn("M"),Ln=Nn("Q"),Vn=Nn("y");function Gn(e){return function(){return this.isValid()?this._data[e]:NaN}}var En=Gn("milliseconds"),An=Gn("seconds"),jn=Gn("minutes"),In=Gn("hours"),Zn=Gn("days"),zn=Gn("months"),$n=Gn("years");var qn=Math.round,Bn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Jn(e,t,n,s){var i=Zt(e).abs(),r=qn(i.as("s")),a=qn(i.as("m")),o=qn(i.as("h")),u=qn(i.as("d")),l=qn(i.as("M")),h=qn(i.as("w")),d=qn(i.as("y")),c=(r<=n.ss?["s",r]:r<n.s&&["ss",r])||a<=1&&["m"]||a<n.m&&["mm",a]||o<=1&&["h"]||o<n.h&&["hh",o]||u<=1&&["d"]||u<n.d&&["dd",u];return null!=n.w&&(c=c||h<=1&&["w"]||h<n.w&&["ww",h]),(c=c||l<=1&&["M"]||l<n.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=t,c[3]=0<+e,c[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,c)}var Qn=Math.abs;function Xn(e){return(0<e)-(e<0)||+e}function Kn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,s,i,r,a,o,u=Qn(this._milliseconds)/1e3,l=Qn(this._days),h=Qn(this._months),d=this.asSeconds();return d?(e=I(u/60),t=I(e/60),u%=60,e%=60,n=I(h/12),h%=12,s=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",r=Xn(this._months)!==Xn(d)?"-":"",a=Xn(this._days)!==Xn(d)?"-":"",o=Xn(this._milliseconds)!==Xn(d)?"-":"",i+"P"+(n?r+n+"Y":"")+(h?r+h+"M":"")+(l?a+l+"D":"")+(t||e||u?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(u?o+s+"S":"")):"P0D"}var es=Ct.prototype;return es.isValid=function(){return this._isValid},es.abs=function(){var e=this._data;return this._milliseconds=Yn(this._milliseconds),this._days=Yn(this._days),this._months=Yn(this._months),e.milliseconds=Yn(e.milliseconds),e.seconds=Yn(e.seconds),e.minutes=Yn(e.minutes),e.hours=Yn(e.hours),e.months=Yn(e.months),e.years=Yn(e.years),this},es.add=function(e,t){return On(this,e,t,1)},es.subtract=function(e,t){return On(this,e,t,-1)},es.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=V(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+xn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Tn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},es.asMilliseconds=Pn,es.asSeconds=Rn,es.asMinutes=Wn,es.asHours=Cn,es.asDays=Un,es.asWeeks=Hn,es.asMonths=Fn,es.asQuarters=Ln,es.asYears=Vn,es.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*Z(this._months/12):NaN},es._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return 0<=r&&0<=a&&0<=o||r<=0&&a<=0&&o<=0||(r+=864e5*bn(Tn(o)+a),o=a=0),u.milliseconds=r%1e3,e=I(r/1e3),u.seconds=e%60,t=I(e/60),u.minutes=t%60,n=I(t/60),u.hours=n%24,a+=I(n/24),o+=i=I(xn(a)),a-=bn(Tn(i)),s=I(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},es.clone=function(){return Zt(this)},es.get=function(e){return e=V(e),this.isValid()?this[e+"s"]():NaN},es.milliseconds=En,es.seconds=An,es.minutes=jn,es.hours=In,es.days=Zn,es.weeks=function(){return I(this.days()/7)},es.months=zn,es.years=$n,es.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,s,i=!1,r=Bn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(r=Object.assign({},Bn,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),n=this.localeData(),s=Jn(this,!i,r,n),i&&(s=n.pastFuture(+this,s)),n.postformat(s)},es.toISOString=Kn,es.toString=Kn,es.toJSON=Kn,es.locale=tn,es.localeData=sn,es.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Kn),es.lang=nn,C("X",0,0,"unix"),C("x",0,0,"valueOf"),ce("x",ue),ce("X",/[+-]?\d+(\.\d{1,3})?/),ye("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),ye("x",function(e,t,n){n._d=new Date(Z(e))}),f.version="2.29.1",e=Tt,f.fn=pn,f.min=function(){return Rt("isBefore",[].slice.call(arguments,0))},f.max=function(){return Rt("isAfter",[].slice.call(arguments,0))},f.now=function(){return Date.now?Date.now():+new Date},f.utc=_,f.unix=function(e){return Tt(1e3*e)},f.months=function(e,t){return Dn(e,t,"months")},f.isDate=a,f.locale=lt,f.invalid=w,f.duration=Zt,f.isMoment=M,f.weekdays=function(e,t,n){return Sn(e,t,n,"weekdays")},f.parseZone=function(){return Tt.apply(null,arguments).parseZone()},f.localeData=dt,f.isDuration=Ut,f.monthsShort=function(e,t){return Dn(e,t,"monthsShort")},f.weekdaysMin=function(e,t,n){return Sn(e,t,n,"weekdaysMin")},f.defineLocale=ht,f.updateLocale=function(e,t){var n,s,i;return null!=t?(i=st,null!=it[e]&&null!=it[e].parentLocale?it[e].set(b(it[e]._config,t)):(null!=(s=ut(e))&&(i=s._config),t=b(i,t),null==s&&(t.abbr=e),(n=new x(t)).parentLocale=it[e],it[e]=n),lt(e)):null!=it[e]&&(null!=it[e].parentLocale?(it[e]=it[e].parentLocale,e===lt()&<(e)):null!=it[e]&&delete it[e]),it[e]},f.locales=function(){return s(it)},f.weekdaysShort=function(e,t,n){return Sn(e,t,n,"weekdaysShort")},f.normalizeUnits=V,f.relativeTimeRounding=function(e){return void 0===e?qn:"function"==typeof e&&(qn=e,!0)},f.relativeTimeThreshold=function(e,t){return void 0!==Bn[e]&&(void 0===t?Bn[e]:(Bn[e]=t,"s"===e&&(Bn.ss=t-1),!0))},f.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},f.prototype=pn,f.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},f});
|
2 |
+
//# sourceMappingURL=moment.min.js.map
|
includes/admin/register-settings.php
CHANGED
@@ -33,6 +33,10 @@ function tptn_get_option( $key = '', $default = null ) {
|
|
33 |
|
34 |
global $tptn_settings;
|
35 |
|
|
|
|
|
|
|
|
|
36 |
if ( is_null( $default ) ) {
|
37 |
$default = tptn_get_default_option( $key );
|
38 |
}
|
@@ -261,7 +265,7 @@ function tptn_settings_defaults() {
|
|
261 |
$options[ $option['id'] ] = 0;
|
262 |
}
|
263 |
// If an option is set.
|
264 |
-
if ( in_array( $option['type'], array( 'textarea', 'text', 'csv', 'numbercsv', 'posttypes', 'number' ), true ) && isset( $option['options'] ) ) {
|
265 |
$options[ $option['id'] ] = $option['options'];
|
266 |
}
|
267 |
if ( in_array( $option['type'], array( 'multicheck', 'radio', 'select', 'radiodesc', 'thumbsizes' ), true ) && isset( $option['default'] ) ) {
|
33 |
|
34 |
global $tptn_settings;
|
35 |
|
36 |
+
if ( empty( $tptn_settings ) ) {
|
37 |
+
$tptn_settings = tptn_get_settings();
|
38 |
+
}
|
39 |
+
|
40 |
if ( is_null( $default ) ) {
|
41 |
$default = tptn_get_default_option( $key );
|
42 |
}
|
265 |
$options[ $option['id'] ] = 0;
|
266 |
}
|
267 |
// If an option is set.
|
268 |
+
if ( in_array( $option['type'], array( 'textarea', 'text', 'csv', 'numbercsv', 'posttypes', 'number', 'css', 'taxonomies' ), true ) && isset( $option['options'] ) ) {
|
269 |
$options[ $option['id'] ] = $option['options'];
|
270 |
}
|
271 |
if ( in_array( $option['type'], array( 'multicheck', 'radio', 'select', 'radiodesc', 'thumbsizes' ), true ) && isset( $option['default'] ) ) {
|
includes/admin/save-settings.php
CHANGED
@@ -284,6 +284,23 @@ function tptn_sanitize_posttypes_field( $value ) {
|
|
284 |
add_filter( 'tptn_settings_sanitize_posttypes', 'tptn_sanitize_posttypes_field' );
|
285 |
|
286 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
/**
|
288 |
* Sanitize exclude_cat_slugs to save a new entry of exclude_categories
|
289 |
*
|
284 |
add_filter( 'tptn_settings_sanitize_posttypes', 'tptn_sanitize_posttypes_field' );
|
285 |
|
286 |
|
287 |
+
/**
|
288 |
+
* Sanitize taxonomies fields
|
289 |
+
*
|
290 |
+
* @since 3.0.0
|
291 |
+
*
|
292 |
+
* @param array $value The field value.
|
293 |
+
* @return string $value Sanitized value
|
294 |
+
*/
|
295 |
+
function tptn_sanitize_taxonomies_field( $value ) {
|
296 |
+
|
297 |
+
$taxonomies = is_array( $value ) ? array_map( 'sanitize_text_field', wp_unslash( $value ) ) : array();
|
298 |
+
|
299 |
+
return implode( ',', $taxonomies );
|
300 |
+
}
|
301 |
+
add_filter( 'tptn_settings_sanitize_taxonomies', 'tptn_sanitize_taxonomies_field' );
|
302 |
+
|
303 |
+
|
304 |
/**
|
305 |
* Sanitize exclude_cat_slugs to save a new entry of exclude_categories
|
306 |
*
|
includes/admin/settings-page.php
CHANGED
@@ -271,7 +271,7 @@ function tptn_textarea_callback( $args ) {
|
|
271 |
|
272 |
$class = sanitize_html_class( $args['field_class'] );
|
273 |
|
274 |
-
$html = sprintf( '<textarea class="%3$s" cols="50" rows="
|
275 |
$html .= '<p class="description">' . wp_kses_post( $args['desc'] ) . '</p>';
|
276 |
|
277 |
/** This filter has been defined in settings-page.php */
|
@@ -609,6 +609,60 @@ function tptn_posttypes_callback( $args ) {
|
|
609 |
}
|
610 |
|
611 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
612 |
/**
|
613 |
* Function to add an action to search for tags using Ajax.
|
614 |
*
|
271 |
|
272 |
$class = sanitize_html_class( $args['field_class'] );
|
273 |
|
274 |
+
$html = sprintf( '<textarea class="%3$s" cols="50" rows="5" id="tptn_settings[%1$s]" name="tptn_settings[%1$s]">%2$s</textarea>', sanitize_key( $args['id'] ), esc_textarea( stripslashes( $value ) ), 'large-text ' . $class );
|
275 |
$html .= '<p class="description">' . wp_kses_post( $args['desc'] ) . '</p>';
|
276 |
|
277 |
/** This filter has been defined in settings-page.php */
|
609 |
}
|
610 |
|
611 |
|
612 |
+
/**
|
613 |
+
* Display taxonomies fields.
|
614 |
+
*
|
615 |
+
* @since 3.0.0
|
616 |
+
*
|
617 |
+
* @param array $args Array of arguments.
|
618 |
+
* @return void
|
619 |
+
*/
|
620 |
+
function tptn_taxonomies_callback( $args ) {
|
621 |
+
|
622 |
+
global $tptn_settings;
|
623 |
+
$html = '';
|
624 |
+
|
625 |
+
if ( isset( $tptn_settings[ $args['id'] ] ) ) {
|
626 |
+
$options = $tptn_settings[ $args['id'] ];
|
627 |
+
} else {
|
628 |
+
$options = isset( $args['options'] ) ? $args['options'] : '';
|
629 |
+
}
|
630 |
+
|
631 |
+
// If taxonomies is empty or contains a query string then use parse_str else consider it comma-separated.
|
632 |
+
if ( is_array( $options ) ) {
|
633 |
+
$taxonomies = $options;
|
634 |
+
} elseif ( ! is_array( $options ) && false === strpos( $options, '=' ) ) {
|
635 |
+
$taxonomies = explode( ',', $options );
|
636 |
+
} else {
|
637 |
+
parse_str( $options, $taxonomies );
|
638 |
+
}
|
639 |
+
|
640 |
+
/* Fetch taxonomies */
|
641 |
+
$argsc = array(
|
642 |
+
'public' => true,
|
643 |
+
);
|
644 |
+
$output = 'objects';
|
645 |
+
$operator = 'and';
|
646 |
+
$wp_taxonomies = get_taxonomies( $argsc, $output, $operator );
|
647 |
+
|
648 |
+
$taxonomies_inc = array_intersect( wp_list_pluck( (array) $wp_taxonomies, 'name' ), $taxonomies );
|
649 |
+
|
650 |
+
$html .= sprintf( '<input type="hidden" name="tptn_settings[%1$s]" value="-1" />', sanitize_key( $args['id'] ) );
|
651 |
+
|
652 |
+
foreach ( $wp_taxonomies as $wp_taxonomy ) {
|
653 |
+
|
654 |
+
$html .= sprintf( '<input name="tptn_settings[%1$s][%2$s]" id="tptn_settings[%1$s][%2$s]" type="checkbox" value="%2$s" %3$s /> ', sanitize_key( $args['id'] ), esc_attr( $wp_taxonomy->name ), checked( true, in_array( $wp_taxonomy->name, $taxonomies_inc, true ), false ) );
|
655 |
+
$html .= sprintf( '<label for="tptn_settings[%1$s][%2$s]">%3$s (%4$s)</label> <br />', sanitize_key( $args['id'] ), esc_attr( $wp_taxonomy->name ), $wp_taxonomy->labels->name, $wp_taxonomy->name );
|
656 |
+
|
657 |
+
}
|
658 |
+
|
659 |
+
$html .= '<p class="description">' . wp_kses_post( $args['desc'] ) . '</p>';
|
660 |
+
|
661 |
+
/** This filter has been defined in settings-page.php */
|
662 |
+
echo apply_filters( 'tptn_after_setting_output', $html, $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
663 |
+
}
|
664 |
+
|
665 |
+
|
666 |
/**
|
667 |
* Function to add an action to search for tags using Ajax.
|
668 |
*
|
includes/blocks/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
includes/blocks/popular-posts.php
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Functions to register client-side assets (scripts and stylesheets) for the
|
4 |
+
* Gutenberg block.
|
5 |
+
*
|
6 |
+
* @package Top_Ten
|
7 |
+
*/
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Renders the `top-10/popular-posts` block on server.
|
11 |
+
*
|
12 |
+
* @since 3.0.0
|
13 |
+
* @param array $attributes The block attributes.
|
14 |
+
*
|
15 |
+
* @return string Returns the post content with popular posts added.
|
16 |
+
*/
|
17 |
+
function render_tptn_block( $attributes ) {
|
18 |
+
|
19 |
+
$attributes['extra_class'] = $attributes['className'];
|
20 |
+
|
21 |
+
$arguments = array_merge(
|
22 |
+
$attributes,
|
23 |
+
array(
|
24 |
+
'is_block' => 1,
|
25 |
+
)
|
26 |
+
);
|
27 |
+
|
28 |
+
$arguments = wp_parse_args( $attributes['other_attributes'], $arguments );
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Filters arguments passed to get_tptn for the block.
|
32 |
+
*
|
33 |
+
* @since 3.0.0
|
34 |
+
*
|
35 |
+
* @param array $arguments Top 10 block options array.
|
36 |
+
* @param array $attributes Block attributes array.
|
37 |
+
*/
|
38 |
+
$arguments = apply_filters( 'tptn_block_options', $arguments, $attributes );
|
39 |
+
|
40 |
+
return tptn_pop_posts( $arguments );
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Registers all block assets so that they can be enqueued through Gutenberg in
|
45 |
+
* the corresponding context.
|
46 |
+
*
|
47 |
+
* @since 3.0.0
|
48 |
+
*/
|
49 |
+
function tptn_block_init() {
|
50 |
+
// Skip block registration if Gutenberg is not enabled/merged.
|
51 |
+
if ( ! function_exists( 'register_block_type' ) ) {
|
52 |
+
return;
|
53 |
+
}
|
54 |
+
$dir = dirname( __FILE__ );
|
55 |
+
|
56 |
+
$index_js = 'popular-posts/index.min.js';
|
57 |
+
wp_register_script( // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.NotInFooter
|
58 |
+
'popular-posts-block-editor',
|
59 |
+
plugins_url( $index_js, __FILE__ ),
|
60 |
+
array(
|
61 |
+
'wp-blocks',
|
62 |
+
'wp-i18n',
|
63 |
+
'wp-element',
|
64 |
+
'wp-components',
|
65 |
+
'wp-block-editor',
|
66 |
+
'wp-editor',
|
67 |
+
),
|
68 |
+
filemtime( "$dir/$index_js" )
|
69 |
+
);
|
70 |
+
|
71 |
+
$style_array = tptn_get_style();
|
72 |
+
|
73 |
+
if ( ! empty( $style_array ) ) {
|
74 |
+
$style = $style_array['name'];
|
75 |
+
$extra_css = $style_array['extra_css'];
|
76 |
+
|
77 |
+
wp_register_style(
|
78 |
+
'popular-posts-block-editor',
|
79 |
+
plugins_url( "css/{$style}.min.css", TOP_TEN_PLUGIN_FILE ),
|
80 |
+
array( 'wp-edit-blocks' ),
|
81 |
+
'1.0'
|
82 |
+
);
|
83 |
+
wp_add_inline_style( 'popular-posts-block-editor', $extra_css );
|
84 |
+
}
|
85 |
+
|
86 |
+
$args = array(
|
87 |
+
'editor_script' => 'popular-posts-block-editor',
|
88 |
+
'render_callback' => 'render_tptn_block',
|
89 |
+
'attributes' => array(
|
90 |
+
'className' => array(
|
91 |
+
'type' => 'string',
|
92 |
+
'default' => '',
|
93 |
+
),
|
94 |
+
'heading' => array(
|
95 |
+
'type' => 'boolean',
|
96 |
+
'default' => false,
|
97 |
+
),
|
98 |
+
'daily' => array(
|
99 |
+
'type' => 'boolean',
|
100 |
+
'default' => false,
|
101 |
+
),
|
102 |
+
'daily_range' => array(
|
103 |
+
'type' => 'number',
|
104 |
+
'default' => 1,
|
105 |
+
),
|
106 |
+
'hour_range' => array(
|
107 |
+
'type' => 'number',
|
108 |
+
'default' => 0,
|
109 |
+
),
|
110 |
+
'limit' => array(
|
111 |
+
'type' => 'number',
|
112 |
+
'default' => 6,
|
113 |
+
),
|
114 |
+
'offset' => array(
|
115 |
+
'type' => 'number',
|
116 |
+
'default' => 0,
|
117 |
+
),
|
118 |
+
'show_excerpt' => array(
|
119 |
+
'type' => 'boolean',
|
120 |
+
'default' => false,
|
121 |
+
),
|
122 |
+
'show_author' => array(
|
123 |
+
'type' => 'boolean',
|
124 |
+
'default' => false,
|
125 |
+
),
|
126 |
+
'show_date' => array(
|
127 |
+
'type' => 'boolean',
|
128 |
+
'default' => false,
|
129 |
+
),
|
130 |
+
'disp_list_count' => array(
|
131 |
+
'type' => 'boolean',
|
132 |
+
'default' => false,
|
133 |
+
),
|
134 |
+
'post_thumb_op' => array(
|
135 |
+
'type' => 'string',
|
136 |
+
'default' => 'inline',
|
137 |
+
),
|
138 |
+
'other_attributes' => array(
|
139 |
+
'type' => 'string',
|
140 |
+
'default' => '',
|
141 |
+
),
|
142 |
+
),
|
143 |
+
);
|
144 |
+
if ( ! empty( $style ) ) {
|
145 |
+
$args['editor_style'] = 'popular-posts-block-editor';
|
146 |
+
}
|
147 |
+
|
148 |
+
register_block_type(
|
149 |
+
'top-10/popular-posts',
|
150 |
+
$args
|
151 |
+
);
|
152 |
+
|
153 |
+
if ( function_exists( 'wp_set_script_translations' ) ) {
|
154 |
+
wp_set_script_translations( 'popular-posts-block-editor', 'top-10' );
|
155 |
+
}
|
156 |
+
}
|
157 |
+
add_action( 'init', 'tptn_block_init' );
|
includes/blocks/popular-posts/index.js
ADDED
@@ -0,0 +1,250 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function( blocks, i18n, element, components, editor, blockEditor ) {
|
2 |
+
var el = element.createElement;
|
3 |
+
const {registerBlockType} = blocks;
|
4 |
+
const {__} = i18n; //translation functions
|
5 |
+
var ServerSideRender = wp.serverSideRender;
|
6 |
+
|
7 |
+
const { RichText, InspectorControls } = blockEditor;
|
8 |
+
const {
|
9 |
+
TextControl,
|
10 |
+
CheckboxControl,
|
11 |
+
RadioControl,
|
12 |
+
SelectControl,
|
13 |
+
TextareaControl,
|
14 |
+
ToggleControl,
|
15 |
+
RangeControl,
|
16 |
+
Panel,
|
17 |
+
PanelBody,
|
18 |
+
PanelRow,
|
19 |
+
} = components;
|
20 |
+
|
21 |
+
registerBlockType( 'top-10/popular-posts', {
|
22 |
+
title: __( 'Popular Posts [Top 10]', 'top-10' ),
|
23 |
+
description: __( 'Display popular posts by Top 10', 'top-10' ),
|
24 |
+
category: 'widgets',
|
25 |
+
icon: 'editor-ol',
|
26 |
+
keywords: [ __( 'popular posts' ), __( 'popular' ), __( 'posts' ) ],
|
27 |
+
|
28 |
+
attributes: {
|
29 |
+
heading: {
|
30 |
+
type: 'boolean',
|
31 |
+
default: false,
|
32 |
+
},
|
33 |
+
daily: {
|
34 |
+
type: 'boolean',
|
35 |
+
default: false,
|
36 |
+
},
|
37 |
+
daily_range: {
|
38 |
+
type: 'number',
|
39 |
+
default: 1,
|
40 |
+
},
|
41 |
+
hour_range: {
|
42 |
+
type: 'number',
|
43 |
+
default: 0,
|
44 |
+
},
|
45 |
+
limit: {
|
46 |
+
type: 'number',
|
47 |
+
default: 6,
|
48 |
+
},
|
49 |
+
offset: {
|
50 |
+
type: 'number',
|
51 |
+
default: 0,
|
52 |
+
},
|
53 |
+
show_excerpt: {
|
54 |
+
type: 'boolean',
|
55 |
+
default: false,
|
56 |
+
},
|
57 |
+
show_author: {
|
58 |
+
type: 'boolean',
|
59 |
+
default: false,
|
60 |
+
},
|
61 |
+
show_date: {
|
62 |
+
type: 'boolean',
|
63 |
+
default: false,
|
64 |
+
},
|
65 |
+
disp_list_count: {
|
66 |
+
type: 'boolean',
|
67 |
+
default: false,
|
68 |
+
},
|
69 |
+
post_thumb_op: {
|
70 |
+
type: 'string',
|
71 |
+
default: 'inline',
|
72 |
+
},
|
73 |
+
other_attributes: {
|
74 |
+
type: 'string',
|
75 |
+
default: '',
|
76 |
+
},
|
77 |
+
},
|
78 |
+
|
79 |
+
supports: {
|
80 |
+
html: false,
|
81 |
+
},
|
82 |
+
|
83 |
+
example: { },
|
84 |
+
|
85 |
+
edit: function( props ) {
|
86 |
+
const attributes = props.attributes;
|
87 |
+
const setAttributes = props.setAttributes;
|
88 |
+
|
89 |
+
if(props.isSelected){
|
90 |
+
// console.debug(props.attributes);
|
91 |
+
};
|
92 |
+
|
93 |
+
|
94 |
+
// Functions to update attributes.
|
95 |
+
function changeHeading(heading){
|
96 |
+
setAttributes({heading});
|
97 |
+
}
|
98 |
+
|
99 |
+
function changeExcerpt(show_excerpt){
|
100 |
+
setAttributes({show_excerpt});
|
101 |
+
}
|
102 |
+
|
103 |
+
function changeDaily(daily){
|
104 |
+
setAttributes({daily});
|
105 |
+
}
|
106 |
+
|
107 |
+
function changeAuthor(show_author){
|
108 |
+
setAttributes({show_author});
|
109 |
+
}
|
110 |
+
|
111 |
+
function changeDate(show_date){
|
112 |
+
setAttributes({show_date});
|
113 |
+
}
|
114 |
+
|
115 |
+
function changeDisplayCount(disp_list_count){
|
116 |
+
setAttributes({disp_list_count});
|
117 |
+
}
|
118 |
+
|
119 |
+
function changeThumbnail(post_thumb_op){
|
120 |
+
setAttributes({post_thumb_op});
|
121 |
+
}
|
122 |
+
|
123 |
+
function changeOtherAttributes(other_attributes){
|
124 |
+
setAttributes({other_attributes});
|
125 |
+
}
|
126 |
+
|
127 |
+
return [
|
128 |
+
/**
|
129 |
+
* Server side render
|
130 |
+
*/
|
131 |
+
el("div", { className: props.className },
|
132 |
+
el( ServerSideRender, {
|
133 |
+
block: 'top-10/popular-posts',
|
134 |
+
attributes: attributes
|
135 |
+
} )
|
136 |
+
),
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Inspector
|
140 |
+
*/
|
141 |
+
el( InspectorControls, {},
|
142 |
+
el( PanelBody, { title: 'Related Posts Settings', initialOpen: true },
|
143 |
+
|
144 |
+
el( ToggleControl, {
|
145 |
+
label: __( 'Show heading', 'top-10' ),
|
146 |
+
checked: attributes.heading,
|
147 |
+
onChange: changeHeading
|
148 |
+
} ),
|
149 |
+
el( ToggleControl, {
|
150 |
+
label: __( 'Custom period? Set range below', 'top-10' ),
|
151 |
+
checked: attributes.daily,
|
152 |
+
onChange: changeDaily
|
153 |
+
} ),
|
154 |
+
el( TextControl, {
|
155 |
+
label: __( 'Daily range', 'top-10' ),
|
156 |
+
value: attributes.daily_range,
|
157 |
+
onChange: function( val ) {
|
158 |
+
setAttributes( { daily_range: parseInt( val ) } );
|
159 |
+
},
|
160 |
+
type: 'number',
|
161 |
+
min: 0,
|
162 |
+
step: 1
|
163 |
+
} ),
|
164 |
+
el( TextControl, {
|
165 |
+
label: __( 'Hourly range', 'top-10' ),
|
166 |
+
value: attributes.hour_range,
|
167 |
+
onChange: function( val ) {
|
168 |
+
setAttributes( { hour_range: parseInt( val ) } );
|
169 |
+
},
|
170 |
+
type: 'number',
|
171 |
+
min: 0,
|
172 |
+
step: 1
|
173 |
+
} ),
|
174 |
+
el( TextControl, {
|
175 |
+
label: __( 'No. of posts', 'top-10' ),
|
176 |
+
value: attributes.limit,
|
177 |
+
onChange: function( val ) {
|
178 |
+
setAttributes( { limit: parseInt( val ) } );
|
179 |
+
},
|
180 |
+
type: 'number',
|
181 |
+
min: 1,
|
182 |
+
step: 1
|
183 |
+
} ),
|
184 |
+
|
185 |
+
el( TextControl, {
|
186 |
+
label: __( 'Offset', 'top-10' ),
|
187 |
+
value: attributes.offset,
|
188 |
+
onChange: function( val ) {
|
189 |
+
setAttributes( { offset: parseInt( val ) } );
|
190 |
+
},
|
191 |
+
type: 'number',
|
192 |
+
min: 0,
|
193 |
+
step: 1
|
194 |
+
}),
|
195 |
+
|
196 |
+
el( ToggleControl, {
|
197 |
+
label: __( 'Show excerpt', 'top-10' ),
|
198 |
+
checked: attributes.show_excerpt,
|
199 |
+
onChange: changeExcerpt
|
200 |
+
} ),
|
201 |
+
el( ToggleControl, {
|
202 |
+
label: __( 'Show author', 'top-10' ),
|
203 |
+
checked: attributes.show_author,
|
204 |
+
onChange: changeAuthor
|
205 |
+
} ),
|
206 |
+
el( ToggleControl, {
|
207 |
+
label: __( 'Show date', 'top-10' ),
|
208 |
+
checked: attributes.show_date,
|
209 |
+
onChange: changeDate
|
210 |
+
} ),
|
211 |
+
el( ToggleControl, {
|
212 |
+
label: __( 'Show count', 'top-10' ),
|
213 |
+
checked: attributes.disp_list_count,
|
214 |
+
onChange: changeDisplayCount
|
215 |
+
} ),
|
216 |
+
el(SelectControl, {
|
217 |
+
value: attributes.post_thumb_op,
|
218 |
+
label: __( 'Thumbnail options', 'top-10' ),
|
219 |
+
onChange: changeThumbnail,
|
220 |
+
options: [
|
221 |
+
{value: 'inline', label: __( 'Before title', 'top-10' )},
|
222 |
+
{value: 'after', label: __( 'After title', 'top-10' )},
|
223 |
+
{value: 'thumbs_only', label: __( 'Only thumbnail', 'top-10' )},
|
224 |
+
{value: 'text_only', label: __( 'Only text', 'top-10' )},
|
225 |
+
]
|
226 |
+
} ),
|
227 |
+
el( TextareaControl, {
|
228 |
+
label: __( 'Other attributes', 'top-10' ),
|
229 |
+
help: __( 'Enter other attributes in a URL-style string-query. e.g. post_types=post,page&link_nofollow=1&exclude_post_ids=5,6', 'top-10' ),
|
230 |
+
value: attributes.other_attributes,
|
231 |
+
onChange: changeOtherAttributes
|
232 |
+
} )
|
233 |
+
),
|
234 |
+
),
|
235 |
+
]
|
236 |
+
},
|
237 |
+
|
238 |
+
save(){
|
239 |
+
return null;//save has to exist. This all we need
|
240 |
+
}
|
241 |
+
} );
|
242 |
+
} )(
|
243 |
+
window.wp.blocks,
|
244 |
+
window.wp.i18n,
|
245 |
+
window.wp.element,
|
246 |
+
window.wp.components,
|
247 |
+
window.wp.editor,
|
248 |
+
window.wp.blockEditor,
|
249 |
+
window.wp.serverSideRender
|
250 |
+
);
|
includes/blocks/popular-posts/index.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(blocks,i18n,element,components,editor,blockEditor){var el=element.createElement;const{registerBlockType:registerBlockType}=blocks,{__:__}=i18n;var ServerSideRender=wp.serverSideRender;const{RichText:RichText,InspectorControls:InspectorControls}=blockEditor,{TextControl:TextControl,CheckboxControl:CheckboxControl,RadioControl:RadioControl,SelectControl:SelectControl,TextareaControl:TextareaControl,ToggleControl:ToggleControl,RangeControl:RangeControl,Panel:Panel,PanelBody:PanelBody,PanelRow:PanelRow}=components;registerBlockType("top-10/popular-posts",{title:__("Popular Posts [Top 10]","top-10"),description:__("Display popular posts by Top 10","top-10"),category:"widgets",icon:"editor-ol",keywords:[__("popular posts"),__("popular"),__("posts")],attributes:{heading:{type:"boolean",default:!1},daily:{type:"boolean",default:!1},daily_range:{type:"number",default:1},hour_range:{type:"number",default:0},limit:{type:"number",default:6},offset:{type:"number",default:0},show_excerpt:{type:"boolean",default:!1},show_author:{type:"boolean",default:!1},show_date:{type:"boolean",default:!1},disp_list_count:{type:"boolean",default:!1},post_thumb_op:{type:"string",default:"inline"},other_attributes:{type:"string",default:""}},supports:{html:!1},example:{},edit:function(props){const attributes=props.attributes,setAttributes=props.setAttributes;function changeHeading(heading){setAttributes({heading:heading})}function changeExcerpt(show_excerpt){setAttributes({show_excerpt:show_excerpt})}function changeDaily(daily){setAttributes({daily:daily})}function changeAuthor(show_author){setAttributes({show_author:show_author})}function changeDate(show_date){setAttributes({show_date:show_date})}function changeDisplayCount(disp_list_count){setAttributes({disp_list_count:disp_list_count})}function changeThumbnail(post_thumb_op){setAttributes({post_thumb_op:post_thumb_op})}function changeOtherAttributes(other_attributes){setAttributes({other_attributes:other_attributes})}return props.isSelected,[el("div",{className:props.className},el(ServerSideRender,{block:"top-10/popular-posts",attributes:attributes})),el(InspectorControls,{},el(PanelBody,{title:"Related Posts Settings",initialOpen:!0},el(ToggleControl,{label:__("Show heading","top-10"),checked:attributes.heading,onChange:changeHeading}),el(ToggleControl,{label:__("Custom period? Set range below","top-10"),checked:attributes.daily,onChange:changeDaily}),el(TextControl,{label:__("Daily range","top-10"),value:attributes.daily_range,onChange:function(val){setAttributes({daily_range:parseInt(val)})},type:"number",min:0,step:1}),el(TextControl,{label:__("Hourly range","top-10"),value:attributes.hour_range,onChange:function(val){setAttributes({hour_range:parseInt(val)})},type:"number",min:0,step:1}),el(TextControl,{label:__("No. of posts","top-10"),value:attributes.limit,onChange:function(val){setAttributes({limit:parseInt(val)})},type:"number",min:1,step:1}),el(TextControl,{label:__("Offset","top-10"),value:attributes.offset,onChange:function(val){setAttributes({offset:parseInt(val)})},type:"number",min:0,step:1}),el(ToggleControl,{label:__("Show excerpt","top-10"),checked:attributes.show_excerpt,onChange:changeExcerpt}),el(ToggleControl,{label:__("Show author","top-10"),checked:attributes.show_author,onChange:changeAuthor}),el(ToggleControl,{label:__("Show date","top-10"),checked:attributes.show_date,onChange:changeDate}),el(ToggleControl,{label:__("Show count","top-10"),checked:attributes.disp_list_count,onChange:changeDisplayCount}),el(SelectControl,{value:attributes.post_thumb_op,label:__("Thumbnail options","top-10"),onChange:changeThumbnail,options:[{value:"inline",label:__("Before title","top-10")},{value:"after",label:__("After title","top-10")},{value:"thumbs_only",label:__("Only thumbnail","top-10")},{value:"text_only",label:__("Only text","top-10")}]}),el(TextareaControl,{label:__("Other attributes","top-10"),help:__("Enter other attributes in a URL-style string-query. e.g. post_types=post,page&link_nofollow=1&exclude_post_ids=5,6","top-10"),value:attributes.other_attributes,onChange:changeOtherAttributes})))]},save:()=>null})}(window.wp.blocks,window.wp.i18n,window.wp.element,window.wp.components,window.wp.editor,window.wp.blockEditor,window.wp.serverSideRender);
|
includes/blocks/popular-posts/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
includes/class-top-ten-query.php
ADDED
@@ -0,0 +1,516 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Query API: Top_Ten_Query class
|
4 |
+
*
|
5 |
+
* @package Top_Ten
|
6 |
+
* @subpackage Top_Ten_Query
|
7 |
+
* @since 3.0.0
|
8 |
+
*/
|
9 |
+
|
10 |
+
// If this file is called directly, abort.
|
11 |
+
if ( ! defined( 'WPINC' ) ) {
|
12 |
+
die;
|
13 |
+
}
|
14 |
+
|
15 |
+
if ( ! class_exists( 'Top_Ten_Query' ) ) :
|
16 |
+
/**
|
17 |
+
* Query API: Top_Ten_Query class.
|
18 |
+
*
|
19 |
+
* @since 3.0.0
|
20 |
+
*/
|
21 |
+
class Top_Ten_Query extends WP_Query {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Query vars, before parsing.
|
25 |
+
*
|
26 |
+
* @since 3.0.2
|
27 |
+
* @var int[]
|
28 |
+
*/
|
29 |
+
public $blog_id;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Cache set flag.
|
33 |
+
*
|
34 |
+
* @since 3.0.0
|
35 |
+
* @var bool
|
36 |
+
*/
|
37 |
+
public $in_cache = false;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Daily flag.
|
41 |
+
*
|
42 |
+
* @since 3.0.0
|
43 |
+
* @var bool
|
44 |
+
*/
|
45 |
+
public $is_daily = false;
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Query vars, before parsing.
|
49 |
+
*
|
50 |
+
* @since 3.0.2
|
51 |
+
* @var array
|
52 |
+
*/
|
53 |
+
public $input_query_args = array();
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Query vars, after parsing.
|
57 |
+
*
|
58 |
+
* @since 3.0.0
|
59 |
+
* @var array
|
60 |
+
*/
|
61 |
+
public $query_args = array();
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Top Ten table name being queried.
|
65 |
+
*
|
66 |
+
* @since 3.0.0
|
67 |
+
* @var string
|
68 |
+
*/
|
69 |
+
public $table_name;
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Main constructor.
|
73 |
+
*
|
74 |
+
* @since 3.0.0
|
75 |
+
*
|
76 |
+
* @param array|string $args The Query variables. Accepts an array or a query string.
|
77 |
+
*/
|
78 |
+
public function __construct( $args = array() ) {
|
79 |
+
$this->prepare_query_args( $args );
|
80 |
+
|
81 |
+
add_filter( 'posts_fields', array( $this, 'posts_fields' ), 10, 2 );
|
82 |
+
add_filter( 'posts_join', array( $this, 'posts_join' ), 10, 2 );
|
83 |
+
add_filter( 'posts_where', array( $this, 'posts_where' ), 10, 2 );
|
84 |
+
add_filter( 'posts_orderby', array( $this, 'posts_orderby' ), 10, 2 );
|
85 |
+
add_filter( 'posts_groupby', array( $this, 'posts_groupby' ), 10, 2 );
|
86 |
+
add_filter( 'posts_pre_query', array( $this, 'posts_pre_query' ), 10, 2 );
|
87 |
+
add_filter( 'the_posts', array( $this, 'the_posts' ), 10, 2 );
|
88 |
+
|
89 |
+
parent::__construct( $this->query_args );
|
90 |
+
|
91 |
+
// Remove filters after use.
|
92 |
+
remove_filter( 'posts_fields', array( $this, 'posts_fields' ) );
|
93 |
+
remove_filter( 'posts_join', array( $this, 'posts_join' ) );
|
94 |
+
remove_filter( 'posts_where', array( $this, 'posts_where' ) );
|
95 |
+
remove_filter( 'posts_orderby', array( $this, 'posts_orderby' ) );
|
96 |
+
remove_filter( 'posts_groupby', array( $this, 'posts_groupby' ) );
|
97 |
+
remove_filter( 'posts_pre_query', array( $this, 'posts_pre_query' ) );
|
98 |
+
remove_filter( 'the_posts', array( $this, 'the_posts' ) );
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Prepare the query variables.
|
103 |
+
*
|
104 |
+
* @since 3.0.0
|
105 |
+
* @see WP_Query::parse_query()
|
106 |
+
* @see tptn_get_registered_settings()
|
107 |
+
*
|
108 |
+
* @param string|array $args {
|
109 |
+
* Optional. Array or string of Query parameters.
|
110 |
+
*
|
111 |
+
* @type array|string $blog_id An array or comma-separated string of blog IDs.
|
112 |
+
* @type bool $daily Set to true to get the daily/custom period posts. False for overall.
|
113 |
+
* @type array|string $include_cat_ids An array or comma-separated string of category/custom taxonomy term_taxonomy_ids.
|
114 |
+
* @type array|string $include_post_ids An array or comma-separated string of post IDs.
|
115 |
+
* @type bool $offset Offset the related posts returned by this number.
|
116 |
+
* @type bool $strict_limit If this is set to false, then it will fetch 3x posts.
|
117 |
+
* }
|
118 |
+
*/
|
119 |
+
public function prepare_query_args( $args = array() ) {
|
120 |
+
global $wpdb;
|
121 |
+
$tptn_settings = tptn_get_settings();
|
122 |
+
|
123 |
+
$defaults = array(
|
124 |
+
'blog_id' => get_current_blog_id(),
|
125 |
+
'daily' => false,
|
126 |
+
'include_cat_ids' => 0,
|
127 |
+
'include_post_ids' => 0,
|
128 |
+
'offset' => 0,
|
129 |
+
'strict_limit' => true,
|
130 |
+
);
|
131 |
+
$defaults = array_merge( $defaults, $tptn_settings );
|
132 |
+
$args = wp_parse_args( $args, $defaults );
|
133 |
+
|
134 |
+
// Set necessary variables.
|
135 |
+
$args['top_ten_query'] = true;
|
136 |
+
$args['suppress_filters'] = false;
|
137 |
+
$args['ignore_sticky_posts'] = true;
|
138 |
+
$args['no_found_rows'] = true;
|
139 |
+
|
140 |
+
// Store query args before we manipulate them.
|
141 |
+
$this->input_query_args = $args;
|
142 |
+
|
143 |
+
if ( $args['daily'] ) {
|
144 |
+
$this->table_name = $wpdb->base_prefix . 'top_ten_daily';
|
145 |
+
$this->is_daily = true;
|
146 |
+
} else {
|
147 |
+
$this->table_name = $wpdb->base_prefix . 'top_ten';
|
148 |
+
$this->is_daily = false;
|
149 |
+
}
|
150 |
+
|
151 |
+
// Set the number of posts to be retrieved.
|
152 |
+
$args['posts_per_page'] = ( $args['strict_limit'] ) ? $args['limit'] : ( $args['limit'] * 3 );
|
153 |
+
|
154 |
+
// If post_types is empty or contains a query string then use parse_str else consider it comma-separated.
|
155 |
+
if ( ! empty( $args['post_types'] ) && is_array( $args['post_types'] ) ) {
|
156 |
+
$post_types = $args['post_types'];
|
157 |
+
} elseif ( ! empty( $args['post_types'] ) && false === strpos( $args['post_types'], '=' ) ) {
|
158 |
+
$post_types = explode( ',', $args['post_types'] );
|
159 |
+
} else {
|
160 |
+
parse_str( $args['post_types'], $post_types ); // Save post types in $post_types variable.
|
161 |
+
}
|
162 |
+
|
163 |
+
// If post_types is empty or if we want all the post types.
|
164 |
+
if ( empty( $post_types ) || 'all' === $args['post_types'] ) {
|
165 |
+
$post_types = get_post_types(
|
166 |
+
array(
|
167 |
+
'public' => true,
|
168 |
+
)
|
169 |
+
);
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Filter the post_types passed to the query.
|
174 |
+
*
|
175 |
+
* @since 2.2.0
|
176 |
+
* @since 3.0.0 Changed second argument from post ID to WP_Post object.
|
177 |
+
*
|
178 |
+
* @param array $post_types Array of post types to filter by.
|
179 |
+
* @param array $args Arguments array.
|
180 |
+
*/
|
181 |
+
$args['post_type'] = apply_filters( 'tptn_posts_post_types', $post_types, $args );
|
182 |
+
|
183 |
+
// Parse the blog_id argument to get an array of IDs.
|
184 |
+
$this->blog_id = wp_parse_id_list( $args['blog_id'] );
|
185 |
+
|
186 |
+
// Tax Query.
|
187 |
+
if ( ! empty( $args['tax_query'] ) && is_array( $args['tax_query'] ) ) {
|
188 |
+
$tax_query = $args['tax_query'];
|
189 |
+
} else {
|
190 |
+
$tax_query = array();
|
191 |
+
}
|
192 |
+
|
193 |
+
if ( ! empty( $args['include_cat_ids'] ) ) {
|
194 |
+
$tax_query[] = array(
|
195 |
+
'field' => 'term_taxonomy_id',
|
196 |
+
'terms' => wp_parse_id_list( $args['include_cat_ids'] ),
|
197 |
+
'include_children' => false,
|
198 |
+
);
|
199 |
+
}
|
200 |
+
|
201 |
+
if ( ! empty( $args['exclude_categories'] ) ) {
|
202 |
+
$tax_query[] = array(
|
203 |
+
'field' => 'term_taxonomy_id',
|
204 |
+
'terms' => wp_parse_id_list( $args['exclude_categories'] ),
|
205 |
+
'operator' => 'NOT IN',
|
206 |
+
'include_children' => false,
|
207 |
+
);
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Filter the tax_query passed to the query.
|
212 |
+
*
|
213 |
+
* @since 3.0.0
|
214 |
+
*
|
215 |
+
* @param array $tax_query Array of tax_query parameters.
|
216 |
+
* @param array $args Arguments array.
|
217 |
+
*/
|
218 |
+
$tax_query = apply_filters( 'top_ten_query_tax_query', $tax_query, $args );
|
219 |
+
|
220 |
+
// Add a relation key if more than one $tax_query.
|
221 |
+
if ( count( $tax_query ) > 1 ) {
|
222 |
+
$tax_query['relation'] = 'AND';
|
223 |
+
}
|
224 |
+
|
225 |
+
$args['tax_query'] = $tax_query; // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query
|
226 |
+
|
227 |
+
// Set date_query.
|
228 |
+
$args['date_query'] = array(
|
229 |
+
array(
|
230 |
+
'after' => $args['how_old'] ? tptn_get_from_date( null, $args['how_old'] + 1, 0 ) : '',
|
231 |
+
'before' => current_time( 'mysql' ),
|
232 |
+
'inclusive' => true,
|
233 |
+
),
|
234 |
+
);
|
235 |
+
|
236 |
+
// Set post_status.
|
237 |
+
$args['post_status'] = empty( $args['post_status'] ) ? array( 'publish', 'inherit' ) : $args['post_status'];
|
238 |
+
|
239 |
+
// Set post__not_in for WP_Query using exclude_post_ids.
|
240 |
+
$exclude_post_ids = empty( $args['exclude_post_ids'] ) ? array() : wp_parse_id_list( $args['exclude_post_ids'] );
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Filter exclude post IDs array.
|
244 |
+
*
|
245 |
+
* @since 2.2.0
|
246 |
+
* @since 3.0.0 Added $args
|
247 |
+
*
|
248 |
+
* @param int[] $exclude_post_ids Array of post IDs.
|
249 |
+
* @param array $args Arguments array.
|
250 |
+
*/
|
251 |
+
$exclude_post_ids = apply_filters( 'tptn_exclude_post_ids', $exclude_post_ids, $args );
|
252 |
+
|
253 |
+
$args['post__not_in'] = $exclude_post_ids;
|
254 |
+
|
255 |
+
// Unset what we don't need.
|
256 |
+
unset( $args['title'] );
|
257 |
+
unset( $args['title_daily'] );
|
258 |
+
unset( $args['blank_output'] );
|
259 |
+
unset( $args['blank_output_text'] );
|
260 |
+
unset( $args['show_excerpt'] );
|
261 |
+
unset( $args['excerpt_length'] );
|
262 |
+
unset( $args['show_date'] );
|
263 |
+
unset( $args['show_author'] );
|
264 |
+
unset( $args['disp_list_count'] );
|
265 |
+
unset( $args['title_length'] );
|
266 |
+
unset( $args['link_new_window'] );
|
267 |
+
unset( $args['link_nofollow'] );
|
268 |
+
unset( $args['before_list'] );
|
269 |
+
unset( $args['after_list'] );
|
270 |
+
unset( $args['before_list_item'] );
|
271 |
+
unset( $args['after_list_item'] );
|
272 |
+
|
273 |
+
/**
|
274 |
+
* Filters the arguments of the query.
|
275 |
+
*
|
276 |
+
* @since 3.0.0
|
277 |
+
*
|
278 |
+
* @param array $args The arguments of the query.
|
279 |
+
* @param Top_Ten_Query $this The Top_Ten_Query instance (passed by reference).
|
280 |
+
*/
|
281 |
+
$this->query_args = apply_filters_ref_array( 'top_ten_query_args', array( $args, &$this ) );
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Modify the SELECT clause - posts_fields.
|
286 |
+
*
|
287 |
+
* @since 3.0.0
|
288 |
+
*
|
289 |
+
* @param string $fields The SELECT clause of the query.
|
290 |
+
* @param WP_Query $query The WP_Query instance.
|
291 |
+
* @return string Updated Fields
|
292 |
+
*/
|
293 |
+
public function posts_fields( $fields, $query ) {
|
294 |
+
global $wpdb;
|
295 |
+
|
296 |
+
// Return if it is not a Top_Ten_Query.
|
297 |
+
if ( true !== $query->get( 'top_ten_query' ) ) {
|
298 |
+
return $fields;
|
299 |
+
}
|
300 |
+
|
301 |
+
$_fields[] = "{$this->table_name}.postnumber";
|
302 |
+
$_fields[] = $this->is_daily ? "SUM({$this->table_name}.cntaccess) as visits" : "{$this->table_name}.cntaccess as visits";
|
303 |
+
|
304 |
+
$_fields = implode( ', ', $_fields );
|
305 |
+
|
306 |
+
$fields .= ',' . $_fields;
|
307 |
+
|
308 |
+
return $fields;
|
309 |
+
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Modify the posts_join clause.
|
313 |
+
*
|
314 |
+
* @since 3.0.0
|
315 |
+
*
|
316 |
+
* @param string $join The JOIN clause of the query.
|
317 |
+
* @param WP_Query $query The WP_Query instance.
|
318 |
+
* @return string Updated JOIN
|
319 |
+
*/
|
320 |
+
public function posts_join( $join, $query ) {
|
321 |
+
global $wpdb;
|
322 |
+
|
323 |
+
// Return if it is not a Top_Ten_Query.
|
324 |
+
if ( true !== $query->get( 'top_ten_query' ) ) {
|
325 |
+
return $join;
|
326 |
+
}
|
327 |
+
|
328 |
+
$join .= " INNER JOIN {$this->table_name} ON {$this->table_name}.postnumber={$wpdb->posts}.ID ";
|
329 |
+
|
330 |
+
return $join;
|
331 |
+
}
|
332 |
+
|
333 |
+
/**
|
334 |
+
* Modify the posts_where clause.
|
335 |
+
*
|
336 |
+
* @since 3.0.0
|
337 |
+
*
|
338 |
+
* @param string $where The WHERE clause of the query.
|
339 |
+
* @param WP_Query $query The WP_Query instance.
|
340 |
+
* @return string Updated WHERE
|
341 |
+
*/
|
342 |
+
public function posts_where( $where, $query ) {
|
343 |
+
global $wpdb;
|
344 |
+
|
345 |
+
// Return if it is not a Top_Ten_Query.
|
346 |
+
if ( true !== $query->get( 'top_ten_query' ) ) {
|
347 |
+
return $where;
|
348 |
+
}
|
349 |
+
|
350 |
+
$where .= " AND {$this->table_name}.blog_id IN ('" . join( "', '", $this->blog_id ) . "') "; // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
351 |
+
|
352 |
+
if ( $this->is_daily ) {
|
353 |
+
if ( isset( $this->query_args['from_date'] ) ) {
|
354 |
+
$from_date = tptn_get_from_date( $this->query_args['from_date'], 0, 0 );
|
355 |
+
} else {
|
356 |
+
$from_date = tptn_get_from_date( null, $this->query_args['daily_range'], $this->query_args['hour_range'] );
|
357 |
+
}
|
358 |
+
$where .= $wpdb->prepare( " AND {$this->table_name}.dp_date >= %s ", $from_date ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
359 |
+
|
360 |
+
if ( isset( $this->query_args['to_date'] ) ) {
|
361 |
+
$to_date = tptn_get_from_date( $this->query_args['to_date'], 0, 0 );
|
362 |
+
$where .= $wpdb->prepare( " AND {$this->table_name}.dp_date <= %s ", $to_date ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
363 |
+
}
|
364 |
+
}
|
365 |
+
|
366 |
+
return $where;
|
367 |
+
}
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Modify the posts_orderby clause.
|
371 |
+
*
|
372 |
+
* @since 3.0.0
|
373 |
+
*
|
374 |
+
* @param string $orderby The ORDER BY clause of the query.
|
375 |
+
* @param WP_Query $query The WP_Query instance.
|
376 |
+
* @return string Updated ORDER BY
|
377 |
+
*/
|
378 |
+
public function posts_orderby( $orderby, $query ) {
|
379 |
+
|
380 |
+
// Return if it is not a Top_Ten_Query.
|
381 |
+
if ( true !== $query->get( 'top_ten_query' ) ) {
|
382 |
+
return $orderby;
|
383 |
+
}
|
384 |
+
|
385 |
+
// If orderby is set, then this was done intentionally and we don't make any modifications.
|
386 |
+
if ( ! empty( $query->get( 'orderby' ) ) ) {
|
387 |
+
return $orderby;
|
388 |
+
}
|
389 |
+
|
390 |
+
$orderby = ' visits DESC ';
|
391 |
+
|
392 |
+
return $orderby;
|
393 |
+
}
|
394 |
+
|
395 |
+
/**
|
396 |
+
* Modify the posts_groupby clause.
|
397 |
+
*
|
398 |
+
* @since 3.0.0
|
399 |
+
*
|
400 |
+
* @param string $groupby The GROUP BY clause of the query.
|
401 |
+
* @param WP_Query $query The WP_Query instance.
|
402 |
+
* @return string Updated GROUP BY
|
403 |
+
*/
|
404 |
+
public function posts_groupby( $groupby, $query ) {
|
405 |
+
|
406 |
+
// Return if it is not a Top_Ten_Query.
|
407 |
+
if ( true !== $query->get( 'top_ten_query' ) ) {
|
408 |
+
return $groupby;
|
409 |
+
}
|
410 |
+
|
411 |
+
if ( $this->is_daily ) {
|
412 |
+
$groupby = " {$this->table_name}.postnumber ";
|
413 |
+
}
|
414 |
+
|
415 |
+
return $groupby;
|
416 |
+
}
|
417 |
+
|
418 |
+
/**
|
419 |
+
* Filter posts_pre_query to allow caching to work.
|
420 |
+
*
|
421 |
+
* @since 3.0.0
|
422 |
+
*
|
423 |
+
* @param string $posts Array of post data.
|
424 |
+
* @param WP_Query $query The WP_Query instance.
|
425 |
+
* @return string Updated Array of post objects.
|
426 |
+
*/
|
427 |
+
public function posts_pre_query( $posts, $query ) {
|
428 |
+
|
429 |
+
// Return if it is not a Top_Ten_Query.
|
430 |
+
if ( true !== $query->get( 'top_ten_query' ) ) {
|
431 |
+
return $posts;
|
432 |
+
}
|
433 |
+
|
434 |
+
// Check the cache if there are any posts saved.
|
435 |
+
if ( ! empty( $this->query_args['cache_posts'] ) && ! ( is_preview() || is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) ) {
|
436 |
+
|
437 |
+
$cache_name = tptn_cache_get_key( $this->input_query_args );
|
438 |
+
|
439 |
+
$post_ids = get_transient( $cache_name );
|
440 |
+
|
441 |
+
if ( ! empty( $post_ids ) ) {
|
442 |
+
$posts = get_posts(
|
443 |
+
array(
|
444 |
+
'post__in' => $post_ids,
|
445 |
+
'fields' => $query->get( 'fields' ),
|
446 |
+
'orderby' => 'post__in',
|
447 |
+
'post_type' => $query->get( 'post_type' ),
|
448 |
+
)
|
449 |
+
);
|
450 |
+
$query->found_posts = count( $posts );
|
451 |
+
$query->max_num_pages = ceil( $query->found_posts / $query->get( 'posts_per_page' ) );
|
452 |
+
$this->in_cache = true;
|
453 |
+
}
|
454 |
+
}
|
455 |
+
|
456 |
+
return $posts;
|
457 |
+
}
|
458 |
+
|
459 |
+
/**
|
460 |
+
* Modify the array of retrieved posts.
|
461 |
+
*
|
462 |
+
* @since 3.0.0
|
463 |
+
*
|
464 |
+
* @param WP_Post[] $posts Array of post objects.
|
465 |
+
* @param WP_Query $query The WP_Query instance (passed by reference).
|
466 |
+
* @return string Updated Array of post objects.
|
467 |
+
*/
|
468 |
+
public function the_posts( $posts, $query ) {
|
469 |
+
|
470 |
+
// Return if it is not a Top_Ten_Query.
|
471 |
+
if ( true !== $query->get( 'top_ten_query' ) ) {
|
472 |
+
return $posts;
|
473 |
+
}
|
474 |
+
|
475 |
+
// Support caching to speed up retrieval.
|
476 |
+
if ( ! empty( $this->query_args['cache_posts'] ) && ! $this->in_cache && ! ( is_preview() || is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) ) {
|
477 |
+
/** This filter is defined in display-posts.php */
|
478 |
+
$cache_time = apply_filters( 'tptn_cache_time', $this->query_args['cache_time'], $this->query_args );
|
479 |
+
$cache_name = tptn_cache_get_key( $this->input_query_args );
|
480 |
+
$post_ids = wp_list_pluck( $query->posts, 'ID' );
|
481 |
+
|
482 |
+
set_transient( $cache_name, $post_ids, $cache_time );
|
483 |
+
}
|
484 |
+
|
485 |
+
if ( ! empty( $this->query_args['include_post_ids'] ) ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
|
486 |
+
$include_post_ids = wp_parse_id_list( $this->query_args['include_post_ids'] );
|
487 |
+
}
|
488 |
+
if ( ! empty( $include_post_ids ) ) {
|
489 |
+
$extra_posts = get_posts(
|
490 |
+
array(
|
491 |
+
'post__in' => $include_post_ids,
|
492 |
+
'fields' => $query->get( 'fields' ),
|
493 |
+
'orderby' => 'post__in',
|
494 |
+
'post_type' => $query->get( 'post_type' ),
|
495 |
+
)
|
496 |
+
);
|
497 |
+
$posts = array_merge( $extra_posts, $posts );
|
498 |
+
}
|
499 |
+
|
500 |
+
// Shuffle posts if random order is set.
|
501 |
+
if ( $this->random_order ) {
|
502 |
+
shuffle( $posts );
|
503 |
+
}
|
504 |
+
|
505 |
+
/**
|
506 |
+
* Filter array of WP_Post objects before it is returned to the Top_Ten_Query instance.
|
507 |
+
*
|
508 |
+
* @since 3.0.0
|
509 |
+
*
|
510 |
+
* @param WP_Post[] $posts Array of post objects.
|
511 |
+
* @param array $args Arguments array.
|
512 |
+
*/
|
513 |
+
return apply_filters( 'top_ten_query_the_posts', $posts, $this->query_args );
|
514 |
+
}
|
515 |
+
}
|
516 |
+
endif;
|
includes/cron.php
CHANGED
@@ -15,7 +15,7 @@ function tptn_cron() {
|
|
15 |
|
16 |
$table_name_daily = $wpdb->base_prefix . 'top_ten_daily';
|
17 |
|
18 |
-
$delete_from =
|
19 |
|
20 |
/**
|
21 |
* Override maintenance day range.
|
15 |
|
16 |
$table_name_daily = $wpdb->base_prefix . 'top_ten_daily';
|
17 |
|
18 |
+
$delete_from = TOP_TEN_STORE_DATA;
|
19 |
|
20 |
/**
|
21 |
* Override maintenance day range.
|
includes/helpers.php
CHANGED
@@ -42,10 +42,10 @@ function tptn_get_from_date( $time = null, $daily_range = null, $hour_range = nu
|
|
42 |
|
43 |
if ( tptn_get_option( 'daily_midnight' ) ) {
|
44 |
$from_date = $current_time - ( max( 0, ( $daily_range - 1 ) ) * DAY_IN_SECONDS );
|
45 |
-
$from_date = gmdate( 'Y-m-d 0', $from_date );
|
46 |
} else {
|
47 |
$from_date = $current_time - ( $daily_range * DAY_IN_SECONDS + $hour_range * HOUR_IN_SECONDS );
|
48 |
-
$from_date = gmdate( 'Y-m-d H', $from_date );
|
49 |
}
|
50 |
|
51 |
/**
|
@@ -96,7 +96,7 @@ function tptn_number_format_i18n( $number, $decimals = 0 ) {
|
|
96 |
*
|
97 |
* @since 2.9.0
|
98 |
*
|
99 |
-
* @param
|
100 |
* @param string $delimiter Delimiter.
|
101 |
* @param string $enclosure Enclosure.
|
102 |
* @param string $terminator Terminating string.
|
@@ -115,7 +115,7 @@ function tptn_str_putcsv( $array, $delimiter = ',', $enclosure = '"', $terminato
|
|
115 |
for ( $i = 0; $i < $array_size; $i++ ) {
|
116 |
// Nested array, process nest item.
|
117 |
if ( is_array( $work_array[ $i ] ) ) {
|
118 |
-
$string .=
|
119 |
} else {
|
120 |
switch ( gettype( $work_array[ $i ] ) ) {
|
121 |
// Manually set some strings.
|
42 |
|
43 |
if ( tptn_get_option( 'daily_midnight' ) ) {
|
44 |
$from_date = $current_time - ( max( 0, ( $daily_range - 1 ) ) * DAY_IN_SECONDS );
|
45 |
+
$from_date = gmdate( 'Y-m-d 0:0:0', $from_date );
|
46 |
} else {
|
47 |
$from_date = $current_time - ( $daily_range * DAY_IN_SECONDS + $hour_range * HOUR_IN_SECONDS );
|
48 |
+
$from_date = gmdate( 'Y-m-d H:0:0', $from_date );
|
49 |
}
|
50 |
|
51 |
/**
|
96 |
*
|
97 |
* @since 2.9.0
|
98 |
*
|
99 |
+
* @param array $array Input string.
|
100 |
* @param string $delimiter Delimiter.
|
101 |
* @param string $enclosure Enclosure.
|
102 |
* @param string $terminator Terminating string.
|
115 |
for ( $i = 0; $i < $array_size; $i++ ) {
|
116 |
// Nested array, process nest item.
|
117 |
if ( is_array( $work_array[ $i ] ) ) {
|
118 |
+
$string .= tptn_str_putcsv( $work_array[ $i ], $delimiter, $enclosure, $terminator );
|
119 |
} else {
|
120 |
switch ( gettype( $work_array[ $i ] ) ) {
|
121 |
// Manually set some strings.
|
includes/js/top-10-tracker.js
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function($) {
|
2 |
+
$.post(ajax_tptn_tracker.ajax_url, {
|
3 |
+
action: 'tptn_tracker',
|
4 |
+
top_ten_id: ajax_tptn_tracker.top_ten_id,
|
5 |
+
top_ten_blog_id: ajax_tptn_tracker.top_ten_blog_id,
|
6 |
+
activate_counter: ajax_tptn_tracker.activate_counter,
|
7 |
+
top_ten_debug: ajax_tptn_tracker.top_ten_debug
|
8 |
+
});
|
9 |
+
});
|
includes/js/top-10-tracker.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function($){
|
1 |
+
jQuery(document).ready((function($){$.post(ajax_tptn_tracker.ajax_url,{action:"tptn_tracker",top_ten_id:ajax_tptn_tracker.top_ten_id,top_ten_blog_id:ajax_tptn_tracker.top_ten_blog_id,activate_counter:ajax_tptn_tracker.activate_counter,top_ten_debug:ajax_tptn_tracker.top_ten_debug})}));
|
includes/modules/class-top-ten-count-widget.php
CHANGED
@@ -3,10 +3,6 @@
|
|
3 |
* Widget to display the overall count.
|
4 |
*
|
5 |
* @package Top_Ten
|
6 |
-
* @author Ajay D'Souza <me@ajaydsouza.com>
|
7 |
-
* @license GPL-2.0+
|
8 |
-
* @link https://webberzone.com
|
9 |
-
* @copyright 2008-2020 Ajay D'Souza
|
10 |
*/
|
11 |
|
12 |
// If this file is called directly, abort.
|
3 |
* Widget to display the overall count.
|
4 |
*
|
5 |
* @package Top_Ten
|
|
|
|
|
|
|
|
|
6 |
*/
|
7 |
|
8 |
// If this file is called directly, abort.
|
includes/modules/class-top-ten-rest-api.php
ADDED
@@ -0,0 +1,334 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This class adds REST routes to update the count and return the list of popular posts.
|
4 |
+
*
|
5 |
+
* @package Top_Ten
|
6 |
+
*/
|
7 |
+
|
8 |
+
// If this file is called directly, abort.
|
9 |
+
if ( ! defined( 'WPINC' ) ) {
|
10 |
+
die;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Query API: Top_Ten_Query class.
|
15 |
+
*
|
16 |
+
* @since 3.0.0
|
17 |
+
*/
|
18 |
+
class Top_Ten_REST_API extends \WP_REST_Controller {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Main constructor.
|
22 |
+
*
|
23 |
+
* @since 3.0.0
|
24 |
+
*/
|
25 |
+
public function __construct() {
|
26 |
+
$this->namespace = 'top-10/v1';
|
27 |
+
$this->posts_route = 'popular-posts';
|
28 |
+
$this->tracker_route = 'tracker';
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Initialises the Top 10 REST API adding the necessary routes.
|
33 |
+
*
|
34 |
+
* @since 3.0.0
|
35 |
+
*/
|
36 |
+
public function register_routes() {
|
37 |
+
register_rest_route(
|
38 |
+
$this->namespace,
|
39 |
+
'/' . $this->posts_route,
|
40 |
+
array(
|
41 |
+
'methods' => \WP_REST_Server::READABLE,
|
42 |
+
'callback' => array( $this, 'get_items' ),
|
43 |
+
'permission_callback' => array( $this, 'permissions_check' ),
|
44 |
+
'args' => $this->get_items_params(),
|
45 |
+
)
|
46 |
+
);
|
47 |
+
register_rest_route(
|
48 |
+
$this->namespace,
|
49 |
+
'/' . $this->posts_route . '/(?P<id>[\d]+)',
|
50 |
+
array(
|
51 |
+
'methods' => \WP_REST_Server::READABLE,
|
52 |
+
'callback' => array( $this, 'get_item' ),
|
53 |
+
'permission_callback' => array( $this, 'permissions_check' ),
|
54 |
+
'args' => array(
|
55 |
+
'id' => array(
|
56 |
+
'description' => __( 'Post ID.', 'top-10' ),
|
57 |
+
'type' => 'integer',
|
58 |
+
),
|
59 |
+
),
|
60 |
+
)
|
61 |
+
);
|
62 |
+
register_rest_route(
|
63 |
+
$this->namespace,
|
64 |
+
'/' . $this->tracker_route,
|
65 |
+
array(
|
66 |
+
'methods' => \WP_REST_Server::CREATABLE,
|
67 |
+
'callback' => array( $this, 'update_post_count' ),
|
68 |
+
'permission_callback' => array( $this, 'permissions_check' ),
|
69 |
+
'args' => $this->get_tracker_params(),
|
70 |
+
)
|
71 |
+
);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Check if a given request has access to get items
|
76 |
+
*
|
77 |
+
* @param WP_REST_Request $request Full data about the request.
|
78 |
+
*
|
79 |
+
* @return WP_Error|bool
|
80 |
+
*/
|
81 |
+
public function permissions_check( $request ) {
|
82 |
+
return apply_filters( 'top_ten_rest_api_permissions_check', true, $request );
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Get popular posts.
|
87 |
+
*
|
88 |
+
* @since 3.0.0
|
89 |
+
*
|
90 |
+
* @param WP_REST_Request $request WP Rest request.
|
91 |
+
* @return mixed|\WP_REST_Response Array of post objects or post IDs.
|
92 |
+
*/
|
93 |
+
public function get_items( $request ) {
|
94 |
+
$popular_posts = array();
|
95 |
+
|
96 |
+
$args = $request->get_params();
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Filter the REST API arguments before they passed to get_tptn_posts().
|
100 |
+
*
|
101 |
+
* @since 3.0.0
|
102 |
+
*
|
103 |
+
* @param array $args Arguments array.
|
104 |
+
* @param WP_REST_Request $request WP Rest request.
|
105 |
+
*/
|
106 |
+
$args = apply_filters( 'top_ten_rest_api_get_tptn_posts_args', $args, $request );
|
107 |
+
|
108 |
+
$results = get_tptn_posts( $args );
|
109 |
+
|
110 |
+
if ( is_array( $results ) && ! empty( $results ) ) {
|
111 |
+
foreach ( $results as $popular_post ) {
|
112 |
+
if ( ! $this->check_read_permission( $popular_post ) ) {
|
113 |
+
continue;
|
114 |
+
}
|
115 |
+
|
116 |
+
$popular_posts[] = $this->prepare_item( $popular_post, $request );
|
117 |
+
}
|
118 |
+
}
|
119 |
+
return rest_ensure_response( $popular_posts );
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Get a popular post by ID. Also includes the number of views.
|
124 |
+
*
|
125 |
+
* @since 3.0.0
|
126 |
+
*
|
127 |
+
* @param WP_REST_Request $request WP Rest request.
|
128 |
+
* @return mixed|\WP_REST_Response Array of post objects or post IDs.
|
129 |
+
*/
|
130 |
+
public function get_item( $request ) {
|
131 |
+
|
132 |
+
$id = $request->get_param( 'id' );
|
133 |
+
|
134 |
+
$error = new WP_Error(
|
135 |
+
'rest_post_invalid_id',
|
136 |
+
__( 'Invalid post ID.', 'top-10' ),
|
137 |
+
array( 'status' => 404 )
|
138 |
+
);
|
139 |
+
|
140 |
+
if ( (int) $id <= 0 ) {
|
141 |
+
return $error;
|
142 |
+
}
|
143 |
+
|
144 |
+
$post = get_post( (int) $id );
|
145 |
+
if ( empty( $post ) || empty( $post->ID ) || ! $this->check_read_permission( $post ) ) {
|
146 |
+
return $error;
|
147 |
+
}
|
148 |
+
|
149 |
+
$post = $this->prepare_item( $post, $request );
|
150 |
+
|
151 |
+
return rest_ensure_response( $post );
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Get a popular post by ID. Also includes the number of views.
|
156 |
+
*
|
157 |
+
* @since 3.0.0
|
158 |
+
*
|
159 |
+
* @param WP_Post $popular_post Popular Post object.
|
160 |
+
* @param WP_REST_Request $request WP Rest request.
|
161 |
+
* @return array|mixed The formatted Popular Post object.
|
162 |
+
*/
|
163 |
+
public function prepare_item( $popular_post, $request ) {
|
164 |
+
|
165 |
+
// Need to prepare items for the rest response.
|
166 |
+
$posts_controller = new \WP_REST_Posts_Controller( $popular_post->post_type, $request );
|
167 |
+
$data = $posts_controller->prepare_item_for_response( $popular_post, $request );
|
168 |
+
|
169 |
+
// Add pageviews from popular_post object to response.
|
170 |
+
$visits = isset( $popular_post->visits ) ? $popular_post->visits : get_tptn_post_count_only( $popular_post->ID );
|
171 |
+
$data->data['visits'] = absint( $visits );
|
172 |
+
|
173 |
+
return $this->prepare_response_for_collection( $data );
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Update post count.
|
178 |
+
*
|
179 |
+
* @since 3.0.0
|
180 |
+
*
|
181 |
+
* @param WP_REST_Request $request WP Rest request.
|
182 |
+
* @return mixed|\WP_REST_Response Array of post objects or post IDs.
|
183 |
+
*/
|
184 |
+
public function update_post_count( $request ) {
|
185 |
+
|
186 |
+
$id = absint( $request->get_param( 'top_ten_id' ) );
|
187 |
+
$blog_id = absint( $request->get_param( 'top_ten_blog_id' ) );
|
188 |
+
$activate_counter = absint( $request->get_param( 'activate_counter' ) );
|
189 |
+
$top_ten_debug = absint( $request->get_param( 'top_ten_debug' ) );
|
190 |
+
|
191 |
+
$str = tptn_update_count( $id, $blog_id, $activate_counter );
|
192 |
+
|
193 |
+
if ( 1 === $top_ten_debug ) {
|
194 |
+
return rest_ensure_response( $str );
|
195 |
+
} else {
|
196 |
+
$response = new \WP_REST_Response( '', 204 );
|
197 |
+
$response->header( 'Cache-Control', 'max-age=15, s-maxage=0' );
|
198 |
+
return $response;
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Get the arguments for fetching the popular posts.
|
204 |
+
*
|
205 |
+
* @since 3.0.0
|
206 |
+
*
|
207 |
+
* @return array Top 10 REST API popular posts arguments.
|
208 |
+
*/
|
209 |
+
public function get_items_params() {
|
210 |
+
$args = array(
|
211 |
+
'limit' => array(
|
212 |
+
'description' => esc_html__( 'Number of posts', 'top-10' ),
|
213 |
+
'type' => 'integer',
|
214 |
+
'sanitize_callback' => 'absint',
|
215 |
+
),
|
216 |
+
'post_types' => array(
|
217 |
+
'description' => esc_html__( 'Post types', 'top-10' ),
|
218 |
+
'type' => 'string',
|
219 |
+
),
|
220 |
+
);
|
221 |
+
|
222 |
+
return apply_filters( 'top_ten_rest_api_get_items_params', $args );
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Get the arguments for tracking posts.
|
227 |
+
*
|
228 |
+
* @since 3.0.0
|
229 |
+
*
|
230 |
+
* @return array Top 10 REST API popular posts arguments.
|
231 |
+
*/
|
232 |
+
public function get_tracker_params() {
|
233 |
+
$args = array(
|
234 |
+
'top_ten_id' => array(
|
235 |
+
'description' => esc_html__( 'ID of the post.', 'top-10' ),
|
236 |
+
'type' => 'integer',
|
237 |
+
'sanitize_callback' => 'absint',
|
238 |
+
),
|
239 |
+
'top_ten_blog_id' => array(
|
240 |
+
'description' => esc_html__( 'Blog ID of the post.', 'top-10' ),
|
241 |
+
'type' => 'integer',
|
242 |
+
'sanitize_callback' => 'absint',
|
243 |
+
),
|
244 |
+
'activate_counter' => array(
|
245 |
+
'description' => esc_html__( 'Activate counter flag.', 'top-10' ),
|
246 |
+
'type' => 'integer',
|
247 |
+
'sanitize_callback' => 'absint',
|
248 |
+
),
|
249 |
+
'top_ten_debug' => array(
|
250 |
+
'description' => esc_html__( 'Debug flag.', 'top-10' ),
|
251 |
+
'type' => 'integer',
|
252 |
+
'sanitize_callback' => 'absint',
|
253 |
+
),
|
254 |
+
);
|
255 |
+
|
256 |
+
return apply_filters( 'top_ten_rest_api_get_tracker_params', $args );
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* Checks if a given post type can be viewed or managed.
|
261 |
+
*
|
262 |
+
* @since 3.0.0
|
263 |
+
*
|
264 |
+
* @param WP_Post_Type|string $post_type Post type name or object.
|
265 |
+
* @return bool Whether the post type is allowed in REST.
|
266 |
+
*/
|
267 |
+
protected function check_is_post_type_allowed( $post_type ) {
|
268 |
+
if ( ! is_object( $post_type ) ) {
|
269 |
+
$post_type = get_post_type_object( $post_type );
|
270 |
+
}
|
271 |
+
|
272 |
+
if ( ! empty( $post_type ) && ! empty( $post_type->show_in_rest ) ) {
|
273 |
+
return true;
|
274 |
+
}
|
275 |
+
|
276 |
+
return false;
|
277 |
+
}
|
278 |
+
|
279 |
+
/**
|
280 |
+
* Checks if a post can be read.
|
281 |
+
*
|
282 |
+
* Correctly handles posts with the inherit status.
|
283 |
+
*
|
284 |
+
* @since 3.0.0
|
285 |
+
*
|
286 |
+
* @param WP_Post $post Post object.
|
287 |
+
* @return bool Whether the post can be read.
|
288 |
+
*/
|
289 |
+
public function check_read_permission( $post ) {
|
290 |
+
$post_type = get_post_type_object( $post->post_type );
|
291 |
+
if ( ! $this->check_is_post_type_allowed( $post_type ) ) {
|
292 |
+
return false;
|
293 |
+
}
|
294 |
+
|
295 |
+
// Is the post readable?
|
296 |
+
if ( 'publish' === $post->post_status || current_user_can( 'read_post', $post->ID ) ) {
|
297 |
+
return true;
|
298 |
+
}
|
299 |
+
|
300 |
+
$post_status_obj = get_post_status_object( $post->post_status );
|
301 |
+
if ( $post_status_obj && $post_status_obj->public ) {
|
302 |
+
return true;
|
303 |
+
}
|
304 |
+
|
305 |
+
// Can we read the parent if we're inheriting?
|
306 |
+
if ( 'inherit' === $post->post_status && $post->post_parent > 0 ) {
|
307 |
+
$parent = get_post( $post->post_parent );
|
308 |
+
if ( $parent ) {
|
309 |
+
return $this->check_read_permission( $parent );
|
310 |
+
}
|
311 |
+
}
|
312 |
+
|
313 |
+
/*
|
314 |
+
* If there isn't a parent, but the status is set to inherit, assume
|
315 |
+
* it's published (as per get_post_status()).
|
316 |
+
*/
|
317 |
+
if ( 'inherit' === $post->post_status ) {
|
318 |
+
return true;
|
319 |
+
}
|
320 |
+
|
321 |
+
return false;
|
322 |
+
}
|
323 |
+
}
|
324 |
+
|
325 |
+
/**
|
326 |
+
* Function to register our new routes from the controller.
|
327 |
+
*
|
328 |
+
* @since 3.0.0
|
329 |
+
*/
|
330 |
+
function tptn_register_rest_routes() {
|
331 |
+
$controller = new Top_Ten_REST_API();
|
332 |
+
$controller->register_routes();
|
333 |
+
}
|
334 |
+
add_action( 'rest_api_init', 'tptn_register_rest_routes' );
|
includes/modules/class-top-ten-widget.php
CHANGED
@@ -3,10 +3,6 @@
|
|
3 |
* Widget class.
|
4 |
*
|
5 |
* @package Top_Ten
|
6 |
-
* @author Ajay D'Souza <me@ajaydsouza.com>
|
7 |
-
* @license GPL-2.0+
|
8 |
-
* @link https://webberzone.com
|
9 |
-
* @copyright 2008-2020 Ajay D'Souza
|
10 |
*/
|
11 |
|
12 |
// If this file is called directly, abort.
|
@@ -62,6 +58,7 @@ class Top_Ten_Widget extends WP_Widget {
|
|
62 |
$hour_range = isset( $instance['hour_range'] ) ? esc_attr( $instance['hour_range'] ) : '';
|
63 |
$include_categories = isset( $instance['include_categories'] ) ? esc_attr( $instance['include_categories'] ) : '';
|
64 |
$include_cat_ids = isset( $instance['include_cat_ids'] ) ? esc_attr( $instance['include_cat_ids'] ) : '';
|
|
|
65 |
|
66 |
// Parse the Post types.
|
67 |
$post_types = array();
|
@@ -155,6 +152,12 @@ class Top_Ten_Widget extends WP_Widget {
|
|
155 |
</label>
|
156 |
<input type="hidden" id="<?php echo esc_attr( $this->get_field_id( 'include_cat_ids' ) ); ?>" name="<?php echo esc_attr( $this->get_field_id( 'include_cat_ids' ) ); ?>" value="<?php echo esc_attr( $include_cat_ids ); ?>" />
|
157 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
<p><?php esc_html_e( 'Post types to include:', 'top-10' ); ?><br />
|
159 |
|
160 |
<?php foreach ( $wp_post_types as $wp_post_type ) { ?>
|
@@ -193,20 +196,21 @@ class Top_Ten_Widget extends WP_Widget {
|
|
193 |
* @return array Updated safe values to be saved.
|
194 |
*/
|
195 |
public function update( $new_instance, $old_instance ) {
|
196 |
-
$instance
|
197 |
-
$instance['title']
|
198 |
-
$instance['limit']
|
199 |
-
$instance['offset']
|
200 |
-
$instance['daily']
|
201 |
-
$instance['daily_range']
|
202 |
-
$instance['hour_range']
|
203 |
-
$instance['disp_list_count']
|
204 |
-
$instance['show_excerpt']
|
205 |
-
$instance['show_author']
|
206 |
-
$instance['show_date']
|
207 |
-
$instance['post_thumb_op']
|
208 |
-
$instance['thumb_height']
|
209 |
-
$instance['thumb_width']
|
|
|
210 |
|
211 |
// Process post types to be selected.
|
212 |
$wp_post_types = get_post_types(
|
@@ -283,31 +287,33 @@ class Top_Ten_Widget extends WP_Widget {
|
|
283 |
$thumb_height = ( isset( $instance['thumb_height'] ) && '' !== $instance['thumb_height'] ) ? absint( $instance['thumb_height'] ) : tptn_get_option( 'thumb_height' );
|
284 |
$thumb_width = ( isset( $instance['thumb_width'] ) && '' !== $instance['thumb_width'] ) ? absint( $instance['thumb_width'] ) : tptn_get_option( 'thumb_width' );
|
285 |
|
286 |
-
$disp_list_count
|
287 |
-
$show_excerpt
|
288 |
-
$show_author
|
289 |
-
$show_date
|
290 |
-
$post_types
|
291 |
-
$include_cat_ids
|
|
|
292 |
|
293 |
$arguments = array(
|
294 |
-
'is_widget'
|
295 |
-
'instance_id'
|
296 |
-
'heading'
|
297 |
-
'limit'
|
298 |
-
'offset'
|
299 |
-
'daily'
|
300 |
-
'daily_range'
|
301 |
-
'hour_range'
|
302 |
-
'show_excerpt'
|
303 |
-
'show_author'
|
304 |
-
'show_date'
|
305 |
-
'post_thumb_op'
|
306 |
-
'thumb_height'
|
307 |
-
'thumb_width'
|
308 |
-
'disp_list_count'
|
309 |
-
'post_types'
|
310 |
-
'include_cat_ids'
|
|
|
311 |
);
|
312 |
|
313 |
/**
|
3 |
* Widget class.
|
4 |
*
|
5 |
* @package Top_Ten
|
|
|
|
|
|
|
|
|
6 |
*/
|
7 |
|
8 |
// If this file is called directly, abort.
|
58 |
$hour_range = isset( $instance['hour_range'] ) ? esc_attr( $instance['hour_range'] ) : '';
|
59 |
$include_categories = isset( $instance['include_categories'] ) ? esc_attr( $instance['include_categories'] ) : '';
|
60 |
$include_cat_ids = isset( $instance['include_cat_ids'] ) ? esc_attr( $instance['include_cat_ids'] ) : '';
|
61 |
+
$include_post_ids = isset( $instance['include_post_ids'] ) ? esc_attr( $instance['include_post_ids'] ) : '';
|
62 |
|
63 |
// Parse the Post types.
|
64 |
$post_types = array();
|
152 |
</label>
|
153 |
<input type="hidden" id="<?php echo esc_attr( $this->get_field_id( 'include_cat_ids' ) ); ?>" name="<?php echo esc_attr( $this->get_field_id( 'include_cat_ids' ) ); ?>" value="<?php echo esc_attr( $include_cat_ids ); ?>" />
|
154 |
</p>
|
155 |
+
<p>
|
156 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'include_post_ids' ) ); ?>">
|
157 |
+
<?php esc_html_e( 'Include IDs', 'top-10' ); ?>:
|
158 |
+
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'include_post_ids' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'include_post_ids' ) ); ?>" type="text" value="<?php echo esc_attr( $include_post_ids ); ?>" />
|
159 |
+
</label>
|
160 |
+
</p>
|
161 |
<p><?php esc_html_e( 'Post types to include:', 'top-10' ); ?><br />
|
162 |
|
163 |
<?php foreach ( $wp_post_types as $wp_post_type ) { ?>
|
196 |
* @return array Updated safe values to be saved.
|
197 |
*/
|
198 |
public function update( $new_instance, $old_instance ) {
|
199 |
+
$instance = $old_instance;
|
200 |
+
$instance['title'] = wp_strip_all_tags( $new_instance['title'] );
|
201 |
+
$instance['limit'] = $new_instance['limit'];
|
202 |
+
$instance['offset'] = $new_instance['offset'];
|
203 |
+
$instance['daily'] = $new_instance['daily'];
|
204 |
+
$instance['daily_range'] = $new_instance['daily_range'];
|
205 |
+
$instance['hour_range'] = $new_instance['hour_range'];
|
206 |
+
$instance['disp_list_count'] = isset( $new_instance['disp_list_count'] ) ? true : false;
|
207 |
+
$instance['show_excerpt'] = isset( $new_instance['show_excerpt'] ) ? true : false;
|
208 |
+
$instance['show_author'] = isset( $new_instance['show_author'] ) ? true : false;
|
209 |
+
$instance['show_date'] = isset( $new_instance['show_date'] ) ? true : false;
|
210 |
+
$instance['post_thumb_op'] = $new_instance['post_thumb_op'];
|
211 |
+
$instance['thumb_height'] = $new_instance['thumb_height'];
|
212 |
+
$instance['thumb_width'] = $new_instance['thumb_width'];
|
213 |
+
$instance['include_post_ids'] = implode( ',', array_filter( array_map( 'absint', explode( ',', $new_instance['include_post_ids'] ) ) ) );
|
214 |
|
215 |
// Process post types to be selected.
|
216 |
$wp_post_types = get_post_types(
|
287 |
$thumb_height = ( isset( $instance['thumb_height'] ) && '' !== $instance['thumb_height'] ) ? absint( $instance['thumb_height'] ) : tptn_get_option( 'thumb_height' );
|
288 |
$thumb_width = ( isset( $instance['thumb_width'] ) && '' !== $instance['thumb_width'] ) ? absint( $instance['thumb_width'] ) : tptn_get_option( 'thumb_width' );
|
289 |
|
290 |
+
$disp_list_count = isset( $instance['disp_list_count'] ) ? esc_attr( $instance['disp_list_count'] ) : '';
|
291 |
+
$show_excerpt = isset( $instance['show_excerpt'] ) ? esc_attr( $instance['show_excerpt'] ) : '';
|
292 |
+
$show_author = isset( $instance['show_author'] ) ? esc_attr( $instance['show_author'] ) : '';
|
293 |
+
$show_date = isset( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
|
294 |
+
$post_types = isset( $instance['post_types'] ) ? $instance['post_types'] : tptn_get_option( 'post_types' );
|
295 |
+
$include_cat_ids = isset( $instance['include_cat_ids'] ) ? esc_attr( $instance['include_cat_ids'] ) : '';
|
296 |
+
$include_post_ids = isset( $instance['include_post_ids'] ) ? esc_attr( $instance['include_post_ids'] ) : '';
|
297 |
|
298 |
$arguments = array(
|
299 |
+
'is_widget' => 1,
|
300 |
+
'instance_id' => $this->number,
|
301 |
+
'heading' => 0,
|
302 |
+
'limit' => $limit,
|
303 |
+
'offset' => $offset,
|
304 |
+
'daily' => $daily,
|
305 |
+
'daily_range' => $daily_range,
|
306 |
+
'hour_range' => $hour_range,
|
307 |
+
'show_excerpt' => $show_excerpt,
|
308 |
+
'show_author' => $show_author,
|
309 |
+
'show_date' => $show_date,
|
310 |
+
'post_thumb_op' => $post_thumb_op,
|
311 |
+
'thumb_height' => $thumb_height,
|
312 |
+
'thumb_width' => $thumb_width,
|
313 |
+
'disp_list_count' => $disp_list_count,
|
314 |
+
'post_types' => $post_types,
|
315 |
+
'include_cat_ids' => $include_cat_ids,
|
316 |
+
'include_post_ids' => $include_post_ids,
|
317 |
);
|
318 |
|
319 |
/**
|
includes/modules/exclusions.php
CHANGED
@@ -6,18 +6,19 @@
|
|
6 |
*/
|
7 |
|
8 |
/**
|
9 |
-
*
|
10 |
*
|
11 |
* @since 2.2.0
|
12 |
*
|
13 |
-
* @param
|
14 |
-
* @return
|
15 |
*/
|
16 |
function tptn_exclude_post_ids( $exclude_post_ids ) {
|
17 |
global $wpdb;
|
18 |
|
19 |
$exclude_post_ids = (array) $exclude_post_ids;
|
20 |
|
|
|
21 |
$tptn_post_metas = $wpdb->get_results( "SELECT post_id, meta_value FROM {$wpdb->postmeta} WHERE `meta_key` = 'tptn_post_meta'", ARRAY_A ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
22 |
|
23 |
foreach ( $tptn_post_metas as $tptn_post_meta ) {
|
@@ -27,8 +28,20 @@ function tptn_exclude_post_ids( $exclude_post_ids ) {
|
|
27 |
$exclude_post_ids[] = $tptn_post_meta['post_id'];
|
28 |
}
|
29 |
}
|
30 |
-
return $exclude_post_ids;
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
add_filter( 'tptn_exclude_post_ids', 'tptn_exclude_post_ids' );
|
34 |
|
6 |
*/
|
7 |
|
8 |
/**
|
9 |
+
* Add additional post IDs to exclude. Filters `tptn_exclude_post_ids`.
|
10 |
*
|
11 |
* @since 2.2.0
|
12 |
*
|
13 |
+
* @param int[] $exclude_post_ids Original excluded post IDs.
|
14 |
+
* @return int[] Updated excluded post IDs array.
|
15 |
*/
|
16 |
function tptn_exclude_post_ids( $exclude_post_ids ) {
|
17 |
global $wpdb;
|
18 |
|
19 |
$exclude_post_ids = (array) $exclude_post_ids;
|
20 |
|
21 |
+
// Find all posts that have `exclude_this_post` set.
|
22 |
$tptn_post_metas = $wpdb->get_results( "SELECT post_id, meta_value FROM {$wpdb->postmeta} WHERE `meta_key` = 'tptn_post_meta'", ARRAY_A ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
23 |
|
24 |
foreach ( $tptn_post_metas as $tptn_post_meta ) {
|
28 |
$exclude_post_ids[] = $tptn_post_meta['post_id'];
|
29 |
}
|
30 |
}
|
|
|
31 |
|
32 |
+
// Exclude page_on_front and page_for_posts.
|
33 |
+
if ( 'page' === get_option( 'show_on_front' ) && tptn_get_option( 'exclude_front' ) ) {
|
34 |
+
$page_on_front = get_option( 'page_on_front' );
|
35 |
+
$page_for_posts = get_option( 'page_for_posts' );
|
36 |
+
if ( $page_on_front > 0 ) {
|
37 |
+
$exclude_post_ids[] = $page_on_front;
|
38 |
+
}
|
39 |
+
if ( $page_for_posts > 0 ) {
|
40 |
+
$exclude_post_ids[] = $page_for_posts;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
return $exclude_post_ids;
|
45 |
}
|
46 |
add_filter( 'tptn_exclude_post_ids', 'tptn_exclude_post_ids' );
|
47 |
|
includes/modules/taxonomies.php
CHANGED
@@ -10,31 +10,6 @@ if ( ! defined( 'WPINC' ) ) {
|
|
10 |
die;
|
11 |
}
|
12 |
|
13 |
-
/**
|
14 |
-
* Filter JOIN clause of tptn query to add taxonomy tables.
|
15 |
-
*
|
16 |
-
* @since 2.2.0
|
17 |
-
*
|
18 |
-
* @param mixed $join Join clause.
|
19 |
-
* @return string Filtered JOIN clause
|
20 |
-
*/
|
21 |
-
function tptn_exclude_categories_join( $join ) {
|
22 |
-
global $wpdb, $tptn_settings;
|
23 |
-
|
24 |
-
if ( '' !== tptn_get_option( 'exclude_categories' ) ) {
|
25 |
-
|
26 |
-
$sql = $join;
|
27 |
-
$sql .= " LEFT JOIN $wpdb->term_relationships AS excat_tr ON ($wpdb->posts.ID = excat_tr.object_id) ";
|
28 |
-
$sql .= " LEFT JOIN $wpdb->term_taxonomy AS excat_tt ON (excat_tr.term_taxonomy_id = excat_tt.term_taxonomy_id) ";
|
29 |
-
|
30 |
-
return $sql;
|
31 |
-
} else {
|
32 |
-
return $join;
|
33 |
-
}
|
34 |
-
}
|
35 |
-
add_filter( 'tptn_posts_join', 'tptn_exclude_categories_join' );
|
36 |
-
|
37 |
-
|
38 |
/**
|
39 |
* Filter WHERE clause of tptn query to exclude posts belonging to certain categories.
|
40 |
*
|
@@ -66,28 +41,3 @@ function tptn_exclude_categories_where( $where ) {
|
|
66 |
}
|
67 |
add_filter( 'tptn_posts_where', 'tptn_exclude_categories_where' );
|
68 |
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Filter GROUP BY clause of tptn query to exclude posts belonging to certain categories.
|
72 |
-
*
|
73 |
-
* @since 2.3.0
|
74 |
-
*
|
75 |
-
* @param mixed $groupby GROUP BY clause.
|
76 |
-
* @return string Filtered GROUP BY clause
|
77 |
-
*/
|
78 |
-
function tptn_exclude_categories_groupby( $groupby ) {
|
79 |
-
global $tptn_settings;
|
80 |
-
|
81 |
-
if ( '' !== tptn_get_option( 'exclude_categories' ) && '' !== $groupby ) {
|
82 |
-
|
83 |
-
$sql = $groupby;
|
84 |
-
$sql .= ', excat_tt.term_taxonomy_id ';
|
85 |
-
|
86 |
-
return $sql;
|
87 |
-
} else {
|
88 |
-
return $groupby;
|
89 |
-
}
|
90 |
-
}
|
91 |
-
add_filter( 'tptn_posts_groupby', 'tptn_exclude_categories_groupby' );
|
92 |
-
|
93 |
-
|
10 |
die;
|
11 |
}
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
/**
|
14 |
* Filter WHERE clause of tptn query to exclude posts belonging to certain categories.
|
15 |
*
|
41 |
}
|
42 |
add_filter( 'tptn_posts_where', 'tptn_exclude_categories_where' );
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/public/display-posts.php
CHANGED
@@ -13,10 +13,10 @@ if ( ! defined( 'WPINC' ) ) {
|
|
13 |
/**
|
14 |
* Function to return formatted list of popular posts.
|
15 |
*
|
16 |
-
* @since
|
17 |
*
|
18 |
-
* @param
|
19 |
-
* @return
|
20 |
*/
|
21 |
function tptn_pop_posts( $args ) {
|
22 |
global $tptn_settings;
|
@@ -35,7 +35,6 @@ function tptn_pop_posts( $args ) {
|
|
35 |
'is_manual' => false,
|
36 |
'echo' => false,
|
37 |
'strict_limit' => false,
|
38 |
-
'posts_only' => false,
|
39 |
'heading' => 1,
|
40 |
'offset' => 0,
|
41 |
);
|
@@ -59,7 +58,7 @@ function tptn_pop_posts( $args ) {
|
|
59 |
do_action( 'pre_tptn_pop_posts', $output, $args );
|
60 |
|
61 |
// Check if the cache is enabled and if the output exists. If so, return the output.
|
62 |
-
if ( $args['cache']
|
63 |
$cache_name = tptn_cache_get_key( $args );
|
64 |
|
65 |
$output = get_transient( $cache_name );
|
@@ -82,12 +81,7 @@ function tptn_pop_posts( $args ) {
|
|
82 |
list( $args['thumb_width'], $args['thumb_height'] ) = tptn_get_thumb_size( $args );
|
83 |
|
84 |
// Retrieve the popular posts.
|
85 |
-
$results =
|
86 |
-
|
87 |
-
if ( $args['posts_only'] ) { // Return the array of posts only if the variable is set.
|
88 |
-
_deprecated_argument( __FUNCTION__, '2.2.0', esc_html__( 'posts_only argument has been deprecated. Use get_tptn_pop_posts() to get the posts only.', 'top-10' ) );
|
89 |
-
return $results;
|
90 |
-
}
|
91 |
|
92 |
$counter = 0;
|
93 |
|
@@ -130,7 +124,9 @@ function tptn_pop_posts( $args ) {
|
|
130 |
// Push the current ID into the array to ensure we're not repeating it.
|
131 |
array_push( $processed_results, $resultid );
|
132 |
|
133 |
-
|
|
|
|
|
134 |
|
135 |
/**
|
136 |
* Filter the post ID for each result. Allows a custom function to hook in and change the ID if needed.
|
@@ -178,7 +174,7 @@ function tptn_pop_posts( $args ) {
|
|
178 |
|
179 |
if ( $args['disp_list_count'] ) {
|
180 |
|
181 |
-
$output .= ' <span class="tptn_list_count">' . tptn_list_count( $args, $result, $
|
182 |
}
|
183 |
|
184 |
$tptn_list = '';
|
@@ -333,7 +329,7 @@ function get_tptn_pop_posts( $args = array() ) {
|
|
333 |
|
334 |
// Fields to return.
|
335 |
$fields[] = "{$table_name}.postnumber";
|
336 |
-
$fields[] = ( $args['daily'] ) ? "SUM({$table_name}.cntaccess) as
|
337 |
$fields[] = "{$wpdb->posts}.ID";
|
338 |
|
339 |
$fields = implode( ', ', $fields );
|
@@ -352,11 +348,7 @@ function get_tptn_pop_posts( $args = array() ) {
|
|
352 |
// Convert exclude post IDs string to array so it can be filtered.
|
353 |
$exclude_post_ids = explode( ',', $args['exclude_post_ids'] );
|
354 |
|
355 |
-
/**
|
356 |
-
* Filter exclude post IDs array.
|
357 |
-
*
|
358 |
-
* @param array $exclude_post_ids Array of post IDs.
|
359 |
-
*/
|
360 |
$exclude_post_ids = apply_filters( 'tptn_exclude_post_ids', $exclude_post_ids );
|
361 |
|
362 |
// Convert it back to string.
|
@@ -386,7 +378,7 @@ function get_tptn_pop_posts( $args = array() ) {
|
|
386 |
}
|
387 |
|
388 |
// Create the base ORDER BY clause.
|
389 |
-
$orderby = '
|
390 |
|
391 |
// Create the base LIMITS clause.
|
392 |
$limits .= $wpdb->prepare( ' LIMIT %d, %d ', $offset, $limit );
|
@@ -497,10 +489,9 @@ function tptn_show_pop_posts( $args = null ) {
|
|
497 |
*/
|
498 |
function tptn_show_daily_pop_posts( $args = null ) {
|
499 |
if ( is_array( $args ) || ! isset( $args ) ) {
|
500 |
-
$args['daily']
|
501 |
-
$args['manual'] = 1;
|
502 |
} else {
|
503 |
-
$args .= '&daily=1
|
504 |
}
|
505 |
|
506 |
tptn_show_pop_posts( $args );
|
@@ -518,8 +509,13 @@ function tptn_pop_posts_feed() {
|
|
518 |
$popular_posts_overall = tptn_get_option( 'feed_permalink_overall' );
|
519 |
$popular_posts_daily = tptn_get_option( 'feed_permalink_daily' );
|
520 |
|
521 |
-
|
522 |
-
|
|
|
|
|
|
|
|
|
|
|
523 |
}
|
524 |
add_action( 'init', 'tptn_pop_posts_feed' );
|
525 |
|
@@ -586,3 +582,30 @@ function tptn_cache_get_key( $attr ) {
|
|
586 |
|
587 |
return $key;
|
588 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
/**
|
14 |
* Function to return formatted list of popular posts.
|
15 |
*
|
16 |
+
* @since 1.5
|
17 |
*
|
18 |
+
* @param mixed $args Arguments array.
|
19 |
+
* @return string HTML output of the popular posts.
|
20 |
*/
|
21 |
function tptn_pop_posts( $args ) {
|
22 |
global $tptn_settings;
|
35 |
'is_manual' => false,
|
36 |
'echo' => false,
|
37 |
'strict_limit' => false,
|
|
|
38 |
'heading' => 1,
|
39 |
'offset' => 0,
|
40 |
);
|
58 |
do_action( 'pre_tptn_pop_posts', $output, $args );
|
59 |
|
60 |
// Check if the cache is enabled and if the output exists. If so, return the output.
|
61 |
+
if ( $args['cache'] ) {
|
62 |
$cache_name = tptn_cache_get_key( $args );
|
63 |
|
64 |
$output = get_transient( $cache_name );
|
81 |
list( $args['thumb_width'], $args['thumb_height'] ) = tptn_get_thumb_size( $args );
|
82 |
|
83 |
// Retrieve the popular posts.
|
84 |
+
$results = get_tptn_posts( $args );
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
$counter = 0;
|
87 |
|
124 |
// Push the current ID into the array to ensure we're not repeating it.
|
125 |
array_push( $processed_results, $resultid );
|
126 |
|
127 |
+
// Store the count. We'll need this later.
|
128 |
+
$count = $args['daily'] ? 'daily' : 'total';
|
129 |
+
$visits = empty( $result->visits ) ? get_tptn_post_count_only( $resultid, $count ) : $result->visits;
|
130 |
|
131 |
/**
|
132 |
* Filter the post ID for each result. Allows a custom function to hook in and change the ID if needed.
|
174 |
|
175 |
if ( $args['disp_list_count'] ) {
|
176 |
|
177 |
+
$output .= ' <span class="tptn_list_count">' . tptn_list_count( $args, $result, $visits ) . '</span>';
|
178 |
}
|
179 |
|
180 |
$tptn_list = '';
|
329 |
|
330 |
// Fields to return.
|
331 |
$fields[] = "{$table_name}.postnumber";
|
332 |
+
$fields[] = ( $args['daily'] ) ? "SUM({$table_name}.cntaccess) as visits" : "{$table_name}.cntaccess as visits";
|
333 |
$fields[] = "{$wpdb->posts}.ID";
|
334 |
|
335 |
$fields = implode( ', ', $fields );
|
348 |
// Convert exclude post IDs string to array so it can be filtered.
|
349 |
$exclude_post_ids = explode( ',', $args['exclude_post_ids'] );
|
350 |
|
351 |
+
/** This filter is documented in class-top-ten-query.php */
|
|
|
|
|
|
|
|
|
352 |
$exclude_post_ids = apply_filters( 'tptn_exclude_post_ids', $exclude_post_ids );
|
353 |
|
354 |
// Convert it back to string.
|
378 |
}
|
379 |
|
380 |
// Create the base ORDER BY clause.
|
381 |
+
$orderby = ' visits DESC ';
|
382 |
|
383 |
// Create the base LIMITS clause.
|
384 |
$limits .= $wpdb->prepare( ' LIMIT %d, %d ', $offset, $limit );
|
489 |
*/
|
490 |
function tptn_show_daily_pop_posts( $args = null ) {
|
491 |
if ( is_array( $args ) || ! isset( $args ) ) {
|
492 |
+
$args['daily'] = 1;
|
|
|
493 |
} else {
|
494 |
+
$args .= '&daily=1';
|
495 |
}
|
496 |
|
497 |
tptn_show_pop_posts( $args );
|
509 |
$popular_posts_overall = tptn_get_option( 'feed_permalink_overall' );
|
510 |
$popular_posts_daily = tptn_get_option( 'feed_permalink_daily' );
|
511 |
|
512 |
+
if ( ! empty( $popular_posts_overall ) ) {
|
513 |
+
add_feed( $popular_posts_overall, 'tptn_pop_posts_feed_overall' );
|
514 |
+
}
|
515 |
+
if ( ! empty( $popular_posts_daily ) ) {
|
516 |
+
add_feed( $popular_posts_daily, 'tptn_pop_posts_feed_daily' );
|
517 |
+
}
|
518 |
+
|
519 |
}
|
520 |
add_action( 'init', 'tptn_pop_posts_feed' );
|
521 |
|
582 |
|
583 |
return $key;
|
584 |
}
|
585 |
+
|
586 |
+
/**
|
587 |
+
* Retrieves an array of the related posts.
|
588 |
+
*
|
589 |
+
* The defaults are as follows:
|
590 |
+
*
|
591 |
+
* @since 3.0.0
|
592 |
+
*
|
593 |
+
* @see Top_Ten_Query::prepare_query_args()
|
594 |
+
*
|
595 |
+
* @param array $args Optional. Arguments to retrieve posts. See WP_Query::parse_query() for all available arguments.
|
596 |
+
* @return WP_Post[]|int[] Array of post objects or post IDs.
|
597 |
+
*/
|
598 |
+
function get_tptn_posts( $args = array() ) {
|
599 |
+
|
600 |
+
$get_tptn_posts = new Top_Ten_Query( $args );
|
601 |
+
|
602 |
+
/**
|
603 |
+
* Filter array of post IDs or objects.
|
604 |
+
*
|
605 |
+
* @since 3.0.0
|
606 |
+
*
|
607 |
+
* @param WP_Post[]|int[] $posts Array of post objects or post IDs.
|
608 |
+
* @param array $args Arguments to retrieve posts.
|
609 |
+
*/
|
610 |
+
return apply_filters( 'get_tptn_posts', $get_tptn_posts->posts, $args );
|
611 |
+
}
|
includes/public/feed-rss2-popular-posts.php
CHANGED
@@ -10,7 +10,7 @@ $settings = array(
|
|
10 |
'daily_range' => tptn_get_option( 'feed_daily_range' ),
|
11 |
'limit' => tptn_get_option( 'feed_limit' ),
|
12 |
);
|
13 |
-
$topposts =
|
14 |
|
15 |
$topposts = wp_list_pluck( (array) $topposts, 'postnumber' );
|
16 |
|
10 |
'daily_range' => tptn_get_option( 'feed_daily_range' ),
|
11 |
'limit' => tptn_get_option( 'feed_limit' ),
|
12 |
);
|
13 |
+
$topposts = get_tptn_posts( $settings );
|
14 |
|
15 |
$topposts = wp_list_pluck( (array) $topposts, 'postnumber' );
|
16 |
|
includes/public/output-generator.php
CHANGED
@@ -366,7 +366,7 @@ function tptn_list_count( $args, $result, $visits ) {
|
|
366 |
* @since 2.1.0
|
367 |
*
|
368 |
* @param string $visits Formatted list count
|
369 |
-
* @param int $
|
370 |
* @param object $result Post object
|
371 |
* @param array $args Array of arguments.
|
372 |
* @param int $visits Number of visits.
|
366 |
* @since 2.1.0
|
367 |
*
|
368 |
* @param string $visits Formatted list count
|
369 |
+
* @param int $visits Post count
|
370 |
* @param object $result Post object
|
371 |
* @param array $args Array of arguments.
|
372 |
* @param int $visits Number of visits.
|
includes/public/styles.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
/**
|
9 |
* Function to add CSS to header.
|
10 |
*
|
11 |
-
* @since
|
12 |
*/
|
13 |
function tptn_header() {
|
14 |
|
@@ -27,25 +27,59 @@ add_action( 'wp_head', 'tptn_header' );
|
|
27 |
*/
|
28 |
function tptn_heading_styles() {
|
29 |
|
30 |
-
|
31 |
-
wp_register_style( 'tptn-style-left-thumbs', plugins_url( 'css/default-style.css', TOP_TEN_PLUGIN_FILE ), array(), '1.0' );
|
32 |
-
wp_enqueue_style( 'tptn-style-left-thumbs' );
|
33 |
|
34 |
-
|
35 |
-
$
|
|
|
36 |
|
37 |
-
$
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
}
|
42 |
-
|
43 |
|
44 |
-
wp_add_inline_style( 'tptn-style-left-thumbs', $custom_css );
|
45 |
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
-
|
49 |
-
|
|
|
|
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
/**
|
9 |
* Function to add CSS to header.
|
10 |
*
|
11 |
+
* @since 1.9
|
12 |
*/
|
13 |
function tptn_header() {
|
14 |
|
27 |
*/
|
28 |
function tptn_heading_styles() {
|
29 |
|
30 |
+
$style_array = tptn_get_style();
|
|
|
|
|
31 |
|
32 |
+
if ( ! empty( $style_array['name'] ) ) {
|
33 |
+
$style = $style_array['name'];
|
34 |
+
$extra_css = $style_array['extra_css'];
|
35 |
|
36 |
+
wp_register_style( "tptn-style-{$style}", plugins_url( "css/{$style}.min.css", TOP_TEN_PLUGIN_FILE ), array(), '1.0.1' );
|
37 |
+
wp_enqueue_style( "tptn-style-{$style}" );
|
38 |
+
wp_add_inline_style( "tptn-style-{$style}", $extra_css );
|
39 |
+
}
|
40 |
}
|
41 |
+
add_action( 'wp_enqueue_scripts', 'tptn_heading_styles' );
|
42 |
|
|
|
43 |
|
44 |
+
/**
|
45 |
+
* Get the current style for the popular posts.
|
46 |
+
*
|
47 |
+
* @since 3.0.0
|
48 |
+
*
|
49 |
+
* @return array Contains two elements:
|
50 |
+
* 'name' holding style name and 'extra_css' to be added inline.
|
51 |
+
*/
|
52 |
+
function tptn_get_style() {
|
53 |
|
54 |
+
$style = array();
|
55 |
+
$thumb_width = tptn_get_option( 'thumb_width' );
|
56 |
+
$thumb_height = tptn_get_option( 'thumb_height' );
|
57 |
+
$tptn_style = tptn_get_option( 'tptn_styles' );
|
58 |
|
59 |
+
switch ( $tptn_style ) {
|
60 |
+
case 'left_thumbs':
|
61 |
+
$style['name'] = 'left-thumbs';
|
62 |
+
$style['extra_css'] = "
|
63 |
+
.tptn_related a {
|
64 |
+
width: {$thumb_width}px;
|
65 |
+
height: {$thumb_height}px;
|
66 |
+
text-decoration: none;
|
67 |
+
}
|
68 |
+
.tptn_related img {
|
69 |
+
max-width: {$thumb_width}px;
|
70 |
+
margin: auto;
|
71 |
+
}
|
72 |
+
.tptn_related .tptn_title {
|
73 |
+
width: 100%;
|
74 |
+
}
|
75 |
+
";
|
76 |
+
break;
|
77 |
|
78 |
+
default:
|
79 |
+
$style['name'] = '';
|
80 |
+
$style['extra_css'] = '';
|
81 |
+
break;
|
82 |
+
}
|
83 |
+
|
84 |
+
return $style;
|
85 |
+
}
|
includes/tracker.php
CHANGED
@@ -49,11 +49,24 @@ function tptn_enqueue_scripts() {
|
|
49 |
$activate_counter = ! empty( $trackers['overall'] ) ? 1 : 0; // It's 1 if we're updating the overall count.
|
50 |
$activate_counter = $activate_counter + ( ! empty( $trackers['daily'] ) ? 10 : 0 ); // It's 10 if we're updating the daily count.
|
51 |
$top_ten_debug = absint( tptn_get_option( 'debug_mode' ) );
|
|
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
58 |
|
59 |
/**
|
@@ -156,7 +169,7 @@ function tptn_parse_request( $wp ) {
|
|
156 |
// If the debug parameter is set then we output $str else we send a No Content header.
|
157 |
if ( array_key_exists( 'top_ten_debug', $wp->query_vars ) && 1 === absint( $wp->query_vars['top_ten_debug'] ) ) {
|
158 |
header( 'content-type: application/x-javascript' );
|
159 |
-
|
160 |
} else {
|
161 |
header( 'HTTP/1.0 204 No Content' );
|
162 |
header( 'Cache-Control: max-age=15, s-maxage=0' );
|
@@ -275,6 +288,11 @@ function tptn_update_count( $id, $blog_id, $activate_counter ) {
|
|
275 |
function tptn_get_tracker_types() {
|
276 |
|
277 |
$trackers = array(
|
|
|
|
|
|
|
|
|
|
|
278 |
array(
|
279 |
'id' => 'query_based',
|
280 |
'name' => __( 'Query variable based', 'top-10' ),
|
49 |
$activate_counter = ! empty( $trackers['overall'] ) ? 1 : 0; // It's 1 if we're updating the overall count.
|
50 |
$activate_counter = $activate_counter + ( ! empty( $trackers['daily'] ) ? 10 : 0 ); // It's 10 if we're updating the daily count.
|
51 |
$top_ten_debug = absint( tptn_get_option( 'debug_mode' ) );
|
52 |
+
$tracker_type = tptn_get_option( 'tracker_type' );
|
53 |
|
54 |
+
switch ( $tracker_type ) {
|
55 |
+
case 'query_based':
|
56 |
+
$home_url = home_url( '/' );
|
57 |
+
break;
|
58 |
+
|
59 |
+
case 'ajaxurl':
|
60 |
+
$home_url = admin_url( 'admin-ajax.php' );
|
61 |
+
break;
|
62 |
+
|
63 |
+
case 'rest_based':
|
64 |
+
$home_url = rest_url( 'top-10/v1/tracker' );
|
65 |
+
break;
|
66 |
+
|
67 |
+
default:
|
68 |
+
$home_url = rest_url( 'top-10/v1/tracker' );
|
69 |
+
break;
|
70 |
}
|
71 |
|
72 |
/**
|
169 |
// If the debug parameter is set then we output $str else we send a No Content header.
|
170 |
if ( array_key_exists( 'top_ten_debug', $wp->query_vars ) && 1 === absint( $wp->query_vars['top_ten_debug'] ) ) {
|
171 |
header( 'content-type: application/x-javascript' );
|
172 |
+
wp_send_json( $str );
|
173 |
} else {
|
174 |
header( 'HTTP/1.0 204 No Content' );
|
175 |
header( 'Cache-Control: max-age=15, s-maxage=0' );
|
288 |
function tptn_get_tracker_types() {
|
289 |
|
290 |
$trackers = array(
|
291 |
+
array(
|
292 |
+
'id' => 'rest_based',
|
293 |
+
'name' => __( 'REST API based', 'top-10' ),
|
294 |
+
'description' => __( 'Uses the REST API to record visits', 'top-10' ),
|
295 |
+
),
|
296 |
array(
|
297 |
'id' => 'query_based',
|
298 |
'name' => __( 'Query variable based', 'top-10' ),
|
languages/top-10-en_US.mo
CHANGED
Binary file
|
languages/top-10-en_US.po
CHANGED
@@ -2,7 +2,7 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Top 10\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date:
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
|
8 |
"Language-Team: WebberZone <plugins@webberzone.com>\n"
|
@@ -13,136 +13,132 @@ msgstr ""
|
|
13 |
"X-Poedit-KeywordsList: __;_e;_c;__ngettext;esc_html__;esc_attr__;esc_html_e;"
|
14 |
"esc_attr_e\n"
|
15 |
"X-Poedit-Basepath: ..\n"
|
16 |
-
"X-Generator: Poedit
|
17 |
"X-Poedit-SourceCharset: UTF-8\n"
|
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19 |
"X-Poedit-SearchPath-0: .\n"
|
20 |
|
21 |
-
#: includes/admin/admin-columns.php:
|
22 |
msgid "Total Views"
|
23 |
msgstr ""
|
24 |
|
25 |
-
#: includes/admin/admin-columns.php:
|
26 |
msgid "Today's Views"
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: includes/admin/admin-columns.php:
|
30 |
msgid "Views"
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: includes/admin/admin-dashboard.php:
|
34 |
msgid "View all daily popular posts"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: includes/admin/admin-dashboard.php:
|
|
|
38 |
msgid "View all popular posts"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: includes/admin/admin-dashboard.php:
|
42 |
#, php-format
|
43 |
msgid "Popular posts by <a href=\"%s\" target=\"_blank\">Top 10 plugin</a>"
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: includes/admin/admin-dashboard.php:
|
47 |
-
#: includes/admin/class-top-ten-network-statistics.php:
|
48 |
-
#: includes/admin/class-top-ten-statistics.php:
|
49 |
msgid "Popular Posts"
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: includes/admin/admin-dashboard.php:
|
53 |
msgid "Daily Popular Posts"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: includes/admin/admin-metabox.php:
|
57 |
msgid "Visit count:"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: includes/admin/admin-metabox.php:
|
61 |
msgid ""
|
62 |
"Enter a number above to update the visit count. Leaving the above box blank "
|
63 |
"will set the count to zero"
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: includes/admin/admin-metabox.php:
|
67 |
msgid "Disable Popular Posts display:"
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: includes/admin/admin-metabox.php:
|
71 |
msgid ""
|
72 |
"If this is checked, then Top 10 will not display the popular posts widgets "
|
73 |
"when viewing this post."
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: includes/admin/admin-metabox.php:
|
77 |
msgid "Exclude this post from the popular posts list:"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: includes/admin/admin-metabox.php:
|
81 |
msgid ""
|
82 |
"If this is checked, then this post will be excluded from the popular posts "
|
83 |
"list."
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: includes/admin/admin-metabox.php:
|
87 |
msgid "Location of thumbnail:"
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: includes/admin/admin-metabox.php:
|
91 |
msgid ""
|
92 |
"Enter the full URL to the image (JPG, PNG or GIF) you'd like to use. This "
|
93 |
"image will be used for the post. It will be resized to the thumbnail size "
|
94 |
"set under Top 10 Settings » Thumbnail options."
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: includes/admin/admin-metabox.php:
|
98 |
msgid "The URL above is saved in the meta field:"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: includes/admin/admin-metabox.php:
|
102 |
#, php-format
|
103 |
msgid ""
|
104 |
"You have %1$s installed. If you are trying to modify the thumbnail, then you "
|
105 |
"will need to make the same change in the %1$s meta box on this page."
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: includes/admin/admin.php:34 includes/admin/
|
109 |
-
#: includes/admin/settings-page.php:32
|
110 |
msgid "Top 10 Settings"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: includes/admin/admin.php:34 includes/admin/admin.php:
|
114 |
-
msgid "Top 10"
|
115 |
-
msgstr ""
|
116 |
-
|
117 |
-
#: includes/admin/admin.php:37 includes/admin/admin.php:159
|
118 |
msgid "Settings"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: includes/admin/admin.php:
|
122 |
msgid "Top 10 Popular Posts"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: includes/admin/admin.php:
|
126 |
msgid "Top 10 Daily Popular Posts"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: includes/admin/admin.php:
|
130 |
msgid "Top 10 Tools"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: includes/admin/admin.php:
|
134 |
msgid "Tools"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: includes/admin/admin.php:
|
138 |
msgid "Top 10 Import Export Tables"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: includes/admin/admin.php:
|
142 |
msgid "Import/Export"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: includes/admin/admin.php:
|
146 |
#, php-format
|
147 |
msgid ""
|
148 |
"Thank you for using <a href=\"%1$s\" target=\"_blank\">Top 10</a>! Please <a "
|
@@ -150,118 +146,231 @@ msgid ""
|
|
150 |
"\"_blank\">WordPress.org</a>"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: includes/admin/admin.php:
|
154 |
msgid "Support"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: includes/admin/admin.php:
|
158 |
msgid "Donate"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: includes/admin/admin.php:
|
162 |
msgid "Contribute"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: includes/admin/admin.php:
|
166 |
msgid "Top 10 - Network Popular Posts"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: includes/admin/class-top-ten-
|
170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
msgid "popular_post"
|
172 |
msgstr ""
|
173 |
|
174 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
175 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
176 |
msgid "popular_posts"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
180 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
181 |
msgid "No popular posts available."
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
185 |
-
|
|
|
|
|
|
|
|
|
186 |
msgid "Y/m/d"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
190 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
191 |
-
#: includes/modules/class-top-ten-count-widget.php:
|
192 |
-
#: includes/modules/class-top-ten-widget.php:
|
193 |
msgid "Title"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
197 |
msgid "Blog"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
201 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
202 |
#: includes/admin/import-export.php:183
|
203 |
msgid "Date"
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
207 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
208 |
msgid "Total visits"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
212 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
213 |
msgid "Daily visits"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
217 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
218 |
msgid "Delete Count"
|
219 |
msgstr ""
|
220 |
|
221 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
222 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
223 |
msgid "Are you sure you want to do this"
|
224 |
msgstr ""
|
225 |
|
226 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
227 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
228 |
msgid "Filter"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: includes/admin/class-top-ten-network-statistics.php:
|
232 |
msgid "Top 10 - Network Wide Popular Posts"
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
236 |
msgid "All post types"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
240 |
msgid "View"
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
244 |
msgid "Edit"
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
248 |
msgid "Delete"
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
252 |
#, php-format
|
253 |
msgid "%s ago"
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
257 |
msgid "Post type"
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
261 |
msgid "Author"
|
262 |
msgstr ""
|
263 |
|
264 |
-
#: includes/admin/class-top-ten-statistics.php:
|
265 |
msgid "Search Table"
|
266 |
msgstr ""
|
267 |
|
@@ -270,12 +379,12 @@ msgid "Enable trackers"
|
|
270 |
msgstr ""
|
271 |
|
272 |
#: includes/admin/default-settings.php:72
|
273 |
-
#: includes/modules/class-top-ten-widget.php:
|
274 |
msgid "Overall"
|
275 |
msgstr ""
|
276 |
|
277 |
#: includes/admin/default-settings.php:73
|
278 |
-
#: includes/admin/default-settings.php:
|
279 |
msgid "Daily"
|
280 |
msgstr ""
|
281 |
|
@@ -551,7 +660,7 @@ msgid ""
|
|
551 |
msgstr ""
|
552 |
|
553 |
#: includes/admin/default-settings.php:320
|
554 |
-
#: includes/admin/default-settings.php:
|
555 |
msgid "Number of posts to display"
|
556 |
msgstr ""
|
557 |
|
@@ -585,31 +694,43 @@ msgid ""
|
|
585 |
msgstr ""
|
586 |
|
587 |
#: includes/admin/default-settings.php:342
|
588 |
-
msgid "
|
589 |
msgstr ""
|
590 |
|
591 |
#: includes/admin/default-settings.php:343
|
592 |
msgid ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
593 |
"Comma-separated list of post or page IDs to exclude from the list. e.g. "
|
594 |
"188,320,500"
|
595 |
msgstr ""
|
596 |
|
597 |
-
#: includes/admin/default-settings.php:
|
598 |
msgid "Exclude Categories"
|
599 |
msgstr ""
|
600 |
|
601 |
-
#: includes/admin/default-settings.php:
|
602 |
msgid ""
|
603 |
"Comma separated list of category slugs. The field above has an autocomplete "
|
604 |
"so simply start typing in the starting letters and it will prompt you with "
|
605 |
"options. Does not support custom taxonomies."
|
606 |
msgstr ""
|
607 |
|
608 |
-
#: includes/admin/default-settings.php:
|
609 |
msgid "Exclude category IDs"
|
610 |
msgstr ""
|
611 |
|
612 |
-
#: includes/admin/default-settings.php:
|
613 |
msgid ""
|
614 |
"This is a readonly field that is automatically populated based on the above "
|
615 |
"input when the settings are saved. These might differ from the IDs visible "
|
@@ -617,134 +738,138 @@ msgid ""
|
|
617 |
"term_taxonomy_id which is unique to this taxonomy."
|
618 |
msgstr ""
|
619 |
|
620 |
-
#: includes/admin/default-settings.php:
|
621 |
msgid "Customize the output"
|
622 |
msgstr ""
|
623 |
|
624 |
-
#: includes/admin/default-settings.php:
|
625 |
msgid "Heading of posts"
|
626 |
msgstr ""
|
627 |
|
628 |
-
#: includes/admin/default-settings.php:
|
629 |
-
#: includes/admin/default-settings.php:
|
630 |
msgid "Displayed before the list of the posts as a the master heading"
|
631 |
msgstr ""
|
632 |
|
633 |
-
#: includes/admin/default-settings.php:
|
634 |
msgid "Popular posts:"
|
635 |
msgstr ""
|
636 |
|
637 |
-
#: includes/admin/default-settings.php:
|
638 |
msgid "Heading of posts for daily/custom period lists"
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: includes/admin/default-settings.php:
|
642 |
msgid "Currently trending:"
|
643 |
msgstr ""
|
644 |
|
645 |
-
#: includes/admin/default-settings.php:
|
646 |
msgid "Show when no posts are found"
|
647 |
msgstr ""
|
648 |
|
649 |
-
#: includes/admin/default-settings.php:
|
650 |
msgid "Blank output"
|
651 |
msgstr ""
|
652 |
|
653 |
-
#: includes/admin/default-settings.php:
|
654 |
msgid "Display custom text"
|
655 |
msgstr ""
|
656 |
|
657 |
-
#: includes/admin/default-settings.php:
|
658 |
msgid "Custom text"
|
659 |
msgstr ""
|
660 |
|
661 |
-
#: includes/admin/default-settings.php:
|
662 |
msgid ""
|
663 |
"Enter the custom text that will be displayed if the second option is "
|
664 |
"selected above"
|
665 |
msgstr ""
|
666 |
|
667 |
-
#: includes/admin/default-settings.php:
|
668 |
msgid "No top posts yet"
|
669 |
msgstr ""
|
670 |
|
671 |
-
#: includes/admin/default-settings.php:
|
672 |
msgid "Show post excerpt"
|
673 |
msgstr ""
|
674 |
|
675 |
-
#: includes/admin/default-settings.php:
|
676 |
msgid "Length of excerpt (in words)"
|
677 |
msgstr ""
|
678 |
|
679 |
-
#: includes/admin/default-settings.php:
|
|
|
|
|
680 |
msgid "Show date"
|
681 |
msgstr ""
|
682 |
|
683 |
-
#: includes/admin/default-settings.php:
|
|
|
|
|
684 |
msgid "Show author"
|
685 |
msgstr ""
|
686 |
|
687 |
-
#: includes/admin/default-settings.php:
|
688 |
msgid "Show number of views"
|
689 |
msgstr ""
|
690 |
|
691 |
-
#: includes/admin/default-settings.php:
|
692 |
msgid "Limit post title length (in characters)"
|
693 |
msgstr ""
|
694 |
|
695 |
-
#: includes/admin/default-settings.php:
|
696 |
msgid "Open links in new window"
|
697 |
msgstr ""
|
698 |
|
699 |
-
#: includes/admin/default-settings.php:
|
700 |
msgid "Add nofollow to links"
|
701 |
msgstr ""
|
702 |
|
703 |
-
#: includes/admin/default-settings.php:
|
704 |
msgid "HTML to display"
|
705 |
msgstr ""
|
706 |
|
707 |
-
#: includes/admin/default-settings.php:
|
708 |
msgid "Before the list of posts"
|
709 |
msgstr ""
|
710 |
|
711 |
-
#: includes/admin/default-settings.php:
|
712 |
msgid "After the list of posts"
|
713 |
msgstr ""
|
714 |
|
715 |
-
#: includes/admin/default-settings.php:
|
716 |
msgid "Before each list item"
|
717 |
msgstr ""
|
718 |
|
719 |
-
#: includes/admin/default-settings.php:
|
720 |
msgid "After each list item"
|
721 |
msgstr ""
|
722 |
|
723 |
-
#: includes/admin/default-settings.php:
|
724 |
msgid "Location of the post thumbnail"
|
725 |
msgstr ""
|
726 |
|
727 |
-
#: includes/admin/default-settings.php:
|
728 |
msgid "Display thumbnails inline with posts, before title"
|
729 |
msgstr ""
|
730 |
|
731 |
-
#: includes/admin/default-settings.php:
|
732 |
msgid "Display thumbnails inline with posts, after title"
|
733 |
msgstr ""
|
734 |
|
735 |
-
#: includes/admin/default-settings.php:
|
736 |
msgid "Display only thumbnails, no text"
|
737 |
msgstr ""
|
738 |
|
739 |
-
#: includes/admin/default-settings.php:
|
740 |
msgid "Do not display thumbnails, only text"
|
741 |
msgstr ""
|
742 |
|
743 |
-
#: includes/admin/default-settings.php:
|
744 |
msgid "Thumbnail size"
|
745 |
msgstr ""
|
746 |
|
747 |
-
#: includes/admin/default-settings.php:
|
748 |
msgid ""
|
749 |
"You can choose from existing image sizes above or create a custom size. If "
|
750 |
"you have chosen Custom size above, then enter the width, height and crop "
|
@@ -752,166 +877,167 @@ msgid ""
|
|
752 |
"width and/or height below, existing images will not be automatically resized."
|
753 |
msgstr ""
|
754 |
|
755 |
-
#: includes/admin/default-settings.php:
|
756 |
#, php-format
|
757 |
msgid "I recommend using %1$s or %2$s to regenerate all image sizes."
|
758 |
msgstr ""
|
759 |
|
760 |
-
#: includes/admin/default-settings.php:
|
761 |
-
#: includes/modules/class-top-ten-widget.php:
|
762 |
msgid "Thumbnail width"
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: includes/admin/default-settings.php:
|
766 |
-
#: includes/modules/class-top-ten-widget.php:
|
767 |
msgid "Thumbnail height"
|
768 |
msgstr ""
|
769 |
|
770 |
-
#: includes/admin/default-settings.php:
|
771 |
msgid "Hard crop thumbnails"
|
772 |
msgstr ""
|
773 |
|
774 |
-
#: includes/admin/default-settings.php:
|
775 |
msgid ""
|
776 |
"Check this box to hard crop the thumbnails. i.e. force the width and height "
|
777 |
"above vs. maintaining proportions."
|
778 |
msgstr ""
|
779 |
|
780 |
-
#: includes/admin/default-settings.php:
|
781 |
msgid "Generate thumbnail sizes"
|
782 |
msgstr ""
|
783 |
|
784 |
-
#: includes/admin/default-settings.php:
|
785 |
msgid ""
|
786 |
"If you select this option and Custom size is selected above, the plugin will "
|
787 |
"register the image size with WordPress to create new thumbnails. Does not "
|
788 |
"update old images as explained above."
|
789 |
msgstr ""
|
790 |
|
791 |
-
#: includes/admin/default-settings.php:
|
792 |
msgid "Thumbnail size attributes"
|
793 |
msgstr ""
|
794 |
|
795 |
-
#: includes/admin/default-settings.php:
|
796 |
#, php-format
|
797 |
msgid "Use CSS to set the width and height: e.g. %s"
|
798 |
msgstr ""
|
799 |
|
800 |
-
#: includes/admin/default-settings.php:
|
801 |
#, php-format
|
802 |
msgid "Use HTML attributes to set the width and height: e.g. %s"
|
803 |
msgstr ""
|
804 |
|
805 |
-
#: includes/admin/default-settings.php:
|
806 |
msgid ""
|
807 |
"No width or height set. You will need to use external styles to force any "
|
808 |
"width or height of your choice."
|
809 |
msgstr ""
|
810 |
|
811 |
-
#: includes/admin/default-settings.php:
|
812 |
msgid "Thumbnail meta field name"
|
813 |
msgstr ""
|
814 |
|
815 |
-
#: includes/admin/default-settings.php:
|
816 |
msgid ""
|
817 |
"The value of this field should contain the URL of the image and can be set "
|
818 |
"in the metabox in the Edit Post screen"
|
819 |
msgstr ""
|
820 |
|
821 |
-
#: includes/admin/default-settings.php:
|
822 |
msgid "Get first image"
|
823 |
msgstr ""
|
824 |
|
825 |
-
#: includes/admin/default-settings.php:
|
826 |
msgid ""
|
827 |
"The plugin will fetch the first image in the post content if this is "
|
828 |
"enabled. This can slow down the loading of your page if the first image in "
|
829 |
"the followed posts is large in file-size."
|
830 |
msgstr ""
|
831 |
|
832 |
-
#: includes/admin/default-settings.php:
|
833 |
msgid "Use default thumbnail?"
|
834 |
msgstr ""
|
835 |
|
836 |
-
#: includes/admin/default-settings.php:
|
837 |
msgid ""
|
838 |
"If checked, when no thumbnail is found, show a default one from the URL "
|
839 |
"below. If not checked and no thumbnail is found, no image will be shown."
|
840 |
msgstr ""
|
841 |
|
842 |
-
#: includes/admin/default-settings.php:
|
843 |
msgid "Default thumbnail"
|
844 |
msgstr ""
|
845 |
|
846 |
-
#: includes/admin/default-settings.php:
|
847 |
msgid ""
|
848 |
"Enter the full URL of the image that you wish to display if no thumbnail is "
|
849 |
"found. This image will be displayed below."
|
850 |
msgstr ""
|
851 |
|
852 |
-
#: includes/admin/default-settings.php:
|
853 |
msgid "Popular posts style"
|
854 |
msgstr ""
|
855 |
|
856 |
-
#: includes/admin/default-settings.php:
|
857 |
msgid "Custom CSS"
|
858 |
msgstr ""
|
859 |
|
860 |
-
#: includes/admin/default-settings.php:
|
861 |
#, php-format
|
862 |
msgid ""
|
863 |
"Do not include %3$sstyle%4$s tags. Check out the %1$sFAQ%2$s for available "
|
864 |
"CSS classes to style."
|
865 |
msgstr ""
|
866 |
|
867 |
-
#: includes/admin/default-settings.php:
|
868 |
msgid "Enable scheduled maintenance"
|
869 |
msgstr ""
|
870 |
|
871 |
-
#: includes/admin/default-settings.php:
|
|
|
872 |
msgid ""
|
873 |
"Cleaning the database at regular intervals could improve performance, "
|
874 |
"especially on high traffic blogs. Enabling maintenance will automatically "
|
875 |
-
"delete entries older than
|
876 |
msgstr ""
|
877 |
|
878 |
-
#: includes/admin/default-settings.php:
|
879 |
msgid "Time to run maintenance"
|
880 |
msgstr ""
|
881 |
|
882 |
-
#: includes/admin/default-settings.php:
|
883 |
msgid "The next two options allow you to set the time to run the cron."
|
884 |
msgstr ""
|
885 |
|
886 |
-
#: includes/admin/default-settings.php:
|
887 |
msgid "Hour"
|
888 |
msgstr ""
|
889 |
|
890 |
-
#: includes/admin/default-settings.php:
|
891 |
msgid "Minute"
|
892 |
msgstr ""
|
893 |
|
894 |
-
#: includes/admin/default-settings.php:
|
895 |
msgid "Run maintenance"
|
896 |
msgstr ""
|
897 |
|
898 |
-
#: includes/admin/default-settings.php:
|
899 |
msgid "Weekly"
|
900 |
msgstr ""
|
901 |
|
902 |
-
#: includes/admin/default-settings.php:
|
903 |
msgid "Fortnightly"
|
904 |
msgstr ""
|
905 |
|
906 |
-
#: includes/admin/default-settings.php:
|
907 |
msgid "Monthly"
|
908 |
msgstr ""
|
909 |
|
910 |
-
#: includes/admin/default-settings.php:
|
911 |
msgid "Permalink - Overall"
|
912 |
msgstr ""
|
913 |
|
914 |
-
#: includes/admin/default-settings.php:
|
915 |
#, php-format
|
916 |
msgid ""
|
917 |
"This will set the path of the custom feed generated by the plugin for "
|
@@ -919,11 +1045,11 @@ msgid ""
|
|
919 |
"when changing this option."
|
920 |
msgstr ""
|
921 |
|
922 |
-
#: includes/admin/default-settings.php:
|
923 |
msgid "Permalink - Daily"
|
924 |
msgstr ""
|
925 |
|
926 |
-
#: includes/admin/default-settings.php:
|
927 |
#, php-format
|
928 |
msgid ""
|
929 |
"This will set the path of the custom feed generated by the plugin for daily/"
|
@@ -931,70 +1057,42 @@ msgid ""
|
|
931 |
"%2$s when changing this option."
|
932 |
msgstr ""
|
933 |
|
934 |
-
#: includes/admin/default-settings.php:
|
935 |
msgid "Maximum number of posts that will be displayed in the custom feed."
|
936 |
msgstr ""
|
937 |
|
938 |
-
#: includes/admin/default-settings.php:
|
939 |
msgid "Custom period in day(s)"
|
940 |
msgstr ""
|
941 |
|
942 |
-
#: includes/admin/default-settings.php:
|
943 |
msgid "No styles"
|
944 |
msgstr ""
|
945 |
|
946 |
-
#: includes/admin/default-settings.php:
|
947 |
msgid "Select this option if you plan to add your own styles"
|
948 |
msgstr ""
|
949 |
|
950 |
-
#: includes/admin/default-settings.php:
|
951 |
msgid "Text only"
|
952 |
msgstr ""
|
953 |
|
954 |
-
#: includes/admin/default-settings.php:
|
955 |
msgid ""
|
956 |
"Disable thumbnails and no longer include the default style sheet included in "
|
957 |
"the plugin"
|
958 |
msgstr ""
|
959 |
|
960 |
-
#: includes/admin/default-settings.php:
|
961 |
msgid "Left thumbnails"
|
962 |
msgstr ""
|
963 |
|
964 |
-
#: includes/admin/default-settings.php:
|
965 |
msgid ""
|
966 |
"Enabling this option will set the post thumbnail to be before text. "
|
967 |
"Disabling this option will not revert any settings."
|
968 |
msgstr ""
|
969 |
|
970 |
-
#: includes/admin/help-tab.php:35 includes/admin/help-tab.php:136
|
971 |
-
#: includes/admin/help-tab.php:176
|
972 |
-
#, php-format
|
973 |
-
msgid ""
|
974 |
-
"For more information or how to get support visit the <a href=\"%1$s"
|
975 |
-
"\">WebberZone support site</a>."
|
976 |
-
msgstr ""
|
977 |
-
|
978 |
-
#: includes/admin/help-tab.php:37 includes/admin/help-tab.php:138
|
979 |
-
#: includes/admin/help-tab.php:178
|
980 |
-
#, php-format
|
981 |
-
msgid ""
|
982 |
-
"Support queries should be posted in the <a href=\"%1$s\">WordPress.org "
|
983 |
-
"support forums</a>."
|
984 |
-
msgstr ""
|
985 |
-
|
986 |
-
#: includes/admin/help-tab.php:40 includes/admin/help-tab.php:141
|
987 |
-
#, php-format
|
988 |
-
msgid ""
|
989 |
-
"<a href=\"%1$s\">Post an issue</a> on <a href=\"%2$s\">GitHub</a> (bug "
|
990 |
-
"reports only)."
|
991 |
-
msgstr ""
|
992 |
-
|
993 |
-
#: includes/admin/help-tab.php:49 includes/admin/help-tab.php:150
|
994 |
-
#: includes/admin/help-tab.php:189 includes/admin/settings-page.php:125
|
995 |
-
msgid "General"
|
996 |
-
msgstr ""
|
997 |
-
|
998 |
#: includes/admin/help-tab.php:51
|
999 |
msgid "This screen provides the basic settings for configuring Top 10."
|
1000 |
msgstr ""
|
@@ -1223,10 +1321,6 @@ msgstr ""
|
|
1223 |
msgid "Post ID"
|
1224 |
msgstr ""
|
1225 |
|
1226 |
-
#: includes/admin/import-export.php:180
|
1227 |
-
msgid "Visits"
|
1228 |
-
msgstr ""
|
1229 |
-
|
1230 |
#: includes/admin/import-export.php:185
|
1231 |
msgid "Blog ID"
|
1232 |
msgstr ""
|
@@ -1463,6 +1557,112 @@ msgstr ""
|
|
1463 |
msgid "This will delete the duplicate entries in the tables. Proceed?"
|
1464 |
msgstr ""
|
1465 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1466 |
#: includes/cron.php:87
|
1467 |
msgid "Once Weekly"
|
1468 |
msgstr ""
|
@@ -1491,97 +1691,111 @@ msgstr ""
|
|
1491 |
msgid "There is no excerpt because this is a protected post."
|
1492 |
msgstr ""
|
1493 |
|
1494 |
-
#: includes/modules/class-top-ten-count-widget.php:
|
1495 |
msgid "Overall count [Top 10]"
|
1496 |
msgstr ""
|
1497 |
|
1498 |
-
#: includes/modules/class-top-ten-count-widget.php:
|
1499 |
msgid "Display overall count"
|
1500 |
msgstr ""
|
1501 |
|
1502 |
-
#: includes/modules/class-top-ten-
|
1503 |
-
msgid "
|
1504 |
msgstr ""
|
1505 |
|
1506 |
-
#: includes/modules/class-top-ten-
|
1507 |
-
msgid "
|
1508 |
msgstr ""
|
1509 |
|
1510 |
-
#: includes/modules/class-top-ten-
|
1511 |
-
msgid "
|
1512 |
msgstr ""
|
1513 |
|
1514 |
-
#: includes/modules/class-top-ten-
|
1515 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1516 |
msgstr ""
|
1517 |
|
1518 |
-
#: includes/modules/class-top-ten-widget.php:
|
1519 |
msgid "Custom time period (Enter below)"
|
1520 |
msgstr ""
|
1521 |
|
1522 |
-
#: includes/modules/class-top-ten-widget.php:
|
1523 |
msgid "In days and hours (applies only to custom option above)"
|
1524 |
msgstr ""
|
1525 |
|
1526 |
-
#: includes/modules/class-top-ten-widget.php:
|
1527 |
msgid "days"
|
1528 |
msgstr ""
|
1529 |
|
1530 |
-
#: includes/modules/class-top-ten-widget.php:
|
1531 |
msgid "hours"
|
1532 |
msgstr ""
|
1533 |
|
1534 |
-
#: includes/modules/class-top-ten-widget.php:
|
1535 |
msgid "Show count?"
|
1536 |
msgstr ""
|
1537 |
|
1538 |
-
#: includes/modules/class-top-ten-widget.php:
|
1539 |
msgid "Show excerpt?"
|
1540 |
msgstr ""
|
1541 |
|
1542 |
-
#: includes/modules/class-top-ten-widget.php:
|
1543 |
msgid "Show author?"
|
1544 |
msgstr ""
|
1545 |
|
1546 |
-
#: includes/modules/class-top-ten-widget.php:
|
1547 |
msgid "Show date?"
|
1548 |
msgstr ""
|
1549 |
|
1550 |
-
#: includes/modules/class-top-ten-widget.php:
|
1551 |
-
msgid "Thumbnail options"
|
1552 |
-
msgstr ""
|
1553 |
-
|
1554 |
-
#: includes/modules/class-top-ten-widget.php:133
|
1555 |
msgid "Thumbnails inline, before title"
|
1556 |
msgstr ""
|
1557 |
|
1558 |
-
#: includes/modules/class-top-ten-widget.php:
|
1559 |
msgid "Thumbnails inline, after title"
|
1560 |
msgstr ""
|
1561 |
|
1562 |
-
#: includes/modules/class-top-ten-widget.php:
|
1563 |
msgid "Only thumbnails, no text"
|
1564 |
msgstr ""
|
1565 |
|
1566 |
-
#: includes/modules/class-top-ten-widget.php:
|
1567 |
msgid "No thumbnails, only text."
|
1568 |
msgstr ""
|
1569 |
|
1570 |
-
#: includes/modules/class-top-ten-widget.php:
|
1571 |
msgid "Only from categories"
|
1572 |
msgstr ""
|
1573 |
|
1574 |
-
#: includes/modules/class-top-ten-widget.php:
|
1575 |
-
msgid "
|
1576 |
msgstr ""
|
1577 |
|
1578 |
-
#: includes/
|
1579 |
-
msgid ""
|
1580 |
-
"posts_only argument has been deprecated. Use get_tptn_pop_posts() to get the "
|
1581 |
-
"posts only."
|
1582 |
msgstr ""
|
1583 |
|
1584 |
-
#: includes/public/display-posts.php:
|
1585 |
#, php-format
|
1586 |
msgid ""
|
1587 |
"Popular posts by <a href=\"%1$s\" rel=\"nofollow\" %2$s>Top 10 plugin</a>"
|
@@ -1603,19 +1817,27 @@ msgstr ""
|
|
1603 |
msgid " by "
|
1604 |
msgstr ""
|
1605 |
|
1606 |
-
#: includes/tracker.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1607 |
msgid "Query variable based"
|
1608 |
msgstr ""
|
1609 |
|
1610 |
-
#: includes/tracker.php:
|
1611 |
msgid "Uses query variables to record visits"
|
1612 |
msgstr ""
|
1613 |
|
1614 |
-
#: includes/tracker.php:
|
1615 |
msgid "Ajaxurl based"
|
1616 |
msgstr ""
|
1617 |
|
1618 |
-
#: includes/tracker.php:
|
1619 |
msgid ""
|
1620 |
"Uses admin-ajax.php which is inbuilt within WordPress to process the tracker"
|
1621 |
msgstr ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Top 10\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2021-06-28 10:19+0100\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
|
8 |
"Language-Team: WebberZone <plugins@webberzone.com>\n"
|
13 |
"X-Poedit-KeywordsList: __;_e;_c;__ngettext;esc_html__;esc_attr__;esc_html_e;"
|
14 |
"esc_attr_e\n"
|
15 |
"X-Poedit-Basepath: ..\n"
|
16 |
+
"X-Generator: Poedit 3.0\n"
|
17 |
"X-Poedit-SourceCharset: UTF-8\n"
|
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19 |
"X-Poedit-SearchPath-0: .\n"
|
20 |
|
21 |
+
#: includes/admin/admin-columns.php:25
|
22 |
msgid "Total Views"
|
23 |
msgstr ""
|
24 |
|
25 |
+
#: includes/admin/admin-columns.php:26
|
26 |
msgid "Today's Views"
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: includes/admin/admin-columns.php:27
|
30 |
msgid "Views"
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: includes/admin/admin-dashboard.php:62
|
34 |
msgid "View all daily popular posts"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: includes/admin/admin-dashboard.php:64
|
38 |
+
#: includes/admin/class-top-ten-dashboard.php:164
|
39 |
msgid "View all popular posts"
|
40 |
msgstr ""
|
41 |
|
42 |
+
#: includes/admin/admin-dashboard.php:72
|
43 |
#, php-format
|
44 |
msgid "Popular posts by <a href=\"%s\" target=\"_blank\">Top 10 plugin</a>"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: includes/admin/admin-dashboard.php:121 includes/admin/admin.php:40
|
48 |
+
#: includes/admin/class-top-ten-network-statistics.php:114
|
49 |
+
#: includes/admin/class-top-ten-statistics.php:124
|
50 |
msgid "Popular Posts"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: includes/admin/admin-dashboard.php:126 includes/admin/admin.php:43
|
54 |
msgid "Daily Popular Posts"
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: includes/admin/admin-metabox.php:104
|
58 |
msgid "Visit count:"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: includes/admin/admin-metabox.php:106
|
62 |
msgid ""
|
63 |
"Enter a number above to update the visit count. Leaving the above box blank "
|
64 |
"will set the count to zero"
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: includes/admin/admin-metabox.php:116
|
68 |
msgid "Disable Popular Posts display:"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: includes/admin/admin-metabox.php:119
|
72 |
msgid ""
|
73 |
"If this is checked, then Top 10 will not display the popular posts widgets "
|
74 |
"when viewing this post."
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: includes/admin/admin-metabox.php:123
|
78 |
msgid "Exclude this post from the popular posts list:"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: includes/admin/admin-metabox.php:126
|
82 |
msgid ""
|
83 |
"If this is checked, then this post will be excluded from the popular posts "
|
84 |
"list."
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: includes/admin/admin-metabox.php:130
|
88 |
msgid "Location of thumbnail:"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: includes/admin/admin-metabox.php:132
|
92 |
msgid ""
|
93 |
"Enter the full URL to the image (JPG, PNG or GIF) you'd like to use. This "
|
94 |
"image will be used for the post. It will be resized to the thumbnail size "
|
95 |
"set under Top 10 Settings » Thumbnail options."
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: includes/admin/admin-metabox.php:133
|
99 |
msgid "The URL above is saved in the meta field:"
|
100 |
msgstr ""
|
101 |
|
102 |
+
#: includes/admin/admin-metabox.php:141
|
103 |
#, php-format
|
104 |
msgid ""
|
105 |
"You have %1$s installed. If you are trying to modify the thumbnail, then you "
|
106 |
"will need to make the same change in the %1$s meta box on this page."
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: includes/admin/admin.php:34 includes/admin/settings-page.php:32
|
|
|
110 |
msgid "Top 10 Settings"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: includes/admin/admin.php:34 includes/admin/admin.php:157
|
|
|
|
|
|
|
|
|
114 |
msgid "Settings"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: includes/admin/admin.php:40 includes/admin/class-top-ten-statistics.php:70
|
118 |
msgid "Top 10 Popular Posts"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: includes/admin/admin.php:43
|
122 |
msgid "Top 10 Daily Popular Posts"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: includes/admin/admin.php:47 includes/admin/tools.php:74
|
126 |
msgid "Top 10 Tools"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: includes/admin/admin.php:47
|
130 |
msgid "Tools"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: includes/admin/admin.php:50
|
134 |
msgid "Top 10 Import Export Tables"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: includes/admin/admin.php:50
|
138 |
msgid "Import/Export"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: includes/admin/admin.php:111
|
142 |
#, php-format
|
143 |
msgid ""
|
144 |
"Thank you for using <a href=\"%1$s\" target=\"_blank\">Top 10</a>! Please <a "
|
146 |
"\"_blank\">WordPress.org</a>"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: includes/admin/admin.php:179 includes/admin/sidebar.php:55
|
150 |
msgid "Support"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: includes/admin/admin.php:180
|
154 |
msgid "Donate"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: includes/admin/admin.php:181
|
158 |
msgid "Contribute"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: includes/admin/admin.php:199
|
162 |
msgid "Top 10 - Network Popular Posts"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: includes/admin/admin.php:199 includes/admin/class-top-ten-dashboard.php:199
|
166 |
+
msgid "Top 10"
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: includes/admin/class-top-ten-dashboard.php:83
|
170 |
+
#: includes/admin/class-top-ten-dashboard.php:199
|
171 |
+
#: includes/admin/class-top-ten-dashboard.php:201
|
172 |
+
msgid "Top 10 Dashboard"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: includes/admin/class-top-ten-dashboard.php:98
|
176 |
+
msgid "Update"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: includes/admin/class-top-ten-dashboard.php:110
|
180 |
+
msgid "Top 10 Visits"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: includes/admin/class-top-ten-dashboard.php:115
|
184 |
+
msgid "Historical visits"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: includes/admin/class-top-ten-dashboard.php:201
|
188 |
+
msgid "Dashboard"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: includes/admin/class-top-ten-dashboard.php:242
|
192 |
+
#: includes/admin/import-export.php:180
|
193 |
+
msgid "Visits"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: includes/admin/class-top-ten-dashboard.php:243
|
197 |
+
msgid "Daily Visits"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: includes/admin/class-top-ten-dashboard.php:305
|
201 |
+
msgid "Today"
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: includes/admin/class-top-ten-dashboard.php:310
|
205 |
+
msgid "Yesterday"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: includes/admin/class-top-ten-dashboard.php:315
|
209 |
+
msgid "Last 7 days"
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: includes/admin/class-top-ten-dashboard.php:320
|
213 |
+
msgid "Last 30 days"
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: includes/admin/class-top-ten-dashboard.php:325
|
217 |
+
msgid "All time"
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: includes/admin/class-top-ten-dashboard.php:381
|
221 |
+
msgid "Sorry, no popular posts found."
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: includes/admin/class-top-ten-dashboard.php:495
|
225 |
+
#: includes/admin/help-tab.php:35 includes/admin/help-tab.php:136
|
226 |
+
#: includes/admin/help-tab.php:176
|
227 |
+
#, php-format
|
228 |
+
msgid ""
|
229 |
+
"For more information or how to get support visit the <a href=\"%1$s"
|
230 |
+
"\">WebberZone support site</a>."
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: includes/admin/class-top-ten-dashboard.php:497
|
234 |
+
#: includes/admin/help-tab.php:37 includes/admin/help-tab.php:138
|
235 |
+
#: includes/admin/help-tab.php:178
|
236 |
+
#, php-format
|
237 |
+
msgid ""
|
238 |
+
"Support queries should be posted in the <a href=\"%1$s\">WordPress.org "
|
239 |
+
"support forums</a>."
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: includes/admin/class-top-ten-dashboard.php:500
|
243 |
+
#: includes/admin/help-tab.php:40 includes/admin/help-tab.php:141
|
244 |
+
#, php-format
|
245 |
+
msgid ""
|
246 |
+
"<a href=\"%1$s\">Post an issue</a> on <a href=\"%2$s\">GitHub</a> (bug "
|
247 |
+
"reports only)."
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: includes/admin/class-top-ten-dashboard.php:509
|
251 |
+
#: includes/admin/help-tab.php:49 includes/admin/help-tab.php:150
|
252 |
+
#: includes/admin/help-tab.php:189 includes/admin/settings-page.php:125
|
253 |
+
msgid "General"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: includes/admin/class-top-ten-dashboard.php:511
|
257 |
+
msgid "This screen displays the historical traffic on your site."
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: includes/admin/class-top-ten-dashboard.php:513
|
261 |
+
#, php-format
|
262 |
+
msgid ""
|
263 |
+
"The data is pulled from the daily tables in the database. If you have "
|
264 |
+
"enabled maintenance then the amount of historical data that is available "
|
265 |
+
"will be limited to %d days."
|
266 |
+
msgstr ""
|
267 |
+
|
268 |
+
#: includes/admin/class-top-ten-dashboard.php:514
|
269 |
+
msgid ""
|
270 |
+
"You can change this by setting the constant TOP_TEN_STORE_DATA to the number "
|
271 |
+
"of days of your choice in your wp-config.php."
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:32
|
275 |
+
#: includes/admin/class-top-ten-statistics-table.php:39
|
276 |
msgid "popular_post"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:33
|
280 |
+
#: includes/admin/class-top-ten-statistics-table.php:40
|
281 |
msgid "popular_posts"
|
282 |
msgstr ""
|
283 |
|
284 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:183
|
285 |
+
#: includes/admin/class-top-ten-statistics-table.php:213
|
286 |
msgid "No popular posts available."
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:231
|
290 |
+
msgid "Invalid post ID. This post might have been deleted."
|
291 |
+
msgstr ""
|
292 |
+
|
293 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:256
|
294 |
+
#: includes/admin/class-top-ten-statistics-table.php:297
|
295 |
msgid "Y/m/d"
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:294
|
299 |
+
#: includes/admin/class-top-ten-statistics-table.php:351
|
300 |
+
#: includes/modules/class-top-ten-count-widget.php:49
|
301 |
+
#: includes/modules/class-top-ten-widget.php:79
|
302 |
msgid "Title"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:295
|
306 |
msgid "Blog"
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:296
|
310 |
+
#: includes/admin/class-top-ten-statistics-table.php:356
|
311 |
#: includes/admin/import-export.php:183
|
312 |
msgid "Date"
|
313 |
msgstr ""
|
314 |
|
315 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:297
|
316 |
+
#: includes/admin/class-top-ten-statistics-table.php:352
|
317 |
msgid "Total visits"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:298
|
321 |
+
#: includes/admin/class-top-ten-statistics-table.php:353
|
322 |
msgid "Daily visits"
|
323 |
msgstr ""
|
324 |
|
325 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:331
|
326 |
+
#: includes/admin/class-top-ten-statistics-table.php:390
|
327 |
msgid "Delete Count"
|
328 |
msgstr ""
|
329 |
|
330 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:378
|
331 |
+
#: includes/admin/class-top-ten-statistics-table.php:437
|
332 |
msgid "Are you sure you want to do this"
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:420
|
336 |
+
#: includes/admin/class-top-ten-statistics-table.php:504
|
337 |
msgid "Filter"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: includes/admin/class-top-ten-network-statistics.php:70
|
341 |
msgid "Top 10 - Network Wide Popular Posts"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: includes/admin/class-top-ten-statistics-table.php:44
|
345 |
msgid "All post types"
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: includes/admin/class-top-ten-statistics-table.php:263
|
349 |
msgid "View"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: includes/admin/class-top-ten-statistics-table.php:264
|
353 |
msgid "Edit"
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: includes/admin/class-top-ten-statistics-table.php:265
|
357 |
msgid "Delete"
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: includes/admin/class-top-ten-statistics-table.php:295
|
361 |
#, php-format
|
362 |
msgid "%s ago"
|
363 |
msgstr ""
|
364 |
|
365 |
+
#: includes/admin/class-top-ten-statistics-table.php:354
|
366 |
msgid "Post type"
|
367 |
msgstr ""
|
368 |
|
369 |
+
#: includes/admin/class-top-ten-statistics-table.php:355
|
370 |
msgid "Author"
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: includes/admin/class-top-ten-statistics.php:99
|
374 |
msgid "Search Table"
|
375 |
msgstr ""
|
376 |
|
379 |
msgstr ""
|
380 |
|
381 |
#: includes/admin/default-settings.php:72
|
382 |
+
#: includes/modules/class-top-ten-widget.php:94
|
383 |
msgid "Overall"
|
384 |
msgstr ""
|
385 |
|
386 |
#: includes/admin/default-settings.php:73
|
387 |
+
#: includes/admin/default-settings.php:729
|
388 |
msgid "Daily"
|
389 |
msgstr ""
|
390 |
|
660 |
msgstr ""
|
661 |
|
662 |
#: includes/admin/default-settings.php:320
|
663 |
+
#: includes/admin/default-settings.php:778
|
664 |
msgid "Number of posts to display"
|
665 |
msgstr ""
|
666 |
|
694 |
msgstr ""
|
695 |
|
696 |
#: includes/admin/default-settings.php:342
|
697 |
+
msgid "Exclude Front page and Posts page"
|
698 |
msgstr ""
|
699 |
|
700 |
#: includes/admin/default-settings.php:343
|
701 |
msgid ""
|
702 |
+
"If you have set your Front page and Posts page to be specific pages via "
|
703 |
+
"Settings > Reading, then these will be tracked similar to other pages. "
|
704 |
+
"Enable this option to exclude them from showing up in the popular posts "
|
705 |
+
"lists. The tracking will not be disabled."
|
706 |
+
msgstr ""
|
707 |
+
|
708 |
+
#: includes/admin/default-settings.php:349
|
709 |
+
msgid "Post/page IDs to exclude"
|
710 |
+
msgstr ""
|
711 |
+
|
712 |
+
#: includes/admin/default-settings.php:350
|
713 |
+
msgid ""
|
714 |
"Comma-separated list of post or page IDs to exclude from the list. e.g. "
|
715 |
"188,320,500"
|
716 |
msgstr ""
|
717 |
|
718 |
+
#: includes/admin/default-settings.php:356
|
719 |
msgid "Exclude Categories"
|
720 |
msgstr ""
|
721 |
|
722 |
+
#: includes/admin/default-settings.php:357
|
723 |
msgid ""
|
724 |
"Comma separated list of category slugs. The field above has an autocomplete "
|
725 |
"so simply start typing in the starting letters and it will prompt you with "
|
726 |
"options. Does not support custom taxonomies."
|
727 |
msgstr ""
|
728 |
|
729 |
+
#: includes/admin/default-settings.php:368
|
730 |
msgid "Exclude category IDs"
|
731 |
msgstr ""
|
732 |
|
733 |
+
#: includes/admin/default-settings.php:369
|
734 |
msgid ""
|
735 |
"This is a readonly field that is automatically populated based on the above "
|
736 |
"input when the settings are saved. These might differ from the IDs visible "
|
738 |
"term_taxonomy_id which is unique to this taxonomy."
|
739 |
msgstr ""
|
740 |
|
741 |
+
#: includes/admin/default-settings.php:376
|
742 |
msgid "Customize the output"
|
743 |
msgstr ""
|
744 |
|
745 |
+
#: includes/admin/default-settings.php:382
|
746 |
msgid "Heading of posts"
|
747 |
msgstr ""
|
748 |
|
749 |
+
#: includes/admin/default-settings.php:383
|
750 |
+
#: includes/admin/default-settings.php:391
|
751 |
msgid "Displayed before the list of the posts as a the master heading"
|
752 |
msgstr ""
|
753 |
|
754 |
+
#: includes/admin/default-settings.php:385
|
755 |
msgid "Popular posts:"
|
756 |
msgstr ""
|
757 |
|
758 |
+
#: includes/admin/default-settings.php:390
|
759 |
msgid "Heading of posts for daily/custom period lists"
|
760 |
msgstr ""
|
761 |
|
762 |
+
#: includes/admin/default-settings.php:393
|
763 |
msgid "Currently trending:"
|
764 |
msgstr ""
|
765 |
|
766 |
+
#: includes/admin/default-settings.php:398
|
767 |
msgid "Show when no posts are found"
|
768 |
msgstr ""
|
769 |
|
770 |
+
#: includes/admin/default-settings.php:404
|
771 |
msgid "Blank output"
|
772 |
msgstr ""
|
773 |
|
774 |
+
#: includes/admin/default-settings.php:405
|
775 |
msgid "Display custom text"
|
776 |
msgstr ""
|
777 |
|
778 |
+
#: includes/admin/default-settings.php:410
|
779 |
msgid "Custom text"
|
780 |
msgstr ""
|
781 |
|
782 |
+
#: includes/admin/default-settings.php:411
|
783 |
msgid ""
|
784 |
"Enter the custom text that will be displayed if the second option is "
|
785 |
"selected above"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: includes/admin/default-settings.php:413 includes/deprecated.php:180
|
789 |
msgid "No top posts yet"
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: includes/admin/default-settings.php:417
|
793 |
msgid "Show post excerpt"
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: includes/admin/default-settings.php:424
|
797 |
msgid "Length of excerpt (in words)"
|
798 |
msgstr ""
|
799 |
|
800 |
+
#: includes/admin/default-settings.php:432
|
801 |
+
#: includes/blocks/popular-posts/index.js:207
|
802 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
803 |
msgid "Show date"
|
804 |
msgstr ""
|
805 |
|
806 |
+
#: includes/admin/default-settings.php:439
|
807 |
+
#: includes/blocks/popular-posts/index.js:202
|
808 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
809 |
msgid "Show author"
|
810 |
msgstr ""
|
811 |
|
812 |
+
#: includes/admin/default-settings.php:446
|
813 |
msgid "Show number of views"
|
814 |
msgstr ""
|
815 |
|
816 |
+
#: includes/admin/default-settings.php:453
|
817 |
msgid "Limit post title length (in characters)"
|
818 |
msgstr ""
|
819 |
|
820 |
+
#: includes/admin/default-settings.php:461
|
821 |
msgid "Open links in new window"
|
822 |
msgstr ""
|
823 |
|
824 |
+
#: includes/admin/default-settings.php:468
|
825 |
msgid "Add nofollow to links"
|
826 |
msgstr ""
|
827 |
|
828 |
+
#: includes/admin/default-settings.php:475
|
829 |
msgid "HTML to display"
|
830 |
msgstr ""
|
831 |
|
832 |
+
#: includes/admin/default-settings.php:481
|
833 |
msgid "Before the list of posts"
|
834 |
msgstr ""
|
835 |
|
836 |
+
#: includes/admin/default-settings.php:488
|
837 |
msgid "After the list of posts"
|
838 |
msgstr ""
|
839 |
|
840 |
+
#: includes/admin/default-settings.php:495
|
841 |
msgid "Before each list item"
|
842 |
msgstr ""
|
843 |
|
844 |
+
#: includes/admin/default-settings.php:502
|
845 |
msgid "After each list item"
|
846 |
msgstr ""
|
847 |
|
848 |
+
#: includes/admin/default-settings.php:532
|
849 |
msgid "Location of the post thumbnail"
|
850 |
msgstr ""
|
851 |
|
852 |
+
#: includes/admin/default-settings.php:537
|
853 |
msgid "Display thumbnails inline with posts, before title"
|
854 |
msgstr ""
|
855 |
|
856 |
+
#: includes/admin/default-settings.php:538
|
857 |
msgid "Display thumbnails inline with posts, after title"
|
858 |
msgstr ""
|
859 |
|
860 |
+
#: includes/admin/default-settings.php:539
|
861 |
msgid "Display only thumbnails, no text"
|
862 |
msgstr ""
|
863 |
|
864 |
+
#: includes/admin/default-settings.php:540
|
865 |
msgid "Do not display thumbnails, only text"
|
866 |
msgstr ""
|
867 |
|
868 |
+
#: includes/admin/default-settings.php:545
|
869 |
msgid "Thumbnail size"
|
870 |
msgstr ""
|
871 |
|
872 |
+
#: includes/admin/default-settings.php:547
|
873 |
msgid ""
|
874 |
"You can choose from existing image sizes above or create a custom size. If "
|
875 |
"you have chosen Custom size above, then enter the width, height and crop "
|
877 |
"width and/or height below, existing images will not be automatically resized."
|
878 |
msgstr ""
|
879 |
|
880 |
+
#: includes/admin/default-settings.php:547
|
881 |
#, php-format
|
882 |
msgid "I recommend using %1$s or %2$s to regenerate all image sizes."
|
883 |
msgstr ""
|
884 |
|
885 |
+
#: includes/admin/default-settings.php:554
|
886 |
+
#: includes/modules/class-top-ten-widget.php:144
|
887 |
msgid "Thumbnail width"
|
888 |
msgstr ""
|
889 |
|
890 |
+
#: includes/admin/default-settings.php:562
|
891 |
+
#: includes/modules/class-top-ten-widget.php:138
|
892 |
msgid "Thumbnail height"
|
893 |
msgstr ""
|
894 |
|
895 |
+
#: includes/admin/default-settings.php:570
|
896 |
msgid "Hard crop thumbnails"
|
897 |
msgstr ""
|
898 |
|
899 |
+
#: includes/admin/default-settings.php:571
|
900 |
msgid ""
|
901 |
"Check this box to hard crop the thumbnails. i.e. force the width and height "
|
902 |
"above vs. maintaining proportions."
|
903 |
msgstr ""
|
904 |
|
905 |
+
#: includes/admin/default-settings.php:577
|
906 |
msgid "Generate thumbnail sizes"
|
907 |
msgstr ""
|
908 |
|
909 |
+
#: includes/admin/default-settings.php:578
|
910 |
msgid ""
|
911 |
"If you select this option and Custom size is selected above, the plugin will "
|
912 |
"register the image size with WordPress to create new thumbnails. Does not "
|
913 |
"update old images as explained above."
|
914 |
msgstr ""
|
915 |
|
916 |
+
#: includes/admin/default-settings.php:584
|
917 |
msgid "Thumbnail size attributes"
|
918 |
msgstr ""
|
919 |
|
920 |
+
#: includes/admin/default-settings.php:590
|
921 |
#, php-format
|
922 |
msgid "Use CSS to set the width and height: e.g. %s"
|
923 |
msgstr ""
|
924 |
|
925 |
+
#: includes/admin/default-settings.php:592
|
926 |
#, php-format
|
927 |
msgid "Use HTML attributes to set the width and height: e.g. %s"
|
928 |
msgstr ""
|
929 |
|
930 |
+
#: includes/admin/default-settings.php:593
|
931 |
msgid ""
|
932 |
"No width or height set. You will need to use external styles to force any "
|
933 |
"width or height of your choice."
|
934 |
msgstr ""
|
935 |
|
936 |
+
#: includes/admin/default-settings.php:598
|
937 |
msgid "Thumbnail meta field name"
|
938 |
msgstr ""
|
939 |
|
940 |
+
#: includes/admin/default-settings.php:599
|
941 |
msgid ""
|
942 |
"The value of this field should contain the URL of the image and can be set "
|
943 |
"in the metabox in the Edit Post screen"
|
944 |
msgstr ""
|
945 |
|
946 |
+
#: includes/admin/default-settings.php:605
|
947 |
msgid "Get first image"
|
948 |
msgstr ""
|
949 |
|
950 |
+
#: includes/admin/default-settings.php:606
|
951 |
msgid ""
|
952 |
"The plugin will fetch the first image in the post content if this is "
|
953 |
"enabled. This can slow down the loading of your page if the first image in "
|
954 |
"the followed posts is large in file-size."
|
955 |
msgstr ""
|
956 |
|
957 |
+
#: includes/admin/default-settings.php:612
|
958 |
msgid "Use default thumbnail?"
|
959 |
msgstr ""
|
960 |
|
961 |
+
#: includes/admin/default-settings.php:613
|
962 |
msgid ""
|
963 |
"If checked, when no thumbnail is found, show a default one from the URL "
|
964 |
"below. If not checked and no thumbnail is found, no image will be shown."
|
965 |
msgstr ""
|
966 |
|
967 |
+
#: includes/admin/default-settings.php:619 includes/admin/settings-page.php:743
|
968 |
msgid "Default thumbnail"
|
969 |
msgstr ""
|
970 |
|
971 |
+
#: includes/admin/default-settings.php:620
|
972 |
msgid ""
|
973 |
"Enter the full URL of the image that you wish to display if no thumbnail is "
|
974 |
"found. This image will be displayed below."
|
975 |
msgstr ""
|
976 |
|
977 |
+
#: includes/admin/default-settings.php:650
|
978 |
msgid "Popular posts style"
|
979 |
msgstr ""
|
980 |
|
981 |
+
#: includes/admin/default-settings.php:658
|
982 |
msgid "Custom CSS"
|
983 |
msgstr ""
|
984 |
|
985 |
+
#: includes/admin/default-settings.php:660
|
986 |
#, php-format
|
987 |
msgid ""
|
988 |
"Do not include %3$sstyle%4$s tags. Check out the %1$sFAQ%2$s for available "
|
989 |
"CSS classes to style."
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: includes/admin/default-settings.php:690
|
993 |
msgid "Enable scheduled maintenance"
|
994 |
msgstr ""
|
995 |
|
996 |
+
#: includes/admin/default-settings.php:692
|
997 |
+
#, php-format
|
998 |
msgid ""
|
999 |
"Cleaning the database at regular intervals could improve performance, "
|
1000 |
"especially on high traffic blogs. Enabling maintenance will automatically "
|
1001 |
+
"delete entries older than %d days in the daily tables."
|
1002 |
msgstr ""
|
1003 |
|
1004 |
+
#: includes/admin/default-settings.php:698
|
1005 |
msgid "Time to run maintenance"
|
1006 |
msgstr ""
|
1007 |
|
1008 |
+
#: includes/admin/default-settings.php:699
|
1009 |
msgid "The next two options allow you to set the time to run the cron."
|
1010 |
msgstr ""
|
1011 |
|
1012 |
+
#: includes/admin/default-settings.php:704
|
1013 |
msgid "Hour"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
+
#: includes/admin/default-settings.php:714
|
1017 |
msgid "Minute"
|
1018 |
msgstr ""
|
1019 |
|
1020 |
+
#: includes/admin/default-settings.php:724
|
1021 |
msgid "Run maintenance"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
+
#: includes/admin/default-settings.php:730
|
1025 |
msgid "Weekly"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
+
#: includes/admin/default-settings.php:731
|
1029 |
msgid "Fortnightly"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
+
#: includes/admin/default-settings.php:732
|
1033 |
msgid "Monthly"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: includes/admin/default-settings.php:760
|
1037 |
msgid "Permalink - Overall"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
+
#: includes/admin/default-settings.php:762
|
1041 |
#, php-format
|
1042 |
msgid ""
|
1043 |
"This will set the path of the custom feed generated by the plugin for "
|
1045 |
"when changing this option."
|
1046 |
msgstr ""
|
1047 |
|
1048 |
+
#: includes/admin/default-settings.php:769
|
1049 |
msgid "Permalink - Daily"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: includes/admin/default-settings.php:771
|
1053 |
#, php-format
|
1054 |
msgid ""
|
1055 |
"This will set the path of the custom feed generated by the plugin for daily/"
|
1057 |
"%2$s when changing this option."
|
1058 |
msgstr ""
|
1059 |
|
1060 |
+
#: includes/admin/default-settings.php:779
|
1061 |
msgid "Maximum number of posts that will be displayed in the custom feed."
|
1062 |
msgstr ""
|
1063 |
|
1064 |
+
#: includes/admin/default-settings.php:786
|
1065 |
msgid "Custom period in day(s)"
|
1066 |
msgstr ""
|
1067 |
|
1068 |
+
#: includes/admin/default-settings.php:888
|
1069 |
msgid "No styles"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
+
#: includes/admin/default-settings.php:889
|
1073 |
msgid "Select this option if you plan to add your own styles"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: includes/admin/default-settings.php:893
|
1077 |
msgid "Text only"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
+
#: includes/admin/default-settings.php:894
|
1081 |
msgid ""
|
1082 |
"Disable thumbnails and no longer include the default style sheet included in "
|
1083 |
"the plugin"
|
1084 |
msgstr ""
|
1085 |
|
1086 |
+
#: includes/admin/default-settings.php:898
|
1087 |
msgid "Left thumbnails"
|
1088 |
msgstr ""
|
1089 |
|
1090 |
+
#: includes/admin/default-settings.php:899
|
1091 |
msgid ""
|
1092 |
"Enabling this option will set the post thumbnail to be before text. "
|
1093 |
"Disabling this option will not revert any settings."
|
1094 |
msgstr ""
|
1095 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1096 |
#: includes/admin/help-tab.php:51
|
1097 |
msgid "This screen provides the basic settings for configuring Top 10."
|
1098 |
msgstr ""
|
1321 |
msgid "Post ID"
|
1322 |
msgstr ""
|
1323 |
|
|
|
|
|
|
|
|
|
1324 |
#: includes/admin/import-export.php:185
|
1325 |
msgid "Blog ID"
|
1326 |
msgstr ""
|
1557 |
msgid "This will delete the duplicate entries in the tables. Proceed?"
|
1558 |
msgstr ""
|
1559 |
|
1560 |
+
#: includes/blocks/popular-posts/index.js:22
|
1561 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1562 |
+
#: includes/modules/class-top-ten-widget.php:26
|
1563 |
+
msgid "Popular Posts [Top 10]"
|
1564 |
+
msgstr ""
|
1565 |
+
|
1566 |
+
#: includes/blocks/popular-posts/index.js:23
|
1567 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1568 |
+
msgid "Display popular posts by Top 10"
|
1569 |
+
msgstr ""
|
1570 |
+
|
1571 |
+
#: includes/blocks/popular-posts/index.js:26
|
1572 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1573 |
+
msgid "popular posts"
|
1574 |
+
msgstr ""
|
1575 |
+
|
1576 |
+
#: includes/blocks/popular-posts/index.js:26
|
1577 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1578 |
+
msgid "popular"
|
1579 |
+
msgstr ""
|
1580 |
+
|
1581 |
+
#: includes/blocks/popular-posts/index.js:26
|
1582 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1583 |
+
msgid "posts"
|
1584 |
+
msgstr ""
|
1585 |
+
|
1586 |
+
#: includes/blocks/popular-posts/index.js:145
|
1587 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1588 |
+
msgid "Show heading"
|
1589 |
+
msgstr ""
|
1590 |
+
|
1591 |
+
#: includes/blocks/popular-posts/index.js:150
|
1592 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1593 |
+
msgid "Custom period? Set range below"
|
1594 |
+
msgstr ""
|
1595 |
+
|
1596 |
+
#: includes/blocks/popular-posts/index.js:155
|
1597 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1598 |
+
msgid "Daily range"
|
1599 |
+
msgstr ""
|
1600 |
+
|
1601 |
+
#: includes/blocks/popular-posts/index.js:165
|
1602 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1603 |
+
msgid "Hourly range"
|
1604 |
+
msgstr ""
|
1605 |
+
|
1606 |
+
#: includes/blocks/popular-posts/index.js:175
|
1607 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1608 |
+
#: includes/modules/class-top-ten-widget.php:84
|
1609 |
+
msgid "No. of posts"
|
1610 |
+
msgstr ""
|
1611 |
+
|
1612 |
+
#: includes/blocks/popular-posts/index.js:186
|
1613 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1614 |
+
#: includes/modules/class-top-ten-widget.php:89
|
1615 |
+
msgid "Offset"
|
1616 |
+
msgstr ""
|
1617 |
+
|
1618 |
+
#: includes/blocks/popular-posts/index.js:197
|
1619 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1620 |
+
msgid "Show excerpt"
|
1621 |
+
msgstr ""
|
1622 |
+
|
1623 |
+
#: includes/blocks/popular-posts/index.js:212
|
1624 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1625 |
+
msgid "Show count"
|
1626 |
+
msgstr ""
|
1627 |
+
|
1628 |
+
#: includes/blocks/popular-posts/index.js:218
|
1629 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1630 |
+
#: includes/modules/class-top-ten-widget.php:128
|
1631 |
+
msgid "Thumbnail options"
|
1632 |
+
msgstr ""
|
1633 |
+
|
1634 |
+
#: includes/blocks/popular-posts/index.js:221
|
1635 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1636 |
+
msgid "Before title"
|
1637 |
+
msgstr ""
|
1638 |
+
|
1639 |
+
#: includes/blocks/popular-posts/index.js:222
|
1640 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1641 |
+
msgid "After title"
|
1642 |
+
msgstr ""
|
1643 |
+
|
1644 |
+
#: includes/blocks/popular-posts/index.js:223
|
1645 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1646 |
+
msgid "Only thumbnail"
|
1647 |
+
msgstr ""
|
1648 |
+
|
1649 |
+
#: includes/blocks/popular-posts/index.js:224
|
1650 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1651 |
+
msgid "Only text"
|
1652 |
+
msgstr ""
|
1653 |
+
|
1654 |
+
#: includes/blocks/popular-posts/index.js:228
|
1655 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1656 |
+
msgid "Other attributes"
|
1657 |
+
msgstr ""
|
1658 |
+
|
1659 |
+
#: includes/blocks/popular-posts/index.js:229
|
1660 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1661 |
+
msgid ""
|
1662 |
+
"Enter other attributes in a URL-style string-query. e.g. post_types=post,"
|
1663 |
+
"page&link_nofollow=1&exclude_post_ids=5,6"
|
1664 |
+
msgstr ""
|
1665 |
+
|
1666 |
#: includes/cron.php:87
|
1667 |
msgid "Once Weekly"
|
1668 |
msgstr ""
|
1691 |
msgid "There is no excerpt because this is a protected post."
|
1692 |
msgstr ""
|
1693 |
|
1694 |
+
#: includes/modules/class-top-ten-count-widget.php:26
|
1695 |
msgid "Overall count [Top 10]"
|
1696 |
msgstr ""
|
1697 |
|
1698 |
+
#: includes/modules/class-top-ten-count-widget.php:28
|
1699 |
msgid "Display overall count"
|
1700 |
msgstr ""
|
1701 |
|
1702 |
+
#: includes/modules/class-top-ten-rest-api.php:56
|
1703 |
+
msgid "Post ID."
|
1704 |
msgstr ""
|
1705 |
|
1706 |
+
#: includes/modules/class-top-ten-rest-api.php:136
|
1707 |
+
msgid "Invalid post ID."
|
1708 |
msgstr ""
|
1709 |
|
1710 |
+
#: includes/modules/class-top-ten-rest-api.php:212
|
1711 |
+
msgid "Number of posts"
|
1712 |
msgstr ""
|
1713 |
|
1714 |
+
#: includes/modules/class-top-ten-rest-api.php:217
|
1715 |
+
msgid "Post types"
|
1716 |
+
msgstr ""
|
1717 |
+
|
1718 |
+
#: includes/modules/class-top-ten-rest-api.php:235
|
1719 |
+
msgid "ID of the post."
|
1720 |
+
msgstr ""
|
1721 |
+
|
1722 |
+
#: includes/modules/class-top-ten-rest-api.php:240
|
1723 |
+
msgid "Blog ID of the post."
|
1724 |
+
msgstr ""
|
1725 |
+
|
1726 |
+
#: includes/modules/class-top-ten-rest-api.php:245
|
1727 |
+
msgid "Activate counter flag."
|
1728 |
+
msgstr ""
|
1729 |
+
|
1730 |
+
#: includes/modules/class-top-ten-rest-api.php:250
|
1731 |
+
msgid "Debug flag."
|
1732 |
+
msgstr ""
|
1733 |
+
|
1734 |
+
#: includes/modules/class-top-ten-widget.php:28
|
1735 |
+
msgid "Display popular posts"
|
1736 |
msgstr ""
|
1737 |
|
1738 |
+
#: includes/modules/class-top-ten-widget.php:95
|
1739 |
msgid "Custom time period (Enter below)"
|
1740 |
msgstr ""
|
1741 |
|
1742 |
+
#: includes/modules/class-top-ten-widget.php:99
|
1743 |
msgid "In days and hours (applies only to custom option above)"
|
1744 |
msgstr ""
|
1745 |
|
1746 |
+
#: includes/modules/class-top-ten-widget.php:101
|
1747 |
msgid "days"
|
1748 |
msgstr ""
|
1749 |
|
1750 |
+
#: includes/modules/class-top-ten-widget.php:104
|
1751 |
msgid "hours"
|
1752 |
msgstr ""
|
1753 |
|
1754 |
+
#: includes/modules/class-top-ten-widget.php:109
|
1755 |
msgid "Show count?"
|
1756 |
msgstr ""
|
1757 |
|
1758 |
+
#: includes/modules/class-top-ten-widget.php:114
|
1759 |
msgid "Show excerpt?"
|
1760 |
msgstr ""
|
1761 |
|
1762 |
+
#: includes/modules/class-top-ten-widget.php:119
|
1763 |
msgid "Show author?"
|
1764 |
msgstr ""
|
1765 |
|
1766 |
+
#: includes/modules/class-top-ten-widget.php:124
|
1767 |
msgid "Show date?"
|
1768 |
msgstr ""
|
1769 |
|
1770 |
+
#: includes/modules/class-top-ten-widget.php:130
|
|
|
|
|
|
|
|
|
1771 |
msgid "Thumbnails inline, before title"
|
1772 |
msgstr ""
|
1773 |
|
1774 |
+
#: includes/modules/class-top-ten-widget.php:131
|
1775 |
msgid "Thumbnails inline, after title"
|
1776 |
msgstr ""
|
1777 |
|
1778 |
+
#: includes/modules/class-top-ten-widget.php:132
|
1779 |
msgid "Only thumbnails, no text"
|
1780 |
msgstr ""
|
1781 |
|
1782 |
+
#: includes/modules/class-top-ten-widget.php:133
|
1783 |
msgid "No thumbnails, only text."
|
1784 |
msgstr ""
|
1785 |
|
1786 |
+
#: includes/modules/class-top-ten-widget.php:150
|
1787 |
msgid "Only from categories"
|
1788 |
msgstr ""
|
1789 |
|
1790 |
+
#: includes/modules/class-top-ten-widget.php:157
|
1791 |
+
msgid "Include IDs"
|
1792 |
msgstr ""
|
1793 |
|
1794 |
+
#: includes/modules/class-top-ten-widget.php:161
|
1795 |
+
msgid "Post types to include:"
|
|
|
|
|
1796 |
msgstr ""
|
1797 |
|
1798 |
+
#: includes/public/display-posts.php:211
|
1799 |
#, php-format
|
1800 |
msgid ""
|
1801 |
"Popular posts by <a href=\"%1$s\" rel=\"nofollow\" %2$s>Top 10 plugin</a>"
|
1817 |
msgid " by "
|
1818 |
msgstr ""
|
1819 |
|
1820 |
+
#: includes/tracker.php:293
|
1821 |
+
msgid "REST API based"
|
1822 |
+
msgstr ""
|
1823 |
+
|
1824 |
+
#: includes/tracker.php:294
|
1825 |
+
msgid "Uses the REST API to record visits"
|
1826 |
+
msgstr ""
|
1827 |
+
|
1828 |
+
#: includes/tracker.php:298
|
1829 |
msgid "Query variable based"
|
1830 |
msgstr ""
|
1831 |
|
1832 |
+
#: includes/tracker.php:299
|
1833 |
msgid "Uses query variables to record visits"
|
1834 |
msgstr ""
|
1835 |
|
1836 |
+
#: includes/tracker.php:303
|
1837 |
msgid "Ajaxurl based"
|
1838 |
msgstr ""
|
1839 |
|
1840 |
+
#: includes/tracker.php:304
|
1841 |
msgid ""
|
1842 |
"Uses admin-ajax.php which is inbuilt within WordPress to process the tracker"
|
1843 |
msgstr ""
|
languages/top-10-en_US.pot
CHANGED
@@ -3,7 +3,7 @@ msgid ""
|
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Top 10\n"
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
-
"POT-Creation-Date:
|
7 |
"PO-Revision-Date: \n"
|
8 |
"Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
|
9 |
"Language-Team: WebberZone <plugins@webberzone.com>\n"
|
@@ -14,136 +14,132 @@ msgstr ""
|
|
14 |
"X-Poedit-KeywordsList: __;_e;_c;__ngettext;esc_html__;esc_attr__;esc_html_e;"
|
15 |
"esc_attr_e\n"
|
16 |
"X-Poedit-Basepath: ..\n"
|
17 |
-
"X-Generator: Poedit
|
18 |
"X-Poedit-SourceCharset: UTF-8\n"
|
19 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
|
22 |
-
#: includes/admin/admin-columns.php:
|
23 |
msgid "Total Views"
|
24 |
msgstr ""
|
25 |
|
26 |
-
#: includes/admin/admin-columns.php:
|
27 |
msgid "Today's Views"
|
28 |
msgstr ""
|
29 |
|
30 |
-
#: includes/admin/admin-columns.php:
|
31 |
msgid "Views"
|
32 |
msgstr ""
|
33 |
|
34 |
-
#: includes/admin/admin-dashboard.php:
|
35 |
msgid "View all daily popular posts"
|
36 |
msgstr ""
|
37 |
|
38 |
-
#: includes/admin/admin-dashboard.php:
|
|
|
39 |
msgid "View all popular posts"
|
40 |
msgstr ""
|
41 |
|
42 |
-
#: includes/admin/admin-dashboard.php:
|
43 |
#, php-format
|
44 |
msgid "Popular posts by <a href=\"%s\" target=\"_blank\">Top 10 plugin</a>"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: includes/admin/admin-dashboard.php:
|
48 |
-
#: includes/admin/class-top-ten-network-statistics.php:
|
49 |
-
#: includes/admin/class-top-ten-statistics.php:
|
50 |
msgid "Popular Posts"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: includes/admin/admin-dashboard.php:
|
54 |
msgid "Daily Popular Posts"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: includes/admin/admin-metabox.php:
|
58 |
msgid "Visit count:"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: includes/admin/admin-metabox.php:
|
62 |
msgid ""
|
63 |
"Enter a number above to update the visit count. Leaving the above box blank "
|
64 |
"will set the count to zero"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: includes/admin/admin-metabox.php:
|
68 |
msgid "Disable Popular Posts display:"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: includes/admin/admin-metabox.php:
|
72 |
msgid ""
|
73 |
"If this is checked, then Top 10 will not display the popular posts widgets "
|
74 |
"when viewing this post."
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: includes/admin/admin-metabox.php:
|
78 |
msgid "Exclude this post from the popular posts list:"
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: includes/admin/admin-metabox.php:
|
82 |
msgid ""
|
83 |
"If this is checked, then this post will be excluded from the popular posts "
|
84 |
"list."
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: includes/admin/admin-metabox.php:
|
88 |
msgid "Location of thumbnail:"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: includes/admin/admin-metabox.php:
|
92 |
msgid ""
|
93 |
"Enter the full URL to the image (JPG, PNG or GIF) you'd like to use. This "
|
94 |
"image will be used for the post. It will be resized to the thumbnail size "
|
95 |
"set under Top 10 Settings » Thumbnail options."
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: includes/admin/admin-metabox.php:
|
99 |
msgid "The URL above is saved in the meta field:"
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: includes/admin/admin-metabox.php:
|
103 |
#, php-format
|
104 |
msgid ""
|
105 |
"You have %1$s installed. If you are trying to modify the thumbnail, then you "
|
106 |
"will need to make the same change in the %1$s meta box on this page."
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: includes/admin/admin.php:34 includes/admin/
|
110 |
-
#: includes/admin/settings-page.php:32
|
111 |
msgid "Top 10 Settings"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: includes/admin/admin.php:34 includes/admin/admin.php:
|
115 |
-
msgid "Top 10"
|
116 |
-
msgstr ""
|
117 |
-
|
118 |
-
#: includes/admin/admin.php:37 includes/admin/admin.php:159
|
119 |
msgid "Settings"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: includes/admin/admin.php:
|
123 |
msgid "Top 10 Popular Posts"
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: includes/admin/admin.php:
|
127 |
msgid "Top 10 Daily Popular Posts"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: includes/admin/admin.php:
|
131 |
msgid "Top 10 Tools"
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: includes/admin/admin.php:
|
135 |
msgid "Tools"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: includes/admin/admin.php:
|
139 |
msgid "Top 10 Import Export Tables"
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: includes/admin/admin.php:
|
143 |
msgid "Import/Export"
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: includes/admin/admin.php:
|
147 |
#, php-format
|
148 |
msgid ""
|
149 |
"Thank you for using <a href=\"%1$s\" target=\"_blank\">Top 10</a>! Please <a "
|
@@ -151,118 +147,231 @@ msgid ""
|
|
151 |
"\"_blank\">WordPress.org</a>"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: includes/admin/admin.php:
|
155 |
msgid "Support"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: includes/admin/admin.php:
|
159 |
msgid "Donate"
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: includes/admin/admin.php:
|
163 |
msgid "Contribute"
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: includes/admin/admin.php:
|
167 |
msgid "Top 10 - Network Popular Posts"
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: includes/admin/class-top-ten-
|
171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
msgid "popular_post"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
176 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
177 |
msgid "popular_posts"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
181 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
182 |
msgid "No popular posts available."
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
186 |
-
|
|
|
|
|
|
|
|
|
187 |
msgid "Y/m/d"
|
188 |
msgstr ""
|
189 |
|
190 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
191 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
192 |
-
#: includes/modules/class-top-ten-count-widget.php:
|
193 |
-
#: includes/modules/class-top-ten-widget.php:
|
194 |
msgid "Title"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
198 |
msgid "Blog"
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
202 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
203 |
#: includes/admin/import-export.php:183
|
204 |
msgid "Date"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
208 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
209 |
msgid "Total visits"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
213 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
214 |
msgid "Daily visits"
|
215 |
msgstr ""
|
216 |
|
217 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
218 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
219 |
msgid "Delete Count"
|
220 |
msgstr ""
|
221 |
|
222 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
223 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
224 |
msgid "Are you sure you want to do this"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: includes/admin/class-top-ten-network-statistics-table.php:
|
228 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
229 |
msgid "Filter"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: includes/admin/class-top-ten-network-statistics.php:
|
233 |
msgid "Top 10 - Network Wide Popular Posts"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
237 |
msgid "All post types"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
241 |
msgid "View"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
245 |
msgid "Edit"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
249 |
msgid "Delete"
|
250 |
msgstr ""
|
251 |
|
252 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
253 |
#, php-format
|
254 |
msgid "%s ago"
|
255 |
msgstr ""
|
256 |
|
257 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
258 |
msgid "Post type"
|
259 |
msgstr ""
|
260 |
|
261 |
-
#: includes/admin/class-top-ten-statistics-table.php:
|
262 |
msgid "Author"
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: includes/admin/class-top-ten-statistics.php:
|
266 |
msgid "Search Table"
|
267 |
msgstr ""
|
268 |
|
@@ -271,12 +380,12 @@ msgid "Enable trackers"
|
|
271 |
msgstr ""
|
272 |
|
273 |
#: includes/admin/default-settings.php:72
|
274 |
-
#: includes/modules/class-top-ten-widget.php:
|
275 |
msgid "Overall"
|
276 |
msgstr ""
|
277 |
|
278 |
#: includes/admin/default-settings.php:73
|
279 |
-
#: includes/admin/default-settings.php:
|
280 |
msgid "Daily"
|
281 |
msgstr ""
|
282 |
|
@@ -552,7 +661,7 @@ msgid ""
|
|
552 |
msgstr ""
|
553 |
|
554 |
#: includes/admin/default-settings.php:320
|
555 |
-
#: includes/admin/default-settings.php:
|
556 |
msgid "Number of posts to display"
|
557 |
msgstr ""
|
558 |
|
@@ -586,31 +695,43 @@ msgid ""
|
|
586 |
msgstr ""
|
587 |
|
588 |
#: includes/admin/default-settings.php:342
|
589 |
-
msgid "
|
590 |
msgstr ""
|
591 |
|
592 |
#: includes/admin/default-settings.php:343
|
593 |
msgid ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
594 |
"Comma-separated list of post or page IDs to exclude from the list. e.g. "
|
595 |
"188,320,500"
|
596 |
msgstr ""
|
597 |
|
598 |
-
#: includes/admin/default-settings.php:
|
599 |
msgid "Exclude Categories"
|
600 |
msgstr ""
|
601 |
|
602 |
-
#: includes/admin/default-settings.php:
|
603 |
msgid ""
|
604 |
"Comma separated list of category slugs. The field above has an autocomplete "
|
605 |
"so simply start typing in the starting letters and it will prompt you with "
|
606 |
"options. Does not support custom taxonomies."
|
607 |
msgstr ""
|
608 |
|
609 |
-
#: includes/admin/default-settings.php:
|
610 |
msgid "Exclude category IDs"
|
611 |
msgstr ""
|
612 |
|
613 |
-
#: includes/admin/default-settings.php:
|
614 |
msgid ""
|
615 |
"This is a readonly field that is automatically populated based on the above "
|
616 |
"input when the settings are saved. These might differ from the IDs visible "
|
@@ -618,134 +739,138 @@ msgid ""
|
|
618 |
"term_taxonomy_id which is unique to this taxonomy."
|
619 |
msgstr ""
|
620 |
|
621 |
-
#: includes/admin/default-settings.php:
|
622 |
msgid "Customize the output"
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: includes/admin/default-settings.php:
|
626 |
msgid "Heading of posts"
|
627 |
msgstr ""
|
628 |
|
629 |
-
#: includes/admin/default-settings.php:
|
630 |
-
#: includes/admin/default-settings.php:
|
631 |
msgid "Displayed before the list of the posts as a the master heading"
|
632 |
msgstr ""
|
633 |
|
634 |
-
#: includes/admin/default-settings.php:
|
635 |
msgid "Popular posts:"
|
636 |
msgstr ""
|
637 |
|
638 |
-
#: includes/admin/default-settings.php:
|
639 |
msgid "Heading of posts for daily/custom period lists"
|
640 |
msgstr ""
|
641 |
|
642 |
-
#: includes/admin/default-settings.php:
|
643 |
msgid "Currently trending:"
|
644 |
msgstr ""
|
645 |
|
646 |
-
#: includes/admin/default-settings.php:
|
647 |
msgid "Show when no posts are found"
|
648 |
msgstr ""
|
649 |
|
650 |
-
#: includes/admin/default-settings.php:
|
651 |
msgid "Blank output"
|
652 |
msgstr ""
|
653 |
|
654 |
-
#: includes/admin/default-settings.php:
|
655 |
msgid "Display custom text"
|
656 |
msgstr ""
|
657 |
|
658 |
-
#: includes/admin/default-settings.php:
|
659 |
msgid "Custom text"
|
660 |
msgstr ""
|
661 |
|
662 |
-
#: includes/admin/default-settings.php:
|
663 |
msgid ""
|
664 |
"Enter the custom text that will be displayed if the second option is "
|
665 |
"selected above"
|
666 |
msgstr ""
|
667 |
|
668 |
-
#: includes/admin/default-settings.php:
|
669 |
msgid "No top posts yet"
|
670 |
msgstr ""
|
671 |
|
672 |
-
#: includes/admin/default-settings.php:
|
673 |
msgid "Show post excerpt"
|
674 |
msgstr ""
|
675 |
|
676 |
-
#: includes/admin/default-settings.php:
|
677 |
msgid "Length of excerpt (in words)"
|
678 |
msgstr ""
|
679 |
|
680 |
-
#: includes/admin/default-settings.php:
|
|
|
|
|
681 |
msgid "Show date"
|
682 |
msgstr ""
|
683 |
|
684 |
-
#: includes/admin/default-settings.php:
|
|
|
|
|
685 |
msgid "Show author"
|
686 |
msgstr ""
|
687 |
|
688 |
-
#: includes/admin/default-settings.php:
|
689 |
msgid "Show number of views"
|
690 |
msgstr ""
|
691 |
|
692 |
-
#: includes/admin/default-settings.php:
|
693 |
msgid "Limit post title length (in characters)"
|
694 |
msgstr ""
|
695 |
|
696 |
-
#: includes/admin/default-settings.php:
|
697 |
msgid "Open links in new window"
|
698 |
msgstr ""
|
699 |
|
700 |
-
#: includes/admin/default-settings.php:
|
701 |
msgid "Add nofollow to links"
|
702 |
msgstr ""
|
703 |
|
704 |
-
#: includes/admin/default-settings.php:
|
705 |
msgid "HTML to display"
|
706 |
msgstr ""
|
707 |
|
708 |
-
#: includes/admin/default-settings.php:
|
709 |
msgid "Before the list of posts"
|
710 |
msgstr ""
|
711 |
|
712 |
-
#: includes/admin/default-settings.php:
|
713 |
msgid "After the list of posts"
|
714 |
msgstr ""
|
715 |
|
716 |
-
#: includes/admin/default-settings.php:
|
717 |
msgid "Before each list item"
|
718 |
msgstr ""
|
719 |
|
720 |
-
#: includes/admin/default-settings.php:
|
721 |
msgid "After each list item"
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: includes/admin/default-settings.php:
|
725 |
msgid "Location of the post thumbnail"
|
726 |
msgstr ""
|
727 |
|
728 |
-
#: includes/admin/default-settings.php:
|
729 |
msgid "Display thumbnails inline with posts, before title"
|
730 |
msgstr ""
|
731 |
|
732 |
-
#: includes/admin/default-settings.php:
|
733 |
msgid "Display thumbnails inline with posts, after title"
|
734 |
msgstr ""
|
735 |
|
736 |
-
#: includes/admin/default-settings.php:
|
737 |
msgid "Display only thumbnails, no text"
|
738 |
msgstr ""
|
739 |
|
740 |
-
#: includes/admin/default-settings.php:
|
741 |
msgid "Do not display thumbnails, only text"
|
742 |
msgstr ""
|
743 |
|
744 |
-
#: includes/admin/default-settings.php:
|
745 |
msgid "Thumbnail size"
|
746 |
msgstr ""
|
747 |
|
748 |
-
#: includes/admin/default-settings.php:
|
749 |
msgid ""
|
750 |
"You can choose from existing image sizes above or create a custom size. If "
|
751 |
"you have chosen Custom size above, then enter the width, height and crop "
|
@@ -753,166 +878,167 @@ msgid ""
|
|
753 |
"width and/or height below, existing images will not be automatically resized."
|
754 |
msgstr ""
|
755 |
|
756 |
-
#: includes/admin/default-settings.php:
|
757 |
#, php-format
|
758 |
msgid "I recommend using %1$s or %2$s to regenerate all image sizes."
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: includes/admin/default-settings.php:
|
762 |
-
#: includes/modules/class-top-ten-widget.php:
|
763 |
msgid "Thumbnail width"
|
764 |
msgstr ""
|
765 |
|
766 |
-
#: includes/admin/default-settings.php:
|
767 |
-
#: includes/modules/class-top-ten-widget.php:
|
768 |
msgid "Thumbnail height"
|
769 |
msgstr ""
|
770 |
|
771 |
-
#: includes/admin/default-settings.php:
|
772 |
msgid "Hard crop thumbnails"
|
773 |
msgstr ""
|
774 |
|
775 |
-
#: includes/admin/default-settings.php:
|
776 |
msgid ""
|
777 |
"Check this box to hard crop the thumbnails. i.e. force the width and height "
|
778 |
"above vs. maintaining proportions."
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: includes/admin/default-settings.php:
|
782 |
msgid "Generate thumbnail sizes"
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: includes/admin/default-settings.php:
|
786 |
msgid ""
|
787 |
"If you select this option and Custom size is selected above, the plugin will "
|
788 |
"register the image size with WordPress to create new thumbnails. Does not "
|
789 |
"update old images as explained above."
|
790 |
msgstr ""
|
791 |
|
792 |
-
#: includes/admin/default-settings.php:
|
793 |
msgid "Thumbnail size attributes"
|
794 |
msgstr ""
|
795 |
|
796 |
-
#: includes/admin/default-settings.php:
|
797 |
#, php-format
|
798 |
msgid "Use CSS to set the width and height: e.g. %s"
|
799 |
msgstr ""
|
800 |
|
801 |
-
#: includes/admin/default-settings.php:
|
802 |
#, php-format
|
803 |
msgid "Use HTML attributes to set the width and height: e.g. %s"
|
804 |
msgstr ""
|
805 |
|
806 |
-
#: includes/admin/default-settings.php:
|
807 |
msgid ""
|
808 |
"No width or height set. You will need to use external styles to force any "
|
809 |
"width or height of your choice."
|
810 |
msgstr ""
|
811 |
|
812 |
-
#: includes/admin/default-settings.php:
|
813 |
msgid "Thumbnail meta field name"
|
814 |
msgstr ""
|
815 |
|
816 |
-
#: includes/admin/default-settings.php:
|
817 |
msgid ""
|
818 |
"The value of this field should contain the URL of the image and can be set "
|
819 |
"in the metabox in the Edit Post screen"
|
820 |
msgstr ""
|
821 |
|
822 |
-
#: includes/admin/default-settings.php:
|
823 |
msgid "Get first image"
|
824 |
msgstr ""
|
825 |
|
826 |
-
#: includes/admin/default-settings.php:
|
827 |
msgid ""
|
828 |
"The plugin will fetch the first image in the post content if this is "
|
829 |
"enabled. This can slow down the loading of your page if the first image in "
|
830 |
"the followed posts is large in file-size."
|
831 |
msgstr ""
|
832 |
|
833 |
-
#: includes/admin/default-settings.php:
|
834 |
msgid "Use default thumbnail?"
|
835 |
msgstr ""
|
836 |
|
837 |
-
#: includes/admin/default-settings.php:
|
838 |
msgid ""
|
839 |
"If checked, when no thumbnail is found, show a default one from the URL "
|
840 |
"below. If not checked and no thumbnail is found, no image will be shown."
|
841 |
msgstr ""
|
842 |
|
843 |
-
#: includes/admin/default-settings.php:
|
844 |
msgid "Default thumbnail"
|
845 |
msgstr ""
|
846 |
|
847 |
-
#: includes/admin/default-settings.php:
|
848 |
msgid ""
|
849 |
"Enter the full URL of the image that you wish to display if no thumbnail is "
|
850 |
"found. This image will be displayed below."
|
851 |
msgstr ""
|
852 |
|
853 |
-
#: includes/admin/default-settings.php:
|
854 |
msgid "Popular posts style"
|
855 |
msgstr ""
|
856 |
|
857 |
-
#: includes/admin/default-settings.php:
|
858 |
msgid "Custom CSS"
|
859 |
msgstr ""
|
860 |
|
861 |
-
#: includes/admin/default-settings.php:
|
862 |
#, php-format
|
863 |
msgid ""
|
864 |
"Do not include %3$sstyle%4$s tags. Check out the %1$sFAQ%2$s for available "
|
865 |
"CSS classes to style."
|
866 |
msgstr ""
|
867 |
|
868 |
-
#: includes/admin/default-settings.php:
|
869 |
msgid "Enable scheduled maintenance"
|
870 |
msgstr ""
|
871 |
|
872 |
-
#: includes/admin/default-settings.php:
|
|
|
873 |
msgid ""
|
874 |
"Cleaning the database at regular intervals could improve performance, "
|
875 |
"especially on high traffic blogs. Enabling maintenance will automatically "
|
876 |
-
"delete entries older than
|
877 |
msgstr ""
|
878 |
|
879 |
-
#: includes/admin/default-settings.php:
|
880 |
msgid "Time to run maintenance"
|
881 |
msgstr ""
|
882 |
|
883 |
-
#: includes/admin/default-settings.php:
|
884 |
msgid "The next two options allow you to set the time to run the cron."
|
885 |
msgstr ""
|
886 |
|
887 |
-
#: includes/admin/default-settings.php:
|
888 |
msgid "Hour"
|
889 |
msgstr ""
|
890 |
|
891 |
-
#: includes/admin/default-settings.php:
|
892 |
msgid "Minute"
|
893 |
msgstr ""
|
894 |
|
895 |
-
#: includes/admin/default-settings.php:
|
896 |
msgid "Run maintenance"
|
897 |
msgstr ""
|
898 |
|
899 |
-
#: includes/admin/default-settings.php:
|
900 |
msgid "Weekly"
|
901 |
msgstr ""
|
902 |
|
903 |
-
#: includes/admin/default-settings.php:
|
904 |
msgid "Fortnightly"
|
905 |
msgstr ""
|
906 |
|
907 |
-
#: includes/admin/default-settings.php:
|
908 |
msgid "Monthly"
|
909 |
msgstr ""
|
910 |
|
911 |
-
#: includes/admin/default-settings.php:
|
912 |
msgid "Permalink - Overall"
|
913 |
msgstr ""
|
914 |
|
915 |
-
#: includes/admin/default-settings.php:
|
916 |
#, php-format
|
917 |
msgid ""
|
918 |
"This will set the path of the custom feed generated by the plugin for "
|
@@ -920,11 +1046,11 @@ msgid ""
|
|
920 |
"when changing this option."
|
921 |
msgstr ""
|
922 |
|
923 |
-
#: includes/admin/default-settings.php:
|
924 |
msgid "Permalink - Daily"
|
925 |
msgstr ""
|
926 |
|
927 |
-
#: includes/admin/default-settings.php:
|
928 |
#, php-format
|
929 |
msgid ""
|
930 |
"This will set the path of the custom feed generated by the plugin for daily/"
|
@@ -932,70 +1058,42 @@ msgid ""
|
|
932 |
"%2$s when changing this option."
|
933 |
msgstr ""
|
934 |
|
935 |
-
#: includes/admin/default-settings.php:
|
936 |
msgid "Maximum number of posts that will be displayed in the custom feed."
|
937 |
msgstr ""
|
938 |
|
939 |
-
#: includes/admin/default-settings.php:
|
940 |
msgid "Custom period in day(s)"
|
941 |
msgstr ""
|
942 |
|
943 |
-
#: includes/admin/default-settings.php:
|
944 |
msgid "No styles"
|
945 |
msgstr ""
|
946 |
|
947 |
-
#: includes/admin/default-settings.php:
|
948 |
msgid "Select this option if you plan to add your own styles"
|
949 |
msgstr ""
|
950 |
|
951 |
-
#: includes/admin/default-settings.php:
|
952 |
msgid "Text only"
|
953 |
msgstr ""
|
954 |
|
955 |
-
#: includes/admin/default-settings.php:
|
956 |
msgid ""
|
957 |
"Disable thumbnails and no longer include the default style sheet included in "
|
958 |
"the plugin"
|
959 |
msgstr ""
|
960 |
|
961 |
-
#: includes/admin/default-settings.php:
|
962 |
msgid "Left thumbnails"
|
963 |
msgstr ""
|
964 |
|
965 |
-
#: includes/admin/default-settings.php:
|
966 |
msgid ""
|
967 |
"Enabling this option will set the post thumbnail to be before text. "
|
968 |
"Disabling this option will not revert any settings."
|
969 |
msgstr ""
|
970 |
|
971 |
-
#: includes/admin/help-tab.php:35 includes/admin/help-tab.php:136
|
972 |
-
#: includes/admin/help-tab.php:176
|
973 |
-
#, php-format
|
974 |
-
msgid ""
|
975 |
-
"For more information or how to get support visit the <a href=\"%1$s"
|
976 |
-
"\">WebberZone support site</a>."
|
977 |
-
msgstr ""
|
978 |
-
|
979 |
-
#: includes/admin/help-tab.php:37 includes/admin/help-tab.php:138
|
980 |
-
#: includes/admin/help-tab.php:178
|
981 |
-
#, php-format
|
982 |
-
msgid ""
|
983 |
-
"Support queries should be posted in the <a href=\"%1$s\">WordPress.org "
|
984 |
-
"support forums</a>."
|
985 |
-
msgstr ""
|
986 |
-
|
987 |
-
#: includes/admin/help-tab.php:40 includes/admin/help-tab.php:141
|
988 |
-
#, php-format
|
989 |
-
msgid ""
|
990 |
-
"<a href=\"%1$s\">Post an issue</a> on <a href=\"%2$s\">GitHub</a> (bug "
|
991 |
-
"reports only)."
|
992 |
-
msgstr ""
|
993 |
-
|
994 |
-
#: includes/admin/help-tab.php:49 includes/admin/help-tab.php:150
|
995 |
-
#: includes/admin/help-tab.php:189 includes/admin/settings-page.php:125
|
996 |
-
msgid "General"
|
997 |
-
msgstr ""
|
998 |
-
|
999 |
#: includes/admin/help-tab.php:51
|
1000 |
msgid "This screen provides the basic settings for configuring Top 10."
|
1001 |
msgstr ""
|
@@ -1224,10 +1322,6 @@ msgstr ""
|
|
1224 |
msgid "Post ID"
|
1225 |
msgstr ""
|
1226 |
|
1227 |
-
#: includes/admin/import-export.php:180
|
1228 |
-
msgid "Visits"
|
1229 |
-
msgstr ""
|
1230 |
-
|
1231 |
#: includes/admin/import-export.php:185
|
1232 |
msgid "Blog ID"
|
1233 |
msgstr ""
|
@@ -1464,6 +1558,112 @@ msgstr ""
|
|
1464 |
msgid "This will delete the duplicate entries in the tables. Proceed?"
|
1465 |
msgstr ""
|
1466 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1467 |
#: includes/cron.php:87
|
1468 |
msgid "Once Weekly"
|
1469 |
msgstr ""
|
@@ -1492,97 +1692,111 @@ msgstr ""
|
|
1492 |
msgid "There is no excerpt because this is a protected post."
|
1493 |
msgstr ""
|
1494 |
|
1495 |
-
#: includes/modules/class-top-ten-count-widget.php:
|
1496 |
msgid "Overall count [Top 10]"
|
1497 |
msgstr ""
|
1498 |
|
1499 |
-
#: includes/modules/class-top-ten-count-widget.php:
|
1500 |
msgid "Display overall count"
|
1501 |
msgstr ""
|
1502 |
|
1503 |
-
#: includes/modules/class-top-ten-
|
1504 |
-
msgid "
|
1505 |
msgstr ""
|
1506 |
|
1507 |
-
#: includes/modules/class-top-ten-
|
1508 |
-
msgid "
|
1509 |
msgstr ""
|
1510 |
|
1511 |
-
#: includes/modules/class-top-ten-
|
1512 |
-
msgid "
|
1513 |
msgstr ""
|
1514 |
|
1515 |
-
#: includes/modules/class-top-ten-
|
1516 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1517 |
msgstr ""
|
1518 |
|
1519 |
-
#: includes/modules/class-top-ten-widget.php:
|
1520 |
msgid "Custom time period (Enter below)"
|
1521 |
msgstr ""
|
1522 |
|
1523 |
-
#: includes/modules/class-top-ten-widget.php:
|
1524 |
msgid "In days and hours (applies only to custom option above)"
|
1525 |
msgstr ""
|
1526 |
|
1527 |
-
#: includes/modules/class-top-ten-widget.php:
|
1528 |
msgid "days"
|
1529 |
msgstr ""
|
1530 |
|
1531 |
-
#: includes/modules/class-top-ten-widget.php:
|
1532 |
msgid "hours"
|
1533 |
msgstr ""
|
1534 |
|
1535 |
-
#: includes/modules/class-top-ten-widget.php:
|
1536 |
msgid "Show count?"
|
1537 |
msgstr ""
|
1538 |
|
1539 |
-
#: includes/modules/class-top-ten-widget.php:
|
1540 |
msgid "Show excerpt?"
|
1541 |
msgstr ""
|
1542 |
|
1543 |
-
#: includes/modules/class-top-ten-widget.php:
|
1544 |
msgid "Show author?"
|
1545 |
msgstr ""
|
1546 |
|
1547 |
-
#: includes/modules/class-top-ten-widget.php:
|
1548 |
msgid "Show date?"
|
1549 |
msgstr ""
|
1550 |
|
1551 |
-
#: includes/modules/class-top-ten-widget.php:
|
1552 |
-
msgid "Thumbnail options"
|
1553 |
-
msgstr ""
|
1554 |
-
|
1555 |
-
#: includes/modules/class-top-ten-widget.php:133
|
1556 |
msgid "Thumbnails inline, before title"
|
1557 |
msgstr ""
|
1558 |
|
1559 |
-
#: includes/modules/class-top-ten-widget.php:
|
1560 |
msgid "Thumbnails inline, after title"
|
1561 |
msgstr ""
|
1562 |
|
1563 |
-
#: includes/modules/class-top-ten-widget.php:
|
1564 |
msgid "Only thumbnails, no text"
|
1565 |
msgstr ""
|
1566 |
|
1567 |
-
#: includes/modules/class-top-ten-widget.php:
|
1568 |
msgid "No thumbnails, only text."
|
1569 |
msgstr ""
|
1570 |
|
1571 |
-
#: includes/modules/class-top-ten-widget.php:
|
1572 |
msgid "Only from categories"
|
1573 |
msgstr ""
|
1574 |
|
1575 |
-
#: includes/modules/class-top-ten-widget.php:
|
1576 |
-
msgid "
|
1577 |
msgstr ""
|
1578 |
|
1579 |
-
#: includes/
|
1580 |
-
msgid ""
|
1581 |
-
"posts_only argument has been deprecated. Use get_tptn_pop_posts() to get the "
|
1582 |
-
"posts only."
|
1583 |
msgstr ""
|
1584 |
|
1585 |
-
#: includes/public/display-posts.php:
|
1586 |
#, php-format
|
1587 |
msgid ""
|
1588 |
"Popular posts by <a href=\"%1$s\" rel=\"nofollow\" %2$s>Top 10 plugin</a>"
|
@@ -1604,19 +1818,27 @@ msgstr ""
|
|
1604 |
msgid " by "
|
1605 |
msgstr ""
|
1606 |
|
1607 |
-
#: includes/tracker.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1608 |
msgid "Query variable based"
|
1609 |
msgstr ""
|
1610 |
|
1611 |
-
#: includes/tracker.php:
|
1612 |
msgid "Uses query variables to record visits"
|
1613 |
msgstr ""
|
1614 |
|
1615 |
-
#: includes/tracker.php:
|
1616 |
msgid "Ajaxurl based"
|
1617 |
msgstr ""
|
1618 |
|
1619 |
-
#: includes/tracker.php:
|
1620 |
msgid ""
|
1621 |
"Uses admin-ajax.php which is inbuilt within WordPress to process the tracker"
|
1622 |
msgstr ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Top 10\n"
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
+
"POT-Creation-Date: 2021-06-28 10:19+0100\n"
|
7 |
"PO-Revision-Date: \n"
|
8 |
"Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
|
9 |
"Language-Team: WebberZone <plugins@webberzone.com>\n"
|
14 |
"X-Poedit-KeywordsList: __;_e;_c;__ngettext;esc_html__;esc_attr__;esc_html_e;"
|
15 |
"esc_attr_e\n"
|
16 |
"X-Poedit-Basepath: ..\n"
|
17 |
+
"X-Generator: Poedit 3.0\n"
|
18 |
"X-Poedit-SourceCharset: UTF-8\n"
|
19 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
|
22 |
+
#: includes/admin/admin-columns.php:25
|
23 |
msgid "Total Views"
|
24 |
msgstr ""
|
25 |
|
26 |
+
#: includes/admin/admin-columns.php:26
|
27 |
msgid "Today's Views"
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: includes/admin/admin-columns.php:27
|
31 |
msgid "Views"
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: includes/admin/admin-dashboard.php:62
|
35 |
msgid "View all daily popular posts"
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: includes/admin/admin-dashboard.php:64
|
39 |
+
#: includes/admin/class-top-ten-dashboard.php:164
|
40 |
msgid "View all popular posts"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: includes/admin/admin-dashboard.php:72
|
44 |
#, php-format
|
45 |
msgid "Popular posts by <a href=\"%s\" target=\"_blank\">Top 10 plugin</a>"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: includes/admin/admin-dashboard.php:121 includes/admin/admin.php:40
|
49 |
+
#: includes/admin/class-top-ten-network-statistics.php:114
|
50 |
+
#: includes/admin/class-top-ten-statistics.php:124
|
51 |
msgid "Popular Posts"
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: includes/admin/admin-dashboard.php:126 includes/admin/admin.php:43
|
55 |
msgid "Daily Popular Posts"
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: includes/admin/admin-metabox.php:104
|
59 |
msgid "Visit count:"
|
60 |
msgstr ""
|
61 |
|
62 |
+
#: includes/admin/admin-metabox.php:106
|
63 |
msgid ""
|
64 |
"Enter a number above to update the visit count. Leaving the above box blank "
|
65 |
"will set the count to zero"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: includes/admin/admin-metabox.php:116
|
69 |
msgid "Disable Popular Posts display:"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: includes/admin/admin-metabox.php:119
|
73 |
msgid ""
|
74 |
"If this is checked, then Top 10 will not display the popular posts widgets "
|
75 |
"when viewing this post."
|
76 |
msgstr ""
|
77 |
|
78 |
+
#: includes/admin/admin-metabox.php:123
|
79 |
msgid "Exclude this post from the popular posts list:"
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: includes/admin/admin-metabox.php:126
|
83 |
msgid ""
|
84 |
"If this is checked, then this post will be excluded from the popular posts "
|
85 |
"list."
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: includes/admin/admin-metabox.php:130
|
89 |
msgid "Location of thumbnail:"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: includes/admin/admin-metabox.php:132
|
93 |
msgid ""
|
94 |
"Enter the full URL to the image (JPG, PNG or GIF) you'd like to use. This "
|
95 |
"image will be used for the post. It will be resized to the thumbnail size "
|
96 |
"set under Top 10 Settings » Thumbnail options."
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: includes/admin/admin-metabox.php:133
|
100 |
msgid "The URL above is saved in the meta field:"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: includes/admin/admin-metabox.php:141
|
104 |
#, php-format
|
105 |
msgid ""
|
106 |
"You have %1$s installed. If you are trying to modify the thumbnail, then you "
|
107 |
"will need to make the same change in the %1$s meta box on this page."
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: includes/admin/admin.php:34 includes/admin/settings-page.php:32
|
|
|
111 |
msgid "Top 10 Settings"
|
112 |
msgstr ""
|
113 |
|
114 |
+
#: includes/admin/admin.php:34 includes/admin/admin.php:157
|
|
|
|
|
|
|
|
|
115 |
msgid "Settings"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: includes/admin/admin.php:40 includes/admin/class-top-ten-statistics.php:70
|
119 |
msgid "Top 10 Popular Posts"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: includes/admin/admin.php:43
|
123 |
msgid "Top 10 Daily Popular Posts"
|
124 |
msgstr ""
|
125 |
|
126 |
+
#: includes/admin/admin.php:47 includes/admin/tools.php:74
|
127 |
msgid "Top 10 Tools"
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: includes/admin/admin.php:47
|
131 |
msgid "Tools"
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: includes/admin/admin.php:50
|
135 |
msgid "Top 10 Import Export Tables"
|
136 |
msgstr ""
|
137 |
|
138 |
+
#: includes/admin/admin.php:50
|
139 |
msgid "Import/Export"
|
140 |
msgstr ""
|
141 |
|
142 |
+
#: includes/admin/admin.php:111
|
143 |
#, php-format
|
144 |
msgid ""
|
145 |
"Thank you for using <a href=\"%1$s\" target=\"_blank\">Top 10</a>! Please <a "
|
147 |
"\"_blank\">WordPress.org</a>"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: includes/admin/admin.php:179 includes/admin/sidebar.php:55
|
151 |
msgid "Support"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: includes/admin/admin.php:180
|
155 |
msgid "Donate"
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: includes/admin/admin.php:181
|
159 |
msgid "Contribute"
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: includes/admin/admin.php:199
|
163 |
msgid "Top 10 - Network Popular Posts"
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: includes/admin/admin.php:199 includes/admin/class-top-ten-dashboard.php:199
|
167 |
+
msgid "Top 10"
|
168 |
+
msgstr ""
|
169 |
+
|
170 |
+
#: includes/admin/class-top-ten-dashboard.php:83
|
171 |
+
#: includes/admin/class-top-ten-dashboard.php:199
|
172 |
+
#: includes/admin/class-top-ten-dashboard.php:201
|
173 |
+
msgid "Top 10 Dashboard"
|
174 |
+
msgstr ""
|
175 |
+
|
176 |
+
#: includes/admin/class-top-ten-dashboard.php:98
|
177 |
+
msgid "Update"
|
178 |
+
msgstr ""
|
179 |
+
|
180 |
+
#: includes/admin/class-top-ten-dashboard.php:110
|
181 |
+
msgid "Top 10 Visits"
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: includes/admin/class-top-ten-dashboard.php:115
|
185 |
+
msgid "Historical visits"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: includes/admin/class-top-ten-dashboard.php:201
|
189 |
+
msgid "Dashboard"
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: includes/admin/class-top-ten-dashboard.php:242
|
193 |
+
#: includes/admin/import-export.php:180
|
194 |
+
msgid "Visits"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: includes/admin/class-top-ten-dashboard.php:243
|
198 |
+
msgid "Daily Visits"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: includes/admin/class-top-ten-dashboard.php:305
|
202 |
+
msgid "Today"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: includes/admin/class-top-ten-dashboard.php:310
|
206 |
+
msgid "Yesterday"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: includes/admin/class-top-ten-dashboard.php:315
|
210 |
+
msgid "Last 7 days"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: includes/admin/class-top-ten-dashboard.php:320
|
214 |
+
msgid "Last 30 days"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: includes/admin/class-top-ten-dashboard.php:325
|
218 |
+
msgid "All time"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: includes/admin/class-top-ten-dashboard.php:381
|
222 |
+
msgid "Sorry, no popular posts found."
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: includes/admin/class-top-ten-dashboard.php:495
|
226 |
+
#: includes/admin/help-tab.php:35 includes/admin/help-tab.php:136
|
227 |
+
#: includes/admin/help-tab.php:176
|
228 |
+
#, php-format
|
229 |
+
msgid ""
|
230 |
+
"For more information or how to get support visit the <a href=\"%1$s"
|
231 |
+
"\">WebberZone support site</a>."
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: includes/admin/class-top-ten-dashboard.php:497
|
235 |
+
#: includes/admin/help-tab.php:37 includes/admin/help-tab.php:138
|
236 |
+
#: includes/admin/help-tab.php:178
|
237 |
+
#, php-format
|
238 |
+
msgid ""
|
239 |
+
"Support queries should be posted in the <a href=\"%1$s\">WordPress.org "
|
240 |
+
"support forums</a>."
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
#: includes/admin/class-top-ten-dashboard.php:500
|
244 |
+
#: includes/admin/help-tab.php:40 includes/admin/help-tab.php:141
|
245 |
+
#, php-format
|
246 |
+
msgid ""
|
247 |
+
"<a href=\"%1$s\">Post an issue</a> on <a href=\"%2$s\">GitHub</a> (bug "
|
248 |
+
"reports only)."
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: includes/admin/class-top-ten-dashboard.php:509
|
252 |
+
#: includes/admin/help-tab.php:49 includes/admin/help-tab.php:150
|
253 |
+
#: includes/admin/help-tab.php:189 includes/admin/settings-page.php:125
|
254 |
+
msgid "General"
|
255 |
+
msgstr ""
|
256 |
+
|
257 |
+
#: includes/admin/class-top-ten-dashboard.php:511
|
258 |
+
msgid "This screen displays the historical traffic on your site."
|
259 |
+
msgstr ""
|
260 |
+
|
261 |
+
#: includes/admin/class-top-ten-dashboard.php:513
|
262 |
+
#, php-format
|
263 |
+
msgid ""
|
264 |
+
"The data is pulled from the daily tables in the database. If you have "
|
265 |
+
"enabled maintenance then the amount of historical data that is available "
|
266 |
+
"will be limited to %d days."
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
+
#: includes/admin/class-top-ten-dashboard.php:514
|
270 |
+
msgid ""
|
271 |
+
"You can change this by setting the constant TOP_TEN_STORE_DATA to the number "
|
272 |
+
"of days of your choice in your wp-config.php."
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:32
|
276 |
+
#: includes/admin/class-top-ten-statistics-table.php:39
|
277 |
msgid "popular_post"
|
278 |
msgstr ""
|
279 |
|
280 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:33
|
281 |
+
#: includes/admin/class-top-ten-statistics-table.php:40
|
282 |
msgid "popular_posts"
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:183
|
286 |
+
#: includes/admin/class-top-ten-statistics-table.php:213
|
287 |
msgid "No popular posts available."
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:231
|
291 |
+
msgid "Invalid post ID. This post might have been deleted."
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:256
|
295 |
+
#: includes/admin/class-top-ten-statistics-table.php:297
|
296 |
msgid "Y/m/d"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:294
|
300 |
+
#: includes/admin/class-top-ten-statistics-table.php:351
|
301 |
+
#: includes/modules/class-top-ten-count-widget.php:49
|
302 |
+
#: includes/modules/class-top-ten-widget.php:79
|
303 |
msgid "Title"
|
304 |
msgstr ""
|
305 |
|
306 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:295
|
307 |
msgid "Blog"
|
308 |
msgstr ""
|
309 |
|
310 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:296
|
311 |
+
#: includes/admin/class-top-ten-statistics-table.php:356
|
312 |
#: includes/admin/import-export.php:183
|
313 |
msgid "Date"
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:297
|
317 |
+
#: includes/admin/class-top-ten-statistics-table.php:352
|
318 |
msgid "Total visits"
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:298
|
322 |
+
#: includes/admin/class-top-ten-statistics-table.php:353
|
323 |
msgid "Daily visits"
|
324 |
msgstr ""
|
325 |
|
326 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:331
|
327 |
+
#: includes/admin/class-top-ten-statistics-table.php:390
|
328 |
msgid "Delete Count"
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:378
|
332 |
+
#: includes/admin/class-top-ten-statistics-table.php:437
|
333 |
msgid "Are you sure you want to do this"
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: includes/admin/class-top-ten-network-statistics-table.php:420
|
337 |
+
#: includes/admin/class-top-ten-statistics-table.php:504
|
338 |
msgid "Filter"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: includes/admin/class-top-ten-network-statistics.php:70
|
342 |
msgid "Top 10 - Network Wide Popular Posts"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: includes/admin/class-top-ten-statistics-table.php:44
|
346 |
msgid "All post types"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: includes/admin/class-top-ten-statistics-table.php:263
|
350 |
msgid "View"
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: includes/admin/class-top-ten-statistics-table.php:264
|
354 |
msgid "Edit"
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: includes/admin/class-top-ten-statistics-table.php:265
|
358 |
msgid "Delete"
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: includes/admin/class-top-ten-statistics-table.php:295
|
362 |
#, php-format
|
363 |
msgid "%s ago"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: includes/admin/class-top-ten-statistics-table.php:354
|
367 |
msgid "Post type"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: includes/admin/class-top-ten-statistics-table.php:355
|
371 |
msgid "Author"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: includes/admin/class-top-ten-statistics.php:99
|
375 |
msgid "Search Table"
|
376 |
msgstr ""
|
377 |
|
380 |
msgstr ""
|
381 |
|
382 |
#: includes/admin/default-settings.php:72
|
383 |
+
#: includes/modules/class-top-ten-widget.php:94
|
384 |
msgid "Overall"
|
385 |
msgstr ""
|
386 |
|
387 |
#: includes/admin/default-settings.php:73
|
388 |
+
#: includes/admin/default-settings.php:729
|
389 |
msgid "Daily"
|
390 |
msgstr ""
|
391 |
|
661 |
msgstr ""
|
662 |
|
663 |
#: includes/admin/default-settings.php:320
|
664 |
+
#: includes/admin/default-settings.php:778
|
665 |
msgid "Number of posts to display"
|
666 |
msgstr ""
|
667 |
|
695 |
msgstr ""
|
696 |
|
697 |
#: includes/admin/default-settings.php:342
|
698 |
+
msgid "Exclude Front page and Posts page"
|
699 |
msgstr ""
|
700 |
|
701 |
#: includes/admin/default-settings.php:343
|
702 |
msgid ""
|
703 |
+
"If you have set your Front page and Posts page to be specific pages via "
|
704 |
+
"Settings > Reading, then these will be tracked similar to other pages. "
|
705 |
+
"Enable this option to exclude them from showing up in the popular posts "
|
706 |
+
"lists. The tracking will not be disabled."
|
707 |
+
msgstr ""
|
708 |
+
|
709 |
+
#: includes/admin/default-settings.php:349
|
710 |
+
msgid "Post/page IDs to exclude"
|
711 |
+
msgstr ""
|
712 |
+
|
713 |
+
#: includes/admin/default-settings.php:350
|
714 |
+
msgid ""
|
715 |
"Comma-separated list of post or page IDs to exclude from the list. e.g. "
|
716 |
"188,320,500"
|
717 |
msgstr ""
|
718 |
|
719 |
+
#: includes/admin/default-settings.php:356
|
720 |
msgid "Exclude Categories"
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: includes/admin/default-settings.php:357
|
724 |
msgid ""
|
725 |
"Comma separated list of category slugs. The field above has an autocomplete "
|
726 |
"so simply start typing in the starting letters and it will prompt you with "
|
727 |
"options. Does not support custom taxonomies."
|
728 |
msgstr ""
|
729 |
|
730 |
+
#: includes/admin/default-settings.php:368
|
731 |
msgid "Exclude category IDs"
|
732 |
msgstr ""
|
733 |
|
734 |
+
#: includes/admin/default-settings.php:369
|
735 |
msgid ""
|
736 |
"This is a readonly field that is automatically populated based on the above "
|
737 |
"input when the settings are saved. These might differ from the IDs visible "
|
739 |
"term_taxonomy_id which is unique to this taxonomy."
|
740 |
msgstr ""
|
741 |
|
742 |
+
#: includes/admin/default-settings.php:376
|
743 |
msgid "Customize the output"
|
744 |
msgstr ""
|
745 |
|
746 |
+
#: includes/admin/default-settings.php:382
|
747 |
msgid "Heading of posts"
|
748 |
msgstr ""
|
749 |
|
750 |
+
#: includes/admin/default-settings.php:383
|
751 |
+
#: includes/admin/default-settings.php:391
|
752 |
msgid "Displayed before the list of the posts as a the master heading"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: includes/admin/default-settings.php:385
|
756 |
msgid "Popular posts:"
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: includes/admin/default-settings.php:390
|
760 |
msgid "Heading of posts for daily/custom period lists"
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: includes/admin/default-settings.php:393
|
764 |
msgid "Currently trending:"
|
765 |
msgstr ""
|
766 |
|
767 |
+
#: includes/admin/default-settings.php:398
|
768 |
msgid "Show when no posts are found"
|
769 |
msgstr ""
|
770 |
|
771 |
+
#: includes/admin/default-settings.php:404
|
772 |
msgid "Blank output"
|
773 |
msgstr ""
|
774 |
|
775 |
+
#: includes/admin/default-settings.php:405
|
776 |
msgid "Display custom text"
|
777 |
msgstr ""
|
778 |
|
779 |
+
#: includes/admin/default-settings.php:410
|
780 |
msgid "Custom text"
|
781 |
msgstr ""
|
782 |
|
783 |
+
#: includes/admin/default-settings.php:411
|
784 |
msgid ""
|
785 |
"Enter the custom text that will be displayed if the second option is "
|
786 |
"selected above"
|
787 |
msgstr ""
|
788 |
|
789 |
+
#: includes/admin/default-settings.php:413 includes/deprecated.php:180
|
790 |
msgid "No top posts yet"
|
791 |
msgstr ""
|
792 |
|
793 |
+
#: includes/admin/default-settings.php:417
|
794 |
msgid "Show post excerpt"
|
795 |
msgstr ""
|
796 |
|
797 |
+
#: includes/admin/default-settings.php:424
|
798 |
msgid "Length of excerpt (in words)"
|
799 |
msgstr ""
|
800 |
|
801 |
+
#: includes/admin/default-settings.php:432
|
802 |
+
#: includes/blocks/popular-posts/index.js:207
|
803 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
804 |
msgid "Show date"
|
805 |
msgstr ""
|
806 |
|
807 |
+
#: includes/admin/default-settings.php:439
|
808 |
+
#: includes/blocks/popular-posts/index.js:202
|
809 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
810 |
msgid "Show author"
|
811 |
msgstr ""
|
812 |
|
813 |
+
#: includes/admin/default-settings.php:446
|
814 |
msgid "Show number of views"
|
815 |
msgstr ""
|
816 |
|
817 |
+
#: includes/admin/default-settings.php:453
|
818 |
msgid "Limit post title length (in characters)"
|
819 |
msgstr ""
|
820 |
|
821 |
+
#: includes/admin/default-settings.php:461
|
822 |
msgid "Open links in new window"
|
823 |
msgstr ""
|
824 |
|
825 |
+
#: includes/admin/default-settings.php:468
|
826 |
msgid "Add nofollow to links"
|
827 |
msgstr ""
|
828 |
|
829 |
+
#: includes/admin/default-settings.php:475
|
830 |
msgid "HTML to display"
|
831 |
msgstr ""
|
832 |
|
833 |
+
#: includes/admin/default-settings.php:481
|
834 |
msgid "Before the list of posts"
|
835 |
msgstr ""
|
836 |
|
837 |
+
#: includes/admin/default-settings.php:488
|
838 |
msgid "After the list of posts"
|
839 |
msgstr ""
|
840 |
|
841 |
+
#: includes/admin/default-settings.php:495
|
842 |
msgid "Before each list item"
|
843 |
msgstr ""
|
844 |
|
845 |
+
#: includes/admin/default-settings.php:502
|
846 |
msgid "After each list item"
|
847 |
msgstr ""
|
848 |
|
849 |
+
#: includes/admin/default-settings.php:532
|
850 |
msgid "Location of the post thumbnail"
|
851 |
msgstr ""
|
852 |
|
853 |
+
#: includes/admin/default-settings.php:537
|
854 |
msgid "Display thumbnails inline with posts, before title"
|
855 |
msgstr ""
|
856 |
|
857 |
+
#: includes/admin/default-settings.php:538
|
858 |
msgid "Display thumbnails inline with posts, after title"
|
859 |
msgstr ""
|
860 |
|
861 |
+
#: includes/admin/default-settings.php:539
|
862 |
msgid "Display only thumbnails, no text"
|
863 |
msgstr ""
|
864 |
|
865 |
+
#: includes/admin/default-settings.php:540
|
866 |
msgid "Do not display thumbnails, only text"
|
867 |
msgstr ""
|
868 |
|
869 |
+
#: includes/admin/default-settings.php:545
|
870 |
msgid "Thumbnail size"
|
871 |
msgstr ""
|
872 |
|
873 |
+
#: includes/admin/default-settings.php:547
|
874 |
msgid ""
|
875 |
"You can choose from existing image sizes above or create a custom size. If "
|
876 |
"you have chosen Custom size above, then enter the width, height and crop "
|
878 |
"width and/or height below, existing images will not be automatically resized."
|
879 |
msgstr ""
|
880 |
|
881 |
+
#: includes/admin/default-settings.php:547
|
882 |
#, php-format
|
883 |
msgid "I recommend using %1$s or %2$s to regenerate all image sizes."
|
884 |
msgstr ""
|
885 |
|
886 |
+
#: includes/admin/default-settings.php:554
|
887 |
+
#: includes/modules/class-top-ten-widget.php:144
|
888 |
msgid "Thumbnail width"
|
889 |
msgstr ""
|
890 |
|
891 |
+
#: includes/admin/default-settings.php:562
|
892 |
+
#: includes/modules/class-top-ten-widget.php:138
|
893 |
msgid "Thumbnail height"
|
894 |
msgstr ""
|
895 |
|
896 |
+
#: includes/admin/default-settings.php:570
|
897 |
msgid "Hard crop thumbnails"
|
898 |
msgstr ""
|
899 |
|
900 |
+
#: includes/admin/default-settings.php:571
|
901 |
msgid ""
|
902 |
"Check this box to hard crop the thumbnails. i.e. force the width and height "
|
903 |
"above vs. maintaining proportions."
|
904 |
msgstr ""
|
905 |
|
906 |
+
#: includes/admin/default-settings.php:577
|
907 |
msgid "Generate thumbnail sizes"
|
908 |
msgstr ""
|
909 |
|
910 |
+
#: includes/admin/default-settings.php:578
|
911 |
msgid ""
|
912 |
"If you select this option and Custom size is selected above, the plugin will "
|
913 |
"register the image size with WordPress to create new thumbnails. Does not "
|
914 |
"update old images as explained above."
|
915 |
msgstr ""
|
916 |
|
917 |
+
#: includes/admin/default-settings.php:584
|
918 |
msgid "Thumbnail size attributes"
|
919 |
msgstr ""
|
920 |
|
921 |
+
#: includes/admin/default-settings.php:590
|
922 |
#, php-format
|
923 |
msgid "Use CSS to set the width and height: e.g. %s"
|
924 |
msgstr ""
|
925 |
|
926 |
+
#: includes/admin/default-settings.php:592
|
927 |
#, php-format
|
928 |
msgid "Use HTML attributes to set the width and height: e.g. %s"
|
929 |
msgstr ""
|
930 |
|
931 |
+
#: includes/admin/default-settings.php:593
|
932 |
msgid ""
|
933 |
"No width or height set. You will need to use external styles to force any "
|
934 |
"width or height of your choice."
|
935 |
msgstr ""
|
936 |
|
937 |
+
#: includes/admin/default-settings.php:598
|
938 |
msgid "Thumbnail meta field name"
|
939 |
msgstr ""
|
940 |
|
941 |
+
#: includes/admin/default-settings.php:599
|
942 |
msgid ""
|
943 |
"The value of this field should contain the URL of the image and can be set "
|
944 |
"in the metabox in the Edit Post screen"
|
945 |
msgstr ""
|
946 |
|
947 |
+
#: includes/admin/default-settings.php:605
|
948 |
msgid "Get first image"
|
949 |
msgstr ""
|
950 |
|
951 |
+
#: includes/admin/default-settings.php:606
|
952 |
msgid ""
|
953 |
"The plugin will fetch the first image in the post content if this is "
|
954 |
"enabled. This can slow down the loading of your page if the first image in "
|
955 |
"the followed posts is large in file-size."
|
956 |
msgstr ""
|
957 |
|
958 |
+
#: includes/admin/default-settings.php:612
|
959 |
msgid "Use default thumbnail?"
|
960 |
msgstr ""
|
961 |
|
962 |
+
#: includes/admin/default-settings.php:613
|
963 |
msgid ""
|
964 |
"If checked, when no thumbnail is found, show a default one from the URL "
|
965 |
"below. If not checked and no thumbnail is found, no image will be shown."
|
966 |
msgstr ""
|
967 |
|
968 |
+
#: includes/admin/default-settings.php:619 includes/admin/settings-page.php:743
|
969 |
msgid "Default thumbnail"
|
970 |
msgstr ""
|
971 |
|
972 |
+
#: includes/admin/default-settings.php:620
|
973 |
msgid ""
|
974 |
"Enter the full URL of the image that you wish to display if no thumbnail is "
|
975 |
"found. This image will be displayed below."
|
976 |
msgstr ""
|
977 |
|
978 |
+
#: includes/admin/default-settings.php:650
|
979 |
msgid "Popular posts style"
|
980 |
msgstr ""
|
981 |
|
982 |
+
#: includes/admin/default-settings.php:658
|
983 |
msgid "Custom CSS"
|
984 |
msgstr ""
|
985 |
|
986 |
+
#: includes/admin/default-settings.php:660
|
987 |
#, php-format
|
988 |
msgid ""
|
989 |
"Do not include %3$sstyle%4$s tags. Check out the %1$sFAQ%2$s for available "
|
990 |
"CSS classes to style."
|
991 |
msgstr ""
|
992 |
|
993 |
+
#: includes/admin/default-settings.php:690
|
994 |
msgid "Enable scheduled maintenance"
|
995 |
msgstr ""
|
996 |
|
997 |
+
#: includes/admin/default-settings.php:692
|
998 |
+
#, php-format
|
999 |
msgid ""
|
1000 |
"Cleaning the database at regular intervals could improve performance, "
|
1001 |
"especially on high traffic blogs. Enabling maintenance will automatically "
|
1002 |
+
"delete entries older than %d days in the daily tables."
|
1003 |
msgstr ""
|
1004 |
|
1005 |
+
#: includes/admin/default-settings.php:698
|
1006 |
msgid "Time to run maintenance"
|
1007 |
msgstr ""
|
1008 |
|
1009 |
+
#: includes/admin/default-settings.php:699
|
1010 |
msgid "The next two options allow you to set the time to run the cron."
|
1011 |
msgstr ""
|
1012 |
|
1013 |
+
#: includes/admin/default-settings.php:704
|
1014 |
msgid "Hour"
|
1015 |
msgstr ""
|
1016 |
|
1017 |
+
#: includes/admin/default-settings.php:714
|
1018 |
msgid "Minute"
|
1019 |
msgstr ""
|
1020 |
|
1021 |
+
#: includes/admin/default-settings.php:724
|
1022 |
msgid "Run maintenance"
|
1023 |
msgstr ""
|
1024 |
|
1025 |
+
#: includes/admin/default-settings.php:730
|
1026 |
msgid "Weekly"
|
1027 |
msgstr ""
|
1028 |
|
1029 |
+
#: includes/admin/default-settings.php:731
|
1030 |
msgid "Fortnightly"
|
1031 |
msgstr ""
|
1032 |
|
1033 |
+
#: includes/admin/default-settings.php:732
|
1034 |
msgid "Monthly"
|
1035 |
msgstr ""
|
1036 |
|
1037 |
+
#: includes/admin/default-settings.php:760
|
1038 |
msgid "Permalink - Overall"
|
1039 |
msgstr ""
|
1040 |
|
1041 |
+
#: includes/admin/default-settings.php:762
|
1042 |
#, php-format
|
1043 |
msgid ""
|
1044 |
"This will set the path of the custom feed generated by the plugin for "
|
1046 |
"when changing this option."
|
1047 |
msgstr ""
|
1048 |
|
1049 |
+
#: includes/admin/default-settings.php:769
|
1050 |
msgid "Permalink - Daily"
|
1051 |
msgstr ""
|
1052 |
|
1053 |
+
#: includes/admin/default-settings.php:771
|
1054 |
#, php-format
|
1055 |
msgid ""
|
1056 |
"This will set the path of the custom feed generated by the plugin for daily/"
|
1058 |
"%2$s when changing this option."
|
1059 |
msgstr ""
|
1060 |
|
1061 |
+
#: includes/admin/default-settings.php:779
|
1062 |
msgid "Maximum number of posts that will be displayed in the custom feed."
|
1063 |
msgstr ""
|
1064 |
|
1065 |
+
#: includes/admin/default-settings.php:786
|
1066 |
msgid "Custom period in day(s)"
|
1067 |
msgstr ""
|
1068 |
|
1069 |
+
#: includes/admin/default-settings.php:888
|
1070 |
msgid "No styles"
|
1071 |
msgstr ""
|
1072 |
|
1073 |
+
#: includes/admin/default-settings.php:889
|
1074 |
msgid "Select this option if you plan to add your own styles"
|
1075 |
msgstr ""
|
1076 |
|
1077 |
+
#: includes/admin/default-settings.php:893
|
1078 |
msgid "Text only"
|
1079 |
msgstr ""
|
1080 |
|
1081 |
+
#: includes/admin/default-settings.php:894
|
1082 |
msgid ""
|
1083 |
"Disable thumbnails and no longer include the default style sheet included in "
|
1084 |
"the plugin"
|
1085 |
msgstr ""
|
1086 |
|
1087 |
+
#: includes/admin/default-settings.php:898
|
1088 |
msgid "Left thumbnails"
|
1089 |
msgstr ""
|
1090 |
|
1091 |
+
#: includes/admin/default-settings.php:899
|
1092 |
msgid ""
|
1093 |
"Enabling this option will set the post thumbnail to be before text. "
|
1094 |
"Disabling this option will not revert any settings."
|
1095 |
msgstr ""
|
1096 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1097 |
#: includes/admin/help-tab.php:51
|
1098 |
msgid "This screen provides the basic settings for configuring Top 10."
|
1099 |
msgstr ""
|
1322 |
msgid "Post ID"
|
1323 |
msgstr ""
|
1324 |
|
|
|
|
|
|
|
|
|
1325 |
#: includes/admin/import-export.php:185
|
1326 |
msgid "Blog ID"
|
1327 |
msgstr ""
|
1558 |
msgid "This will delete the duplicate entries in the tables. Proceed?"
|
1559 |
msgstr ""
|
1560 |
|
1561 |
+
#: includes/blocks/popular-posts/index.js:22
|
1562 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1563 |
+
#: includes/modules/class-top-ten-widget.php:26
|
1564 |
+
msgid "Popular Posts [Top 10]"
|
1565 |
+
msgstr ""
|
1566 |
+
|
1567 |
+
#: includes/blocks/popular-posts/index.js:23
|
1568 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1569 |
+
msgid "Display popular posts by Top 10"
|
1570 |
+
msgstr ""
|
1571 |
+
|
1572 |
+
#: includes/blocks/popular-posts/index.js:26
|
1573 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1574 |
+
msgid "popular posts"
|
1575 |
+
msgstr ""
|
1576 |
+
|
1577 |
+
#: includes/blocks/popular-posts/index.js:26
|
1578 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1579 |
+
msgid "popular"
|
1580 |
+
msgstr ""
|
1581 |
+
|
1582 |
+
#: includes/blocks/popular-posts/index.js:26
|
1583 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1584 |
+
msgid "posts"
|
1585 |
+
msgstr ""
|
1586 |
+
|
1587 |
+
#: includes/blocks/popular-posts/index.js:145
|
1588 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1589 |
+
msgid "Show heading"
|
1590 |
+
msgstr ""
|
1591 |
+
|
1592 |
+
#: includes/blocks/popular-posts/index.js:150
|
1593 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1594 |
+
msgid "Custom period? Set range below"
|
1595 |
+
msgstr ""
|
1596 |
+
|
1597 |
+
#: includes/blocks/popular-posts/index.js:155
|
1598 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1599 |
+
msgid "Daily range"
|
1600 |
+
msgstr ""
|
1601 |
+
|
1602 |
+
#: includes/blocks/popular-posts/index.js:165
|
1603 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1604 |
+
msgid "Hourly range"
|
1605 |
+
msgstr ""
|
1606 |
+
|
1607 |
+
#: includes/blocks/popular-posts/index.js:175
|
1608 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1609 |
+
#: includes/modules/class-top-ten-widget.php:84
|
1610 |
+
msgid "No. of posts"
|
1611 |
+
msgstr ""
|
1612 |
+
|
1613 |
+
#: includes/blocks/popular-posts/index.js:186
|
1614 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1615 |
+
#: includes/modules/class-top-ten-widget.php:89
|
1616 |
+
msgid "Offset"
|
1617 |
+
msgstr ""
|
1618 |
+
|
1619 |
+
#: includes/blocks/popular-posts/index.js:197
|
1620 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1621 |
+
msgid "Show excerpt"
|
1622 |
+
msgstr ""
|
1623 |
+
|
1624 |
+
#: includes/blocks/popular-posts/index.js:212
|
1625 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1626 |
+
msgid "Show count"
|
1627 |
+
msgstr ""
|
1628 |
+
|
1629 |
+
#: includes/blocks/popular-posts/index.js:218
|
1630 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1631 |
+
#: includes/modules/class-top-ten-widget.php:128
|
1632 |
+
msgid "Thumbnail options"
|
1633 |
+
msgstr ""
|
1634 |
+
|
1635 |
+
#: includes/blocks/popular-posts/index.js:221
|
1636 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1637 |
+
msgid "Before title"
|
1638 |
+
msgstr ""
|
1639 |
+
|
1640 |
+
#: includes/blocks/popular-posts/index.js:222
|
1641 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1642 |
+
msgid "After title"
|
1643 |
+
msgstr ""
|
1644 |
+
|
1645 |
+
#: includes/blocks/popular-posts/index.js:223
|
1646 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1647 |
+
msgid "Only thumbnail"
|
1648 |
+
msgstr ""
|
1649 |
+
|
1650 |
+
#: includes/blocks/popular-posts/index.js:224
|
1651 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1652 |
+
msgid "Only text"
|
1653 |
+
msgstr ""
|
1654 |
+
|
1655 |
+
#: includes/blocks/popular-posts/index.js:228
|
1656 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1657 |
+
msgid "Other attributes"
|
1658 |
+
msgstr ""
|
1659 |
+
|
1660 |
+
#: includes/blocks/popular-posts/index.js:229
|
1661 |
+
#: includes/blocks/popular-posts/index.min.js:1
|
1662 |
+
msgid ""
|
1663 |
+
"Enter other attributes in a URL-style string-query. e.g. post_types=post,"
|
1664 |
+
"page&link_nofollow=1&exclude_post_ids=5,6"
|
1665 |
+
msgstr ""
|
1666 |
+
|
1667 |
#: includes/cron.php:87
|
1668 |
msgid "Once Weekly"
|
1669 |
msgstr ""
|
1692 |
msgid "There is no excerpt because this is a protected post."
|
1693 |
msgstr ""
|
1694 |
|
1695 |
+
#: includes/modules/class-top-ten-count-widget.php:26
|
1696 |
msgid "Overall count [Top 10]"
|
1697 |
msgstr ""
|
1698 |
|
1699 |
+
#: includes/modules/class-top-ten-count-widget.php:28
|
1700 |
msgid "Display overall count"
|
1701 |
msgstr ""
|
1702 |
|
1703 |
+
#: includes/modules/class-top-ten-rest-api.php:56
|
1704 |
+
msgid "Post ID."
|
1705 |
msgstr ""
|
1706 |
|
1707 |
+
#: includes/modules/class-top-ten-rest-api.php:136
|
1708 |
+
msgid "Invalid post ID."
|
1709 |
msgstr ""
|
1710 |
|
1711 |
+
#: includes/modules/class-top-ten-rest-api.php:212
|
1712 |
+
msgid "Number of posts"
|
1713 |
msgstr ""
|
1714 |
|
1715 |
+
#: includes/modules/class-top-ten-rest-api.php:217
|
1716 |
+
msgid "Post types"
|
1717 |
+
msgstr ""
|
1718 |
+
|
1719 |
+
#: includes/modules/class-top-ten-rest-api.php:235
|
1720 |
+
msgid "ID of the post."
|
1721 |
+
msgstr ""
|
1722 |
+
|
1723 |
+
#: includes/modules/class-top-ten-rest-api.php:240
|
1724 |
+
msgid "Blog ID of the post."
|
1725 |
+
msgstr ""
|
1726 |
+
|
1727 |
+
#: includes/modules/class-top-ten-rest-api.php:245
|
1728 |
+
msgid "Activate counter flag."
|
1729 |
+
msgstr ""
|
1730 |
+
|
1731 |
+
#: includes/modules/class-top-ten-rest-api.php:250
|
1732 |
+
msgid "Debug flag."
|
1733 |
+
msgstr ""
|
1734 |
+
|
1735 |
+
#: includes/modules/class-top-ten-widget.php:28
|
1736 |
+
msgid "Display popular posts"
|
1737 |
msgstr ""
|
1738 |
|
1739 |
+
#: includes/modules/class-top-ten-widget.php:95
|
1740 |
msgid "Custom time period (Enter below)"
|
1741 |
msgstr ""
|
1742 |
|
1743 |
+
#: includes/modules/class-top-ten-widget.php:99
|
1744 |
msgid "In days and hours (applies only to custom option above)"
|
1745 |
msgstr ""
|
1746 |
|
1747 |
+
#: includes/modules/class-top-ten-widget.php:101
|
1748 |
msgid "days"
|
1749 |
msgstr ""
|
1750 |
|
1751 |
+
#: includes/modules/class-top-ten-widget.php:104
|
1752 |
msgid "hours"
|
1753 |
msgstr ""
|
1754 |
|
1755 |
+
#: includes/modules/class-top-ten-widget.php:109
|
1756 |
msgid "Show count?"
|
1757 |
msgstr ""
|
1758 |
|
1759 |
+
#: includes/modules/class-top-ten-widget.php:114
|
1760 |
msgid "Show excerpt?"
|
1761 |
msgstr ""
|
1762 |
|
1763 |
+
#: includes/modules/class-top-ten-widget.php:119
|
1764 |
msgid "Show author?"
|
1765 |
msgstr ""
|
1766 |
|
1767 |
+
#: includes/modules/class-top-ten-widget.php:124
|
1768 |
msgid "Show date?"
|
1769 |
msgstr ""
|
1770 |
|
1771 |
+
#: includes/modules/class-top-ten-widget.php:130
|
|
|
|
|
|
|
|
|
1772 |
msgid "Thumbnails inline, before title"
|
1773 |
msgstr ""
|
1774 |
|
1775 |
+
#: includes/modules/class-top-ten-widget.php:131
|
1776 |
msgid "Thumbnails inline, after title"
|
1777 |
msgstr ""
|
1778 |
|
1779 |
+
#: includes/modules/class-top-ten-widget.php:132
|
1780 |
msgid "Only thumbnails, no text"
|
1781 |
msgstr ""
|
1782 |
|
1783 |
+
#: includes/modules/class-top-ten-widget.php:133
|
1784 |
msgid "No thumbnails, only text."
|
1785 |
msgstr ""
|
1786 |
|
1787 |
+
#: includes/modules/class-top-ten-widget.php:150
|
1788 |
msgid "Only from categories"
|
1789 |
msgstr ""
|
1790 |
|
1791 |
+
#: includes/modules/class-top-ten-widget.php:157
|
1792 |
+
msgid "Include IDs"
|
1793 |
msgstr ""
|
1794 |
|
1795 |
+
#: includes/modules/class-top-ten-widget.php:161
|
1796 |
+
msgid "Post types to include:"
|
|
|
|
|
1797 |
msgstr ""
|
1798 |
|
1799 |
+
#: includes/public/display-posts.php:211
|
1800 |
#, php-format
|
1801 |
msgid ""
|
1802 |
"Popular posts by <a href=\"%1$s\" rel=\"nofollow\" %2$s>Top 10 plugin</a>"
|
1818 |
msgid " by "
|
1819 |
msgstr ""
|
1820 |
|
1821 |
+
#: includes/tracker.php:293
|
1822 |
+
msgid "REST API based"
|
1823 |
+
msgstr ""
|
1824 |
+
|
1825 |
+
#: includes/tracker.php:294
|
1826 |
+
msgid "Uses the REST API to record visits"
|
1827 |
+
msgstr ""
|
1828 |
+
|
1829 |
+
#: includes/tracker.php:298
|
1830 |
msgid "Query variable based"
|
1831 |
msgstr ""
|
1832 |
|
1833 |
+
#: includes/tracker.php:299
|
1834 |
msgid "Uses query variables to record visits"
|
1835 |
msgstr ""
|
1836 |
|
1837 |
+
#: includes/tracker.php:303
|
1838 |
msgid "Ajaxurl based"
|
1839 |
msgstr ""
|
1840 |
|
1841 |
+
#: includes/tracker.php:304
|
1842 |
msgid ""
|
1843 |
"Uses admin-ajax.php which is inbuilt within WordPress to process the tracker"
|
1844 |
msgstr ""
|
readme.txt
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
Tags: popular posts, top 10, counter, top posts, daily popular, page views, statistics, tracker
|
3 |
Contributors: webberzone, Ajay
|
4 |
Donate link: https://ajaydsouza.com/donate/
|
5 |
-
Stable tag:
|
6 |
-
Requires at least:
|
7 |
-
Tested up to: 5.
|
8 |
-
Requires PHP:
|
9 |
License: GPLv2 or later
|
10 |
|
11 |
Track daily and total visits on your blog posts. Display the count as well as popular and trending posts.
|
@@ -24,6 +24,7 @@ Top 10 also has powerful API and is fully extendable with WordPress actions and
|
|
24 |
|
25 |
* **Page counter**: Counts page views on single posts, pages and *custom post types* on an hourly basis which can then be easily displayed automatically, using shortcodes or functions
|
26 |
* **Popular posts**: Display a list of popular posts either for total counts or for a custom period. You can choose how many posts are to be displayed along with loads of other customisation options
|
|
|
27 |
* **Widget ready**: Sidebar widgets available for daily popular and overall popular posts. Highly customizable widgets to control what you want to display in the list of posts
|
28 |
* **Shortcodes**: The plugin includes two shortcodes `[tptn_list]` and `[tptn_views]` to display the posts list and the number of views respectively
|
29 |
* **Thumbnail support**
|
@@ -71,6 +72,7 @@ So, if you've got some cool feature that you'd like to implement into the plugin
|
|
71 |
11. Top 10 - Popular posts view in Admin
|
72 |
12. Top 10 Export/Import interface
|
73 |
13. Top 10 - Popular posts view in Network Admin
|
|
|
74 |
|
75 |
== Installation ==
|
76 |
|
@@ -88,7 +90,7 @@ So, if you've got some cool feature that you'd like to implement into the plugin
|
|
88 |
|
89 |
3. Activate the Plugin in WP-Admin.
|
90 |
|
91 |
-
4. Go to **Top 10** to configure
|
92 |
|
93 |
5. Go to **Appearance » Widgets** to add the Popular Posts sidebar widget to your theme
|
94 |
|
@@ -103,40 +105,12 @@ It is the fastest way to get support as I monitor the forums regularly. I also p
|
|
103 |
|
104 |
= How can I customise the output? =
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
The main CSS classes include:
|
109 |
-
|
110 |
-
* **tptn_posts** and **tptn_posts_daily**: Class of the main wrapper `div`. If you are displaying the related posts on non-singular pages, then you should style this
|
111 |
-
|
112 |
-
* **tptn_title**: Class of the `span` tag for title of the post
|
113 |
-
|
114 |
-
* **tptn_excerpt**: Class of the `span` tag for excerpt (if included)
|
115 |
-
|
116 |
-
* **tptn_thumb**: Class of the post thumbnail `img` tag
|
117 |
-
|
118 |
-
* **tptn_list_count**: Class of the `span` tag for post count in top posts list
|
119 |
-
|
120 |
-
* **tptn_counter**: Class of the `div` tag that wraps the post count that is driven by the field "Format to display the count in: " under 'Output Options'
|
121 |
|
122 |
= Shortcodes =
|
123 |
|
124 |
You can find details of the shortcodes in this [knowledge base article](https://webberzone.com/support/knowledgebase/top-10-shortcodes/)
|
125 |
|
126 |
-
= Manual install =
|
127 |
-
|
128 |
-
The below functions need to be added by editing your theme files where you wish to display them.
|
129 |
-
|
130 |
-
Display the post count with `<?php if ( function_exists( 'echo_tptn_post_count' ) ) { echo_tptn_post_count(); } ?>`
|
131 |
-
|
132 |
-
Display the overall most popular posts with `<?php if ( function_exists( 'tptn_show_pop_posts' ) ) { tptn_show_pop_posts(); } ?>`
|
133 |
-
|
134 |
-
Display the daily/custom period popular posts with `<?php if ( function_exists( 'tptn_show_daily_pop_posts' ) ) { tptn_show_daily_pop_posts(); } ?>`
|
135 |
-
|
136 |
-
You can also use the WordPress Widgets to display the popular posts in your sidebar / other widgetized areas of your theme
|
137 |
-
|
138 |
-
View [examples of the plugin API](https://gist.github.com/ajaydsouza/c8defd4b46e53240e376) to fetch the popular posts
|
139 |
-
|
140 |
= Can this plugin replace Google Analytics? =
|
141 |
|
142 |
No. Top 10 has been designed to only track the number of page-views on your blog posts and display the same. It isn't designed to replace Google Analytics or any other full fledged analytics application.
|
@@ -161,82 +135,30 @@ add_filter( 'manage_edit-projects_sortable_columns', 'tptn_column_register_sorta
|
|
161 |
|
162 |
== Changelog ==
|
163 |
|
164 |
-
=
|
165 |
-
|
166 |
-
Release post: [https://webberzone.com/blog/top-10-v2-9-0/](https://webberzone.com/blog/top-10-v2-9-0/)
|
167 |
-
|
168 |
-
* Bug fixes:
|
169 |
-
* Security fix: Nonces were not always checked in import module
|
170 |
-
|
171 |
-
= 2.9.4 =
|
172 |
-
|
173 |
-
Release post: [https://webberzone.com/blog/top-10-v2-9-0/](https://webberzone.com/blog/top-10-v2-9-0/)
|
174 |
|
175 |
-
|
176 |
-
* .json file error when trying to import tables in the Tools page
|
177 |
-
|
178 |
-
= 2.9.3 =
|
179 |
-
|
180 |
-
Release post: [https://webberzone.com/blog/top-10-v2-9-0/](https://webberzone.com/blog/top-10-v2-9-0/)
|
181 |
-
|
182 |
-
* Enhancements:
|
183 |
-
* Cache now uses MD5 generated keys based on the Top 10 parameters being passed. This means the cache should now work with shortcodes and manual implementations
|
184 |
-
* Database creation now uses the correct collation
|
185 |
-
|
186 |
-
* Bug fixes:
|
187 |
-
* `include_cat_ids` didn't work with the shortcode
|
188 |
-
* Password protected posts will no longer show the excerpt
|
189 |
-
|
190 |
-
= 2.9.2 =
|
191 |
-
|
192 |
-
Release post: [https://webberzone.com/blog/top-10-v2-9-0/](https://webberzone.com/blog/top-10-v2-9-0/)
|
193 |
-
|
194 |
-
* Bug fixes:
|
195 |
-
* Custom CSS box would not save
|
196 |
-
|
197 |
-
= 2.9.1 =
|
198 |
-
|
199 |
-
Release post: [https://webberzone.com/blog/top-10-v2-9-0/](https://webberzone.com/blog/top-10-v2-9-0/)
|
200 |
-
|
201 |
-
* Bug fixes:
|
202 |
-
* Published age of posts parameter was no longer working
|
203 |
-
* Importing settings should now work properly - previously checkboxes all ended up being enabled
|
204 |
-
* In rare cases, the tracker would throw PHP errors e.g. on search results page where no posts were loaded and tracker was enabled to load on all pages
|
205 |
-
|
206 |
-
= 2.9.0 =
|
207 |
-
|
208 |
-
Release post: [https://webberzone.com/blog/top-10-v2-9-0/](https://webberzone.com/blog/top-10-v2-9-0/)
|
209 |
|
210 |
* Features:
|
211 |
-
|
212 |
-
* New
|
213 |
-
* New
|
|
|
|
|
214 |
|
215 |
-
* Enhancements:
|
216 |
-
*
|
217 |
-
*
|
218 |
|
219 |
* Bug fixes:
|
220 |
-
*
|
221 |
-
*
|
222 |
-
* No more unnecessary form modified errors in the popular posts tables in Admin area
|
223 |
-
* Fixed notices in PHP 7.4 when viewing popular posts listings
|
224 |
-
* When editing posts, the count from the metabox will only be used if it is modified
|
225 |
-
|
226 |
-
= 2.8.0 =
|
227 |
-
|
228 |
-
Release post: [https://webberzone.com/blog/top-10-v2-8-0/](https://webberzone.com/blog/top-10-v2-8-0/)
|
229 |
-
|
230 |
-
* Features:
|
231 |
-
* Custom feed for popular posts: Find new options under a new tab called Feed in the settings page where you can set the URL for the overall and daily feeds
|
232 |
-
* New page in the network admin menu to view the popular posts across the network
|
233 |
-
* Also delete transients and other settings on uninstall
|
234 |
|
235 |
For previous changelog entries, please refer to the separate changelog.txt file or [Github Releases page](https://github.com/WebberZone/top-10/releases)
|
236 |
|
237 |
|
238 |
== Upgrade Notice ==
|
239 |
|
240 |
-
=
|
241 |
-
|
242 |
|
2 |
Tags: popular posts, top 10, counter, top posts, daily popular, page views, statistics, tracker
|
3 |
Contributors: webberzone, Ajay
|
4 |
Donate link: https://ajaydsouza.com/donate/
|
5 |
+
Stable tag: 3.0.0
|
6 |
+
Requires at least: 5.3
|
7 |
+
Tested up to: 5.9
|
8 |
+
Requires PHP: 7.1
|
9 |
License: GPLv2 or later
|
10 |
|
11 |
Track daily and total visits on your blog posts. Display the count as well as popular and trending posts.
|
24 |
|
25 |
* **Page counter**: Counts page views on single posts, pages and *custom post types* on an hourly basis which can then be easily displayed automatically, using shortcodes or functions
|
26 |
* **Popular posts**: Display a list of popular posts either for total counts or for a custom period. You can choose how many posts are to be displayed along with loads of other customisation options
|
27 |
+
* **Gutenberg / Block Editor support**: You can find a block called "Popular Posts [Top 10]" with its own configurable set of options
|
28 |
* **Widget ready**: Sidebar widgets available for daily popular and overall popular posts. Highly customizable widgets to control what you want to display in the list of posts
|
29 |
* **Shortcodes**: The plugin includes two shortcodes `[tptn_list]` and `[tptn_views]` to display the posts list and the number of views respectively
|
30 |
* **Thumbnail support**
|
72 |
11. Top 10 - Popular posts view in Admin
|
73 |
12. Top 10 Export/Import interface
|
74 |
13. Top 10 - Popular posts view in Network Admin
|
75 |
+
14. Top 10 Gutenberg block
|
76 |
|
77 |
== Installation ==
|
78 |
|
90 |
|
91 |
3. Activate the Plugin in WP-Admin.
|
92 |
|
93 |
+
4. Go to **Top 10 » Settings** to configure
|
94 |
|
95 |
5. Go to **Appearance » Widgets** to add the Popular Posts sidebar widget to your theme
|
96 |
|
105 |
|
106 |
= How can I customise the output? =
|
107 |
|
108 |
+
Details on how to use and customize the output is in this [knowledge base article](https://webberzone.com/support/knowledgebase/using-and-customising-top-10/)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
= Shortcodes =
|
111 |
|
112 |
You can find details of the shortcodes in this [knowledge base article](https://webberzone.com/support/knowledgebase/top-10-shortcodes/)
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
= Can this plugin replace Google Analytics? =
|
115 |
|
116 |
No. Top 10 has been designed to only track the number of page-views on your blog posts and display the same. It isn't designed to replace Google Analytics or any other full fledged analytics application.
|
135 |
|
136 |
== Changelog ==
|
137 |
|
138 |
+
= 3.0.0 =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
|
140 |
+
Release post: [https://webberzone.com/blog/top-10-v3-0-0/](https://webberzone.com/blog/top-10-v3-0-0/)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
|
142 |
* Features:
|
143 |
+
* New Top_Ten_Query class for fetching popular posts. Adds the function `get_tptn_posts()` which replaces `get_tptn_pop_posts()` which will be deprecated in a future version
|
144 |
+
* New option to exclude the Front page and Posts page if these are set in Settings > Reading or via Customizer
|
145 |
+
* New option in the Widget to include specific post IDs in the top lists. You can also use them in the shortcode using `include_post_ids`
|
146 |
+
* New block for Gutenberg aka the block editor. The block is called **Popular Posts [Top 10]** and you can find it under the widgets category
|
147 |
+
* Top 10 now supports the WP REST API. The plugin adds a new tracker type called *REST API based* which you can find under Counter/Tracker settings. Additionally, you can now receive the popular posts via a REST Request to `top-10/v1/popular-posts`
|
148 |
|
149 |
+
* Enhancements/Modifications:
|
150 |
+
* No popular posts feed will be added if the corresponding slug is set to blank
|
151 |
+
* Changed `sum_count` to `visits`
|
152 |
|
153 |
* Bug fixes:
|
154 |
+
* PHP notices when displaying Network Wide Popular Posts in WordPress Multisite
|
155 |
+
* Query based tracker gave an ajax error
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
For previous changelog entries, please refer to the separate changelog.txt file or [Github Releases page](https://github.com/WebberZone/top-10/releases)
|
158 |
|
159 |
|
160 |
== Upgrade Notice ==
|
161 |
|
162 |
+
= 3.0.0 =
|
163 |
+
Major release; Please check the plugin settings; Read all details in the release post
|
164 |
|
top-10.php
CHANGED
@@ -8,13 +8,13 @@
|
|
8 |
* @author Ajay D'Souza <me@ajaydsouza.com>
|
9 |
* @license GPL-2.0+
|
10 |
* @link https://webberzone.com
|
11 |
-
* @copyright 2008-
|
12 |
*
|
13 |
* @wordpress-plugin
|
14 |
* Plugin Name: Top 10
|
15 |
* Plugin URI: https://webberzone.com/plugins/top-10/
|
16 |
* Description: Count daily and total visits per post and display the most popular posts based on the number of views
|
17 |
-
* Version:
|
18 |
* Author: Ajay D'Souza
|
19 |
* Author URI: https://webberzone.com
|
20 |
* License: GPL-2.0+
|
@@ -63,6 +63,17 @@ if ( ! defined( 'TOP_TEN_PLUGIN_FILE' ) ) {
|
|
63 |
define( 'TOP_TEN_PLUGIN_FILE', __FILE__ );
|
64 |
}
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
/**
|
68 |
* Global variable holding the current database version of Top 10
|
@@ -119,6 +130,7 @@ function tptn_get_settings() {
|
|
119 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/admin/default-settings.php';
|
120 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/admin/register-settings.php';
|
121 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/activate-deactivate.php';
|
|
|
122 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/public/display-posts.php';
|
123 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/public/styles.php';
|
124 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/public/output-generator.php';
|
@@ -134,6 +146,8 @@ require_once TOP_TEN_PLUGIN_DIR . 'includes/modules/exclusions.php';
|
|
134 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/modules/taxonomies.php';
|
135 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/modules/class-top-ten-widget.php';
|
136 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/modules/class-top-ten-count-widget.php';
|
|
|
|
|
137 |
|
138 |
|
139 |
/*
|
@@ -145,6 +159,7 @@ require_once TOP_TEN_PLUGIN_DIR . 'includes/modules/class-top-ten-count-widget.p
|
|
145 |
if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
|
146 |
|
147 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/admin/admin.php';
|
|
|
148 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/admin/settings-page.php';
|
149 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/admin/save-settings.php';
|
150 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/admin/help-tab.php';
|
8 |
* @author Ajay D'Souza <me@ajaydsouza.com>
|
9 |
* @license GPL-2.0+
|
10 |
* @link https://webberzone.com
|
11 |
+
* @copyright 2008-2021 Ajay D'Souza
|
12 |
*
|
13 |
* @wordpress-plugin
|
14 |
* Plugin Name: Top 10
|
15 |
* Plugin URI: https://webberzone.com/plugins/top-10/
|
16 |
* Description: Count daily and total visits per post and display the most popular posts based on the number of views
|
17 |
+
* Version: 3.0.0
|
18 |
* Author: Ajay D'Souza
|
19 |
* Author URI: https://webberzone.com
|
20 |
* License: GPL-2.0+
|
63 |
define( 'TOP_TEN_PLUGIN_FILE', __FILE__ );
|
64 |
}
|
65 |
|
66 |
+
/**
|
67 |
+
* Number of days of data to be saved in the daily tables.
|
68 |
+
*
|
69 |
+
* @since 3.0.0
|
70 |
+
*
|
71 |
+
* @var int Number of days of data to be saved in the daily tables.
|
72 |
+
*/
|
73 |
+
if ( ! defined( 'TOP_TEN_STORE_DATA' ) ) {
|
74 |
+
define( 'TOP_TEN_STORE_DATA', 180 );
|
75 |
+
}
|
76 |
+
|
77 |
|
78 |
/**
|
79 |
* Global variable holding the current database version of Top 10
|
130 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/admin/default-settings.php';
|
131 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/admin/register-settings.php';
|
132 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/activate-deactivate.php';
|
133 |
+
require_once TOP_TEN_PLUGIN_DIR . 'includes/class-top-ten-query.php';
|
134 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/public/display-posts.php';
|
135 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/public/styles.php';
|
136 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/public/output-generator.php';
|
146 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/modules/taxonomies.php';
|
147 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/modules/class-top-ten-widget.php';
|
148 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/modules/class-top-ten-count-widget.php';
|
149 |
+
require_once TOP_TEN_PLUGIN_DIR . 'includes/modules/class-top-ten-rest-api.php';
|
150 |
+
require_once TOP_TEN_PLUGIN_DIR . 'includes/blocks/popular-posts.php';
|
151 |
|
152 |
|
153 |
/*
|
159 |
if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
|
160 |
|
161 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/admin/admin.php';
|
162 |
+
require_once TOP_TEN_PLUGIN_DIR . 'includes/admin/class-top-ten-dashboard.php';
|
163 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/admin/settings-page.php';
|
164 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/admin/save-settings.php';
|
165 |
require_once TOP_TEN_PLUGIN_DIR . 'includes/admin/help-tab.php';
|
uninstall.php
CHANGED
@@ -3,10 +3,6 @@
|
|
3 |
* Update counts to database.
|
4 |
*
|
5 |
* @package Top_Ten
|
6 |
-
* @author Ajay D'Souza <me@ajaydsouza.com>
|
7 |
-
* @license GPL-2.0+
|
8 |
-
* @link https://webberzone.com
|
9 |
-
* @copyright 2008-2020 Ajay D'Souza
|
10 |
*/
|
11 |
|
12 |
// If this file is called directly, abort.
|
3 |
* Update counts to database.
|
4 |
*
|
5 |
* @package Top_Ten
|
|
|
|
|
|
|
|
|
6 |
*/
|
7 |
|
8 |
// If this file is called directly, abort.
|