diff options
126 files changed, 2497 insertions, 1789 deletions
diff --git a/.eslintrc.js b/.eslintrc.js index beafc79a5b..04167dee14 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -28,5 +28,11 @@ module.exports = { 'no-param-reassign': ["error", { "props": false }], 'camelcase': 'off', '@typescript-eslint/no-non-null-assertion': 'off', + + // typescript will provide similar error messages, potentially conflicting ones, for + // the following rules, so we disable them + 'no-undef': 'off', + 'no-undef-init': 'off', + 'import/extensions': 'off', }, }; diff --git a/.gitignore b/.gitignore index 99884d359a..d4f751b554 100644 --- a/.gitignore +++ b/.gitignore @@ -106,4 +106,4 @@ docker-compose.yml /plugins/*/vue/dist/*.map /plugins/*/vue/dist/*.development.* /plugins/CoreVue/polyfills/dist/MatomoPolyfills.min.js.map - +/@types diff --git a/core/AssetManager/UIAssetFetcher/JScriptUIAssetFetcher.php b/core/AssetManager/UIAssetFetcher/JScriptUIAssetFetcher.php index 989b8c4abf..b9a4b3838b 100644 --- a/core/AssetManager/UIAssetFetcher/JScriptUIAssetFetcher.php +++ b/core/AssetManager/UIAssetFetcher/JScriptUIAssetFetcher.php @@ -99,7 +99,7 @@ class JScriptUIAssetFetcher extends UIAssetFetcher private function addUmdFilesIfDetected($plugins) { - $plugins = $this->orderPluginsByPluginDependencies($plugins); + $plugins = self::orderPluginsByPluginDependencies($plugins); foreach ($plugins as $plugin) { $devUmd = "plugins/$plugin/vue/dist/$plugin.development.umd.js"; @@ -117,18 +117,18 @@ class JScriptUIAssetFetcher extends UIAssetFetcher } } - private function orderPluginsByPluginDependencies($plugins) + public static function orderPluginsByPluginDependencies($plugins) { $result = []; while (!empty($plugins)) { - $this->visitPlugin(reset($plugins), $plugins, $result); + self::visitPlugin(reset($plugins), $plugins, $result); } return $result; } - private function visitPlugin($plugin, &$plugins, &$result) + private static function visitPlugin($plugin, &$plugins, &$result) { // remove the plugin from the array of plugins to visit $index = array_search($plugin, $plugins); @@ -149,7 +149,7 @@ class JScriptUIAssetFetcher extends UIAssetFetcher if (!empty($pluginDependencies['dependsOn'])) { // visit each plugin this one depends on first, so it is loaded first foreach ($pluginDependencies['dependsOn'] as $pluginDependency) { - $this->visitPlugin($pluginDependency, $plugins, $result); + self::visitPlugin($pluginDependency, $plugins, $result); } } diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.js b/plugins/CoreHome/vue/dist/CoreHome.umd.js index eee35cf17f..40b4fb7791 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.js @@ -129,6 +129,7 @@ __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, "createVueApp", function() { return /* reexport */ createVueApp; }); +__webpack_require__.d(__webpack_exports__, "useExternalPluginComponent", function() { return /* reexport */ useExternalPluginComponent; }); __webpack_require__.d(__webpack_exports__, "DirectiveUtilities", function() { return /* reexport */ directiveUtilities; }); __webpack_require__.d(__webpack_exports__, "debounce", function() { return /* reexport */ debounce; }); __webpack_require__.d(__webpack_exports__, "createAngularJsAdapter", function() { return /* reexport */ createAngularJsAdapter; }); @@ -1284,8 +1285,7 @@ function piwikUrl() { return model; } -piwikUrl.$inject = []; -angular.module('piwikApp.service').service('piwikUrl', piwikUrl); +window.angular.module('piwikApp.service').service('piwikUrl', piwikUrl); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Matomo/Matomo.adapter.ts /*! * Matomo - free/libre analytics platform @@ -1996,7 +1996,8 @@ var AjaxHelper_AjaxHelper = /*#__PURE__*/function () { * Handle for current request */ // helper method entry point - function fetch(params) { + function fetch( // eslint-disable-line + params) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var helper = new AjaxHelper(); @@ -2038,7 +2039,8 @@ var AjaxHelper_AjaxHelper = /*#__PURE__*/function () { }, { key: "post", - value: function post(params, postParams) { + value: function post(params, // eslint-disable-next-line + postParams) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; return this.fetch(params, AjaxHelper_objectSpread(AjaxHelper_objectSpread({}, options), {}, { postParams: postParams @@ -2055,10 +2057,10 @@ var AjaxHelper_AjaxHelper = /*#__PURE__*/function () { window.ajaxHelper = AjaxHelper_AjaxHelper; function ajaxQueue() { - return globalAjaxQueue; + return window.globalAjaxQueue; } -angular.module('piwikApp.service').service('globalAjaxQueue', ajaxQueue); +window.angular.module('piwikApp.service').service('globalAjaxQueue', ajaxQueue); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PopoverHandler/PopoverHandler.ts function PopoverHandler_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -2245,7 +2247,7 @@ function piwikDropdownMenu($timeout) { } piwikDropdownMenu.$inject = ['$timeout']; -angular.module('piwikApp').directive('piwikDropdownMenu', piwikDropdownMenu); +window.angular.module('piwikApp').directive('piwikDropdownMenu', piwikDropdownMenu); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.ts /*! * Matomo - free/libre analytics platform @@ -2364,8 +2366,7 @@ function piwikFocusAnywhereButHere() { }; } -piwikFocusAnywhereButHere.$inject = []; -angular.module('piwikApp.directive').directive('piwikFocusAnywhereButHere', piwikFocusAnywhereButHere); +window.angular.module('piwikApp.directive').directive('piwikFocusAnywhereButHere', piwikFocusAnywhereButHere); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/FocusIf/FocusIf.ts /*! * Matomo - free/libre analytics platform @@ -2431,7 +2432,7 @@ function piwikFocusIf() { }; } -angular.module('piwikApp.directive').directive('piwikFocusIf', piwikFocusIf); +window.angular.module('piwikApp.directive').directive('piwikFocusIf', piwikFocusIf); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/directiveUtilities.ts /*! * Matomo - free/libre analytics platform @@ -2440,7 +2441,9 @@ angular.module('piwikApp.directive').directive('piwikFocusIf', piwikFocusIf); * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function getRef(expander, binding) { - return expander instanceof HTMLElement ? expander : binding.instance.$refs[expander]; + var _binding$instance; + + return expander instanceof HTMLElement ? expander : (_binding$instance = binding.instance) === null || _binding$instance === void 0 ? void 0 : _binding$instance.$refs[expander]; } /* harmony default export */ var directiveUtilities = ({ @@ -2517,7 +2520,10 @@ var ExpandOnClick_doc = document.documentElement; binding.value.onScroll = ExpandOnClick_onScroll.bind(null, binding); setTimeout(function () { var expander = directiveUtilities.getRef(binding.value.expander, binding); - expander.addEventListener('click', binding.value.onExpand); + + if (expander) { + expander.addEventListener('click', binding.value.onExpand); + } }); ExpandOnClick_doc.addEventListener('keyup', binding.value.onEscapeHandler); ExpandOnClick_doc.addEventListener('mousedown', binding.value.onMouseDown); @@ -2526,7 +2532,11 @@ var ExpandOnClick_doc = document.documentElement; }, unmounted: function unmounted(el, binding) { var expander = directiveUtilities.getRef(binding.value.expander, binding); - expander.removeEventListener('click', binding.value.onExpand); + + if (expander) { + expander.removeEventListener('click', binding.value.onExpand); + } + ExpandOnClick_doc.removeEventListener('keyup', binding.value.onEscapeHandler); ExpandOnClick_doc.removeEventListener('mousedown', binding.value.onMouseDown); ExpandOnClick_doc.removeEventListener('mouseup', binding.value.onClickOutsideElement); @@ -2561,8 +2571,7 @@ function piwikExpandOnClick() { } }; } -piwikExpandOnClick.$inject = []; -angular.module('piwikApp').directive('piwikExpandOnClick', piwikExpandOnClick); +window.angular.module('piwikApp').directive('piwikExpandOnClick', piwikExpandOnClick); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.ts /*! * Matomo - free/libre analytics platform @@ -2616,7 +2625,10 @@ var ExpandOnHover_doc = document.documentElement; binding.value.onEscapeHandler = ExpandOnHover_onEscapeHandler.bind(null, el); setTimeout(function () { var expander = directiveUtilities.getRef(binding.value.expander, binding); - expander.addEventListener('mouseenter', binding.value.onMouseEnter); + + if (expander) { + expander.addEventListener('mouseenter', binding.value.onMouseEnter); + } }); el.addEventListener('mouseleave', binding.value.onMouseLeave); ExpandOnHover_doc.addEventListener('keyup', binding.value.onEscapeHandler); @@ -2624,7 +2636,11 @@ var ExpandOnHover_doc = document.documentElement; }, unmounted: function unmounted(el, binding) { var expander = directiveUtilities.getRef(binding.value.expander, binding); - expander.removeEventListener('mouseenter', binding.value.onMouseEnter); + + if (expander) { + expander.removeEventListener('mouseenter', binding.value.onMouseEnter); + } + el.removeEventListener('mouseleave', binding.value.onMouseLeave); document.removeEventListener('keyup', binding.value.onEscapeHandler); document.removeEventListener('mouseup', binding.value.onClickOutsideElement); @@ -2660,8 +2676,7 @@ function piwikExpandOnHover() { }; } -piwikExpandOnHover.$inject = []; -angular.module('piwikApp').directive('piwikExpandOnHover', piwikExpandOnHover); +window.angular.module('piwikApp').directive('piwikExpandOnHover', piwikExpandOnHover); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ShowSensitiveData/ShowSensitiveData.ts /*! * Matomo - free/libre analytics platform @@ -2746,8 +2761,7 @@ function piwikShowSensitiveData() { } }; } -piwikShowSensitiveData.$inject = []; -angular.module('piwikApp').directive('piwikShowSensitiveData', piwikShowSensitiveData); +window.angular.module('piwikApp').directive('piwikShowSensitiveData', piwikShowSensitiveData); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DropdownButton/DropdownButton.ts /*! * Matomo - free/libre analytics platform @@ -2768,7 +2782,7 @@ var DropdownButton_window = window, var target = element.attr('data-target'); if (target && DropdownButton_$("#".concat(target)).length) { - DropdownButton_$(element).dropdown({ + element.dropdown({ inDuration: 300, outDuration: 225, constrainWidth: false, @@ -2795,8 +2809,7 @@ function piwikDropdownButton() { } }; } -piwikDropdownButton.$inject = []; -angular.module('piwikApp').directive('dropdownButton', piwikDropdownButton); +window.angular.module('piwikApp').directive('dropdownButton', piwikDropdownButton); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SelectOnFocus/SelectOnFocus.ts /*! * Matomo - free/libre analytics platform @@ -2807,7 +2820,7 @@ angular.module('piwikApp').directive('dropdownButton', piwikDropdownButton); function onFocusHandler(binding, event) { if (binding.value.focusedElement !== event.target) { binding.value.focusedElement = event.target; - angular.element(event.target).select(); + window.angular.element(event.target).select(); } } @@ -2827,7 +2840,7 @@ function SelectOnFocus_onClickHandler(event) { } function onBlurHandler(binding) { - binding.value.focusedElement = null; + delete binding.value.focusedElement; } /* harmony default export */ var SelectOnFocus = ({ @@ -2880,8 +2893,7 @@ function piwikSelectOnFocus() { } }; } -piwikSelectOnFocus.$inject = []; -angular.module('piwikApp').directive('piwikSelectOnFocus', piwikSelectOnFocus); +window.angular.module('piwikApp').directive('piwikSelectOnFocus', piwikSelectOnFocus); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SideNav/SideNav.ts /*! * Matomo - free/libre analytics platform @@ -2914,12 +2926,12 @@ var initialized = false; if (sideNavActivator) { window.$(sideNavActivator).show(); - } + var targetSelector = sideNavActivator.getAttribute('data-target'); // @ts-ignore - var targetSelector = sideNavActivator.getAttribute('data-target'); - window.$("#".concat(targetSelector)).sidenav({ - closeOnClick: true - }); + window.$("#".concat(targetSelector)).sidenav({ + closeOnClick: true + }); + } } if (el.classList.contains('collapsible')) { @@ -2957,18 +2969,18 @@ function piwikSideNav($timeout) { }; } piwikSideNav.$inject = ['$timeout']; -angular.module('piwikApp.directive').directive('piwikSideNav', piwikSideNav); -// 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/MatomoDialog/MatomoDialog.vue?vue&type=template&id=64e27324 +window.angular.module('piwikApp.directive').directive('piwikSideNav', piwikSideNav); +// 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/MatomoDialog/MatomoDialog.vue?vue&type=template&id=00aba563 var _hoisted_1 = { ref: "root" }; -function MatomoDialogvue_type_template_id_64e27324_render(_ctx, _cache, $props, $setup, $data, $options) { +function MatomoDialogvue_type_template_id_00aba563_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=64e27324 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?vue&type=template&id=00aba563 -// 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/MatomoDialog/MatomoDialog.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/MatomoDialog/MatomoDialog.vue?vue&type=script&lang=ts /* harmony default export */ var MatomoDialogvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ @@ -3038,7 +3050,7 @@ function MatomoDialogvue_type_template_id_64e27324_render(_ctx, _cache, $props, -MatomoDialogvue_type_script_lang_ts.render = MatomoDialogvue_type_template_id_64e27324_render +MatomoDialogvue_type_script_lang_ts.render = MatomoDialogvue_type_template_id_00aba563_render /* harmony default export */ var MatomoDialog = (MatomoDialogvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/createVueApp.ts @@ -3078,6 +3090,8 @@ function createAngularJsAdapter_typeof(obj) { "@babel/helpers - typeof"; if (typ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + var transcludeCounter = 0; @@ -3267,7 +3281,7 @@ function createAngularJsAdapter(options) { }); }); - if (transclude) { + if (transclude && transcludeClone) { $(vm.transcludeTarget).append(transcludeClone); } @@ -3285,7 +3299,9 @@ function createAngularJsAdapter(options) { return; } - mountPoint.firstElementChild.setAttribute(attr.nodeName, attr.nodeValue); + if (mountPoint.firstElementChild) { + mountPoint.firstElementChild.setAttribute(attr.nodeName, attr.nodeValue); + } }); ngElement.replaceWith(window.$(mountPoint).children()); } @@ -3307,7 +3323,7 @@ function createAngularJsAdapter(options) { } angularJsAdapter.$inject = $inject || []; - angular.module('piwikApp').directive(directiveName, angularJsAdapter); + window.angular.module('piwikApp').directive(directiveName, angularJsAdapter); return angularJsAdapter; } function transformAngularJsBoolAttr(v) { @@ -3423,9 +3439,9 @@ function cloneThenApply(p) { }, noScope: true })); -// 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/EnrichedHeadline/EnrichedHeadline.vue?vue&type=template&id=04354f57 +// 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/EnrichedHeadline/EnrichedHeadline.vue?vue&type=template&id=51cfd3df -var EnrichedHeadlinevue_type_template_id_04354f57_hoisted_1 = { +var EnrichedHeadlinevue_type_template_id_51cfd3df_hoisted_1 = { key: 0, class: "title", tabindex: "6" @@ -3457,7 +3473,7 @@ var _hoisted_11 = { var _hoisted_12 = ["innerHTML"]; var _hoisted_13 = ["innerHTML"]; var _hoisted_14 = ["href"]; -function EnrichedHeadlinevue_type_template_id_04354f57_render(_ctx, _cache, $props, $setup, $data, $options) { +function EnrichedHeadlinevue_type_template_id_51cfd3df_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_RateFeature = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("RateFeature"); return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { @@ -3469,7 +3485,7 @@ function EnrichedHeadlinevue_type_template_id_04354f57_render(_ctx, _cache, $pro return _ctx.showIcons = false; }), ref: "root" - }, [!_ctx.editUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", EnrichedHeadlinevue_type_template_id_04354f57_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.editUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + }, [!_ctx.editUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", EnrichedHeadlinevue_type_template_id_51cfd3df_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.editUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { key: 1, class: "title", href: _ctx.editUrl, @@ -3505,7 +3521,7 @@ function EnrichedHeadlinevue_type_template_id_04354f57_render(_ctx, _cache, $pro href: _ctx.helpUrl }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_MoreDetails')), 9, _hoisted_14)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showInlineHelp]])], 544); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?vue&type=template&id=04354f57 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?vue&type=template&id=51cfd3df // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/useExternalPluginComponent.ts /*! @@ -3515,6 +3531,10 @@ function EnrichedHeadlinevue_type_template_id_04354f57_render(_ctx, _cache, $pro * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +/* eslint-disable @typescript-eslint/ban-ts-comment */ + function useExternalPluginComponent(plugin, component) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineAsyncComponent"])(function () { return new Promise(function (resolve) { @@ -3522,13 +3542,14 @@ function useExternalPluginComponent(plugin, component) { if (window[plugin]) { resolve(window[plugin][component]); } else { + // @ts-ignore resolve(null); // plugin not loaded } }); }); }); } -// 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/EnrichedHeadline/EnrichedHeadline.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/EnrichedHeadline/EnrichedHeadline.vue?vue&type=script&lang=ts @@ -3618,12 +3639,14 @@ var RateFeature = useExternalPluginComponent('Feedback', 'RateFeature'); } if (helpNode) { + var _helpNode$getAttribut; + // hackish solution to get binded html of p tag within the help node // at this point the ng-bind-html is not yet converted into html when report is not // initially loaded. Using $compile doesn't work. So get and set it manually - var helpDocs = helpNode.getAttribute('data-content').trim(); + var helpDocs = (_helpNode$getAttribut = helpNode.getAttribute('data-content')) === null || _helpNode$getAttribut === void 0 ? void 0 : _helpNode$getAttribut.trim(); - if (helpDocs.length) { + if (helpDocs && helpDocs.length) { _this.actualInlineHelp = "<p>".concat(helpDocs, "</p>"); setTimeout(function () { return helpNode.remove(); @@ -3633,17 +3656,23 @@ var RateFeature = useExternalPluginComponent('Feedback', 'RateFeature'); } if (!_this.actualFeatureName) { - _this.actualFeatureName = root.querySelector('.title').textContent; + var _root$querySelector; + + _this.actualFeatureName = (_root$querySelector = root.querySelector('.title')) === null || _root$querySelector === void 0 ? void 0 : _root$querySelector.textContent; } - if (_this.reportGenerated && Periods_Periods.parse(Matomo_Matomo.period, Matomo_Matomo.currentDateString).containsToday()) { - window.$(root.querySelector('.report-generated')).tooltip({ - track: true, - content: _this.reportGenerated, - items: 'div', - show: false, - hide: false - }); + if (Matomo_Matomo.period && Matomo_Matomo.currentDateString) { + var currentPeriod = Periods_Periods.parse(Matomo_Matomo.period, Matomo_Matomo.currentDateString); + + if (_this.reportGenerated && currentPeriod.containsToday()) { + window.$(root.querySelector('.report-generated')).tooltip({ + track: true, + content: _this.reportGenerated, + items: 'div', + show: false, + hide: false + }); + } } }); } @@ -3654,7 +3683,7 @@ var RateFeature = useExternalPluginComponent('Feedback', 'RateFeature'); -EnrichedHeadlinevue_type_script_lang_ts.render = EnrichedHeadlinevue_type_template_id_04354f57_render +EnrichedHeadlinevue_type_script_lang_ts.render = EnrichedHeadlinevue_type_template_id_51cfd3df_render /* harmony default export */ var EnrichedHeadline = (EnrichedHeadlinevue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.adapter.ts @@ -3688,30 +3717,30 @@ EnrichedHeadlinevue_type_script_lang_ts.render = EnrichedHeadlinevue_type_templa directiveName: 'piwikEnrichedHeadline', transclude: true })); -// 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/ContentBlock/ContentBlock.vue?vue&type=template&id=09ef9e02 +// 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/ContentBlock/ContentBlock.vue?vue&type=template&id=3a58c372 -var ContentBlockvue_type_template_id_09ef9e02_hoisted_1 = { +var ContentBlockvue_type_template_id_3a58c372_hoisted_1 = { class: "card", ref: "root" }; -var ContentBlockvue_type_template_id_09ef9e02_hoisted_2 = { +var ContentBlockvue_type_template_id_3a58c372_hoisted_2 = { class: "card-content" }; -var ContentBlockvue_type_template_id_09ef9e02_hoisted_3 = { +var ContentBlockvue_type_template_id_3a58c372_hoisted_3 = { key: 0, class: "card-title" }; -var ContentBlockvue_type_template_id_09ef9e02_hoisted_4 = { +var ContentBlockvue_type_template_id_3a58c372_hoisted_4 = { key: 1, class: "card-title" }; -var ContentBlockvue_type_template_id_09ef9e02_hoisted_5 = { +var ContentBlockvue_type_template_id_3a58c372_hoisted_5 = { ref: "content" }; -function ContentBlockvue_type_template_id_09ef9e02_render(_ctx, _cache, $props, $setup, $data, $options) { +function ContentBlockvue_type_template_id_3a58c372_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_EnrichedHeadline = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("EnrichedHeadline"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ContentBlockvue_type_template_id_09ef9e02_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContentBlockvue_type_template_id_09ef9e02_hoisted_2, [_ctx.contentTitle && !_ctx.actualFeature && !_ctx.helpUrl && !_ctx.actualHelpText ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("h2", ContentBlockvue_type_template_id_09ef9e02_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.contentTitle), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.contentTitle && (_ctx.actualFeature || _ctx.helpUrl || _ctx.actualHelpText) ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("h2", ContentBlockvue_type_template_id_09ef9e02_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EnrichedHeadline, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ContentBlockvue_type_template_id_3a58c372_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContentBlockvue_type_template_id_3a58c372_hoisted_2, [_ctx.contentTitle && !_ctx.actualFeature && !_ctx.helpUrl && !_ctx.actualHelpText ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("h2", ContentBlockvue_type_template_id_3a58c372_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.contentTitle), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.contentTitle && (_ctx.actualFeature || _ctx.helpUrl || _ctx.actualHelpText) ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("h2", ContentBlockvue_type_template_id_3a58c372_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EnrichedHeadline, { "feature-name": _ctx.actualFeature, "help-url": _ctx.helpUrl, "inline-help": _ctx.actualHelpText @@ -3720,11 +3749,11 @@ function ContentBlockvue_type_template_id_09ef9e02_render(_ctx, _cache, $props, return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.contentTitle), 1)]; }), _: 1 - }, 8, ["feature-name", "help-url", "inline-help"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContentBlockvue_type_template_id_09ef9e02_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 512)])], 512); + }, 8, ["feature-name", "help-url", "inline-help"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContentBlockvue_type_template_id_3a58c372_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 512)])], 512); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue?vue&type=template&id=09ef9e02 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue?vue&type=template&id=3a58c372 -// 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/ContentBlock/ContentBlock.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/ContentBlock/ContentBlock.vue?vue&type=script&lang=ts var adminContent = null; @@ -3756,11 +3785,10 @@ var adminContent = null; mounted: function mounted() { var _this = this; - var _this$$refs = this.$refs, - root = _this$$refs.root, - content = _this$$refs.content; + var root = this.$refs.root; + var content = this.$refs.content; - if (this.anchor) { + if (this.anchor && root && root.parentElement) { var anchorElement = document.createElement('a'); anchorElement.id = this.anchor; root.parentElement.prepend(anchorElement); @@ -3775,7 +3803,7 @@ var adminContent = null; } }, 0); - if (this.actualFeature && (this.actualFeature === true || this.actualFeature === 'true')) { + if (this.actualFeature && this.actualFeature === 'true') { this.actualFeature = this.contentTitle; } @@ -3784,7 +3812,7 @@ var adminContent = null; adminContent = document.querySelector('#content.admin'); } - var contentTopPosition; + var contentTopPosition = null; if (adminContent) { contentTopPosition = adminContent.offsetTop; @@ -3800,7 +3828,7 @@ var adminContent = null; if (topThis - contentTopPosition < 17) { // we make sure to display the first card with no margin-top to have it on same as line as // navigation - root.style.marginTop = 0; + root.style.marginTop = '0'; } } } @@ -3811,7 +3839,7 @@ var adminContent = null; -ContentBlockvue_type_script_lang_ts.render = ContentBlockvue_type_template_id_09ef9e02_render +ContentBlockvue_type_script_lang_ts.render = ContentBlockvue_type_template_id_3a58c372_render /* harmony default export */ var ContentBlock = (ContentBlockvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.adapter.ts @@ -4287,45 +4315,45 @@ var Comparisons_store_ComparisonsStore = /*#__PURE__*/function () { // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Comparisons/Comparisons.store.instance.ts /* harmony default export */ var Comparisons_store_instance = (new Comparisons_store_ComparisonsStore()); -// 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/Comparisons/Comparisons.vue?vue&type=template&id=1be715e1 +// 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/Comparisons/Comparisons.vue?vue&type=template&id=a22a9668 -var Comparisonsvue_type_template_id_1be715e1_hoisted_1 = { +var Comparisonsvue_type_template_id_a22a9668_hoisted_1 = { key: 0, ref: "root", class: "matomo-comparisons" }; -var Comparisonsvue_type_template_id_1be715e1_hoisted_2 = { +var Comparisonsvue_type_template_id_a22a9668_hoisted_2 = { class: "comparison-type" }; -var Comparisonsvue_type_template_id_1be715e1_hoisted_3 = ["title"]; -var Comparisonsvue_type_template_id_1be715e1_hoisted_4 = ["href"]; -var Comparisonsvue_type_template_id_1be715e1_hoisted_5 = ["title"]; -var Comparisonsvue_type_template_id_1be715e1_hoisted_6 = { +var Comparisonsvue_type_template_id_a22a9668_hoisted_3 = ["title"]; +var Comparisonsvue_type_template_id_a22a9668_hoisted_4 = ["href"]; +var Comparisonsvue_type_template_id_a22a9668_hoisted_5 = ["title"]; +var Comparisonsvue_type_template_id_a22a9668_hoisted_6 = { class: "comparison-period-label" }; -var Comparisonsvue_type_template_id_1be715e1_hoisted_7 = ["onClick"]; -var Comparisonsvue_type_template_id_1be715e1_hoisted_8 = ["title"]; -var Comparisonsvue_type_template_id_1be715e1_hoisted_9 = { +var Comparisonsvue_type_template_id_a22a9668_hoisted_7 = ["onClick"]; +var Comparisonsvue_type_template_id_a22a9668_hoisted_8 = ["title"]; +var Comparisonsvue_type_template_id_a22a9668_hoisted_9 = { class: "loadingPiwik", style: { "display": "none" } }; -var Comparisonsvue_type_template_id_1be715e1_hoisted_10 = ["alt"]; -function Comparisonsvue_type_template_id_1be715e1_render(_ctx, _cache, $props, $setup, $data, $options) { +var Comparisonsvue_type_template_id_a22a9668_hoisted_10 = ["alt"]; +function Comparisonsvue_type_template_id_a22a9668_render(_ctx, _cache, $props, $setup, $data, $options) { var _directive_tooltips = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("tooltips"); - return _ctx.isComparing ? 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", Comparisonsvue_type_template_id_1be715e1_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h3", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Comparisons')), 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.segmentComparisons, function (comparison, $index) { + return _ctx.isComparing ? 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", Comparisonsvue_type_template_id_a22a9668_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h3", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Comparisons')), 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.segmentComparisons, function (comparison, $index) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { class: "comparison card", key: comparison.index - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Comparisonsvue_type_template_id_1be715e1_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Segment')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Comparisonsvue_type_template_id_a22a9668_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Segment')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { class: "title", title: comparison.title + '<br/>' + decodeURIComponent(comparison.params.segment) }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { target: "_blank", href: _ctx.getUrlToSegment(comparison.params.segment) - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(comparison.title), 9, Comparisonsvue_type_template_id_1be715e1_hoisted_4)], 8, Comparisonsvue_type_template_id_1be715e1_hoisted_3), (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.periodComparisons, function (periodComparison) { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(comparison.title), 9, Comparisonsvue_type_template_id_a22a9668_hoisted_4)], 8, Comparisonsvue_type_template_id_a22a9668_hoisted_3), (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.periodComparisons, function (periodComparison) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { class: "comparison-period", key: periodComparison.index, @@ -4335,7 +4363,7 @@ function Comparisonsvue_type_template_id_1be715e1_render(_ctx, _cache, $props, $ style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])({ 'background-color': _ctx.getSeriesColor(comparison, periodComparison) }) - }, null, 4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Comparisonsvue_type_template_id_1be715e1_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(periodComparison.title) + " (" + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getComparisonPeriodType(periodComparison)) + ") ", 1)], 8, Comparisonsvue_type_template_id_1be715e1_hoisted_5); + }, null, 4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Comparisonsvue_type_template_id_a22a9668_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(periodComparison.title) + " (" + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getComparisonPeriodType(periodComparison)) + ") ", 1)], 8, Comparisonsvue_type_template_id_a22a9668_hoisted_5); }), 128)), _ctx.segmentComparisons.length > 1 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { key: 0, class: "remove-button", @@ -4345,17 +4373,17 @@ function Comparisonsvue_type_template_id_1be715e1_render(_ctx, _cache, $props, $ }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon icon-close", title: _ctx.translate('General_ClickToRemoveComp') - }, null, 8, Comparisonsvue_type_template_id_1be715e1_hoisted_8)], 8, Comparisonsvue_type_template_id_1be715e1_hoisted_7)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); - }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Comparisonsvue_type_template_id_1be715e1_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { + }, null, 8, Comparisonsvue_type_template_id_a22a9668_hoisted_8)], 8, Comparisonsvue_type_template_id_a22a9668_hoisted_7)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); + }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Comparisonsvue_type_template_id_a22a9668_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { src: "plugins/Morpheus/images/loading-blue.gif", alt: _ctx.translate('General_LoadingData') - }, null, 8, Comparisonsvue_type_template_id_1be715e1_hoisted_10), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])], 512)), [[_directive_tooltips, { + }, null, 8, Comparisonsvue_type_template_id_a22a9668_hoisted_10), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])], 512)), [[_directive_tooltips, { duration: 200, delay: 200, content: _ctx.transformTooltipContent }]]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Comparisons/Comparisons.vue?vue&type=template&id=1be715e1 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Comparisons/Comparisons.vue?vue&type=template&id=a22a9668 // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Tooltips/Tooltips.ts /*! @@ -4394,7 +4422,7 @@ function setupTooltips(el, binding) { } } }); -// 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/Comparisons/Comparisons.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/Comparisons/Comparisons.vue?vue&type=script&lang=ts function Comparisonsvue_type_script_lang_ts_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 Comparisonsvue_type_script_lang_ts_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { Comparisonsvue_type_script_lang_ts_ownKeys(Object(source), true).forEach(function (key) { Comparisonsvue_type_script_lang_ts_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { Comparisonsvue_type_script_lang_ts_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -4434,6 +4462,11 @@ function Comparisonsvue_type_script_lang_ts_defineProperty(obj, key, value) { if function transformTooltipContent() { var title = window.$(this).attr('title'); + + if (!title) { + return title; + } + return window.vueSanitize(title.replace(/\n/g, '<br />')); } @@ -4552,7 +4585,7 @@ function Comparisonsvue_type_script_lang_ts_defineProperty(obj, key, value) { if -Comparisonsvue_type_script_lang_ts.render = Comparisonsvue_type_template_id_1be715e1_render +Comparisonsvue_type_script_lang_ts.render = Comparisonsvue_type_template_id_a22a9668_render /* harmony default export */ var Comparisons = (Comparisonsvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Comparisons/Comparisons.adapter.ts @@ -4570,42 +4603,41 @@ function ComparisonFactory() { return Comparisons_store_instance; } -ComparisonFactory.$inject = []; -angular.module('piwikApp.service').factory('piwikComparisonsService', ComparisonFactory); +window.angular.module('piwikApp.service').factory('piwikComparisonsService', ComparisonFactory); /* harmony default export */ var Comparisons_adapter = (createAngularJsAdapter({ component: Comparisons, 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=054f8a45 +// 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=24b90ec0 -var MenuDropdownvue_type_template_id_054f8a45_hoisted_1 = { +var MenuDropdownvue_type_template_id_24b90ec0_hoisted_1 = { ref: "root", class: "menuDropdown" }; -var MenuDropdownvue_type_template_id_054f8a45_hoisted_2 = ["title"]; -var MenuDropdownvue_type_template_id_054f8a45_hoisted_3 = ["innerHTML"]; +var MenuDropdownvue_type_template_id_24b90ec0_hoisted_2 = ["title"]; +var MenuDropdownvue_type_template_id_24b90ec0_hoisted_3 = ["innerHTML"]; -var MenuDropdownvue_type_template_id_054f8a45_hoisted_4 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var MenuDropdownvue_type_template_id_24b90ec0_hoisted_4 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-arrow-bottom" }, null, -1); -var MenuDropdownvue_type_template_id_054f8a45_hoisted_5 = { +var MenuDropdownvue_type_template_id_24b90ec0_hoisted_5 = { class: "items" }; -var MenuDropdownvue_type_template_id_054f8a45_hoisted_6 = { +var MenuDropdownvue_type_template_id_24b90ec0_hoisted_6 = { key: 0, class: "search" }; -var MenuDropdownvue_type_template_id_054f8a45_hoisted_7 = ["placeholder"]; -var MenuDropdownvue_type_template_id_054f8a45_hoisted_8 = ["title"]; -var MenuDropdownvue_type_template_id_054f8a45_hoisted_9 = ["title"]; -function MenuDropdownvue_type_template_id_054f8a45_render(_ctx, _cache, $props, $setup, $data, $options) { +var MenuDropdownvue_type_template_id_24b90ec0_hoisted_7 = ["placeholder"]; +var MenuDropdownvue_type_template_id_24b90ec0_hoisted_8 = ["title"]; +var MenuDropdownvue_type_template_id_24b90ec0_hoisted_9 = ["title"]; +function MenuDropdownvue_type_template_id_24b90ec0_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_054f8a45_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_24b90ec0_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; @@ -4613,7 +4645,7 @@ function MenuDropdownvue_type_template_id_054f8a45_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_054f8a45_hoisted_3), MenuDropdownvue_type_template_id_054f8a45_hoisted_4], 8, MenuDropdownvue_type_template_id_054f8a45_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_054f8a45_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_054f8a45_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_24b90ec0_hoisted_3), MenuDropdownvue_type_template_id_24b90ec0_hoisted_4], 8, MenuDropdownvue_type_template_id_24b90ec0_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_24b90ec0_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_24b90ec0_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; @@ -4622,11 +4654,11 @@ function MenuDropdownvue_type_template_id_054f8a45_render(_ctx, _cache, $props, return _ctx.onSearchTermKeydown($event); }), placeholder: _ctx.translate('General_Search') - }, null, 40, MenuDropdownvue_type_template_id_054f8a45_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", { + }, null, 40, MenuDropdownvue_type_template_id_24b90ec0_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_054f8a45_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_24b90ec0_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 = ''; @@ -4635,7 +4667,7 @@ function MenuDropdownvue_type_template_id_054f8a45_render(_ctx, _cache, $props, class: "reset", src: "plugins/CoreHome/images/reset_search.png", title: _ctx.translate('General_Clear') - }, null, 8, MenuDropdownvue_type_template_id_054f8a45_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_24b90ec0_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); }) @@ -4643,9 +4675,9 @@ function MenuDropdownvue_type_template_id_054f8a45_render(_ctx, _cache, $props, blur: _ctx.lostFocus }]]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MenuDropdown/MenuDropdown.vue?vue&type=template&id=054f8a45 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MenuDropdown/MenuDropdown.vue?vue&type=template&id=24b90ec0 -// 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 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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 @@ -4656,7 +4688,7 @@ var MenuDropdownvue_type_script_lang_ts_window = window, menuTitle: String, tooltip: String, showSearch: Boolean, - menuTitleChangeOnClick: String + menuTitleChangeOnClick: Boolean }, directives: { FocusAnywhereButHere: FocusAnywhereButHere, @@ -4686,14 +4718,14 @@ var MenuDropdownvue_type_script_lang_ts_window = window, return; } - if (this.menuTitleChangeOnClick !== false) { - this.actualMenuTitle = event.target.textContent.replace(/[\u0000-\u2666]/g, function (c) { + if (this.menuTitleChangeOnClick) { + this.actualMenuTitle = (event.target.textContent || '').replace(/[\u0000-\u2666]/g, function (c) { return "&#".concat(c.charCodeAt(0), ";"); }); // eslint-disable-line } this.showItems = false; - MenuDropdownvue_type_script_lang_ts_$(this.$slots.default()).find('.item').removeClass('active'); + MenuDropdownvue_type_script_lang_ts_$(this.$slots.default()[0].el).find('.item').removeClass('active'); targetClasses.add('active'); this.$emit('afterSelect'); }, @@ -4724,7 +4756,7 @@ var MenuDropdownvue_type_script_lang_ts_window = window, -MenuDropdownvue_type_script_lang_ts.render = MenuDropdownvue_type_template_id_054f8a45_render +MenuDropdownvue_type_script_lang_ts.render = MenuDropdownvue_type_template_id_24b90ec0_render /* harmony default export */ var MenuDropdown = (MenuDropdownvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MenuDropdown/MenuDropdown.adapter.ts @@ -4762,17 +4794,17 @@ MenuDropdownvue_type_script_lang_ts.render = MenuDropdownvue_type_template_id_05 } } })); -// 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/DatePicker/DatePicker.vue?vue&type=template&id=c8c462d2 +// 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/DatePicker/DatePicker.vue?vue&type=template&id=589729fc -var DatePickervue_type_template_id_c8c462d2_hoisted_1 = { +var DatePickervue_type_template_id_589729fc_hoisted_1 = { ref: "root" }; -function DatePickervue_type_template_id_c8c462d2_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_["createElementBlock"])("div", DatePickervue_type_template_id_c8c462d2_hoisted_1, null, 512); +function DatePickervue_type_template_id_589729fc_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_["createElementBlock"])("div", DatePickervue_type_template_id_589729fc_hoisted_1, null, 512); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DatePicker/DatePicker.vue?vue&type=template&id=c8c462d2 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DatePicker/DatePicker.vue?vue&type=template&id=589729fc -// 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/DatePicker/DatePicker.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/DatePicker/DatePicker.vue?vue&type=script&lang=ts function DatePickervue_type_script_lang_ts_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 DatePickervue_type_script_lang_ts_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { DatePickervue_type_script_lang_ts_ownKeys(Object(source), true).forEach(function (key) { DatePickervue_type_script_lang_ts_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { DatePickervue_type_script_lang_ts_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -4871,18 +4903,20 @@ var DatePickervue_type_script_lang_ts_window = window, } function viewDateChanged() { - var date = props.viewDate; - - if (!date) { + if (!props.viewDate) { return false; } - if (!(date instanceof Date)) { + var date; + + if (typeof props.viewDate === 'string') { try { - date = parseDate(date); + date = parseDate(props.viewDate); } catch (e) { return false; } + } else { + date = props.viewDate; } var element = DatePickervue_type_script_lang_ts_$(root.value); // only change the datepicker date if the date is outside of the current month/year. @@ -4928,7 +4962,11 @@ var DatePickervue_type_script_lang_ts_window = window, function enableDisableMonthDropdown() { var element = DatePickervue_type_script_lang_ts_$(root.value); - element.find('.ui-datepicker-month').attr('disabled', props.disableMonthDropdown); + var monthPicker = element.find('.ui-datepicker-month')[0]; + + if (monthPicker) { + monthPicker.disabled = props.disableMonthDropdown; + } } function handleOtherMonthClick() { @@ -4963,20 +5001,31 @@ var DatePickervue_type_script_lang_ts_window = window, return DatePickervue_type_script_lang_ts_objectSpread({}, props); }, function (newProps, oldProps) { var redraw = false; - ['selectedDateStart', 'selectedDateEnd', 'highlightedDateStart', 'highlightedDateEnd'].forEach(function (propName) { + [function (x) { + return x.selectedDateStart; + }, function (x) { + return x.selectedDateEnd; + }, function (x) { + return x.highlightedDateStart; + }, function (x) { + return x.highlightedDateEnd; + }].forEach(function (selector) { if (redraw) { return; } - if (!newProps[propName] && oldProps[propName]) { + var newProp = selector(newProps); + var oldProp = selector(oldProps); + + if (!newProp && oldProp) { redraw = true; } - if (newProps[propName] && !oldProps[propName]) { + if (newProp && !oldProp) { redraw = true; } - if (newProps[propName] && oldProps[propName] && newProps[propName].getTime() !== oldProps[propName].getTime()) { + if (newProp && oldProp && newProp.getTime() !== oldProp.getTime()) { redraw = true; } }); @@ -4989,7 +5038,7 @@ var DatePickervue_type_script_lang_ts_window = window, stepMonthsChanged(); } - if (newProps.enableDisableMonthDropdown !== oldProps.enableDisableMonthDropdown) { + if (newProps.disableMonthDropdown !== oldProps.disableMonthDropdown) { enableDisableMonthDropdown(); } // redraw when selected/highlighted dates change @@ -5043,9 +5092,7 @@ var DatePickervue_type_script_lang_ts_window = window, return context.emit('cellHoverLeave'); }); // make sure whitespace is clickable when the period makes it appropriate - element.on('click', 'tbody td.ui-datepicker-other-month', function () { - return handleOtherMonthClick(); - }); // NOTE: using a selector w/ .on() doesn't seem to work for some reason... + element.on('click', 'tbody td.ui-datepicker-other-month', handleOtherMonthClick); // NOTE: using a selector w/ .on() doesn't seem to work for some reason... element.on('click', function (e) { e.preventDefault(); @@ -5089,7 +5136,7 @@ var DatePickervue_type_script_lang_ts_window = window, -DatePickervue_type_script_lang_ts.render = DatePickervue_type_template_id_c8c462d2_render +DatePickervue_type_script_lang_ts.render = DatePickervue_type_template_id_589729fc_render /* harmony default export */ var DatePicker = (DatePickervue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DatePicker/DatePicker.adapter.ts @@ -5140,30 +5187,30 @@ DatePickervue_type_script_lang_ts.render = DatePickervue_type_template_id_c8c462 }, directiveName: 'piwikDatePicker', events: { - 'cell-hover': function cellHover(event, scope, element, attrs, $timeout) { + 'cell-hover': function cellHover(event, vm, scope, element, attrs, controller, $timeout) { $timeout(); // trigger new digest }, - 'cell-hover-leave': function cellHoverLeave(event, scope, element, attrs, $timeout) { + 'cell-hover-leave': function cellHoverLeave(event, vm, scope, element, attrs, controller, $timeout) { $timeout(); // trigger new digest }, - 'date-select': function dateSelect(event, scope, element, attrs, $timeout) { + 'date-select': function dateSelect(event, vm, scope, element, attrs, controller, $timeout) { $timeout(); // trigger new digest } }, $inject: ['$timeout'] })); -// 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/DateRangePicker/DateRangePicker.vue?vue&type=template&id=7540af5c +// 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/DateRangePicker/DateRangePicker.vue?vue&type=template&id=7bf842c2 -var DateRangePickervue_type_template_id_7540af5c_hoisted_1 = { +var DateRangePickervue_type_template_id_7bf842c2_hoisted_1 = { id: "calendarRangeFrom" }; -var DateRangePickervue_type_template_id_7540af5c_hoisted_2 = { +var DateRangePickervue_type_template_id_7bf842c2_hoisted_2 = { id: "calendarRangeTo" }; -function DateRangePickervue_type_template_id_7540af5c_render(_ctx, _cache, $props, $setup, $data, $options) { +function DateRangePickervue_type_template_id_7bf842c2_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_DatePicker = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("DatePicker"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", DateRangePickervue_type_template_id_7540af5c_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h6", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_DateRangeFrom')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", DateRangePickervue_type_template_id_7bf842c2_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h6", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_DateRangeFrom')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "text", id: "inputCalendarFrom", name: "inputCalendarFrom", @@ -5193,7 +5240,7 @@ function DateRangePickervue_type_template_id_7540af5c_render(_ctx, _cache, $prop onCellHoverLeave: _cache[5] || (_cache[5] = function ($event) { return _ctx.fromPickerHighlightedDates = [null, null]; }) - }, null, 8, ["view-date", "selected-date-start", "selected-date-end", "highlighted-date-start", "highlighted-date-end"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", DateRangePickervue_type_template_id_7540af5c_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h6", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_DateRangeTo')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, ["view-date", "selected-date-start", "selected-date-end", "highlighted-date-start", "highlighted-date-end"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", DateRangePickervue_type_template_id_7bf842c2_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h6", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_DateRangeTo')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "text", id: "inputCalendarTo", name: "inputCalendarTo", @@ -5225,9 +5272,9 @@ function DateRangePickervue_type_template_id_7540af5c_render(_ctx, _cache, $prop }) }, null, 8, ["view-date", "selected-date-start", "selected-date-end", "highlighted-date-start", "highlighted-date-end"])])]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.vue?vue&type=template&id=7540af5c +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.vue?vue&type=template&id=7bf842c2 -// 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/DateRangePicker/DateRangePicker.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/DateRangePicker/DateRangePicker.vue?vue&type=script&lang=ts @@ -5244,14 +5291,18 @@ var DATE_FORMAT = 'YYYY-MM-DD'; var startDate = null; try { - startDate = parseDate(this.startDate); + if (this.startDate) { + startDate = parseDate(this.startDate); + } } catch (e) {// ignore } var endDate = null; try { - endDate = parseDate(this.endDate); + if (this.endDate) { + endDate = parseDate(this.endDate); + } } catch (e) {// ignore } @@ -5319,10 +5370,10 @@ var DATE_FORMAT = 'YYYY-MM-DD'; }, setStartRangeDateFromStr: function setStartRangeDateFromStr(dateStr) { this.startDateInvalid = true; - var startDateParsed; + var startDateParsed = null; try { - if (dateStr.length === DATE_FORMAT.length) { + if (dateStr && dateStr.length === DATE_FORMAT.length) { startDateParsed = parseDate(dateStr); } } catch (e) {// ignore @@ -5336,10 +5387,10 @@ var DATE_FORMAT = 'YYYY-MM-DD'; }, setEndRangeDateFromStr: function setEndRangeDateFromStr(dateStr) { this.endDateInvalid = true; - var endDateParsed; + var endDateParsed = null; try { - if (dateStr.length === DATE_FORMAT.length) { + if (dateStr && dateStr.length === DATE_FORMAT.length) { endDateParsed = parseDate(dateStr); } } catch (e) {// ignore @@ -5353,8 +5404,8 @@ var DATE_FORMAT = 'YYYY-MM-DD'; }, rangeChanged: function rangeChanged() { this.$emit('rangeChange', { - start: format(this.fromPickerSelectedDates[0]), - end: format(this.toPickerSelectedDates[0]) + start: this.fromPickerSelectedDates[0] ? format(this.fromPickerSelectedDates[0]) : null, + end: this.toPickerSelectedDates[0] ? format(this.toPickerSelectedDates[0]) : null }); } } @@ -5365,7 +5416,7 @@ var DATE_FORMAT = 'YYYY-MM-DD'; -DateRangePickervue_type_script_lang_ts.render = DateRangePickervue_type_template_id_7540af5c_render +DateRangePickervue_type_script_lang_ts.render = DateRangePickervue_type_template_id_7bf842c2_render /* harmony default export */ var DateRangePicker = (DateRangePickervue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.adapter.ts @@ -5396,9 +5447,9 @@ DateRangePickervue_type_script_lang_ts.render = DateRangePickervue_type_template directiveName: 'piwikDateRangePicker', 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/PeriodDatePicker/PeriodDatePicker.vue?vue&type=template&id=effd17b0 +// 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/PeriodDatePicker/PeriodDatePicker.vue?vue&type=template&id=6d1fa14c -function PeriodDatePickervue_type_template_id_effd17b0_render(_ctx, _cache, $props, $setup, $data, $options) { +function PeriodDatePickervue_type_template_id_6d1fa14c_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_DatePicker = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("DatePicker"); return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_DatePicker, { @@ -5420,9 +5471,9 @@ function PeriodDatePickervue_type_template_id_effd17b0_render(_ctx, _cache, $pro }) }, null, 8, ["selected-date-start", "selected-date-end", "highlighted-date-start", "highlighted-date-end", "view-date", "step-months", "disable-month-dropdown"]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodDatePicker/PeriodDatePicker.vue?vue&type=template&id=effd17b0 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodDatePicker/PeriodDatePicker.vue?vue&type=template&id=6d1fa14c -// 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/PeriodDatePicker/PeriodDatePicker.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/PeriodDatePicker/PeriodDatePicker.vue?vue&type=script&lang=ts @@ -5431,7 +5482,10 @@ var PeriodDatePickervue_type_script_lang_ts_piwikMinDate = new Date(Matomo_Matom var piwikMaxDate = new Date(Matomo_Matomo.maxDateYear, Matomo_Matomo.maxDateMonth - 1, Matomo_Matomo.maxDateDay); /* harmony default export */ var PeriodDatePickervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { - period: String, + period: { + type: String, + required: true + }, date: [String, Date] }, components: { @@ -5504,7 +5558,7 @@ var piwikMaxDate = new Date(Matomo_Matomo.maxDateYear, Matomo_Matomo.maxDateMont -PeriodDatePickervue_type_script_lang_ts.render = PeriodDatePickervue_type_template_id_effd17b0_render +PeriodDatePickervue_type_script_lang_ts.render = PeriodDatePickervue_type_template_id_6d1fa14c_render /* harmony default export */ var PeriodDatePicker = (PeriodDatePickervue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodDatePicker/PeriodDatePicker.adapter.ts @@ -5532,44 +5586,44 @@ PeriodDatePickervue_type_script_lang_ts.render = PeriodDatePickervue_type_templa directiveName: 'piwikPeriodDatePicker', 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/SiteSelector/SiteSelector.vue?vue&type=template&id=cc252118 +// 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/SiteSelector/SiteSelector.vue?vue&type=template&id=95dcd4ac -var SiteSelectorvue_type_template_id_cc252118_hoisted_1 = ["value", "name"]; -var SiteSelectorvue_type_template_id_cc252118_hoisted_2 = ["title"]; -var SiteSelectorvue_type_template_id_cc252118_hoisted_3 = ["textContent"]; -var SiteSelectorvue_type_template_id_cc252118_hoisted_4 = { +var SiteSelectorvue_type_template_id_95dcd4ac_hoisted_1 = ["value", "name"]; +var SiteSelectorvue_type_template_id_95dcd4ac_hoisted_2 = ["title"]; +var SiteSelectorvue_type_template_id_95dcd4ac_hoisted_3 = ["textContent"]; +var SiteSelectorvue_type_template_id_95dcd4ac_hoisted_4 = { key: 1, class: "placeholder" }; -var SiteSelectorvue_type_template_id_cc252118_hoisted_5 = { +var SiteSelectorvue_type_template_id_95dcd4ac_hoisted_5 = { class: "dropdown" }; -var SiteSelectorvue_type_template_id_cc252118_hoisted_6 = { +var SiteSelectorvue_type_template_id_95dcd4ac_hoisted_6 = { class: "custom_select_search" }; -var SiteSelectorvue_type_template_id_cc252118_hoisted_7 = ["placeholder"]; -var SiteSelectorvue_type_template_id_cc252118_hoisted_8 = { +var SiteSelectorvue_type_template_id_95dcd4ac_hoisted_7 = ["placeholder"]; +var SiteSelectorvue_type_template_id_95dcd4ac_hoisted_8 = { key: 0 }; -var SiteSelectorvue_type_template_id_cc252118_hoisted_9 = { +var SiteSelectorvue_type_template_id_95dcd4ac_hoisted_9 = { class: "custom_select_container" }; -var SiteSelectorvue_type_template_id_cc252118_hoisted_10 = ["onClick"]; -var SiteSelectorvue_type_template_id_cc252118_hoisted_11 = ["innerHTML", "href", "title"]; -var SiteSelectorvue_type_template_id_cc252118_hoisted_12 = { +var SiteSelectorvue_type_template_id_95dcd4ac_hoisted_10 = ["onClick"]; +var SiteSelectorvue_type_template_id_95dcd4ac_hoisted_11 = ["innerHTML", "href", "title"]; +var SiteSelectorvue_type_template_id_95dcd4ac_hoisted_12 = { class: "ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all\n siteSelect" }; -var SiteSelectorvue_type_template_id_cc252118_hoisted_13 = { +var SiteSelectorvue_type_template_id_95dcd4ac_hoisted_13 = { class: "ui-menu-item" }; -var SiteSelectorvue_type_template_id_cc252118_hoisted_14 = { +var SiteSelectorvue_type_template_id_95dcd4ac_hoisted_14 = { class: "ui-corner-all", tabindex: "-1" }; var _hoisted_15 = { key: 1 }; -function SiteSelectorvue_type_template_id_cc252118_render(_ctx, _cache, $props, $setup, $data, $options) { +function SiteSelectorvue_type_template_id_95dcd4ac_render(_ctx, _cache, $props, $setup, $data, $options) { var _ctx$modelValue, _ctx$modelValue2, _ctx$modelValue3, _ctx$modelValue4; var _component_AllSitesLink = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("AllSitesLink"); @@ -5588,7 +5642,7 @@ function SiteSelectorvue_type_template_id_cc252118_render(_ctx, _cache, $props, type: "hidden", value: (_ctx$modelValue = _ctx.modelValue) === null || _ctx$modelValue === void 0 ? void 0 : _ctx$modelValue.id, name: _ctx.name - }, null, 8, SiteSelectorvue_type_template_id_cc252118_hoisted_1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, SiteSelectorvue_type_template_id_95dcd4ac_hoisted_1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { ref: "selectorLink", onClick: _cache[0] || (_cache[0] = function () { return _ctx.onClickSelector && _ctx.onClickSelector.apply(_ctx, arguments); @@ -5610,7 +5664,7 @@ function SiteSelectorvue_type_template_id_cc252118_render(_ctx, _cache, $props, }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [(_ctx$modelValue2 = _ctx.modelValue) !== null && _ctx$modelValue2 !== void 0 && _ctx$modelValue2.name || !_ctx.placeholder ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { key: 0, textContent: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(((_ctx$modelValue3 = _ctx.modelValue) === null || _ctx$modelValue3 === void 0 ? void 0 : _ctx$modelValue3.name) || _ctx.firstSiteName) - }, null, 8, SiteSelectorvue_type_template_id_cc252118_hoisted_3)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !((_ctx$modelValue4 = _ctx.modelValue) !== null && _ctx$modelValue4 !== void 0 && _ctx$modelValue4.name) && _ctx.placeholder ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", SiteSelectorvue_type_template_id_cc252118_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.placeholder), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])], 42, SiteSelectorvue_type_template_id_cc252118_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_cc252118_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_cc252118_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, SiteSelectorvue_type_template_id_95dcd4ac_hoisted_3)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !((_ctx$modelValue4 = _ctx.modelValue) !== null && _ctx$modelValue4 !== void 0 && _ctx$modelValue4.name) && _ctx.placeholder ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", SiteSelectorvue_type_template_id_95dcd4ac_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.placeholder), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])], 42, SiteSelectorvue_type_template_id_95dcd4ac_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_95dcd4ac_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_95dcd4ac_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "text", onClick: _cache[2] || (_cache[2] = function ($event) { _ctx.searchTerm = ''; @@ -5623,7 +5677,7 @@ function SiteSelectorvue_type_template_id_cc252118_render(_ctx, _cache, $props, tabindex: "4", class: "websiteSearch inp browser-default", placeholder: _ctx.translate('General_Search') - }, null, 8, SiteSelectorvue_type_template_id_cc252118_hoisted_7), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm], [_directive_focus_if, {}, _ctx.shouldFocusOnSearch]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { + }, null, 8, SiteSelectorvue_type_template_id_95dcd4ac_hoisted_7), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm], [_directive_focus_if, {}, _ctx.shouldFocusOnSearch]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { title: "Clear", onClick: _cache[4] || (_cache[4] = function ($event) { _ctx.searchTerm = ''; @@ -5632,13 +5686,13 @@ function SiteSelectorvue_type_template_id_cc252118_render(_ctx, _cache, $props, }), class: "reset", src: "plugins/CoreHome/images/reset_search.png" - }, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.searchTerm]])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.autocompleteMinSites <= _ctx.sites.length || _ctx.searchTerm]]), _ctx.allSitesLocation === 'top' && _ctx.showAllSitesItem ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", SiteSelectorvue_type_template_id_cc252118_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_AllSitesLink, { + }, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.searchTerm]])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.autocompleteMinSites <= _ctx.sites.length || _ctx.searchTerm]]), _ctx.allSitesLocation === 'top' && _ctx.showAllSitesItem ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", SiteSelectorvue_type_template_id_95dcd4ac_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_AllSitesLink, { href: _ctx.urlAllSites, "all-sites-text": _ctx.allSitesText, onClick: _cache[5] || (_cache[5] = function ($event) { return _ctx.onAllSitesClick($event); }) - }, null, 8, ["href", "all-sites-text"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_cc252118_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", { + }, null, 8, ["href", "all-sites-text"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_95dcd4ac_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", { class: "custom_select_ul_list", onClick: _cache[7] || (_cache[7] = function ($event) { return _ctx.showSitesList = false; @@ -5657,8 +5711,8 @@ function SiteSelectorvue_type_template_id_cc252118_render(_ctx, _cache, $props, tabindex: "4", href: _ctx.getUrlForSiteId(site.idsite), title: site.name - }, null, 8, SiteSelectorvue_type_template_id_cc252118_hoisted_11)], 8, SiteSelectorvue_type_template_id_cc252118_hoisted_10)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !(!_ctx.showSelectedSite && _ctx.activeSiteId === site.idsite)]]); - }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", SiteSelectorvue_type_template_id_cc252118_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", SiteSelectorvue_type_template_id_cc252118_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", SiteSelectorvue_type_template_id_cc252118_hoisted_14, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_NotFound') + ' ' + _ctx.searchTerm), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.sites.length && _ctx.searchTerm]])]), _ctx.allSitesLocation === 'bottom' && _ctx.showAllSitesItem ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_AllSitesLink, { + }, null, 8, SiteSelectorvue_type_template_id_95dcd4ac_hoisted_11)], 8, SiteSelectorvue_type_template_id_95dcd4ac_hoisted_10)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !(!_ctx.showSelectedSite && _ctx.activeSiteId === site.idsite)]]); + }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", SiteSelectorvue_type_template_id_95dcd4ac_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", SiteSelectorvue_type_template_id_95dcd4ac_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", SiteSelectorvue_type_template_id_95dcd4ac_hoisted_14, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_NotFound') + ' ' + _ctx.searchTerm), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.sites.length && _ctx.searchTerm]])]), _ctx.allSitesLocation === 'bottom' && _ctx.showAllSitesItem ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_AllSitesLink, { href: _ctx.urlAllSites, "all-sites-text": _ctx.allSitesText, onClick: _cache[8] || (_cache[8] = function ($event) { @@ -5668,7 +5722,7 @@ function SiteSelectorvue_type_template_id_cc252118_render(_ctx, _cache, $props, blur: _ctx.onBlur }]]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue?vue&type=template&id=cc252118 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue?vue&type=template&id=95dcd4ac // 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/SiteSelector/AllSitesLink.vue?vue&type=template&id=45607d28 @@ -5692,7 +5746,7 @@ function AllSitesLinkvue_type_template_id_45607d28_render(_ctx, _cache, $props, } // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/AllSitesLink.vue?vue&type=template&id=45607d28 -// 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/SiteSelector/AllSitesLink.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/SiteSelector/AllSitesLink.vue?vue&type=script&lang=ts /* harmony default export */ var AllSitesLinkvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { @@ -5749,7 +5803,7 @@ var SitesStore_SitesStore = /*#__PURE__*/function () { isInitialized: false })); - SitesStore_defineProperty(this, "currentRequestAbort", void 0); + SitesStore_defineProperty(this, "currentRequestAbort", null); SitesStore_defineProperty(this, "limitRequest", void 0); @@ -5769,8 +5823,12 @@ var SitesStore_SitesStore = /*#__PURE__*/function () { return this.searchSite('%').then(function (sites) { _this2.state.isInitialized = true; - _this2.state.initialSites = sites; - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(sites); + + if (sites !== null) { + _this2.state.initialSites = sites; + } + + return sites; }); } }, { @@ -5874,7 +5932,9 @@ var DEFAULT_DEBOUNCE_DELAY = 300; function debounce(fn) { var delayInMs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_DEBOUNCE_DELAY; var timeout; - return function () { + return function wrapper() { + var _this = this; + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } @@ -5884,11 +5944,11 @@ function debounce(fn) { } timeout = setTimeout(function () { - fn.apply(void 0, args); + fn.call.apply(fn, [_this].concat(args)); }, delayInMs); }; } -// 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/SiteSelector/SiteSelector.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/SiteSelector/SiteSelector.vue?vue&type=script&lang=ts function SiteSelectorvue_type_script_lang_ts_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 SiteSelectorvue_type_script_lang_ts_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { SiteSelectorvue_type_script_lang_ts_ownKeys(Object(source), true).forEach(function (key) { SiteSelectorvue_type_script_lang_ts_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { SiteSelectorvue_type_script_lang_ts_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -5907,7 +5967,7 @@ function SiteSelectorvue_type_script_lang_ts_defineProperty(obj, key, value) { i /* harmony default export */ var SiteSelectorvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { modelValue: { - Object: Object, + type: Object, default: function _default(props) { if (props.modelValue) { return props.modelValue; @@ -5965,13 +6025,16 @@ function SiteSelectorvue_type_script_lang_ts_defineProperty(obj, key, value) { i data: function data() { return { searchTerm: '', - activeSiteId: Matomo_Matomo.idSite, + activeSiteId: "".concat(Matomo_Matomo.idSite), showSitesList: false, isLoading: false, sites: [], autocompleteMinSites: parseInt(Matomo_Matomo.config.autocomplete_min_sites, 10) }; }, + created: function created() { + this.searchSite = debounce(this.searchSite); + }, mounted: function mounted() { var _this = this; @@ -5996,9 +6059,12 @@ function SiteSelectorvue_type_script_lang_ts_defineProperty(obj, key, value) { i event.returnValue = false; // IE } - _this.$refs.selectorLink.click(); + var selectorLink = _this.$refs.selectorLink; - _this.$refs.selectorLink.focus(); + if (selectorLink) { + selectorLink.click(); + selectorLink.focus(); + } }); }, computed: { @@ -6027,9 +6093,6 @@ function SiteSelectorvue_type_script_lang_ts_defineProperty(obj, key, value) { i return "?".concat(newQuery); } }, - created: function created() { - this.searchSite = debounce(this.searchSite.bind(this)); - }, methods: { onSearchTermChanged: function onSearchTermChanged() { if (!this.searchTerm) { @@ -6043,7 +6106,7 @@ function SiteSelectorvue_type_script_lang_ts_defineProperty(obj, key, value) { i onAllSitesClick: function onAllSitesClick(event) { this.switchSite({ idsite: 'all', - name: this.allSitesText + name: this.$props.allSitesText }, event); this.showSitesList = false; }, @@ -6146,7 +6209,7 @@ function SiteSelectorvue_type_script_lang_ts_defineProperty(obj, key, value) { i -SiteSelectorvue_type_script_lang_ts.render = SiteSelectorvue_type_template_id_cc252118_render +SiteSelectorvue_type_script_lang_ts.render = SiteSelectorvue_type_template_id_95dcd4ac_render /* harmony default export */ var SiteSelector = (SiteSelectorvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/SiteSelector.adapter.ts @@ -6260,7 +6323,7 @@ SiteSelectorvue_type_script_lang_ts.render = SiteSelectorvue_type_template_id_cc ngModel.$render = function () { Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () { Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () { - if (angular.isString(ngModel.$viewValue)) { + if (window.angular.isString(ngModel.$viewValue)) { vm.modelValue = JSON.parse(ngModel.$viewValue); } else { vm.modelValue = ngModel.$viewValue; @@ -6297,37 +6360,37 @@ function siteSelectorModelAdapter() { }; } -angular.module('piwikApp.service').factory('siteSelectorModel', siteSelectorModelAdapter); -// 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/QuickAccess/QuickAccess.vue?vue&type=template&id=08fc9316 +window.angular.module('piwikApp.service').factory('siteSelectorModel', siteSelectorModelAdapter); +// 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/QuickAccess/QuickAccess.vue?vue&type=template&id=5ffff238 -var QuickAccessvue_type_template_id_08fc9316_hoisted_1 = { +var QuickAccessvue_type_template_id_5ffff238_hoisted_1 = { ref: "root", class: "quickAccessInside" }; -var QuickAccessvue_type_template_id_08fc9316_hoisted_2 = ["title"]; -var QuickAccessvue_type_template_id_08fc9316_hoisted_3 = { +var QuickAccessvue_type_template_id_5ffff238_hoisted_2 = ["title"]; +var QuickAccessvue_type_template_id_5ffff238_hoisted_3 = { class: "dropdown" }; -var QuickAccessvue_type_template_id_08fc9316_hoisted_4 = { +var QuickAccessvue_type_template_id_5ffff238_hoisted_4 = { class: "no-result" }; -var QuickAccessvue_type_template_id_08fc9316_hoisted_5 = ["onClick"]; -var QuickAccessvue_type_template_id_08fc9316_hoisted_6 = ["onMouseenter", "onClick"]; -var QuickAccessvue_type_template_id_08fc9316_hoisted_7 = { +var QuickAccessvue_type_template_id_5ffff238_hoisted_5 = ["onClick"]; +var QuickAccessvue_type_template_id_5ffff238_hoisted_6 = ["onMouseenter", "onClick"]; +var QuickAccessvue_type_template_id_5ffff238_hoisted_7 = { class: "quickAccessMatomoSearch" }; -var QuickAccessvue_type_template_id_08fc9316_hoisted_8 = ["onMouseenter", "onClick"]; -var QuickAccessvue_type_template_id_08fc9316_hoisted_9 = ["textContent"]; -var QuickAccessvue_type_template_id_08fc9316_hoisted_10 = { +var QuickAccessvue_type_template_id_5ffff238_hoisted_8 = ["onMouseenter", "onClick"]; +var QuickAccessvue_type_template_id_5ffff238_hoisted_9 = ["textContent"]; +var QuickAccessvue_type_template_id_5ffff238_hoisted_10 = { class: "quick-access-category helpCategory" }; -var QuickAccessvue_type_template_id_08fc9316_hoisted_11 = ["href"]; -function QuickAccessvue_type_template_id_08fc9316_render(_ctx, _cache, $props, $setup, $data, $options) { +var QuickAccessvue_type_template_id_5ffff238_hoisted_11 = ["href"]; +function QuickAccessvue_type_template_id_5ffff238_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", QuickAccessvue_type_template_id_08fc9316_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(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", QuickAccessvue_type_template_id_5ffff238_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-search", onMouseenter: _cache[0] || (_cache[0] = function ($event) { return _ctx.searchActive = true; @@ -6345,8 +6408,9 @@ function QuickAccessvue_type_template_id_08fc9316_render(_ctx, _cache, $props, $ }), type: "text", tabindex: "2", - title: _ctx.quickAccessTitle - }, null, 40, QuickAccessvue_type_template_id_08fc9316_hoisted_2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm], [_directive_focus_if, {}, _ctx.searchActive]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", QuickAccessvue_type_template_id_08fc9316_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", QuickAccessvue_type_template_id_08fc9316_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_SearchNoResults')), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !(_ctx.numMenuItems > 0 || _ctx.sites.length)]]), (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.menuItems, function (subcategory) { + title: _ctx.quickAccessTitle, + ref: "input" + }, null, 40, QuickAccessvue_type_template_id_5ffff238_hoisted_2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm], [_directive_focus_if, {}, _ctx.searchActive]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", QuickAccessvue_type_template_id_5ffff238_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", QuickAccessvue_type_template_id_5ffff238_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_SearchNoResults')), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !(_ctx.numMenuItems > 0 || _ctx.sites.length)]]), (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.menuItems, function (subcategory) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("ul", { key: subcategory.title }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { @@ -6356,7 +6420,7 @@ function QuickAccessvue_type_template_id_08fc9316_render(_ctx, _cache, $props, $ _ctx.searchMenu(_ctx.searchTerm); } - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.title), 9, QuickAccessvue_type_template_id_08fc9316_hoisted_5), (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"])(subcategory.items, function (submenuEntry) { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.title), 9, QuickAccessvue_type_template_id_5ffff238_hoisted_5), (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"])(subcategory.items, function (submenuEntry) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["result", { selected: submenuEntry.menuIndex === _ctx.searchIndex @@ -6368,9 +6432,9 @@ function QuickAccessvue_type_template_id_08fc9316_render(_ctx, _cache, $props, $ return _ctx.selectMenuItem(submenuEntry.index); }, key: submenuEntry.index - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(submenuEntry.name.trim()), 1)], 42, QuickAccessvue_type_template_id_08fc9316_hoisted_6); + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(submenuEntry.name.trim()), 1)], 42, QuickAccessvue_type_template_id_5ffff238_hoisted_6); }), 128))]); - }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", QuickAccessvue_type_template_id_08fc9316_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { + }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", QuickAccessvue_type_template_id_5ffff238_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { class: "quick-access-category websiteCategory" }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_Sites')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSitesSelector && _ctx.sites.length || _ctx.isLoading]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { class: "no-result" @@ -6388,8 +6452,8 @@ function QuickAccessvue_type_template_id_08fc9316_render(_ctx, _cache, $props, $ key: site.idsite }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { textContent: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(site.name) - }, null, 8, QuickAccessvue_type_template_id_08fc9316_hoisted_9)], 42, QuickAccessvue_type_template_id_08fc9316_hoisted_8)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSitesSelector && !_ctx.isLoading]]); - }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", QuickAccessvue_type_template_id_08fc9316_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_HelpResources')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { + }, null, 8, QuickAccessvue_type_template_id_5ffff238_hoisted_9)], 42, QuickAccessvue_type_template_id_5ffff238_hoisted_8)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSitesSelector && !_ctx.isLoading]]); + }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", QuickAccessvue_type_template_id_5ffff238_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_HelpResources')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])([{ selected: _ctx.searchIndex === 'help' }, "quick-access-help"]), @@ -6399,13 +6463,13 @@ function QuickAccessvue_type_template_id_08fc9316_render(_ctx, _cache, $props, $ }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { href: "https://matomo.org?s=".concat(encodeURIComponent(_ctx.searchTerm)), target: "_blank" - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_SearchOnMatomo', _ctx.searchTerm)), 9, QuickAccessvue_type_template_id_08fc9316_hoisted_11)], 34)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.searchTerm && _ctx.searchActive]])], 512)), [[_directive_focus_anywhere_but_here, { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_SearchOnMatomo', _ctx.searchTerm)), 9, QuickAccessvue_type_template_id_5ffff238_hoisted_11)], 34)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.searchTerm && _ctx.searchActive]])], 512)), [[_directive_focus_anywhere_but_here, { blur: _ctx.onBlur }]]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue?vue&type=template&id=08fc9316 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue?vue&type=template&id=5ffff238 -// 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/QuickAccess/QuickAccess.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/QuickAccess/QuickAccess.vue?vue&type=script&lang=ts function QuickAccessvue_type_script_lang_ts_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 QuickAccessvue_type_script_lang_ts_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { QuickAccessvue_type_script_lang_ts_ownKeys(Object(source), true).forEach(function (key) { QuickAccessvue_type_script_lang_ts_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { QuickAccessvue_type_script_lang_ts_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -6422,7 +6486,8 @@ function QuickAccessvue_type_script_lang_ts_defineProperty(obj, key, value) { if function isElementInViewport(element) { var rect = element.getBoundingClientRect(); - return rect.top >= 0 && rect.left >= 0 && rect.bottom <= window.$(window).height() && rect.right <= window.$(window).width(); + var $window = window.$(window); + return rect.top >= 0 && rect.left >= 0 && rect.bottom <= $window.height() && rect.right <= $window.width(); } function scrollFirstElementIntoView(element) { @@ -6433,14 +6498,19 @@ function scrollFirstElementIntoView(element) { } /* harmony default export */ var QuickAccessvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ - props: {}, directives: { FocusAnywhereButHere: FocusAnywhereButHere, FocusIf: FocusIf }, watch: { searchActive: function searchActive(newValue) { - var classes = this.$refs.root.parentElement.classList; + var root = this.$refs.root; + + if (!root || !root.parentElement) { + return; + } + + var classes = root.parentElement.classList; classes.toggle('active', newValue); classes.toggle('expanded', newValue); } @@ -6448,12 +6518,15 @@ function scrollFirstElementIntoView(element) { mounted: function mounted() { var _this = this; - // TODO: temporary, remove after angularjs is removed. + var root = this.$refs.root; // TODO: temporary, remove after angularjs is removed. // this is currently needed since angularjs will render a div, then vue will render a div // within it, but the top controls and CSS expect to have certain CSS classes in the root // element. // same applies to above watch for searchActive() - this.$refs.root.parentElement.classList.add('quick-access', 'piwikSelector'); + + if (root && root.parentElement) { + root.parentElement.classList.add('quick-access', 'piwikSelector'); + } if (typeof window.initTopControls !== 'undefined' && window.initTopControls) { window.initTopControls(); @@ -6584,7 +6657,10 @@ function scrollFirstElementIntoView(element) { deactivateSearch: function deactivateSearch() { this.searchTerm = ''; this.searchActive = false; - this.$refs.root.querySelector('input').blur(); + + if (this.$refs.input) { + this.$refs.input.blur(); + } }, makeSureSelectedItemIsInViewport: function makeSureSelectedItemIsInViewport() { var element = this.getCurrentlySelectedElement(); @@ -6600,7 +6676,7 @@ function scrollFirstElementIntoView(element) { return results.item(this.searchIndex); } - return null; + return undefined; }, searchMenu: function searchMenu(unprocessedSearchTerm) { var _this4 = this; @@ -6636,7 +6712,9 @@ function scrollFirstElementIntoView(element) { if (this.hasSitesSelector) { this.isLoading = true; SiteSelector_SitesStore.searchSite(searchTerm).then(function (sites) { - _this4.sites = sites; + if (sites) { + _this4.sites = sites; + } }).finally(function () { _this4.isLoading = false; }); @@ -6708,10 +6786,14 @@ function scrollFirstElementIntoView(element) { var category = translate('CoreHome_Menu'); var topMenuItems = []; document.querySelectorAll('nav .sidenav li > a').forEach(function (element) { - var text = element.textContent.trim(); + var _element$textContent; + + var text = (_element$textContent = element.textContent) === null || _element$textContent === void 0 ? void 0 : _element$textContent.trim(); if (!text) { - text = element.getAttribute('title').trim(); // possibly a icon, use title instead + var _element$getAttribute; + + text = (_element$getAttribute = element.getAttribute('title')) === null || _element$getAttribute === void 0 ? void 0 : _element$getAttribute.trim(); // possibly a icon, use title instead } if (text) { @@ -6730,8 +6812,10 @@ function scrollFirstElementIntoView(element) { var leftMenuItems = []; document.querySelectorAll('#secondNavBar .menuTab').forEach(function (element) { - var category = window.$(element).find('> .item'); - category = category[0] ? category[0].innerText.trim() : ''; + var _categoryElement$; + + var categoryElement = window.$(element).find('> .item'); + var category = ((_categoryElement$ = categoryElement[0]) === null || _categoryElement$ === void 0 ? void 0 : _categoryElement$.innerText.trim()) || ''; if (category && category.lastIndexOf('\n') !== -1) { // remove "\n\nMenu" @@ -6739,7 +6823,9 @@ function scrollFirstElementIntoView(element) { } window.$(element).find('li .item').each(function (i, subElement) { - var text = subElement.textContent.trim(); + var _subElement$textConte; + + var text = (_subElement$textConte = subElement.textContent) === null || _subElement$textConte === void 0 ? void 0 : _subElement$textConte.trim(); if (text) { leftMenuItems.push({ @@ -6763,7 +6849,9 @@ function scrollFirstElementIntoView(element) { var category = translate('CoreHome_Segments'); var segmentItems = []; document.querySelectorAll('.segmentList [data-idsegment]').forEach(function (element) { - var text = element.querySelector('.segname').textContent.trim(); + var _element$querySelecto, _element$querySelecto2; + + var text = (_element$querySelecto = element.querySelector('.segname')) === null || _element$querySelecto === void 0 ? void 0 : (_element$querySelecto2 = _element$querySelecto.textContent) === null || _element$querySelecto2 === void 0 ? void 0 : _element$querySelecto2.trim(); if (text) { segmentItems.push({ @@ -6784,7 +6872,7 @@ function scrollFirstElementIntoView(element) { -QuickAccessvue_type_script_lang_ts.render = QuickAccessvue_type_template_id_08fc9316_render +QuickAccessvue_type_script_lang_ts.render = QuickAccessvue_type_template_id_5ffff238_render /* harmony default export */ var QuickAccess = (QuickAccessvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/QuickAccess/QuickAccess.adapter.ts @@ -6810,26 +6898,26 @@ QuickAccessvue_type_script_lang_ts.render = QuickAccessvue_type_template_id_08fc } } })); -// 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/FieldArray/FieldArray.vue?vue&type=template&id=3f52d214 -function FieldArrayvue_type_template_id_3f52d214_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; } +// 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/FieldArray/FieldArray.vue?vue&type=template&id=460ed852 +function FieldArrayvue_type_template_id_460ed852_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; } -var FieldArrayvue_type_template_id_3f52d214_hoisted_1 = { +var FieldArrayvue_type_template_id_460ed852_hoisted_1 = { class: "fieldArray form-group" }; -var FieldArrayvue_type_template_id_3f52d214_hoisted_2 = { +var FieldArrayvue_type_template_id_460ed852_hoisted_2 = { key: 0, class: "fieldUiControl" }; -var FieldArrayvue_type_template_id_3f52d214_hoisted_3 = ["onClick", "title"]; -function FieldArrayvue_type_template_id_3f52d214_render(_ctx, _cache, $props, $setup, $data, $options) { +var FieldArrayvue_type_template_id_460ed852_hoisted_3 = ["onClick", "title"]; +function FieldArrayvue_type_template_id_460ed852_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FieldArrayvue_type_template_id_3f52d214_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.modelValue, function (item, index) { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FieldArrayvue_type_template_id_460ed852_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.modelValue, function (item, index) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["fieldArrayTable multiple valign-wrapper", FieldArrayvue_type_template_id_3f52d214_defineProperty({}, "fieldArrayTable".concat(index), true)]), + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["fieldArrayTable multiple valign-wrapper", FieldArrayvue_type_template_id_460ed852_defineProperty({}, "fieldArrayTable".concat(index), true)]), key: index - }, [_ctx.field.uiControl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FieldArrayvue_type_template_id_3f52d214_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, [_ctx.field.uiControl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FieldArrayvue_type_template_id_460ed852_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { "full-width": true, "model-value": item, options: _ctx.field.availableValues, @@ -6846,12 +6934,12 @@ function FieldArrayvue_type_template_id_3f52d214_render(_ctx, _cache, $props, $s }, class: "icon-minus valign", title: _ctx.translate('General_Remove') - }, null, 8, FieldArrayvue_type_template_id_3f52d214_hoisted_3), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], index + 1 !== _ctx.modelValue.length]])], 2); + }, null, 8, FieldArrayvue_type_template_id_460ed852_hoisted_3), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], index + 1 !== _ctx.modelValue.length]])], 2); }), 128))]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/FieldArray/FieldArray.vue?vue&type=template&id=3f52d214 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/FieldArray/FieldArray.vue?vue&type=template&id=460ed852 -// 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/FieldArray/FieldArray.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/FieldArray/FieldArray.vue?vue&type=script&lang=ts function FieldArrayvue_type_script_lang_ts_toConsumableArray(arr) { return FieldArrayvue_type_script_lang_ts_arrayWithoutHoles(arr) || FieldArrayvue_type_script_lang_ts_iterableToArray(arr) || FieldArrayvue_type_script_lang_ts_unsupportedIterableToArray(arr) || FieldArrayvue_type_script_lang_ts_nonIterableSpread(); } function FieldArrayvue_type_script_lang_ts_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } @@ -6894,13 +6982,13 @@ var Field = useExternalPluginComponent('CorePluginsAdmin', 'Field'); } }, onEntryChange: function onEntryChange(newValue, index) { - var newArrayValue = FieldArrayvue_type_script_lang_ts_toConsumableArray(this.modelValue); + var newArrayValue = FieldArrayvue_type_script_lang_ts_toConsumableArray(this.modelValue || []); newArrayValue[index] = newValue; this.$emit('update:modelValue', newArrayValue); }, removeEntry: function removeEntry(index) { - if (index > -1) { + if (index > -1 && this.modelValue) { var newValue = this.modelValue.filter(function (x, i) { return i !== index; }); @@ -6915,7 +7003,7 @@ var Field = useExternalPluginComponent('CorePluginsAdmin', 'Field'); -FieldArrayvue_type_script_lang_ts.render = FieldArrayvue_type_template_id_3f52d214_render +FieldArrayvue_type_script_lang_ts.render = FieldArrayvue_type_template_id_460ed852_render /* harmony default export */ var FieldArray = (FieldArrayvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/FieldArray/FieldArray.adapter.ts @@ -6957,7 +7045,7 @@ FieldArrayvue_type_script_lang_ts.render = FieldArrayvue_type_template_id_3f52d2 ngModel.$setViewValue(vm.modelValue); ngModel.$render = function () { - if (angular.isString(ngModel.$viewValue)) { + if (window.angular.isString(ngModel.$viewValue)) { vm.modelValue = JSON.parse(ngModel.$viewValue); } else { vm.modelValue = ngModel.$viewValue; @@ -6966,34 +7054,34 @@ FieldArrayvue_type_script_lang_ts.render = FieldArrayvue_type_template_id_3f52d2 } } })); -// 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/MultiPairField/MultiPairField.vue?vue&type=template&id=2fb01c36 -function MultiPairFieldvue_type_template_id_2fb01c36_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; } +// 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/MultiPairField/MultiPairField.vue?vue&type=template&id=15775141 +function MultiPairFieldvue_type_template_id_15775141_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; } -var MultiPairFieldvue_type_template_id_2fb01c36_hoisted_1 = { +var MultiPairFieldvue_type_template_id_15775141_hoisted_1 = { class: "multiPairField form-group" }; -var MultiPairFieldvue_type_template_id_2fb01c36_hoisted_2 = { +var MultiPairFieldvue_type_template_id_15775141_hoisted_2 = { key: 1, class: "fieldUiControl fieldUiControl2" }; -var MultiPairFieldvue_type_template_id_2fb01c36_hoisted_3 = { +var MultiPairFieldvue_type_template_id_15775141_hoisted_3 = { key: 2, class: "fieldUiControl fieldUiControl3" }; -var MultiPairFieldvue_type_template_id_2fb01c36_hoisted_4 = { +var MultiPairFieldvue_type_template_id_15775141_hoisted_4 = { key: 3, class: "fieldUiControl fieldUiControl4" }; -var MultiPairFieldvue_type_template_id_2fb01c36_hoisted_5 = ["onClick", "title"]; -function MultiPairFieldvue_type_template_id_2fb01c36_render(_ctx, _cache, $props, $setup, $data, $options) { +var MultiPairFieldvue_type_template_id_15775141_hoisted_5 = ["onClick", "title"]; +function MultiPairFieldvue_type_template_id_15775141_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MultiPairFieldvue_type_template_id_2fb01c36_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.modelValue, function (item, index) { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MultiPairFieldvue_type_template_id_15775141_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.modelValue, function (item, index) { var _ref; return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper", (_ref = {}, MultiPairFieldvue_type_template_id_2fb01c36_defineProperty(_ref, "multiPairFieldTable".concat(index), true), MultiPairFieldvue_type_template_id_2fb01c36_defineProperty(_ref, "has".concat(_ctx.fieldCount, "Fields"), true), _ref)]), + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper", (_ref = {}, MultiPairFieldvue_type_template_id_15775141_defineProperty(_ref, "multiPairFieldTable".concat(index), true), MultiPairFieldvue_type_template_id_15775141_defineProperty(_ref, "has".concat(_ctx.fieldCount, "Fields"), true), _ref)]), key: index }, [_ctx.field1 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { key: 0, @@ -7013,7 +7101,7 @@ function MultiPairFieldvue_type_template_id_2fb01c36_render(_ctx, _cache, $props uicontrol: _ctx.field1.uiControl, name: "".concat(_ctx.name, "-p1-").concat(index), title: _ctx.field1.title - }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "uicontrol", "name", "title"])], 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.field2 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MultiPairFieldvue_type_template_id_2fb01c36_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "uicontrol", "name", "title"])], 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.field2 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MultiPairFieldvue_type_template_id_15775141_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { "full-width": true, options: _ctx.field2.availableValues, "onUpdate:modelValue": [function ($event) { @@ -7026,7 +7114,7 @@ function MultiPairFieldvue_type_template_id_2fb01c36_render(_ctx, _cache, $props uicontrol: _ctx.field2.uiControl, name: "".concat(_ctx.name, "-p2-").concat(index), title: _ctx.field2.title - }, null, 8, ["options", "onUpdate:modelValue", "modelValue", "uicontrol", "name", "title"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.field3 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MultiPairFieldvue_type_template_id_2fb01c36_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["options", "onUpdate:modelValue", "modelValue", "uicontrol", "name", "title"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.field3 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MultiPairFieldvue_type_template_id_15775141_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { "full-width": true, options: _ctx.field3.availableValues, "onUpdate:modelValue": [function ($event) { @@ -7038,7 +7126,7 @@ function MultiPairFieldvue_type_template_id_2fb01c36_render(_ctx, _cache, $props placeholder: ' ', uicontrol: _ctx.field3.uiControl, title: _ctx.field3.title - }, null, 8, ["options", "onUpdate:modelValue", "modelValue", "uicontrol", "title"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.field4 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MultiPairFieldvue_type_template_id_2fb01c36_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["options", "onUpdate:modelValue", "modelValue", "uicontrol", "title"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.field4 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", MultiPairFieldvue_type_template_id_15775141_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { "full-width": true, options: _ctx.field4.availableValues, "onUpdate:modelValue": [function ($event) { @@ -7056,12 +7144,12 @@ function MultiPairFieldvue_type_template_id_2fb01c36_render(_ctx, _cache, $props }, class: "icon-minus valign", title: _ctx.translate('General_Remove') - }, null, 8, MultiPairFieldvue_type_template_id_2fb01c36_hoisted_5), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], index + 1 !== _ctx.modelValue.length]])], 2); + }, null, 8, MultiPairFieldvue_type_template_id_15775141_hoisted_5), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], index + 1 !== _ctx.modelValue.length]])], 2); }), 128))]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MultiPairField/MultiPairField.vue?vue&type=template&id=2fb01c36 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MultiPairField/MultiPairField.vue?vue&type=template&id=15775141 -// 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/MultiPairField/MultiPairField.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/MultiPairField/MultiPairField.vue?vue&type=script&lang=ts function MultiPairFieldvue_type_script_lang_ts_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 MultiPairFieldvue_type_script_lang_ts_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { MultiPairFieldvue_type_script_lang_ts_ownKeys(Object(source), true).forEach(function (key) { MultiPairFieldvue_type_script_lang_ts_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { MultiPairFieldvue_type_script_lang_ts_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -7140,7 +7228,7 @@ var MultiPairFieldvue_type_script_lang_ts_Field = useExternalPluginComponent('Co this.$emit('update:modelValue', newWholeValue); }, removeEntry: function removeEntry(index) { - if (index > -1) { + if (index > -1 && this.modelValue) { var newValue = this.modelValue.filter(function (x, i) { return i !== index; }); @@ -7199,7 +7287,7 @@ var MultiPairFieldvue_type_script_lang_ts_Field = useExternalPluginComponent('Co -MultiPairFieldvue_type_script_lang_ts.render = MultiPairFieldvue_type_template_id_2fb01c36_render +MultiPairFieldvue_type_script_lang_ts.render = MultiPairFieldvue_type_template_id_15775141_render /* harmony default export */ var MultiPairField = (MultiPairFieldvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MultiPairField/MultiPairField.adapter.ts @@ -7250,7 +7338,7 @@ MultiPairFieldvue_type_script_lang_ts.render = MultiPairFieldvue_type_template_i ngModel.$setViewValue(vm.modelValue); ngModel.$render = function () { - if (angular.isString(ngModel.$viewValue)) { + if (window.angular.isString(ngModel.$viewValue)) { vm.modelValue = JSON.parse(ngModel.$viewValue); } else { vm.modelValue = ngModel.$viewValue; @@ -7259,53 +7347,53 @@ MultiPairFieldvue_type_script_lang_ts.render = MultiPairFieldvue_type_template_i } } })); -// 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/PeriodSelector/PeriodSelector.vue?vue&type=template&id=4c736d79 +// 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/PeriodSelector/PeriodSelector.vue?vue&type=template&id=042ce166 -var PeriodSelectorvue_type_template_id_4c736d79_hoisted_1 = { +var PeriodSelectorvue_type_template_id_042ce166_hoisted_1 = { ref: "root", class: "periodSelector piwikSelector" }; -var PeriodSelectorvue_type_template_id_4c736d79_hoisted_2 = ["title"]; +var PeriodSelectorvue_type_template_id_042ce166_hoisted_2 = ["title"]; -var PeriodSelectorvue_type_template_id_4c736d79_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var PeriodSelectorvue_type_template_id_042ce166_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon icon-calendar" }, null, -1); -var PeriodSelectorvue_type_template_id_4c736d79_hoisted_4 = { +var PeriodSelectorvue_type_template_id_042ce166_hoisted_4 = { id: "periodMore", class: "dropdown" }; -var PeriodSelectorvue_type_template_id_4c736d79_hoisted_5 = { +var PeriodSelectorvue_type_template_id_042ce166_hoisted_5 = { class: "flex" }; -var PeriodSelectorvue_type_template_id_4c736d79_hoisted_6 = { +var PeriodSelectorvue_type_template_id_042ce166_hoisted_6 = { key: 0, class: "period-date" }; -var PeriodSelectorvue_type_template_id_4c736d79_hoisted_7 = { +var PeriodSelectorvue_type_template_id_042ce166_hoisted_7 = { class: "period-type" }; -var PeriodSelectorvue_type_template_id_4c736d79_hoisted_8 = { +var PeriodSelectorvue_type_template_id_042ce166_hoisted_8 = { id: "otherPeriods" }; -var PeriodSelectorvue_type_template_id_4c736d79_hoisted_9 = ["onDblclick", "title"]; -var PeriodSelectorvue_type_template_id_4c736d79_hoisted_10 = ["id", "checked", "onChange", "onDblclick"]; -var PeriodSelectorvue_type_template_id_4c736d79_hoisted_11 = { +var PeriodSelectorvue_type_template_id_042ce166_hoisted_9 = ["onDblclick", "title"]; +var PeriodSelectorvue_type_template_id_042ce166_hoisted_10 = ["id", "checked", "onChange", "onDblclick"]; +var PeriodSelectorvue_type_template_id_042ce166_hoisted_11 = { key: 0, class: "compare-checkbox" }; -var PeriodSelectorvue_type_template_id_4c736d79_hoisted_12 = { +var PeriodSelectorvue_type_template_id_042ce166_hoisted_12 = { id: "comparePeriodToDropdown" }; -var PeriodSelectorvue_type_template_id_4c736d79_hoisted_13 = { +var PeriodSelectorvue_type_template_id_042ce166_hoisted_13 = { key: 1, class: "compare-date-range" }; -var PeriodSelectorvue_type_template_id_4c736d79_hoisted_14 = { +var PeriodSelectorvue_type_template_id_042ce166_hoisted_14 = { id: "comparePeriodStartDate" }; -var PeriodSelectorvue_type_template_id_4c736d79_hoisted_15 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var PeriodSelectorvue_type_template_id_042ce166_hoisted_15 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "compare-dates-separator" }, null, -1); @@ -7323,7 +7411,7 @@ var _hoisted_19 = { var _hoisted_20 = { class: "loadingSegment" }; -function PeriodSelectorvue_type_template_id_4c736d79_render(_ctx, _cache, $props, $setup, $data, $options) { +function PeriodSelectorvue_type_template_id_042ce166_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_DateRangePicker = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("DateRangePicker"); var _component_PeriodDatePicker = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("PeriodDatePicker"); @@ -7334,13 +7422,13 @@ function PeriodSelectorvue_type_template_id_4c736d79_render(_ctx, _cache, $props var _directive_expand_on_click = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("expand-on-click"); - 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", PeriodSelectorvue_type_template_id_4c736d79_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + 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", PeriodSelectorvue_type_template_id_042ce166_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { ref: "title", id: "date", class: "title", tabindex: "-1", title: _ctx.translate('General_ChooseDate', _ctx.currentlyViewingText) - }, [PeriodSelectorvue_type_template_id_4c736d79_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.currentlyViewingText), 1)], 8, PeriodSelectorvue_type_template_id_4c736d79_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_4c736d79_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_4c736d79_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_DateRangePicker, { + }, [PeriodSelectorvue_type_template_id_042ce166_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.currentlyViewingText), 1)], 8, PeriodSelectorvue_type_template_id_042ce166_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_DateRangePicker, { class: "period-range", "start-date": _ctx.startRangeDate, "end-date": _ctx.endRangeDate, @@ -7350,14 +7438,14 @@ function PeriodSelectorvue_type_template_id_4c736d79_render(_ctx, _cache, $props onSubmit: _cache[1] || (_cache[1] = function ($event) { return _ctx.onApplyClicked(); }) - }, null, 8, ["start-date", "end-date"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.selectedPeriod === 'range']]), _ctx.selectedPeriod !== 'range' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorvue_type_template_id_4c736d79_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PeriodDatePicker, { + }, null, 8, ["start-date", "end-date"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.selectedPeriod === 'range']]), _ctx.selectedPeriod !== 'range' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PeriodDatePicker, { id: "datepicker", period: _ctx.selectedPeriod, date: _ctx.periodValue === _ctx.selectedPeriod ? _ctx.dateValue : null, onSelect: _cache[2] || (_cache[2] = function ($event) { return _ctx.setPiwikPeriodAndDate(_ctx.selectedPeriod, $event.date); }) - }, null, 8, ["period", "date"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_4c736d79_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h6", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Period')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_4c736d79_hoisted_8, [(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.periodsFiltered, function (period) { + }, null, 8, ["period", "date"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h6", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Period')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_8, [(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.periodsFiltered, function (period) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", { key: period }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", { @@ -7382,14 +7470,14 @@ function PeriodSelectorvue_type_template_id_4c736d79_render(_ctx, _cache, $props onDblclick: function onDblclick($event) { return _ctx.changeViewedPeriod(period); } - }, null, 40, PeriodSelectorvue_type_template_id_4c736d79_hoisted_10), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelRadio"], _ctx.selectedPeriod]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getPeriodDisplayText(period)), 1)], 42, PeriodSelectorvue_type_template_id_4c736d79_hoisted_9)]); - }), 128))])])]), _ctx.isComparisonEnabled ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorvue_type_template_id_4c736d79_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 40, PeriodSelectorvue_type_template_id_042ce166_hoisted_10), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelRadio"], _ctx.selectedPeriod]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getPeriodDisplayText(period)), 1)], 42, PeriodSelectorvue_type_template_id_042ce166_hoisted_9)]); + }), 128))])])]), _ctx.isComparisonEnabled ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { id: "comparePeriodTo", type: "checkbox", "onUpdate:modelValue": _cache[4] || (_cache[4] = function ($event) { return _ctx.isComparing = $event; }) - }, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelCheckbox"], _ctx.isComparing]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_CompareTo')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_4c736d79_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelCheckbox"], _ctx.isComparing]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_CompareTo')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { modelValue: _ctx.comparePeriodType, "onUpdate:modelValue": _cache[5] || (_cache[5] = function ($event) { return _ctx.comparePeriodType = $event; @@ -7402,7 +7490,7 @@ function PeriodSelectorvue_type_template_id_4c736d79_render(_ctx, _cache, $props options: _ctx.comparePeriodDropdownOptions, "full-width": true, disabled: !_ctx.isComparing - }, null, 8, ["modelValue", "style", "options", "disabled"])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.isComparing && _ctx.comparePeriodType === 'custom' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorvue_type_template_id_4c736d79_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_4c736d79_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["modelValue", "style", "options", "disabled"])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.isComparing && _ctx.comparePeriodType === 'custom' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { modelValue: _ctx.compareStartDate, "onUpdate:modelValue": _cache[6] || (_cache[6] = function ($event) { return _ctx.compareStartDate = $event; @@ -7412,7 +7500,7 @@ function PeriodSelectorvue_type_template_id_4c736d79_render(_ctx, _cache, $props "full-width": true, title: _ctx.translate('CoreHome_StartDate'), placeholder: 'YYYY-MM-DD' - }, null, 8, ["modelValue", "title"])])]), PeriodSelectorvue_type_template_id_4c736d79_hoisted_15, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["modelValue", "title"])])]), PeriodSelectorvue_type_template_id_042ce166_hoisted_15, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { modelValue: _ctx.compareEndDate, "onUpdate:modelValue": _cache[7] || (_cache[7] = function ($event) { return _ctx.compareEndDate = $event; @@ -7437,7 +7525,7 @@ function PeriodSelectorvue_type_template_id_4c736d79_render(_ctx, _cache, $props expander: 'title' }]]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue?vue&type=template&id=4c736d79 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue?vue&type=template&id=042ce166 // 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/ActivityIndicator/ActivityIndicator.vue?vue&type=template&id=6af4d064 @@ -7455,7 +7543,7 @@ function ActivityIndicatorvue_type_template_id_6af4d064_render(_ctx, _cache, $pr } // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?vue&type=template&id=6af4d064 -// 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/ActivityIndicator/ActivityIndicator.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/ActivityIndicator/ActivityIndicator.vue?vue&type=script&lang=ts /* harmony default export */ var ActivityIndicatorvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ @@ -7481,7 +7569,7 @@ function ActivityIndicatorvue_type_template_id_6af4d064_render(_ctx, _cache, $pr ActivityIndicatorvue_type_script_lang_ts.render = ActivityIndicatorvue_type_template_id_6af4d064_render /* harmony default export */ var ActivityIndicator = (ActivityIndicatorvue_type_script_lang_ts); -// 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/PeriodSelector/PeriodSelector.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/PeriodSelector/PeriodSelector.vue?vue&type=script&lang=ts function PeriodSelectorvue_type_script_lang_ts_slicedToArray(arr, i) { return PeriodSelectorvue_type_script_lang_ts_arrayWithHoles(arr) || PeriodSelectorvue_type_script_lang_ts_iterableToArrayLimit(arr, i) || PeriodSelectorvue_type_script_lang_ts_unsupportedIterableToArray(arr, i) || PeriodSelectorvue_type_script_lang_ts_nonIterableRest(); } function PeriodSelectorvue_type_script_lang_ts_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } @@ -7548,11 +7636,12 @@ function isValidDate(d) { ExpandOnClick: ExpandOnClick }, data: function data() { + var selectedPeriod = src_MatomoUrl_MatomoUrl.parsed.value.period; return { comparePeriodDropdownOptions: COMPARE_PERIOD_OPTIONS, - periodValue: null, + periodValue: selectedPeriod, dateValue: null, - selectedPeriod: null, + selectedPeriod: selectedPeriod, startRangeDate: null, endRangeDate: null, isRangeValid: null, @@ -7640,7 +7729,7 @@ function isValidDate(d) { } if (this.comparePeriodType === 'previousYear') { - var dateStr = this.selectedPeriod === 'range' ? "".concat(this.startRangeDate, ",").concat(this.endRangeDate) : this.dateValue; + var dateStr = this.selectedPeriod === 'range' ? "".concat(this.startRangeDate, ",").concat(this.endRangeDate) : format(this.dateValue); var currentDateRange = Periods_Periods.parse(this.selectedPeriod, dateStr).getDateRange(); currentDateRange[0].setFullYear(currentDateRange[0].getFullYear() - 1); currentDateRange[1].setFullYear(currentDateRange[1].getFullYear() - 1); @@ -7666,7 +7755,7 @@ function isValidDate(d) { var currentStartRange = parseDate(this.startRangeDate); var currentEndRange = parseDate(this.endRangeDate); var newEndDate = Range_RangePeriod.getLastNRange('day', 2, currentStartRange).startDate; - var rangeSize = Math.floor((currentEndRange - currentStartRange) / 86400000); + var rangeSize = Math.floor((currentEndRange.valueOf() - currentStartRange.valueOf()) / 86400000); var newRange = Range_RangePeriod.getLastNRange('day', 1 + rangeSize, newEndDate); return "".concat(format(newRange.startDate), ",").concat(format(newRange.endDate)); } @@ -7703,18 +7792,18 @@ function isValidDate(d) { $element.removeClass('compare-dropdown-open'); }); }, - changeViewedPeriod: function changeViewedPeriod() { + changeViewedPeriod: function changeViewedPeriod(period) { // only change period if it's different from what's being shown currently - if (this.period === this.periodValue) { + if (period === this.periodValue) { return; } // can't just change to a range period, w/o setting two new dates - if (this.period === 'range') { + if (period === 'range') { return; } - this.setPiwikPeriodAndDate(this.period, this.dateValue); + this.setPiwikPeriodAndDate(period, this.dateValue); }, setPiwikPeriodAndDate: function setPiwikPeriodAndDate(period, date) { this.periodValue = period; @@ -7763,9 +7852,8 @@ function isValidDate(d) { this.setPiwikPeriodAndDate(this.selectedPeriod, this.dateValue); }, updateSelectedValuesFromHash: function updateSelectedValuesFromHash() { - var _MatomoUrl$parsed$val = src_MatomoUrl_MatomoUrl.parsed.value, - date = _MatomoUrl$parsed$val.date, - period = _MatomoUrl$parsed$val.period; + var date = src_MatomoUrl_MatomoUrl.parsed.value.date; + var period = src_MatomoUrl_MatomoUrl.parsed.value.period; this.periodValue = period; this.selectedPeriod = period; this.dateValue = null; @@ -7849,7 +7937,7 @@ function isValidDate(d) { -PeriodSelectorvue_type_script_lang_ts.render = PeriodSelectorvue_type_template_id_4c736d79_render +PeriodSelectorvue_type_script_lang_ts.render = PeriodSelectorvue_type_template_id_042ce166_render /* harmony default export */ var PeriodSelector = (PeriodSelectorvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.adapter.ts @@ -7870,55 +7958,55 @@ PeriodSelectorvue_type_script_lang_ts.render = PeriodSelectorvue_type_template_i }, directiveName: 'piwikPeriodSelector' })); -// 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/ReportingMenu/ReportingMenu.vue?vue&type=template&id=77eaf70c +// 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/ReportingMenu/ReportingMenu.vue?vue&type=template&id=a3508790 -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_1 = { +var ReportingMenuvue_type_template_id_a3508790_hoisted_1 = { class: "reportingMenu" }; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_2 = ["aria-label"]; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_3 = ["onClick"]; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_4 = { +var ReportingMenuvue_type_template_id_a3508790_hoisted_2 = ["aria-label"]; +var ReportingMenuvue_type_template_id_a3508790_hoisted_3 = ["onClick"]; +var ReportingMenuvue_type_template_id_a3508790_hoisted_4 = { class: "hidden" }; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_5 = { +var ReportingMenuvue_type_template_id_a3508790_hoisted_5 = { role: "menu" }; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_6 = ["href", "onClick", "title"]; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_7 = ["href", "onClick"]; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_8 = ["onClick"]; +var ReportingMenuvue_type_template_id_a3508790_hoisted_6 = ["href", "onClick", "title"]; +var ReportingMenuvue_type_template_id_a3508790_hoisted_7 = ["href", "onClick"]; +var ReportingMenuvue_type_template_id_a3508790_hoisted_8 = ["onClick"]; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_9 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var ReportingMenuvue_type_template_id_a3508790_hoisted_9 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-help" }, null, -1); -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_10 = [ReportingMenuvue_type_template_id_77eaf70c_hoisted_9]; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_11 = { +var ReportingMenuvue_type_template_id_a3508790_hoisted_10 = [ReportingMenuvue_type_template_id_a3508790_hoisted_9]; +var ReportingMenuvue_type_template_id_a3508790_hoisted_11 = { id: "mobile-left-menu", class: "sidenav hide-on-large-only" }; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_12 = { +var ReportingMenuvue_type_template_id_a3508790_hoisted_12 = { class: "collapsible collapsible-accordion" }; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_13 = { +var ReportingMenuvue_type_template_id_a3508790_hoisted_13 = { class: "collapsible-header" }; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_14 = { +var ReportingMenuvue_type_template_id_a3508790_hoisted_14 = { class: "collapsible-body" }; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_15 = { +var ReportingMenuvue_type_template_id_a3508790_hoisted_15 = { key: 0 }; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_16 = ["onClick", "href"]; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_17 = { +var ReportingMenuvue_type_template_id_a3508790_hoisted_16 = ["onClick", "href"]; +var ReportingMenuvue_type_template_id_a3508790_hoisted_17 = { key: 1 }; -var ReportingMenuvue_type_template_id_77eaf70c_hoisted_18 = ["onClick", "href"]; -function ReportingMenuvue_type_template_id_77eaf70c_render(_ctx, _cache, $props, $setup, $data, $options) { +var ReportingMenuvue_type_template_id_a3508790_hoisted_18 = ["onClick", "href"]; +function ReportingMenuvue_type_template_id_a3508790_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_MenuDropdown = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MenuDropdown"); var _directive_side_nav = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("side-nav"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingMenuvue_type_template_id_77eaf70c_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingMenuvue_type_template_id_a3508790_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", { class: "navbar hide-on-med-and-down", role: "menu", "aria-label": _ctx.translate('CoreHome_MainNavigation') @@ -7938,7 +8026,7 @@ function ReportingMenuvue_type_template_id_77eaf70c_render(_ctx, _cache, $props, }, ["prevent"]) }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])("menu-icon ".concat(category.icon ? category.icon : 'icon-arrow-right')) - }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(category.name) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", ReportingMenuvue_type_template_id_77eaf70c_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_Menu')), 1)], 8, ReportingMenuvue_type_template_id_77eaf70c_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_77eaf70c_hoisted_5, [(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"])(category.subcategories, function (subcategory) { + }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(category.name) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", ReportingMenuvue_type_template_id_a3508790_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_Menu')), 1)], 8, ReportingMenuvue_type_template_id_a3508790_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_a3508790_hoisted_5, [(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"])(category.subcategories, function (subcategory) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { role: "menuitem", class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ @@ -7963,7 +8051,7 @@ function ReportingMenuvue_type_template_id_77eaf70c_render(_ctx, _cache, $props, }, title: subcat.tooltip, key: subcat.id - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcat.name), 11, ReportingMenuvue_type_template_id_77eaf70c_hoisted_6); + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcat.name), 11, ReportingMenuvue_type_template_id_a3508790_hoisted_6); }), 128))]; }), _: 2 @@ -7974,7 +8062,7 @@ function ReportingMenuvue_type_template_id_77eaf70c_render(_ctx, _cache, $props, onClick: function onClick($event) { return _ctx.loadSubcategory(category, subcategory, $event); } - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.name), 9, ReportingMenuvue_type_template_id_77eaf70c_hoisted_7)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), subcategory.help ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.name), 9, ReportingMenuvue_type_template_id_a3508790_hoisted_7)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), subcategory.help ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { key: 2, class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["item-help-icon", { active: _ctx.helpShownCategory && _ctx.helpShownCategory.subcategory === subcategory.id && _ctx.helpShownCategory.category === category.id && subcategory.help @@ -7984,55 +8072,55 @@ function ReportingMenuvue_type_template_id_77eaf70c_render(_ctx, _cache, $props, onClick: function onClick($event) { return _ctx.showHelp(category, subcategory, $event); } - }, ReportingMenuvue_type_template_id_77eaf70c_hoisted_10, 10, ReportingMenuvue_type_template_id_77eaf70c_hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); + }, ReportingMenuvue_type_template_id_a3508790_hoisted_10, 10, ReportingMenuvue_type_template_id_a3508790_hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); }), 128))])], 2); - }), 128))], 8, ReportingMenuvue_type_template_id_77eaf70c_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_77eaf70c_hoisted_11, [(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.menu, function (category) { + }), 128))], 8, ReportingMenuvue_type_template_id_a3508790_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_a3508790_hoisted_11, [(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.menu, function (category) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { class: "no-padding", key: category.id - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_77eaf70c_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", ReportingMenuvue_type_template_id_77eaf70c_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("i", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_a3508790_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", ReportingMenuvue_type_template_id_a3508790_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("i", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(category.icon ? category.icon : 'icon-arrow-bottom') - }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(category.name), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportingMenuvue_type_template_id_77eaf70c_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [(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"])(category.subcategories, function (subcategory) { + }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(category.name), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportingMenuvue_type_template_id_a3508790_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [(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"])(category.subcategories, function (subcategory) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { key: subcategory.id - }, [subcategory.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", ReportingMenuvue_type_template_id_77eaf70c_hoisted_15, [(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"])(subcategory.subcategories, function (subcat) { + }, [subcategory.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", ReportingMenuvue_type_template_id_a3508790_hoisted_15, [(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"])(subcategory.subcategories, function (subcat) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { onClick: function onClick($event) { return _ctx.loadSubcategory(category, subcat); }, href: "#?".concat(_ctx.makeUrl(category, subcat)), key: subcat.id - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcat.name), 9, ReportingMenuvue_type_template_id_77eaf70c_hoisted_16); - }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !subcategory.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", ReportingMenuvue_type_template_id_77eaf70c_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcat.name), 9, ReportingMenuvue_type_template_id_a3508790_hoisted_16); + }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !subcategory.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", ReportingMenuvue_type_template_id_a3508790_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { onClick: function onClick($event) { return _ctx.loadSubcategory(category, subcategory); }, href: "#?".concat(_ctx.makeUrl(category, subcategory)) - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.name), 9, ReportingMenuvue_type_template_id_77eaf70c_hoisted_18)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.name), 9, ReportingMenuvue_type_template_id_a3508790_hoisted_18)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); }), 128))])])])], 512), [[_directive_side_nav, { activator: _ctx.sideNavActivator }]])]); }), 128))])]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue?vue&type=template&id=77eaf70c +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue?vue&type=template&id=a3508790 -// 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 +// 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=3d317b36 -var Notificationvue_type_template_id_e3d12348_hoisted_1 = { +var Notificationvue_type_template_id_3d317b36_hoisted_1 = { key: 0 }; -var Notificationvue_type_template_id_e3d12348_hoisted_2 = ["data-notification-instance-id"]; -var Notificationvue_type_template_id_e3d12348_hoisted_3 = { +var Notificationvue_type_template_id_3d317b36_hoisted_2 = ["data-notification-instance-id"]; +var Notificationvue_type_template_id_3d317b36_hoisted_3 = { key: 1 }; -var Notificationvue_type_template_id_e3d12348_hoisted_4 = { +var Notificationvue_type_template_id_3d317b36_hoisted_4 = { class: "notification-body" }; -var Notificationvue_type_template_id_e3d12348_hoisted_5 = ["innerHTML"]; -var Notificationvue_type_template_id_e3d12348_hoisted_6 = { +var Notificationvue_type_template_id_3d317b36_hoisted_5 = ["innerHTML"]; +var Notificationvue_type_template_id_3d317b36_hoisted_6 = { key: 1 }; -function Notificationvue_type_template_id_e3d12348_render(_ctx, _cache, $props, $setup, $data, $options) { +function Notificationvue_type_template_id_3d317b36_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) { @@ -8040,7 +8128,7 @@ function Notificationvue_type_template_id_e3d12348_render(_ctx, _cache, $props, }) }, { 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"], { + 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_3d317b36_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: "" }, { @@ -8063,10 +8151,10 @@ function Notificationvue_type_template_id_e3d12348_render(_ctx, _cache, $props, 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", { + }, " × ")) : 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_3d317b36_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_3d317b36_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)]; + }, null, 8, Notificationvue_type_template_id_3d317b36_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_3d317b36_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_3d317b36_hoisted_2)]; }), _: 3 }, 8, ["name"])])]; @@ -8077,9 +8165,9 @@ function Notificationvue_type_template_id_e3d12348_render(_ctx, _cache, $props, _: 3 }, 8, ["name"]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/Notification.vue?vue&type=template&id=e3d12348 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/Notification.vue?vue&type=template&id=3d317b36 -// 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 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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, @@ -8191,7 +8279,7 @@ var Notificationvue_type_script_lang_ts_window = window, -Notificationvue_type_script_lang_ts.render = Notificationvue_type_template_id_e3d12348_render +Notificationvue_type_script_lang_ts.render = Notificationvue_type_template_id_3d317b36_render /* harmony default export */ var Notification = (Notificationvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/Notification.adapter.ts @@ -8252,6 +8340,8 @@ function Notifications_store_defineProperty(obj, key, value) { if (key in obj) { +var Notifications_store_window = window, + Notifications_store_$ = Notifications_store_window.$; var Notifications_store_NotificationsStore = /*#__PURE__*/function () { function NotificationsStore() { @@ -8307,10 +8397,10 @@ var Notifications_store_NotificationsStore = /*#__PURE__*/function () { value: function parseNotificationDivs() { var _this = this; - var $notificationNodes = $('[data-role="notification"]'); + var $notificationNodes = Notifications_store_$('[data-role="notification"]'); var notificationsToShow = []; $notificationNodes.each(function (index, notificationNode) { - var $notificationNode = $(notificationNode); + var $notificationNode = Notifications_store_$(notificationNode); var attributes = $notificationNode.data(); var message = $notificationNode.html(); @@ -8355,7 +8445,7 @@ var Notifications_store_NotificationsStore = /*#__PURE__*/function () { if (modal) { if (!modal.querySelector('#modalNotificationContainer')) { - window.$(modal).prepend('<div id="modalNotificationContainer"/>'); + Notifications_store_$(modal).prepend('<div id="modalNotificationContainer"/>'); } notificationPosition = "".concat(modalSelector, " #modalNotificationContainer"); @@ -8394,9 +8484,9 @@ var Notifications_store_NotificationsStore = /*#__PURE__*/function () { key: "toast", value: function toast(notification) { this.checkMessage(notification.message); - var $placeat = $(notification.placeat); + var $placeat = notification.placeat ? Notifications_store_$(notification.placeat) : undefined; - if (!$placeat.length) { + if (!$placeat || !$placeat.length) { throw new Error('A valid selector is required for the placeat option when using Notification.toast().'); } @@ -8422,7 +8512,11 @@ var Notifications_store_NotificationsStore = /*#__PURE__*/function () { }, { key: "initializeNotificationContainer", value: function initializeNotificationContainer(notificationPosition, group) { - var $container = window.$(notificationPosition); + if (!notificationPosition) { + return; + } + + var $container = Notifications_store_$(notificationPosition); if ($container.children('.notification-group').length) { return; @@ -8458,7 +8552,7 @@ var Notifications_store_NotificationsStore = /*#__PURE__*/function () { var Notifications_store_instance = new Notifications_store_NotificationsStore(); /* harmony default export */ var Notifications_store = (Notifications_store_instance); // parse notifications on dom load -$(function () { +Notifications_store_$(function () { return Notifications_store_instance.parseNotificationDivs(); }); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Notification/Notifications.store.adapter.ts @@ -8469,7 +8563,7 @@ $(function () { * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -angular.module('piwikApp').factory('notifications', function () { +window.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 @@ -8510,7 +8604,7 @@ function NotificationGroupvue_type_template_id_672051da_render(_ctx, _cache, $pr } // 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 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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 @@ -8588,12 +8682,14 @@ var ReportingPages_store_ReportingPagesStore = /*#__PURE__*/function () { pages: [] })); - ReportingPages_store_defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(this.privateState)); + ReportingPages_store_defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(_this.privateState); + })); ReportingPages_store_defineProperty(this, "fetchAllPagesPromise", void 0); ReportingPages_store_defineProperty(this, "pages", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { - return _this.state.pages; + return _this.state.value.pages; })); } @@ -8616,7 +8712,7 @@ var ReportingPages_store_ReportingPagesStore = /*#__PURE__*/function () { }, { key: "reloadAllPages", value: function reloadAllPages() { - this.fetchAllPagesPromise = null; + delete this.fetchAllPagesPromise; return this.getAllPages(); } }, { @@ -8630,6 +8726,7 @@ var ReportingPages_store_ReportingPagesStore = /*#__PURE__*/function () { filter_limit: '-1' }).then(function (response) { _this2.privateState.pages = response; + return _this2.pages.value; }); } @@ -8677,6 +8774,38 @@ function sortOrderables(menu) { }); return result; } +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/Category.ts +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ +function getCategoryChildren(category) { + var container = category; + + if (container.subcategories) { + return container.subcategories; + } + + return []; +} +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/Subcategory.ts +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ +function getSubcategoryChildren(subcategory) { + var container = subcategory; + + if (container.subcategories) { + return container.subcategories; + } + + return []; +} // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.ts function ReportingMenu_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; } @@ -8702,6 +8831,8 @@ function ReportingMenu_store_defineProperty(obj, key, value) { if (key in obj) { + + function isNumeric(text) { var n = parseFloat(text); return !Number.isNaN(n) && Number.isFinite(n); @@ -8774,22 +8905,22 @@ var ReportingMenu_store_ReportingMenuStore = /*#__PURE__*/function () { }, { key: "findSubcategory", value: function findSubcategory(categoryId, subcategoryId) { - var foundCategory = null; - var foundSubcategory = null; - var foundSubSubcategory = null; + var foundCategory = undefined; + var foundSubcategory = undefined; + var foundSubSubcategory = undefined; this.menu.value.forEach(function (category) { if (category.id !== categoryId) { return; } - (category.subcategories || []).forEach(function (subcategory) { + (getCategoryChildren(category) || []).forEach(function (subcategory) { if (subcategory.id === subcategoryId) { foundCategory = category; foundSubcategory = subcategory; } if (subcategory.isGroup) { - (subcategory.subcategories || []).forEach(function (subcat) { + (getSubcategoryChildren(subcategory) || []).forEach(function (subcat) { if (subcat.id === subcategoryId) { foundCategory = category; foundSubcategory = subcategory; @@ -8825,7 +8956,7 @@ var ReportingMenu_store_ReportingMenuStore = /*#__PURE__*/function () { categoriesHandled[categoryId] = true; category.subcategories = []; - var categoryGroups; + var categoryGroups = null; var pagesWithCategory = pages.filter(function (p) { return p.category.id === categoryId; }); @@ -8865,7 +8996,7 @@ var ReportingMenu_store_ReportingMenuStore = /*#__PURE__*/function () { category.subcategories.push(categoryGroups); } - category.subcategories = sortOrderables(category.subcategories); + category.subcategories = sortOrderables(getCategoryChildren(category)); menu.push(category); }); return sortOrderables(menu); @@ -8922,6 +9053,15 @@ function Widgets_store_defineProperty(obj, key, value) { if (key in obj) { Objec */ +function getWidgetChildren(widget) { + var container = widget; + + if (container.widgets) { + return container.widgets; + } + + return []; +} var Widgets_store_WidgetsStore = /*#__PURE__*/function () { function WidgetsStore() { @@ -8962,8 +9102,9 @@ var Widgets_store_WidgetsStore = /*#__PURE__*/function () { this.privateState.isFetchedFirstTime = true; return new Promise(function (resolve, reject) { try { - window.widgetsHelper.getAvailableWidgets(function (categorizedWidgets) { - _this2.privateState.categorizedWidgets = categorizedWidgets; + window.widgetsHelper.getAvailableWidgets(function (widgets) { + var casted = widgets; + _this2.privateState.categorizedWidgets = casted; resolve(_this2.widgets.value); }); } catch (e) { @@ -8988,7 +9129,7 @@ var Widgets_store_WidgetsStore = /*#__PURE__*/function () { }(); /* harmony default export */ var Widgets_store = (new Widgets_store_WidgetsStore()); -// 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/ReportingMenu/ReportingMenu.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/ReportingMenu/ReportingMenu.vue?vue&type=script&lang=ts function ReportingMenuvue_type_script_lang_ts_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 ReportingMenuvue_type_script_lang_ts_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ReportingMenuvue_type_script_lang_ts_ownKeys(Object(source), true).forEach(function (key) { ReportingMenuvue_type_script_lang_ts_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ReportingMenuvue_type_script_lang_ts_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -9080,14 +9221,13 @@ var REPORTING_HELP_NOTIFICATION_ID = 'reportingmenu-help'; }); Matomo_Matomo.on('updateReportingMenu', function () { ReportingMenu_store.reloadMenuItems().then(function () { - var _MatomoUrl$parsed$val = src_MatomoUrl_MatomoUrl.parsed.value, - category = _MatomoUrl$parsed$val.category, - subcategory = _MatomoUrl$parsed$val.subcategory; // we need to make sure to select same categories again + var category = src_MatomoUrl_MatomoUrl.parsed.value.category; + var subcategory = src_MatomoUrl_MatomoUrl.parsed.value.subcategory; // we need to make sure to select same categories again if (category && subcategory) { var found = ReportingMenu_store.findSubcategory(category, subcategory); - if (found) { + if (found.category) { ReportingMenu_store.enterSubcategory(found.category, found.subcategory, found.subsubcategory); } } @@ -9137,14 +9277,14 @@ var REPORTING_HELP_NOTIFICATION_ID = 'reportingmenu-help'; } }, makeUrl: function makeUrl(category, subcategory) { - var _MatomoUrl$parsed$val2 = src_MatomoUrl_MatomoUrl.parsed.value, - idSite = _MatomoUrl$parsed$val2.idSite, - period = _MatomoUrl$parsed$val2.period, - date = _MatomoUrl$parsed$val2.date, - segment = _MatomoUrl$parsed$val2.segment, - comparePeriods = _MatomoUrl$parsed$val2.comparePeriods, - compareDates = _MatomoUrl$parsed$val2.compareDates, - compareSegments = _MatomoUrl$parsed$val2.compareSegments; + var _MatomoUrl$parsed$val = src_MatomoUrl_MatomoUrl.parsed.value, + idSite = _MatomoUrl$parsed$val.idSite, + period = _MatomoUrl$parsed$val.period, + date = _MatomoUrl$parsed$val.date, + segment = _MatomoUrl$parsed$val.segment, + comparePeriods = _MatomoUrl$parsed$val.comparePeriods, + compareDates = _MatomoUrl$parsed$val.compareDates, + compareSegments = _MatomoUrl$parsed$val.compareSegments; return src_MatomoUrl_MatomoUrl.stringify({ idSite: idSite, period: period, @@ -9208,7 +9348,7 @@ var REPORTING_HELP_NOTIFICATION_ID = 'reportingmenu-help'; -ReportingMenuvue_type_script_lang_ts.render = ReportingMenuvue_type_template_id_77eaf70c_render +ReportingMenuvue_type_script_lang_ts.render = ReportingMenuvue_type_template_id_a3508790_render /* harmony default export */ var ReportingMenu = (ReportingMenuvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.adapter.ts @@ -9274,7 +9414,7 @@ function reportingMenuModelAdapter() { }; } -angular.module('piwikApp.service').factory('reportingMenuModel', reportingMenuModelAdapter); +window.angular.module('piwikApp.service').factory('reportingMenuModel', reportingMenuModelAdapter); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingPages/ReportingPages.store.adapter.ts /*! * Matomo - free/libre analytics platform @@ -9310,7 +9450,7 @@ function reportingPagesModelAdapter() { }; } -angular.module('piwikApp.service').factory('reportingPagesModel', reportingPagesModelAdapter); +window.angular.module('piwikApp.service').factory('reportingPagesModel', reportingPagesModelAdapter); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportMetadata/ReportMetadata.store.ts function ReportMetadata_store_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -9391,7 +9531,7 @@ var ReportMetadata_store_ReportMetadataStore = /*#__PURE__*/function () { */ -angular.module('piwikApp.service').factory('reportMetadataModel', function () { +window.angular.module('piwikApp.service').factory('reportMetadataModel', function () { return { get reports() { return ReportMetadata_store.reports.value; @@ -9405,35 +9545,35 @@ angular.module('piwikApp.service').factory('reportMetadataModel', function () { } }; }); -// 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/WidgetLoader/WidgetLoader.vue?vue&type=template&id=48cda8d3 +// 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/WidgetLoader/WidgetLoader.vue?vue&type=template&id=64d7392c -var WidgetLoadervue_type_template_id_48cda8d3_hoisted_1 = { +var WidgetLoadervue_type_template_id_64d7392c_hoisted_1 = { key: 0 }; -var WidgetLoadervue_type_template_id_48cda8d3_hoisted_2 = { +var WidgetLoadervue_type_template_id_64d7392c_hoisted_2 = { class: "notification system notification-error" }; -var WidgetLoadervue_type_template_id_48cda8d3_hoisted_3 = { +var WidgetLoadervue_type_template_id_64d7392c_hoisted_3 = { key: 0, rel: "noreferrer noopener", target: "_blank", href: "https://matomo.org/faq/troubleshooting/faq_19489/" }; -var WidgetLoadervue_type_template_id_48cda8d3_hoisted_4 = { +var WidgetLoadervue_type_template_id_64d7392c_hoisted_4 = { class: "theWidgetContent", ref: "widgetContent" }; -function WidgetLoadervue_type_template_id_48cda8d3_render(_ctx, _cache, $props, $setup, $data, $options) { +function WidgetLoadervue_type_template_id_64d7392c_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_ActivityIndicator = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ActivityIndicator"); return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { "loading-message": _ctx.loadingMessage, loading: _ctx.loading - }, null, 8, ["loading-message", "loading"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [_ctx.widgetName ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("h2", WidgetLoadervue_type_template_id_48cda8d3_hoisted_1, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.widgetName), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", WidgetLoadervue_type_template_id_48cda8d3_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequest', '', '')) + " ", 1), _ctx.hasErrorFaqLink ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", WidgetLoadervue_type_template_id_48cda8d3_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequestFaqLink')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.loadingFailed]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", WidgetLoadervue_type_template_id_48cda8d3_hoisted_4, null, 512)]); + }, null, 8, ["loading-message", "loading"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [_ctx.widgetName ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("h2", WidgetLoadervue_type_template_id_64d7392c_hoisted_1, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.widgetName), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", WidgetLoadervue_type_template_id_64d7392c_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequest', '', '')) + " ", 1), _ctx.hasErrorFaqLink ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", WidgetLoadervue_type_template_id_64d7392c_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequestFaqLink')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.loadingFailed]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", WidgetLoadervue_type_template_id_64d7392c_hoisted_4, null, 512)]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue?vue&type=template&id=48cda8d3 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue?vue&type=template&id=64d7392c -// 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/WidgetLoader/WidgetLoader.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/WidgetLoader/WidgetLoader.vue?vue&type=script&lang=ts function WidgetLoadervue_type_script_lang_ts_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 WidgetLoadervue_type_script_lang_ts_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { WidgetLoadervue_type_script_lang_ts_ownKeys(Object(source), true).forEach(function (key) { WidgetLoadervue_type_script_lang_ts_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { WidgetLoadervue_type_script_lang_ts_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -9472,9 +9612,10 @@ function WidgetLoadervue_type_script_lang_ts_defineProperty(obj, key, value) { i data: function data() { return { loading: false, - loadingFailed: '', + loadingFailed: false, changeCounter: 0, - currentScope: null + currentScope: null, + lastWidgetAbortController: null }; }, watch: { @@ -9649,7 +9790,7 @@ function WidgetLoadervue_type_script_lang_ts_defineProperty(obj, key, value) { i -WidgetLoadervue_type_script_lang_ts.render = WidgetLoadervue_type_template_id_48cda8d3_render +WidgetLoadervue_type_script_lang_ts.render = WidgetLoadervue_type_template_id_64d7392c_render /* harmony default export */ var WidgetLoader = (WidgetLoadervue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.adapter.ts @@ -9674,9 +9815,9 @@ WidgetLoadervue_type_script_lang_ts.render = WidgetLoadervue_type_template_id_48 }, directiveName: 'piwikWidgetLoader' })); -// 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/WidgetContainer/WidgetContainer.vue?vue&type=template&id=4c9bbf55 +// 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/WidgetContainer/WidgetContainer.vue?vue&type=template&id=3b62b118 -function WidgetContainervue_type_template_id_4c9bbf55_render(_ctx, _cache, $props, $setup, $data, $options) { +function WidgetContainervue_type_template_id_3b62b118_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Widget = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Widget"); return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", null, [(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.actualContainer, function (widget, index) { @@ -9688,9 +9829,9 @@ function WidgetContainervue_type_template_id_4c9bbf55_render(_ctx, _cache, $prop }, null, 8, ["widget"])])]); }), 128))]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetContainer/WidgetContainer.vue?vue&type=template&id=4c9bbf55 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetContainer/WidgetContainer.vue?vue&type=template&id=3b62b118 -// 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/WidgetContainer/WidgetContainer.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/WidgetContainer/WidgetContainer.vue?vue&type=script&lang=ts function WidgetContainervue_type_script_lang_ts_toConsumableArray(arr) { return WidgetContainervue_type_script_lang_ts_arrayWithoutHoles(arr) || WidgetContainervue_type_script_lang_ts_iterableToArray(arr) || WidgetContainervue_type_script_lang_ts_unsupportedIterableToArray(arr) || WidgetContainervue_type_script_lang_ts_nonIterableSpread(); } function WidgetContainervue_type_script_lang_ts_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } @@ -9723,14 +9864,17 @@ function WidgetContainervue_type_script_lang_ts_arrayWithHoles(arr) { if (Array. var Widget = useExternalPluginComponent('CoreHome', 'Widget'); /* harmony default export */ var WidgetContainervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { - container: Array + container: { + type: Array, + required: true + } }, components: { Widget: Widget }, computed: { actualContainer: function actualContainer() { - var _container$; + var _container$, _widget$parameters, _widget$parameters2; var container = this.container; @@ -9741,7 +9885,7 @@ var Widget = useExternalPluginComponent('CoreHome', 'Widget'); var _container = WidgetContainervue_type_script_lang_ts_slicedToArray(container, 1), widget = _container[0]; - var isWidgetized = widget.parameters.widget === '1' || widget.parameters.widget === 1; + var isWidgetized = ((_widget$parameters = widget.parameters) === null || _widget$parameters === void 0 ? void 0 : _widget$parameters.widget) === '1' || ((_widget$parameters2 = widget.parameters) === null || _widget$parameters2 === void 0 ? void 0 : _widget$parameters2.widget) === 1; var isGraphEvolution = isWidgetized && widget.viewDataTable === 'graphEvolution'; // we hide the first title for Visits Overview with Graph and Goal Overview var firstWidget = isGraphEvolution ? WidgetContainervue_type_script_lang_ts_objectSpread(WidgetContainervue_type_script_lang_ts_objectSpread({}, widget), {}, { @@ -9759,7 +9903,7 @@ var Widget = useExternalPluginComponent('CoreHome', 'Widget'); -WidgetContainervue_type_script_lang_ts.render = WidgetContainervue_type_template_id_4c9bbf55_render +WidgetContainervue_type_script_lang_ts.render = WidgetContainervue_type_template_id_3b62b118_render /* harmony default export */ var WidgetContainer = (WidgetContainervue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetContainer/WidgetContainer.adapter.ts @@ -9780,37 +9924,37 @@ WidgetContainervue_type_script_lang_ts.render = WidgetContainervue_type_template }, directiveName: 'piwikWidgetContainer' })); -// 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/WidgetByDimensionContainer/WidgetByDimensionContainer.vue?vue&type=template&id=0a45b623 +// 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/WidgetByDimensionContainer/WidgetByDimensionContainer.vue?vue&type=template&id=2a665f7d -var WidgetByDimensionContainervue_type_template_id_0a45b623_hoisted_1 = { +var WidgetByDimensionContainervue_type_template_id_2a665f7d_hoisted_1 = { class: "reportsByDimensionView" }; -var WidgetByDimensionContainervue_type_template_id_0a45b623_hoisted_2 = { +var WidgetByDimensionContainervue_type_template_id_2a665f7d_hoisted_2 = { class: "entityList" }; -var WidgetByDimensionContainervue_type_template_id_0a45b623_hoisted_3 = { +var WidgetByDimensionContainervue_type_template_id_2a665f7d_hoisted_3 = { class: "listCircle" }; -var WidgetByDimensionContainervue_type_template_id_0a45b623_hoisted_4 = ["onClick"]; -var WidgetByDimensionContainervue_type_template_id_0a45b623_hoisted_5 = { +var WidgetByDimensionContainervue_type_template_id_2a665f7d_hoisted_4 = ["onClick"]; +var WidgetByDimensionContainervue_type_template_id_2a665f7d_hoisted_5 = { class: "dimension" }; -var WidgetByDimensionContainervue_type_template_id_0a45b623_hoisted_6 = { +var WidgetByDimensionContainervue_type_template_id_2a665f7d_hoisted_6 = { class: "reportContainer" }; -var WidgetByDimensionContainervue_type_template_id_0a45b623_hoisted_7 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { +var WidgetByDimensionContainervue_type_template_id_2a665f7d_hoisted_7 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { class: "clear" }, null, -1); -function WidgetByDimensionContainervue_type_template_id_0a45b623_render(_ctx, _cache, $props, $setup, $data, $options) { +function WidgetByDimensionContainervue_type_template_id_2a665f7d_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_WidgetLoader = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("WidgetLoader"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", WidgetByDimensionContainervue_type_template_id_0a45b623_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", WidgetByDimensionContainervue_type_template_id_0a45b623_hoisted_2, [(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.widgetsByCategory, function (category) { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", WidgetByDimensionContainervue_type_template_id_2a665f7d_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", WidgetByDimensionContainervue_type_template_id_2a665f7d_hoisted_2, [(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.widgetsByCategory, function (category) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { class: "dimensionCategory", key: category.name - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(category.name) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", WidgetByDimensionContainervue_type_template_id_0a45b623_hoisted_3, [(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"])(category.widgets, function (widget) { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(category.name) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", WidgetByDimensionContainervue_type_template_id_2a665f7d_hoisted_3, [(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"])(category.widgets, function (widget) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["reportDimension", { activeDimension: _ctx.selectedWidget.uniqueId === widget.uniqueId @@ -9819,17 +9963,17 @@ function WidgetByDimensionContainervue_type_template_id_0a45b623_render(_ctx, _c onClick: function onClick($event) { return _ctx.selectWidget(widget); } - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", WidgetByDimensionContainervue_type_template_id_0a45b623_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(widget.name), 1)], 10, WidgetByDimensionContainervue_type_template_id_0a45b623_hoisted_4); + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", WidgetByDimensionContainervue_type_template_id_2a665f7d_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(widget.name), 1)], 10, WidgetByDimensionContainervue_type_template_id_2a665f7d_hoisted_4); }), 128))])]); - }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", WidgetByDimensionContainervue_type_template_id_0a45b623_hoisted_6, [_ctx.selectedWidget.parameters ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_WidgetLoader, { + }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", WidgetByDimensionContainervue_type_template_id_2a665f7d_hoisted_6, [_ctx.selectedWidget.parameters ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_WidgetLoader, { key: 0, "widget-params": _ctx.selectedWidget.parameters, class: "dimensionReport" - }, null, 8, ["widget-params"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), WidgetByDimensionContainervue_type_template_id_0a45b623_hoisted_7]); + }, null, 8, ["widget-params"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), WidgetByDimensionContainervue_type_template_id_2a665f7d_hoisted_7]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.vue?vue&type=template&id=0a45b623 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.vue?vue&type=template&id=2a665f7d -// 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/WidgetByDimensionContainer/WidgetByDimensionContainer.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/WidgetByDimensionContainer/WidgetByDimensionContainer.vue?vue&type=script&lang=ts function WidgetByDimensionContainervue_type_script_lang_ts_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 WidgetByDimensionContainervue_type_script_lang_ts_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { WidgetByDimensionContainervue_type_script_lang_ts_ownKeys(Object(source), true).forEach(function (key) { WidgetByDimensionContainervue_type_script_lang_ts_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { WidgetByDimensionContainervue_type_script_lang_ts_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -9850,7 +9994,6 @@ function WidgetByDimensionContainervue_type_script_lang_ts_arrayWithHoles(arr) { - // TODO: is there a widget category ID or widget ID /* harmony default export */ var WidgetByDimensionContainervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { @@ -9876,7 +10019,13 @@ function WidgetByDimensionContainervue_type_script_lang_ts_arrayWithHoles(arr) { widgetsByCategory: function widgetsByCategory() { var byCategory = {}; this.widgetsSorted.forEach(function (widget) { - var category = widget.subcategory.name; + var _widget$subcategory; + + var category = (_widget$subcategory = widget.subcategory) === null || _widget$subcategory === void 0 ? void 0 : _widget$subcategory.name; + + if (!category) { + return; + } if (!byCategory[category]) { byCategory[category] = { @@ -9904,7 +10053,7 @@ function WidgetByDimensionContainervue_type_script_lang_ts_arrayWithHoles(arr) { -WidgetByDimensionContainervue_type_script_lang_ts.render = WidgetByDimensionContainervue_type_template_id_0a45b623_render +WidgetByDimensionContainervue_type_script_lang_ts.render = WidgetByDimensionContainervue_type_template_id_2a665f7d_render /* harmony default export */ var WidgetByDimensionContainer = (WidgetByDimensionContainervue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.adapter.ts @@ -9928,16 +10077,16 @@ WidgetByDimensionContainervue_type_script_lang_ts.render = WidgetByDimensionCont }, directiveName: 'piwikWidgetByDimensionContainer' })); -// 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/Widget/Widget.vue?vue&type=template&id=0e356bfb +// 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/Widget/Widget.vue?vue&type=template&id=4f52b268 -var Widgetvue_type_template_id_0e356bfb_hoisted_1 = ["id"]; -var Widgetvue_type_template_id_0e356bfb_hoisted_2 = { +var Widgetvue_type_template_id_4f52b268_hoisted_1 = ["id"]; +var Widgetvue_type_template_id_4f52b268_hoisted_2 = { key: 1 }; -var Widgetvue_type_template_id_0e356bfb_hoisted_3 = { +var Widgetvue_type_template_id_4f52b268_hoisted_3 = { key: 2 }; -function Widgetvue_type_template_id_0e356bfb_render(_ctx, _cache, $props, $setup, $data, $options) { +function Widgetvue_type_template_id_4f52b268_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_WidgetLoader = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("WidgetLoader"); var _component_WidgetContainer = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("WidgetContainer"); @@ -9956,17 +10105,17 @@ function Widgetvue_type_template_id_0e356bfb_render(_ctx, _cache, $props, $setup key: 0, "widget-params": _ctx.actualWidget.parameters, "widget-name": _ctx.actualWidget.name - }, null, 8, ["widget-params", "widget-name"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.actualWidget.isContainer && _ctx.actualWidget.layout !== 'ByDimension' && !this.preventRecursion ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Widgetvue_type_template_id_0e356bfb_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_WidgetContainer, { + }, null, 8, ["widget-params", "widget-name"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.actualWidget.isContainer && _ctx.actualWidget.layout !== 'ByDimension' && !this.preventRecursion ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Widgetvue_type_template_id_4f52b268_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_WidgetContainer, { container: _ctx.actualWidget.widgets - }, null, 8, ["container"])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.actualWidget.isContainer && _ctx.actualWidget.layout === 'ByDimension' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Widgetvue_type_template_id_0e356bfb_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_WidgetByDimensionContainer, { + }, null, 8, ["container"])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.actualWidget.isContainer && _ctx.actualWidget.layout === 'ByDimension' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Widgetvue_type_template_id_4f52b268_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_WidgetByDimensionContainer, { widgets: _ctx.actualWidget.widgets - }, null, 8, ["widgets"])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 10, Widgetvue_type_template_id_0e356bfb_hoisted_1)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showWidget], [_directive_tooltips, { + }, null, 8, ["widgets"])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 10, Widgetvue_type_template_id_4f52b268_hoisted_1)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showWidget], [_directive_tooltips, { content: _ctx.tooltipContent }]]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Widget/Widget.vue?vue&type=template&id=0e356bfb +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Widget/Widget.vue?vue&type=template&id=4f52b268 -// 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/Widget/Widget.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/Widget/Widget.vue?vue&type=script&lang=ts function Widgetvue_type_script_lang_ts_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 Widgetvue_type_script_lang_ts_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { Widgetvue_type_script_lang_ts_ownKeys(Object(source), true).forEach(function (key) { Widgetvue_type_script_lang_ts_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { Widgetvue_type_script_lang_ts_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -9983,10 +10132,12 @@ function Widgetvue_type_script_lang_ts_defineProperty(obj, key, value) { if (key function findContainer(widgetsByCategory, containerId) { - var widget; + var widget = undefined; Object.values(widgetsByCategory || {}).some(function (widgets) { widget = widgets.find(function (w) { - return w && w.isContainer && w.parameters.containerId === containerId; + var _w$parameters; + + return w && w.isContainer && ((_w$parameters = w.parameters) === null || _w$parameters === void 0 ? void 0 : _w$parameters.containerId) === containerId; }); return widget; }); @@ -10049,7 +10200,7 @@ function findContainer(widgetsByCategory, containerId) { return ''; } - var title = window.$(this).attr('title'); + var title = window.$(this).attr('title') || ''; return window.vueSanitize(title.replace(/\n/g, '<br />')); } @@ -10062,12 +10213,13 @@ function findContainer(widgetsByCategory, containerId) { var actualWidget = this.actualWidget; - if (!actualWidget || !actualWidget.middlewareParameters) { - this.showWidget = true; - } else { - AjaxHelper_AjaxHelper.fetch(actualWidget.middlewareParameters).then(function (response) { + if (actualWidget && actualWidget.middlewareParameters) { + var params = actualWidget.middlewareParameters; + AjaxHelper_AjaxHelper.fetch(params).then(function (response) { _this.showWidget = !!response; }); + } else { + this.showWidget = true; } }, computed: { @@ -10104,9 +10256,10 @@ function findContainer(widgetsByCategory, containerId) { _result.parameters = Widgetvue_type_script_lang_ts_objectSpread(Widgetvue_type_script_lang_ts_objectSpread({}, _result.parameters), {}, { widget: '1' }); + var widgets = getWidgetChildren(_result); - if (_result.widgets) { - _result.widgets = _result.widgets.map(function (w) { + if (widgets) { + _result.widgets = widgets.map(function (w) { return Widgetvue_type_script_lang_ts_objectSpread(Widgetvue_type_script_lang_ts_objectSpread({}, w), {}, { parameters: Widgetvue_type_script_lang_ts_objectSpread(Widgetvue_type_script_lang_ts_objectSpread({}, w.parameters), {}, { widget: '1', @@ -10131,7 +10284,7 @@ function findContainer(widgetsByCategory, containerId) { -Widgetvue_type_script_lang_ts.render = Widgetvue_type_template_id_0e356bfb_render +Widgetvue_type_script_lang_ts.render = Widgetvue_type_template_id_4f52b268_render /* harmony default export */ var Widget_Widget = (Widgetvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Widget/Widget.adapter.ts @@ -10158,25 +10311,25 @@ Widgetvue_type_script_lang_ts.render = Widgetvue_type_template_id_0e356bfb_rende }, directiveName: 'piwikWidget' })); -// 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/ReportingPage/ReportingPage.vue?vue&type=template&id=725c652c +// 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/ReportingPage/ReportingPage.vue?vue&type=template&id=6531b4d8 -var ReportingPagevue_type_template_id_725c652c_hoisted_1 = { +var ReportingPagevue_type_template_id_6531b4d8_hoisted_1 = { class: "reporting-page" }; -var ReportingPagevue_type_template_id_725c652c_hoisted_2 = { +var ReportingPagevue_type_template_id_6531b4d8_hoisted_2 = { key: 1, class: "col s12 l6 leftWidgetColumn" }; -var ReportingPagevue_type_template_id_725c652c_hoisted_3 = { +var ReportingPagevue_type_template_id_6531b4d8_hoisted_3 = { key: 2, class: "col s12 l6 rightWidgetColumn" }; -function ReportingPagevue_type_template_id_725c652c_render(_ctx, _cache, $props, $setup, $data, $options) { +function ReportingPagevue_type_template_id_6531b4d8_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_ActivityIndicator = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ActivityIndicator"); var _component_Widget = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Widget"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingPagevue_type_template_id_725c652c_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingPagevue_type_template_id_6531b4d8_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { loading: _ctx.loading }, null, 8, ["loading"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_NoSuchPage')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasNoPage]]), (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.widgets, function (widget) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { @@ -10186,12 +10339,12 @@ function ReportingPagevue_type_template_id_725c652c_render(_ctx, _cache, $props, key: 0, class: "col s12 fullWidgetColumn", widget: widget - }, null, 8, ["widget"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), widget.group ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingPagevue_type_template_id_725c652c_hoisted_2, [(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"])(widget.left, function (widgetInGroup) { + }, null, 8, ["widget"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), widget.group ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingPagevue_type_template_id_6531b4d8_hoisted_2, [(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"])(widget.left, function (widgetInGroup) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Widget, { widget: widgetInGroup, key: widgetInGroup.uniqueId }, null, 8, ["widget"]); - }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), widget.group ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingPagevue_type_template_id_725c652c_hoisted_3, [(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"])(widget.right, function (widgetInGroup) { + }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), widget.group ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingPagevue_type_template_id_6531b4d8_hoisted_3, [(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"])(widget.right, function (widgetInGroup) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Widget, { widget: widgetInGroup, key: widgetInGroup.uniqueId @@ -10199,7 +10352,7 @@ function ReportingPagevue_type_template_id_725c652c_render(_ctx, _cache, $props, }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); }), 128))]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue?vue&type=template&id=725c652c +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue?vue&type=template&id=6531b4d8 // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingPage/ReportingPage.store.ts function ReportingPage_store_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -10237,6 +10390,7 @@ function ReportingPage_store_arrayLikeToArray(arr, len) { if (len == null || len + function shouldBeRenderedWithFullWidth(widget) { // rather controller logic if (widget.isContainer && widget.layout && widget.layout === 'ByDimension' || widget.viewDataTable === 'bydimension') { @@ -10254,10 +10408,12 @@ function markWidgetsInFirstRowOfPage(widgets) { if (widgets && widgets[0]) { var newWidgets = ReportingPage_store_toConsumableArray(widgets); - if (widgets[0].group) { + var groupedWidgets = widgets[0]; + + if (groupedWidgets.group) { newWidgets[0] = ReportingPage_store_objectSpread(ReportingPage_store_objectSpread({}, newWidgets[0]), {}, { - left: markWidgetsInFirstRowOfPage(widgets[0].left), - right: markWidgetsInFirstRowOfPage(widgets[0].right) + left: markWidgetsInFirstRowOfPage(groupedWidgets.left || []), + right: markWidgetsInFirstRowOfPage(groupedWidgets.right || []) }); } else { newWidgets[0] = ReportingPage_store_objectSpread(ReportingPage_store_objectSpread({}, newWidgets[0]), {}, { @@ -10277,9 +10433,7 @@ var ReportingPage_store_ReportingPageStore = /*#__PURE__*/function () { ReportingPage_store_classCallCheck(this, ReportingPageStore); - ReportingPage_store_defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({ - page: null - })); + ReportingPage_store_defineProperty(this, "privateState", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({})); ReportingPage_store_defineProperty(this, "state", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(_this.privateState); @@ -10341,7 +10495,7 @@ var ReportingPage_store_ReportingPageStore = /*#__PURE__*/function () { if (shouldBeRenderedWithFullWidth(widget) || widgets[i + 1] && shouldBeRenderedWithFullWidth(widgets[i + 1])) { groupedWidgets.push(ReportingPage_store_objectSpread(ReportingPage_store_objectSpread({}, widget), {}, { - widgets: sortOrderables(widget.widgets) + widgets: sortOrderables(getWidgetChildren(widget)) })); } else { var counter = 0; @@ -10367,8 +10521,8 @@ var ReportingPage_store_ReportingPageStore = /*#__PURE__*/function () { } } - groupedWidgets = markWidgetsInFirstRowOfPage(groupedWidgets); - return groupedWidgets; + var sortedWidgets = markWidgetsInFirstRowOfPage(groupedWidgets); + return sortedWidgets; })); } @@ -10386,14 +10540,14 @@ var ReportingPage_store_ReportingPageStore = /*#__PURE__*/function () { }, { key: "resetPage", value: function resetPage() { - this.privateState.page = null; + this.privateState.page = undefined; } }]); return ReportingPageStore; }(); /* harmony default export */ var ReportingPage_store = (new ReportingPage_store_ReportingPageStore()); -// 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/ReportingPage/ReportingPage.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/ReportingPage/ReportingPage.vue?vue&type=script&lang=ts function ReportingPagevue_type_script_lang_ts_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 ReportingPagevue_type_script_lang_ts_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ReportingPagevue_type_script_lang_ts_ownKeys(Object(source), true).forEach(function (key) { ReportingPagevue_type_script_lang_ts_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ReportingPagevue_type_script_lang_ts_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -10522,7 +10676,7 @@ function hideOnlyRawDataNoticifation() { // something to let other components render a specific page. this.loading = true; var element = ReportingPagevue_type_script_lang_ts_$('[piwik-dashboard]'); - var scope = angular.element(element).scope(); // eslint-disable-line + var scope = window.angular.element(element).scope(); // eslint-disable-line scope.fetchDashboard(parseInt(subcategory, 10)).then(function () { _this2.loading = false; @@ -10571,22 +10725,24 @@ function hideOnlyRawDataNoticifation() { var subcategoryExceptions = ['Live_VisitorLog', 'General_RealTime', 'UserCountryMap_RealTimeMap', 'MediaAnalytics_TypeAudienceLog', 'MediaAnalytics_TypeRealTime', 'FormAnalytics_TypeRealTime', 'Goals_AddNewGoal']; var categoryExceptions = ['HeatmapSessionRecording_Heatmaps', 'HeatmapSessionRecording_SessionRecordings', 'Marketplace_Marketplace']; + var subcategory = parsedUrl.subcategory; + var category = parsedUrl.category; - if (subcategoryExceptions.indexOf(parsedUrl.subcategory) !== -1 || categoryExceptions.indexOf(parsedUrl.category) !== -1 || parsedUrl.subcategory.toLowerCase().indexOf('manage') !== -1) { + if (subcategoryExceptions.indexOf(subcategory) !== -1 || categoryExceptions.indexOf(category) !== -1 || subcategory.toLowerCase().indexOf('manage') !== -1) { hideOnlyRawDataNoticifation(); return; } var minuteInMilliseconds = 60000; - if (this.dateLastChecked && new Date().getTime() - this.dateLastChecked < minuteInMilliseconds) { + if (this.dateLastChecked && new Date().valueOf() - this.dateLastChecked.valueOf() < minuteInMilliseconds) { return; } AjaxHelper_AjaxHelper.fetch({ method: 'VisitsSummary.getVisits' }).then(function (json) { - _this3.dateLastChecked = new Date().getTime(); + _this3.dateLastChecked = new Date(); if (json.value > 0) { _this3.hasNoVisits = false; @@ -10625,7 +10781,7 @@ function hideOnlyRawDataNoticifation() { -ReportingPagevue_type_script_lang_ts.render = ReportingPagevue_type_template_id_725c652c_render +ReportingPagevue_type_script_lang_ts.render = ReportingPagevue_type_template_id_6531b4d8_render /* harmony default export */ var ReportingPage = (ReportingPagevue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingPage/ReportingPage.adapter.ts @@ -10641,66 +10797,66 @@ ReportingPagevue_type_script_lang_ts.render = ReportingPagevue_type_template_id_ component: ReportingPage, directiveName: 'piwikReportingPage' })); -// 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/ReportExport/ReportExportPopover.vue?vue&type=template&id=1bccbff2 +// 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/ReportExport/ReportExportPopover.vue?vue&type=template&id=9b90d7c0 -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_1 = { +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_1 = { class: "report-export-popover row", id: "reportExport" }; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_2 = { +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_2 = { class: "col l6" }; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_3 = { +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_3 = { name: "format" }; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_4 = { +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_4 = { name: "option_flat" }; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_5 = { +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_5 = { name: "option_expanded" }; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_6 = { +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_6 = { name: "option_format_metrics" }; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_7 = { +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_7 = { class: "col l6" }; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_8 = { +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_8 = { name: "filter_type" }; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_9 = { +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_9 = { class: "filter_limit" }; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_10 = { +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_10 = { name: "filter_limit_all" }; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_11 = { +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_11 = { key: 0, name: "filter_limit" }; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_12 = { +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_12 = { key: 1, name: "filter_limit" }; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_13 = { +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_13 = { class: "col l12" }; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_14 = ["value"]; +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_14 = ["value"]; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_15 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])("\n "); +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_15 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])("\n "); -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_16 = [ReportExportPopovervue_type_template_id_1bccbff2_hoisted_15]; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_17 = ["innerHTML"]; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_18 = { +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_16 = [ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_15]; +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_17 = ["innerHTML"]; +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_18 = { class: "col l12" }; -var ReportExportPopovervue_type_template_id_1bccbff2_hoisted_19 = ["href", "title"]; -function ReportExportPopovervue_type_template_id_1bccbff2_render(_ctx, _cache, $props, $setup, $data, $options) { +var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_19 = ["href", "title"]; +function ReportExportPopovervue_type_template_id_9b90d7c0_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); var _directive_select_on_focus = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("select-on-focus"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportExportPopovervue_type_template_id_1bccbff2_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_1bccbff2_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_1bccbff2_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'radio', name: 'format', title: _ctx.translate('CoreHome_ExportFormat'), @@ -10710,7 +10866,7 @@ function ReportExportPopovervue_type_template_id_1bccbff2_render(_ctx, _cache, $ }), "full-width": true, options: _ctx.availableReportFormats[_ctx.reportType] - }, null, 8, ["title", "modelValue", "options"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_1bccbff2_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["title", "modelValue", "options"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'checkbox', name: 'option_flat', title: _ctx.translate('CoreHome_FlattenReport'), @@ -10718,7 +10874,7 @@ function ReportExportPopovervue_type_template_id_1bccbff2_render(_ctx, _cache, $ "onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) { return _ctx.optionFlat = $event; }) - }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSubtables]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_1bccbff2_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSubtables]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'checkbox', name: 'option_expanded', title: _ctx.translate('CoreHome_ExpandSubtables'), @@ -10726,7 +10882,7 @@ function ReportExportPopovervue_type_template_id_1bccbff2_render(_ctx, _cache, $ "onUpdate:modelValue": _cache[2] || (_cache[2] = function ($event) { return _ctx.optionExpanded = $event; }) - }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSubtables && !_ctx.optionFlat]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_1bccbff2_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSubtables && !_ctx.optionFlat]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'checkbox', name: 'option_format_metrics', title: _ctx.translate('CoreHome_FormatMetrics'), @@ -10734,7 +10890,7 @@ function ReportExportPopovervue_type_template_id_1bccbff2_render(_ctx, _cache, $ "onUpdate:modelValue": _cache[3] || (_cache[3] = function ($event) { return _ctx.optionFormatMetrics = $event; }) - }, null, 8, ["title", "modelValue"])])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_1bccbff2_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_1bccbff2_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["title", "modelValue"])])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'radio', name: 'filter_type', title: _ctx.translate('CoreHome_ReportType'), @@ -10744,7 +10900,7 @@ function ReportExportPopovervue_type_template_id_1bccbff2_render(_ctx, _cache, $ }), "full-width": true, options: _ctx.availableReportTypes - }, null, 8, ["title", "modelValue", "options"])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_1bccbff2_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_1bccbff2_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["title", "modelValue", "options"])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'radio', name: 'filter_limit_all', title: _ctx.translate('CoreHome_RowLimit'), @@ -10754,7 +10910,7 @@ function ReportExportPopovervue_type_template_id_1bccbff2_render(_ctx, _cache, $ }), "full-width": true, options: _ctx.limitAllOptions - }, null, 8, ["title", "modelValue", "options"])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.maxFilterLimit || _ctx.maxFilterLimit <= 0]]), _ctx.reportLimitAll === 'no' && _ctx.maxFilterLimit <= 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportExportPopovervue_type_template_id_1bccbff2_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["title", "modelValue", "options"])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.maxFilterLimit || _ctx.maxFilterLimit <= 0]]), _ctx.reportLimitAll === 'no' && _ctx.maxFilterLimit <= 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'number', name: "filter_limit", min: 1, @@ -10763,7 +10919,7 @@ function ReportExportPopovervue_type_template_id_1bccbff2_render(_ctx, _cache, $ return _ctx.reportLimit = $event; }), "full-width": true - }, null, 8, ["modelValue"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.reportLimitAll === 'no' && _ctx.maxFilterLimit > 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportExportPopovervue_type_template_id_1bccbff2_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["modelValue"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.reportLimitAll === 'no' && _ctx.maxFilterLimit > 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'number', name: 'filter_limit', min: 1, @@ -10775,19 +10931,19 @@ function ReportExportPopovervue_type_template_id_1bccbff2_render(_ctx, _cache, $ value: _ctx.reportLimit, "full-width": true, title: _ctx.filterLimitTooltip - }, null, 8, ["max", "modelValue", "value", "title"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_1bccbff2_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("textarea", { + }, null, 8, ["max", "modelValue", "value", "title"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("textarea", { readonly: "", class: "exportFullUrl", value: _ctx.exportLinkWithoutToken - }, ReportExportPopovervue_type_template_id_1bccbff2_hoisted_16, 8, ReportExportPopovervue_type_template_id_1bccbff2_hoisted_14), [[_directive_select_on_focus, {}]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { + }, ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_16, 8, ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_14), [[_directive_select_on_focus, {}]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { class: "tooltip", innerHTML: _ctx.$sanitize(_ctx.translate('CoreHome_ExportTooltipWithLink', '<a target=_blank href=\'?module=UsersManager&action=userSecurity\'>', '</a>', 'ENTER_YOUR_TOKEN_AUTH_HERE')) - }, null, 8, ReportExportPopovervue_type_template_id_1bccbff2_hoisted_17)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showUrl]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_1bccbff2_hoisted_18, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_17)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showUrl]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_18, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "btn", href: _ctx.exportLink, target: "_new", title: _ctx.translate('CoreHome_ExportTooltip') - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Export')), 9, ReportExportPopovervue_type_template_id_1bccbff2_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Export')), 9, ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { href: "javascript:", onClick: _cache[8] || (_cache[8] = function ($event) { return _ctx.showUrl = !_ctx.showUrl; @@ -10795,9 +10951,9 @@ function ReportExportPopovervue_type_template_id_1bccbff2_render(_ctx, _cache, $ class: "toggle-export-url" }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_ShowExportUrl')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.showUrl]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_HideExportUrl')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showUrl]])])])]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue?vue&type=template&id=1bccbff2 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue?vue&type=template&id=9b90d7c0 -// 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/ReportExport/ReportExportPopover.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/ReportExport/ReportExportPopover.vue?vue&type=script&lang=ts function ReportExportPopovervue_type_script_lang_ts_slicedToArray(arr, i) { return ReportExportPopovervue_type_script_lang_ts_arrayWithHoles(arr) || ReportExportPopovervue_type_script_lang_ts_iterableToArrayLimit(arr, i) || ReportExportPopovervue_type_script_lang_ts_unsupportedIterableToArray(arr, i) || ReportExportPopovervue_type_script_lang_ts_nonIterableRest(); } function ReportExportPopovervue_type_script_lang_ts_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } @@ -10827,12 +10983,21 @@ var ReportExportPopovervue_type_script_lang_ts_Field = useExternalPluginComponen props: { hasSubtables: Boolean, availableReportTypes: Object, - availableReportFormats: Object, + availableReportFormats: { + type: Object, + required: true + }, maxFilterLimit: Number, limitAllOptions: Object, - dataTable: Object, + dataTable: { + type: Object, + required: true + }, requestParams: [Object, String], - apiMethod: String, + apiMethod: { + type: String, + required: true + }, initialReportType: { type: String, default: 'default' @@ -10871,7 +11036,7 @@ var ReportExportPopovervue_type_script_lang_ts_Field = useExternalPluginComponen optionFormatMetrics: this.initialOptionFormatMetrics, reportType: this.initialReportType, reportLimitAll: this.initialReportLimitAll, - reportLimit: this.initialReportLimit + reportLimit: typeof this.initialReportLimit === 'string' ? parseInt(this.initialReportLimit, 10) : this.initialReportLimit }; }, watch: { @@ -10881,17 +11046,15 @@ var ReportExportPopovervue_type_script_lang_ts_Field = useExternalPluginComponen } }, reportLimit: function reportLimit(newVal, oldVal) { - if (this.maxFilterLimit > 0) { - if (parseInt(newVal, 10) > parseInt(this.maxFilterLimit, 10)) { - this.reportLimit = oldVal; - } + if (this.maxFilterLimit && this.maxFilterLimit > 0 && newVal > this.maxFilterLimit) { + this.reportLimit = oldVal; } } }, computed: { filterLimitTooltip: function filterLimitTooltip() { var rowLimit = translate('CoreHome_RowLimit'); - var computedMetricMax = translate('General_ComputedMetricMax', this.maxFilterLimit); + var computedMetricMax = this.maxFilterLimit ? translate('General_ComputedMetricMax', this.maxFilterLimit.toString()) : ''; return "".concat(rowLimit, " (").concat(computedMetricMax, ")"); }, exportLink: function exportLink() { @@ -10904,22 +11067,20 @@ var ReportExportPopovervue_type_script_lang_ts_Field = useExternalPluginComponen methods: { getExportLink: function getExportLink() { var withToken = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - var dataTable = this.dataTable, - reportFormat = this.reportFormat, + var reportFormat = this.reportFormat, apiMethod = this.apiMethod, reportType = this.reportType; + var dataTable = this.dataTable; if (!reportFormat) { return undefined; } - var requestParams = this.requestParams; + var requestParams = {}; var limit = this.reportLimitAll === 'yes' ? -1 : this.reportLimit; - if (requestParams && typeof requestParams === 'string') { - requestParams = JSON.parse(requestParams); - } else { - requestParams = {}; + if (this.requestParams && typeof this.requestParams === 'string') { + requestParams = JSON.parse(this.requestParams); } var _dataTable$param = dataTable.param, @@ -11088,7 +11249,7 @@ var ReportExportPopovervue_type_script_lang_ts_Field = useExternalPluginComponen -ReportExportPopovervue_type_script_lang_ts.render = ReportExportPopovervue_type_template_id_1bccbff2_render +ReportExportPopovervue_type_script_lang_ts.render = ReportExportPopovervue_type_template_id_9b90d7c0_render /* harmony default export */ var ReportExportPopover = (ReportExportPopovervue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportExport/ReportExport.ts @@ -11211,6 +11372,7 @@ function piwikReportExport($timeout) { apiMethod: '@', maxFilterLimit: '@' }, + // eslint-disable-next-line @typescript-eslint/no-explicit-any link: function piwikReportExportLink(scope, element) { var binding = { instance: null, @@ -11222,7 +11384,7 @@ function piwikReportExport($timeout) { maxFilterLimit: parseInt(scope.maxFilterLimit, 10), onClose: function onClose() { $timeout(function () { - angular.element(document).injector().get('$rootScope').$apply(); + window.angular.element(document).injector().get('$rootScope').$apply(); }, 10); } }, @@ -11235,18 +11397,18 @@ function piwikReportExport($timeout) { }; } piwikReportExport.$inject = ['$timeout']; -angular.module('piwikApp').directive('piwikReportExport', piwikReportExport); -// 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/Sparkline/Sparkline.vue?vue&type=template&id=0baaf750 +window.angular.module('piwikApp').directive('piwikReportExport', piwikReportExport); +// 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/Sparkline/Sparkline.vue?vue&type=template&id=693cd955 -var Sparklinevue_type_template_id_0baaf750_hoisted_1 = ["src"]; -function Sparklinevue_type_template_id_0baaf750_render(_ctx, _cache, $props, $setup, $data, $options) { +var Sparklinevue_type_template_id_693cd955_hoisted_1 = ["src"]; +function Sparklinevue_type_template_id_693cd955_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_["createElementBlock"])("img", { src: _ctx.sparklineUrl - }, null, 8, Sparklinevue_type_template_id_0baaf750_hoisted_1); + }, null, 8, Sparklinevue_type_template_id_693cd955_hoisted_1); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Sparkline/Sparkline.vue?vue&type=template&id=0baaf750 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Sparkline/Sparkline.vue?vue&type=template&id=693cd955 -// 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/Sparkline/Sparkline.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/Sparkline/Sparkline.vue?vue&type=script&lang=ts function Sparklinevue_type_script_lang_ts_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 Sparklinevue_type_script_lang_ts_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { Sparklinevue_type_script_lang_ts_ownKeys(Object(source), true).forEach(function (key) { Sparklinevue_type_script_lang_ts_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { Sparklinevue_type_script_lang_ts_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -11329,7 +11491,7 @@ function Sparklinevue_type_script_lang_ts_defineProperty(obj, key, value) { if ( -Sparklinevue_type_script_lang_ts.render = Sparklinevue_type_template_id_0baaf750_render +Sparklinevue_type_script_lang_ts.render = Sparklinevue_type_template_id_693cd955_render /* harmony default export */ var Sparkline = (Sparklinevue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Sparkline/Sparkline.adapter.ts @@ -11354,40 +11516,43 @@ Sparklinevue_type_script_lang_ts.render = Sparklinevue_type_template_id_0baaf750 directiveName: 'piwikSparkline', 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/Progressbar/Progressbar.vue?vue&type=template&id=1ca5d622 +// 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/Progressbar/Progressbar.vue?vue&type=template&id=086b2ffe -var Progressbarvue_type_template_id_1ca5d622_hoisted_1 = { +var Progressbarvue_type_template_id_086b2ffe_hoisted_1 = { class: "progressbar" }; -var Progressbarvue_type_template_id_1ca5d622_hoisted_2 = { +var Progressbarvue_type_template_id_086b2ffe_hoisted_2 = { class: "progress" }; -var Progressbarvue_type_template_id_1ca5d622_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var Progressbarvue_type_template_id_086b2ffe_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { src: "plugins/Morpheus/images/loading-blue.gif" }, null, -1); -var Progressbarvue_type_template_id_1ca5d622_hoisted_4 = ["innerHTML"]; -function Progressbarvue_type_template_id_1ca5d622_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_["createElementBlock"])("div", Progressbarvue_type_template_id_1ca5d622_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Progressbarvue_type_template_id_1ca5d622_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { +var Progressbarvue_type_template_id_086b2ffe_hoisted_4 = ["innerHTML"]; +function Progressbarvue_type_template_id_086b2ffe_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_["createElementBlock"])("div", Progressbarvue_type_template_id_086b2ffe_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Progressbarvue_type_template_id_086b2ffe_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { class: "determinate", style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])([{ "width": "0" }, { width: "".concat(_ctx.actualProgress, "%") }]) - }, null, 4)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [Progressbarvue_type_template_id_1ca5d622_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, null, 4)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [Progressbarvue_type_template_id_086b2ffe_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "label", innerHTML: _ctx.$sanitize(_ctx.label) - }, null, 8, Progressbarvue_type_template_id_1ca5d622_hoisted_4)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !!_ctx.label]])]); + }, null, 8, Progressbarvue_type_template_id_086b2ffe_hoisted_4)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !!_ctx.label]])]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Progressbar/Progressbar.vue?vue&type=template&id=1ca5d622 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Progressbar/Progressbar.vue?vue&type=template&id=086b2ffe -// 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/Progressbar/Progressbar.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/Progressbar/Progressbar.vue?vue&type=script&lang=ts /* harmony default export */ var Progressbarvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { - progress: Number, + progress: { + type: Number, + required: true + }, label: String }, computed: { @@ -11410,7 +11575,7 @@ function Progressbarvue_type_template_id_1ca5d622_render(_ctx, _cache, $props, $ -Progressbarvue_type_script_lang_ts.render = Progressbarvue_type_template_id_1ca5d622_render +Progressbarvue_type_script_lang_ts.render = Progressbarvue_type_template_id_086b2ffe_render /* harmony default export */ var Progressbar = (Progressbarvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Progressbar/Progressbar.adapter.ts @@ -11471,8 +11636,7 @@ function piwikContentIntro() { } }; } -piwikContentIntro.$inject = []; -angular.module('piwikApp').directive('piwikContentIntro', piwikContentIntro); +window.angular.module('piwikApp').directive('piwikContentIntro', piwikContentIntro); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ContentTable/ContentTable.ts /*! * Matomo - free/libre analytics platform @@ -11510,15 +11674,14 @@ function piwikContentTable() { } }; } -piwikContentTable.$inject = []; -angular.module('piwikApp').directive('piwikContentTable', piwikContentTable); -// 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/AjaxForm/AjaxForm.vue?vue&type=template&id=5df20019 +window.angular.module('piwikApp').directive('piwikContentTable', piwikContentTable); +// 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/AjaxForm/AjaxForm.vue?vue&type=template&id=102798b2 -var AjaxFormvue_type_template_id_5df20019_hoisted_1 = { +var AjaxFormvue_type_template_id_102798b2_hoisted_1 = { ref: "root" }; -function AjaxFormvue_type_template_id_5df20019_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_["createElementBlock"])("div", AjaxFormvue_type_template_id_5df20019_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", { +function AjaxFormvue_type_template_id_102798b2_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_["createElementBlock"])("div", AjaxFormvue_type_template_id_102798b2_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", { formData: _ctx.formData, submitApiMethod: _ctx.submitApiMethod, sendJsonPayload: _ctx.sendJsonPayload, @@ -11530,9 +11693,9 @@ function AjaxFormvue_type_template_id_5df20019_render(_ctx, _cache, $props, $set errorPostResponse: _ctx.errorPostResponse })], 512); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue?vue&type=template&id=5df20019 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue?vue&type=template&id=102798b2 -// 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/AjaxForm/AjaxForm.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/AjaxForm/AjaxForm.vue?vue&type=script&lang=ts @@ -11629,7 +11792,7 @@ var AjaxFormvue_type_script_lang_ts_window = window, -AjaxFormvue_type_script_lang_ts.render = AjaxFormvue_type_template_id_5df20019_render +AjaxFormvue_type_script_lang_ts.render = AjaxFormvue_type_template_id_102798b2_render /* harmony default export */ var AjaxForm = (AjaxFormvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/AjaxForm/AjaxForm.adapter.ts @@ -11642,6 +11805,8 @@ AjaxFormvue_type_script_lang_ts.render = AjaxFormvue_type_template_id_5df20019_r +var AjaxForm_adapter_window = window, + AjaxForm_adapter_$ = AjaxForm_adapter_window.$; /** * AngularJS directive that manages an AJAX form. * @@ -11703,7 +11868,8 @@ function piwikAjaxForm($parse) { require: '?ngModel', transclude: true, compile: function piwikAjaxFormCompile(compileElement, compileAttrs) { - compileAttrs.noErrorNotification = !!compileAttrs.noErrorNotification; + compileAttrs.noErrorNotification = !!compileAttrs.noErrorNotification; // eslint-disable-next-line @typescript-eslint/no-explicit-any + return function piwikAjaxFormLink(scope, element, attrs, ngModel, transclude) { if (!scope.submitApiMethod) { throw new Error('submitApiMethod is required'); @@ -11748,14 +11914,13 @@ function piwikAjaxForm($parse) { }); function setFormValueFromInput(inputElement, skipScopeApply) { - var $ = angular.element; - var name = $(inputElement).attr('name'); + var name = AjaxForm_adapter_$(inputElement).attr('name'); var val; - if ($(inputElement).attr('type') === 'checkbox') { - val = $(inputElement).is(':checked'); + if (AjaxForm_adapter_$(inputElement).attr('type') === 'checkbox') { + val = AjaxForm_adapter_$(inputElement).is(':checked'); } else { - val = $(inputElement).val(); + val = AjaxForm_adapter_$(inputElement).val(); } scope.ajaxForm.data[name] = val; @@ -11773,6 +11938,7 @@ function piwikAjaxForm($parse) { setFormValueFromInput(event.target); }); } // make sure child elements can access this directive's scope + // eslint-disable-next-line @typescript-eslint/no-explicit-any transclude(scope, function (clone, transcludeScope) { @@ -11782,9 +11948,10 @@ function piwikAjaxForm($parse) { $inputs.each(function inputEach() { setFormValueFromInput(this, true); }); - } + } // eslint-disable-next-line @typescript-eslint/no-explicit-any - $(vm.transcludeTarget).append(clone); + + AjaxForm_adapter_$(vm.transcludeTarget).append(clone); }); }; } @@ -11792,7 +11959,7 @@ function piwikAjaxForm($parse) { } piwikAjaxForm.$inject = ['$parse']; -angular.module('piwikApp').directive('piwikAjaxForm', piwikAjaxForm); +window.angular.module('piwikApp').directive('piwikAjaxForm', piwikAjaxForm); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.adapter.ts /*! * Matomo - free/libre analytics platform @@ -11832,7 +11999,7 @@ function Alertvue_type_template_id_c3863ae2_render(_ctx, _cache, $props, $setup, } // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Alert/Alert.vue?vue&type=template&id=c3863ae2 -// 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/Alert/Alert.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/Alert/Alert.vue?vue&type=script&lang=ts /* harmony default export */ var Alertvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { @@ -12022,6 +12189,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 951661cee5..1770b1dceb 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js @@ -1,10 +1,10 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["CoreHome"]=t(require("vue")):e["CoreHome"]=t(e["Vue"])})("undefined"!==typeof self?self:this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/CoreHome/vue/dist/",n(n.s="fae3")}({2342:function(e,t,n){"use strict"; +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["CoreHome"]=t(require("vue")):e["CoreHome"]=t(e["Vue"])})("undefined"!==typeof self?self:this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/CoreHome/vue/dist/",n(n.s="fae3")}({2342:function(e,t,n){"use strict"; /*! * Matomo - free/libre analytics platform * * @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,"createVueApp",(function(){return Zt})),n.d(t,"DirectiveUtilities",(function(){return vt})),n.d(t,"debounce",(function(){return Wo})),n.d(t,"createAngularJsAdapter",(function(){return pn})),n.d(t,"transformAngularJsBoolAttr",(function(){return fn})),n.d(t,"transformAngularJsIntAttr",(function(){return mn})),n.d(t,"removeAngularJsSpecificProperties",(function(){return dn})),n.d(t,"activityIndicatorAdapter",(function(){return nd})),n.d(t,"ActivityIndicator",(function(){return Oa})),n.d(t,"translate",(function(){return C})),n.d(t,"alertAdapter",(function(){return cd})),n.d(t,"AjaxHelper",(function(){return Qe})),n.d(t,"setCookie",(function(){return ld})),n.d(t,"getCookie",(function(){return sd})),n.d(t,"deleteCookie",(function(){return ud})),n.d(t,"MatomoUrl",(function(){return De})),n.d(t,"Matomo",(function(){return S})),n.d(t,"Periods",(function(){return p})),n.d(t,"Day",(function(){return G})),n.d(t,"Week",(function(){return X})),n.d(t,"Month",(function(){return re})),n.d(t,"Year",(function(){return le})),n.d(t,"Range",(function(){return _})),n.d(t,"format",(function(){return P})),n.d(t,"getToday",(function(){return D})),n.d(t,"parseDate",(function(){return E})),n.d(t,"todayIsInRange",(function(){return V})),n.d(t,"Dropdown",(function(){return ot})),n.d(t,"FocusAnywhereButHere",(function(){return dt})),n.d(t,"FocusIf",(function(){return mt})),n.d(t,"MatomoDialog",(function(){return Xt})),n.d(t,"ExpandOnClick",(function(){return St})),n.d(t,"ExpandOnHover",(function(){return Tt})),n.d(t,"ShowSensitiveData",(function(){return Bt})),n.d(t,"DropdownButton",(function(){return Rt})),n.d(t,"SelectOnFocus",(function(){return Wt})),n.d(t,"SideNav",(function(){return Gt})),n.d(t,"EnrichedHeadline",(function(){return Bn})),n.d(t,"ContentBlock",(function(){return Wn})),n.d(t,"Comparisons",(function(){return Tr})),n.d(t,"MenuDropdown",(function(){return Jr})),n.d(t,"DatePicker",(function(){return no})),n.d(t,"DateRangePicker",(function(){return lo})),n.d(t,"PeriodDatePicker",(function(){return mo})),n.d(t,"Notification",(function(){return fc})),n.d(t,"NotificationGroup",(function(){return Dc})),n.d(t,"NotificationsStore",(function(){return jc})),n.d(t,"SiteSelector",(function(){return Yo})),n.d(t,"QuickAccess",(function(){return hi})),n.d(t,"FieldArray",(function(){return Vi})),n.d(t,"MultiPairField",(function(){return zi})),n.d(t,"PeriodSelector",(function(){return La})),n.d(t,"ReportingMenu",(function(){return ll})),n.d(t,"ReportingPagesStore",(function(){return Ic})),n.d(t,"ReportMetadataStore",(function(){return vl})),n.d(t,"WidgetsStore",(function(){return nl})),n.d(t,"WidgetLoader",(function(){return Dl})),n.d(t,"WidgetContainer",(function(){return Wl})),n.d(t,"WidgetByDimensionContainer",(function(){return ss})),n.d(t,"Widget",(function(){return ys})),n.d(t,"ReportingPage",(function(){return zs})),n.d(t,"ReportExport",(function(){return Vu})),n.d(t,"Sparkline",(function(){return Lu})),n.d(t,"Progressbar",(function(){return Wu})),n.d(t,"ContentIntro",(function(){return qu})),n.d(t,"ContentTable",(function(){return Gu})),n.d(t,"AjaxForm",(function(){return ed})),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}n("2342");var i=n("8bbf");function a(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 l(e,t,n){return t&&c(e.prototype,t),n&&c(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,"createVueApp",(function(){return Zt})),n.d(t,"useExternalPluginComponent",(function(){return An})),n.d(t,"DirectiveUtilities",(function(){return vt})),n.d(t,"debounce",(function(){return Ui})),n.d(t,"createAngularJsAdapter",(function(){return pn})),n.d(t,"transformAngularJsBoolAttr",(function(){return fn})),n.d(t,"transformAngularJsIntAttr",(function(){return mn})),n.d(t,"removeAngularJsSpecificProperties",(function(){return dn})),n.d(t,"activityIndicatorAdapter",(function(){return sd})),n.d(t,"ActivityIndicator",(function(){return Oa})),n.d(t,"translate",(function(){return C})),n.d(t,"alertAdapter",(function(){return md})),n.d(t,"AjaxHelper",(function(){return Qe})),n.d(t,"setCookie",(function(){return hd})),n.d(t,"getCookie",(function(){return gd})),n.d(t,"deleteCookie",(function(){return vd})),n.d(t,"MatomoUrl",(function(){return De})),n.d(t,"Matomo",(function(){return S})),n.d(t,"Periods",(function(){return p})),n.d(t,"Day",(function(){return G})),n.d(t,"Week",(function(){return X})),n.d(t,"Month",(function(){return re})),n.d(t,"Year",(function(){return le})),n.d(t,"Range",(function(){return _})),n.d(t,"format",(function(){return P})),n.d(t,"getToday",(function(){return D})),n.d(t,"parseDate",(function(){return E})),n.d(t,"todayIsInRange",(function(){return V})),n.d(t,"Dropdown",(function(){return it})),n.d(t,"FocusAnywhereButHere",(function(){return dt})),n.d(t,"FocusIf",(function(){return mt})),n.d(t,"MatomoDialog",(function(){return Xt})),n.d(t,"ExpandOnClick",(function(){return St})),n.d(t,"ExpandOnHover",(function(){return Tt})),n.d(t,"ShowSensitiveData",(function(){return Bt})),n.d(t,"DropdownButton",(function(){return Rt})),n.d(t,"SelectOnFocus",(function(){return qt})),n.d(t,"SideNav",(function(){return Gt})),n.d(t,"EnrichedHeadline",(function(){return Bn})),n.d(t,"ContentBlock",(function(){return qn})),n.d(t,"Comparisons",(function(){return Tr})),n.d(t,"MenuDropdown",(function(){return Jr})),n.d(t,"DatePicker",(function(){return ni})),n.d(t,"DateRangePicker",(function(){return li})),n.d(t,"PeriodDatePicker",(function(){return fi})),n.d(t,"Notification",(function(){return fc})),n.d(t,"NotificationGroup",(function(){return Vc})),n.d(t,"NotificationsStore",(function(){return Sc})),n.d(t,"SiteSelector",(function(){return zi})),n.d(t,"QuickAccess",(function(){return ho})),n.d(t,"FieldArray",(function(){return Vo})),n.d(t,"MultiPairField",(function(){return zo})),n.d(t,"PeriodSelector",(function(){return Ma})),n.d(t,"ReportingMenu",(function(){return fl})),n.d(t,"ReportingPagesStore",(function(){return Bc})),n.d(t,"ReportMetadataStore",(function(){return jl})),n.d(t,"WidgetsStore",(function(){return cl})),n.d(t,"WidgetLoader",(function(){return Al})),n.d(t,"WidgetContainer",(function(){return Yl})),n.d(t,"WidgetByDimensionContainer",(function(){return ms})),n.d(t,"Widget",(function(){return Ss})),n.d(t,"ReportingPage",(function(){return Zs})),n.d(t,"ReportExport",(function(){return Iu})),n.d(t,"Sparkline",(function(){return Hu})),n.d(t,"Progressbar",(function(){return Yu})),n.d(t,"ContentIntro",(function(){return Qu})),n.d(t,"ContentTable",(function(){return Xu})),n.d(t,"AjaxForm",(function(){return od})),"undefined"!==typeof window){var r=window.document.currentScript,i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}n("2342");var o=n("8bbf");function a(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 l(e,t,n){return t&&c(e.prototype,t),n&&c(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} /*! * Matomo - free/libre analytics platform * @@ -16,26 +16,26 @@ * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var y=window,O=y.piwik,w=y.broadcast,j=y.piwikHelper;O.helper=j,O.broadcast=w,O.updateDateInTitle=function(e,t){if($(".top_controls #periodString").length&&(u=u||document.title,0===u.indexOf(O.siteName))){var n=" - ".concat(p.parse(t,e).getPrettyString()," ");document.title="".concat(O.siteName).concat(n).concat(u.substr(O.siteName.length))}},O.hasUserCapability=function(e){return window.angular.isArray(O.userCapabilities)&&-1!==O.userCapabilities.indexOf(e)},O.on=function(e,t){function n(e){t.apply(void 0,f(e.detail))}t.wrapper=n,window.addEventListener(e,n)},O.off=function(e,t){t.wrapper&&window.removeEventListener(e,t.wrapper)},O.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 o=new CustomEvent(e,{detail:n});window.dispatchEvent(o)},O.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];O.postEventNoEmit.apply(O,[e].concat(n)),window.angular.element((function(){var t=O.helper.getAngularDependency("$rootScope");t.$oldEmit.apply(t,[e].concat(n))}))};var k=O,S=k; + */var y=window,O=y.piwik,w=y.broadcast,j=y.piwikHelper;O.helper=j,O.broadcast=w,O.updateDateInTitle=function(e,t){if($(".top_controls #periodString").length&&(u=u||document.title,0===u.indexOf(O.siteName))){var n=" - ".concat(p.parse(t,e).getPrettyString()," ");document.title="".concat(O.siteName).concat(n).concat(u.substr(O.siteName.length))}},O.hasUserCapability=function(e){return window.angular.isArray(O.userCapabilities)&&-1!==O.userCapabilities.indexOf(e)},O.on=function(e,t){function n(e){t.apply(void 0,f(e.detail))}t.wrapper=n,window.addEventListener(e,n)},O.off=function(e,t){t.wrapper&&window.removeEventListener(e,t.wrapper)},O.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 i=new CustomEvent(e,{detail:n});window.dispatchEvent(i)},O.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];O.postEventNoEmit.apply(O,[e].concat(n)),window.angular.element((function(){var t=O.helper.getAngularDependency("$rootScope");t.$oldEmit.apply(t,[e].concat(n))}))};var k=O,S=k; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function C(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 o=n;return 1===n.length&&n[0]&&Array.isArray(n[0])&&(o=n[0]),window._pk_translate(e,o)} +function C(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 i=n;return 1===n.length&&n[0]&&Array.isArray(n[0])&&(i=n[0]),window._pk_translate(e,i)} /*! * Matomo - free/libre analytics platform * * @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 D(){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 D();if("yesterday"===t||"yesterdaySameTime"===t){var n=D();return n.setDate(n.getDate()-1),n}if(t.match(/last[ -]?week/i)){var r=D();return r.setDate(r.getDate()-7),r}if(t.match(/last[ -]?month/i)){var o=D();return o.setDate(1),o.setMonth(o.getMonth()-1),o}if(t.match(/last[ -]?year/i)){var i=D();return i.setFullYear(i.getFullYear()-1),i}return $.datepicker.parseDate("yy-mm-dd",t)}function V(e){return 2===e.length&&(D()>=e[0]&&D()<=e[1])}function N(e,t){return B(e)||x(e,t)||A(e,t)||T()}function T(){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 A(e,t){if(e){if("string"===typeof e)return I(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)?I(e,t):void 0}}function I(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 x(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){c=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw o}}return i}}function B(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 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 F(e,t,n){return t&&L(e.prototype,t),n&&L(e,n),e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function P(e){return $.datepicker.formatDate("yy-mm-dd",e)}function D(){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 D();if("yesterday"===t||"yesterdaySameTime"===t){var n=D();return n.setDate(n.getDate()-1),n}if(t.match(/last[ -]?week/i)){var r=D();return r.setDate(r.getDate()-7),r}if(t.match(/last[ -]?month/i)){var i=D();return i.setDate(1),i.setMonth(i.getMonth()-1),i}if(t.match(/last[ -]?year/i)){var o=D();return o.setFullYear(o.getFullYear()-1),o}return $.datepicker.parseDate("yy-mm-dd",t)}function V(e){return 2===e.length&&(D()>=e[0]&&D()<=e[1])}function N(e,t){return B(e)||I(e,t)||A(e,t)||T()}function T(){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 A(e,t){if(e){if("string"===typeof e)return x(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)?x(e,t):void 0}}function x(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 I(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(o.push(r.value),t&&o.length===t)break}catch(l){c=!0,i=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}return o}}function B(e){if(Array.isArray(e))return e}function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M(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 F(e,t,n){return t&&M(e.prototype,t),n&&M(e,n),e}function R(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 _=function(){function e(t,n,r){M(this,e),R(this,"startDate",void 0),R(this,"endDate",void 0),R(this,"childPeriodType",void 0),this.startDate=t,this.endDate=n,this.childPeriodType=r}return F(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 V(this.getDateRange())}},{key:"getDayCount",value:function(){return Math.ceil((this.endDate.getTime()-this.startDate.getTime())/864e5)+1}}],[{key:"getLastNRange",value:function(t,n,r){var o=Math.max(parseInt(n.toString(),10)-1,0);if(Number.isNaN(o))throw new Error("Invalid range strAmount");var i=r?E(r):D(),a=new Date(i.getTime());if("day"===t)a.setDate(a.getDate()-o);else if("week"===t)a.setDate(a.getDate()-7*o);else if("month"===t)a.setDate(1),a.setMonth(a.getMonth()-o);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));a.setFullYear(a.getFullYear()-o)}if("day"!==t){var c=p.periods[t].parse(a),l=p.periods[t].parse(i),s=c.getDateRange(),u=N(s,1);a=u[0];var d=l.getDateRange(),f=N(d,2);i=f[1]}var m=new Date(1991,7,6);if(a.getTime()-m.getTime()<0)switch(t){case"year":a=new Date(1992,0,1);break;case"month":a=new Date(1991,8,1);break;case"week":a=new Date(1991,8,12);break;case"day":default:a=m;break}return new e(a,i,t)}},{key:"getLastNRangeChild",value:function(t,n,r){var o=n?E(n):D(),i=new Date(o.getTime()),a=new Date(o.getTime());if("day"===t)i.setDate(i.getDate()-r),a.setDate(a.getDate()-r);else if("week"===t)i.setDate(i.getDate()-7*r),a.setDate(a.getDate()-7*r);else if("month"===t)i.setDate(1),i.setMonth(i.getMonth()-r),a.setDate(1),a.setMonth(a.getMonth()-r);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));i.setFullYear(i.getFullYear()-r),a.setFullYear(a.getFullYear()-r)}if("day"!==t){var c=p.periods[t].parse(i),l=p.periods[t].parse(a),s=c.getDateRange(),u=N(s,1);i=u[0];var d=l.getDateRange(),f=N(d,2);a=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,a,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 o=decodeURIComponent(t).split(",");return new e(E(o[0]),E(o[1]),n)}},{key:"getDisplayText",value:function(){return C("General_DateRangeInPeriodList")}}]),e}();function H(){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:_,todayIsInRange:V}}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W(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&&W(e.prototype,t),n&&W(e,n),e}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */var _=function(){function e(t,n,r){L(this,e),R(this,"startDate",void 0),R(this,"endDate",void 0),R(this,"childPeriodType",void 0),this.startDate=t,this.endDate=n,this.childPeriodType=r}return F(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 V(this.getDateRange())}},{key:"getDayCount",value:function(){return Math.ceil((this.endDate.getTime()-this.startDate.getTime())/864e5)+1}}],[{key:"getLastNRange",value:function(t,n,r){var i=Math.max(parseInt(n.toString(),10)-1,0);if(Number.isNaN(i))throw new Error("Invalid range strAmount");var o=r?E(r):D(),a=new Date(o.getTime());if("day"===t)a.setDate(a.getDate()-i);else if("week"===t)a.setDate(a.getDate()-7*i);else if("month"===t)a.setDate(1),a.setMonth(a.getMonth()-i);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));a.setFullYear(a.getFullYear()-i)}if("day"!==t){var c=p.periods[t].parse(a),l=p.periods[t].parse(o),s=c.getDateRange(),u=N(s,1);a=u[0];var d=l.getDateRange(),f=N(d,2);o=f[1]}var m=new Date(1991,7,6);if(a.getTime()-m.getTime()<0)switch(t){case"year":a=new Date(1992,0,1);break;case"month":a=new Date(1991,8,1);break;case"week":a=new Date(1991,8,12);break;case"day":default:a=m;break}return new e(a,o,t)}},{key:"getLastNRangeChild",value:function(t,n,r){var i=n?E(n):D(),o=new Date(i.getTime()),a=new Date(i.getTime());if("day"===t)o.setDate(o.getDate()-r),a.setDate(a.getDate()-r);else if("week"===t)o.setDate(o.getDate()-7*r),a.setDate(a.getDate()-7*r);else if("month"===t)o.setDate(1),o.setMonth(o.getMonth()-r),a.setDate(1),a.setMonth(a.getMonth()-r);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));o.setFullYear(o.getFullYear()-r),a.setFullYear(a.getFullYear()-r)}if("day"!==t){var c=p.periods[t].parse(o),l=p.periods[t].parse(a),s=c.getDateRange(),u=N(s,1);o=u[0];var d=l.getDateRange(),f=N(d,2);a=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,a,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 i=decodeURIComponent(t).split(",");return new e(E(i[0]),E(i[1]),n)}},{key:"getDisplayText",value:function(){return C("General_DateRangeInPeriodList")}}]),e}();function H(){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:_,todayIsInRange:V}}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q(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&&q(e.prototype,t),n&&q(e,n),e}function J(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,7 +48,7 @@ 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",H);var G=function(){function e(t){U(this,e),J(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 V(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 Q(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",H);var G=function(){function e(t){U(this,e),J(this,"dateInPeriod",void 0),this.dateInPeriod=t}return W(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 V(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 Q(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 * @@ -60,26 +60,26 @@ window.piwik.addCustomPeriod=p.addCustomPeriod.bind(p),window.angular.module("pi * * @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 V(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodMonth")}}]),e}();function oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ie(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 ae(e,t,n){return t&&ie(e.prototype,t),n&&ie(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} + */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 V(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodMonth")}}]),e}();function ie(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 ae(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 le=function(){function e(t){oe(this,e),ce(this,"dateInPeriod",void 0),this.dateInPeriod=t}return ae(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 V(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 le=function(){function e(t){ie(this,e),ce(this,"dateInPeriod",void 0),this.dateInPeriod=t}return ae(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 V(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){return me(e)||fe(e,t)||de(e,t)||ue()}function ue(){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 de(e,t){if(e){if("string"===typeof e)return pe(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)?pe(e,t):void 0}}function pe(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 fe(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){c=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw o}}return i}}function me(e){if(Array.isArray(e))return e}function he(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 ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function be(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 ye(e,t,n){return t&&be(e.prototype,t),n&&be(e,n),e}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} +function se(e,t){return me(e)||fe(e,t)||de(e,t)||ue()}function ue(){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 de(e,t){if(e){if("string"===typeof e)return pe(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)?pe(e,t):void 0}}function pe(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 fe(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(o.push(r.value),t&&o.length===t)break}catch(l){c=!0,i=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}return o}}function me(e){if(Array.isArray(e))return e}function he(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 ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function be(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 ye(e,t,n){return t&&be(e.prototype,t),n&&be(e,n),e}function Oe(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",le);var we=window,je=we.piwik,ke=we.broadcast;function Se(e,t){try{return p.parse(e,t),!0}catch(n){return!1}}var Ce=function(){function e(){var t=this;ve(this,e),Oe(this,"urlQuery",Object(i["ref"])("")),Oe(this,"hashQuery",Object(i["ref"])("")),Oe(this,"urlParsed",Object(i["computed"])((function(){return Object(i["readonly"])(ke.getValuesFromUrl("?".concat(t.urlQuery.value),!0))}))),Oe(this,"hashParsed",Object(i["computed"])((function(){return Object(i["readonly"])(ke.getValuesFromUrl("?".concat(t.hashQuery.value),!0))}))),Oe(this,"parsed",Object(i["computed"])((function(){return Object(i["readonly"])(ge(ge({},t.urlParsed.value),t.hashParsed.value))}))),this.setUrlQuery(window.location.search),this.setHashQuery(window.location.hash),S.on("$locationChangeSuccess",(function(e){var n=new URL(e);t.setUrlQuery(n.search.replace(/^\?/,"")),t.setHashQuery(n.hash.replace(/^#/,""))})),this.updatePeriodParamsFromUrl()}return ye(e,[{key:"updateHash",value:function(e){var t=this.getFinalHashParams(e),n=this.stringify(t),r=S.helper.getAngularDependency("$location");r.search(n);var o=S.helper.getAngularDependency("$timeout");o()}},{key:"updateUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?this.stringify(e):e,r=Object.keys(t).length?this.getFinalHashParams(t,e):{},o=this.stringify(r),i="?".concat(n);o.length&&(i="".concat(i,"#?").concat(o)),window.broadcast.propagateNewPage("",void 0,void 0,void 0,i)}},{key:"getFinalHashParams",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?e:ke.getValuesFromUrl("?".concat(e),!0),r="string"!==typeof e?t:ke.getValuesFromUrl("?".concat(t),!0);return ge({period:r.period||this.parsed.value.period,date:r.date||this.parsed.value.date,segment:r.segment||this.parsed.value.segment},n)}},{key:"updateLocation",value:function(e){S.helper.isAngularRenderingThePage()?this.updateHash(e):this.updateUrl(e)}},{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){var t=Object.fromEntries(Object.entries(e).filter((function(e){var t=se(e,2),n=t[1];return""!==n&&null!==n&&void 0!==n})));return $.param(t).replace(/%5B%5D/g,"[]").replace(/%2C/g,",")}},{key:"updatePeriodParamsFromUrl",value:function(){var e=this.getSearchParam("date"),t=this.getSearchParam("period");if(Se(t,e)&&(je.period!==t||je.currentDateString!==e)){je.period=t;var n=p.parse(t,e).getDateRange();je.startDateString=P(n[0]),je.endDateString=P(n[1]),je.updateDateInTitle(e,t),"range"===je.period&&(e="".concat(je.startDateString,",").concat(je.endDateString)),je.currentDateString=e}}},{key:"setUrlQuery",value:function(e){this.urlQuery.value=e.replace(/^\?/,"")}},{key:"setHashQuery",value:function(e){this.hashQuery.value=e.replace(/^[#/?]+/,"")}}]),e}(),Pe=new Ce,De=Pe; + */p.addCustomPeriod("year",le);var we=window,je=we.piwik,ke=we.broadcast;function Se(e,t){try{return p.parse(e,t),!0}catch(n){return!1}}var Ce=function(){function e(){var t=this;ve(this,e),Oe(this,"urlQuery",Object(o["ref"])("")),Oe(this,"hashQuery",Object(o["ref"])("")),Oe(this,"urlParsed",Object(o["computed"])((function(){return Object(o["readonly"])(ke.getValuesFromUrl("?".concat(t.urlQuery.value),!0))}))),Oe(this,"hashParsed",Object(o["computed"])((function(){return Object(o["readonly"])(ke.getValuesFromUrl("?".concat(t.hashQuery.value),!0))}))),Oe(this,"parsed",Object(o["computed"])((function(){return Object(o["readonly"])(ge(ge({},t.urlParsed.value),t.hashParsed.value))}))),this.setUrlQuery(window.location.search),this.setHashQuery(window.location.hash),S.on("$locationChangeSuccess",(function(e){var n=new URL(e);t.setUrlQuery(n.search.replace(/^\?/,"")),t.setHashQuery(n.hash.replace(/^#/,""))})),this.updatePeriodParamsFromUrl()}return ye(e,[{key:"updateHash",value:function(e){var t=this.getFinalHashParams(e),n=this.stringify(t),r=S.helper.getAngularDependency("$location");r.search(n);var i=S.helper.getAngularDependency("$timeout");i()}},{key:"updateUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?this.stringify(e):e,r=Object.keys(t).length?this.getFinalHashParams(t,e):{},i=this.stringify(r),o="?".concat(n);i.length&&(o="".concat(o,"#?").concat(i)),window.broadcast.propagateNewPage("",void 0,void 0,void 0,o)}},{key:"getFinalHashParams",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?e:ke.getValuesFromUrl("?".concat(e),!0),r="string"!==typeof e?t:ke.getValuesFromUrl("?".concat(t),!0);return ge({period:r.period||this.parsed.value.period,date:r.date||this.parsed.value.date,segment:r.segment||this.parsed.value.segment},n)}},{key:"updateLocation",value:function(e){S.helper.isAngularRenderingThePage()?this.updateHash(e):this.updateUrl(e)}},{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){var t=Object.fromEntries(Object.entries(e).filter((function(e){var t=se(e,2),n=t[1];return""!==n&&null!==n&&void 0!==n})));return $.param(t).replace(/%5B%5D/g,"[]").replace(/%2C/g,",")}},{key:"updatePeriodParamsFromUrl",value:function(){var e=this.getSearchParam("date"),t=this.getSearchParam("period");if(Se(t,e)&&(je.period!==t||je.currentDateString!==e)){je.period=t;var n=p.parse(t,e).getDateRange();je.startDateString=P(n[0]),je.endDateString=P(n[1]),je.updateDateInTitle(e,t),"range"===je.period&&(e="".concat(je.startDateString,",").concat(je.endDateString)),je.currentDateString=e}}},{key:"setUrlQuery",value:function(e){this.urlQuery.value=e.replace(/^\?/,"")}},{key:"setHashQuery",value:function(e){this.hashQuery.value=e.replace(/^[#/?]+/,"")}}]),e}(),Pe=new Ce,De=Pe; /*! * Matomo - free/libre analytics platform * @@ -93,33 +93,33 @@ function Ee(){var e={getSearchParam:De.getSearchParam.bind(De)};return e} * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Ve(){return S}function Ne(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 S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldEmit.apply(this,[e].concat(n))},t.$oldBroadcast=t.$broadcast,t.$broadcast=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 S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldBroadcast.apply(this,[e].concat(n))},t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}function Te(e){return Te="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(e)}function Ae(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 Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(n),!0).forEach((function(t){Me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xe(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 Be(e,t,n){return t&&xe(e.prototype,t),n&&xe(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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fe(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Je(e,t)}function Re(e){var t=We();return function(){var n,r=Ge(e);if(t){var o=Ge(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _e(this,n)}}function _e(e,t){if(t&&("object"===Te(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return $e(e)}function $e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function He(e){var t="function"===typeof Map?new Map:void 0;return He=function(e){if(null===e||!qe(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Ue(e,arguments,Ge(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Je(n,e)},He(e)}function Ue(e,t,n){return Ue=We()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=Function.bind.apply(e,r),i=new o;return n&&Je(i,n.prototype),i},Ue.apply(null,arguments)}function We(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function qe(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function Je(e,t){return Je=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Je(e,t)}function Ge(e){return Ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ge(e)} +function Ve(){return S}function Ne(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 S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldEmit.apply(this,[e].concat(n))},t.$oldBroadcast=t.$broadcast,t.$broadcast=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 S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldBroadcast.apply(this,[e].concat(n))},t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}function Te(e){return Te="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(e)}function Ae(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 xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(n),!0).forEach((function(t){Le(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ie(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 Be(e,t,n){return t&&Ie(e.prototype,t),n&&Ie(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}function Me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fe(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Je(e,t)}function Re(e){var t=qe();return function(){var n,r=Ge(e);if(t){var i=Ge(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _e(this,n)}}function _e(e,t){if(t&&("object"===Te(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return $e(e)}function $e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function He(e){var t="function"===typeof Map?new Map:void 0;return He=function(e){if(null===e||!We(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Ue(e,arguments,Ge(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Je(n,e)},He(e)}function Ue(e,t,n){return Ue=qe()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=Function.bind.apply(e,r),o=new i;return n&&Je(o,n.prototype),o},Ue.apply(null,arguments)}function qe(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function We(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function Je(e,t){return Je=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Je(e,t)}function Ge(e){return Ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ge(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 ze(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))}je.updatePeriodParamsFromUrl=Pe.updatePeriodParamsFromUrl.bind(Pe),Ee.$inject=[],angular.module("piwikApp.service").service("piwikUrl",Ee),window.angular.module("piwikApp.service").service("piwik",Ve),Ne.$inject=["piwik","$rootScope"],window.angular.module("piwikApp.service").run(Ne),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 Ye=function(e){Fe(n,e);var t=Re(n);function n(){return Le(this,n),t.apply(this,arguments)}return n}(He(Error)),Qe=function(){function e(){Le(this,e),Me(this,"format","json"),Me(this,"timeout",null),Me(this,"callback",null),Me(this,"useRegularCallbackInCaseOfError",!1),Me(this,"errorCallback",void 0),Me(this,"withToken",!1),Me(this,"completeCallback",void 0),Me(this,"getParams",{}),Me(this,"getUrl","?"),Me(this,"postParams",{}),Me(this,"loadingElement",null),Me(this,"errorElement","#ajaxError"),Me(this,"headers",void 0),Me(this,"requestHandle",null),Me(this,"abortController",null),Me(this,"defaultParams",["idSite","period","date","segment"]),this.errorCallback=ze}return Be(e,[{key:"addParams",value:function(e,t){var n=this,r="string"===typeof e?window.broadcast.getValuesFromUrl(e):e,o=["compareSegments","comparePeriods","compareDates"];Object.keys(r).forEach((function(e){var i=r[e];(-1===o.indexOf(e)||i)&&("get"===t.toLowerCase()?n.getParams[e]=i:"post"===t.toLowerCase()&&(n.postParams[e]=i))}))}},{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;$(this.errorElement).length&&$(this.errorElement).hide(),this.loadingElement&&$(this.loadingElement).fadeIn(),this.requestHandle=this.buildAjaxCall(),window.globalAjaxQueue.push(this.requestHandle);var t=null;try{t=S.helper.getAngularDependency("$timeout")}catch(r){}this.abortController&&this.abortController.signal.addEventListener("abort",(function(){e.requestHandle&&e.requestHandle.abort()}));var n=new Promise((function(n,r){e.requestHandle.then((function(e){n(e)})).fail((function(t){"abort"!==t.statusText&&(console.log("Warning: the ".concat($.param(e.getParams)," request failed!")),r(t))})).done((function(){t&&t()}))}));return n}},{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 o={type:"POST",async:!0,url:r,dataType:this.format||"json",complete:this.completeCallback,headers:this.headers?this.headers:void 0,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 o=null,i="toast";$(e.errorElement).length&&t.message&&($(e.errorElement).show(),o=e.errorElement,i=null);var a=!document.querySelector("#login_form");if(t.message&&a){var c=window["require"]("piwik/UI"),l=new c.Notification;l.show(t.message,{placeat:o,context:"error",type:i,id:"ajaxHelper"}),l.scrollToNotification()}}else e.callback&&e.callback(t,n,r);window.globalAjaxQueue.active-=1,S.ajaxRequestFinished&&S.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return $.ajax(o)}},{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()||S.shouldPropagateTokenAuth?{token_auth:S.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}},{key:"mixinDefaultPostParams",value:function(e){var t=this.getDefaultPostParams(),n=Ie(Ie({},t),e);return n}},{key:"mixinDefaultGetParams",value:function(e){var t=this,n=De.getSearchParam("segment"),r={idSite:S.idSite?S.idSite.toString():broadcast.getValueFromUrl("idSite"),period:S.period||broadcast.getValueFromUrl("period"),segment:n},o=e;return o.token_auth&&(o.token_auth=null,delete o.token_auth),Object.keys(r).forEach((function(e){t.useGETDefaultParameter(e)&&!o[e]&&!t.postParams[e]&&r[e]&&(o[e]=r[e])})),!this.useGETDefaultParameter("date")||o.date||this.postParams.date||(o.date=S.currentDateString),o}}],[{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(n.format||"json"),r.addParams(Ie({module:"API",format:n.format||"json"},t),"get"),n.postParams&&r.addParams(n.postParams,"post"),n.headers&&(r.headers=n.headers),"undefined"===typeof n.createErrorNotification||n.createErrorNotification||r.useCallbackInCaseOfError(),n.abortController&&(r.abortController=n.abortController),r.send().then((function(e){if("error"===e.result)throw new Ye(e.message);return e}))}},{key:"post",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.fetch(e,Ie(Ie({},n),{},{postParams:t}))}}]),e}();function Ke(){return globalAjaxQueue}function Xe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ze(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 et(e,t,n){return t&&Ze(e.prototype,t),n&&Ze(e,n),e} + */function ze(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))}je.updatePeriodParamsFromUrl=Pe.updatePeriodParamsFromUrl.bind(Pe),window.angular.module("piwikApp.service").service("piwikUrl",Ee),window.angular.module("piwikApp.service").service("piwik",Ve),Ne.$inject=["piwik","$rootScope"],window.angular.module("piwikApp.service").run(Ne),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 Ye=function(e){Fe(n,e);var t=Re(n);function n(){return Me(this,n),t.apply(this,arguments)}return n}(He(Error)),Qe=function(){function e(){Me(this,e),Le(this,"format","json"),Le(this,"timeout",null),Le(this,"callback",null),Le(this,"useRegularCallbackInCaseOfError",!1),Le(this,"errorCallback",void 0),Le(this,"withToken",!1),Le(this,"completeCallback",void 0),Le(this,"getParams",{}),Le(this,"getUrl","?"),Le(this,"postParams",{}),Le(this,"loadingElement",null),Le(this,"errorElement","#ajaxError"),Le(this,"headers",void 0),Le(this,"requestHandle",null),Le(this,"abortController",null),Le(this,"defaultParams",["idSite","period","date","segment"]),this.errorCallback=ze}return Be(e,[{key:"addParams",value:function(e,t){var n=this,r="string"===typeof e?window.broadcast.getValuesFromUrl(e):e,i=["compareSegments","comparePeriods","compareDates"];Object.keys(r).forEach((function(e){var o=r[e];(-1===i.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;$(this.errorElement).length&&$(this.errorElement).hide(),this.loadingElement&&$(this.loadingElement).fadeIn(),this.requestHandle=this.buildAjaxCall(),window.globalAjaxQueue.push(this.requestHandle);var t=null;try{t=S.helper.getAngularDependency("$timeout")}catch(r){}this.abortController&&this.abortController.signal.addEventListener("abort",(function(){e.requestHandle&&e.requestHandle.abort()}));var n=new Promise((function(n,r){e.requestHandle.then((function(e){n(e)})).fail((function(t){"abort"!==t.statusText&&(console.log("Warning: the ".concat($.param(e.getParams)," request failed!")),r(t))})).done((function(){t&&t()}))}));return n}},{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 i={type:"POST",async:!0,url:r,dataType:this.format||"json",complete:this.completeCallback,headers:this.headers?this.headers:void 0,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 i=null,o="toast";$(e.errorElement).length&&t.message&&($(e.errorElement).show(),i=e.errorElement,o=null);var a=!document.querySelector("#login_form");if(t.message&&a){var c=window["require"]("piwik/UI"),l=new c.Notification;l.show(t.message,{placeat:i,context:"error",type:o,id:"ajaxHelper"}),l.scrollToNotification()}}else e.callback&&e.callback(t,n,r);window.globalAjaxQueue.active-=1,S.ajaxRequestFinished&&S.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return $.ajax(i)}},{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()||S.shouldPropagateTokenAuth?{token_auth:S.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}},{key:"mixinDefaultPostParams",value:function(e){var t=this.getDefaultPostParams(),n=xe(xe({},t),e);return n}},{key:"mixinDefaultGetParams",value:function(e){var t=this,n=De.getSearchParam("segment"),r={idSite:S.idSite?S.idSite.toString():broadcast.getValueFromUrl("idSite"),period:S.period||broadcast.getValueFromUrl("period"),segment:n},i=e;return i.token_auth&&(i.token_auth=null,delete i.token_auth),Object.keys(r).forEach((function(e){t.useGETDefaultParameter(e)&&!i[e]&&!t.postParams[e]&&r[e]&&(i[e]=r[e])})),!this.useGETDefaultParameter("date")||i.date||this.postParams.date||(i.date=S.currentDateString),i}}],[{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(n.format||"json"),r.addParams(xe({module:"API",format:n.format||"json"},t),"get"),n.postParams&&r.addParams(n.postParams,"post"),n.headers&&(r.headers=n.headers),"undefined"===typeof n.createErrorNotification||n.createErrorNotification||r.useCallbackInCaseOfError(),n.abortController&&(r.abortController=n.abortController),r.send().then((function(e){if("error"===e.result)throw new Ye(e.message);return e}))}},{key:"post",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.fetch(e,xe(xe({},n),{},{postParams:t}))}}]),e}();function Ke(){return window.globalAjaxQueue}function Xe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ze(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 et(e,t,n){return t&&Ze(e.prototype,t),n&&Ze(e,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 - */window.ajaxHelper=Qe,angular.module("piwikApp.service").service("globalAjaxQueue",Ke);var tt=window,nt=tt.$,rt=function(){function e(){Xe(this,e),this.setup()}return et(e,[{key:"setup",value:function(){var e=this;Object(i["watch"])((function(){return De.parsed.value.popover}),(function(){return e.onPopoverParamChanged()})),De.parsed.value.popover&&this.onPopoverParamChangedInitial()}},{key:"onPopoverParamChangedInitial",value:function(){var e=this;nt((function(){setTimeout((function(){e.openOrClose()}))}))}},{key:"onPopoverParamChanged",value:function(){var e=this;nt((function(){e.openOrClose()}))}},{key:"openOrClose",value:function(){this.close();var e=De.parsed.value.popover;e?this.open(e):window.broadcast.resetPopoverStack()}},{key:"close",value:function(){window.Piwik_Popover.close()}},{key:"open",value:function(e){var t=decodeURIComponent(e);t=t.replace(/\$/g,"%"),t=decodeURIComponent(t);var n=t.split(":"),r=n[0];n.shift();var o=n.join(":");"undefined"===typeof window.broadcast.popoverHandlers[r]||window.broadcast.isLoginPage()||window.broadcast.popoverHandlers[r](o)}}]),e}(),ot=(new rt,{mounted:function(e,t){var n={};$(e).addClass("matomo-dropdown-menu");var r,o=!!$(e).parent().closest(".dropdown-content").length;o&&(n={hover:!0},$(e).addClass("submenu"),$((null===(r=t.value)||void 0===r?void 0:r.activates)||$(e).data("target")).addClass("submenu-dropdown-content"),$(e).parents(".dropdown-content").addClass("submenu-container"));$(e).dropdown(n)}}); + */window.ajaxHelper=Qe,window.angular.module("piwikApp.service").service("globalAjaxQueue",Ke);var tt=window,nt=tt.$,rt=function(){function e(){Xe(this,e),this.setup()}return et(e,[{key:"setup",value:function(){var e=this;Object(o["watch"])((function(){return De.parsed.value.popover}),(function(){return e.onPopoverParamChanged()})),De.parsed.value.popover&&this.onPopoverParamChangedInitial()}},{key:"onPopoverParamChangedInitial",value:function(){var e=this;nt((function(){setTimeout((function(){e.openOrClose()}))}))}},{key:"onPopoverParamChanged",value:function(){var e=this;nt((function(){e.openOrClose()}))}},{key:"openOrClose",value:function(){this.close();var e=De.parsed.value.popover;e?this.open(e):window.broadcast.resetPopoverStack()}},{key:"close",value:function(){window.Piwik_Popover.close()}},{key:"open",value:function(e){var t=decodeURIComponent(e);t=t.replace(/\$/g,"%"),t=decodeURIComponent(t);var n=t.split(":"),r=n[0];n.shift();var i=n.join(":");"undefined"===typeof window.broadcast.popoverHandlers[r]||window.broadcast.isLoginPage()||window.broadcast.popoverHandlers[r](i)}}]),e}(),it=(new rt,{mounted:function(e,t){var n={};$(e).addClass("matomo-dropdown-menu");var r,i=!!$(e).parent().closest(".dropdown-content").length;i&&(n={hover:!0},$(e).addClass("submenu"),$((null===(r=t.value)||void 0===r?void 0:r.activates)||$(e).data("target")).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 it(e){return{restrict:"A",link:function(t,n,r){var o={instance:null,value:{activates:$("#".concat(r.activates))[0]},oldValue:null,modifiers:{},dir:{}};e((function(){ot.mounted(n[0],o)}))}}} +function ot(e){return{restrict:"A",link:function(t,n,r){var i={instance:null,value:{activates:$("#".concat(r.activates))[0]},oldValue:null,modifiers:{},dir:{}};e((function(){it.mounted(n[0],i)}))}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function at(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 ct(e,t){t.value.hasScrolled=!0}function lt(e,t){t.value.isMouseDown=!0,t.value.hasScrolled=!1}function st(e,t,n){27===n.which&&setTimeout((function(){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.blur&&t.value.blur()}),0)}it.$inject=["$timeout"],angular.module("piwikApp").directive("piwikDropdownMenu",it);var ut=document.documentElement,dt={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onEscapeHandler=st.bind(null,e,t),t.value.onMouseDown=lt.bind(null,e,t),t.value.onClickOutsideElement=at.bind(null,e,t),t.value.onScroll=ct.bind(null,e,t),ut.addEventListener("keyup",t.value.onEscapeHandler),ut.addEventListener("mousedown",t.value.onMouseDown),ut.addEventListener("mouseup",t.value.onClickOutsideElement),ut.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){ut.removeEventListener("keyup",t.value.onEscapeHandler),ut.removeEventListener("mousedown",t.value.onMouseDown),ut.removeEventListener("mouseup",t.value.onClickOutsideElement),ut.removeEventListener("scroll",t.value.onScroll)}}; +function at(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 ct(e,t){t.value.hasScrolled=!0}function lt(e,t){t.value.isMouseDown=!0,t.value.hasScrolled=!1}function st(e,t,n){27===n.which&&setTimeout((function(){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.blur&&t.value.blur()}),0)}ot.$inject=["$timeout"],window.angular.module("piwikApp").directive("piwikDropdownMenu",ot);var ut=document.documentElement,dt={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onEscapeHandler=st.bind(null,e,t),t.value.onMouseDown=lt.bind(null,e,t),t.value.onClickOutsideElement=at.bind(null,e,t),t.value.onScroll=ct.bind(null,e,t),ut.addEventListener("keyup",t.value.onEscapeHandler),ut.addEventListener("mousedown",t.value.onMouseDown),ut.addEventListener("mouseup",t.value.onClickOutsideElement),ut.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){ut.removeEventListener("keyup",t.value.onEscapeHandler),ut.removeEventListener("mousedown",t.value.onMouseDown),ut.removeEventListener("mouseup",t.value.onClickOutsideElement),ut.removeEventListener("scroll",t.value.onScroll)}}; /*! * Matomo - free/libre analytics platform * @@ -133,7 +133,7 @@ function pt(){return{restrict:"A",link:function(e,t,n){var r={instance:null,valu * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function ft(e,t){t.arg&&setTimeout((function(){e.focus(),t.value.afterFocus&&t.value.afterFocus()}),5)}pt.$inject=[],angular.module("piwikApp.directive").directive("piwikFocusAnywhereButHere",pt);var mt={mounted:function(e,t){ft(e,t)},updated:function(e,t){ft(e,t)}}; +function ft(e,t){t.arg&&setTimeout((function(){e.focus(),t.value.afterFocus&&t.value.afterFocus()}),5)}window.angular.module("piwikApp.directive").directive("piwikFocusAnywhereButHere",pt);var mt={mounted:function(e,t){ft(e,t)},updated:function(e,t){ft(e,t)}}; /*! * Matomo - free/libre analytics platform * @@ -146,13 +146,13 @@ function ft(e,t){t.arg&&setTimeout((function(){e.focus(),t.value.afterFocus&&t.v * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function gt(e,t){return e instanceof HTMLElement?e:t.instance.$refs[e]}angular.module("piwikApp.directive").directive("piwikFocusIf",ht);var vt={getRef:gt}; +function gt(e,t){var n;return e instanceof HTMLElement?e:null===(n=t.instance)||void 0===n?void 0:n.$refs[e]}window.angular.module("piwikApp.directive").directive("piwikFocusIf",ht);var vt={getRef: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 bt(e){e.classList.toggle("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&S.helper.setMarginLeftToBeInViewport(t)}function yt(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 Ot(e){e.value.hasScrolled=!0}function wt(e){e.value.isMouseDown=!0,e.value.hasScrolled=!1}function jt(e,t,n){27===n.which&&(t.value.isMouseDown=!1,t.value.hasScrolled=!1,e.classList.remove("expanded"))}var kt=document.documentElement,St={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onExpand=bt.bind(null,e),t.value.onEscapeHandler=jt.bind(null,e,t),t.value.onMouseDown=wt.bind(null,t),t.value.onClickOutsideElement=yt.bind(null,e,t),t.value.onScroll=Ot.bind(null,t),setTimeout((function(){var e=vt.getRef(t.value.expander,t);e.addEventListener("click",t.value.onExpand)})),kt.addEventListener("keyup",t.value.onEscapeHandler),kt.addEventListener("mousedown",t.value.onMouseDown),kt.addEventListener("mouseup",t.value.onClickOutsideElement),kt.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){var n=vt.getRef(t.value.expander,t);n.removeEventListener("click",t.value.onExpand),kt.removeEventListener("keyup",t.value.onEscapeHandler),kt.removeEventListener("mousedown",t.value.onMouseDown),kt.removeEventListener("mouseup",t.value.onClickOutsideElement),kt.removeEventListener("scroll",t.value.onScroll)}}; + */function bt(e){e.classList.toggle("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&S.helper.setMarginLeftToBeInViewport(t)}function yt(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 Ot(e){e.value.hasScrolled=!0}function wt(e){e.value.isMouseDown=!0,e.value.hasScrolled=!1}function jt(e,t,n){27===n.which&&(t.value.isMouseDown=!1,t.value.hasScrolled=!1,e.classList.remove("expanded"))}var kt=document.documentElement,St={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onExpand=bt.bind(null,e),t.value.onEscapeHandler=jt.bind(null,e,t),t.value.onMouseDown=wt.bind(null,t),t.value.onClickOutsideElement=yt.bind(null,e,t),t.value.onScroll=Ot.bind(null,t),setTimeout((function(){var e=vt.getRef(t.value.expander,t);e&&e.addEventListener("click",t.value.onExpand)})),kt.addEventListener("keyup",t.value.onEscapeHandler),kt.addEventListener("mousedown",t.value.onMouseDown),kt.addEventListener("mouseup",t.value.onClickOutsideElement),kt.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){var n=vt.getRef(t.value.expander,t);n&&n.removeEventListener("click",t.value.onExpand),kt.removeEventListener("keyup",t.value.onEscapeHandler),kt.removeEventListener("mousedown",t.value.onMouseDown),kt.removeEventListener("mouseup",t.value.onClickOutsideElement),kt.removeEventListener("scroll",t.value.onScroll)}}; /*! * Matomo - free/libre analytics platform * @@ -166,35 +166,35 @@ function Ct(){return{restrict:"A",link:function(e,t){var n={instance:null,value: * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Pt(e){e.classList.add("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&S.helper.setMarginLeftToBeInViewport(t)}function Dt(e){e.classList.remove("expanded")}function Et(e,t){e.contains(t.target)||e.classList.remove("expanded")}function Vt(e,t){27===t.which&&e.classList.remove("expanded")}Ct.$inject=[],angular.module("piwikApp").directive("piwikExpandOnClick",Ct);var Nt=document.documentElement,Tt={mounted:function(e,t){t.value.onMouseEnter=Pt.bind(null,e),t.value.onMouseLeave=Dt.bind(null,e),t.value.onClickOutsideElement=Et.bind(null,e),t.value.onEscapeHandler=Vt.bind(null,e),setTimeout((function(){var e=vt.getRef(t.value.expander,t);e.addEventListener("mouseenter",t.value.onMouseEnter)})),e.addEventListener("mouseleave",t.value.onMouseLeave),Nt.addEventListener("keyup",t.value.onEscapeHandler),Nt.addEventListener("mouseup",t.value.onClickOutsideElement)},unmounted:function(e,t){var n=vt.getRef(t.value.expander,t);n.removeEventListener("mouseenter",t.value.onMouseEnter),e.removeEventListener("mouseleave",t.value.onMouseLeave),document.removeEventListener("keyup",t.value.onEscapeHandler),document.removeEventListener("mouseup",t.value.onClickOutsideElement)}}; +function Pt(e){e.classList.add("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&S.helper.setMarginLeftToBeInViewport(t)}function Dt(e){e.classList.remove("expanded")}function Et(e,t){e.contains(t.target)||e.classList.remove("expanded")}function Vt(e,t){27===t.which&&e.classList.remove("expanded")}window.angular.module("piwikApp").directive("piwikExpandOnClick",Ct);var Nt=document.documentElement,Tt={mounted:function(e,t){t.value.onMouseEnter=Pt.bind(null,e),t.value.onMouseLeave=Dt.bind(null,e),t.value.onClickOutsideElement=Et.bind(null,e),t.value.onEscapeHandler=Vt.bind(null,e),setTimeout((function(){var e=vt.getRef(t.value.expander,t);e&&e.addEventListener("mouseenter",t.value.onMouseEnter)})),e.addEventListener("mouseleave",t.value.onMouseLeave),Nt.addEventListener("keyup",t.value.onEscapeHandler),Nt.addEventListener("mouseup",t.value.onClickOutsideElement)},unmounted:function(e,t){var n=vt.getRef(t.value.expander,t);n&&n.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 At(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};Tt.mounted(t[0],n),t.on("$destroy",(function(){return Tt.unmounted(t[0],n)}))}}}At.$inject=[],angular.module("piwikApp").directive("piwikExpandOnHover",At); +function At(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};Tt.mounted(t[0],n),t.on("$destroy",(function(){return Tt.unmounted(t[0],n)}))}}}window.angular.module("piwikApp").directive("piwikExpandOnHover",At); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -var It=window,xt=It.$,Bt={mounted:function(e,t){var n=xt(e),r=t.value.sensitiveData,o=t.value.showCharacters||6,i=t.value.clickElementSelector||n,a="";function c(){n.html(r),xt(i).css({cursor:""}),xt(i).tooltip("destroy")}o>0&&(a+=r.substr(0,o)),a+=r.substr(o).replace(/./g,"*"),n.html(a),xt(i).tooltip({content:C("CoreHome_ClickToSeeFullInformation"),items:"*",track:!0}),xt(i).one("click",c),xt(i).css({cursor:"pointer"})}}; +var xt=window,It=xt.$,Bt={mounted:function(e,t){var n=It(e),r=t.value.sensitiveData,i=t.value.showCharacters||6,o=t.value.clickElementSelector||n,a="";function c(){n.html(r),It(o).css({cursor:""}),It(o).tooltip("destroy")}i>0&&(a+=r.substr(0,i)),a+=r.substr(i).replace(/./g,"*"),n.html(a),It(o).tooltip({content:C("CoreHome_ClickToSeeFullInformation"),items:"*",track:!0}),It(o).one("click",c),It(o).css({cursor:"pointer"})}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Mt(){return{restrict:"A",link:function(e,t,n){var r={instance:null,value:{sensitiveData:n.piwikShowSensitiveData||(n.text?n.text():""),showCharacters:n.showCharacters?parseInt(n.showCharacters,10):void 0,clickElementSelector:n.clickElementSelector},oldValue:null,modifiers:{},dir:{}};Bt.mounted(t[0],r)}}}Mt.$inject=[],angular.module("piwikApp").directive("piwikShowSensitiveData",Mt); +function Lt(){return{restrict:"A",link:function(e,t,n){var r={instance:null,value:{sensitiveData:n.piwikShowSensitiveData||(n.text?n.text():""),showCharacters:n.showCharacters?parseInt(n.showCharacters,10):void 0,clickElementSelector:n.clickElementSelector},oldValue:null,modifiers:{},dir:{}};Bt.mounted(t[0],r)}}}window.angular.module("piwikApp").directive("piwikShowSensitiveData",Lt); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -var Lt=window,Ft=Lt.$,Rt={mounted:function(e){var t=Ft(e);!t.attr("data-target")&&t.attr("data-activates")&&t.attr("data-target",t.attr("data-activates"));var n=t.attr("data-target");n&&Ft("#".concat(n)).length&&Ft(t).dropdown({inDuration:300,outDuration:225,constrainWidth:!1,belowOrigin:!0})}}; +var Mt=window,Ft=Mt.$,Rt={mounted:function(e){var t=Ft(e);!t.attr("data-target")&&t.attr("data-activates")&&t.attr("data-target",t.attr("data-activates"));var n=t.attr("data-target");n&&Ft("#".concat(n)).length&&t.dropdown({inDuration:300,outDuration:225,constrainWidth:!1,belowOrigin:!0})}}; /*! * Matomo - free/libre analytics platform * @@ -208,154 +208,154 @@ function _t(){return{restrict:"C",link:function(e,t){Rt.mounted(t[0])}}} * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function $t(e,t){e.value.focusedElement!==t.target&&(e.value.focusedElement=t.target,angular.element(t.target).select())}function Ht(e){var t=document.createRange();t.selectNode(e.target);var n=window.getSelection();n&&n.rangeCount>0&&n.removeAllRanges(),n&&n.addRange(t)}function Ut(e){e.value.focusedElement=null}_t.$inject=[],angular.module("piwikApp").directive("dropdownButton",_t);var Wt={mounted:function(e,t){var n=e.tagName.toLowerCase();t.value.elementSupportsSelect="textarea"===n,t.value.elementSupportsSelect?(t.value.onFocusHandler=$t.bind(null,t),t.value.onBlurHandler=Ut.bind(null,t),e.addEventListener("focus",t.value.onFocusHandler),e.addEventListener("blur",t.value.onBlurHandler)):(t.value.onClickHandler=Ht,e.addEventListener("click",t.value.onClickHandler))},unmounted:function(e,t){t.value.elementSupportsSelect?(e.removeEventListener("focus",t.value.onFocusHandler),e.removeEventListener("blur",t.value.onBlurHandler)):e.removeEventListener("click",t.value.onClickHandler)}}; +function $t(e,t){e.value.focusedElement!==t.target&&(e.value.focusedElement=t.target,window.angular.element(t.target).select())}function Ht(e){var t=document.createRange();t.selectNode(e.target);var n=window.getSelection();n&&n.rangeCount>0&&n.removeAllRanges(),n&&n.addRange(t)}function Ut(e){delete e.value.focusedElement}window.angular.module("piwikApp").directive("dropdownButton",_t);var qt={mounted:function(e,t){var n=e.tagName.toLowerCase();t.value.elementSupportsSelect="textarea"===n,t.value.elementSupportsSelect?(t.value.onFocusHandler=$t.bind(null,t),t.value.onBlurHandler=Ut.bind(null,t),e.addEventListener("focus",t.value.onFocusHandler),e.addEventListener("blur",t.value.onBlurHandler)):(t.value.onClickHandler=Ht,e.addEventListener("click",t.value.onClickHandler))},unmounted:function(e,t){t.value.elementSupportsSelect?(e.removeEventListener("focus",t.value.onFocusHandler),e.removeEventListener("blur",t.value.onBlurHandler)):e.removeEventListener("click",t.value.onClickHandler)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function qt(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{},oldValue:null,modifiers:{},dir:{}};Wt.mounted(t[0],n),t.on("$destroy",(function(){return Wt.unmounted(t[0],n)}))}}}qt.$inject=[],angular.module("piwikApp").directive("piwikSelectOnFocus",qt); + */function Wt(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{},oldValue:null,modifiers:{},dir:{}};qt.mounted(t[0],n),t.on("$destroy",(function(){return qt.unmounted(t[0],n)}))}}}window.angular.module("piwikApp").directive("piwikSelectOnFocus",Wt); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -var Jt=!1,Gt={mounted:function(e,t){t.value.activator&&setTimeout((function(){if(!Jt){Jt=!0;var n=vt.getRef(t.value.activator,t);n&&window.$(n).show();var r=n.getAttribute("data-target");window.$("#".concat(r)).sidenav({closeOnClick:!0})}e.classList.contains("collapsible")&&window.$(e).collapsible()}))}}; +var Jt=!1,Gt={mounted:function(e,t){t.value.activator&&setTimeout((function(){if(!Jt){Jt=!0;var n=vt.getRef(t.value.activator,t);if(n){window.$(n).show();var r=n.getAttribute("data-target");window.$("#".concat(r)).sidenav({closeOnClick:!0})}}e.classList.contains("collapsible")&&window.$(e).collapsible()}))}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function zt(e){return{restrict:"A",priority:10,link:function(t,n,r){var o={instance:null,value:{activator:$(r.piwikSideNav)[0]},oldValue:null,modifiers:{},dir:{}};e((function(){Gt.mounted(n[0],o)}))}}}zt.$inject=["$timeout"],angular.module("piwikApp.directive").directive("piwikSideNav",zt);var Yt={ref:"root"};function Qt(e,t,n,r,o,a){return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Yt,[Object(i["renderSlot"])(e.$slots,"default")],512)),[[i["vShow"],e.modelValue]])}var Kt=Object(i["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},element:{type:HTMLElement,required:!1}},emits:["yes","no","closeEnd","close","validation","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;S.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")}}});Kt.render=Qt;var Xt=Kt; +function zt(e){return{restrict:"A",priority:10,link:function(t,n,r){var i={instance:null,value:{activator:$(r.piwikSideNav)[0]},oldValue:null,modifiers:{},dir:{}};e((function(){Gt.mounted(n[0],i)}))}}}zt.$inject=["$timeout"],window.angular.module("piwikApp.directive").directive("piwikSideNav",zt);var Yt={ref:"root"};function Qt(e,t,n,r,i,a){return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Yt,[Object(o["renderSlot"])(e.$slots,"default")],512)),[[o["vShow"],e.modelValue]])}var Kt=Object(o["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},element:{type:HTMLElement,required:!1}},emits:["yes","no","closeEnd","close","validation","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;S.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")}}});Kt.render=Qt;var Xt=Kt; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Zt(){var e=i["createApp"].apply(void 0,arguments);return e.config.globalProperties.$sanitize=window.vueSanitize,e.config.globalProperties.translate=C,e}function en(e,t){return an(e)||on(e,t)||nn(e,t)||tn()}function tn(){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 nn(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 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 on(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){c=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw o}}return i}}function an(e){if(Array.isArray(e))return e}function cn(e){return cn="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cn(e)} + */function Zt(){var e=o["createApp"].apply(void 0,arguments);return e.config.globalProperties.$sanitize=window.vueSanitize,e.config.globalProperties.translate=C,e}function en(e,t){return an(e)||on(e,t)||nn(e,t)||tn()}function tn(){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 nn(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 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 on(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(o.push(r.value),t&&o.length===t)break}catch(l){c=!0,i=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}return o}}function an(e){if(Array.isArray(e))return e}function cn(e){return cn="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cn(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 ln=0;function sn(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())}))}function un(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))}function dn(e){return"object"===cn(e)&&null!==e&&Object.getPrototypeOf(e)===Object.prototype?Object.fromEntries(Object.entries(e).filter((function(e){return!/^\$/.test(e[0])}))):e}function pn(e){var t=e.component,n=e.require,r=e.scope,o=void 0===r?{}:r,a=e.events,c=void 0===a?{}:a,l=e.$inject,s=e.directiveName,u=e.transclude,d=e.mountPointFactory,p=e.postCreate,f=e.noScope,m=e.restrict,h=void 0===m?"A":m,g=e.priority,v=e.replace,b=ln;u&&(ln+=1);var y={},O={};function w(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];var l={restrict:h,require:n,priority:g,scope:f?void 0:O,compile:function(){return{post:function(e,n,a,l){var s=u?n.find("[ng-transclude][counter=".concat(b,"]")):null,f="<root-component";Object.entries(c).forEach((function(e){var t=en(e,1),n=t[0];f+=" @".concat(sn(n),"=\"onEventHandler('").concat(n,"', $event)\"")})),Object.entries(o).forEach((function(e){var t=en(e,2),n=t[1];if("&"===n.angularJsBind||"&?"===n.angularJsBind){var r=sn(n.vue);c[r]||(f+=" @".concat(r,"=\"onEventHandler('").concat(r,"', $event)\""))}else f+=" :".concat(sn(n.vue),'="').concat(n.vue,'"')})),f+=">",u&&(f+='<div ref="transcludeTarget"/>'),f+="</root-component>";var m=Zt({template:f,data:function(){var t=this,i={};return Object.entries(o).forEach((function(o){var c=en(o,2),s=c[0],u=c[1],d=dn(e[s]);"undefined"===typeof d&&"undefined"!==typeof u.default&&(d=u.default instanceof Function?u.default.apply(u,[e,n,a].concat(r)):u.default),u.transform&&(d=u.transform.apply(u,[d,t,e,n,a,l].concat(r))),i[u.vue]=d})),i},setup:function(){if(u){var e=Object(i["ref"])(null);return{transcludeTarget:e}}},methods:{onEventHandler:function(t,o){var i=un(y[t]||t);e[i]&&e[i](o),c[t]&&c[t].apply(c,[o,this,e,n,a,l].concat(r))}}});m.component("root-component",t);var h=d?d.apply(void 0,[e,n,a].concat(r)):n[0],g=m.mount(h);Object.entries(o).forEach((function(t){var o=en(t,2),i=o[0],c=o[1];c.angularJsBind&&"&"!==c.angularJsBind&&"&?"!==c.angularJsBind&&e.$watch(i,(function(t){var o=dn(t);"undefined"!==typeof c.default&&"undefined"===typeof t&&(o=c.default instanceof Function?c.default.apply(c,[e,n,a].concat(r)):c.default),c.transform&&(o=c.transform.apply(c,[o,g,e,n,a,l].concat(r))),g[c.vue]=o}))})),u&&$(g.transcludeTarget).append(s),p&&p.apply(void 0,[g,e,n,a,l].concat(r)),v&&(Array.from(n[0].attributes).forEach((function(e){o[e.nodeName]||h.firstElementChild.setAttribute(e.nodeName,e.nodeValue)})),n.replaceWith(window.$(h).children())),n.on("$destroy",(function(){m.unmount()}))}}}};return u&&(l.transclude=!0,l.template='<div ng-transclude counter="'.concat(b,'"/>')),l}return Object.entries(o).forEach((function(e){var t=en(e,2),n=t[0],r=t[1];r.vue||(r.vue=n),r.angularJsBind&&(O[n]=r.angularJsBind),y[r.vue]=n})),w.$inject=l||[],angular.module("piwikApp").directive(s,w),w}function fn(e){if("undefined"!==typeof e)return"true"===e||!!e&&e>0&&"0"!==e}function mn(e){if("undefined"!==typeof e)return null===e?null:parseInt(e,10)}function hn(e){return"undefined"===typeof e?e:JSON.parse(JSON.stringify(e))}function gn(e){var t=hn(e);return S.helper.getAngularDependency("$rootScope").$applyAsync(),t} + */var ln=0;function sn(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())}))}function un(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))}function dn(e){return"object"===cn(e)&&null!==e&&Object.getPrototypeOf(e)===Object.prototype?Object.fromEntries(Object.entries(e).filter((function(e){return!/^\$/.test(e[0])}))):e}function pn(e){var t=e.component,n=e.require,r=e.scope,i=void 0===r?{}:r,a=e.events,c=void 0===a?{}:a,l=e.$inject,s=e.directiveName,u=e.transclude,d=e.mountPointFactory,p=e.postCreate,f=e.noScope,m=e.restrict,h=void 0===m?"A":m,g=e.priority,v=e.replace,b=ln;u&&(ln+=1);var y={},O={};function w(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];var l={restrict:h,require:n,priority:g,scope:f?void 0:O,compile:function(){return{post:function(e,n,a,l){var s=u?n.find("[ng-transclude][counter=".concat(b,"]")):null,f="<root-component";Object.entries(c).forEach((function(e){var t=en(e,1),n=t[0];f+=" @".concat(sn(n),"=\"onEventHandler('").concat(n,"', $event)\"")})),Object.entries(i).forEach((function(e){var t=en(e,2),n=t[1];if("&"===n.angularJsBind||"&?"===n.angularJsBind){var r=sn(n.vue);c[r]||(f+=" @".concat(r,"=\"onEventHandler('").concat(r,"', $event)\""))}else f+=" :".concat(sn(n.vue),'="').concat(n.vue,'"')})),f+=">",u&&(f+='<div ref="transcludeTarget"/>'),f+="</root-component>";var m=Zt({template:f,data:function(){var t=this,o={};return Object.entries(i).forEach((function(i){var c=en(i,2),s=c[0],u=c[1],d=dn(e[s]);"undefined"===typeof d&&"undefined"!==typeof u.default&&(d=u.default instanceof Function?u.default.apply(u,[e,n,a].concat(r)):u.default),u.transform&&(d=u.transform.apply(u,[d,t,e,n,a,l].concat(r))),o[u.vue]=d})),o},setup:function(){if(u){var e=Object(o["ref"])(null);return{transcludeTarget:e}}},methods:{onEventHandler:function(t,i){var o=un(y[t]||t);e[o]&&e[o](i),c[t]&&c[t].apply(c,[i,this,e,n,a,l].concat(r))}}});m.component("root-component",t);var h=d?d.apply(void 0,[e,n,a].concat(r)):n[0],g=m.mount(h);Object.entries(i).forEach((function(t){var i=en(t,2),o=i[0],c=i[1];c.angularJsBind&&"&"!==c.angularJsBind&&"&?"!==c.angularJsBind&&e.$watch(o,(function(t){var i=dn(t);"undefined"!==typeof c.default&&"undefined"===typeof t&&(i=c.default instanceof Function?c.default.apply(c,[e,n,a].concat(r)):c.default),c.transform&&(i=c.transform.apply(c,[i,g,e,n,a,l].concat(r))),g[c.vue]=i}))})),u&&s&&$(g.transcludeTarget).append(s),p&&p.apply(void 0,[g,e,n,a,l].concat(r)),v&&(Array.from(n[0].attributes).forEach((function(e){i[e.nodeName]||h.firstElementChild&&h.firstElementChild.setAttribute(e.nodeName,e.nodeValue)})),n.replaceWith(window.$(h).children())),n.on("$destroy",(function(){m.unmount()}))}}}};return u&&(l.transclude=!0,l.template='<div ng-transclude counter="'.concat(b,'"/>')),l}return Object.entries(i).forEach((function(e){var t=en(e,2),n=t[0],r=t[1];r.vue||(r.vue=n),r.angularJsBind&&(O[n]=r.angularJsBind),y[r.vue]=n})),w.$inject=l||[],window.angular.module("piwikApp").directive(s,w),w}function fn(e){if("undefined"!==typeof e)return"true"===e||!!e&&e>0&&"0"!==e}function mn(e){if("undefined"!==typeof e)return null===e?null:parseInt(e,10)}function hn(e){return"undefined"===typeof e?e:JSON.parse(JSON.stringify(e))}function gn(e){var t=hn(e);return S.helper.getAngularDependency("$rootScope").$applyAsync(),t} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */pn({component:Xt,scope:{show:{vue:"modelValue",default:!1},element:{default:function(e,t){return t[0]}}},events:{yes:function(e,t,n,r,o){o.yes&&(n.$eval(o.yes),setTimeout((function(){n.$apply()}),0))},no:function(e,t,n,r,o){o.no&&(n.$eval(o.no),setTimeout((function(){n.$apply()}),0))},validation:function(e,t,n,r,o){o.no&&(n.$eval(o.no),setTimeout((function(){n.$apply()}),0))},close:function(e,t,n,r,o){o.close&&(n.$eval(o.close),setTimeout((function(){n.$apply()}),0))},"update:modelValue":function(e,t,n,r,o,i,a){setTimeout((function(){n.$apply(a(o.piwikDialog).assign(n,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 vn={key:0,class:"title",tabindex:"6"},bn=["href","title"],yn={class:"iconsBar"},On=["href","title"],wn=Object(i["createElementVNode"])("span",{class:"icon-help"},null,-1),jn=[wn],kn=["title"],Sn=Object(i["createElementVNode"])("span",{class:"icon-info"},null,-1),Cn=[Sn],Pn={class:"ratingIcons"},Dn={class:"inlineHelp"},En=["innerHTML"],Vn=["innerHTML"],Nn=["href"];function Tn(e,t,n,r,o,a){var c=Object(i["resolveComponent"])("RateFeature");return Object(i["openBlock"])(),Object(i["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(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",vn,[Object(i["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.$sanitize(e.actualFeatureName))},[Object(i["renderSlot"])(e.$slots,"default")],8,bn)):Object(i["createCommentVNode"])("",!0),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",yn,[e.helpUrl&&!e.actualInlineHelp?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},jn,8,On)):Object(i["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=function(t){return e.showInlineHelp=!e.showInlineHelp}),class:Object(i["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},Cn,10,kn)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",Pn,[Object(i["createVNode"])(c,{title:e.actualFeatureName},null,8,["title"])])],512),[[i["vShow"],e.showIcons||e.showInlineHelp]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Dn,[Object(i["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,En),Object(i["createElementVNode"])("span",{class:"helpDate",innerHTML:e.reportGenerated},null,8,Vn),e.helpUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(i["toDisplayString"])(e.translate("General_MoreDetails")),9,Nn)):Object(i["createCommentVNode"])("",!0)],512),[[i["vShow"],e.showInlineHelp]])],544)} + */pn({component:Xt,scope:{show:{vue:"modelValue",default:!1},element:{default:function(e,t){return t[0]}}},events:{yes:function(e,t,n,r,i){i.yes&&(n.$eval(i.yes),setTimeout((function(){n.$apply()}),0))},no:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},validation:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},close:function(e,t,n,r,i){i.close&&(n.$eval(i.close),setTimeout((function(){n.$apply()}),0))},"update:modelValue":function(e,t,n,r,i,o,a){setTimeout((function(){n.$apply(a(i.piwikDialog).assign(n,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 vn={key:0,class:"title",tabindex:"6"},bn=["href","title"],yn={class:"iconsBar"},On=["href","title"],wn=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),jn=[wn],kn=["title"],Sn=Object(o["createElementVNode"])("span",{class:"icon-info"},null,-1),Cn=[Sn],Pn={class:"ratingIcons"},Dn={class:"inlineHelp"},En=["innerHTML"],Vn=["innerHTML"],Nn=["href"];function Tn(e,t,n,r,i,a){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",vn,[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,bn)):Object(o["createCommentVNode"])("",!0),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",yn,[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")},jn,8,On)):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")},Cn,10,kn)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Pn,[Object(o["createVNode"])(c,{title:e.actualFeatureName},null,8,["title"])])],512),[[o["vShow"],e.showIcons||e.showInlineHelp]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",Dn,[Object(o["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,En),Object(o["createElementVNode"])("span",{class:"helpDate",innerHTML:e.reportGenerated},null,8,Vn),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,Nn)):Object(o["createCommentVNode"])("",!0)],512),[[o["vShow"],e.showInlineHelp]])],544)} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function An(e,t){return Object(i["defineAsyncComponent"])((function(){return new Promise((function(n){window.$(document).ready((function(){window[e]?n(window[e][t]):n(null)}))}))}))}var In=An("Feedback","RateFeature"),xn=Object(i["defineComponent"])({props:{helpUrl:{type:String,default:""},editUrl:{type:String,default:""},reportGenerated:String,featureName:String,inlineHelp:String},components:{RateFeature:In},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,r=t.querySelector(".title .inlineHelp");if(!r&&null!==(n=t.parentElement)&&void 0!==n&&n.nextElementSibling&&(r=t.parentElement.nextElementSibling.querySelector(".reportDocumentation")),r){var o=r.getAttribute("data-content").trim();o.length&&(e.actualInlineHelp="<p>".concat(o,"</p>"),setTimeout((function(){return r.remove()}),0))}}e.actualFeatureName||(e.actualFeatureName=t.querySelector(".title").textContent),e.reportGenerated&&p.parse(S.period,S.currentDateString).containsToday()&&window.$(t.querySelector(".report-generated")).tooltip({track:!0,content:e.reportGenerated,items:"div",show:!1,hide:!1})}))}});xn.render=Tn;var Bn=xn,Mn=(pn({component:Bn,scope:{helpUrl:{angularJsBind:"@"},editUrl:{angularJsBind:"@"},reportGenerated:{angularJsBind:"@?"},featureName:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@?"}},directiveName:"piwikEnrichedHeadline",transclude:!0}),{class:"card",ref:"root"}),Ln={class:"card-content"},Fn={key:0,class:"card-title"},Rn={key:1,class:"card-title"},_n={ref:"content"}; + */function An(e,t){return Object(o["defineAsyncComponent"])((function(){return new Promise((function(n){window.$(document).ready((function(){window[e]?n(window[e][t]):n(null)}))}))}))}var xn=An("Feedback","RateFeature"),In=Object(o["defineComponent"])({props:{helpUrl:{type:String,default:""},editUrl:{type:String,default:""},reportGenerated:String,featureName:String,inlineHelp:String},components:{RateFeature:xn},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,r=t.querySelector(".title .inlineHelp");if(!r&&null!==(n=t.parentElement)&&void 0!==n&&n.nextElementSibling&&(r=t.parentElement.nextElementSibling.querySelector(".reportDocumentation")),r){var i,o=null===(i=r.getAttribute("data-content"))||void 0===i?void 0:i.trim();o&&o.length&&(e.actualInlineHelp="<p>".concat(o,"</p>"),setTimeout((function(){return r.remove()}),0))}}var a;e.actualFeatureName||(e.actualFeatureName=null===(a=t.querySelector(".title"))||void 0===a?void 0:a.textContent);if(S.period&&S.currentDateString){var c=p.parse(S.period,S.currentDateString);e.reportGenerated&&c.containsToday()&&window.$(t.querySelector(".report-generated")).tooltip({track:!0,content:e.reportGenerated,items:"div",show:!1,hide:!1})}}))}});In.render=Tn;var Bn=In,Ln=(pn({component:Bn,scope:{helpUrl:{angularJsBind:"@"},editUrl:{angularJsBind:"@"},reportGenerated:{angularJsBind:"@?"},featureName:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@?"}},directiveName:"piwikEnrichedHeadline",transclude:!0}),{class:"card",ref:"root"}),Mn={class:"card-content"},Fn={key:0,class:"card-title"},Rn={key:1,class:"card-title"},_n={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 - */function $n(e,t,n,r,o,a){var c=Object(i["resolveComponent"])("EnrichedHeadline");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Mn,[Object(i["createElementVNode"])("div",Ln,[!e.contentTitle||e.actualFeature||e.helpUrl||e.actualHelpText?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("h2",Fn,Object(i["toDisplayString"])(e.contentTitle),1)),e.contentTitle&&(e.actualFeature||e.helpUrl||e.actualHelpText)?(Object(i["openBlock"])(),Object(i["createElementBlock"])("h2",Rn,[Object(i["createVNode"])(c,{"feature-name":e.actualFeature,"help-url":e.helpUrl,"inline-help":e.actualHelpText},{default:Object(i["withCtx"])((function(){return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.contentTitle),1)]})),_:1},8,["feature-name","help-url","inline-help"])])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",_n,[Object(i["renderSlot"])(e.$slots,"default")],512)])],512)}var Hn=null,Un=Object(i["defineComponent"])({props:{contentTitle:String,feature:String,helpUrl:String,helpText:String,anchor:String},components:{EnrichedHeadline:Bn},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,o=n.content;if(this.anchor){var i=document.createElement("a");i.id=this.anchor,r.parentElement.prepend(i)}if(setTimeout((function(){var e=o.querySelector(".contentHelp");e&&(t.actualHelpText=e.innerHTML,e.remove())}),0),!this.actualFeature||!0!==this.actualFeature&&"true"!==this.actualFeature||(this.actualFeature=this.contentTitle),null===Hn&&(Hn=document.querySelector("#content.admin")),Hn&&(e=Hn.offsetTop),e||0===e){var a=r.closest("[piwik-widget-loader]"),c=a?a.offsetTop:r.offsetTop;c-e<17&&(r.style.marginTop=0)}}});Un.render=$n;var Wn=Un; + */function $n(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("EnrichedHeadline");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ln,[Object(o["createElementVNode"])("div",Mn,[!e.contentTitle||e.actualFeature||e.helpUrl||e.actualHelpText?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",Fn,Object(o["toDisplayString"])(e.contentTitle),1)),e.contentTitle&&(e.actualFeature||e.helpUrl||e.actualHelpText)?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",Rn,[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",_n,[Object(o["renderSlot"])(e.$slots,"default")],512)])],512)}var Hn=null,Un=Object(o["defineComponent"])({props:{contentTitle:String,feature:String,helpUrl:String,helpText:String,anchor:String},components:{EnrichedHeadline:Bn},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=this,t=this.$refs.root,n=this.$refs.content;if(this.anchor&&t&&t.parentElement){var r=document.createElement("a");r.id=this.anchor,t.parentElement.prepend(r)}setTimeout((function(){var t=n.querySelector(".contentHelp");t&&(e.actualHelpText=t.innerHTML,t.remove())}),0),this.actualFeature&&"true"===this.actualFeature&&(this.actualFeature=this.contentTitle),null===Hn&&(Hn=document.querySelector("#content.admin"));var i=null;if(Hn&&(i=Hn.offsetTop),i||0===i){var o=t.closest("[piwik-widget-loader]"),a=o?o.offsetTop:t.offsetTop;a-i<17&&(t.style.marginTop="0")}}});Un.render=$n;var qn=Un; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */pn({component:Wn,scope:{contentTitle:{angularJsBind:"@"},feature:{angularJsBind:"@"},helpUrl:{angularJsBind:"@"},helpText:{angularJsBind:"@"},anchor:{angularJsBind:"@?"}},directiveName:"piwikContentBlock",transclude:!0});function qn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jn(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 Gn(e,t,n){return t&&Jn(e.prototype,t),n&&Jn(e,n),e}function zn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */pn({component:qn,scope:{contentTitle:{angularJsBind:"@"},feature:{angularJsBind:"@"},helpUrl:{angularJsBind:"@"},helpText:{angularJsBind:"@"},anchor:{angularJsBind:"@?"}},directiveName:"piwikContentBlock",transclude:!0});function Wn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jn(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 Gn(e,t,n){return t&&Jn(e.prototype,t),n&&Jn(e,n),e}function zn(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 Yn=function(){function e(){var t=this;qn(this,e),zn(this,"segmentState",Object(i["reactive"])({availableSegments:[]})),S.on("piwikSegmentationInited",(function(){return t.setSegmentState()}))}return Gn(e,[{key:"state",get:function(){return Object(i["readonly"])(this.segmentState)}},{key:"setSegmentState",value:function(){try{var e=$(".segmentEditorPanel").data("uiControlObject");this.segmentState.availableSegments=e.impl.availableSegments||[]}catch(t){}}}]),e}(),Qn=new Yn;function Kn(e){return tr(e)||er(e)||Zn(e)||Xn()}function Xn(){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 Zn(e,t){if(e){if("string"===typeof e)return nr(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)?nr(e,t):void 0}}function er(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function tr(e){if(Array.isArray(e))return nr(e)}function nr(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 rr(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 or(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rr(Object(n),!0).forEach((function(t){lr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ir(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ar(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 cr(e,t,n){return t&&ar(e.prototype,t),n&&ar(e,n),e}function lr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */var Yn=function(){function e(){var t=this;Wn(this,e),zn(this,"segmentState",Object(o["reactive"])({availableSegments:[]})),S.on("piwikSegmentationInited",(function(){return t.setSegmentState()}))}return Gn(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}(),Qn=new Yn;function Kn(e){return tr(e)||er(e)||Zn(e)||Xn()}function Xn(){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 Zn(e,t){if(e){if("string"===typeof e)return nr(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)?nr(e,t):void 0}}function er(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function tr(e){if(Array.isArray(e))return nr(e)}function nr(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 rr(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 ir(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rr(Object(n),!0).forEach((function(t){lr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function or(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ar(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 cr(e,t,n){return t&&ar(e.prototype,t),n&&ar(e,n),e}function lr(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 sr=8,ur=3;function dr(e){return e?Array.isArray(e)?e:[e]:[]}var pr=function(){function e(){var t=this;ir(this,e),lr(this,"privateState",Object(i["reactive"])({comparisonsDisabledFor:[]})),lr(this,"state",Object(i["readonly"])(this.privateState)),lr(this,"colors",{}),lr(this,"segmentComparisons",Object(i["computed"])((function(){return t.parseSegmentComparisons()}))),lr(this,"periodComparisons",Object(i["computed"])((function(){return t.parsePeriodComparisons()}))),lr(this,"isEnabled",Object(i["computed"])((function(){return t.checkEnabledForCurrentPage()}))),this.loadComparisonsDisabledFor(),$((function(){t.colors=t.getAllSeriesColors()})),Object(i["watch"])((function(){return t.getComparisons()}),(function(){return S.postEvent("piwikComparisonsChanged")}),{deep:!0})}return cr(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)%sr;if(0===n)return this.colors["series".concat(r)];var o=n%ur;return this.colors["series".concat(r,"-shade").concat(o)]}},{key:"getSeriesColorName",value:function(e,t){var n="series".concat(e%sr);return t>0&&(n+="-shade".concat(t%ur)),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(o){t.push({index:n,params:or(or({},o.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=Kn(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={},o={},i=!1,a=!1;e.forEach((function(e){i?r[e.params.segment]=!0:i=!0})),t.forEach((function(e){a?o["".concat(e.params.period,"|").concat(e.params.date)]=!0:a=!0}));var c=[],l=[];Object.keys(o).forEach((function(e){var t=e.split("|");c.push(t[0]),l.push(t[1])}));var s={compareSegments:Object.keys(r),comparePeriods:c,compareDates:l},u=S.helper.isAngularRenderingThePage()?De.hashParsed.value:De.urlParsed.value;De.updateLocation(or(or(or({},u),s),n))}},{key:"getAllSeriesColors",value:function(){var e=S.ColorManager;if(!e)return[];for(var t=[],n=0;n<sr;n+=1){t.push("series".concat(n));for(var r=0;r<ur;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=De.parsed.value.module;window.piwik.installation?this.privateState.comparisonsDisabledFor=[]:"CoreUpdater"!==t&&"Installation"!==t?Qe.fetch({module:"API",method:"API.getPagesComparisonsDisabledFor"}).then((function(t){e.privateState.comparisonsDisabledFor=t})):this.privateState.comparisonsDisabledFor=[]}},{key:"parseSegmentComparisons",value:function(){var e=Qn.state.availableSegments,t=Kn(dr(De.parsed.value.compareSegments));t.unshift(De.parsed.value.segment||"");var n=[];return t.forEach((function(t,r){var o;e.forEach((function(e){e.definition!==t&&e.definition!==decodeURIComponent(t)&&decodeURIComponent(e.definition)!==t||(o=e)}));var i=o?o.name:C("General_Unknown");""===t.trim()&&(i=C("SegmentEditor_DefaultAllVisits")),n.push({params:{segment:t},title:S.helper.htmlDecode(i),index:r})})),n}},{key:"parsePeriodComparisons",value:function(){var e=Kn(dr(De.parsed.value.comparePeriods)),t=Kn(dr(De.parsed.value.compareDates));e.unshift(De.parsed.value.period),t.unshift(De.parsed.value.date);for(var n=[],r=0;r<Math.min(t.length,e.length);r+=1){var o=void 0;try{o=p.parse(e[r],t[r]).getPrettyString()}catch(i){o=C("General_Error")}n.push({params:{date:t[r],period:e[r]},title:o,index:r})}return n}},{key:"checkEnabledForCurrentPage",value:function(){var e=De.parsed.value.category||De.parsed.value.module,t=De.parsed.value.subcategory||De.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}(),fr=new pr,mr={key:0,ref:"root",class:"matomo-comparisons"},hr={class:"comparison-type"},gr=["title"],vr=["href"],br=["title"],yr={class:"comparison-period-label"},Or=["onClick"],wr=["title"],jr={class:"loadingPiwik",style:{display:"none"}},kr=["alt"];function Sr(e,t,n,r,o,a){var c=Object(i["resolveDirective"])("tooltips");return e.isComparing?Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",mr,[Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("General_Comparisons")),1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.segmentComparisons,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"comparison card",key:t.index},[Object(i["createElementVNode"])("div",hr,Object(i["toDisplayString"])(e.translate("General_Segment")),1),Object(i["createElementVNode"])("div",{class:"title",title:t.title+"<br/>"+decodeURIComponent(t.params.segment)},[Object(i["createElementVNode"])("a",{target:"_blank",href:e.getUrlToSegment(t.params.segment)},Object(i["toDisplayString"])(t.title),9,vr)],8,gr),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.periodComparisons,(function(n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"comparison-period",key:n.index,title:e.getComparisonTooltip(t,n)},[Object(i["createElementVNode"])("span",{class:"comparison-dot",style:Object(i["normalizeStyle"])({"background-color":e.getSeriesColor(t,n)})},null,4),Object(i["createElementVNode"])("span",yr,Object(i["toDisplayString"])(n.title)+" ("+Object(i["toDisplayString"])(e.getComparisonPeriodType(n))+") ",1)],8,br)})),128)),e.segmentComparisons.length>1?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,class:"remove-button",onClick:function(t){return e.removeSegmentComparison(n)}},[Object(i["createElementVNode"])("span",{class:"icon icon-close",title:e.translate("General_ClickToRemoveComp")},null,8,wr)],8,Or)):Object(i["createCommentVNode"])("",!0)])})),128)),Object(i["createElementVNode"])("div",jr,[Object(i["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:e.translate("General_LoadingData")},null,8,kr),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_LoadingData")),1)])],512)),[[c,{duration:200,delay:200,content:e.transformTooltipContent}]]):Object(i["createCommentVNode"])("",!0)} + */var sr=8,ur=3;function dr(e){return e?Array.isArray(e)?e:[e]:[]}var pr=function(){function e(){var t=this;or(this,e),lr(this,"privateState",Object(o["reactive"])({comparisonsDisabledFor:[]})),lr(this,"state",Object(o["readonly"])(this.privateState)),lr(this,"colors",{}),lr(this,"segmentComparisons",Object(o["computed"])((function(){return t.parseSegmentComparisons()}))),lr(this,"periodComparisons",Object(o["computed"])((function(){return t.parsePeriodComparisons()}))),lr(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 S.postEvent("piwikComparisonsChanged")}),{deep:!0})}return cr(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)%sr;if(0===n)return this.colors["series".concat(r)];var i=n%ur;return this.colors["series".concat(r,"-shade").concat(i)]}},{key:"getSeriesColorName",value:function(e,t){var n="series".concat(e%sr);return t>0&&(n+="-shade".concat(t%ur)),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(i){t.push({index:n,params:ir(ir({},i.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=Kn(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={},i={},o=!1,a=!1;e.forEach((function(e){o?r[e.params.segment]=!0:o=!0})),t.forEach((function(e){a?i["".concat(e.params.period,"|").concat(e.params.date)]=!0:a=!0}));var c=[],l=[];Object.keys(i).forEach((function(e){var t=e.split("|");c.push(t[0]),l.push(t[1])}));var s={compareSegments:Object.keys(r),comparePeriods:c,compareDates:l},u=S.helper.isAngularRenderingThePage()?De.hashParsed.value:De.urlParsed.value;De.updateLocation(ir(ir(ir({},u),s),n))}},{key:"getAllSeriesColors",value:function(){var e=S.ColorManager;if(!e)return[];for(var t=[],n=0;n<sr;n+=1){t.push("series".concat(n));for(var r=0;r<ur;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=De.parsed.value.module;window.piwik.installation?this.privateState.comparisonsDisabledFor=[]:"CoreUpdater"!==t&&"Installation"!==t?Qe.fetch({module:"API",method:"API.getPagesComparisonsDisabledFor"}).then((function(t){e.privateState.comparisonsDisabledFor=t})):this.privateState.comparisonsDisabledFor=[]}},{key:"parseSegmentComparisons",value:function(){var e=Qn.state.availableSegments,t=Kn(dr(De.parsed.value.compareSegments));t.unshift(De.parsed.value.segment||"");var n=[];return t.forEach((function(t,r){var i;e.forEach((function(e){e.definition!==t&&e.definition!==decodeURIComponent(t)&&decodeURIComponent(e.definition)!==t||(i=e)}));var o=i?i.name:C("General_Unknown");""===t.trim()&&(o=C("SegmentEditor_DefaultAllVisits")),n.push({params:{segment:t},title:S.helper.htmlDecode(o),index:r})})),n}},{key:"parsePeriodComparisons",value:function(){var e=Kn(dr(De.parsed.value.comparePeriods)),t=Kn(dr(De.parsed.value.compareDates));e.unshift(De.parsed.value.period),t.unshift(De.parsed.value.date);for(var n=[],r=0;r<Math.min(t.length,e.length);r+=1){var i=void 0;try{i=p.parse(e[r],t[r]).getPrettyString()}catch(o){i=C("General_Error")}n.push({params:{date:t[r],period:e[r]},title:i,index:r})}return n}},{key:"checkEnabledForCurrentPage",value:function(){var e=De.parsed.value.category||De.parsed.value.module,t=De.parsed.value.subcategory||De.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}(),fr=new pr,mr={key:0,ref:"root",class:"matomo-comparisons"},hr={class:"comparison-type"},gr=["title"],vr=["href"],br=["title"],yr={class:"comparison-period-label"},Or=["onClick"],wr=["title"],jr={class:"loadingPiwik",style:{display:"none"}},kr=["alt"];function Sr(e,t,n,r,i,a){var c=Object(o["resolveDirective"])("tooltips");return e.isComparing?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",mr,[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",hr,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,vr)],8,gr),(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",yr,Object(o["toDisplayString"])(n.title)+" ("+Object(o["toDisplayString"])(e.getComparisonPeriodType(n))+") ",1)],8,br)})),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,wr)],8,Or)):Object(o["createCommentVNode"])("",!0)])})),128)),Object(o["createElementVNode"])("div",jr,[Object(o["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:e.translate("General_LoadingData")},null,8,kr),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_LoadingData")),1)])],512)),[[c,{duration:200,delay:200,content:e.transformTooltipContent}]]):Object(o["createCommentVNode"])("",!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 Cr(e,t){window.$(e).tooltip({track:!0,content:t.value.content,show:{delay:t.value.delay||700,duration:t.value.duration||200},hide:!1})}var Pr={mounted:function(e,t){setTimeout((function(){return Cr(e,t)}))},updated:function(e,t){setTimeout((function(){return Cr(e,t)}))},beforeUnmount:function(e){try{window.$(e).tooltip("destroy")}catch(t){}}};function Dr(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 Er(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dr(Object(n),!0).forEach((function(t){Vr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nr=Object(i["defineComponent"])({props:{},directives:{Tooltips:Pr},data:function(){return{comparisonTooltips:null}},setup:function(){var e=Object(i["computed"])((function(){return fr.isComparing()})),t=Object(i["computed"])((function(){return fr.getSegmentComparisons()})),n=Object(i["computed"])((function(){return fr.getPeriodComparisons()})),r=fr.getSeriesColor.bind(fr);function o(){var e=window.$(this).attr("title");return window.vueSanitize(e.replace(/\n/g,"<br />"))}return{isComparing:e,segmentComparisons:t,periodComparisons:n,getSeriesColor:r,transformTooltipContent:o}},methods:{comparisonHasSegment:function(e){return"undefined"!==typeof e.params.segment},removeSegmentComparison:function(e){window.$(this.$refs.root).tooltip("destroy"),fr.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=Er({},De.hashParsed.value);return delete t.comparePeriods,delete t.compareDates,delete t.compareSegments,t.segment=e,"".concat(window.location.search,"#?").concat(De.stringify(t))},onComparisonsChanged:function(){var e=this;if(this.comparisonTooltips=null,fr.isComparing()){var t=fr.getPeriodComparisons(),n=fr.getSegmentComparisons();Qe.fetch({method:"API.getProcessedReport",apiModule:"VisitsSummary",apiAction:"get",compare:"1",compareSegments:De.getSearchParam("compareSegments"),comparePeriods:De.getSearchParam("comparePeriods"),compareDates:De.getSearchParam("compareDates"),format_metrics:"1"}).then((function(r){e.comparisonTooltips={},t.forEach((function(t){e.comparisonTooltips[t.index]={},n.forEach((function(n){var o=e.generateComparisonTooltip(r,t,n);e.comparisonTooltips[t.index][n.index]=o}))}))}))}},generateComparisonTooltip:function(e,t,n){if(!e.reportData.comparisons)return"";var r=fr.getComparisonSeriesIndex(t.index,0),o=e.reportData.comparisons[r],i=fr.getComparisonSeriesIndex(t.index,n.index),a=e.reportData.comparisons[i],c=e.reportData.comparisons[n.index],l='<div class="comparison-card-tooltip">',s=(a.nb_visits/o.nb_visits*100).toFixed(2);return s="".concat(s,"%"),l+=C("General_ComparisonCardTooltip1",["'".concat(a.compareSegmentPretty,"'"),a.comparePeriodPretty,s,a.nb_visits.toString(),o.nb_visits.toString()]),t.index>0&&(l+="<br/><br/>",l+=C("General_ComparisonCardTooltip2",[a.nb_visits_change.toString(),c.compareSegmentPretty,c.comparePeriodPretty])),l+="</div>",l}},mounted:function(){var e=this;S.on("piwikComparisonsChanged",(function(){e.onComparisonsChanged()})),this.onComparisonsChanged()}});Nr.render=Sr;var Tr=Nr; + */function Cr(e,t){window.$(e).tooltip({track:!0,content:t.value.content,show:{delay:t.value.delay||700,duration:t.value.duration||200},hide:!1})}var Pr={mounted:function(e,t){setTimeout((function(){return Cr(e,t)}))},updated:function(e,t){setTimeout((function(){return Cr(e,t)}))},beforeUnmount:function(e){try{window.$(e).tooltip("destroy")}catch(t){}}};function Dr(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 Er(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dr(Object(n),!0).forEach((function(t){Vr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nr=Object(o["defineComponent"])({props:{},directives:{Tooltips:Pr},data:function(){return{comparisonTooltips:null}},setup:function(){var e=Object(o["computed"])((function(){return fr.isComparing()})),t=Object(o["computed"])((function(){return fr.getSegmentComparisons()})),n=Object(o["computed"])((function(){return fr.getPeriodComparisons()})),r=fr.getSeriesColor.bind(fr);function i(){var e=window.$(this).attr("title");return e?window.vueSanitize(e.replace(/\n/g,"<br />")):e}return{isComparing:e,segmentComparisons:t,periodComparisons:n,getSeriesColor:r,transformTooltipContent:i}},methods:{comparisonHasSegment:function(e){return"undefined"!==typeof e.params.segment},removeSegmentComparison:function(e){window.$(this.$refs.root).tooltip("destroy"),fr.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=Er({},De.hashParsed.value);return delete t.comparePeriods,delete t.compareDates,delete t.compareSegments,t.segment=e,"".concat(window.location.search,"#?").concat(De.stringify(t))},onComparisonsChanged:function(){var e=this;if(this.comparisonTooltips=null,fr.isComparing()){var t=fr.getPeriodComparisons(),n=fr.getSegmentComparisons();Qe.fetch({method:"API.getProcessedReport",apiModule:"VisitsSummary",apiAction:"get",compare:"1",compareSegments:De.getSearchParam("compareSegments"),comparePeriods:De.getSearchParam("comparePeriods"),compareDates:De.getSearchParam("compareDates"),format_metrics:"1"}).then((function(r){e.comparisonTooltips={},t.forEach((function(t){e.comparisonTooltips[t.index]={},n.forEach((function(n){var i=e.generateComparisonTooltip(r,t,n);e.comparisonTooltips[t.index][n.index]=i}))}))}))}},generateComparisonTooltip:function(e,t,n){if(!e.reportData.comparisons)return"";var r=fr.getComparisonSeriesIndex(t.index,0),i=e.reportData.comparisons[r],o=fr.getComparisonSeriesIndex(t.index,n.index),a=e.reportData.comparisons[o],c=e.reportData.comparisons[n.index],l='<div class="comparison-card-tooltip">',s=(a.nb_visits/i.nb_visits*100).toFixed(2);return s="".concat(s,"%"),l+=C("General_ComparisonCardTooltip1",["'".concat(a.compareSegmentPretty,"'"),a.comparePeriodPretty,s,a.nb_visits.toString(),i.nb_visits.toString()]),t.index>0&&(l+="<br/><br/>",l+=C("General_ComparisonCardTooltip2",[a.nb_visits_change.toString(),c.compareSegmentPretty,c.comparePeriodPretty])),l+="</div>",l}},mounted:function(){var e=this;S.on("piwikComparisonsChanged",(function(){e.onComparisonsChanged()})),this.onComparisonsChanged()}});Nr.render=Sr;var Tr=Nr; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Ar(){return fr}Ar.$inject=[],angular.module("piwikApp.service").factory("piwikComparisonsService",Ar);pn({component:Tr,directiveName:"piwikComparisons",restrict:"E"});var Ir={ref:"root",class:"menuDropdown"},xr=["title"],Br=["innerHTML"],Mr=Object(i["createElementVNode"])("span",{class:"icon-arrow-bottom"},null,-1),Lr={class:"items"},Fr={key:0,class:"search"},Rr=["placeholder"],_r=["title"],$r=["title"];function Hr(e,t,n,r,o,a){var c=Object(i["resolveDirective"])("focus-if"),l=Object(i["resolveDirective"])("focus-anywhere-but-here");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ir,[Object(i["createElementVNode"])("span",{class:"title",onClick:t[0]||(t[0]=function(t){return e.showItems=!e.showItems}),title:e.tooltip},[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(this.actualMenuTitle)},null,8,Br),Mr],8,xr),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Lr,[e.showSearch&&e.showItems?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Fr,[Object(i["withDirectives"])(Object(i["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,Rr),[[i["vModelText"],e.searchTerm],[c,{},e.showItems]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("img",{class:"search_ico",src:"plugins/Morpheus/images/search_ico.png",title:e.translate("General_Search")},null,8,_r),[[i["vShow"],!e.searchTerm]]),Object(i["withDirectives"])(Object(i["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,$r),[[i["vShow"],e.searchTerm]])])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",{onClick:t[4]||(t[4]=function(t){return e.selectItem(t)})},[Object(i["renderSlot"])(e.$slots,"default")])],512),[[i["vShow"],e.showItems]])],512)),[[l,{blur:e.lostFocus}]])}var Ur=window,Wr=Ur.$,qr=Object(i["defineComponent"])({props:{menuTitle:String,tooltip:String,showSearch:Boolean,menuTitleChangeOnClick:String},directives:{FocusAnywhereButHere:dt,FocusIf:mt},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,Wr(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();Wr(this.$refs.root).find(".item").each((function(e,n){var r=Wr(n);-1===r.text().toLowerCase().indexOf(t)?r.hide():r.show()}))}}});qr.render=Hr;var Jr=qr,Gr=(pn({component:Jr,scope:{menuTitle:{angularJsBind:"@"},tooltip:{angularJsBind:"@"},showSearch:{angularJsBind:"="},menuTitleChangeOnClick:{angularJsBind:"="}},directiveName:"piwikMenudropdown",transclude:!0,events:{"after-select":function(e,t,n){setTimeout((function(){n.$apply()}),0)}}}),{ref:"root"}); + */function Ar(){return fr}window.angular.module("piwikApp.service").factory("piwikComparisonsService",Ar);pn({component:Tr,directiveName:"piwikComparisons",restrict:"E"});var xr={ref:"root",class:"menuDropdown"},Ir=["title"],Br=["innerHTML"],Lr=Object(o["createElementVNode"])("span",{class:"icon-arrow-bottom"},null,-1),Mr={class:"items"},Fr={key:0,class:"search"},Rr=["placeholder"],_r=["title"],$r=["title"];function Hr(e,t,n,r,i,a){var c=Object(o["resolveDirective"])("focus-if"),l=Object(o["resolveDirective"])("focus-anywhere-but-here");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",xr,[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,Br),Lr],8,Ir),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",Mr,[e.showSearch&&e.showItems?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Fr,[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,Rr),[[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,_r),[[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,$r),[[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 Ur=window,qr=Ur.$,Wr=Object(o["defineComponent"])({props:{menuTitle:String,tooltip:String,showSearch:Boolean,menuTitleChangeOnClick:Boolean},directives:{FocusAnywhereButHere:dt,FocusIf:mt},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")||(this.menuTitleChangeOnClick&&(this.actualMenuTitle=(e.target.textContent||"").replace(/[\u0000-\u2666]/g,(function(e){return"&#".concat(e.charCodeAt(0),";")}))),this.showItems=!1,qr(this.$slots.default()[0].el).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();qr(this.$refs.root).find(".item").each((function(e,n){var r=qr(n);-1===r.text().toLowerCase().indexOf(t)?r.hide():r.show()}))}}});Wr.render=Hr;var Jr=Wr,Gr=(pn({component:Jr,scope:{menuTitle:{angularJsBind:"@"},tooltip:{angularJsBind:"@"},showSearch:{angularJsBind:"="},menuTitleChangeOnClick:{angularJsBind:"="}},directiveName:"piwikMenudropdown",transclude:!0,events:{"after-select":function(e,t,n){setTimeout((function(){n.$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 zr(e,t,n,r,o,a){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Gr,null,512)}function Yr(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 Qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yr(Object(n),!0).forEach((function(t){Kr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xr=1,Zr=window,eo=Zr.$,to=Object(i["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(i["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 o=r.length?r:t;o.addClass("ui-state-hover")}else t.removeClass("ui-state-hover"),r.removeClass("ui-state-hover")}function o(e,t,n){if(e.hasClass("ui-datepicker-other-month"))return a(e,t,n);var r=parseInt(e.children("a,span").text(),10);return new Date(n,t,r)}function a(e,t,n){var r,i=e.parent(),a=i.children("td");if(i.is(":first-child")){var c=i.children("td:not(.ui-datepicker-other-month)").first();return r=o(c,t,n),r.setDate(a.index(e)-a.index(c)+1),r}var l=i.children("td:not(.ui-datepicker-other-month)").last();return r=o(l,t,n),r.setDate(r.getDate()+a.index(e)-a.index(l)),r}function c(){var e=eo(n.value),t=e.find("td[data-month]"),r=parseInt(t.attr("data-month"),10),o=parseInt(t.attr("data-year"),10);return[r,o]}function l(){var e=eo(n.value),t=e.find(".ui-datepicker-calendar"),i=c(),a=t.find("td"),l=a.first(),s=o(l,i[0],i[1]);a.each((function(){r(eo(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(i){return!1}var r=eo(n.value),o=c();return(o[0]!==t.getMonth()||o[1]!==t.getFullYear())&&(r.datepicker("setDate",t),!0)}function u(){var e=eo(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=eo(n.value),r=e.stepMonths||Xr;if(t.datepicker("option","stepMonths")===r)return!1;var o=eo(".ui-datepicker-month",t).val(),i=eo(".ui-datepicker-year",t).val();return t.datepicker("option","stepMonths",r).datepicker("setDate",new Date(i,o)),u(),!0}function p(){var t=eo(n.value);t.find(".ui-datepicker-month").attr("disabled",e.disableMonthDropdown)}function f(){if(eo(this).hasClass("ui-state-hover")){var e=eo(this).parent(),t=e.parent();e.is(":first-child")?t.find("a").first().click():t.find("a").last().click()}}function m(){p(),l()}return Object(i["watch"])((function(){return Qr({},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&&l()})),Object(i["onMounted"])((function(){var r=eo(n.value),i=e.options||{},a=Qr(Qr(Qr({},S.getBaseDatePickerOptions()),i),{},{onChangeMonthYear:function(){setTimeout((function(){u()}))}});r.datepicker(a),r.on("mouseover","tbody td a",(function(e){e.originalEvent&&l()})),r.on("mouseenter","tbody td",(function(){var e=c(),n=eo(this),r=o(n,e[0],e[1]);t.emit("cellHover",{date:r,$cell:n})})),r.on("mouseout","tbody td a",(function(){l()})),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=eo(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=eo(e.target).closest("td"),r=parseInt(n.attr("data-month"),10),o=parseInt(n.attr("data-year"),10),i=parseInt(n.children("a,span").text(),10);t.emit("dateSelect",{date:new Date(o,r,i)})}));var h=d();s(),p(),h||u(),l()})),{root:n}}});to.render=zr;var no=to,ro=(pn({component:no,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,o){o()},"cell-hover-leave":function(e,t,n,r,o){o()},"date-select":function(e,t,n,r,o){o()}},$inject:["$timeout"]}),{id:"calendarRangeFrom"}),oo={id:"calendarRangeTo"}; + */function zr(e,t,n,r,i,a){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Gr,null,512)}function Yr(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 Qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yr(Object(n),!0).forEach((function(t){Kr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xr=1,Zr=window,ei=Zr.$,ti=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 i=r.length?r:t;i.addClass("ui-state-hover")}else t.removeClass("ui-state-hover"),r.removeClass("ui-state-hover")}function i(e,t,n){if(e.hasClass("ui-datepicker-other-month"))return a(e,t,n);var r=parseInt(e.children("a,span").text(),10);return new Date(n,t,r)}function a(e,t,n){var r,o=e.parent(),a=o.children("td");if(o.is(":first-child")){var c=o.children("td:not(.ui-datepicker-other-month)").first();return r=i(c,t,n),r.setDate(a.index(e)-a.index(c)+1),r}var l=o.children("td:not(.ui-datepicker-other-month)").last();return r=i(l,t,n),r.setDate(r.getDate()+a.index(e)-a.index(l)),r}function c(){var e=ei(n.value),t=e.find("td[data-month]"),r=parseInt(t.attr("data-month"),10),i=parseInt(t.attr("data-year"),10);return[r,i]}function l(){var e=ei(n.value),t=e.find(".ui-datepicker-calendar"),o=c(),a=t.find("td"),l=a.first(),s=i(l,o[0],o[1]);a.each((function(){r(ei(this),s),s.setDate(s.getDate()+1)}))}function s(){if(!e.viewDate)return!1;var t;if("string"===typeof e.viewDate)try{t=E(e.viewDate)}catch(o){return!1}else t=e.viewDate;var r=ei(n.value),i=c();return(i[0]!==t.getMonth()||i[1]!==t.getFullYear())&&(r.datepicker("setDate",t),!0)}function u(){var e=ei(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=ei(n.value),r=e.stepMonths||Xr;if(t.datepicker("option","stepMonths")===r)return!1;var i=ei(".ui-datepicker-month",t).val(),o=ei(".ui-datepicker-year",t).val();return t.datepicker("option","stepMonths",r).datepicker("setDate",new Date(o,i)),u(),!0}function p(){var t=ei(n.value),r=t.find(".ui-datepicker-month")[0];r&&(r.disabled=e.disableMonthDropdown)}function f(){if(ei(this).hasClass("ui-state-hover")){var e=ei(this).parent(),t=e.parent();e.is(":first-child")?t.find("a").first().click():t.find("a").last().click()}}function m(){p(),l()}return Object(o["watch"])((function(){return Qr({},e)}),(function(e,t){var n=!1;[function(e){return e.selectedDateStart},function(e){return e.selectedDateEnd},function(e){return e.highlightedDateStart},function(e){return e.highlightedDateEnd}].forEach((function(r){if(!n){var i=r(e),o=r(t);!i&&o&&(n=!0),i&&!o&&(n=!0),i&&o&&i.getTime()!==o.getTime()&&(n=!0)}})),e.viewDate!==t.viewDate&&s()&&(n=!0),e.stepMonths!==t.stepMonths&&d(),e.disableMonthDropdown!==t.disableMonthDropdown&&p(),n&&l()})),Object(o["onMounted"])((function(){var r=ei(n.value),o=e.options||{},a=Qr(Qr(Qr({},S.getBaseDatePickerOptions()),o),{},{onChangeMonthYear:function(){setTimeout((function(){u()}))}});r.datepicker(a),r.on("mouseover","tbody td a",(function(e){e.originalEvent&&l()})),r.on("mouseenter","tbody td",(function(){var e=c(),n=ei(this),r=i(n,e[0],e[1]);t.emit("cellHover",{date:r,$cell:n})})),r.on("mouseout","tbody td a",(function(){l()})),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",f),r.on("click",(function(e){e.preventDefault();var t=ei(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=ei(e.target).closest("td"),r=parseInt(n.attr("data-month"),10),i=parseInt(n.attr("data-year"),10),o=parseInt(n.children("a,span").text(),10);t.emit("dateSelect",{date:new Date(i,r,o)})}));var h=d();s(),p(),h||u(),l()})),{root:n}}});ti.render=zr;var ni=ti,ri=(pn({component:ni,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,i,o,a){a()},"cell-hover-leave":function(e,t,n,r,i,o,a){a()},"date-select":function(e,t,n,r,i,o,a){a()}},$inject:["$timeout"]}),{id:"calendarRangeFrom"}),ii={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 io(e,t,n,r,o,a){var c=Object(i["resolveComponent"])("DatePicker");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("div",ro,[Object(i["createElementVNode"])("h6",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("General_DateRangeFrom"))+" ",1),Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"text",id:"inputCalendarFrom",name:"inputCalendarFrom",class:"browser-default","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.startDateText=t}),onKeydown:t[1]||(t[1]=function(t){return e.onRangeInputChanged("from",t)}),onKeyup:t[2]||(t[2]=function(t){return e.handleEnterPress(t)})},null,544),[[i["vModelText"],e.startDateText]])]),Object(i["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(i["createElementVNode"])("div",oo,[Object(i["createElementVNode"])("h6",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("General_DateRangeTo"))+" ",1),Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"text",id:"inputCalendarTo",name:"inputCalendarTo",class:"browser-default","onUpdate:modelValue":t[6]||(t[6]=function(t){return e.endDateText=t}),onKeydown:t[7]||(t[7]=function(t){return e.onRangeInputChanged("to",t)}),onKeyup:t[8]||(t[8]=function(t){return e.handleEnterPress(t)})},null,544),[[i["vModelText"],e.endDateText]])]),Object(i["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"])])])}var ao="YYYY-MM-DD",co=Object(i["defineComponent"])({props:{startDate:String,endDate:String},components:{DatePicker:no},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,startDateInvalid:!1,endDateInvalid:!1}},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){var n=this;setTimeout((function(){"from"===e?n.setStartRangeDateFromStr(t.target.value):n.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;this.startDateInvalid=!0;try{e.length===ao.length&&(t=E(e))}catch(n){}t&&(this.fromPickerSelectedDates=[t,t],this.startDateInvalid=!1,this.rangeChanged())},setEndRangeDateFromStr:function(e){var t;this.endDateInvalid=!0;try{e.length===ao.length&&(t=E(e))}catch(n){}t&&(this.toPickerSelectedDates=[t,t],this.endDateInvalid=!1,this.rangeChanged())},rangeChanged:function(){this.$emit("rangeChange",{start:P(this.fromPickerSelectedDates[0]),end:P(this.toPickerSelectedDates[0])})}}});co.render=io;var lo=co; + */function oi(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("DatePicker");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",null,[Object(o["createElementVNode"])("div",ri,[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}),onKeydown: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",ii,[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}),onKeydown: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"])])])}var ai="YYYY-MM-DD",ci=Object(o["defineComponent"])({props:{startDate:String,endDate:String},components:{DatePicker:ni},data:function(){var e=null;try{this.startDate&&(e=E(this.startDate))}catch(n){}var t=null;try{this.endDate&&(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,startDateInvalid:!1,endDateInvalid:!1}},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){var n=this;setTimeout((function(){"from"===e?n.setStartRangeDateFromStr(t.target.value):n.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){this.startDateInvalid=!0;var t=null;try{e&&e.length===ai.length&&(t=E(e))}catch(n){}t&&(this.fromPickerSelectedDates=[t,t],this.startDateInvalid=!1,this.rangeChanged())},setEndRangeDateFromStr:function(e){this.endDateInvalid=!0;var t=null;try{e&&e.length===ai.length&&(t=E(e))}catch(n){}t&&(this.toPickerSelectedDates=[t,t],this.endDateInvalid=!1,this.rangeChanged())},rangeChanged:function(){this.$emit("rangeChange",{start:this.fromPickerSelectedDates[0]?P(this.fromPickerSelectedDates[0]):null,end:this.toPickerSelectedDates[0]?P(this.toPickerSelectedDates[0]):null})}}});ci.render=oi;var li=ci; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */pn({component:lo,scope:{startDate:{angularJsBind:"<"},endDate:{angularJsBind:"<"},rangeChange:{angularJsBind:"&"},submit:{angularJsBind:"&"}},directiveName:"piwikDateRangePicker",restrict:"E"});function so(e,t,n,r,o,a){var c=Object(i["resolveComponent"])("DatePicker");return Object(i["openBlock"])(),Object(i["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 uo=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),po=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay),fo=Object(i["defineComponent"])({props:{period:String,date:[String,Date]},components:{DatePicker:no},emits:["select"],setup:function(e,t){var n=Object(i["ref"])(e.date),r=Object(i["ref"])([null,null]),o=Object(i["ref"])([null,null]);function a(t){var n=p.get(e.period).parse(t).getDateRange();return n[0]=uo<n[0]?n[0]:uo,n[1]=po>n[1]?n[1]:po,n}function c(t,n){var r=t<uo||t>po,i=n.hasClass("ui-datepicker-other-month")&&("month"===e.period||"day"===e.period);o.value=r||i?[null,null]:a(t)}function l(){o.value=[null,null]}function s(e){t.emit("select",{date:e})}function u(){if(!e.period||!e.date)return r.value=[null,null],void(n.value=null);r.value=a(e.date),n.value=E(e.date)}return Object(i["watch"])(e,u),u(),{selectedDates:r,highlightedDates:o,viewDate:n,onHoverNormalCell:c,onHoverLeaveNormalCells:l,onDateSelected:s}}});fo.render=so;var mo=fo,ho=(pn({component:mo,scope:{period:{angularJsBind:"<"},date:{angularJsBind:"<"},select:{angularJsBind:"&"}},directiveName:"piwikPeriodDatePicker",restrict:"E"}),["value","name"]),go=["title"],vo=["textContent"],bo={key:1,class:"placeholder"},yo={class:"dropdown"},Oo={class:"custom_select_search"},wo=["placeholder"],jo={key:0},ko={class:"custom_select_container"},So=["onClick"],Co=["innerHTML","href","title"],Po={class:"ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all\n siteSelect"},Do={class:"ui-menu-item"},Eo={class:"ui-corner-all",tabindex:"-1"},Vo={key:1}; + */pn({component:li,scope:{startDate:{angularJsBind:"<"},endDate:{angularJsBind:"<"},rangeChange:{angularJsBind:"&"},submit:{angularJsBind:"&"}},directiveName:"piwikDateRangePicker",restrict:"E"});function si(e,t,n,r,i,a){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 ui=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),di=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay),pi=Object(o["defineComponent"])({props:{period:{type:String,required:!0},date:[String,Date]},components:{DatePicker:ni},emits:["select"],setup:function(e,t){var n=Object(o["ref"])(e.date),r=Object(o["ref"])([null,null]),i=Object(o["ref"])([null,null]);function a(t){var n=p.get(e.period).parse(t).getDateRange();return n[0]=ui<n[0]?n[0]:ui,n[1]=di>n[1]?n[1]:di,n}function c(t,n){var r=t<ui||t>di,o=n.hasClass("ui-datepicker-other-month")&&("month"===e.period||"day"===e.period);i.value=r||o?[null,null]:a(t)}function l(){i.value=[null,null]}function s(e){t.emit("select",{date:e})}function u(){if(!e.period||!e.date)return r.value=[null,null],void(n.value=null);r.value=a(e.date),n.value=E(e.date)}return Object(o["watch"])(e,u),u(),{selectedDates:r,highlightedDates:i,viewDate:n,onHoverNormalCell:c,onHoverLeaveNormalCells:l,onDateSelected:s}}});pi.render=si;var fi=pi,mi=(pn({component:fi,scope:{period:{angularJsBind:"<"},date:{angularJsBind:"<"},select:{angularJsBind:"&"}},directiveName:"piwikPeriodDatePicker",restrict:"E"}),["value","name"]),hi=["title"],gi=["textContent"],vi={key:1,class:"placeholder"},bi={class:"dropdown"},yi={class:"custom_select_search"},Oi=["placeholder"],wi={key:0},ji={class:"custom_select_container"},ki=["onClick"],Si=["innerHTML","href","title"],Ci={class:"ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all\n siteSelect"},Pi={class:"ui-menu-item"},Di={class:"ui-corner-all",tabindex:"-1"},Ei={key:1}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function No(e,t,n,r,o,a){var c,l,s,u,d=Object(i["resolveComponent"])("AllSitesLink"),p=Object(i["resolveDirective"])("focus-if"),f=Object(i["resolveDirective"])("focus-anywhere-but-here");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])(["siteSelector piwikSelector borderedControl",{expanded:e.showSitesList,disabled:!e.hasMultipleSites}])},[e.name?(Object(i["openBlock"])(),Object(i["createElementBlock"])("input",{key:0,type:"hidden",value:null===(c=e.modelValue)||void 0===c?void 0:c.id,name:e.name},null,8,ho)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("a",{ref:"selectorLink",onClick:t[0]||(t[0]=function(){return e.onClickSelector&&e.onClickSelector.apply(e,arguments)}),onKeydown:t[1]||(t[1]=function(t){return e.onPressEnter(t)}),href:"javascript:void(0)",class:Object(i["normalizeClass"])([{loading:e.isLoading},"title"]),tabindex:"4",title:e.selectorLinkTitle},[Object(i["createElementVNode"])("span",{class:Object(i["normalizeClass"])(["icon icon-arrow-bottom",{iconHidden:e.isLoading,collapsed:!e.showSitesList}])},null,2),Object(i["createElementVNode"])("span",null,[null!==(l=e.modelValue)&&void 0!==l&&l.name||!e.placeholder?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:0,textContent:Object(i["toDisplayString"])((null===(s=e.modelValue)||void 0===s?void 0:s.name)||e.firstSiteName)},null,8,vo)):Object(i["createCommentVNode"])("",!0),null!==(u=e.modelValue)&&void 0!==u&&u.name||!e.placeholder?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",bo,Object(i["toDisplayString"])(e.placeholder),1))])],42,go),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",yo,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Oo,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"text",onClick:t[2]||(t[2]=function(t){e.searchTerm="",e.loadInitialSites()}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),tabindex:"4",class:"websiteSearch inp browser-default",placeholder:e.translate("General_Search")},null,8,wo),[[i["vModelText"],e.searchTerm],[p,{},e.shouldFocusOnSearch]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("img",{title:"Clear",onClick:t[4]||(t[4]=function(t){e.searchTerm="",e.loadInitialSites()}),class:"reset",src:"plugins/CoreHome/images/reset_search.png"},null,512),[[i["vShow"],e.searchTerm]])],512),[[i["vShow"],e.autocompleteMinSites<=e.sites.length||e.searchTerm]]),"top"===e.allSitesLocation&&e.showAllSitesItem?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",jo,[Object(i["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[5]||(t[5]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",ko,[Object(i["createElementVNode"])("ul",{class:"custom_select_ul_list",onClick:t[7]||(t[7]=function(t){return e.showSitesList=!1})},[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sites,(function(n,r){return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{onClick:function(t){return e.switchSite(n,t)},key:r},[Object(i["createElementVNode"])("a",{onClick:t[6]||(t[6]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.getMatchedSiteName(n.name)),tabindex:"4",href:e.getUrlForSiteId(n.idsite),title:n.name},null,8,Co)],8,So)),[[i["vShow"],!(!e.showSelectedSite&&e.activeSiteId===n.idsite)]])})),128))]),Object(i["withDirectives"])(Object(i["createElementVNode"])("ul",Po,[Object(i["createElementVNode"])("li",Do,[Object(i["createElementVNode"])("a",Eo,Object(i["toDisplayString"])(e.translate("SitesManager_NotFound")+" "+e.searchTerm),1)])],512),[[i["vShow"],!e.sites.length&&e.searchTerm]])]),"bottom"===e.allSitesLocation&&e.showAllSitesItem?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Vo,[Object(i["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[8]||(t[8]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(i["createCommentVNode"])("",!0)],512),[[i["vShow"],e.showSitesList]])],2)),[[f,{blur:e.onBlur}]])}var To=["innerHTML","href"];function Ao(e,t,n,r,o,a){var c=this;return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{onClick:t[1]||(t[1]=function(e){return c.onClick(e)}),class:"custom_select_all"},[Object(i["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.allSitesText),tabindex:"4",href:e.href},null,8,To)])}var Io=Object(i["defineComponent"])({props:{href:String,allSitesText:String},emits:["click"],methods:{onClick:function(e){this.$emit("click",e)}}});Io.render=Ao;var xo=Io;function Bo(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 Mo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bo(Object(n),!0).forEach((function(t){_o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Lo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fo(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 Ro(e,t,n){return t&&Fo(e.prototype,t),n&&Fo(e,n),e}function _o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function Vi(e,t,n,r,i,a){var c,l,s,u,d=Object(o["resolveComponent"])("AllSitesLink"),p=Object(o["resolveDirective"])("focus-if"),f=Object(o["resolveDirective"])("focus-anywhere-but-here");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["siteSelector piwikSelector borderedControl",{expanded:e.showSitesList,disabled:!e.hasMultipleSites}])},[e.name?(Object(o["openBlock"])(),Object(o["createElementBlock"])("input",{key:0,type:"hidden",value:null===(c=e.modelValue)||void 0===c?void 0:c.id,name:e.name},null,8,mi)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("a",{ref:"selectorLink",onClick:t[0]||(t[0]=function(){return e.onClickSelector&&e.onClickSelector.apply(e,arguments)}),onKeydown:t[1]||(t[1]=function(t){return e.onPressEnter(t)}),href:"javascript:void(0)",class:Object(o["normalizeClass"])([{loading:e.isLoading},"title"]),tabindex:"4",title:e.selectorLinkTitle},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])(["icon icon-arrow-bottom",{iconHidden:e.isLoading,collapsed:!e.showSitesList}])},null,2),Object(o["createElementVNode"])("span",null,[null!==(l=e.modelValue)&&void 0!==l&&l.name||!e.placeholder?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,textContent:Object(o["toDisplayString"])((null===(s=e.modelValue)||void 0===s?void 0:s.name)||e.firstSiteName)},null,8,gi)):Object(o["createCommentVNode"])("",!0),null!==(u=e.modelValue)&&void 0!==u&&u.name||!e.placeholder?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",vi,Object(o["toDisplayString"])(e.placeholder),1))])],42,hi),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",bi,[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",yi,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text",onClick:t[2]||(t[2]=function(t){e.searchTerm="",e.loadInitialSites()}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),tabindex:"4",class:"websiteSearch inp browser-default",placeholder:e.translate("General_Search")},null,8,Oi),[[o["vModelText"],e.searchTerm],[p,{},e.shouldFocusOnSearch]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("img",{title:"Clear",onClick:t[4]||(t[4]=function(t){e.searchTerm="",e.loadInitialSites()}),class:"reset",src:"plugins/CoreHome/images/reset_search.png"},null,512),[[o["vShow"],e.searchTerm]])],512),[[o["vShow"],e.autocompleteMinSites<=e.sites.length||e.searchTerm]]),"top"===e.allSitesLocation&&e.showAllSitesItem?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",wi,[Object(o["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[5]||(t[5]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",ji,[Object(o["createElementVNode"])("ul",{class:"custom_select_ul_list",onClick:t[7]||(t[7]=function(t){return e.showSitesList=!1})},[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.sites,(function(n,r){return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{onClick:function(t){return e.switchSite(n,t)},key:r},[Object(o["createElementVNode"])("a",{onClick:t[6]||(t[6]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.getMatchedSiteName(n.name)),tabindex:"4",href:e.getUrlForSiteId(n.idsite),title:n.name},null,8,Si)],8,ki)),[[o["vShow"],!(!e.showSelectedSite&&e.activeSiteId===n.idsite)]])})),128))]),Object(o["withDirectives"])(Object(o["createElementVNode"])("ul",Ci,[Object(o["createElementVNode"])("li",Pi,[Object(o["createElementVNode"])("a",Di,Object(o["toDisplayString"])(e.translate("SitesManager_NotFound")+" "+e.searchTerm),1)])],512),[[o["vShow"],!e.sites.length&&e.searchTerm]])]),"bottom"===e.allSitesLocation&&e.showAllSitesItem?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ei,[Object(o["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[8]||(t[8]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(o["createCommentVNode"])("",!0)],512),[[o["vShow"],e.showSitesList]])],2)),[[f,{blur:e.onBlur}]])}var Ni=["innerHTML","href"];function Ti(e,t,n,r,i,a){var c=this;return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{onClick:t[1]||(t[1]=function(e){return c.onClick(e)}),class:"custom_select_all"},[Object(o["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.allSitesText),tabindex:"4",href:e.href},null,8,Ni)])}var Ai=Object(o["defineComponent"])({props:{href:String,allSitesText:String},emits:["click"],methods:{onClick:function(e){this.$emit("click",e)}}});Ai.render=Ti;var xi=Ai;function Ii(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 Bi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ii(Object(n),!0).forEach((function(t){Ri(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ii(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Li(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mi(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 Fi(e,t,n){return t&&Mi(e.prototype,t),n&&Mi(e,n),e}function Ri(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 $o=function(){function e(){var t=this;Lo(this,e),_o(this,"state",Object(i["reactive"])({initialSites:[],isInitialized:!1})),_o(this,"currentRequestAbort",void 0),_o(this,"limitRequest",void 0),_o(this,"initialSites",Object(i["computed"])((function(){return Object(i["readonly"])(t.state.initialSites)})))}return Ro(e,[{key:"loadInitialSites",value:function(){var e=this;return this.state.isInitialized?Promise.resolve(Object(i["readonly"])(this.state.initialSites)):this.searchSite("%").then((function(t){return e.state.isInitialized=!0,e.state.initialSites=t,Object(i["readonly"])(t)}))}},{key:"loadSite",value:function(e){"all"===e?De.updateUrl(Mo(Mo({},De.urlParsed.value),{},{module:"MultiSites",action:"index",date:De.parsed.value.date,period:De.parsed.value.period})):De.updateUrl(Mo(Mo({},De.urlParsed.value),{},{segment:"",idSite:e}),Mo(Mo({},De.hashParsed.value),{},{segment:"",idSite:e}))}},{key:"searchSite",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?(this.currentRequestAbort&&this.currentRequestAbort.abort(),this.limitRequest||(this.limitRequest=Qe.fetch({method:"SitesManager.getNumWebsitesToDisplayPerPage"})),this.limitRequest.then((function(r){var o=r.value,i="SitesManager.getPatternMatchSites";return n&&(i="SitesManager.getSitesWithAdminAccess"),t.currentRequestAbort=new AbortController,Qe.fetch({method:i,limit:o,pattern:e},{abortController:t.currentRequestAbort})})).then((function(e){return e?t.processWebsitesList(e):null})).finally((function(){t.currentRequestAbort=null}))):this.loadInitialSites()}},{key:"processWebsitesList",value:function(e){var t=e;return t&&t.length?(t=t.map((function(e){return Mo(Mo({},e),{},{name:e.group?"[".concat(e.group,"] ").concat(e.name):e.name})})),t.sort((function(e,t){return e.name.toLowerCase()<t.name.toLowerCase()?-1:e.name.toLowerCase()>t.name.toLowerCase()?1:0})),t):[]}}]),e}(),Ho=new $o,Uo=300;function Wo(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uo;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t&&clearTimeout(t),t=setTimeout((function(){e.apply(void 0,o)}),n)}}function qo(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 Jo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qo(Object(n),!0).forEach((function(t){Go(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Go(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zo=Object(i["defineComponent"])({props:{modelValue:{Object:Object,default:function(e){return e.modelValue?e.modelValue:S.idSite?{id:S.idSite,name:S.helper.htmlDecode(S.siteName)}:void 0}},showSelectedSite:{type:Boolean,default:!1},showAllSitesItem:{type:Boolean,default:!0},switchSiteOnSelect:{type:Boolean,default:!0},onlySitesWithAdminAccess:{type:Boolean,default:!1},name:{type:String,default:""},allSitesText:{type:String,default:C("General_MultiSitesSummary")},allSitesLocation:{type:String,default:"bottom"},placeholder:String},emits:["update:modelValue","blur"],components:{AllSitesLink:xo},directives:{FocusAnywhereButHere:dt,FocusIf:mt},watch:{searchTerm:function(){this.onSearchTermChanged()}},data:function(){return{searchTerm:"",activeSiteId:S.idSite,showSitesList:!1,isLoading:!1,sites:[],autocompleteMinSites:parseInt(S.config.autocomplete_min_sites,10)}},mounted:function(){var e=this;window.initTopControls(),this.loadInitialSites().then((function(){e.modelValue&&e.modelValue.id||e.hasMultipleSites||!e.sites[0]||e.$emit("update:modelValue",{id:e.sites[0].idsite,name:e.sites[0].name})}));var t=C("CoreHome_ShortcutWebsiteSelector");S.helper.registerShortcut("w",t,(function(t){t.altKey||(t.preventDefault?t.preventDefault():t.returnValue=!1,e.$refs.selectorLink.click(),e.$refs.selectorLink.focus())}))},computed:{shouldFocusOnSearch:function(){return this.showSitesList&&this.autocompleteMinSites<=this.sites.length||this.searchTerm},selectorLinkTitle:function(){var e;return this.hasMultipleSites?C("CoreHome_ChangeCurrentWebsite",(null===(e=this.modelValue)||void 0===e?void 0:e.name)||this.firstSiteName):""},hasMultipleSites:function(){return Ho.initialSites.value&&Ho.initialSites.value.length>1},firstSiteName:function(){var e=Ho.initialSites.value;return e&&e.length>0?e[0].name:""},urlAllSites:function(){var e=De.stringify(Jo(Jo({},De.urlParsed.value),{},{module:"MultiSites",action:"index",date:De.parsed.value.date,period:De.parsed.value.period}));return"?".concat(e)}},created:function(){this.searchSite=Wo(this.searchSite.bind(this))},methods:{onSearchTermChanged:function(){this.searchTerm?(this.isLoading=!0,this.searchSite(this.searchTerm)):(this.isLoading=!1,this.loadInitialSites())},onAllSitesClick:function(e){this.switchSite({idsite:"all",name:this.allSitesText},e),this.showSitesList=!1},switchSite:function(e,t){var n=-1!==navigator.userAgent.indexOf("Mac OS X")?t.metaKey:t.ctrlKey;t&&n&&t.target&&t.target.href?window.open(t.target.href,"_blank"):(this.$emit("update:modelValue",{id:e.idsite,name:e.name}),this.switchSiteOnSelect&&this.activeSiteId!==e.idsite&&Ho.loadSite(e.idsite))},onBlur:function(){this.showSitesList=!1,this.$emit("blur")},onClickSelector:function(){this.hasMultipleSites&&(this.showSitesList=!this.showSitesList,this.isLoading||this.searchTerm||this.loadInitialSites())},onPressEnter:function(e){"Enter"===e.key&&(e.preventDefault(),this.showSitesList=!this.showSitesList,this.showSitesList&&!this.isLoading&&this.loadInitialSites())},getMatchedSiteName:function(e){var t=e.toUpperCase().indexOf(this.searchTerm.toUpperCase());if(-1===t||this.isLoading)return S.helper.htmlEntities(e);var n=S.helper.htmlEntities(e.substring(0,t)),r=S.helper.htmlEntities(e.substring(t+this.searchTerm.length));return"".concat(n,'<span class="autocompleteMatched">').concat(this.searchTerm,"</span>").concat(r)},loadInitialSites:function(){var e=this;return Ho.loadInitialSites().then((function(t){e.sites=t||[]}))},searchSite:function(e){var t=this;this.isLoading=!0,Ho.searchSite(e,this.onlySitesWithAdminAccess).then((function(n){e===t.searchTerm&&n&&(t.sites=n)})).finally((function(){t.isLoading=!1}))},getUrlForSiteId:function(e){var t=De.stringify(Jo(Jo({},De.urlParsed.value),{},{segment:"",idSite:e})),n=De.stringify(Jo(Jo({},De.hashParsed.value),{},{segment:"",idSite:e}));return"?".concat(t,"#?").concat(n)}}});zo.render=No;var Yo=zo; + */var _i=function(){function e(){var t=this;Li(this,e),Ri(this,"state",Object(o["reactive"])({initialSites:[],isInitialized:!1})),Ri(this,"currentRequestAbort",null),Ri(this,"limitRequest",void 0),Ri(this,"initialSites",Object(o["computed"])((function(){return Object(o["readonly"])(t.state.initialSites)})))}return Fi(e,[{key:"loadInitialSites",value:function(){var e=this;return this.state.isInitialized?Promise.resolve(Object(o["readonly"])(this.state.initialSites)):this.searchSite("%").then((function(t){return e.state.isInitialized=!0,null!==t&&(e.state.initialSites=t),t}))}},{key:"loadSite",value:function(e){"all"===e?De.updateUrl(Bi(Bi({},De.urlParsed.value),{},{module:"MultiSites",action:"index",date:De.parsed.value.date,period:De.parsed.value.period})):De.updateUrl(Bi(Bi({},De.urlParsed.value),{},{segment:"",idSite:e}),Bi(Bi({},De.hashParsed.value),{},{segment:"",idSite:e}))}},{key:"searchSite",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?(this.currentRequestAbort&&this.currentRequestAbort.abort(),this.limitRequest||(this.limitRequest=Qe.fetch({method:"SitesManager.getNumWebsitesToDisplayPerPage"})),this.limitRequest.then((function(r){var i=r.value,o="SitesManager.getPatternMatchSites";return n&&(o="SitesManager.getSitesWithAdminAccess"),t.currentRequestAbort=new AbortController,Qe.fetch({method:o,limit:i,pattern:e},{abortController:t.currentRequestAbort})})).then((function(e){return e?t.processWebsitesList(e):null})).finally((function(){t.currentRequestAbort=null}))):this.loadInitialSites()}},{key:"processWebsitesList",value:function(e){var t=e;return t&&t.length?(t=t.map((function(e){return Bi(Bi({},e),{},{name:e.group?"[".concat(e.group,"] ").concat(e.name):e.name})})),t.sort((function(e,t){return e.name.toLowerCase()<t.name.toLowerCase()?-1:e.name.toLowerCase()>t.name.toLowerCase()?1:0})),t):[]}}]),e}(),$i=new _i,Hi=300;function Ui(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Hi;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];t&&clearTimeout(t),t=setTimeout((function(){e.call.apply(e,[r].concat(o))}),n)}}function qi(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 Wi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qi(Object(n),!0).forEach((function(t){Ji(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ji(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gi=Object(o["defineComponent"])({props:{modelValue:{type:Object,default:function(e){return e.modelValue?e.modelValue:S.idSite?{id:S.idSite,name:S.helper.htmlDecode(S.siteName)}:void 0}},showSelectedSite:{type:Boolean,default:!1},showAllSitesItem:{type:Boolean,default:!0},switchSiteOnSelect:{type:Boolean,default:!0},onlySitesWithAdminAccess:{type:Boolean,default:!1},name:{type:String,default:""},allSitesText:{type:String,default:C("General_MultiSitesSummary")},allSitesLocation:{type:String,default:"bottom"},placeholder:String},emits:["update:modelValue","blur"],components:{AllSitesLink:xi},directives:{FocusAnywhereButHere:dt,FocusIf:mt},watch:{searchTerm:function(){this.onSearchTermChanged()}},data:function(){return{searchTerm:"",activeSiteId:"".concat(S.idSite),showSitesList:!1,isLoading:!1,sites:[],autocompleteMinSites:parseInt(S.config.autocomplete_min_sites,10)}},created:function(){this.searchSite=Ui(this.searchSite)},mounted:function(){var e=this;window.initTopControls(),this.loadInitialSites().then((function(){e.modelValue&&e.modelValue.id||e.hasMultipleSites||!e.sites[0]||e.$emit("update:modelValue",{id:e.sites[0].idsite,name:e.sites[0].name})}));var t=C("CoreHome_ShortcutWebsiteSelector");S.helper.registerShortcut("w",t,(function(t){if(!t.altKey){t.preventDefault?t.preventDefault():t.returnValue=!1;var n=e.$refs.selectorLink;n&&(n.click(),n.focus())}}))},computed:{shouldFocusOnSearch:function(){return this.showSitesList&&this.autocompleteMinSites<=this.sites.length||this.searchTerm},selectorLinkTitle:function(){var e;return this.hasMultipleSites?C("CoreHome_ChangeCurrentWebsite",(null===(e=this.modelValue)||void 0===e?void 0:e.name)||this.firstSiteName):""},hasMultipleSites:function(){return $i.initialSites.value&&$i.initialSites.value.length>1},firstSiteName:function(){var e=$i.initialSites.value;return e&&e.length>0?e[0].name:""},urlAllSites:function(){var e=De.stringify(Wi(Wi({},De.urlParsed.value),{},{module:"MultiSites",action:"index",date:De.parsed.value.date,period:De.parsed.value.period}));return"?".concat(e)}},methods:{onSearchTermChanged:function(){this.searchTerm?(this.isLoading=!0,this.searchSite(this.searchTerm)):(this.isLoading=!1,this.loadInitialSites())},onAllSitesClick:function(e){this.switchSite({idsite:"all",name:this.$props.allSitesText},e),this.showSitesList=!1},switchSite:function(e,t){var n=-1!==navigator.userAgent.indexOf("Mac OS X")?t.metaKey:t.ctrlKey;t&&n&&t.target&&t.target.href?window.open(t.target.href,"_blank"):(this.$emit("update:modelValue",{id:e.idsite,name:e.name}),this.switchSiteOnSelect&&this.activeSiteId!==e.idsite&&$i.loadSite(e.idsite))},onBlur:function(){this.showSitesList=!1,this.$emit("blur")},onClickSelector:function(){this.hasMultipleSites&&(this.showSitesList=!this.showSitesList,this.isLoading||this.searchTerm||this.loadInitialSites())},onPressEnter:function(e){"Enter"===e.key&&(e.preventDefault(),this.showSitesList=!this.showSitesList,this.showSitesList&&!this.isLoading&&this.loadInitialSites())},getMatchedSiteName:function(e){var t=e.toUpperCase().indexOf(this.searchTerm.toUpperCase());if(-1===t||this.isLoading)return S.helper.htmlEntities(e);var n=S.helper.htmlEntities(e.substring(0,t)),r=S.helper.htmlEntities(e.substring(t+this.searchTerm.length));return"".concat(n,'<span class="autocompleteMatched">').concat(this.searchTerm,"</span>").concat(r)},loadInitialSites:function(){var e=this;return $i.loadInitialSites().then((function(t){e.sites=t||[]}))},searchSite:function(e){var t=this;this.isLoading=!0,$i.searchSite(e,this.onlySitesWithAdminAccess).then((function(n){e===t.searchTerm&&n&&(t.sites=n)})).finally((function(){t.isLoading=!1}))},getUrlForSiteId:function(e){var t=De.stringify(Wi(Wi({},De.urlParsed.value),{},{segment:"",idSite:e})),n=De.stringify(Wi(Wi({},De.hashParsed.value),{},{segment:"",idSite:e}));return"?".concat(t,"#?").concat(n)}}});Gi.render=Vi;var zi=Gi; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */pn({component:Yo,require:"?ngModel",scope:{showSelectedSite:{angularJsBind:"="},showAllSitesItem:{angularJsBind:"="},switchSiteOnSelect:{angularJsBind:"="},onlySitesWithAdminAccess:{angularJsBind:"="},name:{angularJsBind:"@"},allSitesText:{angularJsBind:"@"},allSitesLocation:{angularJsBind:"@"},placeholder:{angularJsBind:"@"},modelValue:{default:function(e,t,n){return n.siteid&&n.sitename?{id:n.siteid,name:S.helper.htmlDecode(n.sitename)}:S.idSite?{id:S.idSite,name:S.helper.htmlDecode(S.siteName)}:void 0}}},$inject:["$timeout"],directiveName:"piwikSiteselector",events:{"update:modelValue":function(e,t,n,r,o,i,a){(e&&!t.modelValue||!e&&t.modelValue||e.id!==t.modelValue.id)&&a((function(){n.value=e,r.attr("siteid",e.id),r.trigger("change",e),i&&(i.$setViewValue(e),i.$render())}))},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}},postCreate:function(e,t,n,r,o){var a=o;t.$watch("value",(function(t){Object(i["nextTick"])((function(){t!==e.modelValue&&(e.modelValue=t)}))})),r.siteid&&r.sitename?e.modelValue={id:r.siteid,name:S.helper.htmlDecode(r.sitename)}:S.idSite&&(e.modelValue={id:S.idSite,name:S.helper.htmlDecode(S.siteName)}),a&&(a.$setViewValue(e.modelValue),a.$render=function(){Object(i["nextTick"])((function(){Object(i["nextTick"])((function(){angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue}))}))})}}); + */pn({component:zi,require:"?ngModel",scope:{showSelectedSite:{angularJsBind:"="},showAllSitesItem:{angularJsBind:"="},switchSiteOnSelect:{angularJsBind:"="},onlySitesWithAdminAccess:{angularJsBind:"="},name:{angularJsBind:"@"},allSitesText:{angularJsBind:"@"},allSitesLocation:{angularJsBind:"@"},placeholder:{angularJsBind:"@"},modelValue:{default:function(e,t,n){return n.siteid&&n.sitename?{id:n.siteid,name:S.helper.htmlDecode(n.sitename)}:S.idSite?{id:S.idSite,name:S.helper.htmlDecode(S.siteName)}:void 0}}},$inject:["$timeout"],directiveName:"piwikSiteselector",events:{"update:modelValue":function(e,t,n,r,i,o,a){(e&&!t.modelValue||!e&&t.modelValue||e.id!==t.modelValue.id)&&a((function(){n.value=e,r.attr("siteid",e.id),r.trigger("change",e),o&&(o.$setViewValue(e),o.$render())}))},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}},postCreate:function(e,t,n,r,i){var a=i;t.$watch("value",(function(t){Object(o["nextTick"])((function(){t!==e.modelValue&&(e.modelValue=t)}))})),r.siteid&&r.sitename?e.modelValue={id:r.siteid,name:S.helper.htmlDecode(r.sitename)}:S.idSite&&(e.modelValue={id:S.idSite,name:S.helper.htmlDecode(S.siteName)}),a&&(a.$setViewValue(e.modelValue),a.$render=function(){Object(o["nextTick"])((function(){Object(o["nextTick"])((function(){window.angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue}))}))})}}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Qo(){return{get initialSites(){return Ho.initialSites.value},loadSite:Ho.loadSite.bind(Ho),loadInitialSites:function(){return gn(Ho.loadInitialSites())},searchSite:function(){return gn(Ho.searchSite.apply(Ho,arguments))}}}angular.module("piwikApp.service").factory("siteSelectorModel",Qo);var Ko={ref:"root",class:"quickAccessInside"},Xo=["title"],Zo={class:"dropdown"},ei={class:"no-result"},ti=["onClick"],ni=["onMouseenter","onClick"],ri={class:"quickAccessMatomoSearch"},oi=["onMouseenter","onClick"],ii=["textContent"],ai={class:"quick-access-category helpCategory"},ci=["href"];function li(e,t,n,r,o,a){var c=Object(i["resolveDirective"])("focus-if"),l=Object(i["resolveDirective"])("focus-anywhere-but-here");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ko,[Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{class:"icon-search",onMouseenter:t[0]||(t[0]=function(t){return e.searchActive=!0})},null,544),[[i["vShow"],!(e.searchTerm||e.searchActive)]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{class:"s",onKeydown:t[1]||(t[1]=function(t){return e.onKeypress(t)}),onFocus:t[2]||(t[2]=function(t){return e.searchActive=!0}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),type:"text",tabindex:"2",title:e.quickAccessTitle},null,40,Xo),[[i["vModelText"],e.searchTerm],[c,{},e.searchActive]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Zo,[Object(i["withDirectives"])(Object(i["createElementVNode"])("ul",null,[Object(i["createElementVNode"])("li",ei,Object(i["toDisplayString"])(e.translate("General_SearchNoResults")),1)],512),[[i["vShow"],!(e.numMenuItems>0||e.sites.length)]]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.menuItems,(function(t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("ul",{key:t.title},[Object(i["createElementVNode"])("li",{class:"quick-access-category",onClick:function(n){e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(i["toDisplayString"])(t.title),9,ti),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(t.items,(function(t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{class:Object(i["normalizeClass"])(["result",{selected:t.menuIndex===e.searchIndex}]),onMouseenter:function(n){return e.searchIndex=t.menuIndex},onClick:function(n){return e.selectMenuItem(t.index)},key:t.index},[Object(i["createElementVNode"])("a",null,Object(i["toDisplayString"])(t.name.trim()),1)],42,ni)})),128))])})),128)),Object(i["createElementVNode"])("ul",ri,[Object(i["withDirectives"])(Object(i["createElementVNode"])("li",{class:"quick-access-category websiteCategory"},Object(i["toDisplayString"])(e.translate("SitesManager_Sites")),513),[[i["vShow"],e.hasSitesSelector&&e.sites.length||e.isLoading]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("li",{class:"no-result"},Object(i["toDisplayString"])(e.translate("MultiSites_LoadingWebsites")),513),[[i["vShow"],e.hasSitesSelector&&e.isLoading]]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sites,(function(t,n){return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{class:Object(i["normalizeClass"])(["result",{selected:e.numMenuItems+n===e.searchIndex}]),onMouseenter:function(t){return e.searchIndex=e.numMenuItems+n},onClick:function(n){return e.selectSite(t.idsite)},key:t.idsite},[Object(i["createElementVNode"])("a",{textContent:Object(i["toDisplayString"])(t.name)},null,8,ii)],42,oi)),[[i["vShow"],e.hasSitesSelector&&!e.isLoading]])})),128))]),Object(i["createElementVNode"])("ul",null,[Object(i["createElementVNode"])("li",ai,Object(i["toDisplayString"])(e.translate("General_HelpResources")),1),Object(i["createElementVNode"])("li",{class:Object(i["normalizeClass"])([{selected:"help"===e.searchIndex},"quick-access-help"]),onMouseenter:t[4]||(t[4]=function(t){return e.searchIndex="help"})},[Object(i["createElementVNode"])("a",{href:"https://matomo.org?s=".concat(encodeURIComponent(e.searchTerm)),target:"_blank"},Object(i["toDisplayString"])(e.translate("CoreHome_SearchOnMatomo",e.searchTerm)),9,ci)],34)])],512),[[i["vShow"],e.searchTerm&&e.searchActive]])],512)),[[l,{blur:e.onBlur}]])}function si(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 ui(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?si(Object(n),!0).forEach((function(t){di(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):si(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function di(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pi(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.$(window).height()&&t.right<=window.$(window).width()}function fi(e){e&&e.scrollIntoView&&e.scrollIntoView()}var mi=Object(i["defineComponent"])({props:{},directives:{FocusAnywhereButHere:dt,FocusIf:mt},watch:{searchActive:function(e){var t=this.$refs.root.parentElement.classList;t.toggle("active",e),t.toggle("expanded",e)}},mounted:function(){var e=this;this.$refs.root.parentElement.classList.add("quick-access","piwikSelector"),"undefined"!==typeof window.initTopControls&&window.initTopControls&&window.initTopControls(),S.helper.registerShortcut("f",C("CoreHome_ShortcutSearch"),(function(t){t.altKey||(t.preventDefault(),fi(e.$refs.root),e.activateSearch())}))},data:function(){var e=!!document.querySelector(".segmentEditorPanel");return{menuItems:[],numMenuItems:0,searchActive:!1,searchTerm:"",searchIndex:0,menuIndexCounter:-1,topMenuItems:null,leftMenuItems:null,segmentItems:null,hasSegmentSelector:e,sites:[],isLoading:!1}},created:function(){this.searchMenu=Wo(this.searchMenu.bind(this))},computed:{hasSitesSelector:function(){return!!document.querySelector(".top_controls [piwik-siteselector]")},quickAccessTitle:function(){var e="",t=[C("CoreHome_MenuEntries")];this.hasSegmentSelector&&t.push(C("CoreHome_Segments")),this.hasSitesSelector&&t.push(C("SitesManager_Sites"));while(t.length)e+=t.shift(),t.length>=2?e+=", ":1===t.length&&(e+=" ".concat(C("General_And")," "));return C("CoreHome_QuickAccessTitle",e)}},emits:["itemSelected","blur"],methods:{onKeypress:function(e){var t=this,n=this.searchTerm&&this.searchActive,r=9===e.which,o=27===e.which;38===e.which?(this.highlightPreviousItem(),e.preventDefault()):40===e.which?(this.highlightNextItem(),e.preventDefault()):13===e.which?this.clickQuickAccessMenuItem():r&&n||o&&n?this.deactivateSearch():setTimeout((function(){t.searchActive=!0,t.searchMenu(t.searchTerm)}))},highlightPreviousItem:function(){this.searchIndex-1<0?this.searchIndex=0:this.searchIndex-=1,this.makeSureSelectedItemIsInViewport()},highlightNextItem:function(){var e=this.$refs.root.querySelectorAll("li.result").length;e<=this.searchIndex+1?this.searchIndex=e-1:this.searchIndex+=1,this.makeSureSelectedItemIsInViewport()},clickQuickAccessMenuItem:function(){var e=this,t=this.getCurrentlySelectedElement();t&&setTimeout((function(){t.click(),e.$emit("itemSelected",t)}),20)},deactivateSearch:function(){this.searchTerm="",this.searchActive=!1,this.$refs.root.querySelector("input").blur()},makeSureSelectedItemIsInViewport:function(){var e=this.getCurrentlySelectedElement();e&&!pi(e)&&fi(e)},getCurrentlySelectedElement:function(){var e=this.$refs.root.querySelectorAll("li.result");return e&&e.length&&e.item(this.searchIndex)?e.item(this.searchIndex):null},searchMenu:function(e){var t=this,n=e.toLowerCase(),r=-1,o={},i=[],a=function(e){var t=ui({},e);r+=1,t.menuIndex=r;var n=t.category;n in o||(i.push({title:n,items:[]}),o[n]=i.length-1);var a=o[n];i[a].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,Ho.searchSite(n).then((function(e){t.sites=e})).finally((function(){t.isLoading=!1})));var c=function(e){return-1!==e.name.toLowerCase().indexOf(n)||-1!==e.category.toLowerCase().indexOf(n)};null===this.topMenuItems&&(this.topMenuItems=this.getTopMenuItems()),null===this.leftMenuItems&&(this.leftMenuItems=this.getLeftMenuItems()),null===this.segmentItems&&(this.segmentItems=this.getSegmentItems());var l=this.topMenuItems.filter(c),s=this.leftMenuItems.filter(c),u=this.segmentItems.filter(c);l.forEach(a),s.forEach(a),u.forEach(a),this.numMenuItems=l.length+s.length+u.length,this.menuItems=i},resetSearchIndex:function(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite:function(e){Ho.loadSite(e)},selectMenuItem:function(e){var t=document.querySelector("[quick_access='".concat(e,"']"));if(t){this.deactivateSearch();var n=t.getAttribute("href");if(n&&n.length>10&&t&&t.click)try{t.click()}catch(r){window.$(t).click()}else window.$(t).click()}},onBlur:function(){this.searchActive=!1,this.$emit("blur")},activateSearch:function(){this.searchActive=!0},getTopMenuItems:function(){var e=this,t=C("CoreHome_Menu"),n=[];return document.querySelectorAll("nav .sidenav li > a").forEach((function(r){var o=r.textContent.trim();o||(o=r.getAttribute("title").trim()),o&&(n.push({name:o,index:e.menuIndexCounter+=1,category:t}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n},getLeftMenuItems:function(){var e=this,t=[];return document.querySelectorAll("#secondNavBar .menuTab").forEach((function(n){var r=window.$(n).find("> .item");r=r[0]?r[0].innerText.trim():"",r&&-1!==r.lastIndexOf("\n")&&(r=r.substr(0,r.lastIndexOf("\n")).trim()),window.$(n).find("li .item").each((function(n,o){var i=o.textContent.trim();i&&(t.push({name:i,category:r,index:e.menuIndexCounter+=1}),o.setAttribute("quick_access","".concat(e.menuIndexCounter)))}))})),t},getSegmentItems:function(){var e=this;if(!this.hasSegmentSelector)return[];var t=C("CoreHome_Segments"),n=[];return document.querySelectorAll(".segmentList [data-idsegment]").forEach((function(r){var o=r.querySelector(".segname").textContent.trim();o&&(n.push({name:o,category:t,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n}}});mi.render=li;var hi=mi; +function Yi(){return{get initialSites(){return $i.initialSites.value},loadSite:$i.loadSite.bind($i),loadInitialSites:function(){return gn($i.loadInitialSites())},searchSite:function(){return gn($i.searchSite.apply($i,arguments))}}}window.angular.module("piwikApp.service").factory("siteSelectorModel",Yi);var Qi={ref:"root",class:"quickAccessInside"},Ki=["title"],Xi={class:"dropdown"},Zi={class:"no-result"},eo=["onClick"],to=["onMouseenter","onClick"],no={class:"quickAccessMatomoSearch"},ro=["onMouseenter","onClick"],io=["textContent"],oo={class:"quick-access-category helpCategory"},ao=["href"];function co(e,t,n,r,i,a){var c=Object(o["resolveDirective"])("focus-if"),l=Object(o["resolveDirective"])("focus-anywhere-but-here");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Qi,[Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{class:"icon-search",onMouseenter:t[0]||(t[0]=function(t){return e.searchActive=!0})},null,544),[[o["vShow"],!(e.searchTerm||e.searchActive)]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{class:"s",onKeydown:t[1]||(t[1]=function(t){return e.onKeypress(t)}),onFocus:t[2]||(t[2]=function(t){return e.searchActive=!0}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),type:"text",tabindex:"2",title:e.quickAccessTitle,ref:"input"},null,40,Ki),[[o["vModelText"],e.searchTerm],[c,{},e.searchActive]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",Xi,[Object(o["withDirectives"])(Object(o["createElementVNode"])("ul",null,[Object(o["createElementVNode"])("li",Zi,Object(o["toDisplayString"])(e.translate("General_SearchNoResults")),1)],512),[[o["vShow"],!(e.numMenuItems>0||e.sites.length)]]),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.menuItems,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("ul",{key:t.title},[Object(o["createElementVNode"])("li",{class:"quick-access-category",onClick:function(n){e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(o["toDisplayString"])(t.title),9,eo),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.items,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{class:Object(o["normalizeClass"])(["result",{selected:t.menuIndex===e.searchIndex}]),onMouseenter:function(n){return e.searchIndex=t.menuIndex},onClick:function(n){return e.selectMenuItem(t.index)},key:t.index},[Object(o["createElementVNode"])("a",null,Object(o["toDisplayString"])(t.name.trim()),1)],42,to)})),128))])})),128)),Object(o["createElementVNode"])("ul",no,[Object(o["withDirectives"])(Object(o["createElementVNode"])("li",{class:"quick-access-category websiteCategory"},Object(o["toDisplayString"])(e.translate("SitesManager_Sites")),513),[[o["vShow"],e.hasSitesSelector&&e.sites.length||e.isLoading]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("li",{class:"no-result"},Object(o["toDisplayString"])(e.translate("MultiSites_LoadingWebsites")),513),[[o["vShow"],e.hasSitesSelector&&e.isLoading]]),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.sites,(function(t,n){return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{class:Object(o["normalizeClass"])(["result",{selected:e.numMenuItems+n===e.searchIndex}]),onMouseenter:function(t){return e.searchIndex=e.numMenuItems+n},onClick:function(n){return e.selectSite(t.idsite)},key:t.idsite},[Object(o["createElementVNode"])("a",{textContent:Object(o["toDisplayString"])(t.name)},null,8,io)],42,ro)),[[o["vShow"],e.hasSitesSelector&&!e.isLoading]])})),128))]),Object(o["createElementVNode"])("ul",null,[Object(o["createElementVNode"])("li",oo,Object(o["toDisplayString"])(e.translate("General_HelpResources")),1),Object(o["createElementVNode"])("li",{class:Object(o["normalizeClass"])([{selected:"help"===e.searchIndex},"quick-access-help"]),onMouseenter:t[4]||(t[4]=function(t){return e.searchIndex="help"})},[Object(o["createElementVNode"])("a",{href:"https://matomo.org?s=".concat(encodeURIComponent(e.searchTerm)),target:"_blank"},Object(o["toDisplayString"])(e.translate("CoreHome_SearchOnMatomo",e.searchTerm)),9,ao)],34)])],512),[[o["vShow"],e.searchTerm&&e.searchActive]])],512)),[[l,{blur:e.onBlur}]])}function lo(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 so(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lo(Object(n),!0).forEach((function(t){uo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function uo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function po(e){var t=e.getBoundingClientRect(),n=window.$(window);return t.top>=0&&t.left>=0&&t.bottom<=n.height()&&t.right<=n.width()}function fo(e){e&&e.scrollIntoView&&e.scrollIntoView()}var mo=Object(o["defineComponent"])({directives:{FocusAnywhereButHere:dt,FocusIf:mt},watch:{searchActive:function(e){var t=this.$refs.root;if(t&&t.parentElement){var n=t.parentElement.classList;n.toggle("active",e),n.toggle("expanded",e)}}},mounted:function(){var e=this,t=this.$refs.root;t&&t.parentElement&&t.parentElement.classList.add("quick-access","piwikSelector"),"undefined"!==typeof window.initTopControls&&window.initTopControls&&window.initTopControls(),S.helper.registerShortcut("f",C("CoreHome_ShortcutSearch"),(function(t){t.altKey||(t.preventDefault(),fo(e.$refs.root),e.activateSearch())}))},data:function(){var e=!!document.querySelector(".segmentEditorPanel");return{menuItems:[],numMenuItems:0,searchActive:!1,searchTerm:"",searchIndex:0,menuIndexCounter:-1,topMenuItems:null,leftMenuItems:null,segmentItems:null,hasSegmentSelector:e,sites:[],isLoading:!1}},created:function(){this.searchMenu=Ui(this.searchMenu.bind(this))},computed:{hasSitesSelector:function(){return!!document.querySelector(".top_controls [piwik-siteselector]")},quickAccessTitle:function(){var e="",t=[C("CoreHome_MenuEntries")];this.hasSegmentSelector&&t.push(C("CoreHome_Segments")),this.hasSitesSelector&&t.push(C("SitesManager_Sites"));while(t.length)e+=t.shift(),t.length>=2?e+=", ":1===t.length&&(e+=" ".concat(C("General_And")," "));return C("CoreHome_QuickAccessTitle",e)}},emits:["itemSelected","blur"],methods:{onKeypress:function(e){var t=this,n=this.searchTerm&&this.searchActive,r=9===e.which,i=27===e.which;38===e.which?(this.highlightPreviousItem(),e.preventDefault()):40===e.which?(this.highlightNextItem(),e.preventDefault()):13===e.which?this.clickQuickAccessMenuItem():r&&n||i&&n?this.deactivateSearch():setTimeout((function(){t.searchActive=!0,t.searchMenu(t.searchTerm)}))},highlightPreviousItem:function(){this.searchIndex-1<0?this.searchIndex=0:this.searchIndex-=1,this.makeSureSelectedItemIsInViewport()},highlightNextItem:function(){var e=this.$refs.root.querySelectorAll("li.result").length;e<=this.searchIndex+1?this.searchIndex=e-1:this.searchIndex+=1,this.makeSureSelectedItemIsInViewport()},clickQuickAccessMenuItem:function(){var e=this,t=this.getCurrentlySelectedElement();t&&setTimeout((function(){t.click(),e.$emit("itemSelected",t)}),20)},deactivateSearch:function(){this.searchTerm="",this.searchActive=!1,this.$refs.input&&this.$refs.input.blur()},makeSureSelectedItemIsInViewport:function(){var e=this.getCurrentlySelectedElement();e&&!po(e)&&fo(e)},getCurrentlySelectedElement:function(){var e=this.$refs.root.querySelectorAll("li.result");if(e&&e.length&&e.item(this.searchIndex))return e.item(this.searchIndex)},searchMenu:function(e){var t=this,n=e.toLowerCase(),r=-1,i={},o=[],a=function(e){var t=so({},e);r+=1,t.menuIndex=r;var n=t.category;n in i||(o.push({title:n,items:[]}),i[n]=o.length-1);var a=i[n];o[a].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,$i.searchSite(n).then((function(e){e&&(t.sites=e)})).finally((function(){t.isLoading=!1})));var c=function(e){return-1!==e.name.toLowerCase().indexOf(n)||-1!==e.category.toLowerCase().indexOf(n)};null===this.topMenuItems&&(this.topMenuItems=this.getTopMenuItems()),null===this.leftMenuItems&&(this.leftMenuItems=this.getLeftMenuItems()),null===this.segmentItems&&(this.segmentItems=this.getSegmentItems());var l=this.topMenuItems.filter(c),s=this.leftMenuItems.filter(c),u=this.segmentItems.filter(c);l.forEach(a),s.forEach(a),u.forEach(a),this.numMenuItems=l.length+s.length+u.length,this.menuItems=o},resetSearchIndex:function(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite:function(e){$i.loadSite(e)},selectMenuItem:function(e){var t=document.querySelector("[quick_access='".concat(e,"']"));if(t){this.deactivateSearch();var n=t.getAttribute("href");if(n&&n.length>10&&t&&t.click)try{t.click()}catch(r){window.$(t).click()}else window.$(t).click()}},onBlur:function(){this.searchActive=!1,this.$emit("blur")},activateSearch:function(){this.searchActive=!0},getTopMenuItems:function(){var e=this,t=C("CoreHome_Menu"),n=[];return document.querySelectorAll("nav .sidenav li > a").forEach((function(r){var i,o,a=null===(i=r.textContent)||void 0===i?void 0:i.trim();a||(a=null===(o=r.getAttribute("title"))||void 0===o?void 0:o.trim());a&&(n.push({name:a,index:e.menuIndexCounter+=1,category:t}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n},getLeftMenuItems:function(){var e=this,t=[];return document.querySelectorAll("#secondNavBar .menuTab").forEach((function(n){var r,i=window.$(n).find("> .item"),o=(null===(r=i[0])||void 0===r?void 0:r.innerText.trim())||"";o&&-1!==o.lastIndexOf("\n")&&(o=o.substr(0,o.lastIndexOf("\n")).trim()),window.$(n).find("li .item").each((function(n,r){var i,a=null===(i=r.textContent)||void 0===i?void 0:i.trim();a&&(t.push({name:a,category:o,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))}))})),t},getSegmentItems:function(){var e=this;if(!this.hasSegmentSelector)return[];var t=C("CoreHome_Segments"),n=[];return document.querySelectorAll(".segmentList [data-idsegment]").forEach((function(r){var i,o,a=null===(i=r.querySelector(".segname"))||void 0===i||null===(o=i.textContent)||void 0===o?void 0:o.trim();a&&(n.push({name:a,category:t,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n}}});mo.render=co;var ho=mo; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */pn({component:hi,directiveName:"piwikQuickAccess",events:{itemSelected:function(e,t,n,r,o,i,a){a()},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}}});function gi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vi={class:"fieldArray form-group"},bi={key:0,class:"fieldUiControl"},yi=["onClick","title"];function Oi(e,t,n,r,o,a){var c=Object(i["resolveComponent"])("Field");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",vi,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.modelValue,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])(["fieldArrayTable multiple valign-wrapper",gi({},"fieldArrayTable".concat(n),!0)]),key:n},[e.field.uiControl?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",bi,[Object(i["createVNode"])(c,{"full-width":!0,"model-value":t,options:e.field.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(t,n)},placeholder:" ",uicontrol:e.field.uiControl,title:e.field.title,name:"".concat(e.name,"-").concat(n)},null,8,["model-value","options","onUpdate:modelValue","uicontrol","title","name"])])):Object(i["createCommentVNode"])("",!0),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,yi),[[i["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function wi(e){return Ci(e)||Si(e)||ki(e)||ji()}function ji(){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 ki(e,t){if(e){if("string"===typeof e)return Pi(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)?Pi(e,t):void 0}}function Si(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Ci(e){if(Array.isArray(e))return Pi(e)}function Pi(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 Di=An("CorePluginsAdmin","Field"),Ei=Object(i["defineComponent"])({props:{modelValue:Array,name:String,field:Object},components:{Field:Di},emits:["update:modelValue"],watch:{modelValue:function(e){this.checkEmptyModelValue(e)}},mounted:function(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue:function(e){e&&e.length&&""===e.slice(-1)[0]||this.$emit("update:modelValue",[].concat(wi(e||[]),[""]))},onEntryChange:function(e,t){var n=wi(this.modelValue);n[t]=e,this.$emit("update:modelValue",n)},removeEntry:function(e){if(e>-1){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}}}});Ei.render=Oi;var Vi=Ei; + */pn({component:ho,directiveName:"piwikQuickAccess",events:{itemSelected:function(e,t,n,r,i,o,a){a()},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}}});function go(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vo={class:"fieldArray form-group"},bo={key:0,class:"fieldUiControl"},yo=["onClick","title"];function Oo(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("Field");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",vo,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.modelValue,(function(t,n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["fieldArrayTable multiple valign-wrapper",go({},"fieldArrayTable".concat(n),!0)]),key:n},[e.field.uiControl?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",bo,[Object(o["createVNode"])(c,{"full-width":!0,"model-value":t,options:e.field.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(t,n)},placeholder:" ",uicontrol:e.field.uiControl,title:e.field.title,name:"".concat(e.name,"-").concat(n)},null,8,["model-value","options","onUpdate:modelValue","uicontrol","title","name"])])):Object(o["createCommentVNode"])("",!0),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,yo),[[o["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function wo(e){return Co(e)||So(e)||ko(e)||jo()}function jo(){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 ko(e,t){if(e){if("string"===typeof e)return Po(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)?Po(e,t):void 0}}function So(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Co(e){if(Array.isArray(e))return Po(e)}function Po(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 Do=An("CorePluginsAdmin","Field"),Eo=Object(o["defineComponent"])({props:{modelValue:Array,name:String,field:Object},components:{Field:Do},emits:["update:modelValue"],watch:{modelValue:function(e){this.checkEmptyModelValue(e)}},mounted:function(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue:function(e){e&&e.length&&""===e.slice(-1)[0]||this.$emit("update:modelValue",[].concat(wo(e||[]),[""]))},onEntryChange:function(e,t){var n=wo(this.modelValue||[]);n[t]=e,this.$emit("update:modelValue",n)},removeEntry:function(e){if(e>-1&&this.modelValue){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}}}});Eo.render=Oo;var Vo=Eo; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */pn({component:Vi,require:"?ngModel",scope:{name:{angularJsBind:"="},field:{angularJsBind:"="}},directiveName:"matomoFieldArray",events:{"update:modelValue":function(e,t,n,r,o,i){e!==t.modelValue&&(r.trigger("change",e),i&&i.$setViewValue(e))}},postCreate:function(e,t,n,r,o){var i=o;i&&(i.$setViewValue(e.modelValue),i.$render=function(){angular.isString(i.$viewValue)?e.modelValue=JSON.parse(i.$viewValue):e.modelValue=i.$viewValue})}});function Ni(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ti={class:"multiPairField form-group"},Ai={key:1,class:"fieldUiControl fieldUiControl2"},Ii={key:2,class:"fieldUiControl fieldUiControl3"},xi={key:3,class:"fieldUiControl fieldUiControl4"},Bi=["onClick","title"];function Mi(e,t,n,r,o,a){var c=Object(i["resolveComponent"])("Field");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ti,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.modelValue,(function(t,n){var r;return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper",(r={},Ni(r,"multiPairFieldTable".concat(n),!0),Ni(r,"has".concat(e.fieldCount,"Fields"),!0),r)]),key:n},[e.field1?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:0,class:Object(i["normalizeClass"])(["fieldUiControl fieldUiControl1",{hasMultiFields:e.field1.type&&e.field2.type}])},[Object(i["createVNode"])(c,{"full-width":!0,modelValue:t[e.field1.key],"onUpdate:modelValue":[function(n){return t[e.field1.key]=n},function(t){return e.onEntryChange(n,e.field1.key,t)}],options:e.field1.availableValues,placeholder:" ",uicontrol:e.field1.uiControl,name:"".concat(e.name,"-p1-").concat(n),title:e.field1.title},null,8,["modelValue","onUpdate:modelValue","options","uicontrol","name","title"])],2)):Object(i["createCommentVNode"])("",!0),e.field2?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ai,[Object(i["createVNode"])(c,{"full-width":!0,options:e.field2.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field2.key,t)},function(n){return t[e.field2.key]=n}],modelValue:t[e.field2.key],placeholder:" ",uicontrol:e.field2.uiControl,name:"".concat(e.name,"-p2-").concat(n),title:e.field2.title},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","name","title"])])):Object(i["createCommentVNode"])("",!0),e.field3?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ii,[Object(i["createVNode"])(c,{"full-width":!0,options:e.field3.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field3.key,t)},function(n){return t[e.field3.key]=n}],modelValue:t[e.field3.key],placeholder:" ",uicontrol:e.field3.uiControl,title:e.field3.title},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title"])])):Object(i["createCommentVNode"])("",!0),e.field4?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",xi,[Object(i["createVNode"])(c,{"full-width":!0,options:e.field4.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field4.key,t)},function(n){return t[e.field4.key]=n}],modelValue:t[e.field4.key],placeholder:" ",uicontrol:e.field4.uiControl,title:e.field4.title},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title"])])):Object(i["createCommentVNode"])("",!0),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,Bi),[[i["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function Li(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 Fi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Li(Object(n),!0).forEach((function(t){Ri(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Li(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ri(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _i(e){return Wi(e)||Ui(e)||Hi(e)||$i()}function $i(){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 Hi(e,t){if(e){if("string"===typeof e)return qi(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)?qi(e,t):void 0}}function Ui(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Wi(e){if(Array.isArray(e))return qi(e)}function qi(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 Ji=An("CorePluginsAdmin","Field"),Gi=Object(i["defineComponent"])({props:{modelValue:Array,name:String,field1:Object,field2:Object,field3:Object,field4:Object},components:{Field:Ji},computed:{fieldCount:function(){return this.field1&&this.field2&&this.field3&&this.field4?4:this.field1&&this.field2&&this.field3?3:this.field1&&this.field2?2:this.field1?1:0}},emits:["update:modelValue"],watch:{modelValue:function(e){this.checkEmptyModelValue(e)}},mounted:function(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue:function(e){e&&e.length&&!this.isEmptyValue(e.slice(-1)[0])||this.$emit("update:modelValue",[].concat(_i(e||[]),[this.makeEmptyValue()]))},onEntryChange:function(e,t,n){var r=_i(this.modelValue);r[e]=Fi(Fi({},r[e]),{},Ri({},t,n)),this.$emit("update:modelValue",r)},removeEntry:function(e){if(e>-1){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}},isEmptyValue:function(e){var t=this.fieldCount;if(4===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key]&&!e[this.field4.key])return!1}else if(3===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key])return!1}else if(2===t){if(!e[this.field1.key]&&!e[this.field2.key])return!1}else if(1===t&&!e[this.field1.key])return!1;return!0},makeEmptyValue:function(){var e={};return this.field1&&this.field1.key&&(e[this.field1.key]=""),this.field2&&this.field2.key&&(e[this.field2.key]=""),this.field3&&this.field3.key&&(e[this.field3.key]=""),this.field4&&this.field4.key&&(e[this.field4.key]=""),e}}});Gi.render=Mi;var zi=Gi,Yi=(pn({component:zi,require:"?ngModel",scope:{name:{angularJsBind:"="},field1:{angularJsBind:"="},field2:{angularJsBind:"="},field3:{angularJsBind:"="},field4:{angularJsBind:"="}},directiveName:"matomoMultiPairField",events:{"update:modelValue":function(e,t,n,r,o,i){e!==t.modelValue&&(r.trigger("change",e),i&&i.$setViewValue(e))}},postCreate:function(e,t,n,r,o){var i=o;i&&(i.$setViewValue(e.modelValue),i.$render=function(){angular.isString(i.$viewValue)?e.modelValue=JSON.parse(i.$viewValue):e.modelValue=i.$viewValue})}}),{ref:"root",class:"periodSelector piwikSelector"}),Qi=["title"],Ki=Object(i["createElementVNode"])("span",{class:"icon icon-calendar"},null,-1),Xi={id:"periodMore",class:"dropdown"},Zi={class:"flex"},ea={key:0,class:"period-date"},ta={class:"period-type"},na={id:"otherPeriods"},ra=["onDblclick","title"],oa=["id","checked","onChange","onDblclick"],ia={key:0,class:"compare-checkbox"},aa={id:"comparePeriodToDropdown"},ca={key:1,class:"compare-date-range"},la={id:"comparePeriodStartDate"},sa=Object(i["createElementVNode"])("span",{class:"compare-dates-separator"},null,-1),ua={id:"comparePeriodEndDate"},da={class:"apply-button-container"},pa=["disabled","value"],fa={key:2,id:"ajaxLoadingCalendar"},ma={class:"loadingSegment"}; + */pn({component:Vo,require:"?ngModel",scope:{name:{angularJsBind:"="},field:{angularJsBind:"="}},directiveName:"matomoFieldArray",events:{"update:modelValue":function(e,t,n,r,i,o){e!==t.modelValue&&(r.trigger("change",e),o&&o.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var o=i;o&&(o.$setViewValue(e.modelValue),o.$render=function(){window.angular.isString(o.$viewValue)?e.modelValue=JSON.parse(o.$viewValue):e.modelValue=o.$viewValue})}});function No(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var To={class:"multiPairField form-group"},Ao={key:1,class:"fieldUiControl fieldUiControl2"},xo={key:2,class:"fieldUiControl fieldUiControl3"},Io={key:3,class:"fieldUiControl fieldUiControl4"},Bo=["onClick","title"];function Lo(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("Field");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",To,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.modelValue,(function(t,n){var r;return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper",(r={},No(r,"multiPairFieldTable".concat(n),!0),No(r,"has".concat(e.fieldCount,"Fields"),!0),r)]),key:n},[e.field1?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:0,class:Object(o["normalizeClass"])(["fieldUiControl fieldUiControl1",{hasMultiFields:e.field1.type&&e.field2.type}])},[Object(o["createVNode"])(c,{"full-width":!0,modelValue:t[e.field1.key],"onUpdate:modelValue":[function(n){return t[e.field1.key]=n},function(t){return e.onEntryChange(n,e.field1.key,t)}],options:e.field1.availableValues,placeholder:" ",uicontrol:e.field1.uiControl,name:"".concat(e.name,"-p1-").concat(n),title:e.field1.title},null,8,["modelValue","onUpdate:modelValue","options","uicontrol","name","title"])],2)):Object(o["createCommentVNode"])("",!0),e.field2?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ao,[Object(o["createVNode"])(c,{"full-width":!0,options:e.field2.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field2.key,t)},function(n){return t[e.field2.key]=n}],modelValue:t[e.field2.key],placeholder:" ",uicontrol:e.field2.uiControl,name:"".concat(e.name,"-p2-").concat(n),title:e.field2.title},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","name","title"])])):Object(o["createCommentVNode"])("",!0),e.field3?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",xo,[Object(o["createVNode"])(c,{"full-width":!0,options:e.field3.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field3.key,t)},function(n){return t[e.field3.key]=n}],modelValue:t[e.field3.key],placeholder:" ",uicontrol:e.field3.uiControl,title:e.field3.title},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title"])])):Object(o["createCommentVNode"])("",!0),e.field4?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Io,[Object(o["createVNode"])(c,{"full-width":!0,options:e.field4.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field4.key,t)},function(n){return t[e.field4.key]=n}],modelValue:t[e.field4.key],placeholder:" ",uicontrol:e.field4.uiControl,title:e.field4.title},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title"])])):Object(o["createCommentVNode"])("",!0),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,Bo),[[o["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function Mo(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 Fo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mo(Object(n),!0).forEach((function(t){Ro(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ro(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _o(e){return qo(e)||Uo(e)||Ho(e)||$o()}function $o(){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 Ho(e,t){if(e){if("string"===typeof e)return Wo(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)?Wo(e,t):void 0}}function Uo(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function qo(e){if(Array.isArray(e))return Wo(e)}function Wo(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 Jo=An("CorePluginsAdmin","Field"),Go=Object(o["defineComponent"])({props:{modelValue:Array,name:String,field1:Object,field2:Object,field3:Object,field4:Object},components:{Field:Jo},computed:{fieldCount:function(){return this.field1&&this.field2&&this.field3&&this.field4?4:this.field1&&this.field2&&this.field3?3:this.field1&&this.field2?2:this.field1?1:0}},emits:["update:modelValue"],watch:{modelValue:function(e){this.checkEmptyModelValue(e)}},mounted:function(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue:function(e){e&&e.length&&!this.isEmptyValue(e.slice(-1)[0])||this.$emit("update:modelValue",[].concat(_o(e||[]),[this.makeEmptyValue()]))},onEntryChange:function(e,t,n){var r=_o(this.modelValue);r[e]=Fo(Fo({},r[e]),{},Ro({},t,n)),this.$emit("update:modelValue",r)},removeEntry:function(e){if(e>-1&&this.modelValue){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}},isEmptyValue:function(e){var t=this.fieldCount;if(4===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key]&&!e[this.field4.key])return!1}else if(3===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key])return!1}else if(2===t){if(!e[this.field1.key]&&!e[this.field2.key])return!1}else if(1===t&&!e[this.field1.key])return!1;return!0},makeEmptyValue:function(){var e={};return this.field1&&this.field1.key&&(e[this.field1.key]=""),this.field2&&this.field2.key&&(e[this.field2.key]=""),this.field3&&this.field3.key&&(e[this.field3.key]=""),this.field4&&this.field4.key&&(e[this.field4.key]=""),e}}});Go.render=Lo;var zo=Go,Yo=(pn({component:zo,require:"?ngModel",scope:{name:{angularJsBind:"="},field1:{angularJsBind:"="},field2:{angularJsBind:"="},field3:{angularJsBind:"="},field4:{angularJsBind:"="}},directiveName:"matomoMultiPairField",events:{"update:modelValue":function(e,t,n,r,i,o){e!==t.modelValue&&(r.trigger("change",e),o&&o.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var o=i;o&&(o.$setViewValue(e.modelValue),o.$render=function(){window.angular.isString(o.$viewValue)?e.modelValue=JSON.parse(o.$viewValue):e.modelValue=o.$viewValue})}}),{ref:"root",class:"periodSelector piwikSelector"}),Qo=["title"],Ko=Object(o["createElementVNode"])("span",{class:"icon icon-calendar"},null,-1),Xo={id:"periodMore",class:"dropdown"},Zo={class:"flex"},ea={key:0,class:"period-date"},ta={class:"period-type"},na={id:"otherPeriods"},ra=["onDblclick","title"],ia=["id","checked","onChange","onDblclick"],oa={key:0,class:"compare-checkbox"},aa={id:"comparePeriodToDropdown"},ca={key:1,class:"compare-date-range"},la={id:"comparePeriodStartDate"},sa=Object(o["createElementVNode"])("span",{class:"compare-dates-separator"},null,-1),ua={id:"comparePeriodEndDate"},da={class:"apply-button-container"},pa=["disabled","value"],fa={key:2,id:"ajaxLoadingCalendar"},ma={class:"loadingSegment"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ha(e,t,n,r,o,a){var c=Object(i["resolveComponent"])("DateRangePicker"),l=Object(i["resolveComponent"])("PeriodDatePicker"),s=Object(i["resolveComponent"])("Field"),u=Object(i["resolveComponent"])("ActivityIndicator"),d=Object(i["resolveDirective"])("expand-on-click");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Yi,[Object(i["createElementVNode"])("a",{ref:"title",id:"date",class:"title",tabindex:"-1",title:e.translate("General_ChooseDate",e.currentlyViewingText)},[Ki,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.currentlyViewingText),1)],8,Qi),Object(i["createElementVNode"])("div",Xi,[Object(i["createElementVNode"])("div",Zi,[Object(i["createElementVNode"])("div",null,[Object(i["withDirectives"])(Object(i["createVNode"])(c,{class:"period-range","start-date":e.startRangeDate,"end-date":e.endRangeDate,onRangeChange:t[0]||(t[0]=function(t){return e.onRangeChange(t.start,t.end)}),onSubmit:t[1]||(t[1]=function(t){return e.onApplyClicked()})},null,8,["start-date","end-date"]),[[i["vShow"],"range"===e.selectedPeriod]]),"range"!==e.selectedPeriod?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ea,[Object(i["createVNode"])(l,{id:"datepicker",period:e.selectedPeriod,date:e.periodValue===e.selectedPeriod?e.dateValue:null,onSelect:t[2]||(t[2]=function(t){return e.setPiwikPeriodAndDate(e.selectedPeriod,t.date)})},null,8,["period","date"])])):Object(i["createCommentVNode"])("",!0)]),Object(i["createElementVNode"])("div",ta,[Object(i["createElementVNode"])("h6",null,Object(i["toDisplayString"])(e.translate("General_Period")),1),Object(i["createElementVNode"])("div",na,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.periodsFiltered,(function(n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("p",{key:n},[Object(i["createElementVNode"])("label",{class:Object(i["normalizeClass"])({"selected-period-label":n===e.selectedPeriod}),onDblclick:function(t){return e.changeViewedPeriod(n)},title:n===e.periodValue?"":e.translate("General_DoubleClickToChangePeriod")},[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"radio",name:"period",id:"period_id_".concat(n),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.selectedPeriod=t}),checked:e.selectedPeriod===n,onChange:function(t){return e.selectedPeriod=n},onDblclick:function(t){return e.changeViewedPeriod(n)}},null,40,oa),[[i["vModelRadio"],e.selectedPeriod]]),Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.getPeriodDisplayText(n)),1)],42,ra)])})),128))])])]),e.isComparisonEnabled?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ia,[Object(i["createElementVNode"])("label",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{id:"comparePeriodTo",type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=function(t){return e.isComparing=t})},null,512),[[i["vModelCheckbox"],e.isComparing]]),Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("General_CompareTo")),1)]),Object(i["createElementVNode"])("div",aa,[Object(i["createVNode"])(s,{modelValue:e.comparePeriodType,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.comparePeriodType=t}),style:Object(i["normalizeStyle"])({visibility:e.isComparing?"visible":"hidden"}),name:"comparePeriodToDropdown",uicontrol:"select",options:e.comparePeriodDropdownOptions,"full-width":!0,disabled:!e.isComparing},null,8,["modelValue","style","options","disabled"])])])):Object(i["createCommentVNode"])("",!0),e.isComparing&&"custom"===e.comparePeriodType?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ca,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",la,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(s,{modelValue:e.compareStartDate,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.compareStartDate=t}),name:"comparePeriodStartDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_StartDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])]),sa,Object(i["createElementVNode"])("div",ua,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(s,{modelValue:e.compareEndDate,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.compareEndDate=t}),name:"comparePeriodEndDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_EndDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])])])])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",da,[Object(i["createElementVNode"])("input",{type:"submit",id:"calendarApply",class:"btn",onClick:t[8]||(t[8]=function(t){return e.onApplyClicked()}),disabled:!e.isApplyEnabled(),value:e.translate("General_Apply")},null,8,pa)]),e.isLoadingNewPage?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",fa,[Object(i["createVNode"])(u,{loading:!0}),Object(i["createElementVNode"])("div",ma,Object(i["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)])):Object(i["createCommentVNode"])("",!0)])],512)),[[d,{expander:"title"}]])}var ga={class:"loadingPiwik"},va=Object(i["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:""},null,-1);function ba(e,t,n,r,o,a){return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ga,[va,Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.loadingMessage),1)],512)),[[i["vShow"],e.loading]])}var ya=Object(i["defineComponent"])({props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:C("General_LoadingData")}}});ya.render=ba;var Oa=ya;function wa(e,t){return Pa(e)||Ca(e,t)||ka(e,t)||ja()}function ja(){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 ka(e,t){if(e){if("string"===typeof e)return Sa(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)?Sa(e,t):void 0}}function Sa(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 Ca(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){c=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw o}}return i}}function Pa(e){if(Array.isArray(e))return e}function Da(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 Ea(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Da(Object(n),!0).forEach((function(t){Va(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Da(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Va(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Na=An("CorePluginsAdmin","Field"),Ta=S.helper.htmlDecode(" "),Aa=[{key:"custom",value:C("General_Custom")},{key:"previousPeriod",value:C("General_PreviousPeriod").replace(/\s+/,Ta)},{key:"previousYear",value:C("General_PreviousYear").replace(/\s+/,Ta)}],Ia=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),xa=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay);function Ba(e){return"[object Date]"===Object.prototype.toString.call(e)&&!Number.isNaN(e.getTime())}var Ma=Object(i["defineComponent"])({props:{periods:Array},components:{DateRangePicker:lo,PeriodDatePicker:mo,Field:Na,ActivityIndicator:Oa},directives:{ExpandOnClick:St},data:function(){return{comparePeriodDropdownOptions:Aa,periodValue:null,dateValue:null,selectedPeriod:null,startRangeDate:null,endRangeDate:null,isRangeValid:null,isLoadingNewPage:!1,isComparing:null,comparePeriodType:"previousPeriod",compareStartDate:"",compareEndDate:""}},mounted:function(){var e=this;S.on("hidePeriodSelector",(function(){window.$(e.$refs.root).hide()})),S.on("piwikPageChange",(function(){window.$(e.$refs.root).show()})),this.updateSelectedValuesFromHash(),Object(i["watch"])((function(){return De.parsed.value}),this.updateSelectedValuesFromHash),this.isComparing=fr.isComparingPeriods(),Object(i["watch"])((function(){return fr.isComparingPeriods()}),(function(t){e.isComparing=t})),window.initTopControls(),this.handleZIndexPositionRelativeCompareDropdownIssue()},computed:{currentlyViewingText:function(){var e;if("range"===this.periodValue){if(!this.startRangeDate||!this.endRangeDate)return C("General_Error");e="".concat(this.startRangeDate,",").concat(this.endRangeDate)}else{if(!this.dateValue)return C("General_Error");e=P(this.dateValue)}try{return p.parse(this.periodValue,e).getPrettyString()}catch(t){return C("General_Error")}},isComparisonEnabled:function(){return fr.isComparisonEnabled()},periodsFiltered:function(){return(this.periods||[]).filter((function(e){return p.isRecognizedPeriod(e)}))},selectedComparisonParams:function(){if(!this.isComparing)return{};if("custom"===this.comparePeriodType)return{comparePeriods:["range"],compareDates:["".concat(this.compareStartDate,",").concat(this.compareEndDate)]};if("previousPeriod"===this.comparePeriodType)return{comparePeriods:[this.selectedPeriod],compareDates:[this.previousPeriodDateToSelectedPeriod]};if("previousYear"===this.comparePeriodType){var e="range"===this.selectedPeriod?"".concat(this.startRangeDate,",").concat(this.endRangeDate):this.dateValue,t=p.parse(this.selectedPeriod,e).getDateRange();return t[0].setFullYear(t[0].getFullYear()-1),t[1].setFullYear(t[1].getFullYear()-1),"range"===this.selectedPeriod?{comparePeriods:["range"],compareDates:["".concat(P(t[0]),",").concat(P(t[1]))]}:{comparePeriods:[this.selectedPeriod],compareDates:[P(t[0])]}}return console.warn("Unknown compare period type: ".concat(this.comparePeriodType)),{}},previousPeriodDateToSelectedPeriod:function(){if("range"===this.selectedPeriod){var e=E(this.startRangeDate),t=E(this.endRangeDate),n=_.getLastNRange("day",2,e).startDate,r=Math.floor((t-e)/864e5),o=_.getLastNRange("day",1+r,n);return"".concat(P(o.startDate),",").concat(P(o.endDate))}var i=_.getLastNRange(this.selectedPeriod,2,this.dateValue).startDate;return P(i)},selectedDateString:function(){if("range"===this.selectedPeriod){var e=this.startRangeDate,t=this.endRangeDate,n=E(e),r=E(t);return!Ba(n)||!Ba(r)||n>r?(window.$("#alert").find("h2").text(C("General_InvalidDateRange")),S.helper.modalConfirm("#alert",{}),null):"".concat(e,",").concat(t)}return P(this.dateValue)}},methods:{handleZIndexPositionRelativeCompareDropdownIssue:function(){var e=window.$(this.$refs.root);e.on("focus","#comparePeriodToDropdown .select-dropdown",(function(){e.addClass("compare-dropdown-open")})).on("blur","#comparePeriodToDropdown .select-dropdown",(function(){e.removeClass("compare-dropdown-open")}))},changeViewedPeriod:function(){this.period!==this.periodValue&&"range"!==this.period&&this.setPiwikPeriodAndDate(this.period,this.dateValue)},setPiwikPeriodAndDate:function(e,t){this.periodValue=e,this.selectedPeriod=e,this.dateValue=t;var n=P(t);this.setRangeStartEndFromPeriod(e,n),this.propagateNewUrlParams(n,this.selectedPeriod),window.initTopControls()},propagateNewUrlParams:function(e,t){var n,r=this.selectedComparisonParams;S.helper.isAngularRenderingThePage()?(this.closePeriodSelector(),n=De.hashParsed.value):(this.isLoadingNewPage=!0,n=De.parsed.value);var o=Ea({},n);delete o.comparePeriods,delete o.compareDates,De.updateLocation(Ea(Ea({},o),{},{date:e,period:t},r))},onApplyClicked:function(){if("range"===this.selectedPeriod){var e=this.selectedDateString;if(!e)return;return this.periodValue="range",void this.propagateNewUrlParams(e,"range")}this.setPiwikPeriodAndDate(this.selectedPeriod,this.dateValue)},updateSelectedValuesFromHash:function(){var e=De.parsed.value,t=e.date,n=e.period;this.periodValue=n,this.selectedPeriod=n,this.dateValue=null,this.startRangeDate=null,this.endRangeDate=null;try{p.parse(n,t)}catch(l){return}if("range"===n){var r=p.get(n).parse(t),o=r.getDateRange(),i=wa(o,2),a=i[0],c=i[1];this.dateValue=a,this.startRangeDate=P(a),this.endRangeDate=P(c)}else this.dateValue=E(t),this.setRangeStartEndFromPeriod(n,t)},setRangeStartEndFromPeriod:function(e,t){var n=p.parse(e,t).getDateRange();this.startRangeDate=P(n[0]<Ia?Ia:n[0]),this.endRangeDate=P(n[1]>xa?xa:n[1])},getPeriodDisplayText:function(e){return p.get(e).getDisplayText()},onRangeChange:function(e,t){e&&t?(this.isRangeValid=!0,this.startRangeDate=e,this.endRangeDate=t):this.isRangeValid=!1},isApplyEnabled:function(){return!("range"===this.selectedPeriod&&!this.isRangeValid)&&!(this.isComparing&&"custom"===this.comparePeriodType&&!this.isCompareRangeValid())},closePeriodSelector:function(){this.$refs.root.classList.remove("expanded")},isCompareRangeValid:function(){try{E(this.compareStartDate)}catch(e){return!1}try{E(this.compareEndDate)}catch(e){return!1}return!0}}});Ma.render=ha;var La=Ma,Fa=(pn({component:La,scope:{periods:{angularJsBind:"<"}},directiveName:"piwikPeriodSelector"}),{class:"reportingMenu"}),Ra=["aria-label"],_a=["onClick"],$a={class:"hidden"},Ha={role:"menu"},Ua=["href","onClick","title"],Wa=["href","onClick"],qa=["onClick"],Ja=Object(i["createElementVNode"])("span",{class:"icon-help"},null,-1),Ga=[Ja],za={id:"mobile-left-menu",class:"sidenav hide-on-large-only"},Ya={class:"collapsible collapsible-accordion"},Qa={class:"collapsible-header"},Ka={class:"collapsible-body"},Xa={key:0},Za=["onClick","href"],ec={key:1},tc=["onClick","href"]; + */function ha(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("DateRangePicker"),l=Object(o["resolveComponent"])("PeriodDatePicker"),s=Object(o["resolveComponent"])("Field"),u=Object(o["resolveComponent"])("ActivityIndicator"),d=Object(o["resolveDirective"])("expand-on-click");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Yo,[Object(o["createElementVNode"])("a",{ref:"title",id:"date",class:"title",tabindex:"-1",title:e.translate("General_ChooseDate",e.currentlyViewingText)},[Ko,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.currentlyViewingText),1)],8,Qo),Object(o["createElementVNode"])("div",Xo,[Object(o["createElementVNode"])("div",Zo,[Object(o["createElementVNode"])("div",null,[Object(o["withDirectives"])(Object(o["createVNode"])(c,{class:"period-range","start-date":e.startRangeDate,"end-date":e.endRangeDate,onRangeChange:t[0]||(t[0]=function(t){return e.onRangeChange(t.start,t.end)}),onSubmit:t[1]||(t[1]=function(t){return e.onApplyClicked()})},null,8,["start-date","end-date"]),[[o["vShow"],"range"===e.selectedPeriod]]),"range"!==e.selectedPeriod?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ea,[Object(o["createVNode"])(l,{id:"datepicker",period:e.selectedPeriod,date:e.periodValue===e.selectedPeriod?e.dateValue:null,onSelect:t[2]||(t[2]=function(t){return e.setPiwikPeriodAndDate(e.selectedPeriod,t.date)})},null,8,["period","date"])])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",ta,[Object(o["createElementVNode"])("h6",null,Object(o["toDisplayString"])(e.translate("General_Period")),1),Object(o["createElementVNode"])("div",na,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.periodsFiltered,(function(n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:n},[Object(o["createElementVNode"])("label",{class:Object(o["normalizeClass"])({"selected-period-label":n===e.selectedPeriod}),onDblclick:function(t){return e.changeViewedPeriod(n)},title:n===e.periodValue?"":e.translate("General_DoubleClickToChangePeriod")},[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"radio",name:"period",id:"period_id_".concat(n),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.selectedPeriod=t}),checked:e.selectedPeriod===n,onChange:function(t){return e.selectedPeriod=n},onDblclick:function(t){return e.changeViewedPeriod(n)}},null,40,ia),[[o["vModelRadio"],e.selectedPeriod]]),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.getPeriodDisplayText(n)),1)],42,ra)])})),128))])])]),e.isComparisonEnabled?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",oa,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{id:"comparePeriodTo",type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=function(t){return e.isComparing=t})},null,512),[[o["vModelCheckbox"],e.isComparing]]),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.translate("General_CompareTo")),1)]),Object(o["createElementVNode"])("div",aa,[Object(o["createVNode"])(s,{modelValue:e.comparePeriodType,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.comparePeriodType=t}),style:Object(o["normalizeStyle"])({visibility:e.isComparing?"visible":"hidden"}),name:"comparePeriodToDropdown",uicontrol:"select",options:e.comparePeriodDropdownOptions,"full-width":!0,disabled:!e.isComparing},null,8,["modelValue","style","options","disabled"])])])):Object(o["createCommentVNode"])("",!0),e.isComparing&&"custom"===e.comparePeriodType?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ca,[Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("div",la,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(s,{modelValue:e.compareStartDate,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.compareStartDate=t}),name:"comparePeriodStartDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_StartDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])]),sa,Object(o["createElementVNode"])("div",ua,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(s,{modelValue:e.compareEndDate,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.compareEndDate=t}),name:"comparePeriodEndDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_EndDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])])])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",da,[Object(o["createElementVNode"])("input",{type:"submit",id:"calendarApply",class:"btn",onClick:t[8]||(t[8]=function(t){return e.onApplyClicked()}),disabled:!e.isApplyEnabled(),value:e.translate("General_Apply")},null,8,pa)]),e.isLoadingNewPage?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",fa,[Object(o["createVNode"])(u,{loading:!0}),Object(o["createElementVNode"])("div",ma,Object(o["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)])):Object(o["createCommentVNode"])("",!0)])],512)),[[d,{expander:"title"}]])}var ga={class:"loadingPiwik"},va=Object(o["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:""},null,-1);function ba(e,t,n,r,i,a){return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ga,[va,Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.loadingMessage),1)],512)),[[o["vShow"],e.loading]])}var ya=Object(o["defineComponent"])({props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:C("General_LoadingData")}}});ya.render=ba;var Oa=ya;function wa(e,t){return Pa(e)||Ca(e,t)||ka(e,t)||ja()}function ja(){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 ka(e,t){if(e){if("string"===typeof e)return Sa(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)?Sa(e,t):void 0}}function Sa(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 Ca(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(o.push(r.value),t&&o.length===t)break}catch(l){c=!0,i=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}return o}}function Pa(e){if(Array.isArray(e))return e}function Da(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 Ea(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Da(Object(n),!0).forEach((function(t){Va(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Da(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Va(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Na=An("CorePluginsAdmin","Field"),Ta=S.helper.htmlDecode(" "),Aa=[{key:"custom",value:C("General_Custom")},{key:"previousPeriod",value:C("General_PreviousPeriod").replace(/\s+/,Ta)},{key:"previousYear",value:C("General_PreviousYear").replace(/\s+/,Ta)}],xa=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),Ia=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay);function Ba(e){return"[object Date]"===Object.prototype.toString.call(e)&&!Number.isNaN(e.getTime())}var La=Object(o["defineComponent"])({props:{periods:Array},components:{DateRangePicker:li,PeriodDatePicker:fi,Field:Na,ActivityIndicator:Oa},directives:{ExpandOnClick:St},data:function(){var e=De.parsed.value.period;return{comparePeriodDropdownOptions:Aa,periodValue:e,dateValue:null,selectedPeriod:e,startRangeDate:null,endRangeDate:null,isRangeValid:null,isLoadingNewPage:!1,isComparing:null,comparePeriodType:"previousPeriod",compareStartDate:"",compareEndDate:""}},mounted:function(){var e=this;S.on("hidePeriodSelector",(function(){window.$(e.$refs.root).hide()})),S.on("piwikPageChange",(function(){window.$(e.$refs.root).show()})),this.updateSelectedValuesFromHash(),Object(o["watch"])((function(){return De.parsed.value}),this.updateSelectedValuesFromHash),this.isComparing=fr.isComparingPeriods(),Object(o["watch"])((function(){return fr.isComparingPeriods()}),(function(t){e.isComparing=t})),window.initTopControls(),this.handleZIndexPositionRelativeCompareDropdownIssue()},computed:{currentlyViewingText:function(){var e;if("range"===this.periodValue){if(!this.startRangeDate||!this.endRangeDate)return C("General_Error");e="".concat(this.startRangeDate,",").concat(this.endRangeDate)}else{if(!this.dateValue)return C("General_Error");e=P(this.dateValue)}try{return p.parse(this.periodValue,e).getPrettyString()}catch(t){return C("General_Error")}},isComparisonEnabled:function(){return fr.isComparisonEnabled()},periodsFiltered:function(){return(this.periods||[]).filter((function(e){return p.isRecognizedPeriod(e)}))},selectedComparisonParams:function(){if(!this.isComparing)return{};if("custom"===this.comparePeriodType)return{comparePeriods:["range"],compareDates:["".concat(this.compareStartDate,",").concat(this.compareEndDate)]};if("previousPeriod"===this.comparePeriodType)return{comparePeriods:[this.selectedPeriod],compareDates:[this.previousPeriodDateToSelectedPeriod]};if("previousYear"===this.comparePeriodType){var e="range"===this.selectedPeriod?"".concat(this.startRangeDate,",").concat(this.endRangeDate):P(this.dateValue),t=p.parse(this.selectedPeriod,e).getDateRange();return t[0].setFullYear(t[0].getFullYear()-1),t[1].setFullYear(t[1].getFullYear()-1),"range"===this.selectedPeriod?{comparePeriods:["range"],compareDates:["".concat(P(t[0]),",").concat(P(t[1]))]}:{comparePeriods:[this.selectedPeriod],compareDates:[P(t[0])]}}return console.warn("Unknown compare period type: ".concat(this.comparePeriodType)),{}},previousPeriodDateToSelectedPeriod:function(){if("range"===this.selectedPeriod){var e=E(this.startRangeDate),t=E(this.endRangeDate),n=_.getLastNRange("day",2,e).startDate,r=Math.floor((t.valueOf()-e.valueOf())/864e5),i=_.getLastNRange("day",1+r,n);return"".concat(P(i.startDate),",").concat(P(i.endDate))}var o=_.getLastNRange(this.selectedPeriod,2,this.dateValue).startDate;return P(o)},selectedDateString:function(){if("range"===this.selectedPeriod){var e=this.startRangeDate,t=this.endRangeDate,n=E(e),r=E(t);return!Ba(n)||!Ba(r)||n>r?(window.$("#alert").find("h2").text(C("General_InvalidDateRange")),S.helper.modalConfirm("#alert",{}),null):"".concat(e,",").concat(t)}return P(this.dateValue)}},methods:{handleZIndexPositionRelativeCompareDropdownIssue:function(){var e=window.$(this.$refs.root);e.on("focus","#comparePeriodToDropdown .select-dropdown",(function(){e.addClass("compare-dropdown-open")})).on("blur","#comparePeriodToDropdown .select-dropdown",(function(){e.removeClass("compare-dropdown-open")}))},changeViewedPeriod:function(e){e!==this.periodValue&&"range"!==e&&this.setPiwikPeriodAndDate(e,this.dateValue)},setPiwikPeriodAndDate:function(e,t){this.periodValue=e,this.selectedPeriod=e,this.dateValue=t;var n=P(t);this.setRangeStartEndFromPeriod(e,n),this.propagateNewUrlParams(n,this.selectedPeriod),window.initTopControls()},propagateNewUrlParams:function(e,t){var n,r=this.selectedComparisonParams;S.helper.isAngularRenderingThePage()?(this.closePeriodSelector(),n=De.hashParsed.value):(this.isLoadingNewPage=!0,n=De.parsed.value);var i=Ea({},n);delete i.comparePeriods,delete i.compareDates,De.updateLocation(Ea(Ea({},i),{},{date:e,period:t},r))},onApplyClicked:function(){if("range"===this.selectedPeriod){var e=this.selectedDateString;if(!e)return;return this.periodValue="range",void this.propagateNewUrlParams(e,"range")}this.setPiwikPeriodAndDate(this.selectedPeriod,this.dateValue)},updateSelectedValuesFromHash:function(){var e=De.parsed.value.date,t=De.parsed.value.period;this.periodValue=t,this.selectedPeriod=t,this.dateValue=null,this.startRangeDate=null,this.endRangeDate=null;try{p.parse(t,e)}catch(c){return}if("range"===t){var n=p.get(t).parse(e),r=n.getDateRange(),i=wa(r,2),o=i[0],a=i[1];this.dateValue=o,this.startRangeDate=P(o),this.endRangeDate=P(a)}else this.dateValue=E(e),this.setRangeStartEndFromPeriod(t,e)},setRangeStartEndFromPeriod:function(e,t){var n=p.parse(e,t).getDateRange();this.startRangeDate=P(n[0]<xa?xa:n[0]),this.endRangeDate=P(n[1]>Ia?Ia:n[1])},getPeriodDisplayText:function(e){return p.get(e).getDisplayText()},onRangeChange:function(e,t){e&&t?(this.isRangeValid=!0,this.startRangeDate=e,this.endRangeDate=t):this.isRangeValid=!1},isApplyEnabled:function(){return!("range"===this.selectedPeriod&&!this.isRangeValid)&&!(this.isComparing&&"custom"===this.comparePeriodType&&!this.isCompareRangeValid())},closePeriodSelector:function(){this.$refs.root.classList.remove("expanded")},isCompareRangeValid:function(){try{E(this.compareStartDate)}catch(e){return!1}try{E(this.compareEndDate)}catch(e){return!1}return!0}}});La.render=ha;var Ma=La,Fa=(pn({component:Ma,scope:{periods:{angularJsBind:"<"}},directiveName:"piwikPeriodSelector"}),{class:"reportingMenu"}),Ra=["aria-label"],_a=["onClick"],$a={class:"hidden"},Ha={role:"menu"},Ua=["href","onClick","title"],qa=["href","onClick"],Wa=["onClick"],Ja=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),Ga=[Ja],za={id:"mobile-left-menu",class:"sidenav hide-on-large-only"},Ya={class:"collapsible collapsible-accordion"},Qa={class:"collapsible-header"},Ka={class:"collapsible-body"},Xa={key:0},Za=["onClick","href"],ec={key:1},tc=["onClick","href"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function nc(e,t,n,r,o,a){var c=Object(i["resolveComponent"])("MenuDropdown"),l=Object(i["resolveDirective"])("side-nav");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Fa,[Object(i["createElementVNode"])("ul",{class:"navbar hide-on-med-and-down",role:"menu","aria-label":e.translate("CoreHome_MainNavigation")},[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.menu,(function(t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{class:Object(i["normalizeClass"])(["menuTab",{active:t.id===e.activeCategory}]),role:"menuitem",key:t.id},[Object(i["createElementVNode"])("a",{class:"item",tabindex:"5",href:"",onClick:Object(i["withModifiers"])((function(n){return e.loadCategory(t)}),["prevent"])},[Object(i["createElementVNode"])("span",{class:Object(i["normalizeClass"])("menu-icon ".concat(t.icon?t.icon:"icon-arrow-right"))},null,2),Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.name)+" ",1),Object(i["createElementVNode"])("span",$a,Object(i["toDisplayString"])(e.translate("CoreHome_Menu")),1)],8,_a),Object(i["createElementVNode"])("ul",Ha,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(t.subcategories,(function(n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{role:"menuitem",class:Object(i["normalizeClass"])({active:(n.id===e.displayedSubcategory||n.isGroup&&e.activeSubsubcategory===e.displayedSubcategory)&&t.id===e.displayedCategory}),key:n.id},[n.isGroup?(Object(i["openBlock"])(),Object(i["createBlock"])(c,{key:0,"show-search":!0,"menu-title":e.htmlEntities(n.name)},{default:Object(i["withCtx"])((function(){return[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(n.subcategories,(function(r){return Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{class:Object(i["normalizeClass"])(["item",{active:r.id===e.activeSubsubcategory&&n.id===e.displayedSubcategory&&t.id===e.displayedCategory}]),tabindex:"5",href:"#?".concat(e.makeUrl(t,r)),onClick:function(n){return e.loadSubcategory(t,r,n)},title:r.tooltip,key:r.id},Object(i["toDisplayString"])(r.name),11,Ua)})),128))]})),_:2},1032,["menu-title"])):Object(i["createCommentVNode"])("",!0),n.isGroup?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:1,href:"#?".concat(e.makeUrl(t,n)),class:"item",onClick:function(r){return e.loadSubcategory(t,n,r)}},Object(i["toDisplayString"])(n.name),9,Wa)),n.help?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:2,class:Object(i["normalizeClass"])(["item-help-icon",{active:e.helpShownCategory&&e.helpShownCategory.subcategory===n.id&&e.helpShownCategory.category===t.id&&n.help}]),tabindex:"5",href:"javascript:",onClick:function(r){return e.showHelp(t,n,r)}},Ga,10,qa)):Object(i["createCommentVNode"])("",!0)],2)})),128))])],2)})),128))],8,Ra),Object(i["createElementVNode"])("ul",za,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.menu,(function(t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{class:"no-padding",key:t.id},[Object(i["withDirectives"])(Object(i["createElementVNode"])("ul",Ya,[Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("a",Qa,[Object(i["createElementVNode"])("i",{class:Object(i["normalizeClass"])(t.icon?t.icon:"icon-arrow-bottom")},null,2),Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.name),1)]),Object(i["createElementVNode"])("div",Ka,[Object(i["createElementVNode"])("ul",null,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(t.subcategories,(function(n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{key:n.id},[n.isGroup?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Xa,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(n.subcategories,(function(n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n)),key:n.id},Object(i["toDisplayString"])(n.name),9,Za)})),128))])):Object(i["createCommentVNode"])("",!0),n.isGroup?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",ec,[Object(i["createElementVNode"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n))},Object(i["toDisplayString"])(n.name),9,tc)]))])})),128))])])])],512),[[l,{activator:e.sideNavActivator}]])])})),128))])])}var rc={key:0},oc=["data-notification-instance-id"],ic={key:1},ac={class:"notification-body"},cc=["innerHTML"],lc={key:1};function sc(e,t,n,r,o,a){return Object(i["openBlock"])(),Object(i["createBlock"])(i["Transition"],{name:"toast"===e.type?"slow-fade-out":void 0,onAfterLeave:t[1]||(t[1]=function(t){return e.toastClosed()})},{default:Object(i["withCtx"])((function(){return[e.deleted?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",rc,[Object(i["createVNode"])(i["Transition"],{name:"toast"===e.type?"toast-slide-up":void 0,appear:""},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(i["Transition"],{name:e.animate?"fade-in":void 0,appear:""},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",{class:Object(i["normalizeClass"])(["notification system",e.cssClasses]),style:Object(i["normalizeStyle"])(e.style),ref:"root","data-notification-instance-id":e.notificationInstanceId},[e.canClose?(Object(i["openBlock"])(),Object(i["createElementBlock"])("button",{key:0,type:"button",class:"close","data-dismiss":"alert",onClick:t[0]||(t[0]=function(t){return e.closeNotification(t)})}," × ")):Object(i["createCommentVNode"])("",!0),e.title?(Object(i["openBlock"])(),Object(i["createElementBlock"])("strong",ic,Object(i["toDisplayString"])(e.title),1)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",ac,[e.message?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.message)},null,8,cc)):Object(i["createCommentVNode"])("",!0),e.message?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",lc,[Object(i["renderSlot"])(e.$slots,"default")]))])],14,oc)]})),_:3},8,["name"])])]})),_:3},8,["name"])]))]})),_:3},8,["name"])}var uc=window,dc=uc.$,pc=Object(i["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&&dc(this.$refs.root).css(this.style)},methods:{toastClosed:function(){var e=this;Object(i["nextTick"])((function(){e.$emit("closed")}))},closeNotification:function(e){var t=this;this.canClose&&e&&e.target&&(this.deleted=!0,Object(i["nextTick"])((function(){t.$emit("closed")}))),this.markNotificationAsRead()},markNotificationAsRead:function(){this.notificationId&&Qe.fetch({module:"CoreHome",action:"markNotificationAsRead"},{postParams:{notificationId:this.notificationId}})}}});pc.render=sc;var fc=pc; + */function nc(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("MenuDropdown"),l=Object(o["resolveDirective"])("side-nav");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Fa,[Object(o["createElementVNode"])("ul",{class:"navbar hide-on-med-and-down",role:"menu","aria-label":e.translate("CoreHome_MainNavigation")},[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.menu,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{class:Object(o["normalizeClass"])(["menuTab",{active:t.id===e.activeCategory}]),role:"menuitem",key:t.id},[Object(o["createElementVNode"])("a",{class:"item",tabindex:"5",href:"",onClick:Object(o["withModifiers"])((function(n){return e.loadCategory(t)}),["prevent"])},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])("menu-icon ".concat(t.icon?t.icon:"icon-arrow-right"))},null,2),Object(o["createTextVNode"])(Object(o["toDisplayString"])(t.name)+" ",1),Object(o["createElementVNode"])("span",$a,Object(o["toDisplayString"])(e.translate("CoreHome_Menu")),1)],8,_a),Object(o["createElementVNode"])("ul",Ha,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.subcategories,(function(n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{role:"menuitem",class:Object(o["normalizeClass"])({active:(n.id===e.displayedSubcategory||n.isGroup&&e.activeSubsubcategory===e.displayedSubcategory)&&t.id===e.displayedCategory}),key:n.id},[n.isGroup?(Object(o["openBlock"])(),Object(o["createBlock"])(c,{key:0,"show-search":!0,"menu-title":e.htmlEntities(n.name)},{default:Object(o["withCtx"])((function(){return[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(n.subcategories,(function(r){return Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{class:Object(o["normalizeClass"])(["item",{active:r.id===e.activeSubsubcategory&&n.id===e.displayedSubcategory&&t.id===e.displayedCategory}]),tabindex:"5",href:"#?".concat(e.makeUrl(t,r)),onClick:function(n){return e.loadSubcategory(t,r,n)},title:r.tooltip,key:r.id},Object(o["toDisplayString"])(r.name),11,Ua)})),128))]})),_:2},1032,["menu-title"])):Object(o["createCommentVNode"])("",!0),n.isGroup?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:1,href:"#?".concat(e.makeUrl(t,n)),class:"item",onClick:function(r){return e.loadSubcategory(t,n,r)}},Object(o["toDisplayString"])(n.name),9,qa)),n.help?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:2,class:Object(o["normalizeClass"])(["item-help-icon",{active:e.helpShownCategory&&e.helpShownCategory.subcategory===n.id&&e.helpShownCategory.category===t.id&&n.help}]),tabindex:"5",href:"javascript:",onClick:function(r){return e.showHelp(t,n,r)}},Ga,10,Wa)):Object(o["createCommentVNode"])("",!0)],2)})),128))])],2)})),128))],8,Ra),Object(o["createElementVNode"])("ul",za,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.menu,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{class:"no-padding",key:t.id},[Object(o["withDirectives"])(Object(o["createElementVNode"])("ul",Ya,[Object(o["createElementVNode"])("li",null,[Object(o["createElementVNode"])("a",Qa,[Object(o["createElementVNode"])("i",{class:Object(o["normalizeClass"])(t.icon?t.icon:"icon-arrow-bottom")},null,2),Object(o["createTextVNode"])(Object(o["toDisplayString"])(t.name),1)]),Object(o["createElementVNode"])("div",Ka,[Object(o["createElementVNode"])("ul",null,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.subcategories,(function(n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:n.id},[n.isGroup?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",Xa,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(n.subcategories,(function(n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n)),key:n.id},Object(o["toDisplayString"])(n.name),9,Za)})),128))])):Object(o["createCommentVNode"])("",!0),n.isGroup?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",ec,[Object(o["createElementVNode"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n))},Object(o["toDisplayString"])(n.name),9,tc)]))])})),128))])])])],512),[[l,{activator:e.sideNavActivator}]])])})),128))])])}var rc={key:0},ic=["data-notification-instance-id"],oc={key:1},ac={class:"notification-body"},cc=["innerHTML"],lc={key:1};function sc(e,t,n,r,i,a){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",rc,[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",oc,Object(o["toDisplayString"])(e.title),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",ac,[e.message?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.message)},null,8,cc)):Object(o["createCommentVNode"])("",!0),e.message?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",lc,[Object(o["renderSlot"])(e.$slots,"default")]))])],14,ic)]})),_:3},8,["name"])])]})),_:3},8,["name"])]))]})),_:3},8,["name"])}var uc=window,dc=uc.$,pc=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&&dc(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&&Qe.fetch({module:"CoreHome",action:"markNotificationAsRead"},{postParams:{notificationId:this.notificationId}})}}});pc.render=sc;var fc=pc; /*! * Matomo - free/libre analytics platform * @@ -367,132 +367,144 @@ function Qo(){return{get initialSites(){return Ho.initialSites.value},loadSite:H * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var Oc=function(){function e(){gc(this,e),yc(this,"privateState",Object(i["reactive"])({notifications:[]})),yc(this,"nextNotificationId",0)}return bc(e,[{key:"state",get:function(){return Object(i["readonly"])(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 o=$(r),i=o.data(),a=o.html();a&&n.push(hc(hc({},i),{},{message:a,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=e.prepend?this.prependNotification:this.appendNotification,n="#notificationContainer";if(e.placeat)n=e.placeat;else{var r=".modal.open .modal-content",o=document.querySelector(r);o&&(o.querySelector("#modalNotificationContainer")||window.$(o).prepend('<div id="modalNotificationContainer"/>'),n="".concat(r," #modalNotificationContainer"),t=this.prependNotification)}var i=e.group||(n?n.toString():"");this.initializeNotificationContainer(n,i);var a=(this.nextNotificationId+=1).toString();return t.call(this,hc(hc({},e),{},{noclear:!!e.noclear,group:i,notificationId:e.id,notificationInstanceId:a,type:e.type||"transient"})),a}},{key:"scrollToNotification",value:function(e){setTimeout((function(){var t=document.querySelector("[data-notification-instance-id='".concat(e,"']"));t&&S.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=Zt({render:function(){return Object(i["createVNode"])(fc,hc(hc({},e),{},{notificationId:e.id,type:"toast",onClosed:function(){r.unmount()}}))}});r.mount(n)}},{key:"initializeNotificationContainer",value:function(e,t){var n=window.$(e);if(!n.children(".notification-group").length){var r=window.CoreHome.NotificationGroup,o=Zt({template:'<NotificationGroup :group="group"></NotificationGroup>',data:function(){return{group:t}}});o.component("NotificationGroup",r),o.mount(n[0])}}},{key:"checkMessage",value:function(e){if(!e)throw new Error("No message given, cannot display notification")}}]),e}(),wc=new Oc,jc=wc;$((function(){return wc.parseNotificationDivs()})), + */var Oc=window,wc=Oc.$,jc=function(){function e(){gc(this,e),yc(this,"privateState",Object(o["reactive"])({notifications:[]})),yc(this,"nextNotificationId",0)}return bc(e,[{key:"state",get:function(){return Object(o["readonly"])(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=wc('[data-role="notification"]'),n=[];t.each((function(e,r){var i=wc(r),o=i.data(),a=i.html();a&&n.push(hc(hc({},o),{},{message:a,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=e.prepend?this.prependNotification:this.appendNotification,n="#notificationContainer";if(e.placeat)n=e.placeat;else{var r=".modal.open .modal-content",i=document.querySelector(r);i&&(i.querySelector("#modalNotificationContainer")||wc(i).prepend('<div id="modalNotificationContainer"/>'),n="".concat(r," #modalNotificationContainer"),t=this.prependNotification)}var o=e.group||(n?n.toString():"");this.initializeNotificationContainer(n,o);var a=(this.nextNotificationId+=1).toString();return t.call(this,hc(hc({},e),{},{noclear:!!e.noclear,group:o,notificationId:e.id,notificationInstanceId:a,type:e.type||"transient"})),a}},{key:"scrollToNotification",value:function(e){setTimeout((function(){var t=document.querySelector("[data-notification-instance-id='".concat(e,"']"));t&&S.helper.lazyScrollTo(t,250)}))}},{key:"toast",value:function(e){this.checkMessage(e.message);var t=e.placeat?wc(e.placeat):void 0;if(!t||!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=Zt({render:function(){return Object(o["createVNode"])(fc,hc(hc({},e),{},{notificationId:e.id,type:"toast",onClosed:function(){r.unmount()}}))}});r.mount(n)}},{key:"initializeNotificationContainer",value:function(e,t){if(e){var n=wc(e);if(!n.children(".notification-group").length){var r=window.CoreHome.NotificationGroup,i=Zt({template:'<NotificationGroup :group="group"></NotificationGroup>',data:function(){return{group:t}}});i.component("NotificationGroup",r),i.mount(n[0])}}}},{key:"checkMessage",value:function(e){if(!e)throw new Error("No message given, cannot display notification")}}]),e}(),kc=new jc,Sc=kc;wc((function(){return kc.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 jc}));var kc={class:"notification-group"},Sc=["innerHTML"];function Cc(e,t,n,r,o,a){var c=Object(i["resolveComponent"])("Notification");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",kc,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.notifications,(function(t,n){return Object(i["openBlock"])(),Object(i["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(i["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(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",{innerHTML:e.$sanitize(t.message)},null,8,Sc)]})),_:2},1032,["notification-id","title","context","type","noclear","toast-length","style","animate","message","notification-instance-id","css-class","onClosed"])})),128))])}var Pc=Object(i["defineComponent"])({props:{group:String},components:{Notification:fc},computed:{notifications:function(){var e=this;return jc.state.notifications.filter((function(t){return e.group?e.group===t.group:!t.group}))}},methods:{removeNotification:function(e){jc.remove(e)}}});Pc.render=Cc;var Dc=Pc; +window.angular.module("piwikApp").factory("notifications",(function(){return Sc}));var Cc={class:"notification-group"},Pc=["innerHTML"];function Dc(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("Notification");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Cc,[(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,Pc)]})),_:2},1032,["notification-id","title","context","type","noclear","toast-length","style","animate","message","notification-instance-id","css-class","onClosed"])})),128))])}var Ec=Object(o["defineComponent"])({props:{group:String},components:{Notification:fc},computed:{notifications:function(){var e=this;return Sc.state.notifications.filter((function(t){return e.group?e.group===t.group:!t.group}))}},methods:{removeNotification:function(e){Sc.remove(e)}}});Ec.render=Dc;var Vc=Ec; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Ec(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vc(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 Nc(e,t,n){return t&&Vc(e.prototype,t),n&&Vc(e,n),e}function Tc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function Nc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tc(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 Ac(e,t,n){return t&&Tc(e.prototype,t),n&&Tc(e,n),e}function xc(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 Ac=function(){function e(){var t=this;Ec(this,e),Tc(this,"privateState",Object(i["reactive"])({pages:[]})),Tc(this,"state",Object(i["readonly"])(this.privateState)),Tc(this,"fetchAllPagesPromise",void 0),Tc(this,"pages",Object(i["computed"])((function(){return t.state.pages})))}return Nc(e,[{key:"findPageInCategory",value:function(e){return this.pages.value.find((function(t){return t&&t.category&&t.category.id===e&&t.subcategory&&t.subcategory.id}))}},{key:"findPage",value:function(e,t){return this.pages.value.find((function(n){return n&&n.category&&n.subcategory&&n.category.id===e&&"".concat(n.subcategory.id)===t}))}},{key:"reloadAllPages",value:function(){return this.fetchAllPagesPromise=null,this.getAllPages()}},{key:"getAllPages",value:function(){var e=this;return this.fetchAllPagesPromise||(this.fetchAllPagesPromise=Qe.fetch({method:"API.getReportPagesMetadata",filter_limit:"-1"}).then((function(t){e.privateState.pages=t}))),this.fetchAllPagesPromise.then((function(){return e.pages.value}))}}]),e}(),Ic=new Ac;function xc(e){return Fc(e)||Lc(e)||Mc(e)||Bc()}function Bc(){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 Mc(e,t){if(e){if("string"===typeof e)return Rc(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)?Rc(e,t):void 0}}function Lc(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Fc(e){if(Array.isArray(e))return Rc(e)}function Rc(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 Ic=function(){function e(){var t=this;Nc(this,e),xc(this,"privateState",Object(o["reactive"])({pages:[]})),xc(this,"state",Object(o["computed"])((function(){return Object(o["readonly"])(t.privateState)}))),xc(this,"fetchAllPagesPromise",void 0),xc(this,"pages",Object(o["computed"])((function(){return t.state.value.pages})))}return Ac(e,[{key:"findPageInCategory",value:function(e){return this.pages.value.find((function(t){return t&&t.category&&t.category.id===e&&t.subcategory&&t.subcategory.id}))}},{key:"findPage",value:function(e,t){return this.pages.value.find((function(n){return n&&n.category&&n.subcategory&&n.category.id===e&&"".concat(n.subcategory.id)===t}))}},{key:"reloadAllPages",value:function(){return delete this.fetchAllPagesPromise,this.getAllPages()}},{key:"getAllPages",value:function(){var e=this;return this.fetchAllPagesPromise||(this.fetchAllPagesPromise=Qe.fetch({method:"API.getReportPagesMetadata",filter_limit:"-1"}).then((function(t){return e.privateState.pages=t,e.pages.value}))),this.fetchAllPagesPromise.then((function(){return e.pages.value}))}}]),e}(),Bc=new Ic;function Lc(e){return _c(e)||Rc(e)||Fc(e)||Mc()}function Mc(){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 Fc(e,t){if(e){if("string"===typeof e)return $c(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)?$c(e,t):void 0}}function Rc(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _c(e){if(Array.isArray(e))return $c(e)}function $c(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 - */function _c(e){var t=xc(e||[]);return t.sort((function(e,t){return e.order<t.order?-1:e.order>t.order?1:0})),t}function $c(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 Hc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$c(Object(n),!0).forEach((function(t){Jc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Uc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wc(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 qc(e,t,n){return t&&Wc(e.prototype,t),n&&Wc(e,n),e}function Jc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function Hc(e){var t=Lc(e||[]);return t.sort((function(e,t){return e.order<t.order?-1:e.order>t.order?1:0})),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 Gc(e){var t=parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)}var zc=function(){function e(){var t=this;Uc(this,e),Jc(this,"privateState",Object(i["reactive"])({activeCategoryId:null,activeSubcategoryId:null,activeSubsubcategoryId:null})),Jc(this,"state",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState)}))),Jc(this,"activeCategory",Object(i["computed"])((function(){return t.state.value.activeCategoryId||De.parsed.value.category}))),Jc(this,"activeSubcategory",Object(i["computed"])((function(){return t.state.value.activeSubcategoryId||De.parsed.value.subcategory}))),Jc(this,"activeSubsubcategory",Object(i["computed"])((function(){var e=t.state.value.activeSubsubcategoryId;if(e)return e;var n=t.findSubcategory(t.activeCategory.value,t.activeSubcategory.value);return n.subsubcategory&&n.subsubcategory.id===t.activeSubcategory.value?n.subsubcategory.id:null}))),Jc(this,"menu",Object(i["computed"])((function(){return t.buildMenuFromPages()})))}return qc(e,[{key:"fetchMenuItems",value:function(){var e=this;return Ic.getAllPages().then((function(){return e.menu.value}))}},{key:"reloadMenuItems",value:function(){var e=this;return Ic.reloadAllPages().then((function(){return e.menu.value}))}},{key:"findSubcategory",value:function(e,t){var n=null,r=null,o=null;return this.menu.value.forEach((function(i){i.id===e&&(i.subcategories||[]).forEach((function(e){e.id===t&&(n=i,r=e),e.isGroup&&(e.subcategories||[]).forEach((function(a){a.id===t&&(n=i,r=e,o=a)}))}))})),{category:n,subcategory:r,subsubcategory:o}}},{key:"buildMenuFromPages",value:function(){var e=[],t=De.parsed.value.category,n=De.parsed.value.subcategory,r=Ic.pages.value,o={};return r.forEach((function(i){var a=Hc({},i.category),c=a.id,l=c===t;if(!o[c]){var s;o[c]=!0,a.subcategories=[];var u=r.filter((function(e){return e.category.id===c}));u.forEach((function(e){var t=Hc({},e.subcategory),r=t.id===n&&l;if(e.widgets&&e.widgets[0]&&Gc(e.subcategory.id)){s||(s=Hc({},t),s.name=C("CoreHome_ChooseX",[a.name]),s.isGroup=!0,s.subcategories=[],s.order=10),r&&(s.name=t.name);var o=i.subcategory.id;return t.tooltip="".concat(t.name," (id = ").concat(o,")"),void s.subcategories.push(t)}a.subcategories.push(t)})),s&&s.subcategories&&s.subcategories.length<=5?s.subcategories.forEach((function(e){return a.subcategories.push(e)})):s&&a.subcategories.push(s),a.subcategories=_c(a.subcategories),e.push(a)}})),_c(e)}},{key:"toggleCategory",value:function(e){return this.privateState.activeSubcategoryId=null,this.privateState.activeSubsubcategoryId=null,this.privateState.activeCategoryId===e.id?(this.privateState.activeCategoryId=null,!1):(this.privateState.activeCategoryId=e.id,!0)}},{key:"enterSubcategory",value:function(e,t,n){e&&t&&(this.privateState.activeCategoryId=e.id,this.privateState.activeSubcategoryId=t.id,n&&(this.privateState.activeSubsubcategoryId=n.id))}}]),e}(),Yc=new zc;function Qc(e){return Qc="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qc(e)}function Kc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xc(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 Zc(e,t,n){return t&&Xc(e.prototype,t),n&&Xc(e,n),e}function el(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function Uc(e){var t=e;return t.subcategories?t.subcategories:[]} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var tl=function(){function e(){var t=this;Kc(this,e),el(this,"privateState",Object(i["reactive"])({isFetchedFirstTime:!1,categorizedWidgets:{}})),el(this,"state",Object(i["computed"])((function(){return t.privateState.isFetchedFirstTime||t.fetchAvailableWidgets(),Object(i["readonly"])(t.privateState)}))),el(this,"widgets",Object(i["computed"])((function(){return t.state.value.categorizedWidgets})))}return Zc(e,[{key:"fetchAvailableWidgets",value:function(){var e=this;return De.parsed.value.idSite?(this.privateState.isFetchedFirstTime=!0,new Promise((function(t,n){try{window.widgetsHelper.getAvailableWidgets((function(n){e.privateState.categorizedWidgets=n,t(e.widgets.value)}))}catch(r){n(r)}}))):Promise.resolve(this.widgets.value)}},{key:"reloadAvailableWidgets",value:function(){return"object"===Qc(window.widgetsHelper)&&window.widgetsHelper.availableWidgets&&delete window.widgetsHelper.availableWidgets,this.fetchAvailableWidgets()}}]),e}(),nl=new tl;function rl(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 ol(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rl(Object(n),!0).forEach((function(t){il(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function il(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var al="reportingmenu-help",cl=Object(i["defineComponent"])({components:{MenuDropdown:Jr},directives:{SideNav:Gt},props:{},data:function(){return{showSubcategoryHelpOnLoad:null,initialLoad:!0,helpShownCategory:null}},computed:{sideNavActivator:function(){return document.querySelector("nav .activateLeftMenu")},menu:function(){return Yc.menu.value},activeCategory:function(){return Yc.activeCategory.value},activeSubcategory:function(){return Yc.activeSubcategory.value},activeSubsubcategory:function(){return Yc.activeSubsubcategory.value},displayedCategory:function(){return De.parsed.value.category},displayedSubcategory:function(){return De.parsed.value.subcategory}},created:function(){var e=this;Yc.fetchMenuItems().then((function(t){if(!De.parsed.value.subcategory){var n=t[0],r=n.subcategories[0];Yc.enterSubcategory(n,r),e.propagateUrlChange(n,r)}})),Object(i["watch"])((function(){return De.parsed.value}),(function(e){var t=Yc.findSubcategory(e.category,e.subcategory);Yc.enterSubcategory(t.category,t.subcategory,t.subsubcategory)})),S.on("piwikPageChange",(function(){e.initialLoad||window.globalAjaxQueue.abort(),e.helpShownCategory=null,e.showSubcategoryHelpOnLoad&&(e.showHelp(e.showSubcategoryHelpOnLoad.category,e.showSubcategoryHelpOnLoad.subcategory),e.showSubcategoryHelpOnLoad=null),window.$("#loadingError").hide(),e.initialLoad=!1})),S.on("updateReportingMenu",(function(){Yc.reloadMenuItems().then((function(){var e=De.parsed.value,t=e.category,n=e.subcategory;if(t&&n){var r=Yc.findSubcategory(t,n);r&&Yc.enterSubcategory(r.category,r.subcategory,r.subsubcategory)}})),nl.reloadAvailableWidgets()}))},methods:{propagateUrlChange:function(e,t){var n=De.parsed.value;n.category===e.id&&n.subcategory===t.id?this.loadSubcategory(e,t):De.updateHash(ol(ol({},De.hashParsed.value),{},{category:e.id,subcategory:t.id}))},loadCategory:function(e){jc.remove(al);var t=Yc.toggleCategory(e);if(t&&e.subcategories&&1===e.subcategories.length){this.helpShownCategory=null;var n=e.subcategories[0];this.propagateUrlChange(e,n)}},loadSubcategory:function(e,t,n){n&&(n.shiftKey||n.ctrlKey||n.metaKey)||(jc.remove(al),t&&t.id===this.activeSubcategory&&(this.helpShownCategory=null,setTimeout((function(){S.postEvent("loadPage",e.id,t.id)}))))},makeUrl:function(e,t){var n=De.parsed.value,r=n.idSite,o=n.period,i=n.date,a=n.segment,c=n.comparePeriods,l=n.compareDates,s=n.compareSegments;return De.stringify({idSite:r,period:o,date:i,segment:a,comparePeriods:c,compareDates:l,compareSegments:s,category:e.id,subcategory:t.id})},htmlEntities:function(e){return S.helper.htmlEntities(e)},showHelp:function(e,t,n){var r=De.parsed.value,o=r.category,i=r.subcategory;if((o!==e.id||i!==t.id)&&n)return this.showSubcategoryHelpOnLoad={category:e,subcategory:t},void De.updateHash(ol(ol({},De.hashParsed.value),{},{category:e.id,subcategory:t.id}));if(this.helpShownCategory&&e.id===this.helpShownCategory.category&&t.id===this.helpShownCategory.subcategory)return jc.remove(al),void(this.helpShownCategory=null);var a=C("CoreHome_ReportingCategoryHelpPrefix",e.name,t.name),c="<strong>".concat(a,"</strong><br/>");jc.show({context:"info",id:al,type:"help",noclear:!0,class:"help-notification",message:c+t.help,placeat:"#notificationContainer",prepend:!0}),this.helpShownCategory={category:e.id,subcategory:t.id}}}});cl.render=nc;var ll=cl; + */function qc(e){var t=e;return t.subcategories?t.subcategories:[]}function Wc(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 Jc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wc(Object(n),!0).forEach((function(t){Qc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zc(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 Yc(e,t,n){return t&&zc(e.prototype,t),n&&zc(e,n),e}function Qc(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 - */pn({component:ll,directiveName:"piwikReportingMenu"}); + */function Kc(e){var t=parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)}var Xc=function(){function e(){var t=this;Gc(this,e),Qc(this,"privateState",Object(o["reactive"])({activeCategoryId:null,activeSubcategoryId:null,activeSubsubcategoryId:null})),Qc(this,"state",Object(o["computed"])((function(){return Object(o["readonly"])(t.privateState)}))),Qc(this,"activeCategory",Object(o["computed"])((function(){return t.state.value.activeCategoryId||De.parsed.value.category}))),Qc(this,"activeSubcategory",Object(o["computed"])((function(){return t.state.value.activeSubcategoryId||De.parsed.value.subcategory}))),Qc(this,"activeSubsubcategory",Object(o["computed"])((function(){var e=t.state.value.activeSubsubcategoryId;if(e)return e;var n=t.findSubcategory(t.activeCategory.value,t.activeSubcategory.value);return n.subsubcategory&&n.subsubcategory.id===t.activeSubcategory.value?n.subsubcategory.id:null}))),Qc(this,"menu",Object(o["computed"])((function(){return t.buildMenuFromPages()})))}return Yc(e,[{key:"fetchMenuItems",value:function(){var e=this;return Bc.getAllPages().then((function(){return e.menu.value}))}},{key:"reloadMenuItems",value:function(){var e=this;return Bc.reloadAllPages().then((function(){return e.menu.value}))}},{key:"findSubcategory",value:function(e,t){var n=void 0,r=void 0,i=void 0;return this.menu.value.forEach((function(o){o.id===e&&(Uc(o)||[]).forEach((function(e){e.id===t&&(n=o,r=e),e.isGroup&&(qc(e)||[]).forEach((function(a){a.id===t&&(n=o,r=e,i=a)}))}))})),{category:n,subcategory:r,subsubcategory:i}}},{key:"buildMenuFromPages",value:function(){var e=[],t=De.parsed.value.category,n=De.parsed.value.subcategory,r=Bc.pages.value,i={};return r.forEach((function(o){var a=Jc({},o.category),c=a.id,l=c===t;if(!i[c]){i[c]=!0,a.subcategories=[];var s=null,u=r.filter((function(e){return e.category.id===c}));u.forEach((function(e){var t=Jc({},e.subcategory),r=t.id===n&&l;if(e.widgets&&e.widgets[0]&&Kc(e.subcategory.id)){s||(s=Jc({},t),s.name=C("CoreHome_ChooseX",[a.name]),s.isGroup=!0,s.subcategories=[],s.order=10),r&&(s.name=t.name);var i=o.subcategory.id;return t.tooltip="".concat(t.name," (id = ").concat(i,")"),void s.subcategories.push(t)}a.subcategories.push(t)})),s&&s.subcategories&&s.subcategories.length<=5?s.subcategories.forEach((function(e){return a.subcategories.push(e)})):s&&a.subcategories.push(s),a.subcategories=Hc(Uc(a)),e.push(a)}})),Hc(e)}},{key:"toggleCategory",value:function(e){return this.privateState.activeSubcategoryId=null,this.privateState.activeSubsubcategoryId=null,this.privateState.activeCategoryId===e.id?(this.privateState.activeCategoryId=null,!1):(this.privateState.activeCategoryId=e.id,!0)}},{key:"enterSubcategory",value:function(e,t,n){e&&t&&(this.privateState.activeCategoryId=e.id,this.privateState.activeSubcategoryId=t.id,n&&(this.privateState.activeSubsubcategoryId=n.id))}}]),e}(),Zc=new Xc;function el(e){return el="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},el(e)}function tl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nl(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 rl(e,t,n){return t&&nl(e.prototype,t),n&&nl(e,n),e}function il(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 ol(e){var t=e;return t.widgets?t.widgets:[]}var al=function(){function e(){var t=this;tl(this,e),il(this,"privateState",Object(o["reactive"])({isFetchedFirstTime:!1,categorizedWidgets:{}})),il(this,"state",Object(o["computed"])((function(){return t.privateState.isFetchedFirstTime||t.fetchAvailableWidgets(),Object(o["readonly"])(t.privateState)}))),il(this,"widgets",Object(o["computed"])((function(){return t.state.value.categorizedWidgets})))}return rl(e,[{key:"fetchAvailableWidgets",value:function(){var e=this;return De.parsed.value.idSite?(this.privateState.isFetchedFirstTime=!0,new Promise((function(t,n){try{window.widgetsHelper.getAvailableWidgets((function(n){var r=n;e.privateState.categorizedWidgets=r,t(e.widgets.value)}))}catch(r){n(r)}}))):Promise.resolve(this.widgets.value)}},{key:"reloadAvailableWidgets",value:function(){return"object"===el(window.widgetsHelper)&&window.widgetsHelper.availableWidgets&&delete window.widgetsHelper.availableWidgets,this.fetchAvailableWidgets()}}]),e}(),cl=new al;function ll(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 sl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ll(Object(n),!0).forEach((function(t){ul(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ll(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ul(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dl="reportingmenu-help",pl=Object(o["defineComponent"])({components:{MenuDropdown:Jr},directives:{SideNav:Gt},props:{},data:function(){return{showSubcategoryHelpOnLoad:null,initialLoad:!0,helpShownCategory:null}},computed:{sideNavActivator:function(){return document.querySelector("nav .activateLeftMenu")},menu:function(){return Zc.menu.value},activeCategory:function(){return Zc.activeCategory.value},activeSubcategory:function(){return Zc.activeSubcategory.value},activeSubsubcategory:function(){return Zc.activeSubsubcategory.value},displayedCategory:function(){return De.parsed.value.category},displayedSubcategory:function(){return De.parsed.value.subcategory}},created:function(){var e=this;Zc.fetchMenuItems().then((function(t){if(!De.parsed.value.subcategory){var n=t[0],r=n.subcategories[0];Zc.enterSubcategory(n,r),e.propagateUrlChange(n,r)}})),Object(o["watch"])((function(){return De.parsed.value}),(function(e){var t=Zc.findSubcategory(e.category,e.subcategory);Zc.enterSubcategory(t.category,t.subcategory,t.subsubcategory)})),S.on("piwikPageChange",(function(){e.initialLoad||window.globalAjaxQueue.abort(),e.helpShownCategory=null,e.showSubcategoryHelpOnLoad&&(e.showHelp(e.showSubcategoryHelpOnLoad.category,e.showSubcategoryHelpOnLoad.subcategory),e.showSubcategoryHelpOnLoad=null),window.$("#loadingError").hide(),e.initialLoad=!1})),S.on("updateReportingMenu",(function(){Zc.reloadMenuItems().then((function(){var e=De.parsed.value.category,t=De.parsed.value.subcategory;if(e&&t){var n=Zc.findSubcategory(e,t);n.category&&Zc.enterSubcategory(n.category,n.subcategory,n.subsubcategory)}})),cl.reloadAvailableWidgets()}))},methods:{propagateUrlChange:function(e,t){var n=De.parsed.value;n.category===e.id&&n.subcategory===t.id?this.loadSubcategory(e,t):De.updateHash(sl(sl({},De.hashParsed.value),{},{category:e.id,subcategory:t.id}))},loadCategory:function(e){Sc.remove(dl);var t=Zc.toggleCategory(e);if(t&&e.subcategories&&1===e.subcategories.length){this.helpShownCategory=null;var n=e.subcategories[0];this.propagateUrlChange(e,n)}},loadSubcategory:function(e,t,n){n&&(n.shiftKey||n.ctrlKey||n.metaKey)||(Sc.remove(dl),t&&t.id===this.activeSubcategory&&(this.helpShownCategory=null,setTimeout((function(){S.postEvent("loadPage",e.id,t.id)}))))},makeUrl:function(e,t){var n=De.parsed.value,r=n.idSite,i=n.period,o=n.date,a=n.segment,c=n.comparePeriods,l=n.compareDates,s=n.compareSegments;return De.stringify({idSite:r,period:i,date:o,segment:a,comparePeriods:c,compareDates:l,compareSegments:s,category:e.id,subcategory:t.id})},htmlEntities:function(e){return S.helper.htmlEntities(e)},showHelp:function(e,t,n){var r=De.parsed.value,i=r.category,o=r.subcategory;if((i!==e.id||o!==t.id)&&n)return this.showSubcategoryHelpOnLoad={category:e,subcategory:t},void De.updateHash(sl(sl({},De.hashParsed.value),{},{category:e.id,subcategory:t.id}));if(this.helpShownCategory&&e.id===this.helpShownCategory.category&&t.id===this.helpShownCategory.subcategory)return Sc.remove(dl),void(this.helpShownCategory=null);var a=C("CoreHome_ReportingCategoryHelpPrefix",e.name,t.name),c="<strong>".concat(a,"</strong><br/>");Sc.show({context:"info",id:dl,type:"help",noclear:!0,class:"help-notification",message:c+t.help,placeat:"#notificationContainer",prepend:!0}),this.helpShownCategory={category:e.id,subcategory:t.id}}}});pl.render=nc;var fl=pl; +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */pn({component:fl,directiveName:"piwikReportingMenu"}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function sl(e){return e.forEach((function(e){e.id===Yc.activeCategory.value&&(e.active=!0,(e.subcategories||[]).forEach((function(e){e.id===Yc.activeSubcategory.value&&(e.active=!0,(e.subcategories||[]).forEach((function(e){e.id===Yc.activeSubsubcategory.value&&(e.active=!0)})))})))})),e}function ul(){return{get menu(){return Yc.menu.value},findSubcategory:Yc.findSubcategory.bind(Yc),reloadMenuItems:function(){return Yc.reloadMenuItems().then((function(e){return sl(gn(e))}))},fetchMenuItems:function(){return Yc.fetchMenuItems().then((function(e){return sl(gn(e))}))}}} +function ml(e){return e.forEach((function(e){e.id===Zc.activeCategory.value&&(e.active=!0,(e.subcategories||[]).forEach((function(e){e.id===Zc.activeSubcategory.value&&(e.active=!0,(e.subcategories||[]).forEach((function(e){e.id===Zc.activeSubsubcategory.value&&(e.active=!0)})))})))})),e}function hl(){return{get menu(){return Zc.menu.value},findSubcategory:Zc.findSubcategory.bind(Zc),reloadMenuItems:function(){return Zc.reloadMenuItems().then((function(e){return ml(gn(e))}))},fetchMenuItems:function(){return Zc.fetchMenuItems().then((function(e){return ml(gn(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 dl(){return{get pages(){return Ic.pages.value},findPageInCategory:function(){return hn(Ic.findPageInCategory.apply(Ic,arguments))},findPage:function(){return hn(Ic.findPage.apply(Ic,arguments))},reloadAllPages:function(){return Ic.reloadAllPages().then((function(e){return gn(e)}))},getAllPages:function(){return Ic.getAllPages().then((function(e){return gn(e)}))}}}function pl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fl(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 ml(e,t,n){return t&&fl(e.prototype,t),n&&fl(e,n),e}function hl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} +function gl(){return{get pages(){return Bc.pages.value},findPageInCategory:function(){return hn(Bc.findPageInCategory.apply(Bc,arguments))},findPage:function(){return hn(Bc.findPage.apply(Bc,arguments))},reloadAllPages:function(){return Bc.reloadAllPages().then((function(e){return gn(e)}))},getAllPages:function(){return Bc.getAllPages().then((function(e){return gn(e)}))}}}function vl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bl(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 yl(e,t,n){return t&&bl(e.prototype,t),n&&bl(e,n),e}function Ol(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 - */angular.module("piwikApp.service").factory("reportingMenuModel",ul),angular.module("piwikApp.service").factory("reportingPagesModel",dl);var gl=function(){function e(){var t=this;pl(this,e),hl(this,"privateState",Object(i["reactive"])({reports:[]})),hl(this,"state",Object(i["readonly"])(this.privateState)),hl(this,"reports",Object(i["computed"])((function(){return t.state.reports}))),hl(this,"reportsPromise",void 0)}return ml(e,[{key:"findReport",value:function(e,t){return this.reports.value.find((function(n){return n.module===e&&n.action===t}))}},{key:"fetchReportMetadata",value:function(){var e=this;return this.reportsPromise||(this.reportsPromise=Qe.fetch({method:"API.getReportMetadata",filter_limit:"-1",idSite:S.idSite||De.parsed.value.idSite}).then((function(t){return e.privateState.reports=t,t}))),this.reportsPromise.then((function(){return e.reports.value}))}}]),e}(),vl=new gl; + */window.angular.module("piwikApp.service").factory("reportingMenuModel",hl),window.angular.module("piwikApp.service").factory("reportingPagesModel",gl);var wl=function(){function e(){var t=this;vl(this,e),Ol(this,"privateState",Object(o["reactive"])({reports:[]})),Ol(this,"state",Object(o["readonly"])(this.privateState)),Ol(this,"reports",Object(o["computed"])((function(){return t.state.reports}))),Ol(this,"reportsPromise",void 0)}return yl(e,[{key:"findReport",value:function(e,t){return this.reports.value.find((function(n){return n.module===e&&n.action===t}))}},{key:"fetchReportMetadata",value:function(){var e=this;return this.reportsPromise||(this.reportsPromise=Qe.fetch({method:"API.getReportMetadata",filter_limit:"-1",idSite:S.idSite||De.parsed.value.idSite}).then((function(t){return e.privateState.reports=t,t}))),this.reportsPromise.then((function(){return e.reports.value}))}}]),e}(),jl=new wl; /*! * 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.service").factory("reportMetadataModel",(function(){return{get reports(){return vl.reports.value},findReport:vl.findReport.bind(vl),fetchReportMetadata:function(){return vl.fetchReportMetadata().then((function(e){return gn(e)}))}}}));var bl={key:0},yl={class:"notification system notification-error"},Ol={key:0,rel:"noreferrer noopener",target:"_blank",href:"https://matomo.org/faq/troubleshooting/faq_19489/"},wl={class:"theWidgetContent",ref:"widgetContent"};function jl(e,t,n,r,o,a){var c=Object(i["resolveComponent"])("ActivityIndicator");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createVNode"])(c,{"loading-message":e.loadingMessage,loading:e.loading},null,8,["loading-message","loading"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[e.widgetName?(Object(i["openBlock"])(),Object(i["createElementBlock"])("h2",bl,Object(i["toDisplayString"])(e.widgetName),1)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",yl,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),e.hasErrorFaqLink?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",Ol,Object(i["toDisplayString"])(e.translate("General_ErrorRequestFaqLink")),1)):Object(i["createCommentVNode"])("",!0)])],512),[[i["vShow"],e.loadingFailed]]),Object(i["createElementVNode"])("div",wl,null,512)])}function kl(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 Sl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kl(Object(n),!0).forEach((function(t){Cl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Cl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pl=Object(i["defineComponent"])({props:{widgetParams:Object,widgetName:String},components:{ActivityIndicator:Oa},data:function(){return{loading:!1,loadingFailed:"",changeCounter:0,currentScope:null}},watch:{widgetParams:function(e){e&&this.loadWidgetUrl(e,this.changeCounter+=1)}},computed:{loadingMessage:function(){return this.widgetName?C("General_LoadingPopover",this.widgetName):C("General_LoadingData")},hasErrorFaqLink:function(){var e=S.config.enable_general_settings_admin,t=S.config.enable_plugins_admin;return S.hasSuperUserAccess&&(e||t)}},mounted:function(){this.widgetParams&&this.loadWidgetUrl(this.widgetParams,this.changeCounter+=1)},unmounted:function(){this.cleanupLastWidgetContent()},methods:{abortHttpRequestIfNeeded:function(){this.lastWidgetAbortController&&(this.lastWidgetAbortController.abort(),this.lastWidgetAbortController=null)},cleanupLastWidgetContent:function(){var e=this.$refs.widgetContent;e&&(e.innerHTML=""),this.currentScope&&this.currentScope.$destroy()},getWidgetUrl:function(e){var t=De.parsed.value,n=Sl({},e||{}),r=Object.keys(Sl(Sl({},De.hashParsed.value),{},{idSite:"",period:"",date:"",segment:"",widget:""}));return r.forEach((function(e){"category"!==e&&"subcategory"!==e&&(e in n||(n[e]=t[e]))})),fr.isComparisonEnabled()&&(n=Sl(Sl({},n),{},{comparePeriods:t.comparePeriods,compareDates:t.compareDates,compareSegments:t.compareSegments})),e&&"showtitle"in e||(n.showtitle="1"),S.shouldPropagateTokenAuth&&t.token_auth&&(S.broadcast.isWidgetizeRequestWithoutSession()||(n.force_api_session="1"),n.token_auth=t.token_auth),n.random=Math.floor(1e4*Math.random()),n},loadWidgetUrl:function(e,t){var n=this;this.loading=!0,this.abortHttpRequestIfNeeded(),this.cleanupLastWidgetContent(),this.lastWidgetAbortController=new AbortController,Qe.fetch(this.getWidgetUrl(e),{format:"html",headers:{"X-Requested-With":"XMLHttpRequest"},abortController:this.lastWidgetAbortController}).then((function(r){if(t===n.changeCounter&&r&&"string"===typeof r){n.lastWidgetAbortController=null,n.loading=!1,n.loadingFailed=!1;var o=n.$refs.widgetContent;window.$(o).html(r);var i=window.$(o).children();if(n.widgetName){var a=i.find("> .card-content .card-title");a.length||(a=i.find("> h2")),a.length&&a.html(S.helper.htmlEntities(n.widgetName))}var c=S.helper.getAngularDependency("$rootScope"),l=c.$new();n.currentScope=l,S.helper.compileAngularComponents(i,{scope:l}),jc.parseNotificationDivs(),setTimeout((function(){S.postEvent("widget:loaded",{parameters:e,element:i})}))}})).catch((function(e){t===n.changeCounter&&(n.lastWidgetAbortController=null,n.cleanupLastWidgetContent(),n.loading=!1,"abort"!==e.xhrStatus&&(n.loadingFailed=!0))}))}}});Pl.render=jl;var Dl=Pl; +window.angular.module("piwikApp.service").factory("reportMetadataModel",(function(){return{get reports(){return jl.reports.value},findReport:jl.findReport.bind(jl),fetchReportMetadata:function(){return jl.fetchReportMetadata().then((function(e){return gn(e)}))}}}));var kl={key:0},Sl={class:"notification system notification-error"},Cl={key:0,rel:"noreferrer noopener",target:"_blank",href:"https://matomo.org/faq/troubleshooting/faq_19489/"},Pl={class:"theWidgetContent",ref:"widgetContent"};function Dl(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("ActivityIndicator");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",null,[Object(o["createVNode"])(c,{"loading-message":e.loadingMessage,loading:e.loading},null,8,["loading-message","loading"]),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",null,[e.widgetName?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",kl,Object(o["toDisplayString"])(e.widgetName),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Sl,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),e.hasErrorFaqLink?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",Cl,Object(o["toDisplayString"])(e.translate("General_ErrorRequestFaqLink")),1)):Object(o["createCommentVNode"])("",!0)])],512),[[o["vShow"],e.loadingFailed]]),Object(o["createElementVNode"])("div",Pl,null,512)])}function El(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 Vl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?El(Object(n),!0).forEach((function(t){Nl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):El(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Tl=Object(o["defineComponent"])({props:{widgetParams:Object,widgetName:String},components:{ActivityIndicator:Oa},data:function(){return{loading:!1,loadingFailed:!1,changeCounter:0,currentScope:null,lastWidgetAbortController:null}},watch:{widgetParams:function(e){e&&this.loadWidgetUrl(e,this.changeCounter+=1)}},computed:{loadingMessage:function(){return this.widgetName?C("General_LoadingPopover",this.widgetName):C("General_LoadingData")},hasErrorFaqLink:function(){var e=S.config.enable_general_settings_admin,t=S.config.enable_plugins_admin;return S.hasSuperUserAccess&&(e||t)}},mounted:function(){this.widgetParams&&this.loadWidgetUrl(this.widgetParams,this.changeCounter+=1)},unmounted:function(){this.cleanupLastWidgetContent()},methods:{abortHttpRequestIfNeeded:function(){this.lastWidgetAbortController&&(this.lastWidgetAbortController.abort(),this.lastWidgetAbortController=null)},cleanupLastWidgetContent:function(){var e=this.$refs.widgetContent;e&&(e.innerHTML=""),this.currentScope&&this.currentScope.$destroy()},getWidgetUrl:function(e){var t=De.parsed.value,n=Vl({},e||{}),r=Object.keys(Vl(Vl({},De.hashParsed.value),{},{idSite:"",period:"",date:"",segment:"",widget:""}));return r.forEach((function(e){"category"!==e&&"subcategory"!==e&&(e in n||(n[e]=t[e]))})),fr.isComparisonEnabled()&&(n=Vl(Vl({},n),{},{comparePeriods:t.comparePeriods,compareDates:t.compareDates,compareSegments:t.compareSegments})),e&&"showtitle"in e||(n.showtitle="1"),S.shouldPropagateTokenAuth&&t.token_auth&&(S.broadcast.isWidgetizeRequestWithoutSession()||(n.force_api_session="1"),n.token_auth=t.token_auth),n.random=Math.floor(1e4*Math.random()),n},loadWidgetUrl:function(e,t){var n=this;this.loading=!0,this.abortHttpRequestIfNeeded(),this.cleanupLastWidgetContent(),this.lastWidgetAbortController=new AbortController,Qe.fetch(this.getWidgetUrl(e),{format:"html",headers:{"X-Requested-With":"XMLHttpRequest"},abortController:this.lastWidgetAbortController}).then((function(r){if(t===n.changeCounter&&r&&"string"===typeof r){n.lastWidgetAbortController=null,n.loading=!1,n.loadingFailed=!1;var i=n.$refs.widgetContent;window.$(i).html(r);var o=window.$(i).children();if(n.widgetName){var a=o.find("> .card-content .card-title");a.length||(a=o.find("> h2")),a.length&&a.html(S.helper.htmlEntities(n.widgetName))}var c=S.helper.getAngularDependency("$rootScope"),l=c.$new();n.currentScope=l,S.helper.compileAngularComponents(o,{scope:l}),Sc.parseNotificationDivs(),setTimeout((function(){S.postEvent("widget:loaded",{parameters:e,element:o})}))}})).catch((function(e){t===n.changeCounter&&(n.lastWidgetAbortController=null,n.cleanupLastWidgetContent(),n.loading=!1,"abort"!==e.xhrStatus&&(n.loadingFailed=!0))}))}}});Tl.render=Dl;var Al=Tl; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */pn({component:Dl,scope:{piwikWidgetLoader:{vue:"widgetParams",angularJsBind:"="},widgetName:{angularJsBind:"@"}},directiveName:"piwikWidgetLoader"});function El(e,t,n,r,o,a){var c=Object(i["resolveComponent"])("Widget");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.actualContainer,(function(e,t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:t},[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(c,{widget:e,"prevent-recursion":!0},null,8,["widget"])])])})),128))])}function Vl(e){return Al(e)||Tl(e)||Fl(e)||Nl()}function Nl(){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 Tl(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Al(e){if(Array.isArray(e))return Rl(e)}function Il(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 xl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Il(Object(n),!0).forEach((function(t){Bl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Il(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ml(e,t){return $l(e)||_l(e,t)||Fl(e,t)||Ll()}function Ll(){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 Fl(e,t){if(e){if("string"===typeof e)return Rl(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)?Rl(e,t):void 0}}function Rl(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 _l(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){c=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw o}}return i}}function $l(e){if(Array.isArray(e))return e}var Hl=An("CoreHome","Widget"),Ul=Object(i["defineComponent"])({props:{container:Array},components:{Widget:Hl},computed:{actualContainer:function(){var e,t=this.container;if(null===t||void 0===t||null===(e=t[0])||void 0===e||!e.parameters)return t;var n=Ml(t,1),r=n[0],o="1"===r.parameters.widget||1===r.parameters.widget,i=o&&"graphEvolution"===r.viewDataTable,a=i?xl(xl({},r),{},{parameters:xl(xl({},r.parameters),{},{showtitle:"0"})}):r;return[a].concat(Vl(t.slice(1)))}}});Ul.render=El;var Wl=Ul,ql=(pn({component:Wl,scope:{container:{angularJsBind:"=piwikWidgetContainer"}},directiveName:"piwikWidgetContainer"}),{class:"reportsByDimensionView"}),Jl={class:"entityList"},Gl={class:"listCircle"},zl=["onClick"],Yl={class:"dimension"},Ql={class:"reportContainer"},Kl=Object(i["createElementVNode"])("div",{class:"clear"},null,-1); + */pn({component:Al,scope:{piwikWidgetLoader:{vue:"widgetParams",angularJsBind:"="},widgetName:{angularJsBind:"@"}},directiveName:"piwikWidgetLoader"});function xl(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("Widget");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",null,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.actualContainer,(function(e,t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:t},[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(c,{widget:e,"prevent-recursion":!0},null,8,["widget"])])])})),128))])}function Il(e){return Ml(e)||Ll(e)||Ul(e)||Bl()}function Bl(){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 Ll(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Ml(e){if(Array.isArray(e))return ql(e)}function Fl(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 Rl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fl(Object(n),!0).forEach((function(t){_l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return 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 $l(e,t){return Jl(e)||Wl(e,t)||Ul(e,t)||Hl()}function Hl(){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 Ul(e,t){if(e){if("string"===typeof e)return ql(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)?ql(e,t):void 0}}function ql(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 Wl(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(o.push(r.value),t&&o.length===t)break}catch(l){c=!0,i=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}return o}}function Jl(e){if(Array.isArray(e))return e}var Gl=An("CoreHome","Widget"),zl=Object(o["defineComponent"])({props:{container:{type:Array,required:!0}},components:{Widget:Gl},computed:{actualContainer:function(){var e,t,n,r=this.container;if(null===r||void 0===r||null===(e=r[0])||void 0===e||!e.parameters)return r;var i=$l(r,1),o=i[0],a="1"===(null===(t=o.parameters)||void 0===t?void 0:t.widget)||1===(null===(n=o.parameters)||void 0===n?void 0:n.widget),c=a&&"graphEvolution"===o.viewDataTable,l=c?Rl(Rl({},o),{},{parameters:Rl(Rl({},o.parameters),{},{showtitle:"0"})}):o;return[l].concat(Il(r.slice(1)))}}});zl.render=xl;var Yl=zl,Ql=(pn({component:Yl,scope:{container:{angularJsBind:"=piwikWidgetContainer"}},directiveName:"piwikWidgetContainer"}),{class:"reportsByDimensionView"}),Kl={class:"entityList"},Xl={class:"listCircle"},Zl=["onClick"],es={class:"dimension"},ts={class:"reportContainer"},ns=Object(o["createElementVNode"])("div",{class:"clear"},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 - */function Xl(e,t,n,r,o,a){var c=Object(i["resolveComponent"])("WidgetLoader");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ql,[Object(i["createElementVNode"])("div",Jl,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.widgetsByCategory,(function(t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"dimensionCategory",key:t.name},[Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.name)+" ",1),Object(i["createElementVNode"])("ul",Gl,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(t.widgets,(function(t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{class:Object(i["normalizeClass"])(["reportDimension",{activeDimension:e.selectedWidget.uniqueId===t.uniqueId}]),key:t.uniqueId,onClick:function(n){return e.selectWidget(t)}},[Object(i["createElementVNode"])("span",Yl,Object(i["toDisplayString"])(t.name),1)],10,zl)})),128))])])})),128))]),Object(i["createElementVNode"])("div",Ql,[e.selectedWidget.parameters?(Object(i["openBlock"])(),Object(i["createBlock"])(c,{key:0,"widget-params":e.selectedWidget.parameters,class:"dimensionReport"},null,8,["widget-params"])):Object(i["createCommentVNode"])("",!0)]),Kl])}function Zl(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 es(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zl(Object(n),!0).forEach((function(t){ts(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ts(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ns(e,t){return cs(e)||as(e,t)||os(e,t)||rs()}function rs(){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 os(e,t){if(e){if("string"===typeof e)return is(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)?is(e,t):void 0}}function is(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 as(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){c=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw o}}return i}}function cs(e){if(Array.isArray(e))return e}var ls=Object(i["defineComponent"])({props:{widgets:Array},components:{WidgetLoader:Dl},data:function(){return{selectedWidget:null}},created:function(){var e=ns(this.widgetsSorted,1);this.selectedWidget=e[0]},computed:{widgetsSorted:function(){return _c(this.widgets)},widgetsByCategory:function(){var e={};return this.widgetsSorted.forEach((function(t){var n=t.subcategory.name;e[n]||(e[n]={name:n,order:t.order,widgets:[]}),e[n].widgets.push(t)})),_c(Object.values(e))}},methods:{selectWidget:function(e){this.selectedWidget=es({},e)}}});ls.render=Xl;var ss=ls,us=(pn({component:ss,scope:{widgets:{angularJsBind:"=piwikWidgetByDimensionContainer",transform:function(e){return e.widgets}}},directiveName:"piwikWidgetByDimensionContainer"}),["id"]),ds={key:1},ps={key:2}; + */function rs(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("WidgetLoader");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ql,[Object(o["createElementVNode"])("div",Kl,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.widgetsByCategory,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"dimensionCategory",key:t.name},[Object(o["createTextVNode"])(Object(o["toDisplayString"])(t.name)+" ",1),Object(o["createElementVNode"])("ul",Xl,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.widgets,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{class:Object(o["normalizeClass"])(["reportDimension",{activeDimension:e.selectedWidget.uniqueId===t.uniqueId}]),key:t.uniqueId,onClick:function(n){return e.selectWidget(t)}},[Object(o["createElementVNode"])("span",es,Object(o["toDisplayString"])(t.name),1)],10,Zl)})),128))])])})),128))]),Object(o["createElementVNode"])("div",ts,[e.selectedWidget.parameters?(Object(o["openBlock"])(),Object(o["createBlock"])(c,{key:0,"widget-params":e.selectedWidget.parameters,class:"dimensionReport"},null,8,["widget-params"])):Object(o["createCommentVNode"])("",!0)]),ns])}function is(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 os(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?is(Object(n),!0).forEach((function(t){as(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):is(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function as(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cs(e,t){return ps(e)||ds(e,t)||ss(e,t)||ls()}function ls(){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 ss(e,t){if(e){if("string"===typeof e)return us(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)?us(e,t):void 0}}function us(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 ds(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(o.push(r.value),t&&o.length===t)break}catch(l){c=!0,i=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}return o}}function ps(e){if(Array.isArray(e))return e}var fs=Object(o["defineComponent"])({props:{widgets:Array},components:{WidgetLoader:Al},data:function(){return{selectedWidget:null}},created:function(){var e=cs(this.widgetsSorted,1);this.selectedWidget=e[0]},computed:{widgetsSorted:function(){return Hc(this.widgets)},widgetsByCategory:function(){var e={};return this.widgetsSorted.forEach((function(t){var n,r=null===(n=t.subcategory)||void 0===n?void 0:n.name;r&&(e[r]||(e[r]={name:r,order:t.order,widgets:[]}),e[r].widgets.push(t))})),Hc(Object.values(e))}},methods:{selectWidget:function(e){this.selectedWidget=os({},e)}}});fs.render=rs;var ms=fs,hs=(pn({component:ms,scope:{widgets:{angularJsBind:"=piwikWidgetByDimensionContainer",transform:function(e){return e.widgets}}},directiveName:"piwikWidgetByDimensionContainer"}),["id"]),gs={key:1},vs={key:2}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function fs(e,t,n,r,o,a){var c=Object(i["resolveComponent"])("WidgetLoader"),l=Object(i["resolveComponent"])("WidgetContainer"),s=Object(i["resolveComponent"])("WidgetByDimensionContainer"),u=Object(i["resolveDirective"])("tooltips");return e.actualWidget?Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:0,class:Object(i["normalizeClass"])(["matomo-widget",{isFirstWidgetInPage:e.actualWidget.isFirstInPage}]),id:e.actualWidget.uniqueId},[!e.actualWidget.isContainer&&e.actualWidget.parameters?(Object(i["openBlock"])(),Object(i["createBlock"])(c,{key:0,"widget-params":e.actualWidget.parameters,"widget-name":e.actualWidget.name},null,8,["widget-params","widget-name"])):Object(i["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"!==e.actualWidget.layout&&!this.preventRecursion?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ds,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l,{container:e.actualWidget.widgets},null,8,["container"])])])):Object(i["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"===e.actualWidget.layout?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ps,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(s,{widgets:e.actualWidget.widgets},null,8,["widgets"])])])):Object(i["createCommentVNode"])("",!0)],10,us)),[[i["vShow"],e.showWidget],[u,{content:e.tooltipContent}]]):Object(i["createCommentVNode"])("",!0)}function ms(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 hs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ms(Object(n),!0).forEach((function(t){gs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ms(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vs(e,t){var n;return Object.values(e||{}).some((function(e){return n=e.find((function(e){return e&&e.isContainer&&e.parameters.containerId===t})),n})),n}var bs=Object(i["defineComponent"])({props:{widget:Object,widgetized:Boolean,containerid:String,preventRecursion:Boolean},components:{WidgetLoader:Dl,WidgetContainer:Wl,WidgetByDimensionContainer:ss},directives:{Tooltips:Pr},data:function(){return{showWidget:!1}},setup:function(){function e(){var e=window.$(this);if(""===e.attr("piwik-field")||e.hasClass("matomo-form-field"))return"";var t=window.$(this).attr("title");return window.vueSanitize(t.replace(/\n/g,"<br />"))}return{tooltipContent:e}},created:function(){var e=this,t=this.actualWidget;t&&t.middlewareParameters?Qe.fetch(t.middlewareParameters).then((function(t){e.showWidget=!!t})):this.showWidget=!0},computed:{allWidgets:function(){return nl.widgets.value},actualWidget:function(){var e=this,t=this.widget;if(t){var n=hs({},t);if(t&&t.isReport&&!t.documentation){var r=vl.findReport(t.module,t.action);r&&r.documentation&&(n.documentation=r.documentation)}return t}if(this.containerid){var o=vs(this.allWidgets,this.containerid);if(o){var i=hs({},o);return this.widgetized&&(i.isFirstInPage=!0,i.parameters=hs(hs({},i.parameters),{},{widget:"1"}),i.widgets&&(i.widgets=i.widgets.map((function(t){return hs(hs({},t),{},{parameters:hs(hs({},t.parameters),{},{widget:"1",containerId:e.containerid})})})))),i}}return null}}});bs.render=fs;var ys=bs,Os=(pn({component:ys,scope:{widget:{angularJsBind:"=?piwikWidget"},widgetized:{angularJsBind:"=?"},containerid:{angularJsBind:"@"}},directiveName:"piwikWidget"}),{class:"reporting-page"}),ws={key:1,class:"col s12 l6 leftWidgetColumn"},js={key:2,class:"col s12 l6 rightWidgetColumn"}; + */function bs(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("WidgetLoader"),l=Object(o["resolveComponent"])("WidgetContainer"),s=Object(o["resolveComponent"])("WidgetByDimensionContainer"),u=Object(o["resolveDirective"])("tooltips");return e.actualWidget?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:0,class:Object(o["normalizeClass"])(["matomo-widget",{isFirstWidgetInPage:e.actualWidget.isFirstInPage}]),id:e.actualWidget.uniqueId},[!e.actualWidget.isContainer&&e.actualWidget.parameters?(Object(o["openBlock"])(),Object(o["createBlock"])(c,{key:0,"widget-params":e.actualWidget.parameters,"widget-name":e.actualWidget.name},null,8,["widget-params","widget-name"])):Object(o["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"!==e.actualWidget.layout&&!this.preventRecursion?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",gs,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(l,{container:e.actualWidget.widgets},null,8,["container"])])])):Object(o["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"===e.actualWidget.layout?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",vs,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(s,{widgets:e.actualWidget.widgets},null,8,["widgets"])])])):Object(o["createCommentVNode"])("",!0)],10,hs)),[[o["vShow"],e.showWidget],[u,{content:e.tooltipContent}]]):Object(o["createCommentVNode"])("",!0)}function ys(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 Os(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ys(Object(n),!0).forEach((function(t){ws(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ws(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function js(e,t){var n=void 0;return Object.values(e||{}).some((function(e){return n=e.find((function(e){var n;return e&&e.isContainer&&(null===(n=e.parameters)||void 0===n?void 0:n.containerId)===t})),n})),n}var ks=Object(o["defineComponent"])({props:{widget:Object,widgetized:Boolean,containerid:String,preventRecursion:Boolean},components:{WidgetLoader:Al,WidgetContainer:Yl,WidgetByDimensionContainer:ms},directives:{Tooltips:Pr},data:function(){return{showWidget:!1}},setup:function(){function e(){var e=window.$(this);if(""===e.attr("piwik-field")||e.hasClass("matomo-form-field"))return"";var t=window.$(this).attr("title")||"";return window.vueSanitize(t.replace(/\n/g,"<br />"))}return{tooltipContent:e}},created:function(){var e=this,t=this.actualWidget;if(t&&t.middlewareParameters){var n=t.middlewareParameters;Qe.fetch(n).then((function(t){e.showWidget=!!t}))}else this.showWidget=!0},computed:{allWidgets:function(){return cl.widgets.value},actualWidget:function(){var e=this,t=this.widget;if(t){var n=Os({},t);if(t&&t.isReport&&!t.documentation){var r=jl.findReport(t.module,t.action);r&&r.documentation&&(n.documentation=r.documentation)}return t}if(this.containerid){var i=js(this.allWidgets,this.containerid);if(i){var o=Os({},i);if(this.widgetized){o.isFirstInPage=!0,o.parameters=Os(Os({},o.parameters),{},{widget:"1"});var a=ol(o);a&&(o.widgets=a.map((function(t){return Os(Os({},t),{},{parameters:Os(Os({},t.parameters),{},{widget:"1",containerId:e.containerid})})})))}return o}}return null}}});ks.render=bs;var Ss=ks,Cs=(pn({component:Ss,scope:{widget:{angularJsBind:"=?piwikWidget"},widgetized:{angularJsBind:"=?"},containerid:{angularJsBind:"@"}},directiveName:"piwikWidget"}),{class:"reporting-page"}),Ps={key:1,class:"col s12 l6 leftWidgetColumn"},Ds={key:2,class:"col s12 l6 rightWidgetColumn"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ks(e,t,n,r,o,a){var c=Object(i["resolveComponent"])("ActivityIndicator"),l=Object(i["resolveComponent"])("Widget");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Os,[Object(i["createVNode"])(c,{loading:e.loading},null,8,["loading"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,Object(i["toDisplayString"])(e.translate("CoreHome_NoSuchPage")),513),[[i["vShow"],e.hasNoPage]]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.widgets,(function(e){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"row",key:e.uniqueId},[e.group?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createBlock"])(l,{key:0,class:"col s12 fullWidgetColumn",widget:e},null,8,["widget"])),e.group?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ws,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.left,(function(e){return Object(i["openBlock"])(),Object(i["createBlock"])(l,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(i["createCommentVNode"])("",!0),e.group?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",js,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.right,(function(e){return Object(i["openBlock"])(),Object(i["createBlock"])(l,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(i["createCommentVNode"])("",!0)])})),128))])}function Ss(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cs(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 Ps(e,t,n){return t&&Cs(e.prototype,t),n&&Cs(e,n),e}function Ds(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 Es(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ds(Object(n),!0).forEach((function(t){Vs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ds(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ns(e){return xs(e)||Is(e)||As(e)||Ts()}function Ts(){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 As(e,t){if(e){if("string"===typeof e)return Bs(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)?Bs(e,t):void 0}}function Is(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function xs(e){if(Array.isArray(e))return Bs(e)}function Bs(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 Es(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("ActivityIndicator"),l=Object(o["resolveComponent"])("Widget");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Cs,[Object(o["createVNode"])(c,{loading:e.loading},null,8,["loading"]),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",null,Object(o["toDisplayString"])(e.translate("CoreHome_NoSuchPage")),513),[[o["vShow"],e.hasNoPage]]),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.widgets,(function(e){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"row",key:e.uniqueId},[e.group?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createBlock"])(l,{key:0,class:"col s12 fullWidgetColumn",widget:e},null,8,["widget"])),e.group?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ps,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.left,(function(e){return Object(o["openBlock"])(),Object(o["createBlock"])(l,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(o["createCommentVNode"])("",!0),e.group?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ds,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.right,(function(e){return Object(o["openBlock"])(),Object(o["createBlock"])(l,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(o["createCommentVNode"])("",!0)])})),128))])}function Vs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ns(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 Ts(e,t,n){return t&&Ns(e.prototype,t),n&&Ns(e,n),e}function As(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 xs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?As(Object(n),!0).forEach((function(t){Is(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):As(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Is(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bs(e){return Rs(e)||Fs(e)||Ms(e)||Ls()}function Ls(){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 Ms(e,t){if(e){if("string"===typeof e)return _s(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)?_s(e,t):void 0}}function Fs(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Rs(e){if(Array.isArray(e))return _s(e)}function _s(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 - */function Ms(e){return!!(e.isContainer&&e.layout&&"ByDimension"===e.layout||"bydimension"===e.viewDataTable)||(!!e.isWide||e.viewDataTable&&("tableAllColumns"===e.viewDataTable||"sparklines"===e.viewDataTable||"graphEvolution"===e.viewDataTable))}function Ls(e){if(e&&e[0]){var t=Ns(e);return e[0].group?t[0]=Es(Es({},t[0]),{},{left:Ls(e[0].left),right:Ls(e[0].right)}):t[0]=Es(Es({},t[0]),{},{isFirstInPage:!0}),t}return e}var Fs=function(){function e(){var t=this;Ss(this,e),Vs(this,"privateState",Object(i["reactive"])({page:null})),Vs(this,"state",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState)}))),Vs(this,"page",Object(i["computed"])((function(){return t.state.value.page}))),Vs(this,"widgets",Object(i["computed"])((function(){var e=t.page.value;if(!e)return[];var n=[],r={},o=function(e){return e.isReport&&r["".concat(e.module,".").concat(e.action)]},i=function(e){if(!e.isReport)return[];var t=vl.findReport(e.module,e.action);return t&&t.relatedReports?t.relatedReports:[]};if((e.widgets||[]).forEach((function(e){o(e)||(i(e).forEach((function(e){r["".concat(e.module,".").concat(e.action)]=!0})),n.push(e))})),n=_c(n),1===n.length)return Ls(n);for(var a=[],c=0;c<n.length;c+=1){var l=n[c];if(Ms(l)||n[c+1]&&Ms(n[c+1]))a.push(Es(Es({},l),{},{widgets:_c(l.widgets)}));else{var s=0,u=[l],d=[];while(n[c+1]&&!Ms(n[c+1]))c+=1,s+=1,s%2===0?u.push(n[c]):d.push(n[c]);a.push({group:!0,left:u,right:d})}}return a=Ls(a),a})))}return Ps(e,[{key:"fetchPage",value:function(e,t){var n=this;return this.resetPage(),Promise.all([Ic.getAllPages(),vl.fetchReportMetadata()]).then((function(){return n.privateState.page=Ic.findPage(e,t),n.page.value}))}},{key:"resetPage",value:function(){this.privateState.page=null}}]),e}(),Rs=new Fs;function _s(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 $s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_s(Object(n),!0).forEach((function(t){Hs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Hs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Us=window,Ws=Us.$;function qs(){var e="category=General_Visitors&subcategory=Live_VisitorLog",t=window.broadcast.buildReportingUrl(e);jc.show({id:"onlyRawData",animate:!1,context:"info",message:C("CoreHome_PeriodHasOnlyRawData",'<a href="'.concat(t,'">'),"</a>"),type:"transient"})}function Js(){jc.remove("onlyRawData")}var Gs=Object(i["defineComponent"])({components:{ActivityIndicator:Oa,Widget:ys},data:function(){return{loading:!1,hasRawData:!1,hasNoVisits:!1,dateLastChecked:null,hasNoPage:!1}},created:function(){var e=this;Rs.resetPage(),this.loading=!0,this.renderInitialPage(),Object(i["watch"])((function(){return De.parsed.value}),(function(t,n){t.category===n.category&&t.subcategory===n.subcategory&&t.period===n.period&&t.date===n.date&&t.segment===n.segment&&JSON.stringify(t.compareDates)===JSON.stringify(n.compareDates)&&JSON.stringify(t.comparePeriods)===JSON.stringify(n.comparePeriods)&&JSON.stringify(t.compareSegments)===JSON.stringify(n.compareSegments)&&JSON.stringify(t.columns||"")===JSON.stringify(n.columns||"")||(t.date===n.date&&t.period===n.period||(Js(),e.dateLastChecked=null,e.hasRawData=!1,e.hasNoVisits=!1),e.renderPage(t.category,t.subcategory))})),S.on("loadPage",(function(t,n){e.renderPage(t,n)}))},computed:{widgets:function(){return Rs.widgets.value}},methods:{renderPage:function(e,t){var n=this;if(!e||!t)return Rs.resetPage(),void(this.loading=!1);var r=De.parsed.value,o=r.period,i=r.date;try{p.parse(o,i)}catch(l){return jc.show({id:"invalidDate",animate:!1,context:"error",message:C("CoreHome_DateInvalid"),type:"transient"}),Rs.resetPage(),void(this.loading=!1)}if(jc.remove("invalidDate"),S.postEvent("piwikPageChange",{}),jc.clearTransientNotifications(),p.parse(o,i).containsToday()&&this.showOnlyRawDataMessageIfRequired(),"Dashboard_Dashboard"===e&&Ws.isNumeric(t)&&Ws("[piwik-dashboard]").length){this.loading=!0;var a=Ws("[piwik-dashboard]"),c=angular.element(a).scope();c.fetchDashboard(parseInt(t,10)).then((function(){n.loading=!1}),(function(){n.loading=!1}))}else Rs.fetchPage(e,t).then((function(){var t=!Rs.page.value;if(t){var r=Ic.findPageInCategory(e);if(r&&r.subcategory)return void De.updateHash($s($s({},De.hashParsed.value),{},{subcategory:r.subcategory.id}))}n.hasNoPage=t,n.loading=!1}))},renderInitialPage:function(){var e=De.parsed.value;this.renderPage(e.category,e.subcategory)},showOnlyRawDataMessageIfRequired:function(){var e=this;this.hasRawData&&this.hasNoVisits&&qs();var t=De.parsed.value,n=t.segment;if(n)Js();else{var r=["Live_VisitorLog","General_RealTime","UserCountryMap_RealTimeMap","MediaAnalytics_TypeAudienceLog","MediaAnalytics_TypeRealTime","FormAnalytics_TypeRealTime","Goals_AddNewGoal"],o=["HeatmapSessionRecording_Heatmaps","HeatmapSessionRecording_SessionRecordings","Marketplace_Marketplace"];if(-1===r.indexOf(t.subcategory)&&-1===o.indexOf(t.category)&&-1===t.subcategory.toLowerCase().indexOf("manage")){var i=6e4;this.dateLastChecked&&(new Date).getTime()-this.dateLastChecked<i||Qe.fetch({method:"VisitsSummary.getVisits"}).then((function(t){return e.dateLastChecked=(new Date).getTime(),t.value>0?(e.hasNoVisits=!1,void Js()):(e.hasNoVisits=!0,e.hasRawData?void qs():Qe.fetch({method:"Live.getLastVisitsDetails",filter_limit:1,doNotFetchActions:1}))})).then((function(t){if(!t||0===t.length)return e.hasRawData=!1,void Js();e.hasRawData=!0,qs()}))}else Js()}}}});Gs.render=ks;var zs=Gs,Ys=(pn({component:zs,directiveName:"piwikReportingPage"}),{class:"report-export-popover row",id:"reportExport"}),Qs={class:"col l6"},Ks={name:"format"},Xs={name:"option_flat"},Zs={name:"option_expanded"},eu={name:"option_format_metrics"},tu={class:"col l6"},nu={name:"filter_type"},ru={class:"filter_limit"},ou={name:"filter_limit_all"},iu={key:0,name:"filter_limit"},au={key:1,name:"filter_limit"},cu={class:"col l12"},lu=["value"],su=Object(i["createTextVNode"])("\n "),uu=[su],du=["innerHTML"],pu={class:"col l12"},fu=["href","title"]; + */function $s(e){return!!(e.isContainer&&e.layout&&"ByDimension"===e.layout||"bydimension"===e.viewDataTable)||(!!e.isWide||e.viewDataTable&&("tableAllColumns"===e.viewDataTable||"sparklines"===e.viewDataTable||"graphEvolution"===e.viewDataTable))}function Hs(e){if(e&&e[0]){var t=Bs(e),n=e[0];return n.group?t[0]=xs(xs({},t[0]),{},{left:Hs(n.left||[]),right:Hs(n.right||[])}):t[0]=xs(xs({},t[0]),{},{isFirstInPage:!0}),t}return e}var Us=function(){function e(){var t=this;Vs(this,e),Is(this,"privateState",Object(o["reactive"])({})),Is(this,"state",Object(o["computed"])((function(){return Object(o["readonly"])(t.privateState)}))),Is(this,"page",Object(o["computed"])((function(){return t.state.value.page}))),Is(this,"widgets",Object(o["computed"])((function(){var e=t.page.value;if(!e)return[];var n=[],r={},i=function(e){return e.isReport&&r["".concat(e.module,".").concat(e.action)]},o=function(e){if(!e.isReport)return[];var t=jl.findReport(e.module,e.action);return t&&t.relatedReports?t.relatedReports:[]};if((e.widgets||[]).forEach((function(e){i(e)||(o(e).forEach((function(e){r["".concat(e.module,".").concat(e.action)]=!0})),n.push(e))})),n=Hc(n),1===n.length)return Hs(n);for(var a=[],c=0;c<n.length;c+=1){var l=n[c];if($s(l)||n[c+1]&&$s(n[c+1]))a.push(xs(xs({},l),{},{widgets:Hc(ol(l))}));else{var s=0,u=[l],d=[];while(n[c+1]&&!$s(n[c+1]))c+=1,s+=1,s%2===0?u.push(n[c]):d.push(n[c]);a.push({group:!0,left:u,right:d})}}var p=Hs(a);return p})))}return Ts(e,[{key:"fetchPage",value:function(e,t){var n=this;return this.resetPage(),Promise.all([Bc.getAllPages(),jl.fetchReportMetadata()]).then((function(){return n.privateState.page=Bc.findPage(e,t),n.page.value}))}},{key:"resetPage",value:function(){this.privateState.page=void 0}}]),e}(),qs=new Us;function Ws(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 Js(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ws(Object(n),!0).forEach((function(t){Gs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ws(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zs=window,Ys=zs.$;function Qs(){var e="category=General_Visitors&subcategory=Live_VisitorLog",t=window.broadcast.buildReportingUrl(e);Sc.show({id:"onlyRawData",animate:!1,context:"info",message:C("CoreHome_PeriodHasOnlyRawData",'<a href="'.concat(t,'">'),"</a>"),type:"transient"})}function Ks(){Sc.remove("onlyRawData")}var Xs=Object(o["defineComponent"])({components:{ActivityIndicator:Oa,Widget:Ss},data:function(){return{loading:!1,hasRawData:!1,hasNoVisits:!1,dateLastChecked:null,hasNoPage:!1}},created:function(){var e=this;qs.resetPage(),this.loading=!0,this.renderInitialPage(),Object(o["watch"])((function(){return De.parsed.value}),(function(t,n){t.category===n.category&&t.subcategory===n.subcategory&&t.period===n.period&&t.date===n.date&&t.segment===n.segment&&JSON.stringify(t.compareDates)===JSON.stringify(n.compareDates)&&JSON.stringify(t.comparePeriods)===JSON.stringify(n.comparePeriods)&&JSON.stringify(t.compareSegments)===JSON.stringify(n.compareSegments)&&JSON.stringify(t.columns||"")===JSON.stringify(n.columns||"")||(t.date===n.date&&t.period===n.period||(Ks(),e.dateLastChecked=null,e.hasRawData=!1,e.hasNoVisits=!1),e.renderPage(t.category,t.subcategory))})),S.on("loadPage",(function(t,n){e.renderPage(t,n)}))},computed:{widgets:function(){return qs.widgets.value}},methods:{renderPage:function(e,t){var n=this;if(!e||!t)return qs.resetPage(),void(this.loading=!1);var r=De.parsed.value,i=r.period,o=r.date;try{p.parse(i,o)}catch(l){return Sc.show({id:"invalidDate",animate:!1,context:"error",message:C("CoreHome_DateInvalid"),type:"transient"}),qs.resetPage(),void(this.loading=!1)}if(Sc.remove("invalidDate"),S.postEvent("piwikPageChange",{}),Sc.clearTransientNotifications(),p.parse(i,o).containsToday()&&this.showOnlyRawDataMessageIfRequired(),"Dashboard_Dashboard"===e&&Ys.isNumeric(t)&&Ys("[piwik-dashboard]").length){this.loading=!0;var a=Ys("[piwik-dashboard]"),c=window.angular.element(a).scope();c.fetchDashboard(parseInt(t,10)).then((function(){n.loading=!1}),(function(){n.loading=!1}))}else qs.fetchPage(e,t).then((function(){var t=!qs.page.value;if(t){var r=Bc.findPageInCategory(e);if(r&&r.subcategory)return void De.updateHash(Js(Js({},De.hashParsed.value),{},{subcategory:r.subcategory.id}))}n.hasNoPage=t,n.loading=!1}))},renderInitialPage:function(){var e=De.parsed.value;this.renderPage(e.category,e.subcategory)},showOnlyRawDataMessageIfRequired:function(){var e=this;this.hasRawData&&this.hasNoVisits&&Qs();var t=De.parsed.value,n=t.segment;if(n)Ks();else{var r=["Live_VisitorLog","General_RealTime","UserCountryMap_RealTimeMap","MediaAnalytics_TypeAudienceLog","MediaAnalytics_TypeRealTime","FormAnalytics_TypeRealTime","Goals_AddNewGoal"],i=["HeatmapSessionRecording_Heatmaps","HeatmapSessionRecording_SessionRecordings","Marketplace_Marketplace"],o=t.subcategory,a=t.category;if(-1===r.indexOf(o)&&-1===i.indexOf(a)&&-1===o.toLowerCase().indexOf("manage")){var c=6e4;this.dateLastChecked&&(new Date).valueOf()-this.dateLastChecked.valueOf()<c||Qe.fetch({method:"VisitsSummary.getVisits"}).then((function(t){return e.dateLastChecked=new Date,t.value>0?(e.hasNoVisits=!1,void Ks()):(e.hasNoVisits=!0,e.hasRawData?void Qs():Qe.fetch({method:"Live.getLastVisitsDetails",filter_limit:1,doNotFetchActions:1}))})).then((function(t){if(!t||0===t.length)return e.hasRawData=!1,void Ks();e.hasRawData=!0,Qs()}))}else Ks()}}}});Xs.render=Es;var Zs=Xs,eu=(pn({component:Zs,directiveName:"piwikReportingPage"}),{class:"report-export-popover row",id:"reportExport"}),tu={class:"col l6"},nu={name:"format"},ru={name:"option_flat"},iu={name:"option_expanded"},ou={name:"option_format_metrics"},au={class:"col l6"},cu={name:"filter_type"},lu={class:"filter_limit"},su={name:"filter_limit_all"},uu={key:0,name:"filter_limit"},du={key:1,name:"filter_limit"},pu={class:"col l12"},fu=["value"],mu=Object(o["createTextVNode"])("\n "),hu=[mu],gu=["innerHTML"],vu={class:"col l12"},bu=["href","title"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function mu(e,t,n,r,o,a){var c=Object(i["resolveComponent"])("Field"),l=Object(i["resolveDirective"])("select-on-focus");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ys,[Object(i["createElementVNode"])("div",Qs,[Object(i["createElementVNode"])("div",Ks,[Object(i["createVNode"])(c,{uicontrol:"radio",name:"format",title:e.translate("CoreHome_ExportFormat"),modelValue:e.reportFormat,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.reportFormat=t}),"full-width":!0,options:e.availableReportFormats[e.reportType]},null,8,["title","modelValue","options"])]),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",Xs,[Object(i["withDirectives"])(Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"option_flat",title:e.translate("CoreHome_FlattenReport"),modelValue:e.optionFlat,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.optionFlat=t})},null,8,["title","modelValue"]),[[i["vShow"],e.hasSubtables]])])]),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",Zs,[Object(i["withDirectives"])(Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"option_expanded",title:e.translate("CoreHome_ExpandSubtables"),modelValue:e.optionExpanded,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.optionExpanded=t})},null,8,["title","modelValue"]),[[i["vShow"],e.hasSubtables&&!e.optionFlat]])])]),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",eu,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"option_format_metrics",title:e.translate("CoreHome_FormatMetrics"),modelValue:e.optionFormatMetrics,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.optionFormatMetrics=t})},null,8,["title","modelValue"])])])]),Object(i["createElementVNode"])("div",tu,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",nu,[Object(i["createVNode"])(c,{uicontrol:"radio",name:"filter_type",title:e.translate("CoreHome_ReportType"),modelValue:e.reportType,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.reportType=t}),"full-width":!0,options:e.availableReportTypes},null,8,["title","modelValue","options"])])]),Object(i["createElementVNode"])("div",ru,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",ou,[Object(i["createVNode"])(c,{uicontrol:"radio",name:"filter_limit_all",title:e.translate("CoreHome_RowLimit"),modelValue:e.reportLimitAll,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.reportLimitAll=t}),"full-width":!0,options:e.limitAllOptions},null,8,["title","modelValue","options"])],512),[[i["vShow"],!e.maxFilterLimit||e.maxFilterLimit<=0]]),"no"===e.reportLimitAll&&e.maxFilterLimit<=0?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",iu,[Object(i["createVNode"])(c,{uicontrol:"number",name:"filter_limit",min:1,modelValue:e.reportLimit,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.reportLimit=t}),"full-width":!0},null,8,["modelValue"])])):Object(i["createCommentVNode"])("",!0),"no"===e.reportLimitAll&&e.maxFilterLimit>0?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",au,[Object(i["createVNode"])(c,{uicontrol:"number",name:"filter_limit",min:1,max:e.maxFilterLimit,modelValue:e.reportLimit,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.reportLimit=t}),value:e.reportLimit,"full-width":!0,title:e.filterLimitTooltip},null,8,["max","modelValue","value","title"])])):Object(i["createCommentVNode"])("",!0)])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",cu,[Object(i["withDirectives"])(Object(i["createElementVNode"])("textarea",{readonly:"",class:"exportFullUrl",value:e.exportLinkWithoutToken},uu,8,lu),[[l,{}]]),Object(i["createElementVNode"])("div",{class:"tooltip",innerHTML:e.$sanitize(e.translate("CoreHome_ExportTooltipWithLink","<a target=_blank href='?module=UsersManager&action=userSecurity'>","</a>","ENTER_YOUR_TOKEN_AUTH_HERE"))},null,8,du)],512),[[i["vShow"],e.showUrl]]),Object(i["createElementVNode"])("div",pu,[Object(i["createElementVNode"])("a",{class:"btn",href:e.exportLink,target:"_new",title:e.translate("CoreHome_ExportTooltip")},Object(i["toDisplayString"])(e.translate("General_Export")),9,fu),Object(i["createElementVNode"])("a",{href:"javascript:",onClick:t[8]||(t[8]=function(t){return e.showUrl=!e.showUrl}),class:"toggle-export-url"},[Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("CoreHome_ShowExportUrl")),513),[[i["vShow"],!e.showUrl]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("CoreHome_HideExportUrl")),513),[[i["vShow"],e.showUrl]])])])])}function hu(e,t){return Ou(e)||yu(e,t)||vu(e,t)||gu()}function gu(){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 vu(e,t){if(e){if("string"===typeof e)return bu(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)?bu(e,t):void 0}}function bu(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 yu(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){c=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw o}}return i}}function Ou(e){if(Array.isArray(e))return e}var wu=An("CorePluginsAdmin","Field"),ju=Object(i["defineComponent"])({components:{Field:wu},directives:{SelectOnFocus:Wt},props:{hasSubtables:Boolean,availableReportTypes:Object,availableReportFormats:Object,maxFilterLimit:Number,limitAllOptions:Object,dataTable:Object,requestParams:[Object,String],apiMethod:String,initialReportType:{type:String,default:"default"},initialReportLimit:{type:[String,Number],default:100},initialReportLimitAll:{type:String,default:"yes"},initialOptionFlat:{type:Boolean,default:!1},initialOptionExpanded:{type:Boolean,default:!0},initialOptionFormatMetrics:{type:Boolean,default:!1},initialReportFormat:{type:String,default:"XML"}},data:function(){return{showUrl:!1,reportFormat:this.initialReportFormat,optionFlat:this.initialOptionFlat,optionExpanded:this.initialOptionExpanded,optionFormatMetrics:this.initialOptionFormatMetrics,reportType:this.initialReportType,reportLimitAll:this.initialReportLimitAll,reportLimit:this.initialReportLimit}},watch:{reportType:function(e){this.availableReportFormats[e][this.reportFormat]||(this.reportFormat="XML")},reportLimit:function(e,t){this.maxFilterLimit>0&&parseInt(e,10)>parseInt(this.maxFilterLimit,10)&&(this.reportLimit=t)}},computed:{filterLimitTooltip:function(){var e=C("CoreHome_RowLimit"),t=C("General_ComputedMetricMax",this.maxFilterLimit);return"".concat(e," (").concat(t,")")},exportLink:function(){return this.getExportLink(!0)},exportLinkWithoutToken:function(){return this.getExportLink(!1)}},methods:{getExportLink:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.dataTable,n=this.reportFormat,r=this.apiMethod,o=this.reportType;if(n){var i=this.requestParams,a="yes"===this.reportLimitAll?-1:this.reportLimit;i=i&&"string"===typeof i?JSON.parse(i):{};var c=t.param,l=c.segment,s=c.label,u=c.idGoal,d=c.idDimension,p=c.idSite,f=t.param,m=f.date,h=f.period;"RSS"===n&&(m="last10"),"undefined"!==typeof t.param.dateUsedInGraph&&(m=t.param.dateUsedInGraph);var g=S.config.datatable_export_range_as_day.toLowerCase();-1!==g.indexOf(n.toLowerCase())&&"range"===t.param.period&&(h="day"),"range"===t.param.period&&"graphEvolution"===t.param.viewDataTable&&(h="day");var v={module:"API",format:n,idSite:p,period:h,date:m};if("processed"===o){v.method="API.getProcessedReport";var b=r.split("."),y=hu(b,2);v.apiModule=y[0],v.apiAction=y[1]}else v.method=r;if(t.param.compareDates&&t.param.compareDates.length&&(v.compareDates=t.param.compareDates,v.compare="1"),t.param.comparePeriods&&t.param.comparePeriods.length&&(v.comparePeriods=t.param.comparePeriods,v.compare="1"),t.param.compareSegments&&t.param.compareSegments.length&&(v.compareSegments=t.param.compareSegments,v.compare="1"),"undefined"!==typeof t.param.filter_pattern&&(v.filter_pattern=t.param.filter_pattern),"undefined"!==typeof t.param.filter_pattern_recursive&&(v.filter_pattern_recursive=t.param.filter_pattern_recursive),window.$.isPlainObject(i)&&Object.entries(i).forEach((function(e){var t=hu(e,2),n=t[0],r=t[1],o=r;!0===o?o=1:!1===o&&(o=0),v[n]=o})),this.optionFlat&&(v.flat=1,"undefined"!==typeof t.param.include_aggregate_rows&&"1"===t.param.include_aggregate_rows&&(v.include_aggregate_rows=1)),!this.optionFlat&&this.optionExpanded&&(v.expanded=1),this.optionFormatMetrics&&(v.format_metrics=1),t.param.pivotBy&&(v.pivotBy=t.param.pivotBy,v.pivotByColumnLimit=20,t.props.pivot_by_column&&(v.pivotByColumn=t.props.pivot_by_column)),"CSV"!==n&&"TSV"!==n&&"RSS"!==n||(v.translateColumnNames=1,v.language=S.language),"undefined"!==typeof l&&(v.segment=decodeURIComponent(l)),"undefined"!==typeof u&&"-1"!==u&&(v.idGoal=u),"undefined"!==typeof d&&"-1"!==d&&(v.idDimension=d),s){var O=s.split(",");if(O.length>1)v.label=O;else{var w=hu(O,1);v.label=w[0]}}v.token_auth="ENTER_YOUR_TOKEN_AUTH_HERE",!0===e&&(v.token_auth=S.token_auth,v.force_api_session=1),v.filter_limit=a;var j=window.location.href.split("?")[0];return"".concat(j,"?").concat(De.stringify(v))}}}});ju.render=mu;var ku=ju;function Su(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 Cu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Su(Object(n),!0).forEach((function(t){Pu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Su(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function yu(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("Field"),l=Object(o["resolveDirective"])("select-on-focus");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",eu,[Object(o["createElementVNode"])("div",tu,[Object(o["createElementVNode"])("div",nu,[Object(o["createVNode"])(c,{uicontrol:"radio",name:"format",title:e.translate("CoreHome_ExportFormat"),modelValue:e.reportFormat,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.reportFormat=t}),"full-width":!0,options:e.availableReportFormats[e.reportType]},null,8,["title","modelValue","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("div",ru,[Object(o["withDirectives"])(Object(o["createVNode"])(c,{uicontrol:"checkbox",name:"option_flat",title:e.translate("CoreHome_FlattenReport"),modelValue:e.optionFlat,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.optionFlat=t})},null,8,["title","modelValue"]),[[o["vShow"],e.hasSubtables]])])]),Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("div",iu,[Object(o["withDirectives"])(Object(o["createVNode"])(c,{uicontrol:"checkbox",name:"option_expanded",title:e.translate("CoreHome_ExpandSubtables"),modelValue:e.optionExpanded,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.optionExpanded=t})},null,8,["title","modelValue"]),[[o["vShow"],e.hasSubtables&&!e.optionFlat]])])]),Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("div",ou,[Object(o["createVNode"])(c,{uicontrol:"checkbox",name:"option_format_metrics",title:e.translate("CoreHome_FormatMetrics"),modelValue:e.optionFormatMetrics,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.optionFormatMetrics=t})},null,8,["title","modelValue"])])])]),Object(o["createElementVNode"])("div",au,[Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("div",cu,[Object(o["createVNode"])(c,{uicontrol:"radio",name:"filter_type",title:e.translate("CoreHome_ReportType"),modelValue:e.reportType,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.reportType=t}),"full-width":!0,options:e.availableReportTypes},null,8,["title","modelValue","options"])])]),Object(o["createElementVNode"])("div",lu,[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",su,[Object(o["createVNode"])(c,{uicontrol:"radio",name:"filter_limit_all",title:e.translate("CoreHome_RowLimit"),modelValue:e.reportLimitAll,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.reportLimitAll=t}),"full-width":!0,options:e.limitAllOptions},null,8,["title","modelValue","options"])],512),[[o["vShow"],!e.maxFilterLimit||e.maxFilterLimit<=0]]),"no"===e.reportLimitAll&&e.maxFilterLimit<=0?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",uu,[Object(o["createVNode"])(c,{uicontrol:"number",name:"filter_limit",min:1,modelValue:e.reportLimit,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.reportLimit=t}),"full-width":!0},null,8,["modelValue"])])):Object(o["createCommentVNode"])("",!0),"no"===e.reportLimitAll&&e.maxFilterLimit>0?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",du,[Object(o["createVNode"])(c,{uicontrol:"number",name:"filter_limit",min:1,max:e.maxFilterLimit,modelValue:e.reportLimit,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.reportLimit=t}),value:e.reportLimit,"full-width":!0,title:e.filterLimitTooltip},null,8,["max","modelValue","value","title"])])):Object(o["createCommentVNode"])("",!0)])]),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",pu,[Object(o["withDirectives"])(Object(o["createElementVNode"])("textarea",{readonly:"",class:"exportFullUrl",value:e.exportLinkWithoutToken},hu,8,fu),[[l,{}]]),Object(o["createElementVNode"])("div",{class:"tooltip",innerHTML:e.$sanitize(e.translate("CoreHome_ExportTooltipWithLink","<a target=_blank href='?module=UsersManager&action=userSecurity'>","</a>","ENTER_YOUR_TOKEN_AUTH_HERE"))},null,8,gu)],512),[[o["vShow"],e.showUrl]]),Object(o["createElementVNode"])("div",vu,[Object(o["createElementVNode"])("a",{class:"btn",href:e.exportLink,target:"_new",title:e.translate("CoreHome_ExportTooltip")},Object(o["toDisplayString"])(e.translate("General_Export")),9,bu),Object(o["createElementVNode"])("a",{href:"javascript:",onClick:t[8]||(t[8]=function(t){return e.showUrl=!e.showUrl}),class:"toggle-export-url"},[Object(o["withDirectives"])(Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.translate("CoreHome_ShowExportUrl")),513),[[o["vShow"],!e.showUrl]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.translate("CoreHome_HideExportUrl")),513),[[o["vShow"],e.showUrl]])])])])}function Ou(e,t){return Cu(e)||Su(e,t)||ju(e,t)||wu()}function wu(){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 ju(e,t){if(e){if("string"===typeof e)return ku(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)?ku(e,t):void 0}}function ku(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 Su(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(o.push(r.value),t&&o.length===t)break}catch(l){c=!0,i=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}return o}}function Cu(e){if(Array.isArray(e))return e}var Pu=An("CorePluginsAdmin","Field"),Du=Object(o["defineComponent"])({components:{Field:Pu},directives:{SelectOnFocus:qt},props:{hasSubtables:Boolean,availableReportTypes:Object,availableReportFormats:{type:Object,required:!0},maxFilterLimit:Number,limitAllOptions:Object,dataTable:{type:Object,required:!0},requestParams:[Object,String],apiMethod:{type:String,required:!0},initialReportType:{type:String,default:"default"},initialReportLimit:{type:[String,Number],default:100},initialReportLimitAll:{type:String,default:"yes"},initialOptionFlat:{type:Boolean,default:!1},initialOptionExpanded:{type:Boolean,default:!0},initialOptionFormatMetrics:{type:Boolean,default:!1},initialReportFormat:{type:String,default:"XML"}},data:function(){return{showUrl:!1,reportFormat:this.initialReportFormat,optionFlat:this.initialOptionFlat,optionExpanded:this.initialOptionExpanded,optionFormatMetrics:this.initialOptionFormatMetrics,reportType:this.initialReportType,reportLimitAll:this.initialReportLimitAll,reportLimit:"string"===typeof this.initialReportLimit?parseInt(this.initialReportLimit,10):this.initialReportLimit}},watch:{reportType:function(e){this.availableReportFormats[e][this.reportFormat]||(this.reportFormat="XML")},reportLimit:function(e,t){this.maxFilterLimit&&this.maxFilterLimit>0&&e>this.maxFilterLimit&&(this.reportLimit=t)}},computed:{filterLimitTooltip:function(){var e=C("CoreHome_RowLimit"),t=this.maxFilterLimit?C("General_ComputedMetricMax",this.maxFilterLimit.toString()):"";return"".concat(e," (").concat(t,")")},exportLink:function(){return this.getExportLink(!0)},exportLinkWithoutToken:function(){return this.getExportLink(!1)}},methods:{getExportLink:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.reportFormat,n=this.apiMethod,r=this.reportType,i=this.dataTable;if(t){var o={},a="yes"===this.reportLimitAll?-1:this.reportLimit;this.requestParams&&"string"===typeof this.requestParams&&(o=JSON.parse(this.requestParams));var c=i.param,l=c.segment,s=c.label,u=c.idGoal,d=c.idDimension,p=c.idSite,f=i.param,m=f.date,h=f.period;"RSS"===t&&(m="last10"),"undefined"!==typeof i.param.dateUsedInGraph&&(m=i.param.dateUsedInGraph);var g=S.config.datatable_export_range_as_day.toLowerCase();-1!==g.indexOf(t.toLowerCase())&&"range"===i.param.period&&(h="day"),"range"===i.param.period&&"graphEvolution"===i.param.viewDataTable&&(h="day");var v={module:"API",format:t,idSite:p,period:h,date:m};if("processed"===r){v.method="API.getProcessedReport";var b=n.split("."),y=Ou(b,2);v.apiModule=y[0],v.apiAction=y[1]}else v.method=n;if(i.param.compareDates&&i.param.compareDates.length&&(v.compareDates=i.param.compareDates,v.compare="1"),i.param.comparePeriods&&i.param.comparePeriods.length&&(v.comparePeriods=i.param.comparePeriods,v.compare="1"),i.param.compareSegments&&i.param.compareSegments.length&&(v.compareSegments=i.param.compareSegments,v.compare="1"),"undefined"!==typeof i.param.filter_pattern&&(v.filter_pattern=i.param.filter_pattern),"undefined"!==typeof i.param.filter_pattern_recursive&&(v.filter_pattern_recursive=i.param.filter_pattern_recursive),window.$.isPlainObject(o)&&Object.entries(o).forEach((function(e){var t=Ou(e,2),n=t[0],r=t[1],i=r;!0===i?i=1:!1===i&&(i=0),v[n]=i})),this.optionFlat&&(v.flat=1,"undefined"!==typeof i.param.include_aggregate_rows&&"1"===i.param.include_aggregate_rows&&(v.include_aggregate_rows=1)),!this.optionFlat&&this.optionExpanded&&(v.expanded=1),this.optionFormatMetrics&&(v.format_metrics=1),i.param.pivotBy&&(v.pivotBy=i.param.pivotBy,v.pivotByColumnLimit=20,i.props.pivot_by_column&&(v.pivotByColumn=i.props.pivot_by_column)),"CSV"!==t&&"TSV"!==t&&"RSS"!==t||(v.translateColumnNames=1,v.language=S.language),"undefined"!==typeof l&&(v.segment=decodeURIComponent(l)),"undefined"!==typeof u&&"-1"!==u&&(v.idGoal=u),"undefined"!==typeof d&&"-1"!==d&&(v.idDimension=d),s){var O=s.split(",");if(O.length>1)v.label=O;else{var w=Ou(O,1);v.label=w[0]}}v.token_auth="ENTER_YOUR_TOKEN_AUTH_HERE",!0===e&&(v.token_auth=S.token_auth,v.force_api_session=1),v.filter_limit=a;var j=window.location.href.split("?")[0];return"".concat(j,"?").concat(De.stringify(v))}}}});Du.render=yu;var Eu=Du;function Vu(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 Nu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vu(Object(n),!0).forEach((function(t){Tu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tu(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 Du=window,Eu=Du.$,Vu={mounted:function(e,t){e.addEventListener("click",(function(){var n=De.hashParsed.value.popover,r=Eu(e).closest("[data-report]").data("uiControlObject"),o=window.Piwik_Popover.showLoading("Export"),i=t.value.reportFormats,a=r.param.filter_limit;t.value.maxFilterLimit>0&&(a=Math.min(a,t.value.maxFilterLimit));var c=!0===r.param.flat||1===r.param.flat||"1"===r.param.flat,l={initialReportType:"default",initialReportLimit:a>0?a:100,initialReportLimitAll:-1===a?"yes":"no",initialOptionFlat:c,initialOptionExpanded:!0,initialOptionFormatMetrics:!1,hasSubtables:c||r.numberOfSubtables>0,availableReportFormats:{default:i,processed:{XML:i.XML,JSON:i.JSON}},availableReportTypes:{default:C("CoreHome_StandardReport"),processed:C("CoreHome_ReportWithMetadata")},limitAllOptions:{yes:C("General_All"),no:C("CoreHome_CustomLimit")},maxFilterLimit:t.value.maxFilterLimit,dataTable:r,requestParams:t.value.requestParams,apiMethod:t.value.apiMethod},s=Zt({template:'\n <popover v-bind="bind"/>',data:function(){return{bind:l}}});s.component("popover",ku);var u=document.createElement("div");s.mount(u);var d=t.value.reportTitle;window.Piwik_Popover.setTitle("".concat(C("General_Export")," ").concat(S.helper.htmlEntities(d))),window.Piwik_Popover.setContent(u),window.Piwik_Popover.onClose((function(){s.unmount(),""!==n&&setTimeout((function(){De.updateHash(Cu(Cu({},De.hashParsed.value),{},{popover:n})),t.value.onClose&&t.value.onClose()}),100)})),setTimeout((function(){o.dialog(),Eu(".exportFullUrl, .btn",o).tooltip({track:!0,show:!1,hide:!1})}),100)}))}}; + */var Au=window,xu=Au.$,Iu={mounted:function(e,t){e.addEventListener("click",(function(){var n=De.hashParsed.value.popover,r=xu(e).closest("[data-report]").data("uiControlObject"),i=window.Piwik_Popover.showLoading("Export"),o=t.value.reportFormats,a=r.param.filter_limit;t.value.maxFilterLimit>0&&(a=Math.min(a,t.value.maxFilterLimit));var c=!0===r.param.flat||1===r.param.flat||"1"===r.param.flat,l={initialReportType:"default",initialReportLimit:a>0?a:100,initialReportLimitAll:-1===a?"yes":"no",initialOptionFlat:c,initialOptionExpanded:!0,initialOptionFormatMetrics:!1,hasSubtables:c||r.numberOfSubtables>0,availableReportFormats:{default:o,processed:{XML:o.XML,JSON:o.JSON}},availableReportTypes:{default:C("CoreHome_StandardReport"),processed:C("CoreHome_ReportWithMetadata")},limitAllOptions:{yes:C("General_All"),no:C("CoreHome_CustomLimit")},maxFilterLimit:t.value.maxFilterLimit,dataTable:r,requestParams:t.value.requestParams,apiMethod:t.value.apiMethod},s=Zt({template:'\n <popover v-bind="bind"/>',data:function(){return{bind:l}}});s.component("popover",Eu);var u=document.createElement("div");s.mount(u);var d=t.value.reportTitle;window.Piwik_Popover.setTitle("".concat(C("General_Export")," ").concat(S.helper.htmlEntities(d))),window.Piwik_Popover.setContent(u),window.Piwik_Popover.onClose((function(){s.unmount(),""!==n&&setTimeout((function(){De.updateHash(Nu(Nu({},De.hashParsed.value),{},{popover:n})),t.value.onClose&&t.value.onClose()}),100)})),setTimeout((function(){i.dialog(),xu(".exportFullUrl, .btn",i).tooltip({track:!0,show:!1,hide:!1})}),100)}))}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Nu(e){return{restrict:"A",scope:{reportTitle:"@",requestParams:"@",reportFormats:"@",apiMethod:"@",maxFilterLimit:"@"},link:function(t,n){var r={instance:null,value:{reportTitle:t.reportTitle,requestParams:t.requestParams,reportFormats:"string"===typeof t.reportFormats?JSON.parse(t.reportFormats):t.reportFormats,apiMethod:t.apiMethod,maxFilterLimit:parseInt(t.maxFilterLimit,10),onClose:function(){e((function(){angular.element(document).injector().get("$rootScope").$apply()}),10)}},oldValue:null,modifiers:{},dir:{}};Vu.mounted(n[0],r)}}}Nu.$inject=["$timeout"],angular.module("piwikApp").directive("piwikReportExport",Nu);var Tu=["src"];function Au(e,t,n,r,o,a){return Object(i["openBlock"])(),Object(i["createElementBlock"])("img",{src:e.sparklineUrl},null,8,Tu)}function Iu(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 xu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Iu(Object(n),!0).forEach((function(t){Bu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Iu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Mu=Object(i["defineComponent"])({props:{seriesIndices:Array,params:Object},data:function(){return{isWidget:!1}},mounted:function(){this.isWidget=!!this.$el.closest("[widgetId]")},computed:{sparklineUrl:function(){var e=this.seriesIndices,t=this.params,n=S.getSparklineColors();e&&(n.lineColor=n.lineColor.filter((function(t,n){return-1!==e.indexOf(n)})));var r=JSON.stringify(n),o={forceView:"1",viewDataTable:"sparkline",widget:this.isWidget?"1":"0",showtitle:"1",colors:r,random:Date.now(),date:this.defaultDate},i=new Qe,a=i.mixinDefaultGetParams(xu(xu({},o),t)),c=De.parsed.value.token_auth;return c&&c.length&&S.shouldPropagateTokenAuth&&(a.token_auth=c),"?".concat(De.stringify(a))},defaultDate:function(){if("range"===S.period)return"".concat(S.startDateString,",").concat(S.endDateString);var e=_.getLastNRange(S.period,30,S.currentDateString).getDateRange(),t=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay);e[0]<t&&(e[0]=t);var n=P(e[0]),r=P(e[1]);return"".concat(n,",").concat(r)}}});Mu.render=Au;var Lu=Mu,Fu=(pn({component:Lu,scope:{seriesIndices:{angularJsBind:"<"},params:{angularJsBind:"<"}},directiveName:"piwikSparkline",restrict:"E"}),{class:"progressbar"}),Ru={class:"progress"},_u=Object(i["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),$u=["innerHTML"]; +function Bu(e){return{restrict:"A",scope:{reportTitle:"@",requestParams:"@",reportFormats:"@",apiMethod:"@",maxFilterLimit:"@"},link:function(t,n){var r={instance:null,value:{reportTitle:t.reportTitle,requestParams:t.requestParams,reportFormats:"string"===typeof t.reportFormats?JSON.parse(t.reportFormats):t.reportFormats,apiMethod:t.apiMethod,maxFilterLimit:parseInt(t.maxFilterLimit,10),onClose:function(){e((function(){window.angular.element(document).injector().get("$rootScope").$apply()}),10)}},oldValue:null,modifiers:{},dir:{}};Iu.mounted(n[0],r)}}}Bu.$inject=["$timeout"],window.angular.module("piwikApp").directive("piwikReportExport",Bu);var Lu=["src"];function Mu(e,t,n,r,i,a){return Object(o["openBlock"])(),Object(o["createElementBlock"])("img",{src:e.sparklineUrl},null,8,Lu)}function Fu(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 Ru(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fu(Object(n),!0).forEach((function(t){_u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $u=Object(o["defineComponent"])({props:{seriesIndices:Array,params:Object},data:function(){return{isWidget:!1}},mounted:function(){this.isWidget=!!this.$el.closest("[widgetId]")},computed:{sparklineUrl:function(){var e=this.seriesIndices,t=this.params,n=S.getSparklineColors();e&&(n.lineColor=n.lineColor.filter((function(t,n){return-1!==e.indexOf(n)})));var r=JSON.stringify(n),i={forceView:"1",viewDataTable:"sparkline",widget:this.isWidget?"1":"0",showtitle:"1",colors:r,random:Date.now(),date:this.defaultDate},o=new Qe,a=o.mixinDefaultGetParams(Ru(Ru({},i),t)),c=De.parsed.value.token_auth;return c&&c.length&&S.shouldPropagateTokenAuth&&(a.token_auth=c),"?".concat(De.stringify(a))},defaultDate:function(){if("range"===S.period)return"".concat(S.startDateString,",").concat(S.endDateString);var e=_.getLastNRange(S.period,30,S.currentDateString).getDateRange(),t=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay);e[0]<t&&(e[0]=t);var n=P(e[0]),r=P(e[1]);return"".concat(n,",").concat(r)}}});$u.render=Mu;var Hu=$u,Uu=(pn({component:Hu,scope:{seriesIndices:{angularJsBind:"<"},params:{angularJsBind:"<"}},directiveName:"piwikSparkline",restrict:"E"}),{class:"progressbar"}),qu={class:"progress"},Wu=Object(o["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Ju=["innerHTML"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Hu(e,t,n,r,o,a){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Fu,[Object(i["createElementVNode"])("div",Ru,[Object(i["createElementVNode"])("div",{class:"determinate",style:Object(i["normalizeStyle"])([{width:"0"},{width:"".concat(e.actualProgress,"%")}])},null,4)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[_u,Object(i["createElementVNode"])("span",{class:"label",innerHTML:e.$sanitize(e.label)},null,8,$u)],512),[[i["vShow"],!!e.label]])])}var Uu=Object(i["defineComponent"])({props:{progress:Number,label:String},computed:{actualProgress:function(){return this.progress>100?100:this.progress<0?0:this.progress}}});Uu.render=Hu;var Wu=Uu,qu=(pn({component:Wu,scope:{progress:{angularJsBind:"="},label:{angularJsBind:"="}},directiveName:"piwikProgressbar"}),{mounted:function(e){e.classList.add("piwik-content-intro")},updated:function(e){Object(i["nextTick"])((function(){e.classList.add("piwik-content-intro")}))}}); + */function Gu(e,t,n,r,i,a){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Uu,[Object(o["createElementVNode"])("div",qu,[Object(o["createElementVNode"])("div",{class:"determinate",style:Object(o["normalizeStyle"])([{width:"0"},{width:"".concat(e.actualProgress,"%")}])},null,4)]),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",null,[Wu,Object(o["createElementVNode"])("span",{class:"label",innerHTML:e.$sanitize(e.label)},null,8,Ju)],512),[[o["vShow"],!!e.label]])])}var zu=Object(o["defineComponent"])({props:{progress:{type:Number,required:!0},label:String},computed:{actualProgress:function(){return this.progress>100?100:this.progress<0?0:this.progress}}});zu.render=Gu;var Yu=zu,Qu=(pn({component:Yu,scope:{progress:{angularJsBind:"="},label:{angularJsBind:"="}},directiveName:"piwikProgressbar"}),{mounted:function(e){e.classList.add("piwik-content-intro")},updated:function(e){Object(o["nextTick"])((function(){e.classList.add("piwik-content-intro")}))}}); /*! * Matomo - free/libre analytics platform * @@ -505,37 +517,37 @@ function Nu(e){return{restrict:"A",scope:{reportTitle:"@",requestParams:"@",repo * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Ju(){return{restrict:"A",link:function(e,t){qu.mounted(t[0])}}}Ju.$inject=[],angular.module("piwikApp").directive("piwikContentIntro",Ju); +function Ku(){return{restrict:"A",link:function(e,t){Qu.mounted(t[0])}}}window.angular.module("piwikApp").directive("piwikContentIntro",Ku); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var Gu={mounted:function(e){e.classList.add("card","card-table","entityTable")},updated:function(e){Object(i["nextTick"])((function(){e.classList.add("card","card-table","entityTable")}))}}; + */var Xu={mounted:function(e){e.classList.add("card","card-table","entityTable")},updated:function(e){Object(o["nextTick"])((function(){e.classList.add("card","card-table","entityTable")}))}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function zu(){return{restrict:"A",link:function(e,t){Gu.mounted(t[0])}}}zu.$inject=[],angular.module("piwikApp").directive("piwikContentTable",zu);var Yu={ref:"root"};function Qu(e,t,n,r,o,a){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Yu,[Object(i["renderSlot"])(e.$slots,"default",{formData:e.formData,submitApiMethod:e.submitApiMethod,sendJsonPayload:e.sendJsonPayload,noErrorNotification:e.noErrorNotification,noSuccessNotification:e.noSuccessNotification,submitForm:e.submitForm,isSubmitting:e.isSubmitting,successfulPostResponse:e.successfulPostResponse,errorPostResponse:e.errorPostResponse})],512)}var Ku=window,Xu=Ku.$,Zu=Object(i["defineComponent"])({props:{formData:{type:Object,required:!0},submitApiMethod:{type:String,required:!0},sendJsonPayload:Boolean,noErrorNotification:Boolean,noSuccessNotification:Boolean},data:function(){return{isSubmitting:!1,successfulPostResponse:null,errorPostResponse:null}},emits:["update:modelValue"],mounted:function(){var e=this;Xu(this.$refs.root).on("click","input[type=submit]",(function(){e.submitForm()}))},methods:{submitForm:function(){var e=this;this.successfulPostResponse=null,this.errorPostResponse=null;var t=this.formData;this.sendJsonPayload&&(t={data:JSON.stringify(this.formData)}),this.isSubmitting=!0,Qe.post({module:"API",method:this.submitApiMethod},t,{createErrorNotification:!this.noErrorNotification}).then((function(t){if(e.successfulPostResponse=t,!e.noSuccessNotification){var n=jc.show({message:C("General_YourChangesHaveBeenSaved"),context:"success",type:"toast",id:"ajaxHelper"});jc.scrollToNotification(n)}})).catch((function(t){e.errorPostResponse=t.message})).finally((function(){e.isSubmitting=!1}))}}});Zu.render=Qu;var ed=Zu; + */function Zu(){return{restrict:"A",link:function(e,t){Xu.mounted(t[0])}}}window.angular.module("piwikApp").directive("piwikContentTable",Zu);var ed={ref:"root"};function td(e,t,n,r,i,a){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ed,[Object(o["renderSlot"])(e.$slots,"default",{formData:e.formData,submitApiMethod:e.submitApiMethod,sendJsonPayload:e.sendJsonPayload,noErrorNotification:e.noErrorNotification,noSuccessNotification:e.noSuccessNotification,submitForm:e.submitForm,isSubmitting:e.isSubmitting,successfulPostResponse:e.successfulPostResponse,errorPostResponse:e.errorPostResponse})],512)}var nd=window,rd=nd.$,id=Object(o["defineComponent"])({props:{formData:{type:Object,required:!0},submitApiMethod:{type:String,required:!0},sendJsonPayload:Boolean,noErrorNotification:Boolean,noSuccessNotification:Boolean},data:function(){return{isSubmitting:!1,successfulPostResponse:null,errorPostResponse:null}},emits:["update:modelValue"],mounted:function(){var e=this;rd(this.$refs.root).on("click","input[type=submit]",(function(){e.submitForm()}))},methods:{submitForm:function(){var e=this;this.successfulPostResponse=null,this.errorPostResponse=null;var t=this.formData;this.sendJsonPayload&&(t={data:JSON.stringify(this.formData)}),this.isSubmitting=!0,Qe.post({module:"API",method:this.submitApiMethod},t,{createErrorNotification:!this.noErrorNotification}).then((function(t){if(e.successfulPostResponse=t,!e.noSuccessNotification){var n=Sc.show({message:C("General_YourChangesHaveBeenSaved"),context:"success",type:"toast",id:"ajaxHelper"});Sc.scrollToNotification(n)}})).catch((function(t){e.errorPostResponse=t.message})).finally((function(){e.isSubmitting=!1}))}}});id.render=td;var od=id,ad=window,cd=ad.$; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function td(e){return{restrict:"A",scope:{submitApiMethod:"=",sendJsonPayload:"=",noErrorNotification:"=",noSuccessNotification:"=",useCustomDataBinding:"="},require:"?ngModel",transclude:!0,compile:function(t,n){return n.noErrorNotification=!!n.noErrorNotification,function(t,n,r,o,a){if(!t.submitApiMethod)throw new Error("submitApiMethod is required");if(t.ajaxForm={},t.ajaxForm.submitApiMethod=t.submitApiMethod,t.ajaxForm.sendJsonPayload=t.sendJsonPayload,t.ajaxForm.noErrorNotification=t.noErrorNotification,t.ajaxForm.noSuccessNotification=t.noSuccessNotification,t.ajaxForm.data={},o){var c=e(r.ngModel);t.ajaxForm.data=c(t.$parent)}var l={mounted:function(e,n){t.ajaxForm.submitForm=n.value.submitForm}},s='\n <AjaxForm\n :form-data="data"\n :submit-api-method="submitApiMethod"\n :send-json-payload="sendJsonPayload"\n :no-error-notification="noErrorNotification"\n :no-success-notification="noSuccessNotification"\n >\n <template v-slot:default="ajaxFormVue">\n <div\n ref="transcludeTarget"\n v-special-bind-directive="{ submitForm: ajaxFormVue.submitForm }"\n />\n </template>\n </AjaxForm>',u=Zt({template:s,data:function(){return t.ajaxForm},setup:function(){var e=Object(i["ref"])(null);return{transcludeTarget:e}}});u.component("AjaxForm",ed),u.directive("SpecialBindDirective",l);var d=u.mount(n[0]);function p(e,n){var r,o=angular.element,i=o(e).attr("name");r="checkbox"===o(e).attr("type")?o(e).is(":checked"):o(e).val(),t.ajaxForm.data[i]=r,n||setTimeout((function(){t.$apply()}),0)}n.on("$destroy",(function(){u.unmount()})),t.useCustomDataBinding||n.on("change","input,select",(function(e){p(e.target)})),a(t,(function(e,t){if(!t.useCustomDataBinding){var n=e.find("input,select").not("[type=submit]");n.each((function(){p(this,!0)}))}$(d.transcludeTarget).append(e)}))}}}}td.$inject=["$parse"],angular.module("piwikApp").directive("piwikAjaxForm",td); + */function ld(e){return{restrict:"A",scope:{submitApiMethod:"=",sendJsonPayload:"=",noErrorNotification:"=",noSuccessNotification:"=",useCustomDataBinding:"="},require:"?ngModel",transclude:!0,compile:function(t,n){return n.noErrorNotification=!!n.noErrorNotification,function(t,n,r,i,a){if(!t.submitApiMethod)throw new Error("submitApiMethod is required");if(t.ajaxForm={},t.ajaxForm.submitApiMethod=t.submitApiMethod,t.ajaxForm.sendJsonPayload=t.sendJsonPayload,t.ajaxForm.noErrorNotification=t.noErrorNotification,t.ajaxForm.noSuccessNotification=t.noSuccessNotification,t.ajaxForm.data={},i){var c=e(r.ngModel);t.ajaxForm.data=c(t.$parent)}var l={mounted:function(e,n){t.ajaxForm.submitForm=n.value.submitForm}},s='\n <AjaxForm\n :form-data="data"\n :submit-api-method="submitApiMethod"\n :send-json-payload="sendJsonPayload"\n :no-error-notification="noErrorNotification"\n :no-success-notification="noSuccessNotification"\n >\n <template v-slot:default="ajaxFormVue">\n <div\n ref="transcludeTarget"\n v-special-bind-directive="{ submitForm: ajaxFormVue.submitForm }"\n />\n </template>\n </AjaxForm>',u=Zt({template:s,data:function(){return t.ajaxForm},setup:function(){var e=Object(o["ref"])(null);return{transcludeTarget:e}}});u.component("AjaxForm",od),u.directive("SpecialBindDirective",l);var d=u.mount(n[0]);function p(e,n){var r,i=cd(e).attr("name");r="checkbox"===cd(e).attr("type")?cd(e).is(":checked"):cd(e).val(),t.ajaxForm.data[i]=r,n||setTimeout((function(){t.$apply()}),0)}n.on("$destroy",(function(){u.unmount()})),t.useCustomDataBinding||n.on("change","input,select",(function(e){p(e.target)})),a(t,(function(e,t){if(!t.useCustomDataBinding){var n=e.find("input,select").not("[type=submit]");n.each((function(){p(this,!0)}))}cd(d.transcludeTarget).append(e)}))}}}}ld.$inject=["$parse"],window.angular.module("piwikApp").directive("piwikAjaxForm",ld); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var nd=pn({component:Oa,scope:{loading:{vue:"loading",angularJsBind:"<"},loadingMessage:{vue:"loadingMessage",angularJsBind:"<",default:function(){return C("General_LoadingData")}}},$inject:[],directiveName:"piwikActivityIndicator"});function rd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function od(e,t,n,r,o,a){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])(["alert",rd({},"alert-".concat(e.severity),!0)])},[Object(i["renderSlot"])(e.$slots,"default")],2)}var id=Object(i["defineComponent"])({props:{severity:{type:String,required:!0}}});id.render=od;var ad=id,cd=pn({component:ad,scope:{severity:{vue:"severity",angularJsBind:"@piwikAlert"}},directiveName:"piwikAlert",transclude:!0}); + */var sd=pn({component:Oa,scope:{loading:{vue:"loading",angularJsBind:"<"},loadingMessage:{vue:"loadingMessage",angularJsBind:"<",default:function(){return C("General_LoadingData")}}},$inject:[],directiveName:"piwikActivityIndicator"});function ud(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dd(e,t,n,r,i,a){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["alert",ud({},"alert-".concat(e.severity),!0)])},[Object(o["renderSlot"])(e.$slots,"default")],2)}var pd=Object(o["defineComponent"])({props:{severity:{type:String,required:!0}}});pd.render=dd;var fd=pd,md=pn({component:fd,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 ld(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 sd(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 ud(e){var t=new Date;t.setTime(t.getTime()+-864e5),document.cookie="".concat(e,"=; expires=").concat(t.toUTCString(),"; path=/")} + */function hd(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 gd(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 vd(e){var t=new Date;t.setTime(t.getTime()+-864e5),document.cookie="".concat(e,"=; expires=").concat(t.toUTCString(),"; path=/")} /*! * Matomo - free/libre analytics platform * diff --git a/plugins/CoreHome/vue/src/AjaxForm/AjaxForm.adapter.ts b/plugins/CoreHome/vue/src/AjaxForm/AjaxForm.adapter.ts index 1e85f891e4..a998f1403b 100644 --- a/plugins/CoreHome/vue/src/AjaxForm/AjaxForm.adapter.ts +++ b/plugins/CoreHome/vue/src/AjaxForm/AjaxForm.adapter.ts @@ -6,9 +6,12 @@ */ import { DirectiveBinding, ref } from 'vue'; +import { IDirective, IDirectiveLinkFn, IParseService } from 'angular'; import createVueApp from '../createVueApp'; import AjaxForm from './AjaxForm.vue'; +const { $ } = window; + /** * AngularJS directive that manages an AJAX form. * @@ -57,7 +60,7 @@ import AjaxForm from './AjaxForm.vue'; * @deprecated */ -function piwikAjaxForm($parse) { +function piwikAjaxForm($parse: IParseService): IDirective { return { restrict: 'A', scope: { @@ -69,10 +72,11 @@ function piwikAjaxForm($parse) { }, require: '?ngModel', transclude: true, - compile: function piwikAjaxFormCompile(compileElement, compileAttrs) { + compile: function piwikAjaxFormCompile(compileElement, compileAttrs): IDirectiveLinkFn { compileAttrs.noErrorNotification = !!compileAttrs.noErrorNotification; - return function piwikAjaxFormLink(scope, element, attrs, ngModel, transclude) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return function piwikAjaxFormLink(scope: any, element, attrs, ngModel, transclude) { if (!scope.submitApiMethod) { throw new Error('submitApiMethod is required'); } @@ -139,8 +143,7 @@ function piwikAjaxForm($parse) { }); function setFormValueFromInput(inputElement: HTMLElement, skipScopeApply?: boolean) { - const $ = angular.element; - const name = $(inputElement).attr('name'); + const name = $(inputElement).attr('name')!; let val; if ($(inputElement).attr('type') === 'checkbox') { @@ -161,14 +164,15 @@ function piwikAjaxForm($parse) { // on change of any input, change appropriate value in model, but only if requested if (!scope.useCustomDataBinding) { element.on('change', 'input,select', (event) => { - setFormValueFromInput(event.target); + setFormValueFromInput(event.target as HTMLElement); }); } // make sure child elements can access this directive's scope - transclude(scope, (clone, transcludeScope) => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + transclude!(scope, (clone, transcludeScope: any) => { if (!transcludeScope.useCustomDataBinding) { - const $inputs = clone.find('input,select').not('[type=submit]'); + const $inputs = clone!.find('input,select').not('[type=submit]'); // initialize form data to input values (include <select>s $inputs.each(function inputEach() { @@ -176,7 +180,8 @@ function piwikAjaxForm($parse) { }); } - $(vm.transcludeTarget).append(clone); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + $((vm as any).transcludeTarget as HTMLElement).append(clone!); }); }; }, @@ -185,4 +190,4 @@ function piwikAjaxForm($parse) { piwikAjaxForm.$inject = ['$parse']; -angular.module('piwikApp').directive('piwikAjaxForm', piwikAjaxForm); +window.angular.module('piwikApp').directive('piwikAjaxForm', piwikAjaxForm); diff --git a/plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue b/plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue index 2d8fa2d3a8..935f438b62 100644 --- a/plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue +++ b/plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue @@ -66,7 +66,7 @@ export default defineComponent({ emits: ['update:modelValue'], mounted() { // on submit call controller submit method - $(this.$refs.root).on('click', 'input[type=submit]', () => { + $(this.$refs.root as HTMLElement).on('click', 'input[type=submit]', () => { this.submitForm(); }); }, diff --git a/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.adapter.ts b/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.adapter.ts index c960a42130..59bc1db685 100644 --- a/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.adapter.ts +++ b/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.adapter.ts @@ -2,14 +2,14 @@ import AjaxHelper from './AjaxHelper'; declare global { interface Window { - ajaxHelper: AjaxHelper; + ajaxHelper: typeof AjaxHelper; } } window.ajaxHelper = AjaxHelper; function ajaxQueue() { - return globalAjaxQueue; + return window.globalAjaxQueue; } -angular.module('piwikApp.service').service('globalAjaxQueue', ajaxQueue); +window.angular.module('piwikApp.service').service('globalAjaxQueue', ajaxQueue); diff --git a/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts b/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts index 1299743713..09ec644d81 100644 --- a/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts +++ b/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts @@ -174,7 +174,10 @@ export default class AjaxHelper<T = any> { // eslint-disable-line defaultParams = ['idSite', 'period', 'date', 'segment']; // helper method entry point - static fetch<R = any>(params: QueryParameters, options: AjaxOptions = {}): Promise<R> { // eslint-disable-line + static fetch<R = any>( // eslint-disable-line + params: QueryParameters, + options: AjaxOptions = {}, + ): Promise<R> { const helper = new AjaxHelper<R>(); if (options.withTokenInUrl) { helper.withTokenInUrl(); @@ -215,7 +218,8 @@ export default class AjaxHelper<T = any> { // eslint-disable-line // eslint-disable-next-line @typescript-eslint/no-explicit-any static post<R = any>( params: QueryParameters, - postParams: QueryParameters, + // eslint-disable-next-line + postParams: any, options: AjaxOptions = {}, ): Promise<R> { return this.fetch<R>(params, { ...options, postParams }); diff --git a/plugins/CoreHome/vue/src/Comparisons/Comparisons.adapter.ts b/plugins/CoreHome/vue/src/Comparisons/Comparisons.adapter.ts index 845c965081..c2133ed48d 100644 --- a/plugins/CoreHome/vue/src/Comparisons/Comparisons.adapter.ts +++ b/plugins/CoreHome/vue/src/Comparisons/Comparisons.adapter.ts @@ -13,9 +13,7 @@ function ComparisonFactory() { return ComparisonsStoreInstance; } -ComparisonFactory.$inject = []; - -angular.module('piwikApp.service').factory('piwikComparisonsService', ComparisonFactory); +window.angular.module('piwikApp.service').factory('piwikComparisonsService', ComparisonFactory); export default createAngularJsAdapter({ component: Comparisons, diff --git a/plugins/CoreHome/vue/src/Comparisons/Comparisons.vue b/plugins/CoreHome/vue/src/Comparisons/Comparisons.vue index 3acd384340..62bf2f04cc 100644 --- a/plugins/CoreHome/vue/src/Comparisons/Comparisons.vue +++ b/plugins/CoreHome/vue/src/Comparisons/Comparisons.vue @@ -94,13 +94,17 @@ interface ProcessedReportResponse { reportData: ProcessedReportData; } +interface ComparisonState { + comparisonTooltips: Record<string, Record<string, string>>|null; +} + export default defineComponent({ props: { }, directives: { Tooltips, }, - data() { + data(): ComparisonState { return { comparisonTooltips: null, }; @@ -113,8 +117,11 @@ export default defineComponent({ const periodComparisons = computed(() => ComparisonsStoreInstance.getPeriodComparisons()); const getSeriesColor = ComparisonsStoreInstance.getSeriesColor.bind(ComparisonsStoreInstance); - function transformTooltipContent() { + function transformTooltipContent(this: HTMLElement) { const title = window.$(this).attr('title'); + if (!title) { + return title; + } return window.vueSanitize(title.replace(/\n/g, '<br />')); } @@ -132,7 +139,7 @@ export default defineComponent({ }, removeSegmentComparison(index: number) { // otherwise the tooltip will be stuck on the screen - window.$(this.$refs.root).tooltip('destroy'); + window.$(this.$refs.root as HTMLElement).tooltip('destroy'); ComparisonsStoreInstance.removeSegmentComparison(index); }, getComparisonPeriodType(comparison: AnyComparison) { @@ -186,11 +193,11 @@ export default defineComponent({ }).then((report) => { this.comparisonTooltips = {}; periodComparisons.forEach((periodComp) => { - this.comparisonTooltips[periodComp.index] = {}; + this.comparisonTooltips![periodComp.index] = {}; segmentComparisons.forEach((segmentComp) => { const tooltip = this.generateComparisonTooltip(report, periodComp, segmentComp); - this.comparisonTooltips[periodComp.index][segmentComp.index] = tooltip; + this.comparisonTooltips![periodComp.index][segmentComp.index] = tooltip; }); }); }); diff --git a/plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue b/plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue index 12a89d770b..5c7c9bfce9 100644 --- a/plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue +++ b/plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue @@ -62,9 +62,10 @@ export default defineComponent({ }, }, mounted() { - const { root, content } = this.$refs; + const root = this.$refs.root as HTMLElement; + const content = this.$refs.content as HTMLElement; - if (this.anchor) { + if (this.anchor && root && root.parentElement) { const anchorElement = document.createElement('a'); anchorElement.id = this.anchor; root.parentElement.prepend(anchorElement); @@ -78,7 +79,7 @@ export default defineComponent({ } }, 0); - if (this.actualFeature && (this.actualFeature === true || this.actualFeature === 'true')) { + if (this.actualFeature && this.actualFeature === 'true') { this.actualFeature = this.contentTitle; } @@ -87,13 +88,13 @@ export default defineComponent({ adminContent = document.querySelector('#content.admin'); } - let contentTopPosition: number; + let contentTopPosition: number|null = null; if (adminContent) { contentTopPosition = adminContent.offsetTop; } if (contentTopPosition || contentTopPosition === 0) { - const parents = root.closest('[piwik-widget-loader]'); + const parents = root.closest('[piwik-widget-loader]') as HTMLElement; // when shown within the widget loader, we need to get the offset of that element // as the widget loader might be still shown. Would otherwise not position correctly @@ -103,7 +104,7 @@ export default defineComponent({ if (topThis - contentTopPosition < 17) { // we make sure to display the first card with no margin-top to have it on same as line as // navigation - root.style.marginTop = 0; + root.style.marginTop = '0'; } } }, diff --git a/plugins/CoreHome/vue/src/ContentIntro/ContentIntro.adapter.ts b/plugins/CoreHome/vue/src/ContentIntro/ContentIntro.adapter.ts index 423501203e..8669a29b52 100644 --- a/plugins/CoreHome/vue/src/ContentIntro/ContentIntro.adapter.ts +++ b/plugins/CoreHome/vue/src/ContentIntro/ContentIntro.adapter.ts @@ -17,6 +17,4 @@ export default function piwikContentIntro(): IDirective { }; } -piwikContentIntro.$inject = []; - -angular.module('piwikApp').directive('piwikContentIntro', piwikContentIntro); +window.angular.module('piwikApp').directive('piwikContentIntro', piwikContentIntro); diff --git a/plugins/CoreHome/vue/src/ContentTable/ContentTable.adapter.ts b/plugins/CoreHome/vue/src/ContentTable/ContentTable.adapter.ts index 83fb334a0c..a57d53ed4d 100644 --- a/plugins/CoreHome/vue/src/ContentTable/ContentTable.adapter.ts +++ b/plugins/CoreHome/vue/src/ContentTable/ContentTable.adapter.ts @@ -17,6 +17,4 @@ export default function piwikContentTable(): IDirective { }; } -piwikContentTable.$inject = []; - -angular.module('piwikApp').directive('piwikContentTable', piwikContentTable); +window.angular.module('piwikApp').directive('piwikContentTable', piwikContentTable); diff --git a/plugins/CoreHome/vue/src/DatePicker/DatePicker.adapter.ts b/plugins/CoreHome/vue/src/DatePicker/DatePicker.adapter.ts index 71223d58f2..e276e59dc3 100644 --- a/plugins/CoreHome/vue/src/DatePicker/DatePicker.adapter.ts +++ b/plugins/CoreHome/vue/src/DatePicker/DatePicker.adapter.ts @@ -9,7 +9,7 @@ import { ITimeoutService } from 'angular'; import createAngularJsAdapter from '../createAngularJsAdapter'; import DatePicker from './DatePicker.vue'; -export default createAngularJsAdapter({ +export default createAngularJsAdapter<[ITimeoutService]>({ component: DatePicker, scope: { selectedDateStart: { @@ -48,13 +48,13 @@ export default createAngularJsAdapter({ }, directiveName: 'piwikDatePicker', events: { - 'cell-hover': (event, scope, element, attrs, $timeout: ITimeoutService) => { + 'cell-hover': (event, vm, scope, element, attrs, controller, $timeout) => { $timeout(); // trigger new digest }, - 'cell-hover-leave': (event, scope, element, attrs, $timeout: ITimeoutService) => { + 'cell-hover-leave': (event, vm, scope, element, attrs, controller, $timeout) => { $timeout(); // trigger new digest }, - 'date-select': (event, scope, element, attrs, $timeout: ITimeoutService) => { + 'date-select': (event, vm, scope, element, attrs, controller, $timeout) => { $timeout(); // trigger new digest }, }, diff --git a/plugins/CoreHome/vue/src/DatePicker/DatePicker.vue b/plugins/CoreHome/vue/src/DatePicker/DatePicker.vue index 784d0d9311..1f605c70aa 100644 --- a/plugins/CoreHome/vue/src/DatePicker/DatePicker.vue +++ b/plugins/CoreHome/vue/src/DatePicker/DatePicker.vue @@ -15,7 +15,6 @@ import { watch, onMounted, } from 'vue'; -import JQuery = JQuery; import Matomo from '../Matomo/Matomo'; import { parseDate } from '../Periods'; @@ -36,7 +35,7 @@ export default defineComponent({ }, emits: ['cellHover', 'cellHoverLeave', 'dateSelect'], setup(props, context) { - const root = ref<HTMLElement>(null); + const root = ref<HTMLElement|null>(null); function setDateCellColor($dateCell: JQuery, dateValue: Date): void { const $dateCellLink = $dateCell.children('a'); @@ -75,7 +74,7 @@ export default defineComponent({ return new Date(year, month, day); } - function getOtherMonthDate($dateCell, month, year) { + function getOtherMonthDate($dateCell: JQuery, month: number, year: number) { let date; const $row = $dateCell.parent(); @@ -99,17 +98,17 @@ export default defineComponent({ } function getMonthYearDisplayed(): number[] { - const element = $(root.value); + const element = $(root.value!) as JQuery; const $firstCellWithMonth = element.find('td[data-month]'); - const month = parseInt($firstCellWithMonth.attr('data-month'), 10); - const year = parseInt($firstCellWithMonth.attr('data-year'), 10); + const month = parseInt($firstCellWithMonth.attr('data-month')!, 10); + const year = parseInt($firstCellWithMonth.attr('data-year')!, 10); return [month, year]; } function setDatePickerCellColors() { - const element = $(root.value); + const element = $(root.value!); const $calendarTable = element.find('.ui-datepicker-calendar'); @@ -129,20 +128,22 @@ export default defineComponent({ } function viewDateChanged(): boolean { - let date = props.viewDate; - if (!date) { + if (!props.viewDate) { return false; } - if (!(date instanceof Date)) { + let date: Date; + if (typeof props.viewDate === 'string') { try { - date = parseDate(date); + date = parseDate(props.viewDate); } catch (e) { return false; } + } else { + date = props.viewDate as Date; } - const element = $(root.value); + const element = $(root.value!); // only change the datepicker date if the date is outside of the current month/year. // this avoids a re-render in other cases. @@ -158,7 +159,7 @@ export default defineComponent({ // remove the ui-state-active class & click handlers for every cell. we bypass // the datepicker's date selection logic for smoother browser rendering. function onJqueryUiRenderedPicker(): void { - const element = $(root.value); + const element = $(root.value!); element.find('td[data-event]').off('click'); element.find('.ui-state-active').removeClass('ui-state-active'); @@ -169,7 +170,7 @@ export default defineComponent({ } function stepMonthsChanged(): boolean { - const element = $(root.value); + const element = $(root.value!); const stepMonths = props.stepMonths || DEFAULT_STEP_MONTHS; if (element.datepicker('option', 'stepMonths') === stepMonths) { @@ -178,8 +179,8 @@ export default defineComponent({ // setting stepMonths will change the month in view back to the selected date. to avoid // we set the selected date to the month in view. - const currentMonth = $('.ui-datepicker-month', element).val(); - const currentYear = $('.ui-datepicker-year', element).val(); + const currentMonth = $('.ui-datepicker-month', element).val() as number; + const currentYear = $('.ui-datepicker-year', element).val() as number; element .datepicker('option', 'stepMonths', stepMonths) @@ -191,12 +192,14 @@ export default defineComponent({ } function enableDisableMonthDropdown(): void { - const element = $(root.value); - - element.find('.ui-datepicker-month').attr('disabled', props.disableMonthDropdown); + const element = $(root.value!); + const monthPicker = element.find('.ui-datepicker-month')[0] as HTMLInputElement; + if (monthPicker) { + monthPicker.disabled = props.disableMonthDropdown; + } } - function handleOtherMonthClick() { + function handleOtherMonthClick(this: HTMLElement) { if (!$(this).hasClass('ui-state-hover')) { return; } @@ -229,26 +232,29 @@ export default defineComponent({ let redraw = false; [ - 'selectedDateStart', - 'selectedDateEnd', - 'highlightedDateStart', - 'highlightedDateEnd', - ].forEach((propName) => { + (x: typeof props): Date|undefined => x.selectedDateStart, + (x: typeof props): Date|undefined => x.selectedDateEnd, + (x: typeof props): Date|undefined => x.highlightedDateStart, + (x: typeof props): Date|undefined => x.highlightedDateEnd, + ].forEach((selector) => { if (redraw) { return; } - if (!newProps[propName] && oldProps[propName]) { + const newProp = selector(newProps); + const oldProp = selector(oldProps); + + if (!newProp && oldProp) { redraw = true; } - if (newProps[propName] && !oldProps[propName]) { + if (newProp && !oldProp) { redraw = true; } - if (newProps[propName] - && oldProps[propName] - && newProps[propName].getTime() !== oldProps[propName].getTime() + if (newProp + && oldProp + && newProp.getTime() !== oldProp.getTime() ) { redraw = true; } @@ -262,7 +268,7 @@ export default defineComponent({ stepMonthsChanged(); } - if (newProps.enableDisableMonthDropdown !== oldProps.enableDisableMonthDropdown) { + if (newProps.disableMonthDropdown !== oldProps.disableMonthDropdown) { enableDisableMonthDropdown(); } @@ -273,7 +279,7 @@ export default defineComponent({ }); onMounted(() => { - const element = $(root.value); + const element = $(root.value!); const customOptions = props.options || {}; const datePickerOptions = { @@ -319,8 +325,7 @@ export default defineComponent({ .on('mouseenter', 'thead', () => context.emit('cellHoverLeave')); // make sure whitespace is clickable when the period makes it appropriate - element.on('click', 'tbody td.ui-datepicker-other-month', - () => handleOtherMonthClick()); + element.on('click', 'tbody td.ui-datepicker-other-month', handleOtherMonthClick); // NOTE: using a selector w/ .on() doesn't seem to work for some reason... element.on('click', (e) => { @@ -340,8 +345,8 @@ export default defineComponent({ // with onJqueryUiRenderedPicker(), overrides the date picker's click behavior. element.on('click', 'td[data-month]', (event) => { const $cell = $(event.target).closest('td') as JQuery; - const month = parseInt($cell.attr('data-month'), 10); - const year = parseInt($cell.attr('data-year'), 10); + const month = parseInt($cell.attr('data-month')!, 10); + const year = parseInt($cell.attr('data-year')!, 10); const day = parseInt($cell.children('a,span').text(), 10); context.emit('dateSelect', { date: new Date(year, month, day) }); }); diff --git a/plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.vue b/plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.vue index a3f68387b0..0a5608d2aa 100644 --- a/plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.vue +++ b/plugins/CoreHome/vue/src/DateRangePicker/DateRangePicker.vue @@ -63,13 +63,23 @@ <script lang="ts"> import { defineComponent } from 'vue'; -import JQuery = JQuery; import DatePicker from '../DatePicker/DatePicker.vue'; import { parseDate, format } from '../Periods/utilities'; import ChangeEvent = JQuery.ChangeEvent; const DATE_FORMAT = 'YYYY-MM-DD'; +interface DateRangePickerState { + fromPickerSelectedDates: (Date|null)[]; + toPickerSelectedDates: (Date|null)[]; + fromPickerHighlightedDates: (Date|null)[]; + toPickerHighlightedDates: (Date|null)[]; + startDateText?: string; + endDateText?: string; + startDateInvalid: boolean; + endDateInvalid: boolean; +} + export default defineComponent({ props: { startDate: String, @@ -78,17 +88,21 @@ export default defineComponent({ components: { DatePicker, }, - data() { + data(): DateRangePickerState { let startDate = null; try { - startDate = parseDate(this.startDate); + if (this.startDate) { + startDate = parseDate(this.startDate); + } } catch (e) { // ignore } let endDate = null; try { - endDate = parseDate(this.endDate); + if (this.endDate) { + endDate = parseDate(this.endDate); + } } catch (e) { // ignore } @@ -155,12 +169,12 @@ export default defineComponent({ end: this.endDate, }); }, - setStartRangeDateFromStr(dateStr: string) { + setStartRangeDateFromStr(dateStr?: string) { this.startDateInvalid = true; - let startDateParsed: Date; + let startDateParsed: Date|null = null; try { - if (dateStr.length === DATE_FORMAT.length) { + if (dateStr && dateStr.length === DATE_FORMAT.length) { startDateParsed = parseDate(dateStr); } } catch (e) { @@ -174,12 +188,12 @@ export default defineComponent({ this.rangeChanged(); } }, - setEndRangeDateFromStr(dateStr: string) { + setEndRangeDateFromStr(dateStr?: string) { this.endDateInvalid = true; - let endDateParsed: Date; + let endDateParsed: Date|null = null; try { - if (dateStr.length === DATE_FORMAT.length) { + if (dateStr && dateStr.length === DATE_FORMAT.length) { endDateParsed = parseDate(dateStr); } } catch (e) { @@ -195,8 +209,8 @@ export default defineComponent({ }, rangeChanged() { this.$emit('rangeChange', { - start: format(this.fromPickerSelectedDates[0]), - end: format(this.toPickerSelectedDates[0]), + start: this.fromPickerSelectedDates[0] ? format(this.fromPickerSelectedDates[0]) : null, + end: this.toPickerSelectedDates[0] ? format(this.toPickerSelectedDates[0]) : null, }); }, }, diff --git a/plugins/CoreHome/vue/src/DropdownButton/DropdownButton.adapter.ts b/plugins/CoreHome/vue/src/DropdownButton/DropdownButton.adapter.ts index 4f07a5338a..24cbb668e8 100644 --- a/plugins/CoreHome/vue/src/DropdownButton/DropdownButton.adapter.ts +++ b/plugins/CoreHome/vue/src/DropdownButton/DropdownButton.adapter.ts @@ -17,6 +17,4 @@ export default function piwikDropdownButton(): IDirective { }; } -piwikDropdownButton.$inject = []; - -angular.module('piwikApp').directive('dropdownButton', piwikDropdownButton); +window.angular.module('piwikApp').directive('dropdownButton', piwikDropdownButton); diff --git a/plugins/CoreHome/vue/src/DropdownButton/DropdownButton.ts b/plugins/CoreHome/vue/src/DropdownButton/DropdownButton.ts index 5369039418..ae1f20d6a2 100644 --- a/plugins/CoreHome/vue/src/DropdownButton/DropdownButton.ts +++ b/plugins/CoreHome/vue/src/DropdownButton/DropdownButton.ts @@ -9,18 +9,18 @@ const { $ } = window; export default { mounted(el: HTMLElement): void { - const element = $(el); + const element = $(el) as JQuery; // BC for materializecss 0.97 => 1.0 if (!element.attr('data-target') && element.attr('data-activates') ) { - element.attr('data-target', element.attr('data-activates')); + element.attr('data-target', element.attr('data-activates')!); } const target = element.attr('data-target'); if (target && $(`#${target}`).length) { - $(element).dropdown({ + (element as any).dropdown({ // eslint-disable-line inDuration: 300, outDuration: 225, constrainWidth: false, // Does not change width of dropdown to that of the activator diff --git a/plugins/CoreHome/vue/src/DropdownMenu/DropdownMenu.adapter.ts b/plugins/CoreHome/vue/src/DropdownMenu/DropdownMenu.adapter.ts index 1e8598881a..fa50cbcce1 100644 --- a/plugins/CoreHome/vue/src/DropdownMenu/DropdownMenu.adapter.ts +++ b/plugins/CoreHome/vue/src/DropdownMenu/DropdownMenu.adapter.ts @@ -5,10 +5,10 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import { IDirective } from 'angular'; +import { IDirective, ITimeoutService } from 'angular'; import DropdownMenu from './DropdownMenu'; -function piwikDropdownMenu($timeout): IDirective { +function piwikDropdownMenu($timeout: ITimeoutService): IDirective { return { restrict: 'A', link: function piwikDropdownMenuLink(scope, element, attrs) { @@ -31,4 +31,4 @@ function piwikDropdownMenu($timeout): IDirective { piwikDropdownMenu.$inject = ['$timeout']; -angular.module('piwikApp').directive('piwikDropdownMenu', piwikDropdownMenu); +window.angular.module('piwikApp').directive('piwikDropdownMenu', piwikDropdownMenu); diff --git a/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue b/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue index 1fab345a47..70c394a29a 100644 --- a/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue +++ b/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue @@ -79,6 +79,13 @@ import useExternalPluginComponent from '../useExternalPluginComponent'; // CoreHome) const RateFeature = useExternalPluginComponent('Feedback', 'RateFeature'); +interface EnrichedHeadlineData { + showIcons: boolean; + showInlineHelp: boolean; + actualFeatureName?: string | null; + actualInlineHelp?: string | null, +} + /** * Usage: * @@ -127,7 +134,7 @@ export default defineComponent({ components: { RateFeature, }, - data() { + data(): EnrichedHeadlineData { return { showIcons: false, showInlineHelp: false, @@ -144,7 +151,7 @@ export default defineComponent({ }, }, mounted() { - const { root } = this.$refs; + const root = this.$refs.root as HTMLElement; // timeout used since angularjs does not fill out the transclude at this point setTimeout(() => { @@ -160,28 +167,35 @@ export default defineComponent({ // hackish solution to get binded html of p tag within the help node // at this point the ng-bind-html is not yet converted into html when report is not // initially loaded. Using $compile doesn't work. So get and set it manually - const helpDocs = helpNode.getAttribute('data-content').trim(); - if (helpDocs.length) { + const helpDocs = helpNode.getAttribute('data-content')?.trim(); + if (helpDocs && helpDocs.length) { this.actualInlineHelp = `<p>${helpDocs}</p>`; - setTimeout(() => helpNode.remove(), 0); + setTimeout(() => helpNode!.remove(), 0); } } } if (!this.actualFeatureName) { - this.actualFeatureName = root.querySelector('.title').textContent; + this.actualFeatureName = root.querySelector('.title')?.textContent; } - if (this.reportGenerated - && Periods.parse(Matomo.period, Matomo.currentDateString).containsToday() - ) { - window.$(root.querySelector('.report-generated')).tooltip({ - track: true, - content: this.reportGenerated, - items: 'div', - show: false, - hide: false, - }); + if (Matomo.period && Matomo.currentDateString) { + const currentPeriod = Periods.parse( + Matomo.period as string, + Matomo.currentDateString as string, + ); + + if (this.reportGenerated + && currentPeriod.containsToday() + ) { + window.$(root.querySelector('.report-generated')!).tooltip({ + track: true, + content: this.reportGenerated, + items: 'div', + show: false, + hide: false, + }); + } } }); }, diff --git a/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.adapter.ts b/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.adapter.ts index c4d39aab52..f4aa4bf46f 100644 --- a/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.adapter.ts +++ b/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.adapter.ts @@ -28,6 +28,4 @@ export default function piwikExpandOnClick(): IDirective { }; } -piwikExpandOnClick.$inject = []; - -angular.module('piwikApp').directive('piwikExpandOnClick', piwikExpandOnClick); +window.angular.module('piwikApp').directive('piwikExpandOnClick', piwikExpandOnClick); diff --git a/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts b/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts index 50cfe5e2c5..4f8f02ddd8 100644 --- a/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts +++ b/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts @@ -92,7 +92,9 @@ export default { setTimeout(() => { const expander = DirectiveUtilities.getRef(binding.value.expander, binding); - expander.addEventListener('click', binding.value.onExpand); + if (expander) { + expander.addEventListener('click', binding.value.onExpand!); + } }); doc.addEventListener('keyup', binding.value.onEscapeHandler); doc.addEventListener('mousedown', binding.value.onMouseDown); @@ -101,10 +103,12 @@ export default { }, unmounted(el: HTMLElement, binding: DirectiveBinding<ExpandOnClickArgs>): void { const expander = DirectiveUtilities.getRef(binding.value.expander, binding); - expander.removeEventListener('click', binding.value.onExpand); - doc.removeEventListener('keyup', binding.value.onEscapeHandler); - doc.removeEventListener('mousedown', binding.value.onMouseDown); - doc.removeEventListener('mouseup', binding.value.onClickOutsideElement); - doc.removeEventListener('scroll', binding.value.onScroll); + if (expander) { + expander.removeEventListener('click', binding.value.onExpand!); + } + doc.removeEventListener('keyup', binding.value.onEscapeHandler!); + doc.removeEventListener('mousedown', binding.value.onMouseDown!); + doc.removeEventListener('mouseup', binding.value.onClickOutsideElement!); + doc.removeEventListener('scroll', binding.value.onScroll!); }, }; diff --git a/plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.adapter.ts b/plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.adapter.ts index 83ea6ff966..5dee0e351b 100644 --- a/plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.adapter.ts +++ b/plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.adapter.ts @@ -5,12 +5,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ +import { IScope } from 'angular'; import ExpandOnHover from './ExpandOnHover'; function piwikExpandOnHover() { return { restrict: 'A', - link: function expandOnHoverLink(scope, element) { + link: function expandOnHoverLink(scope: IScope, element: JQLite) { const binding = { instance: null, value: { @@ -27,6 +28,4 @@ function piwikExpandOnHover() { }; } -piwikExpandOnHover.$inject = []; - -angular.module('piwikApp').directive('piwikExpandOnHover', piwikExpandOnHover); +window.angular.module('piwikApp').directive('piwikExpandOnHover', piwikExpandOnHover); diff --git a/plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.ts b/plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.ts index 98afe493f0..f6786eab4b 100644 --- a/plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.ts +++ b/plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.ts @@ -62,7 +62,9 @@ export default { setTimeout(() => { const expander = DirectiveUtilities.getRef(binding.value.expander, binding); - expander.addEventListener('mouseenter', binding.value.onMouseEnter); + if (expander) { + expander.addEventListener('mouseenter', binding.value.onMouseEnter!); + } }); el.addEventListener('mouseleave', binding.value.onMouseLeave); @@ -71,9 +73,11 @@ export default { }, unmounted(el: HTMLElement, binding: DirectiveBinding<ExpandOnHoverArgs>): void { const expander = DirectiveUtilities.getRef(binding.value.expander, binding); - expander.removeEventListener('mouseenter', binding.value.onMouseEnter); - el.removeEventListener('mouseleave', binding.value.onMouseLeave); - document.removeEventListener('keyup', binding.value.onEscapeHandler); - document.removeEventListener('mouseup', binding.value.onClickOutsideElement); + if (expander) { + expander.removeEventListener('mouseenter', binding.value.onMouseEnter!); + } + el.removeEventListener('mouseleave', binding.value.onMouseLeave!); + document.removeEventListener('keyup', binding.value.onEscapeHandler!); + document.removeEventListener('mouseup', binding.value.onClickOutsideElement!); }, }; diff --git a/plugins/CoreHome/vue/src/FieldArray/FieldArray.adapter.ts b/plugins/CoreHome/vue/src/FieldArray/FieldArray.adapter.ts index 2ab3d0a785..43b533806e 100644 --- a/plugins/CoreHome/vue/src/FieldArray/FieldArray.adapter.ts +++ b/plugins/CoreHome/vue/src/FieldArray/FieldArray.adapter.ts @@ -40,7 +40,7 @@ export default createAngularJsAdapter({ ngModel.$setViewValue(vm.modelValue); ngModel.$render = () => { - if (angular.isString(ngModel.$viewValue)) { + if (window.angular.isString(ngModel.$viewValue)) { vm.modelValue = JSON.parse(ngModel.$viewValue); } else { vm.modelValue = ngModel.$viewValue; diff --git a/plugins/CoreHome/vue/src/FieldArray/FieldArray.vue b/plugins/CoreHome/vue/src/FieldArray/FieldArray.vue index 469e250f91..9a35f2f5d2 100644 --- a/plugins/CoreHome/vue/src/FieldArray/FieldArray.vue +++ b/plugins/CoreHome/vue/src/FieldArray/FieldArray.vue @@ -64,20 +64,20 @@ export default defineComponent({ this.checkEmptyModelValue(this.modelValue); }, methods: { - checkEmptyModelValue(newValue) { + checkEmptyModelValue(newValue?: unknown[]) { // make sure there is always an empty new value if (!newValue || !newValue.length || newValue.slice(-1)[0] !== '') { this.$emit('update:modelValue', [...(newValue || []), '']); } }, onEntryChange(newValue: unknown, index: number) { - const newArrayValue = [...this.modelValue]; + const newArrayValue = [...(this.modelValue || [])]; newArrayValue[index] = newValue; this.$emit('update:modelValue', newArrayValue); }, - removeEntry(index) { - if (index > -1) { + removeEntry(index: number) { + if (index > -1 && this.modelValue) { const newValue = this.modelValue.filter((x, i) => i !== index); this.$emit('update:modelValue', newValue); } diff --git a/plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.adapter.ts b/plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.adapter.ts index 348a51cd73..5e272d6643 100644 --- a/plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.adapter.ts +++ b/plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.adapter.ts @@ -39,6 +39,7 @@ function piwikFocusAnywhereButHere(): IDirective { }; } -piwikFocusAnywhereButHere.$inject = []; - -angular.module('piwikApp.directive').directive('piwikFocusAnywhereButHere', piwikFocusAnywhereButHere); +window.angular.module('piwikApp.directive').directive( + 'piwikFocusAnywhereButHere', + piwikFocusAnywhereButHere, +); diff --git a/plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.ts b/plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.ts index dcfb3928f9..a2ae2ce388 100644 --- a/plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.ts +++ b/plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.ts @@ -90,9 +90,9 @@ export default { doc.addEventListener('scroll', binding.value.onScroll); }, unmounted(el: HTMLElement, binding: DirectiveBinding<FocusAnywhereButHereArgs>): void { - doc.removeEventListener('keyup', binding.value.onEscapeHandler); - doc.removeEventListener('mousedown', binding.value.onMouseDown); - doc.removeEventListener('mouseup', binding.value.onClickOutsideElement); - doc.removeEventListener('scroll', binding.value.onScroll); + doc.removeEventListener('keyup', binding.value.onEscapeHandler!); + doc.removeEventListener('mousedown', binding.value.onMouseDown!); + doc.removeEventListener('mouseup', binding.value.onClickOutsideElement!); + doc.removeEventListener('scroll', binding.value.onScroll!); }, }; diff --git a/plugins/CoreHome/vue/src/FocusIf/FocusIf.adapter.ts b/plugins/CoreHome/vue/src/FocusIf/FocusIf.adapter.ts index 2d48e8f254..e02ef6c021 100644 --- a/plugins/CoreHome/vue/src/FocusIf/FocusIf.adapter.ts +++ b/plugins/CoreHome/vue/src/FocusIf/FocusIf.adapter.ts @@ -36,4 +36,4 @@ function piwikFocusIf(): IDirective { }; } -angular.module('piwikApp.directive').directive('piwikFocusIf', piwikFocusIf); +window.angular.module('piwikApp.directive').directive('piwikFocusIf', piwikFocusIf); diff --git a/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.adapter.ts b/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.adapter.ts index 598a4224f1..687bbabfc0 100644 --- a/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.adapter.ts +++ b/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.adapter.ts @@ -5,8 +5,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import { IParseService } from 'angular'; -import { ComponentPublicInstance } from 'vue'; +import { IParseService, IScope } from 'angular'; import MatomoDialog from './MatomoDialog.vue'; import createAngularJsAdapter from '../createAngularJsAdapter'; @@ -18,7 +17,7 @@ export default createAngularJsAdapter<[IParseService]>({ default: false, }, element: { - default: (scope, element) => element[0], + default: (scope: IScope, element: JQLite) => element[0], }, }, events: { @@ -60,7 +59,7 @@ export default createAngularJsAdapter<[IParseService]>({ vueRootPlaceholder.appendTo(element); return vueRootPlaceholder[0]; }, - postCreate: (vm: ComponentPublicInstance, scope, element, attrs) => { + postCreate: (vm, scope, element, attrs) => { scope.$watch(attrs.piwikDialog, (newValue: boolean, oldValue: boolean) => { if (oldValue !== newValue) { vm.modelValue = newValue || false; diff --git a/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue b/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue index 9fd3feaa13..2b871acf07 100644 --- a/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue +++ b/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue @@ -42,7 +42,8 @@ export default defineComponent({ watch: { modelValue(newValue, oldValue) { if (newValue) { - const slotElement = this.element || this.$refs.root.firstElementChild; + const slotElement = this.element + || (this.$refs.root as HTMLElement).firstElementChild as HTMLElement; Matomo.helper.modalConfirm(slotElement, { yes: () => { this.$emit('yes'); }, no: () => { this.$emit('no'); }, @@ -51,7 +52,7 @@ export default defineComponent({ onCloseEnd: () => { // materialize removes the child element, so we move it back to the slot if (!this.element) { - this.$refs.root.appendChild(slotElement); + (this.$refs.root as HTMLElement).appendChild(slotElement); } this.$emit('update:modelValue', false); this.$emit('closeEnd'); diff --git a/plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.adapter.ts b/plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.adapter.ts index b82329739b..981e8c921c 100644 --- a/plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.adapter.ts +++ b/plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.adapter.ts @@ -14,6 +14,4 @@ function piwikUrl() { return model; } -piwikUrl.$inject = []; - -angular.module('piwikApp.service').service('piwikUrl', piwikUrl); +window.angular.module('piwikApp.service').service('piwikUrl', piwikUrl); diff --git a/plugins/CoreHome/vue/src/MenuDropdown/MenuDropdown.vue b/plugins/CoreHome/vue/src/MenuDropdown/MenuDropdown.vue index fdd26bfdba..80b57eaabf 100644 --- a/plugins/CoreHome/vue/src/MenuDropdown/MenuDropdown.vue +++ b/plugins/CoreHome/vue/src/MenuDropdown/MenuDropdown.vue @@ -66,7 +66,7 @@ export default defineComponent({ menuTitle: String, tooltip: String, showSearch: Boolean, - menuTitleChangeOnClick: String, + menuTitleChangeOnClick: Boolean, }, directives: { FocusAnywhereButHere, @@ -98,14 +98,14 @@ export default defineComponent({ return; } - if (this.menuTitleChangeOnClick !== false) { - this.actualMenuTitle = (event.target as HTMLElement).textContent + if (this.menuTitleChangeOnClick) { + this.actualMenuTitle = ((event.target as HTMLElement).textContent || '') .replace(/[\u0000-\u2666]/g, (c) => `&#${c.charCodeAt(0)};`); // eslint-disable-line } this.showItems = false; - $(this.$slots.default()).find('.item').removeClass('active'); + $(this.$slots.default!()[0]!.el as HTMLElement).find('.item').removeClass('active'); targetClasses.add('active'); this.$emit('afterSelect'); @@ -118,7 +118,7 @@ export default defineComponent({ searchItems(unprocessedSearchTerm: string) { const searchTerm = unprocessedSearchTerm.toLowerCase(); - $(this.$refs.root).find('.item').each((index: number, node: HTMLElement) => { + $(this.$refs.root as HTMLElement).find('.item').each((index: number, node: HTMLElement) => { const $node = $(node); if ($node.text().toLowerCase().indexOf(searchTerm) === -1) { diff --git a/plugins/CoreHome/vue/src/MultiPairField/MultiPairField.adapter.ts b/plugins/CoreHome/vue/src/MultiPairField/MultiPairField.adapter.ts index e7c379ef88..3313d4c65e 100644 --- a/plugins/CoreHome/vue/src/MultiPairField/MultiPairField.adapter.ts +++ b/plugins/CoreHome/vue/src/MultiPairField/MultiPairField.adapter.ts @@ -49,7 +49,7 @@ export default createAngularJsAdapter({ ngModel.$setViewValue(vm.modelValue); ngModel.$render = () => { - if (angular.isString(ngModel.$viewValue)) { + if (window.angular.isString(ngModel.$viewValue)) { vm.modelValue = JSON.parse(ngModel.$viewValue); } else { vm.modelValue = ngModel.$viewValue; diff --git a/plugins/CoreHome/vue/src/MultiPairField/MultiPairField.vue b/plugins/CoreHome/vue/src/MultiPairField/MultiPairField.vue index 7d0dca4b9a..6717b6eef6 100644 --- a/plugins/CoreHome/vue/src/MultiPairField/MultiPairField.vue +++ b/plugins/CoreHome/vue/src/MultiPairField/MultiPairField.vue @@ -127,27 +127,30 @@ export default defineComponent({ }, emits: ['update:modelValue'], watch: { - modelValue(newValue) { + modelValue(newValue?: Record<string, unknown>[]) { this.checkEmptyModelValue(newValue); }, }, mounted() { - this.checkEmptyModelValue(this.modelValue); + this.checkEmptyModelValue(this.modelValue as Record<string, unknown>[]); }, methods: { - checkEmptyModelValue(newValue) { + checkEmptyModelValue(newValue?: Record<string, unknown>[]) { // make sure there is always an empty new value - if (!newValue || !newValue.length || this.isEmptyValue(newValue.slice(-1)[0])) { + if (!newValue + || !newValue.length + || this.isEmptyValue(newValue.slice(-1)[0]) + ) { this.$emit('update:modelValue', [...(newValue || []), this.makeEmptyValue()]); } }, - onEntryChange(index: number, key: string, newValue: unknown) { - const newWholeValue = [...this.modelValue]; + onEntryChange(index: number, key: string, newValue: Record<string, unknown>) { + const newWholeValue = [...(this.modelValue as Record<string, unknown>[])]; newWholeValue[index] = { ...newWholeValue[index], [key]: newValue }; this.$emit('update:modelValue', newWholeValue); }, removeEntry(index: number) { - if (index > -1) { + if (index > -1 && this.modelValue) { const newValue = this.modelValue.filter((x, i) => i !== index); this.$emit('update:modelValue', newValue); } @@ -156,23 +159,23 @@ export default defineComponent({ const { fieldCount } = this; if (fieldCount === 4) { - if (!value[this.field1.key] - && !value[this.field2.key] - && !value[this.field3.key] - && !value[this.field4.key] + if (!value[this.field1!.key] + && !value[this.field2!.key] + && !value[this.field3!.key] + && !value[this.field4!.key] ) { return false; } } else if (fieldCount === 3) { - if (!value[this.field1.key] && !value[this.field2.key] && !value[this.field3.key]) { + if (!value[this.field1!.key] && !value[this.field2!.key] && !value[this.field3!.key]) { return false; } } else if (fieldCount === 2) { - if (!value[this.field1.key] && !value[this.field2.key]) { + if (!value[this.field1!.key] && !value[this.field2!.key]) { return false; } } else if (fieldCount === 1) { - if (!value[this.field1.key]) { + if (!value[this.field1!.key]) { return false; } } diff --git a/plugins/CoreHome/vue/src/Notification/Notification.vue b/plugins/CoreHome/vue/src/Notification/Notification.vue index e25dcb1711..edde03ff71 100644 --- a/plugins/CoreHome/vue/src/Notification/Notification.vue +++ b/plugins/CoreHome/vue/src/Notification/Notification.vue @@ -108,7 +108,7 @@ export default defineComponent({ } if (this.style) { - $(this.$refs.root).css(this.style); + $(this.$refs.root as HTMLElement).css(this.style as JQLiteCssProperties); } }, methods: { diff --git a/plugins/CoreHome/vue/src/Notification/Notifications.store.adapter.ts b/plugins/CoreHome/vue/src/Notification/Notifications.store.adapter.ts index 95cacccbcd..e759836e4c 100644 --- a/plugins/CoreHome/vue/src/Notification/Notifications.store.adapter.ts +++ b/plugins/CoreHome/vue/src/Notification/Notifications.store.adapter.ts @@ -7,4 +7,4 @@ import NotificationsStore from './Notifications.store'; -angular.module('piwikApp').factory('notifications', () => NotificationsStore); +window.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 index 0b90b27002..83916f64bd 100644 --- a/plugins/CoreHome/vue/src/Notification/Notifications.store.ts +++ b/plugins/CoreHome/vue/src/Notification/Notifications.store.ts @@ -98,8 +98,10 @@ interface NotificationsData { notifications: Notification[]; } +const { $ } = window; + class NotificationsStore { - private privateState: NotificationsData = reactive<NotificationsData>({ + private privateState = reactive<NotificationsData>({ notifications: [], }); @@ -142,7 +144,7 @@ class NotificationsStore { const $notificationNodes = $('[data-role="notification"]'); const notificationsToShow: Notification[] = []; - $notificationNodes.each((index, notificationNode) => { + $notificationNodes.each((index: number, notificationNode: HTMLElement) => { const $notificationNode = $(notificationNode); const attributes = $notificationNode.data(); const message = $notificationNode.html(); @@ -171,7 +173,7 @@ class NotificationsStore { let addMethod = notification.prepend ? this.prependNotification : this.appendNotification; - let notificationPosition: typeof Notification['placeat'] = '#notificationContainer'; + let notificationPosition: Notification['placeat'] = '#notificationContainer'; if (notification.placeat) { notificationPosition = notification.placeat; } else { @@ -181,7 +183,7 @@ class NotificationsStore { const modal = document.querySelector(modalSelector); if (modal) { if (!modal.querySelector('#modalNotificationContainer')) { - window.$(modal).prepend('<div id="modalNotificationContainer"/>'); + $(modal).prepend('<div id="modalNotificationContainer"/>'); } notificationPosition = `${modalSelector} #modalNotificationContainer`; @@ -210,7 +212,9 @@ class NotificationsStore { scrollToNotification(notificationInstanceId: string) { setTimeout(() => { - const element = document.querySelector(`[data-notification-instance-id='${notificationInstanceId}']`); + const element = document.querySelector( + `[data-notification-instance-id='${notificationInstanceId}']`, + ) as HTMLElement; if (element) { Matomo.helper.lazyScrollTo(element, 250); } @@ -223,15 +227,15 @@ class NotificationsStore { toast(notification: Notification): void { this.checkMessage(notification.message); - const $placeat = $(notification.placeat); - if (!$placeat.length) { + const $placeat = notification.placeat ? $(notification.placeat) : undefined; + if (!$placeat || !$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.top = `${$placeat.offset()!.top}px`; + toastElement.style.left = `${$placeat.offset()!.left}px`; toastElement.style.zIndex = '1000'; document.body.appendChild(toastElement); @@ -249,10 +253,14 @@ class NotificationsStore { } private initializeNotificationContainer( - notificationPosition: typeof Notification['placeat'], + notificationPosition: Notification['placeat'], group: string, ) { - const $container = window.$(notificationPosition); + if (!notificationPosition) { + return; + } + + const $container = $(notificationPosition); if ($container.children('.notification-group').length) { return; } diff --git a/plugins/CoreHome/vue/src/Orderable.ts b/plugins/CoreHome/vue/src/Orderable.ts index 6099b99891..7b8cfd32a8 100644 --- a/plugins/CoreHome/vue/src/Orderable.ts +++ b/plugins/CoreHome/vue/src/Orderable.ts @@ -9,7 +9,7 @@ export interface Orderable { order: number; } -export function sortOrderables<T extends Orderable>(menu?: T[]): T[] { +export function sortOrderables<T extends Orderable>(menu?: ReadonlyArray<T>): T[] { const result = [...(menu || [])]; result.sort((lhs, rhs) => { if (lhs.order < rhs.order) { diff --git a/plugins/CoreHome/vue/src/PeriodDatePicker/PeriodDatePicker.vue b/plugins/CoreHome/vue/src/PeriodDatePicker/PeriodDatePicker.vue index dd33f4784e..49c05a4a4f 100644 --- a/plugins/CoreHome/vue/src/PeriodDatePicker/PeriodDatePicker.vue +++ b/plugins/CoreHome/vue/src/PeriodDatePicker/PeriodDatePicker.vue @@ -22,7 +22,6 @@ <script lang="ts"> import { defineComponent, watch, ref } from 'vue'; -import JQuery = JQuery; import DatePicker from '../DatePicker/DatePicker.vue'; import Matomo from '../Matomo/Matomo'; import { Periods, parseDate } from '../Periods'; @@ -32,7 +31,10 @@ const piwikMaxDate = new Date(Matomo.maxDateYear, Matomo.maxDateMonth - 1, Matom export default defineComponent({ props: { - period: String, + period: { + type: String, + required: true, + }, date: [String, Date], }, components: { @@ -40,9 +42,9 @@ export default defineComponent({ }, emits: ['select'], setup(props, context) { - const viewDate = ref(props.date); - const selectedDates = ref([null, null]); - const highlightedDates = ref([null, null]); + const viewDate = ref<string|Date|undefined|null>(props.date); + const selectedDates = ref<(Date|null)[]>([null, null]); + const highlightedDates = ref<(Date|null)[]>([null, null]); function getBoundedDateRange(date: string|Date) { const dates = Periods.get(props.period).parse(date).getDateRange(); diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue index 2d4b33f065..2e7b60ab64 100644 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue +++ b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue @@ -195,7 +195,7 @@ const COMPARE_PERIOD_OPTIONS = [ const piwikMinDate = new Date(Matomo.minDateYear, Matomo.minDateMonth - 1, Matomo.minDateDay); const piwikMaxDate = new Date(Matomo.maxDateYear, Matomo.maxDateMonth - 1, Matomo.maxDateDay); -function isValidDate(d) { +function isValidDate(d: any) { // eslint-disable-line @typescript-eslint/no-explicit-any if (Object.prototype.toString.call(d) !== '[object Date]') { return false; } @@ -203,6 +203,21 @@ function isValidDate(d) { return !Number.isNaN(d.getTime()); } +interface PeriodSelectorState { + comparePeriodDropdownOptions: typeof COMPARE_PERIOD_OPTIONS; + periodValue: string; + dateValue: Date|null; + selectedPeriod: string; + startRangeDate: string|null; + endRangeDate: string|null; + isRangeValid: boolean|null; + isLoadingNewPage: boolean; + isComparing: null|boolean; + comparePeriodType: string; + compareStartDate: string; + compareEndDate: string; +} + export default defineComponent({ props: { periods: Array, @@ -216,12 +231,13 @@ export default defineComponent({ directives: { ExpandOnClick, }, - data() { + data(): PeriodSelectorState { + const selectedPeriod = MatomoUrl.parsed.value.period as string; return { comparePeriodDropdownOptions: COMPARE_PERIOD_OPTIONS, - periodValue: null, + periodValue: selectedPeriod, dateValue: null, - selectedPeriod: null, + selectedPeriod, startRangeDate: null, endRangeDate: null, isRangeValid: null, @@ -234,13 +250,13 @@ export default defineComponent({ }, mounted() { Matomo.on('hidePeriodSelector', () => { - window.$(this.$refs.root).hide(); + window.$(this.$refs.root as HTMLElement).hide(); }); // some widgets might hide the period selector using the event above, so ensure it's // shown again when switching the page Matomo.on('piwikPageChange', () => { - window.$(this.$refs.root).show(); + window.$(this.$refs.root as HTMLElement).show(); }); this.updateSelectedValuesFromHash(); @@ -273,7 +289,7 @@ export default defineComponent({ } try { - return Periods.parse(this.periodValue, date).getPrettyString(); + return Periods.parse(this.periodValue!, date).getPrettyString(); } catch (e) { return translate('General_Error'); } @@ -282,7 +298,9 @@ export default defineComponent({ return ComparisonsStore.isComparisonEnabled(); }, periodsFiltered() { - return (this.periods || []).filter((periodLabel) => Periods.isRecognizedPeriod(periodLabel)); + return (this.periods as string[] || []).filter( + (periodLabel) => Periods.isRecognizedPeriod(periodLabel), + ); }, selectedComparisonParams() { if (!this.isComparing) { @@ -306,9 +324,12 @@ export default defineComponent({ if (this.comparePeriodType === 'previousYear') { const dateStr = this.selectedPeriod === 'range' ? `${this.startRangeDate},${this.endRangeDate}` - : this.dateValue; + : format(this.dateValue!); - const currentDateRange = Periods.parse(this.selectedPeriod, dateStr).getDateRange(); + const currentDateRange = Periods.parse( + this.selectedPeriod as string, + dateStr, + ).getDateRange(); currentDateRange[0].setFullYear(currentDateRange[0].getFullYear() - 1); currentDateRange[1].setFullYear(currentDateRange[1].getFullYear() - 1); @@ -330,23 +351,25 @@ export default defineComponent({ }, previousPeriodDateToSelectedPeriod() { if (this.selectedPeriod === 'range') { - const currentStartRange = parseDate(this.startRangeDate); - const currentEndRange = parseDate(this.endRangeDate); + const currentStartRange = parseDate(this.startRangeDate!); + const currentEndRange = parseDate(this.endRangeDate!); const newEndDate = Range.getLastNRange('day', 2, currentStartRange).startDate; - const rangeSize = Math.floor((currentEndRange - currentStartRange) / 86400000); + const rangeSize = Math.floor( + (currentEndRange.valueOf() - currentStartRange.valueOf()) / 86400000, + ); const newRange = Range.getLastNRange('day', 1 + rangeSize, newEndDate); return `${format(newRange.startDate)},${format(newRange.endDate)}`; } - const newStartDate = Range.getLastNRange(this.selectedPeriod, 2, this.dateValue).startDate; + const newStartDate = Range.getLastNRange(this.selectedPeriod, 2, this.dateValue!).startDate; return format(newStartDate); }, selectedDateString() { if (this.selectedPeriod === 'range') { - const dateFrom = this.startRangeDate; - const dateTo = this.endRangeDate; + const dateFrom = this.startRangeDate!; + const dateTo = this.endRangeDate!; const oDateFrom = parseDate(dateFrom); const oDateTo = parseDate(dateTo); @@ -365,30 +388,30 @@ export default defineComponent({ return `${dateFrom},${dateTo}`; } - return format(this.dateValue); + return format(this.dateValue!); }, }, methods: { handleZIndexPositionRelativeCompareDropdownIssue() { - const $element = window.$(this.$refs.root); + const $element = window.$(this.$refs.root as HTMLElement); $element.on('focus', '#comparePeriodToDropdown .select-dropdown', () => { $element.addClass('compare-dropdown-open'); }).on('blur', '#comparePeriodToDropdown .select-dropdown', () => { $element.removeClass('compare-dropdown-open'); }); }, - changeViewedPeriod() { + changeViewedPeriod(period: string) { // only change period if it's different from what's being shown currently - if (this.period === this.periodValue) { + if (period === this.periodValue) { return; } // can't just change to a range period, w/o setting two new dates - if (this.period === 'range') { + if (period === 'range') { return; } - this.setPiwikPeriodAndDate(this.period, this.dateValue); + this.setPiwikPeriodAndDate(period, this.dateValue!); }, setPiwikPeriodAndDate(period: string, date: Date) { this.periodValue = period; @@ -439,10 +462,11 @@ export default defineComponent({ return; } - this.setPiwikPeriodAndDate(this.selectedPeriod, this.dateValue); + this.setPiwikPeriodAndDate(this.selectedPeriod, this.dateValue!); }, updateSelectedValuesFromHash() { - const { date, period } = MatomoUrl.parsed.value; + const date = MatomoUrl.parsed.value.date as string; + const period = MatomoUrl.parsed.value.period as string; this.periodValue = period; this.selectedPeriod = period; @@ -477,7 +501,7 @@ export default defineComponent({ getPeriodDisplayText(periodLabel: string) { return Periods.get(periodLabel).getDisplayText(); }, - onRangeChange(start: Date, end: Date) { + onRangeChange(start: string, end: string) { if (!start || !end) { this.isRangeValid = false; return; @@ -504,7 +528,7 @@ export default defineComponent({ return true; }, closePeriodSelector() { - this.$refs.root.classList.remove('expanded'); + (this.$refs.root as HTMLElement).classList.remove('expanded'); }, isCompareRangeValid() { try { diff --git a/plugins/CoreHome/vue/src/PopoverHandler/PopoverHandler.ts b/plugins/CoreHome/vue/src/PopoverHandler/PopoverHandler.ts index 6286a6ae73..341cdf868b 100644 --- a/plugins/CoreHome/vue/src/PopoverHandler/PopoverHandler.ts +++ b/plugins/CoreHome/vue/src/PopoverHandler/PopoverHandler.ts @@ -44,7 +44,7 @@ class PopoverHandler { this.close(); // should be rather done by routing - const popoverParam = MatomoUrl.parsed.value.popover; + const popoverParam = MatomoUrl.parsed.value.popover as string; if (popoverParam) { this.open(popoverParam); } else { @@ -58,7 +58,7 @@ class PopoverHandler { window.Piwik_Popover.close(); } - private open(thePopoverParam) { + private open(thePopoverParam: string) { // in case the $ was encoded (e.g. when using copy&paste on urls in some browsers) let popoverParam = decodeURIComponent(thePopoverParam); diff --git a/plugins/CoreHome/vue/src/Progressbar/Progressbar.vue b/plugins/CoreHome/vue/src/Progressbar/Progressbar.vue index ea0166589c..25dfc97b94 100644 --- a/plugins/CoreHome/vue/src/Progressbar/Progressbar.vue +++ b/plugins/CoreHome/vue/src/Progressbar/Progressbar.vue @@ -25,7 +25,10 @@ import { defineComponent } from 'vue'; export default defineComponent({ props: { - progress: Number, + progress: { + type: Number, + required: true, + }, label: String, }, computed: { diff --git a/plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue b/plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue index 6ca1e9c9d2..dae6e4ac9d 100644 --- a/plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue +++ b/plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue @@ -24,6 +24,7 @@ tabindex="2" v-focus-if:[searchActive]="{}" :title="quickAccessTitle" + ref="input" /> <div class="dropdown" @@ -95,7 +96,7 @@ </template> <script lang="ts"> -import { defineComponent } from 'vue'; +import { DeepReadonly, defineComponent } from 'vue'; import FocusAnywhereButHere from '../FocusAnywhereButHere/FocusAnywhereButHere'; import FocusIf from '../FocusIf/FocusIf'; import translate from '../translate'; @@ -107,6 +108,7 @@ interface SubMenuItem { name: string; index: number; category: string; + menuIndex?: number; } interface MenuItem { @@ -122,22 +124,23 @@ interface QuickAccessState { searchIndex: number; menuIndexCounter: number; - readonly topMenuItems: SubMenuItem[]; - readonly leftMenuItems: SubMenuItem[]; - readonly segmentItems: SubMenuItem[]; - readonly hasSegmentSelector: boolean; + topMenuItems: SubMenuItem[]|null; + leftMenuItems: SubMenuItem[]|null; + segmentItems: SubMenuItem[]|null; + hasSegmentSelector: boolean; - sites: Site[]; + sites: DeepReadonly<Site[]>; isLoading: boolean; } function isElementInViewport(element: HTMLElement) { const rect = element.getBoundingClientRect(); + const $window = window.$(window); return rect.top >= 0 && rect.left >= 0 - && rect.bottom <= window.$(window).height() - && rect.right <= window.$(window).width(); + && rect.bottom <= $window.height()! + && rect.right <= $window.width()!; } function scrollFirstElementIntoView(element: HTMLElement) { @@ -148,26 +151,33 @@ function scrollFirstElementIntoView(element: HTMLElement) { } export default defineComponent({ - props: { - }, directives: { FocusAnywhereButHere, FocusIf, }, watch: { - searchActive(newValue) { - const classes = this.$refs.root.parentElement.classList; + searchActive(newValue: boolean) { + const root = this.$refs.root as HTMLElement; + if (!root || !root.parentElement) { + return; + } + + const classes = root.parentElement.classList; classes.toggle('active', newValue); classes.toggle('expanded', newValue); }, }, mounted() { + const root = this.$refs.root as HTMLElement; + // TODO: temporary, remove after angularjs is removed. // this is currently needed since angularjs will render a div, then vue will render a div // within it, but the top controls and CSS expect to have certain CSS classes in the root // element. // same applies to above watch for searchActive() - this.$refs.root.parentElement.classList.add('quick-access', 'piwikSelector'); + if (root && root.parentElement) { + root.parentElement.classList.add('quick-access', 'piwikSelector'); + } if (typeof window.initTopControls !== 'undefined' && window.initTopControls) { window.initTopControls(); @@ -180,7 +190,7 @@ export default defineComponent({ event.preventDefault(); - scrollFirstElementIntoView(this.$refs.root); + scrollFirstElementIntoView(this.$refs.root as HTMLElement); this.activateSearch(); }); @@ -236,7 +246,7 @@ export default defineComponent({ }, emits: ['itemSelected', 'blur'], methods: { - onKeypress(event) { + onKeypress(event: KeyboardEvent) { const areSearchResultsDisplayed = this.searchTerm && this.searchActive; const isTabKey = event.which === 9; const isEscKey = event.which === 27; @@ -291,7 +301,9 @@ export default defineComponent({ deactivateSearch() { this.searchTerm = ''; this.searchActive = false; - (this.$refs.root).querySelector('input').blur(); + if (this.$refs.input) { + (this.$refs.input as HTMLElement).blur(); + } }, makeSureSelectedItemIsInViewport() { const element = this.getCurrentlySelectedElement(); @@ -300,12 +312,12 @@ export default defineComponent({ scrollFirstElementIntoView(element); } }, - getCurrentlySelectedElement() { + getCurrentlySelectedElement(): HTMLElement|undefined { const results = (this.$refs.root as HTMLElement).querySelectorAll('li.result'); if (results && results.length && results.item(this.searchIndex)) { - return results.item(this.searchIndex); + return results.item(this.searchIndex) as HTMLElement; } - return null; + return undefined; }, searchMenu(unprocessedSearchTerm: string) { const searchTerm = unprocessedSearchTerm.toLowerCase(); @@ -314,7 +326,7 @@ export default defineComponent({ const menuItemsIndex: Record<string, number> = {}; const menuItems: MenuItem[] = []; - const moveToCategory = (theSubmenuItem) => { + const moveToCategory = (theSubmenuItem: SubMenuItem) => { // force rerender of element to prevent weird side effects const submenuItem = { ...theSubmenuItem }; // needed for proper highlighting with arrow keys @@ -336,13 +348,15 @@ export default defineComponent({ if (this.hasSitesSelector) { this.isLoading = true; SitesStore.searchSite(searchTerm).then((sites) => { - this.sites = sites; + if (sites) { + this.sites = sites; + } }).finally(() => { this.isLoading = false; }); } - const menuItemMatches = (i) => i.name.toLowerCase().indexOf(searchTerm) !== -1 + const menuItemMatches = (i: SubMenuItem) => i.name.toLowerCase().indexOf(searchTerm) !== -1 || i.category.toLowerCase().indexOf(searchTerm) !== -1; // get the menu items on first search since this component can be mounted @@ -376,7 +390,7 @@ export default defineComponent({ SitesStore.loadSite(idSite); }, selectMenuItem(index: number) { - const target: HTMLElement = document.querySelector(`[quick_access='${index}']`); + const target: HTMLElement|null = document.querySelector(`[quick_access='${index}']`); if (target) { this.deactivateSearch(); @@ -405,10 +419,10 @@ export default defineComponent({ const topMenuItems: SubMenuItem[] = []; document.querySelectorAll('nav .sidenav li > a').forEach((element) => { - let text = element.textContent.trim(); + let text = element.textContent?.trim(); if (!text) { - text = element.getAttribute('title').trim(); // possibly a icon, use title instead + text = element.getAttribute('title')?.trim(); // possibly a icon, use title instead } if (text) { @@ -423,8 +437,8 @@ export default defineComponent({ const leftMenuItems: SubMenuItem[] = []; document.querySelectorAll('#secondNavBar .menuTab').forEach((element) => { - let category = window.$(element).find('> .item'); - category = category[0] ? category[0].innerText.trim() : ''; + const categoryElement = window.$(element).find('> .item'); + let category = categoryElement[0]?.innerText.trim() || ''; if (category && category.lastIndexOf('\n') !== -1) { // remove "\n\nMenu" @@ -432,7 +446,7 @@ export default defineComponent({ } window.$(element).find('li .item').each((i, subElement) => { - const text = subElement.textContent.trim(); + const text = subElement.textContent?.trim(); if (text) { leftMenuItems.push({ name: text, category, index: this.menuIndexCounter += 1 }); subElement.setAttribute('quick_access', `${this.menuIndexCounter}`); @@ -451,7 +465,7 @@ export default defineComponent({ const segmentItems: SubMenuItem[] = []; document.querySelectorAll('.segmentList [data-idsegment]').forEach((element) => { - const text = element.querySelector('.segname').textContent.trim(); + const text = element.querySelector('.segname')?.textContent?.trim(); if (text) { segmentItems.push({ name: text, category, index: this.menuIndexCounter += 1 }); diff --git a/plugins/CoreHome/vue/src/ReportExport/ReportExport.adapter.ts b/plugins/CoreHome/vue/src/ReportExport/ReportExport.adapter.ts index b14761950a..a949af3a80 100644 --- a/plugins/CoreHome/vue/src/ReportExport/ReportExport.adapter.ts +++ b/plugins/CoreHome/vue/src/ReportExport/ReportExport.adapter.ts @@ -5,7 +5,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import { IDirective, IScope, ITimeoutService } from 'angular'; +import { IDirective, ITimeoutService } from 'angular'; import ReportExport from './ReportExport'; export default function piwikReportExport($timeout: ITimeoutService): IDirective { @@ -18,7 +18,8 @@ export default function piwikReportExport($timeout: ITimeoutService): IDirective apiMethod: '@', maxFilterLimit: '@', }, - link: function piwikReportExportLink(scope: IScope, element: JQuery) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + link: function piwikReportExportLink(scope: any, element: JQuery) { const binding = { instance: null, value: { @@ -31,7 +32,7 @@ export default function piwikReportExport($timeout: ITimeoutService): IDirective maxFilterLimit: parseInt(scope.maxFilterLimit, 10), onClose: () => { $timeout(() => { - angular.element(document).injector().get('$rootScope').$apply(); + window.angular.element(document).injector().get('$rootScope').$apply(); }, 10); }, }, @@ -47,4 +48,4 @@ export default function piwikReportExport($timeout: ITimeoutService): IDirective piwikReportExport.$inject = ['$timeout']; -angular.module('piwikApp').directive('piwikReportExport', piwikReportExport); +window.angular.module('piwikApp').directive('piwikReportExport', piwikReportExport); diff --git a/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue b/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue index f7fd550501..2df26563d8 100644 --- a/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue +++ b/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue @@ -152,6 +152,11 @@ import Matomo from '../Matomo/Matomo'; import MatomoUrl from '../MatomoUrl/MatomoUrl'; import translate from '../translate'; +interface DataTable { + param: Record<string, string|string[]>; + props: Record<string, string|string[]>; +} + const Field = useExternalPluginComponent('CorePluginsAdmin', 'Field'); export default defineComponent({ @@ -164,12 +169,21 @@ export default defineComponent({ props: { hasSubtables: Boolean, availableReportTypes: Object, - availableReportFormats: Object, + availableReportFormats: { + type: Object, + required: true, + }, maxFilterLimit: Number, limitAllOptions: Object, - dataTable: Object, + dataTable: { + type: Object, + required: true, + }, requestParams: [Object, String], - apiMethod: String, + apiMethod: { + type: String, + required: true, + }, initialReportType: { type: String, default: 'default', @@ -208,7 +222,9 @@ export default defineComponent({ optionFormatMetrics: this.initialOptionFormatMetrics, reportType: this.initialReportType, reportLimitAll: this.initialReportLimitAll, - reportLimit: this.initialReportLimit, + reportLimit: typeof this.initialReportLimit === 'string' + ? parseInt(this.initialReportLimit, 10) + : this.initialReportLimit, }; }, watch: { @@ -218,17 +234,20 @@ export default defineComponent({ } }, reportLimit(newVal, oldVal) { - if (this.maxFilterLimit > 0) { - if (parseInt(newVal, 10) > parseInt(this.maxFilterLimit, 10)) { - this.reportLimit = oldVal; - } + if (this.maxFilterLimit && this.maxFilterLimit > 0 && newVal > this.maxFilterLimit) { + this.reportLimit = oldVal; } }, }, computed: { filterLimitTooltip() { const rowLimit = translate('CoreHome_RowLimit'); - const computedMetricMax = translate('General_ComputedMetricMax', this.maxFilterLimit); + const computedMetricMax = this.maxFilterLimit + ? translate( + 'General_ComputedMetricMax', + this.maxFilterLimit.toString(), + ) + : ''; return `${rowLimit} (${computedMetricMax})`; }, exportLink() { @@ -241,26 +260,23 @@ export default defineComponent({ methods: { getExportLink(withToken = true) { const { - dataTable, reportFormat, apiMethod, reportType, } = this; + const dataTable: DataTable = this.dataTable as DataTable; + if (!reportFormat) { return undefined; } - let { - requestParams, - } = this; + let requestParams: Record<string, unknown> = {}; const limit = this.reportLimitAll === 'yes' ? -1 : this.reportLimit; - if (requestParams && typeof requestParams === 'string') { - requestParams = JSON.parse(requestParams); - } else { - requestParams = {}; + if (this.requestParams && typeof this.requestParams === 'string') { + requestParams = JSON.parse(this.requestParams); } const { @@ -280,7 +296,8 @@ export default defineComponent({ date = dataTable.param.dateUsedInGraph; } - const formatsUseDayNotRange = Matomo.config.datatable_export_range_as_day.toLowerCase(); + const formatsUseDayNotRange = (Matomo.config.datatable_export_range_as_day as string) + .toLowerCase(); if (formatsUseDayNotRange.indexOf(reportFormat.toLowerCase()) !== -1 && dataTable.param.period === 'range' @@ -295,7 +312,7 @@ export default defineComponent({ period = 'day'; } - const exportUrlParams: Record<string, unknown> = { + const exportUrlParams: QueryParameters = { module: 'API', format: reportFormat, idSite, @@ -347,7 +364,7 @@ export default defineComponent({ } else if (value === false) { value = 0; } - exportUrlParams[index] = value; + exportUrlParams[index] = value as QueryParameterValue; }); } @@ -383,7 +400,7 @@ export default defineComponent({ } if (typeof segment !== 'undefined') { - exportUrlParams.segment = decodeURIComponent(segment); + exportUrlParams.segment = decodeURIComponent(segment as string); } // Export Goals specific reports @@ -401,7 +418,7 @@ export default defineComponent({ } if (label) { - const labelParts = label.split(','); + const labelParts = (label as string).split(','); if (labelParts.length > 1) { exportUrlParams.label = labelParts; diff --git a/plugins/CoreHome/vue/src/ReportMetadata/ReportMetadata.store.adapter.ts b/plugins/CoreHome/vue/src/ReportMetadata/ReportMetadata.store.adapter.ts index 8e59836004..bc1c37f6fe 100644 --- a/plugins/CoreHome/vue/src/ReportMetadata/ReportMetadata.store.adapter.ts +++ b/plugins/CoreHome/vue/src/ReportMetadata/ReportMetadata.store.adapter.ts @@ -8,7 +8,7 @@ import ReportMetadataStoreInstance from './ReportMetadata.store'; import { cloneThenApply } from '../createAngularJsAdapter'; -angular.module('piwikApp.service').factory('reportMetadataModel', () => ({ +window.angular.module('piwikApp.service').factory('reportMetadataModel', () => ({ get reports() { return ReportMetadataStoreInstance.reports.value; }, diff --git a/plugins/CoreHome/vue/src/ReportMetadata/ReportMetadata.store.ts b/plugins/CoreHome/vue/src/ReportMetadata/ReportMetadata.store.ts index 0b62025abe..1839e63ca9 100644 --- a/plugins/CoreHome/vue/src/ReportMetadata/ReportMetadata.store.ts +++ b/plugins/CoreHome/vue/src/ReportMetadata/ReportMetadata.store.ts @@ -5,7 +5,12 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import { reactive, computed, readonly } from 'vue'; +import { + reactive, + computed, + readonly, + DeepReadonly, +} from 'vue'; import AjaxHelper from '../AjaxHelper/AjaxHelper'; import MatomoUrl from '../MatomoUrl/MatomoUrl'; import Matomo from '../Matomo/Matomo'; @@ -38,11 +43,11 @@ export class ReportMetadataStore { private reportsPromise?: Promise<Report[]>; // TODO: it used to return an empty array when nothing was found, will that be an issue? - findReport(reportModule: string, reportAction: string): Report|null { + findReport(reportModule?: string, reportAction?: string): DeepReadonly<Report>|undefined { return this.reports.value.find((r) => r.module === reportModule && r.action === reportAction); } - fetchReportMetadata(): Promise<typeof ReportMetadataStore['reports']['value']> { + fetchReportMetadata(): Promise<ReportMetadataStore['reports']['value']> { if (!this.reportsPromise) { this.reportsPromise = AjaxHelper.fetch({ method: 'API.getReportMetadata', diff --git a/plugins/CoreHome/vue/src/ReportingMenu/Category.ts b/plugins/CoreHome/vue/src/ReportingMenu/Category.ts index d4a2d5e71f..5e2672b9e1 100644 --- a/plugins/CoreHome/vue/src/ReportingMenu/Category.ts +++ b/plugins/CoreHome/vue/src/ReportingMenu/Category.ts @@ -6,12 +6,28 @@ */ import { Orderable } from '../Orderable'; -import Subcategory from './Subcategory'; +import { Subcategory } from './Subcategory'; -export default interface Category extends Orderable { +export interface Category extends Orderable { id: string; name: string; icon?: string; tooltip?: string; + + /** + * @deprecated exists for BC, should be removed in Matomo 5 + */ + active?: boolean; +} + +export interface CategoryContainer extends Category { subcategories: Subcategory[]; } + +export function getCategoryChildren(category: Category): Subcategory[] { + const container = category as CategoryContainer; + if (container.subcategories) { + return container.subcategories; + } + return []; +} diff --git a/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.adapter.ts b/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.adapter.ts index cb176e8443..3407fb6948 100644 --- a/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.adapter.ts +++ b/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.adapter.ts @@ -7,6 +7,8 @@ import ReportingMenuStoreInstance from './ReportingMenu.store'; import { cloneThenApply } from '../createAngularJsAdapter'; +import { CategoryContainer } from './Category'; +import { SubcategoryContainer } from './Subcategory'; // removed boolean active property from objects in vue so we can keep the store immutable, but, // angularjs version should still have them @@ -15,11 +17,11 @@ function addActiveMenuItems(menu: typeof ReportingMenuStoreInstance.menu.value) if (category.id === ReportingMenuStoreInstance.activeCategory.value) { category.active = true; - (category.subcategories || []).forEach((subcat) => { + ((category as CategoryContainer).subcategories || []).forEach((subcat) => { if (subcat.id === ReportingMenuStoreInstance.activeSubcategory.value) { subcat.active = true; - (subcat.subcategories || []).forEach((subsubcat) => { + ((subcat as SubcategoryContainer).subcategories || []).forEach((subsubcat) => { if (subsubcat.id === ReportingMenuStoreInstance.activeSubsubcategory.value) { subsubcat.active = true; } @@ -45,4 +47,4 @@ function reportingMenuModelAdapter() { }; } -angular.module('piwikApp.service').factory('reportingMenuModel', reportingMenuModelAdapter); +window.angular.module('piwikApp.service').factory('reportingMenuModel', reportingMenuModelAdapter); diff --git a/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.ts b/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.ts index b203121e61..108318ec76 100644 --- a/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.ts +++ b/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.ts @@ -10,22 +10,22 @@ import ReportingPagesStoreInstance from '../ReportingPages/ReportingPages.store' import MatomoUrl from '../MatomoUrl/MatomoUrl'; import translate from '../translate'; import { sortOrderables } from '../Orderable'; -import Category from './Category'; -import Subcategory from './Subcategory'; +import { Category, CategoryContainer, getCategoryChildren } from './Category'; +import { getSubcategoryChildren, Subcategory, SubcategoryContainer } from './Subcategory'; interface ReportingMenuStoreState { - activeCategoryId: string; - activeSubcategoryId: string; - activeSubsubcategoryId: string; + activeCategoryId: string|null; + activeSubcategoryId: string|null; + activeSubsubcategoryId: string|null; } interface SubcategoryFindResult { - category: Category; - subcategory: Subcategory; - subsubcategory: Subcategory; + category?: Category; + subcategory?: Subcategory; + subsubcategory?: Subcategory; } -function isNumeric(text) { +function isNumeric(text: string) { const n = parseFloat(text); return !Number.isNaN(n) && Number.isFinite(n); } @@ -40,10 +40,10 @@ export class ReportingMenuStore { private state = computed(() => readonly(this.privateState)); readonly activeCategory = computed(() => this.state.value.activeCategoryId - || MatomoUrl.parsed.value.category); + || MatomoUrl.parsed.value.category as string); readonly activeSubcategory = computed(() => this.state.value.activeSubcategoryId - || MatomoUrl.parsed.value.subcategory); + || MatomoUrl.parsed.value.subcategory as string); readonly activeSubsubcategory = computed(() => { const manuallySetId = this.state.value.activeSubsubcategoryId; @@ -68,32 +68,32 @@ export class ReportingMenuStore { readonly menu = computed(() => this.buildMenuFromPages()); - fetchMenuItems(): Promise<typeof ReportingPagesStoreInstance['menu']['value']> { + fetchMenuItems(): Promise<ReportingMenuStore['menu']['value']> { return ReportingPagesStoreInstance.getAllPages().then(() => this.menu.value); } - reloadMenuItems(): Promise<typeof ReportingMenuStore['menu']['value']> { + reloadMenuItems(): Promise<ReportingMenuStore['menu']['value']> { return ReportingPagesStoreInstance.reloadAllPages().then(() => this.menu.value); } findSubcategory(categoryId: string, subcategoryId: string): SubcategoryFindResult { - let foundCategory = null; - let foundSubcategory = null; - let foundSubSubcategory = null; + let foundCategory: Category|undefined = undefined; + let foundSubcategory: Subcategory|undefined = undefined; + let foundSubSubcategory: Subcategory|undefined = undefined; this.menu.value.forEach((category) => { if (category.id !== categoryId) { return; } - (category.subcategories || []).forEach((subcategory) => { + (getCategoryChildren(category) || []).forEach((subcategory) => { if (subcategory.id === subcategoryId) { foundCategory = category; foundSubcategory = subcategory; } if (subcategory.isGroup) { - (subcategory.subcategories || []).forEach((subcat) => { + (getSubcategoryChildren(subcategory) || []).forEach((subcat) => { if (subcat.id === subcategoryId) { foundCategory = category; foundSubcategory = subcategory; @@ -112,14 +112,14 @@ export class ReportingMenuStore { } private buildMenuFromPages() { - const menu = []; + const menu: Category[] = []; - const displayedCategory = MatomoUrl.parsed.value.category; - const displayedSubcategory = MatomoUrl.parsed.value.subcategory; + const displayedCategory = MatomoUrl.parsed.value.category as string; + const displayedSubcategory = MatomoUrl.parsed.value.subcategory as string; const pages = ReportingPagesStoreInstance.pages.value; - const categoriesHandled = {}; + const categoriesHandled: Record<string, boolean> = {}; pages.forEach((page) => { const category = { ...page.category } as Category; const categoryId = category.id; @@ -131,9 +131,9 @@ export class ReportingMenuStore { categoriesHandled[categoryId] = true; - category.subcategories = []; + (category as CategoryContainer).subcategories = []; - let categoryGroups: Subcategory; + let categoryGroups: Subcategory|null = null; const pagesWithCategory = pages.filter((p) => p.category.id === categoryId); pagesWithCategory.forEach((p) => { @@ -147,7 +147,7 @@ export class ReportingMenuStore { categoryGroups = { ...subcategory } as Subcategory; categoryGroups.name = translate('CoreHome_ChooseX', [category.name]); categoryGroups.isGroup = true; - categoryGroups.subcategories = []; + (categoryGroups as SubcategoryContainer).subcategories = []; categoryGroups.order = 10; } @@ -158,23 +158,25 @@ export class ReportingMenuStore { const entityId = page.subcategory.id; subcategory.tooltip = `${subcategory.name} (id = ${entityId})`; - categoryGroups.subcategories.push(subcategory); + (categoryGroups as SubcategoryContainer).subcategories.push(subcategory); return; } - category.subcategories.push(subcategory); + (category as CategoryContainer).subcategories.push(subcategory); }); if (categoryGroups - && categoryGroups.subcategories - && categoryGroups.subcategories.length <= 5 + && (categoryGroups as SubcategoryContainer).subcategories + && (categoryGroups as SubcategoryContainer).subcategories.length <= 5 ) { - categoryGroups.subcategories.forEach((sub) => category.subcategories.push(sub)); + (categoryGroups as SubcategoryContainer).subcategories.forEach( + (sub) => (category as CategoryContainer).subcategories.push(sub), + ); } else if (categoryGroups) { - category.subcategories.push(categoryGroups); + (category as CategoryContainer).subcategories.push(categoryGroups); } - category.subcategories = sortOrderables(category.subcategories); + (category as CategoryContainer).subcategories = sortOrderables(getCategoryChildren(category)); menu.push(category); }); diff --git a/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue b/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue index 47751afb31..49a4073266 100644 --- a/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue +++ b/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue @@ -147,11 +147,17 @@ import ReportingMenuStoreInstance from './ReportingMenu.store'; import Matomo from '../Matomo/Matomo'; import translate from '../translate'; import WidgetsStoreInstance from '../Widget/Widgets.store'; -import Category from './Category'; -import Subcategory from './Subcategory'; +import { Category, CategoryContainer } from './Category'; +import { Subcategory, SubcategoryContainer } from './Subcategory'; const REPORTING_HELP_NOTIFICATION_ID = 'reportingmenu-help'; +interface ReportingMenuState { + showSubcategoryHelpOnLoad: { category: Category, subcategory: Subcategory } | null; + initialLoad: boolean | null; + helpShownCategory: { category: string, subcategory: string } | null; +} + export default defineComponent({ components: { MenuDropdown, @@ -160,7 +166,7 @@ export default defineComponent({ SideNav, }, props: {}, - data() { + data(): ReportingMenuState { return { showSubcategoryHelpOnLoad: null, initialLoad: true, @@ -194,7 +200,7 @@ export default defineComponent({ ReportingMenuStoreInstance.fetchMenuItems().then((menu) => { if (!MatomoUrl.parsed.value.subcategory) { const categoryToLoad = menu[0]; - const subcategoryToLoad = categoryToLoad.subcategories[0]; + const subcategoryToLoad = (categoryToLoad as CategoryContainer).subcategories[0]; // load first, initial page if no subcategory is present ReportingMenuStoreInstance.enterSubcategory(categoryToLoad, subcategoryToLoad); @@ -203,7 +209,11 @@ export default defineComponent({ }); watch(() => MatomoUrl.parsed.value, (query) => { - const found = ReportingMenuStoreInstance.findSubcategory(query.category, query.subcategory); + const found = ReportingMenuStoreInstance.findSubcategory( + query.category as string, + query.subcategory as string, + ); + ReportingMenuStoreInstance.enterSubcategory( found.category, found.subcategory, @@ -233,12 +243,13 @@ export default defineComponent({ Matomo.on('updateReportingMenu', () => { ReportingMenuStoreInstance.reloadMenuItems().then(() => { - const { category, subcategory } = MatomoUrl.parsed.value; + const category = MatomoUrl.parsed.value.category as string; + const subcategory = MatomoUrl.parsed.value.subcategory as string; // we need to make sure to select same categories again if (category && subcategory) { const found = ReportingMenuStoreInstance.findSubcategory(category, subcategory); - if (found) { + if (found.category) { ReportingMenuStoreInstance.enterSubcategory( found.category, found.subcategory, @@ -270,14 +281,17 @@ export default defineComponent({ NotificationsStore.remove(REPORTING_HELP_NOTIFICATION_ID); const isActive = ReportingMenuStoreInstance.toggleCategory(category); - if (isActive && category.subcategories && category.subcategories.length === 1) { + if (isActive + && (category as SubcategoryContainer).subcategories + && (category as SubcategoryContainer).subcategories.length === 1 + ) { this.helpShownCategory = null; - const subcategory = category.subcategories[0]; + const subcategory = (category as SubcategoryContainer).subcategories[0]; this.propagateUrlChange(category, subcategory); } }, - loadSubcategory(category: Category, subcategory: Subcategory, event: MouseEvent) { + loadSubcategory(category: Category, subcategory: Subcategory, event?: MouseEvent) { if (event && (event.shiftKey || event.ctrlKey || event.metaKey) ) { diff --git a/plugins/CoreHome/vue/src/ReportingMenu/Subcategory.ts b/plugins/CoreHome/vue/src/ReportingMenu/Subcategory.ts index ea22041cc6..b18efea4bd 100644 --- a/plugins/CoreHome/vue/src/ReportingMenu/Subcategory.ts +++ b/plugins/CoreHome/vue/src/ReportingMenu/Subcategory.ts @@ -7,12 +7,28 @@ import { Orderable } from '../Orderable'; -export default interface Subcategory extends Orderable { +export interface Subcategory extends Orderable { id: string; name: string; isGroup: boolean; icon?: string; tooltip?: string; help?: string; + + /** + * @deprecated exists for BC, should be removed in Matomo 5 + */ + active?: boolean; +} + +export interface SubcategoryContainer extends Subcategory { subcategories: Subcategory[]; } + +export function getSubcategoryChildren(subcategory: Subcategory): Subcategory[] { + const container = subcategory as SubcategoryContainer; + if (container.subcategories) { + return container.subcategories; + } + return []; +} diff --git a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.store.adapter.ts b/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.store.adapter.ts index 0a35b75b34..e9feb23393 100644 --- a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.store.adapter.ts +++ b/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.store.adapter.ts @@ -20,4 +20,4 @@ function reportingPageModelAdapter() { }; } -angular.module('piwikApp.service').factory('reportingPageModel', reportingPageModelAdapter); +window.angular.module('piwikApp.service').factory('reportingPageModel', reportingPageModelAdapter); diff --git a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.store.ts b/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.store.ts index e39ecd2986..24016e11ba 100644 --- a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.store.ts +++ b/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.store.ts @@ -5,14 +5,24 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import { computed, reactive, readonly } from 'vue'; +import { + computed, + DeepReadonly, + reactive, + readonly, +} from 'vue'; import ReportingPagesStoreInstance, { Page } from '../ReportingPages/ReportingPages.store'; import ReportMetadataStoreInstance from '../ReportMetadata/ReportMetadata.store'; import { sortOrderables } from '../Orderable'; -import { Widget } from '../Widget/Widgets.store'; +import { + getWidgetChildren, + GroupedWidgets, + Widget, + WidgetContainer, +} from '../Widget/Widgets.store'; interface ReportingMenuStoreState { - page?: Page|null; + page?: DeepReadonly<Page>; } function shouldBeRenderedWithFullWidth(widget: Widget) { @@ -33,16 +43,17 @@ function shouldBeRenderedWithFullWidth(widget: Widget) { || widget.viewDataTable === 'graphEvolution'); } -function markWidgetsInFirstRowOfPage(widgets: Widget[]) { +function markWidgetsInFirstRowOfPage(widgets: (Widget|GroupedWidgets)[]) { if (widgets && widgets[0]) { - const newWidgets = [...widgets]; + const newWidgets: (Widget|GroupedWidgets)[] = [...widgets]; - if (widgets[0].group) { + const groupedWidgets = widgets[0] as GroupedWidgets; + if (groupedWidgets.group) { newWidgets[0] = { ...newWidgets[0], - left: markWidgetsInFirstRowOfPage(widgets[0].left), - right: markWidgetsInFirstRowOfPage(widgets[0].right), - }; + left: markWidgetsInFirstRowOfPage(groupedWidgets.left || []), + right: markWidgetsInFirstRowOfPage(groupedWidgets.right || []), + } as GroupedWidgets; } else { newWidgets[0] = { ...newWidgets[0], isFirstInPage: true }; } @@ -54,9 +65,7 @@ function markWidgetsInFirstRowOfPage(widgets: Widget[]) { } export class ReportingPageStore { - private privateState = reactive<ReportingMenuStoreState>({ - page: null, - }); + private privateState = reactive<ReportingMenuStoreState>({}); private state = computed(() => readonly(this.privateState)); @@ -68,13 +77,13 @@ export class ReportingPageStore { return []; } - let widgets = []; - const reportsToIgnore = {}; + let widgets: Widget[] = []; + const reportsToIgnore: Record<string, unknown> = {}; const isIgnoredReport = (widget: Widget) => widget.isReport && reportsToIgnore[`${widget.module}.${widget.action}`]; - const getRelatedReports = (widget) => { + const getRelatedReports = (widget: Widget) => { if (!widget.isReport) { return []; } @@ -106,7 +115,7 @@ export class ReportingPageStore { return markWidgetsInFirstRowOfPage(widgets); } - let groupedWidgets = []; + const groupedWidgets: (Widget|GroupedWidgets)[] = []; for (let i = 0; i < widgets.length; i += 1) { const widget = widgets[i]; @@ -115,8 +124,8 @@ export class ReportingPageStore { ) { groupedWidgets.push({ ...widget, - widgets: sortOrderables(widget.widgets), - }); + widgets: sortOrderables(getWidgetChildren(widget)), + } as WidgetContainer); } else { let counter = 0; const left = [widget]; @@ -132,16 +141,15 @@ export class ReportingPageStore { } } - groupedWidgets.push({ group: true, left, right }); + groupedWidgets.push({ group: true, left, right } as GroupedWidgets); } } - groupedWidgets = markWidgetsInFirstRowOfPage(groupedWidgets); - - return groupedWidgets; + const sortedWidgets = markWidgetsInFirstRowOfPage(groupedWidgets); + return sortedWidgets; }); - fetchPage(category: string, subcategory: string): Promise<typeof ReportingPageStore['page']['value']> { + fetchPage(category: string, subcategory: string): Promise<ReportingPageStore['page']['value']> { this.resetPage(); return Promise.all([ @@ -154,7 +162,7 @@ export class ReportingPageStore { } resetPage(): void { - this.privateState.page = null; + this.privateState.page = undefined; } } diff --git a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue b/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue index 81a5456f1b..61392f9dd8 100644 --- a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue +++ b/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue @@ -75,12 +75,20 @@ function hideOnlyRawDataNoticifation() { NotificationsStore.remove('onlyRawData'); } +interface ReportingPageState { + loading: boolean; + hasRawData: boolean; + hasNoVisits: boolean; + dateLastChecked: Date|null; + hasNoPage: boolean; +} + export default defineComponent({ components: { ActivityIndicator, Widget, }, - data() { + data(): ReportingPageState { return { loading: false, hasRawData: false, @@ -117,10 +125,10 @@ export default defineComponent({ this.hasNoVisits = false; } - this.renderPage(newValue.category, newValue.subcategory); + this.renderPage(newValue.category as string, newValue.subcategory as string); }); - Matomo.on('loadPage', (category, subcategory) => { + Matomo.on('loadPage', (category: string, subcategory: string) => { this.renderPage(category, subcategory); }); }, @@ -138,8 +146,8 @@ export default defineComponent({ } const parsedUrl = MatomoUrl.parsed.value; - const currentPeriod = parsedUrl.period; - const currentDate = parsedUrl.date; + const currentPeriod = parsedUrl.period as string; + const currentDate = parsedUrl.date as string; try { Periods.parse(currentPeriod, currentDate); @@ -178,7 +186,7 @@ export default defineComponent({ // something to let other components render a specific page. this.loading = true; const element = $('[piwik-dashboard]'); - const scope = angular.element(element).scope() as any; // eslint-disable-line + const scope = window.angular.element(element).scope() as any; // eslint-disable-line scope.fetchDashboard(parseInt(subcategory, 10)).then(() => { this.loading = false; }, () => { @@ -207,7 +215,7 @@ export default defineComponent({ }, renderInitialPage() { const parsed = MatomoUrl.parsed.value; - this.renderPage(parsed.category, parsed.subcategory); + this.renderPage(parsed.category as string, parsed.subcategory as string); }, showOnlyRawDataMessageIfRequired() { if (this.hasRawData && this.hasNoVisits) { @@ -238,9 +246,11 @@ export default defineComponent({ 'Marketplace_Marketplace', ]; - if (subcategoryExceptions.indexOf(parsedUrl.subcategory) !== -1 - || categoryExceptions.indexOf(parsedUrl.category) !== -1 - || parsedUrl.subcategory.toLowerCase().indexOf('manage') !== -1 + const subcategory = parsedUrl.subcategory as string; + const category = parsedUrl.category as string; + if (subcategoryExceptions.indexOf(subcategory) !== -1 + || categoryExceptions.indexOf(category) !== -1 + || subcategory.toLowerCase().indexOf('manage') !== -1 ) { hideOnlyRawDataNoticifation(); return; @@ -248,13 +258,13 @@ export default defineComponent({ const minuteInMilliseconds = 60000; if (this.dateLastChecked - && (new Date().getTime() - this.dateLastChecked) < minuteInMilliseconds + && ((new Date()).valueOf() - this.dateLastChecked.valueOf()) < minuteInMilliseconds ) { return; } AjaxHelper.fetch({ method: 'VisitsSummary.getVisits' }).then((json) => { - this.dateLastChecked = new Date().getTime(); + this.dateLastChecked = new Date(); if (json.value > 0) { this.hasNoVisits = false; diff --git a/plugins/CoreHome/vue/src/ReportingPages/ReportingPages.store.adapter.ts b/plugins/CoreHome/vue/src/ReportingPages/ReportingPages.store.adapter.ts index 1a61650873..0c1981badb 100644 --- a/plugins/CoreHome/vue/src/ReportingPages/ReportingPages.store.adapter.ts +++ b/plugins/CoreHome/vue/src/ReportingPages/ReportingPages.store.adapter.ts @@ -26,4 +26,4 @@ function reportingPagesModelAdapter() { }; } -angular.module('piwikApp.service').factory('reportingPagesModel', reportingPagesModelAdapter); +window.angular.module('piwikApp.service').factory('reportingPagesModel', reportingPagesModelAdapter); diff --git a/plugins/CoreHome/vue/src/ReportingPages/ReportingPages.store.ts b/plugins/CoreHome/vue/src/ReportingPages/ReportingPages.store.ts index 864110e517..3f91b08ed8 100644 --- a/plugins/CoreHome/vue/src/ReportingPages/ReportingPages.store.ts +++ b/plugins/CoreHome/vue/src/ReportingPages/ReportingPages.store.ts @@ -5,7 +5,10 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import { reactive, computed, readonly } from 'vue'; +import { + reactive, + computed, readonly, DeepReadonly, +} from 'vue'; import AjaxHelper from '../AjaxHelper/AjaxHelper'; import { Widget } from '../Widget/Widgets.store'; @@ -34,37 +37,38 @@ export class ReportingPagesStore { pages: [], }); - private state = readonly(this.privateState); + private state = computed(() => readonly(this.privateState)); - private fetchAllPagesPromise?: Promise<Page[]>; + private fetchAllPagesPromise?: Promise<DeepReadonly<Page[]>>; - readonly pages = computed(() => this.state.pages); + readonly pages = computed(() => this.state.value.pages); - findPageInCategory(categoryId: string): Page { + findPageInCategory(categoryId: string): DeepReadonly<Page>|undefined { // happens when user switches between sites, in this case check if the same category exists and // if so, select first entry from that category return this.pages.value.find((p) => p && p.category && p.category.id === categoryId && p.subcategory && p.subcategory.id); } - findPage(categoryId: string, subcategoryId: string): Page { + findPage(categoryId: string, subcategoryId: string): DeepReadonly<Page>|undefined { return this.pages.value.find((p) => p && p.category && p.subcategory && p.category.id === categoryId && `${p.subcategory.id}` === subcategoryId); } - reloadAllPages(): Promise<typeof ReportingPagesStore['pages']['value']> { - this.fetchAllPagesPromise = null; + reloadAllPages(): Promise<ReportingPagesStore['pages']['value']> { + delete this.fetchAllPagesPromise; return this.getAllPages(); } - getAllPages(): Promise<typeof ReportingPagesStore['pages']['value']> { + getAllPages(): Promise<ReportingPagesStore['pages']['value']> { if (!this.fetchAllPagesPromise) { this.fetchAllPagesPromise = AjaxHelper.fetch({ method: 'API.getReportPagesMetadata', filter_limit: '-1', }).then((response) => { this.privateState.pages = response; + return this.pages.value; }); } diff --git a/plugins/CoreHome/vue/src/SelectOnFocus/SelectOnFocus.adapter.ts b/plugins/CoreHome/vue/src/SelectOnFocus/SelectOnFocus.adapter.ts index 922dc902c0..9a8fac6a76 100644 --- a/plugins/CoreHome/vue/src/SelectOnFocus/SelectOnFocus.adapter.ts +++ b/plugins/CoreHome/vue/src/SelectOnFocus/SelectOnFocus.adapter.ts @@ -26,6 +26,4 @@ export default function piwikSelectOnFocus(): IDirective { }; } -piwikSelectOnFocus.$inject = []; - -angular.module('piwikApp').directive('piwikSelectOnFocus', piwikSelectOnFocus); +window.angular.module('piwikApp').directive('piwikSelectOnFocus', piwikSelectOnFocus); diff --git a/plugins/CoreHome/vue/src/SelectOnFocus/SelectOnFocus.ts b/plugins/CoreHome/vue/src/SelectOnFocus/SelectOnFocus.ts index f3cb5356e1..112ab3df2b 100644 --- a/plugins/CoreHome/vue/src/SelectOnFocus/SelectOnFocus.ts +++ b/plugins/CoreHome/vue/src/SelectOnFocus/SelectOnFocus.ts @@ -19,7 +19,7 @@ interface SelectOnFocusArgs { function onFocusHandler(binding: DirectiveBinding<SelectOnFocusArgs>, event: Event) { if (binding.value.focusedElement !== event.target) { binding.value.focusedElement = event.target as HTMLElement; - angular.element(event.target).select(); + window.angular.element(event.target!).select(); } } @@ -37,7 +37,7 @@ function onClickHandler(event: Event) { } function onBlurHandler(binding: DirectiveBinding<SelectOnFocusArgs>) { - binding.value.focusedElement = null; + delete binding.value.focusedElement; } export default { @@ -59,10 +59,10 @@ export default { }, unmounted(el: HTMLElement, binding: DirectiveBinding<SelectOnFocusArgs>): void { if (binding.value.elementSupportsSelect) { - el.removeEventListener('focus', binding.value.onFocusHandler); - el.removeEventListener('blur', binding.value.onBlurHandler); + el.removeEventListener('focus', binding.value.onFocusHandler!); + el.removeEventListener('blur', binding.value.onBlurHandler!); } else { - el.removeEventListener('click', binding.value.onClickHandler); + el.removeEventListener('click', binding.value.onClickHandler!); } }, }; diff --git a/plugins/CoreHome/vue/src/ShowSensitiveData/ShowSensitiveData.adapter.ts b/plugins/CoreHome/vue/src/ShowSensitiveData/ShowSensitiveData.adapter.ts index 7fa5d1e371..24f8186cb8 100644 --- a/plugins/CoreHome/vue/src/ShowSensitiveData/ShowSensitiveData.adapter.ts +++ b/plugins/CoreHome/vue/src/ShowSensitiveData/ShowSensitiveData.adapter.ts @@ -17,7 +17,7 @@ export default function piwikShowSensitiveData(): IDirective { value: { sensitiveData: attr.piwikShowSensitiveData || (attr.text ? attr.text() : ''), showCharacters: attr.showCharacters ? parseInt(attr.showCharacters, 10) : undefined, - clickElementSelector: attr.clickElementSelector, + clickElementSelector: attr.clickElementSelector as string, }, oldValue: null, modifiers: {}, @@ -29,6 +29,4 @@ export default function piwikShowSensitiveData(): IDirective { }; } -piwikShowSensitiveData.$inject = []; - -angular.module('piwikApp').directive('piwikShowSensitiveData', piwikShowSensitiveData); +window.angular.module('piwikApp').directive('piwikShowSensitiveData', piwikShowSensitiveData); diff --git a/plugins/CoreHome/vue/src/ShowSensitiveData/ShowSensitiveData.ts b/plugins/CoreHome/vue/src/ShowSensitiveData/ShowSensitiveData.ts index 2d15c417ba..db5d495d88 100644 --- a/plugins/CoreHome/vue/src/ShowSensitiveData/ShowSensitiveData.ts +++ b/plugins/CoreHome/vue/src/ShowSensitiveData/ShowSensitiveData.ts @@ -10,7 +10,7 @@ import translate from '../translate'; interface ShowSensitiveDataArgs { sensitiveData: string; - showCharacters: number; + showCharacters?: number; clickElementSelector: string|HTMLElement|JQuery; } diff --git a/plugins/CoreHome/vue/src/SideNav/SideNav.adapter.ts b/plugins/CoreHome/vue/src/SideNav/SideNav.adapter.ts index 7a7f6c6316..3778689d94 100644 --- a/plugins/CoreHome/vue/src/SideNav/SideNav.adapter.ts +++ b/plugins/CoreHome/vue/src/SideNav/SideNav.adapter.ts @@ -32,4 +32,4 @@ export default function piwikSideNav($timeout: ITimeoutService): IDirective { piwikSideNav.$inject = ['$timeout']; -angular.module('piwikApp.directive').directive('piwikSideNav', piwikSideNav); +window.angular.module('piwikApp.directive').directive('piwikSideNav', piwikSideNav); diff --git a/plugins/CoreHome/vue/src/SideNav/SideNav.ts b/plugins/CoreHome/vue/src/SideNav/SideNav.ts index fa39d9e45d..ba98585066 100644 --- a/plugins/CoreHome/vue/src/SideNav/SideNav.ts +++ b/plugins/CoreHome/vue/src/SideNav/SideNav.ts @@ -5,6 +5,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ +/* eslint-disable @typescript-eslint/ban-ts-comment */ + import { DirectiveBinding } from 'vue'; import DirectiveUtilities from '../directiveUtilities'; @@ -36,12 +38,14 @@ export default { const sideNavActivator = DirectiveUtilities.getRef(binding.value.activator, binding); if (sideNavActivator) { window.$(sideNavActivator).show(); - } - const targetSelector = sideNavActivator.getAttribute('data-target'); - window.$(`#${targetSelector}`).sidenav({ - closeOnClick: true, - }); + const targetSelector = sideNavActivator.getAttribute('data-target'); + + // @ts-ignore + window.$(`#${targetSelector}`).sidenav({ + closeOnClick: true, + }); + } } if (el.classList.contains('collapsible')) { diff --git a/plugins/CoreHome/vue/src/SiteSelector/SiteRef.ts b/plugins/CoreHome/vue/src/SiteSelector/SiteRef.ts new file mode 100644 index 0000000000..d150b8cf66 --- /dev/null +++ b/plugins/CoreHome/vue/src/SiteSelector/SiteRef.ts @@ -0,0 +1,11 @@ +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +export default interface SiteRef { + id: string|number; + name: string; +} diff --git a/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.adapter.ts b/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.adapter.ts index ada0377443..a29f6c4a1f 100644 --- a/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.adapter.ts +++ b/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.adapter.ts @@ -5,7 +5,12 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import { INgModelController, ITimeoutService } from 'angular'; +import { + IAttributes, + INgModelController, + IScope, + ITimeoutService, +} from 'angular'; import { nextTick } from 'vue'; import createAngularJsAdapter from '../createAngularJsAdapter'; import SiteSelector from './SiteSelector.vue'; @@ -40,7 +45,7 @@ export default createAngularJsAdapter<[ITimeoutService]>({ angularJsBind: '@', }, modelValue: { - default(scope, element, attrs) { + default(scope: IScope, element: JQLite, attrs: IAttributes) { if (attrs.siteid && attrs.sitename) { return { id: attrs.siteid, name: Matomo.helper.htmlDecode(attrs.sitename) }; } @@ -84,7 +89,7 @@ export default createAngularJsAdapter<[ITimeoutService]>({ postCreate(vm, scope, element, attrs, controller) { const ngModel = controller as INgModelController; - scope.$watch('value', (newVal) => { + scope.$watch('value', (newVal: unknown) => { nextTick(() => { if (newVal !== vm.modelValue) { vm.modelValue = newVal; @@ -108,7 +113,7 @@ export default createAngularJsAdapter<[ITimeoutService]>({ ngModel.$render = () => { nextTick(() => { nextTick(() => { - if (angular.isString(ngModel.$viewValue)) { + if (window.angular.isString(ngModel.$viewValue)) { vm.modelValue = JSON.parse(ngModel.$viewValue); } else { vm.modelValue = ngModel.$viewValue; diff --git a/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue b/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue index 6a5087e96d..3660b2866e 100644 --- a/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue +++ b/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue @@ -120,7 +120,7 @@ </template> <script lang="ts"> -import { defineComponent } from 'vue'; +import { DeepReadonly, defineComponent } from 'vue'; import FocusAnywhereButHere from '../FocusAnywhereButHere/FocusAnywhereButHere'; import FocusIf from '../FocusIf/FocusIf'; import AllSitesLink from './AllSitesLink.vue'; @@ -129,25 +129,22 @@ import MatomoUrl from '../MatomoUrl/MatomoUrl'; import translate from '../translate'; import SitesStore, { Site } from './SitesStore'; import debounce from '../debounce'; - -interface SiteRef { - id: string|number; - name: string; -} +import SiteRef from './SiteRef'; interface SiteSelectorState { searchTerm: string; showSitesList: boolean; + activeSiteId: string; isLoading: boolean; - sites: Site[]; - autocompleteMinSites: null|number; + sites: DeepReadonly<Site[]>; + autocompleteMinSites: number; } export default defineComponent({ props: { modelValue: { - Object, - default: (props) => { + type: Object, + default: (props: { modelValue?: SiteRef }): SiteRef|undefined => { if (props.modelValue) { return props.modelValue; } @@ -204,13 +201,16 @@ export default defineComponent({ data(): SiteSelectorState { return { searchTerm: '', - activeSiteId: Matomo.idSite, + activeSiteId: `${Matomo.idSite}`, showSitesList: false, isLoading: false, sites: [], autocompleteMinSites: parseInt(Matomo.config.autocomplete_min_sites as string, 10), }; }, + created() { + this.searchSite = debounce(this.searchSite); + }, mounted() { window.initTopControls(); @@ -221,7 +221,7 @@ export default defineComponent({ }); const shortcutTitle = translate('CoreHome_ShortcutWebsiteSelector'); - Matomo.helper.registerShortcut('w', shortcutTitle, (event) => { + Matomo.helper.registerShortcut('w', shortcutTitle, (event: KeyboardEvent) => { if (event.altKey) { return; } @@ -230,8 +230,12 @@ export default defineComponent({ } else { event.returnValue = false; // IE } - this.$refs.selectorLink.click(); - this.$refs.selectorLink.focus(); + + const selectorLink = this.$refs.selectorLink as HTMLElement; + if (selectorLink) { + selectorLink.click(); + selectorLink.focus(); + } }); }, computed: { @@ -262,9 +266,6 @@ export default defineComponent({ return `?${newQuery}`; }, }, - created() { - this.searchSite = debounce(this.searchSite.bind(this)); - }, methods: { onSearchTermChanged() { if (!this.searchTerm) { @@ -276,10 +277,10 @@ export default defineComponent({ } }, onAllSitesClick(event: MouseEvent) { - this.switchSite({ idsite: 'all', name: this.allSitesText }, event); + this.switchSite({ idsite: 'all', name: this.$props.allSitesText }, event); this.showSitesList = false; }, - switchSite(site: SiteRef, event: KeyboardEvent|MouseEvent) { + switchSite(site: Site, event: KeyboardEvent|MouseEvent) { // for Mac OS cmd key needs to be pressed, ctrl key on other systems const controlKey = navigator.userAgent.indexOf('Mac OS X') !== -1 ? event.metaKey : event.ctrlKey; diff --git a/plugins/CoreHome/vue/src/SiteSelector/SitesStore.adapter.ts b/plugins/CoreHome/vue/src/SiteSelector/SitesStore.adapter.ts index e2f0841766..c454d60625 100644 --- a/plugins/CoreHome/vue/src/SiteSelector/SitesStore.adapter.ts +++ b/plugins/CoreHome/vue/src/SiteSelector/SitesStore.adapter.ts @@ -21,4 +21,4 @@ function siteSelectorModelAdapter() { }; } -angular.module('piwikApp.service').factory('siteSelectorModel', siteSelectorModelAdapter); +window.angular.module('piwikApp.service').factory('siteSelectorModel', siteSelectorModelAdapter); diff --git a/plugins/CoreHome/vue/src/SiteSelector/SitesStore.ts b/plugins/CoreHome/vue/src/SiteSelector/SitesStore.ts index 35d43e420a..eec56520e8 100644 --- a/plugins/CoreHome/vue/src/SiteSelector/SitesStore.ts +++ b/plugins/CoreHome/vue/src/SiteSelector/SitesStore.ts @@ -5,17 +5,23 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import { reactive, computed, readonly } from 'vue'; +import { + reactive, + computed, + readonly, + DeepReadonly, +} from 'vue'; import AjaxHelper from '../AjaxHelper/AjaxHelper'; import MatomoUrl from '../MatomoUrl/MatomoUrl'; export interface Site { idsite: string; name: string; + group?: string; } interface SitesStoreState { - initialSites: Site[]|null; + initialSites: DeepReadonly<Site[]>; isInitialized: boolean; } @@ -25,21 +31,23 @@ class SitesStore { isInitialized: false, }); - private currentRequestAbort: AbortController; + private currentRequestAbort: AbortController | null = null; - private limitRequest: Promise<{ value: number|string }>; + private limitRequest?: Promise<{ value: number|string }>; public readonly initialSites = computed(() => readonly(this.state.initialSites)); - loadInitialSites(): Promise<Site[]> { + loadInitialSites(): Promise<DeepReadonly<Site[]>|null> { if (this.state.isInitialized) { return Promise.resolve(readonly(this.state.initialSites)); } return this.searchSite('%').then((sites) => { this.state.isInitialized = true; - this.state.initialSites = sites; - return readonly(sites); + if (sites !== null) { + this.state.initialSites = sites; + } + return sites; }); } @@ -65,7 +73,7 @@ class SitesStore { } } - searchSite(term, onlySitesWithAdminAccess = false): Promise<Site[]> { + searchSite(term?: string, onlySitesWithAdminAccess = false): Promise<DeepReadonly<Site[]>|null> { if (!term) { return this.loadInitialSites(); } @@ -96,7 +104,7 @@ class SitesStore { }); }).then((response) => { if (response) { - return this.processWebsitesList(response); + return this.processWebsitesList(response as Site[]); } return null; @@ -105,7 +113,7 @@ class SitesStore { }); } - private processWebsitesList(response) { + private processWebsitesList(response: Site[]): Site[] { let sites = response; if (!sites || !sites.length) { @@ -117,7 +125,7 @@ class SitesStore { name: s.group ? `[${s.group}] ${s.name}` : s.name, })); - sites.sort((lhs, rhs) => { + sites.sort((lhs: Site, rhs: Site) => { if (lhs.name.toLowerCase() < rhs.name.toLowerCase()) { return -1; } diff --git a/plugins/CoreHome/vue/src/Sparkline/Sparkline.vue b/plugins/CoreHome/vue/src/Sparkline/Sparkline.vue index 9d69deb366..37f9008d0e 100644 --- a/plugins/CoreHome/vue/src/Sparkline/Sparkline.vue +++ b/plugins/CoreHome/vue/src/Sparkline/Sparkline.vue @@ -57,7 +57,7 @@ export default defineComponent({ const urlParams = helper.mixinDefaultGetParams({ ...defaultParams, ...params }); // Append the token_auth to the URL if it was set (eg. embed dashboard) - const { token_auth } = MatomoUrl.parsed.value; + const token_auth = MatomoUrl.parsed.value.token_auth as string; if (token_auth && token_auth.length && Matomo.shouldPropagateTokenAuth) { urlParams.token_auth = token_auth; } @@ -70,9 +70,9 @@ export default defineComponent({ } const dateRange = RangePeriod.getLastNRange( - Matomo.period, + Matomo.period!, 30, - Matomo.currentDateString, + Matomo.currentDateString!, ).getDateRange(); const piwikMinDate = new Date(Matomo.minDateYear, Matomo.minDateMonth - 1, Matomo.minDateDay); diff --git a/plugins/CoreHome/vue/src/Widget/Widget.vue b/plugins/CoreHome/vue/src/Widget/Widget.vue index 725aa6f694..67f5838760 100644 --- a/plugins/CoreHome/vue/src/Widget/Widget.vue +++ b/plugins/CoreHome/vue/src/Widget/Widget.vue @@ -35,12 +35,15 @@ </template> <script lang="ts"> -import { defineComponent } from 'vue'; -import JQuery = JQuery; +import { DeepReadonly, defineComponent } from 'vue'; import WidgetLoader from '../WidgetLoader/WidgetLoader.vue'; import WidgetContainer from '../WidgetContainer/WidgetContainer.vue'; import WidgetByDimensionContainer from '../WidgetByDimensionContainer/WidgetByDimensionContainer.vue'; -import WidgetsStoreInstance, { Widget as WidgetData, ContainerWidget } from './Widgets.store'; +import WidgetsStoreInstance, { + getWidgetChildren, + Widget as WidgetData, + WidgetContainer as WidgetDataContainer, +} from './Widgets.store'; import AjaxHelper from '../AjaxHelper/AjaxHelper'; import ReportMetadataStoreInstance from '../ReportMetadata/ReportMetadata.store'; import Tooltips from '../Tooltips/Tooltips'; @@ -48,10 +51,10 @@ import Tooltips from '../Tooltips/Tooltips'; function findContainer( widgetsByCategory: typeof WidgetsStoreInstance.widgets.value, containerId: string, -): ContainerWidget|undefined { - let widget: ContainerWidget; - Object.values(widgetsByCategory || {}).some((widgets) => { - widget = widgets.find((w) => w && w.isContainer && w.parameters.containerId === containerId); +): DeepReadonly<WidgetData>|undefined { + let widget: DeepReadonly<WidgetData>|undefined = undefined; + Object.values(widgetsByCategory || {}).some((widgets: DeepReadonly<WidgetData[]>) => { + widget = widgets.find((w) => w && w.isContainer && w.parameters?.containerId === containerId); return widget; }); return widget; @@ -104,14 +107,14 @@ export default defineComponent({ }; }, setup() { - function tooltipContent() { + function tooltipContent(this: HTMLElement) { const $this = window.$(this) as JQuery; if ($this.attr('piwik-field') === '' || $this.hasClass('matomo-form-field')) { // do not show it for form fields return ''; } - const title = window.$(this).attr('title'); + const title = window.$(this).attr('title') || ''; return window.vueSanitize(title.replace(/\n/g, '<br />')); } @@ -122,12 +125,13 @@ export default defineComponent({ created() { const { actualWidget } = this; - if (!actualWidget || !actualWidget.middlewareParameters) { - this.showWidget = true; - } else { - AjaxHelper.fetch(actualWidget.middlewareParameters).then((response) => { + if (actualWidget && actualWidget.middlewareParameters) { + const params = actualWidget.middlewareParameters as unknown as QueryParameters; + AjaxHelper.fetch(params).then((response) => { this.showWidget = !!response; }); + } else { + this.showWidget = true; } }, computed: { @@ -135,7 +139,7 @@ export default defineComponent({ return WidgetsStoreInstance.widgets.value; }, actualWidget() { - const { widget }: { widget: WidgetData } = this; + const widget = this.widget as WidgetData; if (widget) { const result = { ...widget }; @@ -158,13 +162,15 @@ export default defineComponent({ if (this.widgetized) { result.isFirstInPage = true; result.parameters = { ...result.parameters, widget: '1' }; - if (result.widgets) { - result.widgets = result.widgets.map((w) => ({ + + const widgets = getWidgetChildren(result); + if (widgets) { + (result as WidgetDataContainer).widgets = widgets.map((w) => ({ ...w, parameters: { ...w.parameters, widget: '1', - containerId: this.containerid, + containerId: this.containerid!, }, })); } diff --git a/plugins/CoreHome/vue/src/Widget/Widgets.store.ts b/plugins/CoreHome/vue/src/Widget/Widgets.store.ts index d0ce5467ed..30823bb0cb 100644 --- a/plugins/CoreHome/vue/src/Widget/Widgets.store.ts +++ b/plugins/CoreHome/vue/src/Widget/Widgets.store.ts @@ -9,44 +9,60 @@ import { reactive, readonly, computed, + DeepReadonly, } from 'vue'; -import Subcategory from '../ReportingMenu/Subcategory'; +import { Subcategory } from '../ReportingMenu/Subcategory'; import MatomoUrl from '../MatomoUrl/MatomoUrl'; +import { Orderable } from '../Orderable'; -export interface WidgetLeaf { - uniqueId: string; - module: string; - action: string; - viewDataTable: string; - parameters: Record<string, unknown>; - subcategory: Subcategory; +export interface Widget extends Orderable { + uniqueId?: string; + module?: string; + action?: string; + viewDataTable?: string; + parameters?: Record<string, unknown>; + subcategory?: Subcategory; isContainer?: boolean; isReport?: boolean; - middlewareParameters?: QueryParameters; + middlewareParameters?: Record<string, unknown>; documentation?: string; layout?: string; isWide?: boolean; + isFirstInPage?: boolean; } -export interface ContainerWidget extends WidgetLeaf { - isFirstInPage?: boolean; - widgets: (WidgetLeaf | ContainerWidget)[]; +// get around DeepReadonly<> not being able to handle recursive types by moving the +// recursive properties to subtypes that are only referenced when needed +export interface WidgetContainer extends Widget { + widgets?: Widget[]; } -export type Widget = WidgetLeaf | ContainerWidget; +export interface GroupedWidgets { + group: boolean; + left?: Widget[]; + right?: Widget[]; +} interface WidgetsStoreState { isFetchedFirstTime: boolean; categorizedWidgets: Record<string, Widget[]>; } +export function getWidgetChildren(widget: Widget): Widget[] { + const container = widget as WidgetContainer; + if (container.widgets) { + return container.widgets; + } + return []; +} + class WidgetsStore { private privateState = reactive<WidgetsStoreState>({ isFetchedFirstTime: false, categorizedWidgets: {}, }); - private state = computed(() => { + private state = computed((): DeepReadonly<WidgetsStoreState> => { if (!this.privateState.isFetchedFirstTime) { // initiating a side effect in a computed property seems wrong, but it needs to be // executed after knowing a user's logged in and it will succeed. @@ -58,7 +74,7 @@ class WidgetsStore { readonly widgets = computed(() => this.state.value.categorizedWidgets); - private fetchAvailableWidgets(): Promise<typeof WidgetsStore['widgets']['value']> { + private fetchAvailableWidgets(): Promise<WidgetsStore['widgets']['value']> { // if there's no idSite, don't make the request since it will just fail if (!MatomoUrl.parsed.value.idSite) { return Promise.resolve(this.widgets.value); @@ -67,8 +83,9 @@ class WidgetsStore { this.privateState.isFetchedFirstTime = true; return new Promise((resolve, reject) => { try { - window.widgetsHelper.getAvailableWidgets((categorizedWidgets) => { - this.privateState.categorizedWidgets = categorizedWidgets; + window.widgetsHelper.getAvailableWidgets((widgets: Record<string, unknown[]>) => { + const casted = widgets as unknown as Record<string, Widget[]>; + this.privateState.categorizedWidgets = casted; resolve(this.widgets.value); }); } catch (e) { @@ -77,7 +94,7 @@ class WidgetsStore { }); } - reloadAvailableWidgets(): Promise<typeof WidgetsStore['widgets']['value']> { + reloadAvailableWidgets(): Promise<WidgetsStore['widgets']['value']> { if (typeof window.widgetsHelper === 'object' && window.widgetsHelper.availableWidgets) { // lets also update widgetslist so will be easier to update list of available widgets in // dashboard selector immediately diff --git a/plugins/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.adapter.ts b/plugins/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.adapter.ts index 42021d465b..bf2a7e4b3a 100644 --- a/plugins/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.adapter.ts +++ b/plugins/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.adapter.ts @@ -7,6 +7,7 @@ import createAngularJsAdapter from '../createAngularJsAdapter'; import WidgetByDimensionContainer from './WidgetByDimensionContainer.vue'; +import { Widget } from '../Widget/Widgets.store'; export default createAngularJsAdapter({ component: WidgetByDimensionContainer, @@ -14,7 +15,7 @@ export default createAngularJsAdapter({ widgets: { angularJsBind: '=piwikWidgetByDimensionContainer', transform(v) { - return v.widgets; + return (v as { widgets: Widget[] }).widgets; }, }, }, diff --git a/plugins/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.vue b/plugins/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.vue index ac40bee3ec..0e1a0d081a 100644 --- a/plugins/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.vue +++ b/plugins/CoreHome/vue/src/WidgetByDimensionContainer/WidgetByDimensionContainer.vue @@ -45,6 +45,16 @@ import { sortOrderables } from '../Orderable'; // TODO: is there a widget category ID or widget ID +interface WidgetByDimensionContainerState { + selectedWidget: Widget|null; +} + +interface WidgetCategory { + name: string; + order: number; + widgets: Widget[]; +} + export default defineComponent({ props: { widgets: Array, @@ -52,7 +62,7 @@ export default defineComponent({ components: { WidgetLoader, }, - data() { + data(): WidgetByDimensionContainerState { return { selectedWidget: null, }; @@ -62,19 +72,22 @@ export default defineComponent({ }, computed: { widgetsSorted(): Widget[] { - return sortOrderables(this.widgets); + return sortOrderables(this.widgets as Widget[]); }, widgetsByCategory() { - const byCategory = {}; + const byCategory: Record<string, WidgetCategory> = {}; this.widgetsSorted.forEach((widget) => { - const category = widget.subcategory.name; + const category = widget.subcategory?.name; + if (!category) { + return; + } if (!byCategory[category]) { byCategory[category] = { name: category, order: widget.order, widgets: [] }; } - byCategory[category].widgets.push(widget); + byCategory[category].widgets!.push(widget); }); return sortOrderables(Object.values(byCategory)); diff --git a/plugins/CoreHome/vue/src/WidgetContainer/WidgetContainer.vue b/plugins/CoreHome/vue/src/WidgetContainer/WidgetContainer.vue index d327d47fcc..f581e0208a 100644 --- a/plugins/CoreHome/vue/src/WidgetContainer/WidgetContainer.vue +++ b/plugins/CoreHome/vue/src/WidgetContainer/WidgetContainer.vue @@ -30,21 +30,24 @@ const Widget = useExternalPluginComponent('CoreHome', 'Widget'); export default defineComponent({ props: { - container: Array, + container: { + type: Array, + required: true, + }, }, components: { Widget, }, computed: { actualContainer() { - const { container }: { container: WidgetData[] } = this; + const container = this.container as WidgetData[]; if (!container?.[0]?.parameters) { return container; } const [widget] = container; - const isWidgetized = widget.parameters.widget === '1' || widget.parameters.widget === 1; + const isWidgetized = widget.parameters?.widget === '1' || widget.parameters?.widget === 1; const isGraphEvolution = isWidgetized && widget.viewDataTable === 'graphEvolution'; diff --git a/plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue b/plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue index 6e67525b76..4aaedd4d6c 100644 --- a/plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue +++ b/plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue @@ -29,7 +29,7 @@ </template> <script lang="ts"> -import { IRootScopeService } from 'angular'; +import { IRootScopeService, IScope } from 'angular'; import { defineComponent } from 'vue'; import ActivityIndicator from '../ActivityIndicator/ActivityIndicator.vue'; import translate from '../translate'; @@ -39,6 +39,14 @@ import { NotificationsStore } from '../Notification'; import MatomoUrl from '../MatomoUrl/MatomoUrl'; import ComparisonsStoreInstance from '../Comparisons/Comparisons.store.instance'; +interface WidgetLoaderState { + loading: boolean; + loadingFailed: boolean; + changeCounter: number; + currentScope: null|IScope; + lastWidgetAbortController: null|AbortController; +} + /** * Loads any custom widget or URL based on the given parameters. * @@ -59,16 +67,17 @@ export default defineComponent({ components: { ActivityIndicator, }, - data() { + data(): WidgetLoaderState { return { loading: false, - loadingFailed: '', + loadingFailed: false, changeCounter: 0, currentScope: null, + lastWidgetAbortController: null, }; }, watch: { - widgetParams(parameters: Record<string, unknown>) { + widgetParams(parameters: QueryParameters) { if (parameters) { this.loadWidgetUrl(parameters, this.changeCounter += 1); } @@ -93,7 +102,7 @@ export default defineComponent({ }, mounted() { if (this.widgetParams) { - this.loadWidgetUrl(this.widgetParams, this.changeCounter += 1); + this.loadWidgetUrl(this.widgetParams as QueryParameters, this.changeCounter += 1); } }, unmounted() { @@ -107,7 +116,7 @@ export default defineComponent({ } }, cleanupLastWidgetContent() { - const { widgetContent } = this.$refs; + const widgetContent = this.$refs.widgetContent as HTMLElement; if (widgetContent) { widgetContent.innerHTML = ''; } @@ -115,10 +124,10 @@ export default defineComponent({ this.currentScope.$destroy(); } }, - getWidgetUrl(parameters?: Record<string, unknown>): Record<string, unknown> { + getWidgetUrl(parameters?: QueryParameters): QueryParameters { const urlParams = MatomoUrl.parsed.value; - let fullParameters: Record<string, unknown> = { ...(parameters || {}) }; + let fullParameters: QueryParameters = { ...(parameters || {}) }; const paramsToForward = Object.keys({ ...MatomoUrl.hashParsed.value, @@ -165,7 +174,7 @@ export default defineComponent({ return fullParameters; }, - loadWidgetUrl(parameters: Record<string, unknown>, thisChangeId: number) { + loadWidgetUrl(parameters: QueryParameters, thisChangeId: number) { this.loading = true; this.abortHttpRequestIfNeeded(); @@ -189,7 +198,7 @@ export default defineComponent({ this.loading = false; this.loadingFailed = false; - const { widgetContent }: { widgetContent: HTMLElement } = this.$refs; + const widgetContent = this.$refs.widgetContent as HTMLElement; window.$(widgetContent).html(response); const $content = window.$(widgetContent).children(); diff --git a/plugins/CoreHome/vue/src/createAngularJsAdapter.ts b/plugins/CoreHome/vue/src/createAngularJsAdapter.ts index c444f30339..a71ca3543e 100644 --- a/plugins/CoreHome/vue/src/createAngularJsAdapter.ts +++ b/plugins/CoreHome/vue/src/createAngularJsAdapter.ts @@ -5,58 +5,64 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + import { defineComponent, ref, - ComponentPublicInstance, } from 'vue'; +import { IDirectiveFactory, IDirectivePrePost, Injectable } from 'angular'; import Matomo from './Matomo/Matomo'; import createVueApp from './createVueApp'; -interface SingleScopeVarInfo<InjectTypes> { +interface SingleScopeVarInfo<InjectTypes extends unknown[]> { vue?: string; - default?: any; // eslint-disable-line + default?: any; transform?: ( v: unknown, - vm: ComponentPublicInstance, - scope: ng.IScope, + vm: any, + scope: any, element: ng.IAugmentedJQuery, attrs: ng.IAttributes, - otherController: ng.IControllerService, - ...injected: InjectTypes, + otherController?: ng.IController, + ...injected: InjectTypes ) => unknown; angularJsBind?: string; } -type ScopeMapping<InjectTypes> = { [scopeVarName: string]: SingleScopeVarInfo<InjectTypes> }; +type ScopeMapping<InjectTypes extends unknown[]> = { + [scopeVarName: string]: SingleScopeVarInfo<InjectTypes>, +}; -type AdapterFunction<InjectTypes, R = void> = ( - scope: ng.IScope, +type AdapterFunction<InjectTypes extends unknown[], R = void> = ( + scope: any, element: ng.IAugmentedJQuery, attrs: ng.IAttributes, - ...injected: InjectTypes, + ...injected: InjectTypes ) => R; -type EventAdapterFunction<InjectTypes, R = void> = ( - $event: any, // eslint-disable-line - vm: ComponentPublicInstance, - scope: ng.IScope, +type EventAdapterFunction<InjectTypes extends unknown[], R = void> = ( + $event: any, + vm: any, + scope: any, element: ng.IAugmentedJQuery, attrs: ng.IAttributes, - otherController: ng.IControllerService, - ...injected: InjectTypes, + otherController?: ng.IController, + ...injected: InjectTypes ) => R; -type PostCreateFunction<InjectTypes, R = void> = ( - vm: ComponentPublicInstance, - scope: ng.IScope, +type PostCreateFunction<InjectTypes extends unknown[], R = void> = ( + vm: any, + scope: any, element: ng.IAugmentedJQuery, attrs: ng.IAttributes, - otherController: ng.IControllerService, - ...injected: InjectTypes, + otherController?: ng.IController, + ...injected: InjectTypes ) => R; -type EventMapping<InjectTypes> = { [vueEventName: string]: EventAdapterFunction<InjectTypes> }; +type EventMapping<InjectTypes extends unknown[]> = { + [vueEventName: string]: EventAdapterFunction<InjectTypes>, +}; type ComponentType = ReturnType<typeof defineComponent>; @@ -83,7 +89,7 @@ export function removeAngularJsSpecificProperties<T>(newValue: T): T { return newValue; } -export default function createAngularJsAdapter<InjectTypes = []>(options: { +export default function createAngularJsAdapter<InjectTypes extends unknown[] = []>(options: { component: ComponentType, require?: string, scope?: ScopeMapping<InjectTypes>, @@ -97,7 +103,7 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { restrict?: string, priority?: number, replace?: boolean, -}): ng.IDirectiveFactory { +}): Injectable<ng.IDirectiveFactory> { const { component, require, @@ -131,19 +137,19 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { vueToAngular[info.vue] = scopeVarName; }); - function angularJsAdapter(...injectedServices: InjectTypes) { + function angularJsAdapter(...injectedServices: InjectTypes): ng.IDirective { const adapter: ng.IDirective = { restrict, require, priority, scope: noScope ? undefined : angularJsScope, - compile: function angularJsAdapterCompile() { + compile: function angularJsAdapterCompile(): IDirectivePrePost { return { post: function angularJsAdapterLink( - ngScope: ng.IScope, + ngScope: any, ngElement: ng.IAugmentedJQuery, ngAttrs: ng.IAttributes, - ngController: ng.IControllerService, + ngController?: ng.IController, ) { const transcludeClone = transclude ? ngElement.find(`[ng-transclude][counter=${currentTranscludeCounter}]`) @@ -157,12 +163,12 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { }); Object.entries(scope).forEach(([, info]) => { if (info.angularJsBind === '&' || info.angularJsBind === '&?') { - const eventName = toKebabCase(info.vue); + const eventName = toKebabCase(info.vue!); if (!events[eventName]) { // pass through scope & w/o a custom event handler rootVueTemplate += ` @${eventName}="onEventHandler('${eventName}', $event)"`; } } else { - rootVueTemplate += ` :${toKebabCase(info.vue)}="${info.vue}"`; + rootVueTemplate += ` :${toKebabCase(info.vue!)}="${info.vue}"`; } }); rootVueTemplate += '>'; @@ -175,7 +181,7 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { const app = createVueApp({ template: rootVueTemplate, data() { - const initialData = {}; + const initialData: Record<string, unknown> = {}; Object.entries(scope).forEach(([scopeVarName, info]) => { let value = removeAngularJsSpecificProperties(ngScope[scopeVarName]); if (typeof value === 'undefined' && typeof info.default !== 'undefined') { @@ -194,7 +200,7 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { ...injectedServices, ); } - initialData[info.vue] = value; + initialData[info.vue!] = value; }); return initialData; }, @@ -209,7 +215,7 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { return undefined; }, methods: { - onEventHandler(name: string, $event: any) { // eslint-disable-line + onEventHandler(name: string, $event: any) { const scopePropertyName = toAngularJsCamelCase(vueToAngular[name] || name); if (ngScope[scopePropertyName]) { ngScope[scopePropertyName]($event); @@ -235,7 +241,7 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { const mountPoint = mountPointFactory ? mountPointFactory(ngScope, ngElement, ngAttrs, ...injectedServices) : ngElement[0]; - const vm = app.mount(mountPoint); + const vm: any = app.mount(mountPoint); // setup watches to bind between angularjs + vue Object.entries(scope).forEach(([scopeVarName, info]) => { @@ -243,7 +249,7 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { return; } - ngScope.$watch(scopeVarName, (newValue: any) => { // eslint-disable-line + ngScope.$watch(scopeVarName, (newValue: any) => { let newValueFinal = removeAngularJsSpecificProperties(newValue); if (typeof info.default !== 'undefined' && typeof newValue === 'undefined') { newValueFinal = info.default instanceof Function @@ -261,11 +267,11 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { ...injectedServices, ); } - vm[info.vue] = newValueFinal; + vm[info.vue!] = newValueFinal; }); }); - if (transclude) { + if (transclude && transcludeClone) { $(vm.transcludeTarget).append(transcludeClone); } @@ -282,7 +288,9 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { if (scope[attr.nodeName]) { return; } - mountPoint.firstElementChild.setAttribute(attr.nodeName, attr.nodeValue); + if (mountPoint.firstElementChild) { + mountPoint.firstElementChild.setAttribute(attr.nodeName, attr.nodeValue!); + } }); ngElement.replaceWith(window.$(mountPoint).children()); @@ -306,9 +314,12 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { angularJsAdapter.$inject = $inject || []; - angular.module('piwikApp').directive(directiveName, angularJsAdapter); + window.angular.module('piwikApp').directive( + directiveName, + angularJsAdapter as unknown as Injectable<IDirectiveFactory>, + ); - return angularJsAdapter; + return angularJsAdapter as unknown as Injectable<IDirectiveFactory>; } export function transformAngularJsBoolAttr(v: unknown): boolean|undefined { @@ -320,10 +331,10 @@ export function transformAngularJsBoolAttr(v: unknown): boolean|undefined { return true; } - return !!v && v > 0 && v !== '0'; + return !!v && v as number > 0 && v !== '0'; } -export function transformAngularJsIntAttr(v: string): number { +export function transformAngularJsIntAttr(v: unknown): number|undefined|null { if (typeof v === 'undefined') { return undefined; } @@ -332,7 +343,7 @@ export function transformAngularJsIntAttr(v: string): number { return null; } - return parseInt(v, 10); + return parseInt(v as string, 10); } // utility function for service adapters diff --git a/plugins/CoreHome/vue/src/debounce.ts b/plugins/CoreHome/vue/src/debounce.ts index 8629e78589..7a5e2f5af9 100644 --- a/plugins/CoreHome/vue/src/debounce.ts +++ b/plugins/CoreHome/vue/src/debounce.ts @@ -1,19 +1,18 @@ -interface Callable { - (...args: unknown[]): unknown; -} - const DEFAULT_DEBOUNCE_DELAY = 300; -export default function debounce<F extends Callable>(fn: F, delayInMs = DEFAULT_DEBOUNCE_DELAY): F { +export default function debounce<This, Args extends unknown[]>( + fn: (this: This, ...args: Args) => void, + delayInMs = DEFAULT_DEBOUNCE_DELAY, +): (this: This, ...args: Args) => void { let timeout: ReturnType<typeof setTimeout>; - return (...args: Parameters<F>) => { + return function wrapper(this: This, ...args: Args): void { if (timeout) { clearTimeout(timeout); } timeout = setTimeout(() => { - fn(...args); + fn.call(this, ...args); }, delayInMs); }; } diff --git a/plugins/CoreHome/vue/src/directiveUtilities.ts b/plugins/CoreHome/vue/src/directiveUtilities.ts index 129a27ceba..4ca073fca1 100644 --- a/plugins/CoreHome/vue/src/directiveUtilities.ts +++ b/plugins/CoreHome/vue/src/directiveUtilities.ts @@ -10,7 +10,7 @@ import { DirectiveBinding } from 'vue'; function getRef<T>(expander: string | HTMLElement, binding: DirectiveBinding<T>): HTMLElement|null { return expander instanceof HTMLElement ? expander - : binding.instance.$refs[expander] as HTMLElement; + : binding.instance?.$refs[expander] as HTMLElement; } export default { diff --git a/plugins/CoreHome/vue/src/index.ts b/plugins/CoreHome/vue/src/index.ts index ca9be63c2c..7f45bc2305 100644 --- a/plugins/CoreHome/vue/src/index.ts +++ b/plugins/CoreHome/vue/src/index.ts @@ -56,6 +56,7 @@ import './ContentTable/ContentTable.adapter'; import './AjaxForm/AjaxForm.adapter'; export { default as createVueApp } from './createVueApp'; +export { default as useExternalPluginComponent } from './useExternalPluginComponent'; export { default as DirectiveUtilities } from './directiveUtilities'; export { default as debounce } from './debounce'; export { @@ -92,6 +93,7 @@ export { default as DateRangePicker } from './DateRangePicker/DateRangePicker.vu export { default as PeriodDatePicker } from './PeriodDatePicker/PeriodDatePicker.vue'; export * from './Notification'; export { default as SiteSelector } from './SiteSelector/SiteSelector.vue'; +export { default as SiteRef } from './SiteSelector/SiteRef'; export { default as QuickAccess } from './QuickAccess/QuickAccess.vue'; export { default as FieldArray } from './FieldArray/FieldArray.vue'; export { default as MultiPairField } from './MultiPairField/MultiPairField.vue'; diff --git a/plugins/CoreHome/vue/src/useExternalPluginComponent.ts b/plugins/CoreHome/vue/src/useExternalPluginComponent.ts index 69b80b62be..0829c348d3 100644 --- a/plugins/CoreHome/vue/src/useExternalPluginComponent.ts +++ b/plugins/CoreHome/vue/src/useExternalPluginComponent.ts @@ -5,6 +5,9 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/ban-ts-comment */ + import { defineAsyncComponent } from 'vue'; export default function useExternalPluginComponent( @@ -13,9 +16,10 @@ export default function useExternalPluginComponent( ): typeof defineAsyncComponent { return defineAsyncComponent(() => (new Promise((resolve) => { window.$(document).ready(() => { - if (window[plugin]) { - resolve(window[plugin][component]); + if ((window as any)[plugin]) { + resolve((window as any)[plugin][component]); } else { + // @ts-ignore resolve(null); // plugin not loaded } }); diff --git a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js index ab880d4ee7..469b3a4604 100644 --- a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js +++ b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js @@ -149,7 +149,7 @@ var external_CoreHome_ = __webpack_require__("19dc"); // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"} var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); -// 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/CorePluginsAdmin/vue/src/FormField/FormField.vue?vue&type=template&id=5b7d92bd +// 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/CorePluginsAdmin/vue/src/FormField/FormField.vue?vue&type=template&id=a7d809c8 function 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 _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -200,17 +200,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { class: "form-description" }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formField.description), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.formField.description]]), _ctx.formField.inlineHelp ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", _hoisted_4, null, 512)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Default')) + ": ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.defaultValuePrettyTruncated), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showDefaultValue]])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2)], 512)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showField]]); } -// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FormField.vue?vue&type=template&id=5b7d92bd +// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FormField.vue?vue&type=template&id=a7d809c8 -// 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/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue?vue&type=template&id=16b4705b +// 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/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue?vue&type=template&id=4a0aa5c3 -var FieldCheckboxvue_type_template_id_16b4705b_hoisted_1 = { +var FieldCheckboxvue_type_template_id_4a0aa5c3_hoisted_1 = { class: "checkbox" }; -var FieldCheckboxvue_type_template_id_16b4705b_hoisted_2 = ["checked", "id", "name"]; -var FieldCheckboxvue_type_template_id_16b4705b_hoisted_3 = ["innerHTML"]; -function FieldCheckboxvue_type_template_id_16b4705b_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_["createElementBlock"])("div", FieldCheckboxvue_type_template_id_16b4705b_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({ +var FieldCheckboxvue_type_template_id_4a0aa5c3_hoisted_2 = ["checked", "id", "name"]; +var FieldCheckboxvue_type_template_id_4a0aa5c3_hoisted_3 = ["innerHTML"]; +function FieldCheckboxvue_type_template_id_4a0aa5c3_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_["createElementBlock"])("div", FieldCheckboxvue_type_template_id_4a0aa5c3_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({ onChange: _cache[0] || (_cache[0] = function ($event) { return _ctx.onChange($event); }) @@ -220,13 +220,13 @@ function FieldCheckboxvue_type_template_id_16b4705b_render(_ctx, _cache, $props, type: "checkbox", id: _ctx.name, name: _ctx.name - }), null, 16, FieldCheckboxvue_type_template_id_16b4705b_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }), null, 16, FieldCheckboxvue_type_template_id_4a0aa5c3_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { innerHTML: _ctx.$sanitize(_ctx.title) - }, null, 8, FieldCheckboxvue_type_template_id_16b4705b_hoisted_3)])]); + }, null, 8, FieldCheckboxvue_type_template_id_4a0aa5c3_hoisted_3)])]); } -// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue?vue&type=template&id=16b4705b +// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue?vue&type=template&id=4a0aa5c3 -// 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/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue?vue&type=script&lang=ts /* harmony default export */ var FieldCheckboxvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { @@ -251,13 +251,13 @@ function FieldCheckboxvue_type_template_id_16b4705b_render(_ctx, _cache, $props, -FieldCheckboxvue_type_script_lang_ts.render = FieldCheckboxvue_type_template_id_16b4705b_render +FieldCheckboxvue_type_script_lang_ts.render = FieldCheckboxvue_type_template_id_4a0aa5c3_render /* harmony default export */ var FieldCheckbox = (FieldCheckboxvue_type_script_lang_ts); -// 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/CorePluginsAdmin/vue/src/FormField/FieldCheckboxArray.vue?vue&type=template&id=5700b1f7 +// 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/CorePluginsAdmin/vue/src/FormField/FieldCheckboxArray.vue?vue&type=template&id=b01b8bfc -var FieldCheckboxArrayvue_type_template_id_5700b1f7_hoisted_1 = ["value", "checked", "onChange", "id", "name"]; -function FieldCheckboxArrayvue_type_template_id_5700b1f7_render(_ctx, _cache, $props, $setup, $data, $options) { +var FieldCheckboxArrayvue_type_template_id_b01b8bfc_hoisted_1 = ["value", "checked", "onChange", "id", "name"]; +function FieldCheckboxArrayvue_type_template_id_b01b8bfc_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_["createElementBlock"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", { class: "fieldRadioTitle" }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.title), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.title]]), (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.availableOptions, function (checkboxModel, $index) { @@ -274,14 +274,14 @@ function FieldCheckboxArrayvue_type_template_id_5700b1f7_render(_ctx, _cache, $p type: "checkbox", id: "".concat(_ctx.name).concat(checkboxModel.key), name: checkboxModel.name - }), null, 16, FieldCheckboxArrayvue_type_template_id_5700b1f7_hoisted_1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(checkboxModel.value), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }), null, 16, FieldCheckboxArrayvue_type_template_id_b01b8bfc_hoisted_1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(checkboxModel.value), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "form-description" }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(checkboxModel.description), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], checkboxModel.description]])])]); }), 128))]); } -// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckboxArray.vue?vue&type=template&id=5700b1f7 +// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckboxArray.vue?vue&type=template&id=b01b8bfc -// 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/CorePluginsAdmin/vue/src/FormField/FieldCheckboxArray.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldCheckboxArray.vue?vue&type=script&lang=ts function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } @@ -304,7 +304,7 @@ function getCheckboxStates(availableOptions, modelValue) { /* harmony default export */ var FieldCheckboxArrayvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { - modelValue: Object, + modelValue: Array, name: String, title: String, availableOptions: Array, @@ -326,8 +326,9 @@ function getCheckboxStates(availableOptions, modelValue) { var checkboxStates = _toConsumableArray(this.checkboxStates); checkboxStates[changedIndex] = !checkboxStates[changedIndex]; + var availableOptions = this.availableOptions || {}; var newValue = []; - Object.values(this.availableOptions).forEach(function (option, index) { + Object.values(availableOptions).forEach(function (option, index) { if (checkboxStates[index]) { newValue.push(option.key); } @@ -342,16 +343,16 @@ function getCheckboxStates(availableOptions, modelValue) { -FieldCheckboxArrayvue_type_script_lang_ts.render = FieldCheckboxArrayvue_type_template_id_5700b1f7_render +FieldCheckboxArrayvue_type_script_lang_ts.render = FieldCheckboxArrayvue_type_template_id_b01b8bfc_render /* harmony default export */ var FieldCheckboxArray = (FieldCheckboxArrayvue_type_script_lang_ts); -// 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/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue?vue&type=template&id=08a6705c +// 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/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue?vue&type=template&id=674e15fa -var FieldExpandableSelectvue_type_template_id_08a6705c_hoisted_1 = { +var FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_1 = { class: "expandableSelector" }; -var FieldExpandableSelectvue_type_template_id_08a6705c_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("svg", { +var FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("svg", { class: "caret", height: "24", viewBox: "0 0 24 24", @@ -364,11 +365,11 @@ var FieldExpandableSelectvue_type_template_id_08a6705c_hoisted_2 = /*#__PURE__*/ fill: "none" })], -1); -var FieldExpandableSelectvue_type_template_id_08a6705c_hoisted_3 = ["value"]; -var FieldExpandableSelectvue_type_template_id_08a6705c_hoisted_4 = { +var FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_3 = ["value"]; +var FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_4 = { class: "expandableList z-depth-2" }; -var FieldExpandableSelectvue_type_template_id_08a6705c_hoisted_5 = { +var FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_5 = { class: "searchContainer" }; var _hoisted_6 = { @@ -383,22 +384,22 @@ var _hoisted_10 = { class: "primary-content" }; var _hoisted_11 = ["title"]; -function FieldExpandableSelectvue_type_template_id_08a6705c_render(_ctx, _cache, $props, $setup, $data, $options) { +function FieldExpandableSelectvue_type_template_id_674e15fa_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", FieldExpandableSelectvue_type_template_id_08a6705c_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { + 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", FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { onClick: _cache[0] || (_cache[0] = function ($event) { return _ctx.showSelect = !_ctx.showSelect; }), class: "select-wrapper" - }, [FieldExpandableSelectvue_type_template_id_08a6705c_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, [FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "text", class: "select-dropdown", readonly: "readonly", value: _ctx.modelValueText - }, null, 8, FieldExpandableSelectvue_type_template_id_08a6705c_hoisted_3)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FieldExpandableSelectvue_type_template_id_08a6705c_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FieldExpandableSelectvue_type_template_id_08a6705c_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_3)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "text", placeholder: "Search", "onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) { @@ -439,13 +440,18 @@ function FieldExpandableSelectvue_type_template_id_08a6705c_render(_ctx, _cache, blur: _ctx.onBlur }]]); } -// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue?vue&type=template&id=08a6705c +// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue?vue&type=template&id=674e15fa -// 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/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue?vue&type=script&lang=ts function getAvailableOptions(availableValues) { var flatValues = []; + + if (!availableValues) { + return flatValues; + } + var groups = {}; Object.values(availableValues).forEach(function (uncastedValue) { var value = uncastedValue; @@ -502,8 +508,9 @@ function getAvailableOptions(availableValues) { } var key = this.modelValue; + var availableOptions = this.availableOptions || []; var keyItem; - (this.availableOptions || []).some(function (option) { + availableOptions.some(function (option) { keyItem = option.values.find(function (item) { return item.key === key; }); @@ -511,10 +518,10 @@ function getAvailableOptions(availableValues) { }); if (keyItem) { - return keyItem.value.toString(); + return keyItem.value ? "".concat(keyItem.value) : ''; } - return key; + return key ? "".concat(key) : ''; } }, methods: { @@ -540,7 +547,7 @@ function getAvailableOptions(availableValues) { -FieldExpandableSelectvue_type_script_lang_ts.render = FieldExpandableSelectvue_type_template_id_08a6705c_render +FieldExpandableSelectvue_type_script_lang_ts.render = FieldExpandableSelectvue_type_template_id_674e15fa_render /* harmony default export */ var FieldExpandableSelect = (FieldExpandableSelectvue_type_script_lang_ts); // 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/CorePluginsAdmin/vue/src/FormField/FieldFieldArray.vue?vue&type=template&id=19925759 @@ -563,7 +570,7 @@ function FieldFieldArrayvue_type_template_id_19925759_render(_ctx, _cache, $prop } // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldFieldArray.vue?vue&type=template&id=19925759 -// 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/CorePluginsAdmin/vue/src/FormField/FieldFieldArray.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldFieldArray.vue?vue&type=script&lang=ts /* harmony default export */ var FieldFieldArrayvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ @@ -593,22 +600,22 @@ function FieldFieldArrayvue_type_template_id_19925759_render(_ctx, _cache, $prop FieldFieldArrayvue_type_script_lang_ts.render = FieldFieldArrayvue_type_template_id_19925759_render /* harmony default export */ var FieldFieldArray = (FieldFieldArrayvue_type_script_lang_ts); -// 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/CorePluginsAdmin/vue/src/FormField/FieldFile.vue?vue&type=template&id=244b301c +// 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/CorePluginsAdmin/vue/src/FormField/FieldFile.vue?vue&type=template&id=c77b7350 -var FieldFilevue_type_template_id_244b301c_hoisted_1 = { +var FieldFilevue_type_template_id_c77b7350_hoisted_1 = { class: "btn" }; -var FieldFilevue_type_template_id_244b301c_hoisted_2 = ["for", "innerHTML"]; -var FieldFilevue_type_template_id_244b301c_hoisted_3 = ["name", "id"]; -var FieldFilevue_type_template_id_244b301c_hoisted_4 = { +var FieldFilevue_type_template_id_c77b7350_hoisted_2 = ["for", "innerHTML"]; +var FieldFilevue_type_template_id_c77b7350_hoisted_3 = ["name", "id"]; +var FieldFilevue_type_template_id_c77b7350_hoisted_4 = { class: "file-path-wrapper" }; -var FieldFilevue_type_template_id_244b301c_hoisted_5 = ["value"]; -function FieldFilevue_type_template_id_244b301c_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_["createElementBlock"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FieldFilevue_type_template_id_244b301c_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var FieldFilevue_type_template_id_c77b7350_hoisted_5 = ["value"]; +function FieldFilevue_type_template_id_c77b7350_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_["createElementBlock"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FieldFilevue_type_template_id_c77b7350_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { for: _ctx.name, innerHTML: _ctx.$sanitize(_ctx.title) - }, null, 8, FieldFilevue_type_template_id_244b301c_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, FieldFilevue_type_template_id_c77b7350_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { ref: "fileInput", name: _ctx.name, type: "file", @@ -616,15 +623,15 @@ function FieldFilevue_type_template_id_244b301c_render(_ctx, _cache, $props, $se onChange: _cache[0] || (_cache[0] = function ($event) { return _ctx.onChange($event); }) - }, null, 40, FieldFilevue_type_template_id_244b301c_hoisted_3)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FieldFilevue_type_template_id_244b301c_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 40, FieldFilevue_type_template_id_c77b7350_hoisted_3)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FieldFilevue_type_template_id_c77b7350_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { class: "file-path validate", value: _ctx.modelValue, type: "text" - }, null, 8, FieldFilevue_type_template_id_244b301c_hoisted_5)])]); + }, null, 8, FieldFilevue_type_template_id_c77b7350_hoisted_5)])]); } -// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldFile.vue?vue&type=template&id=244b301c +// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldFile.vue?vue&type=template&id=c77b7350 -// 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/CorePluginsAdmin/vue/src/FormField/FieldFile.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldFile.vue?vue&type=script&lang=ts /* harmony default export */ var FieldFilevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { @@ -650,7 +657,13 @@ function FieldFilevue_type_template_id_244b301c_render(_ctx, _cache, $props, $se }, methods: { onChange: function onChange(event) { - var file = event.target.files.item(0); + var files = event.target.files; + + if (!files) { + return; + } + + var file = files.item(0); this.$emit('update:modelValue', file); } } @@ -661,7 +674,7 @@ function FieldFilevue_type_template_id_244b301c_render(_ctx, _cache, $props, $se -FieldFilevue_type_script_lang_ts.render = FieldFilevue_type_template_id_244b301c_render +FieldFilevue_type_script_lang_ts.render = FieldFilevue_type_template_id_c77b7350_render /* harmony default export */ var FieldFile = (FieldFilevue_type_script_lang_ts); // 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/CorePluginsAdmin/vue/src/FormField/FieldHidden.vue?vue&type=template&id=20e3ce54 @@ -679,7 +692,7 @@ function FieldHiddenvue_type_template_id_20e3ce54_render(_ctx, _cache, $props, $ } // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldHidden.vue?vue&type=template&id=20e3ce54 -// 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/CorePluginsAdmin/vue/src/FormField/FieldHidden.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldHidden.vue?vue&type=script&lang=ts /* harmony default export */ var FieldHiddenvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { @@ -728,7 +741,7 @@ function FieldMultituplevue_type_template_id_7469c188_render(_ctx, _cache, $prop } // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldMultituple.vue?vue&type=template&id=7469c188 -// 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/CorePluginsAdmin/vue/src/FormField/FieldMultituple.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldMultituple.vue?vue&type=script&lang=ts /* harmony default export */ var FieldMultituplevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ @@ -782,7 +795,7 @@ function FieldNumbervue_type_template_id_7aed93b6_render(_ctx, _cache, $props, $ } // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldNumber.vue?vue&type=template&id=7aed93b6 -// 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/CorePluginsAdmin/vue/src/FormField/FieldNumber.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldNumber.vue?vue&type=script&lang=ts /* harmony default export */ var FieldNumbervue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ @@ -852,7 +865,7 @@ function FieldRadiovue_type_template_id_e73c5bb0_render(_ctx, _cache, $props, $s } // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldRadio.vue?vue&type=template&id=e73c5bb0 -// 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/CorePluginsAdmin/vue/src/FormField/FieldRadio.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldRadio.vue?vue&type=script&lang=ts /* harmony default export */ var FieldRadiovue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { @@ -880,37 +893,37 @@ function FieldRadiovue_type_template_id_e73c5bb0_render(_ctx, _cache, $props, $s FieldRadiovue_type_script_lang_ts.render = FieldRadiovue_type_template_id_e73c5bb0_render /* harmony default export */ var FieldRadio = (FieldRadiovue_type_script_lang_ts); -// 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/CorePluginsAdmin/vue/src/FormField/FieldSelect.vue?vue&type=template&id=6e643bd9 -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || FieldSelectvue_type_template_id_6e643bd9_unsupportedIterableToArray(arr, i) || _nonIterableRest(); } +// 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/CorePluginsAdmin/vue/src/FormField/FieldSelect.vue?vue&type=template&id=b3b83f84 +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || FieldSelectvue_type_template_id_b3b83f84_unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { 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 FieldSelectvue_type_template_id_6e643bd9_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return FieldSelectvue_type_template_id_6e643bd9_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return FieldSelectvue_type_template_id_6e643bd9_arrayLikeToArray(o, minLen); } +function FieldSelectvue_type_template_id_b3b83f84_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return FieldSelectvue_type_template_id_b3b83f84_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return FieldSelectvue_type_template_id_b3b83f84_arrayLikeToArray(o, minLen); } -function FieldSelectvue_type_template_id_6e643bd9_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } +function FieldSelectvue_type_template_id_b3b83f84_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -var FieldSelectvue_type_template_id_6e643bd9_hoisted_1 = { +var FieldSelectvue_type_template_id_b3b83f84_hoisted_1 = { key: 0, class: "matomo-field-select" }; -var FieldSelectvue_type_template_id_6e643bd9_hoisted_2 = ["multiple", "name"]; -var FieldSelectvue_type_template_id_6e643bd9_hoisted_3 = ["label"]; -var FieldSelectvue_type_template_id_6e643bd9_hoisted_4 = ["value", "selected", "disabled"]; -var FieldSelectvue_type_template_id_6e643bd9_hoisted_5 = ["for", "innerHTML"]; -var FieldSelectvue_type_template_id_6e643bd9_hoisted_6 = { +var FieldSelectvue_type_template_id_b3b83f84_hoisted_2 = ["multiple", "name"]; +var FieldSelectvue_type_template_id_b3b83f84_hoisted_3 = ["label"]; +var FieldSelectvue_type_template_id_b3b83f84_hoisted_4 = ["value", "selected", "disabled"]; +var FieldSelectvue_type_template_id_b3b83f84_hoisted_5 = ["for", "innerHTML"]; +var FieldSelectvue_type_template_id_b3b83f84_hoisted_6 = { key: 1, class: "matomo-field-select" }; -var FieldSelectvue_type_template_id_6e643bd9_hoisted_7 = ["multiple", "name"]; -var FieldSelectvue_type_template_id_6e643bd9_hoisted_8 = ["value", "selected", "disabled"]; -var FieldSelectvue_type_template_id_6e643bd9_hoisted_9 = ["for", "innerHTML"]; -function FieldSelectvue_type_template_id_6e643bd9_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_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, [_ctx.groupedOptions ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FieldSelectvue_type_template_id_6e643bd9_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("select", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({ +var FieldSelectvue_type_template_id_b3b83f84_hoisted_7 = ["multiple", "name"]; +var FieldSelectvue_type_template_id_b3b83f84_hoisted_8 = ["value", "selected", "disabled"]; +var FieldSelectvue_type_template_id_b3b83f84_hoisted_9 = ["for", "innerHTML"]; +function FieldSelectvue_type_template_id_b3b83f84_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_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, [_ctx.groupedOptions ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FieldSelectvue_type_template_id_b3b83f84_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("select", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({ ref: "select", class: "grouped", multiple: _ctx.multiple, @@ -932,12 +945,12 @@ function FieldSelectvue_type_template_id_6e643bd9_render(_ctx, _cache, $props, $ value: "string:".concat(option.key), selected: _ctx.multiple ? _ctx.modelValue && _ctx.modelValue.indexOf(option.key) !== -1 : _ctx.modelValue === option.key, disabled: option.disabled - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(option.value), 9, FieldSelectvue_type_template_id_6e643bd9_hoisted_4); - }), 128))], 8, FieldSelectvue_type_template_id_6e643bd9_hoisted_3); - }), 128))], 16, FieldSelectvue_type_template_id_6e643bd9_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(option.value), 9, FieldSelectvue_type_template_id_b3b83f84_hoisted_4); + }), 128))], 8, FieldSelectvue_type_template_id_b3b83f84_hoisted_3); + }), 128))], 16, FieldSelectvue_type_template_id_b3b83f84_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", { for: _ctx.name, innerHTML: _ctx.title - }, null, 8, FieldSelectvue_type_template_id_6e643bd9_hoisted_5)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.groupedOptions && _ctx.options ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FieldSelectvue_type_template_id_6e643bd9_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("select", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({ + }, null, 8, FieldSelectvue_type_template_id_b3b83f84_hoisted_5)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.groupedOptions && _ctx.options ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FieldSelectvue_type_template_id_b3b83f84_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("select", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({ class: "ungrouped", ref: "select", multiple: _ctx.multiple, @@ -951,15 +964,15 @@ function FieldSelectvue_type_template_id_6e643bd9_render(_ctx, _cache, $props, $ value: "string:".concat(option.key), selected: _ctx.multiple ? _ctx.modelValue && _ctx.modelValue.indexOf(option.key) !== -1 : _ctx.modelValue === option.key, disabled: option.disabled - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(option.value), 9, FieldSelectvue_type_template_id_6e643bd9_hoisted_8); - }), 128))], 16, FieldSelectvue_type_template_id_6e643bd9_hoisted_7), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(option.value), 9, FieldSelectvue_type_template_id_b3b83f84_hoisted_8); + }), 128))], 16, FieldSelectvue_type_template_id_b3b83f84_hoisted_7), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", { for: _ctx.name, innerHTML: _ctx.title - }, null, 8, FieldSelectvue_type_template_id_6e643bd9_hoisted_9)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 64); + }, null, 8, FieldSelectvue_type_template_id_b3b83f84_hoisted_9)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 64); } -// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldSelect.vue?vue&type=template&id=6e643bd9 +// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldSelect.vue?vue&type=template&id=b3b83f84 -// 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/CorePluginsAdmin/vue/src/FormField/FieldSelect.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldSelect.vue?vue&type=script&lang=ts function FieldSelectvue_type_script_lang_ts_toConsumableArray(arr) { return FieldSelectvue_type_script_lang_ts_arrayWithoutHoles(arr) || FieldSelectvue_type_script_lang_ts_iterableToArray(arr) || FieldSelectvue_type_script_lang_ts_unsupportedIterableToArray(arr) || FieldSelectvue_type_script_lang_ts_nonIterableSpread(); } function FieldSelectvue_type_script_lang_ts_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } @@ -996,7 +1009,7 @@ function initMaterialSelect(select, modelValue, placeholder) { Array.from(select.options).forEach(function (opt) { if (multiple) { - opt.selected = modelValue && modelValue.indexOf(opt.value.replace(/^string:/, '')) !== -1; + opt.selected = !!modelValue && modelValue.indexOf(opt.value.replace(/^string:/, '')) !== -1; } else { opt.selected = "string:".concat(modelValue) === opt.value; } @@ -1051,7 +1064,7 @@ function FieldSelectvue_type_script_lang_ts_getAvailableOptions(givenAvailableVa valueObjKey = _ref4[0], value = _ref4[1]; - if (_typeof(value) === 'object' && typeof value.key !== 'undefined') { + if (value && _typeof(value) === 'object' && typeof value.key !== 'undefined') { flatValues.push(value); return; } @@ -1070,7 +1083,7 @@ function FieldSelectvue_type_script_lang_ts_getAvailableOptions(givenAvailableVa }); }); // for selects w/ a placeholder, add an option to unset the select - if (uiControlAttributes.placeholder && !hasOption(flatValues, '')) { + if (uiControlAttributes !== null && uiControlAttributes !== void 0 && uiControlAttributes.placeholder && !hasOption(flatValues, '')) { return [{ key: '', value: '' @@ -1104,30 +1117,34 @@ function handleOldAngularJsValues(value) { options: function options() { // if modelValue is empty, but there is no empty value allowed in availableOptions, // add one temporarily until something is set - if (this.availableOptions && !hasOption(this.availableOptions, '') && (typeof this.modelValue === 'undefined' || this.modelValue === null || this.modelValue === '')) { + var availableOptions = this.availableOptions; + + if (availableOptions && !hasOption(availableOptions, '') && (typeof this.modelValue === 'undefined' || this.modelValue === null || this.modelValue === '')) { return [{ key: '', value: this.modelValue, group: this.hasGroups ? '' : undefined - }].concat(FieldSelectvue_type_script_lang_ts_toConsumableArray(this.availableOptions)); + }].concat(FieldSelectvue_type_script_lang_ts_toConsumableArray(availableOptions)); } - return this.availableOptions; + return availableOptions; }, hasGroups: function hasGroups() { var availableOptions = this.availableOptions; return availableOptions && availableOptions[0] && typeof availableOptions[0].group !== 'undefined'; }, groupedOptions: function groupedOptions() { - if (!this.hasGroups) { + var options = this.options; + + if (!this.hasGroups || !options) { return null; } - var options = this.options; var groups = {}; options.forEach(function (entry) { - groups[entry.group] = groups[entry.group] || []; - groups[entry.group].push(entry); + var group = entry.group; + groups[group] = groups[group] || []; + groups[group].push(entry); }); var result = Object.entries(groups); result.sort(function (lhs, rhs) { @@ -1157,7 +1174,9 @@ function handleOldAngularJsValues(value) { }).map(function (e) { return e.value; }); - newValue = newValue.map(handleOldAngularJsValues); + newValue = newValue.map(function (x) { + return handleOldAngularJsValues(x); + }); } else { newValue = element.value; newValue = handleOldAngularJsValues(newValue); @@ -1177,7 +1196,9 @@ function handleOldAngularJsValues(value) { window.$(this.$refs.select).val(newVal); setTimeout(function () { - initMaterialSelect(_this2.$refs.select, newVal, _this2.uiControlAttributes.placeholder, _this2.uiControlOptions, _this2.multiple); + var _this2$uiControlAttri; + + initMaterialSelect(_this2.$refs.select, newVal, (_this2$uiControlAttri = _this2.uiControlAttributes) === null || _this2$uiControlAttri === void 0 ? void 0 : _this2$uiControlAttri.placeholder, _this2.uiControlOptions, _this2.multiple); }); } }, @@ -1191,7 +1212,9 @@ function handleOldAngularJsValues(value) { setTimeout(function () { if (newVal !== oldVal) { - initMaterialSelect(_this3.$refs.select, _this3.modelValue, _this3.uiControlAttributes.placeholder, _this3.uiControlOptions, _this3.multiple); + var _this3$uiControlAttri; + + initMaterialSelect(_this3.$refs.select, _this3.modelValue, (_this3$uiControlAttri = _this3.uiControlAttributes) === null || _this3$uiControlAttri === void 0 ? void 0 : _this3$uiControlAttri.placeholder, _this3.uiControlOptions, _this3.multiple); } }); } @@ -1201,7 +1224,9 @@ function handleOldAngularJsValues(value) { if (newVal !== oldVal) { setTimeout(function () { - initMaterialSelect(_this4.$refs.select, _this4.modelValue, _this4.uiControlAttributes.placeholder, _this4.uiControlOptions, _this4.multiple); + var _this4$uiControlAttri; + + initMaterialSelect(_this4.$refs.select, _this4.modelValue, (_this4$uiControlAttri = _this4.uiControlAttributes) === null || _this4$uiControlAttri === void 0 ? void 0 : _this4$uiControlAttri.placeholder, _this4.uiControlOptions, _this4.multiple); }); } } @@ -1210,7 +1235,9 @@ function handleOldAngularJsValues(value) { var _this5 = this; setTimeout(function () { - initMaterialSelect(_this5.$refs.select, _this5.modelValue, _this5.uiControlAttributes.placeholder, _this5.uiControlOptions, _this5.multiple); + var _this5$uiControlAttri; + + initMaterialSelect(_this5.$refs.select, _this5.modelValue, (_this5$uiControlAttri = _this5.uiControlAttributes) === null || _this5$uiControlAttri === void 0 ? void 0 : _this5$uiControlAttri.placeholder, _this5.uiControlOptions, _this5.multiple); }); } })); @@ -1220,23 +1247,23 @@ function handleOldAngularJsValues(value) { -FieldSelectvue_type_script_lang_ts.render = FieldSelectvue_type_template_id_6e643bd9_render +FieldSelectvue_type_script_lang_ts.render = FieldSelectvue_type_template_id_b3b83f84_render /* harmony default export */ var FieldSelect = (FieldSelectvue_type_script_lang_ts); -// 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/CorePluginsAdmin/vue/src/FormField/FieldSite.vue?vue&type=template&id=72faf58c +// 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/CorePluginsAdmin/vue/src/FormField/FieldSite.vue?vue&type=template&id=50ac73cc -var FieldSitevue_type_template_id_72faf58c_hoisted_1 = ["for", "innerHTML"]; -var FieldSitevue_type_template_id_72faf58c_hoisted_2 = { +var FieldSitevue_type_template_id_50ac73cc_hoisted_1 = ["for", "innerHTML"]; +var FieldSitevue_type_template_id_50ac73cc_hoisted_2 = { class: "sites_autocomplete" }; -function FieldSitevue_type_template_id_72faf58c_render(_ctx, _cache, $props, $setup, $data, $options) { +function FieldSitevue_type_template_id_50ac73cc_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_SiteSelector = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SiteSelector"); return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", { for: _ctx.name, class: "siteSelectorLabel", innerHTML: _ctx.$sanitize(_ctx.title) - }, null, 8, FieldSitevue_type_template_id_72faf58c_hoisted_1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FieldSitevue_type_template_id_72faf58c_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_SiteSelector, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({ + }, null, 8, FieldSitevue_type_template_id_50ac73cc_hoisted_1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FieldSitevue_type_template_id_50ac73cc_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_SiteSelector, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({ "model-value": _ctx.modelValue, "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) { return _ctx.onChange($event); @@ -1248,9 +1275,9 @@ function FieldSitevue_type_template_id_72faf58c_render(_ctx, _cache, $props, $se "only-sites-with-admin-access": _ctx.uiControlAttributes.onlySitesWithAdminAccess || false }, _ctx.uiControlAttributes), null, 16, ["model-value", "id", "show-all-sites-item", "only-sites-with-admin-access"])])]); } -// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldSite.vue?vue&type=template&id=72faf58c +// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldSite.vue?vue&type=template&id=50ac73cc -// 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/CorePluginsAdmin/vue/src/FormField/FieldSite.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldSite.vue?vue&type=script&lang=ts /* harmony default export */ var FieldSitevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ @@ -1277,7 +1304,7 @@ function FieldSitevue_type_template_id_72faf58c_render(_ctx, _cache, $props, $se -FieldSitevue_type_script_lang_ts.render = FieldSitevue_type_template_id_72faf58c_render +FieldSitevue_type_script_lang_ts.render = FieldSitevue_type_template_id_50ac73cc_render /* harmony default export */ var FieldSite = (FieldSitevue_type_script_lang_ts); // 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/CorePluginsAdmin/vue/src/FormField/FieldText.vue?vue&type=template&id=9ea16160 @@ -1304,7 +1331,7 @@ function FieldTextvue_type_template_id_9ea16160_render(_ctx, _cache, $props, $se } // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldText.vue?vue&type=template&id=9ea16160 -// 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/CorePluginsAdmin/vue/src/FormField/FieldText.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldText.vue?vue&type=script&lang=ts /* harmony default export */ var FieldTextvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ @@ -1380,7 +1407,7 @@ function FieldTextArrayvue_type_template_id_4c574e6f_render(_ctx, _cache, $props } // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldTextArray.vue?vue&type=template&id=4c574e6f -// 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/CorePluginsAdmin/vue/src/FormField/FieldTextArray.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldTextArray.vue?vue&type=script&lang=ts /* harmony default export */ var FieldTextArrayvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ @@ -1449,7 +1476,7 @@ function FieldTextareavue_type_template_id_09f09fdb_render(_ctx, _cache, $props, } // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldTextarea.vue?vue&type=template&id=09f09fdb -// 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/CorePluginsAdmin/vue/src/FormField/FieldTextarea.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldTextarea.vue?vue&type=script&lang=ts /* harmony default export */ var FieldTextareavue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ @@ -1497,15 +1524,15 @@ function FieldTextareavue_type_template_id_09f09fdb_render(_ctx, _cache, $props, FieldTextareavue_type_script_lang_ts.render = FieldTextareavue_type_template_id_09f09fdb_render /* harmony default export */ var FieldTextarea = (FieldTextareavue_type_script_lang_ts); -// 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/CorePluginsAdmin/vue/src/FormField/FieldTextareaArray.vue?vue&type=template&id=08e1c1e3 +// 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/CorePluginsAdmin/vue/src/FormField/FieldTextareaArray.vue?vue&type=template&id=3eceefe6 -var FieldTextareaArrayvue_type_template_id_08e1c1e3_hoisted_1 = ["for", "innerHTML"]; -var FieldTextareaArrayvue_type_template_id_08e1c1e3_hoisted_2 = ["name", "value"]; -function FieldTextareaArrayvue_type_template_id_08e1c1e3_render(_ctx, _cache, $props, $setup, $data, $options) { +var FieldTextareaArrayvue_type_template_id_3eceefe6_hoisted_1 = ["for", "innerHTML"]; +var FieldTextareaArrayvue_type_template_id_3eceefe6_hoisted_2 = ["name", "value"]; +function FieldTextareaArrayvue_type_template_id_3eceefe6_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_["createElementBlock"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", { for: _ctx.name, innerHTML: _ctx.$sanitize(_ctx.title) - }, null, 8, FieldTextareaArrayvue_type_template_id_08e1c1e3_hoisted_1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("textarea", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({ + }, null, 8, FieldTextareaArrayvue_type_template_id_3eceefe6_hoisted_1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("textarea", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({ ref: "textarea", name: _ctx.name }, _ctx.uiControlAttributes, { @@ -1517,11 +1544,11 @@ function FieldTextareaArrayvue_type_template_id_08e1c1e3_render(_ctx, _cache, $p return _ctx.onKeydown($event); }), class: "materialize-textarea" - }), null, 16, FieldTextareaArrayvue_type_template_id_08e1c1e3_hoisted_2)]); + }), null, 16, FieldTextareaArrayvue_type_template_id_3eceefe6_hoisted_2)]); } -// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldTextareaArray.vue?vue&type=template&id=08e1c1e3 +// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldTextareaArray.vue?vue&type=template&id=3eceefe6 -// 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/CorePluginsAdmin/vue/src/FormField/FieldTextareaArray.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldTextareaArray.vue?vue&type=script&lang=ts var SEPARATOR = '\n'; @@ -1585,7 +1612,7 @@ var SEPARATOR = '\n'; -FieldTextareaArrayvue_type_script_lang_ts.render = FieldTextareaArrayvue_type_template_id_08e1c1e3_render +FieldTextareaArrayvue_type_script_lang_ts.render = FieldTextareaArrayvue_type_template_id_3eceefe6_render /* harmony default export */ var FieldTextareaArray = (FieldTextareaArrayvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/utilities.ts @@ -1620,7 +1647,7 @@ function processCheckboxAndRadioAvailableValues(availableValues, type) { valueObjKey = _ref2[0], value = _ref2[1]; - if (utilities_typeof(value) === 'object' && typeof value.key !== 'undefined') { + if (value && utilities_typeof(value) === 'object' && typeof value.key !== 'undefined') { flatValues.push(value); return; } @@ -1638,7 +1665,7 @@ function processCheckboxAndRadioAvailableValues(availableValues, type) { }); return flatValues; } -// 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/CorePluginsAdmin/vue/src/FormField/FormField.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FormField.vue?vue&type=script&lang=ts function FormFieldvue_type_script_lang_ts_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { FormFieldvue_type_script_lang_ts_typeof = function _typeof(obj) { return typeof obj; }; } else { FormFieldvue_type_script_lang_ts_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return FormFieldvue_type_script_lang_ts_typeof(obj); } @@ -1713,14 +1740,18 @@ var CONTROL_TO_AVAILABLE_OPTION_PROCESSOR = { var setInlineHelp = function setInlineHelp(newVal) { var toAppend; - if (!newVal) { + if (!newVal || !inlineHelpNode.value) { return; } - if (typeof newVal === 'string' && newVal && newVal.indexOf('#') === 0) { - toAppend = window.$(newVal); + if (typeof newVal === 'string') { + if (newVal.indexOf('#') === 0) { + toAppend = window.$(newVal); + } else { + toAppend = window.vueSanitize(newVal); + } } else { - toAppend = window.vueSanitize(newVal); + toAppend = newVal; } window.$(inlineHelpNode.value).html('').append(toAppend); @@ -1738,11 +1769,13 @@ var CONTROL_TO_AVAILABLE_OPTION_PROCESSOR = { }, computed: { childComponent: function childComponent() { - if (this.formField.component) { - return this.formField.component; + var formField = this.formField; + + if (formField.component) { + return formField.component; } - var uiControl = this.formField.uiControl; + var uiControl = formField.uiControl; var control = CONTROL_TO_COMPONENT_MAP[uiControl]; if (TEXT_CONTROLS.indexOf(uiControl) !== -1) { @@ -1799,14 +1832,19 @@ var CONTROL_TO_AVAILABLE_OPTION_PROCESSOR = { var defaultValue = this.formField.defaultValue; if (Array.isArray(defaultValue)) { - defaultValue = defaultValue.join(','); + return defaultValue.join(','); } return defaultValue; }, availableOptions: function availableOptions() { - var childComponent = this.childComponent, - formField = this.formField; + var childComponent = this.childComponent; + + if (typeof childComponent !== 'string') { + return null; + } + + var formField = this.formField; if (!formField.availableValues || !CONTROL_TO_AVAILABLE_OPTION_PROCESSOR[childComponent]) { return null; @@ -1815,7 +1853,8 @@ var CONTROL_TO_AVAILABLE_OPTION_PROCESSOR = { return CONTROL_TO_AVAILABLE_OPTION_PROCESSOR[childComponent](formField.availableValues, formField.type, formField.uiControlAttributes); }, defaultValuePretty: function defaultValuePretty() { - var defaultValue = this.formField.defaultValue; + var formField = this.formField; + var defaultValue = formField.defaultValue; var availableOptions = this.availableOptions; if (typeof defaultValue === 'string' && defaultValue) { @@ -1837,7 +1876,7 @@ var CONTROL_TO_AVAILABLE_OPTION_PROCESSOR = { return ''; } - return defaultValue ? defaultValue.toString() : ''; + return defaultValue ? "".concat(defaultValue) : ''; } var prettyValues = []; @@ -1847,7 +1886,7 @@ var CONTROL_TO_AVAILABLE_OPTION_PROCESSOR = { } (availableOptions || []).forEach(function (value) { - if (defaultValue.indexOf(value.key) !== -1 && typeof value.value !== 'undefined') { + if (typeof value.value !== 'undefined' && defaultValue.indexOf(value.key) !== -1) { prettyValues.push(value.value); } }); @@ -1872,17 +1911,17 @@ var CONTROL_TO_AVAILABLE_OPTION_PROCESSOR = { FormFieldvue_type_script_lang_ts.render = render /* harmony default export */ var FormField = (FormFieldvue_type_script_lang_ts); -// 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/CorePluginsAdmin/vue/src/FormField/FieldAngularJsTemplate.vue?vue&type=template&id=c535b064 +// 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/CorePluginsAdmin/vue/src/FormField/FieldAngularJsTemplate.vue?vue&type=template&id=3f63d972 -var FieldAngularJsTemplatevue_type_template_id_c535b064_hoisted_1 = { +var FieldAngularJsTemplatevue_type_template_id_3f63d972_hoisted_1 = { ref: "root" }; -function FieldAngularJsTemplatevue_type_template_id_c535b064_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_["createElementBlock"])("div", FieldAngularJsTemplatevue_type_template_id_c535b064_hoisted_1, null, 512); +function FieldAngularJsTemplatevue_type_template_id_3f63d972_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_["createElementBlock"])("div", FieldAngularJsTemplatevue_type_template_id_3f63d972_hoisted_1, null, 512); } -// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldAngularJsTemplate.vue?vue&type=template&id=c535b064 +// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldAngularJsTemplate.vue?vue&type=template&id=3f63d972 -// 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/CorePluginsAdmin/vue/src/FormField/FieldAngularJsTemplate.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/FormField/FieldAngularJsTemplate.vue?vue&type=script&lang=ts function FieldAngularJsTemplatevue_type_script_lang_ts_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 FieldAngularJsTemplatevue_type_script_lang_ts_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { FieldAngularJsTemplatevue_type_script_lang_ts_ownKeys(Object(source), true).forEach(function (key) { FieldAngularJsTemplatevue_type_script_lang_ts_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { FieldAngularJsTemplatevue_type_script_lang_ts_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -1903,8 +1942,14 @@ function clone(obj) { /* harmony default export */ var FieldAngularJsTemplatevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { modelValue: null, - formField: null, - templateFile: String + formField: { + type: null, + required: true + }, + templateFile: { + type: String, + required: true + } }, emits: ['update:modelValue'], inheritAttrs: false, @@ -1966,30 +2011,9 @@ function clone(obj) { -FieldAngularJsTemplatevue_type_script_lang_ts.render = FieldAngularJsTemplatevue_type_template_id_c535b064_render +FieldAngularJsTemplatevue_type_script_lang_ts.render = FieldAngularJsTemplatevue_type_template_id_3f63d972_render /* harmony default export */ var FieldAngularJsTemplate = (FieldAngularJsTemplatevue_type_script_lang_ts); -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/useExternalPluginComponent.ts -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -function useExternalPluginComponent(plugin, component) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineAsyncComponent"])(function () { - return new Promise(function (resolve) { - window.$(document).ready(function () { - if (window[plugin]) { - resolve(window[plugin][component]); - } else { - resolve(null); // plugin not loaded - } - }); - }); - }); -} // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FormField.adapter.ts function FormField_adapter_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; } @@ -2008,7 +2032,6 @@ function FormField_adapter_defineProperty(obj, key, value) { if (key in obj) { O - function transformVueComponentRef(value) { if (!value) { return undefined; @@ -2021,8 +2044,9 @@ function transformVueComponentRef(value) { throw new Error('Invalid component property given to piwik-field directive, must be ' + '{plugin: \'...\',name: \'...\'}'); } - return useExternalPluginComponent(plugin, name); -} + return Object(external_CoreHome_["useExternalPluginComponent"])(plugin, name); +} // eslint-disable-next-line @typescript-eslint/no-explicit-any + function conditionFn(scope, condition) { var values = {}; @@ -2040,6 +2064,7 @@ function conditionFn(scope, condition) { component: FormField, scope: { modelValue: { + // eslint-disable-next-line @typescript-eslint/no-explicit-any default: function _default(scope) { var field = scope.piwikFormField; // vue components expect object data as input, so we parse JSON data // for angularjs directives that use JSON. @@ -2058,7 +2083,8 @@ function conditionFn(scope, condition) { piwikFormField: { vue: 'formField', angularJsBind: '=', - transform: function transform(value, vm, scope) { + transform: function transform(v, vm, scope) { + var value = v; return FormField_adapter_objectSpread(FormField_adapter_objectSpread({}, value), {}, { condition: value.condition ? conditionFn.bind(null, scope, value.condition) : value.condition, disabled: Object(external_CoreHome_["transformAngularJsBoolAttr"])(value.disabled), @@ -2105,9 +2131,9 @@ function conditionFn(scope, condition) { }, true); } })); -// 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/CorePluginsAdmin/vue/src/Field/Field.vue?vue&type=template&id=64bae462 +// 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/CorePluginsAdmin/vue/src/Field/Field.vue?vue&type=template&id=50f84412 -function Fieldvue_type_template_id_64bae462_render(_ctx, _cache, $props, $setup, $data, $options) { +function Fieldvue_type_template_id_50f84412_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_FormField = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("FormField"); return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_FormField, { @@ -2119,9 +2145,9 @@ function Fieldvue_type_template_id_64bae462_render(_ctx, _cache, $props, $setup, component: _ctx.component }, null, 8, ["form-field", "model-value", "component"]); } -// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/Field/Field.vue?vue&type=template&id=64bae462 +// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/Field/Field.vue?vue&type=template&id=50f84412 -// 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/CorePluginsAdmin/vue/src/Field/Field.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/Field/Field.vue?vue&type=script&lang=ts function Fieldvue_type_script_lang_ts_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 Fieldvue_type_script_lang_ts_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { Fieldvue_type_script_lang_ts_ownKeys(Object(source), true).forEach(function (key) { Fieldvue_type_script_lang_ts_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { Fieldvue_type_script_lang_ts_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -2184,8 +2210,10 @@ var UI_CONTROLS_TO_TYPE = { return this.varType; } - if (UI_CONTROLS_TO_TYPE[this.uicontrol]) { - return UI_CONTROLS_TO_TYPE[this.uicontrol]; + var uicontrol = this.uicontrol; + + if (uicontrol && UI_CONTROLS_TO_TYPE[uicontrol]) { + return UI_CONTROLS_TO_TYPE[uicontrol]; } return 'string'; @@ -2230,7 +2258,7 @@ var UI_CONTROLS_TO_TYPE = { -Fieldvue_type_script_lang_ts.render = Fieldvue_type_template_id_64bae462_render +Fieldvue_type_script_lang_ts.render = Fieldvue_type_template_id_50f84412_render /* harmony default export */ var Field = (Fieldvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/Field/Field.adapter.ts @@ -2284,6 +2312,7 @@ function handleJsonValue(value, varType, uiControl) { value: { vue: 'modelValue', angularJsBind: '@', + // eslint-disable-next-line @typescript-eslint/no-explicit-any transform: function transform(value, vm, scope) { // vue components expect object data as input, so we parse JSON data // for angularjs directives that use JSON. @@ -2326,15 +2355,13 @@ function handleJsonValue(value, varType, uiControl) { condition: { angularJsBind: '@', transform: function transform(value, vm, scope) { - var transformed = value; - - if (value) { - transformed = function transformed(values) { - return scope.$eval(value, values); - }; + if (!value) { + return undefined; } - return transformed; + return function (values) { + return scope.$eval(value, values); + }; } }, varType: { @@ -2377,9 +2404,10 @@ function handleJsonValue(value, varType, uiControl) { }, component: { angularJsBind: '<', + // eslint-disable-next-line @typescript-eslint/no-explicit-any transform: function transform(value, vm, scope) { if (!value) { - return value; + return undefined; } if (scope.templateFile) { @@ -2390,7 +2418,7 @@ function handleJsonValue(value, varType, uiControl) { name = value.name; if (!plugin || !name) { - throw new Error("Invalid component property given to piwik-field directive, must be {plugin: '...',name: '...'}"); + throw new Error('Invalid component property given to piwik-field directive, must ' + 'be {plugin: \'...\',name: \'...\'}'); } return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["shallowRef"])(Object(external_CoreHome_["useExternalPluginComponent"])(plugin, name)); @@ -2455,29 +2483,29 @@ function handleJsonValue(value, varType, uiControl) { } } })); -// 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/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue?vue&type=template&id=3c695dde +// 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/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue?vue&type=template&id=63599c19 -var PluginSettingsvue_type_template_id_3c695dde_hoisted_1 = { +var PluginSettingsvue_type_template_id_63599c19_hoisted_1 = { class: "pluginSettings", ref: "root" }; -var PluginSettingsvue_type_template_id_3c695dde_hoisted_2 = ["id"]; -var PluginSettingsvue_type_template_id_3c695dde_hoisted_3 = { +var PluginSettingsvue_type_template_id_63599c19_hoisted_2 = ["id"]; +var PluginSettingsvue_type_template_id_63599c19_hoisted_3 = { class: "card-content" }; -var PluginSettingsvue_type_template_id_3c695dde_hoisted_4 = ["id"]; -var PluginSettingsvue_type_template_id_3c695dde_hoisted_5 = ["onClick", "disabled", "value"]; -var PluginSettingsvue_type_template_id_3c695dde_hoisted_6 = { +var PluginSettingsvue_type_template_id_63599c19_hoisted_4 = ["id"]; +var PluginSettingsvue_type_template_id_63599c19_hoisted_5 = ["onClick", "disabled", "value"]; +var PluginSettingsvue_type_template_id_63599c19_hoisted_6 = { class: "confirm-password-modal modal" }; -var PluginSettingsvue_type_template_id_3c695dde_hoisted_7 = { +var PluginSettingsvue_type_template_id_63599c19_hoisted_7 = { class: "modal-content" }; -var PluginSettingsvue_type_template_id_3c695dde_hoisted_8 = { +var PluginSettingsvue_type_template_id_63599c19_hoisted_8 = { class: "modal-footer" }; -var PluginSettingsvue_type_template_id_3c695dde_hoisted_9 = ["disabled"]; -function PluginSettingsvue_type_template_id_3c695dde_render(_ctx, _cache, $props, $setup, $data, $options) { +var PluginSettingsvue_type_template_id_63599c19_hoisted_9 = ["disabled"]; +function PluginSettingsvue_type_template_id_63599c19_render(_ctx, _cache, $props, $setup, $data, $options) { var _this = this; var _component_PluginSetting = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("PluginSetting"); @@ -2486,15 +2514,15 @@ function PluginSettingsvue_type_template_id_3c695dde_render(_ctx, _cache, $props var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PluginSettingsvue_type_template_id_3c695dde_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.settingsPerPlugin, function (settings) { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PluginSettingsvue_type_template_id_63599c19_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.settingsPerPlugin, function (settings) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { class: "card", id: "".concat(settings.pluginName, "PluginSettings"), key: "".concat(settings.pluginName, "PluginSettings") - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PluginSettingsvue_type_template_id_3c695dde_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PluginSettingsvue_type_template_id_63599c19_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", { class: "card-title", id: settings.pluginName - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(settings.title), 9, PluginSettingsvue_type_template_id_3c695dde_hoisted_4), (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"])(settings.settings, function (setting) { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(settings.title), 9, PluginSettingsvue_type_template_id_63599c19_hoisted_4), (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"])(settings.settings, function (setting) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { key: "".concat(setting.pluginName, ".").concat(setting.name) }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PluginSetting, { @@ -2514,10 +2542,10 @@ function PluginSettingsvue_type_template_id_3c695dde_render(_ctx, _cache, $props disabled: _ctx.isLoading, class: "pluginsSettingsSubmit btn", value: _ctx.translate('General_Save') - }, null, 8, PluginSettingsvue_type_template_id_3c695dde_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { + }, null, 8, PluginSettingsvue_type_template_id_63599c19_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { loading: _ctx.isLoading || _ctx.isSaving[settings.pluginName] - }, null, 8, ["loading"])])], 8, PluginSettingsvue_type_template_id_3c695dde_hoisted_2); - }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PluginSettingsvue_type_template_id_3c695dde_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PluginSettingsvue_type_template_id_3c695dde_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ConfirmWithPassword')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["loading"])])], 8, PluginSettingsvue_type_template_id_63599c19_hoisted_2); + }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PluginSettingsvue_type_template_id_63599c19_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PluginSettingsvue_type_template_id_63599c19_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ConfirmWithPassword')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { modelValue: _ctx.passwordConfirmation, "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) { return _ctx.passwordConfirmation = $event; @@ -2527,7 +2555,7 @@ function PluginSettingsvue_type_template_id_3c695dde_render(_ctx, _cache, $props autocomplete: false, "full-width": true, title: _ctx.translate('UsersManager_YourCurrentPassword') - }, null, 8, ["modelValue", "title"])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PluginSettingsvue_type_template_id_3c695dde_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ["modelValue", "title"])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PluginSettingsvue_type_template_id_63599c19_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { href: "", class: "modal-action modal-close btn", disabled: !_ctx.passwordConfirmation ? 'disabled' : undefined, @@ -2536,7 +2564,7 @@ function PluginSettingsvue_type_template_id_3c695dde_render(_ctx, _cache, $props _ctx.save(_this.settingsToSave); }) - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Yes')), 9, PluginSettingsvue_type_template_id_3c695dde_hoisted_9), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Yes')), 9, PluginSettingsvue_type_template_id_63599c19_hoisted_9), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { href: "", class: "modal-action modal-close modal-no", onClick: _cache[2] || (_cache[2] = function ($event) { @@ -2544,17 +2572,17 @@ function PluginSettingsvue_type_template_id_3c695dde_render(_ctx, _cache, $props }) }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_No')), 1)])])], 512); } -// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue?vue&type=template&id=3c695dde +// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue?vue&type=template&id=63599c19 -// 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/CorePluginsAdmin/vue/src/PluginSettings/PluginSetting.vue?vue&type=template&id=ebbcc5e8 -function PluginSettingvue_type_template_id_ebbcc5e8_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; } +// 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/CorePluginsAdmin/vue/src/PluginSettings/PluginSetting.vue?vue&type=template&id=459dac26 +function PluginSettingvue_type_template_id_459dac26_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 PluginSettingvue_type_template_id_ebbcc5e8_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { PluginSettingvue_type_template_id_ebbcc5e8_ownKeys(Object(source), true).forEach(function (key) { PluginSettingvue_type_template_id_ebbcc5e8_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { PluginSettingvue_type_template_id_ebbcc5e8_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } +function PluginSettingvue_type_template_id_459dac26_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { PluginSettingvue_type_template_id_459dac26_ownKeys(Object(source), true).forEach(function (key) { PluginSettingvue_type_template_id_459dac26_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { PluginSettingvue_type_template_id_459dac26_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } -function PluginSettingvue_type_template_id_ebbcc5e8_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; } +function PluginSettingvue_type_template_id_459dac26_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; } -function PluginSettingvue_type_template_id_ebbcc5e8_render(_ctx, _cache, $props, $setup, $data, $options) { +function PluginSettingvue_type_template_id_459dac26_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_FormField = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("FormField"); return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_FormField, { @@ -2562,14 +2590,14 @@ function PluginSettingvue_type_template_id_ebbcc5e8_render(_ctx, _cache, $props, "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) { return _ctx.changeValue($event); }), - "form-field": PluginSettingvue_type_template_id_ebbcc5e8_objectSpread(PluginSettingvue_type_template_id_ebbcc5e8_objectSpread({}, _ctx.setting), {}, { + "form-field": PluginSettingvue_type_template_id_459dac26_objectSpread(PluginSettingvue_type_template_id_459dac26_objectSpread({}, _ctx.setting), {}, { condition: _ctx.conditionFunction }) }, null, 8, ["model-value", "form-field"])]); } -// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSetting.vue?vue&type=template&id=ebbcc5e8 +// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSetting.vue?vue&type=template&id=459dac26 -// 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/CorePluginsAdmin/vue/src/PluginSettings/PluginSetting.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/PluginSettings/PluginSetting.vue?vue&type=script&lang=ts function PluginSettingvue_type_script_lang_ts_slicedToArray(arr, i) { return PluginSettingvue_type_script_lang_ts_arrayWithHoles(arr) || PluginSettingvue_type_script_lang_ts_iterableToArrayLimit(arr, i) || PluginSettingvue_type_script_lang_ts_unsupportedIterableToArray(arr, i) || PluginSettingvue_type_script_lang_ts_nonIterableRest(); } function PluginSettingvue_type_script_lang_ts_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } @@ -2589,8 +2617,14 @@ function PluginSettingvue_type_script_lang_ts_arrayWithHoles(arr) { if (Array.is var conditionScope; /* harmony default export */ var PluginSettingvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { - pluginName: String, - setting: Object, + pluginName: { + type: String, + required: true + }, + setting: { + type: Object, + required: true + }, modelValue: null, settingValues: Object }, @@ -2652,10 +2686,10 @@ var conditionScope; -PluginSettingvue_type_script_lang_ts.render = PluginSettingvue_type_template_id_ebbcc5e8_render +PluginSettingvue_type_script_lang_ts.render = PluginSettingvue_type_template_id_459dac26_render /* harmony default export */ var PluginSetting = (PluginSettingvue_type_script_lang_ts); -// 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/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue?vue&type=script&lang=ts function PluginSettingsvue_type_script_lang_ts_slicedToArray(arr, i) { return PluginSettingsvue_type_script_lang_ts_arrayWithHoles(arr) || PluginSettingsvue_type_script_lang_ts_iterableToArrayLimit(arr, i) || PluginSettingsvue_type_script_lang_ts_unsupportedIterableToArray(arr, i) || PluginSettingsvue_type_script_lang_ts_nonIterableRest(); } function PluginSettingsvue_type_script_lang_ts_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } @@ -2729,7 +2763,8 @@ var _window = window, return; } - this.settingsPerPlugin.forEach(function (settingsForPlugin) { + var settingsPerPlugin = this.settingsPerPlugin; + settingsPerPlugin.forEach(function (settingsForPlugin) { var pluginName = settingsForPlugin.pluginName, settings = settingsForPlugin.settings; @@ -2765,7 +2800,7 @@ var _window = window, var onEnter = function onEnter(event) { var keycode = event.keyCode ? event.keyCode : event.which; - if (keycode === '13') { + if (keycode === 13) { $root.find('.confirm-password-modal').modal('close'); _this2.save(requestedPlugin); @@ -2851,7 +2886,7 @@ var _window = window, -PluginSettingsvue_type_script_lang_ts.render = PluginSettingsvue_type_template_id_3c695dde_render +PluginSettingsvue_type_script_lang_ts.render = PluginSettingsvue_type_template_id_63599c19_render /* harmony default export */ var PluginSettings = (PluginSettingsvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.adapter.ts @@ -2896,11 +2931,11 @@ function onClickUninstall(binding, event) { binding.value.uninstallConfirmMessage = PluginManagement_$('#uninstallPluginConfirm').text(); } - var messageToDisplay = binding.value.uninstallConfirmMessage.replace('%s', pluginName); + var messageToDisplay = (binding.value.uninstallConfirmMessage || '').replace('%s', pluginName); PluginManagement_$('#uninstallPluginConfirm').text(messageToDisplay); external_CoreHome_["Matomo"].helper.modalConfirm('#confirmUninstallPlugin', { yes: function yes() { - window.location = link; + window.location.href = link; } }); } @@ -2943,8 +2978,7 @@ function piwikPluginManagement() { } }; } -piwikPluginManagement.$inject = []; -angular.module('piwikApp').directive('piwikPluginManagement', piwikPluginManagement); +window.angular.module('piwikApp').directive('piwikPluginManagement', piwikPluginManagement); // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/Plugins/PluginUpload.ts /*! * Matomo - free/libre analytics platform @@ -3000,8 +3034,7 @@ function piwikPluginUpload() { } }; } -piwikPluginUpload.$inject = []; -angular.module('piwikApp').directive('piwikPluginUpload', piwikPluginUpload); +window.angular.module('piwikApp').directive('piwikPluginUpload', piwikPluginUpload); // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/Plugins/PluginFilter.ts /*! * Matomo - free/libre analytics platform @@ -3104,21 +3137,20 @@ function piwikPluginFilter() { } }; } -piwikPluginFilter.$inject = []; -angular.module('piwikApp').directive('piwikPluginFilter', piwikPluginFilter); -// 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/CorePluginsAdmin/vue/src/SaveButton/SaveButton.vue?vue&type=template&id=c302ef68 +window.angular.module('piwikApp').directive('piwikPluginFilter', piwikPluginFilter); +// 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/CorePluginsAdmin/vue/src/SaveButton/SaveButton.vue?vue&type=template&id=1e391ba1 -var SaveButtonvue_type_template_id_c302ef68_hoisted_1 = { +var SaveButtonvue_type_template_id_1e391ba1_hoisted_1 = { class: "matomo-save-button", style: { "display": "inline-block" } }; -var SaveButtonvue_type_template_id_c302ef68_hoisted_2 = ["disabled", "value"]; -function SaveButtonvue_type_template_id_c302ef68_render(_ctx, _cache, $props, $setup, $data, $options) { +var SaveButtonvue_type_template_id_1e391ba1_hoisted_2 = ["disabled", "value"]; +function SaveButtonvue_type_template_id_1e391ba1_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_ActivityIndicator = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ActivityIndicator"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", SaveButtonvue_type_template_id_c302ef68_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", SaveButtonvue_type_template_id_1e391ba1_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "button", onClick: _cache[0] || (_cache[0] = function ($event) { return _ctx.onConfirm($event); @@ -3126,13 +3158,13 @@ function SaveButtonvue_type_template_id_c302ef68_render(_ctx, _cache, $props, $s disabled: _ctx.saving || _ctx.disabled, class: "btn", value: _ctx.value ? _ctx.value : _ctx.translate('General_Save') - }, null, 8, SaveButtonvue_type_template_id_c302ef68_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { + }, null, 8, SaveButtonvue_type_template_id_1e391ba1_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { loading: _ctx.saving }, null, 8, ["loading"])]); } -// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/SaveButton/SaveButton.vue?vue&type=template&id=c302ef68 +// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/SaveButton/SaveButton.vue?vue&type=template&id=1e391ba1 -// 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/CorePluginsAdmin/vue/src/SaveButton/SaveButton.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/CorePluginsAdmin/vue/src/SaveButton/SaveButton.vue?vue&type=script&lang=ts /* harmony default export */ var SaveButtonvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ @@ -3146,8 +3178,8 @@ function SaveButtonvue_type_template_id_c302ef68_render(_ctx, _cache, $props, $s }, emits: ['confirm'], methods: { - onConfirm: function onConfirm($event) { - this.$emit('confirm', $event); + onConfirm: function onConfirm(event) { + this.$emit('confirm', event); } } })); @@ -3157,7 +3189,7 @@ function SaveButtonvue_type_template_id_c302ef68_render(_ctx, _cache, $props, $s -SaveButtonvue_type_script_lang_ts.render = SaveButtonvue_type_template_id_c302ef68_render +SaveButtonvue_type_script_lang_ts.render = SaveButtonvue_type_template_id_1e391ba1_render /* harmony default export */ var SaveButton = (SaveButtonvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/SaveButton/SaveButton.adapter.ts @@ -3235,8 +3267,7 @@ function piwikForm() { } }; } -piwikForm.$inject = []; -angular.module('piwikApp').directive('piwikForm', piwikForm); +window.angular.module('piwikApp').directive('piwikForm', piwikForm); // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/index.ts /*! * Matomo - free/libre analytics platform diff --git a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js index aa24c2d8a7..5d302da572 100644 --- a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js +++ b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js @@ -1,66 +1,60 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["CorePluginsAdmin"]=t(require("CoreHome"),require("vue")):e["CorePluginsAdmin"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/CorePluginsAdmin/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"FormField",(function(){return Kt})),n.d(t,"Field",(function(){return mn})),n.d(t,"PluginSettings",(function(){return Gn})),n.d(t,"PluginFilter",(function(){return hr})),n.d(t,"PluginManagement",(function(){return er})),n.d(t,"PluginUpload",(function(){return lr})),n.d(t,"SaveButton",(function(){return Cr})),n.d(t,"Form",(function(){return Ar})),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var i=n("19dc"),l=n("8bbf");function a(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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s={class:"form-group row matomo-form-field"},d={key:0,class:"col s12"},m={key:0,class:"form-help"},f={key:0,class:"inline-help",ref:"inlineHelp"},p=Object(l["createElementVNode"])("br",null,null,-1);function b(e,t,n,r,o,i){return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",s,[e.formField.introduction?(Object(l["openBlock"])(),Object(l["createElementBlock"])("h3",d,Object(l["toDisplayString"])(e.formField.introduction),1)):Object(l["createCommentVNode"])("",!0),Object(l["createElementVNode"])("div",{class:Object(l["normalizeClass"])(["col s12",{"input-field":"checkbox"!==e.formField.uiControl&&"radio"!==e.formField.uiControl,"file-field":"file"===e.formField.uiControl,m6:!e.formField.fullWidth}])},[(Object(l["openBlock"])(),Object(l["createBlock"])(Object(l["resolveDynamicComponent"])(e.childComponent),Object(l["mergeProps"])(u(u({formField:e.formField},e.formField),{},{modelValue:e.processedModelValue,availableOptions:e.availableOptions},e.extraChildComponentParams),{"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)})}),null,16))],2),Object(l["createElementVNode"])("div",{class:Object(l["normalizeClass"])(["col s12",{m6:!e.formField.fullWidth}])},[e.showFormHelp?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",m,[Object(l["withDirectives"])(Object(l["createElementVNode"])("div",{class:"form-description"},Object(l["toDisplayString"])(e.formField.description),513),[[l["vShow"],e.formField.description]]),e.formField.inlineHelp?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",f,null,512)):Object(l["createCommentVNode"])("",!0),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",null,[p,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_Default"))+": ",1),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(e.defaultValuePrettyTruncated),1)],512),[[l["vShow"],e.showDefaultValue]])])):Object(l["createCommentVNode"])("",!0)],2)],512)),[[l["vShow"],e.showField]])}var v={class:"checkbox"},g=["checked","id","name"],h=["innerHTML"];function O(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",v,[Object(l["createElementVNode"])("label",null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},e.uiControlAttributes,{value:1,checked:!!e.modelValue,type:"checkbox",id:e.name,name:e.name}),null,16,g),Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.title)},null,8,h)])])}var y=Object(l["defineComponent"])({props:{modelValue:Boolean,uiControlAttributes:Object,name:String,title:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){this.modelValue!==e.target.checked&&this.$emit("update:modelValue",e.target.checked)}}});y.render=O;var j=y,w=["value","checked","onChange","id","name"];function V(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["withDirectives"])(Object(l["createElementVNode"])("label",{class:"fieldRadioTitle"},Object(l["toDisplayString"])(e.title),513),[[l["vShow"],e.title]]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.availableOptions,(function(t,n){return Object(l["openBlock"])(),Object(l["createElementBlock"])("p",{key:n,class:"checkbox"},[Object(l["createElementVNode"])("label",null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({value:t.key,checked:!!e.checkboxStates[n],onChange:function(t){return e.onChange(n)}},e.uiControlAttributes,{type:"checkbox",id:"".concat(e.name).concat(t.key),name:t.name}),null,16,w),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(t.value),1),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",{class:"form-description"},Object(l["toDisplayString"])(t.description),513),[[l["vShow"],t.description]])])])})),128))])}function C(e){return F(e)||A(e)||k(e)||S()}function S(){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 k(e,t){if(e){if("string"===typeof e)return E(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)?E(e,t):void 0}}function A(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function F(e){if(Array.isArray(e))return E(e)}function E(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){return(e||[]).map((function(e){return t&&-1!==t.indexOf(e.key)}))}var x=Object(l["defineComponent"])({props:{modelValue:Object,name:String,title:String,availableOptions:Array,uiControlAttributes:Object,type:String},inheritAttrs:!1,emits:["update:modelValue"],computed:{checkboxStates:function(){return B(this.availableOptions,this.modelValue)}},mounted:function(){window.Materialize.updateTextFields()},methods:{onChange:function(e){var t=C(this.checkboxStates);t[e]=!t[e];var n=[];Object.values(this.availableOptions).forEach((function(e,r){t[r]&&n.push(e.key)})),this.$emit("update:modelValue",n)}}});x.render=V;var P=x,N={class:"expandableSelector"},T=Object(l["createElementVNode"])("svg",{class:"caret",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},[Object(l["createElementVNode"])("path",{d:"M7 10l5 5 5-5z"}),Object(l["createElementVNode"])("path",{d:"M0 0h24v24H0z",fill:"none"})],-1),$=["value"],M={class:"expandableList z-depth-2"},D={class:"searchContainer"},J={class:"collection firstLevel"},H=["onClick"],I={class:"collection secondLevel"},L=["onClick"],z={class:"primary-content"},U=["title"];function K(e,t,n,r,o,i){var a=Object(l["resolveDirective"])("focus-if"),u=Object(l["resolveDirective"])("focus-anywhere-but-here");return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",N,[Object(l["createElementVNode"])("div",{onClick:t[0]||(t[0]=function(t){return e.showSelect=!e.showSelect}),class:"select-wrapper"},[T,Object(l["createElementVNode"])("input",{type:"text",class:"select-dropdown",readonly:"readonly",value:e.modelValueText},null,8,$)]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",M,[Object(l["createElementVNode"])("div",D,[Object(l["withDirectives"])(Object(l["createElementVNode"])("input",{type:"text",placeholder:"Search","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),class:"expandableSearch browser-default"},null,512),[[l["vModelText"],e.searchTerm],[a,e.showSelect]])]),Object(l["createElementVNode"])("ul",J,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.availableOptions,(function(t,n){return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{class:"collection-item",key:n},[Object(l["createElementVNode"])("h4",{class:"expandableListCategory",onClick:function(n){return e.onCategoryClicked(t)}},[Object(l["createTextVNode"])(Object(l["toDisplayString"])(t.group)+" ",1),Object(l["createElementVNode"])("span",{class:Object(l["normalizeClass"])(["secondary-content",{"icon-arrow-right":e.showCategory!==t.group,"icon-arrow-bottom":e.showCategory===t.group}])},null,2)],8,H),Object(l["withDirectives"])(Object(l["createElementVNode"])("ul",I,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.values.filter((function(t){return-1!==t.value.indexOf(e.searchTerm)})),(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{class:"expandableListItem collection-item valign-wrapper",key:t.key,onClick:function(n){return e.onValueClicked(t)}},[Object(l["createElementVNode"])("span",z,Object(l["toDisplayString"])(t.value),1),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",{title:t.tooltip,class:"secondary-content icon-help"},null,8,U),[[l["vShow"],t.tooltip]])],8,L)})),128))],512),[[l["vShow"],e.showCategory===t.group||e.searchTerm]])],512)),[[l["vShow"],t.values.filter((function(t){return-1!==t.value.indexOf(e.searchTerm)})).length]])})),128))])],512),[[l["vShow"],e.showSelect]])],512)),[[u,{blur:e.onBlur}]])}function _(e){var t=[],n={};return Object.values(e).forEach((function(e){var t=e,r=t.group||"";r in n&&n[r]||(n[r]={values:[],group:r});var o={key:t.key,value:t.value};"tooltip"in t&&t.tooltip&&(o.tooltip=t.tooltip),n[r].values.push(o)})),Object.values(n).forEach((function(e){e.values.length&&t.push(e)})),t}var q=Object(l["defineComponent"])({props:{modelValue:[Number,String],availableOptions:Array,title:String},directives:{FocusAnywhereButHere:i["FocusAnywhereButHere"],FocusIf:i["FocusIf"]},inheritAttrs:!1,emits:["update:modelValue"],data:function(){return{showSelect:!1,searchTerm:"",showCategory:""}},computed:{modelValueText:function(){if(this.title)return this.title;var e,t=this.modelValue;return(this.availableOptions||[]).some((function(n){return e=n.values.find((function(e){return e.key===t})),e})),e?e.value.toString():t}},methods:{onBlur:function(){this.showSelect=!1},onCategoryClicked:function(e){this.showCategory===e.group?this.showCategory="":this.showCategory=e.group},onValueClicked:function(e){this.$emit("update:modelValue",e.key),this.showSelect=!1}}});q.render=K;var R=q,W=["for","innerHTML"];function G(e,t,n,r,o,i){var a=Object(l["resolveComponent"])("FieldArray");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,W),Object(l["createVNode"])(a,{name:e.name,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onValueUpdate(t)}),field:e.uiControlAttributes.field},null,8,["name","model-value","field"])])}var Z=Object(l["defineComponent"])({components:{FieldArray:i["FieldArray"]},props:{name:String,title:String,modelValue:null,uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],methods:{onValueUpdate:function(e){this.$emit("update:modelValue",e)}}});Z.render=G;var Y=Z,Q={class:"btn"},X=["for","innerHTML"],ee=["name","id"],te={class:"file-path-wrapper"},ne=["value"];function re(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("div",Q,[Object(l["createElementVNode"])("span",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,X),Object(l["createElementVNode"])("input",{ref:"fileInput",name:e.name,type:"file",id:e.name,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},null,40,ee)]),Object(l["createElementVNode"])("div",te,[Object(l["createElementVNode"])("input",{class:"file-path validate",value:e.modelValue,type:"text"},null,8,ne)])])}var oe=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:String},inheritAttrs:!1,emits:["update:modelValue"],setup:function(e){var t=Object(l["ref"])(null);return Object(l["watch"])((function(){return e.modelValue}),(function(e){if(""===e){var n=t.value;n.value=""}})),{fileInput:t}},methods:{onChange:function(e){var t=e.target.files.item(0);this.$emit("update:modelValue",t)}}});oe.render=re;var ie=oe,le=["type","name","value"];function ae(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("input",{type:e.uiControl,name:e.name,value:e.modelValue,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},null,40,le)])}var ue=Object(l["defineComponent"])({props:{modelValue:null,uiControl:String,name:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e.target.value)}}});ue.render=ae;var ce=ue,se={class:"fieldMultiTuple"},de=["for","innerHTML"];function me(e,t,n,r,o,i){var a=Object(l["resolveComponent"])("MultiPairField");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",se,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,de),Object(l["createVNode"])(a,{name:e.name,"model-value":e.modelValue,"onUpdate:modelValue":e.onUpdateValue,field1:e.uiControlAttributes.field1,field2:e.uiControlAttributes.field2,field3:e.uiControlAttributes.field3,field4:e.uiControlAttributes.field4},null,8,["name","model-value","onUpdate:modelValue","field1","field2","field3","field4"])])}var fe=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:null,uiControlAttributes:Object},inheritAttrs:!1,components:{MultiPairField:i["MultiPairField"]},emits:["update:modelValue"],methods:{onUpdateValue:function(e){this.$emit("update:modelValue",e)}}});fe.render=me;var pe=fe,be=["type","id","name","value"],ve=["for","innerHTML"];function ge(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,id:e.name,name:e.name,value:(e.modelValue||"").toString(),onKeydown:t[0]||(t[0]=function(t){return e.onChange(t)}),onChange:t[1]||(t[1]=function(t){return e.onChange(t)})},e.uiControlAttributes),null,16,be),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,ve)],64)}var he=Object(l["defineComponent"])({props:{uiControl:String,name:String,title:String,modelValue:[Number,String],uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],created:function(){this.onChange=Object(i["debounce"])(this.onChange.bind(this),50)},methods:{onChange:function(e){var t=parseFloat(e.target.value);this.$emit("update:modelValue",t)}},mounted:function(){window.Materialize.updateTextFields()},watch:{modelValue:function(){setTimeout((function(){window.Materialize.updateTextFields()}))}}});he.render=ge;var Oe=he,ye=["value","id","name","disabled","checked"];function je(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["withDirectives"])(Object(l["createElementVNode"])("label",{class:"fieldRadioTitle"},Object(l["toDisplayString"])(e.title),513),[[l["vShow"],e.title]]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.availableOptions||[],(function(n){return Object(l["openBlock"])(),Object(l["createElementBlock"])("p",{key:n.key,class:"radio"},[Object(l["createElementVNode"])("label",null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({value:n.key,onChange:t[0]||(t[0]=function(t){return e.onChange(t)}),type:"radio",id:"".concat(e.name).concat(n.key),name:e.name,disabled:n.disabled||e.disabled},e.uiControlAttributes,{checked:e.modelValue===n.key||"".concat(e.modelValue)===n.key}),null,16,ye),Object(l["createElementVNode"])("span",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(n.value)+" ",1),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",{class:"form-description"},Object(l["toDisplayString"])(n.description),513),[[l["vShow"],n.description]])])])])})),128))])}var we=Object(l["defineComponent"])({props:{title:String,availableOptions:Array,name:String,disabled:Boolean,uiControlAttributes:Object,modelValue:[String,Number]},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e.target.value)}}});we.render=je;var Ve=we;function Ce(e,t){return Ee(e)||Fe(e,t)||ke(e,t)||Se()}function Se(){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 ke(e,t){if(e){if("string"===typeof e)return Ae(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)?Ae(e,t):void 0}}function Ae(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 Fe(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done);l=!0)if(i.push(r.value),t&&i.length===t)break}catch(u){a=!0,o=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw o}}return i}}function Ee(e){if(Array.isArray(e))return e}var Be={key:0,class:"matomo-field-select"},xe=["multiple","name"],Pe=["label"],Ne=["value","selected","disabled"],Te=["for","innerHTML"],$e={key:1,class:"matomo-field-select"},Me=["multiple","name"],De=["value","selected","disabled"],Je=["for","innerHTML"];function He(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[e.groupedOptions?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Be,[Object(l["createElementVNode"])("select",Object(l["mergeProps"])({ref:"select",class:"grouped",multiple:e.multiple,name:e.name,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},e.uiControlAttributes),[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.groupedOptions,(function(t){var n=Ce(t,2),r=n[0],o=n[1];return Object(l["openBlock"])(),Object(l["createElementBlock"])("optgroup",{key:r,label:r},[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(o,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("option",{key:t.key,value:"string:".concat(t.key),selected:e.multiple?e.modelValue&&-1!==e.modelValue.indexOf(t.key):e.modelValue===t.key,disabled:t.disabled},Object(l["toDisplayString"])(t.value),9,Ne)})),128))],8,Pe)})),128))],16,xe),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.title},null,8,Te)])):Object(l["createCommentVNode"])("",!0),!e.groupedOptions&&e.options?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",$e,[Object(l["createElementVNode"])("select",Object(l["mergeProps"])({class:"ungrouped",ref:"select",multiple:e.multiple,name:e.name,onChange:t[1]||(t[1]=function(t){return e.onChange(t)})},e.uiControlAttributes),[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.options,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("option",{key:t.key,value:"string:".concat(t.key),selected:e.multiple?e.modelValue&&-1!==e.modelValue.indexOf(t.key):e.modelValue===t.key,disabled:t.disabled},Object(l["toDisplayString"])(t.value),9,De)})),128))],16,Me),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.title},null,8,Je)])):Object(l["createCommentVNode"])("",!0)],64)}function Ie(e){return Ue(e)||ze(e)||qe(e)||Le()}function Le(){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 ze(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Ue(e){if(Array.isArray(e))return Re(e)}function Ke(e,t){return Ge(e)||We(e,t)||qe(e,t)||_e()}function _e(){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 qe(e,t){if(e){if("string"===typeof e)return Re(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)?Re(e,t):void 0}}function Re(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 We(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done);l=!0)if(i.push(r.value),t&&i.length===t)break}catch(u){a=!0,o=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw o}}return i}}function Ge(e){if(Array.isArray(e))return e}function Ze(e){return Ze="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(e)}function Ye(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0;if(e){var i=window.$(e);if(Array.from(e.options).forEach((function(e){e.selected=o?t&&-1!==t.indexOf(e.value.replace(/^string:/,"")):"string:".concat(t)===e.value})),i.formSelect(r),n){var l=i.closest(".select-wrapper").find("input");l.attr("placeholder",n)}}}function Qe(e){return!Array.isArray(e)&&"object"===Ze(e)&&Object.values(e).some((function(e){return"object"===Ze(e)}))}function Xe(e,t){return e.some((function(e){return e.key===t}))}function et(e,t,n){if(!e)return[];var r=!0,o=e;Qe(o)||(o={"":e},r=!1);var i=[];return Object.entries(o).forEach((function(e){var n=Ke(e,2),o=n[0],l=n[1];Object.entries(l).forEach((function(e){var n=Ke(e,2),l=n[0],a=n[1];if("object"!==Ze(a)||"undefined"===typeof a.key){var u=l;"integer"===t&&"string"===typeof l&&(u=parseInt(l,10)),i.push({group:r?o:void 0,key:u,value:a})}else i.push(a)}))})),n.placeholder&&!Xe(i,"")?[{key:"",value:""}].concat(i):i}function tt(e){return"string"===typeof e?e.replace(/^string:/,""):e}var nt=Object(l["defineComponent"])({props:{modelValue:null,multiple:Boolean,name:String,title:String,availableOptions:Array,uiControlAttributes:Object,uiControlOptions:Object},inheritAttrs:!1,emits:["update:modelValue"],computed:{options:function(){return!this.availableOptions||Xe(this.availableOptions,"")||"undefined"!==typeof this.modelValue&&null!==this.modelValue&&""!==this.modelValue?this.availableOptions:[{key:"",value:this.modelValue,group:this.hasGroups?"":void 0}].concat(Ie(this.availableOptions))},hasGroups:function(){var e=this.availableOptions;return e&&e[0]&&"undefined"!==typeof e[0].group},groupedOptions:function(){if(!this.hasGroups)return null;var e=this.options,t={};e.forEach((function(e){t[e.group]=t[e.group]||[],t[e.group].push(e)}));var n=Object.entries(t);return n.sort((function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0})),n}},methods:{onChange:function(e){var t,n=this,r=e.target;this.multiple?(t=Array.from(r.options).filter((function(e){return e.selected})).map((function(e){return e.value})),t=t.map(tt)):(t=r.value,t=tt(t)),this.$emit("update:modelValue",t),Object(l["nextTick"])((function(){n.modelValue!==t&&n.onModelValueChange(n.modelValue)}))},onModelValueChange:function(e){var t=this;window.$(this.$refs.select).val(e),setTimeout((function(){Ye(t.$refs.select,e,t.uiControlAttributes.placeholder,t.uiControlOptions,t.multiple)}))}},watch:{modelValue:function(e){this.onModelValueChange(e)},"uiControlAttributes.disabled":{handler:function(e,t){var n=this;setTimeout((function(){e!==t&&Ye(n.$refs.select,n.modelValue,n.uiControlAttributes.placeholder,n.uiControlOptions,n.multiple)}))}},availableOptions:function(e,t){var n=this;e!==t&&setTimeout((function(){Ye(n.$refs.select,n.modelValue,n.uiControlAttributes.placeholder,n.uiControlOptions,n.multiple)}))}},mounted:function(){var e=this;setTimeout((function(){Ye(e.$refs.select,e.modelValue,e.uiControlAttributes.placeholder,e.uiControlOptions,e.multiple)}))}});nt.render=He;var rt=nt,ot=["for","innerHTML"],it={class:"sites_autocomplete"};function lt(e,t,n,r,o,i){var a=Object(l["resolveComponent"])("SiteSelector");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,class:"siteSelectorLabel",innerHTML:e.$sanitize(e.title)},null,8,ot),Object(l["createElementVNode"])("div",it,[Object(l["createVNode"])(a,Object(l["mergeProps"])({"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)}),id:e.name,"show-all-sites-item":e.uiControlAttributes.showAllSitesItem||!1,"switch-site-on-select":!1,"show-selected-site":!0,"only-sites-with-admin-access":e.uiControlAttributes.onlySitesWithAdminAccess||!1},e.uiControlAttributes),null,16,["model-value","id","show-all-sites-item","only-sites-with-admin-access"])])])}var at=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:Object,uiControlAttributes:Object},inheritAttrs:!1,components:{SiteSelector:i["SiteSelector"]},emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});at.render=lt;var ut=at,ct=["type","id","name","value"],st=["for","innerHTML"];function dt(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,id:e.name,name:e.name,value:e.modelValueText,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)})},e.uiControlAttributes),null,16,ct),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,st)],64)}var mt=Object(l["defineComponent"])({props:{title:String,name:String,uiControlAttributes:Object,modelValue:[String,Number],uiControl:String},inheritAttrs:!1,emits:["update:modelValue"],computed:{modelValueText:function(){return"undefined"===typeof this.modelValue||null===this.modelValue?"":this.modelValue.toString()}},created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},mounted:function(){setTimeout((function(){window.Materialize.updateTextFields()}))},watch:{modelValue:function(){setTimeout((function(){window.Materialize.updateTextFields()}))}},methods:{onKeydown:function(e){this.$emit("update:modelValue",e.target.value)}}});mt.render=dt;var ft=mt,pt=["for","innerHTML"],bt=["type","name","value"];function vt(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,pt),Object(l["createElementVNode"])("input",Object(l["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,name:e.name,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),value:e.concattedValues},e.uiControlAttributes),null,16,bt)])}var gt=Object(l["defineComponent"])({props:{name:String,title:String,uiControl:String,modelValue:Array,uiControlAttributes:Object},inheritAttrs:!1,computed:{concattedValues:function(){return"string"===typeof this.modelValue?this.modelValue:(this.modelValue||[]).join(", ")}},emits:["update:modelValue"],created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=e.target.value.split(",").map((function(e){return e.trim()}));this.$emit("update:modelValue",t)}}});gt.render=vt;var ht=gt,Ot=["name","id","value"],yt=["for","innerHTML"];function jt(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("textarea",Object(l["mergeProps"])({name:e.name},e.uiControlAttributes,{id:e.name,value:e.modelValue,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),class:"materialize-textarea",ref:"textarea"}),null,16,Ot),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,yt)],64)}var wt=Object(l["defineComponent"])({props:{name:String,uiControlAttributes:Object,modelValue:String,title:String},inheritAttrs:!1,emits:["update:modelValue"],created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){this.$emit("update:modelValue",e.target.value)}},watch:{modelValue:function(){var e=this;setTimeout((function(){window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}},mounted:function(){var e=this;setTimeout((function(){window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}});wt.render=jt;var Vt=wt,Ct=["for","innerHTML"],St=["name","value"];function kt(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Ct),Object(l["createElementVNode"])("textarea",Object(l["mergeProps"])({ref:"textarea",name:e.name},e.uiControlAttributes,{value:e.concattedValue,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),class:"materialize-textarea"}),null,16,St)])}var At="\n",Ft=Object(l["defineComponent"])({props:{name:String,title:String,uiControlAttributes:Object,modelValue:[Array,String]},inheritAttrs:!1,emits:["update:modelValue"],computed:{concattedValue:function(){return"string"===typeof this.modelValue?this.modelValue:(this.modelValue||[]).join(At)}},created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=e.target.value.split(At);this.$emit("update:modelValue",t)}},watch:{modelValue:function(e,t){var n=this;e!==t&&setTimeout((function(){n.$refs.textarea&&window.Materialize.textareaAutoResize(n.$refs.textarea),window.Materialize.updateTextFields()}))}},mounted:function(){var e=this;setTimeout((function(){e.$refs.textarea&&window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}});Ft.render=kt;var Et=Ft;function Bt(e){return Bt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bt(e)}function xt(e,t){return Mt(e)||$t(e,t)||Nt(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 Nt(e,t){if(e){if("string"===typeof e)return Tt(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)?Tt(e,t):void 0}}function Tt(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 $t(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done);l=!0)if(i.push(r.value),t&&i.length===t)break}catch(u){a=!0,o=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw o}}return i}}function Mt(e){if(Array.isArray(e))return e} +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["CorePluginsAdmin"]=t(require("CoreHome"),require("vue")):e["CorePluginsAdmin"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/CorePluginsAdmin/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"FormField",(function(){return Kt})),n.d(t,"Field",(function(){return dn})),n.d(t,"PluginSettings",(function(){return Wn})),n.d(t,"PluginFilter",(function(){return gr})),n.d(t,"PluginManagement",(function(){return Xn})),n.d(t,"PluginUpload",(function(){return ir})),n.d(t,"SaveButton",(function(){return Vr})),n.d(t,"Form",(function(){return kr})),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var i=n("19dc"),l=n("8bbf");function a(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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s={class:"form-group row matomo-form-field"},d={key:0,class:"col s12"},m={key:0,class:"form-help"},f={key:0,class:"inline-help",ref:"inlineHelp"},p=Object(l["createElementVNode"])("br",null,null,-1);function b(e,t,n,r,o,i){return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",s,[e.formField.introduction?(Object(l["openBlock"])(),Object(l["createElementBlock"])("h3",d,Object(l["toDisplayString"])(e.formField.introduction),1)):Object(l["createCommentVNode"])("",!0),Object(l["createElementVNode"])("div",{class:Object(l["normalizeClass"])(["col s12",{"input-field":"checkbox"!==e.formField.uiControl&&"radio"!==e.formField.uiControl,"file-field":"file"===e.formField.uiControl,m6:!e.formField.fullWidth}])},[(Object(l["openBlock"])(),Object(l["createBlock"])(Object(l["resolveDynamicComponent"])(e.childComponent),Object(l["mergeProps"])(u(u({formField:e.formField},e.formField),{},{modelValue:e.processedModelValue,availableOptions:e.availableOptions},e.extraChildComponentParams),{"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)})}),null,16))],2),Object(l["createElementVNode"])("div",{class:Object(l["normalizeClass"])(["col s12",{m6:!e.formField.fullWidth}])},[e.showFormHelp?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",m,[Object(l["withDirectives"])(Object(l["createElementVNode"])("div",{class:"form-description"},Object(l["toDisplayString"])(e.formField.description),513),[[l["vShow"],e.formField.description]]),e.formField.inlineHelp?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",f,null,512)):Object(l["createCommentVNode"])("",!0),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",null,[p,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_Default"))+": ",1),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(e.defaultValuePrettyTruncated),1)],512),[[l["vShow"],e.showDefaultValue]])])):Object(l["createCommentVNode"])("",!0)],2)],512)),[[l["vShow"],e.showField]])}var v={class:"checkbox"},g=["checked","id","name"],h=["innerHTML"];function O(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",v,[Object(l["createElementVNode"])("label",null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},e.uiControlAttributes,{value:1,checked:!!e.modelValue,type:"checkbox",id:e.name,name:e.name}),null,16,g),Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.title)},null,8,h)])])}var y=Object(l["defineComponent"])({props:{modelValue:Boolean,uiControlAttributes:Object,name:String,title:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){this.modelValue!==e.target.checked&&this.$emit("update:modelValue",e.target.checked)}}});y.render=O;var j=y,w=["value","checked","onChange","id","name"];function V(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["withDirectives"])(Object(l["createElementVNode"])("label",{class:"fieldRadioTitle"},Object(l["toDisplayString"])(e.title),513),[[l["vShow"],e.title]]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.availableOptions,(function(t,n){return Object(l["openBlock"])(),Object(l["createElementBlock"])("p",{key:n,class:"checkbox"},[Object(l["createElementVNode"])("label",null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({value:t.key,checked:!!e.checkboxStates[n],onChange:function(t){return e.onChange(n)}},e.uiControlAttributes,{type:"checkbox",id:"".concat(e.name).concat(t.key),name:t.name}),null,16,w),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(t.value),1),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",{class:"form-description"},Object(l["toDisplayString"])(t.description),513),[[l["vShow"],t.description]])])])})),128))])}function C(e){return F(e)||A(e)||k(e)||S()}function S(){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 k(e,t){if(e){if("string"===typeof e)return E(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)?E(e,t):void 0}}function A(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function F(e){if(Array.isArray(e))return E(e)}function E(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){return(e||[]).map((function(e){return t&&-1!==t.indexOf(e.key)}))}var x=Object(l["defineComponent"])({props:{modelValue:Array,name:String,title:String,availableOptions:Array,uiControlAttributes:Object,type:String},inheritAttrs:!1,emits:["update:modelValue"],computed:{checkboxStates:function(){return B(this.availableOptions,this.modelValue)}},mounted:function(){window.Materialize.updateTextFields()},methods:{onChange:function(e){var t=C(this.checkboxStates);t[e]=!t[e];var n=this.availableOptions||{},r=[];Object.values(n).forEach((function(e,n){t[n]&&r.push(e.key)})),this.$emit("update:modelValue",r)}}});x.render=V;var P=x,N={class:"expandableSelector"},T=Object(l["createElementVNode"])("svg",{class:"caret",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},[Object(l["createElementVNode"])("path",{d:"M7 10l5 5 5-5z"}),Object(l["createElementVNode"])("path",{d:"M0 0h24v24H0z",fill:"none"})],-1),$=["value"],M={class:"expandableList z-depth-2"},D={class:"searchContainer"},J={class:"collection firstLevel"},H=["onClick"],I={class:"collection secondLevel"},L=["onClick"],z={class:"primary-content"},U=["title"];function K(e,t,n,r,o,i){var a=Object(l["resolveDirective"])("focus-if"),u=Object(l["resolveDirective"])("focus-anywhere-but-here");return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",N,[Object(l["createElementVNode"])("div",{onClick:t[0]||(t[0]=function(t){return e.showSelect=!e.showSelect}),class:"select-wrapper"},[T,Object(l["createElementVNode"])("input",{type:"text",class:"select-dropdown",readonly:"readonly",value:e.modelValueText},null,8,$)]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",M,[Object(l["createElementVNode"])("div",D,[Object(l["withDirectives"])(Object(l["createElementVNode"])("input",{type:"text",placeholder:"Search","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),class:"expandableSearch browser-default"},null,512),[[l["vModelText"],e.searchTerm],[a,e.showSelect]])]),Object(l["createElementVNode"])("ul",J,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.availableOptions,(function(t,n){return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{class:"collection-item",key:n},[Object(l["createElementVNode"])("h4",{class:"expandableListCategory",onClick:function(n){return e.onCategoryClicked(t)}},[Object(l["createTextVNode"])(Object(l["toDisplayString"])(t.group)+" ",1),Object(l["createElementVNode"])("span",{class:Object(l["normalizeClass"])(["secondary-content",{"icon-arrow-right":e.showCategory!==t.group,"icon-arrow-bottom":e.showCategory===t.group}])},null,2)],8,H),Object(l["withDirectives"])(Object(l["createElementVNode"])("ul",I,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.values.filter((function(t){return-1!==t.value.indexOf(e.searchTerm)})),(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{class:"expandableListItem collection-item valign-wrapper",key:t.key,onClick:function(n){return e.onValueClicked(t)}},[Object(l["createElementVNode"])("span",z,Object(l["toDisplayString"])(t.value),1),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",{title:t.tooltip,class:"secondary-content icon-help"},null,8,U),[[l["vShow"],t.tooltip]])],8,L)})),128))],512),[[l["vShow"],e.showCategory===t.group||e.searchTerm]])],512)),[[l["vShow"],t.values.filter((function(t){return-1!==t.value.indexOf(e.searchTerm)})).length]])})),128))])],512),[[l["vShow"],e.showSelect]])],512)),[[u,{blur:e.onBlur}]])}function _(e){var t=[];if(!e)return t;var n={};return Object.values(e).forEach((function(e){var t=e,r=t.group||"";r in n&&n[r]||(n[r]={values:[],group:r});var o={key:t.key,value:t.value};"tooltip"in t&&t.tooltip&&(o.tooltip=t.tooltip),n[r].values.push(o)})),Object.values(n).forEach((function(e){e.values.length&&t.push(e)})),t}var q=Object(l["defineComponent"])({props:{modelValue:[Number,String],availableOptions:Array,title:String},directives:{FocusAnywhereButHere:i["FocusAnywhereButHere"],FocusIf:i["FocusIf"]},inheritAttrs:!1,emits:["update:modelValue"],data:function(){return{showSelect:!1,searchTerm:"",showCategory:""}},computed:{modelValueText:function(){if(this.title)return this.title;var e,t=this.modelValue,n=this.availableOptions||[];return n.some((function(n){return e=n.values.find((function(e){return e.key===t})),e})),e?e.value?"".concat(e.value):"":t?"".concat(t):""}},methods:{onBlur:function(){this.showSelect=!1},onCategoryClicked:function(e){this.showCategory===e.group?this.showCategory="":this.showCategory=e.group},onValueClicked:function(e){this.$emit("update:modelValue",e.key),this.showSelect=!1}}});q.render=K;var R=q,W=["for","innerHTML"];function G(e,t,n,r,o,i){var a=Object(l["resolveComponent"])("FieldArray");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,W),Object(l["createVNode"])(a,{name:e.name,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onValueUpdate(t)}),field:e.uiControlAttributes.field},null,8,["name","model-value","field"])])}var Z=Object(l["defineComponent"])({components:{FieldArray:i["FieldArray"]},props:{name:String,title:String,modelValue:null,uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],methods:{onValueUpdate:function(e){this.$emit("update:modelValue",e)}}});Z.render=G;var Y=Z,Q={class:"btn"},X=["for","innerHTML"],ee=["name","id"],te={class:"file-path-wrapper"},ne=["value"];function re(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("div",Q,[Object(l["createElementVNode"])("span",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,X),Object(l["createElementVNode"])("input",{ref:"fileInput",name:e.name,type:"file",id:e.name,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},null,40,ee)]),Object(l["createElementVNode"])("div",te,[Object(l["createElementVNode"])("input",{class:"file-path validate",value:e.modelValue,type:"text"},null,8,ne)])])}var oe=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:String},inheritAttrs:!1,emits:["update:modelValue"],setup:function(e){var t=Object(l["ref"])(null);return Object(l["watch"])((function(){return e.modelValue}),(function(e){if(""===e){var n=t.value;n.value=""}})),{fileInput:t}},methods:{onChange:function(e){var t=e.target.files;if(t){var n=t.item(0);this.$emit("update:modelValue",n)}}}});oe.render=re;var ie=oe,le=["type","name","value"];function ae(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("input",{type:e.uiControl,name:e.name,value:e.modelValue,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},null,40,le)])}var ue=Object(l["defineComponent"])({props:{modelValue:null,uiControl:String,name:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e.target.value)}}});ue.render=ae;var ce=ue,se={class:"fieldMultiTuple"},de=["for","innerHTML"];function me(e,t,n,r,o,i){var a=Object(l["resolveComponent"])("MultiPairField");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",se,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,de),Object(l["createVNode"])(a,{name:e.name,"model-value":e.modelValue,"onUpdate:modelValue":e.onUpdateValue,field1:e.uiControlAttributes.field1,field2:e.uiControlAttributes.field2,field3:e.uiControlAttributes.field3,field4:e.uiControlAttributes.field4},null,8,["name","model-value","onUpdate:modelValue","field1","field2","field3","field4"])])}var fe=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:null,uiControlAttributes:Object},inheritAttrs:!1,components:{MultiPairField:i["MultiPairField"]},emits:["update:modelValue"],methods:{onUpdateValue:function(e){this.$emit("update:modelValue",e)}}});fe.render=me;var pe=fe,be=["type","id","name","value"],ve=["for","innerHTML"];function ge(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,id:e.name,name:e.name,value:(e.modelValue||"").toString(),onKeydown:t[0]||(t[0]=function(t){return e.onChange(t)}),onChange:t[1]||(t[1]=function(t){return e.onChange(t)})},e.uiControlAttributes),null,16,be),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,ve)],64)}var he=Object(l["defineComponent"])({props:{uiControl:String,name:String,title:String,modelValue:[Number,String],uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],created:function(){this.onChange=Object(i["debounce"])(this.onChange.bind(this),50)},methods:{onChange:function(e){var t=parseFloat(e.target.value);this.$emit("update:modelValue",t)}},mounted:function(){window.Materialize.updateTextFields()},watch:{modelValue:function(){setTimeout((function(){window.Materialize.updateTextFields()}))}}});he.render=ge;var Oe=he,ye=["value","id","name","disabled","checked"];function je(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["withDirectives"])(Object(l["createElementVNode"])("label",{class:"fieldRadioTitle"},Object(l["toDisplayString"])(e.title),513),[[l["vShow"],e.title]]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.availableOptions||[],(function(n){return Object(l["openBlock"])(),Object(l["createElementBlock"])("p",{key:n.key,class:"radio"},[Object(l["createElementVNode"])("label",null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({value:n.key,onChange:t[0]||(t[0]=function(t){return e.onChange(t)}),type:"radio",id:"".concat(e.name).concat(n.key),name:e.name,disabled:n.disabled||e.disabled},e.uiControlAttributes,{checked:e.modelValue===n.key||"".concat(e.modelValue)===n.key}),null,16,ye),Object(l["createElementVNode"])("span",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(n.value)+" ",1),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",{class:"form-description"},Object(l["toDisplayString"])(n.description),513),[[l["vShow"],n.description]])])])])})),128))])}var we=Object(l["defineComponent"])({props:{title:String,availableOptions:Array,name:String,disabled:Boolean,uiControlAttributes:Object,modelValue:[String,Number]},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e.target.value)}}});we.render=je;var Ve=we;function Ce(e,t){return Ee(e)||Fe(e,t)||ke(e,t)||Se()}function Se(){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 ke(e,t){if(e){if("string"===typeof e)return Ae(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)?Ae(e,t):void 0}}function Ae(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 Fe(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done);l=!0)if(i.push(r.value),t&&i.length===t)break}catch(u){a=!0,o=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw o}}return i}}function Ee(e){if(Array.isArray(e))return e}var Be={key:0,class:"matomo-field-select"},xe=["multiple","name"],Pe=["label"],Ne=["value","selected","disabled"],Te=["for","innerHTML"],$e={key:1,class:"matomo-field-select"},Me=["multiple","name"],De=["value","selected","disabled"],Je=["for","innerHTML"];function He(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[e.groupedOptions?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Be,[Object(l["createElementVNode"])("select",Object(l["mergeProps"])({ref:"select",class:"grouped",multiple:e.multiple,name:e.name,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},e.uiControlAttributes),[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.groupedOptions,(function(t){var n=Ce(t,2),r=n[0],o=n[1];return Object(l["openBlock"])(),Object(l["createElementBlock"])("optgroup",{key:r,label:r},[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(o,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("option",{key:t.key,value:"string:".concat(t.key),selected:e.multiple?e.modelValue&&-1!==e.modelValue.indexOf(t.key):e.modelValue===t.key,disabled:t.disabled},Object(l["toDisplayString"])(t.value),9,Ne)})),128))],8,Pe)})),128))],16,xe),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.title},null,8,Te)])):Object(l["createCommentVNode"])("",!0),!e.groupedOptions&&e.options?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",$e,[Object(l["createElementVNode"])("select",Object(l["mergeProps"])({class:"ungrouped",ref:"select",multiple:e.multiple,name:e.name,onChange:t[1]||(t[1]=function(t){return e.onChange(t)})},e.uiControlAttributes),[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.options,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("option",{key:t.key,value:"string:".concat(t.key),selected:e.multiple?e.modelValue&&-1!==e.modelValue.indexOf(t.key):e.modelValue===t.key,disabled:t.disabled},Object(l["toDisplayString"])(t.value),9,De)})),128))],16,Me),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.title},null,8,Je)])):Object(l["createCommentVNode"])("",!0)],64)}function Ie(e){return Ue(e)||ze(e)||qe(e)||Le()}function Le(){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 ze(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Ue(e){if(Array.isArray(e))return Re(e)}function Ke(e,t){return Ge(e)||We(e,t)||qe(e,t)||_e()}function _e(){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 qe(e,t){if(e){if("string"===typeof e)return Re(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)?Re(e,t):void 0}}function Re(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 We(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done);l=!0)if(i.push(r.value),t&&i.length===t)break}catch(u){a=!0,o=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw o}}return i}}function Ge(e){if(Array.isArray(e))return e}function Ze(e){return Ze="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(e)}function Ye(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0;if(e){var i=window.$(e);if(Array.from(e.options).forEach((function(e){e.selected=o?!!t&&-1!==t.indexOf(e.value.replace(/^string:/,"")):"string:".concat(t)===e.value})),i.formSelect(r),n){var l=i.closest(".select-wrapper").find("input");l.attr("placeholder",n)}}}function Qe(e){return!Array.isArray(e)&&"object"===Ze(e)&&Object.values(e).some((function(e){return"object"===Ze(e)}))}function Xe(e,t){return e.some((function(e){return e.key===t}))}function et(e,t,n){if(!e)return[];var r=!0,o=e;Qe(o)||(o={"":e},r=!1);var i=[];return Object.entries(o).forEach((function(e){var n=Ke(e,2),o=n[0],l=n[1];Object.entries(l).forEach((function(e){var n=Ke(e,2),l=n[0],a=n[1];if(a&&"object"===Ze(a)&&"undefined"!==typeof a.key)i.push(a);else{var u=l;"integer"===t&&"string"===typeof l&&(u=parseInt(l,10)),i.push({group:r?o:void 0,key:u,value:a})}}))})),null!==n&&void 0!==n&&n.placeholder&&!Xe(i,"")?[{key:"",value:""}].concat(i):i}function tt(e){return"string"===typeof e?e.replace(/^string:/,""):e}var nt=Object(l["defineComponent"])({props:{modelValue:null,multiple:Boolean,name:String,title:String,availableOptions:Array,uiControlAttributes:Object,uiControlOptions:Object},inheritAttrs:!1,emits:["update:modelValue"],computed:{options:function(){var e=this.availableOptions;return!e||Xe(e,"")||"undefined"!==typeof this.modelValue&&null!==this.modelValue&&""!==this.modelValue?e:[{key:"",value:this.modelValue,group:this.hasGroups?"":void 0}].concat(Ie(e))},hasGroups:function(){var e=this.availableOptions;return e&&e[0]&&"undefined"!==typeof e[0].group},groupedOptions:function(){var e=this.options;if(!this.hasGroups||!e)return null;var t={};e.forEach((function(e){var n=e.group;t[n]=t[n]||[],t[n].push(e)}));var n=Object.entries(t);return n.sort((function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0})),n}},methods:{onChange:function(e){var t,n=this,r=e.target;this.multiple?(t=Array.from(r.options).filter((function(e){return e.selected})).map((function(e){return e.value})),t=t.map((function(e){return tt(e)}))):(t=r.value,t=tt(t)),this.$emit("update:modelValue",t),Object(l["nextTick"])((function(){n.modelValue!==t&&n.onModelValueChange(n.modelValue)}))},onModelValueChange:function(e){var t=this;window.$(this.$refs.select).val(e),setTimeout((function(){var n;Ye(t.$refs.select,e,null===(n=t.uiControlAttributes)||void 0===n?void 0:n.placeholder,t.uiControlOptions,t.multiple)}))}},watch:{modelValue:function(e){this.onModelValueChange(e)},"uiControlAttributes.disabled":{handler:function(e,t){var n=this;setTimeout((function(){var r;e!==t&&Ye(n.$refs.select,n.modelValue,null===(r=n.uiControlAttributes)||void 0===r?void 0:r.placeholder,n.uiControlOptions,n.multiple)}))}},availableOptions:function(e,t){var n=this;e!==t&&setTimeout((function(){var e;Ye(n.$refs.select,n.modelValue,null===(e=n.uiControlAttributes)||void 0===e?void 0:e.placeholder,n.uiControlOptions,n.multiple)}))}},mounted:function(){var e=this;setTimeout((function(){var t;Ye(e.$refs.select,e.modelValue,null===(t=e.uiControlAttributes)||void 0===t?void 0:t.placeholder,e.uiControlOptions,e.multiple)}))}});nt.render=He;var rt=nt,ot=["for","innerHTML"],it={class:"sites_autocomplete"};function lt(e,t,n,r,o,i){var a=Object(l["resolveComponent"])("SiteSelector");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,class:"siteSelectorLabel",innerHTML:e.$sanitize(e.title)},null,8,ot),Object(l["createElementVNode"])("div",it,[Object(l["createVNode"])(a,Object(l["mergeProps"])({"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)}),id:e.name,"show-all-sites-item":e.uiControlAttributes.showAllSitesItem||!1,"switch-site-on-select":!1,"show-selected-site":!0,"only-sites-with-admin-access":e.uiControlAttributes.onlySitesWithAdminAccess||!1},e.uiControlAttributes),null,16,["model-value","id","show-all-sites-item","only-sites-with-admin-access"])])])}var at=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:Object,uiControlAttributes:Object},inheritAttrs:!1,components:{SiteSelector:i["SiteSelector"]},emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});at.render=lt;var ut=at,ct=["type","id","name","value"],st=["for","innerHTML"];function dt(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,id:e.name,name:e.name,value:e.modelValueText,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)})},e.uiControlAttributes),null,16,ct),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,st)],64)}var mt=Object(l["defineComponent"])({props:{title:String,name:String,uiControlAttributes:Object,modelValue:[String,Number],uiControl:String},inheritAttrs:!1,emits:["update:modelValue"],computed:{modelValueText:function(){return"undefined"===typeof this.modelValue||null===this.modelValue?"":this.modelValue.toString()}},created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},mounted:function(){setTimeout((function(){window.Materialize.updateTextFields()}))},watch:{modelValue:function(){setTimeout((function(){window.Materialize.updateTextFields()}))}},methods:{onKeydown:function(e){this.$emit("update:modelValue",e.target.value)}}});mt.render=dt;var ft=mt,pt=["for","innerHTML"],bt=["type","name","value"];function vt(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,pt),Object(l["createElementVNode"])("input",Object(l["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,name:e.name,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),value:e.concattedValues},e.uiControlAttributes),null,16,bt)])}var gt=Object(l["defineComponent"])({props:{name:String,title:String,uiControl:String,modelValue:Array,uiControlAttributes:Object},inheritAttrs:!1,computed:{concattedValues:function(){return"string"===typeof this.modelValue?this.modelValue:(this.modelValue||[]).join(", ")}},emits:["update:modelValue"],created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=e.target.value.split(",").map((function(e){return e.trim()}));this.$emit("update:modelValue",t)}}});gt.render=vt;var ht=gt,Ot=["name","id","value"],yt=["for","innerHTML"];function jt(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("textarea",Object(l["mergeProps"])({name:e.name},e.uiControlAttributes,{id:e.name,value:e.modelValue,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),class:"materialize-textarea",ref:"textarea"}),null,16,Ot),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,yt)],64)}var wt=Object(l["defineComponent"])({props:{name:String,uiControlAttributes:Object,modelValue:String,title:String},inheritAttrs:!1,emits:["update:modelValue"],created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){this.$emit("update:modelValue",e.target.value)}},watch:{modelValue:function(){var e=this;setTimeout((function(){window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}},mounted:function(){var e=this;setTimeout((function(){window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}});wt.render=jt;var Vt=wt,Ct=["for","innerHTML"],St=["name","value"];function kt(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Ct),Object(l["createElementVNode"])("textarea",Object(l["mergeProps"])({ref:"textarea",name:e.name},e.uiControlAttributes,{value:e.concattedValue,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),class:"materialize-textarea"}),null,16,St)])}var At="\n",Ft=Object(l["defineComponent"])({props:{name:String,title:String,uiControlAttributes:Object,modelValue:[Array,String]},inheritAttrs:!1,emits:["update:modelValue"],computed:{concattedValue:function(){return"string"===typeof this.modelValue?this.modelValue:(this.modelValue||[]).join(At)}},created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=e.target.value.split(At);this.$emit("update:modelValue",t)}},watch:{modelValue:function(e,t){var n=this;e!==t&&setTimeout((function(){n.$refs.textarea&&window.Materialize.textareaAutoResize(n.$refs.textarea),window.Materialize.updateTextFields()}))}},mounted:function(){var e=this;setTimeout((function(){e.$refs.textarea&&window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}});Ft.render=kt;var Et=Ft;function Bt(e){return Bt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bt(e)}function xt(e,t){return Mt(e)||$t(e,t)||Nt(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 Nt(e,t){if(e){if("string"===typeof e)return Tt(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)?Tt(e,t):void 0}}function Tt(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 $t(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done);l=!0)if(i.push(r.value),t&&i.length===t)break}catch(u){a=!0,o=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw o}}return i}}function Mt(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 - */function Dt(e,t){if(!e)return[];var n=[];return Object.entries(e).forEach((function(e){var r=xt(e,2),o=r[0],i=r[1];if("object"!==Bt(i)||"undefined"===typeof i.key){var l=o;"integer"===t&&"string"===typeof o&&(l=parseInt(l,10)),n.push({key:l,value:i})}else n.push(i)})),n}function Jt(e){return Jt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jt(e)}var Ht=["password","url","search","email"],It=["textarea","checkbox","text"],Lt={checkbox:"FieldCheckbox","expandable-select":"FieldExpandableSelect","field-array":"FieldFieldArray",file:"FieldFile",hidden:"FieldHidden",multiselect:"FieldSelect",multituple:"FieldMultituple",number:"FieldNumber",radio:"FieldRadio",select:"FieldSelect",site:"FieldSite",text:"FieldText",textarea:"FieldTextarea"},zt={FieldSelect:et,FieldCheckboxArray:Dt,FieldRadio:Dt,FieldExpandableSelect:_},Ut=Object(l["defineComponent"])({props:{modelValue:null,formField:{type:Object,required:!0}},emits:["update:modelValue"],components:{FieldCheckbox:j,FieldCheckboxArray:P,FieldExpandableSelect:R,FieldFieldArray:Y,FieldFile:ie,FieldHidden:ce,FieldMultituple:pe,FieldNumber:Oe,FieldRadio:Ve,FieldSelect:rt,FieldSite:ut,FieldText:ft,FieldTextArray:ht,FieldTextarea:Vt,FieldTextareaArray:Et},setup:function(e){var t=Object(l["ref"])(null),n=function(e){var n;e&&(n="string"===typeof e&&e&&0===e.indexOf("#")?window.$(e):window.vueSanitize(e),window.$(t.value).html("").append(n))};return Object(l["watch"])((function(){return e.formField.inlineHelp}),n),Object(l["onMounted"])((function(){n(e.formField.inlineHelp)})),{inlineHelp:t}},computed:{childComponent:function(){if(this.formField.component)return this.formField.component;var e=this.formField.uiControl,t=Lt[e];return-1!==Ht.indexOf(e)&&(t="FieldText"),"array"===this.formField.type&&-1!==It.indexOf(e)&&(t="".concat(t,"Array")),t},extraChildComponentParams:function(){return"multiselect"===this.formField.uiControl?{multiple:!0}:{}},showFormHelp:function(){return this.formField.description||this.formField.inlineHelp||this.showDefaultValue},showDefaultValue:function(){return this.defaultValuePretty&&"checkbox"!==this.formField.uiControl&&"radio"!==this.formField.uiControl},showField:function(){return!this.formField||!this.formField.condition||this.formField.condition()},processedModelValue:function(){var e=this.formField;if("boolean"===e.type){var t=this.modelValue&&this.modelValue>0&&"0"!==this.modelValue;if("checkbox"===e.uiControl)return t;if("radio"===e.uiControl)return t?"1":"0"}return this.modelValue},defaultValue:function(){var e=this.formField.defaultValue;return Array.isArray(e)&&(e=e.join(",")),e},availableOptions:function(){var e=this.childComponent,t=this.formField;return t.availableValues&&zt[e]?zt[e](t.availableValues,t.type,t.uiControlAttributes):null},defaultValuePretty:function(){var e=this.formField.defaultValue,t=this.availableOptions;if("string"===typeof e&&e){var n=null;try{n=JSON.parse(e)}catch(o){}if(null!==n&&"object"===Jt(n))return""}if(!Array.isArray(t))return Array.isArray(e)?"":e?e.toString():"";var r=[];return Array.isArray(e)||(e=[e]),(t||[]).forEach((function(t){-1!==e.indexOf(t.key)&&"undefined"!==typeof t.value&&r.push(t.value)})),r.join(", ")},defaultValuePrettyTruncated:function(){return this.defaultValuePretty.substring(0,50)}},methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});Ut.render=b;var Kt=Ut,_t={ref:"root"};function qt(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",_t,null,512)}function Rt(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 Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rt(Object(n),!0).forEach((function(t){Gt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zt(e){if("undefined"!==typeof e)return JSON.parse(JSON.stringify(e))}var Yt=Object(l["defineComponent"])({props:{modelValue:null,formField:null,templateFile:String},emits:["update:modelValue"],inheritAttrs:!1,setup:function(e,t){var n=Object(l["ref"])(null),r=window.$("<div ng-include=\"'".concat(e.templateFile,"?cb=").concat(i["Matomo"].cacheBuster,"'\"></div>")),o=i["Matomo"].helper.getAngularDependency("$timeout"),a=i["Matomo"].helper.getAngularDependency("$rootScope"),u=a.$new();return u.formField=Wt(Wt({},Zt(e.formField)),{},{value:Zt(e.modelValue)}),u.$watch("formField.value",(function(n,r){n!==r&&JSON.stringify(n)!==JSON.stringify(e.modelValue)&&t.emit("update:modelValue",Zt(n))})),Object(l["watch"])((function(){return e.modelValue}),(function(e){JSON.stringify(e)!==JSON.stringify(u.formField.value)&&o((function(){u.formField.value=e}))})),Object(l["watch"])((function(){return e.formField}),(function(e){o((function(){var t=u.formField.value;u.formField=Wt(Wt({},Zt(e)),{},{value:t})}))}),{deep:!0}),Object(l["onMounted"])((function(){window.$(n.value).append(r),i["Matomo"].helper.compileAngularComponents(r,{scope:u,params:{formField:Wt(Wt({},Zt(e.formField)),{},{value:e.modelValue})}})})),{root:n}}});Yt.render=qt;var Qt=Yt; + */function Dt(e,t){if(!e)return[];var n=[];return Object.entries(e).forEach((function(e){var r=xt(e,2),o=r[0],i=r[1];if(i&&"object"===Bt(i)&&"undefined"!==typeof i.key)n.push(i);else{var l=o;"integer"===t&&"string"===typeof o&&(l=parseInt(l,10)),n.push({key:l,value:i})}})),n}function Jt(e){return Jt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jt(e)}var Ht=["password","url","search","email"],It=["textarea","checkbox","text"],Lt={checkbox:"FieldCheckbox","expandable-select":"FieldExpandableSelect","field-array":"FieldFieldArray",file:"FieldFile",hidden:"FieldHidden",multiselect:"FieldSelect",multituple:"FieldMultituple",number:"FieldNumber",radio:"FieldRadio",select:"FieldSelect",site:"FieldSite",text:"FieldText",textarea:"FieldTextarea"},zt={FieldSelect:et,FieldCheckboxArray:Dt,FieldRadio:Dt,FieldExpandableSelect:_},Ut=Object(l["defineComponent"])({props:{modelValue:null,formField:{type:Object,required:!0}},emits:["update:modelValue"],components:{FieldCheckbox:j,FieldCheckboxArray:P,FieldExpandableSelect:R,FieldFieldArray:Y,FieldFile:ie,FieldHidden:ce,FieldMultituple:pe,FieldNumber:Oe,FieldRadio:Ve,FieldSelect:rt,FieldSite:ut,FieldText:ft,FieldTextArray:ht,FieldTextarea:Vt,FieldTextareaArray:Et},setup:function(e){var t=Object(l["ref"])(null),n=function(e){var n;e&&t.value&&(n="string"===typeof e?0===e.indexOf("#")?window.$(e):window.vueSanitize(e):e,window.$(t.value).html("").append(n))};return Object(l["watch"])((function(){return e.formField.inlineHelp}),n),Object(l["onMounted"])((function(){n(e.formField.inlineHelp)})),{inlineHelp:t}},computed:{childComponent:function(){var e=this.formField;if(e.component)return e.component;var t=e.uiControl,n=Lt[t];return-1!==Ht.indexOf(t)&&(n="FieldText"),"array"===this.formField.type&&-1!==It.indexOf(t)&&(n="".concat(n,"Array")),n},extraChildComponentParams:function(){return"multiselect"===this.formField.uiControl?{multiple:!0}:{}},showFormHelp:function(){return this.formField.description||this.formField.inlineHelp||this.showDefaultValue},showDefaultValue:function(){return this.defaultValuePretty&&"checkbox"!==this.formField.uiControl&&"radio"!==this.formField.uiControl},showField:function(){return!this.formField||!this.formField.condition||this.formField.condition()},processedModelValue:function(){var e=this.formField;if("boolean"===e.type){var t=this.modelValue&&this.modelValue>0&&"0"!==this.modelValue;if("checkbox"===e.uiControl)return t;if("radio"===e.uiControl)return t?"1":"0"}return this.modelValue},defaultValue:function(){var e=this.formField.defaultValue;return Array.isArray(e)?e.join(","):e},availableOptions:function(){var e=this.childComponent;if("string"!==typeof e)return null;var t=this.formField;return t.availableValues&&zt[e]?zt[e](t.availableValues,t.type,t.uiControlAttributes):null},defaultValuePretty:function(){var e=this.formField,t=e.defaultValue,n=this.availableOptions;if("string"===typeof t&&t){var r=null;try{r=JSON.parse(t)}catch(i){}if(null!==r&&"object"===Jt(r))return""}if(!Array.isArray(n))return Array.isArray(t)?"":t?"".concat(t):"";var o=[];return Array.isArray(t)||(t=[t]),(n||[]).forEach((function(e){"undefined"!==typeof e.value&&-1!==t.indexOf(e.key)&&o.push(e.value)})),o.join(", ")},defaultValuePrettyTruncated:function(){return this.defaultValuePretty.substring(0,50)}},methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});Ut.render=b;var Kt=Ut,_t={ref:"root"};function qt(e,t,n,r,o,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",_t,null,512)}function Rt(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 Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rt(Object(n),!0).forEach((function(t){Gt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zt(e){if("undefined"!==typeof e)return JSON.parse(JSON.stringify(e))}var Yt=Object(l["defineComponent"])({props:{modelValue:null,formField:{type:null,required:!0},templateFile:{type:String,required:!0}},emits:["update:modelValue"],inheritAttrs:!1,setup:function(e,t){var n=Object(l["ref"])(null),r=window.$("<div ng-include=\"'".concat(e.templateFile,"?cb=").concat(i["Matomo"].cacheBuster,"'\"></div>")),o=i["Matomo"].helper.getAngularDependency("$timeout"),a=i["Matomo"].helper.getAngularDependency("$rootScope"),u=a.$new();return u.formField=Wt(Wt({},Zt(e.formField)),{},{value:Zt(e.modelValue)}),u.$watch("formField.value",(function(n,r){n!==r&&JSON.stringify(n)!==JSON.stringify(e.modelValue)&&t.emit("update:modelValue",Zt(n))})),Object(l["watch"])((function(){return e.modelValue}),(function(e){JSON.stringify(e)!==JSON.stringify(u.formField.value)&&o((function(){u.formField.value=e}))})),Object(l["watch"])((function(){return e.formField}),(function(e){o((function(){var t=u.formField.value;u.formField=Wt(Wt({},Zt(e)),{},{value:t})}))}),{deep:!0}),Object(l["onMounted"])((function(){window.$(n.value).append(r),i["Matomo"].helper.compileAngularComponents(r,{scope:u,params:{formField:Wt(Wt({},Zt(e.formField)),{},{value:e.modelValue})}})})),{root:n}}});Yt.render=qt;var Qt=Yt;function Xt(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?Xt(Object(n),!0).forEach((function(t){tn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xt(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} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Xt(e,t){return Object(l["defineAsyncComponent"])((function(){return new Promise((function(n){window.$(document).ready((function(){window[e]?n(window[e][t]):n(null)}))}))}))}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){nn(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 nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function nn(e){if(e){var t=e.plugin,n=e.name;if(!t||!n)throw new Error("Invalid component property given to piwik-field directive, must be {plugin: '...',name: '...'}");return Object(i["useExternalPluginComponent"])(t,n)}}function rn(e,t){var n={};return Object.values(e.allSettings||{}).forEach((function(e){"0"===e.value?n[e.name]=0:n[e.name]=e.value})),e.$eval(t,n)}Object(i["createAngularJsAdapter"])({component:Kt,scope:{modelValue:{default:function(e){var t=e.piwikFormField;return"string"!==typeof t.value||!t.value||"array"!==t.type&&"multituple"!==t.uiControl&&"field-array"!==t.uiControl&&"multiselect"!==t.uiControl&&"site"!==t.uiControl||(t.value=JSON.parse(t.value)),"checkbox"===t.uiControl?Object(i["transformAngularJsBoolAttr"])(t.value):t.value}},piwikFormField:{vue:"formField",angularJsBind:"=",transform:function(e,t,n){var r=e;return en(en({},r),{},{condition:r.condition?rn.bind(null,n,r.condition):r.condition,disabled:Object(i["transformAngularJsBoolAttr"])(r.disabled),autocomplete:Object(i["transformAngularJsBoolAttr"])(r.autocomplete),autofocus:Object(i["transformAngularJsBoolAttr"])(r.autofocus),tabindex:Object(i["transformAngularJsIntAttr"])(r.tabindex),fullWidth:Object(i["transformAngularJsBoolAttr"])(r.fullWidth),maxlength:Object(i["transformAngularJsIntAttr"])(r.maxlength),required:Object(i["transformAngularJsBoolAttr"])(r.required),rows:Object(i["transformAngularJsIntAttr"])(r.rows),min:Object(i["transformAngularJsIntAttr"])(r.min),max:Object(i["transformAngularJsIntAttr"])(r.max),component:Object(l["shallowRef"])(r.templateFile?Qt:nn(r.component))})}},allSettings:{angularJsBind:"="}},directiveName:"piwikFormField",events:{"update:modelValue":function(e,t,n,r,o,i,l){e!==n.piwikFormField.value&&l((function(){n.piwikFormField.value=e}))}},$inject:["$timeout"],postCreate:function(e,t){t.$watch("piwikFormField.value",(function(t,n){t!==n&&(e.modelValue=t)})),t.$watch("allSettings",(function(){e.formField=en(en({},e.formField),{},{condition:t.piwikFormField.condition?rn.bind(null,t,t.piwikFormField.condition):t.piwikFormField.condition})}),!0)}});function on(e,t,n,r,o,i){var a=Object(l["resolveComponent"])("FormField");return Object(l["openBlock"])(),Object(l["createBlock"])(a,{"form-field":e.field,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)}),component:e.component},null,8,["form-field","model-value","component"])}function ln(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 an(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ln(Object(n),!0).forEach((function(t){un(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ln(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return 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 cn={multiselect:"array",checkbox:"boolean",site:"object",number:"integer"},sn=Object(l["defineComponent"])({props:{modelValue:null,uicontrol:String,name:String,defaultValue:null,options:[Object,Array],description:String,introduction:String,title:String,inlineHelp:String,disabled:Boolean,uiControlAttributes:{type:Object,default:function(){return{}}},uiControlOptions:{type:Object,default:function(){return{}}},autocomplete:Boolean,condition:Function,varType:String,autofocus:Boolean,tabindex:Number,fullWidth:Boolean,maxlength:Number,required:Boolean,placeholder:String,rows:Number,min:Number,max:Number,component:null},emits:["update:modelValue"],components:{FormField:Kt},computed:{type:function(){if(this.varType)return this.varType;var e=this.uicontrol;return e&&cn[e]?cn[e]:"string"},field:function(){return{uiControl:this.uicontrol,type:this.type,name:this.name,defaultValue:this.defaultValue,availableValues:this.options,description:this.description,introduction:this.introduction,inlineHelp:this.inlineHelp,title:this.title,uiControlAttributes:an(an({},this.uiControlAttributes),{},{disabled:this.disabled,autocomplete:this.autocomplete,tabindex:this.tabindex,autofocus:this.autofocus,rows:this.rows,required:this.required,maxlength:this.maxlength,placeholder:this.placeholder,min:this.min,max:this.max}),fullWidth:this.fullWidth,uiControlOptions:this.uiControlOptions}}},methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});sn.render=on;var dn=sn;function mn(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 fn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach((function(t){pn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pn(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 rn(e){if(e){var t=e.plugin,n=e.name;if(!t||!n)throw new Error("Invalid component property given to piwik-field directive, must be {plugin: '...',name: '...'}");return Xt(t,n)}}function on(e,t){var n={};return Object.values(e.allSettings||{}).forEach((function(e){"0"===e.value?n[e.name]=0:n[e.name]=e.value})),e.$eval(t,n)}Object(i["createAngularJsAdapter"])({component:Kt,scope:{modelValue:{default:function(e){var t=e.piwikFormField;return"string"!==typeof t.value||!t.value||"array"!==t.type&&"multituple"!==t.uiControl&&"field-array"!==t.uiControl&&"multiselect"!==t.uiControl&&"site"!==t.uiControl||(t.value=JSON.parse(t.value)),"checkbox"===t.uiControl?Object(i["transformAngularJsBoolAttr"])(t.value):t.value}},piwikFormField:{vue:"formField",angularJsBind:"=",transform:function(e,t,n){return tn(tn({},e),{},{condition:e.condition?on.bind(null,n,e.condition):e.condition,disabled:Object(i["transformAngularJsBoolAttr"])(e.disabled),autocomplete:Object(i["transformAngularJsBoolAttr"])(e.autocomplete),autofocus:Object(i["transformAngularJsBoolAttr"])(e.autofocus),tabindex:Object(i["transformAngularJsIntAttr"])(e.tabindex),fullWidth:Object(i["transformAngularJsBoolAttr"])(e.fullWidth),maxlength:Object(i["transformAngularJsIntAttr"])(e.maxlength),required:Object(i["transformAngularJsBoolAttr"])(e.required),rows:Object(i["transformAngularJsIntAttr"])(e.rows),min:Object(i["transformAngularJsIntAttr"])(e.min),max:Object(i["transformAngularJsIntAttr"])(e.max),component:Object(l["shallowRef"])(e.templateFile?Qt:rn(e.component))})}},allSettings:{angularJsBind:"="}},directiveName:"piwikFormField",events:{"update:modelValue":function(e,t,n,r,o,i,l){e!==n.piwikFormField.value&&l((function(){n.piwikFormField.value=e}))}},$inject:["$timeout"],postCreate:function(e,t){t.$watch("piwikFormField.value",(function(t,n){t!==n&&(e.modelValue=t)})),t.$watch("allSettings",(function(){e.formField=tn(tn({},e.formField),{},{condition:t.piwikFormField.condition?on.bind(null,t,t.piwikFormField.condition):t.piwikFormField.condition})}),!0)}});function ln(e,t,n,r,o,i){var a=Object(l["resolveComponent"])("FormField");return Object(l["openBlock"])(),Object(l["createBlock"])(a,{"form-field":e.field,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)}),component:e.component},null,8,["form-field","model-value","component"])}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 un(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){cn(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 cn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var sn={multiselect:"array",checkbox:"boolean",site:"object",number:"integer"},dn=Object(l["defineComponent"])({props:{modelValue:null,uicontrol:String,name:String,defaultValue:null,options:[Object,Array],description:String,introduction:String,title:String,inlineHelp:String,disabled:Boolean,uiControlAttributes:{type:Object,default:function(){return{}}},uiControlOptions:{type:Object,default:function(){return{}}},autocomplete:Boolean,condition:Function,varType:String,autofocus:Boolean,tabindex:Number,fullWidth:Boolean,maxlength:Number,required:Boolean,placeholder:String,rows:Number,min:Number,max:Number,component:null},emits:["update:modelValue"],components:{FormField:Kt},computed:{type:function(){return this.varType?this.varType:sn[this.uicontrol]?sn[this.uicontrol]:"string"},field:function(){return{uiControl:this.uicontrol,type:this.type,name:this.name,defaultValue:this.defaultValue,availableValues:this.options,description:this.description,introduction:this.introduction,inlineHelp:this.inlineHelp,title:this.title,uiControlAttributes:un(un({},this.uiControlAttributes),{},{disabled:this.disabled,autocomplete:this.autocomplete,tabindex:this.tabindex,autofocus:this.autofocus,rows:this.rows,required:this.required,maxlength:this.maxlength,placeholder:this.placeholder,min:this.min,max:this.max}),fullWidth:this.fullWidth,uiControlOptions:this.uiControlOptions}}},methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});dn.render=ln;var mn=dn;function fn(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 pn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fn(Object(n),!0).forEach((function(t){bn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function bn(e,t,n){if("string"===typeof e&&e&&("array"===t||"multituple"===n||"field-array"===n||"multiselect"===n||"site"===n)){var r=JSON.parse(e);return"site"===n&&(r.name=i["Matomo"].helper.htmlDecode(r.name)),r}return"checkbox"===n&&"array"!==t?Object(i["transformAngularJsBoolAttr"])(e):e}Object(i["createAngularJsAdapter"])({component:dn,require:"?ngModel",scope:{uicontrol:{angularJsBind:"@"},name:{angularJsBind:"@"},value:{vue:"modelValue",angularJsBind:"@",transform:function(e,t,n){return bn(e,n.varType,n.uicontrol)}},default:{vue:"defaultValue",angularJsBind:"@"},options:{angularJsBind:"="},description:{angularJsBind:"@"},introduction:{angularJsBind:"@"},title:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@"},disabled:{angularJsBind:"=",transform:i["transformAngularJsBoolAttr"]},uiControlAttributes:{angularJsBind:"="},uiControlOptions:{angularJsBind:"="},autocomplete:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},condition:{angularJsBind:"@",transform:function(e,t,n){if(e)return function(t){return n.$eval(e,t)}}},varType:{angularJsBind:"@"},autofocus:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},tabindex:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},fullWidth:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},maxlength:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},required:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},placeholder:{angularJsBind:"@"},rows:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},min:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},max:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},component:{angularJsBind:"<",transform:function(e,t,n){if(e){if(n.templateFile)return Object(l["shallowRef"])(Qt);var r=e.plugin,o=e.name;if(!r||!o)throw new Error("Invalid component property given to piwik-field directive, must be {plugin: '...',name: '...'}");return Object(l["shallowRef"])(Object(i["useExternalPluginComponent"])(r,o))}}}},directiveName:"piwikField",$inject:["$timeout"],events:{"update:modelValue":function(e,t,n,r,o,i,l){var a=i?i.$viewValue:n.value;e!==a&&l((function(){i?(i.$setViewValue(e),i.$render()):n.value=e}))}},postCreate:function(e,t,n,r,o){var a=o;if(a){if(a.$render=function(){Object(l["nextTick"])((function(){e.modelValue=Object(i["removeAngularJsSpecificProperties"])(a.$viewValue)}))},"undefined"!==typeof t.value){var u=bn(t.value,t.varType,t.uicontrol);a.$setViewValue(u)}else a.$setViewValue(e.modelValue);"site"===t.uicontrol&&a.$viewValue&&setTimeout((function(){a.$setViewValue(fn({},a.$viewValue))}))}else t.$watch("value",(function(n){if(n!==e.modelValue){var r=bn(n,t.varType,t.uicontrol);Object(l["nextTick"])((function(){e.modelValue=r}))}}))}});var vn,gn={class:"pluginSettings",ref:"root"},hn=["id"],On={class:"card-content"},yn=["id"],jn=["onClick","disabled","value"],wn={class:"confirm-password-modal modal"},Vn={class:"modal-content"},Cn={class:"modal-footer"},Sn=["disabled"];function kn(e,t,n,r,o,i){var a=this,u=Object(l["resolveComponent"])("PluginSetting"),c=Object(l["resolveComponent"])("ActivityIndicator"),s=Object(l["resolveComponent"])("Field");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",gn,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.settingsPerPlugin,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{class:"card",id:"".concat(t.pluginName,"PluginSettings"),key:"".concat(t.pluginName,"PluginSettings")},[Object(l["createElementVNode"])("div",On,[Object(l["createElementVNode"])("h2",{class:"card-title",id:t.pluginName},Object(l["toDisplayString"])(t.title),9,yn),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.settings,(function(n){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:"".concat(n.pluginName,".").concat(n.name)},[Object(l["createVNode"])(u,{modelValue:e.settingValues["".concat(t.pluginName,".").concat(n.name)],"onUpdate:modelValue":function(r){return e.settingValues["".concat(t.pluginName,".").concat(n.name)]=r},"plugin-name":t.pluginName,setting:n,"setting-values":e.settingValues},null,8,["modelValue","onUpdate:modelValue","plugin-name","setting","setting-values"])])})),128)),Object(l["createElementVNode"])("input",{type:"button",onClick:function(n){return e.saveSetting(t.pluginName)},disabled:e.isLoading,class:"pluginsSettingsSubmit btn",value:e.translate("General_Save")},null,8,jn),Object(l["createVNode"])(c,{loading:e.isLoading||e.isSaving[t.pluginName]},null,8,["loading"])])],8,hn)})),128)),Object(l["createElementVNode"])("div",wn,[Object(l["createElementVNode"])("div",Vn,[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(s,{modelValue:e.passwordConfirmation,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.passwordConfirmation=t}),uicontrol:"password",name:"currentUserPassword",autocomplete:!1,"full-width":!0,title:e.translate("UsersManager_YourCurrentPassword")},null,8,["modelValue","title"])])]),Object(l["createElementVNode"])("div",Cn,[Object(l["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",disabled:e.passwordConfirmation?void 0:"disabled",onClick:t[1]||(t[1]=function(t){t.preventDefault(),e.save(a.settingsToSave)})},Object(l["toDisplayString"])(e.translate("General_Yes")),9,Sn),Object(l["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[2]||(t[2]=function(e){return e.preventDefault()})},Object(l["toDisplayString"])(e.translate("General_No")),1)])])],512)}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 Fn(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){En(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 En(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bn(e,t,n,r,o,i){var a=Object(l["resolveComponent"])("FormField");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createVNode"])(a,{"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.changeValue(t)}),"form-field":Fn(Fn({},e.setting),{},{condition:e.conditionFunction})},null,8,["model-value","form-field"])])}function xn(e,t){return Mn(e)||$n(e,t)||Nn(e,t)||Pn()}function Pn(){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 Nn(e,t){if(e){if("string"===typeof e)return Tn(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)?Tn(e,t):void 0}}function Tn(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 $n(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done);l=!0)if(i.push(r.value),t&&i.length===t)break}catch(u){a=!0,o=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw o}}return i}}function Mn(e){if(Array.isArray(e))return e}var Dn=Object(l["defineComponent"])({props:{pluginName:{type:String,required:!0},setting:{type:Object,required:!0},modelValue:null,settingValues:Object},components:{FormField:Kt},emits:["update:modelValue"],computed:{conditionFunction:function(){var e=this,t=this.setting.condition;if(t)return function(){if(!vn){var n=i["Matomo"].helper.getAngularDependency("$rootScope");vn=n.$new(!0)}return vn.$eval(t,e.conditionValues)}},conditionValues:function(){var e=this,t={};return Object.entries(this.settingValues).forEach((function(n){var r=xn(n,2),o=r[0],i=r[1],l=o.split("."),a=xn(l,2),u=a[0],c=a[1];u===e.pluginName&&(t[c]=i)})),t}},methods:{changeValue:function(e){this.$emit("update:modelValue",e)}}});Dn.render=Bn;var Jn=Dn;function Hn(e,t){return Kn(e)||Un(e,t)||Ln(e,t)||In()}function In(){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 Ln(e,t){if(e){if("string"===typeof e)return zn(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)?zn(e,t):void 0}}function zn(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 Un(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done);l=!0)if(i.push(r.value),t&&i.length===t)break}catch(u){a=!0,o=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw o}}return i}}function Kn(e){if(Array.isArray(e))return e}var _n=window,qn=_n.$,Rn=Object(l["defineComponent"])({props:{mode:String},components:{ActivityIndicator:i["ActivityIndicator"],Field:dn,PluginSetting:Jn},data:function(){return{isLoading:!0,isSaving:{},passwordConfirmation:"",settingsToSave:null,settingsPerPlugin:[],settingValues:{}}},created:function(){var e=this;i["AjaxHelper"].fetch({method:this.apiMethod}).then((function(t){e.isLoading=!1,e.settingsPerPlugin=t,t.forEach((function(t){t.settings.forEach((function(n){e.settingValues["".concat(t.pluginName,".").concat(n.name)]=n.value}))})),window.anchorLinkFix.scrollToAnchorInUrl(),e.addSectionsToTableOfContents()})).catch((function(){e.isLoading=!1}))},computed:{apiMethod:function(){return"admin"===this.mode?"CorePluginsAdmin.getSystemSettings":"CorePluginsAdmin.getUserSettings"},saveApiMethod:function(){return"admin"===this.mode?"CorePluginsAdmin.setSystemSettings":"CorePluginsAdmin.setUserSettings"}},methods:{addSectionsToTableOfContents:function(){var e=qn("#generalSettingsTOC");if(e.length){var t=this.settingsPerPlugin;t.forEach((function(t){var n=t.pluginName,r=t.settings;n&&("CoreAdminHome"===n&&r?r.filter((function(e){return e.introduction})).forEach((function(t){e.append('<a href="#/'.concat(n,'PluginSettings">').concat(t.introduction,"</a> "))})):e.append('<a href="#/'.concat(n,'">').concat(n.replace(/([A-Z])/g," $1").trim(),"</a> ")))}))}},saveSetting:function(e){"admin"===this.mode?this.showPasswordConfirmModal(e):this.save(e)},showPasswordConfirmModal:function(e){var t=this;this.settingsToSave=e;var n=this.$refs.root,r=qn(n),o=function(n){var o=n.keyCode?n.keyCode:n.which;13===o&&(r.find(".confirm-password-modal").modal("close"),t.save(e))};r.find(".confirm-password-modal").modal({dismissible:!1,onOpenEnd:function(){var e=".modal.open #currentUserPassword";qn(e).focus(),qn(e).off("keypress").keypress(o)}}).modal("open")},save:function(e){var t=this,n=this.saveApiMethod;this.isSaving[e]=!0;var r=this.getValuesForPlugin(e);i["AjaxHelper"].post({method:n},{settingValues:r,passwordConfirmation:this.passwordConfirmation}).then((function(){t.isSaving[e]=!1,i["NotificationsStore"].show({message:Object(i["translate"])("CoreAdminHome_PluginSettingsSaveSuccess"),id:"generalSettings",context:"success",type:"transient"}),i["NotificationsStore"].scrollToNotification("generalSettings")})).catch((function(){t.isSaving[e]=!1})),this.passwordConfirmation="",this.settingsToSave=null},getValuesForPlugin:function(e){var t={};return t[e]||(t[e]=[]),Object.entries(this.settingValues).forEach((function(n){var r=Hn(n,2),o=r[0],i=r[1],l=o.split("."),a=Hn(l,2),u=a[0],c=a[1];if(u===e){var s=i;!1===s?s="0":!0===s&&(s="1"),t[u].push({name:c,value:s})}})),t}}});Rn.render=kn;var Wn=Rn,Gn=(Object(i["createAngularJsAdapter"])({component:Wn,scope:{mode:{angularJsBind:"@"}},directiveName:"piwikPluginSettings"}),window),Zn=Gn.$; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function vn(e,t,n){if("string"===typeof e&&e&&("array"===t||"multituple"===n||"field-array"===n||"multiselect"===n||"site"===n)){var r=JSON.parse(e);return"site"===n&&(r.name=i["Matomo"].helper.htmlDecode(r.name)),r}return"checkbox"===n&&"array"!==t?Object(i["transformAngularJsBoolAttr"])(e):e}Object(i["createAngularJsAdapter"])({component:mn,require:"?ngModel",scope:{uicontrol:{angularJsBind:"@"},name:{angularJsBind:"@"},value:{vue:"modelValue",angularJsBind:"@",transform:function(e,t,n){return vn(e,n.varType,n.uicontrol)}},default:{vue:"defaultValue",angularJsBind:"@"},options:{angularJsBind:"="},description:{angularJsBind:"@"},introduction:{angularJsBind:"@"},title:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@"},disabled:{angularJsBind:"=",transform:i["transformAngularJsBoolAttr"]},uiControlAttributes:{angularJsBind:"="},uiControlOptions:{angularJsBind:"="},autocomplete:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},condition:{angularJsBind:"@",transform:function(e,t,n){var r=e;return e&&(r=function(t){return n.$eval(e,t)}),r}},varType:{angularJsBind:"@"},autofocus:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},tabindex:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},fullWidth:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},maxlength:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},required:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},placeholder:{angularJsBind:"@"},rows:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},min:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},max:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},component:{angularJsBind:"<",transform:function(e,t,n){if(!e)return e;if(n.templateFile)return Object(l["shallowRef"])(Qt);var r=e.plugin,o=e.name;if(!r||!o)throw new Error("Invalid component property given to piwik-field directive, must be {plugin: '...',name: '...'}");return Object(l["shallowRef"])(Object(i["useExternalPluginComponent"])(r,o))}}},directiveName:"piwikField",$inject:["$timeout"],events:{"update:modelValue":function(e,t,n,r,o,i,l){var a=i?i.$viewValue:n.value;e!==a&&l((function(){i?(i.$setViewValue(e),i.$render()):n.value=e}))}},postCreate:function(e,t,n,r,o){var a=o;if(a){if(a.$render=function(){Object(l["nextTick"])((function(){e.modelValue=Object(i["removeAngularJsSpecificProperties"])(a.$viewValue)}))},"undefined"!==typeof t.value){var u=vn(t.value,t.varType,t.uicontrol);a.$setViewValue(u)}else a.$setViewValue(e.modelValue);"site"===t.uicontrol&&a.$viewValue&&setTimeout((function(){a.$setViewValue(pn({},a.$viewValue))}))}else t.$watch("value",(function(n){if(n!==e.modelValue){var r=vn(n,t.varType,t.uicontrol);Object(l["nextTick"])((function(){e.modelValue=r}))}}))}});var gn,hn={class:"pluginSettings",ref:"root"},On=["id"],yn={class:"card-content"},jn=["id"],wn=["onClick","disabled","value"],Vn={class:"confirm-password-modal modal"},Cn={class:"modal-content"},Sn={class:"modal-footer"},kn=["disabled"];function An(e,t,n,r,o,i){var a=this,u=Object(l["resolveComponent"])("PluginSetting"),c=Object(l["resolveComponent"])("ActivityIndicator"),s=Object(l["resolveComponent"])("Field");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",hn,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.settingsPerPlugin,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{class:"card",id:"".concat(t.pluginName,"PluginSettings"),key:"".concat(t.pluginName,"PluginSettings")},[Object(l["createElementVNode"])("div",yn,[Object(l["createElementVNode"])("h2",{class:"card-title",id:t.pluginName},Object(l["toDisplayString"])(t.title),9,jn),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.settings,(function(n){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:"".concat(n.pluginName,".").concat(n.name)},[Object(l["createVNode"])(u,{modelValue:e.settingValues["".concat(t.pluginName,".").concat(n.name)],"onUpdate:modelValue":function(r){return e.settingValues["".concat(t.pluginName,".").concat(n.name)]=r},"plugin-name":t.pluginName,setting:n,"setting-values":e.settingValues},null,8,["modelValue","onUpdate:modelValue","plugin-name","setting","setting-values"])])})),128)),Object(l["createElementVNode"])("input",{type:"button",onClick:function(n){return e.saveSetting(t.pluginName)},disabled:e.isLoading,class:"pluginsSettingsSubmit btn",value:e.translate("General_Save")},null,8,wn),Object(l["createVNode"])(c,{loading:e.isLoading||e.isSaving[t.pluginName]},null,8,["loading"])])],8,On)})),128)),Object(l["createElementVNode"])("div",Vn,[Object(l["createElementVNode"])("div",Cn,[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(s,{modelValue:e.passwordConfirmation,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.passwordConfirmation=t}),uicontrol:"password",name:"currentUserPassword",autocomplete:!1,"full-width":!0,title:e.translate("UsersManager_YourCurrentPassword")},null,8,["modelValue","title"])])]),Object(l["createElementVNode"])("div",Sn,[Object(l["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",disabled:e.passwordConfirmation?void 0:"disabled",onClick:t[1]||(t[1]=function(t){t.preventDefault(),e.save(a.settingsToSave)})},Object(l["toDisplayString"])(e.translate("General_Yes")),9,kn),Object(l["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[2]||(t[2]=function(e){return e.preventDefault()})},Object(l["toDisplayString"])(e.translate("General_No")),1)])])],512)}function Fn(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?Fn(Object(n),!0).forEach((function(t){Bn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xn(e,t,n,r,o,i){var a=Object(l["resolveComponent"])("FormField");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createVNode"])(a,{"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.changeValue(t)}),"form-field":En(En({},e.setting),{},{condition:e.conditionFunction})},null,8,["model-value","form-field"])])}function Pn(e,t){return Dn(e)||Mn(e,t)||Tn(e,t)||Nn()}function Nn(){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 Tn(e,t){if(e){if("string"===typeof e)return $n(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)?$n(e,t):void 0}}function $n(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 Mn(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done);l=!0)if(i.push(r.value),t&&i.length===t)break}catch(u){a=!0,o=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw o}}return i}}function Dn(e){if(Array.isArray(e))return e}var Jn=Object(l["defineComponent"])({props:{pluginName:String,setting:Object,modelValue:null,settingValues:Object},components:{FormField:Kt},emits:["update:modelValue"],computed:{conditionFunction:function(){var e=this,t=this.setting.condition;if(t)return function(){if(!gn){var n=i["Matomo"].helper.getAngularDependency("$rootScope");gn=n.$new(!0)}return gn.$eval(t,e.conditionValues)}},conditionValues:function(){var e=this,t={};return Object.entries(this.settingValues).forEach((function(n){var r=Pn(n,2),o=r[0],i=r[1],l=o.split("."),a=Pn(l,2),u=a[0],c=a[1];u===e.pluginName&&(t[c]=i)})),t}},methods:{changeValue:function(e){this.$emit("update:modelValue",e)}}});Jn.render=xn;var Hn=Jn;function In(e,t){return _n(e)||Kn(e,t)||zn(e,t)||Ln()}function Ln(){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 zn(e,t){if(e){if("string"===typeof e)return Un(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)?Un(e,t):void 0}}function Un(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 Kn(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done);l=!0)if(i.push(r.value),t&&i.length===t)break}catch(u){a=!0,o=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw o}}return i}}function _n(e){if(Array.isArray(e))return e}var qn=window,Rn=qn.$,Wn=Object(l["defineComponent"])({props:{mode:String},components:{ActivityIndicator:i["ActivityIndicator"],Field:mn,PluginSetting:Hn},data:function(){return{isLoading:!0,isSaving:{},passwordConfirmation:"",settingsToSave:null,settingsPerPlugin:[],settingValues:{}}},created:function(){var e=this;i["AjaxHelper"].fetch({method:this.apiMethod}).then((function(t){e.isLoading=!1,e.settingsPerPlugin=t,t.forEach((function(t){t.settings.forEach((function(n){e.settingValues["".concat(t.pluginName,".").concat(n.name)]=n.value}))})),window.anchorLinkFix.scrollToAnchorInUrl(),e.addSectionsToTableOfContents()})).catch((function(){e.isLoading=!1}))},computed:{apiMethod:function(){return"admin"===this.mode?"CorePluginsAdmin.getSystemSettings":"CorePluginsAdmin.getUserSettings"},saveApiMethod:function(){return"admin"===this.mode?"CorePluginsAdmin.setSystemSettings":"CorePluginsAdmin.setUserSettings"}},methods:{addSectionsToTableOfContents:function(){var e=Rn("#generalSettingsTOC");e.length&&this.settingsPerPlugin.forEach((function(t){var n=t.pluginName,r=t.settings;n&&("CoreAdminHome"===n&&r?r.filter((function(e){return e.introduction})).forEach((function(t){e.append('<a href="#/'.concat(n,'PluginSettings">').concat(t.introduction,"</a> "))})):e.append('<a href="#/'.concat(n,'">').concat(n.replace(/([A-Z])/g," $1").trim(),"</a> ")))}))},saveSetting:function(e){"admin"===this.mode?this.showPasswordConfirmModal(e):this.save(e)},showPasswordConfirmModal:function(e){var t=this;this.settingsToSave=e;var n=this.$refs.root,r=Rn(n),o=function(n){var o=n.keyCode?n.keyCode:n.which;"13"===o&&(r.find(".confirm-password-modal").modal("close"),t.save(e))};r.find(".confirm-password-modal").modal({dismissible:!1,onOpenEnd:function(){var e=".modal.open #currentUserPassword";Rn(e).focus(),Rn(e).off("keypress").keypress(o)}}).modal("open")},save:function(e){var t=this,n=this.saveApiMethod;this.isSaving[e]=!0;var r=this.getValuesForPlugin(e);i["AjaxHelper"].post({method:n},{settingValues:r,passwordConfirmation:this.passwordConfirmation}).then((function(){t.isSaving[e]=!1,i["NotificationsStore"].show({message:Object(i["translate"])("CoreAdminHome_PluginSettingsSaveSuccess"),id:"generalSettings",context:"success",type:"transient"}),i["NotificationsStore"].scrollToNotification("generalSettings")})).catch((function(){t.isSaving[e]=!1})),this.passwordConfirmation="",this.settingsToSave=null},getValuesForPlugin:function(e){var t={};return t[e]||(t[e]=[]),Object.entries(this.settingValues).forEach((function(n){var r=In(n,2),o=r[0],i=r[1],l=o.split("."),a=In(l,2),u=a[0],c=a[1];if(u===e){var s=i;!1===s?s="0":!0===s&&(s="1"),t[u].push({name:c,value:s})}})),t}}});Wn.render=An;var Gn=Wn,Zn=(Object(i["createAngularJsAdapter"])({component:Gn,scope:{mode:{angularJsBind:"@"}},directiveName:"piwikPluginSettings"}),window),Yn=Zn.$; + */function Yn(e,t){t.preventDefault();var n=Zn(t.target).attr("href"),r=Zn(t.target).attr("data-plugin-name");if(n&&r){e.value.uninstallConfirmMessage||(e.value.uninstallConfirmMessage=Zn("#uninstallPluginConfirm").text());var o=(e.value.uninstallConfirmMessage||"").replace("%s",r);Zn("#uninstallPluginConfirm").text(o),i["Matomo"].helper.modalConfirm("#confirmUninstallPlugin",{yes:function(){window.location.href=n}})}}function Qn(e){e.preventDefault();var t=Zn(e.target).data("overlay-id");i["Matomo"].helper.modalConfirm("#".concat(t),{})}var Xn={mounted:function(e,t){setTimeout((function(){t.value.uninstallConfirmMessage="",Zn(e).find(".uninstall").click(Yn.bind(null,t)),Zn(e).find(".plugin-donation-link").click(Qn)}))}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Qn(e,t){t.preventDefault();var n=Yn(t.target).attr("href"),r=Yn(t.target).attr("data-plugin-name");if(n&&r){e.value.uninstallConfirmMessage||(e.value.uninstallConfirmMessage=Yn("#uninstallPluginConfirm").text());var o=e.value.uninstallConfirmMessage.replace("%s",r);Yn("#uninstallPluginConfirm").text(o),i["Matomo"].helper.modalConfirm("#confirmUninstallPlugin",{yes:function(){window.location=n}})}}function Xn(e){e.preventDefault();var t=Yn(e.target).data("overlay-id");i["Matomo"].helper.modalConfirm("#".concat(t),{})}var er={mounted:function(e,t){setTimeout((function(){t.value.uninstallConfirmMessage="",Yn(e).find(".uninstall").click(Qn.bind(null,t)),Yn(e).find(".plugin-donation-link").click(Xn)}))}}; -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function tr(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{},oldValue:null,modifiers:{},dir:{}};er.mounted(t[0],n)}}}tr.$inject=[],angular.module("piwikApp").directive("piwikPluginManagement",tr); + */function er(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{},oldValue:null,modifiers:{},dir:{}};Xn.mounted(t[0],n)}}}window.angular.module("piwikApp").directive("piwikPluginManagement",er); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -var nr=window,rr=nr.$;function or(e){e.preventDefault(),i["Matomo"].helper.modalConfirm("#installPluginByUpload",{})}function ir(e){var t=rr("[name=pluginZip]"),n=t.val();n&&".zip"===n.slice(-4)?t.data("maxSize")>0&&t[0].files[0].size>1048576*t.data("maxSize")&&(e.preventDefault(),alert(Object(i["translate"])("CorePluginsAdmin_FileExceedsUploadLimit"))):(e.preventDefault(),alert(Object(i["translate"])("CorePluginsAdmin_NoZipFileSelected")))}var lr={mounted:function(){setTimeout((function(){rr(".uploadPlugin").click(or),rr("#uploadPluginForm").submit(ir)}))}}; +var tr=window,nr=tr.$;function rr(e){e.preventDefault(),i["Matomo"].helper.modalConfirm("#installPluginByUpload",{})}function or(e){var t=nr("[name=pluginZip]"),n=t.val();n&&".zip"===n.slice(-4)?t.data("maxSize")>0&&t[0].files[0].size>1048576*t.data("maxSize")&&(e.preventDefault(),alert(Object(i["translate"])("CorePluginsAdmin_FileExceedsUploadLimit"))):(e.preventDefault(),alert(Object(i["translate"])("CorePluginsAdmin_NoZipFileSelected")))}var ir={mounted:function(){setTimeout((function(){nr(".uploadPlugin").click(rr),nr("#uploadPluginForm").submit(or)}))}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ar(){return{restrict:"A",link:function(){lr.mounted()}}}ar.$inject=[],angular.module("piwikApp").directive("piwikPluginUpload",ar); + */function lr(){return{restrict:"A",link:function(){ir.mounted()}}}window.angular.module("piwikApp").directive("piwikPluginUpload",lr); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -var ur=window,cr=ur.$;function sr(e){return e.find(".origin a.active").data("filter-origin")}function dr(e){return e.find(".status a.active").data("filter-status")}function mr(e,t){var n="#plugins tr";return n+="all"===e?"[data-filter-origin]":"[data-filter-origin=".concat(e,"]"),n+="all"===t?"[data-filter-status]":"[data-filter-status=".concat(t,"]"),cr(n)}function fr(e,t,n,r){var o=mr(n,r).length,i=" (".concat(o,")");e.find("".concat(t," .counter")).text(i)}function pr(e){var t=sr(e),n=dr(e);fr(e,'[data-filter-status="all"]',t,"all"),fr(e,'[data-filter-status="active"]',t,"active"),fr(e,'[data-filter-status="inactive"]',t,"inactive"),fr(e,'[data-filter-origin="all"]',"all",n),fr(e,'[data-filter-origin="core"]',"core",n),fr(e,'[data-filter-origin="official"]',"official",n),fr(e,'[data-filter-origin="thirdparty"]',"thirdparty",n)}function br(e){var t=sr(e),n=dr(e),r=mr(t,n);cr("#plugins tr[data-filter-origin][data-filter-status]").css("display","none"),r.css("display","table-row"),pr(e)}function vr(e,t){t.preventDefault(),cr(t.target).siblings().removeClass("active"),cr(t.target).addClass("active"),br(e)}function gr(e,t){t.preventDefault(),cr(t.target).siblings().removeClass("active"),cr(t.target).addClass("active"),br(e)}var hr={mounted:function(e){setTimeout((function(){pr(cr(e)),cr(e).find(".status").on("click","a",vr.bind(null,cr(e))),cr(e).find(".origin").on("click","a",gr.bind(null,cr(e)))}))}}; +var ar=window,ur=ar.$;function cr(e){return e.find(".origin a.active").data("filter-origin")}function sr(e){return e.find(".status a.active").data("filter-status")}function dr(e,t){var n="#plugins tr";return n+="all"===e?"[data-filter-origin]":"[data-filter-origin=".concat(e,"]"),n+="all"===t?"[data-filter-status]":"[data-filter-status=".concat(t,"]"),ur(n)}function mr(e,t,n,r){var o=dr(n,r).length,i=" (".concat(o,")");e.find("".concat(t," .counter")).text(i)}function fr(e){var t=cr(e),n=sr(e);mr(e,'[data-filter-status="all"]',t,"all"),mr(e,'[data-filter-status="active"]',t,"active"),mr(e,'[data-filter-status="inactive"]',t,"inactive"),mr(e,'[data-filter-origin="all"]',"all",n),mr(e,'[data-filter-origin="core"]',"core",n),mr(e,'[data-filter-origin="official"]',"official",n),mr(e,'[data-filter-origin="thirdparty"]',"thirdparty",n)}function pr(e){var t=cr(e),n=sr(e),r=dr(t,n);ur("#plugins tr[data-filter-origin][data-filter-status]").css("display","none"),r.css("display","table-row"),fr(e)}function br(e,t){t.preventDefault(),ur(t.target).siblings().removeClass("active"),ur(t.target).addClass("active"),pr(e)}function vr(e,t){t.preventDefault(),ur(t.target).siblings().removeClass("active"),ur(t.target).addClass("active"),pr(e)}var gr={mounted:function(e){setTimeout((function(){fr(ur(e)),ur(e).find(".status").on("click","a",br.bind(null,ur(e))),ur(e).find(".origin").on("click","a",vr.bind(null,ur(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 Or(){return{restrict:"A",link:function(e,t){hr.mounted(t[0])}}}Or.$inject=[],angular.module("piwikApp").directive("piwikPluginFilter",Or);var yr={class:"matomo-save-button",style:{display:"inline-block"}},jr=["disabled","value"];function wr(e,t,n,r,o,i){var a=Object(l["resolveComponent"])("ActivityIndicator");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",yr,[Object(l["createElementVNode"])("input",{type:"button",onClick:t[0]||(t[0]=function(t){return e.onConfirm(t)}),disabled:e.saving||e.disabled,class:"btn",value:e.value?e.value:e.translate("General_Save")},null,8,jr),Object(l["createVNode"])(a,{loading:e.saving},null,8,["loading"])])}var Vr=Object(l["defineComponent"])({props:{saving:Boolean,value:String,disabled:Boolean},components:{ActivityIndicator:i["ActivityIndicator"]},emits:["confirm"],methods:{onConfirm:function(e){this.$emit("confirm",e)}}});Vr.render=wr;var Cr=Vr,Sr=(Object(i["createAngularJsAdapter"])({component:Cr,scope:{saving:{angularJsBind:"=?"},value:{angularJsBind:"@?"},disabled:{angularJsBind:"=?"},onconfirm:{angularJsBind:"&?",vue:"confirm"}},events:{confirm:function(e,t,n,r,o,i,l){r[0].click(),l()}},replace:!0,directiveName:"piwikSaveButton",$inject:["$timeout"]}),window),kr=Sr.$,Ar={mounted:function(e){setTimeout((function(){kr(e).find("input[type=text]").keypress((function(t){var n=t.keyCode||t.which;13===n&&kr(e).find(".matomo-save-button input").triggerHandler("click")}))}))}}; + */function hr(){return{restrict:"A",link:function(e,t){gr.mounted(t[0])}}}window.angular.module("piwikApp").directive("piwikPluginFilter",hr);var Or={class:"matomo-save-button",style:{display:"inline-block"}},yr=["disabled","value"];function jr(e,t,n,r,o,i){var a=Object(l["resolveComponent"])("ActivityIndicator");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Or,[Object(l["createElementVNode"])("input",{type:"button",onClick:t[0]||(t[0]=function(t){return e.onConfirm(t)}),disabled:e.saving||e.disabled,class:"btn",value:e.value?e.value:e.translate("General_Save")},null,8,yr),Object(l["createVNode"])(a,{loading:e.saving},null,8,["loading"])])}var wr=Object(l["defineComponent"])({props:{saving:Boolean,value:String,disabled:Boolean},components:{ActivityIndicator:i["ActivityIndicator"]},emits:["confirm"],methods:{onConfirm:function(e){this.$emit("confirm",e)}}});wr.render=jr;var Vr=wr,Cr=(Object(i["createAngularJsAdapter"])({component:Vr,scope:{saving:{angularJsBind:"=?"},value:{angularJsBind:"@?"},disabled:{angularJsBind:"=?"},onconfirm:{angularJsBind:"&?",vue:"confirm"}},events:{confirm:function(e,t,n,r,o,i,l){r[0].click(),l()}},replace:!0,directiveName:"piwikSaveButton",$inject:["$timeout"]}),window),Sr=Cr.$,kr={mounted:function(e){setTimeout((function(){Sr(e).find("input[type=text]").keypress((function(t){var n=t.keyCode||t.which;13===n&&Sr(e).find(".matomo-save-button input").triggerHandler("click")}))}))}}; /*! * Matomo - free/libre analytics platform * @@ -73,5 +67,5 @@ var ur=window,cr=ur.$;function sr(e){return e.find(".origin a.active").data("fil * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Fr(){return{restrict:"A",link:function(e,t){Ar.mounted(t[0])}}}Fr.$inject=[],angular.module("piwikApp").directive("piwikForm",Fr)}})})); +function Ar(){return{restrict:"A",link:function(e,t){kr.mounted(t[0])}}}window.angular.module("piwikApp").directive("piwikForm",Ar)}})})); //# sourceMappingURL=CorePluginsAdmin.umd.min.js.map
\ No newline at end of file diff --git a/plugins/CorePluginsAdmin/vue/src/Field/Field.adapter.ts b/plugins/CorePluginsAdmin/vue/src/Field/Field.adapter.ts index 10f8a6847b..209428c76a 100644 --- a/plugins/CorePluginsAdmin/vue/src/Field/Field.adapter.ts +++ b/plugins/CorePluginsAdmin/vue/src/Field/Field.adapter.ts @@ -5,7 +5,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import { INgModelController, ITimeoutService } from 'angular'; +import { INgModelController, IScope, ITimeoutService } from 'angular'; import { nextTick, shallowRef } from 'vue'; import { createAngularJsAdapter, @@ -18,7 +18,7 @@ import { import Field from './Field.vue'; import FieldAngularJsTemplate from '../FormField/FieldAngularJsTemplate.vue'; -function handleJsonValue(value: unknown, varType: string, uiControl: string) { +function handleJsonValue(value: unknown, varType: string, uiControl: string): unknown { if (typeof value === 'string' && value && (varType === 'array' @@ -46,6 +46,11 @@ function handleJsonValue(value: unknown, varType: string, uiControl: string) { return value; } +interface ExternalComponentRef { + plugin: string; + name: string; +} + export default createAngularJsAdapter<[ITimeoutService]>({ component: Field, require: '?ngModel', @@ -59,7 +64,8 @@ export default createAngularJsAdapter<[ITimeoutService]>({ value: { vue: 'modelValue', angularJsBind: '@', - transform(value, vm, scope) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + transform(value: unknown, vm: unknown, scope: any): unknown { // vue components expect object data as input, so we parse JSON data // for angularjs directives that use JSON. return handleJsonValue(value, scope.varType, scope.uicontrol); @@ -100,12 +106,16 @@ export default createAngularJsAdapter<[ITimeoutService]>({ }, condition: { angularJsBind: '@', - transform(value, vm, scope) { - let transformed = value; - if (value) { - transformed = (values: unknown[]) => scope.$eval(value, values); + transform( + value: unknown, + vm: unknown, + scope: IScope, + ): ((values: unknown[]) => boolean)|undefined { + if (!value) { + return undefined; } - return transformed; + + return (values: unknown[]) => (scope.$eval(value as string, values) as boolean); }, }, varType: { @@ -148,18 +158,20 @@ export default createAngularJsAdapter<[ITimeoutService]>({ }, component: { angularJsBind: '<', - transform(value, vm, scope) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + transform(value: unknown, vm: unknown, scope: any) { if (!value) { - return value; + return undefined; } if (scope.templateFile) { return shallowRef(FieldAngularJsTemplate); } - const { plugin, name } = value; + const { plugin, name } = value as ExternalComponentRef; if (!plugin || !name) { - throw new Error("Invalid component property given to piwik-field directive, must be {plugin: '...',name: '...'}"); + throw new Error('Invalid component property given to piwik-field directive, must ' + + 'be {plugin: \'...\',name: \'...\'}'); } return shallowRef(useExternalPluginComponent(plugin, name)); @@ -189,7 +201,7 @@ export default createAngularJsAdapter<[ITimeoutService]>({ const ngModel = controller as INgModelController; if (!ngModel) { - scope.$watch('value', (newVal) => { + scope.$watch('value', (newVal: unknown) => { if (newVal !== vm.modelValue) { const transformed = handleJsonValue(newVal, scope.varType, scope.uicontrol); diff --git a/plugins/CorePluginsAdmin/vue/src/Field/Field.vue b/plugins/CorePluginsAdmin/vue/src/Field/Field.vue index 02a327d18e..5be5104fc3 100644 --- a/plugins/CorePluginsAdmin/vue/src/Field/Field.vue +++ b/plugins/CorePluginsAdmin/vue/src/Field/Field.vue @@ -17,7 +17,7 @@ import { defineComponent } from 'vue'; import FormField from '../FormField/FormField.vue'; -const UI_CONTROLS_TO_TYPE = { +const UI_CONTROLS_TO_TYPE: Record<string, string> = { multiselect: 'array', checkbox: 'boolean', site: 'object', @@ -68,8 +68,9 @@ export default defineComponent({ return this.varType; } - if (UI_CONTROLS_TO_TYPE[this.uicontrol]) { - return UI_CONTROLS_TO_TYPE[this.uicontrol]; + const uicontrol = this.uicontrol as string; + if (uicontrol && UI_CONTROLS_TO_TYPE[uicontrol]) { + return UI_CONTROLS_TO_TYPE[uicontrol]; } return 'string'; @@ -104,7 +105,7 @@ export default defineComponent({ }, }, methods: { - onChange(newValue) { + onChange(newValue: unknown) { this.$emit('update:modelValue', newValue); }, }, diff --git a/plugins/CorePluginsAdmin/vue/src/Form/Form.adapter.ts b/plugins/CorePluginsAdmin/vue/src/Form/Form.adapter.ts index 054af6c0e7..188f64f712 100644 --- a/plugins/CorePluginsAdmin/vue/src/Form/Form.adapter.ts +++ b/plugins/CorePluginsAdmin/vue/src/Form/Form.adapter.ts @@ -17,6 +17,4 @@ export default function piwikForm(): IDirective { }; } -piwikForm.$inject = []; - -angular.module('piwikApp').directive('piwikForm', piwikForm); +window.angular.module('piwikApp').directive('piwikForm', piwikForm); diff --git a/plugins/CorePluginsAdmin/vue/src/FormField/FieldAngularJsTemplate.vue b/plugins/CorePluginsAdmin/vue/src/FormField/FieldAngularJsTemplate.vue index 10f0dd1846..c608e33682 100644 --- a/plugins/CorePluginsAdmin/vue/src/FormField/FieldAngularJsTemplate.vue +++ b/plugins/CorePluginsAdmin/vue/src/FormField/FieldAngularJsTemplate.vue @@ -17,7 +17,7 @@ import { } from 'vue'; import { Matomo } from 'CoreHome'; -function clone(obj) { +function clone<T>(obj?: T): T|undefined { if (typeof obj === 'undefined') { return undefined; } @@ -28,8 +28,14 @@ function clone(obj) { export default defineComponent({ props: { modelValue: null, - formField: null, - templateFile: String, + formField: { + type: null, + required: true, + }, + templateFile: { + type: String, + required: true, + }, }, emits: ['update:modelValue'], inheritAttrs: false, @@ -49,7 +55,7 @@ export default defineComponent({ value: clone(props.modelValue), }; - scope.$watch('formField.value', (newValue, oldValue) => { + scope.$watch('formField.value', (newValue: unknown, oldValue: unknown) => { if (newValue !== oldValue && JSON.stringify(newValue) !== JSON.stringify(props.modelValue) ) { @@ -77,7 +83,7 @@ export default defineComponent({ // append on mount onMounted(() => { - window.$(root.value).append($element); + window.$(root.value! as HTMLElement).append($element); Matomo.helper.compileAngularComponents($element, { scope, diff --git a/plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue b/plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue index 3e172d63d7..1d1bb8d560 100644 --- a/plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue +++ b/plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue @@ -36,8 +36,8 @@ export default defineComponent({ emits: ['update:modelValue'], methods: { onChange(event: Event) { - if (this.modelValue !== event.target.checked) { - this.$emit('update:modelValue', event.target.checked); + if (this.modelValue !== (event.target as HTMLInputElement).checked) { + this.$emit('update:modelValue', (event.target as HTMLInputElement).checked); } }, }, diff --git a/plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckboxArray.vue b/plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckboxArray.vue index 3eb91ea865..f6ba555691 100644 --- a/plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckboxArray.vue +++ b/plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckboxArray.vue @@ -35,13 +35,17 @@ <script lang="ts"> import { defineComponent } from 'vue'; -function getCheckboxStates(availableOptions, modelValue) { +interface Option { + key: unknown; +} + +function getCheckboxStates(availableOptions?: Option[], modelValue?: unknown[]) { return (availableOptions || []).map((o) => modelValue && modelValue.indexOf(o.key) !== -1); } export default defineComponent({ props: { - modelValue: Object, + modelValue: Array, name: String, title: String, availableOptions: Array, @@ -52,7 +56,7 @@ export default defineComponent({ emits: ['update:modelValue'], computed: { checkboxStates() { - return getCheckboxStates(this.availableOptions, this.modelValue); + return getCheckboxStates(this.availableOptions as Option[], this.modelValue); }, }, mounted() { @@ -63,8 +67,10 @@ export default defineComponent({ const checkboxStates = [...this.checkboxStates]; checkboxStates[changedIndex] = !checkboxStates[changedIndex]; - const newValue = []; - Object.values(this.availableOptions).forEach((option, index) => { + const availableOptions = (this.availableOptions || {}) as Record<string, Option>; + + const newValue: unknown[] = []; + Object.values(availableOptions).forEach((option: Option, index: number) => { if (checkboxStates[index]) { newValue.push(option.key); } diff --git a/plugins/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue b/plugins/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue index c775e120f8..b0b4909eb8 100644 --- a/plugins/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue +++ b/plugins/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue @@ -76,17 +76,32 @@ interface SelectValueInfo { interface AvailableOptions { group: string; - key: unknown; + key: string|number; + value: unknown; + tooltip?: string; +} + +interface Option { + key: string|number; value: unknown; tooltip?: string; } +interface OptionGroup { + group: string; + values: Option[]; +} + export function getAvailableOptions( - availableValues: Record<string, unknown>, -): { key: string, value: unknown }[] { - const flatValues = []; + availableValues: Record<string, unknown>|null, +): OptionGroup[] { + const flatValues: OptionGroup[] = []; + + if (!availableValues) { + return flatValues; + } - const groups = {}; + const groups: Record<string, OptionGroup> = {}; Object.values(availableValues).forEach((uncastedValue) => { const value = uncastedValue as AvailableOptions; const group = value.group || ''; @@ -95,7 +110,7 @@ export function getAvailableOptions( groups[group] = { values: [], group }; } - const formatted: Record<string, unknown> = { key: value.key, value: value.value }; + const formatted: Option = { key: value.key, value: value.value }; if ('tooltip' in value && value.tooltip) { formatted.tooltip = value.tooltip; @@ -139,17 +154,18 @@ export default defineComponent({ } const key = this.modelValue; + const availableOptions = (this.availableOptions || []) as OptionGroup[]; - let keyItem: { key: string|number, value: unknown }; - (this.availableOptions || []).some((option) => { + let keyItem!: { key: string|number, value: unknown }|undefined; + availableOptions.some((option) => { keyItem = option.values.find((item) => item.key === key); return keyItem; // stop iterating if found }); if (keyItem) { - return keyItem.value.toString(); + return keyItem.value ? `${keyItem.value}` : ''; } - return key; + return key ? `${key}` : ''; }, }, methods: { diff --git a/plugins/CorePluginsAdmin/vue/src/FormField/FieldFile.vue b/plugins/CorePluginsAdmin/vue/src/FormField/FieldFile.vue index 12faca52de..e1b45a38b6 100644 --- a/plugins/CorePluginsAdmin/vue/src/FormField/FieldFile.vue +++ b/plugins/CorePluginsAdmin/vue/src/FormField/FieldFile.vue @@ -33,11 +33,11 @@ export default defineComponent({ inheritAttrs: false, emits: ['update:modelValue'], setup(props) { - const fileInput = ref<HTMLInputElement>(null); + const fileInput = ref<HTMLInputElement|null>(null); watch(() => props.modelValue, (v) => { if (v === '') { - const fileInputElement = fileInput.value; + const fileInputElement = fileInput.value!; fileInputElement.value = ''; } }); @@ -48,7 +48,12 @@ export default defineComponent({ }, methods: { onChange(event: Event) { - const file = (event.target as HTMLInputElement).files.item(0); + const { files } = event.target as HTMLInputElement; + if (!files) { + return; + } + + const file = files.item(0); this.$emit('update:modelValue', file); }, }, diff --git a/plugins/CorePluginsAdmin/vue/src/FormField/FieldSelect.vue b/plugins/CorePluginsAdmin/vue/src/FormField/FieldSelect.vue index 8fbc118c53..2b024a46a1 100644 --- a/plugins/CorePluginsAdmin/vue/src/FormField/FieldSelect.vue +++ b/plugins/CorePluginsAdmin/vue/src/FormField/FieldSelect.vue @@ -64,15 +64,15 @@ import { defineComponent, nextTick } from 'vue'; interface OptionGroup { group?: string; - key: string; + key: string|number; value: unknown; disabled?: boolean; } function initMaterialSelect( - select: HTMLSelectElement, + select: HTMLSelectElement|undefined|null, modelValue: string|number|string[], - placeholder: string, + placeholder: string|undefined, uiControlOptions = {}, multiple: boolean, ) { @@ -85,10 +85,8 @@ function initMaterialSelect( // reset selected since materialize removes them Array.from(select.options).forEach((opt) => { if (multiple) { - opt.selected = modelValue - && (modelValue as string[]).indexOf( - opt.value.replace(/^string:/, ''), - ) !== -1; + opt.selected = !!modelValue + && (modelValue as unknown[]).indexOf(opt.value.replace(/^string:/, '')) !== -1; } else { opt.selected = `string:${modelValue}` === opt.value; } @@ -103,14 +101,16 @@ function initMaterialSelect( } } -function hasGroupedValues(availableValues) { +function hasGroupedValues(availableValues: unknown) { if (Array.isArray(availableValues) || !(typeof availableValues === 'object') ) { return false; } - return Object.values(availableValues).some((v) => typeof v === 'object'); + return Object.values(availableValues as Record<string, unknown>).some( + (v) => typeof v === 'object', + ); } function hasOption(flatValues: OptionGroup[], key: string) { @@ -118,9 +118,9 @@ function hasOption(flatValues: OptionGroup[], key: string) { } export function getAvailableOptions( - givenAvailableValues?: Record<string, unknown>|null, + givenAvailableValues: Record<string, unknown>|null, type: string, - uiControlAttributes: Record<string, unknown>, + uiControlAttributes?: Record<string, unknown>, ): OptionGroup[] { if (!givenAvailableValues) { return []; @@ -134,15 +134,15 @@ export function getAvailableOptions( hasGroups = false; } - const flatValues = []; + const flatValues: OptionGroup[] = []; Object.entries(availableValues).forEach(([group, values]) => { Object.entries(values).forEach(([valueObjKey, value]) => { - if (typeof value === 'object' && typeof value.key !== 'undefined') { - flatValues.push(value); + if (value && typeof value === 'object' && typeof (value as OptionGroup).key !== 'undefined') { + flatValues.push(value as OptionGroup); return; } - let key: number = valueObjKey as number; + let key: number|string = valueObjKey; if (type === 'integer' && typeof valueObjKey === 'string') { key = parseInt(valueObjKey, 10); } @@ -152,7 +152,7 @@ export function getAvailableOptions( }); // for selects w/ a placeholder, add an option to unset the select - if (uiControlAttributes.placeholder + if (uiControlAttributes?.placeholder && !hasOption(flatValues, '') ) { return [{ key: '', value: '' }, ...flatValues]; @@ -161,9 +161,9 @@ export function getAvailableOptions( return flatValues; } -function handleOldAngularJsValues(value: unknown) { +function handleOldAngularJsValues<T>(value: T): T { if (typeof value === 'string') { - return value.replace(/^string:/, ''); + return value.replace(/^string:/, '') as unknown as T; } return value; } @@ -181,36 +181,39 @@ export default defineComponent({ inheritAttrs: false, emits: ['update:modelValue'], computed: { - options() { + options(): OptionGroup[]|undefined { // if modelValue is empty, but there is no empty value allowed in availableOptions, // add one temporarily until something is set - if (this.availableOptions - && !hasOption(this.availableOptions, '') + const availableOptions = this.availableOptions as OptionGroup[]|undefined; + if (availableOptions + && !hasOption(availableOptions, '') && (typeof this.modelValue === 'undefined' || this.modelValue === null || this.modelValue === '') ) { return [ { key: '', value: this.modelValue, group: this.hasGroups ? '' : undefined }, - ...this.availableOptions, + ...availableOptions, ]; } - return this.availableOptions; + return availableOptions; }, hasGroups() { - const { availableOptions } = this; + const availableOptions = this.availableOptions as OptionGroup[]|undefined; return availableOptions && availableOptions[0] && typeof availableOptions[0].group !== 'undefined'; }, groupedOptions() { - if (!this.hasGroups) { + const { options } = this; + + if (!this.hasGroups || !options) { return null; } - const { options } = this; - const groups = {}; - options.forEach((entry) => { - groups[entry.group] = groups[entry.group] || []; - groups[entry.group].push(entry); + const groups: Record<string, OptionGroup[]> = {}; + (options as OptionGroup[]).forEach((entry) => { + const group = entry.group!; + groups[group] = groups[group] || []; + groups[group].push(entry); }); const result = Object.entries(groups); @@ -235,7 +238,7 @@ export default defineComponent({ let newValue: string|number|(string|number)[]; if (this.multiple) { newValue = Array.from(element.options).filter((e) => e.selected).map((e) => e.value); - newValue = newValue.map(handleOldAngularJsValues); + newValue = newValue.map((x) => handleOldAngularJsValues(x)); } else { newValue = element.value; newValue = handleOldAngularJsValues(newValue); @@ -255,9 +258,9 @@ export default defineComponent({ window.$(this.$refs.select as HTMLSelectElement).val(newVal); setTimeout(() => { initMaterialSelect( - this.$refs.select, + this.$refs.select as HTMLSelectElement, newVal, - this.uiControlAttributes.placeholder, + this.uiControlAttributes?.placeholder, this.uiControlOptions, this.multiple, ); @@ -269,13 +272,13 @@ export default defineComponent({ this.onModelValueChange(newVal); }, 'uiControlAttributes.disabled': { - handler(newVal, oldVal) { + handler(newVal?: boolean, oldVal?: boolean) { setTimeout(() => { if (newVal !== oldVal) { initMaterialSelect( - this.$refs.select, + this.$refs.select as HTMLSelectElement, this.modelValue, - this.uiControlAttributes.placeholder, + this.uiControlAttributes?.placeholder, this.uiControlOptions, this.multiple, ); @@ -283,13 +286,13 @@ export default defineComponent({ }); }, }, - availableOptions(newVal, oldVal) { + availableOptions(newVal?: OptionGroup[], oldVal?: OptionGroup[]) { if (newVal !== oldVal) { setTimeout(() => { initMaterialSelect( - this.$refs.select, + this.$refs.select as HTMLSelectElement, this.modelValue, - this.uiControlAttributes.placeholder, + this.uiControlAttributes?.placeholder, this.uiControlOptions, this.multiple, ); @@ -300,9 +303,9 @@ export default defineComponent({ mounted() { setTimeout(() => { initMaterialSelect( - this.$refs.select, + this.$refs.select as HTMLSelectElement, this.modelValue, - this.uiControlAttributes.placeholder, + this.uiControlAttributes?.placeholder, this.uiControlOptions, this.multiple, ); diff --git a/plugins/CorePluginsAdmin/vue/src/FormField/FieldSite.vue b/plugins/CorePluginsAdmin/vue/src/FormField/FieldSite.vue index 54441fdcda..dedd60eba9 100644 --- a/plugins/CorePluginsAdmin/vue/src/FormField/FieldSite.vue +++ b/plugins/CorePluginsAdmin/vue/src/FormField/FieldSite.vue @@ -24,7 +24,7 @@ <script lang="ts"> import { defineComponent } from 'vue'; -import { SiteSelector, SiteReference } from 'CoreHome'; +import { SiteSelector, SiteRef } from 'CoreHome'; export default defineComponent({ props: { @@ -39,7 +39,7 @@ export default defineComponent({ }, emits: ['update:modelValue'], methods: { - onChange(newValue: SiteReference) { + onChange(newValue: SiteRef) { this.$emit('update:modelValue', newValue); }, }, diff --git a/plugins/CorePluginsAdmin/vue/src/FormField/FieldTextareaArray.vue b/plugins/CorePluginsAdmin/vue/src/FormField/FieldTextareaArray.vue index 6af65c666c..8a39525a52 100644 --- a/plugins/CorePluginsAdmin/vue/src/FormField/FieldTextareaArray.vue +++ b/plugins/CorePluginsAdmin/vue/src/FormField/FieldTextareaArray.vue @@ -51,7 +51,7 @@ export default defineComponent({ this.onKeydown = debounce(this.onKeydown.bind(this), 50); }, methods: { - onKeydown(event) { + onKeydown(event: KeyboardEvent) { const value = (event.target as HTMLTextAreaElement).value.split(SEPARATOR); this.$emit('update:modelValue', value); }, diff --git a/plugins/CorePluginsAdmin/vue/src/FormField/FormField.adapter.ts b/plugins/CorePluginsAdmin/vue/src/FormField/FormField.adapter.ts index 9a9526e79f..36dc49c942 100644 --- a/plugins/CorePluginsAdmin/vue/src/FormField/FormField.adapter.ts +++ b/plugins/CorePluginsAdmin/vue/src/FormField/FormField.adapter.ts @@ -5,16 +5,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import { ITimeoutService } from 'angular'; +import { IScope, ITimeoutService } from 'angular'; import { createAngularJsAdapter, transformAngularJsBoolAttr, transformAngularJsIntAttr, + useExternalPluginComponent, } from 'CoreHome'; import { shallowRef } from 'vue'; import FormField from './FormField.vue'; import FieldAngularJsTemplate from './FieldAngularJsTemplate.vue'; -import useExternalPluginComponent from '../../../../CoreHome/vue/src/useExternalPluginComponent'; function transformVueComponentRef(value?: Record<string, string>) { if (!value) { @@ -35,7 +35,8 @@ interface Setting { value: unknown; } -function conditionFn(scope, condition) { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function conditionFn(scope: any, condition: string) { const values: Record<string, unknown> = {}; Object.values((scope.allSettings || {}) as Record<string, Setting>).forEach((setting) => { if (setting.value === '0') { @@ -52,7 +53,8 @@ export default createAngularJsAdapter<[ITimeoutService]>({ component: FormField, scope: { modelValue: { - default(scope) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + default(scope: any) { const field = scope.piwikFormField; // vue components expect object data as input, so we parse JSON data @@ -77,11 +79,12 @@ export default createAngularJsAdapter<[ITimeoutService]>({ piwikFormField: { vue: 'formField', angularJsBind: '=', - transform(value, vm, scope) { + transform(v: unknown, vm: unknown, scope: IScope) { + const value = v as Record<string, unknown>; return { ...value, condition: value.condition - ? conditionFn.bind(null, scope, value.condition) + ? conditionFn.bind(null, scope, value.condition as string) : value.condition, disabled: transformAngularJsBoolAttr(value.disabled), autocomplete: transformAngularJsBoolAttr(value.autocomplete), @@ -94,7 +97,9 @@ export default createAngularJsAdapter<[ITimeoutService]>({ min: transformAngularJsIntAttr(value.min), max: transformAngularJsIntAttr(value.max), component: shallowRef( - value.templateFile ? FieldAngularJsTemplate : transformVueComponentRef(value.component), + value.templateFile + ? FieldAngularJsTemplate + : transformVueComponentRef(value.component as Record<string, string>), ), }; }, @@ -115,7 +120,7 @@ export default createAngularJsAdapter<[ITimeoutService]>({ }, $inject: ['$timeout'], postCreate(vm, scope) { - scope.$watch('piwikFormField.value', (newVal, oldVal) => { + scope.$watch('piwikFormField.value', (newVal: unknown, oldVal: unknown) => { if (newVal !== oldVal) { vm.modelValue = newVal; } @@ -127,7 +132,7 @@ export default createAngularJsAdapter<[ITimeoutService]>({ vm.formField = { ...vm.formField, condition: scope.piwikFormField.condition - ? conditionFn.bind(null, scope, scope.piwikFormField.condition) + ? conditionFn.bind(null, scope, scope.piwikFormField.condition as string) : scope.piwikFormField.condition, }; }, true); diff --git a/plugins/CorePluginsAdmin/vue/src/FormField/FormField.vue b/plugins/CorePluginsAdmin/vue/src/FormField/FormField.vue index 68095c89a6..db03ed212d 100644 --- a/plugins/CorePluginsAdmin/vue/src/FormField/FormField.vue +++ b/plugins/CorePluginsAdmin/vue/src/FormField/FormField.vue @@ -71,6 +71,7 @@ import { onMounted, ref, watch, + Component, } from 'vue'; import FieldCheckbox from './FieldCheckbox.vue'; import FieldCheckboxArray from './FieldCheckboxArray.vue'; @@ -95,7 +96,7 @@ import { processCheckboxAndRadioAvailableValues } from './utilities'; const TEXT_CONTROLS = ['password', 'url', 'search', 'email']; const CONTROLS_SUPPORTING_ARRAY = ['textarea', 'checkbox', 'text']; -const CONTROL_TO_COMPONENT_MAP = { +const CONTROL_TO_COMPONENT_MAP: Record<string, string> = { checkbox: 'FieldCheckbox', 'expandable-select': 'FieldExpandableSelect', 'field-array': 'FieldFieldArray', @@ -111,13 +112,34 @@ const CONTROL_TO_COMPONENT_MAP = { textarea: 'FieldTextarea', }; -const CONTROL_TO_AVAILABLE_OPTION_PROCESSOR = { +type ProcessAvailableOptionsFn = ( + availableValues: Record<string, unknown>|null, + type: string, + uiControlAttributes?: Record<string, unknown>, +) => unknown[]; + +const CONTROL_TO_AVAILABLE_OPTION_PROCESSOR: Record<string, ProcessAvailableOptionsFn> = { FieldSelect: getSelectAvailableOptions, FieldCheckboxArray: processCheckboxAndRadioAvailableValues, FieldRadio: processCheckboxAndRadioAvailableValues, FieldExpandableSelect: getExpandableSelectAvailableOptions, }; +interface FormField { + availableValues: Record<string, unknown>; + type: string; + uiControlAttributes?: Record<string, unknown>; + defaultValue: unknown; + uiControl: string; + component: Component; + inlineHelp?: string; +} + +interface OptionLike { + key?: string|number; + value?: unknown; +} + export default defineComponent({ props: { modelValue: null, @@ -145,28 +167,32 @@ export default defineComponent({ FieldTextareaArray, }, setup(props) { - const inlineHelpNode = ref(null); + const inlineHelpNode = ref<HTMLElement|null>(null); - const setInlineHelp = (newVal) => { - let toAppend: HTMLElement|string; + const setInlineHelp = (newVal?: string|HTMLElement|JQuery) => { + let toAppend: HTMLElement|JQuery|string; - if (!newVal) { + if (!newVal || !inlineHelpNode.value) { return; } - if (typeof newVal === 'string' && newVal && newVal.indexOf('#') === 0) { - toAppend = window.$(newVal); + if (typeof newVal === 'string') { + if (newVal.indexOf('#') === 0) { + toAppend = window.$(newVal); + } else { + toAppend = window.vueSanitize(newVal); + } } else { - toAppend = window.vueSanitize(newVal); + toAppend = newVal; } window.$(inlineHelpNode.value).html('').append(toAppend); }; - watch(() => props.formField.inlineHelp, setInlineHelp); + watch(() => (props.formField as FormField).inlineHelp, setInlineHelp); onMounted(() => { - setInlineHelp(props.formField.inlineHelp); + setInlineHelp((props.formField as FormField).inlineHelp); }); return { @@ -174,12 +200,14 @@ export default defineComponent({ }; }, computed: { - childComponent() { - if (this.formField.component) { - return this.formField.component; + childComponent(): string|Component { + const formField = this.formField as FormField; + + if (formField.component) { + return formField.component; } - const { uiControl } = this.formField; + const { uiControl } = formField; let control = CONTROL_TO_COMPONENT_MAP[uiControl]; if (TEXT_CONTROLS.indexOf(uiControl) !== -1) { @@ -218,7 +246,7 @@ export default defineComponent({ return this.formField.condition(); }, processedModelValue() { - const field = this.formField; + const field = this.formField as FormField; // convert boolean values since angular 1.6 uses strict equals when determining if a model // value matches the ng-value of an input. @@ -237,15 +265,20 @@ export default defineComponent({ return this.modelValue; }, - defaultValue() { - let { defaultValue } = this.formField; + defaultValue(): string { + const { defaultValue } = this.formField as FormField; if (Array.isArray(defaultValue)) { - defaultValue = defaultValue.join(','); + return (defaultValue as unknown[]).join(','); } - return defaultValue; + return defaultValue as string; }, availableOptions() { - const { childComponent, formField } = this; + const { childComponent } = this; + if (typeof childComponent !== 'string') { + return null; + } + + const formField = this.formField as FormField; if (!formField.availableValues || !CONTROL_TO_AVAILABLE_OPTION_PROCESSOR[childComponent] @@ -260,7 +293,8 @@ export default defineComponent({ ); }, defaultValuePretty() { - let { defaultValue } = this.formField; + const formField = this.formField as FormField; + let { defaultValue } = formField; const { availableOptions } = this; if (typeof defaultValue === 'string' && defaultValue) { @@ -282,18 +316,20 @@ export default defineComponent({ return ''; } - return defaultValue ? defaultValue.toString() : ''; + return defaultValue ? `${defaultValue}` : ''; } - const prettyValues = []; + const prettyValues: unknown[] = []; if (!Array.isArray(defaultValue)) { defaultValue = [defaultValue]; } (availableOptions || []).forEach((value) => { - if (defaultValue.indexOf(value.key) !== -1 && typeof value.value !== 'undefined') { - prettyValues.push(value.value); + if (typeof (value as OptionLike).value !== 'undefined' + && (defaultValue as unknown[]).indexOf((value as OptionLike).key) !== -1 + ) { + prettyValues.push((value as OptionLike).value); } }); diff --git a/plugins/CorePluginsAdmin/vue/src/FormField/utilities.ts b/plugins/CorePluginsAdmin/vue/src/FormField/utilities.ts index eeb50f347e..9a3a3864cd 100644 --- a/plugins/CorePluginsAdmin/vue/src/FormField/utilities.ts +++ b/plugins/CorePluginsAdmin/vue/src/FormField/utilities.ts @@ -5,18 +5,23 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ +interface Option { + key: string|number; + value: unknown; +} + export function processCheckboxAndRadioAvailableValues( - availableValues: Record<string, unknown>, + availableValues: Record<string, unknown>|null, type: string, -): { key: string, value: unknown }[] { +): Option[] { if (!availableValues) { return []; } - const flatValues = []; + const flatValues: Option[] = []; Object.entries(availableValues).forEach(([valueObjKey, value]) => { - if (typeof value === 'object' && typeof value.key !== 'undefined') { - flatValues.push(value); + if (value && typeof value === 'object' && typeof (value as Option).key !== 'undefined') { + flatValues.push(value as Option); return; } diff --git a/plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSetting.vue b/plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSetting.vue index 191d55dc16..47f6660fd5 100644 --- a/plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSetting.vue +++ b/plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSetting.vue @@ -28,8 +28,14 @@ let conditionScope: IScope; export default defineComponent({ props: { - pluginName: String, - setting: Object, + pluginName: { + type: String, + required: true, + }, + setting: { + type: Object, + required: true, + }, modelValue: null, settingValues: Object, }, @@ -39,7 +45,7 @@ export default defineComponent({ emits: ['update:modelValue'], computed: { conditionFunction() { - const { condition } = this.setting; + const condition = this.setting.condition as string; if (!condition) { return undefined; } @@ -54,8 +60,8 @@ export default defineComponent({ }; }, conditionValues() { - const values = {}; - Object.entries(this.settingValues).forEach(([key, value]) => { + const values: Record<string, unknown> = {}; + Object.entries(this.settingValues as Record<string, unknown>).forEach(([key, value]) => { const [pluginName, settingName] = key.split('.'); if (pluginName !== this.pluginName) { return; diff --git a/plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue b/plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue index 7f57b883fe..7d401dcfcd 100644 --- a/plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue +++ b/plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue @@ -80,11 +80,32 @@ import { NotificationsStore, translate, } from 'CoreHome'; +import KeyPressEvent = JQuery.KeyPressEvent; import Field from '../Field/Field.vue'; import PluginSetting from './PluginSetting.vue'; const { $ } = window; +interface Setting { + name: string; + value: unknown; + introduction?: string; +} + +interface SettingsForSinglePlugin { + pluginName: string; + settings: Setting[]; +} + +interface PluginSettingsState { + isLoading: boolean; + isSaving: Record<string, boolean>; + passwordConfirmation: string; + settingsToSave: null|string; // name of plugin whose settings to save + settingsPerPlugin: SettingsForSinglePlugin[]; + settingValues: Record<string, unknown>; +} + export default defineComponent({ props: { mode: String, @@ -94,7 +115,7 @@ export default defineComponent({ Field, PluginSetting, }, - data() { + data(): PluginSettingsState { return { isLoading: true, isSaving: {}, @@ -105,7 +126,9 @@ export default defineComponent({ }; }, created() { - AjaxHelper.fetch({ method: this.apiMethod }).then((settingsPerPlugin) => { + AjaxHelper.fetch({ + method: this.apiMethod, + }).then((settingsPerPlugin: SettingsForSinglePlugin[]) => { this.isLoading = false; this.settingsPerPlugin = settingsPerPlugin; @@ -141,7 +164,8 @@ export default defineComponent({ return; } - this.settingsPerPlugin.forEach((settingsForPlugin) => { + const settingsPerPlugin = this.settingsPerPlugin as SettingsForSinglePlugin[]; + settingsPerPlugin.forEach((settingsForPlugin) => { const { pluginName, settings } = settingsForPlugin; if (!pluginName) { return; @@ -165,11 +189,11 @@ export default defineComponent({ }, showPasswordConfirmModal(requestedPlugin: string) { this.settingsToSave = requestedPlugin; - const { root } = this.$refs; + const root = this.$refs.root as HTMLElement; const $root = $(root); - const onEnter = (event) => { + const onEnter = (event: KeyPressEvent) => { const keycode = event.keyCode ? event.keyCode : event.which; - if (keycode === '13') { + if (keycode === 13) { $root.find('.confirm-password-modal').modal('close'); this.save(requestedPlugin); } @@ -212,7 +236,7 @@ export default defineComponent({ this.settingsToSave = null; }, getValuesForPlugin(requestedPlugin: string) { - const values = {}; + const values: Record<string, Setting[]> = {}; if (!values[requestedPlugin]) { values[requestedPlugin] = []; } diff --git a/plugins/CorePluginsAdmin/vue/src/Plugins/PluginFilter.adapter.ts b/plugins/CorePluginsAdmin/vue/src/Plugins/PluginFilter.adapter.ts index 557cca16ad..521477bd7a 100644 --- a/plugins/CorePluginsAdmin/vue/src/Plugins/PluginFilter.adapter.ts +++ b/plugins/CorePluginsAdmin/vue/src/Plugins/PluginFilter.adapter.ts @@ -17,6 +17,4 @@ export default function piwikPluginFilter(): IDirective { }; } -piwikPluginFilter.$inject = []; - -angular.module('piwikApp').directive('piwikPluginFilter', piwikPluginFilter); +window.angular.module('piwikApp').directive('piwikPluginFilter', piwikPluginFilter); diff --git a/plugins/CorePluginsAdmin/vue/src/Plugins/PluginFilter.ts b/plugins/CorePluginsAdmin/vue/src/Plugins/PluginFilter.ts index e858b846a7..eaa839ab47 100644 --- a/plugins/CorePluginsAdmin/vue/src/Plugins/PluginFilter.ts +++ b/plugins/CorePluginsAdmin/vue/src/Plugins/PluginFilter.ts @@ -5,6 +5,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ +import ClickEvent = JQuery.ClickEvent; + const { $ } = window; function getCurrentFilterOrigin(element: JQuery) { @@ -15,7 +17,7 @@ function getCurrentFilterStatus(element: JQuery) { return element.find('.status a.active').data('filter-status'); } -function getMatchingNodes(filterOrigin, filterStatus) { +function getMatchingNodes(filterOrigin: string, filterStatus: string): JQuery { let query = '#plugins tr'; if (filterOrigin === 'all') { @@ -35,9 +37,9 @@ function getMatchingNodes(filterOrigin, filterStatus) { function updateNumberOfMatchingPluginsInFilter( element: JQuery, - selectorFilterToUpdate, - filterOrigin, - filterStatus, + selectorFilterToUpdate: string, + filterOrigin: string, + filterStatus: string, ) { const numMatchingNodes = getMatchingNodes(filterOrigin, filterStatus).length; const updatedCounterText = ` (${numMatchingNodes})`; @@ -49,14 +51,49 @@ function updateAllNumbersOfMatchingPluginsInFilter(element: JQuery) { const filterOrigin = getCurrentFilterOrigin(element); const filterStatus = getCurrentFilterStatus(element); - updateNumberOfMatchingPluginsInFilter(element, '[data-filter-status="all"]', filterOrigin, 'all'); - updateNumberOfMatchingPluginsInFilter(element, '[data-filter-status="active"]', filterOrigin, 'active'); - updateNumberOfMatchingPluginsInFilter(element, '[data-filter-status="inactive"]', filterOrigin, 'inactive'); - - updateNumberOfMatchingPluginsInFilter(element, '[data-filter-origin="all"]', 'all', filterStatus); - updateNumberOfMatchingPluginsInFilter(element, '[data-filter-origin="core"]', 'core', filterStatus); - updateNumberOfMatchingPluginsInFilter(element, '[data-filter-origin="official"]', 'official', filterStatus); - updateNumberOfMatchingPluginsInFilter(element, '[data-filter-origin="thirdparty"]', 'thirdparty', filterStatus); + updateNumberOfMatchingPluginsInFilter( + element, + '[data-filter-status="all"]', + filterOrigin, + 'all', + ); + updateNumberOfMatchingPluginsInFilter( + element, + '[data-filter-status="active"]', + filterOrigin, + 'active', + ); + updateNumberOfMatchingPluginsInFilter( + element, + '[data-filter-status="inactive"]', + filterOrigin, + 'inactive', + ); + + updateNumberOfMatchingPluginsInFilter( + element, + '[data-filter-origin="all"]', + 'all', + filterStatus, + ); + updateNumberOfMatchingPluginsInFilter( + element, + '[data-filter-origin="core"]', + 'core', + filterStatus, + ); + updateNumberOfMatchingPluginsInFilter( + element, + '[data-filter-origin="official"]', + 'official', + filterStatus, + ); + updateNumberOfMatchingPluginsInFilter( + element, + '[data-filter-origin="thirdparty"]', + 'thirdparty', + filterStatus, + ); } function filterPlugins(element: JQuery) { @@ -71,20 +108,20 @@ function filterPlugins(element: JQuery) { updateAllNumbersOfMatchingPluginsInFilter(element); } -function onClickStatus(element: JQuery, event) { +function onClickStatus(element: JQuery, event: ClickEvent) { event.preventDefault(); - $(event.target).siblings().removeClass('active'); - $(event.target).addClass('active'); + $(event.target as HTMLElement).siblings().removeClass('active'); + $(event.target as HTMLElement).addClass('active'); filterPlugins(element); } -function onClickOrigin(element: JQuery, event) { +function onClickOrigin(element: JQuery, event: ClickEvent) { event.preventDefault(); - $(event.target).siblings().removeClass('active'); - $(event.target).addClass('active'); + $(event.target as HTMLElement).siblings().removeClass('active'); + $(event.target as HTMLElement).addClass('active'); filterPlugins(element); } diff --git a/plugins/CorePluginsAdmin/vue/src/Plugins/PluginManagement.adapter.ts b/plugins/CorePluginsAdmin/vue/src/Plugins/PluginManagement.adapter.ts index ac3c0020b7..86fc15f318 100644 --- a/plugins/CorePluginsAdmin/vue/src/Plugins/PluginManagement.adapter.ts +++ b/plugins/CorePluginsAdmin/vue/src/Plugins/PluginManagement.adapter.ts @@ -25,6 +25,4 @@ export default function piwikPluginManagement(): IDirective { }; } -piwikPluginManagement.$inject = []; - -angular.module('piwikApp').directive('piwikPluginManagement', piwikPluginManagement); +window.angular.module('piwikApp').directive('piwikPluginManagement', piwikPluginManagement); diff --git a/plugins/CorePluginsAdmin/vue/src/Plugins/PluginManagement.ts b/plugins/CorePluginsAdmin/vue/src/Plugins/PluginManagement.ts index cd8b22fafb..06fb47e70f 100644 --- a/plugins/CorePluginsAdmin/vue/src/Plugins/PluginManagement.ts +++ b/plugins/CorePluginsAdmin/vue/src/Plugins/PluginManagement.ts @@ -7,6 +7,7 @@ import { DirectiveBinding } from 'vue'; import { Matomo } from 'CoreHome'; +import ClickEvent = JQuery.ClickEvent; const { $ } = window; @@ -14,11 +15,11 @@ interface PluginManagementState { uninstallConfirmMessage?: string; } -function onClickUninstall(binding: DirectiveBinding<PluginManagementState>, event: MouseEvent) { +function onClickUninstall(binding: DirectiveBinding<PluginManagementState>, event: ClickEvent) { event.preventDefault(); - const link = $(event.target).attr('href'); - const pluginName = $(event.target).attr('data-plugin-name'); + const link = $(event.target as HTMLElement).attr('href'); + const pluginName = $(event.target as HTMLElement).attr('data-plugin-name'); if (!link || !pluginName) { return; @@ -28,21 +29,21 @@ function onClickUninstall(binding: DirectiveBinding<PluginManagementState>, even binding.value.uninstallConfirmMessage = $('#uninstallPluginConfirm').text(); } - const messageToDisplay = binding.value.uninstallConfirmMessage.replace('%s', pluginName); + const messageToDisplay = (binding.value.uninstallConfirmMessage || '').replace('%s', pluginName); $('#uninstallPluginConfirm').text(messageToDisplay); Matomo.helper.modalConfirm('#confirmUninstallPlugin', { yes: () => { - window.location = link; + window.location.href = link; }, }); } -function onDonateLinkClick(event: MouseEvent) { +function onDonateLinkClick(event: ClickEvent) { event.preventDefault(); - const overlayId = $(event.target).data('overlay-id'); + const overlayId = $(event.target as HTMLElement).data('overlay-id') as string; Matomo.helper.modalConfirm(`#${overlayId}`, {}); } diff --git a/plugins/CorePluginsAdmin/vue/src/Plugins/PluginUpload.adapter.ts b/plugins/CorePluginsAdmin/vue/src/Plugins/PluginUpload.adapter.ts index c8e83ba31a..251585ec1f 100644 --- a/plugins/CorePluginsAdmin/vue/src/Plugins/PluginUpload.adapter.ts +++ b/plugins/CorePluginsAdmin/vue/src/Plugins/PluginUpload.adapter.ts @@ -17,6 +17,4 @@ export default function piwikPluginUpload(): IDirective { }; } -piwikPluginUpload.$inject = []; - -angular.module('piwikApp').directive('piwikPluginUpload', piwikPluginUpload); +window.angular.module('piwikApp').directive('piwikPluginUpload', piwikPluginUpload); diff --git a/plugins/CorePluginsAdmin/vue/src/Plugins/PluginUpload.ts b/plugins/CorePluginsAdmin/vue/src/Plugins/PluginUpload.ts index 9c620fd556..8416343752 100644 --- a/plugins/CorePluginsAdmin/vue/src/Plugins/PluginUpload.ts +++ b/plugins/CorePluginsAdmin/vue/src/Plugins/PluginUpload.ts @@ -4,25 +4,28 @@ * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ + import { Matomo, translate } from 'CoreHome'; +import ClickEvent = JQuery.ClickEvent; +import SubmitEvent = JQuery.SubmitEvent; const { $ } = window; -function onUploadPlugin(event: MouseEvent) { +function onUploadPlugin(event: ClickEvent) { event.preventDefault(); Matomo.helper.modalConfirm('#installPluginByUpload', {}); } -function onSubmitPlugin(event: MouseEvent) { - const $zipFile = $('[name=pluginZip]'); - const fileName = $zipFile.val(); +function onSubmitPlugin(event: SubmitEvent) { + const $zipFile = $('[name=pluginZip]') as JQuery<HTMLInputElement>; + const fileName = $zipFile.val() as string; if (!fileName || fileName.slice(-4) !== '.zip') { event.preventDefault(); // eslint-disable-next-line no-alert alert(translate('CorePluginsAdmin_NoZipFileSelected')); } else if ($zipFile.data('maxSize') > 0 - && $zipFile[0].files[0].size > $zipFile.data('maxSize') * 1048576 + && $zipFile[0].files![0].size > $zipFile.data('maxSize') * 1048576 ) { event.preventDefault(); // eslint-disable-next-line no-alert diff --git a/plugins/CorePluginsAdmin/vue/src/SaveButton/SaveButton.vue b/plugins/CorePluginsAdmin/vue/src/SaveButton/SaveButton.vue index 9d2d9bc00d..c3fde0e356 100644 --- a/plugins/CorePluginsAdmin/vue/src/SaveButton/SaveButton.vue +++ b/plugins/CorePluginsAdmin/vue/src/SaveButton/SaveButton.vue @@ -34,8 +34,8 @@ export default defineComponent({ }, emits: ['confirm'], methods: { - onConfirm($event) { - this.$emit('confirm', $event); + onConfirm(event: MouseEvent) { + this.$emit('confirm', event); }, }, }); diff --git a/plugins/CoreVue/Commands/Build.php b/plugins/CoreVue/Commands/Build.php index 40093cbc15..818bfb6862 100644 --- a/plugins/CoreVue/Commands/Build.php +++ b/plugins/CoreVue/Commands/Build.php @@ -8,6 +8,7 @@ namespace Piwik\Plugins\CoreVue\Commands; +use Piwik\AssetManager\UIAssetFetcher\JScriptUIAssetFetcher; use Piwik\Container\StaticContainer; use Piwik\Filesystem; use Piwik\Plugin\ConsoleCommand; @@ -62,6 +63,8 @@ class Build extends ConsoleCommand } } + $plugins = JScriptUIAssetFetcher::orderPluginsByPluginDependencies($plugins); + // remove webpack cache since it can result in strange builds if present Filesystem::unlinkRecursive(PIWIK_INCLUDE_PATH . '/node_modules/.cache', true); diff --git a/plugins/CoreVue/polyfills/babel.config.js b/plugins/CoreVue/polyfills/babel.config.js index 3b8e56f4b1..c1320668ee 100644 --- a/plugins/CoreVue/polyfills/babel.config.js +++ b/plugins/CoreVue/polyfills/babel.config.js @@ -7,6 +7,7 @@ module.exports = { 'es.object.assign', 'es.promise.finally', 'es.object.entries', + 'es.object.values', 'es.string.trim', // TODO: what else do we want included? diff --git a/plugins/CoreVue/polyfills/dist/MatomoPolyfills.js b/plugins/CoreVue/polyfills/dist/MatomoPolyfills.js index d5820b332a..5fd4bd80d9 100644 --- a/plugins/CoreVue/polyfills/dist/MatomoPolyfills.js +++ b/plugins/CoreVue/polyfills/dist/MatomoPolyfills.js @@ -1308,6 +1308,17 @@ eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/co /***/ }), +/***/ "./node_modules/core-js/modules/es.object.values.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.values.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar $values = __webpack_require__(/*! ../internals/object-to-array */ \"./node_modules/core-js/internals/object-to-array.js\").values;\n\n// `Object.values` method\n// https://tc39.es/ecma262/#sec-object.values\n$({ target: 'Object', stat: true }, {\n values: function values(O) {\n return $values(O);\n }\n});\n\n\n//# sourceURL=webpack:///node_modules/core-js/modules/es.object.values.js"); + +/***/ }), + /***/ "./node_modules/core-js/modules/es.promise.finally.js": /*!************************************************************!*\ !*** ./node_modules/core-js/modules/es.promise.finally.js ***! @@ -1410,7 +1421,7 @@ eval("/* WEBPACK VAR INJECTION */(function(global) {const root =\n (typeof glob /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_home_dizzy_Projects_matomo_node_modules_core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/core-js/modules/es.promise.js */ \"./node_modules/core-js/modules/es.promise.js\");\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_home_dizzy_Projects_matomo_node_modules_core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_home_dizzy_Projects_matomo_node_modules_core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_promise_finally_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/core-js/modules/es.promise.finally.js */ \"./node_modules/core-js/modules/es.promise.finally.js\");\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_promise_finally_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_home_dizzy_Projects_matomo_node_modules_core_js_modules_es_promise_finally_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/core-js/modules/es.object.entries.js */ \"./node_modules/core-js/modules/es.object.entries.js\");\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_home_dizzy_Projects_matomo_node_modules_core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_string_trim_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_string_trim_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_home_dizzy_Projects_matomo_node_modules_core_js_modules_es_string_trim_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! dompurify */ \"./node_modules/dompurify/dist/purify.js\");\n/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(dompurify__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.js\");\n/* harmony import */ var yet_another_abortcontroller_polyfill__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! yet-another-abortcontroller-polyfill */ \"./node_modules/yet-another-abortcontroller-polyfill/index.js\");\n/* harmony import */ var yet_another_abortcontroller_polyfill__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(yet_another_abortcontroller_polyfill__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _jqueryNativeEventTrigger__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./jqueryNativeEventTrigger */ \"./plugins/CoreVue/polyfills/src/jqueryNativeEventTrigger.ts\");\n/* harmony import */ var _jqueryNativeEventTrigger__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_jqueryNativeEventTrigger__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n\n/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n/* eslint-disable */\n// this is a dummy file used to compile core-js polyfills so we don't have to include them in any\n// other file.\n\n\n\nwindow.tslib = tslib__WEBPACK_IMPORTED_MODULE_9__;\n\n\nfunction htmlDecode(value) {\n var textArea = document.createElement('textarea');\n textArea.innerHTML = value;\n return textArea.value;\n}\n\nvar invisibleCharEncoded = htmlDecode('⁣'); // modify Vue's escaping functionality to also escape angularjs {{ fields.\n// vue doesn't do this since it doesn't have this problem;\n\nvar oldToDisplayString = window.Vue.toDisplayString;\n\nwindow.Vue.toDisplayString = function matomoToDisplayString(val) {\n var result = oldToDisplayString.call(this, val);\n result = result.replace(/{{/g, \"{\".concat(invisibleCharEncoded, \"{\"));\n return result;\n};\n\nwindow.vueSanitize = function vueSanitize(val) {\n var result = dompurify__WEBPACK_IMPORTED_MODULE_8___default.a.sanitize(val);\n result = result.replace(/{{/g, '{⁣{');\n return result;\n};\n\n//# sourceURL=webpack:///plugins/CoreVue/polyfills/src/index.ts"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_home_dizzy_Projects_matomo_node_modules_core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/core-js/modules/es.promise.js */ \"./node_modules/core-js/modules/es.promise.js\");\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_home_dizzy_Projects_matomo_node_modules_core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_home_dizzy_Projects_matomo_node_modules_core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_promise_finally_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/core-js/modules/es.promise.finally.js */ \"./node_modules/core-js/modules/es.promise.finally.js\");\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_promise_finally_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_home_dizzy_Projects_matomo_node_modules_core_js_modules_es_promise_finally_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/core-js/modules/es.object.entries.js */ \"./node_modules/core-js/modules/es.object.entries.js\");\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_home_dizzy_Projects_matomo_node_modules_core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/core-js/modules/es.object.values.js */ \"./node_modules/core-js/modules/es.object.values.js\");\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_home_dizzy_Projects_matomo_node_modules_core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_string_trim_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./node_modules/core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n/* harmony import */ var _home_dizzy_Projects_matomo_node_modules_core_js_modules_es_string_trim_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_home_dizzy_Projects_matomo_node_modules_core_js_modules_es_string_trim_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! dompurify */ \"./node_modules/dompurify/dist/purify.js\");\n/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(dompurify__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.js\");\n/* harmony import */ var yet_another_abortcontroller_polyfill__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! yet-another-abortcontroller-polyfill */ \"./node_modules/yet-another-abortcontroller-polyfill/index.js\");\n/* harmony import */ var yet_another_abortcontroller_polyfill__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(yet_another_abortcontroller_polyfill__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _jqueryNativeEventTrigger__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./jqueryNativeEventTrigger */ \"./plugins/CoreVue/polyfills/src/jqueryNativeEventTrigger.ts\");\n/* harmony import */ var _jqueryNativeEventTrigger__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_jqueryNativeEventTrigger__WEBPACK_IMPORTED_MODULE_12__);\n\n\n\n\n\n\n\n\n\n\n/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n/* eslint-disable */\n// this is a dummy file used to compile core-js polyfills so we don't have to include them in any\n// other file.\n\n\n\nwindow.tslib = tslib__WEBPACK_IMPORTED_MODULE_10__;\n\n\nfunction htmlDecode(value) {\n var textArea = document.createElement('textarea');\n textArea.innerHTML = value;\n return textArea.value;\n}\n\nvar invisibleCharEncoded = htmlDecode('⁣'); // modify Vue's escaping functionality to also escape angularjs {{ fields.\n// vue doesn't do this since it doesn't have this problem;\n\nvar oldToDisplayString = window.Vue.toDisplayString;\n\nwindow.Vue.toDisplayString = function matomoToDisplayString(val) {\n var result = oldToDisplayString.call(this, val);\n result = result.replace(/{{/g, \"{\".concat(invisibleCharEncoded, \"{\"));\n return result;\n};\n\nwindow.vueSanitize = function vueSanitize(val) {\n var result = dompurify__WEBPACK_IMPORTED_MODULE_9___default.a.sanitize(val);\n result = result.replace(/{{/g, '{⁣{');\n return result;\n};\n\n//# sourceURL=webpack:///plugins/CoreVue/polyfills/src/index.ts"); /***/ }), diff --git a/plugins/CoreVue/polyfills/dist/MatomoPolyfills.min.js b/plugins/CoreVue/polyfills/dist/MatomoPolyfills.min.js index 07611b7535..6531a62f29 100644 --- a/plugins/CoreVue/polyfills/dist/MatomoPolyfills.min.js +++ b/plugins/CoreVue/polyfills/dist/MatomoPolyfills.min.js @@ -1,4 +1,4 @@ -(function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s="452c")})({"00ee":function(t,e,n){var r=n("b622"),o=r("toStringTag"),i={};i[o]="z",t.exports="[object z]"===String(i)},"0366":function(t,e,n){var r=n("1c0b");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"06cf":function(t,e,n){var r=n("83ab"),o=n("d1e7"),i=n("5c6c"),a=n("fc6a"),c=n("a04b"),u=n("5135"),f=n("0cfb"),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=c(e),f)try{return l(t,e)}catch(n){}if(u(t,e))return i(!o.f.call(t,e),t[e])}},"0cb2":function(t,e,n){var r=n("7b0b"),o=Math.floor,i="".replace,a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,u,f,l){var s=n+t.length,p=u.length,d=c;return void 0!==f&&(f=r(f),d=a),i.call(l,d,(function(r,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(s);case"<":a=f[i.slice(1,-1)];break;default:var c=+i;if(0===c)return r;if(c>p){var l=o(c/10);return 0===l?r:l<=p?void 0===u[l-1]?i.charAt(1):u[l-1]+i.charAt(1):r}a=u[c-1]}return void 0===a?"":a}))}},"0cfb":function(t,e,n){var r=n("83ab"),o=n("d039"),i=n("cc12");t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},"107c":function(t,e,n){var r=n("d039"),o=n("da84"),i=o.RegExp;t.exports=r((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},"14c3":function(t,e,n){var r=n("c6b6"),o=n("9263");t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var i=n.call(t,e);if("object"!==typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},"19aa":function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},"1be4":function(t,e,n){var r=n("d066");t.exports=r("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(t,e,n){var r=n("b622"),o=r("iterator"),i=!1;try{var a=0,c={next:function(){return{done:!!a++}},return:function(){i=!0}};c[o]=function(){return this},Array.from(c,(function(){throw 2}))}catch(u){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var r={};r[o]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(u){}return n}},"1cdc":function(t,e,n){var r=n("342f");t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},2266:function(t,e,n){var r=n("825a"),o=n("e95a"),i=n("50c4"),a=n("0366"),c=n("35a1"),u=n("2a62"),f=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var l,s,p,d,v,h,m,y=n&&n.that,b=!(!n||!n.AS_ENTRIES),g=!(!n||!n.IS_ITERATOR),x=!(!n||!n.INTERRUPTED),w=a(e,y,1+b+x),O=function(t){return l&&u(l),new f(!0,t)},_=function(t){return b?(r(t),x?w(t[0],t[1],O):w(t[0],t[1])):x?w(t,O):w(t)};if(g)l=t;else{if(s=c(t),"function"!=typeof s)throw TypeError("Target is not iterable");if(o(s)){for(p=0,d=i(t.length);d>p;p++)if(v=_(t[p]),v&&v instanceof f)return v;return new f(!1)}l=s.call(t)}h=l.next;while(!(m=h.call(l)).done){try{v=_(m.value)}catch(S){throw u(l),S}if("object"==typeof v&&v&&v instanceof f)return v}return new f(!1)}},"23cb":function(t,e,n){var r=n("a691"),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},"23e7":function(t,e,n){var r=n("da84"),o=n("06cf").f,i=n("9112"),a=n("6eeb"),c=n("ce4e"),u=n("e893"),f=n("94ca");t.exports=function(t,e){var n,l,s,p,d,v,h=t.target,m=t.global,y=t.stat;if(l=m?r:y?r[h]||c(h,{}):(r[h]||{}).prototype,l)for(s in e){if(d=e[s],t.noTargetGet?(v=o(l,s),p=v&&v.value):p=l[s],n=f(m?s:h+(y?".":"#")+s,t.forced),!n&&void 0!==p){if(typeof d===typeof p)continue;u(d,p)}(t.sham||p&&p.sham)&&i(d,"sham",!0),a(l,s,d,t)}}},"241c":function(t,e,n){var r=n("ca84"),o=n("7839"),i=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},"24aa":function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},2626:function(t,e,n){"use strict";var r=n("d066"),o=n("9bf2"),i=n("b622"),a=n("83ab"),c=i("species");t.exports=function(t){var e=r(t),n=o.f;a&&e&&!e[c]&&n(e,c,{configurable:!0,get:function(){return this}})}},"2a62":function(t,e,n){var r=n("825a");t.exports=function(t){var e=t["return"];if(void 0!==e)return r(e.call(t)).value}},"2cf4":function(t,e,n){var r,o,i,a,c=n("da84"),u=n("d039"),f=n("0366"),l=n("1be4"),s=n("cc12"),p=n("1cdc"),d=n("605d"),v=c.setImmediate,h=c.clearImmediate,m=c.process,y=c.MessageChannel,b=c.Dispatch,g=0,x={},w="onreadystatechange";try{r=c.location}catch(E){}var O=function(t){if(x.hasOwnProperty(t)){var e=x[t];delete x[t],e()}},_=function(t){return function(){O(t)}},S=function(t){O(t.data)},T=function(t){c.postMessage(String(t),r.protocol+"//"+r.host)};v&&h||(v=function(t){var e=[],n=arguments.length,r=1;while(n>r)e.push(arguments[r++]);return x[++g]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},o(g),g},h=function(t){delete x[t]},d?o=function(t){m.nextTick(_(t))}:b&&b.now?o=function(t){b.now(_(t))}:y&&!p?(i=new y,a=i.port2,i.port1.onmessage=S,o=f(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts&&r&&"file:"!==r.protocol&&!u(T)?(o=T,c.addEventListener("message",S,!1)):o=w in s("script")?function(t){l.appendChild(s("script"))[w]=function(){l.removeChild(this),O(t)}}:function(t){setTimeout(_(t),0)}),t.exports={set:v,clear:h}},"2d00":function(t,e,n){var r,o,i=n("da84"),a=n("342f"),c=i.process,u=i.Deno,f=c&&c.versions||u&&u.version,l=f&&f.v8;l?(r=l.split("."),o=r[0]<4?1:r[0]+r[1]):a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(o=r[1]))),t.exports=o&&+o},"342f":function(t,e,n){var r=n("d066");t.exports=r("navigator","userAgent")||""},"35a1":function(t,e,n){var r=n("f5df"),o=n("3f8c"),i=n("b622"),a=i("iterator");t.exports=function(t){if(void 0!=t)return t[a]||t["@@iterator"]||o[r(t)]}},"37e8":function(t,e,n){var r=n("83ab"),o=n("9bf2"),i=n("825a"),a=n("df75");t.exports=r?Object.defineProperties:function(t,e){i(t);var n,r=a(e),c=r.length,u=0;while(c>u)o.f(t,n=r[u++],e[n]);return t}},"3bbe":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3f8c":function(t,e){t.exports={}},"44ad":function(t,e,n){var r=n("d039"),o=n("c6b6"),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},"44d2":function(t,e,n){var r=n("b622"),o=n("7c73"),i=n("9bf2"),a=r("unscopables"),c=Array.prototype;void 0==c[a]&&i.f(c,a,{configurable:!0,value:o(null)}),t.exports=function(t){c[a][t]=!0}},"44de":function(t,e,n){var r=n("da84");t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},"452c":function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"__extends",(function(){return c})),n.d(r,"__assign",(function(){return u})),n.d(r,"__rest",(function(){return f})),n.d(r,"__decorate",(function(){return l})),n.d(r,"__param",(function(){return s})),n.d(r,"__metadata",(function(){return p})),n.d(r,"__awaiter",(function(){return d})),n.d(r,"__generator",(function(){return v})),n.d(r,"__createBinding",(function(){return h})),n.d(r,"__exportStar",(function(){return m})),n.d(r,"__values",(function(){return y})),n.d(r,"__read",(function(){return b})),n.d(r,"__spread",(function(){return g})),n.d(r,"__spreadArrays",(function(){return x})),n.d(r,"__await",(function(){return w})),n.d(r,"__asyncGenerator",(function(){return O})),n.d(r,"__asyncDelegator",(function(){return _})),n.d(r,"__asyncValues",(function(){return S})),n.d(r,"__makeTemplateObject",(function(){return T})),n.d(r,"__importStar",(function(){return E})),n.d(r,"__importDefault",(function(){return A})),n.d(r,"__classPrivateFieldGet",(function(){return j})),n.d(r,"__classPrivateFieldSet",(function(){return R}));n("e260"),n("e6cf"),n("cca6"),n("a79d"),n("4fad"),n("498a"),n("ac1f"),n("5319");var o=n("c0c4"),i=n.n(o),a=function(t,e){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},a(t,e)};function c(t,e){function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var u=function(){return u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},u.apply(this,arguments)};function f(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function l(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function s(t,e){return function(n,r){e(n,r,t)}}function p(t,e){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(t,e)}function d(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,i){function a(t){try{u(r.next(t))}catch(e){i(e)}}function c(t){try{u(r["throw"](t))}catch(e){i(e)}}function u(t){t.done?n(t.value):o(t.value).then(a,c)}u((r=r.apply(t,e||[])).next())}))}function v(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return u([t,e])}}function u(i){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(o=2&i[0]?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(c){i=[6,c],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}}function h(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}function m(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||(e[n]=t[n])}function y(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{while((void 0===e||e-- >0)&&!(r=i.next()).done)a.push(r.value)}catch(c){o={error:c}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(b(arguments[e]));return t}function x(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,c=i.length;a<c;a++,o++)r[o]=i[a];return r}function w(t){return this instanceof w?(this.v=t,this):new w(t)}function O(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(t,e||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){o[t]&&(r[t]=function(e){return new Promise((function(n,r){i.push([t,e,n,r])>1||c(t,e)}))})}function c(t,e){try{u(o[t](e))}catch(n){s(i[0][3],n)}}function u(t){t.value instanceof w?Promise.resolve(t.value.v).then(f,l):s(i[0][2],t)}function f(t){c("next",t)}function l(t){c("throw",t)}function s(t,e){t(e),i.shift(),i.length&&c(i[0][0],i[0][1])}}function _(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,o){e[r]=t[r]?function(e){return(n=!n)?{value:w(t[r](e)),done:"return"===r}:o?o(e):e}:o}}function S(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"===typeof y?y(t):t[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){e=t[n](e),o(r,i,e.done,e.value)}))}}function o(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)}}function T(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function E(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function A(t){return t&&t.__esModule?t:{default:t}}function j(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function R(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}n("dba4"),n("a572");function k(t){var e=document.createElement("textarea");return e.innerHTML=t,e.value} +(function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s="452c")})({"00ee":function(t,e,n){var r=n("b622"),o=r("toStringTag"),i={};i[o]="z",t.exports="[object z]"===String(i)},"0366":function(t,e,n){var r=n("1c0b");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"06cf":function(t,e,n){var r=n("83ab"),o=n("d1e7"),i=n("5c6c"),a=n("fc6a"),c=n("a04b"),u=n("5135"),f=n("0cfb"),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=c(e),f)try{return l(t,e)}catch(n){}if(u(t,e))return i(!o.f.call(t,e),t[e])}},"07ac":function(t,e,n){var r=n("23e7"),o=n("6f53").values;r({target:"Object",stat:!0},{values:function(t){return o(t)}})},"0cb2":function(t,e,n){var r=n("7b0b"),o=Math.floor,i="".replace,a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,u,f,l){var s=n+t.length,p=u.length,d=c;return void 0!==f&&(f=r(f),d=a),i.call(l,d,(function(r,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(s);case"<":a=f[i.slice(1,-1)];break;default:var c=+i;if(0===c)return r;if(c>p){var l=o(c/10);return 0===l?r:l<=p?void 0===u[l-1]?i.charAt(1):u[l-1]+i.charAt(1):r}a=u[c-1]}return void 0===a?"":a}))}},"0cfb":function(t,e,n){var r=n("83ab"),o=n("d039"),i=n("cc12");t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},"107c":function(t,e,n){var r=n("d039"),o=n("da84"),i=o.RegExp;t.exports=r((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},"14c3":function(t,e,n){var r=n("c6b6"),o=n("9263");t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var i=n.call(t,e);if("object"!==typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},"19aa":function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},"1be4":function(t,e,n){var r=n("d066");t.exports=r("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(t,e,n){var r=n("b622"),o=r("iterator"),i=!1;try{var a=0,c={next:function(){return{done:!!a++}},return:function(){i=!0}};c[o]=function(){return this},Array.from(c,(function(){throw 2}))}catch(u){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var r={};r[o]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(u){}return n}},"1cdc":function(t,e,n){var r=n("342f");t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},2266:function(t,e,n){var r=n("825a"),o=n("e95a"),i=n("50c4"),a=n("0366"),c=n("35a1"),u=n("2a62"),f=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var l,s,p,d,v,h,m,y=n&&n.that,b=!(!n||!n.AS_ENTRIES),g=!(!n||!n.IS_ITERATOR),x=!(!n||!n.INTERRUPTED),w=a(e,y,1+b+x),O=function(t){return l&&u(l),new f(!0,t)},_=function(t){return b?(r(t),x?w(t[0],t[1],O):w(t[0],t[1])):x?w(t,O):w(t)};if(g)l=t;else{if(s=c(t),"function"!=typeof s)throw TypeError("Target is not iterable");if(o(s)){for(p=0,d=i(t.length);d>p;p++)if(v=_(t[p]),v&&v instanceof f)return v;return new f(!1)}l=s.call(t)}h=l.next;while(!(m=h.call(l)).done){try{v=_(m.value)}catch(S){throw u(l),S}if("object"==typeof v&&v&&v instanceof f)return v}return new f(!1)}},"23cb":function(t,e,n){var r=n("a691"),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},"23e7":function(t,e,n){var r=n("da84"),o=n("06cf").f,i=n("9112"),a=n("6eeb"),c=n("ce4e"),u=n("e893"),f=n("94ca");t.exports=function(t,e){var n,l,s,p,d,v,h=t.target,m=t.global,y=t.stat;if(l=m?r:y?r[h]||c(h,{}):(r[h]||{}).prototype,l)for(s in e){if(d=e[s],t.noTargetGet?(v=o(l,s),p=v&&v.value):p=l[s],n=f(m?s:h+(y?".":"#")+s,t.forced),!n&&void 0!==p){if(typeof d===typeof p)continue;u(d,p)}(t.sham||p&&p.sham)&&i(d,"sham",!0),a(l,s,d,t)}}},"241c":function(t,e,n){var r=n("ca84"),o=n("7839"),i=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},"24aa":function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},2626:function(t,e,n){"use strict";var r=n("d066"),o=n("9bf2"),i=n("b622"),a=n("83ab"),c=i("species");t.exports=function(t){var e=r(t),n=o.f;a&&e&&!e[c]&&n(e,c,{configurable:!0,get:function(){return this}})}},"2a62":function(t,e,n){var r=n("825a");t.exports=function(t){var e=t["return"];if(void 0!==e)return r(e.call(t)).value}},"2cf4":function(t,e,n){var r,o,i,a,c=n("da84"),u=n("d039"),f=n("0366"),l=n("1be4"),s=n("cc12"),p=n("1cdc"),d=n("605d"),v=c.setImmediate,h=c.clearImmediate,m=c.process,y=c.MessageChannel,b=c.Dispatch,g=0,x={},w="onreadystatechange";try{r=c.location}catch(E){}var O=function(t){if(x.hasOwnProperty(t)){var e=x[t];delete x[t],e()}},_=function(t){return function(){O(t)}},S=function(t){O(t.data)},T=function(t){c.postMessage(String(t),r.protocol+"//"+r.host)};v&&h||(v=function(t){var e=[],n=arguments.length,r=1;while(n>r)e.push(arguments[r++]);return x[++g]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},o(g),g},h=function(t){delete x[t]},d?o=function(t){m.nextTick(_(t))}:b&&b.now?o=function(t){b.now(_(t))}:y&&!p?(i=new y,a=i.port2,i.port1.onmessage=S,o=f(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts&&r&&"file:"!==r.protocol&&!u(T)?(o=T,c.addEventListener("message",S,!1)):o=w in s("script")?function(t){l.appendChild(s("script"))[w]=function(){l.removeChild(this),O(t)}}:function(t){setTimeout(_(t),0)}),t.exports={set:v,clear:h}},"2d00":function(t,e,n){var r,o,i=n("da84"),a=n("342f"),c=i.process,u=i.Deno,f=c&&c.versions||u&&u.version,l=f&&f.v8;l?(r=l.split("."),o=r[0]<4?1:r[0]+r[1]):a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(o=r[1]))),t.exports=o&&+o},"342f":function(t,e,n){var r=n("d066");t.exports=r("navigator","userAgent")||""},"35a1":function(t,e,n){var r=n("f5df"),o=n("3f8c"),i=n("b622"),a=i("iterator");t.exports=function(t){if(void 0!=t)return t[a]||t["@@iterator"]||o[r(t)]}},"37e8":function(t,e,n){var r=n("83ab"),o=n("9bf2"),i=n("825a"),a=n("df75");t.exports=r?Object.defineProperties:function(t,e){i(t);var n,r=a(e),c=r.length,u=0;while(c>u)o.f(t,n=r[u++],e[n]);return t}},"3bbe":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3f8c":function(t,e){t.exports={}},"44ad":function(t,e,n){var r=n("d039"),o=n("c6b6"),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},"44d2":function(t,e,n){var r=n("b622"),o=n("7c73"),i=n("9bf2"),a=r("unscopables"),c=Array.prototype;void 0==c[a]&&i.f(c,a,{configurable:!0,value:o(null)}),t.exports=function(t){c[a][t]=!0}},"44de":function(t,e,n){var r=n("da84");t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},"452c":function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"__extends",(function(){return c})),n.d(r,"__assign",(function(){return u})),n.d(r,"__rest",(function(){return f})),n.d(r,"__decorate",(function(){return l})),n.d(r,"__param",(function(){return s})),n.d(r,"__metadata",(function(){return p})),n.d(r,"__awaiter",(function(){return d})),n.d(r,"__generator",(function(){return v})),n.d(r,"__createBinding",(function(){return h})),n.d(r,"__exportStar",(function(){return m})),n.d(r,"__values",(function(){return y})),n.d(r,"__read",(function(){return b})),n.d(r,"__spread",(function(){return g})),n.d(r,"__spreadArrays",(function(){return x})),n.d(r,"__await",(function(){return w})),n.d(r,"__asyncGenerator",(function(){return O})),n.d(r,"__asyncDelegator",(function(){return _})),n.d(r,"__asyncValues",(function(){return S})),n.d(r,"__makeTemplateObject",(function(){return T})),n.d(r,"__importStar",(function(){return E})),n.d(r,"__importDefault",(function(){return A})),n.d(r,"__classPrivateFieldGet",(function(){return j})),n.d(r,"__classPrivateFieldSet",(function(){return R}));n("e260"),n("e6cf"),n("cca6"),n("a79d"),n("4fad"),n("07ac"),n("498a"),n("ac1f"),n("5319");var o=n("c0c4"),i=n.n(o),a=function(t,e){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},a(t,e)};function c(t,e){function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var u=function(){return u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},u.apply(this,arguments)};function f(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function l(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function s(t,e){return function(n,r){e(n,r,t)}}function p(t,e){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(t,e)}function d(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,i){function a(t){try{u(r.next(t))}catch(e){i(e)}}function c(t){try{u(r["throw"](t))}catch(e){i(e)}}function u(t){t.done?n(t.value):o(t.value).then(a,c)}u((r=r.apply(t,e||[])).next())}))}function v(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return u([t,e])}}function u(i){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(o=2&i[0]?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(c){i=[6,c],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}}function h(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}function m(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||(e[n]=t[n])}function y(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{while((void 0===e||e-- >0)&&!(r=i.next()).done)a.push(r.value)}catch(c){o={error:c}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(b(arguments[e]));return t}function x(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,c=i.length;a<c;a++,o++)r[o]=i[a];return r}function w(t){return this instanceof w?(this.v=t,this):new w(t)}function O(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(t,e||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){o[t]&&(r[t]=function(e){return new Promise((function(n,r){i.push([t,e,n,r])>1||c(t,e)}))})}function c(t,e){try{u(o[t](e))}catch(n){s(i[0][3],n)}}function u(t){t.value instanceof w?Promise.resolve(t.value.v).then(f,l):s(i[0][2],t)}function f(t){c("next",t)}function l(t){c("throw",t)}function s(t,e){t(e),i.shift(),i.length&&c(i[0][0],i[0][1])}}function _(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,o){e[r]=t[r]?function(e){return(n=!n)?{value:w(t[r](e)),done:"return"===r}:o?o(e):e}:o}}function S(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"===typeof y?y(t):t[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){e=t[n](e),o(r,i,e.done,e.value)}))}}function o(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)}}function T(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function E(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function A(t){return t&&t.__esModule?t:{default:t}}function j(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function R(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}n("dba4"),n("a572");function k(t){var e=document.createElement("textarea");return e.innerHTML=t,e.value} /*! * Matomo - free/libre analytics platform * diff --git a/plugins/CoreVue/types/index.d.ts b/plugins/CoreVue/types/index.d.ts index 9a88ea4ec2..8678ea01c7 100644 --- a/plugins/CoreVue/types/index.d.ts +++ b/plugins/CoreVue/types/index.d.ts @@ -6,12 +6,12 @@ */ import jqXHR = JQuery.jqXHR; -import {IAngularStatic, IScope} from 'angular'; +import { IAngularStatic, IScope } from 'angular'; import { ExtendedKeyboardEvent } from 'mousetrap'; declare global { - type ParameterValue = string | number | null | undefined | ParameterValue[]; - type QueryParameters = {[name: string]: ParameterValue | QueryParameters}; + type QueryParameterValue = string | number | null | undefined | QueryParameterValue[]; + type QueryParameters = {[name: string]: QueryParameterValue | QueryParameters}; interface WrappedEventListener extends Function { wrapper?: (evt: Event) => void; @@ -49,16 +49,19 @@ declare global { interface PiwikPopoverGlobal { isOpen(); + close(); setTitle(title: string): void; setContent(html: string|HTMLElement|JQuery|JQLite): void; - showLoading(loadingName: string, popoverSubject: string, height: number, dialogClass: string): JQuery; + showLoading(loadingName: string, popoverSubject?: string, height?: number, dialogClass?: string): JQuery; + onClose(fn: () => void); } let Piwik_Popover: PiwikPopoverGlobal; interface ModalConfirmCallbacks { - yes: () => void; - no: () => void; + yes?: () => void; + no?: () => void; + validation?: () => void; } interface ModalConfirmOptions { @@ -75,13 +78,14 @@ declare global { escape(text: string): string; redirect(params: any); htmlDecode(encoded: string): string; + htmlEntities(value: string): string; modalConfirm(element: JQuery|JQLite|HTMLElement|string, callbacks?: ModalConfirmCallbacks, options?: ModalConfirmOptions); getAngularDependency(eventName: string): any; isAngularRenderingThePage(): boolean; - setMarginLeftToBeInViewport(elementToPosition: JQuery|JQLite|HTMLElement|string); + setMarginLeftToBeInViewport(elementToPosition: JQuery|JQLite|Element|string); lazyScrollTo(element: JQuery|JQLite|HTMLElement|string, time: number, forceScroll?: boolean); registerShortcut(key: string, description: string, callback: (event: ExtendedKeyboardEvent) => void): void; - compileAngularComponents(selector: string, options?: CompileAngularComponentsOptions): void; + compileAngularComponents(selector: JQuery|JQLite|HTMLElement|string, options?: CompileAngularComponentsOptions): void; } let piwikHelper: PiwikHelperGlobal; @@ -95,6 +99,7 @@ declare global { propagateNewPage(str?: string, showAjaxLoading?: boolean, strHash?: string, paramsToRemove?: string[], wholeNewUrl?: string); buildReportingUrl(ajaxUrl: string): string; isLoginPage(): boolean; + resetPopoverStack(): void; popoverHandlers: Record<string, (param: string) => void>; } @@ -136,6 +141,8 @@ declare global { maxDateDay: number; config: Record<string, string|number|string[]>; hasSuperUserAccess: boolean; + language: string; + cacheBuster: string; updatePeriodParamsFromUrl(): void; updateDateInTitle(date: string, period: string): void; @@ -152,8 +159,8 @@ declare global { let piwik: PiwikGlobal; interface WidgetsHelper { - availableWidgets: unknown[]; - getAvailableWidgets(callback?: (widgets: unknown[]) => unknown); + availableWidgets?: unknown[]; + getAvailableWidgets(callback?: (widgets: Record<string, unknown[]>) => unknown); } let widgetsHelper: WidgetsHelper; @@ -173,9 +180,12 @@ declare global { Materialize: M; widgetsHelper: WidgetsHelper; anchorLinkFix: AnchorLinkFix; + $: JQueryStatic; + Piwik_Popover: PiwikPopoverGlobal; _pk_translate(translationStringId: string, values: string[]): string; require(p: string): any; initTopControls(): void; + vueSanitize(content: string): string; } } diff --git a/plugins/ExampleVue/vue/dist/ExampleVue.umd.1.js b/plugins/ExampleVue/vue/dist/ExampleVue.umd.1.js index 37a1f0ca8f..1f1d57ec3c 100644 --- a/plugins/ExampleVue/vue/dist/ExampleVue.umd.1.js +++ b/plugins/ExampleVue/vue/dist/ExampleVue.umd.1.js @@ -10,10 +10,10 @@ __webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"} var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); -// 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/ExampleVue/vue/src/ExampleComponent/ExampleComponent.vue?vue&type=template&id=75d288a9&scoped=true +// 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/ExampleVue/vue/src/ExampleComponent/ExampleComponent.vue?vue&type=template&id=5199cc7c&scoped=true -Object(external_commonjs_vue_commonjs2_vue_root_Vue_["pushScopeId"])("data-v-75d288a9"); +Object(external_commonjs_vue_commonjs2_vue_root_Vue_["pushScopeId"])("data-v-5199cc7c"); var _hoisted_1 = { class: "example-component" @@ -52,12 +52,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { _: 1 }, 8, ["modelValue"])]); } -// CONCATENATED MODULE: ./plugins/ExampleVue/vue/src/ExampleComponent/ExampleComponent.vue?vue&type=template&id=75d288a9&scoped=true +// CONCATENATED MODULE: ./plugins/ExampleVue/vue/src/ExampleComponent/ExampleComponent.vue?vue&type=template&id=5199cc7c&scoped=true // EXTERNAL MODULE: external "CoreHome" var external_CoreHome_ = __webpack_require__("19dc"); -// 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/ExampleVue/vue/src/ExampleComponent/ExampleComponent.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/ExampleVue/vue/src/ExampleComponent/ExampleComponent.vue?vue&type=script&lang=ts /* harmony default export */ var ExampleComponentvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ @@ -70,23 +70,21 @@ var external_CoreHome_ = __webpack_require__("19dc"); showDialog: false }; }, - setup: function setup() { - return { - increment: function increment() { - this.count += 1; - this.showDialog = this.count > 15; - }, - decrement: function decrement() { - this.count -= 1; - this.showDialog = this.count > 15; - } - }; + methods: { + increment: function increment() { + this.count += 1; + this.showDialog = this.count > 15; + }, + decrement: function decrement() { + this.count -= 1; + this.showDialog = this.count > 15; + } } })); // CONCATENATED MODULE: ./plugins/ExampleVue/vue/src/ExampleComponent/ExampleComponent.vue?vue&type=script&lang=ts -// EXTERNAL MODULE: ./plugins/ExampleVue/vue/src/ExampleComponent/ExampleComponent.vue?vue&type=style&index=0&id=75d288a9&lang=less&scoped=true -var ExampleComponentvue_type_style_index_0_id_75d288a9_lang_less_scoped_true = __webpack_require__("6541"); +// EXTERNAL MODULE: ./plugins/ExampleVue/vue/src/ExampleComponent/ExampleComponent.vue?vue&type=style&index=0&id=5199cc7c&lang=less&scoped=true +var ExampleComponentvue_type_style_index_0_id_5199cc7c_lang_less_scoped_true = __webpack_require__("4044"); // CONCATENATED MODULE: ./plugins/ExampleVue/vue/src/ExampleComponent/ExampleComponent.vue @@ -95,24 +93,24 @@ var ExampleComponentvue_type_style_index_0_id_75d288a9_lang_less_scoped_true = _ ExampleComponentvue_type_script_lang_ts.render = render -ExampleComponentvue_type_script_lang_ts.__scopeId = "data-v-75d288a9" +ExampleComponentvue_type_script_lang_ts.__scopeId = "data-v-5199cc7c" /* harmony default export */ var ExampleComponent = __webpack_exports__["default"] = (ExampleComponentvue_type_script_lang_ts); /***/ }), -/***/ "6541": +/***/ "4044": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_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_index_js_ref_0_1_ExampleComponent_vue_vue_type_style_index_0_id_75d288a9_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7143"); -/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_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_index_js_ref_0_1_ExampleComponent_vue_vue_type_style_index_0_id_75d288a9_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_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_index_js_ref_0_1_ExampleComponent_vue_vue_type_style_index_0_id_75d288a9_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_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_index_js_ref_0_1_ExampleComponent_vue_vue_type_style_index_0_id_5199cc7c_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9852"); +/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_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_index_js_ref_0_1_ExampleComponent_vue_vue_type_style_index_0_id_5199cc7c_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_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_index_js_ref_0_1_ExampleComponent_vue_vue_type_style_index_0_id_5199cc7c_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /***/ }), -/***/ "7143": +/***/ "9852": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin diff --git a/plugins/ExampleVue/vue/dist/ExampleVue.umd.js b/plugins/ExampleVue/vue/dist/ExampleVue.umd.js index 65ebeba859..ff2a87592d 100644 --- a/plugins/ExampleVue/vue/dist/ExampleVue.umd.js +++ b/plugins/ExampleVue/vue/dist/ExampleVue.umd.js @@ -96,7 +96,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]); /******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) { /******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) { -/******/ var href = "css/" + ({}[chunkId]||chunkId) + "." + {"1":"3373f545"}[chunkId] + ".css"; +/******/ var href = "css/" + ({}[chunkId]||chunkId) + "." + {"1":"d4a31fec"}[chunkId] + ".css"; /******/ var fullhref = __webpack_require__.p + href; /******/ var existingLinkTags = document.getElementsByTagName("link"); /******/ for(var i = 0; i < existingLinkTags.length; i++) { @@ -279,7 +279,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__; __webpack_require__.r(__webpack_exports__); // EXPORTS -__webpack_require__.d(__webpack_exports__, "exampleVueComponentAdapter", function() { return /* reexport */ exampleVueComponentAdapter; }); +__webpack_require__.d(__webpack_exports__, "exampleVueComponentAdapter", function() { return /* reexport */ ExampleComponent_adapter; }); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js // This file is imported into lib/wc client bundles. @@ -300,6 +300,9 @@ if (typeof window !== 'undefined') { // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"} var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); +// EXTERNAL MODULE: external "CoreHome" +var external_CoreHome_ = __webpack_require__("19dc"); + // CONCATENATED MODULE: ./plugins/ExampleVue/vue/src/ExampleComponent/ExampleComponent.adapter.ts /*! * Matomo - free/libre analytics platform @@ -308,23 +311,14 @@ var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ + var AsyncExampleComponent = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineAsyncComponent"])(function () { return __webpack_require__.e(/* import() */ 1).then(__webpack_require__.bind(null, "2d21")); }); -function exampleVueComponentAdapter() { - return { - restrict: 'A', - scope: {}, - template: '', - link: function exampleVueComponentAdapterLink(scope, element) { - var vueApp = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createApp"])(AsyncExampleComponent); - vueApp.config.globalProperties.$sanitize = window.vueSanitize; - vueApp.mount(element[0]); - } - }; -} -exampleVueComponentAdapter.$inject = []; -angular.module('piwikApp').directive('exampleVueComponent', exampleVueComponentAdapter); +/* harmony default export */ var ExampleComponent_adapter = (Object(external_CoreHome_["createAngularJsAdapter"])({ + component: AsyncExampleComponent, + directiveName: 'exampleVueComponent' +})); // CONCATENATED MODULE: ./plugins/ExampleVue/vue/src/index.ts /*! * Matomo - free/libre analytics platform diff --git a/plugins/ExampleVue/vue/dist/ExampleVue.umd.min.1.js b/plugins/ExampleVue/vue/dist/ExampleVue.umd.min.1.js index aaa44566a8..7f267b6946 100644 --- a/plugins/ExampleVue/vue/dist/ExampleVue.umd.min.1.js +++ b/plugins/ExampleVue/vue/dist/ExampleVue.umd.min.1.js @@ -1,2 +1,2 @@ -(("undefined"!==typeof self?self:this)["webpackJsonpExampleVue"]=("undefined"!==typeof self?self:this)["webpackJsonpExampleVue"]||[]).push([[1],{"2d21":function(e,t,n){"use strict";n.r(t);var o=n("8bbf");Object(o["pushScopeId"])("data-v-75d288a9");var c={class:"example-component"},a=Object(o["createElementVNode"])("div",{class:"ui-confirm exampleDialog"},[Object(o["createElementVNode"])("h2",null,"Alert"),Object(o["createElementVNode"])("p",null," The count is greater than 1 right now! "),Object(o["createElementVNode"])("input",{type:"button",value:"OK",role:"yes"})],-1);function i(e,t,n,i,l,u){var r=Object(o["resolveComponent"])("MatomoDialog");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",c,[Object(o["createElementVNode"])("button",{onClick:t[0]||(t[0]=function(){return e.decrement&&e.decrement.apply(e,arguments)})},"-"),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.count)+" ",1),Object(o["createElementVNode"])("button",{onClick:t[1]||(t[1]=function(){return e.increment&&e.increment.apply(e,arguments)})},"+"),Object(o["createVNode"])(r,{modelValue:e.showDialog,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.showDialog=t})},{default:Object(o["withCtx"])((function(){return[a]})),_:1},8,["modelValue"])])}Object(o["popScopeId"])();var l=n("19dc"),u=Object(o["defineComponent"])({components:{MatomoDialog:l["MatomoDialog"]},data:function(){return{count:12,showDialog:!1}},setup:function(){return{increment:function(){this.count+=1,this.showDialog=this.count>15},decrement:function(){this.count-=1,this.showDialog=this.count>15}}}});n("6541");u.render=i,u.__scopeId="data-v-75d288a9";t["default"]=u},6541:function(e,t,n){"use strict";n("7143")},7143:function(e,t,n){}}]); +(("undefined"!==typeof self?self:this)["webpackJsonpExampleVue"]=("undefined"!==typeof self?self:this)["webpackJsonpExampleVue"]||[]).push([[1],{"2d21":function(e,t,n){"use strict";n.r(t);var o=n("8bbf");Object(o["pushScopeId"])("data-v-5199cc7c");var c={class:"example-component"},a=Object(o["createElementVNode"])("div",{class:"ui-confirm exampleDialog"},[Object(o["createElementVNode"])("h2",null,"Alert"),Object(o["createElementVNode"])("p",null," The count is greater than 1 right now! "),Object(o["createElementVNode"])("input",{type:"button",value:"OK",role:"yes"})],-1);function l(e,t,n,l,i,u){var r=Object(o["resolveComponent"])("MatomoDialog");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",c,[Object(o["createElementVNode"])("button",{onClick:t[0]||(t[0]=function(){return e.decrement&&e.decrement.apply(e,arguments)})},"-"),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.count)+" ",1),Object(o["createElementVNode"])("button",{onClick:t[1]||(t[1]=function(){return e.increment&&e.increment.apply(e,arguments)})},"+"),Object(o["createVNode"])(r,{modelValue:e.showDialog,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.showDialog=t})},{default:Object(o["withCtx"])((function(){return[a]})),_:1},8,["modelValue"])])}Object(o["popScopeId"])();var i=n("19dc"),u=Object(o["defineComponent"])({components:{MatomoDialog:i["MatomoDialog"]},data:function(){return{count:12,showDialog:!1}},methods:{increment:function(){this.count+=1,this.showDialog=this.count>15},decrement:function(){this.count-=1,this.showDialog=this.count>15}}});n("4044");u.render=l,u.__scopeId="data-v-5199cc7c";t["default"]=u},4044:function(e,t,n){"use strict";n("9852")},9852:function(e,t,n){}}]); //# sourceMappingURL=ExampleVue.umd.min.1.js.map
\ No newline at end of file diff --git a/plugins/ExampleVue/vue/dist/ExampleVue.umd.min.js b/plugins/ExampleVue/vue/dist/ExampleVue.umd.min.js index 4429a42014..ce8a3795aa 100644 --- a/plugins/ExampleVue/vue/dist/ExampleVue.umd.min.js +++ b/plugins/ExampleVue/vue/dist/ExampleVue.umd.min.js @@ -1,2 +1,2 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["ExampleVue"]=t(require("CoreHome"),require("vue")):e["ExampleVue"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){function t(t){for(var n,r,u=t[0],i=t[1],a=0,f=[];a<u.length;a++)r=u[a],Object.prototype.hasOwnProperty.call(o,r)&&o[r]&&f.push(o[r][0]),o[r]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);l&&l(t);while(f.length)f.shift()()}var n={},r={0:0},o={0:0};function u(e){return i.p+"ExampleVue.umd.min."+({}[e]||e)+".js"}function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[],n={1:1};r[e]?t.push(r[e]):0!==r[e]&&n[e]&&t.push(r[e]=new Promise((function(t,n){for(var o="css/"+({}[e]||e)+"."+{1:"3373f545"}[e]+".css",u=i.p+o,a=document.getElementsByTagName("link"),f=0;f<a.length;f++){var c=a[f],l=c.getAttribute("data-href")||c.getAttribute("href");if("stylesheet"===c.rel&&(l===o||l===u))return t()}var p=document.getElementsByTagName("style");for(f=0;f<p.length;f++){c=p[f],l=c.getAttribute("data-href");if(l===o||l===u)return t()}var s=document.createElement("link");s.rel="stylesheet",s.type="text/css",s.onload=t,s.onerror=function(t){var o=t&&t.target&&t.target.src||u,i=new Error("Loading CSS chunk "+e+" failed.\n("+o+")");i.code="CSS_CHUNK_LOAD_FAILED",i.request=o,delete r[e],s.parentNode.removeChild(s),n(i)},s.href=u;var d=document.getElementsByTagName("head")[0];d.appendChild(s)})).then((function(){r[e]=0})));var a=o[e];if(0!==a)if(a)t.push(a[2]);else{var f=new Promise((function(t,n){a=o[e]=[t,n]}));t.push(a[2]=f);var c,l=document.createElement("script");l.charset="utf-8",l.timeout=120,i.nc&&l.setAttribute("nonce",i.nc),l.src=u(e);var p=new Error;c=function(t){l.onerror=l.onload=null,clearTimeout(s);var n=o[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;p.message="Loading chunk "+e+" failed.\n("+r+": "+u+")",p.name="ChunkLoadError",p.type=r,p.request=u,n[1](p)}o[e]=void 0}};var s=setTimeout((function(){c({type:"timeout",target:l})}),12e4);l.onerror=l.onload=c,document.head.appendChild(l)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="plugins/ExampleVue/vue/dist/",i.oe=function(e){throw console.error(e),e};var a=("undefined"!==typeof self?self:this)["webpackJsonpExampleVue"]=("undefined"!==typeof self?self:this)["webpackJsonpExampleVue"]||[],f=a.push.bind(a);a.push=t,a=a.slice();for(var c=0;c<a.length;c++)t(a[c]);var l=f;return i(i.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"exampleVueComponentAdapter",(function(){return a})),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var u=n("8bbf"),i=Object(u["defineAsyncComponent"])((function(){return n.e(1).then(n.bind(null,"2d21"))}));function a(){return{restrict:"A",scope:{},template:"",link:function(e,t){var n=Object(u["createApp"])(i);n.config.globalProperties.$sanitize=window.vueSanitize,n.mount(t[0])}}}a.$inject=[],angular.module("piwikApp").directive("exampleVueComponent",a)}})})); +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["ExampleVue"]=t(require("CoreHome"),require("vue")):e["ExampleVue"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){function t(t){for(var r,n,u=t[0],i=t[1],a=0,f=[];a<u.length;a++)n=u[a],Object.prototype.hasOwnProperty.call(o,n)&&o[n]&&f.push(o[n][0]),o[n]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);l&&l(t);while(f.length)f.shift()()}var r={},n={0:0},o={0:0};function u(e){return i.p+"ExampleVue.umd.min."+({}[e]||e)+".js"}function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.e=function(e){var t=[],r={1:1};n[e]?t.push(n[e]):0!==n[e]&&r[e]&&t.push(n[e]=new Promise((function(t,r){for(var o="css/"+({}[e]||e)+"."+{1:"d4a31fec"}[e]+".css",u=i.p+o,a=document.getElementsByTagName("link"),f=0;f<a.length;f++){var c=a[f],l=c.getAttribute("data-href")||c.getAttribute("href");if("stylesheet"===c.rel&&(l===o||l===u))return t()}var s=document.getElementsByTagName("style");for(f=0;f<s.length;f++){c=s[f],l=c.getAttribute("data-href");if(l===o||l===u)return t()}var p=document.createElement("link");p.rel="stylesheet",p.type="text/css",p.onload=t,p.onerror=function(t){var o=t&&t.target&&t.target.src||u,i=new Error("Loading CSS chunk "+e+" failed.\n("+o+")");i.code="CSS_CHUNK_LOAD_FAILED",i.request=o,delete n[e],p.parentNode.removeChild(p),r(i)},p.href=u;var d=document.getElementsByTagName("head")[0];d.appendChild(p)})).then((function(){n[e]=0})));var a=o[e];if(0!==a)if(a)t.push(a[2]);else{var f=new Promise((function(t,r){a=o[e]=[t,r]}));t.push(a[2]=f);var c,l=document.createElement("script");l.charset="utf-8",l.timeout=120,i.nc&&l.setAttribute("nonce",i.nc),l.src=u(e);var s=new Error;c=function(t){l.onerror=l.onload=null,clearTimeout(p);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",s.name="ChunkLoadError",s.type=n,s.request=u,r[1](s)}o[e]=void 0}};var p=setTimeout((function(){c({type:"timeout",target:l})}),12e4);l.onerror=l.onload=c,document.head.appendChild(l)}return Promise.all(t)},i.m=e,i.c=r,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="plugins/ExampleVue/vue/dist/",i.oe=function(e){throw console.error(e),e};var a=("undefined"!==typeof self?self:this)["webpackJsonpExampleVue"]=("undefined"!==typeof self?self:this)["webpackJsonpExampleVue"]||[],f=a.push.bind(a);a.push=t,a=a.slice();for(var c=0;c<a.length;c++)t(a[c]);var l=f;return i(i.s="fae3")}({"19dc":function(t,r){t.exports=e},"8bbf":function(e,r){e.exports=t},fae3:function(e,t,r){"use strict";if(r.r(t),r.d(t,"exampleVueComponentAdapter",(function(){return f})),"undefined"!==typeof window){var n=window.document.currentScript,o=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(r.p=o[1])}var u=r("8bbf"),i=r("19dc"),a=Object(u["defineAsyncComponent"])((function(){return r.e(1).then(r.bind(null,"2d21"))})),f=Object(i["createAngularJsAdapter"])({component:a,directiveName:"exampleVueComponent"})}})})); //# sourceMappingURL=ExampleVue.umd.min.js.map
\ No newline at end of file diff --git a/plugins/ExampleVue/vue/dist/css/1.3373f545.css b/plugins/ExampleVue/vue/dist/css/1.d4a31fec.css index e1b4698758..ca386a1367 100644 --- a/plugins/ExampleVue/vue/dist/css/1.3373f545.css +++ b/plugins/ExampleVue/vue/dist/css/1.d4a31fec.css @@ -1 +1 @@ -.example-component[data-v-75d288a9]{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center}.example-component button[data-v-75d288a9]{background-color:indigo;color:#fff;margin:8px}
\ No newline at end of file +.example-component[data-v-5199cc7c]{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center}.example-component button[data-v-5199cc7c]{background-color:indigo;color:#fff;margin:8px}
\ No newline at end of file diff --git a/plugins/ExampleVue/vue/src/ExampleComponent/ExampleComponent.adapter.ts b/plugins/ExampleVue/vue/src/ExampleComponent/ExampleComponent.adapter.ts index b848fa8518..1dcdf6a6d0 100644 --- a/plugins/ExampleVue/vue/src/ExampleComponent/ExampleComponent.adapter.ts +++ b/plugins/ExampleVue/vue/src/ExampleComponent/ExampleComponent.adapter.ts @@ -5,24 +5,12 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import { createApp, defineAsyncComponent } from 'vue'; +import { defineAsyncComponent } from 'vue'; +import { createAngularJsAdapter } from 'CoreHome'; const AsyncExampleComponent = defineAsyncComponent(() => import('./ExampleComponent.vue')); -export default function exampleVueComponentAdapter(): ng.IDirective { - return { - restrict: 'A', - scope: { - }, - template: '', - link: function exampleVueComponentAdapterLink(scope: ng.IScope, element: ng.IAugmentedJQuery) { - const vueApp = createApp(AsyncExampleComponent); - vueApp.config.globalProperties.$sanitize = window.vueSanitize; - vueApp.mount(element[0]); - }, - }; -} - -exampleVueComponentAdapter.$inject = []; - -angular.module('piwikApp').directive('exampleVueComponent', exampleVueComponentAdapter); +export default createAngularJsAdapter({ + component: AsyncExampleComponent, + directiveName: 'exampleVueComponent', +}); diff --git a/plugins/ExampleVue/vue/src/ExampleComponent/ExampleComponent.vue b/plugins/ExampleVue/vue/src/ExampleComponent/ExampleComponent.vue index 0af7c22cde..94aa40254a 100644 --- a/plugins/ExampleVue/vue/src/ExampleComponent/ExampleComponent.vue +++ b/plugins/ExampleVue/vue/src/ExampleComponent/ExampleComponent.vue @@ -42,27 +42,30 @@ import { defineComponent } from 'vue'; import { MatomoDialog } from 'CoreHome'; +interface ExampleComponentState { + count: number; + showDialog: boolean; +} + export default defineComponent({ components: { MatomoDialog, }, - data() { + data(): ExampleComponentState { return { count: 12, showDialog: false, }; }, - setup() { - return { - increment() { - this.count += 1; - this.showDialog = this.count > 15; - }, - decrement() { - this.count -= 1; - this.showDialog = this.count > 15; - }, - }; + methods: { + increment() { + this.count += 1; + this.showDialog = this.count > 15; + }, + decrement() { + this.count -= 1; + this.showDialog = this.count > 15; + }, }, }); </script> diff --git a/plugins/Feedback/vue/dist/Feedback.umd.js b/plugins/Feedback/vue/dist/Feedback.umd.js index 2e63e0db73..aae4ee85ad 100644 --- a/plugins/Feedback/vue/dist/Feedback.umd.js +++ b/plugins/Feedback/vue/dist/Feedback.umd.js @@ -144,7 +144,7 @@ var external_CoreHome_ = __webpack_require__("19dc"); // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"} var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); -// 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/Feedback/vue/src/RateFeature/RateFeature.vue?vue&type=template&id=6fde587e +// 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/Feedback/vue/src/RateFeature/RateFeature.vue?vue&type=template&id=61337770 var _hoisted_1 = ["title"]; var _hoisted_2 = { @@ -468,7 +468,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { _: 1 }, 8, ["modelValue"])], 8, _hoisted_1); } -// CONCATENATED MODULE: ./plugins/Feedback/vue/src/RateFeature/RateFeature.vue?vue&type=template&id=6fde587e +// CONCATENATED MODULE: ./plugins/Feedback/vue/src/RateFeature/RateFeature.vue?vue&type=template&id=61337770 // 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/Feedback/vue/src/ReviewLinks/ReviewLinks.vue?vue&type=template&id=9a880eb6 @@ -483,7 +483,7 @@ function ReviewLinksvue_type_template_id_9a880eb6_render(_ctx, _cache, $props, $ } // CONCATENATED MODULE: ./plugins/Feedback/vue/src/ReviewLinks/ReviewLinks.vue?vue&type=template&id=9a880eb6 -// 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/Feedback/vue/src/ReviewLinks/ReviewLinks.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/Feedback/vue/src/ReviewLinks/ReviewLinks.vue?vue&type=script&lang=ts /* harmony default export */ var ReviewLinksvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({})); // CONCATENATED MODULE: ./plugins/Feedback/vue/src/ReviewLinks/ReviewLinks.vue?vue&type=script&lang=ts @@ -495,7 +495,7 @@ function ReviewLinksvue_type_template_id_9a880eb6_render(_ctx, _cache, $props, $ ReviewLinksvue_type_script_lang_ts.render = ReviewLinksvue_type_template_id_9a880eb6_render /* harmony default export */ var ReviewLinks = (ReviewLinksvue_type_script_lang_ts); -// 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/Feedback/vue/src/RateFeature/RateFeature.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/Feedback/vue/src/RateFeature/RateFeature.vue?vue&type=script&lang=ts @@ -605,54 +605,54 @@ RateFeaturevue_type_script_lang_ts.render = render }, directiveName: 'piwikRateFeature' })); -// 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/Feedback/vue/src/FeedbackQuestion/FeedbackQuestion.vue?vue&type=template&id=5ec4eadf +// 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/Feedback/vue/src/FeedbackQuestion/FeedbackQuestion.vue?vue&type=template&id=1d8f8290 -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_1 = { +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_1 = { key: 0, class: "bannerHeader" }; -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("i", { +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("i", { class: "icon-heart red-text" }, null, -1); -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("i", { +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("i", { class: "icon-close white-text" }, null, -1); -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_4 = [FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_3]; -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_5 = { +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_4 = [FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_3]; +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_5 = { class: "ratefeature" }; -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_6 = { +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_6 = { class: "ui-confirm ratefeatureDialog" }; -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_7 = ["innerHTML"]; +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_7 = ["innerHTML"]; -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_8 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_8 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_9 = { +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_9 = { class: "messageContainer" }; -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_10 = { +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_10 = { key: 0, class: "error-text" }; -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_11 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_11 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_12 = ["innerHTML"]; -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_13 = ["value"]; -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_14 = ["value"]; -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_15 = { +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_12 = ["innerHTML"]; +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_13 = ["value"]; +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_14 = ["value"]; +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_15 = { class: "ui-confirm ratefeatureDialog" }; -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_16 = ["innerHTML"]; -var FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_17 = ["value"]; -function FeedbackQuestionvue_type_template_id_5ec4eadf_render(_ctx, _cache, $props, $setup, $data, $options) { +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_16 = ["innerHTML"]; +var FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_17 = ["value"]; +function FeedbackQuestionvue_type_template_id_1d8f8290_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_MatomoDialog = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MatomoDialog"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", null, [!_ctx.isHidden ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate("Feedback_FeedbackTitle")) + " ", 1), FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_2]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", null, [!_ctx.isHidden ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate("Feedback_FeedbackTitle")) + " ", 1), FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_2]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { onClick: _cache[0] || (_cache[0] = function () { return _ctx.showQuestion && _ctx.showQuestion.apply(_ctx, arguments); }), @@ -662,7 +662,7 @@ function FeedbackQuestionvue_type_template_id_5ec4eadf_render(_ctx, _cache, $pro onClick: _cache[1] || (_cache[1] = function () { return _ctx.disableReminder && _ctx.disableReminder.apply(_ctx, arguments); }) - }, FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_4)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_MatomoDialog, { + }, FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_4)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_MatomoDialog, { modelValue: _ctx.showFeedbackForm, "onUpdate:modelValue": _cache[3] || (_cache[3] = function ($event) { return _ctx.showFeedbackForm = $event; @@ -672,9 +672,9 @@ function FeedbackQuestionvue_type_template_id_5ec4eadf_render(_ctx, _cache, $pro }) }, { default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { - return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate("Feedback_Question".concat(_ctx.question))), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate("Feedback_Question".concat(_ctx.question))), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { innerHTML: _ctx.translate('Feedback_FeedbackSubtitle', "<i class='icon-heart red-text'></i>") - }, null, 8, FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_7), FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_9, [_ctx.errorMessage ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.errorMessage), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("textarea", { + }, null, 8, FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_7), FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_9, [_ctx.errorMessage ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.errorMessage), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("textarea", { id: "message", class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ 'has-error': _ctx.errorMessage @@ -682,17 +682,17 @@ function FeedbackQuestionvue_type_template_id_5ec4eadf_render(_ctx, _cache, $pro "onUpdate:modelValue": _cache[2] || (_cache[2] = function ($event) { return _ctx.feedbackMessage = $event; }) - }, null, 2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.feedbackMessage]])]), FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { + }, null, 2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.feedbackMessage]])]), FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { innerHTML: _ctx.translate('Feedback_Policy', "<a rel='nofollow' href='https://matomo.org/privacy-policy/' target='_blank'>", '</a>') - }, null, 8, FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_12), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_12), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "button", role: "validation", value: _ctx.translate('Feedback_SendFeedback') - }, null, 8, FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_13), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_13), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "button", role: "cancel", value: _ctx.translate('General_Cancel') - }, null, 8, FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_14)])]; + }, null, 8, FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_14)])]; }), _: 1 }, 8, ["modelValue"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_MatomoDialog, { @@ -702,20 +702,20 @@ function FeedbackQuestionvue_type_template_id_5ec4eadf_render(_ctx, _cache, $pro }) }, { default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { - return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate("Feedback_ThankYou")), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate("Feedback_ThankYou")), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { innerHTML: _ctx.translate('Feedback_ThankYourForFeedback', "<i class='icon-heart red-text'></i>") - }, null, 8, FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_16), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_16), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "button", role: "cancel", value: _ctx.translate('General_Close') - }, null, 8, FeedbackQuestionvue_type_template_id_5ec4eadf_hoisted_17)])]; + }, null, 8, FeedbackQuestionvue_type_template_id_1d8f8290_hoisted_17)])]; }), _: 1 }, 8, ["modelValue"])])]); } -// CONCATENATED MODULE: ./plugins/Feedback/vue/src/FeedbackQuestion/FeedbackQuestion.vue?vue&type=template&id=5ec4eadf +// CONCATENATED MODULE: ./plugins/Feedback/vue/src/FeedbackQuestion/FeedbackQuestion.vue?vue&type=template&id=1d8f8290 -// 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/Feedback/vue/src/FeedbackQuestion/FeedbackQuestion.vue?vue&type=script&lang=ts +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/Feedback/vue/src/FeedbackQuestion/FeedbackQuestion.vue?vue&type=script&lang=ts var FeedbackQuestionvue_type_script_lang_ts_window = window, @@ -777,7 +777,7 @@ var cookieName = 'feedback-question'; var nextQuestion = (this.question + 1) % 4; var sevenDays = 7 * 60 * 60 * 24 * 1000; - Object(external_CoreHome_["setCookie"])(cookieName, nextQuestion, sevenDays); + Object(external_CoreHome_["setCookie"])(cookieName, "".concat(nextQuestion), sevenDays); }, getRandomIntBetween: function getRandomIntBetween(min, max) { // eslint-disable-next-line no-param-reassign @@ -822,7 +822,7 @@ var cookieName = 'feedback-question'; -FeedbackQuestionvue_type_script_lang_ts.render = FeedbackQuestionvue_type_template_id_5ec4eadf_render +FeedbackQuestionvue_type_script_lang_ts.render = FeedbackQuestionvue_type_template_id_1d8f8290_render /* harmony default export */ var FeedbackQuestion = (FeedbackQuestionvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/Feedback/vue/src/FeedbackQuestion/FeedbackQuestion.adapter.ts diff --git a/plugins/Feedback/vue/dist/Feedback.umd.min.js b/plugins/Feedback/vue/dist/Feedback.umd.min.js index f1fc37c9e2..7369666c65 100644 --- a/plugins/Feedback/vue/dist/Feedback.umd.min.js +++ b/plugins/Feedback/vue/dist/Feedback.umd.min.js @@ -4,7 +4,7 @@ * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function xe(e,t,a,n,l,o){var i=Object(r["resolveComponent"])("MatomoDialog");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[e.isHidden?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ke,[Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Feedback_FeedbackTitle"))+" ",1),me]),Object(r["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(){return e.showQuestion&&e.showQuestion.apply(e,arguments)}),class:"btn"},Object(r["toDisplayString"])(e.translate("Feedback_Question".concat(e.question))),1),Object(r["createElementVNode"])("a",{class:"close-btn",onClick:t[1]||(t[1]=function(){return e.disableReminder&&e.disableReminder.apply(e,arguments)})},je)])),Object(r["createElementVNode"])("div",Oe,[Object(r["createVNode"])(i,{modelValue:e.showFeedbackForm,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.showFeedbackForm=t}),onValidation:t[4]||(t[4]=function(t){return e.sendFeedback()})},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("div",fe,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("Feedback_Question".concat(e.question))),1),Object(r["createElementVNode"])("p",{innerHTML:e.translate("Feedback_FeedbackSubtitle","<i class='icon-heart red-text'></i>")},null,8,ve),ge,Object(r["createElementVNode"])("div",he,[e.errorMessage?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Fe,Object(r["toDisplayString"])(e.errorMessage),1)):Object(r["createCommentVNode"])("",!0),Object(r["withDirectives"])(Object(r["createElementVNode"])("textarea",{id:"message",class:Object(r["normalizeClass"])({"has-error":e.errorMessage}),"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.feedbackMessage=t})},null,2),[[r["vModelText"],e.feedbackMessage]])]),Ve,Object(r["createElementVNode"])("p",{innerHTML:e.translate("Feedback_Policy","<a rel='nofollow' href='https://matomo.org/privacy-policy/' target='_blank'>","</a>")},null,8,Ne),Object(r["createElementVNode"])("input",{type:"button",role:"validation",value:e.translate("Feedback_SendFeedback")},null,8,ye),Object(r["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Cancel")},null,8,Ee)])]})),_:1},8,["modelValue"]),Object(r["createVNode"])(i,{modelValue:e.feedbackDone,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.feedbackDone=t})},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("div",Re,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("Feedback_ThankYou")),1),Object(r["createElementVNode"])("p",{innerHTML:e.translate("Feedback_ThankYourForFeedback","<i class='icon-heart red-text'></i>")},null,8,Me),Object(r["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Close")},null,8,we)])]})),_:1},8,["modelValue"])])])}var De=window,Be=De.$,_e="feedback-question",Ce=Object(r["defineComponent"])({props:{showQuestionBanner:String},components:{MatomoDialog:o["MatomoDialog"]},computed:{isHidden:function(){return"0"===this.showQuestionBanner||!!this.hide}},data:function(){return{questionText:"",question:0,hide:null,feedbackDone:!1,expanded:!1,showFeedbackForm:!1,feedbackMessage:null,errorMessage:null}},watch:{showFeedbackForm:function(e){this.questionText=Object(o["translate"])("Feedback_Question".concat(this.question)),e&&setInterval((function(){Be("#message").focus()}),500)}},created:function(){"0"!==this.showQuestionBanner&&this.initQuestion()},methods:{initQuestion:function(){Object(o["getCookie"])(_e)?this.question=parseInt(Object(o["getCookie"])(_e)):this.question=this.getRandomIntBetween(0,4);var e=(this.question+1)%4,t=6048e5;Object(o["setCookie"])(_e,e,t)},getRandomIntBetween:function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1)+e)},showQuestion:function(){this.showFeedbackForm=!0,this.errorMessage=null},disableReminder:function(){o["AjaxHelper"].fetch({method:"Feedback.updateFeedbackReminderDate"}),this.hide=!0},sendFeedback:function(){var e=this;this.errorMessage=null,o["AjaxHelper"].fetch({method:"Feedback.sendFeedbackForSurvey",question:this.questionText,message:this.feedbackMessage}).then((function(t){"success"===t.value?(Be(".modal").modal("close"),e.feedbackDone=!0,e.hide=!0):e.errorMessage=t.value}))}}});Ce.render=xe;var Te=Ce; + */function xe(e,t,a,n,l,o){var i=Object(r["resolveComponent"])("MatomoDialog");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[e.isHidden?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ke,[Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Feedback_FeedbackTitle"))+" ",1),me]),Object(r["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(){return e.showQuestion&&e.showQuestion.apply(e,arguments)}),class:"btn"},Object(r["toDisplayString"])(e.translate("Feedback_Question".concat(e.question))),1),Object(r["createElementVNode"])("a",{class:"close-btn",onClick:t[1]||(t[1]=function(){return e.disableReminder&&e.disableReminder.apply(e,arguments)})},je)])),Object(r["createElementVNode"])("div",Oe,[Object(r["createVNode"])(i,{modelValue:e.showFeedbackForm,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.showFeedbackForm=t}),onValidation:t[4]||(t[4]=function(t){return e.sendFeedback()})},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("div",fe,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("Feedback_Question".concat(e.question))),1),Object(r["createElementVNode"])("p",{innerHTML:e.translate("Feedback_FeedbackSubtitle","<i class='icon-heart red-text'></i>")},null,8,ve),ge,Object(r["createElementVNode"])("div",he,[e.errorMessage?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Fe,Object(r["toDisplayString"])(e.errorMessage),1)):Object(r["createCommentVNode"])("",!0),Object(r["withDirectives"])(Object(r["createElementVNode"])("textarea",{id:"message",class:Object(r["normalizeClass"])({"has-error":e.errorMessage}),"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.feedbackMessage=t})},null,2),[[r["vModelText"],e.feedbackMessage]])]),Ve,Object(r["createElementVNode"])("p",{innerHTML:e.translate("Feedback_Policy","<a rel='nofollow' href='https://matomo.org/privacy-policy/' target='_blank'>","</a>")},null,8,Ne),Object(r["createElementVNode"])("input",{type:"button",role:"validation",value:e.translate("Feedback_SendFeedback")},null,8,ye),Object(r["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Cancel")},null,8,Ee)])]})),_:1},8,["modelValue"]),Object(r["createVNode"])(i,{modelValue:e.feedbackDone,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.feedbackDone=t})},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("div",Re,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("Feedback_ThankYou")),1),Object(r["createElementVNode"])("p",{innerHTML:e.translate("Feedback_ThankYourForFeedback","<i class='icon-heart red-text'></i>")},null,8,Me),Object(r["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Close")},null,8,we)])]})),_:1},8,["modelValue"])])])}var De=window,Be=De.$,_e="feedback-question",Ce=Object(r["defineComponent"])({props:{showQuestionBanner:String},components:{MatomoDialog:o["MatomoDialog"]},computed:{isHidden:function(){return"0"===this.showQuestionBanner||!!this.hide}},data:function(){return{questionText:"",question:0,hide:null,feedbackDone:!1,expanded:!1,showFeedbackForm:!1,feedbackMessage:null,errorMessage:null}},watch:{showFeedbackForm:function(e){this.questionText=Object(o["translate"])("Feedback_Question".concat(this.question)),e&&setInterval((function(){Be("#message").focus()}),500)}},created:function(){"0"!==this.showQuestionBanner&&this.initQuestion()},methods:{initQuestion:function(){Object(o["getCookie"])(_e)?this.question=parseInt(Object(o["getCookie"])(_e)):this.question=this.getRandomIntBetween(0,4);var e=(this.question+1)%4,t=6048e5;Object(o["setCookie"])(_e,"".concat(e),t)},getRandomIntBetween:function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1)+e)},showQuestion:function(){this.showFeedbackForm=!0,this.errorMessage=null},disableReminder:function(){o["AjaxHelper"].fetch({method:"Feedback.updateFeedbackReminderDate"}),this.hide=!0},sendFeedback:function(){var e=this;this.errorMessage=null,o["AjaxHelper"].fetch({method:"Feedback.sendFeedbackForSurvey",question:this.questionText,message:this.feedbackMessage}).then((function(t){"success"===t.value?(Be(".modal").modal("close"),e.feedbackDone=!0,e.hide=!0):e.errorMessage=t.value}))}}});Ce.render=xe;var Te=Ce; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/Feedback/vue/src/FeedbackQuestion/FeedbackQuestion.vue b/plugins/Feedback/vue/src/FeedbackQuestion/FeedbackQuestion.vue index 60938dcc20..65e5c87210 100644 --- a/plugins/Feedback/vue/src/FeedbackQuestion/FeedbackQuestion.vue +++ b/plugins/Feedback/vue/src/FeedbackQuestion/FeedbackQuestion.vue @@ -73,9 +73,23 @@ import { const { $ } = window; +interface FeedbackQuestionState { + questionText: string; + question: number; + hide: null|boolean; + feedbackDone: boolean; + expanded: boolean; + showFeedbackForm: boolean; + feedbackMessage: string|null; + errorMessage: string|null; +} + +interface SendFeedbackForSurveyResponse { + value: string; +} + const cookieName = 'feedback-question'; export default defineComponent({ - props: { showQuestionBanner: String, }, @@ -90,7 +104,7 @@ export default defineComponent({ return !!this.hide; }, }, - data() { + data(): FeedbackQuestionState { return { questionText: '', question: 0, @@ -124,14 +138,14 @@ export default defineComponent({ this.question = this.getRandomIntBetween(0, 4); } else { // eslint-disable-next-line radix - this.question = parseInt(getCookie(cookieName)); + this.question = parseInt(getCookie(cookieName)!); } const nextQuestion = (this.question + 1) % 4; const sevenDays = 7 * 60 * 60 * 24 * 1000; - setCookie(cookieName, nextQuestion, sevenDays); + setCookie(cookieName, `${nextQuestion}`, sevenDays); }, - getRandomIntBetween(min, max) { + getRandomIntBetween(min: number, max: number) { // eslint-disable-next-line no-param-reassign min = Math.ceil(min); // eslint-disable-next-line no-param-reassign @@ -154,7 +168,7 @@ export default defineComponent({ method: 'Feedback.sendFeedbackForSurvey', question: this.questionText, message: this.feedbackMessage, - }).then((res) => { + }).then((res: SendFeedbackForSurveyResponse) => { if (res.value === 'success') { $('.modal').modal('close'); this.feedbackDone = true; diff --git a/plugins/Feedback/vue/src/RateFeature/RateFeature.vue b/plugins/Feedback/vue/src/RateFeature/RateFeature.vue index 6c2019bd9d..c52904aa28 100644 --- a/plugins/Feedback/vue/src/RateFeature/RateFeature.vue +++ b/plugins/Feedback/vue/src/RateFeature/RateFeature.vue @@ -199,6 +199,17 @@ import ReviewLinks from '../ReviewLinks/ReviewLinks.vue'; const { $ } = window; +interface RateFeatureState { + like: boolean; + likeReason: null|string; + dislikeReason: null|string; + ratingDone: boolean; + expanded: boolean; + showFeedbackForm: boolean; + feedbackMessage: string; + errorMessage: string|null; +} + export default defineComponent({ props: { title: String, @@ -207,7 +218,7 @@ export default defineComponent({ MatomoDialog, ReviewLinks, }, - data() { + data(): RateFeatureState { return { like: false, likeReason: null, @@ -249,7 +260,7 @@ export default defineComponent({ }, focusInput() { if (this.$refs.feedbackText != null) { - this.$refs.feedbackText.focus(); + (this.$refs.feedbackText as HTMLElement).focus(); } }, sendFeedback() { diff --git a/tests/UI/expected-screenshots/PeriodSelector_year_selected.png b/tests/UI/expected-screenshots/PeriodSelector_year_selected.png index ca7f1832f0..423ed2031a 100644 --- a/tests/UI/expected-screenshots/PeriodSelector_year_selected.png +++ b/tests/UI/expected-screenshots/PeriodSelector_year_selected.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bc80f1db79c9e430b73bc079ef52daa4f05f88b2099f449242bc59917bab995a -size 20437 +oid sha256:2fa1c29b376be2efea95d505c2ef930a0fcdb51dad6a35ba8f728719c95502f4 +size 20684 diff --git a/tsconfig.json b/tsconfig.json index 915cbdfd07..c288f4a0ee 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,9 +25,7 @@ "mousetrap" ], "paths": { - "@/*": [ - "src/*" - ] + "*": ["@types/*", "*"] }, "lib": [ "esnext", diff --git a/vue.config.js b/vue.config.js index cfeb38db68..3077d83415 100644 --- a/vue.config.js +++ b/vue.config.js @@ -85,5 +85,28 @@ module.exports = { // disable asset size warnings config.performance.hints(false); + + // override config so we can generate type definitions for plugin libraries + // see https://github.com/vuejs/vue-cli/issues/6543 + if (process.env.NODE_ENV !== 'development') { + config.module + .rule('ts') + .uses + .delete('thread-loader'); + + config.module + .rule('ts') + .use('ts-loader') + .tap((options) => { + options.transpileOnly = false; + options.happyPackMode = false; + options.compilerOptions = { + declaration: true, + noEmit: false, + outDir: `@types/${process.env.MATOMO_CURRENT_PLUGIN}`, + }; + return options; + }); + } }, }; |