diff options
author | sgiehl <stefan@matomo.org> | 2022-05-03 15:18:55 +0300 |
---|---|---|
committer | sgiehl <stefan@matomo.org> | 2022-05-03 15:52:58 +0300 |
commit | da90b86f6e92f93b0ea33c9676a3f30520578239 (patch) | |
tree | 9c67cd48bfb59dd8771c06ff519d4f073fc7a342 /plugins | |
parent | 56640ae815fbace78c62482711cb1733d26cee5e (diff) |
build vue files
Diffstat (limited to 'plugins')
15 files changed, 80 insertions, 80 deletions
diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.js b/plugins/CoreHome/vue/dist/CoreHome.umd.js index 5d2127ef79..4d11013164 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.js @@ -6521,36 +6521,36 @@ function siteSelectorModelAdapter() { } 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=7b45bbd5 +// 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=21ce66fa -var QuickAccessvue_type_template_id_7b45bbd5_hoisted_1 = { +var QuickAccessvue_type_template_id_21ce66fa_hoisted_1 = { ref: "root", class: "quickAccessInside" }; -var QuickAccessvue_type_template_id_7b45bbd5_hoisted_2 = ["title", "placeholder"]; -var QuickAccessvue_type_template_id_7b45bbd5_hoisted_3 = { +var QuickAccessvue_type_template_id_21ce66fa_hoisted_2 = ["title", "placeholder"]; +var QuickAccessvue_type_template_id_21ce66fa_hoisted_3 = { class: "dropdown" }; -var QuickAccessvue_type_template_id_7b45bbd5_hoisted_4 = { +var QuickAccessvue_type_template_id_21ce66fa_hoisted_4 = { class: "no-result" }; -var QuickAccessvue_type_template_id_7b45bbd5_hoisted_5 = ["onClick"]; -var QuickAccessvue_type_template_id_7b45bbd5_hoisted_6 = ["onMouseenter", "onClick"]; -var QuickAccessvue_type_template_id_7b45bbd5_hoisted_7 = { +var QuickAccessvue_type_template_id_21ce66fa_hoisted_5 = ["onClick"]; +var QuickAccessvue_type_template_id_21ce66fa_hoisted_6 = ["onMouseenter", "onClick"]; +var QuickAccessvue_type_template_id_21ce66fa_hoisted_7 = { class: "quickAccessMatomoSearch" }; -var QuickAccessvue_type_template_id_7b45bbd5_hoisted_8 = ["onMouseenter", "onClick"]; -var QuickAccessvue_type_template_id_7b45bbd5_hoisted_9 = ["textContent"]; -var QuickAccessvue_type_template_id_7b45bbd5_hoisted_10 = { +var QuickAccessvue_type_template_id_21ce66fa_hoisted_8 = ["onMouseenter", "onClick"]; +var QuickAccessvue_type_template_id_21ce66fa_hoisted_9 = ["textContent"]; +var QuickAccessvue_type_template_id_21ce66fa_hoisted_10 = { class: "quick-access-category helpCategory" }; -var QuickAccessvue_type_template_id_7b45bbd5_hoisted_11 = ["href"]; -function QuickAccessvue_type_template_id_7b45bbd5_render(_ctx, _cache, $props, $setup, $data, $options) { +var QuickAccessvue_type_template_id_21ce66fa_hoisted_11 = ["href"]; +function QuickAccessvue_type_template_id_21ce66fa_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_7b45bbd5_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", QuickAccessvue_type_template_id_21ce66fa_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-search", onMouseenter: _cache[0] || (_cache[0] = function ($event) { return _ctx.searchActive = true; @@ -6571,7 +6571,7 @@ function QuickAccessvue_type_template_id_7b45bbd5_render(_ctx, _cache, $props, $ title: _ctx.quickAccessTitle, placeholder: _ctx.translate('General_Search'), ref: "input" - }, null, 40, QuickAccessvue_type_template_id_7b45bbd5_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_7b45bbd5_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_7b45bbd5_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) { + }, null, 40, QuickAccessvue_type_template_id_21ce66fa_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_21ce66fa_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_21ce66fa_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", { @@ -6581,7 +6581,7 @@ function QuickAccessvue_type_template_id_7b45bbd5_render(_ctx, _cache, $props, $ _ctx.searchMenu(_ctx.searchTerm); } - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.title), 9, QuickAccessvue_type_template_id_7b45bbd5_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_21ce66fa_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 @@ -6593,9 +6593,9 @@ function QuickAccessvue_type_template_id_7b45bbd5_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_7b45bbd5_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_21ce66fa_hoisted_6); }), 128))]); - }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", QuickAccessvue_type_template_id_7b45bbd5_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_21ce66fa_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" @@ -6613,8 +6613,8 @@ function QuickAccessvue_type_template_id_7b45bbd5_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_7b45bbd5_hoisted_9)], 42, QuickAccessvue_type_template_id_7b45bbd5_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_7b45bbd5_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_21ce66fa_hoisted_9)], 42, QuickAccessvue_type_template_id_21ce66fa_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_21ce66fa_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"]), @@ -6624,11 +6624,11 @@ function QuickAccessvue_type_template_id_7b45bbd5_render(_ctx, _cache, $props, $ }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { href: "https://matomo.org?mtm_campaign=App_Help&mtm_source=Matomo_App&mtm_keyword=QuickSearch&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_7b45bbd5_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_21ce66fa_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=7b45bbd5 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue?vue&type=template&id=21ce66fa // 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 @@ -7026,7 +7026,7 @@ function scrollFirstElementIntoView(element) { -QuickAccessvue_type_script_lang_ts.render = QuickAccessvue_type_template_id_7b45bbd5_render +QuickAccessvue_type_script_lang_ts.render = QuickAccessvue_type_template_id_21ce66fa_render /* harmony default export */ var QuickAccess = (QuickAccessvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/QuickAccess/QuickAccess.adapter.ts diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js index 6a49ecdff6..ebb866af03 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js @@ -16,7 +16,7 @@ * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var y=window,w=y.piwik,O=y.broadcast,j=y.piwikHelper;w.helper=j,w.broadcast=O,w.updateDateInTitle=function(e,t){if($(".top_controls #periodString").length&&(u=u||document.title,0===u.indexOf(w.siteName))){var n=" - ".concat(p.parse(t,e).getPrettyString()," ");document.title="".concat(w.siteName).concat(n).concat(u.substr(w.siteName.length))}},w.hasUserCapability=function(e){return window.angular.isArray(w.userCapabilities)&&-1!==w.userCapabilities.indexOf(e)},w.on=function(e,t){function n(e){t.apply(void 0,m(e.detail))}t.wrapper=n,window.addEventListener(e,n)},w.off=function(e,t){t.wrapper&&window.removeEventListener(e,t.wrapper)},w.postEventNoEmit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=new CustomEvent(e,{detail:n});window.dispatchEvent(i)},w.postEvent=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];w.postEventNoEmit.apply(w,[e].concat(n)),window.angular.element((function(){var t=w.helper.getAngularDependency("$rootScope");t.$oldEmit.apply(t,[e].concat(n))}))};var k=w,S=k; + */var y=window,w=y.piwik,O=y.broadcast,j=y.piwikHelper;w.helper=j,w.broadcast=O,w.updateDateInTitle=function(e,t){if($(".top_controls #periodString").length&&(u=u||document.title,0===u.indexOf(w.siteName))){var n=" - ".concat(p.parse(t,e).getPrettyString()," ");document.title="".concat(w.siteName).concat(n).concat(u.slice(w.siteName.length))}},w.hasUserCapability=function(e){return window.angular.isArray(w.userCapabilities)&&-1!==w.userCapabilities.indexOf(e)},w.on=function(e,t){function n(e){t.apply(void 0,m(e.detail))}t.wrapper=n,window.addEventListener(e,n)},w.off=function(e,t){t.wrapper&&window.removeEventListener(e,t.wrapper)},w.postEventNoEmit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=new CustomEvent(e,{detail:n});window.dispatchEvent(i)},w.postEvent=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];w.postEventNoEmit.apply(w,[e].concat(n)),window.angular.element((function(){var t=w.helper.getAngularDependency("$rootScope");t.$oldEmit.apply(t,[e].concat(n))}))};var k=w,S=k; /*! * Matomo - free/libre analytics platform * @@ -204,7 +204,7 @@ function an(){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 */ -var on=window,ln=on.$,cn={mounted:function(e,t){var n=ln(e),r=t.value.sensitiveData,i=t.value.showCharacters||6,a=t.value.clickElementSelector||n,o="";function l(){n.html(r),ln(a).css({cursor:""}),ln(a).tooltip("destroy")}i>0&&(o+=r.substr(0,i)),o+=r.substr(i).replace(/./g,"*"),n.html(o),ln(a).tooltip({content:C("CoreHome_ClickToSeeFullInformation"),items:"*",track:!0}),ln(a).one("click",l),ln(a).css({cursor:"pointer"})}}; +var on=window,ln=on.$,cn={mounted:function(e,t){var n=ln(e),r=t.value.sensitiveData,i=t.value.showCharacters||6,a=t.value.clickElementSelector||n,o="";function l(){n.html(r),ln(a).css({cursor:""}),ln(a).tooltip("destroy")}i>0&&(o+=r.slice(0,i)),o+=r.slice(i).replace(/./g,"*"),n.html(o),ln(a).tooltip({content:C("CoreHome_ClickToSeeFullInformation"),items:"*",track:!0}),ln(a).one("click",l),ln(a).css({cursor:"pointer"})}}; /*! * Matomo - free/libre analytics platform * @@ -343,7 +343,7 @@ function On(e){return{restrict:"A",priority:10,link:function(t,n,r){var i={insta * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Qi(){return{get initialSites(){return Wi.initialSites.value},loadSite:Wi.loadSite.bind(Wi),loadInitialSites:function(){return Dt(Wi.loadInitialSites())},searchSite:function(){return Dt(Wi.searchSite.apply(Wi,arguments))}}}window.angular.module("piwikApp.service").factory("siteSelectorModel",Qi);var Ki={ref:"root",class:"quickAccessInside"},Xi=["title","placeholder"],Zi={class:"dropdown"},ea={class:"no-result"},ta=["onClick"],na=["onMouseenter","onClick"],ra={class:"quickAccessMatomoSearch"},ia=["onMouseenter","onClick"],aa=["textContent"],oa={class:"quick-access-category helpCategory"},la=["href"];function ca(e,t,n,r,i,o){var l=Object(a["resolveDirective"])("focus-if"),c=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ki,[Object(a["createElementVNode"])("span",{class:"icon-search",onMouseenter:t[0]||(t[0]=function(t){return e.searchActive=!0})},null,32),Object(a["withDirectives"])(Object(a["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,placeholder:e.translate("General_Search"),ref:"input"},null,40,Xi),[[a["vModelText"],e.searchTerm],[l,{},e.searchActive]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Zi,[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",ea,Object(a["toDisplayString"])(e.translate("General_SearchNoResults")),1)],512),[[a["vShow"],!(e.numMenuItems>0||e.sites.length)]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menuItems,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("ul",{key:t.title},[Object(a["createElementVNode"])("li",{class:"quick-access-category",onClick:function(n){e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(a["toDisplayString"])(t.title),9,ta),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.items,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["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(a["createElementVNode"])("a",null,Object(a["toDisplayString"])(t.name.trim()),1)],42,na)})),128))])})),128)),Object(a["createElementVNode"])("ul",ra,[Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"quick-access-category websiteCategory"},Object(a["toDisplayString"])(e.translate("SitesManager_Sites")),513),[[a["vShow"],e.hasSitesSelector&&e.sites.length||e.isLoading]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"no-result"},Object(a["toDisplayString"])(e.translate("MultiSites_LoadingWebsites")),513),[[a["vShow"],e.hasSitesSelector&&e.isLoading]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(t,n){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["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(a["createElementVNode"])("a",{textContent:Object(a["toDisplayString"])(t.name)},null,8,aa)],42,ia)),[[a["vShow"],e.hasSitesSelector&&!e.isLoading]])})),128))]),Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",oa,Object(a["toDisplayString"])(e.translate("General_HelpResources")),1),Object(a["createElementVNode"])("li",{class:Object(a["normalizeClass"])([{selected:"help"===e.searchIndex},"quick-access-help"]),onMouseenter:t[4]||(t[4]=function(t){return e.searchIndex="help"})},[Object(a["createElementVNode"])("a",{href:"https://matomo.org?mtm_campaign=App_Help&mtm_source=Matomo_App&mtm_keyword=QuickSearch&s=".concat(encodeURIComponent(e.searchTerm)),target:"_blank"},Object(a["toDisplayString"])(e.translate("CoreHome_SearchOnMatomo",e.searchTerm)),9,la)],34)])],512),[[a["vShow"],e.searchTerm&&e.searchActive]])],512)),[[c,{blur:e.onBlur}]])}function sa(e){var t=e.getBoundingClientRect(),n=window.$(window);return t.top>=0&&t.left>=0&&t.bottom<=n.height()&&t.right<=n.width()}function ua(e){e&&e.scrollIntoView&&e.scrollIntoView()}var da=Object(a["defineComponent"])({directives:{FocusAnywhereButHere:Bt,FocusIf:Ft},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(),ua(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=Gi(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&&!sa(e)&&ua(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={},a=[],o=function(e){var t=Object.assign({},e);r+=1,t.menuIndex=r;var n=t.category;n in i||(a.push({title:n,items:[]}),i[n]=a.length-1);var o=i[n];a[o].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,Wi.searchSite(n).then((function(e){e&&(t.sites=e)})).finally((function(){t.isLoading=!1})));var l=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 c=this.topMenuItems.filter(l),s=this.leftMenuItems.filter(l),u=this.segmentItems.filter(l);c.forEach(o),s.forEach(o),u.forEach(o),this.numMenuItems=c.length+s.length+u.length,this.menuItems=a},resetSearchIndex:function(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite:function(e){Wi.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,a,o=null===(i=r.textContent)||void 0===i?void 0:i.trim();o||(o=null===(a=r.getAttribute("title"))||void 0===a?void 0:a.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,i=window.$(n).find("> .item"),a=(null===(r=i[0])||void 0===r?void 0:r.innerText.trim())||"";a&&-1!==a.lastIndexOf("\n")&&(a=a.substr(0,a.lastIndexOf("\n")).trim()),window.$(n).find("li .item").each((function(n,r){var i,o=null===(i=r.textContent)||void 0===i?void 0:i.trim();o&&(t.push({name:o,category:a,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,a,o=null===(i=r.querySelector(".segname"))||void 0===i||null===(a=i.textContent)||void 0===a?void 0:a.trim();o&&(n.push({name:o,category:t,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n}}});da.render=ca;var pa=da; +function Qi(){return{get initialSites(){return Wi.initialSites.value},loadSite:Wi.loadSite.bind(Wi),loadInitialSites:function(){return Dt(Wi.loadInitialSites())},searchSite:function(){return Dt(Wi.searchSite.apply(Wi,arguments))}}}window.angular.module("piwikApp.service").factory("siteSelectorModel",Qi);var Ki={ref:"root",class:"quickAccessInside"},Xi=["title","placeholder"],Zi={class:"dropdown"},ea={class:"no-result"},ta=["onClick"],na=["onMouseenter","onClick"],ra={class:"quickAccessMatomoSearch"},ia=["onMouseenter","onClick"],aa=["textContent"],oa={class:"quick-access-category helpCategory"},la=["href"];function ca(e,t,n,r,i,o){var l=Object(a["resolveDirective"])("focus-if"),c=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ki,[Object(a["createElementVNode"])("span",{class:"icon-search",onMouseenter:t[0]||(t[0]=function(t){return e.searchActive=!0})},null,32),Object(a["withDirectives"])(Object(a["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,placeholder:e.translate("General_Search"),ref:"input"},null,40,Xi),[[a["vModelText"],e.searchTerm],[l,{},e.searchActive]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Zi,[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",ea,Object(a["toDisplayString"])(e.translate("General_SearchNoResults")),1)],512),[[a["vShow"],!(e.numMenuItems>0||e.sites.length)]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menuItems,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("ul",{key:t.title},[Object(a["createElementVNode"])("li",{class:"quick-access-category",onClick:function(n){e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(a["toDisplayString"])(t.title),9,ta),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.items,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["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(a["createElementVNode"])("a",null,Object(a["toDisplayString"])(t.name.trim()),1)],42,na)})),128))])})),128)),Object(a["createElementVNode"])("ul",ra,[Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"quick-access-category websiteCategory"},Object(a["toDisplayString"])(e.translate("SitesManager_Sites")),513),[[a["vShow"],e.hasSitesSelector&&e.sites.length||e.isLoading]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"no-result"},Object(a["toDisplayString"])(e.translate("MultiSites_LoadingWebsites")),513),[[a["vShow"],e.hasSitesSelector&&e.isLoading]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(t,n){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["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(a["createElementVNode"])("a",{textContent:Object(a["toDisplayString"])(t.name)},null,8,aa)],42,ia)),[[a["vShow"],e.hasSitesSelector&&!e.isLoading]])})),128))]),Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",oa,Object(a["toDisplayString"])(e.translate("General_HelpResources")),1),Object(a["createElementVNode"])("li",{class:Object(a["normalizeClass"])([{selected:"help"===e.searchIndex},"quick-access-help"]),onMouseenter:t[4]||(t[4]=function(t){return e.searchIndex="help"})},[Object(a["createElementVNode"])("a",{href:"https://matomo.org?mtm_campaign=App_Help&mtm_source=Matomo_App&mtm_keyword=QuickSearch&s=".concat(encodeURIComponent(e.searchTerm)),target:"_blank"},Object(a["toDisplayString"])(e.translate("CoreHome_SearchOnMatomo",e.searchTerm)),9,la)],34)])],512),[[a["vShow"],e.searchTerm&&e.searchActive]])],512)),[[c,{blur:e.onBlur}]])}function sa(e){var t=e.getBoundingClientRect(),n=window.$(window);return t.top>=0&&t.left>=0&&t.bottom<=n.height()&&t.right<=n.width()}function ua(e){e&&e.scrollIntoView&&e.scrollIntoView()}var da=Object(a["defineComponent"])({directives:{FocusAnywhereButHere:Bt,FocusIf:Ft},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(),ua(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=Gi(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&&!sa(e)&&ua(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={},a=[],o=function(e){var t=Object.assign({},e);r+=1,t.menuIndex=r;var n=t.category;n in i||(a.push({title:n,items:[]}),i[n]=a.length-1);var o=i[n];a[o].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,Wi.searchSite(n).then((function(e){e&&(t.sites=e)})).finally((function(){t.isLoading=!1})));var l=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 c=this.topMenuItems.filter(l),s=this.leftMenuItems.filter(l),u=this.segmentItems.filter(l);c.forEach(o),s.forEach(o),u.forEach(o),this.numMenuItems=c.length+s.length+u.length,this.menuItems=a},resetSearchIndex:function(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite:function(e){Wi.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,a,o=null===(i=r.textContent)||void 0===i?void 0:i.trim();o||(o=null===(a=r.getAttribute("title"))||void 0===a?void 0:a.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,i=window.$(n).find("> .item"),a=(null===(r=i[0])||void 0===r?void 0:r.innerText.trim())||"";a&&-1!==a.lastIndexOf("\n")&&(a=a.slice(0,a.lastIndexOf("\n")).trim()),window.$(n).find("li .item").each((function(n,r){var i,o=null===(i=r.textContent)||void 0===i?void 0:i.trim();o&&(t.push({name:o,category:a,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,a,o=null===(i=r.querySelector(".segname"))||void 0===i||null===(a=i.textContent)||void 0===a?void 0:a.trim();o&&(n.push({name:o,category:t,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n}}});da.render=ca;var pa=da; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.js b/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.js index 4beea136cd..3fdac1b6a3 100644 --- a/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.js +++ b/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.js @@ -494,7 +494,7 @@ var CustomDimensions_store_CustomDimensionsStore = /*#__PURE__*/function () { * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function utilities_ucfirst(s) { - return "".concat(s[0].toUpperCase()).concat(s.substr(1)); + return "".concat(s[0].toUpperCase()).concat(s.slice(1)); } // 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/CustomDimensions/vue/src/Edit/Edit.vue?vue&type=script&lang=ts diff --git a/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.min.js b/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.min.js index 73f49f00c2..f831cff0bc 100644 --- a/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.min.js +++ b/plugins/CustomDimensions/vue/dist/CustomDimensions.umd.min.js @@ -11,7 +11,7 @@ * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function L(e){return"".concat(e[0].toUpperCase()).concat(e.substr(1))}var H="customdimensions",I=Object(a["defineComponent"])({props:{dimensionId:Number,dimensionScope:{type:String,required:!0}},components:{ContentBlock:s["ContentBlock"],Field:k["Field"]},directives:{SelectOnFocus:s["SelectOnFocus"]},data:function(){return{dimension:{extractions:[]},isUpdatingDim:!1}},created:function(){this.init()},watch:{dimensionId:function(){this.init()}},methods:{removeAnyCustomDimensionNotification:function(){s["NotificationsStore"].remove(H)},showNotification:function(e,t){s["NotificationsStore"].show({message:e,context:t,id:H,type:"transient"})},init:function(){var e=this;null!==this.dimensionId&&this.removeAnyCustomDimensionNotification(),B.fetch().then((function(){e.edit&&e.dimensionId?(e.dimension=Object(s["clone"])(B.customDimensionsById.value[e.dimensionId]),e.dimension&&!e.dimension.extractions.length&&e.addExtraction()):e.create&&(e.dimension={idsite:s["Matomo"].idSite,name:"",active:!1,extractions:[],scope:e.dimensionScope,case_sensitive:!0},e.addExtraction())}))},removeExtraction:function(e){e>-1&&this.dimension.extractions.splice(e,1)},addExtraction:function(){this.doesScopeSupportExtraction&&this.dimension.extractions.push({dimension:"url",pattern:""})},createCustomDimension:function(){var e=this;this.isUpdatingDim=!0,B.createOrUpdateDimension(this.dimension,"CustomDimensions.configureNewCustomDimension").then((function(){e.showNotification(Object(s["translate"])("CustomDimensions_DimensionCreated"),"success"),console.log("before reload"),B.reload(),s["MatomoUrl"].updateHashToUrl("/list")})).finally((function(){e.isUpdatingDim=!1}))},updateCustomDimension:function(){var e=this;this.isUpdatingDim=!0,B.createOrUpdateDimension(this.dimension,"CustomDimensions.configureExistingCustomDimension").then((function(){e.showNotification(Object(s["translate"])("CustomDimensions_DimensionUpdated"),"success"),B.reload(),s["MatomoUrl"].updateHashToUrl("/list")})).finally((function(){e.isUpdatingDim=!1}))},manuallyTrackCodeViaJs:function(e){return"_paq.push(['setCustomDimension', ".concat(e.idcustomdimension,", ")+"'".concat(Object(s["translate"])("CustomDimensions_ExampleValue"),"']);")},manuallyTrackCodeViaPhp:function(e){return"$tracker->setCustomDimension('".concat(e.idcustomdimension,"', ")+"'".concat(Object(s["translate"])("CustomDimensions_ExampleValue"),"');")}},computed:{isLoading:function(){return B.isLoading.value},isUpdating:function(){return B.isUpdating.value||this.isUpdatingDim},create:function(){return 0===this.dimensionId},edit:function(){return!this.create},extractionDimensionsOptions:function(){return B.extractionDimensionsOptions.value},availableScopes:function(){return B.availableScopes.value},doesScopeSupportExtraction:function(){var e,t=this;if(null===(e=this.dimension)||void 0===e||!e.scope||!this.availableScopes)return!1;var n=this.availableScopes.find((function(e){return e.value===t.dimension.scope}));return null===n||void 0===n?void 0:n.supportsExtractions},contentTitleText:function(){var e;return Object(s["translate"])("CustomDimensions_ConfigureDimension",L(this.dimensionScope),"".concat((null===(e=this.dimension)||void 0===e?void 0:e.index)||""))},howToTrackManuallyText:function(){var e="https://developer.piwik.org/guides/tracking-javascript-guide#custom-dimensions";return Object(s["translate"])("CustomDimensions_HowToTrackManuallyViaJsDetails",'<a target=_blank href="'.concat(e,'" rel="noreferrer noopener">'),"</a>")},manuallyTrackCode:function(){var e=Object(s["translate"])("CustomDimensions_ExampleValue");return"&dimension".concat(this.dimension.idcustomdimension,"=").concat(e)}}});I.render=w;var P=I,q=(Object(s["createAngularJsAdapter"])({component:P,scope:{dimensionId:{angularJsBind:"=",transform:s["transformAngularJsIntAttr"]},dimensionScope:{angularJsBind:"="}},directiveName:"piwikCustomDimensionsEdit"}),["innerHTML"]),z={class:"loadingPiwik"},F=Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),G={class:"index"},J={class:"name"},$={class:"active"},Q={class:"action"},X={colspan:"5"},Y={class:"index"},K={class:"name"},R={class:"extractions"},W={class:"active"},Z={class:"action"},ee=["href"],te={class:"tableActionBar"},ne=["disabled","onClick"],ie=Object(a["createElementVNode"])("span",{class:"icon-add"},null,-1),oe={class:"info"}; +function L(e){return"".concat(e[0].toUpperCase()).concat(e.slice(1))}var H="customdimensions",I=Object(a["defineComponent"])({props:{dimensionId:Number,dimensionScope:{type:String,required:!0}},components:{ContentBlock:s["ContentBlock"],Field:k["Field"]},directives:{SelectOnFocus:s["SelectOnFocus"]},data:function(){return{dimension:{extractions:[]},isUpdatingDim:!1}},created:function(){this.init()},watch:{dimensionId:function(){this.init()}},methods:{removeAnyCustomDimensionNotification:function(){s["NotificationsStore"].remove(H)},showNotification:function(e,t){s["NotificationsStore"].show({message:e,context:t,id:H,type:"transient"})},init:function(){var e=this;null!==this.dimensionId&&this.removeAnyCustomDimensionNotification(),B.fetch().then((function(){e.edit&&e.dimensionId?(e.dimension=Object(s["clone"])(B.customDimensionsById.value[e.dimensionId]),e.dimension&&!e.dimension.extractions.length&&e.addExtraction()):e.create&&(e.dimension={idsite:s["Matomo"].idSite,name:"",active:!1,extractions:[],scope:e.dimensionScope,case_sensitive:!0},e.addExtraction())}))},removeExtraction:function(e){e>-1&&this.dimension.extractions.splice(e,1)},addExtraction:function(){this.doesScopeSupportExtraction&&this.dimension.extractions.push({dimension:"url",pattern:""})},createCustomDimension:function(){var e=this;this.isUpdatingDim=!0,B.createOrUpdateDimension(this.dimension,"CustomDimensions.configureNewCustomDimension").then((function(){e.showNotification(Object(s["translate"])("CustomDimensions_DimensionCreated"),"success"),console.log("before reload"),B.reload(),s["MatomoUrl"].updateHashToUrl("/list")})).finally((function(){e.isUpdatingDim=!1}))},updateCustomDimension:function(){var e=this;this.isUpdatingDim=!0,B.createOrUpdateDimension(this.dimension,"CustomDimensions.configureExistingCustomDimension").then((function(){e.showNotification(Object(s["translate"])("CustomDimensions_DimensionUpdated"),"success"),B.reload(),s["MatomoUrl"].updateHashToUrl("/list")})).finally((function(){e.isUpdatingDim=!1}))},manuallyTrackCodeViaJs:function(e){return"_paq.push(['setCustomDimension', ".concat(e.idcustomdimension,", ")+"'".concat(Object(s["translate"])("CustomDimensions_ExampleValue"),"']);")},manuallyTrackCodeViaPhp:function(e){return"$tracker->setCustomDimension('".concat(e.idcustomdimension,"', ")+"'".concat(Object(s["translate"])("CustomDimensions_ExampleValue"),"');")}},computed:{isLoading:function(){return B.isLoading.value},isUpdating:function(){return B.isUpdating.value||this.isUpdatingDim},create:function(){return 0===this.dimensionId},edit:function(){return!this.create},extractionDimensionsOptions:function(){return B.extractionDimensionsOptions.value},availableScopes:function(){return B.availableScopes.value},doesScopeSupportExtraction:function(){var e,t=this;if(null===(e=this.dimension)||void 0===e||!e.scope||!this.availableScopes)return!1;var n=this.availableScopes.find((function(e){return e.value===t.dimension.scope}));return null===n||void 0===n?void 0:n.supportsExtractions},contentTitleText:function(){var e;return Object(s["translate"])("CustomDimensions_ConfigureDimension",L(this.dimensionScope),"".concat((null===(e=this.dimension)||void 0===e?void 0:e.index)||""))},howToTrackManuallyText:function(){var e="https://developer.piwik.org/guides/tracking-javascript-guide#custom-dimensions";return Object(s["translate"])("CustomDimensions_HowToTrackManuallyViaJsDetails",'<a target=_blank href="'.concat(e,'" rel="noreferrer noopener">'),"</a>")},manuallyTrackCode:function(){var e=Object(s["translate"])("CustomDimensions_ExampleValue");return"&dimension".concat(this.dimension.idcustomdimension,"=").concat(e)}}});I.render=w;var P=I,q=(Object(s["createAngularJsAdapter"])({component:P,scope:{dimensionId:{angularJsBind:"=",transform:s["transformAngularJsIntAttr"]},dimensionScope:{angularJsBind:"="}},directiveName:"piwikCustomDimensionsEdit"}),["innerHTML"]),z={class:"loadingPiwik"},F=Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),G={class:"index"},J={class:"name"},$={class:"active"},Q={class:"action"},X={colspan:"5"},Y={class:"index"},K={class:"name"},R={class:"extractions"},W={class:"active"},Z={class:"action"},ee=["href"],te={class:"tableActionBar"},ne=["disabled","onClick"],ie=Object(a["createElementVNode"])("span",{class:"icon-add"},null,-1),oe={class:"info"}; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/Goals/vue/dist/Goals.umd.js b/plugins/Goals/vue/dist/Goals.umd.js index 5914722583..a5f672ba4e 100644 --- a/plugins/Goals/vue/dist/Goals.umd.js +++ b/plugins/Goals/vue/dist/Goals.umd.js @@ -234,7 +234,7 @@ window.angular.module('piwikApp').directive('piwikGoalPageLink', piwikGoalPageLi // 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/Goals/vue/src/ManageGoals/ManageGoals.vue?vue&type=template&id=0e2ceb1f +// 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/Goals/vue/src/ManageGoals/ManageGoals.vue?vue&type=template&id=0a30af41 var _hoisted_1 = { id: "entityEditContainer", @@ -639,7 +639,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { _: 1 }, 8, ["content-title"])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showEditGoal]])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.userCanEditGoals]]), _hoisted_64]); } -// CONCATENATED MODULE: ./plugins/Goals/vue/src/ManageGoals/ManageGoals.vue?vue&type=template&id=0e2ceb1f +// CONCATENATED MODULE: ./plugins/Goals/vue/src/ManageGoals/ManageGoals.vue?vue&type=template&id=0a30af41 // EXTERNAL MODULE: external "CorePluginsAdmin" var external_CorePluginsAdmin_ = __webpack_require__("a5a2"); @@ -957,10 +957,10 @@ var PiwikApiMock = /*#__PURE__*/function () { } }, lcfirst: function lcfirst(s) { - return "".concat(s.substr(0, 1).toLowerCase()).concat(s.substr(1)); + return "".concat(s.slice(0, 1).toLowerCase()).concat(s.slice(1)); }, ucfirst: function ucfirst(s) { - return "".concat(s.substr(0, 1).toUpperCase()).concat(s.substr(1)); + return "".concat(s.slice(0, 1).toUpperCase()).concat(s.slice(1)); } }, computed: { diff --git a/plugins/Goals/vue/dist/Goals.umd.min.js b/plugins/Goals/vue/dist/Goals.umd.min.js index dadb181047..30d8ab0c17 100644 --- a/plugins/Goals/vue/dist/Goals.umd.min.js +++ b/plugins/Goals/vue/dist/Goals.umd.min.js @@ -11,7 +11,7 @@ function u(){return{restrict:"A",link:function(e,t,a){var n={instance:null,value * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later -*/var Se=function(){function e(t,a){Ve(this,e),Te(this,"parameters",void 0),Te(this,"options",void 0),this.parameters=t,this.options=a}return we(e,[{key:"addParams",value:function(e){Object.assign(this.parameters,e)}},{key:"withTokenInUrl",value:function(){this.options.withTokenInUrl=!0}},{key:"reset",value:function(){var e=this;Object.keys(this.parameters).forEach((function(t){delete e.parameters[t]})),delete this.options.postParams}},{key:"addPostParams",value:function(e){this.options.postParams=Object.assign(Object.assign({},this.options.postParams),e)}}]),e}(),ke=Object(d["defineComponent"])({inheritAttrs:!1,props:{onlyShowAddNewGoal:Boolean,userCanEditGoals:Boolean,ecommerceEnabled:Boolean,goals:{type:Object,required:!0},addNewGoalIntro:String,goalTriggerTypeOptions:Object,goalMatchAttributeOptions:Array,eventTypeOptions:Array,patternTypeOptions:Array,numericComparisonTypeOptions:Array,allowMultipleOptions:Array,showAddGoal:Boolean,showGoal:Number,beforeGoalListActionsBody:Object,endEditTable:String,beforeGoalListActionsHead:String},data:function(){return{showEditGoal:!1,showGoalList:!0,goal:{},isLoading:!1,eventType:"event_category",triggerType:"visitors",apiMethod:"",submitText:"",goalToDelete:null,addEditTableComponent:!1}},components:{SaveButton:Ee["SaveButton"],ContentBlock:l["ContentBlock"],ActivityIndicator:l["ActivityIndicator"],Field:Ee["Field"],Alert:l["Alert"]},directives:{ContentTable:l["ContentTable"],Form:Ee["Form"]},mounted:function(){var e=this;this.showAddGoal?this.createGoal():this.showGoal?this.editGoal(this.showGoal):this.showListOfReports(),Object(d["nextTick"])((function(){e.addEditTableComponent=!0,Object(d["nextTick"])((function(){var t=e.$refs.endedittable,a=l["Matomo"].helper.getAngularDependency("$rootScope").$new(!0);$(t).data("scope",a),l["Matomo"].helper.compileAngularComponents(t,{scope:a})}))}))},beforeUnmount:function(){var e=this.$refs.endedittable;$(e).data("scope").$destroy()},methods:{scrollToTop:function(){setTimeout((function(){l["Matomo"].helper.lazyScrollTo(".pageWrap",200)}))},initGoalForm:function(e,t,a,n,o,r,i,c,s,u,d,b){l["Matomo"].postEvent("Goals.beforeInitGoalForm",e,b),this.apiMethod=e,this.goal={},this.goal.name=a,this.goal.description=n;var p=o;"manually"===p?(this.triggerType="manually",p="url"):this.triggerType="visitors",0===p.indexOf("event")?(this.eventType=p,p="event"):this.eventType="event_category",this.goal.match_attribute=p,this.goal.allow_multiple=u,this.goal.pattern_type=i,this.goal.pattern=r,this.goal.case_sensitive=c,this.goal.revenue=s,this.goal.event_value_as_revenue=d,this.submitText=t,this.goal.idgoal=b},showListOfReports:function(){l["Matomo"].postEvent("Goals.cancelForm"),this.showGoalList=!0,this.showEditGoal=!1,this.scrollToTop()},showAddEditForm:function(){this.showGoalList=!1,this.showEditGoal=!0},createGoal:function(){var e={isAllowed:!0};l["Matomo"].postEvent("Goals.initAddGoal",e),e&&!e.isAllowed||(this.showAddEditForm(),this.initGoalForm("Goals.addGoal",Object(l["translate"])("Goals_AddGoal"),"","","url","","contains",!1,0,!1,!1,0),this.scrollToTop())},editGoal:function(e){this.showAddEditForm();var t=this.goals["".concat(e)];this.initGoalForm("Goals.updateGoal",Object(l["translate"])("Goals_UpdateGoal"),t.name,t.description,t.match_attribute,t.pattern,t.pattern_type,!!t.case_sensitive&&"0"!==t.case_sensitive,parseInt("".concat(t.revenue),10),!!t.allow_multiple&&"0"!==t.allow_multiple,!!t.event_value_as_revenue&&"0"!==t.event_value_as_revenue,e),this.scrollToTop()},deleteGoal:function(e){var t=this;this.goalToDelete=this.goals["".concat(e)],l["Matomo"].helper.modalConfirm(this.$refs.confirm,{yes:function(){t.isLoading=!0,l["AjaxHelper"].fetch({idGoal:e,method:"Goals.deleteGoal"}).then((function(){window.location.reload()})).finally((function(){t.isLoading=!1}))}})},save:function(){var e=this,t={};t.name=this.goal.name,t.description=this.goal.description,this.isManuallyTriggered?(t.matchAttribute="manually",t.patternType="regex",t.pattern=".*",t.caseSensitive=0):(t.matchAttribute=this.goal.match_attribute,"event"===t.matchAttribute&&(t.matchAttribute=this.eventType),t.patternType=this.goal.pattern_type,t.pattern=this.goal.pattern,t.caseSensitive=this.goal.case_sensitive?1:0),t.revenue=this.goal.revenue||0,t.allowMultipleConversionsPerVisit=this.goal.allow_multiple?1:0,t.useEventValueAsRevenue=this.goal.event_value_as_revenue?1:0,t.idGoal=this.goal.idgoal,t.method=this.apiMethod;var a="Goals.addGoal"===t.method,n="Goals.updateGoal"===t.method,o={},r=new Se(t,o);n?l["Matomo"].postEvent("Goals.beforeUpdateGoal",t,r):a&&l["Matomo"].postEvent("Goals.beforeAddGoal",t,r),null!==t&&void 0!==t&&t.cancelRequest||(this.isLoading=!0,l["AjaxHelper"].fetch(t,o).then((function(){var t=l["MatomoUrl"].parsed.value.subcategory;"Goals_AddNewGoal"===t&&l["Matomo"].helper.isAngularRenderingThePage()?l["ReportingMenuStore"].reloadMenuItems().then((function(){l["MatomoUrl"].updateHash(Object.assign(Object.assign({},l["MatomoUrl"].hashParsed.value),{},{subcategory:"Goals_ManageGoals"})),e.isLoading=!1})):window.location.reload()})).catch((function(){e.scrollToTop(),e.isLoading=!1})))},changedTriggerType:function(){this.isManuallyTriggered||this.goal.pattern_type||(this.goal.pattern_type="contains")},initPatternType:function(){this.isMatchAttributeNumeric?this.goal.pattern_type="greater_than":this.goal.pattern_type="contains"},lcfirst:function(e){return"".concat(e.substr(0,1).toLowerCase()).concat(e.substr(1))},ucfirst:function(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}},computed:{learnMoreAboutGoalTracking:function(){return Object(l["translate"])("Goals_LearnMoreAboutGoalTrackingDocumentation",'<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/docs/tracking-goals-web-analytics/">',"</a>")},youCanEnableEcommerceReports:function(){var e=l["MatomoUrl"].stringify(Object.assign(Object.assign({},l["MatomoUrl"].urlParsed.value),{},{module:"SitesManager",action:"index"})),t='<a href="https://matomo.org/docs/ecommerce-analytics/" '+'rel="noreferrer noopener" target="_blank">'.concat(Object(l["translate"])("Goals_EcommerceReports"),"</a>"),a="<a href='".concat(e,"'>").concat(Object(l["translate"])("SitesManager_WebsitesManagement"),"</a>");return Object(l["translate"])("Goals_YouCanEnableEcommerceReports",t,a)},siteName:function(){return l["Matomo"].helper.htmlDecode(l["Matomo"].siteName)},whereVisitedPageManuallyCallsJsTrackerText:function(){var e="https://developer.matomo.org/guides/tracking-javascript-guide#manually-trigger-goal-conversions";return Object(l["translate"])("Goals_WhereVisitedPageManuallyCallsJavascriptTrackerLearnMore",'<a target="_blank" rel="noreferrer noopener" href="'.concat(e,'">'),"</a>")},caseSensitiveTitle:function(){return"".concat(Object(l["translate"])("Goals_CaseSensitive")," ").concat(Object(l["translate"])("Goals_Optional"))},useEventValueAsRevenueHelp:function(){return"".concat(Object(l["translate"])("Goals_EventValueAsRevenueHelp")," <br/><br/> ").concat(Object(l["translate"])("Goals_EventValueAsRevenueHelp2"))},cancelText:function(){return Object(l["translate"])("General_OrCancel","<a class='entityCancelLink'>","</a>")},isMatchAttributeNumeric:function(){return["visit_duration"].indexOf(this.goal.match_attribute)>-1},patternFieldLabel:function(){return"visit_duration"===this.goal.match_attribute?Object(l["translate"])("Goals_TimeInMinutes"):Object(l["translate"])("Goals_Pattern")},goalMatchAttributeTranslations:function(){return{manually:Object(l["translate"])("Goals_ManuallyTriggeredUsingJavascriptFunction"),file:Object(l["translate"])("Goals_Download"),url:Object(l["translate"])("Goals_VisitUrl"),title:Object(l["translate"])("Goals_VisitPageTitle"),external_website:Object(l["translate"])("Goals_ClickOutlink"),event_action:"".concat(Object(l["translate"])("Goals_SendEvent")," (").concat(Object(l["translate"])("Events_EventAction"),")"),event_category:"".concat(Object(l["translate"])("Goals_SendEvent")," (").concat(Object(l["translate"])("Events_EventCategory"),")"),event_name:"".concat(Object(l["translate"])("Goals_SendEvent")," (").concat(Object(l["translate"])("Events_EventName"),")"),visit_duration:"".concat(this.ucfirst(Object(l["translate"])("Goals_VisitDuration")))}},beforeGoalListActionsBodyComponent:function(){var e=this;if(!this.beforeGoalListActionsBody)return{};var t={};return Object.values(this.goals).forEach((function(a){t[a.idgoal]={template:e.beforeGoalListActionsBody[a.idgoal]}})),Object(d["markRaw"])(t)},endEditTableComponent:function(){return this.endEditTable&&this.addEditTableComponent?Object(d["markRaw"])({template:this.endEditTable}):null},beforeGoalListActionsHeadComponent:function(){return this.beforeGoalListActionsHead?Object(d["markRaw"])({template:this.beforeGoalListActionsHead}):null},isManuallyTriggered:function(){return"manually"===this.triggerType},matchesExpressionExternal:function(){var e="'http://www.amazon.com\\/(.*)\\/yourAffiliateId'";return Object(l["translate"])("Goals_MatchesExpression",e)}}});ke.render=Ge;var De=ke; +*/var Se=function(){function e(t,a){Ve(this,e),Te(this,"parameters",void 0),Te(this,"options",void 0),this.parameters=t,this.options=a}return we(e,[{key:"addParams",value:function(e){Object.assign(this.parameters,e)}},{key:"withTokenInUrl",value:function(){this.options.withTokenInUrl=!0}},{key:"reset",value:function(){var e=this;Object.keys(this.parameters).forEach((function(t){delete e.parameters[t]})),delete this.options.postParams}},{key:"addPostParams",value:function(e){this.options.postParams=Object.assign(Object.assign({},this.options.postParams),e)}}]),e}(),ke=Object(d["defineComponent"])({inheritAttrs:!1,props:{onlyShowAddNewGoal:Boolean,userCanEditGoals:Boolean,ecommerceEnabled:Boolean,goals:{type:Object,required:!0},addNewGoalIntro:String,goalTriggerTypeOptions:Object,goalMatchAttributeOptions:Array,eventTypeOptions:Array,patternTypeOptions:Array,numericComparisonTypeOptions:Array,allowMultipleOptions:Array,showAddGoal:Boolean,showGoal:Number,beforeGoalListActionsBody:Object,endEditTable:String,beforeGoalListActionsHead:String},data:function(){return{showEditGoal:!1,showGoalList:!0,goal:{},isLoading:!1,eventType:"event_category",triggerType:"visitors",apiMethod:"",submitText:"",goalToDelete:null,addEditTableComponent:!1}},components:{SaveButton:Ee["SaveButton"],ContentBlock:l["ContentBlock"],ActivityIndicator:l["ActivityIndicator"],Field:Ee["Field"],Alert:l["Alert"]},directives:{ContentTable:l["ContentTable"],Form:Ee["Form"]},mounted:function(){var e=this;this.showAddGoal?this.createGoal():this.showGoal?this.editGoal(this.showGoal):this.showListOfReports(),Object(d["nextTick"])((function(){e.addEditTableComponent=!0,Object(d["nextTick"])((function(){var t=e.$refs.endedittable,a=l["Matomo"].helper.getAngularDependency("$rootScope").$new(!0);$(t).data("scope",a),l["Matomo"].helper.compileAngularComponents(t,{scope:a})}))}))},beforeUnmount:function(){var e=this.$refs.endedittable;$(e).data("scope").$destroy()},methods:{scrollToTop:function(){setTimeout((function(){l["Matomo"].helper.lazyScrollTo(".pageWrap",200)}))},initGoalForm:function(e,t,a,n,o,r,i,c,s,u,d,b){l["Matomo"].postEvent("Goals.beforeInitGoalForm",e,b),this.apiMethod=e,this.goal={},this.goal.name=a,this.goal.description=n;var p=o;"manually"===p?(this.triggerType="manually",p="url"):this.triggerType="visitors",0===p.indexOf("event")?(this.eventType=p,p="event"):this.eventType="event_category",this.goal.match_attribute=p,this.goal.allow_multiple=u,this.goal.pattern_type=i,this.goal.pattern=r,this.goal.case_sensitive=c,this.goal.revenue=s,this.goal.event_value_as_revenue=d,this.submitText=t,this.goal.idgoal=b},showListOfReports:function(){l["Matomo"].postEvent("Goals.cancelForm"),this.showGoalList=!0,this.showEditGoal=!1,this.scrollToTop()},showAddEditForm:function(){this.showGoalList=!1,this.showEditGoal=!0},createGoal:function(){var e={isAllowed:!0};l["Matomo"].postEvent("Goals.initAddGoal",e),e&&!e.isAllowed||(this.showAddEditForm(),this.initGoalForm("Goals.addGoal",Object(l["translate"])("Goals_AddGoal"),"","","url","","contains",!1,0,!1,!1,0),this.scrollToTop())},editGoal:function(e){this.showAddEditForm();var t=this.goals["".concat(e)];this.initGoalForm("Goals.updateGoal",Object(l["translate"])("Goals_UpdateGoal"),t.name,t.description,t.match_attribute,t.pattern,t.pattern_type,!!t.case_sensitive&&"0"!==t.case_sensitive,parseInt("".concat(t.revenue),10),!!t.allow_multiple&&"0"!==t.allow_multiple,!!t.event_value_as_revenue&&"0"!==t.event_value_as_revenue,e),this.scrollToTop()},deleteGoal:function(e){var t=this;this.goalToDelete=this.goals["".concat(e)],l["Matomo"].helper.modalConfirm(this.$refs.confirm,{yes:function(){t.isLoading=!0,l["AjaxHelper"].fetch({idGoal:e,method:"Goals.deleteGoal"}).then((function(){window.location.reload()})).finally((function(){t.isLoading=!1}))}})},save:function(){var e=this,t={};t.name=this.goal.name,t.description=this.goal.description,this.isManuallyTriggered?(t.matchAttribute="manually",t.patternType="regex",t.pattern=".*",t.caseSensitive=0):(t.matchAttribute=this.goal.match_attribute,"event"===t.matchAttribute&&(t.matchAttribute=this.eventType),t.patternType=this.goal.pattern_type,t.pattern=this.goal.pattern,t.caseSensitive=this.goal.case_sensitive?1:0),t.revenue=this.goal.revenue||0,t.allowMultipleConversionsPerVisit=this.goal.allow_multiple?1:0,t.useEventValueAsRevenue=this.goal.event_value_as_revenue?1:0,t.idGoal=this.goal.idgoal,t.method=this.apiMethod;var a="Goals.addGoal"===t.method,n="Goals.updateGoal"===t.method,o={},r=new Se(t,o);n?l["Matomo"].postEvent("Goals.beforeUpdateGoal",t,r):a&&l["Matomo"].postEvent("Goals.beforeAddGoal",t,r),null!==t&&void 0!==t&&t.cancelRequest||(this.isLoading=!0,l["AjaxHelper"].fetch(t,o).then((function(){var t=l["MatomoUrl"].parsed.value.subcategory;"Goals_AddNewGoal"===t&&l["Matomo"].helper.isAngularRenderingThePage()?l["ReportingMenuStore"].reloadMenuItems().then((function(){l["MatomoUrl"].updateHash(Object.assign(Object.assign({},l["MatomoUrl"].hashParsed.value),{},{subcategory:"Goals_ManageGoals"})),e.isLoading=!1})):window.location.reload()})).catch((function(){e.scrollToTop(),e.isLoading=!1})))},changedTriggerType:function(){this.isManuallyTriggered||this.goal.pattern_type||(this.goal.pattern_type="contains")},initPatternType:function(){this.isMatchAttributeNumeric?this.goal.pattern_type="greater_than":this.goal.pattern_type="contains"},lcfirst:function(e){return"".concat(e.slice(0,1).toLowerCase()).concat(e.slice(1))},ucfirst:function(e){return"".concat(e.slice(0,1).toUpperCase()).concat(e.slice(1))}},computed:{learnMoreAboutGoalTracking:function(){return Object(l["translate"])("Goals_LearnMoreAboutGoalTrackingDocumentation",'<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/docs/tracking-goals-web-analytics/">',"</a>")},youCanEnableEcommerceReports:function(){var e=l["MatomoUrl"].stringify(Object.assign(Object.assign({},l["MatomoUrl"].urlParsed.value),{},{module:"SitesManager",action:"index"})),t='<a href="https://matomo.org/docs/ecommerce-analytics/" '+'rel="noreferrer noopener" target="_blank">'.concat(Object(l["translate"])("Goals_EcommerceReports"),"</a>"),a="<a href='".concat(e,"'>").concat(Object(l["translate"])("SitesManager_WebsitesManagement"),"</a>");return Object(l["translate"])("Goals_YouCanEnableEcommerceReports",t,a)},siteName:function(){return l["Matomo"].helper.htmlDecode(l["Matomo"].siteName)},whereVisitedPageManuallyCallsJsTrackerText:function(){var e="https://developer.matomo.org/guides/tracking-javascript-guide#manually-trigger-goal-conversions";return Object(l["translate"])("Goals_WhereVisitedPageManuallyCallsJavascriptTrackerLearnMore",'<a target="_blank" rel="noreferrer noopener" href="'.concat(e,'">'),"</a>")},caseSensitiveTitle:function(){return"".concat(Object(l["translate"])("Goals_CaseSensitive")," ").concat(Object(l["translate"])("Goals_Optional"))},useEventValueAsRevenueHelp:function(){return"".concat(Object(l["translate"])("Goals_EventValueAsRevenueHelp")," <br/><br/> ").concat(Object(l["translate"])("Goals_EventValueAsRevenueHelp2"))},cancelText:function(){return Object(l["translate"])("General_OrCancel","<a class='entityCancelLink'>","</a>")},isMatchAttributeNumeric:function(){return["visit_duration"].indexOf(this.goal.match_attribute)>-1},patternFieldLabel:function(){return"visit_duration"===this.goal.match_attribute?Object(l["translate"])("Goals_TimeInMinutes"):Object(l["translate"])("Goals_Pattern")},goalMatchAttributeTranslations:function(){return{manually:Object(l["translate"])("Goals_ManuallyTriggeredUsingJavascriptFunction"),file:Object(l["translate"])("Goals_Download"),url:Object(l["translate"])("Goals_VisitUrl"),title:Object(l["translate"])("Goals_VisitPageTitle"),external_website:Object(l["translate"])("Goals_ClickOutlink"),event_action:"".concat(Object(l["translate"])("Goals_SendEvent")," (").concat(Object(l["translate"])("Events_EventAction"),")"),event_category:"".concat(Object(l["translate"])("Goals_SendEvent")," (").concat(Object(l["translate"])("Events_EventCategory"),")"),event_name:"".concat(Object(l["translate"])("Goals_SendEvent")," (").concat(Object(l["translate"])("Events_EventName"),")"),visit_duration:"".concat(this.ucfirst(Object(l["translate"])("Goals_VisitDuration")))}},beforeGoalListActionsBodyComponent:function(){var e=this;if(!this.beforeGoalListActionsBody)return{};var t={};return Object.values(this.goals).forEach((function(a){t[a.idgoal]={template:e.beforeGoalListActionsBody[a.idgoal]}})),Object(d["markRaw"])(t)},endEditTableComponent:function(){return this.endEditTable&&this.addEditTableComponent?Object(d["markRaw"])({template:this.endEditTable}):null},beforeGoalListActionsHeadComponent:function(){return this.beforeGoalListActionsHead?Object(d["markRaw"])({template:this.beforeGoalListActionsHead}):null},isManuallyTriggered:function(){return"manually"===this.triggerType},matchesExpressionExternal:function(){var e="'http://www.amazon.com\\/(.*)\\/yourAffiliateId'";return Object(l["translate"])("Goals_MatchesExpression",e)}}});ke.render=Ge;var De=ke; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/Marketplace/vue/dist/Marketplace.umd.js b/plugins/Marketplace/vue/dist/Marketplace.umd.js index eacf24ffa5..1c1d1985b2 100644 --- a/plugins/Marketplace/vue/dist/Marketplace.umd.js +++ b/plugins/Marketplace/vue/dist/Marketplace.umd.js @@ -157,8 +157,8 @@ window.broadcast.addPopoverHandler('browsePluginDetail', function (value) { var activeTab = null; if (value.indexOf('!') !== -1) { - activeTab = value.substr(value.indexOf('!') + 1); - pluginName = value.substr(0, value.indexOf('!')); + activeTab = value.slice(value.indexOf('!') + 1); + pluginName = value.slice(0, value.indexOf('!')); } var url = "module=Marketplace&action=pluginDetails&pluginName=".concat(encodeURIComponent(pluginName)); diff --git a/plugins/Marketplace/vue/dist/Marketplace.umd.min.js b/plugins/Marketplace/vue/dist/Marketplace.umd.min.js index a21ddba546..e35d4aab07 100644 --- a/plugins/Marketplace/vue/dist/Marketplace.umd.min.js +++ b/plugins/Marketplace/vue/dist/Marketplace.umd.min.js @@ -1,18 +1,18 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["Marketplace"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["Marketplace"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(l){if(t[l])return t[l].exports;var a=t[l]={i:l,l:!1,exports:{}};return e[l].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,l){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},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 l=Object.create(null);if(n.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(l,a,function(t){return e[t]}.bind(null,a));return l},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/Marketplace/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"Marketplace",(function(){return P})),n.d(t,"LicenseKey",(function(){return Z})),n.d(t,"PluginName",(function(){return c})),"undefined"!==typeof window){var l=window.document.currentScript,a=l&&l.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}function o(e,t){var n=e.value.pluginName,l=e.value.activePluginTab;t.preventDefault(),l&&(n+="!".concat(l)),window.broadcast.propagateNewPopoverParameter("browsePluginDetail",n)} +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["Marketplace"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["Marketplace"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(l){if(t[l])return t[l].exports;var a=t[l]={i:l,l:!1,exports:{}};return e[l].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,l){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},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 l=Object.create(null);if(n.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(l,a,function(t){return e[t]}.bind(null,a));return l},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/Marketplace/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"Marketplace",(function(){return P})),n.d(t,"LicenseKey",(function(){return Z})),n.d(t,"PluginName",(function(){return c})),"undefined"!==typeof window){var l=window.document.currentScript,a=l&&l.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}function i(e,t){var n=e.value.pluginName,l=e.value.activePluginTab;t.preventDefault(),l&&(n+="!".concat(l)),window.broadcast.propagateNewPopoverParameter("browsePluginDetail",n)} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -window.broadcast.addPopoverHandler("browsePluginDetail",(function(e){var t=e,n=null;-1!==e.indexOf("!")&&(n=e.substr(e.indexOf("!")+1),t=e.substr(0,e.indexOf("!")));var l="module=Marketplace&action=pluginDetails&pluginName=".concat(encodeURIComponent(t));n&&(l+="&activeTab=".concat(encodeURIComponent(n))),window.Piwik_Popover.createPopupAndLoadUrl(l,"details")}));var i=window,r=i.$,c={mounted:function(e,t){var n=t.value.pluginName;n&&(t.value.onClickHandler=o.bind(null,t),r(e).on("click",t.value.onClickHandler).attr("matomo-plugin-name",n))},unmounted:function(e,t){r(e).off("click",t.value.onClickHandler)}}; +window.broadcast.addPopoverHandler("browsePluginDetail",(function(e){var t=e,n=null;-1!==e.indexOf("!")&&(n=e.slice(e.indexOf("!")+1),t=e.slice(0,e.indexOf("!")));var l="module=Marketplace&action=pluginDetails&pluginName=".concat(encodeURIComponent(t));n&&(l+="&activeTab=".concat(encodeURIComponent(n))),window.Piwik_Popover.createPopupAndLoadUrl(l,"details")}));var o=window,r=o.$,c={mounted:function(e,t){var n=t.value.pluginName;n&&(t.value.onClickHandler=i.bind(null,t),r(e).on("click",t.value.onClickHandler).attr("matomo-plugin-name",n))},unmounted:function(e,t){r(e).off("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 s(){return{restrict:"A",link:function(e,t,n){var l={instance:null,value:{pluginName:n.piwikPluginName,activePluginTab:n.activeplugintab},oldValue:null,modifiers:{},dir:{}};c.mounted(t[0],l),t.on("$destroy",(function(){c.unmounted(t[0],l)}))}}}window.angular.module("piwikApp").directive("piwikPluginName",s);var u=n("8bbf"),d={class:"row marketplaceActions",ref:"root"},p={class:"col s12 m6 l4"},m={class:"col s12 m6 l4"},b={key:0,class:"col s12 m12 l4 "},f=["action"];function g(e,t,n,l,a,o){var i=Object(u["resolveComponent"])("Field");return Object(u["openBlock"])(),Object(u["createElementBlock"])("div",d,[Object(u["createElementVNode"])("div",p,[Object(u["createVNode"])(i,{uicontrol:"select",name:"plugin_type","model-value":e.pluginTypeFilter,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.pluginTypeFilter=t,e.changePluginType()}),title:e.translate("Marketplace_Show"),"full-width":!0,options:e.pluginTypeOptions},null,8,["model-value","title","options"])]),Object(u["createElementVNode"])("div",m,[Object(u["createVNode"])(i,{uicontrol:"select",name:"plugin_sort","model-value":e.pluginSort,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.pluginSort=t,e.changePluginSort()}),title:e.translate("Marketplace_Sort"),"full-width":!0,options:e.pluginSortOptions},null,8,["model-value","title","options"])]),e.pluginsToShow.length>20||e.query?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",b,[Object(u["createElementVNode"])("form",{method:"post",class:"plugin-search",action:e.pluginSearchFormAction,ref:"pluginSearchForm"},[Object(u["createElementVNode"])("div",null,[Object(u["createVNode"])(i,{uicontrol:"text",name:"query",title:e.queryInputTitle,"full-width":!0,modelValue:e.searchQuery,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.searchQuery=t})},null,8,["title","modelValue"])]),Object(u["createElementVNode"])("span",{class:"icon-search",onClick:t[3]||(t[3]=function(t){return e.$refs.pluginSearchForm.submit()})})],8,f)])):Object(u["createCommentVNode"])("",!0)],512)}var v=n("19dc"),O=n("a5a2"),y=function(e){return"".concat(e[0].toLowerCase()).concat(e.substring(1))},h=window,j=h.$,k=Object(u["defineComponent"])({props:{pluginType:{type:String,required:!0},pluginTypeOptions:{type:[Object,Array],required:!0},sort:{type:String,required:!0},pluginSortOptions:{type:[Object,Array],required:!0},pluginsToShow:{type:Array,required:!0},query:{type:String,default:""},numAvailablePlugins:{type:Number,required:!0}},components:{Field:O["Field"]},data:function(){return{pluginSort:this.sort,pluginTypeFilter:this.pluginType,searchQuery:this.query}},mounted:function(){v["Matomo"].postEvent("Marketplace.Marketplace.mounted",{element:this.$refs.root})},unmounted:function(){v["Matomo"].postEvent("Marketplace.Marketplace.unmounted",{element:this.$refs.root})},created:function(){function e(e){if(e){var t=j(e);if(t&&t.length){var n=void 0,l=void 0,a=void 0,o=[],i=0;t.each((function(e,t){var r=j(t),c=r.offset(),s=c.top;i!==s&&(o=[],i=s,n=void 0,l=void 0,a=void 0),o.push(r);var u=r.find("h3").height(),d=r.find(".metadata").height(),p=r.find(".footer").height();n?n<u&&(n=u):n=u,l?l<d&&(l=d):l=d,a?a<p&&(a=p):a=p,j.each(o,(function(e,t){n&&t.find("h3").height("".concat(n,"px")),l&&t.find(".metadata").height("".concat(l,"px")),a&&t.find(".footer").height("".concat(a,"px"))}))}))}}}Object(u["nextTick"])((function(){var t=j(".marketplace .plugin .description");t.dotdotdot({after:"a.more",watch:"window"}),v["Matomo"].helper.compileVueDirectives(t),e(".marketplace .plugin")}))},methods:{changePluginSort:function(){v["MatomoUrl"].updateUrl(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{query:"",sort:this.pluginSort}),Object.assign(Object.assign({},v["MatomoUrl"].hashParsed.value),{},{query:"",sort:this.pluginSort}))},changePluginType:function(){v["MatomoUrl"].updateUrl(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{query:"",show:this.pluginTypeFilter}),Object.assign(Object.assign({},v["MatomoUrl"].hashParsed.value),{},{query:"",show:this.pluginTypeFilter}))}},computed:{pluginSearchFormAction:function(){return"?".concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{sort:"",embed:"0"})),"#?").concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].hashParsed.value),{},{sort:"",embed:"0",query:this.searchQuery})))},queryInputTitle:function(){var e=y(Object(v["translate"])("General_Plugins"));return"".concat(Object(v["translate"])("General_Search")," ").concat(this.numAvailablePlugins," ").concat(e,"...")}}});k.render=g;var P=k,V={class:"marketplace-max-width"},N={class:"marketplace-paid-intro"},M={key:0},S={key:0},A=Object(u["createElementVNode"])("br",null,null,-1),U={class:"licenseToolbar valign-wrapper"},w=["href"],L={key:0},E={class:"ui-confirm",id:"installAllPaidPluginsAtOnce",ref:"installAllPaidPluginsAtOnce"},C=Object(u["createElementVNode"])("br",null,null,-1),T=Object(u["createElementVNode"])("br",null,null,-1),K=["data-href","value"],B=["value"],_={key:1},x={key:0},I=["innerHTML"],q=Object(u["createElementVNode"])("br",null,null,-1),F={class:"licenseToolbar valign-wrapper"},D={key:1},H=["innerHTML"],$={class:"ui-confirm",id:"confirmRemoveLicense",ref:"confirmRemoveLicense"},R=["value"],G=["value"];function Q(e,t,n,l,a,o){var i=Object(u["resolveComponent"])("DefaultLicenseKeyFields"),r=Object(u["resolveComponent"])("SaveButton"),c=Object(u["resolveComponent"])("ActivityIndicator");return Object(u["openBlock"])(),Object(u["createElementBlock"])("div",V,[Object(u["createElementVNode"])("div",N,[e.isValidConsumer?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",M,[e.isSuperUser?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",S,[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("Marketplace_PaidPluginsWithLicenseKeyIntro",""))+" ",1),A,Object(u["createElementVNode"])("div",U,[Object(u["createVNode"])(i,{"model-value":e.licenseKey,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.licenseKey=t,e.updatedLicenseKey()}),onConfirm:t[1]||(t[1]=function(t){return e.updateLicense()}),"has-license-key":e.hasLicenseKey,"is-valid-consumer":e.isValidConsumer,"enable-update":e.enableUpdate},null,8,["model-value","has-license-key","is-valid-consumer","enable-update"]),Object(u["createVNode"])(r,{class:"valign",id:"remove_license_key",onConfirm:t[2]||(t[2]=function(t){return e.removeLicense()}),value:e.translate("Marketplace_RemoveLicenseKey")},null,8,["value"]),Object(u["createElementVNode"])("a",{class:"btn valign",href:e.subscriptionOverviewLink},Object(u["toDisplayString"])(e.translate("Marketplace_ViewSubscriptions")),9,w),e.showInstallAllPaidPlugins?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",L,[Object(u["createElementVNode"])("a",{href:"",class:"btn installAllPaidPlugins valign",onClick:t[3]||(t[3]=Object(u["withModifiers"])((function(t){return e.onInstallAllPaidPlugins()}),["prevent"]))},Object(u["toDisplayString"])(e.translate("Marketplace_InstallPurchasedPlugins")),1),Object(u["createElementVNode"])("div",E,[Object(u["createElementVNode"])("h2",null,Object(u["toDisplayString"])(e.translate("Marketplace_InstallAllPurchasedPlugins")),1),Object(u["createElementVNode"])("p",null,[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("Marketplace_InstallThesePlugins"))+" ",1),C,T]),Object(u["createElementVNode"])("ul",null,[(Object(u["openBlock"])(!0),Object(u["createElementBlock"])(u["Fragment"],null,Object(u["renderList"])(e.paidPluginsToInstallAtOnce,(function(e){return Object(u["openBlock"])(),Object(u["createElementBlock"])("li",{key:e},Object(u["toDisplayString"])(e),1)})),128))]),Object(u["createElementVNode"])("p",null,[Object(u["createElementVNode"])("input",{role:"install",type:"button","data-href":e.installAllPaidPluginsLink,value:e.translate("Marketplace_InstallAllPurchasedPluginsAction",e.paidPluginsToInstallAtOnce.length)},null,8,K),Object(u["createElementVNode"])("input",{role:"cancel",type:"button",value:e.translate("General_Cancel")},null,8,B)])],512)])):Object(u["createCommentVNode"])("",!0)]),Object(u["createVNode"])(c,{loading:e.isUpdating},null,8,["loading"])])):Object(u["createCommentVNode"])("",!0)])):(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",_,[e.isSuperUser?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",x,[Object(u["createElementVNode"])("span",{innerHTML:e.$sanitize(e.noLicenseKeyIntroText)},null,8,I),q,Object(u["createElementVNode"])("div",F,[Object(u["createVNode"])(i,{"model-value":e.licenseKey,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.licenseKey=t,e.updatedLicenseKey()}),onConfirm:t[5]||(t[5]=function(t){return e.updateLicense()}),"has-license-key":e.hasLicenseKey,"is-valid-consumer":e.isValidConsumer,"enable-update":e.enableUpdate},null,8,["model-value","has-license-key","is-valid-consumer","enable-update"])]),Object(u["createVNode"])(c,{loading:e.isUpdating},null,8,["loading"])])):(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",D,[Object(u["createElementVNode"])("span",{innerHTML:e.$sanitize(e.noLicenseKeyIntroNoSuperUserAccessText)},null,8,H)]))]))]),Object(u["createElementVNode"])("div",$,[Object(u["createElementVNode"])("h2",null,Object(u["toDisplayString"])(e.translate("Marketplace_ConfirmRemoveLicense")),1),Object(u["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,R),Object(u["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,G)],512)])}var z={class:"valign licenseKeyText"};function J(e,t,n,l,a,o){var i=Object(u["resolveComponent"])("Field"),r=Object(u["resolveComponent"])("SaveButton");return Object(u["openBlock"])(),Object(u["createElementBlock"])(u["Fragment"],null,[Object(u["createElementVNode"])("div",z,[Object(u["createVNode"])(i,{uicontrol:"text",name:"license_key","full-width":!0,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("update:modelValue",t)}),placeholder:e.licenseKeyPlaceholder},null,8,["model-value","placeholder"])]),Object(u["createVNode"])(r,{class:"valign",onConfirm:t[1]||(t[1]=function(t){return e.$emit("confirm")}),disabled:!e.enableUpdate,value:e.saveButtonText,id:"submit_license_key"},null,8,["disabled","value"])],64)}var W=Object(u["defineComponent"])({props:{modelValue:String,isValidConsumer:Boolean,hasLicenseKey:Boolean,enableUpdate:Boolean},emits:["update:modelValue","confirm"],components:{Field:O["Field"],SaveButton:O["SaveButton"]},computed:{licenseKeyPlaceholder:function(){return this.isValidConsumer?Object(v["translate"])("Marketplace_LicenseKeyIsValidShort"):Object(v["translate"])("Marketplace_LicenseKey")},saveButtonText:function(){return this.hasLicenseKey?Object(v["translate"])("CoreUpdater_UpdateTitle"):Object(v["translate"])("Marketplace_ActivateLicenseKey")}}});W.render=J;var Y=W,X=Object(u["defineComponent"])({props:{isValidConsumer:Boolean,isSuperUser:Boolean,isAutoUpdatePossible:Boolean,isPluginsAdminEnabled:Boolean,hasLicenseKey:Boolean,paidPluginsToInstallAtOnce:{type:Array,required:!0},installNonce:{type:String,required:!0}},components:{SaveButton:O["SaveButton"],ActivityIndicator:v["ActivityIndicator"],DefaultLicenseKeyFields:Y},data:function(){return{licenseKey:"",enableUpdate:!1,isUpdating:!1}},methods:{onInstallAllPaidPlugins:function(){v["Matomo"].helper.modalConfirm(this.$refs.installAllPaidPluginsAtOnce)},updateLicenseKey:function(e,t,n){var l=this;v["AjaxHelper"].post({module:"API",method:"Marketplace.".concat(e),format:"JSON"},{licenseKey:this.licenseKey},{withTokenInUrl:!0}).then((function(e){l.isUpdating=!1,e&&e.value&&(v["NotificationsStore"].show({message:n,context:"success",type:"transient"}),v["Matomo"].helper.redirect())}),(function(){l.isUpdating=!1}))},removeLicense:function(){var e=this;v["Matomo"].helper.modalConfirm(this.$refs.confirmRemoveLicense,{yes:function(){e.enableUpdate=!1,e.isUpdating=!0,e.updateLicenseKey("deleteLicenseKey","",Object(v["translate"])("Marketplace_LicenseKeyDeletedSuccess"))}})},updatedLicenseKey:function(){this.enableUpdate=!!this.licenseKey},updateLicense:function(){this.enableUpdate=!1,this.isUpdating=!0,this.updateLicenseKey("saveLicenseKey",this.licenseKey,Object(v["translate"])("Marketplace_LicenseKeyActivatedSuccess"))}},computed:{subscriptionOverviewLink:function(){return"?".concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{action:"subscriptionOverview"})))},noLicenseKeyIntroText:function(){return Object(v["translate"])("Marketplace_PaidPluginsNoLicenseKeyIntro",'<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/recommends/premium-plugins/">',"</a>")},noLicenseKeyIntroNoSuperUserAccessText:function(){return Object(v["translate"])("Marketplace_PaidPluginsNoLicenseKeyIntroNoSuperUserAccess",'<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/recommends/premium-plugins/">',"</a>")},installAllPaidPluginsLink:function(){return"?".concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{action:"installAllPaidPlugins",nonce:this.installNonce})))},showInstallAllPaidPlugins:function(){return this.isAutoUpdatePossible&&this.isPluginsAdminEnabled&&this.paidPluginsToInstallAtOnce.length}}});X.render=Q;var Z=X; +function s(){return{restrict:"A",link:function(e,t,n){var l={instance:null,value:{pluginName:n.piwikPluginName,activePluginTab:n.activeplugintab},oldValue:null,modifiers:{},dir:{}};c.mounted(t[0],l),t.on("$destroy",(function(){c.unmounted(t[0],l)}))}}}window.angular.module("piwikApp").directive("piwikPluginName",s);var u=n("8bbf"),d={class:"row marketplaceActions",ref:"root"},p={class:"col s12 m6 l4"},m={class:"col s12 m6 l4"},b={key:0,class:"col s12 m12 l4 "},f=["action"];function g(e,t,n,l,a,i){var o=Object(u["resolveComponent"])("Field");return Object(u["openBlock"])(),Object(u["createElementBlock"])("div",d,[Object(u["createElementVNode"])("div",p,[Object(u["createVNode"])(o,{uicontrol:"select",name:"plugin_type","model-value":e.pluginTypeFilter,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.pluginTypeFilter=t,e.changePluginType()}),title:e.translate("Marketplace_Show"),"full-width":!0,options:e.pluginTypeOptions},null,8,["model-value","title","options"])]),Object(u["createElementVNode"])("div",m,[Object(u["createVNode"])(o,{uicontrol:"select",name:"plugin_sort","model-value":e.pluginSort,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.pluginSort=t,e.changePluginSort()}),title:e.translate("Marketplace_Sort"),"full-width":!0,options:e.pluginSortOptions},null,8,["model-value","title","options"])]),e.pluginsToShow.length>20||e.query?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",b,[Object(u["createElementVNode"])("form",{method:"post",class:"plugin-search",action:e.pluginSearchFormAction,ref:"pluginSearchForm"},[Object(u["createElementVNode"])("div",null,[Object(u["createVNode"])(o,{uicontrol:"text",name:"query",title:e.queryInputTitle,"full-width":!0,modelValue:e.searchQuery,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.searchQuery=t})},null,8,["title","modelValue"])]),Object(u["createElementVNode"])("span",{class:"icon-search",onClick:t[3]||(t[3]=function(t){return e.$refs.pluginSearchForm.submit()})})],8,f)])):Object(u["createCommentVNode"])("",!0)],512)}var v=n("19dc"),O=n("a5a2"),y=function(e){return"".concat(e[0].toLowerCase()).concat(e.substring(1))},h=window,j=h.$,k=Object(u["defineComponent"])({props:{pluginType:{type:String,required:!0},pluginTypeOptions:{type:[Object,Array],required:!0},sort:{type:String,required:!0},pluginSortOptions:{type:[Object,Array],required:!0},pluginsToShow:{type:Array,required:!0},query:{type:String,default:""},numAvailablePlugins:{type:Number,required:!0}},components:{Field:O["Field"]},data:function(){return{pluginSort:this.sort,pluginTypeFilter:this.pluginType,searchQuery:this.query}},mounted:function(){v["Matomo"].postEvent("Marketplace.Marketplace.mounted",{element:this.$refs.root})},unmounted:function(){v["Matomo"].postEvent("Marketplace.Marketplace.unmounted",{element:this.$refs.root})},created:function(){function e(e){if(e){var t=j(e);if(t&&t.length){var n=void 0,l=void 0,a=void 0,i=[],o=0;t.each((function(e,t){var r=j(t),c=r.offset(),s=c.top;o!==s&&(i=[],o=s,n=void 0,l=void 0,a=void 0),i.push(r);var u=r.find("h3").height(),d=r.find(".metadata").height(),p=r.find(".footer").height();n?n<u&&(n=u):n=u,l?l<d&&(l=d):l=d,a?a<p&&(a=p):a=p,j.each(i,(function(e,t){n&&t.find("h3").height("".concat(n,"px")),l&&t.find(".metadata").height("".concat(l,"px")),a&&t.find(".footer").height("".concat(a,"px"))}))}))}}}Object(u["nextTick"])((function(){var t=j(".marketplace .plugin .description");t.dotdotdot({after:"a.more",watch:"window"}),v["Matomo"].helper.compileVueDirectives(t),e(".marketplace .plugin")}))},methods:{changePluginSort:function(){v["MatomoUrl"].updateUrl(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{query:"",sort:this.pluginSort}),Object.assign(Object.assign({},v["MatomoUrl"].hashParsed.value),{},{query:"",sort:this.pluginSort}))},changePluginType:function(){v["MatomoUrl"].updateUrl(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{query:"",show:this.pluginTypeFilter}),Object.assign(Object.assign({},v["MatomoUrl"].hashParsed.value),{},{query:"",show:this.pluginTypeFilter}))}},computed:{pluginSearchFormAction:function(){return"?".concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{sort:"",embed:"0"})),"#?").concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].hashParsed.value),{},{sort:"",embed:"0",query:this.searchQuery})))},queryInputTitle:function(){var e=y(Object(v["translate"])("General_Plugins"));return"".concat(Object(v["translate"])("General_Search")," ").concat(this.numAvailablePlugins," ").concat(e,"...")}}});k.render=g;var P=k,V={class:"marketplace-max-width"},N={class:"marketplace-paid-intro"},M={key:0},S={key:0},A=Object(u["createElementVNode"])("br",null,null,-1),U={class:"licenseToolbar valign-wrapper"},w=["href"],L={key:0},E={class:"ui-confirm",id:"installAllPaidPluginsAtOnce",ref:"installAllPaidPluginsAtOnce"},C=Object(u["createElementVNode"])("br",null,null,-1),T=Object(u["createElementVNode"])("br",null,null,-1),K=["data-href","value"],B=["value"],_={key:1},x={key:0},I=["innerHTML"],q=Object(u["createElementVNode"])("br",null,null,-1),F={class:"licenseToolbar valign-wrapper"},D={key:1},H=["innerHTML"],$={class:"ui-confirm",id:"confirmRemoveLicense",ref:"confirmRemoveLicense"},R=["value"],G=["value"];function Q(e,t,n,l,a,i){var o=Object(u["resolveComponent"])("DefaultLicenseKeyFields"),r=Object(u["resolveComponent"])("SaveButton"),c=Object(u["resolveComponent"])("ActivityIndicator");return Object(u["openBlock"])(),Object(u["createElementBlock"])("div",V,[Object(u["createElementVNode"])("div",N,[e.isValidConsumer?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",M,[e.isSuperUser?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",S,[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("Marketplace_PaidPluginsWithLicenseKeyIntro",""))+" ",1),A,Object(u["createElementVNode"])("div",U,[Object(u["createVNode"])(o,{"model-value":e.licenseKey,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.licenseKey=t,e.updatedLicenseKey()}),onConfirm:t[1]||(t[1]=function(t){return e.updateLicense()}),"has-license-key":e.hasLicenseKey,"is-valid-consumer":e.isValidConsumer,"enable-update":e.enableUpdate},null,8,["model-value","has-license-key","is-valid-consumer","enable-update"]),Object(u["createVNode"])(r,{class:"valign",id:"remove_license_key",onConfirm:t[2]||(t[2]=function(t){return e.removeLicense()}),value:e.translate("Marketplace_RemoveLicenseKey")},null,8,["value"]),Object(u["createElementVNode"])("a",{class:"btn valign",href:e.subscriptionOverviewLink},Object(u["toDisplayString"])(e.translate("Marketplace_ViewSubscriptions")),9,w),e.showInstallAllPaidPlugins?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",L,[Object(u["createElementVNode"])("a",{href:"",class:"btn installAllPaidPlugins valign",onClick:t[3]||(t[3]=Object(u["withModifiers"])((function(t){return e.onInstallAllPaidPlugins()}),["prevent"]))},Object(u["toDisplayString"])(e.translate("Marketplace_InstallPurchasedPlugins")),1),Object(u["createElementVNode"])("div",E,[Object(u["createElementVNode"])("h2",null,Object(u["toDisplayString"])(e.translate("Marketplace_InstallAllPurchasedPlugins")),1),Object(u["createElementVNode"])("p",null,[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("Marketplace_InstallThesePlugins"))+" ",1),C,T]),Object(u["createElementVNode"])("ul",null,[(Object(u["openBlock"])(!0),Object(u["createElementBlock"])(u["Fragment"],null,Object(u["renderList"])(e.paidPluginsToInstallAtOnce,(function(e){return Object(u["openBlock"])(),Object(u["createElementBlock"])("li",{key:e},Object(u["toDisplayString"])(e),1)})),128))]),Object(u["createElementVNode"])("p",null,[Object(u["createElementVNode"])("input",{role:"install",type:"button","data-href":e.installAllPaidPluginsLink,value:e.translate("Marketplace_InstallAllPurchasedPluginsAction",e.paidPluginsToInstallAtOnce.length)},null,8,K),Object(u["createElementVNode"])("input",{role:"cancel",type:"button",value:e.translate("General_Cancel")},null,8,B)])],512)])):Object(u["createCommentVNode"])("",!0)]),Object(u["createVNode"])(c,{loading:e.isUpdating},null,8,["loading"])])):Object(u["createCommentVNode"])("",!0)])):(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",_,[e.isSuperUser?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",x,[Object(u["createElementVNode"])("span",{innerHTML:e.$sanitize(e.noLicenseKeyIntroText)},null,8,I),q,Object(u["createElementVNode"])("div",F,[Object(u["createVNode"])(o,{"model-value":e.licenseKey,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.licenseKey=t,e.updatedLicenseKey()}),onConfirm:t[5]||(t[5]=function(t){return e.updateLicense()}),"has-license-key":e.hasLicenseKey,"is-valid-consumer":e.isValidConsumer,"enable-update":e.enableUpdate},null,8,["model-value","has-license-key","is-valid-consumer","enable-update"])]),Object(u["createVNode"])(c,{loading:e.isUpdating},null,8,["loading"])])):(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",D,[Object(u["createElementVNode"])("span",{innerHTML:e.$sanitize(e.noLicenseKeyIntroNoSuperUserAccessText)},null,8,H)]))]))]),Object(u["createElementVNode"])("div",$,[Object(u["createElementVNode"])("h2",null,Object(u["toDisplayString"])(e.translate("Marketplace_ConfirmRemoveLicense")),1),Object(u["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,R),Object(u["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,G)],512)])}var z={class:"valign licenseKeyText"};function J(e,t,n,l,a,i){var o=Object(u["resolveComponent"])("Field"),r=Object(u["resolveComponent"])("SaveButton");return Object(u["openBlock"])(),Object(u["createElementBlock"])(u["Fragment"],null,[Object(u["createElementVNode"])("div",z,[Object(u["createVNode"])(o,{uicontrol:"text",name:"license_key","full-width":!0,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("update:modelValue",t)}),placeholder:e.licenseKeyPlaceholder},null,8,["model-value","placeholder"])]),Object(u["createVNode"])(r,{class:"valign",onConfirm:t[1]||(t[1]=function(t){return e.$emit("confirm")}),disabled:!e.enableUpdate,value:e.saveButtonText,id:"submit_license_key"},null,8,["disabled","value"])],64)}var W=Object(u["defineComponent"])({props:{modelValue:String,isValidConsumer:Boolean,hasLicenseKey:Boolean,enableUpdate:Boolean},emits:["update:modelValue","confirm"],components:{Field:O["Field"],SaveButton:O["SaveButton"]},computed:{licenseKeyPlaceholder:function(){return this.isValidConsumer?Object(v["translate"])("Marketplace_LicenseKeyIsValidShort"):Object(v["translate"])("Marketplace_LicenseKey")},saveButtonText:function(){return this.hasLicenseKey?Object(v["translate"])("CoreUpdater_UpdateTitle"):Object(v["translate"])("Marketplace_ActivateLicenseKey")}}});W.render=J;var Y=W,X=Object(u["defineComponent"])({props:{isValidConsumer:Boolean,isSuperUser:Boolean,isAutoUpdatePossible:Boolean,isPluginsAdminEnabled:Boolean,hasLicenseKey:Boolean,paidPluginsToInstallAtOnce:{type:Array,required:!0},installNonce:{type:String,required:!0}},components:{SaveButton:O["SaveButton"],ActivityIndicator:v["ActivityIndicator"],DefaultLicenseKeyFields:Y},data:function(){return{licenseKey:"",enableUpdate:!1,isUpdating:!1}},methods:{onInstallAllPaidPlugins:function(){v["Matomo"].helper.modalConfirm(this.$refs.installAllPaidPluginsAtOnce)},updateLicenseKey:function(e,t,n){var l=this;v["AjaxHelper"].post({module:"API",method:"Marketplace.".concat(e),format:"JSON"},{licenseKey:this.licenseKey},{withTokenInUrl:!0}).then((function(e){l.isUpdating=!1,e&&e.value&&(v["NotificationsStore"].show({message:n,context:"success",type:"transient"}),v["Matomo"].helper.redirect())}),(function(){l.isUpdating=!1}))},removeLicense:function(){var e=this;v["Matomo"].helper.modalConfirm(this.$refs.confirmRemoveLicense,{yes:function(){e.enableUpdate=!1,e.isUpdating=!0,e.updateLicenseKey("deleteLicenseKey","",Object(v["translate"])("Marketplace_LicenseKeyDeletedSuccess"))}})},updatedLicenseKey:function(){this.enableUpdate=!!this.licenseKey},updateLicense:function(){this.enableUpdate=!1,this.isUpdating=!0,this.updateLicenseKey("saveLicenseKey",this.licenseKey,Object(v["translate"])("Marketplace_LicenseKeyActivatedSuccess"))}},computed:{subscriptionOverviewLink:function(){return"?".concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{action:"subscriptionOverview"})))},noLicenseKeyIntroText:function(){return Object(v["translate"])("Marketplace_PaidPluginsNoLicenseKeyIntro",'<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/recommends/premium-plugins/">',"</a>")},noLicenseKeyIntroNoSuperUserAccessText:function(){return Object(v["translate"])("Marketplace_PaidPluginsNoLicenseKeyIntroNoSuperUserAccess",'<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/recommends/premium-plugins/">',"</a>")},installAllPaidPluginsLink:function(){return"?".concat(v["MatomoUrl"].stringify(Object.assign(Object.assign({},v["MatomoUrl"].urlParsed.value),{},{action:"installAllPaidPlugins",nonce:this.installNonce})))},showInstallAllPaidPlugins:function(){return this.isAutoUpdatePossible&&this.isPluginsAdminEnabled&&this.paidPluginsToInstallAtOnce.length}}});X.render=Q;var Z=X; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.js b/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.js index a26727f078..dbbbb63cef 100644 --- a/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.js +++ b/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.js @@ -824,29 +824,29 @@ function configBoolToInt(value) { AnonymizeIpvue_type_script_lang_ts.render = AnonymizeIpvue_type_template_id_3a6e17ea_render /* harmony default export */ var AnonymizeIp = (AnonymizeIpvue_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/PrivacyManager/vue/src/OptOutCustomizer/OptOutCustomizer.vue?vue&type=template&id=7ea00f35 +// 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/PrivacyManager/vue/src/OptOutCustomizer/OptOutCustomizer.vue?vue&type=template&id=5d0d1c62 -var OptOutCustomizervue_type_template_id_7ea00f35_hoisted_1 = { +var OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_1 = { class: "optOutCustomizer" }; -var OptOutCustomizervue_type_template_id_7ea00f35_hoisted_2 = ["innerHTML"]; -var OptOutCustomizervue_type_template_id_7ea00f35_hoisted_3 = ["value"]; -var OptOutCustomizervue_type_template_id_7ea00f35_hoisted_4 = ["value"]; +var OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_2 = ["innerHTML"]; +var OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_3 = ["value"]; +var OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_4 = ["value"]; -var OptOutCustomizervue_type_template_id_7ea00f35_hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createStaticVNode"])("<option value=\"px\">px</option><option value=\"pt\">pt</option><option value=\"em\">em</option><option value=\"rem\">rem</option><option value=\"%\">%</option>", 5); +var OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createStaticVNode"])("<option value=\"px\">px</option><option value=\"pt\">pt</option><option value=\"em\">em</option><option value=\"rem\">rem</option><option value=\"%\">%</option>", 5); -var OptOutCustomizervue_type_template_id_7ea00f35_hoisted_10 = [OptOutCustomizervue_type_template_id_7ea00f35_hoisted_5]; -var OptOutCustomizervue_type_template_id_7ea00f35_hoisted_11 = { +var OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_10 = [OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_5]; +var OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_11 = { ref: "pre" }; -var OptOutCustomizervue_type_template_id_7ea00f35_hoisted_12 = ["innerHTML"]; -var OptOutCustomizervue_type_template_id_7ea00f35_hoisted_13 = ["src"]; -function OptOutCustomizervue_type_template_id_7ea00f35_render(_ctx, _cache, $props, $setup, $data, $options) { +var OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_12 = ["innerHTML"]; +var OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_13 = ["src"]; +function OptOutCustomizervue_type_template_id_5d0d1c62_render(_ctx, _cache, $props, $setup, $data, $options) { 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", OptOutCustomizervue_type_template_id_7ea00f35_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreAdminHome_OptOutExplanation')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreAdminHome_OptOutExplanation')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { innerHTML: _ctx.$sanitize(_ctx.readThisToLearnMore) - }, null, 8, OptOutCustomizervue_type_template_id_7ea00f35_hoisted_2)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h3", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_OptOutCustomize')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [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('PrivacyManager_FontColor')) + ": ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_2)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h3", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_OptOutCustomize')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [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('PrivacyManager_FontColor')) + ": ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "color", value: _ctx.fontColor, onKeydown: _cache[0] || (_cache[0] = function ($event) { @@ -855,7 +855,7 @@ function OptOutCustomizervue_type_template_id_7ea00f35_render(_ctx, _cache, $pro onChange: _cache[1] || (_cache[1] = function ($event) { return _ctx.onFontColorChange($event); }) - }, null, 40, OptOutCustomizervue_type_template_id_7ea00f35_hoisted_3)]), 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('PrivacyManager_BackgroundColor')) + ": ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 40, OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_3)]), 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('PrivacyManager_BackgroundColor')) + ": ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "color", value: _ctx.backgroundColor, onKeydown: _cache[2] || (_cache[2] = function ($event) { @@ -864,7 +864,7 @@ function OptOutCustomizervue_type_template_id_7ea00f35_render(_ctx, _cache, $pro onChange: _cache[3] || (_cache[3] = function ($event) { return _ctx.onBgColorChange($event); }) - }, null, 40, OptOutCustomizervue_type_template_id_7ea00f35_hoisted_4)]), 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('PrivacyManager_FontSize')) + ": ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 40, OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_4)]), 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('PrivacyManager_FontSize')) + ": ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { id: "FontSizeInput", type: "number", min: "1", @@ -883,7 +883,7 @@ function OptOutCustomizervue_type_template_id_7ea00f35_render(_ctx, _cache, $pro onChange: _cache[7] || (_cache[7] = function ($event) { return _ctx.onFontSizeUnitChange($event); }) - }, OptOutCustomizervue_type_template_id_7ea00f35_hoisted_10, 32)]), 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('PrivacyManager_FontFamily')) + ": ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_10, 32)]), 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('PrivacyManager_FontFamily')) + ": ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { id: "FontFamilyInput", type: "text", onKeydown: _cache[8] || (_cache[8] = function ($event) { @@ -892,9 +892,9 @@ function OptOutCustomizervue_type_template_id_7ea00f35_render(_ctx, _cache, $pro onChange: _cache[9] || (_cache[9] = function ($event) { return _ctx.onFontFamilyChange($event); }) - }, null, 32)])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h3", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_OptOutHtmlCode')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("pre", OptOutCustomizervue_type_template_id_7ea00f35_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])("<iframe\n style=\"border: 0; height: 200px; width: 600px;\"\n src=\"" + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.iframeUrl) + "\"\n ></iframe>", 1)], 512), [[_directive_select_on_focus, {}]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { + }, null, 32)])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h3", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_OptOutHtmlCode')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("pre", OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])("<iframe\n style=\"border: 0; height: 200px; width: 600px;\"\n src=\"" + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.iframeUrl) + "\"\n ></iframe>", 1)], 512), [[_directive_select_on_focus, {}]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { innerHTML: _ctx.$sanitize(_ctx.optOutExplanationIntro) - }, null, 8, OptOutCustomizervue_type_template_id_7ea00f35_hoisted_12), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h3", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_OptOutPreview')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("iframe", { + }, null, 8, OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_12), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h3", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_OptOutPreview')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("iframe", { id: "previewIframe", style: { "border": "1px solid #333", @@ -905,9 +905,9 @@ function OptOutCustomizervue_type_template_id_7ea00f35_render(_ctx, _cache, $pro class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ withBg: _ctx.withBg }) - }, null, 10, OptOutCustomizervue_type_template_id_7ea00f35_hoisted_13)]); + }, null, 10, OptOutCustomizervue_type_template_id_5d0d1c62_hoisted_13)]); } -// CONCATENATED MODULE: ./plugins/PrivacyManager/vue/src/OptOutCustomizer/OptOutCustomizer.vue?vue&type=template&id=7ea00f35 +// CONCATENATED MODULE: ./plugins/PrivacyManager/vue/src/OptOutCustomizer/OptOutCustomizer.vue?vue&type=template&id=5d0d1c62 // 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/PrivacyManager/vue/src/OptOutCustomizer/OptOutCustomizer.vue?vue&type=script&lang=ts /* eslint-disable no-mixed-operators */ @@ -989,7 +989,7 @@ var _window = window, return ''; }, withBg: function withBg() { - return !!this.piwikurl && this.backgroundColor === '' && this.fontColor !== '' && nearlyWhite(this.fontColor.substr(1)); + return !!this.piwikurl && this.backgroundColor === '' && this.fontColor !== '' && nearlyWhite(this.fontColor.slice(1)); }, iframeUrl: function iframeUrl() { if (this.piwikurl) { @@ -997,8 +997,8 @@ var _window = window, module: 'CoreAdminHome', action: 'optOut', language: this.language, - backgroundColor: this.backgroundColor.substr(1), - fontColor: this.fontColor.substr(1), + backgroundColor: this.backgroundColor.slice(1), + fontColor: this.fontColor.slice(1), fontSize: this.fontSizeWithUnit, fontFamily: this.fontFamily }); @@ -1022,7 +1022,7 @@ var _window = window, -OptOutCustomizervue_type_script_lang_ts.render = OptOutCustomizervue_type_template_id_7ea00f35_render +OptOutCustomizervue_type_script_lang_ts.render = OptOutCustomizervue_type_template_id_5d0d1c62_render /* harmony default export */ var OptOutCustomizer = (OptOutCustomizervue_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/PrivacyManager/vue/src/AnonymizeLogData/AnonymizeLogData.vue?vue&type=template&id=bdf32a0e diff --git a/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.min.js b/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.min.js index f1bbfdd848..9794a3ddfd 100644 --- a/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.min.js +++ b/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.min.js @@ -1,4 +1,4 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin"),require("SegmentEditor")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin","SegmentEditor"],t):"object"===typeof exports?exports["PrivacyManager"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin"),require("SegmentEditor")):e["PrivacyManager"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"],e["SegmentEditor"])})("undefined"!==typeof self?self:this,(function(e,t,n,a){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},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 a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},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/PrivacyManager/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},f06f:function(e,t){e.exports=a},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"ManageGdpr",(function(){return ne})),n.d(t,"AnonymizeIp",(function(){return pe})),n.d(t,"OptOutCustomizer",(function(){return _e})),n.d(t,"AnonymizeLogData",(function(){return vt})),n.d(t,"DoNotTrackPreference",(function(){return jt})),n.d(t,"ReportDeletionSettings",(function(){return Nt})),n.d(t,"DeleteOldLogs",(function(){return It})),n.d(t,"DeleteOldReports",(function(){return Wt})),n.d(t,"ScheduleReportDeletion",(function(){return mn})),"undefined"!==typeof window){var a=window.document.currentScript,o=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var i=n("8bbf"),l={class:"manageGdpr"},r={class:"intro"},c=Object(i["createElementVNode"])("br",null,null,-1),s=Object(i["createElementVNode"])("br",null,null,-1),d=Object(i["createElementVNode"])("br",null,null,-1),u=Object(i["createElementVNode"])("br",null,null,-1),m=["innerHTML"],b={class:"form-group row"},p={class:"col s12 input-field"},g={for:"gdprsite",class:"siteSelectorLabel"},v={class:"sites_autocomplete"},h={class:"form-group row segmentFilterGroup"},O={class:"col s12"},j={style:{margin:"8px 0",display:"inline-block"}},f=Object(i["createElementVNode"])("br",null,null,-1),y=Object(i["createTextVNode"])(),V=Object(i["createElementVNode"])("br",null,null,-1),S=Object(i["createElementVNode"])("br",null,null,-1),D=Object(i["createElementVNode"])("br",null,null,-1),N={class:"checkInclude"},E={colspan:"8"},C=["title"],k={class:"checkInclude"},_=["title"],P={class:"visitId"},w={class:"visitorId"},M=["title","onClick"],A={class:"visitorIp"},z=["title","onClick"],I={class:"userId"},F=["title","onClick"],T=["title"],x=["src"],L=["title"],B=["src"],U=["title"],R=["src"],H=["title"],G=["src"],q=["onClick"],K=Object(i["createElementVNode"])("img",{src:"plugins/Live/images/visitorProfileLaunch.png",style:{"margin-right":"3.5px"}},null,-1),W={class:"ui-confirm",id:"confirmDeleteDataSubject",ref:"confirmDeleteDataSubject"},Y=["value"],J=["value"];function Q(e,t,n,a,o,$){var Q=Object(i["resolveComponent"])("SiteSelector"),X=Object(i["resolveComponent"])("SegmentGenerator"),Z=Object(i["resolveComponent"])("SaveButton"),ee=Object(i["resolveComponent"])("ContentBlock"),te=Object(i["resolveComponent"])("Field"),ne=Object(i["resolveDirective"])("content-table");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",l,[Object(i["createVNode"])(ee,{"content-title":e.translate("PrivacyManager_GdprTools")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",r,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntro1"))+" ",1),c,s,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntro2"))+" ",1),d]),Object(i["createElementVNode"])("ol",null,[Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntroAccessRight")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntroEraseRight")),1)]),Object(i["createElementVNode"])("p",null,[u,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.overviewHintText)},null,8,m)])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_SearchForDataSubject")),1),Object(i["createElementVNode"])("div",b,[Object(i["createElementVNode"])("div",p,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",g,Object(i["toDisplayString"])(e.translate("PrivacyManager_SelectWebsite")),1),Object(i["createElementVNode"])("div",v,[Object(i["createVNode"])(Q,{id:"gdprsite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),"show-all-sites-item":!0,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(i["createElementVNode"])("div",h,[Object(i["createElementVNode"])("div",O,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",j,Object(i["toDisplayString"])(e.translate("PrivacyManager_FindDataSubjectsBy")),1),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(X,{modelValue:e.segment_filter,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.segment_filter=t}),"visit-segments-only":!0,idsite:e.site.id},null,8,["modelValue","idsite"])])])])]),Object(i["createVNode"])(Z,{class:"findDataSubjects",value:e.translate("PrivacyManager_FindMatchingDataSubjects"),onConfirm:t[2]||(t[2]=function(t){return e.findDataSubjects()}),disabled:!e.segment_filter,saving:e.isLoading},null,8,["value","disabled","saving"])]})),_:1},8,["content-title"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_NoDataSubjectsFound")),1)],512),[[i["vShow"],!e.dataSubjects.length&&e.hasSearched]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_MatchingDataSubjects")),1),Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_VisitsMatchedCriteria"))+" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_ExportingNote"))+" ",1),f,y,V,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_DeletionFromMatomoOnly"))+" ",1),S,D,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_ResultIncludesAllVisits")),1)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("table",null,[Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",N,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(te,{uicontrol:"checkbox",name:"activateAll","model-value":e.toggleAll,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.toggleAll=t,e.toggleActivateAll()}),"full-width":!0},null,8,["model-value"])])]),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Website")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_VisitId")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_VisitorID")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_VisitorIP")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_UserId")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Details")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Action")),513),[[i["vShow"],e.profileEnabled]])])]),Object(i["createElementVNode"])("tbody",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",E,Object(i["toDisplayString"])(e.translate("PrivacyManager_ResultTruncated","400")),1)],512),[[i["vShow"],e.dataSubjects.length>400]]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.dataSubjects,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{title:"".concat(e.translate("PrivacyManager_LastAction"),": ").concat(t.lastActionDateTime),key:n},[Object(i["createElementVNode"])("td",k,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(te,{uicontrol:"checkbox",name:"subject".concat(t.idVisit),modelValue:e.dataSubjectsActive[n],"onUpdate:modelValue":function(t){return e.dataSubjectsActive[n]=t},"full-width":!0},null,8,["name","modelValue","onUpdate:modelValue"])])]),Object(i["createElementVNode"])("td",{class:"site",title:"(".concat(e.translate("General_Id")," ").concat(t.idSite,")")},Object(i["toDisplayString"])(t.siteName),9,_),Object(i["createElementVNode"])("td",P,Object(i["toDisplayString"])(t.idVisit),1),Object(i["createElementVNode"])("td",w,[Object(i["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddVisitorIdToSearch"),onClick:function(n){return e.addFilter("visitorId",t.visitorId)}},Object(i["toDisplayString"])(t.visitorId),9,M)]),Object(i["createElementVNode"])("td",A,[Object(i["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddVisitorIPToSearch"),onClick:function(n){return e.addFilter("visitIp",t.visitIp)}},Object(i["toDisplayString"])(t.visitIp),9,z)]),Object(i["createElementVNode"])("td",I,[Object(i["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddUserIdToSearch"),onClick:function(n){return e.addFilter("userId",t.userId)}},Object(i["toDisplayString"])(t.userId),9,F)]),Object(i["createElementVNode"])("td",null,[Object(i["createElementVNode"])("span",{title:"".concat(t.deviceType," ").concat(t.deviceModel),style:{"margin-right":"3.5px"}},[Object(i["createElementVNode"])("img",{height:"16",src:t.deviceTypeIcon},null,8,x)],8,T),Object(i["createElementVNode"])("span",{title:t.operatingSystem,style:{"margin-right":"3.5px"}},[Object(i["createElementVNode"])("img",{height:"16",src:t.operatingSystemIcon},null,8,B)],8,L),Object(i["createElementVNode"])("span",{title:"".concat(t.browser," ").concat(t.browserFamilyDescription),style:{"margin-right":"3.5px"}},[Object(i["createElementVNode"])("img",{height:"16",src:t.browserIcon},null,8,R)],8,U),Object(i["createElementVNode"])("span",{title:"".concat(t.country," ").concat(t.region||"")},[Object(i["createElementVNode"])("img",{height:"16",src:t.countryFlag},null,8,G)],8,H)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("td",null,[Object(i["createElementVNode"])("a",{class:"visitorLogTooltip",title:"View visitor profile",onClick:function(n){return e.showProfile(t.visitorId,t.idSite)}},[K,Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("Live_ViewVisitorProfile")),1)],8,q)],512),[[i["vShow"],e.profileEnabled]])],8,C)})),128))])],512),[[ne]]),Object(i["createVNode"])(Z,{class:"exportDataSubjects",style:{"margin-right":"3.5px"},onConfirm:t[4]||(t[4]=function(t){return e.exportDataSubject()}),disabled:!e.hasActiveDataSubjects,value:e.translate("PrivacyManager_ExportSelectedVisits")},null,8,["disabled","value"]),Object(i["createVNode"])(Z,{class:"deleteDataSubjects",onConfirm:t[5]||(t[5]=function(t){return e.deleteDataSubject()}),disabled:!e.hasActiveDataSubjects||e.isDeleting,value:e.translate("PrivacyManager_DeleteSelectedVisits")},null,8,["disabled","value"])],512),[[i["vShow"],e.dataSubjects.length]]),Object(i["createElementVNode"])("div",W,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteVisitsConfirm")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Y),Object(i["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,J)],512)])}var X=n("19dc"),Z=n("f06f"),ee=n("a5a2"),te=Object(i["defineComponent"])({components:{ContentBlock:X["ContentBlock"],SiteSelector:X["SiteSelector"],SegmentGenerator:Z["SegmentGenerator"],SaveButton:ee["SaveButton"],Field:ee["Field"]},directives:{ContentTable:X["ContentTable"]},data:function(){return{isLoading:!1,isDeleting:!1,site:{id:"all",name:Object(X["translate"])("UsersManager_AllWebsites")},segment_filter:"userId==",dataSubjects:[],toggleAll:!0,hasSearched:!1,profileEnabled:X["Matomo"].visitorProfileEnabled,dataSubjectsActive:[]}},setup:function(){var e=X["AjaxHelper"].fetch({method:"SitesManager.getSitesIdWithAdminAccess",filter_limit:"-1"});return{getSites:function(){return e}}},methods:{showSuccessNotification:function(e){var t=X["NotificationsStore"].show({message:e,context:"success",id:"manageGdpr",type:"transient"});setTimeout((function(){X["NotificationsStore"].scrollToNotification(t)}),200)},linkTo:function(e){return"?".concat(X["MatomoUrl"].stringify(Object.assign(Object.assign({},X["MatomoUrl"].urlParsed.value),{},{module:"PrivacyManager",action:e})))},toggleActivateAll:function(){this.dataSubjectsActive.fill(this.toggleAll)},showProfile:function(e,t){X["Matomo"].helper.showVisitorProfilePopup(e,t)},exportDataSubject:function(){var e=this,t=this.activatedDataSubjects;X["AjaxHelper"].post({module:"API",method:"PrivacyManager.exportDataSubjects",format:"json",filter_limit:-1},{visits:t}).then((function(t){e.showSuccessNotification(Object(X["translate"])("PrivacyManager_VisitsSuccessfullyExported")),X["Matomo"].helper.sendContentAsDownload("exported_data_subjects.json",JSON.stringify(t))}))},deleteDataSubject:function(){var e=this;X["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteDataSubject,{yes:function(){e.isDeleting=!0;var t=e.activatedDataSubjects;X["AjaxHelper"].post({module:"API",method:"PrivacyManager.deleteDataSubjects",filter_limit:-1},{visits:t}).then((function(){e.dataSubjects=[],e.showSuccessNotification(Object(X["translate"])("PrivacyManager_VisitsSuccessfullyDeleted")),e.findDataSubjects()})).finally((function(){e.isDeleting=!1}))}})},addFilter:function(e,t){this.segment_filter+=",".concat(e,"==").concat(t),this.findDataSubjects()},findDataSubjects:function(){var e=this;this.dataSubjects=[],this.dataSubjectsActive=[],this.isLoading=!0,this.toggleAll=!0,this.hasSearched=!1,this.getSites().then((function(t){var n=e.site.id;"all"!==n||X["Matomo"].hasSuperUserAccess||(n=t,Array.isArray(t)&&(n=t.join(","))),X["AjaxHelper"].fetch({idSite:n,module:"API",method:"PrivacyManager.findDataSubjects",segment:e.segment_filter}).then((function(t){e.hasSearched=!0,e.dataSubjectsActive=t.map((function(){return!0})),e.dataSubjects=t})).finally((function(){e.isLoading=!1}))}))}},computed:{hasActiveDataSubjects:function(){return!!this.activatedDataSubjects.length},activatedDataSubjects:function(){var e=this;return this.dataSubjects.filter((function(t,n){return e.dataSubjectsActive[n]})).map((function(e){return{idsite:e.idSite,idvisit:e.idVisit}}))},overviewHintText:function(){return Object(X["translate"])("PrivacyManager_GdprToolsOverviewHint",'<a href="'.concat(this.linkTo("gdprOverview"),'">'),"</a>")}}});te.render=Q;var ne=te,ae=Object(i["createElementVNode"])("br",null,null,-1),oe=Object(i["createElementVNode"])("br",null,null,-1),ie=Object(i["createElementVNode"])("br",null,null,-1),le=Object(i["createElementVNode"])("br",null,null,-1),re={key:0},ce=Object(i["createElementVNode"])("br",null,null,-1),se=Object(i["createElementVNode"])("br",null,null,-1),de={class:"alert-warning alert"};function ue(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeIpSettings",title:e.translate("PrivacyManager_UseAnonymizeIp"),modelValue:e.actualEnabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.actualEnabled=t}),"inline-help":e.anonymizeIpEnabledHelp},null,8,["title","modelValue","inline-help"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"radio",name:"maskLength",title:e.translate("PrivacyManager_AnonymizeIpMaskLengtDescription"),modelValue:e.actualMaskLength,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.actualMaskLength=t}),options:e.maskLengthOptions,"inline-help":e.translate("PrivacyManager_GeolocationAnonymizeIpNote")},null,8,["title","modelValue","options","inline-help"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"radio",name:"useAnonymizedIpForVisitEnrichment",title:e.translate("PrivacyManager_UseAnonymizedIpForVisitEnrichment"),modelValue:e.actualUseAnonymizedIpForVisitEnrichment,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.actualUseAnonymizedIpForVisitEnrichment=t}),options:e.useAnonymizedIpForVisitEnrichmentOptions,"inline-help":e.translate("PrivacyManager_UseAnonymizedIpForVisitEnrichmentNote")},null,8,["title","modelValue","options","inline-help"])])],512),[[i["vShow"],e.actualEnabled]]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeUserId",title:e.translate("PrivacyManager_PseudonymizeUserId"),modelValue:e.actualAnonymizeUserId,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.actualAnonymizeUserId=t})},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_PseudonymizeUserIdNote"))+" ",1),ae,oe,Object(i["createElementVNode"])("em",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_PseudonymizeUserIdNote2")),1)]})),_:1},8,["title","modelValue"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeOrderId",title:e.translate("PrivacyManager_UseAnonymizeOrderId"),modelValue:e.actualAnonymizeOrderId,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.actualAnonymizeOrderId=t}),"inline-help":e.translate("PrivacyManager_AnonymizeOrderIdNote")},null,8,["title","modelValue","inline-help"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"forceCookielessTracking",title:e.translate("PrivacyManager_ForceCookielessTracking"),modelValue:e.actualForceCookielessTracking,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.actualForceCookielessTracking=t})},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescription",e.trackerFileName))+" ",1),ie,le,Object(i["createElementVNode"])("em",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescription2")),1),e.trackerWritable?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",re,[ce,se,Object(i["createElementVNode"])("p",de,Object(i["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescriptionNotWritable",e.trackerFileName)),1)]))]})),_:1},8,["title","modelValue"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"select",name:"anonymizeReferrer",title:e.translate("PrivacyManager_AnonymizeReferrer"),modelValue:e.actualAnonymizeReferrer,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.actualAnonymizeReferrer=t}),options:e.referrerAnonymizationOptions,"inline-help":e.translate("PrivacyManager_AnonymizeReferrerNote")},null,8,["title","modelValue","options","inline-help"])]),Object(i["createVNode"])(c,{onConfirm:t[7]||(t[7]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}function me(e){return!0===e||1===e||"1"===e?1:0}var be=Object(i["defineComponent"])({props:{anonymizeIpEnabled:Boolean,anonymizeUserId:Boolean,maskLength:{type:Number,required:!0},useAnonymizedIpForVisitEnrichment:[Boolean,String,Number],anonymizeOrderId:Boolean,forceCookielessTracking:Boolean,anonymizeReferrer:String,maskLengthOptions:{type:Array,required:!0},useAnonymizedIpForVisitEnrichmentOptions:{type:Array,required:!0},trackerFileName:{type:String,required:!0},trackerWritable:{type:Boolean,required:!0},referrerAnonymizationOptions:{type:Object,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,actualEnabled:this.anonymizeIpEnabled,actualMaskLength:this.maskLength,actualUseAnonymizedIpForVisitEnrichment:me(this.useAnonymizedIpForVisitEnrichment),actualAnonymizeUserId:!!this.anonymizeUserId,actualAnonymizeOrderId:!!this.anonymizeOrderId,actualForceCookielessTracking:!!this.forceCookielessTracking,actualAnonymizeReferrer:this.anonymizeReferrer}},methods:{save:function(){var e=this;this.isLoading=!0,X["AjaxHelper"].post({module:"API",method:"PrivacyManager.setAnonymizeIpSettings"},{anonymizeIPEnable:this.actualEnabled?"1":"0",anonymizeUserId:this.actualAnonymizeUserId?"1":"0",anonymizeOrderId:this.actualAnonymizeOrderId?"1":"0",forceCookielessTracking:this.actualForceCookielessTracking?"1":"0",anonymizeReferrer:this.actualAnonymizeReferrer?this.actualAnonymizeReferrer:"",maskLength:this.actualMaskLength,useAnonymizedIpForVisitEnrichment:this.actualUseAnonymizedIpForVisitEnrichment}).then((function(){var e=X["NotificationsStore"].show({message:Object(X["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"toast"});X["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.isLoading=!1}))}},computed:{anonymizeIpEnabledHelp:function(){var e=Object(X["translate"])("PrivacyManager_AnonymizeIpInlineHelp"),t=Object(X["translate"])("PrivacyManager_AnonymizeIpDescription");return"".concat(e," ").concat(t)}}});be.render=ue;var pe=be,ge={class:"optOutCustomizer"},ve=["innerHTML"],he=["value"],Oe=["value"],je=Object(i["createStaticVNode"])('<option value="px">px</option><option value="pt">pt</option><option value="em">em</option><option value="rem">rem</option><option value="%">%</option>',5),fe=[je],ye={ref:"pre"},Ve=["innerHTML"],Se=["src"];function De(e,t,n,a,o,l){var r=Object(i["resolveDirective"])("select-on-focus");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ge,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_OptOutExplanation"))+" ",1),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.readThisToLearnMore)},null,8,ve)]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutCustomize")),1),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_FontColor"))+": ",1),Object(i["createElementVNode"])("input",{type:"color",value:e.fontColor,onKeydown:t[0]||(t[0]=function(t){return e.onFontColorChange(t)}),onChange:t[1]||(t[1]=function(t){return e.onFontColorChange(t)})},null,40,he)]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_BackgroundColor"))+": ",1),Object(i["createElementVNode"])("input",{type:"color",value:e.backgroundColor,onKeydown:t[2]||(t[2]=function(t){return e.onBgColorChange(t)}),onChange:t[3]||(t[3]=function(t){return e.onBgColorChange(t)})},null,40,Oe)]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_FontSize"))+": ",1),Object(i["createElementVNode"])("input",{id:"FontSizeInput",type:"number",min:"1",max:"100",onKeydown:t[4]||(t[4]=function(t){return e.onFontSizeChange(t)}),onChange:t[5]||(t[5]=function(t){return e.onFontSizeChange(t)})},null,32)]),Object(i["createElementVNode"])("span",null,[Object(i["createElementVNode"])("select",{class:"browser-default",onKeydown:t[6]||(t[6]=function(t){return e.onFontSizeUnitChange(t)}),onChange:t[7]||(t[7]=function(t){return e.onFontSizeUnitChange(t)})},fe,32)]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_FontFamily"))+": ",1),Object(i["createElementVNode"])("input",{id:"FontFamilyInput",type:"text",onKeydown:t[8]||(t[8]=function(t){return e.onFontFamilyChange(t)}),onChange:t[9]||(t[9]=function(t){return e.onFontFamilyChange(t)})},null,32)])])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutHtmlCode")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("pre",ye,[Object(i["createTextVNode"])('<iframe\n style="border: 0; height: 200px; width: 600px;"\n src="'+Object(i["toDisplayString"])(e.iframeUrl)+'"\n ></iframe>',1)],512),[[r,{}]]),Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.optOutExplanationIntro)},null,8,Ve),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutPreview")),1),Object(i["createElementVNode"])("iframe",{id:"previewIframe",style:{border:"1px solid #333",height:"200px",width:"600px"},src:e.iframeUrl,class:Object(i["normalizeClass"])({withBg:e.withBg})},null,10,Se)])}function Ne(e){var t=parseInt(e,16),n=t>>16&255,a=t>>8&255,o=255&t;return n>=225&&a>=225&&o>=225}var Ee=window,Ce=Ee.$,ke=Object(i["defineComponent"])({props:{language:{type:String,required:!0},piwikurl:String},directives:{SelectOnFocus:X["SelectOnFocus"]},data:function(){return{fontSizeUnit:"px",backgroundColor:"",fontColor:"",fontSize:"",fontFamily:""}},created:function(){this.onFontColorChange=Object(X["debounce"])(this.onFontColorChange,50),this.onBgColorChange=Object(X["debounce"])(this.onBgColorChange,50),this.onFontSizeChange=Object(X["debounce"])(this.onFontSizeChange,50),this.onFontSizeUnitChange=Object(X["debounce"])(this.onFontSizeUnitChange,50),this.onFontFamilyChange=Object(X["debounce"])(this.onFontFamilyChange,50)},methods:{onFontColorChange:function(e){this.fontColor=e.target.value},onBgColorChange:function(e){this.backgroundColor=e.target.value},onFontSizeChange:function(e){this.fontSize=e.target.value},onFontSizeUnitChange:function(e){this.fontSizeUnit=e.target.value},onFontFamilyChange:function(e){this.fontFamily=e.target.value}},watch:{iframeUrl:function(){var e=this.$refs.pre,t=Ce(e).queue("fx").length>0;t||Ce(e).effect("highlight",{},1500)}},computed:{fontSizeWithUnit:function(){return this.fontSize?"".concat(this.fontSize).concat(this.fontSizeUnit):""},withBg:function(){return!!this.piwikurl&&""===this.backgroundColor&&""!==this.fontColor&&Ne(this.fontColor.substr(1))},iframeUrl:function(){if(this.piwikurl){var e=X["MatomoUrl"].stringify({module:"CoreAdminHome",action:"optOut",language:this.language,backgroundColor:this.backgroundColor.substr(1),fontColor:this.fontColor.substr(1),fontSize:this.fontSizeWithUnit,fontFamily:this.fontFamily});return"".concat(this.piwikurl,"index.php?").concat(e)}return""},readThisToLearnMore:function(){var e="https://matomo.org/faq/how-to/faq_25918/";return Object(X["translate"])("General_ReadThisToLearnMore","<a rel='noreferrer noopener' target='_blank' href='".concat(e,"'>"),"</a>")},optOutExplanationIntro:function(){return Object(X["translate"])("CoreAdminHome_OptOutExplanationIntro",'<a href="'.concat(this.iframeUrl,'" rel="noreferrer noopener" target="_blank">'),"</a>")}}});ke.render=De;var _e=ke,Pe={class:"anonymizeLogData"},we={class:"form-group row"},Me={class:"col s12 input-field"},Ae={for:"anonymizeSite",class:"siteSelectorLabel"},ze={class:"sites_autocomplete"},Ie={class:"form-group row"},Fe={class:"col s6 input-field"},Te={for:"anonymizeStartDate",class:"active"},xe=["value"],Le={class:"col s6 input-field"},Be={for:"anonymizeEndDate",class:"active"},Ue=["value"],Re={name:"anonymizeIp"},He={name:"anonymizeLocation"},Ge={name:"anonymizeTheUserId"},qe={class:"form-group row"},Ke={class:"col s12 m6"},We={for:"visit_columns"},$e={class:"innerFormField",name:"visit_columns"},Ye=["onClick","title"],Je={class:"col s12 m6"},Qe={class:"form-help"},Xe={class:"inline-help"},Ze={class:"form-group row"},et={class:"col s12"},tt={class:"form-group row"},nt={class:"col s12 m6"},at={for:"action_columns"},ot={class:"innerFormField",name:"action_columns"},it=["onClick","title"],lt={class:"col s12 m6"},rt={class:"form-help"},ct={class:"inline-help"},st=Object(i["createElementVNode"])("span",{class:"icon-info"},null,-1),dt={class:"ui-confirm",id:"confirmAnonymizeLogData",ref:"confirmAnonymizeLogData"},ut=["value"],mt=["value"];function bt(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("SiteSelector"),c=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("SaveButton");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Pe,[Object(i["createElementVNode"])("div",we,[Object(i["createElementVNode"])("div",Me,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",Ae,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeSites")),1),Object(i["createElementVNode"])("div",ze,[Object(i["createVNode"])(r,{id:"anonymizeSite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),"show-all-sites-item":!0,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(i["createElementVNode"])("div",Ie,[Object(i["createElementVNode"])("div",Fe,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",Te,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeRowDataFrom")),1),Object(i["createElementVNode"])("input",{type:"text",id:"anonymizeStartDate",class:"anonymizeStartDate",ref:"anonymizeStartDate",name:"anonymizeStartDate",value:e.startDate,onKeydown:t[1]||(t[1]=function(t){return e.onKeydownStartDate(t)}),onChange:t[2]||(t[2]=function(t){return e.onKeydownStartDate(t)})},null,40,xe)])]),Object(i["createElementVNode"])("div",Le,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",Be,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeRowDataTo")),1),Object(i["createElementVNode"])("input",{type:"text",class:"anonymizeEndDate",id:"anonymizeEndDate",ref:"anonymizeEndDate",name:"anonymizeEndDate",value:e.endDate,onKeydown:t[3]||(t[3]=function(t){return e.onKeydownEndDate(t)}),onChange:t[4]||(t[4]=function(t){return e.onKeydownEndDate(t)})},null,40,Ue)])])]),Object(i["createElementVNode"])("div",Re,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeIp",title:e.translate("PrivacyManager_AnonymizeIp"),modelValue:e.anonymizeIp,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.anonymizeIp=t}),introduction:e.translate("General_Visit"),"inline-help":e.translate("PrivacyManager_AnonymizeIpHelp")},null,8,["title","modelValue","introduction","inline-help"])]),Object(i["createElementVNode"])("div",He,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeLocation",title:e.translate("PrivacyManager_AnonymizeLocation"),modelValue:e.anonymizeLocation,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.anonymizeLocation=t}),"inline-help":e.translate("PrivacyManager_AnonymizeLocationHelp")},null,8,["title","modelValue","inline-help"])]),Object(i["createElementVNode"])("div",Ge,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeTheUserId",title:e.translate("PrivacyManager_AnonymizeUserId"),modelValue:e.anonymizeUserId,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.anonymizeUserId=t}),"inline-help":e.translate("PrivacyManager_AnonymizeUserIdHelp")},null,8,["title","modelValue","inline-help"])]),Object(i["createElementVNode"])("div",qe,[Object(i["createElementVNode"])("div",Ke,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",We,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetVisitColumns")),1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.selectedVisitColumns,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])("selectedVisitColumns selectedVisitColumns".concat(n," multiple valign-wrapper")),key:n},[Object(i["createElementVNode"])("div",$e,[Object(i["createVNode"])(c,{uicontrol:"select",name:"visit_columns","model-value":t.column,"onUpdate:modelValue":function(n){t.column=n,e.onVisitColumnChange()},"full-width":!0,options:e.availableVisitColumns},null,8,["model-value","onUpdate:modelValue","options"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{class:"icon-minus valign",onClick:function(t){return e.removeVisitColumn(n)},title:e.translate("General_Remove")},null,8,Ye),[[i["vShow"],n+1!==e.selectedVisitColumns.length]])],2)})),128))])]),Object(i["createElementVNode"])("div",Je,[Object(i["createElementVNode"])("div",Qe,[Object(i["createElementVNode"])("span",Xe,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetVisitColumnsHelp")),1)])])]),Object(i["createElementVNode"])("div",Ze,[Object(i["createElementVNode"])("div",et,[Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("General_Action")),1)])]),Object(i["createElementVNode"])("div",tt,[Object(i["createElementVNode"])("div",nt,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",at,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetActionColumns")),1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.selectedActionColumns,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])("selectedActionColumns selectedActionColumns".concat(n," multiple valign-wrapper")),key:n},[Object(i["createElementVNode"])("div",ot,[Object(i["createVNode"])(c,{uicontrol:"select",name:"action_columns","model-value":t.column,"onUpdate:modelValue":function(n){t.column=n,e.onActionColumnChange()},"full-width":!0,options:e.availableActionColumns},null,8,["model-value","onUpdate:modelValue","options"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{class:"icon-minus valign",onClick:function(t){return e.removeActionColumn(n)},title:e.translate("General_Remove")},null,8,it),[[i["vShow"],n+1!==e.selectedActionColumns.length]])],2)})),128))])]),Object(i["createElementVNode"])("div",lt,[Object(i["createElementVNode"])("div",rt,[Object(i["createElementVNode"])("span",ct,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetActionColumnsHelp")),1)])])]),Object(i["createElementVNode"])("p",null,[st,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeProcessInfo")),1)]),Object(i["createVNode"])(s,{class:"anonymizePastData",onConfirm:t[8]||(t[8]=function(t){return e.scheduleAnonymization()}),disabled:e.isAnonymizePastDataDisabled,value:e.translate("PrivacyManager_AnonymizeDataNow")},null,8,["disabled","value"]),Object(i["createElementVNode"])("div",dt,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeDataConfirm")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,ut),Object(i["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,mt)],512)])}function pt(e){return e<10?"0".concat(e):e}var gt=Object(i["defineComponent"])({components:{SiteSelector:X["SiteSelector"],Field:ee["Field"],SaveButton:ee["SaveButton"]},data:function(){var e=new Date,t="".concat(e.getFullYear(),"-").concat(pt(e.getMonth()+1),"-").concat(pt(e.getDay()+1));return{isLoading:!1,isDeleting:!1,anonymizeIp:!1,anonymizeLocation:!1,anonymizeUserId:!1,site:{id:"all",name:"All Websites"},availableVisitColumns:[],availableActionColumns:[],selectedVisitColumns:[{column:""}],selectedActionColumns:[{column:""}],startDate:t,endDate:t}},created:function(){var e=this;this.onKeydownStartDate=Object(X["debounce"])(this.onKeydownStartDate,50),this.onKeydownEndDate=Object(X["debounce"])(this.onKeydownEndDate,50),X["AjaxHelper"].fetch({method:"PrivacyManager.getAvailableVisitColumnsToAnonymize"}).then((function(t){e.availableVisitColumns=[],t.forEach((function(t){e.availableVisitColumns.push({key:t.column_name,value:t.column_name})}))})),X["AjaxHelper"].fetch({method:"PrivacyManager.getAvailableLinkVisitActionColumnsToAnonymize"}).then((function(t){e.availableActionColumns=[],t.forEach((function(t){e.availableActionColumns.push({key:t.column_name,value:t.column_name})}))})),setTimeout((function(){var t=X["Matomo"].getBaseDatePickerOptions(null),n=X["Matomo"].getBaseDatePickerOptions(null);$(e.$refs.anonymizeStartDate).datepicker(t),$(e.$refs.anonymizeEndDate).datepicker(n)}))},methods:{onVisitColumnChange:function(){var e=this.selectedVisitColumns.every((function(e){return!(null===e||void 0===e||!e.column)}));e&&this.addVisitColumn()},addVisitColumn:function(){this.selectedVisitColumns.push({column:""})},removeVisitColumn:function(e){if(e>-1){var t=this.selectedVisitColumns.length-1;t===e?this.selectedVisitColumns[e]={column:""}:this.selectedVisitColumns.splice(e,1)}},onActionColumnChange:function(){var e=this.selectedActionColumns.every((function(e){return!(null===e||void 0===e||!e.column)}));e&&this.addActionColumn()},addActionColumn:function(){this.selectedActionColumns.push({column:""})},removeActionColumn:function(e){if(e>-1){var t=this.selectedActionColumns.length-1;t===e?this.selectedActionColumns[e]={column:""}:this.selectedActionColumns.splice(e,1)}},scheduleAnonymization:function(){var e="".concat(this.startDate,",").concat(this.endDate);this.startDate===this.endDate&&(e=this.startDate);var t={date:e};t.idSites=this.site.id,t.anonymizeIp=this.anonymizeIp?"1":"0",t.anonymizeLocation=this.anonymizeLocation?"1":"0",t.anonymizeUserId=this.anonymizeUserId?"1":"0",t.unsetVisitColumns=this.selectedVisitColumns.filter((function(e){return!(null===e||void 0===e||!e.column)})).map((function(e){return e.column})),t.unsetLinkVisitActionColumns=this.selectedActionColumns.filter((function(e){return!(null===e||void 0===e||!e.column)})).map((function(e){return e.column})),X["Matomo"].helper.modalConfirm(this.$refs.confirmAnonymizeLogData,{yes:function(){X["AjaxHelper"].post({method:"PrivacyManager.anonymizeSomeRawData"},t).then((function(){window.location.reload(!0)}))}})},onKeydownStartDate:function(e){this.startDate=e.target.value},onKeydownEndDate:function(e){this.endDate=e.target.value}},computed:{isAnonymizePastDataDisabled:function(){return!this.anonymizeIp&&!this.anonymizeLocation&&!this.selectedVisitColumns&&!this.selectedActionColumns}}});gt.render=bt;var vt=gt;function ht(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"radio",name:"doNotTrack",modelValue:e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.enabled=t}),options:e.doNotTrackOptions,"inline-help":e.translate("PrivacyManager_DoNotTrack_Description")},null,8,["modelValue","options","inline-help"])]),Object(i["createVNode"])(c,{onConfirm:t[1]||(t[1]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}var Ot=Object(i["defineComponent"])({props:{dntSupport:Boolean,doNotTrackOptions:{type:Array,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,enabled:this.dntSupport?1:0}},methods:{save:function(){var e=this;this.isLoading=!0;var t="deactivateDoNotTrack";this.enabled&&"0"!==this.enabled&&(t="activateDoNotTrack"),X["AjaxHelper"].post({module:"API",method:"PrivacyManager.".concat(t)}).then((function(){var e=X["NotificationsStore"].show({message:Object(X["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"transient"});X["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.isLoading=!1}))}}});Ot.render=ht;var jt=Ot;function ft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yt(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Vt(e,t,n){return t&&yt(e.prototype,t),n&&yt(e,n),e}function St(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin"),require("SegmentEditor")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin","SegmentEditor"],t):"object"===typeof exports?exports["PrivacyManager"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin"),require("SegmentEditor")):e["PrivacyManager"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"],e["SegmentEditor"])})("undefined"!==typeof self?self:this,(function(e,t,n,a){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},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 a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},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/PrivacyManager/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},f06f:function(e,t){e.exports=a},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"ManageGdpr",(function(){return ne})),n.d(t,"AnonymizeIp",(function(){return pe})),n.d(t,"OptOutCustomizer",(function(){return _e})),n.d(t,"AnonymizeLogData",(function(){return vt})),n.d(t,"DoNotTrackPreference",(function(){return jt})),n.d(t,"ReportDeletionSettings",(function(){return Nt})),n.d(t,"DeleteOldLogs",(function(){return It})),n.d(t,"DeleteOldReports",(function(){return Wt})),n.d(t,"ScheduleReportDeletion",(function(){return mn})),"undefined"!==typeof window){var a=window.document.currentScript,o=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var i=n("8bbf"),l={class:"manageGdpr"},r={class:"intro"},c=Object(i["createElementVNode"])("br",null,null,-1),s=Object(i["createElementVNode"])("br",null,null,-1),d=Object(i["createElementVNode"])("br",null,null,-1),u=Object(i["createElementVNode"])("br",null,null,-1),m=["innerHTML"],b={class:"form-group row"},p={class:"col s12 input-field"},g={for:"gdprsite",class:"siteSelectorLabel"},v={class:"sites_autocomplete"},h={class:"form-group row segmentFilterGroup"},O={class:"col s12"},j={style:{margin:"8px 0",display:"inline-block"}},f=Object(i["createElementVNode"])("br",null,null,-1),y=Object(i["createTextVNode"])(),V=Object(i["createElementVNode"])("br",null,null,-1),S=Object(i["createElementVNode"])("br",null,null,-1),D=Object(i["createElementVNode"])("br",null,null,-1),N={class:"checkInclude"},E={colspan:"8"},C=["title"],k={class:"checkInclude"},_=["title"],P={class:"visitId"},w={class:"visitorId"},M=["title","onClick"],A={class:"visitorIp"},z=["title","onClick"],I={class:"userId"},F=["title","onClick"],T=["title"],x=["src"],L=["title"],B=["src"],U=["title"],R=["src"],H=["title"],G=["src"],q=["onClick"],K=Object(i["createElementVNode"])("img",{src:"plugins/Live/images/visitorProfileLaunch.png",style:{"margin-right":"3.5px"}},null,-1),W={class:"ui-confirm",id:"confirmDeleteDataSubject",ref:"confirmDeleteDataSubject"},Y=["value"],J=["value"];function Q(e,t,n,a,o,$){var Q=Object(i["resolveComponent"])("SiteSelector"),X=Object(i["resolveComponent"])("SegmentGenerator"),Z=Object(i["resolveComponent"])("SaveButton"),ee=Object(i["resolveComponent"])("ContentBlock"),te=Object(i["resolveComponent"])("Field"),ne=Object(i["resolveDirective"])("content-table");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",l,[Object(i["createVNode"])(ee,{"content-title":e.translate("PrivacyManager_GdprTools")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",r,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntro1"))+" ",1),c,s,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntro2"))+" ",1),d]),Object(i["createElementVNode"])("ol",null,[Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntroAccessRight")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntroEraseRight")),1)]),Object(i["createElementVNode"])("p",null,[u,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.overviewHintText)},null,8,m)])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_SearchForDataSubject")),1),Object(i["createElementVNode"])("div",b,[Object(i["createElementVNode"])("div",p,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",g,Object(i["toDisplayString"])(e.translate("PrivacyManager_SelectWebsite")),1),Object(i["createElementVNode"])("div",v,[Object(i["createVNode"])(Q,{id:"gdprsite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),"show-all-sites-item":!0,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(i["createElementVNode"])("div",h,[Object(i["createElementVNode"])("div",O,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",j,Object(i["toDisplayString"])(e.translate("PrivacyManager_FindDataSubjectsBy")),1),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(X,{modelValue:e.segment_filter,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.segment_filter=t}),"visit-segments-only":!0,idsite:e.site.id},null,8,["modelValue","idsite"])])])])]),Object(i["createVNode"])(Z,{class:"findDataSubjects",value:e.translate("PrivacyManager_FindMatchingDataSubjects"),onConfirm:t[2]||(t[2]=function(t){return e.findDataSubjects()}),disabled:!e.segment_filter,saving:e.isLoading},null,8,["value","disabled","saving"])]})),_:1},8,["content-title"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_NoDataSubjectsFound")),1)],512),[[i["vShow"],!e.dataSubjects.length&&e.hasSearched]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_MatchingDataSubjects")),1),Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_VisitsMatchedCriteria"))+" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_ExportingNote"))+" ",1),f,y,V,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_DeletionFromMatomoOnly"))+" ",1),S,D,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_ResultIncludesAllVisits")),1)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("table",null,[Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",N,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(te,{uicontrol:"checkbox",name:"activateAll","model-value":e.toggleAll,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.toggleAll=t,e.toggleActivateAll()}),"full-width":!0},null,8,["model-value"])])]),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Website")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_VisitId")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_VisitorID")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_VisitorIP")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_UserId")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Details")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Action")),513),[[i["vShow"],e.profileEnabled]])])]),Object(i["createElementVNode"])("tbody",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",E,Object(i["toDisplayString"])(e.translate("PrivacyManager_ResultTruncated","400")),1)],512),[[i["vShow"],e.dataSubjects.length>400]]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.dataSubjects,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{title:"".concat(e.translate("PrivacyManager_LastAction"),": ").concat(t.lastActionDateTime),key:n},[Object(i["createElementVNode"])("td",k,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(te,{uicontrol:"checkbox",name:"subject".concat(t.idVisit),modelValue:e.dataSubjectsActive[n],"onUpdate:modelValue":function(t){return e.dataSubjectsActive[n]=t},"full-width":!0},null,8,["name","modelValue","onUpdate:modelValue"])])]),Object(i["createElementVNode"])("td",{class:"site",title:"(".concat(e.translate("General_Id")," ").concat(t.idSite,")")},Object(i["toDisplayString"])(t.siteName),9,_),Object(i["createElementVNode"])("td",P,Object(i["toDisplayString"])(t.idVisit),1),Object(i["createElementVNode"])("td",w,[Object(i["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddVisitorIdToSearch"),onClick:function(n){return e.addFilter("visitorId",t.visitorId)}},Object(i["toDisplayString"])(t.visitorId),9,M)]),Object(i["createElementVNode"])("td",A,[Object(i["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddVisitorIPToSearch"),onClick:function(n){return e.addFilter("visitIp",t.visitIp)}},Object(i["toDisplayString"])(t.visitIp),9,z)]),Object(i["createElementVNode"])("td",I,[Object(i["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddUserIdToSearch"),onClick:function(n){return e.addFilter("userId",t.userId)}},Object(i["toDisplayString"])(t.userId),9,F)]),Object(i["createElementVNode"])("td",null,[Object(i["createElementVNode"])("span",{title:"".concat(t.deviceType," ").concat(t.deviceModel),style:{"margin-right":"3.5px"}},[Object(i["createElementVNode"])("img",{height:"16",src:t.deviceTypeIcon},null,8,x)],8,T),Object(i["createElementVNode"])("span",{title:t.operatingSystem,style:{"margin-right":"3.5px"}},[Object(i["createElementVNode"])("img",{height:"16",src:t.operatingSystemIcon},null,8,B)],8,L),Object(i["createElementVNode"])("span",{title:"".concat(t.browser," ").concat(t.browserFamilyDescription),style:{"margin-right":"3.5px"}},[Object(i["createElementVNode"])("img",{height:"16",src:t.browserIcon},null,8,R)],8,U),Object(i["createElementVNode"])("span",{title:"".concat(t.country," ").concat(t.region||"")},[Object(i["createElementVNode"])("img",{height:"16",src:t.countryFlag},null,8,G)],8,H)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("td",null,[Object(i["createElementVNode"])("a",{class:"visitorLogTooltip",title:"View visitor profile",onClick:function(n){return e.showProfile(t.visitorId,t.idSite)}},[K,Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("Live_ViewVisitorProfile")),1)],8,q)],512),[[i["vShow"],e.profileEnabled]])],8,C)})),128))])],512),[[ne]]),Object(i["createVNode"])(Z,{class:"exportDataSubjects",style:{"margin-right":"3.5px"},onConfirm:t[4]||(t[4]=function(t){return e.exportDataSubject()}),disabled:!e.hasActiveDataSubjects,value:e.translate("PrivacyManager_ExportSelectedVisits")},null,8,["disabled","value"]),Object(i["createVNode"])(Z,{class:"deleteDataSubjects",onConfirm:t[5]||(t[5]=function(t){return e.deleteDataSubject()}),disabled:!e.hasActiveDataSubjects||e.isDeleting,value:e.translate("PrivacyManager_DeleteSelectedVisits")},null,8,["disabled","value"])],512),[[i["vShow"],e.dataSubjects.length]]),Object(i["createElementVNode"])("div",W,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteVisitsConfirm")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Y),Object(i["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,J)],512)])}var X=n("19dc"),Z=n("f06f"),ee=n("a5a2"),te=Object(i["defineComponent"])({components:{ContentBlock:X["ContentBlock"],SiteSelector:X["SiteSelector"],SegmentGenerator:Z["SegmentGenerator"],SaveButton:ee["SaveButton"],Field:ee["Field"]},directives:{ContentTable:X["ContentTable"]},data:function(){return{isLoading:!1,isDeleting:!1,site:{id:"all",name:Object(X["translate"])("UsersManager_AllWebsites")},segment_filter:"userId==",dataSubjects:[],toggleAll:!0,hasSearched:!1,profileEnabled:X["Matomo"].visitorProfileEnabled,dataSubjectsActive:[]}},setup:function(){var e=X["AjaxHelper"].fetch({method:"SitesManager.getSitesIdWithAdminAccess",filter_limit:"-1"});return{getSites:function(){return e}}},methods:{showSuccessNotification:function(e){var t=X["NotificationsStore"].show({message:e,context:"success",id:"manageGdpr",type:"transient"});setTimeout((function(){X["NotificationsStore"].scrollToNotification(t)}),200)},linkTo:function(e){return"?".concat(X["MatomoUrl"].stringify(Object.assign(Object.assign({},X["MatomoUrl"].urlParsed.value),{},{module:"PrivacyManager",action:e})))},toggleActivateAll:function(){this.dataSubjectsActive.fill(this.toggleAll)},showProfile:function(e,t){X["Matomo"].helper.showVisitorProfilePopup(e,t)},exportDataSubject:function(){var e=this,t=this.activatedDataSubjects;X["AjaxHelper"].post({module:"API",method:"PrivacyManager.exportDataSubjects",format:"json",filter_limit:-1},{visits:t}).then((function(t){e.showSuccessNotification(Object(X["translate"])("PrivacyManager_VisitsSuccessfullyExported")),X["Matomo"].helper.sendContentAsDownload("exported_data_subjects.json",JSON.stringify(t))}))},deleteDataSubject:function(){var e=this;X["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteDataSubject,{yes:function(){e.isDeleting=!0;var t=e.activatedDataSubjects;X["AjaxHelper"].post({module:"API",method:"PrivacyManager.deleteDataSubjects",filter_limit:-1},{visits:t}).then((function(){e.dataSubjects=[],e.showSuccessNotification(Object(X["translate"])("PrivacyManager_VisitsSuccessfullyDeleted")),e.findDataSubjects()})).finally((function(){e.isDeleting=!1}))}})},addFilter:function(e,t){this.segment_filter+=",".concat(e,"==").concat(t),this.findDataSubjects()},findDataSubjects:function(){var e=this;this.dataSubjects=[],this.dataSubjectsActive=[],this.isLoading=!0,this.toggleAll=!0,this.hasSearched=!1,this.getSites().then((function(t){var n=e.site.id;"all"!==n||X["Matomo"].hasSuperUserAccess||(n=t,Array.isArray(t)&&(n=t.join(","))),X["AjaxHelper"].fetch({idSite:n,module:"API",method:"PrivacyManager.findDataSubjects",segment:e.segment_filter}).then((function(t){e.hasSearched=!0,e.dataSubjectsActive=t.map((function(){return!0})),e.dataSubjects=t})).finally((function(){e.isLoading=!1}))}))}},computed:{hasActiveDataSubjects:function(){return!!this.activatedDataSubjects.length},activatedDataSubjects:function(){var e=this;return this.dataSubjects.filter((function(t,n){return e.dataSubjectsActive[n]})).map((function(e){return{idsite:e.idSite,idvisit:e.idVisit}}))},overviewHintText:function(){return Object(X["translate"])("PrivacyManager_GdprToolsOverviewHint",'<a href="'.concat(this.linkTo("gdprOverview"),'">'),"</a>")}}});te.render=Q;var ne=te,ae=Object(i["createElementVNode"])("br",null,null,-1),oe=Object(i["createElementVNode"])("br",null,null,-1),ie=Object(i["createElementVNode"])("br",null,null,-1),le=Object(i["createElementVNode"])("br",null,null,-1),re={key:0},ce=Object(i["createElementVNode"])("br",null,null,-1),se=Object(i["createElementVNode"])("br",null,null,-1),de={class:"alert-warning alert"};function ue(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeIpSettings",title:e.translate("PrivacyManager_UseAnonymizeIp"),modelValue:e.actualEnabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.actualEnabled=t}),"inline-help":e.anonymizeIpEnabledHelp},null,8,["title","modelValue","inline-help"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"radio",name:"maskLength",title:e.translate("PrivacyManager_AnonymizeIpMaskLengtDescription"),modelValue:e.actualMaskLength,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.actualMaskLength=t}),options:e.maskLengthOptions,"inline-help":e.translate("PrivacyManager_GeolocationAnonymizeIpNote")},null,8,["title","modelValue","options","inline-help"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"radio",name:"useAnonymizedIpForVisitEnrichment",title:e.translate("PrivacyManager_UseAnonymizedIpForVisitEnrichment"),modelValue:e.actualUseAnonymizedIpForVisitEnrichment,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.actualUseAnonymizedIpForVisitEnrichment=t}),options:e.useAnonymizedIpForVisitEnrichmentOptions,"inline-help":e.translate("PrivacyManager_UseAnonymizedIpForVisitEnrichmentNote")},null,8,["title","modelValue","options","inline-help"])])],512),[[i["vShow"],e.actualEnabled]]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeUserId",title:e.translate("PrivacyManager_PseudonymizeUserId"),modelValue:e.actualAnonymizeUserId,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.actualAnonymizeUserId=t})},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_PseudonymizeUserIdNote"))+" ",1),ae,oe,Object(i["createElementVNode"])("em",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_PseudonymizeUserIdNote2")),1)]})),_:1},8,["title","modelValue"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeOrderId",title:e.translate("PrivacyManager_UseAnonymizeOrderId"),modelValue:e.actualAnonymizeOrderId,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.actualAnonymizeOrderId=t}),"inline-help":e.translate("PrivacyManager_AnonymizeOrderIdNote")},null,8,["title","modelValue","inline-help"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"forceCookielessTracking",title:e.translate("PrivacyManager_ForceCookielessTracking"),modelValue:e.actualForceCookielessTracking,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.actualForceCookielessTracking=t})},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescription",e.trackerFileName))+" ",1),ie,le,Object(i["createElementVNode"])("em",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescription2")),1),e.trackerWritable?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",re,[ce,se,Object(i["createElementVNode"])("p",de,Object(i["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescriptionNotWritable",e.trackerFileName)),1)]))]})),_:1},8,["title","modelValue"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"select",name:"anonymizeReferrer",title:e.translate("PrivacyManager_AnonymizeReferrer"),modelValue:e.actualAnonymizeReferrer,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.actualAnonymizeReferrer=t}),options:e.referrerAnonymizationOptions,"inline-help":e.translate("PrivacyManager_AnonymizeReferrerNote")},null,8,["title","modelValue","options","inline-help"])]),Object(i["createVNode"])(c,{onConfirm:t[7]||(t[7]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}function me(e){return!0===e||1===e||"1"===e?1:0}var be=Object(i["defineComponent"])({props:{anonymizeIpEnabled:Boolean,anonymizeUserId:Boolean,maskLength:{type:Number,required:!0},useAnonymizedIpForVisitEnrichment:[Boolean,String,Number],anonymizeOrderId:Boolean,forceCookielessTracking:Boolean,anonymizeReferrer:String,maskLengthOptions:{type:Array,required:!0},useAnonymizedIpForVisitEnrichmentOptions:{type:Array,required:!0},trackerFileName:{type:String,required:!0},trackerWritable:{type:Boolean,required:!0},referrerAnonymizationOptions:{type:Object,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,actualEnabled:this.anonymizeIpEnabled,actualMaskLength:this.maskLength,actualUseAnonymizedIpForVisitEnrichment:me(this.useAnonymizedIpForVisitEnrichment),actualAnonymizeUserId:!!this.anonymizeUserId,actualAnonymizeOrderId:!!this.anonymizeOrderId,actualForceCookielessTracking:!!this.forceCookielessTracking,actualAnonymizeReferrer:this.anonymizeReferrer}},methods:{save:function(){var e=this;this.isLoading=!0,X["AjaxHelper"].post({module:"API",method:"PrivacyManager.setAnonymizeIpSettings"},{anonymizeIPEnable:this.actualEnabled?"1":"0",anonymizeUserId:this.actualAnonymizeUserId?"1":"0",anonymizeOrderId:this.actualAnonymizeOrderId?"1":"0",forceCookielessTracking:this.actualForceCookielessTracking?"1":"0",anonymizeReferrer:this.actualAnonymizeReferrer?this.actualAnonymizeReferrer:"",maskLength:this.actualMaskLength,useAnonymizedIpForVisitEnrichment:this.actualUseAnonymizedIpForVisitEnrichment}).then((function(){var e=X["NotificationsStore"].show({message:Object(X["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"toast"});X["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.isLoading=!1}))}},computed:{anonymizeIpEnabledHelp:function(){var e=Object(X["translate"])("PrivacyManager_AnonymizeIpInlineHelp"),t=Object(X["translate"])("PrivacyManager_AnonymizeIpDescription");return"".concat(e," ").concat(t)}}});be.render=ue;var pe=be,ge={class:"optOutCustomizer"},ve=["innerHTML"],he=["value"],Oe=["value"],je=Object(i["createStaticVNode"])('<option value="px">px</option><option value="pt">pt</option><option value="em">em</option><option value="rem">rem</option><option value="%">%</option>',5),fe=[je],ye={ref:"pre"},Ve=["innerHTML"],Se=["src"];function De(e,t,n,a,o,l){var r=Object(i["resolveDirective"])("select-on-focus");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ge,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_OptOutExplanation"))+" ",1),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.readThisToLearnMore)},null,8,ve)]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutCustomize")),1),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_FontColor"))+": ",1),Object(i["createElementVNode"])("input",{type:"color",value:e.fontColor,onKeydown:t[0]||(t[0]=function(t){return e.onFontColorChange(t)}),onChange:t[1]||(t[1]=function(t){return e.onFontColorChange(t)})},null,40,he)]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_BackgroundColor"))+": ",1),Object(i["createElementVNode"])("input",{type:"color",value:e.backgroundColor,onKeydown:t[2]||(t[2]=function(t){return e.onBgColorChange(t)}),onChange:t[3]||(t[3]=function(t){return e.onBgColorChange(t)})},null,40,Oe)]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_FontSize"))+": ",1),Object(i["createElementVNode"])("input",{id:"FontSizeInput",type:"number",min:"1",max:"100",onKeydown:t[4]||(t[4]=function(t){return e.onFontSizeChange(t)}),onChange:t[5]||(t[5]=function(t){return e.onFontSizeChange(t)})},null,32)]),Object(i["createElementVNode"])("span",null,[Object(i["createElementVNode"])("select",{class:"browser-default",onKeydown:t[6]||(t[6]=function(t){return e.onFontSizeUnitChange(t)}),onChange:t[7]||(t[7]=function(t){return e.onFontSizeUnitChange(t)})},fe,32)]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_FontFamily"))+": ",1),Object(i["createElementVNode"])("input",{id:"FontFamilyInput",type:"text",onKeydown:t[8]||(t[8]=function(t){return e.onFontFamilyChange(t)}),onChange:t[9]||(t[9]=function(t){return e.onFontFamilyChange(t)})},null,32)])])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutHtmlCode")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("pre",ye,[Object(i["createTextVNode"])('<iframe\n style="border: 0; height: 200px; width: 600px;"\n src="'+Object(i["toDisplayString"])(e.iframeUrl)+'"\n ></iframe>',1)],512),[[r,{}]]),Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.optOutExplanationIntro)},null,8,Ve),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutPreview")),1),Object(i["createElementVNode"])("iframe",{id:"previewIframe",style:{border:"1px solid #333",height:"200px",width:"600px"},src:e.iframeUrl,class:Object(i["normalizeClass"])({withBg:e.withBg})},null,10,Se)])}function Ne(e){var t=parseInt(e,16),n=t>>16&255,a=t>>8&255,o=255&t;return n>=225&&a>=225&&o>=225}var Ee=window,Ce=Ee.$,ke=Object(i["defineComponent"])({props:{language:{type:String,required:!0},piwikurl:String},directives:{SelectOnFocus:X["SelectOnFocus"]},data:function(){return{fontSizeUnit:"px",backgroundColor:"",fontColor:"",fontSize:"",fontFamily:""}},created:function(){this.onFontColorChange=Object(X["debounce"])(this.onFontColorChange,50),this.onBgColorChange=Object(X["debounce"])(this.onBgColorChange,50),this.onFontSizeChange=Object(X["debounce"])(this.onFontSizeChange,50),this.onFontSizeUnitChange=Object(X["debounce"])(this.onFontSizeUnitChange,50),this.onFontFamilyChange=Object(X["debounce"])(this.onFontFamilyChange,50)},methods:{onFontColorChange:function(e){this.fontColor=e.target.value},onBgColorChange:function(e){this.backgroundColor=e.target.value},onFontSizeChange:function(e){this.fontSize=e.target.value},onFontSizeUnitChange:function(e){this.fontSizeUnit=e.target.value},onFontFamilyChange:function(e){this.fontFamily=e.target.value}},watch:{iframeUrl:function(){var e=this.$refs.pre,t=Ce(e).queue("fx").length>0;t||Ce(e).effect("highlight",{},1500)}},computed:{fontSizeWithUnit:function(){return this.fontSize?"".concat(this.fontSize).concat(this.fontSizeUnit):""},withBg:function(){return!!this.piwikurl&&""===this.backgroundColor&&""!==this.fontColor&&Ne(this.fontColor.slice(1))},iframeUrl:function(){if(this.piwikurl){var e=X["MatomoUrl"].stringify({module:"CoreAdminHome",action:"optOut",language:this.language,backgroundColor:this.backgroundColor.slice(1),fontColor:this.fontColor.slice(1),fontSize:this.fontSizeWithUnit,fontFamily:this.fontFamily});return"".concat(this.piwikurl,"index.php?").concat(e)}return""},readThisToLearnMore:function(){var e="https://matomo.org/faq/how-to/faq_25918/";return Object(X["translate"])("General_ReadThisToLearnMore","<a rel='noreferrer noopener' target='_blank' href='".concat(e,"'>"),"</a>")},optOutExplanationIntro:function(){return Object(X["translate"])("CoreAdminHome_OptOutExplanationIntro",'<a href="'.concat(this.iframeUrl,'" rel="noreferrer noopener" target="_blank">'),"</a>")}}});ke.render=De;var _e=ke,Pe={class:"anonymizeLogData"},we={class:"form-group row"},Me={class:"col s12 input-field"},Ae={for:"anonymizeSite",class:"siteSelectorLabel"},ze={class:"sites_autocomplete"},Ie={class:"form-group row"},Fe={class:"col s6 input-field"},Te={for:"anonymizeStartDate",class:"active"},xe=["value"],Le={class:"col s6 input-field"},Be={for:"anonymizeEndDate",class:"active"},Ue=["value"],Re={name:"anonymizeIp"},He={name:"anonymizeLocation"},Ge={name:"anonymizeTheUserId"},qe={class:"form-group row"},Ke={class:"col s12 m6"},We={for:"visit_columns"},$e={class:"innerFormField",name:"visit_columns"},Ye=["onClick","title"],Je={class:"col s12 m6"},Qe={class:"form-help"},Xe={class:"inline-help"},Ze={class:"form-group row"},et={class:"col s12"},tt={class:"form-group row"},nt={class:"col s12 m6"},at={for:"action_columns"},ot={class:"innerFormField",name:"action_columns"},it=["onClick","title"],lt={class:"col s12 m6"},rt={class:"form-help"},ct={class:"inline-help"},st=Object(i["createElementVNode"])("span",{class:"icon-info"},null,-1),dt={class:"ui-confirm",id:"confirmAnonymizeLogData",ref:"confirmAnonymizeLogData"},ut=["value"],mt=["value"];function bt(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("SiteSelector"),c=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("SaveButton");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Pe,[Object(i["createElementVNode"])("div",we,[Object(i["createElementVNode"])("div",Me,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",Ae,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeSites")),1),Object(i["createElementVNode"])("div",ze,[Object(i["createVNode"])(r,{id:"anonymizeSite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),"show-all-sites-item":!0,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(i["createElementVNode"])("div",Ie,[Object(i["createElementVNode"])("div",Fe,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",Te,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeRowDataFrom")),1),Object(i["createElementVNode"])("input",{type:"text",id:"anonymizeStartDate",class:"anonymizeStartDate",ref:"anonymizeStartDate",name:"anonymizeStartDate",value:e.startDate,onKeydown:t[1]||(t[1]=function(t){return e.onKeydownStartDate(t)}),onChange:t[2]||(t[2]=function(t){return e.onKeydownStartDate(t)})},null,40,xe)])]),Object(i["createElementVNode"])("div",Le,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",Be,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeRowDataTo")),1),Object(i["createElementVNode"])("input",{type:"text",class:"anonymizeEndDate",id:"anonymizeEndDate",ref:"anonymizeEndDate",name:"anonymizeEndDate",value:e.endDate,onKeydown:t[3]||(t[3]=function(t){return e.onKeydownEndDate(t)}),onChange:t[4]||(t[4]=function(t){return e.onKeydownEndDate(t)})},null,40,Ue)])])]),Object(i["createElementVNode"])("div",Re,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeIp",title:e.translate("PrivacyManager_AnonymizeIp"),modelValue:e.anonymizeIp,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.anonymizeIp=t}),introduction:e.translate("General_Visit"),"inline-help":e.translate("PrivacyManager_AnonymizeIpHelp")},null,8,["title","modelValue","introduction","inline-help"])]),Object(i["createElementVNode"])("div",He,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeLocation",title:e.translate("PrivacyManager_AnonymizeLocation"),modelValue:e.anonymizeLocation,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.anonymizeLocation=t}),"inline-help":e.translate("PrivacyManager_AnonymizeLocationHelp")},null,8,["title","modelValue","inline-help"])]),Object(i["createElementVNode"])("div",Ge,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeTheUserId",title:e.translate("PrivacyManager_AnonymizeUserId"),modelValue:e.anonymizeUserId,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.anonymizeUserId=t}),"inline-help":e.translate("PrivacyManager_AnonymizeUserIdHelp")},null,8,["title","modelValue","inline-help"])]),Object(i["createElementVNode"])("div",qe,[Object(i["createElementVNode"])("div",Ke,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",We,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetVisitColumns")),1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.selectedVisitColumns,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])("selectedVisitColumns selectedVisitColumns".concat(n," multiple valign-wrapper")),key:n},[Object(i["createElementVNode"])("div",$e,[Object(i["createVNode"])(c,{uicontrol:"select",name:"visit_columns","model-value":t.column,"onUpdate:modelValue":function(n){t.column=n,e.onVisitColumnChange()},"full-width":!0,options:e.availableVisitColumns},null,8,["model-value","onUpdate:modelValue","options"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{class:"icon-minus valign",onClick:function(t){return e.removeVisitColumn(n)},title:e.translate("General_Remove")},null,8,Ye),[[i["vShow"],n+1!==e.selectedVisitColumns.length]])],2)})),128))])]),Object(i["createElementVNode"])("div",Je,[Object(i["createElementVNode"])("div",Qe,[Object(i["createElementVNode"])("span",Xe,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetVisitColumnsHelp")),1)])])]),Object(i["createElementVNode"])("div",Ze,[Object(i["createElementVNode"])("div",et,[Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("General_Action")),1)])]),Object(i["createElementVNode"])("div",tt,[Object(i["createElementVNode"])("div",nt,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",at,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetActionColumns")),1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.selectedActionColumns,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])("selectedActionColumns selectedActionColumns".concat(n," multiple valign-wrapper")),key:n},[Object(i["createElementVNode"])("div",ot,[Object(i["createVNode"])(c,{uicontrol:"select",name:"action_columns","model-value":t.column,"onUpdate:modelValue":function(n){t.column=n,e.onActionColumnChange()},"full-width":!0,options:e.availableActionColumns},null,8,["model-value","onUpdate:modelValue","options"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{class:"icon-minus valign",onClick:function(t){return e.removeActionColumn(n)},title:e.translate("General_Remove")},null,8,it),[[i["vShow"],n+1!==e.selectedActionColumns.length]])],2)})),128))])]),Object(i["createElementVNode"])("div",lt,[Object(i["createElementVNode"])("div",rt,[Object(i["createElementVNode"])("span",ct,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetActionColumnsHelp")),1)])])]),Object(i["createElementVNode"])("p",null,[st,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeProcessInfo")),1)]),Object(i["createVNode"])(s,{class:"anonymizePastData",onConfirm:t[8]||(t[8]=function(t){return e.scheduleAnonymization()}),disabled:e.isAnonymizePastDataDisabled,value:e.translate("PrivacyManager_AnonymizeDataNow")},null,8,["disabled","value"]),Object(i["createElementVNode"])("div",dt,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeDataConfirm")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,ut),Object(i["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,mt)],512)])}function pt(e){return e<10?"0".concat(e):e}var gt=Object(i["defineComponent"])({components:{SiteSelector:X["SiteSelector"],Field:ee["Field"],SaveButton:ee["SaveButton"]},data:function(){var e=new Date,t="".concat(e.getFullYear(),"-").concat(pt(e.getMonth()+1),"-").concat(pt(e.getDay()+1));return{isLoading:!1,isDeleting:!1,anonymizeIp:!1,anonymizeLocation:!1,anonymizeUserId:!1,site:{id:"all",name:"All Websites"},availableVisitColumns:[],availableActionColumns:[],selectedVisitColumns:[{column:""}],selectedActionColumns:[{column:""}],startDate:t,endDate:t}},created:function(){var e=this;this.onKeydownStartDate=Object(X["debounce"])(this.onKeydownStartDate,50),this.onKeydownEndDate=Object(X["debounce"])(this.onKeydownEndDate,50),X["AjaxHelper"].fetch({method:"PrivacyManager.getAvailableVisitColumnsToAnonymize"}).then((function(t){e.availableVisitColumns=[],t.forEach((function(t){e.availableVisitColumns.push({key:t.column_name,value:t.column_name})}))})),X["AjaxHelper"].fetch({method:"PrivacyManager.getAvailableLinkVisitActionColumnsToAnonymize"}).then((function(t){e.availableActionColumns=[],t.forEach((function(t){e.availableActionColumns.push({key:t.column_name,value:t.column_name})}))})),setTimeout((function(){var t=X["Matomo"].getBaseDatePickerOptions(null),n=X["Matomo"].getBaseDatePickerOptions(null);$(e.$refs.anonymizeStartDate).datepicker(t),$(e.$refs.anonymizeEndDate).datepicker(n)}))},methods:{onVisitColumnChange:function(){var e=this.selectedVisitColumns.every((function(e){return!(null===e||void 0===e||!e.column)}));e&&this.addVisitColumn()},addVisitColumn:function(){this.selectedVisitColumns.push({column:""})},removeVisitColumn:function(e){if(e>-1){var t=this.selectedVisitColumns.length-1;t===e?this.selectedVisitColumns[e]={column:""}:this.selectedVisitColumns.splice(e,1)}},onActionColumnChange:function(){var e=this.selectedActionColumns.every((function(e){return!(null===e||void 0===e||!e.column)}));e&&this.addActionColumn()},addActionColumn:function(){this.selectedActionColumns.push({column:""})},removeActionColumn:function(e){if(e>-1){var t=this.selectedActionColumns.length-1;t===e?this.selectedActionColumns[e]={column:""}:this.selectedActionColumns.splice(e,1)}},scheduleAnonymization:function(){var e="".concat(this.startDate,",").concat(this.endDate);this.startDate===this.endDate&&(e=this.startDate);var t={date:e};t.idSites=this.site.id,t.anonymizeIp=this.anonymizeIp?"1":"0",t.anonymizeLocation=this.anonymizeLocation?"1":"0",t.anonymizeUserId=this.anonymizeUserId?"1":"0",t.unsetVisitColumns=this.selectedVisitColumns.filter((function(e){return!(null===e||void 0===e||!e.column)})).map((function(e){return e.column})),t.unsetLinkVisitActionColumns=this.selectedActionColumns.filter((function(e){return!(null===e||void 0===e||!e.column)})).map((function(e){return e.column})),X["Matomo"].helper.modalConfirm(this.$refs.confirmAnonymizeLogData,{yes:function(){X["AjaxHelper"].post({method:"PrivacyManager.anonymizeSomeRawData"},t).then((function(){window.location.reload(!0)}))}})},onKeydownStartDate:function(e){this.startDate=e.target.value},onKeydownEndDate:function(e){this.endDate=e.target.value}},computed:{isAnonymizePastDataDisabled:function(){return!this.anonymizeIp&&!this.anonymizeLocation&&!this.selectedVisitColumns&&!this.selectedActionColumns}}});gt.render=bt;var vt=gt;function ht(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"radio",name:"doNotTrack",modelValue:e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.enabled=t}),options:e.doNotTrackOptions,"inline-help":e.translate("PrivacyManager_DoNotTrack_Description")},null,8,["modelValue","options","inline-help"])]),Object(i["createVNode"])(c,{onConfirm:t[1]||(t[1]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}var Ot=Object(i["defineComponent"])({props:{dntSupport:Boolean,doNotTrackOptions:{type:Array,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,enabled:this.dntSupport?1:0}},methods:{save:function(){var e=this;this.isLoading=!0;var t="deactivateDoNotTrack";this.enabled&&"0"!==this.enabled&&(t="activateDoNotTrack"),X["AjaxHelper"].post({module:"API",method:"PrivacyManager.".concat(t)}).then((function(){var e=X["NotificationsStore"].show({message:Object(X["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"transient"});X["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.isLoading=!1}))}}});Ot.render=ht;var jt=Ot;function ft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yt(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Vt(e,t,n){return t&&yt(e.prototype,t),n&&yt(e,n),e}function St(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 * diff --git a/plugins/PrivacyManager/vue/dist/umd.metadata.json b/plugins/PrivacyManager/vue/dist/umd.metadata.json index 3abfd129f0..66244dc900 100644 --- a/plugins/PrivacyManager/vue/dist/umd.metadata.json +++ b/plugins/PrivacyManager/vue/dist/umd.metadata.json @@ -1,7 +1,7 @@ { "dependsOn": [ "CoreHome", - "CorePluginsAdmin", - "SegmentEditor" + "SegmentEditor", + "CorePluginsAdmin" ] }
\ No newline at end of file diff --git a/plugins/Referrers/vue/dist/Referrers.umd.js b/plugins/Referrers/vue/dist/Referrers.umd.js index 22570b2064..0260f59490 100644 --- a/plugins/Referrers/vue/dist/Referrers.umd.js +++ b/plugins/Referrers/vue/dist/Referrers.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/Referrers/vue/src/CampaignBuilder/CampaignBuilder.vue?vue&type=template&id=1eeeaa44 +// 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/Referrers/vue/src/CampaignBuilder/CampaignBuilder.vue?vue&type=template&id=a3b685f0 var _hoisted_1 = { class: "campaignUrlBuilder" @@ -266,7 +266,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { textContent: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.generatedUrl) }, null, 8, _hoisted_3)], 512), [[_directive_select_on_focus, {}]])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.generatedUrl]])])]); } -// CONCATENATED MODULE: ./plugins/Referrers/vue/src/CampaignBuilder/CampaignBuilder.vue?vue&type=template&id=1eeeaa44 +// CONCATENATED MODULE: ./plugins/Referrers/vue/src/CampaignBuilder/CampaignBuilder.vue?vue&type=template&id=a3b685f0 // EXTERNAL MODULE: external "CorePluginsAdmin" var external_CorePluginsAdmin_ = __webpack_require__("a5a2"); @@ -334,8 +334,8 @@ var _window = window, var urlHash = ''; if (urlHashPos >= 0) { - urlHash = generatedUrl.substr(urlHashPos); - generatedUrl = generatedUrl.substr(0, urlHashPos); + urlHash = generatedUrl.slice(urlHashPos); + generatedUrl = generatedUrl.slice(0, urlHashPos); } if (generatedUrl.indexOf('/', 10) < 0 && generatedUrl.indexOf('?') < 0) { diff --git a/plugins/Referrers/vue/dist/Referrers.umd.min.js b/plugins/Referrers/vue/dist/Referrers.umd.min.js index bd11a69129..8a89469f06 100644 --- a/plugins/Referrers/vue/dist/Referrers.umd.min.js +++ b/plugins/Referrers/vue/dist/Referrers.umd.min.js @@ -1,4 +1,4 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["Referrers"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["Referrers"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},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 a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},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/Referrers/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"CampaignBuilder",(function(){return f})),"undefined"!==typeof window){var a=window.document.currentScript,r=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var i=n("19dc"),l=n("8bbf"),o={class:"campaignUrlBuilder"},c={id:"urlCampaignBuilderResult"},m=["textContent"];function u(e,t,n,a,r,i){var u=Object(l["resolveComponent"])("Field"),p=Object(l["resolveComponent"])("SaveButton"),d=Object(l["resolveDirective"])("select-on-focus");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",o,[Object(l["createElementVNode"])("form",null,[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(u,{uicontrol:"text",name:"websiteurl",title:"".concat(e.translate("Actions_ColumnPageURL")," (").concat(e.translate("General_Required2"),")"),modelValue:e.websiteUrl,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.websiteUrl=t}),"inline-help":e.translate("Referrers_CampaignPageUrlHelp")},null,8,["title","modelValue","inline-help"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(u,{uicontrol:"text",name:"campaignname",title:"".concat(e.translate("CoreAdminHome_JSTracking_CampaignNameParam")," (").concat(e.translate("General_Required2"),")"),modelValue:e.campaignName,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.campaignName=t}),"inline-help":e.translate("Referrers_CampaignNameHelp")},null,8,["title","modelValue","inline-help"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(u,{uicontrol:"text",name:"campaignkeyword",title:e.translate("CoreAdminHome_JSTracking_CampaignKwdParam"),modelValue:e.campaignKeyword,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.campaignKeyword=t}),"inline-help":"".concat(e.translate("Goals_Optional")," ").concat(e.translate("Referrers_CampaignKeywordHelp"))},null,8,["title","modelValue","inline-help"])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(u,{uicontrol:"text",name:"campaignsource",title:e.translate("Referrers_CampaignSource"),modelValue:e.campaignSource,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.campaignSource=t}),"inline-help":"".concat(e.translate("Goals_Optional")," ").concat(e.translate("Referrers_CampaignSourceHelp"))},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(u,{uicontrol:"text",name:"campaignmedium",title:e.translate("Referrers_CampaignMedium"),modelValue:e.campaignMedium,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.campaignMedium=t}),"inline-help":"".concat(e.translate("Goals_Optional")," ").concat(e.translate("Referrers_CampaignMediumHelp"))},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(u,{uicontrol:"text",name:"campaigncontent",title:e.translate("Referrers_CampaignContent"),modelValue:e.campaignContent,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.campaignContent=t}),"inline-help":"".concat(e.translate("Goals_Optional")," ").concat(e.translate("Referrers_CampaignContentHelp"))},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(u,{uicontrol:"text",name:"campaignid",title:e.translate("Referrers_CampaignId"),modelValue:e.campaignId,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.campaignId=t}),"inline-help":"".concat(e.translate("Goals_Optional")," ").concat(e.translate("Referrers_CampaignIdHelp"))},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(u,{uicontrol:"text",name:"campaigngroup",title:e.translate("Referrers_CampaignGroup"),modelValue:e.campaignGroup,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.campaignGroup=t}),"inline-help":"".concat(e.translate("Goals_Optional")," ").concat(e.translate("Referrers_CampaignGroupHelp"))},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(u,{uicontrol:"text",name:"campaignplacement",title:e.translate("Referrers_CampaignPlacement"),modelValue:e.campaignPlacement,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.campaignPlacement=t}),"inline-help":"".concat(e.translate("Goals_Optional")," ").concat(e.translate("Referrers_CampaignPlacementHelp"))},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createVNode"])(p,{class:"generateCampaignUrl",onConfirm:t[9]||(t[9]=function(t){return e.generateUrl()}),disabled:!e.websiteUrl||!e.campaignName,value:e.translate("Referrers_GenerateUrl"),style:{"margin-right":"3.5px"}},null,8,["disabled","value"]),Object(l["createVNode"])(p,{class:"resetCampaignUrl",onConfirm:t[10]||(t[10]=function(t){return e.reset()}),value:e.translate("General_Clear")},null,8,["value"]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("h3",null,Object(l["toDisplayString"])(e.translate("Referrers_URLCampaignBuilderResult")),1),Object(l["withDirectives"])(Object(l["createElementVNode"])("pre",c,[Object(l["createElementVNode"])("code",{textContent:Object(l["toDisplayString"])(e.generatedUrl)},null,8,m)],512),[[d,{}]])],512),[[l["vShow"],e.generatedUrl]])])])}var p=n("a5a2"),d=window,s=d.$,g=Object(l["defineComponent"])({props:{hasExtraPlugin:Boolean},components:{Field:p["Field"],SaveButton:p["SaveButton"]},directives:{SelectOnFocus:i["SelectOnFocus"]},data:function(){return{websiteUrl:"",campaignName:"",campaignKeyword:"",campaignSource:"",campaignMedium:"",campaignId:"",campaignContent:"",campaignGroup:"",campaignPlacement:"",generatedUrl:""}},created:function(){this.reset()},watch:{generatedUrl:function(){s("#urlCampaignBuilderResult").effect("highlight",{},1500)}},methods:{reset:function(){this.websiteUrl="",this.campaignName="",this.campaignKeyword="",this.campaignSource="",this.campaignMedium="",this.campaignId="",this.campaignContent="",this.campaignGroup="",this.campaignPlacement="",this.generatedUrl=""},generateUrl:function(){var e=String(this.websiteUrl);0!==e.indexOf("http")&&(e="https://".concat(e.trim()));var t=e.indexOf("#"),n="";t>=0&&(n=e.substr(t),e=e.substr(0,t)),e.indexOf("/",10)<0&&e.indexOf("?")<0&&(e+="/");var a=encodeURIComponent(this.campaignName.trim());e.indexOf("?")>0||e.indexOf("#")>0?e+="&":e+="?",e+="mtm_campaign=".concat(a),this.campaignKeyword&&(e+="&mtm_kwd=".concat(encodeURIComponent(this.campaignKeyword.trim()))),this.campaignSource&&(e+="&mtm_source=".concat(encodeURIComponent(this.campaignSource.trim()))),this.campaignMedium&&(e+="&mtm_medium=".concat(encodeURIComponent(this.campaignMedium.trim()))),this.campaignContent&&(e+="&mtm_content=".concat(encodeURIComponent(this.campaignContent.trim()))),this.campaignId&&(e+="&mtm_cid=".concat(encodeURIComponent(this.campaignId.trim()))),this.campaignGroup&&(e+="&mtm_group=".concat(encodeURIComponent(this.campaignGroup.trim()))),this.campaignPlacement&&(e+="&mtm_placement=".concat(encodeURIComponent(this.campaignPlacement.trim()))),e+=n,this.generatedUrl=e}}});g.render=u;var f=g; +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["Referrers"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["Referrers"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},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 a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},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/Referrers/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"CampaignBuilder",(function(){return f})),"undefined"!==typeof window){var a=window.document.currentScript,r=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var i=n("19dc"),l=n("8bbf"),o={class:"campaignUrlBuilder"},c={id:"urlCampaignBuilderResult"},m=["textContent"];function u(e,t,n,a,r,i){var u=Object(l["resolveComponent"])("Field"),p=Object(l["resolveComponent"])("SaveButton"),d=Object(l["resolveDirective"])("select-on-focus");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",o,[Object(l["createElementVNode"])("form",null,[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(u,{uicontrol:"text",name:"websiteurl",title:"".concat(e.translate("Actions_ColumnPageURL")," (").concat(e.translate("General_Required2"),")"),modelValue:e.websiteUrl,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.websiteUrl=t}),"inline-help":e.translate("Referrers_CampaignPageUrlHelp")},null,8,["title","modelValue","inline-help"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(u,{uicontrol:"text",name:"campaignname",title:"".concat(e.translate("CoreAdminHome_JSTracking_CampaignNameParam")," (").concat(e.translate("General_Required2"),")"),modelValue:e.campaignName,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.campaignName=t}),"inline-help":e.translate("Referrers_CampaignNameHelp")},null,8,["title","modelValue","inline-help"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(u,{uicontrol:"text",name:"campaignkeyword",title:e.translate("CoreAdminHome_JSTracking_CampaignKwdParam"),modelValue:e.campaignKeyword,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.campaignKeyword=t}),"inline-help":"".concat(e.translate("Goals_Optional")," ").concat(e.translate("Referrers_CampaignKeywordHelp"))},null,8,["title","modelValue","inline-help"])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(u,{uicontrol:"text",name:"campaignsource",title:e.translate("Referrers_CampaignSource"),modelValue:e.campaignSource,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.campaignSource=t}),"inline-help":"".concat(e.translate("Goals_Optional")," ").concat(e.translate("Referrers_CampaignSourceHelp"))},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(u,{uicontrol:"text",name:"campaignmedium",title:e.translate("Referrers_CampaignMedium"),modelValue:e.campaignMedium,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.campaignMedium=t}),"inline-help":"".concat(e.translate("Goals_Optional")," ").concat(e.translate("Referrers_CampaignMediumHelp"))},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(u,{uicontrol:"text",name:"campaigncontent",title:e.translate("Referrers_CampaignContent"),modelValue:e.campaignContent,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.campaignContent=t}),"inline-help":"".concat(e.translate("Goals_Optional")," ").concat(e.translate("Referrers_CampaignContentHelp"))},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(u,{uicontrol:"text",name:"campaignid",title:e.translate("Referrers_CampaignId"),modelValue:e.campaignId,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.campaignId=t}),"inline-help":"".concat(e.translate("Goals_Optional")," ").concat(e.translate("Referrers_CampaignIdHelp"))},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(u,{uicontrol:"text",name:"campaigngroup",title:e.translate("Referrers_CampaignGroup"),modelValue:e.campaignGroup,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.campaignGroup=t}),"inline-help":"".concat(e.translate("Goals_Optional")," ").concat(e.translate("Referrers_CampaignGroupHelp"))},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(u,{uicontrol:"text",name:"campaignplacement",title:e.translate("Referrers_CampaignPlacement"),modelValue:e.campaignPlacement,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.campaignPlacement=t}),"inline-help":"".concat(e.translate("Goals_Optional")," ").concat(e.translate("Referrers_CampaignPlacementHelp"))},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createVNode"])(p,{class:"generateCampaignUrl",onConfirm:t[9]||(t[9]=function(t){return e.generateUrl()}),disabled:!e.websiteUrl||!e.campaignName,value:e.translate("Referrers_GenerateUrl"),style:{"margin-right":"3.5px"}},null,8,["disabled","value"]),Object(l["createVNode"])(p,{class:"resetCampaignUrl",onConfirm:t[10]||(t[10]=function(t){return e.reset()}),value:e.translate("General_Clear")},null,8,["value"]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("h3",null,Object(l["toDisplayString"])(e.translate("Referrers_URLCampaignBuilderResult")),1),Object(l["withDirectives"])(Object(l["createElementVNode"])("pre",c,[Object(l["createElementVNode"])("code",{textContent:Object(l["toDisplayString"])(e.generatedUrl)},null,8,m)],512),[[d,{}]])],512),[[l["vShow"],e.generatedUrl]])])])}var p=n("a5a2"),d=window,s=d.$,g=Object(l["defineComponent"])({props:{hasExtraPlugin:Boolean},components:{Field:p["Field"],SaveButton:p["SaveButton"]},directives:{SelectOnFocus:i["SelectOnFocus"]},data:function(){return{websiteUrl:"",campaignName:"",campaignKeyword:"",campaignSource:"",campaignMedium:"",campaignId:"",campaignContent:"",campaignGroup:"",campaignPlacement:"",generatedUrl:""}},created:function(){this.reset()},watch:{generatedUrl:function(){s("#urlCampaignBuilderResult").effect("highlight",{},1500)}},methods:{reset:function(){this.websiteUrl="",this.campaignName="",this.campaignKeyword="",this.campaignSource="",this.campaignMedium="",this.campaignId="",this.campaignContent="",this.campaignGroup="",this.campaignPlacement="",this.generatedUrl=""},generateUrl:function(){var e=String(this.websiteUrl);0!==e.indexOf("http")&&(e="https://".concat(e.trim()));var t=e.indexOf("#"),n="";t>=0&&(n=e.slice(t),e=e.slice(0,t)),e.indexOf("/",10)<0&&e.indexOf("?")<0&&(e+="/");var a=encodeURIComponent(this.campaignName.trim());e.indexOf("?")>0||e.indexOf("#")>0?e+="&":e+="?",e+="mtm_campaign=".concat(a),this.campaignKeyword&&(e+="&mtm_kwd=".concat(encodeURIComponent(this.campaignKeyword.trim()))),this.campaignSource&&(e+="&mtm_source=".concat(encodeURIComponent(this.campaignSource.trim()))),this.campaignMedium&&(e+="&mtm_medium=".concat(encodeURIComponent(this.campaignMedium.trim()))),this.campaignContent&&(e+="&mtm_content=".concat(encodeURIComponent(this.campaignContent.trim()))),this.campaignId&&(e+="&mtm_cid=".concat(encodeURIComponent(this.campaignId.trim()))),this.campaignGroup&&(e+="&mtm_group=".concat(encodeURIComponent(this.campaignGroup.trim()))),this.campaignPlacement&&(e+="&mtm_placement=".concat(encodeURIComponent(this.campaignPlacement.trim()))),e+=n,this.generatedUrl=e}}});g.render=u;var f=g; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.js b/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.js index 25b9c0f751..56efa204a4 100644 --- a/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.js +++ b/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.js @@ -150,7 +150,7 @@ var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); // EXTERNAL MODULE: external "CoreHome" var external_CoreHome_ = __webpack_require__("19dc"); -// 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/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue?vue&type=template&id=3e4a5f7a +// 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/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue?vue&type=template&id=4d275cce var _hoisted_1 = { class: "segment-generator", @@ -294,7 +294,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { innerHTML: _ctx.$sanitize(_ctx.addNewAndConditionLinkText) }, null, 8, _hoisted_20)])])], 512); } -// CONCATENATED MODULE: ./plugins/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue?vue&type=template&id=3e4a5f7a +// CONCATENATED MODULE: ./plugins/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue?vue&type=template&id=4d275cce // EXTERNAL MODULE: external "CorePluginsAdmin" var external_CorePluginsAdmin_ = __webpack_require__("a5a2"); @@ -536,13 +536,13 @@ function findAndExplodeByMatch(metric) { if (minPos < metric.length) { // sth found - explode if (singleChar === true) { - newMetric.segment = metric.substr(0, minPos); - newMetric.matches = metric.substr(minPos, 1); - newMetric.value = decodeURIComponent(metric.substr(minPos + 1)); + newMetric.segment = metric.slice(0, minPos); + newMetric.matches = metric.slice(minPos, minPos + 1); + newMetric.value = decodeURIComponent(metric.slice(minPos + 1)); } else { - newMetric.segment = metric.substr(0, minPos); - newMetric.matches = metric.substr(minPos, 2); - newMetric.value = decodeURIComponent(metric.substr(minPos + 2)); + newMetric.segment = metric.slice(0, minPos); + newMetric.matches = metric.slice(minPos, minPos + 2); + newMetric.value = decodeURIComponent(metric.slice(minPos + 2)); } // if value is only '' -> change to empty string diff --git a/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.min.js b/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.min.js index 38e66de7f3..27ffccdd73 100644 --- a/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.min.js +++ b/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.min.js @@ -1,10 +1,10 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["SegmentEditor"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["SegmentEditor"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},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/SegmentEditor/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"SegmentGeneratorStore",(function(){return B})),n.d(t,"SegmentGenerator",(function(){return F})),"undefined"!==typeof window){var o=window.document.currentScript,i=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var a=n("8bbf"),r=n("19dc"),c={class:"segment-generator",ref:"root"},l={class:"segment-rows"},s={class:"segment-row"},d=["onClick"],u={href:"#",class:"segment-loading"},m={class:"segment-row-inputs valign-wrapper"},f={class:"segment-input metricListBlock valign-wrapper"},p={style:{width:"100%"}},g={class:"segment-input metricMatchBlock valign-wrapper"},v={style:{display:"inline-block"}},h={class:"segment-input metricValueBlock valign-wrapper"},b={class:"form-group row",style:{width:"100%"}},O={class:"input-field col s12"},j=Object(a["createElementVNode"])("span",{role:"status","aria-live":"polite",class:"ui-helper-hidden-accessible"},null,-1),S=Object(a["createElementVNode"])("div",{class:"clear"},null,-1),V={class:"segment-or"},y=["onClick"],C=["innerHTML"],w={class:"segment-and"},k=["innerHTML"];function A(e,t,n,o,i,r){var A=this,N=Object(a["resolveComponent"])("ActivityIndicator"),E=Object(a["resolveComponent"])("Field"),L=Object(a["resolveComponent"])("ValueInput");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",c,[Object(a["createVNode"])(N,{loading:e.isLoading},null,8,["loading"]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.conditions,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])("segmentRow".concat(n)),key:n},[Object(a["createElementVNode"])("div",l,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.orConditions,(function(n,o){var i,r;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])("orCondId".concat(n.id)),key:o},[Object(a["createElementVNode"])("div",s,[Object(a["createElementVNode"])("a",{class:"segment-close",onClick:function(o){return e.removeOrCondition(t,n)}},null,8,d),Object(a["withDirectives"])(Object(a["createElementVNode"])("a",u,null,512),[[a["vShow"],e.conditionValuesLoading[n.id]]]),Object(a["createElementVNode"])("div",m,[Object(a["createElementVNode"])("div",f,[Object(a["createElementVNode"])("div",p,[Object(a["createVNode"])(E,{uicontrol:"expandable-select",name:"segments","model-value":n.segment,"onUpdate:modelValue":function(t){n.segment=t,e.updateAutocomplete(n),e.computeSegmentDefinition()},title:null===(i=e.segments[n.segment])||void 0===i?void 0:i.name,"full-width":!0,options:e.segmentList},null,8,["model-value","onUpdate:modelValue","title","options"])])]),Object(a["createElementVNode"])("div",g,[Object(a["createElementVNode"])("div",v,[Object(a["createVNode"])(E,{uicontrol:"select",name:"matchType","model-value":n.matches,"onUpdate:modelValue":function(t){n.matches=t,e.computeSegmentDefinition()},"full-width":!0,options:e.matches[null===(r=e.segments[n.segment])||void 0===r?void 0:r.type]},null,8,["model-value","onUpdate:modelValue","options"])])]),Object(a["createElementVNode"])("div",h,[Object(a["createElementVNode"])("div",b,[Object(a["createElementVNode"])("div",O,[j,Object(a["createVNode"])(L,{or:n,onUpdate:function(e){n.value=e,A.computeSegmentDefinition()}},null,8,["or","onUpdate"])])])]),S])]),Object(a["createElementVNode"])("div",V,Object(a["toDisplayString"])(e.translate("SegmentEditor_OperatorOR")),1)],2)})),128)),Object(a["createElementVNode"])("div",{class:"segment-add-or",onClick:function(n){return e.addNewOrCondition(t)}},[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("a",{innerHTML:e.$sanitize(e.addNewOrConditionLinkText)},null,8,C)])],8,y)]),Object(a["createElementVNode"])("div",w,Object(a["toDisplayString"])(e.translate("SegmentEditor_OperatorAND")),1)],2)})),128)),Object(a["createElementVNode"])("div",{class:"segment-add-row initial",onClick:t[0]||(t[0]=function(t){return e.addNewAndCondition()})},[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("a",{innerHTML:e.$sanitize(e.addNewAndConditionLinkText)},null,8,k)])])],512)}var N=n("a5a2");function E(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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _(e,t,n){return t&&L(e.prototype,t),n&&L(e,n),e}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["SegmentEditor"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["SegmentEditor"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},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/SegmentEditor/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"SegmentGeneratorStore",(function(){return B})),n.d(t,"SegmentGenerator",(function(){return F})),"undefined"!==typeof window){var o=window.document.currentScript,i=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var a=n("8bbf"),r=n("19dc"),c={class:"segment-generator",ref:"root"},l={class:"segment-rows"},s={class:"segment-row"},d=["onClick"],u={href:"#",class:"segment-loading"},m={class:"segment-row-inputs valign-wrapper"},f={class:"segment-input metricListBlock valign-wrapper"},p={style:{width:"100%"}},g={class:"segment-input metricMatchBlock valign-wrapper"},v={style:{display:"inline-block"}},h={class:"segment-input metricValueBlock valign-wrapper"},O={class:"form-group row",style:{width:"100%"}},b={class:"input-field col s12"},j=Object(a["createElementVNode"])("span",{role:"status","aria-live":"polite",class:"ui-helper-hidden-accessible"},null,-1),S=Object(a["createElementVNode"])("div",{class:"clear"},null,-1),V={class:"segment-or"},y=["onClick"],C=["innerHTML"],w={class:"segment-and"},k=["innerHTML"];function A(e,t,n,o,i,r){var A=this,N=Object(a["resolveComponent"])("ActivityIndicator"),E=Object(a["resolveComponent"])("Field"),L=Object(a["resolveComponent"])("ValueInput");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",c,[Object(a["createVNode"])(N,{loading:e.isLoading},null,8,["loading"]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.conditions,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])("segmentRow".concat(n)),key:n},[Object(a["createElementVNode"])("div",l,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.orConditions,(function(n,o){var i,r;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])("orCondId".concat(n.id)),key:o},[Object(a["createElementVNode"])("div",s,[Object(a["createElementVNode"])("a",{class:"segment-close",onClick:function(o){return e.removeOrCondition(t,n)}},null,8,d),Object(a["withDirectives"])(Object(a["createElementVNode"])("a",u,null,512),[[a["vShow"],e.conditionValuesLoading[n.id]]]),Object(a["createElementVNode"])("div",m,[Object(a["createElementVNode"])("div",f,[Object(a["createElementVNode"])("div",p,[Object(a["createVNode"])(E,{uicontrol:"expandable-select",name:"segments","model-value":n.segment,"onUpdate:modelValue":function(t){n.segment=t,e.updateAutocomplete(n),e.computeSegmentDefinition()},title:null===(i=e.segments[n.segment])||void 0===i?void 0:i.name,"full-width":!0,options:e.segmentList},null,8,["model-value","onUpdate:modelValue","title","options"])])]),Object(a["createElementVNode"])("div",g,[Object(a["createElementVNode"])("div",v,[Object(a["createVNode"])(E,{uicontrol:"select",name:"matchType","model-value":n.matches,"onUpdate:modelValue":function(t){n.matches=t,e.computeSegmentDefinition()},"full-width":!0,options:e.matches[null===(r=e.segments[n.segment])||void 0===r?void 0:r.type]},null,8,["model-value","onUpdate:modelValue","options"])])]),Object(a["createElementVNode"])("div",h,[Object(a["createElementVNode"])("div",O,[Object(a["createElementVNode"])("div",b,[j,Object(a["createVNode"])(L,{or:n,onUpdate:function(e){n.value=e,A.computeSegmentDefinition()}},null,8,["or","onUpdate"])])])]),S])]),Object(a["createElementVNode"])("div",V,Object(a["toDisplayString"])(e.translate("SegmentEditor_OperatorOR")),1)],2)})),128)),Object(a["createElementVNode"])("div",{class:"segment-add-or",onClick:function(n){return e.addNewOrCondition(t)}},[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("a",{innerHTML:e.$sanitize(e.addNewOrConditionLinkText)},null,8,C)])],8,y)]),Object(a["createElementVNode"])("div",w,Object(a["toDisplayString"])(e.translate("SegmentEditor_OperatorAND")),1)],2)})),128)),Object(a["createElementVNode"])("div",{class:"segment-add-row initial",onClick:t[0]||(t[0]=function(t){return e.addNewAndCondition()})},[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("a",{innerHTML:e.$sanitize(e.addNewAndConditionLinkText)},null,8,k)])])],512)}var N=n("a5a2");function E(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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _(e,t,n){return t&&L(e.prototype,t),n&&L(e,n),e}function D(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 x=function(){function e(){var t=this;E(this,e),D(this,"privateState",Object(a["reactive"])({isLoading:!1,segments:[]})),D(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),D(this,"loadSegmentsAbort",void 0),D(this,"loadSegmentsPromise",void 0),D(this,"fetchedSiteId",void 0)}return _(e,[{key:"loadSegments",value:function(e,t){var n=this;if(this.loadSegmentsAbort&&(this.loadSegmentsAbort.abort(),this.loadSegmentsAbort=void 0),this.privateState.isLoading=!0,this.fetchedSiteId!==e&&(this.loadSegmentsAbort=void 0,this.fetchedSiteId=e),!this.loadSegmentsPromise){var o=void 0,i=void 0;"all"!==e&&e?e&&(o=e,i=e):(o="all",i="all"),this.loadSegmentsAbort=new AbortController,this.loadSegmentsPromise=r["AjaxHelper"].fetch({method:"API.getSegmentsMetadata",filter_limit:"-1",_hideImplementationData:0,idSites:o,idSite:i})}return this.loadSegmentsPromise.then((function(e){return n.privateState.isLoading=!1,e&&(n.privateState.segments=t?e.filter((function(e){return e.sqlSegment&&e.sqlSegment.match(/log_visit\./)})):e),n.state.value.segments})).finally((function(){n.privateState.isLoading=!1}))}}]),e}(),B=new x,I=["placeholder","title","value"];function G(e,t,n,o,i,r){return Object(a["openBlock"])(),Object(a["createElementBlock"])("input",{placeholder:e.translate("General_Value"),type:"text",class:"autocomplete",title:e.translate("General_Value"),autocomplete:"off",value:e.or.value,onKeydown:t[0]||(t[0]=function(t){return e.onKeydownOrConditionValue(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydownOrConditionValue(t)})},null,40,I)}var P=Object(a["defineComponent"])({props:{or:Object},created:function(){this.onKeydownOrConditionValue=Object(r["debounce"])(this.onKeydownOrConditionValue,50)},emits:["update"],methods:{onKeydownOrConditionValue:function(e){this.$emit("update",e.target.value)}}});P.render=G;var $=P;function T(){return{metric:[{key:"==",value:Object(r["translate"])("General_OperationEquals")},{key:"!=",value:Object(r["translate"])("General_OperationNotEquals")},{key:"<=",value:Object(r["translate"])("General_OperationAtMost")},{key:">=",value:Object(r["translate"])("General_OperationAtLeast")},{key:"<",value:Object(r["translate"])("General_OperationLessThan")},{key:">",value:Object(r["translate"])("General_OperationGreaterThan")}],dimension:[{key:"==",value:Object(r["translate"])("General_OperationIs")},{key:"!=",value:Object(r["translate"])("General_OperationIsNot")},{key:"=@",value:Object(r["translate"])("General_OperationContains")},{key:"!@",value:Object(r["translate"])("General_OperationDoesNotContain")},{key:"=^",value:Object(r["translate"])("General_OperationStartsWith")},{key:"=$",value:Object(r["translate"])("General_OperationEndsWith")}]}}function q(){for(var e="",t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",n=1;n<=10;n+=1)e+=t.charAt(Math.floor(Math.random()*t.length));return e}function M(e){for(var t,n,o=["==","!=","<=",">=","=@","!@","<",">","=^","=$"],i={},a=e.length,r=!1,c=0;c<o.length;c+=1)t=o[c],n=e.indexOf(t),-1!==n&&n<a&&(a=n,1===t.length&&(r=!0));a<e.length&&(!0===r?(i.segment=e.substr(0,a),i.matches=e.substr(a,1),i.value=decodeURIComponent(e.substr(a+1))):(i.segment=e.substr(0,a),i.matches=e.substr(a,2),i.value=decodeURIComponent(e.substr(a+2))),'""'===i.value&&(i.value=""));try{i.value=decodeURIComponent(i.value)}catch(l){}return i}function U(e){return e?"".concat(e).replace(/(<([^>]+)>)/gi,""):e}var H=window,R=H.$,J=Object(a["defineComponent"])({props:{addInitialCondition:Boolean,visitSegmentsOnly:Boolean,idsite:[String,Number],modelValue:{type:String,default:""}},components:{ActivityIndicator:r["ActivityIndicator"],Field:N["Field"],ValueInput:$},data:function(){return{conditions:[],queriedSegments:[],matches:T(),conditionValuesLoading:{},segmentDefinition:""}},emits:["update:modelValue"],watch:{modelValue:function(e){e!==this.segmentDefinition&&this.setSegmentString(e)},conditions:{deep:!0,handler:function(){this.computeSegmentDefinition()}},segmentDefinition:function(e){e!==this.modelValue&&this.$emit("update:modelValue",e)},idsite:function(e){this.reloadSegments(e,this.visitSegmentsOnly)}},created:function(){this.matches[""]=this.matches.dimension,this.setSegmentString(this.modelValue),this.segmentDefinition=this.modelValue,this.reloadSegments(this.idsite,this.visitSegmentsOnly)},methods:{reloadSegments:function(e,t){var n=this;B.loadSegments(e,t).then((function(e){n.queriedSegments=e.map((function(e){return Object.assign(Object.assign({},e),{},{category:e.category||"Others"})})),n.addInitialCondition&&0===n.conditions.length&&n.addNewAndCondition()}))},addAndCondition:function(e){this.conditions.push(e)},addNewOrCondition:function(e){var t={segment:this.firstSegment,matches:this.firstMatch,value:""};this.addOrCondition(e,t)},addOrCondition:function(e,t){var n=this;this.conditionValuesLoading[t.id]=!1,t.id=q(),e.orConditions.push(t),Object(a["nextTick"])((function(){n.updateAutocomplete(t)}))},updateAutocomplete:function(e){var t=this;this.conditionValuesLoading[e.id]=!0,R(".orCondId".concat(e.id," .metricValueBlock input"),this.$refs.root).autocomplete({source:[],minLength:0});var n=new AbortController,o=!1;r["AjaxHelper"].fetch({module:"API",format:"json",method:"API.getSuggestedValuesForSegment",segmentName:e.segment}).then((function(n){t.conditionValuesLoading[e.id]=!1,o=!0;var i=R(".orCondId".concat(e.id," .metricValueBlock input")).autocomplete({source:n,minLength:0,select:function(n,o){n.preventDefault(),e.value=o.item.value,t.computeSegmentDefinition(),t.$forceUpdate()}}).off("click").click((function(){R(i).autocomplete("search",e.value)}))})).catch((function(){o=!0,t.conditionValuesLoading[e.id]=!1,R(".orCondId".concat(e.id," .metricValueBlock input")).autocomplete({source:[],minLength:0}).autocomplete("search",e.value)})),setTimeout((function(){o||n.abort()}),2e4)},removeOrCondition:function(e,t){var n=e.orConditions.indexOf(t);if(n>-1&&e.orConditions.splice(n,1),0===e.orConditions.length){var o=this.conditions.indexOf(e);n>-1&&this.conditions.splice(o,1)}},setSegmentString:function(e){var t=this;if(this.conditions=[],e){var n=e.split(";").map((function(e){return e.split(",")}));this.conditions=n.map((function(e){var n={orConditions:[]};return e.forEach((function(e){var o=M(e);t.addOrCondition(n,o)})),n}))}},addNewAndCondition:function(){var e={orConditions:[]};return this.addAndCondition(e),this.addNewOrCondition(e),e},computeSegmentDefinition:function(){var e="";this.conditions.forEach((function(t){if(t.orConditions.length){var n="";t.orConditions.forEach((function(e){if(e.value||e.segment||e.matches){""!==n&&(n+=",");var t=encodeURIComponent(encodeURIComponent(e.value));n+="".concat(e.segment).concat(e.matches).concat(t)}})),""!==e&&(e+=";"),e+=n}})),this.segmentDefinition=e}},computed:{firstSegment:function(){return this.queriedSegments[0].segment},firstMatch:function(){var e=this.queriedSegments[0];return e?e.type&&this.matches[e.type]?this.matches[e.type][0].key:this.matches[""][0].key:null},segments:function(){var e={};return this.queriedSegments.forEach((function(t){e[t.segment]=t})),e},segmentList:function(){return this.queriedSegments.map((function(e){return{group:e.category,key:e.segment,value:e.name,tooltip:e.acceptedValues?U(e.acceptedValues):void 0}}))},addNewOrConditionLinkText:function(){return"+".concat(Object(r["translate"])("SegmentEditor_AddANDorORCondition","<span>".concat(Object(r["translate"])("SegmentEditor_OperatorOR"),"</span>")))},andConditionLabel:function(){return this.conditions.length?Object(r["translate"])("SegmentEditor_OperatorAND"):""},addNewAndConditionLinkText:function(){return"+".concat(Object(r["translate"])("SegmentEditor_AddANDorORCondition","<span>".concat(this.andConditionLabel,"</span>")))},isLoading:function(){return B.state.value.isLoading}}});J.render=A;var F=J; + */var x=function(){function e(){var t=this;E(this,e),D(this,"privateState",Object(a["reactive"])({isLoading:!1,segments:[]})),D(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),D(this,"loadSegmentsAbort",void 0),D(this,"loadSegmentsPromise",void 0),D(this,"fetchedSiteId",void 0)}return _(e,[{key:"loadSegments",value:function(e,t){var n=this;if(this.loadSegmentsAbort&&(this.loadSegmentsAbort.abort(),this.loadSegmentsAbort=void 0),this.privateState.isLoading=!0,this.fetchedSiteId!==e&&(this.loadSegmentsAbort=void 0,this.fetchedSiteId=e),!this.loadSegmentsPromise){var o=void 0,i=void 0;"all"!==e&&e?e&&(o=e,i=e):(o="all",i="all"),this.loadSegmentsAbort=new AbortController,this.loadSegmentsPromise=r["AjaxHelper"].fetch({method:"API.getSegmentsMetadata",filter_limit:"-1",_hideImplementationData:0,idSites:o,idSite:i})}return this.loadSegmentsPromise.then((function(e){return n.privateState.isLoading=!1,e&&(n.privateState.segments=t?e.filter((function(e){return e.sqlSegment&&e.sqlSegment.match(/log_visit\./)})):e),n.state.value.segments})).finally((function(){n.privateState.isLoading=!1}))}}]),e}(),B=new x,I=["placeholder","title","value"];function G(e,t,n,o,i,r){return Object(a["openBlock"])(),Object(a["createElementBlock"])("input",{placeholder:e.translate("General_Value"),type:"text",class:"autocomplete",title:e.translate("General_Value"),autocomplete:"off",value:e.or.value,onKeydown:t[0]||(t[0]=function(t){return e.onKeydownOrConditionValue(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydownOrConditionValue(t)})},null,40,I)}var P=Object(a["defineComponent"])({props:{or:Object},created:function(){this.onKeydownOrConditionValue=Object(r["debounce"])(this.onKeydownOrConditionValue,50)},emits:["update"],methods:{onKeydownOrConditionValue:function(e){this.$emit("update",e.target.value)}}});P.render=G;var $=P;function T(){return{metric:[{key:"==",value:Object(r["translate"])("General_OperationEquals")},{key:"!=",value:Object(r["translate"])("General_OperationNotEquals")},{key:"<=",value:Object(r["translate"])("General_OperationAtMost")},{key:">=",value:Object(r["translate"])("General_OperationAtLeast")},{key:"<",value:Object(r["translate"])("General_OperationLessThan")},{key:">",value:Object(r["translate"])("General_OperationGreaterThan")}],dimension:[{key:"==",value:Object(r["translate"])("General_OperationIs")},{key:"!=",value:Object(r["translate"])("General_OperationIsNot")},{key:"=@",value:Object(r["translate"])("General_OperationContains")},{key:"!@",value:Object(r["translate"])("General_OperationDoesNotContain")},{key:"=^",value:Object(r["translate"])("General_OperationStartsWith")},{key:"=$",value:Object(r["translate"])("General_OperationEndsWith")}]}}function q(){for(var e="",t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",n=1;n<=10;n+=1)e+=t.charAt(Math.floor(Math.random()*t.length));return e}function M(e){for(var t,n,o=["==","!=","<=",">=","=@","!@","<",">","=^","=$"],i={},a=e.length,r=!1,c=0;c<o.length;c+=1)t=o[c],n=e.indexOf(t),-1!==n&&n<a&&(a=n,1===t.length&&(r=!0));a<e.length&&(!0===r?(i.segment=e.slice(0,a),i.matches=e.slice(a,a+1),i.value=decodeURIComponent(e.slice(a+1))):(i.segment=e.slice(0,a),i.matches=e.slice(a,a+2),i.value=decodeURIComponent(e.slice(a+2))),'""'===i.value&&(i.value=""));try{i.value=decodeURIComponent(i.value)}catch(l){}return i}function U(e){return e?"".concat(e).replace(/(<([^>]+)>)/gi,""):e}var H=window,R=H.$,J=Object(a["defineComponent"])({props:{addInitialCondition:Boolean,visitSegmentsOnly:Boolean,idsite:[String,Number],modelValue:{type:String,default:""}},components:{ActivityIndicator:r["ActivityIndicator"],Field:N["Field"],ValueInput:$},data:function(){return{conditions:[],queriedSegments:[],matches:T(),conditionValuesLoading:{},segmentDefinition:""}},emits:["update:modelValue"],watch:{modelValue:function(e){e!==this.segmentDefinition&&this.setSegmentString(e)},conditions:{deep:!0,handler:function(){this.computeSegmentDefinition()}},segmentDefinition:function(e){e!==this.modelValue&&this.$emit("update:modelValue",e)},idsite:function(e){this.reloadSegments(e,this.visitSegmentsOnly)}},created:function(){this.matches[""]=this.matches.dimension,this.setSegmentString(this.modelValue),this.segmentDefinition=this.modelValue,this.reloadSegments(this.idsite,this.visitSegmentsOnly)},methods:{reloadSegments:function(e,t){var n=this;B.loadSegments(e,t).then((function(e){n.queriedSegments=e.map((function(e){return Object.assign(Object.assign({},e),{},{category:e.category||"Others"})})),n.addInitialCondition&&0===n.conditions.length&&n.addNewAndCondition()}))},addAndCondition:function(e){this.conditions.push(e)},addNewOrCondition:function(e){var t={segment:this.firstSegment,matches:this.firstMatch,value:""};this.addOrCondition(e,t)},addOrCondition:function(e,t){var n=this;this.conditionValuesLoading[t.id]=!1,t.id=q(),e.orConditions.push(t),Object(a["nextTick"])((function(){n.updateAutocomplete(t)}))},updateAutocomplete:function(e){var t=this;this.conditionValuesLoading[e.id]=!0,R(".orCondId".concat(e.id," .metricValueBlock input"),this.$refs.root).autocomplete({source:[],minLength:0});var n=new AbortController,o=!1;r["AjaxHelper"].fetch({module:"API",format:"json",method:"API.getSuggestedValuesForSegment",segmentName:e.segment}).then((function(n){t.conditionValuesLoading[e.id]=!1,o=!0;var i=R(".orCondId".concat(e.id," .metricValueBlock input")).autocomplete({source:n,minLength:0,select:function(n,o){n.preventDefault(),e.value=o.item.value,t.computeSegmentDefinition(),t.$forceUpdate()}}).off("click").click((function(){R(i).autocomplete("search",e.value)}))})).catch((function(){o=!0,t.conditionValuesLoading[e.id]=!1,R(".orCondId".concat(e.id," .metricValueBlock input")).autocomplete({source:[],minLength:0}).autocomplete("search",e.value)})),setTimeout((function(){o||n.abort()}),2e4)},removeOrCondition:function(e,t){var n=e.orConditions.indexOf(t);if(n>-1&&e.orConditions.splice(n,1),0===e.orConditions.length){var o=this.conditions.indexOf(e);n>-1&&this.conditions.splice(o,1)}},setSegmentString:function(e){var t=this;if(this.conditions=[],e){var n=e.split(";").map((function(e){return e.split(",")}));this.conditions=n.map((function(e){var n={orConditions:[]};return e.forEach((function(e){var o=M(e);t.addOrCondition(n,o)})),n}))}},addNewAndCondition:function(){var e={orConditions:[]};return this.addAndCondition(e),this.addNewOrCondition(e),e},computeSegmentDefinition:function(){var e="";this.conditions.forEach((function(t){if(t.orConditions.length){var n="";t.orConditions.forEach((function(e){if(e.value||e.segment||e.matches){""!==n&&(n+=",");var t=encodeURIComponent(encodeURIComponent(e.value));n+="".concat(e.segment).concat(e.matches).concat(t)}})),""!==e&&(e+=";"),e+=n}})),this.segmentDefinition=e}},computed:{firstSegment:function(){return this.queriedSegments[0].segment},firstMatch:function(){var e=this.queriedSegments[0];return e?e.type&&this.matches[e.type]?this.matches[e.type][0].key:this.matches[""][0].key:null},segments:function(){var e={};return this.queriedSegments.forEach((function(t){e[t.segment]=t})),e},segmentList:function(){return this.queriedSegments.map((function(e){return{group:e.category,key:e.segment,value:e.name,tooltip:e.acceptedValues?U(e.acceptedValues):void 0}}))},addNewOrConditionLinkText:function(){return"+".concat(Object(r["translate"])("SegmentEditor_AddANDorORCondition","<span>".concat(Object(r["translate"])("SegmentEditor_OperatorOR"),"</span>")))},andConditionLabel:function(){return this.conditions.length?Object(r["translate"])("SegmentEditor_OperatorAND"):""},addNewAndConditionLinkText:function(){return"+".concat(Object(r["translate"])("SegmentEditor_AddANDorORCondition","<span>".concat(this.andConditionLabel,"</span>")))},isLoading:function(){return B.state.value.isLoading}}});J.render=A;var F=J; /*! * Matomo - free/libre analytics platform * |