/* Matomo Javascript - cb=5e28117f5002a8d906edf69e2ff9e9f8*/

(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 o(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(i,n,function(t){return e[t]}.bind(null,n));return i},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="plugins/CoreHome/vue/dist/",o(o.s="fae3")}({2342:function(e,t,o){"use strict";
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */window.hasBlockedContent=!1},"8bbf":function(t,o){t.exports=e},fae3:function(e,t,o){"use strict";if(o.r(t),o.d(t,"createVueApp",(function(){return ve})),o.d(t,"importPluginUmd",(function(){return Se})),o.d(t,"useExternalPluginComponent",(function(){return Ce})),o.d(t,"DirectiveUtilities",(function(){return De})),o.d(t,"debounce",(function(){return Pe})),o.d(t,"clone",(function(){return Te})),o.d(t,"VueEntryContainer",(function(){return Ne})),o.d(t,"ActivityIndicator",(function(){return We})),o.d(t,"MatomoLoader",(function(){return Ue})),o.d(t,"translate",(function(){return a})),o.d(t,"translateOrDefault",(function(){return r})),o.d(t,"externalRawLink",(function(){return ue})),o.d(t,"externalLink",(function(){return pe})),o.d(t,"Alert",(function(){return Ke})),o.d(t,"AjaxHelper",(function(){return te})),o.d(t,"setCookie",(function(){return q})),o.d(t,"getCookie",(function(){return W})),o.d(t,"deleteCookie",(function(){return z})),o.d(t,"MatomoUrl",(function(){return U})),o.d(t,"Matomo",(function(){return M})),o.d(t,"Periods",(function(){return c})),o.d(t,"Day",(function(){return f})),o.d(t,"Week",(function(){return O})),o.d(t,"Month",(function(){return j})),o.d(t,"Year",(function(){return S})),o.d(t,"Range",(function(){return k})),o.d(t,"format",(function(){return d})),o.d(t,"getToday",(function(){return u})),o.d(t,"parseDate",(function(){return p})),o.d(t,"todayIsInRange",(function(){return m})),o.d(t,"getWeekNumber",(function(){return h})),o.d(t,"datesAreInTheSamePeriod",(function(){return g})),o.d(t,"NumberFormatter",(function(){return ae})),o.d(t,"formatNumber",(function(){return me})),o.d(t,"formatPercent",(function(){return he})),o.d(t,"formatCurrency",(function(){return ge})),o.d(t,"formatEvolution",(function(){return be})),o.d(t,"calculateAndFormatEvolution",(function(){return fe})),o.d(t,"DropdownMenu",(function(){return Ye})),o.d(t,"FocusAnywhereButHere",(function(){return tt})),o.d(t,"FocusIf",(function(){return it})),o.d(t,"Tooltips",(function(){return ct})),o.d(t,"MatomoDialog",(function(){return mt})),o.d(t,"MatomoModal",(function(){return vt})),o.d(t,"ExpandOnClick",(function(){return Et})),o.d(t,"ExpandOnHover",(function(){return Nt})),o.d(t,"ShowSensitiveData",(function(){return Mt})),o.d(t,"DropdownButton",(function(){return Rt})),o.d(t,"DraggableList",(function(){return _t})),o.d(t,"SelectOnFocus",(function(){return Wt})),o.d(t,"CopyToClipboard",(function(){return Kt})),o.d(t,"SideNav",(function(){return Jt})),o.d(t,"EnrichedHeadline",(function(){return go})),o.d(t,"ContentBlock",(function(){return Do})),o.d(t,"Comparisons",(function(){return Ko})),o.d(t,"ComparisonsStore",(function(){return Wo})),o.d(t,"ComparisonsStoreInstance",(function(){return zo})),o.d(t,"MenuItemsDropdown",(function(){return si})),o.d(t,"DatePicker",(function(){return mi})),o.d(t,"DateRangePicker",(function(){return Ci})),o.d(t,"PeriodDatePicker",(function(){return Mi})),o.d(t,"Notification",(function(){return Wi})),o.d(t,"NotificationGroup",(function(){return tn})),o.d(t,"NotificationsStore",(function(){return Zi})),o.d(t,"ShowHelpLink",(function(){return ln})),o.d(t,"SitesStore",(function(){return un})),o.d(t,"SiteSelector",(function(){return Bn})),o.d(t,"QuickAccess",(function(){return sa})),o.d(t,"SearchInput",(function(){return ma})),o.d(t,"FieldArray",(function(){return ya})),o.d(t,"MultiPairField",(function(){return Ta})),o.d(t,"PeriodSelector",(function(){return rs})),o.d(t,"ReportingMenu",(function(){return Bs})),o.d(t,"ReportingMenuStore",(function(){return oa})),o.d(t,"ReportingPagesStore",(function(){return Gn})),o.d(t,"ReportMetadataStore",(function(){return Ms})),o.d(t,"WidgetsStore",(function(){return Ts})),o.d(t,"WidgetLoader",(function(){return Gs})),o.d(t,"ClientWidgetRenderer",(function(){return Qs})),o.d(t,"WidgetContainer",(function(){return tl})),o.d(t,"WidgetByDimensionContainer",(function(){return ul})),o.d(t,"Widget",(function(){return vl})),o.d(t,"ReportingPage",(function(){return Nl})),o.d(t,"ReportExport",(function(){return lc})),o.d(t,"Sparkline",(function(){return pc})),o.d(t,"Progressbar",(function(){return vc})),o.d(t,"ContentIntro",(function(){return Oc})),o.d(t,"ContentTable",(function(){return xc})),o.d(t,"AjaxForm",(function(){return Mc})),o.d(t,"Passthrough",(function(){return Lc})),o.d(t,"DataTableActions",(function(){return Ad})),o.d(t,"VersionInfoHeaderMessage",(function(){return Xd})),o.d(t,"MobileLeftMenu",(function(){return su})),o.d(t,"scrollToAnchorInUrl",(function(){return gu})),o.d(t,"SearchFiltersPersistenceStore",(function(){return Ws})),o.d(t,"AutoClearPassword",(function(){return vu})),o.d(t,"PasswordStrength",(function(){return wu})),o.d(t,"EntityDuplicatorModal",(function(){return $u})),o.d(t,"EntityDuplicatorAction",(function(){return zu})),o.d(t,"EntityDuplicatorStore",(function(){return Qu})),o.d(t,"BaseDuplicatorAdapter",(function(){return Ku})),"undefined"!==typeof window){var i=window.document.currentScript,n=i&&i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(o.p=n[1])}o("2342");
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
function a(e,...t){if(!e)return"";let o=t;return 1===t.length&&t[0]&&Array.isArray(t[0])&&([o]=t),window._pk_translate(e,o)}function r(e,...t){return e&&window.piwik_translations[e]?a(e,...t):e}function s(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */class l{constructor(){s(this,"periods",{}),s(this,"periodOrder",[])}addCustomPeriod(e,t){if(this.periods[e])throw new Error(`The "${e}" period already exists! It cannot be overridden.`);this.periods[e]=t,this.periodOrder.push(e)}getAllLabels(){return Array().concat(this.periodOrder)}get(e){const t=this.periods[e];if(!t)throw new Error("Invalid period label: "+e);return t}parse(e,t){return this.get(e).parse(t)}isRecognizedPeriod(e){return!!this.periods[e]}}var c=new l;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function d(e){return $.datepicker.formatDate("yy-mm-dd",e)}function u(){const e=new Date(Date.now());return e.setTime(e.getTime()+60*e.getTimezoneOffset()*1e3),e.setHours(e.getHours()+(window.piwik.timezoneOffset||0)/3600),e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e}function p(e){if(e instanceof Date)return e;const t=decodeURIComponent(e).trim();if(""===t)throw new Error("Invalid date, empty string.");if("today"===t||"now"===t)return u();if("yesterday"===t||"yesterdaySameTime"===t){const e=u();return e.setDate(e.getDate()-1),e}if(t.match(/^last[ -]?week$/i)){const e=u();return e.setDate(e.getDate()-7),e}if(t.match(/^last[ -]?month$/i)){const e=u();return e.setDate(1),e.setMonth(e.getMonth()-1),e}if(t.match(/^last[ -]?year$/i)){const e=u();return e.setFullYear(e.getFullYear()-1),e}return $.datepicker.parseDate("yy-mm-dd",t)}function m(e){return 2===e.length&&(u()>=e[0]&&u()<=e[1])}function h(e){const t=new Date(e.valueOf()),o=(e.getDay()+6)%7;t.setDate(t.getDate()-o+3);const i=t.valueOf();if(t.setMonth(0,1),4!==t.getDay()){const e=(4-t.getDay()+7)%7;t.setMonth(0,1+e)}return 1+Math.ceil((i-t.valueOf())/6048e5)}function g(e,t,o){const i=e.getFullYear(),n=e.getMonth(),a=e.getDate(),r=h(e),s=t.getFullYear(),l=t.getMonth(),c=t.getDate(),d=h(t);switch(o){case"day":return i===s&&n===l&&a===c;case"week":return i===s&&r===d;case"month":return i===s&&n===l;case"year":return i===s;default:return!1}}function b(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */class f{constructor(e){b(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new f(p(e))}static getDisplayText(){return a("Intl_PeriodDay")}getPrettyString(){return d(this.dateInPeriod)}getDateRange(){return[new Date(this.dateInPeriod.getTime()),new Date(this.dateInPeriod.getTime())]}containsToday(){return m(this.getDateRange())}}function v(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */c.addCustomPeriod("day",f);class O{constructor(e){v(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new O(p(e))}static getDisplayText(){return a("Intl_PeriodWeek")}getPrettyString(){const e=this.getDateRange(),t=d(e[0]),o=d(e[1]);return a("General_DateRangeFromTo",[t,o])}getDateRange(){const e=(this.dateInPeriod.getDay()+6)%7,t=new Date(this.dateInPeriod.getTime());t.setDate(this.dateInPeriod.getDate()-e);const o=new Date(t.getTime());return o.setDate(t.getDate()+6),[t,o]}containsToday(){return m(this.getDateRange())}}function y(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */c.addCustomPeriod("week",O);class j{constructor(e){y(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new j(p(e))}static getDisplayText(){return a("Intl_PeriodMonth")}getPrettyString(){const e=a("Intl_Month_Long_StandAlone_"+(this.dateInPeriod.getMonth()+1));return`${e} ${this.dateInPeriod.getFullYear()}`}getDateRange(){const e=new Date(this.dateInPeriod.getTime());e.setDate(1);const t=new Date(this.dateInPeriod.getTime());return t.setDate(1),t.setMonth(t.getMonth()+1),t.setDate(0),[e,t]}containsToday(){return m(this.getDateRange())}}function w(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */c.addCustomPeriod("month",j);class S{constructor(e){w(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new S(p(e))}static getDisplayText(){return a("Intl_PeriodYear")}getPrettyString(){return this.dateInPeriod.getFullYear().toString()}getDateRange(){const e=new Date(this.dateInPeriod.getTime());e.setMonth(0),e.setDate(1);const t=new Date(this.dateInPeriod.getTime());return t.setMonth(12),t.setDate(0),[e,t]}containsToday(){return m(this.getDateRange())}}function C(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */c.addCustomPeriod("year",S);class k{constructor(e,t,o){C(this,"startDate",void 0),C(this,"endDate",void 0),C(this,"childPeriodType",void 0),this.startDate=e,this.endDate=t,this.childPeriodType=o}static getLastNRange(e,t,o){const i=Math.max(parseInt(t.toString(),10)-1,0);if(Number.isNaN(i))throw new Error("Invalid range strAmount");let n=o?p(o):u(),a=new Date(n.getTime());if("day"===e)a.setDate(a.getDate()-i);else if("week"===e)a.setDate(a.getDate()-7*i);else if("month"===e)a.setDate(1),a.setMonth(a.getMonth()-i);else{if("year"!==e)throw new Error(`Unknown period type '${e}'.`);a.setFullYear(a.getFullYear()-i)}if("day"!==e){const t=c.periods[e].parse(a),o=c.periods[e].parse(n);[a]=t.getDateRange(),[,n]=o.getDateRange()}const r=new Date(1991,7,6);if(a.getTime()-r.getTime()<0)switch(e){case"year":a=new Date(1992,0,1);break;case"month":a=new Date(1991,8,1);break;case"week":a=new Date(1991,8,12);break;case"day":default:a=r;break}return new k(a,n,e)}static getLastNRangeChild(e,t,o){const i=t?p(t):u();let n=new Date(i.getTime()),a=new Date(i.getTime());if("day"===e)n.setDate(n.getDate()-o),a.setDate(a.getDate()-o);else if("week"===e)n.setDate(n.getDate()-7*o),a.setDate(a.getDate()-7*o);else if("month"===e)n.setDate(1),n.setMonth(n.getMonth()-o),a.setDate(1),a.setMonth(a.getMonth()-o);else{if("year"!==e)throw new Error(`Unknown period type '${e}'.`);n.setFullYear(n.getFullYear()-o),a.setFullYear(a.getFullYear()-o)}if("day"!==e){const t=c.periods[e].parse(n),o=c.periods[e].parse(a);[n]=t.getDateRange(),[,a]=o.getDateRange()}const r=new Date(1991,7,6);if(n.getTime()-r.getTime()<0)switch(e){case"year":n=new Date(1992,0,1);break;case"month":n=new Date(1991,8,1);break;case"week":n=new Date(1991,8,12);break;case"day":default:n=r;break}return new k(n,a,e)}static parse(e,t="day"){if(/^previous/.test(e)){const o=k.getLastNRange(t,"2").startDate;return k.getLastNRange(t,e.substring(8),o)}if(/^last/.test(e))return k.getLastNRange(t,e.substring(4));const o=decodeURIComponent(e).split(",");return new k(p(o[0]),p(o[1]),t)}static getDisplayText(){return a("General_DateRangeInPeriodList")}getPrettyString(){const e=d(this.startDate),t=d(this.endDate);return a("General_DateRangeFromTo",[e,t])}getDateRange(){return[this.startDate,this.endDate]}containsToday(){return m(this.getDateRange())}getDayCount(){return Math.ceil((this.endDate.getTime()-this.startDate.getTime())/864e5)+1}}c.addCustomPeriod("range",k);var D=o("8bbf");
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{piwik:E,broadcast:P,piwikHelper:T}=window;function x(e){if("string"!==typeof e)return;const t=e.trim();return t&&/^[A-Za-z0-9_]+$/.test(t)?t:void 0}function V(){const{CoreHome:e}=window;return null===e||void 0===e?void 0:e.ReportingMenuStore}function B(){const{CoreHome:e}=window;return null===e||void 0===e?void 0:e.ComparisonStoreInstance}function N(e){var t;if("string"!==typeof e)return;const o=e.trim(),i=B();if(i){const t=i.getSegmentComparisons();if(!o&&t.length)return t[0].title;const n=t.find(t=>t.params.segment===e);if(n)return n.title}if(!o)return a("SegmentEditor_DefaultAllVisits");const n=document.querySelector(".segmentEditorPanel .segmentationTitle"),r=null===n||void 0===n||null===(t=n.textContent)||void 0===t?void 0:t.trim();return r||a("SegmentEditor_CustomSegment")}E.helper=T,E.broadcast=P,E.updateTitle=async function(e,t,o,i,n){let r="",s="",l="";""!==t&&""!==e&&(l=c.parse(t,e).getPrettyString());const d=a("CoreHome_WebAnalyticsReports")+" - Matomo",u=V();if(u&&o&&i){var p,m,h,g;let e=u.findSubcategory(o,i);e.category||(await u.fetchMenuItems(),e=u.findSubcategory(o,i)),r=null!==(p=null===(m=e)||void 0===m||null===(m=m.category)||void 0===m?void 0:m.name)&&void 0!==p?p:"",s=null!==(h=null===(g=e)||void 0===g||null===(g=g.subcategory)||void 0===g?void 0:g.name)&&void 0!==h?h:"",r===s&&(s=""),r=T.htmlEntities(r),s=T.htmlEntities(s);const t=r?`${r}  ${s?"> "+s:""}`:"",a=N(n),c=a?T.htmlEntities(a):"";document.title=[E.siteName,l,t,c,d].filter(Boolean).join(" - ")}},E.hasUserCapability=function(e){return Array.isArray(E.userCapabilities)&&-1!==E.userCapabilities.indexOf(e)},E.on=function(e,t){function o(e){t(...e.detail)}t.wrapper=o,window.addEventListener(e,o)},E.off=function(e,t){t.wrapper&&window.removeEventListener(e,t.wrapper)},E.postEvent=function(e,...t){const o=new CustomEvent(e,{detail:t});window.dispatchEvent(o)},E.getLoginModule=function(){const e=x(E.loginModule);if(e)return e;const t=x(window.loginModule);return t||"Login"};const I=E;var M=I;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function F(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{piwik:R,broadcast:L}=window;function A(e,t){try{return c.parse(e,t),!0}catch(o){return!1}}class _{constructor(){F(this,"url",Object(D["ref"])(null)),F(this,"urlQuery",Object(D["computed"])(()=>this.url.value?this.url.value.search.replace(/^\?/,""):"")),F(this,"hashQuery",Object(D["computed"])(()=>this.url.value?this.url.value.hash.replace(/^[#/?]+/,""):"")),F(this,"urlParsed",Object(D["computed"])(()=>Object(D["readonly"])(this.parse(this.urlQuery.value)))),F(this,"hashParsed",Object(D["computed"])(()=>Object(D["readonly"])(this.parse(this.hashQuery.value)))),F(this,"parsed",Object(D["computed"])(()=>Object(D["readonly"])(Object.assign(Object.assign({},this.urlParsed.value),this.hashParsed.value)))),this.url.value=new URL(window.location.href),window.addEventListener("hashchange",e=>{this.url.value=new URL(e.newURL),this.updatePeriodParamsFromUrl(),this.updatePageTitle()}),this.updatePeriodParamsFromUrl(),this.updatePageTitle()}updateHashToUrl(e){const t="#"+e;window.location.hash===t?window.dispatchEvent(new HashChangeEvent("hashchange",{newURL:window.location.href,oldURL:window.location.href})):window.location.hash=t}updateHash(e){const t=this.getFinalHashParams(e),o=this.stringify(t);this.updateHashToUrl("?"+o)}updateUrl(e,t={}){const o="string"!==typeof e?this.stringify(e):e,i=Object.keys(t).length?this.getFinalHashParams(t,e):{},n=this.stringify(i);let a="?"+o;n.length&&(a=`${a}#?${n}`),window.broadcast.propagateNewPage("",void 0,void 0,void 0,a)}getFinalHashParams(e,t={}){const o="string"!==typeof e?e:this.parse(e),i="string"!==typeof e?t:this.parse(t);return Object.assign({period:i.period||this.parsed.value.period,date:i.date||this.parsed.value.date,segment:i.segment||this.parsed.value.segment},o)}updateLocation(e){M.helper.isReportingPage()?this.updateHash(e):this.updateUrl(e)}getSearchParam(e){const t=window.location.href.split("#"),o=new RegExp(e+"(\\[]|=)");if(t&&t[1]&&o.test(decodeURIComponent(t[1]))){const t=window.broadcast.getValueFromHash(e,window.location.href);if(t||"date"!==e&&"period"!==e&&"idSite"!==e)return t}return window.broadcast.getValueFromUrl(e,window.location.search)}parse(e){return L.getValuesFromUrl("?"+e,!0)}stringify(e){const t=Object.fromEntries(Object.entries(e).filter(([,e])=>""!==e&&null!==e&&void 0!==e));return $.param(t).replace(/%5B%5D/g,"[]").replace(/%2C/g,",").replace(/\+/g,"%20")}getMenuPathSuffix(){const e=this.getSearchParam("category"),t=this.getSearchParam("subcategory");return{category:decodeURIComponent(e),subcategory:decodeURIComponent(t)}}getDateAndPeriodFromUrl(){return{date:this.getSearchParam("date")||"",period:this.getSearchParam("period")||""}}updatePageTitle(){const{period:e,date:t}=this.getDateAndPeriodFromUrl(),{category:o,subcategory:i}=this.getMenuPathSuffix(),n=this.getSearchParam("segment")||"";R.updateTitle(t,e,o,i,n)}updatePeriodParamsFromUrl(){const{period:e,date:t}=this.getDateAndPeriodFromUrl();let o=t;if(!A(e,o))return;if(R.period===e&&R.currentDateString===o)return;R.period=e;const i=c.parse(e,o).getDateRange();R.startDateString=d(i[0]),R.endDateString=d(i[1]),"range"===R.period&&(o=`${R.startDateString},${R.endDateString}`),R.currentDateString=o}}const H=new _;var U=H;function q(e,t,o){const i=new Date;o||(o=432e4),i.setTime(i.getTime()+o),document.cookie=`${e}=${t}; expires=${i.toUTCString()}; path=/`}function W(e){const t="; "+document.cookie,o=t.split(`; ${e}=`);if(2==o.length){const e=o.pop().split(";").shift();if("undefined"!==typeof e)return e}return null}function z(e){const t=new Date;t.setTime(t.getTime()+-864e5),document.cookie=`${e}=; expires=${t.toUTCString()}; path=/`}function G(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */R.updatePeriodParamsFromUrl=H.updatePeriodParamsFromUrl.bind(H);const{$:K}=window;function Y(e,t){"abort"!==t&&e&&0!==e.status&&("undefined"!==typeof Piwik_Popover?Piwik_Popover.isOpen()&&e&&500===e.status?K(document.body).html(piwikHelper.escape(e.responseText)):K("#loadingError").show():console.log("Request failed: "+e.responseText))}function Q(e){return Object.prototype.hasOwnProperty.call(e,"segment")&&"undefined"!==typeof e.segment}window.globalAjaxQueue=[],window.globalAjaxQueue.active=0,window.globalAjaxQueue.clean=function(){for(let e=this.length;e>=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(...e){return this.active+=e.length,this.clean(),Array.prototype.push.call(this,...e)},window.globalAjaxQueue.abort=function(){this.forEach(e=>e&&e.abort&&e.abort()),this.splice(0,this.length),this.active=0};class J extends Error{}class X extends Error{constructor(e,t,o){super("Chunked bulk request failed."),G(this,"xhr",void 0),G(this,"status",void 0),G(this,"errorThrown",void 0),this.xhr=e,this.status=t,this.errorThrown=o}}class Z extends Error{constructor(){super("Chunked bulk request was aborted.")}}class ee extends Error{constructor(){super("Chunked bulk request timed out due to session expiration.")}}class te{static fetch(e,t={}){if(Array.isArray(e)&&t.returnResponseObject)throw new Error(this.UNSUPPORTED_BULK_RESPONSE_OBJECT_ERROR);const o=new te;if(t.withTokenInUrl&&o.withTokenInUrl(),t.errorElement&&o.setErrorElement(t.errorElement),t.redirectOnSuccess&&o.redirectOnSuccess(!0!==t.redirectOnSuccess?t.redirectOnSuccess:void 0),o.setFormat(t.format||"json"),Array.isArray(e))o.setBulkRequests(...e);else{Object.keys(e).forEach(e=>{if(/password/i.test(e))throw new Error(`Password parameters are not allowed to be sent as GET parameter. Please send ${e} as POST parameter instead.`)});const i=Q(e);let n={};if(i){let t=null;null!==e.segment&&(t=encodeURIComponent(e.segment)),n={segment:t}}o.addParams(Object.assign(Object.assign({module:"API",format:t.format||"json"},e),n),"get")}t.postParams&&o.addParams(t.postParams,"post"),t.headers&&(o.headers=Object.assign(Object.assign({},o.headers),t.headers));let i=!0;return"undefined"===typeof t.createErrorNotification||t.createErrorNotification||(o.useCallbackInCaseOfError(),o.setErrorCallback(null),i=!1),t.abortController&&(o.abortController=t.abortController),t.returnResponseObject&&(o.resolveWithHelper=!0),!1===t.abortable&&(o.abortable=!1),o.send().then(e=>{const t=e instanceof te?e.requestHandle.responseJSON:e,i="API.getBulkRequest"===o.postParams.method&&Array.isArray(t)?t:[t],n=i.filter(e=>"error"===e.result).map(e=>e.message);if(n.length)throw new J(n.filter(e=>e.length).join("\n"));return e}).catch(e=>{if(i||e instanceof J)throw e;let t="Something went wrong";e instanceof Z&&(t="Request was possibly aborted"),e instanceof ee&&(t="Session timed out");const o="object"===typeof e&&null!==e&&"status"in e?e.status:null;throw 504===o&&(t="Request was possibly aborted"),429===o&&(t="Rate Limit was exceed"),new Error(t)})}static getBulkRequestLimit(){const e=parseInt(""+M.apiBulkRequestLimit,10);return Number.isNaN(e)?-1:e}static splitIntoChunks(e,t){const o=[];for(let i=0;i<e.length;i+=t)o.push(e.slice(i,i+t));return o}hideLoadingElement(){this.loadingElement&&K(this.loadingElement).hide()}handleApiErrorResponseOrCallback(e,t,o){this.hideLoadingElement();const i="API.getBulkRequest"===this.postParams.method&&Array.isArray(e)?e:[e],n=i.filter(e=>"error"===e.result).map(e=>e.message).filter(e=>e.length).reduce((e,t)=>(e[t]=(e[t]||0)+1,e),{});if(n&&Object.keys(n).length&&!this.useRegularCallbackInCaseOfError){let e="";Object.keys(n).forEach(t=>{e.length&&(e+="<br />"),n[t]>1?e+=`${t} (${n[t]}x)`:e+=t});let t=null,o="toast";K(this.errorElement).length&&e.length&&(K(this.errorElement).show(),t=this.errorElement,o=null);const i=!document.querySelector("#login_form");if(e&&i){const i=window["require"]("piwik/UI"),n=new i.Notification;n.show(e,{placeat:t,context:"error",type:o,id:"ajaxHelper"}),n.scrollToNotification()}}else this.callback&&this.callback(e,t,o)}buildRequestUrl(e){const t=this.mixinDefaultGetParams(e);let o=this.getUrl;if("?"!==o[o.length-1]&&(o+="&"),Object.prototype.hasOwnProperty.call(t,"segment")){const e=t.segment;if(delete t.segment,null!==e&&"undefined"!==typeof e){const t=(""+e).replace(/&/g,"%26").replace(/#/g,"%23").replace(/\?/g,"%3F");o=`${o}segment=${t}&`}}if(t.date){const e=t.date.toString(),n=t.period;if(!/^[a-z0-9, -]+$/i.test(e))throw new Error(`Invalid date '${e}'.`);if(n&&c.isRecognizedPeriod(n)){const t=/^(last|previous)\d/i.test(e)||-1!==e.indexOf(",");try{t&&"range"!==n?k.parse(e,n):c.parse(n,e)}catch(i){throw new Error(`Invalid date '${e}' for period '${n}'.`)}}o=`${o}date=${encodeURIComponent(e).replace(/%2C/g,",")}&`,delete t.date}return o+=K.param(t),o}buildChunkedBulkAjaxCall(e){const t=this.buildRequestUrl(Object.assign({},this.getParams)),o=e.map(e=>"string"===typeof e?e:K.param(e));return K.ajax({type:"POST",async:!0,url:t,dataType:this.format||"json",headers:this.headers?this.headers:void 0,data:this.mixinDefaultPostParams(Object.assign(Object.assign({},this.postParams),{},{urls:o})),timeout:null!==this.timeout?this.timeout:void 0})}getBulkRequestUrls(){return"API.getBulkRequest"===this.postParams.method&&Array.isArray(this.postParams.urls)?this.postParams.urls:null}shouldSendBulkRequestInChunks(){const e=this.getBulkRequestUrls();if(!e)return!1;const t=te.getBulkRequestLimit();return t>0&&e.length>t}shouldRejectBulkResponseObjectRequest(){return!!this.getBulkRequestUrls()&&this.resolveWithHelper}sendBulkRequestInChunks(){const e=this.getBulkRequestUrls();if(!e)return Promise.resolve([]);const t=te.getBulkRequestLimit();if(t<=0)return Promise.resolve([]);try{this.buildRequestUrl(Object.assign({},this.getParams))}catch(h){return this.hideLoadingElement(),Promise.reject(h)}const o=this.abortController||new AbortController;this.abortController=o;let i=null,n=!1,a=!1;const r=()=>{!n&&this.abortable&&(window.globalAjaxQueue.active-=1,n=!0)},s=(e,t)=>{!a&&this.completeCallback&&(a=!0,this.completeCallback(e,t))},l={readyState:1,status:0,statusText:"",responseJSON:[],abort:()=>{o.abort()}},c=l;let d=c;this.requestHandle=c,this.abortable&&window.globalAjaxQueue.push(c),o.signal.addEventListener("abort",()=>{i&&i.abort()});const u=te.splitIntoChunks(e,t),p=[],m=e=>e>=u.length?Promise.resolve(p):(i=this.buildChunkedBulkAjaxCall(u[e]),new Promise((e,t)=>{i.then((t,o,i)=>{d=i,l.readyState=i.readyState,l.status=i.status,l.statusText=i.statusText||o,Array.isArray(t)?p.push(...t):p.push(t),e(p)}).fail((e,o,i)=>{l.readyState=e.readyState,l.status=e.status,l.statusText=e.statusText||o,t(new X(e,o,i))})}).then(()=>m(e+1)));return m(0).then(e=>(l.readyState=4,l.responseJSON=e,this.handleApiErrorResponseOrCallback(e,"success",d),r(),s(d,"success"),M.ajaxRequestFinished&&M.ajaxRequestFinished(),e)).catch(e=>{if(!(e instanceof X))throw e;const{xhr:t,status:o,errorThrown:i}=e;if(r(),this.errorCallback&&this.errorCallback.apply(this,[t,o,i]),s(t,o),429===t.status)throw console.log(`Warning: the '${K.param(this.getParams)}' request was rate limited!`),t;if("abort"===t.statusText||0===t.status)throw new Z;const n=!document.querySelector("#login_form"),a="1"===t.getResponseHeader("X-Matomo-Session-Timed-Out");if(a&&n)throw q("matomo_session_timed_out","1",6e4),M.helper.refreshAfter(0),new ee;throw console.log(`Warning: the ${K.param(this.getParams)} request failed!`),t})}static post(e,t={},o={}){return te.fetch(e,Object.assign(Object.assign({},o),{},{postParams:t}))}static oneAtATime(e,t){let o=null;return(i,n)=>(o&&o.abort(),o=new AbortController,te.post(Object.assign(Object.assign({},i),{},{method:e}),n,Object.assign(Object.assign({},t),{},{abortController:o})).finally(()=>{o=null}))}constructor(){G(this,"format","json"),G(this,"timeout",null),G(this,"callback",null),G(this,"useRegularCallbackInCaseOfError",!1),G(this,"errorCallback",void 0),G(this,"withToken",!1),G(this,"completeCallback",void 0),G(this,"getParams",{}),G(this,"getUrl","?"),G(this,"postParams",{}),G(this,"loadingElement",null),G(this,"errorElement","#ajaxError"),G(this,"headers",{"X-Requested-With":"XMLHttpRequest"}),G(this,"requestHandle",null),G(this,"abortController",null),G(this,"abortable",!0),G(this,"defaultParams",["idSite","period","date","segment"]),G(this,"resolveWithHelper",!1),this.errorCallback=Y}addParams(e,t){const o="string"===typeof e?window.broadcast.getValuesFromUrl(e):e,i=["compareSegments","comparePeriods","compareDates"];Object.keys(o).forEach(e=>{let n=o[e];(-1===i.indexOf(e)||n)&&("boolean"===typeof n&&(n=n?1:0),"get"===t.toLowerCase()?this.getParams[e]=n:"post"===t.toLowerCase()&&(this.postParams[e]=n))})}withTokenInUrl(){this.withToken=!0}setUrl(e){this.addParams(broadcast.getValuesFromUrl(e),"GET")}setBulkRequests(...e){const t=e.map(e=>"string"===typeof e?e:K.param(e));this.addParams({module:"API",method:"API.getBulkRequest",urls:t,format:"json"},"post")}setTimeout(e){this.timeout=e}setCallback(e){this.callback=e}useCallbackInCaseOfError(){this.useRegularCallbackInCaseOfError=!0}redirectOnSuccess(e){this.setCallback(()=>{piwikHelper.redirect(e)})}setErrorCallback(e){this.errorCallback=e}setCompleteCallback(e){this.completeCallback=e}setFormat(e){this.format=e}setLoadingElement(e){this.loadingElement=e||"#ajaxLoadingDiv"}setErrorElement(e){e&&(this.errorElement=e)}useGETDefaultParameter(e){if(e&&this.defaultParams)for(let t=0;t<this.defaultParams.length;t+=1)if(this.defaultParams[t]===e)return!0;return!1}removeDefaultParameter(e){if(e&&this.defaultParams)for(let t=0;t<this.defaultParams.length;t+=1)this.defaultParams[t]===e&&this.defaultParams.splice(t,1)}send(){if(K(this.errorElement).length&&K(this.errorElement).hide(),this.shouldRejectBulkResponseObjectRequest())throw new Error(te.UNSUPPORTED_BULK_RESPONSE_OBJECT_ERROR);if(this.loadingElement&&K(this.loadingElement).fadeIn(),this.shouldSendBulkRequestInChunks())return this.sendBulkRequestInChunks();try{this.requestHandle=this.buildAjaxCall()}catch(t){return this.hideLoadingElement(),Promise.reject(t)}this.abortable&&window.globalAjaxQueue.push(this.requestHandle),this.abortController&&this.abortController.signal.addEventListener("abort",()=>{this.requestHandle&&this.requestHandle.abort()});const e=new Promise((e,t)=>{this.requestHandle.then(t=>{this.resolveWithHelper?e(this):e(t)}).fail(e=>{if(429===e.status)return console.log(`Warning: the '${K.param(this.getParams)}' request was rate limited!`),void t(e);if("abort"===e.statusText||0===e.status)return;const o=!document.querySelector("#login_form"),i="1"===e.getResponseHeader("X-Matomo-Session-Timed-Out");if(i&&o)return q("matomo_session_timed_out","1",6e4),void M.helper.refreshAfter(0);console.log(`Warning: the ${K.param(this.getParams)} request failed!`),t(e)})});return e}abort(){this.requestHandle&&"function"===typeof this.requestHandle.abort&&(this.requestHandle.abort(),this.requestHandle=null)}buildAjaxCall(){const e=this,t=this.buildRequestUrl(this.getParams),o={type:"POST",async:!0,url:t,dataType:this.format||"json",complete:this.completeCallback,headers:this.headers?this.headers:void 0,error:function(...t){e.abortable&&(window.globalAjaxQueue.active-=1),e.errorCallback&&e.errorCallback.apply(this,t)},success:(t,o,i)=>{this.handleApiErrorResponseOrCallback(t,o,i),e.abortable&&(window.globalAjaxQueue.active-=1),M.ajaxRequestFinished&&M.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return K.ajax(o)}isRequestToApiMethod(){return this.getParams&&"API"===this.getParams.module&&this.getParams.method||this.postParams&&"API"===this.postParams.module&&this.postParams.method}isWidgetizedRequest(){return"Widgetize"===broadcast.getValueFromUrl("module")}getDefaultPostParams(){return this.withToken||this.isRequestToApiMethod()||M.shouldPropagateTokenAuth?{token_auth:M.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}mixinDefaultPostParams(e){const t=this.getDefaultPostParams(),o=Object.assign(Object.assign({},t),e);return o}mixinDefaultGetParams(e){const t=U.getSearchParam("segment"),o={idSite:M.idSite?M.idSite.toString():broadcast.getValueFromUrl("idSite"),period:M.period||broadcast.getValueFromUrl("period"),segment:t},i=e,n=Q(i)||Q(this.postParams);return i.token_auth&&(i.token_auth=null,delete i.token_auth),Object.keys(o).forEach(e=>{!this.useGETDefaultParameter(e)||"segment"===e&&n||null!==i[e]&&"undefined"!==typeof i[e]&&""!==i[e]||null!==this.postParams[e]&&"undefined"!==typeof this.postParams[e]&&""!==this.postParams[e]||!o[e]||(i[e]=o[e])}),!this.useGETDefaultParameter("date")||i.date||this.postParams.date||(i.date=M.currentDateString),i}getRequestHandle(){return this.requestHandle}}function oe(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */G(te,"UNSUPPORTED_BULK_RESPONSE_OBJECT_ERROR","AjaxHelper returnResponseObject is not supported for bulk requests."),window.ajaxHelper=te;const{$:ie}=window;class ne{constructor(){oe(this,"defaultMinFractionDigits",0),oe(this,"defaultMaxFractionDigits",2)}format(e,t,o,i){if(!ie.isNumeric(e))return String(e);let n=e,a=t||M.numbers.patternNumber;const r=a.split(";");1===r.length&&r.push("-"+r[0]);const s=n<0;if(a=s?r[1]:r[0],n=Math.abs(n),o>=0){const e=10**o;n=Math.round(n*e)/e}const l=n.toString().split(".");let c=l[0],d=l[1]||"";const u=-1!==a.indexOf(",");if(u){const e=a.match(/#+0/),t=(null===e||void 0===e?void 0:e[0].length)||0;let o=(null===e||void 0===e?void 0:e[0].length)||0;const i=a.split(",");i.length>2&&(o=i[1].length);const n=c.split("").reverse();let r=[];r.push(n.splice(0,t).reverse().join(""));while(n.length)r.push(n.splice(0,o).reverse().join(""));r=r.reverse(),c=r.join(",")}if(i>0&&(d=d.replace(/0+$/,""),d.length<i&&d.length<o)){const e=i-d.length;d+=new Array(e+1).join("0")}let p=d?`${c}.${d}`:c;return p=a.replace(/#(?:[.,]#+)*0(?:[,.][0#]+)*/,p),this.replaceSymbols(p)}replaceSymbols(e){const t={".":M.numbers.symbolDecimal,",":M.numbers.symbolGroup,"+":M.numbers.symbolPlus,"-":M.numbers.symbolMinus,"%":M.numbers.symbolPercent};let o="";const i=e.split("");return i.forEach(e=>{let i=e;Object.entries(t).some(([e,t])=>-1!==i.indexOf(e)&&(i=i.replace(e,t),!0)),o+=i}),o}valOrDefault(e,t){return"undefined"===typeof e?t:e}getMaxFractionDigitsForCompactFormat(e){return 1===e?1:0}determineCorrectCompactPattern(e,t){let o=0,i=0,n="";if(Math.round(t)<1e3)return["0",1];for(o=1e3;o<=1e19;o*=10){const r=o+"One",s=o+"Other";if(1===Math.round(t/o)&&""!==(null===e||void 0===e?void 0:e[r])?(i=o,n=r):Math.round(t/o)>=1&&""!==(null===e||void 0===e?void 0:e[s])&&(i=o,n=s),null!==e&&void 0!==e&&e[n]){var a;const i=(null===e||void 0===e||null===(a=e[n].match(/0/g))||void 0===a?void 0:a.length)||1;if(Math.round(t*10**i/(10*o))<10**i)break}}return[(null===e||void 0===e?void 0:e[n])||"0",i]}formatCompact(e,t,o){var i;const n=(null===(i=e.match(/0/g))||void 0===i?void 0:i.length)||0;let a=t;n>1&&(a/=10**(n-1));const r=this.getMaxFractionDigitsForCompactFormat(n),s=10**r,l=Math.round(o/a*s)/s,c=this.formatNumber(l,r,0);return e.replace(/(0+)/,c).replace(/('\.')/,".")}parseFormattedNumber(e){const t=e.indexOf(M.numbers.symbolMinus)>-1||e.startsWith("-"),o=e.split(M.numbers.symbolDecimal);return o.forEach((e,t)=>{o[t]=e.replace(/[^0-9]/g,"")}),(t?-1:1)*parseFloat(o.join("."))}formatNumber(e,t,o){return this.format(e,M.numbers.patternNumber,this.valOrDefault(t,this.defaultMaxFractionDigits),this.valOrDefault(o,this.defaultMinFractionDigits))}formatPercent(e,t,o){return this.format(e,M.numbers.patternPercent,this.valOrDefault(t,this.defaultMaxFractionDigits),this.valOrDefault(o,this.defaultMinFractionDigits))}formatCurrency(e,t,o,i){const n=this.format(e,M.numbers.patternCurrency,this.valOrDefault(o,this.defaultMaxFractionDigits),this.valOrDefault(i,this.defaultMinFractionDigits));return n.replace("¤",t)}formatNumberCompact(e){const t=e,[o,i]=this.determineCorrectCompactPattern(M.numbers.patternsCompactNumber||[],t);return Math.round(t)<1e3||"0"===o?this.formatNumber(t,this.getMaxFractionDigitsForCompactFormat(Math.round(t)),0):this.formatCompact(o,i,t)}formatCurrencyCompact(e,t){const o=e,[i,n]=this.determineCorrectCompactPattern(M.numbers.patternsCompactCurrency||[],o);return Math.round(o)<1e3||"0"===i?this.formatCurrency(o,t,this.getMaxFractionDigitsForCompactFormat(Math.round(o)),0):this.formatCompact(i,n,o).replace("¤",t)}formatEvolution(e,t,o,i){if(i)return this.formatPercent(Math.abs(e),t,o);const n=this.formatPercent(e,t,o);return`${e>0?M.numbers.symbolPlus:""}${n}`}calculateAndFormatEvolution(e,t,o){const i=parseInt(t,10),n=parseInt(e,10)-i;let a;a=0===n||Number.isNaN(n)?0:0===i||Number.isNaN(i)?100:n/i*100;let r=3;return Math.abs(a)>100?r=0:Math.abs(a)>10?r=1:Math.abs(a)>1&&(r=2),this.formatEvolution(a,r,0,o)}}var ae=new ne;window.NumberFormatter=ae;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
const{$:re}=window;class se{constructor(){this.setup()}setup(){Object(D["watch"])(()=>U.parsed.value.popover,()=>this.onPopoverParamChanged()),U.parsed.value.popover&&this.onPopoverParamChangedInitial()}onPopoverParamChangedInitial(){re(()=>{setTimeout(()=>{this.openOrClose()})})}onPopoverParamChanged(){re(()=>{this.openOrClose()})}openOrClose(){this.close();const e=U.parsed.value.popover;e?this.open(e):window.broadcast.resetPopoverStack()}close(){window.Piwik_Popover.close()}open(e){let t=decodeURIComponent(e);t=t.replace(/\$/g,"%"),t=decodeURIComponent(t);const o=t.split(":"),i=o[0];o.shift();const n=o.join(":");"undefined"===typeof window.broadcast.popoverHandlers[i]||window.broadcast.isLoginPage()||window.broadcast.popoverHandlers[i](n)}}new se;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{$:le}=window;let ce=!1;function de(){let e=!!parseInt(W("zenMode"),10);const t=le(".top_controls .zenModeToggle");function o(){e?(le("body").addClass("zenMode"),t.addClass("icon-arrowdown").removeClass("icon-arrowup"),t.prop("title",a("CoreHome_ExitZenMode"))):(le("body").removeClass("zenMode"),t.removeClass("icon-arrowdown").addClass("icon-arrowup"),t.prop("title",a("CoreHome_EnterZenMode")))}ce||(M.helper.registerShortcut("z",a("CoreHome_ShortcutZenMode"),t=>{t.altKey||(e=!e,q("zenMode",e?"1":"0"),o())}),ce=!0),t.off("click.matomoZenMode").on("click.matomoZenMode",()=>{window.Mousetrap.trigger("z")}),o()}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
function ue(e,...t){const o=t;return window._pk_externalRawLink?window._pk_externalRawLink(e,o):e}function pe(e,...t){if(!e)return"";const o=t.length>0&&t[0]?t[0]:null,i=t.length>1&&t[1]?t[1]:null,n=t.length>2&&t[2]?t[2]:null,a=ue(e,o,i,n);return'<a target="_blank" rel="noreferrer noopener" href="'+a+'">'}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function me(e,t,o){return ae.formatNumber(e,t,o)}function he(e,t,o){return ae.formatPercent(e,t,o)}function ge(e,t,o,i){return ae.formatCurrency(e,t,o,i)}function be(e,t,o,i){return ae.formatEvolution(e,t,o,i)}function fe(e,t,o){return ae.calculateAndFormatEvolution(e,t,o)}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function ve(...e){const t=Object(D["createApp"])(...e);return t.config.globalProperties.$sanitize=window.vueSanitize,t.config.globalProperties.$sanitizeUrl=window.vueSanitizeUrl,t.config.globalProperties.translate=a,t.config.globalProperties.translateOrDefault=r,t.config.globalProperties.externalLink=pe,t.config.globalProperties.externalRawLink=ue,t.config.globalProperties.formatNumber=me,t.config.globalProperties.formatPercent=he,t.config.globalProperties.formatCurrency=ge,t.config.globalProperties.formatEvolution=be,t.config.globalProperties.calculateAndFormatEvolution=fe,t}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */le(de),M.on("Matomo.topControlsRendered",()=>{de()});const Oe={},ye=120,je=50,we=1e3;function Se(e){if(Oe[e])return Oe[e];if(window[e])return Promise.resolve(window[e]);const t="?module=Proxy&action=getPluginUmdJs&plugin="+e;let o,i;const n=document.createElement("script");let a;n.charset="utf-8",n.timeout=ye,n.src=t;const r=new Error,s=t=>{n.onerror=null,n.onload=null,clearTimeout(a);let s=0;function l(){if(s+=je,o&&i)if(window[e]&&i)try{i(window[e])}finally{o=void 0,i=void 0}else if(s>we)try{const n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;r.message=`Loading plugin ${e} on demand failed.\n(${n}: ${a})`,r.name="PluginOnDemandLoadError",r.type=n,r.request=a,o(r)}finally{o=void 0,i=void 0}else setTimeout(l,je)}setTimeout(l,je)};return a=setTimeout(()=>{s({type:"timeout",target:n})},ye),n.onerror=s,n.onload=s,document.head.appendChild(n),new Promise((e,t)=>{i=e,o=t})}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Ce(e,t){return Object(D["defineAsyncComponent"])(()=>Se(e).then(e=>(e||resolve(null),e[t])))}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function ke(e,t){var o;return e instanceof HTMLElement?e:null===(o=t.instance)||void 0===o?void 0:o.$refs[e]}var De={getRef:ke};const Ee=300;function Pe(e,t=Ee){let o;return function(...i){o&&clearTimeout(o),o=setTimeout(()=>{e.call(this,...i)},t)}}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Te(e){return"undefined"===typeof e?e:JSON.parse(JSON.stringify(e))}const xe={ref:"root"};function Ve(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",xe,[e.componentWrapper?(Object(D["openBlock"])(),Object(D["createBlock"])(Object(D["resolveDynamicComponent"])(e.componentWrapper),{key:0})):Object(D["createCommentVNode"])("",!0)],512)}var Be=Object(D["defineComponent"])({props:{html:String},mounted(){M.helper.compileVueEntryComponents(this.$refs.root)},beforeUnmount(){M.helper.destroyVueComponent(this.$refs.root)},computed:{componentWrapper(){return this.html?Object(D["markRaw"])({template:this.html}):null}}});Be.render=Ve;var Ne=Be;const Ie={class:"loadingPiwik"};function Me(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("MatomoLoader");return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ie,[Object(D["createVNode"])(r),Object(D["createElementVNode"])("span",null,Object(D["toDisplayString"])(e.loadingMessage),1)],512)),[[D["vShow"],e.loading]])}const Fe={class:"matomo-loader"},Re=Object(D["createElementVNode"])("span",null,null,-1),Le=Object(D["createElementVNode"])("span",null,null,-1),Ae=Object(D["createElementVNode"])("span",null,null,-1),_e=[Re,Le,Ae];function He(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("span",Fe,_e)}var $e=Object(D["defineComponent"])({});$e.render=He;var Ue=$e,qe=Object(D["defineComponent"])({components:{MatomoLoader:Ue},props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:a("General_LoadingData")}}});qe.render=Me;var We=qe;function ze(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:Object(D["normalizeClass"])(["alert",{["alert-"+e.severity]:!0}])},[Object(D["renderSlot"])(e.$slots,"default")],2)}var Ge=Object(D["defineComponent"])({props:{severity:{type:String,required:!0}}});Ge.render=ze;var Ke=Ge,Ye={mounted(e,t){let o={};$(e).addClass("matomo-dropdown-menu");const i=!!$(e).parent().closest(".dropdown-content").length;var n;i&&(o={hover:!0},$(e).addClass("submenu"),$((null===(n=t.value)||void 0===n?void 0:n.activates)||$(e).data("target")).addClass("submenu-dropdown-content"),$(e).parents(".dropdown-content").addClass("submenu-container"));$(e).dropdown(o)},updated(e){Object(D["nextTick"])(()=>{$(e).addClass("matomo-dropdown-menu")})}};
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
function Qe(e,t,o){const i=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,i||e.contains(o.target)||t.value&&t.value.blur()}function Je(e,t){t.value.hasScrolled=!0}function Xe(e,t){t.value.isMouseDown=!0,t.value.hasScrolled=!1}function Ze(e,t,o){27===o.which&&setTimeout(()=>{t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.blur&&t.value.blur()},0)}const et=document.documentElement;var tt={mounted(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onEscapeHandler=Ze.bind(null,e,t),t.value.onMouseDown=Xe.bind(null,e,t),t.value.onClickOutsideElement=Qe.bind(null,e,t),t.value.onScroll=Je.bind(null,e,t),et.addEventListener("keyup",t.value.onEscapeHandler),et.addEventListener("mousedown",t.value.onMouseDown),et.addEventListener("mouseup",t.value.onClickOutsideElement),et.addEventListener("scroll",t.value.onScroll)},unmounted(e,t){et.removeEventListener("keyup",t.value.onEscapeHandler),et.removeEventListener("mousedown",t.value.onMouseDown),et.removeEventListener("mouseup",t.value.onClickOutsideElement),et.removeEventListener("scroll",t.value.onScroll)}};
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function ot(e,t){var o,i;null===(o=t.value)||void 0===o||!o.focused||null!==(i=t.oldValue)&&void 0!==i&&i.focused||setTimeout(()=>{e.focus(),t.value.afterFocus&&t.value.afterFocus()},5)}var it={mounted(e,t){ot(e,t)},updated(e,t){ot(e,t)}};
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{$:nt}=window,at=new WeakMap;function rt(){const e=nt(this).attr("title")||"";return window.vueSanitize(e.replace(/\n/g,"<br />"))}function st(e){if(!document.querySelector(".ui-tooltip"))return;let t;try{t=nt(e).tooltip("instance")}catch(o){return}t&&t.tooltips&&Object.keys(t.tooltips).forEach(e=>{var o;const i=null===(o=t)||void 0===o||null===(o=o.tooltips[e])||void 0===o||null===(o=o.element)||void 0===o?void 0:o[0];i&&!i.isConnected&&nt(i).trigger("mouseleave").trigger("focusout")})}function lt(e,t){var o,i,n,a,r,s;if(e.isConnected&&(nt(e).tooltip({track:!0,content:(null===(o=t.value)||void 0===o?void 0:o.content)||rt,show:"undefined"!==typeof(null===(i=t.value)||void 0===i?void 0:i.show)?null===(n=t.value)||void 0===n?void 0:n.show:{delay:(null===(a=t.value)||void 0===a?void 0:a.delay)||700,duration:(null===(r=t.value)||void 0===r?void 0:r.duration)||200},hide:!1,tooltipClass:null===(s=t.value)||void 0===s?void 0:s.tooltipClass}),!at.has(e))){const t=new MutationObserver(t=>{t.some(e=>e.removedNodes.length>0)&&st(e)});t.observe(e,{childList:!0,subtree:!0}),at.set(e,t)}}var ct={mounted(e,t){setTimeout(()=>lt(e,t))},updated(e,t){setTimeout(()=>lt(e,t))},beforeUnmount(e){const t=at.get(e);t&&(t.disconnect(),at.delete(e));try{window.$(e).tooltip("destroy")}catch(o){}}};const dt={ref:"root"};function ut(e,t,o,i,n,a){return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",dt,[Object(D["renderSlot"])(e.$slots,"default")],512)),[[D["vShow"],e.modelValue]])}var pt=Object(D["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},options:{type:Object,required:!1,default:()=>({})}},emits:["yes","no","closeEnd","close","validation","update:modelValue"],activated(){this.$emit("update:modelValue",!1)},watch:{modelValue(e,t){if(e){const e=this.$refs.root.firstElementChild;M.helper.modalConfirm(e,{yes:()=>{this.$emit("yes")},no:()=>{this.$emit("no")},validation:()=>{this.$emit("validation")}},Object.assign({onCloseEnd:()=>{this.$refs.root.appendChild(e),this.$emit("update:modelValue",!1),this.$emit("closeEnd")}},this.options))}else!1===e&&!0===t&&($(".modal.open").modal("close"),this.$emit("close"))}}});pt.render=ut;var mt=pt;const ht=["aria-label"],gt={key:0,class:"modal-footer matomo-modal-footer"};function bt(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createBlock"])(D["Teleport"],{to:"body"},[e.modelValue?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:0,class:"modal-overlay matomo-modal-overlay open",onClick:t[0]||(t[0]=(...t)=>e.close&&e.close(...t))})):Object(D["createCommentVNode"])("",!0),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",{ref:"root",class:Object(D["normalizeClass"])(["modal matomo-modal",e.modalClasses]),role:"dialog","aria-modal":"true","aria-label":e.ariaLabel,tabindex:"-1"},[Object(D["createElementVNode"])("div",{class:Object(D["normalizeClass"])(["modal-content matomo-modal-content",e.contentClass])},[Object(D["renderSlot"])(e.$slots,"default")],2),e.$slots.footer?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",gt,[Object(D["renderSlot"])(e.$slots,"footer")])):Object(D["createCommentVNode"])("",!0)],10,ht),[[D["vShow"],e.modelValue]])])}var ft=Object(D["defineComponent"])({name:"MatomoModal",props:{modelValue:{type:Boolean,required:!0},classes:{type:[String,Array,Object],default:""},contentClass:{type:[String,Array,Object],default:""},ariaLabel:{type:String}},emits:["update:modelValue","opened","closed"],data(){return{previousBodyOverflow:"",previousFocus:null}},computed:{modalClasses(){return[{open:this.modelValue},this.classes]}},methods:{close(){this.modelValue&&this.$emit("update:modelValue",!1)},onKeydown(e){"Escape"===e.key&&this.close()},activate(){const e=this.$refs.root;this.previousBodyOverflow=document.body.style.overflow,this.previousFocus=document.activeElement,document.body.style.overflow="hidden",document.addEventListener("keydown",this.onKeydown),this.$nextTick(()=>e.focus()),this.$emit("opened",e)},deactivate(){document.body.style.overflow=this.previousBodyOverflow,this.previousBodyOverflow="",document.removeEventListener("keydown",this.onKeydown),this.previousFocus&&this.previousFocus.focus(),this.previousFocus=null,this.$emit("closed")}},watch:{modelValue(e,t){e&&!t?this.activate():!e&&t&&this.deactivate()}},mounted(){this.modelValue&&this.activate()},unmounted(){this.modelValue&&this.deactivate()}});ft.render=bt;var vt=ft;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Ot(e,t,o){var i;e.classList.add("expanded"),null!==(i=t.value)&&void 0!==i&&i.onExpand&&t.value.onExpand(o);const n=e.querySelector(".dropdown.positionInViewport");n&&M.helper.setMarginLeftToBeInViewport(n)}function yt(e,t,o){var i;e.classList.contains("expanded")&&(e.classList.remove("expanded"),null!==(i=t.value)&&void 0!==i&&i.onClosed&&t.value.onClosed(o))}function jt(e,t,o){e.classList.contains("expanded")?yt(e,t,o):Ot(e,t,o)}function wt(e,t,o){const i=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,i||e.contains(o.target)||yt(e,t,o)}function St(e){e.value.hasScrolled=!0}function Ct(e){e.value.isMouseDown=!0,e.value.hasScrolled=!1}function kt(e,t,o){"Escape"===o.key&&(t.value.isMouseDown=!1,t.value.hasScrolled=!1,yt(e,t,o))}const Dt=document.documentElement;var Et={mounted(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onClickOnExpander=jt.bind(null,e,t),t.value.onEscapeHandler=kt.bind(null,e,t),t.value.onMouseDown=Ct.bind(null,t),t.value.onClickOutsideElement=wt.bind(null,e,t),t.value.onScroll=St.bind(null,t),setTimeout(()=>{const e=De.getRef(t.value.expander,t);e&&e.addEventListener("click",t.value.onClickOnExpander)}),Dt.addEventListener("keyup",t.value.onEscapeHandler),Dt.addEventListener("mousedown",t.value.onMouseDown),Dt.addEventListener("mouseup",t.value.onClickOutsideElement),Dt.addEventListener("scroll",t.value.onScroll)},unmounted(e,t){const o=De.getRef(t.value.expander,t);o&&Dt.removeEventListener("click",t.value.onClickOnExpander),Dt.removeEventListener("keyup",t.value.onEscapeHandler),Dt.removeEventListener("mousedown",t.value.onMouseDown),Dt.removeEventListener("mouseup",t.value.onClickOutsideElement),Dt.removeEventListener("scroll",t.value.onScroll)}};
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Pt(e){e.classList.add("expanded");const t=e.querySelector(".dropdown.positionInViewport");t&&M.helper.setMarginLeftToBeInViewport(t)}function Tt(e){e.classList.remove("expanded")}function xt(e,t){e.contains(t.target)||e.classList.remove("expanded")}function Vt(e,t){27===t.which&&e.classList.remove("expanded")}const Bt=document.documentElement;var Nt={mounted(e,t){t.value.onMouseEnter=Pt.bind(null,e),t.value.onMouseLeave=Tt.bind(null,e),t.value.onClickOutsideElement=xt.bind(null,e),t.value.onEscapeHandler=Vt.bind(null,e),setTimeout(()=>{const e=De.getRef(t.value.expander,t);e&&e.addEventListener("mouseenter",t.value.onMouseEnter)}),e.addEventListener("mouseleave",t.value.onMouseLeave),Bt.addEventListener("keyup",t.value.onEscapeHandler),Bt.addEventListener("mouseup",t.value.onClickOutsideElement)},unmounted(e,t){const o=De.getRef(t.value.expander,t);o&&o.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 https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{$:It}=window;var Mt={mounted(e,t){const o=It(e),{sensitiveData:i}=t.value,n=t.value.showCharacters||6,r=t.value.clickElementSelector||o;let s="";function l(){o.html(i),It(r).css({cursor:""}),It(r).tooltip("destroy")}n>0&&(s+=i.slice(0,n)),s+=i.slice(n).replace(/./g,"*"),o.html(s),It(r).tooltip({content:a("CoreHome_ClickToSeeFullInformation"),items:"*",track:!0}),It(r).one("click",l),It(r).css({cursor:"pointer"})}};
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{$:Ft}=window;var Rt={mounted(e){const t=Ft(e);!t.attr("data-target")&&t.attr("data-activates")&&t.attr("data-target",t.attr("data-activates"));const o=t.attr("data-target");o&&Ft("#"+o).length&&t.dropdown({inDuration:300,outDuration:225,constrainWidth:!1,belowOrigin:!0})}};const Lt=["data-item-id","draggable","aria-grabbed","onDragstart","onDragover"];var At=Object(D["defineComponent"])({__name:"DraggableList",props:{items:null,itemKey:null,disabled:{type:Boolean,default:!1},handle:{default:""},axis:{default:"y"}},emits:["reorder"],setup(e,{emit:t}){const o=e,i=.1,n=Object(D["ref"])([]),a=Object(D["ref"])(null),r=Object(D["ref"])(null),s=Object(D["ref"])(null),l=Object(D["ref"])(!1),c=Object(D["computed"])(()=>!o.disabled&&o.items.length>1);function d(e,t){if("function"===typeof o.itemKey)return o.itemKey(e,t);if(!e||"object"!==typeof e)return t;const i=e[o.itemKey];return"string"===typeof i||"number"===typeof i?i:t}const u=Object(D["computed"])(()=>o.items.map((e,t)=>({id:String(d(e,t)),item:e,sourceIndex:t}))),p=Object(D["computed"])(()=>u.value.map(e=>e.id).join("\0"));function m(){n.value=u.value.slice()}function h(){a.value=null,r.value=null,s.value=null}function g(e=!1){h(),l.value=!1,e&&m()}function b(e,t){if(!o.handle)return!0;if(!(e instanceof Element))return!1;const i=e.closest(o.handle);return!!i&&t.contains(i)}function f(e){return n.value.findIndex(t=>t.id===e)}function v(e){return n.value["number"===typeof e?e:Number(e)]}function O(e,t){const n=t.getBoundingClientRect(),s=a.value?f(a.value):-1,l=r.value?f(r.value):-1,c=-1!==s&&-1!==l&&s<l,d=c?i:1-i;return"x"===o.axis?e.clientX<n.left+n.width*d?"before":"after":e.clientY<n.top+n.height*d?"before":"after"}function y(e,t){if(!a.value||a.value===e)return;const o=f(a.value),i=f(e);if(-1===o||-1===i)return;let r=i+("after"===t?1:0);if(o<r&&(r-=1),r===o)return;const s=n.value.slice(),[l]=s.splice(o,1);s.splice(r,0,l),n.value=s}function j(e,t){const o=e.currentTarget;o&&c.value&&b(e.target,o)?(a.value=t,r.value=t,l.value=!1,s.value=null,e.dataTransfer&&(e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",t)),window.setTimeout(()=>{a.value===t&&(s.value=t)},0)):e.preventDefault()}function w(e,t){const o=v(t);o?j(e,o.id):e.preventDefault()}function S(e,t){if(!a.value||!c.value)return;e.preventDefault();const o=e.currentTarget;o&&(r.value=t,y(t,O(e,o)),e.dataTransfer&&(e.dataTransfer.dropEffect="move"))}function C(e,t){const o=v(t);o&&S(e,o.id)}function k(e){if(!a.value)return;e.preventDefault();const o=n.value.map(e=>e.id);o&&o.join("\0")!==p.value&&(l.value=!0,t("reorder",o)),h()}function E(){l.value?l.value=!1:g(!0)}return Object(D["watch"])([u,()=>o.disabled],()=>g(!0),{immediate:!0}),(t,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",{class:Object(D["normalizeClass"])(["draggableList",{isDragging:null!==a.value,isDisabled:e.disabled}])},[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(n.value,(e,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:e.id,class:Object(D["normalizeClass"])(["draggableListItem",{isDragged:e.id===s.value}]),"data-item-id":e.id,draggable:Object(D["unref"])(c),"aria-grabbed":e.id===a.value,onDragstart:e=>w(e,o),onDragover:e=>C(e,o),onDrop:k,onDragend:E},[Object(D["renderSlot"])(t.$slots,"default",{item:e.item,index:e.sourceIndex})],42,Lt))),128))],2))}}),_t=At;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
const{$:Ht}=window;function $t(e,t){e.value.focusedElement!==t.target&&(e.value.focusedElement=t.target,Ht(t.target).select())}function Ut(e){const t=document.createRange();t.selectNode(e.target);const o=window.getSelection();o&&o.rangeCount>0&&o.removeAllRanges(),o&&o.addRange(t)}function qt(e){delete e.value.focusedElement}var Wt={mounted(e,t){const o=e.tagName.toLowerCase();t.value.elementSupportsSelect="textarea"===o,t.value.elementSupportsSelect?(t.value.onFocusHandler=$t.bind(null,t),t.value.onBlurHandler=qt.bind(null,t),e.addEventListener("focus",t.value.onFocusHandler),e.addEventListener("blur",t.value.onBlurHandler)):(t.value.onClickHandler=Ut,e.addEventListener("click",t.value.onClickHandler))},unmounted(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 https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function zt(e){if(e){const t=document.createElement("textarea");t.value=e.innerText,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),t.focus(),document.execCommand("copy"),document.body.removeChild(t);const o=e.parentElement;if(o){const e=o.getElementsByTagName("i")[0];e&&(e.classList.remove("copyToClipboardIcon"),e.classList.add("copyToClipboardIconCheck"));const t=o.getElementsByClassName("copyToClipboardCopiedDiv")[0];t&&(t.style.display="inline-block",setTimeout(()=>{t.style.display="none"},2500))}}}function Gt(e,t){if(t.value.transitionOpen){const o=e.parentElement;if(o){const e=o.getElementsByTagName("i")[0];e&&(e.classList.remove("copyToClipboardIconCheck"),e.classList.add("copyToClipboardIcon"))}t.value.transitionOpen=!1}else t.value.transitionOpen=!0}var Kt={mounted(e,t){const o=e.tagName.toLowerCase();if("pre"===o){const o=document.createElement("button");o.setAttribute("type","button"),o.className="copyToClipboardButton";const i=document.createElement("div");i.className="copyToClipboardPositionDiv";const n=document.createElement("i");n.className="copyToClipboardIcon",o.appendChild(n);const r=document.createElement("span");r.className="copyToClipboardSpan",r.innerHTML=a("General_Copy"),o.appendChild(r),i.appendChild(o);const s=document.createElement("div");s.className="copyToClipboardCopiedDiv",s.innerHTML=a("General_CopiedToClipboard"),i.appendChild(s);const l=e.parentElement;l&&(l.classList.add("copyToClipboardWrapper"),l.appendChild(i)),t.value.onClickHandler=zt.bind(null,e),o.addEventListener("click",t.value.onClickHandler),t.value.onTransitionEndHandler=Gt.bind(null,e,t),o.addEventListener("transitionend",t.value.onTransitionEndHandler)}},unmounted(e,t){e.removeEventListener("click",t.value.onClickHandler),e.removeEventListener("transitionend",t.value.onTransitionEndHandler)}};
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Yt(){const e=document.getElementById("mobile-left-menu");if(e)try{window.$(e).sidenav("open")}catch(t){}}function Qt(){const e=document.getElementById("secondNavBar");if(null===e||void 0===e||!e.classList.contains("mobileLeftMenuOpen"))return;const t=document.getElementById("mobile-left-menu");if(t)try{window.$(t).sidenav("close")}catch(o){}}var Jt={mounted(e,t){if(!t.value.activator)return;const o=document.getElementById("secondNavBar"),i=e=>{o&&o.classList.toggle("mobileLeftMenuOpen",e)};setTimeout(()=>{if(!t.value.initialized){t.value.initialized=!0;const e=De.getRef(t.value.activator,t);if(e){window.$(e).show();const t=e.getAttribute("data-target");window.$("#"+t).sidenav({closeOnClick:!0,onOpenStart:()=>{i(!0)},onCloseStart:()=>{i(!1)}})}}e.classList.contains("collapsible")&&window.$(e).collapsible()})}};const Xt={key:0,class:"title",tabindex:"6"},Zt=["href","title"],eo={class:"iconsBar"},to=["href","title"],oo=Object(D["createElementVNode"])("span",{class:"icon-help"},null,-1),io=[oo],no=["title"],ao=Object(D["createElementVNode"])("span",{class:"icon-info"},null,-1),ro=[ao],so={key:2,class:"ratingIcons"},lo={class:"inlineHelp"},co=["innerHTML"],uo=["innerHTML"],po=["href"];function mo(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:"enrichedHeadline",onMouseenter:t[1]||(t[1]=t=>e.showIcons=!0),onMouseleave:t[2]||(t[2]=t=>e.showIcons=!1),ref:"root"},[e.editUrl?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Xt,[Object(D["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.htmlEntities(e.actualFeatureName))},[Object(D["renderSlot"])(e.$slots,"default")],8,Zt)):Object(D["createCommentVNode"])("",!0),Object(D["withDirectives"])(Object(D["createElementVNode"])("span",eo,[e.helpUrl&&!e.actualInlineHelp?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},io,8,to)):Object(D["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=t=>e.showInlineHelp=!e.showInlineHelp),class:Object(D["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},ro,10,no)):Object(D["createCommentVNode"])("",!0),e.showRateFeature?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",so,[(Object(D["openBlock"])(),Object(D["createBlock"])(Object(D["resolveDynamicComponent"])(e.rateFeature),{title:e.actualFeatureName},null,8,["title"]))])):Object(D["createCommentVNode"])("",!0)],512),[[D["vShow"],e.showIcons||e.showInlineHelp]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",lo,[Object(D["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,co),""!=e.reportGenerated?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,class:"helpDate",innerHTML:e.$sanitize(e.reportGenerated)},null,8,uo)):Object(D["createCommentVNode"])("",!0),e.helpUrl?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(D["toDisplayString"])(e.translate("General_MoreDetails")),9,po)):Object(D["createCommentVNode"])("",!0)],512),[[D["vShow"],e.showInlineHelp]])],544)}var ho=Object(D["defineComponent"])({props:{helpUrl:{type:String,default:""},editUrl:{type:String,default:""},reportGenerated:String,featureName:String,inlineHelp:String},data(){return{showIcons:!1,showInlineHelp:!1,actualFeatureName:this.featureName,actualInlineHelp:this.inlineHelp}},watch:{inlineHelp(e){this.actualInlineHelp=e},featureName(e){this.actualFeatureName=e}},mounted(){const e=this.$refs.root;if(!this.actualInlineHelp){var t;let i=e.querySelector(".title .inlineHelp");if(!i&&null!==(t=e.parentElement)&&void 0!==t&&t.nextElementSibling&&(i=e.parentElement.nextElementSibling.querySelector(".reportDocumentation")),i){var o;const e=null===(o=i.getAttribute("data-content"))||void 0===o?void 0:o.trim();e&&e.length&&(this.actualInlineHelp=`<p>${e}</p>`,setTimeout(()=>i.remove(),0))}}var i;this.actualFeatureName||(this.actualFeatureName=null===(i=e.querySelector(".title"))||void 0===i?void 0:i.textContent);if(M.period&&M.currentDateString){const t=c.parse(M.period,M.currentDateString);this.reportGenerated&&t.containsToday()&&window.$(e.querySelector(".report-generated")).tooltip({track:!0,content:this.reportGenerated,items:"div",show:!1,hide:!1})}},methods:{htmlEntities(e){return M.helper.htmlEntities(e)}},computed:{showRateFeature(){return"Feedback_SendFeedback"!==r("Feedback_SendFeedback")},rateFeature(){return this.showRateFeature?Ce("Feedback","RateFeature"):""}}});ho.render=mo;var go=ho;const bo={class:"card-content"},fo={key:0,class:"card-title"},vo={key:1,class:"card-title"},Oo={ref:"content"},yo={key:0,class:"card-image hide-on-med-and-down"},jo=["src","alt"];function wo(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("EnrichedHeadline");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:Object(D["normalizeClass"])({card:!0,"card-with-image":!!this.imageUrl}),ref:"root"},[Object(D["createElementVNode"])("div",bo,[!e.contentTitle||e.actualFeature||e.helpUrl||e.actualHelpText||e.editUrl?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("h2",fo,Object(D["toDisplayString"])(e.decode(e.contentTitle)),1)),e.contentTitle&&(e.actualFeature||e.helpUrl||e.actualHelpText||e.editUrl)?(Object(D["openBlock"])(),Object(D["createElementBlock"])("h2",vo,[Object(D["createVNode"])(r,{"feature-name":e.actualFeature,"help-url":e.helpUrl,"edit-url":e.editUrl,"inline-help":e.actualHelpText},{default:Object(D["withCtx"])(()=>[Object(D["createTextVNode"])(Object(D["toDisplayString"])(e.decode(e.contentTitle)),1)]),_:1},8,["feature-name","help-url","edit-url","inline-help"])])):Object(D["createCommentVNode"])("",!0),Object(D["createElementVNode"])("div",Oo,[Object(D["renderSlot"])(e.$slots,"default")],512)]),e.imageUrl?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",yo,[Object(D["createElementVNode"])("img",{src:e.imageUrl,alt:e.actualImageAltText},null,8,jo)])):Object(D["createCommentVNode"])("",!0)],2)}let So=null;const{$:Co}=window;var ko=Object(D["defineComponent"])({props:{contentTitle:String,feature:String,helpUrl:String,editUrl:String,helpText:String,anchor:String,imageUrl:String,imageAltText:String},components:{EnrichedHeadline:go},data(){return{actualFeature:this.feature,actualHelpText:this.helpText,actualImageAltText:this.imageAltText?this.imageAltText:this.contentTitle}},watch:{feature(e){this.actualFeature=e},helpText(e){this.actualHelpText=e}},mounted(){const e=this.$refs.root,t=this.$refs.content;if(this.anchor&&e&&e.parentElement){const t=document.createElement("a");t.id=this.anchor,Co(e.parentElement).prepend(t)}setTimeout(()=>{const e=t.querySelector(".contentHelp");e&&(this.actualHelpText=e.innerHTML,e.remove())},0),this.actualFeature&&"true"===this.actualFeature&&(this.actualFeature=this.contentTitle),null===So&&(So=document.querySelector("#content.admin"));let o=null;if(So&&(o=So.offsetTop),o||0===o){const t=e.closest(".widgetLoader"),i=t?t.offsetTop:e.offsetTop;i-o<17&&(e.style.marginTop="0")}},methods:{decode(e){return M.helper.htmlDecode(e)}}});ko.render=wo;var Do=ko;const Eo={key:0,ref:"root",class:"matomo-comparisons"},Po={class:"comparison-type"},To=["title"],xo=["href"],Vo=["title"],Bo={class:"comparison-period-label"},No=["onClick"],Io=["title"],Mo={class:"loadingPiwik",style:{display:"none"}};function Fo(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("MatomoLoader"),s=Object(D["resolveDirective"])("tooltips");return e.isComparing?Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Eo,[Object(D["createElementVNode"])("h3",null,Object(D["toDisplayString"])(e.translate("General_Comparisons")),1),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.segmentComparisons,(t,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:"comparison card",key:t.index},[Object(D["createElementVNode"])("div",Po,Object(D["toDisplayString"])(e.translate("General_Segment")),1),Object(D["createElementVNode"])("div",{class:"title",title:e.getTitleTooltip(t)},[Object(D["createElementVNode"])("a",{target:"_blank",href:e.getUrlToSegment(t.params.segment)},Object(D["toDisplayString"])(t.title),9,xo)],8,To),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.periodComparisons,o=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:"comparison-period",key:o.index,title:e.getComparisonTooltip(t,o)},[Object(D["createElementVNode"])("span",{class:"comparison-dot",style:Object(D["normalizeStyle"])({"background-color":e.getSeriesColor(t,o)})},null,4),Object(D["createElementVNode"])("span",Bo,Object(D["toDisplayString"])(o.title)+" ("+Object(D["toDisplayString"])(e.getComparisonPeriodType(o))+") ",1)],8,Vo))),128)),e.segmentComparisons.length>1?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:0,class:"remove-button",onClick:t=>e.removeSegmentComparison(o)},[Object(D["createElementVNode"])("span",{class:"icon icon-close",title:e.translate("General_ClickToRemoveComp")},null,8,Io)],8,No)):Object(D["createCommentVNode"])("",!0)]))),128)),Object(D["createElementVNode"])("div",Mo,[Object(D["createVNode"])(r),Object(D["createTextVNode"])(" "+Object(D["toDisplayString"])(e.translate("General_LoadingData")),1)])])),[[s,{duration:200,delay:200,content:e.transformTooltipContent}]]):Object(D["createCommentVNode"])("",!0)}function Ro(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */class Lo{get state(){return Object(D["readonly"])(this.segmentState)}constructor(){Ro(this,"segmentState",Object(D["reactive"])({availableSegments:[]})),M.on("piwikSegmentationInited",()=>this.setSegmentState())}setSegmentState(){try{const e=$(".segmentEditorPanel").data("uiControlObject");this.segmentState.availableSegments=e.impl.availableSegments||[]}catch(e){}}}var Ao=new Lo;function _o(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const Ho=8,$o=3;function Uo(e){return e?Array.isArray(e)?e:[e]:[]}function qo(e){return Array.isArray(e)?e.map(qo):e&&"object"===typeof e?Object.fromEntries(Object.entries(e).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>[e,qo(t)])):e}class Wo{constructor(){_o(this,"privateState",Object(D["reactive"])({comparisonsDisabledFor:[]})),_o(this,"state",Object(D["readonly"])(this.privateState)),_o(this,"colors",{}),_o(this,"segmentComparisons",Object(D["computed"])(()=>this.parseSegmentComparisons())),_o(this,"periodComparisons",Object(D["computed"])(()=>this.parsePeriodComparisons())),_o(this,"isEnabled",Object(D["computed"])(()=>this.checkEnabledForCurrentPage())),"complete"===document.readyState||"interactive"===document.readyState?this.loadComparisonsDisabledFor():document.addEventListener("DOMContentLoaded",()=>{this.loadComparisonsDisabledFor()}),$(()=>{this.colors=this.getAllSeriesColors()}),Object(D["watch"])(()=>this.getUrlStateWithoutPopoverKey(),()=>M.postEvent("piwikComparisonsChanged"))}getUrlStateWithoutPopoverKey(){const e=Object.fromEntries(Object.entries(U.parsed.value).filter(([e])=>"popover"!==e));return JSON.stringify(qo(e))}getComparisons(){return this.getSegmentComparisons().concat(this.getPeriodComparisons())}isComparing(){return this.isComparisonEnabled()&&(this.segmentComparisons.value.length>1||this.periodComparisons.value.length>1)}isComparingPeriods(){return this.getPeriodComparisons().length>1}getSegmentComparisons(){return this.isComparisonEnabled()?this.segmentComparisons.value:[]}getPeriodComparisons(){return this.isComparisonEnabled()?this.periodComparisons.value:[]}getSeriesColor(e,t,o=0){const i=this.getComparisonSeriesIndex(t.index,e.index)%Ho;if(0===o)return this.colors["series"+i];const n=o%$o;return this.colors[`series${i}-shade${n}`]}getSeriesColorName(e,t){let o="series"+e%Ho;return t>0&&(o+="-shade"+t%$o),o}isComparisonEnabled(){return this.isEnabled.value}getIndividualComparisonRowIndices(e){const t=this.getSegmentComparisons().length,o=e%t,i=Math.floor(e/t);return{segmentIndex:o,periodIndex:i}}getComparisonSeriesIndex(e,t){const o=this.getSegmentComparisons().length;return e*o+t}getAllComparisonSeries(){const e=[];let t=0;return this.getPeriodComparisons().forEach(o=>{this.getSegmentComparisons().forEach(i=>{e.push({index:t,params:Object.assign(Object.assign({},i.params),o.params),color:this.colors["series"+t]}),t+=1})}),e}removeSegmentComparison(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");const t=[...this.segmentComparisons.value];t.splice(e,1);const o={};0===e&&(o.segment=t[0].params.segment),this.updateQueryParamsFromComparisons(t,this.periodComparisons.value,o)}removeSegmentComparisonByDefinition(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");let t=null;this.getSegmentComparisons().forEach((o,i)=>{o&&o.params&&o.params.segment===e&&(t=i)}),null!==t&&this.removeSegmentComparison(t)}addSegmentComparison(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");const t=this.segmentComparisons.value.concat([{params:e,index:-1,title:""}]);this.updateQueryParamsFromComparisons(t,this.periodComparisons.value)}updateQueryParamsFromComparisons(e,t,o={}){const i={},n={};let a=!1,r=!1;e.forEach(e=>{a?i[e.params.segment]=!0:a=!0}),t.forEach(e=>{r?n[`${e.params.period}|${e.params.date}`]=!0:r=!0});const s=[],l=[];Object.keys(n).forEach(e=>{const t=e.split("|");s.push(t[0]),l.push(t[1])});const c={compareSegments:Object.keys(i),comparePeriods:s,compareDates:l},d=M.helper.isReportingPage()?U.hashParsed.value:U.urlParsed.value;U.updateLocation(Object.assign(Object.assign(Object.assign({},d),c),o))}getAllSeriesColors(){const{ColorManager:e}=M;if(!e)return[];const t=[];for(let o=0;o<Ho;o+=1){t.push("series"+o);for(let e=0;e<$o;e+=1)t.push(`series${o}-shade${e}`)}return e.getColors("comparison-series-color",t)}loadComparisonsDisabledFor(){const e=U.parsed.value.module;"CoreUpdater"===e||"Installation"===e||"Overlay"===e||window.piwik.isPagesComparisonApiDisabled||window.piwik.installation||window.broadcast.isLoginPage()?this.privateState.comparisonsDisabledFor=[]:te.fetch({module:"API",method:"API.getPagesComparisonsDisabledFor"}).then(e=>{this.privateState.comparisonsDisabledFor=e})}parseSegmentComparisons(){const{availableSegments:e}=Ao.state,t=[...Uo(U.parsed.value.compareSegments)];t.unshift(U.parsed.value.segment||"");const o=[];return t.forEach((t,i)=>{let n;e.forEach(e=>{e.definition!==t&&e.definition!==decodeURIComponent(t)&&decodeURIComponent(e.definition)!==t||(n=e)});let r=n?n.name:a("General_Unknown");""===t.trim()&&(r=a("SegmentEditor_DefaultAllVisits")),o.push({params:{segment:t},title:M.helper.htmlDecode(r),index:i})}),o}parsePeriodComparisons(){const e=[...Uo(U.parsed.value.comparePeriods)],t=[...Uo(U.parsed.value.compareDates)];e.unshift(U.parsed.value.period),t.unshift(U.parsed.value.date);const o=[];for(let n=0;n<Math.min(t.length,e.length);n+=1){let r;try{r=c.parse(e[n],t[n]).getPrettyString()}catch(i){r=a("General_Error")}o.push({params:{date:t[n],period:e[n]},title:r,index:n})}return o}checkEnabledForCurrentPage(){const e=U.parsed.value.category||U.parsed.value.module,t=U.parsed.value.subcategory||U.parsed.value.action,o=`${e}.${t}`,i=-1===this.privateState.comparisonsDisabledFor.indexOf(o)&&-1===this.privateState.comparisonsDisabledFor.indexOf(e+".*");return document.documentElement.classList.toggle("comparisonsDisabled",!i),i}}var zo=new Wo,Go=Object(D["defineComponent"])({props:{},components:{MatomoLoader:Ue},directives:{Tooltips:ct},data(){return{comparisonTooltips:null}},setup(){const e=Object(D["computed"])(()=>zo.isComparing()&&!window.broadcast.isNoDataPage()),t=Object(D["computed"])(()=>zo.getSegmentComparisons()),o=Object(D["computed"])(()=>zo.getPeriodComparisons()),i=zo.getSeriesColor.bind(zo);function n(){const e=window.$(this).attr("title");return e?window.vueSanitize(e.replace(/\n/g,"<br />")):e}return{isComparing:e,segmentComparisons:t,periodComparisons:o,getSeriesColor:i,transformTooltipContent:n}},methods:{comparisonHasSegment(e){return"undefined"!==typeof e.params.segment},removeSegmentComparison(e){window.$(this.$refs.root).tooltip("destroy"),zo.removeSegmentComparison(e)},getComparisonPeriodType(e){const{period:t}=e.params;if("range"===t)return a("CoreHome_PeriodRange");const o=a(`Intl_Period${t.substring(0,1).toUpperCase()}${t.substring(1)}`);return o.substring(0,1).toUpperCase()+o.substring(1)},getComparisonTooltip(e,t){if(this.comparisonTooltips&&Object.keys(this.comparisonTooltips).length)return(this.comparisonTooltips[t.index]||{})[e.index]},getTitleTooltip(e){return this.htmlentities(e.title)+"<br/>"+this.htmlentities(decodeURIComponent(e.params.segment))},getUrlToSegment(e){const t=Object.assign({},U.hashParsed.value);return delete t.comparePeriods,delete t.compareDates,delete t.compareSegments,t.segment=e,`${window.location.search}#?${U.stringify(t)}`},onComparisonsChanged(){if(this.comparisonTooltips=null,!zo.isComparing())return;const e=zo.getPeriodComparisons(),t=zo.getSegmentComparisons();te.fetch({method:"API.getProcessedReport",apiModule:"VisitsSummary",apiAction:"get",compare:"1",compareSegments:U.getSearchParam("compareSegments"),comparePeriods:U.getSearchParam("comparePeriods"),compareDates:U.getSearchParam("compareDates"),format_metrics:"1"}).then(o=>{this.comparisonTooltips={},e.forEach(e=>{this.comparisonTooltips[e.index]={},t.forEach(t=>{const i=this.generateComparisonTooltip(o,e,t);this.comparisonTooltips[e.index][t.index]=i})})})},generateComparisonTooltip(e,t,o){if(!e.reportData.comparisons)return"";const i=zo.getComparisonSeriesIndex(t.index,0),n=e.reportData.comparisons[i],r=zo.getComparisonSeriesIndex(t.index,o.index),s=e.reportData.comparisons[r],l=e.reportData.comparisons[o.index];let c='<div class="comparison-card-tooltip">',d=(s.nb_visits/n.nb_visits*100).toFixed(2);return d+="%",c+=a("General_ComparisonCardTooltip1",[`'${this.htmlentities(s.compareSegmentPretty)}'`,s.comparePeriodPretty,d,s.nb_visits.toString(),n.nb_visits.toString()]),t.index>0&&(c+="<br/><br/>",c+=a("General_ComparisonCardTooltip2",[s.nb_visits_change.toString(),this.htmlentities(l.compareSegmentPretty),l.comparePeriodPretty])),c+="</div>",c},htmlentities(e){return M.helper.htmlEntities(e)}},mounted(){M.on("piwikComparisonsChanged",()=>{this.onComparisonsChanged()}),this.onComparisonsChanged()}});Go.render=Fo;var Ko=Go;const Yo={ref:"root",class:"menuDropdown"},Qo=["title"],Jo=["innerHTML"],Xo=Object(D["createElementVNode"])("span",{class:"icon-chevron-down reporting-menu-sub-icon"},null,-1),Zo={class:"items"},ei={key:0,class:"search"},ti=["placeholder"],oi=["title"],ii=["title"];function ni(e,t,o,i,n,a){const r=Object(D["resolveDirective"])("focus-if"),s=Object(D["resolveDirective"])("focus-anywhere-but-here");return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Yo,[Object(D["createElementVNode"])("span",{class:"title",onClick:t[0]||(t[0]=t=>e.showItems=!e.showItems),title:e.tooltip},[Object(D["createElementVNode"])("span",{class:"title-label",innerHTML:e.$sanitize(this.actualMenuTitle)},null,8,Jo),Xo],8,Qo),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",Zo,[e.showSearch&&e.showItems?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ei,[Object(D["withDirectives"])(Object(D["createElementVNode"])("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=t=>e.searchTerm=t),onKeydown:t[2]||(t[2]=t=>e.onSearchTermKeydown(t)),placeholder:e.translate("General_Search")},null,40,ti),[[D["vModelText"],e.searchTerm],[r,{focused:e.showItems}]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",{class:"search_ico icon-search",title:e.translate("General_Search")},null,8,oi),[[D["vShow"],!e.searchTerm]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",{onClick:t[3]||(t[3]=t=>{e.searchTerm="",e.searchItems("")}),class:"reset icon-close",title:e.translate("General_Clear")},null,8,ii),[[D["vShow"],e.searchTerm]])])):Object(D["createCommentVNode"])("",!0),Object(D["createElementVNode"])("div",{onClick:t[4]||(t[4]=t=>e.selectItem(t))},[Object(D["renderSlot"])(e.$slots,"default")])],512),[[D["vShow"],e.showItems]])])),[[s,{blur:e.lostFocus}]])}const{$:ai}=window;var ri=Object(D["defineComponent"])({props:{menuTitle:String,tooltip:String,showSearch:Boolean,menuTitleChangeOnClick:Boolean},directives:{FocusAnywhereButHere:tt,FocusIf:it},emits:["afterSelect"],watch:{menuTitle(){this.actualMenuTitle=this.menuTitle}},data(){return{showItems:!1,searchTerm:"",actualMenuTitle:this.menuTitle}},methods:{lostFocus(){this.showItems=!1},selectItem(e){const t=e.target.classList;!t.contains("item")||t.contains("disabled")||t.contains("separator")||(this.menuTitleChangeOnClick&&(this.actualMenuTitle=(e.target.textContent||"").replace(/[\u0000-\u2666]/g,e=>`&#${e.charCodeAt(0)};`)),this.showItems=!1,ai(this.$slots.default()[0].el).find(".item").removeClass("active"),t.add("active"),this.$emit("afterSelect",e.target))},onSearchTermKeydown(){setTimeout(()=>{this.searchItems(this.searchTerm)})},searchItems(e){const t=e.toLowerCase();ai(this.$refs.root).find(".item").each((e,o)=>{const i=ai(o);-1===i.text().toLowerCase().indexOf(t)?i.hide():i.show()})}}});ri.render=ni;var si=ri;const li={ref:"root"};function ci(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",li,null,512)}const di=1,{$:ui}=window;var pi=Object(D["defineComponent"])({props:{selectedDateStart:Date,selectedDateEnd:Date,persistentHighlightedDateStart:Date,persistentHighlightedDateEnd:Date,highlightedDateStart:Date,highlightedDateEnd:Date,viewDate:[String,Date],stepMonths:Number,disableMonthDropdown:Boolean,disabled:Boolean,options:Object},emits:["cellHover","cellHoverLeave","dateSelect"],setup(e,t){const o=Object(D["ref"])(null);function i(t,o){const i=t.children("a"),{selectedDateStart:n,selectedDateEnd:a}=e,r=o.getTime(),s=!!(e.persistentHighlightedDateStart&&e.persistentHighlightedDateEnd&&o>=e.persistentHighlightedDateStart&&o<=e.persistentHighlightedDateEnd),l=!(!n||!a||r!==n.getTime()&&r!==a.getTime());l?t.addClass("ui-datepicker-current-period"):t.removeClass("ui-datepicker-current-period"),e.highlightedDateStart&&e.highlightedDateEnd&&o>=e.highlightedDateStart&&o<=e.highlightedDateEnd?(t.addClass("ui-state-hover"),i.length&&i.addClass("ui-state-hover")):(t.removeClass("ui-state-hover"),i.removeClass("ui-state-hover")),s?(t.addClass("ui-datepicker-persistent-highlight"),i.length&&i.addClass("ui-datepicker-persistent-highlight")):(t.removeClass("ui-datepicker-persistent-highlight"),i.removeClass("ui-datepicker-persistent-highlight"))}function n(e,t,o){if(e.hasClass("ui-datepicker-other-month"))return a(e,t,o);const i=parseInt(e.children("a,span").text(),10);return new Date(o,t,i)}function a(e,t,o){let i;const a=e.parent(),r=a.children("td");if(a.is(":first-child")){const s=a.children("td:not(.ui-datepicker-other-month)").first();return i=n(s,t,o),i.setDate(r.index(e)-r.index(s)+1),i}const s=a.children("td:not(.ui-datepicker-other-month)").last();return i=n(s,t,o),i.setDate(i.getDate()+r.index(e)-r.index(s)),i}function r(){const e=ui(o.value),t=e.find("td[data-month]"),i=parseInt(t.attr("data-month"),10),n=parseInt(t.attr("data-year"),10);return[i,n]}function s(){const e=ui(o.value),t=e.find(".ui-datepicker-calendar"),a=r(),s=t.find("td"),l=s.first(),c=n(l,a[0],a[1]);s.each((function(){i(ui(this),c),c.setDate(c.getDate()+1)}))}function l(){if(!e.viewDate)return!1;let t;if("string"===typeof e.viewDate)try{t=p(e.viewDate)}catch(a){return!1}else t=e.viewDate;const i=ui(o.value),n=r();return(n[0]!==t.getMonth()||n[1]!==t.getFullYear())&&(i.datepicker("setDate",t),!0)}function c(){const t=ui(o.value),i=t.find(".ui-datepicker-month")[0];i&&(i.disabled=e.disableMonthDropdown||!!e.disabled);const n=t.find(".ui-datepicker-year")[0];n&&(n.disabled=!!e.disabled)}function d(){const t=ui(o.value),i=e.disabled?-1:0;t.find("a, select").attr("tabindex",i),t.attr("aria-disabled",e.disabled?"true":"false"),e.disabled?t.find("a").attr("aria-disabled","true"):t.find("a").removeAttr("aria-disabled")}function u(){const e=ui(o.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",""),e.find(".ui-datepicker-prev .ui-icon").removeClass("ui-icon-circle-triangle-w").addClass("icon-chevron-left"),e.find(".ui-datepicker-next .ui-icon").removeClass("ui-icon-circle-triangle-e").addClass("icon-chevron-right"),d()}function m(){const t=ui(o.value),i=e.stepMonths||di;if(t.datepicker("option","stepMonths")===i)return!1;const n=ui(".ui-datepicker-month",t).val(),a=ui(".ui-datepicker-year",t).val();return t.datepicker("option","stepMonths",i).datepicker("setDate",new Date(a,n)),u(),!0}function h(){if(!ui(this).hasClass("ui-state-hover"))return;const e=ui(this).parent(),t=e.parent();e.is(":first-child")?t.find("a").first().click():t.find("a").last().click()}function g(){c(),d(),s()}return Object(D["watch"])(()=>Object.assign({},e),(e,t)=>{let o=!1;[e=>e.selectedDateStart,e=>e.selectedDateEnd,e=>e.persistentHighlightedDateStart,e=>e.persistentHighlightedDateEnd,e=>e.highlightedDateStart,e=>e.highlightedDateEnd].forEach(i=>{if(o)return;const n=i(e),a=i(t);!n&&a&&(o=!0),n&&!a&&(o=!0),n&&a&&n.getTime()!==a.getTime()&&(o=!0)}),e.viewDate!==t.viewDate&&l()&&(o=!0),e.stepMonths!==t.stepMonths&&m(),e.disableMonthDropdown!==t.disableMonthDropdown&&c(),e.disabled!==t.disabled&&(c(),d()),o&&s()}),Object(D["onMounted"])(()=>{const i=ui(o.value),a=e.options||{},p=Object.assign(Object.assign(Object.assign({},M.getBaseDatePickerOptions()),a),{},{onChangeMonthYear:()=>{setTimeout(()=>{u()})}});i.datepicker(p),i.on("mouseover","tbody td a",e=>{e.originalEvent&&s()}),i.on("mouseenter","tbody td",(function(){const e=r(),o=ui(this),i=n(o,e[0],e[1]);t.emit("cellHover",{date:i,$cell:o})})),i.on("mouseout","tbody td a",()=>{s()}),i.on("mouseleave","table",()=>t.emit("cellHoverLeave")).on("mouseenter","thead",()=>t.emit("cellHoverLeave")),i.on("click","tbody td.ui-datepicker-other-month",h),i.on("click",e=>{e.preventDefault();const t=ui(e.target).closest("a");(t.is(".ui-datepicker-next")||t.is(".ui-datepicker-prev"))&&g()}),i.on("click","td[data-month]",e=>{const o=ui(e.target).closest("td"),i=parseInt(o.attr("data-month"),10),n=parseInt(o.attr("data-year"),10),a=parseInt(o.children("a,span").text(),10);t.emit("dateSelect",{date:new Date(n,i,a)})});const b=m();l(),c(),b||u(),d(),s()}),{root:o}}});pi.render=ci;var mi=pi;const hi={class:"dateRangePicker"},gi={id:"calendarRangeFrom"},bi={class:"dateRangePicker-label"},fi=["disabled"],vi={id:"calendarRangeTo"},Oi={class:"dateRangePicker-label"},yi=["disabled"];function ji(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("DatePicker");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",hi,[Object(D["createElementVNode"])("div",gi,[Object(D["createElementVNode"])("h6",bi,[Object(D["createTextVNode"])(Object(D["toDisplayString"])(e.translate("General_DateRangeFrom"))+" ",1),Object(D["withDirectives"])(Object(D["createElementVNode"])("input",{type:"text",id:"inputCalendarFrom",name:"inputCalendarFrom",class:"browser-default dateRangePicker-field",disabled:e.disabled,"onUpdate:modelValue":t[0]||(t[0]=t=>e.startDateText=t),onKeydown:t[1]||(t[1]=t=>e.onRangeInputChanged("from",t)),onKeyup:t[2]||(t[2]=t=>e.handleEnterPress(t))},null,40,fi),[[D["vModelText"],e.startDateText]])]),Object(D["createVNode"])(r,{id:"calendarFrom","view-date":e.startDate,"selected-date-start":e.fromPickerSelectedDate,"selected-date-end":e.fromPickerSelectedDate,"highlighted-date-start":e.fromPickerHoveredDate,"highlighted-date-end":e.fromPickerHoveredDate,disabled:e.disabled,onDateSelect:t[3]||(t[3]=t=>e.setStartRangeDate(t.date)),onCellHover:t[4]||(t[4]=t=>e.fromPickerHoveredDate=e.getNewHoveredDate(t.date,t.$cell)),onCellHoverLeave:t[5]||(t[5]=t=>e.fromPickerHoveredDate=null)},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end","disabled"])]),Object(D["createElementVNode"])("div",vi,[Object(D["createElementVNode"])("h6",Oi,[Object(D["createTextVNode"])(Object(D["toDisplayString"])(e.translate("General_DateRangeTo"))+" ",1),Object(D["withDirectives"])(Object(D["createElementVNode"])("input",{type:"text",id:"inputCalendarTo",name:"inputCalendarTo",class:"browser-default dateRangePicker-field",disabled:e.disabled,"onUpdate:modelValue":t[6]||(t[6]=t=>e.endDateText=t),onKeydown:t[7]||(t[7]=t=>e.onRangeInputChanged("to",t)),onKeyup:t[8]||(t[8]=t=>e.handleEnterPress(t))},null,40,yi),[[D["vModelText"],e.endDateText]])]),Object(D["createVNode"])(r,{id:"calendarTo","view-date":e.endDate,"selected-date-start":e.toPickerSelectedDate,"selected-date-end":e.toPickerSelectedDate,"highlighted-date-start":e.toPickerHoveredDate,"highlighted-date-end":e.toPickerHoveredDate,disabled:e.disabled,onDateSelect:t[9]||(t[9]=t=>e.setEndRangeDate(t.date)),onCellHover:t[10]||(t[10]=t=>e.toPickerHoveredDate=e.getNewHoveredDate(t.date,t.$cell)),onCellHoverLeave:t[11]||(t[11]=t=>e.toPickerHoveredDate=null)},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end","disabled"])])])}const wi="YYYY-MM-DD";var Si=Object(D["defineComponent"])({name:"DateRangePicker",props:{startDate:String,endDate:String,disabled:Boolean},components:{DatePicker:mi},data(){let e=null;try{this.startDate&&(e=p(this.startDate))}catch(o){}let t=null;try{this.endDate&&(t=p(this.endDate))}catch(o){}return{fromPickerSelectedDate:e,toPickerSelectedDate:t,fromPickerHoveredDate:null,toPickerHoveredDate:null,startDateText:this.startDate,endDateText:this.endDate,startDateInvalid:!1,endDateInvalid:!1}},emits:["rangeChange","submit"],watch:{startDate(){this.startDateText=this.startDate,this.syncStartRangeDateFromProp(this.startDate)},endDate(){this.endDateText=this.endDate,this.syncEndRangeDateFromProp(this.endDate)}},methods:{setStartRangeDate(e){this.fromPickerSelectedDate=e,this.rangeChanged()},setEndRangeDate(e){this.toPickerSelectedDate=e,this.rangeChanged()},onRangeInputChanged(e,t){setTimeout(()=>{"from"===e?this.setStartRangeDateFromStr(t.target.value):this.setEndRangeDateFromStr(t.target.value)})},getNewHoveredDate(e,t){return t.hasClass("ui-datepicker-unselectable")?null:e},handleEnterPress(e){13===e.keyCode&&this.$emit("submit",{start:this.startDate,end:this.endDate})},syncStartRangeDateFromProp(e){this.startDateInvalid=!0;let t=null;try{e&&e.length===wi.length&&(t=p(e))}catch(o){}t&&(this.fromPickerSelectedDate=t,this.startDateInvalid=!1)},setStartRangeDateFromStr(e){this.syncStartRangeDateFromProp(e),this.startDateInvalid||this.rangeChanged()},syncEndRangeDateFromProp(e){this.endDateInvalid=!0;let t=null;try{e&&e.length===wi.length&&(t=p(e))}catch(o){}t&&(this.toPickerSelectedDate=t,this.endDateInvalid=!1)},setEndRangeDateFromStr(e){this.syncEndRangeDateFromProp(e),this.endDateInvalid||this.rangeChanged()},rangeChanged(){this.$emit("rangeChange",{start:this.fromPickerSelectedDate?d(this.fromPickerSelectedDate):null,end:this.toPickerSelectedDate?d(this.toPickerSelectedDate):null})}}});Si.render=ji;var Ci=Si;function ki(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("DatePicker");return Object(D["openBlock"])(),Object(D["createBlock"])(r,{"selected-date-start":e.selectedDates[0],"selected-date-end":e.selectedDates[1],"persistent-highlighted-date-start":e.committedBetweenHighlightDates[0],"persistent-highlighted-date-end":e.committedBetweenHighlightDates[1],"highlighted-date-start":e.highlightedDates?e.highlightedDates[0]:null,"highlighted-date-end":e.highlightedDates?e.highlightedDates[1]:null,"view-date":e.viewDate,"step-months":"year"===e.period?12:1,"disable-month-dropdown":"year"===e.period,disabled:e.disabled,onCellHover:t[0]||(t[0]=t=>e.onHoverNormalCell(t.date,t.$cell)),onCellHoverLeave:t[1]||(t[1]=t=>e.onHoverLeaveNormalCells()),onDateSelect:t[2]||(t[2]=t=>e.onDateSelected(t.date))},null,8,["selected-date-start","selected-date-end","persistent-highlighted-date-start","persistent-highlighted-date-end","highlighted-date-start","highlighted-date-end","view-date","step-months","disable-month-dropdown","disabled"])}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const Di=" ",Ei=["custom","previousPeriod","previousYear"],Pi=[{key:"custom",value:a("General_Custom")},{key:"previousPeriod",value:a("General_PreviousPeriod").replace(/\s+/,Di)},{key:"previousYear",value:a("General_PreviousYear").replace(/\s+/,Di)}];function Ti(){return new Date(window.piwik.minDateYear,window.piwik.minDateMonth-1,window.piwik.minDateDay)}function xi(){return new Date(window.piwik.maxDateYear,window.piwik.maxDateMonth-1,window.piwik.maxDateDay)}const Vi="range";function Bi(e){return"[object Date]"===Object.prototype.toString.call(e)&&!Number.isNaN(e.getTime())}function Ni(e){return"day"===e||"week"===e||"month"===e||"year"===e}var Ii=Object(D["defineComponent"])({props:{period:{type:String,required:!0},date:[String,Date],disabled:Boolean},components:{DatePicker:mi},emits:["select"],setup(e,t){const o=Object(D["ref"])(e.date),i=Object(D["ref"])([null,null]),n=Object(D["ref"])([null,null]),a=Object(D["ref"])(null),r=Ti(),s=xi();function l(t){const o=c.get(e.period).parse(t).getDateRange();return o[0]=r<o[0]?o[0]:r,o[1]=s>o[1]?o[1]:s,o}function d(e,t){if(!e||!t||e.getTime()>=t.getTime())return[null,null];const o=new Date(e);o.setDate(o.getDate()+1);const i=new Date(t);return i.setDate(i.getDate()-1),o.getTime()>i.getTime()?[null,null]:[o,i]}function u(e){if(!e)return void(n.value=[null,null]);const t=l(e);n.value=d(t[0],t[1])}function m(t,o){const i=t<r||t>s,n=o.hasClass("ui-datepicker-other-month")&&("month"===e.period||"day"===e.period);a.value=i||n?[null,null]:l(t)}function h(){a.value=null}function g(e){t.emit("select",{date:e})}function b(){if(!e.period||!e.date)return i.value=[null,null],n.value=[null,null],a.value=null,void(o.value=null);i.value=l(e.date),u(e.date),a.value=null,o.value=p(e.date)}return Object(D["watch"])(e,b),b(),{selectedDates:i,committedBetweenHighlightDates:n,highlightedDates:a,viewDate:o,onHoverNormalCell:m,onHoverLeaveNormalCells:h,onDateSelected:g}}});Ii.render=ki;var Mi=Ii;const Fi={key:0},Ri=["data-notification-instance-id"],Li={key:1},Ai={class:"notification-body"},_i=["innerHTML"],Hi={key:1};function $i(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createBlock"])(D["Transition"],{name:"toast"===e.type?"slow-fade-out":void 0,onAfterLeave:t[1]||(t[1]=t=>e.toastClosed())},{default:Object(D["withCtx"])(()=>[e.deleted?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Fi,[Object(D["createVNode"])(D["Transition"],{name:"toast"===e.type?"toast-slide-up":void 0,appear:""},{default:Object(D["withCtx"])(()=>[Object(D["createElementVNode"])("div",null,[Object(D["createVNode"])(D["Transition"],{name:e.animate?"fade-in":void 0,appear:""},{default:Object(D["withCtx"])(()=>[Object(D["createElementVNode"])("div",{class:Object(D["normalizeClass"])(["notification system",e.cssClasses]),style:Object(D["normalizeStyle"])(e.style),ref:"root","data-notification-instance-id":e.notificationInstanceId},[e.canClose?(Object(D["openBlock"])(),Object(D["createElementBlock"])("button",{key:0,type:"button",class:"close","data-dismiss":"alert",onClick:t[0]||(t[0]=t=>e.closeNotification(t))}," × ")):Object(D["createCommentVNode"])("",!0),e.title?(Object(D["openBlock"])(),Object(D["createElementBlock"])("strong",Li,Object(D["toDisplayString"])(e.title),1)):Object(D["createCommentVNode"])("",!0),Object(D["createElementVNode"])("div",Ai,[e.message?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.message)},null,8,_i)):Object(D["createCommentVNode"])("",!0),e.message?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Hi,[Object(D["renderSlot"])(e.$slots,"default")]))])],14,Ri)]),_:3},8,["name"])])]),_:3},8,["name"])]))]),_:3},8,["name"])}const{$:Ui}=window;var qi=Object(D["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(){const e={};return this.context&&(e["notification-"+this.context]=!0),this.cssClass&&(e[this.cssClass]=!0),e},canClose(){return"persistent"===this.type||!this.noclear}},emits:["closed"],data(){return{deleted:!1}},mounted(){const e=()=>{setTimeout(()=>{this.deleted=!0},this.toastLength)};"toast"===this.type&&e(),this.style&&Ui(this.$refs.root).css(this.style)},methods:{toastClosed(){Object(D["nextTick"])(()=>{this.$emit("closed")})},closeNotification(e){this.canClose&&e&&e.target&&(this.deleted=!0,Object(D["nextTick"])(()=>{this.$emit("closed")})),this.markNotificationAsRead()},markNotificationAsRead(){this.notificationId&&te.post({module:"CoreHome",action:"markNotificationAsRead"},{notificationId:this.notificationId},{withTokenInUrl:!0})}}});qi.render=$i;var Wi=qi;const zi={class:"notification-group"},Gi=["innerHTML"];function Ki(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Notification");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",zi,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.notifications,(t,o)=>(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:t.id||"no-id-"+o,"notification-id":t.id,title:t.title,context:t.context,type:t.type,noclear:t.noclear,"toast-length":t.toastLength,style:Object(D["normalizeStyle"])(t.style),animate:t.animate,message:t.message,"notification-instance-id":t.notificationInstanceId,"css-class":t.class,onClosed:o=>e.removeNotification(t.id)},{default:Object(D["withCtx"])(()=>[Object(D["createElementVNode"])("div",{innerHTML:e.$sanitize(t.message)},null,8,Gi)]),_:2},1032,["notification-id","title","context","type","noclear","toast-length","style","animate","message","notification-instance-id","css-class","onClosed"]))),128))])}function Yi(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{$:Qi}=window;class Ji{constructor(){Yi(this,"privateState",Object(D["reactive"])({notifications:[]})),Yi(this,"nextNotificationId",0)}get state(){return Object(D["readonly"])(this.privateState)}appendNotification(e){this.checkMessage(e.message),e.id&&this.remove(e.id),this.privateState.notifications.push(e)}prependNotification(e){this.checkMessage(e.message),e.id&&this.remove(e.id),this.privateState.notifications.unshift(e)}remove(e){this.privateState.notifications=this.privateState.notifications.filter(t=>t.id!==e)}parseNotificationDivs(){const e=Qi('[data-role="notification"]'),t=[];e.each((o,i)=>{const n=Qi(i),a=n.data(),r=n.html();r&&t.push(Object.assign(Object.assign({},a),{},{message:r,animate:!1})),e.remove()}),t.forEach(e=>this.show(e))}clearTransientNotifications(){this.privateState.notifications=this.privateState.notifications.filter(e=>"transient"!==e.type)}show(e){this.checkMessage(e.message);let t=e.prepend?this.prependNotification:this.appendNotification,o="#notificationContainer";if(e.placeat)o=e.placeat;else{const e=".modal.open .modal-content",i=document.querySelector(e);i&&(i.querySelector("#modalNotificationContainer")||Qi(i).prepend('<div id="modalNotificationContainer"/>'),o=e+" #modalNotificationContainer",t=this.prependNotification)}const i=e.group||(o?o.toString():"");this.initializeNotificationContainer(o,i);const n=(this.nextNotificationId+=1).toString();return t.call(this,Object.assign(Object.assign({},e),{},{noclear:!!e.noclear,group:i,notificationId:e.id,notificationInstanceId:n,type:e.type||"transient"})),n}scrollToNotification(e){setTimeout(()=>{const t=document.querySelector(`[data-notification-instance-id='${e}']`);t&&M.helper.lazyScrollTo(t,250)})}toast(e){this.checkMessage(e.message);const t=e.placeat?Qi(e.placeat):void 0;if(!t||!t.length)throw new Error("A valid selector is required for the placeat option when using Notification.toast().");const o=document.createElement("div");o.style.position="absolute",o.style.top=t.offset().top+"px",o.style.left=t.offset().left+"px",o.style.zIndex="1000",document.body.appendChild(o);const i=ve({render:()=>Object(D["createVNode"])(Wi,Object.assign(Object.assign({},e),{},{notificationId:e.id,type:"toast",onClosed:()=>{i.unmount()}}))});i.mount(o)}initializeNotificationContainer(e,t){if(!e)return;const o=Qi(e);if(o.children(".notification-group").length)return;const i=window.CoreHome.NotificationGroup,n=ve({template:'<NotificationGroup :group="group"></NotificationGroup>',data:()=>({group:t})});n.component("NotificationGroup",i),n.mount(o[0])}checkMessage(e){if(!e)throw new Error("No message given, cannot display notification")}}const Xi=new Ji;var Zi=Xi;Qi(()=>Xi.parseNotificationDivs());var en=Object(D["defineComponent"])({props:{group:String},components:{Notification:Wi},computed:{notifications(){return Zi.state.notifications.filter(e=>this.group?this.group===e.group:!e.group)}},methods:{removeNotification(e){Zi.remove(e)}}});en.render=Ki;var tn=en;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const on=Object(D["createElementVNode"])("span",{class:"icon-help"},null,-1),nn=[on];function an(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{class:"item-help-icon",tabindex:"5",href:"javascript:",onClick:t[0]||(t[0]=(...t)=>e.showHelp&&e.showHelp(...t))},nn)}const rn="reportingMenu-help";var sn=Object(D["defineComponent"])({props:{message:{type:String,required:!0},name:{type:String,required:!0}},data(){return{currentName:""}},methods:{showHelp(){if(""!==this.currentName)return Zi.remove(rn),void(this.currentName="");Zi.show({context:"info",id:rn,type:"help",noclear:!0,class:"help-notification",message:this.message,placeat:"#notificationContainer",prepend:!0}),""!==this.name&&(this.currentName=this.name)}}});sn.render=an;var ln=sn;function cn(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */class dn{constructor(){cn(this,"state",Object(D["reactive"])({initialSites:[],isInitialized:!1})),cn(this,"stateFiltered",Object(D["reactive"])({initialSites:[],isInitialized:!1,excludedSites:[],onlySitesWithAdminAccess:!1,onlySitesWithAtLeastWriteAccess:!1,siteTypesToExclude:[]})),cn(this,"currentRequestAbort",null),cn(this,"limitRequest",void 0),cn(this,"initialSites",Object(D["computed"])(()=>Object(D["readonly"])(this.state.initialSites))),cn(this,"initialSitesFiltered",Object(D["computed"])(()=>Object(D["readonly"])(this.stateFiltered.initialSites)))}isFiltered(e=!1,t=[],o=!1,i=[]){return t.length>0||e||o||i.length>0}matchesCurrentFilteredState(e=!1,t=[],o=!1,i=[]){return!this.stateFiltered.isInitialized&&!this.isFiltered(e,t,o,i)||this.stateFiltered.isInitialized&&t.length===this.stateFiltered.excludedSites.length&&t.every((e,t)=>e===this.stateFiltered.excludedSites[t])&&e===this.stateFiltered.onlySitesWithAdminAccess&&o===this.stateFiltered.onlySitesWithAtLeastWriteAccess&&i.length===this.stateFiltered.siteTypesToExclude.length&&i.every((e,t)=>e===this.stateFiltered.siteTypesToExclude[t])}loadInitialSites(e=!1,t=[],o=!1,i=[]){return this.state.isInitialized&&!this.isFiltered(e,t,o,i)?Promise.resolve(Object(D["readonly"])(this.state.initialSites)):this.stateFiltered.isInitialized&&this.matchesCurrentFilteredState(e,t,o,i)?Promise.resolve(Object(D["readonly"])(this.stateFiltered.initialSites)):this.isFiltered(e,t,o,i)?this.searchSite("%",e,t,o,i).then(n=>(this.stateFiltered.isInitialized=!0,this.stateFiltered.excludedSites=t,this.stateFiltered.onlySitesWithAdminAccess=e,this.stateFiltered.onlySitesWithAtLeastWriteAccess=o,this.stateFiltered.siteTypesToExclude=i,null!==n&&(this.stateFiltered.initialSites=n),n)):this.state.isInitialized?Promise.resolve(Object(D["readonly"])(this.state.initialSites)):this.searchSite("%",e,t,o,i).then(e=>(this.state.isInitialized=!0,null!==e&&(this.state.initialSites=e),e))}loadSite(e){"all"===e?U.updateUrl(Object.assign(Object.assign({},U.urlParsed.value),{},{module:"MultiSites",action:"index",date:U.parsed.value.date,period:U.parsed.value.period})):U.updateUrl(Object.assign(Object.assign({},U.urlParsed.value),{},{segment:"",idSite:e}),Object.assign(Object.assign({},U.hashParsed.value),{},{segment:"",idSite:e}))}searchSite(e,t=!1,o=[],i=!1,n=[]){return e?(this.currentRequestAbort&&this.currentRequestAbort.abort(),this.limitRequest||(this.limitRequest=te.fetch({method:"SitesManager.getNumWebsitesToDisplayPerPage"})),this.limitRequest.then(a=>{const r=a.value;let s="view";return t?s="admin":i&&(s="write"),this.currentRequestAbort=new AbortController,te.fetch({method:"SitesManager.getSitesWithMinimumAccess",permission:s,limit:r,pattern:e,sitesToExclude:o,siteTypesToExclude:n},{abortController:this.currentRequestAbort,abortable:!1})}).then(e=>e?this.processWebsitesList(e):null).finally(()=>{this.currentRequestAbort=null})):this.loadInitialSites(t,o,i,n)}processWebsitesList(e){let t=e;return t&&t.length?(t=t.map(e=>Object.assign(Object.assign({},e),{},{name:e.group?`[${e.group}] ${e.name}`:e.name})),t.sort((e,t)=>e.name.toLowerCase()<t.name.toLowerCase()?-1:e.name.toLowerCase()>t.name.toLowerCase()?1:0),t):[]}}var un=new dn;const pn=["value","name"],mn=["title"],hn=["textContent"],gn={key:1,class:"placeholder"},bn={class:"dropdown"},fn={class:"custom_select_search"},vn=["placeholder"],On={key:0},yn={class:"custom_select_container"},jn=["onClick"],wn=["innerHTML","href","title"],Sn={class:"custom_select_ul_list"},Cn={class:"noresult"},kn={key:1};function Dn(e,t,o,i,n,a){var r,s,l,c;const d=Object(D["resolveComponent"])("AllSitesLink"),u=Object(D["resolveDirective"])("tooltips"),p=Object(D["resolveDirective"])("focus-if"),m=Object(D["resolveDirective"])("focus-anywhere-but-here");return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:Object(D["normalizeClass"])(["siteSelector piwikSelector borderedControl",{expanded:e.showSitesList,disabled:!e.hasMultipleSites}])},[e.name?(Object(D["openBlock"])(),Object(D["createElementBlock"])("input",{key:0,type:"hidden",value:null===(r=e.displayedModelValue)||void 0===r?void 0:r.id,name:e.name},null,8,pn)):Object(D["createCommentVNode"])("",!0),Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{ref:"selectorLink",onClick:t[0]||(t[0]=(...t)=>e.onClickSelector&&e.onClickSelector(...t)),onKeydown:t[1]||(t[1]=t=>e.onPressEnter(t)),href:"javascript:void(0)",class:Object(D["normalizeClass"])([{loading:e.isLoading},"title"]),tabindex:"4",title:e.selectorLinkTitle},[Object(D["createElementVNode"])("span",null,[null!==(s=e.displayedModelValue)&&void 0!==s&&s.name||!e.placeholder?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,textContent:Object(D["toDisplayString"])((null===(l=e.displayedModelValue)||void 0===l?void 0:l.name)||e.firstSiteName)},null,8,hn)):Object(D["createCommentVNode"])("",!0),null!==(c=e.displayedModelValue)&&void 0!==c&&c.name||!e.placeholder?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",gn,Object(D["toDisplayString"])(e.placeholder),1))]),Object(D["createElementVNode"])("span",{class:Object(D["normalizeClass"])(["icon icon-chevron-down",{iconHidden:e.isLoading,collapsed:!e.showSitesList}])},null,2)],42,mn)),[[u]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",bn,[Object(D["withDirectives"])(Object(D["createElementVNode"])("div",fn,[Object(D["withDirectives"])(Object(D["createElementVNode"])("input",{type:"text",onClick:t[2]||(t[2]=t=>{e.searchTerm="",e.loadInitialSites()}),"onUpdate:modelValue":t[3]||(t[3]=t=>e.searchTerm=t),tabindex:"4",class:"websiteSearch inp browser-default",placeholder:e.translate("General_Search")},null,8,vn),[[D["vModelText"],e.searchTerm],[p,{focused:e.shouldFocusOnSearch}]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("img",{title:"Clear",onClick:t[4]||(t[4]=t=>{e.searchTerm="",e.loadInitialSites()}),class:"reset",src:"plugins/CoreHome/images/reset_search.png"},null,512),[[D["vShow"],e.searchTerm]])],512),[[D["vShow"],e.autocompleteMinSites<=e.sites.length||e.searchTerm]]),"top"===e.allSitesLocation&&e.showAllSitesItem?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",On,[Object(D["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[5]||(t[5]=t=>e.onAllSitesClick(t))},null,8,["href","all-sites-text"])])):Object(D["createCommentVNode"])("",!0),Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",yn,[Object(D["createElementVNode"])("ul",{class:"custom_select_ul_list",onClick:t[7]||(t[7]=t=>e.showSitesList=!1)},[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.sites,(o,i)=>Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{onClick:t=>e.switchSite(Object.assign(Object.assign({},o),{},{id:o.idsite}),t),key:i},[Object(D["createElementVNode"])("a",{onClick:t[6]||(t[6]=e=>e.preventDefault()),innerHTML:e.$sanitize(e.getMatchedSiteName(o.name)),tabindex:"4",href:e.getUrlForSiteId(o.idsite),title:o.name},null,8,wn)],8,jn)),[[D["vShow"],!(!e.showSelectedSite&&""+e.activeSiteId===""+o.idsite)]])),128))]),Object(D["withDirectives"])(Object(D["createElementVNode"])("ul",Sn,[Object(D["createElementVNode"])("li",null,[Object(D["createElementVNode"])("div",Cn,Object(D["toDisplayString"])(e.translate("SitesManager_NotFound")+" "+e.searchTerm),1)])],512),[[D["vShow"],!e.sites.length&&e.searchTerm]])])),[[u,{content:e.tooltipContent}]]),"bottom"===e.allSitesLocation&&e.showAllSitesItem?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",kn,[Object(D["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[8]||(t[8]=t=>e.onAllSitesClick(t))},null,8,["href","all-sites-text"])])):Object(D["createCommentVNode"])("",!0)],512),[[D["vShow"],e.showSitesList]])],2)),[[m,{blur:e.onBlur}]])}const En=["innerHTML","href"];function Pn(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{onClick:t[1]||(t[1]=e=>this.onClick(e)),class:"custom_select_all"},[Object(D["createElementVNode"])("a",{onClick:t[0]||(t[0]=e=>e.preventDefault()),innerHTML:e.$sanitize(e.allSitesText),tabindex:"4",href:e.href},null,8,En)])}var Tn=Object(D["defineComponent"])({props:{href:String,allSitesText:String},emits:["click"],methods:{onClick(e){this.$emit("click",e)}}});Tn.render=Pn;var xn=Tn,Vn=Object(D["defineComponent"])({props:{modelValue:Object,showSelectedSite:{type:Boolean,default:!1},showAllSitesItem:{type:Boolean,default:!0},switchSiteOnSelect:{type:Boolean,default:!0},onlySitesWithAdminAccess:{type:Boolean,default:!1},name:{type:String,default:""},allSitesText:{type:String,default:a("General_MultiSitesSummary")},allSitesLocation:{type:String,default:"bottom"},placeholder:String,defaultToFirstSite:Boolean,sitesToExclude:{type:Array,default:()=>[]},onlySitesWithAtLeastWriteAccess:{type:Boolean,default:!1},siteTypesToExclude:{type:Array,default:()=>[]}},emits:["update:modelValue","blur"],components:{AllSitesLink:xn},directives:{FocusAnywhereButHere:tt,FocusIf:it,Tooltips:ct},watch:{searchTerm(){this.onSearchTermChanged()}},data(){return{searchTerm:"",activeSiteId:""+M.idSite,showSitesList:!1,isLoading:!1,sites:[],autocompleteMinSites:parseInt(M.config.autocomplete_min_sites,10)}},created(){this.searchSite=Pe(this.searchSite),!this.modelValue&&M.idSite&&this.$emit("update:modelValue",{id:M.idSite,name:M.helper.htmlDecode(M.siteName)})},mounted(){window.initTopControls(),this.loadInitialSites().then(()=>{this.shouldDefaultToFirstSite&&this.$emit("update:modelValue",{id:this.sites[0].idsite,name:this.sites[0].name})});const e=a("CoreHome_ShortcutWebsiteSelector");M.helper.registerShortcut("w",e,e=>{if(e.altKey)return;e.preventDefault?e.preventDefault():e.returnValue=!1;const t=this.$refs.selectorLink;t&&(t.click(),t.focus())})},computed:{shouldFocusOnSearch(){return this.showSitesList&&this.autocompleteMinSites<=this.sites.length||this.searchTerm},selectorLinkTitle(){return this.hasMultipleSites&&this.displayedModelValue?a("CoreHome_ChangeCurrentWebsite",this.htmlEntities(this.displayedModelValue.name)):""},hasMultipleSites(){const e=un.matchesCurrentFilteredState(this.onlySitesWithAdminAccess,this.sitesToExclude?this.sitesToExclude:[],this.onlySitesWithAtLeastWriteAccess,this.siteTypesToExclude?this.siteTypesToExclude:[])&&un.initialSitesFiltered.value&&un.initialSitesFiltered.value.length?un.initialSitesFiltered.value:un.initialSites.value;return e&&e.length>1},firstSiteName(){const e=un.initialSitesFiltered.value&&un.initialSitesFiltered.value.length?un.initialSitesFiltered.value:un.initialSites.value;return e&&e.length>0?e[0].name:""},urlAllSites(){const e=U.stringify(Object.assign(Object.assign({},U.urlParsed.value),{},{module:"MultiSites",action:"index",date:U.parsed.value.date,period:U.parsed.value.period}));return"?"+e},shouldDefaultToFirstSite(){var e;return!(null!==(e=this.modelValue)&&void 0!==e&&e.id)&&(!this.hasMultipleSites||this.defaultToFirstSite)&&this.sites[0]},displayedModelValue(){return this.modelValue?this.modelValue:M.idSite?{id:M.idSite,name:M.helper.htmlDecode(M.siteName)}:this.shouldDefaultToFirstSite?{id:this.sites[0].idsite,name:this.sites[0].name}:null},tooltipContent(){return function(){const e=$(this).attr("title")||"";return M.helper.htmlEntities(e)}}},methods:{onSearchTermChanged(){this.searchTerm?(this.isLoading=!0,this.searchSite(this.searchTerm)):(this.isLoading=!1,this.loadInitialSites())},onAllSitesClick(e){this.switchSite({id:"all",name:this.$props.allSitesText},e),this.showSitesList=!1},switchSite(e,t){const o=-1!==navigator.userAgent.indexOf("Mac OS X")?t.metaKey:t.ctrlKey;t&&o&&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&&un.loadSite(e.id))},onBlur(){this.showSitesList=!1,this.$emit("blur")},onClickSelector(){this.hasMultipleSites&&(this.showSitesList=!this.showSitesList,this.isLoading||this.searchTerm||this.loadInitialSites())},onPressEnter(e){"Enter"===e.key&&(e.preventDefault(),this.showSitesList=!this.showSitesList,this.showSitesList&&!this.isLoading&&this.loadInitialSites())},getMatchedSiteName(e){const t=e.toUpperCase().indexOf(this.searchTerm.toUpperCase());if(-1===t||this.isLoading)return this.htmlEntities(e);const o=this.htmlEntities(e.substring(0,t)),i=this.htmlEntities(e.substring(t+this.searchTerm.length));return`${o}<span class="autocompleteMatched">${this.searchTerm}</span>${i}`},loadInitialSites(){return un.loadInitialSites(this.onlySitesWithAdminAccess,this.sitesToExclude?this.sitesToExclude:[],this.onlySitesWithAtLeastWriteAccess,this.siteTypesToExclude?this.siteTypesToExclude:[]).then(e=>{this.sites=e||[]})},searchSite(e){this.isLoading=!0,un.searchSite(e,this.onlySitesWithAdminAccess,this.sitesToExclude?this.sitesToExclude:[],this.onlySitesWithAtLeastWriteAccess,this.siteTypesToExclude?this.siteTypesToExclude:[]).then(t=>{e===this.searchTerm&&t&&(this.sites=t)}).finally(()=>{this.isLoading=!1})},getUrlForSiteId(e){const t=U.stringify(Object.assign(Object.assign({},U.urlParsed.value),{},{segment:"",idSite:e})),o=U.stringify(Object.assign(Object.assign({},U.hashParsed.value),{},{segment:"",idSite:e}));return`?${t}#?${o}`},htmlEntities(e){return M.helper.htmlEntities(e)}}});Vn.render=Dn;var Bn=Vn;const Nn={ref:"root",class:"quickAccessInside"},In=["title","placeholder"],Mn={class:"dropdown quickAccessDropdown"},Fn={class:"no-result"},Rn=["onClick"],Ln=["onMouseenter","onClick"],An={class:"quickAccessMatomoSearch"},_n=["onMouseenter","onClick"],Hn=["textContent"],$n={class:"quick-access-category helpCategory"},Un=["href"];function qn(e,t,o,i,n,a){const r=Object(D["resolveDirective"])("focus-if"),s=Object(D["resolveDirective"])("tooltips"),l=Object(D["resolveDirective"])("focus-anywhere-but-here");return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Nn,[Object(D["createElementVNode"])("span",{class:"icon-search",onMouseenter:t[0]||(t[0]=t=>e.searchActive=!0)},null,32),Object(D["withDirectives"])(Object(D["createElementVNode"])("input",{class:"quickAccessInput browser-default",onKeydown:t[1]||(t[1]=t=>e.onKeypress(t)),onFocus:t[2]||(t[2]=t=>e.searchActive=!0),"onUpdate:modelValue":t[3]||(t[3]=t=>e.searchTerm=t),type:"text",tabindex:"5",title:e.quickAccessTitle,placeholder:e.translate("General_Search"),ref:"input"},null,40,In),[[D["vModelText"],e.searchTerm],[r,{focused:e.searchActive}],[s]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",Mn,[Object(D["withDirectives"])(Object(D["createElementVNode"])("ul",null,[Object(D["createElementVNode"])("li",Fn,Object(D["toDisplayString"])(e.translate("General_SearchNoResults")),1)],512),[[D["vShow"],!(e.numMenuItems>0||e.sites.length)]]),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.menuItems,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",{key:t.title},[Object(D["createElementVNode"])("li",{class:"quick-access-category",onClick:o=>{e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(D["toDisplayString"])(t.title),9,Rn),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(t.items,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{class:Object(D["normalizeClass"])(["result",{selected:t.menuIndex===e.searchIndex}]),onMouseenter:o=>e.searchIndex=t.menuIndex,onClick:o=>e.selectMenuItem(t),key:t.index},[Object(D["createElementVNode"])("a",null,Object(D["toDisplayString"])(t.name.trim()),1)],42,Ln))),128))]))),128)),Object(D["createElementVNode"])("ul",An,[Object(D["withDirectives"])(Object(D["createElementVNode"])("li",{class:"quick-access-category websiteCategory"},Object(D["toDisplayString"])(e.translate("SitesManager_Sites")),513),[[D["vShow"],e.hasSitesSelector&&e.sites.length||e.isLoading]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("li",{class:"no-result"},Object(D["toDisplayString"])(e.translate("MultiSites_LoadingWebsites")),513),[[D["vShow"],e.hasSitesSelector&&e.isLoading]]),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.sites,(t,o)=>Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{class:Object(D["normalizeClass"])(["result",{selected:e.numMenuItems+o===e.searchIndex}]),onMouseenter:t=>e.searchIndex=e.numMenuItems+o,onClick:o=>e.selectSite(t.idsite),key:t.idsite},[Object(D["createElementVNode"])("a",{textContent:Object(D["toDisplayString"])(t.name)},null,8,Hn)],42,_n)),[[D["vShow"],e.hasSitesSelector&&!e.isLoading]])),128))]),Object(D["createElementVNode"])("ul",null,[Object(D["createElementVNode"])("li",$n,Object(D["toDisplayString"])(e.translate("General_HelpResources")),1),Object(D["createElementVNode"])("li",{class:Object(D["normalizeClass"])([{selected:"help"===e.searchIndex},"quick-access-help"]),onMouseenter:t[4]||(t[4]=t=>e.searchIndex="help")},[Object(D["createElementVNode"])("a",{href:"https://matomo.org?mtm_campaign=App_Help&mtm_source=Matomo_App&mtm_keyword=QuickSearch&s="+encodeURIComponent(e.searchTerm),target:"_blank"},Object(D["toDisplayString"])(e.translate("CoreHome_SearchOnMatomo",e.searchTerm)),9,Un)],34)])],512),[[D["vShow"],e.searchTerm&&e.searchActive]])])),[[l,{blur:e.onBlur}]])}function Wn(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */class zn{constructor(){Wn(this,"privateState",Object(D["reactive"])({pages:[]})),Wn(this,"state",Object(D["computed"])(()=>Object(D["readonly"])(this.privateState))),Wn(this,"fetchAllPagesPromise",void 0),Wn(this,"pages",Object(D["computed"])(()=>this.state.value.pages))}findPageInCategory(e){return this.pages.value.find(t=>t&&t.category&&t.category.id===e&&t.subcategory&&t.subcategory.id)}findPage(e,t){return this.pages.value.find(o=>o&&o.category&&o.subcategory&&o.category.id===e&&""+o.subcategory.id===t)}reloadAllPages(){return delete this.fetchAllPagesPromise,this.getAllPages()}getAllPages(){return this.fetchAllPagesPromise||(this.fetchAllPagesPromise=te.fetch({method:"API.getReportPagesMetadata",filter_limit:"-1"}).then(e=>(this.privateState.pages=e,this.pages.value))),this.fetchAllPagesPromise.then(()=>this.pages.value)}}var Gn=new zn;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Kn(e){const t=[...e||[]];return t.sort((e,t)=>e.order<t.order?-1:e.order>t.order?1:0),t}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Yn(e){const t=e;return t.subcategories?t.subcategories:[]}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Qn(e){const t=e;return t.subcategories?t.subcategories:[]}function Jn(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Xn(e){const t=parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)}const Zn="";function ea(e){const{groups:t}=e;return t&&t.length?t:[Zn]}class ta{constructor(){Jn(this,"privateState",Object(D["reactive"])({activeSubcategoryId:null,activeSubsubcategoryId:null})),Jn(this,"state",Object(D["computed"])(()=>Object(D["readonly"])(this.privateState))),Jn(this,"activeCategory",Object(D["computed"])(()=>"undefined"!==typeof this.state.value.activeCategoryId?this.state.value.activeCategoryId:U.parsed.value.category)),Jn(this,"activeSubcategory",Object(D["computed"])(()=>this.state.value.activeSubcategoryId||U.parsed.value.subcategory)),Jn(this,"activeSubsubcategory",Object(D["computed"])(()=>{const e=this.state.value.activeSubsubcategoryId;if(e)return e;const t=this.findSubcategory(this.activeCategory.value,this.activeSubcategory.value);return t.subsubcategory&&t.subsubcategory.id===this.activeSubcategory.value?t.subsubcategory.id:null})),Jn(this,"menu",Object(D["computed"])(()=>this.buildMenuFromPages(U.parsed.value.group||Zn))),Jn(this,"fullMenu",Object(D["computed"])(()=>this.buildMenuFromPages(null)))}fetchMenuItems(){return Gn.getAllPages().then(()=>this.menu.value)}reloadMenuItems(){return Gn.reloadAllPages().then(()=>this.menu.value)}findSubcategory(e,t){let o=void 0,i=void 0,n=void 0;return this.menu.value.forEach(a=>{a.id===e&&(Yn(a)||[]).forEach(e=>{e.id===t&&(o=a,i=e),e.isGroup&&(Qn(e)||[]).forEach(r=>{r.id===t&&(o=a,i=e,n=r)})})}),{category:o,subcategory:i,subsubcategory:n}}buildMenuFromPages(e){const t=[],o=U.parsed.value.category,i=U.parsed.value.subcategory,n=Gn.pages.value,r={};return n.forEach(s=>{const l=Object.assign({},s.category),c=l.id,d=c===o;if(r[c])return;if(null!==e&&!ea(l).includes(e))return;r[c]=!0,l.subcategories=[];let u=null;const p=n.filter(e=>e.category.id===c);p.forEach(e=>{const t=Object.assign({},e.subcategory),o=t.id===i&&d;if(e.widgets&&e.widgets[0]&&Xn(e.subcategory.id)){u||(u=Object.assign({},t),u.name=a("CoreHome_ChooseX",[l.name]),u.isGroup=!0,u.subcategories=[],u.order=10),o&&(u.name=t.name);const e=t.id;return t.tooltip=`${t.name} (id = ${e})`,void u.subcategories.push(t)}l.subcategories.push(t)}),u&&u.subcategories&&u.subcategories.length<=5?u.subcategories.forEach(e=>l.subcategories.push(e)):u&&l.subcategories.push(u),l.subcategories=Kn(Yn(l)),t.push(l)}),Kn(t)}toggleCategory(e){return this.privateState.activeSubcategoryId=null,this.privateState.activeSubsubcategoryId=null,this.activeCategory.value===e.id?(this.privateState.activeCategoryId=null,!1):(this.privateState.activeCategoryId=e.id,!0)}enterSubcategory(e,t,o){e&&t&&(this.privateState.activeCategoryId=e.id,this.privateState.activeSubcategoryId=t.id,o&&(this.privateState.activeSubsubcategoryId=o.id))}}var oa=new ta;const{ListingFormatter:ia}=window;function na(e){const t=e.getBoundingClientRect(),o=window.$(window);return t.top>=0&&t.left>=0&&t.bottom<=o.height()&&t.right<=o.width()}function aa(e){e&&e.scrollIntoView&&e.scrollIntoView()}var ra=Object(D["defineComponent"])({name:"QuickAccess",directives:{FocusAnywhereButHere:tt,FocusIf:it,Tooltips:ct},watch:{searchActive(e){const t=this.$refs.root;if(!t||!t.parentElement)return;const o=t.parentElement.classList;o.toggle("active",e),o.toggle("expanded",e)},reportingGroup(){this.topMenuItems=null,this.leftMenuItems=null,this.segmentItems=null,this.deactivateSearch()}},mounted(){const e=this.$refs.root;e&&e.parentElement&&e.parentElement.classList.add("quick-access","piwikSelector"),M.helper.registerShortcut("f",a("CoreHome_ShortcutSearch"),e=>{if(e.altKey)return;e.preventDefault();const t=document.querySelector("nav .activateLeftMenu");t&&window.$(t).is(":visible")&&Yt(),aa(this.$refs.root),this.activateSearch()})},data(){const 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(){this.searchMenu=Pe(this.searchMenu.bind(this))},computed:{reportingGroup(){return U.parsed.value.group||Zn},hasSitesSelector(){return!!document.querySelector('.top_controls .siteSelector,.top_controls [vue-entry="CoreHome.SiteSelector"]')},quickAccessTitle(){const e=[a("CoreHome_MenuEntries")];return this.hasSegmentSelector&&e.push(a("CoreHome_Segments")),this.hasSitesSelector&&e.push(a("SitesManager_Sites")),a("CoreHome_QuickAccessTitle",ia.formatAnd(e))}},emits:["itemSelected","blur"],methods:{onKeypress(e){const t=this.searchTerm&&this.searchActive,o=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():o&&t||i&&t?this.deactivateSearch():o?this.searchActive=!1:setTimeout(()=>{this.searchActive=!0,this.searchMenu(this.searchTerm)})},highlightPreviousItem(){this.searchIndex-1<0?this.searchIndex=0:this.searchIndex-=1,this.makeSureSelectedItemIsInViewport()},highlightNextItem(){const e=this.$refs.root.querySelectorAll("li.result").length;e<=this.searchIndex+1?this.searchIndex=e-1:this.searchIndex+=1,this.makeSureSelectedItemIsInViewport()},clickQuickAccessMenuItem(){const e=this.getCurrentlySelectedElement();e&&setTimeout(()=>{e.click(),this.$emit("itemSelected",e)},20)},deactivateSearch(){this.searchTerm="",this.searchActive=!1,this.$refs.input&&this.$refs.input.blur()},makeSureSelectedItemIsInViewport(){const e=this.getCurrentlySelectedElement();e&&!na(e)&&aa(e)},getCurrentlySelectedElement(){const e=this.$refs.root.querySelectorAll("li.result");if(e&&e.length&&e.item(this.searchIndex))return e.item(this.searchIndex)},searchMenu(e){const t=e.toLowerCase();let o=-1;const i={},n=[],a=e=>{const t=Object.assign({},e);o+=1,t.menuIndex=o;const{category:a}=t;a in i||(n.push({title:a,items:[]}),i[a]=n.length-1);const r=i[a];n[r].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,un.searchSite(t).then(e=>{e&&(this.sites=e)}).finally(()=>{this.isLoading=!1}));const r=e=>-1!==e.name.toLowerCase().indexOf(t)||-1!==e.category.toLowerCase().indexOf(t);null===this.topMenuItems&&(this.topMenuItems=this.getTopMenuItems()),null===this.leftMenuItems&&(this.leftMenuItems=this.getLeftMenuItems()),null===this.segmentItems&&(this.segmentItems=this.getSegmentItems());const s=this.topMenuItems.filter(r),l=this.leftMenuItems.filter(r),c=this.segmentItems.filter(r),d=this.getReportingMenuItemsFromOtherGroups().filter(r);s.forEach(a),l.forEach(a),c.forEach(a),d.forEach(a),this.numMenuItems=s.length+l.length+c.length+d.length,this.menuItems=n},resetSearchIndex(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite(e){this.deactivateSearch(),Qt(),un.loadSite(e)},selectMenuItem(e){if(e.page)return void this.navigateToReportingPage(e.page);const t=document.querySelector(`[quick_access='${e.index}']`);if(t){this.deactivateSearch(),Qt();const e=t.getAttribute("href");if(e&&e.length>10&&t&&t.click)try{t.click()}catch(o){window.$(t).click()}else window.$(t).click()}},onBlur(){this.searchActive=!1,this.$emit("blur")},activateSearch(){this.searchActive=!0},getTopMenuItems(){const e=a("CoreHome_Menu"),t=[];return document.querySelectorAll("nav .sidenav li > a, nav .sidenav li > div > a").forEach(o=>{var i;let n=null===(i=o.textContent)||void 0===i?void 0:i.trim();var a;(!n||null!=o.parentElement&&null!=o.parentElement.tagName&&"DIV"===o.parentElement.tagName)&&(n=null===(a=o.getAttribute("title"))||void 0===a?void 0:a.trim());n&&(t.push({name:n,index:this.menuIndexCounter+=1,category:e}),o.setAttribute("quick_access",""+this.menuIndexCounter))}),t},getLeftMenuItems(){const e=[];return document.querySelectorAll("#secondNavBar .menuTab").forEach(t=>{var o;const i=window.$(t).find("> .item");let n=(null===(o=i[0])||void 0===o?void 0:o.innerText.trim())||"";n&&-1!==n.lastIndexOf("\n")&&(n=n.slice(0,n.lastIndexOf("\n")).trim()),window.$(t).find("li .item").each((t,o)=>{var i;const a=null===(i=o.textContent)||void 0===i?void 0:i.trim();a&&(e.push({name:a,category:n,index:this.menuIndexCounter+=1}),o.setAttribute("quick_access",""+this.menuIndexCounter))})}),e},getSegmentItems(){if(!this.hasSegmentSelector)return[];const e=a("CoreHome_Segments"),t=[];return document.querySelectorAll(".segmentList [data-idsegment]").forEach(o=>{var i;const n=null===(i=o.querySelector(".segname"))||void 0===i||null===(i=i.textContent)||void 0===i?void 0:i.trim();n&&(t.push({name:n,category:e,index:this.menuIndexCounter+=1}),o.setAttribute("quick_access",""+this.menuIndexCounter))}),t},getReportingMenuItemsFromOtherGroups(){if(!Gn.pages.value.length)return[];const e=U.parsed.value.group||Zn,t=[];return oa.fullMenu.value.forEach(o=>{const i=ea(o);if(i.includes(e))return;const n=i[0],a=e=>{var i;const a=null===(i=e.name)||void 0===i?void 0:i.trim();a&&t.push({name:a,category:o.name,index:this.menuIndexCounter+=1,page:{category:o.id,subcategory:e.id,group:n}})};Yn(o).forEach(e=>{e.isGroup?Qn(e).forEach(a):a(e)})}),t},navigateToReportingPage(e){this.deactivateSearch(),Qt();const{idSite:t,period:o,date:i,segment:n,comparePeriods:a,compareDates:r,compareSegments:s}=U.parsed.value,l={idSite:t,period:o,date:i,segment:n,comparePeriods:a,compareDates:r,compareSegments:s,category:e.category,subcategory:e.subcategory};e.group&&(l.group=e.group),U.updateHash(l)}}});ra.render=qn;var sa=ra;const la={class:"searchInputContainer"},ca=Object(D["createElementVNode"])("span",{class:"icon-search"},null,-1),da=["value","placeholder"];function ua(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",la,[ca,Object(D["createElementVNode"])("input",Object(D["mergeProps"])({class:"searchInputField browser-default",type:"text",value:e.modelValue,placeholder:e.resolvedPlaceholder},e.$attrs,{onInput:t[0]||(t[0]=t=>e.onInput(t))}),null,16,da),e.showClear&&e.modelValue?(Object(D["openBlock"])(),Object(D["createElementBlock"])("button",{key:0,type:"button",class:"searchInputClear",onClick:t[1]||(t[1]=t=>e.onClear())})):Object(D["createCommentVNode"])("",!0)])}var pa=Object(D["defineComponent"])({name:"SearchInput",inheritAttrs:!1,props:{modelValue:{type:String,required:!0},placeholder:{type:String,default:""},showClear:{type:Boolean,default:!1}},emits:["update:modelValue"],computed:{resolvedPlaceholder(){return this.placeholder||a("General_Search")}},methods:{translate:a,onInput(e){this.$emit("update:modelValue",e.target.value)},onClear(){this.$emit("update:modelValue","")}}});pa.render=ua;var ma=pa;const ha={class:"fieldArray form-group"},ga={key:0,class:"fieldUiControl"},ba=["onClick","title"];function fa(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Field");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ha,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.modelValue,(t,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:Object(D["normalizeClass"])(["fieldArrayTable multiple valign-wrapper",{["fieldArrayTable"+o]:!0}]),key:o},[e.field.uiControl?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ga,[Object(D["createVNode"])(r,{"full-width":!0,"model-value":t,options:e.field.availableValues,"onUpdate:modelValue":t=>e.onEntryChange(t,o),"model-modifiers":e.field.modelModifiers,placeholder:" ",uicontrol:e.field.uiControl,title:e.field.title,name:`${e.name}-${o}`,id:`${e.id}-${o}`,"template-file":e.field.templateFile,component:e.field.component},null,8,["model-value","options","onUpdate:modelValue","model-modifiers","uicontrol","title","name","id","template-file","component"])])):Object(D["createCommentVNode"])("",!0),Object(D["withDirectives"])(Object(D["createElementVNode"])("span",{onClick:t=>e.removeEntry(o),class:"icon-minus valign",title:e.translate("General_Remove")},null,8,ba),[[D["vShow"],o+1!==e.modelValue.length]])],2))),128))])}const va=Ce("CorePluginsAdmin","Field");var Oa=Object(D["defineComponent"])({props:{modelValue:Array,name:String,id:String,field:Object,rows:String},components:{Field:va},emits:["update:modelValue"],watch:{modelValue(e){this.checkEmptyModelValue(e)}},mounted(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue(e){e&&e.length&&""===e.slice(-1)[0]||this.rows&&!((this.modelValue||[]).length<parseInt(this.rows,10))||this.$emit("update:modelValue",[...e||[],""])},onEntryChange(e,t){const o=[...this.modelValue||[]];o[t]=e,this.$emit("update:modelValue",o)},removeEntry(e){if(e>-1&&this.modelValue){const t=this.modelValue.filter((t,o)=>o!==e);this.$emit("update:modelValue",t)}}}});Oa.render=fa;var ya=Oa;const ja={class:"multiPairField form-group"},wa={key:1,class:"fieldUiControl fieldUiControl2"},Sa={key:2,class:"fieldUiControl fieldUiControl3"},Ca={key:3,class:"fieldUiControl fieldUiControl4"},ka=["onClick","title"];function Da(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Field");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ja,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.modelValue,(t,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:Object(D["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper",{["multiPairFieldTable"+o]:!0,[`has${e.fieldCount}Fields`]:!0}]),key:o},[e.field1?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:0,class:Object(D["normalizeClass"])(["fieldUiControl fieldUiControl1",{hasMultiFields:e.field1.type&&e.field2.type}])},[Object(D["createVNode"])(r,{"full-width":!0,"model-value":t[e.field1.key],options:e.field1.availableValues,"onUpdate:modelValue":t=>e.onEntryChange(o,e.field1.key,t),"model-modifiers":e.field1.modelModifiers,placeholder:" ",uicontrol:e.field1.uiControl,name:`${e.name}-p1-${o}`,id:`${e.id}-p1-${o}`,title:e.field1.title,"template-file":e.field1.templateFile,component:e.field1.component},null,8,["model-value","options","onUpdate:modelValue","model-modifiers","uicontrol","name","id","title","template-file","component"])],2)):Object(D["createCommentVNode"])("",!0),e.field2?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",wa,[Object(D["createVNode"])(r,{"full-width":!0,options:e.field2.availableValues,"onUpdate:modelValue":t=>e.onEntryChange(o,e.field2.key,t),"model-value":t[e.field2.key],"model-modifiers":e.field2.modelModifiers,placeholder:" ",uicontrol:e.field2.uiControl,name:`${e.name}-p2-${o}`,id:`${e.id}-p2-${o}`,title:e.field2.title,"template-file":e.field2.templateFile,component:e.field2.component},null,8,["options","onUpdate:modelValue","model-value","model-modifiers","uicontrol","name","id","title","template-file","component"])])):Object(D["createCommentVNode"])("",!0),e.field3?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Sa,[Object(D["createVNode"])(r,{"full-width":!0,options:e.field3.availableValues,"onUpdate:modelValue":t=>e.onEntryChange(o,e.field3.key,t),"model-value":t[e.field3.key],"model-modifiers":e.field3.modelModifiers,placeholder:" ",uicontrol:e.field3.uiControl,name:`${e.name}-p3-${o}`,id:`${e.id}-p3-${o}`,title:e.field3.title,"template-file":e.field3.templateFile,component:e.field3.component},null,8,["options","onUpdate:modelValue","model-value","model-modifiers","uicontrol","name","id","title","template-file","component"])])):Object(D["createCommentVNode"])("",!0),e.field4?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ca,[Object(D["createVNode"])(r,{"full-width":!0,options:e.field4.availableValues,"onUpdate:modelValue":t=>e.onEntryChange(o,e.field4.key,t),"model-value":t[e.field4.key],"model-modifiers":e.field4.modelModifiers,placeholder:" ",uicontrol:e.field4.uiControl,name:`${e.name}-p4-${o}`,id:`${e.id}-p4-${o}`,title:e.field4.title,"template-file":e.field4.templateFile,component:e.field4.component},null,8,["options","onUpdate:modelValue","model-value","model-modifiers","uicontrol","name","id","title","template-file","component"])])):Object(D["createCommentVNode"])("",!0),Object(D["withDirectives"])(Object(D["createElementVNode"])("span",{onClick:t=>e.removeEntry(o),class:"icon-minus valign",title:e.translate("General_Remove")},null,8,ka),[[D["vShow"],o+1!==e.modelValue.length]])],2))),128))])}const Ea=Ce("CorePluginsAdmin","Field");var Pa=Object(D["defineComponent"])({props:{modelValue:Array,name:String,id:String,field1:Object,field2:Object,field3:Object,field4:Object,rows:Number},components:{Field:Ea},computed:{fieldCount(){return this.field1&&this.field2&&this.field3&&this.field4?4:this.field1&&this.field2&&this.field3?3:this.field1&&this.field2?2:this.field1?1:0}},emits:["update:modelValue"],watch:{modelValue(e){this.checkEmptyModelValue(e)}},mounted(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue(e){e&&e.length&&!this.isEmptyValue(e.slice(-1)[0])||this.rows&&!(this.modelValue.length<this.rows)||this.$emit("update:modelValue",[...e||[],this.makeEmptyValue()])},onEntryChange(e,t,o){const i=[...this.modelValue];i[e]=Object.assign(Object.assign({},i[e]),{},{[t]:o}),this.$emit("update:modelValue",i)},removeEntry(e){if(e>-1&&this.modelValue){const t=this.modelValue.filter((t,o)=>o!==e);this.$emit("update:modelValue",t)}},isEmptyValue(e){const{fieldCount:t}=this;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(){const 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}}});Pa.render=Da;var Ta=Pa;const xa=["disabled"],Va=Object(D["createElementVNode"])("span",{class:"icon-chevron-left"},null,-1),Ba=[Va],Na=["title"],Ia=Object(D["createElementVNode"])("span",{class:"icon icon-calendar"},null,-1),Ma={class:"flex"},Fa={key:0,id:"ajaxLoadingCalendar"},Ra={class:"loadingSegment"},La=["disabled"],Aa=Object(D["createElementVNode"])("span",{class:"icon-chevron-right"},null,-1),_a=[Aa];function Ha(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("PeriodSelectorOptionsColumn"),s=Object(D["resolveComponent"])("PeriodSelectorCalendarColumn"),l=Object(D["resolveComponent"])("ActivityIndicator"),c=Object(D["resolveDirective"])("tooltips"),d=Object(D["resolveDirective"])("expand-on-click");return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{ref:"root",class:Object(D["normalizeClass"])(["periodSelector piwikSelector",{"periodSelector-withPrevNext":e.canShowMovePeriod}])},[e.canShowMovePeriod?(Object(D["openBlock"])(),Object(D["createElementBlock"])("button",{key:0,class:"move-period move-period-prev",onClick:t[0]||(t[0]=t=>e.movePeriod(-1)),disabled:e.isPeriodMoveDisabled(-1)},Ba,8,xa)):Object(D["createCommentVNode"])("",!0),Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("button",{ref:"title",id:"date",class:"title",tabindex:"4",title:e.translate("General_ChooseDate",e.currentlyViewingText)},[Ia,Object(D["createTextVNode"])(" "+Object(D["toDisplayString"])(e.currentlyViewingText),1)],8,Na)),[[c]]),Object(D["createElementVNode"])("div",{id:"periodMore",class:Object(D["normalizeClass"])(["dropdown","range"===e.selectedPeriod?"dual-calendar":"single-calendar"])},[Object(D["createElementVNode"])("div",Ma,[Object(D["createVNode"])(r,{"ui-selected-period":e.selectedPeriod,"periods-filtered":e.periodsFiltered,"applied-period":e.committedPeriod,"active-preset-id":e.activePresetId,"min-allowed-date":e.minAllowedDate,"max-allowed-date":e.maxAllowedDate,"onUpdate:uiSelectedPeriod":t[1]||(t[1]=t=>e.selectedPeriod=t),onPeriodSelect:t[2]||(t[2]=t=>e.onPeriodOptionSelected(t)),onPeriodDblclick:t[3]||(t[3]=t=>e.onPeriodOptionDblClick(t)),onPresetSelect:t[4]||(t[4]=t=>e.onPresetDateRangeSelected(t)),onPresetDblclick:t[5]||(t[5]=t=>e.onPresetDateRangeDblClick(t))},null,8,["ui-selected-period","periods-filtered","applied-period","active-preset-id","min-allowed-date","max-allowed-date"]),Object(D["createVNode"])(s,{"ui-selection":e.uiSelection,"calendar-viewport":e.calendarViewport,"display-range-start-date":e.displayRangeStartDate,"display-range-end-date":e.displayRangeEndDate,"single-calendar-period":e.singleCalendarPeriod,"single-calendar-selected-date":e.singleCalendarSelectedDate,"is-comparison-enabled":e.isComparisonEnabled,"is-comparing":e.isComparing,"compare-period-type":e.comparePeriodType,"compare-start-date":e.compareStartDate,"compare-end-date":e.compareEndDate,"compare-period-dropdown-options":e.comparePeriodDropdownOptions,"show-invalid-comparison-message":e.shouldDisplayInvalidComparisonMessage(),"is-apply-enabled":e.isApplyEnabled(),onRangeChange:t[6]||(t[6]=t=>e.onRangeChange(t.start,t.end)),onSingleDateSelect:t[7]||(t[7]=t=>e.onDatePickerSelected(t)),onApplyClick:t[8]||(t[8]=t=>e.onApplyClicked()),onDisabledApplyInteraction:t[9]||(t[9]=t=>e.onDisabledApplyInteraction()),"onUpdate:isComparing":t[10]||(t[10]=t=>e.onCompareToggleUpdated(t)),"onUpdate:comparePeriodType":t[11]||(t[11]=t=>e.onComparePeriodTypeUpdated(t)),"onUpdate:compareStartDate":t[12]||(t[12]=t=>e.onCompareStartDateUpdated(t)),"onUpdate:compareEndDate":t[13]||(t[13]=t=>e.onCompareEndDateUpdated(t))},null,8,["ui-selection","calendar-viewport","display-range-start-date","display-range-end-date","single-calendar-period","single-calendar-selected-date","is-comparison-enabled","is-comparing","compare-period-type","compare-start-date","compare-end-date","compare-period-dropdown-options","show-invalid-comparison-message","is-apply-enabled"])]),e.isLoadingNewPage?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Fa,[Object(D["createVNode"])(l,{loading:!0}),Object(D["createElementVNode"])("div",Ra,Object(D["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)])):Object(D["createCommentVNode"])("",!0)],2),e.canShowMovePeriod?(Object(D["openBlock"])(),Object(D["createElementBlock"])("button",{key:1,class:"move-period move-period-next",onClick:t[14]||(t[14]=t=>e.movePeriod(1)),disabled:e.isPeriodMoveDisabled(1)},_a,8,La)):Object(D["createCommentVNode"])("",!0)],2)),[[d,{expander:"title",onExpand:e.onExpand,onClosed:e.onClosed}]])}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function $a(e){return!e.hasPendingNonRangePeriodChange&&("period"===e.uiSelectionType&&e.uiSelectedPeriod!==Vi&&!e.isCompareDirty||!(e.uiSelectedPeriod===Vi&&!e.hasPendingPresetSelection&&!e.isRangeValid)&&!(e.isComparing&&"custom"===e.comparePeriodType&&!e.isCompareRangeValid))}function Ua(e){if(e.hasPendingNonRangePeriodChange)return{type:"stop"};if(!e.isCompareDirty)return e.shouldCloseSelectorWithoutApplying?{type:"close"}:{type:"stop"};if(e.appliedPeriod===Vi){if(!e.hasCommittedRangeBounds)return{type:"stop"};const t=`${e.appliedRangeStartDate},${e.appliedRangeEndDate}`;return{type:"commit",date:e.rollingDateParam||t,period:Vi}}return e.formattedAppliedAnchorDate?{type:"commit",date:e.rollingDateParam||e.formattedAppliedAnchorDate,period:e.appliedPeriod}:{type:"stop"}}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function qa(e){return 0===e.detail}function Wa(e){const t=Object.assign({},e);return delete t.comparePeriods,delete t.comparePeriodType,delete t.compareDates,t}function za(e,t,o){const i=new Date(e.getTime());switch(t){case"day":i.setDate(i.getDate()+o);break;case"week":i.setDate(i.getDate()+7*o);break;case"month":i.setMonth(i.getMonth()+o);break;case"year":i.setFullYear(i.getFullYear()+o);break;default:break}return i}function Ga(e,t,o){const i=new Date(e.getTime());return i<t&&i.setTime(t.getTime()),i>o&&i.setTime(o.getTime()),i}const Ka={class:"period-type period-selector-options-column"},Ya={id:"otherPeriods"};function Qa(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("PeriodOptions"),s=Object(D["resolveComponent"])("PresetDateRanges");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ka,[Object(D["createElementVNode"])("h6",null,[Object(D["createElementVNode"])("b",null,Object(D["toDisplayString"])(e.translate("General_ChoosePeriod")),1)]),Object(D["createElementVNode"])("div",Ya,[Object(D["createVNode"])(r,{"model-value":e.uiSelectedPeriod,periods:e.periodsFiltered,"checked-period-id":e.uiSelectedPeriod,"active-date-period":e.appliedPeriod,"onUpdate:modelValue":t[0]||(t[0]=t=>e.$emit("update:uiSelectedPeriod",t)),onSelect:t[1]||(t[1]=t=>e.$emit("period-select",t)),onDblclick:t[2]||(t[2]=t=>e.$emit("period-dblclick",t))},null,8,["model-value","periods","checked-period-id","active-date-period"]),Object(D["createVNode"])(s,{"checked-preset-id":e.activePresetId,"allowed-periods":e.periodsFiltered,"min-date":e.minAllowedDate,"max-date":e.maxAllowedDate,onSelect:t[3]||(t[3]=t=>e.$emit("preset-select",t)),onDblclick:t[4]||(t[4]=t=>e.$emit("preset-dblclick",t))},null,8,["checked-preset-id","allowed-periods","min-date","max-date"])])])}const Ja={class:"presetDateRanges"},Xa={key:0,class:"preset-date-range-group-separator"},Za=["title","onDblclick"],er=["name","id","checked","onClick","onChange"],tr={class:"preset-option-text"};function or(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ja,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.groupedPresetDateRanges,(t,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:o,class:"preset-date-range-group"},[o>0?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Xa)):Object(D["createCommentVNode"])("",!0),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(t,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("p",{key:t.id},[Object(D["createElementVNode"])("label",{class:Object(D["normalizeClass"])({"selected-period-label":e.checkedPresetId===t.id}),title:e.checkedPresetId===t.id?"":e.translate("General_DoubleClickToChangePeriod"),onDblclick:o=>e.handlePresetDoubleClick(t.id)},[Object(D["createElementVNode"])("input",{type:"radio",class:"preset-option-input",name:e.presetInputName,id:"preset_date_"+t.id,checked:e.checkedPresetId===t.id,onClick:o=>e.handlePresetClick(t.id),onChange:o=>e.handlePresetSelected(t.id)},null,40,er),Object(D["createElementVNode"])("span",tr,Object(D["toDisplayString"])(e.translate(t.labelKey)),1)],42,Za)]))),128))]))),128))])}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const ir={today:"day",yesterday:"day",last7days:"range",last30days:"range",last90days:"range",lastWeekMonSun:"week",lastMonth:"month",lastQuarter:"range",lastYear:"year",thisWeekMonToday:"week",thisMonth:"month",thisQuarter:"range",thisYear:"year"},nr=[{id:"today",labelKey:"CoreHome_PresetDateToday"},{id:"yesterday",labelKey:"CoreHome_PresetDateYesterday"},{id:"last7days",labelKey:"CoreHome_PresetDateLast7Days"},{id:"last30days",labelKey:"CoreHome_PresetDateLast30Days"},{id:"last90days",labelKey:"CoreHome_PresetDateLast90Days"},{id:"lastWeekMonSun",labelKey:"CoreHome_PresetDateLastWeekMonSun"},{id:"lastMonth",labelKey:"CoreHome_PresetDateLastMonth"},{id:"lastQuarter",labelKey:"CoreHome_PresetDateLastQuarter"},{id:"lastYear",labelKey:"CoreHome_PresetDateLastYear"},{id:"thisWeekMonToday",labelKey:"CoreHome_PresetDateThisWeekMonToday"},{id:"thisMonth",labelKey:"CoreHome_PresetDateThisMonth"},{id:"thisQuarter",labelKey:"CoreHome_PresetDateThisQuarter"},{id:"thisYear",labelKey:"CoreHome_PresetDateThisYear"}],ar={"day|today":"today","day|yesterday":"yesterday","range|last7":"last7days","range|last30":"last30days","range|last90":"last90days","week|lastweek":"lastWeekMonSun","month|lastmonth":"lastMonth","year|lastyear":"lastYear","week|today":"thisWeekMonToday","month|today":"thisMonth","year|today":"thisYear"},rr={today:"today",yesterday:"yesterday",last7days:"last7",last30days:"last30",last90days:"last90",lastWeekMonSun:"lastweek",lastMonth:"lastmonth",lastYear:"lastyear",thisWeekMonToday:"today",thisMonth:"today",thisYear:"today"};function sr(e,t){return ar[`${e}|${t}`]||null}function lr(e){return new Date(e.getTime())}function cr(e,t){const o=lr(e);return o.setDate(o.getDate()+t),o}function dr(e){return new Date(e.getFullYear(),e.getMonth(),1)}function ur(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function pr(e){const t=(e.getDay()+6)%7;return cr(e,-t)}function mr(e){const t=e.getMonth(),o=t-t%3;return new Date(e.getFullYear(),o,1)}function hr(e,t){return`${d(e)},${d(t)}`}function gr(e,t,o){return e<t?new Date(t.getTime()):e>o?new Date(o.getTime()):e}function br(e,t){const o=lr(t),i=t=>Object.assign(Object.assign({},t),{},{urlDate:rr[e]||t.date});switch(e){case"today":return i({id:e,period:"day",date:d(o),selectedDate:o,startDate:o,endDate:o});case"yesterday":{const t=cr(o,-1);return i({id:e,period:"day",date:d(t),selectedDate:t,startDate:t,endDate:t})}case"last7days":{const t=cr(o,-6);return i({id:e,period:"range",date:hr(t,o),selectedDate:o,startDate:t,endDate:o})}case"last30days":{const t=cr(o,-29);return i({id:e,period:"range",date:hr(t,o),selectedDate:o,startDate:t,endDate:o})}case"last90days":{const t=cr(o,-89);return i({id:e,period:"range",date:hr(t,o),selectedDate:o,startDate:t,endDate:o})}case"lastWeekMonSun":{const t=pr(o),n=cr(t,-7),a=cr(n,6);return i({id:e,period:"week",date:d(n),selectedDate:n,startDate:n,endDate:a})}case"lastMonth":{const t=new Date(o.getFullYear(),o.getMonth()-1,1),n=dr(t),a=ur(t);return i({id:e,period:"month",date:d(n),selectedDate:n,startDate:n,endDate:a})}case"lastQuarter":{const t=mr(o),n=cr(t,-1),a=mr(n);return i({id:e,period:"range",date:hr(a,n),selectedDate:n,startDate:a,endDate:n})}case"lastYear":{const t=o.getFullYear()-1,n=new Date(t,0,1),a=new Date(t,11,31);return i({id:e,period:"year",date:d(n),selectedDate:n,startDate:n,endDate:a})}case"thisWeekMonToday":{const t=pr(o);return i({id:e,period:"week",date:d(o),selectedDate:o,startDate:t,endDate:o})}case"thisMonth":{const t=dr(o);return i({id:e,period:"month",date:d(o),selectedDate:o,startDate:t,endDate:o})}case"thisQuarter":{const t=mr(o);return i({id:e,period:"range",date:hr(t,o),selectedDate:o,startDate:t,endDate:o})}case"thisYear":{const t=new Date(o.getFullYear(),0,1);return i({id:e,period:"year",date:d(o),selectedDate:o,startDate:t,endDate:o})}default:throw new Error("Unknown preset date range: "+e)}}function fr(e,t,o=u()){try{let i=null,n=null;const a=nr.find(a=>{const r=br(a.id,o);if(r.period!==e)return!1;if(r.date===t)return!0;if("range"!==e)return i=i||p(t),g(i,r.selectedDate,e);n=n||c.parse(e,t).getDateRange();const s=[r.startDate,r.endDate];return n[0].getTime()===s[0].getTime()&&n[1].getTime()===s[1].getTime()});return(null===a||void 0===a?void 0:a.id)||sr(e,t)}catch(i){return sr(e,t)}}const vr=[["today","yesterday"],["last7days","last30days","last90days"],["lastWeekMonSun","lastMonth","lastQuarter","lastYear"],["thisWeekMonToday","thisMonth","thisQuarter","thisYear"]];let Or=0;var yr=Object(D["defineComponent"])({props:{checkedPresetId:{type:String,default:null},minDate:{type:Date,required:!0},maxDate:{type:Date,required:!0},today:{type:Date,default:()=>u()},allowedPeriods:{type:Array,required:!0}},data(){const e="preset-date-range-"+Or;return Or+=1,{presetInputName:e}},emits:["select","dblclick"],computed:{presetDateRanges(){return nr.filter(e=>this.allowedPeriods.includes(ir[e.id]))},groupedPresetDateRanges(){const e=new Map(this.presetDateRanges.map(e=>[e.id,e]));return vr.map(t=>t.map(t=>e.get(t)).filter(e=>!!e)).filter(e=>e.length)}},methods:{translate:a,handlePresetClick(e){this.checkedPresetId===e&&this.handlePresetSelected(e)},handlePresetSelected(e){const t=br(e,this.today);this.$emit("select",Object.assign(Object.assign({},t),{},{startDate:gr(t.startDate,this.minDate,this.maxDate),endDate:gr(t.endDate,this.minDate,this.maxDate)}))},handlePresetDoubleClick(e){const t=br(e,this.today);this.$emit("dblclick",Object.assign(Object.assign({},t),{},{startDate:gr(t.startDate,this.minDate,this.maxDate),endDate:gr(t.endDate,this.minDate,this.maxDate)}))}}});yr.render=or;var jr=yr;const wr=["aria-label"],Sr=["title","onDblclick"],Cr=["name","id","checked","onChange","onKeydown"],kr={class:"period-option-text"};function Dr(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:"periodOptions",role:"radiogroup","aria-label":e.translate("General_ChoosePeriod")},[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.displayPeriods,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("p",{key:t},[Object(D["createElementVNode"])("label",{class:Object(D["normalizeClass"])(["period-option-label",{"selected-period-label":e.checkedPeriodId===t}]),title:t===e.activeDatePeriod?"":e.translate("General_DoubleClickToChangePeriod"),onDblclick:o=>e.handlePeriodDoubleClick(t)},[Object(D["createElementVNode"])("input",{class:"period-option-input",type:"radio",name:e.periodInputName,id:"period_id_"+t,checked:e.checkedPeriodId===t,onChange:o=>e.handlePeriodSelected(t),onKeydown:Object(D["withKeys"])(Object(D["withModifiers"])(o=>e.handlePeriodEnter(t),["prevent"]),["enter"])},null,40,Cr),Object(D["createElementVNode"])("span",kr,Object(D["toDisplayString"])(e.getPeriodDisplayText(t)),1)],42,Sr)]))),128))],8,wr)}let Er=0;var Pr=Object(D["defineComponent"])({name:"PeriodOptions",props:{modelValue:{type:String,default:null},periods:{type:Array,required:!0},checkedPeriodId:{type:String,default:null},activeDatePeriod:{type:String,required:!0}},data(){const e="period-"+Er;return Er+=1,{periodInputName:e}},emits:["update:modelValue","select","dblclick"],computed:{displayPeriods(){return this.periods.includes("range")?["range"].concat(this.periods.filter(e=>"range"!==e)):this.periods}},methods:{translate:a,getPeriodDisplayText(e){const t="range"===e?`${a("General_Custom")} ${a("General_DateRangeInPeriodList")}`:c.get(e).getDisplayText();return t.charAt(0).toUpperCase()+t.slice(1)},handlePeriodSelected(e){const t={period:e};this.$emit("update:modelValue",e),this.$emit("select",t)},handlePeriodEnter(e){this.handlePeriodSelected(e)},handlePeriodDoubleClick(e){const t={period:e};this.$emit("dblclick",t)}}});Pr.render=Dr;var Tr=Pr,xr=Object(D["defineComponent"])({name:"PeriodSelectorOptionsColumn",components:{PresetDateRanges:jr,PeriodOptions:Tr},props:{uiSelectedPeriod:{type:String,required:!0},periodsFiltered:{type:Array,required:!0},appliedPeriod:{type:String,required:!0},activePresetId:{type:String,default:null},minAllowedDate:{type:Date,required:!0},maxAllowedDate:{type:Date,required:!0}},emits:["update:uiSelectedPeriod","period-select","period-dblclick","preset-select","preset-dblclick"],methods:{translate:a}});xr.render=Qa;var Vr=xr;const Br={class:"period-selector-calendar-column"},Nr={class:"period-date"},Ir=["disabled","value"];function Mr(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("DateRangePicker"),s=Object(D["resolveComponent"])("PeriodDatePicker"),l=Object(D["resolveComponent"])("PeriodSelectorCompareControls");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Br,[Object(D["createElementVNode"])("div",null,[Object(D["withDirectives"])(Object(D["createVNode"])(r,{class:"period-range","start-date":e.displayRangeStartDate,"end-date":e.displayRangeEndDate,onRangeChange:t[0]||(t[0]=t=>e.$emit("range-change",t)),onSubmit:t[1]||(t[1]=t=>e.$emit("apply-click"))},null,8,["start-date","end-date"]),[[D["vShow"],"range"===e.calendarViewport]])]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",Nr,[Object(D["createVNode"])(s,{id:"datepicker",period:e.singleCalendarPeriod,date:e.singleCalendarSelectedDate,onSelect:t[2]||(t[2]=t=>e.$emit("single-date-select",t.date))},null,8,["period","date"])],512),[[D["vShow"],"single"===e.calendarViewport]]),Object(D["createVNode"])(l,{"is-comparison-enabled":e.isComparisonEnabled,"is-comparing":e.isComparing,"compare-period-type":e.comparePeriodType,"compare-start-date":e.compareStartDate,"compare-end-date":e.compareEndDate,"compare-period-dropdown-options":e.comparePeriodDropdownOptions,"show-invalid-comparison-message":e.showInvalidComparisonMessage,"onUpdate:isComparing":t[3]||(t[3]=t=>e.$emit("update:isComparing",t)),"onUpdate:comparePeriodType":t[4]||(t[4]=t=>e.$emit("update:comparePeriodType",t)),"onUpdate:compareStartDate":t[5]||(t[5]=t=>e.$emit("update:compareStartDate",t)),"onUpdate:compareEndDate":t[6]||(t[6]=t=>e.$emit("update:compareEndDate",t))},null,8,["is-comparison-enabled","is-comparing","compare-period-type","compare-start-date","compare-end-date","compare-period-dropdown-options","show-invalid-comparison-message"]),Object(D["createElementVNode"])("div",{class:"apply-button-container",onMousedownCapture:t[8]||(t[8]=(...t)=>e.onApplyButtonInteraction&&e.onApplyButtonInteraction(...t))},[Object(D["createElementVNode"])("input",{type:"submit",id:"calendarApply",class:"btn",onClick:t[7]||(t[7]=t=>e.$emit("apply-click")),disabled:!e.isApplyEnabled,value:e.translate("General_Apply")},null,8,Ir)],32)])}const Fr={key:0,class:"compare-checkbox"},Rr={class:"compare-checkbox-label"},Lr=["checked"],Ar={class:"compare-checkbox-text"},_r={id:"comparePeriodToDropdown"},Hr={key:1,class:"compare-date-range"},$r={id:"comparePeriodStartDate"},Ur=Object(D["createElementVNode"])("span",{class:"compare-dates-separator"},null,-1),qr={id:"comparePeriodEndDate"},Wr={key:0,class:"compare-validation-message"};function zr(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Field");return Object(D["openBlock"])(),Object(D["createElementBlock"])(D["Fragment"],null,[e.isComparisonEnabled?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Fr,[Object(D["createElementVNode"])("label",Rr,[Object(D["createElementVNode"])("input",{class:"compare-checkbox-input",id:"comparePeriodTo",type:"checkbox",checked:!!e.isComparing,onChange:t[0]||(t[0]=t=>e.onCompareToggle(t))},null,40,Lr),Object(D["createElementVNode"])("span",Ar,Object(D["toDisplayString"])(e.translate("General_CompareTo")),1)]),Object(D["createElementVNode"])("div",_r,[Object(D["createVNode"])(r,{"model-value":e.comparePeriodType,"onUpdate:modelValue":t[1]||(t[1]=t=>e.$emit("update:comparePeriodType",t)),style:Object(D["normalizeStyle"])({visibility:e.isComparing?"visible":"hidden"}),name:"comparePeriodToDropdown",uicontrol:"select",options:e.comparePeriodDropdownOptions,"full-width":!0,disabled:!e.isComparing},null,8,["model-value","style","options","disabled"])])])):Object(D["createCommentVNode"])("",!0),e.isComparing&&"custom"===e.comparePeriodType?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Hr,[Object(D["createElementVNode"])("div",null,[Object(D["createElementVNode"])("div",$r,[Object(D["createElementVNode"])("div",null,[Object(D["createVNode"])(r,{"model-value":e.compareStartDate,"onUpdate:modelValue":t[2]||(t[2]=t=>e.$emit("update:compareStartDate",t)),name:"comparePeriodStartDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_StartDate"),placeholder:"YYYY-MM-DD"},null,8,["model-value","title"])])]),Ur,Object(D["createElementVNode"])("div",qr,[Object(D["createElementVNode"])("div",null,[Object(D["createVNode"])(r,{"model-value":e.compareEndDate,"onUpdate:modelValue":t[3]||(t[3]=t=>e.$emit("update:compareEndDate",t)),name:"comparePeriodEndDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_EndDate"),placeholder:"YYYY-MM-DD"},null,8,["model-value","title"])])])]),e.showInvalidComparisonMessage?(Object(D["openBlock"])(),Object(D["createElementBlock"])("p",Wr,Object(D["toDisplayString"])(e.translate("CoreHome_InvalidComparisonDateRange")),1)):Object(D["createCommentVNode"])("",!0)])):Object(D["createCommentVNode"])("",!0)],64)}const Gr=Ce("CorePluginsAdmin","Field");var Kr=Object(D["defineComponent"])({name:"PeriodSelectorCompareControls",components:{Field:Gr},props:{isComparisonEnabled:{type:Boolean,required:!0},isComparing:{type:Boolean,default:null},comparePeriodType:{type:String,required:!0},compareStartDate:{type:String,required:!0},compareEndDate:{type:String,required:!0},comparePeriodDropdownOptions:{type:Array,required:!0},showInvalidComparisonMessage:{type:Boolean,default:!1}},emits:["update:isComparing","update:comparePeriodType","update:compareStartDate","update:compareEndDate"],methods:{translate:a,onCompareToggle(e){this.$emit("update:isComparing",e.target.checked)}}});Kr.render=zr;var Yr=Kr,Qr=Object(D["defineComponent"])({name:"PeriodSelectorCalendarColumn",components:{DateRangePicker:Ci,PeriodDatePicker:Mi,PeriodSelectorCompareControls:Yr},props:{uiSelection:{type:Object,required:!0},calendarViewport:{type:String,required:!0},displayRangeStartDate:{type:String,default:null},displayRangeEndDate:{type:String,default:null},singleCalendarPeriod:{type:String,required:!0},singleCalendarSelectedDate:{type:Date,default:null},isComparisonEnabled:{type:Boolean,required:!0},isComparing:{type:Boolean,default:null},comparePeriodType:{type:String,required:!0},compareStartDate:{type:String,required:!0},compareEndDate:{type:String,required:!0},comparePeriodDropdownOptions:{type:Array,required:!0},showInvalidComparisonMessage:{type:Boolean,default:!1},isApplyEnabled:{type:Boolean,required:!0}},emits:["range-change","single-date-select","apply-click","disabled-apply-interaction","update:isComparing","update:comparePeriodType","update:compareStartDate","update:compareEndDate"],methods:{translate:a,onApplyButtonInteraction(){this.isApplyEnabled||this.$emit("disabled-apply-interaction")}}});Qr.render=Mr;var Jr=Qr;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const Xr=["date","period","comparePeriods","comparePeriodType","compareDates","compareSegments"];function Zr(e,t){return`${e}|${t}`}function es(e){const t={};return Object.keys(e).filter(e=>!Xr.includes(e)).sort().forEach(o=>{t[o]=e[o]}),JSON.stringify(t)}function ts(e,t,o,i,n){return!o&&e===i&&t===n}function os(e,t,o,i){const n=!!o&&i===e,a=n&&o?Object.assign({},o):null;return{syncedUiSelection:a,lastKnownHashSelectionKey:e,lastKnownHashContextKey:t,nextHashUiSelection:null,nextHashSelectionKey:null,lastInteractionSource:null}}function is(e){if(e.pendingPresetSelection)return e.pendingPresetSelection.id;let t=null;return e.selectedPeriod===Vi?e.appliedRangeStartDate&&e.appliedRangeEndDate&&(t=`${e.appliedRangeStartDate},${e.appliedRangeEndDate}`):e.committedAnchorDate&&(t=d(e.committedAnchorDate)),t?fr(e.selectedPeriod,t,u()):null}function ns(e){e.calendarViewport=e.selectedPeriod===Vi?"range":"single",Ni(e.selectedPeriod)?e.singleCalendarPeriod=e.selectedPeriod:Ni(e.singleCalendarPeriod)||(e.singleCalendarPeriod="day"),e.selectedPeriod!==Vi?e.pendingPresetSelection&&Ni(e.pendingPresetSelection.period)?e.singleCalendarSelectedDate=e.pendingPresetSelection.selectedDate:e.singleCalendarSelectedDate=e.committedPeriod===e.selectedPeriod?e.committedAnchorDate:null:e.singleCalendarSelectedDate=null}var as=Object(D["defineComponent"])({name:"PeriodSelector",props:{periods:Array},components:{PeriodSelectorOptionsColumn:Vr,PeriodSelectorCalendarColumn:Jr,ActivityIndicator:We},directives:{ExpandOnClick:Et,Tooltips:ct},data(){const e=U.parsed.value.period,t=Ni(e)?e:"day",o=Ti(),i=xi();return{uiSelection:{type:"period",id:e},lastInteractionSource:null,nextHashUiSelection:null,nextHashSelectionKey:null,lastKnownHashSelectionKey:null,lastKnownHashContextKey:null,minAllowedDate:o,maxAllowedDate:i,pendingPresetSelection:null,committedPeriod:e,committedAnchorDate:null,selectedPeriod:e,calendarViewport:e===Vi?"range":"single",singleCalendarPeriod:t,singleCalendarSelectedDate:null,appliedRangeStartDate:null,appliedRangeEndDate:null,isRangeValid:null,isLoadingNewPage:!1,isComparing:null,comparePeriodType:"previousPeriod",compareStartDate:"",compareEndDate:"",compareAppliedSignature:"",shouldShowInvalidComparisonMessage:!1}},mounted(){M.on("hidePeriodSelector",()=>{window.$(this.$refs.root).parent("#periodString").hide()}),M.on("matomoPageChange",()=>{window.$(this.$refs.root).parent("#periodString").show()}),window.initTopControls(),this.handleZIndexPositionRelativeCompareDropdownIssue()},computed:{activePresetId(){return is(this)},matomoParsed(){return U.parsed.value},isComparingStoreValue(){return zo.isComparingPeriods()},periodComparisonsStoreValue(){return zo.getPeriodComparisons()},comparePeriodDropdownOptions(){return Pi},currentlyViewingText(){let e;if("range"===this.committedPeriod){if(!this.appliedRangeStartDate||!this.appliedRangeEndDate)return a("General_Error");e=`${this.appliedRangeStartDate},${this.appliedRangeEndDate}`}else{if(!this.committedAnchorDate)return a("General_Error");e=d(this.committedAnchorDate)}try{return c.parse(this.committedPeriod,e).getPrettyString()}catch(t){return a("General_Error")}},isComparisonEnabled(){return zo.isComparisonEnabled()},periodsFiltered(){return(this.periods||[]).filter(e=>c.isRecognizedPeriod(e))},selectedComparisonParams(){if(!this.isComparing)return{};if("custom"===this.comparePeriodType)return{comparePeriods:["range"],comparePeriodType:"custom",compareDates:[`${this.compareStartDate},${this.compareEndDate}`]};if("previousPeriod"===this.comparePeriodType)return{comparePeriods:[this.selectedPeriod],comparePeriodType:"previousPeriod",compareDates:[this.previousPeriodDateToSelectedPeriod]};if("previousYear"===this.comparePeriodType){const e="range"===this.selectedPeriod?`${this.appliedRangeStartDate},${this.appliedRangeEndDate}`:d(this.committedAnchorDate),t=c.parse(this.selectedPeriod,e).getDateRange();return t[0].setFullYear(t[0].getFullYear()-1),t[1].setFullYear(t[1].getFullYear()-1),"range"===this.selectedPeriod?{comparePeriods:["range"],comparePeriodType:"previousYear",compareDates:[`${d(t[0])},${d(t[1])}`]}:{comparePeriods:[this.selectedPeriod],comparePeriodType:"previousYear",compareDates:[d(t[0])]}}return console.warn("Unknown compare period type: "+this.comparePeriodType),{}},previousPeriodDateToSelectedPeriod(){if("range"===this.selectedPeriod){const e=p(this.appliedRangeStartDate),t=p(this.appliedRangeEndDate),o=k.getLastNRange("day",2,e).startDate,i=Math.floor((t.valueOf()-e.valueOf())/864e5),n=k.getLastNRange("day",1+i,o);return`${d(n.startDate)},${d(n.endDate)}`}const e=k.getLastNRange(this.selectedPeriod,2,this.committedAnchorDate).startDate;return d(e)},selectedDateString(){if("range"===this.selectedPeriod){const e=this.appliedRangeStartDate,t=this.appliedRangeEndDate,o=p(e),i=p(t);return!Bi(o)||!Bi(i)||o>i?(window.$("#alert").find("h2").text(a("General_InvalidDateRange")),M.helper.modalConfirm("#alert",{}),null):`${e},${t}`}return d(this.committedAnchorDate)},isErrorDisplayed(){return this.currentlyViewingText===a("General_Error")},isRangeSelection(){return"range"===this.committedPeriod},canShowMovePeriod(){return!this.isRangeSelection&&!this.isErrorDisplayed},compareCurrentSignature(){return JSON.stringify({isComparing:!!this.isComparing,comparePeriodType:this.comparePeriodType||"",compareStartDate:this.compareStartDate||"",compareEndDate:this.compareEndDate||""})},isCompareDirty(){return this.compareCurrentSignature!==this.compareAppliedSignature},hasPendingNonRangePeriodChange(){return"period"===this.uiSelection.type&&"period"===this.lastInteractionSource&&this.selectedPeriod!==Vi&&this.selectedPeriod!==this.committedPeriod},isRangePresetSelection(){return"preset"===this.uiSelection.type&&this.selectedPeriod===Vi},displayRangeStartDate(){return this.isRangePresetSelection&&this.pendingPresetSelection?d(this.pendingPresetSelection.startDate):this.appliedRangeStartDate},displayRangeEndDate(){return this.isRangePresetSelection&&this.pendingPresetSelection?d(this.pendingPresetSelection.endDate):this.appliedRangeEndDate}},watch:{isComparingStoreValue:{immediate:!0,handler(e){this.isComparing=e}},matomoParsed:{immediate:!0,handler(){this.updateSelectedValuesFromHash()}},periodComparisonsStoreValue:{immediate:!0,handler(){this.updateComparisonValuesFromStore(),this.compareAppliedSignature=this.compareCurrentSignature}}},methods:{onExpand(e){if(qa(e)){const e=this.$refs.root,t="preset"===this.uiSelection.type?"#preset_date_"+this.uiSelection.id:"#period_id_"+this.uiSelection.id,o=e.querySelector(t)||e.querySelector("#preset_date_today");o instanceof HTMLElement&&o.focus()}},onClosed(e){qa(e)&&window.$(this.$refs.title).focus()},handleZIndexPositionRelativeCompareDropdownIssue(){const e=window.$(this.$refs.root);e.on("focus","#comparePeriodToDropdown .select-dropdown",()=>{e.addClass("compare-dropdown-open")}).on("blur","#comparePeriodToDropdown .select-dropdown",()=>{e.removeClass("compare-dropdown-open")})},setUiSelection(e,t){this.uiSelection=e,this.lastInteractionSource=t},clearPresetSelection(){this.pendingPresetSelection=null},setPendingPeriodAndDate(e,t){this.committedPeriod=e,this.selectedPeriod=e,this.committedAnchorDate=t,this.setRangeStartEndFromPeriod(e,d(t)),ns(this)},setPiwikPeriodAndDate(e,t){this.setPendingPeriodAndDate(e,t),this.setUiSelection({type:"period",id:e},"period");const o=d(t);this.clearPresetSelection(),this.commitSelectionToUrl(o,this.selectedPeriod)},commitSelectionToUrl(e,t){this.nextHashUiSelection=Object.assign({},this.uiSelection),this.nextHashSelectionKey=Zr(t,e),this.compareAppliedSignature=this.compareCurrentSignature,this.propagateNewUrlParams(e,t),window.initTopControls()},onPeriodOptionSelected(e){this.setUiSelection({type:"period",id:e.period},"period"),this.selectedPeriod=e.period,this.clearPresetSelection(),ns(this),e.period===Vi&&(this.isRangeValid=!0)},onPeriodOptionDblClick(e){this.onPeriodOptionSelected(e),this.hasInvalidCustomComparison()?this.showInvalidComparisonMessage():e.period!==Vi&&e.period!==this.committedPeriod&&this.committedAnchorDate&&this.setPiwikPeriodAndDate(e.period,this.committedAnchorDate)},canInteractWithSingleCalendar(){return"single"===this.calendarViewport&&this.selectedPeriod!==Vi},onDatePickerSelected(e){this.canInteractWithSingleCalendar()&&(this.setUiSelection({type:"period",id:this.selectedPeriod},"calendar"),this.setPendingPeriodAndDate(this.selectedPeriod,e),this.clearPresetSelection(),ns(this),this.commitSelectionToUrl(d(e),this.selectedPeriod))},onPresetDateRangeSelected(e){this.periodsFiltered.includes(e.period)&&(this.selectedPeriod=e.period,this.pendingPresetSelection=e,this.isRangeValid=e.period===Vi||this.isRangeValid,this.setUiSelection({type:"preset",id:e.id},"preset"),ns(this))},onPresetDateRangeDblClick(e){this.onPresetDateRangeSelected(e),this.hasInvalidCustomComparison()?this.showInvalidComparisonMessage():this.onApplyClicked()},propagateNewUrlParams(e,t){const o=this.selectedComparisonParams;let i;M.helper.isReportingPage()?(this.closePeriodSelector(),i=U.hashParsed.value):(this.isLoadingNewPage=!0,i=U.parsed.value),U.updateLocation(Object.assign(Object.assign({},Wa(i)),{},{date:e,period:t},o))},hasPendingPresetSelectionOwnedByUi(){return!!this.pendingPresetSelection&&"preset"===this.uiSelection.type&&this.pendingPresetSelection.id===this.uiSelection.id},shouldCloseSelectorWithoutApplying(){return this.selectedPeriod!==Vi&&!this.hasPendingNonRangePeriodChange},hasCommittedRangeBounds(){return!!this.appliedRangeStartDate&&!!this.appliedRangeEndDate},applyPendingPresetSelection(){if(!this.hasPendingPresetSelectionOwnedByUi())return!1;const e=this.pendingPresetSelection;return this.committedPeriod=e.period,this.committedAnchorDate=e.selectedDate,this.appliedRangeStartDate=d(e.startDate),this.appliedRangeEndDate=d(e.endDate),this.setUiSelection({type:"period",id:e.period},"preset"),this.pendingPresetSelection=null,ns(this),this.commitSelectionToUrl(e.urlDate,e.period),!0},applyRangeSelection(){if(this.selectedPeriod!==Vi)return!1;const e=this.selectedDateString;return!e||(this.committedPeriod=Vi,this.commitSelectionToUrl(this.getCurrentRollingDateParamIfOwnedByPreset()||e,Vi),!0)},applyNonRangeOrCompareChanges(){const e=Ua({hasPendingNonRangePeriodChange:this.hasPendingNonRangePeriodChange,isCompareDirty:this.isCompareDirty,shouldCloseSelectorWithoutApplying:this.shouldCloseSelectorWithoutApplying(),appliedPeriod:this.committedPeriod,hasCommittedRangeBounds:this.hasCommittedRangeBounds(),rollingDateParam:this.getCurrentRollingDateParamIfOwnedByPreset(),appliedRangeStartDate:this.appliedRangeStartDate,appliedRangeEndDate:this.appliedRangeEndDate,formattedAppliedAnchorDate:this.committedAnchorDate?d(this.committedAnchorDate):null});"stop"!==e.type&&("close"!==e.type?this.commitSelectionToUrl(e.date,e.period):this.closePeriodSelector())},onApplyClicked(){this.applyPendingPresetSelection()||this.applyRangeSelection()||this.applyNonRangeOrCompareChanges()},updateComparisonValuesFromStore(){this.comparePeriodType="previousPeriod",this.compareStartDate="",this.compareEndDate="";const e=zo.getPeriodComparisons();if(e.length<2)return;const t=U.parsed.value.comparePeriodType;if(!Ei.includes(t))return;if(this.comparePeriodType=t,"custom"!==this.comparePeriodType||"range"!==e[1].params.period)return;let o;try{o=c.parse(e[1].params.period,e[1].params.date)}catch(a){return}const[i,n]=o.getDateRange();this.compareStartDate=d(i),this.compareEndDate=d(n)},getCurrentContextKey(){return es(U.parsed.value)},applyUiSelectionFromHash(e,t,o){if(o){if("preset"===o.type)return void(this.uiSelection=o);const i=sr(e,t);return i&&this.periodsFiltered.includes(e)?void(this.uiSelection={type:"preset",id:i}):void(this.uiSelection=o)}const i=sr(e,t);if(i&&this.periodsFiltered.includes(e))return this.uiSelection={type:"preset",id:i},void(this.pendingPresetSelection=null);this.setUiSelection({type:"period",id:e},null),this.clearPresetSelection()},getCurrentRollingDateParamIfOwnedByPreset(){if("preset"!==this.uiSelection.type)return null;const e=U.parsed.value.period||"",t=U.parsed.value.date||"";if(e!==this.committedPeriod||!t)return null;const o=sr(e,t);return o!==this.uiSelection.id?null:t},resetSelectedDateValues(){this.committedAnchorDate=null,this.appliedRangeStartDate=null,this.appliedRangeEndDate=null},applyDateValuesFromHash(e,t){if(e===Vi){const o=c.get(e).parse(t),[i,n]=o.getDateRange();return this.committedAnchorDate=i,this.appliedRangeStartDate=d(i),void(this.appliedRangeEndDate=d(n))}this.committedAnchorDate=p(t),this.setRangeStartEndFromPeriod(e,t),Ni(e)&&(this.singleCalendarPeriod=e),this.singleCalendarSelectedDate=this.committedAnchorDate},updateSelectedValuesFromHash(){const e=U.parsed.value.date||"",t=U.parsed.value.period||"",o=Zr(t,e),i=this.getCurrentContextKey();if(ts(o,i,this.nextHashUiSelection,this.lastKnownHashSelectionKey,this.lastKnownHashContextKey))return;const n=os(o,i,this.nextHashUiSelection,this.nextHashSelectionKey);this.nextHashUiSelection=n.nextHashUiSelection,this.nextHashSelectionKey=n.nextHashSelectionKey,this.lastInteractionSource=n.lastInteractionSource,this.lastKnownHashSelectionKey=n.lastKnownHashSelectionKey,this.lastKnownHashContextKey=n.lastKnownHashContextKey,this.applyUiSelectionFromHash(t,e,n.syncedUiSelection),this.committedPeriod=t,this.selectedPeriod=t,this.resetSelectedDateValues();try{c.parse(t,e)}catch(a){return void(this.isRangeValid=t!==Vi&&null)}this.applyDateValuesFromHash(t,e),this.isRangeValid=t===Vi||null,this.pendingPresetSelection=null,ns(this),this.compareAppliedSignature=this.compareCurrentSignature},setRangeStartEndFromPeriod(e,t){const o=c.parse(e,t).getDateRange();this.appliedRangeStartDate=d(o[0]<this.minAllowedDate?this.minAllowedDate:o[0]),this.appliedRangeEndDate=d(o[1]>this.maxAllowedDate?this.maxAllowedDate:o[1])},canInteractWithRangeCalendar(){return"range"===this.calendarViewport&&this.selectedPeriod===Vi},onRangeChange(e,t){this.canInteractWithRangeCalendar()&&(e&&t?(this.isRangeValid=!0,this.appliedRangeStartDate=e,this.appliedRangeEndDate=t,this.setUiSelection({type:"period",id:Vi},"range"),this.clearPresetSelection()):this.isRangeValid=!1)},isApplyEnabled(){return $a({uiSelectionType:this.uiSelection.type,uiSelectedPeriod:this.selectedPeriod,hasPendingNonRangePeriodChange:this.hasPendingNonRangePeriodChange,hasPendingPresetSelection:!!this.pendingPresetSelection,isRangeValid:this.isRangeValid,isCompareDirty:this.isCompareDirty,isComparing:this.isComparing,comparePeriodType:this.comparePeriodType,isCompareRangeValid:this.isCompareRangeValid()})},shouldDisplayInvalidComparisonMessage(){return this.shouldShowInvalidComparisonMessage&&this.hasInvalidCustomComparison()},hasInvalidCustomComparison(){return!!this.isComparing&&"custom"===this.comparePeriodType&&!this.isCompareRangeValid()},showInvalidComparisonMessage(){this.hasInvalidCustomComparison()&&(this.shouldShowInvalidComparisonMessage=!0)},dismissInvalidComparisonMessage(){this.shouldShowInvalidComparisonMessage=!1},onDisabledApplyInteraction(){this.showInvalidComparisonMessage()},onCompareToggleUpdated(e){this.isComparing=e,this.dismissInvalidComparisonMessage()},onComparePeriodTypeUpdated(e){this.comparePeriodType=e,this.dismissInvalidComparisonMessage()},onCompareStartDateUpdated(e){this.compareStartDate=e,this.dismissInvalidComparisonMessage()},onCompareEndDateUpdated(e){this.compareEndDate=e,this.dismissInvalidComparisonMessage()},closePeriodSelector(){this.$refs.root.classList.remove("expanded")},isCompareRangeValid(){try{p(this.compareStartDate)}catch(e){return!1}try{p(this.compareEndDate)}catch(e){return!1}return!0},movePeriod(e){if(!this.canMovePeriod(e))return;const t=this.committedAnchorDate||new Date,o=za(t,this.committedPeriod,e),i=Ga(o,this.minAllowedDate,this.maxAllowedDate);this.setPiwikPeriodAndDate(this.committedPeriod,i)},isPeriodMoveDisabled(e){return null===this.committedAnchorDate?this.isRangeSelection:this.isRangeSelection||!this.canMovePeriod(e)},canMovePeriod(e){if(null===this.committedAnchorDate)return!1;const t=-1===e?this.minAllowedDate:this.maxAllowedDate;return!g(this.committedAnchorDate,t,this.committedPeriod)}}});as.render=Ha;var rs=as;const ss={class:"reportingMenu"},ls=["aria-label"],cs=["data-category-id"],ds=["onClick"],us={class:"hidden"},ps={key:2,role:"menu"},ms=["href","onClick","title"],hs=["href","onClick"],gs=["onClick"],bs=Object(D["createElementVNode"])("span",{class:"icon-help"},null,-1),fs=[bs],vs={id:"mobile-left-menu",class:"sidenav sidenav--reporting-menu-mobile hide-on-large-only"},Os=["data-category-id"],ys={key:1,class:"collapsible collapsible-accordion"},js={class:"collapsible-header"},ws={class:"collapsible-body"},Ss=["onClick","href"],Cs=["onClick","href"];function ks(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("MenuItemsDropdown"),s=Object(D["resolveDirective"])("side-nav");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ss,[Object(D["createElementVNode"])("ul",{class:"navbar hide-on-med-and-down collapsible",role:"menu","aria-label":e.translate("CoreHome_MainNavigation")},[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.menu,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{class:Object(D["normalizeClass"])(["menuTab",{active:t.id===e.activeCategory}]),role:"menuitem",key:t.id,"data-category-id":t.id},[t.component?(Object(D["openBlock"])(),Object(D["createBlock"])(Object(D["resolveDynamicComponent"])(t.component),{key:0,onAction:o=>e.loadCategory(t)},null,40,["onAction"])):Object(D["createCommentVNode"])("",!0),t.component?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,class:"item",tabindex:"5",href:"",onClick:Object(D["withModifiers"])(o=>e.loadCategory(t),["prevent"])},[Object(D["createElementVNode"])("span",{class:Object(D["normalizeClass"])("menu-icon "+(t.icon?t.icon:t.subcategories&&t.id===e.activeCategory?"icon-chevron-down":"icon-chevron-right"))},null,2),Object(D["createTextVNode"])(Object(D["toDisplayString"])(t.name)+" ",1),Object(D["createElementVNode"])("span",us,Object(D["toDisplayString"])(e.translate("CoreHome_Menu")),1)],8,ds)),t.component?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",ps,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(t.subcategories,o=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{role:"menuitem",class:Object(D["normalizeClass"])({active:(o.id===e.displayedSubcategory||o.isGroup&&e.activeSubsubcategory===e.displayedSubcategory)&&t.id===e.displayedCategory}),key:o.id},[o.isGroup?(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:0,"show-search":!0,"menu-title":e.htmlEntities(o.name)},{default:Object(D["withCtx"])(()=>[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(o.subcategories,i=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{class:Object(D["normalizeClass"])(["item",{active:i.id===e.activeSubsubcategory&&o.id===e.displayedSubcategory&&t.id===e.displayedCategory}]),tabindex:"5",href:"#?"+e.makeUrl(t,i),onClick:o=>e.loadSubcategory(t,i,o),title:i.tooltip,key:i.id},Object(D["toDisplayString"])(i.name),11,ms))),128))]),_:2},1032,["menu-title"])):Object(D["createCommentVNode"])("",!0),o.isGroup?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,href:"#?"+e.makeUrl(t,o),class:"item",onClick:i=>e.loadSubcategory(t,o,i),tabindex:"5"},Object(D["toDisplayString"])(o.name),9,hs)),o.help?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:2,class:Object(D["normalizeClass"])(["item-help-icon",{active:e.helpShownCategory&&e.helpShownCategory.subcategory===o.id&&e.helpShownCategory.category===t.id&&o.help}]),tabindex:"5",href:"javascript:",onClick:i=>e.showHelp(t,o,i)},fs,10,gs)):Object(D["createCommentVNode"])("",!0)],2))),128))]))],10,cs))),128))],8,ls),Object(D["createElementVNode"])("ul",vs,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.menu,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{class:"no-padding",key:t.id,"data-category-id":t.id},[t.component?(Object(D["openBlock"])(),Object(D["createBlock"])(Object(D["resolveDynamicComponent"])(t.component),{key:0,onAction:o=>e.loadCategory(t)},null,40,["onAction"])):Object(D["createCommentVNode"])("",!0),t.component?Object(D["createCommentVNode"])("",!0):Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",ys,[Object(D["createElementVNode"])("li",null,[Object(D["createElementVNode"])("a",js,[Object(D["createElementVNode"])("i",{class:Object(D["normalizeClass"])(t.icon?t.icon:"icon-chevron-down")},null,2),Object(D["createTextVNode"])(Object(D["toDisplayString"])(t.name),1)]),Object(D["createElementVNode"])("div",ws,[Object(D["createElementVNode"])("ul",null,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(t.subcategories,o=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:o.id},[o.isGroup?(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],{key:0},Object(D["renderList"])(o.subcategories,o=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{onClick:i=>e.loadSubcategory(t,o),href:"#?"+e.makeUrl(t,o),key:o.id},Object(D["toDisplayString"])(o.name),9,Ss))),128)):Object(D["createCommentVNode"])("",!0),o.isGroup?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,onClick:i=>e.loadSubcategory(t,o),href:"#?"+e.makeUrl(t,o)},Object(D["toDisplayString"])(o.name),9,Cs))]))),128))])])])])),[[s,{activator:e.sideNavActivator}]])],8,Os))),128))])])}function Ds(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Es(e){const t=e;return t.widgets?t.widgets:[]}class Ps{constructor(){Ds(this,"privateState",Object(D["reactive"])({isFetchedFirstTime:!1,categorizedWidgets:{}})),Ds(this,"state",Object(D["computed"])(()=>(this.privateState.isFetchedFirstTime||this.fetchAvailableWidgets(),Object(D["readonly"])(this.privateState)))),Ds(this,"widgets",Object(D["computed"])(()=>this.state.value.categorizedWidgets))}fetchAvailableWidgets(){return U.parsed.value.idSite?(this.privateState.isFetchedFirstTime=!0,new Promise((e,t)=>{try{window.widgetsHelper.getAvailableWidgets(t=>{const o=t;this.privateState.categorizedWidgets=o,e(this.widgets.value)})}catch(o){t(o)}})):Promise.resolve(this.widgets.value)}reloadAvailableWidgets(){window.widgetsHelper.clearAvailableWidgets();const e=this.fetchAvailableWidgets();return e.then(()=>{M.postEvent("WidgetsStore.reloaded")}),e}}var Ts=new Ps;const xs="reportingmenu-help";var Vs=Object(D["defineComponent"])({components:{MenuItemsDropdown:si},directives:{SideNav:Jt},props:{},data(){return{showSubcategoryHelpOnLoad:null,initialLoad:!0,helpShownCategory:null}},computed:{sideNavActivator(){return document.querySelector("nav .activateLeftMenu")},menu(){const e=oa.menu.value;return e.forEach(e=>{if(e.widget&&e.widget.indexOf(".")>0){const[t,o]=e.widget.split(".");e.component=Ce(t,o)}}),e},activeCategory(){return oa.activeCategory.value},activeSubcategory(){return oa.activeSubcategory.value},activeSubsubcategory(){return oa.activeSubsubcategory.value},displayedCategory(){return U.parsed.value.category},displayedSubcategory(){return U.parsed.value.subcategory}},created(){oa.fetchMenuItems().then(()=>{U.parsed.value.subcategory||this.loadFirstPageOfActiveSection()}),this.updateTopMenuActiveState(),Object(D["watch"])(()=>U.parsed.value,e=>{if(!e.subcategory)return this.loadFirstPageOfActiveSection(),void this.updateTopMenuActiveState();const t=oa.findSubcategory(e.category,e.subcategory);oa.enterSubcategory(t.category,t.subcategory,t.subsubcategory),this.updateTopMenuActiveState()}),M.on("matomoPageChange",()=>{this.initialLoad||window.globalAjaxQueue.abort(),this.helpShownCategory=null,this.showSubcategoryHelpOnLoad&&(this.showHelp(this.showSubcategoryHelpOnLoad.category,this.showSubcategoryHelpOnLoad.subcategory),this.showSubcategoryHelpOnLoad=null),window.$("#loadingError,#loadingRateLimitError").hide(),this.initialLoad=!1}),M.on("updateReportingMenu",()=>{oa.reloadMenuItems().then(()=>{const e=U.parsed.value.category,t=U.parsed.value.subcategory;if(e&&t){const o=oa.findSubcategory(e,t);o.category&&oa.enterSubcategory(o.category,o.subcategory,o.subsubcategory)}}),Ts.reloadAvailableWidgets()})},methods:{loadFirstPageOfActiveSection(){const e=oa.menu.value,t=e[0];if(!t)return;const o=t.subcategories[0];o&&(oa.enterSubcategory(t,o),this.propagateUrlChange(t,o))},updateTopMenuActiveState(){const e=U.parsed.value.group||"";document.querySelectorAll("[data-reporting-group]").forEach(t=>{const o=t.closest("li");if(!o)return;const i=t.getAttribute("data-reporting-group")||"";o.classList.toggle("active",i===e)})},propagateUrlChange(e,t){const o=U.parsed.value;o.category===e.id&&o.subcategory===t.id?this.loadSubcategory(e,t):U.updateHash(Object.assign(Object.assign({},U.hashParsed.value),{},{category:e.id,subcategory:t.id}))},loadCategory(e){Zi.remove(xs);const t=oa.toggleCategory(e),{subcategories:o}=e,i=o&&1===o.length||e.widget&&o&&o.length;if(t&&i){this.helpShownCategory=null;const t=e.subcategories[0];this.propagateUrlChange(e,t)}},loadSubcategory(e,t,o){o&&(o.shiftKey||o.ctrlKey||o.metaKey)||(Zi.remove(xs),t&&t.id===U.parsed.value.subcategory&&e.id===U.parsed.value.category&&(this.helpShownCategory=null,setTimeout(()=>{M.postEvent("loadPage",e.id,t.id)})))},makeUrl(e,t){const{idSite:o,period:i,date:n,segment:a,comparePeriods:r,compareDates:s,compareSegments:l,group:c}=U.parsed.value,d={idSite:o,period:i,date:n,segment:a,comparePeriods:r,compareDates:s,compareSegments:l,category:e.id,subcategory:t.id};return c&&(d.group=c),U.stringify(d)},htmlEntities(e){return M.helper.htmlEntities(e)},showHelp(e,t,o){const i=U.parsed.value,n=i.category,r=i.subcategory;if((n!==e.id||r!==t.id)&&o)return this.showSubcategoryHelpOnLoad={category:e,subcategory:t},void U.updateHash(Object.assign(Object.assign({},U.hashParsed.value),{},{category:e.id,subcategory:t.id}));if(this.helpShownCategory&&e.id===this.helpShownCategory.category&&t.id===this.helpShownCategory.subcategory)return Zi.remove(xs),void(this.helpShownCategory=null);const s=a("CoreHome_ReportingCategoryHelpPrefix",e.name,t.name),l=`<strong>${s}</strong><br/>`;Zi.show({context:"info",id:xs,type:"help",noclear:!0,class:"help-notification",message:l+t.help,placeat:"#notificationContainer",prepend:!0}),this.helpShownCategory={category:e.id,subcategory:t.id}}}});Vs.render=ks;var Bs=Vs;function Ns(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */class Is{constructor(){Ns(this,"privateState",Object(D["reactive"])({reports:[]})),Ns(this,"state",Object(D["readonly"])(this.privateState)),Ns(this,"reports",Object(D["computed"])(()=>this.state.reports)),Ns(this,"reportsPromise",void 0)}findReport(e,t){return this.reports.value.find(o=>o.module===e&&o.action===t)}fetchReportMetadata(){return this.reportsPromise||(this.reportsPromise=te.fetch({method:"API.getReportMetadata",filter_limit:"-1",idSite:M.idSite||U.parsed.value.idSite}).then(e=>(this.privateState.reports=e,e))),this.reportsPromise.then(()=>this.reports.value)}}var Ms=new Is;const Fs={class:"widgetLoader"},Rs={key:0},Ls={key:1,class:"notification system notification-error"},As=["href"],_s={key:2,class:"notification system notification-error"},Hs={class:"theWidgetContent",ref:"widgetContent"};function $s(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("ActivityIndicator");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Fs,[Object(D["createVNode"])(r,{"loading-message":e.finalLoadingMessage,loading:e.loading},null,8,["loading-message","loading"]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",null,[e.widgetName?(Object(D["openBlock"])(),Object(D["createElementBlock"])("h2",Rs,Object(D["toDisplayString"])(e.widgetName),1)):Object(D["createCommentVNode"])("",!0),e.loadingFailedRateLimit?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",_s,Object(D["toDisplayString"])(e.translate("General_ErrorRateLimit")),1)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ls,[Object(D["createTextVNode"])(Object(D["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),e.hasErrorFaqLink?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/faq/troubleshooting/faq_19489/")},Object(D["toDisplayString"])(e.translate("General_ErrorRequestFaqLink")),9,As)):Object(D["createCommentVNode"])("",!0)]))],512),[[D["vShow"],e.loadingFailed]]),Object(D["createElementVNode"])("div",Hs,null,512)])}function Us(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */class qs{constructor(){Us(this,"privateState",Object(D["reactive"])({module:"",action:"",category:"",subcategory:"",idSite:"",widgetSearchFilters:{}})),Us(this,"state",Object(D["computed"])(()=>Object(D["readonly"])(this.privateState))),M.on("matomoPageChange",()=>{this.isCurrentPage()||this.resetSearchFilters(),this.updateCurrentRoutingFromUrl()})}resetSearchFilters(){this.privateState.widgetSearchFilters={}}getSearchFilters(e){return this.state.value.widgetSearchFilters[e]||{}}setSearchFilters(e,t){e&&(this.privateState.widgetSearchFilters[e]=t)}updateCurrentRoutingFromUrl(){const e=U.parsed.value;this.privateState.module=e.module,this.privateState.action=e.action,this.privateState.category=e.category,this.privateState.subcategory=e.subcategory,this.privateState.idSite=e.idSite}isCurrentPage(){const e=U.parsed.value;return this.state.value.module===e.module&&this.state.value.action===e.action&&this.state.value.category===e.category&&this.state.value.subcategory===e.subcategory&&this.state.value.idSite===e.idSite}}var Ws=new qs,zs=Object(D["defineComponent"])({props:{widgetParams:Object,widgetName:String,loadingMessage:String,suppressNotifications:Boolean},components:{ActivityIndicator:We},data(){return{loading:!1,loadingFailed:!1,loadingFailedRateLimit:!1,changeCounter:0,lastWidgetAbortController:null}},watch:{widgetParams(e){e&&this.loadWidgetUrl(e,this.changeCounter+=1)}},computed:{finalLoadingMessage(){return this.loadingMessage?this.loadingMessage:this.widgetName?a("General_LoadingPopover",this.widgetName):a("General_LoadingData")},hasErrorFaqLink(){const e=M.config.enable_general_settings_admin,t=M.config.enable_plugins_admin;return M.hasSuperUserAccess&&(e||t)}},mounted(){this.widgetParams&&this.loadWidgetUrl(this.widgetParams,this.changeCounter+=1)},beforeUnmount(){this.cleanupLastWidgetContent()},methods:{abortHttpRequestIfNeeded(){this.lastWidgetAbortController&&(this.lastWidgetAbortController.abort(),this.lastWidgetAbortController=null)},cleanupLastWidgetContent(){const e=this.$refs.widgetContent;M.helper.destroyVueComponent(e),e&&(e.innerHTML="")},getWidgetUrl(e){const t=U.parsed.value;let o=Object.assign({},e||{});const i=Object.keys(Object.assign(Object.assign({},U.hashParsed.value),{},{idSite:"",period:"",date:"",segment:"",widget:""}));return i.forEach(e=>{"category"!==e&&"subcategory"!==e&&(e in o||(o[e]=t[e]))}),zo.isComparisonEnabled()&&(o=Object.assign(Object.assign({},o),{},{comparePeriods:t.comparePeriods,compareDates:t.compareDates,compareSegments:t.compareSegments})),e&&"showtitle"in e||(o.showtitle="1"),M.shouldPropagateTokenAuth&&t.token_auth&&(M.broadcast.isWidgetizeRequestWithoutSession()||(o.force_api_session="1"),o.token_auth=t.token_auth),o.random=Math.floor(1e4*Math.random()),o},loadWidgetUrl(e,t){this.loading=!0,this.abortHttpRequestIfNeeded(),this.cleanupLastWidgetContent(),this.lastWidgetAbortController=new AbortController;let o={};e.uniqueId&&(o=Ws.getSearchFilters(e.uniqueId)),te.fetch(this.getWidgetUrl(Object.assign(e,o)),{format:"html",abortController:this.lastWidgetAbortController}).then(o=>{if(t!==this.changeCounter||"string"!==typeof o)return;this.lastWidgetAbortController=null,this.loading=!1,this.loadingFailed=!1;const i=this.$refs.widgetContent;window.$(i).html(o);const n=window.$(i).children();if(this.widgetName){let e=n.find("> .card-content .card-title");e.length||(e=n.find("> h2")),e.length&&e.html(M.helper.htmlEntities(this.widgetName))}M.helper.compileVueEntryComponents(n),this.suppressNotifications||Zi.parseNotificationDivs(),setTimeout(()=>{M.postEvent("widget:loaded",{parameters:e,element:n})})}).catch(e=>{t===this.changeCounter&&(this.lastWidgetAbortController=null,this.cleanupLastWidgetContent(),this.loading=!1,"abort"!==e.xhrStatus&&(429===e.status&&(this.loadingFailedRateLimit=!0),this.loadingFailed=!0))})}}});zs.render=$s;var Gs=zs;function Ks(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("ActivityIndicator"),s=Object(D["resolveComponent"])("Alert");return e.loading?(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:0,loading:!0,"loading-message":e.translate("General_LoadingData")},null,8,["loading-message"])):e.loadingFailed?(Object(D["openBlock"])(),Object(D["createBlock"])(s,{key:1,severity:"danger"},{default:Object(D["withCtx"])(()=>[Object(D["createTextVNode"])(Object(D["toDisplayString"])(e.translate("General_ErrorRequest","","")),1)]),_:1})):e.componentToRender?(Object(D["openBlock"])(),Object(D["createBlock"])(Object(D["resolveDynamicComponent"])(e.componentToRender),Object(D["normalizeProps"])(Object(D["mergeProps"])({key:2},e.componentProps)),null,16)):Object(D["createCommentVNode"])("",!0)}var Ys=Object(D["defineComponent"])({props:{widget:{type:Object,required:!0},widgetized:Boolean},components:{ActivityIndicator:We,Alert:Ke},data(){return{componentToRender:null,loading:!1,loadingFailed:!1}},watch:{widget:{handler(){this.loadComponent()},immediate:!0}},computed:{componentProps(){var e;const t=this.widget;return Object.assign(Object.assign({},(null===(e=t.clientComponent)||void 0===e?void 0:e.props)||{}),{},{uniqueId:t.uniqueId,widgetName:t.name,widgetized:this.widgetized,isWidget:this.widgetized,isWide:t.isWide})}},methods:{async loadComponent(){const e=this.widget,{clientComponent:t}=e;this.loading=!0,this.loadingFailed=!1,this.componentToRender=null;try{if(!t)throw new Error("Missing client-rendered widget metadata");const e=await Se(t.plugin),o=null===e||void 0===e?void 0:e[t.name];if(!o)throw new Error(`Unknown widget component ${t.plugin}.${t.name}`);this.componentToRender=Object(D["markRaw"])(o)}catch(o){console.error(o),this.loadingFailed=!0}finally{this.loading=!1}}}});Ys.render=Ks;var Qs=Ys;const Js={class:"widget-container"};function Xs(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Widget");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Js,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.actualContainer,(e,t)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:t},[Object(D["createElementVNode"])("div",null,[Object(D["createVNode"])(r,{widget:e,"prevent-recursion":!0},null,8,["widget"])])]))),128))])}const Zs=Ce("CoreHome","Widget");var el=Object(D["defineComponent"])({props:{container:{type:Array,required:!0}},components:{Widget:Zs},computed:{actualContainer(){var e,t,o;const i=this.container;if(null===i||void 0===i||null===(e=i[0])||void 0===e||!e.parameters)return i;const[n]=i,a="1"===(null===(t=n.parameters)||void 0===t?void 0:t.widget)||1===(null===(o=n.parameters)||void 0===o?void 0:o.widget),r=a&&"graphEvolution"===n.viewDataTable,s=r?Object.assign(Object.assign({},n),{},{parameters:Object.assign(Object.assign({},n.parameters),{},{showtitle:"0"})}):n;return[s,...i.slice(1)]}}});el.render=Xs;var tl=el;const ol={class:"reportsByDimensionView"},il={class:"entityList"},nl={class:"listCircle"},al=["onClick"],rl={class:"dimension"},sl={class:"reportContainer"},ll=Object(D["createElementVNode"])("div",{class:"clear"},null,-1);function cl(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("WidgetLoader");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ol,[Object(D["createElementVNode"])("div",il,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.widgetsByCategory,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:"dimensionCategory",key:t.name},[Object(D["createTextVNode"])(Object(D["toDisplayString"])(t.name)+" ",1),Object(D["createElementVNode"])("ul",nl,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(t.widgets,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{class:Object(D["normalizeClass"])(["reportDimension",{activeDimension:e.selectedWidget.uniqueId===t.uniqueId}]),key:t.uniqueId,onClick:o=>e.selectWidget(t)},[Object(D["createElementVNode"])("span",rl,Object(D["toDisplayString"])(t.name),1)],10,al))),128))])]))),128))]),Object(D["createElementVNode"])("div",sl,[e.selectedWidget.parameters?(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:0,"widget-params":e.selectedWidget.parameters,class:"dimensionReport"},null,8,["widget-params"])):Object(D["createCommentVNode"])("",!0)]),ll])}var dl=Object(D["defineComponent"])({props:{widgets:Array},components:{WidgetLoader:Gs},data(){return{selectedWidget:null}},created(){[this.selectedWidget]=this.widgetsSorted},computed:{widgetsSorted(){return Kn(this.widgets)},widgetsByCategory(){const e={};return this.widgetsSorted.forEach(t=>{var o;const i=null===(o=t.subcategory)||void 0===o?void 0:o.name;i&&(e[i]||(e[i]={name:i,order:t.order,widgets:[]}),e[i].widgets.push(t))}),Kn(Object.values(e))}},methods:{selectWidget(e){this.selectedWidget=Object.assign({},e)}}});dl.render=cl;var ul=dl;const pl=["id"],ml={key:2},hl={key:3};function gl(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("WidgetLoader"),s=Object(D["resolveComponent"])("ClientWidgetRenderer"),l=Object(D["resolveComponent"])("WidgetContainer"),c=Object(D["resolveComponent"])("WidgetByDimensionContainer"),d=Object(D["resolveDirective"])("tooltips");return e.actualWidget&&e.showWidget?Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:0,class:Object(D["normalizeClass"])(["matomo-widget",{isFirstWidgetInPage:e.actualWidget.isFirstInPage}]),id:e.actualWidget.uniqueId},[e.actualWidget.isContainer||!e.actualWidget.parameters||e.actualWidget.clientComponent?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:0,"widget-params":e.actualWidget.parameters,"widget-name":e.actualWidget.name,"suppress-notifications":e.suppressNotifications},null,8,["widget-params","widget-name","suppress-notifications"])),!e.actualWidget.isContainer&&e.actualWidget.clientComponent?(Object(D["openBlock"])(),Object(D["createBlock"])(s,{key:1,widget:e.actualWidget,widgetized:e.widgetized},null,8,["widget","widgetized"])):Object(D["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"!==e.actualWidget.layout&&!this.preventRecursion?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ml,[Object(D["createElementVNode"])("div",null,[Object(D["createVNode"])(l,{container:e.actualWidget.widgets},null,8,["container"])])])):Object(D["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"===e.actualWidget.layout?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",hl,[Object(D["createElementVNode"])("div",null,[Object(D["createVNode"])(c,{widgets:e.actualWidget.widgets},null,8,["widgets"])])])):Object(D["createCommentVNode"])("",!0)],10,pl)),[[d,{content:e.tooltipContent}]]):Object(D["createCommentVNode"])("",!0)}function bl(e,t){let o=void 0;return Object.values(e||{}).some(e=>(o=e.find(e=>{var o;return e&&e.isContainer&&(null===(o=e.parameters)||void 0===o?void 0:o.containerId)===t}),o)),o}var fl=Object(D["defineComponent"])({props:{widget:Object,widgetized:Boolean,containerid:String,preventRecursion:Boolean,suppressNotifications:Boolean},components:{WidgetLoader:Gs,WidgetContainer:tl,WidgetByDimensionContainer:ul,ClientWidgetRenderer:Qs},directives:{Tooltips:ct},data(){return{showWidget:!1}},setup(){function e(){const e=window.$(this);if(e.hasClass("matomo-form-field"))return"";const t=window.$(this).attr("title")||"";return window.vueSanitize(t.replace(/\n/g,"<br />"))}return{tooltipContent:e}},created(){const{actualWidget:e}=this;if(e&&e.middlewareParameters){const t=e.middlewareParameters;te.fetch(t).then(e=>{this.showWidget=!!e})}else this.showWidget=!0},computed:{allWidgets(){return Ts.widgets.value},actualWidget(){const e=this.widget;if(e){const t=Object.assign({},e);if(e&&e.isReport&&!e.documentation){const o=Ms.findReport(e.module,e.action);o&&o.documentation&&(t.documentation=o.documentation)}return e.uniqueId&&(t.parameters=Object.assign(Object.assign({},t.parameters),{},{uniqueId:e.uniqueId})),t}if(this.containerid){const e=bl(this.allWidgets,this.containerid);if(e){const t=Object.assign({},e);if(this.widgetized){t.isFirstInPage=!0,t.parameters=Object.assign(Object.assign({},t.parameters),{},{widget:"1"});const e=Es(t);e&&(t.widgets=e.map(e=>Object.assign(Object.assign({},e),{},{parameters:Object.assign(Object.assign({},e.parameters),{},{widget:"1",containerId:this.containerid})})))}return t}}return null}}});fl.render=gl;var vl=fl;const Ol={class:"reporting-page"},yl={key:1,class:"col s12 l6 leftWidgetColumn"},jl={key:2,class:"col s12 l6 rightWidgetColumn"};function wl(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("SiteWithoutData"),s=Object(D["resolveComponent"])("ActivityIndicator"),l=Object(D["resolveComponent"])("Widget");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ol,[e.showEmptySiteScreen?(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:0,"embedded-in-reporting":!0,onDismissed:e.onNoDataDismissed},null,8,["onDismissed"])):(Object(D["openBlock"])(),Object(D["createElementBlock"])(D["Fragment"],{key:1},[Object(D["createVNode"])(s,{loading:e.loading},null,8,["loading"]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",null,Object(D["toDisplayString"])(e.translate("CoreHome_NoSuchPage")),513),[[D["vShow"],e.hasNoPage]]),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.widgets,e=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:"row",key:e.uniqueId},[e.group?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createBlock"])(l,{key:0,class:"col s12 fullWidgetColumn",widget:e},null,8,["widget"])),e.group?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",yl,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.left,e=>(Object(D["openBlock"])(),Object(D["createBlock"])(l,{widget:e,key:e.uniqueId},null,8,["widget"]))),128))])):Object(D["createCommentVNode"])("",!0),e.group?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",jl,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.right,e=>(Object(D["openBlock"])(),Object(D["createBlock"])(l,{widget:e,key:e.uniqueId},null,8,["widget"]))),128))])):Object(D["createCommentVNode"])("",!0)]))),128))],64))])}function Sl(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Cl(e){return!!(e.isContainer&&e.layout&&"ByDimension"===e.layout||"bydimension"===e.viewDataTable)||(!!e.isWide||e.viewDataTable&&("tableAllColumns"===e.viewDataTable||"sparklines"===e.viewDataTable||"graphEvolution"===e.viewDataTable))}function kl(e){if(e&&e[0]){const t=[...e],o=e[0];return o.group?t[0]=Object.assign(Object.assign({},t[0]),{},{left:kl(o.left||[]),right:kl(o.right||[])}):t[0]=Object.assign(Object.assign({},t[0]),{},{isFirstInPage:!0}),t}return e}class Dl{constructor(){Sl(this,"privateState",Object(D["reactive"])({})),Sl(this,"state",Object(D["computed"])(()=>Object(D["readonly"])(this.privateState))),Sl(this,"page",Object(D["computed"])(()=>this.state.value.page)),Sl(this,"widgets",Object(D["computed"])(()=>{const e=this.page.value;if(!e)return[];let t=[];const o={},i=e=>e.isReport&&o[`${e.module}.${e.action}`],n=e=>{if(!e.isReport)return[];const t=Ms.findReport(e.module,e.action);return t&&t.relatedReports?t.relatedReports:[]};if((e.widgets||[]).forEach(e=>{i(e)||(n(e).forEach(e=>{o[`${e.module}.${e.action}`]=!0}),t.push(e))}),t=Kn(t),1===t.length)return kl(t);const a=[];for(let s=0;s<t.length;s+=1){const e=t[s];if(Cl(e)||t[s+1]&&Cl(t[s+1]))a.push(Object.assign(Object.assign({},e),{},{widgets:Kn(Es(e))}));else{let o=0;const i=[e],n=[];while(t[s+1]&&!Cl(t[s+1]))s+=1,o+=1,o%2===0?i.push(t[s]):n.push(t[s]);a.push({group:!0,left:i,right:n})}}const r=kl(a);return r}))}fetchPage(e,t){return this.resetPage(),Promise.all([Gn.getAllPages(),Ms.fetchReportMetadata()]).then(()=>(this.privateState.page=Gn.findPage(e,t),this.page.value))}resetPage(){this.privateState.page=void 0}}var El=new Dl;const Pl=Ce("SitesManager","SiteWithoutData"),Tl="site-without-data";function xl(){const e="category=General_Visitors&subcategory=Live_VisitorLog",t=window.broadcast.buildReportingUrl(e);let o=a("CoreHome_PeriodHasOnlyRawData",`<a href="${t}">`,"</a>");M.visitorLogEnabled||(o=a("CoreHome_PeriodHasOnlyRawDataNoVisitsLog")),Zi.show({id:"onlyRawData",animate:!1,context:"info",message:o,type:"transient"})}function Vl(){Zi.remove("onlyRawData")}var Bl=Object(D["defineComponent"])({components:{ActivityIndicator:We,Widget:vl,SiteWithoutData:Pl},props:{groupsWithoutTrackingRequirement:{type:Array,default:()=>[]}},data(){return{loading:!1,hasRawData:!1,hasNoVisits:!1,dateLastChecked:null,hasNoPage:!1,siteHasNoData:!1,noDataDismissed:!1}},created(){El.resetPage(),this.loading=!0,this.renderInitialPage(),this.fetchSiteEmptyState(),Object(D["watch"])(()=>this.showEmptySiteScreen,e=>{this.updateSiteWithoutDataBodyId(e)}),Object(D["watch"])(()=>U.parsed.value,(e,t)=>{e.category===t.category&&e.subcategory===t.subcategory&&e.period===t.period&&e.date===t.date&&e.segment===t.segment&&JSON.stringify(e.compareDates)===JSON.stringify(t.compareDates)&&JSON.stringify(e.comparePeriods)===JSON.stringify(t.comparePeriods)&&JSON.stringify(e.compareSegments)===JSON.stringify(t.compareSegments)&&JSON.stringify(e.columns||"")===JSON.stringify(t.columns||"")||(e.date===t.date&&e.period===t.period||(Vl(),this.dateLastChecked=null,this.hasRawData=!1,this.hasNoVisits=!1),this.renderPage(e.category,e.subcategory,e.period,e.date,e.segment))}),M.on("loadPage",(e,t)=>{const o=U.parsed.value;this.renderPage(e,t,o.period,o.date,o.segment)})},unmounted(){this.updateSiteWithoutDataBodyId(!1)},computed:{widgets(){return El.widgets.value},showEmptySiteScreen(){if(!this.siteHasNoData||this.noDataDismissed)return!1;const e=U.parsed.value.group||Zn;return!this.groupsWithoutTrackingRequirement.includes(e)}},methods:{fetchSiteEmptyState(){te.fetch({module:"SitesManager",action:"getSiteEmptyState",idSite:M.idSite},{createErrorNotification:!1}).then(e=>{this.siteHasNoData=!0===e}).catch(()=>{this.siteHasNoData=!1})},onNoDataDismissed(){this.noDataDismissed=!0,this.renderInitialPage()},updateSiteWithoutDataBodyId(e){e?document.body.id=Tl:document.body.id===Tl&&(document.body.id="")},renderPage(e,t,o,i,n){if(this.showEmptySiteScreen)return Zi.clearTransientNotifications(),void(this.loading=!1);if(!e||!t)return El.resetPage(),void(this.loading=!1);try{c.parse(o,i)}catch(s){return Zi.show({id:"invalidDate",animate:!1,context:"error",message:a("CoreHome_DateInvalid"),type:"transient"}),El.resetPage(),void(this.loading=!1)}Zi.remove("invalidDate"),M.postEvent("matomoPageChange",{}),Zi.clearTransientNotifications(),c.parse(o,i).containsToday()&&this.showOnlyRawDataMessageIfRequired(e,t,o,i,n);const r={category:e,subcategory:t};if(M.postEvent("ReportingPage.loadPage",r),r.promise)return this.loading=!0,void Promise.resolve(r.promise).finally(()=>{this.loading=!1});El.fetchPage(e,t).then(()=>{const t=!El.page.value;if(t){const t=Gn.findPageInCategory(e);if(t&&t.subcategory)return void U.updateHash(Object.assign(Object.assign({},U.hashParsed.value),{},{subcategory:t.subcategory.id}))}this.hasNoPage=t,this.loading=!1})},renderInitialPage(){const e=U.parsed.value;this.renderPage(e.category,e.subcategory,e.period,e.date,e.segment)},showOnlyRawDataMessageIfRequired(e,t,o,i,n){if(this.hasRawData&&this.hasNoVisits&&xl(),n)return void Vl();const a=["Live_VisitorLog","General_RealTime","UserCountryMap_RealTimeMap","MediaAnalytics_TypeAudienceLog","MediaAnalytics_TypeRealTime","FormAnalytics_TypeRealTime","Goals_AddNewGoal"],r=["HeatmapSessionRecording_Heatmaps","HeatmapSessionRecording_SessionRecordings","Marketplace_Marketplace"];if(-1!==a.indexOf(t)||-1!==r.indexOf(e)||-1!==t.toLowerCase().indexOf("manage"))return void Vl();const s=6e4;this.dateLastChecked&&(new Date).valueOf()-this.dateLastChecked.valueOf()<s||te.fetch({method:"VisitsSummary.getVisits",date:i,period:o,segment:n}).then(e=>(this.dateLastChecked=new Date,e.value>0?(this.hasNoVisits=!1,void Vl()):(this.hasNoVisits=!0,this.hasRawData?void xl():te.fetch({method:"Live.getMostRecentVisitsDateTime",date:i,period:o}).then(e=>{if(!e||""===e.value)return this.hasRawData=!1,void Vl();this.hasRawData=!0,xl()}))))}}});Bl.render=wl;var Nl=Bl;const Il={class:"report-export-popover row",id:"reportExport"},Ml={class:"col l6"},Fl={name:"format"},Rl={name:"option_flat"},Ll={name:"option_show_dimensions"},Al={name:"option_expanded"},_l={name:"option_format_metrics"},Hl={class:"col l6"},$l={name:"filter_type"},Ul={class:"filter_limit"},ql={name:"filter_limit_all"},Wl={key:0,name:"filter_limit"},zl={key:1,name:"filter_limit"},Gl={class:"col l12"},Kl=["value"],Yl=["innerHTML"],Ql={class:"col l12"},Jl=["href","title"],Xl=["innerHTML"];function Zl(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Field"),s=Object(D["resolveDirective"])("select-on-focus");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Il,[Object(D["createElementVNode"])("div",Ml,[Object(D["createElementVNode"])("div",Fl,[Object(D["createVNode"])(r,{uicontrol:"radio",name:"format",title:e.translate("CoreHome_ExportFormat"),modelValue:e.reportFormat,"onUpdate:modelValue":t[0]||(t[0]=t=>e.reportFormat=t),"full-width":!0,options:e.availableReportFormats[e.reportType]},null,8,["title","modelValue","options"])]),Object(D["createElementVNode"])("div",null,[Object(D["createElementVNode"])("div",Rl,[Object(D["withDirectives"])(Object(D["createVNode"])(r,{uicontrol:"checkbox",name:"option_flat",title:e.translate("CoreHome_FlattenReport"),modelValue:e.optionFlatModel,"onUpdate:modelValue":t[1]||(t[1]=t=>e.optionFlatModel=t)},null,8,["title","modelValue"]),[[D["vShow"],e.canExportFlat]])])]),Object(D["createElementVNode"])("div",null,[Object(D["createElementVNode"])("div",Ll,[Object(D["withDirectives"])(Object(D["createVNode"])(r,{uicontrol:"checkbox",name:"option_show_dimensions",title:e.translate("CoreHome_IncludeDimensionsSeparately"),modelValue:e.optionShowDimensions,"onUpdate:modelValue":t[2]||(t[2]=t=>e.optionShowDimensions=t)},null,8,["title","modelValue"]),[[D["vShow"],e.canExportFlat&&e.hasMultipleDimensions&&e.optionFlatModel]])])]),Object(D["createElementVNode"])("div",null,[Object(D["createElementVNode"])("div",Al,[Object(D["withDirectives"])(Object(D["createVNode"])(r,{uicontrol:"checkbox",name:"option_expanded",title:e.translate("CoreHome_ExpandSubtables"),modelValue:e.optionExpandedModel,"onUpdate:modelValue":t[3]||(t[3]=t=>e.optionExpandedModel=t)},null,8,["title","modelValue"]),[[D["vShow"],e.hasSubtables&&e.canExpand]])])]),Object(D["createElementVNode"])("div",null,[Object(D["createElementVNode"])("div",_l,[Object(D["createVNode"])(r,{uicontrol:"checkbox",name:"option_format_metrics",title:e.translate("CoreHome_FormatMetrics"),modelValue:e.optionFormatMetrics,"onUpdate:modelValue":t[4]||(t[4]=t=>e.optionFormatMetrics=t)},null,8,["title","modelValue"])])])]),Object(D["createElementVNode"])("div",Hl,[Object(D["createElementVNode"])("div",null,[Object(D["createElementVNode"])("div",$l,[Object(D["createVNode"])(r,{uicontrol:"radio",name:"filter_type",title:e.translate("CoreHome_ReportType"),modelValue:e.reportType,"onUpdate:modelValue":t[5]||(t[5]=t=>e.reportType=t),"full-width":!0,options:e.availableReportTypes},null,8,["title","modelValue","options"])])]),Object(D["createElementVNode"])("div",Ul,[Object(D["withDirectives"])(Object(D["createElementVNode"])("div",ql,[Object(D["createVNode"])(r,{uicontrol:"radio",name:"filter_limit_all",title:e.translate("CoreHome_RowLimit"),modelValue:e.reportLimitAll,"onUpdate:modelValue":t[6]||(t[6]=t=>e.reportLimitAll=t),"full-width":!0,options:e.limitAllOptions},null,8,["title","modelValue","options"])],512),[[D["vShow"],!e.maxFilterLimit||e.maxFilterLimit<=0]]),"no"===e.reportLimitAll&&e.maxFilterLimit<=0?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Wl,[Object(D["createVNode"])(r,{uicontrol:"number",name:"filter_limit",min:1,modelValue:e.reportLimit,"onUpdate:modelValue":t[7]||(t[7]=t=>e.reportLimit=t),"full-width":!0},null,8,["modelValue"])])):Object(D["createCommentVNode"])("",!0),"no"===e.reportLimitAll&&e.maxFilterLimit>0?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",zl,[Object(D["createVNode"])(r,{uicontrol:"number",name:"filter_limit",min:1,max:e.maxFilterLimit,modelValue:e.reportLimit,"onUpdate:modelValue":t[8]||(t[8]=t=>e.reportLimit=t),value:e.reportLimit,"full-width":!0,title:e.filterLimitTooltip},null,8,["max","modelValue","value","title"])])):Object(D["createCommentVNode"])("",!0)])]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",Gl,[Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("textarea",{readonly:"",class:"exportFullUrl",value:e.exportLinkWithoutToken},[Object(D["createTextVNode"])("\n      ")],8,Kl)),[[s,{}]]),Object(D["createElementVNode"])("div",{class:"tooltip",innerHTML:e.$sanitize(e.translate("CoreHome_ExportTooltipWithLink","<a target=_blank href='?module=UsersManager&action=userSecurity'>","</a>","ENTER_YOUR_TOKEN_AUTH_HERE"))},null,8,Yl)],512),[[D["vShow"],e.showUrl]]),Object(D["createElementVNode"])("div",Ql,[Object(D["createElementVNode"])("a",{class:"btn",href:e.exportLink,target:"_new",title:e.translate("CoreHome_ExportTooltip")},Object(D["toDisplayString"])(e.translate("General_Export")),9,Jl),Object(D["createElementVNode"])("a",{href:"javascript:",onClick:t[9]||(t[9]=t=>e.showUrl=!e.showUrl),class:"toggle-export-url"},[Object(D["withDirectives"])(Object(D["createElementVNode"])("span",null,Object(D["toDisplayString"])(e.translate("CoreHome_ShowExportUrl")),513),[[D["vShow"],!e.showUrl]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("span",null,Object(D["toDisplayString"])(e.translate("CoreHome_HideExportUrl")),513),[[D["vShow"],e.showUrl]])])]),e.additionalContent?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:0,class:"col l12 report-export-popover-footer",innerHTML:e.$sanitize(e.additionalContent)},null,8,Xl)):Object(D["createCommentVNode"])("",!0)])}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const ec=["CSV","TSV","HTML"];function tc(e){return ec.includes(e)}function oc(e,t,o){return e?tc(o)?{hasUserPreference:!1,preferredMode:null}:{hasUserPreference:!0,preferredMode:"flat"}:t?{hasUserPreference:!0,preferredMode:"expanded"}:{hasUserPreference:!0,preferredMode:null}}function ic(e,t,o,i){const{hasUserPreference:n,preferredMode:a}=i;return e||t?tc(o)?t?{optionFlat:!n||"flat"===a,optionExpanded:!1}:{optionFlat:!1,optionExpanded:!1}:e?n?"flat"===a?t?{optionFlat:!0,optionExpanded:!1}:{optionFlat:!1,optionExpanded:!0}:"expanded"===a?{optionFlat:!1,optionExpanded:!0}:{optionFlat:!1,optionExpanded:!1}:{optionFlat:!1,optionExpanded:!0}:t?{optionFlat:"flat"===a,optionExpanded:!1}:{optionFlat:!1,optionExpanded:!1}:{optionFlat:!1,optionExpanded:!1}}const nc=Ce("CorePluginsAdmin","Field");var ac=Object(D["defineComponent"])({components:{Field:nc},directives:{SelectOnFocus:Wt},props:{hasSubtables:Boolean,canExportFlat:{type:Boolean,default:!1},availableReportTypes:Object,availableReportFormats:{type:Object,required:!0},maxFilterLimit:Number,limitAllOptions:Object,dataTable:{type:Object,required:!0},requestParams:[Object,String],apiMethod:{type:String,required:!0},initialReportType:{type:String,default:"default"},initialReportLimit:{type:[String,Number],default:100},initialReportLimitAll:{type:String,default:"yes"},initialOptionFlat:{type:Boolean,default:!1},initialOptionShowDimensions:{type:Boolean,default:!1},initialOptionExpanded:{type:Boolean,default:!0},initialOptionFormatMetrics:{type:Boolean,default:!1},initialReportFormat:{type:String,default:"TSV"}},mounted(){const e={content:this.additionalContent,dataTable:this.dataTable};M.postEvent("ReportExportPopover.additionalContent",e),this.additionalContent=e.content},data(){return{showUrl:!1,reportFormat:this.initialReportFormat,optionShowDimensions:this.initialOptionShowDimensions,subtablePreference:oc(this.initialOptionFlat,this.initialOptionExpanded,this.initialReportFormat),optionFormatMetrics:this.initialOptionFormatMetrics,reportType:this.initialReportType,reportLimitAll:this.initialReportLimitAll,reportLimit:"string"===typeof this.initialReportLimit?parseInt(this.initialReportLimit,10):this.initialReportLimit,additionalContent:""}},watch:{reportType(e){this.availableReportFormats[e][this.reportFormat]||(this.reportFormat="JSON")},reportLimit(e,t){this.maxFilterLimit&&this.maxFilterLimit>0&&e>this.maxFilterLimit&&(this.reportLimit=t)}},computed:{hasMultipleDimensions(){var e,t;return"function"===typeof(null===(e=this.dataTable)||void 0===e?void 0:e.getReportMetadata)&&Object.keys((null===(t=this.dataTable)||void 0===t?void 0:t.getReportMetadata().dimensions)||{}).length>1},filterLimitTooltip(){const e=a("CoreHome_RowLimit"),t=this.maxFilterLimit?a("General_ComputedMetricMax",this.maxFilterLimit.toString()):"";return`${e} (${t})`},canExpand(){return!tc(this.reportFormat)},effectiveSubtableOptions(){return ic(this.hasSubtables,this.canExportFlat,this.reportFormat,this.subtablePreference)},optionFlatModel:{get(){return this.effectiveSubtableOptions.optionFlat},set(e){this.canExportFlat&&(e?this.subtablePreference={hasUserPreference:!0,preferredMode:"flat"}:this.optionExpandedModel||(this.subtablePreference={hasUserPreference:!0,preferredMode:null}))}},optionExpandedModel:{get(){return this.effectiveSubtableOptions.optionExpanded},set(e){this.hasSubtables&&!tc(this.reportFormat)&&(e?this.subtablePreference={hasUserPreference:!0,preferredMode:"expanded"}:this.optionFlatModel||(this.subtablePreference={hasUserPreference:!0,preferredMode:null}))}},exportLink(){return this.getExportLink(!0)},exportLinkWithoutToken(){return this.getExportLink(!1)}},methods:{getExportLink(e=!0){const{reportFormat:t,apiMethod:o,reportType:i}=this,n=this.dataTable;if(!t)return;let a={};const r="yes"===this.reportLimitAll?-1:this.reportLimit;this.requestParams&&"string"===typeof this.requestParams?a=JSON.parse(this.requestParams):this.requestParams&&"object"===typeof this.requestParams&&(a=this.requestParams);const{segment:s,label:l,idGoal:c,idDimension:d,idSite:u}=n.param;let{date:p,period:m}=n.param;"RSS"===t&&(p="last10"),"undefined"!==typeof n.param.dateUsedInGraph&&(p=n.param.dateUsedInGraph);const h=M.config.datatable_export_range_as_day.toLowerCase();-1!==h.indexOf(t.toLowerCase())&&"range"===n.param.period&&(m="day"),"range"===n.param.period&&"graphEvolution"===n.param.viewDataTable&&(m="day");const g={module:"API",format:t,idSite:u,period:m,date:p};"processed"===i?(g.method="API.getProcessedReport",[g.apiModule,g.apiAction]=o.split(".")):g.method=o,n.param.compareDates&&n.param.compareDates.length&&(g.compareDates=n.param.compareDates,g.compare="1"),n.param.comparePeriods&&n.param.comparePeriods.length&&(g.comparePeriods=n.param.comparePeriods,g.compare="1"),n.param.compareSegments&&n.param.compareSegments.length&&(g.compareSegments=n.param.compareSegments,g.compare="1"),"undefined"!==typeof n.param.filter_pattern&&(g.filter_pattern=n.param.filter_pattern),"undefined"!==typeof n.param.filter_pattern_recursive&&(g.filter_pattern_recursive=n.param.filter_pattern_recursive),window.$.isPlainObject(a)&&Object.entries(a).forEach(([e,t])=>{let o=t;!0===o?o=1:!1===o&&(o=0),g[e]=o});const{optionFlat:b,optionExpanded:f}=this.effectiveSubtableOptions;if(b&&(g.flat=1,this.optionShowDimensions&&(g.show_dimensions=1),"undefined"!==typeof n.param.include_aggregate_rows&&"1"===n.param.include_aggregate_rows&&(g.include_aggregate_rows=1)),this.hasSubtables&&!b&&f&&(g.expanded=1),this.optionFormatMetrics&&(g.format_metrics=1),n.param.pivotBy&&(g.pivotBy=n.param.pivotBy,g.pivotByColumnLimit=20,n.props.pivot_by_column&&(g.pivotByColumn=n.props.pivot_by_column)),"CSV"!==t&&"TSV"!==t&&"RSS"!==t||(g.translateColumnNames=1,g.language=M.language),"undefined"!==typeof s&&(g.segment=decodeURIComponent(s)),"undefined"!==typeof c&&"-1"!==c&&(g.idGoal=c),"undefined"!==typeof d&&"-1"!==d&&(g.idDimension=d),l){const e=l.split(",");e.length>1?g.label=e:[g.label]=e}g.showMetadata=0,g.token_auth="ENTER_YOUR_TOKEN_AUTH_HERE",!0===e&&(g.token_auth=M.token_auth,g.force_api_session=1),g.filter_limit=r;const v=window.location.href.split("?")[0];return`${v}?${U.stringify(g)}`}}});ac.render=Zl;var rc=ac;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{$:sc}=window;var lc={mounted(e,t){e.addEventListener("click",()=>{var o;const i=U.hashParsed.value.popover,n=sc(e).closest("[data-report]").data("uiControlObject"),r=window.Piwik_Popover.showLoading("Export"),s=t.value.reportFormats;let l=n.param.filter_limit;t.value.maxFilterLimit>0&&(l=Math.min(l,t.value.maxFilterLimit));const c=!0===n.param.flat||1===n.param.flat||"1"===n.param.flat,d=!0===n.param.show_dimensions||1===n.param.show_dimensions||"1"===n.param.show_dimensions,u=c||n.numberOfSubtables>0,p=null!==(o=t.value.canExportFlat)&&void 0!==o?o:u,m=p,h=!1,g={initialReportType:"default",initialReportFormat:"TSV",initialReportLimit:l>0?l:100,initialReportLimitAll:-1===l?"yes":"no",initialOptionFlat:m,initialOptionShowDimensions:d,initialOptionExpanded:h,initialOptionFormatMetrics:!1,hasSubtables:u,canExportFlat:p,availableReportFormats:{default:s,processed:{JSON:s.JSON,XML:s.XML}},availableReportTypes:{default:a("CoreHome_StandardReport"),processed:a("CoreHome_ReportWithMetadata")},limitAllOptions:{yes:a("General_All"),no:a("CoreHome_CustomLimit")},maxFilterLimit:t.value.maxFilterLimit,dataTable:n,requestParams:t.value.requestParams,apiMethod:t.value.apiMethod},b=ve({template:'\n          <popover v-bind="bind"/>',data(){return{bind:g}}});b.component("popover",rc);const f=document.createElement("div");b.mount(f);const{reportTitle:v}=t.value;window.Piwik_Popover.setTitle(`${a("General_Export")} ${M.helper.htmlEntities(v)}`),window.Piwik_Popover.setContent(f),window.Piwik_Popover.onClose(()=>{b.unmount(),""!==i&&setTimeout(()=>{U.updateHash(Object.assign(Object.assign({},U.hashParsed.value),{},{popover:i})),t.value.onClose&&t.value.onClose()},100)}),setTimeout(()=>{r.dialog(),sc(".exportFullUrl, .btn",r).tooltip({track:!0,show:!1,hide:!1})},100)})}};const cc=["src","width","height"];function dc(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("img",{class:"sparklineImg",loading:"lazy",alt:"",src:e.sparklineUrl,width:e.width,height:e.height},null,8,cc)}var uc=Object(D["defineComponent"])({name:"Sparkline",props:{seriesIndices:Array,params:[Object,String],width:Number,height:Number},data(){return{isWidget:!1,themeMode:M.getThemeMode()}},mounted(){this.isWidget=!!this.$el.closest("[widgetId]"),window.addEventListener("themeModeChange",this.onThemeModeChange)},beforeUnmount(){window.removeEventListener("themeModeChange",this.onThemeModeChange)},computed:{sparklineUrl(){const{seriesIndices:e,params:t,themeMode:o}=this,i=M.getSparklineColors();e&&(i.lineColor=i.lineColor.filter((t,o)=>-1!==e.indexOf(o)));const n=JSON.stringify(i),a=document.body.classList.contains("sparklines-redesign-enabled"),r=a?Object.assign(Object.assign({},"number"===typeof this.width?{width:2*this.width}:{}),"number"===typeof this.height?{height:2*this.height}:{}):{},s=Object.assign(Object.assign({forceView:"1",viewDataTable:"sparkline",widget:this.isWidget?"1":"0",showtitle:"1",colors:n,random:Date.now(),date:this.defaultDate},r),{},{segment:U.parsed.value.segment}),l="object"===typeof t?t:U.parse(t.substring(t.indexOf("?")+1)),c=new te,d=c.mixinDefaultGetParams(Object.assign(Object.assign({},s),l)),u=U.parsed.value.token_auth;return u&&u.length&&M.shouldPropagateTokenAuth&&(d.token_auth=u),d.themeMode=o,"?"+U.stringify(d)},defaultDate(){if("range"===M.period)return`${M.startDateString},${M.endDateString}`;const e=k.getLastNRange(M.period,30,M.currentDateString).getDateRange(),t=new Date(M.minDateYear,M.minDateMonth-1,M.minDateDay);e[0]<t&&(e[0]=t);const o=d(e[0]),i=d(e[1]);return`${o},${i}`}},methods:{onThemeModeChange(){this.themeMode=M.getThemeMode()}}});uc.render=dc;var pc=uc;const mc={class:"progressbar"},hc={class:"progress"},gc=["innerHTML"];function bc(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("MatomoLoader");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",mc,[Object(D["createElementVNode"])("div",hc,[Object(D["createElementVNode"])("div",{class:"determinate",style:Object(D["normalizeStyle"])([{width:"0"},{width:e.actualProgress+"%"}])},null,4)]),Object(D["withDirectives"])(Object(D["createElementVNode"])("span",null,[Object(D["createVNode"])(r),Object(D["createElementVNode"])("span",{class:"label",innerHTML:e.$sanitize(e.label)},null,8,gc)],512),[[D["vShow"],!!e.label]])])}var fc=Object(D["defineComponent"])({components:{MatomoLoader:Ue},props:{progress:{type:Number,required:!0},label:String},computed:{actualProgress(){return this.progress>100?100:this.progress<0?0:this.progress}}});fc.render=bc;var vc=fc,Oc={mounted(e){e.classList.add("piwik-content-intro")},updated(e){Object(D["nextTick"])(()=>{e.classList.add("piwik-content-intro")})}};
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
const yc="(max-width: 767px)",jc=new WeakMap;function wc(e){const t=e.parentElement;if(!t||t.classList.contains("contentTableWrapper"))return;const o=document.createElement("div");o.className="contentTableWrapper",t.insertBefore(o,e),o.appendChild(e)}function Sc(e){const t=e.parentElement;if(!t||!t.classList.contains("contentTableWrapper"))return;const o=t.parentElement;o&&(o.insertBefore(e,t),t.remove())}function Cc(e){return(e||window.matchMedia(yc)).matches}function kc(e,t){e.addEventListener("change",t)}function Dc(e,t){e.removeEventListener("change",t)}function Ec(e,t){e.classList.add("card","card-table","entityTable"),Cc(t)?wc(e):Sc(e)}function Pc(e){const t=jc.get(e);t&&(Dc(t.mediaQuery,t.listener),jc.delete(e)),Sc(e)}function Tc(e){const t=jc.get(e);if(t)return void Ec(e,t.mediaQuery);const o=window.matchMedia(yc),i=()=>{e.isConnected?Ec(e,o):Pc(e)};kc(o,i),jc.set(e,{mediaQuery:o,listener:i}),Ec(e,o)}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */var xc={mounted(e,t){var o;null!==t&&void 0!==t&&null!==(o=t.value)&&void 0!==o&&o.off||Tc(e)},updated(e,t){var o;null!==t&&void 0!==t&&null!==(o=t.value)&&void 0!==o&&o.off?Pc(e):Object(D["nextTick"])(()=>{Tc(e)})},beforeUnmount(e){Pc(e)}};const Vc={ref:"root"};function Bc(e,t,o,i,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Vc,[Object(D["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)}const{$:Nc}=window;var Ic=Object(D["defineComponent"])({props:{formData:{type:Object,required:!0},submitApiMethod:{type:String,required:!0},sendJsonPayload:Boolean,noErrorNotification:Boolean,noSuccessNotification:Boolean},data(){return{isSubmitting:!1,successfulPostResponse:null,errorPostResponse:null}},emits:["update:modelValue"],mounted(){Nc(this.$refs.root).on("click","input[type=submit]",()=>{this.submitForm()})},methods:{submitForm(){this.successfulPostResponse=null,this.errorPostResponse=null;let e=this.formData;this.sendJsonPayload&&(e={data:JSON.stringify(this.formData)}),this.isSubmitting=!0,te.post({module:"API",method:this.submitApiMethod},e,{createErrorNotification:!this.noErrorNotification}).then(e=>{if(this.successfulPostResponse=e,!this.noSuccessNotification){const e=Zi.show({message:a("General_YourChangesHaveBeenSaved"),context:"success",type:"toast",id:"ajaxHelper"});Zi.scrollToNotification(e)}}).catch(e=>{this.errorPostResponse=e.message}).finally(()=>{this.isSubmitting=!1})}}});Ic.render=Bc;var Mc=Ic;function Fc(e,t,o,i,n,a){return Object(D["renderSlot"])(e.$slots,"default")}var Rc=Object(D["defineComponent"])({});Rc.render=Fc;var Lc=Rc;const Ac={key:0},_c=["data-target","title"],Hc=Object(D["createElementVNode"])("span",{class:"icon-configure"},null,-1),$c=[Hc],Uc=["data-target"],qc=["title"],Wc=["title","src"],zc=["id"],Gc=["data-footer-icon-id"],Kc=["title"],Yc=["title","src"],Qc={key:2},Jc=Object(D["createElementVNode"])("li",{class:"divider"},null,-1),Xc=Object(D["createElementVNode"])("li",{class:"divider"},null,-1),Zc=["title"],ed=Object(D["createElementVNode"])("span",{class:"icon-export"},null,-1),td=[ed],od=["title"],id=Object(D["createElementVNode"])("span",{class:"icon-image"},null,-1),nd=[id],ad=["title"],rd=Object(D["createElementVNode"])("span",{class:"icon-annotation"},null,-1),sd=[rd],ld=["title"],cd=Object(D["createElementVNode"])("span",{class:"icon-search",draggable:"false"},null,-1),dd=["title"],ud=["id","title"],pd=["title"],md=["title","src"],hd=["id"],gd={key:0},bd=["innerHTML"],fd={key:1},vd=["innerHTML"],Od={key:2},yd=["innerHTML"],jd={key:3},wd=["innerHTML"],Sd={key:4},Cd=["innerHTML"],kd={key:5},Dd=["innerHTML"],Ed=["title","data-target"],Pd=Object(D["createElementVNode"])("span",{class:"icon-calendar"},null,-1),Td={class:"periodName"},xd=["id"],Vd=["data-period"];function Bd(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Passthrough"),s=Object(D["resolveDirective"])("dropdown-button"),l=Object(D["resolveDirective"])("report-export");return e.showFooter&&e.showFooterIcons?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ac,[e.hasConfigItems&&(e.isAnyConfigureIconHighlighted||e.isTableView)?Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:0,class:Object(D["normalizeClass"])(["dropdown-button dropdownConfigureIcon dataTableAction",{highlighted:e.isAnyConfigureIconHighlighted}]),href:"",onClick:t[0]||(t[0]=Object(D["withModifiers"])(()=>{},["prevent"])),"data-target":"dropdownConfigure"+e.randomIdForDropdown,title:e.translate("CoreHome_ReportConfigure"),style:{"margin-right":"3.5px"}},$c,10,_c)),[[s]]):Object(D["createCommentVNode"])("",!0),e.hasFooterIconsToShow?Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,class:"dropdown-button dataTableAction activateVisualizationSelection",href:"","data-target":"dropdownVisualizations"+e.randomIdForDropdown,style:{"margin-right":"3.5px"},onClick:t[1]||(t[1]=Object(D["withModifiers"])(()=>{},["prevent"]))},[/^icon-/.test(e.activeFooterIcon||"")?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,title:e.translate("CoreHome_ChangeVisualization"),class:Object(D["normalizeClass"])(e.activeFooterIcon)},null,10,qc)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("img",{key:1,title:e.translate("CoreHome_ChangeVisualization"),width:"16",height:"16",src:e.activeFooterIcon},null,8,Wc))],8,Uc)),[[s]]):Object(D["createCommentVNode"])("",!0),e.showFooterIcons?(Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",{key:2,id:"dropdownVisualizations"+e.randomIdForDropdown,class:"dropdown-content dataTableFooterIcons"},[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.footerIcons,(t,o)=>(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:o},{default:Object(D["withCtx"])(()=>[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(t.buttons.filter(e=>!!e.icon),o=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:o.id},[Object(D["createElementVNode"])("a",{class:Object(D["normalizeClass"])(`${t.class} tableIcon\n              ${-1!==e.activeFooterIconIds.indexOf(o.id)?"activeIcon":""}`),"data-footer-icon-id":o.id},[/^icon-/.test(o.icon||"")?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,title:o.title,class:Object(D["normalizeClass"])(o.icon),style:{"margin-right":"5.5px"}},null,10,Kc)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("img",{key:1,width:"16",height:"16",title:o.title,src:o.icon,style:{"margin-right":"5.5px"}},null,8,Yc)),o.title?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",Qc,Object(D["toDisplayString"])(o.title),1)):Object(D["createCommentVNode"])("",!0)],10,Gc)]))),128)),Jc]),_:2},1024))),128)),Xc],8,zc)):Object(D["createCommentVNode"])("",!0),e.showExport?Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:3,class:"dataTableAction activateExportSelection",title:e.translate("General_ExportThisReport"),href:"",style:{"margin-right":"3.5px"},onClick:t[2]||(t[2]=Object(D["withModifiers"])(()=>{},["prevent"]))},td,8,Zc)),[[l,{reportTitle:e.reportTitle,requestParams:e.requestParams,apiMethod:e.apiMethodToRequestDataTable,reportFormats:e.reportFormats,maxFilterLimit:e.maxFilterLimit,canExportFlat:e.exportSupportsFlat}]]):Object(D["createCommentVNode"])("",!0),e.showExportAsImageIcon?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:4,class:"dataTableAction tableIcon",href:"",id:"dataTableFooterExportAsImageIcon",onClick:t[3]||(t[3]=Object(D["withModifiers"])(t=>e.showExportImage(t),["prevent"])),title:e.translate("General_ExportAsImage"),style:{"margin-right":"3.5px"}},nd,8,od)):Object(D["createCommentVNode"])("",!0),e.showAnnotations?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:5,class:"dataTableAction annotationView",href:"",title:e.translate("Annotations_Annotations"),onClick:t[4]||(t[4]=Object(D["withModifiers"])(()=>{},["prevent"])),style:{"margin-right":"3.5px"}},sd,8,ad)):Object(D["createCommentVNode"])("",!0),e.showSearch?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:6,class:"dropdown-button dataTableAction searchAction",href:"",title:e.translate("General_Search"),style:{"margin-right":"3.5px"},draggable:"false",onClick:t[5]||(t[5]=Object(D["withModifiers"])(()=>{},["prevent"]))},[cd,Object(D["createElementVNode"])("span",{class:"icon-close",draggable:"false",title:e.translate("CoreHome_CloseSearch")},null,8,dd),Object(D["createElementVNode"])("input",{id:`widgetSearch_${e.reportId}_${e.placement}`,title:e.translate("CoreHome_DataTableHowToSearch"),type:"text",class:"dataTableSearchInput"},null,8,ud)],8,ld)):Object(D["createCommentVNode"])("",!0),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.dataTableActions,e=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:e.id,class:Object(D["normalizeClass"])("dataTableAction "+e.id),href:"",onClick:t[6]||(t[6]=Object(D["withModifiers"])(()=>{},["prevent"])),title:e.title,style:{"margin-right":"3.5px"}},[/^icon-/.test(e.icon||"")?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,class:Object(D["normalizeClass"])(e.icon)},null,2)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("img",{key:1,width:"16",height:"16",title:e.title,src:e.icon},null,8,md))],10,pd))),128)),Object(D["createElementVNode"])("ul",{id:"dropdownConfigure"+e.randomIdForDropdown,class:"dropdown-content tableConfiguration"},[e.showFlattenTable?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",gd,[Object(D["createElementVNode"])("div",{class:"configItem dataTableFlatten",innerHTML:e.$sanitize(e.flattenItemText)},null,8,bd)])):Object(D["createCommentVNode"])("",!0),e.showDimensionsConfigItem?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",fd,[Object(D["createElementVNode"])("div",{class:"configItem dataTableShowDimensions",innerHTML:e.$sanitize(e.showDimensionsText)},null,8,vd)])):Object(D["createCommentVNode"])("",!0),e.showFlatConfigItem?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",Od,[Object(D["createElementVNode"])("div",{class:"configItem dataTableIncludeAggregateRows",innerHTML:e.$sanitize(e.includeAggregateRowsText)},null,8,yd)])):Object(D["createCommentVNode"])("",!0),e.showTotalsConfigItem?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",jd,[Object(D["createElementVNode"])("div",{class:"configItem dataTableShowTotalsRow",innerHTML:e.$sanitize(e.keepTotalsRowText)},null,8,wd)])):Object(D["createCommentVNode"])("",!0),e.showExcludeLowPopulation?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",Sd,[Object(D["createElementVNode"])("div",{class:"configItem dataTableExcludeLowPopulation",innerHTML:e.$sanitize(e.excludeLowPopText)},null,8,Cd)])):Object(D["createCommentVNode"])("",!0),e.showPivotBySubtable?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",kd,[Object(D["createElementVNode"])("div",{class:"configItem dataTablePivotBySubtable",innerHTML:e.$sanitize(e.pivotByText)},null,8,Dd)])):Object(D["createCommentVNode"])("",!0)],8,hd),e.showPeriods?Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:7,class:"dropdown-button dataTableAction activatePeriodsSelection",href:"",onClick:t[7]||(t[7]=Object(D["withModifiers"])(()=>{},["prevent"])),title:e.translate("CoreHome_ChangePeriod"),"data-target":"dropdownPeriods"+e.randomIdForDropdown},[Object(D["createElementVNode"])("div",null,[Pd,Object(D["createElementVNode"])("span",Td,Object(D["toDisplayString"])(e.translations[e.clientSideParameters.period]||e.clientSideParameters.period),1)])],8,Ed)),[[s]]):Object(D["createCommentVNode"])("",!0),e.showPeriods?(Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",{key:8,id:"dropdownPeriods"+e.randomIdForDropdown,class:"dropdown-content dataTablePeriods"},[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.selectablePeriods,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:t},[Object(D["createElementVNode"])("a",{"data-period":t,class:Object(D["normalizeClass"])("tableIcon "+(e.clientSideParameters.period===t?"activeIcon":""))},[Object(D["createElementVNode"])("span",null,Object(D["toDisplayString"])(e.translations[t]||t),1)],10,Vd)]))),128))],8,xd)):Object(D["createCommentVNode"])("",!0)])):Object(D["createCommentVNode"])("",!0)}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Nd(e){return!!e&&"0"!==e}function Id(e,t){return e||Nd(t)}const{$:Md}=window;function Fd(e,t,o){if(/(%(.\$)?s+)/g.test(a(e))){const i=['<br /><span class="action">'];o&&i.push(o);let n=a(e,...i);return t&&(n+=` (${a("CoreHome_Default")})`),n+="</span>",n}return a(e)}function Rd(e,t,o){return e?Fd(t,!0):Fd(o)}var Ld=Object(D["defineComponent"])({props:{showPeriods:Boolean,showFooter:Boolean,showFooterIcons:Boolean,showSearch:Boolean,showFlattenTable:Boolean,reportSupportsFlatten:Boolean,exportSupportsFlatten:Boolean,footerIcons:{type:Array,required:!0},viewDataTable:{type:String,required:!0},reportTitle:String,requestParams:{type:Object,required:!0},apiMethodToRequestDataTable:{type:String,required:!0},maxFilterLimit:{type:Number,required:!0},showExport:Boolean,showExportAsImageIcon:Boolean,showAnnotations:Boolean,reportId:{type:String,required:!0},dataTableActions:{type:Array,required:!0},clientSideParameters:{type:Object,required:!0},hasMultipleDimensions:Boolean,isDataTableEmpty:Boolean,showTotalsRow:Boolean,showExcludeLowPopulation:Boolean,showPivotBySubtable:Boolean,selectablePeriods:Array,translations:{type:Object,required:!0},pivotDimensionName:String,placement:{type:String,default:"footer"}},components:{Passthrough:Lc},directives:{DropdownButton:Rt,ReportExport:lc},methods:{showExportImage(e){Md(e.target).closest(".dataTable").find("div.jqplot-target").trigger("piwikExportAsImage")}},computed:{randomIdForDropdown(){return Math.floor(999999*Math.random())},allFooterIcons(){return this.footerIcons.reduce((e,t)=>(e.push(...t.buttons),e),[])},activeFooterIcons(){const e=this.clientSideParameters,t=[this.viewDataTable];return 0===e.abandonedCarts||"0"===e.abandonedCarts?t.push("ecommerceOrder"):1!==e.abandonedCarts&&"1"!==e.abandonedCarts||t.push("ecommerceAbandonedCart"),t.map(e=>this.allFooterIcons.find(t=>t.id===e)).filter(e=>!!e)},activeFooterIcon(){var e;return null===(e=this.activeFooterIcons[0])||void 0===e?void 0:e.icon},activeFooterIconIds(){return this.activeFooterIcons.map(e=>e.id)},numIcons(){return this.allFooterIcons.length},hasFooterIconsToShow(){return!!this.activeFooterIcons.length&&this.numIcons>1},reportFormats(){const e={TSV:"TSV (Excel)",HTML:"HTML",JSON:"JSON",XML:"XML",CSV:"CSV",RSS:"RSS"};return e},exportSupportsFlat(){return Id(!!this.exportSupportsFlatten,this.clientSideParameters.flat)},showDimensionsConfigItem(){return this.showFlattenTable&&""+this.clientSideParameters.flat==="1"&&this.hasMultipleDimensions},showFlatConfigItem(){return this.showFlattenTable&&""+this.clientSideParameters.flat==="1"},showTotalsConfigItem(){return!this.isDataTableEmpty&&this.showTotalsRow},hasConfigItems(){return this.showFlattenTable||this.showDimensionsConfigItem||this.showFlatConfigItem||this.showTotalsConfigItem||this.showExcludeLowPopulation||this.showPivotBySubtable},flattenItemText(){const e=this.clientSideParameters;return Rd(Nd(e.flat),"CoreHome_UnFlattenDataTable","CoreHome_FlattenDataTable")},keepTotalsRowText(){const e=this.clientSideParameters;return Rd(Nd(e.keep_totals_row),"CoreHome_RemoveTotalsRowDataTable","CoreHome_AddTotalsRowDataTable")},includeAggregateRowsText(){const e=this.clientSideParameters;return Rd(Nd(e.include_aggregate_rows),"CoreHome_DataTableExcludeAggregateRows","CoreHome_DataTableIncludeAggregateRows")},showDimensionsText(){const e=this.clientSideParameters;return Rd(Nd(e.show_dimensions),"CoreHome_DataTableCombineDimensions","CoreHome_DataTableShowDimensions")},pivotByText(){const e=this.clientSideParameters;return Nd(e.pivotBy)?Fd("CoreHome_UndoPivotBySubtable",!0):Fd("CoreHome_PivotBySubtable",!1,this.pivotDimensionName)},excludeLowPopText(){const e=this.clientSideParameters;return Rd(Nd(e.enable_filter_excludelowpop),"CoreHome_IncludeRowsWithLowPopulation","CoreHome_ExcludeRowsWithLowPopulation")},isAnyConfigureIconHighlighted(){const e=this.clientSideParameters;return Nd(e.flat)||Nd(e.keep_totals_row)||Nd(e.include_aggregate_rows)||Nd(e.show_dimensions)||Nd(e.pivotBy)||Nd(e.enable_filter_excludelowpop)},isTableView(){return"table"===this.viewDataTable||"tableAllColumns"===this.viewDataTable||"tableGoals"===this.viewDataTable}}});Ld.render=Bd;var Ad=Ld;const _d={key:0,class:"title",style:{cursor:"pointer"},ref:"expander"},Hd=Object(D["createElementVNode"])("span",{class:"icon-update"},null,-1),$d={key:1,class:"title",href:"?module=CoreUpdater&action=newVersionAvailable",style:{cursor:"pointer"},ref:"expander"},Ud=Object(D["createElementVNode"])("span",{class:"icon-update"},null,-1),qd=["innerHTML"],Wd=["href"],zd={id:"updateCheckLinkContainer"},Gd={class:"dropdown positionInViewport"},Kd=["innerHTML"],Yd=["innerHTML"];function Qd(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("Passthrough"),s=Object(D["resolveDirective"])("expand-on-hover");return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{id:"header_message",class:Object(D["normalizeClass"])(["piwikSelector",{header_info:!e.latestVersionAvailable||e.lastUpdateCheckFailed,update_available:e.latestVersionAvailable}])},[e.latestVersionAvailable?(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:0},{default:Object(D["withCtx"])(()=>[e.isMultiServerEnvironment?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",_d,[Hd,Object(D["createTextVNode"])(" "+Object(D["toDisplayString"])(e.translate("General_NewUpdatePiwikX",e.latestVersionAvailable)),1)],512)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",$d,[Ud,Object(D["createTextVNode"])(" "+Object(D["toDisplayString"])(e.translate("General_NewUpdatePiwikX",e.latestVersionAvailable)),1)],512))]),_:1})):e.isSuperUser&&(e.isAdminArea||e.lastUpdateCheckFailed)?(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:1},{default:Object(D["withCtx"])(()=>[e.isInternetEnabled?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:0,class:"title",innerHTML:e.$sanitize(e.updateCheck)},null,8,qd)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,class:"title",href:e.externalRawLink("https://matomo.org/changelog/"),target:"_blank",rel:"noreferrer noopener"},[Object(D["createElementVNode"])("span",zd,Object(D["toDisplayString"])(e.translate("CoreHome_SeeAvailableVersions")),1)],8,Wd))]),_:1})):Object(D["createCommentVNode"])("",!0),Object(D["createElementVNode"])("div",Gd,[e.latestVersionAvailable&&e.isSuperUser?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.updateNowText)},null,8,Kd)):e.latestVersionAvailable&&e.hasSomeViewAccess&&!e.isAnonymous?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:1,innerHTML:e.$sanitize(e.updateAvailableText)},null,8,Yd)):Object(D["createCommentVNode"])("",!0),Object(D["createTextVNode"])(" "+Object(D["toDisplayString"])(e.translate("General_YouAreCurrentlyUsing",e.piwikVersion)),1)])],2)),[[s,{expander:"expander"}]])}var Jd=Object(D["defineComponent"])({props:{isMultiServerEnvironment:Boolean,lastUpdateCheckFailed:Boolean,latestVersionAvailable:String,isSuperUser:Boolean,isAdminArea:Boolean,isInternetEnabled:Boolean,updateCheck:String,isAnonymous:Boolean,hasSomeViewAccess:Boolean,contactEmail:String,piwikVersion:String},components:{Passthrough:Lc},directives:{ExpandOnHover:Nt},computed:{updateNowText(){let e="";if(this.isMultiServerEnvironment){const t=ue(`https://builds.matomo.org/matomo-${this.latestVersionAvailable}.zip`);e=a("CoreHome_OneClickUpdateNotPossibleAsMultiServerEnvironment",`<a rel="noreferrer noopener" href="${t}">builds.matomo.org</a>`)}else e=a("General_PiwikXIsAvailablePleaseUpdateNow",this.latestVersionAvailable||"",'<br /><a href="index.php?module=CoreUpdater&amp;action=newVersionAvailable">',"</a>",pe("https://matomo.org/changelog/"),"</a>");return e+"<br/>"},updateAvailableText(){const e=a("General_NewUpdatePiwikX",this.latestVersionAvailable||""),t=pe("https://matomo.org/")+"Matomo</a>",o=pe("https://matomo.org/changelog/"),i=a("General_PiwikXIsAvailablePleaseNotifyPiwikAdmin",`${t} ${o}${this.latestVersionAvailable}</a>`,`<a href="mailto:${this.contactEmail}?subject=${encodeURIComponent(e)}">`,"</a>");return i+"<br />"}}});Jd.render=Qd;var Xd=Jd;const Zd={id:"mobile-left-menu",class:"sidenav hide-on-large-only"},eu={class:"collapsible collapsible-accordion"},tu={class:"collapsible-header"},ou={class:"collapsible-body"},iu=["title","href"];function nu(e,t,o,i,n,a){const r=Object(D["resolveDirective"])("side-nav");return Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",Zd,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.menuWithSubmenuItems,(t,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{class:"no-padding",key:o},[Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",eu,[Object(D["createElementVNode"])("li",null,[Object(D["createElementVNode"])("a",tu,[Object(D["createTextVNode"])(Object(D["toDisplayString"])(e.translateOrDefault(o)),1),Object(D["createElementVNode"])("i",{class:Object(D["normalizeClass"])(t._icon||"icon-chevron-down")},null,2)]),Object(D["createElementVNode"])("div",ou,[Object(D["createElementVNode"])("ul",null,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(Object.entries(t).filter(([e])=>"_"!==e[0]),([t,o])=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:t},[Object(D["createElementVNode"])("a",{title:o._tooltip?e.translateIfNecessary(o._tooltip):"",target:"_self",href:e.getMenuUrl(o._url)},Object(D["toDisplayString"])(e.translateIfNecessary(t)),9,iu)]))),128))])])])])),[[r,{activator:e.activateLeftMenu}]])]))),128))])}const{$:au}=window;var ru=Object(D["defineComponent"])({props:{menu:{type:Object,required:!0}},directives:{SideNav:Jt},methods:{getMenuUrl(e){return"?"+U.stringify(Object.assign(Object.assign({},U.urlParsed.value),e))},translateIfNecessary(e){return e.includes("_")?a(e):e}},computed:{menuWithSubmenuItems(){const e=this.menu||{};return Object.fromEntries(Object.entries(e).filter(([,e])=>{const t=Object.entries(e).filter(([e])=>"_"!==e[0]);return Object.keys(t).length}))},activateLeftMenu(){return au("nav .activateLeftMenu")[0]}}});ru.render=nu;var su=ru;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{$:lu}=window;function cu(e){lu.scrollTo(e,20)}function du(e){e&&e.preventDefault()}function uu(e,t){var o,i;if(!e)return;if(-1!==e.indexOf("&"))return;let n=null;try{n=lu("#"+e)}catch(a){return}if(null!==(o=n)&&void 0!==o&&o.length)return cu(n),void du(t);n=lu(`a[name=${e}]`),null!==(i=n)&&void 0!==i&&i.length&&(cu(n),du(t))}function pu(e,t){return(!e||!e.origin||-1!==t.indexOf(e.origin))&&((!e||!e.pathname||-1!==t.indexOf(e.pathname))&&(!e||!e.search||-1!==t.indexOf(e.search)))}function mu(){if("#/"===window.location.hash.slice(0,2)){const e=window.location.hash.slice(2);uu(e,null)}}function hu(){Object(D["watch"])(()=>U.url.value,(e,t)=>{if(!e)return;const o=e.href.indexOf("#/");if(-1===o)return;if(t&&!pu(t,e.href))return;const i=e.href.slice(o+2);uu(i,null)})}function gu(){Object(D["nextTick"])(mu)}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function bu(e){const t=[];if("INPUT"===e.tagName&&"password"===e.type)t.push(e);else{const o=e.querySelectorAll('input[type="password"]');o.forEach(e=>t.push(e))}return t}function fu(e,t){let o,i=e.value;const n=()=>{e.value="",e.dispatchEvent(new Event("input"))},a=()=>{o&&clearTimeout(o),o=setTimeout(n,1e3*t)},r=()=>a(),s=()=>a();e.addEventListener("input",r),e.addEventListener("change",s),e.dataset.autoClearEnabled="true";const l=setInterval(()=>{e.value!==i&&(i=e.value,a())},300);e.onUmounted={cleanup(){clearTimeout(o),clearInterval(l),e.removeEventListener("input",r),e.removeEventListener("change",s),delete e.dataset.autoClearEnabled}}}hu(),lu(mu);var vu={mounted(e,t){const o=t.value&&t.value.delay||600,i=bu(e);i.forEach(e=>fu(e,o))},unmounted(e){const t=bu(e);t.forEach(e=>{e.onUmounted&&"function"===typeof e.onUmounted.cleanup&&(e.onUmounted.cleanup(),delete e.onUmounted)})}};const Ou={key:0,class:"password-strength row"};function yu(e,t,o,i,n,a){return e.rules.length?(Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",Ou,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.rules,t=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:t.ruleText,class:Object(D["normalizeClass"])("col s12 xl6 rule rule-"+e.ruleStatus(t))},[Object(D["createElementVNode"])("span",{class:Object(D["normalizeClass"])({icon:!0,"icon-ok":"valid"===e.ruleStatus(t),"icon-close":"invalid"===e.ruleStatus(t),"icon-circle":"undefined"===e.ruleStatus(t)})},null,2),Object(D["createTextVNode"])(" "+Object(D["toDisplayString"])(t.ruleText),1)],2))),128))])):Object(D["createCommentVNode"])("",!0)}var ju=Object(D["defineComponent"])({props:{validationRules:{type:Array,required:!0},password:{type:String,default:""},externalInputSelector:{type:String,default:""}},data(){return{pwd:"",rules:[]}},emits:["check:isValid"],watch:{pwdValue:{immediate:!0,handler(e){const t=[];this.rules.forEach(o=>{if(e.length||"undefined"===typeof o.passed)try{const i=new RegExp(o.validationRegex.replace(/^\/|\/$/g,""));i.test(e)?(o.passed=!0,t.push(!0)):o.passed=!1}catch(i){console.log("Invalid password validation pattern:",i)}else delete o.passed}),this.rules.length>0&&t.length===this.rules.length&&this.$emit("check:isValid",!0)}}},computed:{pwdValue(){var e;return null!==(e=this.externalInputSelector)&&void 0!==e&&e.length?this.pwd:this.password}},mounted(){var e;if(this.rules=this.validationRules.length?this.validationRules.map(e=>Object.assign({},e)):[],null!==(e=this.externalInputSelector)&&void 0!==e&&e.length){const e=document.querySelector(this.externalInputSelector);e&&(e.addEventListener("input",this.handleExternalInput),this.pwd=e.value)}},unmounted(){var e;if(null!==(e=this.externalInputSelector)&&void 0!==e&&e.length){const e=document.querySelector(this.externalInputSelector);e&&e.removeEventListener("input",this.handleExternalInput)}},methods:{ruleStatus(e){return"undefined"===typeof e.passed?"undefined":e.passed?"valid":"invalid"},handleExternalInput(e){const t=e.target;this.pwd=t.value}}});ju.render=yu;var wu=ju;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const Su={class:"main-duplicator-modal-content"},Cu={class:"modal-header"},ku=Object(D["createElementVNode"])("span",{class:"btn-close modal-close"},[Object(D["createElementVNode"])("i",{class:"icon-close"})],-1),Du={key:0,class:"modal-sub-header"},Eu={class:"loading-message"},Pu={key:0,class:"modal-sub-header"},Tu=["innerHTML"],xu={class:"modal-content"},Vu={class:"modal-inputs"},Bu={class:"modal-sub-footer"},Nu=["innerHTML"],Iu=["innerHTML"],Mu={class:"modal-footer"},Fu=["disabled"];function Ru(e,t,o,i,n,a){const r=Object(D["resolveComponent"])("MatomoLoader"),s=Object(D["resolveComponent"])("Field"),l=Object(D["resolveDirective"])("form");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:Object(D["normalizeClass"])({modal:!0,"entity-duplicator-modal":!0,"slot-configured":e.$slots.default}),ref:"root"},[Object(D["withDirectives"])(Object(D["createElementVNode"])("div",Su,[Object(D["createElementVNode"])("div",Cu,[ku,Object(D["createElementVNode"])("h2",null,Object(D["toDisplayString"])(e.getModalTitle),1)]),e.isLoading?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Du,[Object(D["createVNode"])(r),Object(D["createElementVNode"])("span",Eu,Object(D["toDisplayString"])(e.translate("General_Loading")),1)])):(Object(D["openBlock"])(),Object(D["createElementBlock"])(D["Fragment"],{key:1},[e.hideSiteSelector?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Pu,[Object(D["createElementVNode"])("p",null,[Object(D["createTextVNode"])(Object(D["toDisplayString"])(e.getDuplicateDescription)+" ",1),e.descriptionLearnMoreLink?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.getLearnMoreLink)},null,8,Tu)):Object(D["createCommentVNode"])("",!0)]),Object(D["createVNode"])(s,{uicontrol:"site",name:"siteSelector",title:e.translate("CoreHome_ChooseWebsite"),modelValue:e.destinationSite,"onUpdate:modelValue":t[0]||(t[0]=t=>e.destinationSite=t),"ui-control-attributes":{onlySitesWithAtLeastWriteAccess:!0,siteTypesToExclude:["rollup"]}},null,8,["title","modelValue"])])),Object(D["createElementVNode"])("div",xu,[Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Vu,[Object(D["renderSlot"])(e.$slots,"default")])),[[l]])]),Object(D["createElementVNode"])("div",Bu,[e.duplicationErrors.length>0?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:0,class:Object(D["normalizeClass"])({alert:!0,"alert-danger":!0,"error-list":e.duplicationErrors.length>1})},[Object(D["createElementVNode"])("ul",null,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.duplicationErrors,(t,o)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:o,innerHTML:e.$sanitize(t)},null,8,Nu))),128))])],2)):Object(D["createCommentVNode"])("",!0),Object(D["createElementVNode"])("p",{class:"note-text",innerHTML:e.$sanitize(e.getNoteText)},null,8,Iu)]),Object(D["createElementVNode"])("div",Mu,[Object(D["withDirectives"])(Object(D["createVNode"])(r,null,null,512),[[D["vShow"],e.hasBeenSubmitted]]),Object(D["createElementVNode"])("button",{class:"btn",disabled:!e.getIsValid||e.hasBeenSubmitted,onClick:t[1]||(t[1]=t=>e.submitRequest())},Object(D["toDisplayString"])(e.translate("General_Copy")),9,Fu)])],64))],512),[[D["vShow"],e.isModalVisible]])],2)}const Lu=Ce("CorePluginsAdmin","Field"),Au=Ce("CorePluginsAdmin","Form"),{$:_u}=window;var Hu=Object(D["defineComponent"])({directives:{Form:Au},components:{Field:Lu,MatomoLoader:Ue},props:{modalStore:{type:Object,required:!0},hideSiteSelector:{type:Boolean,default:!1},descriptionLearnMoreLink:{type:String,default:""}},data(){return{isLoading:!0,isValidated:!1,duplicationErrors:[],destinationSite:null,hasBeenSubmitted:!1}},watch:{isModalVisible(e){if(!e)return;let t;this.modalStore.adapter.beforeShowModal&&(t=this.modalStore.adapter.beforeShowModal()),t&&"undefined"!==typeof t||(t=new Promise(e=>e())),this.showModal(),t.then(()=>{this.isLoading=!1})},destinationSite(){this.isValidated=!1}},methods:{closeModal(){const e=this.$refs.root,t=_u(e);t.modal("close")},resetModal(){this.modalStore.hideModal(),this.destinationSite=null,this.isLoading=!0,this.isValidated=!1,this.duplicationErrors=[],this.hasBeenSubmitted=!1},showModal(){const e=this.$refs.root,t=_u(e);t.modal({dismissible:!0,onCloseEnd:()=>{this.resetModal()}}).modal("open")},submitRequest(){this.hasBeenSubmitted=!0,this.getValidationResultPromise().then(e=>{var t;if(!e.isValid&&e.errorMessages.length>0)return this.isValidated=!0,this.hasBeenSubmitted=!1,void(this.duplicationErrors=e.errorMessages);const o=this.modalStore.adapter.prepareApiParams(this.modalStore.getFormValues(null===(t=this.destinationSite)||void 0===t?void 0:t.id));this.modalStore.adapter.submitRequest(o).then(e=>{e&&e.success?(this.modalStore.adapter.onSuccess&&this.modalStore.adapter.onSuccess(e),this.closeModal()):this.setErrorMessages(e)}).catch(e=>{this.setErrorMessages(),this.modalStore.adapter.onFailure&&this.modalStore.adapter.onFailure(e),console.log("Unexpected server error during request.",e)}).finally(()=>{this.hasBeenSubmitted=!1})})},getValidationResultPromise(){var e;this.duplicationErrors=[];const t=this.modalStore.adapter.validateFormFields(this.modalStore.getFormValues(null===(e=this.destinationSite)||void 0===e?void 0:e.id));return"isValid"in t?new Promise(e=>e(t)):t},setErrorMessages(e=null){let t=(null===e||void 0===e?void 0:e.message)||"";t&&0!==t.length||(t=a("General_ErrorRequest","","")),this.duplicationErrors=[],this.duplicationErrors.push(t)}},mounted(){Object(D["watch"])(()=>this.modalStore.state.entityFormData,()=>{this.isValidated=!1},{deep:!0})},computed:{isModalVisible(){var e;return null!==(e=this.modalStore.state.isModalVisible)&&void 0!==e&&e},getModalTitle(){return a("CoreHome_CopyX",this.modalStore.getEntityTypeTranslation)},getNoteText(){const e=a("CoreHome_CopyModalNote","<strong>","</strong>",this.modalStore.getEntityTypeTranslation);return""+e},getDuplicateDescription(){return a("CoreHome_CopyXDescription",this.modalStore.getEntityTypeTranslation)},getLearnMoreLink(){if(!this.descriptionLearnMoreLink)return"";const e=pe(this.descriptionLearnMoreLink);return a("CoreHome_LearnMoreFullStop",e,"</a>")},getIsValid(){return!this.isValidated||Array.isArray(this.duplicationErrors)&&0===this.duplicationErrors.length}}});Hu.render=Ru;var $u=Hu;const Uu=["title","aria-disabled"];function qu(e,t,o,i,n,a){const r=Object(D["resolveDirective"])("tooltips");return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{class:Object(D["normalizeClass"])([{"entity-duplicator-action":!0,"table-action":!0,"icon-content-copy":!0,"is-disabled":!e.isActionEnabled},e.extraClasses]),title:e.getActionTooltip,"aria-disabled":!e.isActionEnabled,onClick:t[0]||(t[0]=t=>!e.isActionEnabled||e.handleClick())},null,10,Uu)),[[r],[D["vShow"],e.isActionVisible]])}var Wu=Object(D["defineComponent"])({props:{actionFormData:{type:Object,required:!0},modalStore:{type:Object,required:!0},isActionVisible:{type:Boolean,required:!0},isActionEnabled:{type:Boolean,default:!1},tooltipTextOverride:{type:String,default:""},tooltipTextOverrideDisabled:{type:String,default:""},extraClasses:{type:[String,Array,Object],default:""}},directives:{Tooltips:ct},methods:{handleClick(){this.modalStore.showModal(this.actionFormData)}},computed:{getActionTooltip(){return this.isActionEnabled&&this.tooltipTextOverride.length?r(this.tooltipTextOverride):!this.isActionEnabled&&this.tooltipTextOverrideDisabled.length?r(this.tooltipTextOverrideDisabled):a("CoreHome_CopyX",this.modalStore.getEntityTypeTranslation)}}});Wu.render=qu;var zu=Wu;function Gu(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */class Ku{constructor(e){Gu(this,"module",void 0),Gu(this,"method",void 0),Gu(this,"format",void 0),Gu(this,"requiredFields",void 0),this.module=e.module||"API",this.method=e.method,this.format=e.format||"json",this.requiredFields=e.requiredFields||["idSite","idDestinationSites"]}async validateFormFields(e){const t=[];return this.requiredFields.forEach(o=>{o in e&&e[o]||t.push(a("General_Required",o))}),new Promise(e=>e({errorMessages:t,isValid:0===t.length}))}prepareApiParams(e){return Object.assign({idSite:M.idSite||U.parsed.value.idSite,idDestinationSites:[e.idDestinationSite]},e)}async submitRequest(e){this.module=e.module||this.module,this.method=e.method||this.method,this.format=e.format||this.format;const t=e;if(!this.method||this.method.length<1)throw new Error("The POST method cannot be empty!");const o=new te;return o.useCallbackInCaseOfError(),o.setErrorCallback(null),o.removeDefaultParameter("date"),o.removeDefaultParameter("period"),o.removeDefaultParameter("segment"),o.addParams({module:this.module,method:this.method,format:this.format},"GET"),o.addParams(t,"POST"),o.setFormat(this.format),o.send()}onSuccess(e){let t=new Promise(e=>e());this.onSuccessCallback&&(t=this.onSuccessCallback(e)),t.then(()=>{setTimeout(()=>{const t=Zi.show({message:e.message,context:e.success?"success":"error",type:"toast",id:"entityDuplicationResult"});Zi.scrollToNotification(t)})})}}function Yu(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */class Qu{constructor(e,t,o){Yu(this,"state",Object(D["reactive"])({isModalVisible:!1,commonFormData:{},entityFormData:{},entityTypeTranslation:""})),Yu(this,"adapter",void 0),this.state.entityTypeTranslation=e,this.adapter="validateFormFields"in t?t:new Ku(t),this.state.commonFormData=null!==o&&void 0!==o?o:{}}static buildStoreInstance(e,t,o){return Object(D["reactive"])(new Qu(e,t,o))}showModal(e){this.resetFormData(),Object.entries(null!==e&&void 0!==e?e:{}).forEach(([e,t])=>{this.state.entityFormData[e]=t}),this.state.isModalVisible=!0}hideModal(){this.state.isModalVisible=!1,this.resetFormData()}resetFormData(){Object.keys(this.state.entityFormData).forEach(e=>{delete this.state.entityFormData[e]})}getFormValues(e){const t=Array.isArray(e)?e:[];return e&&!Array.isArray(e)&&t.push(e),Object.assign(Object.assign({idSite:M.idSite||U.parsed.value.idSite,idDestinationSites:t},this.state.commonFormData),this.state.entityFormData)}get getEntityTypeTranslation(){let e="CoreHome_ReportLowercase";return this.state.entityTypeTranslation&&(e=this.state.entityTypeTranslation),r(e)}}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 