Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordizzy <diosmosis@users.noreply.github.com>2021-11-15 16:00:13 +0300
committerGitHub <noreply@github.com>2021-11-15 16:00:13 +0300
commit89cb577059ff4b7d850c316dd361a326ecb39f47 (patch)
treedf84f7b103c1f89ee595164660ff921108643416 /plugins/CoreHome
parentcc8efde643c25abea56b294b88d4ca5724e21eda (diff)
[Vue] migrate notifications directive & service + UI.Notifications (#18225)
* migrating RateFeature and ReviewLinks + adding AjaxHelper.fetch utility method (all untested) * get ratefeature component to work, modify matomodialog component to use v-model, add event parameters to createAngularAdapter, allow translate to use variadic args or one string array + rebuild * remove ratefeature angularjs files * rebuild + make vue mapping property optional in createANgularJsAdapter * migrate enrichedheadline and get to work * fix test * fix translate * fix another translate issue & migrate contentblock directive * fix anchor links, not including the "/" causes angularjs to fail (also on 4.x-dev) * update expected screenshots * fix ui test * fix some test failures * fix nested transclude issue * remove content block files * fix icon spacing that occurs due to angularjs inserting empty comments in between nodes while vue 3 does not * update some screenshots * update screenshot (actually fixes an alignment issue) * update screenshot * first pass at converting comparisons service/component * get new code to build and load without error in the UI * debugging * getting basic functionaltiy to work * Update _dataTable.twig * fix UI test failure + URL encoding/angularjs issue causing back button to not work * fix order of operations issue * built vue files * using ref in setup() is not needed to access this.$refs * Convert comparisons service angularjs tests to comparison store typescript tests. * migrate piwik-date-picker directive * migrate date range picker component (changed invalid date in input handling to just reset back to the previous date since it was easier in vue to do that) * migrate period-date-picker component (using composition api more when easier for migration) * convert piwik-expand-onclick directive to vue directive * migrate expand on hover directive to vue directive * fix variable reference * build * Add materialize-css @types and migrate piwik-dropdown-menu. * migrate focus-anywhere-but-here directive to vue directive * migrate focus-if directive * migrate menudropdown directive * forgot to remove old files * built vue files * first pass at migrating notification directive, notification service and parts of UI.Notification to Vue * rewrite URL handling to use computed properties in a URL store + do the same for other dependent data in the comparison store to allow vues to subscribe to the properties for changes to global state * fix some tests * some more fixes * more fixes + disallow modifications to MatomoUrl state * get angularjs unit tests to pass + fix a couple more issues * another fix * fix bad merge * self review + fixes * remove old fix as it may not be needed anymore * empty string is not a valid date + do not report invalid date exception just rethrow * update screenshots and try to fix random failure * use jquery $destroy event instead of scope one since the scope one is broadcasted * rangeChange event must be triggered once on mount * initialize startDateText/endDateText correctly * use jquery $destroy event instead of angularjs one * built vue files * fix menudropdown.directive.js reference * load vue in installation/updater & correctly make focusanywherebuthere stateful * correctly implement stateful directives for ExpandOnClick/ExpandOnHover * less tweak (angularjs comment removal) * fix submenu check * quick type fix * load vue in installation workflow * add broadcast.js to Installation workflow + do not fail in pk_translate if no translations are loaded * update expected screenshots (spacing of arrow changed because of angularjs comment no longer being there) * start moving Notification class code to notifications store * fix prop type * fix html escaping * built vue files * get toast and other transitions to work + fix broken toast * move all of notification.js to NotificationStore * wait for angular to be initialized to post events to avoid loading race condition * get scroll to notification to work + get initialization of notification groups to work * correct unmount + remove notifications service file * fix some test failures * re add accidentally removed (?) file * remove no longer needed file * Add CoreHome UMD in CoreUpdater/Installation. * self review * fix type + add default value * remove file from JS list * fix test * fix UI tests * set correct type in users manager notification and allow scope values to be transformed in createAngularAdapter * built vue files * get focus-if to work and remove debugging return; * rebuilt vue * built vue files Co-authored-by: sgiehl <stefan@matomo.org>
Diffstat (limited to 'plugins/CoreHome')
-rw-r--r--plugins/CoreHome/CoreHome.php6
-rw-r--r--plugins/CoreHome/angularjs/notification/notification.controller.js34
-rw-r--r--plugins/CoreHome/angularjs/notification/notification.directive.html8
-rw-r--r--plugins/CoreHome/angularjs/notification/notification.directive.js99
-rw-r--r--plugins/CoreHome/angularjs/notification/notification.service.js53
-rw-r--r--plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js2
-rw-r--r--plugins/CoreHome/javascripts/notification.js175
-rw-r--r--plugins/CoreHome/stylesheets/vue-transitions.less16
-rw-r--r--plugins/CoreHome/vue/dist/CoreHome.umd.js646
-rw-r--r--plugins/CoreHome/vue/dist/CoreHome.umd.min.js100
-rw-r--r--plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts13
-rw-r--r--plugins/CoreHome/vue/src/FocusIf/FocusIf.adapter.ts2
-rw-r--r--plugins/CoreHome/vue/src/FocusIf/FocusIf.ts26
-rw-r--r--plugins/CoreHome/vue/src/Menudropdown/Menudropdown.vue1
-rw-r--r--plugins/CoreHome/vue/src/Notification/Notification.adapter.ts36
-rw-r--r--plugins/CoreHome/vue/src/Notification/Notification.less (renamed from plugins/CoreHome/angularjs/notification/notification.directive.less)16
-rw-r--r--plugins/CoreHome/vue/src/Notification/Notification.vue145
-rw-r--r--plugins/CoreHome/vue/src/Notification/NotificationGroup.vue59
-rw-r--r--plugins/CoreHome/vue/src/Notification/Notifications.store.adapter.ts10
-rw-r--r--plugins/CoreHome/vue/src/Notification/Notifications.store.ts275
-rw-r--r--plugins/CoreHome/vue/src/Notification/index.ts12
-rw-r--r--plugins/CoreHome/vue/src/createAngularJsAdapter.ts13
-rw-r--r--plugins/CoreHome/vue/src/index.ts1
23 files changed, 1305 insertions, 443 deletions
diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php
index 731db3f565..4464aa1cd8 100644
--- a/plugins/CoreHome/CoreHome.php
+++ b/plugins/CoreHome/CoreHome.php
@@ -137,7 +137,7 @@ class CoreHome extends \Piwik\Plugin
$stylesheets[] = "plugins/CoreHome/stylesheets/zen-mode.less";
$stylesheets[] = "plugins/CoreHome/stylesheets/layout.less";
$stylesheets[] = "plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.less";
- $stylesheets[] = "plugins/CoreHome/angularjs/notification/notification.directive.less";
+ $stylesheets[] = "plugins/CoreHome/vue/src/Notification/Notification.less";
$stylesheets[] = "plugins/CoreHome/angularjs/quick-access/quick-access.directive.less";
$stylesheets[] = "plugins/CoreHome/stylesheets/selector.less";
$stylesheets[] = "plugins/CoreHome/angularjs/reporting-page/reportingpage.directive.less";
@@ -151,6 +151,7 @@ class CoreHome extends \Piwik\Plugin
$stylesheets[] = "plugins/CoreHome/angularjs/sparkline/sparkline.component.less";
$stylesheets[] = "plugins/CoreHome/angularjs/field-array/field-array.directive.less";
$stylesheets[] = "plugins/CoreHome/vue/src/Comparisons/Comparisons.less";
+ $stylesheets[] = "plugins/CoreHome/stylesheets/vue-transitions.less";
}
public function getJsFiles(&$jsFiles)
@@ -235,9 +236,6 @@ class CoreHome extends \Piwik\Plugin
$jsFiles[] = "plugins/CoreHome/angularjs/content-intro/content-intro.directive.js";
- $jsFiles[] = "plugins/CoreHome/angularjs/notification/notification.controller.js";
- $jsFiles[] = "plugins/CoreHome/angularjs/notification/notification.directive.js";
- $jsFiles[] = "plugins/CoreHome/angularjs/notification/notification.service.js";
$jsFiles[] = "plugins/CoreHome/angularjs/ajax-form/ajax-form.controller.js";
$jsFiles[] = "plugins/CoreHome/angularjs/ajax-form/ajax-form.directive.js";
diff --git a/plugins/CoreHome/angularjs/notification/notification.controller.js b/plugins/CoreHome/angularjs/notification/notification.controller.js
deleted file mode 100644
index 80497e940f..0000000000
--- a/plugins/CoreHome/angularjs/notification/notification.controller.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/*!
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-(function () {
- angular.module('piwikApp').controller('NotificationController', NotificationController);
-
- NotificationController.$inject = ['piwikApi'];
-
- function NotificationController(piwikApi) {
- /**
- * Marks a persistent notification as read so it will not reappear on the next page
- * load.
- */
- this.markNotificationAsRead = function (notificationId) {
- if (!notificationId) {
- return;
- }
-
- piwikApi.withTokenInUrl();
- piwikApi.post(
- { // GET params
- module: 'CoreHome',
- action: 'markNotificationAsRead'
- },
- { // POST params
- notificationId: notificationId
- }
- );
- };
- }
-})(); \ No newline at end of file
diff --git a/plugins/CoreHome/angularjs/notification/notification.directive.html b/plugins/CoreHome/angularjs/notification/notification.directive.html
deleted file mode 100644
index 82138156f1..0000000000
--- a/plugins/CoreHome/angularjs/notification/notification.directive.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<div class="notification system">
- <button type="button" class="close" data-dismiss="alert" ng-if="!noclear" ng-click="notification.markNotificationAsRead(notificationId)">&times;</button>
- <strong ng-if="title">{{ title }}</strong>
-
- <!-- ng-transclude causes directive child elements to be added here -->
- <div ng-transclude></div>
-
-</div>
diff --git a/plugins/CoreHome/angularjs/notification/notification.directive.js b/plugins/CoreHome/angularjs/notification/notification.directive.js
deleted file mode 100644
index 51ff0d4819..0000000000
--- a/plugins/CoreHome/angularjs/notification/notification.directive.js
+++ /dev/null
@@ -1,99 +0,0 @@
-/*!
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-
-/**
- * Directive to show a notification.
- *
- * Note: using this directive is preferred over the Notification class (which uses jquery
- * exclusively).
- *
- * Supports the following attributes:
- *
- * * **context**: Either 'success', 'error', 'info', 'warning'
- * * **type**: Either 'toast', 'persistent', 'transient'
- * * **noclear**: If truthy, no clear button is displayed. For persistent notifications, has no effect.
- *
- * Usage:
- *
- * <div piwik-notification context="success" type="persistent" noclear="true">
- * <strong>Info: </strong>My notification message.
- * </div>
- */
-(function () {
- angular.module('piwikApp').directive('piwikNotification', piwikNotification);
-
- piwikNotification.$inject = ['piwik', '$timeout'];
-
- function piwikNotification(piwik, $timeout) {
- return {
- restrict: 'A',
- scope: {
- notificationId: '@?',
- title: '@?notificationTitle', // TODO: shouldn't need this since the title can be specified within
- // HTML of the node that uses the directive.
- context: '@?',
- type: '@?',
- noclear: '@?',
- toastLength: '@?'
- },
- transclude: true,
- templateUrl: 'plugins/CoreHome/angularjs/notification/notification.directive.html?cb=' + piwik.cacheBuster,
- controller: 'NotificationController',
- controllerAs: 'notification',
- link: function (scope, element) {
- scope.toastLength = scope.toastLength || 12 * 1000;
-
- if (scope.notificationId) {
- closeExistingNotificationHavingSameIdIfNeeded(scope.notificationId, element);
- }
-
- if (scope.context) {
- element.children('.notification').addClass('notification-' + scope.context);
- }
-
- if (scope.type == 'persistent') {
- // otherwise it is never possible to dismiss the notification
- scope.noclear = false;
- }
-
- if ('toast' == scope.type) {
- addToastEvent();
- }
-
- if (!scope.noclear) {
- addCloseEvent();
- }
-
- function addToastEvent() {
- $timeout(function () {
- element.fadeOut('slow', function() {
- element.remove();
- });
- }, scope.toastLength);
- }
-
- function addCloseEvent() {
- element.on('click', '.close', function (event) {
- if (event && event.delegateTarget) {
- angular.element(event.delegateTarget).remove();
- }
- });
- }
-
- function closeExistingNotificationHavingSameIdIfNeeded(id, notificationElement) {
- // TODO: instead of doing a global query for notification, there should be a notification-container
- // directive that manages notifications.
- var notificationStillExists = !!notificationElement.parents('body').length;
- var existingNode = angular.element('[notification-id=' + id + ']').not(notificationElement);
- if (notificationStillExists && existingNode && existingNode.length) {
- existingNode.remove();
- }
- }
- }
- };
- }
-})(); \ No newline at end of file
diff --git a/plugins/CoreHome/angularjs/notification/notification.service.js b/plugins/CoreHome/angularjs/notification/notification.service.js
deleted file mode 100644
index 637af734fa..0000000000
--- a/plugins/CoreHome/angularjs/notification/notification.service.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/*!
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-(function () {
- angular.module('piwikApp').factory('notifications', NotificationFactory);
-
- NotificationFactory.$inject = [];
-
- function NotificationFactory() {
-
- return {
- parseNotificationDivs: parseNotificationDivs,
- clearTransientNotifications: clearTransientNotifications,
- };
-
- function parseNotificationDivs() {
- var UI = require('piwik/UI');
-
- var $notificationNodes = $('[data-role="notification"]');
-
- $notificationNodes.each(function (index, notificationNode) {
- $notificationNode = $(notificationNode);
- var attributes = $notificationNode.data();
- var message = $notificationNode.html();
-
- if (message) {
- var notification = new UI.Notification();
- attributes.animate = false;
- notification.show(message, attributes);
- }
-
- $notificationNodes.remove();
- });
- }
-
- function clearTransientNotifications() {
- $('[piwik-notification][type=transient]').each(function () {
- var $element = angular.element(this);
- $element.scope().$destroy();
- $element.remove();
- });
- }
- }
-
- angular.module('piwikApp').run(['notifications', function (notifications) {
- $(function () {
- notifications.parseNotificationDivs();
- });
- }]);
-})();
diff --git a/plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js b/plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js
index 0c34f1e666..949d85a9b0 100644
--- a/plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js
+++ b/plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js
@@ -93,7 +93,7 @@
var prefix = '<strong>' + _pk_translate('CoreHome_ReportingCategoryHelpPrefix', [category.name, subcategory.name]) + '</strong><br/>';
- var options = { context: 'info', id: 'reportingmenu-help', type: 'persistent', noclear: true };
+ var options = { context: 'info', id: 'reportingmenu-help', type: 'transient', noclear: true };
options['class'] = 'help-notification';
notification.show(prefix + subcategory.help, options);
diff --git a/plugins/CoreHome/javascripts/notification.js b/plugins/CoreHome/javascripts/notification.js
index da3216048f..f55b6504eb 100644
--- a/plugins/CoreHome/javascripts/notification.js
+++ b/plugins/CoreHome/javascripts/notification.js
@@ -6,192 +6,51 @@
*/
(function ($, require) {
-
var exports = require('piwik/UI');
/**
- * Creates a new notifications.
- *
- * Example:
- * var UI = require('piwik/UI');
- * var notification = new UI.Notification();
- * notification.show('My Notification Message', {title: 'Low space', context: 'warning'});
+ * @deprecated
*/
var Notification = function () {
- this.$node = null;
+ this.notificationId = null;
};
/**
- * Makes the notification visible.
- *
- * @param {string} message The actual message that will be displayed. Must be set.
- * @param {Object} [options]
- * @param {string} [options.id] Only needed for persistent notifications. The id will be sent to the
- * frontend once the user closes the notifications. The notification has to
- * be registered/notified under this name
- * @param {string} [options.title] The title of the notification. For instance the plugin name.
- * @param {bool} [options.animate=true] If enabled, the notification will be faded in.
- * @param {string} [options.context=warning] Context of the notification: 'info', 'warning', 'success' or
- * 'error'
- * @param {string} [options.type=transient] The type of the notification: Either 'toast' or 'transitent'
- * @param {bool} [options.noclear=false] If set, the close icon is not displayed.
- * @param {object} [options.style] Optional style/css dictionary. For instance {'display': 'inline-block'}
- * @param {string} [options.placeat] By default, the notification will be displayed in the "stats bar".
- * You can specify any other CSS selector to place the notifications
- * wherever you want.
+ * @deprecated use NotificationsStore.show() in CoreHome Vue module
*/
Notification.prototype.show = function (message, options) {
- checkMessage(message);
options = checkOptions(options);
-
- var template = generateNotificationHtmlMarkup(options, message);
- this.$node = placeNotification(template, options);
+ options.noclear = !! options.noclear;
+ this.notificationId = window.CoreHome.NotificationsStore.show($.extend({ message: message }, options));
};
/**
- * Removes a previously shown notification having the given notification id.
- *
- *
- * @param {string} notificationId The id of a notification that was previously registered.
+ * @deprecated use NotificationsStore.remove() in CoreHome Vue module
*/
Notification.prototype.remove = function (notificationId) {
- $('[piwik-notification][notification-id=' + notificationId + ']').remove();
+ window.CoreHome.NotificationsStore.remove(notificationId);
};
- Notification.prototype.scrollToNotification = function () {
- if (this.$node) {
- piwikHelper.lazyScrollTo(this.$node, 250);
+ /**
+ * @deprecated use NotificationsStore.scrollToNotification() in CoreHome Vue module
+ */
+ Notification.prototype.scrollToNotification = function () {
+ if (this.notificationId) {
+ window.CoreHome.NotificationsStore.scrollToNotification(this.notificationId);
}
};
/**
- * Shows a notification at a certain point with a quick upwards animation.
- *
- * TODO: if the materializecss version matomo uses is updated, should use their toasts.
- *
- * @type {Notification}
- * @param {string} message The actual message that will be displayed. Must be set.
- * @param {Object} options
- * @param {string} options.placeat Where to place the notification. Required.
- * @param {string} [options.id] Only needed for persistent notifications. The id will be sent to the
- * frontend once the user closes the notifications. The notification has to
- * be registered/notified under this name
- * @param {string} [options.title] The title of the notification. For instance the plugin name.
- * @param {string} [options.context=warning] Context of the notification: 'info', 'warning', 'success' or
- * 'error'
- * @param {string} [options.type=transient] The type of the notification: Either 'toast' or 'transitent'
- * @param {bool} [options.noclear=false] If set, the close icon is not displayed.
- * @param {object} [options.style] Optional style/css dictionary. For instance {'display': 'inline-block'}
+ * @deprecated use NotificationsStore.toast() in CoreHome Vue module
*/
Notification.prototype.toast = function (message, options) {
- checkMessage(message);
options = checkOptions(options);
-
- var $placeat = $(options.placeat);
- if (!$placeat.length) {
- throw new Error("A valid selector is required for the placeat option when using Notification.toast().");
- }
-
- var $template = $(generateNotificationHtmlMarkup(options, message)).hide();
- $('body').append($template);
-
- compileNotification($template);
-
- $template.css({
- position: 'absolute',
- left: $placeat.offset().left,
- top: $placeat.offset().top
- });
- setTimeout(function () {
- $template.animate(
- {
- top: $placeat.offset().top - $template.height()
- },
- {
- duration: 300,
- start: function () {
- $template.show();
- }
- }
- );
- });
+ options.noclear = !! options.noclear;
+ window.CoreHome.NotificationsStore.toast($.extend({ message: message }, options));
};
exports.Notification = Notification;
- function generateNotificationHtmlMarkup(options, message) {
- var attributeMapping = {
- id: 'notification-id',
- title: 'notification-title',
- context: 'context',
- type: 'type',
- noclear: 'noclear',
- class: 'class',
- toastLength: 'toast-length'
- },
- html = '<div piwik-notification';
-
- for (var key in attributeMapping) {
- if (attributeMapping.hasOwnProperty(key)
- && options[key]
- ) {
- html += ' ' + attributeMapping[key] + '="' + options[key].toString().replace(/"/g, "&quot;") + '"';
- }
- }
-
- html += '><div ng-non-bindable>' + message + '</div></div>';
-
- return html;
- }
-
- function compileNotification($node) {
- angular.element(document).injector().invoke(function ($compile, $rootScope) {
- $compile($node)($rootScope.$new(true));
- });
- }
-
- function placeNotification(template, options) {
- var $notificationNode = $(template);
-
- // compile the template in angular
- compileNotification($notificationNode);
-
- if (options.style) {
- $notificationNode.css(options.style);
- }
-
- var notificationPosition = '#notificationContainer';
- var method = 'append';
- if (options.placeat) {
- notificationPosition = options.placeat;
- } else {
- // If a modal is open, we want to make sure the error message is visible and therefore show it within the opened modal
- var modalSelector = '.modal.open .modal-content';
- var modalOpen = $(modalSelector);
- if (modalOpen.length) {
- notificationPosition = modalSelector;
- method = 'prepend';
- }
- }
-
- $notificationNode = $notificationNode.hide();
- $(notificationPosition)[method]($notificationNode);
-
- if (false === options.animate) {
- $notificationNode.show();
- } else {
- $notificationNode.fadeIn(1000);
- }
-
- return $notificationNode;
- }
-
- function checkMessage(message) {
- if (!message) {
- throw new Error('No message given, cannot display notification');
- }
- }
-
function checkOptions(options) {
if (options && !$.isPlainObject(options)) {
throw new Error('Options has the wrong format, cannot display notification');
@@ -201,4 +60,4 @@
return options;
}
-})(jQuery, require); \ No newline at end of file
+})(jQuery, require);
diff --git a/plugins/CoreHome/stylesheets/vue-transitions.less b/plugins/CoreHome/stylesheets/vue-transitions.less
new file mode 100644
index 0000000000..cdfef3e1ea
--- /dev/null
+++ b/plugins/CoreHome/stylesheets/vue-transitions.less
@@ -0,0 +1,16 @@
+.fade-in-enter-active {
+ transition: opacity 1s ease;
+}
+
+.fade-in-enter-from {
+ opacity: 0;
+}
+
+// 'slow' as in jquery.animate's 'slow' value
+.slow-fade-out-leave-active {
+ transition: opacity .6s ease;
+}
+
+.slow-fade-out-leave-to {
+ opacity: 0;
+} \ No newline at end of file
diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.js b/plugins/CoreHome/vue/dist/CoreHome.umd.js
index a572e3e558..36e4c542d9 100644
--- a/plugins/CoreHome/vue/dist/CoreHome.umd.js
+++ b/plugins/CoreHome/vue/dist/CoreHome.umd.js
@@ -162,6 +162,9 @@ __webpack_require__.d(__webpack_exports__, "Menudropdown", function() { return /
__webpack_require__.d(__webpack_exports__, "DatePicker", function() { return /* reexport */ DatePicker; });
__webpack_require__.d(__webpack_exports__, "DateRangePicker", function() { return /* reexport */ DateRangePicker; });
__webpack_require__.d(__webpack_exports__, "PeriodDatePicker", function() { return /* reexport */ PeriodDatePicker; });
+__webpack_require__.d(__webpack_exports__, "Notification", function() { return /* reexport */ Notification; });
+__webpack_require__.d(__webpack_exports__, "NotificationGroup", function() { return /* reexport */ Notification_NotificationGroup; });
+__webpack_require__.d(__webpack_exports__, "NotificationsStore", function() { return /* reexport */ Notifications_store; });
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
// This file is imported into lib/wc client bundles.
@@ -1828,12 +1831,23 @@ var AjaxHelper_AjaxHelper = /*#__PURE__*/function () {
*/
// helper method entry point
function fetch(params) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var helper = new AjaxHelper();
+
+ if (options.withTokenInUrl) {
+ helper.withTokenInUrl();
+ }
+
helper.setFormat('json');
helper.addParams(AjaxHelper_objectSpread({
module: 'API',
format: 'json'
}, params), 'get');
+
+ if (options.postParams) {
+ helper.addParams(options.postParams, 'post');
+ }
+
return helper.send();
}
}]);
@@ -2057,17 +2071,24 @@ angular.module('piwikApp.directive').directive('piwikFocusAnywhereButHere', piwi
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
+function doFocusIf(el, binding) {
+ if (binding.arg) {
+ setTimeout(function () {
+ el.focus();
+
+ if (binding.value.afterFocus) {
+ binding.value.afterFocus();
+ }
+ }, 5);
+ }
+}
+
/* harmony default export */ var FocusIf = ({
+ mounted: function mounted(el, binding) {
+ doFocusIf(el, binding);
+ },
updated: function updated(el, binding) {
- if (binding.value.focusIf) {
- setTimeout(function () {
- el.focus();
-
- if (binding.value.afterFocus) {
- binding.value.afterFocus();
- }
- }, 5);
- }
+ doFocusIf(el, binding);
}
});
// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/FocusIf/FocusIf.adapter.ts
@@ -2092,8 +2113,8 @@ function piwikFocusIf() {
scope.$watch(attrs.piwikFocusIf, function (newValue) {
var binding = {
instance: null,
+ arg: newValue ? '1' : undefined,
value: {
- focusIf: !!newValue,
afterFocus: function afterFocus() {
return scope.$apply();
}
@@ -2320,7 +2341,7 @@ angular.module('piwikApp').directive('piwikExpandOnHover', piwikExpandOnHover);
var _hoisted_1 = {
ref: "root"
};
-function render(_ctx, _cache, $props, $setup, $data, $options) {
+function MatomoDialogvue_type_template_id_7aba656e_render(_ctx, _cache, $props, $setup, $data, $options) {
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 512)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.modelValue]]);
}
// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?vue&type=template&id=7aba656e
@@ -2395,7 +2416,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
-MatomoDialogvue_type_script_lang_ts.render = render
+MatomoDialogvue_type_script_lang_ts.render = MatomoDialogvue_type_template_id_7aba656e_render
/* harmony default export */ var MatomoDialog = (MatomoDialogvue_type_script_lang_ts);
// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/createAngularJsAdapter.ts
@@ -2527,6 +2548,10 @@ function createAngularJsAdapter(options) {
value = info.default instanceof Function ? info.default.apply(info, [ngScope, ngElement, ngAttrs].concat(injectedServices)) : info.default;
}
+ if (info.transform) {
+ value = info.transform(value);
+ }
+
initialData[info.vue] = value;
});
return initialData;
@@ -2572,11 +2597,17 @@ function createAngularJsAdapter(options) {
}
ngScope.$watch(scopeVarName, function (newValue) {
+ var newValueFinal = newValue;
+
if (typeof info.default !== 'undefined' && typeof newValue === 'undefined') {
- vm[scopeVarName] = info.default instanceof Function ? info.default.apply(info, [ngScope, ngElement, ngAttrs].concat(injectedServices)) : info.default;
- } else {
- vm[scopeVarName] = newValue;
+ newValueFinal = info.default instanceof Function ? info.default.apply(info, [ngScope, ngElement, ngAttrs].concat(injectedServices)) : info.default;
}
+
+ if (info.transform) {
+ newValueFinal = info.transform(newValueFinal);
+ }
+
+ vm[scopeVarName] = newValueFinal;
});
});
@@ -3819,33 +3850,35 @@ angular.module('piwikApp.service').factory('piwikComparisonsService', Comparison
directiveName: 'piwikComparisons',
restrict: 'E'
}));
-// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreHome/vue/src/Menudropdown/Menudropdown.vue?vue&type=template&id=6bbbef32
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreHome/vue/src/Menudropdown/Menudropdown.vue?vue&type=template&id=0349d645
-var Menudropdownvue_type_template_id_6bbbef32_hoisted_1 = {
+var Menudropdownvue_type_template_id_0349d645_hoisted_1 = {
ref: "root",
class: "menuDropdown"
};
-var Menudropdownvue_type_template_id_6bbbef32_hoisted_2 = ["title"];
-var Menudropdownvue_type_template_id_6bbbef32_hoisted_3 = ["innerHTML"];
+var Menudropdownvue_type_template_id_0349d645_hoisted_2 = ["title"];
+var Menudropdownvue_type_template_id_0349d645_hoisted_3 = ["innerHTML"];
-var Menudropdownvue_type_template_id_6bbbef32_hoisted_4 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
+var Menudropdownvue_type_template_id_0349d645_hoisted_4 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
class: "icon-arrow-bottom"
}, null, -1);
-var Menudropdownvue_type_template_id_6bbbef32_hoisted_5 = {
+var Menudropdownvue_type_template_id_0349d645_hoisted_5 = {
class: "items"
};
-var Menudropdownvue_type_template_id_6bbbef32_hoisted_6 = {
+var Menudropdownvue_type_template_id_0349d645_hoisted_6 = {
key: 0,
class: "search"
};
-var Menudropdownvue_type_template_id_6bbbef32_hoisted_7 = ["placeholder"];
-var Menudropdownvue_type_template_id_6bbbef32_hoisted_8 = ["title"];
-var Menudropdownvue_type_template_id_6bbbef32_hoisted_9 = ["title"];
-function Menudropdownvue_type_template_id_6bbbef32_render(_ctx, _cache, $props, $setup, $data, $options) {
+var Menudropdownvue_type_template_id_0349d645_hoisted_7 = ["placeholder"];
+var Menudropdownvue_type_template_id_0349d645_hoisted_8 = ["title"];
+var Menudropdownvue_type_template_id_0349d645_hoisted_9 = ["title"];
+function Menudropdownvue_type_template_id_0349d645_render(_ctx, _cache, $props, $setup, $data, $options) {
+ var _directive_focus_if = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("focus-if");
+
var _directive_focus_anywhere_but_here = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("focus-anywhere-but-here");
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Menudropdownvue_type_template_id_6bbbef32_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Menudropdownvue_type_template_id_0349d645_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
class: "title",
onClick: _cache[0] || (_cache[0] = function ($event) {
return _ctx.showItems = !_ctx.showItems;
@@ -3853,7 +3886,7 @@ function Menudropdownvue_type_template_id_6bbbef32_render(_ctx, _cache, $props,
title: _ctx.tooltip
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
innerHTML: _ctx.$sanitize(this.actualMenuTitle)
- }, null, 8, Menudropdownvue_type_template_id_6bbbef32_hoisted_3), Menudropdownvue_type_template_id_6bbbef32_hoisted_4], 8, Menudropdownvue_type_template_id_6bbbef32_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Menudropdownvue_type_template_id_6bbbef32_hoisted_5, [_ctx.showSearch && _ctx.showItems ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Menudropdownvue_type_template_id_6bbbef32_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", {
+ }, null, 8, Menudropdownvue_type_template_id_0349d645_hoisted_3), Menudropdownvue_type_template_id_0349d645_hoisted_4], 8, Menudropdownvue_type_template_id_0349d645_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Menudropdownvue_type_template_id_0349d645_hoisted_5, [_ctx.showSearch && _ctx.showItems ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Menudropdownvue_type_template_id_0349d645_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", {
type: "text",
"onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
return _ctx.searchTerm = $event;
@@ -3862,11 +3895,11 @@ function Menudropdownvue_type_template_id_6bbbef32_render(_ctx, _cache, $props,
return _ctx.onSearchTermKeydown($event);
}),
placeholder: _ctx.translate('General_Search')
- }, null, 40, Menudropdownvue_type_template_id_6bbbef32_hoisted_7), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", {
+ }, null, 40, Menudropdownvue_type_template_id_0349d645_hoisted_7), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm], [_directive_focus_if, {}, _ctx.showItems]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", {
class: "search_ico",
src: "plugins/Morpheus/images/search_ico.png",
title: _ctx.translate('General_Search')
- }, null, 8, Menudropdownvue_type_template_id_6bbbef32_hoisted_8), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.searchTerm]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", {
+ }, null, 8, Menudropdownvue_type_template_id_0349d645_hoisted_8), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.searchTerm]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", {
onClick: _cache[3] || (_cache[3] = function ($event) {
_ctx.searchTerm = '';
@@ -3875,7 +3908,7 @@ function Menudropdownvue_type_template_id_6bbbef32_render(_ctx, _cache, $props,
class: "reset",
src: "plugins/CoreHome/images/reset_search.png",
title: _ctx.translate('General_Clear')
- }, null, 8, Menudropdownvue_type_template_id_6bbbef32_hoisted_9), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.searchTerm]])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", {
+ }, null, 8, Menudropdownvue_type_template_id_0349d645_hoisted_9), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.searchTerm]])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", {
onClick: _cache[4] || (_cache[4] = function ($event) {
return _ctx.selectItem($event);
})
@@ -3883,7 +3916,7 @@ function Menudropdownvue_type_template_id_6bbbef32_render(_ctx, _cache, $props,
blur: _ctx.lostFocus
}]]);
}
-// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Menudropdown/Menudropdown.vue?vue&type=template&id=6bbbef32
+// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Menudropdown/Menudropdown.vue?vue&type=template&id=0349d645
// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-3!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreHome/vue/src/Menudropdown/Menudropdown.vue?vue&type=script&lang=ts
@@ -3964,7 +3997,7 @@ var Menudropdownvue_type_script_lang_ts_window = window,
-Menudropdownvue_type_script_lang_ts.render = Menudropdownvue_type_template_id_6bbbef32_render
+Menudropdownvue_type_script_lang_ts.render = Menudropdownvue_type_template_id_0349d645_render
/* harmony default export */ var Menudropdown = (Menudropdownvue_type_script_lang_ts);
// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Menudropdown/Menudropdown.adapter.ts
@@ -4923,6 +4956,552 @@ function deleteCookie(name) {
document.cookie = "".concat(name, "=; expires=").concat(date.toUTCString(), "; path=/");
}
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreHome/vue/src/Notification/Notification.vue?vue&type=template&id=e3d12348
+
+var Notificationvue_type_template_id_e3d12348_hoisted_1 = {
+ key: 0
+};
+var Notificationvue_type_template_id_e3d12348_hoisted_2 = ["data-notification-instance-id"];
+var Notificationvue_type_template_id_e3d12348_hoisted_3 = {
+ key: 1
+};
+var Notificationvue_type_template_id_e3d12348_hoisted_4 = {
+ class: "notification-body"
+};
+var Notificationvue_type_template_id_e3d12348_hoisted_5 = ["innerHTML"];
+var Notificationvue_type_template_id_e3d12348_hoisted_6 = {
+ key: 1
+};
+function Notificationvue_type_template_id_e3d12348_render(_ctx, _cache, $props, $setup, $data, $options) {
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Transition"], {
+ name: _ctx.type === 'toast' ? 'slow-fade-out' : undefined,
+ onAfterLeave: _cache[1] || (_cache[1] = function ($event) {
+ return _ctx.toastClosed();
+ })
+ }, {
+ default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () {
+ return [!_ctx.deleted ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Notificationvue_type_template_id_e3d12348_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Transition"], {
+ name: _ctx.type === 'toast' ? 'toast-slide-up' : undefined,
+ appear: ""
+ }, {
+ default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () {
+ return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Transition"], {
+ name: _ctx.animate ? 'fade-in' : undefined,
+ appear: ""
+ }, {
+ default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () {
+ return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", {
+ class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["notification system", _ctx.cssClasses]),
+ style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])(_ctx.style),
+ ref: "root",
+ "data-notification-instance-id": _ctx.notificationInstanceId
+ }, [_ctx.canClose ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("button", {
+ key: 0,
+ type: "button",
+ class: "close",
+ "data-dismiss": "alert",
+ onClick: _cache[0] || (_cache[0] = function ($event) {
+ return _ctx.closeNotification($event);
+ })
+ }, " × ")) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.title ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("strong", Notificationvue_type_template_id_e3d12348_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.title), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Notificationvue_type_template_id_e3d12348_hoisted_4, [_ctx.message ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
+ key: 0,
+ innerHTML: _ctx.$sanitize(_ctx.message)
+ }, null, 8, Notificationvue_type_template_id_e3d12348_hoisted_5)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.message ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Notificationvue_type_template_id_e3d12348_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])], 14, Notificationvue_type_template_id_e3d12348_hoisted_2)];
+ }),
+ _: 3
+ }, 8, ["name"])])];
+ }),
+ _: 3
+ }, 8, ["name"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)];
+ }),
+ _: 3
+ }, 8, ["name"]);
+}
+// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/Notification.vue?vue&type=template&id=e3d12348
+
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-3!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreHome/vue/src/Notification/Notification.vue?vue&type=script&lang=ts
+
+
+var Notificationvue_type_script_lang_ts_window = window,
+ Notificationvue_type_script_lang_ts_$ = Notificationvue_type_script_lang_ts_window.$;
+/* harmony default export */ var Notificationvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
+ props: {
+ notificationId: String,
+ // NOTE: notificationId refers to server side ID for notifications stored in the session.
+ // this ID is just so it can be selected outside of this component (just for scrolling).
+ notificationInstanceId: String,
+ title: String,
+ context: String,
+ type: String,
+ noclear: Boolean,
+ toastLength: {
+ type: Number,
+ default: 12 * 1000
+ },
+ style: [String, Object],
+ animate: Boolean,
+ message: String,
+ cssClass: String
+ },
+ computed: {
+ cssClasses: function cssClasses() {
+ var result = {};
+
+ if (this.context) {
+ result["notification-".concat(this.context)] = true;
+ }
+
+ if (this.cssClass) {
+ result[this.cssClass] = true;
+ }
+
+ return result;
+ },
+ canClose: function canClose() {
+ if (this.type === 'persistent') {
+ // otherwise it is never possible to dismiss the notification
+ return true;
+ }
+
+ return !this.noclear;
+ }
+ },
+ emits: ['closed'],
+ data: function data() {
+ return {
+ deleted: false
+ };
+ },
+ mounted: function mounted() {
+ var _this = this;
+
+ var addToastEvent = function addToastEvent() {
+ setTimeout(function () {
+ _this.deleted = true;
+ }, _this.toastLength);
+ };
+
+ if (this.type === 'toast') {
+ addToastEvent();
+ }
+
+ if (this.style) {
+ Notificationvue_type_script_lang_ts_$(this.$refs.root).css(this.style);
+ }
+ },
+ methods: {
+ toastClosed: function toastClosed() {
+ var _this2 = this;
+
+ Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
+ _this2.$emit('closed');
+ });
+ },
+ closeNotification: function closeNotification(event) {
+ var _this3 = this;
+
+ if (this.canClose && event && event.target) {
+ this.deleted = true;
+ Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
+ _this3.$emit('closed');
+ });
+ }
+
+ this.markNotificationAsRead();
+ },
+ markNotificationAsRead: function markNotificationAsRead() {
+ if (!this.notificationId) {
+ return;
+ }
+
+ AjaxHelper_AjaxHelper.fetch({
+ module: 'CoreHome',
+ action: 'markNotificationAsRead'
+ }, {
+ postParams: {
+ notificationId: this.notificationId
+ }
+ });
+ }
+ }
+}));
+// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/Notification.vue?vue&type=script&lang=ts
+
+// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/Notification.vue
+
+
+
+Notificationvue_type_script_lang_ts.render = Notificationvue_type_template_id_e3d12348_render
+
+/* harmony default export */ var Notification = (Notificationvue_type_script_lang_ts);
+// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/Notification.adapter.ts
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+
+/* harmony default export */ var Notification_adapter = (createAngularJsAdapter({
+ component: Notification,
+ scope: {
+ notificationId: {
+ angularJsBind: '@?'
+ },
+ title: {
+ angularJsBind: '@?notificationTitle'
+ },
+ context: {
+ angularJsBind: '@?'
+ },
+ type: {
+ angularJsBind: '@?'
+ },
+ noclear: {
+ angularJsBind: '@?',
+ transform: function transform(v) {
+ return !!v;
+ }
+ },
+ toastLength: {
+ angularJsBind: '@?'
+ }
+ },
+ directiveName: 'piwikNotification',
+ transclude: true
+}));
+// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/Notifications.store.ts
+function Notifications_store_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
+
+function Notifications_store_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { Notifications_store_ownKeys(Object(source), true).forEach(function (key) { Notifications_store_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { Notifications_store_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+function Notifications_store_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function Notifications_store_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
+
+function Notifications_store_createClass(Constructor, protoProps, staticProps) { if (protoProps) Notifications_store_defineProperties(Constructor.prototype, protoProps); if (staticProps) Notifications_store_defineProperties(Constructor, staticProps); return Constructor; }
+
+function Notifications_store_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+
+
+
+
+var Notifications_store_NotificationsStore = /*#__PURE__*/function () {
+ function NotificationsStore() {
+ Notifications_store_classCallCheck(this, NotificationsStore);
+
+ Notifications_store_defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
+ notifications: []
+ }));
+
+ Notifications_store_defineProperty(this, "nextNotificationId", 0);
+ }
+
+ Notifications_store_createClass(NotificationsStore, [{
+ key: "state",
+ get: function get() {
+ return this.privateState;
+ }
+ }, {
+ key: "appendNotification",
+ value: function appendNotification(notification) {
+ this.checkMessage(notification.message); // remove existing notification before adding
+
+ if (notification.id) {
+ this.remove(notification.id);
+ }
+
+ this.privateState.notifications.push(notification);
+ }
+ }, {
+ key: "prependNotification",
+ value: function prependNotification(notification) {
+ this.checkMessage(notification.message); // remove existing notification before adding
+
+ if (notification.id) {
+ this.remove(notification.id);
+ }
+
+ this.privateState.notifications.unshift(notification);
+ }
+ /**
+ * Removes a previously shown notification having the given notification id.
+ */
+
+ }, {
+ key: "remove",
+ value: function remove(id) {
+ this.privateState.notifications = this.privateState.notifications.filter(function (n) {
+ return n.id !== id;
+ });
+ }
+ }, {
+ key: "parseNotificationDivs",
+ value: function parseNotificationDivs() {
+ var _this = this;
+
+ var $notificationNodes = $('[data-role="notification"]');
+ var notificationsToShow = [];
+ $notificationNodes.each(function (index, notificationNode) {
+ var $notificationNode = $(notificationNode);
+ var attributes = $notificationNode.data();
+ var message = $notificationNode.html();
+
+ if (message) {
+ notificationsToShow.push(Notifications_store_objectSpread(Notifications_store_objectSpread({}, attributes), {}, {
+ message: message,
+ animate: false
+ }));
+ }
+
+ $notificationNodes.remove();
+ });
+ notificationsToShow.forEach(function (n) {
+ return _this.show(n);
+ });
+ }
+ }, {
+ key: "clearTransientNotifications",
+ value: function clearTransientNotifications() {
+ this.privateState.notifications = this.privateState.notifications.filter(function (n) {
+ return n.type !== 'transient';
+ });
+ }
+ /**
+ * Creates a notification and shows it to the user.
+ */
+
+ }, {
+ key: "show",
+ value: function show(notification) {
+ this.checkMessage(notification.message);
+ var addMethod = this.appendNotification;
+ var notificationPosition = '#notificationContainer';
+
+ if (notification.placeat) {
+ notificationPosition = notification.placeat;
+ } else {
+ // If a modal is open, we want to make sure the error message is visible and therefore
+ // show it within the opened modal
+ var modalSelector = '.modal.open .modal-content';
+
+ if (document.querySelector(modalSelector)) {
+ notificationPosition = modalSelector;
+ addMethod = this.prependNotification;
+ }
+ }
+
+ var group = notification.group || (notification.placeat ? notification.placeat.toString() : '');
+ this.initializeNotificationContainer(notificationPosition, group);
+ var notificationInstanceId = (this.nextNotificationId += 1).toString();
+ addMethod.call(this, Notifications_store_objectSpread(Notifications_store_objectSpread({}, notification), {}, {
+ noclear: !!notification.noclear,
+ group: group,
+ notificationId: notification.id,
+ notificationInstanceId: notificationInstanceId,
+ type: notification.type || 'transient'
+ }));
+ return notificationInstanceId;
+ }
+ }, {
+ key: "scrollToNotification",
+ value: function scrollToNotification(notificationInstanceId) {
+ setTimeout(function () {
+ var element = document.querySelector("[data-notification-instance-id='".concat(notificationInstanceId, "']"));
+
+ if (element) {
+ Matomo_Matomo.helper.lazyScrollTo(element, 250);
+ }
+ });
+ }
+ /**
+ * Shows a notification at a certain point with a quick upwards animation.
+ */
+
+ }, {
+ key: "toast",
+ value: function toast(notification) {
+ this.checkMessage(notification.message);
+ var $placeat = $(notification.placeat);
+
+ if (!$placeat.length) {
+ throw new Error('A valid selector is required for the placeat option when using Notification.toast().');
+ }
+
+ var toastElement = document.createElement('div');
+ toastElement.style.position = 'absolute';
+ toastElement.style.top = "".concat($placeat.offset().top, "px");
+ toastElement.style.left = "".concat($placeat.offset().left, "px");
+ toastElement.style.zIndex = '1000';
+ document.body.appendChild(toastElement);
+ var app = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createApp"])({
+ render: function render() {
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(Notification, Notifications_store_objectSpread(Notifications_store_objectSpread({}, notification), {}, {
+ notificationId: notification.id,
+ type: 'toast',
+ onClosed: function onClosed() {
+ app.unmount();
+ }
+ }));
+ }
+ });
+ app.config.globalProperties.$sanitize = window.vueSanitize;
+ app.config.globalProperties.translate = translate;
+ app.mount(toastElement);
+ }
+ }, {
+ key: "initializeNotificationContainer",
+ value: function initializeNotificationContainer(notificationPosition, group) {
+ var $container = window.$(notificationPosition);
+
+ if ($container.children('.notification-group').length) {
+ return;
+ } // avoiding a dependency cycle. won't need to do this when NotificationGroup's do not need
+ // to be dynamically initialized.
+
+
+ var NotificationGroup = window.CoreHome.NotificationGroup; // eslint-disable-line
+
+ var app = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createApp"])({
+ template: '<NotificationGroup :group="group"></NotificationGroup>',
+ data: function data() {
+ return {
+ group: group
+ };
+ }
+ });
+ app.config.globalProperties.$sanitize = window.vueSanitize;
+ app.config.globalProperties.translate = translate;
+ app.component('NotificationGroup', NotificationGroup);
+ app.mount($container[0]);
+ }
+ }, {
+ key: "checkMessage",
+ value: function checkMessage(message) {
+ if (!message) {
+ throw new Error('No message given, cannot display notification');
+ }
+ }
+ }]);
+
+ return NotificationsStore;
+}();
+
+var Notifications_store_instance = new Notifications_store_NotificationsStore();
+/* harmony default export */ var Notifications_store = (Notifications_store_instance); // parse notifications on dom load
+
+$(function () {
+ return Notifications_store_instance.parseNotificationDivs();
+});
+// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/Notifications.store.adapter.ts
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+angular.module('piwikApp').factory('notifications', function () {
+ return Notifications_store;
+});
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreHome/vue/src/Notification/NotificationGroup.vue?vue&type=template&id=672051da
+
+var NotificationGroupvue_type_template_id_672051da_hoisted_1 = {
+ class: "notification-group"
+};
+var NotificationGroupvue_type_template_id_672051da_hoisted_2 = ["innerHTML"];
+function NotificationGroupvue_type_template_id_672051da_render(_ctx, _cache, $props, $setup, $data, $options) {
+ var _component_Notification = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Notification");
+
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", NotificationGroupvue_type_template_id_672051da_hoisted_1, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.notifications, function (notification, index) {
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Notification, {
+ key: notification.id || "no-id-".concat(index),
+ "notification-id": notification.id,
+ title: notification.title,
+ context: notification.context,
+ type: notification.type,
+ noclear: notification.noclear,
+ "toast-length": notification.toastLength,
+ style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])(notification.style),
+ animate: notification.animate,
+ message: notification.message,
+ "notification-instance-id": notification.notificationInstanceId,
+ "css-class": notification.class,
+ onClosed: function onClosed($event) {
+ return _ctx.removeNotification(notification.id);
+ }
+ }, {
+ default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () {
+ return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", {
+ innerHTML: _ctx.$sanitize(notification.message)
+ }, null, 8, NotificationGroupvue_type_template_id_672051da_hoisted_2)];
+ }),
+ _: 2
+ }, 1032, ["notification-id", "title", "context", "type", "noclear", "toast-length", "style", "animate", "message", "notification-instance-id", "css-class", "onClosed"]);
+ }), 128))]);
+}
+// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/NotificationGroup.vue?vue&type=template&id=672051da
+
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-3!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreHome/vue/src/Notification/NotificationGroup.vue?vue&type=script&lang=ts
+
+
+
+/* harmony default export */ var NotificationGroupvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
+ props: {
+ group: String
+ },
+ components: {
+ Notification: Notification
+ },
+ computed: {
+ notifications: function notifications() {
+ var _this = this;
+
+ return Notifications_store.state.notifications.filter(function (n) {
+ if (_this.group) {
+ return _this.group === n.group;
+ }
+
+ return !n.group;
+ });
+ }
+ },
+ methods: {
+ removeNotification: function removeNotification(id) {
+ Notifications_store.remove(id);
+ }
+ }
+}));
+// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/NotificationGroup.vue?vue&type=script&lang=ts
+
+// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/NotificationGroup.vue
+
+
+
+NotificationGroupvue_type_script_lang_ts.render = NotificationGroupvue_type_template_id_672051da_render
+
+/* harmony default export */ var Notification_NotificationGroup = (NotificationGroupvue_type_script_lang_ts);
+// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/index.ts
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+
+
+
+
// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/index.ts
/*!
* Matomo - free/libre analytics platform
@@ -4976,6 +5555,7 @@ function deleteCookie(name) {
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js
diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js
index 0fe81a6b4c..4b0e64d200 100644
--- a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js
+++ b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js
@@ -4,19 +4,19 @@
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */window.hasBlockedContent=!1},"8bbf":function(t,n){t.exports=e},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"createAngularJsAdapter",(function(){return yt})),n.d(t,"activityIndicatorAdapter",(function(){return br})),n.d(t,"ActivityIndicator",(function(){return gr})),n.d(t,"translate",(function(){return C})),n.d(t,"alertAdapter",(function(){return Or})),n.d(t,"AjaxHelper",(function(){return $e})),n.d(t,"setCookie",(function(){return jr})),n.d(t,"getCookie",(function(){return Cr})),n.d(t,"deleteCookie",(function(){return Pr})),n.d(t,"MatomoUrl",(function(){return ke})),n.d(t,"Matomo",(function(){return j})),n.d(t,"Periods",(function(){return p})),n.d(t,"Day",(function(){return Q})),n.d(t,"Week",(function(){return X})),n.d(t,"Month",(function(){return re})),n.d(t,"Year",(function(){return ce})),n.d(t,"Range",(function(){return R})),n.d(t,"format",(function(){return P})),n.d(t,"getToday",(function(){return S})),n.d(t,"parseDate",(function(){return E})),n.d(t,"todayIsInRange",(function(){return T})),n.d(t,"Dropdown",(function(){return Ae})),n.d(t,"FocusAnywhereButHere",(function(){return Re})),n.d(t,"FocusIf",(function(){return _e})),n.d(t,"MatomoDialog",(function(){return st})),n.d(t,"ExpandOnClick",(function(){return Ke})),n.d(t,"ExpandOnHover",(function(){return at})),n.d(t,"EnrichedHeadline",(function(){return Mt})),n.d(t,"ContentBlock",(function(){return qt})),n.d(t,"Comparisons",(function(){return In})),n.d(t,"Menudropdown",(function(){return Gn})),n.d(t,"DatePicker",(function(){return nr})),n.d(t,"DateRangePicker",(function(){return lr})),n.d(t,"PeriodDatePicker",(function(){return pr})),"undefined"!==typeof window){var r=window.document.currentScript,a=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}n("2342");var o=n("8bbf");function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+ */window.hasBlockedContent=!1},"8bbf":function(t,n){t.exports=e},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"createAngularJsAdapter",(function(){return wt})),n.d(t,"activityIndicatorAdapter",(function(){return yr})),n.d(t,"ActivityIndicator",(function(){return br})),n.d(t,"translate",(function(){return C})),n.d(t,"alertAdapter",(function(){return Dr})),n.d(t,"AjaxHelper",(function(){return Ne})),n.d(t,"setCookie",(function(){return Cr})),n.d(t,"getCookie",(function(){return Sr})),n.d(t,"deleteCookie",(function(){return Pr})),n.d(t,"MatomoUrl",(function(){return ke})),n.d(t,"Matomo",(function(){return D})),n.d(t,"Periods",(function(){return p})),n.d(t,"Day",(function(){return z})),n.d(t,"Week",(function(){return X})),n.d(t,"Month",(function(){return re})),n.d(t,"Year",(function(){return se})),n.d(t,"Range",(function(){return R})),n.d(t,"format",(function(){return S})),n.d(t,"getToday",(function(){return P})),n.d(t,"parseDate",(function(){return E})),n.d(t,"todayIsInRange",(function(){return T})),n.d(t,"Dropdown",(function(){return Be})),n.d(t,"FocusAnywhereButHere",(function(){return Re})),n.d(t,"FocusIf",(function(){return Je})),n.d(t,"MatomoDialog",(function(){return ut})),n.d(t,"ExpandOnClick",(function(){return Xe})),n.d(t,"ExpandOnHover",(function(){return ot})),n.d(t,"EnrichedHeadline",(function(){return Mt})),n.d(t,"ContentBlock",(function(){return qt})),n.d(t,"Comparisons",(function(){return Nn})),n.d(t,"Menudropdown",(function(){return zn})),n.d(t,"DatePicker",(function(){return rr})),n.d(t,"DateRangePicker",(function(){return sr})),n.d(t,"PeriodDatePicker",(function(){return fr})),n.d(t,"Notification",(function(){return Fr})),n.d(t,"NotificationGroup",(function(){return Xr})),n.d(t,"NotificationsStore",(function(){return zr})),"undefined"!==typeof window){var r=window.document.currentScript,a=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}n("2342");var o=n("8bbf");function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */var u,d=function(){function e(){i(this,e),s(this,"periods",{}),s(this,"periodOrder",[])}return c(e,[{key:"addCustomPeriod",value:function(e,t){if(this.periods[e])throw new Error('The "'.concat(e,'" period already exists! It cannot be overridden.'));this.periods[e]=t,this.periodOrder.push(e)}},{key:"getAllLabels",value:function(){return Array().concat(this.periodOrder)}},{key:"get",value:function(e){var t=this.periods[e];if(!t)throw new Error("Invalid period label: ".concat(e));return t}},{key:"parse",value:function(e,t){return this.get(e).parse(t)}},{key:"isRecognizedPeriod",value:function(e){return!!this.periods[e]}}]),e}(),p=new d;function f(e){return g(e)||v(e)||h(e)||m()}function m(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e,t){if(e){if("string"===typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function v(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function g(e){if(Array.isArray(e))return b(e)}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}
+ */var u,d=function(){function e(){i(this,e),l(this,"periods",{}),l(this,"periodOrder",[])}return s(e,[{key:"addCustomPeriod",value:function(e,t){if(this.periods[e])throw new Error('The "'.concat(e,'" period already exists! It cannot be overridden.'));this.periods[e]=t,this.periodOrder.push(e)}},{key:"getAllLabels",value:function(){return Array().concat(this.periodOrder)}},{key:"get",value:function(e){var t=this.periods[e];if(!t)throw new Error("Invalid period label: ".concat(e));return t}},{key:"parse",value:function(e,t){return this.get(e).parse(t)}},{key:"isRecognizedPeriod",value:function(e){return!!this.periods[e]}}]),e}(),p=new d;function f(e){return g(e)||v(e)||h(e)||m()}function m(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e,t){if(e){if("string"===typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function v(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function g(e){if(Array.isArray(e))return b(e)}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */var y=window,w=y.piwik,k=y.broadcast,D=y.piwikHelper;w.helper=D,w.broadcast=k,w.updateDateInTitle=function(e,t){if($(".top_controls #periodString").length&&(u=u||document.title,0===u.indexOf(w.siteName))){var n=" - ".concat(p.parse(t,e).getPrettyString()," ");document.title="".concat(w.siteName).concat(n).concat(u.substr(w.siteName.length))}},w.hasUserCapability=function(e){return window.angular.isArray(w.userCapabilities)&&-1!==w.userCapabilities.indexOf(e)},w.on=function(e,t){function n(e){t.apply(void 0,f(e.detail))}t.wrapper=n,window.addEventListener(e,n)},w.off=function(e,t){t.wrapper&&window.removeEventListener(e,t.wrapper)},w.postEventNoEmit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=new CustomEvent(e,{detail:n});window.dispatchEvent(a)},w.postEvent=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];w.postEventNoEmit.apply(w,[e].concat(n)),window.angular.element((function(){var t=w.helper.getAngularDependency("$rootScope");t.$oldEmit.apply(t,[e].concat(n))}))};var O=w,j=O;
+ */var y=window,w=y.piwik,k=y.broadcast,O=y.piwikHelper;w.helper=O,w.broadcast=k,w.updateDateInTitle=function(e,t){if($(".top_controls #periodString").length&&(u=u||document.title,0===u.indexOf(w.siteName))){var n=" - ".concat(p.parse(t,e).getPrettyString()," ");document.title="".concat(w.siteName).concat(n).concat(u.substr(w.siteName.length))}},w.hasUserCapability=function(e){return window.angular.isArray(w.userCapabilities)&&-1!==w.userCapabilities.indexOf(e)},w.on=function(e,t){function n(e){t.apply(void 0,f(e.detail))}t.wrapper=n,window.addEventListener(e,n)},w.off=function(e,t){t.wrapper&&window.removeEventListener(e,t.wrapper)},w.postEventNoEmit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=new CustomEvent(e,{detail:n});window.dispatchEvent(a)},w.postEvent=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];w.postEventNoEmit.apply(w,[e].concat(n)),window.angular.element((function(){var t=w.helper.getAngularDependency("$rootScope");t.$oldEmit.apply(t,[e].concat(n))}))};var j=w,D=j;
/*!
* Matomo - free/libre analytics platform
*
@@ -29,13 +29,13 @@ function C(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function P(e){return $.datepicker.formatDate("yy-mm-dd",e)}function S(){var e=new Date(Date.now());return e.setTime(e.getTime()+60*e.getTimezoneOffset()*1e3),e.setHours(e.getHours()+(window.piwik.timezoneOffset||0)/3600),e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e}function E(e){if(e instanceof Date)return e;var t=decodeURIComponent(e).trim();if(""===t)throw new Error("Invalid date, empty string.");if("today"===t||"now"===t)return S();if("yesterday"===t||"yesterdaySameTime"===t){var n=S();return n.setDate(n.getDate()-1),n}if(t.match(/last[ -]?week/i)){var r=S();return r.setDate(r.getDate()-7),r}if(t.match(/last[ -]?month/i)){var a=S();return a.setDate(1),a.setMonth(a.getMonth()-1),a}if(t.match(/last[ -]?year/i)){var o=S();return o.setFullYear(o.getFullYear()-1),o}return $.datepicker.parseDate("yy-mm-dd",t)}function T(e){return 2===e.length&&(S()>=e[0]&&S()<=e[1])}function x(e,t){return M(e)||B(e,t)||H(e,t)||I()}function I(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function H(e,t){if(e){if("string"===typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done);i=!0)if(o.push(r.value),t&&o.length===t)break}catch(c){l=!0,a=c}finally{try{i||null==n["return"]||n["return"]()}finally{if(l)throw a}}return o}}function M(e){if(Array.isArray(e))return e}function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function V(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),e}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+ */function S(e){return $.datepicker.formatDate("yy-mm-dd",e)}function P(){var e=new Date(Date.now());return e.setTime(e.getTime()+60*e.getTimezoneOffset()*1e3),e.setHours(e.getHours()+(window.piwik.timezoneOffset||0)/3600),e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e}function E(e){if(e instanceof Date)return e;var t=decodeURIComponent(e).trim();if(""===t)throw new Error("Invalid date, empty string.");if("today"===t||"now"===t)return P();if("yesterday"===t||"yesterdaySameTime"===t){var n=P();return n.setDate(n.getDate()-1),n}if(t.match(/last[ -]?week/i)){var r=P();return r.setDate(r.getDate()-7),r}if(t.match(/last[ -]?month/i)){var a=P();return a.setDate(1),a.setMonth(a.getMonth()-1),a}if(t.match(/last[ -]?year/i)){var o=P();return o.setFullYear(o.getFullYear()-1),o}return $.datepicker.parseDate("yy-mm-dd",t)}function T(e){return 2===e.length&&(P()>=e[0]&&P()<=e[1])}function x(e,t){return A(e)||H(e,t)||N(e,t)||I()}function I(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function N(e,t){if(e){if("string"===typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done);i=!0)if(o.push(r.value),t&&o.length===t)break}catch(s){c=!0,a=s}finally{try{i||null==n["return"]||n["return"]()}finally{if(c)throw a}}return o}}function A(e){if(Array.isArray(e))return e}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function V(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),e}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */var R=function(){function e(t,n,r){N(this,e),L(this,"startDate",void 0),L(this,"endDate",void 0),L(this,"childPeriodType",void 0),this.startDate=t,this.endDate=n,this.childPeriodType=r}return V(e,[{key:"getPrettyString",value:function(){var e=P(this.startDate),t=P(this.endDate);return C("General_DateRangeFromTo",[e,t])}},{key:"getDateRange",value:function(){return[this.startDate,this.endDate]}},{key:"containsToday",value:function(){return T(this.getDateRange())}}],[{key:"getLastNRange",value:function(t,n,r){var a=Math.max(parseInt(n.toString(),10)-1,0);if(Number.isNaN(a))throw new Error("Invalid range strAmount");var o=r?E(r):S(),i=new Date(o.getTime());if("day"===t)i.setDate(i.getDate()-a);else if("week"===t)i.setDate(i.getDate()-7*a);else if("month"===t)i.setDate(1),i.setMonth(i.getMonth()-a);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));i.setFullYear(i.getFullYear()-a)}if("day"!==t){var l=p.periods[t].parse(i),c=p.periods[t].parse(o),s=l.getDateRange(),u=x(s,1);i=u[0];var d=c.getDateRange(),f=x(d,2);o=f[1]}var m=new Date(1991,7,6);if(i.getTime()-m.getTime()<0)switch(t){case"year":i=new Date(1992,0,1);break;case"month":i=new Date(1991,8,1);break;case"week":i=new Date(1991,8,12);break;case"day":default:i=m;break}return new e(i,o,t)}},{key:"getLastNRangeChild",value:function(t,n,r){var a=n?E(n):S(),o=new Date(a.getTime()),i=new Date(a.getTime());if("day"===t)o.setDate(o.getDate()-r),i.setDate(i.getDate()-r);else if("week"===t)o.setDate(o.getDate()-7*r),i.setDate(i.getDate()-7*r);else if("month"===t)o.setDate(1),o.setMonth(o.getMonth()-r),i.setDate(1),i.setMonth(i.getMonth()-r);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));o.setFullYear(o.getFullYear()-r),i.setFullYear(i.getFullYear()-r)}if("day"!==t){var l=p.periods[t].parse(o),c=p.periods[t].parse(i),s=l.getDateRange(),u=x(s,1);o=u[0];var d=c.getDateRange(),f=x(d,2);i=f[1]}var m=new Date(1991,7,6);if(o.getTime()-m.getTime()<0)switch(t){case"year":o=new Date(1992,0,1);break;case"month":o=new Date(1991,8,1);break;case"week":o=new Date(1991,8,12);break;case"day":default:o=m;break}return new e(o,i,t)}},{key:"parse",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"day";if(/^previous/.test(t)){var r=e.getLastNRange(n,"2").startDate;return e.getLastNRange(n,t.substring(8),r)}if(/^last/.test(t))return e.getLastNRange(n,t.substring(4));var a=decodeURIComponent(t).split(",");return new e(E(a[0]),E(a[1]),n)}},{key:"getDisplayText",value:function(){return C("General_DateRangeInPeriodList")}}]),e}();function U(){return{getAllLabels:p.getAllLabels.bind(p),isRecognizedPeriod:p.isRecognizedPeriod.bind(p),get:p.get.bind(p),parse:p.parse.bind(p),parseDate:E,format:P,RangePeriod:R,todayIsInRange:T}}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function q(e,t,n){return t&&J(e.prototype,t),n&&J(e,n),e}function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+ */var R=function(){function e(t,n,r){M(this,e),L(this,"startDate",void 0),L(this,"endDate",void 0),L(this,"childPeriodType",void 0),this.startDate=t,this.endDate=n,this.childPeriodType=r}return V(e,[{key:"getPrettyString",value:function(){var e=S(this.startDate),t=S(this.endDate);return C("General_DateRangeFromTo",[e,t])}},{key:"getDateRange",value:function(){return[this.startDate,this.endDate]}},{key:"containsToday",value:function(){return T(this.getDateRange())}}],[{key:"getLastNRange",value:function(t,n,r){var a=Math.max(parseInt(n.toString(),10)-1,0);if(Number.isNaN(a))throw new Error("Invalid range strAmount");var o=r?E(r):P(),i=new Date(o.getTime());if("day"===t)i.setDate(i.getDate()-a);else if("week"===t)i.setDate(i.getDate()-7*a);else if("month"===t)i.setDate(1),i.setMonth(i.getMonth()-a);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));i.setFullYear(i.getFullYear()-a)}if("day"!==t){var c=p.periods[t].parse(i),s=p.periods[t].parse(o),l=c.getDateRange(),u=x(l,1);i=u[0];var d=s.getDateRange(),f=x(d,2);o=f[1]}var m=new Date(1991,7,6);if(i.getTime()-m.getTime()<0)switch(t){case"year":i=new Date(1992,0,1);break;case"month":i=new Date(1991,8,1);break;case"week":i=new Date(1991,8,12);break;case"day":default:i=m;break}return new e(i,o,t)}},{key:"getLastNRangeChild",value:function(t,n,r){var a=n?E(n):P(),o=new Date(a.getTime()),i=new Date(a.getTime());if("day"===t)o.setDate(o.getDate()-r),i.setDate(i.getDate()-r);else if("week"===t)o.setDate(o.getDate()-7*r),i.setDate(i.getDate()-7*r);else if("month"===t)o.setDate(1),o.setMonth(o.getMonth()-r),i.setDate(1),i.setMonth(i.getMonth()-r);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));o.setFullYear(o.getFullYear()-r),i.setFullYear(i.getFullYear()-r)}if("day"!==t){var c=p.periods[t].parse(o),s=p.periods[t].parse(i),l=c.getDateRange(),u=x(l,1);o=u[0];var d=s.getDateRange(),f=x(d,2);i=f[1]}var m=new Date(1991,7,6);if(o.getTime()-m.getTime()<0)switch(t){case"year":o=new Date(1992,0,1);break;case"month":o=new Date(1991,8,1);break;case"week":o=new Date(1991,8,12);break;case"day":default:o=m;break}return new e(o,i,t)}},{key:"parse",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"day";if(/^previous/.test(t)){var r=e.getLastNRange(n,"2").startDate;return e.getLastNRange(n,t.substring(8),r)}if(/^last/.test(t))return e.getLastNRange(n,t.substring(4));var a=decodeURIComponent(t).split(",");return new e(E(a[0]),E(a[1]),n)}},{key:"getDisplayText",value:function(){return C("General_DateRangeInPeriodList")}}]),e}();function U(){return{getAllLabels:p.getAllLabels.bind(p),isRecognizedPeriod:p.isRecognizedPeriod.bind(p),get:p.get.bind(p),parse:p.parse.bind(p),parseDate:E,format:S,RangePeriod:R,todayIsInRange:T}}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function G(e,t,n){return t&&J(e.prototype,t),n&&J(e,n),e}function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
@@ -48,202 +48,228 @@ function C(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-window.piwik.addCustomPeriod=p.addCustomPeriod.bind(p),window.angular.module("piwikApp.service").factory("piwikPeriods",U);var Q=function(){function e(t){_(this,e),G(this,"dateInPeriod",void 0),this.dateInPeriod=t}return q(e,[{key:"getPrettyString",value:function(){return P(this.dateInPeriod)}},{key:"getDateRange",value:function(){return[new Date(this.dateInPeriod.getTime()),new Date(this.dateInPeriod.getTime())]}},{key:"containsToday",value:function(){return T(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodDay")}}]),e}();function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t,n){return t&&Y(e.prototype,t),n&&Y(e,n),e}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+window.piwik.addCustomPeriod=p.addCustomPeriod.bind(p),window.angular.module("piwikApp.service").factory("piwikPeriods",U);var z=function(){function e(t){_(this,e),q(this,"dateInPeriod",void 0),this.dateInPeriod=t}return G(e,[{key:"getPrettyString",value:function(){return S(this.dateInPeriod)}},{key:"getDateRange",value:function(){return[new Date(this.dateInPeriod.getTime()),new Date(this.dateInPeriod.getTime())]}},{key:"containsToday",value:function(){return T(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodDay")}}]),e}();function Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t,n){return t&&Y(e.prototype,t),n&&Y(e,n),e}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */p.addCustomPeriod("day",Q);var X=function(){function e(t){z(this,e),K(this,"dateInPeriod",void 0),this.dateInPeriod=t}return W(e,[{key:"getPrettyString",value:function(){var e=this.getDateRange(),t=P(e[0]),n=P(e[1]);return C("General_DateRangeFromTo",[t,n])}},{key:"getDateRange",value:function(){var e=(this.dateInPeriod.getDay()+6)%7,t=new Date(this.dateInPeriod.getTime());t.setDate(this.dateInPeriod.getDate()-e);var n=new Date(t.getTime());return n.setDate(t.getDate()+6),[t,n]}},{key:"containsToday",value:function(){return T(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodWeek")}}]),e}();function Z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function te(e,t,n){return t&&ee(e.prototype,t),n&&ee(e,n),e}function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+ */p.addCustomPeriod("day",z);var X=function(){function e(t){Q(this,e),K(this,"dateInPeriod",void 0),this.dateInPeriod=t}return W(e,[{key:"getPrettyString",value:function(){var e=this.getDateRange(),t=S(e[0]),n=S(e[1]);return C("General_DateRangeFromTo",[t,n])}},{key:"getDateRange",value:function(){var e=(this.dateInPeriod.getDay()+6)%7,t=new Date(this.dateInPeriod.getTime());t.setDate(this.dateInPeriod.getDate()-e);var n=new Date(t.getTime());return n.setDate(t.getDate()+6),[t,n]}},{key:"containsToday",value:function(){return T(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodWeek")}}]),e}();function Z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function te(e,t,n){return t&&ee(e.prototype,t),n&&ee(e,n),e}function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */p.addCustomPeriod("week",X);var re=function(){function e(t){Z(this,e),ne(this,"dateInPeriod",void 0),this.dateInPeriod=t}return te(e,[{key:"getPrettyString",value:function(){var e=C("Intl_Month_Long_StandAlone_".concat(this.dateInPeriod.getMonth()+1));return"".concat(e," ").concat(this.dateInPeriod.getFullYear())}},{key:"getDateRange",value:function(){var e=new Date(this.dateInPeriod.getTime());e.setDate(1);var t=new Date(this.dateInPeriod.getTime());return t.setDate(1),t.setMonth(t.getMonth()+1),t.setDate(0),[e,t]}},{key:"containsToday",value:function(){return T(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodMonth")}}]),e}();function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ie(e,t,n){return t&&oe(e.prototype,t),n&&oe(e,n),e}function le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+ */p.addCustomPeriod("week",X);var re=function(){function e(t){Z(this,e),ne(this,"dateInPeriod",void 0),this.dateInPeriod=t}return te(e,[{key:"getPrettyString",value:function(){var e=C("Intl_Month_Long_StandAlone_".concat(this.dateInPeriod.getMonth()+1));return"".concat(e," ").concat(this.dateInPeriod.getFullYear())}},{key:"getDateRange",value:function(){var e=new Date(this.dateInPeriod.getTime());e.setDate(1);var t=new Date(this.dateInPeriod.getTime());return t.setDate(1),t.setMonth(t.getMonth()+1),t.setDate(0),[e,t]}},{key:"containsToday",value:function(){return T(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodMonth")}}]),e}();function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ie(e,t,n){return t&&oe(e.prototype,t),n&&oe(e,n),e}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */p.addCustomPeriod("month",re);var ce=function(){function e(t){ae(this,e),le(this,"dateInPeriod",void 0),this.dateInPeriod=t}return ie(e,[{key:"getPrettyString",value:function(){return this.dateInPeriod.getFullYear().toString()}},{key:"getDateRange",value:function(){var e=new Date(this.dateInPeriod.getTime());e.setMonth(0),e.setDate(1);var t=new Date(this.dateInPeriod.getTime());return t.setMonth(12),t.setDate(0),[e,t]}},{key:"containsToday",value:function(){return T(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodYear")}}]),e}();
+ */p.addCustomPeriod("month",re);var se=function(){function e(t){ae(this,e),ce(this,"dateInPeriod",void 0),this.dateInPeriod=t}return ie(e,[{key:"getPrettyString",value:function(){return this.dateInPeriod.getFullYear().toString()}},{key:"getDateRange",value:function(){var e=new Date(this.dateInPeriod.getTime());e.setMonth(0),e.setDate(1);var t=new Date(this.dateInPeriod.getTime());return t.setMonth(12),t.setDate(0),[e,t]}},{key:"containsToday",value:function(){return T(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodYear")}}]),e}();
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function de(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fe(e,t,n){return t&&pe(e.prototype,t),n&&pe(e,n),e}function me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function de(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fe(e,t,n){return t&&pe(e.prototype,t),n&&pe(e,n),e}function me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */p.addCustomPeriod("year",ce);var he=window,ve=he.piwik,ge=he.broadcast;function be(e,t){try{return p.parse(e,t),!0}catch(n){return!1}}var ye=function(){function e(){var t=this;de(this,e),me(this,"urlQuery",Object(o["ref"])("")),me(this,"hashQuery",Object(o["ref"])("")),me(this,"urlParsed",Object(o["computed"])((function(){return Object(o["readonly"])(ge.getValuesFromUrl("?".concat(t.urlQuery.value),!0))}))),me(this,"hashParsed",Object(o["computed"])((function(){return Object(o["readonly"])(ge.getValuesFromUrl("?".concat(t.hashQuery.value),!0))}))),me(this,"parsed",Object(o["computed"])((function(){return Object(o["readonly"])(ue(ue({},t.urlParsed.value),t.hashParsed.value))}))),this.setUrlQuery(window.location.search),this.setHashQuery(window.location.hash),j.on("$locationChangeSuccess",(function(e){var n=new URL(e);t.setUrlQuery(n.search.replace(/^\?/,"")),t.setHashQuery(n.hash.replace(/^#/,""))})),this.updatePeriodParamsFromUrl()}return fe(e,[{key:"updateHash",value:function(e){var t="string"!==typeof e?this.stringify(e):e,n=j.helper.getAngularDependency("$location");n.search(t)}},{key:"getSearchParam",value:function(e){var t=window.location.href.split("#"),n=new RegExp("".concat(e,"(\\[]|=)"));if(t&&t[1]&&n.test(decodeURIComponent(t[1]))){var r=window.broadcast.getValueFromHash(e,window.location.href);if(r||"date"!==e&&"period"!==e&&"idSite"!==e)return r}return window.broadcast.getValueFromUrl(e,window.location.search)}},{key:"stringify",value:function(e){return $.param(e).replace(/%5B%5D/g,"[]")}},{key:"updatePeriodParamsFromUrl",value:function(){var e=this.getSearchParam("date"),t=this.getSearchParam("period");if(be(t,e)&&(ve.period!==t||ve.currentDateString!==e)){ve.period=t;var n=p.parse(t,e).getDateRange();ve.startDateString=P(n[0]),ve.endDateString=P(n[1]),ve.updateDateInTitle(e,t),"range"===ve.period&&(e="".concat(ve.startDateString,",").concat(ve.endDateString)),ve.currentDateString=e}}},{key:"setUrlQuery",value:function(e){this.urlQuery.value=e.replace(/^\?/,"")}},{key:"setHashQuery",value:function(e){this.hashQuery.value=e.replace(/^[#/?]+/,"")}}]),e}(),we=new ye,ke=we;
+ */p.addCustomPeriod("year",se);var he=window,ve=he.piwik,ge=he.broadcast;function be(e,t){try{return p.parse(e,t),!0}catch(n){return!1}}var ye=function(){function e(){var t=this;de(this,e),me(this,"urlQuery",Object(o["ref"])("")),me(this,"hashQuery",Object(o["ref"])("")),me(this,"urlParsed",Object(o["computed"])((function(){return Object(o["readonly"])(ge.getValuesFromUrl("?".concat(t.urlQuery.value),!0))}))),me(this,"hashParsed",Object(o["computed"])((function(){return Object(o["readonly"])(ge.getValuesFromUrl("?".concat(t.hashQuery.value),!0))}))),me(this,"parsed",Object(o["computed"])((function(){return Object(o["readonly"])(ue(ue({},t.urlParsed.value),t.hashParsed.value))}))),this.setUrlQuery(window.location.search),this.setHashQuery(window.location.hash),D.on("$locationChangeSuccess",(function(e){var n=new URL(e);t.setUrlQuery(n.search.replace(/^\?/,"")),t.setHashQuery(n.hash.replace(/^#/,""))})),this.updatePeriodParamsFromUrl()}return fe(e,[{key:"updateHash",value:function(e){var t="string"!==typeof e?this.stringify(e):e,n=D.helper.getAngularDependency("$location");n.search(t)}},{key:"getSearchParam",value:function(e){var t=window.location.href.split("#"),n=new RegExp("".concat(e,"(\\[]|=)"));if(t&&t[1]&&n.test(decodeURIComponent(t[1]))){var r=window.broadcast.getValueFromHash(e,window.location.href);if(r||"date"!==e&&"period"!==e&&"idSite"!==e)return r}return window.broadcast.getValueFromUrl(e,window.location.search)}},{key:"stringify",value:function(e){return $.param(e).replace(/%5B%5D/g,"[]")}},{key:"updatePeriodParamsFromUrl",value:function(){var e=this.getSearchParam("date"),t=this.getSearchParam("period");if(be(t,e)&&(ve.period!==t||ve.currentDateString!==e)){ve.period=t;var n=p.parse(t,e).getDateRange();ve.startDateString=S(n[0]),ve.endDateString=S(n[1]),ve.updateDateInTitle(e,t),"range"===ve.period&&(e="".concat(ve.startDateString,",").concat(ve.endDateString)),ve.currentDateString=e}}},{key:"setUrlQuery",value:function(e){this.urlQuery.value=e.replace(/^\?/,"")}},{key:"setHashQuery",value:function(e){this.hashQuery.value=e.replace(/^[#/?]+/,"")}}]),e}(),we=new ye,ke=we;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-function De(){var e={getSearchParam:ke.getSearchParam.bind(ke)};return e}
+function Oe(){var e={getSearchParam:ke.getSearchParam.bind(ke)};return e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-function Oe(){return j}function je(e,t){t.$oldEmit=t.$emit,t.$emit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return j.postEvent.apply(j,[e].concat(n)),null},t.$oldBroadcast=t.$broadcast,t.$broadcast=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return j.postEventNoEmit.apply(j,[e].concat(r)),t.$oldBroadcast.apply(t,[e].concat(r))},t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(n),!0).forEach((function(t){xe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Te(e,t,n){return t&&Ee(e.prototype,t),n&&Ee(e,n),e}function xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+function je(){return D}function De(e,t){t.$oldEmit=t.$emit,t.$emit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return D.postEvent.apply(D,[e].concat(n)),null},t.$oldBroadcast=t.$broadcast,t.$broadcast=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return D.postEventNoEmit.apply(D,[e].concat(r)),t.$oldBroadcast.apply(t,[e].concat(r))},t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(n),!0).forEach((function(t){xe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Te(e,t,n){return t&&Ee(e.prototype,t),n&&Ee(e,n),e}function xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function Ie(e,t){if("abort"!==t)if("undefined"!==typeof Piwik_Popover){var n=$("#loadingError");Piwik_Popover.isOpen()&&e&&500===e.status?e&&500===e.status&&$(document.body).html(piwikHelper.escape(e.responseText)):n.show()}else console.log("Request failed: ".concat(e.responseText))}ve.updatePeriodParamsFromUrl=we.updatePeriodParamsFromUrl.bind(we),De.$inject=[],angular.module("piwikApp.service").service("piwikUrl",De),window.angular.module("piwikApp.service").service("piwik",Oe),je.$inject=["piwik","$rootScope"],window.angular.module("piwikApp.service").run(je),window.globalAjaxQueue=[],window.globalAjaxQueue.active=0,window.globalAjaxQueue.clean=function(){for(var e=this.length;e>=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.active+=n.length,this.clean(),(e=Array.prototype.push).call.apply(e,[this].concat(n))},window.globalAjaxQueue.abort=function(){this.forEach((function(e){return e&&e.abort&&e.abort()})),this.splice(0,this.length),this.active=0};var $e=function(){function e(){Se(this,e),xe(this,"format","json"),xe(this,"timeout",null),xe(this,"callback",null),xe(this,"useRegularCallbackInCaseOfError",!1),xe(this,"errorCallback",void 0),xe(this,"withToken",!1),xe(this,"completeCallback",void 0),xe(this,"getParams",{}),xe(this,"getUrl","?"),xe(this,"postParams",{}),xe(this,"loadingElement",null),xe(this,"errorElement","#ajaxError"),xe(this,"requestHandle",null),xe(this,"defaultParams",["idSite","period","date","segment"]),this.errorCallback=Ie}return Te(e,[{key:"addParams",value:function(e,t){var n=this,r="string"===typeof e?window.broadcast.getValuesFromUrl(e):e,a=["compareSegments","comparePeriods","compareDates"];Object.keys(r).forEach((function(e){var o=r[e];(-1===a.indexOf(e)||o)&&("get"===t.toLowerCase()?n.getParams[e]=o:"post"===t.toLowerCase()&&(n.postParams[e]=o))}))}},{key:"withTokenInUrl",value:function(){this.withToken=!0}},{key:"setUrl",value:function(e){this.addParams(broadcast.getValuesFromUrl(e),"GET")}},{key:"setBulkRequests",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map((function(e){return"string"===typeof e?e:$.param(e)}));this.addParams({module:"API",method:"API.getBulkRequest",urls:r,format:"json"},"post")}},{key:"setTimeout",value:function(e){this.timeout=e}},{key:"setCallback",value:function(e){this.callback=e}},{key:"useCallbackInCaseOfError",value:function(){this.useRegularCallbackInCaseOfError=!0}},{key:"redirectOnSuccess",value:function(e){this.setCallback((function(){piwikHelper.redirect(e)}))}},{key:"setErrorCallback",value:function(e){this.errorCallback=e}},{key:"setCompleteCallback",value:function(e){this.completeCallback=e}},{key:"setFormat",value:function(e){this.format=e}},{key:"setLoadingElement",value:function(e){this.loadingElement=e||"#ajaxLoadingDiv"}},{key:"setErrorElement",value:function(e){e&&(this.errorElement=e)}},{key:"useGETDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)if(this.defaultParams[t]===e)return!0;return!1}},{key:"removeDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)this.defaultParams[t]===e&&this.defaultParams.splice(t,1)}},{key:"send",value:function(){var e=this;return $(this.errorElement).length&&$(this.errorElement).hide(),this.loadingElement&&$(this.loadingElement).fadeIn(),this.requestHandle=this.buildAjaxCall(),window.globalAjaxQueue.push(this.requestHandle),new Promise((function(t,n){e.requestHandle.then(t).fail((function(t){"abort"!==t.statusText&&(console.log("Warning: the ".concat($.param(e.getParams)," request failed!")),n(t))}))}))}},{key:"abort",value:function(){this.requestHandle&&"function"===typeof this.requestHandle.abort&&(this.requestHandle.abort(),this.requestHandle=null)}},{key:"buildAjaxCall",value:function(){var e=this,t=this,n=this.mixinDefaultGetParams(this.getParams),r=this.getUrl;"?"!==r[r.length-1]&&(r+="&"),n.segment&&(r="".concat(r,"segment=").concat(n.segment,"&"),delete n.segment),n.date&&(r="".concat(r,"date=").concat(decodeURIComponent(n.date.toString()),"&"),delete n.date),r+=$.param(n);var a={type:"POST",async:!0,url:r,dataType:this.format||"json",complete:this.completeCallback,error:function(){if(window.globalAjaxQueue.active-=1,t.errorCallback){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.errorCallback.apply(this,n)}},success:function(t,n,r){if(e.loadingElement&&$(e.loadingElement).hide(),t&&"error"===t.result&&!e.useRegularCallbackInCaseOfError){var a=null,o="toast";if($(e.errorElement).length&&t.message&&($(e.errorElement).show(),a=e.errorElement,o=null),t.message){var i=window["require"]("piwik/UI"),l=new i.Notification;l.show(t.message,{placeat:a,context:"error",type:o,id:"ajaxHelper"}),l.scrollToNotification()}}else e.callback&&e.callback(t,n,r);window.globalAjaxQueue.active-=1,j.ajaxRequestFinished&&j.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return $.ajax(a)}},{key:"isRequestToApiMethod",value:function(){return this.getParams&&"API"===this.getParams.module&&this.getParams.method||this.postParams&&"API"===this.postParams.module&&this.postParams.method}},{key:"isWidgetizedRequest",value:function(){return"Widgetize"===broadcast.getValueFromUrl("module")}},{key:"getDefaultPostParams",value:function(){return this.withToken||this.isRequestToApiMethod()||j.shouldPropagateTokenAuth?{token_auth:j.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}},{key:"mixinDefaultPostParams",value:function(e){var t=this.getDefaultPostParams(),n=Pe(Pe({},t),e);return n}},{key:"mixinDefaultGetParams",value:function(e){var t=this,n=ke.getSearchParam("segment"),r={idSite:j.idSite?j.idSite.toString():broadcast.getValueFromUrl("idSite"),period:j.period||broadcast.getValueFromUrl("period"),segment:n},a=e;return a.token_auth&&(a.token_auth=null,delete a.token_auth),Object.keys(r).forEach((function(e){t.useGETDefaultParameter(e)&&!a[e]&&!t.postParams[e]&&r[e]&&(a[e]=r[e])})),!this.useGETDefaultParameter("date")||a.date||this.postParams.date||(a.date=j.currentDateString),a}}],[{key:"fetch",value:function(t){var n=new e;return n.setFormat("json"),n.addParams(Pe({module:"API",format:"json"},t),"get"),n.send()}}]),e}();function He(){return globalAjaxQueue}window.ajaxHelper=$e,angular.module("piwikApp.service").service("globalAjaxQueue",He);
+ */function Ie(e,t){if("abort"!==t)if("undefined"!==typeof Piwik_Popover){var n=$("#loadingError");Piwik_Popover.isOpen()&&e&&500===e.status?e&&500===e.status&&$(document.body).html(piwikHelper.escape(e.responseText)):n.show()}else console.log("Request failed: ".concat(e.responseText))}ve.updatePeriodParamsFromUrl=we.updatePeriodParamsFromUrl.bind(we),Oe.$inject=[],angular.module("piwikApp.service").service("piwikUrl",Oe),window.angular.module("piwikApp.service").service("piwik",je),De.$inject=["piwik","$rootScope"],window.angular.module("piwikApp.service").run(De),window.globalAjaxQueue=[],window.globalAjaxQueue.active=0,window.globalAjaxQueue.clean=function(){for(var e=this.length;e>=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.active+=n.length,this.clean(),(e=Array.prototype.push).call.apply(e,[this].concat(n))},window.globalAjaxQueue.abort=function(){this.forEach((function(e){return e&&e.abort&&e.abort()})),this.splice(0,this.length),this.active=0};var Ne=function(){function e(){Pe(this,e),xe(this,"format","json"),xe(this,"timeout",null),xe(this,"callback",null),xe(this,"useRegularCallbackInCaseOfError",!1),xe(this,"errorCallback",void 0),xe(this,"withToken",!1),xe(this,"completeCallback",void 0),xe(this,"getParams",{}),xe(this,"getUrl","?"),xe(this,"postParams",{}),xe(this,"loadingElement",null),xe(this,"errorElement","#ajaxError"),xe(this,"requestHandle",null),xe(this,"defaultParams",["idSite","period","date","segment"]),this.errorCallback=Ie}return Te(e,[{key:"addParams",value:function(e,t){var n=this,r="string"===typeof e?window.broadcast.getValuesFromUrl(e):e,a=["compareSegments","comparePeriods","compareDates"];Object.keys(r).forEach((function(e){var o=r[e];(-1===a.indexOf(e)||o)&&("get"===t.toLowerCase()?n.getParams[e]=o:"post"===t.toLowerCase()&&(n.postParams[e]=o))}))}},{key:"withTokenInUrl",value:function(){this.withToken=!0}},{key:"setUrl",value:function(e){this.addParams(broadcast.getValuesFromUrl(e),"GET")}},{key:"setBulkRequests",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map((function(e){return"string"===typeof e?e:$.param(e)}));this.addParams({module:"API",method:"API.getBulkRequest",urls:r,format:"json"},"post")}},{key:"setTimeout",value:function(e){this.timeout=e}},{key:"setCallback",value:function(e){this.callback=e}},{key:"useCallbackInCaseOfError",value:function(){this.useRegularCallbackInCaseOfError=!0}},{key:"redirectOnSuccess",value:function(e){this.setCallback((function(){piwikHelper.redirect(e)}))}},{key:"setErrorCallback",value:function(e){this.errorCallback=e}},{key:"setCompleteCallback",value:function(e){this.completeCallback=e}},{key:"setFormat",value:function(e){this.format=e}},{key:"setLoadingElement",value:function(e){this.loadingElement=e||"#ajaxLoadingDiv"}},{key:"setErrorElement",value:function(e){e&&(this.errorElement=e)}},{key:"useGETDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)if(this.defaultParams[t]===e)return!0;return!1}},{key:"removeDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)this.defaultParams[t]===e&&this.defaultParams.splice(t,1)}},{key:"send",value:function(){var e=this;return $(this.errorElement).length&&$(this.errorElement).hide(),this.loadingElement&&$(this.loadingElement).fadeIn(),this.requestHandle=this.buildAjaxCall(),window.globalAjaxQueue.push(this.requestHandle),new Promise((function(t,n){e.requestHandle.then(t).fail((function(t){"abort"!==t.statusText&&(console.log("Warning: the ".concat($.param(e.getParams)," request failed!")),n(t))}))}))}},{key:"abort",value:function(){this.requestHandle&&"function"===typeof this.requestHandle.abort&&(this.requestHandle.abort(),this.requestHandle=null)}},{key:"buildAjaxCall",value:function(){var e=this,t=this,n=this.mixinDefaultGetParams(this.getParams),r=this.getUrl;"?"!==r[r.length-1]&&(r+="&"),n.segment&&(r="".concat(r,"segment=").concat(n.segment,"&"),delete n.segment),n.date&&(r="".concat(r,"date=").concat(decodeURIComponent(n.date.toString()),"&"),delete n.date),r+=$.param(n);var a={type:"POST",async:!0,url:r,dataType:this.format||"json",complete:this.completeCallback,error:function(){if(window.globalAjaxQueue.active-=1,t.errorCallback){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.errorCallback.apply(this,n)}},success:function(t,n,r){if(e.loadingElement&&$(e.loadingElement).hide(),t&&"error"===t.result&&!e.useRegularCallbackInCaseOfError){var a=null,o="toast";if($(e.errorElement).length&&t.message&&($(e.errorElement).show(),a=e.errorElement,o=null),t.message){var i=window["require"]("piwik/UI"),c=new i.Notification;c.show(t.message,{placeat:a,context:"error",type:o,id:"ajaxHelper"}),c.scrollToNotification()}}else e.callback&&e.callback(t,n,r);window.globalAjaxQueue.active-=1,D.ajaxRequestFinished&&D.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return $.ajax(a)}},{key:"isRequestToApiMethod",value:function(){return this.getParams&&"API"===this.getParams.module&&this.getParams.method||this.postParams&&"API"===this.postParams.module&&this.postParams.method}},{key:"isWidgetizedRequest",value:function(){return"Widgetize"===broadcast.getValueFromUrl("module")}},{key:"getDefaultPostParams",value:function(){return this.withToken||this.isRequestToApiMethod()||D.shouldPropagateTokenAuth?{token_auth:D.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}},{key:"mixinDefaultPostParams",value:function(e){var t=this.getDefaultPostParams(),n=Se(Se({},t),e);return n}},{key:"mixinDefaultGetParams",value:function(e){var t=this,n=ke.getSearchParam("segment"),r={idSite:D.idSite?D.idSite.toString():broadcast.getValueFromUrl("idSite"),period:D.period||broadcast.getValueFromUrl("period"),segment:n},a=e;return a.token_auth&&(a.token_auth=null,delete a.token_auth),Object.keys(r).forEach((function(e){t.useGETDefaultParameter(e)&&!a[e]&&!t.postParams[e]&&r[e]&&(a[e]=r[e])})),!this.useGETDefaultParameter("date")||a.date||this.postParams.date||(a.date=D.currentDateString),a}}],[{key:"fetch",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new e;return n.withTokenInUrl&&r.withTokenInUrl(),r.setFormat("json"),r.addParams(Se({module:"API",format:"json"},t),"get"),n.postParams&&r.addParams(n.postParams,"post"),r.send()}}]),e}();function $e(){return globalAjaxQueue}window.ajaxHelper=Ne,angular.module("piwikApp.service").service("globalAjaxQueue",$e);
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */var Ae={mounted:function(e,t){var n={};$(e).addClass("matomo-dropdown-menu");var r=!!$(e).parent().closest(".dropdown-content").length;r&&(n={hover:!0},$(e).addClass("submenu"),$(t.value.activates).addClass("submenu-dropdown-content"),$(e).parents(".dropdown-content").addClass("submenu-container")),$(e).dropdown(n)}};
+ */var Be={mounted:function(e,t){var n={};$(e).addClass("matomo-dropdown-menu");var r=!!$(e).parent().closest(".dropdown-content").length;r&&(n={hover:!0},$(e).addClass("submenu"),$(t.value.activates).addClass("submenu-dropdown-content"),$(e).parents(".dropdown-content").addClass("submenu-container")),$(e).dropdown(n)}};
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function Be(e){return{restrict:"A",link:function(t,n,r){var a={instance:null,value:{activates:$("#".concat(r.activates))[0]},oldValue:null,modifiers:{},dir:{}};e((function(){Ae.mounted(n[0],a)}))}}}
+ */function He(e){return{restrict:"A",link:function(t,n,r){var a={instance:null,value:{activates:$("#".concat(r.activates))[0]},oldValue:null,modifiers:{},dir:{}};e((function(){Be.mounted(n[0],a)}))}}}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-function Me(e,t,n){var r=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,r||e.contains(n.target)||t.value&&t.value.blur()}function Ne(e,t){t.value.hasScrolled=!0}function Fe(e,t){t.value.isMouseDown=!0,t.value.hasScrolled=!1}function Ve(e,t,n){27===n.which&&setTimeout((function(){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.blur&&t.value.blur()}),0)}Be.$inject=["$timeout"],angular.module("piwikApp").directive("piwikDropdownMenu",Be);var Le=document.documentElement,Re={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onEscapeHandler=Ve.bind(null,e,t),t.value.onMouseDown=Fe.bind(null,e,t),t.value.onClickOutsideElement=Me.bind(null,e,t),t.value.onScroll=Ne.bind(null,e,t),Le.addEventListener("keyup",t.value.onEscapeHandler),Le.addEventListener("mousedown",t.value.onMouseDown),Le.addEventListener("mouseup",t.value.onClickOutsideElement),Le.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){Le.removeEventListener("keyup",t.value.onEscapeHandler),Le.removeEventListener("mousedown",t.value.onMouseDown),Le.removeEventListener("mouseup",t.value.onClickOutsideElement),Le.removeEventListener("scroll",t.value.onScroll)}};
+function Ae(e,t,n){var r=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,r||e.contains(n.target)||t.value&&t.value.blur()}function Me(e,t){t.value.hasScrolled=!0}function Fe(e,t){t.value.isMouseDown=!0,t.value.hasScrolled=!1}function Ve(e,t,n){27===n.which&&setTimeout((function(){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.blur&&t.value.blur()}),0)}He.$inject=["$timeout"],angular.module("piwikApp").directive("piwikDropdownMenu",He);var Le=document.documentElement,Re={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onEscapeHandler=Ve.bind(null,e,t),t.value.onMouseDown=Fe.bind(null,e,t),t.value.onClickOutsideElement=Ae.bind(null,e,t),t.value.onScroll=Me.bind(null,e,t),Le.addEventListener("keyup",t.value.onEscapeHandler),Le.addEventListener("mousedown",t.value.onMouseDown),Le.addEventListener("mouseup",t.value.onClickOutsideElement),Le.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){Le.removeEventListener("keyup",t.value.onEscapeHandler),Le.removeEventListener("mousedown",t.value.onMouseDown),Le.removeEventListener("mouseup",t.value.onClickOutsideElement),Le.removeEventListener("scroll",t.value.onScroll)}};
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-function Ue(){return{restrict:"A",link:function(e,t,n){var r={instance:null,value:{blur:function(){setTimeout((function(){e.$apply(n.piwikFocusAnywhereButHere)}),0)}},oldValue:null,modifiers:{},dir:{}};Re.mounted(t[0],r),t.on("$destroy",(function(){return Re.unmounted(t[0],r)}))}}}Ue.$inject=[],angular.module("piwikApp.directive").directive("piwikFocusAnywhereButHere",Ue);
+function Ue(){return{restrict:"A",link:function(e,t,n){var r={instance:null,value:{blur:function(){setTimeout((function(){e.$apply(n.piwikFocusAnywhereButHere)}),0)}},oldValue:null,modifiers:{},dir:{}};Re.mounted(t[0],r),t.on("$destroy",(function(){return Re.unmounted(t[0],r)}))}}}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */var _e={updated:function(e,t){t.value.focusIf&&setTimeout((function(){e.focus(),t.value.afterFocus&&t.value.afterFocus()}),5)}};
+ */
+function _e(e,t){t.arg&&setTimeout((function(){e.focus(),t.value.afterFocus&&t.value.afterFocus()}),5)}Ue.$inject=[],angular.module("piwikApp.directive").directive("piwikFocusAnywhereButHere",Ue);var Je={mounted:function(e,t){_e(e,t)},updated:function(e,t){_e(e,t)}};
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function Je(){return{restrict:"A",link:function(e,t,n){e.$watch(n.piwikFocusIf,(function(n){var r={instance:null,value:{focusIf:!!n,afterFocus:function(){return e.$apply()}},oldValue:null,modifiers:{},dir:{}};_e.updated(t[0],r)}))}}}
+ */function Ge(){return{restrict:"A",link:function(e,t,n){e.$watch(n.piwikFocusIf,(function(n){var r={instance:null,arg:n?"1":void 0,value:{afterFocus:function(){return e.$apply()}},oldValue:null,modifiers:{},dir:{}};Je.updated(t[0],r)}))}}}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-function qe(e){e.classList.toggle("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&j.helper.setMarginLeftToBeInViewport(t)}function Ge(e,t,n){var r=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,r||e.contains(n.target)||e.classList.remove("expanded")}function Qe(e){e.value.hasScrolled=!0}function ze(e){e.value.isMouseDown=!0,e.value.hasScrolled=!1}function Ye(e,t,n){27===n.which&&(t.value.isMouseDown=!1,t.value.hasScrolled=!1,e.classList.remove("expanded"))}angular.module("piwikApp.directive").directive("piwikFocusIf",Je);var We=document.documentElement,Ke={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onExpand=qe.bind(null,e),t.value.onEscapeHandler=Ye.bind(null,e,t),t.value.onMouseDown=ze.bind(null,t),t.value.onClickOutsideElement=Ge.bind(null,e,t),t.value.onScroll=Qe.bind(null,t),t.value.expander.addEventListener("click",t.value.onExpand),We.addEventListener("keyup",t.value.onEscapeHandler),We.addEventListener("mousedown",t.value.onMouseDown),We.addEventListener("mouseup",t.value.onClickOutsideElement),We.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){t.value.expander.removeEventListener("click",t.value.onExpand),We.removeEventListener("keyup",t.value.onEscapeHandler),We.removeEventListener("mousedown",t.value.onMouseDown),We.removeEventListener("mouseup",t.value.onClickOutsideElement),We.removeEventListener("scroll",t.value.onScroll)}};
+function qe(e){e.classList.toggle("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&D.helper.setMarginLeftToBeInViewport(t)}function ze(e,t,n){var r=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,r||e.contains(n.target)||e.classList.remove("expanded")}function Qe(e){e.value.hasScrolled=!0}function Ye(e){e.value.isMouseDown=!0,e.value.hasScrolled=!1}function We(e,t,n){27===n.which&&(t.value.isMouseDown=!1,t.value.hasScrolled=!1,e.classList.remove("expanded"))}angular.module("piwikApp.directive").directive("piwikFocusIf",Ge);var Ke=document.documentElement,Xe={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onExpand=qe.bind(null,e),t.value.onEscapeHandler=We.bind(null,e,t),t.value.onMouseDown=Ye.bind(null,t),t.value.onClickOutsideElement=ze.bind(null,e,t),t.value.onScroll=Qe.bind(null,t),t.value.expander.addEventListener("click",t.value.onExpand),Ke.addEventListener("keyup",t.value.onEscapeHandler),Ke.addEventListener("mousedown",t.value.onMouseDown),Ke.addEventListener("mouseup",t.value.onClickOutsideElement),Ke.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){t.value.expander.removeEventListener("click",t.value.onExpand),Ke.removeEventListener("keyup",t.value.onEscapeHandler),Ke.removeEventListener("mousedown",t.value.onMouseDown),Ke.removeEventListener("mouseup",t.value.onClickOutsideElement),Ke.removeEventListener("scroll",t.value.onScroll)}};
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-function Xe(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};Ke.mounted(t[0],n),t.on("$destroy",(function(){return Ke.unmounted(t[0],n)}))}}}
+function Ze(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};Xe.mounted(t[0],n),t.on("$destroy",(function(){return Xe.unmounted(t[0],n)}))}}}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-function Ze(e){e.classList.add("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&j.helper.setMarginLeftToBeInViewport(t)}function et(e){e.classList.remove("expanded")}function tt(e,t){e.contains(t.target)||e.classList.remove("expanded")}function nt(e,t){27===t.which&&e.classList.remove("expanded")}Xe.$inject=[],angular.module("piwikApp").directive("piwikExpandOnClick",Xe);var rt=document.documentElement,at={mounted:function(e,t){t.value.onMouseEnter=Ze.bind(null,e),t.value.onMouseLeave=et.bind(null,e),t.value.onClickOutsideElement=tt.bind(null,e),t.value.onEscapeHandler=nt.bind(null,e),t.value.expander.addEventListener("mouseenter",t.value.onMouseEnter),e.addEventListener("mouseleave",t.value.onMouseLeave),rt.addEventListener("keyup",t.value.onEscapeHandler),rt.addEventListener("mouseup",t.value.onClickOutsideElement)},unmounted:function(e,t){t.value.expander.removeEventListener("mouseenter",t.value.onMouseEnter),e.removeEventListener("mouseleave",t.value.onMouseLeave),document.removeEventListener("keyup",t.value.onEscapeHandler),document.removeEventListener("mouseup",t.value.onClickOutsideElement)}};
+function et(e){e.classList.add("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&D.helper.setMarginLeftToBeInViewport(t)}function tt(e){e.classList.remove("expanded")}function nt(e,t){e.contains(t.target)||e.classList.remove("expanded")}function rt(e,t){27===t.which&&e.classList.remove("expanded")}Ze.$inject=[],angular.module("piwikApp").directive("piwikExpandOnClick",Ze);var at=document.documentElement,ot={mounted:function(e,t){t.value.onMouseEnter=et.bind(null,e),t.value.onMouseLeave=tt.bind(null,e),t.value.onClickOutsideElement=nt.bind(null,e),t.value.onEscapeHandler=rt.bind(null,e),t.value.expander.addEventListener("mouseenter",t.value.onMouseEnter),e.addEventListener("mouseleave",t.value.onMouseLeave),at.addEventListener("keyup",t.value.onEscapeHandler),at.addEventListener("mouseup",t.value.onClickOutsideElement)},unmounted:function(e,t){t.value.expander.removeEventListener("mouseenter",t.value.onMouseEnter),e.removeEventListener("mouseleave",t.value.onMouseLeave),document.removeEventListener("keyup",t.value.onEscapeHandler),document.removeEventListener("mouseup",t.value.onClickOutsideElement)}};
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-function ot(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};at.mounted(t[0],n),t.on("$destroy",(function(){return at.unmounted(t[0],n)}))}}}ot.$inject=[],angular.module("piwikApp").directive("piwikExpandOnHover",ot);var it={ref:"root"};function lt(e,t,n,r,a,i){return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",it,[Object(o["renderSlot"])(e.$slots,"default")],512)),[[o["vShow"],e.modelValue]])}var ct=Object(o["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},element:{type:HTMLElement,required:!1}},emits:["yes","no","closeEnd","close","update:modelValue"],activated:function(){this.$emit("update:modelValue",!1)},watch:{modelValue:function(e,t){var n=this;if(e){var r=this.element||this.$refs.root.firstElementChild;j.helper.modalConfirm(r,{yes:function(){n.$emit("yes")},no:function(){n.$emit("no")},validation:function(){n.$emit("validation")}},{onCloseEnd:function(){n.element||n.$refs.root.appendChild(r),n.$emit("update:modelValue",!1),n.$emit("closeEnd")}})}else!1===e&&!0===t&&this.$emit("close")}}});ct.render=lt;var st=ct;function ut(e,t){return ht(e)||mt(e,t)||pt(e,t)||dt()}function dt(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function pt(e,t){if(e){if("string"===typeof e)return ft(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ft(e,t):void 0}}function ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mt(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done);i=!0)if(o.push(r.value),t&&o.length===t)break}catch(c){l=!0,a=c}finally{try{i||null==n["return"]||n["return"]()}finally{if(l)throw a}}return o}}function ht(e){if(Array.isArray(e))return e}
+function it(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};ot.mounted(t[0],n),t.on("$destroy",(function(){return ot.unmounted(t[0],n)}))}}}it.$inject=[],angular.module("piwikApp").directive("piwikExpandOnHover",it);var ct={ref:"root"};function st(e,t,n,r,a,i){return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ct,[Object(o["renderSlot"])(e.$slots,"default")],512)),[[o["vShow"],e.modelValue]])}var lt=Object(o["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},element:{type:HTMLElement,required:!1}},emits:["yes","no","closeEnd","close","update:modelValue"],activated:function(){this.$emit("update:modelValue",!1)},watch:{modelValue:function(e,t){var n=this;if(e){var r=this.element||this.$refs.root.firstElementChild;D.helper.modalConfirm(r,{yes:function(){n.$emit("yes")},no:function(){n.$emit("no")},validation:function(){n.$emit("validation")}},{onCloseEnd:function(){n.element||n.$refs.root.appendChild(r),n.$emit("update:modelValue",!1),n.$emit("closeEnd")}})}else!1===e&&!0===t&&this.$emit("close")}}});lt.render=st;var ut=lt;function dt(e,t){return vt(e)||ht(e,t)||ft(e,t)||pt()}function pt(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ft(e,t){if(e){if("string"===typeof e)return mt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mt(e,t):void 0}}function mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ht(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done);i=!0)if(o.push(r.value),t&&o.length===t)break}catch(s){c=!0,a=s}finally{try{i||null==n["return"]||n["return"]()}finally{if(c)throw a}}return o}}function vt(e){if(Array.isArray(e))return e}
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */var gt=0;function bt(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())}))}function yt(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))}function wt(e){var t=e.component,n=e.scope,r=void 0===n?{}:n,a=e.events,i=void 0===a?{}:a,c=e.$inject,s=e.directiveName,l=e.transclude,u=e.mountPointFactory,d=e.postCreate,p=e.noScope,f=e.restrict,m=void 0===f?"A":f,h=gt;l&&(gt+=1);var v={};function g(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];var c={restrict:m,scope:p?void 0:v,compile:function(){return{post:function(e,a,c){var s=l?a.find("[ng-transclude][counter=".concat(h,"]")):null,p="<root-component";Object.entries(i).forEach((function(e){var t=dt(e,1),n=t[0];p+=" @".concat(n,"=\"onEventHandler('").concat(n,"', $event)\"")})),Object.entries(r).forEach((function(e){var t=dt(e,2),n=t[0],r=t[1];if("&"===r.angularJsBind){var a=bt(n);i[a]||(p+=" @".concat(a,"=\"onEventHandler('").concat(a,"', $event)\""))}else p+=" :".concat(r.vue,'="').concat(r.vue,'"')})),p+=">",l&&(p+='<div ref="transcludeTarget"/>'),p+="</root-component>";var f=Object(o["createApp"])({template:p,data:function(){var t={};return Object.entries(r).forEach((function(r){var o=dt(r,2),i=o[0],s=o[1],l=e[i];"undefined"===typeof l&&"undefined"!==typeof s.default&&(l=s.default instanceof Function?s.default.apply(s,[e,a,c].concat(n)):s.default),s.transform&&(l=s.transform(l)),t[s.vue]=l})),t},setup:function(){if(l){var e=Object(o["ref"])(null);return{transcludeTarget:e}}},methods:{onEventHandler:function(t,r){var o=yt(t);e[o]&&e[o](r),i[t]&&i[t].apply(i,[r,e,a,c].concat(n))}}});f.config.globalProperties.$sanitize=window.vueSanitize,f.config.globalProperties.translate=C,f.component("root-component",t);var m=u?u.apply(void 0,[e,a,c].concat(n)):a[0],v=f.mount(m);Object.entries(r).forEach((function(t){var r=dt(t,2),o=r[0],i=r[1];i.angularJsBind&&"&"!==i.angularJsBind&&e.$watch(o,(function(t){var r=t;"undefined"!==typeof i.default&&"undefined"===typeof t&&(r=i.default instanceof Function?i.default.apply(i,[e,a,c].concat(n)):i.default),i.transform&&(r=i.transform(r)),v[o]=r}))})),l&&$(v.transcludeTarget).append(s),d&&d.apply(void 0,[v,e,a,c].concat(n)),a.on("$destroy",(function(){f.unmount()}))}}}};return l&&(c.transclude=!0,c.template='<div ng-transclude counter="'.concat(h,'"/>')),c}return Object.entries(r).forEach((function(e){var t=dt(e,2),n=t[0],r=t[1];r.vue||(r.vue=n),r.angularJsBind&&(v[n]=r.angularJsBind)})),g.$inject=c||[],angular.module("piwikApp").directive(s,g),g}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */var vt=0;function gt(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())}))}function bt(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))}function yt(e){var t=e.component,n=e.scope,r=void 0===n?{}:n,a=e.events,i=void 0===a?{}:a,l=e.$inject,c=e.directiveName,s=e.transclude,u=e.mountPointFactory,d=e.postCreate,p=e.noScope,f=e.restrict,m=void 0===f?"A":f,h=vt;s&&(vt+=1);var v={};function g(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];var l={restrict:m,scope:p?void 0:v,compile:function(){return{post:function(e,a,l){var c=s?a.find("[ng-transclude][counter=".concat(h,"]")):null,p="<root-component";Object.entries(i).forEach((function(e){var t=ut(e,1),n=t[0];p+=" @".concat(n,"=\"onEventHandler('").concat(n,"', $event)\"")})),Object.entries(r).forEach((function(e){var t=ut(e,2),n=t[0],r=t[1];if("&"===r.angularJsBind){var a=gt(n);i[a]||(p+=" @".concat(a,"=\"onEventHandler('").concat(a,"', $event)\""))}else p+=" :".concat(r.vue,'="').concat(r.vue,'"')})),p+=">",s&&(p+='<div ref="transcludeTarget"/>'),p+="</root-component>";var f=Object(o["createApp"])({template:p,data:function(){var t={};return Object.entries(r).forEach((function(r){var o=ut(r,2),i=o[0],c=o[1],s=e[i];"undefined"===typeof s&&"undefined"!==typeof c.default&&(s=c.default instanceof Function?c.default.apply(c,[e,a,l].concat(n)):c.default),t[c.vue]=s})),t},setup:function(){if(s){var e=Object(o["ref"])(null);return{transcludeTarget:e}}},methods:{onEventHandler:function(t,r){var o=bt(t);e[o]&&e[o](r),i[t]&&i[t].apply(i,[r,e,a,l].concat(n))}}});f.config.globalProperties.$sanitize=window.vueSanitize,f.config.globalProperties.translate=C,f.component("root-component",t);var m=u?u.apply(void 0,[e,a,l].concat(n)):a[0],v=f.mount(m);Object.entries(r).forEach((function(t){var r=ut(t,2),o=r[0],i=r[1];i.angularJsBind&&"&"!==i.angularJsBind&&e.$watch(o,(function(t){"undefined"!==typeof i.default&&"undefined"===typeof t?v[o]=i.default instanceof Function?i.default.apply(i,[e,a,l].concat(n)):i.default:v[o]=t}))})),s&&$(v.transcludeTarget).append(c),d&&d.apply(void 0,[v,e,a,l].concat(n)),a.on("$destroy",(function(){f.unmount()}))}}}};return s&&(l.transclude=!0,l.template='<div ng-transclude counter="'.concat(h,'"/>')),l}return Object.entries(r).forEach((function(e){var t=ut(e,2),n=t[0],r=t[1];r.vue||(r.vue=n),r.angularJsBind&&(v[n]=r.angularJsBind)})),g.$inject=l||[],angular.module("piwikApp").directive(c,g),g}
+ */wt({component:ut,scope:{show:{vue:"modelValue",default:!1},element:{default:function(e,t){return t[0]}}},events:{yes:function(e,t,n,r){r.yes&&(t.$eval(r.yes),setTimeout((function(){t.$apply()}),0))},no:function(e,t,n,r){r.no&&(t.$eval(r.no),setTimeout((function(){t.$apply()}),0))},validation:function(e,t,n,r){r.no&&(t.$eval(r.no),setTimeout((function(){t.$apply()}),0))},close:function(e,t,n,r){r.close&&(t.$eval(r.close),setTimeout((function(){t.$apply()}),0))},"update:modelValue":function(e,t,n,r,a){setTimeout((function(){t.$apply(a(r.piwikDialog).assign(t,e))}),0)}},$inject:["$parse"],directiveName:"piwikDialog",transclude:!0,mountPointFactory:function(e,t){var n=$('<div class="vue-placeholder"/>');return n.appendTo(t),n[0]},postCreate:function(e,t,n,r){t.$watch(r.piwikDialog,(function(t,n){n!==t&&(e.modelValue=t||!1)}))},noScope:!0});var kt={key:0,class:"title",tabindex:"6"},Ot=["href","title"],jt={class:"iconsBar"},Dt=["href","title"],Ct=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),St=[Ct],Pt=["title"],Et=Object(o["createElementVNode"])("span",{class:"icon-info"},null,-1),Tt=[Et],xt={class:"ratingIcons"},It={class:"inlineHelp"},Nt=["innerHTML"],$t=["href"];function Bt(e,t,n,r,a,i){var c=Object(o["resolveComponent"])("RateFeature");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"enrichedHeadline",onMouseenter:t[1]||(t[1]=function(t){return e.showIcons=!0}),onMouseleave:t[2]||(t[2]=function(t){return e.showIcons=!1}),ref:"root"},[e.editUrl?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",kt,[Object(o["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.$sanitize(e.actualFeatureName))},[Object(o["renderSlot"])(e.$slots,"default")],8,Ot)):Object(o["createCommentVNode"])("",!0),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",jt,[e.helpUrl&&!e.actualInlineHelp?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},St,8,Dt)):Object(o["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=function(t){return e.showInlineHelp=!e.showInlineHelp}),class:Object(o["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},Tt,10,Pt)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",xt,[Object(o["createVNode"])(c,{title:e.actualFeatureName},null,8,["title"])])],512),[[o["vShow"],e.showIcons||e.showInlineHelp]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",It,[Object(o["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,Nt),e.helpUrl?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(o["toDisplayString"])(e.translate("General_MoreDetails")),9,$t)):Object(o["createCommentVNode"])("",!0)],512),[[o["vShow"],e.showInlineHelp]])],544)}var Ht=Object(o["defineAsyncComponent"])((function(){return new Promise((function(e){window.$(document).ready((function(){e(window.Feedback.RateFeature)}))}))})),At=Object(o["defineComponent"])({props:{helpUrl:{type:String,default:""},editUrl:{type:String,default:""},reportGenerated:String,featureName:String,inlineHelp:String},components:{RateFeature:Ht},data:function(){return{showIcons:!1,showInlineHelp:!1,actualFeatureName:this.featureName,actualInlineHelp:this.inlineHelp}},watch:{inlineHelp:function(e){this.actualInlineHelp=e},featureName:function(e){this.actualFeatureName=e}},mounted:function(){var e=this,t=this.$refs.root;setTimeout((function(){if(!e.actualInlineHelp){var n=t.querySelector(".title .inlineHelp");if(!n&&t.parentElement.nextElementSibling&&(n=t.parentElement.nextElementSibling.querySelector(".reportDocumentation")),n){var r=n.getAttribute("data-content").trim();r.length&&(e.actualInlineHelp="<p>".concat(r,"</p>"),setTimeout((function(){return n.remove()}),0))}}e.actualFeatureName||(e.actualFeatureName=t.querySelector(".title").textContent),e.reportGenerated&&p.parse(D.period,D.currentDateString).containsToday()&&window.$(t.querySelector(".report-generated")).tooltip({track:!0,content:e.reportGenerated,items:"div",show:!1,hide:!1})}))}});At.render=Bt;var Mt=At,Ft=(wt({component:Mt,scope:{helpUrl:{angularJsBind:"@"},editUrl:{angularJsBind:"@"},reportGenerated:{angularJsBind:"@?"},featureName:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@?"}},directiveName:"piwikEnrichedHeadline",transclude:!0}),{class:"card",ref:"root"}),Vt={class:"card-content"},Lt={key:0,class:"card-title"},Rt={key:1,class:"card-title"},Ut={ref:"content"};
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */yt({component:st,scope:{show:{vue:"modelValue",default:!1},element:{default:function(e,t){return t[0]}}},events:{yes:function(e,t,n,r){r.yes&&(t.$eval(r.yes),setTimeout((function(){t.$apply()}),0))},no:function(e,t,n,r){r.no&&(t.$eval(r.no),setTimeout((function(){t.$apply()}),0))},validation:function(e,t,n,r){r.no&&(t.$eval(r.no),setTimeout((function(){t.$apply()}),0))},close:function(e,t,n,r){r.close&&(t.$eval(r.close),setTimeout((function(){t.$apply()}),0))},"update:modelValue":function(e,t,n,r,a){setTimeout((function(){t.$apply(a(r.piwikDialog).assign(t,e))}),0)}},$inject:["$parse"],directiveName:"piwikDialog",transclude:!0,mountPointFactory:function(e,t){var n=$('<div class="vue-placeholder"/>');return n.appendTo(t),n[0]},postCreate:function(e,t,n,r){t.$watch(r.piwikDialog,(function(t,n){n!==t&&(e.modelValue=t||!1)}))},noScope:!0});var wt={key:0,class:"title",tabindex:"6"},kt=["href","title"],Dt={class:"iconsBar"},Ot=["href","title"],jt=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),Ct=[jt],Pt=["title"],St=Object(o["createElementVNode"])("span",{class:"icon-info"},null,-1),Et=[St],Tt={class:"ratingIcons"},xt={class:"inlineHelp"},It=["innerHTML"],$t=["href"];function Ht(e,t,n,r,a,i){var l=Object(o["resolveComponent"])("RateFeature");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"enrichedHeadline",onMouseenter:t[1]||(t[1]=function(t){return e.showIcons=!0}),onMouseleave:t[2]||(t[2]=function(t){return e.showIcons=!1}),ref:"root"},[e.editUrl?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",wt,[Object(o["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.$sanitize(e.actualFeatureName))},[Object(o["renderSlot"])(e.$slots,"default")],8,kt)):Object(o["createCommentVNode"])("",!0),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",Dt,[e.helpUrl&&!e.actualInlineHelp?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},Ct,8,Ot)):Object(o["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=function(t){return e.showInlineHelp=!e.showInlineHelp}),class:Object(o["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},Et,10,Pt)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Tt,[Object(o["createVNode"])(l,{title:e.actualFeatureName},null,8,["title"])])],512),[[o["vShow"],e.showIcons||e.showInlineHelp]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",xt,[Object(o["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,It),e.helpUrl?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(o["toDisplayString"])(e.translate("General_MoreDetails")),9,$t)):Object(o["createCommentVNode"])("",!0)],512),[[o["vShow"],e.showInlineHelp]])],544)}var At=Object(o["defineAsyncComponent"])((function(){return new Promise((function(e){window.$(document).ready((function(){e(window.Feedback.RateFeature)}))}))})),Bt=Object(o["defineComponent"])({props:{helpUrl:{type:String,default:""},editUrl:{type:String,default:""},reportGenerated:String,featureName:String,inlineHelp:String},components:{RateFeature:At},data:function(){return{showIcons:!1,showInlineHelp:!1,actualFeatureName:this.featureName,actualInlineHelp:this.inlineHelp}},watch:{inlineHelp:function(e){this.actualInlineHelp=e},featureName:function(e){this.actualFeatureName=e}},mounted:function(){var e=this,t=this.$refs.root;setTimeout((function(){if(!e.actualInlineHelp){var n=t.querySelector(".title .inlineHelp");if(!n&&t.parentElement.nextElementSibling&&(n=t.parentElement.nextElementSibling.querySelector(".reportDocumentation")),n){var r=n.getAttribute("data-content").trim();r.length&&(e.actualInlineHelp="<p>".concat(r,"</p>"),setTimeout((function(){return n.remove()}),0))}}e.actualFeatureName||(e.actualFeatureName=t.querySelector(".title").textContent),e.reportGenerated&&p.parse(j.period,j.currentDateString).containsToday()&&window.$(t.querySelector(".report-generated")).tooltip({track:!0,content:e.reportGenerated,items:"div",show:!1,hide:!1})}))}});Bt.render=Ht;var Mt=Bt,Nt=(yt({component:Mt,scope:{helpUrl:{angularJsBind:"@"},editUrl:{angularJsBind:"@"},reportGenerated:{angularJsBind:"@?"},featureName:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@?"}},directiveName:"piwikEnrichedHeadline",transclude:!0}),{class:"card",ref:"root"}),Ft={class:"card-content"},Vt={key:0,class:"card-title"},Lt={key:1,class:"card-title"},Rt={ref:"content"};
+ */function _t(e,t,n,r,a,i){var c=Object(o["resolveComponent"])("EnrichedHeadline");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ft,[Object(o["createElementVNode"])("div",Vt,[!e.contentTitle||e.actualFeature||e.helpUrl||e.actualHelpText?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",Lt,Object(o["toDisplayString"])(e.contentTitle),1)),e.contentTitle&&(e.actualFeature||e.helpUrl||e.actualHelpText)?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",Rt,[Object(o["createVNode"])(c,{"feature-name":e.actualFeature,"help-url":e.helpUrl,"inline-help":e.actualHelpText},{default:Object(o["withCtx"])((function(){return[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.contentTitle),1)]})),_:1},8,["feature-name","help-url","inline-help"])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Ut,[Object(o["renderSlot"])(e.$slots,"default")],512)])],512)}var Jt=null,Gt=Object(o["defineComponent"])({props:{contentTitle:String,feature:String,helpUrl:String,helpText:String,anchor:String},components:{EnrichedHeadline:Mt},data:function(){return{actualFeature:this.feature,actualHelpText:this.helpText}},watch:{feature:function(e){this.actualFeature=e},helpText:function(e){this.actualHelpText=e}},mounted:function(){var e,t=this,n=this.$refs,r=n.root,a=n.content;if(this.anchor){var o=document.createElement("a");o.id=this.anchor,r.parentElement.prepend(o)}if(setTimeout((function(){var e=a.querySelector(".contentHelp");e&&(t.actualHelpText=e.innerHTML,e.remove())}),0),!this.actualFeature||!0!==this.actualFeature&&"true"!==this.actualFeature||(this.actualFeature=this.contentTitle),null===Jt&&(Jt=document.querySelector("#content.admin")),Jt&&(e=Jt.offsetTop),e||0===e){var i=r.closest("[piwik-widget-loader]"),c=i?i.offsetTop:r.offsetTop;c-e<17&&(r.style.marginTop=0)}}});Gt.render=_t;var qt=Gt;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function Ut(e,t,n,r,a,i){var l=Object(o["resolveComponent"])("EnrichedHeadline");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Nt,[Object(o["createElementVNode"])("div",Ft,[!e.contentTitle||e.actualFeature||e.helpUrl||e.actualHelpText?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",Vt,Object(o["toDisplayString"])(e.contentTitle),1)),e.contentTitle&&(e.actualFeature||e.helpUrl||e.actualHelpText)?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",Lt,[Object(o["createVNode"])(l,{"feature-name":e.actualFeature,"help-url":e.helpUrl,"inline-help":e.actualHelpText},{default:Object(o["withCtx"])((function(){return[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.contentTitle),1)]})),_:1},8,["feature-name","help-url","inline-help"])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Rt,[Object(o["renderSlot"])(e.$slots,"default")],512)])],512)}var _t=null,Jt=Object(o["defineComponent"])({props:{contentTitle:String,feature:String,helpUrl:String,helpText:String,anchor:String},components:{EnrichedHeadline:Mt},data:function(){return{actualFeature:this.feature,actualHelpText:this.helpText}},watch:{feature:function(e){this.actualFeature=e},helpText:function(e){this.actualHelpText=e}},mounted:function(){var e,t=this,n=this.$refs,r=n.root,a=n.content;if(this.anchor){var o=document.createElement("a");o.id=this.anchor,r.parentElement.prepend(o)}if(setTimeout((function(){var e=a.querySelector(".contentHelp");e&&(t.actualHelpText=e.innerHTML,e.remove())}),0),!this.actualFeature||!0!==this.actualFeature&&"true"!==this.actualFeature||(this.actualFeature=this.contentTitle),null===_t&&(_t=document.querySelector("#content.admin")),_t&&(e=_t.offsetTop),e||0===e){var i=r.closest("[piwik-widget-loader]"),l=i?i.offsetTop:r.offsetTop;l-e<17&&(r.style.marginTop=0)}}});Jt.render=Ut;var qt=Jt;
+ */wt({component:qt,scope:{contentTitle:{angularJsBind:"@"},feature:{angularJsBind:"@"},helpUrl:{angularJsBind:"@"},helpText:{angularJsBind:"@"},anchor:{angularJsBind:"@?"}},directiveName:"piwikContentBlock",transclude:!0});function zt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yt(e,t,n){return t&&Qt(e.prototype,t),n&&Qt(e,n),e}function Wt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */yt({component:qt,scope:{contentTitle:{angularJsBind:"@"},feature:{angularJsBind:"@"},helpUrl:{angularJsBind:"@"},helpText:{angularJsBind:"@"},anchor:{angularJsBind:"@?"}},directiveName:"piwikContentBlock",transclude:!0});function Gt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zt(e,t,n){return t&&Qt(e.prototype,t),n&&Qt(e,n),e}function Yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+ */var Kt=function(){function e(){var t=this;zt(this,e),Wt(this,"segmentState",Object(o["reactive"])({availableSegments:[]})),D.on("piwikSegmentationInited",(function(){return t.setSegmentState()}))}return Yt(e,[{key:"state",get:function(){return Object(o["readonly"])(this.segmentState)}},{key:"setSegmentState",value:function(){try{var e=$(".segmentEditorPanel").data("uiControlObject");this.segmentState.availableSegments=e.impl.availableSegments||[]}catch(t){}}}]),e}(),Xt=new Kt;function Zt(e){return rn(e)||nn(e)||tn(e)||en()}function en(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function tn(e,t){if(e){if("string"===typeof e)return an(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?an(e,t):void 0}}function nn(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function rn(e){if(Array.isArray(e))return an(e)}function an(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function on(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?on(Object(n),!0).forEach((function(t){dn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ln(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function un(e,t,n){return t&&ln(e.prototype,t),n&&ln(e,n),e}function dn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */var Wt=function(){function e(){var t=this;Gt(this,e),Yt(this,"segmentState",Object(o["reactive"])({availableSegments:[]})),j.on("piwikSegmentationInited",(function(){return t.setSegmentState()}))}return zt(e,[{key:"state",get:function(){return Object(o["readonly"])(this.segmentState)}},{key:"setSegmentState",value:function(){try{var e=$(".segmentEditorPanel").data("uiControlObject");this.segmentState.availableSegments=e.impl.availableSegments||[]}catch(t){}}}]),e}(),Kt=new Wt;function Xt(e){return nn(e)||tn(e)||en(e)||Zt()}function Zt(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function en(e,t){if(e){if("string"===typeof e)return rn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rn(e,t):void 0}}function tn(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function nn(e){if(Array.isArray(e))return rn(e)}function rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function an(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function on(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?an(Object(n),!0).forEach((function(t){un(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):an(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ln(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sn(e,t,n){return t&&cn(e.prototype,t),n&&cn(e,n),e}function un(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+ */var pn=8,fn=3;function mn(e){return e?e instanceof Array?e:[e]:[]}var hn=function(){function e(){var t=this;sn(this,e),dn(this,"privateState",Object(o["reactive"])({comparisonsDisabledFor:[]})),dn(this,"state",Object(o["readonly"])(this.privateState)),dn(this,"colors",{}),dn(this,"segmentComparisons",Object(o["computed"])((function(){return t.parseSegmentComparisons()}))),dn(this,"periodComparisons",Object(o["computed"])((function(){return t.parsePeriodComparisons()}))),dn(this,"isEnabled",Object(o["computed"])((function(){return t.checkEnabledForCurrentPage()}))),this.loadComparisonsDisabledFor(),$((function(){t.colors=t.getAllSeriesColors()})),Object(o["watch"])((function(){return t.getComparisons()}),(function(){return D.postEvent("piwikComparisonsChanged")}),{deep:!0})}return un(e,[{key:"getComparisons",value:function(){return this.getSegmentComparisons().concat(this.getPeriodComparisons())}},{key:"isComparing",value:function(){return this.isComparisonEnabled()&&(this.segmentComparisons.value.length>1||this.periodComparisons.value.length>1)}},{key:"isComparingPeriods",value:function(){return this.getPeriodComparisons().length>1}},{key:"getSegmentComparisons",value:function(){return this.isComparisonEnabled()?this.segmentComparisons.value:[]}},{key:"getPeriodComparisons",value:function(){return this.isComparisonEnabled()?this.periodComparisons.value:[]}},{key:"getSeriesColor",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.getComparisonSeriesIndex(t.index,e.index)%pn;if(0===n)return this.colors["series".concat(r)];var a=n%fn;return this.colors["series".concat(r,"-shade").concat(a)]}},{key:"getSeriesColorName",value:function(e,t){var n="series".concat(e%pn);return t>0&&(n+="-shade".concat(t%fn)),n}},{key:"isComparisonEnabled",value:function(){return this.isEnabled.value}},{key:"getIndividualComparisonRowIndices",value:function(e){var t=this.getSegmentComparisons().length,n=e%t,r=Math.floor(e/t);return{segmentIndex:n,periodIndex:r}}},{key:"getComparisonSeriesIndex",value:function(e,t){var n=this.getSegmentComparisons().length;return e*n+t}},{key:"getAllComparisonSeries",value:function(){var e=this,t=[],n=0;return this.getPeriodComparisons().forEach((function(r){e.getSegmentComparisons().forEach((function(a){t.push({index:n,params:cn(cn({},a.params),r.params),color:e.colors["series".concat(n)]}),n+=1}))})),t}},{key:"removeSegmentComparison",value:function(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");var t=Zt(this.segmentComparisons.value);t.splice(e,1);var n={};0===e&&(n.segment=t[0].params.segment),this.updateQueryParamsFromComparisons(t,this.periodComparisons.value,n)}},{key:"addSegmentComparison",value:function(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");var t=this.segmentComparisons.value.concat([{params:e,index:-1,title:""}]);this.updateQueryParamsFromComparisons(t,this.periodComparisons.value)}},{key:"updateQueryParamsFromComparisons",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},a={},o=!1,i=!1;e.forEach((function(e){o?r[e.params.segment]=!0:o=!0})),t.forEach((function(e){i?a["".concat(e.params.period,"|").concat(e.params.date)]=!0:i=!0}));var c=[],s=[];Object.keys(a).forEach((function(e){var t=e.split("|");c.push(t[0]),s.push(t[1])}));var l={compareSegments:Object.keys(r),comparePeriods:c,compareDates:s};if(D.helper.isAngularRenderingThePage()){var u=ke.hashParsed.value,d=cn(cn(cn({},u),l),n);return delete d["compareSegments[]"],delete d["comparePeriods[]"],delete d["compareDates[]"],void(JSON.stringify(d)!==JSON.stringify(u)&&ke.updateHash(d))}var p=[];["compareSegments","comparePeriods","compareDates"].forEach((function(e){l[e].length||p.push(e)}));var f=ke.stringify(n),m=ke.stringify(l);window.broadcast.propagateNewPage(f,void 0,m,p)}},{key:"getAllSeriesColors",value:function(){var e=D.ColorManager;if(!e)return[];for(var t=[],n=0;n<pn;n+=1){t.push("series".concat(n));for(var r=0;r<fn;r+=1)t.push("series".concat(n,"-shade").concat(r))}return e.getColors("comparison-series-color",t)}},{key:"loadComparisonsDisabledFor",value:function(){var e=this,t=ke.parsed.value.module;"CoreUpdater"!==t&&"Installation"!==t?Ne.fetch({module:"API",method:"API.getPagesComparisonsDisabledFor"}).then((function(t){e.privateState.comparisonsDisabledFor=t})):this.privateState.comparisonsDisabledFor=[]}},{key:"parseSegmentComparisons",value:function(){var e=Xt.state.availableSegments,t=Zt(mn(ke.parsed.value.compareSegments));t.unshift(ke.parsed.value.segment||"");var n=[];return t.forEach((function(t,r){var a;e.forEach((function(e){e.definition!==t&&e.definition!==decodeURIComponent(t)&&decodeURIComponent(e.definition)!==t||(a=e)}));var o=a?a.name:C("General_Unknown");""===t.trim()&&(o=C("SegmentEditor_DefaultAllVisits")),n.push({params:{segment:t},title:D.helper.htmlDecode(o),index:r})})),n}},{key:"parsePeriodComparisons",value:function(){var e=Zt(mn(ke.parsed.value.comparePeriods)),t=Zt(mn(ke.parsed.value.compareDates));e.unshift(ke.parsed.value.period),t.unshift(ke.parsed.value.date);for(var n=[],r=0;r<Math.min(t.length,e.length);r+=1){var a=void 0;try{a=p.parse(e[r],t[r]).getPrettyString()}catch(o){a=C("General_Error")}n.push({params:{date:t[r],period:e[r]},title:a,index:r})}return n}},{key:"checkEnabledForCurrentPage",value:function(){var e=ke.parsed.value.category||ke.parsed.value.module,t=ke.parsed.value.subcategory||ke.parsed.value.action,n="".concat(e,".").concat(t),r=-1===this.privateState.comparisonsDisabledFor.indexOf(n)&&-1===this.privateState.comparisonsDisabledFor.indexOf("".concat(e,".*"));return document.documentElement.classList.toggle("comparisonsDisabled",!r),r}}]),e}(),vn=new hn,gn={key:0,ref:"root",class:"matomo-comparisons"},bn={class:"comparison-type"},yn=["title"],wn=["href"],kn=["title"],On={class:"comparison-period-label"},jn=["onClick"],Dn=["title"],Cn={class:"loadingPiwik",style:{display:"none"}},Sn=["alt"];function Pn(e,t,n,r,a,i){return e.isComparing?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",gn,[Object(o["createElementVNode"])("h3",null,Object(o["toDisplayString"])(e.translate("General_Comparisons")),1),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.segmentComparisons,(function(t,n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"comparison card",key:t.index},[Object(o["createElementVNode"])("div",bn,Object(o["toDisplayString"])(e.translate("General_Segment")),1),Object(o["createElementVNode"])("div",{class:"title",title:t.title+"<br/>"+decodeURIComponent(t.params.segment)},[Object(o["createElementVNode"])("a",{target:"_blank",href:e.getUrlToSegment(t.params.segment)},Object(o["toDisplayString"])(t.title),9,wn)],8,yn),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.periodComparisons,(function(n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"comparison-period",key:n.index,title:e.getComparisonTooltip(t,n)},[Object(o["createElementVNode"])("span",{class:"comparison-dot",style:Object(o["normalizeStyle"])({"background-color":e.getSeriesColor(t,n)})},null,4),Object(o["createElementVNode"])("span",On,Object(o["toDisplayString"])(n.title)+" ("+Object(o["toDisplayString"])(e.getComparisonPeriodType(n))+") ",1)],8,kn)})),128)),e.segmentComparisons.length>1?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,class:"remove-button",onClick:function(t){return e.removeSegmentComparison(n)}},[Object(o["createElementVNode"])("span",{class:"icon icon-close",title:e.translate("General_ClickToRemoveComp")},null,8,Dn)],8,jn)):Object(o["createCommentVNode"])("",!0)])})),128)),Object(o["createElementVNode"])("div",Cn,[Object(o["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:e.translate("General_LoadingData")},null,8,Sn),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_LoadingData")),1)])],512)):Object(o["createCommentVNode"])("",!0)}function En(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?En(Object(n),!0).forEach((function(t){xn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):En(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var In=Object(o["defineComponent"])({props:{},data:function(){return{comparisonTooltips:null}},setup:function(){var e=Object(o["computed"])((function(){return vn.isComparing()})),t=Object(o["computed"])((function(){return vn.getSegmentComparisons()})),n=Object(o["computed"])((function(){return vn.getPeriodComparisons()})),r=vn.getSeriesColor.bind(vn);return{isComparing:e,segmentComparisons:t,periodComparisons:n,getSeriesColor:r}},methods:{comparisonHasSegment:function(e){return"undefined"!==typeof e.params.segment},removeSegmentComparison:function(e){window.$(this.$refs.root).tooltip("destroy"),vn.removeSegmentComparison(e)},getComparisonPeriodType:function(e){var t=e.params.period;if("range"===t)return C("CoreHome_PeriodRange");var n=C("Intl_Period".concat(t.substring(0,1).toUpperCase()).concat(t.substring(1)));return n.substring(0,1).toUpperCase()+n.substring(1)},getComparisonTooltip:function(e,t){if(this.comparisonTooltips&&Object.keys(this.comparisonTooltips).length)return(this.comparisonTooltips[t.index]||{})[e.index]},getUrlToSegment:function(e){var t=Tn({},ke.hashParsed.value);return delete t.comparePeriods,delete t.compareDates,delete t.compareSegments,t.segment=e,"".concat(window.location.search,"#?").concat(ke.stringify(t))},setUpTooltips:function(){var e=window,t=e.$;t(this.$refs.root).tooltip({track:!0,content:function(){var e=t(this).attr("title");return window.vueSanitize(e.replace(/\n/g,"<br />"))},show:{delay:200,duration:200},hide:!1})},onComparisonsChanged:function(){var e=this;if(this.comparisonTooltips=null,vn.isComparing()){var t=vn.getPeriodComparisons(),n=vn.getSegmentComparisons();Ne.fetch({method:"API.getProcessedReport",apiModule:"VisitsSummary",apiAction:"get",compare:"1",compareSegments:ke.getSearchParam("compareSegments"),comparePeriods:ke.getSearchParam("comparePeriods"),compareDates:ke.getSearchParam("compareDates"),format_metrics:"1"}).then((function(r){e.comparisonTooltips={},t.forEach((function(t){e.comparisonTooltips[t.index]={},n.forEach((function(n){var a=e.generateComparisonTooltip(r,t,n);e.comparisonTooltips[t.index][n.index]=a}))}))}))}},generateComparisonTooltip:function(e,t,n){if(!e.reportData.comparisons)return"";var r=vn.getComparisonSeriesIndex(t.index,0),a=e.reportData.comparisons[r],o=vn.getComparisonSeriesIndex(t.index,n.index),i=e.reportData.comparisons[o],c=e.reportData.comparisons[n.index],s='<div class="comparison-card-tooltip">',l=(i.nb_visits/a.nb_visits*100).toFixed(2);return l="".concat(l,"%"),s+=C("General_ComparisonCardTooltip1",["'".concat(i.compareSegmentPretty,"'"),i.comparePeriodPretty,l,i.nb_visits.toString(),a.nb_visits.toString()]),t.index>0&&(s+="<br/><br/>",s+=C("General_ComparisonCardTooltip2",[i.nb_visits_change.toString(),c.compareSegmentPretty,c.comparePeriodPretty])),s+="</div>",s}},updated:function(){var e=this;setTimeout((function(){return e.setUpTooltips()}))},mounted:function(){var e=this;D.on("piwikComparisonsChanged",(function(){e.onComparisonsChanged()})),this.onComparisonsChanged(),setTimeout((function(){return e.setUpTooltips()}))},beforeUnmount:function(){try{window.$(this.refs.root).tooltip("destroy")}catch(e){}}});In.render=Pn;var Nn=In;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */var dn=8,pn=3;function fn(e){return e?e instanceof Array?e:[e]:[]}var mn=function(){function e(){var t=this;ln(this,e),un(this,"privateState",Object(o["reactive"])({comparisonsDisabledFor:[]})),un(this,"state",Object(o["readonly"])(this.privateState)),un(this,"colors",{}),un(this,"segmentComparisons",Object(o["computed"])((function(){return t.parseSegmentComparisons()}))),un(this,"periodComparisons",Object(o["computed"])((function(){return t.parsePeriodComparisons()}))),un(this,"isEnabled",Object(o["computed"])((function(){return t.checkEnabledForCurrentPage()}))),this.loadComparisonsDisabledFor(),$((function(){t.colors=t.getAllSeriesColors()})),Object(o["watch"])((function(){return t.getComparisons()}),(function(){return j.postEvent("piwikComparisonsChanged")}),{deep:!0})}return sn(e,[{key:"getComparisons",value:function(){return this.getSegmentComparisons().concat(this.getPeriodComparisons())}},{key:"isComparing",value:function(){return this.isComparisonEnabled()&&(this.segmentComparisons.value.length>1||this.periodComparisons.value.length>1)}},{key:"isComparingPeriods",value:function(){return this.getPeriodComparisons().length>1}},{key:"getSegmentComparisons",value:function(){return this.isComparisonEnabled()?this.segmentComparisons.value:[]}},{key:"getPeriodComparisons",value:function(){return this.isComparisonEnabled()?this.periodComparisons.value:[]}},{key:"getSeriesColor",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.getComparisonSeriesIndex(t.index,e.index)%dn;if(0===n)return this.colors["series".concat(r)];var a=n%pn;return this.colors["series".concat(r,"-shade").concat(a)]}},{key:"getSeriesColorName",value:function(e,t){var n="series".concat(e%dn);return t>0&&(n+="-shade".concat(t%pn)),n}},{key:"isComparisonEnabled",value:function(){return this.isEnabled.value}},{key:"getIndividualComparisonRowIndices",value:function(e){var t=this.getSegmentComparisons().length,n=e%t,r=Math.floor(e/t);return{segmentIndex:n,periodIndex:r}}},{key:"getComparisonSeriesIndex",value:function(e,t){var n=this.getSegmentComparisons().length;return e*n+t}},{key:"getAllComparisonSeries",value:function(){var e=this,t=[],n=0;return this.getPeriodComparisons().forEach((function(r){e.getSegmentComparisons().forEach((function(a){t.push({index:n,params:on(on({},a.params),r.params),color:e.colors["series".concat(n)]}),n+=1}))})),t}},{key:"removeSegmentComparison",value:function(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");var t=Xt(this.segmentComparisons.value);t.splice(e,1);var n={};0===e&&(n.segment=t[0].params.segment),this.updateQueryParamsFromComparisons(t,this.periodComparisons.value,n)}},{key:"addSegmentComparison",value:function(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");var t=this.segmentComparisons.value.concat([{params:e,index:-1,title:""}]);this.updateQueryParamsFromComparisons(t,this.periodComparisons.value)}},{key:"updateQueryParamsFromComparisons",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},a={},o=!1,i=!1;e.forEach((function(e){o?r[e.params.segment]=!0:o=!0})),t.forEach((function(e){i?a["".concat(e.params.period,"|").concat(e.params.date)]=!0:i=!0}));var l=[],c=[];Object.keys(a).forEach((function(e){var t=e.split("|");l.push(t[0]),c.push(t[1])}));var s={compareSegments:Object.keys(r),comparePeriods:l,compareDates:c};if(j.helper.isAngularRenderingThePage()){var u=ke.hashParsed.value,d=on(on(on({},u),s),n);return delete d["compareSegments[]"],delete d["comparePeriods[]"],delete d["compareDates[]"],void(JSON.stringify(d)!==JSON.stringify(u)&&ke.updateHash(d))}var p=[];["compareSegments","comparePeriods","compareDates"].forEach((function(e){s[e].length||p.push(e)}));var f=ke.stringify(n),m=ke.stringify(s);window.broadcast.propagateNewPage(f,void 0,m,p)}},{key:"getAllSeriesColors",value:function(){var e=j.ColorManager;if(!e)return[];for(var t=[],n=0;n<dn;n+=1){t.push("series".concat(n));for(var r=0;r<pn;r+=1)t.push("series".concat(n,"-shade").concat(r))}return e.getColors("comparison-series-color",t)}},{key:"loadComparisonsDisabledFor",value:function(){var e=this,t=ke.parsed.value.module;"CoreUpdater"!==t&&"Installation"!==t?$e.fetch({module:"API",method:"API.getPagesComparisonsDisabledFor"}).then((function(t){e.privateState.comparisonsDisabledFor=t})):this.privateState.comparisonsDisabledFor=[]}},{key:"parseSegmentComparisons",value:function(){var e=Kt.state.availableSegments,t=Xt(fn(ke.parsed.value.compareSegments));t.unshift(ke.parsed.value.segment||"");var n=[];return t.forEach((function(t,r){var a;e.forEach((function(e){e.definition!==t&&e.definition!==decodeURIComponent(t)&&decodeURIComponent(e.definition)!==t||(a=e)}));var o=a?a.name:C("General_Unknown");""===t.trim()&&(o=C("SegmentEditor_DefaultAllVisits")),n.push({params:{segment:t},title:j.helper.htmlDecode(o),index:r})})),n}},{key:"parsePeriodComparisons",value:function(){var e=Xt(fn(ke.parsed.value.comparePeriods)),t=Xt(fn(ke.parsed.value.compareDates));e.unshift(ke.parsed.value.period),t.unshift(ke.parsed.value.date);for(var n=[],r=0;r<Math.min(t.length,e.length);r+=1){var a=void 0;try{a=p.parse(e[r],t[r]).getPrettyString()}catch(o){a=C("General_Error")}n.push({params:{date:t[r],period:e[r]},title:a,index:r})}return n}},{key:"checkEnabledForCurrentPage",value:function(){var e=ke.parsed.value.category||ke.parsed.value.module,t=ke.parsed.value.subcategory||ke.parsed.value.action,n="".concat(e,".").concat(t),r=-1===this.privateState.comparisonsDisabledFor.indexOf(n)&&-1===this.privateState.comparisonsDisabledFor.indexOf("".concat(e,".*"));return document.documentElement.classList.toggle("comparisonsDisabled",!r),r}}]),e}(),hn=new mn,vn={key:0,ref:"root",class:"matomo-comparisons"},gn={class:"comparison-type"},bn=["title"],yn=["href"],wn=["title"],kn={class:"comparison-period-label"},Dn=["onClick"],On=["title"],jn={class:"loadingPiwik",style:{display:"none"}},Cn=["alt"];function Pn(e,t,n,r,a,i){return e.isComparing?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",vn,[Object(o["createElementVNode"])("h3",null,Object(o["toDisplayString"])(e.translate("General_Comparisons")),1),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.segmentComparisons,(function(t,n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"comparison card",key:t.index},[Object(o["createElementVNode"])("div",gn,Object(o["toDisplayString"])(e.translate("General_Segment")),1),Object(o["createElementVNode"])("div",{class:"title",title:t.title+"<br/>"+decodeURIComponent(t.params.segment)},[Object(o["createElementVNode"])("a",{target:"_blank",href:e.getUrlToSegment(t.params.segment)},Object(o["toDisplayString"])(t.title),9,yn)],8,bn),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.periodComparisons,(function(n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"comparison-period",key:n.index,title:e.getComparisonTooltip(t,n)},[Object(o["createElementVNode"])("span",{class:"comparison-dot",style:Object(o["normalizeStyle"])({"background-color":e.getSeriesColor(t,n)})},null,4),Object(o["createElementVNode"])("span",kn,Object(o["toDisplayString"])(n.title)+" ("+Object(o["toDisplayString"])(e.getComparisonPeriodType(n))+") ",1)],8,wn)})),128)),e.segmentComparisons.length>1?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,class:"remove-button",onClick:function(t){return e.removeSegmentComparison(n)}},[Object(o["createElementVNode"])("span",{class:"icon icon-close",title:e.translate("General_ClickToRemoveComp")},null,8,On)],8,Dn)):Object(o["createCommentVNode"])("",!0)])})),128)),Object(o["createElementVNode"])("div",jn,[Object(o["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:e.translate("General_LoadingData")},null,8,Cn),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_LoadingData")),1)])],512)):Object(o["createCommentVNode"])("",!0)}function Sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function En(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sn(Object(n),!0).forEach((function(t){Tn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xn=Object(o["defineComponent"])({props:{},data:function(){return{comparisonTooltips:null}},setup:function(){var e=Object(o["computed"])((function(){return hn.isComparing()})),t=Object(o["computed"])((function(){return hn.getSegmentComparisons()})),n=Object(o["computed"])((function(){return hn.getPeriodComparisons()})),r=hn.getSeriesColor.bind(hn);return{isComparing:e,segmentComparisons:t,periodComparisons:n,getSeriesColor:r}},methods:{comparisonHasSegment:function(e){return"undefined"!==typeof e.params.segment},removeSegmentComparison:function(e){window.$(this.$refs.root).tooltip("destroy"),hn.removeSegmentComparison(e)},getComparisonPeriodType:function(e){var t=e.params.period;if("range"===t)return C("CoreHome_PeriodRange");var n=C("Intl_Period".concat(t.substring(0,1).toUpperCase()).concat(t.substring(1)));return n.substring(0,1).toUpperCase()+n.substring(1)},getComparisonTooltip:function(e,t){if(this.comparisonTooltips&&Object.keys(this.comparisonTooltips).length)return(this.comparisonTooltips[t.index]||{})[e.index]},getUrlToSegment:function(e){var t=En({},ke.hashParsed.value);return delete t.comparePeriods,delete t.compareDates,delete t.compareSegments,t.segment=e,"".concat(window.location.search,"#?").concat(ke.stringify(t))},setUpTooltips:function(){var e=window,t=e.$;t(this.$refs.root).tooltip({track:!0,content:function(){var e=t(this).attr("title");return window.vueSanitize(e.replace(/\n/g,"<br />"))},show:{delay:200,duration:200},hide:!1})},onComparisonsChanged:function(){var e=this;if(this.comparisonTooltips=null,hn.isComparing()){var t=hn.getPeriodComparisons(),n=hn.getSegmentComparisons();$e.fetch({method:"API.getProcessedReport",apiModule:"VisitsSummary",apiAction:"get",compare:"1",compareSegments:ke.getSearchParam("compareSegments"),comparePeriods:ke.getSearchParam("comparePeriods"),compareDates:ke.getSearchParam("compareDates"),format_metrics:"1"}).then((function(r){e.comparisonTooltips={},t.forEach((function(t){e.comparisonTooltips[t.index]={},n.forEach((function(n){var a=e.generateComparisonTooltip(r,t,n);e.comparisonTooltips[t.index][n.index]=a}))}))}))}},generateComparisonTooltip:function(e,t,n){if(!e.reportData.comparisons)return"";var r=hn.getComparisonSeriesIndex(t.index,0),a=e.reportData.comparisons[r],o=hn.getComparisonSeriesIndex(t.index,n.index),i=e.reportData.comparisons[o],l=e.reportData.comparisons[n.index],c='<div class="comparison-card-tooltip">',s=(i.nb_visits/a.nb_visits*100).toFixed(2);return s="".concat(s,"%"),c+=C("General_ComparisonCardTooltip1",["'".concat(i.compareSegmentPretty,"'"),i.comparePeriodPretty,s,i.nb_visits.toString(),a.nb_visits.toString()]),t.index>0&&(c+="<br/><br/>",c+=C("General_ComparisonCardTooltip2",[i.nb_visits_change.toString(),l.compareSegmentPretty,l.comparePeriodPretty])),c+="</div>",c}},updated:function(){var e=this;setTimeout((function(){return e.setUpTooltips()}))},mounted:function(){var e=this;j.on("piwikComparisonsChanged",(function(){e.onComparisonsChanged()})),this.onComparisonsChanged(),setTimeout((function(){return e.setUpTooltips()}))},beforeUnmount:function(){try{window.$(this.refs.root).tooltip("destroy")}catch(e){}}});xn.render=Pn;var In=xn;
+ */function $n(){return vn}$n.$inject=[],angular.module("piwikApp.service").factory("piwikComparisonsService",$n);wt({component:Nn,directiveName:"piwikComparisons",restrict:"E"});var Bn={ref:"root",class:"menuDropdown"},Hn=["title"],An=["innerHTML"],Mn=Object(o["createElementVNode"])("span",{class:"icon-arrow-bottom"},null,-1),Fn={class:"items"},Vn={key:0,class:"search"},Ln=["placeholder"],Rn=["title"],Un=["title"];function _n(e,t,n,r,a,i){var c=Object(o["resolveDirective"])("focus-if"),s=Object(o["resolveDirective"])("focus-anywhere-but-here");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Bn,[Object(o["createElementVNode"])("span",{class:"title",onClick:t[0]||(t[0]=function(t){return e.showItems=!e.showItems}),title:e.tooltip},[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(this.actualMenuTitle)},null,8,An),Mn],8,Hn),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",Fn,[e.showSearch&&e.showItems?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Vn,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),onKeydown:t[2]||(t[2]=function(t){return e.onSearchTermKeydown(t)}),placeholder:e.translate("General_Search")},null,40,Ln),[[o["vModelText"],e.searchTerm],[c,{},e.showItems]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("img",{class:"search_ico",src:"plugins/Morpheus/images/search_ico.png",title:e.translate("General_Search")},null,8,Rn),[[o["vShow"],!e.searchTerm]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("img",{onClick:t[3]||(t[3]=function(t){e.searchTerm="",e.searchItems("")}),class:"reset",src:"plugins/CoreHome/images/reset_search.png",title:e.translate("General_Clear")},null,8,Un),[[o["vShow"],e.searchTerm]])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",{onClick:t[4]||(t[4]=function(t){return e.selectItem(t)})},[Object(o["renderSlot"])(e.$slots,"default")])],512),[[o["vShow"],e.showItems]])],512)),[[s,{blur:e.lostFocus}]])}var Jn=window,Gn=Jn.$,qn=Object(o["defineComponent"])({props:{menuTitle:String,tooltip:String,showSearch:Boolean,menuTitleChangeOnClick:String},directives:{FocusAnywhereButHere:Re,FocusIf:Je},emits:["afterSelect"],watch:{menuTitle:function(){this.actualMenuTitle=this.menuTitle}},data:function(){return{showItems:!1,searchTerm:"",actualMenuTitle:this.menuTitle}},methods:{lostFocus:function(){this.showItems=!1},selectItem:function(e){var t=e.target.classList;!t.contains("item")||t.contains("disabled")||t.contains("separator")||(!1!==this.menuTitleChangeOnClick&&(this.actualMenuTitle=e.target.textContent.replace(/[\u0000-\u2666]/g,(function(e){return"&#".concat(e.charCodeAt(0),";")}))),this.showItems=!1,Gn(this.$slots.default()).find(".item").removeClass("active"),t.add("active"),this.$emit("afterSelect"))},onSearchTermKeydown:function(){var e=this;setTimeout((function(){e.searchItems(e.searchTerm)}))},searchItems:function(e){var t=e.toLowerCase();Gn(this.$refs.root).find(".item").each((function(e,n){var r=Gn(n);-1===r.text().toLowerCase().indexOf(t)?r.hide():r.show()}))}}});qn.render=_n;var zn=qn,Qn=(wt({component:zn,scope:{menuTitle:{angularJsBind:"@"},tooltip:{angularJsBind:"@"},showSearch:{angularJsBind:"="},menuTitleChangeOnClick:{angularJsBind:"="}},directiveName:"piwikMenudropdown",transclude:!0,events:{"after-select":function(e,t){setTimeout((function(){t.$apply()}),0)}}}),{ref:"root"});
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function $n(){return hn}$n.$inject=[],angular.module("piwikApp.service").factory("piwikComparisonsService",$n);yt({component:In,directiveName:"piwikComparisons",restrict:"E"});var Hn={ref:"root",class:"menuDropdown"},An=["title"],Bn=["innerHTML"],Mn=Object(o["createElementVNode"])("span",{class:"icon-arrow-bottom"},null,-1),Nn={class:"items"},Fn={key:0,class:"search"},Vn=["placeholder"],Ln=["title"],Rn=["title"];function Un(e,t,n,r,a,i){var l=Object(o["resolveDirective"])("focus-anywhere-but-here");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Hn,[Object(o["createElementVNode"])("span",{class:"title",onClick:t[0]||(t[0]=function(t){return e.showItems=!e.showItems}),title:e.tooltip},[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(this.actualMenuTitle)},null,8,Bn),Mn],8,An),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",Nn,[e.showSearch&&e.showItems?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Fn,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),onKeydown:t[2]||(t[2]=function(t){return e.onSearchTermKeydown(t)}),placeholder:e.translate("General_Search")},null,40,Vn),[[o["vModelText"],e.searchTerm]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("img",{class:"search_ico",src:"plugins/Morpheus/images/search_ico.png",title:e.translate("General_Search")},null,8,Ln),[[o["vShow"],!e.searchTerm]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("img",{onClick:t[3]||(t[3]=function(t){e.searchTerm="",e.searchItems("")}),class:"reset",src:"plugins/CoreHome/images/reset_search.png",title:e.translate("General_Clear")},null,8,Rn),[[o["vShow"],e.searchTerm]])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",{onClick:t[4]||(t[4]=function(t){return e.selectItem(t)})},[Object(o["renderSlot"])(e.$slots,"default")])],512),[[o["vShow"],e.showItems]])],512)),[[l,{blur:e.lostFocus}]])}var _n=window,Jn=_n.$,qn=Object(o["defineComponent"])({props:{menuTitle:String,tooltip:String,showSearch:Boolean,menuTitleChangeOnClick:String},directives:{FocusAnywhereButHere:Re,FocusIf:_e},emits:["afterSelect"],watch:{menuTitle:function(){this.actualMenuTitle=this.menuTitle}},data:function(){return{showItems:!1,searchTerm:"",actualMenuTitle:this.menuTitle}},methods:{lostFocus:function(){this.showItems=!1},selectItem:function(e){var t=e.target.classList;!t.contains("item")||t.contains("disabled")||t.contains("separator")||(!1!==this.menuTitleChangeOnClick&&(this.actualMenuTitle=e.target.textContent.replace(/[\u0000-\u2666]/g,(function(e){return"&#".concat(e.charCodeAt(0),";")}))),this.showItems=!1,Jn(this.$slots.default()).find(".item").removeClass("active"),t.add("active"),this.$emit("afterSelect"))},onSearchTermKeydown:function(){var e=this;setTimeout((function(){e.searchItems(e.searchTerm)}))},searchItems:function(e){var t=e.toLowerCase();Jn(this.$refs.root).find(".item").each((function(e,n){var r=Jn(n);-1===r.text().toLowerCase().indexOf(t)?r.hide():r.show()}))}}});qn.render=Un;var Gn=qn,Qn=(yt({component:Gn,scope:{menuTitle:{angularJsBind:"@"},tooltip:{angularJsBind:"@"},showSearch:{angularJsBind:"="},menuTitleChangeOnClick:{angularJsBind:"="}},directiveName:"piwikMenudropdown",transclude:!0,events:{"after-select":function(e,t){setTimeout((function(){t.$apply()}),0)}}}),{ref:"root"});
+ */function Yn(e,t,n,r,a,i){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Qn,null,512)}function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wn(Object(n),!0).forEach((function(t){Xn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zn=1,er=window,tr=er.$,nr=Object(o["defineComponent"])({props:{selectedDateStart:Date,selectedDateEnd:Date,highlightedDateStart:Date,highlightedDateEnd:Date,viewDate:[String,Date],stepMonths:Number,disableMonthDropdown:Boolean,options:Object},emits:["cellHover","cellHoverLeave","dateSelect"],setup:function(e,t){var n=Object(o["ref"])(null);function r(t,n){var r=t.children("a");if(e.selectedDateStart&&e.selectedDateEnd&&n>=e.selectedDateStart&&n<=e.selectedDateEnd?t.addClass("ui-datepicker-current-period"):t.removeClass("ui-datepicker-current-period"),e.highlightedDateStart&&e.highlightedDateEnd&&n>=e.highlightedDateStart&&n<=e.highlightedDateEnd){var a=r.length?r:t;a.addClass("ui-state-hover")}else t.removeClass("ui-state-hover"),r.removeClass("ui-state-hover")}function a(e,t,n){if(e.hasClass("ui-datepicker-other-month"))return i(e,t,n);var r=parseInt(e.children("a,span").text(),10);return new Date(n,t,r)}function i(e,t,n){var r,o=e.parent(),i=o.children("td");if(o.is(":first-child")){var c=o.children("td:not(.ui-datepicker-other-month)").first();return r=a(c,t,n),r.setDate(i.index(e)-i.index(c)+1),r}var s=o.children("td:not(.ui-datepicker-other-month)").last();return r=a(s,t,n),r.setDate(r.getDate()+i.index(e)-i.index(s)),r}function c(){var e=tr(n.value),t=e.find("td[data-month]"),r=parseInt(t.attr("data-month"),10),a=parseInt(t.attr("data-year"),10);return[r,a]}function s(){var e=tr(n.value),t=e.find(".ui-datepicker-calendar"),o=c(),i=t.find("td"),s=i.first(),l=a(s,o[0],o[1]);i.each((function(){r(tr(this),l),l.setDate(l.getDate()+1)}))}function l(){var t=e.viewDate;if(!t)return!1;if(!(t instanceof Date))try{t=E(t)}catch(o){return!1}var r=tr(n.value),a=c();return(a[0]!==t.getMonth()||a[1]!==t.getFullYear())&&(r.datepicker("setDate",t),!0)}function u(){var e=tr(n.value);e.find("td[data-event]").off("click"),e.find(".ui-state-active").removeClass("ui-state-active"),e.find(".ui-datepicker-current-day").removeClass("ui-datepicker-current-day"),e.find(".ui-datepicker-prev,.ui-datepicker-next").attr("href","")}function d(){var t=tr(n.value),r=e.stepMonths||Zn;if(t.datepicker("option","stepMonths")===r)return!1;var a=tr(".ui-datepicker-month",t).val(),o=tr(".ui-datepicker-year",t).val();return t.datepicker("option","stepMonths",r).datepicker("setDate",new Date(o,a)),u(),!0}function p(){var t=tr(n.value);t.find(".ui-datepicker-month").attr("disabled",e.disableMonthDropdown)}function f(){if(tr(this).hasClass("ui-state-hover")){var e=tr(this).parent(),t=e.parent();e.is(":first-child")?t.find("a").first().click():t.find("a").last().click()}}function m(){p(),s()}return Object(o["watch"])((function(){return Kn({},e)}),(function(e,t){var n=!1;["selectedDateStart","selectedDateEnd","highlightedDateStart","highlightedDateEnd"].forEach((function(r){n||(!e[r]&&t[r]&&(n=!0),e[r]&&!t[r]&&(n=!0),e[r]&&t[r]&&e[r].getTime()!==t[r].getTime()&&(n=!0))})),e.viewDate!==t.viewDate&&l()&&(n=!0),e.stepMonths!==t.stepMonths&&d(),e.enableDisableMonthDropdown!==t.enableDisableMonthDropdown&&p(),n&&s()})),Object(o["onMounted"])((function(){var r=tr(n.value),o=e.options||{},i=Kn(Kn(Kn({},D.getBaseDatePickerOptions()),o),{},{onChangeMonthYear:function(){setTimeout((function(){u()}))}});r.datepicker(i),r.on("mouseover","tbody td a",(function(e){e.originalEvent&&s()})),r.on("mouseenter","tbody td",(function(){var e=c(),n=tr(this),r=a(n,e[0],e[1]);t.emit("cellHover",{date:r,$cell:n})})),r.on("mouseout","tbody td a",(function(){s()})),r.on("mouseleave","table",(function(){return t.emit("cellHoverLeave")})).on("mouseenter","thead",(function(){return t.emit("cellHoverLeave")})),r.on("click","tbody td.ui-datepicker-other-month",(function(){return f()})),r.on("click",(function(e){e.preventDefault();var t=tr(e.target).closest("a");(t.is(".ui-datepicker-next")||t.is(".ui-datepicker-prev"))&&m()})),r.on("click","td[data-month]",(function(e){var n=tr(e.target).closest("td"),r=parseInt(n.attr("data-month"),10),a=parseInt(n.attr("data-year"),10),o=parseInt(n.children("a,span").text(),10);t.emit("dateSelect",{date:new Date(a,r,o)})}));var h=d();l(),p(),h||u(),s()})),{root:n}}});nr.render=Yn;var rr=nr,ar=(wt({component:rr,scope:{selectedDateStart:{angularJsBind:"<"},selectedDateEnd:{angularJsBind:"<"},highlightedDateStart:{angularJsBind:"<"},highlightedDateEnd:{angularJsBind:"<"},viewDate:{angularJsBind:"<"},stepMonths:{angularJsBind:"<"},disableMonthDropdown:{angularJsBind:"<"},options:{angularJsBind:"<"},cellHover:{angularJsBind:"&"},cellHoverLeave:{angularJsBind:"&"},dateSelect:{angularJsBind:"&"}},directiveName:"piwikDatePicker",events:{"cell-hover":function(e,t,n,r,a){a()},"cell-hover-leave":function(e,t,n,r,a){a()},"date-select":function(e,t,n,r,a){a()}},$inject:["$timeout"]}),{id:"calendarRangeFrom"}),or={id:"calendarRangeTo"};
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function zn(e,t,n,r,a,i){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Qn,null,512)}function Yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yn(Object(n),!0).forEach((function(t){Kn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xn=1,Zn=window,er=Zn.$,tr=Object(o["defineComponent"])({props:{selectedDateStart:Date,selectedDateEnd:Date,highlightedDateStart:Date,highlightedDateEnd:Date,viewDate:[String,Date],stepMonths:Number,disableMonthDropdown:Boolean,options:Object},emits:["cellHover","cellHoverLeave","dateSelect"],setup:function(e,t){var n=Object(o["ref"])(null);function r(t,n){var r=t.children("a");if(e.selectedDateStart&&e.selectedDateEnd&&n>=e.selectedDateStart&&n<=e.selectedDateEnd?t.addClass("ui-datepicker-current-period"):t.removeClass("ui-datepicker-current-period"),e.highlightedDateStart&&e.highlightedDateEnd&&n>=e.highlightedDateStart&&n<=e.highlightedDateEnd){var a=r.length?r:t;a.addClass("ui-state-hover")}else t.removeClass("ui-state-hover"),r.removeClass("ui-state-hover")}function a(e,t,n){if(e.hasClass("ui-datepicker-other-month"))return i(e,t,n);var r=parseInt(e.children("a,span").text(),10);return new Date(n,t,r)}function i(e,t,n){var r,o=e.parent(),i=o.children("td");if(o.is(":first-child")){var l=o.children("td:not(.ui-datepicker-other-month)").first();return r=a(l,t,n),r.setDate(i.index(e)-i.index(l)+1),r}var c=o.children("td:not(.ui-datepicker-other-month)").last();return r=a(c,t,n),r.setDate(r.getDate()+i.index(e)-i.index(c)),r}function l(){var e=er(n.value),t=e.find("td[data-month]"),r=parseInt(t.attr("data-month"),10),a=parseInt(t.attr("data-year"),10);return[r,a]}function c(){var e=er(n.value),t=e.find(".ui-datepicker-calendar"),o=l(),i=t.find("td"),c=i.first(),s=a(c,o[0],o[1]);i.each((function(){r(er(this),s),s.setDate(s.getDate()+1)}))}function s(){var t=e.viewDate;if(!t)return!1;if(!(t instanceof Date))try{t=E(t)}catch(o){return!1}var r=er(n.value),a=l();return(a[0]!==t.getMonth()||a[1]!==t.getFullYear())&&(r.datepicker("setDate",t),!0)}function u(){var e=er(n.value);e.find("td[data-event]").off("click"),e.find(".ui-state-active").removeClass("ui-state-active"),e.find(".ui-datepicker-current-day").removeClass("ui-datepicker-current-day"),e.find(".ui-datepicker-prev,.ui-datepicker-next").attr("href","")}function d(){var t=er(n.value),r=e.stepMonths||Xn;if(t.datepicker("option","stepMonths")===r)return!1;var a=er(".ui-datepicker-month",t).val(),o=er(".ui-datepicker-year",t).val();return t.datepicker("option","stepMonths",r).datepicker("setDate",new Date(o,a)),u(),!0}function p(){var t=er(n.value);t.find(".ui-datepicker-month").attr("disabled",e.disableMonthDropdown)}function f(){if(er(this).hasClass("ui-state-hover")){var e=er(this).parent(),t=e.parent();e.is(":first-child")?t.find("a").first().click():t.find("a").last().click()}}function m(){p(),c()}return Object(o["watch"])((function(){return Wn({},e)}),(function(e,t){var n=!1;["selectedDateStart","selectedDateEnd","highlightedDateStart","highlightedDateEnd"].forEach((function(r){n||(!e[r]&&t[r]&&(n=!0),e[r]&&!t[r]&&(n=!0),e[r]&&t[r]&&e[r].getTime()!==t[r].getTime()&&(n=!0))})),e.viewDate!==t.viewDate&&s()&&(n=!0),e.stepMonths!==t.stepMonths&&d(),e.enableDisableMonthDropdown!==t.enableDisableMonthDropdown&&p(),n&&c()})),Object(o["onMounted"])((function(){var r=er(n.value),o=e.options||{},i=Wn(Wn(Wn({},j.getBaseDatePickerOptions()),o),{},{onChangeMonthYear:function(){setTimeout((function(){u()}))}});r.datepicker(i),r.on("mouseover","tbody td a",(function(e){e.originalEvent&&c()})),r.on("mouseenter","tbody td",(function(){var e=l(),n=er(this),r=a(n,e[0],e[1]);t.emit("cellHover",{date:r,$cell:n})})),r.on("mouseout","tbody td a",(function(){c()})),r.on("mouseleave","table",(function(){return t.emit("cellHoverLeave")})).on("mouseenter","thead",(function(){return t.emit("cellHoverLeave")})),r.on("click","tbody td.ui-datepicker-other-month",(function(){return f()})),r.on("click",(function(e){e.preventDefault();var t=er(e.target).closest("a");(t.is(".ui-datepicker-next")||t.is(".ui-datepicker-prev"))&&m()})),r.on("click","td[data-month]",(function(e){var n=er(e.target).closest("td"),r=parseInt(n.attr("data-month"),10),a=parseInt(n.attr("data-year"),10),o=parseInt(n.children("a,span").text(),10);t.emit("dateSelect",{date:new Date(a,r,o)})}));var h=d();s(),p(),h||u(),c()})),{root:n}}});tr.render=zn;var nr=tr,rr=(yt({component:nr,scope:{selectedDateStart:{angularJsBind:"<"},selectedDateEnd:{angularJsBind:"<"},highlightedDateStart:{angularJsBind:"<"},highlightedDateEnd:{angularJsBind:"<"},viewDate:{angularJsBind:"<"},stepMonths:{angularJsBind:"<"},disableMonthDropdown:{angularJsBind:"<"},options:{angularJsBind:"<"},cellHover:{angularJsBind:"&"},cellHoverLeave:{angularJsBind:"&"},dateSelect:{angularJsBind:"&"}},directiveName:"piwikDatePicker",events:{"cell-hover":function(e,t,n,r,a){a()},"cell-hover-leave":function(e,t,n,r,a){a()},"date-select":function(e,t,n,r,a){a()}},$inject:["$timeout"]}),{id:"calendarRangeFrom"}),ar={id:"calendarRangeTo"};
+ */function ir(e,t,n,r,a,i){var c=Object(o["resolveComponent"])("DatePicker");return Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],null,[Object(o["createElementVNode"])("div",ar,[Object(o["createElementVNode"])("h6",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_DateRangeFrom"))+" ",1),Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text",id:"inputCalendarFrom",name:"inputCalendarFrom",class:"browser-default","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.startDateText=t}),onChange:t[1]||(t[1]=function(t){return e.onRangeInputChanged("from",t)}),onKeyup:t[2]||(t[2]=function(t){return e.handleEnterPress(t)})},null,544),[[o["vModelText"],e.startDateText]])]),Object(o["createVNode"])(c,{id:"calendarFrom","view-date":e.startDate,"selected-date-start":e.fromPickerSelectedDates[0],"selected-date-end":e.fromPickerSelectedDates[1],"highlighted-date-start":e.fromPickerHighlightedDates[0],"highlighted-date-end":e.fromPickerHighlightedDates[1],onDateSelect:t[3]||(t[3]=function(t){return e.setStartRangeDate(t.date)}),onCellHover:t[4]||(t[4]=function(t){return e.fromPickerHighlightedDates=e.getNewHighlightedDates(t.date,t.$cell)}),onCellHoverLeave:t[5]||(t[5]=function(t){return e.fromPickerHighlightedDates=[null,null]})},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end"])]),Object(o["createElementVNode"])("div",or,[Object(o["createElementVNode"])("h6",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_DateRangeTo"))+" ",1),Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text",id:"inputCalendarTo",name:"inputCalendarTo",class:"browser-default","onUpdate:modelValue":t[6]||(t[6]=function(t){return e.endDateText=t}),onChange:t[7]||(t[7]=function(t){return e.onRangeInputChanged("to",t)}),onKeyup:t[8]||(t[8]=function(t){return e.handleEnterPress(t)})},null,544),[[o["vModelText"],e.endDateText]])]),Object(o["createVNode"])(c,{id:"calendarTo","view-date":e.endDate,"selected-date-start":e.toPickerSelectedDates[0],"selected-date-end":e.toPickerSelectedDates[1],"highlighted-date-start":e.toPickerHighlightedDates[0],"highlighted-date-end":e.toPickerHighlightedDates[1],onDateSelect:t[9]||(t[9]=function(t){return e.setEndRangeDate(t.date)}),onCellHover:t[10]||(t[10]=function(t){return e.toPickerHighlightedDates=e.getNewHighlightedDates(t.date,t.$cell)}),onCellHoverLeave:t[11]||(t[11]=function(t){return e.toPickerHighlightedDates=[null,null]})},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end"])])],64)}var cr=Object(o["defineComponent"])({props:{startDate:String,endDate:String},components:{DatePicker:rr},data:function(){var e=null;try{e=E(this.startDate)}catch(n){}var t=null;try{t=E(this.endDate)}catch(n){}return{fromPickerSelectedDates:[e,e],toPickerSelectedDates:[t,t],fromPickerHighlightedDates:[null,null],toPickerHighlightedDates:[null,null],startDateText:this.startDate,endDateText:this.endDate}},emits:["rangeChange","submit"],watch:{startDate:function(){this.startDateText=this.startDate,this.setStartRangeDateFromStr(this.startDate)},endDate:function(){this.endDateText=this.endDate,this.setEndRangeDateFromStr(this.endDate)}},mounted:function(){this.rangeChanged()},methods:{setStartRangeDate:function(e){this.fromPickerSelectedDates=[e,e],this.rangeChanged()},setEndRangeDate:function(e){this.toPickerSelectedDates=[e,e],this.rangeChanged()},onRangeInputChanged:function(e,t){"from"===e?this.setStartRangeDateFromStr(t.target.value):this.setEndRangeDateFromStr(t.target.value)},getNewHighlightedDates:function(e,t){return t.hasClass("ui-datepicker-unselectable")?null:[e,e]},handleEnterPress:function(e){13===e.keyCode&&this.$emit("submit",{start:this.startDate,end:this.endDate})},setStartRangeDateFromStr:function(e){var t;try{t=E(e)}catch(n){this.startDateText=this.startDate}t&&(this.fromPickerSelectedDates=[t,t]),this.rangeChanged()},setEndRangeDateFromStr:function(e){var t;try{t=E(e)}catch(n){this.endDateText=this.endDate}t&&(this.toPickerSelectedDates=[t,t]),this.rangeChanged()},rangeChanged:function(){this.$emit("rangeChange",{start:S(this.fromPickerSelectedDates[0]),end:S(this.toPickerSelectedDates[0])})}}});cr.render=ir;var sr=cr;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function or(e,t,n,r,a,i){var l=Object(o["resolveComponent"])("DatePicker");return Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],null,[Object(o["createElementVNode"])("div",rr,[Object(o["createElementVNode"])("h6",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_DateRangeFrom"))+" ",1),Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text",id:"inputCalendarFrom",name:"inputCalendarFrom",class:"browser-default","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.startDateText=t}),onChange:t[1]||(t[1]=function(t){return e.onRangeInputChanged("from",t)}),onKeyup:t[2]||(t[2]=function(t){return e.handleEnterPress(t)})},null,544),[[o["vModelText"],e.startDateText]])]),Object(o["createVNode"])(l,{id:"calendarFrom","view-date":e.startDate,"selected-date-start":e.fromPickerSelectedDates[0],"selected-date-end":e.fromPickerSelectedDates[1],"highlighted-date-start":e.fromPickerHighlightedDates[0],"highlighted-date-end":e.fromPickerHighlightedDates[1],onDateSelect:t[3]||(t[3]=function(t){return e.setStartRangeDate(t.date)}),onCellHover:t[4]||(t[4]=function(t){return e.fromPickerHighlightedDates=e.getNewHighlightedDates(t.date,t.$cell)}),onCellHoverLeave:t[5]||(t[5]=function(t){return e.fromPickerHighlightedDates=[null,null]})},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end"])]),Object(o["createElementVNode"])("div",ar,[Object(o["createElementVNode"])("h6",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_DateRangeTo"))+" ",1),Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text",id:"inputCalendarTo",name:"inputCalendarTo",class:"browser-default","onUpdate:modelValue":t[6]||(t[6]=function(t){return e.endDateText=t}),onChange:t[7]||(t[7]=function(t){return e.onRangeInputChanged("to",t)}),onKeyup:t[8]||(t[8]=function(t){return e.handleEnterPress(t)})},null,544),[[o["vModelText"],e.endDateText]])]),Object(o["createVNode"])(l,{id:"calendarTo","view-date":e.endDate,"selected-date-start":e.toPickerSelectedDates[0],"selected-date-end":e.toPickerSelectedDates[1],"highlighted-date-start":e.toPickerHighlightedDates[0],"highlighted-date-end":e.toPickerHighlightedDates[1],onDateSelect:t[9]||(t[9]=function(t){return e.setEndRangeDate(t.date)}),onCellHover:t[10]||(t[10]=function(t){return e.toPickerHighlightedDates=e.getNewHighlightedDates(t.date,t.$cell)}),onCellHoverLeave:t[11]||(t[11]=function(t){return e.toPickerHighlightedDates=[null,null]})},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end"])])],64)}var ir=Object(o["defineComponent"])({props:{startDate:String,endDate:String},components:{DatePicker:nr},data:function(){var e=null;try{e=E(this.startDate)}catch(n){}var t=null;try{t=E(this.endDate)}catch(n){}return{fromPickerSelectedDates:[e,e],toPickerSelectedDates:[t,t],fromPickerHighlightedDates:[null,null],toPickerHighlightedDates:[null,null],startDateText:this.startDate,endDateText:this.endDate}},emits:["rangeChange","submit"],watch:{startDate:function(){this.startDateText=this.startDate,this.setStartRangeDateFromStr(this.startDate)},endDate:function(){this.endDateText=this.endDate,this.setEndRangeDateFromStr(this.endDate)}},mounted:function(){this.rangeChanged()},methods:{setStartRangeDate:function(e){this.fromPickerSelectedDates=[e,e],this.rangeChanged()},setEndRangeDate:function(e){this.toPickerSelectedDates=[e,e],this.rangeChanged()},onRangeInputChanged:function(e,t){"from"===e?this.setStartRangeDateFromStr(t.target.value):this.setEndRangeDateFromStr(t.target.value)},getNewHighlightedDates:function(e,t){return t.hasClass("ui-datepicker-unselectable")?null:[e,e]},handleEnterPress:function(e){13===e.keyCode&&this.$emit("submit",{start:this.startDate,end:this.endDate})},setStartRangeDateFromStr:function(e){var t;try{t=E(e)}catch(n){this.startDateText=this.startDate}t&&(this.fromPickerSelectedDates=[t,t]),this.rangeChanged()},setEndRangeDateFromStr:function(e){var t;try{t=E(e)}catch(n){this.endDateText=this.endDate}t&&(this.toPickerSelectedDates=[t,t]),this.rangeChanged()},rangeChanged:function(){this.$emit("rangeChange",{start:P(this.fromPickerSelectedDates[0]),end:P(this.toPickerSelectedDates[0])})}}});ir.render=or;var lr=ir;
+ */wt({component:sr,scope:{startDate:{angularJsBind:"<"},endDate:{angularJsBind:"<"},rangeChange:{angularJsBind:"&"},submit:{angularJsBind:"&"}},directiveName:"piwikDateRangePicker",restrict:"E"});function lr(e,t,n,r,a,i){var c=Object(o["resolveComponent"])("DatePicker");return Object(o["openBlock"])(),Object(o["createBlock"])(c,{"selected-date-start":e.selectedDates[0],"selected-date-end":e.selectedDates[1],"highlighted-date-start":e.highlightedDates[0],"highlighted-date-end":e.highlightedDates[1],"view-date":e.viewDate,"step-months":"year"===e.period?12:1,"disable-month-dropdown":"year"===e.period,onCellHover:t[0]||(t[0]=function(t){return e.onHoverNormalCell(t.date,t.$cell)}),onCellHoverLeave:t[1]||(t[1]=function(t){return e.onHoverLeaveNormalCells()}),onDateSelect:t[2]||(t[2]=function(t){return e.onDateSelected(t.date)})},null,8,["selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end","view-date","step-months","disable-month-dropdown"])}var ur=new Date(D.minDateYear,D.minDateMonth-1,D.minDateDay),dr=new Date(D.maxDateYear,D.maxDateMonth-1,D.maxDateDay),pr=Object(o["defineComponent"])({props:{period:String,date:[String,Date]},components:{DatePicker:rr},emits:["select"],setup:function(e,t){var n=Object(o["ref"])(e.date),r=Object(o["ref"])([null,null]),a=Object(o["ref"])([null,null]);function i(t){var n=p.get(e.period).parse(t).getDateRange();return n[0]=ur<n[0]?n[0]:ur,n[1]=dr>n[1]?n[1]:dr,n}function c(t,n){var r=t<ur||t>dr,o=n.hasClass("ui-datepicker-other-month")&&("month"===e.period||"day"===e.period);a.value=r||o?[null,null]:i(t)}function s(){a.value=[null,null]}function l(e){t.emit("select",{date:e})}function u(){e.period&&e.date?r.value=i(e.date):r.value=[null,null]}return Object(o["watch"])(e,u),u(),{selectedDates:r,highlightedDates:a,viewDate:n,onHoverNormalCell:c,onHoverLeaveNormalCells:s,onDateSelected:l}}});pr.render=lr;var fr=pr,mr=(wt({component:fr,scope:{period:{angularJsBind:"<"},date:{angularJsBind:"<"},select:{angularJsBind:"&"}},directiveName:"piwikPeriodDatePicker",restrict:"E"}),{class:"loadingPiwik"}),hr=Object(o["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:""},null,-1);
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */yt({component:lr,scope:{startDate:{angularJsBind:"<"},endDate:{angularJsBind:"<"},rangeChange:{angularJsBind:"&"},submit:{angularJsBind:"&"}},directiveName:"piwikDateRangePicker",restrict:"E"});function cr(e,t,n,r,a,i){var l=Object(o["resolveComponent"])("DatePicker");return Object(o["openBlock"])(),Object(o["createBlock"])(l,{"selected-date-start":e.selectedDates[0],"selected-date-end":e.selectedDates[1],"highlighted-date-start":e.highlightedDates[0],"highlighted-date-end":e.highlightedDates[1],"view-date":e.viewDate,"step-months":"year"===e.period?12:1,"disable-month-dropdown":"year"===e.period,onCellHover:t[0]||(t[0]=function(t){return e.onHoverNormalCell(t.date,t.$cell)}),onCellHoverLeave:t[1]||(t[1]=function(t){return e.onHoverLeaveNormalCells()}),onDateSelect:t[2]||(t[2]=function(t){return e.onDateSelected(t.date)})},null,8,["selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end","view-date","step-months","disable-month-dropdown"])}var sr=new Date(j.minDateYear,j.minDateMonth-1,j.minDateDay),ur=new Date(j.maxDateYear,j.maxDateMonth-1,j.maxDateDay),dr=Object(o["defineComponent"])({props:{period:String,date:[String,Date]},components:{DatePicker:nr},emits:["select"],setup:function(e,t){var n=Object(o["ref"])(e.date),r=Object(o["ref"])([null,null]),a=Object(o["ref"])([null,null]);function i(t){var n=p.get(e.period).parse(t).getDateRange();return n[0]=sr<n[0]?n[0]:sr,n[1]=ur>n[1]?n[1]:ur,n}function l(t,n){var r=t<sr||t>ur,o=n.hasClass("ui-datepicker-other-month")&&("month"===e.period||"day"===e.period);a.value=r||o?[null,null]:i(t)}function c(){a.value=[null,null]}function s(e){t.emit("select",{date:e})}function u(){e.period&&e.date?r.value=i(e.date):r.value=[null,null]}return Object(o["watch"])(e,u),u(),{selectedDates:r,highlightedDates:a,viewDate:n,onHoverNormalCell:l,onHoverLeaveNormalCells:c,onDateSelected:s}}});dr.render=cr;var pr=dr,fr=(yt({component:pr,scope:{period:{angularJsBind:"<"},date:{angularJsBind:"<"},select:{angularJsBind:"&"}},directiveName:"piwikPeriodDatePicker",restrict:"E"}),{class:"loadingPiwik"}),mr=Object(o["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:""},null,-1);
+ */function vr(e,t,n,r,a,i){return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",mr,[hr,Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.loadingMessage),1)],512)),[[o["vShow"],e.loading]])}var gr=Object(o["defineComponent"])({props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:C("General_LoadingData")}}});gr.render=vr;var br=gr,yr=wt({component:br,scope:{loading:{vue:"loading",angularJsBind:"<"},loadingMessage:{vue:"loadingMessage",angularJsBind:"<",default:function(){return C("General_LoadingData")}}},$inject:[],directiveName:"piwikActivityIndicator"});
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function hr(e,t,n,r,a,i){return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",fr,[mr,Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.loadingMessage),1)],512)),[[o["vShow"],e.loading]])}var vr=Object(o["defineComponent"])({props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:C("General_LoadingData")}}});vr.render=hr;var gr=vr,br=yt({component:gr,scope:{loading:{vue:"loading",angularJsBind:"<"},loadingMessage:{vue:"loadingMessage",angularJsBind:"<",default:function(){return C("General_LoadingData")}}},$inject:[],directiveName:"piwikActivityIndicator"});
+ */function wr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kr(e,t,n,r,a,i){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["alert",wr({},"alert-".concat(e.severity),!0)])},[Object(o["renderSlot"])(e.$slots,"default")],2)}var Or=Object(o["defineComponent"])({props:{severity:{type:String,required:!0}}});Or.render=kr;var jr=Or,Dr=wt({component:jr,scope:{severity:{vue:"severity",angularJsBind:"@piwikAlert"}},directiveName:"piwikAlert",transclude:!0});
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function yr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wr(e,t,n,r,a,i){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["alert",yr({},"alert-".concat(e.severity),!0)])},[Object(o["renderSlot"])(e.$slots,"default")],2)}var kr=Object(o["defineComponent"])({props:{severity:{type:String,required:!0}}});kr.render=wr;var Dr=kr,Or=yt({component:Dr,scope:{severity:{vue:"severity",angularJsBind:"@piwikAlert"}},directiveName:"piwikAlert",transclude:!0});
+ */function Cr(e,t,n){var r=new Date;n||(n=432e4),r.setTime(r.getTime()+n),document.cookie="".concat(e,"=").concat(t,"; expires=").concat(r.toUTCString(),"; path=/")}function Sr(e){var t="; ".concat(document.cookie),n=t.split("; ".concat(e,"="));if(2==n.length){var r=n.pop().split(";").shift();if("undefined"!==typeof r)return r}return null}function Pr(e){var t=new Date;t.setTime(t.getTime()+-864e5),document.cookie="".concat(e,"=; expires=").concat(t.toUTCString(),"; path=/")}var Er={key:0},Tr=["data-notification-instance-id"],xr={key:1},Ir={class:"notification-body"},Nr=["innerHTML"],$r={key:1};function Br(e,t,n,r,a,i){return Object(o["openBlock"])(),Object(o["createBlock"])(o["Transition"],{name:"toast"===e.type?"slow-fade-out":void 0,onAfterLeave:t[1]||(t[1]=function(t){return e.toastClosed()})},{default:Object(o["withCtx"])((function(){return[e.deleted?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Er,[Object(o["createVNode"])(o["Transition"],{name:"toast"===e.type?"toast-slide-up":void 0,appear:""},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(o["Transition"],{name:e.animate?"fade-in":void 0,appear:""},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("div",{class:Object(o["normalizeClass"])(["notification system",e.cssClasses]),style:Object(o["normalizeStyle"])(e.style),ref:"root","data-notification-instance-id":e.notificationInstanceId},[e.canClose?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:0,type:"button",class:"close","data-dismiss":"alert",onClick:t[0]||(t[0]=function(t){return e.closeNotification(t)})}," × ")):Object(o["createCommentVNode"])("",!0),e.title?(Object(o["openBlock"])(),Object(o["createElementBlock"])("strong",xr,Object(o["toDisplayString"])(e.title),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Ir,[e.message?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.message)},null,8,Nr)):Object(o["createCommentVNode"])("",!0),e.message?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",$r,[Object(o["renderSlot"])(e.$slots,"default")]))])],14,Tr)]})),_:3},8,["name"])])]})),_:3},8,["name"])]))]})),_:3},8,["name"])}var Hr=window,Ar=Hr.$,Mr=Object(o["defineComponent"])({props:{notificationId:String,notificationInstanceId:String,title:String,context:String,type:String,noclear:Boolean,toastLength:{type:Number,default:12e3},style:[String,Object],animate:Boolean,message:String,cssClass:String},computed:{cssClasses:function(){var e={};return this.context&&(e["notification-".concat(this.context)]=!0),this.cssClass&&(e[this.cssClass]=!0),e},canClose:function(){return"persistent"===this.type||!this.noclear}},emits:["closed"],data:function(){return{deleted:!1}},mounted:function(){var e=this,t=function(){setTimeout((function(){e.deleted=!0}),e.toastLength)};"toast"===this.type&&t(),this.style&&Ar(this.$refs.root).css(this.style)},methods:{toastClosed:function(){var e=this;Object(o["nextTick"])((function(){e.$emit("closed")}))},closeNotification:function(e){var t=this;this.canClose&&e&&e.target&&(this.deleted=!0,Object(o["nextTick"])((function(){t.$emit("closed")}))),this.markNotificationAsRead()},markNotificationAsRead:function(){this.notificationId&&Ne.fetch({module:"CoreHome",action:"markNotificationAsRead"},{postParams:{notificationId:this.notificationId}})}}});Mr.render=Br;var Fr=Mr;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function jr(e,t,n){var r=new Date;n||(n=432e4),r.setTime(r.getTime()+n),document.cookie="".concat(e,"=").concat(t,"; expires=").concat(r.toUTCString(),"; path=/")}function Cr(e){var t="; ".concat(document.cookie),n=t.split("; ".concat(e,"="));if(2==n.length){var r=n.pop().split(";").shift();if("undefined"!==typeof r)return r}return null}function Pr(e){var t=new Date;t.setTime(t.getTime()+-864e5),document.cookie="".concat(e,"=; expires=").concat(t.toUTCString(),"; path=/")}
+ */wt({component:Fr,scope:{notificationId:{angularJsBind:"@?"},title:{angularJsBind:"@?notificationTitle"},context:{angularJsBind:"@?"},type:{angularJsBind:"@?"},noclear:{angularJsBind:"@?",transform:function(e){return!!e}},toastLength:{angularJsBind:"@?"}},directiveName:"piwikNotification",transclude:!0});function Vr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vr(Object(n),!0).forEach((function(t){Jr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Rr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ur(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _r(e,t,n){return t&&Ur(e.prototype,t),n&&Ur(e,n),e}function Jr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */var Gr=function(){function e(){Rr(this,e),Jr(this,"privateState",Object(o["reactive"])({notifications:[]})),Jr(this,"nextNotificationId",0)}return _r(e,[{key:"state",get:function(){return this.privateState}},{key:"appendNotification",value:function(e){this.checkMessage(e.message),e.id&&this.remove(e.id),this.privateState.notifications.push(e)}},{key:"prependNotification",value:function(e){this.checkMessage(e.message),e.id&&this.remove(e.id),this.privateState.notifications.unshift(e)}},{key:"remove",value:function(e){this.privateState.notifications=this.privateState.notifications.filter((function(t){return t.id!==e}))}},{key:"parseNotificationDivs",value:function(){var e=this,t=$('[data-role="notification"]'),n=[];t.each((function(e,r){var a=$(r),o=a.data(),i=a.html();i&&n.push(Lr(Lr({},o),{},{message:i,animate:!1})),t.remove()})),n.forEach((function(t){return e.show(t)}))}},{key:"clearTransientNotifications",value:function(){this.privateState.notifications=this.privateState.notifications.filter((function(e){return"transient"!==e.type}))}},{key:"show",value:function(e){this.checkMessage(e.message);var t=this.appendNotification,n="#notificationContainer";if(e.placeat)n=e.placeat;else{var r=".modal.open .modal-content";document.querySelector(r)&&(n=r,t=this.prependNotification)}var a=e.group||(e.placeat?e.placeat.toString():"");this.initializeNotificationContainer(n,a);var o=(this.nextNotificationId+=1).toString();return t.call(this,Lr(Lr({},e),{},{noclear:!!e.noclear,group:a,notificationId:e.id,notificationInstanceId:o,type:e.type||"transient"})),o}},{key:"scrollToNotification",value:function(e){setTimeout((function(){var t=document.querySelector("[data-notification-instance-id='".concat(e,"']"));t&&D.helper.lazyScrollTo(t,250)}))}},{key:"toast",value:function(e){this.checkMessage(e.message);var t=$(e.placeat);if(!t.length)throw new Error("A valid selector is required for the placeat option when using Notification.toast().");var n=document.createElement("div");n.style.position="absolute",n.style.top="".concat(t.offset().top,"px"),n.style.left="".concat(t.offset().left,"px"),n.style.zIndex="1000",document.body.appendChild(n);var r=Object(o["createApp"])({render:function(){return Object(o["createVNode"])(Fr,Lr(Lr({},e),{},{notificationId:e.id,type:"toast",onClosed:function(){r.unmount()}}))}});r.config.globalProperties.$sanitize=window.vueSanitize,r.config.globalProperties.translate=C,r.mount(n)}},{key:"initializeNotificationContainer",value:function(e,t){var n=window.$(e);if(!n.children(".notification-group").length){var r=window.CoreHome.NotificationGroup,a=Object(o["createApp"])({template:'<NotificationGroup :group="group"></NotificationGroup>',data:function(){return{group:t}}});a.config.globalProperties.$sanitize=window.vueSanitize,a.config.globalProperties.translate=C,a.component("NotificationGroup",r),a.mount(n[0])}}},{key:"checkMessage",value:function(e){if(!e)throw new Error("No message given, cannot display notification")}}]),e}(),qr=new Gr,zr=qr;$((function(){return qr.parseNotificationDivs()})),
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+angular.module("piwikApp").factory("notifications",(function(){return zr}));var Qr={class:"notification-group"},Yr=["innerHTML"];function Wr(e,t,n,r,a,i){var c=Object(o["resolveComponent"])("Notification");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Qr,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.notifications,(function(t,n){return Object(o["openBlock"])(),Object(o["createBlock"])(c,{key:t.id||"no-id-".concat(n),"notification-id":t.id,title:t.title,context:t.context,type:t.type,noclear:t.noclear,"toast-length":t.toastLength,style:Object(o["normalizeStyle"])(t.style),animate:t.animate,message:t.message,"notification-instance-id":t.notificationInstanceId,"css-class":t.class,onClosed:function(n){return e.removeNotification(t.id)}},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("div",{innerHTML:e.$sanitize(t.message)},null,8,Yr)]})),_:2},1032,["notification-id","title","context","type","noclear","toast-length","style","animate","message","notification-instance-id","css-class","onClosed"])})),128))])}var Kr=Object(o["defineComponent"])({props:{group:String},components:{Notification:Fr},computed:{notifications:function(){var e=this;return zr.state.notifications.filter((function(t){return e.group?e.group===t.group:!t.group}))}},methods:{removeNotification:function(e){zr.remove(e)}}});Kr.render=Wr;var Xr=Kr;
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
/*!
* Matomo - free/libre analytics platform
*
diff --git a/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts b/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts
index b1bf30ca7f..f128ae6c32 100644
--- a/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts
+++ b/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts
@@ -9,6 +9,11 @@ import jqXHR = JQuery.jqXHR;
import MatomoUrl from '../MatomoUrl/MatomoUrl';
import Matomo from '../Matomo/Matomo';
+interface AjaxOptions {
+ withTokenInUrl?: boolean;
+ postParams?: QueryParameters;
+}
+
window.globalAjaxQueue = [] as unknown as GlobalAjaxQueue;
window.globalAjaxQueue.active = 0;
@@ -148,10 +153,16 @@ export default class AjaxHelper<T = any> { // eslint-disable-line
defaultParams = ['idSite', 'period', 'date', 'segment'];
// helper method entry point
- static fetch<R = any>(params: QueryParameters): Promise<R> { // eslint-disable-line
+ static fetch<R = any>(params: QueryParameters, options: AjaxOptions = {}): Promise<R> { // eslint-disable-line
const helper = new AjaxHelper<R>();
+ if (options.withTokenInUrl) {
+ helper.withTokenInUrl();
+ }
helper.setFormat('json');
helper.addParams({ module: 'API', format: 'json', ...params }, 'get');
+ if (options.postParams) {
+ helper.addParams(options.postParams, 'post');
+ }
return helper.send();
}
diff --git a/plugins/CoreHome/vue/src/FocusIf/FocusIf.adapter.ts b/plugins/CoreHome/vue/src/FocusIf/FocusIf.adapter.ts
index a2226866ad..2d48e8f254 100644
--- a/plugins/CoreHome/vue/src/FocusIf/FocusIf.adapter.ts
+++ b/plugins/CoreHome/vue/src/FocusIf/FocusIf.adapter.ts
@@ -21,8 +21,8 @@ function piwikFocusIf(): IDirective {
scope.$watch(attrs.piwikFocusIf, (newValue) => {
const binding = {
instance: null,
+ arg: newValue ? '1' : undefined,
value: {
- focusIf: !!newValue,
afterFocus: () => scope.$apply(),
},
oldValue: null,
diff --git a/plugins/CoreHome/vue/src/FocusIf/FocusIf.ts b/plugins/CoreHome/vue/src/FocusIf/FocusIf.ts
index 665f2774c3..6a13e46ff0 100644
--- a/plugins/CoreHome/vue/src/FocusIf/FocusIf.ts
+++ b/plugins/CoreHome/vue/src/FocusIf/FocusIf.ts
@@ -8,20 +8,26 @@
import { DirectiveBinding } from 'vue';
interface FocusIfArgs {
- focusIf: boolean;
afterFocus?: () => void;
}
+function doFocusIf(el: HTMLElement, binding: DirectiveBinding<FocusIfArgs>): void {
+ if (binding.arg) {
+ setTimeout(() => {
+ el.focus();
+
+ if (binding.value.afterFocus) {
+ binding.value.afterFocus();
+ }
+ }, 5);
+ }
+}
+
export default {
+ mounted(el: HTMLElement, binding: DirectiveBinding<FocusIfArgs>): void {
+ doFocusIf(el, binding);
+ },
updated(el: HTMLElement, binding: DirectiveBinding<FocusIfArgs>): void {
- if (binding.value.focusIf) {
- setTimeout(() => {
- el.focus();
-
- if (binding.value.afterFocus) {
- binding.value.afterFocus();
- }
- }, 5);
- }
+ doFocusIf(el, binding);
},
};
diff --git a/plugins/CoreHome/vue/src/Menudropdown/Menudropdown.vue b/plugins/CoreHome/vue/src/Menudropdown/Menudropdown.vue
index de879274bd..fdd26bfdba 100644
--- a/plugins/CoreHome/vue/src/Menudropdown/Menudropdown.vue
+++ b/plugins/CoreHome/vue/src/Menudropdown/Menudropdown.vue
@@ -29,6 +29,7 @@
<input
type="text"
v-model="searchTerm"
+ v-focus-if:[showItems]="{}"
@keydown="onSearchTermKeydown($event)"
:placeholder="translate('General_Search')"
/>
diff --git a/plugins/CoreHome/vue/src/Notification/Notification.adapter.ts b/plugins/CoreHome/vue/src/Notification/Notification.adapter.ts
new file mode 100644
index 0000000000..5845718976
--- /dev/null
+++ b/plugins/CoreHome/vue/src/Notification/Notification.adapter.ts
@@ -0,0 +1,36 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+import createAngularJsAdapter from '../createAngularJsAdapter';
+import Notification from './Notification.vue';
+
+export default createAngularJsAdapter({
+ component: Notification,
+ scope: {
+ notificationId: {
+ angularJsBind: '@?',
+ },
+ title: {
+ angularJsBind: '@?notificationTitle',
+ },
+ context: {
+ angularJsBind: '@?',
+ },
+ type: {
+ angularJsBind: '@?',
+ },
+ noclear: {
+ angularJsBind: '@?',
+ transform: (v) => !!v,
+ },
+ toastLength: {
+ angularJsBind: '@?',
+ },
+ },
+ directiveName: 'piwikNotification',
+ transclude: true,
+});
diff --git a/plugins/CoreHome/angularjs/notification/notification.directive.less b/plugins/CoreHome/vue/src/Notification/Notification.less
index ae372d74b6..9bafc751c9 100644
--- a/plugins/CoreHome/angularjs/notification/notification.directive.less
+++ b/plugins/CoreHome/vue/src/Notification/Notification.less
@@ -8,6 +8,10 @@
margin-top: 1em;
}
+ .notification-body {
+ min-width: 50px;
+ }
+
// We have to use !important because the default button style is crazy
.close {
position: relative;
@@ -23,6 +27,7 @@
color: inherit !important;
opacity: 0.3;
filter: alpha(opacity=30);
+ cursor: pointer;
}
&.notification-success {
@@ -59,7 +64,7 @@
}
}
- .help-notification &.notification-info {
+ &.help-notification.notification-info {
background-color: @theme-color-help-background-color;
&:before {
@@ -67,3 +72,12 @@
}
}
}
+
+// toast-slide-up transition
+.toast-slide-up-enter-active {
+ transition: transform .3s ease;
+}
+
+.toast-slide-up-enter-from {
+ transform: translateY(-100%);
+}
diff --git a/plugins/CoreHome/vue/src/Notification/Notification.vue b/plugins/CoreHome/vue/src/Notification/Notification.vue
new file mode 100644
index 0000000000..e25dcb1711
--- /dev/null
+++ b/plugins/CoreHome/vue/src/Notification/Notification.vue
@@ -0,0 +1,145 @@
+<!--
+ Matomo - free/libre analytics platform
+ @link https://matomo.org
+ @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+-->
+
+<template>
+ <transition
+ :name="type === 'toast' ? 'slow-fade-out' : undefined"
+ @after-leave="toastClosed()"
+ >
+ <div v-if="!deleted">
+ <transition :name="type === 'toast' ? 'toast-slide-up' : undefined" appear>
+ <div>
+ <transition :name="animate ? 'fade-in' : undefined" appear>
+ <div
+ class="notification system"
+ :class="cssClasses"
+ :style="style"
+ ref="root"
+ :data-notification-instance-id="notificationInstanceId"
+ >
+ <button
+ type="button"
+ class="close"
+ data-dismiss="alert"
+ v-if="canClose"
+ v-on:click="closeNotification($event)"
+ >
+ &times;
+ </button>
+ <strong v-if="title">{{ title }}</strong>
+ <!-- ng-transclude causes directive child elements to be added here -->
+ <div class="notification-body">
+ <div v-if="message" v-html="$sanitize(message)"/>
+ <div v-if="!message">
+ <slot />
+ </div>
+ </div>
+ </div>
+ </transition>
+ </div>
+ </transition>
+ </div>
+ </transition>
+</template>
+
+<script lang="ts">
+import { defineComponent, nextTick } from 'vue';
+import AjaxHelper from '../AjaxHelper/AjaxHelper';
+
+const { $ } = window;
+
+export default defineComponent({
+ props: {
+ notificationId: String,
+ // NOTE: notificationId refers to server side ID for notifications stored in the session.
+ // this ID is just so it can be selected outside of this component (just for scrolling).
+ notificationInstanceId: String,
+ title: String,
+ context: String,
+ type: String,
+ noclear: Boolean,
+ toastLength: {
+ type: Number,
+ default: 12 * 1000,
+ },
+ style: [String, Object],
+ animate: Boolean,
+ message: String,
+ cssClass: String,
+ },
+ computed: {
+ cssClasses() {
+ const result: Record<string, boolean> = {};
+ if (this.context) {
+ result[`notification-${this.context}`] = true;
+ }
+ if (this.cssClass) {
+ result[this.cssClass] = true;
+ }
+ return result;
+ },
+ canClose() {
+ if (this.type === 'persistent') {
+ // otherwise it is never possible to dismiss the notification
+ return true;
+ }
+
+ return !this.noclear;
+ },
+ },
+ emits: ['closed'],
+ data() {
+ return {
+ deleted: false,
+ };
+ },
+ mounted() {
+ const addToastEvent = () => {
+ setTimeout(() => {
+ this.deleted = true;
+ }, this.toastLength);
+ };
+
+ if (this.type === 'toast') {
+ addToastEvent();
+ }
+
+ if (this.style) {
+ $(this.$refs.root).css(this.style);
+ }
+ },
+ methods: {
+ toastClosed() {
+ nextTick(() => {
+ this.$emit('closed');
+ });
+ },
+ closeNotification(event: MouseEvent) {
+ if (this.canClose && event && event.target) {
+ this.deleted = true;
+
+ nextTick(() => {
+ this.$emit('closed');
+ });
+ }
+
+ this.markNotificationAsRead();
+ },
+ markNotificationAsRead() {
+ if (!this.notificationId) {
+ return;
+ }
+
+ AjaxHelper.fetch({ // GET params
+ module: 'CoreHome',
+ action: 'markNotificationAsRead',
+ }, { // POST params
+ postParams: { notificationId: this.notificationId },
+ });
+ },
+ },
+});
+</script>
diff --git a/plugins/CoreHome/vue/src/Notification/NotificationGroup.vue b/plugins/CoreHome/vue/src/Notification/NotificationGroup.vue
new file mode 100644
index 0000000000..f581822ba6
--- /dev/null
+++ b/plugins/CoreHome/vue/src/Notification/NotificationGroup.vue
@@ -0,0 +1,59 @@
+<!--
+ Matomo - free/libre analytics platform
+ @link https://matomo.org
+ @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+-->
+
+<template>
+ <div class="notification-group">
+ <Notification
+ v-for="(notification, index) in notifications"
+ :key="notification.id || `no-id-${index}`"
+ :notification-id="notification.id"
+ :title="notification.title"
+ :context="notification.context"
+ :type="notification.type"
+ :noclear="notification.noclear"
+ :toast-length="notification.toastLength"
+ :style="notification.style"
+ :animate="notification.animate"
+ :message="notification.message"
+ :notification-instance-id="notification.notificationInstanceId"
+ :css-class="notification.class"
+ @closed="removeNotification(notification.id)"
+ >
+ <div v-html="$sanitize(notification.message)"/>
+ </Notification>
+ </div>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+import NotificationsStore from './Notifications.store';
+import Notification from './Notification.vue';
+
+export default defineComponent({
+ props: {
+ group: String,
+ },
+ components: {
+ Notification,
+ },
+ computed: {
+ notifications() {
+ return NotificationsStore.state.notifications.filter((n) => {
+ if (this.group) {
+ return this.group === n.group;
+ }
+
+ return !n.group;
+ });
+ },
+ },
+ methods: {
+ removeNotification(id: string) {
+ NotificationsStore.remove(id);
+ },
+ },
+});
+</script>
diff --git a/plugins/CoreHome/vue/src/Notification/Notifications.store.adapter.ts b/plugins/CoreHome/vue/src/Notification/Notifications.store.adapter.ts
new file mode 100644
index 0000000000..95cacccbcd
--- /dev/null
+++ b/plugins/CoreHome/vue/src/Notification/Notifications.store.adapter.ts
@@ -0,0 +1,10 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+import NotificationsStore from './Notifications.store';
+
+angular.module('piwikApp').factory('notifications', () => NotificationsStore);
diff --git a/plugins/CoreHome/vue/src/Notification/Notifications.store.ts b/plugins/CoreHome/vue/src/Notification/Notifications.store.ts
new file mode 100644
index 0000000000..e014e9beda
--- /dev/null
+++ b/plugins/CoreHome/vue/src/Notification/Notifications.store.ts
@@ -0,0 +1,275 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+import {
+ DeepReadonly,
+ reactive,
+ createVNode,
+ createApp,
+} from 'vue';
+import NotificationComponent from './Notification.vue';
+import translate from '../translate';
+import Matomo from '../Matomo/Matomo';
+
+interface Notification {
+ /**
+ * Only needed for persistent notifications. The id will be sent to the
+ * frontend once the user closes the notifications. The notification has to
+ * be registered/notified under this name.
+ */
+ id?: string;
+
+ /**
+ * Unique ID generated for the notification so it can be referenced specifically
+ * to scroll to.
+ */
+ notificationInstanceId: string;
+
+ /**
+ * Determines which notification group a notification is meant to be displayed
+ * in.
+ */
+ group?: string;
+
+ /**
+ * The title of the notification. For instance the plugin name.
+ */
+ title?: string;
+
+ /**
+ * The actual message that will be displayed. Must be set.
+ */
+ message: string;
+
+ /**
+ * Context of the notification: 'info', 'warning', 'success' or 'error'
+ */
+ context: 'success'|'error'|'info'|'warning';
+
+ /**
+ * The type of the notification: Either 'toast' or 'transient'. 'persistent' is valid, but
+ * has no effect if only specified client side.
+ */
+ type: 'toast'|'persistent'|'transient';
+
+ /**
+ * If set, the close icon is not displayed.
+ */
+ noclear?: boolean;
+
+ /**
+ * The number of milliseconds before a toast animation disappears.
+ */
+ toastLength?: number;
+
+ /**
+ * Optional style/css dictionary. For instance {'display': 'inline-block'}
+ */
+ style?: string|Record<string, unknown>;
+
+ /**
+ * Optional CSS class to add.
+ */
+ class?: string;
+
+ /**
+ * If true, fades the animation in.
+ */
+ animate?: boolean;
+
+ /**
+ * Where to place the notification. Required if showing a toast.
+ */
+ placeat?: string|HTMLElement|JQuery;
+}
+
+interface NotificationsData {
+ notifications: Notification[];
+}
+
+class NotificationsStore {
+ private privateState: NotificationsData = reactive<NotificationsData>({
+ notifications: [],
+ });
+
+ private nextNotificationId = 0;
+
+ get state(): DeepReadonly<NotificationsData> {
+ return this.privateState;
+ }
+
+ appendNotification(notification: Notification): void {
+ this.checkMessage(notification.message);
+
+ // remove existing notification before adding
+ if (notification.id) {
+ this.remove(notification.id);
+ }
+ this.privateState.notifications.push(notification);
+ }
+
+ prependNotification(notification: Notification): void {
+ this.checkMessage(notification.message);
+
+ // remove existing notification before adding
+ if (notification.id) {
+ this.remove(notification.id);
+ }
+ this.privateState.notifications.unshift(notification);
+ }
+
+ /**
+ * Removes a previously shown notification having the given notification id.
+ */
+ remove(id: string): void {
+ this.privateState.notifications = this.privateState.notifications.filter(
+ (n) => n.id !== id,
+ );
+ }
+
+ parseNotificationDivs(): void {
+ const $notificationNodes = $('[data-role="notification"]');
+
+ const notificationsToShow = [];
+ $notificationNodes.each((index, notificationNode) => {
+ const $notificationNode = $(notificationNode);
+ const attributes = $notificationNode.data();
+ const message = $notificationNode.html();
+
+ if (message) {
+ notificationsToShow.push({ ...attributes, message, animate: false });
+ }
+
+ $notificationNodes.remove();
+ });
+
+ notificationsToShow.forEach((n) => this.show(n));
+ }
+
+ clearTransientNotifications(): void {
+ this.privateState.notifications = this.privateState.notifications.filter(
+ (n) => n.type !== 'transient',
+ );
+ }
+
+ /**
+ * Creates a notification and shows it to the user.
+ */
+ show(notification: Notification): string {
+ this.checkMessage(notification.message);
+
+ let addMethod = this.appendNotification;
+
+ let notificationPosition: typeof Notification['placeat'] = '#notificationContainer';
+ if (notification.placeat) {
+ notificationPosition = notification.placeat;
+ } else {
+ // If a modal is open, we want to make sure the error message is visible and therefore
+ // show it within the opened modal
+ const modalSelector = '.modal.open .modal-content';
+ if (document.querySelector(modalSelector)) {
+ notificationPosition = modalSelector;
+ addMethod = this.prependNotification;
+ }
+ }
+
+ const group = notification.group
+ || (notification.placeat ? notification.placeat.toString() : '');
+
+ this.initializeNotificationContainer(notificationPosition, group);
+
+ const notificationInstanceId = (this.nextNotificationId += 1).toString();
+
+ addMethod.call(this, {
+ ...notification,
+ noclear: !!notification.noclear,
+ group,
+ notificationId: notification.id,
+ notificationInstanceId,
+ type: notification.type || 'transient',
+ });
+
+ return notificationInstanceId;
+ }
+
+ scrollToNotification(notificationInstanceId: string) {
+ setTimeout(() => {
+ const element = document.querySelector(`[data-notification-instance-id='${notificationInstanceId}']`);
+ if (element) {
+ Matomo.helper.lazyScrollTo(element, 250);
+ }
+ });
+ }
+
+ /**
+ * Shows a notification at a certain point with a quick upwards animation.
+ */
+ toast(notification: Notification): void {
+ this.checkMessage(notification.message);
+
+ const $placeat = $(notification.placeat);
+ if (!$placeat.length) {
+ throw new Error('A valid selector is required for the placeat option when using Notification.toast().');
+ }
+
+ const toastElement = document.createElement('div');
+ toastElement.style.position = 'absolute';
+ toastElement.style.top = `${$placeat.offset().top}px`;
+ toastElement.style.left = `${$placeat.offset().left}px`;
+ toastElement.style.zIndex = '1000';
+ document.body.appendChild(toastElement);
+
+ const app = createApp({
+ render: () => createVNode(NotificationComponent, {
+ ...notification,
+ notificationId: notification.id,
+ type: 'toast',
+ onClosed: () => {
+ app.unmount();
+ },
+ }),
+ });
+ app.config.globalProperties.$sanitize = window.vueSanitize;
+ app.config.globalProperties.translate = translate;
+ app.mount(toastElement);
+ }
+
+ private initializeNotificationContainer(
+ notificationPosition: typeof Notification['placeat'],
+ group: string,
+ ) {
+ const $container = window.$(notificationPosition);
+ if ($container.children('.notification-group').length) {
+ return;
+ }
+
+ // avoiding a dependency cycle. won't need to do this when NotificationGroup's do not need
+ // to be dynamically initialized.
+ const NotificationGroup = (window as any).CoreHome.NotificationGroup; // eslint-disable-line
+
+ const app = createApp({
+ template: '<NotificationGroup :group="group"></NotificationGroup>',
+ data: () => ({ group }),
+ });
+ app.config.globalProperties.$sanitize = window.vueSanitize;
+ app.config.globalProperties.translate = translate;
+ app.component('NotificationGroup', NotificationGroup);
+ app.mount($container[0]);
+ }
+
+ private checkMessage(message: string) {
+ if (!message) {
+ throw new Error('No message given, cannot display notification');
+ }
+ }
+}
+
+const instance = new NotificationsStore();
+export default instance;
+
+// parse notifications on dom load
+$(() => instance.parseNotificationDivs());
diff --git a/plugins/CoreHome/vue/src/Notification/index.ts b/plugins/CoreHome/vue/src/Notification/index.ts
new file mode 100644
index 0000000000..abcc74b952
--- /dev/null
+++ b/plugins/CoreHome/vue/src/Notification/index.ts
@@ -0,0 +1,12 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+import './Notification.adapter';
+import './Notifications.store.adapter';
+
+export { default as Notification } from './Notification.vue';
+export { default as NotificationGroup } from './NotificationGroup.vue';
+export { default as NotificationsStore } from './Notifications.store';
diff --git a/plugins/CoreHome/vue/src/createAngularJsAdapter.ts b/plugins/CoreHome/vue/src/createAngularJsAdapter.ts
index 12ff8382bd..b28ee95d33 100644
--- a/plugins/CoreHome/vue/src/createAngularJsAdapter.ts
+++ b/plugins/CoreHome/vue/src/createAngularJsAdapter.ts
@@ -16,6 +16,7 @@ import translate from './translate';
interface SingleScopeVarInfo {
vue?: string;
default?: any; // eslint-disable-line
+ transform?: (v: unknown) => unknown;
angularJsBind?: string;
}
@@ -147,6 +148,9 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: {
? info.default(ngScope, ngElement, ngAttrs, ...injectedServices)
: info.default;
}
+ if (info.transform) {
+ value = info.transform(value);
+ }
initialData[info.vue] = value;
});
return initialData;
@@ -191,13 +195,16 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: {
}
ngScope.$watch(scopeVarName, (newValue: any) => { // eslint-disable-line
+ let newValueFinal = newValue;
if (typeof info.default !== 'undefined' && typeof newValue === 'undefined') {
- vm[scopeVarName] = info.default instanceof Function
+ newValueFinal = info.default instanceof Function
? info.default(ngScope, ngElement, ngAttrs, ...injectedServices)
: info.default;
- } else {
- vm[scopeVarName] = newValue;
}
+ if (info.transform) {
+ newValueFinal = info.transform(newValueFinal);
+ }
+ vm[scopeVarName] = newValueFinal;
});
});
diff --git a/plugins/CoreHome/vue/src/index.ts b/plugins/CoreHome/vue/src/index.ts
index 4755fabc73..baaada6b9a 100644
--- a/plugins/CoreHome/vue/src/index.ts
+++ b/plugins/CoreHome/vue/src/index.ts
@@ -52,3 +52,4 @@ export { default as Menudropdown } from './Menudropdown/Menudropdown.vue';
export { default as DatePicker } from './DatePicker/DatePicker.vue';
export { default as DateRangePicker } from './DateRangePicker/DateRangePicker.vue';
export { default as PeriodDatePicker } from './PeriodDatePicker/PeriodDatePicker.vue';
+export * from './Notification';