(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["CoreHome"]=t(require("vue")):e["CoreHome"]=t(e["Vue"])})("undefined"!==typeof self?self:this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/CoreHome/vue/dist/",n(n.s="fae3")}({2342:function(e,t,n){"use strict"; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */window.hasBlockedContent=!1},"8bbf":function(t,n){t.exports=e},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"createVueApp",(function(){return ut})),n.d(t,"useExternalPluginComponent",(function(){return _n})),n.d(t,"DirectiveUtilities",(function(){return _t})),n.d(t,"debounce",(function(){return Ji})),n.d(t,"getFormattedEvolution",(function(){return Cu})),n.d(t,"createAngularJsAdapter",(function(){return jt})),n.d(t,"transformAngularJsBoolAttr",(function(){return kt})),n.d(t,"transformAngularJsIntAttr",(function(){return St})),n.d(t,"removeAngularJsSpecificProperties",(function(){return Ot})),n.d(t,"clone",(function(){return Ct})),n.d(t,"cloneThenApply",(function(){return Et})),n.d(t,"activityIndicatorAdapter",(function(){return Eu})),n.d(t,"ActivityIndicator",(function(){return ho})),n.d(t,"translate",(function(){return C})),n.d(t,"Alert",(function(){return st})),n.d(t,"AjaxHelper",(function(){return Xe})),n.d(t,"setCookie",(function(){return Du})),n.d(t,"getCookie",(function(){return Pu})),n.d(t,"deleteCookie",(function(){return Vu})),n.d(t,"MatomoUrl",(function(){return Ce})),n.d(t,"Matomo",(function(){return S})),n.d(t,"Periods",(function(){return p})),n.d(t,"Day",(function(){return G})),n.d(t,"Week",(function(){return X})),n.d(t,"Month",(function(){return re})),n.d(t,"Year",(function(){return ce})),n.d(t,"Range",(function(){return _})),n.d(t,"format",(function(){return E})),n.d(t,"getToday",(function(){return D})),n.d(t,"parseDate",(function(){return P})),n.d(t,"todayIsInRange",(function(){return V})),n.d(t,"DropdownMenu",(function(){return Dt})),n.d(t,"FocusAnywhereButHere",(function(){return xt})),n.d(t,"FocusIf",(function(){return Lt})),n.d(t,"Tooltips",(function(){return Lr})),n.d(t,"MatomoDialog",(function(){return Sn})),n.d(t,"ExpandOnClick",(function(){return Yt})),n.d(t,"ExpandOnHover",(function(){return nn})),n.d(t,"ShowSensitiveData",(function(){return ln})),n.d(t,"DropdownButton",(function(){return dn})),n.d(t,"SelectOnFocus",(function(){return gn})),n.d(t,"SideNav",(function(){return yn})),n.d(t,"EnrichedHeadline",(function(){return Un})),n.d(t,"ContentBlock",(function(){return er})),n.d(t,"Comparisons",(function(){return Rr})),n.d(t,"MenuDropdown",(function(){return ei})),n.d(t,"DatePicker",(function(){return li})),n.d(t,"DateRangePicker",(function(){return mi})),n.d(t,"PeriodDatePicker",(function(){return bi})),n.d(t,"Notification",(function(){return al})),n.d(t,"NotificationGroup",(function(){return yl})),n.d(t,"NotificationsStore",(function(){return fl})),n.d(t,"SitesStore",(function(){return qi})),n.d(t,"SiteSelector",(function(){return zi})),n.d(t,"QuickAccess",(function(){return da})),n.d(t,"FieldArray",(function(){return Ca})),n.d(t,"MultiPairField",(function(){return Ha})),n.d(t,"PeriodSelector",(function(){return Vo})),n.d(t,"ReportingMenu",(function(){return Xl})),n.d(t,"ReportingMenuStore",(function(){return $l})),n.d(t,"ReportingPagesStore",(function(){return Cl})),n.d(t,"ReportMetadataStore",(function(){return lc})),n.d(t,"WidgetsStore",(function(){return Yl})),n.d(t,"WidgetLoader",(function(){return fc})),n.d(t,"WidgetContainer",(function(){return Pc})),n.d(t,"WidgetByDimensionContainer",(function(){return qc})),n.d(t,"Widget",(function(){return Kc})),n.d(t,"ReportingPage",(function(){return ys})),n.d(t,"ReportExport",(function(){return Ks})),n.d(t,"Sparkline",(function(){return nu})),n.d(t,"Progressbar",(function(){return su})),n.d(t,"ContentIntro",(function(){return uu})),n.d(t,"ContentTable",(function(){return pu})),n.d(t,"AjaxForm",(function(){return yu})),"undefined"!==typeof window){var r=window.document.currentScript,i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}n("2342");var a=n("8bbf");function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r=e[0]&&D()<=e[1])}function N(e,t){return B(e)||x(e,t)||A(e,t)||T()}function T(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(e,t){if(e){if("string"===typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:"day";if(/^previous/.test(t)){var r=e.getLastNRange(n,"2").startDate;return e.getLastNRange(n,t.substring(8),r)}if(/^last/.test(t))return e.getLastNRange(n,t.substring(4));var i=decodeURIComponent(t).split(",");return new e(P(i[0]),P(i[1]),n)}},{key:"getDisplayText",value:function(){return C("General_DateRangeInPeriodList")}}]),e}();function H(){return{getAllLabels:p.getAllLabels.bind(p),isRecognizedPeriod:p.isRecognizedPeriod.bind(p),get:p.get.bind(p),parse:p.parse.bind(p),parseDate:P,format:E,RangePeriod:_,todayIsInRange:V}}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?this.stringify(e):e,r=Object.keys(t).length?this.getFinalHashParams(t,e):{},i=this.stringify(r),a="?".concat(n);i.length&&(a="".concat(a,"#?").concat(i)),window.broadcast.propagateNewPage("",void 0,void 0,void 0,a)}},{key:"getFinalHashParams",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?e:this.parse(e),r="string"!==typeof e?t:this.parse(t);return Object.assign({period:r.period||this.parsed.value.period,date:r.date||this.parsed.value.date,segment:r.segment||this.parsed.value.segment},n)}},{key:"updateLocation",value:function(e){S.helper.isAngularRenderingThePage()?this.updateHash(e):this.updateUrl(e)}},{key:"getSearchParam",value:function(e){var t=window.location.href.split("#"),n=new RegExp("".concat(e,"(\\[]|=)"));if(t&&t[1]&&n.test(decodeURIComponent(t[1]))){var r=window.broadcast.getValueFromHash(e,window.location.href);if(r||"date"!==e&&"period"!==e&&"idSite"!==e)return r}return window.broadcast.getValueFromUrl(e,window.location.search)}},{key:"parse",value:function(e){return Oe.getValuesFromUrl("?".concat(e),!0)}},{key:"stringify",value:function(e){var t=Object.fromEntries(Object.entries(e).filter((function(e){var t=se(e,2),n=t[1];return""!==n&&null!==n&&void 0!==n})));return $.param(t).replace(/%5B%5D/g,"[]").replace(/%2C/g,",")}},{key:"updatePeriodParamsFromUrl",value:function(){var e=this.getSearchParam("date"),t=this.getSearchParam("period");if(je(t,e)&&(we.period!==t||we.currentDateString!==e)){we.period=t;var n=p.parse(t,e).getDateRange();we.startDateString=E(n[0]),we.endDateString=E(n[1]),we.updateDateInTitle(e,t),"range"===we.period&&(e="".concat(we.startDateString,",").concat(we.endDateString)),we.currentDateString=e}}},{key:"setUrlQuery",value:function(e){this.urlQuery.value=e.replace(/^\?/,"")}},{key:"setHashQuery",value:function(e){this.hashQuery.value=e.replace(/^[#/?]+/,"")}}]),e}(),Se=new ke,Ce=Se; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function Ee(){var e={getSearchParam:Ce.getSearchParam.bind(Ce)};return e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function De(){return S}function Pe(e,t){t.$oldEmit=t.$emit,t.$emit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},r=new e;return n.withTokenInUrl&&r.withTokenInUrl(),n.errorElement&&r.setErrorElement(n.errorElement),r.setFormat(n.format||"json"),Array.isArray(t)?r.setBulkRequests.apply(r,Ne(t)):r.addParams(Object.assign(Object.assign({module:"API",format:n.format||"json"},t),{},{segment:t.segment?encodeURIComponent(t.segment):void 0}),"get"),n.postParams&&r.addParams(n.postParams,"post"),n.headers&&(r.headers=n.headers),"undefined"===typeof n.createErrorNotification||n.createErrorNotification||r.useCallbackInCaseOfError(),n.abortController&&(r.abortController=n.abortController),n.returnResponseObject&&(r.resolveWithHelper=!0),r.send().then((function(t){var n=t instanceof e?t.requestHandle.responseJSON:t;if("error"===n.result)throw new Ke(n.message);return t}))}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.fetch(e,Object.assign(Object.assign({},n),{},{postParams:t}))}}]),e}();function Ze(){return window.globalAjaxQueue}function et(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tt(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n')),c}return Object.entries(i).forEach((function(e){var t=dt(e,2),n=t[0],r=t[1];r.vue||(r.vue=n),r.angularJsBind&&(w[n]=r.angularJsBind),y[r.vue]=n})),O.$inject=c||[],window.angular.module("piwikApp").directive(s,O),O}function kt(e){if("undefined"!==typeof e)return"true"===e||!!e&&e>0&&"0"!==e}function St(e){if("undefined"!==typeof e)return null===e?null:parseInt(e,10)}function Ct(e){return"undefined"===typeof e?e:JSON.parse(JSON.stringify(e))}function Et(e){var t=Ct(e);return S.helper.getAngularDependency("$rootScope").$applyAsync(),t} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */jt({component:st,scope:{severity:{vue:"severity",angularJsBind:"@piwikAlert"}},directiveName:"piwikAlert",transclude:!0}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */var Dt={mounted:function(e,t){var n={};$(e).addClass("matomo-dropdown-menu");var r,i=!!$(e).parent().closest(".dropdown-content").length;i&&(n={hover:!0},$(e).addClass("submenu"),$((null===(r=t.value)||void 0===r?void 0:r.activates)||$(e).data("target")).addClass("submenu-dropdown-content"),$(e).parents(".dropdown-content").addClass("submenu-container"));$(e).dropdown(n)},updated:function(e){Object(a["nextTick"])((function(){$(e).addClass("matomo-dropdown-menu")}))}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function Pt(e){return{restrict:"A",link:function(t,n,r){var i={instance:null,value:{activates:$("#".concat(r.activates))[0]},oldValue:null,modifiers:{},dir:{}};e((function(){Dt.mounted(n[0],i)}))}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function Vt(e,t,n){var r=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,r||e.contains(n.target)||t.value&&t.value.blur()}function Nt(e,t){t.value.hasScrolled=!0}function Tt(e,t){t.value.isMouseDown=!0,t.value.hasScrolled=!1}function At(e,t,n){27===n.which&&setTimeout((function(){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.blur&&t.value.blur()}),0)}Pt.$inject=["$timeout"],window.angular.module("piwikApp").directive("piwikDropdownMenu",Pt);var It=document.documentElement,xt={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onEscapeHandler=At.bind(null,e,t),t.value.onMouseDown=Tt.bind(null,e,t),t.value.onClickOutsideElement=Vt.bind(null,e,t),t.value.onScroll=Nt.bind(null,e,t),It.addEventListener("keyup",t.value.onEscapeHandler),It.addEventListener("mousedown",t.value.onMouseDown),It.addEventListener("mouseup",t.value.onClickOutsideElement),It.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){It.removeEventListener("keyup",t.value.onEscapeHandler),It.removeEventListener("mousedown",t.value.onMouseDown),It.removeEventListener("mouseup",t.value.onClickOutsideElement),It.removeEventListener("scroll",t.value.onScroll)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function Bt(){return{restrict:"A",link:function(e,t,n){var r={instance:null,value:{blur:function(){setTimeout((function(){e.$apply(n.piwikFocusAnywhereButHere)}),0)}},oldValue:null,modifiers:{},dir:{}};xt.mounted(t[0],r),t.on("$destroy",(function(){return xt.unmounted(t[0],r)}))}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function Mt(e,t){t.arg&&setTimeout((function(){e.focus(),t.value.afterFocus&&t.value.afterFocus()}),5)}window.angular.module("piwikApp.directive").directive("piwikFocusAnywhereButHere",Bt);var Lt={mounted:function(e,t){Mt(e,t)},updated:function(e,t){Mt(e,t)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function Ft(){return{restrict:"A",link:function(e,t,n){e.$watch(n.piwikFocusIf,(function(n){var r={instance:null,arg:n?"1":void 0,value:{afterFocus:function(){return e.$apply()}},oldValue:null,modifiers:{},dir:{}};Lt.updated(t[0],r)}))}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function Rt(e,t){var n;return e instanceof HTMLElement?e:null===(n=t.instance)||void 0===n?void 0:n.$refs[e]}window.angular.module("piwikApp.directive").directive("piwikFocusIf",Ft);var _t={getRef:Rt}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function $t(e){e.classList.toggle("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&S.helper.setMarginLeftToBeInViewport(t)}function Ht(e,t,n){var r=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,r||e.contains(n.target)||e.classList.remove("expanded")}function Ut(e){e.value.hasScrolled=!0}function qt(e){e.value.isMouseDown=!0,e.value.hasScrolled=!1}function Wt(e,t,n){27===n.which&&(t.value.isMouseDown=!1,t.value.hasScrolled=!1,e.classList.remove("expanded"))}var Jt=document.documentElement,Gt=window,zt=Gt.$,Yt={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onExpand=$t.bind(null,e),t.value.onEscapeHandler=Wt.bind(null,e,t),t.value.onMouseDown=qt.bind(null,t),t.value.onClickOutsideElement=Ht.bind(null,e,t),t.value.onScroll=Ut.bind(null,t),setTimeout((function(){var e=_t.getRef(t.value.expander,t);e&&zt(e).on("click",t.value.onExpand)})),Jt.addEventListener("keyup",t.value.onEscapeHandler),Jt.addEventListener("mousedown",t.value.onMouseDown),Jt.addEventListener("mouseup",t.value.onClickOutsideElement),Jt.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){var n=_t.getRef(t.value.expander,t);n&&zt(n).off("click",t.value.onExpand),Jt.removeEventListener("keyup",t.value.onEscapeHandler),Jt.removeEventListener("mousedown",t.value.onMouseDown),Jt.removeEventListener("mouseup",t.value.onClickOutsideElement),Jt.removeEventListener("scroll",t.value.onScroll)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function Qt(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};Yt.mounted(t[0],n),t.on("$destroy",(function(){return Yt.unmounted(t[0],n)}))}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function Kt(e){e.classList.add("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&S.helper.setMarginLeftToBeInViewport(t)}function Xt(e){e.classList.remove("expanded")}function Zt(e,t){e.contains(t.target)||e.classList.remove("expanded")}function en(e,t){27===t.which&&e.classList.remove("expanded")}window.angular.module("piwikApp").directive("piwikExpandOnClick",Qt);var tn=document.documentElement,nn={mounted:function(e,t){t.value.onMouseEnter=Kt.bind(null,e),t.value.onMouseLeave=Xt.bind(null,e),t.value.onClickOutsideElement=Zt.bind(null,e),t.value.onEscapeHandler=en.bind(null,e),setTimeout((function(){var e=_t.getRef(t.value.expander,t);e&&e.addEventListener("mouseenter",t.value.onMouseEnter)})),e.addEventListener("mouseleave",t.value.onMouseLeave),tn.addEventListener("keyup",t.value.onEscapeHandler),tn.addEventListener("mouseup",t.value.onClickOutsideElement)},unmounted:function(e,t){var n=_t.getRef(t.value.expander,t);n&&n.removeEventListener("mouseenter",t.value.onMouseEnter),e.removeEventListener("mouseleave",t.value.onMouseLeave),document.removeEventListener("keyup",t.value.onEscapeHandler),document.removeEventListener("mouseup",t.value.onClickOutsideElement)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function rn(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};nn.mounted(t[0],n),t.on("$destroy",(function(){return nn.unmounted(t[0],n)}))}}}window.angular.module("piwikApp").directive("piwikExpandOnHover",rn); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ var an=window,on=an.$,ln={mounted:function(e,t){var n=on(e),r=t.value.sensitiveData,i=t.value.showCharacters||6,a=t.value.clickElementSelector||n,o="";function l(){n.html(r),on(a).css({cursor:""}),on(a).tooltip("destroy")}i>0&&(o+=r.substr(0,i)),o+=r.substr(i).replace(/./g,"*"),n.html(o),on(a).tooltip({content:C("CoreHome_ClickToSeeFullInformation"),items:"*",track:!0}),on(a).one("click",l),on(a).css({cursor:"pointer"})}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function cn(){return{restrict:"A",link:function(e,t,n){var r={instance:null,value:{sensitiveData:n.piwikShowSensitiveData||(n.text?n.text():""),showCharacters:n.showCharacters?parseInt(n.showCharacters,10):void 0,clickElementSelector:n.clickElementSelector},oldValue:null,modifiers:{},dir:{}};ln.mounted(t[0],r)}}}window.angular.module("piwikApp").directive("piwikShowSensitiveData",cn); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ var sn=window,un=sn.$,dn={mounted:function(e){var t=un(e);!t.attr("data-target")&&t.attr("data-activates")&&t.attr("data-target",t.attr("data-activates"));var n=t.attr("data-target");n&&un("#".concat(n)).length&&t.dropdown({inDuration:300,outDuration:225,constrainWidth:!1,belowOrigin:!0})}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function pn(){return{restrict:"C",link:function(e,t){dn.mounted(t[0])}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function mn(e,t){e.value.focusedElement!==t.target&&(e.value.focusedElement=t.target,window.angular.element(t.target).select())}function fn(e){var t=document.createRange();t.selectNode(e.target);var n=window.getSelection();n&&n.rangeCount>0&&n.removeAllRanges(),n&&n.addRange(t)}function hn(e){delete e.value.focusedElement}window.angular.module("piwikApp").directive("dropdownButton",pn);var gn={mounted:function(e,t){var n=e.tagName.toLowerCase();t.value.elementSupportsSelect="textarea"===n,t.value.elementSupportsSelect?(t.value.onFocusHandler=mn.bind(null,t),t.value.onBlurHandler=hn.bind(null,t),e.addEventListener("focus",t.value.onFocusHandler),e.addEventListener("blur",t.value.onBlurHandler)):(t.value.onClickHandler=fn,e.addEventListener("click",t.value.onClickHandler))},unmounted:function(e,t){t.value.elementSupportsSelect?(e.removeEventListener("focus",t.value.onFocusHandler),e.removeEventListener("blur",t.value.onBlurHandler)):e.removeEventListener("click",t.value.onClickHandler)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function vn(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{},oldValue:null,modifiers:{},dir:{}};gn.mounted(t[0],n),t.on("$destroy",(function(){return gn.unmounted(t[0],n)}))}}}window.angular.module("piwikApp").directive("piwikSelectOnFocus",vn); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ var bn=!1,yn={mounted:function(e,t){t.value.activator&&setTimeout((function(){if(!bn){bn=!0;var n=_t.getRef(t.value.activator,t);if(n){window.$(n).show();var r=n.getAttribute("data-target");window.$("#".concat(r)).sidenav({closeOnClick:!0})}}e.classList.contains("collapsible")&&window.$(e).collapsible()}))}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function wn(e){return{restrict:"A",priority:10,link:function(t,n,r){var i={instance:null,value:{activator:$(r.piwikSideNav)[0]},oldValue:null,modifiers:{},dir:{}};e((function(){yn.mounted(n[0],i)}))}}}wn.$inject=["$timeout"],window.angular.module("piwikApp.directive").directive("piwikSideNav",wn);var On={ref:"root"};function jn(e,t,n,r,i,o){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",On,[Object(a["renderSlot"])(e.$slots,"default")],512)),[[a["vShow"],e.modelValue]])}var kn=Object(a["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},element:{type:HTMLElement,required:!1}},emits:["yes","no","closeEnd","close","validation","update:modelValue"],activated:function(){this.$emit("update:modelValue",!1)},watch:{modelValue:function(e,t){var n=this;if(e){var r=this.element||this.$refs.root.firstElementChild;S.helper.modalConfirm(r,{yes:function(){n.$emit("yes")},no:function(){n.$emit("no")},validation:function(){n.$emit("validation")}},{onCloseEnd:function(){n.element||n.$refs.root.appendChild(r),n.$emit("update:modelValue",!1),n.$emit("closeEnd")}})}else!1===e&&!0===t&&this.$emit("close")}}});kn.render=jn;var Sn=kn,Cn=(jt({component:Sn,scope:{show:{vue:"modelValue",default:!1},element:{default:function(e,t){return t[0]}}},events:{yes:function(e,t,n,r,i){i.yes&&(n.$eval(i.yes),setTimeout((function(){n.$apply()}),0))},no:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},validation:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},close:function(e,t,n,r,i){i.close&&(n.$eval(i.close),setTimeout((function(){n.$apply()}),0))},"update:modelValue":function(e,t,n,r,i,a,o){setTimeout((function(){n.$apply(o(i.piwikDialog).assign(n,e))}),0)}},$inject:["$parse"],directiveName:"piwikDialog",transclude:!0,mountPointFactory:function(e,t){var n=$('
');return n.appendTo(t),n[0]},postCreate:function(e,t,n,r){t.$watch(r.piwikDialog,(function(t,n){n!==t&&(e.modelValue=t||!1)}))},noScope:!0}),{key:0,class:"title",tabindex:"6"}),En=["href","title"],Dn={class:"iconsBar"},Pn=["href","title"],Vn=Object(a["createElementVNode"])("span",{class:"icon-help"},null,-1),Nn=[Vn],Tn=["title"],An=Object(a["createElementVNode"])("span",{class:"icon-info"},null,-1),In=[An],xn={class:"ratingIcons"},Bn={class:"inlineHelp"},Mn=["innerHTML"],Ln=["innerHTML"],Fn=["href"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function Rn(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("RateFeature");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"enrichedHeadline",onMouseenter:t[1]||(t[1]=function(t){return e.showIcons=!0}),onMouseleave:t[2]||(t[2]=function(t){return e.showIcons=!1}),ref:"root"},[e.editUrl?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Cn,[Object(a["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.$sanitize(e.actualFeatureName))},[Object(a["renderSlot"])(e.$slots,"default")],8,En)):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",Dn,[e.helpUrl&&!e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},Nn,8,Pn)):Object(a["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=function(t){return e.showInlineHelp=!e.showInlineHelp}),class:Object(a["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},In,10,Tn)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",xn,[Object(a["createVNode"])(l,{title:e.actualFeatureName},null,8,["title"])])],512),[[a["vShow"],e.showIcons||e.showInlineHelp]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Bn,[Object(a["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,Mn),""!=e.reportGenerated?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:"helpDate",innerHTML:e.$sanitize(e.reportGenerated)},null,8,Ln)):Object(a["createCommentVNode"])("",!0),e.helpUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(a["toDisplayString"])(e.translate("General_MoreDetails")),9,Fn)):Object(a["createCommentVNode"])("",!0)],512),[[a["vShow"],e.showInlineHelp]])],544)} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function _n(e,t){return Object(a["defineAsyncComponent"])((function(){return new Promise((function(n){window.$(document).ready((function(){window[e]?n(window[e][t]):n(null)}))}))}))}var $n=_n("Feedback","RateFeature"),Hn=Object(a["defineComponent"])({props:{helpUrl:{type:String,default:""},editUrl:{type:String,default:""},reportGenerated:String,featureName:String,inlineHelp:String},components:{RateFeature:$n},data:function(){return{showIcons:!1,showInlineHelp:!1,actualFeatureName:this.featureName,actualInlineHelp:this.inlineHelp}},watch:{inlineHelp:function(e){this.actualInlineHelp=e},featureName:function(e){this.actualFeatureName=e}},mounted:function(){var e=this,t=this.$refs.root;setTimeout((function(){if(!e.actualInlineHelp){var n,r=t.querySelector(".title .inlineHelp");if(!r&&null!==(n=t.parentElement)&&void 0!==n&&n.nextElementSibling&&(r=t.parentElement.nextElementSibling.querySelector(".reportDocumentation")),r){var i,a=null===(i=r.getAttribute("data-content"))||void 0===i?void 0:i.trim();a&&a.length&&(e.actualInlineHelp="

".concat(a,"

"),setTimeout((function(){return r.remove()}),0))}}var o;e.actualFeatureName||(e.actualFeatureName=null===(o=t.querySelector(".title"))||void 0===o?void 0:o.textContent);if(S.period&&S.currentDateString){var l=p.parse(S.period,S.currentDateString);e.reportGenerated&&l.containsToday()&&window.$(t.querySelector(".report-generated")).tooltip({track:!0,content:e.reportGenerated,items:"div",show:!1,hide:!1})}}))}});Hn.render=Rn;var Un=Hn,qn=(jt({component:Un,scope:{helpUrl:{angularJsBind:"@"},editUrl:{angularJsBind:"@"},reportGenerated:{angularJsBind:"@?"},featureName:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@?"}},directiveName:"piwikEnrichedHeadline",transclude:!0}),{class:"card",ref:"root"}),Wn={class:"card-content"},Jn={key:0,class:"card-title"},Gn={key:1,class:"card-title"},zn={ref:"content"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function Yn(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("EnrichedHeadline");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",qn,[Object(a["createElementVNode"])("div",Wn,[!e.contentTitle||e.actualFeature||e.helpUrl||e.actualHelpText?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("h2",Jn,Object(a["toDisplayString"])(e.contentTitle),1)),e.contentTitle&&(e.actualFeature||e.helpUrl||e.actualHelpText)?(Object(a["openBlock"])(),Object(a["createElementBlock"])("h2",Gn,[Object(a["createVNode"])(l,{"feature-name":e.actualFeature,"help-url":e.helpUrl,"inline-help":e.actualHelpText},{default:Object(a["withCtx"])((function(){return[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.contentTitle),1)]})),_:1},8,["feature-name","help-url","inline-help"])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",zn,[Object(a["renderSlot"])(e.$slots,"default")],512)])],512)}var Qn=null,Kn=window,Xn=Kn.$,Zn=Object(a["defineComponent"])({props:{contentTitle:String,feature:String,helpUrl:String,helpText:String,anchor:String},components:{EnrichedHeadline:Un},data:function(){return{actualFeature:this.feature,actualHelpText:this.helpText}},watch:{feature:function(e){this.actualFeature=e},helpText:function(e){this.actualHelpText=e}},mounted:function(){var e=this,t=this.$refs.root,n=this.$refs.content;if(this.anchor&&t&&t.parentElement){var r=document.createElement("a");r.id=this.anchor,Xn(t.parentElement).prepend(r)}setTimeout((function(){var t=n.querySelector(".contentHelp");t&&(e.actualHelpText=t.innerHTML,t.remove())}),0),this.actualFeature&&"true"===this.actualFeature&&(this.actualFeature=this.contentTitle),null===Qn&&(Qn=document.querySelector("#content.admin"));var i=null;if(Qn&&(i=Qn.offsetTop),i||0===i){var a=t.closest("[piwik-widget-loader]"),o=a?a.offsetTop:t.offsetTop;o-i<17&&(t.style.marginTop="0")}}});Zn.render=Yn;var er=Zn; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */jt({component:er,scope:{contentTitle:{angularJsBind:"@"},feature:{angularJsBind:"@"},helpUrl:{angularJsBind:"@"},helpText:{angularJsBind:"@"},anchor:{angularJsBind:"@?"}},directiveName:"piwikContentBlock",transclude:!0});function tr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nr(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1||this.periodComparisons.value.length>1)}},{key:"isComparingPeriods",value:function(){return this.getPeriodComparisons().length>1}},{key:"getSegmentComparisons",value:function(){return this.isComparisonEnabled()?this.segmentComparisons.value:[]}},{key:"getPeriodComparisons",value:function(){return this.isComparisonEnabled()?this.periodComparisons.value:[]}},{key:"getSeriesColor",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.getComparisonSeriesIndex(t.index,e.index)%vr;if(0===n)return this.colors["series".concat(r)];var i=n%br;return this.colors["series".concat(r,"-shade").concat(i)]}},{key:"getSeriesColorName",value:function(e,t){var n="series".concat(e%vr);return t>0&&(n+="-shade".concat(t%br)),n}},{key:"isComparisonEnabled",value:function(){return this.isEnabled.value}},{key:"getIndividualComparisonRowIndices",value:function(e){var t=this.getSegmentComparisons().length,n=e%t,r=Math.floor(e/t);return{segmentIndex:n,periodIndex:r}}},{key:"getComparisonSeriesIndex",value:function(e,t){var n=this.getSegmentComparisons().length;return e*n+t}},{key:"getAllComparisonSeries",value:function(){var e=this,t=[],n=0;return this.getPeriodComparisons().forEach((function(r){e.getSegmentComparisons().forEach((function(i){t.push({index:n,params:Object.assign(Object.assign({},i.params),r.params),color:e.colors["series".concat(n)]}),n+=1}))})),t}},{key:"removeSegmentComparison",value:function(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");var t=lr(this.segmentComparisons.value);t.splice(e,1);var n={};0===e&&(n.segment=t[0].params.segment),this.updateQueryParamsFromComparisons(t,this.periodComparisons.value,n)}},{key:"addSegmentComparison",value:function(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");var t=this.segmentComparisons.value.concat([{params:e,index:-1,title:""}]);this.updateQueryParamsFromComparisons(t,this.periodComparisons.value)}},{key:"updateQueryParamsFromComparisons",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i={},a=!1,o=!1;e.forEach((function(e){a?r[e.params.segment]=!0:a=!0})),t.forEach((function(e){o?i["".concat(e.params.period,"|").concat(e.params.date)]=!0:o=!0}));var l=[],c=[];Object.keys(i).forEach((function(e){var t=e.split("|");l.push(t[0]),c.push(t[1])}));var s={compareSegments:Object.keys(r),comparePeriods:l,compareDates:c},u=S.helper.isAngularRenderingThePage()?Ce.hashParsed.value:Ce.urlParsed.value;Ce.updateLocation(Object.assign(Object.assign(Object.assign({},u),s),n))}},{key:"getAllSeriesColors",value:function(){var e=S.ColorManager;if(!e)return[];for(var t=[],n=0;n"+decodeURIComponent(t.params.segment)},[Object(a["createElementVNode"])("a",{target:"_blank",href:e.getUrlToSegment(t.params.segment)},Object(a["toDisplayString"])(t.title),9,Cr)],8,Sr),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.periodComparisons,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"comparison-period",key:n.index,title:e.getComparisonTooltip(t,n)},[Object(a["createElementVNode"])("span",{class:"comparison-dot",style:Object(a["normalizeStyle"])({"background-color":e.getSeriesColor(t,n)})},null,4),Object(a["createElementVNode"])("span",Dr,Object(a["toDisplayString"])(n.title)+" ("+Object(a["toDisplayString"])(e.getComparisonPeriodType(n))+") ",1)],8,Er)})),128)),e.segmentComparisons.length>1?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:0,class:"remove-button",onClick:function(t){return e.removeSegmentComparison(n)}},[Object(a["createElementVNode"])("span",{class:"icon icon-close",title:e.translate("General_ClickToRemoveComp")},null,8,Vr)],8,Pr)):Object(a["createCommentVNode"])("",!0)])})),128)),Object(a["createElementVNode"])("div",Nr,[Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:e.translate("General_LoadingData")},null,8,Tr),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_LoadingData")),1)])],512)),[[l,{duration:200,delay:200,content:e.transformTooltipContent}]]):Object(a["createCommentVNode"])("",!0)} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */var Ir=window,xr=Ir.$;function Br(){var e=xr(this).attr("title")||"";return window.vueSanitize(e.replace(/\n/g,"
"))}function Mr(e,t){var n,r,i;xr(e).tooltip({track:!0,content:(null===(n=t.value)||void 0===n?void 0:n.content)||Br,show:{delay:(null===(r=t.value)||void 0===r?void 0:r.delay)||700,duration:(null===(i=t.value)||void 0===i?void 0:i.duration)||200},hide:!1})}var Lr={mounted:function(e,t){setTimeout((function(){return Mr(e,t)}))},updated:function(e,t){setTimeout((function(){return Mr(e,t)}))},beforeUnmount:function(e){try{window.$(e).tooltip("destroy")}catch(t){}}},Fr=Object(a["defineComponent"])({props:{},directives:{Tooltips:Lr},data:function(){return{comparisonTooltips:null}},setup:function(){var e=Object(a["computed"])((function(){return Or.isComparing()})),t=Object(a["computed"])((function(){return Or.getSegmentComparisons()})),n=Object(a["computed"])((function(){return Or.getPeriodComparisons()})),r=Or.getSeriesColor.bind(Or);function i(){var e=window.$(this).attr("title");return e?window.vueSanitize(e.replace(/\n/g,"
")):e}return{isComparing:e,segmentComparisons:t,periodComparisons:n,getSeriesColor:r,transformTooltipContent:i}},methods:{comparisonHasSegment:function(e){return"undefined"!==typeof e.params.segment},removeSegmentComparison:function(e){window.$(this.$refs.root).tooltip("destroy"),Or.removeSegmentComparison(e)},getComparisonPeriodType:function(e){var t=e.params.period;if("range"===t)return C("CoreHome_PeriodRange");var n=C("Intl_Period".concat(t.substring(0,1).toUpperCase()).concat(t.substring(1)));return n.substring(0,1).toUpperCase()+n.substring(1)},getComparisonTooltip:function(e,t){if(this.comparisonTooltips&&Object.keys(this.comparisonTooltips).length)return(this.comparisonTooltips[t.index]||{})[e.index]},getUrlToSegment:function(e){var t=Object.assign({},Ce.hashParsed.value);return delete t.comparePeriods,delete t.compareDates,delete t.compareSegments,t.segment=e,"".concat(window.location.search,"#?").concat(Ce.stringify(t))},onComparisonsChanged:function(){var e=this;if(this.comparisonTooltips=null,Or.isComparing()){var t=Or.getPeriodComparisons(),n=Or.getSegmentComparisons();Xe.fetch({method:"API.getProcessedReport",apiModule:"VisitsSummary",apiAction:"get",compare:"1",compareSegments:Ce.getSearchParam("compareSegments"),comparePeriods:Ce.getSearchParam("comparePeriods"),compareDates:Ce.getSearchParam("compareDates"),format_metrics:"1"}).then((function(r){e.comparisonTooltips={},t.forEach((function(t){e.comparisonTooltips[t.index]={},n.forEach((function(n){var i=e.generateComparisonTooltip(r,t,n);e.comparisonTooltips[t.index][n.index]=i}))}))}))}},generateComparisonTooltip:function(e,t,n){if(!e.reportData.comparisons)return"";var r=Or.getComparisonSeriesIndex(t.index,0),i=e.reportData.comparisons[r],a=Or.getComparisonSeriesIndex(t.index,n.index),o=e.reportData.comparisons[a],l=e.reportData.comparisons[n.index],c='
',s=(o.nb_visits/i.nb_visits*100).toFixed(2);return s="".concat(s,"%"),c+=C("General_ComparisonCardTooltip1",["'".concat(o.compareSegmentPretty,"'"),o.comparePeriodPretty,s,o.nb_visits.toString(),i.nb_visits.toString()]),t.index>0&&(c+="

",c+=C("General_ComparisonCardTooltip2",[o.nb_visits_change.toString(),l.compareSegmentPretty,l.comparePeriodPretty])),c+="
",c}},mounted:function(){var e=this;S.on("piwikComparisonsChanged",(function(){e.onComparisonsChanged()})),this.onComparisonsChanged()}});Fr.render=Ar;var Rr=Fr; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function _r(){return Or}window.angular.module("piwikApp.service").factory("piwikComparisonsService",_r);jt({component:Rr,directiveName:"piwikComparisons",restrict:"E"});var $r={ref:"root",class:"menuDropdown"},Hr=["title"],Ur=["innerHTML"],qr=Object(a["createElementVNode"])("span",{class:"icon-arrow-bottom"},null,-1),Wr={class:"items"},Jr={key:0,class:"search"},Gr=["placeholder"],zr=["title"],Yr=["title"];function Qr(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",$r,[Object(a["createElementVNode"])("span",{class:"title",onClick:t[0]||(t[0]=function(t){return e.showItems=!e.showItems}),title:e.tooltip},[Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(this.actualMenuTitle)},null,8,Ur),qr],8,Hr),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Wr,[e.showSearch&&e.showItems?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Jr,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),onKeydown:t[2]||(t[2]=function(t){return e.onSearchTermKeydown(t)}),placeholder:e.translate("General_Search")},null,40,Gr),[[a["vModelText"],e.searchTerm],[l,{},e.showItems]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{class:"search_ico",src:"plugins/Morpheus/images/search_ico.png",title:e.translate("General_Search")},null,8,zr),[[a["vShow"],!e.searchTerm]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{onClick:t[3]||(t[3]=function(t){e.searchTerm="",e.searchItems("")}),class:"reset",src:"plugins/CoreHome/images/reset_search.png",title:e.translate("General_Clear")},null,8,Yr),[[a["vShow"],e.searchTerm]])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",{onClick:t[4]||(t[4]=function(t){return e.selectItem(t)})},[Object(a["renderSlot"])(e.$slots,"default")])],512),[[a["vShow"],e.showItems]])],512)),[[c,{blur:e.lostFocus}]])}var Kr=window,Xr=Kr.$,Zr=Object(a["defineComponent"])({props:{menuTitle:String,tooltip:String,showSearch:Boolean,menuTitleChangeOnClick:Boolean},directives:{FocusAnywhereButHere:xt,FocusIf:Lt},emits:["afterSelect"],watch:{menuTitle:function(){this.actualMenuTitle=this.menuTitle}},data:function(){return{showItems:!1,searchTerm:"",actualMenuTitle:this.menuTitle}},methods:{lostFocus:function(){this.showItems=!1},selectItem:function(e){var t=e.target.classList;!t.contains("item")||t.contains("disabled")||t.contains("separator")||(this.menuTitleChangeOnClick&&(this.actualMenuTitle=(e.target.textContent||"").replace(/[\u0000-\u2666]/g,(function(e){return"&#".concat(e.charCodeAt(0),";")}))),this.showItems=!1,Xr(this.$slots.default()[0].el).find(".item").removeClass("active"),t.add("active"),this.$emit("afterSelect"))},onSearchTermKeydown:function(){var e=this;setTimeout((function(){e.searchItems(e.searchTerm)}))},searchItems:function(e){var t=e.toLowerCase();Xr(this.$refs.root).find(".item").each((function(e,n){var r=Xr(n);-1===r.text().toLowerCase().indexOf(t)?r.hide():r.show()}))}}});Zr.render=Qr;var ei=Zr,ti=(jt({component:ei,scope:{menuTitle:{angularJsBind:"@"},tooltip:{angularJsBind:"@"},showSearch:{angularJsBind:"="},menuTitleChangeOnClick:{angularJsBind:"="}},directiveName:"piwikMenudropdown",transclude:!0,events:{"after-select":function(e,t,n){setTimeout((function(){n.$apply()}),0)}}}),{ref:"root"}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function ni(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ti,null,512)}var ri=1,ii=window,ai=ii.$,oi=Object(a["defineComponent"])({props:{selectedDateStart:Date,selectedDateEnd:Date,highlightedDateStart:Date,highlightedDateEnd:Date,viewDate:[String,Date],stepMonths:Number,disableMonthDropdown:Boolean,options:Object},emits:["cellHover","cellHoverLeave","dateSelect"],setup:function(e,t){var n=Object(a["ref"])(null);function r(t,n){var r=t.children("a");if(e.selectedDateStart&&e.selectedDateEnd&&n>=e.selectedDateStart&&n<=e.selectedDateEnd?t.addClass("ui-datepicker-current-period"):t.removeClass("ui-datepicker-current-period"),e.highlightedDateStart&&e.highlightedDateEnd&&n>=e.highlightedDateStart&&n<=e.highlightedDateEnd){var i=r.length?r:t;i.addClass("ui-state-hover")}else t.removeClass("ui-state-hover"),r.removeClass("ui-state-hover")}function i(e,t,n){if(e.hasClass("ui-datepicker-other-month"))return o(e,t,n);var r=parseInt(e.children("a,span").text(),10);return new Date(n,t,r)}function o(e,t,n){var r,a=e.parent(),o=a.children("td");if(a.is(":first-child")){var l=a.children("td:not(.ui-datepicker-other-month)").first();return r=i(l,t,n),r.setDate(o.index(e)-o.index(l)+1),r}var c=a.children("td:not(.ui-datepicker-other-month)").last();return r=i(c,t,n),r.setDate(r.getDate()+o.index(e)-o.index(c)),r}function l(){var e=ai(n.value),t=e.find("td[data-month]"),r=parseInt(t.attr("data-month"),10),i=parseInt(t.attr("data-year"),10);return[r,i]}function c(){var e=ai(n.value),t=e.find(".ui-datepicker-calendar"),a=l(),o=t.find("td"),c=o.first(),s=i(c,a[0],a[1]);o.each((function(){r(ai(this),s),s.setDate(s.getDate()+1)}))}function s(){if(!e.viewDate)return!1;var t;if("string"===typeof e.viewDate)try{t=P(e.viewDate)}catch(a){return!1}else t=e.viewDate;var r=ai(n.value),i=l();return(i[0]!==t.getMonth()||i[1]!==t.getFullYear())&&(r.datepicker("setDate",t),!0)}function u(){var e=ai(n.value);e.find("td[data-event]").off("click"),e.find(".ui-state-active").removeClass("ui-state-active"),e.find(".ui-datepicker-current-day").removeClass("ui-datepicker-current-day"),e.find(".ui-datepicker-prev,.ui-datepicker-next").attr("href","")}function d(){var t=ai(n.value),r=e.stepMonths||ri;if(t.datepicker("option","stepMonths")===r)return!1;var i=ai(".ui-datepicker-month",t).val(),a=ai(".ui-datepicker-year",t).val();return t.datepicker("option","stepMonths",r).datepicker("setDate",new Date(a,i)),u(),!0}function p(){var t=ai(n.value),r=t.find(".ui-datepicker-month")[0];r&&(r.disabled=e.disableMonthDropdown)}function m(){if(ai(this).hasClass("ui-state-hover")){var e=ai(this).parent(),t=e.parent();e.is(":first-child")?t.find("a").first().click():t.find("a").last().click()}}function f(){p(),c()}return Object(a["watch"])((function(){return Object.assign({},e)}),(function(e,t){var n=!1;[function(e){return e.selectedDateStart},function(e){return e.selectedDateEnd},function(e){return e.highlightedDateStart},function(e){return e.highlightedDateEnd}].forEach((function(r){if(!n){var i=r(e),a=r(t);!i&&a&&(n=!0),i&&!a&&(n=!0),i&&a&&i.getTime()!==a.getTime()&&(n=!0)}})),e.viewDate!==t.viewDate&&s()&&(n=!0),e.stepMonths!==t.stepMonths&&d(),e.disableMonthDropdown!==t.disableMonthDropdown&&p(),n&&c()})),Object(a["onMounted"])((function(){var r=ai(n.value),a=e.options||{},o=Object.assign(Object.assign(Object.assign({},S.getBaseDatePickerOptions()),a),{},{onChangeMonthYear:function(){setTimeout((function(){u()}))}});r.datepicker(o),r.on("mouseover","tbody td a",(function(e){e.originalEvent&&c()})),r.on("mouseenter","tbody td",(function(){var e=l(),n=ai(this),r=i(n,e[0],e[1]);t.emit("cellHover",{date:r,$cell:n})})),r.on("mouseout","tbody td a",(function(){c()})),r.on("mouseleave","table",(function(){return t.emit("cellHoverLeave")})).on("mouseenter","thead",(function(){return t.emit("cellHoverLeave")})),r.on("click","tbody td.ui-datepicker-other-month",m),r.on("click",(function(e){e.preventDefault();var t=ai(e.target).closest("a");(t.is(".ui-datepicker-next")||t.is(".ui-datepicker-prev"))&&f()})),r.on("click","td[data-month]",(function(e){var n=ai(e.target).closest("td"),r=parseInt(n.attr("data-month"),10),i=parseInt(n.attr("data-year"),10),a=parseInt(n.children("a,span").text(),10);t.emit("dateSelect",{date:new Date(i,r,a)})}));var h=d();s(),p(),h||u(),c()})),{root:n}}});oi.render=ni;var li=oi,ci=(jt({component:li,scope:{selectedDateStart:{angularJsBind:"<"},selectedDateEnd:{angularJsBind:"<"},highlightedDateStart:{angularJsBind:"<"},highlightedDateEnd:{angularJsBind:"<"},viewDate:{angularJsBind:"<"},stepMonths:{angularJsBind:"<"},disableMonthDropdown:{angularJsBind:"<"},options:{angularJsBind:"<"},cellHover:{angularJsBind:"&"},cellHoverLeave:{angularJsBind:"&"},dateSelect:{angularJsBind:"&"}},directiveName:"piwikDatePicker",events:{"cell-hover":function(e,t,n,r,i,a,o){o()},"cell-hover-leave":function(e,t,n,r,i,a,o){o()},"date-select":function(e,t,n,r,i,a,o){o()}},$inject:["$timeout"]}),{id:"calendarRangeFrom"}),si={id:"calendarRangeTo"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function ui(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("DatePicker");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[Object(a["createElementVNode"])("div",ci,[Object(a["createElementVNode"])("h6",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_DateRangeFrom"))+" ",1),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text",id:"inputCalendarFrom",name:"inputCalendarFrom",class:"browser-default","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.startDateText=t}),onKeydown:t[1]||(t[1]=function(t){return e.onRangeInputChanged("from",t)}),onKeyup:t[2]||(t[2]=function(t){return e.handleEnterPress(t)})},null,544),[[a["vModelText"],e.startDateText]])]),Object(a["createVNode"])(l,{id:"calendarFrom","view-date":e.startDate,"selected-date-start":e.fromPickerSelectedDates[0],"selected-date-end":e.fromPickerSelectedDates[1],"highlighted-date-start":e.fromPickerHighlightedDates[0],"highlighted-date-end":e.fromPickerHighlightedDates[1],onDateSelect:t[3]||(t[3]=function(t){return e.setStartRangeDate(t.date)}),onCellHover:t[4]||(t[4]=function(t){return e.fromPickerHighlightedDates=e.getNewHighlightedDates(t.date,t.$cell)}),onCellHoverLeave:t[5]||(t[5]=function(t){return e.fromPickerHighlightedDates=[null,null]})},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end"])]),Object(a["createElementVNode"])("div",si,[Object(a["createElementVNode"])("h6",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_DateRangeTo"))+" ",1),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text",id:"inputCalendarTo",name:"inputCalendarTo",class:"browser-default","onUpdate:modelValue":t[6]||(t[6]=function(t){return e.endDateText=t}),onKeydown:t[7]||(t[7]=function(t){return e.onRangeInputChanged("to",t)}),onKeyup:t[8]||(t[8]=function(t){return e.handleEnterPress(t)})},null,544),[[a["vModelText"],e.endDateText]])]),Object(a["createVNode"])(l,{id:"calendarTo","view-date":e.endDate,"selected-date-start":e.toPickerSelectedDates[0],"selected-date-end":e.toPickerSelectedDates[1],"highlighted-date-start":e.toPickerHighlightedDates[0],"highlighted-date-end":e.toPickerHighlightedDates[1],onDateSelect:t[9]||(t[9]=function(t){return e.setEndRangeDate(t.date)}),onCellHover:t[10]||(t[10]=function(t){return e.toPickerHighlightedDates=e.getNewHighlightedDates(t.date,t.$cell)}),onCellHoverLeave:t[11]||(t[11]=function(t){return e.toPickerHighlightedDates=[null,null]})},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end"])])])}var di="YYYY-MM-DD",pi=Object(a["defineComponent"])({props:{startDate:String,endDate:String},components:{DatePicker:li},data:function(){var e=null;try{this.startDate&&(e=P(this.startDate))}catch(n){}var t=null;try{this.endDate&&(t=P(this.endDate))}catch(n){}return{fromPickerSelectedDates:[e,e],toPickerSelectedDates:[t,t],fromPickerHighlightedDates:[null,null],toPickerHighlightedDates:[null,null],startDateText:this.startDate,endDateText:this.endDate,startDateInvalid:!1,endDateInvalid:!1}},emits:["rangeChange","submit"],watch:{startDate:function(){this.startDateText=this.startDate,this.setStartRangeDateFromStr(this.startDate)},endDate:function(){this.endDateText=this.endDate,this.setEndRangeDateFromStr(this.endDate)}},mounted:function(){this.rangeChanged()},methods:{setStartRangeDate:function(e){this.fromPickerSelectedDates=[e,e],this.rangeChanged()},setEndRangeDate:function(e){this.toPickerSelectedDates=[e,e],this.rangeChanged()},onRangeInputChanged:function(e,t){var n=this;setTimeout((function(){"from"===e?n.setStartRangeDateFromStr(t.target.value):n.setEndRangeDateFromStr(t.target.value)}))},getNewHighlightedDates:function(e,t){return t.hasClass("ui-datepicker-unselectable")?null:[e,e]},handleEnterPress:function(e){13===e.keyCode&&this.$emit("submit",{start:this.startDate,end:this.endDate})},setStartRangeDateFromStr:function(e){this.startDateInvalid=!0;var t=null;try{e&&e.length===di.length&&(t=P(e))}catch(n){}t&&(this.fromPickerSelectedDates=[t,t],this.startDateInvalid=!1,this.rangeChanged())},setEndRangeDateFromStr:function(e){this.endDateInvalid=!0;var t=null;try{e&&e.length===di.length&&(t=P(e))}catch(n){}t&&(this.toPickerSelectedDates=[t,t],this.endDateInvalid=!1,this.rangeChanged())},rangeChanged:function(){this.$emit("rangeChange",{start:this.fromPickerSelectedDates[0]?E(this.fromPickerSelectedDates[0]):null,end:this.toPickerSelectedDates[0]?E(this.toPickerSelectedDates[0]):null})}}});pi.render=ui;var mi=pi; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */jt({component:mi,scope:{startDate:{angularJsBind:"<"},endDate:{angularJsBind:"<"},rangeChange:{angularJsBind:"&"},submit:{angularJsBind:"&"}},directiveName:"piwikDateRangePicker",restrict:"E"});function fi(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("DatePicker");return Object(a["openBlock"])(),Object(a["createBlock"])(l,{"selected-date-start":e.selectedDates[0],"selected-date-end":e.selectedDates[1],"highlighted-date-start":e.highlightedDates[0],"highlighted-date-end":e.highlightedDates[1],"view-date":e.viewDate,"step-months":"year"===e.period?12:1,"disable-month-dropdown":"year"===e.period,onCellHover:t[0]||(t[0]=function(t){return e.onHoverNormalCell(t.date,t.$cell)}),onCellHoverLeave:t[1]||(t[1]=function(t){return e.onHoverLeaveNormalCells()}),onDateSelect:t[2]||(t[2]=function(t){return e.onDateSelected(t.date)})},null,8,["selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end","view-date","step-months","disable-month-dropdown"])}var hi=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),gi=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay),vi=Object(a["defineComponent"])({props:{period:{type:String,required:!0},date:[String,Date]},components:{DatePicker:li},emits:["select"],setup:function(e,t){var n=Object(a["ref"])(e.date),r=Object(a["ref"])([null,null]),i=Object(a["ref"])([null,null]);function o(t){var n=p.get(e.period).parse(t).getDateRange();return n[0]=hin[1]?n[1]:gi,n}function l(t,n){var r=tgi,a=n.hasClass("ui-datepicker-other-month")&&("month"===e.period||"day"===e.period);i.value=r||a?[null,null]:o(t)}function c(){i.value=[null,null]}function s(e){t.emit("select",{date:e})}function u(){if(!e.period||!e.date)return r.value=[null,null],void(n.value=null);r.value=o(e.date),n.value=P(e.date)}return Object(a["watch"])(e,u),u(),{selectedDates:r,highlightedDates:i,viewDate:n,onHoverNormalCell:l,onHoverLeaveNormalCells:c,onDateSelected:s}}});vi.render=fi;var bi=vi,yi=(jt({component:bi,scope:{period:{angularJsBind:"<"},date:{angularJsBind:"<"},select:{angularJsBind:"&"}},directiveName:"piwikPeriodDatePicker",restrict:"E"}),["value","name"]),wi=["title"],Oi=["textContent"],ji={key:1,class:"placeholder"},ki={class:"dropdown"},Si={class:"custom_select_search"},Ci=["placeholder"],Ei={key:0},Di={class:"custom_select_container"},Pi=["onClick"],Vi=["innerHTML","href","title"],Ni={class:"ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all\n siteSelect"},Ti={class:"ui-menu-item"},Ai={class:"ui-corner-all",tabindex:"-1"},Ii={key:1}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function xi(e,t,n,r,i,o){var l,c,s,u,d=Object(a["resolveComponent"])("AllSitesLink"),p=Object(a["resolveDirective"])("focus-if"),m=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["siteSelector piwikSelector borderedControl",{expanded:e.showSitesList,disabled:!e.hasMultipleSites}])},[e.name?(Object(a["openBlock"])(),Object(a["createElementBlock"])("input",{key:0,type:"hidden",value:null===(l=e.modelValue)||void 0===l?void 0:l.id,name:e.name},null,8,yi)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("a",{ref:"selectorLink",onClick:t[0]||(t[0]=function(){return e.onClickSelector&&e.onClickSelector.apply(e,arguments)}),onKeydown:t[1]||(t[1]=function(t){return e.onPressEnter(t)}),href:"javascript:void(0)",class:Object(a["normalizeClass"])([{loading:e.isLoading},"title"]),tabindex:"4",title:e.selectorLinkTitle},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["icon icon-arrow-bottom",{iconHidden:e.isLoading,collapsed:!e.showSitesList}])},null,2),Object(a["createElementVNode"])("span",null,[null!==(c=e.modelValue)&&void 0!==c&&c.name||!e.placeholder?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,textContent:Object(a["toDisplayString"])((null===(s=e.modelValue)||void 0===s?void 0:s.name)||e.firstSiteName)},null,8,Oi)):Object(a["createCommentVNode"])("",!0),null!==(u=e.modelValue)&&void 0!==u&&u.name||!e.placeholder?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",ji,Object(a["toDisplayString"])(e.placeholder),1))])],42,wi),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",ki,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Si,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text",onClick:t[2]||(t[2]=function(t){e.searchTerm="",e.loadInitialSites()}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),tabindex:"4",class:"websiteSearch inp browser-default",placeholder:e.translate("General_Search")},null,8,Ci),[[a["vModelText"],e.searchTerm],[p,{},e.shouldFocusOnSearch]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{title:"Clear",onClick:t[4]||(t[4]=function(t){e.searchTerm="",e.loadInitialSites()}),class:"reset",src:"plugins/CoreHome/images/reset_search.png"},null,512),[[a["vShow"],e.searchTerm]])],512),[[a["vShow"],e.autocompleteMinSites<=e.sites.length||e.searchTerm]]),"top"===e.allSitesLocation&&e.showAllSitesItem?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ei,[Object(a["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[5]||(t[5]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Di,[Object(a["createElementVNode"])("ul",{class:"custom_select_ul_list",onClick:t[7]||(t[7]=function(t){return e.showSitesList=!1})},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(n,r){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{onClick:function(t){return e.switchSite(Object.assign(Object.assign({},n),{},{id:n.idsite}),t)},key:r},[Object(a["createElementVNode"])("a",{onClick:t[6]||(t[6]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.getMatchedSiteName(n.name)),tabindex:"4",href:e.getUrlForSiteId(n.idsite),title:n.name},null,8,Vi)],8,Pi)),[[a["vShow"],!(!e.showSelectedSite&&e.activeSiteId===n.idsite)]])})),128))]),Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",Ni,[Object(a["createElementVNode"])("li",Ti,[Object(a["createElementVNode"])("a",Ai,Object(a["toDisplayString"])(e.translate("SitesManager_NotFound")+" "+e.searchTerm),1)])],512),[[a["vShow"],!e.sites.length&&e.searchTerm]])]),"bottom"===e.allSitesLocation&&e.showAllSitesItem?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ii,[Object(a["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[8]||(t[8]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(a["createCommentVNode"])("",!0)],512),[[a["vShow"],e.showSitesList]])],2)),[[m,{blur:e.onBlur}]])}var Bi=["innerHTML","href"];function Mi(e,t,n,r,i,o){var l=this;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{onClick:t[1]||(t[1]=function(e){return l.onClick(e)}),class:"custom_select_all"},[Object(a["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.allSitesText),tabindex:"4",href:e.href},null,8,Bi)])}var Li=Object(a["defineComponent"])({props:{href:String,allSitesText:String},emits:["click"],methods:{onClick:function(e){this.$emit("click",e)}}});Li.render=Mi;var Fi=Li;function Ri(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _i(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];return e?(this.currentRequestAbort&&this.currentRequestAbort.abort(),this.limitRequest||(this.limitRequest=Xe.fetch({method:"SitesManager.getNumWebsitesToDisplayPerPage"})),this.limitRequest.then((function(r){var i=r.value,a="SitesManager.getPatternMatchSites";return n&&(a="SitesManager.getSitesWithAdminAccess"),t.currentRequestAbort=new AbortController,Xe.fetch({method:a,limit:i,pattern:e},{abortController:t.currentRequestAbort})})).then((function(e){return e?t.processWebsitesList(e):null})).finally((function(){t.currentRequestAbort=null}))):this.loadInitialSites()}},{key:"processWebsitesList",value:function(e){var t=e;return t&&t.length?(t=t.map((function(e){return Object.assign(Object.assign({},e),{},{name:e.group?"[".concat(e.group,"] ").concat(e.name):e.name})})),t.sort((function(e,t){return e.name.toLowerCase()t.name.toLowerCase()?1:0})),t):[]}}]),e}(),qi=new Ui,Wi=300;function Ji(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wi;return function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o1},firstSiteName:function(){var e=qi.initialSites.value;return e&&e.length>0?e[0].name:""},urlAllSites:function(){var e=Ce.stringify(Object.assign(Object.assign({},Ce.urlParsed.value),{},{module:"MultiSites",action:"index",date:Ce.parsed.value.date,period:Ce.parsed.value.period}));return"?".concat(e)}},methods:{onSearchTermChanged:function(){this.searchTerm?(this.isLoading=!0,this.searchSite(this.searchTerm)):(this.isLoading=!1,this.loadInitialSites())},onAllSitesClick:function(e){this.switchSite({id:"all",name:this.$props.allSitesText},e),this.showSitesList=!1},switchSite:function(e,t){var n=-1!==navigator.userAgent.indexOf("Mac OS X")?t.metaKey:t.ctrlKey;t&&n&&t.target&&t.target.href?window.open(t.target.href,"_blank"):(this.$emit("update:modelValue",{id:e.id,name:e.name}),this.switchSiteOnSelect&&this.activeSiteId!==e.id&&qi.loadSite(e.id))},onBlur:function(){this.showSitesList=!1,this.$emit("blur")},onClickSelector:function(){this.hasMultipleSites&&(this.showSitesList=!this.showSitesList,this.isLoading||this.searchTerm||this.loadInitialSites())},onPressEnter:function(e){"Enter"===e.key&&(e.preventDefault(),this.showSitesList=!this.showSitesList,this.showSitesList&&!this.isLoading&&this.loadInitialSites())},getMatchedSiteName:function(e){var t=e.toUpperCase().indexOf(this.searchTerm.toUpperCase());if(-1===t||this.isLoading)return S.helper.htmlEntities(e);var n=S.helper.htmlEntities(e.substring(0,t)),r=S.helper.htmlEntities(e.substring(t+this.searchTerm.length));return"".concat(n,'').concat(this.searchTerm,"").concat(r)},loadInitialSites:function(){var e=this;return qi.loadInitialSites().then((function(t){e.sites=t||[]}))},searchSite:function(e){var t=this;this.isLoading=!0,qi.searchSite(e,this.onlySitesWithAdminAccess).then((function(n){e===t.searchTerm&&n&&(t.sites=n)})).finally((function(){t.isLoading=!1}))},getUrlForSiteId:function(e){var t=Ce.stringify(Object.assign(Object.assign({},Ce.urlParsed.value),{},{segment:"",idSite:e})),n=Ce.stringify(Object.assign(Object.assign({},Ce.hashParsed.value),{},{segment:"",idSite:e}));return"?".concat(t,"#?").concat(n)}}});Gi.render=xi;var zi=Gi; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */jt({component:zi,require:"?ngModel",scope:{showSelectedSite:{angularJsBind:"="},showAllSitesItem:{angularJsBind:"="},switchSiteOnSelect:{angularJsBind:"="},onlySitesWithAdminAccess:{angularJsBind:"="},name:{angularJsBind:"@"},allSitesText:{angularJsBind:"@"},allSitesLocation:{angularJsBind:"@"},placeholder:{angularJsBind:"@"},modelValue:{default:function(e,t,n){return n.siteid&&n.sitename?{id:n.siteid,name:S.helper.htmlDecode(n.sitename)}:S.idSite?{id:S.idSite,name:S.helper.htmlDecode(S.siteName)}:void 0}}},$inject:["$timeout"],directiveName:"piwikSiteselector",events:{"update:modelValue":function(e,t,n,r,i,a,o){(e&&!t.modelValue||!e&&t.modelValue||e.id!==t.modelValue.id)&&o((function(){n.value=e,r.attr("siteid",e.id),r.trigger("change",e),a&&(a.$setViewValue(e),a.$render())}))},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}},postCreate:function(e,t,n,r,i){var o=i;t.$watch("value",(function(t){Object(a["nextTick"])((function(){t!==e.modelValue&&(e.modelValue=t)}))})),r.siteid&&r.sitename?e.modelValue={id:r.siteid,name:S.helper.htmlDecode(r.sitename)}:S.idSite&&(e.modelValue={id:S.idSite,name:S.helper.htmlDecode(S.siteName)}),o&&(o.$setViewValue(e.modelValue),o.$render=function(){Object(a["nextTick"])((function(){Object(a["nextTick"])((function(){window.angular.isString(o.$viewValue)?e.modelValue=JSON.parse(o.$viewValue):e.modelValue=o.$viewValue}))}))})}}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function Yi(){return{get initialSites(){return qi.initialSites.value},loadSite:qi.loadSite.bind(qi),loadInitialSites:function(){return Et(qi.loadInitialSites())},searchSite:function(){return Et(qi.searchSite.apply(qi,arguments))}}}window.angular.module("piwikApp.service").factory("siteSelectorModel",Yi);var Qi={ref:"root",class:"quickAccessInside"},Ki=["title","placeholder"],Xi={class:"dropdown"},Zi={class:"no-result"},ea=["onClick"],ta=["onMouseenter","onClick"],na={class:"quickAccessMatomoSearch"},ra=["onMouseenter","onClick"],ia=["textContent"],aa={class:"quick-access-category helpCategory"},oa=["href"];function la(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",Qi,[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,Ki),[[a["vModelText"],e.searchTerm],[l,{},e.searchActive]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Xi,[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",Zi,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,ea),(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,ta)})),128))])})),128)),Object(a["createElementVNode"])("ul",na,[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,ia)],42,ra)),[[a["vShow"],e.hasSitesSelector&&!e.isLoading]])})),128))]),Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",aa,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,oa)],34)])],512),[[a["vShow"],e.searchTerm&&e.searchActive]])],512)),[[c,{blur:e.onBlur}]])}function ca(e){var t=e.getBoundingClientRect(),n=window.$(window);return t.top>=0&&t.left>=0&&t.bottom<=n.height()&&t.right<=n.width()}function sa(e){e&&e.scrollIntoView&&e.scrollIntoView()}var ua=Object(a["defineComponent"])({directives:{FocusAnywhereButHere:xt,FocusIf:Lt},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(),sa(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=Ji(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&&!ca(e)&&sa(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,qi.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){qi.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}}});ua.render=la;var da=ua; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */jt({component:da,directiveName:"piwikQuickAccess",events:{itemSelected:function(e,t,n,r,i,a,o){o()},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}}});function pa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ma={class:"fieldArray form-group"},fa={key:0,class:"fieldUiControl"},ha=["onClick","title"];function ga(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Field");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ma,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.modelValue,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["fieldArrayTable multiple valign-wrapper",pa({},"fieldArrayTable".concat(n),!0)]),key:n},[e.field.uiControl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",fa,[Object(a["createVNode"])(l,{"full-width":!0,"model-value":t,options:e.field.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(t,n)},placeholder:" ",uicontrol:e.field.uiControl,title:e.field.title,name:"".concat(e.name,"-").concat(n),"template-file":e.field.templateFile,component:e.field.component},null,8,["model-value","options","onUpdate:modelValue","uicontrol","title","name","template-file","component"])])):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,ha),[[a["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function va(e){return Oa(e)||wa(e)||ya(e)||ba()}function ba(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ya(e,t){if(e){if("string"===typeof e)return ja(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ja(e,t):void 0}}function wa(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Oa(e){if(Array.isArray(e))return ja(e)}function ja(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&this.modelValue){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}}}});Sa.render=ga;var Ca=Sa; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */jt({component:Ca,require:"?ngModel",scope:{name:{angularJsBind:"="},field:{angularJsBind:"="}},directiveName:"matomoFieldArray",events:{"update:modelValue":function(e,t,n,r,i,a){e!==t.modelValue&&(r.trigger("change",e),a&&a.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var a=i;a&&(a.$setViewValue(e.modelValue),a.$render=function(){window.angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue})}});function Ea(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Da={class:"multiPairField form-group"},Pa={key:1,class:"fieldUiControl fieldUiControl2"},Va={key:2,class:"fieldUiControl fieldUiControl3"},Na={key:3,class:"fieldUiControl fieldUiControl4"},Ta=["onClick","title"];function Aa(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Field");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Da,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.modelValue,(function(t,n){var r;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper",(r={},Ea(r,"multiPairFieldTable".concat(n),!0),Ea(r,"has".concat(e.fieldCount,"Fields"),!0),r)]),key:n},[e.field1?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:Object(a["normalizeClass"])(["fieldUiControl fieldUiControl1",{hasMultiFields:e.field1.type&&e.field2.type}])},[Object(a["createVNode"])(l,{"full-width":!0,modelValue:t[e.field1.key],"onUpdate:modelValue":[function(n){return t[e.field1.key]=n},function(t){return e.onEntryChange(n,e.field1.key,t)}],options:e.field1.availableValues,placeholder:" ",uicontrol:e.field1.uiControl,name:"".concat(e.name,"-p1-").concat(n),title:e.field1.title,"template-file":e.field1.templateFile,component:e.field1.component},null,8,["modelValue","onUpdate:modelValue","options","uicontrol","name","title","template-file","component"])],2)):Object(a["createCommentVNode"])("",!0),e.field2?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Pa,[Object(a["createVNode"])(l,{"full-width":!0,options:e.field2.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field2.key,t)},function(n){return t[e.field2.key]=n}],modelValue:t[e.field2.key],placeholder:" ",uicontrol:e.field2.uiControl,name:"".concat(e.name,"-p2-").concat(n),title:e.field2.title,"template-file":e.field2.templateFile,component:e.field2.component},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","name","title","template-file","component"])])):Object(a["createCommentVNode"])("",!0),e.field3?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Va,[Object(a["createVNode"])(l,{"full-width":!0,options:e.field3.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field3.key,t)},function(n){return t[e.field3.key]=n}],modelValue:t[e.field3.key],placeholder:" ",uicontrol:e.field3.uiControl,title:e.field3.title,"template-file":e.field3.templateFile,component:e.field3.component},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title","template-file","component"])])):Object(a["createCommentVNode"])("",!0),e.field4?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Na,[Object(a["createVNode"])(l,{"full-width":!0,options:e.field4.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field4.key,t)},function(n){return t[e.field4.key]=n}],modelValue:t[e.field4.key],placeholder:" ",uicontrol:e.field4.uiControl,title:e.field4.title,"template-file":e.field4.templateFile,component:e.field4.component},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title","template-file","component"])])):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,Ta),[[a["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function Ia(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xa(e){return Fa(e)||La(e)||Ma(e)||Ba()}function Ba(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ma(e,t){if(e){if("string"===typeof e)return Ra(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ra(e,t):void 0}}function La(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Fa(e){if(Array.isArray(e))return Ra(e)}function Ra(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&this.modelValue){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}},isEmptyValue:function(e){var t=this.fieldCount;if(4===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key]&&!e[this.field4.key])return!1}else if(3===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key])return!1}else if(2===t){if(!e[this.field1.key]&&!e[this.field2.key])return!1}else if(1===t&&!e[this.field1.key])return!1;return!0},makeEmptyValue:function(){var e={};return this.field1&&this.field1.key&&(e[this.field1.key]=""),this.field2&&this.field2.key&&(e[this.field2.key]=""),this.field3&&this.field3.key&&(e[this.field3.key]=""),this.field4&&this.field4.key&&(e[this.field4.key]=""),e}}});$a.render=Aa;var Ha=$a,Ua=(jt({component:Ha,require:"?ngModel",scope:{name:{angularJsBind:"="},field1:{angularJsBind:"="},field2:{angularJsBind:"="},field3:{angularJsBind:"="},field4:{angularJsBind:"="}},directiveName:"matomoMultiPairField",events:{"update:modelValue":function(e,t,n,r,i,a){e!==t.modelValue&&(r.trigger("change",e),a&&a.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var a=i;a&&(a.$setViewValue(e.modelValue),a.$render=function(){window.angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue})}}),{ref:"root",class:"periodSelector piwikSelector"}),qa=["title"],Wa=Object(a["createElementVNode"])("span",{class:"icon icon-calendar"},null,-1),Ja={id:"periodMore",class:"dropdown"},Ga={class:"flex"},za={key:0,class:"period-date"},Ya={class:"period-type"},Qa={id:"otherPeriods"},Ka=["onDblclick","title"],Xa=["id","checked","onChange","onDblclick"],Za={key:0,class:"compare-checkbox"},eo={id:"comparePeriodToDropdown"},to={key:1,class:"compare-date-range"},no={id:"comparePeriodStartDate"},ro=Object(a["createElementVNode"])("span",{class:"compare-dates-separator"},null,-1),io={id:"comparePeriodEndDate"},ao={class:"apply-button-container"},oo=["disabled","value"],lo={key:2,id:"ajaxLoadingCalendar"},co={class:"loadingSegment"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function so(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("DateRangePicker"),c=Object(a["resolveComponent"])("PeriodDatePicker"),s=Object(a["resolveComponent"])("Field"),u=Object(a["resolveComponent"])("ActivityIndicator"),d=Object(a["resolveDirective"])("expand-on-click");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ua,[Object(a["createElementVNode"])("a",{ref:"title",id:"date",class:"title",tabindex:"-1",title:e.translate("General_ChooseDate",e.currentlyViewingText)},[Wa,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.currentlyViewingText),1)],8,qa),Object(a["createElementVNode"])("div",Ja,[Object(a["createElementVNode"])("div",Ga,[Object(a["createElementVNode"])("div",null,[Object(a["withDirectives"])(Object(a["createVNode"])(l,{class:"period-range","start-date":e.startRangeDate,"end-date":e.endRangeDate,onRangeChange:t[0]||(t[0]=function(t){return e.onRangeChange(t.start,t.end)}),onSubmit:t[1]||(t[1]=function(t){return e.onApplyClicked()})},null,8,["start-date","end-date"]),[[a["vShow"],"range"===e.selectedPeriod]]),"range"!==e.selectedPeriod?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",za,[Object(a["createVNode"])(c,{id:"datepicker",period:e.selectedPeriod,date:e.periodValue===e.selectedPeriod?e.dateValue:null,onSelect:t[2]||(t[2]=function(t){return e.setPiwikPeriodAndDate(e.selectedPeriod,t.date)})},null,8,["period","date"])])):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",Ya,[Object(a["createElementVNode"])("h6",null,Object(a["toDisplayString"])(e.translate("General_Period")),1),Object(a["createElementVNode"])("div",Qa,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.periodsFiltered,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("p",{key:n},[Object(a["createElementVNode"])("label",{class:Object(a["normalizeClass"])({"selected-period-label":n===e.selectedPeriod}),onDblclick:function(t){return e.changeViewedPeriod(n)},title:n===e.periodValue?"":e.translate("General_DoubleClickToChangePeriod")},[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"radio",name:"period",id:"period_id_".concat(n),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.selectedPeriod=t}),checked:e.selectedPeriod===n,onChange:function(t){return e.selectedPeriod=n},onDblclick:function(t){return e.changeViewedPeriod(n)}},null,40,Xa),[[a["vModelRadio"],e.selectedPeriod]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.getPeriodDisplayText(n)),1)],42,Ka)])})),128))])])]),e.isComparisonEnabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Za,[Object(a["createElementVNode"])("label",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{id:"comparePeriodTo",type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=function(t){return e.isComparing=t})},null,512),[[a["vModelCheckbox"],e.isComparing]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("General_CompareTo")),1)]),Object(a["createElementVNode"])("div",eo,[Object(a["createVNode"])(s,{modelValue:e.comparePeriodType,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.comparePeriodType=t}),style:Object(a["normalizeStyle"])({visibility:e.isComparing?"visible":"hidden"}),name:"comparePeriodToDropdown",uicontrol:"select",options:e.comparePeriodDropdownOptions,"full-width":!0,disabled:!e.isComparing},null,8,["modelValue","style","options","disabled"])])])):Object(a["createCommentVNode"])("",!0),e.isComparing&&"custom"===e.comparePeriodType?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",to,[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",no,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{modelValue:e.compareStartDate,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.compareStartDate=t}),name:"comparePeriodStartDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_StartDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])]),ro,Object(a["createElementVNode"])("div",io,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{modelValue:e.compareEndDate,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.compareEndDate=t}),name:"comparePeriodEndDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_EndDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])])])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",ao,[Object(a["createElementVNode"])("input",{type:"submit",id:"calendarApply",class:"btn",onClick:t[8]||(t[8]=function(t){return e.onApplyClicked()}),disabled:!e.isApplyEnabled(),value:e.translate("General_Apply")},null,8,oo)]),e.isLoadingNewPage?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",lo,[Object(a["createVNode"])(u,{loading:!0}),Object(a["createElementVNode"])("div",co,Object(a["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)])):Object(a["createCommentVNode"])("",!0)])],512)),[[d,{expander:"title"}]])}var uo={class:"loadingPiwik"},po=Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:""},null,-1);function mo(e,t,n,r,i,o){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",uo,[po,Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.loadingMessage),1)],512)),[[a["vShow"],e.loading]])}var fo=Object(a["defineComponent"])({props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:C("General_LoadingData")}}});fo.render=mo;var ho=fo;function go(e,t){return Oo(e)||wo(e,t)||bo(e,t)||vo()}function vo(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function bo(e,t){if(e){if("string"===typeof e)return yo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yo(e,t):void 0}}function yo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nr?(window.$("#alert").find("h2").text(C("General_InvalidDateRange")),S.helper.modalConfirm("#alert",{}),null):"".concat(e,",").concat(t)}return E(this.dateValue)}},methods:{handleZIndexPositionRelativeCompareDropdownIssue:function(){var e=window.$(this.$refs.root);e.on("focus","#comparePeriodToDropdown .select-dropdown",(function(){e.addClass("compare-dropdown-open")})).on("blur","#comparePeriodToDropdown .select-dropdown",(function(){e.removeClass("compare-dropdown-open")}))},changeViewedPeriod:function(e){e!==this.periodValue&&"range"!==e&&this.setPiwikPeriodAndDate(e,this.dateValue)},setPiwikPeriodAndDate:function(e,t){this.periodValue=e,this.selectedPeriod=e,this.dateValue=t;var n=E(t);this.setRangeStartEndFromPeriod(e,n),this.propagateNewUrlParams(n,this.selectedPeriod),window.initTopControls()},propagateNewUrlParams:function(e,t){var n,r=this.selectedComparisonParams;S.helper.isAngularRenderingThePage()?(this.closePeriodSelector(),n=Ce.hashParsed.value):(this.isLoadingNewPage=!0,n=Ce.parsed.value);var i=Object.assign({},n);delete i.comparePeriods,delete i.compareDates,Ce.updateLocation(Object.assign(Object.assign({},i),{},{date:e,period:t},r))},onApplyClicked:function(){if("range"===this.selectedPeriod){var e=this.selectedDateString;if(!e)return;return this.periodValue="range",void this.propagateNewUrlParams(e,"range")}this.setPiwikPeriodAndDate(this.selectedPeriod,this.dateValue)},updateSelectedValuesFromHash:function(){var e=Ce.parsed.value.date,t=Ce.parsed.value.period;this.periodValue=t,this.selectedPeriod=t,this.dateValue=null,this.startRangeDate=null,this.endRangeDate=null;try{p.parse(t,e)}catch(l){return}if("range"===t){var n=p.get(t).parse(e),r=n.getDateRange(),i=go(r,2),a=i[0],o=i[1];this.dateValue=a,this.startRangeDate=E(a),this.endRangeDate=E(o)}else this.dateValue=P(e),this.setRangeStartEndFromPeriod(t,e)},setRangeStartEndFromPeriod:function(e,t){var n=p.parse(e,t).getDateRange();this.startRangeDate=E(n[0]Eo?Eo:n[1])},getPeriodDisplayText:function(e){return p.get(e).getDisplayText()},onRangeChange:function(e,t){e&&t?(this.isRangeValid=!0,this.startRangeDate=e,this.endRangeDate=t):this.isRangeValid=!1},isApplyEnabled:function(){return!("range"===this.selectedPeriod&&!this.isRangeValid)&&!(this.isComparing&&"custom"===this.comparePeriodType&&!this.isCompareRangeValid())},closePeriodSelector:function(){this.$refs.root.classList.remove("expanded")},isCompareRangeValid:function(){try{P(this.compareStartDate)}catch(e){return!1}try{P(this.compareEndDate)}catch(e){return!1}return!0}}});Po.render=so;var Vo=Po,No=(jt({component:Vo,scope:{periods:{angularJsBind:"<"}},directiveName:"piwikPeriodSelector"}),{class:"reportingMenu"}),To=["aria-label"],Ao=["onClick"],Io={class:"hidden"},xo={role:"menu"},Bo=["href","onClick","title"],Mo=["href","onClick"],Lo=["onClick"],Fo=Object(a["createElementVNode"])("span",{class:"icon-help"},null,-1),Ro=[Fo],_o={id:"mobile-left-menu",class:"sidenav hide-on-large-only"},$o={class:"collapsible collapsible-accordion"},Ho={class:"collapsible-header"},Uo={class:"collapsible-body"},qo={key:0},Wo=["onClick","href"],Jo={key:1},Go=["onClick","href"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function zo(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("MenuDropdown"),c=Object(a["resolveDirective"])("side-nav");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",No,[Object(a["createElementVNode"])("ul",{class:"navbar hide-on-med-and-down",role:"menu","aria-label":e.translate("CoreHome_MainNavigation")},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menu,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["menuTab",{active:t.id===e.activeCategory}]),role:"menuitem",key:t.id},[Object(a["createElementVNode"])("a",{class:"item",tabindex:"5",href:"",onClick:Object(a["withModifiers"])((function(n){return e.loadCategory(t)}),["prevent"])},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])("menu-icon ".concat(t.icon?t.icon:"icon-arrow-right"))},null,2),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name)+" ",1),Object(a["createElementVNode"])("span",Io,Object(a["toDisplayString"])(e.translate("CoreHome_Menu")),1)],8,Ao),Object(a["createElementVNode"])("ul",xo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{role:"menuitem",class:Object(a["normalizeClass"])({active:(n.id===e.displayedSubcategory||n.isGroup&&e.activeSubsubcategory===e.displayedSubcategory)&&t.id===e.displayedCategory}),key:n.id},[n.isGroup?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,"show-search":!0,"menu-title":e.htmlEntities(n.name)},{default:Object(a["withCtx"])((function(){return[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(n.subcategories,(function(r){return Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{class:Object(a["normalizeClass"])(["item",{active:r.id===e.activeSubsubcategory&&n.id===e.displayedSubcategory&&t.id===e.displayedCategory}]),tabindex:"5",href:"#?".concat(e.makeUrl(t,r)),onClick:function(n){return e.loadSubcategory(t,r,n)},title:r.tooltip,key:r.id},Object(a["toDisplayString"])(r.name),11,Bo)})),128))]})),_:2},1032,["menu-title"])):Object(a["createCommentVNode"])("",!0),n.isGroup?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,href:"#?".concat(e.makeUrl(t,n)),class:"item",onClick:function(r){return e.loadSubcategory(t,n,r)}},Object(a["toDisplayString"])(n.name),9,Mo)),n.help?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:2,class:Object(a["normalizeClass"])(["item-help-icon",{active:e.helpShownCategory&&e.helpShownCategory.subcategory===n.id&&e.helpShownCategory.category===t.id&&n.help}]),tabindex:"5",href:"javascript:",onClick:function(r){return e.showHelp(t,n,r)}},Ro,10,Lo)):Object(a["createCommentVNode"])("",!0)],2)})),128))])],2)})),128))],8,To),Object(a["createElementVNode"])("ul",_o,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menu,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:"no-padding",key:t.id},[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",$o,[Object(a["createElementVNode"])("li",null,[Object(a["createElementVNode"])("a",Ho,[Object(a["createElementVNode"])("i",{class:Object(a["normalizeClass"])(t.icon?t.icon:"icon-arrow-bottom")},null,2),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name),1)]),Object(a["createElementVNode"])("div",Uo,[Object(a["createElementVNode"])("ul",null,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{key:n.id},[n.isGroup?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",qo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(n.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n)),key:n.id},Object(a["toDisplayString"])(n.name),9,Wo)})),128))])):Object(a["createCommentVNode"])("",!0),n.isGroup?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Jo,[Object(a["createElementVNode"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n))},Object(a["toDisplayString"])(n.name),9,Go)]))])})),128))])])])],512),[[c,{activator:e.sideNavActivator}]])])})),128))])])}var Yo={key:0},Qo=["data-notification-instance-id"],Ko={key:1},Xo={class:"notification-body"},Zo=["innerHTML"],el={key:1};function tl(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createBlock"])(a["Transition"],{name:"toast"===e.type?"slow-fade-out":void 0,onAfterLeave:t[1]||(t[1]=function(t){return e.toastClosed()})},{default:Object(a["withCtx"])((function(){return[e.deleted?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Yo,[Object(a["createVNode"])(a["Transition"],{name:"toast"===e.type?"toast-slide-up":void 0,appear:""},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(a["Transition"],{name:e.animate?"fade-in":void 0,appear:""},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["notification system",e.cssClasses]),style:Object(a["normalizeStyle"])(e.style),ref:"root","data-notification-instance-id":e.notificationInstanceId},[e.canClose?(Object(a["openBlock"])(),Object(a["createElementBlock"])("button",{key:0,type:"button",class:"close","data-dismiss":"alert",onClick:t[0]||(t[0]=function(t){return e.closeNotification(t)})}," × ")):Object(a["createCommentVNode"])("",!0),e.title?(Object(a["openBlock"])(),Object(a["createElementBlock"])("strong",Ko,Object(a["toDisplayString"])(e.title),1)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Xo,[e.message?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.message)},null,8,Zo)):Object(a["createCommentVNode"])("",!0),e.message?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",el,[Object(a["renderSlot"])(e.$slots,"default")]))])],14,Qo)]})),_:3},8,["name"])])]})),_:3},8,["name"])]))]})),_:3},8,["name"])}var nl=window,rl=nl.$,il=Object(a["defineComponent"])({props:{notificationId:String,notificationInstanceId:String,title:String,context:String,type:String,noclear:Boolean,toastLength:{type:Number,default:12e3},style:[String,Object],animate:Boolean,message:String,cssClass:String},computed:{cssClasses:function(){var e={};return this.context&&(e["notification-".concat(this.context)]=!0),this.cssClass&&(e[this.cssClass]=!0),e},canClose:function(){return"persistent"===this.type||!this.noclear}},emits:["closed"],data:function(){return{deleted:!1}},mounted:function(){var e=this,t=function(){setTimeout((function(){e.deleted=!0}),e.toastLength)};"toast"===this.type&&t(),this.style&&rl(this.$refs.root).css(this.style)},methods:{toastClosed:function(){var e=this;Object(a["nextTick"])((function(){e.$emit("closed")}))},closeNotification:function(e){var t=this;this.canClose&&e&&e.target&&(this.deleted=!0,Object(a["nextTick"])((function(){t.$emit("closed")}))),this.markNotificationAsRead()},markNotificationAsRead:function(){this.notificationId&&Xe.post({module:"CoreHome",action:"markNotificationAsRead"},{notificationId:this.notificationId},{withTokenInUrl:!0})}}});il.render=tl;var al=il; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */jt({component:al,scope:{notificationId:{angularJsBind:"@?"},title:{angularJsBind:"@?notificationTitle"},context:{angularJsBind:"@?"},type:{angularJsBind:"@?"},noclear:{angularJsBind:"@?",transform:kt},toastLength:{angularJsBind:"@?"}},directiveName:"piwikNotification",transclude:!0});function ol(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ll(e,t){for(var n=0;n'),n="".concat(r," #modalNotificationContainer"),t=this.prependNotification)}var a=e.group||(n?n.toString():"");this.initializeNotificationContainer(n,a);var o=(this.nextNotificationId+=1).toString();return t.call(this,Object.assign(Object.assign({},e),{},{noclear:!!e.noclear,group:a,notificationId:e.id,notificationInstanceId:o,type:e.type||"transient"})),o}},{key:"scrollToNotification",value:function(e){setTimeout((function(){var t=document.querySelector("[data-notification-instance-id='".concat(e,"']"));t&&S.helper.lazyScrollTo(t,250)}))}},{key:"toast",value:function(e){this.checkMessage(e.message);var t=e.placeat?dl(e.placeat):void 0;if(!t||!t.length)throw new Error("A valid selector is required for the placeat option when using Notification.toast().");var n=document.createElement("div");n.style.position="absolute",n.style.top="".concat(t.offset().top,"px"),n.style.left="".concat(t.offset().left,"px"),n.style.zIndex="1000",document.body.appendChild(n);var r=ut({render:function(){return Object(a["createVNode"])(al,Object.assign(Object.assign({},e),{},{notificationId:e.id,type:"toast",onClosed:function(){r.unmount()}}))}});r.mount(n)}},{key:"initializeNotificationContainer",value:function(e,t){if(e){var n=dl(e);if(!n.children(".notification-group").length){var r=window.CoreHome.NotificationGroup,i=ut({template:'',data:function(){return{group:t}}});i.component("NotificationGroup",r),i.mount(n[0])}}}},{key:"checkMessage",value:function(e){if(!e)throw new Error("No message given, cannot display notification")}}]),e}(),ml=new pl,fl=ml;dl((function(){return ml.parseNotificationDivs()})), /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ window.angular.module("piwikApp").factory("notifications",(function(){return fl}));var hl={class:"notification-group"},gl=["innerHTML"];function vl(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Notification");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",hl,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.notifications,(function(t,n){return Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:t.id||"no-id-".concat(n),"notification-id":t.id,title:t.title,context:t.context,type:t.type,noclear:t.noclear,"toast-length":t.toastLength,style:Object(a["normalizeStyle"])(t.style),animate:t.animate,message:t.message,"notification-instance-id":t.notificationInstanceId,"css-class":t.class,onClosed:function(n){return e.removeNotification(t.id)}},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",{innerHTML:e.$sanitize(t.message)},null,8,gl)]})),_:2},1032,["notification-id","title","context","type","noclear","toast-length","style","animate","message","notification-instance-id","css-class","onClosed"])})),128))])}var bl=Object(a["defineComponent"])({props:{group:String},components:{Notification:al},computed:{notifications:function(){var e=this;return fl.state.notifications.filter((function(t){return e.group?e.group===t.group:!t.group}))}},methods:{removeNotification:function(e){fl.remove(e)}}});bl.render=vl;var yl=bl; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function wl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ol(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nt.order?1:0})),t} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function Il(e){var t=e;return t.subcategories?t.subcategories:[]} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function xl(e){var t=e;return t.subcategories?t.subcategories:[]}function Bl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ml(e,t){for(var n=0;n".concat(o,"
");fl.show({context:"info",id:Ql,type:"help",noclear:!0,class:"help-notification",message:l+t.help,placeat:"#notificationContainer",prepend:!0}),this.helpShownCategory={category:e.id,subcategory:t.id}}}});Kl.render=zo;var Xl=Kl; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */jt({component:Xl,directiveName:"piwikReportingMenu"}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function Zl(e){return e.forEach((function(e){e.id===$l.activeCategory.value&&(e.active=!0,(e.subcategories||[]).forEach((function(e){e.id===$l.activeSubcategory.value&&(e.active=!0,(e.subcategories||[]).forEach((function(e){e.id===$l.activeSubsubcategory.value&&(e.active=!0)})))})))})),e}function ec(){return{get menu(){return $l.menu.value},findSubcategory:$l.findSubcategory.bind($l),reloadMenuItems:function(){return $l.reloadMenuItems().then((function(e){return Zl(Et(e))}))},fetchMenuItems:function(){return $l.fetchMenuItems().then((function(e){return Zl(Et(e))}))}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function tc(){return{get pages(){return Cl.pages.value},findPageInCategory:function(){return Ct(Cl.findPageInCategory.apply(Cl,arguments))},findPage:function(){return Ct(Cl.findPage.apply(Cl,arguments))},reloadAllPages:function(){return Cl.reloadAllPages().then((function(e){return Et(e)}))},getAllPages:function(){return Cl.getAllPages().then((function(e){return Et(e)}))}}}function nc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rc(e,t){for(var n=0;n .card-content .card-title");o.length||(o=a.find("> h2")),o.length&&o.html(S.helper.htmlEntities(n.widgetName))}var l=S.helper.getAngularDependency("$rootScope"),c=l.$new();n.currentScope=c,S.helper.compileVueEntryComponents(a),S.helper.compileAngularComponents(a,{scope:c}),fl.parseNotificationDivs(),setTimeout((function(){S.postEvent("widget:loaded",{parameters:e,element:a})}))}})).catch((function(e){t===n.changeCounter&&(n.lastWidgetAbortController=null,n.cleanupLastWidgetContent(),n.loading=!1,"abort"!==e.xhrStatus&&(n.loadingFailed=!0))}))}}});mc.render=pc;var fc=mc; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */jt({component:fc,scope:{piwikWidgetLoader:{vue:"widgetParams",angularJsBind:"="},widgetName:{angularJsBind:"@"}},directiveName:"piwikWidgetLoader"});function hc(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Widget");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.actualContainer,(function(e,t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:t},[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(l,{widget:e,"prevent-recursion":!0},null,8,["widget"])])])})),128))])}function gc(e){return yc(e)||bc(e)||jc(e)||vc()}function vc(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function bc(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function yc(e){if(Array.isArray(e))return kc(e)}function wc(e,t){return Cc(e)||Sc(e,t)||jc(e,t)||Oc()}function Oc(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function jc(e,t){if(e){if("string"===typeof e)return kc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kc(e,t):void 0}}function kc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n"))}return{tooltipContent:e}},created:function(){var e=this,t=this.actualWidget;if(t&&t.middlewareParameters){var n=t.middlewareParameters;Xe.fetch(n).then((function(t){e.showWidget=!!t}))}else this.showWidget=!0},computed:{allWidgets:function(){return Yl.widgets.value},actualWidget:function(){var e=this,t=this.widget;if(t){var n=Object.assign({},t);if(t&&t.isReport&&!t.documentation){var r=lc.findReport(t.module,t.action);r&&r.documentation&&(n.documentation=r.documentation)}return t}if(this.containerid){var i=Yc(this.allWidgets,this.containerid);if(i){var a=Object.assign({},i);if(this.widgetized){a.isFirstInPage=!0,a.parameters=Object.assign(Object.assign({},a.parameters),{},{widget:"1"});var o=Gl(a);o&&(a.widgets=o.map((function(t){return Object.assign(Object.assign({},t),{},{parameters:Object.assign(Object.assign({},t.parameters),{},{widget:"1",containerId:e.containerid})})})))}return a}}return null}}});Qc.render=zc;var Kc=Qc,Xc=(jt({component:Kc,scope:{widget:{angularJsBind:"=?piwikWidget"},widgetized:{angularJsBind:"=?"},containerid:{angularJsBind:"@"}},directiveName:"piwikWidget"}),{class:"reporting-page"}),Zc={key:1,class:"col s12 l6 leftWidgetColumn"},es={key:2,class:"col s12 l6 rightWidgetColumn"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function ts(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("ActivityIndicator"),c=Object(a["resolveComponent"])("Widget");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Xc,[Object(a["createVNode"])(l,{loading:e.loading},null,8,["loading"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,Object(a["toDisplayString"])(e.translate("CoreHome_NoSuchPage")),513),[[a["vShow"],e.hasNoPage]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.widgets,(function(e){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"row",key:e.uniqueId},[e.group?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,class:"col s12 fullWidgetColumn",widget:e},null,8,["widget"])),e.group?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Zc,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.left,(function(e){return Object(a["openBlock"])(),Object(a["createBlock"])(c,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(a["createCommentVNode"])("",!0),e.group?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",es,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.right,(function(e){return Object(a["openBlock"])(),Object(a["createBlock"])(c,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(a["createCommentVNode"])("",!0)])})),128))])}function ns(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rs(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n'),""),type:"transient"})}function vs(){fl.remove("onlyRawData")}var bs=Object(a["defineComponent"])({components:{ActivityIndicator:ho,Widget:Kc},data:function(){return{loading:!1,hasRawData:!1,hasNoVisits:!1,dateLastChecked:null,hasNoPage:!1}},created:function(){var e=this;hs.resetPage(),this.loading=!0,this.renderInitialPage(),Object(a["watch"])((function(){return Ce.parsed.value}),(function(t,n){t.category===n.category&&t.subcategory===n.subcategory&&t.period===n.period&&t.date===n.date&&t.segment===n.segment&&JSON.stringify(t.compareDates)===JSON.stringify(n.compareDates)&&JSON.stringify(t.comparePeriods)===JSON.stringify(n.comparePeriods)&&JSON.stringify(t.compareSegments)===JSON.stringify(n.compareSegments)&&JSON.stringify(t.columns||"")===JSON.stringify(n.columns||"")||(t.date===n.date&&t.period===n.period||(vs(),e.dateLastChecked=null,e.hasRawData=!1,e.hasNoVisits=!1),e.renderPage(t.category,t.subcategory))})),S.on("loadPage",(function(t,n){e.renderPage(t,n)}))},computed:{widgets:function(){return hs.widgets.value}},methods:{renderPage:function(e,t){var n=this;if(!e||!t)return hs.resetPage(),void(this.loading=!1);var r=Ce.parsed.value,i=r.period,a=r.date;try{p.parse(i,a)}catch(l){return fl.show({id:"invalidDate",animate:!1,context:"error",message:C("CoreHome_DateInvalid"),type:"transient"}),hs.resetPage(),void(this.loading=!1)}fl.remove("invalidDate"),S.postEvent("piwikPageChange",{}),fl.clearTransientNotifications(),p.parse(i,a).containsToday()&&this.showOnlyRawDataMessageIfRequired();var o={category:e,subcategory:t};if(S.postEvent("ReportingPage.loadPage",o),o.promise)return this.loading=!0,void Promise.resolve(o.promise).finally((function(){n.loading=!1}));hs.fetchPage(e,t).then((function(){var t=!hs.page.value;if(t){var r=Cl.findPageInCategory(e);if(r&&r.subcategory)return void Ce.updateHash(Object.assign(Object.assign({},Ce.hashParsed.value),{},{subcategory:r.subcategory.id}))}n.hasNoPage=t,n.loading=!1}))},renderInitialPage:function(){var e=Ce.parsed.value;this.renderPage(e.category,e.subcategory)},showOnlyRawDataMessageIfRequired:function(){var e=this;this.hasRawData&&this.hasNoVisits&&gs();var t=Ce.parsed.value,n=t.segment;if(n)vs();else{var r=["Live_VisitorLog","General_RealTime","UserCountryMap_RealTimeMap","MediaAnalytics_TypeAudienceLog","MediaAnalytics_TypeRealTime","FormAnalytics_TypeRealTime","Goals_AddNewGoal"],i=["HeatmapSessionRecording_Heatmaps","HeatmapSessionRecording_SessionRecordings","Marketplace_Marketplace"],a=t.subcategory,o=t.category;if(-1===r.indexOf(a)&&-1===i.indexOf(o)&&-1===a.toLowerCase().indexOf("manage")){var l=6e4;this.dateLastChecked&&(new Date).valueOf()-this.dateLastChecked.valueOf()0?(e.hasNoVisits=!1,void vs()):(e.hasNoVisits=!0,e.hasRawData?void gs():Xe.fetch({method:"Live.getLastVisitsDetails",filter_limit:1,doNotFetchActions:1}))})).then((function(t){if(!t||0===t.length)return e.hasRawData=!1,void vs();e.hasRawData=!0,gs()}))}else vs()}}}});bs.render=ts;var ys=bs,ws=(jt({component:ys,directiveName:"piwikReportingPage"}),{class:"report-export-popover row",id:"reportExport"}),Os={class:"col l6"},js={name:"format"},ks={name:"option_flat"},Ss={name:"option_expanded"},Cs={name:"option_format_metrics"},Es={class:"col l6"},Ds={name:"filter_type"},Ps={class:"filter_limit"},Vs={name:"filter_limit_all"},Ns={key:0,name:"filter_limit"},Ts={key:1,name:"filter_limit"},As={class:"col l12"},Is=["value"],xs=Object(a["createTextVNode"])("\n "),Bs=[xs],Ms=["innerHTML"],Ls={class:"col l12"},Fs=["href","title"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function Rs(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Field"),c=Object(a["resolveDirective"])("select-on-focus");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ws,[Object(a["createElementVNode"])("div",Os,[Object(a["createElementVNode"])("div",js,[Object(a["createVNode"])(l,{uicontrol:"radio",name:"format",title:e.translate("CoreHome_ExportFormat"),modelValue:e.reportFormat,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.reportFormat=t}),"full-width":!0,options:e.availableReportFormats[e.reportType]},null,8,["title","modelValue","options"])]),Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",ks,[Object(a["withDirectives"])(Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"option_flat",title:e.translate("CoreHome_FlattenReport"),modelValue:e.optionFlat,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.optionFlat=t})},null,8,["title","modelValue"]),[[a["vShow"],e.hasSubtables]])])]),Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Ss,[Object(a["withDirectives"])(Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"option_expanded",title:e.translate("CoreHome_ExpandSubtables"),modelValue:e.optionExpanded,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.optionExpanded=t})},null,8,["title","modelValue"]),[[a["vShow"],e.hasSubtables&&!e.optionFlat]])])]),Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Cs,[Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"option_format_metrics",title:e.translate("CoreHome_FormatMetrics"),modelValue:e.optionFormatMetrics,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.optionFormatMetrics=t})},null,8,["title","modelValue"])])])]),Object(a["createElementVNode"])("div",Es,[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Ds,[Object(a["createVNode"])(l,{uicontrol:"radio",name:"filter_type",title:e.translate("CoreHome_ReportType"),modelValue:e.reportType,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.reportType=t}),"full-width":!0,options:e.availableReportTypes},null,8,["title","modelValue","options"])])]),Object(a["createElementVNode"])("div",Ps,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Vs,[Object(a["createVNode"])(l,{uicontrol:"radio",name:"filter_limit_all",title:e.translate("CoreHome_RowLimit"),modelValue:e.reportLimitAll,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.reportLimitAll=t}),"full-width":!0,options:e.limitAllOptions},null,8,["title","modelValue","options"])],512),[[a["vShow"],!e.maxFilterLimit||e.maxFilterLimit<=0]]),"no"===e.reportLimitAll&&e.maxFilterLimit<=0?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ns,[Object(a["createVNode"])(l,{uicontrol:"number",name:"filter_limit",min:1,modelValue:e.reportLimit,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.reportLimit=t}),"full-width":!0},null,8,["modelValue"])])):Object(a["createCommentVNode"])("",!0),"no"===e.reportLimitAll&&e.maxFilterLimit>0?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ts,[Object(a["createVNode"])(l,{uicontrol:"number",name:"filter_limit",min:1,max:e.maxFilterLimit,modelValue:e.reportLimit,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.reportLimit=t}),value:e.reportLimit,"full-width":!0,title:e.filterLimitTooltip},null,8,["max","modelValue","value","title"])])):Object(a["createCommentVNode"])("",!0)])]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",As,[Object(a["withDirectives"])(Object(a["createElementVNode"])("textarea",{readonly:"",class:"exportFullUrl",value:e.exportLinkWithoutToken},Bs,8,Is),[[c,{}]]),Object(a["createElementVNode"])("div",{class:"tooltip",innerHTML:e.$sanitize(e.translate("CoreHome_ExportTooltipWithLink","","","ENTER_YOUR_TOKEN_AUTH_HERE"))},null,8,Ms)],512),[[a["vShow"],e.showUrl]]),Object(a["createElementVNode"])("div",Ls,[Object(a["createElementVNode"])("a",{class:"btn",href:e.exportLink,target:"_new",title:e.translate("CoreHome_ExportTooltip")},Object(a["toDisplayString"])(e.translate("General_Export")),9,Fs),Object(a["createElementVNode"])("a",{href:"javascript:",onClick:t[8]||(t[8]=function(t){return e.showUrl=!e.showUrl}),class:"toggle-export-url"},[Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("CoreHome_ShowExportUrl")),513),[[a["vShow"],!e.showUrl]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("CoreHome_HideExportUrl")),513),[[a["vShow"],e.showUrl]])])])])}function _s(e,t){return Ws(e)||qs(e,t)||Hs(e,t)||$s()}function $s(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Hs(e,t){if(e){if("string"===typeof e)return Us(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Us(e,t):void 0}}function Us(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&e>this.maxFilterLimit&&(this.reportLimit=t)}},computed:{filterLimitTooltip:function(){var e=C("CoreHome_RowLimit"),t=this.maxFilterLimit?C("General_ComputedMetricMax",this.maxFilterLimit.toString()):"";return"".concat(e," (").concat(t,")")},exportLink:function(){return this.getExportLink(!0)},exportLinkWithoutToken:function(){return this.getExportLink(!1)}},methods:{getExportLink:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.reportFormat,n=this.apiMethod,r=this.reportType,i=this.dataTable;if(t){var a={},o="yes"===this.reportLimitAll?-1:this.reportLimit;this.requestParams&&"string"===typeof this.requestParams&&(a=JSON.parse(this.requestParams));var l=i.param,c=l.segment,s=l.label,u=l.idGoal,d=l.idDimension,p=l.idSite,m=i.param,f=m.date,h=m.period;"RSS"===t&&(f="last10"),"undefined"!==typeof i.param.dateUsedInGraph&&(f=i.param.dateUsedInGraph);var g=S.config.datatable_export_range_as_day.toLowerCase();-1!==g.indexOf(t.toLowerCase())&&"range"===i.param.period&&(h="day"),"range"===i.param.period&&"graphEvolution"===i.param.viewDataTable&&(h="day");var v={module:"API",format:t,idSite:p,period:h,date:f};if("processed"===r){v.method="API.getProcessedReport";var b=n.split("."),y=_s(b,2);v.apiModule=y[0],v.apiAction=y[1]}else v.method=n;if(i.param.compareDates&&i.param.compareDates.length&&(v.compareDates=i.param.compareDates,v.compare="1"),i.param.comparePeriods&&i.param.comparePeriods.length&&(v.comparePeriods=i.param.comparePeriods,v.compare="1"),i.param.compareSegments&&i.param.compareSegments.length&&(v.compareSegments=i.param.compareSegments,v.compare="1"),"undefined"!==typeof i.param.filter_pattern&&(v.filter_pattern=i.param.filter_pattern),"undefined"!==typeof i.param.filter_pattern_recursive&&(v.filter_pattern_recursive=i.param.filter_pattern_recursive),window.$.isPlainObject(a)&&Object.entries(a).forEach((function(e){var t=_s(e,2),n=t[0],r=t[1],i=r;!0===i?i=1:!1===i&&(i=0),v[n]=i})),this.optionFlat&&(v.flat=1,"undefined"!==typeof i.param.include_aggregate_rows&&"1"===i.param.include_aggregate_rows&&(v.include_aggregate_rows=1)),!this.optionFlat&&this.optionExpanded&&(v.expanded=1),this.optionFormatMetrics&&(v.format_metrics=1),i.param.pivotBy&&(v.pivotBy=i.param.pivotBy,v.pivotByColumnLimit=20,i.props.pivot_by_column&&(v.pivotByColumn=i.props.pivot_by_column)),"CSV"!==t&&"TSV"!==t&&"RSS"!==t||(v.translateColumnNames=1,v.language=S.language),"undefined"!==typeof c&&(v.segment=decodeURIComponent(c)),"undefined"!==typeof u&&"-1"!==u&&(v.idGoal=u),"undefined"!==typeof d&&"-1"!==d&&(v.idDimension=d),s){var w=s.split(",");if(w.length>1)v.label=w;else{var O=_s(w,1);v.label=O[0]}}v.token_auth="ENTER_YOUR_TOKEN_AUTH_HERE",!0===e&&(v.token_auth=S.token_auth,v.force_api_session=1),v.filter_limit=o;var j=window.location.href.split("?")[0];return"".concat(j,"?").concat(Ce.stringify(v))}}}});Gs.render=Rs;var zs=Gs,Ys=window,Qs=Ys.$,Ks={mounted:function(e,t){e.addEventListener("click",(function(){var n=Ce.hashParsed.value.popover,r=Qs(e).closest("[data-report]").data("uiControlObject"),i=window.Piwik_Popover.showLoading("Export"),a=t.value.reportFormats,o=r.param.filter_limit;t.value.maxFilterLimit>0&&(o=Math.min(o,t.value.maxFilterLimit));var l=!0===r.param.flat||1===r.param.flat||"1"===r.param.flat,c={initialReportType:"default",initialReportLimit:o>0?o:100,initialReportLimitAll:-1===o?"yes":"no",initialOptionFlat:l,initialOptionExpanded:!0,initialOptionFormatMetrics:!1,hasSubtables:l||r.numberOfSubtables>0,availableReportFormats:{default:a,processed:{XML:a.XML,JSON:a.JSON}},availableReportTypes:{default:C("CoreHome_StandardReport"),processed:C("CoreHome_ReportWithMetadata")},limitAllOptions:{yes:C("General_All"),no:C("CoreHome_CustomLimit")},maxFilterLimit:t.value.maxFilterLimit,dataTable:r,requestParams:t.value.requestParams,apiMethod:t.value.apiMethod},s=ut({template:'\n ',data:function(){return{bind:c}}});s.component("popover",zs);var u=document.createElement("div");s.mount(u);var d=t.value.reportTitle;window.Piwik_Popover.setTitle("".concat(C("General_Export")," ").concat(S.helper.htmlEntities(d))),window.Piwik_Popover.setContent(u),window.Piwik_Popover.onClose((function(){s.unmount(),""!==n&&setTimeout((function(){Ce.updateHash(Object.assign(Object.assign({},Ce.hashParsed.value),{},{popover:n})),t.value.onClose&&t.value.onClose()}),100)})),setTimeout((function(){i.dialog(),Qs(".exportFullUrl, .btn",i).tooltip({track:!0,show:!1,hide:!1})}),100)}))}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function Xs(e){return{restrict:"A",scope:{reportTitle:"@",requestParams:"@",reportFormats:"@",apiMethod:"@",maxFilterLimit:"@"},link:function(t,n){var r={instance:null,value:{reportTitle:t.reportTitle,requestParams:t.requestParams,reportFormats:"string"===typeof t.reportFormats?JSON.parse(t.reportFormats):t.reportFormats,apiMethod:t.apiMethod,maxFilterLimit:parseInt(t.maxFilterLimit,10),onClose:function(){e((function(){window.angular.element(document).injector().get("$rootScope").$apply()}),10)}},oldValue:null,modifiers:{},dir:{}};Ks.mounted(n[0],r)}}}Xs.$inject=["$timeout"],window.angular.module("piwikApp").directive("piwikReportExport",Xs);var Zs=["src"];function eu(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{src:e.sparklineUrl},null,8,Zs)}var tu=Object(a["defineComponent"])({props:{seriesIndices:Array,params:Object},data:function(){return{isWidget:!1}},mounted:function(){this.isWidget=!!this.$el.closest("[widgetId]")},computed:{sparklineUrl:function(){var e=this.seriesIndices,t=this.params,n=S.getSparklineColors();e&&(n.lineColor=n.lineColor.filter((function(t,n){return-1!==e.indexOf(n)})));var r=JSON.stringify(n),i={forceView:"1",viewDataTable:"sparkline",widget:this.isWidget?"1":"0",showtitle:"1",colors:r,random:Date.now(),date:this.defaultDate},a=new Xe,o=a.mixinDefaultGetParams(Object.assign(Object.assign({},i),t)),l=Ce.parsed.value.token_auth;return l&&l.length&&S.shouldPropagateTokenAuth&&(o.token_auth=l),"?".concat(Ce.stringify(o))},defaultDate:function(){if("range"===S.period)return"".concat(S.startDateString,",").concat(S.endDateString);var e=_.getLastNRange(S.period,30,S.currentDateString).getDateRange(),t=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay);e[0]100?100:this.progress<0?0:this.progress}}});cu.render=lu;var su=cu,uu=(jt({component:su,scope:{progress:{angularJsBind:"="},label:{angularJsBind:"="}},directiveName:"piwikProgressbar"}),{mounted:function(e){e.classList.add("piwik-content-intro")},updated:function(e){Object(a["nextTick"])((function(){e.classList.add("piwik-content-intro")}))}}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function du(){return{restrict:"A",link:function(e,t){uu.mounted(t[0])}}}window.angular.module("piwikApp").directive("piwikContentIntro",du); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */var pu={mounted:function(e){e.classList.add("card","card-table","entityTable")},updated:function(e){Object(a["nextTick"])((function(){e.classList.add("card","card-table","entityTable")}))}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function mu(){return{restrict:"A",link:function(e,t){pu.mounted(t[0])}}}window.angular.module("piwikApp").directive("piwikContentTable",mu);var fu={ref:"root"};function hu(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",fu,[Object(a["renderSlot"])(e.$slots,"default",{formData:e.formData,submitApiMethod:e.submitApiMethod,sendJsonPayload:e.sendJsonPayload,noErrorNotification:e.noErrorNotification,noSuccessNotification:e.noSuccessNotification,submitForm:e.submitForm,isSubmitting:e.isSubmitting,successfulPostResponse:e.successfulPostResponse,errorPostResponse:e.errorPostResponse})],512)}var gu=window,vu=gu.$,bu=Object(a["defineComponent"])({props:{formData:{type:Object,required:!0},submitApiMethod:{type:String,required:!0},sendJsonPayload:Boolean,noErrorNotification:Boolean,noSuccessNotification:Boolean},data:function(){return{isSubmitting:!1,successfulPostResponse:null,errorPostResponse:null}},emits:["update:modelValue"],mounted:function(){var e=this;vu(this.$refs.root).on("click","input[type=submit]",(function(){e.submitForm()}))},methods:{submitForm:function(){var e=this;this.successfulPostResponse=null,this.errorPostResponse=null;var t=this.formData;this.sendJsonPayload&&(t={data:JSON.stringify(this.formData)}),this.isSubmitting=!0,Xe.post({module:"API",method:this.submitApiMethod},t,{createErrorNotification:!this.noErrorNotification}).then((function(t){if(e.successfulPostResponse=t,!e.noSuccessNotification){var n=fl.show({message:C("General_YourChangesHaveBeenSaved"),context:"success",type:"toast",id:"ajaxHelper"});fl.scrollToNotification(n)}})).catch((function(t){e.errorPostResponse=t.message})).finally((function(){e.isSubmitting=!1}))}}});bu.render=hu;var yu=bu,wu=window,Ou=wu.$; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */function ju(e){return{restrict:"A",scope:{submitApiMethod:"=",sendJsonPayload:"=",noErrorNotification:"=",noSuccessNotification:"=",useCustomDataBinding:"="},require:"?ngModel",transclude:!0,compile:function(t,n){return n.noErrorNotification=!!n.noErrorNotification,function(t,n,r,i,o){if(!t.submitApiMethod)throw new Error("submitApiMethod is required");if(t.ajaxForm={},t.ajaxForm.submitApiMethod=t.submitApiMethod,t.ajaxForm.sendJsonPayload=t.sendJsonPayload,t.ajaxForm.noErrorNotification=t.noErrorNotification,t.ajaxForm.noSuccessNotification=t.noSuccessNotification,t.ajaxForm.data={},i){var l=e(r.ngModel);t.ajaxForm.data=l(t.$parent)}var c={mounted:function(e,n){t.ajaxForm.submitForm=n.value.submitForm}},s='\n \n \n ',u=ut({template:s,data:function(){return t.ajaxForm},setup:function(){var e=Object(a["ref"])(null);return{transcludeTarget:e}}});u.component("AjaxForm",yu),u.directive("SpecialBindDirective",c);var d=u.mount(n[0]);function p(e,n){var r,i=Ou(e).attr("name");r="checkbox"===Ou(e).attr("type")?Ou(e).is(":checked"):Ou(e).val(),t.ajaxForm.data[i]=r,n||setTimeout((function(){t.$apply()}),0)}n.on("$destroy",(function(){u.unmount()})),t.useCustomDataBinding||n.on("change","input,select",(function(e){p(e.target)})),o(t,(function(e,t){if(!t.useCustomDataBinding){var n=e.find("input,select").not("[type=submit]");n.each((function(){p(this,!0)}))}Ou(d.transcludeTarget).append(e)}))}}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function ku(e,t){var n,r=parseInt(t,10),i=parseInt(e,10)-r;return n=0===i||Number.isNaN(i)?0:0===r||Number.isNaN(r)?100:i/r*100,n}function Su(e){return"".concat(e>0?S.numbers.symbolPlus:"").concat(Math.round(e),"}%")}function Cu(e,t){var n=ku(e,t);return Su(n)} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ju.$inject=["$parse"],window.angular.module("piwikApp").directive("piwikAjaxForm",ju);var Eu=jt({component:ho,scope:{loading:{vue:"loading",angularJsBind:"<"},loadingMessage:{vue:"loadingMessage",angularJsBind:"<",default:function(){return C("General_LoadingData")}}},$inject:[],directiveName:"piwikActivityIndicator"});function Du(e,t,n){var r=new Date;n||(n=432e4),r.setTime(r.getTime()+n),document.cookie="".concat(e,"=").concat(t,"; expires=").concat(r.toUTCString(),"; path=/")}function Pu(e){var t="; ".concat(document.cookie),n=t.split("; ".concat(e,"="));if(2==n.length){var r=n.pop().split(";").shift();if("undefined"!==typeof r)return r}return null}function Vu(e){var t=new Date;t.setTime(t.getTime()+-864e5),document.cookie="".concat(e,"=; expires=").concat(t.toUTCString(),"; path=/")} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */}})})); //# sourceMappingURL=CoreHome.umd.min.js.map